code
stringlengths
3
1.01M
repo_name
stringlengths
5
116
path
stringlengths
3
311
language
stringclasses
30 values
license
stringclasses
15 values
size
int64
3
1.01M
package xyz.thepathfinder.routing.domain; public class CommodityPickup implements CommodityStart, CommodityAction { final String name; public CommodityPickup(String name) { this.name = name; } @Override public String getName() { return name; } @Override public String toString() { return getName(); } }
CSSE497/pathfinder-routing
simulatedannealing/src/main/java/xyz/thepathfinder/routing/domain/CommodityPickup.java
Java
mit
367
var quizQuistions = { name:"Super Hero Name Quiz", description:"How many super heroes can you name?", headline:"What is the real name of ", mainquestionList: [ { "questionName": "Superman", "answer": "Clarke" }, { "questionName": "Batman", "answer": "Bruce" }, { "question": "Wonder Woman", "answer": "Dianna" } ] } // dom element grab var $finalScore = document.getElementById("score"); var $ListOfquestions = document.getElementById('displayQuestion'); var $ListOfFeedback = document.getElementById('feedback') var $startButton = document.getElementById('button'); var $mainForm = document.getElementById('mainform'); var $clockTimer = document.getElementById('clocktimer'); function updateDom(element, content, klass){ var p = element.firstChild || document.createElement("p"); p.textContent = content; element.appendChild(p); if(klass){ p.className = klass; } } //hide function function hide(element){ element.style.display = "none"; } //hide show button function show(element){ element.style.display = "block"; } // event listener for click button $startButton.addEventListener('click', function (){ play(quizQuistions); }, false); // Initial hide main form hide($mainForm); function play(quizQuistions){ var score = 0; updateDom($finalScore, score); // initialize time and set up an interval that counts down every second var time = 20; updateDom($clockTimer, time); var interval = window.setInterval(timeCoutdown, 1000) //hide button but show form hide($startButton); show($mainForm); // main form event listener $mainForm.addEventListener('submit', function(event){ event.preventDefault(); check($mainForm[0].value); }, false); var i = 0; chooseQuestion(); function chooseQuestion(){ var questionVal = quizQuistions.mainquestionList[i].questionName; ask(questionVal); } function ask(questionAskParamater) { updateDom($ListOfquestions, quizQuistions.headline + questionAskParamater ) $mainForm[0].value = ""; $mainForm[0].focus(); } function check(answer) { if(answer === quizQuistions.mainquestionList[i].answer){ updateDom($ListOfFeedback, "Answer Correct", "right"); score++; updateDom($finalScore, score); } else { updateDom($ListOfFeedback, "Answer Wrong", "wrong"); } // check if any quistion available i++ if(i === quizQuistions.mainquestionList.length){ finalGameOver() } else { chooseQuestion(); } } // time countdown and decrease the time function timeCoutdown(){ time --; updateDom($clockTimer, time); if(time <= 0){ finalGameOver(); } } // game over function finalGameOver(){ updateDom($ListOfquestions, "Gameover, Your scored is " +score+ " points"); window.clearInterval(interval); hide($mainForm); show($startButton); } }
Arifkarimm/JS-Quiz-application
js/script.js
JavaScript
mit
3,117
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Short Form Blogging &#8211; Startup Product Manager</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content="On building products that people love and use"> <meta name="author" content="Anand Rajaram"> <meta name="keywords" content="meta"> <link rel="canonical" href="http://www.startupproductmanager.com/2014/11/short-form-blogging/"> <!-- Custom CSS --> <link rel="stylesheet" href="/css/pixyll.css" type="text/css"> <!-- Open Graph --> <meta property="og:locale" content="en_US"> <meta property="og:type" content="article"> <meta property="og:title" content="Short Form Blogging"> <meta property="og:description" content="On building products that people love and use"> <meta property="og:url" content="http://www.startupproductmanager.com/2014/11/short-form-blogging/"> <meta property="og:site_name" content="Startup Product Manager"> <!-- Fonts --> <link href='//fonts.googleapis.com/css?family=Merriweather:900,900italic,300,300italic' rel='stylesheet' type='text/css'> <link href='//fonts.googleapis.com/css?family=Lato:900,300' rel='stylesheet' type='text/css'> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script type="text/javascript"> !function(){var analytics=window.analytics=window.analytics||[];if(analytics.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{analytics.invoked=!0;analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","group","track","ready","alias","page","once","off","on"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t){var e=document.createElement("script");e.type="text/javascript";e.async=!0;e.src=("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(e,n)};analytics.SNIPPET_VERSION="3.0.0"; analytics.load("5isgCyiREhEygcFeVZdDLjv1IQDBb8GI"); analytics.page() }}(); </script> <!-- Hotjar Tracking Code for www.startupproductmanager.com --> <script> (function(f,b){ var c; f.hj=f.hj||function(){(f.hj.q=f.hj.q||[]).push(arguments)}; f._hjSettings={hjid:46529, hjsv:4}; c=b.createElement("script");c.async=1; c.src="//static.hotjar.com/c/hotjar-"+f._hjSettings.hjid+".js?sv="+f._hjSettings.hjsv; b.getElementsByTagName("head")[0].appendChild(c); })(window,document); </script> </head> <body class="animated fade-in-down"> <div class="site-wrap"> <header class="site-header px2 px-responsive"> <div class="mt2 wrap"> <div class="measure"> <a href="http://www.startupproductmanager.com" class="site-title">Startup Product Manager</a> <nav class="site-nav right"> <a href="/about">About</a> <a href="/contact">Contact</a> <a href="http://twitter.com/anandrajaram"><i class="fa fa-twitter-square fa-lg"></i></a> <a href="http://linkedin.com/in/anandrajaram"><i class="fa fa-linkedin-square fa-lg"></i></a> <a href="/feed.xml"><i class="fa fa-rss-square fa-lg"></i></a> </nav> <div class="clearfix"></div> </div> </div> </header> <div class="post p2 p-responsive wrap" role="main"> <div class="measure"> <div class="post-header mb2"> <h1 class="py2"><a href="http://scribbling.net/2014/10/16/short-form-blogging/">Short Form Blogging</a></h1> <span class="post-meta">Nov 2, 2014</span><br> <span class="post-meta small">1 minute read</span> </div> <article class="post-content"> <blockquote> <ul> <li> <p>Negotiate a comfort zone on two axes.</p> </li> <li> <p>Traffic is irrelevant</p> </li> <li> <p>Have fun. Blogging is not your job. Don’t add it to your to-do list. If it’s not fun and you’re not done? Screw it. Take the baby to the park instead.</p> </li> </ul> </blockquote> <p>This “short-form” post from <a href="https://twitter.com/ginatrapani">Gina Tripani</a> inspired me to get back at it again. Nope, no in-depth medium style pieces, probably a lot of tools/tips style posts and a bunch of link posts (like this one). The last time I wanted to post, I ended up <a href="https://github.com/johnotander/pixyll/">updating my theme</a>, so fingers cross if it’ll work out this time.</p> </article> <div id="disqus_thread"></div> <script type="text/javascript"> var disqus_shortname = 'startupproductmanager'; // required: replace example with your forum shortname /* * * DON'T EDIT BELOW THIS LINE * * */ (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })(); </script> <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> <a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a> <h3 class="related-post-title">Related Posts</h3> <div class="post ml2"> <a href="/2015/09/winter-may-be-coming/" class="post-link"> <h4 class="post-title">Winter May be coming?</h4> <p class="post-summary"></p> </a> </div> <div class="post ml2"> <a href="/2015/07/ios-app-release-notes-are-loaded-with-personality/" class="post-link"> <h4 class="post-title">iOS App Release Notes are loaded with personality</h4> <p class="post-summary"></p> </a> </div> <div class="post ml2"> <a href="/2015/01/theme-for-2015--creation/" class="post-link"> <h4 class="post-title">Theme for 2015 -> Creation</h4> <p class="post-summary"></p> </a> </div> <div class="post ml2"> <a href="/2014/11/the-counterintuitive-thing-about-counterintuitive-things/" class="post-link"> <h4 class="post-title">If you haven't talked to a customer today, you are doing it wrong</h4> <p class="post-summary"></p> </a> </div> <div class="post ml2"> <a href="/2014/11/conflict-strategies-for-product-managers/" class="post-link"> <h4 class="post-title">Conflict Strategies for Product Managers</h4> <p class="post-summary"></p> </a> </div> <div class="post ml2"> <a href="/2014/01/new-england-fall-winter/" class="post-link"> <h4 class="post-title">Seasons</h4> <p class="post-summary"></p> </a> </div> <div class="post ml2"> <a href="/2013/12/windows-8-perfect-os-that-nobody-wants/" class="post-link"> <h4 class="post-title">Windows 8 Is The Perfect OS That Nobody Wants</h4> <p class="post-summary"></p> </a> </div> <div class="post ml2"> <a href="/2013/10/london-heathrow-airport-has-an-interesting-way-of-surveying-customers/" class="post-link"> <h4 class="post-title">London Heathrow airport has an interesting way of surveying customers</h4> <p class="post-summary"></p> </a> </div> <div class="post ml2"> <a href="/2013/09/iphone-5c-5s-product-management/" class="post-link"> <h4 class="post-title">iPhone 5C & 5S : Observations of a Product Manager</h4> <p class="post-summary"></p> </a> </div> <div class="post ml2"> <a href="/2012/12/sweat-the-details/" class="post-link"> <h4 class="post-title">Sweat the details</h4> <p class="post-summary"></p> </a> </div> </div> </div> </div> <footer class="footer"> <div class="p2 wrap"> <div class="measure mt1 center"> <small> &copy; 2015 Anand Rajaram. <a href="">Pixyll Theme</a> courtesy of <a href="http://johnotander.com">John Otander</a>. </small> </div> </div> </footer> <!-- Start of Async HubSpot Analytics Code --> <script type="text/javascript"> (function(d,s,i,r) { if (d.getElementById(i)){return;} var n=d.createElement(s),e=d.getElementsByTagName(s)[0]; n.id=i;n.src='//js.hs-analytics.net/analytics/'+(Math.ceil(new Date()/r)*r)+'/162311.js'; e.parentNode.insertBefore(n, e); })(document,"script","hs-analytics",300000); </script> <!-- End of Async HubSpot Analytics Code --> </body> </html>
anandrajaram/anandrajaram.github.io
_site/2014/11/short-form-blogging/index.html
HTML
mit
8,927
using Schokotaler.Api.Models; namespace Schokotaler.Api.Repository { public interface ICreditCardRepository : IRepository<CreditCard, long> { } }
ro-kue/SchokoTaler_backend
schokotaler_webapi/Repository/ICreditCardRepository.cs
C#
mit
163
using System; using System.Collections.Generic; using System.Runtime.InteropServices; using System.Text; using static Leto.Interop.LibCrypto; namespace Leto.Interop { public static partial class OpenSsl { [DllImport(Libraries.LibSsl, CallingConvention = CallingConvention.Cdecl)] public static extern void SSL_set0_rbio(SSL ssl, BIO rbio); } }
Drawaes/Leto
src/Leto.Interop/OpenSsl/SSL_set0_rbio.cs
C#
mit
373
<?php /** * @author Dmitry Landa <dmitry.landa@yandex.ru> * * For the full copyright and license information, please view the * LICENSE file that was distributed with this source code. */ namespace Lmi\Bundle\SchoolBundle\Twig; /** * @author Dmitry Landa <dmitry.landa@yandex.ru> */ class LmiSchoolExtension extends \Twig_Extension { private $educationMap; private $categoryMap; function __construct(array $educationMap, array $categoryMap) { $this->educationMap = $educationMap; $this->categoryMap = $categoryMap; } public function getFilters() { return array( new \Twig_SimpleFilter('humanize_education', array($this, 'humanizeEducation')), new \Twig_SimpleFilter('humanize_category', array($this, 'humanizeCategory')), ); } /** * @param integer|string $key * @return string */ public function humanizeEducation($key) { $educationTranslatable = $this->educationMap[$key]; if (!$educationTranslatable) { $educationTranslatable = 'lmi.school.common.teacher.education.not_specified'; } return $educationTranslatable; } /** * @param integer|string $key * @return string */ public function humanizeCategory($key) { $categoryTranslatable = $this->categoryMap[$key]; if (!$categoryTranslatable) { $categoryTranslatable = 'lmi.school.common.teacher.category.not_specified'; } return $categoryTranslatable; } /** * {@inheritdoc} * * @return string */ public function getName() { return 'lmi_school_extension'; } }
DmitryLanda/lmi
src/Lmi/Bundle/SchoolBundle/Twig/LmiSchoolExtension.php
PHP
mit
1,704
package org.pitrecki.spring_learnining.otherthings.animals; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Component; /** * @author Piotr 'pitrecki' Nowak * Created by Pitrecki on 2017-03-17. */ @Component class Dog implements Animal { private final Logger logger = LogManager.getLogger(Dog.class); private final String name; @Autowired public Dog(@Qualifier(value = "dogName") String name) { this.name = name; } @Override public void doNoise() { logger.info(name + " is barking"); } }
pitrecki/spring-tutorial
src/main/java/org/pitrecki/spring_learnining/otherthings/animals/Dog.java
Java
mit
756
<!DOCTYPE html> <html> <head> <link href="css/awsdocs.css" rel="stylesheet" type="text/css"> <script type="text/javascript" src="js/jquery.min.js"></script> <script type="text/javascript" src="js/awsdocs.min.js"></script> <meta charset="utf-8"> </head> <body> <div id="content" style="padding: 10px 30px;"> <h1 class="topictitle" id="aws-properties-iot-topicrule-cloudwatchalarmaction">AWS IoT TopicRule CloudwatchAlarmAction</h1><p><code class="code">CloudwatchAlarm</code> is a property of the <code class="code">Actions</code> property that describes an action that updates a CloudWatch alarm. </p><h2 id="w2ab1c21c10d162c39c23b5">Syntax</h2><div id="JSON" name="JSON" class="section langfilter"> <h3 id="aws-properties-iot-topicrule-cloudwatchalarmaction-syntax.json">JSON</h3> <pre class="programlisting"><div class="code-btn-container"><div class="btn-copy-code" title="Copy"></div><div class="btn-dark-theme" title="Dark theme" title-dark="Dark theme" title-light="Light theme"></div></div><code class="nohighlight">{ &quot;<a href="aws-properties-iot-topicrule-cloudwatchalarmaction.html#cfn-iot-topicrule-cloudwatchalarmaction-alarmname">AlarmName</a>&quot;: <em class="replaceable"><code>String</code></em>, &quot;<a href="aws-properties-iot-topicrule-cloudwatchalarmaction.html#cfn-iot-topicrule-cloudwatchalarmaction-rolearn">RoleArn</a>&quot;: <em class="replaceable"><code>String</code></em>, &quot;<a href="aws-properties-iot-topicrule-cloudwatchalarmaction.html#cfn-iot-topicrule-cloudwatchalarmaction-statereason">StateReason</a>&quot;: <em class="replaceable"><code>String</code></em>, &quot;<a href="aws-properties-iot-topicrule-cloudwatchalarmaction.html#cfn-iot-topicrule-cloudwatchalarmaction-statevalue">StateValue</a>&quot;: <em class="replaceable"><code>String</code></em> }</code></pre> </div><div id="YAML" name="YAML" class="section langfilter"> <h3 id="aws-properties-iot-topicrule-cloudwatchalarmaction-syntax.yaml">YAML</h3> <pre class="programlisting"><div class="code-btn-container"><div class="btn-copy-code" title="Copy"></div><div class="btn-dark-theme" title="Dark theme" title-dark="Dark theme" title-light="Light theme"></div></div><code class="nohighlight"><a href="aws-properties-iot-topicrule-cloudwatchalarmaction.html#cfn-iot-topicrule-cloudwatchalarmaction-alarmname">AlarmName</a>: <em class="replaceable"><code>String</code></em> <a href="aws-properties-iot-topicrule-cloudwatchalarmaction.html#cfn-iot-topicrule-cloudwatchalarmaction-rolearn">RoleArn</a>: <em class="replaceable"><code>String</code></em> <a href="aws-properties-iot-topicrule-cloudwatchalarmaction.html#cfn-iot-topicrule-cloudwatchalarmaction-statereason">StateReason</a>: <em class="replaceable"><code>String</code></em> <a href="aws-properties-iot-topicrule-cloudwatchalarmaction.html#cfn-iot-topicrule-cloudwatchalarmaction-statevalue">StateValue</a>: <em class="replaceable"><code>String</code></em> </code></pre> </div><h2 id="w2ab1c21c10d162c39c23b7">Properties</h2><div class="variablelist"> <dl> <dt><a id="cfn-iot-topicrule-cloudwatchalarmaction-alarmname"></a><span class="term"><code class="literal">AlarmName</code></span></dt> <dd> <p>The CloudWatch alarm name.</p> <p><em>Required</em>: Yes </p> <p><em>Type</em>: String </p> </dd> <dt><a id="cfn-iot-topicrule-cloudwatchalarmaction-rolearn"></a><span class="term"><code class="literal">RoleArn</code></span></dt> <dd> <p>The IAM role that allows access to the CloudWatch alarm.</p> <p><em>Required</em>: Yes </p> <p><em>Type</em>: String </p> </dd> <dt><a id="cfn-iot-topicrule-cloudwatchalarmaction-statereason"></a><span class="term"><code class="literal">StateReason</code></span></dt> <dd> <p>The reason for the change of the alarm state.</p> <p><em>Required</em>: Yes </p> <p><em>Type</em>: String </p> </dd> <dt><a id="cfn-iot-topicrule-cloudwatchalarmaction-statevalue"></a><span class="term"><code class="literal">StateValue</code></span></dt> <dd> <p>The value of the alarm state.</p> <p><em>Required</em>: Yes </p> <p><em>Type</em>: String </p> </dd> </dl> </div></div> </body> </html>
pdhodgkinson/AWSCloudFormationTemplateReference-dash-docset
AWS_CloudFormation_Template_Reference.docset/Contents/Resources/Documents/aws-properties-iot-topicrule-cloudwatchalarmaction.html
HTML
mit
6,296
// This file is part of the cube - ica/cuda - software package // Copyright © 2010-2013 Christian Kellner <kellner@bio.lmu.de> // License: MIT (see LICENSE.BSD-MIT) #ifndef CUBE_BLAS_H #define CUBE_BLAS_H #ifdef __cplusplus extern "C" { #endif #include "cube.h" enum _cube_blas_op_t { CUBE_BLAS_OP_N = 0, CUBE_BLAS_OP_T = 1, CUBE_BLAS_OP_C = 2 }; typedef enum _cube_blas_op_t cube_blas_op_t; void cube_blas_d_iamax (cube_t *ctx, int n, const double *x, int incx, int *result); void cube_blas_d_gemm (cube_t *ctx, cube_blas_op_t transa, cube_blas_op_t transb, int m, int n, int k, const double *alpha, const double *A, int lda, const double *B, int ldb, const double *beta, double *C, int ldc); void cube_blas_d_axpy (cube_t *ctx, int n, const double *alpha, const double *x, int incx, double *y, int incy); void cube_blas_d_copy (cube_t *ctx, int n, const double *x, int incx, double *y, int incy); void cube_blas_d_scal (cube_t *ctx, int n, const double *alpha, double *x, int incx); #ifdef __cplusplus } #endif #endif
gicmo/cube
lib/cube_blas.h
C
mit
1,294
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_10-rc) on Sat Sep 06 21:53:02 CEST 2008 --> <TITLE> Uses of Interface be.belgium.eid.objects.SmartCardReadable </TITLE> <META NAME="date" CONTENT="2008-09-06"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Interface be.belgium.eid.objects.SmartCardReadable"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../be/belgium/eid/objects/SmartCardReadable.html" title="interface in be.belgium.eid.objects"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV&nbsp; &nbsp;NEXT</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?be/belgium/eid/objects/\class-useSmartCardReadable.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="SmartCardReadable.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <CENTER> <H2> <B>Uses of Interface<br>be.belgium.eid.objects.SmartCardReadable</B></H2> </CENTER> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> Packages that use <A HREF="../../../../../be/belgium/eid/objects/SmartCardReadable.html" title="interface in be.belgium.eid.objects">SmartCardReadable</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><A HREF="#be.belgium.eid.objects"><B>be.belgium.eid.objects</B></A></TD> <TD>&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><A HREF="#be.belgium.eid.security"><B>be.belgium.eid.security</B></A></TD> <TD>&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <P> <A NAME="be.belgium.eid.objects"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> Uses of <A HREF="../../../../../be/belgium/eid/objects/SmartCardReadable.html" title="interface in be.belgium.eid.objects">SmartCardReadable</A> in <A HREF="../../../../../be/belgium/eid/objects/package-summary.html">be.belgium.eid.objects</A></FONT></TH> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Classes in <A HREF="../../../../../be/belgium/eid/objects/package-summary.html">be.belgium.eid.objects</A> that implement <A HREF="../../../../../be/belgium/eid/objects/SmartCardReadable.html" title="interface in be.belgium.eid.objects">SmartCardReadable</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;class</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../be/belgium/eid/objects/IDAddress.html" title="class in be.belgium.eid.objects">IDAddress</A></B></CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The IDAddress class represents the address of the holder of the current beID card.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;class</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../be/belgium/eid/objects/IDData.html" title="class in be.belgium.eid.objects">IDData</A></B></CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The IDData class represents the ID data of a certain beID card.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;class</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../be/belgium/eid/objects/IDPhoto.html" title="class in be.belgium.eid.objects">IDPhoto</A></B></CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The IDPhoto class contains the photo of the holder of the current beID card.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;class</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../be/belgium/eid/objects/IDTokenInfo.html" title="class in be.belgium.eid.objects">IDTokenInfo</A></B></CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The IDTokenInfo class contains the token information of the smart card.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;class</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../be/belgium/eid/objects/IDVersion.html" title="class in be.belgium.eid.objects">IDVersion</A></B></CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The IDPIN class contains the version information of the smart card.</TD> </TR> </TABLE> &nbsp; <P> <A NAME="be.belgium.eid.security"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> Uses of <A HREF="../../../../../be/belgium/eid/objects/SmartCardReadable.html" title="interface in be.belgium.eid.objects">SmartCardReadable</A> in <A HREF="../../../../../be/belgium/eid/security/package-summary.html">be.belgium.eid.security</A></FONT></TH> </TR> </TABLE> &nbsp; <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left" COLSPAN="2">Classes in <A HREF="../../../../../be/belgium/eid/security/package-summary.html">be.belgium.eid.security</A> that implement <A HREF="../../../../../be/belgium/eid/objects/SmartCardReadable.html" title="interface in be.belgium.eid.objects">SmartCardReadable</A></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;class</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../be/belgium/eid/security/AuthenticationCertificate.html" title="class in be.belgium.eid.security">AuthenticationCertificate</A></B></CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This class contains the Authentication certificate which is a certificate for verifying data on a smart card.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;class</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../be/belgium/eid/security/CACertificate.html" title="class in be.belgium.eid.security">CACertificate</A></B></CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This class contains the Certificate Authority certificate which is a certificate for verifying data on a smart card.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;class</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../be/belgium/eid/security/Certificate.html" title="class in be.belgium.eid.security">Certificate</A></B></CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The certificate class is an abstract class for the different kinds of certificates stored on the smart card.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;class</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../be/belgium/eid/security/HardCodedRootCertificate.html" title="class in be.belgium.eid.security">HardCodedRootCertificate</A></B></CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The HardCodedRootCertificate class contains the hard coded root certificate for the BEID against which other certificates should be verified.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;class</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../be/belgium/eid/security/RNCertificate.html" title="class in be.belgium.eid.security">RNCertificate</A></B></CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The RN certificate is the (National Register) certificate for verifying identities.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;class</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../be/belgium/eid/security/RootCertificate.html" title="class in be.belgium.eid.security">RootCertificate</A></B></CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This class contains the Root certificate which is a certificate for verifying data on a smart card.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;class</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../be/belgium/eid/security/SignatureCertificate.html" title="class in be.belgium.eid.security">SignatureCertificate</A></B></CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This class contains the signature certificate which is a certificate for verifying data on a smart card.</TD> </TR> </TABLE> &nbsp; <P> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../be/belgium/eid/objects/SmartCardReadable.html" title="interface in be.belgium.eid.objects"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV&nbsp; &nbsp;NEXT</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?be/belgium/eid/objects/\class-useSmartCardReadable.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="SmartCardReadable.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> </BODY> </HTML>
KeejOow/eidlib
jEidlib/doc/be/belgium/eid/objects/class-use/SmartCardReadable.html
HTML
mit
14,318
package com.example.english.app; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; public class lwActivity extends AppCompatActivity { Button lwA; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_lw); lwA = (Button) findViewById(R.id.button22); lwA.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { startActivity(new Intent(lwActivity.this,readingActivity.class)); // Perform action on click } }); } }
achievelife/android
app/src/main/java/com/example/english/app/lwActivity.java
Java
mit
738
// // Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 30 2020 21:18:12). // // Copyright (C) 1997-2019 Steve Nygard. // #import <AppKit/NSTableCellView.h> @class MISSING_TYPE, NSImageView, NSTextField; @interface _TtC6IDEKit32IDEAccountPrefsPaneTableCellView : NSTableCellView { MISSING_TYPE *statusImageView; MISSING_TYPE *subtitleTextField; } - (void).cxx_destruct; - (id)initWithCoder:(id)arg1; - (id)initWithFrame:(struct CGRect)arg1; @property(nonatomic, retain) NSTextField *subtitleTextField; // @synthesize subtitleTextField; @property(nonatomic, retain) NSImageView *statusImageView; // @synthesize statusImageView; @end
XVimProject/XVim2
XVim2/XcodeHeader/IDEKit/_TtC6IDEKit32IDEAccountPrefsPaneTableCellView.h
C
mit
666
Although we're done with our workshop, there's still a LOT more to learn about containers! We're not going to go deep-dive here, but here are a few other areas to look at next! ## Container Orchestration Running containers in production is tough. You don't want to log into a machine and simply run a `docker run` or `docker-compose up`. Why not? Well, what happens if the containers die? How do you scale across several machines? Container orchestration solves this problem. Tools like Kubernetes, Swarm, Nomad, and ECS all help solve this problem, all in slightly different ways. The general idea is that you have "managers" who receive **expected state**. This state might be "I want to run two instances of my web app and expose port 80." The managers then look at all of the machines in the cluster and delegate work to "worker" nodes. The managers watch for changes (such as a container quitting) and then work to make **actual state** reflect the expected state. ## Cloud Native Computing Foundation Projects The CNCF is a vendor-neutral home for various open-source projects, including Kubernetes, Prometheus, Envoy, Linkerd, NATS, and more! You can view the [graduated and incubated projects here](https://www.cncf.io/projects/) and the entire [CNCF Landscape here](https://landscape.cncf.io/). There are a LOT of projects to help solve problems around monitoring, logging, security, image registries, messaging, and more! So, if you're new to the container landscape and cloud-native application development, welcome! Please connect to the community, ask questions, and keep learning! We're excited to have you!
rikenshah/rikenshah.github.io
_site/getting-started/docs/tutorial/what-next/index.md
Markdown
mit
1,631
//----------------------------------------------------------------------------- // Copyright (c) 2015 Andrew Mac // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to // deal in the Software without restriction, including without limitation the // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or // sell copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. //----------------------------------------------------------------------------- #ifndef _DECAL_COMPONENT_H_ #define _DECAL_COMPONENT_H_ #ifndef _ASSET_PTR_H_ #include "assets/assetPtr.h" #endif #ifndef _VERTEXLAYOUTS_H_ #include "graphics/core.h" #endif #ifndef _TEXTURE_MANAGER_H_ #include "graphics/TextureManager.h" #endif #ifndef _SHADERS_H_ #include "graphics/shaders.h" #endif #ifndef _MESH_ASSET_H_ #include "mesh/meshAsset.h" #endif #ifndef _RENDERING_H_ #include "rendering/rendering.h" #endif #ifndef _BASE_COMPONENT_H_ #include "baseComponent.h" #endif #ifndef NANOVG_H #include <../common/nanovg/nanovg.h> #endif namespace Scene { class DLL_PUBLIC DecalComponent : public BaseComponent { private: typedef BaseComponent Parent; Vector<Rendering::UniformData> mUniforms; Vector<Rendering::TextureData> mTextures; Rendering::RenderData* mRenderData; AssetPtr<Graphics::ShaderAsset> mShaderAsset; StringTableEntry mTexturePath; bgfx::TextureHandle mTexture; public: DecalComponent(); ~DecalComponent(); virtual void onAddToScene(); virtual void onRemoveFromScene(); void refresh(); void loadTexture(StringTableEntry path); static void initPersistFields(); static bool setTexture(void* obj, const char* data) { static_cast<DecalComponent*>(obj)->loadTexture(StringTable->insert(data)); return false; } DECLARE_CONOBJECT(DecalComponent); }; } #endif // _DECAL_COMPONENT_H_
JeffProgrammer/Torque6
src/scene/components/decalComponent.h
C
mit
2,838
<?php if(!defined('ABSPATH')) { exit; } function easyazon_get_converted_currency($value, $locale) { $converted = $value; $locale = easyazon_get_locale($locale); switch($locale) { case 'BR': case 'CA': case 'CN': case 'DE': case 'ES': case 'FR': case 'IN': case 'IT': case 'UK': case 'US': $converted = ($value * 100); break; } return $converted; } function easyazon_get_countries() { static $countries = null; if(is_null($countries)) { $countries = array ( 'AF' => 'Afghanistan', 'AX' => 'Åland Islands', 'AL' => 'Albania', 'DZ' => 'Algeria', 'AS' => 'American Samoa', 'AD' => 'Andorra', 'AO' => 'Angola', 'AI' => 'Anguilla', 'AQ' => 'Antarctica', 'AG' => 'Antigua and Barbuda', 'AR' => 'Argentina', 'AM' => 'Armenia', 'AW' => 'Aruba', 'AU' => 'Australia', 'AT' => 'Austria', 'AZ' => 'Azerbaijan', 'BS' => 'Bahamas', 'BH' => 'Bahrain', 'BD' => 'Bangladesh', 'BB' => 'Barbados', 'BY' => 'Belarus', 'BE' => 'Belgium', 'BZ' => 'Belize', 'BJ' => 'Benin', 'BM' => 'Bermuda', 'BT' => 'Bhutan', 'BO' => 'Bolivia, Plurinational State of', 'BA' => 'Bosnia and Herzegovina', 'BW' => 'Botswana', 'BV' => 'Bouvet Island', 'BR' => 'Brazil', 'IO' => 'British Indian Ocean Territory', 'BN' => 'Brunei Darussalam', 'BG' => 'Bulgaria', 'BF' => 'Burkina Faso', 'BI' => 'Burundi', 'KH' => 'Cambodia', 'CM' => 'Cameroon', 'CA' => 'Canada', 'CV' => 'Cape Verde', 'KY' => 'Cayman Islands', 'CF' => 'Central African Republic', 'TD' => 'Chad', 'CL' => 'Chile', 'CN' => 'China', 'CX' => 'Christmas Island', 'CC' => 'Cocos (Keeling) Islands', 'CO' => 'Colombia', 'KM' => 'Comoros', 'CG' => 'Congo', 'CD' => 'Congo, the Democratic Republic of the', 'CK' => 'Cook Islands', 'CR' => 'Costa Rica', 'CI' => "Côte d'Ivoire", 'HR' => 'Croatia', 'CU' => 'Cuba', 'CY' => 'Cyprus', 'CZ' => 'Czech Republic', 'DK' => 'Denmark', 'DJ' => 'Djibouti', 'DM' => 'Dominica', 'DO' => 'Dominican Republic', 'EC' => 'Ecuador', 'EG' => 'Egypt', 'SV' => 'El Salvador', 'GQ' => 'Equatorial Guinea', 'ER' => 'Eritrea', 'EE' => 'Estonia', 'ET' => 'Ethiopia', 'FK' => 'Falkland Islands (Malvinas)', 'FO' => 'Faroe Islands', 'FJ' => 'Fiji', 'FI' => 'Finland', 'FR' => 'France', 'GF' => 'French Guiana', 'PF' => 'French Polynesia', 'TF' => 'French Southern Territories', 'GA' => 'Gabon', 'GM' => 'Gambia', 'GE' => 'Georgia', 'DE' => 'Germany', 'GH' => 'Ghana', 'GI' => 'Gibraltar', 'GR' => 'Greece', 'GL' => 'Greenland', 'GD' => 'Grenada', 'GP' => 'Guadeloupe', 'GU' => 'Guam', 'GT' => 'Guatemala', 'GG' => 'Guernsey', 'GN' => 'Guinea', 'GW' => 'Guinea-Bissau', 'GY' => 'Guyana', 'HT' => 'Haiti', 'HM' => 'Heard Island and McDonald Islands', 'VA' => 'Holy See (Vatican City State)', 'HN' => 'Honduras', 'HK' => 'Hong Kong', 'HU' => 'Hungary', 'IS' => 'Iceland', 'IN' => 'India', 'ID' => 'Indonesia', 'IR' => 'Iran, Islamic Republic of', 'IQ' => 'Iraq', 'IE' => 'Ireland', 'IM' => 'Isle of Man', 'IL' => 'Israel', 'IT' => 'Italy', 'JM' => 'Jamaica', 'JP' => 'Japan', 'JE' => 'Jersey', 'JO' => 'Jordan', 'KZ' => 'Kazakhstan', 'KE' => 'Kenya', 'KI' => 'Kiribati', 'KP' => "Korea, Democratic People's Republic of", 'KR' => 'Korea, Republic of', 'KW' => 'Kuwait', 'KG' => 'Kyrgyzstan', 'LA' => "Lao People's Democratic Republic", 'LV' => 'Latvia', 'LB' => 'Lebanon', 'LS' => 'Lesotho', 'LR' => 'Liberia', 'LY' => 'Libyan Arab Jamahiriya', 'LI' => 'Liechtenstein', 'LT' => 'Lithuania', 'LU' => 'Luxembourg', 'MO' => 'Macao', 'MK' => 'Macedonia, the former Yugoslav Republic of', 'MG' => 'Madagascar', 'MW' => 'Malawi', 'MY' => 'Malaysia', 'MV' => 'Maldives', 'ML' => 'Mali', 'MT' => 'Malta', 'MH' => 'Marshall Islands', 'MQ' => 'Martinique', 'MR' => 'Mauritania', 'MU' => 'Mauritius', 'YT' => 'Mayotte', 'MX' => 'Mexico', 'FM' => 'Micronesia, Federated States of', 'MD' => 'Moldova, Republic of', 'MC' => 'Monaco', 'MN' => 'Mongolia', 'ME' => 'Montenegro', 'MS' => 'Montserrat', 'MA' => 'Morocco', 'MZ' => 'Mozambique', 'MM' => 'Myanmar', 'NA' => 'Namibia', 'NR' => 'Nauru', 'NP' => 'Nepal', 'NL' => 'Netherlands', 'AN' => 'Netherlands Antilles', 'NC' => 'New Caledonia', 'NZ' => 'New Zealand', 'NI' => 'Nicaragua', 'NE' => 'Niger', 'NG' => 'Nigeria', 'NU' => 'Niue', 'NF' => 'Norfolk Island', 'MP' => 'Northern Mariana Islands', 'NO' => 'Norway', 'OM' => 'Oman', 'PK' => 'Pakistan', 'PW' => 'Palau', 'PS' => 'Palestinian Territory, Occupied', 'PA' => 'Panama', 'PG' => 'Papua New Guinea', 'PY' => 'Paraguay', 'PE' => 'Peru', 'PH' => 'Philippines', 'PN' => 'Pitcairn', 'PL' => 'Poland', 'PT' => 'Portugal', 'PR' => 'Puerto Rico', 'QA' => 'Qatar', 'RE' => 'Réunion', 'RO' => 'Romania', 'RU' => 'Russian Federation', 'RW' => 'Rwanda', 'BL' => 'Saint Barthélemy', 'SH' => 'Saint Helena', 'KN' => 'Saint Kitts and Nevis', 'LC' => 'Saint Lucia', 'MF' => 'Saint Martin (French part)', 'PM' => 'Saint Pierre and Miquelon', 'VC' => 'Saint Vincent and the Grenadines', 'WS' => 'Samoa', 'SM' => 'San Marino', 'ST' => 'Sao Tome and Principe', 'SA' => 'Saudi Arabia', 'SN' => 'Senegal', 'RS' => 'Serbia', 'SC' => 'Seychelles', 'SL' => 'Sierra Leone', 'SG' => 'Singapore', 'SK' => 'Slovakia', 'SI' => 'Slovenia', 'SB' => 'Solomon Islands', 'SO' => 'Somalia', 'ZA' => 'South Africa', 'GS' => 'South Georgia and the South Sandwich Islands', 'ES' => 'Spain', 'LK' => 'Sri Lanka', 'SD' => 'Sudan', 'SR' => 'Suriname', 'SJ' => 'Svalbard and Jan Mayen', 'SZ' => 'Swaziland', 'SE' => 'Sweden', 'CH' => 'Switzerland', 'SY' => 'Syrian Arab Republic', 'TW' => 'Taiwan, Province of China', 'TJ' => 'Tajikistan', 'TZ' => 'Tanzania, United Republic of', 'TH' => 'Thailand', 'TL' => 'Timor-Leste', 'TG' => 'Togo', 'TK' => 'Tokelau', 'TO' => 'Tonga', 'TT' => 'Trinidad and Tobago', 'TN' => 'Tunisia', 'TR' => 'Turkey', 'TM' => 'Turkmenistan', 'TC' => 'Turks and Caicos Islands', 'TV' => 'Tuvalu', 'UG' => 'Uganda', 'UA' => 'Ukraine', 'AE' => 'United Arab Emirates', 'GB' => 'United Kingdom', 'US' => 'United States', 'UM' => 'United States Minor Outlying Islands', 'UY' => 'Uruguay', 'UZ' => 'Uzbekistan', 'VU' => 'Vanuatu', 'VE' => 'Venezuela, Bolivarian Republic of', 'VN' => 'Viet Nam', 'VG' => 'Virgin Islands, British', 'VI' => 'Virgin Islands, U.S.', 'WF' => 'Wallis and Futuna', 'EH' => 'Western Sahara', 'YE' => 'Yemen', 'ZM' => 'Zambia', 'ZW' => 'Zimbabwe' ); } return $countries; } function easyazon_get_locale_search_indices() { static $indices = null; if(is_null($indices)) { $indices = array(); foreach(glob(dirname(__FILE__) . '/indices/*.json') as $file) { $parts = explode('/', $file); $locale = str_replace('.json', '', end($parts)); $indices[$locale] = json_decode(file_get_contents($file), true); } foreach($indices as $locale => $indices_locale) { foreach($indices_locale as $key => $index) { $indices[$locale][$key] = array_merge($index, array( 'name' => easyazon_split_camel_case($index['name']), )); } } } return $indices; } function easyazon_get_search_url($keywords, $locale, $tag) { $query_args = array_filter(array( 'field-keywords' => rawurlencode($keywords), 'tag' => $tag, )); return add_query_arg($query_args, sprintf('http://www.amazon.%s/s/', easyazon_get_locale_tld($locale))); } function easyazon_get_sort_values() { static $sorts = null; if(is_null($sorts)) { $sorts = array( array('key' => '-age-min', 'name' => "Age: high to low"), array('key' => 'albumrank', 'name' => "Album: A to Z"), array('key' => '-albumrank', 'name' => "Album: Z to A"), array('key' => 'amzrank', 'name' => "Alphabetical: A to Z"), array('key' => 'artistalbumrank', 'name' => "Artist: A to Z"), array('key' => '-artistalbumrank', 'name' => "Artist: Z to A"), array('key' => 'artistrank', 'name' => "Artist name: A to Z"), array('key' => 'availability', 'name' => "Most to least available"), array('key' => '-date', 'name' => "Publication date: old to new"), array('key' => 'daterank', 'name' => "Publication date: new to old"), array('key' => '-daterank', 'name' => "Publication date: old to new"), array('key' => 'date-desc-rank', 'name' => "Publication date: new to old"), array('key' => '-edition-sales-velocity', 'name' => "Quickest to slowest selling products"), array('key' => 'inverseprice', 'name' => "Price: high to low"), array('key' => 'inverse-price', 'name' => "Price: high to low"), array('key' => 'inverse-pricerank', 'name' => "Price: high to low"), array('key' => 'launchdate', 'name' => "Launch date: newer to older"), array('key' => 'launch-date', 'name' => "Launch date: newer to older"), array('key' => '-launch-date', 'name' => "Launch date: older to newer"), array('key' => 'mfg-age-min', 'name' => "Age: low to high"), array('key' => '-mfg-age-min', 'name' => "Age: high to low"), array('key' => 'orig-rel-date', 'name' => "Original release date: earliest to latest"), array('key' => '-orig-rel-date', 'name' => "Original release date: latest to earliest"), array('key' => 'paidsalesrank', 'name' => "Bestseller rank: by project sales"), array('key' => 'pct-off', 'name' => "Discount: high to low"), array('key' => '-pct-off', 'name' => "Discount: low to high"), array('key' => 'pmrank', 'name' => "Featured items"), array('key' => 'popularityrank', 'name' => "Items ranked by popularity"), array('key' => 'popularity-rank', 'name' => "Items ranked by popularity"), array('key' => 'price', 'name' => "Price: low to high"), array('key' => '-price', 'name' => "Price: high to low"), array('key' => 'price-asc-rank', 'name' => "Price: low to high"), array('key' => 'price-desc-rank', 'name' => "Price: high to low"), array('key' => 'price-new-bin', 'name' => "Price: low to high"), array('key' => '-price-new-bin', 'name' => "Price: high to low"), array('key' => 'pricerank', 'name' => "Price: low to high"), array('key' => '-pricerank', 'name' => "Price: high to low"), array('key' => 'psrank', 'name' => "Bestseller rank: by projected sales"), array('key' => 'pubdate', 'name' => "Publication date: newest to oldest"), array('key' => '-pubdate', 'name' => "Publication date: oldest to most recent"), array('key' => 'publicationdate', 'name' => "Publication date: newest to oldest"), array('key' => 'publication_date', 'name' => "Publication date: newest to oldest"), array('key' => '-publicationdate', 'name' => "Publication date: oldest to most recent"), array('key' => '-publication_date', 'name' => "Publication date: oldest to most recent"), array('key' => 'releasedate', 'name' => "Release date: older to newer"), array('key' => 'release-date', 'name' => "Release date: older to newer"), array('key' => '-releasedate', 'name' => "Release date: newer to older"), array('key' => '-release-date', 'name' => "Release date: newer to older"), array('key' => 'relevance', 'name' => "Relevance"), array('key' => 'relevance-fs-rank', 'name' => ""), array('key' => 'relevancerank', 'name' => "Relevance"), array('key' => 'reviewrank', 'name' => "Highest to lowest ratings in customer reviews"), array('key' => 'review-rank', 'name' => "Highest to lowest ratings in customer reviews"), array('key' => 'reviewrank_authority', 'name' => "Review rank: high to low"), array('key' => '-reviewrank_authority', 'name' => "Review rank: low to high"), array('key' => 'runtime', 'name' => "Track length: high to low"), array('key' => '-runtime', 'name' => "Track length: low to high"), array('key' => 'sale-flag', 'name' => "On sale"), array('key' => 'salesrank', 'name' => "Bestselling"), array('key' => 'songtitlerank', 'name' => "Most popular"), array('key' => 'subslot-salesrank', 'name' => "Bestselling"), array('key' => 'titlerank', 'name' => "Alphabetical: A to Z"), array('key' => '-titlerank', 'name' => "Alphabetical: Z to A"), array('key' => '-unit-sales', 'name' => ""), array('key' => 'uploaddaterank', 'name' => "Date added"), array('key' => '-video-release-date', 'name' => "Release date: newer to older"), array('key' => 'xsrelevancerank', 'name' => ""), ); } return $sorts; }
TropicalRobot/finding-beyond
public/app/plugins/easyazon-pro-4.0.17/lib/amazon.php
PHP
mit
13,519
using System; namespace Quasar.Communication.Packets.Outgoing.Rooms.Camera { public class BuyPhoto : ServerPacket { public BuyPhoto() : base(ServerPacketHeader.BuyPhoto) { } } }
slaapkopamy/PlusEmu-making-ready-for-linux-server
Communication/Packets/Outgoing/Rooms/Camera/BuyPhoto.cs
C#
mit
229
# nwjs-security Securing nwjs desktop app
cloudgua/nwjs-security
README.md
Markdown
mit
42
<?php /** * Controller for the Media Menu * Extends the IndividualController class and overrides the getEditMenu() function * Menu options are changed to apply to a media object instead of an individual * * phpGedView: Genealogy Viewer * Copyright (C) 2002 to 2009 PGV Development Team. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * * @package PhpGedView * @subpackage Charts * @version $Id: media_ctrl.php 6500 2009-12-01 00:06:01Z fisharebest $ */ if (!defined('PGV_PHPGEDVIEW')) { header('HTTP/1.0 403 Forbidden'); exit; } define('PGV_MEDIA_CTRL_PHP', ''); require_once PGV_ROOT.'includes/controllers/individual_ctrl.php'; require_once PGV_ROOT.'includes/classes/class_media.php'; require_once PGV_ROOT.'includes/functions/functions_import.php'; class MediaControllerRoot extends IndividualController{ var $mid; var $mediaobject; var $show_changes=true; function init() { global $MEDIA_DIRECTORY, $USE_MEDIA_FIREWALL, $GEDCOM, $pgv_changes; $filename = decrypt(safe_GET('filename')); $this->mid = safe_GET_xref('mid'); if ($USE_MEDIA_FIREWALL && empty($filename) && empty($this->mid)) { // this section used by mediafirewall.php to determine what media file was requested if (isset($_SERVER['REQUEST_URI'])) { // NOTE: format of this server variable: // Apache: /phpGedView/media/a.jpg // IIS: /phpGedView/mediafirewall.php?404;http://server/phpGedView/media/a.jpg $requestedfile = $_SERVER['REQUEST_URI']; // urldecode the request $requestedfile = rawurldecode($requestedfile); // make sure the requested file is in the media directory if (strpos($requestedfile, $MEDIA_DIRECTORY) !== false) { // strip off the pgv directory and media directory from the requested url so just the image information is left $filename = substr($requestedfile, strpos($requestedfile, $MEDIA_DIRECTORY) + strlen($MEDIA_DIRECTORY) - 1); // if user requested a thumbnail, lookup permissions based on the original image $filename = str_replace('/thumbs', '', $filename); } } } //Checks to see if the File Name ($filename) exists if (!empty($filename)){ //If the File Name ($filename) is set, then it will call the method to get the Media ID ($this->mid) from the File Name ($filename) $this->mid = get_media_id_from_file($filename); if (!$this->mid){ //This will set the Media ID to be false if the File given doesn't match to anything in the database $this->mid = false; // create a very basic gedcom record for this file so that the functions of the media object will work // this is used by the media firewall when requesting an object that exists in the media firewall directory but not in the gedcom $this->mediaobject = new Media("0 @"."0"."@ OBJE\n1 FILE ".$filename); } } //checks to see if the Media ID ($this->mid) is set. If the Media ID isn't set then there isn't any information avaliable for that picture the picture doesn't exist. if ($this->mid){ //This creates a Media Object from the getInstance method of the Media Class. It takes the Media ID ($this->mid) and creates the object. $this->mediaobject = Media::getInstance($this->mid); //This sets the controller ID to be the Media ID $this->pid = $this->mid; } if (is_null($this->mediaobject)) return false; $this->mediaobject->ged_id=PGV_GED_ID; // This record is from a file //-- perform the desired action switch($this->action) { case "addfav": $this->addFavorite(); break; case "accept": $this->acceptChanges(); break; case "undo": $this->mediaobject->undoChange(); break; } if ($this->mediaobject->canDisplayDetails()) { $this->canedit = PGV_USER_CAN_EDIT; } } /** * Add a new favorite for the action user */ function addFavorite() { global $GEDCOM; if (!PGV_USER_ID) { return; } if (!empty($_REQUEST["gid"])) { $gid = strtoupper($_REQUEST["gid"]); $mediarec = find_media_record($gid, get_id_from_gedcom($GEDCOM)); if ($mediarec) { $favorite = array(); $favorite["username"] = PGV_USER_NAME; $favorite["gid"] = $gid; $favorite["type"] = "OBJE"; $favorite["file"] = $GEDCOM; $favorite["url"] = ""; $favorite["note"] = ""; $favorite["title"] = ""; addFavorite($favorite); } } } /** * Accept any edit changes into the database * Also update the mediarec we will use to generate the page */ function acceptChanges() { global $GEDCOM; if (!PGV_USER_CAN_ACCEPT) return; if (accept_changes($this->pid."_".$GEDCOM)) { $this->show_changes=false; $this->accept_success=true; $mediarec = find_media_record($this->pid, get_id_from_gedcom($GEDCOM)); //-- check if we just deleted the record and redirect to index if (empty($mediarec)) { header("Location: index.php?ctype=gedcom"); exit; } //$this->mediaobject = Media::getInstance($this->pid); $this->mediaobject = new Media($mediarec); } //This sets the controller ID to be the Media ID if (is_null($this->mediaobject)) $this->mediaobject = new Media("0 @".$this->pid."@ OBJE"); } /** * return the title of this page * @return string the title of the page to go in the <title> tags */ function getPageTitle() { global $pgv_lang, $GEDCOM; if (!is_null($this->mediaobject)) { $name = $this->mediaobject->getFullName(); return $name." - ".$this->mediaobject->getXref(); } else return $pgv_lang["unable_to_find_record"]; } function canDisplayDetails() { return $this->mediaobject->canDisplayDetails(); } /** * get the edit menu * @return Menu */ function &getEditMenu() { global $TEXT_DIRECTION, $PGV_IMAGE_DIR, $PGV_IMAGES, $GEDCOM, $TOTAL_NAMES; global $NAME_LINENUM, $SEX_LINENUM, $pgv_lang, $pgv_changes, $USE_QUICK_UPDATE; global $SHOW_GEDCOM_RECORD; if ($TEXT_DIRECTION=="rtl") $ff="_rtl"; else $ff=""; $links = get_media_relations($this->pid); $linktoid = "new"; foreach ($links as $linktoid => $type) { break; // we're only interested in the key of the first list entry } //-- main edit menu $menu = new Menu($pgv_lang["edit"]); $click_link = "window.open('addmedia.php?action=editmedia&pid={$this->pid}&linktoid={$linktoid}', '_blank', 'top=50,left=50,width=600,height=500,resizable=1,scrollbars=1')"; $menu->addOnclick($click_link); if (!empty($PGV_IMAGES["edit_indi"]["small"])) $menu->addIcon($PGV_IMAGE_DIR."/".$PGV_IMAGES["edit_indi"]["small"]); $menu->addClass("submenuitem$ff", "submenuitem_hover$ff", "submenu$ff"); if (PGV_USER_CAN_EDIT) { //- plain edit option $submenu = new Menu($pgv_lang["edit"]); $click_link = "window.open('addmedia.php?action=editmedia&pid={$this->pid}&linktoid={$linktoid}', '_blank', 'top=50,left=50,width=600,height=500,resizable=1,scrollbars=1')"; $submenu->addOnclick($click_link); $submenu->addClass("submenuitem$ff", "submenuitem_hover$ff"); $menu->addSubmenu($submenu); if ($SHOW_GEDCOM_RECORD || PGV_USER_IS_ADMIN) { $submenu = new Menu($pgv_lang["edit_raw"]); $submenu->addOnclick("return edit_raw('".$this->pid."');"); $submenu->addClass("submenuitem$ff", "submenuitem_hover$ff"); $menu->addSubmenu($submenu); } //- end plain edit option if (PGV_USER_GEDCOM_ADMIN) { //- remove object option $submenu = new Menu($pgv_lang["remove_object"]); $submenu->addLink(encode_url("media.php?action=removeobject&xref=".$this->pid)); $submenu->addOnclick("return confirm('".$pgv_lang["confirm_remove_object"]."')"); $submenu->addClass("submenuitem$ff", "submenuitem_hover$ff"); $menu->addSubmenu($submenu); } // main link displayed on page if (PGV_USER_GEDCOM_ADMIN && file_exists(PGV_ROOT.'modules/GEDFact_assistant/_MEDIA/media_1_ctrl.php')) { $submenu = new Menu($pgv_lang["add_or_remove_links"]); } else { $submenu = new Menu($pgv_lang["set_link"]); } // GEDFact assistant Add Media Links ======================= if (PGV_USER_GEDCOM_ADMIN && file_exists(PGV_ROOT.'modules/GEDFact_assistant/_MEDIA/media_1_ctrl.php')) { $submenu->addOnclick("return ilinkitem('".$this->pid."','manage');"); $submenu->addClass("submenuitem$ff", "submenuitem_hover$ff", "submenu$ff"); // Do not print ssubmunu } else { $submenu->addOnclick("return ilinkitem('".$this->pid."','person');"); $submenu->addClass("submenuitem$ff", "submenuitem_hover$ff", "submenu$ff"); $ssubmenu = new Menu($pgv_lang["to_person"]); $ssubmenu->addOnclick("return ilinkitem('".$this->pid."','person');"); $ssubmenu->addClass("submenuitem$ff", "submenuitem_hover$ff"); $submenu->addSubMenu($ssubmenu); $ssubmenu = new Menu($pgv_lang["to_family"]); $ssubmenu->addOnclick("return ilinkitem('".$this->pid."','family');"); $ssubmenu->addClass("submenuitem$ff", "submenuitem_hover$ff"); $submenu->addSubMenu($ssubmenu); $ssubmenu = new Menu($pgv_lang["to_source"]); $ssubmenu->addOnclick("return ilinkitem('".$this->pid."','source');"); $ssubmenu->addClass("submenuitem$ff", "submenuitem_hover$ff"); $submenu->addSubMenu($ssubmenu); } $menu->addSubmenu($submenu); } if (isset($pgv_changes[$this->pid."_".$GEDCOM])) { $menu->addSeparator(); if (!$this->show_changes) { $label = $pgv_lang["show_changes"]; $link = "mediaviewer.php?mid={$this->pid}&show_changes=yes"; } else { $label = $pgv_lang["hide_changes"]; $link = "mediaviewer.php?mid={$this->pid}&show_changes=no"; } $submenu = new Menu($label, encode_url($link)); $submenu->addClass("submenuitem$ff", "submenuitem_hover$ff"); $menu->addSubmenu($submenu); if (PGV_USER_CAN_ACCEPT) { $submenu = new Menu($pgv_lang["undo_all"], encode_url("mediaviewer.php?mid={$this->pid}&action=undo")); $submenu->addClass("submenuitem$ff", "submenuitem_hover$ff"); $menu->addSubmenu($submenu); $submenu = new Menu($pgv_lang["accept_all"], encode_url("mediaviewer.php?mid={$this->pid}&action=accept")); $submenu->addClass("submenuitem$ff", "submenuitem_hover$ff"); $menu->addSubmenu($submenu); } } return $menu; } /** * check if we can show the other menu * @return boolean */ function canShowOtherMenu() { global $SHOW_GEDCOM_RECORD, $ENABLE_CLIPPINGS_CART; if ($this->mediaobject->canDisplayDetails() && ($SHOW_GEDCOM_RECORD || $ENABLE_CLIPPINGS_CART>=PGV_USER_ACCESS_LEVEL)) return true; return false; } /** * get the "other" menu * @return Menu */ function &getOtherMenu() { global $TEXT_DIRECTION, $PGV_IMAGE_DIR, $PGV_IMAGES, $GEDCOM, $THEME_DIR; global $SHOW_GEDCOM_RECORD, $ENABLE_CLIPPINGS_CART, $pgv_lang; if ($TEXT_DIRECTION=="rtl") $ff="_rtl"; else $ff=""; //-- main other menu item $menu = new Menu($pgv_lang["other"]); if ($SHOW_GEDCOM_RECORD) { if (!empty($PGV_IMAGES["gedcom"]["small"])) $menu->addIcon($PGV_IMAGE_DIR."/".$PGV_IMAGES["gedcom"]["small"]); if ($this->show_changes && PGV_USER_CAN_EDIT) $menu->addOnclick("return show_gedcom_record('new');"); else $menu->addOnclick("return show_gedcom_record('');"); } else { if (!empty($PGV_IMAGES["clippings"]["small"])) $menu->addIcon($PGV_IMAGE_DIR."/".$PGV_IMAGES["clippings"]["small"]); $menu->addLink(encode_url("clippings.php?action=add&id={$this->pid}&type=obje")); } $menu->addClass("submenuitem$ff", "submenuitem_hover$ff", "submenu$ff"); if ($this->canShowGedcomRecord()) { $submenu = new Menu($pgv_lang["view_gedcom"]); if (!empty($PGV_IMAGES["gedcom"]["small"])) $submenu->addIcon($PGV_IMAGE_DIR."/".$PGV_IMAGES["gedcom"]["small"]); if ($this->show_changes && PGV_USER_CAN_EDIT) $submenu->addOnclick("return show_gedcom_record('new');"); else $submenu->addOnclick("return show_gedcom_record();"); $submenu->addClass("submenuitem$ff", "submenuitem_hover$ff"); $menu->addSubmenu($submenu); } if ($this->mediaobject->canDisplayDetails() && $ENABLE_CLIPPINGS_CART>=PGV_USER_ACCESS_LEVEL) { $submenu = new Menu($pgv_lang["add_to_cart"], encode_url("clippings.php?action=add&id={$this->pid}&type=obje")); if (!empty($PGV_IMAGES["clippings"]["small"])) $submenu->addIcon($PGV_IMAGE_DIR."/".$PGV_IMAGES["clippings"]["small"]); $submenu->addClass("submenuitem$ff", "submenuitem_hover$ff"); $menu->addSubmenu($submenu); } if ($this->mediaobject->canDisplayDetails() && PGV_USER_ID) { $submenu = new Menu($pgv_lang["add_to_my_favorites"], encode_url("mediaviewer.php?action=addfav&mid={$this->pid}&gid={$this->pid}")); if (!empty($PGV_IMAGES["gedcom"]["small"])) $submenu->addIcon($PGV_IMAGE_DIR."/".$PGV_IMAGES["gedcom"]["small"]); $submenu->addClass("submenuitem$ff", "submenuitem_hover$ff"); $menu->addSubmenu($submenu); } return $menu; } /** * check if we can show the gedcom record * @return boolean */ function canShowGedcomRecord() { global $SHOW_GEDCOM_RECORD; if ($SHOW_GEDCOM_RECORD && $this->mediaobject->canDisplayDetails()) return true; } /** * return a list of facts * @return array */ function getFacts($includeFileName=true) { global $pgv_changes, $GEDCOM, $pgv_lang; $ignore = array("TITL","FILE"); if ($this->show_changes) { $ignore = array(); } elseif (PGV_USER_GEDCOM_ADMIN) { $ignore = array("TITL"); } $facts = $this->mediaobject->getFacts($ignore); sort_facts($facts); // if ($includeFileName) $facts[] = new Event("1 FILE ".$this->mediaobject->getFilename()); $mediaType = $this->mediaobject->getMediatype(); if (isset($pgv_lang["TYPE__".$mediaType])) $facts[] = new Event("1 TYPE ".$pgv_lang["TYPE__".$mediaType]); else $facts[] = new Event("1 TYPE ".$pgv_lang["TYPE__other"]); if (isset($pgv_changes[$this->pid."_".$GEDCOM]) && ($this->show_changes)) { $newrec = find_updated_record($this->pid, PGV_GED_ID); $newmedia = new Media($newrec); $newfacts = $newmedia->getFacts($ignore); if ($includeFileName) $newfacts[] = new Event("1 TYPE ".$pgv_lang["TYPE__".$mediaType]); $newfacts[] = new Event("1 FORM ".$newmedia->getFiletype()); $mediaType = $newmedia->getMediatype(); if (isset($pgv_lang["TYPE__".$mediaType])) $newfacts[] = new Event("1 TYPE ".$mediaType); else $newfacts[] = new Event("1 TYPE ".$pgv_lang["TYPE__other"]); //-- loop through new facts and add them to the list if they are any changes //-- compare new and old facts of the Personal Fact and Details tab 1 for($i=0; $i<count($facts); $i++) { $found=false; foreach($newfacts as $indexval => $newfact) { if (trim($newfact->gedcomRecord)==trim($facts[$i]->gedcomRecord)) { $found=true; break; } } if (!$found) { $facts[$i]->gedcomRecord.="\nPGV_OLD\n"; } } foreach($newfacts as $indexval => $newfact) { $found=false; foreach($facts as $indexval => $fact) { if (trim($fact->gedcomRecord)==trim($newfact->gedcomRecord)) { $found=true; break; } } if (!$found) { $newfact->gedcomRecord.="\nPGV_NEW\n"; $facts[]=$newfact; } } } if ($this->mediaobject->fileExists()) { // get height and width of image, when available if ($this->mediaobject->getWidth()) { $facts[] = new Event("1 EVEN " . '<span dir="ltr">' . $this->mediaobject->getWidth()." x ".$this->mediaobject->getHeight() . '</span>' . "\n2 TYPE image_size"); } //Prints the file size //Rounds the size of the image to 2 decimal places $facts[] = new Event("1 EVEN " . '<span dir="ltr">' . round($this->mediaobject->getFilesizeraw()/1024, 2)." kb" . '</span>' . "\n2 TYPE file_size"); } sort_facts($facts); return $facts; } /** * get the relative file path of the image on the server * @return string */ function getLocalFilename() { global $pgv_lang; if ($this->mediaobject) { return $this->mediaobject->getLocalFilename(); } else { return false; } } /** * get the file name on the server * @return string */ function getServerFilename() { return $this->mediaobject->getServerFilename(); } } // -- end of class //-- load a user extended class if one exists if (file_exists(PGV_ROOT.'includes/controllers/media_ctrl_user.php')) { require_once PGV_ROOT.'includes/controllers/media_ctrl_user.php'; } else { class MediaController extends MediaControllerRoot { } } ?>
fweber1/Annies-Ancestors
PhpGedView/includes/controllers/media_ctrl.php
PHP
mit
17,411
// Copyright 2019 The Gitea Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package repofiles import ( "testing" "code.gitea.io/gitea/models" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/test" "github.com/stretchr/testify/assert" ) func TestGetTreeBySHA(t *testing.T) { models.PrepareTestEnv(t) ctx := test.MockContext(t, "user2/repo1") test.LoadRepo(t, ctx, 1) test.LoadRepoCommit(t, ctx) test.LoadUser(t, ctx, 2) test.LoadGitRepo(t, ctx) sha := ctx.Repo.Repository.DefaultBranch page := 1 perPage := 10 ctx.SetParams(":id", "1") ctx.SetParams(":sha", sha) tree, err := GetTreeBySHA(ctx.Repo.Repository, ctx.Params(":sha"), page, perPage, true) assert.Nil(t, err) expectedTree := &api.GitTreeResponse{ SHA: "65f1bf27bc3bf70f64657658635e66094edbcb4d", URL: "https://try.gitea.io/api/v1/repos/user2/repo1/git/trees/65f1bf27bc3bf70f64657658635e66094edbcb4d", Entries: []api.GitEntry{ { Path: "README.md", Mode: "100644", Type: "blob", Size: 30, SHA: "4b4851ad51df6a7d9f25c979345979eaeb5b349f", URL: "https://try.gitea.io/api/v1/repos/user2/repo1/git/blobs/4b4851ad51df6a7d9f25c979345979eaeb5b349f", }, }, Truncated: false, Page: 1, TotalCount: 1, } assert.EqualValues(t, expectedTree, tree) }
kubatyszko/gitea
modules/repofiles/tree_test.go
GO
mit
1,384
#!/usr/bin/env node /** * @file stream.js * * Custom object to inherit from EventEmitter, with the help of `util' * */ var events = require('events'); function Stream() { events.EventEmitter.call(this); } util.inherits(Stream, events,EventEmitter);
uwydoc/nodejs-practices
stream.js
JavaScript
mit
259
/* * * * */ #ifndef RENDER_H #define RENDER_H void render_init (); void render_pixel_delay (uint8_t pixel_delay); void render_phrase_delay (uint8_t phrase_delay); void render_stable_delay (uint8_t delay); #endif
cppcoder123/led-server
obsoleted/old/arduino-obsolete/c/arduino/render.h
C
mit
221
--- layout: page title: Say Hello permalink: /contact/ --- <div class="py2"> <form action="https://getsimpleform.com/messages?form_api_token=395acb3b6186e729beba701fa2b0386a" method="POST" class="form-stacked form-light"> <input type="text" name="email" class="input mobile-block" placeholder="Email Address"> <textarea type="text" name="content" class="input mobile-block" rows="5" placeholder="What would you like to say?"></textarea> <input type="submit" class="button button-blue button-big mobile-block" value="Say Hello"> </form> </div>
Jrjungemann/Jrjungemann.github.io
contact.html
HTML
mit
560
// © 2013 the Search Authors under the MIT license. See AUTHORS for the list of authors. #include "mdist.hpp" #include <cstdlib> #include <limits> #include <vector> TilesMdist::TilesMdist(FILE *in) : Tiles(in) { initmd(); initincr(); } TilesMdist::State TilesMdist::initialstate() { State s; s.h = 0; for (unsigned int i = 0; i < Ntiles; i++) { if (init[i] == 0) s.b = i; else s.h += md[init[i]][i]; s.ts[i] = init[i]; } return s; } void TilesMdist::initmd() { for (unsigned int t = 1; t < Ntiles; t++) { unsigned int row = goalpos[t] / Width; unsigned int col = goalpos[t] % Width; for (int i = 0; i < Ntiles; i++) { unsigned int r = i / Width; unsigned int c = i % Width; md[t][i] = abs(r - row) + abs(c - col); } } } void TilesMdist::initincr() { for (unsigned int t = 1; t < Ntiles; t++) { for (unsigned int nw = 0; nw < Ntiles; nw++) { unsigned int next = md[t][nw]; for (unsigned int n = 0; n <ops[nw].n; n++) { unsigned int old = ops[nw].mvs[n]; incr[t][nw][old] = md[t][old] - next; } } } } TilesMdist::Cost TilesMdist::pathcost(const std::vector<State> &path, const std::vector<Oper> &ops) { State state = initialstate(); Cost cost(0); if (ops.size() > (unsigned int) std::numeric_limits<int>::max()) fatal("Too many actions"); for (int i = ops.size() - 1; i >= 0; i--) { State copy(state); Edge e(*this, copy, ops[i]); cost += e.cost; assert(e.state == path[i]); state = e.state; } assert (isgoal(state)); return cost; }
skiesel/search
tiles/mdist.cc
C++
mit
1,512
FROM centos:6.7 #install remi RUN yum -y install epel-release RUN yum -y install wget RUN wget -P /etc/yum.repos.d http://rpms.famillecollet.com/enterprise/remi.repo #install php RUN yum -y --enablerepo=remi,remi-php56 install php php-common #install composer RUN curl -sS https://getcomposer.org/installer | php; mv composer.phar /usr/local/bin/composer #install fluentd ADD etc/td.repo /etc/yum.repos.d/td.repo RUN rpm --import https://packages.treasuredata.com/GPG-KEY-td-agent; yum check-update; yes|yum install -y td-agent RUN service td-agent start; chkconfig td-agent on ADD etc/td-agent.conf /etc/td-agent/td-agent.conf #build application WORKDIR /var/www ADD Logexp ./ RUN composer install --no-dev EXPOSE 8080 #start script ADD start.sh /var/www/start.sh RUN chmod +x start.sh CMD ./start.sh
niisan-tokyo/log_experioment
niisan-tokyo/Dockerfile
Dockerfile
mit
809
/** * Created by admin on 14.09.2015. */ var gulp = require('gulp'); var less = require('gulp-less'); var csso = require('gulp-csso'); var concat = require('gulp-concat'); var uglify = require('gulp-uglify'); var imagemin = require('gulp-imagemin'); var sourcemaps = require('gulp-sourcemaps'); var ngAnnotate = require('gulp-ng-annotate'); gulp.task('js', function () { gulp.src(['js/**/*.js']) .pipe(sourcemaps.init()) .pipe(concat('app.js')) .pipe(ngAnnotate()) .pipe(uglify()) .pipe(sourcemaps.write()) .pipe(gulp.dest('./dist/js')); }); gulp.task('css', function () { gulp.src('./less/**/*.less') .pipe(concat('styles.less')) .pipe(less()) .pipe(gulp.dest('./css')) .pipe(csso()) .pipe(gulp.dest('./dist/css')); }); gulp.task('images', function () { gulp.src('./img/**/*') .pipe(imagemin()) .pipe(gulp.dest('./dist/img')); }); gulp.task('watch', function () { gulp.watch('./less/**/*.less', function() { gulp.run('css'); }); gulp.watch('./img/**/*', function() { gulp.run('images'); }); gulp.watch('./js/**/*', function() { gulp.run('js'); }); }); gulp.task('build', function () { gulp.run('js'); gulp.run('css'); gulp.run('images'); });
opu-edu-projects/sea-battle
public/gulpfile.js
JavaScript
mit
1,325
#!/usr/bin/python import urllib2 url = "http://localhost:8888/test/test.txt" html = urllib2.urlopen(url).read() print html send_headers = { 'range':'bytes=10-' } req = urllib2.Request(url, headers=send_headers) html = urllib2.urlopen(req).read() print html
misilences/incipe
var/www/test/crawler/rbt.py
Python
mit
266
<?php defined('BASEPATH') OR exit('No direct script access allowed'); // ----------------------------------------------------------------------- if ( ! function_exists('islogin')) { function islogin(){ $CI =& get_instance(); $is_logged_in = $CI->session->userdata('loginAdmin'); if(!isset($is_logged_in) || $is_logged_in != true){ return(0); }else{ return(1); } } }
maxirossi/firestorm
admin/application/helpers/islogin_helper.php
PHP
mit
409
<?php namespace ExchangeRate; use GuzzleHttp\ClientInterface; use Money\Currency; interface ExchangeRateRetriever { /** * @param ClientInterface $client * @param Currency $baseCurrency * @param string $apiKey */ public function __construct(ClientInterface $client, Currency $baseCurrency, string $apiKey = null); /** * @param Currency $currency * * @return float */ public function getFor(Currency $currency): float; }
rgeraads/exchange-rate
src/ExchangeRate/ExchangeRateRetriever.php
PHP
mit
495
import marked from 'marked'; import { isAbsolutePath, getPath, getParentPath } from '../router/util'; import { isFn, merge, cached, isPrimitive } from '../util/core'; import { tree as treeTpl } from './tpl'; import { genTree } from './gen-tree'; import { slugify } from './slugify'; import { emojify } from './emojify'; import { getAndRemoveConfig } from './utils'; import { imageCompiler } from './compiler/image'; import { highlightCodeCompiler } from './compiler/code'; import { paragraphCompiler } from './compiler/paragraph'; import { taskListCompiler } from './compiler/taskList'; import { taskListItemCompiler } from './compiler/taskListItem'; import { linkCompiler } from './compiler/link'; const cachedLinks = {}; const compileMedia = { markdown(url) { return { url, }; }, mermaid(url) { return { url, }; }, iframe(url, title) { return { html: `<iframe src="${url}" ${title || 'width=100% height=400'}></iframe>`, }; }, video(url, title) { return { html: `<video src="${url}" ${title || 'controls'}>Not Support</video>`, }; }, audio(url, title) { return { html: `<audio src="${url}" ${title || 'controls'}>Not Support</audio>`, }; }, code(url, title) { let lang = url.match(/\.(\w+)$/); lang = title || (lang && lang[1]); if (lang === 'md') { lang = 'markdown'; } return { url, lang, }; }, }; export class Compiler { constructor(config, router) { this.config = config; this.router = router; this.cacheTree = {}; this.toc = []; this.cacheTOC = {}; this.linkTarget = config.externalLinkTarget || '_blank'; this.linkRel = this.linkTarget === '_blank' ? config.externalLinkRel || 'noopener' : ''; this.contentBase = router.getBasePath(); const renderer = this._initRenderer(); this.heading = renderer.heading; let compile; const mdConf = config.markdown || {}; if (isFn(mdConf)) { compile = mdConf(marked, renderer); } else { marked.setOptions( merge(mdConf, { renderer: merge(renderer, mdConf.renderer), }) ); compile = marked; } this._marked = compile; this.compile = text => { let isCached = true; // eslint-disable-next-line no-unused-vars const result = cached(_ => { isCached = false; let html = ''; if (!text) { return text; } if (isPrimitive(text)) { html = compile(text); } else { html = compile.parser(text); } html = config.noEmoji ? html : emojify(html); slugify.clear(); return html; })(text); const curFileName = this.router.parse().file; if (isCached) { this.toc = this.cacheTOC[curFileName]; } else { this.cacheTOC[curFileName] = [...this.toc]; } return result; }; } /** * Pulls content from file and renders inline on the page as a embedded item. * * This allows you to embed different file types on the returned * page. * The basic format is: * ``` * [filename](_media/example.md ':include') * ``` * * @param {string} href The href to the file to embed in the page. * @param {string} title Title of the link used to make the embed. * * @return {type} Return value description. */ compileEmbed(href, title) { const { str, config } = getAndRemoveConfig(title); let embed; title = str; if (config.include) { if (!isAbsolutePath(href)) { href = getPath( process.env.SSR ? '' : this.contentBase, getParentPath(this.router.getCurrentPath()), href ); } let media; if (config.type && (media = compileMedia[config.type])) { embed = media.call(this, href, title); embed.type = config.type; } else { let type = 'code'; if (/\.(md|markdown)/.test(href)) { type = 'markdown'; } else if (/\.mmd/.test(href)) { type = 'mermaid'; } else if (/\.html?/.test(href)) { type = 'iframe'; } else if (/\.(mp4|ogg)/.test(href)) { type = 'video'; } else if (/\.mp3/.test(href)) { type = 'audio'; } embed = compileMedia[type].call(this, href, title); embed.type = type; } embed.fragment = config.fragment; return embed; } } _matchNotCompileLink(link) { const links = this.config.noCompileLinks || []; for (let i = 0; i < links.length; i++) { const n = links[i]; const re = cachedLinks[n] || (cachedLinks[n] = new RegExp(`^${n}$`)); if (re.test(link)) { return link; } } } _initRenderer() { const renderer = new marked.Renderer(); const { linkTarget, linkRel, router, contentBase } = this; const _self = this; const origin = {}; /** * Render anchor tag * @link https://github.com/markedjs/marked#overriding-renderer-methods * @param {String} text Text content * @param {Number} level Type of heading (h<level> tag) * @returns {String} Heading element */ origin.heading = renderer.heading = function(text, level) { let { str, config } = getAndRemoveConfig(text); const nextToc = { level, title: str }; if (/<!-- {docsify-ignore} -->/g.test(str)) { str = str.replace('<!-- {docsify-ignore} -->', ''); nextToc.title = str; nextToc.ignoreSubHeading = true; } if (/{docsify-ignore}/g.test(str)) { str = str.replace('{docsify-ignore}', ''); nextToc.title = str; nextToc.ignoreSubHeading = true; } if (/<!-- {docsify-ignore-all} -->/g.test(str)) { str = str.replace('<!-- {docsify-ignore-all} -->', ''); nextToc.title = str; nextToc.ignoreAllSubs = true; } if (/{docsify-ignore-all}/g.test(str)) { str = str.replace('{docsify-ignore-all}', ''); nextToc.title = str; nextToc.ignoreAllSubs = true; } const slug = slugify(config.id || str); const url = router.toURL(router.getCurrentPath(), { id: slug }); nextToc.slug = url; _self.toc.push(nextToc); return `<h${level} id="${slug}"><a href="${url}" data-id="${slug}" class="anchor"><span>${str}</span></a></h${level}>`; }; origin.code = highlightCodeCompiler({ renderer }); origin.link = linkCompiler({ renderer, router, linkTarget, linkRel, compilerClass: _self, }); origin.paragraph = paragraphCompiler({ renderer }); origin.image = imageCompiler({ renderer, contentBase, router }); origin.list = taskListCompiler({ renderer }); origin.listitem = taskListItemCompiler({ renderer }); renderer.origin = origin; return renderer; } /** * Compile sidebar * @param {String} text Text content * @param {Number} level Type of heading (h<level> tag) * @returns {String} Sidebar element */ sidebar(text, level) { const { toc } = this; const currentPath = this.router.getCurrentPath(); let html = ''; if (text) { html = this.compile(text); } else { for (let i = 0; i < toc.length; i++) { if (toc[i].ignoreSubHeading) { const deletedHeaderLevel = toc[i].level; toc.splice(i, 1); // Remove headers who are under current header for ( let j = i; deletedHeaderLevel < toc[j].level && j < toc.length; j++ ) { toc.splice(j, 1) && j-- && i++; } i--; } } const tree = this.cacheTree[currentPath] || genTree(toc, level); html = treeTpl(tree, '<ul>{inner}</ul>'); this.cacheTree[currentPath] = tree; } return html; } /** * Compile sub sidebar * @param {Number} level Type of heading (h<level> tag) * @returns {String} Sub-sidebar element */ subSidebar(level) { if (!level) { this.toc = []; return; } const currentPath = this.router.getCurrentPath(); const { cacheTree, toc } = this; toc[0] && toc[0].ignoreAllSubs && toc.splice(0); toc[0] && toc[0].level === 1 && toc.shift(); for (let i = 0; i < toc.length; i++) { toc[i].ignoreSubHeading && toc.splice(i, 1) && i--; } const tree = cacheTree[currentPath] || genTree(toc, level); cacheTree[currentPath] = tree; this.toc = []; return treeTpl(tree); } header(text, level) { return this.heading(text, level); } article(text) { return this.compile(text); } /** * Compile cover page * @param {Text} text Text content * @returns {String} Cover page */ cover(text) { const cacheToc = this.toc.slice(); const html = this.compile(text); this.toc = cacheToc.slice(); return html; } }
nsina/docsify
src/core/render/compiler.js
JavaScript
mit
8,971
/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ // Load entry module and return exports /******/ return __webpack_require__(0); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var _webpackDevServer = __webpack_require__(1); var _webpackDevServer2 = _interopRequireDefault(_webpackDevServer); var _webpack = __webpack_require__(2); var _webpack2 = _interopRequireDefault(_webpack); var _webpackConfigDev = __webpack_require__(3); var _webpackConfigDev2 = _interopRequireDefault(_webpackConfigDev); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var server = new _webpackDevServer2.default((0, _webpack2.default)(_webpackConfigDev2.default), { publicPath: _webpackConfigDev2.default.output.publicPath, hot: true }); server.listen(8080, 'localhost', function () { console.log("Dev-Server with Hot Reloading"); }); /***/ }, /* 1 */ /***/ function(module, exports) { module.exports = require("webpack-dev-server"); /***/ }, /* 2 */ /***/ function(module, exports) { module.exports = require("webpack"); /***/ }, /* 3 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; var webpack = __webpack_require__(2); module.exports = { entry: ['webpack-dev-server/client?http://localhost:8080', 'webpack/hot/only-dev-server', './src/client/main'], module: { loaders: [{ test: /\.jsx?$/, exclude: /node_modules/, loader: 'react-hot!babel-loader?presets[]=es2015&presets[]=es2016&presets[]=react' }] }, resolve: { extensions: ['', '.js', '.jsx'] }, output: { path: __dirname + '/public/js', publicPath: 'http://localhost:8080/js/', filename: 'application.js' }, plugins: [new webpack.HotModuleReplacementPlugin(), new webpack.NoErrorsPlugin(), new webpack.optimize.DedupePlugin(), new webpack.optimize.OccurrenceOrderPlugin()] }; /***/ } /******/ ]);
jmenglis/OliveRiley
webpack.js
JavaScript
mit
3,146
package net.openorbit.model.entities.map.planet; import net.openorbit.EntitiesDictionnary; import net.openorbit.json.IJsonDeserializable; import net.openorbit.json.JsonException; /** * @author kheless * @date 06-02-15 */ public class TileDecoration{ //Fields public String ID; public String typeName; public byte movementModifier; }
Leosky/OpenOrbit
src/main/java/net/openorbit/model/entities/map/planet/TileDecoration.java
Java
mit
354
> Documentation and development interface for component libraries # @patternplate/compiler * Framework independent * Bring design docs to live with real components * Powerful search and meta data system This is the contributor documentation for `@patternplate/cli` For user docs see [patternplate.github.io](https://patternplate.github.io) ## About @patternplate/compiler `@patternplate/compiler` wraps webpack and simplifies its generic API to distinguish only between `web` and `node` targets for patternplate purposes. ## Quick start ```sh git clone https://github.com/patternplate/patternplate.git cd patternplate/packages/compiler yarn yarn start ``` ## Usage ```js const createCompiler = require("@patternplate/compiler"); const compiler = createCompiler({ cwd: process.cwd(), target: "web" }); compiler.run((err, stats) => { if (err) { return console.error(err); } if (stats.errors && stats.errors.length > 0) { return console.error(stats.errors); } // results in compiler.outputFileSystem }); ``` ## License Copyright by SinnerSchrader. All `@patternplate` packages are released under the MIT license.
sinnerschrader/patternplate
packages/compiler/README.md
Markdown
mit
1,149
/*** @jsx React.DOM */ var React = require('react'); var JigsawStore = require('../stores/JigsawStore'); var JigsawActions = require('../actions/JigsawActions'); /** * A button to update the random number generator seed. * @type {*|Function} */ var Randomizer = React.createClass({ getInitialState: function() { return {seed: JigsawStore.getRandSeed()}; }, componentDidMount: function() { JigsawStore.addChangeListener(this._onChange); }, componentWillUnmount: function() { JigsawStore.removeChangeListener(this._onChange); }, render: function() { var disabled = ! this.state.canRedo; return ( <button className="btn btn-default" onClick={this._randomize}>Randomize</button> ); }, _randomize: function() { JigsawActions.randomize(); return false; }, _onChange: function() { this.setState({seed: JigsawStore.getRandSeed()}) } }); module.exports = Randomizer;
davidhmartin/flux-jigsaw
src/js/components/Randomizer.js
JavaScript
mit
938
<?php /* * This file is part of the Sylius package. * * (c) Paweł Jędrzejewski * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ declare(strict_types=1); namespace Sylius\Bundle\ApiBundle\ApiPlatform; /** @experimental */ final class ApiResourceConfigurationMerger implements ApiResourceConfigurationMergerInterface { public function mergeConfigs(...$configs): array { $resultingConfig = []; foreach ($configs as $config) { foreach ($config as $newKey => $newValue) { if ($this->containsUnset($newKey, $matches)) { [, $newKey] = $matches; unset($resultingConfig[$newKey]); if (null === $newValue) { continue; } } if (is_int($newKey)) { $resultingConfig[] = $newValue; continue; } if (isset($resultingConfig[$newKey]) && is_array($resultingConfig[$newKey]) && is_array($newValue)) { $resultingConfig[$newKey] = $this->mergeConfigs($resultingConfig[$newKey], $newValue); continue; } $resultingConfig[$newKey] = $newValue; } } return $resultingConfig; } private function containsUnset($key, &$matches): bool { return is_string($key) && 1 === preg_match('/^(.*[^ ]) +\\(unset\\)$/', $key, $matches); } }
pamil/Sylius
src/Sylius/Bundle/ApiBundle/ApiPlatform/ApiResourceConfigurationMerger.php
PHP
mit
1,586
import * as React from 'react'; import * as t from '../types'; import {logger} from '../utils/log'; import {TextEditor} from './TextEditor'; const log = logger('QueryEditor', {count: ['render']}); export interface Props extends React.ClassAttributes<any> { query: t.Query; sources: t.DataSource[]; updateTitle(id: string, title: string): void; updateRaw(id: string, raw: string): void; updateSourceId(id: string, sourceId: string): void; } export class QueryEditor extends React.PureComponent<Props> { render(): JSX.Element { log('render', this); const {query, sources} = this.props; return ( <div className="QueryEditor"> <div> <select value={query.sourceId} onChange={this.doChangeSourceId}> {sources.map(s => <option key={s.id} value={s.id}>{s.uri}</option>)} </select> </div> <div> <h3> <input type="text" value={query.title} onChange={this.doChangeTitle} placeholder="query title" /> </h3> </div> <div style={{height: 400}}> <TextEditor text={query.raw} onChange={this.doTextEditorChange} ref={this.assignTextEditorRef} /> </div> </div> ); } doChangeSourceId = (e: React.ChangeEvent<HTMLSelectElement>): void => { this.props.updateSourceId(this.props.query.id, e.target.value); }; doChangeTitle = (e: React.ChangeEvent<HTMLInputElement>) => { this.props.updateTitle(this.props.query.id, e.target.value); }; textEditorRef: TextEditor; assignTextEditorRef = (r: TextEditor) => (this.textEditorRef = r); doTextEditorChange = (text: string): void => { // the editor's `onChange` gets fired when we set a new value, // so check that it doesn't already match what's in the store // or it'll perform a redundant action/render if (this.props.query.raw !== text) { this.props.updateRaw(this.props.query.id, text); } }; }
dbslate/dbslate
src/_userProject/client/views/QueryEditor.tsx
TypeScript
mit
2,054
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (version 1.7.0_25) on Sat Jan 30 13:02:50 EST 2016 --> <title>BestCostRouteCrossover</title> <meta name="date" content="2016-01-30"> <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="BestCostRouteCrossover"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar_top"> <!-- --> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/BestCostRouteCrossover.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../index-files/index-1.html">Index</a></li> <li><a href="../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev Class</li> <li><a href="../../../ec/operator/crossover/CycleCrossover.html" title="class in ec.operator.crossover"><span class="strong">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../index.html?ec/operator/crossover/BestCostRouteCrossover.html" target="_top">Frames</a></li> <li><a href="BestCostRouteCrossover.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li><a href="#fields_inherited_from_class_ec.operator.Operator">Field</a>&nbsp;|&nbsp;</li> <li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_detail">Method</a></li> </ul> </div> <a name="skip-navbar_top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <!-- ======== START OF CLASS DATA ======== --> <div class="header"> <div class="subTitle">ec.operator.crossover</div> <h2 title="Class BestCostRouteCrossover" class="title">Class BestCostRouteCrossover</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li><a href="../../../ec/operator/Operator.html" title="class in ec.operator">ec.operator.Operator</a></li> <li> <ul class="inheritance"> <li><a href="../../../ec/operator/CrossoverModule.html" title="class in ec.operator">ec.operator.CrossoverModule</a></li> <li> <ul class="inheritance"> <li>ec.operator.crossover.BestCostRouteCrossover</li> </ul> </li> </ul> </li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <hr> <br> <pre>public class <span class="strong">BestCostRouteCrossover</span> extends <a href="../../../ec/operator/CrossoverModule.html" title="class in ec.operator">CrossoverModule</a></pre> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- =========== FIELD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="field_summary"> <!-- --> </a> <h3>Field Summary</h3> <ul class="blockList"> <li class="blockList"><a name="fields_inherited_from_class_ec.operator.Operator"> <!-- --> </a> <h3>Fields inherited from class&nbsp;ec.operator.<a href="../../../ec/operator/Operator.html" title="class in ec.operator">Operator</a></h3> <code><a href="../../../ec/operator/Operator.html#indexes">indexes</a></code></li> </ul> </li> </ul> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor_summary"> <!-- --> </a> <h3>Constructor Summary</h3> <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colOne" scope="col">Constructor and Description</th> </tr> <tr class="altColor"> <td class="colOne"><code><strong><a href="../../../ec/operator/crossover/BestCostRouteCrossover.html#BestCostRouteCrossover()">BestCostRouteCrossover</a></strong>()</code>&nbsp;</td> </tr> </table> </li> </ul> <!-- ========== METHOD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="method_summary"> <!-- --> </a> <h3>Method Summary</h3> <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span>Methods</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> <tr class="altColor"> <td class="colFirst"><code>java.util.ArrayList&lt;<a href="../../../ec/individuals/Individual.html" title="class in ec.individuals">Individual</a>&gt;</code></td> <td class="colLast"><code><strong><a href="../../../ec/operator/crossover/BestCostRouteCrossover.html#performCrossoverOperation(ec.individuals.populations.Population, ec.individuals.Chromosome, ec.individuals.Chromosome, java.util.ArrayList, int)">performCrossoverOperation</a></strong>(<a href="../../../ec/individuals/populations/Population.html" title="class in ec.individuals.populations">Population</a>&nbsp;p, <a href="../../../ec/individuals/Chromosome.html" title="class in ec.individuals">Chromosome</a>&nbsp;c1, <a href="../../../ec/individuals/Chromosome.html" title="class in ec.individuals">Chromosome</a>&nbsp;c2, java.util.ArrayList&lt;java.lang.Integer&gt;&nbsp;tournamentIndividuals, int&nbsp;numberOfChildrenToAdd)</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code>java.util.ArrayList&lt;<a href="../../../ec/individuals/Individual.html" title="class in ec.individuals">Individual</a>&gt;</code></td> <td class="colLast"><code><strong><a href="../../../ec/operator/crossover/BestCostRouteCrossover.html#performCrossoverOperation(ec.individuals.populations.Population, ec.individuals.Chromosome, ec.individuals.Chromosome, java.util.ArrayList, int, java.util.ArrayList, java.lang.String)">performCrossoverOperation</a></strong>(<a href="../../../ec/individuals/populations/Population.html" title="class in ec.individuals.populations">Population</a>&nbsp;p, <a href="../../../ec/individuals/Chromosome.html" title="class in ec.individuals">Chromosome</a>&nbsp;c1, <a href="../../../ec/individuals/Chromosome.html" title="class in ec.individuals">Chromosome</a>&nbsp;c2, java.util.ArrayList&lt;java.lang.Integer&gt;&nbsp;tournamentIndividuals, int&nbsp;numberOfChildrenToAdd, java.util.ArrayList&lt;java.lang.Double&gt;&nbsp;ages, java.lang.String&nbsp;replacementType)</code> <div class="block">OVERLOAD ALPS add age</div> </td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods_inherited_from_class_ec.operator.CrossoverModule"> <!-- --> </a> <h3>Methods inherited from class&nbsp;ec.operator.<a href="../../../ec/operator/CrossoverModule.html" title="class in ec.operator">CrossoverModule</a></h3> <code><a href="../../../ec/operator/CrossoverModule.html#getChildrenAdded()">getChildrenAdded</a>, <a href="../../../ec/operator/CrossoverModule.html#getCrossoverPolicy()">getCrossoverPolicy</a>, <a href="../../../ec/operator/CrossoverModule.html#getCrossoverRate()">getCrossoverRate</a>, <a href="../../../ec/operator/CrossoverModule.html#getOperation()">getOperation</a>, <a href="../../../ec/operator/CrossoverModule.html#getSpecificModuleType()">getSpecificModuleType</a>, <a href="../../../ec/operator/CrossoverModule.html#returnAvailableIndex(ec.individuals.Chromosome, ec.individuals.Gene)">returnAvailableIndex</a>, <a href="../../../ec/operator/CrossoverModule.html#setChildrenAdded(int)">setChildrenAdded</a>, <a href="../../../ec/operator/CrossoverModule.html#setCrossoverRate(double)">setCrossoverRate</a></code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="methods_inherited_from_class_ec.operator.Operator"> <!-- --> </a> <h3>Methods inherited from class&nbsp;ec.operator.<a href="../../../ec/operator/Operator.html" title="class in ec.operator">Operator</a></h3> <code><a href="../../../ec/operator/Operator.html#chromosomeHasDuplicateGenes(java.util.ArrayList)">chromosomeHasDuplicateGenes</a>, <a href="../../../ec/operator/Operator.html#getCycleMask(ec.individuals.Chromosome, ec.individuals.Chromosome, int)">getCycleMask</a>, <a href="../../../ec/operator/Operator.html#getIndex(java.lang.String, java.lang.String)">getIndex</a>, <a href="../../../ec/operator/Operator.html#getOffsprings()">getOffsprings</a>, <a href="../../../ec/operator/Operator.html#selectTwoPointsRandomly(int)">selectTwoPointsRandomly</a>, <a href="../../../ec/operator/Operator.html#setOffsprings(java.util.ArrayList)">setOffsprings</a></code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> <!-- --> </a> <h3>Methods inherited from class&nbsp;java.lang.Object</h3> <code>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ========= CONSTRUCTOR DETAIL ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor_detail"> <!-- --> </a> <h3>Constructor Detail</h3> <a name="BestCostRouteCrossover()"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>BestCostRouteCrossover</h4> <pre>public&nbsp;BestCostRouteCrossover()</pre> </li> </ul> </li> </ul> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method_detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="performCrossoverOperation(ec.individuals.populations.Population, ec.individuals.Chromosome, ec.individuals.Chromosome, java.util.ArrayList, int)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>performCrossoverOperation</h4> <pre>public&nbsp;java.util.ArrayList&lt;<a href="../../../ec/individuals/Individual.html" title="class in ec.individuals">Individual</a>&gt;&nbsp;performCrossoverOperation(<a href="../../../ec/individuals/populations/Population.html" title="class in ec.individuals.populations">Population</a>&nbsp;p, <a href="../../../ec/individuals/Chromosome.html" title="class in ec.individuals">Chromosome</a>&nbsp;c1, <a href="../../../ec/individuals/Chromosome.html" title="class in ec.individuals">Chromosome</a>&nbsp;c2, java.util.ArrayList&lt;java.lang.Integer&gt;&nbsp;tournamentIndividuals, int&nbsp;numberOfChildrenToAdd)</pre> <dl> <dt><strong>Specified by:</strong></dt> <dd><code><a href="../../../ec/operator/CrossoverModule.html#performCrossoverOperation(ec.individuals.populations.Population, ec.individuals.Chromosome, ec.individuals.Chromosome, java.util.ArrayList, int)">performCrossoverOperation</a></code>&nbsp;in class&nbsp;<code><a href="../../../ec/operator/CrossoverModule.html" title="class in ec.operator">CrossoverModule</a></code></dd> <dt><span class="strong">Returns:</span></dt><dd></dd></dl> </li> </ul> <a name="performCrossoverOperation(ec.individuals.populations.Population, ec.individuals.Chromosome, ec.individuals.Chromosome, java.util.ArrayList, int, java.util.ArrayList, java.lang.String)"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>performCrossoverOperation</h4> <pre>public&nbsp;java.util.ArrayList&lt;<a href="../../../ec/individuals/Individual.html" title="class in ec.individuals">Individual</a>&gt;&nbsp;performCrossoverOperation(<a href="../../../ec/individuals/populations/Population.html" title="class in ec.individuals.populations">Population</a>&nbsp;p, <a href="../../../ec/individuals/Chromosome.html" title="class in ec.individuals">Chromosome</a>&nbsp;c1, <a href="../../../ec/individuals/Chromosome.html" title="class in ec.individuals">Chromosome</a>&nbsp;c2, java.util.ArrayList&lt;java.lang.Integer&gt;&nbsp;tournamentIndividuals, int&nbsp;numberOfChildrenToAdd, java.util.ArrayList&lt;java.lang.Double&gt;&nbsp;ages, java.lang.String&nbsp;replacementType)</pre> <div class="block"><strong>Description copied from class:&nbsp;<code><a href="../../../ec/operator/CrossoverModule.html#performCrossoverOperation(ec.individuals.populations.Population, ec.individuals.Chromosome, ec.individuals.Chromosome, java.util.ArrayList, int, java.util.ArrayList, java.lang.String)">CrossoverModule</a></code></strong></div> <div class="block">OVERLOAD ALPS add age</div> <dl> <dt><strong>Specified by:</strong></dt> <dd><code><a href="../../../ec/operator/CrossoverModule.html#performCrossoverOperation(ec.individuals.populations.Population, ec.individuals.Chromosome, ec.individuals.Chromosome, java.util.ArrayList, int, java.util.ArrayList, java.lang.String)">performCrossoverOperation</a></code>&nbsp;in class&nbsp;<code><a href="../../../ec/operator/CrossoverModule.html" title="class in ec.operator">CrossoverModule</a></code></dd> <dd><code>replacementType</code> - [steadyState:Generational:etc]</dd> <dt><span class="strong">Returns:</span></dt><dd></dd></dl> </li> </ul> </li> </ul> </li> </ul> </div> </div> <!-- ========= END OF CLASS DATA ========= --> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar_bottom"> <!-- --> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/BestCostRouteCrossover.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../index-files/index-1.html">Index</a></li> <li><a href="../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev Class</li> <li><a href="../../../ec/operator/crossover/CycleCrossover.html" title="class in ec.operator.crossover"><span class="strong">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../index.html?ec/operator/crossover/BestCostRouteCrossover.html" target="_top">Frames</a></li> <li><a href="BestCostRouteCrossover.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li><a href="#fields_inherited_from_class_ec.operator.Operator">Field</a>&nbsp;|&nbsp;</li> <li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_detail">Method</a></li> </ul> </div> <a name="skip-navbar_bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>
aawuley/evolutionary-computation
doc/ec/operator/crossover/BestCostRouteCrossover.html
HTML
mit
17,011
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, install, // copy or use the software. // // // License Agreement // For Open Source Computer Vision Library // // Copyright (C) 2015, OpenCV Foundation, all rights reserved. // Third party copyrights are property of their respective owners. // // Redistribution and use in source and binary forms, with or without modification, // are permitted provided that the following conditions are met: // // * Redistribution's of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // // * Redistribution's in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // // * The name of Intel Corporation may not be used to endorse or promote products // derived from this software without specific prior written permission. // // This software is provided by the copyright holders and contributors "as is" and // any express or implied warranties, including, but not limited to, the implied // warranties of merchantability and fitness for a particular purpose are disclaimed. // In no event shall the Intel Corporation or contributors be liable for any direct, // indirect, incidental, special, exemplary, or consequential damages // (including, but not limited to, procurement of substitute goods or services; // loss of use, data, or profits; or business interruption) however caused // and on any theory of liability, whether in contract, strict liability, // or tort (including negligence or otherwise) arising in any way out of // the use of this software, even if advised of the possibility of such damage. // //M*/ #include "precomp.hpp" #include <deque> #include BLIK_FAKEWIN_V_stdint_h //original-code:<stdint.h> namespace cv { const uint32_t RIFF_CC = CV_FOURCC('R','I','F','F'); const uint32_t LIST_CC = CV_FOURCC('L','I','S','T'); const uint32_t HDRL_CC = CV_FOURCC('h','d','r','l'); const uint32_t AVIH_CC = CV_FOURCC('a','v','i','h'); const uint32_t STRL_CC = CV_FOURCC('s','t','r','l'); const uint32_t STRH_CC = CV_FOURCC('s','t','r','h'); const uint32_t VIDS_CC = CV_FOURCC('v','i','d','s'); const uint32_t MJPG_CC = CV_FOURCC('M','J','P','G'); const uint32_t MOVI_CC = CV_FOURCC('m','o','v','i'); const uint32_t IDX1_CC = CV_FOURCC('i','d','x','1'); const uint32_t AVI_CC = CV_FOURCC('A','V','I',' '); const uint32_t AVIX_CC = CV_FOURCC('A','V','I','X'); const uint32_t JUNK_CC = CV_FOURCC('J','U','N','K'); const uint32_t INFO_CC = CV_FOURCC('I','N','F','O'); String fourccToString(uint32_t fourcc); String fourccToString(uint32_t fourcc) { return format("%c%c%c%c", fourcc & 255, (fourcc >> 8) & 255, (fourcc >> 16) & 255, (fourcc >> 24) & 255); } #ifndef DWORD typedef uint32_t DWORD; #endif #ifndef WORD typedef uint16_t WORD; #endif #ifndef LONG typedef int32_t LONG; #endif #pragma pack(push, 1) struct AviMainHeader { DWORD dwMicroSecPerFrame; // The period between video frames DWORD dwMaxBytesPerSec; // Maximum data rate of the file DWORD dwReserved1; // 0 DWORD dwFlags; // 0x10 AVIF_HASINDEX: The AVI file has an idx1 chunk containing an index at the end of the file. DWORD dwTotalFrames; // Field of the main header specifies the total number of frames of data in file. DWORD dwInitialFrames; // Is used for interleaved files DWORD dwStreams; // Specifies the number of streams in the file. DWORD dwSuggestedBufferSize; // Field specifies the suggested buffer size forreading the file DWORD dwWidth; // Fields specify the width of the AVIfile in pixels. DWORD dwHeight; // Fields specify the height of the AVIfile in pixels. DWORD dwReserved[4]; // 0, 0, 0, 0 }; struct AviStreamHeader { uint32_t fccType; // 'vids', 'auds', 'txts'... uint32_t fccHandler; // "cvid", "DIB " DWORD dwFlags; // 0 DWORD dwPriority; // 0 DWORD dwInitialFrames; // 0 DWORD dwScale; // 1 DWORD dwRate; // Fps (dwRate - frame rate for video streams) DWORD dwStart; // 0 DWORD dwLength; // Frames number (playing time of AVI file as defined by scale and rate) DWORD dwSuggestedBufferSize; // For reading the stream DWORD dwQuality; // -1 (encoding quality. If set to -1, drivers use the default quality value) DWORD dwSampleSize; // 0 means that each frame is in its own chunk struct { short int left; short int top; short int right; short int bottom; } rcFrame; // If stream has a different size than dwWidth*dwHeight(unused) }; struct AviIndex { DWORD ckid; DWORD dwFlags; DWORD dwChunkOffset; DWORD dwChunkLength; }; struct BitmapInfoHeader { DWORD biSize; // Write header size of BITMAPINFO header structure LONG biWidth; // width in pixels LONG biHeight; // heigth in pixels WORD biPlanes; // Number of color planes in which the data is stored WORD biBitCount; // Number of bits per pixel DWORD biCompression; // Type of compression used (uncompressed: NO_COMPRESSION=0) DWORD biSizeImage; // Image Buffer. Quicktime needs 3 bytes also for 8-bit png // (biCompression==NO_COMPRESSION)?0:xDim*yDim*bytesPerPixel; LONG biXPelsPerMeter; // Horizontal resolution in pixels per meter LONG biYPelsPerMeter; // Vertical resolution in pixels per meter DWORD biClrUsed; // 256 (color table size; for 8-bit only) DWORD biClrImportant; // Specifies that the first x colors of the color table. Are important to the DIB. }; struct RiffChunk { uint32_t m_four_cc; uint32_t m_size; }; struct RiffList { uint32_t m_riff_or_list_cc; uint32_t m_size; uint32_t m_list_type_cc; }; #pragma pack(pop) class MjpegInputStream { public: MjpegInputStream(); MjpegInputStream(const String& filename); ~MjpegInputStream(); MjpegInputStream& read(char*, uint64_t); MjpegInputStream& seekg(uint64_t); uint64_t tellg(); bool isOpened() const; bool open(const String& filename); void close(); operator bool(); private: bool m_is_valid; FILE* m_f; }; MjpegInputStream::MjpegInputStream(): m_is_valid(false), m_f(0) { } MjpegInputStream::MjpegInputStream(const String& filename): m_is_valid(false), m_f(0) { open(filename); } bool MjpegInputStream::isOpened() const { return m_f != 0; } bool MjpegInputStream::open(const String& filename) { close(); m_f = fopen(filename.c_str(), "rb"); m_is_valid = isOpened(); return m_is_valid; } void MjpegInputStream::close() { if(isOpened()) { m_is_valid = false; fclose(m_f); m_f = 0; } } MjpegInputStream& MjpegInputStream::read(char* buf, uint64_t count) { if(isOpened()) { m_is_valid = (count == fread((void*)buf, 1, (size_t)count, m_f)); } return *this; } MjpegInputStream& MjpegInputStream::seekg(uint64_t pos) { m_is_valid = (fseek(m_f, (long)pos, SEEK_SET) == 0); return *this; } uint64_t MjpegInputStream::tellg() { return ftell(m_f); } MjpegInputStream::operator bool() { return m_is_valid; } MjpegInputStream::~MjpegInputStream() { close(); } MjpegInputStream& operator >> (MjpegInputStream& is, AviMainHeader& avih); MjpegInputStream& operator >> (MjpegInputStream& is, AviStreamHeader& strh); MjpegInputStream& operator >> (MjpegInputStream& is, BitmapInfoHeader& bmph); MjpegInputStream& operator >> (MjpegInputStream& is, RiffList& riff_list); MjpegInputStream& operator >> (MjpegInputStream& is, RiffChunk& riff_chunk); MjpegInputStream& operator >> (MjpegInputStream& is, AviIndex& idx1); MjpegInputStream& operator >> (MjpegInputStream& is, AviMainHeader& avih) { is.read((char*)(&avih), sizeof(AviMainHeader)); return is; } MjpegInputStream& operator >> (MjpegInputStream& is, AviStreamHeader& strh) { is.read((char*)(&strh), sizeof(AviStreamHeader)); return is; } MjpegInputStream& operator >> (MjpegInputStream& is, BitmapInfoHeader& bmph) { is.read((char*)(&bmph), sizeof(BitmapInfoHeader)); return is; } MjpegInputStream& operator >> (MjpegInputStream& is, RiffList& riff_list) { is.read((char*)(&riff_list), sizeof(riff_list)); return is; } MjpegInputStream& operator >> (MjpegInputStream& is, RiffChunk& riff_chunk) { is.read((char*)(&riff_chunk), sizeof(riff_chunk)); return is; } MjpegInputStream& operator >> (MjpegInputStream& is, AviIndex& idx1) { is.read((char*)(&idx1), sizeof(idx1)); return is; } /* AVI struct: RIFF ('AVI ' LIST ('hdrl' 'avih'(<Main AVI Header>) LIST ('strl' 'strh'(<Stream header>) 'strf'(<Stream format>) [ 'strd'(<Additional header data>) ] [ 'strn'(<Stream name>) ] [ 'indx'(<Odml index data>) ] ... ) [LIST ('strl' ...)] [LIST ('strl' ...)] ... [LIST ('odml' 'dmlh'(<ODML header data>) ... ) ] ... ) [LIST ('INFO' ...)] [JUNK] LIST ('movi' {{xxdb|xxdc|xxpc|xxwb}(<Data>) | LIST ('rec ' {xxdb|xxdc|xxpc|xxwb}(<Data>) {xxdb|xxdc|xxpc|xxwb}(<Data>) ... ) ... } ... ) ['idx1' (<AVI Index>) ] ) {xxdb|xxdc|xxpc|xxwb} xx - stream number: 00, 01, 02, ... db - uncompressed video frame dc - commpressed video frame pc - palette change wb - audio frame JUNK section may pad any data section and must be ignored */ typedef std::deque< std::pair<uint64_t, uint32_t> > frame_list; typedef frame_list::iterator frame_iterator; //Represents single MJPEG video stream within single AVI/AVIX entry //Multiple video streams within single AVI/AVIX entry are not supported //ODML index is not supported class AviMjpegStream { public: AviMjpegStream(); //stores founded frames in m_frame_list which can be accessed via getFrames bool parseAvi(MjpegInputStream& in_str); //stores founded frames in in_frame_list. getFrames() would return empty list bool parseAvi(MjpegInputStream& in_str, frame_list& in_frame_list); size_t getFramesCount(); frame_list& getFrames(); uint32_t getWidth(); uint32_t getHeight(); double getFps(); protected: bool parseAviWithFrameList(MjpegInputStream& in_str, frame_list& in_frame_list); void skipJunk(RiffChunk& chunk, MjpegInputStream& in_str); void skipJunk(RiffList& list, MjpegInputStream& in_str); bool parseHdrlList(MjpegInputStream& in_str); bool parseIndex(MjpegInputStream& in_str, uint32_t index_size, frame_list& in_frame_list); bool parseMovi(MjpegInputStream& in_str, frame_list& in_frame_list); bool parseStrl(MjpegInputStream& in_str, uint8_t stream_id); bool parseInfo(MjpegInputStream& in_str); void printError(MjpegInputStream& in_str, RiffList& list, uint32_t expected_fourcc); void printError(MjpegInputStream& in_str, RiffChunk& chunk, uint32_t expected_fourcc); uint32_t m_stream_id; uint64_t m_movi_start; uint64_t m_movi_end; frame_list m_frame_list; uint32_t m_width; uint32_t m_height; double m_fps; bool m_is_indx_present; }; AviMjpegStream::AviMjpegStream(): m_stream_id(0), m_movi_start(0), m_movi_end(0), m_width(0), m_height(0), m_fps(0), m_is_indx_present(false) { } size_t AviMjpegStream::getFramesCount() { return m_frame_list.size(); } frame_list& AviMjpegStream::getFrames() { return m_frame_list; } uint32_t AviMjpegStream::getWidth() { return m_width; } uint32_t AviMjpegStream::getHeight() { return m_height; } double AviMjpegStream::getFps() { return m_fps; } void AviMjpegStream::printError(MjpegInputStream& in_str, RiffList& list, uint32_t expected_fourcc) { if(!in_str) { fprintf(stderr, "Unexpected end of file while searching for %s list\n", fourccToString(expected_fourcc).c_str()); } else if(list.m_riff_or_list_cc != LIST_CC) { fprintf(stderr, "Unexpected element. Expected: %s. Got: %s.\n", fourccToString(LIST_CC).c_str(), fourccToString(list.m_riff_or_list_cc).c_str()); } else { fprintf(stderr, "Unexpected list type. Expected: %s. Got: %s.\n", fourccToString(expected_fourcc).c_str(), fourccToString(list.m_list_type_cc).c_str()); } } void AviMjpegStream::printError(MjpegInputStream& in_str, RiffChunk& chunk, uint32_t expected_fourcc) { if(!in_str) { fprintf(stderr, "Unexpected end of file while searching for %s chunk\n", fourccToString(expected_fourcc).c_str()); } else { fprintf(stderr, "Unexpected element. Expected: %s. Got: %s.\n", fourccToString(expected_fourcc).c_str(), fourccToString(chunk.m_four_cc).c_str()); } } bool AviMjpegStream::parseMovi(MjpegInputStream&, frame_list&) { //not implemented return true; } bool AviMjpegStream::parseInfo(MjpegInputStream&) { //not implemented return true; } bool AviMjpegStream::parseIndex(MjpegInputStream& in_str, uint32_t index_size, frame_list& in_frame_list) { uint64_t index_end = in_str.tellg(); index_end += index_size; bool result = false; while(in_str && (in_str.tellg() < index_end)) { AviIndex idx1; in_str >> idx1; if(idx1.ckid == m_stream_id) { uint64_t absolute_pos = m_movi_start + idx1.dwChunkOffset; if(absolute_pos < m_movi_end) { in_frame_list.push_back(std::make_pair(absolute_pos, idx1.dwChunkLength)); } else { //unsupported case fprintf(stderr, "Frame offset points outside movi section.\n"); } } result = true; } return result; } bool AviMjpegStream::parseStrl(MjpegInputStream& in_str, uint8_t stream_id) { RiffChunk strh; in_str >> strh; if(in_str && strh.m_four_cc == STRH_CC) { uint64_t next_strl_list = in_str.tellg(); next_strl_list += strh.m_size; AviStreamHeader strm_hdr; in_str >> strm_hdr; if(strm_hdr.fccType == VIDS_CC && strm_hdr.fccHandler == MJPG_CC) { uint8_t first_digit = (stream_id/10) + '0'; uint8_t second_digit = (stream_id%10) + '0'; if(m_stream_id == 0) { m_stream_id = CV_FOURCC(first_digit, second_digit, 'd', 'c'); m_fps = double(strm_hdr.dwRate)/strm_hdr.dwScale; } else { //second mjpeg video stream found which is not supported fprintf(stderr, "More than one video stream found within AVI/AVIX list. Stream %c%cdc would be ignored\n", first_digit, second_digit); } return true; } } return false; } void AviMjpegStream::skipJunk(RiffChunk& chunk, MjpegInputStream& in_str) { if(chunk.m_four_cc == JUNK_CC) { in_str.seekg(in_str.tellg() + chunk.m_size); in_str >> chunk; } } void AviMjpegStream::skipJunk(RiffList& list, MjpegInputStream& in_str) { if(list.m_riff_or_list_cc == JUNK_CC) { //JUNK chunk is 4 bytes less than LIST in_str.seekg(in_str.tellg() + list.m_size - 4); in_str >> list; } } bool AviMjpegStream::parseHdrlList(MjpegInputStream& in_str) { bool result = false; RiffChunk avih; in_str >> avih; if(in_str && avih.m_four_cc == AVIH_CC) { uint64_t next_strl_list = in_str.tellg(); next_strl_list += avih.m_size; AviMainHeader avi_hdr; in_str >> avi_hdr; if(in_str) { m_is_indx_present = ((avi_hdr.dwFlags & 0x10) != 0); DWORD number_of_streams = avi_hdr.dwStreams; m_width = avi_hdr.dwWidth; m_height = avi_hdr.dwHeight; //the number of strl lists must be equal to number of streams specified in main avi header for(DWORD i = 0; i < number_of_streams; ++i) { in_str.seekg(next_strl_list); RiffList strl_list; in_str >> strl_list; if( in_str && strl_list.m_riff_or_list_cc == LIST_CC && strl_list.m_list_type_cc == STRL_CC ) { next_strl_list = in_str.tellg(); //RiffList::m_size includes fourCC field which we have already read next_strl_list += (strl_list.m_size - 4); result = parseStrl(in_str, (uint8_t)i); } else { printError(in_str, strl_list, STRL_CC); } } } } else { printError(in_str, avih, AVIH_CC); } return result; } bool AviMjpegStream::parseAviWithFrameList(MjpegInputStream& in_str, frame_list& in_frame_list) { RiffList hdrl_list; in_str >> hdrl_list; if( in_str && hdrl_list.m_riff_or_list_cc == LIST_CC && hdrl_list.m_list_type_cc == HDRL_CC ) { uint64_t next_list = in_str.tellg(); //RiffList::m_size includes fourCC field which we have already read next_list += (hdrl_list.m_size - 4); //parseHdrlList sets m_is_indx_present flag which would be used later if(parseHdrlList(in_str)) { in_str.seekg(next_list); RiffList some_list; in_str >> some_list; //an optional section INFO if(in_str && some_list.m_riff_or_list_cc == LIST_CC && some_list.m_list_type_cc == INFO_CC) { next_list = in_str.tellg(); //RiffList::m_size includes fourCC field which we have already read next_list += (some_list.m_size - 4); parseInfo(in_str); in_str.seekg(next_list); in_str >> some_list; } //an optional section JUNK skipJunk(some_list, in_str); //we are expecting to find here movi list. Must present in avi if(in_str && some_list.m_riff_or_list_cc == LIST_CC && some_list.m_list_type_cc == MOVI_CC) { bool is_index_found = false; m_movi_start = in_str.tellg(); m_movi_start -= 4; m_movi_end = m_movi_start + some_list.m_size; //if m_is_indx_present is set to true we should find index if(m_is_indx_present) { //we are expecting to find index section after movi list uint32_t indx_pos = (uint32_t)m_movi_start + 4; indx_pos += (some_list.m_size - 4); in_str.seekg(indx_pos); RiffChunk index_chunk; in_str >> index_chunk; if(in_str && index_chunk.m_four_cc == IDX1_CC) { is_index_found = parseIndex(in_str, index_chunk.m_size, in_frame_list); //we are not going anywhere else } else { printError(in_str, index_chunk, IDX1_CC); } } //index not present or we were not able to find it //parsing movi list if(!is_index_found) { //not implemented parseMovi(in_str, in_frame_list); fprintf(stderr, "Failed to parse avi: index was not found\n"); //we are not going anywhere else } } else { printError(in_str, some_list, MOVI_CC); } } } else { printError(in_str, hdrl_list, HDRL_CC); } return in_frame_list.size() > 0; } bool AviMjpegStream::parseAvi(MjpegInputStream& in_str, frame_list& in_frame_list) { return parseAviWithFrameList(in_str, in_frame_list); } bool AviMjpegStream::parseAvi(MjpegInputStream& in_str) { return parseAviWithFrameList(in_str, m_frame_list); } class MotionJpegCapture: public IVideoCapture { public: virtual ~MotionJpegCapture(); virtual double getProperty(int) const; virtual bool setProperty(int, double); virtual bool grabFrame(); virtual bool retrieveFrame(int, OutputArray); virtual bool isOpened() const; virtual int getCaptureDomain() { return CAP_ANY; } // Return the type of the capture object: CAP_VFW, etc... MotionJpegCapture(const String&); bool open(const String&); void close(); protected: bool parseRiff(MjpegInputStream& in_str); inline uint64_t getFramePos() const; std::vector<char> readFrame(frame_iterator it); MjpegInputStream m_file_stream; bool m_is_first_frame; frame_list m_mjpeg_frames; frame_iterator m_frame_iterator; Mat m_current_frame; //frame width/height and fps could be different for //each frame/stream. At the moment we suppose that they //stays the same within single avi file. uint32_t m_frame_width; uint32_t m_frame_height; double m_fps; }; uint64_t MotionJpegCapture::getFramePos() const { if(m_is_first_frame) return 0; if(m_frame_iterator == m_mjpeg_frames.end()) return m_mjpeg_frames.size(); return m_frame_iterator - m_mjpeg_frames.begin() + 1; } bool MotionJpegCapture::setProperty(int property, double value) { if(property == CAP_PROP_POS_FRAMES) { if(int(value) == 0) { m_is_first_frame = true; m_frame_iterator = m_mjpeg_frames.end(); return true; } else if(m_mjpeg_frames.size() > value) { m_frame_iterator = m_mjpeg_frames.begin() + int(value - 1); m_is_first_frame = false; return true; } } return false; } double MotionJpegCapture::getProperty(int property) const { switch(property) { case CAP_PROP_POS_FRAMES: return (double)getFramePos(); case CAP_PROP_POS_AVI_RATIO: return double(getFramePos())/m_mjpeg_frames.size(); case CAP_PROP_FRAME_WIDTH: return (double)m_frame_width; case CAP_PROP_FRAME_HEIGHT: return (double)m_frame_height; case CAP_PROP_FPS: return m_fps; case CAP_PROP_FOURCC: return (double)CV_FOURCC('M','J','P','G'); case CAP_PROP_FRAME_COUNT: return (double)m_mjpeg_frames.size(); case CAP_PROP_FORMAT: return 0; default: return 0; } } std::vector<char> MotionJpegCapture::readFrame(frame_iterator it) { m_file_stream.seekg(it->first); RiffChunk chunk; m_file_stream >> chunk; std::vector<char> result; result.reserve(chunk.m_size); result.resize(chunk.m_size); m_file_stream.read(result.data(), chunk.m_size); return result; } bool MotionJpegCapture::grabFrame() { if(isOpened()) { if(m_is_first_frame) { m_is_first_frame = false; m_frame_iterator = m_mjpeg_frames.begin(); } else { ++m_frame_iterator; } } return m_frame_iterator != m_mjpeg_frames.end(); } bool MotionJpegCapture::retrieveFrame(int, OutputArray output_frame) { if(m_frame_iterator != m_mjpeg_frames.end()) { std::vector<char> data = readFrame(m_frame_iterator); if(data.size()) { m_current_frame = imdecode(data, CV_LOAD_IMAGE_ANYDEPTH | CV_LOAD_IMAGE_COLOR); } m_current_frame.copyTo(output_frame); return true; } return false; } MotionJpegCapture::~MotionJpegCapture() { close(); } MotionJpegCapture::MotionJpegCapture(const String& filename) { open(filename); } bool MotionJpegCapture::isOpened() const { return m_mjpeg_frames.size() > 0; } void MotionJpegCapture::close() { m_file_stream.close(); m_frame_iterator = m_mjpeg_frames.end(); } bool MotionJpegCapture::open(const String& filename) { close(); m_file_stream.open(filename); m_frame_iterator = m_mjpeg_frames.end(); m_is_first_frame = true; if(!parseRiff(m_file_stream)) { close(); } return isOpened(); } bool MotionJpegCapture::parseRiff(MjpegInputStream& in_str) { bool result = false; while(in_str) { RiffList riff_list; in_str >> riff_list; if( in_str && riff_list.m_riff_or_list_cc == RIFF_CC && ((riff_list.m_list_type_cc == AVI_CC) | (riff_list.m_list_type_cc == AVIX_CC)) ) { uint64_t next_riff = in_str.tellg(); //RiffList::m_size includes fourCC field which we have already read next_riff += (riff_list.m_size - 4); AviMjpegStream mjpeg_video_stream; bool is_parsed = mjpeg_video_stream.parseAvi(in_str, m_mjpeg_frames); result = result || is_parsed; if(is_parsed) { m_frame_width = mjpeg_video_stream.getWidth(); m_frame_height = mjpeg_video_stream.getHeight(); m_fps = mjpeg_video_stream.getFps(); } in_str.seekg(next_riff); } else { break; } } return result; } Ptr<IVideoCapture> createMotionJpegCapture(const String& filename) { Ptr<MotionJpegCapture> mjdecoder(new MotionJpegCapture(filename)); if( mjdecoder->isOpened() ) return mjdecoder; return Ptr<MotionJpegCapture>(); } }
BonexGu/Blik2D-SDK
Blik2D/addon/opencv-3.1.0_for_blik/modules/videoio/src/cap_mjpeg_decoder.cpp
C++
mit
26,763
<!DOCTYPE html> <html> <head> <title>{% if page.title %}{{ page.title }} – {% endif %}{{ site.name }} – {{ site.description }}</title> {% include meta.html %} <!--[if lt IE 9]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link rel="stylesheet" type="text/css" href="{{ site.baseurl }}/style.css" /> <link rel="alternate" type="application/rss+xml" title="{{ site.name }} - {{ site.description }}" href="{{ site.baseurl }}/feed.xml" /> <!-- Created with Jekyll Now - http://github.com/barryclark/jekyll-now --> </head> <body> <div class="wrapper-masthead"> <div class="container"> <header class="masthead clearfix"> <a href="{{ site.baseurl }}/" class="site-avatar"><img src="{{ site.avatar }}" /></a> <div class="site-info"> <h1 class="site-name"><a href="{{ site.baseurl }}/">{{ site.name }}</a></h1> <p class="site-description">{{ site.description }}</p> </div> <nav> <a href="{{ site.baseurl }}/">Blog</a> <a href="{{ site.baseurl }}/about">About</a> <!--<a href="{{ site.baseurl }}/markdown">Notes</a> need to figure this out later--> </nav> </header> </div> </div> <div id="main" role="main" class="container"> {{ content }} </div> <div class="wrapper-footer"> <div class="container"> <footer class="footer"> {% include svg-icons.html %} </footer> </div> </div> {% include analytics.html %} </body> </html>
stasisguy/Pixelartblog.github.io
_layouts/default.html
HTML
mit
1,623
package com.bookstore.controller.order; import com.bookstore.bean.Book; import com.bookstore.bean.Order; import com.bookstore.bean.OrderBook; import com.bookstore.bean.User; import com.bookstore.controller.user.BaseUserController; import com.bookstore.dao.BookDAO; import com.bookstore.dao.OrderBookDAO; import com.bookstore.dao.OrderDAO; import com.bookstore.dao.UserDAO; import com.bookstore.util.CartUtil; import com.bookstore.util.DbUtil; import com.bookstore.util.UserUtil; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Map; /** * Class CartController */ @WebServlet(urlPatterns="/orders/view/*") public class ViewController extends BaseOrderController { @Override protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { UserUtil userUtil = new UserUtil(request.getSession()); Order order = findResource(request); if (order == null) { forward404(request, response); return; } // Check permission if (!userUtil.isAdmin() && order.getUserId() != userUtil.getUser().getId()) { forward403(request, response); return; } OrderBookDAO orderBookDAO = DbUtil.getDAO(OrderBookDAO.class); BookDAO bookDAO = DbUtil.getDAO(BookDAO.class); UserDAO userDAO = DbUtil.getDAO(UserDAO.class); double orderAmount = 0d; // Set order books and book detail List<OrderBook> orderBookList = orderBookDAO.findAllByOrder(order.getId()); for (OrderBook book : orderBookList) { Book bookDetail; if ((bookDetail = bookDAO.find(book.getBookId())) != null) { book.setBook(bookDetail); } else { book.setBook(new Book(0, 0, "Removed Book", "", "", 0, 0, "", "")); } orderAmount += book.getCount() * book.getBook().getPrice(); } order.setBookList(orderBookList); User orderUser = userDAO.find(order.getUserId()); request.setAttribute("order", order); request.setAttribute("orderBookList", orderBookList); request.setAttribute("orderAmount", orderAmount); request.setAttribute("orderUser", orderUser); forward(request, response, "/orders/view.jsp"); } }
ComMouse/SE228-Answers
src/iteration2/src/com/bookstore/controller/order/ViewController.java
Java
mit
2,572
lychee.define('fertilizer.Main').requires([ 'lychee.Input', 'lychee.data.JSON', 'fertilizer.data.Filesystem', 'fertilizer.data.Shell', 'fertilizer.template.html.Application', 'fertilizer.template.html.Library', 'fertilizer.template.html-nwjs.Application', 'fertilizer.template.html-nwjs.Library', 'fertilizer.template.html-webview.Application', 'fertilizer.template.html-webview.Library', 'fertilizer.template.node.Application', 'fertilizer.template.node.Library' ]).includes([ 'lychee.event.Emitter' ]).exports(function(lychee, fertilizer, global, attachments) { var _lychee = lychee; var _path = require('path'); var _JSON = lychee.data.JSON; /* * FEATURE DETECTION */ var _defaults = { project: null, identifier: null, settings: null }; /* * IMPLEMENTATION */ var Class = function(settings) { this.settings = lychee.extendunlink({}, _defaults, settings); this.defaults = lychee.extendunlink({}, this.settings); lychee.event.Emitter.call(this); /* * INITIALIZATION */ var that = this; this.bind('load', function() { var identifier = this.settings.identifier || null; var project = this.settings.project || null; var data = this.settings.settings || null; if (identifier !== null && project !== null && data !== null) { var platform = data.tags.platform[0] || null; var variant = data.variant || null; var settings = _JSON.decode(_JSON.encode(lychee.extend({}, data, { debug: false, sandbox: true, type: 'export' }))); var profile = {}; if (settings.profile instanceof Object) { profile = settings.profile; } if (platform !== null && variant.match(/application|library/)) { if (settings.packages instanceof Array) { settings.packages = settings.packages.map(function(pkg) { var id = pkg[0]; var path = _path.resolve(project, pkg[1]); return [ id, path ]; }); } var that = this; var environment = new lychee.Environment(settings); _lychee.setEnvironment(environment); environment.debug = true; environment.init(function(sandbox) { if (sandbox !== null) { // IMPORTANT: Don't use Environment's imperative API here! // Environment identifier is /libraries/lychee/main instead of /libraries/lychee/html/main environment.id = project + '/' + identifier.split('/').pop(); environment.type = 'build'; environment.debug = that.defaults.settings.debug; environment.sandbox = that.defaults.settings.sandbox; _lychee.setEnvironment(null); that.trigger('init', [ project, identifier, platform, variant, environment, profile ]); } else { console.error('fertilizer: FAILURE ("' + project + ' | ' + identifier + '") at "load" event'); if (typeof environment.global.console.serialize === 'function') { var debug = environment.global.console.serialize(); if (debug.blob !== null) { (debug.blob.stderr || '').trim().split('\n').map(function(line) { return (line.indexOf(':') !== -1 ? line.split(':')[1].trim() : ''); }).forEach(function(line) { console.error('fertilizer: ' + line); }); } } that.destroy(); } }); return true; } } console.error('fertilizer: FAILURE ("' + project + ' | ' + identifier + '") at "load" event'); this.destroy(); return false; }, this, true); this.bind('init', function(project, identifier, platform, variant, environment, profile) { if (typeof fertilizer.template[platform] === 'object') { var construct = fertilizer.template[platform][variant.charAt(0).toUpperCase() + variant.substr(1).toLowerCase()] || null; if (construct !== null) { var template = new construct({ environment: environment, profile: profile, filesystem: new fertilizer.data.Filesystem(project + '/build/' + identifier), shell: new fertilizer.data.Shell(project + '/build/' + identifier) }); template.then('configure'); template.then('build'); template.then('package'); template.bind('complete', function() { console.info('fertilizer: SUCCESS ("' + project + ' | ' + identifier + '")'); this.destroy(); }, this); template.bind('error', function(event) { console.error('fertilizer: FAILURE ("' + project + ' | ' + identifier + '") at "' + event + '" event'); this.destroy(); }, this); template.init(); return true; } } console.error('fertilizer: FAILURE ("' + project + ' | ' + identifier + '") at "init" event'); this.destroy(); return false; }, this, true); }; Class.prototype = { /* * MAIN API */ init: function() { this.trigger('load', []); }, destroy: function() { this.trigger('destroy', []); } }; return Class; });
CodeKittey/lycheeJS
libraries/fertilizer/source/Main.js
JavaScript
mit
5,010
(function () { 'use strict'; angular .module('templateApp') .controller('Page2Detail', Page2Detail); Page2Detail.$inject = ['$routeParams', '$firebaseObject', 'FIREBASE_URL']; /* @ngInject */ function Page2Detail($routeParams, $firebaseObject, FIREBASE_URL) { /* jshint validthis: true */ var vm = this; vm.title = 'Meeting Detail'; var ref = new Firebase(FIREBASE_URL + '/users/' + $routeParams.uid + '/meetings/' + $routeParams.meetingId); vm.meeting = $firebaseObject(ref); vm.meeting.$loaded(function(){ vm.dateTime = new Date(vm.meeting.date); }); } })();
efarr/ng-ui-bootstrap-firebase
src/app/page2/Page2Detail.js
JavaScript
mit
673
package lineargo /* #include <stdlib.h> */ import "C" import "unsafe" func mapCDouble(in []float64) []C.double { out := make([]C.double, len(in), len(in)) for i, val := range in { out[i] = C.double(val) } return out } func mapCInt(in []int) []C.int { out := make([]C.int, len(in), len(in)) for i, val := range in { out[i] = C.int(val) } return out } // convert C double pointer to float64 slice ... func doubleToFloats(in *C.double, size int) []float64 { defer C.free(unsafe.Pointer(in)) outD := (*[1 << 30]C.double)(unsafe.Pointer(in))[:size:size] out := make([]float64, size, size) for i := 0; i < size; i++ { out[i] = float64(outD[i]) } return out }
lazywei/liblinear
utils.go
GO
mit
678
import Discover from 'node-discover'; import EventEmitter from 'events'; export default class Discovery extends EventEmitter { constructor(channel = 'handover') { super(); this.channel = channel; this.d = Discover(); this.d.join(this.channel, this.handleReceive.bind(this)); } stop() { this.d.leave(this.channel); this.d.stop(); } send(data) { this.d.send(this.channel, data); } handleReceive(data, obj) { this.emit('receive', { address: this.findNodeById(obj.iid).address, data: data, obj: obj }); } findNodeById(id) { var node; this.d.eachNode((n) => { if (n.id === id) { node = n; } }); return node; } }
bsingr/handover
src/Discovery.js
JavaScript
mit
722
N = int(input()) B = [int(x) for x in input().split()] A = [10**5] * N for i, b in enumerate(B): A[i] = min(A[i], b) A[i+1] = min(A[i+1], b) print(sum(A))
knuu/competitive-programming
atcoder/abc/abc140_c.py
Python
mit
163
# encoding: UTF-8 # This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # # Note that this schema.rb definition is the authoritative source for your # database schema. If you need to create the application database on another # system, you should be using db:schema:load, not running all the migrations # from scratch. The latter is a flawed and unsustainable approach (the more migrations # you'll amass, the slower it'll run and the greater likelihood for issues). # # It's strongly recommended that you check this file into your version control system. ActiveRecord::Schema.define(version: 20151221093754) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" create_table "comments", force: :cascade do |t| t.text "text" t.integer "author_id" t.integer "parent_id" t.string "parent_type" t.datetime "created_at", null: false t.datetime "updated_at", null: false end add_index "comments", ["author_id"], name: "index_comments_on_author_id", using: :btree add_index "comments", ["parent_id"], name: "index_comments_on_parent_id", using: :btree add_index "comments", ["parent_type", "parent_id"], name: "index_comments_on_parent_type_and_parent_id", using: :btree create_table "posts", force: :cascade do |t| t.text "body" t.string "header" t.integer "author_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false end add_index "posts", ["author_id"], name: "index_posts_on_author_id", using: :btree create_table "users", force: :cascade do |t| t.string "first_name" t.string "last_name" t.string "email" t.string "role" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.string "provider", default: "email", null: false t.string "uid", default: "", null: false t.string "encrypted_password", default: "", null: false t.json "tokens" end add_index "users", ["email"], name: "index_users_on_email", using: :btree add_index "users", ["uid", "provider"], name: "index_users_on_uid_and_provider", unique: true, using: :btree end
znvPredatoR/api-rails-pg
db/schema.rb
Ruby
mit
2,455
/** * keta 1.11.0 * Build 2021-04-21T15:24:16.331Z * * Copyright Kiwigrid GmbH 2014-2021 * http://kiwigrid.github.io/keta/ * * Licensed under MIT License * https://raw.githubusercontent.com/kiwigrid/keta/master/LICENSE */ "use strict";angular.module("keta.services.TagSet",["keta.services.Tag"]).provider("ketaTagSet",function(){this.$get=function(){var TagSetInstance=function(){var that=this,tags=[],tagsAsHierarchy={};that.getTags=function(){return tags},that.getTagsAsHierarchy=function(){return tagsAsHierarchy},that.add=function(tag){return angular.isDefined(tagsAsHierarchy[tag.getGuid()])&&angular.isDefined(tagsAsHierarchy[tag.getGuid()][tag.getName()])||(angular.isDefined(tagsAsHierarchy[tag.getGuid()])||(tagsAsHierarchy[tag.getGuid()]={}),tagsAsHierarchy[tag.getGuid()][tag.getName()]=tag,tags.push(tag)),that},that.remove=function(tag){return angular.isDefined(tagsAsHierarchy[tag.getGuid()][tag.getName()])&&(delete tagsAsHierarchy[tag.getGuid()][tag.getName()],0===Object.keys(tagsAsHierarchy[tag.getGuid()]).length&&delete tagsAsHierarchy[tag.getGuid()],tags.splice(tags.indexOf(tag),1)),that}};return{create:function(){return new TagSetInstance}}}}); //# sourceMappingURL=tag-set.min.js.map
kiwigrid/keta
services/tag-set.min.js
JavaScript
mit
1,217
package com.onemightyroar.campfire.api.models; import java.io.Serializable; import java.util.Date; import org.json.JSONObject; import com.onemightyroar.campfire.api.utils.ToStringBuilder; public class Account implements Serializable { private static final long serialVersionUID = 1L; private Long id; private String name; private String subdomain; private String plan; private Long ownerId; private String timezone; private Integer storage; private Date createdAt; private Date updatedAt; private JSONObject json; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getSubdomain() { return subdomain; } public void setSubdomain(String subdomain) { this.subdomain = subdomain; } public String getPlan() { return plan; } public void setPlan(String plan) { this.plan = plan; } public Long getOwnerId() { return ownerId; } public void setOwnerId(Long ownerId) { this.ownerId = ownerId; } public String getTimezone() { return timezone; } public void setTimezone(String timezone) { this.timezone = timezone; } public Integer getStorage() { return storage; } public void setStorage(Integer storage) { this.storage = storage; } public Date getCreatedAt() { return createdAt; } public void setCreatedAt(Date createdAt) { this.createdAt = createdAt; } public Date getUpdatedAt() { return updatedAt; } public void setUpdatedAt(Date updatedAt) { this.updatedAt = updatedAt; } public void setJSON(JSONObject json){ this.json = json; } public JSONObject getJSON(){ return json; } @Override public String toString() { return new ToStringBuilder(this) .append("id",getId()) .append("ownerId",getOwnerId()) .append("planId",getPlan()) .append("name",getName()) .append("thirdLevelDomain",getSubdomain()) .append("timeZone",getTimezone()) .append("suspended",getStorage()) .append("createdAt",getCreatedAt()) .append("updatedAt",getUpdatedAt()) .toString(); } }
onemightyroar/campfire-api
src/com/onemightyroar/campfire/api/models/Account.java
Java
mit
2,161
import {NotFound} from '.' import {shallowRender} from '../../utils/testUtils' import {expect} from 'chai' import {findWithType, findAllWithType} from 'react-shallow-testutils' describe('frontend not found view', () => { it('renders not found', () => { const component = shallowRender(NotFound, { className: 'MyComponent' }) expect(findWithType(component, 'h1').props.children).to.equal('Not found') }) })
rkovacevic/hapijs-starter
frontend/views/notFound/index.spec.js
JavaScript
mit
433
<?php return array( 'number.decimals_separator' => ',', 'number.thousands_separator' => ' ', 'None' => 'Cap', 'Edit' => 'Edita', 'Remove' => 'Elimina', 'Yes' => 'Si', 'No' => 'No', 'cancel' => 'cancel·la', 'or' => 'o', 'Yellow' => 'Groc', 'Blue' => 'Blau', 'Green' => 'Verd', 'Purple' => 'Lil·la', 'Red' => 'Vermell', 'Orange' => 'Taronja', 'Grey' => 'Gris', 'Brown' => 'Marró', 'Deep Orange' => 'Taronja fosc', 'Dark Grey' => 'Gris fosc', 'Pink' => 'Rosa', 'Teal' => 'Turquessa', 'Cyan' => 'Cian', 'Lime' => 'Lima', 'Light Green' => 'Verd clar', 'Amber' => 'Ambre', 'Save' => 'Desa', 'Login' => 'Inicia la sessió', 'Official website:' => 'Pàgina web oficial:', 'Unassigned' => 'Sense assignar', 'View this task' => 'Veure aquesta tasca', 'Remove user' => 'Eliminar usuari', 'Do you really want to remove this user: "%s"?' => 'Vols eliminar aquest usuari: "%s"?', 'All users' => 'Tots els usuaris', 'Username' => 'Nom d\'usuari', 'Password' => 'Contrasenya', 'Administrator' => 'Administrador', 'Sign in' => 'Accedeix', 'Users' => 'Usuaris', 'Forbidden' => 'Prohibit', 'Access Forbidden' => 'Accés prohibit', 'Edit user' => 'Edita usuaris', 'Logout' => 'Tanca sessió', 'Bad username or password' => 'Usuari o contrasenya no existeix', 'Edit project' => 'Edita el projecte', 'Name' => 'Nom', 'Projects' => 'Projectes', 'No project' => 'Cap projecte', 'Project' => 'Projecte', 'Status' => 'Estat', 'Tasks' => 'Tasques', 'Board' => 'Tauler', 'Actions' => 'Accions', 'Inactive' => 'Inactiu', 'Active' => 'Actiu', 'Unable to update this board.' => 'No es pot actualitzar aquest tauler.', 'Disable' => 'Desactivar', 'Enable' => 'Habilita', 'New project' => 'Nou projecte', 'Do you really want to remove this project: "%s"?' => 'Vols eliminar aquest projecte: "%s"?', 'Remove project' => 'Elimina projecte', 'Edit the board for "%s"' => 'Edita el tauler de "%s"', 'Add a new column' => 'Afegeix una nova columna', 'Title' => 'Títol', 'Assigned to %s' => 'Assignat a %s', 'Remove a column' => 'Eliminar una columna', 'Unable to remove this column.' => 'No es pot eliminar aquesta columna.', 'Do you really want to remove this column: "%s"?' => 'Vols eliminar aquesta columna: "%s"?', 'Settings' => 'Configuració', 'Application settings' => 'Configuració de l\'aplicació', 'Language' => 'Idioma', 'Webhook token:' => 'Web hook token:', 'API token:' => 'Token de l\'API:', 'Database size:' => 'Mida de la base de dades:', 'Download the database' => 'Descarregar la base de dades', 'Optimize the database' => 'Optimitzar la base de dades', '(VACUUM command)' => '(Comanda VACUUM)', '(Gzip compressed Sqlite file)' => '(Arxiu comprimit gzip SQLite)', 'Close a task' => 'Tancar una tasca', 'Column' => 'Columna', 'Color' => 'Color', 'Assignee' => 'Assignat a', 'Create another task' => 'Crear una altra tasca', 'New task' => 'Nova tasca', 'Open a task' => 'Obrir una tasca', 'Do you really want to open this task: "%s"?' => 'Vols obrir aquesta tasca: "%s"?', 'Back to the board' => 'Torna al tauler', 'There is nobody assigned' => 'No hi ha ningú assignat', 'Column on the board:' => 'Columna al tauler:', 'Close this task' => 'Tanca aquesta tasca', 'Open this task' => 'Obre aquesta tasca', 'There is no description.' => 'No hi ha cap descripció.', 'Add a new task' => 'Afegeix una nova tasca', 'The username is required' => 'Es requereix el nom d\'usuari', 'The maximum length is %d characters' => 'La longitud màxima és de %d caràcters', 'The minimum length is %d characters' => 'La longitud mínima és %d caràcters', 'The password is required' => 'La contrasenya és necessària', 'This value must be an integer' => 'Aquest valor ha de ser un nombre enter', 'The username must be unique' => 'El nom d\'usuari ha de ser únic', 'The user id is required' => 'Es requereix que l\'ID d\'usuari', 'Passwords don\'t match' => 'Les contrasenyes no coincideixen', 'The confirmation is required' => 'Es requereix la confirmació', 'The project is required' => 'Es requereix el projecte', 'The id is required' => 'Es requereix que l\'ID', 'The project id is required' => 'Es requereix que l\'identificador del projecte', 'The project name is required' => 'Es requereix el nom del projecte', 'The title is required' => 'Es requereix el títol', 'Settings saved successfully.' => 'La configuració es va guardar amb èxit.', 'Unable to save your settings.' => 'No es pot desar la configuració.', 'Database optimization done.' => 'Optimització de bases de dades realitza.', 'Your project has been created successfully.' => 'El seu projecte s\'han creat amb èxit.', 'Unable to create your project.' => 'No es pot crear el projecte.', 'Project updated successfully.' => 'Projecte actualitzat correctament.', 'Unable to update this project.' => 'No es pot actualitzar aquest projecte.', 'Unable to remove this project.' => 'No es pot eliminar aquest projecte.', 'Project removed successfully.' => 'Projecte eliminat correctament.', 'Project activated successfully.' => 'Projecte activat correctament.', 'Unable to activate this project.' => 'No es pot activar aquest projecte.', 'Project disabled successfully.' => 'Projecte deshabilitat amb èxit.', 'Unable to disable this project.' => 'No és possible desactivar aquest projecte.', 'Unable to open this task.' => 'No es pot obrir aquesta tasca.', 'Task opened successfully.' => 'Tasca oberta amb èxit.', 'Unable to close this task.' => 'No es pot tancar aquesta tasca.', 'Task closed successfully.' => 'Tasca tancada amb èxit.', 'Unable to update your task.' => 'No es pot actualitzar la seva tasca.', 'Task updated successfully.' => 'Tasca actualitzada correctament.', 'Unable to create your task.' => 'No es pot crear la tasca.', 'Task created successfully.' => 'Tasca creada correctament.', 'User created successfully.' => 'L\'usuari ha creat correctament.', 'Unable to create your user.' => 'No es pot crear l\'usuari.', 'User updated successfully.' => 'Usuari actualitzat correctament.', 'User removed successfully.' => 'Usuari eliminat correctament.', 'Unable to remove this user.' => 'No es pot eliminar aquest usuari.', 'Board updated successfully.' => 'Tauler actualitzat correctament.', 'Ready' => 'Preparat', 'Backlog' => 'Pendent', 'Work in progress' => 'En curs', 'Done' => 'Fet', 'Application version:' => 'Versió de l\'aplicació:', 'Id' => 'Identificació', 'Public link' => 'Enllaç públic', 'Timezone' => 'Zona horària', 'Sorry, I didn\'t find this information in my database!' => 'No s\'ha trobat la informació a la base de dades!', 'Page not found' => 'Pàgina no trobada', 'Complexity' => 'Dificultat', 'Task limit' => 'Límit de tasques', 'Task count' => 'Recompte de tasques', 'User' => 'Usuari', 'Comments' => 'Comentaris', 'Comment is required' => 'Es requereix comentari', 'Comment added successfully.' => 'Comentari afegit amb èxit.', 'Unable to create your comment.' => 'No es pot crear el seu comentari.', 'Due Date' => 'Data de venciment', 'Invalid date' => 'Data no vàlida', 'Automatic actions' => 'Accions automàtiques', 'Your automatic action has been created successfully.' => 'La seva acció automàtica s\'han creat amb èxit.', 'Unable to create your automatic action.' => 'No es pot crear la seva acció automàtica.', 'Remove an action' => 'Eliminar una acció', 'Unable to remove this action.' => 'No es pot eliminar aquesta acció.', 'Action removed successfully.' => 'Acció eliminat correctament.', 'Automatic actions for the project "%s"' => 'Accions automàtiques per al projecte "%s"', 'Add an action' => 'Afegeix una acció', 'Event name' => 'Nom de l\'esdeveniment', 'Action' => 'Acció', 'Event' => 'Esdeveniment', 'When the selected event occurs execute the corresponding action.' => 'Quan es produeix l\'esdeveniment seleccionat executar l\'acció corresponent.', 'Next step' => 'Següent pas', 'Define action parameters' => 'Definir paràmetres d\'acció', 'Do you really want to remove this action: "%s"?' => 'Vols eliminar aquesta acció: "%s"?', 'Remove an automatic action' => 'Eliminar una acció automàtica', 'Assign the task to a specific user' => 'Assignar la tasca a un usuari específic', 'Assign the task to the person who does the action' => 'Assignar la tasca a la persona que fa l\'acció', 'Duplicate the task to another project' => 'Duplica la tasca a un altre projecte', 'Move a task to another column' => 'Mou una tasca a una altra columna', 'Task modification' => 'Modificació de tasques', 'Task creation' => 'Creació de tasques', 'Closing a task' => 'El tancament d\'una tasca', 'Assign a color to a specific user' => 'Assignar un color a un usuari específic', 'Position' => 'Posició', 'Duplicate to another project' => 'Duplica a un altre projecte', 'Duplicate' => 'Duplica', 'Link' => 'Enllaç', 'Comment updated successfully.' => 'Comentari actualitzat correctament.', 'Unable to update your comment.' => 'No es pot actualitzar el seu comentari.', 'Remove a comment' => 'Retirar un comentari', 'Comment removed successfully.' => 'Comentari eliminat correctament.', 'Unable to remove this comment.' => 'No es pot eliminar aquest comentari.', 'Do you really want to remove this comment?' => 'Vols eliminar aquest comentari?', 'Current password for the user "%s"' => 'Contrasenya actual per a l\'usuari "%s"', 'The current password is required' => 'Es requereix la contrasenya actual', 'Wrong password' => 'Contrasenya incorrecta', 'Unknown' => 'Desconegut', 'Last logins' => 'Últims inicis de sessió', 'Login date' => 'Data d\'inici de sessió', 'Authentication method' => 'Mètode d\'autenticació', 'IP address' => 'Adreça IP', 'User agent' => 'Agent d\'usuari', 'Persistent connections' => 'Les connexions persistents', 'No session.' => 'Cap sessió.', 'Expiration date' => 'Data de caducitat', 'Remember Me' => 'Recorda\'m', 'Creation date' => 'Data de creació', 'Everybody' => 'Tothom', 'Open' => 'Obert', 'Closed' => 'Tancat', 'Search' => 'Cerca', 'Nothing found.' => 'No s\'ha trobat res.', 'Due date' => 'Data de venciment', 'Description' => 'Descripció', '%d comments' => '%d comentaris', '%d comment' => '%d comentari', 'Email address invalid' => 'Adreça de correu electrònic no vàlida', 'Your external account is not linked anymore to your profile.' => 'El seu compte extern no està vinculada més al seu perfil.', 'Unable to unlink your external account.' => 'No és possible desvincular el compte extern.', 'External authentication failed' => 'L\'autenticació externa va fallar', 'Your external account is linked to your profile successfully.' => 'El seu compte extern està vinculada al seu perfil correctament.', 'Email' => 'E-mail', 'Task removed successfully.' => 'Tasca eliminat correctament.', 'Unable to remove this task.' => 'No es pot eliminar aquesta tasca.', 'Remove a task' => 'Treure una tasca', 'Do you really want to remove this task: "%s"?' => 'Vols eliminar aquesta tasca: "%s"?', 'Assign automatically a color based on a category' => 'Assignar automàticament un color basat en una categoria', 'Assign automatically a category based on a color' => 'Assignar automàticament una categoria basada en un color', 'Task creation or modification' => 'Creació o modificació de tasques', 'Category' => 'Categoria', 'Category:' => 'Categoria:', 'Categories' => 'Categories', 'Your category has been created successfully.' => 'La seva categoria s\'han creat amb èxit.', 'This category has been updated successfully.' => 'Aquesta categoria s\'ha actualitzat correctament.', 'Unable to update this category.' => 'No es pot actualitzar aquesta categoria.', 'Remove a category' => 'Eliminar una categoria', 'Category removed successfully.' => 'Categoria eliminat correctament.', 'Unable to remove this category.' => 'No es pot eliminar aquesta categoria.', 'Category modification for the project "%s"' => 'Modificació de la categoria pel projecte "%s"', 'Category Name' => 'Nom de categoria', 'Add a new category' => 'Afegeix una nova categoria', 'Do you really want to remove this category: "%s"?' => 'Vols eliminar aquesta categoria: "%s"?', 'All categories' => 'Totes les categories', 'No category' => 'sense categoria', 'The name is required' => 'Es requereix el nom', 'Remove a file' => 'Suprimir un fitxer', 'Unable to remove this file.' => 'No es pot eliminar aquest arxiu.', 'File removed successfully.' => 'Arxiu eliminat amb èxit.', 'Attach a document' => 'Adjunta un document', 'Do you really want to remove this file: "%s"?' => 'Vols eliminar aquesta imatge: "%s"?', 'Attachments' => 'Adjunts', 'Edit the task' => 'Edita la tasca', 'Add a comment' => 'Afegeix un comentari', 'Edit a comment' => 'Edita un comentari', 'Summary' => 'Resum', 'Time tracking' => 'Control d\'hores', 'Estimate:' => 'Estimació:', 'Spent:' => 'Utilitzat:', 'Do you really want to remove this sub-task?' => 'Realment voleu eliminar aquesta sub-tasca?', 'Remaining:' => 'Restant:', 'hours' => 'hores', 'estimated' => 'estimat', 'Sub-Tasks' => 'Subtasques', 'Add a sub-task' => 'Afegeix una subtasca', 'Original estimate' => 'Estimació original', 'Create another sub-task' => 'Crear una altra subtasca', 'Time spent' => 'El temps dedicat', 'Edit a sub-task' => 'Editar una subtasca', 'Remove a sub-task' => 'Suprimir una subtasca', 'The time must be a numeric value' => 'El temps ha de ser un valor numèric', 'Todo' => 'Fer', 'In progress' => 'En progrés', 'Sub-task removed successfully.' => 'Subtasca eliminat correctament.', 'Unable to remove this sub-task.' => 'No es pot eliminar aquesta sub-tasques.', 'Sub-task updated successfully.' => 'Subtasca actualitzat correctament.', 'Unable to update your sub-task.' => 'No es pot actualitzar el seu sub-tasques.', 'Unable to create your sub-task.' => 'No es pot crear el sub-tasques.', 'Maximum size: ' => 'Mida màxima: ', 'Display another project' => 'Mostra un altre projecte', 'Created by %s' => 'Creat per %s', 'Tasks Export' => 'Exportació de tasques', 'Start Date' => 'Data d\'inici', 'Execute' => 'Executar', 'Task Id' => 'ID de tasca', 'Creator' => 'Creador', 'Modification date' => 'Data de modificació', 'Completion date' => 'Data de finalització', 'Clone' => 'Clon', 'Project cloned successfully.' => 'Projecte clonat amb èxit.', 'Unable to clone this project.' => 'No és possible clonar aquest projecte.', 'Enable email notifications' => 'Activa notificacions per correu electrònic', 'Task position:' => 'Posició de la tasca:', 'The task #%d has been opened.' => 'La tasca #%d s\'ha obert.', 'The task #%d has been closed.' => 'La tasca #%d s\'ha tancat.', 'Sub-task updated' => 'Subtasca actualitza', 'Title:' => 'Títol:', 'Status:' => 'Estat:', 'Assignee:' => 'Assignat a:', 'Time tracking:' => 'Control d\'hores:', 'New sub-task' => 'Nova subtasca', 'New attachment added "%s"' => 'Nou adjunt afegit "%s"', 'New comment posted by %s' => 'Nou comentari Publicat per %s', 'New comment' => 'Nou comentari', 'Comment updated' => 'Comentari actualitzat', 'New subtask' => 'Nova subtasca', 'I only want to receive notifications for these projects:' => 'Vull rebre notificacions només per a aquells projectes:', 'view the task on Kanboard' => 'Veure la tasca en Kanboard', 'Public access' => 'Accés públic', 'Disable public access' => 'Deshabilitar l\'accés del públic', 'Enable public access' => 'Permetre l\'accés del públic', 'Public access disabled' => 'L\'accés públic deshabilitat', 'Move the task to another project' => 'Mou la tasca a un altre projecte', 'Move to another project' => 'Mou a un altre projecte', 'Do you really want to duplicate this task?' => 'És el que realment desitja duplicar aquesta tasca?', 'Duplicate a task' => 'Duplica una tasca', 'External accounts' => 'Els comptes externes', 'Account type' => 'Tipus de compte', 'Local' => 'Local', 'Remote' => 'Remot', 'Enabled' => 'Habilitat', 'Disabled' => 'Inhabilitat', 'Login:' => 'Iniciar Sessió:', 'Full Name:' => 'Nom complet:', 'Email:' => 'E-mail:', 'Notifications:' => 'Notificacions:', 'Notifications' => 'Notificacions', 'Account type:' => 'Tipus de compte:', 'Edit profile' => 'Editar el perfil', 'Change password' => 'Canvia la contrasenya', 'Password modification' => 'Modificació de la contrasenya', 'External authentications' => 'Autenticacions externes', 'Never connected.' => 'Mai connectada.', 'No external authentication enabled.' => 'No s\'habilita l\'autenticació externa.', 'Password modified successfully.' => 'Contrasenya modificat correctament.', 'Unable to change the password.' => 'No es pot canviar la contrasenya.', 'Change category' => 'Canvia la categoria', '%s updated the task %s' => '%s ha actualitzat la tasca %s', '%s opened the task %s' => '%s ha obert la tasca %s', '%s moved the task %s to the position #%d in the column "%s"' => '%s ha mogut la tasca %s a la posició #%d de la columna "%s"', '%s moved the task %s to the column "%s"' => '%s ha mogut la tasca %s a la columna "%s"', '%s created the task %s' => '%s creat la tasca %s', '%s closed the task %s' => '%s tancada la tasca %s', '%s created a subtask for the task %s' => '%s creat una subtasca de la tasca %s', '%s updated a subtask for the task %s' => '%s actualitzada una subtasca de la tasca %s', 'Assigned to %s with an estimate of %s/%sh' => 'Assignat a %s amb un temps estimat de %s/%sh', 'Not assigned, estimate of %sh' => 'No assignat, estimat de %sh', '%s updated a comment on the task %s' => '%s ha actualitzat un comentari a la tasca %s', '%s commented the task %s' => '%s ha comentat la tasca %s', '%s\'s activity' => 'L\'activitat de %s', 'RSS feed' => 'RSS feed', '%s updated a comment on the task #%d' => '%s s\'actualitzen un comentari a la tasca #%d', '%s commented on the task #%d' => '%s comentat a la tasca #%d', '%s updated a subtask for the task #%d' => '%s s\'actualitzen un subtasca de la tasca #%d', '%s created a subtask for the task #%d' => '%s creat una subtasca de la tasca #%d', '%s updated the task #%d' => '%s actualitzada la tasca #%d', '%s created the task #%d' => '%s creat la tasca #%d', '%s closed the task #%d' => '%s van tancar la tasca #%d', '%s opened the task #%d' => '%s va obrir la tasca #%d', 'Activity' => 'Activitat', 'Default values are "%s"' => 'Els valors per defecte son "%s"', 'Default columns for new projects (Comma-separated)' => 'Columnes predeterminades per a nous projectes (separats per comes)', 'Task assignee change' => 'Tasca de canvi del assignat', '%s changed the assignee of the task #%d to %s' => '%s va canviar el assignat de la tasca #%d de %s', '%s changed the assignee of the task %s to %s' => '%s va canviar el assignat de la tasca %s %s', 'New password for the user "%s"' => 'Nova contrasenya per a l\'usuari "%s"', 'Choose an event' => 'Tria un esdeveniment', 'Create a task from an external provider' => 'Crear una tasca d\'un proveïdor extern', 'Change the assignee based on an external username' => 'Canviar el assignat basat en un nom d\'usuari extern', 'Change the category based on an external label' => 'Canviar la categoria en funció d\'una etiqueta externa', 'Reference' => 'Referència', 'Label' => 'Etiqueta', 'Database' => 'Base de dades', 'About' => 'Quant a', 'Database driver:' => 'Controlador de base de dades:', 'Board settings' => 'Paràmetres del tauler', 'Webhook settings' => 'Configuració web hook', 'Reset token' => 'Reinicia el token', 'API endpoint:' => 'API de punt final:', 'Refresh interval for personal board' => 'Interval d\'actualització per al tauler privada', 'Refresh interval for public board' => 'Interval d\'actualització per al tauler pública', 'Task highlight period' => 'Període culminant de tasques', 'Period (in second) to consider a task was modified recently (0 to disable, 2 days by default)' => 'Període (en segons) per considerar una tasca es va modificar recentment (0 per desactivar, 2 dies de defecte)', 'Frequency in second (60 seconds by default)' => 'Freqüència en segons (60 segons per defecte)', 'Frequency in second (0 to disable this feature, 10 seconds by default)' => 'Freqüència en segons (0 per desactivar aquesta característica, 10 segons per defecte)', 'Application URL' => 'URL de l\'aplicació', 'Token regenerated.' => 'Token regenerat.', 'Date format' => 'Format de dates', 'ISO format is always accepted, example: "%s" and "%s"' => 'Sempre s\'accepta el format ISO, exemple "%s" i "%s"', 'New personal project' => 'Nou projecte privat', 'This project is personal' => 'Aquest projecte és privat', 'Add' => 'Afegeix', 'Start date' => 'Data d\'inici', 'Time estimated' => 'Temps estimat', 'There is nothing assigned to you.' => 'No tens res assignat.', 'My tasks' => 'Les meves tasques', 'Activity stream' => 'Fluxe d\'activitat', 'Dashboard' => 'Panell', 'Confirmation' => 'Confirmació', 'Webhooks' => 'WebHooks', 'API' => 'API', 'Create a comment from an external provider' => 'Crear un comentari d\'un proveïdor extern', 'Project management' => 'Gestió de projectes', 'Columns' => 'Columnes', 'Task' => 'Tasca', 'Percentage' => 'Percentatge', 'Number of tasks' => 'Nombre de tasques', 'Task distribution' => 'Distribució de tasques', 'Analytics' => 'Analítica', 'Subtask' => 'Subtasca', 'User repartition' => 'Repartiment d\'usuari', 'Clone this project' => 'Clonar aquest projecte', 'Column removed successfully.' => 'Columna eliminat correctament.', 'Not enough data to show the graph.' => 'No hi ha dades suficients per mostrar el gràfic.', 'Previous' => 'Anterior', 'The id must be an integer' => 'L\'identificador ha de ser un nombre enter', 'The project id must be an integer' => 'L\'identificador de projecte ha de ser un enter', 'The status must be an integer' => 'L\'estat ha de ser un enter', 'The subtask id is required' => 'Es requereix que l\'ID subtasca', 'The subtask id must be an integer' => 'L\'identificador de subtasca ha de ser un enter', 'The task id is required' => 'Es requereix que l\'ID de tasca', 'The task id must be an integer' => 'L\'identificador de tasca ha de ser un enter', 'The user id must be an integer' => 'L\'identificador d\'usuari ha de ser un nombre enter', 'This value is required' => 'Aquest valor és necessari', 'This value must be numeric' => 'Aquest valor ha de ser numèric', 'Unable to create this task.' => 'No es pot crear aquesta tasca.', 'Cumulative flow diagram' => 'Diagrama de flux acumulat', 'Daily project summary' => 'Resum diari projecte', 'Daily project summary export' => 'Exportació del resum diari del projecte', 'Exports' => 'Exportacions', 'This export contains the number of tasks per column grouped per day.' => 'Aquesta exportació conté el nombre de tasques per columna agrupada per dia.', 'Active swimlanes' => 'Swimlanes actius', 'Add a new swimlane' => 'Afegeix un nou swimlane', 'Default swimlane' => 'Swimlane per defecte', 'Do you really want to remove this swimlane: "%s"?' => 'Segur que vols eliminar la swimlane: "%s"', 'Inactive swimlanes' => 'Swimlanes inactius', 'Remove a swimlane' => 'Traieu un carril', 'Swimlane modification for the project "%s"' => 'Modificació del swimlane pel projecte "%s"', 'Swimlane removed successfully.' => 'Swimlane eliminat correctament.', 'Swimlanes' => 'Swimlanes', 'Swimlane updated successfully.' => 'Swimlane actualitzat correctament.', 'Unable to remove this swimlane.' => 'No es pot eliminar aquest swimlane.', 'Unable to update this swimlane.' => 'No es pot actualitzar aquest swimlane.', 'Your swimlane has been created successfully.' => 'La seva swimlane s\'han creat amb èxit.', 'Example: "Bug, Feature Request, Improvement"' => 'Exemple: "Bug, Comanda de funcions, Millora"', 'Default categories for new projects (Comma-separated)' => 'Categories per defecte per a nous projectes (separats per comes)', 'Integrations' => 'Integracions', 'Integration with third-party services' => 'Integració amb els serveis de tercers', 'Subtask Id' => 'ID de subtasca', 'Subtasks' => 'Subtasques', 'Subtasks Export' => 'Exportació de subtasques', 'Task Title' => 'Títol de la tasca', 'Untitled' => 'Sense títol', 'Application default' => 'Per defecte de l\'aplicació', 'Language:' => 'Llengua:', 'Timezone:' => 'Zona horària:', 'All columns' => 'Totes les columnes', 'Next' => 'Pròxim', '#%d' => '#%d', 'All swimlanes' => 'Tots swimlanes', 'All colors' => 'Tots els colors', 'Moved to column %s' => 'Traslladat a la columna %s', 'User dashboard' => 'Tauler d\'usuari', 'Allow only one subtask in progress at the same time for a user' => 'Permetre només una subtasca en curs al mateix temps per a un usuari', 'Edit column "%s"' => 'Modifica la columna "%s"', 'Select the new status of the subtask: "%s"' => 'Sel·lecciona el nou estat per la subtasca: "%s"', 'Subtask timesheet' => 'Part d\'hores de subtasca', 'There is nothing to show.' => 'Res per mostrar.', 'Time Tracking' => 'Control d\'hores', 'You already have one subtask in progress' => 'Ja tens una subtasca en curs', 'Which parts of the project do you want to duplicate?' => 'Quines parts del projecte vols duplicar?', 'Disallow login form' => 'No permetre formulari d\'accés', 'Start' => 'Començar', 'End' => 'Final', 'Task age in days' => 'L\'edat de tasques en dies', 'Days in this column' => 'Dies en aquesta columna', '%dd' => '%dd', 'Add a new link' => 'Afegeix un nou enllaç', 'Do you really want to remove this link: "%s"?' => 'Segur que vols eliminar aquest enllaç: "%s"?', 'Do you really want to remove this link with task #%d?' => 'Segur que vols eliminar aquest enllaç amb la tasca #%d?', 'Field required' => 'Camp requerit', 'Link added successfully.' => 'Enllaç afegit correctament.', 'Link updated successfully.' => 'Enllaç actualitzat correctament.', 'Link removed successfully.' => 'Enllaç eliminat amb èxit.', 'Link labels' => 'Etiquetes d\'enllaç', 'Link modification' => 'Modificació d\'enllaç', 'Opposite label' => 'Etiqueta oposada', 'Remove a link' => 'Suprimir un enllaç', 'The labels must be different' => 'Les etiquetes han de ser diferents', 'There is no link.' => 'No hi ha cap relació.', 'This label must be unique' => 'Aquest avís ha de ser únic', 'Unable to create your link.' => 'No es pot crear l\'enllaç.', 'Unable to update your link.' => 'No es pot actualitzar el seu enllaç.', 'Unable to remove this link.' => 'No es pot eliminar aquest enllaç.', 'relates to' => 'es refereix a', 'blocks' => 'bloqueja', 'is blocked by' => 'està bloquejada per', 'duplicates' => 'duplica', 'is duplicated by' => 'es duplica per', 'is a child of' => 'és fill de', 'is a parent of' => 'és pare de', 'targets milestone' => 'objectiu de la fita', 'is a milestone of' => 'és una fita de', 'fixes' => 'corregeix', 'is fixed by' => 'corregit per', 'This task' => 'Aquesta tasca', '<1h' => '<1h', // '%dh' => '', 'Expand tasks' => 'Amplia les tasques', 'Collapse tasks' => 'Col·lapsa les tasques', 'Expand/collapse tasks' => 'Amplia les tasques / col·lapsa', 'Close dialog box' => 'Quadre de diàleg tancar', 'Submit a form' => 'Envia un formulari', 'Board view' => 'Mostra el tauler', 'Keyboard shortcuts' => 'Dreceres de teclat', 'Open board switcher' => 'Obre commutador de tauler', 'Application' => 'Aplicació', 'Compact view' => 'Vista compacta', 'Horizontal scrolling' => 'Desplaçament horitzontal', 'Compact/wide view' => 'Vista compacta / ample', 'Currency' => 'Moneda', 'Personal project' => 'Projecte privat', 'AUD - Australian Dollar' => 'MXN - Dòlar australià', 'CAD - Canadian Dollar' => 'CAD - Dòlar canadenc', 'CHF - Swiss Francs' => 'CHF - Franc suís', 'Custom Stylesheet' => 'Estil personalitzat', 'EUR - Euro' => 'EUR - Euro', 'GBP - British Pound' => 'GBP - Lliura britànica', 'INR - Indian Rupee' => 'INR - Rupia índia', 'JPY - Japanese Yen' => 'JPY - El ien japonès', 'NZD - New Zealand Dollar' => 'NZD - Dòlar de Nova Zelanda', 'RSD - Serbian dinar' => 'RSD - Dinar serbi', 'CNY - Chinese Yuan' => 'CNY - Yuan xinès', 'USD - US Dollar' => 'USD - El dòlar dels EUA', // 'VES - Venezuelan Bolívar' => '', 'Destination column' => 'Columna de destinació', 'Move the task to another column when assigned to a user' => 'Mou la tasca a una altra columna quan s\'assigna a un usuari', 'Move the task to another column when assignee is cleared' => 'Mou la tasca a una altra columna quan s\'esborra assignat', 'Source column' => 'Columna d\'origen', 'Transitions' => 'Transicions', 'Executer' => 'Executor', 'Time spent in the column' => 'El temps emprat a la columna', 'Task transitions' => 'transicions de tasques', 'Task transitions export' => 'Tasca transicions d\'exportació', 'This report contains all column moves for each task with the date, the user and the time spent for each transition.' => 'Aquest informe conté tots els moviments de columna per a cada tasca amb la data, l\'usuari i el temps per a cada transició.', 'Currency rates' => 'Monedes', 'Rate' => 'Preu', 'Change reference currency' => 'Moneda de canvi de referència', 'Reference currency' => 'Moneda de referència', 'The currency rate has been added successfully.' => 'El tipus de canvi s\'ha afegit amb èxit.', 'Unable to add this currency rate.' => 'No es pot afegeix aquest tipus de moneda.', 'Webhook URL' => 'URL web hook', '%s removed the assignee of the task %s' => '%s ha eliminat l\'assignat de la tasca %s', 'Information' => 'Informació', 'Check two factor authentication code' => 'Comprovar el codi d\'autenticació de dos factors', 'The two factor authentication code is not valid.' => 'El codi d\'autenticació de dos factors no és vàlid.', 'The two factor authentication code is valid.' => 'El codi d\'autenticació de dos factors és vàlid.', 'Code' => 'Codi', 'Two factor authentication' => 'Autenticació de dos factors', // 'This QR code contains the key URI: ' => '', 'Check my code' => 'Comprovar el meu codi', // 'Secret key: ' => '', 'Test your device' => 'Prova el teu dispositiu', 'Assign a color when the task is moved to a specific column' => 'Assignar un color quan la tasca es mou a una columna específica', '%s via Kanboard' => '%s a través del Kanboard', 'Burndown chart' => 'Burndown chart', 'This chart show the task complexity over the time (Work Remaining).' => 'Aquesta gràfica mostra la dificultat de la tasca en el temps (Treball restant).', 'Screenshot taken %s' => 'Imatge presa %s', 'Add a screenshot' => 'Afegeix una captura de pantalla', 'Take a screenshot and press CTRL+V or ⌘+V to paste here.' => 'Prengui una captura de pantalla i premeu CTRL + V o ⌘ + V per enganxar aquí.', 'Screenshot uploaded successfully.' => 'Captura carregat correctament.', 'SEK - Swedish Krona' => 'SEK - Corona sueca', 'Identifier' => 'Identificador', 'Disable two factor authentication' => 'Desactiva l\'autenticació de dos factors', // 'Do you really want to disable the two factor authentication for this user: "%s"?' => '', 'Edit link' => 'Edita enllaç', 'Start to type task title...' => 'Comenceu a títol de la tasca de tipus ...', 'A task cannot be linked to itself' => 'Una tasca no pot vincular-se a si mateix', 'The exact same link already exists' => 'La mateixa relació exacta ja existeix', 'Recurrent task is scheduled to be generated' => 'La tasca recurrent està programada per ser generada', 'Score' => 'Puntuació', 'The identifier must be unique' => 'L\'identificador ha de ser únic', // 'This linked task id doesn\'t exists' => '', 'This value must be alphanumeric' => 'Aquest valor ha de ser alfanumèric', 'Edit recurrence' => 'Edita recurrència', 'Generate recurrent task' => 'Generar tasca recurrent', 'Trigger to generate recurrent task' => 'Desencadenar per generar tasca recurrent', 'Factor to calculate new due date' => 'Factor per calcular la nova data de venciment', 'Timeframe to calculate new due date' => 'Marc de temps per calcular la nova data de venciment', 'Base date to calculate new due date' => 'Data de referència per al càlcul de la nova data de venciment', 'Action date' => 'data d\'acció', 'Base date to calculate new due date: ' => 'Data base per a calcular nova data de venciment: ', 'This task has created this child task: ' => 'Aquesta tasca ha creat aquesta tasca filla: ', 'Day(s)' => 'Dia (Dies)', 'Existing due date' => 'Data de venciment existent', // 'Factor to calculate new due date: ' => '', 'Month(s)' => 'Mes (Mesos)', 'This task has been created by: ' => 'Tasca creada per: ', 'Recurrent task has been generated:' => 'La tasca recurrent s\'ha generat:', // 'Timeframe to calculate new due date: ' => '', // 'Trigger to generate recurrent task: ' => '', 'When task is closed' => 'Quan la tasca està tancada', 'When task is moved from first column' => 'Quan la tasca es mou de la primera columna', 'When task is moved to last column' => 'Quan la tasca es mou a última columna', 'Year(s)' => 'Any (s)', 'Project settings' => 'Configuració del projecte', 'Automatically update the start date' => 'Actualitzar automàticament la data d\'inici', 'iCal feed' => 'Origen iCal', 'Preferences' => 'Configuració', 'Security' => 'Seguretat', 'Two factor authentication disabled' => 'L\'autenticació de dos factors deshabilitat', 'Two factor authentication enabled' => 'Autenticació de dos factors activada', 'Unable to update this user.' => 'No es pot actualitzar aquest usuari.', 'There is no user management for personal projects.' => 'No hi ha una gestió d\'usuaris per a projectes privats.', 'User that will receive the email' => 'L\'usuari que rebrà el correu electrònic', 'Email subject' => 'assumpte del correu electrònic', 'Date' => 'Data', 'Add a comment log when moving the task between columns' => 'Afegeix un registre comentari en moure la tasca entre les columnes', 'Move the task to another column when the category is changed' => 'Mou la tasca a una altra columna quan es canvia la categoria', 'Send a task by email to someone' => 'Envia una tasca per correu electrònic a algú', 'Reopen a task' => 'Torneu a obrir una tasca', 'Notification' => 'Notificació', '%s moved the task #%d to the first swimlane' => '%s van moure la tasca #%d per al primer swimlane', 'Swimlane' => 'Swimlane', '%s moved the task %s to the first swimlane' => '%s es va traslladar la tasca %s per al primer swimlane', // '%s moved the task %s to the swimlane "%s"' => '', 'This report contains all subtasks information for the given date range.' => 'Aquest informe conté tota la informació subtasques per al període de temps.', 'This report contains all tasks information for the given date range.' => 'Aquest informe conté tota la informació de tasques per al període de temps.', 'Project activities for %s' => 'Les activitats del projecte per a %s', 'view the board on Kanboard' => 'Veure el tauler en Kanboard', 'The task has been moved to the first swimlane' => 'La tasca ha estat mogut a la primera swimlane', 'The task has been moved to another swimlane:' => 'La tasca s\'han traslladat a un altre swimlane:', 'New title: %s' => 'Nou títol: %s', 'The task is not assigned anymore' => 'La tasca no s\'ha assignat més', 'New assignee: %s' => 'Nova assignat:%s', 'There is no category now' => 'No hi ha una categoria ara', 'New category: %s' => 'Nova categoria:%s', 'New color: %s' => 'Nou color: %s', 'New complexity: %d' => 'Nova dificultat: %d', 'The due date has been removed' => 'La data de venciment s\'han eliminat', 'There is no description anymore' => 'No hi ha una descripció més', 'Recurrence settings has been modified' => 'ajustos de recurrència s\'han modificat', // 'Time spent changed: %sh' => '', // 'Time estimated changed: %sh' => '', // 'The field "%s" has been updated' => '', 'The description has been modified:' => 'La descripció s\'ha modificat:', 'Do you really want to close the task "%s" as well as all subtasks?' => 'Vols tancar la tasca "%s", així com totes les subtasques?', 'I want to receive notifications for:' => 'Vull rebre notificacions per:', 'All tasks' => 'totes les tasques', 'Only for tasks assigned to me' => 'Només per a les tasques que se m\'ha s\'assignin', 'Only for tasks created by me' => 'Només per a les tasques creades per mi', 'Only for tasks created by me and tasks assigned to me' => 'Només per a tasques creades per mi i em assignin', // '%%Y-%%m-%%d' => '', 'Total for all columns' => 'Total per a totes les columnes', 'You need at least 2 days of data to show the chart.' => 'Es necessita com a mínim 2 dies de dades per mostrar el gràfic.', '<15m' => '<15m', '<30m' => '<30m', 'Stop timer' => 'Atura el temporitzador', 'Start timer' => 'Inicia el temporitzador', 'My activity stream' => 'El meu fluxe d\'activitat', 'Search tasks' => 'Cerca de tasques', 'Reset filters' => 'Restableix filtres', 'My tasks due tomorrow' => 'Les meves tasques per demà', 'Tasks due today' => 'Tasques que vencen avui', 'Tasks due tomorrow' => 'Tasques per demà', 'Tasks due yesterday' => 'Tasques a causa ahir', 'Closed tasks' => 'Tasques tancades', 'Open tasks' => 'Tasques obertes', 'Not assigned' => 'No assignat', 'View advanced search syntax' => 'Veure sintaxi de cerca avançada', 'Overview' => 'Visió de conjunt', 'Board/Calendar/List view' => 'Tauler / Calendari / Vista de llista', 'Switch to the board view' => 'Canviar a la vista de tauler', 'Switch to the list view' => 'Canviar a la vista de llista', 'Go to the search/filter box' => 'Anar al quadre de cerca / filtre', 'There is no activity yet.' => 'No hi ha cap activitat encara.', 'No tasks found.' => 'No s\'han trobat tasques.', 'Keyboard shortcut: "%s"' => 'Drecera de teclat: "%s"', 'List' => 'Llista', 'Filter' => 'Filtre', 'Advanced search' => 'Cerca avançada', 'Example of query: ' => 'Exemple de consulta: ', 'Search by project: ' => 'Cerca per projecte: ', 'Search by column: ' => 'Cerca per columna: ', 'Search by assignee: ' => 'Cerca per assignat: ', 'Search by color: ' => 'Cerca per color: ', 'Search by category: ' => 'Cerca per categoria: ', 'Search by description: ' => 'Cerca per descripció: ', 'Search by due date: ' => 'Cerca per data de venciment: ', 'Average time spent in each column' => 'Temps mitjà de permanència en cada columna', 'Average time spent' => 'Temps mitjà de permanència', 'This chart shows the average time spent in each column for the last %d tasks.' => 'Aquest gràfic mostra el temps mitjà de permanència en cada columna per a les últimes %d tasques.', 'Average Lead and Cycle time' => 'El plom i la mitjana del temps de cicle', 'Average lead time: ' => 'Mitjana de temps de lliurament: ', 'Average cycle time: ' => 'Mitjana de temps de cicle: ', 'Cycle Time' => 'Temps de cicle', 'Lead Time' => 'Temps de lliurament', 'This chart shows the average lead and cycle time for the last %d tasks over the time.' => 'Aquesta taula mostra la mitjana de plom i el temps de cicle per a les últimes tasques %d respecte al temps.', 'Average time into each column' => 'Temps mitjà en cada columna', 'Lead and cycle time' => 'Temps de lliurament i cicle', 'Lead time: ' => 'Temps de lliurament: ', 'Cycle time: ' => 'Temps del cicle: ', 'Time spent in each column' => 'El temps invertit en cada columna', 'The lead time is the duration between the task creation and the completion.' => 'El termini d\'execució és la durada entre la creació de la tasca i la finalització.', 'The cycle time is the duration between the start date and the completion.' => 'El temps de cicle és la durada entre la data d\'inici i la finalització.', 'If the task is not closed the current time is used instead of the completion date.' => 'Si la tasca no està tancat el moment actual s\'utilitza en lloc de la data de finalització.', 'Set the start date automatically' => 'S\'ajusta automàticament la data d\'inici', 'Edit Authentication' => 'Edita autenticació', 'Remote user' => 'Usuari remot', 'Remote users do not store their password in Kanboard database, examples: LDAP, Google and Github accounts.' => 'Els usuaris remots no emmagatzemen la contrasenya a la base de dades Kanboard, exemples: els comptes LDAP, Google i Github.', 'If you check the box "Disallow login form", credentials entered in the login form will be ignored.' => 'Si marca la casella "No permetre formulari d\'accés", s\'ignoraran les credencials introduïdes al formulari d\'inici de sessió.', 'Default task color' => 'Color per defecte de les tasques', 'This feature does not work with all browsers.' => 'Aquesta característica no funciona amb tots els navegadors.', 'There is no destination project available.' => 'No hi ha cap projecte de destinació disponibles.', 'Trigger automatically subtask time tracking' => 'Desencadenar automàticament control d\'hores de subtasca', 'Include closed tasks in the cumulative flow diagram' => 'Incloure tasques tancades en el diagrama de flux acumulat', 'Current swimlane: %s' => 'Swimlane actual: %s', 'Current column: %s' => 'Columna actual: %s', 'Current category: %s' => 'Categoria actual: %s', 'no category' => 'cap categoria', 'Current assignee: %s' => 'Assignat actual: %s', 'not assigned' => 'no assignat', 'Author:' => 'Autor:', 'contributors' => 'contribuents', 'License:' => 'Llicència:', 'License' => 'Llicència', 'Enter the text below' => 'Introduïu el text a continuació', 'Start date:' => 'Data d\'inici:', 'Due date:' => 'Data de venciment:', 'People who are project managers' => 'Les persones que són caps de projecte', 'People who are project members' => 'Les persones que són membres del projecte', 'NOK - Norwegian Krone' => 'NOK - Corona noruega', 'Show this column' => 'Mostra aquesta columna', 'Hide this column' => 'Amaga aquesta columna', 'End date' => 'Data de finalització', 'Users overview' => 'Visió general dels usuaris', 'Members' => 'Membres', 'Shared project' => 'Projecte compartit', 'Project managers' => 'Els gerents de projecte', 'Projects list' => 'Llista de projectes', 'End date:' => 'Data de finalització:', 'Change task color when using a specific task link' => 'Canviar de color quan la tasca utilitzant un enllaç tasca específica', 'Task link creation or modification' => 'La creació o modificació de l\'enllaç de tasques', 'Milestone' => 'Fita', 'Reset the search/filter box' => 'Restablir el quadre de cerca / filtre', 'Documentation' => 'Documentació', 'Author' => 'Autor', 'Version' => 'Versió', 'Plugins' => 'Connectors', 'There is no plugin loaded.' => 'No hi ha cap complement carregat.', 'My notifications' => 'Les meves notificacions', 'Custom filters' => 'Filtres personalitzats', 'Your custom filter has been created successfully.' => 'El seu filtre a mida s\'han creat amb èxit.', 'Unable to create your custom filter.' => 'No es pot crear el filtre personalitzat.', 'Custom filter removed successfully.' => 'Filtre a mida eliminat correctament.', 'Unable to remove this custom filter.' => 'No es pot eliminar aquest filtre personalitzat.', 'Edit custom filter' => 'Edita filtre a mida', 'Your custom filter has been updated successfully.' => 'El seu filtre a mida s\'han actualitzat correctament.', 'Unable to update custom filter.' => 'No es pot actualitzar filtre a mida.', 'Web' => 'Web', 'New attachment on task #%d: %s' => 'Nou adjunt a la tasca #%d: %s', 'New comment on task #%d' => 'Nou comentari a la tasca #%d', 'Comment updated on task #%d' => 'Comentari actualitzat a la tasca #%d', 'New subtask on task #%d' => 'Nova subtasca a la tasca #%d', 'Subtask updated on task #%d' => 'Subtasca s\'actualitza a la tasca #%d', 'New task #%d: %s' => 'Nova tasca #%d: %s', 'Task updated #%d' => 'Tasca actualitzada #%d', 'Task #%d closed' => 'Tasca #%d tancada', 'Task #%d opened' => 'Tasca #%d obrir', 'Column changed for task #%d' => 'Columna canviada per la tasca #%d', 'New position for task #%d' => 'Nova posició per la tasca #%d', 'Swimlane changed for task #%d' => 'El swimlane va canviat per la tasca #%d', 'Assignee changed on task #%d' => 'L\'assignat va canviar a la tasca #%d', '%d overdue tasks' => '%d tasques endarrerides', 'Task #%d is overdue' => 'La tasca #%d està vençuda', 'No notification.' => 'Sense notificacions.', 'Mark all as read' => 'Marca totes com llegides', 'Mark as read' => 'Marca com llegida', 'Total number of tasks in this column across all swimlanes' => 'Nombre total de tasques en aquesta columna a través de tots swimlanes', 'Collapse swimlane' => 'Col·lapsa swimlane', 'Expand swimlane' => 'Ampliar swimlane', 'Add a new filter' => 'Afegeix un nou filtre', 'Share with all project members' => 'Compartir amb tots els membres del projecte', 'Shared' => 'Compartit', 'Owner' => 'Propietari', 'Unread notifications' => 'Notificacions no llegides', 'Notification methods:' => 'Els mètodes de notificació:', 'Unable to read your file' => 'No es pot llegir el fitxer', '%d task(s) have been imported successfully.' => '%d tasca(s) s\'han importat correctament.', 'Nothing has been imported!' => 'Res s\'han importat!', 'Import users from CSV file' => 'Importa usuaris des d\'arxiu CSV', '%d user(s) have been imported successfully.' => '%d usuari(s) s\'han importat correctament.', 'Comma' => 'Coma', 'Semi-colon' => 'Punt i coma', 'Tab' => 'Llengüeta', 'Vertical bar' => 'Barra vertical', 'Double Quote' => 'Cometes dobles', 'Single Quote' => 'Cometes simples', '%s attached a file to the task #%d' => '%s ha adjuntat un arxiu a la tasca #%d', 'There is no column or swimlane activated in your project!' => 'No hi ha cap columna o swimlane activat en el seu projecte!', 'Append filter (instead of replacement)' => 'Annexar filtre (en lloc de reemplaçament)', 'Append/Replace' => 'Annexar / Reemplaçar', 'Append' => 'Annexar', 'Replace' => 'Reemplaçar', 'Import' => 'Importació', 'Change sorting' => 'Canvia la ordenació', 'Tasks Importation' => 'Importació de tasques', 'Delimiter' => 'Delimitador', 'Enclosure' => 'Recinte', 'CSV File' => 'Fitxer CSV', 'Instructions' => 'Instruccions', 'Your file must use the predefined CSV format' => 'El seu arxiu ha d\'utilitzar el format CSV predefinit', 'Your file must be encoded in UTF-8' => 'El seu arxiu ha d\'estar codificat en UTF-8', 'The first row must be the header' => 'La primera fila ha de ser la capçalera', 'Duplicates are not verified for you' => 'Els duplicats no es verifiquen per a vostè', 'The due date must use the ISO format: YYYY-MM-DD' => 'La data de venciment ha d\'utilitzar el format ISO: AAAA-MM-DD', 'Download CSV template' => 'Descarregar plantilla CSV', 'No external integration registered.' => 'No es va registrar la integració externa.', 'Duplicates are not imported' => 'Els duplicats no s\'importen', 'Usernames must be lowercase and unique' => 'Els noms d\'usuari han d\'estar en minúscules i únic', 'Passwords will be encrypted if present' => 'Les contrasenyes es xifraran si està present', '%s attached a new file to the task %s' => '%s adjunta un arxiu nou a la tasca %s', 'Link type' => 'Tipus d\'enllaç', 'Assign automatically a category based on a link' => 'Assignar automàticament una categoria basada en un enllaç', 'BAM - Konvertible Mark' => 'BAM - Konvertible Mark', 'Assignee Username' => 'Nom d\'usuari assignat', 'Assignee Name' => 'Nom assignat', 'Groups' => 'Grups', 'Members of %s' => 'Els membres de %s', 'New group' => 'Nou grup', 'Group created successfully.' => 'Grup creat correctament.', 'Unable to create your group.' => 'No es pot crear el grup.', 'Edit group' => 'Edita grup', 'Group updated successfully.' => 'Grup actualitzat correctament.', 'Unable to update your group.' => 'No es pot actualitzar el seu grup.', // 'Add group member to "%s"' => '', 'Group member added successfully.' => 'Membre del grup afegit correctament.', 'Unable to add group member.' => 'No es pot afegeix membre del grup.', // 'Remove user from group "%s"' => '', 'User removed successfully from this group.' => 'Usuari eliminat amb èxit d\'aquest grup.', 'Unable to remove this user from the group.' => 'No es pot eliminar aquest usuari del grup.', 'Remove group' => 'Elimina el grup', 'Group removed successfully.' => 'Grup eliminat correctament.', 'Unable to remove this group.' => 'No es pot eliminar aquest grup.', 'Project Permissions' => 'Permisos de projectes', 'Manager' => 'Gerent', 'Project Manager' => 'Gerent de projectes', 'Project Member' => 'Membres del projecte', 'Project Viewer' => 'Visor de projectes', 'Your account is locked for %d minutes' => 'El seu compte està bloquejada per %d minuts', 'Invalid captcha' => 'codi d\'imatge no vàlida', 'The name must be unique' => 'El nom ha de ser únic', 'View all groups' => 'Veure tots els grups', 'There is no user available.' => 'No hi ha cap usuari disponible.', // 'Do you really want to remove the user "%s" from the group "%s"?' => '', 'There is no group.' => 'No hi ha cap grup.', 'Add group member' => 'Afegeix membre del grup', // 'Do you really want to remove this group: "%s"?' => '', 'There is no user in this group.' => 'No hi ha cap usuari en aquest grup.', 'Permissions' => 'Permisos', 'Allowed Users' => 'Els usuaris autoritzats', 'No specific user has been allowed.' => 'Cap usuari s\'hagi establert.', 'Role' => 'Rol', 'Enter user name...' => 'Introdueix el nom d\'usuari ...', 'Allowed Groups' => 'Grups permesos', 'No group has been allowed.' => 'Cap grup s\'hagi establert.', 'Group' => 'Grup', 'Group Name' => 'Nom del grup', 'Enter group name...' => 'Introduïu el nom del grup ...', 'Role:' => 'Rol:', 'Project members' => 'Els membres del projecte', '%s mentioned you in the task #%d' => '%s t\'ha esmentat a la tasca #%d', '%s mentioned you in a comment on the task #%d' => '%s t\'ha mencionat en un comentari a la tasca #%d', 'You were mentioned in the task #%d' => 'Se t\'ha esmentat a la tasca #%d', 'You were mentioned in a comment on the task #%d' => 'Se t\'ha mencionat en un comentari sobre la tasca #%d', // 'Estimated hours: ' => '', // 'Actual hours: ' => '', 'Hours Spent' => 'Les hores invertides', 'Hours Estimated' => 'hores estimat', 'Estimated Time' => 'Temps estimat', 'Actual Time' => 'temps real', 'Estimated vs actual time' => 'Estimat en funció del temps real', 'RUB - Russian Ruble' => 'RUB - Russia rus', 'Assign the task to the person who does the action when the column is changed' => 'Assignar la tasca a la persona que fa l\'acció quan es canvia la columna', 'Close a task in a specific column' => 'Tancar una tasca en una columna específica', 'Time-based One-time Password Algorithm' => 'Algoritme de contrasenya basat en el temps d\'una sola vegada', // 'Two-Factor Provider: ' => '', 'Disable two-factor authentication' => 'Deshabilita l\'autenticació de dos factors', 'Enable two-factor authentication' => 'Habilitar l\'autenticació de dos factors', 'There is no integration registered at the moment.' => 'No hi ha integració registrada en el moment.', 'Password Reset for Kanboard' => 'Restableix contrasenya per Kanboard', 'Forgot password?' => 'Has oblidat la contrasenya?', 'Enable "Forget Password"' => 'Habilita "he oblidat la contrasenya"', 'Password Reset' => 'Restablir contrasenya', 'New password' => 'Nova contrasenya', 'Change Password' => 'Canvia la contrasenya', 'To reset your password click on this link:' => 'Per restablir la contrasenya, feu clic en aquest enllaç:', 'Last Password Reset' => 'Darrer restabliment de contrasenya', 'The password has never been reinitialized.' => 'La contrasenya mai ha estat reiniciada.', 'Creation' => 'Creació', 'Expiration' => 'Caducitat', 'Password reset history' => 'Històric de restabliment de contrasenya', // 'All tasks of the column "%s" and the swimlane "%s" have been closed successfully.' => '', 'Do you really want to close all tasks of this column?' => 'Vols tancar totes les tasques d\'aquesta columna?', // '%d task(s) in the column "%s" and the swimlane "%s" will be closed.' => '', 'Close all tasks of this column' => 'Tanqueu totes les tasques d\'aquesta columna', 'No plugin has registered a project notification method. You can still configure individual notifications in your user profile.' => 'No s\'ha registrat plugin d\'un mètode de notificació del projecte. Encara es pot configurar les notificacions individuals en el seu perfil d\'usuari.', 'My dashboard' => 'El meu tauler', 'My profile' => 'El meu perfil', 'Project owner: ' => 'Propietari del projecte: ', 'The project identifier is optional and must be alphanumeric, example: MYPROJECT.' => 'L\'identificador de projecte és opcional i ha de ser alfanumèric, exemple: MYPROJECT.', 'Project owner' => 'Propietari del projecte', 'Personal projects do not have users and groups management.' => 'projectes privats no tenen els usuaris i grups de gestió.', 'There is no project member.' => 'No hi ha cap membre del projecte.', 'Priority' => 'Prioritat', 'Task priority' => 'Prioritat de la tasca', 'General' => 'General', 'Dates' => 'Dates', 'Default priority' => 'Prioritat per defecte', 'Lowest priority' => 'La prioritat més baixa', 'Highest priority' => 'La prioritat més alta', 'Close a task when there is no activity' => 'Tancar una tasca quan no hi ha activitat', 'Duration in days' => 'Durada en dies', 'Send email when there is no activity on a task' => 'Envia correu electrònic quan no hi ha activitat en una tasca', 'Unable to fetch link information.' => 'No és possible obtenir informació d\'enllaç.', 'Daily background job for tasks' => 'Feina en segon pla diaria per a les tasques', 'Auto' => 'Auto', 'Related' => 'Relacionat', 'Attachment' => 'Adjunt', 'Title not found' => 'Títol no trobat', 'Web Link' => 'Enllaç web', 'External links' => 'Enllaços externs', 'Add external link' => 'Afegeix un enllaç extern', 'Type' => 'Tipus', 'Dependency' => 'Dependència', 'Add internal link' => 'Afegeix un enllaç intern', 'Add a new external link' => 'Afegeix un nou enllaç extern', 'Edit external link' => 'Edita enllaç extern', 'External link' => 'URL', 'Copy and paste your link here...' => 'Copia i enganxa l\'enllaç aquí ...', 'URL' => 'URL', 'Internal links' => 'Els enllaços interns', 'Assign to me' => 'Assignar a mi', 'Me' => 'jo', 'Do not duplicate anything' => 'No dupliquis res', 'Projects management' => 'Gestió de projectes', 'Users management' => 'Gestió d\'usuaris', 'Groups management' => 'Gestió de grups', 'Create from another project' => 'Crea a partir d\'un altre projecte', 'open' => 'obert', 'closed' => 'tancat', 'Priority:' => 'Prioritat:', 'Reference:' => 'Referència:', 'Complexity:' => 'Dificultat:', 'Swimlane:' => 'Swimlane:', 'Column:' => 'Columna:', 'Position:' => 'Posició:', 'Creator:' => 'Creador:', 'Time estimated:' => 'Temps estimat:', '%s hours' => '%s hora', 'Time spent:' => 'El temps passat:', 'Created:' => 'Creat:', 'Modified:' => 'Modificat:', 'Completed:' => 'Completat:', 'Started:' => 'Començat:', 'Moved:' => 'Mogut:', 'Task #%d' => 'Tasca #%d', 'Time format' => 'Format d\'hora', 'Start date: ' => 'Data d\'inici: ', 'End date: ' => 'Data de fi: ', 'New due date: ' => 'Nova data de venciment: ', 'Start date changed: ' => 'Data d\'inici canviada: ', 'Disable personal projects' => 'Desactivar els projectes privats', // 'Do you really want to remove this custom filter: "%s"?' => '', 'Remove a custom filter' => 'Treure un filtre a mida', 'User activated successfully.' => 'L\'usuari ha activat correctament.', 'Unable to enable this user.' => 'No és possible permetre que aquest usuari.', 'User disabled successfully.' => 'L\'usuari deshabilitat amb èxit.', 'Unable to disable this user.' => 'No és possible desactivar aquest usuari.', 'All files have been uploaded successfully.' => 'Tots els arxius s\'hagin carregat correctament.', // 'The maximum allowed file size is %sB.' => '', 'Drag and drop your files here' => 'Arrossegar i deixar anar els arxius aquí', 'choose files' => 'triar els arxius', 'View profile' => 'Veure el perfil', 'Two Factor' => 'dos factors', 'Disable user' => 'desactivar usuari', // 'Do you really want to disable this user: "%s"?' => '', 'Enable user' => 'Permetre a l\'usuari', // 'Do you really want to enable this user: "%s"?' => '', 'Download' => 'Descarregar', 'Uploaded: %s' => 'Pujat: %s', 'Size: %s' => 'Mida: %s', 'Uploaded by %s' => 'Pujada per %s', 'Filename' => 'Nom de l\'arxiu', 'Size' => 'Mida', 'Column created successfully.' => 'Columna creat correctament.', 'Another column with the same name exists in the project' => 'Una altra columna amb el mateix nom existeix en el projecte', 'Default filters' => 'filtres predeterminats', // 'Your board doesn\'t have any columns!' => '', 'Change column position' => 'Canvi de posició de columna', 'Switch to the project overview' => 'Canviar a la visió general del projecte', 'User filters' => 'Els filtres d\'usuari', 'Category filters' => 'filtres de categories', 'Upload a file' => 'Pujar un arxiu', 'View file' => 'Veure arxiu', 'Last activity' => 'Última activitat', 'Change subtask position' => 'Subtasca posició de canvi', 'This value must be greater than %d' => 'Aquest valor ha de ser més gran que %d', 'Another swimlane with the same name exists in the project' => 'Una altra swimlane amb el mateix nom existeix en el projecte', 'Example: https://example.kanboard.org/ (used to generate absolute URLs)' => 'Exemple: https://example.kanboard.org/ (utilitzat per generar URL absoluta)', 'Actions duplicated successfully.' => 'Accions dupliquen amb èxit.', 'Unable to duplicate actions.' => 'No s\'ha pogut duplicar accions.', 'Add a new action' => 'Afegeix una nova acció', 'Import from another project' => 'Importa d\'un altre projecte', 'There is no action at the moment.' => 'No hi ha cap acció en aquest moment.', 'Import actions from another project' => 'accions d\'importació d\'un altre projecte', 'There is no available project.' => 'No hi ha un projecte disponible.', 'Local File' => 'Fitxer local', 'Configuration' => 'Configuració', 'PHP version:' => 'Versió de PHP:', 'PHP SAPI:' => 'PHP SAPI:', 'OS version:' => 'Versió del sistema operatiu:', 'Database version:' => 'Versió de la base de dades:', 'Browser:' => 'Navegador:', 'Task view' => 'Vista de tasques', 'Edit task' => 'Edició de tasques', 'Edit description' => 'Modifica la descripció', 'New internal link' => 'Nou enllaç intern', 'Display list of keyboard shortcuts' => 'Visualització de la llista de dreceres de teclat', 'Avatar' => 'Avatar', 'Upload my avatar image' => 'Puja la imatge meu avatar', 'Remove my image' => 'Traieu la meva imatge', 'The OAuth2 state parameter is invalid' => 'El paràmetre d\'estat OAuth2 no és vàlid', 'User not found.' => 'Usuari no trobat.', 'Search in activity stream' => 'Buscar en el Tràfic d\'activitat', 'My activities' => 'Les meves activitats', 'Activity until yesterday' => 'Activitat fins ahir', 'Activity until today' => 'Activitat fins avui', // 'Search by creator: ' => '', // 'Search by creation date: ' => '', // 'Search by task status: ' => '', // 'Search by task title: ' => '', 'Activity stream search' => 'Cerca al fluxe d\'activitat', // 'Projects where "%s" is manager' => '', // 'Projects where "%s" is member' => '', // 'Open tasks assigned to "%s"' => '', // 'Closed tasks assigned to "%s"' => '', 'Assign automatically a color based on a priority' => 'Assignar automàticament un color basat en una prioritat', // 'Overdue tasks for the project(s) "%s"' => '', 'Upload files' => 'Pujar arxius', 'Installed Plugins' => 'Els connectors instal·lats', 'Plugin Directory' => 'Directori de complements', 'Plugin installed successfully.' => 'Plug-in instal·lat correctament.', 'Plugin updated successfully.' => 'Plugin actualitzat correctament.', 'Plugin removed successfully.' => 'Plugin eliminat correctament.', 'Subtask converted to task successfully.' => 'Subtasca converteix en tasca amb èxit.', 'Unable to convert the subtask.' => 'No es pot convertir la subtasca.', 'Unable to extract plugin archive.' => 'No es pot extreure arxiu connector.', 'Plugin not found.' => 'Plugin no trobat.', // 'You don\'t have the permission to remove this plugin.' => '', 'Unable to download plugin archive.' => 'No es pot descarregar arxiu connector.', 'Unable to write temporary file for plugin.' => 'No es pot escriure el fitxer temporal per al connector.', 'Unable to open plugin archive.' => 'No es pot obrir arxiu de plugin.', 'There is no file in the plugin archive.' => 'No hi ha cap arxiu a l\'arxiu connector.', 'Create tasks in bulk' => 'Crear tasques a granel', 'Your Kanboard instance is not configured to install plugins from the user interface.' => 'La instància Kanboard no està configurat per a instal·lar plugins des de la interfície d\'usuari.', 'There is no plugin available.' => 'No hi ha cap complement disponible.', 'Install' => 'Instal·la', 'Update' => 'Actualitza', 'Up to date' => 'Actualitzat', 'Not available' => 'No disponible', 'Remove plugin' => 'Eliminar connector', // 'Do you really want to remove this plugin: "%s"?' => '', 'Uninstall' => 'Suprimeix', 'Listing' => 'Llistat', 'Metadata' => 'Metadades', 'Manage projects' => 'Gestió de projectes', 'Convert to task' => 'Convertir la tasca', 'Convert sub-task to task' => 'Converteix sub-tasca a una altra', 'Do you really want to convert this sub-task to a task?' => 'Vols convertir aquesta sub-tasca a una tasca?', 'My task title' => 'Títol de la tasca', 'Enter one task by line.' => 'Introduïu una tasca per línia.', 'Number of failed login:' => 'Nombre d\'inici de sessió fallit:', 'Account locked until:' => 'Compte bloquejada fins que:', 'Email settings' => 'Configuració de correu electrònic', 'Email sender address' => 'Adreça de correu electrònic del remitent', 'Email transport' => 'Transport de correu electrònic', 'Webhook token' => 'Símbol web hook', 'Project tags management' => 'Gestió de projectes etiquetes', 'Tag created successfully.' => 'Tag creat correctament.', 'Unable to create this tag.' => 'No es pot crear aquesta etiqueta.', 'Tag updated successfully.' => 'Tag actualitzat correctament.', 'Unable to update this tag.' => 'No es pot actualitzar aquesta etiqueta.', 'Tag removed successfully.' => 'Tag eliminat correctament.', 'Unable to remove this tag.' => 'No es pot eliminar aquesta etiqueta.', 'Global tags management' => 'Gestió global d\'etiquetes', 'Tags' => 'Etiquetes', 'Tags management' => 'Gestió d\'etiquetes', 'Add new tag' => 'Afegeix nova etiqueta', 'Edit a tag' => 'Edita una etiqueta', 'Project tags' => 'Variables del projecte', 'There is no specific tag for this project at the moment.' => 'No hi ha una etiqueta específica per a aquest projecte en aquest moment.', 'Tag' => 'Etiqueta', 'Remove a tag' => 'Elimina una etiqueta', // 'Do you really want to remove this tag: "%s"?' => '', 'Global tags' => 'etiquetes globals', 'There is no global tag at the moment.' => 'No hi ha cap variable global en el moment.', 'This field cannot be empty' => 'Aquest camp no pot estar buit', 'Close a task when there is no activity in a specific column' => 'Tancar una tasca quan no hi ha activitat en una columna específica', '%s removed a subtask for the task #%d' => '%s extret una subtasca per a la tasca #%d', '%s removed a comment on the task #%d' => '%s remogut un comentari a la tasca #%d', 'Comment removed on task #%d' => 'Comentari eliminat a la tasca #%d', 'Subtask removed on task #%d' => 'Subtasca eliminat a la tasca #%d', 'Hide tasks in this column in the dashboard' => 'Amaga tasques en aquesta columna al tauler d\'instruments', '%s removed a comment on the task %s' => '%s remogut un comentari a la tasca %s', '%s removed a subtask for the task %s' => '%s extret una subtasca per a la tasca %s', 'Comment removed' => 'Es va eliminar el comentari', 'Subtask removed' => 'subtasca retira', '%s set a new internal link for the task #%d' => '%s va establir un nou enllaç intern per a la tasca #%d', '%s removed an internal link for the task #%d' => '%s eliminat un enllaç intern per a la tasca #%d', 'A new internal link for the task #%d has been defined' => 'Un nou enllaç intern per a la tasca #%d s\'han definit', 'Internal link removed for the task #%d' => 'Enllaç intern eliminat la tasca #%d', '%s set a new internal link for the task %s' => '%s va establir un nou enllaç intern per a la tasca %s', '%s removed an internal link for the task %s' => '%s eliminat un enllaç intern per a la tasca %s', 'Automatically set the due date on task creation' => 'S\'ajusta automàticament la data de venciment a la creació de tasques', 'Move the task to another column when closed' => 'Mou la tasca a una altra columna quan es tanca', 'Move the task to another column when not moved during a given period' => 'Mou la tasca a una altra columna quan no es va moure durant un període determinat', 'Dashboard for %s' => 'Tauler de %s', 'Tasks overview for %s' => 'Resum de tasques de %s', 'Subtasks overview for %s' => 'Visió general de subtasques de %s', 'Projects overview for %s' => 'Visió general del projecte de %s', 'Activity stream for %s' => 'Fluxe d\'activitat per a %s', 'Assign a color when the task is moved to a specific swimlane' => 'Assignar un color quan la tasca es mou a un carril específic', 'Assign a priority when the task is moved to a specific swimlane' => 'Assignar una prioritat quan la tasca es mou a un carril específic', 'User unlocked successfully.' => 'Usuari desbloquejat amb èxit.', 'Unable to unlock the user.' => 'No és possible desbloquejar l\'usuari.', 'Move a task to another swimlane' => 'Mou una tasca a una altra swimlane', 'Creator Name' => 'nom creador', 'Time spent and estimated' => 'El temps dedicat i estima', 'Move position' => 'Mou la posició', 'Move task to another position on the board' => 'Mou tasca a una altra posició al tauler', 'Insert before this task' => 'Insereix abans aquesta tasca', 'Insert after this task' => 'Inserir, després d\'aquesta tasca', 'Unlock this user' => 'Desbloquejar aquest usuari', 'Custom Project Roles' => 'Rols d\'encàrrec del projecte', 'Add a new custom role' => 'Afegeix un nou rol', // 'Restrictions for the role "%s"' => '', 'Add a new project restriction' => 'Afegeix una nova restricció projecte', 'Add a new drag and drop restriction' => 'Afegeix un nou arrossegar i deixar anar restricció', 'Add a new column restriction' => 'Afegeix una nova restricció de columna', 'Edit this role' => 'Edita aquest rol', 'Remove this role' => 'Elimina aquest rol', 'There is no restriction for this role.' => 'No hi ha cap restricció per a aquest rol.', 'Only moving task between those columns is permitted' => 'Només es mou tasques entre aquestes columnes es permet', 'Close a task in a specific column when not moved during a given period' => 'Tancar una tasca en una columna específica quan no es va moure durant un període determinat', 'Edit columns' => 'Edita columnes', 'The column restriction has been created successfully.' => 'La restricció de la columna s\'ha creat correctament.', 'Unable to create this column restriction.' => 'No es pot crear aquesta restricció columna.', 'Column restriction removed successfully.' => 'restricció Columna eliminat correctament.', 'Unable to remove this restriction.' => 'No es pot eliminar aquesta restricció.', 'Your custom project role has been created successfully.' => 'El seu rol projecte personalitzat s\'ha creat correctament.', 'Unable to create custom project role.' => 'No es pot crear el rol de projecte personalitzat.', 'Your custom project role has been updated successfully.' => 'El seu rol projecte personalitzat s\'ha actualitzat correctament.', 'Unable to update custom project role.' => 'No es pot actualitzar rol projecte personalitzat.', 'Custom project role removed successfully.' => 'rol projecte personalitzat eliminat correctament.', 'Unable to remove this project role.' => 'No es pot treure aquest rol projecte.', 'The project restriction has been created successfully.' => 'La restricció projecte ha estat creat amb èxit.', 'Unable to create this project restriction.' => 'No es pot crear aquesta restricció projecte.', 'Project restriction removed successfully.' => 'Projecte restricció eliminat correctament.', 'You cannot create tasks in this column.' => 'No es poden crear tasques en aquesta columna.', 'Task creation is permitted for this column' => 'Es permet la creació de tasques per a aquesta columna', 'Closing or opening a task is permitted for this column' => 'Tancant o obrint una tasca està permesa per a aquesta columna', 'Task creation is blocked for this column' => 'creació de la tasca està bloquejat per a aquesta columna', 'Closing or opening a task is blocked for this column' => 'Tancant o obrint una tasca està bloquejat per a aquesta columna', 'Task creation is not permitted' => 'No es permet la creació de tasques', 'Closing or opening a task is not permitted' => 'No es permet tancar o obrir una tasca', // 'New drag and drop restriction for the role "%s"' => '', 'People belonging to this role will be able to move tasks only between the source and the destination column.' => 'Les persones que pertanyen a aquest rol seran capaços de moure les tasques només entre la font i la columna de destinació.', 'Remove a column restriction' => 'Eliminar una restricció columna', // 'Do you really want to remove this column restriction: "%s" to "%s"?' => '', // 'New column restriction for the role "%s"' => '', 'Rule' => 'regla', 'Do you really want to remove this column restriction?' => 'Vols eliminar aquest criteri de la columna?', 'Custom roles' => 'Rols personalitzats', 'New custom project role' => 'Nou rol projecte personalitzat', 'Edit custom project role' => 'Edita rol projecte personalitzat', 'Remove a custom role' => 'Eliminar una funció personalitzada', // 'Do you really want to remove this custom role: "%s"? All people assigned to this role will become project member.' => '', 'There is no custom role for this project.' => 'No hi ha una funció personalitzada per a aquest projecte.', // 'New project restriction for the role "%s"' => '', 'Restriction' => 'Restricció', 'Remove a project restriction' => 'Eliminar una restricció projecte', // 'Do you really want to remove this project restriction: "%s"?' => '', 'Duplicate to multiple projects' => 'Duplica a múltiples projectes', 'This field is required' => 'Aquest camp és obligatori', 'Moving a task is not permitted' => 'No està permès moure una tasca', 'This value must be in the range %d to %d' => 'Aquest valor ha d\'estar en el rang %d a %d', 'You are not allowed to move this task.' => 'No se li permet moure a aquesta tasca.', 'API User Access' => 'L\'accés d\'usuari d\'API', 'Preview' => 'Vista prèvia', 'Write' => 'escriure', 'Write your text in Markdown' => 'Escriure el text en Markdown', 'No personal API access token registered.' => 'Sense accés a l\'API personals símbol registrat.', // 'Your personal API access token is "%s"' => '', 'Remove your token' => 'Traieu el testimoni', 'Generate a new token' => 'Generar un nou token', // 'Showing %d-%d of %d' => '', 'Outgoing Emails' => 'Els correus electrònics sortints', 'Add or change currency rate' => 'Afegeix o canviar el valor de moneda', 'Reference currency: %s' => 'moneda de referència: %s', 'Add custom filters' => 'Afegeix filtres personalitzats', 'Export' => 'exportació', 'Add link label' => 'Afegeix etiqueta d\'enllaç', 'Incompatible Plugins' => 'Connectors incompatibles', 'Compatibility' => 'Compatibilitat', 'Permissions and ownership' => 'Permisos i propietat', 'Priorities' => 'Prioritats', 'Close this window' => 'Tanca aquesta finestra', 'Unable to upload this file.' => 'No es pot carregar aquest arxiu.', 'Import tasks' => 'Importació de tasques', 'Choose a project' => 'Tria un projecte', 'Profile' => 'Perfil', 'Application role' => 'Rol d\'aplicació', '%d invitations were sent.' => 'S\'han enviat %d invitacions.', '%d invitation was sent.' => 'S\'han enviat %d invitacions.', 'Unable to create this user.' => 'No es pot crear aquest usuari.', 'Kanboard Invitation' => 'Invitació Kanboard', 'Visible on dashboard' => 'Visible al tauler', 'Created at:' => 'Creat el:', 'Updated at:' => 'Actualitzat a:', 'There is no custom filter.' => 'No hi ha cap filtre personal.', 'New User' => 'Nou usuari', 'Authentication' => 'Autenticació', 'If checked, this user will use a third-party system for authentication.' => 'Si s\'activa, aquest usuari utilitzarà un sistema de tercers per a l\'autenticació.', 'The password is necessary only for local users.' => 'La contrasenya és necessària només per als usuaris locals.', 'You have been invited to register on Kanboard.' => 'T\'han convidat a inscriure\'t al Kanboard.', 'Click here to join your team' => 'Fes clic aquí per unir-te a l\'equip', 'Invite people' => 'Convidar a més gent', 'Emails' => 'Correus electrònics', 'Enter one email address by line.' => 'Introdueix una adreça de correu electrònic per línia.', 'Add these people to this project' => 'Afegeix a aquestes persones a aquest projecte', 'Add this person to this project' => 'Afegeix aquesta persona a aquest projecte', 'Sign-up' => 'Registra\'t', 'Credentials' => 'Credencials', 'New user' => 'Nou usuari', 'This username is already taken' => 'Aquest nom d\'usuari ja està en ús', 'A link to reset your password has been sent by email.' => 'S\'ha enviat per correu eletrònic un enllaç per restablir la contrasenya.', 'Your profile must have a valid email address.' => 'El teu perfil ha de tenir una adreça de correu electrònic vàlida.', 'Unfortunately, we are unable to reset your password. Did you enter a valid username? Do you have an email address in your profile?' => 'Per desgràcia, no som capaços de restablir la contrasenya. ¿S\'ha introduït un nom d\'usuari vàlid? Té una adreça de correu electrònic en el seu perfil?', 'TRL - Turkish Lira' => 'TRL - Lira turca', 'The project email is optional and could be used by several plugins.' => 'El correu electrònic del projecte és opcional i pot ser utilitzat per diversos connectors.', 'The project email must be unique across all projects' => 'El correu electrònic del projecte ha de ser únic en tots els projectes', 'The email configuration has been disabled by the administrator.' => 'La configuració de correu electrònic ha estat desactivat per l\'administrador.', 'Close this project' => 'Tanca aquest projecte', 'Open this project' => 'Obre aquest projecte', 'Close a project' => 'Tanca un projecte', // 'Do you really want to close this project: "%s"?' => '', 'Reopen a project' => 'Torna a obrir un projecte', // 'Do you really want to reopen this project: "%s"?' => '', 'This project is open' => 'Aquest projecte està obert', 'This project is closed' => 'Aquest projecte està tancat', 'Unable to upload files, check the permissions of your data folder.' => 'No es pot pujar arxius, comprovar els permisos de la carpeta de dades.', 'Another category with the same name exists in this project' => 'Una altra categoria amb el mateix nom existeix en aquest projecte', 'Comment sent by email successfully.' => 'Comentar enviat per correu electrònic amb èxit.', // 'Sent by email to "%s" (%s)' => '', 'Unable to read uploaded file.' => 'No es pot llegir el fitxer pujat.', 'Database uploaded successfully.' => 'Base de dades carregat correctament.', 'Task sent by email successfully.' => 'Tasca enviat per correu electrònic amb èxit.', 'There is no category in this project.' => 'No hi ha una categoria en aquest projecte.', 'Send by email' => 'Envia per correu electrònic', 'Create and send a comment by email' => 'Per crear i enviar un comentari per correu electrònic', 'Subject' => 'Tema', 'Upload the database' => 'Puja la base de dades', 'You could upload the previously downloaded Sqlite database (Gzip format).' => 'Es podia pujar la base de dades SQLite prèviament descarregat (format gzip).', 'Database file' => 'arxiu de base', 'Upload' => 'Pujar', 'Your project must have at least one active swimlane.' => 'El seu projecte ha de tenir com a mínim un swimlane actiu.', 'Project: %s' => 'Projecte: %s', // 'Automatic action not found: "%s"' => '', '%d projects' => '%d projectes', '%d project' => '%d projecte', 'There is no project.' => 'No hi ha cap projecte.', 'Sort' => 'Ordena', 'Project ID' => 'identificació del projecte', 'Project name' => 'Nom del projecte', 'Public' => 'Públic', 'Personal' => 'Privat', '%d tasks' => '%d tasques', '%d task' => '%d tasca', 'Task ID' => 'ID de tasca', 'Assign automatically a color when due date is expired' => 'Assignar automàticament un color quan ha caducat la data de venciment', 'Total score in this column across all swimlanes' => 'Puntuació total d\'aquesta columna a través de tots swimlanes', 'HRK - Kuna' => 'HRK - Kuna', 'ARS - Argentine Peso' => 'ARS - Pes Argentí', 'COP - Colombian Peso' => 'COP - Pes colombià', '%d groups' => '%d grups', '%d group' => '%d grup', 'Group ID' => 'ID de grup', 'External ID' => 'Identificació externa', '%d users' => '%d usuaris', '%d user' => '%d usuari', 'Hide subtasks' => 'Amaga subtasques', 'Show subtasks' => 'Mostra subtasques', 'Authentication Parameters' => 'Paràmetres d\'autenticació', 'API Access' => 'Accés API', 'No users found.' => 'No es van trobar usuaris.', 'User ID' => 'ID d\'usuari', 'Notifications are activated' => 'Notificacions habilitades', 'Notifications are disabled' => 'Notificacions inhabilitades', 'User disabled' => 'Usuari deshabilitat', '%d notifications' => '%d notificacions', '%d notification' => '%d notificació', 'There is no external integration installed.' => 'No hi ha integració externa instal·lada.', 'You are not allowed to update tasks assigned to someone else.' => 'No se li permet posar al dia les tasques assignades a una altra persona.', 'You are not allowed to change the assignee.' => 'No se li permet canviar el assignat.', 'Task suppression is not permitted' => 'No es permet la supressió de tasques', 'Changing assignee is not permitted' => 'No es permet el canvi de assignatari', 'Update only assigned tasks is permitted' => 'Actualitzar les tasques assignades només es permet', 'Only for tasks assigned to the current user' => 'Només per a les tasques assignades a l\'usuari actual', 'My projects' => 'Els meus projectes', 'You are not a member of any project.' => 'No és membre de cap projecte.', 'My subtasks' => 'Les meves subtasques', '%d subtasks' => '%d subtasques', '%d subtask' => '%d subtasca', 'Only moving task between those columns is permitted for tasks assigned to the current user' => 'Only moving task between those columns is permitted for tasks assigned to the current user', '[DUPLICATE]' => '[DUPLICATE]', // 'DKK - Danish Krona' => '', // 'Remove user from group' => '', // 'Assign the task to its creator' => '', // 'This task was sent by email to "%s" with subject "%s".' => '', // 'Predefined Email Subjects' => '', // 'Write one subject by line.' => '', // 'Create another link' => '', // 'BRL - Brazilian Real' => '', // 'Add a new Kanboard task' => '', // 'Subtask not started' => '', // 'Subtask currently in progress' => '', // 'Subtask completed' => '', // 'Subtask added successfully.' => '', // '%d subtasks added successfully.' => '', // 'Enter one subtask by line.' => '', // 'Predefined Contents' => '', // 'Predefined contents' => '', // 'Predefined Task Description' => '', // 'Do you really want to remove this template? "%s"' => '', // 'Add predefined task description' => '', // 'Predefined Task Descriptions' => '', // 'Template created successfully.' => '', // 'Unable to create this template.' => '', // 'Template updated successfully.' => '', // 'Unable to update this template.' => '', // 'Template removed successfully.' => '', // 'Unable to remove this template.' => '', // 'Template for the task description' => '', // 'The start date is greater than the end date' => '', // 'Tags must be separated by a comma' => '', // 'Only the task title is required' => '', // 'Creator Username' => '', // 'Color Name' => '', // 'Column Name' => '', // 'Swimlane Name' => '', // 'Time Estimated' => '', // 'Time Spent' => '', // 'External Link' => '', // 'This feature enables the iCal feed, RSS feed and the public board view.' => '', // 'Stop the timer of all subtasks when moving a task to another column' => '', // 'Subtask Title' => '', // 'Add a subtask and activate the timer when moving a task to another column' => '', // 'days' => '', // 'minutes' => '', // 'seconds' => '', // 'Assign automatically a color when preset start date is reached' => '', // 'Move the task to another column once a predefined start date is reached' => '', // 'This task is now linked to the task %s with the relation "%s"' => '', // 'The link with the relation "%s" to the task %s has been removed' => '', // 'Custom Filter:' => '', // 'Unable to find this group.' => '', // '%s moved the task #%d to the column "%s"' => '', // '%s moved the task #%d to the position %d in the column "%s"' => '', // '%s moved the task #%d to the swimlane "%s"' => '', // '%sh spent' => '', // '%sh estimated' => '', // 'Select All' => '', // 'Unselect All' => '', // 'Apply action' => '', // 'Move selected tasks to another column' => '', // 'Edit tasks in bulk' => '', // 'Choose the properties that you would like to change for the selected tasks.' => '', // 'Configure this project' => '', // 'Start now' => '', // '%s removed a file from the task #%d' => '', // 'Attachment removed from task #%d: %s' => '', // 'No color' => '', // 'Attachment removed "%s"' => '', // '%s removed a file from the task %s' => '', // 'Move the task to another swimlane when assigned to a user' => '', // 'Destination swimlane' => '', // 'Assign a category when the task is moved to a specific swimlane' => '', // 'Move the task to another swimlane when the category is changed' => '', // 'Reorder this column by priority (ASC)' => '', // 'Reorder this column by priority (DESC)' => '', // 'Reorder this column by assignee and priority (ASC)' => '', // 'Reorder this column by assignee and priority (DESC)' => '', // 'Reorder this column by assignee (A-Z)' => '', // 'Reorder this column by assignee (Z-A)' => '', // 'Reorder this column by due date (ASC)' => '', // 'Reorder this column by due date (DESC)' => '', // '%s moved the task #%d "%s" to the project "%s"' => '', // 'Task #%d "%s" has been moved to the project "%s"' => '', // 'Move the task to another column when the due date is less than a certain number of days' => '', // 'Automatically update the start date when the task is moved away from a specific column' => '', // 'HTTP Client:' => '', // 'Assigned' => '', // 'Task limits apply to each swimlane individually' => '', // 'Column task limits apply to each swimlane individually' => '', // 'Column task limits are applied to each swimlane individually' => '', // 'Column task limits are applied across swimlanes' => '', // 'Task limit: ' => '', // 'Change to global tag' => '', // 'Do you really want to make the tag "%s" global?' => '', // 'Enable global tags for this project' => '', // 'Group membership(s):' => '', // '%s is a member of the following group(s): %s' => '', // '%d/%d group(s) shown' => '', // 'Subtask creation or modification' => '', // 'Assign the task to a specific user when the task is moved to a specific swimlane' => '', // 'Comment' => '', // 'Collapse vertically' => '', // 'Expand vertically' => '', // 'MXN - Mexican Peso' => '', // 'Estimated vs actual time per column' => '', // 'HUF - Hungarian Forint' => '', // 'XBT - Bitcoin' => '', // 'You must select a file to upload as your avatar!' => '', // 'The file you uploaded is not a valid image! (Only *.gif, *.jpg, *.jpeg and *.png are allowed!)' => '', );
libin/kanboard
app/Locale/ca_ES/translations.php
PHP
mit
88,953
try { Add-Type -TypeDefinition "public enum Syslog_Facility { kern, user, mail, daemon, auth, syslog, lpr, news, uucp, cron, authpriv, ftp, ntp, logaudit, logalert, clock, local0, local1, local2, local3, local4, local5, local6, local7 }" Add-Type -TypeDefinition "public enum Syslog_Severity { emerg, alert, crit, err, warning, notice, info, debug }" } catch { } Function Send-SyslogMessage { <# .SYNOPSIS Sends a Syslog message to a server .DESCRIPTION Sends a message to a Syslog server as defined in RFC 3164. A Syslog message contains not only raw message text, but also a severity level and application/system within the host that generated the message .PARAMETER Server Destination Syslog server .PARAMETER Message Message to be sent. For Cisco messages, include from the percent sign (%) to the end. .PARAMETER Severity Severity level as defined in Syslog specification, must be of ENUM type Syslog_Severity .PARAMETER Facility Facility of message as defined in Syslog specification, must be of ENUM type Syslog_Facility .PARAMETER Hostname Hostname of machine the message is about, if not specified, local hostname will be used .PARAMETER Timestamp Timestamp, must be of format, 'MMM dd HH:mm:ss", if not specified, current date and time will be used .PARAMETER UDPPort Syslog UDP port to send message to. Defaults to 514. .PARAMETER CiscoStyle Boolean value that indicates whether or not this is a Cisco message. Defaults to false. .PARAMETER DellStyle Boolean value that indicates whether or not this is a Dell message. Defaults to false. .PARAMETER Program Sets the program that Syslog reports as the subject of the message. For Cisco alerts, this gets set to the PID of this script process .INPUTS None .OUTPUTS None .LINK http://www.ietf.org/rfc/rfc3164.txt .NOTES In order to test the Syslog Probe, add "SYNTHETIC:<host>:" to the beginning of your Message. This is done automatically if you use the InputFile mechanism .EXAMPLE Send-SyslogMessage mysyslogserver "The server is down!" Emergency Mail Sends a syslog message to mysyslogserver saying "The server is down!" #> [CMDLetBinding()] Param ( [Parameter(mandatory=$true)][String] $Server, [String] $Message, [Syslog_Severity] $Severity = "notice", [Syslog_Facility] $Facility = "user", [String] $Hostname = $env:COMPUTERNAME, [String] $Timestamp = (Get-Date -Format "MMM dd HH:mm:ss"), [int] $UDPPort = 514, [bool] $CiscoStyle = $false, [bool] $DellStyle = $false, [String] $Program = "Syslog-PowerShell", [String] $InputFile ) if (($Message -ne "" -and $Message -ne $null) -and ($InputFile -ne "" -and $InputFile -ne $null)) { Write-Error "You must supply only one of InputFile or Message" break } if (($Message -eq "" -or $Message -eq $null) -and ($InputFile -eq "" -or $InputFile -eq $null)) { Write-Error "You must supply either one of InputFile or Message" break } if ($Message -eq "" -or $Message -eq $null) { # We must have an InputFile $method = "file" } else { $method = "string" } # Evaluate the facility and severity based on the enum types $Facility_Number = $Facility.value__ $Severity_Number = $Severity.value__ Write-Verbose "Syslog Facility: $Facility_Number, Severity: $Severity_Number" # Calculate the priority $Priority = ($Facility_Number * 8) + $Severity_Number Write-Verbose "Priority is $Priority" # Assemble the full syslog formatted message if ($CiscoStyle -eq $true) { $Program = $PID } if ($DellStyle -eq $true) { $Program = "UTC" } # Create a UDP client and send the message $uc = New-Object System.Net.Sockets.UdpClient $uc.Connect($Server, $UDPPort) $udpStatus = "UDPClient connection status: {0}" -f $uc.Client.Connected Write-Verbose $udpStatus if ($uc.Client.Connected -eq $False) { Throw "Unable to connect to server" } if ($method -eq "string") { $FullSyslogMessage = "<{0}>{1} {2} {3}: {4}" -f $Priority, $Timestamp, $Hostname, $Program, $Message Write-Verbose $FullSyslogMessage # Create an ASCII byte array of the message $bytes = [System.Text.Encoding]::ASCII.GetBytes($FullSyslogMessage) # Trim to 1024 bytes per the standard if ($bytes.Length -gt 1024) { $bytes = $bytes[0..1023] } # Send the message via the UDPClient [void]$uc.Send($bytes, $bytes.Length) } elseif ($method -eq "file") { # Open the file and send each line Get-Content $InputFile | ForEach-Object { $line = $_ $IPAddress = $line.Substring($line.IndexOf("Node=")+5, $line.IndexOf("; Details=")-$line.IndexOf("Node=")-5) $Details = $line.Substring($line.IndexOf("; Details=")+10) $FullSyslogMessage = "<{0}>{1} {2} SYNTHETIC:{3}:{4}" -f $Priority, $Timestamp, $IPAddress, $IPAddress, $Details Write-Verbose $FullSyslogMessage # Create and ASCII byte array of the message $bytes = [System.Text.Encoding]::ASCII.GetBytes($FullSyslogMessage) # Trim to 1024 bytes per the standard if ($bytes.Length -gt 1024) { $bytes = $bytes[0..1023] } # Send the message via the UDPClient [void]$uc.Send($bytes, $bytes.Length) } } $FullSyslogMessage }
jheiselman/utilities
Powershell/Syslog/Syslog.psm1
PowerShell
mit
5,603
<?php namespace Bravesheep\PhpspecExtraMatchers\Matcher\Mink; use Behat\Mink\Session; use Bravesheep\PhpspecExtraMatchers\Matcher\SimpleMatcher; use PhpSpec\Exception\Example\FailureException; class StatusCodeMatcher extends SimpleMatcher { /** * {@inheritdoc} */ protected function matches($subject, array $arguments) { /** @var Session $session */ $session = $subject; return intval($session->getStatusCode()) === intval($arguments[0]); } /** * @param string $name * @param Session $subject * @param array $arguments * * @return FailureException */ protected function getFailureException($name, $subject, array $arguments) { return new FailureException(sprintf( 'Expected session to have status code %s, but it is %s.', $this->presenter->presentValue($subject->getCurrentUrl()), $this->presenter->presentValue($arguments[0]) )); } /** * @param string $name * @param Session $subject * @param array $arguments * * @return FailureException */ protected function getNegativeFailureException($name, $subject, array $arguments) { return new FailureException(sprintf( 'Expected session not to have status code %s, but it is.', $this->presenter->presentValue($subject->getStatusCode()) )); } /** * {@inheritdoc} */ protected function getNames() { return [ 'haveStatusCode', ]; } /** * {@inheritdoc} */ protected function getRequiredArgumentCount() { return 1; } /** * {@inheritdoc} */ protected function supportsSubject($subject) { return $subject instanceof Session; } }
bravesheep/phpspec-extra-matchers
src/Bravesheep/PhpspecExtraMatchers/Matcher/Mink/StatusCodeMatcher.php
PHP
mit
1,835
/** * @file DomTest.hpp * @brief Top level header for DomTest * @author Dominique LaSalle <wildriver@domnet.org> * Copyright 2015 * @version 1 * @date 2015-08-22 */ #ifndef DOMTEST_HPP #define DOMTEST_HPP #include <stdexcept> #include <string> #include <iostream> /****************************************************************************** * MACROS ********************************************************************** ******************************************************************************/ #define testEquals(a,b) \ if ((a) != (b)) { \ std::cerr << "Test Failed: " << #a << ":'" << a << "' != " << #b << ":'" \ << b << "' at " << __LINE__ << std::endl; \ throw TestFailed("Equals Failed"); \ } #define testStringEquals(a,b) \ if ((a).compare(b) != 0) { \ std::cerr << "Test Failed: " << #a << ":'" << a << "' != " << #b << ":'" \ << b << "' at " << __LINE__ << std::endl; \ throw TestFailed("Equals Failed"); \ } #define testTrue(a) \ if (!(a)) { \ std::cerr << "Test Failed: '" << #a << "' is false at: " << __LINE__ \ << std::endl; \ throw TestFailed("True Failed"); \ } #define testGreaterThan(a,b) \ if ((a) <= (b)) { \ std::cerr << "Test Failed:" << #a << ":'" << a << "' <= " << #b << ":'" \ << b << "' at " << __LINE__ << std::endl; \ throw TestFailed("Greater Than Failed"); \ } #define testGreaterThanOrEqual(a,b) \ if ((a) < (b)) { \ std::cerr << "Test Failed:" << #a << ":'" << a << "' < " << #b << ":'" \ << b << "' at " << __LINE__ << std::endl; \ throw TestFailed("Greater Than Or Equal Failed"); \ } namespace DomTest { class TestFailed : public std::logic_error { public: TestFailed(std::string const & str) : std::logic_error(str) { } }; /****************************************************************************** * TEST CLASS ****************************************************************** ******************************************************************************/ class Test { protected: void run(); public: static void removeFile( std::string const & file) { remove(file.c_str()); } Test() { }; bool evaluate() { try { run(); } catch (std::exception & e) { std::cerr << "FAILED: " << e.what() << std::endl; // fail return false; } // pass return true; }; virtual ~Test() { } }; } /****************************************************************************** * MAIN ************************************************************************ ******************************************************************************/ int main( int argc, char ** argv) { // make sure we don't have any useless arguments if (argc > 1) { for (int i=1; i<argc; ++i) { std::cerr << "Unused parameter: " << argv[i] << std::endl; } return 0; } DomTest::Test test; if (test.evaluate()) { return 0; } else { return 1; } } #endif
dlasalle/wildriver
src/test/DomTest.hpp
C++
mit
3,118
package com.accelad.acctive.sim.kernel.core.evaluator.diff; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.function.Predicate; import com.accelad.math.nilgiri.Field; import com.accelad.math.nilgiri.autodiff.DifferentialFunction; import com.accelad.math.nilgiri.autodiff.Variable; class VariableCheckFunctionDecorator<X extends Field<X>> extends DifferentialFunction<X> { private final DifferentialFunction<X> function; private final Map<DifferentialFunction<X>, Set<DifferentialFunctionPredicateChecker>> variableCheckerMap; VariableCheckFunctionDecorator(DifferentialFunction<X> function) { this(function, new HashMap<>()); } private VariableCheckFunctionDecorator(DifferentialFunction<X> function, Map<DifferentialFunction<X>, Set<DifferentialFunctionPredicateChecker>> variableCheckerMap) { this.function = function; this.variableCheckerMap = variableCheckerMap; } void addArgTest(DifferentialFunction<X> argFunction, Predicate<DifferentialFunction<X>> predicate, String errorMessage) { variableCheckerMap.putIfAbsent(argFunction, new HashSet<>()); variableCheckerMap.get(argFunction) .add(new DifferentialFunctionPredicateChecker(predicate, errorMessage)); } @Override public X getValue() { checkVariables(); return function.getValue(); } @Override public double getReal() { checkVariables(); return function.getReal(); } @Override public String getFormula(List<Variable<X>> variables) { return function.getFormula(variables); } @Override public String toString() { return function.toString(); } @Override public DifferentialFunction<X> diff(Variable<X> v) { return new VariableCheckFunctionDecorator<>(function.diff(v), variableCheckerMap); } private void checkVariables() { variableCheckerMap.forEach( (v, checkers) -> checkers.forEach(checker -> checker.checkVariable(v))); } private class DifferentialFunctionPredicateChecker { private final Predicate<DifferentialFunction<X>> predicate; private final String error; private DifferentialFunctionPredicateChecker(Predicate<DifferentialFunction<X>> predicate, String error) { this.predicate = predicate; this.error = error; } public void checkVariable(DifferentialFunction<X> variable) { if (!predicate.test(variable)) { throw new IllegalArgumentException(error); } } } }
accelad-com/math-evaluator
src/main/java/com/accelad/acctive/sim/kernel/core/evaluator/diff/VariableCheckFunctionDecorator.java
Java
mit
2,738
<!DOCTYPE html> <html> {{> head}} <body id="page"> {{> header}} <main> <section id="content" class="wrapper"> <h1>{{title}}</h1> {{{contents}}} </section> </main> {{> footer}} </body> </html>
justinhelmer/lodash.github.io
source/layouts/page.html
HTML
mit
242
/* Requirements */ var express = require('express'); var app = express() , server = require('http').createServer(app) , io = require('socket.io').listen(server) , mongoose = require('mongoose'); /* Initialization */ server.listen(3333); mongoose.connect('mongodb://localhost/test'); /* Global variable setup */ var serverRoot = __dirname; var Schema = mongoose.Schema; /* DB Schemas */ var adminSchema = new Schema({ first_name: String, last_name: String, email: {type: [String], index: true}, password: String, session_key: String }); var userSchema = new Schema({ first_name: String, last_name: String, email: {type: [String], index: true}, secret_key: String, has_voted: Boolean }); /* Models */ var Admin = mongoose.model('Admin', adminSchema); var User = mongoose.model('User', userSchema); /* Get the server up and running */ app.use(express.static(serverRoot)); app.use(express.bodyParser()); app.get('/', function (req, res) { res.sendfile(serverRoot + '/index.html'); }); app.post('/authenticate', function(req, res) { var date = new Date(); console.log("Authentication request received at " + date); Admin.findOne({email: req.body.email}, function(err, result) { if(err) { console.log("Error: " + err); throw(err); } if(!result) { //response to client for user not found/invalid email address res.send(401, {invalid_email: true}); } else { if(req.body.password !== result.password) { //response to client for invalid password res.send(401, {invalid_password: true}); } else { //res.cookie('admin_id', ) res.send({we: "fuckingdidit"}); } } }); });
anyaelise/dyo-layoff
app/server.js
JavaScript
mit
1,845
// Testable main #ifndef TEST #define MAIN main #else #define MAIN testable_main #endif int MAIN(void) { return 0; }
0ge/AxU
AxU/AVR.xctemplate/src/main.c
C
mit
120
/*Problem 8. Number as words Write a script that converts a number in the range [0…999] to words, corresponding to its English pronunciation.*/ String.prototype.capitalize = function() { return this.charAt(0).toUpperCase() + this.slice(1); }; var numbers = [0, 9, 10, 12, 19, 25, 98, 98, 273, 400, 501, 617, 711, 999]; for(var ind = 0; ind < numbers.length; ind++){ console.log(numbers[ind] + '\t' + getString(numbers[ind])); } function getString(number){ var text = '', hundreds = Math.floor(number / 100) % 10, tens = Math.floor(number / 10) % 10, ones = number % 10; if(!hundreds && !tens && !ones){ text = 'zero'; } if (hundreds) { text += getDigit(hundreds) + ' hundred'; } if (tens || ones) { if (text.length) { text += ' and '; } if (tens) { if (tens === 1) { return (text + getTeens(tens * 10 + ones)).capitalize(); } text += getTens(tens); } if (ones) { if(tens){ text += ' '; } text += getDigit(ones); } } return text.capitalize(); } function getDigit (digit) { switch(digit){ case 0: return 'zero'; case 1: return 'one'; case 2: return 'two'; case 3: return 'three'; case 4: return 'four'; case 5: return 'five'; case 6: return 'six'; case 7: return 'seven'; case 8: return 'eight'; case 9: return 'nine'; default: return ''; } } function getTens (digit) { switch(digit){ case 2: return 'twenty'; case 3: return 'thirty'; case 4: return 'forty'; case 5: return 'fifty'; case 6: return 'sixty'; case 7: return 'seventy'; case 8: return 'eighty'; case 9: return 'ninety'; default: return ''; } } function getTeens (digit) { switch(digit){ case 10: return 'ten'; case 11: return 'eleven'; case 12: return 'twelve'; case 13: return 'thirteen'; case 14: return 'fourteen'; case 15: return 'fifteen'; case 16: return 'sixteen'; case 17: return 'seventeen'; case 18: return 'eighteen'; case 19: return 'nineteen'; default: return ''; } }
AYankova/HTML-CSS
05. Conditional Statements/Problem 8. Number as words.js
JavaScript
mit
2,373
module ActionCost class StatsCollector def initialize @stats = {} end def push(request) ca = controller_action_string(request) add_request(ca, request.operation_stats, request.table_stats) end def log pp @stats end def data @stats end private def add_request(ca, operations, tables) if @stats[ca] @stats[ca][:num] += 1 else @stats[ca] = { :num => 1, :operations => { :sql => {}, :rc => {} }, :tables => { :sql => {}, :rc => {} } } end ActionCost::SqlParser::VALID_OPERATIONS.each do |op| increment_item(@stats[ca][:operations][:sql], op, operations[:sql][op]) increment_item(@stats[ca][:operations][:rc], op, operations[:rc][op]) end tables[:sql].each_key do |table| increment_item(@stats[ca][:tables][:sql], table, tables[:sql][table]) end tables[:rc].each_key do |table| increment_item(@stats[ca][:tables][:rc], table, tables[:rc][table]) end end def increment_item(hash, item, val) if hash[item] hash[item] += val else hash[item] = val end end def controller_action_string(request) "#{request.controller_name}/#{request.action_name}" end end end
plerohellec/action_cost
lib/action_cost/stats_collector.rb
Ruby
mit
1,338
class Event attr_reader :connection def initialize(connection, reaction_formatter) @connection = connection @reaction_formatter = reaction_formatter end def restaurants page.search('.myfooda-event__restaurant').map do |search_result| Restaurant.new(search_result, @reaction_formatter) end end def to_s "#{date}\n#{url}\n#{restaurants.join("\n")}" end def page @_page ||= parse end def raw_date page.search('.cal__day--active').first.text.strip end def date Date.parse(raw_date.split(',').last.strip) end def today? TimeHelpers.today?(date.to_time) end def tomorrow? TimeHelpers.tomorrow?(date.to_time) end def url connection.url end def slack_format restaurants.map(&:slack_format).join("\n") end def title 'Fooda' end private def parse connection.call end end
dpca/slack-fooda-bot
lib/fooda-bot/event.rb
Ruby
mit
888
// Type definitions for three.js (EffectComposer.js) // Project: https://github.com/mrdoob/three.js/blob/r68/examples/js/postprocessing/EffectComposer.js // Definitions by: Satoru Kimura <https://github.com/gyohk> // Definitions: https://github.com/borisyankov/DefinitelyTyped /// <reference path="./three.d.ts" /> /// <reference path="./three-shaderpass.d.ts" /> /// <reference path="./three-copyshader.d.ts" /> declare module THREE { export class EffectComposer { constructor( renderer: WebGLRenderer, renderTarget?: WebGLRenderTarget); renderTarget1: WebGLRenderTarget; renderTarget2: WebGLRenderTarget; writeBuffer: WebGLRenderTarget; readBuffer: WebGLRenderTarget; passes: any[]; copyPass: ShaderPass; swapBuffers(): void; addPass(pass: any): void; insertPass(pass: any, index: number): void; render(delta: number): void; reset(renderTarget?: WebGLRenderTarget): void; setSize( width: number, height: number ): void; } }
bobslaede/DefinitelyTyped
threejs/three-effectcomposer.d.ts
TypeScript
mit
960
class UserInput { constructor(game) { this.game = game; this.keyCodeMapper = { 37: 'left', 38: 'up', 39: 'right', 40: 'down' }; } getUserInput(){ window.addEventListener("keydown", this.sendUserInput.bind(this)); } sendUserInput(event) { var input = this.keyCodeMapper[event.keyCode]; var previousDirection = this.game.snake.direction; this.game.snake.setDirection(input, previousDirection); } } module.exports = UserInput;
kjs222/gametime
lib/userInput.js
JavaScript
mit
491
import { describe, it } from 'mocha'; import Immutable from 'immutable'; import deepFreeze from 'deep-freeze'; import { createStore } from 'redux'; import { createReducerTest, executeCbs } from './helpers'; import { defaultState as objDefaultState, actions as objActions } from './objectState/index'; import { defaultState as arrDefaultState, actions as arrActions } from './arrayState/index'; import { pathReducer } from '../'; const subscribedCbs = []; const immObjDefaultState = Immutable.fromJS(objDefaultState); // Immutable state const immArrDefaultState = Immutable.fromJS(arrDefaultState); // Immutable state const objReducer = (state = immObjDefaultState, action = {}) => { executeCbs(subscribedCbs, state, action); // We return original state in order to not mutate it, // So every test is done over the same initial state return state; }; const arrReducer = (state = immArrDefaultState, action = {}) => { executeCbs(subscribedCbs, state, action); // We return original state in order to not mutate it, // So every test is done over the same initial state return state; }; deepFreeze(immObjDefaultState); deepFreeze(immArrDefaultState); deepFreeze(objActions); deepFreeze(arrActions); export default function executeTest() { describe('Immutable object state store', () => { const store = createStore(objReducer); const test = createReducerTest(store, subscribedCbs, immObjDefaultState); let action; for (action in objActions) { // test(..) ensures the state is defaultState before each dispatch if (objActions.hasOwnProperty(action)) { it(`dispatch ${objActions[action].type} action`, test(objActions[action])); } } }); describe('Immutable array state store', () => { const store = createStore(arrReducer); const test = createReducerTest(store, subscribedCbs, immArrDefaultState); let action; for (action in arrActions) { // test(..) ensures the state is defaultState before each dispatch if (arrActions.hasOwnProperty(action)) { it(`dispatch ${arrActions[action].type} action`, test(arrActions[action])); } } }); describe('Immutable object state store with pathReducer wrapper', () => { let action; it('store should be correctly created with pathReducer wrapper', () => { createStore(pathReducer(objReducer)); }); for (action in objActions) { if (objActions.hasOwnProperty(action)) { // We need to recreate store as the state is being modified after each dispatch const store = createStore(pathReducer(objReducer)); const test = createReducerTest(store, subscribedCbs, immObjDefaultState, false); it(`dispatch ${objActions[action].type} action`, test(objActions[action])); } } }); describe('Immutable array state store with pathReducer wrapper', () => { let action; it('store should be correctly created with pathReducer wrapper', () => { createStore(pathReducer(objReducer)); }); for (action in arrActions) { if (arrActions.hasOwnProperty(action)) { // We need to recreate store as the state is being modified after each dispatch const store = createStore(pathReducer(arrReducer)); const test = createReducerTest(store, subscribedCbs, immArrDefaultState, false); it(`dispatch ${arrActions[action].type} action`, test(arrActions[action])); } } }); }
appfeel/path-reducer
test/immutableState.js
JavaScript
mit
3,701
<!doctype html> <html> <head> <title>Season Tracker Options</title> <link rel="icon" type="image/png" href="icon.png" /> <link href="css/bootstrap.min.css" rel="stylesheet"> <script type="text/javascript" src="js/jquery.js"></script> <script src="options.js"></script> </head> <body> <div class="container"> <nav class="navbar navbar-inverse navbar-fixed-top"> <div class="container"> <div class="navbar-header"> <a class="navbar-brand" href="#" id="info_title"></a> </div> </div> </nav> <br/> <br/> <br/> <div class="form-inline"> <input type="text" id="in_seriesId" placeholder="IMDB Id (tt1234567)" class="form-control"> <button id='btn_getImdbData' class="btn btn-primary">Add series</button> <!--<button id='btn_clearStorage' class="btn btn-danger">Delete All</button>--> <button id='btn_refreshInfo' class="btn btn-success">Refresh Info</button> </div> <hr/> <label id="lbl_imdbJsonIds"></label> <hr/> <table id="tbl_series" class="table table-hover table-bordered"> </table> <hr/> <h3>Inaktiv</h3> <select class="form-control" id="drop_inactiveSeries"> </select> <button id='btn_setActive' class="btn btn-success"></button> <hr/> <h3>Import / Export</h3> <textarea class="form-control" id="txt_IOData" placeholder="Data for import and export" rows="5"></textarea> <br/> <button id='btn_exportJSON' class="btn btn-success"></button> <button id='btn_importJSON' class="btn btn-info"></button> <hr/> <h3 id="h_settings">Settings</h3> <input type="checkbox" id="check_setting_incognito"> <label id="lbl_settings_icognito"></label> <br /> <input type="checkbox" id="check_setting_useIMDB"> <label id="lbl_settings_useIMDB"></label> <hr/> Extension by <a href="mailto:vabene1234@googlemail.com">vaBene1111</a> - <a href="https://github.com/vabene1111/ChromeSeasonTracker">GitHub</a> - Icon made by <a href="http://www.flaticon.com/authors/freepik" target="_blank">freepik</a> from <a href="http://www.flaticon.com/" target="_blank">www.flaticon.com</a> <br/> <br/> <br/> </div> </body> </html>
vabene1111/ChromeSeasonTracker
options.html
HTML
mit
2,442
using SIS.Framework; using System.Collections.Generic; using Torshia.Models; using Torshia.Models.Enums; using Toshia.Data; namespace Torshia { public class Launcher { public static void Main() { //SeedTasks(); WebHost.Start(new StartUp()); } private static void SeedTasks() { var db = new TorshiaContext(); for (int i = 1; i <= 10; i++) { db.Tasks.Add(new Task { Title = $"Fix Business Agenda{i}", DueDate = new System.DateTime(2019 + i, 09, 11 + i), Description = $"The business agaenda of the company needs to be rethought.{i}", Participants = $"Todor Ivanov{i}, Jordan Draganov{i}, Dimitar Stefanov{i}", AffectedSectors = new List<TaskSector>() { new TaskSector(){ Sector= Sector.Management}, new TaskSector(){ Sector=Sector.Finances }, new TaskSector(){ Sector=Sector.Management }, new TaskSector(){ Sector=Sector.Internal} } }); } db.SaveChanges(); } } }
MihailDobrev/SoftUni
C# Web/C# Web Development Basics/Exam Preparation I - Torshia/Torshia/Launcher.cs
C#
mit
1,267
import Washi from '../washi' describe('Chain', function() { it('can chain objects', function() { var obj = {} var mock = jest.fn() Washi.$.chain(obj).tap(mock) expect(mock.mock.calls[0][0]).toEqual(obj) }) it('can chain arrays', function() { var arr = [1] var result = Washi.$ .chain(arr) .map(function(i) { return i + 1 }) .valueOf() expect(result).toEqual([2]) }) it('has access to the element on calls', function() { var el = document.createElement('button') var mock = jest.fn() Washi.$ .chain(el) .tap(mock) .tap(mock) expect(mock.mock.calls[0][0]).toEqual(el) }) it('can chain multiple times', function() { var el = document.createElement('button') var mock = jest.fn() Washi.$ .chain(el) .tap(mock) .tap(mock) expect(mock.mock.calls.length).toEqual(2) }) it('returns the result of a previous chain to the next if provided', function() { var el = document.createElement('button') var mock = jest.fn() var result = Washi.$([el, el]) .map(function(el) { return el.tagName }) .reduce(function(a, b) { return [a, b].join(' ') }, '') .valueOf() .trim() expect(result).toEqual('BUTTON BUTTON') }) })
vigetlabs/washi
__tests__/chain-test.js
JavaScript
mit
1,331
/* * Kendo UI Complete v2013.2.918 (http://kendoui.com) * Copyright 2013 Telerik AD. All rights reserved. * * Kendo UI Complete commercial licenses may be obtained at * https://www.kendoui.com/purchase/license-agreement/kendo-ui-complete-commercial.aspx * If you do not own a commercial license, this file shall be governed by the trial license terms. */ kendo_module({ id: "mobile.shim", name: "Shim", category: "mobile", description: "Mobile Shim", depends: [ "popup" ], hidden: true }); (function($, undefined) { var kendo = window.kendo, ui = kendo.mobile.ui, Popup = kendo.ui.Popup, SHIM = '<div class="km-shim"/>', Widget = ui.Widget; var Shim = Widget.extend({ init: function(element, options) { var that = this, app = kendo.mobile.application, osname = app ? app.os.name : kendo.support.mobileOS.name, ioswp = osname === "ios" || osname === "wp" || app.os.skin, bb = osname === "blackberry", align = options.align || (ioswp ? "bottom center" : bb ? "center right" : "center center"), position = options.position || (ioswp ? "bottom center" : bb ? "center right" : "center center"), effect = options.effect || (ioswp ? "slideIn:up" : bb ? "slideIn:left" : "fade:in"), shim = $(SHIM).handler(that).hide(); Widget.fn.init.call(that, element, options); that.shim = shim; that.element = element; if (!that.options.modal) { that.shim.on("up", "hide"); } (app ? app.element : $(document.body)).append(shim); that.popup = new Popup(that.element, { anchor: shim, modal: true, appendTo: shim, origin: align, position: position, animation: { open: { effects: effect, duration: that.options.duration }, close: { duration: that.options.duration } }, deactivate: function() { shim.hide(); }, open: function() { shim.show(); } }); kendo.notify(that); }, options: { name: "Shim", modal: true, align: undefined, position: undefined, effect: undefined, duration: 200 }, show: function() { this.shim.css("height", this.shim.parent()[0].scrollHeight); this.popup.open(); }, hide: function(e) { if (!e || !$.contains(this.shim[0], e.target)) { this.popup.close(); } }, destroy: function() { Widget.fn.destroy.call(this); this.shim.kendoDestroy(); this.popup.destroy(); this.shim.remove(); } }); ui.plugin(Shim); })(window.kendo.jQuery);
staafl/team-azure-dragon
src/LearningSystem.App/Scripts/KendoUI/kendo.mobile.shim.js
JavaScript
mit
3,206
import { inject, TestBed } from "@angular/core/testing"; import { JsonSchemaFileService } from "./json-schema-file.service"; describe("JsonSchemaFileService", () => { beforeEach(() => { TestBed.configureTestingModule({ providers: [JsonSchemaFileService], }); }); });
Marketto/mkServiceDesigner
src/app/file-service/json-file-service/json-schema-file.service.spec.ts
TypeScript
mit
288
title: How to setup Django + mysql + Apache date: 2014-08-23 14:21:36 tags: --- ### Below is a step by step account of how to set up a django (1.6) web application on a CentOS (6.4) server, running Apache (2.5) and python (2.6, 2.7) 1: **Login as root and set up a new user** You probably want to eventually disable root login ``` "bash" ssh root@[ip address] ``` Create user ``` "bash" useradd myuser passwd myuser ``` Add user to a sudo enabled group ``` "bash" usermod -a -G wheel myuser ``` Allow the wheel group to use sudo by editing the shudders file `visudo -f /etc/sudoers` ``` "AsciiDoc" "edit the following snippet" ## Allows people in group wheel to run all commands # %wheel ALL=(ALL) ALL ``` `exit` 2: **Login without typing in your password (not strictly necessary)** [cite](http://wiki.centos.org/HowTos/Network/SecuringSSH) On your local machine, generate public/private key ``` "bash" ssh-keygen -t rsa ``` Set permissions on your private key ``` "bash" chmod 700 ~/.ssh chmod 600 ~/.ssh/id_rsa ``` Copy your public key onto remote server ``` "bash" scp ~/.ssh/id_rsa.pub myuser@[ip address]:/home/myuser ``` On remote machine ``` "bash" ssh myuser@[ip address] mkdir ~/.ssh touch ~/.ssh/authorized_keys ``` Add public key to authorized list ``` "bash" cat id_rsa.pub >> ~/.ssh/authorized_keys rm id_rsa.pub ``` Set permissions ``` "bash" chmod 700 ~/.ssh chmod 600 ~/.ssh/authorized_keys ``` 3: **Install necessary packages. Since this is for CentOS, we yum.** [cite](http://itekblog.com/django-centos-6-4/) Check centos version. These cmds are for centos 6.4 ``` "bash" cat /etc/redhat-release ``` `su` Add the EPEL repositories to get Django ``` "bash" cd /opt/ wget http://mirrors.nl.eu.kernel.org/fedora-epel/6/i386/epel-release-6-8.noarch.rpm rpm -Uvh epel-release-6-8.noarch.rpm rm epel-release-6-8.noarch.rpm -f ``` Install packages ``` "bash" yum upgrade yum install python (should be 2.6.6) yum install sqlite yum install mod_wsgi yum install mysql mysql-server yum install python-pip pip install Django==1.6 (1.6 or whatever version you want) yum -y install mysql-devel yum install MySQL-python ``` Check to see if django works `python` ``` "python" import django print django.get_version() quit() ``` `exit` 4: **Django** ``` "bash" django-admin.py startproject mysite cd mysite ``` Add all of application specific code. For beginners, use this [tutorial](https://docs.djangoproject.com/en/1.6/intro/tutorial01/) 5: **Create a mysql database (or skip this and use mysqlite)** `su` Get mysql working, choose a password ``` "bash" chkconfig --levels 235 mysqld on /etc/init.d/mysqld start mysql_secure_installation ``` Create a new mysql user `mysql -u root -p` ``` "sql" create database mysitedb; GRANT ALL PRIVILEGES ON mysitedb.* To 'user'@'localhost' IDENTIFIED BY 'password'; quit; ``` `exit` Add the details to your database to the django settings file `vi ~/mysite/mysite/settings.py` ``` "python" "Add the following snippets" ALLOWED_HOSTS = ['my.server.ip.address'] DATABASES = { 'default': { # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 'ENGINE': 'django.db.backends.mysql', 'NAME': 'mysitedb', 'USER': 'mysiteuser', 'PASSWORD': 'password', 'HOST': '', 'PORT': '', } } TEMPLATE_DIRS = ( os.path.join(BASE_DIR, "templates"), ) ``` Have python create mysql tables ``` "bash" cd ~/mysite/ python manage.py syncdb python manage.py sql [name of app] # if you have any apps python manage.py syncdb ``` 6: **Set up mod_wsgi (A python library for Apache). For testing, you can skip this and just use the development server that comes with django (instead of Apache).** Development server ``` "bash" python manage.py runserver ``` `su` Configure apache module for django `vi /etc/httpd/conf.d/wsgi.conf` ``` "apache" LoadModule wsgi_module modules/mod_wsgi.so <VirtualHost *:80> ServerName www.mywebsite.com ServerAlias mywebsite.com ServerAdmin webmaster@mywebsite.com Alias /static/admin/ /usr/lib/python2.6/site-packages/django/contrib/admin/static/admin/ Alias /robots.txt /home/username/mysite/static/robots.txt Alias /favicon.ico /home/username/mysite/static/favicon.ico AliasMatch ^/([^/]*\.css) /home/username/mysite/static/styles/$1 Alias /media/ /home/username/mysite/media/ <Directory /home/username/mysite/media> Order deny,allow Allow from all </Directory> Alias /static/ /home/username/mysite/static/ <Directory /home/username/mysite/static> Order deny,allow Allow from all </Directory> # WSGIDaemonProcess mywebsite.com python-path=/home/username/mysite:/usr/lib/python2.6/ # WSGIProcessGroup mywebsite.com WSGIScriptAlias / /home/username/mysite/mysite/wsgi.py <Directory /home/username/mysite/mysite> <Files wsgi.py> # WSGIProcessGroup mywebsite.com Order allow,deny Allow from all </Files> </Directory> </VirtualHost> ``` Restart after changing config files ``` "bash" sudo apachectl restart # or, if that fails try this version /sbin/service httpd restart ``` other commands ``` "bash" apachectl start apachectl stop apachectl status httpd -v ``` Testing: `vi /var/www/html/index.html` 7: **Troubleshooting 403 permission denied errors. After every change, restart apache and check website.** Set user permissions for project files Folders (0755 = User:rwx Group:r-x World:r-x) Files (0644 = User:rwx Group:r World:r) ``` "bash" su chmod 755 /home chmod 755 /home/username chmod 755 /home/username/mysite -R chmod 644 /home/username/mysite/wsgi.py exit ``` Add project folder to system path `vi mysite/wsgi.py` ``` "python" "Add snippet to the top of the file" import sys sys.path.append('/home/username') sys.path.append('/home/username/mysite') ``` [Problems with SELinux](http://blog.endpoint.com/2010/02/selinux-httpd-modwsgi-26-rhel-centos-5.html) ``` "bash" su setsebool -P httpd_can_network_connect on setsebool -P httpd_enable_homedirs on setsebool -P httpd_can_sendmail on restorecon -vR /etc/httpd exit ``` [Config problems on CentOS](http://code.google.com/p/modwsgi/wiki/WhereToGetHelp?tm=6#Conference_Presentations)
babraham123/mysite-blog
source/_posts/How-to-setup-Django-+-mysql-+-Apache.md
Markdown
mit
6,275
<?php /* flush content from a category, event, playlist, whatever can be done by owners of the meta object */ $login_required = true; require_once('/median-webapp/includes/login_check.php'); require_once('/median-webapp/includes/error_functions.php'); require_once('/median-webapp/includes/meta_functions.php'); /* routing start */ if (!isset($_GET['w']) || trim($_GET['w']) == '') { bailout('No route provided.', $current_user['userid']); } $route_name = strtolower(trim($_GET['w'])); $allowed_routes = array('category', 'group', 'event', 'class', 'playlist'); if (!in_array($route_name, $allowed_routes)) { bailout('Not an acceptable route.', $current_user['userid'], null, $route_name); } $route_id = 0; switch ($route_name) { case 'category': case 'group': case 'event': case 'playlist': if (!isset($_GET['id']) || !is_numeric($_GET['id'])) { bailout('No valid route ID provided.', $current_user['userid']); } $route_id = (int) $_GET['id'] * 1; break; case 'class': $route_id = strtoupper(trim($_GET['id'])); break; } if ($route_name != 'class' && $route_id == 0) { bailout('No valid route ID provided.', $current_user['userid']); } /* routing end */ /* permissions check start */ require_once('/median-webapp/includes/permission_functions.php'); $can_edit_this = false; switch ($route_name) { case 'category': $can_edit_this = canEditCategory($current_user['userid'], $route_id); break; case 'event': $can_edit_this = canEditEvent($current_user['userid'], $route_id); break; case 'group': $can_edit_this = canEditGroup($current_user['userid'], $route_id); break; case 'class': $can_edit_this = isTeachingClass($current_user['userid'], $route_id); break; case 'playlist': $can_edit_this = canEditPlaylist($current_user['userid'], $route_id); break; } if (!$can_edit_this) { bailout('Sorry, you do not have permission to edit this.', $current_user['userid'], null, $route_id); } /* permissions check end */ if (isset($_POST['mids']) && is_array($_POST['mids'])) { $use_mids = true; $mids = array(); foreach ($_POST['mids'] as $selected_mid) { if (!is_numeric($selected_mid)) { continue; } $mids[] = (int) $selected_mid * 1; } $mids = array_unique($mids); if (count($mids) == 0) { bailout('Sorry, you have not selected any media IDs to remove.', $current_user['userid'], null, $route_id); } } else { $use_mids = false; } /* ok, flush! */ switch ($route_name) { case 'category': try { if ($use_mids) { // remove all mention of the category from media association $delete_from_media = $mdb->media->update( array('mid' => array('$in' => $mids) ), array('$pull' => array('as.ca' => $route_id)), array('multiple' => true, 'w' => 1)); // if those media had no other category, add them to Uncategorized $update_media = $mdb->media->update( array('mid' => array('$in' => $mids), 'as.ca' => array('$size' => 0) ), array( '$push' => array( 'as.ca' => 1 ) ), array('multiple' => true, 'w' => 1) ); // delete activities $delete_activity = $mdb->activity->remove(array('cid' => $route_id, 't' => 'newmid', 'mid' => array('$in' => $mids) ), array('multiple' => true)); } else { // get mids using this category to clear them all $get_media = $mdb->media->find(array('as.ca' => $route_id), array('mid' => true) ); $mids = array(); foreach ($get_media as $media_entry) { $mids[] = $media_entry['mid']; } unset($get_media); // remove all mention of the category from media association $delete_from_media = $mdb->media->update( array(), array('$pull' => array('as.ca' => $route_id)), array('multiple' => true, 'w' => 1)); // if those media had no other category, add them to Uncategorized $update_media = $mdb->media->update( array('mid' => array('$in' => $mids), 'as.ca' => array('$size' => 0) ), array( '$push' => array( 'as.ca' => 1 ) ), array('multiple' => true, 'w' => 1) ); // delete activities $delete_activity = $mdb->activity->remove(array('cid' => $route_id, 't' => 'newmid'), array('multiple' => true)); } } catch(MongoCursorException $e) { bailout('There was an error clearing the media.', $current_user['userid']); } break; case 'event': try { if ($use_mids) { // remove all mention of the event from media association $delete_from_media = $mdb->media->update( array('mid' => array('$in' => $mids) ), array('$pull' => array('as.ev' => $route_id)), array('multiple' => true, 'w' => 1)); // delete activities $delete_activity = $mdb->activity->remove(array('eid' => $route_id, 't' => 'newmid', 'mid' => array('$in' => $mids) ), array('multiple' => true)); } else { // remove all mention of the event from media association $delete_from_media = $mdb->media->update( array(), array('$pull' => array('as.ev' => $route_id)), array('multiple' => true, 'w' => 1)); // delete activities $delete_activity = $mdb->activity->remove(array('eid' => $route_id, 't' => 'newmid'), array('multiple' => true)); } } catch(MongoCursorException $e) { bailout('There was an error clearing the media.', $current_user['userid']); } break; case 'group': try { if ($use_mids) { // remove all mention of the group from media ownership or restriction $delete_from_media = $mdb->media->update( array('mid' => array('$in' => $mids) ), array('$pull' => array('ow.g' => $route_id)), array('multiple' => true, 'w' => 1)); // delete activities $delete_activity = $mdb->activity->remove(array('gid' => $route_id, 't' => 'newmid', 'mid' => array('$in' => $mids)), array('multiple' => true)); } else { // remove all mention of the group from media ownership or restriction $delete_from_media = $mdb->media->update( array(), array('$pull' => array('ow.g' => $route_id)), array('multiple' => true, 'w' => 1)); // delete activities $delete_activity = $mdb->activity->remove(array('gid' => $route_id, 't' => 'newmid'), array('multiple' => true)); } } catch(MongoCursorException $e) { bailout('There was an error clearing the media.', $current_user['userid']); } break; case 'class': $class = array('c' => $route_id, 's' => getCurrentSemesterCode()); try { if ($use_mids) { // remove all mention of the group from media ownership or restriction $delete_from_media = $mdb->media->update( array('mid' => array('$in' => $mids) ), array('$pull' => array('as.cl' => $class)), array('multiple' => true, 'w' => 1)); // delete activities $delete_activity = $mdb->activity->remove(array('clid' => $class, 't' => 'newmid', 'mid' => array('$in' => $mids)), array('multiple' => true)); } else { // remove all mention of the group from media ownership or restriction $delete_from_media = $mdb->media->update( array(), array('$pull' => array('as.cl' => $class)), array('multiple' => true, 'w' => 1)); // delete activities $delete_activity = $mdb->activity->remove(array('clid' => $class, 't' => 'newmid'), array('multiple' => true)); } } catch(MongoCursorException $e) { bailout('There was an error clearing the media.', $current_user['userid']); } break; case 'playlist': try { if ($use_mids) { // remove all mention of the playlist from media association $delete_from_media = $mdb->media->update( array('mid' => array('$in' => $mids) ), array('$pull' => array('as.pl' => $route_id)), array('multiple' => true, 'w' => 1)); // delete activities $delete_activity = $mdb->activity->remove(array('plid' => $route_id, 't' => 'newmid', 'mid' => array('$in' => $mids) ), array('multiple' => true)); } else { // remove all mention of the playlist from media association $delete_from_media = $mdb->media->update( array(), array('$pull' => array('as.pl' => $route_id)), array('multiple' => true, 'w' => 1)); // delete activities $delete_activity = $mdb->activity->remove(array('plid' => $route_id, 't' => 'newmid'), array('multiple' => true)); } } catch(MongoCursorException $e) { bailout('There was an error clearing the media.', $current_user['userid']); } break; } if ($use_mids) { echo 'done'; } else { header('Location: /'.$route_name.'/'.$route_id.'/'); }
emersonit/median
code/webapp/www/do/flush.php
PHP
mit
8,101
#!/usr/bin/env python '''coffeehandlers.py - Waqas Bhatti (wbhatti@astro.princeton.edu) - Jul 2014 This contains the URL handlers for the astroph-coffee web-server. ''' import os.path import logging import base64 import re LOGGER = logging.getLogger(__name__) from datetime import datetime, timedelta from pytz import utc, timezone import tornado.web from tornado.escape import xhtml_escape, xhtml_unescape, url_unescape, squeeze import arxivdb import webdb import fulltextsearch as fts import ipaddress ###################### ## USEFUL CONSTANTS ## ###################### ARCHIVEDATE_REGEX = re.compile(r'^(\d{4})(\d{2})(\d{2})$') MONTH_NAMES = {x:datetime(year=2014,month=x,day=12) for x in range(1,13)} ###################### ## USEFUL FUNCTIONS ## ###################### def msgencode(message, signer): '''This escapes a message, then base64 encodes it. Uses an itsdangerous.Signer instance provided as the signer arg to sign the message to protect against tampering. ''' try: msg = base64.b64encode(signer.sign(xhtml_escape(message))) msg = msg.replace('=','*') return msg except Exception as e: return '' def msgdecode(message, signer): '''This base64 decodes a message, then unescapes it. Uses an itsdangerous.Signer instance provided as the signer arg to verify the message to protect against tampering. ''' try: msg = message.replace('*','=') decoded_message = base64.b64decode(msg) decoded_message = signer.unsign(decoded_message) return xhtml_unescape(decoded_message) except Exception as e: return '' def group_arxiv_dates(dates, npapers, nlocal, nvoted): ''' This takes a list of datetime.dates and the number of papers corresponding to each date and builds a nice dict out of it, allowing the following listing (in rev-chron order) to be made: YEAR X Month X: Date X --- <strong>YY<strong> papers . . . YEAR 1 Month 1: Date 1 --- <strong>YY<strong> papers ''' years, months = [], [] for x in dates: years.append(x.year) months.append(x.month) unique_years = set(years) unique_months = set(months) yeardict = {} for year in unique_years: yeardict[year] = {} for month in unique_months: yeardict[year][MONTH_NAMES[month]] = [ (x,y,z,w) for (x,y,z,w) in zip(dates, npapers, nlocal, nvoted) if (x.year == year and x.month == month) ] for month in yeardict[year].copy(): if not yeardict[year][month]: del yeardict[year][month] return yeardict ################## ## URL HANDLERS ## ################## class CoffeeHandler(tornado.web.RequestHandler): ''' This handles all requests for /astroph-coffee and redirects based on time of day. ''' def initialize(self, database, voting_start, voting_end, coffee_time, server_tz, signer, room, building, department, institution): ''' Sets up the database. ''' self.database = database self.voting_start = voting_start self.voting_end = voting_end self.coffee_time = coffee_time self.local_tz = timezone(server_tz) self.signer = signer self.room = room self.building = building self.department = department self.institution = institution def get(self): ''' This handles GET requests. ''' # handle a redirect with an attached flash message flash_message = self.get_argument('f', None) if flash_message: flashtext = msgdecode(flash_message, self.signer) LOGGER.warning('flash message: %s' % flashtext) flashbox = ( '<div data-alert class="alert-box radius">%s' ' <a class="close">&times;</a></div>' % flashtext ) flash_message = flashbox else: flash_message = '' # first, get the session token session_token = self.get_secure_cookie('coffee_session', max_age_days=30) ip_address = self.request.remote_ip if 'User-Agent' in self.request.headers: client_header = self.request.headers['User-Agent'] or 'none' else: client_header = 'none' local_today = datetime.now(tz=utc).strftime('%Y-%m-%d %H:%M %Z') user_name = 'anonuser@%s' % ip_address new_user = True # check if we're in voting time-limits timenow = datetime.now(tz=utc).timetz() # check if this session_token corresponds to an existing user if session_token: sessioninfo = webdb.session_check(session_token, database=self.database) if sessioninfo[0]: user_name = sessioninfo[2] LOGGER.info('found session for %s, continuing with it' % user_name) new_user = False elif sessioninfo[-1] != 'database_error': LOGGER.warning('unknown user, starting a new session for ' '%s, %s' % (ip_address, client_header)) sessionok, token = webdb.anon_session_initiate( ip_address, client_header, database=self.database ) if sessionok and token: self.set_secure_cookie('coffee_session', token, httponly=True) else: LOGGER.error('could not set session cookie for %s, %s' % (ip_address, client_header)) self.set_status(500) message = ("There was a database error " "trying to look up user credentials.") LOGGER.error('database error while looking up session for ' '%s, %s' % (ip_address, client_header)) self.render("errorpage.html", user_name=user_name, local_today=local_today, error_message=message, flash_message=flash_message, new_user=new_user) else: self.set_status(500) message = ("There was a database error " "trying to look up user credentials.") LOGGER.error('database error while looking up session for ' '%s, %s' % (ip_address, client_header)) self.render("errorpage.html", user_name=user_name, local_today=local_today, error_message=message, flash_message=flash_message, new_user=new_user) # there's no existing user session else: if ('crawler' not in client_header.lower() and 'bot' not in client_header.lower()): LOGGER.warning('unknown user, starting a new session for ' '%s, %s' % (ip_address, client_header)) sessionok, token = webdb.anon_session_initiate( ip_address, client_header, database=self.database ) if sessionok and token: self.set_secure_cookie('coffee_session', token, httponly=True) else: LOGGER.error('could not set session cookie for %s, %s' % (ip_address, client_header)) self.set_status(500) message = ("There was a database error " "trying to look up user credentials.") LOGGER.error('database error while looking up session for ' '%s, %s' % (ip_address, client_header)) self.render("errorpage.html", user_name=user_name, local_today=local_today, error_message=message, flash_message=flash_message, new_user=new_user) # construct the current dt and use it to figure out the local-to-server # voting times dtnow = datetime.now(tz=utc) dtstart = dtnow.replace(hour=self.voting_start.hour, minute=self.voting_start.minute, second=0) local_start = dtstart.astimezone(self.local_tz) local_start = local_start.strftime('%H:%M %Z') dtend = dtnow.replace(hour=self.voting_end.hour, minute=self.voting_end.minute, second=0) local_end = dtend.astimezone(self.local_tz) local_end = local_end.strftime('%H:%M %Z') dtcoffee = dtnow.replace(hour=self.coffee_time.hour, minute=self.coffee_time.minute, second=0) local_coffee = dtcoffee.astimezone(self.local_tz) local_coffee = local_coffee.strftime('%H:%M %Z') utc_start = self.voting_start.strftime('%H:%M %Z') utc_end = self.voting_end.strftime('%H:%M %Z') utc_coffee = self.coffee_time.strftime('%H:%M %Z') self.render("index.html", user_name=user_name, local_today=local_today, voting_localstart=local_start, voting_localend=local_end, voting_start=utc_start, voting_end=utc_end, coffeetime_local=local_coffee, coffeetime_utc=utc_coffee, flash_message=flash_message, new_user=new_user, coffee_room=self.room, coffee_building=self.building, coffee_department=self.department, coffee_institution=self.institution) class ArticleListHandler(tornado.web.RequestHandler): '''This handles all requests for the listing of selected articles and voting pages. Note: if nobody voted on anything, the default is to return all articles with local authors at the top. ''' def initialize(self, database, voting_start, voting_end, server_tz, reserve_interval, signer): ''' Sets up the database. ''' self.database = database self.voting_start = voting_start self.voting_end = voting_end self.server_tz = server_tz self.signer = signer self.reserve_interval = reserve_interval def get(self): ''' This handles GET requests. ''' # handle a redirect with an attached flash message flash_message = self.get_argument('f', None) if flash_message: flashtext = msgdecode(flash_message, self.signer) LOGGER.warning('flash message: %s' % flashtext) flashbox = ( '<div data-alert class="alert-box radius">%s' '<a href="#" class="close">&times;</a></div>' % flashtext ) flash_message = flashbox else: flash_message = '' # first, get the session token session_token = self.get_secure_cookie('coffee_session', max_age_days=30) ip_address = self.request.remote_ip if 'User-Agent' in self.request.headers: client_header = self.request.headers['User-Agent'] or 'none' else: client_header = 'none' local_today = datetime.now(tz=utc).strftime('%Y-%m-%d %H:%M %Z') todays_date = datetime.now(tz=utc).strftime('%A, %b %d %Y') todays_utcdate = datetime.now(tz=utc).strftime('%Y-%m-%d') todays_localdate = ( datetime.now(tz=timezone(self.server_tz)).strftime('%Y-%m-%d') ) todays_utcdow = datetime.now(tz=utc).weekday() todays_localdate_str = ( datetime.now(tz=timezone(self.server_tz)).strftime('%A, %b %d %Y') ) user_name = 'anonuser@%s' % ip_address new_user = True # check if this session_token corresponds to an existing user if session_token: sessioninfo = webdb.session_check(session_token, database=self.database) if sessioninfo[0]: user_name = sessioninfo[2] LOGGER.info('found session for %s, continuing with it' % user_name) new_user = False elif sessioninfo[-1] != 'database_error': LOGGER.warning('unknown user, starting a new session for ' '%s, %s' % (ip_address, client_header)) sessionok, token = webdb.anon_session_initiate( ip_address, client_header, database=self.database ) if sessionok and token: self.set_secure_cookie('coffee_session', token, httponly=True) else: LOGGER.error('could not set session cookie for %s, %s' % (ip_address, client_header)) self.set_status(500) message = ("There was a database error " "trying to look up user credentials.") LOGGER.error('database error while looking up session for ' '%s, %s' % (ip_address, client_header)) self.render("errorpage.html", user_name=user_name, local_today=local_today, error_message=message, flash_message=flash_message, new_user=new_user) else: self.set_status(500) message = ("There was a database error " "trying to look up user credentials.") LOGGER.error('database error while looking up session for ' '%s, %s' % (ip_address, client_header)) self.render("errorpage.html", user_name=user_name, local_today=local_today, error_message=message, flash_message=flash_message, new_user=new_user) # there's no existing user session else: if ('crawler' not in client_header.lower() and 'bot' not in client_header.lower()): LOGGER.warning('unknown user, starting a new session for ' '%s, %s' % (ip_address, client_header)) sessionok, token = webdb.anon_session_initiate( ip_address, client_header, database=self.database ) if sessionok and token: self.set_secure_cookie('coffee_session', token, httponly=True) else: LOGGER.error('could not set session cookie for %s, %s' % (ip_address, client_header)) self.set_status(500) message = ("There was a database error " "trying to look up user credentials.") LOGGER.error('database error while looking up session for ' '%s, %s' % (ip_address, client_header)) self.render("errorpage.html", user_name=user_name, local_today=local_today, error_message=message, flash_message=flash_message, new_user=new_user) ############################ ## SERVE THE PAGE REQUEST ## ############################ # check if we're in voting time-limits timenow = datetime.now(tz=utc).timetz() # if we are within the time limits, then show the voting page if (self.voting_start < timenow < self.voting_end): # get the articles for today (local_articles, voted_articles, other_articles, reserved_articles) = ( arxivdb.get_articles_for_voting(database=self.database) ) # if today's papers aren't ready yet, redirect to the papers display if not local_articles and not voted_articles and not other_articles: LOGGER.warning('no papers for today yet, ' 'redirecting to previous day papers') (latestdate, local_articles, voted_articles, other_articles, reserved_articles) = ( arxivdb.get_articles_for_listing( database=self.database ) ) todays_date = datetime.strptime( latestdate, '%Y-%m-%d' ).strftime('%A, %b %d %Y') # don't show a message on the weekend when no papers are loaded if todays_utcdow in (5,6): flash_message = "" else: flash_message = ( "<div data-alert class=\"alert-box radius\">" "Papers for today haven't been imported yet. " "Here are the most recent papers. " "Please wait a few minutes and try again." "<a href=\"#\" class=\"close\">&times;</a></div>" ) # preprocess the local papers to highlight local author names if len(local_articles) > 0: for lind in range(len(local_articles)): author_list = local_articles[lind][4] author_list = author_list.split(': ')[-1].split(',') local_indices = local_articles[lind][-2] if local_indices and len(local_indices) > 0: local_indices = [ int(x) for x in local_indices.split(',') ] for li in local_indices: author_list[li] = '<strong>%s</strong>' % ( author_list[li] ) # update this article's local authors local_articles[lind][4] = ', '.join(author_list) # show the listing page self.render("listing.html", user_name=user_name, local_today=local_today, todays_date=todays_date, local_articles=local_articles, voted_articles=voted_articles, other_articles=other_articles, reserved_articles=reserved_articles, flash_message=flash_message, reserve_interval_days=self.reserve_interval, new_user=new_user) # if today's papers are ready, show them and ask for votes else: # get this user's votes user_articles = arxivdb.get_user_votes(todays_utcdate, user_name, database=self.database) user_reserved = arxivdb.get_user_reservations( todays_utcdate, user_name, database=self.database ) LOGGER.info('user has votes on: %s, has reservations on: %s' % (user_articles, user_reserved)) # preprocess the local papers to highlight local author names if len(local_articles) > 0: for lind in range(len(local_articles)): author_list = local_articles[lind][4] author_list = author_list.split(': ')[-1].split(',') local_indices = local_articles[lind][-2] if local_indices and len(local_indices) > 0: local_indices = [ int(x) for x in local_indices.split(',') ] for li in local_indices: author_list[li] = '<strong>%s</strong>' % ( author_list[li] ) # update this article's local authors local_articles[lind][4] = ', '.join(author_list) # show the voting page self.render("voting.html", user_name=user_name, local_today=local_today, todays_date=todays_date, local_articles=local_articles, voted_articles=voted_articles, other_articles=other_articles, reserved_articles=reserved_articles, flash_message=flash_message, new_user=new_user, reserve_interval_days=self.reserve_interval, user_articles=user_articles, user_reserved=user_reserved) # otherwise, show the article list else: # get the articles for today (latestdate, local_articles, voted_articles, other_articles, reserved_articles) = ( arxivdb.get_articles_for_listing(utcdate=todays_utcdate, database=self.database) ) # if today's papers aren't ready yet, show latest papers if not local_articles and not voted_articles and not other_articles: (latestdate, local_articles, voted_articles, other_articles, reserved_articles) = ( arxivdb.get_articles_for_listing( database=self.database ) ) todays_date = datetime.strptime( latestdate, '%Y-%m-%d' ).strftime('%A, %b %d %Y') # don't show a message on the weekend when no papers are loaded if todays_utcdow in (5,6): flash_message = "" else: flash_message = ( "<div data-alert class=\"alert-box radius\">" "Papers for today haven't been imported yet. " "Here are the most recent papers. " "Please wait a few minutes and try again." "<a href=\"#\" class=\"close\">&times;</a></div>" ) # preprocess the local papers to highlight local author names if len(local_articles) > 0: for lind in range(len(local_articles)): author_list = local_articles[lind][4] author_list = author_list.split(': ')[-1].split(',') local_indices = local_articles[lind][-2] if local_indices and len(local_indices) > 0: local_indices = [ int(x) for x in local_indices.split(',') ] for li in local_indices: author_list[li] = '<strong>%s</strong>' % ( author_list[li] ) # update this article's local authors local_articles[lind][4] = ', '.join(author_list) # show the listing page self.render("listing.html", user_name=user_name, local_today=local_today, todays_date=todays_date, local_articles=local_articles, voted_articles=voted_articles, other_articles=other_articles, reserved_articles=reserved_articles, reserve_interval_days=self.reserve_interval, flash_message=flash_message, new_user=new_user) class ReservationHandler(tornado.web.RequestHandler): ''' This handles all requests for the voting page. ''' def initialize(self, database, voting_start, voting_end, debug, signer, geofence, countries, regions): ''' Sets up the database. ''' self.database = database self.voting_start = voting_start self.voting_end = voting_end self.debug = debug self.signer = signer self.geofence = geofence[0] self.ipaddrs = geofence[1] self.editips = geofence[2] self.countries = countries self.regions = regions def post(self): ''' This handles a POST request for a paper reservation. ''' arxivid = self.get_argument('arxivid', None) reservetype = self.get_argument('reservetype', None) session_token = self.get_secure_cookie('coffee_session', max_age_days=30) sessioninfo = webdb.session_check(session_token, database=self.database) user_name = sessioninfo[2] todays_utcdate = datetime.now(tz=utc).strftime('%Y-%m-%d') user_ip = self.request.remote_ip # if we're asked to geofence, then do so # (unless the request came from INSIDE the building) # FIXME: add exceptions for private network IPv4 addresses geolocked = False # check the network as well try: userip_addrobj = ipaddress.ip_address(user_ip.decode()) trustedip = any([(userip_addrobj in x) for x in self.ipaddrs]) except: trustedip = False if self.geofence and user_ip != '127.0.0.1': try: geoip = self.geofence.city(user_ip) if (geoip.country.iso_code in self.countries and geoip.subdivisions.most_specific.iso_code in self.regions): LOGGER.info('geofencing ok: ' 'reservation request ' 'from inside allowed regions') else: LOGGER.warning( 'geofencing activated: ' 'vote request from %s ' 'is outside allowed regions' % ('%s-%s' % ( geoip.country.iso_code, geoip.subdivisions.most_specific.iso_code )) ) message = ("Sorry, you're trying to vote " "from an IP address that is " "blocked from voting.") jsondict = {'status':'failed', 'message':message, 'results':None} geolocked = True self.write(jsondict) self.finish() # fail deadly except Exception as e: LOGGER.exception('geofencing failed for IP %s, ' 'blocking request.' % user_ip) message = ("Sorry, you're trying to vote " "from an IP address that is " "blocked from voting.") jsondict = {'status':'failed', 'message':message, 'results':None} geolocked = True self.write(jsondict) self.finish() ############################# ## PROCESS THE RESERVATION ## ############################# # check if we're in voting time-limits timenow = datetime.now(tz=utc).timetz() # if we are within the time limits, then allow the voting POST request if (self.voting_start < timenow < self.voting_end): in_votetime = True else: in_votetime = False # if all things are satisfied, then process the reserve request if (arxivid and reservetype and sessioninfo[0] and ((not geolocked) or trustedip) and in_votetime): arxivid = xhtml_escape(arxivid) reservetype = xhtml_escape(reservetype) LOGGER.info('user: %s, reserving: %s, on: %s' % (user_name, reservetype, arxivid)) if 'arXiv:' not in arxivid or reservetype not in ('reserve', 'release'): message = ("Your paper reservation request " "used invalid arguments " "and has been discarded.") jsondict = {'status':'failed', 'message':message, 'results':None} self.write(jsondict) self.finish() else: # first, check how many reservations this user has user_reservations = arxivdb.get_user_reservations( todays_utcdate, user_name, database=self.database ) # make sure it's less than 5 or we're not adding another # reservation if len(user_reservations) < 5 or reservetype != 'reserve': reserve_outcome = arxivdb.record_reservation( arxivid, user_name, reservetype, database=self.database ) if reserve_outcome is False or None: message = ("That article doesn't exist, " "and your reservation " "has been discarded.") jsondict = {'status':'failed', 'message':message, 'results':None} self.write(jsondict) self.finish() else: if (reserve_outcome[0] == 1 and reserve_outcome[1] == user_name): message = ("Reservation successfully recorded for %s" % arxivid) jsondict = {'status':'success', 'message':message, 'results':{'reserved':reserve_outcome[0]}} elif (reserve_outcome[0] == 1 and reserve_outcome[1] != user_name): message = ("Someeone else already reserved that paper!") jsondict = {'status':'failed', 'message':message, 'results':{'reserved':reserve_outcome[0]}} elif (reserve_outcome[0] == 0): message = ("Release successfully recorded for %s" % arxivid) jsondict = {'status':'success', 'message':message, 'results':{'reserved':reserve_outcome[0]}} else: message = ("That article doesn't exist, " "or your reservation " "has been discarded because of a problem.") jsondict = {'status':'failed', 'message':message, 'results':None} self.write(jsondict) self.finish() else: message = ("You've reserved 5 articles already.") jsondict = {'status':'failed', 'message':message, 'results':None} self.write(jsondict) self.finish() elif ((not geolocked) or trustedip): message = ("Your reservation request could not be authorized" " and has been discarded.") jsondict = {'status':'failed', 'message':message, 'results':None} self.write(jsondict) self.finish() else: message = ("Your reservation request could not be authorized" " and has been discarded.") jsondict = {'status':'failed', 'message':message, 'results':None} self.write(jsondict) self.finish() class VotingHandler(tornado.web.RequestHandler): ''' This handles all requests for the voting page. ''' def initialize(self, database, voting_start, voting_end, debug, signer, geofence, countries, regions): ''' Sets up the database. ''' self.database = database self.voting_start = voting_start self.voting_end = voting_end self.debug = debug self.signer = signer self.geofence = geofence[0] self.ipaddrs = geofence[1] self.editips = geofence[2] self.countries = countries self.regions = regions def post(self): '''This handles POST requests for vote submissions. takes the following arguments: arxivid: article to vote for votetype: up / down checks if an existing session is in play. if not, flashes a message saying 'no dice' in a flash message - checks if the user has more than five votes used for the utcdate of the requested arxivid - if they do, then deny vote - if they don't, allow vote if vote is allowed: - changes the nvote column for arxivid - adds the current user to the voters column - returns the nvotes for the arxivid along with success/failure if vote is not allowed: - sends back a 401 + error message, which the frontend JS turns into a flash message the frontend JS then: - updates the vote total for this arxivid - handles flash messages - updates the vote button status ''' arxivid = self.get_argument('arxivid', None) votetype = self.get_argument('votetype', None) session_token = self.get_secure_cookie('coffee_session', max_age_days=30) sessioninfo = webdb.session_check(session_token, database=self.database) user_name = sessioninfo[2] todays_utcdate = datetime.now(tz=utc).strftime('%Y-%m-%d') user_ip = self.request.remote_ip # TESTING # user_ip = '131.111.184.18' # Cambridge UK # user_ip = '71.168.183.215' # FIOS NJ # user_ip = '70.192.88.245' # VZW NJ # user_ip = '70.42.157.5' # VZW NY # user_ip = '69.141.255.240' # Comcast PA # user_ip = '128.112.25.36' # Princeton Univ, NJ # if we're asked to geofence, then do so # (unless the request came from INSIDE the building) # FIXME: add exceptions for private network IPv4 addresses geolocked = False # check the network as well try: userip_addrobj = ipaddress.ip_address(user_ip.decode()) trustedip = any([(userip_addrobj in x) for x in self.ipaddrs]) except: trustedip = False if self.geofence and user_ip != '127.0.0.1': try: # check the geoip location geoip = self.geofence.city(user_ip) if (geoip.country.iso_code in self.countries and geoip.subdivisions.most_specific.iso_code in self.regions): LOGGER.info('geofencing ok: ' 'vote request from inside allowed regions') else: LOGGER.warning( 'geofencing activated: ' 'vote request from %s ' 'is outside allowed regions' % ('%s-%s' % ( geoip.country.iso_code, geoip.subdivisions.most_specific.iso_code )) ) message = ("Sorry, you're trying to vote " "from an IP address that is " "blocked from voting.") jsondict = {'status':'failed', 'message':message, 'results':None} geolocked = True self.write(jsondict) self.finish() # fail deadly except Exception as e: LOGGER.exception('geofencing failed for IP %s, ' 'blocking request.' % user_ip) message = ("Sorry, you're trying to vote " "from an IP address that is " "blocked from voting.") jsondict = {'status':'failed', 'message':message, 'results':None} geolocked = True self.write(jsondict) self.finish() # check if we're in voting time-limits timenow = datetime.now(tz=utc).timetz() # if we are within the time limits, then allow the voting POST request if (self.voting_start < timenow < self.voting_end): in_votetime = True else: in_votetime = False # if all things are satisfied, then process the vote request if (arxivid and votetype and sessioninfo[0] and (not geolocked or trustedip) and in_votetime): arxivid = xhtml_escape(arxivid) votetype = xhtml_escape(votetype) LOGGER.info('user: %s, voting: %s, on: %s' % (user_name, votetype, arxivid)) if 'arXiv:' not in arxivid or votetype not in ('up','down'): message = ("Your vote request used invalid arguments" " and has been discarded.") jsondict = {'status':'failed', 'message':message, 'results':None} self.write(jsondict) self.finish() else: # first, check how many votes this user has user_votes = arxivdb.get_user_votes(todays_utcdate, user_name, database=self.database) # make sure it's less than 5 or the votetype isn't up if len(user_votes) < 5 or votetype != 'up': vote_outcome = arxivdb.record_vote(arxivid, user_name, votetype, database=self.database) if vote_outcome is False: message = ("That article doesn't exist, and your vote " "has been discarded.") jsondict = {'status':'failed', 'message':message, 'results':None} self.write(jsondict) self.finish() else: message = ("Vote successfully recorded for %s" % arxivid) jsondict = {'status':'success', 'message':message, 'results':{'nvotes':vote_outcome}} self.write(jsondict) self.finish() else: message = ("You've voted on 5 articles already.") jsondict = {'status':'failed', 'message':message, 'results':None} self.write(jsondict) self.finish() elif (not geolocked or trustedip): message = ("Your vote request could not be authorized" " and has been discarded.") jsondict = {'status':'failed', 'message':message, 'results':None} self.write(jsondict) self.finish() else: message = ("Your reservation request could not be authorized" " and has been discarded.") jsondict = {'status':'failed', 'message':message, 'results':None} self.write(jsondict) self.finish() class EditHandler(tornado.web.RequestHandler): '''This handles all requests for the editing function. This allows users in the trustedip range to edit the arxiv listing for the current day. The allowable edits are: - paper is local author - paper is not local author ''' def initialize(self, database, voting_start, voting_end, debug, signer, geofence, countries, regions): ''' Sets up the database. ''' self.database = database self.voting_start = voting_start self.voting_end = voting_end self.debug = debug self.signer = signer self.geofence = geofence[0] self.ipaddrs = geofence[1] self.editips = geofence[2] self.countries = countries self.regions = regions def post(self): ''' This handles a POST request for a paper reservation. ''' arxivid = self.get_argument('arxivid', None) edittype = self.get_argument('edittype', None) session_token = self.get_secure_cookie('coffee_session', max_age_days=30) sessioninfo = webdb.session_check(session_token, database=self.database) user_name = sessioninfo[2] todays_utcdate = datetime.now(tz=utc).strftime('%Y-%m-%d') user_ip = self.request.remote_ip # check the network try: userip_addrobj = ipaddress.ip_address(user_ip.decode()) trustedip = any([(userip_addrobj in x) for x in self.editips]) except: trustedip = False ###################### ## PROCESS THE EDIT ## ###################### # check if we're in voting time-limits timenow = datetime.now(tz=utc).timetz() # if we are within the time limits, then allow the voting POST request if (self.voting_start < timenow < self.voting_end): in_votetime = True else: in_votetime = False # editing only checks its cidr and if we're in vote mode if (arxivid and edittype and sessioninfo[0] and trustedip and in_votetime): arxivid = xhtml_escape(arxivid) edittype = xhtml_escape(edittype) LOGGER.info('user: %s, reserving: %s, on: %s' % (user_name, reservetype, arxivid)) if 'arXiv:' not in arxivid or editttype not in ('local', 'notlocal'): message = ("Your paper reservation request " "used invalid arguments " "and has been discarded.") jsondict = {'status':'failed', 'message':message, 'results':None} self.write(jsondict) self.finish() else: # process the edit pass # if we're not allowed to edit, discard the request else: message = ("Your edit request could not be authorized " "(probably because the voting window is over)" "and has been discarded.") jsondict = {'status':'failed', 'message':message, 'results':None} self.write(jsondict) self.finish() class AboutHandler(tornado.web.RequestHandler): ''' This handles all requests for /astroph-coffee/about. ''' def initialize(self, database): ''' This sets up the database. ''' self.database = database def get(self): ''' This handles GET requests. ''' # handle a redirect with an attached flash message flash_message = self.get_argument('f', None) if flash_message: flashtext = msgdecode(flash_message) LOGGER.warning('flash message: %s' % flashtext) flashbox = ( '<div data-alert class="alert-box radius">%s' '<a href="#" class="close">&times;</a></div>' % flashtext ) flash_message = flashbox else: flash_message = '' local_today = datetime.now(tz=utc).strftime('%Y-%m-%d %H:%M %Z') # first, get the session token session_token = self.get_secure_cookie('coffee_session', max_age_days=30) ip_address = self.request.remote_ip if 'User-Agent' in self.request.headers: client_header = self.request.headers['User-Agent'] or 'none' else: client_header = 'none' user_name = 'anonuser@%s' % ip_address new_user = True # check if this session_token corresponds to an existing user if session_token: sessioninfo = webdb.session_check(session_token, database=self.database) if sessioninfo[0]: user_name = sessioninfo[2] LOGGER.info('found session for %s, continuing with it' % user_name) new_user = False elif sessioninfo[-1] != 'database_error': LOGGER.warning('unknown user, starting a new session for ' '%s, %s' % (ip_address, client_header)) sessionok, token = webdb.anon_session_initiate( ip_address, client_header, database=self.database ) if sessionok and token: self.set_secure_cookie('coffee_session', token, httponly=True) else: LOGGER.error('could not set session cookie for %s, %s' % (ip_address, client_header)) self.set_status(500) message = ("There was a database error " "trying to look up user credentials.") LOGGER.error('database error while looking up session for ' '%s, %s' % (ip_address, client_header)) self.render("errorpage.html", user_name=user_name, local_today=local_today, error_message=message, flash_message=flash_message, new_user=new_user) else: self.set_status(500) message = ("There was a database error " "trying to look up user credentials.") LOGGER.error('database error while looking up session for ' '%s, %s' % (ip_address, client_header)) self.render("errorpage.html", user_name=user_name, error_message=message, local_today=local_today, flash_message=flash_message, new_user=new_user) else: if ('crawler' not in client_header.lower() and 'bot' not in client_header.lower()): LOGGER.warning('unknown user, starting a new session for ' '%s, %s' % (ip_address, client_header)) sessionok, token = webdb.anon_session_initiate( ip_address, client_header, database=self.database ) if sessionok and token: self.set_secure_cookie('coffee_session', token, httponly=True) else: LOGGER.error('could not set session cookie for %s, %s' % (ip_address, client_header)) self.set_status(500) message = ("There was a database error " "trying to look up user credentials.") LOGGER.error('database error while looking up session for ' '%s, %s' % (ip_address, client_header)) self.render("errorpage.html", user_name=user_name, local_today=local_today, error_message=message, flash_message=flash_message, new_user=new_user) ######################### # show the contact page # ######################### self.render("about.html", local_today=local_today, user_name=user_name, flash_message=flash_message, new_user=new_user) class ArchiveHandler(tornado.web.RequestHandler): ''' This handles all paper archive requests. url: /astroph-coffee/archive/YYYYMMDD ''' def initialize(self, database, reserve_interval, signer): ''' Sets up the database. ''' self.database = database self.reserve_interval = reserve_interval self.signer = signer def get(self, archivedate): ''' This handles GET requests. ''' # handle a redirect with an attached flash message flash_message = self.get_argument('f', None) if flash_message: flashtext = msgdecode(flash_message, self.signer) LOGGER.warning('flash message: %s' % flashtext) flashbox = ( '<div data-alert class="alert-box radius">%s' '<a href="#" class="close">&times;</a></div>' % flashtext ) flash_message = flashbox else: flash_message = '' local_today = datetime.now(tz=utc).strftime('%Y-%m-%d %H:%M %Z') # first, get the session token session_token = self.get_secure_cookie('coffee_session', max_age_days=30) ip_address = self.request.remote_ip if 'User-Agent' in self.request.headers: client_header = self.request.headers['User-Agent'] or 'none' else: client_header = 'none' user_name = 'anonuser@%s' % ip_address new_user = True # check if this session_token corresponds to an existing user if session_token: sessioninfo = webdb.session_check(session_token, database=self.database) if sessioninfo[0]: user_name = sessioninfo[2] LOGGER.info('found session for %s, continuing with it' % user_name) new_user = False elif sessioninfo[-1] != 'database_error': LOGGER.warning('unknown user, starting a new session for ' '%s, %s' % (ip_address, client_header)) sessionok, token = webdb.anon_session_initiate( ip_address, client_header, database=self.database ) if sessionok and token: self.set_secure_cookie('coffee_session', token, httponly=True) else: LOGGER.error('could not set session cookie for %s, %s' % (ip_address, client_header)) self.set_status(500) message = ("There was a database error " "trying to look up user credentials.") LOGGER.error('database error while looking up session for ' '%s, %s' % (ip_address, client_header)) self.render("errorpage.html", user_name=user_name, local_today=local_today, error_message=message, flash_message=flash_message, new_user=new_user) else: self.set_status(500) message = ("There was a database error " "trying to look up user credentials.") LOGGER.error('database error while looking up session for ' '%s, %s' % (ip_address, client_header)) self.render("errorpage.html", user_name=user_name, error_message=message, local_today=local_today, flash_message=flash_message, new_user=new_user) else: if ('crawler' not in client_header.lower() and 'bot' not in client_header.lower()): LOGGER.warning('unknown user, starting a new session for ' '%s, %s' % (ip_address, client_header)) sessionok, token = webdb.anon_session_initiate( ip_address, client_header, database=self.database ) if sessionok and token: self.set_secure_cookie('coffee_session', token, httponly=True) else: LOGGER.error('could not set session cookie for %s, %s' % (ip_address, client_header)) self.set_status(500) message = ("There was a database error " "trying to look up user credentials.") LOGGER.error('database error while looking up session for ' '%s, %s' % (ip_address, client_header)) self.render("errorpage.html", user_name=user_name, local_today=local_today, error_message=message, flash_message=flash_message, new_user=new_user) ################################## # now handle the archive request # ################################## if archivedate is not None: archivedate = xhtml_escape(archivedate) archivedate = re.match(ARCHIVEDATE_REGEX, archivedate) if archivedate: year, month, day = archivedate.groups() listingdate = '%s-%s-%s' % (year, month, day) # get the articles for today (latestdate, local_articles, voted_articles, other_articles, reserved_articles) = ( arxivdb.get_articles_for_listing(utcdate=listingdate, database=self.database) ) # if this date's papers aren't available, show the archive index if (not local_articles and not voted_articles and not other_articles and not reserved_articles): flash_message = ( "<div data-alert class=\"alert-box radius\">" "No papers for %s were found. " "You've been redirected to the Astro-Coffee archive." "<a href=\"#\" class=\"close\">&times;</a></div>" ) % listingdate (archive_dates, archive_npapers, archive_nlocal, archive_nvoted) = arxivdb.get_archive_index( database=self.database ) paper_archives = group_arxiv_dates(archive_dates, archive_npapers, archive_nlocal, archive_nvoted) self.render("archive.html", user_name=user_name, flash_message=flash_message, new_user=new_user, paper_archives=paper_archives, local_today=local_today) else: # figure out the UTC date for this archive listing archive_datestr = datetime( hour=0, minute=15, second=0, day=int(day), month=int(month), year=int(year), tzinfo=utc ).strftime('%A, %b %d %Y') # preprocess the local papers to highlight local author names if len(local_articles) > 0: for lind in range(len(local_articles)): author_list = local_articles[lind][4] author_list = author_list.split(': ')[-1].split(',') local_indices = local_articles[lind][-2] if local_indices and len(local_indices) > 0: local_indices = [ int(x) for x in local_indices.split(',') ] for li in local_indices: author_list[li] = '<strong>%s</strong>' % ( author_list[li] ) # update this article's local authors local_articles[lind][4] = ', '.join(author_list) # show the listing page self.render("archivelisting.html", user_name=user_name, local_today=local_today, todays_date=archive_datestr, local_articles=local_articles, voted_articles=voted_articles, other_articles=other_articles, reserved_articles=reserved_articles, reserve_interval_days=self.reserve_interval, flash_message=flash_message, new_user=new_user) else: (archive_dates, archive_npapers, archive_nlocal, archive_nvoted) = arxivdb.get_archive_index( database=self.database ) paper_archives = group_arxiv_dates(archive_dates, archive_npapers, archive_nlocal, archive_nvoted) self.render("archive.html", user_name=user_name, flash_message=flash_message, new_user=new_user, paper_archives=paper_archives, local_today=local_today) else: (archive_dates, archive_npapers, archive_nlocal, archive_nvoted) = arxivdb.get_archive_index( database=self.database ) paper_archives = group_arxiv_dates(archive_dates, archive_npapers, archive_nlocal, archive_nvoted) self.render("archive.html", user_name=user_name, flash_message=flash_message, new_user=new_user, paper_archives=paper_archives, local_today=local_today) class LocalListHandler(tornado.web.RequestHandler): ''' This handles all requests for /astroph-coffee/local-authors. ''' def initialize(self, database, admincontact, adminemail): ''' This sets up the database. ''' self.database = database self.admincontact = admincontact self.adminemail = adminemail def get(self): ''' This handles GET requests. ''' # handle a redirect with an attached flash message flash_message = self.get_argument('f', None) if flash_message: flashtext = msgdecode(flash_message) LOGGER.warning('flash message: %s' % flashtext) flashbox = ( '<div data-alert class="alert-box radius">%s' '<a href="#" class="close">&times;</a></div>' % flashtext ) flash_message = flashbox else: flash_message = '' local_today = datetime.now(tz=utc).strftime('%Y-%m-%d %H:%M %Z') # first, get the session token session_token = self.get_secure_cookie('coffee_session', max_age_days=30) ip_address = self.request.remote_ip if 'User-Agent' in self.request.headers: client_header = self.request.headers['User-Agent'] or 'none' else: client_header = 'none' user_name = 'anonuser@%s' % ip_address new_user = True # check if this session_token corresponds to an existing user if session_token: sessioninfo = webdb.session_check(session_token, database=self.database) if sessioninfo[0]: user_name = sessioninfo[2] LOGGER.info('found session for %s, continuing with it' % user_name) new_user = False elif sessioninfo[-1] != 'database_error': LOGGER.warning('unknown user, starting a new session for ' '%s, %s' % (ip_address, client_header)) sessionok, token = webdb.anon_session_initiate( ip_address, client_header, database=self.database ) if sessionok and token: self.set_secure_cookie('coffee_session', token, httponly=True) else: LOGGER.error('could not set session cookie for %s, %s' % (ip_address, client_header)) self.set_status(500) message = ("There was a database error " "trying to look up user credentials.") LOGGER.error('database error while looking up session for ' '%s, %s' % (ip_address, client_header)) self.render("errorpage.html", user_name=user_name, local_today=local_today, error_message=message, flash_message=flash_message, new_user=new_user) else: self.set_status(500) message = ("There was a database error " "trying to look up user credentials.") LOGGER.error('database error while looking up session for ' '%s, %s' % (ip_address, client_header)) self.render("errorpage.html", user_name=user_name, error_message=message, local_today=local_today, flash_message=flash_message, new_user=new_user) else: if ('crawler' not in client_header.lower() and 'bot' not in client_header.lower()): LOGGER.warning('unknown user, starting a new session for ' '%s, %s' % (ip_address, client_header)) sessionok, token = webdb.anon_session_initiate( ip_address, client_header, database=self.database ) if sessionok and token: self.set_secure_cookie('coffee_session', token, httponly=True) else: LOGGER.error('could not set session cookie for %s, %s' % (ip_address, client_header)) self.set_status(500) message = ("There was a database error " "trying to look up user credentials.") LOGGER.error('database error while looking up session for ' '%s, %s' % (ip_address, client_header)) self.render("errorpage.html", user_name=user_name, local_today=local_today, error_message=message, flash_message=flash_message, new_user=new_user) ############################### # show the local authors page # ############################### authorlist = webdb.get_local_authors(database=self.database) if authorlist: self.render("local-authors.html", local_today=local_today, user_name=user_name, flash_message=flash_message, new_user=new_user, authorlist=authorlist, admincontact=self.admincontact, adminemail=self.adminemail) else: LOGGER.error('could not get the author list!') message = ("There was a database error " "trying to look up local authors. " "Please " "<a href=\"/astroph-coffee/about\">" "let us know</a> about this problem!") self.render("errorpage.html", user_name=user_name, local_today=local_today, error_message=message, flash_message=flash_message, new_user=new_user) class FTSHandler(tornado.web.RequestHandler): ''' This handles all requests for searching. GET returns a search page. POST posts the AJAX request. ''' def initialize(self, database, voting_start, voting_end, debug, signer, geofence, countries, regions): ''' Sets up the database. ''' self.database = database self.voting_start = voting_start self.voting_end = voting_end self.debug = debug self.signer = signer self.geofence = geofence[0] self.ipaddrs = geofence[1] self.editips = geofence[2] self.countries = countries self.regions = regions def get(self): '''This handles GET requests for searching. ''' # handle a redirect with an attached flash message flash_message = self.get_argument('f', None) if flash_message: flashtext = msgdecode(flash_message) LOGGER.warning('flash message: %s' % flashtext) flashbox = ( '<div data-alert class="alert-box radius">%s' '<a href="#" class="close">&times;</a></div>' % flashtext ) flash_message = flashbox else: flash_message = '' local_today = datetime.now(tz=utc).strftime('%Y-%m-%d %H:%M %Z') # first, get the session token session_token = self.get_secure_cookie('coffee_session', max_age_days=30) ip_address = self.request.remote_ip if 'User-Agent' in self.request.headers: client_header = self.request.headers['User-Agent'] or 'none' else: client_header = 'none' user_name = 'anonuser@%s' % ip_address new_user = True # check if this session_token corresponds to an existing user if session_token: sessioninfo = webdb.session_check(session_token, database=self.database) if sessioninfo[0]: user_name = sessioninfo[2] LOGGER.info('found session for %s, continuing with it' % user_name) new_user = False elif sessioninfo[-1] != 'database_error': LOGGER.warning('unknown user, starting a new session for ' '%s, %s' % (ip_address, client_header)) sessionok, token = webdb.anon_session_initiate( ip_address, client_header, database=self.database ) if sessionok and token: self.set_secure_cookie('coffee_session', token, httponly=True) else: LOGGER.error('could not set session cookie for %s, %s' % (ip_address, client_header)) self.set_status(500) message = ("There was a database error " "trying to look up user credentials.") LOGGER.error('database error while looking up session for ' '%s, %s' % (ip_address, client_header)) self.render("errorpage.html", user_name=user_name, local_today=local_today, error_message=message, flash_message=flash_message, new_user=new_user) else: self.set_status(500) message = ("There was a database error " "trying to look up user credentials.") LOGGER.error('database error while looking up session for ' '%s, %s' % (ip_address, client_header)) self.render("errorpage.html", user_name=user_name, error_message=message, local_today=local_today, flash_message=flash_message, new_user=new_user) else: if ('crawler' not in client_header.lower() and 'bot' not in client_header.lower()): LOGGER.warning('unknown user, starting a new session for ' '%s, %s' % (ip_address, client_header)) sessionok, token = webdb.anon_session_initiate( ip_address, client_header, database=self.database ) if sessionok and token: self.set_secure_cookie('coffee_session', token, httponly=True) else: LOGGER.error('could not set session cookie for %s, %s' % (ip_address, client_header)) self.set_status(500) message = ("There was a database error " "trying to look up user credentials.") LOGGER.error('database error while looking up session for ' '%s, %s' % (ip_address, client_header)) self.render("errorpage.html", user_name=user_name, local_today=local_today, error_message=message, flash_message=flash_message, new_user=new_user) ####################### ## CONTENT RENDERING ## ####################### self.render("search.html", user_name=user_name, local_today=local_today, flash_message=flash_message, search_page_title="Search the Astro-Coffee archive", search_page_type="initial", search_results=None, search_result_info='', search_nmatches=0, new_user=new_user) def post(self): '''This handles POST requests for searching. renders using the search.html template with search_page_type = 'results' and passes search_results to it from a run of the fulltextsearch.fts4_phrase_search_paginated function. ''' # handle a redirect with an attached flash message flash_message = self.get_argument('f', None) if flash_message: flashtext = msgdecode(flash_message) LOGGER.warning('flash message: %s' % flashtext) flashbox = ( '<div data-alert class="alert-box radius">%s' '<a href="#" class="close">&times;</a></div>' % flashtext ) flash_message = flashbox else: flash_message = '' local_today = datetime.now(tz=utc).strftime('%Y-%m-%d %H:%M %Z') # first, get the session token session_token = self.get_secure_cookie('coffee_session', max_age_days=30) ip_address = self.request.remote_ip if 'User-Agent' in self.request.headers: client_header = self.request.headers['User-Agent'] or 'none' else: client_header = 'none' user_name = 'anonuser@%s' % ip_address new_user = True # check if this session_token corresponds to an existing user if session_token: sessioninfo = webdb.session_check(session_token, database=self.database) if sessioninfo[0]: user_name = sessioninfo[2] LOGGER.info('found session for %s, continuing with it' % user_name) new_user = False elif sessioninfo[-1] != 'database_error': LOGGER.warning('unknown user, starting a new session for ' '%s, %s' % (ip_address, client_header)) sessionok, token = webdb.anon_session_initiate( ip_address, client_header, database=self.database ) if sessionok and token: self.set_secure_cookie('coffee_session', token, httponly=True) else: LOGGER.error('could not set session cookie for %s, %s' % (ip_address, client_header)) self.set_status(500) message = ("There was a database error " "trying to look up user credentials.") LOGGER.error('database error while looking up session for ' '%s, %s' % (ip_address, client_header)) self.render("errorpage.html", user_name=user_name, local_today=local_today, error_message=message, flash_message=flash_message, new_user=new_user) else: self.set_status(500) message = ("There was a database error " "trying to look up user credentials.") LOGGER.error('database error while looking up session for ' '%s, %s' % (ip_address, client_header)) self.render("errorpage.html", user_name=user_name, error_message=message, local_today=local_today, flash_message=flash_message, new_user=new_user) else: if ('crawler' not in client_header.lower() and 'bot' not in client_header.lower()): LOGGER.warning('unknown user, starting a new session for ' '%s, %s' % (ip_address, client_header)) sessionok, token = webdb.anon_session_initiate( ip_address, client_header, database=self.database ) if sessionok and token: self.set_secure_cookie('coffee_session', token, httponly=True) else: LOGGER.error('could not set session cookie for %s, %s' % (ip_address, client_header)) self.set_status(500) message = ("There was a database error " "trying to look up user credentials.") LOGGER.error('database error while looking up session for ' '%s, %s' % (ip_address, client_header)) self.render("errorpage.html", user_name=user_name, local_today=local_today, error_message=message, flash_message=flash_message, new_user=new_user) ####################### ## CONTENT RENDERING ## ####################### # get the search query searchquery = self.get_argument('searchquery',None) if not searchquery or len(searchquery) == 0: search_result_info = ('Sorry, we couldn\'t understand your ' 'search query: <strong>%s</strong>' % squeeze(xhtml_escape(searchquery))) search_results = None search_nmatches = 0 self.render("search.html", user_name=user_name, local_today=local_today, flash_message=flash_message, search_page_title="Search the Astro-Coffee archive", search_page_type="results", search_results=search_results, search_nmatches=search_nmatches, search_result_info=search_result_info, new_user=new_user) else: searchquery = squeeze(xhtml_escape(searchquery)) if len(searchquery) > 0: try: # figure out the weights to apply titleq_count = searchquery.count('title:') abstractq_count = searchquery.count('abstract:') authorq_count = searchquery.count('authors:') author_weight = 1.0 + 1.0*authorq_count abstract_weight = 3.0 + 1.0*abstractq_count title_weight = 2.0 + 1.0*titleq_count # turn any &quot; characters into " so we can do exact # phrase matching searchquery = searchquery.replace('&quot;','"') ftsdict = fts.fts4_phrase_query_paginated( searchquery, ['arxiv_id','day_serial','title', 'authors','comments','abstract', 'link','pdf','utcdate', 'nvotes', 'local_authors', 'local_author_indices'], sortcol='relevance', pagelimit=500, database=self.database, relevance_weights=[title_weight, abstract_weight, author_weight], ) search_results = ftsdict['results'] all_nmatches = ftsdict['nmatches'] LOGGER.info('found %s objects matching %s' % (all_nmatches, searchquery)) relevance_sticker = ( '<span data-tooltip aria-haspopup="true" ' 'class="has-tip" title="Okapi BM25 relevance ' 'weights: title = %.1f, ' 'abstract = %.1f,' ' authors = %.1f, all others = 1.0">relevant</span>' ) % (title_weight, abstract_weight, author_weight) if all_nmatches == 0: search_nmatches = 0 search_result_info = ( 'Sorry, <span class="nmatches">0</span> ' 'matching items were found for: ' '<strong>%s</strong>' % searchquery ) elif all_nmatches == 1: search_nmatches = 1 search_result_info = ( 'Found only <span class="nmatches">1</span> ' 'matching item for: ' '<strong>%s</strong>' % searchquery ) elif 1 < all_nmatches < 501: search_nmatches = len(ftsdict['results']['arxiv_id']) search_result_info = ( 'Found <span class="nmatches">%s</span> ' 'matching items for: ' '<strong>%s</strong>' % (search_nmatches, searchquery) ) else: search_nmatches = len(ftsdict['results']['arxiv_id']) search_result_info = ( 'Found %s total matching ' 'items for: <strong>%s</strong>. ' 'Showing only the ' 'top <span class="nmatches">%s</span> ' '%s ' 'results below' % (all_nmatches, searchquery, search_nmatches, relevance_sticker)) self.render( "search.html", user_name=user_name, local_today=local_today, flash_message=flash_message, search_page_title="Search the Astro-Coffee archive", search_page_type="results", search_results=search_results, search_nmatches=search_nmatches, search_result_info=search_result_info, new_user=new_user ) # if the query fails on the backend, return nothing. except Exception as e: LOGGER.exception("search backend failed on searchquery: %s" % searchquery) search_result_info = ('Sorry, we couldn\'t understand your ' 'search query: <strong>%s</strong>' % searchquery) search_results = None search_nmatches = 0 self.render("search.html", user_name=user_name, local_today=local_today, flash_message=flash_message, search_page_title="Search the Astro-Coffee archive", search_page_type="results", search_results=search_results, search_nmatches=search_nmatches, search_result_info=search_result_info, new_user=new_user) # this is if we don't understand the query else: search_result_info = ('Sorry, we couldn\'t understand your ' 'search query: <strong>%s</strong>.' % searchquery) search_results = None search_nmatches = 0 self.render("search.html", user_name=user_name, local_today=local_today, flash_message=flash_message, search_page_title="Search the Astro-Coffee archive", search_page_type="results", search_results=search_results, search_nmatches=search_nmatches, search_result_info=search_result_info, new_user=new_user)
waqasbhatti/astroph-coffee
src/coffeehandlers.py
Python
mit
91,422
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (version 1.7.0_51) on Wed Feb 26 09:23:53 CST 2014 --> <title>B-Index</title> <meta name="date" content="2014-02-26"> <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="B-Index"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar_top"> <!-- --> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../overview-summary.html">Overview</a></li> <li>Package</li> <li>Class</li> <li>Use</li> <li><a href="../overview-tree.html">Tree</a></li> <li><a href="../deprecated-list.html">Deprecated</a></li> <li class="navBarCell1Rev">Index</li> <li><a href="../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="index-1.html">Prev Letter</a></li> <li><a href="index-3.html">Next Letter</a></li> </ul> <ul class="navList"> <li><a href="../index.html?index-filesindex-2.html" target="_top">Frames</a></li> <li><a href="index-2.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="contentContainer"><a href="index-1.html">A</a>&nbsp;<a href="index-2.html">B</a>&nbsp;<a href="index-3.html">D</a>&nbsp;<a href="index-4.html">E</a>&nbsp;<a href="index-5.html">G</a>&nbsp;<a href="index-6.html">I</a>&nbsp;<a href="index-7.html">M</a>&nbsp;<a href="index-8.html">P</a>&nbsp;<a href="index-9.html">R</a>&nbsp;<a href="index-10.html">S</a>&nbsp;<a href="index-11.html">T</a>&nbsp;<a href="index-12.html">U</a>&nbsp;<a name="_B_"> <!-- --> </a> <h2 class="title">B</h2> <dl> <dt><a href="../edu/ku/eecs/agiledev/users/BaseUser.html" title="class in edu.ku.eecs.agiledev.users"><span class="strong">BaseUser</span></a> - Class in <a href="../edu/ku/eecs/agiledev/users/package-summary.html">edu.ku.eecs.agiledev.users</a></dt> <dd>&nbsp;</dd> <dt><span class="strong"><a href="../edu/ku/eecs/agiledev/users/BaseUser.html#BaseUser()">BaseUser()</a></span> - Constructor for class edu.ku.eecs.agiledev.users.<a href="../edu/ku/eecs/agiledev/users/BaseUser.html" title="class in edu.ku.eecs.agiledev.users">BaseUser</a></dt> <dd>&nbsp;</dd> </dl> <a href="index-1.html">A</a>&nbsp;<a href="index-2.html">B</a>&nbsp;<a href="index-3.html">D</a>&nbsp;<a href="index-4.html">E</a>&nbsp;<a href="index-5.html">G</a>&nbsp;<a href="index-6.html">I</a>&nbsp;<a href="index-7.html">M</a>&nbsp;<a href="index-8.html">P</a>&nbsp;<a href="index-9.html">R</a>&nbsp;<a href="index-10.html">S</a>&nbsp;<a href="index-11.html">T</a>&nbsp;<a href="index-12.html">U</a>&nbsp;</div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar_bottom"> <!-- --> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../overview-summary.html">Overview</a></li> <li>Package</li> <li>Class</li> <li>Use</li> <li><a href="../overview-tree.html">Tree</a></li> <li><a href="../deprecated-list.html">Deprecated</a></li> <li class="navBarCell1Rev">Index</li> <li><a href="../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="index-1.html">Prev Letter</a></li> <li><a href="index-3.html">Next Letter</a></li> </ul> <ul class="navList"> <li><a href="../index.html?index-filesindex-2.html" target="_top">Frames</a></li> <li><a href="index-2.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>
hgrimberg01/eecs690_project1
EECS690_project1/doc/index-files/index-2.html
HTML
mit
4,825
#region Copyright & License /* MIT License Copyright (c) 2017 Pyramid Technologies Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #endregion namespace ThermalTalk { /// <summary> /// Contract for all serialized connection types /// </summary> public interface ISerialConnection : System.IDisposable { /// <summary> /// Attempts to open serial device for communication. Returns /// Success only if device is found and opened successfully. /// </summary> /// <returns></returns> ReturnCode Open(); /// <summary> /// Attempts to close and release the connection to the serial device. /// If there are no issues, Success will be returned. /// </summary> /// <returns></returns> ReturnCode Close(); /// <summary> /// Gets or Sets the name that uniquely identifies this serial /// device to the system /// </summary> string Name { get; } /// <summary> /// Gets or Sets the read timeout in milliseconds /// </summary> int ReadTimeoutMS { get; set; } /// <summary> /// Gets or Sets the write timeout in milliseconds /// </summary> int WriteTimeoutMS { get; set; } /// <summary> /// Transmits payload to targets and returns count of /// bytes that were written. The write operation will return /// once all bytes or written or if the period defined by /// WriteTimeoutMS expires. /// </summary> /// <param name="payload">Data to send</param> /// <returns>Count of bytes written</returns> int Write(byte[] payload); /// <summary> /// Read and return n count of bytes. This function /// will return once n bytes are received or ReadTimeoutMS /// has expired. /// </summary> /// <param name="n">count of bytes to read</param> /// <returns>bytes read</returns> byte[] Read(int n); } }
PyramidTechnologies/ThermalTalk
ThermalTalk/ISerialConnection.cs
C#
mit
3,025
// // RMNofications.h // // Copyright (c) 2008-2009, Route-Me Contributors // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistributions of source code must retain the above copyright notice, this // list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. static NSString* const RMSuspendNetworkOperations = @"RMSuspendNetworkOperations"; static NSString* const RMResumeNetworkOperations = @"RMResumeNetworkOperations"; static NSString* const RMMapImageRemovedFromScreenNotification = @"RMMapImageRemovedFromScreen"; static NSString* const RMMapImageAddedToScreenNotification = @"RMMapImageAddedToScreen"; static NSString* const RMSuspendExpensiveOperations = @"RMSuspendExpensiveOperations"; static NSString* const RMResumeExpensiveOperations = @"RMResumeExpensiveOperations"; static NSString* const RMTileRetrieved = @"RMTileRetrieved"; static NSString* const RMTileRequested = @"RMTileRequested"; static NSString* const RMTileError = @"RMTileError"; static NSString* const RMMapImageLoadedNotification = @"RMMapImageLoaded"; static NSString* const RMMapReplacementImageLoadedNotification = @"RMMapReplacementImageLoaded"; //TF added static NSString* const RMMapImageLoadingCancelledNotification = @"RMMapImageLoadingCancelled";
sutromedia/ios-travel-guide
MapView/Map/RMNotifications.h
C
mit
2,375
using System; using System.Linq; namespace NBitcoin { [Flags] public enum BlockFlag //block index flags { BLOCK_PROOF_OF_STAKE = (1 << 0), // is proof-of-stake block BLOCK_STAKE_ENTROPY = (1 << 1), // entropy bit for stake modifier BLOCK_STAKE_MODIFIER = (1 << 2), // regenerated stake modifier }; public class BlockStake : IBitcoinSerializable { public int Mint; public OutPoint PrevoutStake; public uint StakeTime; public ulong StakeModifier; // hash modifier for proof-of-stake public uint256 StakeModifierV2; private int flags; public uint256 HashProof; public BlockStake() { } public BlockStake(byte[] bytes) { this.ReadWrite(bytes); } public BlockStake(Block block) { this.StakeModifierV2 = uint256.Zero; this.HashProof = uint256.Zero; if (IsProofOfStake(block)) { this.SetProofOfStake(); this.StakeTime = block.Transactions[1].Time; this.PrevoutStake = block.Transactions[1].Inputs[0].PrevOut; } } public BlockFlag Flags { get { return (BlockFlag)this.flags; } set { this.flags = (int)value; } } public static bool IsProofOfStake(Block block) { return block.Transactions.Count > 1 && block.Transactions[1].IsCoinStake; } public static bool IsProofOfWork(Block block) { return !IsProofOfStake(block); } public static Tuple<OutPoint, ulong> GetProofOfStake(Block block) { return IsProofOfStake(block) ? new Tuple<OutPoint, ulong>(block.Transactions[1].Inputs.First().PrevOut, block.Transactions[1].LockTime) : new Tuple<OutPoint, ulong>(new OutPoint(), (ulong)0); } public void ReadWrite(BitcoinStream stream) { stream.ReadWrite(ref this.flags); stream.ReadWrite(ref this.Mint); stream.ReadWrite(ref this.StakeModifier); stream.ReadWrite(ref this.StakeModifierV2); if (this.IsProofOfStake()) { stream.ReadWrite(ref this.PrevoutStake); stream.ReadWrite(ref this.StakeTime); } stream.ReadWrite(ref this.HashProof); } public bool IsProofOfWork() { return !((this.Flags & BlockFlag.BLOCK_PROOF_OF_STAKE) > 0); } public bool IsProofOfStake() { return (this.Flags & BlockFlag.BLOCK_PROOF_OF_STAKE) > 0; } public void SetProofOfStake() { this.Flags |= BlockFlag.BLOCK_PROOF_OF_STAKE; } public uint GetStakeEntropyBit() { return (uint)(this.Flags & BlockFlag.BLOCK_STAKE_ENTROPY) >> 1; } public bool SetStakeEntropyBit(uint nEntropyBit) { if (nEntropyBit > 1) return false; this.Flags |= (nEntropyBit != 0 ? BlockFlag.BLOCK_STAKE_ENTROPY : 0); return true; } public bool GeneratedStakeModifier() { return (this.Flags & BlockFlag.BLOCK_STAKE_MODIFIER) > 0; } public void SetStakeModifier(ulong modifier, bool fGeneratedStakeModifier) { this.StakeModifier = modifier; if (fGeneratedStakeModifier) this.Flags |= BlockFlag.BLOCK_STAKE_MODIFIER; } public static bool Check(Block block) { return block.CheckMerkleRoot() && BlockStake.CheckProofOfWork(block) && BlockStake.CheckProofOfStake(block); } public static bool CheckProofOfWork(Block block) { // if POS return true else check POW algo return IsProofOfStake(block) || block.Header.CheckProofOfWork(); } public static bool CheckProofOfStake(Block block) { // todo: move this to the full node code. // this code is not the full check of POS // full POS check will be introduced with the full node if (IsProofOfWork(block)) return true; // Coinbase output should be empty if proof-of-stake block if (block.Transactions[0].Outputs.Count != 1 || !block.Transactions[0].Outputs[0].IsEmpty) return false; // Second transaction must be coinstake, the rest must not be if (!block.Transactions[1].IsCoinStake) return false; if (block.Transactions.Skip(2).Any(t => t.IsCoinStake)) return false; return true; } public static ulong GetStakeEntropyBit(Block block) { // Take last bit of block hash as entropy bit ulong nEntropyBit = (block.GetHash().GetLow64() & (ulong)1); //LogPrint("stakemodifier", "GetStakeEntropyBit: hashBlock=%s nEntropyBit=%u\n", GetHash().ToString(), nEntropyBit); return nEntropyBit; } /// <summary> /// Check PoW and that the blocks connect correctly /// </summary> /// <param name="network">The network being used</param> /// <returns>True if PoW is correct</returns> public static bool Validate(Network network, ChainedBlock chainedBlock, StakeChain stakeChain = null) { if (network == null) throw new ArgumentNullException("network"); if (chainedBlock.Height != 0 && chainedBlock.Previous == null) return false; var heightCorrect = chainedBlock.Height == 0 || chainedBlock.Height == chainedBlock.Previous.Height + 1; var genesisCorrect = chainedBlock.Height != 0 || chainedBlock.HashBlock == network.GetGenesis().GetHash(); var hashPrevCorrect = chainedBlock.Height == 0 || chainedBlock.Header.HashPrevBlock == chainedBlock.Previous.HashBlock; var hashCorrect = chainedBlock.HashBlock == chainedBlock.Header.GetHash(); if (stakeChain == null) return heightCorrect && genesisCorrect && hashPrevCorrect && hashCorrect; var workCorrect = stakeChain.CheckPowPosAndTarget(chainedBlock, stakeChain.Get(chainedBlock.HashBlock), network); return heightCorrect && genesisCorrect && hashPrevCorrect && hashCorrect && workCorrect; } } public partial class Block { public static bool BlockSignature = false; // block signature - signed by one of the coin base txout[N]'s owner private BlockSignature blockSignature = new BlockSignature(); public BlockSignature BlockSignatur { get { return this.blockSignature; } set { this.blockSignature = value; } } } public abstract class StakeChain { public abstract BlockStake Get(uint256 blockid); public abstract void Set(uint256 blockid, BlockStake blockStake); public bool CheckPowPosAndTarget(ChainedBlock chainedBlock, BlockStake blockStake, Network network) { return this.CheckPowPosAndTarget(chainedBlock, blockStake, network.Consensus); } public bool CheckPowPosAndTarget(ChainedBlock chainedBlock, BlockStake blockStake, Consensus consensus) { if (chainedBlock.Height == 0) return true; if (blockStake.IsProofOfWork() && !chainedBlock.Header.CheckProofOfWork()) return false; return chainedBlock.Header.Bits == this.GetWorkRequired(chainedBlock, blockStake, consensus); } public Target GetWorkRequired(ChainedBlock chainedBlock, BlockStake blockStake, Consensus consensus) { return BlockValidator.GetNextTargetRequired(this, chainedBlock.Previous, consensus, blockStake.IsProofOfStake()); } } public static class StakeExtentions { public static bool CheckProofOfStake(this Block block) { return BlockStake.CheckProofOfStake(block); } } }
stratisproject/NStratis
NBitcoin/BlockStake.cs
C#
mit
6,877
<?php /* * This file is part of PHPExifTool. * * (c) 2012 Romain Neutron <imprec@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPExiftool\Driver\Tag\Sony; use JMS\Serializer\Annotation\ExclusionPolicy; use PHPExiftool\Driver\AbstractTag; /** * @ExclusionPolicy("all") */ class SweepPanoramaDirection extends AbstractTag { protected $Id = 51; protected $Name = 'SweepPanoramaDirection'; protected $FullName = 'Sony::CameraSettings3'; protected $GroupName = 'Sony'; protected $g0 = 'MakerNotes'; protected $g1 = 'Sony'; protected $g2 = 'Camera'; protected $Type = 'int8u'; protected $Writable = true; protected $Description = 'Sweep Panorama Direction'; protected $flag_Permanent = true; protected $Values = array( 1 => array( 'Id' => 1, 'Label' => 'Right', ), 2 => array( 'Id' => 2, 'Label' => 'Left', ), 3 => array( 'Id' => 3, 'Label' => 'Up', ), 4 => array( 'Id' => 4, 'Label' => 'Down', ), ); }
romainneutron/PHPExiftool
lib/PHPExiftool/Driver/Tag/Sony/SweepPanoramaDirection.php
PHP
mit
1,240
""" This file was generated with the customdashboard management command and contains the class for the main dashboard. To activate your index dashboard add the following to your settings.py:: GRAPPELLI_INDEX_DASHBOARD = 'version3.dashboard.CustomIndexDashboard' """ from django.utils.translation import ugettext_lazy as _ from django.core.urlresolvers import reverse from grappelli.dashboard import modules, Dashboard from grappelli.dashboard.utils import get_admin_site_name class CustomIndexDashboard(Dashboard): """ Custom index dashboard for www. """ def init_with_context(self, context): site_name = get_admin_site_name(context) # append a group for "Administration" & "Applications" # self.children.append(modules.Group( # _('Group: Administration & Applications'), # column=1, # collapsible=True, # children = [ # modules.AppList( # _('Administration'), # column=1, # collapsible=False, # models=('django.contrib.*',), # ), # modules.AppList( # _('Applications'), # column=1, # css_classes=('collapse closed',), # exclude=('django.contrib.*',), # ) # ] # )) # append an app list module for "Applications" # self.children.append(modules.AppList( # _('AppList: Applications'), # collapsible=True, # column=1, # css_classes=('collapse closed',), # exclude=('django.contrib.*',), # )) # append an app list module for "Administration" # self.children.append(modules.ModelList( # _('ModelList: Administration'), # column=1, # collapsible=False, # models=('django.contrib.*',), # )) # append another link list module for "support". # self.children.append(modules.LinkList( # _('Media Management'), # column=2, # children=[ # { # 'title': _('FileBrowser'), # 'url': '/admin/filebrowser/browse/', # 'external': False, # }, # ] # )) # append another link list module for "support". # self.children.append(modules.LinkList( # _('Support'), # column=2, # children=[ # { # 'title': _('Django Documentation'), # 'url': 'http://docs.djangoproject.com/', # 'external': True, # }, # { # 'title': _('Grappelli Documentation'), # 'url': 'http://packages.python.org/django-grappelli/', # 'external': True, # }, # { # 'title': _('Grappelli Google-Code'), # 'url': 'http://code.google.com/p/django-grappelli/', # 'external': True, # }, # ] # )) # append a feed module # self.children.append(modules.Feed( # _('Latest Django News'), # column=2, # feed_url='http://www.djangoproject.com/rss/weblog/', # limit=5 # )) # append a recent actions module # self.children.append(modules.RecentActions( # _('Recent Actions'), # limit=5, # collapsible=False, # column=3, # )) self.children.append(modules.ModelList( title='Office Files / Parties', column=1, models=('bittscmsapp.models.CoreInstruction', 'bittscmsapp.models.CoreParty',) )) self.children.append(modules.ModelList( title='Lookup Values', collapsible=True, column=2, models=() ))
bittssystem/version3
dashboard.py
Python
mit
4,121
import { StyleSheet } from 'react-native'; import { PRIMARY_COLOR, COLOR_WHITE } from '../../styles/colors'; const styles = StyleSheet.create({ toolbar: { height: 56, backgroundColor: PRIMARY_COLOR }, container: { flex: 1, backgroundColor: PRIMARY_COLOR, }, contentContaier: { padding: 30, }, registerButton: { backgroundColor: COLOR_WHITE, padding: 20, borderRadius: 6, marginBottom: 20, alignItems: 'center' }, registerButtonTitle: { fontSize: 18, color: PRIMARY_COLOR, } }); export { styles as default };
Seedstars/reactnative-mobile-app-base
js/containers/Register/styles.js
JavaScript
mit
646
"""Test event helpers.""" # pylint: disable=protected-access,too-many-public-methods # pylint: disable=too-few-public-methods import unittest from datetime import datetime, timedelta from astral import Astral from homeassistant.bootstrap import setup_component import homeassistant.core as ha from homeassistant.const import MATCH_ALL from homeassistant.helpers.event import ( track_point_in_utc_time, track_point_in_time, track_utc_time_change, track_time_change, track_state_change, track_sunrise, track_sunset, ) from homeassistant.components import sun import homeassistant.util.dt as dt_util from tests.common import get_test_home_assistant class TestEventHelpers(unittest.TestCase): """Test the Home Assistant event helpers.""" def setUp(self): # pylint: disable=invalid-name """Setup things to be run when tests are started.""" self.hass = get_test_home_assistant() def tearDown(self): # pylint: disable=invalid-name """Stop everything that was started.""" self.hass.stop() def test_track_point_in_time(self): """Test track point in time.""" before_birthday = datetime(1985, 7, 9, 12, 0, 0, tzinfo=dt_util.UTC) birthday_paulus = datetime(1986, 7, 9, 12, 0, 0, tzinfo=dt_util.UTC) after_birthday = datetime(1987, 7, 9, 12, 0, 0, tzinfo=dt_util.UTC) runs = [] track_point_in_utc_time( self.hass, lambda x: runs.append(1), birthday_paulus) self._send_time_changed(before_birthday) self.hass.block_till_done() self.assertEqual(0, len(runs)) self._send_time_changed(birthday_paulus) self.hass.block_till_done() self.assertEqual(1, len(runs)) # A point in time tracker will only fire once, this should do nothing self._send_time_changed(birthday_paulus) self.hass.block_till_done() self.assertEqual(1, len(runs)) track_point_in_time( self.hass, lambda x: runs.append(1), birthday_paulus) self._send_time_changed(after_birthday) self.hass.block_till_done() self.assertEqual(2, len(runs)) unsub = track_point_in_time( self.hass, lambda x: runs.append(1), birthday_paulus) unsub() self._send_time_changed(after_birthday) self.hass.block_till_done() self.assertEqual(2, len(runs)) def test_track_time_change(self): """Test tracking time change.""" wildcard_runs = [] specific_runs = [] unsub = track_time_change(self.hass, lambda x: wildcard_runs.append(1)) unsub_utc = track_utc_time_change( self.hass, lambda x: specific_runs.append(1), second=[0, 30]) self._send_time_changed(datetime(2014, 5, 24, 12, 0, 0)) self.hass.block_till_done() self.assertEqual(1, len(specific_runs)) self.assertEqual(1, len(wildcard_runs)) self._send_time_changed(datetime(2014, 5, 24, 12, 0, 15)) self.hass.block_till_done() self.assertEqual(1, len(specific_runs)) self.assertEqual(2, len(wildcard_runs)) self._send_time_changed(datetime(2014, 5, 24, 12, 0, 30)) self.hass.block_till_done() self.assertEqual(2, len(specific_runs)) self.assertEqual(3, len(wildcard_runs)) unsub() unsub_utc() self._send_time_changed(datetime(2014, 5, 24, 12, 0, 30)) self.hass.block_till_done() self.assertEqual(2, len(specific_runs)) self.assertEqual(3, len(wildcard_runs)) def test_track_state_change(self): """Test track_state_change.""" # 2 lists to track how often our callbacks get called specific_runs = [] wildcard_runs = [] wildercard_runs = [] track_state_change( self.hass, 'light.Bowl', lambda a, b, c: specific_runs.append(1), 'on', 'off') track_state_change( self.hass, 'light.Bowl', lambda _, old_s, new_s: wildcard_runs.append((old_s, new_s))) track_state_change( self.hass, MATCH_ALL, lambda _, old_s, new_s: wildercard_runs.append((old_s, new_s))) # Adding state to state machine self.hass.states.set("light.Bowl", "on") self.hass.block_till_done() self.assertEqual(0, len(specific_runs)) self.assertEqual(1, len(wildcard_runs)) self.assertEqual(1, len(wildercard_runs)) self.assertIsNone(wildcard_runs[-1][0]) self.assertIsNotNone(wildcard_runs[-1][1]) # Set same state should not trigger a state change/listener self.hass.states.set('light.Bowl', 'on') self.hass.block_till_done() self.assertEqual(0, len(specific_runs)) self.assertEqual(1, len(wildcard_runs)) self.assertEqual(1, len(wildercard_runs)) # State change off -> on self.hass.states.set('light.Bowl', 'off') self.hass.block_till_done() self.assertEqual(1, len(specific_runs)) self.assertEqual(2, len(wildcard_runs)) self.assertEqual(2, len(wildercard_runs)) # State change off -> off self.hass.states.set('light.Bowl', 'off', {"some_attr": 1}) self.hass.block_till_done() self.assertEqual(1, len(specific_runs)) self.assertEqual(3, len(wildcard_runs)) self.assertEqual(3, len(wildercard_runs)) # State change off -> on self.hass.states.set('light.Bowl', 'on') self.hass.block_till_done() self.assertEqual(1, len(specific_runs)) self.assertEqual(4, len(wildcard_runs)) self.assertEqual(4, len(wildercard_runs)) self.hass.states.remove('light.bowl') self.hass.block_till_done() self.assertEqual(1, len(specific_runs)) self.assertEqual(5, len(wildcard_runs)) self.assertEqual(5, len(wildercard_runs)) self.assertIsNotNone(wildcard_runs[-1][0]) self.assertIsNone(wildcard_runs[-1][1]) self.assertIsNotNone(wildercard_runs[-1][0]) self.assertIsNone(wildercard_runs[-1][1]) # Set state for different entity id self.hass.states.set('switch.kitchen', 'on') self.hass.block_till_done() self.assertEqual(1, len(specific_runs)) self.assertEqual(5, len(wildcard_runs)) self.assertEqual(6, len(wildercard_runs)) def test_track_sunrise(self): """Test track the sunrise.""" latitude = 32.87336 longitude = 117.22743 # Setup sun component self.hass.config.latitude = latitude self.hass.config.longitude = longitude setup_component(self.hass, sun.DOMAIN, { sun.DOMAIN: {sun.CONF_ELEVATION: 0}}) # Get next sunrise/sunset astral = Astral() utc_now = dt_util.utcnow() mod = -1 while True: next_rising = (astral.sunrise_utc(utc_now + timedelta(days=mod), latitude, longitude)) if next_rising > utc_now: break mod += 1 # Track sunrise runs = [] unsub = track_sunrise(self.hass, lambda: runs.append(1)) offset_runs = [] offset = timedelta(minutes=30) unsub2 = track_sunrise(self.hass, lambda: offset_runs.append(1), offset) # run tests self._send_time_changed(next_rising - offset) self.hass.block_till_done() self.assertEqual(0, len(runs)) self.assertEqual(0, len(offset_runs)) self._send_time_changed(next_rising) self.hass.block_till_done() self.assertEqual(1, len(runs)) self.assertEqual(0, len(offset_runs)) self._send_time_changed(next_rising + offset) self.hass.block_till_done() self.assertEqual(2, len(runs)) self.assertEqual(1, len(offset_runs)) unsub() unsub2() self._send_time_changed(next_rising + offset) self.hass.block_till_done() self.assertEqual(2, len(runs)) self.assertEqual(1, len(offset_runs)) def test_track_sunset(self): """Test track the sunset.""" latitude = 32.87336 longitude = 117.22743 # Setup sun component self.hass.config.latitude = latitude self.hass.config.longitude = longitude setup_component(self.hass, sun.DOMAIN, { sun.DOMAIN: {sun.CONF_ELEVATION: 0}}) # Get next sunrise/sunset astral = Astral() utc_now = dt_util.utcnow() mod = -1 while True: next_setting = (astral.sunset_utc(utc_now + timedelta(days=mod), latitude, longitude)) if next_setting > utc_now: break mod += 1 # Track sunset runs = [] unsub = track_sunset(self.hass, lambda: runs.append(1)) offset_runs = [] offset = timedelta(minutes=30) unsub2 = track_sunset(self.hass, lambda: offset_runs.append(1), offset) # Run tests self._send_time_changed(next_setting - offset) self.hass.block_till_done() self.assertEqual(0, len(runs)) self.assertEqual(0, len(offset_runs)) self._send_time_changed(next_setting) self.hass.block_till_done() self.assertEqual(1, len(runs)) self.assertEqual(0, len(offset_runs)) self._send_time_changed(next_setting + offset) self.hass.block_till_done() self.assertEqual(2, len(runs)) self.assertEqual(1, len(offset_runs)) unsub() unsub2() self._send_time_changed(next_setting + offset) self.hass.block_till_done() self.assertEqual(2, len(runs)) self.assertEqual(1, len(offset_runs)) def _send_time_changed(self, now): """Send a time changed event.""" self.hass.bus.fire(ha.EVENT_TIME_CHANGED, {ha.ATTR_NOW: now}) def test_periodic_task_minute(self): """Test periodic tasks per minute.""" specific_runs = [] unsub = track_utc_time_change( self.hass, lambda x: specific_runs.append(1), minute='/5') self._send_time_changed(datetime(2014, 5, 24, 12, 0, 0)) self.hass.block_till_done() self.assertEqual(1, len(specific_runs)) self._send_time_changed(datetime(2014, 5, 24, 12, 3, 0)) self.hass.block_till_done() self.assertEqual(1, len(specific_runs)) self._send_time_changed(datetime(2014, 5, 24, 12, 5, 0)) self.hass.block_till_done() self.assertEqual(2, len(specific_runs)) unsub() self._send_time_changed(datetime(2014, 5, 24, 12, 5, 0)) self.hass.block_till_done() self.assertEqual(2, len(specific_runs)) def test_periodic_task_hour(self): """Test periodic tasks per hour.""" specific_runs = [] unsub = track_utc_time_change( self.hass, lambda x: specific_runs.append(1), hour='/2') self._send_time_changed(datetime(2014, 5, 24, 22, 0, 0)) self.hass.block_till_done() self.assertEqual(1, len(specific_runs)) self._send_time_changed(datetime(2014, 5, 24, 23, 0, 0)) self.hass.block_till_done() self.assertEqual(1, len(specific_runs)) self._send_time_changed(datetime(2014, 5, 24, 0, 0, 0)) self.hass.block_till_done() self.assertEqual(2, len(specific_runs)) self._send_time_changed(datetime(2014, 5, 25, 1, 0, 0)) self.hass.block_till_done() self.assertEqual(2, len(specific_runs)) self._send_time_changed(datetime(2014, 5, 25, 2, 0, 0)) self.hass.block_till_done() self.assertEqual(3, len(specific_runs)) unsub() self._send_time_changed(datetime(2014, 5, 25, 2, 0, 0)) self.hass.block_till_done() self.assertEqual(3, len(specific_runs)) def test_periodic_task_day(self): """Test periodic tasks per day.""" specific_runs = [] unsub = track_utc_time_change( self.hass, lambda x: specific_runs.append(1), day='/2') self._send_time_changed(datetime(2014, 5, 2, 0, 0, 0)) self.hass.block_till_done() self.assertEqual(1, len(specific_runs)) self._send_time_changed(datetime(2014, 5, 3, 12, 0, 0)) self.hass.block_till_done() self.assertEqual(1, len(specific_runs)) self._send_time_changed(datetime(2014, 5, 4, 0, 0, 0)) self.hass.block_till_done() self.assertEqual(2, len(specific_runs)) unsub() self._send_time_changed(datetime(2014, 5, 4, 0, 0, 0)) self.hass.block_till_done() self.assertEqual(2, len(specific_runs)) def test_periodic_task_year(self): """Test periodic tasks per year.""" specific_runs = [] unsub = track_utc_time_change( self.hass, lambda x: specific_runs.append(1), year='/2') self._send_time_changed(datetime(2014, 5, 2, 0, 0, 0)) self.hass.block_till_done() self.assertEqual(1, len(specific_runs)) self._send_time_changed(datetime(2015, 5, 2, 0, 0, 0)) self.hass.block_till_done() self.assertEqual(1, len(specific_runs)) self._send_time_changed(datetime(2016, 5, 2, 0, 0, 0)) self.hass.block_till_done() self.assertEqual(2, len(specific_runs)) unsub() self._send_time_changed(datetime(2016, 5, 2, 0, 0, 0)) self.hass.block_till_done() self.assertEqual(2, len(specific_runs)) def test_periodic_task_wrong_input(self): """Test periodic tasks with wrong input.""" specific_runs = [] track_utc_time_change( self.hass, lambda x: specific_runs.append(1), year='/two') self._send_time_changed(datetime(2014, 5, 2, 0, 0, 0)) self.hass.block_till_done() self.assertEqual(0, len(specific_runs))
leoc/home-assistant
tests/helpers/test_event.py
Python
mit
13,995
using System; using System.Linq; class SubstringInText { static void Main() { string pattern = Console.ReadLine(); string text = Console.ReadLine(); int counter = 0; for (int i = 0; i < text.Length - pattern.Length + 1; i++) { if (text.Substring(i, pattern.Length).Equals(pattern, StringComparison.OrdinalIgnoreCase)) { counter++; } } Console.WriteLine(counter); } }
KaloyanIT/SoftwareAcademy2016
Homeworks/C#2/06. Strings and Text Processing - Homework/04. Sub-string in text/04. SubStringInText.cs
C#
mit
493
<!DOCTYPE html> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <html> <head> <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8"/> <title>Cordova WP</title> <link rel="stylesheet" href="master.css" type="text/css" media="screen" title="no title" charset="utf-8"/> <script type="text/javascript" charset="utf-8" src="cordova-current.js"></script> <script type="text/javascript"> document.addEventListener("deviceready",onDeviceReady,false); document.addEventListener("backbutton",onBackButton,false); // once the device ready event fires, you can safely do your thing! -jm function onDeviceReady() { // IE does NOT provide an alert method, you can patch it with this line after deviceready. window.alert = window.alert || navigator.notification.alert; console.log("onDeviceReady. You should see this message in Visual Studio's output window."); updateDeviceInfo(); } function onBackButton() { console.log("onBackButton"); } function updateDeviceInfo() { document.getElementById("platform").innerHTML = device.platform; document.getElementById("version").innerHTML = device.version; document.getElementById("uuid").innerHTML = device.uuid; document.getElementById("name").innerHTML = device.name; document.getElementById("width").innerHTML = screen.width; document.getElementById("height").innerHTML = screen.height; document.getElementById("colorDepth").innerHTML = screen.colorDepth; }; </script> </head> <body> <h1>Cordova Tests</h1> <div id="info"> <h4> Platform: <span id="platform"> </span> </h4> <h4> Version: <span id="version"></span> </h4> <h4> UUID: <span id="uuid"> </span> </h4> <h4> Name: <span id="name"></span> </h4> <h4> Width: <span id="width"></span>, Height: <span id="height"> </span>, Color Depth: <span id="colorDepth"></span> </h4> </div> <a href="accelerometer.html" class="btn large">Accelerometer</a> <a href="accelerometer2.html" class="btn large">Accel Game</a> <a href="audio.html" class="btn large">Audio Play/Record</a> <a href="camera.html" class="btn large">Camera</a> <a href="capture.html" class="btn large">Capture</a> <a href="compass.html" class="btn large">Compass</a> <a href="network.html" class="btn large">Connection</a> <a href="contacts.html" class="btn large">Contacts</a> <a href="events.html" class="btn large">Events</a> <a href="file.html" class="btn large">File</a> <a href="location.html" class="btn large">Location</a> <a href="notification.html" class="btn large">Notification</a> <a href="storage.html" class="btn large">Local Storage</a> <a href="calculator.html" class="btn large">Calculator (custom plugin)</a> </body> </html>
OneMoreCheckin/mobile-app
phonegap/2.6.0/windows-phone-8/example/www/index.html
HTML
mit
3,905
using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; using NuGet.Modules; using Redirect; using RedirectService.Configuration; namespace RedirectService { public class RedirectModule : IModule { private readonly List<HttpRedirect> _redirects = new List<HttpRedirect>(); public void Start() { var settings = XmlHelper.Deserialize<Settings>("settings.xml"); var patterns = settings.Patterns?.ToDictionary(p => p.Name); foreach (var redirectRule in settings.Redirects) { Dictionary<Regex, string> queryRules = null; Dictionary<string, Dictionary<Regex, string>> contentRules = null; if (patterns != null) { queryRules = redirectRule.Patterns?.Split(',').ToDictionary( patternName => new Regex(patterns[patternName].Regex, RegexOptions.IgnoreCase), patternName => patterns[patternName].Replacement); contentRules = redirectRule.Replaces?.ToDictionary( rule => rule.MediaType, rule => rule.Patterns.Split(',').ToDictionary( patternName => new Regex(patterns[patternName].Regex, RegexOptions.IgnoreCase), patternName => patterns[patternName].Replacement)); } var redirectSettings = new RedirectSettings { Urls = redirectRule.From.Split(','), UrlProcessor = new UrlProcessor(new Uri(redirectRule.To), queryRules), ResponseContentProcessor = new ContentProcessor(contentRules) }; _redirects.Add(new HttpRedirect(redirectSettings)); } foreach (var httpRedirect in _redirects) { httpRedirect.Start(); } } public void Stop() { foreach (var httpRedirect in _redirects) { httpRedirect.Stop(); } _redirects.Clear(); } } }
Apozhidaev/RedirectService
RedirectService/RedirectModule.cs
C#
mit
2,206
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width" /> <meta charset="utf-8"> <base href="https://wordbit.com"> <title> New miracle drug </title> <link rel="canonical" href="https://wordbit.com/posts/new-miracle-drug/"> <link rel="stylesheet" href="/css/poole.css"> <link rel="stylesheet" href="/css/lanyon.css"> <link rel="stylesheet" href="/css/custom.css"> </head> <body class="theme-base-08"> <input type="checkbox" class="sidebar-checkbox" id="sidebar-checkbox" xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html"> <div class="sidebar" id="sidebar"> <nav class="sidebar-nav"> <a class="sidebar-nav-item" href="/">Home</a> <a class="sidebar-nav-item" href="/posts">All Blog Posts</a> <a class="sidebar-nav-item" href="/pages/status">Status Updates</a> <a class="sidebar-nav-item" href="/pages/about">About</a> </nav> <div class="sidebar-item"> <p> &copy; 2021. All rights reserved. </p> </div> </div> <div class="wrap"> <div class="masthead"> <div class="container"> <h3 class="masthead-title"> <a href="/" title="Home">wordbit</a> </h3> </div> </div> <div class="container content"> <h1 class="post-title">New miracle drug</h1> <section id="main"> <h5 id="date"> Tue Jun 12, 2007 </h5> <p><a href="http://www.havidol.com"><img src="http://wordbit.freehostia.com/wp-content/uploads/2007/06/havidol_topbar1.jpg" alt="havidol_topbar" /></a> A new miracle drug has hit the scene - and it just might save your life&hellip; It&rsquo;s called Havidol, check out <a href="http://www.havidol.com">their website</a> right now and see if Havidol is for you!</p> </section> </div> </div> <label for="sidebar-checkbox" class="sidebar-toggle"></label> <div class="container"> <hr /> <span class="left"> &nbsp; <em>&laquo; Previous:</em> <a class="next" href="https://wordbit.com/posts/latest-developments/">Latest developments</a> </span> <span class="right"> <em>Next: </em><a class="next" href="https://wordbit.com/posts/vancouver-police-incites-wrath-of-editor/"> &nbsp; Vancouver police incites wrath of editor</a> &raquo; </span> <br> </div> <br /> <div class="container content"> <footer> <div> </div> </footer> </div> </body> </html>
wordbit/wordbit
public/posts/new-miracle-drug/index.html
HTML
mit
2,447
<!DOCTYPE html> <html lang="en" ng-app="demo"> <head> <meta charset="UTF-8"> <title>Title</title> <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css"/> <link rel="stylesheet" href="directive/panel.css"/> <script type="text/javascript" src="libs/angular.min.js"></script> <script type="text/javascript" src="directive/panel.js"></script> <script type="text/javascript" src="demo.js"></script> </head> <body ng-controller="contentCtrl"> <button style="margin-top: 50px" ng-click="addPanel()">panelAdd</button> <panel ng-repeat ='data in panelList' style-config = 'data'> <div><h5>nothing!</h5></div> </panel> </body> </html>
liufeng2015/angular-panel
index.html
HTML
mit
680
import { connect } from 'react-redux'; import Head from '../components/Head'; function mapStateToProps(state) { return { title: state.db.title, ...state.theme } } export default connect(mapStateToProps)(Head);
cape-io/cape-forms-demo
common/containers/Head.js
JavaScript
mit
225
// // DEMOContainerViewController.h // fluidArchitecture // // Created by Moritz Ellerbrock on 26.09.17. // Copyright © 2017 fluidmobile GmbH. All rights reserved. // #import "DEMOViewController.h" #import "DEMOContainerContracts.h" @interface DEMOContainerViewController : DEMOViewController <DEMOContainerViewInput> @end
fluidmobile/hero
Example/HeroArchitecture/source/modules/container/view/DEMOContainerViewController.h
C
mit
331
/** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @emails react-core */ 'use strict'; var React; var ReactDOM; var ReactDOMComponentTree; var ReactTestUtils; var SelectEventPlugin; describe('SelectEventPlugin', () => { function extract(node, topLevelEvent) { return SelectEventPlugin.extractEvents( topLevelEvent, ReactDOMComponentTree.getInstanceFromNode(node), {target: node}, node, ); } beforeEach(() => { React = require('react'); ReactDOM = require('react-dom'); ReactTestUtils = require('react-dom/test-utils'); // TODO: can we express this test with only public API? ReactDOMComponentTree = require('../../client/ReactDOMComponentTree') .default; SelectEventPlugin = require('../SelectEventPlugin').default; }); it('should skip extraction if no listeners are present', () => { class WithoutSelect extends React.Component { render() { return <input type="text" />; } } var rendered = ReactTestUtils.renderIntoDocument(<WithoutSelect />); var node = ReactDOM.findDOMNode(rendered); node.focus(); // It seems that .focus() isn't triggering this event in our test // environment so we need to ensure it gets set for this test to be valid. var fakeNativeEvent = function() {}; fakeNativeEvent.target = node; ReactTestUtils.simulateNativeEventOnNode('topFocus', node, fakeNativeEvent); var mousedown = extract(node, 'topMouseDown'); expect(mousedown).toBe(null); var mouseup = extract(node, 'topMouseUp'); expect(mouseup).toBe(null); }); it('should extract if an `onSelect` listener is present', () => { class WithSelect extends React.Component { render() { return <input type="text" onSelect={this.props.onSelect} />; } } var cb = jest.fn(); var rendered = ReactTestUtils.renderIntoDocument( <WithSelect onSelect={cb} />, ); var node = ReactDOM.findDOMNode(rendered); node.selectionStart = 0; node.selectionEnd = 0; node.focus(); var focus = extract(node, 'topFocus'); expect(focus).toBe(null); var mousedown = extract(node, 'topMouseDown'); expect(mousedown).toBe(null); var mouseup = extract(node, 'topMouseUp'); expect(mouseup).not.toBe(null); expect(typeof mouseup).toBe('object'); expect(mouseup.type).toBe('select'); expect(mouseup.target).toBe(node); }); });
silvestrijonathan/react
packages/react-dom/src/events/__tests__/SelectEventPlugin-test.js
JavaScript
mit
2,572
# Linked Lists *Taken from Cracking the Coding Interview, 6th edition* **Remove Dups:** Write code to remove duplicates from an unsorted linked list. **Return Kth to Last:** Implement an algorithm to find the kth to last element of a singly linked list **Delete Middle Node:** Implement an algorithm to delete a node in the middle of a singly linked list given only access to that node. > *Example:* **Input:** the node c from the linked list a -> b -> c -> d -> e **Result:** nothing is returned, but the new linked list looks like a -> b -> d -> e **Partition:** Write code to partition a linked list around a value x, such that all nodes less than x come before all nodes greater than or equal to x. If x is contained within the list, the values of x only need to be after the elements less than x > *Example:* **Input:** 3 -> 5 -> 8 -> 5 -> 10 -> 2 -> 1 [partition = 5] **Output:** 3 -> 1 -> 2 -> 10 -> 5 -> 5 -> 8 **Sum Lists:** You have two numbers represented by a linked list, where each node contains a single digit. The digits are stored in *reverse* order, such that the 1's digit is at the head of the list. Write a function that adds the two numbers and returns the sum as a linked list. > *Example:* **Input:** (7 -> 1 -> 6) + (5 -> 9 -> 2). That is, 617 + 296 **Output:** 2 -> 1 -> 9 **Palindrome:** Implement a function to check if a linked list is a palindrome.
Zovfreullia/unit-4-assignments
exercises/linked-lists.md
Markdown
mit
1,434
# help Help Messages for Unix Bash Go to the cloned folder and execute the `init.sh` script Add the cloned folder to the PATH variable: `$ export PATH=${PATH}:/path/to/help`
tik0/help
README.md
Markdown
mit
176
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>User agent detail - Mozilla/5.0 (Linux; U; Android 4.1.9; zh-cn; HTC EVO 4GS Build/HTC EVO 4GS) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.min.css"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="../circle.css" rel="stylesheet"> </head> <body> <div class="container"> <div class="section"> <h1 class="header center orange-text">User agent detail</h1> <div class="row center"> <h5 class="header light"> Mozilla/5.0 (Linux; U; Android 4.1.9; zh-cn; HTC EVO 4GS Build/HTC EVO 4GS) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 </h5> </div> </div> <div class="section"> <table class="striped"><tr><th></th><th colspan="3">General</th><th colspan="5">Device</th><th colspan="3">Bot</th><th colspan="2"></th></tr><tr><th>Provider</th><th>Browser</th><th>Engine</th><th>OS</th><th>Brand</th><th>Model</th><th>Type</th><th>Is mobile</th><th>Is touch</th><th>Is bot</th><th>Name</th><th>Type</th><th>Parse time</th><th>Actions</th></tr><tr><th colspan="14" class="green lighten-3">Test suite</th></tr><tr><td>UAParser<br /><small>v0.5.0.2</small><br /><small>vendor/thadafinser/uap-core/tests/test_device.yaml</small></td><td> </td><td><i class="material-icons">close</i></td><td> </td><td style="border-left: 1px solid #555">HTC</td><td>EVO 4GS</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-cfed3005-df48-4fa8-bf03-4f6ef8988f59">Detail</a> <!-- Modal Structure --> <div id="modal-cfed3005-df48-4fa8-bf03-4f6ef8988f59" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>UAParser result detail</h4> <p><pre><code class="php">Array ( [user_agent_string] => Mozilla/5.0 (Linux; U; Android 4.1.9; zh-cn; HTC EVO 4GS Build/HTC EVO 4GS) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 [family] => HTC EVO 4GS [brand] => HTC [model] => EVO 4GS ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><th colspan="14" class="green lighten-3">Providers</th></tr><tr><td>BrowscapFull<br /><small>6014</small><br /></td><td>Android 4.0</td><td>WebKit </td><td>Android 4.1</td><td style="border-left: 1px solid #555"></td><td></td><td>Mobile Phone</td><td>yes</td><td>yes</td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.018</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-47a9cd06-e213-4882-bc34-db6aed664223">Detail</a> <!-- Modal Structure --> <div id="modal-47a9cd06-e213-4882-bc34-db6aed664223" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>BrowscapFull result detail</h4> <p><pre><code class="php">stdClass Object ( [browser_name_regex] => /^mozilla\/5\.0 \(.*linux.*android.4\.1.* build\/.*\).*applewebkit\/.*\(.*khtml,.*like gecko.*\).*version\/4\.0.*safari.*$/ [browser_name_pattern] => mozilla/5.0 (*linux*android?4.1* build/*)*applewebkit/*(*khtml,*like gecko*)*version/4.0*safari* [parent] => Android Browser 4.0 [comment] => Android Browser 4.0 [browser] => Android [browser_type] => Browser [browser_bits] => 32 [browser_maker] => Google Inc [browser_modus] => unknown [version] => 4.0 [majorver] => 4 [minorver] => 0 [platform] => Android [platform_version] => 4.1 [platform_description] => Android OS [platform_bits] => 32 [platform_maker] => Google Inc [alpha] => [beta] => [win16] => [win32] => [win64] => [frames] => 1 [iframes] => 1 [tables] => 1 [cookies] => 1 [backgroundsounds] => [javascript] => 1 [vbscript] => [javaapplets] => 1 [activexcontrols] => [ismobiledevice] => 1 [istablet] => [issyndicationreader] => [crawler] => [isfake] => [isanonymized] => [ismodified] => [cssversion] => 3 [aolversion] => 0 [device_name] => general Mobile Phone [device_maker] => unknown [device_type] => Mobile Phone [device_pointing_method] => touchscreen [device_code_name] => general Mobile Phone [device_brand_name] => unknown [renderingengine_name] => WebKit [renderingengine_version] => unknown [renderingengine_description] => For Google Chrome, iOS (including both mobile Safari, WebViews within third-party apps, and web clips), Safari, Arora, Midori, OmniWeb, Shiira, iCab since version 4, Web, SRWare Iron, Rekonq, and in Maxthon 3. [renderingengine_maker] => Apple Inc ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>BrowscapLite<br /><small>6014</small><br /></td><td>Android 4.0</td><td><i class="material-icons">close</i></td><td>Android </td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>Mobile Phone</td><td>yes</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.005</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-42bb56ba-b834-47c5-bea0-c0270e9ab371">Detail</a> <!-- Modal Structure --> <div id="modal-42bb56ba-b834-47c5-bea0-c0270e9ab371" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>BrowscapLite result detail</h4> <p><pre><code class="php">stdClass Object ( [browser_name_regex] => /^mozilla\/5\.0 \(.*linux.*android.* build\/.*\).*applewebkit\/.*\(.*khtml,.*like gecko.*\).*version\/4\.0.*safari.*$/ [browser_name_pattern] => mozilla/5.0 (*linux*android* build/*)*applewebkit/*(*khtml,*like gecko*)*version/4.0*safari* [parent] => Android Browser 4.0 [comment] => Android Browser 4.0 [browser] => Android [browser_type] => unknown [browser_bits] => 0 [browser_maker] => unknown [browser_modus] => unknown [version] => 4.0 [majorver] => 0 [minorver] => 0 [platform] => Android [platform_version] => unknown [platform_description] => unknown [platform_bits] => 0 [platform_maker] => unknown [alpha] => false [beta] => false [win16] => false [win32] => false [win64] => false [frames] => false [iframes] => false [tables] => false [cookies] => false [backgroundsounds] => false [javascript] => false [vbscript] => false [javaapplets] => false [activexcontrols] => false [ismobiledevice] => 1 [istablet] => [issyndicationreader] => false [crawler] => false [isfake] => false [isanonymized] => false [ismodified] => false [cssversion] => 0 [aolversion] => 0 [device_name] => unknown [device_maker] => unknown [device_type] => Mobile Phone [device_pointing_method] => unknown [device_code_name] => unknown [device_brand_name] => unknown [renderingengine_name] => unknown [renderingengine_version] => unknown [renderingengine_description] => unknown [renderingengine_maker] => unknown ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>BrowscapPhp<br /><small>6014</small><br /></td><td>Android 4.0</td><td><i class="material-icons">close</i></td><td>Android </td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>Mobile Phone</td><td>yes</td><td>yes</td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.015</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-ad0041a2-b0f4-43f6-a70d-cad1443caa68">Detail</a> <!-- Modal Structure --> <div id="modal-ad0041a2-b0f4-43f6-a70d-cad1443caa68" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>BrowscapPhp result detail</h4> <p><pre><code class="php">stdClass Object ( [browser_name_regex] => /^mozilla\/5\.0 \(.*linux.*android.* build\/.*\).*applewebkit\/.*\(.*khtml,.*like gecko.*\).*version\/4\.0.*safari.*$/ [browser_name_pattern] => mozilla/5.0 (*linux*android* build/*)*applewebkit/*(*khtml,*like gecko*)*version/4.0*safari* [parent] => Android Browser 4.0 [comment] => Android Browser 4.0 [browser] => Android [browser_type] => unknown [browser_bits] => 0 [browser_maker] => Google Inc [browser_modus] => unknown [version] => 4.0 [majorver] => 4 [minorver] => 0 [platform] => Android [platform_version] => unknown [platform_description] => unknown [platform_bits] => 0 [platform_maker] => unknown [alpha] => false [beta] => false [win16] => false [win32] => false [win64] => false [frames] => false [iframes] => false [tables] => false [cookies] => false [backgroundsounds] => false [javascript] => false [vbscript] => false [javaapplets] => false [activexcontrols] => false [ismobiledevice] => 1 [istablet] => [issyndicationreader] => false [crawler] => [isfake] => false [isanonymized] => false [ismodified] => false [cssversion] => 0 [aolversion] => 0 [device_name] => unknown [device_maker] => unknown [device_type] => Mobile Phone [device_pointing_method] => touchscreen [device_code_name] => unknown [device_brand_name] => unknown [renderingengine_name] => unknown [renderingengine_version] => unknown [renderingengine_description] => unknown [renderingengine_maker] => unknown ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>DonatjUAParser<br /><small>v0.5.1</small><br /></td><td>Android Browser 4.0</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-15fbc1f0-2615-4d42-b5d9-a30dd647b050">Detail</a> <!-- Modal Structure --> <div id="modal-15fbc1f0-2615-4d42-b5d9-a30dd647b050" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>DonatjUAParser result detail</h4> <p><pre><code class="php">Array ( [platform] => Android [browser] => Android Browser [version] => 4.0 ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>JenssegersAgent<br /><small>v2.3.3</small><br /></td><td>Safari 4.0</td><td><i class="material-icons">close</i></td><td>AndroidOS 4.1.9</td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>yes</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-b85a2b91-6a55-4436-a82c-1ea0d46e2e51">Detail</a> <!-- Modal Structure --> <div id="modal-b85a2b91-6a55-4436-a82c-1ea0d46e2e51" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>JenssegersAgent result detail</h4> <p><pre><code class="php">Array ( [browserName] => Safari [browserVersion] => 4.0 [osName] => AndroidOS [osVersion] => 4.1.9 [deviceModel] => HTC [isMobile] => 1 [isRobot] => [botName] => ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>NeutrinoApiCom<br /><small></small><br /></td><td>Android Webkit 4.0</td><td><i class="material-icons">close</i></td><td>Android 4.1.9</td><td style="border-left: 1px solid #555">HTC</td><td>EVO 4G</td><td>mobile-browser</td><td>yes</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.26902</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-8c2a7a4e-3fbf-4df2-8d61-5e730422f67b">Detail</a> <!-- Modal Structure --> <div id="modal-8c2a7a4e-3fbf-4df2-8d61-5e730422f67b" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>NeutrinoApiCom result detail</h4> <p><pre><code class="php">stdClass Object ( [mobile_screen_height] => 480 [is_mobile] => 1 [type] => mobile-browser [mobile_brand] => HTC [mobile_model] => EVO 4G [version] => 4.0 [is_android] => 1 [browser_name] => Android Webkit [operating_system_family] => Android [operating_system_version] => 4.1.9 [is_ios] => [producer] => Google Inc. [operating_system] => Android 4.1.x Jelly Bean [mobile_screen_width] => 320 [mobile_browser] => Android Webkit ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>PiwikDeviceDetector<br /><small>3.6.1</small><br /></td><td>Android Browser </td><td>WebKit </td><td>Android 4.1</td><td style="border-left: 1px solid #555">HTC</td><td>EVO 4GS</td><td>smartphone</td><td>yes</td><td></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.003</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-4a941d34-a8d3-4914-9724-346f60ad7046">Detail</a> <!-- Modal Structure --> <div id="modal-4a941d34-a8d3-4914-9724-346f60ad7046" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>PiwikDeviceDetector result detail</h4> <p><pre><code class="php">Array ( [client] => Array ( [type] => browser [name] => Android Browser [short_name] => AN [version] => [engine] => WebKit ) [operatingSystem] => Array ( [name] => Android [short_name] => AND [version] => 4.1 [platform] => ) [device] => Array ( [brand] => HT [brandName] => HTC [model] => EVO 4GS [device] => 1 [deviceName] => smartphone ) [bot] => [extra] => Array ( [isBot] => [isBrowser] => 1 [isFeedReader] => [isMobileApp] => [isPIM] => [isLibrary] => [isMediaPlayer] => [isCamera] => [isCarBrowser] => [isConsole] => [isFeaturePhone] => [isPhablet] => [isPortableMediaPlayer] => [isSmartDisplay] => [isSmartphone] => 1 [isTablet] => [isTV] => [isDesktop] => [isMobile] => 1 [isTouchEnabled] => ) ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>SinergiBrowserDetector<br /><small>6.0.1</small><br /></td><td>Navigator 4.0</td><td><i class="material-icons">close</i></td><td>Android 4.1.9</td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td></td><td><i class="material-icons">close</i></td><td>yes</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.001</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-ec1cd248-02b0-457e-8a9d-35bb99af008c">Detail</a> <!-- Modal Structure --> <div id="modal-ec1cd248-02b0-457e-8a9d-35bb99af008c" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>SinergiBrowserDetector result detail</h4> <p><pre><code class="php">Array ( [browser] => Sinergi\BrowserDetector\Browser Object ( [userAgent:Sinergi\BrowserDetector\Browser:private] => Sinergi\BrowserDetector\UserAgent Object ( [userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/5.0 (Linux; U; Android 4.1.9; zh-cn; HTC EVO 4GS Build/HTC EVO 4GS) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 ) [name:Sinergi\BrowserDetector\Browser:private] => Navigator [version:Sinergi\BrowserDetector\Browser:private] => 4.0 [isRobot:Sinergi\BrowserDetector\Browser:private] => [isChromeFrame:Sinergi\BrowserDetector\Browser:private] => [isFacebookWebView:Sinergi\BrowserDetector\Browser:private] => [isCompatibilityMode:Sinergi\BrowserDetector\Browser:private] => ) [operatingSystem] => Sinergi\BrowserDetector\Os Object ( [name:Sinergi\BrowserDetector\Os:private] => Android [version:Sinergi\BrowserDetector\Os:private] => 4.1.9 [isMobile:Sinergi\BrowserDetector\Os:private] => 1 [userAgent:Sinergi\BrowserDetector\Os:private] => Sinergi\BrowserDetector\UserAgent Object ( [userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/5.0 (Linux; U; Android 4.1.9; zh-cn; HTC EVO 4GS Build/HTC EVO 4GS) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 ) ) [device] => Sinergi\BrowserDetector\Device Object ( [name:Sinergi\BrowserDetector\Device:private] => unknown [userAgent:Sinergi\BrowserDetector\Device:private] => Sinergi\BrowserDetector\UserAgent Object ( [userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/5.0 (Linux; U; Android 4.1.9; zh-cn; HTC EVO 4GS Build/HTC EVO 4GS) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 ) ) ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>UAParser<br /><small>v3.4.5</small><br /></td><td>Android 4.1.9</td><td><i class="material-icons">close</i></td><td>Android 4.1.9</td><td style="border-left: 1px solid #555">HTC</td><td>EVO 4GS</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.001</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-3160e405-8a8f-46dd-8f47-5115f06462d2">Detail</a> <!-- Modal Structure --> <div id="modal-3160e405-8a8f-46dd-8f47-5115f06462d2" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>UAParser result detail</h4> <p><pre><code class="php">UAParser\Result\Client Object ( [ua] => UAParser\Result\UserAgent Object ( [major] => 4 [minor] => 1 [patch] => 9 [family] => Android ) [os] => UAParser\Result\OperatingSystem Object ( [major] => 4 [minor] => 1 [patch] => 9 [patchMinor] => [family] => Android ) [device] => UAParser\Result\Device Object ( [brand] => HTC [model] => EVO 4GS [family] => HTC EVO 4GS ) [originalUserAgent] => Mozilla/5.0 (Linux; U; Android 4.1.9; zh-cn; HTC EVO 4GS Build/HTC EVO 4GS) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>UserAgentApiCom<br /><small></small><br /></td><td>Safari 534.30</td><td>WebKit 534.30</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>Mobile</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.15101</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-afeb05fb-26b9-4509-b8ac-0c604a9e97d6">Detail</a> <!-- Modal Structure --> <div id="modal-afeb05fb-26b9-4509-b8ac-0c604a9e97d6" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>UserAgentApiCom result detail</h4> <p><pre><code class="php">stdClass Object ( [platform_name] => HTC [platform_version] => 4 [platform_type] => Mobile [browser_name] => Safari [browser_version] => 534.30 [engine_name] => WebKit [engine_version] => 534.30 ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>UserAgentStringCom<br /><small></small><br /></td><td>Android Webkit Browser </td><td><i class="material-icons">close</i></td><td>Android 4.1.9</td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.064</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-08a9ddfb-838f-48d7-9ede-1d132306b2ee">Detail</a> <!-- Modal Structure --> <div id="modal-08a9ddfb-838f-48d7-9ede-1d132306b2ee" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>UserAgentStringCom result detail</h4> <p><pre><code class="php">stdClass Object ( [agent_type] => Browser [agent_name] => Android Webkit Browser [agent_version] => -- [os_type] => Android [os_name] => Android [os_versionName] => [os_versionNumber] => 4.1.9 [os_producer] => [os_producerURL] => [linux_distibution] => Null [agent_language] => Chinese - China [agent_languageTag] => zh-cn ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>WhatIsMyBrowserCom<br /><small></small><br /></td><td>Android Browser 4.0</td><td>WebKit 534.30</td><td>Android 4.1.9</td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.24201</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-5fc1ff22-a74d-481b-9ad1-fcfde73ded9c">Detail</a> <!-- Modal Structure --> <div id="modal-5fc1ff22-a74d-481b-9ad1-fcfde73ded9c" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>WhatIsMyBrowserCom result detail</h4> <p><pre><code class="php">stdClass Object ( [operating_system_name] => Android [simple_sub_description_string] => [simple_browser_string] => Android Browser 4 on Android (Jelly Bean) [browser_version] => 4 [extra_info] => Array ( ) [operating_platform] => HTC [extra_info_table] => stdClass Object ( [System Build] => Htc ) [layout_engine_name] => WebKit [detected_addons] => Array ( ) [operating_system_flavour_code] => [hardware_architecture] => [operating_system_flavour] => [operating_system_frameworks] => Array ( ) [browser_name_code] => android-browser [operating_system_version] => Jelly Bean [simple_operating_platform_string] => HTC [is_abusive] => [layout_engine_version] => 534.30 [browser_capabilities] => Array ( ) [operating_platform_vendor_name] => [operating_system] => Android (Jelly Bean) [operating_system_version_full] => 4.1.9 [operating_platform_code] => [browser_name] => Android Browser [operating_system_name_code] => android [user_agent] => Mozilla/5.0 (Linux; U; Android 4.1.9; zh-cn; HTC EVO 4GS Build/HTC EVO 4GS) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 [browser_version_full] => 4.0 [browser] => Android Browser 4 ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>WhichBrowser<br /><small>v2.0.18</small><br /></td><td>Android Browser </td><td>Webkit 534.30</td><td>Android 4.1.9</td><td style="border-left: 1px solid #555">HTC</td><td>EVO 4G</td><td>mobile:smart</td><td>yes</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.001</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-083a336f-5d73-4505-84f3-c5fc9bb78652">Detail</a> <!-- Modal Structure --> <div id="modal-083a336f-5d73-4505-84f3-c5fc9bb78652" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>WhichBrowser result detail</h4> <p><pre><code class="php">Array ( [browser] => Array ( [name] => Android Browser ) [engine] => Array ( [name] => Webkit [version] => 534.30 ) [os] => Array ( [name] => Android [version] => 4.1.9 ) [device] => Array ( [type] => mobile [subtype] => smart [manufacturer] => HTC [model] => EVO 4G ) ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>Woothee<br /><small>v1.2.0</small><br /></td><td>Safari 4.0</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>smartphone</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-f00e7198-0e22-49fe-bad0-dbb3a9cde9b9">Detail</a> <!-- Modal Structure --> <div id="modal-f00e7198-0e22-49fe-bad0-dbb3a9cde9b9" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>Woothee result detail</h4> <p><pre><code class="php">Array ( [name] => Safari [vendor] => Apple [version] => 4.0 [category] => smartphone [os] => Android [os_version] => 4.1.9 ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>Wurfl<br /><small>1.7.1.0</small><br /></td><td>Android Webkit 4.1.9</td><td><i class="material-icons">close</i></td><td>Android 4.1.9</td><td style="border-left: 1px solid #555"></td><td></td><td>Smartphone</td><td>yes</td><td>yes</td><td style="border-left: 1px solid #555"></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.017</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-a2bedf8c-4a95-42a7-96c5-aaf233b2ac50">Detail</a> <!-- Modal Structure --> <div id="modal-a2bedf8c-4a95-42a7-96c5-aaf233b2ac50" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>Wurfl result detail</h4> <p><pre><code class="php">Array ( [virtual] => Array ( [is_android] => true [is_ios] => false [is_windows_phone] => false [is_app] => false [is_full_desktop] => false [is_largescreen] => false [is_mobile] => true [is_robot] => false [is_smartphone] => true [is_touchscreen] => true [is_wml_preferred] => false [is_xhtmlmp_preferred] => false [is_html_preferred] => true [advertised_device_os] => Android [advertised_device_os_version] => 4.1.9 [advertised_browser] => Android Webkit [advertised_browser_version] => 4.1.9 [complete_device_name] => Generic Android 4.1 [device_name] => Generic Android 4.1 [form_factor] => Smartphone [is_phone] => true [is_app_webview] => false ) [all] => Array ( [brand_name] => Generic [model_name] => Android 4.1 [unique] => true [ununiqueness_handler] => [is_wireless_device] => true [device_claims_web_support] => true [has_qwerty_keyboard] => true [can_skip_aligned_link_row] => true [uaprof] => [uaprof2] => [uaprof3] => [nokia_series] => 0 [nokia_edition] => 0 [device_os] => Android [mobile_browser] => Android Webkit [mobile_browser_version] => [device_os_version] => 4.1 [pointing_method] => touchscreen [release_date] => 2012_july [marketing_name] => [model_extra_info] => [nokia_feature_pack] => 0 [can_assign_phone_number] => true [is_tablet] => false [manufacturer_name] => [is_bot] => false [is_google_glass] => false [proportional_font] => false [built_in_back_button_support] => false [card_title_support] => true [softkey_support] => false [table_support] => true [numbered_menus] => false [menu_with_select_element_recommended] => false [menu_with_list_of_links_recommended] => true [icons_on_menu_items_support] => false [break_list_of_links_with_br_element_recommended] => true [access_key_support] => false [wrap_mode_support] => false [times_square_mode_support] => false [deck_prefetch_support] => false [elective_forms_recommended] => true [wizards_recommended] => false [image_as_link_support] => false [insert_br_element_after_widget_recommended] => false [wml_can_display_images_and_text_on_same_line] => false [wml_displays_image_in_center] => false [opwv_wml_extensions_support] => false [wml_make_phone_call_string] => wtai://wp/mc; [chtml_display_accesskey] => false [emoji] => false [chtml_can_display_images_and_text_on_same_line] => false [chtml_displays_image_in_center] => false [imode_region] => none [chtml_make_phone_call_string] => tel: [chtml_table_support] => false [xhtml_honors_bgcolor] => true [xhtml_supports_forms_in_table] => true [xhtml_support_wml2_namespace] => false [xhtml_autoexpand_select] => false [xhtml_select_as_dropdown] => false [xhtml_select_as_radiobutton] => false [xhtml_select_as_popup] => false [xhtml_display_accesskey] => false [xhtml_supports_invisible_text] => false [xhtml_supports_inline_input] => false [xhtml_supports_monospace_font] => false [xhtml_supports_table_for_layout] => true [xhtml_supports_css_cell_table_coloring] => true [xhtml_format_as_css_property] => false [xhtml_format_as_attribute] => false [xhtml_nowrap_mode] => false [xhtml_marquee_as_css_property] => false [xhtml_readable_background_color1] => #FFFFFF [xhtml_readable_background_color2] => #FFFFFF [xhtml_allows_disabled_form_elements] => true [xhtml_document_title_support] => true [xhtml_preferred_charset] => iso-8859-1 [opwv_xhtml_extensions_support] => false [xhtml_make_phone_call_string] => tel: [xhtmlmp_preferred_mime_type] => text/html [xhtml_table_support] => true [xhtml_send_sms_string] => sms: [xhtml_send_mms_string] => mms: [xhtml_file_upload] => supported [cookie_support] => true [accept_third_party_cookie] => true [xhtml_supports_iframe] => full [xhtml_avoid_accesskeys] => true [xhtml_can_embed_video] => none [ajax_support_javascript] => true [ajax_manipulate_css] => true [ajax_support_getelementbyid] => true [ajax_support_inner_html] => true [ajax_xhr_type] => standard [ajax_manipulate_dom] => true [ajax_support_events] => true [ajax_support_event_listener] => true [ajax_preferred_geoloc_api] => w3c_api [xhtml_support_level] => 4 [preferred_markup] => html_web_4_0 [wml_1_1] => false [wml_1_2] => false [wml_1_3] => false [html_wi_w3_xhtmlbasic] => true [html_wi_oma_xhtmlmp_1_0] => true [html_wi_imode_html_1] => false [html_wi_imode_html_2] => false [html_wi_imode_html_3] => false [html_wi_imode_html_4] => false [html_wi_imode_html_5] => false [html_wi_imode_htmlx_1] => false [html_wi_imode_htmlx_1_1] => false [html_wi_imode_compact_generic] => false [html_web_3_2] => true [html_web_4_0] => true [voicexml] => false [multipart_support] => false [total_cache_disable_support] => false [time_to_live_support] => false [resolution_width] => 320 [resolution_height] => 480 [columns] => 60 [max_image_width] => 320 [max_image_height] => 480 [rows] => 40 [physical_screen_width] => 34 [physical_screen_height] => 50 [dual_orientation] => true [density_class] => 1.0 [wbmp] => true [bmp] => false [epoc_bmp] => false [gif_animated] => false [jpg] => true [png] => true [tiff] => false [transparent_png_alpha] => true [transparent_png_index] => true [svgt_1_1] => true [svgt_1_1_plus] => false [greyscale] => false [gif] => true [colors] => 65536 [webp_lossy_support] => true [webp_lossless_support] => true [post_method_support] => true [basic_authentication_support] => true [empty_option_value_support] => true [emptyok] => false [nokia_voice_call] => false [wta_voice_call] => false [wta_phonebook] => false [wta_misc] => false [wta_pdc] => false [https_support] => true [phone_id_provided] => false [max_data_rate] => 3600 [wifi] => true [sdio] => false [vpn] => false [has_cellular_radio] => true [max_deck_size] => 2000000 [max_url_length_in_requests] => 256 [max_url_length_homepage] => 0 [max_url_length_bookmark] => 0 [max_url_length_cached_page] => 0 [max_no_of_connection_settings] => 0 [max_no_of_bookmarks] => 0 [max_length_of_username] => 0 [max_length_of_password] => 0 [max_object_size] => 0 [downloadfun_support] => false [directdownload_support] => true [inline_support] => false [oma_support] => true [ringtone] => false [ringtone_3gpp] => false [ringtone_midi_monophonic] => false [ringtone_midi_polyphonic] => false [ringtone_imelody] => false [ringtone_digiplug] => false [ringtone_compactmidi] => false [ringtone_mmf] => false [ringtone_rmf] => false [ringtone_xmf] => false [ringtone_amr] => false [ringtone_awb] => false [ringtone_aac] => false [ringtone_wav] => false [ringtone_mp3] => false [ringtone_spmidi] => false [ringtone_qcelp] => false [ringtone_voices] => 1 [ringtone_df_size_limit] => 0 [ringtone_directdownload_size_limit] => 0 [ringtone_inline_size_limit] => 0 [ringtone_oma_size_limit] => 0 [wallpaper] => false [wallpaper_max_width] => 0 [wallpaper_max_height] => 0 [wallpaper_preferred_width] => 0 [wallpaper_preferred_height] => 0 [wallpaper_resize] => none [wallpaper_wbmp] => false [wallpaper_bmp] => false [wallpaper_gif] => false [wallpaper_jpg] => false [wallpaper_png] => false [wallpaper_tiff] => false [wallpaper_greyscale] => false [wallpaper_colors] => 2 [wallpaper_df_size_limit] => 0 [wallpaper_directdownload_size_limit] => 0 [wallpaper_inline_size_limit] => 0 [wallpaper_oma_size_limit] => 0 [screensaver] => false [screensaver_max_width] => 0 [screensaver_max_height] => 0 [screensaver_preferred_width] => 0 [screensaver_preferred_height] => 0 [screensaver_resize] => none [screensaver_wbmp] => false [screensaver_bmp] => false [screensaver_gif] => false [screensaver_jpg] => false [screensaver_png] => false [screensaver_greyscale] => false [screensaver_colors] => 2 [screensaver_df_size_limit] => 0 [screensaver_directdownload_size_limit] => 0 [screensaver_inline_size_limit] => 0 [screensaver_oma_size_limit] => 0 [picture] => false [picture_max_width] => 0 [picture_max_height] => 0 [picture_preferred_width] => 0 [picture_preferred_height] => 0 [picture_resize] => none [picture_wbmp] => false [picture_bmp] => false [picture_gif] => false [picture_jpg] => false [picture_png] => false [picture_greyscale] => false [picture_colors] => 2 [picture_df_size_limit] => 0 [picture_directdownload_size_limit] => 0 [picture_inline_size_limit] => 0 [picture_oma_size_limit] => 0 [video] => false [oma_v_1_0_forwardlock] => false [oma_v_1_0_combined_delivery] => false [oma_v_1_0_separate_delivery] => false [streaming_video] => true [streaming_3gpp] => true [streaming_mp4] => true [streaming_mov] => false [streaming_video_size_limit] => 0 [streaming_real_media] => none [streaming_flv] => false [streaming_3g2] => false [streaming_vcodec_h263_0] => 10 [streaming_vcodec_h263_3] => -1 [streaming_vcodec_mpeg4_sp] => 2 [streaming_vcodec_mpeg4_asp] => -1 [streaming_vcodec_h264_bp] => 3.0 [streaming_acodec_amr] => nb [streaming_acodec_aac] => lc [streaming_wmv] => none [streaming_preferred_protocol] => rtsp [streaming_preferred_http_protocol] => apple_live_streaming [wap_push_support] => false [connectionless_service_indication] => false [connectionless_service_load] => false [connectionless_cache_operation] => false [connectionoriented_unconfirmed_service_indication] => false [connectionoriented_unconfirmed_service_load] => false [connectionoriented_unconfirmed_cache_operation] => false [connectionoriented_confirmed_service_indication] => false [connectionoriented_confirmed_service_load] => false [connectionoriented_confirmed_cache_operation] => false [utf8_support] => true [ascii_support] => false [iso8859_support] => false [expiration_date] => false [j2me_cldc_1_0] => false [j2me_cldc_1_1] => false [j2me_midp_1_0] => false [j2me_midp_2_0] => false [doja_1_0] => false [doja_1_5] => false [doja_2_0] => false [doja_2_1] => false [doja_2_2] => false [doja_3_0] => false [doja_3_5] => false [doja_4_0] => false [j2me_jtwi] => false [j2me_mmapi_1_0] => false [j2me_mmapi_1_1] => false [j2me_wmapi_1_0] => false [j2me_wmapi_1_1] => false [j2me_wmapi_2_0] => false [j2me_btapi] => false [j2me_3dapi] => false [j2me_locapi] => false [j2me_nokia_ui] => false [j2me_motorola_lwt] => false [j2me_siemens_color_game] => false [j2me_siemens_extension] => false [j2me_heap_size] => 0 [j2me_max_jar_size] => 0 [j2me_storage_size] => 0 [j2me_max_record_store_size] => 0 [j2me_screen_width] => 0 [j2me_screen_height] => 0 [j2me_canvas_width] => 0 [j2me_canvas_height] => 0 [j2me_bits_per_pixel] => 0 [j2me_audio_capture_enabled] => false [j2me_video_capture_enabled] => false [j2me_photo_capture_enabled] => false [j2me_capture_image_formats] => none [j2me_http] => false [j2me_https] => false [j2me_socket] => false [j2me_udp] => false [j2me_serial] => false [j2me_gif] => false [j2me_gif89a] => false [j2me_jpg] => false [j2me_png] => false [j2me_bmp] => false [j2me_bmp3] => false [j2me_wbmp] => false [j2me_midi] => false [j2me_wav] => false [j2me_amr] => false [j2me_mp3] => false [j2me_mp4] => false [j2me_imelody] => false [j2me_rmf] => false [j2me_au] => false [j2me_aac] => false [j2me_realaudio] => false [j2me_xmf] => false [j2me_wma] => false [j2me_3gpp] => false [j2me_h263] => false [j2me_svgt] => false [j2me_mpeg4] => false [j2me_realvideo] => false [j2me_real8] => false [j2me_realmedia] => false [j2me_left_softkey_code] => 0 [j2me_right_softkey_code] => 0 [j2me_middle_softkey_code] => 0 [j2me_select_key_code] => 0 [j2me_return_key_code] => 0 [j2me_clear_key_code] => 0 [j2me_datefield_no_accepts_null_date] => false [j2me_datefield_broken] => false [receiver] => false [sender] => false [mms_max_size] => 0 [mms_max_height] => 0 [mms_max_width] => 0 [built_in_recorder] => false [built_in_camera] => true [mms_jpeg_baseline] => false [mms_jpeg_progressive] => false [mms_gif_static] => false [mms_gif_animated] => false [mms_png] => false [mms_bmp] => false [mms_wbmp] => false [mms_amr] => false [mms_wav] => false [mms_midi_monophonic] => false [mms_midi_polyphonic] => false [mms_midi_polyphonic_voices] => 0 [mms_spmidi] => false [mms_mmf] => false [mms_mp3] => false [mms_evrc] => false [mms_qcelp] => false [mms_ota_bitmap] => false [mms_nokia_wallpaper] => false [mms_nokia_operatorlogo] => false [mms_nokia_3dscreensaver] => false [mms_nokia_ringingtone] => false [mms_rmf] => false [mms_xmf] => false [mms_symbian_install] => false [mms_jar] => false [mms_jad] => false [mms_vcard] => false [mms_vcalendar] => false [mms_wml] => false [mms_wbxml] => false [mms_wmlc] => false [mms_video] => false [mms_mp4] => false [mms_3gpp] => false [mms_3gpp2] => false [mms_max_frame_rate] => 0 [nokiaring] => false [picturemessage] => false [operatorlogo] => false [largeoperatorlogo] => false [callericon] => false [nokiavcard] => false [nokiavcal] => false [sckl_ringtone] => false [sckl_operatorlogo] => false [sckl_groupgraphic] => false [sckl_vcard] => false [sckl_vcalendar] => false [text_imelody] => false [ems] => false [ems_variablesizedpictures] => false [ems_imelody] => false [ems_odi] => false [ems_upi] => false [ems_version] => 0 [siemens_ota] => false [siemens_logo_width] => 101 [siemens_logo_height] => 29 [siemens_screensaver_width] => 101 [siemens_screensaver_height] => 50 [gprtf] => false [sagem_v1] => false [sagem_v2] => false [panasonic] => false [sms_enabled] => true [wav] => false [mmf] => false [smf] => false [mld] => false [midi_monophonic] => false [midi_polyphonic] => false [sp_midi] => false [rmf] => false [xmf] => false [compactmidi] => false [digiplug] => false [nokia_ringtone] => false [imelody] => false [au] => false [amr] => false [awb] => false [aac] => true [mp3] => true [voices] => 1 [qcelp] => false [evrc] => false [flash_lite_version] => [fl_wallpaper] => false [fl_screensaver] => false [fl_standalone] => false [fl_browser] => false [fl_sub_lcd] => false [full_flash_support] => false [css_supports_width_as_percentage] => true [css_border_image] => webkit [css_rounded_corners] => webkit [css_gradient] => none [css_spriting] => true [css_gradient_linear] => none [is_transcoder] => false [transcoder_ua_header] => user-agent [rss_support] => false [pdf_support] => true [progressive_download] => true [playback_vcodec_h263_0] => 10 [playback_vcodec_h263_3] => -1 [playback_vcodec_mpeg4_sp] => 0 [playback_vcodec_mpeg4_asp] => -1 [playback_vcodec_h264_bp] => 3.0 [playback_real_media] => none [playback_3gpp] => true [playback_3g2] => false [playback_mp4] => true [playback_mov] => false [playback_acodec_amr] => nb [playback_acodec_aac] => none [playback_df_size_limit] => 0 [playback_directdownload_size_limit] => 0 [playback_inline_size_limit] => 0 [playback_oma_size_limit] => 0 [playback_acodec_qcelp] => false [playback_wmv] => none [hinted_progressive_download] => true [html_preferred_dtd] => html4 [viewport_supported] => true [viewport_width] => device_width_token [viewport_userscalable] => no [viewport_initial_scale] => [viewport_maximum_scale] => [viewport_minimum_scale] => [mobileoptimized] => false [handheldfriendly] => false [canvas_support] => full [image_inlining] => true [is_smarttv] => false [is_console] => false [nfc_support] => false [ux_full_desktop] => false [jqm_grade] => A [is_sencha_touch_ok] => false ) ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>Zsxsoft<br /><small>1.3</small><br /></td><td>Android Webkit 4.0</td><td><i class="material-icons">close</i></td><td>Android 4.1.9</td><td style="border-left: 1px solid #555">HTC</td><td>EVO</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-5d43e024-b46c-44f6-8914-529b05569bc2">Detail</a> <!-- Modal Structure --> <div id="modal-5d43e024-b46c-44f6-8914-529b05569bc2" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>Zsxsoft result detail</h4> <p><pre><code class="php">Array ( [browser] => Array ( [link] => http://developer.android.com/reference/android/webkit/package-summary.html [title] => Android Webkit 4.0 [name] => Android Webkit [version] => 4.0 [code] => android-webkit [image] => img/16/browser/android-webkit.png ) [os] => Array ( [link] => http://www.android.com/ [name] => Android [version] => 4.1.9 [code] => android [x64] => [title] => Android 4.1.9 [type] => os [dir] => os [image] => img/16/os/android.png ) [device] => Array ( [link] => http://en.wikipedia.org/wiki/High_Tech_Computer_Corporation [title] => HTC EVO [model] => EVO [brand] => HTC [code] => htc [dir] => device [type] => device [image] => img/16/device/htc.png ) [platform] => Array ( [link] => http://en.wikipedia.org/wiki/High_Tech_Computer_Corporation [title] => HTC EVO [model] => EVO [brand] => HTC [code] => htc [dir] => device [type] => device [image] => img/16/device/htc.png ) ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr></table> </div> <div class="section"> <h1 class="header center orange-text">About this comparison</h1> <div class="row center"> <h5 class="header light"> The primary goal of this project is simple<br /> I wanted to know which user agent parser is the most accurate in each part - device detection, bot detection and so on...<br /> <br /> The secondary goal is to provide a source for all user agent parsers to improve their detection based on this results.<br /> <br /> You can also improve this further, by suggesting ideas at <a href="https://github.com/ThaDafinser/UserAgentParserComparison">ThaDafinser/UserAgentParserComparison</a><br /> <br /> The comparison is based on the abstraction by <a href="https://github.com/ThaDafinser/UserAgentParser">ThaDafinser/UserAgentParser</a> </h5> </div> </div> <div class="card"> <div class="card-content"> Comparison created <i>2016-05-10 08:08:34</i> | by <a href="https://github.com/ThaDafinser">ThaDafinser</a> </div> </div> </div> <script src="https://code.jquery.com/jquery-2.1.4.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/js/materialize.min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/list.js/1.2.0/list.min.js"></script> <script> $(document).ready(function(){ // the "href" attribute of .modal-trigger must specify the modal ID that wants to be triggered $('.modal-trigger').leanModal(); }); </script> </body> </html>
ThaDafinser/UserAgentParserComparison
v5/user-agent-detail/d5/67/d567cefe-91bc-4de4-b6bd-a2907e148c04.html
HTML
mit
56,608
package com.fallenritemonk.ludus; import android.content.SharedPreferences; import android.graphics.Color; import android.os.Bundle; import com.github.paolorotolo.appintro.AppIntro2; import com.github.paolorotolo.appintro.AppIntroFragment; /** * Created by FallenRiteMonk on 10/21/15. */ public class Tutorial extends AppIntro2 { @Override public void init(Bundle savedInstanceState) { addSlide(AppIntroFragment.newInstance(getString(R.string.guide), getString(R.string.guide_title), R.drawable.tut_initial, Color.RED)); addSlide(AppIntroFragment.newInstance(getString(R.string.guide), getString(R.string.guide_combine_1) + "\n" + getString(R.string.guide_combine_2), R.drawable.tut_combine, Color.parseColor("#FF8000"))); addSlide(AppIntroFragment.newInstance(getString(R.string.guide), getString(R.string.guide_empty_fields) + "\n" + getString(R.string.guide_new_line), R.drawable.tut_empty, Color.parseColor("#D7DF01"))); addSlide(AppIntroFragment.newInstance(getString(R.string.guide), getString(R.string.guide_add_fields) + "\n" + getString(R.string.guide_won), R.drawable.tut_add, Color.parseColor("#04B404"))); addSlide(AppIntroFragment.newInstance(getString(R.string.guide), getString(R.string.guide_drawer_1) + "\n" + getString(R.string.guide_drawer_2), R.drawable.tut_drawer, Color.GRAY)); setZoomAnimation(); } @Override public void onDonePressed() { SharedPreferences persist = getSharedPreferences(getString(R.string.static_settings_file), 0); SharedPreferences.Editor editor = persist.edit(); editor.putBoolean(getString(R.string.static_first_launch), false); editor.apply(); finish(); } }
FallenRiteMonk/ludus
app/src/main/java/com/fallenritemonk/ludus/Tutorial.java
Java
mit
1,724
![BANNER](imgs/LiftingBuddyBanner.jpg) ## About View Summaries | Graph Progress | Edit Workouts Easily :---------------------------:|:----------------------------:|:----------------------------: ![Summary](imgs/Summary.jpg) | ![Graph](imgs/Graph.jpg) | ![Edit](imgs/Edit.jpg) <b>Lifting Buddy is an iOS application designed to help you keep track of your workout progress.</b> In this readme and app, "PGM" stands for Progression Method. [App Store Link](https://itunes.apple.com/us/app/lifting-buddy-workout-tracker/id1328144255?ls=1&mt=8) ## Setup To run this application using XCode, you will need to have CocoaPods installed. 1. [Recursively clone the repository](https://stackoverflow.com/questions/3796927/how-to-git-clone-including-submodules) 1. In the project directory, run the command "pod install". 1. Open the .xcworkspace file ## Road Map: The below roadmap is not in "order of implementation"; I generally work on what I want to. Process                   | Step | Notes :---------------------------:|:----:|:-------------------------------------------------------: Exercise Creation | 9/10 | Add nice way to choose progression method unit Optional exercise in workout | 0/10 | Will require realm migration; Avoiding for now PGM Max -> Best Conversion | 0/10 | Will require realm migration; Avoiding for now One Rep Max Tracker | 0/10 | Should be implemented on the summary view ##### Explanations * <b>Optional exercise in workout</b> - The user should be able to set exercises as "optional" within a workout. However, I'm still not comfortable with performing realm migrations (the app tends to crash when I attempt to do so) * <b>PGM Max -> Best Conversion</b> - Sometimes, the user wants the lowest possible value instead of the highest possible value (think assisted pullups, etc). To do so, I want progressionmethods to have a "max/min is best" option. This also requires pgms to undergo a realm migration. * <b>One Rep Max Tracker</b> - Feature request ## Known Bugs * HIGH * No high priority bugs at this time * MEDIUM * No medium priority bugs at this time * LOW [Can workaround] * No low priority bugs at this time ## Future plans * Convert relevant UIViews into ViewControllers (good practice)<br>   Update from 11/29 -- my shower thoughts said this wasn't a good idea. Reason being that containerviewcontrollers would require the frames to be set anyway, which is what I wanted to avoid<br> * Add "Feature Poll", a poll that users can use to vote on for the next feature<br> * Log in to sync and backup workouts   #### Special Thanks Alex Bridgeman - For giving me the idea for this application. Alex also created the splash screen and launch screen!  
Chris-Perkins/Lifting-Buddy
README.md
Markdown
mit
2,757
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>File: benchmarks.rb</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" /> <script type="text/javascript"> // <![CDATA[ function popupCode( url ) { window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400") } function toggleCode( id ) { if ( document.getElementById ) elem = document.getElementById( id ); else if ( document.all ) elem = eval( "document.all." + id ); else return false; elemStyle = elem.style; if ( elemStyle.display != "block" ) { elemStyle.display = "block" } else { elemStyle.display = "none" } return true; } // Make codeblocks hidden by default document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" ) // ]]> </script> </head> <body> <div id="fileHeader"> <h1>benchmarks.rb</h1> <table class="header-table"> <tr class="top-aligned-row"> <td><strong>Path:</strong></td> <td>benchmarks.rb </td> </tr> <tr class="top-aligned-row"> <td><strong>Last Update:</strong></td> <td>Sat Oct 31 01:21:05 +0100 2009</td> </tr> </table> </div> <!-- banner header --> <div id="bodyContent"> <div id="contextContent"> <div id="requires-list"> <h3 class="section-bar">Required files</h3> <div class="name-list"> fileutils&nbsp;&nbsp; benchmark&nbsp;&nbsp; rubygems&nbsp;&nbsp; ruby-prof&nbsp;&nbsp; memcache&nbsp;&nbsp; pp&nbsp;&nbsp; <a href="lib/grit_rb.html">lib/grit</a>&nbsp;&nbsp; </div> </div> </div> <div id="method-list"> <h3 class="section-bar">Methods</h3> <div class="name-list"> <a href="#M000004">in_temp_dir</a>&nbsp;&nbsp; <a href="#M000001">main</a>&nbsp;&nbsp; <a href="#M000003">new_file</a>&nbsp;&nbsp; <a href="#M000002">run_code</a>&nbsp;&nbsp; </div> </div> </div> <!-- if includes --> <div id="section"> <!-- if method_list --> <div id="methods"> <h3 class="section-bar">Public Instance methods</h3> <div id="method-M000004" class="method-detail"> <a name="M000004"></a> <div class="method-heading"> <a href="benchmarks_rb.src/M000004.html" target="Code" class="method-signature" onclick="popupCode('benchmarks_rb.src/M000004.html');return false;"> <span class="method-name">in_temp_dir</span><span class="method-args">(remove_after = true) {|tmp_path| ...}</span> </a> </div> <div class="method-description"> </div> </div> <div id="method-M000001" class="method-detail"> <a name="M000001"></a> <div class="method-heading"> <a href="benchmarks_rb.src/M000001.html" target="Code" class="method-signature" onclick="popupCode('benchmarks_rb.src/M000001.html');return false;"> <span class="method-name">main</span><span class="method-args">()</span> </a> </div> <div class="method-description"> </div> </div> <div id="method-M000003" class="method-detail"> <a name="M000003"></a> <div class="method-heading"> <a href="benchmarks_rb.src/M000003.html" target="Code" class="method-signature" onclick="popupCode('benchmarks_rb.src/M000003.html');return false;"> <span class="method-name">new_file</span><span class="method-args">(name, contents)</span> </a> </div> <div class="method-description"> </div> </div> <div id="method-M000002" class="method-detail"> <a name="M000002"></a> <div class="method-heading"> <a href="benchmarks_rb.src/M000002.html" target="Code" class="method-signature" onclick="popupCode('benchmarks_rb.src/M000002.html');return false;"> <span class="method-name">run_code</span><span class="method-args">(x, name, times = 30) {|i| ...}</span> </a> </div> <div class="method-description"> </div> </div> </div> </div> <div id="validator-badges"> <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p> </div> </body> </html>
guillermo/ginst
vendor/plugins/grit/doc/files/benchmarks_rb.html
HTML
mit
4,795
#pragma once #include "enum_accessqualifier.h" #include "enum_addressingmodel.h" #include "enum_builtin.h" #include "enum_decoration.h" #include "enum_dimensionality.h" #include "enum_executionmode.h" #include "enum_executionmodel.h" #include "enum_executionscope.h" #include "enum_fpfastmathmode.h" #include "enum_fproundingmode.h" #include "enum_functioncontrol.h" #include "enum_functionparameterattribute.h" #include "enum_groupoperation.h" #include "enum_kernelenqueueflags.h" #include "enum_kernelprofilinginfo.h" #include "enum_linkagetype.h" #include "enum_loopcontrol.h" #include "enum_memoryaccess.h" #include "enum_memorymodel.h" #include "enum_memorysemantics.h" #include "enum_opcode.h" #include "enum_sampleraddressingmode.h" #include "enum_samplerfiltermode.h" #include "enum_selectioncontrol.h" #include "enum_sourcelanguage.h" #include "enum_storageclass.h"
LogicalError/spir-v-parser
spir-v/enums.h
C
mit
876
using Microsoft.AspNetCore.Builder; namespace ChromeLogger { public static class ApplicationBuilderExtensions { /// <summary> /// Attaches the chrome logger header setting middleware to the pipeline. /// This method must be called at the start of the startup class Configure method. /// </summary> public static IApplicationBuilder UseChromeLogger(this IApplicationBuilder app) { return app.UseMiddleware<ChromeLoggerMiddleware>(); } } }
ChrisMissal/chromelogger
src/ChromeLogger.AspNetCore/ApplicationBuilderExtensions.cs
C#
mit
538
namespace Skeleton.Web.Logging.Serilog.Formatting { using System; using System.Diagnostics.CodeAnalysis; using global::Serilog.Formatting.Json; [ExcludeFromCodeCoverage] public class RenderedJsonFormatter : JsonFormatter { public RenderedJsonFormatter(string closingDelimiter = null, IFormatProvider formatProvider = null) : base(closingDelimiter, true, formatProvider) { } } }
litichevskiydv/WebInfrastructure
src/Infrastructure/Web.Logging.Serilog/Formatting/RenderedJsonFormatter.cs
C#
mit
445
function output(x) { document.getElementById("output").innerHTML += x + "\n"; } function main () { try { do_tests(); } catch (e) { alert(JSON.stringify(e)); } } var hex_digit_value = { "0": 0, "1": 1, "2": 2, "3": 3, "4": 4, "5": 5, "6": 6, "7": 7, "8": 8, "9": 9, "a": 10, "A": 10, "b": 11, "B": 11, "c": 12, "C": 12, "d": 13, "D": 13, "e": 14, "E": 14, "f": 15, "F": 15 }; function from_hex(s) { if (s.length & 1) throw { message: "from_hex: odd-length input" }; var result = new Uint8Array(s.length / 2); for (var i = 0; i < s.length; i += 2) { var v1 = hex_digit_value[s[i]]; var v2 = hex_digit_value[s[i+1]]; if ((typeof v1 === "undefined")) throw { message: "Illegal hex digit: " + s[i] }; if ((typeof v2 === "undefined")) throw { message: "Illegal hex digit: " + s[i+1] }; result[i >> 1] = (v1 << 4) | v2; } return result; } function do_tests() { output("Starting..."); output(scrypt.to_hex(from_hex("0123456789abcdef"))); output(""); function check(password, salt, n, r, p, expected_hex) { var expected = from_hex(expected_hex); var startTime = new Date().getTime(); var actual = scrypt.crypto_scrypt(scrypt.encode_utf8(password), scrypt.encode_utf8(salt), n, r, p, expected.length); var stopTime = new Date().getTime(); output("Milliseconds for "+password+"/"+salt+"/"+n+"/"+r+"/"+p+": " + (stopTime - startTime)); if (scrypt.to_hex(actual) !== expected_hex) { output("FAILED"); output("expected: " + expected_hex); output("actual: " + scrypt.to_hex(actual)); } } check("", "", 16, 1, 1, "77d6576238657b203b19ca42c18a0497f16b4844e3074ae8dfdffa3fede21442fcd0069ded0948f8326a753a0fc81f17e8d3e0fb2e0d3628cf35e20c38d18906"); check("password", "NaCl", 1024, 8, 16, "fdbabe1c9d3472007856e7190d01e9fe7c6ad7cbc8237830e77376634b3731622eaf30d92e22a3886ff109279d9830dac727afb94a83ee6d8360cbdfa2cc0640"); check("pleaseletmein", "SodiumChloride", 16384, 8, 1, "7023bdcb3afd7348461c06cd81fd38ebfda8fbba904f8e3ea9b543f6545da1f2d5432955613f0fcf62d49705242a9af9e61e85dc0d651e40dfcf017b45575887"); // Disabled: wayyyy too slow. // // check("pleaseletmein", "SodiumChloride", 1048576, 8, 1, "2101cb9b6a511aaeaddbbe09cf70f881ec568d574a2ffd4dabe5ee9820adaa478e56fd8f4ba5d09ffa1c6d927c40f4c337304049e8a952fbcbf45c6fa77a41a4"); output(""); output("...done."); } window.onload = main;
refuge-attic/rtalk
src/deps/js-scrypt/test_scrypt_browser.js
JavaScript
mit
2,442
<!DOCTYPE html> <html xmlns:msxsl="urn:schemas-microsoft-com:xslt"> <head> <meta content="en-us" http-equiv="Content-Language" /> <meta content="text/html; charset=utf-16" http-equiv="Content-Type" /> <title _locid="PortabilityAnalysis0">.NET Portability Report</title> <style> /* Body style, for the entire document */ body { background: #F3F3F4; color: #1E1E1F; font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; padding: 0; margin: 0; } /* Header1 style, used for the main title */ h1 { padding: 10px 0px 10px 10px; font-size: 21pt; background-color: #E2E2E2; border-bottom: 1px #C1C1C2 solid; color: #201F20; margin: 0; font-weight: normal; } /* Header2 style, used for "Overview" and other sections */ h2 { font-size: 18pt; font-weight: normal; padding: 15px 0 5px 0; margin: 0; } /* Header3 style, used for sub-sections, such as project name */ h3 { font-weight: normal; font-size: 15pt; margin: 0; padding: 15px 0 5px 0; background-color: transparent; } h4 { font-weight: normal; font-size: 12pt; margin: 0; padding: 0 0 0 0; background-color: transparent; } /* Color all hyperlinks one color */ a { color: #1382CE; } /* Paragraph text (for longer informational messages) */ p { font-size: 10pt; } /* Table styles */ table { border-spacing: 0 0; border-collapse: collapse; font-size: 10pt; } table th { background: #E7E7E8; text-align: left; text-decoration: none; font-weight: normal; padding: 3px 6px 3px 6px; } table td { vertical-align: top; padding: 3px 6px 5px 5px; margin: 0px; border: 1px solid #E7E7E8; background: #F7F7F8; } .NoBreakingChanges { color: darkgreen; font-weight:bold; } .FewBreakingChanges { color: orange; font-weight:bold; } .ManyBreakingChanges { color: red; font-weight:bold; } .BreakDetails { margin-left: 30px; } .CompatMessage { font-style: italic; font-size: 10pt; } .GoodMessage { color: darkgreen; } /* Local link is a style for hyperlinks that link to file:/// content, there are lots so color them as 'normal' text until the user mouse overs */ .localLink { color: #1E1E1F; background: #EEEEED; text-decoration: none; } .localLink:hover { color: #1382CE; background: #FFFF99; text-decoration: none; } /* Center text, used in the over views cells that contain message level counts */ .textCentered { text-align: center; } /* The message cells in message tables should take up all avaliable space */ .messageCell { width: 100%; } /* Padding around the content after the h1 */ #content { padding: 0px 12px 12px 12px; } /* The overview table expands to width, with a max width of 97% */ #overview table { width: auto; max-width: 75%; } /* The messages tables are always 97% width */ #messages table { width: 97%; } /* All Icons */ .IconSuccessEncoded, .IconInfoEncoded, .IconWarningEncoded, .IconErrorEncoded { min-width: 18px; min-height: 18px; background-repeat: no-repeat; background-position: center; } /* Success icon encoded */ .IconSuccessEncoded { /* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */ /* [---XsltValidateInternal-Base64EncodedImage:IconSuccess#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABPElEQVR4Xp1Tv0vDUBi8FqeA4NpBcBLcWnQSApncOnTo4FSnjP0DsnXpH5CxiwbHDg4Zuj4oOEXiJgiC4FDcCkLWmIMc1Pfw+eMgQ77v3Xf3Pe51YKGqqisAEwCR1TIAsiAIblSo6xrdHeJR85Xle3mdmCQKb0PsfqyxxzM8K15HZADl/H5+sHpZwYfxyRjTs+kWwKBx8yoHd2mRiuzF8mkJniWH/13u3Fjrs/EdhsdDFHGB/DLXEJBDLh1MWPAhPo1BLB4WX5yQywHR+m3tVe/t97D52CB/ziG0nIgD/qDuYg8WuCcVZ2YGwlJ3YDugkpR/VNcAEx6GEKhERSr71FuO4YCM4XBdwKvecjIlkSnsO0Hyp/GxSeJAdzBKzpOtnPwyyiPdAZhpZptT04tU+zk7s8czeges//s5C5+CwqrR4/gw+AAAAABJRU5ErkJggg==); } /* Information icon encoded */ .IconInfoEncoded { /* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */ /* [---XsltValidateInternal-Base64EncodedImage:IconInformation#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABHElEQVR4Xs2TsUoDQRRF7wwoziokjZUKadInhdhukR9YP8DMX1hYW+QvdsXa/QHBbcXC7W0CamWTQnclFutceIQJwwaWNLlwm5k5d94M76mmaeCrrmsLYOocY12FcxZFUeozCqKqqgYA8uevv1H6VuPxcwlfk5N92KHBxfFeCSAxxswlYAW/Xr989x/mv9gkhtyMDhcAxgzRsp7flj8B/HF1RsMXq+NZMkopaHe7lbKxQUEIGbKsYNoGn969060hZBkQex/W8oRQwsQaW2o3Ago2SVcJUzAgY3N0lTCZZm+zPS8HB51gMmS1DEYyOz9acKO1D8JWTlafKIMxdhvlfdyT94Vv5h7P8Ky7nQzACmhvKq3zk3PjW9asz9D/1oigecsioooAAAAASUVORK5CYII=); } /* Warning icon encoded */ .IconWarningEncoded { /* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */ /* [---XsltValidateInternal-Base64EncodedImage:IconWarning#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAx0lEQVR4XpWSMQ7CMAxFf4xAyBMLCxMrO8dhaBcuwdCJS3RJBw7SA/QGTCxdWJgiQYWKXJWKIXHIlyw5lqr34tQgEOdcBsCOx5yZK3hCCKdYXneQkh4pEfqzLfu+wVDSyyzFoJjfz9NB+pAF+eizx2Vruts0k15mPgvS6GYvpVtQhB61IB/dk6AF6fS4Ben0uIX5odtFe8Q/eW1KvFeH4e8khT6+gm5B+t3juyDt7n0jpe+CANTd+oTUjN/U3yVaABnSUjFz/gFq44JaVSCXeQAAAABJRU5ErkJggg==); } /* Error icon encoded */ .IconErrorEncoded { /* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */ /* [---XsltValidateInternal-Base64EncodedImage:IconError#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABQElEQVR4XqWTvUoEQRCE6wYPZUA80AfwAQz23uCMjA7MDRQEIzPBVEyNTQUFIw00vcQTTMzuAh/AxEQQT8HF/3G/oGGnEUGuoNnd6qoZuqltyKEsyzVJq5I6rnUp6SjGeGhESikzzlc1eL7opfuVbrqbU1Zw9NCgtQMaZpY0eNnaaL2fHusvTK5vKu7sjSS1Y4y3QUA6K3e3Mau5UFDyMP7tYF9o8cAHZv68vipoIJg971PZIZ5HiwdvYGGvFVFHmGmZ2MxwmQYPXubPl9Up0tfoMQGetXd6mRbvhBw+boZ6WF7Mbv1+GsHRk0fQmPAH1GfmZirbCfDJ61tw3Px8/8pZsPAG4jlVhcPgZ7adwNWBB68lkRQWFiTgFlbnLY3DGGM7izIJIyT/jjIvEJw6fdJTc6krDzh6aMwMP9bvDH4ADSsa9uSWVJkAAAAASUVORK5CYII=); } </style> </head> <body> <h1 _locid="PortabilityReport">.NET Portability Report</h1> <div id="content"> <div id="submissionId" style="font-size:8pt;"> <p> <i> Submission Id&nbsp; fc47d408-6de2-42c5-8348-f879eb99720b </i> </p> </div> <h2 _locid="SummaryTitle"> <a name="Portability Summary"></a>Portability Summary </h2> <div id="summary"> <table> <tbody> <tr> <th>Assembly</th> <th>ASP.NET 5,Version=v1.0</th> <th>Windows,Version=v8.1</th> <th>.NET Framework,Version=v4.6</th> <th>Windows Phone,Version=v8.1</th> </tr> <tr> <td><strong><a href="#BindableApplicationBar">BindableApplicationBar</a></strong></td> <td class="text-center">53.33 %</td> <td class="text-center">53.33 %</td> <td class="text-center">73.89 %</td> <td class="text-center">53.33 %</td> </tr> </tbody> </table> </div> <div id="details"> <a name="BindableApplicationBar"><h3>BindableApplicationBar</h3></a> <table> <tbody> <tr> <th>Target type</th> <th>ASP.NET 5,Version=v1.0</th> <th>Windows,Version=v8.1</th> <th>.NET Framework,Version=v4.6</th> <th>Windows Phone,Version=v8.1</th> <th>Recommended changes</th> </tr> <tr> <td>Microsoft.Phone.Controls.PhoneApplicationPage</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_ApplicationBar(Microsoft.Phone.Shell.IApplicationBar)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>Microsoft.Phone.Shell.ApplicationBar</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">#ctor</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">add_StateChanged(System.EventHandler{Microsoft.Phone.Shell.ApplicationBarStateChangedEventArgs})</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_BackgroundColor</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Buttons</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_ForegroundColor</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_IsMenuEnabled</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_IsVisible</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_MenuItems</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Mode</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Opacity</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">remove_StateChanged(System.EventHandler{Microsoft.Phone.Shell.ApplicationBarStateChangedEventArgs})</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_BackgroundColor(System.Windows.Media.Color)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_ForegroundColor(System.Windows.Media.Color)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_IsMenuEnabled(System.Boolean)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_IsVisible(System.Boolean)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_Mode(Microsoft.Phone.Shell.ApplicationBarMode)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_Opacity(System.Double)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>Microsoft.Phone.Shell.ApplicationBarIconButton</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">#ctor(System.Uri)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">add_Click(System.EventHandler)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">remove_Click(System.EventHandler)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_IconUri(System.Uri)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_IsEnabled(System.Boolean)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_Text(System.String)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>Microsoft.Phone.Shell.ApplicationBarMenuItem</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">#ctor</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">add_Click(System.EventHandler)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">remove_Click(System.EventHandler)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_IsEnabled(System.Boolean)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_Text(System.String)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>Microsoft.Phone.Shell.ApplicationBarMode</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>Microsoft.Phone.Shell.ApplicationBarStateChangedEventArgs</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_IsMenuVisible</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>Microsoft.Phone.Shell.IApplicationBar</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.Controls.Control</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">#ctor</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_DefaultStyleKey(System.Object)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.Data.Binding</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">#ctor(System.String)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Source</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_RelativeSource(System.Windows.Data.RelativeSource)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_Source(System.Object)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.Data.BindingExpression</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_ParentBinding</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.Data.BindingExpressionBase</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.Data.RelativeSource</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">#ctor(System.Windows.Data.RelativeSourceMode)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.Data.RelativeSourceMode</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.DataTemplate</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">LoadContent</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.DependencyObject</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">GetValue(System.Windows.DependencyProperty)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">SetValue(System.Windows.DependencyProperty,System.Object)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.DependencyObjectCollection`1</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">#ctor</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">Add(`0)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">add_CollectionChanged(System.Collections.Specialized.NotifyCollectionChangedEventHandler)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">Clear</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">Remove(`0)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">remove_CollectionChanged(System.Collections.Specialized.NotifyCollectionChangedEventHandler)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.DependencyProperty</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">Register(System.String,System.Type,System.Type,System.Windows.PropertyMetadata)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">RegisterAttached(System.String,System.Type,System.Type,System.Windows.PropertyMetadata)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.DependencyPropertyChangedEventArgs</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_OldValue</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.FrameworkElement</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">DataContextProperty</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">#ctor</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_DataContext</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">GetBindingExpression(System.Windows.DependencyProperty)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_DataContext(System.Object)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">SetBinding(System.Windows.DependencyProperty,System.Windows.Data.Binding)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.Markup.ContentPropertyAttribute</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">#ctor(System.String)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.Media.Color</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.Media.Colors</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Magenta</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.PropertyChangedCallback</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">#ctor(System.Object,System.IntPtr)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Windows.PropertyMetadata</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">#ctor(System.Object,System.Windows.PropertyChangedCallback)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> </tbody> </table> <p> <a href="#Portability Summary">Back to Summary</a> </p> </div> </div> </body> </html>
kuhlenh/port-to-core
Reports/bi/bindableapplicationbar.1.1.0/BindableApplicationBar-wp8.html
HTML
mit
56,477
(function () { 'use strict'; angular .module('certificates.admin') .controller('CertificatesAdminListController', CertificatesAdminListController); CertificatesAdminListController.$inject = ['CertificateService']; function CertificatesAdminListController(CertificatesService) { var vm = this; vm.certificates = CertificatesService.query(); } }());
juanmauricio/lorodigi
modules/certificates/client/controllers/admin/list-certificates.client.controller.js
JavaScript
mit
381
<!doctype html> <html class="no-js" lang=""> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <title></title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="apple-touch-icon" href="apple-touch-icon.png"> <!-- Place favicon.ico in the root directory --> <link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/main.css"> <link href='https://fonts.googleapis.com/css?family=Lato:400,300,100' rel='stylesheet' type='text/css'> <script src="js/vendor/modernizr-2.8.3.min.js"></script> </head> <body> <!--[if lt IE 8]> <p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p> <![endif]--> <!-- Add your site or application content here --> <div class="full splash"> <div class="logo"> <img src="img/nativ_2.png" style="height:40%;width:40%;"> </div> <h2>Hello and welcome.</h2> <div class="form"> <label>What's your name, friend?</label></br><p style="font-size:.7rem;" class="instruction">(Type your name and hit enter)</p></br> <input type="text" id="input" class="textbox"></input> </div> <div class="wrapper"> <div class="message2"> <p></p> </div> </div> <div class="wrapper"> <div class="message"><p></p></div> </div> <button id="btn-splash">Continue.</button> </div> <div class="full content c1"> <div class="header"> <a href="index.html"><img src="img/nativ_2.png" style="height:20%;width:20%;"></a> <h1>How do you say "Hello" in Portuguese?</h1> </div> <div class="question left"> <h3 class="correct">Olá</h3> </div> <div class="question right"> <h3 class="incorrect">Tudo bem</h3> </div> </div> <div class="full content c2"> <div class="header"> <a href="index.html"><img src="img/nativ_2.png" style="height:20%;width:20%;"></a> <h1>How do you say "Goodbye" in Portuguese?</h1> </div> <div class="question left"> <h3 class="incorrect">Adios</h3> </div> <div class="question right"> <h3 class="correct">Tchau</h3> </div> </div> <div class="full content c3"> <div class="header"> <a href="index.html"><img src="img/nativ_2.png" style="height:20%;width:20%;"></a> <h1>How do you say "How are you?" in Portuguese?</h1> </div> <div class="question left"> <h3 class="correct">Tudo bem?</h3> </div> <div class="question right"> <h3 class="incorrect">Qual é?</h3> </div> </div> <div class="full content results"> <div class="logo"> <a href="index.html"><img src="img/nativ_2.png" style="height:40%;width:40%;"></a> </div> <h3>These are your results.</h3> <div class="quiz_results"> <div class="score"> <h1><span></span></h1> </div> </div> <button class="again">Go Again.</button> <div class="duolingo"> <h3>Check out this site to learn some more.</h3> <a href="https://www.duolingo.com/" target="blank"><img src="img/duolingo.png" style="height:20%;width:20%;color:#fff;"></a> </div> </div> <button id="reset" class="reset">Reset.</button> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script>window.jQuery || document.write('<script src="js/vendor/jquery-1.11.3.min.js"><\/script>')</script> <script src="js/plugins.js"></script> <script src="js/main.js"></script> <!-- Google Analytics: change UA-XXXXX-X to be your site's ID. --> <script> (function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]= function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date; e=o.createElement(i);r=o.getElementsByTagName(i)[0]; e.src='https://www.google-analytics.com/analytics.js'; r.parentNode.insertBefore(e,r)}(window,document,'script','ga')); ga('create','UA-XXXXX-X','auto');ga('send','pageview'); </script> </body> </html>
thurstontl/nativ
index.html
HTML
mit
4,784
<div class="commune_descr limited"> <p> Saint-Martin-du-Tertre est une commune localisée dans le département de Val-d'Oise en Île-de-France. Elle comptait 2&nbsp;395 habitants en 2008.</p> <p>À coté de Saint-Martin-du-Tertre sont situées les villes de <a href="{{VLROOT}}/immobilier/maffliers_95353/">Maffliers</a> à 4&nbsp;km, 1&nbsp;614 habitants, <a href="{{VLROOT}}/immobilier/belloy-en-france_95056/">Belloy-en-France</a> localisée à 2&nbsp;km, 1&nbsp;784 habitants, <a href="{{VLROOT}}/immobilier/montsoult_95430/">Montsoult</a> située à 4&nbsp;km, 3&nbsp;492 habitants, <a href="{{VLROOT}}/immobilier/asnieres-sur-oise_95026/">Asnières-sur-Oise</a> à 2&nbsp;km, 2&nbsp;495 habitants, <a href="{{VLROOT}}/immobilier/presles_95504/">Presles</a> située à 4&nbsp;km, 3&nbsp;815 habitants, <a href="{{VLROOT}}/immobilier/nointel_95452/">Nointel</a> à 4&nbsp;km, 718 habitants, entre autres. De plus, Saint-Martin-du-Tertre est située à seulement 28&nbsp;km de <a href="{{VLROOT}}/immobilier/paris_75056/">Paris</a>.</p> <p>À Saint-Martin-du-Tertre, la valeur moyenne à la vente d'un appartement se situe à 7&nbsp;586 &euro; du m² en vente. la valorisation moyenne d'une maison à l'achat se situe à 2&nbsp;832 &euro; du m². À la location la valeur moyenne se situe à 16,15 &euro; du m² par mois.</p> <p>La commune compte de nombreux équipements sportifs, elle propose entre autres un terrain de tennis, un centre d'équitation, un terrain de sport et une boucle de randonnée.</p> <p>Le nombre de logements, à Saint-Martin-du-Tertre, était réparti en 2011 en 251 appartements et 759 maisons soit un marché plutôt équilibré.</p> <p>À Saint-Martin-du-Tertre le salaire moyen par mois par habitant se situe à environ 2&nbsp;349 &euro; net. C'est supérieur à la moyenne du pays.</p> </div>
donaldinou/frontend
src/Viteloge/CoreBundle/Resources/descriptions/95566.html
HTML
mit
1,839