code
stringlengths 3
1.05M
| repo_name
stringlengths 4
116
| path
stringlengths 3
942
| language
stringclasses 30
values | license
stringclasses 15
values | size
int32 3
1.05M
|
---|---|---|---|---|---|
---
layout: page
title: White Valley Inc. Show
date: 2016-05-24
author: Matthew Meyer
tags: weekly links, java
status: published
summary: Phasellus posuere malesuada fermentum. In finibus est id quam interdum.
banner: images/banner/wedding.jpg
booking:
startDate: 01/19/2019
endDate: 01/24/2019
ctyhocn: AMSAAHX
groupCode: WVIS
published: true
---
Quisque dignissim leo ac tortor faucibus, at aliquet nibh fringilla. Sed sit amet malesuada leo, sed volutpat mauris. Mauris orci magna, posuere nec sapien quis, fringilla tempor eros. Pellentesque feugiat faucibus vulputate. Aenean metus erat, commodo nec diam vitae, iaculis blandit nunc. Etiam sagittis ipsum at mi condimentum efficitur. Nulla mi augue, efficitur non velit ac, eleifend laoreet nisi. Suspendisse turpis erat, pulvinar a mi ut, luctus sagittis lorem. Interdum et malesuada fames ac ante ipsum primis in faucibus. Aenean pretium pellentesque dignissim. Donec euismod accumsan finibus. Quisque sagittis dapibus sagittis.
1 Etiam mattis tellus et arcu fermentum, sed ultricies lectus congue
1 Duis sit amet metus aliquam, elementum justo eu, ornare lacus
1 Cras lacinia diam quis lacus eleifend, nec eleifend ligula dapibus
1 Donec non tortor quis nulla lacinia porta sit amet at urna
1 Vivamus ultrices orci et pharetra dictum.
Aenean dapibus congue turpis. Etiam lorem augue, maximus vitae nisl sed, euismod eleifend nibh. Curabitur lobortis maximus elit. Fusce euismod facilisis leo. Maecenas blandit vehicula ultrices. Duis vel tincidunt nulla, eu ultrices nunc. Phasellus vel aliquet est, ac iaculis ex. Sed in scelerisque lectus. Vivamus quis tortor nunc. Maecenas dapibus nisi a massa luctus, vitae dignissim turpis posuere. Praesent tempus aliquet turpis at placerat. Nullam a diam ultrices, aliquam nulla in, maximus nisi. Sed ullamcorper rutrum turpis id imperdiet. Fusce fringilla posuere leo at sodales. Nulla sed metus finibus, laoreet tellus quis, bibendum felis. Maecenas ut ornare nulla.
| KlishGroup/prose-pogs | pogs/A/AMSAAHX/WVIS/index.md | Markdown | mit | 1,978 |
//
// DailyTableViewController.h
// StoreSales
//
// Created by sonson on 09/03/04.
// Copyright 2009 __MyCompanyName__. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "UIViewController+TabBarItem.h"
#import "SNTableViewController.h"
#import "SNButtonBar.h"
@interface DailyTableViewController : SNTableViewController {
NSMutableArray *cells;
UIImageView *backgroundImageView;
SNButtonBar *buttonbar;
}
@property (nonatomic, retain) NSMutableArray *cells;
@property (nonatomic, retain) UIImageView *backgroundImageView;
@property (nonatomic, retain) SNButtonBar *buttonbar;
- (void)updateTitle;
- (NSString*)titleForLineChart;
- (NSString*)subtitleForLineChart;
- (void)toggleButtonbar:(BOOL)forwarding;
@end
| sonsongithub/StoreSales | OSX/Classes/TableViewController/DailyTableViewController.h | C | mit | 738 |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="HandheldFriendly" content="True" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>我们正在遭受网络攻击</title>
<meta name="description" content="" />
<link href="//fonts.googleapis.com/css?family=Noto+Sans:300,400,700" rel="stylesheet" type="text/css">
<link href="//fonts.googleapis.com/css?family=Noto+Serif:400,700,400italic" rel="stylesheet" type="text/css">
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<link href="//hanwencheng.github.io/Undepth/themes/Saga/assets/css/style.css?v=1.0.0" rel="stylesheet" type="text/css">
<link href="//hanwencheng.github.io/Undepth/themes/Saga/assets/css/animate.min.css?v=1.0.0" rel="stylesheet" type="text/css">
<link href="//hanwencheng.github.io/Undepth/themes/Saga/favicon.ico" rel="shortcut icon">
<link rel="canonical" href="https://hanwencheng.github.io/Undepth/2015/03/19/greatFireAttack.html" />
<meta property="og:site_name" content="非深度学习" />
<meta property="og:type" content="article" />
<meta property="og:title" content="我们正在遭受网络攻击" />
<meta property="og:description" content="GreatFire.org是一个监测长城防火墙状态的网站,通过这个网站可以查询网站是否收到防火墙的影响,到底哪些网站被封锁,被封锁了多少,或者是正在接受测试检查等等。 比如谷歌google.com在中国是96%被封锁,德国之声dw.de是100%被封锁。 今天GreatFire.org发布了一篇题为“我们正在遭受攻击”公告, 里面说他们正在遭受第一次网络DDoS攻击(分布式拒绝服务攻击),DDoS和普通黑客通过网站漏洞攻击不同,是一种非常简单粗暴的网络攻击手段,就是在短时间内制造非常多的访问请求来冲垮服务器。GreatFire.org 今天就享受到了每小时26亿次访问请求。 GreatFire.org声称他们从17号就开始收到攻击了,今天是最惨的一天,而且所有的镜像网站都无一幸免。不过也难怪,当时他们正在讨论使网站解禁的方法,这种方法还被华尔街日报详细的报道过,而且上个星期巴黎的一个NGO组织还曾经用这种方法使9个网站在全世界范围内解禁。这种动作肯定是会被很多人关注的。 不过对GreatFire.org最惨的事情是: 因为GreatFire.org托管在了amazon web services(亚马逊云服务平台)..." />
<meta property="og:url" content="https://hanwencheng.github.io/Undepth/2015/03/19/greatFireAttack.html" />
<meta property="og:image" content="https://en.greatfire.org/sites/all/themes/src/ln2/images/greatfire-logo-small.png" />
<meta property="article:published_time" content="2015-03-18T23:00:00.000Z" />
<meta property="article:modified_time" content="2015-03-19T21:32:51.625Z" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="我们正在遭受网络攻击" />
<meta name="twitter:description" content="GreatFire.org是一个监测长城防火墙状态的网站,通过这个网站可以查询网站是否收到防火墙的影响,到底哪些网站被封锁,被封锁了多少,或者是正在接受测试检查等等。 比如谷歌google.com在中国是96%被封锁,德国之声dw.de是100%被封锁。 今天GreatFire.org发布了一篇题为“我们正在遭受攻击”公告, 里面说他们正在遭受第一次网络DDoS攻击(分布式拒绝服务攻击),DDoS和普通黑客通过网站漏洞攻击不同,是一种非常简单粗暴的网络攻击手段,就是在短时间内制造非常多的访问请求来冲垮服务器。GreatFire.org 今天就享受到了每小时26亿次访问请求。 GreatFire.org声称他们从17号就开始收到攻击了,今天是最惨的一天,而且所有的镜像网站都无一幸免。不过也难怪,当时他们正在讨论使网站解禁的方法,这种方法还被华尔街日报详细的报道过,而且上个星期巴黎的一个NGO组织还曾经用这种方法使9个网站在全世界范围内解禁。这种动作肯定是会被很多人关注的。 不过对GreatFire.org最惨的事情是: 因为GreatFire.org托管在了amazon web services(亚马逊云服务平台)..." />
<meta name="twitter:url" content="https://hanwencheng.github.io/Undepth/2015/03/19/greatFireAttack.html" />
<meta name="twitter:image:src" content="https://en.greatfire.org/sites/all/themes/src/ln2/images/greatfire-logo-small.png" />
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Article",
"publisher": "非深度学习",
"author": {
"@type": "Person",
"name": "Hanwen Cheng",
"image": "https://avatars.githubusercontent.com/u/6014309?v=3",
"url": "undefined/author/undefined",
"sameAs": "http://www.hanwencheng.com"
},
"headline": "我们正在遭受网络攻击",
"url": "https://hanwencheng.github.io/Undepth/2015/03/19/greatFireAttack.html",
"datePublished": "2015-03-18T23:00:00.000Z",
"dateModified": "2015-03-19T21:32:51.625Z",
"image": "https://en.greatfire.org/sites/all/themes/src/ln2/images/greatfire-logo-small.png",
"description": "GreatFire.org是一个监测长城防火墙状态的网站,通过这个网站可以查询网站是否收到防火墙的影响,到底哪些网站被封锁,被封锁了多少,或者是正在接受测试检查等等。 比如谷歌google.com在中国是96%被封锁,德国之声dw.de是100%被封锁。 今天GreatFire.org发布了一篇题为“我们正在遭受攻击”公告, 里面说他们正在遭受第一次网络DDoS攻击(分布式拒绝服务攻击),DDoS和普通黑客通过网站漏洞攻击不同,是一种非常简单粗暴的网络攻击手段,就是在短时间内制造非常多的访问请求来冲垮服务器。GreatFire.org 今天就享受到了每小时26亿次访问请求。 GreatFire.org声称他们从17号就开始收到攻击了,今天是最惨的一天,而且所有的镜像网站都无一幸免。不过也难怪,当时他们正在讨论使网站解禁的方法,这种方法还被华尔街日报详细的报道过,而且上个星期巴黎的一个NGO组织还曾经用这种方法使9个网站在全世界范围内解禁。这种动作肯定是会被很多人关注的。 不过对GreatFire.org最惨的事情是: 因为GreatFire.org托管在了amazon web services(亚马逊云服务平台)..."
}
</script>
<meta name="generator" content="Ghost ?" />
<link rel="alternate" type="application/rss+xml" title="非深度学习" href="https://hanwencheng.github.io/Undepth/rss" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/default.min.css">
</head>
<body class="post-template">
<header id="header" class="animated fadeIn" style="background-image: url(https://en.greatfire.org/sites/all/themes/src/ln2/images/greatfire-logo-small.png)">
<div class="header-background">
<section class="blog-content">
<a id="site-url" class="blog-title" href="https://hanwencheng.github.io/Undepth">非深度学习</a>
<span class="blog-description">每天与公众号同步更新分享内容。</span>
<nav class="links fadeIn animated">
<ul>
<!-- <li class="rss"><a title="RSS Feed" href="/rss/"><i class="fa fa-fw fa-rss-square"></i></a></li> -->
</ul>
</nav>
</section>
<section class="header-content">
<h1 class="post-title animated fadeInUp">我们正在遭受网络攻击</h1>
<span class="post-data"><span class="date animated fadeInUp"><i class="fa fa-clock-o"></i> <time class="timesince date" data-timesince="1426719600" datetime="2015-03-19T00:00" title="19 March 2015">2015-03-19 00:00:00<ago class="ago"></time></span>
<span class="author animated fadeInUp"><i class="fa fa-user"></i> <a href="">Hanwen Cheng</a></span></span>
</section>
</div>
</header>
<main id="main" class="content">
<article itemtype="http://schema.org/BlogPosting" class="animated fadeIn content post post">
<section class="post-content">
<div class="paragraph">
<p>GreatFire.org是一个监测长城防火墙状态的网站,通过这个网站可以查询网站是否收到防火墙的影响,到底哪些网站被封锁,被封锁了多少,或者是正在接受测试检查等等。</p>
</div>
<div class="paragraph">
<p>比如谷歌google.com在中国是96%被封锁,德国之声dw.de是100%被封锁。</p>
</div>
<div class="paragraph">
<p>今天GreatFire.org发布了一篇题为“我们正在遭受攻击”公告,
里面说他们正在遭受第一次网络DDoS攻击(分布式拒绝服务攻击),DDoS和普通黑客通过网站漏洞攻击不同,是一种非常简单粗暴的网络攻击手段,就是在短时间内制造非常多的访问请求来冲垮服务器。GreatFire.org 今天就享受到了每小时26亿次访问请求。</p>
</div>
<div class="paragraph">
<p>GreatFire.org声称他们从17号就开始收到攻击了,今天是最惨的一天,而且所有的镜像网站都无一幸免。不过也难怪,当时他们正在讨论使网站解禁的方法,这种方法还被华尔街日报详细的报道过,而且上个星期巴黎的一个NGO组织还曾经用这种方法使9个网站在全世界范围内解禁。这种动作肯定是会被很多人关注的。</p>
</div>
<div class="paragraph">
<p>不过对GreatFire.org最惨的事情是:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>因为GreatFire.org托管在了amazon web services(亚马逊云服务平台)上,DDoS攻击成功的展示了亚马逊的业务能力,他们hold住了所有网络请求,服务器没有轻易的被冲垮,同时带来的结果是每天30000美元的费用。</pre>
</div>
</div>
<div class="paragraph">
<p>今天GreatFire.org非常委屈的在博客里希望amazon能够免除他们的费用,而且还动员读者去在amazon的tweet上留言告诉他们这个事,因为可能如果amazon向他们收这笔钱的话,他们可能马上就要黄了。。。</p>
</div>
</section>
</article>
</main>
<footer class="animated fadeIn" id="footer">
<section class="colophon">
<section class="copyright">Copyright © <span itemprop="copyrightHolder">非深度学习</span>. <span rel="license">All Rights Reserved</span>.</section>
<section class="poweredby">Published By <a class="icon-ghost" href="https://github.com/hanwencheng">Hanwen</a></section>
</section>
<section class="bottom">
<section class="attribution">
<a href="http://github.com/Reedyn/Saga">Built with <i class="fa fa-heart"></i> and Free and Open-Source Software</a>.
</section>
</section>
</footer>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js?v="></script> <script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment-with-locales.min.js?v="></script> <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js?v="></script>
<script type="text/javascript">
jQuery( document ).ready(function() {
// change date with ago
jQuery('ago.ago').each(function(){
var element = jQuery(this).parent();
element.html( moment(element.text()).fromNow());
});
});
hljs.initHighlightingOnLoad();
</script>
<script src="//hanwencheng.github.io/Undepth/themes/Saga/assets/js/scripts.js?v=1.0.0"></script>
</body>
</html>
| hanwencheng/Undepth | 2015/03/19/greatFireAttack.html | HTML | mit | 11,946 |
<!DOCTYPE html>
<html lang="ca-es" data-theme="">
<head>
<meta charset="utf-8">
<meta name="HandheldFriendly" content="True">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="referrer" content="no-referrer-when-downgrade">
<title>retalls - La vista cansada</title>
<meta name="description" content="">
<link rel="alternate" type="application/rss+xml" href="https://carlesbellver.github.io/tags/retalls/index.xml" title="La vista cansada" />
<link rel="icon" type="image/x-icon" href="https://carlesbellver.github.io/favicon.ico">
<link rel="apple-touch-icon-precomposed" href="https://carlesbellver.github.io/favicon.png">
<link rel="stylesheet" href="https://carlesbellver.github.io/css/light.css?rnd=1602439751" />
<style>
[data-theme="dark"] {
--font-color: #eee;
--bg-color: #212121;
--link-color:#599ada;
--link-state-color:#ff5858;
--link-state-border-color: rgba(238, 54, 54, 0.5);
--thead-bg-color: #343a40;
--table-border-color: lightgrey;
--pre-color: #333;
--pre-bg-color: #f1f1f1;
--bq-color: #ccc;
--hr-color: #333;
--pagination-bg-color: #373737;
--pagination-link-color: #b6b6b6;
--post-info-color: grey;
--switcher-color: #333;
--switcher-bg-color: #fff;
}
</style>
<link rel="stylesheet" href="https://carlesbellver.github.io/css/style.css?rnd=1602439751" />
<meta property="og:title" content="retalls" />
<meta property="og:description" content="" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://carlesbellver.github.io/tags/retalls/" />
<meta property="og:updated_time" content="2020-10-01T16:20:42+00:00" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="retalls"/>
<meta name="twitter:description" content=""/>
</head>
<body>
<a class="skip-main" href="#main">Anar al contingut principal</a>
<div class="container">
<header class="common-header">
<h1 class="site-title">
<a href="/">La vista cansada</a>
</h1>
<nav>
<a class="" href="https://carlesbellver.github.io/about/" title="">Informació</a>
<a class="" href="https://carlesbellver.github.io/tags/" title="">Etiquetes</a>
</nav>
</header>
<main id="main" tabindex="-1">
<h1>Etiqueta: retalls</h1>
<div class="post-info">
<a href="https://carlesbellver.github.io/tags">Totes les etiquetes</a>
</div>
<article class="post-list">
<div class="content post-summary">
<p>📎 <a href="https://singularityhub.com/2017/12/01/here-are-4-things-we-can-do-to-combat-climate-change-now/">Here Are 4 Significant Things We Can Do to Combat Climate Change Now</a></p>
<blockquote>
<ol>
<li>Aprovar lleis que incentiven la reducció de carboni.</li>
<li>Adoptar massivament l’energia solar i la tecnologia de bateries.</li>
<li>Adaptar-nos al canvi climàtic individualment i com a societat.</li>
<li>Invertir en projectes d’enginyeria a escala geogràfica.</li>
</ol>
</blockquote>
</div>
<div class="post-info">
<a class="u-url" href="/2017/12/02/here-are-significant.html"><div class="post-date dt-published">2017-12-02</div></a>
<div class="post-taxonomies">
<ul class="post-tags">
<li><a href="https://carlesbellver.github.io/tags/retalls">#retalls</a></li>
</ul>
</div>
</div>
</article>
<article class="post-list">
<div class="content post-summary">
<p>📎 <a href="https://boingboing.net/2017/11/27/piracy-is-always-a-smokescreen.html">One of the net's most important freedom canaries died the day the W3C greenlit web-wide DRM</a></p>
<blockquote>People who want DRM say that they're just trying to protect their copyrights, but it's obvious to anyone who knows even a little about computer science that DRM is effectively useless for this purpose. But DRM laws allow companies to shut down (and even jail) anyone who breaks DRM for any reason […]</blockquote>
</div>
<div class="post-info">
<a class="u-url" href="/2017/11/30/one-of-the.html"><div class="post-date dt-published">2017-11-30</div></a>
<div class="post-taxonomies">
<ul class="post-tags">
<li><a href="https://carlesbellver.github.io/tags/retalls">#retalls</a></li>
</ul>
</div>
</div>
</article>
<article class="post-list">
<div class="content post-summary">
<p>📎 <a href="http://www.20minutos.es/noticia/3198679/0/burgos-mensaje-siglo-xviii-oculto-nalgas-talla-cristo/">Hallan en Burgos un mensaje del siglo XVIII oculto en las nalgas de una talla de un Cristo</a></p>
<blockquote>La Corte está en Madrid. Hay Correo y Gaceta para las noticias. Hay Inquisición, por lo cual no se experimentan errores contra la iglesia de Dios. Se contratan en funciones grandes toreros famosos de Salamanca.</blockquote>
</div>
<div class="post-info">
<a class="u-url" href="/2017/11/29/hallan-en-burgos.html"><div class="post-date dt-published">2017-11-29</div></a>
<div class="post-taxonomies">
<ul class="post-tags">
<li><a href="https://carlesbellver.github.io/tags/retalls">#retalls</a></li>
</ul>
</div>
</div>
</article>
<article class="post-list">
<div class="content post-summary">
<p>📎 <a href="http://www.amusingplanet.com/2017/11/modern-potemkin-villages.html">Modern Potemkin Villages</a></p>
<p>Ciutats falses arreu del món.</p>
</div>
<div class="post-info">
<a class="u-url" href="/2017/11/28/modern-potemkin-villages.html"><div class="post-date dt-published">2017-11-28</div></a>
<div class="post-taxonomies">
<ul class="post-tags">
<li><a href="https://carlesbellver.github.io/tags/retalls">#retalls</a></li>
</ul>
</div>
</div>
</article>
<article class="post-list">
<div class="content post-summary">
<p>📎 <a href="http://www.galiciae.com/articulo/sociedad/34-prostibulos-donde-todos-hombres-son-hermanos34/20171125192214018975.html">En los prostíbulos es donde los hombres son hermanos y gozan de su masculinidad</a></p>
<p>Gitar-se amb quinze homes en una nit no és un treball. La vulnerabilitat invalida el consentiment.</p>
</div>
<div class="post-info">
<a class="u-url" href="/2017/11/27/en-los-prostbulos.html"><div class="post-date dt-published">2017-11-27</div></a>
<div class="post-taxonomies">
<ul class="post-tags">
<li><a href="https://carlesbellver.github.io/tags/retalls">#retalls</a></li>
</ul>
</div>
</div>
</article>
<article class="post-list">
<div class="content post-summary">
<p>📎 <a href="http://www.eldiario.es/cultura/libros/mercado-estrella-polar-orienta-todas_0_711130015.html">Nuccio Ordine: "El mercado es la estrella polar que orienta todas las leyes"</a></p>
<p>La universitat en perill i el naufragi d'Europa.</p>
</div>
<div class="post-info">
<a class="u-url" href="/2017/11/24/nuccio-ordine-el.html"><div class="post-date dt-published">2017-11-24</div></a>
<div class="post-taxonomies">
<ul class="post-tags">
<li><a href="https://carlesbellver.github.io/tags/retalls">#retalls</a></li>
</ul>
</div>
</div>
</article>
<article class="post-list">
<div class="content post-summary">
<p>📎 <a href="http://www.bbc.com/news/health-42050438">Choice of alcoholic drink 'determines different moods'</a></p>
<p>A partir d'una enquesta en línia anònima:</p>
<ul>
<li>El vi negre pareixia ensopir la gent més que el vi blanc.</li>
<li>Era més probable que els enquestats se sentissin relaxats en beure vi negre o cervesa.</li>
<li>Més del 40% deien que les begudes d'alta graduació els feien sentir <i>sexy</i>.</li>
<li>Més de la meitat deien que les begudes d'alta graduació també els proporcionaven energia i confiança.</li>
<li>Però al voltant d’un terç van dir que se senten agressius quan prenen begudes d'alta graduació.</li>
<li>Les begudes d'alta graduació s'associaven més que les altres a sentiments d’agressió, malaltia, inquietud i planys.</li>
<li>Els homes eren significativament més propensos que les dones a associar sentiments d’agressió a tot tipus d’alcohol, particularment els bevedors empedreïts.</li> </ul>
</div>
<div class="post-info">
<a class="u-url" href="/2017/11/23/choice-of-alcoholic.html"><div class="post-date dt-published">2017-11-23</div></a>
<div class="post-taxonomies">
<ul class="post-tags">
<li><a href="https://carlesbellver.github.io/tags/retalls">#retalls</a></li>
</ul>
</div>
</div>
</article>
<article class="post-list">
<div class="content post-summary">
<p>📎 <a href="https://arstechnica.com/tech-policy/2017/11/an-alarming-number-of-sites-employ-privacy-invading-session-replay-scripts/">No, you’re not being paranoid. Sites really are watching your every move</a></p>
<p>Els servidors web registren quines tecles premem i els moviments del ratolí abans que fem clic a “Enviar”.</p>
</div>
<div class="post-info">
<a class="u-url" href="/2017/11/22/no-youre-not.html"><div class="post-date dt-published">2017-11-22</div></a>
<div class="post-taxonomies">
<ul class="post-tags">
<li><a href="https://carlesbellver.github.io/tags/retalls">#retalls</a></li>
</ul>
</div>
</div>
</article>
<article class="post-list">
<div class="content post-summary">
<p>📎 <a href="http://m.eldiario.es/politica/bots-rusos-cyborgs-mercenarios_0_708680008.html">No son bots rusos, es Capitalismo 3.0 reventando el debate político online</a></p>
<p>Bots, perfils falsos, ciborgs i granges de trolls.</p>
</div>
<div class="post-info">
<a class="u-url" href="/2017/11/21/no-son-bots.html"><div class="post-date dt-published">2017-11-21</div></a>
<div class="post-taxonomies">
<ul class="post-tags">
<li><a href="https://carlesbellver.github.io/tags/retalls">#retalls</a></li>
</ul>
</div>
</div>
</article>
<article class="post-list">
<div class="content post-summary">
<p>📎 <a href="http://www.lavanguardia.com/politica/20171119/432882529035/supremo-audiencia-nacional-carles-puigdemont-mariano-rajoy-auto-de-fe-contrarreforma-jorge-dioni-lopez.html">Renuncia a Lucifer (O cómo la Contrarreforma dirige la política española)</a></p>
<blockquote>La Contrarreforma es a España lo que la Ilustración es a Francia, la revolución industrial al Reino Unido, el romanticismo a Alemania o el liberalismo a Estados Unidos. </blockquote>
</div>
<div class="post-info">
<a class="u-url" href="/2017/11/20/renuncia-a-lucifer.html"><div class="post-date dt-published">2017-11-20</div></a>
<div class="post-taxonomies">
<ul class="post-tags">
<li><a href="https://carlesbellver.github.io/tags/retalls">#retalls</a></li>
</ul>
</div>
</div>
</article>
<div class="pagination">
<div class="left pagination-item ">
<a href="/tags/retalls/page/55/">articles posteriors</a>
</div>
<div class="right pagination-item ">
<a href="/tags/retalls/page/57/">articles anteriors</a>
</div>
</div>
</main>
<footer class="common-footer">
<div class="common-footer-bottom">
<div class="copyright">
<p>Carles Bellver Torlà </p>
</div>
<button class="theme-switcher">
Tema fosc
</button>
<script>
const STORAGE_KEY = 'user-color-scheme'
const defaultTheme = "light"
let currentTheme
let switchButton
let autoDefinedScheme = window.matchMedia('(prefers-color-scheme: dark)')
const autoChangeScheme = e => {
currentTheme = e.matches ? 'dark' : 'light'
document.documentElement.setAttribute('data-theme', currentTheme)
changeButtonText()
}
document.addEventListener('DOMContentLoaded', function() {
switchButton = document.querySelector('.theme-switcher')
currentTheme = detectCurrentScheme()
if (currentTheme == 'dark') {
document.documentElement.setAttribute('data-theme', 'dark')
}
if (currentTheme == 'auto') {
autoChangeScheme(autoDefinedScheme);
autoDefinedScheme.addListener(autoChangeScheme);
}
changeButtonText()
switchButton.addEventListener('click', switchTheme, false)
})
function detectCurrentScheme() {
if (localStorage.getItem(STORAGE_KEY)) {
return localStorage.getItem(STORAGE_KEY)
}
if (defaultTheme) {
return defaultTheme
}
if (!window.matchMedia) {
return 'light'
}
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
return 'dark'
}
return 'light'
}
function changeButtonText()
{
switchButton.textContent = currentTheme == 'dark' ? "Tema clar" : "Tema fosc"
}
function switchTheme(e) {
if (currentTheme == 'dark') {
localStorage.setItem(STORAGE_KEY, 'light')
document.documentElement.setAttribute('data-theme', 'light')
currentTheme = 'light'
} else {
localStorage.setItem(STORAGE_KEY, 'dark')
document.documentElement.setAttribute('data-theme', 'dark')
currentTheme = 'dark'
}
changeButtonText()
}
</script>
</div>
</footer>
</div>
</body>
</html>
| carlesbellver/carlesbellver.github.io | tags/retalls/page/56/index.html | HTML | mit | 15,543 |
'''
Facebook field cleaning and parsing function
'''
import datetime
import re
from django.db.models import CharField, DateTimeField, ForeignKey, TextField, BigIntegerField
from apps.fbschema.struct_models import *
from apps.fbschema.models import *
def parse_fbarray(fbarray):
'''
Parse facebook array
'''
return fbarray.__str__()
def parse_fbdate(fbdate):
'''
Parse Facebook Date
'''
#Check if unixtimestamp
#pattern = re.compile('^[0-9]*$')
#print type(fbdate)
if(type(fbdate) is int):
return datetime.datetime.fromtimestamp(int(fbdate))
else:
format = '%B %d, %Y'
try:
return datetime.datetime.strptime(fbdate, format)
except ValueError:
safe_fbdate = "%s, 1970" % fbdate
# TODO: What would happen to year in database
# TODO: RuntimeWarning: DateTimeField received a naive datetime (1900-12-29 00:00:00) while time zone support is active.
return datetime.datetime.strptime(safe_fbdate, format)
def parse_clean_field_value(field, value, request=None):
'''
Main function to process fields received from fql queries
Their processing is based on what data type they are going to be here in system
Furthermore we need some extra introspection to tackle facebook's array and structs data type
'''
if( (isinstance(field, CharField) or isinstance(field, TextField)) and (type(value) is not str and type(value) is not unicode)):
# Converting facebook array into strings is solving problem as of now
value = parse_fbarray(value)
elif(isinstance(field, DateTimeField) and value):
value = parse_fbdate(value)
elif(isinstance(field, ForeignKey )):
'''
# What's going on here -
print type(field.rel.to)
print field.rel.to.__class__.__name__
print field.rel.to.__name__
print type(field.rel.to)
print isinstance(field.rel.to, StructAgeRange)
'''
if(field.rel.to.__name__ == "StructAgeRange") and value:
#table: user
value = StructAgeRange.objects.get_or_create( min= value['min'] )[0] # max has to be done with exception handling
elif(field.rel.to.__name__ == "FacebookUser"):
#For viewer field
#TODO: user=request.user AND uid=value => uid=value ONLY ( Also see model class: FacebookLike notes )
value = FacebookUser.objects.get( user=request.user, uid=value )
'''
Field which are already supplied as parameters while saving response data in views,
and are not in data_dict 'must' be in ignore_fields of model class
Because then they should be at once place if supplied as parameteres then not in data_dict and vice_versa
'''
elif(field.rel.to.__name__ == "FacebookAlbum"):
value = FacebookAlbum.objects.get( user=request.user, aid=value )
elif(field.rel.to.__name__ == "StructCommentInfo") and value:
#table: album
value = StructCommentInfo.objects.get_or_create( can_comment=value.get('can_comment', None), \
comment_count=value.get('comment_count', None) or value.get('count', None) )[0]
'''
value = StructCommentInfo.objects.get_or_create( can_comment=value.get('can_comment', None), \
comment_count=value.get('comment_count', None) or value.get('count', None), \
comment_order=value.get('comment_order', None), \
comment_list=value.get('comment_list', None))[0]
#TODO: In next pass uncomment this line ^
'''
elif(field.rel.to.__name__ == "StructLikeInfo") and value:
#table: album
value = StructLikeInfo.objects.get_or_create( can_like=value.get('can_like', None), \
like_count=value.get('like_count', None) or value.get('count', None), \
user_likes=value.get('user_likes', None) )[0]
elif(isinstance(field, BigIntegerField) and not value):
value = None
elif(isinstance(field, BigIntegerField) and value):
return int(value)
return value
| pkuhad/dashfb | apps/fbschema/parse_utils.py | Python | mit | 4,311 |
using System;
using System.Reflection;
namespace Fridger.WebApi.Areas.HelpPage.ModelDescriptions
{
public interface IModelDocumentationProvider
{
string GetDocumentation(MemberInfo member);
string GetDocumentation(Type type);
}
} | pepinho24/Fridger | Fridger/Fridger.WebApi/Areas/HelpPage/ModelDescriptions/IModelDocumentationProvider.cs | C# | mit | 259 |
#pragma once
#include <rex/config.hpp>
#ifdef REX_BUNDLE_THERO
#include <rex/thero/any.hpp>
#else
#include <thero/any.hpp>
#endif
| therocode/rexource | include/rex/thero.hpp | C++ | mit | 130 |
[](https://waffle.io/antradford/hivemind2016)
# README FILE FOR HIVEMIND2016 REPOSITORY
This repository is to be used for ALL development projects that come under the banner
of Hivemind Collective, Inc; developed over the course of 2016
| antradford/hivemind2016 | README.md | Markdown | mit | 334 |
// This file is just added for convenience so this repository can be
// directly checked out into a project's deps folder
module.exports = require('./lib/nike');
| desmondmorris/node-nike | index.js | JavaScript | mit | 162 |
using System.IO;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
namespace Dapper.Net.Extensions {
public static class StringExtensions {
public static string Squeeze(this string input) => Regex.Replace(input, @"\s+", " ");
public static string TrimSqueeze(this string input) => input.Trim().Squeeze();
public static string ReadFileContents(this string path) {
using (var sr = File.OpenText(path)) {
return sr.ReadToEnd().SanitizeSql();
}
}
public static async Task<string> ReadFileContentsAsync(this string path) {
using (var sr = File.OpenText(path)) {
return (await sr.ReadToEndAsync()).SanitizeSql();
}
}
public static string SanitizeSql(this string input) => input.Replace("\r\n", ";").Replace('\r', ';').Replace('\n', ';').Replace("\t", " ");
}
} | cchamberlain/dapper-net | Extensions/StringExtensions.cs | C# | mit | 928 |
<?php
// Generated by ZF2's ./bin/classmap_generator.php
return array(
'ZdBase\Module' => __DIR__ . '/Module.php',
'ZdBase\Form\AbstractForm' => __DIR__ . '/src/ZdBase/Form/AbstractForm.php',
'ZdBase\Form\Fieldset\AbstractFieldset' => __DIR__ . '/src/ZdBase/Form/Fieldset/AbstractFieldset.php',
'ZdBase\Module\AbstractModule' => __DIR__ . '/src/ZdBase/Module/AbstractModule.php',
'ZdBase\Repository\AbstractRepository' => __DIR__ . '/src/ZdBase/Repository/AbstractRepository.php',
'ZdBase\Validator\Doctrine\NoObjectExists' => __DIR__ . '/src/ZdBase/Validator/Doctrine/NoObjectExists.php',
'ZdBase\Validator\Doctrine\ObjectExists' => __DIR__ . '/src/ZdBase/Validator/Doctrine/ObjectExists.php',
'ZdBase\View\Helper\AbstractHelper' => __DIR__ . '/src/ZdBase/View/Helper/AbstractHelper.php',
);
| Dreick/ZdBase | autoload_classmap.php | PHP | mit | 880 |
class Itinerary
class Tool
def self.inherited(subclass)
@@tools ||= []
@@tools << subclass
end
def self.tools
@@tools
end
def self.find_tool(cmd)
tool_class = @@tools.find { |t| t.name == cmd }
end
def initialize(itinerary, args)
@itinerary = itinerary
parse(args) if respond_to?(:parse)
end
end
end | jslabovitz/itinerary | lib/itinerary/tool.rb | Ruby | mit | 376 |
class AddDefaultToPublishedPage < ActiveRecord::Migration
def self.up
change_column_default :sevenpages_pages, :published, false
end
def self.down
change_column_default :sevenpages_pages, :published, nil
end
end
| sevenview/sevenpages | db/migrate/20130123165331_add_default_to_published_page.rb | Ruby | mit | 229 |
<?php
/*
* This file is part of the Ekino PHP metric project.
*
* (c) Ekino - Thomas Rabaix <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Ekino\Metric\Type;
/**
* A gauge is an instantaneous measurement of a value
*/
class Gauge implements GaugeInterface
{
protected $name;
protected $value;
/**
* @param string $name
* @param float $value
*/
public function __construct($name, $value)
{
$this->name = $name;
$this->value = (float) $value;
}
/**
* {@inheritdoc}
*/
public function getValue()
{
return $this->value;
}
/**
* {@inheritdoc}
*/
public function getName()
{
return $this->name;
}
} | ekino/php-metric | lib/Ekino/Metric/Type/Gauge.php | PHP | mit | 850 |
//Import WinRT into Node.JS
var uwp = require("uwp");
uwp.projectNamespace("Windows");
var GYRO = 0x68; // gyro I2C address
var REG_GYRO_X = 0x1D; // IMU-3000 Register address for GYRO_XOUT_H
var ACCEL = 0x53; // Accel I2c Address
var ADXL345_POWER_CTL = 0x2D;
var accI2CDevice;
var gyroI2CDevice;
var isInitialized;
function init(callback) {
if (isInitialized) {
return;
}
isInitialized = true;
var accSettings = new Windows.Devices.I2c.I2cConnectionSettings(ACCEL);
accSettings.BusSpeed = 0; // Fast mode
var gyroSettings = new Windows.Devices.I2c.I2cConnectionSettings(GYRO);
gyroSettings.BusSpeed = 0; // Fast mode
//Find the device: same code in other project, except in JS instead of C#
var aqs = Windows.Devices.I2c.I2cDevice.getDeviceSelector("I2C1");
Windows.Devices.Enumeration.DeviceInformation.findAllAsync(aqs, null).done(function (dis) {
Windows.Devices.I2c.I2cDevice.fromIdAsync(dis[0].id, accSettings).done(function (device) {
accI2CDevice = device;
if (gyroI2CDevice) {
initImu3000(callback);
}
});
Windows.Devices.I2c.I2cDevice.fromIdAsync(dis[0].id, gyroSettings).done(function (device) {
gyroI2CDevice = device;
if (accI2CDevice) {
initImu3000(callback);
}
});
});
}
function initImu3000(callback) {
// Set Gyro settings
// Sample Rate 1kHz, Filter Bandwidth 42Hz, Gyro Range 500 d/s
writeTo(gyroI2CDevice, 0x16, 0x0B);
//set accel register data address
writeTo(gyroI2CDevice, 0x18, 0x32);
// set accel i2c slave address
writeTo(gyroI2CDevice, 0x14, ACCEL);
// Set passthrough mode to Accel so we can turn it on
writeTo(gyroI2CDevice, 0x3D, 0x08);
// set accel power control to 'measure'
writeTo(accI2CDevice, ADXL345_POWER_CTL, 8);
//cancel pass through to accel, gyro will now read accel for us
writeTo(gyroI2CDevice, 0x3D, 0x28);
if (callback) {
callback();
}
}
function writeTo(i2cDevice, regAddress, regValue) {
var tempData = new Array(2);
tempData[0] = regAddress;
tempData[1] = regValue;
i2cDevice.write(tempData);
}
function readAccGyro() {
// First set the register start address for X on Gyro
var addressBuf = new Array(1);
addressBuf[0] = REG_GYRO_X; //Register Address GYRO_XOUT_H
// Read 12 data bytes
var buffer = new Array(12);
gyroI2CDevice.writeRead(addressBuf, buffer);
//Combine bytes into integers
// Gyro format is MSB first
gyro_x = toInteger(buffer[0], buffer[1]);
gyro_y = toInteger(buffer[2], buffer[3]);
gyro_z = toInteger(buffer[4], buffer[5]);
// Accel is LSB first. Also because of orientation of chips
// accel y output is in same orientation as gyro x
// and accel x is gyro -y
accel_y = toInteger(buffer[7], buffer[6]);
accel_x = toInteger(buffer[9], buffer[8]);
accel_z = toInteger(buffer[11], buffer[10]);
// map axes
return {
acc: {
x: accel_x,
y: accel_y,
z: accel_z
},
gyro: {
dx: gyro_x,
dy: gyro_y,
dz: gyro_z
}
}
}
function toInteger(msb, lsb)
{
var result = msb << 8 | lsb;
if (result > 32767) {
result = result ^ 0xFFFF;
result = result + 1;
result = -result;
}
return result;
}
function readSensors() {
if (!(accI2CDevice && gyroI2CDevice)) {
return;
}
if (!isInitialized) {
init();
return;
}
var accData = readAccGyro();
return accData;
}
function readSensorString() {
if (!(accI2CDevice && gyroI2CDevice)) {
return;
}
if (!isInitialized) {
init();
return;
}
var accData = readAccGyro();
return "X:" + accData.acc.x + " Y:" + accData.acc.y + " Z:" + accData.acc.z + " dX:" + accData.gyro.dx + " dY:" + accData.gyro.dy + " dZ:" + accData.gyro.dz;
}
exports.init = init;
exports.readSensors = readSensors;
exports.readSensorString = readSensorString;
| cazacov/InternetOfThings | WinIotJs/WebServer/js_server/Imu3000.js | JavaScript | mit | 4,233 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>aac-tactics: 40 s 🏆</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / released</a></li>
<li class="active"><a href="">8.13.1 / aac-tactics - 8.13.1</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
aac-tactics
<small>
8.13.1
<span class="label label-success">40 s 🏆</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2022-01-13 08:04:05 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-01-13 08:04:05 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-threads base
base-unix base
conf-findutils 1 Virtual package relying on findutils
conf-gmp 3 Virtual package relying on a GMP lib system installation
coq 8.13.1 Formal proof management system
num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.10.2 The OCaml compiler (virtual package)
ocaml-base-compiler 4.10.2 Official release 4.10.2
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.1 A library manager for OCaml
zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers
# opam file:
opam-version: "2.0"
maintainer: "[email protected]"
homepage: "https://github.com/coq-community/aac-tactics"
dev-repo: "git+https://github.com/coq-community/aac-tactics.git"
bug-reports: "https://github.com/coq-community/aac-tactics/issues"
license: "LGPL-3.0-or-later"
synopsis: "Coq plugin providing tactics for rewriting universally quantified equations, modulo associative (and possibly commutative) operators"
description: """
This Coq plugin provides tactics for rewriting universally quantified
equations, modulo associativity and commutativity of some operator.
The tactics can be applied for custom operators by registering the
operators and their properties as type class instances. Many common
operator instances, such as for Z binary arithmetic and booleans, are
provided with the plugin."""
build: [make "-j%{jobs}%"]
install: [make "install"]
depends: [
"ocaml" {>= "4.05.0"}
"coq" {>= "8.13" & < "8.14~"}
]
tags: [
"category:Miscellaneous/Coq Extensions"
"category:Computer Science/Decision Procedures and Certified Algorithms/Decision procedures"
"keyword:reflexive tactic"
"keyword:rewriting"
"keyword:rewriting modulo associativity and commutativity"
"keyword:rewriting modulo ac"
"keyword:decision procedure"
"logpath:AAC_tactics"
"date:2021-10-01"
]
authors: [
"Thomas Braibant"
"Damien Pous"
"Fabian Kunze"
]
url {
src: "https://github.com/coq-community/aac-tactics/archive/v8.13.1.tar.gz"
checksum: "sha512=29875c62374674d20d4d14ed1f28797a3fc15589f908436500059ed10770b7f18ad0ac662243bfecad86ddff1558cbe9c628705a561d2ec5d45972251c21b216"
}
</pre>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Dry install 🏜️</h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --show-action coq-aac-tactics.8.13.1 coq.8.13.1</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam list; echo; ulimit -Sv 4000000; timeout 4h opam install -y --deps-only coq-aac-tactics.8.13.1 coq.8.13.1</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>13 s</dd>
</dl>
<h2>Install 🚀</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam list; echo; ulimit -Sv 16000000; timeout 4h opam install -y -v coq-aac-tactics.8.13.1 coq.8.13.1</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>40 s</dd>
</dl>
<h2>Installation size</h2>
<p>Total: 1 M</p>
<ul>
<li>443 K <code>../ocaml-base-compiler.4.10.2/lib/coq/user-contrib/AAC_tactics/aac_plugin.cmxs</code></li>
<li>209 K <code>../ocaml-base-compiler.4.10.2/lib/coq/user-contrib/AAC_tactics/AAC.vo</code></li>
<li>112 K <code>../ocaml-base-compiler.4.10.2/lib/coq/user-contrib/AAC_tactics/AAC.glob</code></li>
<li>75 K <code>../ocaml-base-compiler.4.10.2/lib/coq/user-contrib/AAC_tactics/Instances.vo</code></li>
<li>66 K <code>../ocaml-base-compiler.4.10.2/lib/coq/user-contrib/AAC_tactics/Tutorial.vo</code></li>
<li>58 K <code>../ocaml-base-compiler.4.10.2/lib/coq/user-contrib/AAC_tactics/Utils.vo</code></li>
<li>42 K <code>../ocaml-base-compiler.4.10.2/lib/coq/user-contrib/AAC_tactics/Tutorial.glob</code></li>
<li>38 K <code>../ocaml-base-compiler.4.10.2/lib/coq/user-contrib/AAC_tactics/Caveats.vo</code></li>
<li>32 K <code>../ocaml-base-compiler.4.10.2/lib/coq/user-contrib/AAC_tactics/AAC.v</code></li>
<li>32 K <code>../ocaml-base-compiler.4.10.2/lib/coq/user-contrib/AAC_tactics/Instances.glob</code></li>
<li>30 K <code>../ocaml-base-compiler.4.10.2/lib/coq/user-contrib/AAC_tactics/Utils.glob</code></li>
<li>27 K <code>../ocaml-base-compiler.4.10.2/lib/coq/user-contrib/AAC_tactics/aac_plugin.cmi</code></li>
<li>26 K <code>../ocaml-base-compiler.4.10.2/lib/coq/user-contrib/AAC_tactics/Caveats.glob</code></li>
<li>25 K <code>../ocaml-base-compiler.4.10.2/lib/coq/user-contrib/AAC_tactics/aac_plugin.cmx</code></li>
<li>12 K <code>../ocaml-base-compiler.4.10.2/lib/coq/user-contrib/AAC_tactics/Caveats.v</code></li>
<li>12 K <code>../ocaml-base-compiler.4.10.2/lib/coq/user-contrib/AAC_tactics/Tutorial.v</code></li>
<li>11 K <code>../ocaml-base-compiler.4.10.2/lib/coq/user-contrib/AAC_tactics/Instances.v</code></li>
<li>8 K <code>../ocaml-base-compiler.4.10.2/lib/coq/user-contrib/AAC_tactics/Utils.v</code></li>
<li>7 K <code>../ocaml-base-compiler.4.10.2/lib/coq/user-contrib/AAC_tactics/aac_plugin.cmxa</code></li>
<li>3 K <code>../ocaml-base-compiler.4.10.2/lib/coq/user-contrib/AAC_tactics/Constants.vo</code></li>
<li>1 K <code>../ocaml-base-compiler.4.10.2/lib/coq/user-contrib/AAC_tactics/Constants.v</code></li>
<li>1 K <code>../ocaml-base-compiler.4.10.2/lib/coq/user-contrib/AAC_tactics/Constants.glob</code></li>
</ul>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq-aac-tactics.8.13.1</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
| coq-bench/coq-bench.github.io | clean/Linux-x86_64-4.10.2-2.0.6/released/8.13.1/aac-tactics/8.13.1.html | HTML | mit | 10,065 |
/*
* Generated by PWGenPrj
* Generated at __PWTEMPLATE_DATE__
*/
/*!
* \file myinstance.h
* \brief Instance.
*/
#ifndef MYINSTANCE_H
#define MYINSTANCE_H
class MyInstance : public pw::InstanceInterface
{
public:
//----------------------------------------------------------------------
// Enums...
//! \brief Timer enums.
enum TIMER
{
ONE_MIN,
FIVE_MIN,
TEN_MIN,
ONE_HOUR,
ONE_DAY,
};
public:
//! \brief Instance!
inline static MyInstance& s_getInstance(void) { static MyInstance inst(g_name); return inst; }
public:
MyInstance(const char* appname);
virtual ~MyInstance();
public:
//----------------------------------------------------------------------
// Custom variables...
// \todo Delete demo code...
string m_test_string;
int m_test_integer;
pw::ssl::context_type m_tls_server; //!< TLS context for server mode.
public:
//----------------------------------------------------------------------
// Custom methods...
pw::SslContext* getListenSslContext(const string& name) const override
{
return ( name == TAG_ADMIN_SSL ? m_tls_server.ctx : nullptr );
}
private:
//----------------------------------------------------------------------
// Event handlers
void eventTimer(int id, void* param) override;
bool eventConfig(bool isDefault, bool isReload) override;
bool eventInitLog(void) override;
bool eventInitChannel(void) override;
bool eventInitListenerSingle(void) override;
bool eventInitListenerParent(void) override;
bool eventInitListenerChild(void) override;
//bool eventInitListener(void) override;
bool eventInitTimer(void) override;
//bool eventInitExtras(void) override;
//bool eventInitChild(void) override;
//void eventExit(void) override;
//void eventExitChild(size_t index, pid_t pid, int exit_status, void* param) override;
//void eventEndTurn(void) override;
//----------------------------------------------------------------------
// Clean-up event handlers
//
//void eventForkChild(size_t index, void* param) override;
void eventForkCleanUpChannel(size_t index, void* param) override;
//void eventForkCleanUpListener(size_t index, void* param) override;
//void eventForkCleanUpTimer(size_t index, void* param) override;
//void eventForkCleanUpExtras(size_t index, void* param) override;
//void eventForkCleanUpPoller(size_t index, void* param) override;
};
//! \brief Poller macro
#define POLLER (INST.getPoller())
//! \brief Instance
extern MyInstance& INST;
//! \brief Job manager
extern pw::JobManager& JOBMAN;
//! \brief Configuration
extern pw::Ini& CONF;
//! \brief Command log
extern pw::Log& CMDLOG;
//! \brief Error log
extern pw::Log& ERRLOG;
#endif // MYINSTANCE_H
| skplanet/libpw | src/utils/genprj/data/daemon/src/myinstance.h | C | mit | 2,691 |
using DertInfo.WEB.Models.Base;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
namespace DertInfo.WEB.Models
{
public class EventJudge : DertObjectBase_Trackable
{
//Primary Key
[Key]
public int Id { get; set; }
//Properties
public int EventId { get; set; }
public int JudgeId { get; set; }
//Objects
public virtual Event Event { get; set; }
public virtual Judge Judge { get; set; }
//Status
/*public string AccessToken { get; set; }*/
//public DateTime DateCreated { get; set; }
//public DateTime DateModified { get; set; }
//public string CreatedBy { get; set; }
//public string ModifiedBy { get; set; }
//public bool IsDeleted { get; set; }
}
} | dertinfo-david/dertinfo-web | Models/EventJudge.cs | C# | mit | 877 |
## Live Stream Bot
Live Stream Bot is a bot that fetches the streams for Smash Bros. games to display in the
sidebar and in the wiki of [/r/smashbros](http://reddit.com/r/smashbros). It is currently live
under [/u/superstreambot](http://reddit.com/u/superstreambot).
The bot is essentially configurable (to a certain extent), you can check near the bottom on how to configure it.
## Configuration
The bot expects a `config.json` file to be in the current directory with the current values:
Key | Value Type | Description
:----|:-----------|:-----------
username | string | The reddit username
password | string | The reddit password
user_agent | string | The bot's user agent
delay | integer | Length between updates in seconds.
subreddits | list of objects | A list of objects that gives information of what subreddits to update
client | string | The app client ID (for OAuth2)
secret | string | The app's client secret (for OAuth2)
twitch_client_id | string | The Client ID used for Twitch API requests.
Likewise, the subreddits object requires these keys:
Key | Value Type | Description
:----|:----------|:------------
name | string | The subreddit name
widget | object | The sidebar widget settings to update (new reddit)
top_cut | integer | How many streams to display in the sidebar at most
wiki | string | The wiki page name to update.
format | dictionary | A key value pair of games to format for the sidebar
The widget object requires these keys:
Key | Value Type | Description
:----|:----------|:------------
name | string | The widget name to update (case sensitive)
table | boolean | Whether to use a simple table to update the text with
If the widget doesn't use the simple table then it falls back to the format list.
An example `config.json` is given below.
```js
{
"username": "myusername",
"password": "mypassword",
"delay": 1800,
"user_agent": "Livestream updater -- written by /u/rapptz",
"subreddits": [
{
"format": {
"Project M": "[^^^^**ProjectM** **{name}**{viewers}]({url})",
"Super Smash Bros.": "[^**Smash64** **{name}**{viewers}]({url})",
"Super Smash Bros. Brawl": "[^^^**Brawl** **{name}**{viewers}]({url})",
"Super Smash Bros. Melee": "[^^**Melee** **{name}**{viewers}]({url})",
"Super Smash Bros. for Nintendo 3DS": "[^^^^^**Smash3DS** **{name}**{viewers}]({url})",
"Super Smash Bros. for Wii U": "[^^^^^^**SmashWiiU** **{name}**{viewers}]({url})"
},
"name": "smashbros",
"top_cut": 10,
"wiki": "livestreams",
"widget": {
"name": "Live Streams",
"table": true
}
}
]
}
```
Currently only twitch is supported.
The bot also writes to this configuration file with minimum and maximum records which should not be touched.
## Running and Dependencies
### Easy Way
If you want your subreddit to use the bot without running your own instance, just send a private message to /u/rapptz and
he'll tell you what to do from there.
### Manual Way
There are a couple dependencies.
- [praw](https://github.com/praw-dev/praw), which is used for the reddit API integration.
- [aiohttp](https://github.com/aio-libs/aiohttp) which is used for the HTTP requests.
Note that this bot requires Python 3.7 or higher.
Installing the dependencies should be as easy as doing:
pip install praw && pip install aiohttp
On the command line.
Once you have those dependencies set up and the configuration above is valid, you can run the bot yourself by doing `python bot.py`. There's
a tutorial to help you set it up for your own subreddit in [the wiki][tut].
If the configuration is invalid, then the bot will tell you so.
[tut]: https://github.com/HypestTeam/livestreambot/wiki/Using-On-Your-Own-Subreddit
## License
The code is MIT licensed. You can check the license in the LICENSE file.
| HypestTeam/livestreambot | README.md | Markdown | mit | 3,976 |
<?php
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
new Symfony\Bundle\MonologBundle\MonologBundle(),
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new webStudent\EtudiantBundle\webStudentEtudiantBundle(),
new webStudent\StageBundle\webStudentStageBundle(),
new webStudent\EntrepriseBundle\webStudentEntrepriseBundle(),
);
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
$bundles[] = new Acme\DemoBundle\AcmeDemoBundle();
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
}
return $bundles;
}
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
}
}
| kevinelain/symfonyCommun | app/AppKernel.php | PHP | mit | 1,556 |
/*
Copyright (c) 2019 Xavier Leclercq
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.
*/
/// @file
#ifndef _WX_CHARTS_WXCHARTSTHEMEID_H_
#define _WX_CHARTS_WXCHARTSTHEMEID_H_
#include <wx/string.h>
/// Identifier for a theme.
/// \ingroup themeclasses
class wxChartsThemeId
{
public:
wxChartsThemeId();
wxChartsThemeId(const wxString& id);
bool operator==(const wxChartsThemeId& other) const;
bool operator!=(const wxChartsThemeId& other) const;
bool operator<(const wxChartsThemeId& other) const;
bool operator>(const wxChartsThemeId& other) const;
private:
wxString m_id;
};
#endif
| wxIshiko/wxCharts | include/wx/charts/wxchartsthemeid.h | C | mit | 1,660 |
package sorting;
import java.util.Arrays;
public class Helpers {
private Helpers(){}
public static void printArray(int[] array) {
Arrays.stream(array).forEach(item -> System.out.print(item + " "));
}
}
| raul1991/DesignPatterns | algorithms/src/main/java/sorting/Helpers.java | Java | mit | 226 |
package com.episode6.hackit.typed.bundles;
import android.annotation.TargetApi;
import android.os.Build;
import android.os.Bundle;
import javax.annotation.Nullable;
import java.lang.reflect.Type;
/**
* Holds our static {@link BundleTranslator}s that are each applicable to a
* single explicit Type (i.e. subclasses don't apply and we can do a quick
* type == check). These translators are not referenced directly in builder
* methods, but instead pulled via {@link #getDirectTranslator(Type)}.
*/
public class DirectBundleTranslators {
static @Nullable BundleTranslator getDirectTranslator(Type keyType) {
if (keyType == Boolean.class) {
return BOOL;
} else if (keyType == Integer.class) {
return INT;
} else if (keyType == String.class) {
return STRING;
} else if (keyType == Float.class) {
return FLOAT;
} else if (keyType == Long.class) {
return LONG;
} else if (keyType == Double.class) {
return DOUBLE;
} else if (keyType == Short.class) {
return SHORT;
} else if (keyType == Character.class) {
return CHAR;
} else if (keyType == Byte.class) {
return BYTE;
} else if (keyType == Bundle.class) {
return BUNDLE;
} else if (keyType == CharSequence.class) {
return CHAR_SEQUENCE;
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
if (keyType == android.util.Size.class) {
return SIZE;
} else if (keyType == android.util.SizeF.class) {
return SIZEF;
}
}
return null;
}
private static final BundleTranslator BOOL = new BundleTranslator() {
@Override
public Object getFromBundle(Bundle b, String keyName) {
return b.getBoolean(keyName);
}
@Override
public void writeToBundle(Bundle b, String keyName, Object instance) {
b.putBoolean(keyName, (Boolean) instance);
}
};
private static final BundleTranslator INT = new BundleTranslator() {
@Override
public Object getFromBundle(Bundle b, String keyName) {
return b.getInt(keyName);
}
@Override
public void writeToBundle(Bundle b, String keyName, Object instance) {
b.putInt(keyName, (Integer) instance);
}
};
private static final BundleTranslator STRING = new BundleTranslator() {
@Override
public Object getFromBundle(Bundle b, String keyName) {
return b.getString(keyName);
}
@Override
public void writeToBundle(Bundle b, String keyName, Object instance) {
b.putString(keyName, (String) instance);
}
};
private static final BundleTranslator FLOAT = new BundleTranslator() {
@Override
public Object getFromBundle(Bundle b, String keyName) {
return b.getFloat(keyName);
}
@Override
public void writeToBundle(Bundle b, String keyName, Object instance) {
b.putFloat(keyName, (Float) instance);
}
};
private static final BundleTranslator LONG = new BundleTranslator() {
@Override
public Object getFromBundle(Bundle b, String keyName) {
return b.getLong(keyName);
}
@Override
public void writeToBundle(Bundle b, String keyName, Object instance) {
b.putLong(keyName, (Long) instance);
}
};
private static final BundleTranslator DOUBLE = new BundleTranslator() {
@Override
public Object getFromBundle(Bundle b, String keyName) {
return b.getDouble(keyName);
}
@Override
public void writeToBundle(Bundle b, String keyName, Object instance) {
b.putDouble(keyName, (Double) instance);
}
};
private static final BundleTranslator SHORT = new BundleTranslator() {
@Override
public Object getFromBundle(Bundle b, String keyName) {
return b.getShort(keyName);
}
@Override
public void writeToBundle(Bundle b, String keyName, Object instance) {
b.putShort(keyName, (Short) instance);
}
};
private static final BundleTranslator CHAR = new BundleTranslator() {
@Override
public Object getFromBundle(Bundle b, String keyName) {
return b.getChar(keyName);
}
@Override
public void writeToBundle(Bundle b, String keyName, Object instance) {
b.putChar(keyName, (Character) instance);
}
};
private static final BundleTranslator BYTE = new BundleTranslator() {
@Override
public Object getFromBundle(Bundle b, String keyName) {
return b.getByte(keyName);
}
@Override
public void writeToBundle(Bundle b, String keyName, Object instance) {
b.putByte(keyName, (Byte) instance);
}
};
private static final BundleTranslator BUNDLE = new BundleTranslator() {
@Override
public Object getFromBundle(Bundle b, String keyName) {
return b.getBundle(keyName);
}
@Override
public void writeToBundle(Bundle b, String keyName, Object instance) {
b.putBundle(keyName, (Bundle) instance);
}
};
private static final BundleTranslator CHAR_SEQUENCE = new BundleTranslator() {
@Override
public Object getFromBundle(Bundle b, String keyName) {
return b.getCharSequence(keyName);
}
@Override
public void writeToBundle(Bundle b, String keyName, Object instance) {
b.putCharSequence(keyName, (CharSequence) instance);
}
};
private static final BundleTranslator SIZE = new BundleTranslator() {
@Override @TargetApi(Build.VERSION_CODES.LOLLIPOP)
public Object getFromBundle(Bundle b, String keyName) {
return b.getSize(keyName);
}
@Override @TargetApi(Build.VERSION_CODES.LOLLIPOP)
public void writeToBundle(Bundle b, String keyName, Object instance) {
b.putSize(keyName, (android.util.Size) instance);
}
};
private static final BundleTranslator SIZEF = new BundleTranslator() {
@Override @TargetApi(Build.VERSION_CODES.LOLLIPOP)
public Object getFromBundle(Bundle b, String keyName) {
return b.getSizeF(keyName);
}
@Override @TargetApi(Build.VERSION_CODES.LOLLIPOP)
public void writeToBundle(Bundle b, String keyName, Object instance) {
b.putSizeF(keyName, (android.util.SizeF) instance);
}
};
}
| episode6/typed | typed-bundles/src/main/java/com/episode6/hackit/typed/bundles/DirectBundleTranslators.java | Java | mit | 6,121 |
<?php
namespace Represent\Util;
use Represent\Annotations as Represent;
/**
* @Represent\ExclusionPolicy(policy="whiteList")
* @Represent\LinkCollection(links={
* @Represent\Link(
* name="self",
* uri="expr('object.getRoute()')",
* parameters="expr('object.getParameters()')"
* ),
* @Represent\Link(
* name="first",
* uri="expr('object.getRoute()')",
* parameters="expr('object.getParameters(1)')"
* ),
* @Represent\Link(
* name="last",
* uri="expr('object.getRoute()')",
* parameters="expr('object.getParameters(object.getPages())')"
* ),
* @Represent\Link(
* name="next",
* uri="expr('object.getRoute()')",
* parameters="expr('object.getParameters(object.getPages() + 1)')"
* ),
* @Represent\Link(
* name="previous",
* uri="expr('object.getRoute()')",
* parameters="expr('object.getParameters(object.getPages() - 1)')"
* )
* })
*/
class PaginatedCollection
{
/**
* @Represent\Embedded
*/
private $items;
/**
* @var int
*/
private $pages;
/**
* @var int
*/
private $total;
/**
* @var int
*/
private $limit;
/**
* @var int
*/
private $page;
/**
* @Represent\Hide
*/
private $route;
/**
* @var array
*/
private $params;
/**
* @Represent\Hide
*/
private $pageParam;
/**
* @Represent\Hide
*/
private $limitParam;
/**
* @param $items
* @param $page
* @param $pages
* @param $total
* @param $route
* @param array $params
* @param int $limit
* @param string $pageParam
* @param string $limitParam
*/
public function __construct($items, $page, $pages, $total, $route, $params = array(), $limit = 10, $pageParam = 'page', $limitParam = 'limit')
{
$this->items = $items;
$this->page = $page;
$this->pages = $pages;
$this->total = $total;
$this->route = $route;
$this->params = $params;
$this->limit = $limit;
$this->pageParam = $pageParam;
$this->limitParam = $limitParam;
}
/**
* Handles parsing through parameters array
*
* @param null $page
* @param null $limit
* @return array
*/
public function getParameters($page = null, $limit = null)
{
$params = $this->params;
$params[$this->pageParam] = null == $page ? $this->getPage() : $page;
$params[$this->limitParam] = null == $limit ? $this->getLimit() : $limit;
return $params;
}
/**
* @param mixed $items
*/
public function setItems($items)
{
$this->items = $items;
}
/**
* @return mixed
*/
public function getItems()
{
return $this->items;
}
/**
* @param int $limit
*/
public function setLimit($limit)
{
$this->limit = $limit;
}
/**
* @return int
*/
public function getLimit()
{
return $this->limit;
}
/**
* @param mixed $limitParam
*/
public function setLimitParam($limitParam)
{
$this->limitParam = $limitParam;
}
/**
* @return mixed
*/
public function getLimitParam()
{
return $this->limitParam;
}
/**
* @param mixed $pageParam
*/
public function setPageParam($pageParam)
{
$this->pageParam = $pageParam;
}
/**
* @return mixed
*/
public function getPageParam()
{
return $this->pageParam;
}
/**
* @param mixed $pages
*/
public function setPages($pages)
{
$this->pages = $pages;
}
/**
* @return mixed
*/
public function getPages()
{
return $this->pages;
}
/**
* @param mixed $route
*/
public function setRoute($route)
{
$this->route = $route;
}
/**
* @return mixed
*/
public function getRoute()
{
return $this->route;
}
/**
* @param mixed $total
*/
public function setTotal($total)
{
$this->total = $total;
}
/**
* @return mixed
*/
public function getTotal()
{
return $this->total;
}
/**
* @param mixed $page
*/
public function setPage($page)
{
$this->page = $page;
}
/**
* @return mixed
*/
public function getPage()
{
return $this->page;
}
}
| MarcusFulbright/represent | src/Represent/Util/PaginatedCollection.php | PHP | mit | 4,704 |
<?php return unserialize('a:2:{i:0;O:30:"Doctrine\\ORM\\Mapping\\ManyToOne":4:{s:12:"targetEntity";s:44:"covoiturage\\covoiturageBundle\\Entity\\annonce";s:7:"cascade";N;s:5:"fetch";s:4:"LAZY";s:10:"inversedBy";s:12:"reservations";}i:1;O:31:"Doctrine\\ORM\\Mapping\\JoinColumn":7:{s:4:"name";N;s:20:"referencedColumnName";s:2:"id";s:6:"unique";b:0;s:8:"nullable";b:1;s:8:"onDelete";N;s:16:"columnDefinition";N;s:9:"fieldName";N;}}'); | legacy-hunter/ucovoiturage | app/cache/dev/annotations/c3cb5598b70dc60bed884f468929f490e26842db$annonce.cache.php | PHP | mit | 433 |
/**
* This file is part of the Java Machine Learning Library
*
* The Java Machine Learning Library 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.
*
* The Java Machine Learning Library 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 the Java Machine Learning Library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* Copyright (c) 2006-2012, Thomas Abeel
*
* Project: http://java-ml.sourceforge.net/
*
*/
package tutorials.classification;
import java.io.File;
import net.sf.javaml.classification.Classifier;
import net.sf.javaml.classification.KDtreeKNN;
import net.sf.javaml.core.Dataset;
import net.sf.javaml.core.Instance;
import net.sf.javaml.tools.data.FileHandler;
/**
* This tutorial show how to use a the k-nearest neighbors classifier.
*
* @author Thomas Abeel
*
*/
public class TutorialKDtreeKNN {
/**
* Shows the default usage of the KNN algorithm.
*/
public static void main(String[] args) throws Exception {
/* Load a data set */
Dataset data = FileHandler.loadDataset(new File("devtools/data/iris.data"), 4, ",");
/*
* Contruct a KNN classifier that uses 5 neighbors to make a decision.
*/
Classifier knn = new KDtreeKNN(5);
knn.buildClassifier(data);
/*
* Load a data set, this can be a different one, but we will use the
* same one.
*/
Dataset dataForClassification = FileHandler.loadDataset(new File("devtools/data/iris.data"), 4, ",");
/* Counters for correct and wrong predictions. */
int correct = 0, wrong = 0;
/* Classify all instances and check with the correct class values */
for (Instance inst : dataForClassification) {
Object predictedClassValue = knn.classify(inst);
Object realClassValue = inst.classValue();
if (predictedClassValue.equals(realClassValue))
correct++;
else
wrong++;
}
System.out.println("Correct predictions " + correct);
System.out.println("Wrong predictions " + wrong);
}
}
| diyerland/saveAll | algorithm/java-ml/javaml-0.1.7/javaml-0.1.7-src/tutorials/classification/TutorialKDtreeKNN.java | Java | mit | 2,636 |
<?php
namespace CABDesigns\PHPUnit\Listener;
/**
* A PHPUnit TestListener that searches the call stack given parameters, and
* outputs the results to the console.
*/
class TraceTestListener implements \PHPUnit_Framework_TestListener
{
/**
* The directory to write and read traces from.
* @var string
*/
protected $traceDir;
/**
* The trace filename
* @var string
*/
protected $traceFileName;
/**
* Collection of patterns to search for inside trace.
* @var array
*/
protected $searchPatterns = [];
/**
* Collection of results found from search.
* @var array
*/
protected $searchResults = [];
/**
* The current suite being tested.
* @var \PHPUnit_Framework_TestSuite
*/
protected $currentSuite;
/**
* The current test being tested.
* @var \PHPUnit_Framework_Test
*/
protected $currentTest;
/**
* Number of suites to test.
* @var integer
*/
protected $numSuites = 0;
/**
* Whether the debugger has been enabled.
* @var boolean
*/
protected $debuggerEnabled = false;
/**
* Listener constructor
* @param array $searchPatterns Collection of search patterns to find inside trace files.
* @param string $traceDir The directory to write trace files to.
*/
public function __construct(array $searchPatterns, $traceDir = 'traces')
{
$this->searchPatterns = $searchPatterns;
$this->traceDir = $traceDir;
$this->debuggerEnabled = extension_loaded('xdebug');
$this->startListener();
}
/**
* On listener start
*/
public function startListener()
{
if (!file_exists($this->traceDir)) {
mkdir($this->traceDir);
}
}
/**
* On listener end
*/
public function endListener()
{
if ($this->searchResults) {
printf(
"\n\nFound %s tests using %s search pattern(s).",
count($this->searchResults),
count($this->searchPatterns)
);
foreach ($this->searchResults as $searchResult) {
echo $searchResult;
}
}
}
/**
* On test suite start
* @param \PHPUnit_Framework_TestSuite $suite
*/
public function startTestSuite(\PHPUnit_Framework_TestSuite $suite)
{
if (!$this->shouldListen()) {
return;
}
$this->numSuites++;
$this->currentSuite = $suite;
}
/**
* On test suite end
* @param \PHPUnit_Framework_TestSuite $suite
*/
public function endTestSuite(\PHPUnit_Framework_TestSuite $suite)
{
if (!$this->shouldListen()) {
return;
}
$this->numSuites--;
if (!$this->numSuites) {
$this->endListener();
}
}
/**
* On test start
* @param \PHPUnit_Framework_Test $test
*/
public function startTest(\PHPUnit_Framework_Test $test)
{
if (!$this->shouldListen()) {
return;
}
$this->currentTest = $test;
$this->traceFileName = $this->buildTraceFileName();
xdebug_start_trace($this->getTraceFullPath());
}
/**
* On test end
* @param \PHPUnit_Framework_Test $test
* @param string $time Time taken for test to execute.
*/
public function endTest(\PHPUnit_Framework_Test $test, $time)
{
if (!$this->shouldListen()) {
return;
}
xdebug_stop_trace();
$traceFilePath = $this->getTraceFullPath() . '.xt';
$trace = file_get_contents($traceFilePath);
foreach ($this->searchPatterns as $searchPattern) {
$foundPattern = $this->find($trace, $searchPattern);
if ($foundPattern) {
$this->addSearchResult(
$searchPattern,
$foundPattern
);
} else {
unlink($traceFilePath);
}
}
}
/**
* Add a search result to the stack
* @param string $searchPattern
* @param mixed $patternResult Useful if searching with regex. Otherwise ignore.
*/
public function addSearchResult($searchPattern, $patternResult)
{
$searchResult = sprintf(
"\nFound %s inside '%s::%s'.",
$searchPattern,
$this->currentSuite->getName(),
$this->currentTest->getName()
);
$this->searchResults[] = $searchResult;
}
/**
* Whether we should listen.
* @return boolean
*/
protected function shouldListen()
{
return ($this->searchPatterns && $this->debuggerEnabled);
}
/**
* Find search criteria in trace output
* @param string $haystack The trace output
* @param string $needle The search criteria
* @return boolean
*/
protected function find($haystack, $needle)
{
return false !== strpos($haystack, $needle);
}
/**
* Generate a file name for the test trace
* @return string
*/
protected function buildTraceFileName()
{
return strtolower($this->currentSuite->getName() . '_' . $this->currentTest->getName());
}
/**
* Get the full path of the trace file,
* @return string
*/
public function getTraceFullPath()
{
return $this->traceDir . DIRECTORY_SEPARATOR . $this->traceFileName;
}
/**
* Required for Interface
* @see \PHPUnit_Framework_TestListener::addError()
*/
public function addError(\PHPUnit_Framework_Test $test, \Exception $e, $time)
{
}
/**
* Required for Interface
* @see \PHPUnit_Framework_TestListener::addFailure()
*/
public function addFailure(\PHPUnit_Framework_Test $test, \PHPUnit_Framework_AssertionFailedError $e, $time)
{
}
/**
* Required for Interface
* @see \PHPUnit_Framework_TestListener::addIncompleteTest()
*/
public function addIncompleteTest(\PHPUnit_Framework_Test $test, \Exception $e, $time)
{
}
/**
* Required for Interface
* @see \PHPUnit_Framework_TestListener::addRiskyTest()
*/
public function addRiskyTest(\PHPUnit_Framework_Test $test, \Exception $e, $time)
{
}
/**
* Required for Interface
* @see \PHPUnit_Framework_TestListener::addSkippedTest()
*/
public function addSkippedTest(\PHPUnit_Framework_Test $test, \Exception $e, $time)
{
}
}
| cabdesigns/trace-test-listener | src/CABDesigns/PHPUnit/Listener/TraceTestListener.php | PHP | mit | 6,622 |
<!DOCTYPE html>
<!--[if lt IE 9]><html class="no-js lt-ie9" lang="en" dir="ltr"><![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="en" dir="ltr">
<!--<![endif]-->
<!-- Usage: /eic/site/ccc-rec.nsf/tpl-eng/template-1col.html?Open&id=3 (optional: ?Open&page=filename.html&id=x) -->
<!-- Created: ; Product Code: 536; Server: stratnotes2.ic.gc.ca -->
<head>
<!-- Title begins / Début du titre -->
<title>
Gilmore Printing Services -
Complete profile - Canadian Company Capabilities - Industries and Business - Industry Canada
</title>
<!-- Title ends / Fin du titre -->
<!-- Meta-data begins / Début des métadonnées -->
<meta charset="utf-8" />
<meta name="dcterms.language" title="ISO639-2" content="eng" />
<meta name="dcterms.title" content="" />
<meta name="description" content="" />
<meta name="dcterms.description" content="" />
<meta name="dcterms.type" content="report, data set" />
<meta name="dcterms.subject" content="businesses, industry" />
<meta name="dcterms.subject" content="businesses, industry" />
<meta name="dcterms.issued" title="W3CDTF" content="" />
<meta name="dcterms.modified" title="W3CDTF" content="" />
<meta name="keywords" content="" />
<meta name="dcterms.creator" content="" />
<meta name="author" content="" />
<meta name="dcterms.created" title="W3CDTF" content="" />
<meta name="dcterms.publisher" content="" />
<meta name="dcterms.audience" title="icaudience" content="" />
<meta name="dcterms.spatial" title="ISO3166-1" content="" />
<meta name="dcterms.spatial" title="gcgeonames" content="" />
<meta name="dcterms.format" content="HTML" />
<meta name="dcterms.identifier" title="ICsiteProduct" content="536" />
<!-- EPI-11240 -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- MCG-202 -->
<meta content="width=device-width,initial-scale=1" name="viewport">
<!-- EPI-11567 -->
<meta name = "format-detection" content = "telephone=no">
<!-- EPI-12603 -->
<meta name="robots" content="noarchive">
<!-- EPI-11190 - Webtrends -->
<script>
var startTime = new Date();
startTime = startTime.getTime();
</script>
<!--[if gte IE 9 | !IE ]><!-->
<link href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/assets/favicon.ico" rel="icon" type="image/x-icon">
<link rel="stylesheet" href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/css/wet-boew.min.css">
<!--<![endif]-->
<link rel="stylesheet" href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/css/theme.min.css">
<!--[if lt IE 9]>
<link href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/assets/favicon.ico" rel="shortcut icon" />
<link rel="stylesheet" href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/css/ie8-wet-boew.min.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/js/ie8-wet-boew.min.js"></script>
<![endif]-->
<!--[if lte IE 9]>
<![endif]-->
<noscript><link rel="stylesheet" href="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/css/noscript.min.css" /></noscript>
<!-- Google Tag Manager DO NOT REMOVE OR MODIFY - NE PAS SUPPRIMER OU MODIFIER -->
<script>dataLayer1 = [];</script>
<!-- End Google Tag Manager -->
<!-- EPI-11235 -->
<link rel="stylesheet" href="/eic/home.nsf/css/add_WET_4-0_Canada_Apps.css">
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<link href="/app/ccc/srch/css/print.css" media="print" rel="stylesheet" type="text/css" />
</head>
<body class="home" vocab="http://schema.org/" typeof="WebPage">
<!-- EPIC HEADER BEGIN -->
<!-- Google Tag Manager DO NOT REMOVE OR MODIFY - NE PAS SUPPRIMER OU MODIFIER -->
<noscript><iframe title="Google Tag Manager" src="//www.googletagmanager.com/ns.html?id=GTM-TLGQ9K" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer1'?'&l='+l:'';j.async=true;j.src='//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer1','GTM-TLGQ9K');</script>
<!-- End Google Tag Manager -->
<!-- EPI-12801 -->
<span typeof="Organization"><meta property="legalName" content="Department_of_Industry"></span>
<ul id="wb-tphp">
<li class="wb-slc">
<a class="wb-sl" href="#wb-cont">Skip to main content</a>
</li>
<li class="wb-slc visible-sm visible-md visible-lg">
<a class="wb-sl" href="#wb-info">Skip to "About this site"</a>
</li>
</ul>
<header role="banner">
<div id="wb-bnr" class="container">
<section id="wb-lng" class="visible-md visible-lg text-right">
<h2 class="wb-inv">Language selection</h2>
<div class="row">
<div class="col-md-12">
<ul class="list-inline mrgn-bttm-0">
<li><a href="nvgt.do?V_TOKEN=1492288524919&V_SEARCH.docsCount=3&V_DOCUMENT.docRank=19498&V_SEARCH.docsStart=19497&V_SEARCH.command=navigate&V_SEARCH.resultsJSP=/prfl.do&lang=fra&redirectUrl=/app/scr/imbs/ccc/rgstrtn/?_flId?_flxKy=e1s1&estblmntNo=234567041301&profileId=61&_evId=bck&lang=eng&V_SEARCH.showStricts=false&prtl=1&_flId?_flId?_flxKy=e1s1" title="Français" lang="fr">Français</a></li>
</ul>
</div>
</div>
</section>
<div class="row">
<div class="brand col-xs-8 col-sm-9 col-md-6">
<a href="http://www.canada.ca/en/index.html"><object type="image/svg+xml" tabindex="-1" data="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/assets/sig-blk-en.svg"></object><span class="wb-inv"> Government of Canada</span></a>
</div>
<section class="wb-mb-links col-xs-4 col-sm-3 visible-sm visible-xs" id="wb-glb-mn">
<h2>Search and menus</h2>
<ul class="list-inline text-right chvrn">
<li><a href="#mb-pnl" title="Search and menus" aria-controls="mb-pnl" class="overlay-lnk" role="button"><span class="glyphicon glyphicon-search"><span class="glyphicon glyphicon-th-list"><span class="wb-inv">Search and menus</span></span></span></a></li>
</ul>
<div id="mb-pnl"></div>
</section>
<!-- Site Search Removed -->
</div>
</div>
<nav role="navigation" id="wb-sm" class="wb-menu visible-md visible-lg" data-trgt="mb-pnl" data-ajax-fetch="//cdn.canada.ca/gcweb-cdn-dev/sitemenu/sitemenu-en.html" typeof="SiteNavigationElement">
<h2 class="wb-inv">Topics menu</h2>
<div class="container nvbar">
<div class="row">
<ul class="list-inline menu">
<li><a href="https://www.canada.ca/en/services/jobs.html">Jobs</a></li>
<li><a href="http://www.cic.gc.ca/english/index.asp">Immigration</a></li>
<li><a href="https://travel.gc.ca/">Travel</a></li>
<li><a href="https://www.canada.ca/en/services/business.html">Business</a></li>
<li><a href="https://www.canada.ca/en/services/benefits.html">Benefits</a></li>
<li><a href="http://healthycanadians.gc.ca/index-eng.php">Health</a></li>
<li><a href="https://www.canada.ca/en/services/taxes.html">Taxes</a></li>
<li><a href="https://www.canada.ca/en/services.html">More services</a></li>
</ul>
</div>
</div>
</nav>
<!-- EPIC BODY BEGIN -->
<nav role="navigation" id="wb-bc" class="" property="breadcrumb">
<h2 class="wb-inv">You are here:</h2>
<div class="container">
<div class="row">
<ol class="breadcrumb">
<li><a href="/eic/site/icgc.nsf/eng/home" title="Home">Home</a></li>
<li><a href="/eic/site/icgc.nsf/eng/h_07063.html" title="Industries and Business">Industries and Business</a></li>
<li><a href="/eic/site/ccc-rec.nsf/tpl-eng/../eng/home" >Canadian Company Capabilities</a></li>
</ol>
</div>
</div>
</nav>
</header>
<main id="wb-cont" role="main" property="mainContentOfPage" class="container">
<!-- End Header -->
<!-- Begin Body -->
<!-- Begin Body Title -->
<!-- End Body Title -->
<!-- Begin Body Head -->
<!-- End Body Head -->
<!-- Begin Body Content -->
<br>
<!-- Complete Profile -->
<!-- Company Information above tabbed area-->
<input id="showMore" type="hidden" value='more'/>
<input id="showLess" type="hidden" value='less'/>
<h1 id="wb-cont">
Company profile - Canadian Company Capabilities
</h1>
<div class="profileInfo hidden-print">
<ul class="list-inline">
<li><a href="cccSrch.do?lang=eng&profileId=&prtl=1&key.hitsPerPage=25&searchPage=%252Fapp%252Fccc%252Fsrch%252FcccBscSrch.do%253Flang%253Deng%2526amp%253Bprtl%253D1%2526amp%253Btagid%253D&V_SEARCH.scopeCategory=CCC.Root&V_SEARCH.depth=1&V_SEARCH.showStricts=false&V_SEARCH.sortSpec=title+asc&rstBtn.x=" class="btn btn-link">New Search</a> |</li>
<li><form name="searchForm" method="post" action="/app/ccc/srch/bscSrch.do">
<input type="hidden" name="lang" value="eng" />
<input type="hidden" name="profileId" value="" />
<input type="hidden" name="prtl" value="1" />
<input type="hidden" name="searchPage" value="%2Fapp%2Fccc%2Fsrch%2FcccBscSrch.do%3Flang%3Deng%26amp%3Bprtl%3D1%26amp%3Btagid%3D" />
<input type="hidden" name="V_SEARCH.scopeCategory" value="CCC.Root" />
<input type="hidden" name="V_SEARCH.depth" value="1" />
<input type="hidden" name="V_SEARCH.showStricts" value="false" />
<input id="repeatSearchBtn" class="btn btn-link" type="submit" value="Return to search results" />
</form></li>
<li>| <a href="nvgt.do?V_SEARCH.docsStart=19496&V_DOCUMENT.docRank=19497&V_SEARCH.docsCount=3&lang=eng&prtl=1&sbPrtl=&profile=cmpltPrfl&V_TOKEN=1492288556597&V_SEARCH.command=navigate&V_SEARCH.resultsJSP=%2fprfl.do&estblmntNo=234567156875&profileId=&key.newSearchLabel=">Previous Company</a></li>
<li>| <a href="nvgt.do?V_SEARCH.docsStart=19498&V_DOCUMENT.docRank=19499&V_SEARCH.docsCount=3&lang=eng&prtl=1&sbPrtl=&profile=cmpltPrfl&V_TOKEN=1492288556597&V_SEARCH.command=navigate&V_SEARCH.resultsJSP=%2fprfl.do&estblmntNo=234567110032&profileId=&key.newSearchLabel=">Next Company</a></li>
</ul>
</div>
<details>
<summary>Third-Party Information Liability Disclaimer</summary>
<p>Some of the information on this Web page has been provided by external sources. The Government of Canada is not responsible for the accuracy, reliability or currency of the information supplied by external sources. Users wishing to rely upon this information should consult directly with the source of the information. Content provided by external sources is not subject to official languages, privacy and accessibility requirements.</p>
</details>
<h2>
Gilmore Printing Services
</h2>
<div class="row">
<div class="col-md-5">
<h2 class="h5 mrgn-bttm-0">Legal/Operating Name:</h2>
<p>Gilmore Printing Services</p>
<h2 class="h5 mrgn-bttm-0">Alternate Name:</h2>
<p class="mrgn-bttm-0">120 Herzberg Road Kanata ON </p>
<div class="mrgn-tp-md"></div>
<p class="mrgn-bttm-0" ><a href="http://www.gilmoreprinting.com"
target="_blank" title="Website URL">http://www.gilmoreprinting.com</a></p>
<p><a href="mailto:[email protected]" title="[email protected]">[email protected]</a></p>
</div>
<div class="col-md-4 mrgn-sm-sm">
<h2 class="h5 mrgn-bttm-0">Mailing Address:</h2>
<address class="mrgn-bttm-md">
110 Herzberg Rd<br/>
KANATA,
Ontario<br/>
K2K 3B7
<br/>
</address>
<h2 class="h5 mrgn-bttm-0">Location Address:</h2>
<address class="mrgn-bttm-md">
110 Herzberg Rd<br/>
KANATA,
Ontario<br/>
K2K 3B7
<br/>
</address>
<p class="mrgn-bttm-0"><abbr title="Telephone">Tel.</abbr>:
(613) 599-3776
</p>
<p class="mrgn-bttm-0"><abbr title="Telephone">Tel.</abbr>:
(800) 795-6661</p>
<p class="mrgn-bttm-lg"><abbr title="Facsimile">Fax</abbr>:
(613) 271-1332</p>
</div>
<div class="col-md-3 mrgn-tp-md">
<h2 class="wb-inv">Logo</h2>
<img class="img-responsive text-left" src="https://www.ic.gc.ca/app/ccc/srch/media?estblmntNo=234567156587&graphFileName=gilmore_printing.jpg&applicationCode=AP&lang=eng" alt="Logo" />
</div>
</div>
<div class="row mrgn-tp-md mrgn-bttm-md">
<div class="col-md-12">
<h2 class="wb-inv">Company Profile</h2>
<br> Established in 1991, Gilmore Printing Services Inc. (GPS) is a full-service offset printing business. It is equipped to produce a full range of commercial products such as annual reports, prestige marketing materials, kitfolders, covers, calendars, posters, brochures, newsletters, information sheets and stationery.<br>
</div>
</div>
<!-- <div class="wb-tabs ignore-session update-hash wb-eqht-off print-active"> -->
<div class="wb-tabs ignore-session">
<div class="tabpanels">
<details id="details-panel1">
<summary>
Full profile
</summary>
<!-- Tab 1 -->
<h2 class="wb-invisible">
Full profile
</h2>
<!-- Contact Information -->
<h3 class="page-header">
Contact information
</h3>
<section class="container-fluid">
<div class="row mrgn-tp-lg">
<div class="col-md-3">
<strong>
Richard
LeFrancois
</strong></div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Title:
</strong>
</div>
<div class="col-md-7">
<!--if client gender is not null or empty we use gender based job title-->
Director
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Area of Responsibility:
</strong>
</div>
<div class="col-md-7">
Manufacturing/Production/Operations.
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Telephone:
</strong>
</div>
<div class="col-md-7">
(613) 599-3776
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Ext:
</strong>
</div>
<div class="col-md-7">
5537
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Facsimile:
</strong>
</div>
<div class="col-md-7">
(613) 271-1332
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Email:
</strong>
</div>
<div class="col-md-7">
[email protected]
</div>
</div>
</section>
<p class="mrgn-tp-lg text-right small hidden-print">
<a href="#wb-cont">top of page</a>
</p>
<!-- Company Description -->
<h3 class="page-header">
Company description
</h3>
<section class="container-fluid">
<div class="row">
<div class="col-md-5">
<strong>
Country of Ownership:
</strong>
</div>
<div class="col-md-7">
Canada
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Year Established:
</strong>
</div>
<div class="col-md-7">
1991
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Exporting:
</strong>
</div>
<div class="col-md-7">
Yes
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Quality Certification:
</strong>
</div>
<div class="col-md-7">
ISO 14001,
ISO 9001.
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Primary Industry (NAICS):
</strong>
</div>
<div class="col-md-7">
323119 - Other Printing
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Primary Business Activity:
</strong>
</div>
<div class="col-md-7">
Manufacturer / Processor / Producer
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Total Sales ($CDN):
</strong>
</div>
<div class="col-md-7">
$5,000,000 to $9,999,999
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Export Sales ($CDN):
</strong>
</div>
<div class="col-md-7">
$1,000,000 to $4,999,999
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Number of Employees:
</strong>
</div>
<div class="col-md-7">
75
</div>
</div>
</section>
<!-- Products / Services / Licensing -->
<h3 class="page-header">
Product / Service / Licensing
</h3>
<section class="container-fluid">
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
Offset Printing<br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-12">
Offset Printing<br>
<br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
FSC Code:
</strong>
</div>
<div class="col-md-9">
7610-Books and Pamphlets
<br>
7660-Sheet and Book Music
<br>
T014-Print/Binding Services
<br>
T015-Reproduction Services
<br>
T099-Other Communication, Photographic, Mapping, Printing and Publication Services
<br>
</div>
</div>
</section>
<p class="mrgn-tp-lg text-right small hidden-print">
<a href="#wb-cont">top of page</a>
</p>
<!-- Technology Profile -->
<!-- Market Profile -->
<h3 class="page-header">
Market profile
</h3>
<section class="container-fluid">
<h4>
Industry sector market interests:
</h4>
<ul>
<li>Manufacturing</li>
</ul>
</section>
<p class="mrgn-tp-lg text-right small hidden-print">
<a href="#wb-cont">top of page</a>
</p>
<!-- Sector Information -->
<details class="mrgn-tp-md mrgn-bttm-md">
<summary>
Third-Party Information Liability Disclaimer
</summary>
<p>
Some of the information on this Web page has been provided by external sources. The Government of Canada is not responsible for the accuracy, reliability or currency of the information supplied by external sources. Users wishing to rely upon this information should consult directly with the source of the information. Content provided by external sources is not subject to official languages, privacy and accessibility requirements.
</p>
</details>
</details>
<details id="details-panel2">
<summary>
Contacts
</summary>
<h2 class="wb-invisible">
Contact information
</h2>
<!-- Contact Information -->
<section class="container-fluid">
<div class="row mrgn-tp-lg">
<div class="col-md-3">
<strong>
Richard
LeFrancois
</strong></div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Title:
</strong>
</div>
<div class="col-md-7">
<!--if client gender is not null or empty we use gender based job title-->
Director
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Area of Responsibility:
</strong>
</div>
<div class="col-md-7">
Manufacturing/Production/Operations.
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Telephone:
</strong>
</div>
<div class="col-md-7">
(613) 599-3776
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Ext:
</strong>
</div>
<div class="col-md-7">
5537
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Facsimile:
</strong>
</div>
<div class="col-md-7">
(613) 271-1332
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Email:
</strong>
</div>
<div class="col-md-7">
[email protected]
</div>
</div>
</section>
</details>
<details id="details-panel3">
<summary>
Description
</summary>
<h2 class="wb-invisible">
Company description
</h2>
<section class="container-fluid">
<div class="row">
<div class="col-md-5">
<strong>
Country of Ownership:
</strong>
</div>
<div class="col-md-7">
Canada
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Year Established:
</strong>
</div>
<div class="col-md-7">
1991
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Exporting:
</strong>
</div>
<div class="col-md-7">
Yes
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Quality Certification:
</strong>
</div>
<div class="col-md-7">
ISO 14001,
ISO 9001.
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Primary Industry (NAICS):
</strong>
</div>
<div class="col-md-7">
323119 - Other Printing
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Primary Business Activity:
</strong>
</div>
<div class="col-md-7">
Manufacturer / Processor / Producer
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Total Sales ($CDN):
</strong>
</div>
<div class="col-md-7">
$5,000,000 to $9,999,999
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Export Sales ($CDN):
</strong>
</div>
<div class="col-md-7">
$1,000,000 to $4,999,999
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Number of Employees:
</strong>
</div>
<div class="col-md-7">
75
</div>
</div>
</section>
</details>
<details id="details-panel4">
<summary>
Products, services and licensing
</summary>
<h2 class="wb-invisible">
Product / Service / Licensing
</h2>
<section class="container-fluid">
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
Offset Printing<br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-12">
Offset Printing<br>
<br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
FSC Code:
</strong>
</div>
<div class="col-md-9">
7610-Books and Pamphlets
<br>
7660-Sheet and Book Music
<br>
T014-Print/Binding Services
<br>
T015-Reproduction Services
<br>
T099-Other Communication, Photographic, Mapping, Printing and Publication Services
<br>
</div>
</div>
</section>
</details>
<details id="details-panel6">
<summary>
Market
</summary>
<h2 class="wb-invisible">
Market profile
</h2>
<section class="container-fluid">
<h4>
Industry sector market interests:
</h4>
<ul>
<li>Manufacturing</li>
</ul>
</section>
</details>
</div>
</div>
<div class="row">
<div class="col-md-12 text-right">
Last Update Date 2015-07-02
</div>
</div>
<!--
- Artifact ID: CBW - IMBS - CCC Search WAR
- Group ID: ca.gc.ic.strategis.imbs.ccc.search
- Version: 3.26
- Built-By: bamboo
- Build Timestamp: 2017-03-02T21:29:28Z
-->
<!-- End Body Content -->
<!-- Begin Body Foot -->
<!-- End Body Foot -->
<!-- END MAIN TABLE -->
<!-- End body -->
<!-- Begin footer -->
<div class="row pagedetails">
<div class="col-sm-5 col-xs-12 datemod">
<dl id="wb-dtmd">
<dt class=" hidden-print">Date Modified:</dt>
<dd class=" hidden-print">
<span><time>2017-03-02</time></span>
</dd>
</dl>
</div>
<div class="clear visible-xs"></div>
<div class="col-sm-4 col-xs-6">
</div>
<div class="col-sm-3 col-xs-6 text-right">
</div>
<div class="clear visible-xs"></div>
</div>
</main>
<footer role="contentinfo" id="wb-info">
<nav role="navigation" class="container wb-navcurr">
<h2 class="wb-inv">About government</h2>
<!-- EPIC FOOTER BEGIN -->
<!-- EPI-11638 Contact us -->
<ul class="list-unstyled colcount-sm-2 colcount-md-3">
<li><a href="http://www.ic.gc.ca/eic/site/icgc.nsf/eng/h_07026.html#pageid=E048-H00000&from=Industries">Contact us</a></li>
<li><a href="https://www.canada.ca/en/government/dept.html">Departments and agencies</a></li>
<li><a href="https://www.canada.ca/en/government/publicservice.html">Public service and military</a></li>
<li><a href="https://www.canada.ca/en/news.html">News</a></li>
<li><a href="https://www.canada.ca/en/government/system/laws.html">Treaties, laws and regulations</a></li>
<li><a href="https://www.canada.ca/en/transparency/reporting.html">Government-wide reporting</a></li>
<li><a href="http://pm.gc.ca/eng">Prime Minister</a></li>
<li><a href="https://www.canada.ca/en/government/system.html">How government works</a></li>
<li><a href="http://open.canada.ca/en/">Open government</a></li>
</ul>
</nav>
<div class="brand">
<div class="container">
<div class="row">
<nav class="col-md-10 ftr-urlt-lnk">
<h2 class="wb-inv">About this site</h2>
<ul>
<li><a href="https://www.canada.ca/en/social.html">Social media</a></li>
<li><a href="https://www.canada.ca/en/mobile.html">Mobile applications</a></li>
<li><a href="http://www1.canada.ca/en/newsite.html">About Canada.ca</a></li>
<li><a href="http://www.ic.gc.ca/eic/site/icgc.nsf/eng/h_07033.html">Terms and conditions</a></li>
<li><a href="http://www.ic.gc.ca/eic/site/icgc.nsf/eng/h_07033.html#p1">Privacy</a></li>
</ul>
</nav>
<div class="col-xs-6 visible-sm visible-xs tofpg">
<a href="#wb-cont">Top of Page <span class="glyphicon glyphicon-chevron-up"></span></a>
</div>
<div class="col-xs-6 col-md-2 text-right">
<object type="image/svg+xml" tabindex="-1" role="img" data="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/assets/wmms-blk.svg" aria-label="Symbol of the Government of Canada"></object>
</div>
</div>
</div>
</div>
</footer>
<!--[if gte IE 9 | !IE ]><!-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/js/wet-boew.min.js"></script>
<!--<![endif]-->
<!--[if lt IE 9]>
<script src="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/js/ie8-wet-boew2.min.js"></script>
<![endif]-->
<script src="/utils/scripts/_WET_4-0/apps/themes-dist/gcweb/js/theme.min.js"></script>
<!-- EPI-10519 -->
<span class="wb-sessto"
data-wb-sessto='{"inactivity": 1800000, "reactionTime": 180000, "sessionalive": 1800000, "logouturl": "/app/ccc/srch/cccSrch.do?lang=eng&prtl=1"}'></span>
<script src="/eic/home.nsf/js/jQuery.externalOpensInNewWindow.js"></script>
<!-- EPI-11190 - Webtrends -->
<script src="/eic/home.nsf/js/webtrends.js"></script>
<script>var endTime = new Date();</script>
<noscript>
<div><img alt="" id="DCSIMG" width="1" height="1" src="//wt-sdc.ic.gc.ca/dcs6v67hwe0ei7wsv8g9fv50d_3k6i/njs.gif?dcsuri=/nojavascript&WT.js=No&WT.tv=9.4.0&dcssip=www.ic.gc.ca"/></div>
</noscript>
<!-- /Webtrends -->
<!-- JS deps -->
<script src="/eic/home.nsf/js/jquery.imagesloaded.js"></script>
<!-- EPI-11262 - Util JS -->
<script src="/eic/home.nsf/js/_WET_4-0_utils_canada.min.js"></script>
<!-- EPI-11383 -->
<script src="/eic/home.nsf/js/jQuery.icValidationErrors.js"></script>
<span style="display:none;" id='app-info' data-project-groupid='' data-project-artifactid='' data-project-version='' data-project-build-timestamp='' data-issue-tracking='' data-scm-sha1='' data-scm-sha1-abbrev='' data-scm-branch='' data-scm-commit-date=''></span>
</body></html>
<!-- End Footer -->
<!--
- Artifact ID: CBW - IMBS - CCC Search WAR
- Group ID: ca.gc.ic.strategis.imbs.ccc.search
- Version: 3.26
- Built-By: bamboo
- Build Timestamp: 2017-03-02T21:29:28Z
-->
| GoC-Spending/data-corporations | html/234567156587.html | HTML | mit | 42,162 |
#include "overviewpage.h"
#include "ui_overviewpage.h"
#include "walletmodel.h"
#include "bitcoinunits.h"
#include "optionsmodel.h"
#include "transactiontablemodel.h"
#include "transactionfilterproxy.h"
#include "guiutil.h"
#include "guiconstants.h"
#include <QAbstractItemDelegate>
#include <QPainter>
#define DECORATION_SIZE 64
#define NUM_ITEMS 3
class TxViewDelegate : public QAbstractItemDelegate
{
Q_OBJECT
public:
TxViewDelegate(): QAbstractItemDelegate(), unit(BitcoinUnits::BTC)
{
}
inline void paint(QPainter *painter, const QStyleOptionViewItem &option,
const QModelIndex &index ) const
{
painter->save();
QIcon icon = qvariant_cast<QIcon>(index.data(Qt::DecorationRole));
QRect mainRect = option.rect;
QRect decorationRect(mainRect.topLeft(), QSize(DECORATION_SIZE, DECORATION_SIZE));
int xspace = DECORATION_SIZE + 8;
int ypad = 6;
int halfheight = (mainRect.height() - 2*ypad)/2;
QRect amountRect(mainRect.left() + xspace, mainRect.top()+ypad, mainRect.width() - xspace, halfheight);
QRect addressRect(mainRect.left() + xspace, mainRect.top()+ypad+halfheight, mainRect.width() - xspace, halfheight);
icon.paint(painter, decorationRect);
QDateTime date = index.data(TransactionTableModel::DateRole).toDateTime();
QString address = index.data(Qt::DisplayRole).toString();
qint64 amount = index.data(TransactionTableModel::AmountRole).toLongLong();
bool confirmed = index.data(TransactionTableModel::ConfirmedRole).toBool();
QVariant value = index.data(Qt::ForegroundRole);
QColor foreground = option.palette.color(QPalette::Text);
if(qVariantCanConvert<QColor>(value))
{
foreground = qvariant_cast<QColor>(value);
}
painter->setPen(foreground);
painter->drawText(addressRect, Qt::AlignLeft|Qt::AlignVCenter, address);
if(amount < 0)
{
foreground = COLOR_NEGATIVE;
}
else if(!confirmed)
{
foreground = COLOR_UNCONFIRMED;
}
else
{
foreground = option.palette.color(QPalette::Text);
}
painter->setPen(foreground);
QString amountText = BitcoinUnits::formatWithUnit(unit, amount, true);
if(!confirmed)
{
amountText = QString("[") + amountText + QString("]");
}
painter->drawText(amountRect, Qt::AlignRight|Qt::AlignVCenter, amountText);
painter->setPen(option.palette.color(QPalette::Text));
painter->drawText(amountRect, Qt::AlignLeft|Qt::AlignVCenter, GUIUtil::dateTimeStr(date));
painter->restore();
}
inline QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
{
return QSize(DECORATION_SIZE, DECORATION_SIZE);
}
int unit;
};
#include "overviewpage.moc"
OverviewPage::OverviewPage(QWidget *parent) :
QWidget(parent),
ui(new Ui::OverviewPage),
currentBalance(-1),
currentStake(0),
currentUnconfirmedBalance(-1),
txdelegate(new TxViewDelegate())
{
ui->setupUi(this);
// Balance: <balance>
ui->labelBalance->setFont(QFont("Monospace", -1, QFont::Bold));
ui->labelBalance->setToolTip(tr("Your current balance"));
ui->labelBalance->setTextInteractionFlags(Qt::TextSelectableByMouse|Qt::TextSelectableByKeyboard);
// RISE: stake: <stake>
ui->labelStake->setFont(QFont("Monospace", -1, QFont::Bold));
ui->labelStake->setToolTip(tr("Your current stake"));
ui->labelStake->setTextInteractionFlags(Qt::TextSelectableByMouse|Qt::TextSelectableByKeyboard);
// Unconfirmed balance: <balance>
ui->labelUnconfirmed->setFont(QFont("Monospace", -1, QFont::Bold));
ui->labelUnconfirmed->setToolTip(tr("Total of transactions that have yet to be confirmed, and do not yet count toward the current balance"));
ui->labelUnconfirmed->setTextInteractionFlags(Qt::TextSelectableByMouse|Qt::TextSelectableByKeyboard);
ui->labelNumTransactions->setToolTip(tr("Total number of transactions in wallet"));
// Recent transactions
ui->listTransactions->setStyleSheet("QListView { background:transparent }");
ui->listTransactions->setItemDelegate(txdelegate);
ui->listTransactions->setIconSize(QSize(DECORATION_SIZE, DECORATION_SIZE));
ui->listTransactions->setSelectionMode(QAbstractItemView::NoSelection);
ui->listTransactions->setMinimumHeight(NUM_ITEMS * (DECORATION_SIZE + 2));
ui->listTransactions->setResizeMode(QListView::Adjust);
ui->listTransactions->setAttribute(Qt::WA_MacShowFocusRect, false);
connect(ui->listTransactions, SIGNAL(clicked(QModelIndex)), this, SIGNAL(transactionClicked(QModelIndex)));
}
OverviewPage::~OverviewPage()
{
delete ui;
}
void OverviewPage::setBalance(qint64 balance, qint64 stake, qint64 unconfirmedBalance)
{
int unit = model->getOptionsModel()->getDisplayUnit();
currentBalance = balance;
currentStake = stake;
currentUnconfirmedBalance = unconfirmedBalance;
ui->labelBalance->setText(BitcoinUnits::formatWithUnit(unit, balance));
ui->labelStake->setText(BitcoinUnits::formatWithUnit(unit, stake));
ui->labelUnconfirmed->setText(BitcoinUnits::formatWithUnit(unit, unconfirmedBalance));
}
unsigned int OverviewPage::numDisplayedTransactions()
{
unsigned int numItems;
numItems = height() / DECORATION_SIZE;
if(numItems > NUM_ITEMS)
numItems--;
else if(numItems < NUM_ITEMS)
numItems = NUM_ITEMS;
return numItems;
}
void OverviewPage::setNumTransactions(int count)
{
ui->labelNumTransactions->setText(QLocale::system().toString(count));
}
void OverviewPage::setModel(WalletModel *model)
{
this->model = model;
if(model)
{
// Set up transaction list
TransactionFilterProxy *filter = new TransactionFilterProxy();
filter->setSourceModel(model->getTransactionTableModel());
filter->setLimit(numDisplayedTransactions());
filter->setDynamicSortFilter(true);
filter->setSortRole(Qt::EditRole);
filter->sort(TransactionTableModel::Date, Qt::DescendingOrder);
ui->listTransactions->setModel(filter);
ui->listTransactions->setModelColumn(TransactionTableModel::ToAddress);
// Keep up to date with wallet
setBalance(model->getBalance(), model->getStake(), model->getUnconfirmedBalance());
connect(model, SIGNAL(balanceChanged(qint64, qint64, qint64)), this, SLOT(setBalance(qint64, qint64, qint64)));
setNumTransactions(model->getNumTransactions());
connect(model, SIGNAL(numTransactionsChanged(int)), this, SLOT(setNumTransactions(int)));
connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(displayUnitChanged()));
}
}
void OverviewPage::displayUnitChanged()
{
if(!model || !model->getOptionsModel())
return;
if(currentBalance != -1)
setBalance(currentBalance, currentStake, currentUnconfirmedBalance);
txdelegate->unit = model->getOptionsModel()->getDisplayUnit();
ui->listTransactions->update();
}
void OverviewPage::resizeEvent(QResizeEvent *event)
{
if(!model || !ui->listTransactions->model())
return;
TransactionFilterProxy *filter = (TransactionFilterProxy *) ui->listTransactions->model();
filter->setLimit(numDisplayedTransactions());
QWidget::resizeEvent(event);
}
| RISEONLYMARKET/SOURCE | src/qt/overviewpage.cpp | C++ | mit | 7,504 |
<section class="main-content bg-sidebar sidebar-left padding-bot0">
<div class="container">
<div class="case-single v1">
<div class="row">
<div class="col-md-9">
<div class="title-section style1">
<h3 class="title">VAT DOCUMENTATIONS</h3>
<div class="title-post">
<h4 class="headg">VAT INVOICES AND CASH RECEIPTS</h4>
</div>
<p class="pb20">
A supplier registered or required to be registered for VAT must issue a valid VAT invoice for the supply. To be considered as a valid VAT invoice, the document must follow a specific format as mentioned in the legislation. In certain situations the supplier may be able to issue a simplified VAT invoice. The conditions for the VAT invoice and the simplified VAT invoice are mentioned legislation.
</p>
<div class="title-post">
<h4 class="headg">RETAIN VAT INVOICES FOR 5 YEARS</h4>
</div>
<p class="pb20">
Any taxable person must retain VAT invoices issued and received for a minimum of 5 years.
</p>
<div class="title-post">
<h4 class="headg">RECORDS TO BE MAINTAINED BY BUSINESSES</h4>
</div>
<p class="pb20">
Businesses will be required to keep records which will enable the Federal Tax Authority to identify the details of the business activities and review transactions. The specifics regarding the documents which will be required and the time period for keeping them will be stated in the relevant legislation.
</p>
<p class="pb20">
Businesses will be responsible for carefully documenting their business income and costs and associated VAT charges. Registered businesses and traders will charge VAT to all of their customers at the prevailing rate and incur VAT on goods / services that they buy from suppliers. The difference between these sums is reclaimed or paid to the government.
</p>
</div>
</div>
<div class="col-md-3">
<div class="sidebar">
<div class="widget widget-categories">
<div class="title-link">
<h5 class="widget-title">More</h5>
</div>
<div class="widget widget-categories team">
<ul class="categories">
<li><a href="<?php echo base_url();?>uaeServices">SERVICES</a></li>
<li><a href="<?php echo base_url();?>erp">ERP</a></li>
<li><a href="<?php echo base_url();?>businessFormation">BUSINESS FORMATI-UAE</a></li>
<li><a href="<?php echo base_url();?>businessLicense">BUSINESS LICENSE-UAE</a></li>
<li><a href="<?php echo base_url();?>exciseTax">UAE EXCISE TAX</a></li>
<li><a href="<?php echo base_url();?>uaeVat">WHAT IS VAT</a></li>
<li><a href="<?php echo base_url();?>vatRegistration">VAT REGISTRATION</a></li>
<li><a href="<?php echo base_url();?>vatExemption">VAT EXEMPTION & ZERO RATE</a></li>
<li><a href="<?php echo base_url();?>vatFiling">VAT FILING & INPUT VAT</a></li>
<li><a href="<?php echo base_url();?>vatDocumentation">VAT DOCUMENTATIONS</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="main-content bg-sidebar sidebar-left padding-bot0">
<div class="container">
<div class="case-single v1">
<div class="row">
<div class="col-md-12">
<div class="title-section style1">
<div class="title-post">
<h4 class="headg">ACCOUNTING AND VAT COLLECTION</h4>
</div>
<p class="pb20">
All businesses in the UAE will need to record their financial transactions and ensure that their financial records are accurate and up to date. Businesses that meet the minimum annual turnover requirement (as evidenced by their financial records) will be required to register for VAT. Businesses that do not think that they should be VAT registered should maintain their financial records in any event, in case we need to establish whether they should be registered.
</p>
<p class="pb20">
VAT-registered businesses generally:
</p>
<ol class="listomy">
<li>must charge VAT on taxable goods or services they supply;<li>
<li>may reclaim any VAT they’ve paid on business-related goods or services;<li>
<li>keep a range of business records which will allow the government to check that they have got things right<li>
</ol>
<p class="pb20">
If you’re a VAT-registered business you must report the amount of VAT you’ve charged and the amount of VAT you’ve paid to the government on a regular basis. It will be a formal submission and it is likely that the reporting will be made online.
</p>
<p class="pb20">
If you’ve charged more VAT than you’ve paid, you have to pay the difference to the government. If you’ve paid more VAT than you’ve charged, you can reclaim the difference.
</p>
<div class="title-post">
<h4 class="headg">VAT TO BE IMPLEMENTED; HOW TO BE PREPARED</h4>
</div>
<p class="pb20">
Concerned businesses will have time to prepare before VAT will come into effect in January 2018. During that time, businesses will need to meet requirements to fulfill their tax obligations. Businesses could start now so that they will be ready later. To fully comply with VAT, We believe that businesses may need to make some changes to their core operations, their financial management and book-keeping, their technology, and perhaps even their human resource mix (e.g., accountants and tax advisors). It is essential that businesses try to understand the implications of VAT now and once the legislation is issued make every effort to align their business model to government reporting and compliance requirements. We will provide businesses with guidance on how to fully comply with VAT once the legislation is issued. The final responsibility and accountability to comply with law is on the business.
</p>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- NEED HELP START -->
<section class="flat-row padding-70">
<div class="flat-help">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="services-control">
<div class="icon-top">
<img src="images/2.png" alt="image">
</div>
<div class="title-section">
<h4 class="title">Need Help?</h4>
</div>
<div class="post-services">
<p>Contact our customer support team if you have any further questions. We are heare to help you out</p>
</div>
</div>
<div class="contact-help">
<div class="item phone-help">
<p>+91-9446 5000 44</p>
</div>
<div class="item email-help">
<p>[email protected]</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- NEED HELP END --> | Noushid/tax-alligns-2017 | application/views/uae/uae10.php | PHP | mit | 9,857 |
<?php
declare(strict_types=1);
/*
* This file is part of the Valkyrja Framework package.
*
* (c) Melech Mizrachi <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Valkyrja\Routing\Annotations\Route\Secure;
use Valkyrja\Routing\Annotations\Route\Put as ParentClass;
/**
* Class Put.
*
* @author Melech Mizrachi
*/
class Put extends ParentClass
{
/**
* Put constructor.
*/
public function __construct()
{
$this->secure = true;
parent::__construct();
}
}
| valkyrjaio/valkyrja | src/Valkyrja/Routing/Annotations/Route/Secure/Put.php | PHP | mit | 628 |
---
---
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>ViewServicePluginAPI | @uirouter/angular</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
<link rel="stylesheet" href="../assets/css/uirouter.css">
<script src="../assets/js/modernizr.js"></script>
<script src="../assets/js/reset.js"></script>
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.js" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">@uirouter/angular</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<!--
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
-->
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Internal UI-Router API</label>
<!--
<input type="checkbox" id="tsd-filter-only-exported" />
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
-->
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../index.html">@uirouter/angular</a>
</li>
<li>
<a href="../modules/view.html">view</a>
</li>
<li>
<a href="view.viewservicepluginapi.html">ViewServicePluginAPI</a>
</li>
</ul>
<h1>Interface ViewServicePluginAPI</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<span class="target">ViewServicePluginAPI</span>
</li>
</ul>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section ">
<h3>Methods</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-method tsd-parent-kind-interface"><a href="view.viewservicepluginapi.html#_activeviewconfigs" class="tsd-kind-icon">_active<wbr>View<wbr>Configs</a></li>
<li class="tsd-kind-method tsd-parent-kind-interface"><a href="view.viewservicepluginapi.html#_onsync" class="tsd-kind-icon">_on<wbr>Sync</a></li>
<li class="tsd-kind-method tsd-parent-kind-interface"><a href="view.viewservicepluginapi.html#_registereduiview" class="tsd-kind-icon">_registeredUIView</a></li>
<li class="tsd-kind-method tsd-parent-kind-interface"><a href="view.viewservicepluginapi.html#_registereduiviews" class="tsd-kind-icon">_registeredUIViews</a></li>
<li class="tsd-kind-method tsd-parent-kind-interface"><a href="view.viewservicepluginapi.html#_rootviewcontext" class="tsd-kind-icon">_root<wbr>View<wbr>Context</a></li>
<li class="tsd-kind-method tsd-parent-kind-interface"><a href="view.viewservicepluginapi.html#_viewconfigfactory" class="tsd-kind-icon">_view<wbr>Config<wbr>Factory</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Methods</h2>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface">
<a name="_activeviewconfigs" class="tsd-anchor"></a>
<!--
<h3>_active<wbr>View<wbr>Configs</h3>
-->
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface">
<li class="tsd-signature tsd-kind-icon">_active<wbr>View<wbr>Configs<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ViewConfig[]</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-returns">
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">ViewConfig[]</span></h4>
</div>
<hr>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/8ed691b/src/view/view.ts#L19">ui-router-core/src/view/view.ts:19</a></li>
</ul>
</aside> </li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface">
<a name="_onsync" class="tsd-anchor"></a>
<!--
<h3>_on<wbr>Sync</h3>
-->
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface">
<li class="tsd-signature tsd-kind-icon">_on<wbr>Sync<span class="tsd-signature-symbol">(</span>listener<span class="tsd-signature-symbol">: </span><a href="view.viewsynclistener.html" class="tsd-signature-type">ViewSyncListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Function</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>listener <a href="view.viewsynclistener.html" class="tsd-signature-type">ViewSyncListener</a></h5>
</li>
</ul>
<div class="tsd-returns">
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Function</span></h4>
</div>
<hr>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/8ed691b/src/view/view.ts#L20">ui-router-core/src/view/view.ts:20</a></li>
</ul>
</aside> </li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface">
<a name="_registereduiview" class="tsd-anchor"></a>
<!--
<h3>_registeredUIView</h3>
-->
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface">
<li class="tsd-signature tsd-kind-icon">_registeredUIView<span class="tsd-signature-symbol">(</span>id<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="view.activeuiview.html" class="tsd-signature-type">ActiveUIView</a></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>id <span class="tsd-signature-type">string</span></h5>
: <div class="tsd-comment tsd-typography">
<p>router.$id + "." + uiView.id</p>
</div>
</li>
</ul>
<div class="tsd-returns">
<h4 class="tsd-returns-title">Returns <a href="view.activeuiview.html" class="tsd-signature-type">ActiveUIView</a></h4>
</div>
<hr>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/8ed691b/src/view/view.ts#L17">ui-router-core/src/view/view.ts:17</a></li>
</ul>
</aside> </li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface">
<a name="_registereduiviews" class="tsd-anchor"></a>
<!--
<h3>_registeredUIViews</h3>
-->
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface">
<li class="tsd-signature tsd-kind-icon">_registeredUIViews<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ActiveUIView[]</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<div class="tsd-returns">
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">ActiveUIView[]</span></h4>
</div>
<hr>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/8ed691b/src/view/view.ts#L18">ui-router-core/src/view/view.ts:18</a></li>
</ul>
</aside> </li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface">
<a name="_rootviewcontext" class="tsd-anchor"></a>
<!--
<h3>_root<wbr>View<wbr>Context</h3>
-->
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface">
<li class="tsd-signature tsd-kind-icon">_root<wbr>View<wbr>Context<span class="tsd-signature-symbol">(</span>context<span class="tsd-signature-symbol">?: </span><a href="view.viewcontext.html" class="tsd-signature-type">ViewContext</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="view.viewcontext.html" class="tsd-signature-type">ViewContext</a></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>context: <span class="tsd-flag ts-flagOptional">Optional</span> <a href="view.viewcontext.html" class="tsd-signature-type">ViewContext</a></h5>
</li>
</ul>
<div class="tsd-returns">
<h4 class="tsd-returns-title">Returns <a href="view.viewcontext.html" class="tsd-signature-type">ViewContext</a></h4>
</div>
<hr>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/8ed691b/src/view/view.ts#L14">ui-router-core/src/view/view.ts:14</a></li>
</ul>
</aside> </li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-interface">
<a name="_viewconfigfactory" class="tsd-anchor"></a>
<!--
<h3>_view<wbr>Config<wbr>Factory</h3>
-->
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface">
<li class="tsd-signature tsd-kind-icon">_view<wbr>Config<wbr>Factory<span class="tsd-signature-symbol">(</span>viewType<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, factory<span class="tsd-signature-symbol">: </span><a href="../modules/view.html#viewconfigfactory" class="tsd-signature-type">ViewConfigFactory</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>viewType <span class="tsd-signature-type">string</span></h5>
</li>
<li>
<h5>factory <a href="../modules/view.html#viewconfigfactory" class="tsd-signature-type">ViewConfigFactory</a></h5>
</li>
</ul>
<div class="tsd-returns">
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4>
</div>
<hr>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/ui-router/core/blob/8ed691b/src/view/view.ts#L15">ui-router-core/src/view/view.ts:15</a></li>
</ul>
</aside> </li>
</ul>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals ">
<a href="../index.html"><em>@uirouter/angular</em></a>
</li>
<li class="label tsd-is-external">
<span>Public API</span>
</li>
<li class=" tsd-kind-external-module">
<a href="../modules/common.html">common</a>
</li>
<li class=" tsd-kind-external-module">
<a href="../modules/core.html">core</a>
</li>
<li class=" tsd-kind-external-module">
<a href="../modules/directives.html">directives</a>
</li>
<li class=" tsd-kind-external-module">
<a href="../modules/params.html">params</a>
</li>
<li class=" tsd-kind-external-module">
<a href="../modules/resolve.html">resolve</a>
</li>
<li class=" tsd-kind-external-module">
<a href="../modules/state.html">state</a>
</li>
<li class=" tsd-kind-external-module">
<a href="../modules/transition.html">transition</a>
</li>
<li class=" tsd-kind-external-module">
<a href="../modules/url.html">url</a>
</li>
<li class="current tsd-kind-external-module">
<a href="../modules/view.html">view</a>
</li>
<li class="label tsd-is-external">
<span>Internal UI-<wbr><wbr>Router API</span>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="../modules/common_hof.html">common_<wbr>hof</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="../modules/common_predicates.html">common_<wbr>predicates</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="../modules/common_strings.html">common_<wbr>strings</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="../modules/hooks.html">hooks</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="../modules/ng2.html">ng2</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="../modules/path.html">path</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="../modules/trace.html">trace</a>
</li>
<li class=" tsd-kind-external-module tsd-is-external">
<a href="../modules/vanilla.html">vanilla</a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
<li class=" tsd-kind-class tsd-parent-kind-external-module">
<a href="../classes/view.viewservice.html" class="tsd-kind-icon">View<wbr>Service</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-external-module tsd-is-external">
<a href="view.activeuiview.html" class="tsd-kind-icon">ActiveUIView</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-external-module">
<a href="view.viewconfig.html" class="tsd-kind-icon">View<wbr>Config</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-external-module tsd-is-external">
<a href="view.viewcontext.html" class="tsd-kind-icon">View<wbr>Context</a>
</li>
</ul>
<ul class="current">
<li class="current tsd-kind-interface tsd-parent-kind-external-module">
<a href="view.viewservicepluginapi.html" class="tsd-kind-icon">View<wbr>Service<wbr>PluginAPI</a>
<ul>
<li class=" tsd-kind-method tsd-parent-kind-interface">
<a href="view.viewservicepluginapi.html#_activeviewconfigs" class="tsd-kind-icon">_active<wbr>View<wbr>Configs</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-interface">
<a href="view.viewservicepluginapi.html#_onsync" class="tsd-kind-icon">_on<wbr>Sync</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-interface">
<a href="view.viewservicepluginapi.html#_registereduiview" class="tsd-kind-icon">_registeredUIView</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-interface">
<a href="view.viewservicepluginapi.html#_registereduiviews" class="tsd-kind-icon">_registeredUIViews</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-interface">
<a href="view.viewservicepluginapi.html#_rootviewcontext" class="tsd-kind-icon">_root<wbr>View<wbr>Context</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-interface">
<a href="view.viewservicepluginapi.html#_viewconfigfactory" class="tsd-kind-icon">_view<wbr>Config<wbr>Factory</a>
</li>
</ul>
</li>
</ul>
<ul class="after-current">
<li class=" tsd-kind-interface tsd-parent-kind-external-module">
<a href="view.viewsynclistener.html" class="tsd-kind-icon">View<wbr>Sync<wbr>Listener</a>
</li>
<li class=" tsd-kind-interface tsd-parent-kind-external-module">
<a href="view.viewtuple.html" class="tsd-kind-icon">View<wbr>Tuple</a>
</li>
<li class=" tsd-kind-type-alias tsd-parent-kind-external-module">
<a href="../modules/view.html#viewconfigfactory" class="tsd-kind-icon">View<wbr>Config<wbr>Factory</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<footer class="with-border-bottom">
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-module"><span class="tsd-kind-icon">Module</span></li>
<li class="tsd-kind-object-literal"><span class="tsd-kind-icon">Object literal</span></li>
<li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li>
<li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li>
<li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li>
<li class="tsd-kind-index-signature"><span class="tsd-kind-icon">Index signature</span></li>
<li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li>
<li class="tsd-kind-enum-member"><span class="tsd-kind-icon">Enumeration member</span></li>
<li class="tsd-kind-property tsd-parent-kind-enum"><span class="tsd-kind-icon">Property</span></li>
<li class="tsd-kind-method tsd-parent-kind-enum"><span class="tsd-kind-icon">Method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li>
<li class="tsd-kind-interface tsd-has-type-parameter"><span class="tsd-kind-icon">Interface with type parameter</span></li>
<li class="tsd-kind-constructor tsd-parent-kind-interface"><span class="tsd-kind-icon">Constructor</span></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
<li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li>
<li class="tsd-kind-index-signature tsd-parent-kind-interface"><span class="tsd-kind-icon">Index signature</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li>
<li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li>
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
<li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><span class="tsd-kind-icon">Accessor</span></li>
<li class="tsd-kind-index-signature tsd-parent-kind-class"><span class="tsd-kind-icon">Index signature</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited accessor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected accessor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private accessor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
<li class="tsd-kind-call-signature tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
</ul>
</div>
</div>
</footer>
<div class="container tsd-generator">
<p>Generated using <a href="http://typedoc.io" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
<script>if (location.protocol == 'file:') document.write('<script src="../assets/js/search.js"><' + '/script>');</script>
</body>
</html> | ui-router/ui-router.github.io | _ng2_docs/2.0.2/interfaces/view.viewservicepluginapi.html | HTML | mit | 22,879 |
import Vue from 'vue';
import VueRouter from 'vue-router';
import routerMap from './routers';
import App from './App';
Vue.use(VueRouter);
const router = new VueRouter({
hashbang: true,
history: false,
saveScrollPosition: true,
transitionOnLoad: false
});
routerMap(router);
router.start(App, '#app');
| kraaas/vue-beauty | src/main.js | JavaScript | mit | 322 |
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import json
import itertools
import functools
import jinja2
from jinja2 import nodes
from jinja2.ext import Extension
from jinja2.exceptions import TemplateNotFound
from .template import CHART_HTML
from .options import Options
class ChartExtension(Extension):
tags = set(['line_chart', 'pie_chart', 'column_chart',
'bar_chart', 'area_chart', 'scatter_chart'])
id = itertools.count()
_library = None
def __init__(self, environment):
super(ChartExtension, self).__init__(environment)
environment.extend(
options=dict(height='300px'),
)
for tag in self.tags:
setattr(self, tag + '_support',
functools.partial(self._chart_support, tag))
def parse(self, parser):
# parse chart name
chart_tag = next(parser.stream)
args = [parser.parse_expression()]
# parse 'with' statement
if parser.stream.current.type != 'block_end':
token = next(parser.stream)
if token.value != 'with':
parser.fail("expected 'with' statement", token.lineno)
# parse options
while parser.stream.current.type != 'block_end':
lineno = parser.stream.current.lineno
target = parser.parse_assign_target()
parser.stream.expect('assign')
expr = parser.parse_expression()
args.append(nodes.Assign(target, expr, lineno=lineno))
support_func = chart_tag.value + '_support'
return nodes.CallBlock(self.call_method(support_func, args),
[], [], []).set_lineno(chart_tag.lineno)
def _chart_support(self, name, data, caller, **kwargs):
"template chart support function"
id = 'chart-%s' % next(self.id)
name = self._chart_class_name(name)
options = dict(self.environment.options)
options.update(name=name, id=id)
# jinja2 prepends 'l_' or 'l_{{ n }}'(ver>=2.9) to keys
if jinja2.__version__ >= '2.9':
kwargs = dict((k[4:], v) for (k, v) in kwargs.items())
else:
kwargs = dict((k[2:], v) for (k, v) in kwargs.items())
if self._library is None:
self._library = self.load_library()
id = kwargs.get('id', '')
library = self._library.get(id, {})
# apply options from a tag
library.update(kwargs.get('library', {}))
# apply options from chartkick.json
kwargs.update(library=library)
options.update(kwargs)
return CHART_HTML.format(data=data, options=json.dumps(kwargs),
**options)
def _chart_class_name(self, tag_name):
"converts chart tag name to javascript class name"
return ''.join(map(str.title, tag_name.split('_')))
def load_library(self):
"loads configuration options"
try:
filename = self.environment.get_template('chartkick.json').filename
except TemplateNotFound:
return {}
else:
options = Options()
options.load(filename)
return options
charts = ChartExtension
| mher/chartkick.py | chartkick/ext.py | Python | mit | 3,246 |
package securbank.services;
import java.util.List;
import java.util.UUID;
import org.joda.time.LocalDateTime;
import securbank.models.Account;
import securbank.models.Transaction;
import securbank.models.Transfer;
import securbank.models.User;
/**
* @author Mitikaa
*
*/
public interface TransactionService {
public Transaction initiateDebit(Transaction transaction);
public Transaction initiateCredit(Transaction transaction);
public Transaction initiateTransfer(Transfer transfer);
public Transaction approveTransaction(Transaction transaction);
public Transfer approveTransfer(Transfer transfer);
public Transaction declineTransaction(Transaction transaction);
public Transaction declineTransaction(Transfer transfer);
public List<Transaction> getPendingTransactionsByAccountNumber(Long accountNumber);
public List<Transaction> getPendingTransactionsByType(Long accountNumber, String accountType);
public List<Transaction> getTransactionsByStatus(String approvalStatus);
public Transaction getTransactionById(UUID id);
public Transaction getPendingTransactionByAccountNumber(Long accountNumber);
public Transaction approveTransactionFromTransfer(Transaction transaction);
public boolean isTransactionValid(Transaction transaction);
public List<Transaction> getTransactionsByAccount(Account account);
public List<Transaction> getTransactionsByAccountAndDateTimeRange(Account account, LocalDateTime startDt, LocalDateTime endDt);
public Double getSumByAccountAndDateRange(Account account, LocalDateTime start, LocalDateTime end);
public Transaction createInternalTransationByType(Transaction transaction, String type);
public Transaction createCardPaymentTransaction(Double amount, User user);
public Transaction initiateCreditCardTransaction(Transaction transaction);
public List<Transaction> getNonCriticalTransactionsByStatus(String approvalStatus);
}
| ayush2k/securbank | src/main/java/securbank/services/TransactionService.java | Java | mit | 1,884 |
#include "uritests.h"
#include "../guiutil.h"
#include "../walletmodel.h"
#include <QUrl>
void URITests::uriTests()
{
SendCoinsRecipient rv;
QUrl uri;
uri.setUrl(QString("TelcoCoin:LQDPC5rbjDB72fGFVHu4enYhxGAZuRiFh9?req-dontexist="));
QVERIFY(!GUIUtil::parseBitcoinURI(uri, &rv));
uri.setUrl(QString("TelcoCoin:LQDPC5rbjDB72fGFVHu4enYhxGAZuRiFh9?dontexist="));
QVERIFY(GUIUtil::parseBitcoinURI(uri, &rv));
QVERIFY(rv.address == QString("LQDPC5rbjDB72fGFVHu4enYhxGAZuRiFh9"));
QVERIFY(rv.label == QString());
QVERIFY(rv.amount == 0);
uri.setUrl(QString("TelcoCoin:LQDPC5rbjDB72fGFVHu4enYhxGAZuRiFh9?label=Wikipedia Example Address"));
QVERIFY(GUIUtil::parseBitcoinURI(uri, &rv));
QVERIFY(rv.address == QString("LQDPC5rbjDB72fGFVHu4enYhxGAZuRiFh9"));
QVERIFY(rv.label == QString("Wikipedia Example Address"));
QVERIFY(rv.amount == 0);
uri.setUrl(QString("TelcoCoin:LQDPC5rbjDB72fGFVHu4enYhxGAZuRiFh9?amount=0.001"));
QVERIFY(GUIUtil::parseBitcoinURI(uri, &rv));
QVERIFY(rv.address == QString("LQDPC5rbjDB72fGFVHu4enYhxGAZuRiFh9"));
QVERIFY(rv.label == QString());
QVERIFY(rv.amount == 100000);
uri.setUrl(QString("TelcoCoin:LQDPC5rbjDB72fGFVHu4enYhxGAZuRiFh9?amount=1.001"));
QVERIFY(GUIUtil::parseBitcoinURI(uri, &rv));
QVERIFY(rv.address == QString("LQDPC5rbjDB72fGFVHu4enYhxGAZuRiFh9"));
QVERIFY(rv.label == QString());
QVERIFY(rv.amount == 100100000);
uri.setUrl(QString("TelcoCoin:LQDPC5rbjDB72fGFVHu4enYhxGAZuRiFh9?amount=100&label=Wikipedia Example"));
QVERIFY(GUIUtil::parseBitcoinURI(uri, &rv));
QVERIFY(rv.address == QString("LQDPC5rbjDB72fGFVHu4enYhxGAZuRiFh9"));
QVERIFY(rv.amount == 10000000000LL);
QVERIFY(rv.label == QString("Wikipedia Example"));
uri.setUrl(QString("TelcoCoin:LQDPC5rbjDB72fGFVHu4enYhxGAZuRiFh9?message=Wikipedia Example Address"));
QVERIFY(GUIUtil::parseBitcoinURI(uri, &rv));
QVERIFY(rv.address == QString("LQDPC5rbjDB72fGFVHu4enYhxGAZuRiFh9"));
QVERIFY(rv.label == QString());
QVERIFY(GUIUtil::parseBitcoinURI("TelcoCoin://LQDPC5rbjDB72fGFVHu4enYhxGAZuRiFh9?message=Wikipedia Example Address", &rv));
QVERIFY(rv.address == QString("LQDPC5rbjDB72fGFVHu4enYhxGAZuRiFh9"));
QVERIFY(rv.label == QString());
// We currently don't implement the message parameter (ok, yea, we break spec...)
uri.setUrl(QString("TelcoCoin:LQDPC5rbjDB72fGFVHu4enYhxGAZuRiFh9?req-message=Wikipedia Example Address"));
QVERIFY(!GUIUtil::parseBitcoinURI(uri, &rv));
uri.setUrl(QString("TelcoCoin:LQDPC5rbjDB72fGFVHu4enYhxGAZuRiFh9?amount=1,000&label=Wikipedia Example"));
QVERIFY(!GUIUtil::parseBitcoinURI(uri, &rv));
uri.setUrl(QString("TelcoCoin:LQDPC5rbjDB72fGFVHu4enYhxGAZuRiFh9?amount=1,000.0&label=Wikipedia Example"));
QVERIFY(!GUIUtil::parseBitcoinURI(uri, &rv));
}
| telcocoin-project/telcocoin | src/qt/test/uritests.cpp | C++ | mit | 2,864 |
require 'engineyard-cloud-client/models/api_struct'
require 'engineyard-cloud-client/models/account'
require 'engineyard-cloud-client/models/app'
require 'engineyard-cloud-client/models/app_environment'
require 'engineyard-cloud-client/models/instance'
require 'engineyard-cloud-client/models/log'
require 'engineyard-cloud-client/models/recipes'
require 'engineyard-cloud-client/models/snapshot'
require 'engineyard-cloud-client/resolver_result'
require 'engineyard-cloud-client/errors'
module EY
class CloudClient
class Environment < ApiStruct.new(:id, :name, :framework_env,
:instances_count,
:instance_status,
:username, :app_server_stack_name,
:load_balancer_ip_address
)
# Return list of all Environments linked to all current user's accounts
def self.all(api)
self.from_array(api, api.get("/environments", "no_instances" => "true")["environments"])
end
# Return a constrained list of environments given a set of constraints like:
#
# * app_name: app name full or partial match string
# * account_name: account name full or partial match string
# * environment_name: environment name full or partial match string
# * remotes: An array of git remote URIs
#
def self.resolve(api, constraints)
clean_constraints = constraints.reject { |k,v| v.nil? }
params = {'constraints' => clean_constraints}
response = api.get("/environments/resolve", params)['resolver']
matches = from_array(api, response['matches'])
ResolverResult.new(api, matches, response['errors'], response['suggestions'])
end
# Accepts an api object, environment name and optional account name
# and returns the best matching environment for the given constraints.
#
# This is a shortcut for resolve_environments.
# Raises if nothing is found or if more than one environment is found.
def self.by_name(api, environment_name, account_name=nil)
constraints = {
:environment_name => environment_name,
:account_name => account_name,
}
resolver = resolve(api, constraints)
resolver.one_match { |match| return match }
resolver.no_matches do |errors, suggestions|
message = nil
if suggestions.any?
message = "Suggestions found:\n"
suggestions.sourt_by{|suggest| suggest['account_name']}.each do |suggest|
message << "\t#{suggest['account_name']}/#{suggest['env_name']}\n"
end
end
raise ResourceNotFound.new([errors,message].compact.join("\n").strip)
end
resolver.many_matches do |matches|
message = "Multiple environments possible, please be more specific:\n"
matches.sort_by {|env| env.account}.each do |env|
message << "\t#{env.account.name}/#{env.name}\n"
end
raise MultipleMatchesError.new(message)
end
end
# Usage
# Environment.create(api, {
# app: app, # requires: app.id
# name: 'myapp_production',
# region: 'us-west-1', # default: us-east-1
# app_server_stack_name: 'nginx_thin', # default: nginx_passenger3
# framework_env: 'staging' # default: production
# cluster_configuration: {
# configuration: 'single' # default: single, cluster, custom
# }
# })
#
# NOTE: Syntax above is for Ruby 1.9. In Ruby 1.8, keys must all be strings.
#
# TODO - allow any attribute to be sent through that the API might allow; e.g. region, ruby_version, stack_label
def self.create(api, attrs={})
app = attrs.delete("app")
cluster_configuration = attrs.delete('cluster_configuration')
raise EY::CloudClient::AttributeRequiredError.new("app", EY::CloudClient::App) unless app
raise EY::CloudClient::AttributeRequiredError.new("name") unless attrs["name"]
params = {"environment" => attrs.dup}
unpack_cluster_configuration(params, cluster_configuration)
response = api.post("/apps/#{app.id}/environments", params)
self.from_hash(api, response['environment'])
end
attr_accessor :apps, :account
def attributes=(attrs)
account_attrs = attrs.delete('account')
apps_attrs = attrs.delete('apps')
instances_attrs = attrs.delete('instances')
super
set_account account_attrs if account_attrs
set_apps apps_attrs if apps_attrs
set_instances instances_attrs if instances_attrs
end
def add_app_environment(app_env)
@app_environments ||= []
existing_app_env = @app_environments.detect { |ae| app_env.environment == ae.environment }
unless existing_app_env
@app_environments << app_env
end
existing_app_env || app_env
end
def app_environments
@app_environments ||= []
end
def apps
app_environments.map { |app_env| app_env.app }
end
def instances
@instances ||= request_instances
end
def account_name
account && account.name
end
def snapshots
@snapshots ||= request_snapshots
end
def utility_snapshots(name = nil)
snapshots.select do |snapshot|
snapshot.role == 'utility' && snapshot.name == name
end
end
def newest_utility_snapshot(name = nil)
utility_snapshots(name).first
end
def hierarchy_name
[account_name, name].join(" / ")
end
def ssh_username=(user)
self.username = user
end
def logs
Log.from_array(api, api.get("/environments/#{id}/logs")["logs"])
end
def provisioned_instances
instances.select { |inst| inst.provisioned? }
end
def deploy_to_instances
provisioned_instances.select { |inst| inst.has_app_code? }
end
def bridge
@bridge ||= instances.detect { |inst| inst.bridge? }
end
def bridge!(ignore_bad_bridge = false)
if bridge.nil?
raise NoBridgeError.new(name)
elsif !ignore_bad_bridge && !bridge.running?
raise BadBridgeStatusError.new(bridge.status, api.endpoint)
end
bridge
end
# Select instances by role, with optional name constraints.
#
# Select the "master" app instance:
# select_instances(app_master: true)
#
# Select the "master" db instance on a solo or multi-instance env:
# select_instances(solo: true, db_master: true)
#
# Select app, app_master, or utils (only if they are named resque or redis):
# select_instances(app_master: true, app: true, util: %w[resque redis])
#
# Select all instances (same as the method #instances):
# select_instances(all: true)
#
# See #instances_by_role for a simpler interface.
def select_instances(options)
instances_by_role(options.keys).select do |inst|
# get the value of the string/symbol key that matches without losing nil/false values
val = options.fetch(inst.role.to_sym) { options.fetch(inst.role.to_s, false) }
case val
when true, false then val
when inst.name then true
when nil, '' then [nil, ''].include?(inst.name)
when Array then val.include?(inst.name)
else false
end
end
end
# Simple version of select_instances that only selects roles, not names
# instances_by_role(:app_master, :app) # same
# instances_by_role(%w[app_master app]) # same
# select_instances(app_master: true, app: true) # same
#
def instances_by_role(*roles)
roles = roles.flatten.map(&:to_s)
instances.select { |inst| roles.include?(inst.role.to_s) }
end
def update
api.put("/environments/#{id}/update_instances")
true # raises on failure
end
alias rebuild update
def recipes
Recipes.new(api, self)
end
# See Recipes#run
def run_custom_recipes
recipes.run
end
# See Recipes#download
def download_recipes
recipes.download
end
# See Recipes#upload_path
def upload_recipes_at_path(recipes_path)
recipes.upload_path(recipes_path)
end
# See Recipes#upload
def upload_recipes(file_to_upload)
recipes.upload(file_to_upload)
end
def shorten_name_for(app)
name.gsub(/^#{Regexp.quote(app.name)}_/, '')
end
#
# Throws a POST request at the API to /add_instances and adds one instance
# to this environment.
#
# Usage example:
#
# api = EY::CloudClient.new(token: 'your token here')
# env = api.environment_by_name('your_env_name')
#
# env.add_instance(role: "app")
# env.add_instance(role: "util", name: "foo")
#
# Note that the role for an instance MUST be either "app" or "util".
# No other value is acceptable. The "name" parameter can be anything,
# but it only applies to utility instances.
#
# Note also that if you add a util instance, you *must* specify a
# name. This method will raise if you don't.
def add_instance(opts)
unless %w[app util].include?(opts[:role].to_s)
# Fail immediately because we don't have valid arguments.
raise InvalidInstanceRole, "Instance role must be one of: app, util"
end
# Sanitize the name to remove whitespace if there is any
if opts[:name]
name = opts[:name].gsub(/\s+/, '')
end
if opts[:role] == 'util'
unless name && name.length > 0
raise InvalidInstanceName, "When specifying a util instance you must also specify a name."
end
end
request = { "role" => opts[:role], "name" => opts[:name] }
request['snapshot_id'] = opts[:snapshot_id] if opts.key?(:snapshot_id)
request['instance_size'] = opts[:instance_size] if opts.key?(:instance_size)
# We know opts[:role] is right, name can be passed straight to the API.
# Return the response body for error output, logging, etc.
return api.post("/environments/#{id}/add_instances", :request => request)
end
#
# Gets an instance's Amazon ID by its "id" attribute as reported
# by AWSM. When an instance is added via the API, the JSON that's
# returned contains an "id" attribute for that instance. Developers
# may save that ID so they can later discover an instance's Amazon ID.
# This is because, when an instance object is first *created* (see
# #add_instance above), its Amazon ID isn't yet known. The object is
# created, and *then* later provisioned, so you can't get an Amazon
# ID until after provisioning has taken place. This method allows you
# to send an ID to it, and then returns the instance object that
# corresponds to that ID, which will have an Amazon ID with it if the
# instance has been provisioned at the time the environment information
# was read.
#
# Note that the ID passed in must be an integer.
#
# Usage example:
#
# api = EY::CloudClient.new(token: 'token')
# env = api.environment_by_name('my_env')
# env.instance_by_id(12345)
# => <EY::CloudClient::Instance ...>
def instance_by_id(id)
instances.detect { |x| x.id == id } # ID should always be unique
end
#
# Sends a request to the API to remove the instance specified by
# its "provisioned_id" (Amazon ID).
#
# Usage example:
#
# api = EY::CloudClient.new(token: 'token')
# env = api.environment_by_name('my_app_production')
# bad_instance = env.instance_by_id(12345) # instance ID should be saved upon creation
# env.remove_instance(bad_instance)
#
# Warnings/caveats:
#
# + The API is responsible for actually removing this instance. All this
# does is send an appropriate request to the API.
# + You should look carefully at the API response JSON to see whether or
# not the API accepted or rejected your request. If it accepted the
# request, that instance *should* be removed as soon as possible.
# + Note that this is a client that talks to an API, which talks to an
# API, which talks to an API. Ultimately the IaaS provider API has the
# final say on whether or not to remove an instance, so a failure there
# can definitely affect how things work at every point down the line.
# + If the instance you pass in doesn't exist in the live cloud
# environment you're working on, the status should be rejected and thus
# the instance won't be removed (because *that* instance isn't there).
# This is important to keep in mind for scheduled/auto scaling; if
# for some reason the automatically added instance is removed before
# a "scale down" event that you might trigger, you may wind up with an
# unknown/unexpected number of instances in your environment.
# + Only works for app/util instances. Raises an error if you pass one
# that isn't valid.
def remove_instance(instance)
unless instance
raise ArgumentError, "A argument of type Instance was expected. Got #{instance.inspect}"
end
# Check to make sure that we have a valid instance role here first.
unless %w[app util].include?(instance.role)
raise InvalidInstanceRole, "Removing instances is only supported for app, util instances"
end
# Check to be sure that instance is actually provisioned
# TODO: Rip out the amazon_id stuff when we have IaaS agnosticism nailed down
unless instance.amazon_id && instance.provisioned?
raise InstanceNotProvisioned, "Instance is not provisioned or is in unusual state."
end
response = api.post("/environments/#{id}/remove_instances", :request => {
:provisioned_id => instance.amazon_id,
:role => instance.role,
:name => instance.name
})
# Reset instances so they are fresh if they are requested again.
@instances = nil
# Return the response.
return response
end
protected
def set_account(account_attrs)
@account = Account.from_hash(api, account_attrs)
@account.add_environment(self)
@account
end
# Creating an AppEnvironment will come back and call add_app_environment
# (above) to associate this model with the AppEnvironment. (that's why we
# don't save anything here.)
def set_apps(apps_attrs)
(apps_attrs || []).each do |app|
AppEnvironment.from_hash(api, {'app' => app, 'environment' => self})
end
end
def set_instances(instances_attrs)
@instances = load_instances(instances_attrs)
end
def request_instances
if instances_count.zero?
[]
else
instances_attrs = api.get("/environments/#{id}/instances")["instances"]
load_instances(instances_attrs)
end
end
def load_instances(instances_attrs)
Instance.from_array(api, instances_attrs, 'environment' => self).sort
end
def request_snapshots
Snapshot.all(api, self)
end
def sort_attributes
[sort_string(account_name), sort_string(name)]
end
# attrs["cluster_configuration"]["cluster"] can be 'single', 'cluster', or 'custom'
# attrs["cluster_configuration"]["ip"] can be
# * 'host' (amazon public hostname)
# * 'new' (Elastic IP assigned, default)
# * or an IP id
# if 'custom' cluster, then...
def self.unpack_cluster_configuration(attrs, configuration)
if configuration
attrs["cluster_configuration"] = configuration
attrs["cluster_configuration"]["configuration"] ||= 'single'
attrs["cluster_configuration"]["ip_id"] = configuration.delete("ip") || 'new' # amazon public hostname; alternate is 'new' for Elastic IP
# if cluster_type == 'custom'
# attrs['cluster_configuration'][app_server_count] = options[:app_instances] || 2
# attrs['cluster_configuration'][db_slave_count] = options[:db_instances] || 0
# attrs['cluster_configuration'][instance_size] = options[:app_size] if options[:app_size]
# attrs['cluster_configuration'][db_instance_size] = options[:db_size] if options[:db_size]
# end
# at
end
end
end
end
end
| jimneath/engineyard-cloud-client | lib/engineyard-cloud-client/models/environment.rb | Ruby | mit | 17,247 |
package at.dotpoint.gradle.cross.variant.resolver.buildtype;
import at.dotpoint.gradle.cross.variant.model.buildtype.IBuildType;
import at.dotpoint.gradle.cross.variant.requirement.buildtype.IBuildTypeRequirement;
import at.dotpoint.gradle.cross.variant.resolver.VariantResolver;
import org.gradle.api.ExtensiblePolymorphicDomainObjectContainer;
public class BuildTypeResolver extends VariantResolver<IBuildType, IBuildTypeRequirement>
implements IBuildTypeResolver
{
public BuildTypeResolver( ExtensiblePolymorphicDomainObjectContainer<IBuildType> variantContainer ) {
super(variantContainer);
}
@Override
public Class<IBuildType> getVariantType() {
return IBuildType.class;
}
@Override
public Class<IBuildTypeRequirement> getRequirementType() {
return IBuildTypeRequirement.class;
}
} | ScrambledRK/gradle-haxe-plugin | src/main/java/at/dotpoint/gradle/cross/variant/resolver/buildtype/BuildTypeResolver.java | Java | mit | 808 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Infrastructure.Model;
namespace Infrastructure.Data
{
public interface IUnitOfWorkRepository
{
void PersistAdd(Object entity);
void PersistDelete(Object entity);
void PersistUpdate(Object entity);
}
}
| tavisca-zirfan/FriendsWeb | Friends/Infrastructure/Data/IUnitOfWorkRepo.cs | C# | mit | 348 |
// Copyright 2014 LastLeaf, LICENSE: github.lastleaf.me/MIT
'use strict';
var model = fw.module('db_model');
var COLLECTION_NAME = 'stats.referer';
var MODEL_NAME = 'StatReferer';
module.exports = function(app, cb){
// define schema
var Schema = app.db.Schema;
var schemaObj = {
referer: { type: String },
refSite: { type: String },
path: { type: String },
time: { type: Number },
sid: { type: String },
ip: { type: String }
};
var schema = new Schema(schemaObj, {autoIndex: false});
schema.index({ time: -1 });
schema.index({ referer: 1, time: -1 });
schema.index({ refSite: 1, time: -1 });
schema.index({ sid: 1, time: -1 });
// create model
var col = app.db.model(app.config.db.prefix + COLLECTION_NAME, schema);
model[MODEL_NAME] = col;
col.ensureIndexes(function(){
cb();
});
};
| LastLeaf/LightPalette | core/module_db/stat_referer.js | JavaScript | mit | 816 |
Static::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# Code is not reloaded between requests
config.cache_classes = true
# Full error reports are disabled and caching is turned on
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
# Disable Rails's static asset server (Apache or nginx will already do this)
config.serve_static_assets = false
# Compress JavaScripts and CSS
config.assets.compress = true
# Don't fallback to assets pipeline if a precompiled asset is missed
config.assets.compile = false
# Generate digests for assets URLs
config.assets.digest = true
# Defaults to Rails.root.join("public/assets")
# config.assets.manifest = YOUR_PATH
# Specifies the header that your server uses for sending files
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# config.force_ssl = true
# See everything in the log (default is :info)
# config.log_level = :debug
# Use a different logger for distributed setups
# config.logger = SyslogLogger.new
# Use a different cache store in production
# config.cache_store = :mem_cache_store
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
# config.assets.precompile += %w( ie.js libs/jquery/jquery-1.11.3.min.js high-contrast.css dyslexic.css admin.css libs/jquery/jquery-ui-1.8.16.custom.min.js libs/jquery/plugins/jquery.mustache.js )
# Disable delivery errors, bad email addresses will be ignored
# config.action_mailer.raise_delivery_errors = false
config.action_mailer.delivery_method = :ses
# Enable threaded mode
# config.threadsafe!
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation can not be found)
config.i18n.fallbacks = true
# Send deprecation notices to registered listeners
config.active_support.deprecation = :notify
config.action_controller.asset_host = ENV['GOVUK_ASSET_HOST']
# Enable JSON-style logging
config.logstasher.enabled = true
config.logstasher.logger = Logger.new("#{Rails.root}/log/#{Rails.env}.json.log")
config.logstasher.supress_app_log = true
end
| tadast/static | config/environments/production.rb | Ruby | mit | 2,458 |
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// THIS CODE IS GENERATED - DO NOT MODIFY
// See angular/tools/gulp-tasks/cldr/extract.js
function plural(n: number): number {
if (n === 0) return 0;
if (n === 1) return 1;
return 5;
}
export default [
'ksh', [['v.M.', 'n.M.'], , ['Uhr vörmiddaachs', 'Uhr nommendaachs']],
[['v.M.', 'n.M.'], , ['Vörmeddaach', 'Nommendaach']],
[
['S', 'M', 'D', 'M', 'D', 'F', 'S'], ['Su.', 'Mo.', 'Di.', 'Me.', 'Du.', 'Fr.', 'Sa.'],
['Sunndaach', 'Mohndaach', 'Dinnsdaach', 'Metwoch', 'Dunnersdaach', 'Friidaach', 'Samsdaach'],
['Su', 'Mo', 'Di', 'Me', 'Du', 'Fr', 'Sa']
],
,
[
['J', 'F', 'M', 'A', 'M', 'J', 'J', 'O', 'S', 'O', 'N', 'D'],
['Jan', 'Fäb', 'Mäz', 'Apr', 'Mai', 'Jun', 'Jul', 'Ouj', 'Säp', 'Okt', 'Nov', 'Dez'],
[
'Jannewa', 'Fäbrowa', 'Määz', 'Aprell', 'Mai', 'Juuni', 'Juuli', 'Oujoß', 'Septämber',
'Oktohber', 'Novämber', 'Dezämber'
]
],
[
['J', 'F', 'M', 'A', 'M', 'J', 'J', 'O', 'S', 'O', 'N', 'D'],
[
'Jan.', 'Fäb.', 'Mäz.', 'Apr.', 'Mai', 'Jun.', 'Jul.', 'Ouj.', 'Säp.', 'Okt.', 'Nov.',
'Dez.'
],
[
'Jannewa', 'Fäbrowa', 'Määz', 'Aprell', 'Mai', 'Juuni', 'Juuli', 'Oujoß', 'Septämber',
'Oktohber', 'Novämber', 'Dezämber'
]
],
[['vC', 'nC'], ['v. Chr.', 'n. Chr.'], ['vür Krestos', 'noh Krestos']], 1, [6, 0],
['d. M. y', 'd. MMM. y', 'd. MMMM y', 'EEEE, \'dä\' d. MMMM y'],
['HH:mm', 'HH:mm:ss', 'HH:mm:ss z', 'HH:mm:ss zzzz'],
[
'{1} {0}',
,
,
],
[',', ' ', ';', '%', '+', '−', '×10^', '×', '‰', '∞', '¤¤¤', ':'],
['#,##0.###', '#,##0 %', '#,##0.00 ¤', '#E0'], '€', 'Euro', plural
];
| vsavkin/angular | packages/common/locales/ksh.ts | TypeScript | mit | 1,871 |
<html>
<head>
<title>Upload Form</title>
</head>
<body>
<?php echo $error;?>
<?php echo form_open_multipart('photo/do_upload');?>
<input type="file" name="userfile" size="20" />
<br /><br />
<input type="submit" value="upload" />
</form>
</body>
</html> | rosemarytran/usthb3_webAppDev | application/views/photo/upload_form.php | PHP | mit | 344 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="ja">
<head>
<!-- Generated by javadoc (1.8.0_45) on Wed Aug 26 19:24:14 JST 2015 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>クラス item.drink.energydrink.RedBullの使用</title>
<meta name="date" content="2015-08-26">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="\u30AF\u30E9\u30B9 item.drink.energydrink.RedBull\u306E\u4F7F\u7528";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>ブラウザのJavaScriptが無効になっています。</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="ナビゲーション・リンクをスキップ">ナビゲーション・リンクをスキップ</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="ナビゲーション">
<li><a href="../../../../overview-summary.html">概要</a></li>
<li><a href="../package-summary.html">パッケージ</a></li>
<li><a href="../../../../item/drink/energydrink/RedBull.html" title="item.drink.energydrink内のクラス">クラス</a></li>
<li class="navBarCell1Rev">使用</li>
<li><a href="../package-tree.html">階層ツリー</a></li>
<li><a href="../../../../deprecated-list.html">非推奨</a></li>
<li><a href="../../../../index-files/index-1.html">索引</a></li>
<li><a href="../../../../help-doc.html">ヘルプ</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>前</li>
<li>次</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?item/drink/energydrink/class-use/RedBull.html" target="_top">フレーム</a></li>
<li><a href="RedBull.html" target="_top">フレームなし</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">すべてのクラス</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h2 title="クラスの使用 item.drink.energydrink.RedBull" class="title">クラスの使用<br>item.drink.energydrink.RedBull</h2>
</div>
<div class="classUseContainer">item.drink.energydrink.RedBullはどこからも使用されていません</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="ナビゲーション・リンクをスキップ">ナビゲーション・リンクをスキップ</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="ナビゲーション">
<li><a href="../../../../overview-summary.html">概要</a></li>
<li><a href="../package-summary.html">パッケージ</a></li>
<li><a href="../../../../item/drink/energydrink/RedBull.html" title="item.drink.energydrink内のクラス">クラス</a></li>
<li class="navBarCell1Rev">使用</li>
<li><a href="../package-tree.html">階層ツリー</a></li>
<li><a href="../../../../deprecated-list.html">非推奨</a></li>
<li><a href="../../../../index-files/index-1.html">索引</a></li>
<li><a href="../../../../help-doc.html">ヘルプ</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>前</li>
<li>次</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?item/drink/energydrink/class-use/RedBull.html" target="_top">フレーム</a></li>
<li><a href="RedBull.html" target="_top">フレームなし</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">すべてのクラス</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>
| NONONOexe/VendingMachine | doc/item/drink/energydrink/class-use/RedBull.html | HTML | mit | 4,646 |
using System.Collections.Generic;
using System.IO;
namespace SharpCompress.Common.Rar
{
internal sealed class RarCryptoBinaryReader : RarCrcBinaryReader
{
private RarRijndael _rijndael;
private byte[] _salt;
private readonly string _password;
private readonly Queue<byte> _data = new Queue<byte>();
private long _readCount;
public RarCryptoBinaryReader(Stream stream, string password)
: base(stream)
{
_password = password;
// coderb: not sure why this was being done at this logical point
//SkipQueue();
byte[] salt = ReadBytes(8);
_salt = salt;
_rijndael = RarRijndael.InitializeFrom(_password, salt);
}
// track read count ourselves rather than using the underlying stream since we buffer
public override long CurrentReadByteCount
{
get => _readCount;
protected set
{
// ignore
}
}
public override void Mark()
{
_readCount = 0;
}
private bool UseEncryption => _salt != null;
public override byte ReadByte()
{
if (UseEncryption)
{
return ReadAndDecryptBytes(1)[0];
}
_readCount++;
return base.ReadByte();
}
public override byte[] ReadBytes(int count)
{
if (UseEncryption)
{
return ReadAndDecryptBytes(count);
}
_readCount += count;
return base.ReadBytes(count);
}
private byte[] ReadAndDecryptBytes(int count)
{
int queueSize = _data.Count;
int sizeToRead = count - queueSize;
if (sizeToRead > 0)
{
int alignedSize = sizeToRead + ((~sizeToRead + 1) & 0xf);
for (int i = 0; i < alignedSize / 16; i++)
{
//long ax = System.currentTimeMillis();
byte[] cipherText = ReadBytesNoCrc(16);
var readBytes = _rijndael.ProcessBlock(cipherText);
foreach (var readByte in readBytes)
{
_data.Enqueue(readByte);
}
}
}
var decryptedBytes = new byte[count];
for (int i = 0; i < count; i++)
{
var b = _data.Dequeue();
decryptedBytes[i] = b;
UpdateCrc(b);
}
_readCount += count;
return decryptedBytes;
}
public void ClearQueue()
{
_data.Clear();
}
public void SkipQueue()
{
var position = BaseStream.Position;
BaseStream.Position = position + _data.Count;
ClearQueue();
}
}
} | adamhathcock/sharpcompress | src/SharpCompress/Common/Rar/RarCryptoBinaryReader.cs | C# | mit | 2,987 |
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file license.txt or http://www.opensource.org/licenses/mit-license.php.
#include "qtipcserver.h"
#include "guiconstants.h"
#include "ui_interface.h"
#include "util.h"
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/interprocess/ipc/message_queue.hpp>
#include <boost/version.hpp>
#if defined(WIN32) && (!defined(BOOST_INTERPROCESS_HAS_WINDOWS_KERNEL_BOOTTIME) || !defined(BOOST_INTERPROCESS_HAS_KERNEL_BOOTTIME) || BOOST_VERSION < 104900)
#warning Compiling without BOOST_INTERPROCESS_HAS_WINDOWS_KERNEL_BOOTTIME and BOOST_INTERPROCESS_HAS_KERNEL_BOOTTIME uncommented in boost/interprocess/detail/tmp_dir_helpers.hpp or using a boost version before 1.49 may have unintended results see svn.boost.org/trac/boost/ticket/5392
#endif
using namespace boost;
using namespace boost::interprocess;
using namespace boost::posix_time;
static void ipcThread2(void* pArg);
#ifdef MAC_OSX
// URI handling not implemented on OSX yet
void ipcInit() { }
#else
static void ipcThread(void* pArg)
{
IMPLEMENT_RANDOMIZE_STACK(ipcThread(pArg));
// Make this thread recognisable as the GUI-IPC thread
RenameThread("bitcoin-gui-ipc");
try
{
ipcThread2(pArg);
}
catch (std::exception& e) {
PrintExceptionContinue(&e, "ipcThread()");
} catch (...) {
PrintExceptionContinue(NULL, "ipcThread()");
}
printf("ipcThread exited\n");
}
static void ipcThread2(void* pArg)
{
printf("ipcThread started\n");
message_queue* mq = (message_queue*)pArg;
char buffer[MAX_URI_LENGTH + 1] = "";
size_t nSize = 0;
unsigned int nPriority = 0;
loop
{
ptime d = boost::posix_time::microsec_clock::universal_time() + millisec(100);
if (mq->timed_receive(&buffer, sizeof(buffer), nSize, nPriority, d))
{
uiInterface.ThreadSafeHandleURI(std::string(buffer, nSize));
Sleep(1000);
}
if (fShutdown)
break;
}
// Remove message queue
message_queue::remove(BITCOINURI_QUEUE_NAME);
// Cleanup allocated memory
delete mq;
}
void ipcInit()
{
message_queue* mq = NULL;
char buffer[MAX_URI_LENGTH + 1] = "";
size_t nSize = 0;
unsigned int nPriority = 0;
try {
mq = new message_queue(open_or_create, BITCOINURI_QUEUE_NAME, 2, MAX_URI_LENGTH);
// Make sure we don't lose any herkcoin: URIs
for (int i = 0; i < 2; i++)
{
ptime d = boost::posix_time::microsec_clock::universal_time() + millisec(1);
if (mq->timed_receive(&buffer, sizeof(buffer), nSize, nPriority, d))
{
uiInterface.ThreadSafeHandleURI(std::string(buffer, nSize));
}
else
break;
}
// Make sure only one instance is listening
message_queue::remove(BITCOINURI_QUEUE_NAME);
delete mq;
mq = new message_queue(open_or_create, BITCOINURI_QUEUE_NAME, 2, MAX_URI_LENGTH);
}
catch (interprocess_exception &ex) {
printf("ipcInit() - boost interprocess exception #%d: %s\n", ex.get_error_code(), ex.what());
return;
}
if (!CreateThread(ipcThread, mq))
{
delete mq;
return;
}
}
#endif
| HerkCoin/herkcoin | src/qt/qtipcserver.cpp | C++ | mit | 3,373 |
'use strict';
define('ace/snippets/groovy', ['require', 'exports', 'module'], function (require, exports, module) {
exports.snippetText = "";
exports.scope = "groovy";
}); | IonicaBizau/test-youtube-api | public/ace/snippets/groovy.js | JavaScript | mit | 177 |
package com.method.hashhacks_android.activities;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;
import android.widget.Toast;
import com.method.hashhacks_android.FontsOverride;
import com.method.hashhacks_android.R;
import com.method.hashhacks_android.api.BorrowerApi;
import java.util.ArrayList;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
public class ProfileActivity extends AppCompatActivity {
public static final String TAG = "jsd";
TextView tvFiveRisk, tvFiveInterest, tvTenRisk, tvTenInterest, tvTwentyRisk, tvTwentyInterest, tvGreaterRisk, tvGreaterInterest;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_profile);
FontsOverride.applyFontForToolbarTitle(this, FontsOverride.FONT_PROXIMA_NOVA, getWindow());
findViews();
getResults();
}
private void getResults() {
String url = getResources().getString(R.string.url);
Retrofit retrofit = new Retrofit.Builder().addConverterFactory(GsonConverterFactory.create()).baseUrl(url).build();
BorrowerApi borrowerApi = retrofit.create(BorrowerApi.class);
borrowerApi.getProfile(getSharedPreferences(LoginActivity.SHARED_PREFS_NAME, MODE_PRIVATE).getString("mobile", "123")).enqueue(new Callback<ArrayList<BorrowerApi.ProfileResult>>() {
@Override
public void onResponse(Call<ArrayList<BorrowerApi.ProfileResult>> call, Response<ArrayList<BorrowerApi.ProfileResult>> response) {
if (response.body() != null) {
ArrayList<BorrowerApi.ProfileResult> results = response.body();
Log.d(TAG, "onResponse: " + "api success");
setViews(results);
} else {
Toast.makeText(ProfileActivity.this, "Server error", Toast.LENGTH_SHORT).show();
}
}
@Override
public void onFailure(Call<ArrayList<BorrowerApi.ProfileResult>> call, Throwable t) {
Log.d(TAG, "onFailure: " + t.getMessage());
}
});
}
private void setViews(ArrayList<BorrowerApi.ProfileResult> results) {
tvFiveRisk.setText(results.get(0).getRiskCategory()+ "%");
tvFiveInterest.setText(results.get(0).getInterest());
tvTenRisk.setText(results.get(1).getRiskCategory()+ "%");
tvTenInterest.setText(results.get(1).getInterest());
tvTwentyRisk.setText(results.get(2).getRiskCategory()+ "%");
tvTwentyInterest.setText(results.get(2).getInterest());
tvGreaterRisk.setText(results.get(3).getRiskCategory()+ "%");
tvGreaterInterest.setText(results.get(3).getInterest());
}
private void findViews() {
tvFiveRisk = (TextView) findViewById(R.id.tv_profile_five_risk);
tvFiveInterest = (TextView) findViewById(R.id.tv_profile_five_interest);
tvTenRisk = (TextView) findViewById(R.id.tv_profile_ten_risk);
tvTenInterest = (TextView) findViewById(R.id.tv_profile_ten_interest);
tvTwentyRisk = (TextView) findViewById(R.id.tv_profile_twenty_risk);
tvTwentyInterest = (TextView) findViewById(R.id.tv_profile_twenty_interest);
tvGreaterRisk = (TextView) findViewById(R.id.tv_profile_greater_risk);
tvGreaterInterest = (TextView) findViewById(R.id.tv_profile_greater_interest);
}
}
| shuttlesworthNEO/HashHacks2.0-methOD | HashHacks-Android/app/src/main/java/com/method/hashhacks_android/activities/ProfileActivity.java | Java | mit | 3,625 |
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
namespace HUDSample
{
/// <summary>
/// App.xaml 的交互逻辑
/// </summary>
public partial class App : Application
{
}
}
| fengdingfeilong/HUD | HUDSample/App.xaml.cs | C# | mit | 336 |
var gulp = require("gulp");
var sass = require("gulp-sass");
gulp.task("styles", function() {
gulp.src("sass/**/*.scss")
.pipe(sass({outputStyle: "compressed"}).on("error", sass.logError))
.pipe(gulp.dest("./css/"));
});
gulp.task("default", function() {
gulp.watch("sass/**/*.scss", ["styles"]);
});
| DanFoad/typo | gulpfile.js | JavaScript | mit | 327 |
(function(){
'use strict';
function listProps(obj){
var props[];
props = Object.keys(obj);
}
}
})(); | dcorns/AlongTheWayII | listProps.js | JavaScript | mit | 116 |
namespace TGC.Tools.Forms
{
partial class TgcMeshBrowser
{
/// <summary>
/// Variable del diseñador requerida.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Limpiar los recursos que se estén utilizando.
/// </summary>
/// <param name="disposing">true si los recursos administrados se deben eliminar; false en caso contrario, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Código generado por el Diseñador de Windows Forms
/// <summary>
/// Método necesario para admitir el Diseñador. No se puede modificar
/// el contenido del método con el editor de código.
/// </summary>
private void InitializeComponent()
{
this.panelItems = new System.Windows.Forms.FlowLayoutPanel();
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.toolStripButtonUp = new System.Windows.Forms.ToolStripButton();
this.toolStripButtonHome = new System.Windows.Forms.ToolStripButton();
this.toolStripTextBoxPath = new System.Windows.Forms.ToolStripTextBox();
this.toolStripButtonBrowse = new System.Windows.Forms.ToolStripButton();
this.toolStrip1.SuspendLayout();
this.SuspendLayout();
//
// panelItems
//
this.panelItems.AutoScroll = true;
this.panelItems.BackColor = System.Drawing.SystemColors.ActiveCaptionText;
this.panelItems.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelItems.Location = new System.Drawing.Point(5, 5);
this.panelItems.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.panelItems.Name = "panelItems";
this.panelItems.Size = new System.Drawing.Size(1373, 861);
this.panelItems.TabIndex = 3;
//
// toolStrip1
//
this.toolStrip1.ImageScalingSize = new System.Drawing.Size(24, 24);
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripButtonUp,
this.toolStripButtonHome,
this.toolStripTextBoxPath,
this.toolStripButtonBrowse});
this.toolStrip1.Location = new System.Drawing.Point(5, 5);
this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(1373, 39);
this.toolStrip1.TabIndex = 4;
this.toolStrip1.Text = "toolStrip1";
//
// toolStripButtonUp
//
this.toolStripButtonUp.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButtonUp.Image = global::TGC.Tools.Properties.Resources.go_up;
this.toolStripButtonUp.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
this.toolStripButtonUp.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButtonUp.Name = "toolStripButtonUp";
this.toolStripButtonUp.Size = new System.Drawing.Size(36, 36);
this.toolStripButtonUp.Text = "toolStripButton1";
this.toolStripButtonUp.Click += new System.EventHandler(this.toolStripButtonUp_Click);
//
// toolStripButtonHome
//
this.toolStripButtonHome.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButtonHome.Image = global::TGC.Tools.Properties.Resources.go_home;
this.toolStripButtonHome.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
this.toolStripButtonHome.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButtonHome.Name = "toolStripButtonHome";
this.toolStripButtonHome.Size = new System.Drawing.Size(36, 36);
this.toolStripButtonHome.Text = "toolStripButton2";
this.toolStripButtonHome.Click += new System.EventHandler(this.toolStripButtonHome_Click);
//
// toolStripTextBoxPath
//
this.toolStripTextBoxPath.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.toolStripTextBoxPath.Name = "toolStripTextBoxPath";
this.toolStripTextBoxPath.Size = new System.Drawing.Size(600, 39);
//
// toolStripButtonBrowse
//
this.toolStripButtonBrowse.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButtonBrowse.Image = global::TGC.Tools.Properties.Resources.folder1;
this.toolStripButtonBrowse.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
this.toolStripButtonBrowse.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButtonBrowse.Name = "toolStripButtonBrowse";
this.toolStripButtonBrowse.Size = new System.Drawing.Size(36, 36);
this.toolStripButtonBrowse.Text = "toolStripButton3";
this.toolStripButtonBrowse.Click += new System.EventHandler(this.toolStripButtonBrowse_Click);
//
// TgcMeshBrowser
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1383, 871);
this.Controls.Add(this.toolStrip1);
this.Controls.Add(this.panelItems);
this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.MinimumSize = new System.Drawing.Size(800, 600);
this.Name = "TgcMeshBrowser";
this.Padding = new System.Windows.Forms.Padding(5);
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Mesh Browser";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.TgcMeshBrowser_FormClosed);
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.FlowLayoutPanel panelItems;
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.ToolStripButton toolStripButtonUp;
private System.Windows.Forms.ToolStripButton toolStripButtonHome;
private System.Windows.Forms.ToolStripTextBox toolStripTextBoxPath;
private System.Windows.Forms.ToolStripButton toolStripButtonBrowse;
}
} | tgc-utn/tgc-tools | TGC.Tools/Forms/TgcMeshBrowser.Designer.cs | C# | mit | 7,063 |
'use strict';
var Q = require('q');
var Calculator = require('../Calculator');
var defaults = require('../lib/defaults');
describe('Calculator', function() {
var calculator;
function fakeDeferred() {
return Q.defer().promise;
}
beforeEach(function() {
calculator = new Calculator({
publicKey: 'some key'
});
});
it('should have DestinationError', function() {
expect(Calculator.DestinationError).toBeDefined();
expect(new Calculator.DestinationError() instanceof Error).toBeTruthy();
});
it('should have PackagesError', function() {
expect(Calculator.PackagesError).toBeDefined();
expect(new Calculator.PackagesError() instanceof Error).toBeTruthy();
});
it('should use default settings', function() {
expect(calculator.settings.apiUrl).toBe(defaults.apiUrl);
expect(calculator.settings.version).toBe(defaults.version);
});
it('settings may be redefined', function() {
var calc2 = new Calculator({
apiUrl: 'http://some.url/',
version: 2
});
expect(calc2.settings.apiUrl).toBe('http://some.url/');
expect(calc2.settings.version).toBe(2);
});
describe('`calc` method', function() {
var packages = [
{
weight: 2.7,
length: 20,
width: 30,
height: 10
}
];
function updatePackages(packages, prop, value) {
var packs = [];
packages.forEach(function(p) {
var np = {};
for (var pr in p) {
if (p.hasOwnProperty(pr)) {
np[pr] = (pr === prop) ? value : p[pr];
}
}
packs.push(np);
});
return packs;
}
var dest = 'some destination';
it('should validate destination', function() {
var badDestinations = [ null, 123, [], {}, 'ab', 'a', '' ];
badDestinations.forEach(function(dest) {
expect(function() {
calculator.calc(dest, packages);
}).toThrowError(Calculator.DestinationError);
});
});
it('should validate packages as array', function() {
var badPackages = [ null, 123, {}, 'some' ];
badPackages.forEach(function(pack) {
expect(function() {
calculator.calc(dest, pack)
}).toThrowError(Calculator.PackagesError);
});
});
it('should not validate empty array packages', function() {
expect(function() {
calculator.calc(dest, [])
}).toThrowError(Calculator.PackagesError);
});
it('should not validate package with bad values', function() {
var subs = [
['weight', 0], ['weight', 'a'], ['weight', null], ['weight', {}], ['weight', []],
['length', 0], ['length', 'a'], ['length', null], ['length', {}], ['length', []],
['width', 0], ['width', 'a'], ['width', null], ['width', {}], ['width', []],
['height', 0], ['height', 'a'], ['height', null], ['height', {}], ['height', []]
];
subs.forEach(function(sub) {
expect(function() {
calculator.calc(dest, updatePackages(packages, sub[0], sub[1]));
}).toThrowError(Calculator.PackagesError);
});
});
it('should make deferred request to `price` endpoint and returns promise', function() {
spyOn(calculator.requests, 'deferred').and.callThrough();
var promise = calculator.calc(dest, packages);
expect(calculator.requests.deferred).toHaveBeenCalledWith('price', {
destination: dest,
packages: packages,
total_cost: 0
});
expect(Q.isPromise(promise)).toBeTruthy();
});
it('should accept `totalCost` as third argument as float', function() {
spyOn(calculator.requests, 'deferred').and.callFake(fakeDeferred);
var promise = calculator.calc(dest, packages, 234.5);
expect(calculator.requests.deferred).toHaveBeenCalledWith('price', {
destination: dest,
packages: packages,
total_cost: 234.5
});
expect(Q.isPromise(promise)).toBeTruthy();
});
});
describe('`calcOrderId` method', function() {
it('should make deferred request to `price` endpoint and returns promise', function() {
spyOn(calculator.requests, 'deferred').and.callFake(fakeDeferred);
var promise = calculator.calcOrderId('999-000-000-001');
expect(calculator.requests.deferred).toHaveBeenCalledWith('price', {
'order_id': '999-000-000-001'
});
expect(Q.isPromise(promise)).toBeTruthy();
});
});
});
| dinvio/dinvio-js-sdk | test/calculator.test.js | JavaScript | mit | 5,098 |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<title>בראשית 43 (WLC)</title>
<link href="../../../build/mobile.css" rel="stylesheet" />
<script src="../../../build/mobile.js"></script>
</head>
<body dir="rtl" class="section-document">
<div class="header"><div class="nav">
<a class="name" href="GN.html">Westminster Leningrad Codex</a><a class="location" href="GN.html">בראשית 43</a><a class="prev" href="GN42.html"><</a>
<a class="home" href="index.html">=</a>
<a class="next" href="GN44.html">></a>
</div></div>
<div class="section chapter GN GN43 heb_wlc heb " dir="rtl" lang="he" data-id="GN43" data-nextid="GN44" data-previd="GN42">
<div class="c">43</div>
<div class="p">
<span class="v-num v-1">1</span><span class="v GN43_1" data-id="GN43_1">
<l s="H7458">וְהָרָעָ֖ב</l>
<l s="H3515">כָּבֵ֥ד</l>
<l s="H776">בָּאָֽרֶץ</l>׃
</span>
<span class="v-num v-2">2</span><span class="v GN43_2" data-id="GN43_2">
<l s="H1961">וַיְהִ֗י</l>
<l s="H834">כַּאֲשֶׁ֤ר</l>
<l s="H3615">כִּלּוּ֙</l>
<l s="H398">לֶאֱכֹ֣ל</l>
<l s="H853">אֶת</l>־<l s="H7668">הַשֶּׁ֔בֶר</l>
<l s="H834">אֲשֶׁ֥ר</l>
<l s="H935">הֵבִ֖יאוּ</l>
<l s="H4714">מִמִּצְרָ֑יִם</l>
<l s="H559">וַיֹּ֤אמֶר</l>
<l s="H413">אֲלֵיהֶם֙</l>
<l s="H1">אֲבִיהֶ֔ם</l>
<l s="H7725">שֻׁ֖בוּ</l>
<l s="H7666">שִׁבְרוּ</l>־<l s="H">לָ֥נוּ</l>
<l s="H4592">מְעַט</l>־<l s="H400">אֹֽכֶל</l>׃
</span>
<span class="v-num v-3">3</span><span class="v GN43_3" data-id="GN43_3">
<l s="H559">וַיֹּ֧אמֶר</l>
<l s="H413">אֵלָ֛יו</l>
<l s="H3063">יְהוּדָ֖ה</l>
<l s="H559">לֵאמֹ֑ר</l>
<l s="H5749">הָעֵ֣ד</l>
<l s="H5749">הֵעִד֩</l>
<l s="H">בָּ֨נוּ</l>
<l s="H376">הָאִ֤ישׁ</l>
<l s="H559">לֵאמֹר֙</l>
<l s="H3808">לֹֽא</l>־<l s="H7200">תִרְא֣וּ</l>
<l s="H6440">פָנַ֔י</l>
<l s="H1115">בִּלְתִּ֖י</l>
<l s="H251">אֲחִיכֶ֥ם</l>
<l s="H854">אִתְּכֶֽם</l>׃
</span>
<span class="v-num v-4">4</span><span class="v GN43_4" data-id="GN43_4">
<l s="H518">אִם</l>־<l s="H3426">יֶשְׁךָ֛</l>
<l s="H7971">מְשַׁלֵּ֥חַ</l>
<l s="H853">אֶת</l>־<l s="H251">אָחִ֖ינוּ</l>
<l s="H854">אִתָּ֑נוּ</l>
<l s="H3381">נֵרְדָ֕ה</l>
<l s="H7666">וְנִשְׁבְּרָ֥ה</l>
<l s="H">לְךָ֖</l>
<l s="H400">אֹֽכֶל</l>׃
</span>
<span class="v-num v-5">5</span><span class="v GN43_5" data-id="GN43_5">
<l s="H518">וְאִם</l>־<l s="H369">אֵינְךָ֥</l>
<l s="H7971">מְשַׁלֵּ֖חַ</l>
<l s="H3808">לֹ֣א</l>
<l s="H3381">נֵרֵ֑ד</l>
<l s="H3588">כִּֽי</l>־<l s="H376">הָאִ֞ישׁ</l>
<l s="H559">אָמַ֤ר</l>
<l s="H413">אֵלֵ֙ינוּ֙</l>
<l s="H3808">לֹֽא</l>־<l s="H7200">תִרְא֣וּ</l>
<l s="H6440">פָנַ֔י</l>
<l s="H1115">בִּלְתִּ֖י</l>
<l s="H251">אֲחִיכֶ֥ם</l>
<l s="H854">אִתְּכֶֽם</l>׃
</span>
<span class="v-num v-6">6</span><span class="v GN43_6" data-id="GN43_6">
<l s="H559">וַיֹּ֙אמֶר֙</l>
<l s="H3478">יִשְׂרָאֵ֔ל</l>
<l s="H4100">לָמָ֥ה</l>
<l s="H7489">הֲרֵעֹתֶ֖ם</l>
<l s="H">לִ֑י</l>
<l s="H5046">לְהַגִּ֣יד</l>
<l s="H376">לָאִ֔ישׁ</l>
<l s="H5750">הַע֥וֹד</l>
<l s="H">לָכֶ֖ם</l>
<l s="H251">אָֽח</l>׃
</span>
<span class="v-num v-7">7</span><span class="v GN43_7" data-id="GN43_7">
<l s="H559">וַיֹּאמְר֡וּ</l>
<l s="H7592">שָׁא֣וֹל</l>
<l s="H7592">שָֽׁאַל</l>־<l s="H376">הָ֠אִישׁ</l>
<l s="H">לָ֣נוּ</l>
<l s="H4138">וּלְמֽוֹלַדְתֵּ֜נוּ</l>
<l s="H559">לֵאמֹ֗ר</l>
<l s="H5750">הַע֨וֹד</l>
<l s="H1">אֲבִיכֶ֥ם</l>
<l s="H2416">חַי֙</l>
<l s="H3426">הֲיֵ֣שׁ</l>
<l s="H">לָכֶ֣ם</l>
<l s="H251">אָ֔ח</l>
<l s="H5046">וַנַ֨גֶּד</l>־<l s="H">ל֔וֹ</l>
<l s="H5921">עַל</l>־<l s="H6310">פִּ֖י</l>
<l s="H1697">הַדְּבָרִ֣ים</l>
<l s="H428">הָאֵ֑לֶּה</l>
<l s="H3045">הֲיָד֣וֹעַ</l>
<l s="H3045">נֵדַ֔ע</l>
<l s="H3588">כִּ֣י</l>
<l s="H559">יֹאמַ֔ר</l>
<l s="H3381">הוֹרִ֖ידוּ</l>
<l s="H853">אֶת</l>־<l s="H251">אֲחִיכֶֽם</l>׃
</span>
<span class="v-num v-8">8</span><span class="v GN43_8" data-id="GN43_8">
<l s="H559">וַיֹּ֨אמֶר</l>
<l s="H3063">יְהוּדָ֜ה</l>
<l s="H413">אֶל</l>־<l s="H3478">יִשְׂרָאֵ֣ל</l>
<l s="H1">אָבִ֗יו</l>
<l s="H7971">שִׁלְחָ֥ה</l>
<l s="H5288">הַנַּ֛עַר</l>
<l s="H854">אִתִּ֖י</l>
<l s="H6965">וְנָק֣וּמָה</l>
<l s="H3212">וְנֵלֵ֑כָה</l>
<l s="H2421">וְנִֽחְיֶה֙</l>
<l s="H3808">וְלֹ֣א</l>
<l s="H4191">נָמ֔וּת</l>
<l s="H1571">גַּם</l>־<l s="H587">אֲנַ֥חְנוּ</l>
<l s="H1571">גַם</l>־<l s="H859">אַתָּ֖ה</l>
<l s="H1571">גַּם</l>־<l s="H2945">טַפֵּֽנוּ</l>׃
</span>
<span class="v-num v-9">9</span><span class="v GN43_9" data-id="GN43_9">
<l s="H595">אָֽנֹכִי֙</l>
<l s="H6148">אֶֽעֶרְבֶ֔נּוּ</l>
<l s="H3027">מִיָּדִ֖י</l>
<l s="H1245">תְּבַקְשֶׁ֑נּוּ</l>
<l s="H518">אִם</l>־<l s="H3808">לֹ֨א</l>
<l s="H935">הֲבִיאֹתִ֤יו</l>
<l s="H413">אֵלֶ֙יךָ֙</l>
<l s="H3322">וְהִצַּגְתִּ֣יו</l>
<l s="H6440">לְפָנֶ֔יךָ</l>
<l s="H2398">וְחָטָ֥אתִֽי</l>
<l s="H">לְךָ֖</l>
<l s="H3605">כָּל</l>־<l s="H3117">הַיָּמִֽים</l>׃
</span>
<span class="v-num v-10">10</span><span class="v GN43_10" data-id="GN43_10">
<l s="H3588">כִּ֖י</l>
<l s="H3884">לוּלֵ֣א</l>
<l s="H4102">הִתְמַהְמָ֑הְנוּ</l>
<l s="H3588">כִּֽי</l>־<l s="H6258">עַתָּ֥ה</l>
<l s="H7725">שַׁ֖בְנוּ</l>
<l s="H2088">זֶ֥ה</l>
<l s="H6471">פַעֲמָֽיִם</l>׃
</span>
<span class="v-num v-11">11</span><span class="v GN43_11" data-id="GN43_11">
<l s="H559">וַיֹּ֨אמֶר</l>
<l s="H413">אֲלֵהֶ֜ם</l>
<l s="H3478">יִשְׂרָאֵ֣ל</l>
<l s="H1">אֲבִיהֶ֗ם</l>
<l s="H518">אִם</l>־<l s="H3651">כֵּ֣ן</l>
׀
<l s="H645">אֵפוֹא֮</l>
<l s="H2063">זֹ֣את</l>
<l s="H6213">עֲשׂוּ֒</l>
<l s="H3947">קְח֞וּ</l>
<l s="H2173">מִזִּמְרַ֤ת</l>
<l s="H776">הָאָ֙רֶץ֙</l>
<l s="H3627">בִּכְלֵיכֶ֔ם</l>
<l s="H3381">וְהוֹרִ֥ידוּ</l>
<l s="H376">לָאִ֖ישׁ</l>
<l s="H4503">מִנְחָ֑ה</l>
<l s="H4592">מְעַ֤ט</l>
<l s="H6875">צֳרִי֙</l>
<l s="H4592">וּמְעַ֣ט</l>
<l s="H1706">דְּבַ֔שׁ</l>
<l s="H5219">נְכֹ֣את</l>
<l s="H3910">וָלֹ֔ט</l>
<l s="H992">בָּטְנִ֖ים</l>
<l s="H8247">וּשְׁקֵדִֽים</l>׃
</span>
<span class="v-num v-12">12</span><span class="v GN43_12" data-id="GN43_12">
<l s="H3701">וְכֶ֥סֶף</l>
<l s="H4932">מִשְׁנֶ֖ה</l>
<l s="H3947">קְח֣וּ</l>
<l s="H3027">בְיֶדְכֶ֑ם</l>
<l s="H853">וְאֶת</l>־<l s="H3701">הַכֶּ֜סֶף</l>
<l s="H7725">הַמּוּשָׁ֨ב</l>
<l s="H6310">בְּפִ֤י</l>
<l s="H572">אַמְתְּחֹֽתֵיכֶם֙</l>
<l s="H7725">תָּשִׁ֣יבוּ</l>
<l s="H3027">בְיֶדְכֶ֔ם</l>
<l s="H194">אוּלַ֥י</l>
<l s="H4870">מִשְׁגֶּ֖ה</l>
<l s="H1931">הֽוּא</l>׃
</span>
<span class="v-num v-13">13</span><span class="v GN43_13" data-id="GN43_13">
<l s="H853">וְאֶת</l>־<l s="H251">אֲחִיכֶ֖ם</l>
<l s="H3947">קָ֑חוּ</l>
<l s="H6965">וְק֖וּמוּ</l>
<l s="H7725">שׁ֥וּבוּ</l>
<l s="H413">אֶל</l>־<l s="H376">הָאִֽישׁ</l>׃
</span>
<span class="v-num v-14">14</span><span class="v GN43_14" data-id="GN43_14">
<l s="H410">וְאֵ֣ל</l>
<l s="H7706">שַׁדַּ֗י</l>
<l s="H5414">יִתֵּ֨ן</l>
<l s="H">לָכֶ֤ם</l>
<l s="H7356">רַחֲמִים֙</l>
<l s="H6440">לִפְנֵ֣י</l>
<l s="H376">הָאִ֔ישׁ</l>
<l s="H7971">וְשִׁלַּ֥ח</l>
<l s="H">לָכֶ֛ם</l>
<l s="H853">אֶת</l>־<l s="H251">אֲחִיכֶ֥ם</l>
<l s="H312">אַחֵ֖ר</l>
<l s="H853">וְאֶת</l>־<l s="H1144">בִּנְיָמִ֑ין</l>
<l s="H589">וַאֲנִ֕י</l>
<l s="H834">כַּאֲשֶׁ֥ר</l>
<l s="H7921">שָׁכֹ֖לְתִּי</l>
<l s="H7921">שָׁכָֽלְתִּי</l>׃
</span>
<span class="v-num v-15">15</span><span class="v GN43_15" data-id="GN43_15">
<l s="H3947">וַיִּקְח֤וּ</l>
<l s="H376">הָֽאֲנָשִׁים֙</l>
<l s="H853">אֶת</l>־<l s="H4503">הַמִּנְחָ֣ה</l>
<l s="H2063">הַזֹּ֔את</l>
<l s="H4932">וּמִשְׁנֶה</l>־<l s="H3701">כֶּ֛סֶף</l>
<l s="H3947">לָקְח֥וּ</l>
<l s="H3027">בְיָדָ֖ם</l>
<l s="H853">וְאֶת</l>־<l s="H1144">בִּנְיָמִ֑ן</l>
<l s="H6965">וַיָּקֻ֙מוּ֙</l>
<l s="H3381">וַיֵּרְד֣וּ</l>
<l s="H4714">מִצְרַ֔יִם</l>
<l s="H5975">וַיַּֽעַמְד֖וּ</l>
<l s="H6440">לִפְנֵ֥י</l>
<l s="H3130">יוֹסֵֽף</l>׃
</span>
<span class="v-num v-16">16</span><span class="v GN43_16" data-id="GN43_16">
<l s="H7200">וַיַּ֨רְא</l>
<l s="H3130">יוֹסֵ֣ף</l>
<l s="H854">אִתָּם֮</l>
<l s="H853">אֶת</l>־<l s="H1144">בִּנְיָמִין֒</l>
<l s="H559">וַיֹּ֙אמֶר֙</l>
<l s="H834">לַֽאֲשֶׁ֣ר</l>
<l s="H5921">עַל</l>־<l s="H1004">בֵּית֔וֹ</l>
<l s="H935">הָבֵ֥א</l>
<l s="H853">אֶת</l>־<l s="H376">הָאֲנָשִׁ֖ים</l>
<l s="H1004">הַבָּ֑יְתָה</l>
<l s="H2873">וּטְבֹ֤חַ</l>
<l s="H2874">טֶ֙בַח֙</l>
<l s="H3559">וְהָכֵ֔ן</l>
<l s="H3588">כִּ֥י</l>
<l s="H854">אִתִּ֛י</l>
<l s="H398">יֹאכְל֥וּ</l>
<l s="H376">הָאֲנָשִׁ֖ים</l>
<l s="H6672">בַּֽצָּהֳרָֽיִם</l>׃
</span>
<span class="v-num v-17">17</span><span class="v GN43_17" data-id="GN43_17">
<l s="H6213">וַיַּ֣עַשׂ</l>
<l s="H376">הָאִ֔ישׁ</l>
<l s="H834">כַּֽאֲשֶׁ֖ר</l>
<l s="H559">אָמַ֣ר</l>
<l s="H3130">יוֹסֵ֑ף</l>
<l s="H935">וַיָּבֵ֥א</l>
<l s="H376">הָאִ֛ישׁ</l>
<l s="H853">אֶת</l>־<l s="H376">הָאֲנָשִׁ֖ים</l>
<l s="H1004">בֵּ֥יתָה</l>
<l s="H3130">יוֹסֵֽף</l>׃
</span>
<span class="v-num v-18">18</span><span class="v GN43_18" data-id="GN43_18">
<l s="H3372">וַיִּֽירְא֣וּ</l>
<l s="H376">הָֽאֲנָשִׁ֗ים</l>
<l s="H3588">כִּ֣י</l>
<l s="H935">הֽוּבְאוּ֮</l>
<l s="H1004">בֵּ֣ית</l>
<l s="H3130">יוֹסֵף֒</l>
<l s="H559">וַיֹּאמְר֗וּ</l>
<l s="H5921">עַל</l>־<l s="H1697">דְּבַ֤ר</l>
<l s="H3701">הַכֶּ֙סֶף֙</l>
<l s="H7725">הַשָּׁ֤ב</l>
<l s="H572">בְּאַמְתְּחֹתֵ֙ינוּ֙</l>
<l s="H8462">בַּתְּחִלָּ֔ה</l>
<l s="H587">אֲנַ֖חְנוּ</l>
<l s="H935">מֽוּבָאִ֑ים</l>
<l s="H1556">לְהִתְגֹּלֵ֤ל</l>
<l s="H5921">עָלֵ֙ינוּ֙</l>
<l s="H5307">וּלְהִתְנַפֵּ֣ל</l>
<l s="H5921">עָלֵ֔ינוּ</l>
<l s="H3947">וְלָקַ֧חַת</l>
<l s="H853">אֹתָ֛נוּ</l>
<l s="H5650">לַעֲבָדִ֖ים</l>
<l s="H853">וְאֶת</l>־<l s="H2543">חֲמֹרֵֽינוּ</l>׃
</span>
<span class="v-num v-19">19</span><span class="v GN43_19" data-id="GN43_19">
<l s="H5066">וַֽיִּגְּשׁוּ֙</l>
<l s="H413">אֶל</l>־<l s="H376">הָאִ֔ישׁ</l>
<l s="H834">אֲשֶׁ֖ר</l>
<l s="H5921">עַל</l>־<l s="H1004">בֵּ֣ית</l>
<l s="H3130">יוֹסֵ֑ף</l>
<l s="H1696">וַיְדַבְּר֥וּ</l>
<l s="H413">אֵלָ֖יו</l>
<l s="H6607">פֶּ֥תַח</l>
<l s="H1004">הַבָּֽיִת</l>׃
</span>
<span class="v-num v-20">20</span><span class="v GN43_20" data-id="GN43_20">
<l s="H559">וַיֹּאמְר֖וּ</l>
<l s="H994">בִּ֣י</l>
<l s="H113">אֲדֹנִ֑י</l>
<l s="H3381">יָרֹ֥ד</l>
<l s="H3381">יָרַ֛דְנוּ</l>
<l s="H8462">בַּתְּחִלָּ֖ה</l>
<l s="H7666">לִשְׁבָּר</l>־<l s="H400">אֹֽכֶל</l>׃
</span>
<span class="v-num v-21">21</span><span class="v GN43_21" data-id="GN43_21">
<l s="H1961">וַֽיְהִ֞י</l>
<l s="H3588">כִּי</l>־<l s="H935">בָ֣אנוּ</l>
<l s="H413">אֶל</l>־<l s="H4411">הַמָּל֗וֹן</l>
<l s="H6605">וַֽנִּפְתְּחָה֙</l>
<l s="H853">אֶת</l>־<l s="H572">אַמְתְּחֹתֵ֔ינוּ</l>
<l s="H2009">וְהִנֵּ֤ה</l>
<l s="H3701">כֶֽסֶף</l>־<l s="H376">אִישׁ֙</l>
<l s="H6310">בְּפִ֣י</l>
<l s="H572">אַמְתַּחְתּ֔וֹ</l>
<l s="H3701">כַּסְפֵּ֖נוּ</l>
<l s="H4948">בְּמִשְׁקָל֑וֹ</l>
<l s="H7725">וַנָּ֥שֶׁב</l>
<l s="H853">אֹת֖וֹ</l>
<l s="H3027">בְּיָדֵֽנוּ</l>׃
</span>
<span class="v-num v-22">22</span><span class="v GN43_22" data-id="GN43_22">
<l s="H3701">וְכֶ֧סֶף</l>
<l s="H312">אַחֵ֛ר</l>
<l s="H3381">הוֹרַ֥דְנוּ</l>
<l s="H3027">בְיָדֵ֖נוּ</l>
<l s="H7666">לִשְׁבָּר</l>־<l s="H400">אֹ֑כֶל</l>
<l s="H3808">לֹ֣א</l>
<l s="H3045">יָדַ֔עְנוּ</l>
<l s="H4310">מִי</l>־<l s="H7760">שָׂ֥ם</l>
<l s="H3701">כַּסְפֵּ֖נוּ</l>
<l s="H572">בְּאַמְתְּחֹתֵֽינוּ</l>׃
</span>
<span class="v-num v-23">23</span><span class="v GN43_23" data-id="GN43_23">
<l s="H559">וַיֹּאמֶר֩</l>
<l s="H7965">שָׁל֨וֹם</l>
<l s="H">לָכֶ֜ם</l>
<l s="H408">אַל</l>־<l s="H3372">תִּירָ֗אוּ</l>
<l s="H430">אֱלֹ֨הֵיכֶ֜ם</l>
<l s="H430">וֵֽאלֹהֵ֤י</l>
<l s="H1">אֲבִיכֶם֙</l>
<l s="H5414">נָתַ֨ן</l>
<l s="H">לָכֶ֤ם</l>
<l s="H4301">מַטְמוֹן֙</l>
<l s="H572">בְּאַמְתְּחֹ֣תֵיכֶ֔ם</l>
<l s="H3701">כַּסְפְּכֶ֖ם</l>
<l s="H935">בָּ֣א</l>
<l s="H413">אֵלָ֑י</l>
<l s="H3318">וַיּוֹצֵ֥א</l>
<l s="H413">אֲלֵהֶ֖ם</l>
<l s="H853">אֶת</l>־<l s="H8095">שִׁמְעֽוֹן</l>׃
</span>
<span class="v-num v-24">24</span><span class="v GN43_24" data-id="GN43_24">
<l s="H935">וַיָּבֵ֥א</l>
<l s="H376">הָאִ֛ישׁ</l>
<l s="H853">אֶת</l>־<l s="H376">הָאֲנָשִׁ֖ים</l>
<l s="H1004">בֵּ֣יתָה</l>
<l s="H3130">יוֹסֵ֑ף</l>
<l s="H5414">וַיִּתֶּן</l>־<l s="H4325">מַ֙יִם֙</l>
<l s="H7364">וַיִּרְחֲצ֣וּ</l>
<l s="H7272">רַגְלֵיהֶ֔ם</l>
<l s="H5414">וַיִּתֵּ֥ן</l>
<l s="H4554">מִסְפּ֖וֹא</l>
<l s="H2543">לַחֲמֹֽרֵיהֶֽם</l>׃
</span>
<span class="v-num v-25">25</span><span class="v GN43_25" data-id="GN43_25">
<l s="H3559">וַיָּכִ֙ינוּ֙</l>
<l s="H853">אֶת</l>־<l s="H4503">הַמִּנְחָ֔ה</l>
<l s="H5704">עַד</l>־<l s="H935">בּ֥וֹא</l>
<l s="H3130">יוֹסֵ֖ף</l>
<l s="H6672">בַּֽצָּהֳרָ֑יִם</l>
<l s="H3588">כִּ֣י</l>
<l s="H8085">שָֽׁמְע֔וּ</l>
<l s="H3588">כִּי</l>־<l s="H8033">שָׁ֖ם</l>
<l s="H398">יֹ֥אכְלוּ</l>
<l s="H3899">לָֽחֶם</l>׃
</span>
<span class="v-num v-26">26</span><span class="v GN43_26" data-id="GN43_26">
<l s="H935">וַיָּבֹ֤א</l>
<l s="H3130">יוֹסֵף֙</l>
<l s="H1004">הַבַּ֔יְתָה</l>
<l s="H935">וַיָּבִ֥יאּוּ</l>
<l s="H">ל֛וֹ</l>
<l s="H853">אֶת</l>־<l s="H4503">הַמִּנְחָ֥ה</l>
<l s="H834">אֲשֶׁר</l>־<l s="H3027">בְּיָדָ֖ם</l>
<l s="H1004">הַבָּ֑יְתָה</l>
<l s="H7812">וַיִּשְׁתַּחֲווּ</l>־<l s="H">ל֖וֹ</l>
<l s="H776">אָֽרְצָה</l>׃
</span>
<span class="v-num v-27">27</span><span class="v GN43_27" data-id="GN43_27">
<l s="H7592">וַיִּשְׁאַ֤ל</l>
<l s="H">לָהֶם֙</l>
<l s="H7965">לְשָׁל֔וֹם</l>
<l s="H559">וַיֹּ֗אמֶר</l>
<l s="H7965">הֲשָׁל֛וֹם</l>
<l s="H1">אֲבִיכֶ֥ם</l>
<l s="H2205">הַזָּקֵ֖ן</l>
<l s="H834">אֲשֶׁ֣ר</l>
<l s="H559">אֲמַרְתֶּ֑ם</l>
<l s="H5750">הַעוֹדֶ֖נּוּ</l>
<l s="H2416">חָֽי</l>׃
</span>
<span class="v-num v-28">28</span><span class="v GN43_28" data-id="GN43_28">
<l s="H559">וַיֹּאמְר֗וּ</l>
<l s="H7965">שָׁל֛וֹם</l>
<l s="H5650">לְעַבְדְּךָ֥</l>
<l s="H1">לְאָבִ֖ינוּ</l>
<l s="H5750">עוֹדֶ֣נּוּ</l>
<l s="H2416">חָ֑י</l>
<l s="H6915">וַֽיִּקְּד֖וּ</l>
<l s="H7812">וישתחו</l>׃
</span>
<span class="v-num v-29">29</span><span class="v GN43_29" data-id="GN43_29">
<l s="H5375">וַיִּשָּׂ֣א</l>
<l s="H5869">עֵינָ֗יו</l>
<l s="H7200">וַיַּ֞רְא</l>
<l s="H853">אֶת</l>־<l s="H1144">בִּנְיָמִ֣ין</l>
<l s="H251">אָחִיו֮</l>
<l s="H1121">בֶּן</l>־<l s="H517">אִמּוֹ֒</l>
<l s="H559">וַיֹּ֗אמֶר</l>
<l s="H2088">הֲזֶה֙</l>
<l s="H251">אֲחִיכֶ֣ם</l>
<l s="H6996">הַקָּטֹ֔ן</l>
<l s="H834">אֲשֶׁ֥ר</l>
<l s="H559">אֲמַרְתֶּ֖ם</l>
<l s="H413">אֵלָ֑י</l>
<l s="H559">וַיֹּאמַ֕ר</l>
<l s="H430">אֱלֹהִ֥ים</l>
<l s="H2603">יָחְנְךָ֖</l>
<l s="H1121">בְּנִֽי</l>׃
</span>
<span class="v-num v-30">30</span><span class="v GN43_30" data-id="GN43_30">
<l s="H4116">וַיְמַהֵ֣ר</l>
<l s="H3130">יוֹסֵ֗ף</l>
<l s="H3588">כִּֽי</l>־<l s="H3648">נִכְמְר֤וּ</l>
<l s="H7356">רַחֲמָיו֙</l>
<l s="H413">אֶל</l>־<l s="H251">אָחִ֔יו</l>
<l s="H1245">וַיְבַקֵּ֖שׁ</l>
<l s="H1058">לִבְכּ֑וֹת</l>
<l s="H935">וַיָּבֹ֥א</l>
<l s="H2315">הַחַ֖דְרָה</l>
<l s="H1058">וַיֵּ֥בְךְּ</l>
<l s="H8033">שָֽׁמָּה</l>׃
</span>
<span class="v-num v-31">31</span><span class="v GN43_31" data-id="GN43_31">
<l s="H7364">וַיִּרְחַ֥ץ</l>
<l s="H6440">פָּנָ֖יו</l>
<l s="H3318">וַיֵּצֵ֑א</l>
<l s="H662">וַיִּ֨תְאַפַּ֔ק</l>
<l s="H559">וַיֹּ֖אמֶר</l>
<l s="H7760">שִׂ֥ימוּ</l>
<l s="H3899">לָֽחֶם</l>׃
</span>
<span class="v-num v-32">32</span><span class="v GN43_32" data-id="GN43_32">
<l s="H7760">וַיָּשִׂ֥ימוּ</l>
<l s="H">ל֛וֹ</l>
<l s="H905">לְבַדּ֖וֹ</l>
<l s="H">וְלָהֶ֣ם</l>
<l s="H905">לְבַדָּ֑ם</l>
<l s="H4713">וְלַמִּצְרִ֞ים</l>
<l s="H398">הָאֹכְלִ֤ים</l>
<l s="H854">אִתּוֹ֙</l>
<l s="H905">לְבַדָּ֔ם</l>
<l s="H3588">כִּי֩</l>
<l s="H3808">לֹ֨א</l>
<l s="H3201">יוּכְל֜וּן</l>
<l s="H4713">הַמִּצְרִ֗ים</l>
<l s="H398">לֶאֱכֹ֤ל</l>
<l s="H854">אֶת</l>־<l s="H5680">הָֽעִבְרִים֙</l>
<l s="H3899">לֶ֔חֶם</l>
<l s="H3588">כִּי</l>־<l s="H8441">תוֹעֵבָ֥ה</l>
<l s="H1931">הִ֖וא</l>
<l s="H4713">לְמִצְרָֽיִם</l>׃
</span>
<span class="v-num v-33">33</span><span class="v GN43_33" data-id="GN43_33">
<l s="H3427">וַיֵּשְׁב֣וּ</l>
<l s="H6440">לְפָנָ֔יו</l>
<l s="H1060">הַבְּכֹר֙</l>
<l s="H1062">כִּבְכֹ֣רָת֔וֹ</l>
<l s="H6810">וְהַצָּעִ֖יר</l>
<l s="H6812">כִּצְעִרָת֑וֹ</l>
<l s="H8539">וַיִּתְמְה֥וּ</l>
<l s="H376">הָאֲנָשִׁ֖ים</l>
<l s="H376">אִ֥ישׁ</l>
<l s="H413">אֶל</l>־<l s="H7453">רֵעֵֽהוּ</l>׃
</span>
<span class="v-num v-34">34</span><span class="v GN43_34" data-id="GN43_34">
<l s="H5375">וַיִּשָּׂ֨א</l>
<l s="H4864">מַשְׂאֹ֜ת</l>
<l s="H853">מֵאֵ֣ת</l>
<l s="H6440">פָּנָיו֮</l>
<l s="H413">אֲלֵהֶם֒</l>
<l s="H7235">וַתֵּ֜רֶב</l>
<l s="H4864">מַשְׂאַ֧ת</l>
<l s="H1144">בִּנְיָמִ֛ן</l>
<l s="H4864">מִמַּשְׂאֹ֥ת</l>
<l s="H3605">כֻּלָּ֖ם</l>
<l s="H2568">חָמֵ֣שׁ</l>
<l s="H3027">יָד֑וֹת</l>
<l s="H8354">וַיִּשְׁתּ֥וּ</l>
<l s="H7937">וַֽיִּשְׁכְּר֖וּ</l>
<l s="H5973">עִמּֽוֹ</l>׃
</span>
</div>
</div>
<div class="footer"><div class="nav">
<a class="prev" href="GN42.html"><</a>
<a class="home" href="index.html">=</a>
<a class="next" href="GN44.html">></a>
</div></div>
</body>
</html> | khangpng/VietnameseBible | app/content/texts/heb_wlc/GN43.html | HTML | mit | 25,183 |
/*
* The MIT License
*
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.github.lgooddatepicker.zinternaltools;
import java.awt.Color;
public class InternalConstants {
public static Color colorEditableTextFieldBorder = new Color(122, 138, 153);
public static Color colorNotEditableTextFieldBorder = new Color(184, 207, 229);
}
| LGoodDatePicker/LGoodDatePicker | Project/src/main/java/com/github/lgooddatepicker/zinternaltools/InternalConstants.java | Java | mit | 1,377 |
#!/bin/bash
# this file is mostly meant to be used by the author himself.
root=`pwd`
version=$1
home=~
force=$2
ngx-build $force $version \
--with-ld-opt="-L$PCRE_LIB -Wl,-rpath,$PCRE_LIB:$LUAJIT_LIB:/usr/local/lib" \
--with-cc-opt='-O0' \
--add-module=$root/../echo-nginx-module \
--add-module=$root/../ndk-nginx-module \
--add-module=$root $opts \
--with-debug \
|| exit 1
#--with-debug || exit 1
#--with-cc-opt="-g3 -O0"
| calio/tee-nginx-module | util/build.sh | Shell | mit | 520 |
import { getFailureMessage, Rule } from '../src/noInputPrefixRule';
import { assertAnnotated, assertSuccess } from './testHelper';
const {
metadata: { ruleName },
} = Rule;
describe(ruleName, () => {
describe('failure', () => {
it('should fail when an input property is prefixed by a blacklisted prefix and blacklist is composed by one prefix', () => {
const blacklistedPrefixes = ['is'];
const source = `
@Directive()
class Test {
@Input() isDisabled: boolean;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}
`;
assertAnnotated({
message: getFailureMessage(blacklistedPrefixes),
options: blacklistedPrefixes,
ruleName,
source,
});
});
it('should fail when an input property is strictly equal to a blacklisted prefix', () => {
const blacklistedPrefixes = ['should'];
const source = `
@Directive()
class Test {
@Input() should: boolean;
~~~~~~~~~~~~~~~~~~~~~~~~~
}
`;
assertAnnotated({
message: getFailureMessage(blacklistedPrefixes),
options: blacklistedPrefixes,
ruleName,
source,
});
});
it('should fail when an input property is prefixed by a blacklisted prefix and blacklist is composed by two blacklistedPrefixes', () => {
const blacklistedPrefixes = ['can', 'is'];
const source = `
@Component()
class Test {
@Input() canEnable: boolean;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
}
`;
assertAnnotated({
message: getFailureMessage(blacklistedPrefixes),
options: blacklistedPrefixes,
ruleName,
source,
});
});
it('should fail when an input property is prefixed by a blacklisted prefix and blacklist is composed by two concurrent blacklistedPrefixes', () => {
const blacklistedPrefixes = ['is', 'isc'];
const source = `
@Component()
class Test {
@Input() iscHange: boolean;
~~~~~~~~~~~~~~~~~~~~~~~~~~~
}
`;
assertAnnotated({
message: getFailureMessage(blacklistedPrefixes),
options: blacklistedPrefixes,
ruleName,
source,
});
});
it('should fail when an input property is snakecased and contains a blacklisted prefix', () => {
const blacklistedPrefixes = ['do'];
const source = `
@Directive()
class Test {
@Input() do_it: number;
~~~~~~~~~~~~~~~~~~~~~~~
}
`;
assertAnnotated({
message: getFailureMessage(blacklistedPrefixes),
options: blacklistedPrefixes,
ruleName,
source,
});
});
});
describe('success', () => {
it('should succeed when an input property is not prefixed', () => {
const blacklistedPrefixes = ['must'];
const source = `
@Directive()
class Test {
@Input() mustmust = true;
}
`;
assertSuccess(ruleName, source, blacklistedPrefixes);
});
it('should succeed when multiple input properties are prefixed by something not present in the blacklist', () => {
const blacklistedPrefixes = ['can', 'dis', 'disable', 'should'];
const source = `
@Component()
class Test {
@Input() cana: string;
@Input() disabledThing: boolean;
@Input() isFoo = 'yes';
@Input() shoulddoit: boolean;
}
`;
assertSuccess(ruleName, source, blacklistedPrefixes);
});
});
});
| mgechev/codelyzer | test/noInputPrefixRule.spec.ts | TypeScript | mit | 3,579 |
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The source code</title>
<link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../resources/prettify/prettify.js"></script>
<style type="text/css">
.highlight { display: block; background-color: #ddd; }
</style>
<script type="text/javascript">
function highlight() {
document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
}
</script>
</head>
<body onload="prettyPrint(); highlight();">
<pre class="prettyprint lang-js">/*
This file is part of Ext JS 4
Copyright (c) 2011 Sencha Inc
Contact: http://www.sencha.com/contact
Commercial Usage
Licensees holding valid commercial licenses may use this file in accordance with the Commercial Software License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Sencha.
If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
*/
<span id='Ext-form-action-Load'>/**
</span> * @class Ext.form.action.Load
* @extends Ext.form.action.Action
* <p>A class which handles loading of data from a server into the Fields of an {@link Ext.form.Basic}.</p>
* <p>Instances of this class are only created by a {@link Ext.form.Basic Form} when
* {@link Ext.form.Basic#load load}ing.</p>
* <p><u><b>Response Packet Criteria</b></u></p>
* <p>A response packet <b>must</b> contain:
* <div class="mdetail-params"><ul>
* <li><b><code>success</code></b> property : Boolean</li>
* <li><b><code>data</code></b> property : Object</li>
* <div class="sub-desc">The <code>data</code> property contains the values of Fields to load.
* The individual value object for each Field is passed to the Field's
* {@link Ext.form.field.Field#setValue setValue} method.</div></li>
* </ul></div>
* <p><u><b>JSON Packets</b></u></p>
* <p>By default, response packets are assumed to be JSON, so for the following form load call:<pre><code>
var myFormPanel = new Ext.form.Panel({
title: 'Client and routing info',
items: [{
fieldLabel: 'Client',
name: 'clientName'
}, {
fieldLabel: 'Port of loading',
name: 'portOfLoading'
}, {
fieldLabel: 'Port of discharge',
name: 'portOfDischarge'
}]
});
myFormPanel.{@link Ext.form.Panel#getForm getForm}().{@link Ext.form.Basic#load load}({
url: '/getRoutingInfo.php',
params: {
consignmentRef: myConsignmentRef
},
failure: function(form, action) {
Ext.Msg.alert("Load failed", action.result.errorMessage);
}
});
</code></pre>
* a <b>success response</b> packet may look like this:</p><pre><code>
{
success: true,
data: {
clientName: "Fred. Olsen Lines",
portOfLoading: "FXT",
portOfDischarge: "OSL"
}
}</code></pre>
* while a <b>failure response</b> packet may look like this:</p><pre><code>
{
success: false,
errorMessage: "Consignment reference not found"
}</code></pre>
* <p>Other data may be placed into the response for processing the {@link Ext.form.Basic Form}'s
* callback or event handler methods. The object decoded from this JSON is available in the
* {@link Ext.form.action.Action#result result} property.</p>
*/
Ext.define('Ext.form.action.Load', {
extend:'Ext.form.action.Action',
requires: ['Ext.data.Connection'],
alternateClassName: 'Ext.form.Action.Load',
alias: 'formaction.load',
type: 'load',
<span id='Ext-form-action-Load-method-run'> /**
</span> * @private
*/
run: function() {
Ext.Ajax.request(Ext.apply(
this.createCallback(),
{
method: this.getMethod(),
url: this.getUrl(),
headers: this.headers,
params: this.getParams()
}
));
},
<span id='Ext-form-action-Load-method-onSuccess'> /**
</span> * @private
*/
onSuccess: function(response){
var result = this.processResponse(response),
form = this.form;
if (result === true || !result.success || !result.data) {
this.failureType = Ext.form.action.Action.LOAD_FAILURE;
form.afterAction(this, false);
return;
}
form.clearInvalid();
form.setValues(result.data);
form.afterAction(this, true);
},
<span id='Ext-form-action-Load-method-handleResponse'> /**
</span> * @private
*/
handleResponse: function(response) {
var reader = this.form.reader,
rs, data;
if (reader) {
rs = reader.read(response);
data = rs.records && rs.records[0] ? rs.records[0].data : null;
return {
success : rs.success,
data : data
};
}
return Ext.decode(response.responseText);
}
});
</pre>
</body>
</html>
| hatimeria/HatimeriaExtJS | docs/source/Load.html | HTML | mit | 5,521 |
using System;
using System.Management;
namespace LANServerInfo
{
public static class WMIConnection
{
public static ManagementScope GetWMIManagementScope(string IPOrComputerName)
{
ManagementScope wmiScope = null;
try
{
ConnectionOptions conn = new ConnectionOptions();
//Optional
conn.Username = "Administrator";
conn.Password = "admin";
wmiScope = new ManagementScope(string.Format("\\\\{0}\\root\\cimv2", IPOrComputerName), conn);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
return wmiScope;
}
public static ManagementObjectSearcher GetWMIManagementObjectSearcher(string IPOrComputerName, ObjectQuery queryObj)
{
ManagementObjectSearcher mgtObjSrg = null;
try
{
ConnectionOptions conn = new ConnectionOptions();
//Optional
conn.Username = "Administrator";
conn.Password = "admin";
ManagementScope wmiScope = new ManagementScope(string.Format("\\\\{0}\\root\\cimv2", IPOrComputerName), conn);
mgtObjSrg = new ManagementObjectSearcher(wmiScope, queryObj);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
return mgtObjSrg;
}
public static ManagementObjectCollection GetWMIManagementObjectCollection(string IPOrComputerName, ObjectQuery queryObj)
{
ManagementObjectCollection mgmObjColl = null;
try
{
ConnectionOptions conn = new ConnectionOptions();
//Optional
//conn.Username = "Administrator";
//conn.Password = "admin";
ManagementScope wmiScope = new ManagementScope(string.Format("\\\\{0}\\root\\cimv2", IPOrComputerName), conn);
ManagementObjectSearcher mgtObjSrg = new ManagementObjectSearcher(wmiScope, queryObj);
mgmObjColl = mgtObjSrg.Get();
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
return mgmObjColl;
}
}
}
| shahedbd/NetworkServerInfo | Sln.LANServerInfo/LANServerInfo/WMIConnection.cs | C# | mit | 2,377 |
namespace PayStuffLib
{
using System.Collections.Concurrent;
using AutoMapper;
using Castle.Facilities.TypedFactory;
using Castle.MicroKernel.Registration;
using Castle.MicroKernel.SubSystems.Configuration;
using Castle.Windsor;
using Core;
using Employees;
public class PayStuffLibInstaller : IWindsorInstaller
{
public void Install(IWindsorContainer container, IConfigurationStore store)
{
container.Register(
Component.For<IQueryFactory>().AsFactory(),
Classes.FromThisAssembly().BasedOn<IQuery>().WithServiceSelf().LifestylePerWebRequest(),
Component.For<BlockingCollection<Employee>>().UsingFactoryMethod(() => new BlockingCollection<Employee>()).LifestyleSingleton(),
Classes.FromThisAssembly().BasedOn<Command>().LifestyleTransient(),
Classes.FromThisAssembly().BasedOn<Profile>().WithServiceBase()
);
}
}
} | caloggins/PayStuff | src/PayStuffLib/PayStuffLibInstaller.cs | C# | mit | 1,018 |
/*
The MIT License (MIT)
Copyright (c) wenjie.zhao
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 RECCHOICESKINWIDGET_H
#define RECCHOICESKINWIDGET_H
#include <QWidget>
#include "skp_utility.h"
class RecSkinWidget;
class RecSkinColorPalette;
class RecSkinDialog;
class RecSkinPickerWidget;
namespace Ui {
class MSkinChanger;
}
class MSkinChanger : public QWidget
{
Q_OBJECT
public:
explicit MSkinChanger(QWidget *parent = 0);
~MSkinChanger();
private slots:
void onDefinePixmap();
void onAeroTransparentValueChanged(int v);
void onWidgetTransparentValueChanged(int v);
void onCurrentPixmap(const QString &fileName,const QPixmap &pix,const QColor &averageColor);
private:
Ui::MSkinChanger *ui;
RecSkinWidget *SkinWidget;
RecSkinPickerWidget *SkinPickerWidget;
RecSkinDialog *SkinDialog;
signals:
void currentColor(const QColor &color);
void currentPixmap(const QString &fileName,const QPixmap &pix,const QColor &averageColor);
};
#endif // RECCHOICESKINWIDGET_H
| yefy/skp | super-knowledge-platform/skpClient/skpClient/trunk/src/gui/MSkinChanger.h | C | mit | 2,022 |
from .. import db
from purchase import CartItem
from bookmark import *
from sqlalchemy import or_, desc, func
from ..models import Vendor
from flask.ext.login import current_user
from sqlalchemy import UniqueConstraint
class Updated:
PRICE_CHANGE, NEW_ITEM, NO_CHANGE = range(3)
class Listing(db.Model):
__tablename__ = "listings"
__table_args__ = (
UniqueConstraint('id', 'name'),
)
id = db.Column(db.Integer, primary_key=True)
# model relationships
vendor_id = db.Column(db.Integer, db.ForeignKey('users.id', ondelete='CASCADE'))
unit = db.Column(db.String(1000))
quantity = db.Column(db.String(1000))
cartitems = db.relationship('CartItem', backref='listings', cascade='all,delete-orphan', lazy='dynamic')
# listing properties
name = db.Column(db.String(1000))
description = db.Column(db.Text)
price = db.Column(db.Float)
available = db.Column(db.Boolean, default=True)
product_id=db.Column(db.String(1000), default=1)
updated=db.Column(db.Integer, default=0)
def __init__(self, product_id, vendor_id, unit, name, available, price,
description="", updated=Updated.NO_CHANGE, quantity=0):
self.product_id = product_id
self.vendor_id = vendor_id
self.unit = unit
self.quantity = quantity
self.name = name
self.description = description
self.price = price
self.available = available
def remove_from_carts(self):
cart_items = CartItem.query.filter_by(listing_id=self.id).all()
for cart_item in cart_items:
db.session.delete(cart_item)
db.session.commit()
def get_quantity_in_cart(self):
cart_item = CartItem.query.filter_by(merchant_id=current_user.id,
listing_id=self.id).first()
if cart_item:
return cart_item.quantity
else:
return 0
def disable_listing(self):
"""Disable the listing and remove from all carts"""
self.available = False
self.remove_from_carts()
db.session.commit()
def delete_listing(self):
"""Delete the listing and remove from all carts"""
self.remove_from_carts()
db.session.delete(self)
db.session.commit()
# used in csv parsing
@staticmethod
def get_listing_by_product_id(product_id):
return Listing.query.filter_by(product_id=product_id).first()
# used in csv parsing.
# adds to DB a new listing iven params in csv row
@staticmethod
def add_csv_row_as_listing(csv_row, price=0):
return Listing(
name=csv_row[current_user.name_col],
description=csv_row[current_user.listing_description_col],
available=True,
price=price,
unit=csv_row[current_user.unit_col],
quantity= csv_row[current_user.quantity_col],
vendor_id=current_user.id,
product_id=csv_row[current_user.product_id_col],
updated=Updated.PRICE_CHANGE)
@staticmethod
def add_listing(new_listing):
db.session.add(new_listing)
db.session.commit()
def update_listing(self, new_product_id):
self.product_id = new_product_id
@property
def category_name(self):
return self.category_id.name
@staticmethod
def search(**kwargs):
""" Returns all listings matching the criteria """
filter_list = []
if 'main_search_term' in kwargs:
term = kwargs['main_search_term']
filter_list.append(or_(
Listing.name.ilike('%{}%'.format(str(term))),
Listing.product_id.ilike('%{}%'.format(str(term))),
Listing.description.ilike('%{}%'.format(str(term))))
)
if 'strict_name_search' in kwargs:
term = kwargs['strict_name_search']
filter_list.append(Listing.name.like('%{}%'.format(str(term))))
if 'name_search_term' in kwargs and kwargs['name_search_term']:
term = kwargs['name_search_term']
vendors = Vendor.query.filter(Vendor.company_name.ilike('%{}%'.format(str(term)))).all()
vendor_ids = [vendor.id for vendor in vendors]
filter_list.append(Listing.vendor_id.in_(vendor_ids))
# used by vendors to filter by availability
if 'avail' in kwargs:
avail_criteria = kwargs['avail']
format(avail_criteria)
if avail_criteria == "non_avail":
filter_list.append(Listing.available == False)
if avail_criteria == "avail":
filter_list.append(Listing.available == True)
if avail_criteria == "both":
filter_list.append(or_(Listing.available == True,
Listing.available == False))
# used by merchants to filter by availability
if 'available' in kwargs:
filter_list.append(Listing.available == True)
if 'fav_vendor' in kwargs and kwargs['fav_vendor']:
bookmarked_vendor_ids = BookmarkVendor.query.filter_by(merchant_id=current_user.id).all()
ids = []
for bookmark in bookmarked_vendor_ids:
ids.append(bookmark.vendor_id)
filter_list.append(Listing.vendor_id.in_(ids))
if 'favorite' in kwargs and kwargs['favorite']:
bookmarked_vendor_ids = Bookmark.query.filter_by(merchant_id=current_user.id).all()
ids = []
for bookmark in bookmarked_vendor_ids:
ids.append(bookmark.listing_id)
filter_list.append(Listing.id.in_(ids))
if 'min_price' in kwargs and kwargs['min_price']:
filter_list.append(Listing.price >= kwargs['min_price'])
if 'max_price' in kwargs and kwargs['max_price']:
filter_list.append(Listing.price <= kwargs['max_price'])
filtered_query = Listing.query.filter(*filter_list)
print Listing.query.filter(*filter_list)
if 'sort_by' in kwargs and kwargs['sort_by']:
sort = kwargs['sort_by']
format(sort)
else:
sort = None
if sort == "low_high":
sorted_query = filtered_query.order_by(Listing.price)
elif sort == "high_low":
sorted_query = filtered_query.order_by(desc(Listing.price))
elif sort == "alphaAZ":
sorted_query = filtered_query.order_by(func.lower(Listing.name))
elif sort == "alphaZA":
sorted_query = filtered_query.order_by(desc(func.lower(Listing.name)))
else: # default sort
sorted_query = filtered_query.order_by(Listing.price)
return sorted_query
def __repr__(self):
return "<Listing: {} Vendor: {} Unit: {}>".format(self.name,
self.vendor_id,
self.unt)
| hack4impact/reading-terminal-market | app/models/listing.py | Python | mit | 7,080 |
$(function () {
function getCookie(name) {
// Function to get any cookie available in the session.
var cookieValue = null;
if (document.cookie && document.cookie !== '') {
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = jQuery.trim(cookies[i]);
// Does this cookie string begin with the name we want?
if (cookie.substring(0, name.length + 1) === (name + '=')) {
cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
break;
}
}
}
return cookieValue;
};
function csrfSafeMethod(method) {
// These HTTP methods do not require CSRF protection
return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method));
}
function toogleVote(voteIcon, vote, data, isAnswer) {
var idPrefix = isAnswer ? 'answer' : 'question';
var isOwner = data.is_owner;
if (isOwner === false) {
if (vote === "U") {
voteIcon.addClass('voted');
voteIcon.siblings(`#${idPrefix}DownVote`).removeClass('voted');
} else {
voteIcon.addClass('voted');
voteIcon.siblings(`#${idPrefix}UpVote`).removeClass('voted');
}
voteIcon.siblings(`#${idPrefix}Votes`).text(data.votes);
}
}
var csrftoken = getCookie('csrftoken');
var page_title = $(document).attr("title");
// This sets up every ajax call with proper headers.
$.ajaxSetup({
beforeSend: function (xhr, settings) {
if (!csrfSafeMethod(settings.type) && !this.crossDomain) {
xhr.setRequestHeader("X-CSRFToken", csrftoken);
}
}
});
$("#publish").click(function () {
// function to operate the Publish button in the question form, marking
// the question status as published.
$("input[name='status']").val("O");
$("#question-form").submit();
});
$("#draft").click(function () {
// Function to operate the Draft button in the question form, marking
// the question status as draft.
$("input[name='status']").val("D");
$("#question-form").submit();
});
$(".question-vote").click(function () {
// Vote on a question.
var voteIcon = $(this);
var question = $(this).closest(".question").attr("question-id");
if ($(this).hasClass("up-vote")) {
vote = "U";
} else {
$('#questionDownVote').addClass('voted');
$('#questionUpVote').removeClass('voted');
}
$.ajax({
url: '/qa/question/vote/',
data: {
'question': question,
'value': vote
},
type: 'post',
cache: false,
success: function (data) {
toogleVote(voteIcon, vote, data, false);
}
});
});
$(".answer-vote").click(function () {
// Vote on an answer.
var voteIcon = $(this);
var answer = $(this).closest(".answer").attr("answer-id");
if ($(this).hasClass("up-vote")) {
vote = "U";
} else {
$('#answerDownVote').addClass('voted');
$('#answerUpVote').removeClass('voted');
}
$.ajax({
url: '/qa/answer/vote/',
data: {
'answer': answer,
'value': vote
},
type: 'post',
cache: false,
success: function (data) {
toogleVote(voteIcon, vote, data, true);
}
});
});
$("#acceptAnswer").click(function () {
// Mark an answer as accepted.
var span = $(this);
var answer = $(this).closest(".answer").attr("answer-id");
$.ajax({
url: '/qa/accept-answer/',
data: {
'answer': answer
},
type: 'post',
cache: false,
success: function (data) {
$("#acceptAnswer").removeClass("accepted");
$("#acceptAnswer").prop("title", "Click to accept the answer");
$("#acceptAnswer").addClass("accepted");
$("#acceptAnswer").prop("title", "Click to unaccept the answer");
}
});
});
});
| vitorfs/bootcamp | bootcamp/static/js/qa.js | JavaScript | mit | 3,871 |
//Package model defines structures that are shared through out ngorm. They
//provide the base building blocks for ngorm abstractions.
package model
import (
"database/sql"
"fmt"
"io"
"os"
"reflect"
"strings"
"sync"
"time"
)
// All important keys
const (
OrderByPK = "ngorm:order_by_primary_key"
QueryDestination = "ngorm:query_destination"
QueryOption = "ngorm:query_option"
Query = "ngorm:query"
HookAfterQuery = "ngorm:query_after"
HookQuerySQL = "ngorm:query_sql_hook"
HookQueryExec = "ngorm:query_sql_exec"
HookAfterFindQuery = "ngorm:query_after_find"
HookBeforeCreate = "ngorm:before_create_hook"
HookBeforeSave = "ngorm:before_save_hook"
Create = "ngorm:create"
HookCreateExec = "ngorm:create_exec"
BeforeCreate = "ngorm:before_create"
AfterCreate = "ngorm:after_create"
HookAfterCreate = "ngorm:after_create"
HookAfterSave = "ngorm:after_save_hook"
UpdateAttrs = "ngorm:update_attrs"
TableOptions = "ngorm:table_options"
HookSaveBeforeAss = "ngorm:save_before_associations"
HookUpdateTimestamp = "ngorm:update_time_stamp"
BlankColWithValue = "ngorm:blank_columns_with_default_value"
InsertOptions = "ngorm:insert_option"
UpdateColumn = "ngorm:update_column"
HookBeforeUpdate = "ngorm:before_update_hook"
HookAfterUpdate = "ngorm:after_update_hook"
UpdateInterface = "ngorm:update_interface"
BeforeUpdate = "ngorm:before_update"
AfterUpdate = "ngorm:after_update"
HookAssignUpdatingAttrs = "ngorm:assign_updating_attrs_hook"
HookCreateSQL = "ngorm:create_sql"
UpdateOptions = "ngorm:update_option"
Update = "ngorm:update"
HookUpdateSQL = "ngorm:update_sql_hook"
HookUpdateExec = "ngorm:update_exec_hook"
IgnoreProtectedAttrs = "ngorm:ignore_protected_attrs"
DeleteOption = "ngorm:delete_options"
BeforeDelete = "ngorm:before_delete"
HookBeforeDelete = "ngorm:before_delete_hook"
AfterDelete = "ngorm:after_delete"
HookAfterDelete = "ngorm:after_delete_hook"
Delete = "ngorm:delete"
DeleteSQL = "ngorm:delete_sql"
SaveAssociations = "ngorm:save_associations"
Preload = "ngorm:preload"
HookSaveAfterAss = "ngorm:save_after_association"
AssociationSource = "ngorm:association:source"
)
//Model defines common fields that are used for defining SQL Tables. This is a
//helper that you can embed in your own struct definition.
//
// By embedding this, there is no need to define the supplied fields. For
// example.
//
// type User struct {
// Model
// Name string
// }
// Is the same as this
// type User struct {
// ID uint `gorm:"primary_key"`
// CreatedAt time.Time
// UpdatedAt time.Time
// DeletedAt *time.Time `sql:"index"`
// Name string
// }
type Model struct {
ID int64 `gorm:"primary_key" json:"id"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt *time.Time `sql:"index" json:"deleted_at"`
}
//Struct model definition
type Struct struct {
PrimaryFields []*StructField
StructFields []*StructField
ModelType reflect.Type
DefaultTableName string
}
// StructField model field's struct definition
type StructField struct {
// DBName is the name of the field as it is seen in the database, for
// instance a field ID can be represented in the database as id.
DBName string
Name string
Names []string
IsPrimaryKey bool
IsNormal bool
IsIgnored bool
IsScanner bool
HasDefaultValue bool
Tag reflect.StructTag
TagSettings map[string]string
Struct reflect.StructField
IsForeignKey bool
Relationship *Relationship
}
//Clone retruns a deep copy of the StructField
func (s *StructField) Clone() *StructField {
clone := &StructField{
DBName: s.DBName,
Name: s.Name,
Names: s.Names,
IsPrimaryKey: s.IsPrimaryKey,
IsNormal: s.IsNormal,
IsIgnored: s.IsIgnored,
IsScanner: s.IsScanner,
HasDefaultValue: s.HasDefaultValue,
Tag: s.Tag,
TagSettings: map[string]string{},
Struct: s.Struct,
IsForeignKey: s.IsForeignKey,
Relationship: s.Relationship,
}
for key, value := range s.TagSettings {
clone.TagSettings[key] = value
}
return clone
}
// Relationship described the relationship between models
type Relationship struct {
Kind string
PolymorphicType string
PolymorphicDBName string
PolymorphicValue string
ForeignFieldNames []string
ForeignDBNames []string
AssociationForeignFieldNames []string
AssociationForeignDBNames []string
JoinTableHandler *JoinTableHandler
}
//ParseTagSetting returns a map[string]string for the tags that are set.
func ParseTagSetting(tags reflect.StructTag) map[string]string {
setting := map[string]string{}
for _, str := range []string{tags.Get("sql"), tags.Get("gorm")} {
tags := strings.Split(str, ";")
for _, value := range tags {
v := strings.Split(value, ":")
k := strings.TrimSpace(strings.ToUpper(v[0]))
if len(v) >= 2 {
setting[k] = strings.Join(v[1:], ":")
} else {
setting[k] = k
}
}
}
return setting
}
//SafeStructsMap provide safe storage and accessing of *Struct.
type SafeStructsMap struct {
v []*Struct
mu sync.RWMutex
}
//Set safely stores value
func (s *SafeStructsMap) Set(value *Struct) {
s.mu.Lock()
defer s.mu.Unlock()
s.v = append(s.v, value)
}
//Get retrieves the value stored with the given key.
func (s *SafeStructsMap) Get(key reflect.Type) *Struct {
s.mu.RLock()
defer s.mu.RUnlock()
for _, v := range s.v {
if v.ModelType == key {
return v
}
}
return nil
}
//NewStructsMap returns a safe map for storing *Struct objects.
func NewStructsMap() *SafeStructsMap {
return &SafeStructsMap{}
}
//Scope is the scope level of SQL building.
type Scope struct {
Value interface{}
TableName string
v reflect.Value
hasValue bool
SQL string
SQLVars []interface{}
SelectAttrs []string
MultiExpr bool
Exprs []*Expr
mu sync.RWMutex
data map[string]interface{}
}
//NewScope return an empty scope. The scope is initialized to allow Set, and Get
//methods to work.
func NewScope() *Scope {
return &Scope{
data: make(map[string]interface{}),
}
}
func (s *Scope) ValueOf() reflect.Value {
if s.hasValue {
return s.v
}
s.v = reflect.ValueOf(s.Value)
s.hasValue = true
return s.v
}
func (s *Scope) ContextValue(v interface{}) {
s.hasValue = true
if i, ok := v.(reflect.Value); ok {
s.Value = i.Interface()
s.v = i
} else {
s.Value = v
s.v = reflect.ValueOf(s.Value)
}
}
//Set sets a scope specific key value. This is only available in the scope.
func (s *Scope) Set(key string, value interface{}) {
s.mu.Lock()
s.data[key] = value
s.mu.Unlock()
}
//Get retrieves the value with key from the scope.
func (s *Scope) Get(key string) (interface{}, bool) {
s.mu.RLock()
v, ok := s.data[key]
s.mu.RUnlock()
return v, ok
}
//GetAll returns all values stored in this context.
func (s *Scope) GetAll() map[string]interface{} {
s.mu.RLock()
a := make(map[string]interface{})
for k, v := range s.data {
a[k] = v
}
s.mu.RUnlock()
return a
}
// TypeName returns the name of the type contained in Scope.Value
func (s *Scope) TypeName() string {
val := reflect.ValueOf(s.Value)
if val.Kind() == reflect.Ptr {
val = val.Elem()
}
typ := val.Type()
for typ.Kind() == reflect.Slice || typ.Kind() == reflect.Ptr {
typ = typ.Elem()
}
return typ.Name()
}
//Search is the search level of SQL building
type Search struct {
WhereConditions []map[string]interface{}
OrConditions []map[string]interface{}
NotConditions []map[string]interface{}
HavingConditions []map[string]interface{}
JoinConditions []map[string]interface{}
InitAttrs []interface{}
AssignAttrs []interface{}
Selects map[string]interface{}
Omits []string
Orders []interface{}
Preload []SearchPreload
Offset interface{}
Limit interface{}
Group string
TableName string
TableNames []string
Raw bool
Unscoped bool
IgnoreOrderQuery bool
}
//SearchPreload is the preload search condition.
type SearchPreload struct {
Schema string
Conditions []interface{}
}
//SQLCommon is the interface for SQL database interactions.
type SQLCommon interface {
Exec(query string, args ...interface{}) (sql.Result, error)
Prepare(query string) (*sql.Stmt, error)
Query(query string, args ...interface{}) (*sql.Rows, error)
QueryRow(query string, args ...interface{}) *sql.Row
Begin() (*sql.Tx, error)
Close() error
}
// Expr is SQL expression
type Expr struct {
Q string
Args []interface{}
}
//JoinTableForeignKey info that point to a key to use in join table.
type JoinTableForeignKey struct {
DBName string
AssociationDBName string
}
// JoinTableSource is a struct that contains model type and foreign keys
type JoinTableSource struct {
ModelType reflect.Type
ForeignKeys []JoinTableForeignKey
}
// JoinTableHandler default join table handler
type JoinTableHandler struct {
TableName string `sql:"-"`
Source JoinTableSource `sql:"-"`
Destination JoinTableSource `sql:"-"`
}
type SQLCommonWrapper struct {
SQLCommon
verbose bool
o io.Writer
}
func (s *SQLCommonWrapper) printQuery(w, q string, args ...interface{}) {
if s.o == nil {
s.o = os.Stdout
}
fmt.Fprintf(s.o, "ngorm:[%s] %s \t ==> ARGS %v\n", w, q, args)
}
func (s *SQLCommonWrapper) Exec(query string, args ...interface{}) (sql.Result, error) {
if s.verbose {
s.printQuery("EXEC", query, args...)
}
return s.SQLCommon.Exec(query, args...)
}
func (s *SQLCommonWrapper) Query(query string, args ...interface{}) (*sql.Rows, error) {
if s.verbose {
s.printQuery("QUERY", query, args...)
}
return s.SQLCommon.Query(query, args...)
}
func (s *SQLCommonWrapper) QueryRow(query string, args ...interface{}) *sql.Row {
if s.verbose {
s.printQuery("QUERY", query, args...)
}
return s.SQLCommon.QueryRow(query, args...)
}
func (s *SQLCommonWrapper) Verbose(b bool) {
s.verbose = b
}
| ngorm/ngorm | model/struct.go | GO | mit | 10,652 |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Ember.js Authentication Example</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
{{content-for 'head'}}
<link rel="stylesheet" href="assets/vendor.css">
<link rel="stylesheet" href="assets/ember-auth-example.css">
{{content-for 'head-footer'}}
</head>
<body>
{{content-for 'body'}}
<script src="assets/vendor.js"></script>
<script src="assets/ember-auth-example.js"></script>
{{content-for 'body-footer'}}
</body>
</html>
| BrewhouseTeam/ember-auth-example | app/index.html | HTML | mit | 666 |
package com.meyersj.mobilesurveyor.app.util;
import android.content.Context;
import android.graphics.Paint;
import android.util.Log;
import com.cocoahero.android.geojson.Feature;
import com.cocoahero.android.geojson.FeatureCollection;
import com.cocoahero.android.geojson.LineString;
import com.cocoahero.android.geojson.MultiLineString;
import com.mapbox.mapboxsdk.geometry.BoundingBox;
import com.mapbox.mapboxsdk.geometry.LatLng;
import com.mapbox.mapboxsdk.overlay.PathOverlay;
import com.mapbox.mapboxsdk.util.DataLoadingUtils;
//import com.mapbox.mapboxsdk.util.GeoUtils;
import com.mapbox.mapboxsdk.views.MapView;
import org.json.JSONArray;
import org.json.JSONException;
import java.io.IOException;
import java.util.ArrayList;
/**
* Created by jeff on 1/26/15.
*/
public class TransitRoute {
protected final String TAG = "TransitRoute";
protected Context context;
protected String key;
protected Boolean valid = true;
protected Paint paint;
protected ArrayList<PathOverlay> paths = new ArrayList<PathOverlay>();
protected BoundingBox bbox;
protected ArrayList<LatLng> allPoints = new ArrayList<LatLng>();
public TransitRoute(Context context, String line, String dir, Paint paint) {
this.key = line + "_" + dir;
this.context = context;
this.paint = paint;
String assetsFile = "geojson/" + this.key + "_routes.geojson";
try {
FeatureCollection features = DataLoadingUtils.loadGeoJSONFromAssets(context, assetsFile);
for(Feature feature: features.getFeatures()) {
if (feature.getGeometry() instanceof LineString) {
JSONArray points = (JSONArray) feature.getGeometry().toJSON().get("coordinates");
construct(points);
} else if (feature.getGeometry() instanceof MultiLineString) {
JSONArray lines = (JSONArray) feature.getGeometry().toJSON().get("coordinates");
for (int k = 0; k < lines.length(); k++) {
JSONArray points = (JSONArray) lines.get(k);
construct(points);
}
}
}
bbox = null; //GeoUtils.findBoundingBoxForGivenLocations(allPoints, Cons.PADDING);
} catch (IOException e) {
Log.d(TAG, e.toString());
valid = false;
Log.d(TAG, e.toString());
e.printStackTrace();
} catch (JSONException e) {
valid = false;
Log.d(TAG, e.toString());
e.printStackTrace();
}
}
protected void construct(JSONArray points) throws JSONException {
PathOverlay path = new PathOverlay();
JSONArray coordinates;
for (int i = 0; i < points.length(); i++) {
coordinates = (JSONArray) points.get(i);
double lon = (Double) coordinates.get(0);
double lat = (Double) coordinates.get(1);
LatLng latLng = new LatLng(lat, lon);
path.addPoint(latLng);
}
path.setPaint(paint);
paths.add(path);
}
public void addRoute(MapView mapView, Boolean zoomTo) {
for(PathOverlay path: paths) {
mapView.addOverlay(path);
}
if(zoomTo) zoomTo(mapView);
}
public void clearRoute(MapView mapView) {
for(PathOverlay path: paths) {
mapView.removeOverlay(path);
}
}
public void zoomTo(MapView mapView) {
if(bbox != null) {
//mapView.zoomToBoundingBox(bbox);
}
}
public Boolean isValid() {
return valid;
}
}
| TransitSurveyor/MobileSurveyor | app/src/main/java/com/meyersj/mobilesurveyor/app/util/TransitRoute.java | Java | mit | 3,660 |
---
layout: post
title: "汇编语言"
date: 2018-03-01 09:00:00
categories: Assembly
---
**汇编语言(Assembly Language)**
汇编涉及的知识点较多,由浅入深会分为以下几个部分(此文并非从零开始讲解汇编,适合有一定汇编基础的读者):
1. 汇编
2. CPU与内存
3. 汇编例子详解(模拟器)
4. 汇编例子详解(真机)
5. 其他
# 1. 汇编
  日常开发中,利用汇编开发的机会并不多,汇编处于高级语言与机器语言之间的位置。
  汇编代码与CPU具体情况密切相关,编译时,每条汇编指令都与机器指令相对应。
汇编通过编译后,成为机器码,机器码因存放在不同的`Segment`而导致被赋予不同的意义。
(电影The Matrix中,那个吹牛的配角说二进制瀑布流看久了就懂意思的,在了解后就会发现这个技能要获得是非常非常难的。)
  汇编格式分为Intel与AT&T两种,以下是他们的区别(来自Wiki):
|项目 |Intel风格 |AT&T风格
|-----------------------------------|---------------------------------------------------------------|--------
|操作数顺序 |目标操作数在前 |源操作数在前
|寄存器名字 |原样 |加%前缀
|立即数 |原样 |加$前缀
|16进制立即数 |用后缀b与h分别表示二进制与十六进制 对于16进制字母开头的要加前缀0 |加前缀0x
|访问内存长度的表示 |前缀byte ptr, word ptr, dword ptr |后缀b、w、l表示字节、字、长型
|引用全局或静态变量var的值 |[_var] |_var
|引用全局或静态变量var的地址 |\_var |$_var
|引用局部变量 |需要基于栈指针(ESP)
|内存直接寻址 |seg_reg: [base + index * scale + immed32] |seg_reg: immed32 (base, index, scale)
|寄存器间址 |[reg] |(%reg)
|寄存器变址寻址 |[reg + _x] |_x(%reg)
|立即数变址寻址 |[reg + 1] |1(%reg)
|整数数组寻址 |[eax*4 + array] |_array (,%eax, 4)
# 2. CPU与内存
  要理解CPU,就要先理解CPU关于总线的知识。
CPU的总线由芯片管脚延伸(管脚少的或许可以直接插,但现代芯片小,管脚多,多采用贴片方式,工艺这里就不展开了),连接到主板,通过主板线路连接并控制相关资源。
  总线大体分三类,即:
* 地址总线
* 数据总线
* 控制总线
  它们相互配合,读写内存,从而达到处理信息的目的。(非嵌入式开发时,关注地址总线的情况比较多)
### 2.1 地址总线
  地址总线:宽度决定CPU的寻址能力,与内存相关,例如:地址总线宽度为64,那么寻址能力就是(2^64)那么多。
*备注:内存中,每个单位为1Byte,即8Bit,寻址时,每个地址都是按Byte算的。(1 word = 2 Byte = 16 Bit)
比较容易理解的例子就是32位时代时,内存最大只能4GB,那是因为32位CPU寻址能力只有4G(2^32),在这之后就算加上再多的内存,CPU寻址不了,也是没用,而现在64位时代,没有了这种限制。另外,在ARM64中,对栈的操作是16字节对齐的(可以理解为每个地址指向的数据长度为16Byte,即128Bit)。*
### 2.2 数据总线
  数据总线:宽度决定CPU单词数据传送量,体现为传送速度。
*备注:各家CPU数据总线都有可能不同,例如:在地址总线宽度为64的情况下,地址总线为32条时,一条完整的数据要分高低位(HL,大端:高低高低,小端:高高低低,大小端知识这里不展开)传送2次;如果地址总线为64条,那么只需要传送1次就可以。这就体现出速度了。*
### 2.3 控制总线
  控制总线:发送CPU控制信号,宽度由控制信号多少决定。例如:发送读信号时,读取内存当前寻址地址的值,并通过数据总线返回这个值。
### 2.4 寄存器
  CPU通过数据总线获得数据后,会放在寄存器中,等待运算器对其进行处理。寄存器个数和结构根据CPU不同而不同,汇编就是一门可以操作寄存器的语言。
  通用寄存器有什么,网上一搜一大把,这里就不贴出来了,具体跑起来时怎么样的,在下面会详细讲解。
  这里讲解一下比较关键的几个寄存器,如下:
* CS:IP: 代码段寄存器(Code Segment)及(Instruction Pointer)指令指针寄存器,当IP指向某一地址时,此地址内的值即被CPU认为是代码,并通过CPU解析读取并运算。*(CS:IP无法被直接赋值,只能通过类似`jmp`、`call`等指令来控制。
在寻址能力比较低的时候,为了能获得更强的寻址能力,只用了CS:IP这种形式的寻址方式,现在在寻址能力足够的情况下,可以直接通过IP指向具体地址,减少了与CS的组合。)*
* DS:数据段寄存器(Data Segment),当某个地址赋值给DS时,此地址加上的值即被CPU认为是数据,可通过增加偏移值进行寻址获取值。
* SS:SP:堆栈段寄存器(Stack Segment)及栈顶指针(Stack Pointer),用于物理意义上的入栈出栈(FILO),SP为栈顶指针。*(当SS:SP被指定时,堆栈大小即被指定,SP通过`push`进行入栈,`pop`进行出栈,需要注意栈顶越界问题。)*
  在ARM64中,因各方面的进步,在寻址和计算方面都得到升级,`PC`寄存器的功能与上述的`CS:IP`类似,它指向将被执行的指令地址。现在比较强大的CPU也都基本拥有一级缓存与二级缓存,更加强大的甚至有三级缓存,用于把内存中的指令缓存到处理器中,在处理器需要时以更快的速度处理。另外,想要读懂ARM64中的汇编,`PC`、`SP`、`FP`、`LR`这几个寄存器要结合观察(以A11处理器为例,通过Xcode查看的汇编中,`FP`、`LR`并不能直观看到,因为它们是`x29`、`x30`通用寄存器,但Xcode的`Variable View`是能看到它们的,同样地,也能看到浮点寄存器和向量寄存器等寄存器。)
  另外,还有一个寄存器`cpsr`(current program status register,当前程序状态寄存器),是一个32位按位标记状态的寄存器,用于存储条件码。其中`adds`、`subs`等指令会影响此寄存器,在分析App的汇编代码时,需要关注最后四位,即28、29、30、31的位数据,分别对应如下:
* 28 Bit,V,溢出标志。溢出时为1,否则为0。
* 29 Bit,C,进借位标志。加法产生进位时,C=1,反之C=0;减法产生借位时,C=0,反之C=1。
* 30 Bit,Z,零标志。执行运算后,结果为0时,Z=1,反之Z=0。
* 31 Bit,N,负数标志。执行运算后,结果为负时,N=1,反之N=0。
# 3. 汇编例子详解(模拟器)
  以上作为讲解的预备知识差不多了,下面将大篇幅根据实际例子进行讲解。(为便于理解,建议分屏跟踪查看)
* 平台:iOS
* 语言:Objective-C
* 源码地址:[源码](https://github.com/lzackx/Zone/tree/master/iOS/AssemblyLanguage)
* 运行环境:模拟器(即x86_64上,若运行环境为真机,即arm64,可以发现汇编格式会改变为Intel风格)
  *下面是ViewController.m文件*
```objc
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
// Xcode 9想要这样写C函数不报错,记得在Build SettingS中改下C Language Dialect
int function(int a, int b, int c) {
return a + b + c;
}
- (int)methodWithA:(int)a b:(int)b c:(int)c {
return a + b + c;
}
- (int)methodWithX:(int)x y:(int)y z:(int)z {
function(x, y, z);
return x + y + z;
}
- (void)viewDidLoad {
[super viewDidLoad];
int parameter1 = 1;
int parameter2 = 2;
int parameter3 = 3;
function(parameter1, parameter2, parameter3);
[self methodWithA:parameter1 b:parameter2 c:parameter3];
[self methodWithX:parameter1 y:parameter2 z:parameter3];
}
@end
```
  以下汇编皆为在`Debug`的配置下运行。`Release`时,编译器会对代码进行优化,优化等级可在`Build Setting`中设置。
  *下面是viewDidLoad在模拟器中运行时的汇编代码, 为便于讲解,加上了行号*
```
1 AssemblyLanguage`-[ViewController viewDidLoad]:
2 0x10867e660 <+0>: pushq %rbp
3 0x10867e661 <+1>: movq %rsp, %rbp
4 0x10867e664 <+4>: subq $0x50, %rsp
5 0x10867e668 <+8>: leaq -0x20(%rbp), %rax
6 0x10867e66c <+12>: movq %rdi, -0x8(%rbp)
7 0x10867e670 <+16>: movq %rsi, -0x10(%rbp)
8 0x10867e674 <+20>: movq -0x8(%rbp), %rsi
9 0x10867e678 <+24>: movq %rsi, -0x20(%rbp)
10 0x10867e67c <+28>: movq 0x263d(%rip), %rsi ; (void *)0x0000000108680cd0: ViewController
11 0x10867e683 <+35>: movq %rsi, -0x18(%rbp)
12 0x10867e687 <+39>: movq 0x260a(%rip), %rsi ; "viewDidLoad"
13 0x10867e68e <+46>: movq %rax, %rdi
14 0x10867e691 <+49>: callq 0x10867ea22 ; symbol stub for: objc_msgSendSuper2
15 0x10867e696 <+54>: movl $0x1, -0x24(%rbp)
16 0x10867e69d <+61>: movl $0x2, -0x28(%rbp)
17 0x10867e6a4 <+68>: movl $0x3, -0x2c(%rbp)
18 0x10867e6ab <+75>: movl -0x24(%rbp), %edi
19 0x10867e6ae <+78>: movl -0x28(%rbp), %esi
20 0x10867e6b1 <+81>: movl -0x2c(%rbp), %edx
21 0x10867e6b4 <+84>: callq 0x10867e5d0 ; function at ViewController.m:17
22 0x10867e6b9 <+89>: movq -0x8(%rbp), %rcx
23 0x10867e6bd <+93>: movl -0x24(%rbp), %edx
24 0x10867e6c0 <+96>: movl -0x28(%rbp), %esi
25 0x10867e6c3 <+99>: movl -0x2c(%rbp), %r8d
26 0x10867e6c7 <+103>: movq 0x25d2(%rip), %r9 ; "methodWithA:b:c:"
27 0x10867e6ce <+110>: movq %rcx, %rdi
28 0x10867e6d1 <+113>: movl %esi, -0x30(%rbp)
29 0x10867e6d4 <+116>: movq %r9, %rsi
30 0x10867e6d7 <+119>: movl -0x30(%rbp), %ecx
31 0x10867e6da <+122>: movl %eax, -0x34(%rbp)
32 0x10867e6dd <+125>: callq 0x10867ea1c ; symbol stub for: objc_msgSend
33 0x10867e6e2 <+130>: movq -0x8(%rbp), %rsi
34 0x10867e6e6 <+134>: movl -0x24(%rbp), %edx
35 0x10867e6e9 <+137>: movl -0x28(%rbp), %ecx
36 0x10867e6ec <+140>: movl -0x2c(%rbp), %r8d
37 0x10867e6f0 <+144>: movq 0x25b1(%rip), %rdi ; "methodWithX:y:z:"
38 0x10867e6f7 <+151>: movq %rdi, -0x40(%rbp)
39 0x10867e6fb <+155>: movq %rsi, %rdi
40 0x10867e6fe <+158>: movq -0x40(%rbp), %rsi
41 0x10867e702 <+162>: movl %eax, -0x44(%rbp)
42 0x10867e705 <+165>: callq 0x10867ea1c ; symbol stub for: objc_msgSend
43 0x10867e70a <+170>: movl %eax, -0x48(%rbp)
44 0x10867e70d <+173>: addq $0x50, %rsp
45 0x10867e711 <+177>: popq %rbp
46 0x10867e712 <+178>: retq
```
  *下面是`int function(int a, int b, int c)`函数的汇编代码, 为便于讲解,加上了行号*
```
1 AssemblyLanguage`function:
2 0x10867e5d0 <+0>: pushq %rbp
3 0x10867e5d1 <+1>: movq %rsp, %rbp
4 0x10867e5d4 <+4>: movl %edi, -0x4(%rbp)
5 0x10867e5d7 <+7>: movl %esi, -0x8(%rbp)
6 0x10867e5da <+10>: movl %edx, -0xc(%rbp)
7 0x10867e5dd <+13>: movl -0x4(%rbp), %edx
8 0x10867e5e0 <+16>: addl -0x8(%rbp), %edx
9 0x10867e5e3 <+19>: addl -0xc(%rbp), %edx
10 0x10867e5e6 <+22>: movl %edx, %eax
11 0x10867e5e8 <+24>: popq %rbp
12 0x10867e5e9 <+25>: retq
```
  *下面是`- (int)methodWithA:(int)a b:(int)b c:(int)c`方法的汇编代码, 为便于讲解,加上了行号*
```
1 AssemblyLanguage`-[ViewController methodWithA:b:c:]:
2 0x10867e5f0 <+0>: pushq %rbp
3 0x10867e5f1 <+1>: movq %rsp, %rbp
4 0x10867e5f4 <+4>: movq %rdi, -0x8(%rbp)
5 0x10867e5f8 <+8>: movq %rsi, -0x10(%rbp)
6 0x10867e5fc <+12>: movl %edx, -0x14(%rbp)
7 0x10867e5ff <+15>: movl %ecx, -0x18(%rbp)
8 0x10867e602 <+18>: movl %r8d, -0x1c(%rbp)
9 0x10867e606 <+22>: movl -0x14(%rbp), %ecx
10 0x10867e609 <+25>: addl -0x18(%rbp), %ecx
11 0x10867e60c <+28>: addl -0x1c(%rbp), %ecx
12 0x10867e60f <+31>: movl %ecx, %eax
13 0x10867e611 <+33>: popq %rbp
14 0x10867e612 <+34>: retq
```
  *下面是`- (int)methodWithX:(int)x y:(int)y z:(int)z`方法的汇编代码, 为便于讲解,加上了行号*
```
1 AssemblyLanguage`-[ViewController methodWithX:y:z:]:
2 0x10867e620 <+0>: pushq %rbp
3 0x10867e621 <+1>: movq %rsp, %rbp
4 0x10867e624 <+4>: subq $0x20, %rsp
5 0x10867e628 <+8>: movq %rdi, -0x8(%rbp)
6 0x10867e62c <+12>: movq %rsi, -0x10(%rbp)
7 0x10867e630 <+16>: movl %edx, -0x14(%rbp)
8 0x10867e633 <+19>: movl %ecx, -0x18(%rbp)
9 0x10867e636 <+22>: movl %r8d, -0x1c(%rbp)
10 0x10867e63a <+26>: movl -0x14(%rbp), %edi
11 0x10867e63d <+29>: movl -0x18(%rbp), %esi
12 0x10867e640 <+32>: movl -0x1c(%rbp), %edx
13 0x10867e643 <+35>: callq 0x10867e5d0 ; function at ViewController.m:17
14 0x10867e648 <+40>: movl -0x14(%rbp), %ecx
15 0x10867e64b <+43>: addl -0x18(%rbp), %ecx
16 0x10867e64e <+46>: addl -0x1c(%rbp), %ecx
17 0x10867e651 <+49>: movl %eax, -0x20(%rbp)
18 0x10867e654 <+52>: movl %ecx, %eax
19 0x10867e656 <+54>: addq $0x20, %rsp
20 0x10867e65a <+58>: popq %rbp
21 0x10867e65b <+59>: retq
```
### 3.1 变量
##### 3.1.1 局部变量
  这里以`viewDidLoad`方法第3、4行的指令为例,即:
```armasm
movq %rsp, %rbp
subq $0x50, %rsp
```
  这里在进入方法后,编译器知道方法内部有局部变量,所以在把Objective-C方法编译成汇编时,会开辟存放局部变量的栈空间。
  从这句指令可以发现,它的本质就是把`sp`(栈顶指针)地址减0x50,那么就等于开辟了0x50那么大的栈空间,并且通过第15~17行代码,即如下指令,把局部变量1、2、3赋值到对应空间的内存中。
这里或许会奇怪,`bp`又是什么鬼?`bp`其实就是基数指针,因为`SS:SP`之间的差值具有表达栈大小的意义,所以在需要读写栈中内存时,需要这个叫`bp`的指针。
```armasm
movl $0x1, -0x24(%rbp)
movl $0x2, -0x28(%rbp)
movl $0x3, -0x2c(%rbp)
```
##### 3.1.2 参数
  以`viewDidLoad`方法第18~20行的指令为例,即:
```armasm
movl -0x24(%rbp), %edi
movl -0x28(%rbp), %esi
movl -0x2c(%rbp), %edx
```
  因为在第15~17行中,已经把局部变量赋值到栈内存中,所以通过一样的地址,可以把它们都分别取出来并赋值到其他的通用寄存器中。
  这里需要注意的是,并不一定所有情况都是直接赋值到通用寄存器中的。当参数数量很多,多于用于存储参数的寄存器数量时,编译器无法把所有参数放到寄存器中,于是参数会被入栈,当需要用时再出栈。
**备注:当参数以入栈的形式传递时,栈中的顺序将变成如下所示的形式,在`bp`保护现场后,`bp`寄存器加出来的获取的变量必定是局部变量,而减出来获得的变量必定是参数**

##### 3.1.3 返回值
  返回值在汇编中,是比较不起眼的,这里以`function`中第10行中的汇编指令为例,即:
```armasm
movl %edx, %eax
```
  可以看到,这里的`ax`内的值,便是返回值,`ax`是一个通用寄存器,CPU能在任何时候访问,所以当函数或方法执行完毕后,在重新给这个寄存器赋值前,如果需要获取该值,编译器会直接读取这个寄存器的值。
### 3.2 函数或方法
  Objective-C与其他语言都不同的一点是,其他语言要执行一个函数或方法的时候,叫做"调用",而在Objective-C中,会被叫作“发送信息”。
在这里可以稍微看到,每一个`callq`后面都被注释了`objc_msgSend`或`objc_msgSendSuper2`,这就是它的本质。鉴于本文主题并非这个,所以就不展开了。
  现在以`viewDidLoad`方法内第21行的汇编代码为例,它是调用`function`的一段指令,如下:
```armasm
callq 0x10867e5d0
```
  这是一条`call`指令,它会把下一条指令的地址(在这里就是第22行的地址0x10867e6b9)入栈,然后再把`ip`指向`0x10867e5d0`这个地址,并执行下去。
  `0x10867e5d0`这个地址无疑就是`function`函数的入口地址,在该函数调用完毕后,可以看到`function`的最后一行,即如下指令。
```armasm
retq
```
  该指令就是把一开始入栈了的0x10867e6b9指令(即进入该函数前的下一条指令的地址)出栈,并让`ip`指向它,使其跳出`function`函数,并继续执行剩下的指令。
### 3.3 栈平衡
  栈平衡产生的原因,在于`call`指令之后,会进行入栈操作,`sp`在不断的入栈出栈后,指向不同的地址,当所有指令执行完毕后,若`sp`最后`pop`出来的不是`call`前的下一条指令,多出来的栈空间在重复这样操作后,就会出现因内存泄漏导致的内存溢出。
##### 3.3.1 外平栈
  在`call`外部入栈后,在`call`的`ret`后,需要把`sp`回到入栈前的地址。
##### 3.3.2 内平栈
  外平栈的做法不适合放在函数内部,因为`ret`前进行`sp`地址操作,会让`ret`取不到`call`前入栈的下一条指令的地址。但可以让`ret`后加地址偏移值来达到这个效果。
### 3.4 现场保护
  可以看到基本每个函数或方法,在开始与结束时,都会有相同的指令,如下:
```armasm
pushq %rbp
movq %rsp, %rbp
...
popq %rbp
```
  这几句指令,是为了保护`bp`在`call`前的值,防止在当前函数或方法调用其他函数或方法后`bp`值丢失导致无法返回前一个函数或方法并继续执行下去的保护操作。
  同样的,不止`bp`如此,其他通用寄存器也需要进行入栈出栈的保护操作。
# 4. 汇编例子详解(真机)
### 4.1 汇编示例
  上述同样的代码,运行在真机中时的汇编如下:
  *下面是viewDidLoad在模拟器中运行时的汇编代码, 为便于讲解,加上了行号*
```
1 AssemblyLanguage`-[ViewController viewDidLoad]:
2 0x1043ae700 <+0>: sub sp, sp, #0x50 ; =0x50
3 0x1043ae704 <+4>: stp x29, x30, [sp, #0x40]
4 0x1043ae708 <+8>: add x29, sp, #0x40 ; =0x40
5 0x1043ae70c <+12>: add x8, sp, #0x20 ; =0x20
6 0x1043ae710 <+16>: adrp x9, 2
7 0x1043ae714 <+20>: add x9, x9, #0xc98 ; =0xc98
8 0x1043ae718 <+24>: adrp x10, 2
9 0x1043ae71c <+28>: add x10, x10, #0xcc0 ; =0xcc0
10 0x1043ae720 <+32>: stur x0, [x29, #-0x8]
11 0x1043ae724 <+36>: stur x1, [x29, #-0x10]
12 0x1043ae728 <+40>: ldur x0, [x29, #-0x8]
13 0x1043ae72c <+44>: str x0, [sp, #0x20]
14 0x1043ae730 <+48>: ldr x10, [x10]
15 0x1043ae734 <+52>: str x10, [sp, #0x28]
16 0x1043ae738 <+56>: ldr x1, [x9]
17 0x1043ae73c <+60>: mov x0, x8
18 0x1043ae740 <+64>: bl 0x1043aeb6c ; symbol stub for: objc_msgSendSuper2
19 0x1043ae744 <+68>: orr w11, wzr, #0x3
20 0x1043ae748 <+72>: orr w12, wzr, #0x2
21 0x1043ae74c <+76>: orr w13, wzr, #0x1
22 0x1043ae750 <+80>: str w13, [sp, #0x1c]
23 0x1043ae754 <+84>: str w12, [sp, #0x18]
24 0x1043ae758 <+88>: str w11, [sp, #0x14]
25 0x1043ae75c <+92>: ldr w0, [sp, #0x1c]
26 0x1043ae760 <+96>: ldr w1, [sp, #0x18]
27 0x1043ae764 <+100>: ldr w2, [sp, #0x14]
28 0x1043ae768 <+104>: bl 0x1043ae648 ; function at ViewController.m:17
29 0x1043ae76c <+108>: adrp x8, 2
30 0x1043ae770 <+112>: add x8, x8, #0xca0 ; =0xca0
31 0x1043ae774 <+116>: ldur x9, [x29, #-0x8]
32 0x1043ae778 <+120>: ldr w2, [sp, #0x1c]
33 0x1043ae77c <+124>: ldr w3, [sp, #0x18]
34 0x1043ae780 <+128>: ldr w4, [sp, #0x14]
35 0x1043ae784 <+132>: ldr x1, [x8]
36 0x1043ae788 <+136>: str w0, [sp, #0x10]
37 0x1043ae78c <+140>: mov x0, x9
38 0x1043ae790 <+144>: bl 0x1043aeb60 ; symbol stub for: objc_msgSend
39 0x1043ae794 <+148>: adrp x8, 2
40 0x1043ae798 <+152>: add x8, x8, #0xca8 ; =0xca8
41 0x1043ae79c <+156>: ldur x9, [x29, #-0x8]
42 0x1043ae7a0 <+160>: ldr w2, [sp, #0x1c]
43 0x1043ae7a4 <+164>: ldr w3, [sp, #0x18]
44 0x1043ae7a8 <+168>: ldr w4, [sp, #0x14]
45 0x1043ae7ac <+172>: ldr x1, [x8]
46 0x1043ae7b0 <+176>: str w0, [sp, #0xc]
47 0x1043ae7b4 <+180>: mov x0, x9
48 0x1043ae7b8 <+184>: bl 0x1043aeb60 ; symbol stub for: objc_msgSend
49 0x1043ae7bc <+188>: str w0, [sp, #0x8]
50 0x1043ae7c0 <+192>: ldp x29, x30, [sp, #0x40]
51 0x1043ae7c4 <+196>: add sp, sp, #0x50 ; =0x50
52 0x1043ae7c8 <+200>: ret
```
  *下面是`int function(int a, int b, int c)`函数的汇编代码, 为便于讲解,加上了行号*
```
1 AssemblyLanguage`function:
2 0x1043ae648 <+0>: sub sp, sp, #0x10 ; =0x10
3 0x1043ae64c <+4>: str w0, [sp, #0xc]
4 0x1043ae650 <+8>: str w1, [sp, #0x8]
5 0x1043ae654 <+12>: str w2, [sp, #0x4]
6 0x1043ae658 <+16>: ldr w0, [sp, #0xc]
7 0x1043ae65c <+20>: ldr w1, [sp, #0x8]
8 0x1043ae660 <+24>: add w0, w0, w1
9 0x1043ae664 <+28>: ldr w1, [sp, #0x4]
10 0x1043ae668 <+32>: add w0, w0, w1
11 0x1043ae66c <+36>: add sp, sp, #0x10 ; =0x10
12 0x1043ae670 <+40>: ret
```
  *下面是`- (int)methodWithA:(int)a b:(int)b c:(int)c`方法的汇编代码, 为便于讲解,加上了行号*
```
1 AssemblyLanguage`-[ViewController methodWithA:b:c:]:
2 0x1043ae674 <+0>: sub sp, sp, #0x20 ; =0x20
3 0x1043ae678 <+4>: str x0, [sp, #0x18]
4 0x1043ae67c <+8>: str x1, [sp, #0x10]
5 0x1043ae680 <+12>: str w2, [sp, #0xc]
6 0x1043ae684 <+16>: str w3, [sp, #0x8]
7 0x1043ae688 <+20>: str w4, [sp, #0x4]
8 0x1043ae68c <+24>: ldr w2, [sp, #0xc]
9 0x1043ae690 <+28>: ldr w3, [sp, #0x8]
10 0x1043ae694 <+32>: add w2, w2, w3
11 0x1043ae698 <+36>: ldr w3, [sp, #0x4]
12 0x1043ae69c <+40>: add w0, w2, w3
13 0x1043ae6a0 <+44>: add sp, sp, #0x20 ; =0x20
14 0x1043ae6a4 <+48>: ret
```
  *下面是`- (int)methodWithX:(int)x y:(int)y z:(int)z`方法的汇编代码, 为便于讲解,加上了行号*
```
1 AssemblyLanguage`-[ViewController methodWithX:y:z:]:
2 0x1043ae6a8 <+0>: sub sp, sp, #0x30 ; =0x30
3 0x1043ae6ac <+4>: stp x29, x30, [sp, #0x20]
4 0x1043ae6b0 <+8>: add x29, sp, #0x20 ; =0x20
5 0x1043ae6b4 <+12>: stur x0, [x29, #-0x8]
6 0x1043ae6b8 <+16>: str x1, [sp, #0x10]
7 0x1043ae6bc <+20>: str w2, [sp, #0xc]
8 0x1043ae6c0 <+24>: str w3, [sp, #0x8]
9 0x1043ae6c4 <+28>: str w4, [sp, #0x4]
10 0x1043ae6c8 <+32>: ldr w0, [sp, #0xc]
11 0x1043ae6cc <+36>: ldr w1, [sp, #0x8]
12 0x1043ae6d0 <+40>: ldr w2, [sp, #0x4]
13 0x1043ae6d4 <+44>: bl 0x1043ae648 ; function at ViewController.m:17
14 0x1043ae6d8 <+48>: ldr w1, [sp, #0xc]
15 0x1043ae6dc <+52>: ldr w2, [sp, #0x8]
16 0x1043ae6e0 <+56>: add w1, w1, w2
17 0x1043ae6e4 <+60>: ldr w2, [sp, #0x4]
18 0x1043ae6e8 <+64>: add w1, w1, w2
19 0x1043ae6ec <+68>: str w0, [sp]
20 0x1043ae6f0 <+72>: mov x0, x1
21 0x1043ae6f4 <+76>: ldp x29, x30, [sp, #0x20]
22 0x1043ae6f8 <+80>: add sp, sp, #0x30 ; =0x30
23 0x1043ae6fc <+84>: ret
```
### 4.2 与模拟器中运行的区别
  显然,真机(ARM64)与模拟器(x86_64)的汇编区别很大,如下:
* 汇编格式不一样了。
* ARM64中能改变`pc`寄存器的地址的指令是`b`或`bl`等指令。
* ARM64中使用`fp`作用与`bp`相同,即:为`sp`记录栈低。
* 链接寄存器`lr`保存了`bl`下一条指令的地址(其实是`pc`执行时,是先把地址加了后再执行当前指令的),当`ret`执行后`pc`指向`lr`指向的地址,从而达到平栈目的。
* 函数的参数是存放在`x0`到`x7`(`w0`到`w7`)这8个寄存器里面的。如果超过8个参数,就会入栈。
* 函数的返回值是放在`x0`寄存器里面的.
*(备注:在A11处理器中,`fp`是`x29`、`lr`是`x30`,汇编代码中没有显式显示寄存器名。利用参数和返回值的存放规律,结合`Runtime`中函数的调用方式,可以从`x0`中获得`self`、从`x1`中获得`_cmd`,并在return后通过`x0`获得返回值)*
# 5. 其他
  这里将补充一些能帮助阅读汇编的小Tips:
* Xcode菜单中`Debug`下`Debug Workflow`的`Always Show Disassembly`可让断点触发时查看经过反汇编的汇编指令。
* 断点时,`register`和`memory`可帮助查看寄存器和内存。
* 每一条汇编指令执行时,`ip`都会先指向下一条指令的地址,再执行。这一点很重要!在通过偏移地址查内存值时,找下一条汇编指令地址加偏移地址得出的地址,才是指令操作的实际地址!
* 在通过汇编代码进行静态分析时,遇见`adrp`时,需要连同下一句一起看,同时对于`adrp`指令,从`pc`指向的地址上,进行低12位的0掩码与操作,然后加上左移了12位的页数(一页大小为4KB,所以是12位,2^12,0x1000),即为寻址的目标地址,[ARM架构手册](https://static.docs.arm.com/ddi0487/ca/DDI0487C_a_armv8_arm.pdf)中的描述如下:
```
Literal variant
ADRP <Xd>, <label>
Decode for this encoding
integer d = UInt(Rd);
bits(64) imm;
imm = SignExtend(immhi:immlo:Zeros(12), 64);
Assembler symbols
<Xd> Is the 64-bit name of the general-purpose destination register, encoded in the "Rd" field.
<label> Is the program label whose 4KB page address is to be calculated. Its offset from the page address of this instruction, in the range +/-4GB, is encoded as "immhi:immlo" times 4096.
Operation
bits(64) base = PC[];
base<11:0> = Zeros(12);
X[d] = base + imm;
```
* 同一份代码多次运行查看断点后,可以发现,每条指令的后几位都是一样的,那就是偏移地址,而基地值就是前面不同的几位,这是因为现在`ip`的位数足够多,不需要像以前那样需要定义`cs:ip`才能定位到实际地址。
* 默认状态下,`Release`和`Debug`模式下编译出来的的汇编略有不同,那是因为`Release`下编译时,会被编译器优化,一些比较容易得出的值,会直接得出使用,减少指令数,运行起来就稍微比`Debug`情况下的要快点了。可以在`Build Settings`的`Optimization Level`设置优化等级。
* 在汇编代码中要判断控制流的代码,需要注意`b`系列的汇编指令。另外,switch的本质其实是对if的优化,当case值多,但它们之间的差别不大时,编译器会在内存中建立一个表,通过直接寻址跳到对应的case值中执行指令,否则与if的差别不大。
* 一个多线程运行中的程序,寄存器的数据保护由操作系统负责,App的汇编代码中只能发现对内存的保护。
* Linux系统中,终端输入`uname -m`就可以对查找适合该CPU的汇编风格了。
| lzackx/lzackx.github.io | _posts/2018-03-01-assembly-language.md | Markdown | mit | 28,351 |
namespace philameter.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class categoryupdate : DbMigration
{
public override void Up()
{
AddColumn("dbo.Categories", "FontAwesomeIcon", c => c.String());
DropTable("dbo.StatTags");
DropTable("dbo.Tags");
}
public override void Down()
{
CreateTable(
"dbo.Tags",
c => new
{
Id = c.Int(nullable: false, identity: true),
Name = c.String(),
})
.PrimaryKey(t => t.Id);
CreateTable(
"dbo.StatTags",
c => new
{
Id = c.Int(nullable: false, identity: true),
StatId = c.Int(nullable: false),
TagId = c.Int(nullable: false),
})
.PrimaryKey(t => t.Id);
DropColumn("dbo.Categories", "FontAwesomeIcon");
}
}
}
| bowersad/Philameter | philameter/Migrations/201504131941515_categoryupdate.cs | C# | mit | 1,186 |
#!/bin/bash
trap exit SIGINT SIGTERM
while true
do
gulp testPrep
fswatch --allow-overflow -r1 \
-e .git/ \
-e node_modules/ \
-e .chrome_dev_user/ \
-e '.*[.]sw[^f]$' \
-e '~$' \
--event Updated \
--event Created \
--event Removed \
--event Renamed \
src/ test/
done
| XingFramework/Relayer | scripts/fswatch.sh | Shell | mit | 313 |
// Copyright (c) 2012 The Sponge Authors. All rights reserved.
// Use of this source code is governed by a MIT-style license that can
// be found in the LICENSE file. See the AUTHORS file for names of contributors.
#ifndef SPONGE_NET_HANDLER_CODEC_PROTOBUF_PROTOBUF_VARINT32_LENGTH_FIELD_PREENDER_H_
#define SPONGE_NET_HANDLER_CODEC_PROTOBUF_PROTOBUF_VARINT32_LENGTH_FIELD_PREENDER_H_
namespace sponge {
namespace net {
// An encoder that prepends the Google Protocol Buffers Base 128
// Varints integer length field. For example:
// BEFORE DECODE (300 bytes) AFTER DECODE (302 bytes)
// +---------------+ +--------+---------------+
// | Protobuf Data |-------------->| Length | Protobuf Data |
// | (300 bytes) | | 0xAC02 | (300 bytes) |
// +---------------+ +--------+---------------+
class ProtobufVarint32LengthFieldPrepender : public OneToOneEncoder {
public:
ProtobufVarint32LengthFieldPrepender() : OneToOneEncoder() {}
protected:
void* Encode(const ChannelHandlerContext *ctx,
const Channel *channel, void *msg);
};
} } // namespace sponge::net
#endif // SPONGE_NET_HANDLER_CODEC_PROTOBUF_PROTOBUF_VARINT32_LENGTH_FIELD_PREENDER_H_
| wangeguo/sponge | include/sponge/net/handler/codec/protobuf/protobuf-varint32-length-field-prepender.h | C | mit | 1,232 |
<p align="center">
<img src="https://github.com/raphaelhanneken/apple-juice/blob/master/applejuice.png" alt="Apple Juice application icon" width="200">
</p>
# Apple Juice #
An advanced battery gauge for macOS. *Apple Juice* can show you the estimated __battery time remaining__ and notify you, when your battery charge hits certain percentages.


### Today Widget ###
You can get even more information about your current battery status, without cluttering your screen, with the *Apple Juice Today Widget*. Just take a quick glance at your battery’s stats, whenever you want.

# How do I install it? #
* Install *Apple Juice* from the published binary, by downloading the [latest release](https://github.com/raphaelhanneken/apple-juice/releases/latest) and dropping it into your Applications folder.
* Install *Apple Juice* using [Homebrew](https://brew.sh/), using the command `brew install --cask apple-juice`
* You can also download the source code and build it yourself. You'll have to have [Carthage](https://github.com/Carthage/Carthage) installed, and run `carthage bootstrap`, inside the project folder, to pull in the required dependencies.
## ATTENTION ##
__Loosen Gate Keeper Restrictions__
> As I'm not paying for an Apple Developer Account, you have to allow unsigned third party apps within the system preferences, to run *Apple Juice*. To allow unsigned apps choose `Anywhere` under `System Preferences: Security: Allow apps downloaded from`. If you don't have the option to select `Anywhere` you'll have to loosen the Gate Keeper restrictions by running `sudo spctl --master-disable` in the Terminal. [OSXDaily](http://osxdaily.com/2016/09/27/allow-apps-from-anywhere-macos-gatekeeper/) have a great step by step guide. Afterwards you should be able to select Anywhere.
__Remove Quarantine Attributes__
> Alternatively you can remove the quarantine attribute from the downloaded application package, as suggested by [henrycodebreaker](https://github.com/henrycodebreaker) in [issue #18](https://github.com/raphaelhanneken/apple-juice/issues/18). By executing the following command inside your Terminal: `xattr -cr /path/to/Apple\ Juice.app`.
# Why does this project exist? #
There are plenty of other solutions out there, so why make another one? I wanted an app that looks like it’s part of the system. As if it were built directly into macOS. Which can show me a lot of information, but only when I need them. And, most importantly, it should display notifications for several percentages. Since I haven’t found such an app, I made one myself.
# How do I contribute? #
You can fork this project, make your changes and send me a pull request. Make sure [SwiftLint](https://github.com/realm/SwiftLint) succeeds and everything is translated before submitting your pull request. Or, since the whole source code is licensed under the MIT License, fork *Apple Juice* and make your own thing. :-)
__________
# License #
The MIT License (MIT)
Copyright (c) 2015 - 2020 Raphael Hanneken
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.
| raphaelhanneken/apple-juice | README.md | Markdown | mit | 4,198 |
<!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_45) on Mon Aug 31 23:15:49 CEST 2015 -->
<title>IObjectFloatEqualsCheck (FailFast v.1.3)</title>
<meta name="date" content="2015-08-31">
<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="IObjectFloatEqualsCheck (FailFast v.1.3)";
}
//-->
</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/IObjectFloatEqualsCheck.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-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../starkcoder/failfast/checks/objects/floats/IObjectFloatEqualsAlmostCheckProperties.html" title="interface in starkcoder.failfast.checks.objects.floats"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../starkcoder/failfast/checks/objects/floats/IObjectFloatGreaterCheck.html" title="interface in starkcoder.failfast.checks.objects.floats"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?starkcoder/failfast/checks/objects/floats/IObjectFloatEqualsCheck.html" target="_top">Frames</a></li>
<li><a href="IObjectFloatEqualsCheck.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: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </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">starkcoder.failfast.checks.objects.floats</div>
<h2 title="Interface IObjectFloatEqualsCheck" class="title">Interface IObjectFloatEqualsCheck</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd><a href="../../../../../starkcoder/failfast/checks/ICheck.html" title="interface in starkcoder.failfast.checks">ICheck</a></dd>
</dl>
<dl>
<dt>All Known Subinterfaces:</dt>
<dd><a href="../../../../../starkcoder/failfast/checks/IChecker.html" title="interface in starkcoder.failfast.checks">IChecker</a>, <a href="../../../../../starkcoder/failfast/checks/objects/IObjectChecker.html" title="interface in starkcoder.failfast.checks.objects">IObjectChecker</a>, <a href="../../../../../starkcoder/failfast/checks/objects/floats/IObjectFloatChecker.html" title="interface in starkcoder.failfast.checks.objects.floats">IObjectFloatChecker</a></dd>
</dl>
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../../../../starkcoder/failfast/checks/AChecker.html" title="class in starkcoder.failfast.checks">AChecker</a>, <a href="../../../../../starkcoder/failfast/checks/Checker.html" title="class in starkcoder.failfast.checks">Checker</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="strong">IObjectFloatEqualsCheck</span>
extends <a href="../../../../../starkcoder/failfast/checks/ICheck.html" title="interface in starkcoder.failfast.checks">ICheck</a></pre>
<div class="block">Specifies an equals check for Float.</div>
<dl><dt><span class="strong">Author:</span></dt>
<dd>Keld Oelykke</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== 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"> </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>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../starkcoder/failfast/checks/objects/floats/IObjectFloatEqualsCheck.html#isFloatEquals(java.lang.Object, java.lang.Float, java.lang.Float)">isFloatEquals</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> caller,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Float.html?is-external=true" title="class or interface in java.lang">Float</a> referenceA,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Float.html?is-external=true" title="class or interface in java.lang">Float</a> referenceB)</code>
<div class="block">Checks if the Floats are equals.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="isFloatEquals(java.lang.Object, java.lang.Float, java.lang.Float)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>isFloatEquals</h4>
<pre>boolean isFloatEquals(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> caller,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Float.html?is-external=true" title="class or interface in java.lang">Float</a> referenceA,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Float.html?is-external=true" title="class or interface in java.lang">Float</a> referenceB)</pre>
<div class="block">Checks if the Floats are equals.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>caller</code> - end-user instance initiating the check</dd><dd><code>referenceA</code> - reference to equals check against reference B</dd><dd><code>referenceB</code> - argument to equals-method of reference A</dd>
<dt><span class="strong">Returns:</span></dt><dd>true, if referenced Floats are equals - otherwise false</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if caller is null</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/IObjectFloatEqualsCheck.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-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../starkcoder/failfast/checks/objects/floats/IObjectFloatEqualsAlmostCheckProperties.html" title="interface in starkcoder.failfast.checks.objects.floats"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../starkcoder/failfast/checks/objects/floats/IObjectFloatGreaterCheck.html" title="interface in starkcoder.failfast.checks.objects.floats"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?starkcoder/failfast/checks/objects/floats/IObjectFloatEqualsCheck.html" target="_top">Frames</a></li>
<li><a href="IObjectFloatEqualsCheck.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: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small><i>The MIT License (MIT) - Copyright © 2014-2015 Keld Oelykke. All Rights Reserved.</i></small></p>
</body>
</html>
| KeldOelykke/FailFast | Java/Web/war/releases/1.3/api/starkcoder/failfast/checks/objects/floats/IObjectFloatEqualsCheck.html | HTML | mit | 10,384 |
/* special.h
* Copyright (c) 2011, Peter Ohler
* All rights reserved.
*/
#ifndef __OX_SPECIAL_H__
#define __OX_SPECIAL_H__
#include <stdint.h>
extern char* ox_ucs_to_utf8_chars(char *text, uint64_t u);
#endif /* __OX_SPECIAL_H__ */
| cade/ox | ext/ox/special.h | C | mit | 239 |
#!/bin/bash
wget http://selenium.googlecode.com/files/selenium-server-standalone-2.39.0.jar
ln -s selenium-server-standalone-2.39.0.jar selenium.jar | ericsmalling/selenium-large-grid | getselenium.sh | Shell | mit | 148 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Login Page - Photon Admin Panel Theme</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
<link rel="shortcut icon" href="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/favicon.ico"/>
<link rel="apple-touch-icon" href="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/iosicon.png"/>
<link rel="stylesheet" href="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/css/css_compiled/photon-min.css?v1.1" media="all"/>
<link rel="stylesheet" href="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/css/css_compiled/photon-min-part2.css?v1.1" media="all"/>
<link rel="stylesheet" href="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/css/css_compiled/photon-responsive-min.css?v1.1" media="all"/>
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="css/css_compiled/ie-only-min.css?v1.1" />
<![endif]-->
<!--[if lt IE 9]>
<link rel="stylesheet" type="text/css" href="css/css_compiled/ie8-only-min.css?v1.1" />
<script type="text/javascript" src="js/plugins/excanvas.js"></script>
<script type="text/javascript" src="js/plugins/html5shiv.js"></script>
<script type="text/javascript" src="js/plugins/respond.min.js"></script>
<script type="text/javascript" src="js/plugins/fixFontIcons.js"></script>
<![endif]-->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/jquery-ui.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/bootstrap/bootstrap.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/modernizr.custom.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/jquery.pnotify.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/less-1.3.1.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/xbreadcrumbs.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/jquery.maskedinput-1.3.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/jquery.autotab-1.1b.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/charCount.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/jquery.textareaCounter.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/elrte.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/elrte.en.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/select2.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/jquery-picklist.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/jquery.validate.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/additional-methods.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/jquery.form.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/jquery.metadata.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/jquery.mockjax.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/jquery.uniform.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/jquery.tagsinput.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/jquery.rating.pack.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/farbtastic.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/jquery.timeentry.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/jquery.jstree.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/dataTables.bootstrap.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/jquery.mousewheel.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/jquery.mCustomScrollbar.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/jquery.flot.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/jquery.flot.stack.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/jquery.flot.pie.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/jquery.flot.resize.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/raphael.2.1.0.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/justgage.1.0.1.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/jquery.qrcode.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/jquery.clock.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/jquery.countdown.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/jquery.jqtweet.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/jquery.cookie.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/bootstrap-fileupload.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/prettify/prettify.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/bootstrapSwitch.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/plugins/mfupload.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/js/common.js"></script>
</head>
<body class="body-login">
<div class="nav-fixed-topright" style="visibility: hidden">
<ul class="nav nav-user-menu">
<li class="user-sub-menu-container">
<a href="javascript:;">
<i class="user-icon"></i><span class="nav-user-selection">Theme Options</span><i class="icon-menu-arrow"></i>
</a>
<ul class="nav user-sub-menu">
<li class="light">
<a href="javascript:;">
<i class='icon-photon stop'></i>Light Version
</a>
</li>
<li class="dark">
<a href="javascript:;">
<i class='icon-photon stop'></i>Dark Version
</a>
</li>
</ul>
</li>
<li>
<a href="javascript:;">
<i class="icon-photon mail"></i>
</a>
</li>
<li>
<a href="javascript:;">
<i class="icon-photon comment_alt2_stroke"></i>
<div class="notification-count">12</div>
</a>
</li>
</ul>
</div>
<script>
$(function(){
setTimeout(function(){
$('.nav-fixed-topright').removeAttr('style');
}, 300);
$(window).scroll(function(){
if($('.breadcrumb-container').length){
var scrollState = $(window).scrollTop();
if (scrollState > 0) $('.nav-fixed-topright').addClass('nav-released');
else $('.nav-fixed-topright').removeClass('nav-released')
}
});
$('.user-sub-menu-container').on('click', function(){
$(this).toggleClass('active-user-menu');
});
$('.user-sub-menu .light').on('click', function(){
if ($('body').is('.light-version')) return;
$('body').addClass('light-version');
setTimeout(function() {
$.cookie('themeColor', 'light', {
expires: 7,
path: '/'
});
}, 500);
});
$('.user-sub-menu .dark').on('click', function(){
if ($('body').is('.light-version')) {
$('body').removeClass('light-version');
$.cookie('themeColor', 'dark', {
expires: 7,
path: '/'
});
}
});
});
</script>
<div class="container-login">
<div class="form-centering-wrapper">
<div class="form-window-login">
<div class="form-window-login-logo">
<div class="login-logo">
<img src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/images/photon/[email protected]" alt="Photon UI"/>
</div>
<h2 class="login-title">Welcome to Photon UI!</h2>
<div class="login-member">Not a Member? <a href="jquery.flot.js.html#">Sign Up »</a>
<a href="jquery.flot.js.html#" class="btn btn-facebook"><i class="icon-fb"></i>Login with Facebook<i class="icon-fb-arrow"></i></a>
</div>
<div class="login-or">Or</div>
<div class="login-input-area">
<form method="POST" action="dashboard.php">
<span class="help-block">Login With Your Photon Account</span>
<input type="text" name="email" placeholder="Email">
<input type="password" name="password" placeholder="Password">
<button type="submit" class="btn btn-large btn-success btn-login">Login</button>
</form>
<a href="jquery.flot.js.html#" class="forgot-pass">Forgot Your Password?</a>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-1936460-27']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>
| user-tony/photon-rails | lib/assets/images/photon/plugins/elrte/js/bootstrap/js/js/bootstrap/js/plugins/jquery.flot.js.html | HTML | mit | 13,482 |
import unittest
from T12_CountVowels import count_vowels
class CountVowelsTest(unittest.TestCase):
def test_none_vowels(self):
self.assertEqual(0, count_vowels("grrrrgh!"))
def test_count_of_vowels_if_there_is_vowel_in_the_end(self):
self.assertEqual(8, count_vowels("Theistareykjarbunga"))
def test_count_of_vowels(self):
self.assertEqual(22, count_vowels("Github is the second best thing that happend to programmers, after the keyboard!"))
if __name__ == '__main__':
unittest.main()
| MPeteva/HackBulgariaProgramming101 | Week0/1-PythonSimpleProblemsSet/Test12_CountVowels.py | Python | mit | 532 |
'use strict';
/**
* @namespace
* @param {String} fileInfo - This is set the require function on file load.
*/
var Directory = new Class( function ( fileInfo ) {
this.resolvePath = function ( rawDirPath ) {
var dirPath = rawDirPath || '';
var isAbsolute = ( new java.io.File( dirPath ) ).isAbsolute();
var path = dirPath;
if ( !isAbsolute ) {
path = java.nio.file.Paths.get( fileInfo.__dirname, dirPath.replace( /^\.\//, '' ) ).toString();
}
return path;
};
} );
/**
* Allows you to create a directory.
* @implements Directory
* @param {String} path - Specify a target directory path.
* @example
* Directory.create( './new Folder' );
*/
Directory.prototype.create = function ( dirPath ) {
var path = this.resolvePath( dirPath );
( new java.io.File( path ) ).mkdir();
};
/**
* Allows you to read a directories contents.
* @implements Directory
* @param {String} path - Specify a target directory path.
* @return {Array} paths
* @example
* var files = Directory.list( './new Folder' );
*
* for ( var i in files ) {
* console.log( files[ i ] );
* }
*/
Directory.prototype.list = function ( dirPath ) {
var files = [];
var path = this.resolvePath( dirPath );
var rawFiles = new java.io.File( path ).listFiles();
for ( var i in rawFiles ) {
files.push( rawFiles[ i ].toString().replace( /\\/g, '/' ) );
}
return files;
};
/**
* Allows you to delete a directory.
* @implements Directory
* @param {String} path - Specify a target directory path.
* @example
* Directory.delete( './new Folder' );
*/
Directory.prototype.delete = function ( dirPath ) {
var path = this.resolvePath( dirPath );
var dir = new java.io.File( path );
if ( dir.isDirectory() ) {
var files = this.list( path );
for ( var i in files ) {
var file = new java.io.File( files[ i ] );
if ( file.isDirectory() ) {
this.delete( file.toString() );
} else {
file.delete();
}
}
dir.delete();
}
};
/**
* Allows to check if a directory at the specified path exists or not.
* @implements File
* @return {Boolean}
* @param {String} path - Specify a target directory path for checking.
* @example
* var dirExists = Directory.exists( './myFolder' );
*/
Directory.prototype.exists = function ( dirPath ) {
var path = this.resolvePath( dirPath );
var dir = new java.io.File( path );
return dir.isDirectory();
};
module.exports = Directory;
| lukecfairchild/MCJS | MCJS/lib/globals/Directory.js | JavaScript | mit | 2,547 |
using System;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNet.Mvc;
using Mothbal.Services.Interfaces;
using Mothbal.Web.ViewModels.Applications;
using Mothbal.Core.DataInterfaces;
using Mothbal.Core.Entities;
namespace Mothbal.Web.Controllers
{
public class ApplicationsController : BaseController
{
public IApplicationService ApplicationService;
public ITransactionFactory TransactionFactory;
public ApplicationsController(IApplicationService applicationService, ITransactionFactory transactionFactory)
{
this.ApplicationService = applicationService;
this.TransactionFactory = transactionFactory;
}
[HttpGet("apps")]
public async Task<IActionResult> Index(string message)
{
var apps = await this.ApplicationService.GetApplications();
var appViewModels = apps.Select( app => Mapper.Map<ApplicationViewModel>( app ) ).ToArray();
var viewModel = new ApplicationsViewModel()
{
Applications = appViewModels,
Message = message
};
return View( viewModel );
}
[HttpPost("apps/remove")]
public async Task<IActionResult> RemoveApplication( int id )
{
using ( var tx = TransactionFactory.BeginTransaction() )
{
var app = await this.ApplicationService.GetApplication( id );
if ( app == null )
throw new Exception( "Application not found" );
this.ApplicationService.RemoveApplication( app );
tx.Commit();
return RedirectToAction( "Index", new { message = "Application removed" } );
}
}
[HttpGet("apps/add")]
public IActionResult AddApplication()
{
return View();
}
[HttpPost("apps/add")]
public IActionResult AddApplication( AddApplicationPostModel postModel )
{
using ( var tx = TransactionFactory.BeginTransaction() )
{
if ( IsModelStateInvalid )
throw new ArgumentException( "Invalid postModel" );
var app = this.Mapper.Map<MothbalApplication>( postModel );
this.ApplicationService.AddApplication( app );
tx.Commit();
return RedirectToAction( "Index", new { message = "Application added" } );
}
}
[HttpGet("apps/edit/{id}")]
public async Task<IActionResult> EditApplication( int id )
{
var app = await this.ApplicationService.GetApplication( id );
if ( app == null )
throw new Exception( "App not found: " + id );
var viewModel = this.Mapper.Map<ApplicationViewModel>( app );
return View( viewModel );
}
[HttpPost("apps/edit/{id}")]
public async Task<IActionResult> EditApplication( ApplicationViewModel postModel )
{
using ( var tx = this.TransactionFactory.BeginTransaction() )
{
if ( this.IsModelStateInvalid )
throw new ArgumentException( "Invalid postModel" );
var app = await this.ApplicationService.GetApplication( postModel.Id );
if ( app == null )
throw new Exception( "Application not found: " + postModel.Id );
this.Mapper.Map( postModel, app );
tx.Commit();
return RedirectToAction( "Index", new { message = "Application upated" } );
}
}
}
} | joshduchamp/mothbal | src/Mothbal.Web/Controllers/ApplicationsController.cs | C# | mit | 3,691 |
import numpy as np
from impyute.deletion import complete_case
from impyute.ops.testing import return_na_check
SHAPE = (5, 5)
def test_complete_case_(test_data):
data = test_data(SHAPE)
imputed = complete_case(data)
return_na_check(imputed)
def test_impute_missing_values(test_data):
data = test_data(SHAPE)
imputed = complete_case(data)
assert np.shape(imputed) == (4, 5)
def test_imputed_values(test_data):
data = test_data(SHAPE)
imputed = complete_case(data)
expected = np.arange(5, 25, dtype=float).reshape(4, 5)
assert np.equal(imputed, expected).all()
| eltonlaw/impyute | test/deletion/test_complete_case.py | Python | mit | 605 |
$RX$ - registrador número X
$RX$\_$Y$ - registrador número X do modo de operação Y
%$\sim$ - indiferente a
%$\succ$ - melhor que
%$\succeq$ - melhor ou indiferente a
%$\langle \mathbf{x},\mathbf{y} \rangle$ - produto escalar entre
%os vetores $\mathbf{x}$ e $\mathbf{y}$
%$\mathcal{A}$ - um conjunto de ações disponíveis
%$a$ - uma ação
| marianafranco/arm7linux | Monografia/monografia/simbolos.tex | TeX | mit | 344 |
version https://git-lfs.github.com/spec/v1
oid sha256:0ac90e2c1f3f7051e52de78084d9278d673a20a38692485fdc92b277704d6138
size 3117
| yogeshsaroya/new-cdnjs | ajax/libs/ng-dialog/0.3.12/css/ngDialog-theme-plain.min.css | CSS | mit | 129 |
# Container
The container service allows you to manage dependency injection across the application, have easy access to object or services and lazy-load, singleton or cache the creation of new service instances.
## API
- [set()](#set)
- [get()](#get)
- [resolve()](#resolve)
- [path()](#path)
### set()
Register a new service
Param | Type | Description
--- | --- | ---
**name** | string | Name of the service
**object** | object / callable | Service object or a resolvable callback function. For [dependency injection](/docs/get-started.md#dependency-injection) pass a closure with your desired services as argument names.
**singleton** | bool | Should object instance be singleton?
**cache** | bool | Should service instance be cached in memory?
#### Return Value
Returns container object instance
#### Example
```js
container.set('myService', {
'hello': 'world',
'foo': 'bar'
}, true, false);
```
### get()
Get registered service. Return service instance if already created (singleton) or initialize it if no instance is yet available.
Param | Type | Description
--- | --- | ---
**name** | string | Name of the service
#### Return Value
Requested service object instance or null if no object was found.
#### Example
```js
let service = container.get('myService');
```
### resolve()
This is where the dependency 'magic' happens. This method receives a callable variable, analyze argument names, makes registered service matching those name available inside the callable function and executes it
Param | Type | Description
--- | --- | ---
**name** | callable | Function needed to be resolved with requested services
#### Return Value
Callback resolved value.
#### Example
```js
let result = container.resolve(function(window, myService) {
window.alert(myService['hello']); // Alert: 'world'
});
```
### path()
Get value by object path, or set value in object path if value param is passed
Param | Type | Description
--- | --- | ---
**path** | string | Dot separated nested object path
**value** | mixed | Value to be set in given path **(optional)**
#### Return Value
Value of the requested path or null if no path was found.
#### Example
```js
// Get Path Value
let result = container.path('myService.foo'); // = 'bar'
// Set Path Value
container.path('myService.foo', 'new value');
let result = container.path('myService.foo'); // = 'new value'
```
| eldadfux/litespeed.js | docs/services/container.md | Markdown | mit | 2,395 |
var data = [
{name: "A", val: 11},
{name: "B", val: 58},
{name: "C", val: 89}
];
var w = 400,
h = 400,
r = Math.min(w, h) / 2,
labelr = r + 30, // radius for label anchor
color = d3.scale.category20(),
donut = d3.layout.pie(),
arc = d3.svg.arc().innerRadius(r * .6).outerRadius(r);
var vis = d3.select("body")
.append("svg:svg")
.data([data])
.attr("width", w + 150)
.attr("height", h);
var arcs = vis.selectAll("g.arc")
.data(donut.value(function(d) { return d.val }))
.enter().append("svg:g")
.attr("class", "arc")
.attr("transform", "translate(" + (r + 30) + "," + r + ")");
arcs.append("svg:path")
.attr("fill", function(d, i) { return color(i); })
.attr("d", arc);
arcs.append("svg:text")
.attr("transform", function(d) {
var c = arc.centroid(d),
x = c[0],
y = c[1],
// pythagorean theorem for hypotenuse
h = Math.sqrt(x*x + y*y);
return "translate(" + (x/h * labelr) + ',' +
(y/h * labelr) + ")";
})
.attr("dy", ".35em")
.attr("text-anchor", function(d) {
// are we past the center?
return (d.endAngle + d.startAngle)/2 > Math.PI ?
"end" : "start";
})
.text(function(d, i) { return d.value.toFixed(2); }); | GrantOM/Verb-Detector-Thymeleaf | src/main/resources/static/scripts/pie_chart.js | JavaScript | mit | 1,364 |
### How to run it
1. `npm install`
2. `node index.js`
| Michael-Antczak/Intro-to-computer-science | examples/size_of_input/README.md | Markdown | mit | 58 |
# frozen_string_literal: true
module Baron
# The bank represents the source of money for turns and other financial
# aspects of the company. It can hold money, company shares (in the bank pool)
# trains, and more.
class Bank
include Shareholder
# The game this bank belongs to
#
# @example
# bank.game
#
# @api public
# @return [Baron::Game]
attr_reader :game
# Initialize the bank
#
# @example
# Baron::Bank.initialize(game)
#
# @api public
# @param [Baron::Game] game
def initialize(game)
@game = game
end
# The cost of the certificate based on current market price
#
# The cost of the certificate is the market price times the number
# of shares that the certificate is for.
#
# @example
# @bank.cost(certificate) #=> Baron::Money.new(68)
#
# @api public
# @param [Baron::Certificate] certificate
# @return [Baron::Money]
def cost(certificate)
certificate.market_cost(game.market)
end
# Return a string representation of the bank
#
# @api private
# @return [String]
def inspect
"#<Baron::Bank:#{object_id}>"
end
end
end
| 18xx/baron | lib/baron/bank.rb | Ruby | mit | 1,209 |
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Datetator Plugin</title>
<link rel="stylesheet" href="fm.datetator.jquery.css"/>
<style>
body {
font-family: sans-serif;
margin: 0;
padding: 0;
}
#wrapper {
padding: 15px;
}
#inputDatetator1,
#inputDatetator2,
#inputDatetator3,
#inputDatetator4,
#inputDatetator5 {
width: 300px;
padding: 8px 16px;
box-sizing: border-box;
}
</style>
<script src="jquery-1.11.0.min.js"></script>
<script src="fm.datetator.jquery.js"></script>
<script src="fm.datetator-fo.jquery.js"></script>
<script src="fm.datetator-de.jquery.js"></script>
<script>
$(function () {
var $activate_datetator1 = $('#activate_datetator1');
var $inputDatetator1 = $('#inputDatetator1');
$activate_datetator1.click(function () {
if ($inputDatetator1.data('datetator') === undefined) {
$inputDatetator1.datetator({
useDimmer: true
});
$activate_datetator1.val('destroy datetator');
} else {
$inputDatetator1.datetator('destroy');
$activate_datetator1.val('activate datetator');
}
});
$activate_datetator1.trigger('click');
var $activate_datetator2 = $('#activate_datetator2');
var $inputDatetator2 = $('#inputDatetator2');
$activate_datetator2.click(function () {
if ($inputDatetator2.data('datetator') === undefined) {
$inputDatetator2.datetator();
$activate_datetator2.val('destroy datetator');
} else {
$inputDatetator2.datetator('destroy');
$activate_datetator2.val('activate datetator');
}
});
$activate_datetator2.trigger('click');
var $activate_datetator3 = $('#activate_datetator3');
var $inputDatetator3 = $('#inputDatetator3');
$activate_datetator3.click(function () {
if ($inputDatetator3.data('datetator') === undefined) {
$inputDatetator3.datetator({
language: 'de'
});
$activate_datetator3.val('destroy datetator');
} else {
$inputDatetator3.datetator('destroy');
$activate_datetator3.val('activate datetator');
}
});
$activate_datetator3.trigger('click');
var $activate_datetator4 = $('#activate_datetator4');
var $inputDatetator4 = $('#inputDatetator4');
$activate_datetator4.click(function () {
if ($inputDatetator4.data('datetator') === undefined) {
$inputDatetator4.datetator({
language: 'fo'
});
$activate_datetator4.val('destroy datetator');
} else {
$inputDatetator4.datetator('destroy');
$activate_datetator4.val('activate datetator');
}
});
$activate_datetator4.trigger('click');
});
</script>
</head>
<body>
<div id="wrapper">
<label for="inputDatetator1">
<b>Datetator (with dimmer):</b>
</label><br>
<pre>
$('#inputDatetator1').datetator({
useDimmer: true
});
</pre>
<input id="inputDatetator1" name="inputDatetator1" value="">
<input value="activate datetator" id="activate_datetator1" type="button"><br>
<br>
<br>
<label for="inputDatetator2">
<b>Datetator:</b>
</label><br>
<pre>
$('#inputDatetator2').datetator();
</pre>
<input id="inputDatetator2" name="inputDatetator2" value="2014-01-15">
<input value="activate datetator" id="activate_datetator2" type="button"><br>
<br>
<br>
<label for="inputDatetator3">
<b>Datetator (German):</b>
</label><br>
<pre>
$('#inputDatetator3').datetator({
language: 'de'
});
</pre>
<input id="inputDatetator3" name="inputDatetator3" value="2014-01-15">
<input value="activate datetator" id="activate_datetator3" type="button"><br>
<br>
<br>
<label for="inputDatetator4">
<b>Datetator (Faroese):</b>
</label><br>
<pre>
$('#inputDatetator4').datetator({
language: 'fo'
});
</pre>
<input id="inputDatetator4" name="inputDatetator4" value="2014-01-15">
<input value="activate datetator" id="activate_datetator4" type="button"><br>
<br>
<br>
<label for="inputDatetator5">
<b>Datetator (using markup):</b>
</label><br>
<pre>
<input id="inputDatetator5" type="text" class="datetator" data-datetator-use-dimmer="true" data-datetator-use-remove="false" value="2014-01-15">
</pre>
<input id="inputDatetator5" type="text" class="datetator" data-datetator-use-dimmer="true" data-datetator-use-remove="false" value="2014-01-15">
<br>
<br>
</div>
</body>
</html> | FaroeMedia/datetator | index.html | HTML | mit | 4,408 |
<?php
return [
/*
* DEBUG HELPER
*
'zenddevelopertools' => [
'profiler' => [
'enabled' => true,
],
'toolbar' => [
'enabled' => true,
],
],
'view_manager' => [
'display_not_found_reason' => true,
'display_exceptions' => true,
],
//*/
'doctrine' => [
'connection' => [
'orm_default' => [
// mssql db @ windows => 'GameBackend\DBAL\Driver\PDOSqlsrv\Driver'
// mssql db @ linux => 'GameBackend\DBAL\Driver\PDODblib\Driver',
'driverClass' => \Doctrine\DBAL\Driver\PDOMySql\Driver::class,
'params' => [
'host' => '127.0.0.1',
'port' => '3306',
'user' => 'root',
'password' => 'barr',
'dbname' => 'pserverCMS',
],
],
'orm_metin_account' => [
'driverClass' => \Doctrine\DBAL\Driver\PDOMySql\Driver::class,
'params' => [
'host' => '127.0.0.1',
'port' => '3306',
'user' => 'root',
'password' => 'barr',
'dbname' => 'account',
],
],
],
],
'pserver' => [
'password' => [
/**
* some games does not allowed so long password
*/
'length' => [
'min' => 6,
'max' => 16
],
],
'timer' => [
[
'name' => 'CTF',
'hours' => [
0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23
],
'min' => 30,
'icon' => 'fa fa-cubes'
],
[
'name' => 'Medusa',
'hours' => [
1,22,23
],
'min' => 14,
'icon' => 'fa fa-digg'
],
//'Sunday' | 'Monday' | 'Tuesday' | 'Wednesday' | 'Thursday' | 'Friday' | 'Saturday'
[
'name' => 'Fortresswar',
'days' => [
'Wednesday','Monday'
],
'hour' => 8,
'min' => 14,
'icon' => 'fa fa-bomb'
],
[
'name' => 'Register',
'type' => 'static',
'time' => 'Saturday 12:00 - 23:00',
'icon' => 'fa fa-digg'
],
],
],
'service_manager' => [
'aliases' => [
'gamebackend_dataservice' => \GameBackend\DataService\Metin::class,
],
],
]; | kokspflanze/pserverCMSFull | config/autoload/metin.example.php | PHP | mit | 2,866 |
FROM jenkins/jenkins:lts
USER root
# Install AWS CLI
RUN curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
RUN unzip awscli-bundle.zip
RUN ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
RUN rm awscli-bundle.zip
RUN mkdir /var/jenkins_home/.aws
# Setup Docker
RUN groupadd --gid 497 docker
RUN apt-get -y update
RUN apt-get -y install docker
RUN apt-get -y install redis-server
RUN apt-get -y install postgresql-9.6
RUN apt-get install -y libltdl7
RUN usermod -aG docker jenkins
#VOLUME /var/run/docker.sock
# Misc extra packages
RUN apt-get -y install jq
# Setup Postgres
#RUN /etc/init.d/postgresql start
#USER postgres
#RUN sleep 3
#RUN psql -c "CREATE USER jenkins;"
#RUN psql -c "ALTER USER jenkins WITH SUPERUSER;"
USER jenkins
| recurrence/jenkins-aws-docker | Dockerfile | Dockerfile | mit | 787 |
// Copyright (c) 2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef TESTKOJN_VERSION_H
#define TESTKOJN_VERSION_H
#include "clientversion.h"
#include <string>
//
// client versioning
//
static const int CLIENT_VERSION =
1000000 * CLIENT_VERSION_MAJOR
+ 10000 * CLIENT_VERSION_MINOR
+ 100 * CLIENT_VERSION_REVISION
+ 1 * CLIENT_VERSION_BUILD;
extern const std::string CLIENT_NAME;
extern const std::string CLIENT_BUILD;
extern const std::string CLIENT_DATE;
//
// network protocol versioning
//
static const int PROTOCOL_VERSION = 60002;
// earlier versions not supported as of Feb 2012, and are disconnected
static const int MIN_PROTO_VERSION = 209;
// nTime field added to CAddress, starting with this version;
// if possible, avoid requesting addresses nodes older than this
static const int CADDR_TIME_VERSION = 31402;
// only request blocks from nodes outside this range of versions
static const int NOBLKS_VERSION_START = 32000;
static const int NOBLKS_VERSION_END = 32400;
// BIP 0031, pong message, is enabled for all versions AFTER this one
static const int BIP0031_VERSION = 60000;
// "mempool" command, enhanced "getdata" behavior starts with this version:
static const int MEMPOOL_GD_VERSION = 60002;
#endif
| testkojn/testkojn | src/version.h | C | mit | 1,473 |
package game;
import java.util.*;
public class WorldGenerator {
private final int HUB_COUNT = 2;
private ArrayList<ArrayList<String>> hubs;
private HashMap<String, Object> worldState;
private HashMap<String, Object> goal;
private ArrayList<String> beings, friends, monsters, riddlers, places, items, placedItems, placedItemsCopy;
private Random rnd;
public WorldGenerator(ArrayList<ArrayList<String>> loadedObjects){
friends = loadedObjects.get(0);
monsters = loadedObjects.get(1);
riddlers = loadedObjects.get(2);
places = loadedObjects.get(3);
items = loadedObjects.get(4);
}
private void generatePaths(){
for (int l = 0; l < hubs.size(); l++) {
for (int i = 0; i < hubs.get(l).size() - 1; i++) {
for (int j = i + 1; j < hubs.get(l).size(); j++) {
if (rnd.nextInt(3) == 0){
if (!worldState.containsKey("from" + hubs.get(l).get(i) + "to")){
worldState.put("from" + hubs.get(l).get(i) + "to", new ArrayList<String>());
}
if (!worldState.containsKey("from" + hubs.get(l).get(j) + "to")){
worldState.put("from" + hubs.get(l).get(j) + "to", new ArrayList<String>());
}
ArrayList<String> toListFrom = (ArrayList<String>) worldState.get("from" + hubs.get(l).get(i) + "to");
ArrayList<String> toListTo = (ArrayList<String>) worldState.get("from" + hubs.get(l).get(j) + "to");
if(hubs.get(l).get(i).equals("bridge") && toListFrom.size() >= 2){
break;
}
if(hubs.get(l).get(j).equals("bridge") && toListTo.size() >= 2){
break;
}
if(toListFrom.size() >= 3){
break;
}
toListFrom.add(hubs.get(l).get(j));
toListTo.add(hubs.get(l).get(i));
}
}
}
}
}
private void generatePathsFull(){
for (int i = 0; i < places.size(); i++) {
for (int j = 0; j < places.size(); j++) {
if (i != j){
if (!worldState.containsKey("from" + places.get(i) + "to")){
worldState.put("from" + places.get(i) + "to", new ArrayList<String>());
}
ArrayList<String> toList = (ArrayList<String>) worldState.get("from" + places.get(i) + "to");
toList.add(places.get(j));
}
}
}
}
private void generateFriends(){
ArrayList<String> friendsCopy = new ArrayList<String>(friends);
ArrayList<String> placesCopy = new ArrayList<String>(places);
for (int i = 0; i < hubs.size(); i++) {
String friend = friendsCopy.get(rnd.nextInt(friendsCopy.size()));
worldState.put(friend, "alive");
String friendWants = placedItems.get(rnd.nextInt(placedItems.size()));
worldState.put(friend+"wants", friendWants);
goal.put(friend+"wants", "");
String friendPlace = placesCopy.get(rnd.nextInt(placesCopy.size()));
worldState.put(friend+"place", friendPlace);
placesCopy.remove(friendPlace);
String itemPlace = placesCopy.get(rnd.nextInt(placesCopy.size()));
worldState.put(friendWants+"place", itemPlace);
placesCopy.remove(itemPlace);
worldState.put(friend+"holds", new ArrayList<String>());
beings.add(friend);
placedItems.remove(friendWants);
friendsCopy.remove(friend);
}
for (int i = 0; i < friendsCopy.size(); i++) {
worldState.put(friendsCopy.get(i), "dead");
worldState.put(friendsCopy.get(i)+"holds", new ArrayList<String>());
}
}
private void generateBeings(){
beings = new ArrayList<String>();
beings.add("prince");
beings.add("princess");
worldState.put("prince", "alive");
worldState.put("princeplace", hubs.get(0).get(rnd.nextInt(hubs.get(0).size())));
worldState.put("princeholds", new ArrayList<String>());
worldState.put("princess", "alive");
worldState.put("princessplace", hubs.get(hubs.size() - 1).get(rnd.nextInt(hubs.get(hubs.size() - 1).size())));
worldState.put("princessholds", new ArrayList<String>());
generateFriends();
generateBlockingEntities();
}
private void generateItems(){
ArrayList<String> itemsCopy = new ArrayList<String>(items);
placedItems = new ArrayList<String>();
placedItemsCopy = new ArrayList<String>();
for (int i = 0; i < (2 * HUB_COUNT) - 1; i++) {
String item = itemsCopy.get(rnd.nextInt(itemsCopy.size()));
worldState.put(item, "placed");
placedItems.add(item);
placedItemsCopy.add(item);
itemsCopy.remove(item);
}
worldState.put("coins", 0);
}
private void generateHubs(){
hubs = new ArrayList<ArrayList<String>>();
ArrayList<String> placesCopy = new ArrayList<String>(places);
for (int i = 0; i < HUB_COUNT; i++) {
hubs.add(new ArrayList<String>());
String place = placesCopy.get(rnd.nextInt(placesCopy.size()));
hubs.get(i).add(place);
placesCopy.remove(place);
}
for (int i = 0; i < placesCopy.size(); i++) {
hubs.get(rnd.nextInt(HUB_COUNT)).add(placesCopy.get(i));
}
}
private void generateMonster(ArrayList<String> monstersCopy, int hubIndex){
String monster = monstersCopy.get(rnd.nextInt(monstersCopy.size()));
worldState.put(monster, "alive");
goal.put(monster, "dead");
String monsterVulnTo = placedItems.get(rnd.nextInt(placedItems.size()));
worldState.put(monster+"vuln", monsterVulnTo);
String monsterPlace = hubs.get(hubIndex).get(rnd.nextInt(hubs.get(hubIndex).size()));
worldState.put(monster+"place", monsterPlace);
String itemPlace = hubs.get(hubIndex).get(rnd.nextInt(hubs.get(hubIndex).size()));
worldState.put(monsterVulnTo+"place", itemPlace);
String monsterBlocks = hubs.get(hubIndex+1).get(rnd.nextInt(hubs.get(hubIndex+1).size()));
worldState.put(monster+"blocks", monsterBlocks);
worldState.put(monster+"holds", new ArrayList<String>());
beings.add(monster);
placedItems.remove(monsterVulnTo);
monstersCopy.remove(monster);
}
private void generateRiddler(ArrayList<String> riddlersCopy, int hubIndex){
String riddler = riddlersCopy.get(rnd.nextInt(riddlersCopy.size()));
worldState.put(riddler, "alive");
goal.put(riddler, "vanished");
String riddlerPlace = hubs.get(hubIndex).get(rnd.nextInt(hubs.get(hubIndex).size()));
worldState.put(riddler+"place", riddlerPlace);
String riddlerBlocks = hubs.get(hubIndex+1).get(rnd.nextInt(hubs.get(hubIndex+1).size()));
worldState.put(riddler+"blocks", riddlerBlocks);
worldState.put(riddler+"holds", new ArrayList<String>());
beings.add(riddler);
String notUsedItem = placedItems.get(rnd.nextInt(placedItems.size()));
String itemPlace = hubs.get(hubIndex).get(rnd.nextInt(hubs.get(hubIndex).size()));
worldState.put(notUsedItem+"place", itemPlace);
placedItems.remove(notUsedItem);
riddlersCopy.remove(riddler);
}
private void generateBlockingEntities(){
ArrayList<String> monstersCopy = new ArrayList<String>(monsters);
ArrayList<String> riddlersCopy = new ArrayList<String>(riddlers);
for (int i = 0; i < hubs.size() - 1; i++) {
if (rnd.nextBoolean()){
generateMonster(monstersCopy, i);
} else {
generateRiddler(riddlersCopy, i);
}
}
for (int i = 0; i < monstersCopy.size(); i++) {
worldState.put(monstersCopy.get(i), "dead");
worldState.put(monstersCopy.get(i)+"holds", new ArrayList<String>());
}
for (int i = 0; i < riddlersCopy.size(); i++) {
worldState.put(riddlersCopy.get(i), "vanished");
worldState.put(riddlersCopy.get(i)+"holds", new ArrayList<String>());
}
}
public long generateState(boolean randomSeed, long setSeed){
worldState = new HashMap<String, Object>();
goal = new HashMap<String, Object>();
rnd = new Random();
long seed = setSeed;
if (randomSeed){
seed = rnd.nextLong();
}
rnd.setSeed(seed);
goal.put("princess", "saved");
goal.put("coins", HUB_COUNT);
generateHubs();
generatePaths();
generateItems();
generateBeings();
return seed;
}
public ArrayList<ArrayList<String>> getGameObjects(){
ArrayList<ArrayList<String>> gameObjects = new ArrayList<ArrayList<String>>();
gameObjects.add(beings);
gameObjects.add(friends);
gameObjects.add(monsters);
gameObjects.add(riddlers);
gameObjects.add(places);
gameObjects.add(placedItemsCopy);
return gameObjects;
}
public HashMap<String, Object> getWorldState(){
return worldState;
}
public HashMap<String, Object> getGoal(){
return goal;
}
}
| TomasBakos/bakalarka | code/src/game/WorldGenerator.java | Java | mit | 8,415 |
import Ember from 'ember';
const { computed, on, typeOf } = Ember;
const a = Ember.A;
const defaultBindings = [
'width','minWidth','height','minHeight','maxHeight','fontSize',
'fontFamily','fontWeight','fontStyle','cursor','display'
];
const sizer = size => {
// scalar → rem value
if(typeOf(size) === 'string' && size.match(/^(\d+)x$/)) {
size = size.replace(/^(\d+)x$/, '$1' + 'rem');
}
return isNaN(Number(size)) ? size : size + 'px';
};
const dasherize = thingy => {
return thingy ? Ember.String.dasherize(thingy) : thingy;
};
const htmlSafe = Ember.String.htmlSafe;
var SharedStylist = Ember.Mixin.create({
_styleBindings: computed('styleBindings', function() {
let styleBindings = this.get('styleBindings') || defaultBindings;
styleBindings = typeOf(styleBindings) === 'string' ? styleBindings.split(',') : styleBindings;
return styleBindings.map(sb => {
if(sb.indexOf('::') !== -1) {
sb = { property: sb.split('::')[0], bindTo: sb.split('::')[1] };
} else {
sb = { property: sb, bindTo: sb };
}
return sb;
});
}),
init() {
this._super(...arguments);
const observerBindings = this.get('_styleBindings');
observerBindings.map(item => {
this.addObserver(item.bindTo, this._setStyle);
});
},
didInsertElement() {
this._super(...arguments);
this._setStyle();
},
// Because we created the observer dynamically we must take responsibility of
// removing the observers on exit
willDestroyElement() {
this._super(...arguments);
const observerBindings = this.get('_styleBindings');
observerBindings.map(item => {
this.removeObserver(item.bindTo, this, '_setStyle');
});
},
_setStyle() {
const styleBindings = this.get('_styleBindings');
let styles = [];
styleBindings.map(style => {
const cssProp = dasherize(style.property);
const value = this._stylist(cssProp, this.get(style.bindTo));
if(value) {
styles.push(`${cssProp}: ${value}`);
}
});
this.set('stylist', htmlSafe(styles.join('; ')));
},
/**
* Provides a per-type styler that allows for some sensible defaults
* @param {string} style The style property being evaluated
* @param {string} value The suggested value for this style property
* @return {string} A mildly processed/improved variant on the input
*/
_stylist(style, value) {
switch(style) {
case 'font-size':
case 'padding':
case 'margin':
case 'width':
case 'height':
case 'min-width':
case 'max-width':
return sizer(value);
default:
if(a(['undefined','null']).includes(typeOf(value))) {
return null;
}
return value;
}
}
});
SharedStylist[Ember.NAME_KEY] = 'Shared Stylist';
export default SharedStylist;
| lifegadget/ember-cli-stylist | addon/mixins/shared-stylist.js | JavaScript | mit | 2,830 |
/** @jsx REACT.DOM */
import React from 'react';
import {classSet} from 'react-addons';
export default React.createClass({
componentWillMount: function () {
},
getInitialState: function () {
return {track: this.props.track};
},
_onChange: function () {
this.setState({track: this.props.track});
},
setShape: function (shape) {
this.props.track.instrument.setShape(shape);
this.props.queso.emit('TRACK_CHANGED');
this._onChange();
},
render: function () {
const shapes = this.props.track.instrument.getShapes();
const elements = shapes.map((shape, i) => {
const id = 'shape-' + shape;
return (
<div className="shape" key={i}>
<input id={id} type="radio" checked={shape === this.props.track.instrument.shape} onChange={this.setShape.bind(this, shape)} />
<label htmlFor={id}>{shape}</label>
</div>
);
});
return (
<div className="synth-shapes">
{elements}
</div>
);
}
});
| brandly/ss15-queso | src/scripts/components/synth-shape.js | JavaScript | mit | 1,010 |
@custom-media --viewport-medium (width <= 50rem);
@custom-selector :--heading h1, h2, h3, h4, h5, h6;
:root {
--fontSize: 1rem;
--mainColor: #12345678;
--secondaryColor: lab(32.5 38.5 -47.6 / 90%);
}
html {
overflow: hidden auto;
}
@media (--viewport-medium) {
body {
color: var(--mainColor);
font-family: system-ui;
font-size: var(--fontSize);
line-height: calc(var(--fontSize) * 1.5);
overflow-wrap: break-word;
padding-inline: calc(var(--fontSize) / 2 + 1px);
}
}
:--heading {
margin-block: 0;
}
a {
color: rgb(0 0 100% / 90%);
&:hover {
color: rebeccapurple;
}
} | BoyWithSilverWings/react-app | src/index.css | CSS | mit | 620 |
package com.microsoft.bingads.v12.api.test.entities.criterions.adgroup.location.write;
import java.util.Arrays;
import java.util.Collection;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import com.microsoft.bingads.internal.functionalinterfaces.BiConsumer;
import com.microsoft.bingads.v12.api.test.entities.criterions.adgroup.location.BulkAdGroupLocationCriterionTest;
import com.microsoft.bingads.v12.bulk.entities.BulkAdGroupLocationCriterion;
import com.microsoft.bingads.v12.campaignmanagement.LocationCriterion;
@RunWith(Parameterized.class)
public class BulkAdGroupLocationCriterionWriteTargetTest extends BulkAdGroupLocationCriterionTest {
@Parameterized.Parameter(value = 1)
public Long propertyValue;
@Parameterized.Parameters
public static Collection<Object[]> data() {
return Arrays.asList(
new Object[][]{
{"12", 12L},
{"23", 23L},
{null, null}
}
);
}
@Test
public void testWrite() {
testWriteProperty(
"Target",
datum,
propertyValue,
new BiConsumer<BulkAdGroupLocationCriterion, Long>() {
@Override
public void accept(BulkAdGroupLocationCriterion c, Long v) {
((LocationCriterion)c.getBiddableAdGroupCriterion().getCriterion()).setLocationId(v);
}
}
);
}
}
| bing-ads-sdk/BingAds-Java-SDK | src/test/java/com/microsoft/bingads/v12/api/test/entities/criterions/adgroup/location/write/BulkAdGroupLocationCriterionWriteTargetTest.java | Java | mit | 1,546 |
package com.trevorgowing.projectlog.log.issue;
import com.trevorgowing.projectlog.log.Log;
import com.trevorgowing.projectlog.log.constant.Category;
import com.trevorgowing.projectlog.log.constant.Impact;
import com.trevorgowing.projectlog.log.constant.LogStatus;
import com.trevorgowing.projectlog.project.Project;
import com.trevorgowing.projectlog.user.User;
import java.time.LocalDate;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import lombok.NoArgsConstructor;
@Entity
@NoArgsConstructor
@DiscriminatorValue("issue")
public class Issue extends Log {
private static final long serialVersionUID = 1984300132708207255L;
private Issue(
String summary,
String description,
Category category,
Impact impact,
LogStatus status,
LocalDate dateClosed,
Project project,
User owner) {
super(summary, description, category, impact, status, dateClosed, project, owner);
}
private Issue(
Long id,
String summary,
String description,
Category category,
Impact impact,
LogStatus status,
LocalDate dateClosed,
Project project,
User owner) {
super(id, summary, description, category, impact, status, dateClosed, project, owner);
}
public static Issue unidentifiedIssue(
String summary,
String description,
Category category,
Impact impact,
LogStatus status,
LocalDate dateClosed,
Project project,
User owner) {
return new Issue(summary, description, category, impact, status, dateClosed, project, owner);
}
public static Issue completeIssue(
Long id,
String summary,
String description,
Category category,
Impact impact,
LogStatus status,
LocalDate dateClosed,
Project project,
User owner) {
return new Issue(
id, summary, description, category, impact, status, dateClosed, project, owner);
}
}
| trevorgowing/project-log-server | src/main/java/com/trevorgowing/projectlog/log/issue/Issue.java | Java | mit | 1,969 |
# encoding: utf-8
# This file is distributed under New Relic's license terms.
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '..', 'test_helper'))
class NewRelic::Agent::Instrumentation::ControllerInstrumentationTest < Test::Unit::TestCase
require 'new_relic/agent/instrumentation/controller_instrumentation'
class TestObject
include NewRelic::Agent::Instrumentation::ControllerInstrumentation
end
def setup
@object = TestObject.new
end
def test_detect_upstream_wait_basic
start_time = Time.now
# should return the start time above by default
@object.expects(:newrelic_request_headers).returns({:request => 'headers'}).twice
NewRelic::Agent::Instrumentation::QueueTime.expects(:parse_frontend_timestamp) \
.with({:request => 'headers'}, start_time).returns(start_time)
assert_equal(start_time, @object.send(:_detect_upstream_wait, start_time))
end
def test_detect_upstream_wait_with_upstream
start_time = Time.now
runs_at = start_time + 1
@object = TestObject.new
@object.expects(:newrelic_request_headers).returns(true).twice
NewRelic::Agent::Instrumentation::QueueTime.expects(:parse_frontend_timestamp) \
.with(true, runs_at).returns(start_time)
assert_equal(start_time, @object.send(:_detect_upstream_wait, runs_at))
end
def test_detect_upstream_wait_swallows_errors
start_time = Time.now
# should return the start time above when an error is raised
@object.expects(:newrelic_request_headers).returns({:request => 'headers'}).twice
NewRelic::Agent::Instrumentation::QueueTime.expects(:parse_frontend_timestamp) \
.with({:request => 'headers'}, start_time).raises("an error")
assert_equal(start_time, @object.send(:_detect_upstream_wait, start_time))
end
def test_transaction_name_calls_newrelic_metric_path
@object.stubs(:newrelic_metric_path).returns('some/wacky/path')
assert_equal('Controller/some/wacky/path', @object.send(:transaction_name))
end
def test_transaction_name_applies_category_and_path
assert_equal('Controller/metric/path',
@object.send(:transaction_name,
:category => :controller,
:path => 'metric/path'))
assert_equal('OtherTransaction/Background/metric/path',
@object.send(:transaction_name,
:category => :task, :path => 'metric/path'))
assert_equal('Controller/Rack/metric/path',
@object.send(:transaction_name,
:category => :rack, :path => 'metric/path'))
assert_equal('Controller/metric/path',
@object.send(:transaction_name,
:category => :uri, :path => 'metric/path'))
assert_equal('Controller/Sinatra/metric/path',
@object.send(:transaction_name,
:category => :sinatra,
:path => 'metric/path'))
assert_equal('Blarg/metric/path',
@object.send(:transaction_name,
:category => 'Blarg', :path => 'metric/path'))
end
def test_transaction_name_uses_class_name_if_path_not_specified
assert_equal('Controller/NewRelic::Agent::Instrumentation::ControllerInstrumentationTest::TestObject',
@object.send(:transaction_name, :category => :controller))
end
def test_transaction_name_applies_action_name_if_specified_and_not_path
assert_equal('Controller/NewRelic::Agent::Instrumentation::ControllerInstrumentationTest::TestObject/action',
@object.send(:transaction_name, :category => :controller,
:name => 'action'))
end
def test_transaction_name_applies_name_rules
rule = NewRelic::Agent::RulesEngine::Rule.new('match_expression' => '[0-9]+',
'replacement' => '*',
'replace_all' => true)
NewRelic::Agent.instance.transaction_rules << rule
assert_equal('foo/*/bar/*',
@object.send(:transaction_name, :category => 'foo',
:path => '1/bar/22'))
ensure
NewRelic::Agent.instance.instance_variable_set(:@transaction_rules,
NewRelic::Agent::RulesEngine.new)
end
def test_path_class_and_action
result = @object.send(:path_class_and_action, {})
assert_equal("NewRelic::Agent::Instrumentation::ControllerInstrumentationTest::TestObject", result)
end
def test_path_class_and_action_with_name
result = @object.send(:path_class_and_action, :name => "test")
assert_equal("NewRelic::Agent::Instrumentation::ControllerInstrumentationTest::TestObject/test", result)
end
def test_path_class_and_action_with_overridden_class_name
result = @object.send(:path_class_and_action, :name => "perform", :class_name => 'Resque')
assert_equal("Resque/perform", result)
end
end
| wearelung/portoalegrecc | vendor/cache/ruby/1.8/gems/newrelic_rpm-3.6.0.78/test/new_relic/agent/instrumentation/controller_instrumentation_test.rb | Ruby | mit | 5,117 |
var SourceDemoGame = require('./SourceDemoGame.js');
var GameStream = require('../../GameStream.js');
function HostDemoGame(name) {
var game = new SourceDemoGame(name);
HostDemoGame.apply(game);
return game;
}
HostDemoGame.apply = function(game) {
game.stream.push = true;
game.stream.on(GameStream.events.DELEGATE_REQUESTED, function(downStream) {
var playerName = game.createPlayer();
var player = game.entities[playerName];
setTimeout(function() {
var controlsMap = {};
controlsMap[playerName] = {
controls: true
};
var controlStream = game.stream.delegate(
{
map: controlsMap,
info: {
type: 'playerControls',
entityName: playerName
}
},
downStream
);
controlStream.on('data', function(state) {
game.applyState(state);
});
/*
var physicsMap[playerName] = {
physics: true
};
var physicsStream = game.stream.delegate(
{
map: physicsMap,
info: {
type: 'playerPhysics',
entityName: playerName
}
},
downStream
);
*/
function checkDisconnect(stream) {
if (stream === downStream) {
player.life.alive = false;
game.stream.undelegate(controlStream, downStream);
//game.stream.undelegate(physicsStream, downStream);
game.stream.removeListener('downstream-disconnect', checkDisconnect);
}
}
game.stream.on('downstream-disconnect', checkDisconnect);
}, 500);
});
}
module.exports = HostDemoGame;
| spiderworm/gamestream | test/demos/shared/games/HostDemoGame.js | JavaScript | mit | 1,476 |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Synthetic Core")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Synthetic Core")]
[assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("5d72b274-2496-4cc8-b39e-ab4f517d39a4")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.2")]
[assembly: AssemblyFileVersion("1.0.0.0")]
| amcgoey/Synthetic | Synthetic Core/Properties/AssemblyInfo.cs | C# | mit | 1,404 |
package pugbot.core.commands;
import net.dv8tion.jda.core.entities.Member;
import net.dv8tion.jda.core.entities.Message;
import pugbot.Utils;
public class CmdGithub extends Command {
@Override
public Message execCommand(Member caller, String[] args) {
return Utils.createMessage("https://github.com/Implosions/PugBot");
}
@Override
public boolean isAdminRequired() {
return false;
}
@Override
public boolean isGlobalCommand() {
return true;
}
@Override
public String getName() {
return "Github";
}
@Override
public String getDescription() {
return "Links this bot's github repository";
}
@Override
public String getHelp() {
return getBaseCommand();
}
}
| Implosions/BullyBot | src/main/java/pugbot/core/commands/CmdGithub.java | Java | mit | 691 |
<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Namespace Juhta.Net.Diagnostics
</title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Namespace Juhta.Net.Diagnostics
">
<meta name="generator" content="docfx 2.28.2.0">
<link rel="shortcut icon" href="../favicon.ico">
<link rel="stylesheet" href="../styles/docfx.vendor.css">
<link rel="stylesheet" href="../styles/docfx.css">
<link rel="stylesheet" href="../styles/main.css">
<meta property="docfx:navrel" content="../toc.html">
<meta property="docfx:tocrel" content="toc.html">
</head>
<body data-spy="scroll" data-target="#affix">
<div id="wrapper">
<header>
<nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../logo.svg" alt="">
</a>
</div>
<div class="collapse navbar-collapse" id="navbar">
<form class="navbar-form navbar-right" role="search" id="search">
<div class="form-group">
<input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
</div>
</form>
</div>
</div>
</nav>
<div class="subnav navbar navbar-default">
<div class="container hide-when-search" id="breadcrumb">
<ul class="breadcrumb">
<li></li>
</ul>
</div>
</div>
</header>
<div role="main" class="container body-content hide-when-search">
<div class="sidenav hide-when-search">
<a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
<div class="sidetoggle collapse" id="sidetoggle">
<div id="sidetoc"></div>
</div>
</div>
<div class="article row grid-right">
<div class="col-md-10">
<article class="content wrap" id="_content" data-uid="Juhta.Net.Diagnostics">
<h1 id="Juhta_Net_Diagnostics" data-uid="Juhta.Net.Diagnostics" class="text-break">Namespace Juhta.Net.Diagnostics
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>
<div class="markdown level0 remarks"></div>
<h3 id="classes">Classes
</h3>
<h4><a class="xref" href="Juhta.Net.Diagnostics.AlertMessage.html">AlertMessage</a></h4>
<section><p>Defines a class for alert messages.</p>
</section>
<h4><a class="xref" href="Juhta.Net.Diagnostics.DiagnosticMessage.html">DiagnosticMessage</a></h4>
<section><p>Defines an abstract base class for diagnostic messages. Diagnostic messages make it possible not to write long
messages inside the actual code but centralize them in better manageable separate contexts.</p>
</section>
<h4><a class="xref" href="Juhta.Net.Diagnostics.DiagnosticMessageFactory.html">DiagnosticMessageFactory</a></h4>
<section><p>Represents a class that can be used to create instances of classes deriving from the <a class="xref" href="Juhta.Net.Diagnostics.DiagnosticMessage.html">DiagnosticMessage</a>
class. The main benefit of using this class is automatic and consistent message ID generation.</p>
</section>
<h4><a class="xref" href="Juhta.Net.Diagnostics.ErrorMessage.html">ErrorMessage</a></h4>
<section><p>Defines a class for error messages.</p>
</section>
<h4><a class="xref" href="Juhta.Net.Diagnostics.FileLogger.html">FileLogger</a></h4>
<section><p>Defines a logger class that writes log events to a file.</p>
</section>
<h4><a class="xref" href="Juhta.Net.Diagnostics.InformationMessage.html">InformationMessage</a></h4>
<section><p>Defines a class for information messages.</p>
</section>
<h4><a class="xref" href="Juhta.Net.Diagnostics.WarningMessage.html">WarningMessage</a></h4>
<section><p>Defines a class for warning messages.</p>
</section>
<h3 id="interfaces">Interfaces
</h3>
<h4><a class="xref" href="Juhta.Net.Diagnostics.ILogger.html">ILogger</a></h4>
<section><p>Defines an interface for the loggers to be used with the framework.</p>
</section>
<h3 id="enums">Enums
</h3>
<h4><a class="xref" href="Juhta.Net.Diagnostics.DiagnosticMessageIdBase.html">DiagnosticMessageIdBase</a></h4>
<section><p>An enumeration that defines the diagnostic message ID bases used in the framework libraries.</p>
</section>
<h4><a class="xref" href="Juhta.Net.Diagnostics.DiagnosticMessageType.html">DiagnosticMessageType</a></h4>
<section><p>Defines an enumeration for the diagnostic message types.</p>
</section>
</article>
</div>
<div class="hidden-sm col-md-2" role="complementary">
<div class="sideaffix">
<div class="contribution">
<ul class="nav">
</ul>
</div>
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
<!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
</nav>
</div>
</div>
</div>
</div>
<footer>
<div class="grad-bottom"></div>
<div class="footer">
<div class="container">
<span class="pull-right">
<a href="#top">Back to top</a>
</span>
<span>Copyright © 2017-2018 Juha Lähteenmäki<br>Generated by <b>DocFX</b></span>
</div>
</div>
</footer>
</div>
<script type="text/javascript" src="../styles/docfx.vendor.js"></script>
<script type="text/javascript" src="../styles/docfx.js"></script>
<script type="text/javascript" src="../styles/main.js"></script>
</body>
</html>
| jlahteen/Juhta.NET | docs/1.0.0-rc/api/Juhta.Net.Diagnostics.html | HTML | mit | 6,562 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.