answer stringlengths 15 1.25M |
|---|
import * as React from 'react';
import * as Constants from './constants';
import { IContextMenuTrigger } from './interfaces';
import { ContextMenuHelper } from './helper';
interface Props {
id: string;
args?: null | undefined | number | string;
}
interface State {
}
export class Trigger extends React.PureComponent <Props, State> implements IContextMenuTrigger {
public constructor(props: Props) {
super(props);
this.showContextMenu = this.showContextMenu.bind(this);
}
public render() {
const {
id
} = this.props;
return(
<div
id={id}
className={Constants.CLASS_MENU_WRAPPER}
onContextMenu={this.showContextMenu}
>
{this.props.children}
</div>
);
}
public showContextMenu(event: React.MouseEvent<HTMLElement>) {
const menuHelper = ContextMenuHelper.getInstance();
menuHelper.showMenuById(this.props.id, this.props.args, event.clientY, event.clientX);
}
} |
import React from 'react';
import {connect} from 'react-redux';
import Component from '../components/terms';
import {goTo} from '../modules/navigation/actions';
function mapStateToProps(state) {
return {};
}
const mapDispatchToProps = (dispatch, ownProps) => {
return {
goTo(path) {
dispatch(goTo(path));
}
};
};
export default connect(mapStateToProps, mapDispatchToProps)(Component); |
#pragma once
#include <VoxieClient/VoxieClient.hpp>
#include <QtCore/QSharedPointer>
#include <QtCore/QtGlobal>
#include <QtDBus/QDBusVariant>
namespace vx {
class MMapHandle;
class HandleHolder;
class MapHolder;
class VOXIECLIENT_EXPORT MappedBuffer {
QSharedPointer<MMapHandle> mmapHandle;
QSharedPointer<HandleHolder> handleHolder;
QSharedPointer<MapHolder> map;
void* data_;
public:
MappedBuffer(const QMap<QString, QDBusVariant>& handle, size_t size,
bool writable);
~MappedBuffer();
void* data() const { return data_; }
};
} // namespace vx |
require "test_helper"
class <API key> < ActionView::TestCase
def test_sanity
flunk "Need real tests"
end
end |
(function() { 'use strict';
angular.module('metricapp')
.controller('QuestionModalCtrl', QuestionModalCtrl);
QuestionModalCtrl.$inject = ['$location', '$uibModalInstance', '$window', '<API key>', '<API key>'];
function QuestionModalCtrl($location, $uibModalInstance, $window, <API key>, <API key>) {
var ctrl = this;
ctrl.questionDialog = <API key>.getQuestion();
ctrl.deleteQuestion = function (questionId, index) {
// $uibModalInstance.dismiss("closing");
// <API key>.delete(questionId).then(
// function(data, status){
// $window.alert("deleted " + questionId);
// ctrl.questions.splice(index, 1);
// function(data, status){
// $window.alert(status);
};
ctrl.closeModal = function(){
$uibModalInstance.dismiss("closing");
};
ctrl.editQuestion = function(question){
$uibModalInstance.dismiss("closing");
<API key>.setQuestion(question);
$location.path('/questionUpdate');
};
ctrl.sendForApproval = function(){
$uibModalInstance.dismiss("closing");
if(ctrl.questionDialog.metadata.state == <API key>.STATES.CREATED ||
ctrl.questionDialog.metadata.state == <API key>.STATES.ONUPDATE ||
ctrl.questionDialog.metadata.state == <API key>.STATES.REJECTED){
ctrl.questionDialog.metadata.state = <API key>.STATES.PENDING;
<API key>.update(ctrl.questionDialog).then(
function(data, status){
$window.alert("Question sent for approval");
$location.path('/questionList');
},
function(data, status){
$window.alert("Error: status " + status);
}
);
}
else if(ctrl.questionDialog.metadata.state == <API key>.STATES.APPROVED){
$window.alert("The question has already been approved");
}
else{
$window.alert("The Question cannot be sent for approval");
}
};
}
})(); |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>dpdgraph: Not compatible </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.11.0 / dpdgraph - 0.5</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
dpdgraph
<small>
0.5
<span class="label label-info">Not compatible </span>
</small>
</h1>
<p> <em><script>document.write(moment("2021-11-16 15:00:10 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-11-16 15:00:10 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
coq 8.11.0 Formal proof management system
num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.07.1 The OCaml compiler (virtual package)
ocaml-base-compiler 4.07.1 Official release 4.07.1
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "yves.bertot@inria.fr"
license: "LGPL 2.1"
homepage: "https://github.com/karmaki/coq-dpdgraph"
build: [
["./configure"]
["echo" "%{jobs}%" "jobs for the linter"]
[make]
]
install: [make "install" "BINDIR=%{bin}%"]
depends: [
"ocaml"
"coq" {>= "8.5" & < "8.6~"}
"ocamlgraph"
]
authors: [ "Anne Pacalet" "Yves Bertot"]
tags: [
"logpath:dpdgraph"
]
synopsis: "Compute dependencies between Coq objects (definitions, theorems) and produce graphs"
url {
src:
"https://github.com/ybertot/coq-dpdgraph/archive/coq-dpdgraph-0.5-rc2.zip"
checksum: "md5=<API key>"
}
</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-dpdgraph.0.5 coq.8.11.0</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.11.0).
The following dependencies couldn't be met:
- coq-dpdgraph -> coq < 8.6~ -> ocaml < 4.06.0
base of this switch (use `--unlock-base' to force)
No solution found, exiting
</pre></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>opam remove -y coq; opam install -y --show-action --unlock-base coq-dpdgraph.0.5</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install </h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</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:
</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> |
use ::{BroadcastMode, Instruction, MaskReg, MergeMode, Mnemonic, OperandSize, Reg, RoundingMode};
use ::RegType::*;
use ::instruction_def::*;
use ::Operand::*;
use ::Reg::*;
use ::RegScale::*;
fn korw_1() {
run_test(&Instruction { mnemonic: Mnemonic::KORW, operand1: Some(Direct(K7)), operand2: Some(Direct(K6)), operand3: Some(Direct(K1)), operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[197, 204, 69, 249], OperandSize::Dword)
}
fn korw_2() {
run_test(&Instruction { mnemonic: Mnemonic::KORW, operand1: Some(Direct(K7)), operand2: Some(Direct(K3)), operand3: Some(Direct(K2)), operand4: None, lock: false, rounding_mode: None, merge_mode: None, sae: false, mask: None, broadcast: None }, &[197, 228, 69, 250], OperandSize::Qword)
} |
AP::SmsExtension::Sms::config_account({:phone_number => "1234", :<API key> => "howdy {{title}}"})
class ActionController::Base
def authenticate_admin!
end
end |
using System;
namespace Abstraction
{
abstract class Figure
{
public abstract double CalcPerimeter();
public abstract double CalcSurface();
}
} |
<!DOCTYPE html>
<html xmlns="http:
<head>
<link href="http://gmpg.org/xfn/11" rel="profile">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="generator" content="Hugo 0.18.1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<title>Docker · </title>
<link rel="stylesheet" href="//fbigun.github.io/css/poole.css">
<link rel="stylesheet" href="//fbigun.github.io/css/syntax.css">
<link rel="stylesheet" href="//fbigun.github.io/css/hyde.css">
<link rel="stylesheet" href="https://fonts.lug.ustc.edu.cn/css?family=PT+Sans:400,400italic,700|Abril+Fatface">
<link rel="stylesheet" href="/css/highlight.js/9.9.0/styles/default.min.css" />
<script src="/js/highlight.js/9.9.0/highlight.min.js"></script>
<script>hljs.<API key>();</script>
<link rel="<API key>" sizes="144x144" href="/<API key>.png">
<link rel="shortcut icon" href="/favicon.png">
<link href="//fbigun.github.io/categories/docker/index.xml" rel="alternate" type="application/rss+xml" title="" />
</head>
<body class="theme-base-0c layout-reverse">
<div class="sidebar">
<div class="container sidebar-sticky">
<div class="sidebar-about">
<a href="//fbigun.github.io/"><h1></h1></a>
<p class="lead">
··
</p>
</div>
<ul class="sidebarnav">
<li><a href="/"></a></li>
<li><a href="/post/<API key>/"> Dockerfile </a></li>
<li><a href="/post/hugo-travis-ci-blog/"> hugo travis-ci github </a></li>
<li><a href="/welcome/"> </a></li>
</ul>
<p>© 2017. All rights reserved. </p>
</div>
</div>
<div class="content container">
<ul class="posts">
<li>
<span><a href="//fbigun.github.io/post/<API key>/">Dockerfile </a> <time class="pull-right post-list">Sat, Dec 31, 2016</time></span>
</li>
</ul>
</div>
</body>
</html> |
<!DOCTYPE html>
<!
Created using JS Bin
http://jsbin.com
Copyright (c) 2017 by adrienjoly (http://jsbin.com/yisari/2/edit)
Released under the MIT license: http:
<meta name="robots" content="noindex">
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<!-- initialize google login api, for user authentication -->
<meta name="<API key>" content="<API key>.apps.googleusercontent.com">
<script src="https://apis.google.com/js/platform.js" async defer></script>
</head>
<body>
<p>Connexion:
<div class="g-signin2" data-onsuccess="onSignIn"></div>
<a href="#" onclick="gapi.auth2.getAuthInstance().signOut(); return false;">Sign out</a>
</p>
<p>Twittez:</p>
<!-- Solution de l'exercice: -->
<input id="message" placeholder="Votre message">
<button id="bouton">Envoyer</button>
<!-- fin de la solution -->
<script id="jsbin-javascript">
function onSignIn(googleUser) {
window.token = googleUser.getAuthResponse().id_token;
(document.getElementById('tokenInput') || {}).value = token;
}
// Solution de l'exercice:
var message = document.getElementById('message');
function sendMessage() {
// pas la peine d'envoyer le message s'il est vide
if (message.value.length === 0) {
return;
}
var xhr = new XMLHttpRequest();
xhr.open('POST', 'https://js-ajax-twitter.herokuapp.com/tweet');
xhr.onreadystatechange = function() {
if (xhr.readyState === 4) {
console.log('Réponse finale du serveur:', xhr.responseText);
var responseObject = JSON.parse(xhr.responseText);
if (responseObject.error) {
alert('Erreur: ' + responseObject.error);
} else {
console.log('Message envoyé avec succès :-)');
message.value = '';
}
}
};
xhr.send(JSON.stringify({
message: message.value,
token: window.token, // fourni dans le code HTML
}));
}
document.getElementById('bouton').onclick = function() {
console.log('L\'utilisateur a cliqué sur le bouton');
sendMessage();
};
document.getElementById('message').onchange = function() {
console.log('L\'utilisateur a pressé ENTRÉE');
sendMessage();
};
</script>
</body>
</html> |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>aac-tactics: Not compatible </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.11.0 / aac-tactics - 8.5.0</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.5.0
<span class="label label-info">Not compatible </span>
</small>
</h1>
<p> <em><script>document.write(moment("2021-10-20 03:14:38 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-10-20 03:14:38 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
coq 8.11.0 Formal proof management system
num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.06.1 The OCaml compiler (virtual package)
ocaml-base-compiler 4.06.1 Official 4.06.1 release
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "matej.kosik@inria.fr"
homepage: "https://github.com/coq-contribs/aac-tactics"
license: "LGPL"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/AAC_tactics"]
depends: [
"ocaml"
"coq" {>= "8.5" & < "8.6" & != "8.5.0~camlp4" & != "8.5.2~camlp4"}
]
tags: [ "keyword:reflexive tactic" "keyword:rewriting" "keyword:rewriting modulo associativity and commutativity" "keyword:rewriting modulo ac" "keyword:decision procedure" "category:Miscellaneous/Coq Extensions" ]
authors: [ "Damien Pous <damien.pous@inria.fr>" "Thomas Braibant <thomas.braibant@gmail.com>" ]
bug-reports: "coqdev@inria.fr"
dev-repo: "git+https://github.com/coq-contribs/aac-tactics.git"
synopsis: "AAC tactics"
description:
"This Coq plugin provides tactics for rewriting universally quantified equations, modulo associative (and possibly commutative) operators:"
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/aac-tactics/archive/v8.5.0.tar.gz"
checksum: "md5=<API key>"
}
</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.5.0 coq.8.11.0</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.11.0).
The following dependencies couldn't be met:
- coq-aac-tactics -> coq < 8.6 -> ocaml < 4.06.0
base of this switch (use `--unlock-base' to force)
No solution found, exiting
</pre></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>opam remove -y coq; opam install -y --show-action --unlock-base coq-aac-tactics.8.5.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install </h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</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:
</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> |
var breadcrumbs=[['-1',"",""],['2',"SOLUTION-WIDE PROPERTIES Reference","<API key>.html"],['2897',"Tlece.Recruitment.Models.TleceAccount Namespace","<API key>.html"],['2907',"LoginResponseDto Class","<API key>.html"],['2908',"Properties","<API key>--.html"],['2910',"JwtToken Property","<API key>.html"]]; |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: <API key>.cpp
Label Definition File: CWE401_Memory_Leak.c.label.xml
Template File: sources-sinks-72a.tmpl.cpp
*/
/*
* @description
* CWE: 401 Memory Leak
* BadSource: malloc Allocate data using malloc()
* GoodSource: Allocate data on the stack
* Sinks:
* GoodSink: call free() on data
* BadSink : no deallocation of data
* Flow Variant: 72 Data flow: data passed in a vector from one function to another in different source files
*
* */
#include "std_testcase.h"
#include <vector>
#include <wchar.h>
using namespace std;
namespace <API key>
{
#ifndef OMITBAD
/* bad function declaration */
void badSink(vector<twoIntsStruct *> dataVector);
void bad()
{
twoIntsStruct * data;
vector<twoIntsStruct *> dataVector;
data = NULL;
/* POTENTIAL FLAW: Allocate memory on the heap */
data = (twoIntsStruct *)malloc(100*sizeof(twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine(&data[0]);
/* Put data in a vector */
dataVector.insert(dataVector.end(), 1, data);
dataVector.insert(dataVector.end(), 1, data);
dataVector.insert(dataVector.end(), 1, data);
badSink(dataVector);
}
#endif /* OMITBAD */
#ifndef OMITGOOD
/* goodG2B uses the GoodSource with the BadSink */
void goodG2BSink(vector<twoIntsStruct *> dataVector);
static void goodG2B()
{
twoIntsStruct * data;
vector<twoIntsStruct *> dataVector;
data = NULL;
/* FIX: Use memory allocated on the stack with ALLOCA */
data = (twoIntsStruct *)ALLOCA(100*sizeof(twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine(&data[0]);
/* Put data in a vector */
dataVector.insert(dataVector.end(), 1, data);
dataVector.insert(dataVector.end(), 1, data);
dataVector.insert(dataVector.end(), 1, data);
goodG2BSink(dataVector);
}
/* goodB2G uses the BadSource with the GoodSink */
void goodB2GSink(vector<twoIntsStruct *> dataVector);
static void goodB2G()
{
twoIntsStruct * data;
vector<twoIntsStruct *> dataVector;
data = NULL;
/* POTENTIAL FLAW: Allocate memory on the heap */
data = (twoIntsStruct *)malloc(100*sizeof(twoIntsStruct));
/* Initialize and make use of data */
data[0].intOne = 0;
data[0].intTwo = 0;
printStructLine(&data[0]);
dataVector.insert(dataVector.end(), 1, data);
dataVector.insert(dataVector.end(), 1, data);
dataVector.insert(dataVector.end(), 1, data);
goodB2GSink(dataVector);
}
void good()
{
goodG2B();
goodB2G();
}
#endif /* OMITGOOD */
} /* close namespace */
/* Below is the main(). It is only used when building this testcase on
its own for testing or for building a binary to use in testing binary
analysis tools. It is not used when compiling all the testcases as one
application, which is how source code analysis tools are tested. */
#ifdef INCLUDEMAIN
using namespace <API key>; /* so that we can use good and bad easily */
int main(int argc, char * argv[])
{
/* seed randomness */
srand( (unsigned)time(NULL) );
#ifndef OMITGOOD
printLine("Calling good()...");
good();
printLine("Finished good()");
#endif /* OMITGOOD */
#ifndef OMITBAD
printLine("Calling bad()...");
bad();
printLine("Finished bad()");
#endif /* OMITBAD */
return 0;
}
#endif |
'use strict';
describe('myApp.searchview module', function() {
beforeEach(module('myApp.searchview'));
describe('searchview controller', function(){
it('should ....', inject(function($controller) {
//spec body
var view1Ctrl = $controller('SearchCtrl');
expect(view1Ctrl).toBeDefined();
}));
});
}); |
require 'goliath'
require 'goliath/api'
require 'goliath/websocket'
module GrapeApe
class Server < ::Goliath::API
def initialize(opts = {})
@api = opts.delete(:api)
end
def response(env)
@api.call(env)
end
end
end |
/**
* The `Chain` type class extends the `Apply` type class with a `chain` operation which composes computations in
* sequence, using the return value of one computation to determine the next computation.
*
* Instances must satisfy the following law in addition to the `Apply` laws:
*
* 1. Associativity: `F.chain(F.chain(fa, afb), bfc) <-> F.chain(fa, a => F.chain(afb(a), bfc))`
*
* Note. `Apply`'s `ap` can be derived: `(fab, fa) => F.chain(fab, f => F.map(fa, f))`
*
* @since 2.0.0
*/
import { Apply, Apply1, Apply2, Apply2C, Apply3, Apply4, Apply3C } from './Apply'
import { HKT, Kind, Kind2, Kind3, Kind4, URIS, URIS2, URIS3, URIS4 } from './HKT'
// model
/**
* @category type classes
* @since 2.0.0
*/
export interface Chain<F> extends Apply<F> {
readonly chain: <A, B>(fa: HKT<F, A>, f: (a: A) => HKT<F, B>) => HKT<F, B>
}
/**
* @category type classes
* @since 2.0.0
*/
export interface Chain1<F extends URIS> extends Apply1<F> {
readonly chain: <A, B>(fa: Kind<F, A>, f: (a: A) => Kind<F, B>) => Kind<F, B>
}
/**
* @category type classes
* @since 2.0.0
*/
export interface Chain2<F extends URIS2> extends Apply2<F> {
readonly chain: <E, A, B>(fa: Kind2<F, E, A>, f: (a: A) => Kind2<F, E, B>) => Kind2<F, E, B>
}
/**
* @category type classes
* @since 2.0.0
*/
export interface Chain2C<F extends URIS2, E> extends Apply2C<F, E> {
readonly chain: <A, B>(fa: Kind2<F, E, A>, f: (a: A) => Kind2<F, E, B>) => Kind2<F, E, B>
}
/**
* @category type classes
* @since 2.0.0
*/
export interface Chain3<F extends URIS3> extends Apply3<F> {
readonly chain: <R, E, A, B>(fa: Kind3<F, R, E, A>, f: (a: A) => Kind3<F, R, E, B>) => Kind3<F, R, E, B>
}
/**
* @category type classes
* @since 2.2.0
*/
export interface Chain3C<F extends URIS3, E> extends Apply3C<F, E> {
readonly chain: <R, A, B>(fa: Kind3<F, R, E, A>, f: (a: A) => Kind3<F, R, E, B>) => Kind3<F, R, E, B>
}
/**
* @category type classes
* @since 2.0.0
*/
export interface Chain4<F extends URIS4> extends Apply4<F> {
readonly chain: <S, R, E, A, B>(fa: Kind4<F, S, R, E, A>, f: (a: A) => Kind4<F, S, R, E, B>) => Kind4<F, S, R, E, B>
}
// combinators
/**
* @category combinators
* @since 2.10.0
*/
export function chainFirst<M extends URIS4>(
M: Chain4<M>
): <A, S, R, E, B>(f: (a: A) => Kind4<M, S, R, E, B>) => (first: Kind4<M, S, R, E, A>) => Kind4<M, S, R, E, A>
export function chainFirst<M extends URIS3>(
M: Chain3<M>
): <A, R, E, B>(f: (a: A) => Kind3<M, R, E, B>) => (first: Kind3<M, R, E, A>) => Kind3<M, R, E, A>
export function chainFirst<M extends URIS3, E>(
M: Chain3C<M, E>
): <A, R, B>(f: (a: A) => Kind3<M, R, E, B>) => (first: Kind3<M, R, E, A>) => Kind3<M, R, E, A>
export function chainFirst<M extends URIS2>(
M: Chain2<M>
): <A, E, B>(f: (a: A) => Kind2<M, E, B>) => (first: Kind2<M, E, A>) => Kind2<M, E, A>
export function chainFirst<M extends URIS2, E>(
M: Chain2C<M, E>
): <A, B>(f: (a: A) => Kind2<M, E, B>) => (first: Kind2<M, E, A>) => Kind2<M, E, A>
export function chainFirst<M extends URIS>(
M: Chain1<M>
): <A, B>(f: (a: A) => Kind<M, B>) => (first: Kind<M, A>) => Kind<M, A>
export function chainFirst<M>(M: Chain<M>): <A, B>(f: (a: A) => HKT<M, B>) => (first: HKT<M, A>) => HKT<M, A>
export function chainFirst<M>(M: Chain<M>): <A, B>(f: (a: A) => HKT<M, B>) => (first: HKT<M, A>) => HKT<M, A> {
return (f) => (first) => M.chain(first, (a) => M.map(f(a), () => a))
}
// utils
/**
* @since 2.10.0
*/
export function bind<M extends URIS4>(
M: Chain4<M>
): <N extends string, A, S, R, E, B>(
name: Exclude<N, keyof A>,
f: (a: A) => Kind4<M, S, R, E, B>
) => (ma: Kind4<M, S, R, E, A>) => Kind4<M, S, R, E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }>
export function bind<M extends URIS3>(
M: Chain3<M>
): <N extends string, A, R, E, B>(
name: Exclude<N, keyof A>,
f: (a: A) => Kind3<M, R, E, B>
) => (ma: Kind3<M, R, E, A>) => Kind3<M, R, E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }>
export function bind<M extends URIS3, E>(
M: Chain3C<M, E>
): <N extends string, A, R, B>(
name: Exclude<N, keyof A>,
f: (a: A) => Kind3<M, R, E, B>
) => (ma: Kind3<M, R, E, A>) => Kind3<M, R, E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }>
export function bind<M extends URIS2>(
M: Chain2<M>
): <N extends string, A, E, B>(
name: Exclude<N, keyof A>,
f: (a: A) => Kind2<M, E, B>
) => (ma: Kind2<M, E, A>) => Kind2<M, E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }>
export function bind<M extends URIS2, E>(
M: Chain2C<M, E>
): <N extends string, A, B>(
name: Exclude<N, keyof A>,
f: (a: A) => Kind2<M, E, B>
) => (ma: Kind2<M, E, A>) => Kind2<M, E, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }>
export function bind<M extends URIS>(
M: Chain1<M>
): <N extends string, A, B>(
name: Exclude<N, keyof A>,
f: (a: A) => Kind<M, B>
) => (ma: Kind<M, A>) => Kind<M, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }>
export function bind<M>(
M: Chain<M>
): <N extends string, A, B>(
name: Exclude<N, keyof A>,
f: (a: A) => HKT<M, B>
) => (ma: HKT<M, A>) => HKT<M, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }>
export function bind<M>(
M: Chain<M>
): <N extends string, A, B>(
name: Exclude<N, keyof A>,
f: (a: A) => HKT<M, B>
) => (ma: HKT<M, A>) => HKT<M, { readonly [K in keyof A | N]: K extends keyof A ? A[K] : B }> {
return (name, f) => (ma) => M.chain(ma, (a) => M.map(f(a), (b) => Object.assign({}, a, { [name]: b }) as any))
} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>metacoq-template: Not compatible </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.11.0 / metacoq-template - 1.0~alpha1+8.9</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
metacoq-template
<small>
1.0~alpha1+8.9
<span class="label label-info">Not compatible </span>
</small>
</h1>
<p> <em><script>document.write(moment("2021-10-28 09:54:59 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-10-28 09:54:59 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-num base Num library distributed with the OCaml compiler
base-threads base
base-unix base
conf-findutils 1 Virtual package relying on findutils
coq 8.11.0 Formal proof management system
num 0 The Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.05.0 The OCaml compiler (virtual package)
ocaml-base-compiler 4.05.0 Official 4.05.0 release
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "matthieu.sozeau@inria.fr"
homepage: "https://metacoq.github.io/metacoq"
dev-repo: "git+https://github.com/MetaCoq/metacoq.git#coq-8.8"
bug-reports: "https://github.com/MetaCoq/metacoq/issues"
authors: ["Abhishek Anand <aa755@cs.cornell.edu>"
"Simon Boulier <simon.boulier@inria.fr>"
"Cyril Cohen <cyril.cohen@inria.fr>"
"Yannick Forster <forster@ps.uni-saarland.de>"
"Fabian Kunze <fkunze@fakusb.de>"
"Gregory Malecha <gmalecha@gmail.com>"
"Matthieu Sozeau <matthieu.sozeau@inria.fr>"
"Nicolas Tabareau <nicolas.tabareau@inria.fr>"
"Théo Winterhalter <theo.winterhalter@inria.fr>"
]
license: "MIT"
build: [
["sh" "./configure.sh"]
[make "-j%{jobs}%" "template-coq"]
]
install: [
[make "-C" "template-coq" "install"]
]
depends: [
"ocaml" {> "4.02.3"}
"coq" {>= "8.9" & < "8.10~"}
]
synopsis: "A quoting and unquoting library for Coq in Coq"
description: """
MetaCoq is a meta-programming framework for Coq.
Template Coq is a quoting library for Coq. It takes Coq terms and
constructs a representation of their syntax tree as a Coq inductive data
type. The representation is based on the kernel's term representation.
In addition to a complete reification and denotation of CIC terms,
Template Coq includes:
- Reification of the environment structures, for constant and inductive declarations.
- Denotation of terms and global declarations
- A monad for manipulating global declarations, calling the type
checker, and inserting them in the global environment, in the style of
MetaCoq/MTac.
"""
url {
src: "https://github.com/MetaCoq/metacoq/archive/1.0-alpha+8.9.tar.gz"
checksum: "sha256=<SHA256-like>"
}</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 <API key>.1.0~alpha1+8.9 coq.8.11.0</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.11.0).
The following dependencies couldn't be met:
- <API key> -> coq < 8.10~ -> ocaml < 4.03.0
base of this switch (use `--unlock-base' to force)
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></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>opam remove -y coq; opam install -y --show-action --unlock-base <API key>.1.0~alpha1+8.9</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install </h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</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:
</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> |
// <auto-generated>
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
namespace Microsoft.Azure.Management.DataFactory.Models
{
using System.Collections;
using System.Collections.Generic;
using System.Linq;
<summary>
A copy activity source for web page table.
</summary>
public partial class WebSource : CopySource
{
<summary>
Initializes a new instance of the WebSource class.
</summary>
public WebSource()
{
CustomInit();
}
<summary>
Initializes a new instance of the WebSource class.
</summary>
<param name="<API key>">Unmatched properties from the
message are deserialized this collection</param>
<param name="sourceRetryCount">Source retry count. Type: integer
(or Expression with resultType integer).</param>
<param name="sourceRetryWait">Source retry wait. Type: string (or
Expression with resultType string), pattern:
((\d+)\.)?(\d\d):(60|([0-5][0-9])):(60|([0-5][0-9])).</param>
<param name="<API key>">The maximum concurrent
connection count for the source data store. Type: integer (or
Expression with resultType integer).</param>
public WebSource(IDictionary<string, object> <API key> = default(IDictionary<string, object>), object sourceRetryCount = default(object), object sourceRetryWait = default(object), object <API key> = default(object))
: base(<API key>, sourceRetryCount, sourceRetryWait, <API key>)
{
CustomInit();
}
<summary>
An initialization method that performs custom operations like setting defaults
</summary>
partial void CustomInit();
}
} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>automata: Not compatible </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.2 / automata - 8.5.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
automata
<small>
8.5.0
<span class="label label-info">Not compatible </span>
</small>
</h1>
<p> <em><script>document.write(moment("2022-01-18 17:02:12 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-01-18 17:02:12 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.2 Formal proof management system
num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.12.1 The OCaml compiler (virtual package)
ocaml-base-compiler 4.12.1 Official release 4.12.1
ocaml-config 2 OCaml Switch Configuration
<API key> 1 Ensure that OCaml is compiled with no special options enabled
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: "matej.kosik@inria.fr"
homepage: "https://github.com/coq-contribs/automata"
license: "LGPL 2"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/Automata"]
depends: [
"ocaml"
"coq" {>= "8.5" & < "8.6~"}
]
tags: [
"keyword:formal language theory"
"keyword:finite automata"
"keyword:push-down automata"
"keyword:rational langages"
"keyword:Kleene"
"category:Computer Science/Formal Languages Theory and Automata"
"date:June-July 1993"
]
authors: [ "Jean-Christophe Filliâtre <>" "Judicaël Courant <>" ]
bug-reports: "https://github.com/coq-contribs/automata/issues"
dev-repo: "git+https://github.com/coq-contribs/automata.git"
synopsis: "Beginning of formal language theory"
description: """
This library formalises the beginning of formal language theory:
finite automata and rational languages, context-free grammars
and push-down automata."""
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/automata/archive/v8.5.0.tar.gz"
checksum: "md5=<API key>"
}
</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-automata.8.5.0 coq.8.13.2</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.13.2).
The following dependencies couldn't be met:
- coq-automata -> coq < 8.6~ -> ocaml < 4.06.0
base of this switch (use `--unlock-base' to force)
No solution found, exiting
</pre></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>opam remove -y coq; opam install -y --show-action --unlock-base coq-automata.8.5.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install </h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</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:
</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> |
// WARNING
// This file has been generated automatically by Xamarin Studio from the outlets and
// actions declared in your storyboard file.
// Manual changes to this file will not be maintained.
using Foundation;
using System;
using System.CodeDom.Compiler;
using UIKit;
namespace Shopping.DemoApp.iOS
{
[Register ("NhaViewCell")]
partial class NhaViewCell
{
void <API key> ()
{
}
}
} |
#!/usr/bin/env node
'use strict'
/**
* json2xml module
* @module json2xml
* @see module:index
*/
const commander = require('commander')
const fs = require('fs')
const path = require('path')
const XMLLite = require('../lib/index')
// xml2json
commander
.command('xml2json [xml]')
.description('converting xml to json')
.option('--replacer [replacer]', 'replacer')
.option('--space [space]', 'space')
.action((xml, options) => {
fs.readFile(path.resolve(process.cwd(), xml), 'utf8', (err, content) => {
if (err) throw err
console.log(XMLLite.xml2json(content, options.replacer, options.space))
})
})
// json2xml
commander
.command('json2xml [json]')
.description('converting json to xml')
.option('--beautify', 'beautify')
.option('--indent [indent]', 'indent', ' ')
.option('--uglify', 'uglify')
.option('--preserveComments', 'preserve comments')
.action((json, options) => {
fs.readFile(path.resolve(process.cwd(), json), 'utf8', (err, content) => {
if (err) throw err
console.log(XMLLite.json2xml(content, options))
})
})
// beautify
commander
.command('beautify [xml]')
.description('beautifying an xml file')
.option('--indent [indent]', 'indent', ' ')
.action((xml, options) => {
fs.readFile(path.resolve(process.cwd(), xml), 'utf8', (err, content) => {
if (err) throw err
console.log(XMLLite.beautify(content, options.indent))
// XMLLite.beautify(content, options.indent);
})
})
// uglify
commander
.command('uglify [xml]')
.description('uglifying an xml file')
.option('--preserveComments', 'preserve comments')
.action((xml, options) => {
fs.readFile(path.resolve(process.cwd(), xml), 'utf8', (err, content) => {
if (err) throw err
console.log(XMLLite.uglify(content, options.preserveComments))
})
})
// execute client
commander.parse(process.argv)
if (process.argv.length === 2) commander.outputHelp() |
#include "stdafx.h"
#include "LafsFlat.h"
#include "FormattingException.h"
#include <Windows.h>
#include <sstream>
#include <fstream>
using namespace DarkOsFormat;
const unsigned int LafsFlat::LAFS_NAME_SIZE = 6;
const unsigned int LafsFlat::<API key> = 128;
const unsigned int LafsFlat::LAFS_JUMP_MAXLEN = 31;
const unsigned int LafsFlat::LAFS_SECTOR_SIZE = 1024;
const unsigned int LafsFlat::LAFS_ENTRY_SIZE = sizeof(WORD);
int LafsFlat::<API key>(const DirectoryEntry& dir)
{
int iEntryCount = 2; //2 for root entry 1 (root directory) + 1 (jump directory)
std::vector<DirectoryEntry> it = dir.getDirectories();
for(std::vector<DirectoryEntry>::const_iterator it = dir.getDirectories().begin();
it != dir.getDirectories().end();
it++)
iEntryCount += <API key>(*it);
return iEntryCount;
}
bool LafsFlat::addFile(const FileEntry& file)
{
WORD wEntryBuffer = 0x0000; //First bit is zero for a file
int iTrailingFileSize = (static_cast<int>((file.getSize() / sizeof(WORD)) % 512 ) - 256) / 2;
//Decrease one in magnitude as per spec
iTrailingFileSize += (iTrailingFileSize >= 0 ? -1 : 1);
WORD <API key> = static_cast<WORD>(std::abs(iTrailingFileSize));
if(iTrailingFileSize < 0)
<API key> |= 0x80; //Set sign bit
wEntryBuffer |= <API key> << 7;
if(m_lafsEntries.size() >= <API key>)
return false;
m_lafsEntries.push_back(LafsEntry(wEntryBuffer, file));
return true;
}
bool LafsFlat::startDirectory(const DirectoryEntry& dir)
{
WORD wEntryBuffer = 0x8000; //First bit is set for a directory
//Two entries per directory start of directory
if(2 + dir.getSize() >= getFreeEntries())
return false;
m_lafsEntries.push_back(LafsEntry(wEntryBuffer, dir));
m_lafsEntries.push_back(LafsEntry(wEntryBuffer, dir, true));
return true;
}
bool LafsFlat::addJumpDirectory(const DirectoryEntry& dir, const int iNextFlat)
{
WORD wEntryBuffer = 0x8000; //First bit is set for a directory
//Two entries per directory start of directory
if(m_lafsEntries.size() + 2 + dir.getSize() > <API key>)
return false;
m_lafsEntries.push_back(LafsEntry(wEntryBuffer, dir));
m_lafsEntries.push_back(LafsEntry(wEntryBuffer, dir, iNextFlat, true));
return true;
}
void LafsFlat::encodeName(std::ostream& out, const std::string& sName)
{
if(sName.size() > LAFS_NAME_SIZE)
throw FormattingException("Name of file exceeds permitted limit.");
for(unsigned int i = 0; i < LAFS_NAME_SIZE; i++)
out.put( i < sName.size() ? sName.c_str()[i] : 0);
}
void LafsFlat::encodeSkipName(std::ostream& out, const int iNext)
{
out.put('.');
out.put(0);
WORD wBuffer = iNext;
out.write(reinterpret_cast<char*>(&wBuffer), sizeof(WORD));
out.put(0);
out.put(0);
}
void LafsFlat::encodeNext(std::ostream& out, const WORD wEntry, const int iNext, const bool isJump)
{
if(iNext > LAFS_JUMP_MAXLEN)
throw FormattingException("File offset exceeds permitted limit.");
WORD wBuffer = wEntry | abs(iNext);
//Set sign bit
if(iNext < 0)
wBuffer |= 0x20; // 100000b
out.write(reinterpret_cast<char*>(&wBuffer), sizeof(WORD));
}
unsigned int LafsFlat::getFreeEntries()
{
return (<API key> - m_lafsEntries.size());
}
int LafsFlat::findExtention(const std::vector<LafsEntry>::const_iterator& entry)
{
std::vector<LafsEntry>::const_iterator cur = entry;
for(cur--; cur != entry; cur--)
{
if(cur == m_lafsEntries.end())
cur = m_lafsEntries.begin();
if(std::abs(cur - entry) > LAFS_JUMP_MAXLEN)
continue;
if(!cur->m_isSectorReserved)
return cur - entry;
}
throw FormattingException("Unable to locate free file extention.");
}
void LafsFlat::format(std::ostream& out, Bitmap& bitmap)
{
std::stringstream ssStringFlat;
std::stringstream ssEntryBuffer;
std::stringstream ssSectorBuffer;
if(m_lafsEntries.size() > <API key>)
throw FormattingException("Too many entries contained in this directory flat.");
for(std::vector<LafsEntry>::const_iterator it = m_lafsEntries.begin(); it != m_lafsEntries.end(); it++)
{
int iNext = ( m_lafsEntries.end() - it == 1 ? 0 : 1); //If we are at the last entry, the next entry should be null.
bitmap.set(std::abs(it - m_lafsEntries.begin()));
switch(it->m_type)
{
case LafsEntryType_File:
{
unsigned int uiExtentionCount = it->m_file.getSize() / LAFS_SECTOR_SIZE;
if(uiExtentionCount > 0)
throw FormattingException("Formatter does not support file extentions.");
std::ifstream inFile(it->m_file.getSourceFile().c_str(), std::ios::in | std::ios::binary);
if(!inFile.good())
throw FormattingException(std::string("Error reading from source file") + it->m_file.getName());
for(unsigned char b = inFile.get(); !inFile.eof(); b = inFile.get())
ssSectorBuffer.put(b);
for(std::streamoff i = it->m_file.getSize(); i < LAFS_SECTOR_SIZE; i++)
ssSectorBuffer.put(0);
encodeName(ssStringFlat, it->m_file.getName());
encodeNext(ssEntryBuffer, it->m_wEntry, iNext);
}
break;
case <API key>:
{
encodeName(ssStringFlat, it->m_directory.getName());
encodeNext(ssEntryBuffer, it->m_wEntry, iNext);
for(std::streamoff i = 0; i < LAFS_SECTOR_SIZE; i++)
ssSectorBuffer.put(0);
}
break;
case <API key>:
{
encodeSkipName(ssStringFlat, (it->m_iJump ? iNext : <API key>(it->m_directory)));
encodeNext(ssEntryBuffer, it->m_wEntry, (it->m_iJump ? it->m_iJump : iNext), (it->m_iJump ? true : false));
for(std::streamoff i = 0; i < LAFS_SECTOR_SIZE; i++)
ssSectorBuffer.put(0);
}
break;
default:
throw FormattingException("Entry type not implemented.");
}
}
for(unsigned int i = m_lafsEntries.size(); i < <API key>; i++)
{
encodeName(ssStringFlat, std::string());
ssEntryBuffer.put(0);
ssEntryBuffer.put(0);
for(std::streamoff i = 0; i < LAFS_SECTOR_SIZE; i++)
ssSectorBuffer.put(0);
}
//Dump the buffers to the stream
for(unsigned char b = ssStringFlat.get(); !ssStringFlat.eof(); b = ssStringFlat.get())
out.put(b);
for(unsigned char b = ssEntryBuffer.get(); !ssEntryBuffer.eof(); b = ssEntryBuffer.get())
out.put(b);
for(unsigned char b = ssSectorBuffer.get(); !ssSectorBuffer.eof(); b = ssSectorBuffer.get())
out.put(b);
} |
using System;
using System.IO;
//using NUnit.Framework;
using LE;
namespace LETest {
// [TestFixture]
public class KeyReadTest {
// [Test]
public void testRead() {
string srcGameDir = Config.Root["Game:SourceGamePath"];
if (srcGameDir == null) {
// Assert.Ignore("Source game path is not set; skip");
return;
}
string keyFilePath = Path.Combine(srcGameDir, "Chitin.key");
var reader = new LegacyKeyReader();
var key = reader.Read(File.ReadAllBytes(keyFilePath));
// Assert.NotZero(key.BifEntriesCount, "Can read BIF entries count from KEY file");
}
}
} |
// IKEngine.cpp: implementation of the IKEngine class.
#include "IKCommon.h"
#include "IKUtil.h"
#include "IKEngine.h"
#include "IKMessage.h"
#include "IKMsg.h"
#include "IKControlPanel.h"
#include "IKFile.h"
#ifdef PLAT_MACINTOSH
#include "IKMsg.h"
#endif
#include "SharedMemory.h"
#include "LegacyIK.h"
#ifdef PLAT_MACINTOSH
#include <stdio.h>
#endif
#ifdef PLAT_WINDOWS
#include "pnp.h"
#include "dll.h"
#endif
#define _M(a) DATAS((TCHAR *)TEXT(#a),(TCHAR *)TEXT(#a))
#include "intellikeys.h"
#include "AppLib.h"
#include "version.h"
// Construction/Destruction
static IKEngine * theEngine;
IKEngine::IKEngine()
{
<API key> = false;
theEngine = this;
#ifdef PLAT_MACINTOSH
IKMsg::CleanSendingChannel();
#endif
m_bRefreshCP = false;
}
IKEngine::~IKEngine()
{
// in case instantiator forgot
Terminate();
}
// Called once at the beginning of the session.
#ifdef PLAT_MACINTOSH_X
static void MakeAllFolders(char *strpath)
{
IKString path(strpath);
for (int i=0;i<path.GetLength();i++)
{
if (path.GetAt(i)==':')
{
IKString part = path.Left(i+1);
//printf("Root Locator: creating folder %s\n",(char *)part);
IKFile::NewFolder(part);
}
}
}
static void MyPtoCstr2 ( unsigned char *str )
{
int i, l;
l = str[0];
for (i=0;i<l;i++)
str[i] = str[i+1];
str[l] = 0;
}
static void MyCtoPstr2 ( unsigned char *str)
{
int i, l, j;
l = 0;
while (str[l]!=0)
l++;
for (i=0;i<l;i++)
{
j = l-i-1;
str[j+1] = str[j];
}
str[0] = l;
}
static void GetFullPath2 (long DirID, short vRefNum, char *path)
{
CInfoPBRec myPB;// parameter block for PBGetCatInfo
Str255 dirNameBuf; // a directory name
char fullPath[255];// full pathname being constructed
OSErr myErr;
myPB.dirInfo.ioNamePtr = dirNameBuf;
myPB.dirInfo.ioVRefNum = vRefNum; //indicate target volume
myPB.dirInfo.ioDrParID = DirID; //initialize parent directory ID
myPB.dirInfo.ioFDirIndex = -1; //get info about a directory
strcpy(fullPath,"");
strcpy(path,"");
do
{
myPB.dirInfo.ioDrDirID = myPB.dirInfo.ioDrParID;
myErr = PBGetCatInfo(&myPB, FALSE);
if ( myErr )
return;
MyPtoCstr2 ( dirNameBuf );
char temp[255];
strcpy(temp,fullPath);
strcpy(fullPath,(char *)dirNameBuf);
strcat(fullPath,":");
strcat(fullPath,temp);
} while ( myPB.dirInfo.ioDrDirID != fsRtDirID );
strcpy(path,fullPath);
return;
}
#endif
void IKEngine::Initialize()
{
m_bDiagnosticMode = false;
m_lastDiag = 0;
m_bRawMode = false;
m_bNotifyMode = false;
//initialize the messaging systems
IKMessage::Initialize();
IKMsg::Initialize();
// initialize the Utilities package
// this will cause the global data items to get loaded
IKUtil::Initialize();
// create some folders
// order is not important here
#ifdef PLAT_MACINTOSH
IKUtil::MakeAllFolders(IKUtil::GetChannelsFolder());
IKUtil::MakeAllFolders(IKUtil::GetEngineFolder());
#endif
IKUtil::MakeAllFolders(IKUtil::GetGuestFolder());
// insure that everything is writeable
<API key>(IKUtil::GetRootFolder());
#ifdef PLAT_MACINTOSH_X
// make sure some things are set up properly in the classic environment.
// we do this in the installer, too, but it might get disturbed by a
// subsequent IK USB 1.x installation.
// first, build an HFS-style path to the IK USB root.
// Do this by finding one of the OS X system folders, then finding the disk name from that, and then
// adding on the IK USB path.
short vRefNum;
long dirID;
OSErr err;
char root_path[255];
err = FindFolder ( kOnSystemDisk, <API key>, kDontCreateFolder, &vRefNum, &dirID );
GetFullPath2 ( dirID, vRefNum, root_path );
int i = 0;
while (root_path[i]!=':')
i++;
root_path[i+1] = '\0';
strcat ( root_path, "Applications:IntelliTools:IntelliKeys USB:" );
// record the path we just found in Classic's app support folder so
// the sending INIT can find it.
err = FindFolder ( kClassicDomain, <API key>,
kDontCreateFolder, &vRefNum, &dirID );
if (err == noErr)
{
char classic_path[255];
GetFullPath2 ( dirID, vRefNum, classic_path );
strcat(classic_path,"IntelliTools:");
MakeAllFolders(classic_path); // make sure the folder exists
strcat(classic_path,"IKUSBRoot.txt");
IKFile f;
if (f.Open(IKString(classic_path),IKFile::modeCreate|IKFile::modeReadWrite))
{
IKString line;
line += "Root_Location ";
line += root_path;
f.WriteLine(line);
f.Close();
printf("Root Locator: created classic file\n");
}
}
// install the sending INIT in the Classic extensions folder
err = FindFolder ( kClassicDomain, <API key>,
kDontCreateFolder, &vRefNum, &dirID );
if (err==noErr)
{
char extensions_path[255];
GetFullPath2 ( dirID, vRefNum, extensions_path );
IKString src = IKUtil::GetPrivateFolder();
src += DATAS(TEXT("<API key>"),TEXT("Switch InTT Release"));
IKString dst(extensions_path);
dst += DATAS(TEXT("<API key>"),TEXT("Switch InTT Release"));
IKFile::MakeWritable (dst);
IKFile::Remove (dst);
IKFile::Copy ( src, dst );
}
// install the Classic control panel into the Classic control panels folder
err = FindFolder ( kClassicDomain, <API key>,
kDontCreateFolder, &vRefNum, &dirID );
if (err==noErr)
{
char cp_path[255];
GetFullPath2 ( dirID, vRefNum, cp_path );
IKString src = IKUtil::GetPrivateFolder();
src += DATAS(TEXT("<API key>"),TEXT("IntelliKeys USB"));
IKString dst(cp_path);
dst += DATAS(TEXT("<API key>"),TEXT("IntelliKeys USB"));
IKFile::MakeWritable (dst);
IKFile::Remove (dst);
IKFile::Copy ( src, dst );
}
// install the firewall into the Classic startup folder,
// but only if it's already there.
err = FindFolder ( kClassicDomain, kStartupFolderType,
kDontCreateFolder, &vRefNum, &dirID );
if (err==noErr)
{
char startup_path[255];
GetFullPath2 ( dirID, vRefNum, startup_path );
IKString src = IKUtil::GetPrivateFolder();
src += DATAS(TEXT("<API key>"),TEXT("IntelliKeys USB App"));
IKString dst(startup_path);
dst += DATAS(TEXT("<API key>"),TEXT("IntelliKeys USB App"));
char macfilename[255];
strcpy ( &(macfilename[1]), (TCHAR *) dst);
macfilename[0] = strlen(macfilename);
FSSpec spec;
err = FSMakeFSSpec ( (short)0, (long)0, (unsigned TCHAR *)macfilename, &spec );
if (err == noErr)
{
IKFile::MakeWritable (dst);
IKFile::Remove (dst);
IKFile::Copy ( src, dst );
}
}
#endif
// trigger processing of external commands immediately
<API key> = 0;
<API key> = 0;
m_nextAppWatchTime = 0;
#ifdef PLAT_WINDOWS
if (IKUtil::IsWin2KOrGreater())
{
// Service does not use Dll in W2K andup
}
else
{
// enable keyboard hook DLL for Win98
DllKeyEnable ( true );
}
#endif
// load standard overlays
<API key>();
// load preferences
IKString prefsFile = IKUtil::GetPrivateFolder();
prefsFile += DATAS(TEXT("Preferences_File"),TEXT("preferences.txt"));
m_preferences.Read(prefsFile);
// load names of switch overlays
m_nSwitchOverlays = DATAI(TEXT("num_switch_files"), 0);
for (int i=0;i<m_nSwitchOverlays;i++)
{
IKString s = TEXT("switch_file_");
s += IKUtil::IntToString(i+1);
m_switchOverlays[i] = DATAS(s,TEXT(""));
}
// establish AppLib "systems" for IKUSB
// but only if "watch apps" is true.
bool bWatch = !!DATAI(TEXT("watch_apps"), 0);
if (bWatch)
{
// for us, it's a file relative to ROOT.
IKString s = DATAS(TEXT("intellikeys_file"),TEXT(""));
if (!s.IsEmpty())
{
IKString idFilePath = IKUtil::GetRootFolder();
idFilePath += s;
if (IKFile::FileExists(idFilePath))
AppLibAddSystem ( DATAS(TEXT("intellikeys_name"),TEXT("IntelliKeys USB")), (TCHAR *)idFilePath);
}
}
#ifdef PLAT_WINDOWS
// make sure we're using the best ikeysxfr
FixIkeysXfr ();
#endif
// check to see if anything needsto be done
// because this is the first time we ran since an install
CheckNewInstall();
// get current group and user
IKString group, student;
<API key>(group,student);
m_preferences.Write();
OnChangeStudent(group,student);
// we're going!
m_bRunning = true;
}
// Called by the hosting application very frequently.
void IKEngine::Periodic()
{
unsigned int now;
static int extPeriod = 250;
static int extPeriod2 = 250;
static int watchAppPeriod = 500;
static bool bWatchApps = false;
static int loadPeriod = 2000;
static int once = 0;
if (once==0)
{
once++;
extPeriod = DATAI(TEXT("<API key>"),250);
extPeriod2 = DATAI(TEXT("<API key> 2"),250);
watchAppPeriod = DATAI(TEXT("App_Watch_Period"),500);
bWatchApps = !!DATAI(TEXT("watch_apps"), 0);
loadPeriod = DATAI(TEXT("Load_Student_Data"),2000);
}
// Process External Commands
now = IKUtil::GetCurrentTimeMS();
if (now>=<API key>)
{
<API key>();
<API key> = now + extPeriod;
}
if (now>=<API key>)
{
<API key>();
<API key> = now + extPeriod2;
}
// watch applications
if (bWatchApps)
{
if (now>=m_nextAppWatchTime)
{
WatchApplications();
m_nextAppWatchTime = now + watchAppPeriod;
}
}
// poke the devices
for (int i=0; i < MAX_INTELLIKEYS; i++)
{
m_devices[i].Periodic();
}
// send periodic updates to the control panel if we're in
// diagnostic mode
if (now >= m_lastDiag)
{
// check up on channel status
IKMessage::CheckChannels();
// get us out of diagnostic mode if the control panel is not there
if (GetDiagnosticMode())
{
if (!IKMessage::IsOwnerAlive(TEXT("control panel")))
{
SetDiagnosticMode(false);
}
}
m_lastDiag = now + DATAI(TEXT("Diagnostic_Period"), 1000);
}
// refresh the control panel if need be
if (m_bRefreshCP)
{
IKControlPanel::Refresh();
m_bRefreshCP = false;
}
// do Utility periodic
IKUtil::Periodic();
}
static IKString UnpackString ( BYTE *data, int ndata )
{
int len = data[0];
IKString strResult(&data[1],len);
return strResult;
}
static IKStringArray activeSystems;
static int GetPackedInt ( BYTE *data, int ndata, int index )
{
int n1 = 0;
int ncommas = 0;
for (int i=0;i<ndata;i++)
{
if (data[i]==',')
{
ncommas++;
if (ncommas==index)
{
IKString s(data,ndata);
IKString s2 = s.Mid(n1,i-n1);
int val = atoi((TCHAR *)s2);
return val;
}
n1 = i+1;
}
}
return -1;
}
void IKEngine::<API key>()
{
BYTE data[2000];
int datalen;
int command;
int response;
TCHAR *channel = TEXT("engine");
//DebugLogToFile("IKEngine::<API key>: start");
response = IKMessage::Receive(TEXT(channel), &command, (void *)data, 2000, &datalen);
if (response == kResponseNoCommand)
{
//DebugLogToFile("IKEngine::<API key>: end 1");
return;
}
switch (command)
{
case kQueryPostKey:
if (NumDevicesConnected()<=0)
IKMessage::Respond ( TEXT(channel), <API key>, 0, 0 );
else
{
IKMessage::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
int code = GetPackedInt ( data, datalen, 1 );
int direction = GetPackedInt ( data, datalen, 2 );
PostKey ( code, direction );
}
break;
case kQueryPostDelay:
if (NumDevicesConnected()<=0)
IKMessage::Respond ( TEXT(channel), <API key>, 0, 0 );
else
{
IKMessage::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
int delay = GetPackedInt ( data, datalen, 1 );
PostDelay ( delay );
}
break;
case <API key>:
if (NumDevicesConnected()<=0)
IKMessage::Respond ( TEXT(channel), <API key>, 0, 0 );
else
{
IKMessage::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
int whichButton = GetPackedInt ( data, datalen, 1 );
<API key> ( whichButton );
}
break;
case <API key>:
if (NumDevicesConnected()<=0)
IKMessage::Respond ( TEXT(channel), <API key>, 0, 0 );
else
{
IKMessage::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
int whichButton = GetPackedInt ( data, datalen, 1 );
<API key> ( whichButton );
}
break;
case <API key>:
if (NumDevicesConnected()<=0)
IKMessage::Respond ( TEXT(channel), <API key>, 0, 0 );
else
{
IKMessage::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
int whichButton = GetPackedInt ( data, datalen, 1 );
<API key> ( whichButton );
}
break;
case <API key>:
if (NumDevicesConnected()<=0)
IKMessage::Respond ( TEXT(channel), <API key>, 0, 0 );
else
{
IKMessage::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
int whichButton = GetPackedInt ( data, datalen, 1 );
int direction = GetPackedInt ( data, datalen, 2 );
PostMouseButton ( whichButton, direction );
}
break;
case kQueryPostMouseMove:
if (NumDevicesConnected()<=0)
IKMessage::Respond ( TEXT(channel), <API key>, 0, 0 );
else
{
IKMessage::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
IKMessage::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
int x = GetPackedInt ( data, datalen, 1 );
int y = GetPackedInt ( data, datalen, 2 );
PostMouseMove ( x, y );
}
break;
case <API key>:
if (NumDevicesConnected()<=0)
IKMessage::Respond ( TEXT(channel), <API key>, 0, 0 );
else
{
IKMessage::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
ResetMouseInterface ();
}
break;
case <API key>:
if (NumDevicesConnected()<=0)
IKMessage::Respond ( TEXT(channel), <API key>, 0, 0 );
else
{
IKMessage::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
<API key> ();
}
break;
case <API key>:
{
// add to the list if it's not there.
IKString system = UnpackString ( data, datalen );
activeSystems.AddNoDup(system);
IKMessage::Respond ( TEXT(channel), <API key>, 0, 0 );
}
break;
case <API key>:
{
IKString system = UnpackString ( data, datalen );
activeSystems.Remove(system);
IKMessage::Respond ( TEXT(channel), <API key>, 0, 0 );
}
break;
case <API key>:
{
IKString system = UnpackString ( data, datalen );
int i = activeSystems.Find(system);
if (i == -1)
IKMessage::Respond ( TEXT(channel), <API key>, 0, 0 );
else
IKMessage::Respond ( TEXT(channel), <API key>, 0, 0 );
}
break;
case <API key>:
IKMessage::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
{
IKString app ( data, datalen );
m_currentApp = app;
}
break;
case <API key>:
IKMessage::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
<API key> = true;
break;
case <API key>:
IKMessage::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
if (!IKMessage::IsOwnerAlive(TEXT("control panel")))
{
#ifdef PLAT_WINDOWS
IKString app = IKUtil::GetRootFolder();
app += DATAS(TEXT("Control Panel Name"),"");
int nResult = (int) ShellExecute ( GetDesktopWindow(),
TEXT("Open"), TEXT("Control"), TEXT("ikusb.cpl"), TEXT("C:\\"),
SW_SHOWNORMAL );
#endif
#ifdef PLAT_MACINTOSH
IKString filename= IKUtil::GetRootFolder();
filename += DATAS(TEXT("Control_Panel_Name"),TEXT("USB Control Panel.exe"));
IKUtil::LaunchFile(filename);
#endif
}
else
{
IKControlPanel::Show();
}
break;
case kQueryBeep:
{
if (NumDevicesConnected()<=0)
IKMessage::Respond ( TEXT(channel), <API key>, 0, 0 );
else
{
IKMessage::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
for (int i=0;i<MAX_INTELLIKEYS;i++)
{
m_devices[i].KeySound(500);
}
}
}
break;
case kQueryShortBeep:
{
if (NumDevicesConnected()<=0)
IKMessage::Respond ( TEXT(channel), <API key>, 0, 0 );
else
{
IKMessage::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
for (int i=0;i<MAX_INTELLIKEYS;i++)
{
m_devices[i].ShortKeySound();
}
}
}
break;
case kQuerySendSettings:
case DNLD_SET:
IKMessage::Respond ( TEXT(channel), NO_ERR, 0, 0 );
<API key>(data,datalen);
break;
case DNLD_OVL:
IKMessage::Respond ( TEXT(channel), NO_ERR, 0, 0 );
<API key>(data,datalen);
{
BYTE data[2000];
int ndata = 0;
IKEngine::GetEngine()->MakeGlobalData(data,&ndata);
IKMessage::Send(TEXT("control panel"),kQueryGlobalData,data,ndata,0,0);
}
break;
case UPLD_SET:
// TODO: return the real settings.
// although, we don't do that for IKUSB 1.x.
datalen = sizeof ( LegacyIKSettings );
memset ( data, 0, datalen );
IKMessage::Respond ( TEXT(channel), NO_ERR, data, datalen );
break;
case <API key>:
case <API key>:
{
if (NumDevicesConnected()>0)
IKMessage::Respond ( TEXT(channel), kResponseConnected, 0, 0 );
else
IKMessage::Respond ( TEXT(channel), <API key>, 0, 0 );
}
break;
case kQueryShutdown:
IKMessage::Respond(TEXT(channel),kResponseNoError,0,0);
Stop();
break;
case <API key>:
IKMessage::Respond(TEXT(channel),kResponseNoError,0,0);
IKControlPanel::Show();
break;
case <API key>:
{
if (<API key>()>0)
IKMessage::Respond ( TEXT(channel), <API key>, 0, 0 );
else
IKMessage::Respond ( TEXT(channel), <API key>, 0, 0 );
}
break;
case <API key>:
{
if (NumDevicesOn()>0)
IKMessage::Respond ( TEXT(channel), kResponseOn, 0, 0 );
else
IKMessage::Respond ( TEXT(channel), kResponseNotOn, 0, 0 );
}
break;
case kQuerySetStudent:
{
IKMessage::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
<API key> ( IKUtil::GetUsersFolder() );
int n = 0;
int len;
int size = data[n];
n++;
len = data[n];
n++;
IKString group ( (BYTE *)&(data[n]), len*size );
n = n + len*size;
len = data[n];
n++;
IKString student ( (BYTE *)&(data[n]), len*size );
n = n + len*size;
OnChangeStudent(group,student);
}
break;
case kQuerySendOverlay:
{
IKString nameIn(data,datalen); // could be unicode string
<API key> (nameIn);
}
IKMessage::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
{
BYTE data[2000];
int ndata = 0;
IKEngine::GetEngine()->MakeGlobalData(data,&ndata);
IKMessage::Send(TEXT("control panel"),kQueryGlobalData,data,ndata,0,0);
}
break;
case <API key>:
{
IKString nameIn(data,datalen); // could be Unicode string
<API key> (nameIn);
}
IKMessage::Respond( TEXT(channel), kResponseNoError, 0, 0);
{
BYTE data[2000];
int ndata = 0;
IKEngine::GetEngine()->MakeGlobalData(data, &ndata);
IKMessage::Send(TEXT("control panel"), kQueryGlobalData, data, ndata, 0, 0);
}
break;
case <API key>:
{
int n = 0;
int len;
int size = data[n];
n++;
len = data[n];
n++;
IKString file ( (BYTE *)&(data[n]), len*size );
n = n + len*size;
len = data[n];
n++;
IKString name ( (BYTE *)&(data[n]), len*size );
n = n + len*size;
len = data[n];
n++;
IKString sender ( (BYTE *)&(data[n]), len*size );
n = n + len*size;
//DebugLogToFile("IKEngine::<API key>: - 1 - Command: [%d][%s] Sender: [%s] File: [%s] Name: [%s]", <API key>, (LPSTR)IKMessage::GetMessageName(<API key>), (LPSTR)sender, (LPSTR)file, (LPSTR)name);
<API key>(file);
<API key>(name);
<API key>(name, sender);
}
//DebugLogToFile("IKEngine::<API key>: - 2 - Command: [%d][%s] - call IKMessage::Respond(%s, %d [%s])", <API key>, (LPSTR)IKMessage::GetMessageName(<API key>), channel, kResponseNoError, (LPSTR)IKMessage::GetMessageName(kResponseNoError));
IKMessage::Respond(TEXT(channel), kResponseNoError, 0, 0);
{
BYTE data[2000];
int ndata = 0;
IKEngine::GetEngine()->MakeGlobalData(data,&ndata);
//DebugLogToFile("IKEngine::<API key>: - 3 - Command: [%d][%s] - call IKMessage::Send(%s, %d [%s])", <API key>, (LPSTR)IKMessage::GetMessageName(<API key>), "control channel", kQueryGlobalData, (LPSTR)IKMessage::GetMessageName(kQueryGlobalData));
IKMessage::Send(TEXT("control panel"), kQueryGlobalData, data, ndata, 0, 0);
}
//DebugLogToFile("IKEngine::<API key>: - 4 - Command: [%d][%s]", <API key>, (LPSTR)IKMessage::GetMessageName(<API key>));
break;
case kQueryResetKeyboard:
{
if (NumDevicesConnected()<=0)
IKMessage::Respond ( TEXT(channel), <API key>, 0, 0 );
else
{
IKMessage::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
for (int i=0;i<MAX_INTELLIKEYS;i++)
{
m_devices[i].UserReset(true);
}
}
}
break;
case <API key>:
IKMessage::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
SetDiagnosticMode (true);
break;
case <API key>:
IKMessage::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
SetDiagnosticMode (false);
break;
case kQueryStartRawMode:
IKMessage::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
SetRawMode (true);
break;
case kQueryStopRawMode:
IKMessage::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
SetRawMode (false);
break;
case <API key>:
IKMessage::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
SetNotifyMode (true);
break;
case <API key>:
IKMessage::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
SetNotifyMode (false);
break;
case kQueryGetRawMode:
{
if (GetRawMode())
IKMessage::Respond ( TEXT(channel), kResponseRawModeOn, 0, 0 );
else
IKMessage::Respond ( TEXT(channel), kResponseRawModeOff, 0, 0 );
}
break;
case <API key>:
{
if (GetRawMode() && NumDevicesConnected()>0 && NumDevicesConnected()>0)
IKMessage::Respond ( TEXT(channel), <API key>, 0, 0 );
else
IKMessage::Respond ( TEXT(channel), <API key>, 0, 0 );
}
break;
case <API key>:
{
// JR - June 2012 - take the production version in the version.h file
//IKString version = DATAS(TEXT("Software_Version"),TEXT(""));
IKString version = <API key>;
BYTE data[255];
IKString::strcpy((TCHAR *)data,(TCHAR *)version);
int datalen = version.GetByteCount();
IKMessage::Respond ( TEXT(channel), <API key>, data, datalen );
}
break;
case <API key>:
{
IKString version = TEXT("");
// JR - June 2012 - try to get the Firmware version from the device itself, if available,
// else retrieve the 'Not Connected' string from the data.txt file.
//string = DATAS(TEXT("Firmware_Version"), DATAS(TEXT("Unknown"), TEXT("Unknown")));
IKDevice* firstDevice = GetFirstDevice();
if (firstDevice != NULL)
{
version = m_devices[0].FirmwareVersion();
}
else
{
//version = DATAS(TEXT("S_NOT_CONNECTED"), TEXT("Not_Connected"));
version = TEXT("Not_Connected");
}
//version = DATAS(TEXT("Firmware_Version"),TEXT(""));
BYTE data[255];
IKString::strcpy((TCHAR *)data,(TCHAR *)version);
int datalen = version.GetByteCount();
IKMessage::Respond ( TEXT(channel), <API key>, data, datalen );
}
break;
case <API key>:
{
//IKString overlay = m_customOverlay.GetName();
IKString overlay = IKSettings::GetSettings()->m_sLastSent;
//overlay.ToUTF8();
BYTE data[255];
IKString::strcpy((TCHAR *)data,(TCHAR *)overlay);
int datalen = overlay.GetByteCount();
IKMessage::Respond ( TEXT(channel), <API key>, data, datalen );
}
break;
case <API key>:
{
BYTE data[1000];
int datalen = 0;
<API key> ( data, &datalen );
IKMessage::Respond ( TEXT(channel), <API key>, data, datalen );
}
break;
case kQueryGlobalData:
{
BYTE data[1000];
int datalen = 0;
MakeGlobalData ( data, &datalen );
IKMessage::Respond ( TEXT(channel), kResponseGlobalData, data, datalen );
}
break;
case <API key>:
{
BYTE data[1000];
int datalen = 0;
<API key> ( data, &datalen );
IKMessage::Respond ( TEXT(channel), <API key>, data, datalen );
}
break;
case <API key>:
{
BYTE data[1000];
int datalen = 0;
MakeDiagnosticBlock ( data, &datalen );
IKMessage::Respond ( TEXT(channel), <API key>, data, datalen );
}
break;
case kQueryGetSettings:
case <API key>:
// unsupported commands
IKMessage::Respond ( TEXT(channel), <API key>, 0, 0 );
break;
case kQueryReloadStudent:
LoadStudentData();
IKMessage::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
break;
case kQueryGetRawEvents:
{
// how many are we asked for?
int nMaxEvents = data[0];
// how many are there?
int nEvents = 0;
int i;
for (i=0;i<MAX_INTELLIKEYS;i++)
nEvents += m_devices[i].CountRawEvents();
// anything?
if (nEvents<=0 || nMaxEvents<=0)
IKMessage::Respond ( TEXT(channel), <API key>, 0, 0 );
else
{
// ok, return events up to the maximum.
if (nEvents>nMaxEvents)
nEvents = nMaxEvents;
// allocate enough memory for the events.
BYTE *pEvents = new BYTE[nEvents*9+1];
// look at the devices round-robin picking up events as we go.
int ne = 0;
int ndev = 0;
int nfound = 0;
while (true)
{
if (m_devices[ndev].GetRawEvent(&(pEvents[1+ne*9+1])))
{
pEvents[1+ne*9] = ndev; // device
ne++;
// if we run out of space.
if (ne>=nEvents)
break;
nfound++;
}
// round-robin for the devices.
ndev++;
if (ndev>=MAX_INTELLIKEYS)
{
// if we went around once and found no events, break;
if (nfound==0)
break;
ndev = 0;
nfound = 0;
}
}
// put in the #of events actually found
pEvents[0] = ne;
// send it back to the caller
IKMessage::Respond ( TEXT(channel), kResponseRawEvents, pEvents, nEvents*9+1 );
// delete the memory
delete []pEvents;
}
}
break;
case kQueryGetRawEvent:
{
BYTE buffer[8];
int nDevEvent = -1;
int i;
for (i=0;i<MAX_INTELLIKEYS;i++)
{
if (m_devices[i].GetRawEvent(buffer))
{
nDevEvent = i;
break;
}
}
if (nDevEvent>=0)
{
BYTE data[9];
data[0] = nDevEvent;
for (i=0;i<8;i++)
data[i+1] = buffer[i];
IKMessage::Respond ( TEXT(channel), kResponseRawEvent, data, 9 );
}
else
{
IKMessage::Respond ( TEXT(channel), <API key>, 0, 0 );
}
}
break;
default:
// unknown commands
IKMessage::Respond ( TEXT(channel), kResponseError, 0, 0 );
break;
}
//DebugLogToFile("IKEngine::<API key>: end 2");
}
IKEngine * IKEngine::GetEngine()
{
return theEngine;
}
void IKEngine::<API key>()
{
// load 'em up
for (int i=0;i<<API key>;i++)
{
// get the name of the file
IKString key = TEXT("Standard Overlay ");
TCHAR snumber[10];
MySprintf(snumber,TEXT("%d"),i);
key += snumber;
IKString name;
name = IKUtil::GetOverlaysFolder();
name += DATAS(key,TEXT("none.oms"));
// load it
m_standardOverlay[i].LoadFromFile(name);
// get the new name
IKString key2 = TEXT("Standard Overlay ");
//TCHAR snumber[10];
MySprintf(snumber,TEXT("%d"),i);
key2 += snumber;
key2 += TEXT("_Name");
IKString newname = DATAS(key2,TEXT(""));
if (!newname.IsEmpty())
{
// change the name
m_standardOverlay[i].SetName(newname);
}
}
// identify the setup overlay
int nSetup = DATAI(TEXT("<API key>"),-1);
if (nSetup!=-1)
m_standardOverlay[nSetup].MakeSetupOverlay();
// load the default intelliswitch overlay
IKString path = IKUtil::GetPrivateFolder();
path += "default intelliswitch.oms";
<API key>.LoadFromFile(path);
}
IKOverlay * IKEngine::GetStandardOverlay(int index)
{
if (index>=0 && index <=<API key>)
return &(m_standardOverlay[index]);
return NULL;
}
void IKEngine::Terminate()
{
Stop();
#ifdef PLAT_WINDOWS
// disable keyboard hook DLL
if (!IKUtil::IsWin2KOrGreater())
DllKeyEnable ( false );
#endif
}
int IKEngine::NumDevicesConnected()
{
int n = 0;
for (int i=0;i<MAX_INTELLIKEYS;i++)
{
if (m_devices[i].IsOpen())
n++;
}
return n;
}
int IKEngine::NumDevicesOn()
{
int n = 0;
for (int i=0;i<MAX_INTELLIKEYS;i++)
{
if (m_devices[i].IsOpen() && m_devices[i].IsSwitchedOn())
n++;
}
return n;
}
int IKEngine::<API key>()
{
int n = 0;
for (int i=0;i<MAX_INTELLIKEYS;i++)
{
if (m_devices[i].IsOpen() && m_devices[i].HasStandardOverlay())
n++;
}
return n;
}
void IKEngine::ProcessSentSettings(BYTE *settings)
{
typedef struct
{
BYTE OverlayLock; // 0 - 1 (0)
BYTE PhotoLevelChange;
BYTE ResponseRate; // 0 - 14 (14)
BYTE LiftOffFlag; // 0 - 1 (0)
BYTE Keysound; // 0 - 1 (1)
BYTE IBMRepeatFlag; // 0 - 1 (1)
BYTE IBMRepeatRate; // 0 - 14 (14)
BYTE RepeatLatching; // 0 - 1 (0)
BYTE ShiftLatching; // 0 - 2 (1)
BYTE LEDPairing; // 0 - 1 (1)
BYTE MouseArrows; // 0 - 1 (0)
BYTE MouseSpeed; // 0 - 14 (5)
BYTE SmartTyping; // 0 - 1 (0)
BYTE CustomLevel; // 0 - 14 (0)
BYTE DataSendRate; // 0 - 14 (14)
BYTE IBMStandardKeyboard;// 0 - 1 (1)
BYTE IBMCableOverride; // 0 - 3 (0)
BYTE IBMOldATArrows; // 0 - 1 (1)
BYTE CoordMode; // 0 - 1 (0)
BYTE Reserved[5];
} keyboardSettingsRec;
keyboardSettingsRec *s = (keyboardSettingsRec *) settings;
IKSettings *pSettings = IKSettings::GetSettings();
// this function takes the legacy keyboard settings
// and sets values in an IKSettings object to reflect their values.
// start with defaults values
//m_settings.SetToDefault();
// skip custom overlay lock
// skip photo level change
// response rate
if (s->ResponseRate!=0xFF)
pSettings->m_iResponseRate = s->ResponseRate+1;
// lift off
if (s->LiftOffFlag!=0xFF)
pSettings->m_bRequiredLiftOff = (s->LiftOffFlag==1);
// key sound
if (s->Keysound!=0xFF)
if (s->Keysound==1)
pSettings->m_iKeySoundVolume = kSettingsKeysound4;
else
pSettings->m_iKeySoundVolume = 0;
// repeat
if (s->IBMRepeatFlag!=0xFF)
pSettings->m_bRepeat = (s->IBMRepeatFlag==1);
// repeat rate
if (s->IBMRepeatRate!=0xFF)
pSettings->m_iRepeatRate = s->IBMRepeatRate+1;
// repeat latching
if (s->RepeatLatching!=0xFF)
pSettings->m_bRepeatLatching = (s->RepeatLatching==1);
// repeat latching
if (s->ShiftLatching!=0xFF)
if (s->ShiftLatching==0)
pSettings->m_iShiftKeyAction = <API key>;
else if (s->ShiftLatching==1)
pSettings->m_iShiftKeyAction = <API key>;
else if (s->ShiftLatching==2)
pSettings->m_iShiftKeyAction = <API key>;
else if (s->ShiftLatching==3)
pSettings->m_iShiftKeyAction = <API key>;
// indicator lights
if (s->LEDPairing!=0xFF)
if (s->LEDPairing==0)
pSettings->m_iIndicatorLights = kSettings6lights;
else if (s->ShiftLatching==1)
pSettings->m_iIndicatorLights = kSettings3lights;
// skip mouse arrows
// mouse speed
if (s->MouseSpeed!=0xFF)
pSettings->m_iMouseSpeed = s->MouseSpeed+1;
// smart typing
if (s->SmartTyping!=0xFF)
pSettings->m_bSmartTyping = (s->SmartTyping==1);
// skip custom overlay level
// data send rate
if (s->DataSendRate!=0xFF)
pSettings->m_iDataSendRate = s->DataSendRate+1;
// skip IBMStandardKeyboard
// skip IBMCableOverride
// skip IBMOldATArrows
// skip CoordMode
// skip 5 reserved values
IKSettings::GetSettings()->Write();
m_bRefreshCP = true;
//IKControlPanel::Refresh();
}
void IKEngine::OnChangeStudent(IKString group, IKString student)
{
// save and persist the new values
m_group = group;
m_student = student;
m_preferences.SetValue(TEXT("Group"),group);
m_preferences.SetValue(TEXT("Student"),student);
// make paths to the settings and applications files
IKString path = IKUtil::MakeStudentPath ( group, student );
IKString settingsFile = path;
settingsFile += TEXT("settings.txt");
//IKString appsFile = path;
//appsFile += TEXT("applications.txt");
// create a settings file if one does not exist.
if (!IKFile::FileExists(settingsFile))
{
IKSettings::GetSettings()->Write(settingsFile);
IKFile::MakeWritable(settingsFile);
}
// convert this user if it's older
IKString oldfile = path;
oldfile += TEXT("settings");
ConvertUser ( oldfile, settingsFile );
// save a copy of the old settings
IKSettings oldSettings = *(IKSettings::GetSettings());
// read new settings
IKSettings::GetSettings()->Read(settingsFile);
// load the custom overlay
IKString overlay = IKUtil::MakeStudentPath ( group, student );
overlay += DATAS(TEXT("Custom_Overlay"),TEXT("custom.oms"));
m_customOverlay.Unload();
m_customOverlay.LoadFromFile(overlay);
// load the "use this" overlay
overlay = IKSettings::GetSettings()->m_sUseThisOverlay;
m_UseThisOverlay.Unload();
m_UseThisOverlay.LoadFromFile(overlay);
// Load the switch settings overlay
ReloadSwitchOverlay();
// if new settings constitutes a change in overlay data,
// reset devices.
bool bReset = false;
if (oldSettings.m_iMode != IKSettings::GetSettings()->m_iMode)
{
bReset = true;
}
else if (IKSettings::GetSettings()->m_iMode == <API key>)
{
if (oldSettings.m_sUseThisOverlay != IKSettings::GetSettings()->m_sUseThisOverlay)
bReset = true;
}
else if (IKSettings::GetSettings()->m_iMode == kSettingsModeSwitch)
{
if (oldSettings.<API key> != IKSettings::GetSettings()-><API key>)
bReset = true;
}
if (bReset)
OnNewOverlayData();
// make sure the current student has got pre-installed overlays
// add pre-disallowed apps
bool bWatch = !!DATAI(TEXT("watch_apps"), 0);
bool bAddPreinstalls = !!DATAI(TEXT("addpreinstalls"), 1);
if (bWatch && bAddPreinstalls)
{
<API key> ( m_group, m_student, false );
<API key> ();
}
// tell others who are interested
#ifdef PLAT_WINDOWS
IKMessage::SendTO("system tray",kQuerySetStudent,0,0,0,0,250);
#endif
}
void IKEngine::<API key>(IKString filename)
{
DebugLogToFile("IKEngine::<API key>: File: [%s]", (LPSTR)filename);
// make a path to where the file should be stored
IKString newName = IKUtil::MakeStudentPath ( m_group, m_student );
newName += DATAS(TEXT("Custom_Overlay"), TEXT("custom.oms"));
// make destination file writeable so it can be replaced.
IKFile::MakeWritable(newName,2);
// delete the file first
IKFile::Remove(newName);
// copy the file
bool bCopied = IKFile::Copy(filename, newName);
//make destination file writeable again just in case
IKFile::MakeWritable(newName,2);
// load it
if(bCopied)
{
DebugLogToFile("IKEngine::<API key>: Copied New File: [%s]", (LPSTR)newName);
// stop Raw Mode.
SetRawMode(false, DATAI(TEXT("raw_mode_immunity"),2000));
<API key>(newName);
OnNewOverlayData();
// also apply settings from the file
IKOverlay o;
o.LoadFromFile(newName);
BYTE *settings = o.GetRawSettings();
<API key>(settings, 24);
}
else
{
DebugLogToFile("IKEngine::<API key>: Copy Failed - New File: [%s]", (LPSTR)newName);
}
}
void IKEngine::<API key>(IKString name)
{
m_customOverlay.SetName(name);
}
void IKEngine::AddDevice(int index, WriteDataProc proc, int devType)
{
// SetRawMode(false);
m_devices[index].Reset();
m_devices[index].SetIndex(index);
m_devices[index].SetWriteProc(proc);
m_devices[index].SetOpen(true);
m_devices[index].SetDevType(devType);
m_devices[index].Start();
m_bRefreshCP = true;
//IKControlPanel::Refresh();
}
void IKEngine::RemoveDevice(int index)
{
// SetRawMode(false);
m_devices[index].Reset();
m_devices[index].SetDevType(0);
m_bRefreshCP = true;
//IKControlPanel::Refresh();
}
void IKEngine::OnDataReceived(int index, BYTE *data)
{
m_devices[index].OnDataReceived ( data );
}
void IKEngine::SetDiagnosticMode(bool mode)
{
m_bDiagnosticMode = mode;
}
bool IKEngine::GetDiagnosticMode()
{
return m_bDiagnosticMode;
}
unsigned int g_immunityTime = 0;
void IKEngine::SetNotifyMode(bool mode)
{
m_bNotifyMode = mode;
}
void IKEngine::SetRawMode(bool mode, int immunityTime )
{
#if 1
// calculate new immunity time if asked to do so
unsigned int now = IKUtil::GetCurrentTimeMS();
if (immunityTime>0)
g_immunityTime = now + immunityTime;
if (immunityTime<0)
g_immunityTime = 0;
// don't set true if we're immune
if (now<g_immunityTime && mode)
return;
#endif
#if 0
if (mode)
{
IKTRACE((TEXT("raw mode on")));
for (int i=0;i<MAX_INTELLIKEYS;i++)
m_devices[i].KeySound2(50,247);
}
else
{
IKTRACE((TEXT("raw mode OFF")));
for (int i=0;i<MAX_INTELLIKEYS;i++)
m_devices[i].KeySound2(50,200);
}
#endif
m_bRawMode = mode;
for (int i=0;i<MAX_INTELLIKEYS;i++)
m_devices[i].PurgeRawQueue();
}
bool IKEngine::GetRawMode()
{
return m_bRawMode;
}
bool IKEngine::UseRawMode()
{
if (!GetRawMode())
return false;
// must be in overlay or discover mode for
// raw mode to work.
IKSettings *pSettings = IKSettings::GetSettings();
if (pSettings->m_iMode == <API key>)
return true;
if (pSettings->m_iMode == <API key>)
return true;
return false;
}
void IKEngine::MakeDiagnosticBlock ( BYTE *data, int *datalen )
{
*datalen = 0;
// number of devices
data[*datalen] = NumDevicesConnected();
(*datalen)++;
for (int i=0;i<MAX_INTELLIKEYS;i++)
{
if (m_devices[i].IsOpen())
{
// device index
data[*datalen] = i;
(*datalen)++;
// on/off
data[*datalen] = m_devices[i].IsSwitchedOn();
(*datalen)++;
// sensor array
m_devices[i].GetSensorArray (&(data[*datalen]));
*datalen = *datalen + 9;
// level
data[*datalen] = m_devices[i].GetLevel();
(*datalen)++;
// is there a standard overlay?
data[*datalen] = !!m_devices[i].HasStandardOverlay();
(*datalen)++;
IKString s;
// current overlay name
IKOverlay *po = m_devices[i].GetCurrentOverlay();
if(po != NULL)
s = po->GetName();
else
s = TEXT("");
data[*datalen] = s.GetLength();
(*datalen)++;
IKString::strcpy((TCHAR *)(&(data[*datalen])),(TCHAR *)s);
*datalen = *datalen + s.GetByteCount();
// switch status
m_devices[i].GetSwitchStatus (&(data[*datalen]), 1);
*datalen = *datalen + 1;
m_devices[i].GetSwitchStatus (&(data[*datalen]), 2);
*datalen = *datalen + 1;
// membrane status
int n;
m_devices[i].GetMembraneStatus(&(data[*datalen]), &n);
*datalen = *datalen + n;
}
}
}
void IKEngine::<API key>(BYTE *data, int *datalen)
{
*datalen = 0;
// number of devices
data[*datalen] = NumDevicesConnected();
(*datalen)++;
for (int i=0;i<MAX_INTELLIKEYS;i++)
{
if (m_devices[i].IsOpen())
{
// device index
data[*datalen] = i;
(*datalen)++;
// on/off
data[*datalen] = m_devices[i].IsSwitchedOn();
(*datalen)++;
// sensor array
m_devices[i].GetSensorArray (&(data[*datalen]));
*datalen = *datalen + 9;
// level
data[*datalen] = m_devices[i].GetLevel();
(*datalen)++;
// is there a standard overlay?
data[*datalen] = !!m_devices[i].HasStandardOverlay();
(*datalen)++;
IKString s;
// current overlay name
IKSettings *pSettings = IKSettings::GetSettings();
if (!!m_devices[i].HasStandardOverlay() && m_devices[i].GetDevType()==1)
{
IKOverlay *po = m_devices[i].GetCurrentOverlay();
if(po != NULL)
s = po->GetName();
else
s = TEXT("");
}
else if (pSettings->m_iMode==kSettingsModeSwitch)
{
if (pSettings-><API key> > 0)
{
IKString key = TEXT("switch_file_");
key += IKUtil::IntToString(pSettings-><API key>);
s = DATAS(key,TEXT(""));
}
else
{
s = TEXT("");
}
}
else
{
IKOverlay *po = m_devices[i].GetCurrentOverlay();
if(po != NULL)
s = po->GetName();
else
s = TEXT("");
}
s.ToUTF8();
data[*datalen] = s.GetLength();
(*datalen)++;
IKString::strcpy((TCHAR *)(&(data[*datalen])),(TCHAR *)s);
*datalen = *datalen + s.GetByteCount();
// serial number
s = m_devices[i].GetSerialNumber();
data[*datalen] = s.GetLength();
(*datalen)++;
IKString::strcpy((TCHAR *)(&(data[*datalen])),(TCHAR *)s);
*datalen = *datalen + s.GetByteCount();
// switch status
m_devices[i].GetSwitchStatus (&(data[*datalen]), 1);
*datalen = *datalen + 1;
m_devices[i].GetSwitchStatus (&(data[*datalen]), 2);
*datalen = *datalen + 1;
// membrane status
int n;
m_devices[i].GetMembraneStatus(&(data[*datalen]), &n);
*datalen = *datalen + n;
// device type
data[*datalen] = m_devices[i].GetDevType();
*datalen = *datalen + 1;
// current overlay number
data[*datalen] = m_devices[i].<API key>();
*datalen = *datalen + 1;
// more switch status (IK USB 3.1)
m_devices[i].GetSwitchStatus (&(data[*datalen]), 3);
*datalen = *datalen + 1;
m_devices[i].GetSwitchStatus (&(data[*datalen]), 4);
*datalen = *datalen + 1;
m_devices[i].GetSwitchStatus (&(data[*datalen]), 5);
*datalen = *datalen + 1;
}
}
}
IKString IKEngine::GetGroup()
{
return m_group;
}
IKString IKEngine::GetStudent()
{
return m_student;
}
IKDevice * IKEngine::GetFirstDevice()
{
for (int i=0;i<MAX_INTELLIKEYS;i++)
{
if (m_devices[i].GetIndex()!=-1)
{
return &(m_devices[i]);
}
}
return NULL;
}
IKDevice * IKEngine::GetNumberedDevice(int ndev)
{
if (m_devices[ndev].GetIndex()!=-1)
return &(m_devices[ndev]);
return NULL;
}
void IKEngine::MakeGlobalData ( BYTE *data, int *datalen )
{
IKString string;
// software version
// JR - June 2012 - take the production version in the version.h file
//string = DATAS(TEXT("Software_Version"), DATAS(TEXT("Unknown"), TEXT("Unknown")));
string = <API key>;
data[*datalen] = string.GetLength();
(*datalen)++;
IKString::strcpy((TCHAR *)&(data[*datalen]), string);
*datalen = *datalen + string.GetByteCount();
// firmware version
// JR - June 2012 - try to get the Firmware version from the device itself, if available,
// else retrieve the 'Not Connected' string from the data.txt file.
//string = DATAS(TEXT("Firmware_Version"), DATAS(TEXT("Unknown"), TEXT("Unknown")));
IKDevice* firstDevice = GetFirstDevice();
if (firstDevice != NULL)
{
string = m_devices[0].FirmwareVersion();
}
else
{
//string = DATAS(TEXT("S_NOT_CONNECTED"), TEXT("Not_Connected"));
string = TEXT("Not_Connected");
}
data[*datalen] = string.GetLength();
(*datalen)++;
IKString::strcpy((TCHAR *)&(data[*datalen]),string);
*datalen = *datalen + string.GetByteCount();
// last sent overlay
string = IKSettings::GetSettings()->m_sLastSent;
string.ToUTF8();
data[*datalen] = string.GetLength();
(*datalen)++;
IKString::strcpy((TCHAR *)&(data[*datalen]), string);
*datalen = *datalen + string.GetByteCount();
// sent by
string = IKSettings::GetSettings()->m_sLastSentBy;
string.ToUTF8();
data[*datalen] = string.GetLength();
(*datalen)++;
IKString::strcpy((TCHAR *)&(data[*datalen]), string);
*datalen = *datalen + string.GetByteCount();
}
void IKEngine::<API key>(BYTE *data, int datalen)
{
// stop Raw Mode.
SetRawMode(false,DATAI(TEXT("raw_mode_immunity"),2000));
// make a path to where the overlay file should be stored
IKString newName = IKUtil::MakeStudentPath ( m_group, m_student );
newName += DATAS(TEXT("Custom_Overlay"),TEXT("custom.oms"));
// load the file into a temporary object
IKOverlay ovl;
ovl.LoadFromFile(newName);
// apply the given data as content
ovl.StoreData(data,datalen);
// Get rid of old file here
IKFile::MakeWritable(newName,2);
IKFile::Remove(newName);
// save the resulting overlay file
ovl.SaveToFile(newName);
IKFile::MakeWritable(newName,2);
// ask engine to re-read the file
<API key>(newName);
OnNewOverlayData();
m_bRefreshCP = true;
//IKControlPanel::Refresh();
}
void IKEngine::<API key>(BYTE *data, int datalen)
{
for (int idx = 0; idx < datalen; ++idx)
{
DebugLogToFile("IKEngine::<API key>: Data[%d]=0x%X", idx, data[idx]);
}
// make a path to where the overlay file should be stored
IKString newName = IKUtil::MakeStudentPath(m_group, m_student);
newName += DATAS(TEXT("Custom_Overlay"), TEXT("custom.oms"));
// load the file into a temporary object
IKOverlay ovl;
ovl.LoadFromFile(newName);
DebugLogToFile("IKEngine::<API key>: Loaded Temp Custom Overlay File: [%s]", (LPSTR)newName);
// apply the given data to the overlay object as settings
ovl.StoreSettings(data);
// swap offset bytes. Why? I do not know.
ovl.SwapOffsetBytes();
// save the resulting overlay file
ovl.SaveToFile(newName);
// ask engine to re-read the file
<API key>(newName);
// also apply to the running engine
ProcessSentSettings(data);
m_bRefreshCP = true;
//IKControlPanel::Refresh();
}
void IKEngine::<API key>(IKString filename)
{
bool bLoaded = m_customOverlay.LoadFromFile(filename);
if (bLoaded)
{
DebugLogToFile("IKEngine::<API key>: Reloaded Overlay File: [%s]", (LPSTR)filename);
for (int i=0;i<MAX_INTELLIKEYS;i++)
{
m_devices[i].<API key>();
m_devices[i].SetLevel(1);
}
}
else
{
DebugLogToFile("IKEngine::<API key>: Reload Failed - Overlay File: [%s]", (LPSTR)filename);
// file copied but could not be loaded.
// delete and unload.
IKFile::Remove(filename);
m_customOverlay.Unload();
}
}
IKOverlay * IKEngine::GetUseThisOverlay()
{
return &m_UseThisOverlay;
}
IKOverlay * IKEngine::GetSwitchOverlay(int number)
{
return &m_SwitchOverlay;
}
void IKEngine::<API key>()
{
// make a path to where the file is stored
IKString newName = IKUtil::MakeStudentPath ( m_group, m_student );
newName += DATAS(TEXT("Custom_Overlay"),TEXT("custom.oms"));
// delete the file
IKFile::MakeWritable(newName);
IKFile::Remove(newName);
// Unload it
m_customOverlay.Unload();
// forget settings
IKSettings::GetSettings()->m_sLastSent = "";
IKSettings::GetSettings()->m_sLastSentBy = "";
IKSettings::GetSettings()->Write();
m_bRefreshCP = true;
}
void IKEngine::ConvertUser(IKString oldfile, IKString newfile)
{
// see if old file exists
IKFile f;
bool bOpened = f.Open ( oldfile, IKFile::modeRead);
if (!bOpened)
return;
// make a prefs object to hold the data we'll read
IKPrefs settings;
// read past number of items
BYTE b1, b2;
f.Read(&b1,1); f.Read(&b2,1);
int nItems = b1 + 256*b2;
int nsaved = 0;
// read the items
bool bDone = false;
while (!bDone)
{
char name[100], val[100];
BYTE lname, lval;
int nb = f.Read(&lname,1);
if (nb>0)
{
f.Read(name,lname);
name[lname] = '\0';
nb = f.Read(&lval,1);
if ( nb>0 )
{
if (lval>0)
f.Read(val,lval);
val[lval] = '\0';
// add the item
if (IKString::strcmp(name,"Group")!=0 && IKString::strcmp(name,"Student")!=0)
{
settings.SetValue(name,val);
nsaved++;
}
}
else
bDone = true;
}
else
bDone = true;
}
// write the settings
settings.Write(newfile);
// close and delete old file
f.Close();
IKFile::Remove(oldfile);
}
void IKEngine::<API key> ()
{
BYTE data[2000];
int datalen;
int command;
int response;
TCHAR *channel = TEXT("sending");
//DebugLogToFile("IKEngine::<API key>: start");
response = IKMsg::Receive ( TEXT(channel), &command, (void *)data, 2000, &datalen );
if (response == kResponseNoCommand)
{
//DebugLogToFile("IKEngine::<API key>: end 1");
return;
}
switch (command)
{
case <API key>:
{
// add to the list if it's not there.
IKString system = UnpackString ( data, datalen );
activeSystems.AddNoDup(system);
IKMsg::Respond ( TEXT(channel), <API key>, 0, 0 );
}
break;
case <API key>:
{
IKString system = UnpackString ( data, datalen );
activeSystems.Remove(system);
IKMsg::Respond ( TEXT(channel), <API key>, 0, 0 );
}
break;
case <API key>:
{
IKString system = UnpackString ( data, datalen );
int i = activeSystems.Find(system);
if (i == -1)
IKMsg::Respond ( TEXT(channel), <API key>, 0, 0 );
else
IKMsg::Respond ( TEXT(channel), <API key>, 0, 0 );
}
break;
case <API key>:
IKMsg::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
if (!IKMessage::IsOwnerAlive(TEXT("control panel")))
{
#ifdef PLAT_WINDOWS
IKString app = IKUtil::GetRootFolder();
app += DATAS(TEXT("Control_Panel_Name"),"");
int nResult = (int) ShellExecute ( GetDesktopWindow(),
TEXT("Open"), TEXT("Control"), TEXT("ikusb.cpl"), TEXT("C:\\"),
SW_SHOWNORMAL );
#endif
#ifdef PLAT_MACINTOSH
IKString filename= IKUtil::GetRootFolder();
filename += DATAS(TEXT("Control_Panel_Name"),TEXT("USB Control Panel.exe"));
IKUtil::LaunchFile(filename);
#endif
}
else
{
IKControlPanel::Show();
}
break;
case kQueryBeep:
{
if (NumDevicesConnected()<=0)
IKMsg::Respond ( TEXT(channel), <API key>, 0, 0 );
else
{
IKMsg::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
for (int i=0;i<MAX_INTELLIKEYS;i++)
{
m_devices[i].KeySound(500);
}
}
}
break;
case kQueryShortBeep:
{
if (NumDevicesConnected()<=0)
IKMsg::Respond ( TEXT(channel), <API key>, 0, 0 );
else
{
IKMsg::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
for (int i=0;i<MAX_INTELLIKEYS;i++)
{
m_devices[i].ShortKeySound();
}
}
}
break;
case kQuerySendSettings:
case DNLD_SET:
IKMsg::Respond ( TEXT(channel), NO_ERR, 0, 0 );
<API key>(data,datalen);
break;
case DNLD_OVL:
IKMsg::Respond ( TEXT(channel), NO_ERR, 0, 0 );
<API key>(data,datalen);
{
BYTE data[2000];
int ndata = 0;
IKEngine::GetEngine()->MakeGlobalData(data,&ndata);
IKMessage::Send(TEXT("control panel"),kQueryGlobalData,data,ndata,0,0);
}
break;
case UPLD_SET:
// TODO: return the real settings.
// although, we don't do that for IKUSB 1.x.
datalen = sizeof ( LegacyIKSettings );
memset ( data, 0, datalen );
IKMsg::Respond ( TEXT(channel), NO_ERR, data, datalen );
break;
case <API key>:
case <API key>:
{
if (NumDevicesConnected()>0)
IKMsg::Respond ( TEXT(channel), kResponseConnected, 0, 0 );
else
IKMsg::Respond ( TEXT(channel), <API key>, 0, 0 );
}
break;
case kQueryShutdown:
IKMsg::Respond(TEXT(channel),kResponseNoError,0,0);
Stop();
break;
case <API key>:
IKMsg::Respond(TEXT(channel),kResponseNoError,0,0);
IKControlPanel::Show();
break;
case <API key>:
{
if (<API key>()>0)
IKMsg::Respond ( TEXT(channel), <API key>, 0, 0 );
else
IKMsg::Respond ( TEXT(channel), <API key>, 0, 0 );
}
break;
case <API key>:
{
if (NumDevicesOn()>0)
IKMsg::Respond ( TEXT(channel), kResponseOn, 0, 0 );
else
IKMsg::Respond ( TEXT(channel), kResponseNotOn, 0, 0 );
}
break;
case kQuerySetStudent:
{
IKMsg::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
<API key> ( IKUtil::GetUsersFolder() );
int n = 0;
int len;
int size = data[n];
n++;
len = data[n];
n++;
IKString group ( (BYTE *)&(data[n]), len*size );
n = n + len*size;
len = data[n];
n++;
IKString student ( (BYTE *)&(data[n]), len*size );
n = n + len*size;
OnChangeStudent(group,student);
}
break;
case kQuerySendOverlay:
{
IKString nameIn(data,datalen); // could be unicode string
<API key> (nameIn);
}
IKMsg::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
break;
case <API key>:
{
IKString nameIn(data,datalen); // could be unicode string
<API key> (nameIn);
}
IKMsg::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
break;
case <API key>:
{
int n = 0;
int len;
int size = data[n];
n++;
len = data[n];
n++;
IKString file ( (BYTE *)&(data[n]), len*size );
n = n + len*size;
len = data[n];
n++;
IKString name ( (BYTE *)&(data[n]), len*size );
n = n + len*size;
len = data[n];
n++;
IKString sender ( (BYTE *)&(data[n]), len*size );
n = n + len*size;
<API key> (file);
<API key> (name);
<API key> ( name, sender );
IKMsg::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
}
break;
case kQueryResetKeyboard:
{
if (NumDevicesConnected()<=0)
IKMsg::Respond ( TEXT(channel), <API key>, 0, 0 );
else
{
IKMsg::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
for (int i=0;i<MAX_INTELLIKEYS;i++)
{
m_devices[i].UserReset(true);
}
}
}
break;
case <API key>:
IKMsg::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
SetDiagnosticMode (true);
break;
case <API key>:
IKMsg::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
SetDiagnosticMode (false);
break;
case kQueryStartRawMode:
IKMessage::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
SetRawMode (true);
break;
case kQueryStopRawMode:
IKMessage::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
SetRawMode (false);
break;
case <API key>:
IKMessage::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
SetNotifyMode (true);
break;
case <API key>:
IKMessage::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
SetNotifyMode (false);
break;
case kQueryGetRawMode:
{
if (GetRawMode())
IKMessage::Respond ( TEXT(channel), kResponseRawModeOn, 0, 0 );
else
IKMessage::Respond ( TEXT(channel), kResponseRawModeOff, 0, 0 );
}
break;
case <API key>:
{
if (GetRawMode() && NumDevicesConnected()>0 && NumDevicesConnected()>0)
IKMessage::Respond ( TEXT(channel), <API key>, 0, 0 );
else
IKMessage::Respond ( TEXT(channel), <API key>, 0, 0 );
}
break;
case <API key>:
{
IKString version = DATAS(TEXT("Software_Version"),TEXT(""));
BYTE data[255];
IKString::strcpy((TCHAR *)data,(TCHAR *)version);
int datalen = version.GetByteCount();
IKMsg::Respond ( TEXT(channel), <API key>, data, datalen );
}
break;
case <API key>:
{
IKString version = DATAS(TEXT("Firmware_Version"),TEXT(""));
BYTE data[255];
IKString::strcpy((TCHAR *)data,(TCHAR *)version);
int datalen = version.GetByteCount();
IKMsg::Respond ( TEXT(channel), <API key>, data, datalen );
}
break;
case <API key>:
{
//IKString overlay = m_customOverlay.GetName();
IKString overlay = IKSettings::GetSettings()->m_sLastSent;
//overlay.ToUTF8();
BYTE data[255];
IKString::strcpy((TCHAR *)data,(TCHAR *)overlay);
int datalen = overlay.GetByteCount();
IKMsg::Respond ( TEXT(channel), <API key>, data, datalen );
}
break;
case <API key>:
{
BYTE data[1000];
int datalen = 0;
<API key> ( data, &datalen );
IKMsg::Respond ( TEXT(channel), <API key>, data, datalen );
}
break;
case kQueryGlobalData:
{
BYTE data[1000];
int datalen = 0;
MakeGlobalData ( data, &datalen );
IKMsg::Respond ( TEXT(channel), kResponseGlobalData, data, datalen );
}
break;
case <API key>:
{
BYTE data[1000];
int datalen = 0;
<API key> ( data, &datalen );
IKMsg::Respond ( TEXT(channel), <API key>, data, datalen );
}
break;
case <API key>:
{
BYTE data[1000];
int datalen = 0;
MakeDiagnosticBlock ( data, &datalen );
IKMsg::Respond ( TEXT(channel), <API key>, data, datalen );
}
break;
case kQueryGetSettings:
case <API key>:
// unsupported commands
IKMsg::Respond ( TEXT(channel), <API key>, 0, 0 );
break;
case kQueryReloadStudent:
LoadStudentData();
IKMessage::Respond ( TEXT(channel), kResponseNoError, 0, 0 );
break;
default:
// unknown commands
IKMsg::Respond ( TEXT(channel), kResponseError, 0, 0 );
break;
}
//DebugLogToFile("IKEngine::<API key>: end 2");
}
void IKEngine::ReloadSwitchOverlay()
{
m_SwitchOverlay.Unload();
int nsw = IKSettings::GetSettings()-><API key>;
if (nsw>0 && nsw<=m_nSwitchOverlays)
{
IKString overlay = IKUtil::<API key>();
overlay += m_switchOverlays[nsw-1];
m_SwitchOverlay.LoadFromFile(overlay);
}
}
void IKEngine::OnNewOverlayData()
{
for (int i=0;i<MAX_INTELLIKEYS;i++)
{
m_devices[i].ResetKeyboard();
m_devices[i].ResetMouse();
m_devices[i].SetLevel(1);
}
}
void IKEngine::<API key>(IKString startingFolder)
{
IKString strType = "*.*";
#ifdef PLAT_WINDOWS
// windows implementation
IKString strPath = startingFolder;
if ( ! strPath.GetLength() )
return;
WIN32_FIND_DATA findFileData;
if ( strPath.GetAt ( strPath.GetLength() - 1 ) != '\\' )
strPath += '\\';
IKString s = strPath;
s += strType;
HANDLE h = ::FindFirstFile( s, &findFileData );
if ( h == <API key> )
return;
while (TRUE )
{
// sss: filter out "." and ".."
if ( ( IKString::strcmp ( findFileData.cFileName, TEXT(".") ) != 0 ) &&
( IKString::strcmp ( findFileData.cFileName, TEXT("..") ) != 0 ) )
{
if (findFileData.dwFileAttributes & <API key>)
{
// this is a dir
IKString s = startingFolder;
s += findFileData.cFileName;
s += "\\";
<API key>(s);
}
else
{
// it's not
IKString s = startingFolder;
s += findFileData.cFileName;
IKFile::MakeWritable(s);
}
}
if ( ! ::FindNextFile( h, &findFileData ) )
break;
}
::FindClose ( h );
#else
// NADA
#endif
}
#ifdef PLAT_WINDOWS
void GetVersionOfFile (char * pszAppName, // file
char * pszVerBuff, // receives version
int iVerBuffLen, // size of buffer
char * pszLangBuff, // receives language
int iLangBuffLen) // size of buffer
{
DWORD dwScratch;
DWORD * pdwLangChar;
DWORD dwInfSize ;
UINT uSize;
BYTE * pbyInfBuff;
char szVersion [32];
char szResource [80];
char * pszVersion = szVersion;
dwInfSize = <API key> (pszAppName, &dwScratch);
if (dwInfSize)
{
pbyInfBuff = new BYTE [dwInfSize];
memset (pbyInfBuff, 0, dwInfSize);
if (pbyInfBuff)
{
if (GetFileVersionInfo (pszAppName, 0, dwInfSize, pbyInfBuff))
{
if (VerQueryValue (pbyInfBuff,
"\\VarFileInfo\\Translation",
(void**)(&pdwLangChar),
&uSize))
{
if (VerLanguageName (LOWORD (*pdwLangChar),
szResource,
sizeof(szResource)))
{
strncpy (pszLangBuff, szResource, iLangBuffLen);
}
wsprintf (szResource, "\\StringFileInfo\\%04X%04X\\FileVersion",
LOWORD (*pdwLangChar), HIWORD (*pdwLangChar));
if (VerQueryValue (pbyInfBuff,
szResource,
(void**)(&pszVersion),
&uSize))
{
strncpy (pszVerBuff, pszVersion, iVerBuffLen-1);
}
}
}
delete [] pbyInfBuff;
}
}
}
static void GetVersion ( char *filename, int *major, int *minor, int *fix, int *build )
{
char verstring[255];
char langstring[255];
GetVersionOfFile ( filename, verstring, 255, langstring, 255);
int n = 0;
int j = 0;
for (int i=0;i<255;i++)
{
if (verstring[i]=='.' || verstring[i]==',')
{
char numeral[255];
for (int k=j;k<i;k++)
numeral[k-j] = verstring[k];
numeral[i] = 0;
n++;
switch(n)
{
case 1:
*major = atoi(numeral);
break;
case 2:
*minor = atoi(numeral);
break;
case 3:
*fix = atoi(numeral);
break;
case 4:
*build = atoi(numeral);
break;
}
j = i+1;
}
if(n==4)
break;
}
}
static void ReplaceFile ( char *src, char *dst )
{
// copy the file
IKFile::SetFileLocked(dst, false);
bool bCopied = !!::CopyFile(dst, src, false);
if (!bCopied)
{
// ::MessageBox(NULL,"copy failed","aaa",MB_OK|MB_ICONEXCLAMATION);
}
}
void IKEngine::FixIkeysXfr()
{
// make sure the correct IKEYSXFR is in place
// get current system path
char sys[_MAX_PATH];
::GetSystemDirectory( sys, sizeof ( sys ) );
IKString pathName(sys);
// add the executable name
IKString ikeysxfrName = DATAS (TEXT("ikeysxfr_name"), TEXT("ikeysxfr.exe"));
pathName += "\\";
pathName += ikeysxfrName;
// what version is that file?
int major=0, minor=0, fix=0, build=0;
GetVersion (pathName , &major, &minor, &fix, &build );
if (major!=0 && major<=1)
{
// we've got 1.x. Install a new one.
IKString newFile = IKUtil::GetPrivateFolder();
newFile += ikeysxfrName;
ReplaceFile(pathName,newFile);
}
}
#endif
void IKEngine::DisconnectDevices()
{
for (int i=0;i<MAX_INTELLIKEYS;i++)
m_devices[i].Disconnect();
}
void IKEngine::WatchApplications()
{
bool bForce = <API key>;
<API key> = false;
// have we changed apps?
bool bChanged = false;
static IKString lastApp = TEXT("");
#ifdef BUILD_DAEMON
IKString thisApp = m_currentApp;
#else
IKString thisApp = IKUtil::<API key>();
#endif
if (!thisApp.IsEmpty())
if (lastApp.CompareNoCase(thisApp)!=0)
bChanged = true;
if (bChanged || bForce)
{
SwitchApplication(thisApp);
lastApp = thisApp;
}
}
void IKEngine::SendOverlayForApp ( IKString &filename, IKString &sender )
{
// do some mode checking first
int Mode = IKSettings::GetSettings()->m_iMode;
bool bButAllow = IKSettings::GetSettings()->m_bButAllowOverlays;
//bool bModeWarning = IKSettings::GetSettings()->m_bShowModeWarning;
IKString s;
switch (Mode)
{
case 1:
#if 0 // NO FLOATING MESSAGE 7/25/06
if (bModeWarning)
{
s = DATAS("<API key>","");
s.ToACP();
<API key> ( (TCHAR *)s );
}
#endif
return;
break;
case 2:
#if 0 // NO FLOATING MESSAGE 7/25/06
if (bModeWarning)
{
s = DATAS("<API key>","");
s.ToACP();
<API key> ( (TCHAR *)s );
}
#endif
return;
break;
case 3:
if (bButAllow)
{
// allow the overlay to be sent anyway
SetRawMode(false,DATAI(TEXT("raw_mode_immunity"),2000));
}
else
{
#if 0 // NO FLOATING MESSAGE 7/25/06
if (bModeWarning)
{
s = DATAS("<API key>","");
s.ToACP();
<API key> ( (TCHAR *)s );
}
#endif
return;
}
break;
default:
break;
}
// format a message and play the banner
IKString simple = filename;
IKUtil::StripFileName(simple, true, true );
IKString forLookup = DATAS(TEXT("for"),TEXT(""));
if (forLookup != TEXT(""))
{
forLookup += TEXT(" ");
}
IKString message;
message += DATAS(TEXT("sending"),TEXT("sending"));
message += TEXT(" ");
message += simple;
message += TEXT(" (");
message += forLookup;
//message += DATAS(TEXT("for"),TEXT("for"));
//message += TEXT(" ");
message += sender;
message += TEXT(")");
message += " ...";
#ifdef PLAT_MACINTOSH_X
// use the messaging system to get this done.
IKString msg;
msg += filename; msg += TCHAR(1); // file name
msg += message; msg += TCHAR(1); // banner
msg += TEXT("0"); msg += TCHAR(1); // don't report errors
msg += TEXT("0"); msg += TCHAR(1); // don't wait
msg += TEXT("1"); msg += TCHAR(1); // banner only
int len = msg.GetLength();
TCHAR * pMsg = (TCHAR *)msg;
int result = IKMessage::Send ( TEXT("menu"), <API key>, (void *) pMsg, len, 0, 0 );
#endif
#ifdef PLAT_WINDOWS
// OK to call directly here, since it results in
// starting a separate program
// convert from UTF-8 to ACP first.
int len = message.GetLength();
WCHAR wide[1024];
int res = MultiByteToWideChar ( CP_UTF8, 0, message, len, wide, 1024);
wide[res] = 0;
char message2[1024];
int result2 = WideCharToMultiByte ( CP_ACP, 0, wide, res, message2, 1024, 0, 0);
message2[result2] = 0;
int result = IntelliKeys::SendOverlay ( filename, false, message2, false, true );
#endif
// send the overlay internally
<API key> (filename);
// tell control panel
IKString newSender;
newSender = DATAS(TEXT("intellikeys_usb"),TEXT("IntelliKeys USB"));
newSender += TEXT(" (");
//newSender += DATAS(TEXT("for"),TEXT("for"));
//newSender += TEXT(" ");
newSender += forLookup;
newSender += sender;
newSender += TEXT(")");
IKString name(filename);
IKUtil::StripFileName(name,true,true);
<API key> ( name, newSender );
}
// The following function is called every time the Engine
// sees a new application in the foreground.
void IKEngine::SwitchApplication(IKString &app)
{
// get the application's friendly name
TCHAR *pFriendly = ::<API key>((TCHAR *)app);
IKString friendly(pFriendly);
// get the overlay to send for the current group/student
IKString group, student;
<API key>(group,student);
TCHAR *pOverlay = <API key> ( (TCHAR *)app, (TCHAR *)group, (TCHAR *)student );
// get the app's current owner
IKString owner = AppLibGetOwner((TCHAR *)app);
// IK USB 3.0.3
// if there is an owner who is not us, release it.
// in 3.0.3, only us and blank are valid owners.
if (owner.GetLength()>0 && owner.CompareNoCase(TEXT("intellikeys usb"))!=0)
{
<API key>((TCHAR *)app,(TCHAR *)owner);
owner = "";
}
// what mode are we currently in?
int Mode = IKSettings::GetSettings()->m_iMode;
// set Raw Mode based on the control panel
if (Mode==3)
SetRawMode(true,-1);
else
SetRawMode(false,-1);
#ifndef PLAT_WINDOWS
// consider sending an overlay only if
// there are connected devices and there is an overlay to send.
// and we are the owner.
if (CountOpenDevices()>0 && strlen(pOverlay)>0 && owner.CompareNoCase(TEXT("intellikeys usb"))==0)
{
IKString overlay(pOverlay);
if (IKFile::FileExists(overlay))
{
// send it.
SendOverlayForApp (overlay,friendly);
}
else
{
#if 0 // NO FLOATING MESSAGE 7/25/06
// overlay not found
IKString message;
IKString simple(overlay);
IKUtil::StripFileName(simple,true,true);
message += DATAS(TEXT("<API key>"),TEXT("Error Sending Overlay"));
message += "|";
message += DATAS(TEXT("S_overlay"),TEXT("overlay"));
message += " ";
message += "\\\"";
message += simple;
message += "\\\"";
message += " ";
message += DATAS(TEXT("<API key>"),TEXT("attached to application"));
message += " ";
message += "\\\"";
message += friendly;
message += "\\\"";
message += " ";
message += DATAS(TEXT("S_cannot_be_sent"),TEXT("cannot be sent. It may have been moved or deleted."));
if (IKSettings::GetSettings()->m_bShowModeWarning)
<API key>(message);
#endif
}
}
#endif
}
void IKEngine::LoadStudentData()
{
// get current group and user
IKString group, student;
<API key>(group,student);
// load 'em
OnChangeStudent(group,student);
}
int IKEngine::CountOpenDevices()
{
int result = 0;
for (int i=0;i<MAX_INTELLIKEYS;i++)
if (m_devices[i].IsOpen())
result++;
return result;
}
void IKEngine::<API key>(IKString &group, IKString &student)
{
// apply default group and user
group = m_preferences.GetValueString(TEXT("Group"), TEXT(""));
student = m_preferences.GetValueString(TEXT("Student"),TEXT(""));
if (group.IsEmpty() && student.IsEmpty())
{
group = DATAS(TEXT("Guest"),TEXT(_M(S_GUEST)));
m_preferences.SetValue(TEXT("Group"),group);
}
}
void IKEngine::<API key> ( IKString name, IKString sender )
{
IKSettings::GetSettings()->m_sLastSent = name;
IKSettings::GetSettings()->m_sLastSentBy = sender;
IKSettings::GetSettings()->Write();
m_bRefreshCP = true;
//IKControlPanel::Refresh();
}
static IKString GetLastFolder ( IKString &input )
{
// where does it end?
int iEnd = input.GetLength()-2; // assume that the string ends wit a delimiter
// where does it start?
int iStart = iEnd;
while (input.GetAt(iStart-1)!=IKUtil::GetPathDelimiter())
iStart
// give it up
return input.Mid(iStart,(iEnd-iStart+1));
}
void IKEngine::CheckNewInstall()
{
// name a file
IKString mapPath = IKUtil::GetPrivateFolder();
mapPath += "installed.txt";
// load it as a map
IKMap installMap;
installMap.RemoveAll();
installMap.Read(mapPath);
// look for a certain key that says we've done this
IKString processed = installMap.Lookup("<API key>");
// if we've already done this,leave. Otherwise
// mark the map and keep going.
if (!processed.IsEmpty())
return;
installMap.Add("<API key>","xxx");
installMap.Write();
bool bWatch = !!DATAI(TEXT("watch_apps"), 0);
bool bAddPreinstalls = !!DATAI(TEXT("addpreinstalls"), 1);
if (bWatch && bAddPreinstalls)
{
// get group/user pairs
IKStringArray groups, users;
IKStringArray groupFolders;
IKUtil::BuildFolderArray(groupFolders,IKUtil::GetUsersFolder());
int g;
for (g=0;g<groupFolders.GetSize();g++)
{
IKString groupFolder = groupFolders.GetAt(g);
IKString groupName = GetLastFolder(groupFolder);
IKStringArray userFolders;
IKUtil::BuildFolderArray(userFolders,groupFolder);
int u;
for (u=0;u<userFolders.GetSize();u++)
{
IKString userFolder = userFolders.GetAt(u);
IKString userName = GetLastFolder(userFolder);
groups.Add(groupName);
users.Add (userName);
}
}
// also Guest
groups.Add(DATAS(TEXT("Guest"),TEXT(_M(S_GUEST)))), users.Add("");
// for each user, update the preinstalled apps and overlays
int i;
for (i=0;i<groups.GetSize();i++)
{
<API key> ( groups.GetAt(i), users.GetAt(i), true );
}
<API key> ();
}
}
void IKEngine :: PostKey (int code, int direction)
{
// send this to the first open device
for (int i=0;i<MAX_INTELLIKEYS;i++)
{
if (m_devices[i].IsOpen())
{
m_devices[i].PostKey(code, direction, 0 );
return;
}
}
}
void IKEngine :: PostDelay (int msDelay)
{
// send this to the first open device
for (int i=0;i<MAX_INTELLIKEYS;i++)
if (m_devices[i].IsOpen())
{
m_devices[i].PostDelay(msDelay);
return;
}
}
void IKEngine :: <API key>(int whichButton)
{
// send this to the first open device
for (int i=0;i<MAX_INTELLIKEYS;i++)
if (m_devices[i].IsOpen())
{
m_devices[i].<API key>(whichButton);
return;
}
}
void IKEngine :: <API key>(int whichButton)
{
// send this to the first open device
for (int i=0;i<MAX_INTELLIKEYS;i++)
if (m_devices[i].IsOpen())
{
m_devices[i].<API key>(whichButton);
return;
}
}
void IKEngine :: <API key>(int whichButton)
{
// send this to the first open device
for (int i=0;i<MAX_INTELLIKEYS;i++)
if (m_devices[i].IsOpen())
{
m_devices[i].<API key>(whichButton);
return;
}
}
void IKEngine :: PostMouseButton(int whichButton, int direction)
{
// send this to the first open device
for (int i=0;i<MAX_INTELLIKEYS;i++)
if (m_devices[i].IsOpen())
{
m_devices[i].PostMouseButton(whichButton, direction);
return;
}
}
void IKEngine :: PostMouseMove(int x, int y)
{
// send this to the first open device
for (int i=0;i<MAX_INTELLIKEYS;i++)
if (m_devices[i].IsOpen())
{
m_devices[i].PostMouseMove(x,y);
return;
}
}
void IKEngine :: ResetMouseInterface()
{
// send this to the first open device
for (int i=0;i<MAX_INTELLIKEYS;i++)
if (m_devices[i].IsOpen())
{
m_devices[i].ResetMouse();
return;
}
}
void IKEngine :: <API key>()
{
// send this to the first open device
for (int i=0;i<MAX_INTELLIKEYS;i++)
if (m_devices[i].IsOpen())
{
m_devices[i].ResetKeyboard();
return;
}
} |
class User(object):
def __init__(self, **kwargs):
self.id = kwargs.get('id', 1)
self.name = kwargs['name']
self.admin = kwargs['admin']
pass
@property
def is_admin(self):
return self.admin
class Article(object):
def __init__(self, **kwargs):
self.author = kwargs['author']
class BlogPost(object):
def __init__(self, **kwargs):
self.author_id = kwargs['author_id']
self.visible = kwargs.get('visible', True)
self.active = kwargs.get('active', True) |
"use strict"
// Imports databinding.js
function CvarTreeViewModel(cvar, desc) {
this.cvar = new Property(cvar);
this.name = new Property(cvar.split(".").pop());
this.expand = new Property(false);
this.leaf = new Property(false);
this.navigate = new Event();
}
CvarTreeViewModel.prototype.poke = function(open, last) {
this.expand.set(open);
this.leaf.set(last);
return true;
};
function CvarTreeView(vm) {
this.vm = vm;
// Generate the nav breadcrumb
let nav_li = document.createElement('li');
vm.expand.add(function(e) { nav_li.classList.toggle("select", e.value); });
let nav_a = document.createElement('a');
nav_a.addEventListener('click', this.onClick.bind(this));
vm.name.add(function(e) { nav_a.textContent = e.value; });
nav_li.appendChild(nav_a);
this.nav_li = nav_li;
// Generate the link html
let li = document.createElement('li');
vm.expand.add(function(e) { li.classList.toggle("select", e.value); });
let a = document.createElement('a');
a.addEventListener('click', this.onClick.bind(this));
vm.name.add(function(e) { a.textContent = e.value; });
li.appendChild(a);
this.li = li;
// Generate the value html
let ul = document.createElement('ul');
vm.expand.add(function(e) { ul.classList.toggle("expand", e.value); });
vm.leaf.add(function(e) { ul.classList.toggle("leaf", e.value); });
this.ul = ul;
}
CvarTreeView.prototype.onClick = function(e) {
this.vm.navigate.invoke(this.vm.cvar.get());
e.preventDefault();
};
function CvarStringViewModel(cvar, desc) {
this.cvar = new Property(cvar);
this.name = new Property(cvar.split(".").pop());
this.edit = new Property(false);
this.string = new Property(desc.default);
this.default = new Property(desc.default);
this.change = new Event();
this.string.add(this.onChange.bind(this));
this.edit.add(this.onChange.bind(this));
}
CvarStringViewModel.prototype.value = function(value) {
if (value === undefined) {
return this.string.get();
}
else {
this.string.set(value.toString());
}
};
CvarStringViewModel.prototype.poke = function(open, last) {
return false;
};
CvarStringViewModel.prototype.onChange = function(e) {
let value;
if (this.edit.get()) {
value = this.string.get();
}
this.change.invoke({ cvar: this.cvar.get(), value: value });
};
function CvarStringView(vm) {
this.vm = vm;
// Generate the nav link html
let nav_li = document.createElement('li');
let nav_a = document.createElement('a');
vm.name.add(function(e) { nav_a.textContent = e.value; });
nav_a.addEventListener('click', this.onClick.bind(this));
nav_li.appendChild(nav_a);
this.nav_li = nav_li;
// Generate the link html
let li = document.createElement('li');
li.classList.add("value");
vm.edit.add(function(e) { li.classList.toggle("userset", e.value); });
let a = document.createElement('a');
a.addEventListener('click', this.onClick.bind(this));
vm.name.add(function(e) { a.textContent = e.value; });
this.li = li;
// Generate the editor html
let value = document.createElement('span');
value.classList.add("value");
let unset = document.createElement('unset');
unset.classList.add("unset");
vm.default.add(function(e) { unset.textContent = e.value; });
value.appendChild(unset);
let input = document.createElement('input');
input.type = "text";
input.classList.add("set");
input.addEventListener('change', this.onEdit.bind(this));
vm.string.add(function(e) { input.value = e.value; });
value.appendChild(input);
li.appendChild(value);
li.appendChild(a);
}
CvarStringView.prototype.onClick = function(e) {
let edit = this.vm.edit.get();
this.vm.edit.set(!edit);
e.preventDefault();
};
CvarStringView.prototype.onEdit = function(e) {
let value = e.target.value;
this.vm.string.set(value);
};
function ConfigViewModel() {
this.text = new Property("");
this.change = new Event();
}
ConfigViewModel.prototype.lines = function(value) {
if (value === undefined) {
return this.text.get().split("\n");
}
else {
let text = value.join("\n");
this.text.set(text);
}
};
ConfigViewModel.prototype.load = function(text, internal) {
if (internal) {
this.text.value = text;
}
else {
this.text.set(text);
}
// In any case let's fire up some cvar events
let cvars = {};
let lines = text.split("\n");
for (let i = 0; i<lines.length; ++i) {
let line = lines[i].trim();
// Ignore comments and empty lines
if (line.length == 0 || line.startsWith("
continue;
}
// Get the cvar part
let index = line.indexOf(" ");
let path;
if (index == 0) { continue; }
else if (index > 0) { path = line.substring(0, index).toLowerCase(); }
else { path = line.toLowerCase(); }
// Get the value part
let value = line.substring(index).trim().toLowerCase();
if (value[0] == "\"" && value[value.length - 1] == "\"") {
value = value.substring(1, value.length - 1).trim();
}
cvars[path] = value;
}
// Fire the event
this.cvars.invoke(cvars);
};
ConfigViewModel.prototype.set = function(cvar, value) {
// Explode the text
let lines = this.lines();
// Find an already matching cvar
let cvar_names = cvar.split(".");
let best_index = -1;
let best_pre = 0;
let replace = false;
for (let i = 0; i<lines.length; ++i) {
let line = lines[i].trim();
// Ignore comments and empty lines
if (line.length == 0 || line.startsWith("
continue;
}
// Get the cvar part
let index = line.indexOf(" ");
let path;
if (index == 0) { continue; }
else if (index > 0) { path = line.substring(0, index).toLowerCase(); }
else { path = line.toLowerCase(); }
// Is this the cvar we're looking for
if (path == cvar) {
best_index = i;
replace = true;
break;
}
// How many prefixes are shared
let path_names = path.split(".");
let pre = 0;
while (pre < cvar_names.length && pre < path_names.length && cvar_names[pre] == path_names[pre]) {
pre += 1;
}
// Store better and later matches
if (pre >= best_pre) {
best_index = i;
best_pre = pre;
}
}
// If a match was found
if (replace) {
if (value === undefined) {
lines.splice(best_index, 1);
}
else {
let line = cvar + " \"" + value + "\"";
lines[best_index] = line;
}
}
else {
// If unrelated and last line isn't empty, put some spacing
if (best_pre == 0 && lines[best_index].length != 0) {
lines.push("");
best_index += 1;
}
// Insert new value
let line = cvar + " \"" + value + "\"";
lines.splice(best_index, 0, line);
}
// Edit the config
this.lines(lines);
};
function ConfigView(vm) {
this.vm = vm;
// Build the config HTML
let textarea = document.createElement('textarea');
vm.text.add(function(e) { textarea.value = e.value; });
textarea.addEventListener('change', this.onChange.bind(this));
this.html = textarea;
}
ConfigView.prototype.onChange = function(e) {
// Reload the entire config on manual edit
let text = e.target.value;
this.vm.load(text);
};
function EditorViewModel(cvars) {
this.enable = new Property(false);
this.nav = new Property("");
this.cvars = cvars;
this.change = new Event();
this.config = new ConfigViewModel();
}
EditorViewModel.prototype.change = function(cvars) {
};
function EditorView(vm) {
this.vm = vm;
let views = {};
this.views = views;
// Build the editor HTML
let section = document.createElement('section');
section.classList.add("editor");
// Build the header HTML
let header = document.createElement('h1');
header.textContent = "Configuration";
vm.enable.add(function(e) { header.classList.toggle("open", e.value); });
header.addEventListener('click', this.onOpen.bind(this));
section.appendChild(header);
// Add a textarea
let config = new ConfigView(vm.config);
config.vm.cvars.add(function(e) {
for (let key in e) {
if (!e.hasOwnProperty(key)) {
continue;
}
}
});
section.appendChild(config.html);
// Build the scaffolding HTML
let content = document.createElement('div');
content.classList.add("content");
vm.enable.add(function(e) { content.classList.toggle("open", e.value); });
let nav = document.createElement('ol');
nav.classList.add("nav");
content.appendChild(nav);
let tree = document.createElement('ol');
tree.classList.add("tree");
let levels = [];
for (let i = 0; i<4; ++i) {
let li = document.createElement('li');
levels.push(li);
tree.appendChild(li);
}
content.appendChild(tree);
section.appendChild(content);
// Build the cvars HTML
let self = this;
function tree_view(cvar, desc, lv, parent) {
let view = new CvarTreeView(new CvarTreeViewModel(cvar, desc));
view.vm.navigate.add(self.onNavigate.bind(self));
nav.appendChild(view.nav_li);
if (parent) {
parent.ul.appendChild(view.li);
}
levels[lv + 1].appendChild(view.ul);
views[cvar] = view;
}
function string_view(cvar, desc, parent) {
let view = new CvarStringView(new CvarStringViewModel(cvar, desc));
view.vm.change.add(self.onChange.bind(self));
nav.appendChild(view.nav_li);
parent.ul.appendChild(view.li);
}
tree_view("root", null, -1, null);
for (let key in vm.cvars) {
if (!vm.cvars.hasOwnProperty(key)) {
continue;
}
let names = key.split(".");
let parent = views.root;
for (let i = 0; i<names.length; ++i) {
if (i == names.length - 1) {
string_view(key, vm.cvars[key], parent);
}
else {
let path = names.slice(0, i + 1).join(".");
if (!(path in views)) {
tree_view(path, null, i, parent);
}
parent = views[path];
}
}
}
this.html = section;
// Finally poke the bear
this.onNavigate("root");
}
EditorView.prototype.navigate = function(cvar) {
// Collapse all opened menus
for (let key in this.views) {
let view = this.views[key];
view.vm.poke(false, false);
}
let names = cvar.split(".");
let last = this.views.root;
last.vm.poke(true, false);
for (let i = 0; i<names.length; ++i) {
let path = names.slice(0, i + 1).join(".");
let view = this.views[path];
if (view.vm.poke(true, false)) {
last = view;
}
}
last.vm.poke(true, true);
};
EditorView.prototype.onOpen = function(e) {
let enable = this.vm.enable.get();
this.vm.enable.set(!enable);
e.preventDefault();
};
EditorView.prototype.onNavigate = function(cvar) {
this.navigate(cvar);
};
EditorView.prototype.onChange = function(e) {
console.log(e.cvar + " \"" + e.value + "\"");
this.vm.change.invoke(e);
};
Widget for boolean cvars.
function WidgetBool(cvar, info, editor) {
this.cvar = cvar;
this.info = info;
this.editor = editor;
this.onchange = null;
// Create the HTML
let value = document.createElement('span');
value.classList.add('value');
// Display the default value
let unset = document.createElement('span');
unset.classList.add('unset');
unset.textContent = info.default;
value.appendChild(unset);
// Edit the value
let input = document.createElement('input');
input.type = "checkbox";
input.classList.add("set");
input.addEventListener('change', this.change.bind(this));
value.appendChild(input);
this.html = value;
}
WidgetBool.prototype.value = function(value) {
let input = this.html.querySelector("input");
if (value === undefined) {
return input.checked.toString();
}
else {
if (value === "true") {
input.checked = true;
}
else if (value === "false") {
input.checked = false;
}
else {
throw new TypeError("expected boolean, got \"" + value + "\"");
}
}
};
WidgetBool.prototype.change = function(e) {
if (this.onchange) {
this.onchange(this);
}
};
Widget for string cvars.
function WidgetText(cvar, info, editor) {
this.cvar = cvar;
this.info = info;
this.editor = editor;
this.onchange = null;
// Create the HTML
let value = document.createElement('span');
value.classList.add('value');
// Display the default value
let unset = document.createElement('span');
unset.classList.add('unset');
unset.textContent = info.default;
value.appendChild(unset);
// Edit the value
let input = document.createElement('input');
input.type = "text";
input.classList.add("set");
input.addEventListener('change', this.change.bind(this));
value.appendChild(input);
this.html = value;
}
WidgetText.prototype.value = function(value) {
let input = this.html.querySelector("input");
if (value === undefined) {
return input.value;
}
else {
input.value = value;
}
};
WidgetText.prototype.change = function(e) {
if (this.onchange) {
this.onchange(this);
}
};
Widget for enum cvars.
function WidgetEnum(cvar, info, editor) {
this.cvar = cvar;
this.info = info;
this.editor = editor;
this.onchange = null;
// Create the HTML
let value = document.createElement('span');
value.classList.add('value');
// Display the default value
let unset = document.createElement('span');
unset.classList.add("unset");
unset.textContent = info.default;
value.appendChild(unset);
// Edit the value
let select = document.createElement('select');
select.classList.add("set");
for (let i = 0; i<info.type.variants.length; ++i) {
let variant = info.type.variants[i];
let option = document.createElement('option');
option.textContent = variant;
option.value = variant;
select.appendChild(option);
}
select.addEventListener('change', this.change.bind(this));
value.appendChild(select);
this.html = value;
}
WidgetEnum.prototype.value = function(value) {
let select = this.html.querySelector("select");
if (value === undefined) {
return select.value;
}
else {
select.value = value;
}
};
WidgetEnum.prototype.change = function(e) {
if (this.onchange) {
this.onchange(this);
}
}; |
# plot-csv
Plot some types of charts using selected columns of CSV files
Project dependencies:
* matplotlib
* numpy
* prettyplotlib (to be removed: deprecated)
* brewer2mpl |
import Ember from 'ember';
import PaperNavContainer from './paper-nav-container';
export default Ember.Component.extend({
tagName: 'md-sidenav-toggle',
classNames: ['<API key>'],
toggle: true,
navContainer: Ember.computed(function() {
return this.nearestOfType(PaperNavContainer);
}),
click: function() {
if (this.get('toggle')) {
this.get('navContainer').toggleSidenav();
} else {
this.get('navContainer').expandSidenav();
}
return false;
}
}); |
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Coverage report</title>
<link rel="stylesheet" href="style.css" type="text/css">
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="jquery.debounce.min.js"></script>
<script type="text/javascript" src="jquery.tablesorter.min.js"></script>
<script type="text/javascript" src="jquery.hotkeys.js"></script>
<script type="text/javascript" src="coverage_html.js"></script>
<script type="text/javascript">
jQuery(document).ready(coverage.index_ready);
</script>
</head>
<body class="indexfile">
<div id="header">
<div class="content">
<h1>Coverage report:
<span class="pc_cov">45%</span>
</h1>
<img id="keyboard_icon" src="keybd_closed.png" alt="Show keyboard shortcuts" />
<form id="filter_container">
<input id="filter" type="text" value="" placeholder="filter..." />
</form>
</div>
</div>
<div class="help_panel">
<img id="panel_icon" src="keybd_open.png" alt="Hide keyboard shortcuts" />
<p class="legend">Hot-keys on this page</p>
<div>
<p class="keyhelp">
<span class="key">n</span>
<span class="key">s</span>
<span class="key">m</span>
<span class="key">x</span>
<span class="key">b</span>
<span class="key">p</span>
<span class="key">c</span> change column sorting
</p>
</div>
</div>
<div id="index">
<table class="index">
<thead>
<tr class="tablehead" title="Click to sort">
<th class="name left headerSortDown shortkey_n">Module</th>
<th class="shortkey_s">statements</th>
<th class="shortkey_m">missing</th>
<th class="shortkey_x">excluded</th>
<th class="shortkey_b">branches</th>
<th class="shortkey_p">partial</th>
<th class="right shortkey_c">coverage</th>
</tr>
</thead>
<tfoot>
<tr class="total">
<td class="name left">Total</td>
<td>855</td>
<td>421</td>
<td>0</td>
<td>160</td>
<td>5</td>
<td class="right" data-ratio="457 1015">45%</td>
</tr>
</tfoot>
<tbody>
<tr class="file">
<td class="name left"><a href="app___init___py.html">app\__init__.py</a></td>
<td>33</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td class="right" data-ratio="33 33">100%</td>
</tr>
<tr class="file">
<td class="name left"><a href="<API key>.html">app\api_1_0\__init__.py</a></td>
<td>3</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td class="right" data-ratio="3 3">100%</td>
</tr>
<tr class="file">
<td class="name left"><a href="<API key>.html">app\api_1_0\authentication.py</a></td>
<td>30</td>
<td>19</td>
<td>0</td>
<td>10</td>
<td>0</td>
<td class="right" data-ratio="11 40">28%</td>
</tr>
<tr class="file">
<td class="name left"><a href="<API key>.html">app\api_1_0\comments.py</a></td>
<td>40</td>
<td>30</td>
<td>0</td>
<td>8</td>
<td>0</td>
<td class="right" data-ratio="10 48">21%</td>
</tr>
<tr class="file">
<td class="name left"><a href="<API key>.html">app\api_1_0\decorators.py</a></td>
<td>11</td>
<td>3</td>
<td>0</td>
<td>2</td>
<td>0</td>
<td class="right" data-ratio="8 13">62%</td>
</tr>
<tr class="file">
<td class="name left"><a href="<API key>.html">app\api_1_0\errors.py</a></td>
<td>17</td>
<td>10</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td class="right" data-ratio="7 17">41%</td>
</tr>
<tr class="file">
<td class="name left"><a href="<API key>.html">app\api_1_0\posts.py</a></td>
<td>35</td>
<td>23</td>
<td>0</td>
<td>6</td>
<td>0</td>
<td class="right" data-ratio="12 41">29%</td>
</tr>
<tr class="file">
<td class="name left"><a href="<API key>.html">app\api_1_0\users.py</a></td>
<td>30</td>
<td>24</td>
<td>0</td>
<td>8</td>
<td>0</td>
<td class="right" data-ratio="6 38">16%</td>
</tr>
<tr class="file">
<td class="name left"><a href="<API key>.html">app\auth\__init__.py</a></td>
<td>3</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td class="right" data-ratio="3 3">100%</td>
</tr>
<tr class="file">
<td class="name left"><a href="app_auth_forms_py.html">app\auth\forms.py</a></td>
<td>44</td>
<td>8</td>
<td>0</td>
<td>8</td>
<td>0</td>
<td class="right" data-ratio="36 52">69%</td>
</tr>
<tr class="file">
<td class="name left"><a href="app_auth_views_py.html">app\auth\views.py</a></td>
<td>109</td>
<td>84</td>
<td>0</td>
<td>40</td>
<td>0</td>
<td class="right" data-ratio="25 149">17%</td>
</tr>
<tr class="file">
<td class="name left"><a href="app_decorators_py.html">app\decorators.py</a></td>
<td>14</td>
<td>3</td>
<td>0</td>
<td>2</td>
<td>0</td>
<td class="right" data-ratio="11 16">69%</td>
</tr>
<tr class="file">
<td class="name left"><a href="app_email_py.html">app\email.py</a></td>
<td>15</td>
<td>9</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td class="right" data-ratio="6 15">40%</td>
</tr>
<tr class="file">
<td class="name left"><a href="app_exceptions_py.html">app\exceptions.py</a></td>
<td>2</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td class="right" data-ratio="2 2">100%</td>
</tr>
<tr class="file">
<td class="name left"><a href="<API key>.html">app\main\__init__.py</a></td>
<td>6</td>
<td>1</td>
<td>0</td>
<td>0</td>
<td>0</td>
<td class="right" data-ratio="5 6">83%</td>
</tr>
<tr class="file">
<td class="name left"><a href="app_main_errors_py.html">app\main\errors.py</a></td>
<td>10</td>
<td>6</td>
<td>0</td>
<td>2</td>
<td>0</td>
<td class="right" data-ratio="4 12">33%</td>
</tr>
<tr class="file">
<td class="name left"><a href="app_main_forms_py.html">app\main\forms.py</a></td>
<td>36</td>
<td>7</td>
<td>0</td>
<td>4</td>
<td>0</td>
<td class="right" data-ratio="29 40">73%</td>
</tr>
<tr class="file">
<td class="name left"><a href="app_main_views_py.html">app\main\views.py</a></td>
<td>166</td>
<td>128</td>
<td>0</td>
<td>30</td>
<td>0</td>
<td class="right" data-ratio="38 196">19%</td>
</tr>
<tr class="file">
<td class="name left"><a href="app_models_py.html">app\models.py</a></td>
<td>251</td>
<td>66</td>
<td>0</td>
<td>40</td>
<td>5</td>
<td class="right" data-ratio="208 291">71%</td>
</tr>
</tbody>
</table>
<p id="no_rows">
No items found using the specified filter.
</p>
</div>
<div id="footer">
<div class="content">
<p>
<a class="nav" href="https://coverage.readthedocs.io">coverage.py v4.2</a>,
created at 2016-08-23 05:51
</p>
</div>
</div>
</body>
</html> |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>zf: 15 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.7.1+2 / zf - 8.7.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
zf
<small>
8.7.0
<span class="label label-success">15 s</span>
</small>
</h1>
<p><em><script>document.write(moment("2020-02-24 00:36:37 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2020-02-24 00:36:37 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-threads base
base-unix base
camlp5 7.11 <API key> of OCaml
conf-findutils 1 Virtual package relying on findutils
conf-m4 1 Virtual package relying on m4
coq 8.7.1+2 Formal proof management system.
num 1.3 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.09.0 The OCaml compiler (virtual package)
ocaml-base-compiler 4.09.0 Official release 4.09.0
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.8.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "Hugo.Herbelin@inria.fr"
homepage: "https://github.com/coq-contribs/zf"
license: "Unknown"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/ZF"]
depends: [
"ocaml"
"coq" {>= "8.7" & < "8.8~"}
]
tags: [ "keyword: Set Theory" "keyword: Zermelo-Fraenkel" "category: Mathematics/Logic/Set theory" ]
authors: [ "Guillaume Alexandre" ]
bug-reports: "https://github.com/coq-contribs/zf/issues"
dev-repo: "git+https://github.com/coq-contribs/zf.git"
synopsis: "An axiomatisation of intuitionistic Zermelo-Fraenkel set theory"
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/zf/archive/v8.7.0.tar.gz"
checksum: "md5=<API key>"
}
</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-zf.8.7.0 coq.8.7.1+2</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 2h opam install -y --deps-only coq-zf.8.7.0 coq.8.7.1+2</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>4 s</dd>
</dl>
<h2>Install</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam list; echo; ulimit -Sv 16000000; timeout 2h opam install -y -v coq-zf.8.7.0 coq.8.7.1+2</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>15 s</dd>
</dl>
<h2>Installation size</h2>
<p>Total: 2 M</p>
<ul>
<li>517 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/ZFrelations.glob</code></li>
<li>291 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/applications.glob</code></li>
<li>240 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/ZFrelations.vo</code></li>
<li>159 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/ZFrelations.v</code></li>
<li>139 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/applications.vo</code></li>
<li>96 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/applications.v</code></li>
<li>61 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/axs_comprehension.glob</code></li>
<li>49 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/couples.glob</code></li>
<li>35 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/couples.vo</code></li>
<li>31 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/axs_comprehension.vo</code></li>
<li>24 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/axs_comprehension.v</code></li>
<li>19 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/couples.v</code></li>
<li>13 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/useful.glob</code></li>
<li>12 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/useful.vo</code></li>
<li>9 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/axs_paire.vo</code></li>
<li>8 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/useful.v</code></li>
<li>7 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/axs_paire.glob</code></li>
<li>7 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/axs_fundation.glob</code></li>
<li>7 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/axs_reunion.vo</code></li>
<li>7 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/axs_fundation.vo</code></li>
<li>6 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/axs_paire.v</code></li>
<li>5 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/axs_reunion.glob</code></li>
<li>4 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/axs_parties.vo</code></li>
<li>4 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/axs_reunion.v</code></li>
<li>3 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/axs_fundation.v</code></li>
<li>3 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/axs_choice.vo</code></li>
<li>3 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/ZFbasis.vo</code></li>
<li>3 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/axs_remplacement.vo</code></li>
<li>3 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/MSetBasis.vo</code></li>
<li>2 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/axs_parties.glob</code></li>
<li>2 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/axs_parties.v</code></li>
<li>2 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/axs_remplacement.glob</code></li>
<li>2 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/axs_extensionnalite.vo</code></li>
<li>2 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/ZFbasis.v</code></li>
<li>1 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/ZFbasis.glob</code></li>
<li>1 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/nothing.vo</code></li>
<li>1 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/axs_choice.glob</code></li>
<li>1 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/axs_remplacement.v</code></li>
<li>1 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/axs_choice.v</code></li>
<li>1 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/axs_extensionnalite.v</code></li>
<li>1 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/MSetBasis.v</code></li>
<li>1 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/axs_extensionnalite.glob</code></li>
<li>1 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/MSetBasis.glob</code></li>
<li>1 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/nothing.v</code></li>
<li>1 K <code>../ocaml-base-compiler.4.09.0/lib/coq/user-contrib/ZF/src/nothing.glob</code></li>
</ul>
<h2>Uninstall</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq-zf.8.7.0</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">
<small>Sources are on <a href="https:
</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> |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>idt: Not compatible </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.10.2 / idt - 1.0.1</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
idt
<small>
1.0.1
<span class="label label-info">Not compatible </span>
</small>
</h1>
<p> <em><script>document.write(moment("2022-01-18 13:05:13 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-01-18 13:05:13 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
coq 8.10.2 Formal proof management system
num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.07.1 The OCaml compiler (virtual package)
ocaml-base-compiler 4.07.1 Official release 4.07.1
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "yeqianchuan@gmail.com"
homepage: "https://github.com/ccyip/coq-idt"
dev-repo: "git+https://github.com/ccyip/coq-idt.git"
bug-reports: "https://github.com/ccyip/coq-idt/issues"
license: "MIT"
authors: [
"Qianchuan Ye"
"Benjamin Delaware"
]
build: [
[make "-j%{jobs}%"]
]
install: [make "install"]
depends: [
"coq" {>= "8.12" & < "8.14~"}
"<API key>" {>= "1.0~beta2+8.12"}
]
synopsis: "Inductive Definition Transformers"
description: """
This Coq library allows you to transform an inductive definition to another
inductive definition, by providing a constructor transformer tactic. It can be
used to generate boilerplate lemmas for backward and forward reasoning, and to
generate inductive types with many similar cases.
"""
tags: [
"category:Miscellaneous/Coq Extensions"
"date:2022-01-10"
"logpath:idt"
]
url {
src: "https://github.com/ccyip/coq-idt/archive/refs/tags/v1.0.1.tar.gz"
checksum: "sha256=<SHA256-like>"
}
</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-idt.1.0.1 coq.8.10.2</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.10.2).
The following dependencies couldn't be met:
- coq-idt -> coq >= 8.12
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></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>opam remove -y coq; opam install -y --show-action --unlock-base coq-idt.1.0.1</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install </h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</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:
</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> |
from bz2 import BZ2Decompressor
from enum import Enum
from functools import partial
from lzma import LZMADecompressor
import zlib
class Compression(Enum):
bzip2 = ('.bz2', BZ2Decompressor)
gzip = ('.gz', partial(zlib.decompressobj, zlib.MAX_WBITS | 16))
lzma = ('.lzma', LZMADecompressor)
xz = ('.xz', LZMADecompressor)
uncompressed = ('', None)
def __init__(self, extension, decompressor):
self.extension = extension
self.decompressor = decompressor
def __bool__(self):
return self.decompressor is not None
#def iter_decompress(self, blob_iter: Iterable[bytes]) -> Iterator[bytes]:
def iter_decompress(self, blob_iter):
if self.decompressor is None:
yield from blob_iter
else:
d = self.decompressor()
for chunk in blob_iter:
yield d.decompress(chunk)
if hasattr(d, 'flush'):
yield d.flush() # Is this absolutely necessary?
if not d.eof:
raise ValueError('compressed file did not end with EOF')
TODO: Should anything be done with d.unused_data ??? |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>fsets: Not compatible </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.7.1+2 / fsets - 8.5.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
fsets
<small>
8.5.0
<span class="label label-info">Not compatible </span>
</small>
</h1>
<p> <em><script>document.write(moment("2021-11-21 02:02:39 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-11-21 02:02:39 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-threads base
base-unix base
camlp5 7.14 <API key> of OCaml
conf-findutils 1 Virtual package relying on findutils
conf-perl 1 Virtual package relying on perl
coq 8.7.1+2 Formal proof management system
num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.06.1 The OCaml compiler (virtual package)
ocaml-base-compiler 4.06.1 Official 4.06.1 release
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "matej.kosik@inria.fr"
homepage: "https://github.com/coq-contribs/fsets"
license: "LGPL 2"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/FSets"]
depends: [
"ocaml"
"coq" {>= "8.5" & < "8.6~"}
]
tags: [
"keyword:finite sets"
"keyword:sorted lists"
"keyword:balanced trees"
"keyword:red-black trees"
"keyword:AVL"
"keyword:functors"
"keyword:data structures"
"category:Computer Science/Data Types and Data Structures"
"category:Miscellaneous/Extracted Programs/Data structures"
]
authors: [ "Jean-Christophe Filliâtre <>" "Pierre Letouzey <>" ]
bug-reports: "https://github.com/coq-contribs/fsets/issues"
dev-repo: "git+https://github.com/coq-contribs/fsets.git"
synopsis: "Finite Sets overs Ordered Types"
description: """
This contribution contains several implementations of finite sets over
arbitrary ordered types using functors. Currently, there are 3
implementations: sorted lists, red-black trees and AVLs."""
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/fsets/archive/v8.5.0.tar.gz"
checksum: "md5=<API key>"
}
</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-fsets.8.5.0 coq.8.7.1+2</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.7.1+2).
The following dependencies couldn't be met:
- coq-fsets -> coq < 8.6~ -> ocaml < 4.06.0
base of this switch (use `--unlock-base' to force)
No solution found, exiting
</pre></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>opam remove -y coq; opam install -y --show-action --unlock-base coq-fsets.8.5.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install </h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</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:
</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> |
@(field: play.api.data.Field, args: (Symbol, Any)*)(implicit handler: views.html.helper.FieldConstructor, lang: play.api.i18n.Lang, messages: play.api.i18n.Messages)
@import scala.util.Try
@import helper.dates._
@import helper._
@import play.api.i18n.Messages
@input(field, args: _*) { (id, name, value, htmlArgs) =>
@datePlaceholder(field, id, args:_*)
} |
using UnityEngine;
using System;
using LuaInterface;
using SLua;
using System.Collections.Generic;
public class <API key> : LuaObject {
[<API key>(typeof(LuaCSFunction))]
static public int constructor(IntPtr l) {
try {
UnityEngine.Rendering.<API key> o;
o=new UnityEngine.Rendering.<API key>();
pushValue(l,o);
return 1;
}
catch(Exception e) {
LuaDLL.luaL_error(l, e.ToString());
return 0;
}
}
[<API key>(typeof(LuaCSFunction))]
static public int Clear(IntPtr l) {
try {
UnityEngine.Rendering.<API key> self;
checkType(l,1,out self);
self.Clear();
setBack(l,self);
return 0;
}
catch(Exception e) {
LuaDLL.luaL_error(l, e.ToString());
return 0;
}
}
[<API key>(typeof(LuaCSFunction))]
static public int AddAmbientLight(IntPtr l) {
try {
UnityEngine.Rendering.<API key> self;
checkType(l,1,out self);
UnityEngine.Color a1;
checkType(l,2,out a1);
self.AddAmbientLight(a1);
setBack(l,self);
return 0;
}
catch(Exception e) {
LuaDLL.luaL_error(l, e.ToString());
return 0;
}
}
[<API key>(typeof(LuaCSFunction))]
static public int AddDirectionalLight(IntPtr l) {
try {
UnityEngine.Rendering.<API key> self;
checkType(l,1,out self);
UnityEngine.Vector3 a1;
checkType(l,2,out a1);
UnityEngine.Color a2;
checkType(l,3,out a2);
System.Single a3;
checkType(l,4,out a3);
self.AddDirectionalLight(a1,a2,a3);
setBack(l,self);
return 0;
}
catch(Exception e) {
LuaDLL.luaL_error(l, e.ToString());
return 0;
}
}
[<API key>(typeof(LuaCSFunction))]
static public int op_Multiply(IntPtr l) {
try {
int argc = LuaDLL.lua_gettop(l);
if(matchType(l,argc,1,typeof(UnityEngine.Rendering.<API key>),typeof(float))){
UnityEngine.Rendering.<API key> a1;
checkType(l,1,out a1);
System.Single a2;
checkType(l,2,out a2);
UnityEngine.Rendering.<API key> ret=a1*a2;
pushValue(l,ret);
return 1;
}
else if(matchType(l,argc,1,typeof(float),typeof(UnityEngine.Rendering.<API key>))){
System.Single a1;
checkType(l,1,out a1);
UnityEngine.Rendering.<API key> a2;
checkType(l,2,out a2);
UnityEngine.Rendering.<API key> ret=a1*a2;
pushValue(l,ret);
return 1;
}
LuaDLL.luaL_error(l,"No matched override function to call");
return 0;
}
catch(Exception e) {
LuaDLL.luaL_error(l, e.ToString());
return 0;
}
}
[<API key>(typeof(LuaCSFunction))]
static public int op_Addition(IntPtr l) {
try {
UnityEngine.Rendering.<API key> a1;
checkType(l,1,out a1);
UnityEngine.Rendering.<API key> a2;
checkType(l,2,out a2);
UnityEngine.Rendering.<API key> ret=a1+a2;
pushValue(l,ret);
return 1;
}
catch(Exception e) {
LuaDLL.luaL_error(l, e.ToString());
return 0;
}
}
[<API key>(typeof(LuaCSFunction))]
static public int op_Equality(IntPtr l) {
try {
UnityEngine.Rendering.<API key> a1;
checkType(l,1,out a1);
UnityEngine.Rendering.<API key> a2;
checkType(l,2,out a2);
System.Boolean ret=(a1==a2);
pushValue(l,ret);
return 1;
}
catch(Exception e) {
LuaDLL.luaL_error(l, e.ToString());
return 0;
}
}
[<API key>(typeof(LuaCSFunction))]
static public int op_Inequality(IntPtr l) {
try {
UnityEngine.Rendering.<API key> a1;
checkType(l,1,out a1);
UnityEngine.Rendering.<API key> a2;
checkType(l,2,out a2);
System.Boolean ret=(a1!=a2);
pushValue(l,ret);
return 1;
}
catch(Exception e) {
LuaDLL.luaL_error(l, e.ToString());
return 0;
}
}
static public void reg(IntPtr l) {
getTypeTable(l,"UnityEngine.Rendering.<API key>");
addMember(l,Clear);
addMember(l,AddAmbientLight);
addMember(l,AddDirectionalLight);
addMember(l,op_Multiply);
addMember(l,op_Addition);
addMember(l,op_Equality);
addMember(l,op_Inequality);
createTypeMetatable(l,constructor, typeof(UnityEngine.Rendering.<API key>));
}
} |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class CI_DB_result
{
/**
* Connection ID
*
* @var resource|object
*/
public $conn_id;
/**
* Result ID
*
* @var resource|object
*/
public $result_id;
/**
* Result Array
*
* @var array[]
*/
public $result_array = array();
/**
* Result Object
*
* @var object[]
*/
public $result_object = array();
/**
* Custom Result Object
*
* @var object[]
*/
public $<API key> = array();
/**
* Current Row index
*
* @var int
*/
public $current_row = 0;
/**
* Number of rows
*
* @var int
*/
public $num_rows;
/**
* Row data
*
* @var array
*/
public $row_data;
/**
* Constructor
*
* @param object $driver_object
* @return void
*/
public function __construct(&$driver_object)
{
$this->conn_id = $driver_object->conn_id;
$this->result_id = $driver_object->result_id;
}
/**
* Number of rows in the result set
*
* @return int
*/
public function num_rows()
{
if (is_int($this->num_rows)) {
return $this->num_rows;
} elseif (count($this->result_array) > 0) {
return $this->num_rows = count($this->result_array);
} elseif (count($this->result_object) > 0) {
return $this->num_rows = count($this->result_object);
}
return $this->num_rows = count($this->result_array());
}
/**
* Query result. Acts as a wrapper function for the following functions.
*
* @param string $type 'object', 'array' or a custom class name
* @return array
*/
public function result($type = 'object')
{
if ($type === 'array') {
return $this->result_array();
} elseif ($type === 'object') {
return $this->result_object();
} else {
return $this-><API key>($type);
}
}
/**
* Custom query result.
*
* @param string $class_name
* @return array
*/
public function <API key>($class_name)
{
if (isset($this-><API key>[$class_name])) {
return $this-><API key>[$class_name];
} elseif (!$this->result_id OR $this->num_rows === 0) {
return array();
}
// Don't fetch the result set again if we already have it
$_data = NULL;
if (($c = count($this->result_array)) > 0) {
$_data = 'result_array';
} elseif (($c = count($this->result_object)) > 0) {
$_data = 'result_object';
}
if ($_data !== NULL) {
for ($i = 0; $i < $c; $i++) {
$this-><API key>[$class_name][$i] = new $class_name();
foreach ($this->{$_data}[$i] as $key => $value) {
$this-><API key>[$class_name][$i]->$key = $value;
}
}
return $this-><API key>[$class_name];
}
is_null($this->row_data) OR $this->data_seek(0);
$this-><API key>[$class_name] = array();
while ($row = $this->_fetch_object($class_name)) {
$this-><API key>[$class_name][] = $row;
}
return $this-><API key>[$class_name];
}
/**
* Query result. "object" version.
*
* @return array
*/
public function result_object()
{
if (count($this->result_object) > 0) {
return $this->result_object;
}
// In the event that query caching is on, the result_id variable
// will not be a valid resource so we'll simply return an empty
// array.
if (!$this->result_id OR $this->num_rows === 0) {
return array();
}
if (($c = count($this->result_array)) > 0) {
for ($i = 0; $i < $c; $i++) {
$this->result_object[$i] = (object)$this->result_array[$i];
}
return $this->result_object;
}
is_null($this->row_data) OR $this->data_seek(0);
while ($row = $this->_fetch_object()) {
$this->result_object[] = $row;
}
return $this->result_object;
}
/**
* Query result. "array" version.
*
* @return array
*/
public function result_array()
{
if (count($this->result_array) > 0) {
return $this->result_array;
}
// In the event that query caching is on, the result_id variable
// will not be a valid resource so we'll simply return an empty
// array.
if (!$this->result_id OR $this->num_rows === 0) {
return array();
}
if (($c = count($this->result_object)) > 0) {
for ($i = 0; $i < $c; $i++) {
$this->result_array[$i] = (array)$this->result_object[$i];
}
return $this->result_array;
}
is_null($this->row_data) OR $this->data_seek(0);
while ($row = $this->_fetch_assoc()) {
$this->result_array[] = $row;
}
return $this->result_array;
}
/**
* Row
*
* A wrapper method.
*
* @param mixed $n
* @param string $type 'object' or 'array'
* @return mixed
*/
public function row($n = 0, $type = 'object')
{
if (!is_numeric($n)) {
// We cache the row data for subsequent uses
is_array($this->row_data) OR $this->row_data = $this->row_array(0);
// array_key_exists() instead of isset() to allow for NULL values
if (empty($this->row_data) OR !array_key_exists($n, $this->row_data)) {
return NULL;
}
return $this->row_data[$n];
}
if ($type === 'object') return $this->row_object($n);
elseif ($type === 'array') return $this->row_array($n);
else return $this->custom_row_object($n, $type);
}
/**
* Assigns an item into a particular column slot
*
* @param mixed $key
* @param mixed $value
* @return void
*/
public function set_row($key, $value = NULL)
{
// We cache the row data for subsequent uses
if (!is_array($this->row_data)) {
$this->row_data = $this->row_array(0);
}
if (is_array($key)) {
foreach ($key as $k => $v) {
$this->row_data[$k] = $v;
}
return;
}
if ($key !== '' && $value !== NULL) {
$this->row_data[$key] = $value;
}
}
/**
* Returns a single result row - custom object version
*
* @param int $n
* @param string $type
* @return object
*/
public function custom_row_object($n, $type)
{
isset($this-><API key>[$type]) OR $this-><API key>($type);
if (count($this-><API key>[$type]) === 0) {
return NULL;
}
if ($n !== $this->current_row && isset($this-><API key>[$type][$n])) {
$this->current_row = $n;
}
return $this-><API key>[$type][$this->current_row];
}
/**
* Returns a single result row - object version
*
* @param int $n
* @return object
*/
public function row_object($n = 0)
{
$result = $this->result_object();
if (count($result) === 0) {
return NULL;
}
if ($n !== $this->current_row && isset($result[$n])) {
$this->current_row = $n;
}
return $result[$this->current_row];
}
/**
* Returns a single result row - array version
*
* @param int $n
* @return array
*/
public function row_array($n = 0)
{
$result = $this->result_array();
if (count($result) === 0) {
return NULL;
}
if ($n !== $this->current_row && isset($result[$n])) {
$this->current_row = $n;
}
return $result[$this->current_row];
}
/**
* Returns the "first" row
*
* @param string $type
* @return mixed
*/
public function first_row($type = 'object')
{
$result = $this->result($type);
return (count($result) === 0) ? NULL : $result[0];
}
/**
* Returns the "last" row
*
* @param string $type
* @return mixed
*/
public function last_row($type = 'object')
{
$result = $this->result($type);
return (count($result) === 0) ? NULL : $result[count($result) - 1];
}
/**
* Returns the "next" row
*
* @param string $type
* @return mixed
*/
public function next_row($type = 'object')
{
$result = $this->result($type);
if (count($result) === 0) {
return NULL;
}
return isset($result[$this->current_row + 1])
? $result[++$this->current_row]
: NULL;
}
/**
* Returns the "previous" row
*
* @param string $type
* @return mixed
*/
public function previous_row($type = 'object')
{
$result = $this->result($type);
if (count($result) === 0) {
return NULL;
}
if (isset($result[$this->current_row - 1])) {
--$this->current_row;
}
return $result[$this->current_row];
}
/**
* Returns an unbuffered row and move pointer to next row
*
* @param string $type 'array', 'object' or a custom class name
* @return mixed
*/
public function unbuffered_row($type = 'object')
{
if ($type === 'array') {
return $this->_fetch_assoc();
} elseif ($type === 'object') {
return $this->_fetch_object();
}
return $this->_fetch_object($type);
}
/**
* The following methods are normally overloaded by the identically named
* methods in the platform-specific driver -- except when query caching
* is used. When caching is enabled we do not load the other driver.
* These functions are primarily here to prevent undefined function errors
* when a cached result object is in use. They are not otherwise fully
* operational due to the unavailability of the database resource IDs with
* cached results.
*/
/**
* Number of fields in the result set
*
* Overridden by driver result classes.
*
* @return int
*/
public function num_fields()
{
return 0;
}
/**
* Fetch Field Names
*
* Generates an array of column names.
*
* Overridden by driver result classes.
*
* @return array
*/
public function list_fields()
{
return array();
}
/**
* Field data
*
* Generates an array of objects containing field meta-data.
*
* Overridden by driver result classes.
*
* @return array
*/
public function field_data()
{
return array();
}
/**
* Free the result
*
* Overridden by driver result classes.
*
* @return void
*/
public function free_result()
{
$this->result_id = FALSE;
}
/**
* Data Seek
*
* Moves the internal pointer to the desired offset. We call
* this internally before fetching results to make sure the
* result set starts at zero.
*
* Overridden by driver result classes.
*
* @param int $n
* @return bool
*/
public function data_seek($n = 0)
{
return FALSE;
}
/**
* Result - associative array
*
* Returns the result set as an array.
*
* Overridden by driver result classes.
*
* @return array
*/
protected function _fetch_assoc()
{
return array();
}
/**
* Result - object
*
* Returns the result set as an object.
*
* Overridden by driver result classes.
*
* @param string $class_name
* @return object
*/
protected function _fetch_object($class_name = 'stdClass')
{
return array();
}
} |
// <API key>.h
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// all copies or substantial portions of the Software.
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// 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.
#import <Foundation/Foundation.h>
@interface <API key> : NSEnumerator
@end
#pragma mark -
@interface NSArray (<API key>)
- (NSEnumerator *)<API key>;
@end
#pragma mark -
@interface NSSet (<API key>)
- (NSEnumerator *)<API key>;
@end
#pragma mark -
@interface NSOrderedSet (<API key>)
- (NSEnumerator *)<API key>;
@end
#pragma mark -
@interface NSDictionary (<API key>)
- (NSEnumerator *)<API key>;
- (NSEnumerator *)<API key>;
@end |
# HubiquitusJS
Use a simple API to connect to a hNode and do Publish Subscribe using the
*Hubiquitus* protocol. It is compatible with your **web app** and your
**Node.JS** project.
To communicate with the server it can use
[socket.io](http://socket.io/). To use it's full potential, use it with
[hubiquitus-node](https://github.com/hubiquitus/hubiquitus-node).
## How to Use
You can use **HubiquitusJS** in two completely different ways.
* Inside your *web-browser* as an API to retrieve data for your web app.
* As a *node* module for your *Node.JS* project.
For your web app
1. Download the code `git://github.com/hubiquitus/hubiquitusjs.git`
2. In your HTML File add
html
<!-- Imports necessary for hAPI -->
<!-- Tag for socket.io is only needed if you will use it as transport-->
<script src='../../lib/transports/socketio/socket.io.js'></script>
<script data-main="../../hubiquitus.js" src='../../lib/require.js'></script>
<!-- Your script -->
<script src="my_script.js"></script>
3. In *my_script.js* put the following
js
//Connect to a hNode
hClient.connect('username', 'password', 'hOptions');
For your Node app
1. Install using NPM: `npm install git://github.com/hubiquitus/hubiquitusjs.git`
2. Import the API and use it!
js
//Import hClient
var hClient = require('hubiquitusjs').hClient;
//Connect to a hNode using default configuration.
hClient.connect('username', 'password', 'hOptions');
Details
To receive messages in realtime, use `hClient.onMessage`, you can set this function that
receives a message to whatever you like. For more information about available data received
in real time see [Callback](https://github.com/hubiquitus/hubiquitusjs/wiki/Callback-v0.5)
Once connected it is also possible to execute other commands:
js
hClient.subscribe(channel, cb); //Channel to subscribe to using current credentials.
hClient.unsubscribe(channel, cb); //Channel to unsubscribe.
hClient.send(hMessage, cb); //Sent an hMessage.
hClient.getLastMessages(channel, cb); //Get last messages from 'channel'
hClient.disconnect(); //Disconnects from the Server.
hClient.buildMessage(actor, type, payload, options); //Create a valid hMessage
In all cases, `channel` is a string with the name that identifies the node.
Note: a list of all available operations is in [Functions](https://github.com/hubiquitus/hubiquitusjs/wiki/Functions-v0.5)
## Options
An `hOptions` object can be sent to the connect function as the last argument.
The keys in this object and an explanation for each one of them can be
found in the [hOptions](https://github.com/hubiquitus/hubiquitusjs/wiki/hOptions-v0.5) page.
There are examples of how to create a *hOptions* object in the `examples/` folder.
Copyright (c) Novedia Group 2012.
This file is part of Hubiquitus
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.
You should have received a copy of the MIT License along with Hubiquitus.
If not, see [MIT licence](http: |
#! /bin/bash
# piSnapshot - Installation
set -e
my_path=$0
my_basename=${my_path
# check if script was run as root
if [ "$EUID" -ne 0 ]; then
>&2 echo "$my_basename must be run as root. Try 'sudo $my_path'."
exit 1
fi
cd $(dirname "$0")
bin_dir=/usr/local/bin/
etc_dir=/usr/local/etc/
cp -vt "$bin_dir" piSnapshot.sh
cp -vt "$etc_dir" piSnapshot.conf piSnapshotExclude.txt
chmod 755 "$bin_dir/piSnapshot.sh"
mkdir --parents /mnt/backup
echo "piSnapshot installation successfully completed."
exit 0 |
package edu.uib.info310.search.builder.ontology;
import com.hp.hpl.jena.rdf.model.Model;
public interface RecordDataSource extends Runnable {
public Model getRecordModel(String albumUri, String album, String artistName);
public void run();
public void setAlbum(String album);
public void setAlbumUri(String albumUri);
public void setArtistName(String artistName);
public void setModel(Model model);
} |
from . import (
Application,
Category,
Course,
Designation,
Major,
Project,
Requirement,
User,
Year,
)
Application = Application.Application
Category = Category.Category
Course = Course.Course
Designation = Designation.Designation
Major = Major.Major
Project = Project.Project
Requirement = Requirement.Requirement
User = User.User
Year = Year.Year |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>rem: Not compatible</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 / extra-dev</a></li>
<li class="active"><a href="">8.11.dev / rem - 8.6.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
rem
<small>
8.6.0
<span class="label label-info">Not compatible</span>
</small>
</h1>
<p><em><script>document.write(moment("2020-08-14 07:23:13 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2020-08-14 07:23:13 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-m4 1 Virtual package relying on m4
coq 8.11.dev Formal proof management system
num 1.3 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.10.0 The OCaml compiler (virtual package)
ocaml-base-compiler 4.10.0 Official release 4.10.0
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.8.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "Hugo.Herbelin@inria.fr"
homepage: "https://github.com/coq-contribs/rem"
license: "LGPL 2.1"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/Rem"]
depends: [
"ocaml"
"coq" {>= "8.6" & < "8.7~"}
]
tags: [ "keyword: Rem Theorem" "keyword: Baire space" "category: Mathematics/Real Calculus and Topology" ]
authors: [ "Henk Barendregt" ]
bug-reports: "https://github.com/coq-contribs/rem/issues"
dev-repo: "git+https://github.com/coq-contribs/rem.git"
synopsis: "Rem Theorem in Baire space"
description: "A formalisation of Rem Theorem in Baire space"
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/rem/archive/v8.6.0.tar.gz"
checksum: "md5=<API key>"
}
</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-rem.8.6.0 coq.8.11.dev</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.11.dev).
The following dependencies couldn't be met:
- coq-rem -> coq < 8.7~ -> ocaml < 4.06.0
base of this switch (use `--unlock-base' to force)
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></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>opam remove -y coq; opam install -y --show-action --unlock-base coq-rem.8.6.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</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">
<small>Sources are on <a href="https:
</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> |
/* the norm */
#<API key> {
position:fixed;
top:20px;
right:20px;
width:auto;
z-index:9999;
}
#<API key>.top-left {
left: 20px;
right: auto;
}
#<API key>.bottom-right {
top: auto;
left: auto;
bottom: 20px;
right: 20px;
}
#<API key>.bottom-left {
top: auto;
right: auto;
bottom: 20px;
left: 20px;
}
.<API key> {
position:relative;
margin:0 0 10px 0;
}
.gritter-top {
height:10px;
}
.hover .gritter-top {
background-position:right -30px;
}
.gritter-bottom {
height:8px;
margin:0;
}
.hover .gritter-bottom {
background-position: bottom right;
}
.gritter-item {
display:block;
color:#eee;
padding:2px 11px 8px 11px;
font-size: 11px;
font-family:verdana;
}
.hover .gritter-item {
background-position:right -40px;
}
.gritter-item p {
padding:0;
margin:0;
word-wrap:break-word;
font-size:14px;
color:white;
}
.gritter-close {
display:none;
position:absolute;
top:7px;
right:5px;
background:url(/Images/clear.png) no-repeat left top;
cursor:pointer;
width:15px;
height:15px;
text-indent:-9999em;
float:right;
}
.gritter-title {
font-size:17px;
font-weight:bold;
padding:0 0 7px 0;
display:block;
color:white;
}
.gritter-image {
width:20px;
height:20px;
float:right;
}
.gritter-with-image,
.<API key> {
padding:0;
}
.gritter-with-image {
width:auto;
float:left;
}
/* for the light (white) version of the gritter notice */
.gritter-light .gritter-item,
.gritter-light .gritter-bottom,
.gritter-light .gritter-top,
.gritter-light .gritter-close {
background-image: url(../images/gritter-light.png);
color: #222;
}
.gritter-light .gritter-title {
text-shadow: none;
}
/*Custom*/
.custom-bg{
background-color: #db189a !important;
}
.custom-success{
background-color: #19c48e !important;
}
.custom-error{
background-color: #e20404 !important;
}
.custom-warning{
background-color: #e2ae3d !important;
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace StudentGrading.Controllers
{
public class HomeController : Controller
{
public ActionResult Index()
{
return View();
}
public ActionResult About()
{
ViewBag.Message = "A word from the site developer.";
return View();
}
}
} |
def <API key>(request_ctx, account_id, search_term=None,
include=None, per_page=None, **request_kwargs):
if per_page is None:
per_page = request_ctx.per_page
include_types = ('avatar_url', 'email', 'last_login', 'time_zone')
utils.<API key>(include, include_types)
path = '/v1/accounts/{account_id}/users'
payload = {
'include[]': include,
'search_term': search_term,
'per_page': per_page,
}
url = request_ctx.base_api_url + path.format(account_id=account_id)
response = client.get(request_ctx, url, payload=payload, **request_kwargs)
return response |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>compcert-64: Not compatible </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.7.2 / compcert-64 - 3.7+8.12~coq_platform~open_source</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
compcert-64
<small>
3.7+8.12~coq_platform~open_source
<span class="label label-info">Not compatible </span>
</small>
</h1>
<p> <em><script>document.write(moment("2022-03-08 19:39:34 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-03-08 19:39:34 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-num base Num library distributed with the OCaml compiler
base-threads base
base-unix base
camlp5 7.14 <API key> of OCaml
conf-findutils 1 Virtual package relying on findutils
conf-perl 2 Virtual package relying on perl
coq 8.7.2 Formal proof management system
num 0 The Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.03.0 The OCaml compiler (virtual package)
ocaml-base-compiler 4.03.0 Official 4.03.0 release
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.3 A library manager for OCaml
# opam file:
opam-version: "2.0"
authors: "Xavier Leroy <xavier.leroy@inria.fr>"
maintainer: "Jacques-Henri Jourdan <jacques-Henri.jourdan@normalesup.org>"
homepage: "http://compcert.inria.fr/"
dev-repo: "git+https://github.com/AbsInt/CompCert.git"
bug-reports: "https://github.com/AbsInt/CompCert/issues"
license: "INRIA Non-Commercial License Agreement"
version: "3.7"
build: [
["./configure"
"amd64-linux" {os = "linux"}
"amd64-macosx" {os = "macos"}
"amd64-linux" {os = "win32"}
"-prefix" "%{prefix}%/variants/compcert64"
"-install-coqdev"
"-clightgen"
"-coqdevdir" "%{lib}%/coq-variant/compcert64/compcert"
"-ignore-coq-version"]
[make "depend"]
[make "-j%{jobs}%" {ocaml:version >= "4.06"} "proof_open_source"]
]
patches: [
"<API key>.<API key>.patch"
"<API key>.v-Cbuiltins.ml-extraction.patch"
"<API key>.patch"
"<API key>.patch"
"<API key>.patch"
"<API key>.patch"
"<API key>.patch"
"<API key>.patch"
"<API key>.patch"
"<API key>.patch"
]
extra-files: [
["<API key>.<API key>.patch" "sha256=<SHA256-like>"]
["<API key>.v-Cbuiltins.ml-extraction.patch" "sha256=<SHA256-like>"]
["<API key>.patch" "sha256=<SHA256-like>"]
["<API key>.patch" "sha256=<SHA256-like>"]
["<API key>.patch" "sha256=<SHA256-like>"]
["<API key>.patch" "sha256=<SHA256-like>"]
["<API key>.patch" "sha256=<SHA256-like>"]
["<API key>.patch" "sha256=<SHA256-like>"]
["<API key>.patch" "sha256=<SHA256-like>"]
["<API key>.patch" "sha256=<SHA256-like>"]
]
install: [
[make "install_open_source"]
]
depends: [
"coq" {>= "8.12" & < "8.13"}
"coq-flocq" {>= "3.2.1" & < "4~"}
"coq-menhirlib" {>= "20190626"}
"menhir" {>= "20190626"}
"ocaml" {>= "4.05.0"}
]
synopsis: "The CompCert C compiler (64 bit, only open source files + using coq-platform)"
description: "This package installs the 64 bit version of CompCert.
For coexistence with the 32 bit version, the files are installed in:
%{prefix}%/variants/compcert64/bin (ccomp and clightgen binaries)
%{prefix}%/variants/compcert64/lib/compcert (C library)
%{lib}%/coq/user-contrib/compcert64 (Coq library)
Please note that the coq module path is compcert and not compcert64,
so the files cannot be directly Required as compcert64.
Instead -Q or -R options must be used to bind the compcert64 folder
to the module path compcert. This is more convenient if one development
uses both 32 and 64 bit versions. Otherwise all files would have to
be duplicated with module paths compcert and compcert64.
Please also note that the binary folder is usually not in the path."
tags: [
"category:Computer Science/Semantics and Compilation/Compilation"
"category:Computer Science/Semantics and Compilation/Semantics"
"keyword:C"
"keyword:compiler"
"logpath:compcert64"
"date:2020-04-29"
]
url {
src: "https://github.com/AbsInt/CompCert/archive/v3.7.tar.gz"
checksum: "sha256=<SHA256-like>"
}
</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-compcert-64.3.7+8.12~coq_platform~open_source coq.8.7.2</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.7.2).
The following dependencies couldn't be met:
- coq-compcert-64 -> ocaml >= 4.05.0
base of this switch (use `--unlock-base' to force)
No solution found, exiting
</pre></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>opam remove -y coq; opam install -y --show-action --unlock-base coq-compcert-64.3.7+8.12~coq_platform~open_source</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install </h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</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:
</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> |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>monae: Not compatible </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.8.2 / monae - 0.3.1</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
monae
<small>
0.3.1
<span class="label label-info">Not compatible </span>
</small>
</h1>
<p> <em><script>document.write(moment("2021-12-01 20:57:33 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-01 20:57:33 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-threads base
base-unix base
camlp5 7.14 <API key> of OCaml
conf-findutils 1 Virtual package relying on findutils
conf-perl 1 Virtual package relying on perl
coq 8.8.2 Formal proof management system
num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.07.1 The OCaml compiler (virtual package)
ocaml-base-compiler 4.07.1 Official release 4.07.1
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "Reynald Affeldt <reynald.affeldt@aist.go.jp>"
homepage: "https://github.com/affeldt-aist/monae"
dev-repo: "git+https://github.com/affeldt-aist/monae.git"
bug-reports: "https://github.com/affeldt-aist/monae/issues"
license: "LGPL-2.1-or-later"
synopsis: "Monads and equational reasoning in Coq"
description: """
This Coq library contains a hierarchy of monads with their laws used
in several examples of monadic equational reasoning."""
build: [
[make "-j%{jobs}%"]
[make "sect5"]
[make "-C" "impredicative_set"]
]
install: [make "install"]
depends: [
"coq" { (>= "8.13" & < "8.14~") | (= "dev") }
"<API key>" { (>= "1.12.0" & < "1.13~") }
"<API key>" { (>= "1.12.0" & < "1.13~") }
"<API key>" { (>= "1.12.0" & < "1.13~") }
"<API key>" { (>= "1.12.0" & < "1.13~") }
"coq-mathcomp-field" { (>= "1.12.0" & < "1.13~") }
"<API key>" { (>= "0.3.4" & <= "0.3.5") }
"coq-infotheo" { = "0.3.1" }
"coq-paramcoq" { >= "1.1.2" & < "1.2~" }
]
tags: [
"keyword:monae"
"keyword:effects"
"keyword:probability"
"keyword:nondeterminism"
"logpath:monae"
"date:2021-03-01"
]
authors: [
"Reynald Affeldt"
"David Nowak"
"Takafumi Saikawa"
"Jacques Garrigue"
"Celestine Sauvage"
"Kazunari Tanaka"
]
url {
http: "https://github.com/affeldt-aist/monae/archive/0.3.1.tar.gz"
checksum: "sha512=9922cadb9987b2f4282b4b4efd67eda011df55fd8b459c23a500ea24a7060d13ef3637b351d139a7c7a81ac0aece5a83516c92cd7b2054016f338eb9a187a320"
}
</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-monae.0.3.1 coq.8.8.2</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.8.2).
The following dependencies couldn't be met:
- coq-monae -> coq >= dev
no matching version
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></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>opam remove -y coq; opam install -y --show-action --unlock-base coq-monae.0.3.1</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install </h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</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:
</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> |
// EditorScrollView.h
// CoreTextEditor
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// all copies or substantial portions of the Software.
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// 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.
#import <UIKit/UIKit.h>
@class RTKDocument;
@protocol RTKDocumentDelegate;
@interface RTKView : UIScrollView {
RTKDocument *docView;
bool _dragEditingActive;
bool _hasMoved;
}
- (id)initWithFrame:(CGRect)frame delegate:(id<RTKDocumentDelegate>)delegate;
@end |
FROM golang:onbuild
RUN go install github.com/smancke/guble/guble-cli
ENTRYPOINT ["/go/bin/app"]
VOLUME ["/var/lib/guble"]
EXPOSE 8080 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Mobx</title>
<style type="text/css">
.input {
padding: 15px;
border: 1px solid #ccc;
font-size: 24px;
width: 400px
}
.todo-item {
display: flex;
align-items: center;
heigth: 40px;
border-bottom: 1px solid #ccc;
}
.todo-item .toggle {
margin-right: 20px;
}
.todo-item .title {
font-size: 24px;
color: #000;
}
.todo-item .title.finished{
font-size: 24px;
text-decoration: line-through;
color: #ccc;
}
.todo-item .delete {
margin-left: 20px;
cursor: pointer;
}
</style>
</head>
<body>
<div id="root"></div>
</body>
<script src="dist/main.js"></script>
</html> |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>math-classes: Not compatible </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.5.2~camlp4 / math-classes - 1.0.3</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
math-classes
<small>
1.0.3
<span class="label label-info">Not compatible </span>
</small>
</h1>
<p> <em><script>document.write(moment("2022-02-27 17:05:20 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-02-27 17:05:20 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-num base Num library distributed with the OCaml compiler
base-threads base
base-unix base
camlp4 4.04+1 Camlp4 is a system for writing extensible parsers for programming languages
conf-findutils 1 Virtual package relying on findutils
coq 8.5.2~camlp4 Formal proof management system
num 0 The Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.04.2 The OCaml compiler (virtual package)
ocaml-base-compiler 4.04.2 Official 4.04.2 release
ocaml-config 1 OCaml Switch Configuration
ocamlbuild 0.14.1 OCamlbuild is a build system with builtin rules to easily build most OCaml projects
# opam file:
opam-version: "2.0"
maintainer: "b.a.w.spitters@gmail.com"
homepage: "https://math-classes.github.io"
doc: "https://github.com/math-classes/"
authors: [
"Eelis van der Weegen"
"Bas Spitters"
"Robbert Krebbers"
]
license: "Public Domain"
build: [
[ "./configure.sh" ]
[ make "-j%{jobs}%" ]
]
install: [make "install"]
depends: [
"ocaml"
"coq" {>= "8.4pl4" & < "8.5~"}
]
tags: [
"logpath:MathClasses"
"date:2015-05-08"
]
synopsis: "A library of abstract interfaces for mathematical structures in Coq"
url {
src:
"https://github.com/math-classes/math-classes/archive/<SHA1-like>.zip"
checksum: "md5=<API key>"
}
</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-math-classes.1.0.3 coq.8.5.2~camlp4</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.5.2~camlp4).
The following dependencies couldn't be met:
- coq-math-classes -> coq < 8.5~ -> ocaml < 4.03.0
base of this switch (use `--unlock-base' to force)
No solution found, exiting
</pre></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>opam remove -y coq; opam install -y --show-action --unlock-base coq-math-classes.1.0.3</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install </h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</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:
</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> |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>error-handlers: 12 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.6.1 / error-handlers - 1.1.1</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
error-handlers
<small>
1.1.1
<span class="label label-success">12 s </span>
</small>
</h1>
<p> <em><script>document.write(moment("2021-10-24 00:12:32 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-10-24 00:12:32 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-num base Num library distributed with the OCaml compiler
base-threads base
base-unix base
camlp5 7.14 <API key> of OCaml
conf-findutils 1 Virtual package relying on findutils
conf-perl 1 Virtual package relying on perl
coq 8.6.1 Formal proof management system
num 0 The Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.05.0 The OCaml compiler (virtual package)
ocaml-base-compiler 4.05.0 Official 4.05.0 release
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "dev@clarus.me"
homepage: "https://github.com/clarus/coq-error-handlers"
dev-repo: "git+https://github.com/clarus/coq-error-handlers.git"
bug-reports: "https://github.com/clarus/coq-error-handlers/issues"
authors: ["Guillaume Claret"]
license: "MIT"
build: [
["./configure.sh"]
[make "-j%{jobs}%"]
]
install: [
[make "install"]
]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/ErrorHandlers"]
depends: [
"ocaml"
"coq" {>= "8.4pl4"}
]
synopsis: "Simple and robust error handling functions"
flags: light-uninstall
url {
src: "https://github.com/clarus/coq-error-handlers/archive/1.1.1.tar.gz"
checksum: "md5=<API key>"
}
</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-error-handlers.1.1.1 coq.8.6.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-error-handlers.1.1.1 coq.8.6.1</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>8 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-error-handlers.1.1.1 coq.8.6.1</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>12 s</dd>
</dl>
<h2>Installation size</h2>
<p>Total: 5 K</p>
<ul>
<li>5 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ErrorHandlers/All.vo</code></li>
<li>1 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ErrorHandlers/All.v</code></li>
</ul>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq-error-handlers.1.1.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:
</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> |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>metacoq-template: Not compatible </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.7.0 / metacoq-template - 1.0~alpha1+8.9</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
metacoq-template
<small>
1.0~alpha1+8.9
<span class="label label-info">Not compatible </span>
</small>
</h1>
<p> <em><script>document.write(moment("2021-12-26 20:28:19 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-26 20:28:19 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-threads base
base-unix base
camlp5 7.14 <API key> of OCaml
conf-findutils 1 Virtual package relying on findutils
conf-perl 1 Virtual package relying on perl
coq 8.7.0 Formal proof management system
num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.08.1 The OCaml compiler (virtual package)
ocaml-base-compiler 4.08.1 Official release 4.08.1
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "matthieu.sozeau@inria.fr"
homepage: "https://metacoq.github.io/metacoq"
dev-repo: "git+https://github.com/MetaCoq/metacoq.git#coq-8.8"
bug-reports: "https://github.com/MetaCoq/metacoq/issues"
authors: ["Abhishek Anand <aa755@cs.cornell.edu>"
"Simon Boulier <simon.boulier@inria.fr>"
"Cyril Cohen <cyril.cohen@inria.fr>"
"Yannick Forster <forster@ps.uni-saarland.de>"
"Fabian Kunze <fkunze@fakusb.de>"
"Gregory Malecha <gmalecha@gmail.com>"
"Matthieu Sozeau <matthieu.sozeau@inria.fr>"
"Nicolas Tabareau <nicolas.tabareau@inria.fr>"
"Théo Winterhalter <theo.winterhalter@inria.fr>"
]
license: "MIT"
build: [
["sh" "./configure.sh"]
[make "-j%{jobs}%" "template-coq"]
]
install: [
[make "-C" "template-coq" "install"]
]
depends: [
"ocaml" {> "4.02.3"}
"coq" {>= "8.9" & < "8.10~"}
]
synopsis: "A quoting and unquoting library for Coq in Coq"
description: """
MetaCoq is a meta-programming framework for Coq.
Template Coq is a quoting library for Coq. It takes Coq terms and
constructs a representation of their syntax tree as a Coq inductive data
type. The representation is based on the kernel's term representation.
In addition to a complete reification and denotation of CIC terms,
Template Coq includes:
- Reification of the environment structures, for constant and inductive declarations.
- Denotation of terms and global declarations
- A monad for manipulating global declarations, calling the type
checker, and inserting them in the global environment, in the style of
MetaCoq/MTac.
"""
url {
src: "https://github.com/MetaCoq/metacoq/archive/1.0-alpha+8.9.tar.gz"
checksum: "sha256=<SHA256-like>"
}</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 <API key>.1.0~alpha1+8.9 coq.8.7.0</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.7.0).
The following dependencies couldn't be met:
- <API key> -> coq >= 8.9
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></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>opam remove -y coq; opam install -y --show-action --unlock-base <API key>.1.0~alpha1+8.9</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install </h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</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:
</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> |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>simple-io: 29 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.12.2 / simple-io - 1.4.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
simple-io
<small>
1.4.0
<span class="label label-success">29 s </span>
</small>
</h1>
<p> <em><script>document.write(moment("2022-01-07 08:38:55 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-01-07 08:38:55 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
coq 8.12.2 Formal proof management system
num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.11.2 The OCaml compiler (virtual package)
ocaml-base-compiler 4.11.2 Official release 4.11.2
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "Li-yao Xia <lysxia@gmail.com>"
authors: "Li-yao Xia"
homepage: "https://github.com/Lysxia/coq-simple-io"
bug-reports: "https://github.com/Lysxia/coq-simple-io/issues"
license: "MIT"
dev-repo: "git+https://github.com/Lysxia/coq-simple-io.git"
build: [make "build"]
run-test: [make "test"]
install: [make "install"]
depends: [
"ocaml"
"coq" {>= "8.8" & < "8.13~"}
"coq-ext-lib"
"ocamlbuild" {with-test}
]
tags: [
"date:2020-10-13"
"logpath:SimpleIO"
"keyword:extraction"
"keyword:effects"
]
synopsis: "IO monad for Coq"
description: """
This library provides tools to implement IO programs directly in Coq, in a
similar style to Haskell. Facilities for formal verification are not included.
IO is defined as a parameter with a purely functional interface in Coq,
to be extracted to OCaml. Some wrappers for the basic types and functions in
the OCaml Pervasives module are provided. Users are free to define their own
APIs on top of this IO type."""
url {
src: "https://github.com/Lysxia/coq-simple-io/archive/1.4.0.tar.gz"
checksum: "sha512=d5acb89432ca2933c60b320b604fadd11063080c3c446c7d18ec071043c5685892b22a09f2cb3807926ac3ee830cbbf724daa00ba3913b13bc88be368fd4de99"
}
</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-simple-io.1.4.0 coq.8.12.2</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-simple-io.1.4.0 coq.8.12.2</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>1 m 20 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-simple-io.1.4.0 coq.8.12.2</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>29 s</dd>
</dl>
<h2>Installation size</h2>
<p>Total: 597 K</p>
<ul>
<li>62 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_Unix.vo</code></li>
<li>53 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_Stdlib.vo</code></li>
<li>38 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_UnsafeNat.vo</code></li>
<li>37 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_RawChar.vo</code></li>
<li>37 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_String.vo</code></li>
<li>35 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_Bytes.vo</code></li>
<li>35 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_Unsafe.vo</code></li>
<li>35 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_Float.vo</code></li>
<li>35 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_Random.vo</code></li>
<li>34 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_Sys.vo</code></li>
<li>34 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/SimpleIO.vo</code></li>
<li>34 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_StdlibAxioms.vo</code></li>
<li>16 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_Stdlib.glob</code></li>
<li>15 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_Unix.v</code></li>
<li>14 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_Unix.glob</code></li>
<li>14 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_Monad.vo</code></li>
<li>11 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_Monad.glob</code></li>
<li>11 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_Stdlib.v</code></li>
<li>5 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_UnsafeNat.glob</code></li>
<li>4 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_Exceptions.vo</code></li>
<li>4 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_Monad.v</code></li>
<li>4 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_String.glob</code></li>
<li>3 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_RawChar.glob</code></li>
<li>3 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_String.v</code></li>
<li>2 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_RawChar.v</code></li>
<li>2 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_Float.v</code></li>
<li>2 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_Unsafe.glob</code></li>
<li>2 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_Unsafe.v</code></li>
<li>2 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_Bytes.glob</code></li>
<li>2 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_Bytes.v</code></li>
<li>1 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_Float.glob</code></li>
<li>1 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_UnsafeNat.v</code></li>
<li>1 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_Exceptions.glob</code></li>
<li>1 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_Random.v</code></li>
<li>1 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_Exceptions.v</code></li>
<li>1 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_Random.glob</code></li>
<li>1 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_Sys.v</code></li>
<li>1 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_Sys.glob</code></li>
<li>1 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_StdlibAxioms.glob</code></li>
<li>1 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/SimpleIO.glob</code></li>
<li>1 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/SimpleIO.v</code></li>
<li>1 K <code>../ocaml-base-compiler.4.11.2/lib/coq/user-contrib/SimpleIO/IO_StdlibAxioms.v</code></li>
</ul>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq-simple-io.1.4.0</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:
</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> |
<?php
use Nette\Application\Routers\RouteList,
Nette\Application\Routers\Route;
/**
* Router factory
*
* @author Patrick Kusebauch
* @version 2.10, 18. 11. 2014
*/
class RouterFactory
{
/**
* Registers routes for modules
*
* @return Nette\Application\IRouter
*/
public function createRouter()
{
$router = new RouteList();
//\OddilModule\OddilModule::createRoutes($router, '//oddil.27skauti.cz/');
\OddilModule\OddilModule::createRoutes($router, 'oddil/');
\DefaultModule\DefaultModule::createRoutes($router, '/');
return $router;
}
} |
#include <bits/stdc++.h>
#define FOR(i,a,b) for(int (i)=(a);(i)<(b);(i)++)
#define REP(i,n) FOR(i,0,n)
#define RER(i,n) FOR(i,0,(n+1))
#define pb push_back
#define mp(a,b) make_pair((a),(b))
#define mset(m,v) memset(m,v,sizeof(m))
using namespace std;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef vector<pair<int, int> > vpii;
typedef long long ll;
typedef vector<ll> vl;
typedef pair<ll,ll> pll;
typedef vector<pair<ll, ll> > vpll;
typedef vector<string> vs;
typedef long double ld;
const double EPS = 1e-10;
const int INF = 1e+9;
const double PI = acos(-1);
auto main() -> int
{
int x, y;
cin >> x >> y;
cout << max(x, y) << endl;
return 0;
} |
define(["jquery"], function($) {
var RegisterModule = (function() {
/*
* TO DO:
* initialized all dom requirements, do event-triggered functionality.
*
*/
init = function() {
/* dont allow any keys to be accepted except on numeric keys and backspace, tab and return etc..
* bind it on keydown event.
*/
$("#reg-age").on('keydown', function (e) {
if ($.inArray(e.keyCode, [46, 8, 9, 27, 13, 110]) !== -1 ||
(e.keyCode == 65 && ( e.ctrlKey === true || e.metaKey === true ) ) ||
(e.keyCode >= 35 && e.keyCode <= 40)) {
return;
}
if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) {
e.preventDefault();
}
});
$('#btn-register').on('click', function(e) {
validateReqdField();
<API key>();
e.preventDefault();
});
},
/*
* TO DO:
* validate required fields, check if the field is empty.
* return error message.
*/
validateReqdField = function() {
$('.help-block').remove();
$('.has-error').removeClass('has-error');
$('.required').filter(function (){
return this.value === "";
}).after('<div class="help-block">Enter a value</div>').parent().addClass('has-error');
},
hide_modal = function() {
$('#myModal').modal('hide');
return window.location = login_path;
},
/*
* TO DO:
* submit request data on server.
*
*/
<API key> = function() {
var data = $('#register-form').serialize();
var reqdFields = $('.help-block');
if (reqdFields.length > 0) {
$(empty[0]).find('input').focus();
return false;
}
else if ($('#reg-age').val() <= 0) {
$('#warning-notify').removeClass('hide');
$('#msg-notify').text('Age must be greater than 0.');
return false;
}
else if ($('#reg-password').val() !== $('#<API key>').val()) {
$('#warning-notify').removeClass('hide');
$('#msg-notify').text('Mismatch password!');
return false;
}
else {
$.ajax({
type : 'POST',
url : login_path + 'index.php/welcome/register',
data : { udata : data },
dataType : 'json',
async: true,
beforeSend : function() {
$('#btn-login').html('Please wait <i class="fa fa-refresh fa-spin"></i>');
$('#btn-login').addClass('disabled');
},
success : function(response) {
if (response.message === "success") {
$('#myModal').modal('show');
$('#msg').text('Successful Registered');
window.setTimeout(hide_modal, 3400);
}
else {
$('#warning-notify').removeClass('hide');
$('#msg-notify').text(response.content);
}
},
});
return false;
}
};
return {init:init};
})();
RegisterModule.init();
}); |
// Generated by the J2ObjC translator. DO NOT EDIT!
// source: ./core/src/java/org/apache/lucene/search/Rescorer.java
#include "J2ObjC_header.h"
#pragma push_macro("<API key>")
#ifdef <API key>
#define <API key> 0
#else
#define <API key> 1
#endif
#undef <API key>
#if __has_feature(nullability)
#pragma clang diagnostic push
#pragma GCC diagnostic ignored "-Wnullability"
#pragma GCC diagnostic ignored "-<API key>"
#endif
#if !defined (<API key>) && (<API key> || defined(<API key>))
#define <API key>
@class <API key>;
@class <API key>;
@class <API key>;
/*!
@brief Re-scores the topN results (<code>TopDocs</code>) from an original
query.See <code>QueryRescorer</code> for an actual
implementation.
Typically, you run a low-cost
first-pass query across the entire index, collecting the
top few hundred hits perhaps, and then use this class to
mix in a more costly second pass scoring.
<p>See <code>QueryRescorer.rescore(IndexSearcher,TopDocs,Query,double,int)</code>
for a simple static method to call to rescore using a 2nd
pass <code>Query</code>.
*/
@interface <API key> : NSObject
#pragma mark Public
- (instancetype __nonnull)init;
/*!
@brief Explains how the score for the specified document was
computed.
*/
- (<API key> *)<API key>:(<API key> *)searcher
<API key>:(<API key> *)<API key>
withInt:(jint)docID;
/*!
@brief Rescore an initial first-pass <code>TopDocs</code>.
@param searcher<code>IndexSearcher</code> used to produce the first pass topDocs
@param firstPassTopDocs Hits from the first pass search. It's very important that these hits were
produced by the provided searcher; otherwise the doc
IDs will not match!
@param topN How many re-scored hits to return
*/
- (<API key> *)<API key>:(<API key> *)searcher
<API key>:(<API key> *)firstPassTopDocs
withInt:(jint)topN;
@end
<API key>(<API key>)
FOUNDATION_EXPORT void <API key>(<API key> *self);
<API key>(<API key>)
#endif
#if __has_feature(nullability)
#pragma clang diagnostic pop
#endif
#pragma pop_macro("<API key>") |
module Dirt
# Roles are part of the DCI system design paradigm. They decorate a model object to extend its
# behaviour for the context of a single interaction.
class Role
# Takes the decorated object.
def initialize(decorated)
@decorated = decorated
end
# Attempts to run the missing method on the decorated object before exploding as normal,
# with a light tingling sensation.
def method_missing(method, *args, &block)
# if @decorated.respond_to?(method)
@decorated.send(method, *args, &block)
# else
# super
# end
end
def class
@decorated.class
end
def respond_to?(method, privates = false)
super || @decorated.respond_to?(method, privates)
end
def ==(other)
other && (other.<API key>(:@decorated) == @decorated || other == @decorated)
end
end
end |
# Echo Middleware
Set of middlewares created for the Echo framework.
## Sub-Packages
* [Gorelic](./gorelic) – [ – [ – [ – [ – [.fromNow());</script> (2021-10-28 09:54:59 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-num base Num library distributed with the OCaml compiler
base-threads base
base-unix base
conf-findutils 1 Virtual package relying on findutils
coq 8.11.0 Formal proof management system
num 0 The Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.05.0 The OCaml compiler (virtual package)
ocaml-base-compiler 4.05.0 Official 4.05.0 release
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "Hugo.Herbelin@inria.fr"
homepage: "https://github.com/coq-contribs/ieee754"
license: "LGPL 2.1"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/IEEE754"]
depends: [
"ocaml"
"coq" {>= "8.9" & < "8.10~"}
]
tags: [
"keyword: floating-point arithmetic"
"keyword: IEEE"
"category: Computer Science/Data Types and Data Structures"
"category: Computer Science/Semantics and Compilation/Semantics"
"date: 1997"
]
authors: [
"Patrick Loiseleur"
]
bug-reports: "https://github.com/coq-contribs/ieee754/issues"
dev-repo: "git+https://github.com/coq-contribs/ieee754.git"
synopsis: "A formalisation of the IEEE754 norm on floating-point arithmetic"
description: """
This library contains a non-verified implementation of
binary floating-point addition and multiplication operators inspired
by the IEEE-754 standard. It is today outdated.
See the attached 1997 report rapport-stage-dea.ps.gz for a discussion
(in French) of this work.
For the state of the art at the time of updating this notice, see
e.g. "Flocq: A Unified Library for Proving Floating-point Algorithms
in Coq" by S. Boldo and G. Melquiond, 2011."""
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/ieee754/archive/v8.9.0.tar.gz"
checksum: "md5=<API key>"
}
</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-ieee754.8.9.0 coq.8.11.0</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.11.0).
The following dependencies couldn't be met:
- coq-ieee754 -> coq < 8.10~ -> ocaml < 4.03.0
base of this switch (use `--unlock-base' to force)
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></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>opam remove -y coq; opam install -y --show-action --unlock-base coq-ieee754.8.9.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install </h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</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:
</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> |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="sv" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Easter</source>
<translation>Om Easter</translation>
</message>
<message>
<location line="+39"/>
<source><b>Easter</b> version</source>
<translation><b>Easter</b>-version</translation>
</message>
<message>
<location line="+57"/>
<source>
This is experimental software.
Distributed under the MIT/X11 software license, see the accompanying file COPYING or http:
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http:
<translation>
Detta är experimentell mjukvara.
Distribuerad under mjukvarulicensen MIT/X11, se den medföljande filen COPYING eller http:
Denna produkten innehåller mjukvara utvecklad av OpenSSL Project för användning i OpenSSL Toolkit (http:
</message>
<message>
<location filename="../aboutdialog.cpp" line="+14"/>
<source>Copyright</source>
<translation>Copyright</translation>
</message>
<message>
<location line="+0"/>
<source>The Easter Developers</source>
<translation>Easter-utvecklarna</translation>
</message>
</context>
<context>
<name>AddressBookPage</name>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>Address Book</source>
<translation>Adressbok</translation>
</message>
<message>
<location line="+19"/>
<source>Double-click to edit address or label</source>
<translation>Dubbel-klicka för att ändra adressen eller etiketten</translation>
</message>
<message>
<location line="+27"/>
<source>Create a new address</source>
<translation>Skapa ny adress</translation>
</message>
<message>
<location line="+14"/>
<source>Copy the currently selected address to the system clipboard</source>
<translation>Kopiera den markerade adressen till systemets Urklipp</translation>
</message>
<message>
<location line="-11"/>
<source>&New Address</source>
<translation>&Ny adress</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="+63"/>
<source>These are your Easter addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source>
<translation>Detta är dina Easter-adresser för att ta emot betalningar. Du kan ge varje avsändare en egen adress så att du kan hålla reda på vem som betalar dig.</translation>
</message>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>&Copy Address</source>
<translation>&Kopiera adress</translation>
</message>
<message>
<location line="+11"/>
<source>Show &QR Code</source>
<translation>Visa &QR-kod</translation>
</message>
<message>
<location line="+11"/>
<source>Sign a message to prove you own a Easter address</source>
<translation>Signera ett meddelande för att bevisa att du äger denna adress</translation>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation>Signera &Meddelande</translation>
</message>
<message>
<location line="+25"/>
<source>Delete the currently selected address from the list</source>
<translation>Ta bort den valda adressen från listan</translation>
</message>
<message>
<location line="+27"/>
<source>Export the data in the current tab to a file</source>
<translation>Exportera informationen i den nuvarande fliken till en fil</translation>
</message>
<message>
<location line="+3"/>
<source>&Export</source>
<translation>&Exportera</translation>
</message>
<message>
<location line="-44"/>
<source>Verify a message to ensure it was signed with a specified Easter address</source>
<translation>Verifiera meddelandet för att vara säker på att den var signerad med den specificerade Easter-adressen</translation>
</message>
<message>
<location line="+3"/>
<source>&Verify Message</source>
<translation>&Verifiera Meddelande</translation>
</message>
<message>
<location line="+14"/>
<source>&Delete</source>
<translation>&Radera</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="-5"/>
<source>These are your Easter addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
<translation>Detta är dina Easter adresser för att skicka betalningar. Kolla alltid summan och den mottagande adressen innan du skickar Easters.</translation>
</message>
<message>
<location line="+13"/>
<source>Copy &Label</source>
<translation>Kopiera &etikett</translation>
</message>
<message>
<location line="+1"/>
<source>&Edit</source>
<translation>&Editera</translation>
</message>
<message>
<location line="+1"/>
<source>Send &Coins</source>
<translation>Skicka &Easters</translation>
</message>
<message>
<location line="+260"/>
<source>Export Address Book Data</source>
<translation>Exportera Adressbok</translation>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation>Kommaseparerad fil (*.csv)</translation>
</message>
<message>
<location line="+13"/>
<source>Error exporting</source>
<translation>Fel vid export</translation>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation>Kunde inte skriva till filen %1.</translation>
</message>
</context>
<context>
<name>AddressTableModel</name>
<message>
<location filename="../addresstablemodel.cpp" line="+144"/>
<source>Label</source>
<translation>Etikett</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Adress</translation>
</message>
<message>
<location line="+36"/>
<source>(no label)</source>
<translation>(Ingen etikett)</translation>
</message>
</context>
<context>
<name>AskPassphraseDialog</name>
<message>
<location filename="../forms/askpassphrasedialog.ui" line="+26"/>
<source>Passphrase Dialog</source>
<translation>Lösenords Dialog</translation>
</message>
<message>
<location line="+21"/>
<source>Enter passphrase</source>
<translation>Ange lösenord</translation>
</message>
<message>
<location line="+14"/>
<source>New passphrase</source>
<translation>Nytt lösenord</translation>
</message>
<message>
<location line="+14"/>
<source>Repeat new passphrase</source>
<translation>Upprepa nytt lösenord</translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="+33"/>
<source>Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>10 or more random characters</b>, or <b>eight or more words</b>.</source>
<translation>Ange plånbokens nya lösenord. <br/> Använd ett lösenord på <b>10 eller fler slumpmässiga tecken,</b> eller <b>åtta eller fler ord.</b></translation>
</message>
<message>
<location line="+1"/>
<source>Encrypt wallet</source>
<translation>Kryptera plånbok</translation>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to unlock the wallet.</source>
<translation>Denna operation behöver din plånboks lösenord för att låsa upp plånboken.</translation>
</message>
<message>
<location line="+5"/>
<source>Unlock wallet</source>
<translation>Lås upp plånbok</translation>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to decrypt the wallet.</source>
<translation>Denna operation behöver din plånboks lösenord för att dekryptera plånboken.</translation>
</message>
<message>
<location line="+5"/>
<source>Decrypt wallet</source>
<translation>Dekryptera plånbok</translation>
</message>
<message>
<location line="+3"/>
<source>Change passphrase</source>
<translation>Ändra lösenord</translation>
</message>
<message>
<location line="+1"/>
<source>Enter the old and new passphrase to the wallet.</source>
<translation>Ange plånbokens gamla och nya lösenord.</translation>
</message>
<message>
<location line="+46"/>
<source>Confirm wallet encryption</source>
<translation>Bekräfta kryptering av plånbok</translation>
</message>
<message>
<location line="+1"/>
<source>Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR QUARK</b>!</source>
<translation>VARNING: Om du krypterar din plånbok och glömmer ditt lösenord, kommer du att <b>FÖRLORA ALLA DINA TILLGÅNGAR</b>!</translation>
</message>
<message>
<location line="+0"/>
<source>Are you sure you wish to encrypt your wallet?</source>
<translation>Är du säker på att du vill kryptera din plånbok?</translation>
</message>
<message>
<location line="+15"/>
<source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source>
<translation>VIKTIGT: Alla tidigare säkerhetskopior du har gjort av plånbokens fil ska ersättas med den nya genererade, krypterade plånboks filen. Av säkerhetsskäl kommer tidigare säkerhetskopior av den okrypterade plånboks filen blir oanvändbara när du börjar använda en ny, krypterad plånbok.</translation>
</message>
<message>
<location line="+100"/>
<location line="+24"/>
<source>Warning: The Caps Lock key is on!</source>
<translation>Varning: Caps Lock är påslaget!</translation>
</message>
<message>
<location line="-130"/>
<location line="+58"/>
<source>Wallet encrypted</source>
<translation>Plånboken är krypterad</translation>
</message>
<message>
<location line="-56"/>
<source>Easter will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your easters from being stolen by malware infecting your computer.</source>
<translation>Programmet kommer nu att stänga ner för att färdigställa krypteringen. Tänk på att en krypterad plånbok inte skyddar mot stöld om din dator är infekterad med en keylogger.</translation>
</message>
<message>
<location line="+13"/>
<location line="+7"/>
<location line="+42"/>
<location line="+6"/>
<source>Wallet encryption failed</source>
<translation>Kryptering av plånbok misslyckades</translation>
</message>
<message>
<location line="-54"/>
<source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
<translation>Kryptering av plånbok misslyckades på grund av ett internt fel. Din plånbok blev inte krypterad.</translation>
</message>
<message>
<location line="+7"/>
<location line="+48"/>
<source>The supplied passphrases do not match.</source>
<translation>De angivna lösenorden överensstämmer inte.</translation>
</message>
<message>
<location line="-37"/>
<source>Wallet unlock failed</source>
<translation>Upplåsning av plånbok misslyckades</translation>
</message>
<message>
<location line="+1"/>
<location line="+11"/>
<location line="+19"/>
<source>The passphrase entered for the wallet decryption was incorrect.</source>
<translation>Lösenordet för dekryptering av plånbok var felaktig.</translation>
</message>
<message>
<location line="-20"/>
<source>Wallet decryption failed</source>
<translation>Dekryptering av plånbok misslyckades</translation>
</message>
<message>
<location line="+14"/>
<source>Wallet passphrase was successfully changed.</source>
<translation>Plånbokens lösenord har ändrats.</translation>
</message>
</context>
<context>
<name>BitcoinGUI</name>
<message>
<location filename="../bitcoingui.cpp" line="+233"/>
<source>Sign &message...</source>
<translation>Signera &meddelande...</translation>
</message>
<message>
<location line="+280"/>
<source>Synchronizing with network...</source>
<translation>Synkroniserar med nätverk...</translation>
</message>
<message>
<location line="-349"/>
<source>&Overview</source>
<translation>&Översikt</translation>
</message>
<message>
<location line="+1"/>
<source>Show general overview of wallet</source>
<translation>Visa översiktsvy av plånbok</translation>
</message>
<message>
<location line="+20"/>
<source>&Transactions</source>
<translation>&Transaktioner</translation>
</message>
<message>
<location line="+1"/>
<source>Browse transaction history</source>
<translation>Bläddra i <API key></translation>
</message>
<message>
<location line="+7"/>
<source>Edit the list of stored addresses and labels</source>
<translation>Redigera listan med lagrade adresser och etiketter</translation>
</message>
<message>
<location line="-14"/>
<source>Show the list of addresses for receiving payments</source>
<translation>Visa listan med adresser för att ta emot betalningar</translation>
</message>
<message>
<location line="+31"/>
<source>E&xit</source>
<translation>&Avsluta</translation>
</message>
<message>
<location line="+1"/>
<source>Quit application</source>
<translation>Avsluta programmet</translation>
</message>
<message>
<location line="+4"/>
<source>Show information about Easter</source>
<translation>Visa information om Easter</translation>
</message>
<message>
<location line="+2"/>
<source>About &Qt</source>
<translation>Om &Qt</translation>
</message>
<message>
<location line="+1"/>
<source>Show information about Qt</source>
<translation>Visa information om Qt</translation>
</message>
<message>
<location line="+2"/>
<source>&Options...</source>
<translation>&Alternativ...</translation>
</message>
<message>
<location line="+6"/>
<source>&Encrypt Wallet...</source>
<translation>&Kryptera plånbok...</translation>
</message>
<message>
<location line="+3"/>
<source>&Backup Wallet...</source>
<translation>&Säkerhetskopiera plånbok...</translation>
</message>
<message>
<location line="+2"/>
<source>&Change Passphrase...</source>
<translation>&Byt Lösenord...</translation>
</message>
<message>
<location line="+285"/>
<source>Importing blocks from disk...</source>
<translation>Importerar block från disk...</translation>
</message>
<message>
<location line="+3"/>
<source>Reindexing blocks on disk...</source>
<translation>Återindexerar block på disken...</translation>
</message>
<message>
<location line="-347"/>
<source>Send coins to a Easter address</source>
<translation>Skicka mynt till en Easter-adress</translation>
</message>
<message>
<location line="+49"/>
<source>Modify configuration options for Easter</source>
<translation>Ändra <API key> för Easter</translation>
</message>
<message>
<location line="+9"/>
<source>Backup wallet to another location</source>
<translation>Säkerhetskopiera plånboken till en annan plats</translation>
</message>
<message>
<location line="+2"/>
<source>Change the passphrase used for wallet encryption</source>
<translation>Byt lösenord för kryptering av plånbok</translation>
</message>
<message>
<location line="+6"/>
<source>&Debug window</source>
<translation>&Debug fönster</translation>
</message>
<message>
<location line="+1"/>
<source>Open debugging and diagnostic console</source>
<translation>Öppna debug- och diagnostikkonsolen</translation>
</message>
<message>
<location line="-4"/>
<source>&Verify message...</source>
<translation>&Verifiera meddelande...</translation>
</message>
<message>
<location line="-165"/>
<location line="+530"/>
<source>Easter</source>
<translation>Easter</translation>
</message>
<message>
<location line="-530"/>
<source>Wallet</source>
<translation>Plånbok</translation>
</message>
<message>
<location line="+101"/>
<source>&Send</source>
<translation>&Skicka</translation>
</message>
<message>
<location line="+7"/>
<source>&Receive</source>
<translation>&Ta emot</translation>
</message>
<message>
<location line="+14"/>
<source>&Addresses</source>
<translation>&Adresser</translation>
</message>
<message>
<location line="+22"/>
<source>&About Easter</source>
<translation>&Om Easter</translation>
</message>
<message>
<location line="+9"/>
<source>&Show / Hide</source>
<translation>&Visa / Göm</translation>
</message>
<message>
<location line="+1"/>
<source>Show or hide the main Window</source>
<translation>Visa eller göm huvudfönstret</translation>
</message>
<message>
<location line="+3"/>
<source>Encrypt the private keys that belong to your wallet</source>
<translation>Kryptera de privata nycklar som tillhör din plånbok</translation>
</message>
<message>
<location line="+7"/>
<source>Sign messages with your Easter addresses to prove you own them</source>
<translation>Signera meddelanden med din Easteradress för att bevisa att du äger dem</translation>
</message>
<message>
<location line="+2"/>
<source>Verify messages to ensure they were signed with specified Easter addresses</source>
<translation>Verifiera meddelanden för att vara säker på att de var signerade med den specificerade Easter-adressen</translation>
</message>
<message>
<location line="+28"/>
<source>&File</source>
<translation>&Arkiv</translation>
</message>
<message>
<location line="+7"/>
<source>&Settings</source>
<translation>&Inställningar</translation>
</message>
<message>
<location line="+6"/>
<source>&Help</source>
<translation>&Hjälp</translation>
</message>
<message>
<location line="+9"/>
<source>Tabs toolbar</source>
<translation>Verktygsfält för Tabbar</translation>
</message>
<message>
<location line="+17"/>
<location line="+10"/>
<source>[testnet]</source>
<translation>[testnet]</translation>
</message>
<message>
<location line="+47"/>
<source>Easter client</source>
<translation>Easter-klient</translation>
</message>
<message numerus="yes">
<location line="+141"/>
<source>%n active connection(s) to Easter network</source>
<translation><numerusform>%n aktiv anslutning till Easter-nätverket</numerusform><numerusform>%n aktiva anslutningar till Easter-nätverket</numerusform></translation>
</message>
<message>
<location line="+22"/>
<source>No block source available...</source>
<translation>Ingen block-källa tillgänglig...</translation>
</message>
<message>
<location line="+12"/>
<source>Processed %1 of %2 (estimated) blocks of transaction history.</source>
<translation>Bearbetat %1 av %2 (uppskattade) block av <API key>.</translation>
</message>
<message>
<location line="+4"/>
<source>Processed %1 blocks of transaction history.</source>
<translation>Bearbetat %1 block i <API key>.</translation>
</message>
<message numerus="yes">
<location line="+20"/>
<source>%n hour(s)</source>
<translation><numerusform>%n timme</numerusform><numerusform>%n timmar</numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n day(s)</source>
<translation><numerusform>%n dag</numerusform><numerusform>%n dagar</numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n week(s)</source>
<translation><numerusform>%n vecka</numerusform><numerusform>%n veckor</numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>%1 behind</source>
<translation>%1 efter</translation>
</message>
<message>
<location line="+14"/>
<source>Last received block was generated %1 ago.</source>
<translation>Senast mottagna block genererades %1 sen.</translation>
</message>
<message>
<location line="+2"/>
<source>Transactions after this will not yet be visible.</source>
<translation>Transaktioner efter denna kommer inte ännu vara synliga.</translation>
</message>
<message>
<location line="+22"/>
<source>Error</source>
<translation>Fel</translation>
</message>
<message>
<location line="+3"/>
<source>Warning</source>
<translation>Varning</translation>
</message>
<message>
<location line="+3"/>
<source>Information</source>
<translation>Information</translation>
</message>
<message>
<location line="+70"/>
<source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source>
<translation>Transaktionen överskrider storleksgränsen. Du kan dock fortfarande skicka den mot en kostnad av %1, som går till noderna som behandlar din transaktion och bidrar till nätverket. Vill du betala denna avgift?</translation>
</message>
<message>
<location line="-140"/>
<source>Up to date</source>
<translation>Uppdaterad</translation>
</message>
<message>
<location line="+31"/>
<source>Catching up...</source>
<translation>Hämtar senaste...</translation>
</message>
<message>
<location line="+113"/>
<source>Confirm transaction fee</source>
<translation>Bekräfta överföringsavgift</translation>
</message>
<message>
<location line="+8"/>
<source>Sent transaction</source>
<translation>Transaktion skickad</translation>
</message>
<message>
<location line="+0"/>
<source>Incoming transaction</source>
<translation>Inkommande transaktion</translation>
</message>
<message>
<location line="+1"/>
<source>Date: %1
Amount: %2
Type: %3
Address: %4
</source>
<translation>Datum: %1
Belopp: %2
Typ: %3
Adress: %4
</translation>
</message>
<message>
<location line="+33"/>
<location line="+23"/>
<source>URI handling</source>
<translation>URI hantering</translation>
</message>
<message>
<location line="-23"/>
<location line="+23"/>
<source>URI can not be parsed! This can be caused by an invalid Easter address or malformed URI parameters.</source>
<translation>URI går inte att tolkas! Detta kan orsakas av en ogiltig Easter-adress eller felaktiga URI parametrar.</translation>
</message>
<message>
<location line="+17"/>
<source>Wallet is <b>encrypted</b> and currently <b>unlocked</b></source>
<translation>Denna plånbok är <b>krypterad</b> och för närvarande <b>olåst</b></translation>
</message>
<message>
<location line="+8"/>
<source>Wallet is <b>encrypted</b> and currently <b>locked</b></source>
<translation>Denna plånbok är <b>krypterad</b> och för närvarande <b>låst</b></translation>
</message>
<message>
<location filename="../bitcoin.cpp" line="+111"/>
<source>A fatal error occurred. Easter can no longer continue safely and will quit.</source>
<translation>Ett allvarligt fel har uppstått. Easter kan inte längre köras säkert och kommer att avslutas.</translation>
</message>
</context>
<context>
<name>ClientModel</name>
<message>
<location filename="../clientmodel.cpp" line="+104"/>
<source>Network Alert</source>
<translation>Nätverkslarm</translation>
</message>
</context>
<context>
<name>EditAddressDialog</name>
<message>
<location filename="../forms/editaddressdialog.ui" line="+14"/>
<source>Edit Address</source>
<translation>Redigera Adress</translation>
</message>
<message>
<location line="+11"/>
<source>&Label</source>
<translation>&Etikett</translation>
</message>
<message>
<location line="+10"/>
<source>The label associated with this address book entry</source>
<translation>Den etikett som är associerad med detta adressboksinlägg</translation>
</message>
<message>
<location line="+7"/>
<source>&Address</source>
<translation>&Adress</translation>
</message>
<message>
<location line="+10"/>
<source>The address associated with this address book entry. This can only be modified for sending addresses.</source>
<translation>Adressen som är associerad med detta adressboksinlägg. Detta kan enbart ändras för sändande adresser.</translation>
</message>
<message>
<location filename="../editaddressdialog.cpp" line="+21"/>
<source>New receiving address</source>
<translation>Ny mottagaradress</translation>
</message>
<message>
<location line="+4"/>
<source>New sending address</source>
<translation>Ny avsändaradress</translation>
</message>
<message>
<location line="+3"/>
<source>Edit receiving address</source>
<translation>Redigera mottagaradress</translation>
</message>
<message>
<location line="+4"/>
<source>Edit sending address</source>
<translation>Redigera avsändaradress</translation>
</message>
<message>
<location line="+76"/>
<source>The entered address "%1" is already in the address book.</source>
<translation>Den angivna adressen "%1" finns redan i adressboken.</translation>
</message>
<message>
<location line="-5"/>
<source>The entered address "%1" is not a valid Easter address.</source>
<translation>Den angivna adressen "%1" är inte en giltig Easter-adress.</translation>
</message>
<message>
<location line="+10"/>
<source>Could not unlock wallet.</source>
<translation>Plånboken kunde inte låsas upp.</translation>
</message>
<message>
<location line="+5"/>
<source>New key generation failed.</source>
<translation>Misslyckades med generering av ny nyckel.</translation>
</message>
</context>
<context>
<name>GUIUtil::HelpMessageBox</name>
<message>
<location filename="../guiutil.cpp" line="+424"/>
<location line="+12"/>
<source>Easter-Qt</source>
<translation>Easter-Qt</translation>
</message>
<message>
<location line="-12"/>
<source>version</source>
<translation>version</translation>
</message>
<message>
<location line="+2"/>
<source>Usage:</source>
<translation>Användning:</translation>
</message>
<message>
<location line="+1"/>
<source>command-line options</source>
<translation><API key></translation>
</message>
<message>
<location line="+4"/>
<source>UI options</source>
<translation>UI alternativ</translation>
</message>
<message>
<location line="+1"/>
<source>Set language, for example "de_DE" (default: system locale)</source>
<translation>Ändra språk, till exempel "de_DE" (förvalt: systemets språk)</translation>
</message>
<message>
<location line="+1"/>
<source>Start minimized</source>
<translation>Starta som minimerad</translation>
</message>
<message>
<location line="+1"/>
<source>Show splash screen on startup (default: 1)</source>
<translation>Visa startbilden vid uppstart (förvalt: 1)</translation>
</message>
</context>
<context>
<name>OptionsDialog</name>
<message>
<location filename="../forms/optionsdialog.ui" line="+14"/>
<source>Options</source>
<translation>Alternativ</translation>
</message>
<message>
<location line="+16"/>
<source>&Main</source>
<translation>&Allmänt</translation>
</message>
<message>
<location line="+6"/>
<source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB.</source>
<translation>Valfri transaktionsavgift per kB som ser till att dina transaktioner behandlas snabbt. De flesta transaktioner är 1 kB.</translation>
</message>
<message>
<location line="+15"/>
<source>Pay transaction &fee</source>
<translation>Betala överförings&avgift</translation>
</message>
<message>
<location line="+31"/>
<source>Automatically start Easter after logging in to the system.</source>
<translation>Starta Easter automatiskt efter inloggning.</translation>
</message>
<message>
<location line="+3"/>
<source>&Start Easter on system login</source>
<translation>&Starta Easter vid systemstart</translation>
</message>
<message>
<location line="+35"/>
<source>Reset all client options to default.</source>
<translation>Återställ alla klient inställningar till förvalen.</translation>
</message>
<message>
<location line="+3"/>
<source>&Reset Options</source>
<translation>&Återställ Alternativ</translation>
</message>
<message>
<location line="+13"/>
<source>&Network</source>
<translation>&Nätverk</translation>
</message>
<message>
<location line="+6"/>
<source>Automatically open the Easter client port on the router. This only works when your router supports UPnP and it is enabled.</source>
<translation>Öppna automatiskt Easter-klientens port på routern. Detta fungerar endast om din router har UPnP aktiverat.</translation>
</message>
<message>
<location line="+3"/>
<source>Map port using &UPnP</source>
<translation>Tilldela port med hjälp av &UPnP</translation>
</message>
<message>
<location line="+7"/>
<source>Connect to the Easter network through a SOCKS proxy (e.g. when connecting through Tor).</source>
<translation>Anslut till Easter-nätverket genom en SOCKS-proxy (t.ex. när du ansluter genom Tor).</translation>
</message>
<message>
<location line="+3"/>
<source>&Connect through SOCKS proxy:</source>
<translation>&Anslut genom SOCKS-proxy:</translation>
</message>
<message>
<location line="+9"/>
<source>Proxy &IP:</source>
<translation>Proxy-&IP: </translation>
</message>
<message>
<location line="+19"/>
<source>IP address of the proxy (e.g. 127.0.0.1)</source>
<translation>Proxyns IP-adress (t.ex. 127.0.0.1)</translation>
</message>
<message>
<location line="+7"/>
<source>&Port:</source>
<translation>&Port: </translation>
</message>
<message>
<location line="+19"/>
<source>Port of the proxy (e.g. 9050)</source>
<translation>Proxyns port (t.ex. 9050)</translation>
</message>
<message>
<location line="+7"/>
<source>SOCKS &Version:</source>
<translation>SOCKS &Version:</translation>
</message>
<message>
<location line="+13"/>
<source>SOCKS version of the proxy (e.g. 5)</source>
<translation>SOCKS version av proxyn (t.ex. 5)</translation>
</message>
<message>
<location line="+36"/>
<source>&Window</source>
<translation>&Fönster</translation>
</message>
<message>
<location line="+6"/>
<source>Show only a tray icon after minimizing the window.</source>
<translation>Visa endast en systemfältsikon vid minimering.</translation>
</message>
<message>
<location line="+3"/>
<source>&Minimize to the tray instead of the taskbar</source>
<translation>&Minimera till systemfältet istället för aktivitetsfältet</translation>
</message>
<message>
<location line="+7"/>
<source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source>
<translation>Minimera applikationen istället för att stänga ner den när fönstret stängs. Detta innebär att programmet fotrsätter att köras tills du väljer Avsluta i menyn.</translation>
</message>
<message>
<location line="+3"/>
<source>M&inimize on close</source>
<translation>M&inimera vid stängning</translation>
</message>
<message>
<location line="+21"/>
<source>&Display</source>
<translation>&Visa</translation>
</message>
<message>
<location line="+8"/>
<source>User Interface &language:</source>
<translation>Användargränssnittets &språk: </translation>
</message>
<message>
<location line="+13"/>
<source>The user interface language can be set here. This setting will take effect after restarting Easter.</source>
<translation>Användargränssnittets språk kan ställas in här. Denna inställning träder i kraft efter en omstart av Easter.</translation>
</message>
<message>
<location line="+11"/>
<source>&Unit to show amounts in:</source>
<translation>&Måttenhet att visa belopp i: </translation>
</message>
<message>
<location line="+13"/>
<source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
<translation>Välj en måttenhet att visa när du skickar mynt.</translation>
</message>
<message>
<location line="+9"/>
<source>Whether to show Easter addresses in the transaction list or not.</source>
<translation>Anger om Easter-adresser skall visas i transaktionslistan.</translation>
</message>
<message>
<location line="+3"/>
<source>&Display addresses in transaction list</source>
<translation>&Visa adresser i transaktionslistan</translation>
</message>
<message>
<location line="+71"/>
<source>&OK</source>
<translation>&OK</translation>
</message>
<message>
<location line="+7"/>
<source>&Cancel</source>
<translation>&Avbryt</translation>
</message>
<message>
<location line="+10"/>
<source>&Apply</source>
<translation>&Verkställ</translation>
</message>
<message>
<location filename="../optionsdialog.cpp" line="+53"/>
<source>default</source>
<translation>standard</translation>
</message>
<message>
<location line="+130"/>
<source>Confirm options reset</source>
<translation>Bekräfta att alternativen ska återställs</translation>
</message>
<message>
<location line="+1"/>
<source>Some settings may require a client restart to take effect.</source>
<translation>Vissa inställningar kan behöva en omstart av klienten för att börja gälla.</translation>
</message>
<message>
<location line="+0"/>
<source>Do you want to proceed?</source>
<translation>Vill du fortsätta?</translation>
</message>
<message>
<location line="+42"/>
<location line="+9"/>
<source>Warning</source>
<translation>Varning</translation>
</message>
<message>
<location line="-9"/>
<location line="+9"/>
<source>This setting will take effect after restarting Easter.</source>
<translation>Denna inställning träder i kraft efter en omstart av Easter.</translation>
</message>
<message>
<location line="+29"/>
<source>The supplied proxy address is invalid.</source>
<translation>Den medföljande proxy adressen är ogiltig.</translation>
</message>
</context>
<context>
<name>OverviewPage</name>
<message>
<location filename="../forms/overviewpage.ui" line="+14"/>
<source>Form</source>
<translation>Formulär</translation>
</message>
<message>
<location line="+50"/>
<location line="+166"/>
<source>The displayed information may be out of date. Your wallet automatically synchronizes with the Easter network after a connection is established, but this process has not completed yet.</source>
<translation>Den visade informationen kan vara inaktuell. Plånboken synkroniseras automatiskt med Easter-nätverket efter att anslutningen är upprättad, men denna process har inte slutförts ännu.</translation>
</message>
<message>
<location line="-124"/>
<source>Balance:</source>
<translation>Saldo:</translation>
</message>
<message>
<location line="+29"/>
<source>Unconfirmed:</source>
<translation>Obekräftade:</translation>
</message>
<message>
<location line="-78"/>
<source>Wallet</source>
<translation>Plånbok</translation>
</message>
<message>
<location line="+107"/>
<source>Immature:</source>
<translation>Omogen:</translation>
</message>
<message>
<location line="+13"/>
<source>Mined balance that has not yet matured</source>
<translation>Den genererade balansen som ännu inte har mognat</translation>
</message>
<message>
<location line="+46"/>
<source><b>Recent transactions</b></source>
<translation><b>Nyligen genomförda transaktioner</b></translation>
</message>
<message>
<location line="-101"/>
<source>Your current balance</source>
<translation>Ditt nuvarande saldo</translation>
</message>
<message>
<location line="+29"/>
<source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source>
<translation>Totalt antal transaktioner som ännu inte bekräftats, och som ännu inte räknas med i aktuellt saldo</translation>
</message>
<message>
<location filename="../overviewpage.cpp" line="+116"/>
<location line="+1"/>
<source>out of sync</source>
<translation>osynkroniserad</translation>
</message>
</context>
<context>
<name>PaymentServer</name>
<message>
<location filename="../paymentserver.cpp" line="+107"/>
<source>Cannot start easter: click-to-pay handler</source>
<translation>Kan inte starta bitcin: klicka-och-betala handhavare</translation>
</message>
</context>
<context>
<name>QRCodeDialog</name>
<message>
<location filename="../forms/qrcodedialog.ui" line="+14"/>
<source>QR Code Dialog</source>
<translation>QR-kod dialogruta</translation>
</message>
<message>
<location line="+59"/>
<source>Request Payment</source>
<translation>Begär Betalning</translation>
</message>
<message>
<location line="+56"/>
<source>Amount:</source>
<translation>Belopp:</translation>
</message>
<message>
<location line="-44"/>
<source>Label:</source>
<translation>Etikett:</translation>
</message>
<message>
<location line="+19"/>
<source>Message:</source>
<translation>Meddelande:</translation>
</message>
<message>
<location line="+71"/>
<source>&Save As...</source>
<translation>&Spara som...</translation>
</message>
<message>
<location filename="../qrcodedialog.cpp" line="+62"/>
<source>Error encoding URI into QR Code.</source>
<translation>Fel vid skapande av QR-kod från URI.</translation>
</message>
<message>
<location line="+40"/>
<source>The entered amount is invalid, please check.</source>
<translation>Det angivna beloppet är ogiltigt, vänligen kontrollera.</translation>
</message>
<message>
<location line="+23"/>
<source>Resulting URI too long, try to reduce the text for label / message.</source>
<translation>URI:n är för lång, försöka minska texten för etikett / meddelande.</translation>
</message>
<message>
<location line="+25"/>
<source>Save QR Code</source>
<translation>Spara QR-kod</translation>
</message>
<message>
<location line="+0"/>
<source>PNG Images (*.png)</source>
<translation>PNG-bilder (*.png)</translation>
</message>
</context>
<context>
<name>RPCConsole</name>
<message>
<location filename="../forms/rpcconsole.ui" line="+46"/>
<source>Client name</source>
<translation>Klientnamn</translation>
</message>
<message>
<location line="+10"/>
<location line="+23"/>
<location line="+26"/>
<location line="+23"/>
<location line="+23"/>
<location line="+36"/>
<location line="+53"/>
<location line="+23"/>
<location line="+23"/>
<location filename="../rpcconsole.cpp" line="+339"/>
<source>N/A</source>
<translation>ej tillgänglig</translation>
</message>
<message>
<location line="-217"/>
<source>Client version</source>
<translation>Klient-version</translation>
</message>
<message>
<location line="-45"/>
<source>&Information</source>
<translation>&Information</translation>
</message>
<message>
<location line="+68"/>
<source>Using OpenSSL version</source>
<translation>Använder OpenSSL version</translation>
</message>
<message>
<location line="+49"/>
<source>Startup time</source>
<translation>Uppstartstid</translation>
</message>
<message>
<location line="+29"/>
<source>Network</source>
<translation>Nätverk</translation>
</message>
<message>
<location line="+7"/>
<source>Number of connections</source>
<translation>Antalet anslutningar</translation>
</message>
<message>
<location line="+23"/>
<source>On testnet</source>
<translation>På testnet</translation>
</message>
<message>
<location line="+23"/>
<source>Block chain</source>
<translation>Blockkedja</translation>
</message>
<message>
<location line="+7"/>
<source>Current number of blocks</source>
<translation>Aktuellt antal block</translation>
</message>
<message>
<location line="+23"/>
<source>Estimated total blocks</source>
<translation>Beräknade totala block</translation>
</message>
<message>
<location line="+23"/>
<source>Last block time</source>
<translation>Sista blocktid</translation>
</message>
<message>
<location line="+52"/>
<source>&Open</source>
<translation>&Öppna</translation>
</message>
<message>
<location line="+16"/>
<source>Command-line options</source>
<translation><API key></translation>
</message>
<message>
<location line="+7"/>
<source>Show the Easter-Qt help message to get a list with possible Easter command-line options.</source>
<translation>Visa Easter-Qt hjälpmeddelande för att få en lista med möjliga Easter <API key>.</translation>
</message>
<message>
<location line="+3"/>
<source>&Show</source>
<translation>&Visa</translation>
</message>
<message>
<location line="+24"/>
<source>&Console</source>
<translation>&Konsol</translation>
</message>
<message>
<location line="-260"/>
<source>Build date</source>
<translation>Kompileringsdatum</translation>
</message>
<message>
<location line="-104"/>
<source>Easter - Debug window</source>
<translation>Easter - Debug fönster</translation>
</message>
<message>
<location line="+25"/>
<source>Easter Core</source>
<translation>Easter Kärna</translation>
</message>
<message>
<location line="+279"/>
<source>Debug log file</source>
<translation>Debugloggfil</translation>
</message>
<message>
<location line="+7"/>
<source>Open the Easter debug log file from the current data directory. This can take a few seconds for large log files.</source>
<translation>Öppna Easter debug-loggfilen som finns i datakatalogen. Detta kan ta några sekunder för stora loggfiler.</translation>
</message>
<message>
<location line="+102"/>
<source>Clear console</source>
<translation>Rensa konsollen</translation>
</message>
<message>
<location filename="../rpcconsole.cpp" line="-30"/>
<source>Welcome to the Easter RPC console.</source>
<translation>Välkommen till Easter RPC-konsollen.</translation>
</message>
<message>
<location line="+1"/>
<source>Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.</source>
<translation>Använd upp- och ner-pilarna för att navigera i historiken, och <b>Ctrl-L</b> för att rensa skärmen.</translation>
</message>
<message>
<location line="+1"/>
<source>Type <b>help</b> for an overview of available commands.</source>
<translation>Skriv <b>help</b> för en översikt av alla kommandon.</translation>
</message>
</context>
<context>
<name>SendCoinsDialog</name>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="+14"/>
<location filename="../sendcoinsdialog.cpp" line="+124"/>
<location line="+5"/>
<location line="+5"/>
<location line="+5"/>
<location line="+6"/>
<location line="+5"/>
<location line="+5"/>
<source>Send Coins</source>
<translation>Skicka pengar</translation>
</message>
<message>
<location line="+50"/>
<source>Send to multiple recipients at once</source>
<translation>Skicka till flera mottagare samtidigt</translation>
</message>
<message>
<location line="+3"/>
<source>Add &Recipient</source>
<translation>Lägg till &mottagare</translation>
</message>
<message>
<location line="+20"/>
<source>Remove all transaction fields</source>
<translation>Ta bort alla transaktions-fält</translation>
</message>
<message>
<location line="+3"/>
<source>Clear &All</source>
<translation>Rensa &alla</translation>
</message>
<message>
<location line="+22"/>
<source>Balance:</source>
<translation>Balans:</translation>
</message>
<message>
<location line="+10"/>
<source>123.456 BTC</source>
<translation>123,456 BTC</translation>
</message>
<message>
<location line="+31"/>
<source>Confirm the send action</source>
<translation>Bekräfta sändordern</translation>
</message>
<message>
<location line="+3"/>
<source>S&end</source>
<translation>&Skicka</translation>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="-59"/>
<source><b>%1</b> to %2 (%3)</source>
<translation><b>%1</b> till %2 (%3)</translation>
</message>
<message>
<location line="+5"/>
<source>Confirm send coins</source>
<translation>Bekräfta skickade mynt</translation>
</message>
<message>
<location line="+1"/>
<source>Are you sure you want to send %1?</source>
<translation>Är du säker på att du vill skicka %1?</translation>
</message>
<message>
<location line="+0"/>
<source> and </source>
<translation> och </translation>
</message>
<message>
<location line="+23"/>
<source>The recipient address is not valid, please recheck.</source>
<translation>Mottagarens adress är inte giltig, vänligen kontrollera igen.</translation>
</message>
<message>
<location line="+5"/>
<source>The amount to pay must be larger than 0.</source>
<translation>Det betalade beloppet måste vara större än 0.</translation>
</message>
<message>
<location line="+5"/>
<source>The amount exceeds your balance.</source>
<translation>Värdet överstiger ditt saldo.</translation>
</message>
<message>
<location line="+5"/>
<source>The total exceeds your balance when the %1 transaction fee is included.</source>
<translation>Totalvärdet överstiger ditt saldo när <API key> %1 är pålagd.</translation>
</message>
<message>
<location line="+6"/>
<source>Duplicate address found, can only send to each address once per send operation.</source>
<translation>Dubblett av adress funnen, kan bara skicka till varje adress en gång per sändning.</translation>
</message>
<message>
<location line="+5"/>
<source>Error: Transaction creation failed!</source>
<translation>Fel: Transaktionen gick inte att skapa!</translation>
</message>
<message>
<location line="+5"/>
<source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation>Fel: Transaktionen avslogs. Detta kan hända om några av mynten i plånboken redan spenderats, t.ex om du använt en kopia av wallet.dat och mynt spenderades i kopian men inte markerats som spenderas här.</translation>
</message>
</context>
<context>
<name>SendCoinsEntry</name>
<message>
<location filename="../forms/sendcoinsentry.ui" line="+14"/>
<source>Form</source>
<translation>Formulär</translation>
</message>
<message>
<location line="+15"/>
<source>A&mount:</source>
<translation>&Belopp:</translation>
</message>
<message>
<location line="+13"/>
<source>Pay &To:</source>
<translation>Betala &Till:</translation>
</message>
<message>
<location line="+34"/>
<source>The address to send the payment to (e.g. <API key>)</source>
<translation>Adressen som betalningen skall skickas till (t.ex. <API key>)</translation>
</message>
<message>
<location line="+60"/>
<location filename="../sendcoinsentry.cpp" line="+26"/>
<source>Enter a label for this address to add it to your address book</source>
<translation>Ange ett namn för den här adressen och lägg till den i din adressbok</translation>
</message>
<message>
<location line="-78"/>
<source>&Label:</source>
<translation>&Etikett:</translation>
</message>
<message>
<location line="+28"/>
<source>Choose address from address book</source>
<translation>Välj adress från adresslistan</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
<message>
<location line="+7"/>
<source>Paste address from clipboard</source>
<translation>Klistra in adress från Urklipp</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation>Alt+P</translation>
</message>
<message>
<location line="+7"/>
<source>Remove this recipient</source>
<translation>Ta bort denna mottagare</translation>
</message>
<message>
<location filename="../sendcoinsentry.cpp" line="+1"/>
<source>Enter a Easter address (e.g. <API key>)</source>
<translation>Ange en Easter-adress (t.ex. <API key>)</translation>
</message>
</context>
<context>
<name><API key></name>
<message>
<location filename="../forms/<API key>.ui" line="+14"/>
<source>Signatures - Sign / Verify a Message</source>
<translation>Signaturer - Signera / Verifiera ett Meddelande</translation>
</message>
<message>
<location line="+13"/>
<source>&Sign Message</source>
<translation>&Signera Meddelande</translation>
</message>
<message>
<location line="+6"/>
<source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
<translation>Du kan signera meddelanden med dina adresser för att bevisa att du äger dem. Var försiktig med vad du signerar eftersom phising-attacker kan försöka få dig att skriva över din identitet till någon annan. Signera bara väldetaljerade påståenden du kan gå i god för.</translation>
</message>
<message>
<location line="+18"/>
<source>The address to sign the message with (e.g. <API key>)</source>
<translation>Adressen att signera meddelandet med (t.ex. <API key>)</translation>
</message>
<message>
<location line="+10"/>
<location line="+213"/>
<source>Choose an address from the address book</source>
<translation>Välj en adress från adressboken</translation>
</message>
<message>
<location line="-203"/>
<location line="+213"/>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
<message>
<location line="-203"/>
<source>Paste address from clipboard</source>
<translation>Klistra in adress från Urklipp</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation>Alt+P</translation>
</message>
<message>
<location line="+12"/>
<source>Enter the message you want to sign here</source>
<translation>Skriv in meddelandet du vill signera här</translation>
</message>
<message>
<location line="+7"/>
<source>Signature</source>
<translation>Signatur</translation>
</message>
<message>
<location line="+27"/>
<source>Copy the current signature to the system clipboard</source>
<translation>Kopiera signaturen till systemets Urklipp</translation>
</message>
<message>
<location line="+21"/>
<source>Sign the message to prove you own this Easter address</source>
<translation>Signera meddelandet för att bevisa att du äger denna adress</translation>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation>Signera &Meddelande</translation>
</message>
<message>
<location line="+14"/>
<source>Reset all sign message fields</source>
<translation>Rensa alla fält</translation>
</message>
<message>
<location line="+3"/>
<location line="+146"/>
<source>Clear &All</source>
<translation>Rensa &alla</translation>
</message>
<message>
<location line="-87"/>
<source>&Verify Message</source>
<translation>&Verifiera Meddelande</translation>
</message>
<message>
<location line="+6"/>
<source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source>
<translation>Skriv in din adress, meddelande (se till att du kopierar radbrytningar, mellanslag, tabbar, osv. exakt) och signatur nedan för att verifiera meddelandet. Var noga med att inte läsa in mer i signaturen än vad som finns i det signerade meddelandet, för att undvika att luras av en man-in-the-middle attack.</translation>
</message>
<message>
<location line="+21"/>
<source>The address the message was signed with (e.g. <API key>)</source>
<translation>Adressen som meddelandet var signerat med (t.ex. <API key>)</translation>
</message>
<message>
<location line="+40"/>
<source>Verify the message to ensure it was signed with the specified Easter address</source>
<translation>Verifiera meddelandet för att vara säker på att den var signerad med den angivna Easter-adressen</translation>
</message>
<message>
<location line="+3"/>
<source>Verify &Message</source>
<translation>Verifiera &Meddelande</translation>
</message>
<message>
<location line="+14"/>
<source>Reset all verify message fields</source>
<translation>Rensa alla fält</translation>
</message>
<message>
<location filename="../<API key>.cpp" line="+27"/>
<location line="+3"/>
<source>Enter a Easter address (e.g. <API key>)</source>
<translation>Ange en Easter-adress (t.ex. <API key>)</translation>
</message>
<message>
<location line="-2"/>
<source>Click "Sign Message" to generate signature</source>
<translation>Klicka "Signera Meddelande" för att få en signatur</translation>
</message>
<message>
<location line="+3"/>
<source>Enter Easter signature</source>
<translation>Ange Easter-signatur</translation>
</message>
<message>
<location line="+82"/>
<location line="+81"/>
<source>The entered address is invalid.</source>
<translation>Den angivna adressen är ogiltig.</translation>
</message>
<message>
<location line="-81"/>
<location line="+8"/>
<location line="+73"/>
<location line="+8"/>
<source>Please check the address and try again.</source>
<translation>Vad god kontrollera adressen och försök igen.</translation>
</message>
<message>
<location line="-81"/>
<location line="+81"/>
<source>The entered address does not refer to a key.</source>
<translation>Den angivna adressen refererar inte till en nyckel.</translation>
</message>
<message>
<location line="-73"/>
<source>Wallet unlock was cancelled.</source>
<translation>Upplåsningen av plånboken avbröts.</translation>
</message>
<message>
<location line="+8"/>
<source>Private key for the entered address is not available.</source>
<translation>Privata nyckel för den angivna adressen är inte tillgänglig.</translation>
</message>
<message>
<location line="+12"/>
<source>Message signing failed.</source>
<translation>Signeringen av meddelandet misslyckades.</translation>
</message>
<message>
<location line="+5"/>
<source>Message signed.</source>
<translation>Meddelandet är signerat.</translation>
</message>
<message>
<location line="+59"/>
<source>The signature could not be decoded.</source>
<translation>Signaturen kunde inte avkodas.</translation>
</message>
<message>
<location line="+0"/>
<location line="+13"/>
<source>Please check the signature and try again.</source>
<translation>Kontrollera signaturen och försök igen.</translation>
</message>
<message>
<location line="+0"/>
<source>The signature did not match the message digest.</source>
<translation>Signaturen matchade inte <API key>.</translation>
</message>
<message>
<location line="+7"/>
<source>Message verification failed.</source>
<translation>Meddelandet verifikation misslyckades.</translation>
</message>
<message>
<location line="+5"/>
<source>Message verified.</source>
<translation>Meddelandet är verifierad.</translation>
</message>
</context>
<context>
<name>SplashScreen</name>
<message>
<location filename="../splashscreen.cpp" line="+22"/>
<source>The Easter Developers</source>
<translation>Easter-utvecklarna</translation>
</message>
<message>
<location line="+1"/>
<source>[testnet]</source>
<translation>[testnet]</translation>
</message>
</context>
<context>
<name>TransactionDesc</name>
<message>
<location filename="../transactiondesc.cpp" line="+20"/>
<source>Open until %1</source>
<translation>Öppet till %1</translation>
</message>
<message>
<location line="+6"/>
<source>%1/offline</source>
<translation>%1/nerkopplad</translation>
</message>
<message>
<location line="+2"/>
<source>%1/unconfirmed</source>
<translation>%1/obekräftade</translation>
</message>
<message>
<location line="+2"/>
<source>%1 confirmations</source>
<translation>%1 bekräftelser</translation>
</message>
<message>
<location line="+18"/>
<source>Status</source>
<translation>Status</translation>
</message>
<message numerus="yes">
<location line="+7"/>
<source>, broadcast through %n node(s)</source>
<translation><numerusform>, sänd genom %n nod</numerusform><numerusform>, sänd genom %n noder</numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>Date</source>
<translation>Datum</translation>
</message>
<message>
<location line="+7"/>
<source>Source</source>
<translation>Källa</translation>
</message>
<message>
<location line="+0"/>
<source>Generated</source>
<translation>Genererad</translation>
</message>
<message>
<location line="+5"/>
<location line="+17"/>
<source>From</source>
<translation>Från</translation>
</message>
<message>
<location line="+1"/>
<location line="+22"/>
<location line="+58"/>
<source>To</source>
<translation>Till</translation>
</message>
<message>
<location line="-77"/>
<location line="+2"/>
<source>own address</source>
<translation>egen adress</translation>
</message>
<message>
<location line="-2"/>
<source>label</source>
<translation>etikett</translation>
</message>
<message>
<location line="+37"/>
<location line="+12"/>
<location line="+45"/>
<location line="+17"/>
<location line="+30"/>
<source>Credit</source>
<translation>Kredit</translation>
</message>
<message numerus="yes">
<location line="-102"/>
<source>matures in %n more block(s)</source>
<translation><numerusform>mognar om %n block</numerusform><numerusform>mognar om %n fler block</numerusform></translation>
</message>
<message>
<location line="+2"/>
<source>not accepted</source>
<translation>inte accepterad</translation>
</message>
<message>
<location line="+44"/>
<location line="+8"/>
<location line="+15"/>
<location line="+30"/>
<source>Debit</source>
<translation>Belasta</translation>
</message>
<message>
<location line="-39"/>
<source>Transaction fee</source>
<translation>Transaktionsavgift</translation>
</message>
<message>
<location line="+16"/>
<source>Net amount</source>
<translation>Nettobelopp</translation>
</message>
<message>
<location line="+6"/>
<source>Message</source>
<translation>Meddelande</translation>
</message>
<message>
<location line="+2"/>
<source>Comment</source>
<translation>Kommentar</translation>
</message>
<message>
<location line="+2"/>
<source>Transaction ID</source>
<translation>Transaktions-ID</translation>
</message>
<message>
<location line="+3"/>
<source>Generated coins must mature 240 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
<translation>Genererade mynt måste vänta 240 block innan de kan användas. När du skapade detta block sändes det till nätverket för att läggas till i blockkedjan. Om blocket inte kommer in i kedjan kommer det att ändras till "accepteras inte" och kommer ej att gå att spendera. Detta kan ibland hända om en annan nod genererar ett block nästan samtidigt som dig.</translation>
</message>
<message>
<location line="+7"/>
<source>Debug information</source>
<translation>Debug information</translation>
</message>
<message>
<location line="+8"/>
<source>Transaction</source>
<translation>Transaktion</translation>
</message>
<message>
<location line="+3"/>
<source>Inputs</source>
<translation>Inputs</translation>
</message>
<message>
<location line="+23"/>
<source>Amount</source>
<translation>Mängd</translation>
</message>
<message>
<location line="+1"/>
<source>true</source>
<translation>sant</translation>
</message>
<message>
<location line="+0"/>
<source>false</source>
<translation>falsk</translation>
</message>
<message>
<location line="-209"/>
<source>, has not been successfully broadcast yet</source>
<translation>, har inte lyckats skickas ännu</translation>
</message>
<message numerus="yes">
<location line="-35"/>
<source>Open for %n more block(s)</source>
<translation><numerusform>Öppet för %n mer block</numerusform><numerusform>Öppet för %n mer block</numerusform></translation>
</message>
<message>
<location line="+70"/>
<source>unknown</source>
<translation>okänd</translation>
</message>
</context>
<context>
<name><API key></name>
<message>
<location filename="../forms/<API key>.ui" line="+14"/>
<source>Transaction details</source>
<translation><API key></translation>
</message>
<message>
<location line="+6"/>
<source>This pane shows a detailed description of the transaction</source>
<translation>Den här panelen visar en detaljerad beskrivning av transaktionen</translation>
</message>
</context>
<context>
<name><API key></name>
<message>
<location filename="../<API key>.cpp" line="+225"/>
<source>Date</source>
<translation>Datum</translation>
</message>
<message>
<location line="+0"/>
<source>Type</source>
<translation>Typ</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Adress</translation>
</message>
<message>
<location line="+0"/>
<source>Amount</source>
<translation>Mängd</translation>
</message>
<message numerus="yes">
<location line="+57"/>
<source>Open for %n more block(s)</source>
<translation><numerusform>Öppet för %n mer block</numerusform><numerusform>Öppet för %n mer block</numerusform></translation>
</message>
<message>
<location line="+3"/>
<source>Open until %1</source>
<translation>Öppet till %1</translation>
</message>
<message>
<location line="+3"/>
<source>Offline (%1 confirmations)</source>
<translation>Offline (%1 bekräftelser)</translation>
</message>
<message>
<location line="+3"/>
<source>Unconfirmed (%1 of %2 confirmations)</source>
<translation>Obekräftad (%1 av %2 bekräftelser)</translation>
</message>
<message>
<location line="+3"/>
<source>Confirmed (%1 confirmations)</source>
<translation>Bekräftad (%1 bekräftelser)</translation>
</message>
<message numerus="yes">
<location line="+8"/>
<source>Mined balance will be available when it matures in %n more block(s)</source>
<translation><numerusform>Genererade balansen kommer att finnas tillgänglig när den mognar om %n mer block</numerusform><numerusform>Genererade balansen kommer att finnas tillgänglig när den mognar om %n fler block</numerusform></translation>
</message>
<message>
<location line="+5"/>
<source>This block was not received by any other nodes and will probably not be accepted!</source>
<translation>Det här blocket togs inte emot av några andra noder och kommer antagligen inte att bli godkänt.</translation>
</message>
<message>
<location line="+3"/>
<source>Generated but not accepted</source>
<translation>Genererad men inte accepterad</translation>
</message>
<message>
<location line="+43"/>
<source>Received with</source>
<translation>Mottagen med</translation>
</message>
<message>
<location line="+2"/>
<source>Received from</source>
<translation>Mottaget från</translation>
</message>
<message>
<location line="+3"/>
<source>Sent to</source>
<translation>Skickad till</translation>
</message>
<message>
<location line="+2"/>
<source>Payment to yourself</source>
<translation>Betalning till dig själv</translation>
</message>
<message>
<location line="+2"/>
<source>Mined</source>
<translation>Genererade</translation>
</message>
<message>
<location line="+38"/>
<source>(n/a)</source>
<translation>(n/a)</translation>
</message>
<message>
<location line="+199"/>
<source>Transaction status. Hover over this field to show number of confirmations.</source>
<translation>Transaktionsstatus. Håll muspekaren över för att se antal bekräftelser.</translation>
</message>
<message>
<location line="+2"/>
<source>Date and time that the transaction was received.</source>
<translation>Tidpunkt då transaktionen mottogs.</translation>
</message>
<message>
<location line="+2"/>
<source>Type of transaction.</source>
<translation>Transaktionstyp.</translation>
</message>
<message>
<location line="+2"/>
<source>Destination address of transaction.</source>
<translation>Transaktionens destinationsadress.</translation>
</message>
<message>
<location line="+2"/>
<source>Amount removed from or added to balance.</source>
<translation>Belopp draget eller tillagt till balans.</translation>
</message>
</context>
<context>
<name>TransactionView</name>
<message>
<location filename="../transactionview.cpp" line="+52"/>
<location line="+16"/>
<source>All</source>
<translation>Alla</translation>
</message>
<message>
<location line="-15"/>
<source>Today</source>
<translation>Idag</translation>
</message>
<message>
<location line="+1"/>
<source>This week</source>
<translation>Denna vecka</translation>
</message>
<message>
<location line="+1"/>
<source>This month</source>
<translation>Denna månad</translation>
</message>
<message>
<location line="+1"/>
<source>Last month</source>
<translation>Föregående månad</translation>
</message>
<message>
<location line="+1"/>
<source>This year</source>
<translation>Det här året</translation>
</message>
<message>
<location line="+1"/>
<source>Range...</source>
<translation>Period...</translation>
</message>
<message>
<location line="+11"/>
<source>Received with</source>
<translation>Mottagen med</translation>
</message>
<message>
<location line="+2"/>
<source>Sent to</source>
<translation>Skickad till</translation>
</message>
<message>
<location line="+2"/>
<source>To yourself</source>
<translation>Till dig själv</translation>
</message>
<message>
<location line="+1"/>
<source>Mined</source>
<translation>Genererade</translation>
</message>
<message>
<location line="+1"/>
<source>Other</source>
<translation>Övriga</translation>
</message>
<message>
<location line="+7"/>
<source>Enter address or label to search</source>
<translation>Sök efter adress eller etikett </translation>
</message>
<message>
<location line="+7"/>
<source>Min amount</source>
<translation>Minsta mängd</translation>
</message>
<message>
<location line="+34"/>
<source>Copy address</source>
<translation>Kopiera adress</translation>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation>Kopiera etikett</translation>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation>Kopiera belopp</translation>
</message>
<message>
<location line="+1"/>
<source>Copy transaction ID</source>
<translation>Kopiera transaktions ID</translation>
</message>
<message>
<location line="+1"/>
<source>Edit label</source>
<translation>Ändra etikett</translation>
</message>
<message>
<location line="+1"/>
<source>Show transaction details</source>
<translation>Visa <API key></translation>
</message>
<message>
<location line="+139"/>
<source>Export Transaction Data</source>
<translation>Exportera Transaktionsdata</translation>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation>Kommaseparerad fil (*. csv)</translation>
</message>
<message>
<location line="+8"/>
<source>Confirmed</source>
<translation>Bekräftad</translation>
</message>
<message>
<location line="+1"/>
<source>Date</source>
<translation>Datum</translation>
</message>
<message>
<location line="+1"/>
<source>Type</source>
<translation>Typ</translation>
</message>
<message>
<location line="+1"/>
<source>Label</source>
<translation>Etikett</translation>
</message>
<message>
<location line="+1"/>
<source>Address</source>
<translation>Adress</translation>
</message>
<message>
<location line="+1"/>
<source>Amount</source>
<translation>Mängd</translation>
</message>
<message>
<location line="+1"/>
<source>ID</source>
<translation>ID</translation>
</message>
<message>
<location line="+4"/>
<source>Error exporting</source>
<translation>Fel vid export</translation>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation>Kunde inte skriva till filen %1.</translation>
</message>
<message>
<location line="+100"/>
<source>Range:</source>
<translation>Intervall:</translation>
</message>
<message>
<location line="+8"/>
<source>to</source>
<translation>till</translation>
</message>
</context>
<context>
<name>WalletModel</name>
<message>
<location filename="../walletmodel.cpp" line="+193"/>
<source>Send Coins</source>
<translation>Skicka pengar</translation>
</message>
</context>
<context>
<name>WalletView</name>
<message>
<location filename="../walletview.cpp" line="+42"/>
<source>&Export</source>
<translation>&Exportera</translation>
</message>
<message>
<location line="+1"/>
<source>Export the data in the current tab to a file</source>
<translation>Exportera informationen i den nuvarande fliken till en fil</translation>
</message>
<message>
<location line="+193"/>
<source>Backup Wallet</source>
<translation>Säkerhetskopiera Plånbok</translation>
</message>
<message>
<location line="+0"/>
<source>Wallet Data (*.dat)</source>
<translation>Plånboks-data (*.dat)</translation>
</message>
<message>
<location line="+3"/>
<source>Backup Failed</source>
<translation>Säkerhetskopiering misslyckades</translation>
</message>
<message>
<location line="+0"/>
<source>There was an error trying to save the wallet data to the new location.</source>
<translation>Det inträffade ett fel när plånboken skulle sparas till den nya platsen.</translation>
</message>
<message>
<location line="+4"/>
<source>Backup Successful</source>
<translation>Säkerhetskopiering lyckades</translation>
</message>
<message>
<location line="+0"/>
<source>The wallet data was successfully saved to the new location.</source>
<translation>Plånbokens data har sparats till den nya platsen.</translation>
</message>
</context>
<context>
<name>easter-core</name>
<message>
<location filename="../bitcoinstrings.cpp" line="+94"/>
<source>Easter version</source>
<translation>Easter version</translation>
</message>
<message>
<location line="+102"/>
<source>Usage:</source>
<translation>Användning:</translation>
</message>
<message>
<location line="-29"/>
<source>Send command to -server or easterd</source>
<translation>Skicka kommando till -server eller easterd</translation>
</message>
<message>
<location line="-23"/>
<source>List commands</source>
<translation>Lista kommandon</translation>
</message>
<message>
<location line="-12"/>
<source>Get help for a command</source>
<translation>Få hjälp med ett kommando</translation>
</message>
<message>
<location line="+24"/>
<source>Options:</source>
<translation>Inställningar:</translation>
</message>
<message>
<location line="+24"/>
<source>Specify configuration file (default: eastercoin.conf)</source>
<translation>Ange konfigurationsfil (förvalt: eastercoin.conf)</translation>
</message>
<message>
<location line="+3"/>
<source>Specify pid file (default: eastercoind.pid)</source>
<translation>Ange pid fil (förvalt: eastercoind.pid)</translation>
</message>
<message>
<location line="-1"/>
<source>Specify data directory</source>
<translation>Ange katalog för data</translation>
</message>
<message>
<location line="-9"/>
<source>Set database cache size in megabytes (default: 25)</source>
<translation>Sätt databas cache storleken i megabyte (förvalt: 25)</translation>
</message>
<message>
<location line="-28"/>
<source>Listen for connections on <port> (default: 31520 or testnet: 131520)</source>
<translation>Lyssna efter anslutningar på <port> (förvalt: 31520 eller testnet: 131520)</translation>
</message>
<message>
<location line="+5"/>
<source>Maintain at most <n> connections to peers (default: 125)</source>
<translation>Ha som mest <n> anslutningar till andra klienter (förvalt: 125)</translation>
</message>
<message>
<location line="-48"/>
<source>Connect to a node to retrieve peer addresses, and disconnect</source>
<translation>Anslut till en nod för att hämta klientadresser, och koppla från</translation>
</message>
<message>
<location line="+82"/>
<source>Specify your own public address</source>
<translation>Ange din egen publika adress</translation>
</message>
<message>
<location line="+3"/>
<source>Threshold for disconnecting misbehaving peers (default: 100)</source>
<translation>Tröskelvärde för att koppla ifrån klienter som missköter sig (förvalt: 100)</translation>
</message>
<message>
<location line="-134"/>
<source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
<translation>Antal sekunder att hindra klienter som missköter sig från att ansluta (förvalt: 86400)</translation>
</message>
<message>
<location line="-29"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
<translation>Ett fel uppstod vid upprättandet av RPC port %u för att lyssna på IPv4: %s</translation>
</message>
<message>
<location line="+27"/>
<source>Listen for JSON-RPC connections on <port> (default: 31521 or testnet: 131521)</source>
<translation>Lyssna på <API key> på <port> (förvalt: 31521 eller testnet: 131521)</translation>
</message>
<message>
<location line="+37"/>
<source>Accept command line and JSON-RPC commands</source>
<translation>Tillåt kommandon från kommandotolken och JSON-RPC-kommandon</translation>
</message>
<message>
<location line="+76"/>
<source>Run in the background as a daemon and accept commands</source>
<translation>Kör i bakgrunden som tjänst och acceptera kommandon</translation>
</message>
<message>
<location line="+37"/>
<source>Use the test network</source>
<translation>Använd testnätverket</translation>
</message>
<message>
<location line="-112"/>
<source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
<translation>Acceptera anslutningar utifrån (förvalt: 1 om ingen -proxy eller -connect)</translation>
</message>
<message>
<location line="-80"/>
<source>%s, you must set a rpcpassword in the configuration file:
%s
It is recommended you use the following random password:
rpcuser=easterrpc
rpcpassword=%s
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %%s | mail -s "Easter Alert" admin@foo.com
</source>
<translation>%s, du behöver sätta ett rpclösensord i konfigurationsfilen:
%s
Det är rekommenderat att använda följande slumpade lösenord:
rpcuser=easterrpc
rpcpassword=%s
(du behöver inte komma ihåg lösenordet)
Användarnamnet och lösenordet FÅR INTE bara detsamma.
Om filen inte existerar, skapa den med enbart ägarläsbara filrättigheter.
Det är också rekommenderat att sätta alertnotify så du meddelas om problem;
till exempel: alertnotify=echo %%s | mail -s "Easter Alert" admin@foo.com
</translation>
</message>
<message>
<location line="+17"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
<translation>Ett fel uppstod vid upprättandet av RPC port %u för att lyssna på IPv6, faller tillbaka till IPV4: %s</translation>
</message>
<message>
<location line="+3"/>
<source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
<translation>Bind till given adress och lyssna alltid på den. Använd [värd]:port notation för IPv6</translation>
</message>
<message>
<location line="+3"/>
<source>Cannot obtain a lock on data directory %s. Easter is probably already running.</source>
<translation>Kan inte låsa data-mappen %s. Easter körs förmodligen redan.</translation>
</message>
<message>
<location line="+3"/>
<source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation>Fel: Transaktionen avslogs! Detta kan hända om några av mynten i plånboken redan spenderats, t.ex om du använt en kopia av wallet.dat och mynt spenderades i kopian men inte markerats som spenderas här.</translation>
</message>
<message>
<location line="+4"/>
<source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
<translation>Fel: Denna transaktion kräver en transaktionsavgift på minst %s på grund av dess storlek, komplexitet, eller användning av senast mottagna easters!</translation>
</message>
<message>
<location line="+3"/>
<source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source>
<translation>Exekvera kommando när ett relevant meddelande är mottagen (%s i cmd är utbytt med ett meddelande)</translation>
</message>
<message>
<location line="+3"/>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation>Exekvera kommando när en plånbokstransaktion ändras (%s i cmd är ersatt av TxID)</translation>
</message>
<message>
<location line="+11"/>
<source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source>
<translation>Sätt den maximala storleken av hög-prioriterade/låg-avgifts transaktioner i byte (förvalt: 27000)</translation>
</message>
<message>
<location line="+6"/>
<source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
<translation>Detta är ett förhands testbygge - använd på egen risk - använd inte för mining eller handels applikationer</translation>
</message>
<message>
<location line="+5"/>
<source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
<translation>Varning: -paytxfee är satt väldigt hög! Detta är avgiften du kommer betala för varje transaktion.</translation>
</message>
<message>
<location line="+3"/>
<source>Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.</source>
<translation>Varning: Visade transaktioner kanske inte är korrekt! Du kan behöva uppgradera, eller andra noder kan behöva uppgradera.</translation>
</message>
<message>
<location line="+3"/>
<source>Warning: Please check that your computer's date and time are correct! If your clock is wrong Easter will not work properly.</source>
<translation>Varning: Vänligen kolla så att din dators datum och tid är korrekt! Om din klocka går fel kommer Easter inte fungera korrekt.</translation>
</message>
<message>
<location line="+3"/>
<source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
<translation>Varning: fel vid läsning av wallet.dat! Alla nycklar lästes korrekt, men transaktionsdatan eller adressbokens poster kanske saknas eller är felaktiga.</translation>
</message>
<message>
<location line="+3"/>
<source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
<translation>Varning: wallet.dat korrupt, datan har räddats! Den ursprungliga wallet.dat har sparas som wallet.{timestamp}.bak i %s; om ditt saldo eller transaktioner är felaktiga ska du återställa från en säkerhetskopia.</translation>
</message>
<message>
<location line="+14"/>
<source>Attempt to recover private keys from a corrupt wallet.dat</source>
<translation>Försök att rädda de privata nycklarna från en korrupt wallet.dat</translation>
</message>
<message>
<location line="+2"/>
<source>Block creation options:</source>
<translation>Block skapande inställningar:</translation>
</message>
<message>
<location line="+5"/>
<source>Connect only to the specified node(s)</source>
<translation>Koppla enbart upp till den/de specificerade noden/noder</translation>
</message>
<message>
<location line="+3"/>
<source>Corrupted block database detected</source>
<translation>Korrupt blockdatabas har upptäckts</translation>
</message>
<message>
<location line="+1"/>
<source>Discover own IP address (default: 1 when listening and no -externalip)</source>
<translation>Hitta egen IP-adress (förvalt: 1 under lyssning och utan -externalip)</translation>
</message>
<message>
<location line="+1"/>
<source>Do you want to rebuild the block database now?</source>
<translation>Vill du bygga om blockdatabasen nu?</translation>
</message>
<message>
<location line="+2"/>
<source>Error initializing block database</source>
<translation>Fel vid initiering av blockdatabasen</translation>
</message>
<message>
<location line="+1"/>
<source>Error initializing wallet database environment %s!</source>
<translation>Fel vid initiering av plånbokens databasmiljö %s!</translation>
</message>
<message>
<location line="+1"/>
<source>Error loading block database</source>
<translation>Fel vid inläsning av blockdatabasen</translation>
</message>
<message>
<location line="+4"/>
<source>Error opening block database</source>
<translation>Fel vid öppning av blockdatabasen</translation>
</message>
<message>
<location line="+2"/>
<source>Error: Disk space is low!</source>
<translation>Fel: Hårddiskutrymme är lågt!</translation>
</message>
<message>
<location line="+1"/>
<source>Error: Wallet locked, unable to create transaction!</source>
<translation>Fel: Plånboken är låst, det går ej att skapa en transaktion!</translation>
</message>
<message>
<location line="+1"/>
<source>Error: system error: </source>
<translation>Fel: systemfel:</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to listen on any port. Use -listen=0 if you want this.</source>
<translation>Misslyckades att lyssna på någon port. Använd -listen=0 om du vill detta.</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to read block info</source>
<translation>Misslyckades att läsa blockinformation</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to read block</source>
<translation>Misslyckades att läsa blocket</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to sync block index</source>
<translation>Misslyckades att synkronisera blockindex</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write block index</source>
<translation>Misslyckades att skriva blockindex</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write block info</source>
<translation>Misslyckades att skriva blockinformation</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write block</source>
<translation>Misslyckades att skriva blocket</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write file info</source>
<translation>Misslyckades att skriva filinformation</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write to coin database</source>
<translation>Misslyckades att skriva till myntdatabas</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write transaction index</source>
<translation>Misslyckades att skriva transaktionsindex</translation>
</message>
<message>
<location line="+1"/>
<source>Failed to write undo data</source>
<translation>Misslyckades att skriva ångradata</translation>
</message>
<message>
<location line="+2"/>
<source>Find peers using DNS lookup (default: 1 unless -connect)</source>
<translation>Sök efter klienter med DNS sökningen (förvalt: 1 om inte -connect)</translation>
</message>
<message>
<location line="+1"/>
<source>Generate coins (default: 0)</source>
<translation>Generera mynt (förvalt: 0)</translation>
</message>
<message>
<location line="+2"/>
<source>How many blocks to check at startup (default: 288, 0 = all)</source>
<translation>Hur många block att kontrollera vid uppstart (standardvärde: 288, 0 = alla)</translation>
</message>
<message>
<location line="+1"/>
<source>How thorough the block verification is (0-4, default: 3)</source>
<translation>Hur grundlig blockverifikationen är (0-4, förvalt: 3)</translation>
</message>
<message>
<location line="+19"/>
<source>Not enough file descriptors available.</source>
<translation>Inte tillräckligt med filbeskrivningar tillgängliga.</translation>
</message>
<message>
<location line="+8"/>
<source>Rebuild block chain index from current blk000??.dat files</source>
<translation>Återskapa blockkedjans index från nuvarande blk000??.dat filer</translation>
</message>
<message>
<location line="+16"/>
<source>Set the number of threads to service RPC calls (default: 4)</source>
<translation>Ange antalet trådar för att hantera RPC anrop (standard: 4)</translation>
</message>
<message>
<location line="+26"/>
<source>Verifying blocks...</source>
<translation>Verifierar block...</translation>
</message>
<message>
<location line="+1"/>
<source>Verifying wallet...</source>
<translation>Verifierar plånboken...</translation>
</message>
<message>
<location line="-69"/>
<source>Imports blocks from external blk000??.dat file</source>
<translation>Importerar block från extern blk000??.dat fil</translation>
</message>
<message>
<location line="-76"/>
<source>Set the number of script verification threads (up to 16, 0 = auto, <0 = leave that many cores free, default: 0)</source>
<translation>Ange antalet skriptkontrolltrådar (upp till 16, 0 = auto, <0 = lämna så många kärnor lediga, förval: 0)</translation>
</message>
<message>
<location line="+77"/>
<source>Information</source>
<translation>Information</translation>
</message>
<message>
<location line="+3"/>
<source>Invalid -tor address: '%s'</source>
<translation>Ogiltig -tor adress: '%s'</translation>
</message>
<message>
<location line="+1"/>
<source>Invalid amount for -minrelaytxfee=<amount>: '%s'</source>
<translation>Ogiltigt belopp för -minrelaytxfee=<belopp>: '%s'</translation>
</message>
<message>
<location line="+1"/>
<source>Invalid amount for -mintxfee=<amount>: '%s'</source>
<translation>Ogiltigt belopp för -mintxfee=<belopp>: '%s'</translation>
</message>
<message>
<location line="+8"/>
<source>Maintain a full transaction index (default: 0)</source>
<translation>Upprätthåll ett fullständigt transaktionsindex (förval: 0)</translation>
</message>
<message>
<location line="+2"/>
<source>Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)</source>
<translation>Maximal buffert för mottagning per anslutning, <n>*1000 byte (förvalt: 5000)</translation>
</message>
<message>
<location line="+1"/>
<source>Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)</source>
<translation>Maximal buffert för sändning per anslutning, <n>*1000 byte (förvalt: 5000)</translation>
</message>
<message>
<location line="+2"/>
<source>Only accept block chain matching built-in checkpoints (default: 1)</source>
<translation>Acceptera bara blockkedjans matchande inbyggda kontrollpunkter (förvalt: 1)</translation>
</message>
<message>
<location line="+1"/>
<source>Only connect to nodes in network <net> (IPv4, IPv6 or Tor)</source>
<translation>Anslut enbart till noder i nätverket <net> (IPv4, IPv6 eller Tor)</translation>
</message>
<message>
<location line="+2"/>
<source>Output extra debugging information. Implies all other -debug* options</source>
<translation>Skriv ut extra felsökningsinformation. Gäller alla andra -debug* alternativ</translation>
</message>
<message>
<location line="+1"/>
<source>Output extra network debugging information</source>
<translation>Skriv ut extra felsökningsinformation om nätverk</translation>
</message>
<message>
<location line="+2"/>
<source>Prepend debug output with timestamp</source>
<translation>Skriv ut tid i felsökningsinformationen</translation>
</message>
<message>
<location line="+5"/>
<source>SSL options: (see the Easter Wiki for SSL setup instructions)</source>
<translation>SSL-inställningar: (se Easter-wikin för SSL-setup instruktioner)</translation>
</message>
<message>
<location line="+1"/>
<source>Select the version of socks proxy to use (4-5, default: 5)</source>
<translation>Välj socks-proxy version att använda (4-5, förvalt: 5)</translation>
</message>
<message>
<location line="+3"/>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation>Skicka trace-/debuginformation till terminalen istället för till debug.log</translation>
</message>
<message>
<location line="+1"/>
<source>Send trace/debug info to debugger</source>
<translation>Skicka trace-/debuginformation till debugger</translation>
</message>
<message>
<location line="+5"/>
<source>Set maximum block size in bytes (default: 250000)</source>
<translation>Sätt maximal blockstorlek i byte (förvalt: 250000)</translation>
</message>
<message>
<location line="+1"/>
<source>Set minimum block size in bytes (default: 0)</source>
<translation>Sätt minsta blockstorlek i byte (förvalt: 0)</translation>
</message>
<message>
<location line="+2"/>
<source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
<translation>Krymp debug.log filen vid klient start (förvalt: 1 vid ingen -debug)</translation>
</message>
<message>
<location line="+1"/>
<source>Signing transaction failed</source>
<translation>Signering av transaktion misslyckades</translation>
</message>
<message>
<location line="+2"/>
<source>Specify connection timeout in milliseconds (default: 5000)</source>
<translation>Ange timeout för uppkoppling i millisekunder (förvalt: 5000)</translation>
</message>
<message>
<location line="+4"/>
<source>System error: </source>
<translation>Systemfel:</translation>
</message>
<message>
<location line="+4"/>
<source>Transaction amount too small</source>
<translation>Transaktions belopp för liten</translation>
</message>
<message>
<location line="+1"/>
<source>Transaction amounts must be positive</source>
<translation>Transaktionens belopp måste vara positiva</translation>
</message>
<message>
<location line="+1"/>
<source>Transaction too large</source>
<translation>Transaktionen är för stor</translation>
</message>
<message>
<location line="+7"/>
<source>Use UPnP to map the listening port (default: 0)</source>
<translation>Använd UPnP för att mappa den lyssnande porten (förvalt: 0)</translation>
</message>
<message>
<location line="+1"/>
<source>Use UPnP to map the listening port (default: 1 when listening)</source>
<translation>Använd UPnP för att mappa den lyssnande porten (förvalt: 1 under lyssning)</translation>
</message>
<message>
<location line="+1"/>
<source>Use proxy to reach tor hidden services (default: same as -proxy)</source>
<translation>Använd en proxy för att nå tor (förvalt: samma som -proxy)</translation>
</message>
<message>
<location line="+2"/>
<source>Username for JSON-RPC connections</source>
<translation>Användarnamn för <API key></translation>
</message>
<message>
<location line="+4"/>
<source>Warning</source>
<translation>Varning</translation>
</message>
<message>
<location line="+1"/>
<source>Warning: This version is obsolete, upgrade required!</source>
<translation>Varning: denna version är föråldrad, uppgradering krävs!</translation>
</message>
<message>
<location line="+1"/>
<source>You need to rebuild the databases using -reindex to change -txindex</source>
<translation>Du måste återskapa databaserna med -reindex för att ändra -txindex</translation>
</message>
<message>
<location line="+1"/>
<source>wallet.dat corrupt, salvage failed</source>
<translation>wallet.dat korrupt, räddning misslyckades</translation>
</message>
<message>
<location line="-50"/>
<source>Password for JSON-RPC connections</source>
<translation>Lösenord för <API key></translation>
</message>
<message>
<location line="-67"/>
<source>Allow JSON-RPC connections from specified IP address</source>
<translation>Tillåt <API key> från specifika IP-adresser</translation>
</message>
<message>
<location line="+76"/>
<source>Send commands to node running on <ip> (default: 127.0.0.1)</source>
<translation>Skicka kommandon till klient på <ip> (förvalt: 127.0.0.1)</translation>
</message>
<message>
<location line="-120"/>
<source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
<translation>Exekvera kommando när det bästa blocket ändras (%s i cmd är utbytt av blockhash)</translation>
</message>
<message>
<location line="+147"/>
<source>Upgrade wallet to latest format</source>
<translation>Uppgradera plånboken till senaste formatet</translation>
</message>
<message>
<location line="-21"/>
<source>Set key pool size to <n> (default: 100)</source>
<translation>Sätt storleken på nyckelpoolen till <n> (förvalt: 100)</translation>
</message>
<message>
<location line="-12"/>
<source>Rescan the block chain for missing wallet transactions</source>
<translation>Sök i blockkedjan efter saknade plånboks transaktioner</translation>
</message>
<message>
<location line="+35"/>
<source>Use OpenSSL (https) for JSON-RPC connections</source>
<translation>Använd OpenSSL (https) för <API key></translation>
</message>
<message>
<location line="-26"/>
<source>Server certificate file (default: server.cert)</source>
<translation>Serverns certifikatfil (förvalt: server.cert)</translation>
</message>
<message>
<location line="+1"/>
<source>Server private key (default: server.pem)</source>
<translation>Serverns privata nyckel (förvalt: server.pem)</translation>
</message>
<message>
<location line="-151"/>
<source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source>
<translation>Accepterade <API key> (förvalt: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</translation>
</message>
<message>
<location line="+165"/>
<source>This help message</source>
<translation>Det här hjälp medelandet</translation>
</message>
<message>
<location line="+6"/>
<source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
<translation>Det går inte att binda till %s på den här datorn (bind returnerade felmeddelande %d, %s)</translation>
</message>
<message>
<location line="-91"/>
<source>Connect through socks proxy</source>
<translation>Anslut genom socks-proxy</translation>
</message>
<message>
<location line="-10"/>
<source>Allow DNS lookups for -addnode, -seednode and -connect</source>
<translation>Tillåt DNS-sökningar för -addnode, -seednode och -connect</translation>
</message>
<message>
<location line="+55"/>
<source>Loading addresses...</source>
<translation>Laddar adresser...</translation>
</message>
<message>
<location line="-35"/>
<source>Error loading wallet.dat: Wallet corrupted</source>
<translation>Fel vid inläsningen av wallet.dat: Plånboken är skadad</translation>
</message>
<message>
<location line="+1"/>
<source>Error loading wallet.dat: Wallet requires newer version of Easter</source>
<translation>Fel vid inläsningen av wallet.dat: Plånboken kräver en senare version av Easter</translation>
</message>
<message>
<location line="+93"/>
<source>Wallet needed to be rewritten: restart Easter to complete</source>
<translation>Plånboken behöver skrivas om: Starta om Easter för att färdigställa</translation>
</message>
<message>
<location line="-95"/>
<source>Error loading wallet.dat</source>
<translation>Fel vid inläsning av plånboksfilen wallet.dat</translation>
</message>
<message>
<location line="+28"/>
<source>Invalid -proxy address: '%s'</source>
<translation>Ogiltig -proxy adress: '%s'</translation>
</message>
<message>
<location line="+56"/>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation>Okänt nätverk som anges i -onlynet: '%s'</translation>
</message>
<message>
<location line="-1"/>
<source>Unknown -socks proxy version requested: %i</source>
<translation>Okänd -socks proxy version begärd: %i</translation>
</message>
<message>
<location line="-96"/>
<source>Cannot resolve -bind address: '%s'</source>
<translation>Kan inte matcha -bind adress: '%s'</translation>
</message>
<message>
<location line="+1"/>
<source>Cannot resolve -externalip address: '%s'</source>
<translation>Kan inte matcha -externalip adress: '%s'</translation>
</message>
<message>
<location line="+44"/>
<source>Invalid amount for -paytxfee=<amount>: '%s'</source>
<translation>Ogiltigt belopp för -paytxfee=<belopp>:'%s'</translation>
</message>
<message>
<location line="+1"/>
<source>Invalid amount</source>
<translation>Ogiltig mängd</translation>
</message>
<message>
<location line="-6"/>
<source>Insufficient funds</source>
<translation>Otillräckligt med easters</translation>
</message>
<message>
<location line="+10"/>
<source>Loading block index...</source>
<translation>Laddar blockindex...</translation>
</message>
<message>
<location line="-57"/>
<source>Add a node to connect to and attempt to keep the connection open</source>
<translation>Lägg till en nod att koppla upp mot och försök att hålla anslutningen öppen</translation>
</message>
<message>
<location line="-25"/>
<source>Unable to bind to %s on this computer. Easter is probably already running.</source>
<translation>Det går inte att binda till %s på den här datorn. Easter är förmodligen redan igång.</translation>
</message>
<message>
<location line="+64"/>
<source>Fee per KB to add to transactions you send</source>
<translation>Avgift per KB att lägga till på transaktioner du skickar</translation>
</message>
<message>
<location line="+19"/>
<source>Loading wallet...</source>
<translation>Laddar plånbok...</translation>
</message>
<message>
<location line="-52"/>
<source>Cannot downgrade wallet</source>
<translation>Kan inte nedgradera plånboken</translation>
</message>
<message>
<location line="+3"/>
<source>Cannot write default address</source>
<translation>Kan inte skriva standardadress</translation>
</message>
<message>
<location line="+64"/>
<source>Rescanning...</source>
<translation>Söker igen...</translation>
</message>
<message>
<location line="-57"/>
<source>Done loading</source>
<translation>Klar med laddning</translation>
</message>
<message>
<location line="+82"/>
<source>To use the %s option</source>
<translation>Att använda %s alternativet</translation>
</message>
<message>
<location line="-74"/>
<source>Error</source>
<translation>Fel</translation>
</message>
<message>
<location line="-31"/>
<source>You must set rpcpassword=<password> in the configuration file:
%s
If the file does not exist, create it with owner-readable-only file permissions.</source>
<translation>Du behöver välja ett rpclösensord i konfigurationsfilen:
%s
Om filen inte existerar, skapa den med filrättigheten endast läsbar för ägaren.</translation>
</message>
</context>
</TS> |
import Ember from 'ember';
import MagicShowRoute from '<API key>/mixins/magic-show-route';
export default Ember.Route.extend(MagicShowRoute, {}); |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>weak-up-to: Not compatible </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.6.1 / weak-up-to - 8.7.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
weak-up-to
<small>
8.7.0
<span class="label label-info">Not compatible </span>
</small>
</h1>
<p> <em><script>document.write(moment("2021-12-25 00:47:42 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-25 00:47:42 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-num base Num library distributed with the OCaml compiler
base-ocamlbuild base OCamlbuild binary and libraries distributed with the OCaml compiler
base-threads base
base-unix base
camlp5 7.14 <API key> of OCaml
conf-findutils 1 Virtual package relying on findutils
conf-perl 1 Virtual package relying on perl
coq 8.6.1 Formal proof management system
num 0 The Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.02.3 The OCaml compiler (virtual package)
ocaml-base-compiler 4.02.3 Official 4.02.3 release
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "Hugo.Herbelin@inria.fr"
homepage: "https://github.com/coq-contribs/weak-up-to"
license: "GPL"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/WeakUpTo"]
depends: [
"ocaml"
"coq" {>= "8.7" & < "8.8~"}
]
tags: [
"keyword: weak bisimilarity"
"keyword: weak bisimulation"
"keyword: up-to techniques"
"keyword: termination"
"keyword: commutation"
"keyword: Newman's lemma"
"category: Computer Science/Concurrent Systems and Protocols/Theory of concurrent systems"
"date: 2005-02-22"
]
authors: [ "Damien Pous <damien.pous at ens-lyon.fr> [http://perso.ens-lyon.fr/damien.pous/]" ]
bug-reports: "https://github.com/coq-contribs/weak-up-to/issues"
dev-repo: "git+https://github.com/coq-contribs/weak-up-to.git"
synopsis: "New Up-to Techniques for Weak Bisimulation"
description: """
http://perso.ens-lyon.fr/damien.pous/upto/
This contribution is the formalisation of a paper that appeared in
Proc. of ICALP 2005: "Up-to Techniques for Weak Bisimulation".
First we define a framework for defining up-to techniques for weak
bisimulation in a modular way. Then we prove the correctness of some
new up-to techniques, based on termination guarantees. Notably, a
generalisation of Newman's Lemma to commutation results is
established."""
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/weak-up-to/archive/v8.7.0.tar.gz"
checksum: "md5=<API key>"
}
</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-weak-up-to.8.7.0 coq.8.6.1</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.6.1).
The following dependencies couldn't be met:
- coq-weak-up-to -> coq >= 8.7 -> ocaml >= 4.05.0
base of this switch (use `--unlock-base' to force)
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></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>opam remove -y coq; opam install -y --show-action --unlock-base coq-weak-up-to.8.7.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install </h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</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:
</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> |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>concat: Not compatible </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.8.1 / concat - 8.9.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
concat
<small>
8.9.0
<span class="label label-info">Not compatible </span>
</small>
</h1>
<p> <em><script>document.write(moment("2021-12-06 00:47:38 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-06 00:47:38 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-num base Num library distributed with the OCaml compiler
base-ocamlbuild base OCamlbuild binary and libraries distributed with the OCaml compiler
base-threads base
base-unix base
camlp5 7.14 <API key> of OCaml
conf-findutils 1 Virtual package relying on findutils
conf-perl 1 Virtual package relying on perl
coq 8.8.1 Formal proof management system
num 0 The Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.02.3 The OCaml compiler (virtual package)
ocaml-base-compiler 4.02.3 Official 4.02.3 release
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "Hugo.Herbelin@inria.fr"
homepage: "http://logical.inria.fr/~saibi/docCatV6.ps"
license: "LGPL 2.1"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/ConCaT"]
depends: [
"ocaml"
"coq" {>= "8.9" & < "8.10~"}
]
tags: [
"keyword: category theory"
"category: Mathematics/Category Theory"
]
authors: [
"Amokrane Saïbi"
]
bug-reports: "https://github.com/coq-contribs/concat/issues"
dev-repo: "git+https://github.com/coq-contribs/concat.git"
synopsis: "Constructive Category Theory"
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/concat/archive/v8.9.0.tar.gz"
checksum: "md5=<API key>"
}
</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-concat.8.9.0 coq.8.8.1</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.8.1).
The following dependencies couldn't be met:
- coq-concat -> coq >= 8.9 -> ocaml >= 4.05.0
base of this switch (use `--unlock-base' to force)
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></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>opam remove -y coq; opam install -y --show-action --unlock-base coq-concat.8.9.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install </h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</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:
</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> |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>historical-examples: Not compatible </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.12.1 / historical-examples - 8.9.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
historical-examples
<small>
8.9.0
<span class="label label-info">Not compatible </span>
</small>
</h1>
<p> <em><script>document.write(moment("2021-12-29 09:04:54 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-29 09:04:54 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
coq 8.12.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
# opam file:
opam-version: "2.0"
maintainer: "Hugo.Herbelin@inria.fr"
homepage: "https://github.com/coq-contribs/historical-examples"
license: "LGPL 2.1"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/HistoricalExamples"]
depends: [
"ocaml"
"coq" {>= "8.9" & < "8.10~"}
]
tags: [
"keyword: Newman's lemma"
"keyword: Tarski's fixpoint theorem"
"keyword: line formatting"
"keyword: binary-search paradigm"
"keyword: square root approximation"
"keyword: Calculus of Constructions"
"keyword: history of Coq"
"category: Miscellaneous/Coq Use Examples"
]
authors: [
"Gérard Huet"
"Christine Paulin"
]
bug-reports: "https://github.com/coq-contribs/historical-examples/issues"
dev-repo: "git+https://github.com/coq-contribs/historical-examples.git"
synopsis: "Historical examples developed in the (pure) Calculus of Constructions"
description: """
This is a collection of historical examples developed in
system CoC that implemented Coquand's Calculus of Constructions.
Newman.v and Tarski.v originate in version 1.10, Manna.v and
Format.v are from version 4.3. Their evolution to the Calculus of
Inductive Constructions (up to Coq V6.3) are in MannaCIC.v and
FormatCIC.v. (Collection by Hugo Herbelin.)"""
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/historical-examples/archive/v8.9.0.tar.gz"
checksum: "md5=<API key>"
}
</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 <API key>.8.9.0 coq.8.12.1</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.12.1).
The following dependencies couldn't be met:
- <API key> -> coq < 8.10~ -> ocaml < 4.10
base of this switch (use `--unlock-base' to force)
No solution found, exiting
</pre></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>opam remove -y coq; opam install -y --show-action --unlock-base <API key>.8.9.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install </h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</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:
</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> |
using System;
using System.Linq;
using Foosinator.Models;
using Mindscape.LightSpeed;
using Mindscape.LightSpeed.Linq;
using Mindscape.LightSpeed.Querying;
namespace Foosinator.Services
{
public class GameService
{
readonly LightSpeedContext<<API key>> _context = new LightSpeedContext<<API key>>("Database");
private const string ActiveGame = "ACTIVE";
private const string CompletedGame = "DONE";
public bool HasActiveGame()
{
using (<API key> unitOfWork = _context.CreateUnitOfWork())
{
return unitOfWork.Games.Any(x => x.Status == ActiveGame);
}
}
public Game CreateGame(Guid playerId, Guid teamPlayerId, Guid vsPlayerId, Guid vsPlayerTeamMateId)
{
using (<API key> unitOfWork = _context.CreateUnitOfWork())
{
Game game = new Game
{
Created = DateTime.UtcNow,
Id = Guid.NewGuid(),
Player1Id = playerId,
Player2Id = vsPlayerId,
Player3Id = NullOrGuid(teamPlayerId),
Player4Id = NullOrGuid(vsPlayerTeamMateId),
Status = ActiveGame
};
unitOfWork.Add(game);
unitOfWork.SaveChanges();
return game;
}
}
Guid? NullOrGuid(Guid playerId)
{
if (playerId == Guid.Empty)
return null;
return playerId;
}
public Game GetGame(Guid gameId)
{
using (<API key> unitOfWork = _context.CreateUnitOfWork())
{
Game game = unitOfWork.Games.Single(x => x.Id == gameId);
string player1Name = game.Player1.Name;
string player2Name = game.Player2.Name;
if (game.Player3Id != null && game.Player4Id != null)
{
string player3Name = game.Player3.Name;
string player4Name = game.Player4.Name;
}
return game;
}
}
public Game GetActiveGame()
{
using (<API key> unitOfWork = _context.CreateUnitOfWork())
{
return unitOfWork.Games.SingleOrDefault(x => x.Status == ActiveGame);
}
}
public void CancelGame(Guid gameId)
{
using (<API key> unitOfWork = _context.CreateUnitOfWork())
{
Game game = unitOfWork.Games.Single(x => x.Id == gameId);
unitOfWork.Remove(game);
unitOfWork.SaveChanges();
}
}
public void GameDone(Guid gameId, Guid winningPlayer)
{
ResultsService resultsService = new ResultsService();
Game game = GetGame(gameId);
if (winningPlayer == game.Player1Id)
{
resultsService.IssueWin(gameId, game.Player1Id);
resultsService.IssueLose(gameId, game.Player2Id);
if (game.Player3Id != null && game.Player4Id != null)
{
resultsService.IssueWin(gameId, game.Player3Id.Value);
resultsService.IssueLose(gameId, game.Player4Id.Value);
}
}
else
{
resultsService.IssueWin(gameId, game.Player2Id);
resultsService.IssueLose(gameId, game.Player1Id);
if (game.Player3Id != null && game.Player4Id != null)
{
resultsService.IssueWin(gameId, game.Player4Id.Value);
resultsService.IssueLose(gameId, game.Player3Id.Value);
}
}
using (<API key> unitOfWork = _context.CreateUnitOfWork())
{
Game dbGame = unitOfWork.Games.Single(x => x.Id == gameId);
dbGame.Status = CompletedGame;
unitOfWork.SaveChanges();
}
}
}
} |
export function <API key>(data) {
// we will work on the list itself (an ordered array of objects) when a
// mapping is done, we add a 'wekan' field to the object representing the
// imported member
const membersToMap = data.members;
// auto-map based on username
membersToMap.forEach(importedMember => {
const wekanUser = Users.findOne({ username: importedMember.username });
if (wekanUser) {
importedMember.wekanId = wekanUser._id;
}
});
return membersToMap;
} |
Copyright (c) 2017 Martin Schurrer
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. |
import angular from 'angular';
import uiRouter from 'angular-ui-router';
import routes from './sy.routes.js';
import ScrollYController from './sy.controller.js';
export default angular.module('app.components.basic.scroll-y', [uiRouter])
.config(routes)
.controller('ScrollYController',ScrollYController)
.name; |
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
# This file is machine-generated by lib/unicore/mktables from the Unicode
# database, Version 12.1.0. Any changes made here will be lost!
# !!!!!!! INTERNAL PERL USE ONLY !!!!!!!
# This file is for internal use by core Perl only. The format and even the
# name or existence of this file are subject to change without notice. Don't
# use it directly. Use Unicode::UCD to access the Unicode character data
# base.
return <<'END';
V10
1329
1367
1369
1417
1418
1419
1421
1424
64275
64280
END |
/* SPIFFS layout
*
* spiffs is designed for following spi flash characteristics:
* - only big areas of data (blocks) can be erased
* - erasing resets all bits in a block to ones
* - writing pulls ones to zeroes
* - zeroes cannot be pulled to ones, without erase
* - wear leveling
*
* spiffs is also meant to be run on embedded, memory constraint devices.
*
* Entire area is divided in blocks. Entire area is also divided in pages.
* Each block contains same number of pages. A page cannot be erased, but a
* block can be erased.
*
* Entire area must be block_size * x
* page_size must be block_size / (2^y) where y > 2
*
* ex: area = 1024*1024 bytes, block size = 65536 bytes, page size = 256 bytes
*
* BLOCK 0 PAGE 0 object lookup 1
* PAGE 1 object lookup 2
* ...
* PAGE n-1 object lookup n
* PAGE n object data 1
* PAGE n+1 object data 2
* ...
* PAGE n+m-1 object data m
*
* BLOCK 1 PAGE n+m object lookup 1
* PAGE n+m+1 object lookup 2
* ...
* PAGE 2n+m-1 object lookup n
* PAGE 2n+m object data 1
* PAGE 2n+m object data 2
* ...
* PAGE 2n+2m-1 object data m
* ...
*
* n is number of object lookup pages, which is number of pages needed to index all pages
* in a block by object id
* : block_size / page_size * sizeof(obj_id) / page_size
* m is number data pages, which is number of pages in block minus number of lookup pages
* : block_size / page_size - block_size / page_size * sizeof(obj_id) / page_size
* thus, n+m is total number of pages in a block
* : block_size / page_size
*
* ex: n = 65536/256*2/256 = 2, m = 65536/256 - 2 = 254 => n+m = 65536/256 = 256
*
* Object lookup pages contain object id entries. Each entry represent the corresponding
* data page.
* Assuming a 16 bit object id, an object id being 0xffff represents a free page.
* An object id being 0x0000 represents a deleted page.
*
* ex: page 0 : lookup : 0008 0001 0aaa ffff ffff ffff ffff ffff ..
* page 1 : lookup : ffff ffff ffff ffff ffff ffff ffff ffff ..
* page 2 : data : data for object id 0008
* page 3 : data : data for object id 0001
* page 4 : data : data for object id 0aaa
* ...
*
*
* Object data pages can be either object index pages or object content.
* All object data pages contains a data page header, containing object id and span index.
* The span index denotes the object page ordering amongst data pages with same object id.
* This applies to both object index pages (when index spans more than one page of entries),
* and object data pages.
* An object index page contains page entries pointing to object content page. The entry index
* in a object index page correlates to the span index in the actual object data page.
* The first object index page (span index 0) is called object index header page, and also
* contains object flags (directory/file), size, object name etc.
*
* ex:
* BLOCK 1
* PAGE 256: objectl lookup page 1
* [*123] [ 123] [ 123] [ 123]
* [ 123] [*123] [ 123] [ 123]
* [free] [free] [free] [free] ...
* PAGE 257: objectl lookup page 2
* [free] [free] [free] [free] ...
* PAGE 258: object index page (header)
* obj.id:0123 span.ix:0000 flags:INDEX
* size:1600 name:ex.txt type:file
* [259] [260] [261] [262]
* PAGE 259: object data page
* obj.id:0123 span.ix:0000 flags:DATA
* PAGE 260: object data page
* obj.id:0123 span.ix:0001 flags:DATA
* PAGE 261: object data page
* obj.id:0123 span.ix:0002 flags:DATA
* PAGE 262: object data page
* obj.id:0123 span.ix:0003 flags:DATA
* PAGE 263: object index page
* obj.id:0123 span.ix:0001 flags:INDEX
* [264] [265] [fre] [fre]
* [fre] [fre] [fre] [fre]
* PAGE 264: object data page
* obj.id:0123 span.ix:0004 flags:DATA
* PAGE 265: object data page
* obj.id:0123 span.ix:0005 flags:DATA
*
*/
#ifndef SPIFFS_NUCLEUS_H_
#define SPIFFS_NUCLEUS_H_
#define <API key> (SPIFFS_ERR_INTERNAL - 1)
#define <API key> (SPIFFS_ERR_INTERNAL - 1)
#define <API key> (SPIFFS_ERR_INTERNAL - 2)
#define <API key> (SPIFFS_ERR_INTERNAL - 3)
#define <API key> (SPIFFS_ERR_INTERNAL - 4)
#define <API key> (SPIFFS_ERR_INTERNAL - 20)
#define <API key> (SPIFFS_ERR_INTERNAL - 21)
#define SPIFFS_VIS_END (SPIFFS_ERR_INTERNAL - 22)
#define SPIFFS_EV_IX_UPD 0
#define SPIFFS_EV_IX_NEW 1
#define SPIFFS_EV_IX_DEL 2
#define <API key> (1<<(8*sizeof(spiffs_obj_id)-1))
#define <API key> (u32_t)(-1)
#define <API key> ((spiffs_obj_id)0)
#define SPIFFS_OBJ_ID_FREE ((spiffs_obj_id)-1)
#define SPIFFS_MAGIC(fs) ((spiffs_obj_id)(0x20140529 ^ <API key>(fs)))
#define SPIFFS_CONFIG_MAGIC (0x20090315)
#if SPIFFS_SINGLETON == 0
#define <API key>(fs) \
((fs)->cfg.log_page_size)
#define <API key>(fs) \
((fs)->cfg.log_block_size)
#define SPIFFS_CFG_PHYS_SZ(fs) \
((fs)->cfg.phys_size)
#define <API key>(fs) \
((fs)->cfg.phys_erase_block)
#define <API key>(fs) \
((fs)->cfg.phys_addr)
#endif
// total number of pages
#define SPIFFS_MAX_PAGES(fs) \
( SPIFFS_CFG_PHYS_SZ(fs)/<API key>(fs) )
// total number of pages per block, including object lookup pages
#define <API key>(fs) \
( <API key>(fs)/<API key>(fs) )
// number of object lookup pages per block
#define <API key>(fs) \
(MAX(1, (<API key>(fs) * sizeof(spiffs_obj_id)) / <API key>(fs)) )
// checks if page index belongs to object lookup
#define <API key>(fs,pix) \
(((pix) % <API key>(fs)) < <API key>(fs))
// number of object lookup entries in all object lookup pages
#define <API key>(fs) \
(<API key>(fs)-<API key>(fs))
// converts a block to physical address
#define <API key>(fs, block) \
( <API key>(fs) + (block)* <API key>(fs) )
// converts a object lookup entry to page index
#define <API key>(fs, block, entry) \
((block)*<API key>(fs) + (<API key>(fs) + entry))
// converts a object lookup entry to physical address of corresponding page
#define <API key>(fs, block, entry) \
(<API key>(fs, block) + (<API key>(fs) + entry) * <API key>(fs) )
// converts a page to physical address
#define <API key>(fs, page) \
( <API key>(fs) + (page) * <API key>(fs) )
// converts a physical address to page
#define <API key>(fs, addr) \
( ((addr) - <API key>(fs)) / <API key>(fs) )
// gives index in page for a physical address
#define <API key>(fs, addr) \
( ((addr) - <API key>(fs)) % <API key>(fs) )
// returns containing block for given page
#define <API key>(fs, page) \
( (page) / <API key>(fs) )
// returns starting page for block
#define <API key>(fs, block) \
( (block) * <API key>(fs) )
// converts page to entry in object lookup page
#define <API key>(fs, page) \
( (page) % <API key>(fs) - <API key>(fs) )
// returns data size in a data page
#define <API key>(fs) \
( <API key>(fs) - sizeof(spiffs_page_header) )
// returns physical address for block's erase count,
// always in the physical last entry of the last object lookup page
#define <API key>(fs, bix) \
( <API key>(fs, bix) + <API key>(fs) * <API key>(fs) - sizeof(spiffs_obj_id) )
// returns physical address for block's magic,
// always in the physical second last entry of the last object lookup page
#define SPIFFS_MAGIC_PADDR(fs, bix) \
( <API key>(fs, bix) + <API key>(fs) * <API key>(fs) - sizeof(spiffs_obj_id)*2 )
// checks if there is any room for magic in the object luts
#define <API key>(fs) \
( (<API key>(fs) % (<API key>(fs)/sizeof(spiffs_obj_id))) * sizeof(spiffs_obj_id) \
<= (<API key>(fs)-sizeof(spiffs_obj_id)*2) )
// define helpers object
// entries in an object header page index
#define <API key>(fs) \
((<API key>(fs) - sizeof(<API key>))/sizeof(spiffs_page_ix))
// entries in an object page index
#define SPIFFS_OBJ_IX_LEN(fs) \
((<API key>(fs) - sizeof(<API key>))/sizeof(spiffs_page_ix))
// object index entry for given data span index
#define SPIFFS_OBJ_IX_ENTRY(fs, spix) \
((spix) < <API key>(fs) ? (spix) : (((spix)-<API key>(fs))%SPIFFS_OBJ_IX_LEN(fs)))
// object index span index number for given data span index or entry
#define <API key>(fs, spix) \
((spix) < <API key>(fs) ? 0 : (1+((spix)-<API key>(fs))/SPIFFS_OBJ_IX_LEN(fs)))
#define SPIFFS_OP_T_OBJ_LU (0<<0)
#define SPIFFS_OP_T_OBJ_LU2 (1<<0)
#define SPIFFS_OP_T_OBJ_IX (2<<0)
#define SPIFFS_OP_T_OBJ_DA (3<<0)
#define SPIFFS_OP_C_DELE (0<<2)
#define SPIFFS_OP_C_UPDT (1<<2)
#define SPIFFS_OP_C_MOVS (2<<2)
#define SPIFFS_OP_C_MOVD (3<<2)
#define SPIFFS_OP_C_FLSH (4<<2)
#define SPIFFS_OP_C_READ (5<<2)
#define SPIFFS_OP_C_WRTHRU (6<<2)
#define SPIFFS_OP_TYPE_MASK (3<<0)
#define SPIFFS_OP_COM_MASK (7<<2)
// if 0, this page is written to, else clean
#define SPIFFS_PH_FLAG_USED (1<<0)
// if 0, writing is finalized, else under modification
#define <API key> (1<<1)
// if 0, this is an index page, else a data page
#define <API key> (1<<2)
// if 0, page is deleted, else valid
#define <API key> (1<<7)
// if 0, this index header is being deleted
#define <API key> (1<<6)
#define SPIFFS_CHECK_MOUNT(fs) \
((fs)->mounted != 0)
#define SPIFFS_CHECK_CFG(fs) \
((fs)->config_magic == SPIFFS_CONFIG_MAGIC)
#define SPIFFS_CHECK_RES(res) \
do { \
if ((res) < SPIFFS_OK) return (res); \
} while (0);
#define <API key>(fs) \
if (!SPIFFS_CHECK_MOUNT((fs))) { \
(fs)->err_code = <API key>; \
return -1; \
}
#define <API key>(fs) \
if (!SPIFFS_CHECK_CFG((fs))) { \
(fs)->err_code = <API key>; \
return -1; \
}
#define <API key>(fs, res) \
if ((res) < SPIFFS_OK) { \
(fs)->err_code = (res); \
return -1; \
}
#define <API key>(fs, res) \
if ((res) < SPIFFS_OK) { \
(fs)->err_code = (res); \
SPIFFS_UNLOCK(fs); \
return -1; \
}
#define <API key>(ph, objid, spix) \
if (((ph).flags & SPIFFS_PH_FLAG_USED) != 0) return SPIFFS_ERR_IS_FREE; \
if (((ph).flags & <API key>) == 0) return SPIFFS_ERR_DELETED; \
if (((ph).flags & <API key>) != 0) return <API key>; \
if (((ph).flags & <API key>) != 0) return <API key>; \
if (((objid) & <API key>) == 0) return <API key>; \
if ((ph).span_ix != (spix)) return <API key>;
//if ((spix) == 0 && ((ph).flags & <API key>) == 0) return SPIFFS_ERR_DELETED;
#define <API key>(ph, objid, spix) \
if (((ph).flags & SPIFFS_PH_FLAG_USED) != 0) return SPIFFS_ERR_IS_FREE; \
if (((ph).flags & <API key>) == 0) return SPIFFS_ERR_DELETED; \
if (((ph).flags & <API key>) != 0) return <API key>; \
if (((ph).flags & <API key>) == 0) return SPIFFS_ERR_IS_INDEX; \
if ((objid) & <API key>) return SPIFFS_ERR_IS_INDEX; \
if ((ph).span_ix != (spix)) return <API key>;
// check id
#define SPIFFS_VIS_CHECK_ID (1<<0)
// report argument object id to visitor - else object lookup id is reported
#define SPIFFS_VIS_CHECK_PH (1<<1)
// stop searching at end of all look up pages
#define SPIFFS_VIS_NO_WRAP (1<<2)
#if SPIFFS_CACHE
#define <API key> (1<<0)
#define <API key> (1<<1)
#define <API key> (1<<2)
#define <API key> (1<<3)
#define <API key> (1<<4)
#define <API key> (1<<7)
#define <API key>(fs) \
(sizeof(spiffs_cache_page) + <API key>(fs))
#define spiffs_get_cache(fs) \
((spiffs_cache *)((fs)->cache))
#define <API key>(fs, c, ix) \
((spiffs_cache_page *)(&((c)->cpages[(ix) * <API key>(fs)])))
#define <API key>(fs, c, ix) \
((u8_t *)(&((c)->cpages[(ix) * <API key>(fs)])) + sizeof(spiffs_cache_page))
// cache page struct
typedef struct {
// cache flags
u8_t flags;
// cache page index
u8_t ix;
// last access of this cache page
u32_t last_access;
union {
// type read cache
struct {
// read cache page index
spiffs_page_ix pix;
};
#if SPIFFS_CACHE_WR
// type write cache
struct {
// write cache
spiffs_obj_id obj_id;
// offset in cache page
u32_t offset;
// size of cache page
u16_t size;
};
#endif
};
} spiffs_cache_page;
// cache struct
typedef struct {
u8_t cpage_count;
u32_t last_access;
u32_t cpage_use_map;
u32_t cpage_use_mask;
u8_t *cpages;
} spiffs_cache;
#endif
// spiffs nucleus file descriptor
typedef struct {
// the filesystem of this descriptor
spiffs *fs;
// number of file descriptor - if 0, the file descriptor is closed
spiffs_file file_nbr;
// object id - if <API key>, the file was deleted
spiffs_obj_id obj_id;
// size of the file
u32_t size;
// cached object index header page index
spiffs_page_ix objix_hdr_pix;
// cached offset object index page index
spiffs_page_ix cursor_objix_pix;
// cached offset object index span index
spiffs_span_ix cursor_objix_spix;
// current absolute offset
u32_t offset;
// current file descriptor offset
u32_t fdoffset;
// fd flags
spiffs_flags flags;
#if SPIFFS_CACHE_WR
spiffs_cache_page *cache_page;
#endif
} spiffs_fd;
// object structs
// page header, part of each page except object lookup pages
// NB: this is always aligned when the data page is an object index,
// as in this case struct <API key> is used
typedef struct __attribute(( packed )) {
// object id
spiffs_obj_id obj_id;
// object span index
spiffs_span_ix span_ix;
// flags
u8_t flags;
} spiffs_page_header;
// object index header page header
typedef struct __attribute(( packed ))
#if <API key>
__attribute(( aligned(sizeof(spiffs_page_ix)) ))
#endif
{
// common page header
spiffs_page_header p_hdr;
// alignment
u8_t _align[4 - (sizeof(spiffs_page_header)&3)==0 ? 4 : (sizeof(spiffs_page_header)&3)];
// size of object
u32_t size;
// type of object
spiffs_obj_type type;
// alignment2
u8_t _align2[4 - (sizeof(spiffs_obj_type)&3)==0 ? 4 : (sizeof(spiffs_obj_type)&3)];
// name of object
u8_t name[SPIFFS_OBJ_NAME_LEN];
} <API key>;
// object index page header
typedef struct __attribute(( packed )) {
spiffs_page_header p_hdr;
u8_t _align[4 - (sizeof(spiffs_page_header)&3)==0 ? 4 : (sizeof(spiffs_page_header)&3)];
} <API key>;
// callback func for object lookup visitor
typedef s32_t (*spiffs_visitor_f)(spiffs *fs, spiffs_obj_id id, spiffs_block_ix bix, int ix_entry,
u32_t user_data, void *user_p);
#if SPIFFS_CACHE
#define _spiffs_rd(fs, op, fh, addr, len, dst) \
spiffs_phys_rd((fs), (op), (fh), (addr), (len), (dst))
#define _spiffs_wr(fs, op, fh, addr, len, src) \
spiffs_phys_wr((fs), (op), (fh), (addr), (len), (src))
#else
#define _spiffs_rd(fs, op, fh, addr, len, dst) \
spiffs_phys_rd((fs), (addr), (len), (dst))
#define _spiffs_wr(fs, op, fh, addr, len, src) \
spiffs_phys_wr((fs), (addr), (len), (src))
#endif
#ifndef MIN
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#endif
#ifndef MAX
#define MAX(a,b) ((a) > (b) ? (a) : (b))
#endif
s32_t spiffs_phys_rd(
spiffs *fs,
#if SPIFFS_CACHE
u8_t op,
spiffs_file fh,
#endif
u32_t addr,
u32_t len,
u8_t *dst);
s32_t spiffs_phys_wr(
spiffs *fs,
#if SPIFFS_CACHE
u8_t op,
spiffs_file fh,
#endif
u32_t addr,
u32_t len,
u8_t *src);
s32_t spiffs_phys_cpy(
spiffs *fs,
spiffs_file fh,
u32_t dst,
u32_t src,
u32_t len);
s32_t <API key>(
spiffs *fs);
s32_t <API key>(
spiffs *fs,
spiffs_block_ix starting_block,
int starting_lu_entry,
u8_t flags,
spiffs_obj_id obj_id,
spiffs_visitor_f v,
u32_t user_data,
void *user_p,
spiffs_block_ix *block_ix,
int *lu_entry);
s32_t spiffs_erase_block(
spiffs *fs,
spiffs_block_ix bix);
s32_t spiffs_obj_lu_scan(
spiffs *fs);
s32_t <API key>(
spiffs *fs,
spiffs_obj_id *obj_id,
u8_t *conflicting_name);
s32_t <API key>(
spiffs *fs,
spiffs_block_ix starting_block,
int starting_lu_entry,
spiffs_block_ix *block_ix,
int *lu_entry);
s32_t <API key>(
spiffs *fs,
spiffs_block_ix starting_block,
int starting_lu_entry,
spiffs_obj_id obj_id,
spiffs_block_ix *block_ix,
int *lu_entry);
s32_t <API key>(
spiffs *fs,
spiffs_obj_id obj_id,
spiffs_span_ix spix,
spiffs_page_ix exclusion_pix,
spiffs_page_ix *pix);
s32_t <API key>(
spiffs *fs,
spiffs_obj_id obj_id,
spiffs_span_ix spix,
spiffs_page_ix exclusion_pix,
spiffs_page_ix *pix);
s32_t <API key>(
spiffs *fs,
spiffs_obj_id obj_id,
spiffs_page_header *ph,
u8_t *data,
u32_t len,
u32_t page_offs,
u8_t finalize,
spiffs_page_ix *pix);
s32_t spiffs_page_move(
spiffs *fs,
spiffs_file fh,
u8_t *page_data,
spiffs_obj_id obj_id,
spiffs_page_header *page_hdr,
spiffs_page_ix src_pix,
spiffs_page_ix *dst_pix);
s32_t spiffs_page_delete(
spiffs *fs,
spiffs_page_ix pix);
s32_t <API key>(
spiffs *fs,
spiffs_obj_id obj_id,
u8_t name[SPIFFS_OBJ_NAME_LEN],
spiffs_obj_type type,
spiffs_page_ix *objix_hdr_pix);
s32_t <API key>(
spiffs *fs,
spiffs_fd *fd,
spiffs_obj_id obj_id,
spiffs_page_ix objix_hdr_pix,
u8_t *new_objix_hdr_data,
u8_t name[SPIFFS_OBJ_NAME_LEN],
u32_t size,
spiffs_page_ix *new_pix);
void <API key>(
spiffs *fs,
spiffs_fd *fd,
int ev,
spiffs_obj_id obj_id,
spiffs_span_ix spix,
spiffs_page_ix new_pix,
u32_t new_size);
s32_t <API key>(
spiffs *fs,
spiffs_obj_id obj_id,
spiffs_fd *f,
spiffs_flags flags,
spiffs_mode mode);
s32_t <API key>(
spiffs *fs,
spiffs_page_ix pix,
spiffs_fd *f,
spiffs_flags flags,
spiffs_mode mode);
s32_t <API key>(
spiffs_fd *fd,
u32_t offset,
u8_t *data,
u32_t len);
s32_t <API key>(
spiffs_fd *fd,
u32_t offset,
u8_t *data,
u32_t len);
s32_t spiffs_object_read(
spiffs_fd *fd,
u32_t offset,
u32_t len,
u8_t *dst);
s32_t <API key>(
spiffs_fd *fd,
u32_t new_len,
u8_t remove_object);
s32_t <API key>(
spiffs *fs,
u8_t name[SPIFFS_OBJ_NAME_LEN],
spiffs_page_ix *pix);
s32_t spiffs_gc_check(
spiffs *fs,
u32_t len);
s32_t <API key>(
spiffs *fs,
spiffs_block_ix bix);
s32_t <API key>(
spiffs *fs,
spiffs_block_ix **block_candidate,
int *candidate_count);
s32_t spiffs_gc_clean(
spiffs *fs,
spiffs_block_ix bix);
s32_t spiffs_gc_quick(
spiffs *fs);
s32_t spiffs_fd_find_new(
spiffs *fs,
spiffs_fd **fd);
s32_t spiffs_fd_return(
spiffs *fs,
spiffs_file f);
s32_t spiffs_fd_get(
spiffs *fs,
spiffs_file f,
spiffs_fd **fd);
#if SPIFFS_CACHE
void spiffs_cache_init(
spiffs *fs);
void <API key>(
spiffs *fs,
spiffs_page_ix pix);
#if SPIFFS_CACHE_WR
spiffs_cache_page *<API key>(
spiffs *fs,
spiffs_fd *fd);
void <API key>(
spiffs *fs,
spiffs_cache_page *cp);
spiffs_cache_page *<API key>(
spiffs *fs,
spiffs_fd *fd);
#endif
#endif
s32_t <API key>(
spiffs *fs,
u8_t check_all_objects);
s32_t <API key>(
spiffs *fs);
s32_t <API key>(
spiffs *fs);
#endif /* SPIFFS_NUCLEUS_H_ */ |
'use strict';
(function (factory) {
if (typeof module === 'object' && module.exports) {
factory['default'] = factory;
module.exports = factory;
} else if (typeof define === 'function' && define.amd) {
define('highcharts/indicators/chaikin', ['highcharts', 'highcharts/modules/stock'], function (Highcharts) {
factory(Highcharts);
factory.Highcharts = Highcharts;
return factory;
});
} else {
factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
var _modules = Highcharts ? Highcharts._modules : {};
function _registerModule(obj, path, args, fn) {
if (!obj.hasOwnProperty(path)) {
obj[path] = fn.apply(null, args);
}
}
_registerModule(_modules, 'Stock/Indicators/AD/ADIndicator.js', [_modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (SeriesRegistry, U) {
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d,
b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d,
b) { d.__proto__ = b; }) ||
function (d,
b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var SMAIndicator = SeriesRegistry.seriesTypes.sma;
var error = U.error,
extend = U.extend,
merge = U.merge;
/**
* The AD series type.
*
* @private
* @class
* @name Highcharts.seriesTypes.ad
*
* @augments Highcharts.Series
*/
var ADIndicator = /** @class */ (function (_super) {
__extends(ADIndicator, _super);
function ADIndicator() {
/* *
*
* Static Properties
*
* */
var _this = _super !== null && _super.apply(this,
arguments) || this;
/* *
*
* Properties
*
* */
_this.data = void 0;
_this.options = void 0;
_this.points = void 0;
return _this;
}
/* *
*
* Static Functions
*
* */
ADIndicator.populateAverage = function (xVal, yVal, yValVolume, i, _period) {
var high = yVal[i][1],
low = yVal[i][2],
close = yVal[i][3],
volume = yValVolume[i],
adY = close === high && close === low || high === low ?
0 :
((2 * close - low - high) / (high - low)) * volume,
adX = xVal[i];
return [adX, adY];
};
/* *
*
* Functions
*
* */
ADIndicator.prototype.getValues = function (series, params) {
var period = params.period,
xVal = series.xData,
yVal = series.yData,
volumeSeriesID = params.volumeSeriesID,
volumeSeries = series.chart.get(volumeSeriesID),
yValVolume = volumeSeries && volumeSeries.yData,
yValLen = yVal ? yVal.length : 0,
AD = [],
xData = [],
yData = [],
len,
i,
ADPoint;
if (xVal.length <= period &&
yValLen &&
yVal[0].length !== 4) {
return;
}
if (!volumeSeries) {
error('Series ' +
volumeSeriesID +
' not found! Check `volumeSeriesID`.', true, series.chart);
return;
}
// i = period <-- skip first N-points
// Calculate value one-by-one for each period in visible data
for (i = period; i < yValLen; i++) {
len = AD.length;
ADPoint = ADIndicator.populateAverage(xVal, yVal, yValVolume, i, period);
if (len > 0) {
ADPoint[1] += AD[len - 1][1];
}
AD.push(ADPoint);
xData.push(ADPoint[0]);
yData.push(ADPoint[1]);
}
return {
values: AD,
xData: xData,
yData: yData
};
};
/**
* Accumulation Distribution (AD). This series requires `linkedTo` option to
* be set.
*
* @sample stock/indicators/<API key>
* Accumulation/Distribution indicator
*
* @extends plotOptions.sma
* @since 6.0.0
* @product highstock
* @requires stock/indicators/indicators
* @requires stock/indicators/<API key>
* @optionparent plotOptions.ad
*/
ADIndicator.defaultOptions = merge(SMAIndicator.defaultOptions, {
/**
* @excluding index
*/
params: {
index: void 0,
/**
* The id of volume series which is mandatory.
* For example using OHLC data, volumeSeriesID='volume' means
* the indicator will be calculated using OHLC and volume values.
*
* @since 6.0.0
*/
volumeSeriesID: 'volume'
}
});
return ADIndicator;
}(SMAIndicator));
extend(ADIndicator.prototype, {
nameComponents: false,
nameBase: 'Accumulation/Distribution'
});
SeriesRegistry.registerSeriesType('ad', ADIndicator);
/* *
*
* Default Export
*
* */
/* *
*
* API Options
*
* */
/**
* A `AD` series. If the [type](#series.ad.type) option is not
* specified, it is inherited from [chart.type](#chart.type).
*
* @extends series,plotOptions.ad
* @since 6.0.0
* @excluding dataParser, dataURL
* @product highstock
* @requires stock/indicators/indicators
* @requires stock/indicators/<API key>
* @apioption series.ad
*/
''; // add doclet above to transpiled file
return ADIndicator;
});
_registerModule(_modules, 'Stock/Indicators/Chaikin/ChaikinIndicator.js', [_modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (SeriesRegistry, U) {
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d,
b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d,
b) { d.__proto__ = b; }) ||
function (d,
b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var _a = SeriesRegistry.seriesTypes,
AD = _a.ad,
EMAIndicator = _a.ema;
var correctFloat = U.correctFloat,
extend = U.extend,
merge = U.merge,
error = U.error;
/* *
*
* Class
*
* */
/**
* The Chaikin series type.
*
* @private
* @class
* @name Highcharts.seriesTypes.chaikin
*
* @augments Highcharts.Series
*/
var ChaikinIndicator = /** @class */ (function (_super) {
__extends(ChaikinIndicator, _super);
function ChaikinIndicator() {
/* *
*
* Static Properties
*
* */
var _this = _super !== null && _super.apply(this,
arguments) || this;
/* *
*
* Properties
*
* */
_this.data = void 0;
_this.options = void 0;
_this.points = void 0;
return _this;
}
/* *
*
* Functions
*
* */
ChaikinIndicator.prototype.getValues = function (series, params) {
var periods = params.periods,
period = params.period,
// Accumulation Distribution Line data
ADL,
// 0- date, 1- Chaikin Oscillator
CHA = [],
xData = [],
yData = [],
periodsOffset,
// Shorter Period EMA
SPE,
// Longer Period EMA
LPE,
oscillator,
i;
// Check if periods are correct
if (periods.length !== 2 || periods[1] <= periods[0]) {
error('Error: "Chaikin requires two periods. Notice, first ' +
'period should be lower than the second one."');
return;
}
ADL = AD.prototype.getValues.call(this, series, {
volumeSeriesID: params.volumeSeriesID,
period: period
});
// Check if adl is calculated properly, if not skip
if (!ADL) {
return;
}
SPE = EMAIndicator.prototype.getValues.call(this, ADL, {
period: periods[0]
});
LPE = EMAIndicator.prototype.getValues.call(this, ADL, {
period: periods[1]
});
// Check if ema is calculated properly, if not skip
if (!SPE || !LPE) {
return;
}
periodsOffset = periods[1] - periods[0];
for (i = 0; i < LPE.yData.length; i++) {
oscillator = correctFloat(SPE.yData[i + periodsOffset] -
LPE.yData[i]);
CHA.push([LPE.xData[i], oscillator]);
xData.push(LPE.xData[i]);
yData.push(oscillator);
}
return {
values: CHA,
xData: xData,
yData: yData
};
};
/**
* Chaikin Oscillator. This series requires the `linkedTo` option to
* be set and should be loaded after the `stock/indicators/indicators.js`.
*
* @sample {highstock} stock/indicators/chaikin
* Chaikin Oscillator
*
* @extends plotOptions.ema
* @since 7.0.0
* @product highstock
* @excluding allAreas, colorAxis, joinBy, keys, navigatorOptions,
* pointInterval, pointIntervalUnit, pointPlacement,
* pointRange, pointStart, showInNavigator, stacking
* @requires stock/indicators/indicators
* @requires stock/indicators/chaikin
* @optionparent plotOptions.chaikin
*/
ChaikinIndicator.defaultOptions = merge(EMAIndicator.defaultOptions, {
/**
* Paramters used in calculation of Chaikin Oscillator
* series points.
*
* @excluding index
*/
params: {
index: void 0,
/**
* The id of volume series which is mandatory.
* For example using OHLC data, volumeSeriesID='volume' means
* the indicator will be calculated using OHLC and volume values.
*/
volumeSeriesID: 'volume',
/**
* Parameter used indirectly for calculating the `AD` indicator.
* Decides about the number of data points that are taken
* into account for the indicator calculations.
*/
period: 9,
/**
* Periods for Chaikin Oscillator calculations.
*
* @type {Array<number>}
* @default [3, 10]
*/
periods: [3, 10]
}
});
return ChaikinIndicator;
}(EMAIndicator));
extend(ChaikinIndicator.prototype, {
nameBase: 'Chaikin Osc',
nameComponents: ['periods']
});
SeriesRegistry.registerSeriesType('chaikin', ChaikinIndicator);
/* *
*
* Default Export
*
* */
/**
* A `Chaikin Oscillator` series. If the [type](#series.chaikin.type)
* option is not specified, it is inherited from [chart.type](#chart.type).
*
* @extends series,plotOptions.chaikin
* @since 7.0.0
* @product highstock
* @excluding allAreas, colorAxis, dataParser, dataURL, joinBy, keys,
* navigatorOptions, pointInterval, pointIntervalUnit,
* pointPlacement, pointRange, pointStart, stacking, showInNavigator
* @requires stock/indicators/indicators
* @requires stock/indicators/chaikin
* @apioption series.chaikin
*/
''; // to include the above in the js output
return ChaikinIndicator;
});
_registerModule(_modules, 'masters/indicators/chaikin.src.js', [], function () {
});
})); |
(function(window, document, undefined) {
'use strict';
// Source: module.js
angular.module('mgcrea.ngStrap', [
'mgcrea.ngStrap.modal',
'mgcrea.ngStrap.aside',
'mgcrea.ngStrap.alert',
'mgcrea.ngStrap.button',
'mgcrea.ngStrap.select',
'mgcrea.ngStrap.datepicker',
'mgcrea.ngStrap.timepicker',
'mgcrea.ngStrap.navbar',
'mgcrea.ngStrap.tooltip',
'mgcrea.ngStrap.popover',
'mgcrea.ngStrap.dropdown',
'mgcrea.ngStrap.typeahead',
'mgcrea.ngStrap.scrollspy',
'mgcrea.ngStrap.affix',
'mgcrea.ngStrap.tab'
]);
// Source: affix.js
angular.module('mgcrea.ngStrap.affix', [
'mgcrea.ngStrap.helpers.dimensions',
'mgcrea.ngStrap.helpers.debounce'
]).provider('$affix', function () {
var defaults = this.defaults = { offsetTop: 'auto' };
this.$get = [
'$window',
'debounce',
'dimensions',
function ($window, debounce, dimensions) {
var bodyEl = angular.element($window.document.body);
var windowEl = angular.element($window);
function AffixFactory(element, config) {
var $affix = {};
// Common vars
var options = angular.extend({}, defaults, config);
var targetEl = options.target;
// Initial private vars
var reset = 'affix affix-top affix-bottom', initialAffixTop = 0, initialOffsetTop = 0, offsetTop = 0, offsetBottom = 0, affixed = null, unpin = null;
var parent = element.parent();
// Options: custom parent
if (options.offsetParent) {
if (options.offsetParent.match(/^\d+$/)) {
for (var i = 0; i < options.offsetParent * 1 - 1; i++) {
parent = parent.parent();
}
} else {
parent = angular.element(options.offsetParent);
}
}
$affix.init = function () {
$affix.$parseOffsets();
initialOffsetTop = dimensions.offset(element[0]).top + initialAffixTop;
// Bind events
targetEl.on('scroll', $affix.checkPosition);
targetEl.on('click', $affix.<API key>);
windowEl.on('resize', $affix.$debouncedOnResize);
// Both of these checkPosition() calls are necessary for the case where
// the user hits refresh after scrolling to the bottom of the page.
$affix.checkPosition();
$affix.<API key>();
};
$affix.destroy = function () {
// Unbind events
targetEl.off('scroll', $affix.checkPosition);
targetEl.off('click', $affix.<API key>);
windowEl.off('resize', $affix.$debouncedOnResize);
};
$affix.<API key> = function () {
setTimeout($affix.checkPosition, 1);
};
$affix.checkPosition = function () {
// if (!this.$element.is(':visible')) return
var scrollTop = getScrollTop();
var position = dimensions.offset(element[0]);
var elementHeight = dimensions.height(element[0]);
// Get required affix class according to position
var affix = <API key>(unpin, position, elementHeight);
// Did affix status changed this last check?
if (affixed === affix)
return;
affixed = affix;
// Add proper affix class
element.removeClass(reset).addClass('affix' + (affix !== 'middle' ? '-' + affix : ''));
if (affix === 'top') {
unpin = null;
element.css('position', options.offsetParent ? '' : 'relative');
element.css('top', '');
} else if (affix === 'bottom') {
if (options.offsetUnpin) {
unpin = -(options.offsetUnpin * 1);
} else {
// Calculate unpin threshold when affixed to bottom.
// Hopefully the browser scrolls pixel by pixel.
unpin = position.top - scrollTop;
}
element.css('position', options.offsetParent ? '' : 'relative');
element.css('top', options.offsetParent ? '' : bodyEl[0].offsetHeight - offsetBottom - elementHeight - initialOffsetTop + 'px');
} else {
unpin = null;
element.css('position', 'fixed');
element.css('top', initialAffixTop + 'px');
}
};
$affix.$onResize = function () {
$affix.$parseOffsets();
$affix.checkPosition();
};
$affix.$debouncedOnResize = debounce($affix.$onResize, 50);
$affix.$parseOffsets = function () {
// Reset position to calculate correct offsetTop
element.css('position', options.offsetParent ? '' : 'relative');
if (options.offsetTop) {
if (options.offsetTop === 'auto') {
options.offsetTop = '+0';
}
if (options.offsetTop.match(/^[-+]\d+$/)) {
initialAffixTop = -options.offsetTop * 1;
if (options.offsetParent) {
offsetTop = dimensions.offset(parent[0]).top + options.offsetTop * 1;
} else {
offsetTop = dimensions.offset(element[0]).top - dimensions.css(element[0], 'marginTop', true) + options.offsetTop * 1;
}
} else {
offsetTop = options.offsetTop * 1;
}
}
if (options.offsetBottom) {
if (options.offsetParent && options.offsetBottom.match(/^[-+]\d+$/)) {
// add 1 pixel due to rounding problems...
offsetBottom = getScrollHeight() - (dimensions.offset(parent[0]).top + dimensions.height(parent[0])) + options.offsetBottom * 1 + 1;
} else {
offsetBottom = options.offsetBottom * 1;
}
}
};
// Private methods
function <API key>(unpin, position, elementHeight) {
var scrollTop = getScrollTop();
var scrollHeight = getScrollHeight();
if (scrollTop <= offsetTop) {
return 'top';
} else if (unpin !== null && scrollTop + unpin <= position.top) {
return 'middle';
} else if (offsetBottom !== null && position.top + elementHeight + initialAffixTop >= scrollHeight - offsetBottom) {
return 'bottom';
} else {
return 'middle';
}
}
function getScrollTop() {
return targetEl[0] === $window ? $window.pageYOffset : targetEl[0] === $window;
}
function getScrollHeight() {
return targetEl[0] === $window ? $window.document.body.scrollHeight : targetEl[0].scrollHeight;
}
$affix.init();
return $affix;
}
return AffixFactory;
}
];
}).directive('bsAffix', [
'$affix',
'$window',
function ($affix, $window) {
return {
restrict: 'EAC',
require: '^?bsAffixTarget',
link: function postLink(scope, element, attr, affixTarget) {
var options = {
scope: scope,
offsetTop: 'auto',
target: affixTarget ? affixTarget.$element : angular.element($window)
};
angular.forEach([
'offsetTop',
'offsetBottom',
'offsetParent',
'offsetUnpin'
], function (key) {
if (angular.isDefined(attr[key]))
options[key] = attr[key];
});
var affix = $affix(element, options);
scope.$on('$destroy', function () {
options = null;
affix = null;
});
}
};
}
]).directive('bsAffixTarget', function () {
return {
controller: [
'$element',
function ($element) {
this.$element = $element;
}
]
};
});
// Source: alert.js
// @BUG: following snippet won't compile correctly
// @TODO: submit issue to core
// '<span ng-if="title"><strong ng-bind="title"></strong> </span><span ng-bind-html="content"></span>' +
angular.module('mgcrea.ngStrap.alert', ['mgcrea.ngStrap.modal']).provider('$alert', function () {
var defaults = this.defaults = {
animation: 'am-fade',
prefixClass: 'alert',
placement: null,
template: 'alert/alert.tpl.html',
container: false,
element: null,
backdrop: false,
keyboard: true,
show: true,
duration: false,
type: false,
dismissable: true
};
this.$get = [
'$modal',
'$timeout',
function ($modal, $timeout) {
function AlertFactory(config) {
var $alert = {};
// Common vars
var options = angular.extend({}, defaults, config);
$alert = $modal(options);
// Support scope as string options [/*title, content, */ type, dismissable]
$alert.$scope.dismissable = !!options.dismissable;
if (options.type) {
$alert.$scope.type = options.type;
}
// Support auto-close duration
var show = $alert.show;
if (options.duration) {
$alert.show = function () {
show();
$timeout(function () {
$alert.hide();
}, options.duration * 1000);
};
}
return $alert;
}
return AlertFactory;
}
];
}).directive('bsAlert', [
'$window',
'$location',
'$sce',
'$alert',
function ($window, $location, $sce, $alert) {
var <API key> = $window.<API key> || $window.setTimeout;
return {
restrict: 'EAC',
scope: true,
link: function postLink(scope, element, attr, transclusion) {
// Directive options
var options = {
scope: scope,
element: element,
show: false
};
angular.forEach([
'template',
'placement',
'keyboard',
'html',
'container',
'animation',
'duration',
'dismissable'
], function (key) {
if (angular.isDefined(attr[key]))
options[key] = attr[key];
});
// Support scope as data-attrs
angular.forEach([
'title',
'content',
'type'
], function (key) {
attr[key] && attr.$observe(key, function (newValue, oldValue) {
scope[key] = $sce.trustAsHtml(newValue);
});
});
// Support scope as an object
attr.bsAlert && scope.$watch(attr.bsAlert, function (newValue, oldValue) {
if (angular.isObject(newValue)) {
angular.extend(scope, newValue);
} else {
scope.content = newValue;
}
}, true);
// Initialize alert
var alert = $alert(options);
// Trigger
element.on(attr.trigger || 'click', alert.toggle);
// Garbage collection
scope.$on('$destroy', function () {
alert.destroy();
options = null;
alert = null;
});
}
};
}
]);
// Source: button.js
angular.module('mgcrea.ngStrap.button', []).provider('$button', function () {
var defaults = this.defaults = {
activeClass: 'active',
toggleEvent: 'click'
};
this.$get = function () {
return { defaults: defaults };
};
}).directive('bsCheckboxGroup', function () {
return {
restrict: 'A',
require: 'ngModel',
compile: function postLink(element, attr) {
element.attr('data-toggle', 'buttons');
element.removeAttr('ng-model');
var children = element[0].querySelectorAll('input[type="checkbox"]');
angular.forEach(children, function (child) {
var childEl = angular.element(child);
childEl.attr('bs-checkbox', '');
childEl.attr('ng-model', attr.ngModel + '.' + childEl.attr('value'));
});
}
};
}).directive('bsCheckbox', [
'$button',
'$$rAF',
function ($button, $$rAF) {
var defaults = $button.defaults;
var constantValueRegExp = /^(true|false|\d+)$/;
return {
restrict: 'A',
require: 'ngModel',
link: function postLink(scope, element, attr, controller) {
var options = defaults;
// Support label > input[type="checkbox"]
var isInput = element[0].nodeName === 'INPUT';
var activeElement = isInput ? element.parent() : element;
var trueValue = angular.isDefined(attr.trueValue) ? attr.trueValue : true;
if (constantValueRegExp.test(attr.trueValue)) {
trueValue = scope.$eval(attr.trueValue);
}
var falseValue = angular.isDefined(attr.falseValue) ? attr.falseValue : false;
if (constantValueRegExp.test(attr.falseValue)) {
falseValue = scope.$eval(attr.falseValue);
}
// Parse exotic values
var hasExoticValues = typeof trueValue !== 'boolean' || typeof falseValue !== 'boolean';
if (hasExoticValues) {
controller.$parsers.push(function (viewValue) {
// console.warn('$parser', element.attr('ng-model'), 'viewValue', viewValue);
return viewValue ? trueValue : falseValue;
});
// Fix rendering for exotic values
scope.$watch(attr.ngModel, function (newValue, oldValue) {
controller.$render();
});
}
// model -> view
controller.$render = function () {
// console.warn('$render', element.attr('ng-model'), 'controller.$modelValue', typeof controller.$modelValue, controller.$modelValue, 'controller.$viewValue', typeof controller.$viewValue, controller.$viewValue);
var isActive = angular.equals(controller.$modelValue, trueValue);
$$rAF(function () {
if (isInput)
element[0].checked = isActive;
activeElement.toggleClass(options.activeClass, isActive);
});
};
// view -> model
element.bind(options.toggleEvent, function () {
scope.$apply(function () {
// console.warn('!click', element.attr('ng-model'), 'controller.$viewValue', typeof controller.$viewValue, controller.$viewValue, 'controller.$modelValue', typeof controller.$modelValue, controller.$modelValue);
if (!isInput) {
controller.$setViewValue(!activeElement.hasClass('active'));
}
if (!hasExoticValues) {
controller.$render();
}
});
});
}
};
}
]).directive('bsRadioGroup', function () {
return {
restrict: 'A',
require: 'ngModel',
compile: function postLink(element, attr) {
element.attr('data-toggle', 'buttons');
element.removeAttr('ng-model');
var children = element[0].querySelectorAll('input[type="radio"]');
angular.forEach(children, function (child) {
angular.element(child).attr('bs-radio', '');
angular.element(child).attr('ng-model', attr.ngModel);
});
}
};
}).directive('bsRadio', [
'$button',
'$$rAF',
function ($button, $$rAF) {
var defaults = $button.defaults;
var constantValueRegExp = /^(true|false|\d+)$/;
return {
restrict: 'A',
require: 'ngModel',
link: function postLink(scope, element, attr, controller) {
var options = defaults;
// Support `label > input[type="radio"]` markup
var isInput = element[0].nodeName === 'INPUT';
var activeElement = isInput ? element.parent() : element;
var value = constantValueRegExp.test(attr.value) ? scope.$eval(attr.value) : attr.value;
// model -> view
controller.$render = function () {
// console.warn('$render', element.attr('value'), 'controller.$modelValue', typeof controller.$modelValue, controller.$modelValue, 'controller.$viewValue', typeof controller.$viewValue, controller.$viewValue);
var isActive = angular.equals(controller.$modelValue, value);
$$rAF(function () {
if (isInput)
element[0].checked = isActive;
activeElement.toggleClass(options.activeClass, isActive);
});
};
// view -> model
element.bind(options.toggleEvent, function () {
scope.$apply(function () {
// console.warn('!click', element.attr('value'), 'controller.$viewValue', typeof controller.$viewValue, controller.$viewValue, 'controller.$modelValue', typeof controller.$modelValue, controller.$modelValue);
controller.$setViewValue(value);
controller.$render();
});
});
}
};
}
]);
// Source: aside.js
angular.module('mgcrea.ngStrap.aside', ['mgcrea.ngStrap.modal']).provider('$aside', function () {
var defaults = this.defaults = {
animation: '<API key>',
prefixClass: 'aside',
placement: 'right',
template: 'aside/aside.tpl.html',
contentTemplate: false,
container: false,
element: null,
backdrop: true,
keyboard: true,
html: false,
show: true
};
this.$get = [
'$modal',
function ($modal) {
function AsideFactory(config) {
var $aside = {};
// Common vars
var options = angular.extend({}, defaults, config);
$aside = $modal(options);
return $aside;
}
return AsideFactory;
}
];
}).directive('bsAside', [
'$window',
'$sce',
'$aside',
function ($window, $sce, $aside) {
var <API key> = $window.<API key> || $window.setTimeout;
return {
restrict: 'EAC',
scope: true,
link: function postLink(scope, element, attr, transclusion) {
// Directive options
var options = {
scope: scope,
element: element,
show: false
};
angular.forEach([
'template',
'contentTemplate',
'placement',
'backdrop',
'keyboard',
'html',
'container',
'animation'
], function (key) {
if (angular.isDefined(attr[key]))
options[key] = attr[key];
});
// Support scope as data-attrs
angular.forEach([
'title',
'content'
], function (key) {
attr[key] && attr.$observe(key, function (newValue, oldValue) {
scope[key] = $sce.trustAsHtml(newValue);
});
});
// Support scope as an object
attr.bsAside && scope.$watch(attr.bsAside, function (newValue, oldValue) {
if (angular.isObject(newValue)) {
angular.extend(scope, newValue);
} else {
scope.content = newValue;
}
}, true);
// Initialize aside
var aside = $aside(options);
// Trigger
element.on(attr.trigger || 'click', aside.toggle);
// Garbage collection
scope.$on('$destroy', function () {
aside.destroy();
options = null;
aside = null;
});
}
};
}
]);
// Source: datepicker.js
angular.module('mgcrea.ngStrap.datepicker', [
'mgcrea.ngStrap.helpers.dateParser',
'mgcrea.ngStrap.tooltip'
]).provider('$datepicker', function () {
var defaults = this.defaults = {
animation: 'am-fade',
prefixClass: 'datepicker',
placement: 'bottom-left',
template: 'datepicker/datepicker.tpl.html',
trigger: 'focus',
container: false,
keyboard: true,
html: false,
delay: 0,
useNative: false,
dateType: 'date',
dateFormat: 'shortDate',
modelDateFormat: null,
dayFormat: 'dd',
strictFormat: false,
autoclose: false,
minDate: -Infinity,
maxDate: +Infinity,
startView: 0,
minView: 0,
startWeek: 0,
iconLeft: 'glyphicon <API key>',
iconRight: 'glyphicon <API key>'
};
this.$get = [
'$window',
'$document',
'$rootScope',
'$sce',
'$locale',
'dateFilter',
'datepickerViews',
'$tooltip',
function ($window, $document, $rootScope, $sce, $locale, dateFilter, datepickerViews, $tooltip) {
var bodyEl = angular.element($window.document.body);
var isTouch = 'createTouch' in $window.document;
var isNative = /(ip(a|o)d|iphone|android)/gi.test($window.navigator.userAgent);
if (!defaults.lang)
defaults.lang = $locale.id;
function DatepickerFactory(element, controller, config) {
var $datepicker = $tooltip(element, angular.extend({}, defaults, config));
var parentScope = config.scope;
var options = $datepicker.$options;
var scope = $datepicker.$scope;
if (options.startView)
options.startView -= options.minView;
// View vars
var pickerViews = datepickerViews($datepicker);
$datepicker.$views = pickerViews.views;
var viewDate = pickerViews.viewDate;
scope.$mode = options.startView;
scope.$iconLeft = options.iconLeft;
scope.$iconRight = options.iconRight;
var $picker = $datepicker.$views[scope.$mode];
// Scope methods
scope.$select = function (date) {
$datepicker.select(date);
};
scope.$selectPane = function (value) {
$datepicker.$selectPane(value);
};
scope.$toggleMode = function () {
$datepicker.setMode((scope.$mode + 1) % $datepicker.$views.length);
};
// Public methods
$datepicker.update = function (date) {
// console.warn('$datepicker.update() newValue=%o', date);
if (angular.isDate(date) && !isNaN(date.getTime())) {
$datepicker.$date = date;
$picker.update.call($picker, date);
}
// Build only if pristine
$datepicker.$build(true);
};
$datepicker.select = function (date, keep) {
// console.warn('$datepicker.select', date, scope.$mode);
if (!angular.isDate(controller.$dateValue))
controller.$dateValue = new Date(date);
controller.$dateValue.setFullYear(date.getFullYear(), date.getMonth(), date.getDate());
if (!scope.$mode || keep) {
controller.$setViewValue(controller.$dateValue);
controller.$render();
if (options.autoclose && !keep) {
$datepicker.hide(true);
}
} else {
angular.extend(viewDate, {
year: date.getFullYear(),
month: date.getMonth(),
date: date.getDate()
});
$datepicker.setMode(scope.$mode - 1);
$datepicker.$build();
}
};
$datepicker.setMode = function (mode) {
// console.warn('$datepicker.setMode', mode);
scope.$mode = mode;
$picker = $datepicker.$views[scope.$mode];
$datepicker.$build();
};
// Protected methods
$datepicker.$build = function (pristine) {
// console.warn('$datepicker.$build() viewDate=%o', viewDate);
if (pristine === true && $picker.built)
return;
if (pristine === false && !$picker.built)
return;
$picker.build.call($picker);
};
$datepicker.$updateSelected = function () {
for (var i = 0, l = scope.rows.length; i < l; i++) {
angular.forEach(scope.rows[i], updateSelected);
}
};
$datepicker.$isSelected = function (date) {
return $picker.isSelected(date);
};
$datepicker.$selectPane = function (value) {
var steps = $picker.steps;
var targetDate = new Date(Date.UTC(viewDate.year + (steps.year || 0) * value, viewDate.month + (steps.month || 0) * value, viewDate.date + (steps.day || 0) * value));
angular.extend(viewDate, {
year: targetDate.getUTCFullYear(),
month: targetDate.getUTCMonth(),
date: targetDate.getUTCDate()
});
$datepicker.$build();
};
$datepicker.$onMouseDown = function (evt) {
// Prevent blur on mousedown on .dropdown-menu
evt.preventDefault();
evt.stopPropagation();
// Emulate click for mobile devices
if (isTouch) {
var targetEl = angular.element(evt.target);
if (targetEl[0].nodeName.toLowerCase() !== 'button') {
targetEl = targetEl.parent();
}
targetEl.triggerHandler('click');
}
};
$datepicker.$onKeyDown = function (evt) {
if (!/(38|37|39|40|13)/.test(evt.keyCode) || evt.shiftKey || evt.altKey)
return;
evt.preventDefault();
evt.stopPropagation();
if (evt.keyCode === 13) {
if (!scope.$mode) {
return $datepicker.hide(true);
} else {
return scope.$apply(function () {
$datepicker.setMode(scope.$mode - 1);
});
}
}
// Navigate with keyboard
$picker.onKeyDown(evt);
parentScope.$digest();
};
// Private
function updateSelected(el) {
el.selected = $datepicker.$isSelected(el.date);
}
function focusElement() {
element[0].focus();
}
// Overrides
var _init = $datepicker.init;
$datepicker.init = function () {
if (isNative && options.useNative) {
element.prop('type', 'date');
element.css('-webkit-appearance', 'textfield');
return;
} else if (isTouch) {
element.prop('type', 'text');
element.attr('readonly', 'true');
element.on('click', focusElement);
}
_init();
};
var _destroy = $datepicker.destroy;
$datepicker.destroy = function () {
if (isNative && options.useNative) {
element.off('click', focusElement);
}
_destroy();
};
var _show = $datepicker.show;
$datepicker.show = function () {
_show();
setTimeout(function () {
$datepicker.$element.on(isTouch ? 'touchstart' : 'mousedown', $datepicker.$onMouseDown);
if (options.keyboard) {
element.on('keydown', $datepicker.$onKeyDown);
}
});
};
var _hide = $datepicker.hide;
$datepicker.hide = function (blur) {
$datepicker.$element.off(isTouch ? 'touchstart' : 'mousedown', $datepicker.$onMouseDown);
if (options.keyboard) {
element.off('keydown', $datepicker.$onKeyDown);
}
_hide(blur);
};
return $datepicker;
}
DatepickerFactory.defaults = defaults;
return DatepickerFactory;
}
];
}).directive('bsDatepicker', [
'$window',
'$parse',
'$q',
'$locale',
'dateFilter',
'$datepicker',
'$dateParser',
'$timeout',
function ($window, $parse, $q, $locale, dateFilter, $datepicker, $dateParser, $timeout) {
var defaults = $datepicker.defaults;
var isNative = /(ip(a|o)d|iphone|android)/gi.test($window.navigator.userAgent);
var isNumeric = function (n) {
return !isNaN(parseFloat(n)) && isFinite(n);
};
return {
restrict: 'EAC',
require: 'ngModel',
link: function postLink(scope, element, attr, controller) {
// Directive options
var options = {
scope: scope,
controller: controller
};
angular.forEach([
'placement',
'container',
'delay',
'trigger',
'keyboard',
'html',
'animation',
'template',
'autoclose',
'dateType',
'dateFormat',
'modelDateFormat',
'dayFormat',
'strictFormat',
'startWeek',
'useNative',
'lang',
'startView',
'minView'
], function (key) {
if (angular.isDefined(attr[key]))
options[key] = attr[key];
});
// Initialize datepicker
if (isNative && options.useNative)
options.dateFormat = 'yyyy-MM-dd';
var datepicker = $datepicker(element, controller, options);
options = datepicker.$options;
// Observe attributes for changes
angular.forEach([
'minDate',
'maxDate'
], function (key) {
// console.warn('attr.$observe(%s)', key, attr[key]);
angular.isDefined(attr[key]) && attr.$observe(key, function (newValue) {
// console.warn('attr.$observe(%s)=%o', key, newValue);
if (newValue === 'today') {
var today = new Date();
datepicker.$options[key] = +new Date(today.getFullYear(), today.getMonth(), today.getDate() + (key === 'maxDate' ? 1 : 0), 0, 0, 0, key === 'minDate' ? 0 : -1);
} else if (angular.isString(newValue) && newValue.match(/^".+"$/)) {
// Support {{ dateObj }}
datepicker.$options[key] = +new Date(newValue.substr(1, newValue.length - 2));
} else if (isNumeric(newValue)) {
datepicker.$options[key] = +new Date(parseInt(newValue, 10));
} else {
datepicker.$options[key] = +new Date(newValue);
}
// Build only if dirty
!isNaN(datepicker.$options[key]) && datepicker.$build(false);
});
});
// Watch model for changes
scope.$watch(attr.ngModel, function (newValue, oldValue) {
datepicker.update(controller.$dateValue);
}, true);
var dateParser = $dateParser({
format: options.dateFormat,
lang: options.lang,
strict: options.strictFormat
});
// viewValue -> $parsers -> modelValue
controller.$parsers.unshift(function (viewValue) {
// console.warn('$parser("%s"): viewValue=%o', element.attr('ng-model'), viewValue);
// Null values should correctly reset the model value & validity
if (!viewValue) {
controller.$setValidity('date', true);
return;
}
var parsedDate = dateParser.parse(viewValue, controller.$dateValue);
if (!parsedDate || isNaN(parsedDate.getTime())) {
controller.$setValidity('date', false);
return;
} else {
var isMinValid = isNaN(datepicker.$options.minDate) || parsedDate.getTime() >= datepicker.$options.minDate;
var isMaxValid = isNaN(datepicker.$options.maxDate) || parsedDate.getTime() <= datepicker.$options.maxDate;
var isValid = isMinValid && isMaxValid;
controller.$setValidity('date', isValid);
controller.$setValidity('min', isMinValid);
controller.$setValidity('max', isMaxValid);
// Only update the model when we have a valid date
if (isValid)
controller.$dateValue = parsedDate;
}
if (options.dateType === 'string') {
return dateFilter(parsedDate, options.modelDateFormat || options.dateFormat);
} else if (options.dateType === 'number') {
return controller.$dateValue.getTime();
} else if (options.dateType === 'iso') {
return controller.$dateValue.toISOString();
} else {
return new Date(controller.$dateValue);
}
});
// modelValue -> $formatters -> viewValue
controller.$formatters.push(function (modelValue) {
// console.warn('$formatter("%s"): modelValue=%o (%o)', element.attr('ng-model'), modelValue, typeof modelValue);
var date;
if (angular.isUndefined(modelValue) || modelValue === null) {
date = NaN;
} else if (angular.isDate(modelValue)) {
date = modelValue;
} else if (options.dateType === 'string') {
date = dateParser.parse(modelValue, null, options.modelDateFormat);
} else {
date = new Date(modelValue);
}
// Setup default value?
// if(isNaN(date.getTime())) {
// var today = new Date();
// date = new Date(today.getFullYear(), today.getMonth(), today.getDate(), 0, 0, 0, 0);
controller.$dateValue = date;
return controller.$dateValue;
});
// viewValue -> element
controller.$render = function () {
// console.warn('$render("%s"): viewValue=%o', element.attr('ng-model'), controller.$viewValue);
element.val(!controller.$dateValue || isNaN(controller.$dateValue.getTime()) ? '' : dateFilter(controller.$dateValue, options.dateFormat));
};
// Garbage collection
scope.$on('$destroy', function () {
datepicker.destroy();
options = null;
datepicker = null;
});
}
};
}
]).provider('datepickerViews', function () {
var defaults = this.defaults = {
dayFormat: 'dd',
daySplit: 7
};
// Split array into smaller arrays
function split(arr, size) {
var arrays = [];
while (arr.length > 0) {
arrays.push(arr.splice(0, size));
}
return arrays;
}
// Modulus operator
function mod(n, m) {
return (n % m + m) % m;
}
this.$get = [
'$locale',
'$sce',
'dateFilter',
function ($locale, $sce, dateFilter) {
return function (picker) {
var scope = picker.$scope;
var options = picker.$options;
var weekDaysMin = $locale.DATETIME_FORMATS.SHORTDAY;
var weekDaysLabels = weekDaysMin.slice(options.startWeek).concat(weekDaysMin.slice(0, options.startWeek));
var weekDaysLabelsHtml = $sce.trustAsHtml('<th class="dow text-center">' + weekDaysLabels.join('</th><th class="dow text-center">') + '</th>');
var startDate = picker.$date || new Date();
var viewDate = {
year: startDate.getFullYear(),
month: startDate.getMonth(),
date: startDate.getDate()
};
var timezoneOffset = startDate.getTimezoneOffset() * 60000;
var views = [
{
format: options.dayFormat,
split: 7,
steps: { month: 1 },
update: function (date, force) {
if (!this.built || force || date.getFullYear() !== viewDate.year || date.getMonth() !== viewDate.month) {
angular.extend(viewDate, {
year: picker.$date.getFullYear(),
month: picker.$date.getMonth(),
date: picker.$date.getDate()
});
picker.$build();
} else if (date.getDate() !== viewDate.date) {
viewDate.date = picker.$date.getDate();
picker.$updateSelected();
}
},
build: function () {
var firstDayOfMonth = new Date(viewDate.year, viewDate.month, 1), <API key> = firstDayOfMonth.getTimezoneOffset();
var firstDate = new Date(+firstDayOfMonth - mod(firstDayOfMonth.getDay() - options.startWeek, 7) * 86400000), firstDateOffset = firstDate.getTimezoneOffset();
// Handle daylight time switch
if (firstDateOffset !== <API key>)
firstDate = new Date(+firstDate + (firstDateOffset - <API key>) * 60000);
var days = [], day;
for (var i = 0; i < 42; i++) {
// < 7 * 6
day = new Date(firstDate.getFullYear(), firstDate.getMonth(), firstDate.getDate() + i);
days.push({
date: day,
label: dateFilter(day, this.format),
selected: picker.$date && this.isSelected(day),
muted: day.getMonth() !== viewDate.month,
disabled: this.isDisabled(day)
});
}
scope.title = dateFilter(firstDayOfMonth, 'MMMM yyyy');
scope.showLabels = true;
scope.labels = weekDaysLabelsHtml;
scope.rows = split(days, this.split);
this.built = true;
},
isSelected: function (date) {
return picker.$date && date.getFullYear() === picker.$date.getFullYear() && date.getMonth() === picker.$date.getMonth() && date.getDate() === picker.$date.getDate();
},
isDisabled: function (date) {
return date.getTime() < options.minDate || date.getTime() > options.maxDate;
},
onKeyDown: function (evt) {
var actualTime = picker.$date.getTime();
var newDate;
if (evt.keyCode === 37)
newDate = new Date(actualTime - 1 * 86400000);
else if (evt.keyCode === 38)
newDate = new Date(actualTime - 7 * 86400000);
else if (evt.keyCode === 39)
newDate = new Date(actualTime + 1 * 86400000);
else if (evt.keyCode === 40)
newDate = new Date(actualTime + 7 * 86400000);
if (!this.isDisabled(newDate))
picker.select(newDate, true);
}
},
{
name: 'month',
format: 'MMM',
split: 4,
steps: { year: 1 },
update: function (date, force) {
if (!this.built || date.getFullYear() !== viewDate.year) {
angular.extend(viewDate, {
year: picker.$date.getFullYear(),
month: picker.$date.getMonth(),
date: picker.$date.getDate()
});
picker.$build();
} else if (date.getMonth() !== viewDate.month) {
angular.extend(viewDate, {
month: picker.$date.getMonth(),
date: picker.$date.getDate()
});
picker.$updateSelected();
}
},
build: function () {
var firstMonth = new Date(viewDate.year, 0, 1);
var months = [], month;
for (var i = 0; i < 12; i++) {
month = new Date(viewDate.year, i, 1);
months.push({
date: month,
label: dateFilter(month, this.format),
selected: picker.$isSelected(month),
disabled: this.isDisabled(month)
});
}
scope.title = dateFilter(month, 'yyyy');
scope.showLabels = false;
scope.rows = split(months, this.split);
this.built = true;
},
isSelected: function (date) {
return picker.$date && date.getFullYear() === picker.$date.getFullYear() && date.getMonth() === picker.$date.getMonth();
},
isDisabled: function (date) {
var lastDate = +new Date(date.getFullYear(), date.getMonth() + 1, 0);
return lastDate < options.minDate || date.getTime() > options.maxDate;
},
onKeyDown: function (evt) {
var actualMonth = picker.$date.getMonth();
var newDate = new Date(picker.$date);
if (evt.keyCode === 37)
newDate.setMonth(actualMonth - 1);
else if (evt.keyCode === 38)
newDate.setMonth(actualMonth - 4);
else if (evt.keyCode === 39)
newDate.setMonth(actualMonth + 1);
else if (evt.keyCode === 40)
newDate.setMonth(actualMonth + 4);
if (!this.isDisabled(newDate))
picker.select(newDate, true);
}
},
{
name: 'year',
format: 'yyyy',
split: 4,
steps: { year: 12 },
update: function (date, force) {
if (!this.built || force || parseInt(date.getFullYear() / 20, 10) !== parseInt(viewDate.year / 20, 10)) {
angular.extend(viewDate, {
year: picker.$date.getFullYear(),
month: picker.$date.getMonth(),
date: picker.$date.getDate()
});
picker.$build();
} else if (date.getFullYear() !== viewDate.year) {
angular.extend(viewDate, {
year: picker.$date.getFullYear(),
month: picker.$date.getMonth(),
date: picker.$date.getDate()
});
picker.$updateSelected();
}
},
build: function () {
var firstYear = viewDate.year - viewDate.year % (this.split * 3);
var years = [], year;
for (var i = 0; i < 12; i++) {
year = new Date(firstYear + i, 0, 1);
years.push({
date: year,
label: dateFilter(year, this.format),
selected: picker.$isSelected(year),
disabled: this.isDisabled(year)
});
}
scope.title = years[0].label + '-' + years[years.length - 1].label;
scope.showLabels = false;
scope.rows = split(years, this.split);
this.built = true;
},
isSelected: function (date) {
return picker.$date && date.getFullYear() === picker.$date.getFullYear();
},
isDisabled: function (date) {
var lastDate = +new Date(date.getFullYear() + 1, 0, 0);
return lastDate < options.minDate || date.getTime() > options.maxDate;
},
onKeyDown: function (evt) {
var actualYear = picker.$date.getFullYear(), newDate = new Date(picker.$date);
if (evt.keyCode === 37)
newDate.setYear(actualYear - 1);
else if (evt.keyCode === 38)
newDate.setYear(actualYear - 4);
else if (evt.keyCode === 39)
newDate.setYear(actualYear + 1);
else if (evt.keyCode === 40)
newDate.setYear(actualYear + 4);
if (!this.isDisabled(newDate))
picker.select(newDate, true);
}
}
];
return {
views: options.minView ? Array.prototype.slice.call(views, options.minView) : views,
viewDate: viewDate
};
};
}
];
});
// Source: date-parser.js
angular.module('mgcrea.ngStrap.helpers.dateParser', []).provider('$dateParser', [
'$localeProvider',
function ($localeProvider) {
var proto = Date.prototype;
function isNumeric(n) {
return !isNaN(parseFloat(n)) && isFinite(n);
}
var defaults = this.defaults = {
format: 'shortDate',
strict: false
};
this.$get = [
'$locale',
function ($locale) {
var DateParserFactory = function (config) {
var options = angular.extend({}, defaults, config);
var $dateParser = {};
var regExpMap = {
'sss': '[0-9]{3}',
'ss': '[0-5][0-9]',
's': options.strict ? '[1-5]?[0-9]' : '[0-9]|[0-5][0-9]',
'mm': '[0-5][0-9]',
'm': options.strict ? '[1-5]?[0-9]' : '[0-9]|[0-5][0-9]',
'HH': '[01][0-9]|2[0-3]',
'H': options.strict ? '1?[0-9]|2[0-3]' : '[01]?[0-9]|2[0-3]',
'hh': '[0][1-9]|[1][012]',
'h': options.strict ? '[1-9]|1[012]' : '0?[1-9]|1[012]',
'a': 'AM|PM',
'EEEE': $locale.DATETIME_FORMATS.DAY.join('|'),
'EEE': $locale.DATETIME_FORMATS.SHORTDAY.join('|'),
'dd': '0[1-9]|[12][0-9]|3[01]',
'd': options.strict ? '[1-9]|[1-2][0-9]|3[01]' : '0?[1-9]|[1-2][0-9]|3[01]',
'MMMM': $locale.DATETIME_FORMATS.MONTH.join('|'),
'MMM': $locale.DATETIME_FORMATS.SHORTMONTH.join('|'),
'MM': '0[1-9]|1[012]',
'M': options.strict ? '[1-9]|1[012]' : '0?[1-9]|1[012]',
'yyyy': '[1]{1}[0-9]{3}|[2]{1}[0-9]{3}',
'yy': '[0-9]{2}',
'y': options.strict ? '-?(0|[1-9][0-9]{0,3})' : '-?0*[0-9]{1,4}'
};
var setFnMap = {
'sss': proto.setMilliseconds,
'ss': proto.setSeconds,
's': proto.setSeconds,
'mm': proto.setMinutes,
'm': proto.setMinutes,
'HH': proto.setHours,
'H': proto.setHours,
'hh': proto.setHours,
'h': proto.setHours,
'dd': proto.setDate,
'd': proto.setDate,
'a': function (value) {
var hours = this.getHours();
return this.setHours(value.match(/pm/i) ? hours + 12 : hours);
},
'MMMM': function (value) {
return this.setMonth($locale.DATETIME_FORMATS.MONTH.indexOf(value));
},
'MMM': function (value) {
return this.setMonth($locale.DATETIME_FORMATS.SHORTMONTH.indexOf(value));
},
'MM': function (value) {
return this.setMonth(1 * value - 1);
},
'M': function (value) {
return this.setMonth(1 * value - 1);
},
'yyyy': proto.setFullYear,
'yy': function (value) {
return this.setFullYear(2000 + 1 * value);
},
'y': proto.setFullYear
};
var regex, setMap;
$dateParser.init = function () {
$dateParser.$format = $locale.DATETIME_FORMATS[options.format] || options.format;
regex = regExpForFormat($dateParser.$format);
setMap = setMapForFormat($dateParser.$format);
};
$dateParser.isValid = function (date) {
if (angular.isDate(date))
return !isNaN(date.getTime());
return regex.test(date);
};
$dateParser.parse = function (value, baseDate, format) {
var formatRegex = format ? regExpForFormat(format) : regex;
var formatSetMap = format ? setMapForFormat(format) : setMap;
if (angular.isDate(value))
return value;
var matches = formatRegex.exec(value);
if (!matches)
return false;
var date = baseDate || new Date(0, 0, 1);
for (var i = 0; i < matches.length - 1; i++) {
formatSetMap[i] && formatSetMap[i].call(date, matches[i + 1]);
}
return date;
};
// Private functions
function setMapForFormat(format) {
var keys = Object.keys(setFnMap), i;
var map = [], sortedMap = [];
// Map to setFn
var clonedFormat = format;
for (i = 0; i < keys.length; i++) {
if (format.split(keys[i]).length > 1) {
var index = clonedFormat.search(keys[i]);
format = format.split(keys[i]).join('');
if (setFnMap[keys[i]])
map[index] = setFnMap[keys[i]];
}
}
// Sort result map
angular.forEach(map, function (v) {
sortedMap.push(v);
});
return sortedMap;
}
function <API key>(text) {
return text.replace(/\//g, '[\\/]').replace('/-/g', '[-]').replace(/\./g, '[.]').replace(/\\s/g, '[\\s]');
}
function regExpForFormat(format) {
var keys = Object.keys(regExpMap), i;
var re = format;
// Abstract replaces to avoid collisions
for (i = 0; i < keys.length; i++) {
re = re.split(keys[i]).join('${' + i + '}');
}
// Replace abstracted values
for (i = 0; i < keys.length; i++) {
re = re.split('${' + i + '}').join('(' + regExpMap[keys[i]] + ')');
}
format = <API key>(format);
return new RegExp('^' + re + '$', ['i']);
}
$dateParser.init();
return $dateParser;
};
return DateParserFactory;
}
];
}
]);
// Source: debounce.js
angular.module('mgcrea.ngStrap.helpers.debounce', []).constant('debounce', function (func, wait, immediate) {
var timeout, args, context, timestamp, result;
return function () {
context = this;
args = arguments;
timestamp = new Date();
var later = function () {
var last = new Date() - timestamp;
if (last < wait) {
timeout = setTimeout(later, wait - last);
} else {
timeout = null;
if (!immediate)
result = func.apply(context, args);
}
};
var callNow = immediate && !timeout;
if (!timeout) {
timeout = setTimeout(later, wait);
}
if (callNow)
result = func.apply(context, args);
return result;
};
}).constant('throttle', function (func, wait, options) {
var context, args, result;
var timeout = null;
var previous = 0;
options || (options = {});
var later = function () {
previous = options.leading === false ? 0 : new Date();
timeout = null;
result = func.apply(context, args);
};
return function () {
var now = new Date();
if (!previous && options.leading === false)
previous = now;
var remaining = wait - (now - previous);
context = this;
args = arguments;
if (remaining <= 0) {
clearTimeout(timeout);
timeout = null;
previous = now;
result = func.apply(context, args);
} else if (!timeout && options.trailing !== false) {
timeout = setTimeout(later, remaining);
}
return result;
};
});
// Source: dimensions.js
angular.module('mgcrea.ngStrap.helpers.dimensions', []).factory('dimensions', [
'$document',
'$window',
function ($document, $window) {
var jqLite = angular.element;
var fn = {};
/**
* Test the element nodeName
* @param element
* @param name
*/
var nodeName = fn.nodeName = function (element, name) {
return element.nodeName && element.nodeName.toLowerCase() === name.toLowerCase();
};
/**
* Returns the element computed style
* @param element
* @param prop
* @param extra
*/
fn.css = function (element, prop, extra) {
var value;
if (element.currentStyle) {
value = element.currentStyle[prop];
} else if (window.getComputedStyle) {
value = window.getComputedStyle(element)[prop];
} else {
value = element.style[prop];
}
return extra === true ? parseFloat(value) || 0 : value;
};
fn.offset = function (element) {
var boxRect = element.<API key>();
var docElement = element.ownerDocument;
return {
width: boxRect.width || element.offsetWidth,
height: boxRect.height || element.offsetHeight,
top: boxRect.top + (window.pageYOffset || docElement.documentElement.scrollTop) - (docElement.documentElement.clientTop || 0),
left: boxRect.left + (window.pageXOffset || docElement.documentElement.scrollLeft) - (docElement.documentElement.clientLeft || 0)
};
};
fn.position = function (element) {
var offsetParentRect = {
top: 0,
left: 0
}, offsetParentElement, offset;
// Fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent
if (fn.css(element, 'position') === 'fixed') {
// We assume that <API key> is available when computed position is fixed
offset = element.<API key>();
} else {
// Get *real* offsetParentElement
offsetParentElement = offsetParent(element);
offset = fn.offset(element);
// Get correct offsets
offset = fn.offset(element);
if (!nodeName(offsetParentElement, 'html')) {
offsetParentRect = fn.offset(offsetParentElement);
}
// Add offsetParent borders
offsetParentRect.top += fn.css(offsetParentElement, 'borderTopWidth', true);
offsetParentRect.left += fn.css(offsetParentElement, 'borderLeftWidth', true);
}
// Subtract parent offsets and element margins
return {
width: element.offsetWidth,
height: element.offsetHeight,
top: offset.top - offsetParentRect.top - fn.css(element, 'marginTop', true),
left: offset.left - offsetParentRect.left - fn.css(element, 'marginLeft', true)
};
};
/**
* Returns the closest, non-statically positioned offsetParent of a given element
* @required-by fn.position
* @param element
*/
var offsetParent = function offsetParentElement(element) {
var docElement = element.ownerDocument;
var offsetParent = element.offsetParent || docElement;
if (nodeName(offsetParent, '#document'))
return docElement.documentElement;
while (offsetParent && !nodeName(offsetParent, 'html') && fn.css(offsetParent, 'position') === 'static') {
offsetParent = offsetParent.offsetParent;
}
return offsetParent || docElement.documentElement;
};
fn.height = function (element, outer) {
var value = element.offsetHeight;
if (outer) {
value += fn.css(element, 'marginTop', true) + fn.css(element, 'marginBottom', true);
} else {
value -= fn.css(element, 'paddingTop', true) + fn.css(element, 'paddingBottom', true) + fn.css(element, 'borderTopWidth', true) + fn.css(element, 'borderBottomWidth', true);
}
return value;
};
fn.width = function (element, outer) {
var value = element.offsetWidth;
if (outer) {
value += fn.css(element, 'marginLeft', true) + fn.css(element, 'marginRight', true);
} else {
value -= fn.css(element, 'paddingLeft', true) + fn.css(element, 'paddingRight', true) + fn.css(element, 'borderLeftWidth', true) + fn.css(element, 'borderRightWidth', true);
}
return value;
};
return fn;
}
]);
// Source: parse-options.js
angular.module('mgcrea.ngStrap.helpers.parseOptions', []).provider('$parseOptions', function () {
var defaults = this.defaults = { regexp: /^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(.*?)(?:\s+track\s+by\s+(.*?))?$/ };
this.$get = [
'$parse',
'$q',
function ($parse, $q) {
function ParseOptionsFactory(attr, config) {
var $parseOptions = {};
// Common vars
var options = angular.extend({}, defaults, config);
$parseOptions.$values = [];
// Private vars
var match, displayFn, valueName, keyName, groupByFn, valueFn, valuesFn;
$parseOptions.init = function () {
$parseOptions.$match = match = attr.match(options.regexp);
displayFn = $parse(match[2] || match[1]), valueName = match[4] || match[6], keyName = match[5], groupByFn = $parse(match[3] || ''), valueFn = $parse(match[2] ? match[1] : valueName), valuesFn = $parse(match[7]);
};
$parseOptions.valuesFn = function (scope, controller) {
return $q.when(valuesFn(scope, controller)).then(function (values) {
$parseOptions.$values = values ? parseValues(values, scope) : {};
return $parseOptions.$values;
});
};
// Private functions
function parseValues(values, scope) {
return values.map(function (match, index) {
var locals = {}, label, value;
locals[valueName] = match;
label = displayFn(scope, locals);
value = valueFn(scope, locals) || index;
return {
label: label,
value: value
};
});
}
$parseOptions.init();
return $parseOptions;
}
return ParseOptionsFactory;
}
];
});
// Source: raf.js
angular.version.minor < 3 && angular.version.dot < 14 && angular.module('ng').factory('$$rAF', [
'$window',
'$timeout',
function ($window, $timeout) {
var <API key> = $window.<API key> || $window.<API key> || $window.<API key>;
var <API key> = $window.<API key> || $window.<API key> || $window.<API key> || $window.<API key>;
var rafSupported = !!<API key>;
var raf = rafSupported ? function (fn) {
var id = <API key>(fn);
return function () {
<API key>(id);
};
} : function (fn) {
var timer = $timeout(fn, 16.66, false);
// 1000 / 60 = 16.666
return function () {
$timeout.cancel(timer);
};
};
raf.supported = rafSupported;
return raf;
}
]); // .factory('$$animateReflow', function($$rAF, $document) {
// var bodyEl = $document[0].body;
// return function(fn) {
// //the returned function acts as the cancellation function
// return $$rAF(function() {
// //the line below will force the browser to perform a repaint
// //so that all the animated elements within the animation frame
// //will be properly updated and drawn on screen. This is
// //required to perform multi-class CSS based animations with
// //Firefox. DO NOT REMOVE THIS LINE.
// var a = bodyEl.offsetWidth + 1;
// Source: dropdown.js
angular.module('mgcrea.ngStrap.dropdown', ['mgcrea.ngStrap.tooltip']).provider('$dropdown', function () {
var defaults = this.defaults = {
animation: 'am-fade',
prefixClass: 'dropdown',
placement: 'bottom-left',
template: 'dropdown/dropdown.tpl.html',
trigger: 'click',
container: false,
keyboard: true,
html: false,
delay: 0
};
this.$get = [
'$window',
'$rootScope',
'$tooltip',
function ($window, $rootScope, $tooltip) {
var bodyEl = angular.element($window.document.body);
var matchesSelector = Element.prototype.matchesSelector || Element.prototype.<API key> || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector;
function DropdownFactory(element, config) {
var $dropdown = {};
// Common vars
var options = angular.extend({}, defaults, config);
var scope = $dropdown.$scope = options.scope && options.scope.$new() || $rootScope.$new();
$dropdown = $tooltip(element, options);
// Protected methods
$dropdown.$onKeyDown = function (evt) {
if (!/(38|40)/.test(evt.keyCode))
return;
evt.preventDefault();
evt.stopPropagation();
// Retrieve focused index
var items = angular.element($dropdown.$element[0].querySelectorAll('li:not(.divider) a'));
if (!items.length)
return;
var index;
angular.forEach(items, function (el, i) {
if (matchesSelector && matchesSelector.call(el, ':focus'))
index = i;
});
// Navigate with keyboard
if (evt.keyCode === 38 && index > 0)
index
else if (evt.keyCode === 40 && index < items.length - 1)
index++;
else if (angular.isUndefined(index))
index = 0;
items.eq(index)[0].focus();
};
// Overrides
var show = $dropdown.show;
$dropdown.show = function () {
show();
setTimeout(function () {
options.keyboard && $dropdown.$element.on('keydown', $dropdown.$onKeyDown);
bodyEl.on('click', onBodyClick);
});
};
var hide = $dropdown.hide;
$dropdown.hide = function () {
options.keyboard && $dropdown.$element.off('keydown', $dropdown.$onKeyDown);
bodyEl.off('click', onBodyClick);
hide();
};
// Private functions
function onBodyClick(evt) {
if (evt.target === element[0])
return;
return evt.target !== element[0] && $dropdown.hide();
}
return $dropdown;
}
return DropdownFactory;
}
];
}).directive('bsDropdown', [
'$window',
'$location',
'$sce',
'$dropdown',
function ($window, $location, $sce, $dropdown) {
return {
restrict: 'EAC',
scope: true,
link: function postLink(scope, element, attr, transclusion) {
// Directive options
var options = { scope: scope };
angular.forEach([
'placement',
'container',
'delay',
'trigger',
'keyboard',
'html',
'animation',
'template'
], function (key) {
if (angular.isDefined(attr[key]))
options[key] = attr[key];
});
// Support scope as an object
attr.bsDropdown && scope.$watch(attr.bsDropdown, function (newValue, oldValue) {
scope.content = newValue;
}, true);
// Initialize dropdown
var dropdown = $dropdown(element, options);
// Garbage collection
scope.$on('$destroy', function () {
dropdown.destroy();
options = null;
dropdown = null;
});
}
};
}
]);
// Source: modal.js
angular.module('mgcrea.ngStrap.modal', ['mgcrea.ngStrap.helpers.dimensions']).provider('$modal', function () {
var defaults = this.defaults = {
animation: 'am-fade',
backdropAnimation: 'am-fade',
prefixClass: 'modal',
prefixEvent: 'modal',
placement: 'top',
template: 'modal/modal.tpl.html',
contentTemplate: false,
container: false,
element: null,
backdrop: true,
keyboard: true,
html: false,
show: true
};
this.$get = [
'$window',
'$rootScope',
'$compile',
'$q',
'$templateCache',
'$http',
'$animate',
'$timeout',
'$sce',
'dimensions',
function ($window, $rootScope, $compile, $q, $templateCache, $http, $animate, $timeout, $sce, dimensions) {
var forEach = angular.forEach;
var trim = String.prototype.trim;
var <API key> = $window.<API key> || $window.setTimeout;
var bodyElement = angular.element($window.document.body);
var htmlReplaceRegExp = /ng-bind="/gi;
function ModalFactory(config) {
var $modal = {};
// Common vars
var options = $modal.$options = angular.extend({}, defaults, config);
$modal.$promise = fetchTemplate(options.template);
var scope = $modal.$scope = options.scope && options.scope.$new() || $rootScope.$new();
if (!options.element && !options.container) {
options.container = 'body';
}
// Support scope as string options
forEach([
'title',
'content'
], function (key) {
if (options[key])
scope[key] = $sce.trustAsHtml(options[key]);
});
// Provide scope helpers
scope.$hide = function () {
scope.$$postDigest(function () {
$modal.hide();
});
};
scope.$show = function () {
scope.$$postDigest(function () {
$modal.show();
});
};
scope.$toggle = function () {
scope.$$postDigest(function () {
$modal.toggle();
});
};
// Support contentTemplate option
if (options.contentTemplate) {
$modal.$promise = $modal.$promise.then(function (template) {
var templateEl = angular.element(template);
return fetchTemplate(options.contentTemplate).then(function (contentTemplate) {
var contentEl = findElement('[ng-bind="content"]', templateEl[0]).removeAttr('ng-bind').html(contentTemplate);
// Drop the default footer as you probably don't want it if you use a custom contentTemplate
if (!config.template)
contentEl.next().remove();
return templateEl[0].outerHTML;
});
});
}
// Fetch, compile then initialize modal
var modalLinker, modalElement;
var backdropElement = angular.element('<div class="' + options.prefixClass + '-backdrop"/>');
$modal.$promise.then(function (template) {
if (angular.isObject(template))
template = template.data;
if (options.html)
template = template.replace(htmlReplaceRegExp, 'ng-bind-html="');
template = trim.apply(template);
modalLinker = $compile(template);
$modal.init();
});
$modal.init = function () {
// Options: show
if (options.show) {
scope.$$postDigest(function () {
$modal.show();
});
}
};
$modal.destroy = function () {
// Remove element
if (modalElement) {
modalElement.remove();
modalElement = null;
}
if (backdropElement) {
backdropElement.remove();
backdropElement = null;
}
// Destroy scope
scope.$destroy();
};
$modal.show = function () {
scope.$emit(options.prefixEvent + '.show.before', $modal);
var parent = options.container ? findElement(options.container) : null;
var after = options.container ? null : options.element;
// Fetch a cloned element linked from template
modalElement = $modal.$element = modalLinker(scope, function (clonedElement, scope) {
});
// Set the initial positioning.
modalElement.css({ display: 'block' }).addClass(options.placement);
// Options: animation
if (options.animation) {
if (options.backdrop) {
backdropElement.addClass(options.backdropAnimation);
}
modalElement.addClass(options.animation);
}
if (options.backdrop) {
$animate.enter(backdropElement, bodyElement, null, function () {
});
}
$animate.enter(modalElement, parent, after, function () {
scope.$emit(options.prefixEvent + '.show', $modal);
});
scope.$isShown = true;
scope.$$phase || scope.$root && scope.$root.$$phase || scope.$digest();
// Focus once the enter-animation has started
// Weird PhantomJS bug hack
var el = modalElement[0];
<API key>(function () {
el.focus();
});
bodyElement.addClass(options.prefixClass + '-open');
if (options.animation) {
bodyElement.addClass(options.prefixClass + '-with-' + options.animation);
}
// Bind events
if (options.backdrop) {
modalElement.on('click', hideOnBackdropClick);
backdropElement.on('click', hideOnBackdropClick);
}
if (options.keyboard) {
modalElement.on('keyup', $modal.$onKeyUp);
}
};
$modal.hide = function () {
scope.$emit(options.prefixEvent + '.hide.before', $modal);
$animate.leave(modalElement, function () {
scope.$emit(options.prefixEvent + '.hide', $modal);
bodyElement.removeClass(options.prefixClass + '-open');
if (options.animation) {
bodyElement.addClass(options.prefixClass + '-with-' + options.animation);
}
});
if (options.backdrop) {
$animate.leave(backdropElement, function () {
});
}
scope.$isShown = false;
scope.$$phase || scope.$root && scope.$root.$$phase || scope.$digest();
// Unbind events
if (options.backdrop) {
modalElement.off('click', hideOnBackdropClick);
backdropElement.off('click', hideOnBackdropClick);
}
if (options.keyboard) {
modalElement.off('keyup', $modal.$onKeyUp);
}
};
$modal.toggle = function () {
scope.$isShown ? $modal.hide() : $modal.show();
};
$modal.focus = function () {
modalElement[0].focus();
};
// Protected methods
$modal.$onKeyUp = function (evt) {
evt.which === 27 && $modal.hide();
};
// Private methods
function hideOnBackdropClick(evt) {
if (evt.target !== evt.currentTarget)
return;
options.backdrop === 'static' ? $modal.focus() : $modal.hide();
}
return $modal;
}
// Helper functions
function findElement(query, element) {
return angular.element((element || document).querySelectorAll(query));
}
function fetchTemplate(template) {
return $q.when($templateCache.get(template) || $http.get(template)).then(function (res) {
if (angular.isObject(res)) {
$templateCache.put(template, res.data);
return res.data;
}
return res;
});
}
return ModalFactory;
}
];
}).directive('bsModal', [
'$window',
'$location',
'$sce',
'$modal',
function ($window, $location, $sce, $modal) {
return {
restrict: 'EAC',
scope: true,
link: function postLink(scope, element, attr, transclusion) {
// Directive options
var options = {
scope: scope,
element: element,
show: false
};
angular.forEach([
'template',
'contentTemplate',
'placement',
'backdrop',
'keyboard',
'html',
'container',
'animation'
], function (key) {
if (angular.isDefined(attr[key]))
options[key] = attr[key];
});
// Support scope as data-attrs
angular.forEach([
'title',
'content'
], function (key) {
attr[key] && attr.$observe(key, function (newValue, oldValue) {
scope[key] = $sce.trustAsHtml(newValue);
});
});
// Support scope as an object
attr.bsModal && scope.$watch(attr.bsModal, function (newValue, oldValue) {
if (angular.isObject(newValue)) {
angular.extend(scope, newValue);
} else {
scope.content = newValue;
}
}, true);
// Initialize modal
var modal = $modal(options);
// Trigger
element.on(attr.trigger || 'click', modal.toggle);
// Garbage collection
scope.$on('$destroy', function () {
modal.destroy();
options = null;
modal = null;
});
}
};
}
]);
// Source: navbar.js
angular.module('mgcrea.ngStrap.navbar', []).provider('$navbar', function () {
var defaults = this.defaults = {
activeClass: 'active',
routeAttr: 'data-match-route',
strict: false
};
this.$get = function () {
return { defaults: defaults };
};
}).directive('bsNavbar', [
'$window',
'$location',
'$navbar',
function ($window, $location, $navbar) {
var defaults = $navbar.defaults;
return {
restrict: 'A',
link: function postLink(scope, element, attr, controller) {
// Directive options
var options = angular.copy(defaults);
angular.forEach(Object.keys(defaults), function (key) {
if (angular.isDefined(attr[key]))
options[key] = attr[key];
});
// Watch for the $location
scope.$watch(function () {
return $location.path();
}, function (newValue, oldValue) {
var liElements = element[0].querySelectorAll('li[' + options.routeAttr + ']');
angular.forEach(liElements, function (li) {
var liElement = angular.element(li);
var pattern = liElement.attr(options.routeAttr).replace('/', '\\/');
if (options.strict) {
pattern = '^' + pattern + '$';
}
var regexp = new RegExp(pattern, ['i']);
if (regexp.test(newValue)) {
liElement.addClass(options.activeClass);
} else {
liElement.removeClass(options.activeClass);
}
});
});
}
};
}
]);
// Source: scrollspy.js
angular.module('mgcrea.ngStrap.scrollspy', [
'mgcrea.ngStrap.helpers.debounce',
'mgcrea.ngStrap.helpers.dimensions'
]).provider('$scrollspy', function () {
// Pool of registered spies
var spies = this.$$spies = {};
var defaults = this.defaults = {
debounce: 150,
throttle: 100,
offset: 100
};
this.$get = [
'$window',
'$document',
'$rootScope',
'dimensions',
'debounce',
'throttle',
function ($window, $document, $rootScope, dimensions, debounce, throttle) {
var windowEl = angular.element($window);
var docEl = angular.element($document.prop('documentElement'));
var bodyEl = angular.element($window.document.body);
// Helper functions
function nodeName(element, name) {
return element[0].nodeName && element[0].nodeName.toLowerCase() === name.toLowerCase();
}
function ScrollSpyFactory(config) {
// Common vars
var options = angular.extend({}, defaults, config);
if (!options.element)
options.element = bodyEl;
var isWindowSpy = nodeName(options.element, 'body');
var scrollEl = isWindowSpy ? windowEl : options.element;
var scrollId = isWindowSpy ? 'window' : options.id;
// Use existing spy
if (spies[scrollId]) {
spies[scrollId].$$count++;
return spies[scrollId];
}
var $scrollspy = {};
// Private vars
var <API key>, <API key>;
var trackedElements = $scrollspy.$trackedElements = [];
var sortedElements = [];
var activeTarget;
var <API key>;
var <API key>;
var <API key>;
var viewportHeight;
var scrollTop;
$scrollspy.init = function () {
// Setup internal ref counter
this.$$count = 1;
// Bind events
<API key> = debounce(this.checkPosition, options.debounce);
<API key> = throttle(this.checkPosition, options.throttle);
scrollEl.on('click', this.<API key>);
windowEl.on('resize', <API key>);
scrollEl.on('scroll', <API key>);
<API key> = debounce(this.checkOffsets, options.debounce);
<API key> = $rootScope.$on('$viewContentLoaded', <API key>);
<API key> = $rootScope.$on('$<API key>', <API key>);
<API key>();
// Register spy for reuse
if (scrollId) {
spies[scrollId] = $scrollspy;
}
};
$scrollspy.destroy = function () {
// Check internal ref counter
this.$$count
if (this.$$count > 0) {
return;
}
// Unbind events
scrollEl.off('click', this.<API key>);
windowEl.off('resize', <API key>);
scrollEl.off('scroll', <API key>);
<API key>();
<API key>();
if (scrollId) {
delete spies[scrollId];
}
};
$scrollspy.checkPosition = function () {
// Not ready yet
if (!sortedElements.length)
return;
// Calculate the scroll position
scrollTop = (isWindowSpy ? $window.pageYOffset : scrollEl.prop('scrollTop')) || 0;
// Calculate the viewport height for use by the components
viewportHeight = Math.max($window.innerHeight, docEl.prop('clientHeight'));
// Activate first element if scroll is smaller
if (scrollTop < sortedElements[0].offsetTop && activeTarget !== sortedElements[0].target) {
return $scrollspy.$activateElement(sortedElements[0]);
}
// Activate proper element
for (var i = sortedElements.length; i
if (angular.isUndefined(sortedElements[i].offsetTop) || sortedElements[i].offsetTop === null)
continue;
if (activeTarget === sortedElements[i].target)
continue;
if (scrollTop < sortedElements[i].offsetTop)
continue;
if (sortedElements[i + 1] && scrollTop > sortedElements[i + 1].offsetTop)
continue;
return $scrollspy.$activateElement(sortedElements[i]);
}
};
$scrollspy.<API key> = function () {
setTimeout(this.checkPosition, 1);
};
// Protected methods
$scrollspy.$activateElement = function (element) {
if (activeTarget) {
var activeElement = $scrollspy.$getTrackedElement(activeTarget);
if (activeElement) {
activeElement.source.removeClass('active');
if (nodeName(activeElement.source, 'li') && nodeName(activeElement.source.parent().parent(), 'li')) {
activeElement.source.parent().parent().removeClass('active');
}
}
}
activeTarget = element.target;
element.source.addClass('active');
if (nodeName(element.source, 'li') && nodeName(element.source.parent().parent(), 'li')) {
element.source.parent().parent().addClass('active');
}
};
$scrollspy.$getTrackedElement = function (target) {
return trackedElements.filter(function (obj) {
return obj.target === target;
})[0];
};
// Track offsets behavior
$scrollspy.checkOffsets = function () {
angular.forEach(trackedElements, function (trackedElement) {
var targetElement = document.querySelector(trackedElement.target);
trackedElement.offsetTop = targetElement ? dimensions.offset(targetElement).top : null;
if (options.offset && trackedElement.offsetTop !== null)
trackedElement.offsetTop -= options.offset * 1;
});
sortedElements = trackedElements.filter(function (el) {
return el.offsetTop !== null;
}).sort(function (a, b) {
return a.offsetTop - b.offsetTop;
});
<API key>();
};
$scrollspy.trackElement = function (target, source) {
trackedElements.push({
target: target,
source: source
});
};
$scrollspy.untrackElement = function (target, source) {
var toDelete;
for (var i = trackedElements.length; i
if (trackedElements[i].target === target && trackedElements[i].source === source) {
toDelete = i;
break;
}
}
trackedElements = trackedElements.splice(toDelete, 1);
};
$scrollspy.activate = function (i) {
trackedElements[i].addClass('active');
};
// Initialize plugin
$scrollspy.init();
return $scrollspy;
}
return ScrollSpyFactory;
}
];
}).directive('bsScrollspy', [
'$rootScope',
'debounce',
'dimensions',
'$scrollspy',
function ($rootScope, debounce, dimensions, $scrollspy) {
return {
restrict: 'EAC',
link: function postLink(scope, element, attr) {
var options = { scope: scope };
angular.forEach([
'offset',
'target'
], function (key) {
if (angular.isDefined(attr[key]))
options[key] = attr[key];
});
var scrollspy = $scrollspy(options);
scrollspy.trackElement(options.target, element);
scope.$on('$destroy', function () {
scrollspy.untrackElement(options.target, element);
scrollspy.destroy();
options = null;
scrollspy = null;
});
}
};
}
]).directive('bsScrollspyList', [
'$rootScope',
'debounce',
'dimensions',
'$scrollspy',
function ($rootScope, debounce, dimensions, $scrollspy) {
return {
restrict: 'A',
compile: function postLink(element, attr) {
var children = element[0].querySelectorAll('li > a[href]');
angular.forEach(children, function (child) {
var childEl = angular.element(child);
childEl.parent().attr('bs-scrollspy', '').attr('data-target', childEl.attr('href'));
});
}
};
}
]);
// Source: popover.js
angular.module('mgcrea.ngStrap.popover', ['mgcrea.ngStrap.tooltip']).provider('$popover', function () {
var defaults = this.defaults = {
animation: 'am-fade',
container: false,
target: false,
placement: 'right',
template: 'popover/popover.tpl.html',
contentTemplate: false,
trigger: 'click',
keyboard: true,
html: false,
title: '',
content: '',
delay: 0
};
this.$get = [
'$tooltip',
function ($tooltip) {
function PopoverFactory(element, config) {
// Common vars
var options = angular.extend({}, defaults, config);
var $popover = $tooltip(element, options);
// Support scope as string options [/*title, */content]
if (options.content) {
$popover.$scope.content = options.content;
}
return $popover;
}
return PopoverFactory;
}
];
}).directive('bsPopover', [
'$window',
'$location',
'$sce',
'$popover',
function ($window, $location, $sce, $popover) {
var <API key> = $window.<API key> || $window.setTimeout;
return {
restrict: 'EAC',
scope: true,
link: function postLink(scope, element, attr) {
// Directive options
var options = { scope: scope };
angular.forEach([
'template',
'contentTemplate',
'placement',
'container',
'target',
'delay',
'trigger',
'keyboard',
'html',
'animation'
], function (key) {
if (angular.isDefined(attr[key]))
options[key] = attr[key];
});
// Support scope as data-attrs
angular.forEach([
'title',
'content'
], function (key) {
attr[key] && attr.$observe(key, function (newValue, oldValue) {
scope[key] = $sce.trustAsHtml(newValue);
angular.isDefined(oldValue) && <API key>(function () {
popover && popover.$applyPlacement();
});
});
});
// Support scope as an object
attr.bsPopover && scope.$watch(attr.bsPopover, function (newValue, oldValue) {
if (angular.isObject(newValue)) {
angular.extend(scope, newValue);
} else {
scope.content = newValue;
}
angular.isDefined(oldValue) && <API key>(function () {
popover && popover.$applyPlacement();
});
}, true);
// Visibility binding support
attr.bsShow && scope.$watch(attr.bsShow, function (newValue, oldValue) {
if (!popover || !angular.isDefined(newValue)) return;
if (angular.isString(newValue)) newValue = newValue.match(',?(popover),?');
newValue === true ? popover.show() : popover.hide();
});
// Initialize popover
var popover = $popover(element, options);
// Garbage collection
scope.$on('$destroy', function () {
popover.destroy();
options = null;
popover = null;
});
}
};
}
]);
// Source: select.js
angular.module('mgcrea.ngStrap.select', [
'mgcrea.ngStrap.tooltip',
'mgcrea.ngStrap.helpers.parseOptions'
]).provider('$select', function () {
var defaults = this.defaults = {
animation: 'am-fade',
prefixClass: 'select',
placement: 'bottom-left',
template: 'select/select.tpl.html',
trigger: 'focus',
container: false,
keyboard: true,
html: false,
delay: 0,
multiple: false,
sort: true,
caretHtml: ' <span class="caret"></span>',
placeholder: 'Choose among the following...',
maxLength: 3,
maxLengthHtml: 'selected',
iconCheckmark: 'glyphicon glyphicon-ok'
};
this.$get = [
'$window',
'$document',
'$rootScope',
'$tooltip',
function ($window, $document, $rootScope, $tooltip) {
var bodyEl = angular.element($window.document.body);
var isTouch = 'createTouch' in $window.document;
function SelectFactory(element, controller, config) {
var $select = {};
// Common vars
var options = angular.extend({}, defaults, config);
$select = $tooltip(element, options);
var scope = $select.$scope;
scope.$matches = [];
scope.$activeIndex = 0;
scope.$isMultiple = options.multiple;
scope.$iconCheckmark = options.iconCheckmark;
scope.$activate = function (index) {
scope.$$postDigest(function () {
$select.activate(index);
});
};
scope.$select = function (index, evt) {
scope.$$postDigest(function () {
$select.select(index);
});
};
scope.$isVisible = function () {
return $select.$isVisible();
};
scope.$isActive = function (index) {
return $select.$isActive(index);
};
// Public methods
$select.update = function (matches) {
scope.$matches = matches;
$select.$updateActiveIndex();
};
$select.activate = function (index) {
if (options.multiple) {
scope.$activeIndex.sort();
$select.$isActive(index) ? scope.$activeIndex.splice(scope.$activeIndex.indexOf(index), 1) : scope.$activeIndex.push(index);
if (options.sort)
scope.$activeIndex.sort();
} else {
scope.$activeIndex = index;
}
return scope.$activeIndex;
};
$select.select = function (index) {
var value = scope.$matches[index].value;
scope.$apply(function () {
$select.activate(index);
if (options.multiple) {
controller.$setViewValue(scope.$activeIndex.map(function (index) {
return scope.$matches[index].value;
}));
} else {
controller.$setViewValue(value);
// Hide if single select
$select.hide();
}
});
// Emit event
scope.$emit('$select.select', value, index);
};
// Protected methods
$select.$updateActiveIndex = function () {
if (controller.$modelValue && scope.$matches.length) {
if (options.multiple && angular.isArray(controller.$modelValue)) {
scope.$activeIndex = controller.$modelValue.map(function (value) {
return $select.$getIndex(value);
});
} else {
scope.$activeIndex = $select.$getIndex(controller.$modelValue);
}
} else if (scope.$activeIndex >= scope.$matches.length) {
scope.$activeIndex = options.multiple ? [] : 0;
}
};
$select.$isVisible = function () {
if (!options.minLength || !controller) {
return scope.$matches.length;
}
// minLength support
return scope.$matches.length && controller.$viewValue.length >= options.minLength;
};
$select.$isActive = function (index) {
if (options.multiple) {
return scope.$activeIndex.indexOf(index) !== -1;
} else {
return scope.$activeIndex === index;
}
};
$select.$getIndex = function (value) {
var l = scope.$matches.length, i = l;
if (!l)
return;
for (i = l; i
if (scope.$matches[i].value === value)
break;
}
if (i < 0)
return;
return i;
};
$select.$onMouseDown = function (evt) {
// Prevent blur on mousedown on .dropdown-menu
evt.preventDefault();
evt.stopPropagation();
// Emulate click for mobile devices
if (isTouch) {
var targetEl = angular.element(evt.target);
targetEl.triggerHandler('click');
}
};
$select.$onKeyDown = function (evt) {
if (!/(9|13|38|40)/.test(evt.keyCode))
return;
evt.preventDefault();
evt.stopPropagation();
// Select with enter
if (!options.multiple && (evt.keyCode === 13 || evt.keyCode === 9)) {
return $select.select(scope.$activeIndex);
}
// Navigate with keyboard
if (evt.keyCode === 38 && scope.$activeIndex > 0)
scope.$activeIndex
else if (evt.keyCode === 40 && scope.$activeIndex < scope.$matches.length - 1)
scope.$activeIndex++;
else if (angular.isUndefined(scope.$activeIndex))
scope.$activeIndex = 0;
scope.$digest();
};
// Overrides
var _show = $select.show;
$select.show = function () {
_show();
if (options.multiple) {
$select.$element.addClass('select-multiple');
}
setTimeout(function () {
$select.$element.on(isTouch ? 'touchstart' : 'mousedown', $select.$onMouseDown);
if (options.keyboard) {
element.on('keydown', $select.$onKeyDown);
}
});
};
var _hide = $select.hide;
$select.hide = function () {
$select.$element.off(isTouch ? 'touchstart' : 'mousedown', $select.$onMouseDown);
if (options.keyboard) {
element.off('keydown', $select.$onKeyDown);
}
_hide(true);
};
return $select;
}
SelectFactory.defaults = defaults;
return SelectFactory;
}
];
}).directive('bsSelect', [
'$window',
'$parse',
'$q',
'$select',
'$parseOptions',
function ($window, $parse, $q, $select, $parseOptions) {
var defaults = $select.defaults;
return {
restrict: 'EAC',
require: 'ngModel',
link: function postLink(scope, element, attr, controller) {
// Directive options
var options = { scope: scope };
angular.forEach([
'placement',
'container',
'delay',
'trigger',
'keyboard',
'html',
'animation',
'template',
'placeholder',
'multiple',
'maxLength',
'maxLengthHtml'
], function (key) {
if (angular.isDefined(attr[key]))
options[key] = attr[key];
});
// Add support for select markup
if (element[0].nodeName.toLowerCase() === 'select') {
var inputEl = element;
inputEl.css('display', 'none');
element = angular.element('<button type="button" class="btn btn-default"></button>');
inputEl.after(element);
}
// Build proper ngOptions
var parsedOptions = $parseOptions(attr.ngOptions);
// Initialize select
var select = $select(element, controller, options);
// Watch ngOptions values before filtering for changes
var watchedOptions = parsedOptions.$match[7].replace(/\|.+/, '').trim();
scope.$watch(watchedOptions, function (newValue, oldValue) {
// console.warn('scope.$watch(%s)', watchedOptions, newValue, oldValue);
parsedOptions.valuesFn(scope, controller).then(function (values) {
select.update(values);
controller.$render();
});
}, true);
// Watch model for changes
scope.$watch(attr.ngModel, function (newValue, oldValue) {
// console.warn('scope.$watch(%s)', attr.ngModel, newValue, oldValue);
select.$updateActiveIndex();
controller.$render();
}, true);
// Model rendering in view
controller.$render = function () {
// console.warn('$render', element.attr('ng-model'), 'controller.$modelValue', typeof controller.$modelValue, controller.$modelValue, 'controller.$viewValue', typeof controller.$viewValue, controller.$viewValue);
var selected, index;
if (options.multiple && angular.isArray(controller.$modelValue)) {
selected = controller.$modelValue.map(function (value) {
index = select.$getIndex(value);
return angular.isDefined(index) ? select.$scope.$matches[index].label : false;
}).filter(angular.isDefined);
if (selected.length > (options.maxLength || defaults.maxLength)) {
selected = selected.length + ' ' + (options.maxLengthHtml || defaults.maxLengthHtml);
} else {
selected = selected.join(', ');
}
} else {
index = select.$getIndex(controller.$modelValue);
selected = angular.isDefined(index) ? select.$scope.$matches[index].label : false;
}
element.html((selected ? selected : attr.placeholder || defaults.placeholder) + defaults.caretHtml);
};
// Garbage collection
scope.$on('$destroy', function () {
select.destroy();
options = null;
select = null;
});
}
};
}
]);
// Source: tab.js
angular.module('mgcrea.ngStrap.tab', []).run([
'$templateCache',
function ($templateCache) {
$templateCache.put('$pane', '{{pane.content}}');
}
]).provider('$tab', function () {
var defaults = this.defaults = {
animation: 'am-fade',
template: 'tab/tab.tpl.html'
};
this.$get = function () {
return { defaults: defaults };
};
}).directive('bsTabs', [
'$window',
'$animate',
'$tab',
function ($window, $animate, $tab) {
var defaults = $tab.defaults;
return {
restrict: 'EAC',
scope: true,
require: '?ngModel',
templateUrl: function (element, attr) {
return attr.template || defaults.template;
},
link: function postLink(scope, element, attr, controller) {
// Directive options
var options = defaults;
angular.forEach(['animation'], function (key) {
if (angular.isDefined(attr[key]))
options[key] = attr[key];
});
// Require scope as an object
attr.bsTabs && scope.$watch(attr.bsTabs, function (newValue, oldValue) {
scope.panes = newValue;
}, true);
// Add base class
element.addClass('tabs');
// Support animations
if (options.animation) {
element.addClass(options.animation);
}
scope.active = scope.activePane = 0;
// view -> model
scope.setActive = function (index, ev) {
scope.active = index;
if (controller) {
controller.$setViewValue(index);
}
};
// model -> view
if (controller) {
controller.$render = function () {
scope.active = controller.$modelValue * 1;
};
}
}
};
}
]);
// Source: timepicker.js
angular.module('mgcrea.ngStrap.timepicker', [
'mgcrea.ngStrap.helpers.dateParser',
'mgcrea.ngStrap.tooltip'
]).provider('$timepicker', function () {
var defaults = this.defaults = {
animation: 'am-fade',
prefixClass: 'timepicker',
placement: 'bottom-left',
template: 'timepicker/timepicker.tpl.html',
trigger: 'focus',
container: false,
keyboard: true,
html: false,
delay: 0,
useNative: true,
timeType: 'date',
timeFormat: 'shortTime',
modelTimeFormat: null,
autoclose: false,
minTime: -Infinity,
maxTime: +Infinity,
length: 5,
hourStep: 1,
minuteStep: 5,
iconUp: 'glyphicon <API key>',
iconDown: 'glyphicon <API key>'
};
this.$get = [
'$window',
'$document',
'$rootScope',
'$sce',
'$locale',
'dateFilter',
'$tooltip',
function ($window, $document, $rootScope, $sce, $locale, dateFilter, $tooltip) {
var bodyEl = angular.element($window.document.body);
var isTouch = 'createTouch' in $window.document;
var isNative = /(ip(a|o)d|iphone|android)/gi.test($window.navigator.userAgent);
if (!defaults.lang)
defaults.lang = $locale.id;
function timepickerFactory(element, controller, config) {
var $timepicker = $tooltip(element, angular.extend({}, defaults, config));
var parentScope = config.scope;
var options = $timepicker.$options;
var scope = $timepicker.$scope;
// View vars
var selectedIndex = 0;
var startDate = controller.$dateValue || new Date();
var viewDate = {
hour: startDate.getHours(),
meridian: startDate.getHours() < 12,
minute: startDate.getMinutes(),
second: startDate.getSeconds(),
millisecond: startDate.getMilliseconds()
};
var format = $locale.DATETIME_FORMATS[options.timeFormat] || options.timeFormat;
var formats = /(h+)([:\.])?(m+)[ ]?(a?)/i.exec(format).slice(1);
scope.$iconUp = options.iconUp;
scope.$iconDown = options.iconDown;
// Scope methods
scope.$select = function (date, index) {
$timepicker.select(date, index);
};
scope.$moveIndex = function (value, index) {
$timepicker.$moveIndex(value, index);
};
scope.$switchMeridian = function (date) {
$timepicker.switchMeridian(date);
};
// Public methods
$timepicker.update = function (date) {
// console.warn('$timepicker.update() newValue=%o', date);
if (angular.isDate(date) && !isNaN(date.getTime())) {
$timepicker.$date = date;
angular.extend(viewDate, {
hour: date.getHours(),
minute: date.getMinutes(),
second: date.getSeconds(),
millisecond: date.getMilliseconds()
});
$timepicker.$build();
} else if (!$timepicker.$isBuilt) {
$timepicker.$build();
}
};
$timepicker.select = function (date, index, keep) {
// console.warn('$timepicker.select', date, scope.$mode);
if (!controller.$dateValue || isNaN(controller.$dateValue.getTime()))
controller.$dateValue = new Date(1970, 0, 1);
if (!angular.isDate(date))
date = new Date(date);
if (index === 0)
controller.$dateValue.setHours(date.getHours());
else if (index === 1)
controller.$dateValue.setMinutes(date.getMinutes());
controller.$setViewValue(controller.$dateValue);
controller.$render();
if (options.autoclose && !keep) {
$timepicker.hide(true);
}
};
$timepicker.switchMeridian = function (date) {
var hours = (date || controller.$dateValue).getHours();
controller.$dateValue.setHours(hours < 12 ? hours + 12 : hours - 12);
controller.$setViewValue(controller.$dateValue);
controller.$render();
};
// Protected methods
$timepicker.$build = function () {
// console.warn('$timepicker.$build() viewDate=%o', viewDate);
var i, midIndex = scope.midIndex = parseInt(options.length / 2, 10);
var hours = [], hour;
for (i = 0; i < options.length; i++) {
hour = new Date(1970, 0, 1, viewDate.hour - (midIndex - i) * options.hourStep);
hours.push({
date: hour,
label: dateFilter(hour, formats[0]),
selected: $timepicker.$date && $timepicker.$isSelected(hour, 0),
disabled: $timepicker.$isDisabled(hour, 0)
});
}
var minutes = [], minute;
for (i = 0; i < options.length; i++) {
minute = new Date(1970, 0, 1, 0, viewDate.minute - (midIndex - i) * options.minuteStep);
minutes.push({
date: minute,
label: dateFilter(minute, formats[2]),
selected: $timepicker.$date && $timepicker.$isSelected(minute, 1),
disabled: $timepicker.$isDisabled(minute, 1)
});
}
var rows = [];
for (i = 0; i < options.length; i++) {
rows.push([
hours[i],
minutes[i]
]);
}
scope.rows = rows;
scope.showAM = !!formats[3];
scope.isAM = ($timepicker.$date || hours[midIndex].date).getHours() < 12;
scope.timeSeparator = formats[1];
$timepicker.$isBuilt = true;
};
$timepicker.$isSelected = function (date, index) {
if (!$timepicker.$date)
return false;
else if (index === 0) {
return date.getHours() === $timepicker.$date.getHours();
} else if (index === 1) {
return date.getMinutes() === $timepicker.$date.getMinutes();
}
};
$timepicker.$isDisabled = function (date, index) {
var selectedTime;
if (index === 0) {
selectedTime = date.getTime() + viewDate.minute * 60000;
} else if (index === 1) {
selectedTime = date.getTime() + viewDate.hour * 3600000;
}
return selectedTime < options.minTime * 1 || selectedTime > options.maxTime * 1;
};
$timepicker.$moveIndex = function (value, index) {
var targetDate;
if (index === 0) {
targetDate = new Date(1970, 0, 1, viewDate.hour + value * options.length, viewDate.minute);
angular.extend(viewDate, { hour: targetDate.getHours() });
} else if (index === 1) {
targetDate = new Date(1970, 0, 1, viewDate.hour, viewDate.minute + value * options.length * options.minuteStep);
angular.extend(viewDate, { minute: targetDate.getMinutes() });
}
$timepicker.$build();
};
$timepicker.$onMouseDown = function (evt) {
// Prevent blur on mousedown on .dropdown-menu
if (evt.target.nodeName.toLowerCase() !== 'input')
evt.preventDefault();
evt.stopPropagation();
// Emulate click for mobile devices
if (isTouch) {
var targetEl = angular.element(evt.target);
if (targetEl[0].nodeName.toLowerCase() !== 'button') {
targetEl = targetEl.parent();
}
targetEl.triggerHandler('click');
}
};
$timepicker.$onKeyDown = function (evt) {
if (!/(38|37|39|40|13)/.test(evt.keyCode) || evt.shiftKey || evt.altKey)
return;
evt.preventDefault();
evt.stopPropagation();
// Close on enter
if (evt.keyCode === 13)
return $timepicker.hide(true);
// Navigate with keyboard
var newDate = new Date($timepicker.$date);
var hours = newDate.getHours(), hoursLength = dateFilter(newDate, 'h').length;
var minutes = newDate.getMinutes(), minutesLength = dateFilter(newDate, 'mm').length;
var lateralMove = /(37|39)/.test(evt.keyCode);
var count = 2 + !!formats[3] * 1;
// Navigate indexes (left, right)
if (lateralMove) {
if (evt.keyCode === 37)
selectedIndex = selectedIndex < 1 ? count - 1 : selectedIndex - 1;
else if (evt.keyCode === 39)
selectedIndex = selectedIndex < count - 1 ? selectedIndex + 1 : 0;
}
// Update values (up, down)
var selectRange = [
0,
hoursLength
];
if (selectedIndex === 0) {
if (evt.keyCode === 38)
newDate.setHours(hours - parseInt(options.hourStep, 10));
else if (evt.keyCode === 40)
newDate.setHours(hours + parseInt(options.hourStep, 10));
selectRange = [
0,
hoursLength
];
} else if (selectedIndex === 1) {
if (evt.keyCode === 38)
newDate.setMinutes(minutes - parseInt(options.minuteStep, 10));
else if (evt.keyCode === 40)
newDate.setMinutes(minutes + parseInt(options.minuteStep, 10));
selectRange = [
hoursLength + 1,
hoursLength + 1 + minutesLength
];
} else if (selectedIndex === 2) {
if (!lateralMove)
$timepicker.switchMeridian();
selectRange = [
hoursLength + 1 + minutesLength + 1,
hoursLength + 1 + minutesLength + 3
];
}
$timepicker.select(newDate, selectedIndex, true);
createSelection(selectRange[0], selectRange[1]);
parentScope.$digest();
};
// Private
function createSelection(start, end) {
if (element[0].createTextRange) {
var selRange = element[0].createTextRange();
selRange.collapse(true);
selRange.moveStart('character', start);
selRange.moveEnd('character', end);
selRange.select();
} else if (element[0].setSelectionRange) {
element[0].setSelectionRange(start, end);
} else if (angular.isUndefined(element[0].selectionStart)) {
element[0].selectionStart = start;
element[0].selectionEnd = end;
}
}
function focusElement() {
element[0].focus();
}
// Overrides
var _init = $timepicker.init;
$timepicker.init = function () {
if (isNative && options.useNative) {
element.prop('type', 'time');
element.css('-webkit-appearance', 'textfield');
return;
} else if (isTouch) {
element.prop('type', 'text');
element.attr('readonly', 'true');
element.on('click', focusElement);
}
_init();
};
var _destroy = $timepicker.destroy;
$timepicker.destroy = function () {
if (isNative && options.useNative) {
element.off('click', focusElement);
}
_destroy();
};
var _show = $timepicker.show;
$timepicker.show = function () {
_show();
setTimeout(function () {
$timepicker.$element.on(isTouch ? 'touchstart' : 'mousedown', $timepicker.$onMouseDown);
if (options.keyboard) {
element.on('keydown', $timepicker.$onKeyDown);
}
});
};
var _hide = $timepicker.hide;
$timepicker.hide = function (blur) {
$timepicker.$element.off(isTouch ? 'touchstart' : 'mousedown', $timepicker.$onMouseDown);
if (options.keyboard) {
element.off('keydown', $timepicker.$onKeyDown);
}
_hide(blur);
};
return $timepicker;
}
timepickerFactory.defaults = defaults;
return timepickerFactory;
}
];
}).directive('bsTimepicker', [
'$window',
'$parse',
'$q',
'$locale',
'dateFilter',
'$timepicker',
'$dateParser',
'$timeout',
function ($window, $parse, $q, $locale, dateFilter, $timepicker, $dateParser, $timeout) {
var defaults = $timepicker.defaults;
var isNative = /(ip(a|o)d|iphone|android)/gi.test($window.navigator.userAgent);
var <API key> = $window.<API key> || $window.setTimeout;
return {
restrict: 'EAC',
require: 'ngModel',
link: function postLink(scope, element, attr, controller) {
// Directive options
var options = {
scope: scope,
controller: controller
};
angular.forEach([
'placement',
'container',
'delay',
'trigger',
'keyboard',
'html',
'animation',
'template',
'autoclose',
'timeType',
'timeFormat',
'modelTimeFormat',
'useNative',
'hourStep',
'minuteStep',
'length'
], function (key) {
if (angular.isDefined(attr[key]))
options[key] = attr[key];
});
// Initialize timepicker
if (isNative && (options.useNative || defaults.useNative))
options.timeFormat = 'HH:mm';
var timepicker = $timepicker(element, controller, options);
options = timepicker.$options;
// Initialize parser
var dateParser = $dateParser({
format: options.timeFormat,
lang: options.lang
});
// Observe attributes for changes
angular.forEach([
'minTime',
'maxTime'
], function (key) {
// console.warn('attr.$observe(%s)', key, attr[key]);
angular.isDefined(attr[key]) && attr.$observe(key, function (newValue) {
if (newValue === 'now') {
timepicker.$options[key] = new Date().setFullYear(1970, 0, 1);
} else if (angular.isString(newValue) && newValue.match(/^".+"$/)) {
timepicker.$options[key] = +new Date(newValue.substr(1, newValue.length - 2));
} else {
timepicker.$options[key] = dateParser.parse(newValue, new Date(1970, 0, 1, 0));
}
!isNaN(timepicker.$options[key]) && timepicker.$build();
});
});
// Watch model for changes
scope.$watch(attr.ngModel, function (newValue, oldValue) {
// console.warn('scope.$watch(%s)', attr.ngModel, newValue, oldValue, controller.$dateValue);
timepicker.update(controller.$dateValue);
}, true);
// viewValue -> $parsers -> modelValue
controller.$parsers.unshift(function (viewValue) {
// console.warn('$parser("%s"): viewValue=%o', element.attr('ng-model'), viewValue);
// Null values should correctly reset the model value & validity
if (!viewValue) {
controller.$setValidity('date', true);
return;
}
var parsedTime = dateParser.parse(viewValue, controller.$dateValue);
if (!parsedTime || isNaN(parsedTime.getTime())) {
controller.$setValidity('date', false);
} else {
var isValid = parsedTime.getTime() >= options.minTime && parsedTime.getTime() <= options.maxTime;
controller.$setValidity('date', isValid);
// Only update the model when we have a valid date
if (isValid)
controller.$dateValue = parsedTime;
}
if (options.timeType === 'string') {
return dateFilter(parsedTime, options.modelTimeFormat || options.timeFormat);
} else if (options.timeType === 'number') {
return controller.$dateValue.getTime();
} else if (options.timeType === 'iso') {
return controller.$dateValue.toISOString();
} else {
return new Date(controller.$dateValue);
}
});
// modelValue -> $formatters -> viewValue
controller.$formatters.push(function (modelValue) {
// console.warn('$formatter("%s"): modelValue=%o (%o)', element.attr('ng-model'), modelValue, typeof modelValue);
var date;
if (angular.isUndefined(modelValue) || modelValue === null) {
date = NaN;
} else if (angular.isDate(modelValue)) {
date = modelValue;
} else if (options.timeType === 'string') {
date = dateParser.parse(modelValue, null, options.modelTimeFormat);
} else {
date = new Date(modelValue);
}
// Setup default value?
// if(isNaN(date.getTime())) date = new Date(new Date().setMinutes(0) + 36e5);
controller.$dateValue = date;
return controller.$dateValue;
});
// viewValue -> element
controller.$render = function () {
// console.warn('$render("%s"): viewValue=%o', element.attr('ng-model'), controller.$viewValue);
element.val(!controller.$dateValue || isNaN(controller.$dateValue.getTime()) ? '' : dateFilter(controller.$dateValue, options.timeFormat));
};
// Garbage collection
scope.$on('$destroy', function () {
timepicker.destroy();
options = null;
timepicker = null;
});
}
};
}
]);
// Source: tooltip.js
angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.helpers.dimensions']).provider('$tooltip', function () {
var defaults = this.defaults = {
animation: 'am-fade',
prefixClass: 'tooltip',
prefixEvent: 'tooltip',
container: false,
target: false,
placement: 'top',
template: 'tooltip/tooltip.tpl.html',
contentTemplate: false,
trigger: 'hover focus',
keyboard: false,
html: false,
show: false,
title: '',
type: '',
delay: 0
};
this.$get = [
'$window',
'$rootScope',
'$compile',
'$q',
'$templateCache',
'$http',
'$animate',
'dimensions',
'$$rAF',
function ($window, $rootScope, $compile, $q, $templateCache, $http, $animate, dimensions, $$rAF) {
var trim = String.prototype.trim;
var isTouch = 'createTouch' in $window.document;
var htmlReplaceRegExp = /ng-bind="/gi;
function TooltipFactory(element, config) {
var $tooltip = {};
// Common vars
var nodeName = element[0].nodeName.toLowerCase();
var options = $tooltip.$options = angular.extend({}, defaults, config);
$tooltip.$promise = fetchTemplate(options.template);
var scope = $tooltip.$scope = options.scope && options.scope.$new() || $rootScope.$new();
if (options.delay && angular.isString(options.delay)) {
options.delay = parseFloat(options.delay);
}
// Support scope as string options
if (options.title) {
$tooltip.$scope.title = options.title;
}
// Provide scope helpers
scope.$hide = function () {
scope.$$postDigest(function () {
$tooltip.hide();
});
};
scope.$show = function () {
scope.$$postDigest(function () {
$tooltip.show();
});
};
scope.$toggle = function () {
scope.$$postDigest(function () {
$tooltip.toggle();
});
};
$tooltip.$isShown = scope.$isShown = false;
// Private vars
var timeout, hoverState;
// Support contentTemplate option
if (options.contentTemplate) {
$tooltip.$promise = $tooltip.$promise.then(function (template) {
var templateEl = angular.element(template);
return fetchTemplate(options.contentTemplate).then(function (contentTemplate) {
var contentEl = findElement('[ng-bind="content"]', templateEl[0]);
if (!contentEl.length)
contentEl = findElement('[ng-bind="title"]', templateEl[0]);
contentEl.removeAttr('ng-bind').html(contentTemplate);
return templateEl[0].outerHTML;
});
});
}
// Fetch, compile then initialize tooltip
var tipLinker, tipElement, tipTemplate, tipContainer;
$tooltip.$promise.then(function (template) {
if (angular.isObject(template))
template = template.data;
if (options.html)
template = template.replace(htmlReplaceRegExp, 'ng-bind-html="');
template = trim.apply(template);
tipTemplate = template;
tipLinker = $compile(template);
$tooltip.init();
});
$tooltip.init = function () {
// Options: delay
if (options.delay && angular.isNumber(options.delay)) {
options.delay = {
show: options.delay,
hide: options.delay
};
}
// Replace trigger on touch devices ?
// options.trigger.replace(/hover/g, 'click');
// Options : container
if (options.container === 'self') {
tipContainer = element;
} else if (options.container) {
tipContainer = findElement(options.container);
}
// Options: trigger
var triggers = options.trigger.split(' ');
angular.forEach(triggers, function (trigger) {
if (trigger === 'click') {
element.on('click', $tooltip.toggle);
} else if (trigger !== 'manual') {
element.on(trigger === 'hover' ? 'mouseenter' : 'focus', $tooltip.enter);
element.on(trigger === 'hover' ? 'mouseleave' : 'blur', $tooltip.leave);
nodeName === 'button' && trigger !== 'hover' && element.on(isTouch ? 'touchstart' : 'mousedown', $tooltip.$<API key>);
}
});
// Options: target
if (options.target) {
options.target = angular.isElement(options.target) ? options.target : findElement(options.target)[0];
}
// Options: show
if (options.show) {
scope.$$postDigest(function () {
options.trigger === 'focus' ? element[0].focus() : $tooltip.show();
});
}
};
$tooltip.destroy = function () {
// Unbind events
var triggers = options.trigger.split(' ');
for (var i = triggers.length; i
var trigger = triggers[i];
if (trigger === 'click') {
element.off('click', $tooltip.toggle);
} else if (trigger !== 'manual') {
element.off(trigger === 'hover' ? 'mouseenter' : 'focus', $tooltip.enter);
element.off(trigger === 'hover' ? 'mouseleave' : 'blur', $tooltip.leave);
nodeName === 'button' && trigger !== 'hover' && element.off(isTouch ? 'touchstart' : 'mousedown', $tooltip.$<API key>);
}
}
// Remove element
if (tipElement) {
tipElement.remove();
tipElement = null;
}
// Cancel pending callbacks
clearTimeout(timeout);
// Destroy scope
scope.$destroy();
};
$tooltip.enter = function () {
clearTimeout(timeout);
hoverState = 'in';
if (!options.delay || !options.delay.show) {
return $tooltip.show();
}
timeout = setTimeout(function () {
if (hoverState === 'in')
$tooltip.show();
}, options.delay.show);
};
$tooltip.show = function () {
scope.$emit(options.prefixEvent + '.show.before', $tooltip);
var parent = options.container ? tipContainer : null;
var after = options.container ? null : element;
// Hide any existing tipElement
if (tipElement)
tipElement.remove();
// Fetch a cloned element linked from template
tipElement = $tooltip.$element = tipLinker(scope, function (clonedElement, scope) {
});
// Set the initial positioning.
tipElement.css({
top: '-9999px',
left: '-9999px',
display: 'block'
}).addClass(options.placement);
// Options: animation
if (options.animation)
tipElement.addClass(options.animation);
// Options: type
if (options.type)
tipElement.addClass(options.prefixClass + '-' + options.type);
$animate.enter(tipElement, parent, after, function () {
scope.$emit(options.prefixEvent + '.show', $tooltip);
});
$tooltip.$isShown = scope.$isShown = true;
scope.$$phase || scope.$root && scope.$root.$$phase || scope.$digest();
$$rAF($tooltip.$applyPlacement);
// var a = bodyEl.offsetWidth + 1; ?
// Bind events
if (options.keyboard) {
if (options.trigger !== 'focus') {
$tooltip.focus();
tipElement.on('keyup', $tooltip.$onKeyUp);
} else {
element.on('keyup', $tooltip.$onFocusKeyUp);
}
}
};
$tooltip.leave = function () {
clearTimeout(timeout);
hoverState = 'out';
if (!options.delay || !options.delay.hide) {
return $tooltip.hide();
}
timeout = setTimeout(function () {
if (hoverState === 'out') {
$tooltip.hide();
}
}, options.delay.hide);
};
$tooltip.hide = function (blur) {
if (!$tooltip.$isShown)
return;
scope.$emit(options.prefixEvent + '.hide.before', $tooltip);
$animate.leave(tipElement, function () {
scope.$emit(options.prefixEvent + '.hide', $tooltip);
});
$tooltip.$isShown = scope.$isShown = false;
scope.$$phase || scope.$root && scope.$root.$$phase || scope.$digest();
// Unbind events
if (options.keyboard && tipElement !== null) {
tipElement.off('keyup', $tooltip.$onKeyUp);
}
// Allow to blur the input when hidden, like when pressing enter key
if (blur && options.trigger === 'focus') {
return element[0].blur();
}
};
$tooltip.toggle = function () {
$tooltip.$isShown ? $tooltip.leave() : $tooltip.enter();
};
$tooltip.focus = function () {
tipElement[0].focus();
};
// Protected methods
$tooltip.$applyPlacement = function () {
if (!tipElement)
return;
// Get the position of the tooltip element.
var elementPosition = getPosition();
// Get the height and width of the tooltip so we can center it.
var tipWidth = tipElement.prop('offsetWidth'), tipHeight = tipElement.prop('offsetHeight');
// Get the tooltip's top and left coordinates to center it with this directive.
var tipPosition = getCalculatedOffset(options.placement, elementPosition, tipWidth, tipHeight);
// Now set the calculated positioning.
tipPosition.top += 'px';
tipPosition.left += 'px';
tipElement.css(tipPosition);
};
$tooltip.$onKeyUp = function (evt) {
evt.which === 27 && $tooltip.hide();
};
$tooltip.$onFocusKeyUp = function (evt) {
evt.which === 27 && element[0].blur();
};
$tooltip.$<API key> = function (evt) {
evt.preventDefault();
evt.stopPropagation();
// Some browsers do not auto-focus buttons (eg. Safari)
$tooltip.$isShown ? element[0].blur() : element[0].focus();
};
// Private methods
function getPosition() {
if (options.container === 'body') {
return dimensions.offset(options.target || element[0]);
} else {
return dimensions.position(options.target || element[0]);
}
}
function getCalculatedOffset(placement, position, actualWidth, actualHeight) {
var offset;
var split = placement.split('-');
switch (split[0]) {
case 'right':
offset = {
top: position.top + position.height / 2 - actualHeight / 2,
left: position.left + position.width
};
break;
case 'bottom':
offset = {
top: position.top + position.height,
left: position.left + position.width / 2 - actualWidth / 2
};
break;
case 'left':
offset = {
top: position.top + position.height / 2 - actualHeight / 2,
left: position.left - actualWidth
};
break;
default:
offset = {
top: position.top - actualHeight,
left: position.left + position.width / 2 - actualWidth / 2
};
break;
}
if (!split[1]) {
return offset;
}
// Add support for corners @todo css
if (split[0] === 'top' || split[0] === 'bottom') {
switch (split[1]) {
case 'left':
offset.left = position.left;
break;
case 'right':
offset.left = position.left + position.width - actualWidth;
}
} else if (split[0] === 'left' || split[0] === 'right') {
switch (split[1]) {
case 'top':
offset.top = position.top - actualHeight;
break;
case 'bottom':
offset.top = position.top + position.height;
}
}
return offset;
}
return $tooltip;
}
// Helper functions
function findElement(query, element) {
return angular.element((element || document).querySelectorAll(query));
}
function fetchTemplate(template) {
return $q.when($templateCache.get(template) || $http.get(template)).then(function (res) {
if (angular.isObject(res)) {
$templateCache.put(template, res.data);
return res.data;
}
return res;
});
}
return TooltipFactory;
}
];
}).directive('bsTooltip', [
'$window',
'$location',
'$sce',
'$tooltip',
'$$rAF',
function ($window, $location, $sce, $tooltip, $$rAF) {
return {
restrict: 'EAC',
scope: true,
link: function postLink(scope, element, attr, transclusion) {
// Directive options
var options = { scope: scope };
angular.forEach([
'template',
'contentTemplate',
'placement',
'container',
'target',
'delay',
'trigger',
'keyboard',
'html',
'animation',
'type'
], function (key) {
if (angular.isDefined(attr[key]))
options[key] = attr[key];
});
// Observe scope attributes for change
angular.forEach(['title'], function (key) {
attr[key] && attr.$observe(key, function (newValue, oldValue) {
scope[key] = $sce.trustAsHtml(newValue);
angular.isDefined(oldValue) && $$rAF(function () {
tooltip && tooltip.$applyPlacement();
});
});
});
// Support scope as an object
attr.bsTooltip && scope.$watch(attr.bsTooltip, function (newValue, oldValue) {
if (angular.isObject(newValue)) {
angular.extend(scope, newValue);
} else {
scope.title = newValue;
}
angular.isDefined(oldValue) && $$rAF(function () {
tooltip && tooltip.$applyPlacement();
});
}, true);
// Initialize popover
var tooltip = $tooltip(element, options);
// Garbage collection
scope.$on('$destroy', function () {
tooltip.destroy();
options = null;
tooltip = null;
});
}
};
}
]);
// Source: typeahead.js
angular.module('mgcrea.ngStrap.typeahead', [
'mgcrea.ngStrap.tooltip',
'mgcrea.ngStrap.helpers.parseOptions'
]).provider('$typeahead', function () {
var defaults = this.defaults = {
animation: 'am-fade',
prefixClass: 'typeahead',
placement: 'bottom-left',
template: 'typeahead/typeahead.tpl.html',
trigger: 'focus',
container: false,
keyboard: true,
html: false,
delay: 0,
minLength: 1,
filter: 'filter',
limit: 6
};
this.$get = [
'$window',
'$rootScope',
'$tooltip',
function ($window, $rootScope, $tooltip) {
var bodyEl = angular.element($window.document.body);
function TypeaheadFactory(element, controller, config) {
var $typeahead = {};
// Common vars
var options = angular.extend({}, defaults, config);
$typeahead = $tooltip(element, options);
var parentScope = config.scope;
var scope = $typeahead.$scope;
scope.$resetMatches = function () {
scope.$matches = [];
scope.$activeIndex = 0;
};
scope.$resetMatches();
scope.$activate = function (index) {
scope.$$postDigest(function () {
$typeahead.activate(index);
});
};
scope.$select = function (index, evt) {
scope.$$postDigest(function () {
$typeahead.select(index);
});
};
scope.$isVisible = function () {
return $typeahead.$isVisible();
};
// Public methods
$typeahead.update = function (matches) {
scope.$matches = matches;
if (scope.$activeIndex >= matches.length) {
scope.$activeIndex = 0;
}
};
$typeahead.activate = function (index) {
scope.$activeIndex = index;
};
$typeahead.select = function (index) {
var value = scope.$matches[index].value;
controller.$setViewValue(value);
controller.$render();
scope.$resetMatches();
if (parentScope)
parentScope.$digest();
// Emit event
scope.$emit('$typeahead.select', value, index);
};
// Protected methods
$typeahead.$isVisible = function () {
if (!options.minLength || !controller) {
return !!scope.$matches.length;
}
// minLength support
return scope.$matches.length && angular.isString(controller.$viewValue) && controller.$viewValue.length >= options.minLength;
};
$typeahead.$getIndex = function (value) {
var l = scope.$matches.length, i = l;
if (!l)
return;
for (i = l; i
if (scope.$matches[i].value === value)
break;
}
if (i < 0)
return;
return i;
};
$typeahead.$onMouseDown = function (evt) {
// Prevent blur on mousedown
evt.preventDefault();
evt.stopPropagation();
};
$typeahead.$onKeyDown = function (evt) {
if (!/(38|40|13)/.test(evt.keyCode))
return;
evt.preventDefault();
evt.stopPropagation();
// Select with enter
if (evt.keyCode === 13 && scope.$matches.length) {
$typeahead.select(scope.$activeIndex);
} // Navigate with keyboard
else if (evt.keyCode === 38 && scope.$activeIndex > 0)
scope.$activeIndex
else if (evt.keyCode === 40 && scope.$activeIndex < scope.$matches.length - 1)
scope.$activeIndex++;
else if (angular.isUndefined(scope.$activeIndex))
scope.$activeIndex = 0;
scope.$digest();
};
// Overrides
var show = $typeahead.show;
$typeahead.show = function () {
show();
setTimeout(function () {
$typeahead.$element.on('mousedown', $typeahead.$onMouseDown);
if (options.keyboard) {
element.on('keydown', $typeahead.$onKeyDown);
}
});
};
var hide = $typeahead.hide;
$typeahead.hide = function () {
$typeahead.$element.off('mousedown', $typeahead.$onMouseDown);
if (options.keyboard) {
element.off('keydown', $typeahead.$onKeyDown);
}
hide();
};
return $typeahead;
}
TypeaheadFactory.defaults = defaults;
return TypeaheadFactory;
}
];
}).directive('bsTypeahead', [
'$window',
'$parse',
'$q',
'$typeahead',
'$parseOptions',
function ($window, $parse, $q, $typeahead, $parseOptions) {
var defaults = $typeahead.defaults;
return {
restrict: 'EAC',
require: 'ngModel',
link: function postLink(scope, element, attr, controller) {
// Directive options
var options = { scope: scope };
angular.forEach([
'placement',
'container',
'delay',
'trigger',
'keyboard',
'html',
'animation',
'template',
'filter',
'limit',
'minLength'
], function (key) {
if (angular.isDefined(attr[key]))
options[key] = attr[key];
});
// Build proper ngOptions
var filter = options.filter || defaults.filter;
var limit = options.limit || defaults.limit;
var ngOptions = attr.ngOptions;
if (filter)
ngOptions += ' | ' + filter + ':$viewValue';
if (limit)
ngOptions += ' | limitTo:' + limit;
var parsedOptions = $parseOptions(ngOptions);
// Initialize typeahead
var typeahead = $typeahead(element, controller, options);
// Watch model for changes
scope.$watch(attr.ngModel, function (newValue, oldValue) {
// console.warn('$watch', element.attr('ng-model'), newValue);
scope.$modelValue = newValue;
// Publish modelValue on scope for custom templates
parsedOptions.valuesFn(scope, controller).then(function (values) {
if (values.length > limit)
values = values.slice(0, limit);
// Do not re-queue an update if a correct value has been selected
if (values.length === 1 && values[0].value === newValue)
return;
typeahead.update(values);
// Queue a new rendering that will leverage collection loading
controller.$render();
});
});
// Model rendering in view
controller.$render = function () {
// console.warn('$render', element.attr('ng-model'), 'controller.$modelValue', typeof controller.$modelValue, controller.$modelValue, 'controller.$viewValue', typeof controller.$viewValue, controller.$viewValue);
if (controller.$isEmpty(controller.$viewValue))
return element.val('');
var index = typeahead.$getIndex(controller.$modelValue);
var selected = angular.isDefined(index) ? typeahead.$scope.$matches[index].label : controller.$viewValue;
selected = angular.isObject(selected) ? selected.label : selected;
element.val(selected.replace(/<(?:.|\n)*?>/gm, '').trim());
};
// Garbage collection
scope.$on('$destroy', function () {
typeahead.destroy();
options = null;
typeahead = null;
});
}
};
}
]);
})(window, document); |
[](https://david-dm.org/afonsopacifer/react-pomodoro#info=devDependencies)
> Pomodoro timer for developers.

## Features
- **Add to homescreen**
- **Offline support**
- **Times available:**
- Timer for code - 25min
- Timer for social - 5min
- Timer for Coffee - 15min
- **Time display:**
- Page display
- Title display <br><br>

- **Alarms available:**
- Web Notifications <br>

- Vibration
- Songs
- **Basic controls:**
- Play button
- Pause button
- **Keyboard Shortcuts**
- Space: Play
- Ctrl/Command + Left: Toggle mode
- Ctrl/Command + Right: Toggle mode
## Versioning
To keep better organization of releases we follow the [Semantic Versioning 2.0.0](http://semver.org/) guidelines.
## Run the project locally
**1 -** Prepare the environment:
sh
$ npm install -g webpack
**2 -** Clone the project and install the dependencies:
sh
$ git clone https://github.com/afonsopacifer/react-pomodoro.git
$ cd react-pomodoro
$ npm install
**3 -** Run webpack and webpack-dev-server:
sh
$ npm start
Go to: [localhost:8080](http://localhost:8080/)
## Tasks available
- `$ npm start` - Run webpack and webpack-dev-server
- `$ npm run lint` - ESlint :D
- `$ npm run test` - Run mocha tests
- `$ npm run build` - Generates the bundle.js
- `$ npm run deploy` - Push for gh-pages
## Contributing
Find on our [issues](https://github.com/afonsopacifer/react-pomodoro/issues/) the next steps of the project ;)
<br>
Want to contribute? [Follow these recommendations](https://github.com/afonsopacifer/react-pomodoro/blob/master/CONTRIBUTING.md).
## History
See [Releases](https://github.com/afonsopacifer/react-pomodoro/releases) for detailed changelog.
[MIT License](https: |
<!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>
QEL -
Complete profile - Canadian Company Capabilities - Industries and Business - Industry Canada
</title>
<!-- Title ends / Fin du titre -->
<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/<API key>.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="
<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.<API key>(s)[0], j=d.createElement(s),dl=l!='dataLayer1'?'&l='+l:'';j.async=true;j.src='
<!-- End Google Tag Manager -->
<!-- EPI-12801 -->
<span typeof="Organization"><meta property="legalName" content="<API key>"></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=1492312829873&V_SEARCH.docsCount=3&V_DOCUMENT.docRank=37862&V_SEARCH.docsStart=37861&V_SEARCH.command=navigate&V_SEARCH.resultsJSP=/prfl.do&lang=fra&redirectUrl=/app/scr/imbs/ccc/rgstrtn/rgstr.sec?_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:
</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="<API key>">
<h2 class="wb-inv">Topics menu</h2>
<div class="container nvbar">
<div class="row">
<ul class="list-inline menu">
<li><a href="https:
<li><a href="http:
<li><a href="https://travel.gc.ca/">Travel</a></li>
<li><a href="https:
<li><a href="https:
<li><a href="http://healthycanadians.gc.ca/index-eng.php">Health</a></li>
<li><a href="https:
<li><a href="https:
</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=37860&V_DOCUMENT.docRank=37861&V_SEARCH.docsCount=3&lang=eng&prtl=1&sbPrtl=&profile=cmpltPrfl&V_TOKEN=1492312849661&V_SEARCH.command=navigate&V_SEARCH.resultsJSP=%2fprfl.do&estblmntNo=234567000181&profileId=&key.newSearchLabel=">Previous Company</a></li>
<li>| <a href="nvgt.do?V_SEARCH.docsStart=37862&V_DOCUMENT.docRank=37863&V_SEARCH.docsCount=3&lang=eng&prtl=1&sbPrtl=&profile=cmpltPrfl&V_TOKEN=1492312849661&V_SEARCH.command=navigate&V_SEARCH.resultsJSP=%2fprfl.do&estblmntNo=234567145247&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>
Quatrosense Environmental Ltd.
</h2>
<div class="row">
<div class="col-md-5">
<h2 class="h5 mrgn-bttm-0">Legal Name:</h2>
<p>Quatrosense Environmental Ltd.</p>
<h2 class="h5 mrgn-bttm-0">Operating Name:</h2>
<p>QEL</p>
<h2 class="h5 mrgn-bttm-0">Alternate Name:</h2>
<p class="mrgn-bttm-0">Quatrosense Environmental Ltd.</p>
<div class="mrgn-tp-md"></div>
<p class="mrgn-bttm-0" ><a href="http:
target="_blank" title="Website URL">http:
<p><a href="mailto:QEL@QELsafety.com" title="QEL@QELsafety.com">QEL@QELsafety.com</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">
P.O. Box 749<br/>
5935 Ottawa St<br/>
RICHMOND,
Ontario<br/>
K0A 2Z0
<br/>
</address>
<h2 class="h5 mrgn-bttm-0">Location Address:</h2>
<address class="mrgn-bttm-md">
5935 Ottawa St<br/>
RICHMOND,
Ontario<br/>
K0A 2Z0
<br/>
</address>
<p class="mrgn-bttm-0"><abbr title="Telephone">Tel.</abbr>:
(613) 838-4005
</p>
<p class="mrgn-bttm-lg"><abbr title="Facsimile">Fax</abbr>:
(613) 838-4018</p>
</div>
<div class="col-md-3 mrgn-tp-md">
</div>
</div>
<div class="row mrgn-tp-md mrgn-bttm-md">
<div class="col-md-12">
<h2 class="wb-inv">Company Profile</h2>
<br> QEL (Quatrosense Environmental Ltd.) is a world leading Canadian
<br>manufacturer of gas detection equipment. Our product mix includes
<br>toxic transmitters/sensors, combustible transmitters/sensors,
<br>single through multi-channel analog and digital controllers,
<br>landfill gas analysers, combustion analysers and flame detectors.
<br>Electrochemical, catalytic, solid state and infrared sensor
<br>technologies employed.<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>
Simon
Warland
</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
Manager
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Area of Responsibility:
</strong>
</div>
<div class="col-md-7">
Customer Service.
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Telephone:
</strong>
</div>
<div class="col-md-7">
(613) 838-4005
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Ext:
</strong>
</div>
<div class="col-md-7">
315
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Facsimile:
</strong>
</div>
<div class="col-md-7">
(613) 838-4018
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Email:
</strong>
</div>
<div class="col-md-7">
swarland@qelsafety.com
</div>
</div>
<div class="row mrgn-tp-lg">
<div class="col-md-3">
<strong>
DAVID M.
JENKINS
</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
President
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Area of Responsibility:
</strong>
</div>
<div class="col-md-7">
Management Executive.
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Telephone:
</strong>
</div>
<div class="col-md-7">
(613) 838-4005
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Facsimile:
</strong>
</div>
<div class="col-md-7">
(613) 838-4018
</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">
1986
</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>
Primary Industry (NAICS):
</strong>
</div>
<div class="col-md-7">
334512 - Measuring, Medical and Controlling Devices Manufacturing
</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">
$1,000,000 to $4,999,999
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Export Sales ($CDN):
</strong>
</div>
<div class="col-md-7">
$500,000 to $999,999
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Number of Employees:
</strong>
</div>
<div class="col-md-7">
30
</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">
ENVIRONMENTAL - AIR QUALITY-INDOOR AIR - toxic / combustible gas detection <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-12">
Gas detection<br>
<br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
ENVIRONMENTAL - AIR QUALITY-SMOKESTACK EMISSIONS <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
ENVIRONMENTAL - SEWAGE TREATMENT PLANTS - toxic/combustible gas detection <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
EQUIPMENT OR INSTRUMENT DEVELOPMENT <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
FLAME DETECTORS <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
MUNICIPAL SOLID WASTE - toxic / combustible gas detection, landfill gas analysers, combustion analysers <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
FOOD AND BEVERAGE INDUSTRY - toxic / combustible gas detection <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
MINING AND METALLURGY INDUSTRY - toxic / combustible gas detection <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
PETROLEUM AND COAL INDUSTRY - toxic / combustible gas detection, combustion analysers <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
PULP AND PAPER INDUSTRY - toxic / combustible gas detection <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
SANITARY LANDFILLS - landfill gas analysers <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
INCINERATORS - combustion analysers, toxic / combustible gas detection <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
WATER PURIFICATION PLANTS - toxic / combustible gas detection <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
GAS DETECTION - toxic / combustible <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
GAS DETECTORS - toxic / combustible <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Service Name:
</strong>
</div>
<div class="col-md-9">
FIELD SAMPLING AND MONITORING <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 -->
<h3 class="page-header">
Technology profile
</h3>
<section class="container-fluid">
Manufacturer of fixed gas detection products.
</section>
<!-- Market Profile -->
<h3 class="page-header">
Market profile
</h3>
<section class="container-fluid">
<h4>
Industry sector market interests:
</h4>
<ul>
<li>Agriculture</li>
<li>Construction</li>
<li>Environment</li>
<li>Forestry</li>
<li>Manufacturing</li>
<li>Medical/Biotechnology/Chemical</li>
<li>Mining/Petroleum/Gas</li>
<li>Transportation</li>
<li>Aerospace</li>
<li>Defence</li>
<li>Automotive</li>
<li>Food and Beverage Manufacturing</li>
<li>Furniture and Wood Product</li>
<li>Pulp and Paper</li>
<li>Plastics and Rubber Products</li>
<li>Electrical Equipment</li>
<li>Textile and Clothing</li>
</ul>
<h4>
Geographic markets:
</h4>
<h5>
Export experience:
</h5>
<ul>
<li>China</li>
<li>Finland</li>
<li>Hong Kong</li>
<li>Japan</li>
<li>Taiwan</li>
<li>United Kingdom</li>
<li>United States</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>
Simon
Warland
</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
Manager
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Area of Responsibility:
</strong>
</div>
<div class="col-md-7">
Customer Service.
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Telephone:
</strong>
</div>
<div class="col-md-7">
(613) 838-4005
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Ext:
</strong>
</div>
<div class="col-md-7">
315
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Facsimile:
</strong>
</div>
<div class="col-md-7">
(613) 838-4018
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Email:
</strong>
</div>
<div class="col-md-7">
swarland@qelsafety.com
</div>
</div>
<div class="row mrgn-tp-lg">
<div class="col-md-3">
<strong>
DAVID M.
JENKINS
</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
President
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Area of Responsibility:
</strong>
</div>
<div class="col-md-7">
Management Executive.
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Telephone:
</strong>
</div>
<div class="col-md-7">
(613) 838-4005
</div>
</div>
<div class="row mrgn-lft-md">
<div class="col-md-5">
<strong>
Facsimile:
</strong>
</div>
<div class="col-md-7">
(613) 838-4018
</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">
1986
</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>
Primary Industry (NAICS):
</strong>
</div>
<div class="col-md-7">
334512 - Measuring, Medical and Controlling Devices Manufacturing
</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">
$1,000,000 to $4,999,999
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Export Sales ($CDN):
</strong>
</div>
<div class="col-md-7">
$500,000 to $999,999
</div>
</div>
<div class="row">
<div class="col-md-5">
<strong>
Number of Employees:
</strong>
</div>
<div class="col-md-7">
30
</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">
ENVIRONMENTAL - AIR QUALITY-INDOOR AIR - toxic / combustible gas detection <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-12">
Gas detection<br>
<br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
ENVIRONMENTAL - AIR QUALITY-SMOKESTACK EMISSIONS <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
ENVIRONMENTAL - SEWAGE TREATMENT PLANTS - toxic/combustible gas detection <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
EQUIPMENT OR INSTRUMENT DEVELOPMENT <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
FLAME DETECTORS <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
MUNICIPAL SOLID WASTE - toxic / combustible gas detection, landfill gas analysers, combustion analysers <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
FOOD AND BEVERAGE INDUSTRY - toxic / combustible gas detection <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
MINING AND METALLURGY INDUSTRY - toxic / combustible gas detection <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
PETROLEUM AND COAL INDUSTRY - toxic / combustible gas detection, combustion analysers <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
PULP AND PAPER INDUSTRY - toxic / combustible gas detection <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
SANITARY LANDFILLS - landfill gas analysers <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
INCINERATORS - combustion analysers, toxic / combustible gas detection <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
WATER PURIFICATION PLANTS - toxic / combustible gas detection <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
GAS DETECTION - toxic / combustible <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Product Name:
</strong>
</div>
<div class="col-md-9">
GAS DETECTORS - toxic / combustible <br>
</div>
</div>
<div class="row mrgn-bttm-md">
<div class="col-md-3">
<strong>
Service Name:
</strong>
</div>
<div class="col-md-9">
FIELD SAMPLING AND MONITORING <br>
</div>
</div>
</section>
</details>
<details id="details-panel5">
<summary>
Technology
</summary>
<h2 class="wb-invisible">
Technology profile
</h2>
<section class="container-fluid">
Manufacturer of fixed gas detection products.
</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>Agriculture</li>
<li>Construction</li>
<li>Environment</li>
<li>Forestry</li>
<li>Manufacturing</li>
<li>Medical/Biotechnology/Chemical</li>
<li>Mining/Petroleum/Gas</li>
<li>Transportation</li>
<li>Aerospace</li>
<li>Defence</li>
<li>Automotive</li>
<li>Food and Beverage Manufacturing</li>
<li>Furniture and Wood Product</li>
<li>Pulp and Paper</li>
<li>Plastics and Rubber Products</li>
<li>Electrical Equipment</li>
<li>Textile and Clothing</li>
</ul>
<h4>
Geographic markets:
</h4>
<h5>
Export experience:
</h5>
<ul>
<li>China</li>
<li>Finland</li>
<li>Hong Kong</li>
<li>Japan</li>
<li>Taiwan</li>
<li>United Kingdom</li>
<li>United States</li>
</ul>
</section>
</details>
</div>
</div>
<div class="row">
<div class="col-md-12 text-right">
Last Update Date 2016-02-09
</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:
<li><a href="https:
<li><a href="https:
<li><a href="https:
<li><a href="https:
<li><a href="http://pm.gc.ca/eng">Prime Minister</a></li>
<li><a href="https:
<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:
<li><a href="https:
<li><a href="http://www1.canada.ca/en/newsite.html">About Canada.ca</a></li>
<li><a href="http:
<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 <API key>"></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.<API key>.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="
</noscript>
<!-- /Webtrends -->
<!-- JS deps -->
<script src="/eic/home.nsf/js/jquery.imagesloaded.js"></script>
<!-- EPI-11262 - Util JS -->
<script src="/eic/home.nsf/js/<API key>.min.js"></script>
<!-- EPI-11383 -->
<script src="/eic/home.nsf/js/jQuery.icValidationErrors.js"></script>
<span style="display:none;" id='app-info' <API key>='' <API key>='' <API key>='' <API key>='' data-issue-tracking='' data-scm-sha1='' <API key>='' data-scm-branch='' <API key>=''></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 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import bottle
from situation_change import *
timeline = EventTimeLine()
registry = PersonRegistry(timeline)
read_registry = <API key>()
timeline.add_subscriber(read_registry)
timeline.add_subscriber(BasicLogger())
app = bottle.Bottle()
@app.route('/')
def index():
return bottle.static_file('index.htm', 'static')
@app.route('/create', method='POST')
def create():
forms = bottle.request.forms
lastname = forms.get('lastname')
firstname = forms.get('firstname')
status = forms.get('status')
person_id = registry.create(
Person(status, Address(None, None), Name(firstname, lastname))
)
bottle.redirect('/{0}'.format(person_id))
@app.route('/<person_id>')
@bottle.view('person')
def get(person_id):
p = read_registry.get_person_by_id(int(person_id))
return {
'p': p,
'person_id': person_id,
'statuses': [(Person.MARRIED, 'Married'), (Person.SINGLE, 'Single')]
}
@app.route('/<person_id>/change_address', method='POST')
def change_address(person_id):
forms = bottle.request.forms
registry.move_house(int(person_id), Address(forms['new_street'], forms['new_city']))
bottle.redirect('/{0}'.format(person_id))
@app.route('/<person_id>/change_status', method='POST')
def change_status(person_id):
forms = bottle.request.forms
registry.change_status(int(person_id), int(forms['new_status']))
bottle.redirect('/{0}'.format(person_id))
bottle.debug(True)
app.run(host='localhost', port=8080, reloader=True) |
module SimpleFormClass
class Base
<API key> = [ :attributes, :attributes=, :valid?, :save ]
extend ActiveModel::Callbacks
extend ActiveModel::Naming
include ActiveModel::Conversion
include ActiveModel::Validations
include ActiveModel::Serialization # TODO: remove?
include ActiveModel::Naming if defined?(ActiveModel::Naming)
<API key> :save, :initialize, :validation
attr_accessor :params
alias_method :attributes, :params
attr_accessor :options
def initialize(params = nil, options = {})
run_callbacks :initialize do
@params = params || {}
@options = options
yield self if block_given?
<API key>!
self.attributes = @params
end
end
#yes, this method is needed, form breaks without it
#check why later
def persisted?
false
end
# keep this before other validators, this will make sure all owners have been
# valid?-ated so their errors.messages is present
validate :<API key>
def self.field field_name, options = {}
add_owner options[:owner]
@fields ||= {}
@fields[field_name] = options
if options[:owner] == :self
attr_accessor field_name
else
delegate field_name, "#{field_name}=", :to => options[:owner], :null => false
end
end
# will require owner to be valid in order for form to be valid
def self.validates_owner owner, options = {}
validates_with SimpleFormClass::OwnerValidator, options.merge(owner: owner)
end
def self.<API key> attribute, *args, &block
field = fields[attribute.to_s.to_sym] || {}
if field[:localized_by]
field[:localized_by].constantize.<API key> attribute, *args, &block
else
super(attribute, *args, &block)
end
end
def self.owners
@owners ||= []
@owners = @owners_setup.keys + superclass.owners if superclass.respond_to? :owners
@owners.uniq
end
def self.fields
@fields ||= {}
@fields.merge! superclass.fields if superclass.respond_to? :fields
@fields
end
def options
@options || {}
end
def owners(*args)
owner_hash(*args).values.compact
end
def self.fields_for_owner owner
fields.reject{|k,v| not v[:owner] == owner}.keys
end
def self.<API key> owner
fields.reject{|k,v| not (v[:owner] == owner and v[:write])}.keys
end
def save(*args)
local_options = args.last.is_a?(Hash) ? args.last : {}
validate = local_options.has_key?(:validate) ? local_options[:validate] : true
if validate
return false unless valid?
end
ActiveRecord::Base.transaction do
run_callbacks :save do
not owners(except_self: true).map{ |owner| owner.save(*args) }.include?(false)
end
end
end
def save!
save || raise(ActiveRecord::RecordInvalid.new(self))
end
def self.add_owner owner, options = {}
@owners_setup ||= {}
attr_accessor owner unless @owners_setup.keys.include? owner
@owners_setup[owner] ||= {}
@owners_setup[owner].merge! options
end
def attributes=(attributes)
self.class.owners.each do |owner|
owners_hash = <API key> owner, attributes
<API key> = owner == :self ? :private_attributes= : :attributes=
get_owner(owner).send(
<API key>,
if defined?(ActionController::Parameters) && owners_hash.is_a?(ActionController::Parameters)
owners_hash.permit(
*self.class.<API key>(owner)
)
else
owners_hash
end
)
end
end
private
def <API key>
self.class.owners.each do |owner_sym|
next if owner_sym == :self
owner = send owner_sym
if owner && !owner.valid?
<API key> owner
end
end
end
def <API key> owner
owner.errors.messages.each do |attribute, messages|
next unless self.class.fields.has_key? attribute
messages.each do |message|
errors.add(attribute, message)
end
end
end
def <API key> owner, attributes = attributes
attributes.slice(*self.class.fields_for_owner(owner))
end
def get_owner(owner)
if owner == :self
self
else
send(owner)
end
end
def private_attributes=(attributes)
attributes.each do |k,v|
send("#{k}=", v)
end
end
def owner_hash(options = {})
# options[:except_self]
Hash[
self.class.owners.map do |owner_sym|
[
owner_sym,
if owner_sym == :self and options[:except_self]
nil
else
get_owner owner_sym
end
]
end
]
end
def <API key>!
owner_hash.each do |owner_sym, owner|
<API key> = <API key>.detect{ |method| not owner.respond_to? method, true }
if <API key>
raise InvalidOwner, "owner '#{owner_sym}' thas is of class #{owner.class} should behave like an ActiveModel object, but it doesn't respond to ##{<API key>}"
end
end
end
protected
def <API key>!(*args, &block)
run_callbacks :validation do
<API key>!(*args, &block)
true
end
errors.empty?
end
alias_method_chain :run_validations!, :validation_callback
end
end |
// TmxMap.cpp
// modification, are permitted provided that the following conditions are met:
// documentation and/or other materials provided with the distribution.
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL TAMIR ATIAS BE LIABLE FOR ANY
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <tinyxml.h>
#include <stdio.h>
#include "TmxMap.h"
#include "TmxTileset.h"
#include "TmxLayer.h"
#include "TmxObjectGroup.h"
#include "TmxImageLayer.h"
#ifdef USE_SDL2_LOAD
#include <SDL.h>
#endif
using std::vector;
using std::string;
namespace Tmx
{
Map::Map()
: file_name()
, file_path()
, version(0.0)
, orientation(TMX_MO_ORTHOGONAL)
, width(0)
, height(0)
, tile_width(0)
, tile_height(0)
, layers()
, object_groups()
, tilesets()
, has_error(false)
, error_code(0)
, error_text()
{}
Map::~Map()
{
// Iterate through all of the object groups and delete each of them.
vector< ObjectGroup* >::iterator ogIter;
for (ogIter = object_groups.begin(); ogIter != object_groups.end(); ++ogIter)
{
ObjectGroup *objectGroup = (*ogIter);
if (objectGroup)
{
delete objectGroup;
objectGroup = NULL;
}
}
// Iterate through all of the layers and delete each of them.
vector< Layer* >::iterator lIter;
for (lIter = layers.begin(); lIter != layers.end(); ++lIter)
{
Layer *layer = (*lIter);
if (layer)
{
delete layer;
layer = NULL;
}
}
// Iterate through all of the layers and delete each of them.
vector< ImageLayer* >::iterator ilIter;
for (ilIter = image_layers.begin(); ilIter != image_layers.end(); ++ilIter)
{
ImageLayer *layer = (*ilIter);
if (layer)
{
delete layer;
layer = NULL;
}
}
// Iterate through all of the tilesets and delete each of them.
vector< Tileset* >::iterator tsIter;
for (tsIter = tilesets.begin(); tsIter != tilesets.end(); ++tsIter)
{
Tileset *tileset = (*tsIter);
if (tileset)
{
delete tileset;
tileset = NULL;
}
}
}
void Map::ParseFile(const string &fileName)
{
file_name = fileName;
int lastSlash = fileName.find_last_of("/");
// Get the directory of the file using substring.
if (lastSlash > 0)
{
file_path = fileName.substr(0, lastSlash + 1);
}
else
{
file_path = "";
}
char* fileText;
int fileSize;
// Open the file for reading.
#ifdef USE_SDL2_LOAD
SDL_RWops * file = SDL_RWFromFile (fileName.c_str(), "rb");
#else
FILE *file = fopen(fileName.c_str(), "rb");
#endif
// Check if the file could not be opened.
if (!file)
{
has_error = true;
error_code = TMX_COULDNT_OPEN;
error_text = "Could not open the file.";
return;
}
// Find out the file size.
#ifdef USE_SDL2_LOAD
fileSize = file->size(file);
#else
fseek(file, 0, SEEK_END);
fileSize = ftell(file);
fseek(file, 0, SEEK_SET);
#endif
// Check if the file size is valid.
if (fileSize <= 0)
{
has_error = true;
error_code = <API key>;
error_text = "The size of the file is invalid.";
return;
}
// Allocate memory for the file and read it into the memory.
fileText = new char[fileSize + 1];
fileText[fileSize] = 0;
#ifdef USE_SDL2_LOAD
file->read(file, fileText, 1, fileSize);
#else
fread(fileText, 1, fileSize, file);
#endif
#ifdef USE_SDL2_LOAD
file->close(file);
#else
fclose(file);
#endif
// Copy the contents into a C++ string and delete it from memory.
std::string text(fileText, fileText+fileSize);
delete [] fileText;
ParseText(text);
}
void Map::ParseText(const string &text)
{
// Create a tiny xml document and use it to parse the text.
TiXmlDocument doc;
doc.Parse(text.c_str());
// Check for parsing errors.
if (doc.Error())
{
has_error = true;
error_code = TMX_PARSING_ERROR;
error_text = doc.ErrorDesc();
return;
}
TiXmlNode *mapNode = doc.FirstChild("map");
TiXmlElement* mapElem = mapNode->ToElement();
// Read the map attributes.
mapElem->Attribute("version", &version);
mapElem->Attribute("width", &width);
mapElem->Attribute("height", &height);
mapElem->Attribute("tilewidth", &tile_width);
mapElem->Attribute("tileheight", &tile_height);
//check for optional backgroundcolor attribute
auto backgroundColorPtr = mapElem->Attribute("backgroundcolor");
background_color = (backgroundColorPtr == NULL) ? "" : backgroundColorPtr;
// Read the orientation
std::string orientationStr = mapElem->Attribute("orientation");
if (!orientationStr.compare("orthogonal"))
{
orientation = TMX_MO_ORTHOGONAL;
}
else if (!orientationStr.compare("isometric"))
{
orientation = TMX_MO_ISOMETRIC;
}
else if (!orientationStr.compare("staggered"))
{
orientation = TMX_MO_STAGGERED;
}
const TiXmlNode *node = mapElem->FirstChild();
int zOrder = 0;
while( node )
{
// Read the map properties.
if( strcmp( node->Value(), "properties" ) == 0 )
{
properties.Parse(node);
}
// Iterate through all of the tileset elements.
if( strcmp( node->Value(), "tileset" ) == 0 )
{
// Allocate a new tileset and parse it.
Tileset *tileset = new Tileset();
tileset->Parse(node->ToElement());
// Add the tileset to the list.
tilesets.push_back(tileset);
}
// Iterate through all of the layer elements.
if( strcmp( node->Value(), "layer" ) == 0 )
{
// Allocate a new layer and parse it.
Layer *layer = new Layer(this);
layer->Parse(node);
layer->SetZOrder( zOrder );
++zOrder;
// Add the layer to the list.
layers.push_back(layer);
}
// Iterate through all of the imagen layer elements.
if( strcmp( node->Value(), "imagelayer" ) == 0 )
{
// Allocate a new layer and parse it.
ImageLayer *imageLayer = new ImageLayer(this);
imageLayer->Parse(node);
imageLayer->SetZOrder( zOrder );
++zOrder;
// Add the layer to the list.
image_layers.push_back(imageLayer);
}
// Iterate through all of the objectgroup elements.
if( strcmp( node->Value(), "objectgroup" ) == 0 )
{
// Allocate a new object group and parse it.
ObjectGroup *objectGroup = new ObjectGroup();
objectGroup->Parse(node);
objectGroup->SetZOrder( zOrder );
++zOrder;
// Add the object group to the list.
object_groups.push_back(objectGroup);
}
node = node->NextSibling();
}
}
int Map::FindTilesetIndex(int gid) const
{
// Clean up the flags from the gid (thanks marwes91).
gid &= ~(<API key> | <API key> | <API key>);
for (int i = tilesets.size() - 1; i > -1; --i)
{
// If the gid beyond the tileset gid return its index.
if (gid >= tilesets[i]->GetFirstGid())
{
return i;
}
}
return -1;
}
const Tileset *Map::FindTileset(int gid) const
{
for (int i = tilesets.size() - 1; i > -1; --i)
{
// If the gid beyond the tileset gid return it.
if (gid >= tilesets[i]->GetFirstGid())
{
return tilesets[i];
}
}
return NULL;
}
}; |
/* global describe, it, require */
'use strict';
// MODULES //
var // Expectation library:
chai = require( 'chai' ),
// Module to be tested:
mean = require( './../lib/array.js' );
// VARIABLES //
var expect = chai.expect,
assert = chai.assert;
// TESTS //
describe( 'typed-array mean', function tests() {
it( 'should export a function', function test() {
expect( mean ).to.be.a( 'function' );
});
it( 'should compute the distribution mean', function test() {
var lambda, actual, expected;
lambda = new Float64Array( [ 1, 5, 10, 20 ] );
actual = new Float64Array( lambda.length );
actual = mean( actual, lambda );
expected = new Float64Array( [ 1, 0.2, 0.1, 0.05 ] );
assert.deepEqual( actual, expected );
});
it( 'should return an empty array if provided an empty array', function test() {
assert.deepEqual( mean( new Int8Array(), new Int8Array() ), new Int8Array() );
});
}); |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><API key>: Not compatible </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.11.0 / <API key> - 8.6.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
<API key>
<small>
8.6.0
<span class="label label-info">Not compatible </span>
</small>
</h1>
<p> <em><script>document.write(moment("2021-11-16 15:00:10 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-11-16 15:00:10 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
coq 8.11.0 Formal proof management system
num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.07.1 The OCaml compiler (virtual package)
ocaml-base-compiler 4.07.1 Official release 4.07.1
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "Hugo.Herbelin@inria.fr"
homepage: "https://github.com/coq-contribs/<API key>"
license: "BSD"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/QuicksortComplexity"]
depends: [
"ocaml"
"coq" {>= "8.6" & < "8.7~"}
]
tags: [ "keyword: quicksort" "keyword: complexity" "keyword: average-case" "category: Computer Science/Decision Procedures and Certified Algorithms/Correctness proofs of algorithms" "date: 2010-06" ]
authors: [ "Eelis" ]
bug-reports: "https://github.com/coq-contribs/<API key>/issues"
dev-repo: "git+https://github.com/coq-contribs/<API key>.git"
synopsis: "Proofs of Quicksort's worst- and average-case complexity"
description: """
The development contains:
- a set of monads and monad transformers for measuring a (possibly nondeterministic) algorithm's use of designated operations;
- monadically expressed deterministic and nondeterministic implementations of Quicksort;
- proofs of these implementations' worst- and average case complexity.
Most of the development is documented in the TYPES 2008 paper "A Machine-Checked Proof of the Average-Case Complexity of Quicksort in Coq", available at the homepage."""
flags: light-uninstall
url {
src:
"https://github.com/coq-contribs/<API key>/archive/v8.6.0.tar.gz"
checksum: "md5=<API key>"
}
</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 <API key>.8.6.0 coq.8.11.0</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.11.0).
The following dependencies couldn't be met:
- <API key> -> coq < 8.7~ -> ocaml < 4.06.0
base of this switch (use `--unlock-base' to force)
No solution found, exiting
</pre></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>opam remove -y coq; opam install -y --show-action --unlock-base <API key>.8.6.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install </h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</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:
</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> |
<?php
/* TwigBundle:Exception:exception_full.html.twig */
class <API key> extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
// line 1
$this->parent = $this->loadTemplate("TwigBundle::layout.html.twig", "TwigBundle:Exception:exception_full.html.twig", 1);
$this->blocks = array(
'head' => array($this, 'block_head'),
'title' => array($this, 'block_title'),
'body' => array($this, 'block_body'),
);
}
protected function doGetParent(array $context)
{
return "TwigBundle::layout.html.twig";
}
protected function doDisplay(array $context, array $blocks = array())
{
$this->parent->display($context, array_merge($this->blocks, $blocks));
}
// line 3
public function block_head($context, array $blocks = array())
{
// line 4
echo " <link href=\"";
echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/framework/css/exception.css", null, true), "html", null, true);
echo "\" rel=\"stylesheet\" type=\"text/css\" media=\"all\" />
";
}
// line 7
public function block_title($context, array $blocks = array())
{
// line 8
echo " ";
echo twig_escape_filter($this->env, $this->getAttribute((isset($context["exception"]) ? $context["exception"] : $this->getContext($context, "exception")), "message", array()), "html", null, true);
echo " (";
echo twig_escape_filter($this->env, (isset($context["status_code"]) ? $context["status_code"] : $this->getContext($context, "status_code")), "html", null, true);
echo " ";
echo twig_escape_filter($this->env, (isset($context["status_text"]) ? $context["status_text"] : $this->getContext($context, "status_text")), "html", null, true);
echo ")
";
}
// line 11
public function block_body($context, array $blocks = array())
{
// line 12
echo " ";
$this->loadTemplate("TwigBundle:Exception:exception.html.twig", "TwigBundle:Exception:exception_full.html.twig", 12)->display($context);
}
public function getTemplateName()
{
return "TwigBundle:Exception:exception_full.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 57 => 12, 54 => 11, 43 => 8, 40 => 7, 33 => 4, 30 => 3, 11 => 1,);
}
} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>param-pi: Not compatible </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.5.2 / param-pi - 8.6.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
param-pi
<small>
8.6.0
<span class="label label-info">Not compatible </span>
</small>
</h1>
<p> <em><script>document.write(moment("2022-03-05 04:46:21 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-03-05 04:46:21 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-num base Num library distributed with the OCaml compiler
base-threads base
base-unix base
camlp5 7.14 <API key> of OCaml
conf-findutils 1 Virtual package relying on findutils
conf-perl 2 Virtual package relying on perl
coq 8.5.2 Formal proof management system
num 0 The Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.05.0 The OCaml compiler (virtual package)
ocaml-base-compiler 4.05.0 Official 4.05.0 release
ocaml-config 1 OCaml Switch Configuration
# opam file:
opam-version: "2.0"
maintainer: "Hugo.Herbelin@inria.fr"
homepage: "https://github.com/coq-contribs/param-pi"
license: "LGPL 2.1"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/ParamPi"]
depends: [
"ocaml"
"coq" {>= "8.6" & < "8.7~"}
]
tags: [ "keyword: Pi-Calculus" "category: Computer Science/Lambda Calculi" "date: 1998-09-30" ]
authors: [ "Loïc Henry-Gréard" ]
bug-reports: "https://github.com/coq-contribs/param-pi/issues"
dev-repo: "git+https://github.com/coq-contribs/param-pi.git"
synopsis: "Coding of a typed monadic pi-calculus using parameters for free names"
description: """
This development contains the specification for a monadic
pi-calculus using the same coding method for names than
J. Mc Kinna and R. Pollack used for PTS in LEGO:
"Some Lambda Calculus and Type Theory Formalized".
The basic, monadic calculus encoded here has a type system
restraining the direction of communication for processes' names.
A number of lemmas usefull for doing proofs on that coding
are included, and subject reduction properties for each kind
of transition is made as an example of actually using the
coding to mechanize proofs on the pi-calculus."""
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/param-pi/archive/v8.6.0.tar.gz"
checksum: "md5=<API key>"
}
</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-param-pi.8.6.0 coq.8.5.2</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.5.2).
The following dependencies couldn't be met:
- coq-param-pi -> coq >= 8.6
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></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>opam remove -y coq; opam install -y --show-action --unlock-base coq-param-pi.8.6.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install </h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</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:
</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> |
<form name='taskForm' novalidate>
<div class="modal-header">
<h2 class="modal-title" id="modal-title">{{$ctrl.kind}} task<span ng-if='$ctrl.task.name'> — {{$ctrl.task.name}}</span></h2>
</div>
<div class="modal-body container-fluid" id="modal-body">
<div class='col-md-1'>Required:</div>
<div class='row'></div>
<div class='col-md-3 col-md-offset-1'>
<label>Title:</label>
<input type='text' name='title' ng-model='$ctrl.task.name' required/>
<p ng-show="taskForm.title.$touched && taskForm.title.$invalid" class="help-block">A title is required.</p>
</div>
<div class='col-md-8 form-group'>
<label>Description:</label>
<textarea name='description' ng-model='$ctrl.task.description' required ng-minlength='30' ng-maxlength='255'/>
<p ng-show="taskForm.description.$touched && taskForm.description.$error.required" class="help-block">A description is required.</p>
<p ng-show="taskForm.description.$error.minlength" class="help-block">Description is too short. (<30 chars)></p>
<p ng-show="taskForm.description.$error.maxlength" class="help-block">Description is too long. (>255 chars)</p>
</div>
<div class='row'></div>
<div class='col-md-3 col-md-offset-1'>
<label>Label:</label>
<input type='text' name='label' ng-model='$ctrl.task.label' required/>
<p ng-show="taskForm.label.$touched && taskForm.label.$invalid" class="help-block">Label is required.</p>
</div>
<div class='col-md-3 form-group'>
<label>Estimate:</label>
<input type='text' name='estimate' ng-model='$ctrl.task.estimate' required/>
<p ng-show="taskForm.estimate.$touched && taskForm.estimate.$error.required" class="help-block">Please include an estimate.</p>
</div>
<div class='row'></div>
<div class='col-md-1'>Optional:</div>
<div class='row'></div>
<div class='col-md-3 col-md-offset-1 form-group'>
<label>Assign:</label>
<input type='text' name='assign' ng-model='$ctrl.task.assigned'/>
</div>
<div class='col-md-3 form-group'>
<label>Due:</label>
<input type='text' name='due' ng-model='$ctrl.task.due'/>
</div>
<div class='col-md-3 form-group'>
<label>Relies On:</label>
<input type='text' name='block' ng-model='$ctrl.task.block'/>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-primary" type="button" ng-disabled='taskForm.$invalid' ng-click="$ctrl.save(taskForm.$valid)">Save</button>
<button class="btn btn-warning" type="button" ng-click="$ctrl.cancel()">Cancel</button>
</div>
</form> |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>relation-algebra: Not compatible </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.11.1 / relation-algebra - 1.7.1</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
relation-algebra
<small>
1.7.1
<span class="label label-info">Not compatible </span>
</small>
</h1>
<p> <em><script>document.write(moment("2021-10-18 13:00:49 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-10-18 13:00:49 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
coq 8.11.1 Formal proof management system
num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.09.1 The OCaml compiler (virtual package)
ocaml-base-compiler 4.09.1 Official release 4.09.1
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
name: "<API key>"
synopsis: "Relation Algebra and KAT in Coq"
maintainer: "Damien Pous <Damien.Pous@ens-lyon.fr>"
homepage: "http://perso.ens-lyon.fr/damien.pous/ra/"
license: "LGPL"
depends: [
"ocaml"
"coq" {>= "8.9" & < "8.10~"}
]
depopts: [ "<API key>" ]
build: [
["sh" "-exc" "./configure --%{<API key>:enable}%-ssr"]
[make "-j%{jobs}%"]
]
install: [make "install"]
remove: [ "sh" "-exc" "rm -r '%{lib}%/coq/user-contrib/RelationAlgebra'" ]
tags: [
"keyword:relation algebra"
"keyword:Kleene algebra with tests"
"keyword:KAT"
"keyword:allegories"
"keyword:residuated structures"
"keyword:automata"
"keyword:regular expressions"
"keyword:matrices"
"category:Mathematics/Algebra"
"logpath:RelationAlgebra"
]
authors: [
"Damien Pous <Damien.Pous@ens-lyon.fr>"
"Christian Doczkal <christian.doczkal@ens-lyon.fr>"
]
url {
src:
"https://github.com/damien-pous/relation-algebra/archive/v1.7.1.tar.gz"
checksum: "md5=<API key>"
}
</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 <API key>.1.7.1 coq.8.11.1</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.11.1).
The following dependencies couldn't be met:
- <API key> -> coq < 8.10~ -> ocaml < 4.06.0
base of this switch (use `--unlock-base' to force)
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></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>opam remove -y coq; opam install -y --show-action --unlock-base <API key>.1.7.1</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install </h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</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:
</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> |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>nfix: Not compatible </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 / extra-dev</a></li>
<li class="active"><a href="">dev / nfix - 8.7.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
nfix
<small>
8.7.0
<span class="label label-info">Not compatible </span>
</small>
</h1>
<p> <em><script>document.write(moment("2022-01-23 14:46:44 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-01-23 14:46:44 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 dev Formal proof management system
dune 2.9.1 Fast, portable, and opinionated build system
ocaml 4.09.1 The OCaml compiler (virtual package)
ocaml-base-compiler 4.09.1 Official release 4.09.1
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: "Hugo.Herbelin@inria.fr"
homepage: "https://github.com/coq-contribs/nfix"
license: "Unknown"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/Nfix"]
depends: [
"ocaml"
"coq" {>= "8.7" & < "8.8~"}
]
tags: [ "keyword: mutual fixpoint functions" "category: Miscellaneous/Coq Extensions" ]
authors: [ "Stéphane Lescuyer" ]
bug-reports: "https://github.com/coq-contribs/nfix/issues"
dev-repo: "git+https://github.com/coq-contribs/nfix.git"
synopsis: "Nfix: a Coq extension for fixpoints on nested inductives"
description:
"This plugin provides a syntactic extension that allows one to write mutual fixpoints over nested inductives."
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/nfix/archive/v8.7.0.tar.gz"
checksum: "md5=<API key>"
}
</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-nfix.8.7.0 coq.dev</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is dev).
The following dependencies couldn't be met:
- coq-nfix -> coq < 8.8~ -> ocaml < 4.06.0
base of this switch (use `--unlock-base' to force)
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></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>opam remove -y coq; opam install -y --show-action --unlock-base coq-nfix.8.7.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install </h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</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:
</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> |
# Front-end Specifications
- [x] [HTML/CSS ](<API key>.md)
- [x] [JavaScript ](<API key>.md)
- [ ] [AngularJS ](<API key>.md)
- [ ] [JSON ](json.md)
- [ ] [](<API key>.md)
- [x] [EDM () ](edm-spec.md)
- [ ] [SEO ](seo.md) |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>quickchick: Not compatible </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.15.0 / quickchick - 1.2.1</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
quickchick
<small>
1.2.1
<span class="label label-info">Not compatible </span>
</small>
</h1>
<p> <em><script>document.write(moment("2022-03-09 10:04:44 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-03-09 10:04:44 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 4 Virtual package relying on a GMP lib system installation
coq 8.15.0 Formal proof management system
dune 3.0.3 Fast, portable, and opinionated build system
ocaml 4.09.1 The OCaml compiler (virtual package)
ocaml-base-compiler 4.09.1 Official release 4.09.1
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.3 A library manager for OCaml
zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers
# opam file:
opam-version: "2.0"
maintainer: "llamp@seas.upenn.edu"
synopsis: "Randomized Property-Based Testing Plugin for Coq"
homepage: "https://github.com/QuickChick/QuickChick"
dev-repo: "git+https://github.com/QuickChick/QuickChick.git"
bug-reports: "https://github.com/QuickChick/QuickChick/issues"
license: "MIT"
build: [ make "-j" jobs ]
install: [
[make "-j" jobs "install" ]
[make "-j" jobs "tests"] {with-test}
]
depends: [
"coq" {>= "8.10" < "8.11~"}
"coq-ext-lib"
"<API key>"
"ocamlbuild"
"ocamlfind"
"menhir" {build}
"coq-simple-io"
]
authors: [
"Leonidas Lampropoulos <>"
"Zoe Paraskevopoulou <>"
"Maxime Denes <>"
"Catalin Hritcu <>"
"Benjamin Pierce <>"
"Li-yao Xia <>"
"Arthur Azevedo de Amorim <>"
"Yishuai Li <>"
"Antal Spector-Zabusky <>"
]
tags: [
"keyword:extraction"
"category:Miscellaneous/Coq Extensions"
"logpath:QuickChick"
]
url {
src: "https://github.com/QuickChick/QuickChick/archive/v1.2.1.tar.gz"
checksum: "md5=<API key>"
}
</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-quickchick.1.2.1 coq.8.15.0</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.15.0).
The following dependencies couldn't be met:
- coq-quickchick -> coq < 8.11~ -> ocaml < 4.06.0
base of this switch (use `--unlock-base' to force)
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></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>opam remove -y coq; opam install -y --show-action --unlock-base coq-quickchick.1.2.1</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install </h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</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:
</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> |
import unittest
from clandestined import RendezvousHash
class <API key>(unittest.TestCase):
def <API key>(self):
rendezvous = RendezvousHash()
self.assertEqual(0, len(rendezvous.nodes))
self.assertEqual(1361238019, rendezvous.hash_function('6666'))
def test_init(self):
nodes = ['0', '1', '2']
rendezvous = RendezvousHash(nodes=nodes)
self.assertEqual(3, len(rendezvous.nodes))
self.assertEqual(1361238019, rendezvous.hash_function('6666'))
def test_seed(self):
rendezvous = RendezvousHash(seed=10)
self.assertEqual(2981722772, rendezvous.hash_function('6666'))
def test_add_node(self):
rendezvous = RendezvousHash()
rendezvous.add_node('1')
self.assertEqual(1, len(rendezvous.nodes))
rendezvous.add_node('1')
self.assertEqual(1, len(rendezvous.nodes))
rendezvous.add_node('2')
self.assertEqual(2, len(rendezvous.nodes))
rendezvous.add_node('1')
self.assertEqual(2, len(rendezvous.nodes))
def test_remove_node(self):
nodes = ['0', '1', '2']
rendezvous = RendezvousHash(nodes=nodes)
rendezvous.remove_node('2')
self.assertEqual(2, len(rendezvous.nodes))
self.assertRaises(ValueError, rendezvous.remove_node, '2')
self.assertEqual(2, len(rendezvous.nodes))
rendezvous.remove_node('1')
self.assertEqual(1, len(rendezvous.nodes))
rendezvous.remove_node('0')
self.assertEqual(0, len(rendezvous.nodes))
def test_find_node(self):
nodes = ['0', '1', '2']
rendezvous = RendezvousHash(nodes=nodes)
self.assertEqual('0', rendezvous.find_node('ok'))
self.assertEqual('1', rendezvous.find_node('mykey'))
self.assertEqual('2', rendezvous.find_node('wat'))
def <API key>(self):
nodes = ['0', '1', '2']
rendezvous = RendezvousHash(nodes=nodes)
rendezvous.remove_node('1')
self.assertEqual('0', rendezvous.find_node('ok'))
self.assertEqual('0', rendezvous.find_node('mykey'))
self.assertEqual('2', rendezvous.find_node('wat'))
def <API key>(self):
nodes = ['0', '1', '2']
rendezvous = RendezvousHash(nodes=nodes)
self.assertEqual('0', rendezvous.find_node('ok'))
self.assertEqual('1', rendezvous.find_node('mykey'))
self.assertEqual('2', rendezvous.find_node('wat'))
self.assertEqual('2', rendezvous.find_node('lol'))
rendezvous.add_node('3')
self.assertEqual('0', rendezvous.find_node('ok'))
self.assertEqual('1', rendezvous.find_node('mykey'))
self.assertEqual('2', rendezvous.find_node('wat'))
self.assertEqual('3', rendezvous.find_node('lol'))
class <API key>(unittest.TestCase):
def test_grow(self):
rendezvous = RendezvousHash()
placements = {}
for i in range(10):
rendezvous.add_node(str(i))
placements[str(i)] = []
for i in range(1000):
node = rendezvous.find_node(str(i))
placements[node].append(i)
new_placements = {}
for i in range(20):
rendezvous.add_node(str(i))
new_placements[str(i)] = []
for i in range(1000):
node = rendezvous.find_node(str(i))
new_placements[node].append(i)
keys = [k for sublist in placements.values() for k in sublist]
new_keys = [k for sublist in new_placements.values() for k in sublist]
self.assertEqual(sorted(keys), sorted(new_keys))
added = 0
removed = 0
for node, assignments in new_placements.items():
after = set(assignments)
before = set(placements.get(node, []))
removed += len(before.difference(after))
added += len(after.difference(before))
self.assertEqual(added, removed)
self.assertEqual(1062, (added + removed))
def test_shrink(self):
rendezvous = RendezvousHash()
placements = {}
for i in range(10):
rendezvous.add_node(str(i))
placements[str(i)] = []
for i in range(1000):
node = rendezvous.find_node(str(i))
placements[node].append(i)
rendezvous.remove_node('9')
new_placements = {}
for i in range(9):
new_placements[str(i)] = []
for i in range(1000):
node = rendezvous.find_node(str(i))
new_placements[node].append(i)
keys = [k for sublist in placements.values() for k in sublist]
new_keys = [k for sublist in new_placements.values() for k in sublist]
self.assertEqual(sorted(keys), sorted(new_keys))
added = 0
removed = 0
for node, assignments in placements.items():
after = set(assignments)
before = set(new_placements.get(node, []))
removed += len(before.difference(after))
added += len(after.difference(before))
self.assertEqual(added, removed)
self.assertEqual(202, (added + removed))
if __name__ == '__main__':
unittest.main() |
<menu class="app-menu">
<button class="app-more" (click)="toggleDrawer()"><svg viewBox="0 0 24 24" width="24" height="24" preserveAspectRatio="xMidYMid meet"><g><path d="M3 <API key>"></path></g></svg></button>
<h1>{{ 'Files' | translate }}</h1>
</menu>
<section class="app-main">
<respond-dropzone (onAdd)="list($event)"></respond-dropzone>
<div id="files-list" class="app-list">
<div class="app-list-item" *ngFor="let file of files" (click)="setActive(file)" [class.selected]="file === selectedFile" [class.image]="file.thumb !== ''">
<h2><span class="primary">{{ file.name }}</span><span class="secondary">{{ file.size }} MB</span></h2>
<img *ngIf="file.thumb !== ''" class="image" src="{{file.thumb}}">
<small>/files/{{ file.name }}</small>
<div class="app-list-actions">
<a (click)="showRemove(file)">Remove</a>
</div>
</div>
</div>
<p class="no-list-items" *ngIf="files.length === 0">{{ 'Nothing here yet' | translate }}</p>
</section>
<respond-remove-file [visible]="removeVisible" [file]="file" (onCancel)="reset($event)" (onUpdate)="list($event)" (onError)="failure($event)"></respond-remove-file>
<respond-drawer active="files" [visible]="drawerVisible" (onHide)="reset($event)"></respond-drawer> |
#include "Base64Transcoder.h"
#include <math.h>
#include <string.h>
const u_int8_t kBase64EncodeTable[64] = {
'A', 'B', 'C', 'D',
'E', 'F', 'G', 'H',
'I', 'J', 'K', 'L',
'M', 'N', 'O', 'P',
'Q', 'R', 'S', 'T',
'U', 'V', 'W', 'X',
'Y', 'Z', 'a', 'b',
'c', 'd', 'e', 'f',
'g', 'h', 'i', 'j',
'k', 'l', 'm', 'n',
'o', 'p', 'q', 'r',
's', 't', 'u', 'v',
'w', 'x', 'y', 'z',
'0', '1', '2', '3',
'4', '5', '6', '7',
'8', '9', '+', '/'
};
const int8_t kBase64DecodeTable[128] = {
/* 0x00 */ -5, /* 0x01 */ -3, /* 0x02 */ -3, /* 0x03 */ -3,
/* 0x04 */ -3, /* 0x05 */ -3, /* 0x06 */ -3, /* 0x07 */ -3,
/* 0x08 */ -3, /* 0x09 */ -2, /* 0x0a */ -2, /* 0x0b */ -2,
/* 0x0c */ -2, /* 0x0d */ -2, /* 0x0e */ -3, /* 0x0f */ -3,
/* 0x10 */ -3, /* 0x11 */ -3, /* 0x12 */ -3, /* 0x13 */ -3,
/* 0x14 */ -3, /* 0x15 */ -3, /* 0x16 */ -3, /* 0x17 */ -3,
/* 0x18 */ -3, /* 0x19 */ -3, /* 0x1a */ -3, /* 0x1b */ -3,
/* 0x1c */ -3, /* 0x1d */ -3, /* 0x1e */ -3, /* 0x1f */ -3,
-2, -3, -3, -3, |
{% set page.title = "Verily Challenge" %}
{% extends '../layout.html' %}
{% block navigation %}
{% endblock %}
{% block main %}
<style>
body{
background-color:black;
}
.section{
padding-top:45px;
padding-bottom:45px;
font-size: 20px;
color:#333333;
}
.section-white{
background-color:white;
color:black;
-webkit-box-shadow: 0px 4px 7px 0px rgba(22, 22, 22, 0.86) inset, 0px -4px 7px 0px rgba(22, 22, 22, 0.86) inset;
-moz-box-shadow: 0px 4px 7px 0px rgba(22, 22, 22, 0.86) inset, 0px -4px 7px 0px rgba(22, 22, 22, 0.86) inset;
box-shadow: 0px 4px 7px 0px rgba(22, 22, 22, 0.86) inset, 0px -4px 7px 0px rgba(22, 22, 22, 0.86) inset;
}
.section-whitee{
background-color:white;
color:black;
-webkit-box-shadow: 0px 5px 7px 0px rgba(244, 244, 244, 0.86), 0px -5px 7px 0px rgba(244, 244, 244, 0.86);
-moz-box-shadow: 0px 5px 7px 0px rgba(244, 244, 244, 0.86), 0px -5px 7px 0px rgba(244, 244, 244, 0.86);
box-shadow: 0px 5px 7px 0px rgba(244, 244, 244, 0.86), 0px -5px 7px 0px rgba(244, 244, 244, 0.86);
}
.verily-button{
text-align: center;
}
</style>
<div style="height:60px;">
</div>
<div class="section-white" style="text-align: center;">
<div style="padding:20px;"> <img src="/static/css/images/v-challenge.png"/> </div>
</div>
<div class="container section">
<div class="row">
<div class="col-sm-5">
<img src="/static/css/images/fake-img.png" />
</div>
<div class="col-sm-7">
<p style="font-size:30px;">
We live in the Information Age... or the Disinformation Age.
Finding out the truth in the vast amounts of contradictory information is becoming
increasingly difficult for each of us.
</p>
</div>
</div>
</div>
<div class="section section-white">
<div class="container">
<p style="font-size: 60px; font-weight: bold; text-align:center">
Can a coordinated collective effort be effective in quickly discerning true answers to
key questions?
</p>
</div>
</div>
<div class="section">
<div class="container">
<div style='font-family:"trebuchet ms"; color:white; text-align: center; font-size:50px;font-weight:bold; margin-bottom: 20px;'>
It's all for a good cause!
</div>
<div style='font-size:22px; text-align: center; color: white;margin-bottom: 50px;'>
Accurate information is life-saving in extreme situations such as natural disasters.
This fun challenge is a pilot to prove feasibility of timely verification.
The same platform will soon be used to gather evidence during natural disasters,
which will enable more effective disasters response.
Your participation will help design a better platform.
</div>
<div style="color:#428bca">
More on verily:
</div>
<br/>
<div class="col-sm-4 verily-button">
<a href="https:
<i class="fa fa-youtube-play fa-5x"></i></br>
Video
</a>
</div>
<div class="col-sm-4 verily-button">
<a href="http://veri.ly" target="_blank">
<i class="fa fa-external-link fa-5x"></i></br>
Site
</a>
</div>
<div class="col-sm-4 verily-button">
<a href="http://irevolution.net/2013/02/19/<API key>/" target="_blank">
<i class="fa fa-file-text fa-5x"></i></br>
Blog Post
</a>
</div>
</div>
</div>
<div class="section section-white">
<div class="container">
<div style='font-size:50px; font-family:fantasy ; font-weight:bold; text-align:center'>
The Challenge
</div>
<br/>
<br/>
<div class="clearfix">
<div class="col-sm-4" style='font-size:50px; '>
50 questions!
</div>
<div class="col-sm-8">
<ul class="">
<li>
Can you prove that a displayed picture was taken from London Bridge this morning?
</li>
<li>
Do you know somebody that will help you find out whether a convenience store at the corner of Revolution
and Victory streets in the Siberian village of Lyoviha opens at 9am?
</li>
</ul>
</div>
</div>
<div style='font-size:30px; font-family:fantasy ; font-weight:bold; text-align:center; margin-top: 30px'>
Can you help answering them? Submit evidence, call your contacts, earn points, observe collective progress, be altruistic and win a certificate!
</div>
</div>
</div>
<div class="section" style='font-size:30px; text-align: center; font-weight: bold'>
<div class="container">
Interested? Drop us your email and we'll keep you posted:<br/>
<form >
<input type="text" class="form-control input-lg" id="form-email" name="email" placeholder="Email">
<input id="btn-submit-email" type="submit" value="submit" class="btn" />
</form>
</div>
</div>
<script type="application/javascript">
$(function(){
$('#btn-submit-email').on('click', function(){
show_alert_message('warning', 5000, "Atention", "Submit under construction ");
return false;
$.post('/challenge',
{_csrf: "{{csrf_token}}" },
function(data){
var answer = data;
show_alert_message('success', 5000, "Email sent", "Thank you! We're looking forward to your contributions!");
}).fail(function(){
show_alert_message('danger', 5000, "Error", "There was an unknown error, please try again later. ");
});
});
});
</script>
{% endblock %} |
#include "Containers.hpp"
#include <limits>
unsigned <API key>(std::vector<unsigned int>::const_iterator begin, const std::vector<unsigned int>::const_iterator end, unsigned int target_value, int current_depth, int target_depth) {
current_depth++;
if (current_depth > target_depth) {
return 0;
}
unsigned int <API key> = 0;
if (begin == end) {
return 0;
}
for (auto it = begin; it != end; it++) {
if (*it > target_value) {
;
} else if (*it == target_value) {
<API key>++;
} else {
<API key> += <API key>(it+1,end,target_value - *it, current_depth, target_depth);
}
}
return <API key>;
}
unsigned int <API key>(std::vector<unsigned int> containers, unsigned int target_value) {
return <API key>(containers.begin(),containers.end(), target_value,0,std::numeric_limits<int>::max());
}
unsigned int <API key>(std::vector<unsigned int> containers, unsigned int target_value, int target_depth) {
return <API key>(containers.begin(),containers.end(), target_value,0,target_depth);
} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>itauto: Not compatible </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.11.1 / itauto - 8.13</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
itauto
<small>
8.13
<span class="label label-info">Not compatible </span>
</small>
</h1>
<p> <em><script>document.write(moment("2022-01-04 15:07:36 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-01-04 15:07:36 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
coq 8.11.1 Formal proof management system
num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.06.1 The OCaml compiler (virtual package)
ocaml-base-compiler 4.06.1 Official 4.06.1 release
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "frederic.besson@inria.fr"
homepage: "https://gitlab.inria.fr/fbesson/itauto"
dev-repo: "git+https://gitlab.inria.fr/fbesson/itauto.git"
authors: ["Frédéric Besson"]
bug-reports: "frederic.besson@inria.fr"
license: "GPL 3"
synopsis: "'itauto' is a reflexive SAT solver parameterised by a leaf tactic"
build: [
[make]
]
install: [
[make "install"]
]
depends: [
"ocaml" {>= "4.9~"}
"coq" {>= "8.13.~" & < "8.14~"}
"ocamlbuild" {build }
]
depopts: [ "ocamlformat" {build} ]
url {
src: "https://gitlab.inria.fr/fbesson/itauto/-/archive/8.13/itauto-8.13.tar.gz"
checksum: "sha256=<SHA256-like>"
}
tags: [
"keyword:integers" "keyword:SAT" "keyword:SMT" "keyword:automation"
"logpath:Cdcl"
]
</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-itauto.8.13 coq.8.11.1</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.11.1).
The following dependencies couldn't be met:
- coq-itauto -> ocaml >= 4.9~
base of this switch (use `--unlock-base' to force)
No solution found, exiting
</pre></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>opam remove -y coq; opam install -y --show-action --unlock-base coq-itauto.8.13</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install </h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</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:
</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> |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>ails: Not compatible </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.0 / ails - 8.6.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
ails
<small>
8.6.0
<span class="label label-info">Not compatible </span>
</small>
</h1>
<p> <em><script>document.write(moment("2022-03-08 23:52:51 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-03-08 23:52:51 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 4 Virtual package relying on a GMP lib system installation
coq 8.13.0 Formal proof management system
num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.12.1 The OCaml compiler (virtual package)
ocaml-base-compiler 4.12.1 Official release 4.12.1
ocaml-config 2 OCaml Switch Configuration
<API key> 1 Ensure that OCaml is compiled with no special options enabled
ocamlfind 1.9.3 A library manager for OCaml
zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers
# opam file:
opam-version: "2.0"
maintainer: "Hugo.Herbelin@inria.fr"
homepage: "https://github.com/coq-contribs/ails"
license: "LGPL 2.1"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/AILS"]
depends: [
"ocaml"
"coq" {>= "8.6" & < "8.7~"}
]
tags: [ "keyword: ails" "keyword: aircraft" "keyword: trajectory" "keyword: conflict" "keyword: collision" "category: Computer Science/Decision Procedures and Certified Algorithms/Correctness proofs of algorithms" "date: 2002" ]
authors: [ "Olivier Desmettre" ]
bug-reports: "https://github.com/coq-contribs/ails/issues"
dev-repo: "git+https://github.com/coq-contribs/ails.git"
synopsis: "Proof of AILS algorithm"
description: """
An aircraft trajectory modeling and analysis using the AILS
algorithm (Airborne Information for Lateral Spacing) to warn
against possible collisions."""
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/ails/archive/v8.6.0.tar.gz"
checksum: "md5=<API key>"
}
</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-ails.8.6.0 coq.8.13.0</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.13.0).
The following dependencies couldn't be met:
- coq-ails -> coq < 8.7~ -> ocaml < 4.06.0
base of this switch (use `--unlock-base' to force)
No solution found, exiting
</pre></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>opam remove -y coq; opam install -y --show-action --unlock-base coq-ails.8.6.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install </h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</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:
</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> |
#define KNOB1 0
#define KNOB2 1
#define BUTTON1 2
#define BUTTON2 3
#define BUTTON3 4
#define STAT1 7
#define STAT2 6
#include "WProgram.h"
void setup();
void loop ();
void noteOn(byte cmd, byte data1, byte data2);
void blink();
void playNote(byte note, byte velocity);
char button(char button_num);
byte incomingByte;
byte note;
byte velocity;
int pot;
byte byte1;
byte byte2;
byte byte3;
int action=2; //0 =note off ; 1=note on ; 2= nada
//setup: declaring iputs and outputs and begin serial
void setup() {
pinMode(STAT1,OUTPUT); // declare the LED's pin as output
pinMode(STAT2,OUTPUT);
pinMode(BUTTON1,INPUT);
pinMode(BUTTON2,INPUT);
pinMode(BUTTON3,INPUT);
digitalWrite(BUTTON1,HIGH);
digitalWrite(BUTTON2,HIGH);
digitalWrite(BUTTON3,HIGH);
for(int i = 0;i < 10;i++)
{
digitalWrite(STAT1,HIGH);
digitalWrite(STAT2,LOW);
delay(30);
digitalWrite(STAT1,LOW);
digitalWrite(STAT2,HIGH);
delay(30);
}
digitalWrite(STAT1,HIGH);
digitalWrite(STAT2,HIGH);
//start serial with midi baudrate 31250 or 38400 for debugging
Serial.begin(31250);
//Serial.begin(38400);
//Serial.println("MIDI Board");
}
//loop: wait for serial data, and interpret the message
void loop () {
/*
// Button and knob test functions
if(analogRead(KNOB1) > 512){ digitalWrite(STAT1,HIGH); }
else{ digitalWrite(STAT1,LOW); }
if(analogRead(KNOB2) > 512){ digitalWrite(STAT2,HIGH); }
else{ digitalWrite(STAT2,LOW); }
if(!digitalRead(BUTTON1)){ digitalWrite(STAT1,LOW); digitalWrite(STAT2,LOW); }
else if(!digitalRead(BUTTON2)){ digitalWrite(STAT1,HIGH); digitalWrite(STAT2,LOW); }
else if(!digitalRead(BUTTON3)){ digitalWrite(STAT1,LOW); digitalWrite(STAT2,HIGH); }
else if(!digitalRead(BUTTON4)){ digitalWrite(STAT1,HIGH); digitalWrite(STAT2,HIGH); }
*/
//
pot = analogRead(0);
note = pot/8; // convert value to value 0-127
if(button(BUTTON1) || button(BUTTON2) || button(BUTTON3))
{
noteOn(0x95,0x3C,0x45);
digitalWrite(STAT2,LOW);
while(button(BUTTON1) || button(BUTTON2) || button(BUTTON3));
}
/*while(1);
else
{
noteOn(0x90,0x3C,0x00);
digitalWrite(STAT2,HIGH);
}*/
//
/*
if(Serial.available() > 0)
{
byte1 = Serial.read();
byte2 = Serial.read();
byte3 = Serial.read();
noteOn(byte1, byte2, byte3);
//digitalWrite(STAT1,HIGH);
//digitalWrite(STAT2,HIGH);
}*/
//
/*
if (Serial.available() > 0) {
// read the incoming byte:
incomingByte = Serial.read();
// wait for as status-byte, channel 1, note on or off
if (incomingByte== 144){ // note on message starting starting
action=1;
}
else if (incomingByte== 128){ // note off message starting
action=0;
}
else if (incomingByte== 208){ // aftertouch message starting
//not implemented yet
}
else if (incomingByte== 160){ // polypressure message starting
//not implemented yet
}
else if ( (action==0)&&(note==0) ){ // if we received a "note off", we wait for which note (databyte)
note=incomingByte;
playNote(note, 0);
note=0;
velocity=0;
action=2;
}
else if ( (action==1)&&(note==0) ){ // if we received a "note on", we wait for the note (databyte)
note=incomingByte;
}
else if ( (action==1)&&(note!=0) ){ // ...and then the velocity
velocity=incomingByte;
playNote(note, velocity);
note=0;
velocity=0;
action=0;
}
else{
//nada
}
}*/
}
void noteOn(byte cmd, byte data1, byte data2) {
Serial.print(cmd, BYTE);
Serial.print(data1, BYTE);
Serial.print(data2, BYTE);
}
void blink(){
digitalWrite(STAT1, HIGH);
delay(100);
digitalWrite(STAT1, LOW);
delay(100);
}
void playNote(byte note, byte velocity)
{
int value=LOW;
if (velocity >10){
value=HIGH;
}
else{
value=LOW;
}
//since we don't want to "play" all notes we wait for a note between 36 & 44
if(note>=36 && note<44)
{
byte myPin=note-34; // to get a pinnumber between 2 and 9
digitalWrite(myPin, value);
}
}
char button(char button_num)
{
return (!(digitalRead(button_num)));
}
int main(void)
{
init();
setup();
for (;;)
loop();
return 0;
} |
/* Ross Baehr
R@M 2017
ross.baehr@gmail.com
*/
#ifndef _RGB_MUTEX_H_
#define _RGB_MUTEX_H_
#include <FreeRTOS.h>
#include <semphr.h>
extern SemaphoreHandle_t rgb_mutex;
#endif |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<title>Isaiah 66 (ASV)</title>
<link href="../../../build/mobile.css" rel="stylesheet" />
<script src="../../../build/mobile.js"></script>
</head>
<body dir="ltr" class="section-document">
<div class="header"><div class="nav">
<a class="name" href="IS.html">American Standard Version</a><a class="location" href="IS.html">Isaiah 66</a><a class="prev" href="IS65.html"><</a>
<a class="home" href="index.html">=</a>
<a class="next" href="JR1.html">></a>
</div></div>
<div class="section chapter IS IS66 eng_asv eng " dir="ltr" lang="en" data-id="IS66" data-nextid="JR1" data-previd="IS65">
<div class="c">66</div>
<div class="p">
<span class="v-num v-1">1 </span><span class="v IS66_1" data-id="IS66_1">Thus saith Jehovah, Heaven is my throne, and the earth is my footstool: what manner of house will ye build unto me? and what place shall be my rest? </span>
<span class="v-num v-2">2 </span><span class="v IS66_2" data-id="IS66_2">For all these things hath my hand made, and <span class="add">so</span> all these things came to be, saith Jehovah: but to this man will I look, even to him that is poor and of a contrite spirit, and that trembleth at my word.</span>
<span class="v-num v-3">3 </span><span class="v IS66_3" data-id="IS66_3">He that killeth an ox is as he that slayeth a man; he that sacrificeth a lamb, as he that breaketh a dog’s neck; he that offereth an oblation, <span class="add">as he that offereth</span> swine’s blood; he that burneth frankincense, as he that blesseth an idol. Yea, they have chosen their own ways, and their soul delighteth in their abominations:</span>
<span class="v-num v-4">4 </span><span class="v IS66_4" data-id="IS66_4">I also will choose their delusions, and will bring their fears upon them; because when I called, none did answer; when I spake, they did not hear: but they did that which was evil in mine eyes, and chose that wherein I delighted not.</span>
<span class="v-num v-5">5 </span><span class="v IS66_5" data-id="IS66_5">Hear the word of Jehovah, ye that tremble at his word: Your brethren that hate you, that cast you out for my name’s sake, have said, Let Jehovah be glorified, that we may see your joy; but it is they that shall be put to shame.</span>
<span class="v-num v-6">6 </span><span class="v IS66_6" data-id="IS66_6">A voice of tumult from the city, a voice from the temple, a voice of Jehovah that rendereth recompense to his enemies.</span>
<span class="v-num v-7">7 </span><span class="v IS66_7" data-id="IS66_7">Before she travailed, she brought forth; before her pain came, she was delivered of a man-child.</span>
<span class="v-num v-8">8 </span><span class="v IS66_8" data-id="IS66_8">Who hath heard such a thing? who hath seen such things? Shall a land be born in one day? shall a nation be brought forth at once? for as soon as Zion travailed, she brought forth her children.</span>
<span class="v-num v-9">9 </span><span class="v IS66_9" data-id="IS66_9">Shall I bring to the birth, and not cause to bring forth? saith Jehovah: shall I that cause to bring forth shut <span class="add">the womb</span>? saith thy God. </span>
<span class="v-num v-10">10 </span><span class="v IS66_10" data-id="IS66_10">Rejoice ye with Jerusalem, and be glad for her, all ye that love her: rejoice for joy with her, all ye that mourn over her; </span>
<span class="v-num v-11">11 </span><span class="v IS66_11" data-id="IS66_11">that ye may suck and be satisfied with the breasts of her consolations; that ye may milk out, and be delighted with the abundance of her glory. </span>
<span class="v-num v-12">12 </span><span class="v IS66_12" data-id="IS66_12">For thus saith Jehovah, Behold, I will extend peace to her like a river, and the glory of the nations like an overflowing stream: and ye shall suck <span class="add">thereof</span>; ye shall be borne upon the side, and shall be dandled upon the knees.</span>
<span class="v-num v-13">13 </span><span class="v IS66_13" data-id="IS66_13">As one whom his mother comforteth, so will I comfort you; and ye shall be comforted in Jerusalem.</span>
<span class="v-num v-14">14 </span><span class="v IS66_14" data-id="IS66_14">And ye shall see <span class="add">it</span>, and your heart shall rejoice, and your bones shall flourish like the tender grass: and the hand of Jehovah shall be known toward his servants; and he will have indignation against his enemies.</span>
<span class="v-num v-15">15 </span><span class="v IS66_15" data-id="IS66_15">For, behold, Jehovah will come with fire, and his chariots shall be like the whirlwind; to render his anger with fierceness, and his rebuke with flames of fire. </span>
<span class="v-num v-16">16 </span><span class="v IS66_16" data-id="IS66_16">For by fire will Jehovah execute judgment, and by his sword, upon all flesh; and the slain of Jehovah shall be many.</span>
<span class="v-num v-17">17 </span><span class="v IS66_17" data-id="IS66_17">They that sanctify themselves and purify themselves <span class="add">to go </span> unto the gardens, behind one in the midst, eating swine’s flesh, and the abomination, and the mouse, they shall come to an end together, saith Jehovah. </span>
<span class="v-num v-18">18 </span><span class="v IS66_18" data-id="IS66_18">For I <span class="add">know</span> their works and their thoughts: <span class="add">the time </span> cometh, that I will gather all nations and tongues; and they shall come, and shall see my glory.</span>
<span class="v-num v-19">19 </span><span class="v IS66_19" data-id="IS66_19">And I will set a sign among them, and I will send such as escape of them unto the nations, to Tarshish, Pul, and Lud, that draw the bow, to Tubal and Javan, to the isles afar off, that have not heard my fame, neither have seen my glory; and they shall declare my glory among the nations. </span>
<span class="v-num v-20">20 </span><span class="v IS66_20" data-id="IS66_20">And they shall bring all your brethren out of all the nations for an oblation unto Jehovah, upon horses, and in chariots, and in litters, and upon mules, and upon dromedaries, to my holy mountain Jerusalem, saith Jehovah, as the children of Israel bring their oblation in a clean vessel into the house of Jehovah.</span>
<span class="v-num v-21">21 </span><span class="v IS66_21" data-id="IS66_21">And of them also will I take for priests <span class="add">and</span> for Levites, saith Jehovah.</span>
<span class="v-num v-22">22 </span><span class="v IS66_22" data-id="IS66_22">For as the new heavens and the new earth, which I will make, shall remain before me, saith Jehovah, so shall your seed and your name remain. </span>
<span class="v-num v-23">23 </span><span class="v IS66_23" data-id="IS66_23">And it shall come to pass, that from one new moon to another, and from one sabbath to another, shall all flesh come to worship before me, saith Jehovah. </span>
<span class="v-num v-24">24 </span><span class="v IS66_24" data-id="IS66_24">And they shall go forth, and look upon the dead bodies of the men that have transgressed against me: for their worm shall not die, neither shall their fire be quenched; and they shall be an abhorring unto all flesh. </span>
</div>
</div>
<div class="footnotes">
</div>
<div class="footer"><div class="nav">
<a class="prev" href="IS65.html"><</a>
<a class="home" href="index.html">=</a>
<a class="next" href="JR1.html">></a>
</div></div>
</body>
</html> |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: <API key>.c
Label Definition File: <API key>.strings.label.xml
Template File: sources-sink-52c.tmpl.c
*/
/*
* @description
* CWE: 78 OS Command Injection
* BadSource: connect_socket Read data using a connect socket (client side)
* GoodSource: Fixed string
* Sink: w32_execvp
* BadSink : execute command with wexecvp
* Flow Variant: 52 Data flow: data passed as an argument from one function to another to another in three different source files
*
* */
#include "std_testcase.h"
#include <wchar.h>
#ifdef _WIN32
#define COMMAND_INT_PATH L"%WINDIR%\\system32\\cmd.exe"
#define COMMAND_INT L"cmd.exe"
#define COMMAND_ARG1 L"/c"
#define COMMAND_ARG2 L"dir"
#define COMMAND_ARG3 data
#else /* NOT _WIN32 */
#include <unistd.h>
#define COMMAND_INT_PATH L"/bin/sh"
#define COMMAND_INT L"sh"
#define COMMAND_ARG1 L"ls"
#define COMMAND_ARG2 L"-la"
#define COMMAND_ARG3 data
#endif
#ifdef _WIN32
#include <winsock2.h>
#include <windows.h>
#include <direct.h>
#pragma comment(lib, "ws2_32") /* include ws2_32.lib when linking */
#define CLOSE_SOCKET closesocket
#else /* NOT _WIN32 */
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#define INVALID_SOCKET -1
#define SOCKET_ERROR -1
#define CLOSE_SOCKET close
#define SOCKET int
#endif
#define TCP_PORT 27015
#define IP_ADDRESS "127.0.0.1"
#include <process.h>
#define EXECVP _wexecvp
/* all the sinks are the same, we just want to know where the hit originated if a tool flags one */
#ifndef OMITBAD
void <API key>(wchar_t * data)
{
{
wchar_t *args[] = {COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL};
/* wexecvp - searches for the location of the command among
* the directories specified by the PATH environment variable */
/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */
EXECVP(COMMAND_INT, args);
}
}
#endif /* OMITBAD */
#ifndef OMITGOOD
/* goodG2B uses the GoodSource with the BadSink */
void <API key>(wchar_t * data)
{
{
wchar_t *args[] = {COMMAND_INT_PATH, COMMAND_ARG1, COMMAND_ARG2, COMMAND_ARG3, NULL};
/* wexecvp - searches for the location of the command among
* the directories specified by the PATH environment variable */
/* POTENTIAL FLAW: Execute command without validating input possibly leading to command injection */
EXECVP(COMMAND_INT, args);
}
}
#endif /* OMITGOOD */ |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.