code
stringlengths 3
1.05M
| repo_name
stringlengths 4
116
| path
stringlengths 3
942
| language
stringclasses 30
values | license
stringclasses 15
values | size
int32 3
1.05M
|
|---|---|---|---|---|---|
<?php
/**
* Emy Itegbe
* CMPE 207
* 008740953
*
**/
?>
<!DOCTYPE html>
<html>
<head>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">
<script>
function showForm(){
document.getElementById("addUser").style.display="block";
}
</script>
</head>
<body>
<h1>Files Viewer</h1>
<h3>CMPE207 Project, Team:Budweiser</h3>
<button class="btn btn-success" style="margin-left: 10px" onclick="showForm()">Add a File</button>
<form action="" method="get" class="form-inline" style="display: inline-block;margin-left: 10px">
<input type="text" class="form-control" name="query" value="Emy Itegbe">
<button type="submit" class="btn btn-primary">Search</button>
</form>
<div id="addUser" style="margin: 10px; display: none">
<form action="upload.php" method="post" class="form-inline" role="form" enctype="multipart/form-data">
<input type="hidden" name="user" value="Emy Itegbe" />
<div class="form-group">
<label for="first_name">Upload File</label>
<input type="file" class="form-control" id="file" name="file">
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
</div>
<?php
include 'db.php';
//connect to database
$con = mysqli_connect($host, $username, $password, $database);
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL DB: " . mysqli_connect_error();
}
if(isset($_GET["query"])){
$query = $_GET["query"];
$result = mysqli_query($con, "SELECT * FROM Files WHERE Files.user_name LIKE '%$query%'
or Files.file_name LIKE '%$query%' or file_type LIKE '%$query%'");
}
else{
$result = mysqli_query($con, "SELECT * FROM Files ORDER BY idFiles DESC;");
}
echo "<table class='table table-striped table-bordered' style='margin-top: 5px'><tr>
<th>ID</th>
<th>File Name</th>
<th>Original Server</th>
<th>File Size</th>
<th>File Type</th>
<th>Action</th>
</tr>";
while ($row = mysqli_fetch_array($result)) {
echo "<tr>";
echo "<td>" . $row['idFiles'] . "</td><td>"
."<a href='".$row['url']."'>". $row['file_name'] . "</a></td><td>"
. $row['user_name'] . "</td><td>"
. ceil($row['file_size']/1024) . "kb</td><td>"
. $row['file_type'] . "</td><td>"
. "<form action='delete.php' method='post' class='form-inline' role='form'>
<input type='hidden' name='id' value='".$row['idFiles']."' />
<button type='submit' class='btn btn-danger'>DELETE</button>
</form></td>";
echo "</tr>";
}
echo "</table>";
mysqli_close($con);
?>
</body>
</html>
|
Budweiser-CMPE207/FileSharingSystem_CMPE207
|
Emy Itegbe/Php/webclient.php
|
PHP
|
mit
| 2,891
|
using Microsoft.Azure.Mobile.Server;
namespace Miles.People.MobileAppService.DataObjects
{
public class Item : EntityData
{
public string Text { get; set; }
public string Description { get; set; }
}
}
|
pjsamuel3/xPlatformDotNet
|
app/Miles.People/Miles.People/Miles.People.MobileAppService/DataObjects/Item.cs
|
C#
|
mit
| 232
|
# 4
read -r -d '' INST_GITIGNORE <<EOM
# ignore logs
logs/
# tls certs
letsencrypt/
acme/
ocsp/
EOM
read -r -d '' INST_CONFIGFILE <<"EOM"
#
# configfile for caddy manager
#
#CADDY_DIR=caddy
#SERVICES_DIR=services
#PROJECT=demo
# Network for services to connect to caddy
#CADDYNET=CADDYNET
# Mail address for Let's Encrypt
#ACME_MAIL=ACME_MAIL
# Default server hostname for generating subdomains
#FQDN=domain.tld
# Settings for the caddy Docker image
#CADDY_FEATURES='DNS,cors,filemanager,git,hugo,ipfilter,jwt,locale,minify,ratelimit,realip,upload'
#CADDY_IMAGENAME=fciserver/caddy
#HUGO_VERSION=0.18 # only tested with 0.17 and 0.18 because the upstream tar archive names are inconsistent
EOM
read -r -d '' INST_DOCKERFILE <<"EOM"
ENV OPENSSL_VERSION 1.0.2e-r0
RUN apk add --no-cache \
bash \
bind-tools \
ca-certificates \
curl \
drill \
git \
openssh-client \
sudo \
"openssl>=${OPENSSL_VERSION}"
# Install hugo
ARG HUGO_VERSION
ENV HUGO_VERSION ${HUGO_VERSION:-0.18}
ENV URL="https://github.com/spf13/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz"
RUN \
curl -sSLo /tmp/hugo.tgz ${URL} \
&& tar xzf /tmp/hugo.tgz -C /tmp hugo_${HUGO_VERSION}_linux_amd64/hugo_${HUGO_VERSION}_linux_amd64 \
&& mv /tmp/hugo_${HUGO_VERSION}_linux_amd64/hugo_${HUGO_VERSION}_linux_amd64 /usr/local/bin/hugo \
&& rm -rf /tmp/*
# Install caddy
ARG CADDY_FEATURES
ENV CADDY_FEATURES ${CADDY_FEATURES:-"DNS,cors,filemanager,git,hugo,ipfilter,jwt,locale,minify,ratelimit,realip,upload"}
RUN curl -fsSL https://getcaddy.com | bash -s ${CADDY_FEATURES}
# Fix to use git plugin
RUN mkdir /root/.ssh \
&& echo -e "\
StrictHostKeyChecking no\\n\
UserKnownHostsFile /dev/null\\n\
" > /root/.ssh/config
#RUN adduser -Du 1000 caddy \
# && mkdir /home/caddy/.ssh \
# && cp /root/.ssh/config /home/caddy/.ssh/config
#USER caddy
EXPOSE 53 53/udp 80 443 2015
ENTRYPOINT ["caddy"]
EOM
read -r -d '' INST_CADDYFILE <<EOM
http://start.domain.tld:80 http://:80 http://www.domain.tld:80 http://domain.tld:80 {
tls off
# add this if you like to enable tls
# tls ACME_MAIL
log / /data/logs/caddy.log "[startpage] - {when} - {remote} - {proto} {method} {path} - {status} {size}"
root /data/www
minify
redir /ip /ip.txt
mime .txt text/plain
templates /ip .txt
}#END_start
EOM
read -r -d '' INST_COMPOSE <<EOM
version: "2"
networks:
backend:
external:
name: CADDYNET
services:
caddy:
image: CADDY_IMAGENAME
restart: on-failure:5
cap_add:
- NET_BIND_SERVICE
user: root
networks:
- backend
ports:
- "80:80"
- "443:443"
# - "2015:2015"
# - "53:53"
# - "53:53/udp"
# command: -http2=false -conf /data/conf/caddyfile
command: -type http -port 80 -http2=false -conf /data/conf/caddyfile
# command: -type dns -port 53 -conf /data/conf/corefile
read_only: true
working_dir: /data
environment:
- CADDYPATH=/data
volumes:
- ./caddy:/data:rw
EOM
read -r -d '' NEW_CADDYFILE <<EOM
http://SERVICE.domain.tld:80 {
tls off
# add this if you like to enable tls
# tls ACME_MAIL
log / /data/logs/services.log "[SERVICE] - {when} - {remote} - {proto} {method} {path} - {status} {size}"
proxy / http://SERVICE:80/ {
transparent
}
}
EOM
read -r -d '' NEW_COMPOSE <<EOM
version: '2'
networks:
backend:
external:
name: CADDYNET
services:
SERVICE:
networks:
- backend
restart: on-failure:5
expose:
- 80
image: SERVICE
build:
context: ./docker/
dockerfile: Dockerfile
EOM
read -r -d '' NEW_DOCKERFILE <<EOM
FROM busybox
#FROM armhf/busybox
WORKDIR /www
COPY index.html /www/index.html
EXPOSE 80
ENTRYPOINT ["httpd"]
CMD ["-f","-v","-p","80","-h", "/www"]
EOM
read -r -d '' PLUGIN_CADDYFILE <<EOM
http://start.domain.tld:80/file {
tls off
# add this if you like to enable tls
# tls noreply@domain.tld
root /data/htdocs
log / /data/logs/plugins.log "[browse] - {when} - {remote} - {proto} {method} {path} - {status} {size}"
browse /
# protect using HTTP basic auth
basicauth / admin password
}
http://start.domain.tld:80/filemanager {
tls off
# add this if you like to enable tls
# tls noreply@domain.tld
root /data/htdocs/files
log / /data/logs/plugins.log "[filemanager] - {when} - {remote} - {proto} {method} {path} - {status} {size}"
filemanager {
show /data/htdocs/files/
}
# protect using HTTP basic auth
basicauth / admin password
}
http://start.domain.tld:80/hugo {
tls off
# add this if you like to enable tls
# tls noreply@domain.tld
root /data/htdocs/hugo/public
log / /data/logs/plugins.log "[hugo] - {when} - {remote} - {proto} {method} {path} - {status} {size}"
hugo /data/htdocs/hugo
# protect the admin area using HTTP basic auth
basicauth /admin admin password
}
http://start.domain.tld:80/git {
tls off
# add this if you like to enable tls
# tls noreply@domain.tld
root /data/htdocs/git/www
log / /data/logs/plugins.log "[git] - {when} - {remote} - {proto} {method} {path} - {status} {size}"
git {
# repo ssh://git@github.com:22/octocat/octocat.github.io.git
repo https://github.com/octocat/octocat.github.io.git
branch master
# path /data/htdocs/git/www
# ssh key for pulling private repos
# key /data/htdocs/git/key/id_rsa
hook_type github
# Webhook url: http://start.domain.tld:80/git/webhook
hook /webhook webhook-secret
interval 86400
}
}
EOM
read -r -d '' PLUGIN_WEBLINKS <<EOM
[
{
"name": "git",
"link": "/git",
"button": "btn-success",
"image": "empty"
},
{
"name": "hugo",
"link": "/hugo",
"button": "btn-success",
"image": "empty"
},
{
"name": "hugo admin",
"link": "/hugo/admin",
"button": "btn-danger",
"image": "empty"
},
{
"name": "filemanager",
"link": "/filemanager",
"button": "btn-danger",
"image": "empty"
},
{
"name": "filebrowser",
"link": "/file",
"button": "btn-warning",
"image": "empty"
}
]
EOM
read -r -d '' WEB_MAINJS <<"EOM"
jQuery.fn.extend({
linklist: function (kwargs) {
var self = $(this);
$.ajax({
url: dataurl,
async:true,
contentType:"application/json",
dataType: "json",
success: function(data){
$.each(data, function(key, attributes){
var my_link = (typeof attributes['link'] != 'undefined') ? attributes['link'] : "";
var my_button = (typeof attributes['button'] != 'undefined') ? attributes['button'] : "";
var my_name = (typeof attributes['name'] != 'undefined') ? attributes['name'] : "";
var my_image = ((typeof attributes['image'] != 'undefined') && (attributes['image'] == "empty")) ? my_name : attributes['image'];
var new_div = $("<li>");
var new_anchor = $("<a>");
$(new_anchor).attr("href", my_link);
$(new_anchor).addClass("btn");
$(new_anchor).addClass(my_button);
$(new_anchor).attr("style", "height:150px");
if ((typeof my_image != 'undefined') && (my_image != "empty")) {
var new_content = $("<span>");
if (my_image != my_name) {
$(new_anchor).html(my_name);
new_content = $("<img>");
$(new_content).addClass("img-responsive");
$(new_content).attr("src", my_image);
}else{
var new_br = $("<br>");
$(new_br).appendTo(new_anchor);
new_content = $("<div>");
$(new_content).attr("style", "width:100px;height:100px");
$(new_content).html(my_name);
}
$(new_content).appendTo(new_anchor);
}
$(new_anchor).appendTo(new_div);
console.log(new_div);
$(new_div).appendTo(self);
});
}
});
}
});
/*
jQuery.fn.extend({
impress: function (kwargs) {
var self = $(this);
$.ajax({
url: "vcf/api.php",
async:true,
contentType:"text/html",
dataType: "html",
success: function(data){
$(self).html(data);
}
});
}
});
*/
$(document).ready(function(){
$("#content").linklist();
// $("#impressum").impress();
});
EOM
read -r -d '' WEB_HTML <<"EOM"
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Landingpage</title>
<!-- Bootstrap -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for 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://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<style>
ul {
list-style-type: none;
}
li {
float:left;
padding:20px;
}
</style>
<script>
var dataurl="DATASOURCE"
</script>
</head>
<body>
<div class="container">
<div class="jumbotron">
<h1>landingpage</h1>
<p class="lead"></p>
</div>
<div class="container">
<ul id="content">
<li><a style="height:150px" class="btn btn-info" href="FIRSTLINK"><br><div style="width:100px;height:100px">FIRSTTITLE</div></a></li>
</ul>
</div>
</div><!--/.container-->
<hr>
<footer>
<p>© 2015 Company, Inc.</p>
<div id="impressum"></div>
</footer>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<!--<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>-->
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="main.js"></script>
</body>
</html>
EOM
|
firecyberice/caddy
|
lib/templates.sh
|
Shell
|
mit
| 11,047
|
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2021 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <httpserver.h>
#include <index/blockfilterindex.h>
#include <index/coinstatsindex.h>
#include <index/txindex.h>
#include <interfaces/chain.h>
#include <interfaces/echo.h>
#include <interfaces/init.h>
#include <interfaces/ipc.h>
#include <key_io.h>
#include <node/context.h>
#include <outputtype.h>
#include <rpc/blockchain.h>
#include <rpc/server.h>
#include <rpc/server_util.h>
#include <rpc/util.h>
#include <scheduler.h>
#include <script/descriptor.h>
#include <util/check.h>
#include <util/message.h> // For MessageSign(), MessageVerify()
#include <util/strencodings.h>
#include <util/syscall_sandbox.h>
#include <util/system.h>
#include <optional>
#include <stdint.h>
#include <tuple>
#ifdef HAVE_MALLOC_INFO
#include <malloc.h>
#endif
#include <univalue.h>
using node::NodeContext;
static RPCHelpMan validateaddress()
{
return RPCHelpMan{
"validateaddress",
"\nReturn information about the given groestlcoin address.\n",
{
{"address", RPCArg::Type::STR, RPCArg::Optional::NO, "The groestlcoin address to validate"},
},
RPCResult{
RPCResult::Type::OBJ, "", "",
{
{RPCResult::Type::BOOL, "isvalid", "If the address is valid or not"},
{RPCResult::Type::STR, "address", /*optional=*/true, "The groestlcoin address validated"},
{RPCResult::Type::STR_HEX, "scriptPubKey", /*optional=*/true, "The hex-encoded scriptPubKey generated by the address"},
{RPCResult::Type::BOOL, "isscript", /*optional=*/true, "If the key is a script"},
{RPCResult::Type::BOOL, "iswitness", /*optional=*/true, "If the address is a witness address"},
{RPCResult::Type::NUM, "witness_version", /*optional=*/true, "The version number of the witness program"},
{RPCResult::Type::STR_HEX, "witness_program", /*optional=*/true, "The hex value of the witness program"},
{RPCResult::Type::STR, "error", /*optional=*/true, "Error message, if any"},
{RPCResult::Type::ARR, "error_locations", /*optional=*/true, "Indices of likely error locations in address, if known (e.g. Bech32 errors)",
{
{RPCResult::Type::NUM, "index", "index of a potential error"},
}},
}
},
RPCExamples{
HelpExampleCli("validateaddress", "\"" + EXAMPLE_ADDRESS[0] + "\"") +
HelpExampleRpc("validateaddress", "\"" + EXAMPLE_ADDRESS[0] + "\"")
},
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{
std::string error_msg;
std::vector<int> error_locations;
CTxDestination dest = DecodeDestination(request.params[0].get_str(), error_msg, &error_locations);
const bool isValid = IsValidDestination(dest);
CHECK_NONFATAL(isValid == error_msg.empty());
UniValue ret(UniValue::VOBJ);
ret.pushKV("isvalid", isValid);
if (isValid) {
std::string currentAddress = EncodeDestination(dest);
ret.pushKV("address", currentAddress);
CScript scriptPubKey = GetScriptForDestination(dest);
ret.pushKV("scriptPubKey", HexStr(scriptPubKey));
UniValue detail = DescribeAddress(dest);
ret.pushKVs(detail);
} else {
UniValue error_indices(UniValue::VARR);
for (int i : error_locations) error_indices.push_back(i);
ret.pushKV("error_locations", error_indices);
ret.pushKV("error", error_msg);
}
return ret;
},
};
}
static RPCHelpMan createmultisig()
{
return RPCHelpMan{"createmultisig",
"\nCreates a multi-signature address with n signature of m keys required.\n"
"It returns a json object with the address and redeemScript.\n",
{
{"nrequired", RPCArg::Type::NUM, RPCArg::Optional::NO, "The number of required signatures out of the n keys."},
{"keys", RPCArg::Type::ARR, RPCArg::Optional::NO, "The hex-encoded public keys.",
{
{"key", RPCArg::Type::STR_HEX, RPCArg::Optional::OMITTED, "The hex-encoded public key"},
}},
{"address_type", RPCArg::Type::STR, RPCArg::Default{"legacy"}, "The address type to use. Options are \"legacy\", \"p2sh-segwit\", and \"bech32\"."},
},
RPCResult{
RPCResult::Type::OBJ, "", "",
{
{RPCResult::Type::STR, "address", "The value of the new multisig address."},
{RPCResult::Type::STR_HEX, "redeemScript", "The string value of the hex-encoded redemption script."},
{RPCResult::Type::STR, "descriptor", "The descriptor for this multisig"},
{RPCResult::Type::ARR, "warnings", /* optional */ true, "Any warnings resulting from the creation of this multisig",
{
{RPCResult::Type::STR, "", ""},
}},
}
},
RPCExamples{
"\nCreate a multisig address from 2 public keys\n"
+ HelpExampleCli("createmultisig", "2 \"[\\\"03789ed0bb717d88f7d321a368d905e7430207ebbd82bd342cf11ae157a7ace5fd\\\",\\\"03dbc6764b8884a92e871274b87583e6d5c2a58819473e17e107ef3f6aa5a61626\\\"]\"") +
"\nAs a JSON-RPC call\n"
+ HelpExampleRpc("createmultisig", "2, [\"03789ed0bb717d88f7d321a368d905e7430207ebbd82bd342cf11ae157a7ace5fd\",\"03dbc6764b8884a92e871274b87583e6d5c2a58819473e17e107ef3f6aa5a61626\"]")
},
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{
int required = request.params[0].get_int();
// Get the public keys
const UniValue& keys = request.params[1].get_array();
std::vector<CPubKey> pubkeys;
for (unsigned int i = 0; i < keys.size(); ++i) {
if (IsHex(keys[i].get_str()) && (keys[i].get_str().length() == 66 || keys[i].get_str().length() == 130)) {
pubkeys.push_back(HexToPubKey(keys[i].get_str()));
} else {
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, strprintf("Invalid public key: %s\n.", keys[i].get_str()));
}
}
// Get the output type
OutputType output_type = OutputType::LEGACY;
if (!request.params[2].isNull()) {
std::optional<OutputType> parsed = ParseOutputType(request.params[2].get_str());
if (!parsed) {
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, strprintf("Unknown address type '%s'", request.params[2].get_str()));
} else if (parsed.value() == OutputType::BECH32M) {
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "createmultisig cannot create bech32m multisig addresses");
}
output_type = parsed.value();
}
// Construct using pay-to-script-hash:
FillableSigningProvider keystore;
CScript inner;
const CTxDestination dest = AddAndGetMultisigDestination(required, pubkeys, output_type, keystore, inner);
// Make the descriptor
std::unique_ptr<Descriptor> descriptor = InferDescriptor(GetScriptForDestination(dest), keystore);
UniValue result(UniValue::VOBJ);
result.pushKV("address", EncodeDestination(dest));
result.pushKV("redeemScript", HexStr(inner));
result.pushKV("descriptor", descriptor->ToString());
UniValue warnings(UniValue::VARR);
if (!request.params[2].isNull() && OutputTypeFromDestination(dest) != output_type) {
// Only warns if the user has explicitly chosen an address type we cannot generate
warnings.push_back("Unable to make chosen address type, please ensure no uncompressed public keys are present.");
}
if (warnings.size()) result.pushKV("warnings", warnings);
return result;
},
};
}
static RPCHelpMan getdescriptorinfo()
{
const std::string EXAMPLE_DESCRIPTOR = "wpkh([d34db33f/84h/17h/0h]0279be667ef9dcbbac55a06295Ce870b07029Bfcdb2dce28d959f2815b16f81798)";
return RPCHelpMan{"getdescriptorinfo",
{"\nAnalyses a descriptor.\n"},
{
{"descriptor", RPCArg::Type::STR, RPCArg::Optional::NO, "The descriptor."},
},
RPCResult{
RPCResult::Type::OBJ, "", "",
{
{RPCResult::Type::STR, "descriptor", "The descriptor in canonical form, without private keys"},
{RPCResult::Type::STR, "checksum", "The checksum for the input descriptor"},
{RPCResult::Type::BOOL, "isrange", "Whether the descriptor is ranged"},
{RPCResult::Type::BOOL, "issolvable", "Whether the descriptor is solvable"},
{RPCResult::Type::BOOL, "hasprivatekeys", "Whether the input descriptor contained at least one private key"},
}
},
RPCExamples{
"Analyse a descriptor\n" +
HelpExampleCli("getdescriptorinfo", "\"" + EXAMPLE_DESCRIPTOR + "\"") +
HelpExampleRpc("getdescriptorinfo", "\"" + EXAMPLE_DESCRIPTOR + "\"")
},
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{
RPCTypeCheck(request.params, {UniValue::VSTR});
FlatSigningProvider provider;
std::string error;
auto desc = Parse(request.params[0].get_str(), provider, error);
if (!desc) {
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, error);
}
UniValue result(UniValue::VOBJ);
result.pushKV("descriptor", desc->ToString());
result.pushKV("checksum", GetDescriptorChecksum(request.params[0].get_str()));
result.pushKV("isrange", desc->IsRange());
result.pushKV("issolvable", desc->IsSolvable());
result.pushKV("hasprivatekeys", provider.keys.size() > 0);
return result;
},
};
}
static RPCHelpMan deriveaddresses()
{
const std::string EXAMPLE_DESCRIPTOR = "wpkh([d34db33f/84h/17h/0h]xpub6DJ2dNUysrn5Vt36jH2KLBT2i1auw1tTSSomg8PhqNiUtx8QX2SvC9nrHu81fT41fvDUnhMjEzQgXnQjKEu3oaqMSzhSrHMxyyoEAmUHQbY/0/*)#cjjspncu";
return RPCHelpMan{"deriveaddresses",
{"\nDerives one or more addresses corresponding to an output descriptor.\n"
"Examples of output descriptors are:\n"
" pkh(<pubkey>) P2PKH outputs for the given pubkey\n"
" wpkh(<pubkey>) Native segwit P2PKH outputs for the given pubkey\n"
" sh(multi(<n>,<pubkey>,<pubkey>,...)) P2SH-multisig outputs for the given threshold and pubkeys\n"
" raw(<hex script>) Outputs whose scriptPubKey equals the specified hex scripts\n"
"\nIn the above, <pubkey> either refers to a fixed public key in hexadecimal notation, or to an xpub/xprv optionally followed by one\n"
"or more path elements separated by \"/\", where \"h\" represents a hardened child key.\n"
"For more information on output descriptors, see the documentation in the doc/descriptors.md file.\n"},
{
{"descriptor", RPCArg::Type::STR, RPCArg::Optional::NO, "The descriptor."},
{"range", RPCArg::Type::RANGE, RPCArg::Optional::OMITTED_NAMED_ARG, "If a ranged descriptor is used, this specifies the end or the range (in [begin,end] notation) to derive."},
},
RPCResult{
RPCResult::Type::ARR, "", "",
{
{RPCResult::Type::STR, "address", "the derived addresses"},
}
},
RPCExamples{
"First three native segwit receive addresses\n" +
HelpExampleCli("deriveaddresses", "\"" + EXAMPLE_DESCRIPTOR + "\" \"[0,2]\"") +
HelpExampleRpc("deriveaddresses", "\"" + EXAMPLE_DESCRIPTOR + "\", \"[0,2]\"")
},
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{
RPCTypeCheck(request.params, {UniValue::VSTR, UniValueType()}); // Range argument is checked later
const std::string desc_str = request.params[0].get_str();
int64_t range_begin = 0;
int64_t range_end = 0;
if (request.params.size() >= 2 && !request.params[1].isNull()) {
std::tie(range_begin, range_end) = ParseDescriptorRange(request.params[1]);
}
FlatSigningProvider key_provider;
std::string error;
auto desc = Parse(desc_str, key_provider, error, /* require_checksum = */ true);
if (!desc) {
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, error);
}
if (!desc->IsRange() && request.params.size() > 1) {
throw JSONRPCError(RPC_INVALID_PARAMETER, "Range should not be specified for an un-ranged descriptor");
}
if (desc->IsRange() && request.params.size() == 1) {
throw JSONRPCError(RPC_INVALID_PARAMETER, "Range must be specified for a ranged descriptor");
}
UniValue addresses(UniValue::VARR);
for (int i = range_begin; i <= range_end; ++i) {
FlatSigningProvider provider;
std::vector<CScript> scripts;
if (!desc->Expand(i, key_provider, scripts, provider)) {
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Cannot derive script without private keys");
}
for (const CScript &script : scripts) {
CTxDestination dest;
if (!ExtractDestination(script, dest)) {
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Descriptor does not have a corresponding address");
}
addresses.push_back(EncodeDestination(dest));
}
}
// This should not be possible, but an assert seems overkill:
if (addresses.empty()) {
throw JSONRPCError(RPC_MISC_ERROR, "Unexpected empty result");
}
return addresses;
},
};
}
static RPCHelpMan verifymessage()
{
return RPCHelpMan{"verifymessage",
"Verify a signed message.",
{
{"address", RPCArg::Type::STR, RPCArg::Optional::NO, "The groestlcoin address to use for the signature."},
{"signature", RPCArg::Type::STR, RPCArg::Optional::NO, "The signature provided by the signer in base 64 encoding (see signmessage)."},
{"message", RPCArg::Type::STR, RPCArg::Optional::NO, "The message that was signed."},
},
RPCResult{
RPCResult::Type::BOOL, "", "If the signature is verified or not."
},
RPCExamples{
"\nUnlock the wallet for 30 seconds\n"
+ HelpExampleCli("walletpassphrase", "\"mypassphrase\" 30") +
"\nCreate the signature\n"
+ HelpExampleCli("signmessage", "\"FdeDnzHyMSroQWo2uz7GzHQhHEvtZRojCY\" \"my message\"") +
"\nVerify the signature\n"
+ HelpExampleCli("verifymessage", "\"FdeDnzHyMSroQWo2uz7GzHQhHEvtZRojCY\" \"signature\" \"my message\"") +
"\nAs a JSON-RPC call\n"
+ HelpExampleRpc("verifymessage", "\"FdeDnzHyMSroQWo2uz7GzHQhHEvtZRojCY\", \"signature\", \"my message\"")
},
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{
LOCK(cs_main);
std::string strAddress = request.params[0].get_str();
std::string strSign = request.params[1].get_str();
std::string strMessage = request.params[2].get_str();
switch (MessageVerify(strAddress, strSign, strMessage)) {
case MessageVerificationResult::ERR_INVALID_ADDRESS:
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid address");
case MessageVerificationResult::ERR_ADDRESS_NO_KEY:
throw JSONRPCError(RPC_TYPE_ERROR, "Address does not refer to key");
case MessageVerificationResult::ERR_MALFORMED_SIGNATURE:
throw JSONRPCError(RPC_TYPE_ERROR, "Malformed base64 encoding");
case MessageVerificationResult::ERR_PUBKEY_NOT_RECOVERED:
case MessageVerificationResult::ERR_NOT_SIGNED:
return false;
case MessageVerificationResult::OK:
return true;
}
return false;
},
};
}
static RPCHelpMan signmessagewithprivkey()
{
return RPCHelpMan{"signmessagewithprivkey",
"\nSign a message with the private key of an address\n",
{
{"privkey", RPCArg::Type::STR, RPCArg::Optional::NO, "The private key to sign the message with."},
{"message", RPCArg::Type::STR, RPCArg::Optional::NO, "The message to create a signature of."},
},
RPCResult{
RPCResult::Type::STR, "signature", "The signature of the message encoded in base 64"
},
RPCExamples{
"\nCreate the signature\n"
+ HelpExampleCli("signmessagewithprivkey", "\"privkey\" \"my message\"") +
"\nVerify the signature\n"
+ HelpExampleCli("verifymessage", "\"FdeDnzHyMSroQWo2uz7GzHQhHEvtZRojCY\" \"signature\" \"my message\"") +
"\nAs a JSON-RPC call\n"
+ HelpExampleRpc("signmessagewithprivkey", "\"privkey\", \"my message\"")
},
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{
std::string strPrivkey = request.params[0].get_str();
std::string strMessage = request.params[1].get_str();
CKey key = DecodeSecret(strPrivkey);
if (!key.IsValid()) {
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid private key");
}
std::string signature;
if (!MessageSign(key, strMessage, signature)) {
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Sign failed");
}
return signature;
},
};
}
static RPCHelpMan setmocktime()
{
return RPCHelpMan{"setmocktime",
"\nSet the local time to given timestamp (-regtest only)\n",
{
{"timestamp", RPCArg::Type::NUM, RPCArg::Optional::NO, UNIX_EPOCH_TIME + "\n"
"Pass 0 to go back to using the system time."},
},
RPCResult{RPCResult::Type::NONE, "", ""},
RPCExamples{""},
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{
if (!Params().IsMockableChain()) {
throw std::runtime_error("setmocktime is for regression testing (-regtest mode) only");
}
// For now, don't change mocktime if we're in the middle of validation, as
// this could have an effect on mempool time-based eviction, as well as
// IsCurrentForFeeEstimation() and IsInitialBlockDownload().
// TODO: figure out the right way to synchronize around mocktime, and
// ensure all call sites of GetTime() are accessing this safely.
LOCK(cs_main);
RPCTypeCheck(request.params, {UniValue::VNUM});
const int64_t time{request.params[0].get_int64()};
if (time < 0) {
throw JSONRPCError(RPC_INVALID_PARAMETER, strprintf("Mocktime can not be negative: %s.", time));
}
SetMockTime(time);
auto node_context = util::AnyPtr<NodeContext>(request.context);
if (node_context) {
for (const auto& chain_client : node_context->chain_clients) {
chain_client->setMockTime(time);
}
}
return NullUniValue;
},
};
}
#if defined(USE_SYSCALL_SANDBOX)
static RPCHelpMan invokedisallowedsyscall()
{
return RPCHelpMan{
"invokedisallowedsyscall",
"\nInvoke a disallowed syscall to trigger a syscall sandbox violation. Used for testing purposes.\n",
{},
RPCResult{RPCResult::Type::NONE, "", ""},
RPCExamples{
HelpExampleCli("invokedisallowedsyscall", "") + HelpExampleRpc("invokedisallowedsyscall", "")},
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue {
if (!Params().IsTestChain()) {
throw std::runtime_error("invokedisallowedsyscall is used for testing only.");
}
TestDisallowedSandboxCall();
return NullUniValue;
},
};
}
#endif // USE_SYSCALL_SANDBOX
static RPCHelpMan mockscheduler()
{
return RPCHelpMan{"mockscheduler",
"\nBump the scheduler into the future (-regtest only)\n",
{
{"delta_time", RPCArg::Type::NUM, RPCArg::Optional::NO, "Number of seconds to forward the scheduler into the future." },
},
RPCResult{RPCResult::Type::NONE, "", ""},
RPCExamples{""},
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{
if (!Params().IsMockableChain()) {
throw std::runtime_error("mockscheduler is for regression testing (-regtest mode) only");
}
// check params are valid values
RPCTypeCheck(request.params, {UniValue::VNUM});
int64_t delta_seconds = request.params[0].get_int64();
if (delta_seconds <= 0 || delta_seconds > 3600) {
throw std::runtime_error("delta_time must be between 1 and 3600 seconds (1 hr)");
}
auto node_context = util::AnyPtr<NodeContext>(request.context);
// protect against null pointer dereference
CHECK_NONFATAL(node_context);
CHECK_NONFATAL(node_context->scheduler);
node_context->scheduler->MockForward(std::chrono::seconds(delta_seconds));
return NullUniValue;
},
};
}
static UniValue RPCLockedMemoryInfo()
{
LockedPool::Stats stats = LockedPoolManager::Instance().stats();
UniValue obj(UniValue::VOBJ);
obj.pushKV("used", uint64_t(stats.used));
obj.pushKV("free", uint64_t(stats.free));
obj.pushKV("total", uint64_t(stats.total));
obj.pushKV("locked", uint64_t(stats.locked));
obj.pushKV("chunks_used", uint64_t(stats.chunks_used));
obj.pushKV("chunks_free", uint64_t(stats.chunks_free));
return obj;
}
#ifdef HAVE_MALLOC_INFO
static std::string RPCMallocInfo()
{
char *ptr = nullptr;
size_t size = 0;
FILE *f = open_memstream(&ptr, &size);
if (f) {
malloc_info(0, f);
fclose(f);
if (ptr) {
std::string rv(ptr, size);
free(ptr);
return rv;
}
}
return "";
}
#endif
static RPCHelpMan getmemoryinfo()
{
/* Please, avoid using the word "pool" here in the RPC interface or help,
* as users will undoubtedly confuse it with the other "memory pool"
*/
return RPCHelpMan{"getmemoryinfo",
"Returns an object containing information about memory usage.\n",
{
{"mode", RPCArg::Type::STR, RPCArg::Default{"stats"}, "determines what kind of information is returned.\n"
" - \"stats\" returns general statistics about memory usage in the daemon.\n"
" - \"mallocinfo\" returns an XML string describing low-level heap state (only available if compiled with glibc 2.10+)."},
},
{
RPCResult{"mode \"stats\"",
RPCResult::Type::OBJ, "", "",
{
{RPCResult::Type::OBJ, "locked", "Information about locked memory manager",
{
{RPCResult::Type::NUM, "used", "Number of bytes used"},
{RPCResult::Type::NUM, "free", "Number of bytes available in current arenas"},
{RPCResult::Type::NUM, "total", "Total number of bytes managed"},
{RPCResult::Type::NUM, "locked", "Amount of bytes that succeeded locking. If this number is smaller than total, locking pages failed at some point and key data could be swapped to disk."},
{RPCResult::Type::NUM, "chunks_used", "Number allocated chunks"},
{RPCResult::Type::NUM, "chunks_free", "Number unused chunks"},
}},
}
},
RPCResult{"mode \"mallocinfo\"",
RPCResult::Type::STR, "", "\"<malloc version=\"1\">...\""
},
},
RPCExamples{
HelpExampleCli("getmemoryinfo", "")
+ HelpExampleRpc("getmemoryinfo", "")
},
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{
std::string mode = request.params[0].isNull() ? "stats" : request.params[0].get_str();
if (mode == "stats") {
UniValue obj(UniValue::VOBJ);
obj.pushKV("locked", RPCLockedMemoryInfo());
return obj;
} else if (mode == "mallocinfo") {
#ifdef HAVE_MALLOC_INFO
return RPCMallocInfo();
#else
throw JSONRPCError(RPC_INVALID_PARAMETER, "mallocinfo mode not available");
#endif
} else {
throw JSONRPCError(RPC_INVALID_PARAMETER, "unknown mode " + mode);
}
},
};
}
static void EnableOrDisableLogCategories(UniValue cats, bool enable) {
cats = cats.get_array();
for (unsigned int i = 0; i < cats.size(); ++i) {
std::string cat = cats[i].get_str();
bool success;
if (enable) {
success = LogInstance().EnableCategory(cat);
} else {
success = LogInstance().DisableCategory(cat);
}
if (!success) {
throw JSONRPCError(RPC_INVALID_PARAMETER, "unknown logging category " + cat);
}
}
}
static RPCHelpMan logging()
{
return RPCHelpMan{"logging",
"Gets and sets the logging configuration.\n"
"When called without an argument, returns the list of categories with status that are currently being debug logged or not.\n"
"When called with arguments, adds or removes categories from debug logging and return the lists above.\n"
"The arguments are evaluated in order \"include\", \"exclude\".\n"
"If an item is both included and excluded, it will thus end up being excluded.\n"
"The valid logging categories are: " + LogInstance().LogCategoriesString() + "\n"
"In addition, the following are available as category names with special meanings:\n"
" - \"all\", \"1\" : represent all logging categories.\n"
" - \"none\", \"0\" : even if other logging categories are specified, ignore all of them.\n"
,
{
{"include", RPCArg::Type::ARR, RPCArg::Optional::OMITTED_NAMED_ARG, "The categories to add to debug logging",
{
{"include_category", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "the valid logging category"},
}},
{"exclude", RPCArg::Type::ARR, RPCArg::Optional::OMITTED_NAMED_ARG, "The categories to remove from debug logging",
{
{"exclude_category", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "the valid logging category"},
}},
},
RPCResult{
RPCResult::Type::OBJ_DYN, "", "keys are the logging categories, and values indicates its status",
{
{RPCResult::Type::BOOL, "category", "if being debug logged or not. false:inactive, true:active"},
}
},
RPCExamples{
HelpExampleCli("logging", "\"[\\\"all\\\"]\" \"[\\\"http\\\"]\"")
+ HelpExampleRpc("logging", "[\"all\"], [\"libevent\"]")
},
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{
uint32_t original_log_categories = LogInstance().GetCategoryMask();
if (request.params[0].isArray()) {
EnableOrDisableLogCategories(request.params[0], true);
}
if (request.params[1].isArray()) {
EnableOrDisableLogCategories(request.params[1], false);
}
uint32_t updated_log_categories = LogInstance().GetCategoryMask();
uint32_t changed_log_categories = original_log_categories ^ updated_log_categories;
// Update libevent logging if BCLog::LIBEVENT has changed.
// If the library version doesn't allow it, UpdateHTTPServerLogging() returns false,
// in which case we should clear the BCLog::LIBEVENT flag.
// Throw an error if the user has explicitly asked to change only the libevent
// flag and it failed.
if (changed_log_categories & BCLog::LIBEVENT) {
if (!UpdateHTTPServerLogging(LogInstance().WillLogCategory(BCLog::LIBEVENT))) {
LogInstance().DisableCategory(BCLog::LIBEVENT);
if (changed_log_categories == BCLog::LIBEVENT) {
throw JSONRPCError(RPC_INVALID_PARAMETER, "libevent logging cannot be updated when using libevent before v2.1.1.");
}
}
}
UniValue result(UniValue::VOBJ);
for (const auto& logCatActive : LogInstance().LogCategoriesList()) {
result.pushKV(logCatActive.category, logCatActive.active);
}
return result;
},
};
}
static RPCHelpMan echo(const std::string& name)
{
return RPCHelpMan{name,
"\nSimply echo back the input arguments. This command is for testing.\n"
"\nIt will return an internal bug report when arg9='trigger_internal_bug' is passed.\n"
"\nThe difference between echo and echojson is that echojson has argument conversion enabled in the client-side table in "
"groestlcoin-cli and the GUI. There is no server-side difference.",
{
{"arg0", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, ""},
{"arg1", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, ""},
{"arg2", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, ""},
{"arg3", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, ""},
{"arg4", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, ""},
{"arg5", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, ""},
{"arg6", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, ""},
{"arg7", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, ""},
{"arg8", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, ""},
{"arg9", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, ""},
},
RPCResult{RPCResult::Type::ANY, "", "Returns whatever was passed in"},
RPCExamples{""},
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{
if (request.params[9].isStr()) {
CHECK_NONFATAL(request.params[9].get_str() != "trigger_internal_bug");
}
return request.params;
},
};
}
static RPCHelpMan echo() { return echo("echo"); }
static RPCHelpMan echojson() { return echo("echojson"); }
static RPCHelpMan echoipc()
{
return RPCHelpMan{
"echoipc",
"\nEcho back the input argument, passing it through a spawned process in a multiprocess build.\n"
"This command is for testing.\n",
{{"arg", RPCArg::Type::STR, RPCArg::Optional::NO, "The string to echo",}},
RPCResult{RPCResult::Type::STR, "echo", "The echoed string."},
RPCExamples{HelpExampleCli("echo", "\"Hello world\"") +
HelpExampleRpc("echo", "\"Hello world\"")},
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue {
interfaces::Init& local_init = *EnsureAnyNodeContext(request.context).init;
std::unique_ptr<interfaces::Echo> echo;
if (interfaces::Ipc* ipc = local_init.ipc()) {
// Spawn a new groestlcoin-node process and call makeEcho to get a
// client pointer to a interfaces::Echo instance running in
// that process. This is just for testing. A slightly more
// realistic test spawning a different executable instead of
// the same executable would add a new groestlcoin-echo executable,
// and spawn groestlcoin-echo below instead of groestlcoin-node. But
// using groestlcoin-node avoids the need to build and install a
// new executable just for this one test.
auto init = ipc->spawnProcess("groestlcoin-node");
echo = init->makeEcho();
ipc->addCleanup(*echo, [init = init.release()] { delete init; });
} else {
// IPC support is not available because this is a bitcoind
// process not a groestlcoind-node process, so just create a local
// interfaces::Echo object and return it so the `echoipc` RPC
// method will work, and the python test calling `echoipc`
// can expect the same result.
echo = local_init.makeEcho();
}
return echo->echo(request.params[0].get_str());
},
};
}
static UniValue SummaryToJSON(const IndexSummary&& summary, std::string index_name)
{
UniValue ret_summary(UniValue::VOBJ);
if (!index_name.empty() && index_name != summary.name) return ret_summary;
UniValue entry(UniValue::VOBJ);
entry.pushKV("synced", summary.synced);
entry.pushKV("best_block_height", summary.best_block_height);
ret_summary.pushKV(summary.name, entry);
return ret_summary;
}
static RPCHelpMan getindexinfo()
{
return RPCHelpMan{"getindexinfo",
"\nReturns the status of one or all available indices currently running in the node.\n",
{
{"index_name", RPCArg::Type::STR, RPCArg::Optional::OMITTED_NAMED_ARG, "Filter results for an index with a specific name."},
},
RPCResult{
RPCResult::Type::OBJ_DYN, "", "", {
{
RPCResult::Type::OBJ, "name", "The name of the index",
{
{RPCResult::Type::BOOL, "synced", "Whether the index is synced or not"},
{RPCResult::Type::NUM, "best_block_height", "The block height to which the index is synced"},
}
},
},
},
RPCExamples{
HelpExampleCli("getindexinfo", "")
+ HelpExampleRpc("getindexinfo", "")
+ HelpExampleCli("getindexinfo", "txindex")
+ HelpExampleRpc("getindexinfo", "txindex")
},
[&](const RPCHelpMan& self, const JSONRPCRequest& request) -> UniValue
{
UniValue result(UniValue::VOBJ);
const std::string index_name = request.params[0].isNull() ? "" : request.params[0].get_str();
if (g_txindex) {
result.pushKVs(SummaryToJSON(g_txindex->GetSummary(), index_name));
}
if (g_coin_stats_index) {
result.pushKVs(SummaryToJSON(g_coin_stats_index->GetSummary(), index_name));
}
ForEachBlockFilterIndex([&result, &index_name](const BlockFilterIndex& index) {
result.pushKVs(SummaryToJSON(index.GetSummary(), index_name));
});
return result;
},
};
}
void RegisterMiscRPCCommands(CRPCTable &t)
{
// clang-format off
static const CRPCCommand commands[] =
{ // category actor (function)
// --------------------- ------------------------
{ "control", &getmemoryinfo, },
{ "control", &logging, },
{ "util", &validateaddress, },
{ "util", &createmultisig, },
{ "util", &deriveaddresses, },
{ "util", &getdescriptorinfo, },
{ "util", &verifymessage, },
{ "util", &signmessagewithprivkey, },
{ "util", &getindexinfo, },
/* Not shown in help */
{ "hidden", &setmocktime, },
{ "hidden", &mockscheduler, },
{ "hidden", &echo, },
{ "hidden", &echojson, },
{ "hidden", &echoipc, },
#if defined(USE_SYSCALL_SANDBOX)
{ "hidden", &invokedisallowedsyscall, },
#endif // USE_SYSCALL_SANDBOX
};
// clang-format on
for (const auto& c : commands) {
t.appendCommand(c.name, &c);
}
}
|
GroestlCoin/bitcoin
|
src/rpc/misc.cpp
|
C++
|
mit
| 36,710
|
TODO
## Heuristics of JS design?
[black box driven development](https://hacks.mozilla.org/2014/08/black-box-driven-development-in-javascript/)
[substack - finding modules](http://substack.net/finding_modules)
[objectplayground](http://www.objectplayground.com/)
[human javascript](http://read.humanjavascript.com/)
## What are heuristics of good UX?
* At most 5 sub toics
### Checks
[outdated ux patterns](https://github.com/north/north#outdated-ux-patterns) and the [pretty version](http://sideproject.io/outdated-ux-patterns/)
## Style
### JS
Use private parts for modeling
* [Private parts](https://github.com/philipwalton/private-parts)
## Patterns
* [Pattern comparison spreadsheet](https://docs.google.com/spreadsheet/ccc?key=0AiN0QfBTPpOCdDFjWlM0eU1ra21XanZkekxGbjA2WWc#gid=0) from [cloudfour](http://blog.cloudfour.com/common-patterns/)
### CSS
* [Centering](http://css-tricks.com/centering-css-complete-guide/), [Centering-2](http://html5hub.com/centering-all-the-directions/#i.1dpytroqxdcrxf)
* [Specificity](http://www.smashingmagazine.com/2009/08/17/taming-advanced-css-selectors/)
## To Use?
[Simple UX patterns](https://github.com/samdutton/simpl)
https://github.com/lavinjj/angular-responsive
https://github.com/misoproject/dataset
|
stackmates/common.client.build
|
src/common/ux_patterns/readme.md
|
Markdown
|
mit
| 1,279
|
<?php
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\ConfigurableProduct\Test\Block\Product;
use Magento\ConfigurableProduct\Test\Block\Product\View\ConfigurableOptions;
use Magento\ConfigurableProduct\Test\Fixture\ConfigurableProduct;
use Magento\Mtf\Fixture\FixtureInterface;
use Magento\Mtf\Fixture\InjectableFixture;
/**
* Class View
* Detail view block on frontend page
*/
class View extends \Magento\Catalog\Test\Block\Product\View
{
/**
* Get configurable options block
*
* @return ConfigurableOptions
*/
public function getConfigurableOptionsBlock()
{
return $this->blockFactory->create(
'Magento\ConfigurableProduct\Test\Block\Product\View\ConfigurableOptions',
['element' => $this->_rootElement]
);
}
/**
* Fill in the option specified for the product
*
* @param FixtureInterface $product
* @return void
*/
public function fillOptions(FixtureInterface $product)
{
/** @var ConfigurableProduct $product */
$attributesData = $product->getConfigurableAttributesData()['attributes_data'];
$checkoutData = $product->getCheckoutData();
// Prepare attribute data
foreach ($attributesData as $attributeKey => $attribute) {
$attributesData[$attributeKey] = [
'type' => $attribute['frontend_input'],
'title' => $attribute['label'],
'options' => [],
];
foreach ($attribute['options'] as $optionKey => $option) {
$attributesData[$attributeKey]['options'][$optionKey] = [
'title' => $option['label'],
];
}
$attributesData[$attributeKey]['options'] = array_values($attributesData[$attributeKey]['options']);
}
$attributesData = array_values($attributesData);
$configurableCheckoutData = isset($checkoutData['options']['configurable_options'])
? $checkoutData['options']['configurable_options']
: [];
$checkoutOptionsData = $this->prepareCheckoutData($attributesData, $configurableCheckoutData);
$this->getCustomOptionsBlock()->fillCustomOptions($checkoutOptionsData);
parent::fillOptions($product);
}
/**
* Return product options
*
* @param FixtureInterface $product [optional]
* @return array
*/
public function getOptions(FixtureInterface $product = null)
{
$options = [
'configurable_options' => $this->getConfigurableOptionsBlock()->getOptions($product),
'matrix' => $this->getConfigurableOptionsBlock()->getOptionsPrices($product)
];
$options += parent::getOptions($product);
return $options;
}
}
|
enettolima/magento-training
|
magento2ce/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Block/Product/View.php
|
PHP
|
mit
| 2,867
|
<?php
namespace Oro\Bundle\SegmentBundle\Tests\Unit\Filter;
use Doctrine\Common\Annotations\AnnotationReader;
use Doctrine\Common\Cache\ArrayCache;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\Mapping\Driver\AnnotationDriver;
use Doctrine\ORM\QueryBuilder;
use Oro\Bundle\EntityConfigBundle\Config\Config;
use Oro\Bundle\EntityConfigBundle\Config\Id\EntityConfigId;
use Oro\Bundle\EntityConfigBundle\Provider\ConfigProvider;
use Oro\Bundle\EntityExtendBundle\EntityConfig\ExtendScope;
use Oro\Bundle\FilterBundle\Datasource\Orm\OrmFilterDatasourceAdapter;
use Oro\Bundle\FilterBundle\Filter\FilterUtility;
use Oro\Bundle\FilterBundle\Form\Type\Filter\ChoiceFilterType;
use Oro\Bundle\FilterBundle\Form\Type\Filter\EntityFilterType;
use Oro\Bundle\FilterBundle\Form\Type\Filter\FilterType;
use Oro\Bundle\QueryDesignerBundle\QueryDesigner\SubQueryLimitHelper;
use Oro\Bundle\SegmentBundle\Entity\Manager\SegmentManager;
use Oro\Bundle\SegmentBundle\Entity\Segment;
use Oro\Bundle\SegmentBundle\Entity\SegmentType;
use Oro\Bundle\SegmentBundle\Filter\SegmentFilter;
use Oro\Bundle\SegmentBundle\Provider\EntityNameProvider;
use Oro\Bundle\SegmentBundle\Query\DynamicSegmentQueryBuilder;
use Oro\Bundle\SegmentBundle\Query\SegmentQueryBuilderRegistry;
use Oro\Bundle\SegmentBundle\Query\StaticSegmentQueryBuilder;
use Oro\Bundle\SegmentBundle\Tests\Unit\Stub\Entity\CmsUser;
use Oro\Component\Testing\Unit\PreloadedExtension;
use Oro\Component\TestUtils\ORM\OrmTestCase;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\Extension\Csrf\CsrfExtension;
use Symfony\Component\Form\FormFactoryInterface;
use Symfony\Component\Form\Forms;
class SegmentFilterTest extends OrmTestCase
{
const TEST_FIELD_NAME = 't1.id';
const TEST_PARAM_VALUE = '%test%';
/** @var \PHPUnit\Framework\MockObject\MockObject|FormFactoryInterface */
protected $formFactory;
/** @var \PHPUnit\Framework\MockObject\MockObject */
protected $doctrine;
/** @var DynamicSegmentQueryBuilder|\PHPUnit\Framework\MockObject\MockObject */
protected $dynamicSegmentQueryBuilder;
/** @var StaticSegmentQueryBuilder|\PHPUnit\Framework\MockObject\MockObject */
protected $staticSegmentQueryBuilder;
/** @var EntityNameProvider|\PHPUnit\Framework\MockObject\MockObject */
protected $entityNameProvider;
/** @var ConfigProvider|\PHPUnit\Framework\MockObject\MockObject */
protected $entityConfigProvider;
/** @var ConfigProvider|\PHPUnit\Framework\MockObject\MockObject */
protected $extendConfigProvider;
/** @var EntityManager|\PHPUnit\Framework\MockObject\MockObject */
protected $em;
/** @var SegmentFilter */
protected $filter;
/** @var SubQueryLimitHelper|\PHPUnit\Framework\MockObject\MockObject */
protected $subqueryLimitHelper;
protected function setUp()
{
$this->em = $this->getMockBuilder('Doctrine\ORM\EntityManager')
->disableOriginalConstructor()->getMock();
$translator = $this->createMock('Symfony\Contracts\Translation\TranslatorInterface');
$translator->expects($this->any())->method('trans')->will($this->returnArgument(0));
$registry = $this->getMockForAbstractClass('Doctrine\Common\Persistence\ManagerRegistry', [], '', false);
$registry->expects($this->any())
->method('getManagerForClass')
->will($this->returnValue($this->em));
$this->formFactory = Forms::createFormFactoryBuilder()
->addExtensions(
[
new PreloadedExtension(
[
'oro_type_filter' => new FilterType($translator),
'oro_type_choice_filter' => new ChoiceFilterType($translator),
'entity' => new EntityType($registry),
'oro_type_entity_filter' => new EntityFilterType($translator),
],
[]
),
new CsrfExtension(
$this->createMock('Symfony\Component\Security\Csrf\CsrfTokenManagerInterface')
)
]
)
->getFormFactory();
$this->doctrine = $this->getMockBuilder('Doctrine\Common\Persistence\ManagerRegistry')
->disableOriginalConstructor()
->getMock();
$this->doctrine->expects($this->any())
->method('getManagerForClass')
->will($this->returnValue($this->em));
$this->em->expects($this->any())
->method('getClassMetadata')
->will($this->returnValue($this->getClassMetadata()));
$this->dynamicSegmentQueryBuilder = $this
->getMockBuilder('Oro\Bundle\SegmentBundle\Query\DynamicSegmentQueryBuilder')
->disableOriginalConstructor()->getMock();
$this->staticSegmentQueryBuilder = $this
->getMockBuilder('Oro\Bundle\SegmentBundle\Query\StaticSegmentQueryBuilder')
->disableOriginalConstructor()->getMock();
$this->entityNameProvider = $this->createMock('Oro\Bundle\SegmentBundle\Provider\EntityNameProvider');
$this->entityNameProvider
->expects($this->any())
->method('getEntityName')
->will($this->returnValue('Namespace\Entity'));
$this->entityConfigProvider = $this
->getMockBuilder('Oro\Bundle\EntityConfigBundle\Provider\ConfigProvider')
->disableOriginalConstructor()->getMock();
$this->extendConfigProvider = $this
->getMockBuilder('Oro\Bundle\EntityConfigBundle\Provider\ConfigProvider')
->disableOriginalConstructor()->getMock();
$configManager = $this->getMockBuilder('Oro\Bundle\EntityConfigBundle\Config\ConfigManager')
->disableOriginalConstructor()
->getMock();
$this->entityConfigProvider->expects($this->any())
->method('getConfigManager')
->will($this->returnValue($configManager));
$configManager->expects($this->any())
->method('getEntityManager')
->will($this->returnValue($this->em));
$segmentQueryBuilderRegistry = new SegmentQueryBuilderRegistry();
$segmentQueryBuilderRegistry->addQueryBuilder('static', $this->staticSegmentQueryBuilder);
$segmentQueryBuilderRegistry->addQueryBuilder('dynamic', $this->dynamicSegmentQueryBuilder);
$this->subqueryLimitHelper = $this->createMock(SubQueryLimitHelper::class);
$segmentManager = new SegmentManager(
$this->em,
$segmentQueryBuilderRegistry,
$this->subqueryLimitHelper,
new ArrayCache()
);
$this->filter = new SegmentFilter(
$this->formFactory,
new FilterUtility(),
$this->doctrine,
$segmentManager,
$this->entityNameProvider,
$this->entityConfigProvider,
$this->extendConfigProvider
);
$this->filter->init('segment', ['entity' => '']);
}
/**
* @return \PHPUnit\Framework\MockObject\MockObject
*/
protected function getClassMetadata()
{
$classMetaData = $this->getMockBuilder('Doctrine\ORM\Mapping\ClassMetadata')
->disableOriginalConstructor()
->getMock();
$classMetaData->expects($this->any())
->method('getName')
->will($this->returnValue('OroSegment:Segment'));
$classMetaData->expects($this->any())
->method('getIdentifier')
->will($this->returnValue(['id']));
$classMetaData->expects($this->any())
->method('getIdentifierFieldNames')
->will($this->returnValue(['id']));
$classMetaData->expects($this->any())
->method('getSingleIdentifierFieldName')
->will($this->returnValue('id'));
$classMetaData->expects($this->any())
->method('getTypeOfField')
->will($this->returnValue('integer'));
return $classMetaData;
}
protected function tearDown()
{
unset($this->formFactory, $this->dynamicSegmentQueryBuilder, $this->filter);
}
public function testGetMetadata()
{
$activeClassName = 'Oro\Bundle\SegmentBundle\Entity\Segment';
$newClassName = 'Test\NewEntity';
$deletedClassName = 'Test\DeletedEntity';
$entityConfigIds = [
new EntityConfigId('entity', $activeClassName),
new EntityConfigId('entity', $newClassName),
new EntityConfigId('entity', $deletedClassName),
];
$this->entityConfigProvider->expects($this->once())
->method('getIds')
->will($this->returnValue($entityConfigIds));
$this->extendConfigProvider->expects($this->any())
->method('getConfig')
->will(
$this->returnValueMap(
[
[
$activeClassName,
null,
$this->createExtendConfig($activeClassName, ExtendScope::STATE_ACTIVE)
],
[
$newClassName,
null,
$this->createExtendConfig($newClassName, ExtendScope::STATE_NEW)
],
[
$deletedClassName,
null,
$this->createExtendConfig($deletedClassName, ExtendScope::STATE_DELETE)
],
]
)
);
$this->prepareRepo();
$metadata = $this->filter->getMetadata();
$this->assertTrue(isset($metadata['entity_ids']));
$this->assertEquals(
[$activeClassName => 'id'],
$metadata['entity_ids']
);
}
/**
* @param string $className
* @param string $state
*
* @return Config
*/
protected function createExtendConfig($className, $state)
{
$configId = new EntityConfigId('extend', $className);
$config = new Config($configId);
$config->set('state', $state);
return $config;
}
protected function prepareRepo()
{
$query = $this->getMockBuilder('Doctrine\ORM\AbstractQuery')
->disableOriginalConstructor()
->setMethods(['execute', 'getSQL'])
->getMockForAbstractClass();
$query->expects($this->any())
->method('execute')
->will($this->returnValue([]));
$query->expects($this->any())
->method('getSQL')
->will($this->returnValue('SQL QUERY'));
$qb = $this->getMockBuilder('Doctrine\ORM\QueryBuilder')
->disableOriginalConstructor()
->getMock();
$qb->expects($this->once())
->method('where')
->will($this->returnSelf());
$qb->expects($this->once())
->method('setParameter')
->will($this->returnSelf());
$qb->expects($this->any())
->method('getParameters')
->will($this->returnValue(new ArrayCollection()));
$qb->expects($this->any())
->method('getQuery')
->will($this->returnValue($query));
$repo = $this->getMockBuilder('Doctrine\ORM\EntityRepository')
->disableOriginalConstructor()
->getMock();
$repo->expects($this->once())
->method('createQueryBuilder')
->will($this->returnValue($qb));
$this->em->expects($this->any())
->method('getRepository')
->with($this->equalTo('OroSegmentBundle:Segment'))
->will($this->returnValue($repo));
}
public function testGetForm()
{
$this->prepareRepo();
$form = $this->filter->getForm();
$this->assertInstanceOf('Symfony\Component\Form\FormInterface', $form);
}
public function testApplyInvalidData()
{
$dsMock = $this->createMock('Oro\Bundle\FilterBundle\Datasource\FilterDatasourceAdapterInterface');
$result = $this->filter->apply($dsMock, [null]);
$this->assertFalse($result);
}
public function testStaticApply()
{
$staticSegmentStub = new Segment();
$staticSegmentStub->setType(new SegmentType(SegmentType::TYPE_STATIC));
$staticSegmentStub->setEntity('Oro\Bundle\SegmentBundle\Tests\Unit\Stub\Entity\CmsUser');
$filterData = ['value' => $staticSegmentStub];
$em = $this->getEM();
$qb = $em->createQueryBuilder()
->select(['t1.name'])
->from('OroSegmentBundle:CmsUser', 't1');
$queryBuilder = new QueryBuilder($em);
$queryBuilder->select(['ts1.id'])
->from('OroSegmentBundle:SegmentSnapshot', 'ts1')
->andWhere('ts1.segmentId = :segment')
->setParameter('segment', self::TEST_PARAM_VALUE);
$ds = new OrmFilterDatasourceAdapter($qb);
$this->staticSegmentQueryBuilder
->expects(static::once())
->method('getQueryBuilder')
->with($staticSegmentStub)
->will(static::returnValue($queryBuilder));
$this->filter->init('someName', [FilterUtility::DATA_NAME_KEY => self::TEST_FIELD_NAME]);
$this->filter->apply($ds, $filterData);
$expectedResult = [
'SELECT t1.name FROM OroSegmentBundle:CmsUser t1 WHERE',
't1.id IN(SELECT ts1.id FROM OroSegmentBundle:SegmentSnapshot ts1 WHERE ts1.segmentId = :segment)'
];
$expectedResult = implode(' ', $expectedResult);
static::assertEquals($expectedResult, $ds->getQueryBuilder()->getDQL());
$params = $ds->getQueryBuilder()->getParameters();
static::assertCount(1, $params, 'Should pass params to main query builder');
static::assertEquals(self::TEST_PARAM_VALUE, $params[0]->getValue());
}
/**
* @return \Oro\Component\TestUtils\ORM\Mocks\EntityManagerMock
*/
protected function getEM()
{
$reader = new AnnotationReader();
$metadataDriver = new AnnotationDriver(
$reader,
'Oro\Bundle\SegmentBundle\Tests\Unit\Stub\Entity'
);
$em = $this->getTestEntityManager();
$em->getConfiguration()->setMetadataDriverImpl($metadataDriver);
$em->getConfiguration()->setEntityNamespaces(
[
'OroSegmentBundle' => 'Oro\Bundle\SegmentBundle\Tests\Unit\Stub\Entity'
]
);
return $em;
}
public function testDynamicApplyWithoutLimit()
{
$dynamicSegment = (new Segment())
->setType(new SegmentType(SegmentType::TYPE_DYNAMIC))
->setEntity(CmsUser::class);
$filterData = ['value' => $dynamicSegment];
$em = $this->getEM();
$qb = $em->createQueryBuilder()
->select(['t1.name'])
->from('OroSegmentBundle:CmsUser', 't1');
$queryBuilder = new QueryBuilder($em);
$queryBuilder->select(['ts1.id'])
->from('OroSegmentBundle:SegmentSnapshot', 'ts1')
->andWhere('ts1.segmentId = :segment')
->setParameter('segment', self::TEST_PARAM_VALUE);
$ds = new OrmFilterDatasourceAdapter($qb);
$this->dynamicSegmentQueryBuilder
->expects(static::once())
->method('getQueryBuilder')
->with($dynamicSegment)
->will(static::returnValue($queryBuilder));
$this->filter->init('someName', [FilterUtility::DATA_NAME_KEY => self::TEST_FIELD_NAME]);
$this->filter->apply($ds, $filterData);
$expectedResult = [
'SELECT t1.name FROM OroSegmentBundle:CmsUser t1 WHERE',
't1.id IN(SELECT ts1.id FROM OroSegmentBundle:SegmentSnapshot ts1 WHERE ts1.segmentId = :segment)'
];
$expectedResult = implode(' ', $expectedResult);
static::assertEquals($expectedResult, $ds->getQueryBuilder()->getDQL());
$params = $ds->getQueryBuilder()->getParameters();
static::assertCount(1, $params, 'Should pass params to main query builder');
static::assertEquals(self::TEST_PARAM_VALUE, $params[0]->getValue());
}
public function testDynamicApplyWithLimit()
{
$dynamicSegment = (new Segment())
->setType(new SegmentType(SegmentType::TYPE_DYNAMIC))
->setEntity(CmsUser::class)
->setRecordsLimit(10);
$filterData = ['value' => $dynamicSegment];
$em = $this->getEM();
$qb = $em->createQueryBuilder()
->select(['t1.name'])
->from('OroSegmentBundle:CmsUser', 't1');
$queryBuilder = new QueryBuilder($em);
$queryBuilder->select(['ts1.id'])
->from('OroSegmentBundle:SegmentSnapshot', 'ts1')
->andWhere('ts1.segmentId = :segment')
->setParameter('segment', self::TEST_PARAM_VALUE);
$ds = new OrmFilterDatasourceAdapter($qb);
$this->dynamicSegmentQueryBuilder
->expects(static::once())
->method('getQueryBuilder')
->with($dynamicSegment)
->will(static::returnValue($queryBuilder));
$this->subqueryLimitHelper->expects($this->once())
->method('setLimit')
->with($queryBuilder, 10, 'id')
->willReturn($queryBuilder);
$this->filter->init('someName', [FilterUtility::DATA_NAME_KEY => self::TEST_FIELD_NAME]);
$this->filter->apply($ds, $filterData);
$expectedResult = [
'SELECT t1.name FROM OroSegmentBundle:CmsUser t1 WHERE',
't1.id IN(SELECT ts1.id FROM OroSegmentBundle:SegmentSnapshot ts1 WHERE ts1.segmentId = :segment)'
];
$expectedResult = implode(' ', $expectedResult);
static::assertEquals($expectedResult, $ds->getQueryBuilder()->getDQL());
$params = $ds->getQueryBuilder()->getParameters();
static::assertCount(1, $params, 'Should pass params to main query builder');
static::assertEquals(self::TEST_PARAM_VALUE, $params[0]->getValue());
}
}
|
orocrm/platform
|
src/Oro/Bundle/SegmentBundle/Tests/Unit/Filter/SegmentFilterTest.php
|
PHP
|
mit
| 18,418
|
<?php
namespace Milax\Mconsole\Models;
use Illuminate\Database\Eloquent\Model;
class Upload extends Model
{
use \HasTags;
protected $fillable = ['type', 'path', 'preset_id', 'filename', 'copies', 'related_id', 'related_class', 'group', 'order', 'unique', 'language_id', 'title', 'description', 'link'];
protected $casts = [
'copies' => 'array',
];
/**
* Relationship to MconsoleUploadPreset
*
* @return BelongsTo
*/
public function preset()
{
return $this->belongsTo('Milax\Mconsole\Models\MconsoleUploadPreset', 'preset_id');
}
/**
* Relationship to Language
*
* @return BelongsTo
*/
public function language()
{
return $this->belongsTo('Milax\Mconsole\Models\Language');
}
/**
* Get image url for given copy
*
* @param string $size
* @return string
*/
public function getImagePath($size = 'original')
{
return sprintf('/storage/uploads/%s/%s/%s', $this->path, $size, $this->filename);
}
/**
* Get document url for given copy
*
* @return string
*/
public function getDocumentPath()
{
return sprintf('/storage/uploads/%s/%s', $this->path, $this->filename);
}
/**
* Get original file path
*
* @return string
*/
public function getOriginalPath($size = 'original')
{
switch ($this->type) {
case 'image':
return $this->getImagePath($size);
default:
return $this->getDocumentPath();
}
}
/**
* Undocumented function
*
* @param boolean $includeOriginal [Include original file path]
* @return void
*/
public function getCopies($includeOriginal = false)
{
$copies = [];
foreach ($this->copies as $copy) {
$copies[$copy['path']] = $this->getImagePath($copy['path']);
}
if ($includeOriginal) {
$copies['original'] = $this->getOriginalPath();
}
return $copies;
}
// @TODO: REMOVE THIS METHOD
public function getImageCopies()
{
throw new \Milax\Mconsole\Exceptions\DeprecatedException('Upload getImageCopies is deprecated, use getCopies() instead');
}
/**
* Automatically delete related data
*
* @return void
*/
public static function boot()
{
parent::boot();
static::deleting(function ($file) {
if (\File::exists(sprintf('%s/%s/%s', MX_UPLOADS_PATH, $file->path, $file->filename))) {
\File::delete(sprintf('%s/%s/%s', MX_UPLOADS_PATH, $file->path, $file->filename));
}
if (\File::exists(sprintf('%s/%s/original/%s', MX_UPLOADS_PATH, $file->path, $file->filename))) {
\File::delete(sprintf('%s/%s/original/%s', MX_UPLOADS_PATH, $file->path, $file->filename));
}
if (\File::exists(sprintf('%s/%s/mconsole/%s', MX_UPLOADS_PATH, $file->path, $file->filename))) {
\File::delete(sprintf('%s/%s/mconsole/%s', MX_UPLOADS_PATH, $file->path, $file->filename));
}
if ($file->copies && count($file->copies) > 0) {
foreach ($file->copies as $copy) {
if (\File::exists(sprintf('%s/%s/%s/%s', MX_UPLOADS_PATH, $file->path, $copy['path'], $file->filename))) {
\File::delete(sprintf('%s/%s/%s/%s', MX_UPLOADS_PATH, $file->path, $copy['path'], $file->filename));
}
}
}
});
}
}
|
misterpaladin/mconsole
|
src/Milax/Mconsole/Models/Upload.php
|
PHP
|
mit
| 3,675
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>maths: 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.14.0 / maths - 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>
maths
<small>
8.5.0
<span class="label label-info">Not compatible</span>
</small>
</h1>
<p><em><script>document.write(moment("2021-11-01 16:42:58 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-11-01 16:42:58 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.14.0 Formal proof management system
dune 2.9.1 Fast, portable, and opinionated build system
ocaml 4.12.0 The OCaml compiler (virtual package)
ocaml-base-compiler 4.12.0 Official release 4.12.0
ocaml-config 2 OCaml Switch Configuration
ocaml-options-vanilla 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/maths"
license: "LGPL 2"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/Maths"]
depends: [
"ocaml"
"coq" {>= "8.5" & < "8.6~"}
]
tags: [ "keyword:mathematics" "category:Mathematics/Arithmetic and Number Theory/Number theory" ]
authors: [ "Jean-Christophe Filliâtre <>" ]
bug-reports: "https://github.com/coq-contribs/maths/issues"
dev-repo: "git+https://github.com/coq-contribs/maths.git"
synopsis: "Basic mathematics"
description: """
Basic mathematics (gcd, primality, etc.) from
French ``Mathematiques Superieures'' (first year of preparation to
high schools)"""
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/maths/archive/v8.5.0.tar.gz"
checksum: "md5=8e4e62e272aa45ba3f348e3b96ed381e"
}
</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-maths.8.5.0 coq.8.14.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.14.0).
The following dependencies couldn't be met:
- coq-maths -> 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-maths.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">
<small>Sources are on <a href="https://github.com/coq-bench">GitHub</a>. © Guillaume Claret.</small>
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
|
coq-bench/coq-bench.github.io
|
clean/Linux-x86_64-4.12.0-2.0.8/released/8.14.0/maths/8.5.0.html
|
HTML
|
mit
| 6,939
|
country [](https://travis-ci.org/stephanos/country) [](http://godoc.org/github.com/stephanos/country)
======
This Go package provides meta data for all countries, like:
- continent
- currency
- capital
- calling code
- top-level domain
## ToDos
- add BigMac-index
- add "is in EU"
- add currency symbol
- add address format
- add country demonym
- add country name translations
## Install
```bash
go get github.com/stephanos/country
```
## Documentation
[godoc.org](http://godoc.org/github.com/stephanos/country)
## License
MIT (see LICENSE).
|
101loops/country
|
README.md
|
Markdown
|
mit
| 848
|
.settings-wrapper .wrapp {
margin-top: 100px; }
.settings-wrapper .avatar-box img {
border: 3px solid #c3cddb;
margin-bottom: 28px; }
.settings-wrapper .avatar-box p {
font-weight: 700;
margin-bottom: 12px; }
.settings-wrapper .avatar-box input[type="file"] {
font-size: 11px; }
.settings-wrapper .personal-info {
border-left: 1px solid #edeff1;
box-shadow: inset 3px 0px 4px -1px #fafafa; }
.settings-wrapper .personal-info .alert {
margin-bottom: 50px;
display: inline-block;
font-size: 13px; }
.settings-wrapper .personal-info .alert i {
float: left; }
.settings-wrapper .personal-info h5.personal-title {
font-size: 22px;
margin: 0 0 50px 50px;
color: #696d73;
font-style: italic; }
.settings-wrapper .personal-info form {
margin-left: 50px; }
.settings-wrapper .personal-info .field-box {
margin-bottom: 20px; }
.settings-wrapper .personal-info label {
display: inline-block;
float: left;
font-weight: 600;
font-size: 13px;
cursor: auto;
width: 20%;
margin-right: 10px; }
.settings-wrapper .personal-info .input[type="text"] {
font-weight: 600; }
.settings-wrapper .personal-info .ui-select {
width: 50%;
margin-bottom: 10px; }
.settings-wrapper .personal-info .actions {
margin-bottom: 25px;
margin-left: 0;
margin-top: 30px;
float: left;
text-align: right; }
.settings-wrapper .personal-info .actions span {
text-transform: uppercase;
color: #7e91aa;
font-weight: 600;
display: inline-block;
vertical-align: middle;
margin: 0 2px 0 8px; }
.settings-wrapper .personal-info input.reset {
color: #7e91aa;
font-weight: 500; }
/* responsive */
@media (max-width: 767px) {
.settings-wrapper #pad-wrapper {
padding: 0px 20px; }
.settings-wrapper .avatar-box {
text-align: center; }
.settings-wrapper .personal-info {
border: 0 none;
box-shadow: none;
margin-top: 40px; }
.settings-wrapper .personal-info h5.personal-title {
margin-left: 0; }
.settings-wrapper .personal-info .field-box {
margin-left: 0; }
.settings-wrapper .personal-info .ui-select {
width: 90%; }
.settings-wrapper .personal-info label {
width: 32%;
text-align:left; }
.settings-wrapper .personal-info .actions {
text-align: center; }
.settings-wrapper .personal-info form {
margin-left: 0;
padding: 0px 10px 0px 10px; } }
@media (min-width: 768px) and (max-width: 979px) {
.settings-wrapper .personal-info .ui-select {
width: 77%; } }
@media (min-width: 768px) {
.settings-wrapper .personal-info .alert {
margin-left: 50px; } }
@media (min-width: 980px) {
.settings-wrapper .personal-info .ui-select {
width: 60%; } }
|
peachyang/py_website
|
pub/theme/default/backend/css/compiled/personal-info.css
|
CSS
|
mit
| 2,882
|
//
// This source file is part of appleseed.
// Visit http://appleseedhq.net/ for additional information and resources.
//
// This software is released under the MIT license.
//
// Copyright (c) 2014-2015 Esteban Tovagliari, The appleseedhq Organization
// Copyright (c) 2014-2015 Marius Avram, The appleseedhq Organization
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
#ifndef APPLESEED_STUDIO_MAINWINDOW_PROJECT_MATERIALCOLLECTIONITEM_H
#define APPLESEED_STUDIO_MAINWINDOW_PROJECT_MATERIALCOLLECTIONITEM_H
// appleseed.studio headers.
#include "mainwindow/project/assemblyitem.h"
#include "mainwindow/project/collectionitem.h"
// Forward declarations.
namespace appleseed { namespace studio { class EntityEditorContext; } }
namespace renderer { class Assembly; }
namespace renderer { class Material; }
namespace appleseed {
namespace studio {
class MaterialCollectionItem
: public CollectionItem<renderer::Material, renderer::Assembly, AssemblyItem>
{
Q_OBJECT
public:
MaterialCollectionItem(
EntityEditorContext& editor_context,
renderer::MaterialContainer& materials,
renderer::Assembly& parent,
AssemblyItem* parent_item);
const renderer::Material& create_default_disney_material(const std::string& material_name);
protected:
typedef CollectionItem<renderer::Material, renderer::Assembly, AssemblyItem> Base;
virtual QMenu* get_single_item_context_menu() const APPLESEED_OVERRIDE;
private slots:
void slot_create_generic();
void slot_create_disney();
void slot_import_disney();
void slot_create_osl();
private:
virtual ItemBase* create_item(renderer::Material* material) APPLESEED_OVERRIDE;
void do_create_material(const char* model);
renderer::Assembly& m_parent;
AssemblyItem* m_parent_item;
};
} // namespace studio
} // namespace appleseed
#endif // !APPLESEED_STUDIO_MAINWINDOW_PROJECT_MATERIALCOLLECTIONITEM_H
|
Vertexwahn/appleseed
|
src/appleseed.studio/mainwindow/project/materialcollectionitem.h
|
C
|
mit
| 3,028
|
class Station < ActiveRecord::Base
belongs_to :forecast
# validates :pws_id, uniqueness: true
end
|
jackzampolin/my_weather_map
|
app/models/station.rb
|
Ruby
|
mit
| 102
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>template-coq: 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.0 / template-coq - 1.1.0~beta3</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
template-coq
<small>
1.1.0~beta3
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2022-02-19 02:36:57 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-02-19 02:36:57 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 Preprocessor-pretty-printer of OCaml
conf-findutils 1 Virtual package relying on findutils
conf-perl 2 Virtual package relying on perl
coq 8.8.0 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.3 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "matthieu.sozeau@inria.fr"
homepage: "https://github.com/gmalecha/template-coq"
dev-repo: "git+https://github.com/gmalecha/template-coq.git#8.5"
bug-reports: "https://github.com/gmalecha/template-coq/issues"
authors: ["Gregory Malecha"]
license: "BSD"
build: [
[make "-j%{jobs}%"]
]
install: [
[make "install"]
]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/Template"]
depends: [
"ocaml"
"coq" {>= "8.5~beta3" & < "8.5.dev"}
]
synopsis: "A quoting library for Coq"
flags: light-uninstall
url {
src: "https://github.com/gmalecha/template-coq/archive/v1.1.0-beta3.tar.gz"
checksum: "md5=5786320d72fe9d77f742cfd9c58a4f25"
}
</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-template-coq.1.1.0~beta3 coq.8.8.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.8.0).
The following dependencies couldn't be met:
- coq-template-coq -> coq < 8.5.dev -> 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-template-coq.1.1.0~beta3</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://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
|
coq-bench/coq-bench.github.io
|
clean/Linux-x86_64-4.09.1-2.0.6/released/8.8.0/template-coq/1.1.0~beta3.html
|
HTML
|
mit
| 6,601
|
package com.ngll_prototype;
import android.app.ProgressDialog;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.ShapeDrawable;
import android.graphics.drawable.shapes.RectShape;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.util.TypedValue;
import android.view.MotionEvent;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import com.ngll_prototype.object.IMGCoordinate;
import com.searchly.jestdroid.DroidClientConfig;
import com.searchly.jestdroid.JestClientFactory;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.builder.SearchSourceBuilder;
import org.elasticsearch.search.sort.SortOrder;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.ArrayList;
import io.searchbox.client.JestClient;
import io.searchbox.core.Search;
import io.searchbox.core.SearchResult;
public class MainActivity extends AppCompatActivity {
private final static String TAG = "MainActivity";
CustomDrawableView cd;
private ImageView image;
private ImageView imageView;
private int ImgInfo[];
private TextView tvMac;
private Button mbtnExe;
private Button mbtnStop;
ProgressDialog mProgressDialog;
DisaplyPoint disaplyPoint;
private Bitmap bitmapBG, bitmap;
private Canvas canvas;
private Paint paint;
private int StatusBarHeight, ActionBarHeight;
private JSONArray list;
private Matrix matrix;
private ArrayList<IMGCoordinate> IMGCoorlist = new ArrayList<>();
private boolean firstExe = true;
private static boolean goFlag;
String query = "{\n" +
" \"query\" : {\n" +
" \"match\" : {\n" +
" \"data.macAddr\" : {\n" +
" \"query\" : \"101a0a000024\",\n" +
" \"type\" : \"boolean\"\n" +
" }\n" +
" }\n" +
" }\n" +
" }";
String query2 = "{\n"
+ " \"query\":{\n"
+ " \"match\":{\n"
+ " \"data\": {\n"
+ " \"macAddr\" : \"101a0a000024\" \n"
+ " }\n"
+ " }\n"
+ " }\n"
+ "}";
String query3 =
"{\n" +
" \"query\" : {\n" +
" \"match\" : {\n" +
" \"data.macAddr\" : {\n" +
" \"query\" : \"101a0a000024\"\n" +
" }\n" +
" }\n" +
" }\n" +
"}";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
image = (ImageView) findViewById(R.id.imageView);
tvMac = (TextView) findViewById(R.id.tvmac);
mbtnExe = (Button) findViewById(R.id.btnexe);
mbtnStop = (Button) findViewById(R.id.btnstop);
setTitle("NGLL Prototype");
Log.d(TAG, "---- Old Activity ----");
setup();
// Node node = nodeBuilder().node();
// Client client = node.client();
// try {
// Settings settings = Settings.settingsBuilder()
// .put("", "").build();
// TransportClient client = TransportClient.builder().settings(settings).build()
// .addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName("54.169.218.103"), 9200));
// Log.d(TAG, "client:\t" + client.toString());
// client.close();
//// GetRequestBuilder getRequestBuilder = client.prepareGet();
//// getRequestBuilder.setFields("");
//// GetResponse response = getRequestBuilder.execute().actionGet();
//// String name = response.getField("").getValue().toString();
//// Log.d(TAG, "name:\t" + name );
// } catch (UnknownHostException e) {
// e.printStackTrace();
// }
}
private void setup() {
// int count = 0;
mbtnExe.setOnClickListener(new View.OnClickListener() {
// int count = 0;
@Override
public void onClick(View view) {
// Log.d(TAG, "mbtnExe pressed");
// int indoorCo[] ={8, count};
// paint(indoorCo);
// count = count +1;
disaplyPoint = new DisaplyPoint();
disaplyPoint.execute("101a0a000024");
goFlag = true;
chgButtonST(mbtnExe, false);
}
});
mbtnStop.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
goFlag = false;
chgButtonST(mbtnExe, true);
}
});
tvMac.setText("101a0a000024");
}
private void init() {
// RelativeLayout layout = (RelativeLayout) findViewById(R.id.root);
// final DrawView view = new DrawView(this);
// view.setMinimumHeight(700);
// view.setMinimumWidth(1274);
//
// //通知view组件重绘
// view.invalidate();
// layout.addView(view);
}
private void chgButtonST(Button btn, boolean state) {
btn.setClickable(state);
}
@Override
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
Log.d(TAG, "onWindowFocusChanged");
if (firstExe) {
firstExe = false;
ImgInfo = getImageStartCoordinate(image); //get Image top, left, Height, wight
Log.d(TAG, "ImgInfo Top:\t" + ImgInfo[0]);
Log.d(TAG, "ImgInfo Left:\t" + ImgInfo[1]);
Log.d(TAG, "ImgInfo Height:\t" + ImgInfo[2]);
Log.d(TAG, "ImgInfo Wight:\t" + ImgInfo[3]);
bitmapBG = BitmapFactory.decodeResource(getResources(), R.drawable.gemtek8b_block2);
Log.d(TAG, "bitmapBG.getHeight():\t" + bitmapBG.getHeight() + "\tbitmapBG.getWidth():\t" + bitmapBG.getWidth());
// View v = new MyCanvas(getApplicationContext());
bitmap = Bitmap.createBitmap(bitmapBG.getWidth()/*width*/, bitmapBG.getHeight()/*height*/, Bitmap.Config.ARGB_8888); //create a bitmap size same as bitmapBG
canvas = new Canvas(bitmap);
paint = new Paint();
paint.setColor(Color.RED);
paint.setStrokeWidth(5);
matrix = new Matrix();
canvas.drawBitmap(bitmapBG, matrix, paint);
// canvas.drawCircle(324, 330, 10, paint);
// canvas.drawCircle(324, 168, 10, paint);
// canvas.drawText("Sample Text", 10, 10, paint);
StatusBarHeight = getStatusBarHeight();
ActionBarHeight = getActionBarHeight();
Log.d(TAG, "StatusBarHeight:\t" + StatusBarHeight + "\tActionBarHeight:\t" + ActionBarHeight);
image.setImageBitmap(bitmap);
// canvas.save();
ImgCoordinateSet(ImgInfo);
}
}
@Override
public boolean onTouchEvent(MotionEvent event) {
Log.d(TAG, "onTouchEvent....");
int x = (int) event.getX();//取x軸
int y = (int) event.getY();//取y軸
int action = event.getAction();//取整數
switch (action) {
case MotionEvent.ACTION_DOWN:
// setTitle("按下:" + x + "," + y);
break;
case MotionEvent.ACTION_MOVE:
// setTitle("平移:" + x + "," + y);
break;
case MotionEvent.ACTION_UP:
setTitle("彈起:" + x + "," + y);
break;
}
ImageView imageView = (ImageView) findViewById(R.id.imageView);
Drawable drawable = imageView.getDrawable();
Rect imageBounds = drawable.getBounds();
int[] posXY = new int[2];
imageView.getLocationOnScreen(posXY);
//original height and width of the bitmap
int intrinsicHeight = drawable.getIntrinsicHeight();
int intrinsicWidth = drawable.getIntrinsicWidth();
//height and width of the visible (scaled) image
int scaledHeight = imageBounds.height();
int scaledWidth = imageBounds.width();
//Find the ratio of the original image to the scaled image
//Should normally be equal unless a disproportionate scaling
//(e.g. fitXY) is used.
float heightRatio = intrinsicHeight / scaledHeight;
float widthRatio = intrinsicWidth / scaledWidth;
//do whatever magic to get your touch point
//MotionEvent event;
//get the distance from the left and top of the image bounds
float scaledImageOffsetX = event.getX() - imageBounds.left;
float scaledImageOffsetY = event.getY() - imageBounds.top;
Log.d(TAG, "scaledImageOffsetX:\n" + scaledImageOffsetX);
Log.d(TAG, "scaledImageOffsetY:\n" + scaledImageOffsetY);
//scale these distances according to the ratio of your scaling
//For example, if the original image is 1.5x the size of the scaled
//image, and your offset is (10, 20), your original image offset
//values should be (15, 30).
float originalImageOffsetX = scaledImageOffsetX * widthRatio;
float originalImageOffsetY = scaledImageOffsetY * heightRatio;
return super.onTouchEvent(event);
}
public class CustomDrawableView extends View {
private ShapeDrawable mDrawable;
private Paint mPaint;
private int x = 200;
private int y = 600;
private int width = 100;
private int height = 50;
public CustomDrawableView(Context context) {
super(context);
// TODO Auto-generated constructor stub
mDrawable = new ShapeDrawable(new RectShape());
mDrawable.setBounds(x, y, x + width, y + height);
mPaint = mDrawable.getPaint();
mPaint.setColor(Color.BLUE);
}
@Override
protected void onDraw(Canvas canvas) {
// TODO Auto-generated method stub
mDrawable.draw(canvas);
}
}
public static int[] getBitmapPositionInsideImageView(ImageView imageView) {
int[] ret = new int[4];
if (imageView == null || imageView.getDrawable() == null)
return ret;
// Get image dimensions
// Get image matrix values and place them in an array
float[] f = new float[9];
imageView.getImageMatrix().getValues(f);
// for(int i =0; i < f.length; i++){
// Log.d(TAG, "f:" + f[i]);
// }
// Extract the scale values using the constants (if aspect ratio maintained, scaleX == scaleY)
final float scaleX = f[Matrix.MSCALE_X];
final float scaleY = f[Matrix.MSCALE_Y];
// Get the drawable (could also get the bitmap behind the drawable and getWidth/getHeight)
final Drawable d = imageView.getDrawable();
final int origW = d.getIntrinsicWidth();
final int origH = d.getIntrinsicHeight();
// Calculate the actual dimensions
final int actW = Math.round(origW * scaleX);
final int actH = Math.round(origH * scaleY);
ret[2] = actW;
ret[3] = actH;
// Get image position
// We assume that the image is centered into ImageView
int imgViewW = imageView.getWidth();
int imgViewH = imageView.getHeight();
Log.d(TAG, "origW:\t" + origW + "\norigH:\t" + origH);
Log.d(TAG, "actW:\t" + actW + "\nactH:\t" + actH);
Log.d(TAG, "imgViewW:\t" + imgViewW + "\nimgViewH:\t" + imgViewH);
int top = (int) (imgViewH - actH) / 2;
int left = (int) (imgViewW - actW) / 2;
ret[0] = left;
ret[1] = top;
return ret;
}
public int[] getImageStartCoordinate(ImageView image) {
int[] intXY = new int[2];
// ImageView image = (ImageView)findViewById(R.id.imageView);
Drawable drawable = image.getDrawable();
Rect imageBounds = drawable.getBounds();
image.getLocationOnScreen(intXY);
// imageView.getLocationInWindow(intXY);
final int origW = drawable.getIntrinsicWidth();
final int origH = drawable.getIntrinsicHeight();
// drawable.get
final int[] ret = new int[4];
//intXY[0] = x, [1] = y, start top & left
ret[0] = intXY[0];
ret[1] = intXY[1];
ret[2] = origH;
ret[3] = origW;
return ret;
}
/*
* calculation pic's coordinate with number save by Json
*/
public void ImgCoordinateSet(int[] ImgInfo) {
IMGCoordinate icl;
JSONObject obj = new JSONObject();
JSONObject obj2 = new JSONObject();
list = new JSONArray();
int toScaleH = 5;
int toScaleW = 6;
int spacingH = ImgInfo[2] / toScaleH;
int spacingW = ImgInfo[3] / toScaleW;
Log.d(TAG, "spacingH:\t" + spacingH + "\tspacingW:\t" + spacingW);
// int x = ImgInfo[0];
// int y = ImgInfo[1];
int x = 0;
int y = 0;
int count = 0;
Log.d(TAG, "Start x:\t" + x + "\ty:\t" + y);
for (int i = 1; i < toScaleH; i++) {
// x = ImgInfo[0];
x = 0;
y = y + spacingH;
for (int j = 1; j < toScaleW; j++) {
try {
x = x + spacingW;
obj.put("x", x);
obj.put("y", y);
obj2.put(Integer.toString(count), obj);
// Log.d(TAG, "No." + count +"\tX:\t" + x + "\tY:\t" + y);
// Log.d(TAG, "obj2:\t" + obj2.toString());
// canvas.drawCircle(x, y -StatusBarHeight - ActionBarHeight, 5, paint);
canvas.drawCircle(x, y, 5, paint);
list.put(obj2);
obj = new JSONObject();
obj2 = new JSONObject();
icl = new IMGCoordinate(count, x, y);
IMGCoorlist.add(icl);
count = count + 1;
} catch (JSONException e) {
e.printStackTrace();
}
}
}
Log.d(TAG, "IMGCoorlist.length:\t" + IMGCoorlist.size());
for (int i = 0; i < IMGCoorlist.size(); i++) {
Log.d(TAG, "I:\t" + i + "\tcount:\t" + IMGCoorlist.get(i).getNumber() + "\tX:\t" + IMGCoorlist.get(i).getX()
+ "\tY:\t" + IMGCoorlist.get(i).getY());
}
}
class DisaplyPoint extends AsyncTask<String, Integer, int[]> {
@Override
protected void onPreExecute() {
super.onPreExecute();
// blockUI(getString(R.string.loading));
}
@Override
protected int[] doInBackground(String... strings) {
int coordinate[];
while (goFlag) {
try {
JestClientFactory factory = new JestClientFactory();
factory.setDroidClientConfig(new DroidClientConfig.Builder(getString(R.string.elasticsvr))
.multiThreaded(true)
.build());
JestClient client = factory.getObject();
SearchSourceBuilder searchSourceBuilder = new SearchSourceBuilder();
searchSourceBuilder.sort("@timestamp", SortOrder.DESC);
searchSourceBuilder.size(50);
searchSourceBuilder.query(QueryBuilders.matchQuery("data.macAddr", strings[0])); // generate DSL format
// newer search rule, desc find latest data & GPS_N not 0
SearchSourceBuilder searchSourceBuilderTry = new SearchSourceBuilder();
searchSourceBuilderTry.sort("@timestamp", SortOrder.DESC);
searchSourceBuilderTry.size(1);
searchSourceBuilderTry.query(QueryBuilders.boolQuery().must(QueryBuilders.matchQuery("data.macAddr", strings[0])).mustNot(QueryBuilders.termQuery("data.GPS_N", "0")));
Search search = new Search.Builder(searchSourceBuilderTry.toString()).addIndex("client_report").addType("asset_tracker").build();
SearchResult searchResult = client.execute(search);
// Log.d(TAG, "searchSourceBuilder:\t" + searchSourceBuilder.toString());
// Log.d(TAG, "Total:\t" + searchResult.getTotal());
// Log.d(TAG, "searchResult:\t" + searchResult.getJsonString());
IndoorLocation indoorLocation = new IndoorLocation();
coordinate = indoorLocation.getPositionNum(searchResult.getJsonObject());
//get specific document
// Get get = new Get.Builder("client_report", "AVe2_o5uJozORed8MBm_").type("asset_tracker").build();
// JestResult result = client.execute(get);
// Log.d(TAG, "Getting Document:\t" + result.getJsonString());
if (coordinate != null) {
publishProgress(coordinate[1]);
}
client.shutdownClient();
Thread.sleep(5000);
} catch (UnknownError e) {
e.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
}
return null;
}
@Override
protected void onProgressUpdate(Integer... values) {
super.onProgressUpdate(values);
paint(values[0]);
}
@Override
protected void onPostExecute(int result[]) {
super.onPostExecute(result);
// Log.d(TAG, "result[]:\t" + result[0] + "\t, " + result[1] );
// paint(result[1]);
// blockUI(null);
}
}
public void paint(int anchorNUM) {
if (anchorNUM + 1 > IMGCoorlist.size()) {
return;
}
canvas.drawBitmap(bitmapBG, matrix, paint); // clear screen
int x = IMGCoorlist.get(anchorNUM).getX();
// int y = IMGCoorlist.get(coordinate[1]).getY() - StatusBarHeight - ActionBarHeight;
int y = IMGCoorlist.get(anchorNUM).getY();
// Log.d(TAG,"paint, input para coordinate[] :\t" + "\t[0]:\t" + coordinate[0] + "\t[1]:\t" + coordinate[1]);
Log.d(TAG, "paint, x:\t" + x);
Log.d(TAG, "paint, y:\t" + y);
canvas.drawCircle(x, y, 7, paint);
image.invalidate();
}
/*
* get Status bar Height
*/
public int getStatusBarHeight() {
int result = 0;
int resourceId = getResources().getIdentifier("status_bar_height", "dimen", "android");
if (resourceId > 0) {
result = getResources().getDimensionPixelSize(resourceId);
}
return result;
}
/*
* get Action bar Height
*/
public int getActionBarHeight() {
int result = 0;
// Calculate ActionBar height
TypedValue tv = new TypedValue();
if (getTheme().resolveAttribute(android.R.attr.actionBarSize, tv, true)) {
result = TypedValue.complexToDimensionPixelSize(tv.data, getResources().getDisplayMetrics());
}
return result;
}
private void blockUI(final String message) {
if (message != null) {
mProgressDialog = ProgressDialog.show(this, "", message, true);
mProgressDialog.show();
} else {
mProgressDialog.dismiss();
}
}
}
|
GIOT-POC/NGLL-APP
|
app/src/main/java/com/ngll_prototype/MainActivity.java
|
Java
|
mit
| 20,066
|
#region File Header
// The MIT License (MIT)
//
// Copyright (c) 2016 Stefan Stolz
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
#endregion
#region using directives
using System;
using System.Reflection;
using System.Runtime.InteropServices;
#endregion
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("EmbeddedData")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("EmbeddedData")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.3.0")]
[assembly: AssemblyFileVersion("1.3.0")]
|
StefanStolz/EmbeddedDataVisualStudioExtension
|
EmbeddedData/EmbeddedData/Properties/AssemblyInfo.cs
|
C#
|
mit
| 2,427
|
/* ------------------------------------------------------------------- */
/* Green #58ba2b
---------------------------------------------------------------------- */
#current,
a.button.gray.app-link.opened,
ul.float-right li a:hover,
.menu ul li.sfHover a.sf-with-ul,
.menu ul li a:hover,
a.menu-trigger:hover,
#jPanelMenu-menu li a:hover,
.search-container button,
.upload-btn,
button,
input[type="button"],
input[type="submit"],
a.button,
.upload-btn:hover,
#titlebar.photo-bg a.button.white:hover,
a.button.dark:hover,
#backtotop a:hover,
.mfp-close:hover,
.tabs-nav li.active a,
.ui-accordion .ui-accordion-header-active:hover,
.ui-accordion .ui-accordion-header-active,
.highlight.color,
.plan.color-2 .plan-price,
.plan.color-2 a.button,
.tp-leftarrow:hover,
.tp-rightarrow:hover,
.pagination ul li a.current-page,
.pagination .current,
.pagination ul li a:hover,
.pagination-next-prev ul li a:hover,
.infobox,
.hover-icon,
.comment-by a.reply:hover,
.chosen-container .chosen-results li.highlighted,
.chosen-container-multi .chosen-choices li.search-choice,
.list-search button,
.checkboxes input[type=checkbox]:checked + label:before
{ background-color: #58ba2b; }
a,
table td.title a:hover,
table.manage-table td.action a:hover,
#breadcrumbs ul li a:hover,
#titlebar span.icons a:hover,
.counter-box i,
.counter,
#popular-categories li a i,
.list-1 li:before,
.dropcap,
.resume-titlebar span a:hover i,
.resumes-list-content h4,
.job-overview ul li i,
.company-info span a:hover,
.infobox a:hover,
.meta-tags span a:hover,
.widget-text h5 a:hover,
.app-content .info span ,
.app-content .info ul li a:hover
{ color: #58ba2b; }
.resumes-list li a:before,
.job-list li a:before,
table.manage-table tr:before {
-webkit-box-shadow: 0px 1px 0px 0px #85d361;
-moz-box-shadow: 0px 1px 0px 0px #85d361;
box-shadow: 0px 1px 0px 0px #85d361;
}
#popular-categories li a:before {
-webkit-box-shadow: 0px 0px 0px 1px #85d361;
-moz-box-shadow: 0px 0px 0px 1px #85d361;
box-shadow: 0px 0px 0px 1px #85d361;
}
table.manage-table tr:hover td,
.resumes-list li:hover,
.job-list li:hover { border-color: #85d361; }
table.manage-table tr:hover td,
.resumes-list li:hover,
.job-list li:hover,
#popular-categories li a:hover { background-color: #f9fff6; }
|
ketchupok/csound.github.io
|
css/colors/green.css
|
CSS
|
mit
| 2,350
|
import asyncio
import signal
import configargparse
from structlog import get_logger
from alarme import Application
from alarme.scripts.common import init_logging, uncaught_exception, loop_uncaught_exception
def exit_handler(app, logger, sig):
logger.info('application_signal', name=sig.name, value=sig.value)
app.stop()
def run(config_path, log,
core_application_factory=Application,
):
# Logging init
logger = get_logger()
loop = asyncio.get_event_loop()
init_logging(log, 'server')
loop.set_exception_handler(loop_uncaught_exception)
# Core init
logger.info('application_init')
core_app = core_application_factory(exception_handler=uncaught_exception)
loop.run_until_complete(core_app.load_config(config_path))
for signal_code in (signal.SIGINT, signal.SIGTERM):
loop.add_signal_handler(signal_code, exit_handler, core_app, logger, signal_code)
loop.run_until_complete(core_app.run())
loop.close()
def main():
parser = configargparse.ArgParser(description='Alarm system software for Raspberry Pi')
parser.add_argument('-gc', '--generic-config', is_config_file=True, help='Generic config')
parser.add_argument('-c', '--config', help='Config directory')
parser.add_argument('-l', '--log', type=str, default='/var/log/alarme', help='Logs dir')
args = parser.parse_args()
run(args.config, args.log)
if __name__ == '__main__':
main()
|
insolite/alarme
|
alarme/scripts/server.py
|
Python
|
mit
| 1,452
|
package org.bitcoins.marshallers.rpc.bitcoincore.blockchain.softforks
import org.bitcoins.protocol.rpc.bitcoincore.blockchain.softforks.EnforcementProgress
import org.scalatest.{FlatSpec, MustMatchers}
import spray.json._
/**
* Created by Tom on 1/11/2016.
*/
class EnforcementProgressMarshallerTest extends FlatSpec with MustMatchers {
val str =
"""
|{
| "status" : true,
| "found" : 100,
| "required" : 51,
| "window" : 100
|}
""".stripMargin
val json = str.parseJson
"EnforcementProgress" must "parse progress for enforcing softforks" in {
val enforce : EnforcementProgress = EnforcementProgressMarshaller.EnforcementProgressFormatter.read(json)
enforce.status must be (true)
enforce.newVersionBlocksFound must be (100)
enforce.requiredBlocks must be (51)
enforce.recentBlocksWindow must be (100)
}
}
|
Christewart/scalacoin
|
src/test/scala/org/bitcoins/marshallers/rpc/bitcoincore/blockchain/softforks/EnforcementProgressMarshallerTest.scala
|
Scala
|
mit
| 894
|
"""
Last: 5069
Script with simple UI for creating gaplines data
Run: python WordClassDM.py --index 0
Controls:
setting gaplines - click and drag
saving gaplines - 's' key
reseting gaplines - 'r' key
skip to next img - 'n' key
delete last line - 'd' key
"""
import cv2
import os
import numpy as np
import glob
import argparse
import simplejson
from ocr.normalization import imageNorm
from ocr.viz import printProgressBar
def loadImages(dataloc, idx=0, num=None):
""" Load images and labels """
print("Loading words...")
# Load images and short them from the oldest to the newest
imglist = glob.glob(os.path.join(dataloc, u'*.jpg'))
imglist.sort(key=lambda x: float(x.split("_")[-1][:-4]))
tmpLabels = [name[len(dataloc):] for name in imglist]
labels = np.array(tmpLabels)
images = np.empty(len(imglist), dtype=object)
if num is None:
upper = len(imglist)
else:
upper = min(idx + num, len(imglist))
num += idx
for i, img in enumerate(imglist):
# TODO Speed up loading - Normalization
if i >= idx and i < upper:
images[i] = imageNorm(
cv2.cvtColor(cv2.imread(img), cv2.COLOR_BGR2RGB),
height=60,
border=False,
tilt=True,
hystNorm=True)
printProgressBar(i-idx, upper-idx-1)
print()
return (images[idx:num], labels[idx:num])
def locCheck(loc):
return loc + '/' if loc[-1] != '/' else loc
class Cycler:
drawing = False
scaleF = 4
def __init__(self, idx, data_loc, save_loc):
""" Load images and starts from given index """
# self.images, self.labels = loadImages(loc, idx)
# Create save_loc directory if not exists
if not os.path.exists(save_loc):
os.makedirs(save_loc)
self.data_loc = locCheck(data_loc)
self.save_loc = locCheck(save_loc)
self.idx = 0
self.org_idx = idx
self.blockLoad()
self.image_act = self.images[self.idx]
cv2.namedWindow('image')
cv2.setMouseCallback('image', self.mouseHandler)
self.nextImage()
self.run()
def run(self):
while(1):
self.imageShow()
k = cv2.waitKey(1) & 0xFF
if k == ord('d'):
# Delete last line
self.deleteLastLine()
elif k == ord('r'):
# Clear current gaplines
self.nextImage()
elif k == ord('s'):
# Save gaplines with image
if self.saveData():
self.idx += 1
if self.idx >= len(self.images):
if not self.blockLoad():
break
self.nextImage()
elif k == ord('n'):
# Skip to next image
self.idx += 1
if self.idx >= len(self.images):
if not self.blockLoad():
break
self.nextImage()
elif k == 27:
cv2.destroyAllWindows()
break
print("End of labeling at INDEX: " + str(self.org_idx + self.idx))
def blockLoad(self):
self.images, self.labels = loadImages(
self.data_loc, self.org_idx + self.idx, 100)
self.org_idx += self.idx
self.idx = 0
return len(self.images) is not 0
def imageShow(self):
cv2.imshow(
'image',
cv2.resize(
self.image_act,
(0,0),
fx=self.scaleF,
fy=self.scaleF,
interpolation=cv2.INTERSECT_NONE))
def nextImage(self):
self.image_act = cv2.cvtColor(self.images[self.idx], cv2.COLOR_GRAY2RGB)
self.label_act = self.labels[self.idx][:-4]
self.gaplines = [0, self.image_act.shape[1]]
self.redrawLines()
print(self.org_idx + self.idx, ":", self.label_act.split("_")[0])
self.imageShow();
def saveData(self):
self.gaplines.sort()
print("Saving image with gaplines: ", self.gaplines)
try:
assert len(self.gaplines) - 1 == len(self.label_act.split("_")[0])
cv2.imwrite(
self.save_loc + '%s.jpg' % (self.label_act),
self.images[self.idx])
with open(self.save_loc + '%s.txt' % (self.label_act), 'w') as fp:
simplejson.dump(self.gaplines, fp)
return True
except:
print("Wront number of gaplines")
return False
print()
self.nextImage()
def deleteLastLine(self):
if len(self.gaplines) > 0:
del self.gaplines[-1]
self.redrawLines()
def redrawLines(self):
self.image_act = cv2.cvtColor(self.images[self.idx], cv2.COLOR_GRAY2RGB)
for x in self.gaplines:
self.drawLine(x)
def drawLine(self, x):
cv2.line(
self.image_act, (x, 0), (x, self.image_act.shape[0]), (0,255,0), 1)
def mouseHandler(self, event, x, y, flags, param):
# Clip x into image width range
x = max(min(self.image_act.shape[1], x // self.scaleF), 0)
if event == cv2.EVENT_LBUTTONDOWN:
self.drawing = True
self.tmp = self.image_act.copy()
self.drawLine(x)
elif event == cv2.EVENT_MOUSEMOVE:
if self.drawing == True:
self.image_act = self.tmp.copy()
self.drawLine(x)
elif event == cv2.EVENT_LBUTTONUP:
self.drawing = False
if x not in self.gaplines:
self.gaplines.append(x)
self.image_act = self.tmp.copy()
self.drawLine(x)
if __name__ == '__main__':
parser = argparse.ArgumentParser(
"Script creating UI for gaplines classification")
parser.add_argument(
"--index",
type=int,
default=0,
help="Index of starting image")
parser.add_argument(
"--data",
type=str,
default='data/words_raw',
help="Path to folder with images")
parser.add_argument(
"--save",
type=str,
default='data/words2',
help="Path to folder for saving images with gaplines")
args = parser.parse_args()
Cycler(args.index, args.data, args.save)
|
Breta01/handwriting-ocr
|
src/data/data_creation/WordClassDM.py
|
Python
|
mit
| 6,492
|
class FixColumnVerificationTypeVerifications < ActiveRecord::Migration
def self.up
change_column :verifications, :verification_type, "enum('idchecker', 'directid', 'netverify', 'authenticid')"
end
def self.down
end
end
|
malahinisolutions/verify
|
db/migrate/20151008092718_fix_column_verification_type_verifications.rb
|
Ruby
|
mit
| 232
|
/*
* Description:
* History: yang@haipo.me, 2017/04/27, create
*/
# ifndef _AW_ASSET_H_
# define _AW_ASSET_H_
int init_asset(void);
int asset_subscribe(uint32_t user_id, nw_ses *ses, const char *asset);
int asset_unsubscribe(uint32_t user_id, nw_ses *ses);
int asset_on_update(uint32_t user_id, const char *asset);
# endif
|
viabtc/viabtc_exchange_server
|
accessws/aw_asset.h
|
C
|
mit
| 336
|
https://pubchem.ncbi.nlm.nih.gov/summary/summary.cgi?cid=42850
|
andrewdefries/ToxCast
|
Figure4/FDA_Pesticides/PCID_42850.html
|
HTML
|
mit
| 63
|
package tilat;
import java.awt.Graphics2D;
import java.awt.event.KeyEvent;
import hallinta.Grafiikka;
import hallinta.Hiiri;
import hallinta.Musiikki;
import hallinta.Nappaimisto;
import hallinta.PeliAlue;
import hallinta.PeliOhi;
import hallinta.PeliPaussi;
import main.IkkunaPaneeli;
/**Luokka, joka hoitaa itse pelin hallinnan
* Perustuu kolmen eri luokan ilmentymiin
* Nämä ovat {@link PeliAlue}, {@link PeliOhi} ja {@link PeliPaussi}
* @author Juho Kuusinen
*
*/
public class Peli extends Pelitila{
private PeliAlue peli;
private PeliOhi peliOhi;
private PeliPaussi peliPaussi;
private boolean peliOhiAlustettu;
private Pelintilanhallitsija gm;
private boolean paussi;
/**
* Luodaan uusi Peli-luokan ilmentymä parametrina annetun {@link Pelintilanhallitsija}-luokan ilmentymän mukaan
* @param gm {@link Pelintilanhallitsija}
*/
public Peli(Pelintilanhallitsija gm){
alusta();
this.gm = gm;
}
@Override
public void alusta() {
paussi = false;
peli = new PeliAlue(0, 0, IkkunaPaneeli.LEVEYS, IkkunaPaneeli.KORKEUS,Grafiikka.annaKuva(Grafiikka.TAUSTA));
peliOhi = new PeliOhi(0, 0, IkkunaPaneeli.LEVEYS, IkkunaPaneeli.KORKEUS, Grafiikka.annaKuva(Grafiikka.TAUSTA),Grafiikka.annaKuva(Grafiikka.PISTETAULULOGO));
peliPaussi = new PeliPaussi(0, 0, IkkunaPaneeli.LEVEYS, IkkunaPaneeli.KORKEUS, Grafiikka.annaKuva(Grafiikka.TAUSTA),Grafiikka.annaKuva(Grafiikka.PAUSSI), gm);
peliPaussi.alusta();
}
@Override
public void paivita() {
kasitteleSyote();
if(peli.onkoElossa()){
if(paussi){
peliPaussi.paivita();
}else{
peli.paivita();
}
}else if(!peli.onkoElossa()){
if(!peliOhiAlustettu){
peliOhi.alusta(peli.annaPisteet());
peliOhiAlustettu = true;
}
peliOhi.paivita();
}else{
System.out.println("KUINKAS NÄIN KÄVI...");
}
Musiikki.toistaAudiotListasta();
}
@Override
public void piirra(Graphics2D g) {
if(peli.onkoElossa()){
if(paussi){
peliPaussi.piirra(g);
}else{
peli.piirra(g);
}
}else if(!peli.onkoElossa()){
peliOhi.piirra(g);
}else{
System.out.println("KUINKAS NÄIN KÄVI...");
}
}
@Override
public void kasitteleSyote() {
if(Nappaimisto.annaPainettuNappi() == KeyEvent.VK_ESCAPE){
if(paussi){
paussi = false;
}else{
paussi = true;
peliPaussi.asetaHiiri(Hiiri.annaX(), Hiiri.annaY());
}
}
if(paussi && Hiiri.tapahtuma==1){
if(Hiiri.annaX() > IkkunaPaneeli.LEVEYS/2 - Grafiikka.annaKuva(Grafiikka.NAPPI).getWidth()/2 && Hiiri.annaX() < IkkunaPaneeli.LEVEYS/2 + Grafiikka.annaKuva(Grafiikka.NAPPI).getWidth()/2 ){
if(Hiiri.annaY() > 150+50 && Hiiri.annaY() < 150 + Grafiikka.annaKuva(Grafiikka.NAPPI).getHeight() + 50){
paussi = false;
}
if(Hiiri.annaY() > 150+50 +Grafiikka.annaKuva(Grafiikka.NAPPI).getHeight() && Hiiri.annaY() < 150 + Grafiikka.annaKuva(Grafiikka.NAPPI).getHeight() * 2 + 50){
gm.asetaTila(Pelintilanhallitsija.PAAMENU);
}
if(Hiiri.annaY() > 150+50 +Grafiikka.annaKuva(Grafiikka.NAPPI).getHeight()*2 && Hiiri.annaY() < 150 + Grafiikka.annaKuva(Grafiikka.NAPPI).getHeight() * 3 + 50){
System.exit(0);
}
}
}
if(!peli.onkoElossa() && Hiiri.tapahtuma ==1){
if(Hiiri.annaX() > 50 && Hiiri.annaX() < 50 + Grafiikka.annaKuva(Grafiikka.NAPPI).getWidth() &&
Hiiri.annaY() > 50 && Hiiri.annaY() < 50 + Grafiikka.annaKuva(Grafiikka.NAPPI).getHeight()){
gm.asetaTila(Pelintilanhallitsija.PAAMENU);
}
}
}
}
|
Qurred/Bubble-Game
|
src/tilat/Peli.java
|
Java
|
mit
| 3,583
|
Session \#2
===========
You can run the web audio examples from the following links.
[Example \#1: Visualize waveform](https://rawgit.com/juhannam/ctp431/master/session2/01.VisualizeWaveform.html)
[Example \#2: Visualize spectrum](https://rawgit.com/juhannam/ctp431/master/session2/02.VisualizeSpectrum.html)
[Example \#3: Visualize waveform and spectrum from microphone input](https://rawgit.com/juhannam/ctp431/master/session2/03.VisualizeAudioMicInput.html)
[Example \#4: Visualize loudness, pitch and spectral centroid](https://rawgit.com/juhannam/ctp431/master/session2/04.VisualizeAudioFeatures.html)
|
juhannam/ctp431
|
session2/README.md
|
Markdown
|
mit
| 615
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>sudoku: 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.10.0 / sudoku - 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>
sudoku
<small>
8.6.0
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2020-07-29 03:23:42 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2020-07-29 03:23:42 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.10.0 Formal proof management system
num 1.3 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.8.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "Hugo.Herbelin@inria.fr"
homepage: "https://github.com/coq-contribs/sudoku"
license: "LGPL 2.1"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/Sudoku"]
depends: [
"ocaml"
"coq" {>= "8.6" & < "8.7~"}
]
tags: [ "keyword: sudoku" "keyword: puzzles" "keyword: Davis-Putnam" "category: Miscellaneous/Logical Puzzles and Entertainment" "date: 2006-02" ]
authors: [ "Laurent Théry <thery@sophia.inria.fr> [http://www-sop.inria.fr/lemme/personnel/Laurent.Thery/me.html]" ]
bug-reports: "https://github.com/coq-contribs/sudoku/issues"
dev-repo: "git+https://github.com/coq-contribs/sudoku.git"
synopsis: "A certified Sudoku solver"
description: """
ftp://ftp-sop.inria.fr/lemme/Laurent.Thery/Sudoku.zip
A formalisation of Sudoku in Coq. It implements a naive
Davis-Putnam procedure to solve sudokus."""
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/sudoku/archive/v8.6.0.tar.gz"
checksum: "md5=1bcef9e67b8d60bbecd9f5e02c2b5898"
}
</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-sudoku.8.6.0 coq.8.10.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.10.0).
The following dependencies couldn't be met:
- coq-sudoku -> 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-sudoku.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://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
|
coq-bench/coq-bench.github.io
|
clean/Linux-x86_64-4.08.1-2.0.5/extra-dev/8.10.0/sudoku/8.6.0.html
|
HTML
|
mit
| 7,021
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>three-gap: 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 / three-gap - 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>
three-gap
<small>
8.7.0
<span class="label label-info">Not compatible</span>
</small>
</h1>
<p><em><script>document.write(moment("2021-04-16 14:57:06 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-04-16 14:57:06 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.1 The OCaml compiler (virtual package)
ocaml-base-compiler 4.10.1 Official release 4.10.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/three-gap"
license: "LGPL 2.1"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/ThreeGap"]
depends: [
"ocaml"
"coq" {>= "8.7" & < "8.8~"}
]
tags: [
"keyword: real numbers"
"keyword: Steinhaus"
"keyword: Three Gap Theorem"
"category: Mathematics/Geometry"
"category: Mathematics/Arithmetic and Number Theory/Miscellaneous"
]
authors: [ "Micaela Mayero" ]
bug-reports: "https://github.com/coq-contribs/three-gap/issues"
dev-repo: "git+https://github.com/coq-contribs/three-gap.git"
synopsis: "A Proof of the Three Gap Theorem (Steinhaus Conjecture)"
description: "This proof uses the real numbers. It is a classical proof."
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/three-gap/archive/v8.7.0.tar.gz"
checksum: "md5=84ca55affc358bbd206a996d94d3cf6a"
}
</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-three-gap.8.7.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:
- coq-three-gap -> coq < 8.8~ -> 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 coq-three-gap.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">
<small>Sources are on <a href="https://github.com/coq-bench">GitHub</a>. © Guillaume Claret.</small>
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
|
coq-bench/coq-bench.github.io
|
clean/Linux-x86_64-4.10.1-2.0.6/released/8.12.1/three-gap/8.7.0.html
|
HTML
|
mit
| 6,738
|
# keyclic_sdk_api.model.CategoryEmbedded
## Load the model package
```dart
import 'package:keyclic_sdk_api/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**children** | [**List<Category>**](Category.md) | | [optional] [default to []]
**path** | [**List<NodePath>**](NodePath.md) | | [optional] [default to []]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
Keyclic/keyclic-sdk
|
dart/doc/Category__embedded.md
|
Markdown
|
mit
| 568
|
<?php
/* SonataAdminBundle:CRUD:edit_sonata_type_immutable_array.html.twig */
class __TwigTemplate_4756e8c5a9c146a3fcb19b2bc6e739a2 extends Twig_Template
{
protected $parent;
public function getParent(array $context)
{
if (null === $this->parent) {
$this->parent = $this->getContext($context, 'base_template');
if (!$this->parent instanceof Twig_Template) {
$this->parent = $this->env->loadTemplate($this->parent);
}
}
return $this->parent;
}
protected function doDisplay(array $context, array $blocks = array())
{
$context = array_merge($this->env->getGlobals(), $context);
$this->getParent($context)->display($context, array_merge($this->blocks, $blocks));
}
public function getTemplateName()
{
return "SonataAdminBundle:CRUD:edit_sonata_type_immutable_array.html.twig";
}
public function isTraitable()
{
return false;
}
}
|
kohr/HRSymfony2
|
app/cache/dev/twig/47/56/e8c5a9c146a3fcb19b2bc6e739a2.php
|
PHP
|
mit
| 992
|
/**
* @author weism
* copyright 2015 Qcplay All Rights Reserved.
*/
qc.RoundedRectangle = Phaser.RoundedRectangle;
/**
* 类名
*/
Object.defineProperty(qc.RoundedRectangle.prototype, 'class', {
get : function() { return 'qc.RoundedRectangle'; }
});
/**
* 序列化
*/
qc.RoundedRectangle.prototype.toJson = function() {
return [this.x, this.y, this.width, this.height, this.radius];
}
/**
* 反序列化
*/
qc.RoundedRectangle.prototype.fromJson = function(v) {
this.x = v[0];
this.y = v[1];
this.width = v[2];
this.height = v[3];
this.radius = v[4];
}
|
qiciengine/qiciengine-core
|
src/geom/RoundedRectangle.js
|
JavaScript
|
mit
| 594
|
package zame.game.store.products;
public class ProductText extends Product {
public int purchasedTextResourceId;
public int purchasedImageResourceId;
public ProductText(
int id,
int dependsOnId,
int price,
int titleResourceId,
int descriptionResourceId,
int iconResourceId,
int imageResourceId,
int purchasedTextResourceId,
int purchasedImageResourceId
) {
super(id, dependsOnId, price, titleResourceId, descriptionResourceId, iconResourceId, imageResourceId);
this.purchasedTextResourceId = purchasedTextResourceId;
this.purchasedImageResourceId = purchasedImageResourceId;
}
}
|
restorer/gloomy-dungeons-2
|
src/main/java/zame/game/store/products/ProductText.java
|
Java
|
mit
| 610
|
// Copyright (c) 2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BSCCOIN_VERSION_H
#define BSCCOIN_VERSION_H
#include "clientversion.h"
#include <string>
//
// client versioning
//
static const int CLIENT_VERSION =
1000000 * CLIENT_VERSION_MAJOR
+ 10000 * CLIENT_VERSION_MINOR
+ 100 * CLIENT_VERSION_REVISION
+ 1 * CLIENT_VERSION_BUILD;
extern const std::string CLIENT_NAME;
extern const std::string CLIENT_BUILD;
extern const std::string CLIENT_DATE;
//
// network protocol versioning
//
static const int PROTOCOL_VERSION = 200000;
// intial proto version, to be increased after version/verack negotiation
static const int INIT_PROTO_VERSION = 209;
// disconnect from peers older than this proto version
static const int MIN_PEER_PROTO_VERSION = 200000;
// nTime field added to CAddress, starting with this version;
// if possible, avoid requesting addresses nodes older than this
static const int CADDR_TIME_VERSION = 31402;
// only request blocks from nodes outside this range of versions
static const int NOBLKS_VERSION_BSC = 32000;
static const int NOBLKS_VERSION_END = 32400;
// BIP 0031, pong message, is enabled for all versions AFTER this one
static const int BIP0031_VERSION = 60000;
// "mempool" command, enhanced "getdata" behavior starts with this version:
static const int MEMPOOL_GD_VERSION = 60002;
#endif
|
bowscoin/bowscoin
|
src/version.h
|
C
|
mit
| 1,580
|
shared_examples_for type: :collection do |context|
let(:described_collection) { described_class.new(service: service) }
end
|
cpb/opennorth-represent
|
spec/support/shared_examples/collection_spec.rb
|
Ruby
|
mit
| 126
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>bonsai: 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 / bonsai - 1.0.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
bonsai
<small>
1.0.0
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2022-01-25 22:42:58 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-01-25 22:42:58 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 Preprocessor-pretty-printer 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.04.2 The OCaml compiler (virtual package)
ocaml-base-compiler 4.04.2 Official 4.04.2 release
ocaml-config 1 OCaml Switch Configuration
# opam file:
opam-version: "2.0"
maintainer: "dev@clarus.me"
homepage: "https://github.com/foobar-land/coq-bonsai"
dev-repo: "git+https://github.com/foobar-land/coq-bonsai.git"
bug-reports: "https://github.com/foobar-land/coq-bonsai/issues"
authors: ["Guillaume Claret"]
license: "GPL-3.0-only"
build: [
["./configure.sh"]
[make "-j%{jobs}%"]
[make "-C" "extraction"]
]
depends: [
"coq" {>= "8.13.0"}
"coq-list-string"
"coq-simple-io"
"ocaml"
"ocamlbuild" {build}
]
tags: [
"category:Miscellaneous/Logical Puzzles and Entertainment"
"keyword:bonsai"
"keyword:effects"
"keyword:extraction"
"date:2021-10-04"
]
synopsis: "Generate a fresh Bonsai on your terminal"
url {
src: "https://github.com/foobar-land/coq-bonsai/archive/refs/tags/v1.0.0.tar.gz"
checksum: "sha512=0760e15ee5627651ead63f1ee527f487f89b49cc2327e8b4bf2da261c215895cd1c5541a0e729bebc576d4e58dddbc8cae6b5666a56e5a94e849ab773208c5d1"
}
</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-bonsai.1.0.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-bonsai -> coq >= 8.13.0 -> 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-bonsai.1.0.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://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
|
coq-bench/coq-bench.github.io
|
clean/Linux-x86_64-4.04.2-2.0.5/released/8.5.2/bonsai/1.0.0.html
|
HTML
|
mit
| 6,859
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>ltl: 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 / ltl - 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>
ltl
<small>
8.7.0
<span class="label label-info">Not compatible</span>
</small>
</h1>
<p><em><script>document.write(moment("2020-08-20 03:22:08 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2020-08-20 03:22:08 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.1 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/ltl"
license: "Unknown"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/LTL"]
depends: [
"ocaml"
"coq" {>= "8.7" & < "8.8~"}
]
tags: [ "keyword: temporal logic" "keyword: infinite transition systems" "keyword: co-induction" "category: Mathematics/Logic/Modal logic" "date: 2002-07" ]
authors: [ "Solange Coupet-Grimal" ]
bug-reports: "https://github.com/coq-contribs/ltl/issues"
dev-repo: "git+https://github.com/coq-contribs/ltl.git"
synopsis: "Linear Temporal Logic"
description: """
This contribution contains a shallow embedding of Linear
Temporal Logic (LTL) based on a co-inductive representation of program
executions. Temporal operators are implemented as inductive
(respectively co-inductive) types when they are least (respectively
greatest) fixpoints. Several general lemmas,
that correspond to LTL rules, are proved."""
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/ltl/archive/v8.7.0.tar.gz"
checksum: "md5=57817256c6ca2e9b6ccfd66342ff8d8c"
}
</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-ltl.8.7.0 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-ltl -> coq < 8.8~ -> 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 coq-ltl.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">
<small>Sources are on <a href="https://github.com/coq-bench">GitHub</a>. © Guillaume Claret.</small>
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
|
coq-bench/coq-bench.github.io
|
clean/Linux-x86_64-4.10.0-2.0.6/released/8.11.1/ltl/8.7.0.html
|
HTML
|
mit
| 6,979
|
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Font(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "treemap.hoverlabel"
_path_str = "treemap.hoverlabel.font"
_valid_props = {"color", "colorsrc", "family", "familysrc", "size", "sizesrc"}
# color
# -----
@property
def color(self):
"""
The 'color' property is a color and may be specified as:
- A hex string (e.g. '#ff0000')
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
- A named CSS color:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
chartreuse, chocolate, coral, cornflowerblue,
cornsilk, crimson, cyan, darkblue, darkcyan,
darkgoldenrod, darkgray, darkgrey, darkgreen,
darkkhaki, darkmagenta, darkolivegreen, darkorange,
darkorchid, darkred, darksalmon, darkseagreen,
darkslateblue, darkslategray, darkslategrey,
darkturquoise, darkviolet, deeppink, deepskyblue,
dimgray, dimgrey, dodgerblue, firebrick,
floralwhite, forestgreen, fuchsia, gainsboro,
ghostwhite, gold, goldenrod, gray, grey, green,
greenyellow, honeydew, hotpink, indianred, indigo,
ivory, khaki, lavender, lavenderblush, lawngreen,
lemonchiffon, lightblue, lightcoral, lightcyan,
lightgoldenrodyellow, lightgray, lightgrey,
lightgreen, lightpink, lightsalmon, lightseagreen,
lightskyblue, lightslategray, lightslategrey,
lightsteelblue, lightyellow, lime, limegreen,
linen, magenta, maroon, mediumaquamarine,
mediumblue, mediumorchid, mediumpurple,
mediumseagreen, mediumslateblue, mediumspringgreen,
mediumturquoise, mediumvioletred, midnightblue,
mintcream, mistyrose, moccasin, navajowhite, navy,
oldlace, olive, olivedrab, orange, orangered,
orchid, palegoldenrod, palegreen, paleturquoise,
palevioletred, papayawhip, peachpuff, peru, pink,
plum, powderblue, purple, red, rosybrown,
royalblue, rebeccapurple, saddlebrown, salmon,
sandybrown, seagreen, seashell, sienna, silver,
skyblue, slateblue, slategray, slategrey, snow,
springgreen, steelblue, tan, teal, thistle, tomato,
turquoise, violet, wheat, white, whitesmoke,
yellow, yellowgreen
- A list or array of any of the above
Returns
-------
str|numpy.ndarray
"""
return self["color"]
@color.setter
def color(self, val):
self["color"] = val
# colorsrc
# --------
@property
def colorsrc(self):
"""
Sets the source reference on Chart Studio Cloud for color .
The 'colorsrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["colorsrc"]
@colorsrc.setter
def colorsrc(self, val):
self["colorsrc"] = val
# family
# ------
@property
def family(self):
"""
HTML font family - the typeface that will be applied by the web
browser. The web browser will only be able to apply a font if
it is available on the system which it operates. Provide
multiple font families, separated by commas, to indicate the
preference in which to apply fonts if they aren't available on
the system. The Chart Studio Cloud (at https://chart-
studio.plotly.com or on-premise) generates images on a server,
where only a select number of fonts are installed and
supported. These include "Arial", "Balto", "Courier New",
"Droid Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT Sans
Narrow", "Raleway", "Times New Roman".
The 'family' property is a string and must be specified as:
- A non-empty string
- A tuple, list, or one-dimensional numpy array of the above
Returns
-------
str|numpy.ndarray
"""
return self["family"]
@family.setter
def family(self, val):
self["family"] = val
# familysrc
# ---------
@property
def familysrc(self):
"""
Sets the source reference on Chart Studio Cloud for family .
The 'familysrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["familysrc"]
@familysrc.setter
def familysrc(self, val):
self["familysrc"] = val
# size
# ----
@property
def size(self):
"""
The 'size' property is a number and may be specified as:
- An int or float in the interval [1, inf]
- A tuple, list, or one-dimensional numpy array of the above
Returns
-------
int|float|numpy.ndarray
"""
return self["size"]
@size.setter
def size(self, val):
self["size"] = val
# sizesrc
# -------
@property
def sizesrc(self):
"""
Sets the source reference on Chart Studio Cloud for size .
The 'sizesrc' property must be specified as a string or
as a plotly.grid_objs.Column object
Returns
-------
str
"""
return self["sizesrc"]
@sizesrc.setter
def sizesrc(self, val):
self["sizesrc"] = val
# Self properties description
# ---------------------------
@property
def _prop_descriptions(self):
return """\
color
colorsrc
Sets the source reference on Chart Studio Cloud for
color .
family
HTML font family - the typeface that will be applied by
the web browser. The web browser will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
familysrc
Sets the source reference on Chart Studio Cloud for
family .
size
sizesrc
Sets the source reference on Chart Studio Cloud for
size .
"""
def __init__(
self,
arg=None,
color=None,
colorsrc=None,
family=None,
familysrc=None,
size=None,
sizesrc=None,
**kwargs
):
"""
Construct a new Font object
Sets the font used in hover labels.
Parameters
----------
arg
dict of properties compatible with this constructor or
an instance of
:class:`plotly.graph_objs.treemap.hoverlabel.Font`
color
colorsrc
Sets the source reference on Chart Studio Cloud for
color .
family
HTML font family - the typeface that will be applied by
the web browser. The web browser will only be able to
apply a font if it is available on the system which it
operates. Provide multiple font families, separated by
commas, to indicate the preference in which to apply
fonts if they aren't available on the system. The Chart
Studio Cloud (at https://chart-studio.plotly.com or on-
premise) generates images on a server, where only a
select number of fonts are installed and supported.
These include "Arial", "Balto", "Courier New", "Droid
Sans",, "Droid Serif", "Droid Sans Mono", "Gravitas
One", "Old Standard TT", "Open Sans", "Overpass", "PT
Sans Narrow", "Raleway", "Times New Roman".
familysrc
Sets the source reference on Chart Studio Cloud for
family .
size
sizesrc
Sets the source reference on Chart Studio Cloud for
size .
Returns
-------
Font
"""
super(Font, self).__init__("font")
if "_parent" in kwargs:
self._parent = kwargs["_parent"]
return
# Validate arg
# ------------
if arg is None:
arg = {}
elif isinstance(arg, self.__class__):
arg = arg.to_plotly_json()
elif isinstance(arg, dict):
arg = _copy.copy(arg)
else:
raise ValueError(
"""\
The first argument to the plotly.graph_objs.treemap.hoverlabel.Font
constructor must be a dict or
an instance of :class:`plotly.graph_objs.treemap.hoverlabel.Font`"""
)
# Handle skip_invalid
# -------------------
self._skip_invalid = kwargs.pop("skip_invalid", False)
self._validate = kwargs.pop("_validate", True)
# Populate data dict with properties
# ----------------------------------
_v = arg.pop("color", None)
_v = color if color is not None else _v
if _v is not None:
self["color"] = _v
_v = arg.pop("colorsrc", None)
_v = colorsrc if colorsrc is not None else _v
if _v is not None:
self["colorsrc"] = _v
_v = arg.pop("family", None)
_v = family if family is not None else _v
if _v is not None:
self["family"] = _v
_v = arg.pop("familysrc", None)
_v = familysrc if familysrc is not None else _v
if _v is not None:
self["familysrc"] = _v
_v = arg.pop("size", None)
_v = size if size is not None else _v
if _v is not None:
self["size"] = _v
_v = arg.pop("sizesrc", None)
_v = sizesrc if sizesrc is not None else _v
if _v is not None:
self["sizesrc"] = _v
# Process unknown kwargs
# ----------------------
self._process_kwargs(**dict(arg, **kwargs))
# Reset skip_invalid
# ------------------
self._skip_invalid = False
|
plotly/python-api
|
packages/python/plotly/plotly/graph_objs/treemap/hoverlabel/_font.py
|
Python
|
mit
| 11,209
|
package Test;
import LinkedList.*;
import org.junit.Test;
import static org.junit.Assert.*;
public class TestSuite
{
@Test
public void addItems() {
LinkedList<String> linkedList = new LinkedList<String>();
linkedList.add("Hello");
linkedList.add("Spaghetti");
linkedList.add("This is a sentence");
linkedList.add("Bleh");
assertEquals(linkedList.get(0), "Hello");
assertEquals(linkedList.get(1), "Spaghetti");
assertEquals(linkedList.get(2), "This is a sentence");
assertEquals(linkedList.get(3), "Bleh");
assertEquals(linkedList.get(4), null);
}
@Test
public void removeHead() {
LinkedList<String> linkedList = new LinkedList<String>();
linkedList.add("Hello");
linkedList.add("Spaghetti");
linkedList.add("This is a sentence");
linkedList.add("Bleh");
linkedList.remove(0);
assertEquals(linkedList.get(0), "Spaghetti");
assertEquals(linkedList.get(1), "This is a sentence");
assertEquals(linkedList.get(2), "Bleh");
assertEquals(linkedList.get(3), null);
}
@Test
public void removeTail() {
LinkedList<String> linkedList = new LinkedList<String>();
linkedList.add("Hello");
linkedList.add("Spaghetti");
linkedList.add("This is a sentence");
linkedList.add("Bleh");
linkedList.remove(3);
assertEquals(linkedList.get(0), "Hello");
assertEquals(linkedList.get(1), "Spaghetti");
assertEquals(linkedList.get(2), "This is a sentence");
assertEquals(linkedList.get(3), null);
}
@Test
public void removeInside() {
LinkedList<String> linkedList = new LinkedList<String>();
linkedList.add("Hello");
linkedList.add("Spaghetti");
linkedList.add("This is a sentence");
linkedList.add("Bleh");
linkedList.remove(2);
assertEquals(linkedList.get(0),"Hello");
assertEquals(linkedList.get(1), "Spaghetti");
assertEquals(linkedList.get(2), "Bleh");
assertEquals(linkedList.get(3), null);
}
@Test
public void removeNonexistent() {
LinkedList<String> linkedList = new LinkedList<String>();
try {
linkedList.remove(4);
}
catch (Exception e) {
// Remove should silently fail
fail();
}
}
@Test
public void addItemsLength() {
LinkedList<String> linkedList = new LinkedList<String>();
linkedList.add("Hello");
assertEquals(linkedList.length(), 1);
linkedList.add("Spaghetti");
assertEquals(linkedList.length(), 2);
linkedList.add("This is a sentence");
assertEquals(linkedList.length(), 3);
linkedList.add("Bleh");
assertEquals(linkedList.length(), 4);
}
@Test
public void removeItemsLength() {
LinkedList<String> linkedList = new LinkedList<String>();
linkedList.add("Hello");
linkedList.add("Spaghetti");
linkedList.add("This is a sentence");
linkedList.add("Bleh");
linkedList.remove(3);
assertEquals(linkedList.length(), 3);
linkedList.remove(2);
assertEquals(linkedList.length(), 2);
linkedList.remove(1);
assertEquals(linkedList.length(), 1);
linkedList.remove(0);
assertEquals(linkedList.length(), 0);
}
@Test
public void getNonexistent() {
LinkedList<String> linkedList = new LinkedList<String>();
assertEquals(linkedList.get(4), null);
}
@Test
public void getFirst() {
LinkedList<String> linkedList = new LinkedList<String>();
linkedList.add("Hello");
linkedList.add("Spaghetti");
linkedList.add("This is a sentence");
linkedList.add("Bleh");
assertEquals(linkedList.getFirst(), "Hello");
}
}
|
jaredpetersen/data-structures-and-algorithms
|
data_structures/linked_list/java/test/TestSuite.java
|
Java
|
mit
| 3,391
|
<h3>To buy something, comment below!</h3>
<h4>mention the item name and your offer :)</h4>
<p>List of items</p>
<ol>
<li>Fridge $500</li>
<li>Washing Machine $300</li>
<li>Wooden folding desk/table $100</li>
<li>Glass table $80</li>
<li>red ikea lounge chair $100</li>
<li>piano stool $20</li>
<li><del>computer chair $20</del></li>
<li>bed - $50 / free</li>
<li>dining chairs x 3, free (preferably with a table)</li>
<li>bookshelves x 2 (free)</li>
<li>Christmas tree $50</li>
<li>noticeboard $0</li>
<li>coffee machine $60</li>
<li>computer screen $40</li>
<li>small multi-use blender $40</li>
<li><del>microwave $50</del></li>
<li>fan $20</li>
<li>toaster $10</li>
<li>Colourful heels $50</li>
<li>Leather vest $ 80 (NZ)</li>
<li>White beaded dress from Paris (worn once) $90</li>
</ol>
<p><em>Or just email <strong>zoevanhavre@gmail.com</strong> with the item name and offer in the subject line.</em></p>
<div id="disqus_thread"></div>
<script>
// /**
// * RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
// * LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables
// */
// /*
// var disqus_config = function () {
// this.page.url = http://zoevanhavre.github.io/; // Replace PAGE_URL with your page's canonical URL variable
// this.page.identifier = VGS; // Replace PAGE_IDENTIFIER with your page's unique identifier variable
// };
// */
(function() { // DON'T EDIT BELOW THIS LINE
var d = document, s = d.createElement('script');
s.src = '//zbvgs.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
|
zoevanhavre/VGS
|
_site/Buy.html
|
HTML
|
mit
| 1,907
|
//*******************************************************************
/*!
\file TaskHandler.h
\author Thomas Breuer (Bonn-Rhein-Sieg University of Applied Sciences)
\date 23.03.2016
This file is released under the MIT License.
*/
//*******************************************************************
#ifndef _TASK_HANDLER_H
#define _TASK_HANDLER_H
//*******************************************************************
#include "Std/List.h"
#include "Std/Timer.h"
//*******************************************************************
/*!
\class cTaskHandler
Periodically call of the \a update() method of all tasks, which are
added to the update list.
There are two ways, how the task handler may be called:
- Timer interrupt (timer task)
- Execution of the run() method, in main loop for example (idle task)
To support the cTaskTimer class in a idle task (without timer),
another cTaskTimer (with timer) is required.
\example cTaskHandler.cpp
*/
class cTaskHandler : public cList::Item
{
public:
//*******************************************************************
/*!
\class Task
\brief Base class for tasks
A task is an object, which \a update() method is called periodically.
Derived classes should at least:
- Overwrite the \a update() method
*/
class Task : public cList::Item
{
public:
//---------------------------------------------------------------
/*! Instantiate a class with given taskHandler. The task is added
to the update list.
\param taskHandler Referenz to a task handler object
*/
Task( cTaskHandler &taskHandler );
private:
//---------------------------------------------------------------
/*! This is the \a update() method, which is called periodically
*/
virtual void update( void ) = 0;
}; //cTask
public:
//*******************************************************************
/*!
\class Timer
\brief Timing features within a task
The timer uses the timer tics, which are provided by a task object.
*/
class Timer : public cTimer
{
public:
//---------------------------------------------------------------
/*! Instantiate a timer
The runtime will be stored in the object. Further calls to
\a start() or \a timeout() without parameter will use this stored runtime.
\param taskHandler Reference to a task handler, which
provides the timer tics
\param timeToWait_msec Runtime in miliseconds (ms)
\param timeToWait_usec Runtime in microseconds (us)
*/
Timer( cTaskHandler &taskHandler,
WORD timeToWait_msec = 0,
WORD timeToWait_usec = 0 );
private:
//---------------------------------------------------------------
virtual DWORD getTics( void );
//---------------------------------------------------------------
virtual DWORD getTimeOfTic( void );
private:
//---------------------------------------------------------------
cTaskHandler &taskHandler;
}; //Timer
public:
//---------------------------------------------------------------
/*! Instatiate a task handler as a timer task (triggered by timer)
\param timerPtr Pointer to a timer
*/
cTaskHandler( cHwTimer *timerPtr );
//---------------------------------------------------------------
/*! Instatiate a task handler as an idle task.
An idle task requires a explicit call of the \a run() method
\param taskPtr (optional) to trigger time measurement
(see \b Timer)
*/
cTaskHandler( cTaskHandler *taskPtr = 0 );
//---------------------------------------------------------------
/*! Returns the cycle time of the task handler
\return Cycle time in mikroseconds (us)
*/
virtual DWORD getCycleTime( void );
//---------------------------------------------------------------
/*! Returns the number of tics resp. number of cycles, the task
handler is called
\return Number of tics
*/
virtual unsigned long getTics( void );
//---------------------------------------------------------------
/*! Start the update() method of all added tasks. Idle tasks only
*/
virtual void run( void );
//---------------------------------------------------------------
/*! Add a task to the update list of the task handler
\param taskPtr Pointer to the task
*/
virtual void addTask( Task *taskPtr );
private:
//---------------------------------------------------------------
virtual void update( void );
private:
//---------------------------------------------------------------
DWORD tics;
DWORD cycleTime;
cHwTimer *timerPtr;
cTaskHandler *taskPtr;
cList idle;
}; //cTaskHandler
#endif
|
ThBreuer/EmbSysLib
|
Src/Task/TaskHandler.h
|
C
|
mit
| 5,036
|
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.CodeActions;
using Microsoft.CodeAnalysis.CodeRefactorings;
using Microsoft.CodeAnalysis.Editor.Implementation.Suggestions;
using Microsoft.CodeAnalysis.Editor.Shared.Utilities;
using Microsoft.CodeAnalysis.Editor.UnitTests.Workspaces;
using Microsoft.CodeAnalysis.Extensions;
using Microsoft.CodeAnalysis.Text;
using Roslyn.Test.Utilities;
using Roslyn.Utilities;
using Xunit;
namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.CodeRefactorings
{
public partial class PreviewTests
{
[WpfFact]
public async Task TestExceptionInComputePreview()
{
using var workspace = CreateWorkspaceFromFile("class D {}", new TestParameters());
await GetPreview(workspace, new ErrorCases.ExceptionInCodeAction());
}
[WpfFact]
public void TestExceptionInDisplayText()
{
using var workspace = CreateWorkspaceFromFile("class D {}", new TestParameters());
DisplayText(workspace, new ErrorCases.ExceptionInCodeAction());
}
[WpfFact]
public async Task TestExceptionInActionSets()
{
using var workspace = CreateWorkspaceFromFile("class D {}", new TestParameters());
await ActionSets(workspace, new ErrorCases.ExceptionInCodeAction());
}
private static async Task GetPreview(TestWorkspace workspace, CodeRefactoringProvider provider)
{
var codeActions = new List<CodeAction>();
RefactoringSetup(workspace, provider, codeActions, out var extensionManager, out var textBuffer);
var suggestedAction = new CodeRefactoringSuggestedAction(
workspace.ExportProvider.GetExportedValue<IThreadingContext>(),
workspace.ExportProvider.GetExportedValue<SuggestedActionsSourceProvider>(),
workspace, textBuffer, provider, codeActions.First());
await suggestedAction.GetPreviewAsync(CancellationToken.None);
Assert.True(extensionManager.IsDisabled(provider));
Assert.False(extensionManager.IsIgnored(provider));
}
private static void DisplayText(TestWorkspace workspace, CodeRefactoringProvider provider)
{
var codeActions = new List<CodeAction>();
RefactoringSetup(workspace, provider, codeActions, out var extensionManager, out var textBuffer);
var suggestedAction = new CodeRefactoringSuggestedAction(
workspace.ExportProvider.GetExportedValue<IThreadingContext>(),
workspace.ExportProvider.GetExportedValue<SuggestedActionsSourceProvider>(),
workspace, textBuffer, provider, codeActions.First());
_ = suggestedAction.DisplayText;
Assert.True(extensionManager.IsDisabled(provider));
Assert.False(extensionManager.IsIgnored(provider));
}
private static async Task ActionSets(TestWorkspace workspace, CodeRefactoringProvider provider)
{
var codeActions = new List<CodeAction>();
RefactoringSetup(workspace, provider, codeActions, out var extensionManager, out var textBuffer);
var suggestedAction = new CodeRefactoringSuggestedAction(
workspace.ExportProvider.GetExportedValue<IThreadingContext>(),
workspace.ExportProvider.GetExportedValue<SuggestedActionsSourceProvider>(),
workspace, textBuffer, provider, codeActions.First());
_ = await suggestedAction.GetActionSetsAsync(CancellationToken.None);
Assert.True(extensionManager.IsDisabled(provider));
Assert.False(extensionManager.IsIgnored(provider));
}
private static void RefactoringSetup(
TestWorkspace workspace, CodeRefactoringProvider provider, List<CodeAction> codeActions,
out EditorLayerExtensionManager.ExtensionManager extensionManager,
out VisualStudio.Text.ITextBuffer textBuffer)
{
var document = GetDocument(workspace);
textBuffer = workspace.GetTestDocument(document.Id).GetTextBuffer();
var span = document.GetSyntaxRootAsync().Result.Span;
var context = new CodeRefactoringContext(document, span, (a) => codeActions.Add(a), CancellationToken.None);
provider.ComputeRefactoringsAsync(context).Wait();
var action = codeActions.Single();
extensionManager = document.Project.Solution.Workspace.Services.GetService<IExtensionManager>() as EditorLayerExtensionManager.ExtensionManager;
}
}
}
|
diryboy/roslyn
|
src/EditorFeatures/CSharpTest/CodeActions/Preview/PreviewExceptionTests.cs
|
C#
|
mit
| 4,931
|
<?php
namespace Oro\Bundle\DataGridBundle\Datagrid;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
use Oro\Bundle\SecurityBundle\SecurityFacade;
use Oro\Bundle\DataGridBundle\Event\BuildAfter;
use Oro\Bundle\DataGridBundle\Event\BuildBefore;
use Oro\Bundle\DataGridBundle\Extension\Acceptor;
use Oro\Bundle\DataGridBundle\Datasource\DatasourceInterface;
use Oro\Bundle\DataGridBundle\Extension\ExtensionVisitorInterface;
use Oro\Bundle\DataGridBundle\Datagrid\Common\DatagridConfiguration;
class Builder
{
const DATASOURCE_PATH = '[source]';
const DATASOURCE_TYPE_PATH = '[source][type]';
const DATASOURCE_ACL_PATH = '[source][acl_resource]';
const BASE_DATAGRID_CLASS_PATH = '[options][base_datagrid_class]';
/** @var string */
protected $baseDatagridClass;
/** @var string */
protected $acceptorClass;
/** @var EventDispatcherInterface */
protected $eventDispatcher;
/** @var DatasourceInterface[] */
protected $dataSources = [];
/** @var ExtensionVisitorInterface[] */
protected $extensions = [];
/** @var SecurityFacade */
protected $securityFacade;
public function __construct(
$baseDatagridClass,
$acceptorClass,
EventDispatcherInterface $eventDispatcher,
SecurityFacade $securityFacade
) {
$this->baseDatagridClass = $baseDatagridClass;
$this->acceptorClass = $acceptorClass;
$this->eventDispatcher = $eventDispatcher;
$this->securityFacade = $securityFacade;
}
/**
* Create, configure and build datagrid
*
* @param DatagridConfiguration $config
*
* @return DatagridInterface
*/
public function build(DatagridConfiguration $config)
{
$class = $config->offsetGetByPath(self::BASE_DATAGRID_CLASS_PATH, $this->baseDatagridClass);
$name = $config->getName();
/** @var Acceptor $acceptor */
$acceptor = new $this->acceptorClass($config);
/** @var DatagridInterface $datagrid */
$datagrid = new $class($name, $acceptor);
$event = new BuildBefore($datagrid, $config);
$this->eventDispatcher->dispatch(BuildBefore::NAME, $event);
// duplicate event dispatch with grid name
$this->eventDispatcher->dispatch(BuildBefore::NAME . '.' . $name, $event);
$this->buildDataSource($datagrid, $config);
foreach ($this->extensions as $extension) {
if ($extension->isApplicable($config)) {
$acceptor->addExtension($extension);
}
}
$acceptor->processConfiguration();
$event = new BuildAfter($datagrid);
$this->eventDispatcher->dispatch(BuildAfter::NAME, $event);
// duplicate event dispatch with grid name
$this->eventDispatcher->dispatch(BuildAfter::NAME . '.' . $name, $event);
return $datagrid;
}
/**
* Register datasource type
* Automatically registered services tagged by oro_datagrid.datasource tag
*
* @param string $type
* @param DatasourceInterface $dataSource
*
* @return $this
*/
public function registerDatasource($type, DatasourceInterface $dataSource)
{
$this->dataSources[$type] = $dataSource;
return $this;
}
/**
* Register extension
* Automatically registered services tagged by oro_datagrid.extension tag
*
* @param ExtensionVisitorInterface $extension
*
* @return $this
*/
public function registerExtension(ExtensionVisitorInterface $extension)
{
$this->extensions[] = $extension;
return $this;
}
/**
* Try to find datasource adapter and process it
* Datasource object should be self-acceptable to grid
*
* @param DatagridInterface $grid
* @param DatagridConfiguration $config
*
* @throws \RuntimeException
*/
protected function buildDataSource(DatagridInterface $grid, DatagridConfiguration $config)
{
$sourceType = $config->offsetGetByPath(self::DATASOURCE_TYPE_PATH, false);
if (!$sourceType) {
throw new \RuntimeException('Datagrid source does not configured');
}
if (!isset($this->dataSources[$sourceType])) {
throw new \RuntimeException(sprintf('Datagrid source "%s" does not exist', $sourceType));
}
$acl = $config->offsetGetByPath(self::DATASOURCE_ACL_PATH);
if ($acl && !$this->isResourceGranted($acl)) {
throw new AccessDeniedException('Access denied.');
}
$this->dataSources[$sourceType]->process($grid, $config->offsetGetByPath(self::DATASOURCE_PATH, []));
}
/**
* Checks if an access to a resource is granted or not
*
* @param string $aclResource An ACL annotation id or "permission;descriptor"
*
* @return bool
*/
protected function isResourceGranted($aclResource)
{
$delimiter = strpos($aclResource, ';');
if ($delimiter) {
$permission = substr($aclResource, 0, $delimiter);
$descriptor = substr($aclResource, $delimiter + 1);
return $this->securityFacade->isGranted($permission, $descriptor);
}
return $this->securityFacade->isGranted($aclResource);
}
}
|
akeneo/platform
|
src/Oro/Bundle/DataGridBundle/Datagrid/Builder.php
|
PHP
|
mit
| 5,430
|
export enum Collection {
NESTJS = '@nestjs/schematics',
}
|
ThomRick/nest-cli
|
lib/schematics/collection.ts
|
TypeScript
|
mit
| 60
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>mini-compiler: 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.9.1 / mini-compiler - 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>
mini-compiler
<small>
8.6.0
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2021-12-28 10:10:01 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-28 10:10:01 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 Preprocessor-pretty-printer of OCaml
conf-findutils 1 Virtual package relying on findutils
conf-perl 1 Virtual package relying on perl
coq 8.9.1 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.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "Hugo.Herbelin@inria.fr"
homepage: "https://github.com/coq-contribs/mini-compiler"
license: "LGPL 2.1"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/MiniCompiler"]
depends: [
"ocaml"
"coq" {>= "8.6" & < "8.7~"}
]
tags: [ "keyword: compilation" "keyword: correctness" "keyword: arithmetic" "category: Computer Science/Semantics and Compilation/Compilation" "date: 2003" ]
authors: [ "Jean-Christophe Filliâtre" ]
bug-reports: "https://github.com/coq-contribs/mini-compiler/issues"
dev-repo: "git+https://github.com/coq-contribs/mini-compiler.git"
synopsis: "Correctness of a tiny compiler for arithmetic expressions"
description: """
Tutorial correctness proof of a tiny compiler from
simple arithmetic expressions (constants, variables and additions) to
simple assembly-like code (one accumulator, infinitly many registers and
addition)"""
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/mini-compiler/archive/v8.6.0.tar.gz"
checksum: "md5=89efeb6a9a6e5b8d8932636568cd2a63"
}
</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-mini-compiler.8.6.0 coq.8.9.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.9.1).
The following dependencies couldn't be met:
- coq-mini-compiler -> coq < 8.7~ -> 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-mini-compiler.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://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
|
coq-bench/coq-bench.github.io
|
clean/Linux-x86_64-4.03.0-2.0.5/released/8.9.1/mini-compiler/8.6.0.html
|
HTML
|
mit
| 7,251
|
namespace DataTradeExamples
{
class Program
{
static void Main()
{
string address = "localhost";
string username = "5";
string password = "123qwe!";
//var example = new TradeServerInfoExample(address, username, password);
var example = new AccountInfoExample(address, username, password);
//var example = new SendLimitOrderExample(address, username, password);
//var example = new SendMarketOrderExample(address, username, password);
//var example = new SendStopOrderExample(address, username, password);
//var example = new CloseAllPositionsExample(address, username, password);
//var example = new ClosePositionExample(address, username, password);
//var example = new ClosePartiallyPositionExample(address, username, password);
//var example = new DeletePendingOrderExample(address, username, password);
//var example = new GetOrdersExample(address, username, password);
//var example = new GetTradeTransactionReportsExample(address, username, password);
//var example = new ModifyTradeRecordExample(address, username, password);
//var example = new CloseByExample(address, username, password);
//var example = new GetDailyAccountSnapshotsExample(address, username, password);
using (example)
{
example.Run();
}
}
}
}
|
SoftFx/FDK
|
Examples/CSharp/DataTradeExamples/Program.cs
|
C#
|
mit
| 1,518
|
package com.skidsdev.fyrestone.item;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.item.Item;
import net.minecraft.item.Item.ToolMaterial;
import net.minecraftforge.common.util.EnumHelper;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.OreDictionary;
public final class ItemRegister
{
public static Item itemShard;
public static Item itemFyrestoneIngot;
public static Item itemEarthstoneIngot;
public static Item itemMysticalOrb;
public static Item itemPlagueEssence;
public static Item itemPlagueCore;
public static Item itemBlazingCore;
public static Item itemFyrestoneCatalyst;
public static Item itemGuideBook;
public static Item itemSword;
public static ToolMaterial FYRESTONE = EnumHelper.addToolMaterial("FYRESTONE", 2, 500, 10.0F, 2.0F, 18);
public static List<Item> registeredItems;
public static final void createItems()
{
registeredItems = new ArrayList<Item>();
GameRegistry.register(itemShard = new ItemBaseShard());
itemFyrestoneIngot = registerItem(new BaseItem("itemFyrestoneIngot"), "ingotFyrestone");
itemEarthstoneIngot = registerItem(new BaseItem("itemEarthstoneIngot"), "ingotEarthstone");
itemMysticalOrb = registerItem(new BaseItem("itemMysticalOrb"));
itemPlagueEssence = registerItem(new BaseItem("itemPlagueEssence"));
itemPlagueCore = registerItem(new BaseItem("itemPlagueCore"));
itemBlazingCore = registerItem(new BaseItem("itemBlazingCore"));
itemFyrestoneCatalyst = registerItem(new BaseItem("itemFyrestoneCatalyst"));
itemGuideBook = registerItem(new ItemGuideBook());
itemSword = registerItem(new ItemBaseSword(FYRESTONE, "itemSword"));
}
private static Item registerItem(Item item, String oreDict)
{
OreDictionary.registerOre(oreDict, registerItem(item));
return item;
}
private static Item registerItem(Item item)
{
GameRegistry.register(item);
registeredItems.add(item);
return item;
}
}
|
gunnerwolf/Fyrestone
|
src/main/java/com/skidsdev/fyrestone/item/ItemRegister.java
|
Java
|
mit
| 2,022
|
#!/bin/bash
/usr/bin/hhvm --config ./hhvm.ini --mode server -u www-data
|
vearutop/pinba-pure-php
|
benchmark/start-hhvm.sh
|
Shell
|
mit
| 72
|
// Copyright (c) 2013 Richard Long & HexBeerium
//
// Released under the MIT license ( http://opensource.org/licenses/MIT )
//
package jsonbroker.library.common.broker;
import jsonbroker.library.common.exception.BaseException;
/**
*
* @deprecated use jsonbroker.library.broker.BrokerMessageType
*
*/
public class BrokerMessageType extends jsonbroker.library.broker.BrokerMessageType {
public static final BrokerMessageType FAULT = new BrokerMessageType("fault");
public static final BrokerMessageType NOTIFICATION = new BrokerMessageType("notification");
public static final BrokerMessageType ONEWAY = new BrokerMessageType("oneway");
public static final BrokerMessageType META_REQUEST = new BrokerMessageType("meta-request");
public static final BrokerMessageType META_RESPONSE = new BrokerMessageType("meta-response");
public static final BrokerMessageType REQUEST = new BrokerMessageType("request");
public static final BrokerMessageType RESPONSE = new BrokerMessageType("response");
private BrokerMessageType(String identifier) {
super( identifier );
}
public static BrokerMessageType lookup( String identifier) {
if( FAULT._identifier.equals(identifier) ) {
return FAULT;
}
if( NOTIFICATION._identifier.equals( identifier) ) {
return NOTIFICATION;
}
if( ONEWAY._identifier.equals(identifier) ) {
return ONEWAY;
}
if( META_REQUEST._identifier.equals(identifier) ) {
return META_REQUEST;
}
if( META_RESPONSE._identifier.equals(identifier) ) {
return META_RESPONSE;
}
if( REQUEST._identifier.equals(identifier) ) {
return REQUEST;
}
if( RESPONSE._identifier.equals(identifier) ) {
return RESPONSE;
}
String technicalError = String.format("unexpected identifier; identifier = '%s'", identifier);
throw new BaseException(BrokerMessageType.class, technicalError);
}
}
|
rlong/java.jsonbroker.library
|
src/jsonbroker/library/common/broker/BrokerMessageType.java
|
Java
|
mit
| 1,946
|
<table class="table" id="history-table">
<thead>
<tr>
<th>Name</th>
<th>Email</th>
<th>Phone</th>
<th>Amount Paid</th>
<th>Registered Until</th>
<th>Signoff</th>
<th>Updated On</th>
<th>Updated By</th>
</tr>
</thead>
<tbody></tbody>
</table>
|
tristanbarry/santrovelo
|
public/js/app/templates/memberhistoryviewtable.html
|
HTML
|
mit
| 365
|
class DropTable < ActiveRecord::Migration
def up
end
def down
drop_table :Stat
end
end
|
suhasdeshpande/DigFollowers
|
db/migrate/20120308180244_drop_table.rb
|
Ruby
|
mit
| 97
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>coqprime: 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 / coqprime - 1.0.5</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
coqprime
<small>
1.0.5
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2022-02-20 14:01:21 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-02-20 14:01: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 Preprocessor-pretty-printer 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.04.2 The OCaml compiler (virtual package)
ocaml-base-compiler 4.04.2 Official 4.04.2 release
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.3 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "thery@sophia.inria.fr"
homepage: "https://github.com/thery/coqprime"
bug-reports: "https://github.com/thery/coqprime/issues"
dev-repo: "git+https://github.com/thery/coqprime.git"
license: "LGPL-2.1-only"
authors: ["Laurent Théry"]
build: [
[make "-j%{jobs}%"]
]
install: [
[make "install"]
]
depends: [
"ocaml"
"coq" {>= "8.10~" & < "8.12"}
"coq-bignums"
]
synopsis: "Certifying prime numbers in Coq"
url {
src: "https://github.com/thery/coqprime/archive/v8.10b.zip"
checksum: "sha512=8debbad953f083137c5ab73be0615983af42188c34852bfca3eb7cc92f13432bcbeadc4b464ef1c389d354c68bac013fdfc400d1dd49fc370ff8ac5cff612343"
}
</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-coqprime.1.0.5 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-coqprime -> coq >= 8.10~ -> 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-coqprime.1.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://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
|
coq-bench/coq-bench.github.io
|
clean/Linux-x86_64-4.04.2-2.0.5/released/8.7.2/coqprime/1.0.5.html
|
HTML
|
mit
| 6,606
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>dep-map: 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.1 / dep-map - 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>
dep-map
<small>
8.5.0
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2022-02-25 11:03:18 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-02-25 11:03:18 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.1 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.3 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "matej.kosik@inria.fr"
homepage: "https://github.com/coq-contribs/dep-map"
license: "LGPL 2"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/DepMap"]
depends: [
"ocaml"
"coq" {>= "8.5" & < "8.6~"}
]
authors: [ "Lionel Rieg <lionel.rieg@college-de-france.fr>" ]
bug-reports: "https://github.com/dep-map/dep-map/issues"
dev-repo: "git+https://github.com/coq-contribs/dep-map.git"
synopsis: "Demos of some Coq tools appeared in version V6.0"
description: """
Example of sorting algorithms defined using the Cases
(pattern-matching) construction. Demo of the decision tactic Tauto for
intuitionistic propositional calculus. Demo of the AutoRewrite tactic. Demo of
the Prolog tactic applied to the compilation of miniML programs."""
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/dep-map/archive/v8.5.0.tar.gz"
checksum: "md5=d212aa583dd0646c0f3fd2d8117787b5"
}
</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-dep-map.8.5.0 coq.8.10.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.10.1).
The following dependencies couldn't be met:
- coq-dep-map -> 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-dep-map.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://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
|
coq-bench/coq-bench.github.io
|
clean/Linux-x86_64-4.08.1-2.0.5/released/8.10.1/dep-map/8.5.0.html
|
HTML
|
mit
| 6,752
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
</head>
<body>
<h1 id="httpfoundationcomponent">HttpFoundation Component</h1>
<p>The HttpFoundation component defines an object-oriented layer for the HTTP
specification.</p>
<h2 id="resources">Resources</h2>
<ul>
<li><a href="https://symfony.com/doc/current/components/http_foundation/index.html">Documentation</a></li>
<li><a href="https://symfony.com/doc/current/contributing/index.html">Contributing</a></li>
<li><a href="https://github.com/symfony/symfony/issues">Report issues</a> and
<a href="https://github.com/symfony/symfony/pulls">send Pull Requests</a>
in the <a href="https://github.com/symfony/symfony">main Symfony repository</a></li>
</ul>
</body>
</html>
|
darbymanning/Family-Church
|
wordpress/wp-content/themes/familychurch/vendor/symfony/http-foundation/README.html
|
HTML
|
mit
| 731
|
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("BusinessLogic")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("BusinessLogic")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("96558876-6abb-4f6f-a392-b1503c239f40")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
|
PhatTrien-MNM/ptnm_cuoiki
|
BusinessLogic/Properties/AssemblyInfo.cs
|
C#
|
mit
| 1,402
|
#if ! (UNITY_DASHBOARD_WIDGET || UNITY_WEBPLAYER || UNITY_WII || UNITY_WIIU || UNITY_NACL || UNITY_FLASH || UNITY_BLACKBERRY) // Disable under unsupported platforms.
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.11
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
using System;
using System.Runtime.InteropServices;
public class Playlist : AkPlaylistArray {
private IntPtr swigCPtr;
internal Playlist(IntPtr cPtr, bool cMemoryOwn) : base(AkSoundEnginePINVOKE.CSharp_Playlist_SWIGUpcast(cPtr), cMemoryOwn) {
swigCPtr = cPtr;
}
internal static IntPtr getCPtr(Playlist obj) {
return (obj == null) ? IntPtr.Zero : obj.swigCPtr;
}
~Playlist() {
Dispose();
}
public override void Dispose() {
lock(this) {
if (swigCPtr != IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
AkSoundEnginePINVOKE.CSharp_delete_Playlist(swigCPtr);
}
swigCPtr = IntPtr.Zero;
}
GC.SuppressFinalize(this);
base.Dispose();
}
}
public AKRESULT Enqueue(uint in_audioNodeID, int in_msDelay, IntPtr in_pCustomInfo, uint in_cExternals, AkExternalSourceInfo in_pExternalSources) {
AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_Playlist_Enqueue__SWIG_0(swigCPtr, in_audioNodeID, in_msDelay, in_pCustomInfo, in_cExternals, AkExternalSourceInfo.getCPtr(in_pExternalSources));
return ret;
}
public AKRESULT Enqueue(uint in_audioNodeID, int in_msDelay, IntPtr in_pCustomInfo, uint in_cExternals) {
AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_Playlist_Enqueue__SWIG_1(swigCPtr, in_audioNodeID, in_msDelay, in_pCustomInfo, in_cExternals);
return ret;
}
public AKRESULT Enqueue(uint in_audioNodeID, int in_msDelay, IntPtr in_pCustomInfo) {
AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_Playlist_Enqueue__SWIG_2(swigCPtr, in_audioNodeID, in_msDelay, in_pCustomInfo);
return ret;
}
public AKRESULT Enqueue(uint in_audioNodeID, int in_msDelay) {
AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_Playlist_Enqueue__SWIG_3(swigCPtr, in_audioNodeID, in_msDelay);
return ret;
}
public AKRESULT Enqueue(uint in_audioNodeID) {
AKRESULT ret = (AKRESULT)AkSoundEnginePINVOKE.CSharp_Playlist_Enqueue__SWIG_4(swigCPtr, in_audioNodeID);
return ret;
}
public Playlist() : this(AkSoundEnginePINVOKE.CSharp_new_Playlist(), true) {
}
}
#endif // #if ! (UNITY_DASHBOARD_WIDGET || UNITY_WEBPLAYER || UNITY_WII || UNITY_WIIU || UNITY_NACL || UNITY_FLASH || UNITY_BLACKBERRY) // Disable under unsupported platforms.
|
TeamTorchBear/Guzzlesaurus
|
Assets/Wwise/Deployment/API/Generated/Common/Playlist.cs
|
C#
|
mit
| 2,842
|
require 'spec_helper'
module Recurly
describe BillingInfo do
# version accounts based on this current files modification dates
timestamp = File.mtime(__FILE__).to_i
def verify_billing_info(billing_info, billing_attributes)
# check the billing data fields
billing_info.first_name.should == billing_attributes[:first_name]
billing_info.last_name.should == billing_attributes[:last_name]
billing_info.address1.should == billing_attributes[:address1]
billing_info.city.should == billing_attributes[:city]
billing_info.state.should == billing_attributes[:state]
billing_info.zip.should == billing_attributes[:zip]
# check the credit card fields
billing_info.credit_card.last_four.should == billing_attributes[:credit_card][:number][-4, 4]
end
describe "create an account's billing information" do
use_vcr_cassette "billing/create/#{timestamp}"
let(:account){ Factory.create_account("billing-create-#{timestamp}") }
before(:each) do
@billing_attributes = Factory.billing_attributes({
:account_code => account.account_code,
:first_name => account.first_name,
:last_name => account.last_name
})
@billing_info = BillingInfo.create(@billing_attributes)
end
it "should successfully create the billing info record" do
@billing_info.updated_at.should_not be_nil
end
it "should set the correct billing_info on the server " do
billing_info = BillingInfo.find(account.account_code)
verify_billing_info(billing_info, @billing_attributes)
end
end
describe "update an account's billing information" do
use_vcr_cassette "billing/update/#{timestamp}"
let(:account){ Factory.create_account_with_billing_info("billing-update-#{timestamp}") }
before(:each) do
@new_billing_attributes = Factory.billing_attributes({
:account_code => account.account_code,
:first_name => account.first_name,
:last_name => account.last_name,
:address1 => "1st Ave South, Apt 5001"
})
@billing_info = BillingInfo.create(@new_billing_attributes)
end
it "should set the correct billing_info on the server " do
billing_info = BillingInfo.find(account.account_code)
verify_billing_info(billing_info, @new_billing_attributes)
end
end
describe "get account's billing information" do
use_vcr_cassette "billing/find/#{timestamp}"
let(:account){ Factory.create_account_with_billing_info("billing-find-#{timestamp}") }
before(:each) do
@billing_attributes = Factory.billing_attributes({
:account_code => account.account_code,
:first_name => account.first_name,
:last_name => account.last_name
})
@billing_info = BillingInfo.find(account.account_code)
end
it "should return the correct billing_info from the server" do
billing_info = BillingInfo.find(account.account_code)
verify_billing_info(billing_info, @billing_attributes)
end
end
describe "clearing an account's billing information" do
use_vcr_cassette "billing/destroy/#{timestamp}"
let(:account){ Factory.create_account("billing-destroy-#{timestamp}") }
before(:each) do
@billing_attributes = Factory.billing_attributes({
:account_code => account.account_code,
:first_name => account.first_name,
:last_name => account.last_name,
:address1 => "500 South Central Blvd",
:city => "Los Angeles",
:state => "CA",
:zip => "90001"
})
BillingInfo.create(@billing_attributes)
@billing_info = BillingInfo.find(account.account_code)
end
it "should allow destroying the billing info for an account" do
@billing_info.destroy
expect {
fresh = BillingInfo.find(account.account_code)
}.to raise_error ActiveResource::ResourceNotFound
end
end
describe "set the appropriate error" do
use_vcr_cassette "billing/errors/#{timestamp}"
let(:account){ Factory.create_account("billing-errors-#{timestamp}") }
it "should set an error on base if the card number is blank" do
@billing_attributes = Factory.billing_attributes({
:account_code => account.account_code,
:first_name => account.first_name,
:last_name => account.last_name,
:credit_card => {
:number => '',
},
})
billing_info = BillingInfo.create(@billing_attributes)
billing_info.errors[:base].count.should == 1
end
it "should set an error if the card number is invalid" do
@billing_attributes = Factory.billing_attributes({
:account_code => account.account_code,
:first_name => account.first_name,
:last_name => account.last_name,
:credit_card => {
:number => '4000-0000-0000-0002',
},
})
billing_info = BillingInfo.create(@billing_attributes)
billing_info.errors.count.should == 1
end
end
end
end
|
compactcode/recurly-client-ruby
|
spec/integration/billing_info_spec.rb
|
Ruby
|
mit
| 5,228
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="shortcut icon" type="image/x-icon" href="../favicon.ico">
<link rel="stylesheet" type="text/css" href="../css/font-awesome-4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="../css/fonts.css">
<link rel="stylesheet" type="text/css" href="../css/sweetalert.css">
<link rel="stylesheet" type="text/css" href="../css/game.css">
<title>C.A.S.E.O.</title>
</head>
<body>
<div class="center-align-container">
<canvas id="myCanvas" class="myCanvas"></canvas>
</div>
<div class="center-align-container" style="font-size:1.4em;margin-top:0;padding-top:0">
<a href="../menu.html" style="color:rgba(150, 146, 130, 0.7)"><i class="fa fa-bars fa-3x" aria-hidden="true"></i></a>
<span> </span>
<a id="LOCK_BTN" style="color:rgba(150, 146, 130, 0.7);cursor:pointer"><i class="fa fa-lock fa-3x" aria-hidden="true"></i></a>
<span> </span>
<a id="UNDO_BTN" style="color:rgba(150, 146, 130, 0.7);cursor:pointer"><i class="fa fa-times fa-3x" aria-hidden="true"></i></a>
<span> </span>
<a id="BOOKMARK_BTN" style="color:rgba(150, 146, 130, 0.7);cursor:pointer"><i class="fa fa-bookmark-o fa-3x" aria-hidden="true"></i></a>
<span> </span>
<a onclick="ReloadPage()" style="color:#DB7093;cursor:pointer"><i class="fa fa-repeat fa-3x" aria-hidden="true"></i></a>
</div>
<script src="../js/jquery-3.2.1.min.js"></script>
<script src="../js/sweetalert.min.js"></script>
<script src="../js/js.cookie.js"></script>
<script src="../js/utils.js"></script>
<script src="../js/board.js"></script>
<script>
$(document).ready(function() {
let R = 7;
let C = 10;
let row_data = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 2, 0, 2, 0, 0, 2, 2, 0, 0]];
let col_data = [[0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0], [0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0], [2, 0, 1, 0, 1, 1, 0, 0, 1, 0, 0], [0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0], [2, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0], [2, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0], [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0]];
let win_h = $(window).height();
let win_w = $(window).width();
let FONT = "Courier, monospace";
let fh = 2;
let font_dim = MeasureText("A", true, FONT, fh);
let char_h = font_dim[1];
let char_w = font_dim[0];
let req_h = R * 5 * char_h + (R+1) * char_h + 80;
let req_w = C * 11 * char_w + (C+1) * char_w + 80;
while (req_h < win_h && req_w < win_w) {
++fh;
font_dim = MeasureText("A", true, FONT, fh);
char_h = font_dim[1];
char_w = font_dim[0];
req_h = R * 5 * char_h + (R+1) * char_h + 80;
req_w = C * 11 * char_w + (C+1) * char_w + 80;
}
var _b = new board(R, C, "myCanvas", FONT, fh-1);
_b.RestoreBookmark(row_data, col_data);
function getMousePos(canvas, evt) {
let rect = canvas.getBoundingClientRect();
return {
x: (evt.clientX-rect.left) / (rect.right-rect.left) * canvas.width,
y: (evt.clientY-rect.top) / (rect.bottom-rect.top) * canvas.height
};
}
var canvas = document.getElementById("myCanvas");
var _ctx = canvas.getContext("2d");
_ctx.strokeStyle = "#E6E6FA";
_ctx.lineWidth = Math.floor(fh*1.33);
var _drawing = false;
var _mousePos = { x : -1, y : -1 };
var _lastPos = _mousePos;
$('body').on('contextmenu', '#myCanvas', function(e) {
// Disable default right-click - it is used for creating helper walls
return false;
});
canvas.addEventListener("mousedown", function (e) {
_ctx.beginPath();
_drawing = true;
_lastPos = getMousePos(canvas, e);
_ctx.lineJoin = _ctx.lineCap = 'round';
}, false);
canvas.addEventListener("mouseup", function (e) {
if (_drawing) {
_ctx.closePath();
_mousePos = getMousePos(canvas, e);
if (e.which && e.which == 3)
_b.AddHelperWall(_mousePos.x, _mousePos.y);
else
_b.Clicked(_mousePos.x, _mousePos.y);
_lastPos = _mousePos;
_drawing = false;
}
}, false);
canvas.addEventListener("mousemove", function (e) {
_mousePos = getMousePos(canvas, e);
}, false);
canvas.addEventListener("mouseout", function (e) {
var mouseEvent = new MouseEvent("mouseup", {});
canvas.dispatchEvent(mouseEvent);
}, false);
function renderCanvas() {
if (_drawing) {
if (_lastPos.x > 0 && _lastPos.y > 0 &&
_mousePos.x > 0 && _mousePos.y > 0) {
_ctx.moveTo(_lastPos.x, _lastPos.y);
_ctx.lineTo(_mousePos.x, _mousePos.y);
_ctx.stroke();
}
_lastPos = _mousePos;
_b.LogDragClick(_mousePos.x, _mousePos.y);
}
}
(function drawLoop () {
requestAnimFrame(drawLoop);
renderCanvas();
})();
// TOUCH EVENTS
// Prevent scrolling when touching the canvas
canvas.addEventListener("touchstart", function (e) {
e.preventDefault();
var touch = e.touches[0];
var mouseEvent = new MouseEvent("mousedown", {
clientX: touch.clientX,
clientY: touch.clientY
});
canvas.dispatchEvent(mouseEvent);
}, false);
canvas.addEventListener("touchend", function (e) {
var mouseEvent = new MouseEvent("mouseup", {});
canvas.dispatchEvent(mouseEvent);
}, false);
canvas.addEventListener("touchmove", function (e) {
e.preventDefault();
var touch = e.touches[0];
var mouseEvent = new MouseEvent("mousemove", {
clientX: touch.clientX,
clientY: touch.clientY
});
canvas.dispatchEvent(mouseEvent);
}, false);
$("#LOCK_BTN").click(function() {
_b.ToggleLock();
});
$("#UNDO_BTN").click(function() {
_b.RestoreLockedState();
});
$("#BOOKMARK_BTN").click(function() {
_b.Bookmark();
});
});
</script>
</body>
</html>
|
grunfeld/grunfeld.github.io
|
levels/m105.html
|
HTML
|
mit
| 6,440
|
<?php
namespace Fer\UserBundle\Security\User\Provider;
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
use Symfony\Component\Security\Core\User\UserProviderInterface;
use Symfony\Component\Security\Core\User\UserInterface;
use \BaseFacebook;
use \FacebookApiException;
class FacebookProvider implements UserProviderInterface
{
/**
* @var \Facebook
*/
protected $facebook;
protected $userManager;
protected $validator;
public function __construct(BaseFacebook $facebook, $userManager, $validator)
{
$this->facebook = $facebook;
$this->userManager = $userManager;
$this->validator = $validator;
}
public function supportsClass($class)
{
return $this->userManager->supportsClass($class);
}
public function findUserByFbId($fbId)
{
return $this->userManager->findUserBy(array('facebookId' => $fbId));
}
public function loadUserByUsername($username)
{
$user = $this->findUserByFbId($username);
try {
$fbdata = $this->facebook->api('/me');
} catch (FacebookApiException $e) {
$fbdata = null;
}
if (!empty($fbdata)) {
if (empty($user)) {
$user = $this->userManager->createUser();
$user->setEnabled(true);
$user->setPassword('');
}
// TODO use http://developers.facebook.com/docs/api/realtime
$user->setFBData($fbdata);
if (count($this->validator->validate($user, 'Facebook'))) {
// TODO: the user was found obviously, but doesnt match our expectations, do something smart
throw new UsernameNotFoundException('The facebook user could not be stored');
}
$this->userManager->updateUser($user);
}
if (empty($user)) {
throw new UsernameNotFoundException('The user is not authenticated on facebook');
}
return $user;
}
public function refreshUser(UserInterface $user)
{
if (!$this->supportsClass(get_class($user)) || !$user->getFacebookId()) {
throw new UnsupportedUserException(sprintf('Instances of "%s" are not supported.', get_class($user)));
}
return $this->loadUserByUsername($user->getFacebookId());
}
}
|
farconada/sfapi
|
src/Fer/UserBundle/Security/User/Provider/FacebookProvider.php
|
PHP
|
mit
| 2,117
|
<?php
/*
* The MIT License
*
* Copyright 2014 Ronny Hildebrandt <ronny.hildebrandt@avorium.de>.
*
* 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.
*/
/**
* This file is used for installation.
*/
require_once './code/App.php';
// Check file permissions
$candeleteinstallsript = Install::canDeleteInstallScript();
$canwritelocalconfig = Install::canWriteLocalConfig();
$canwritemediadir = Install::canWriteMediaDir();
$canwritelocaledir = Install::canWriteLocaleDir();
$isdatabaseavailable = Install::isPostgresAvailable();
$isgdavailable = Install::isGdAvailable();
// Handle postbacks for form
if (filter_input(INPUT_SERVER, 'REQUEST_METHOD') === 'POST') {
// Form was posted back
$databasehost = filter_input(INPUT_POST, 'databasehost');
$databaseusername = filter_input(INPUT_POST, 'databaseusername');
$databasepassword = filter_input(INPUT_POST, 'databasepassword');
$databasename = filter_input(INPUT_POST, 'databasename');
$tableprefix = filter_input(INPUT_POST, 'tableprefix');
$defaultlanguage = filter_input(INPUT_POST, 'defaultlanguage');
$GLOBALS['databasehost'] = $databasehost;
$GLOBALS['databaseusername'] = $databaseusername;
$GLOBALS['databasepassword'] = $databasepassword;
$GLOBALS['databasename'] = $databasename;
$GLOBALS['tableprefix'] = $tableprefix;
$GLOBALS['defaultlanguage'] = $defaultlanguage;
// Check database connection
$databaseerror = !Install::canAccessDatabase();
if ($candeleteinstallsript && $canwritelocalconfig && $canwritemediadir && $canwritelocaledir && $isdatabaseavailable && $isgdavailable && !$databaseerror) {
// Store localconfig file
$installationprogress = Install::createLocalConfig();
// Perform the database installation
$installationprogress .= Install::createAndUpdateTables($tableprefix);
rename('install.php', 'install.php.bak');
$installationprogress .= '<p class="success">'.sprintf(__('The installation is completed. The %s file was renamed to %s for security reasons.'), 'install.php', 'install.php.bak').'</p>';
} else {
$installationprogress = false;
}
} else {
// Single GET page call
if (file_exists('config/localconfig.inc.php')) {
require_once 'config/localconfig.inc.php';
} else {
$databasehost = 'localhost';
$databaseusername = '';
$databasepassword = '';
$databasename = '';
$tableprefix = 'mps_';
$defaultlanguage = 'en';
}
$databaseerror = null;
$installationprogress = false;
}
?><!DOCTYPE html>
<html>
<head>
<title><?php echo __('Install MyPhotoStorage') ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
<link rel="stylesheet" href="static/css/install.css" />
</head>
<body>
<h1><?php echo __('Install MyPhotoStorage') ?></h1>
<form method="post" action="install.php#end" class="simple install">
<h2><?php echo __('File system check') ?></h2>
<div>
<?php if ($candeleteinstallsript) : ?>
<p class="success"><?php echo __('Install script can be deleted.') ?></p>
<?php else : ?>
<p class="error"><?php echo sprintf(__('Install script cannot be deleted. Please make sure that the webserver process has write permissions to the file %s'), Install::$installFileName) ?></p>
<?php endif ?>
<?php if ($canwritelocalconfig) : ?>
<p class="success"><?php echo __('Config file is writeable.') ?></p>
<?php else : ?>
<p class="error"><?php echo sprintf(__('Config file is not writeable. Please make sure that the webserver process has write permissions to the file %s'), Install::$localConfigFileName) ?></p>
<?php endif ?>
<?php if ($canwritemediadir) : ?>
<p class="success"><?php echo __('Media directory is writeable.') ?></p>
<?php else : ?>
<p class="error"><?php echo sprintf(__('Media directory is not writeable. Please make sure that the webserver process has write permissions to the directory %s'), Install::$mediaDir) ?></p>
<?php endif ?>
<?php if ($canwritelocaledir) : ?>
<p class="success"><?php echo __('Locale directory is writeable.') ?></p>
<?php else : ?>
<p class="error"><?php echo sprintf(__('Locale directory is not writeable. Please make sure that the webserver process has write permissions to the directory %s'), Install::$localeDir) ?></p>
<?php endif ?>
</div>
<h2><?php echo __('PHP modules') ?></h2>
<div>
<?php if ($isdatabaseavailable) : ?>
<p class="success"><?php echo __('Database is available.') ?></p>
<?php else : ?>
<p class="error"><?php echo __('The Database PHP extension is not available. Please install it. On Debian you can use "sudo apt-get install php5-mysql"') ?></p>
<?php endif ?>
<?php if ($isgdavailable) : ?>
<p class="success"><?php echo __('GD is available.') ?></p>
<?php else : ?>
<p class="error"><?php echo __('The GD PHP extension is not available. Please install it. On Debian you can use "sudo apt-get install php5-gd"') ?></p>
<?php endif ?>
</div>
<h2><?php echo __('Database connection') ?></h2>
<div>
<?php if ($isdatabaseavailable) : ?>
<label><?php echo __('Database host') ?></label>
<input type="text" name="databasehost" value="<?php echo $databasehost ?>" />
<label><?php echo __('Database username') ?></label>
<input type="text" name="databaseusername" value="<?php echo $databaseusername ?>" />
<label><?php echo __('Database password') ?></label>
<input type="text" name="databasepassword" value="<?php echo $databasepassword ?>" />
<label><?php echo __('Database name') ?></label>
<input type="text" name="databasename" value="<?php echo $databasename ?>" />
<label><?php echo __('Table prefix') ?></label>
<input type="text" name="tableprefix" value="<?php echo $tableprefix ?>" />
<?php endif ?>
<?php if ($databaseerror === true) : ?>
<p class="error"><?php echo __('Cannot access database. Please check the settings above.') ?></p>
<?php elseif ($databaseerror === false) : ?>
<p class="success"><?php echo __('Database connection succeeded.') ?></p>
<?php endif ?>
</div>
<h2><?php echo __('Language') ?></h2>
<div>
<label><?php echo __('Default language') ?></label>
<input type="text" name="defaultlanguage" value="<?php echo $defaultlanguage ?>" />
</div>
<div>
<input type="submit" value="<?php echo __('Install') ?>" />
</div>
<?php if ($installationprogress) : ?>
<h2><?php echo __('Installation progress') ?></h2>
<div>
<?php echo $installationprogress ?>
</div>
<div><a href="account/register.php"><?php echo __('Register a new account') ?></a></div>
<?php endif ?>
</form>
<a name="end"></a>
</body>
</html>
|
avorium/myphotostorage
|
install.php
|
PHP
|
mit
| 7,966
|
package com.mindera.skeletoid.rxbindings.extensions.views.searchview.support;
import android.view.View;
import androidx.appcompat.widget.SearchView;
import com.jakewharton.rxbinding3.InitialValueObservable;
import io.reactivex.Observer;
import io.reactivex.android.MainThreadDisposable;
public class SearchViewFocusChangeObservable extends InitialValueObservable<Boolean> {
private final SearchView view;
public SearchViewFocusChangeObservable(SearchView view) {
this.view = view;
}
@Override
protected void subscribeListener(Observer<? super Boolean> observer) {
Listener listener = new Listener(view, observer);
observer.onSubscribe(listener);
view.setOnQueryTextFocusChangeListener(listener);
}
@Override
protected Boolean getInitialValue() {
return view.hasFocus();
}
static final class Listener extends MainThreadDisposable
implements SearchView.OnFocusChangeListener {
private final SearchView view;
private final Observer<? super Boolean> observer;
Listener(SearchView view, Observer<? super Boolean> observer) {
this.view = view;
this.observer = observer;
}
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (!isDisposed()) {
observer.onNext(hasFocus);
}
}
@Override
protected void onDispose() {
view.setOnFocusChangeListener(null);
}
}
}
|
Mindera/skeletoid
|
rxbindings/src/main/java/com/mindera/skeletoid/rxbindings/extensions/views/searchview/support/SearchViewFocusChangeObservable.java
|
Java
|
mit
| 1,529
|
import Ember from "ember";
import ENV from '../../config/environment';
export default Ember.Route.extend({
model: function() {
return this.store.find('clip');
},
afterModel: function(){
this.metaTags.setTags({
title: "Clips • " + ENV.name,
description: ENV.description,
url: this.get('router.url')
});
}
});
|
APMG/audio-backpack
|
app/routes/clips/index.js
|
JavaScript
|
mit
| 387
|
'use strict';
var _ = require('lodash');
var desireds = require('./desireds');
var runner = require('./runconfig');
var gruntConfig = {
env: {
options:{
}
},
simplemocha: {
ltr: {
options: {
timeout: 60000,
captureFile: 'reports.xml',
reporter: 'spec'
},
src: ['test/sauce/sanity/studentCreat*.js','test/sauce/sanity/studentAssign*.js']
}
},
jshint: {
options: {
jshintrc: '.jshintrc'
},
gruntfile: {
src: 'Gruntfile.js'
},
test: {
options: {
jshintrc: 'test/.jshintrc'
},
src: ['test/**/*.js']
}
},
concurrent: {
'test-sauce': []// dynamically filled
},
watch: {
gruntfile: {
files: '<%= jshint.gruntfile.src %>',
tasks: ['jshint:gruntfile']
},
test: {
files: '<%= jshint.test.src %>',
tasks: ['jshint:test']
}
},
exec: {
generate_report: {
cmd: function(firstName, lastName) {
return 'xmljade -o reportjade.html report.jade jadexml.xml';
}
}
}
};
//console.log(gruntConfig);
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig(gruntConfig);
// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-env');
grunt.loadNpmTasks('grunt-simple-mocha');
grunt.loadNpmTasks('grunt-concurrent');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-exec');
var target = grunt.option('target') || 'staging';
var product = grunt.option('product') || 'default';
var course = grunt.option('course') || 'default';
var student_userid = grunt.option('student_userid') || 'default';
var instructor_userid = grunt.option('instructor_userid') || 'default';
var coursekey = grunt.option('coursekey') || 'default';
var cs = grunt.option('cs') || 'no';
var rc = grunt.option('rc') || 'no';
var sel_grid = grunt.option('grid') || 'http://127.0.0.1:4444/wd/hub';
var browser = grunt.option('browser') || 'chrome';
gruntConfig.env.common = {
RUNNER: JSON.stringify(runner),
RUN_ENV: JSON.stringify(target),
RUN_IN_GRID: JSON.stringify(sel_grid),
RUN_IN_BROWSER:JSON.stringify(browser),
RUN_FOR_PRODUCT: JSON.stringify(product),
RUN_FOR_COURSE: JSON.stringify(course),
RUN_FOR_STUDENT_USERID: JSON.stringify(student_userid),
RUN_FOR_INSTRUCTOR_USERID: JSON.stringify(instructor_userid),
RUN_FOR_COURSEKEY:JSON.stringify(coursekey),
CREATE_STUDENT: JSON.stringify(cs),
REGISTER_COURSE:JSON.stringify(rc)
};
grunt.registerTask('default', ['env:common','simplemocha:ltr']);
};
|
Devanshu1991/4LTRProject
|
GF_CreateStudentAndRunStudentSubmission.js
|
JavaScript
|
mit
| 2,979
|
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>marked.js test</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.3.0/styles/default.min.css">
<style>
pre {
background-color: #fff;
padding: 0;
border: none;
}
</style>
</head>
<body>
<div class="container">
<h1>marked.jsのテスト</h1>
<div class="row">
<div class="col-xs-6">
<textarea id="editor" class="form-control" rows="300"></textarea>
</div>
<div class="col-xs-6">
<pre><code id="result"></code></pre>
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.2.0/highlight.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/0.3.5/marked.min.js"></script>
<script>
$(function() {
marked.setOptions({
langPrefix: ''
});
$('#editor').keyup(function() {
var src = $(this).val();
var html = marked(src);
// idを取り除く
html = html.replace(/ id=\".*\"/g,'');
$('#result').html(html);
// ハイライト
$('pre code#result').each(function(i, block) {
hljs.highlightBlock(block);
});
});
// textarea自動調整
$("#editor").height(100);//init
$("#editor").css("lineHeight","20px");//init
$("#editor").on("input",function(evt){
if(evt.target.scrollHeight > evt.target.offsetHeight){
$(evt.target).height(evt.target.scrollHeight);
}else{
var lineHeight = Number($(evt.target).css("lineHeight").split("px")[0]);
while (true){
$(evt.target).height($(evt.target).height() - lineHeight);
if(evt.target.scrollHeight > evt.target.offsetHeight){
$(evt.target).height(evt.target.scrollHeight);
break;
}
}
}
});
});
</script>
</body>
</html>
|
okutani-t/jQuery-code
|
marked.js/index.html
|
HTML
|
mit
| 2,330
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>prfx: 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.7.2 / prfx - 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>
prfx
<small>
8.7.0
<span class="label label-success">29 s</span>
</small>
</h1>
<p><em><script>document.write(moment("2020-08-29 10:22:14 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2020-08-29 10:22:14 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.12 Preprocessor-pretty-printer of OCaml
conf-findutils 1 Virtual package relying on findutils
conf-m4 1 Virtual package relying on m4
coq 8.7.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
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/prfx"
license: "Unknown"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/Prfx"]
depends: [
"ocaml"
"coq" {>= "8.7" & < "8.8~"}
]
tags: [ "keyword: first-order logic" "keyword: natural deduction" "keyword: reflection" "keyword: proof terms" "keyword: de bruijn indices" "keyword: permutative conversions" "category: Mathematics/Logic/Foundations" "date: 15 April 2005" ]
authors: [ "Dimitri Hendriks <hendriks@cs.ru.nl> [http://www.cs.ru.nl/~hendriks/]" ]
bug-reports: "https://github.com/coq-contribs/prfx/issues"
dev-repo: "git+https://github.com/coq-contribs/prfx.git"
synopsis: "Proof Reflection in Coq"
description: """
http://www.cs.ru.nl/~hendriks/coq/prfx/
A formalisation of natural deduction for first-order
logic with explicit proof terms. Read README."""
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/prfx/archive/v8.7.0.tar.gz"
checksum: "md5=7afc919cb8aece8f2cd7adb9b974421f"
}
</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-prfx.8.7.0 coq.8.7.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-prfx.8.7.0 coq.8.7.2</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>6 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-prfx.8.7.0 coq.8.7.2</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>29 s</dd>
</dl>
<h2>Installation size</h2>
<p>Total: 2 M</p>
<ul>
<li>146 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/inv_lems.vo</code></li>
<li>74 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/check_sound.vo</code></li>
<li>62 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/subj_red.vo</code></li>
<li>61 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/ND_subst_lems.vo</code></li>
<li>57 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/lift_lems.vo</code></li>
<li>54 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/objects.vo</code></li>
<li>54 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/subst_lems.vo</code></li>
<li>48 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/red.vo</code></li>
<li>47 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/ND_lift_lems.vo</code></li>
<li>45 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/eval_lift_lems.vo</code></li>
<li>44 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/indices.vo</code></li>
<li>43 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/ND_exch.vo</code></li>
<li>41 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/ND_contr.vo</code></li>
<li>40 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/ND.vo</code></li>
<li>37 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/eval_subst_lems.vo</code></li>
<li>35 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/list.vo</code></li>
<li>34 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/check.vo</code></li>
<li>33 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/eval.vo</code></li>
<li>33 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/subst.vo</code></li>
<li>31 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/ND_subst_lems.glob</code></li>
<li>31 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/ND_sound.vo</code></li>
<li>30 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/lift.vo</code></li>
<li>28 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/lift_lems.glob</code></li>
<li>28 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/exch.vo</code></li>
<li>28 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/subst_lems.glob</code></li>
<li>26 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/check_sound.glob</code></li>
<li>26 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/ND_unique_types.vo</code></li>
<li>26 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/prfx.vo</code></li>
<li>26 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/objects.glob</code></li>
<li>25 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/contr.vo</code></li>
<li>23 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/subj_red.glob</code></li>
<li>23 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/ND_lift_lems.glob</code></li>
<li>22 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/eval_lift_lems.glob</code></li>
<li>20 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/indices.glob</code></li>
<li>20 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/red.glob</code></li>
<li>17 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/list.glob</code></li>
<li>16 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/inv_lems.glob</code></li>
<li>16 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/eval_subst_lems.glob</code></li>
<li>15 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/ND_exch.glob</code></li>
<li>14 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/ND_contr.glob</code></li>
<li>12 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/subj_red.v</code></li>
<li>11 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/check_sound.v</code></li>
<li>11 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/ND.glob</code></li>
<li>10 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/ND_subst_lems.v</code></li>
<li>9 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/lift_lems.v</code></li>
<li>8 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/subst.glob</code></li>
<li>8 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/subst_lems.v</code></li>
<li>7 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/eval_lift_lems.v</code></li>
<li>7 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/ND_lift_lems.v</code></li>
<li>6 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/objects.v</code></li>
<li>6 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/eval.glob</code></li>
<li>6 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/check.glob</code></li>
<li>6 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/indices.v</code></li>
<li>5 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/list.v</code></li>
<li>5 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/red.v</code></li>
<li>5 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/ND_sound.glob</code></li>
<li>4 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/lift.glob</code></li>
<li>4 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/ND_exch.v</code></li>
<li>4 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/ND_contr.v</code></li>
<li>4 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/inv_lems.v</code></li>
<li>4 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/eval_subst_lems.v</code></li>
<li>4 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/nat_eqb.vo</code></li>
<li>3 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/exch.glob</code></li>
<li>3 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/subst.v</code></li>
<li>2 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/ND_sound.v</code></li>
<li>2 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/ND.v</code></li>
<li>2 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/check.v</code></li>
<li>2 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/eval.v</code></li>
<li>2 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/ND_unique_types.glob</code></li>
<li>1 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/lift.v</code></li>
<li>1 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/exch.v</code></li>
<li>1 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/contr.glob</code></li>
<li>1 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/nat_eqb.glob</code></li>
<li>1 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/nat_eqb.v</code></li>
<li>1 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/ND_unique_types.v</code></li>
<li>1 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/contr.v</code></li>
<li>1 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/prfx.glob</code></li>
<li>1 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/Prfx/prfx.v</code></li>
</ul>
<h2>Uninstall</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq-prfx.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://github.com/coq-bench">GitHub</a>. © Guillaume Claret.</small>
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
|
coq-bench/coq-bench.github.io
|
clean/Linux-x86_64-4.05.0-2.0.6/released/8.7.2/prfx/8.7.0.html
|
HTML
|
mit
| 15,377
|
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="PlotRenderer.cs" company="OxyPlot">
// The MIT License (MIT)
//
// Copyright (c) 2012 Oystein Bjorke
//
// 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.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------
using System;
namespace OxyPlot
{
public class PlotRenderer
{
protected readonly PlotModel plot;
protected readonly IRenderContext rc;
public PlotRenderer(IRenderContext rc, PlotModel p)
{
this.rc = rc;
plot = p;
}
public void RenderTitle(string title, string subtitle)
{
OxySize size1 = rc.MeasureText(title, plot.TitleFont, plot.TitleFontSize, plot.TitleFontWeight);
OxySize size2 = rc.MeasureText(subtitle, plot.TitleFont, plot.TitleFontSize, plot.TitleFontWeight);
double height = size1.Height + size2.Height;
double dy = (plot.AxisMargins.Top - height) * 0.5;
double dx = (plot.Bounds.Left + plot.Bounds.Right) * 0.5;
if (!String.IsNullOrEmpty(title))
rc.DrawText(
new ScreenPoint(dx, dy), title, plot.TextColor,
plot.TitleFont, plot.TitleFontSize, plot.TitleFontWeight,
0,
HorizontalTextAlign.Center, VerticalTextAlign.Top);
if (!String.IsNullOrEmpty(subtitle))
rc.DrawText(new ScreenPoint(dx, dy + size1.Height), subtitle, plot.TextColor,
plot.TitleFont, plot.SubtitleFontSize, plot.SubtitleFontWeight, 0,
HorizontalTextAlign.Center, VerticalTextAlign.Top);
}
public void RenderRect(OxyRect bounds, OxyColor fill, OxyColor borderColor, double borderThickness)
{
var border = new[]
{
new ScreenPoint(bounds.Left, bounds.Top), new ScreenPoint(bounds.Right, bounds.Top),
new ScreenPoint(bounds.Right, bounds.Bottom), new ScreenPoint(bounds.Left, bounds.Bottom),
new ScreenPoint(bounds.Left, bounds.Top)
};
rc.DrawPolygon(border, fill, borderColor, borderThickness, null, true);
}
private static readonly double LEGEND_PADDING = 8;
public void RenderLegends()
{
double maxWidth = 0;
double maxHeight = 0;
double totalHeight = 0;
// Measure
foreach (var s in plot.Series)
{
if (String.IsNullOrEmpty(s.Title))
continue;
var oxySize = rc.MeasureText(s.Title, plot.LegendFont, plot.LegendFontSize);
if (oxySize.Width > maxWidth) maxWidth = oxySize.Width;
if (oxySize.Height > maxHeight) maxHeight = oxySize.Height;
totalHeight += oxySize.Height;
}
double lineLength = plot.LegendSymbolLength;
// Arrange
double x0 = double.NaN, x1 = double.NaN, y0 = double.NaN;
// padding padding
// lineLength
// y0 -----o---- seriesName
// x0 x1
double sign = 1;
if (plot.IsLegendOutsidePlotArea)
sign = -1;
// Horizontal alignment
HorizontalTextAlign ha = HorizontalTextAlign.Left;
switch (plot.LegendPosition)
{
case LegendPosition.TopRight:
case LegendPosition.BottomRight:
x0 = plot.Bounds.Right - LEGEND_PADDING * sign;
x1 = x0 - lineLength * sign - LEGEND_PADDING * sign;
ha = sign == 1 ? HorizontalTextAlign.Right : HorizontalTextAlign.Left;
break;
case LegendPosition.TopLeft:
case LegendPosition.BottomLeft:
x0 = plot.Bounds.Left + LEGEND_PADDING * sign;
x1 = x0 + lineLength * sign + LEGEND_PADDING * sign;
ha = sign == 1 ? HorizontalTextAlign.Left : HorizontalTextAlign.Right;
break;
}
// Vertical alignment
VerticalTextAlign va = VerticalTextAlign.Middle;
switch (plot.LegendPosition)
{
case LegendPosition.TopRight:
case LegendPosition.TopLeft:
y0 = plot.Bounds.Top + LEGEND_PADDING + maxHeight / 2;
break;
case LegendPosition.BottomRight:
case LegendPosition.BottomLeft:
y0 = plot.Bounds.Bottom - maxHeight + LEGEND_PADDING;
break;
}
foreach (var s in plot.Series)
{
if (String.IsNullOrEmpty(s.Title))
continue;
rc.DrawText(new ScreenPoint(x1, y0),
s.Title, plot.TextColor,
plot.LegendFont, plot.LegendFontSize, 500, 0,
ha, va);
OxyRect rect = new OxyRect(x0 - lineLength, y0 - maxHeight / 2, lineLength, maxHeight);
if (ha == HorizontalTextAlign.Left)
rect = new OxyRect(x0, y0 - maxHeight / 2, lineLength, maxHeight);
s.RenderLegend(rc, rect);
if (plot.LegendPosition == LegendPosition.TopLeft || plot.LegendPosition == LegendPosition.TopRight)
y0 += maxHeight;
else
y0 -= maxHeight;
}
}
}
}
|
ylatuya/oxyplot
|
Source/OxyPlot/Render/PlotRenderer.cs
|
C#
|
mit
| 7,113
|
Network interfaces manager library
==================================
*libifman* is a C++ library for getting information about network
interfaces in a linux system via *netlink* socket family
Details of a building process are available at `CMakeLists.txt` files
Requirements
============
1. CMake for build library and a *watcher* example
2. Some C++11 functionality is used, so C++11 compliant compiler required.
3. Python 2.6+ for running tests
Tested with:
- CentOS 6.6: gcc 4.8.2, kernel `2.6.32-504.el6.x86_64`, cmake 2.8, python
2.6.6
- Arch Linux: gcc 4.9.2, kernel `3.17.4-1-ck`, cmake 3.0.2., python 2.7.8
Building
========
To build a library and a *watcher* example, cd into a `build` folder, then run
```
% cmake ..
% make
```
Running tests
=============
Build a project, then cd into a `test` folder. Adjust `test_device_name` and
commands for add/delete interface: `add_interface_cmd` and
`remove_interface_cmd`. For example, for CentOS 6.6 `add_interface_cmd`
should be changed to:
```python
add_interface_cmd = ["sudo", "/usr/sbin/tunctl", "-t", test_device_name]
```
Then run
```
% python2 test-monitor.py
```
If everething is OK, an ouptut will be:
```
Comparing devices lists OK
New device detected OK
Detected a 'gone' device OK
```
**Notice**: The script internally runs a `sudo` command to add/remove a net interface
Usage
=====
Build a project, then cd into a `build/watcher` folder, then run
```
% ./watcher
```
It will run until received SIGTERM or SIGINT signal, printing every 5 seconds a
list of net interfaces in a system, and an interface information when kernel
send messages about adding new or removing an existent net interface.
You can additionally supply next command line arguments:
|Argument |Action |
|-----------|------------------------------------------------------|
|--list-once|Print a list of interfaces only once |
|--no-watch |Don't receive kernel messages about interfaces updates|
|--no-list |Don't print a list of interfaces |
- When run with `--no-watch` and `--no-list` simultaneously, program will exit
immediately
- When run with `--no-watch` and `--list-once` simultaneously, program will exit
after printing a list of network interfaces
|
mexus/netinterfaces-manager
|
README.md
|
Markdown
|
mit
| 2,308
|
version https://git-lfs.github.com/spec/v1
oid sha256:d99fc51072a5fe30289f7dc885457700f9b08ae17fe81d034245aba73c408033
size 34706
|
yogeshsaroya/new-cdnjs
|
ajax/libs/yui/3.17.1/model/model.js
|
JavaScript
|
mit
| 130
|
<?php
namespace Dreamhood\CmsBundle\DependencyInjection;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\DependencyInjection\Loader;
/**
* This is the class that loads and manages your bundle configuration
*
* To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html}
*/
class DreamhoodCmsExtension extends Extension
{
/**
* {@inheritDoc}
*/
public function load(array $configs, ContainerBuilder $container)
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.yml');
$loader->load('services_for_sonata_admin.yml');
}
}
|
chanakasan/cms-sandbox
|
src/Dreamhood/CmsBundle/DependencyInjection/DreamhoodCmsExtension.php
|
PHP
|
mit
| 939
|
<?php
namespace App\AWS;
use Aws\S3\S3Client;
use Psr\Log\LoggerInterface;
class S3
{
private $s3;
private $bucketName;
private $baseUrl;
private $logger;
/**
* S3 constructor.
*
* @param S3Client $s3
* @param $baseUrl
* @param $bucketName
* @param LoggerInterface $loggerInterface
*/
public function __construct(S3Client $s3, $baseUrl, $bucketName, LoggerInterface $loggerInterface)
{
$this->bucketName = $bucketName;
$this->baseUrl = $baseUrl;
$this->s3 = $s3;
$this->logger = $loggerInterface;
}
/**
* @param string $path
* @param string $filename
* @param array $headers
*
* @return mixed
*
* @throws \Exception
*/
public function upload($path, $filename, $headers = [])
{
try {
$config = [
'Bucket' => $this->bucketName,
'Key' => trim($filename, '/'),
'Body' => fopen($path, 'r'),
'ACL' => 'public-read'
];
foreach ($headers as $key => $header) {
$config[$key] = $header;
}
$result = $this->s3->putObject($config);
return $result['ObjectURL'];
} catch (\Exception $e) {
$this->logger->error('Failed to upload file', ['e' => $e]);
throw $e;
}
}
/**
* @param string $filename
*/
public function delete($filename)
{
$this->s3->deleteObject([
'Bucket' => $this->bucketName,
'Key' => trim($filename, '/'),
]);
}
/**
* @param array $parameters
*
* @return \Aws\ResultPaginator
*/
public function getPaginator(array $parameters)
{
return $this->s3->getPaginator('ListObjectsV2', array_merge(['Bucket' => $this->bucketName], $parameters));
}
/**
* @param array $parameters
*
* @return \Iterator
*/
public function getIterator(array $parameters)
{
return $this->s3->getIterator('ListObjectsV2', array_merge(['Bucket' => $this->bucketName], $parameters));
}
/**
* @param array $parameters
*
* @return \Aws\Result
*/
public function getListObject(array $parameters)
{
return $this->s3->listObjectsV2(array_merge(['Bucket' => $this->bucketName], $parameters));
}
/**
* @param string $key
*
* @return string
*/
public function getObjectByKey($key)
{
$result = $this->s3->getObject([
'Bucket' => $this->bucketName,
'Key' => $key,
]);
return (string) $result['Body'];
}
}
|
ekreative/apps-server
|
src/AWS/S3.php
|
PHP
|
mit
| 2,714
|
html,
body
{
width: 100%;
height: 100%;
margin-right: 0;
margin-left: 0;
padding: 0;
}
body
{
font-family: 'Open Sans', sans-serif;
font-weight: 300;
}
a
{
text-decoration: none;
color: #252525;
}
a:hover,
a:focus
{
text-decoration: none;
color: #626262;
outline: 0;
}
img
{
-moz-user-select: none;
/*-webkit-user-select: none;*/
-ms-user-select: none;
user-select: none;
/*-webkit-user-drag: none;*/
user-drag: none;
}
.valign
{
position: relative;
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
}
.elementvalign
{
vertical-align: middle;
}
section
{
position: relative;
}
.container
{
position: relative;
}
section .container
{
padding-top: 200px;
padding-bottom: 200px;
}
.row
{
position: relative;
z-index: 3;
}
.separator
{
width: 170px;
max-width: 170px;
margin-top: 120px;
margin-bottom: 100px;
}
.separator.small
{
width: 100px;
max-width: 100px;
margin-top: 25px;
margin-bottom: 25px;
}
.lineSeparator
{
width: 60px;
max-width: 60px;
margin-top: 30px;
margin-bottom: 30px;
}
.preloaderLogo
{
width: 15%;
min-width: 200px;
max-width: 300px;
}
.black-overlay
{
position: absolute;
z-index: 0;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: -moz-radial-gradient(center, ellipse cover, rgba(0,0,0,0) 0%, rgba(0,0,0,.8) 100%); /* FF3.6+ */
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,rgba(0,0,0,0)), color-stop(100%,rgba(0,0,0,.8))); /* Chrome,Safari4+ */
background: -webkit-radial-gradient(center, ellipse cover, rgba(0,0,0,0) 0%,rgba(0,0,0,.8) 100%); /* Chrome10+,Safari5.1+ */
background: -o-radial-gradient(center, ellipse cover, rgba(0,0,0,0) 0%,rgba(0,0,0,.8) 100%); /* Opera 12+ */
background: -ms-radial-gradient(center, ellipse cover, rgba(0,0,0,0) 0%,rgba(0,0,0,.8) 100%); /* IE10+ */
background: radial-gradient(ellipse at center, rgba(0,0,0,0) 0%,rgba(0,0,0,.8) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#a6000000',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
}
.plainblack-overlay
{
position: absolute;
z-index: 0;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: .6;
background: black;
}
.plainwhite-overlay
{
position: absolute;
z-index: 0;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: .6;
background: white;
}
.sectionIntro h2 span
{
padding: 25px 50px;
border: solid 10px #282828;
}
.sectionIntro p
{
margin-top: 100px;
}
.noscroll
{
overflow: hidden;
}
.container
{
z-index: 2;
overflow: hidden;
}
.PositionRelative
{
position: relative;
}
.OverflowHidden
{
overflow: hidden;
}
.Margin30
{
margin-top: 30px;
margin-bottom: 30px;
}
.WhiteBackground
{
background: white;
}
.SoftGrayBackground
{
background: #f6f6f6;
}
.DarkGreyBackground
{
background: #333;
}
.PaddingVertical30
{
padding-top: 30px !important;
padding-bottom: 30px !important;
}
.PaddingHorizontal40
{
padding-right: 40px;
padding-left: 40px;
}
.PaddingHorizontal80
{
padding-right: 80px;
padding-left: 80px;
}
.PaddingVertical45
{
padding-top: 45px;
padding-bottom: 45px;
}
.PaddingTop30
{
padding-top: 30px;
}
.PaddingTop60
{
padding-top: 60px;
}
/*parallax letters*/
.parallaxLetter
{
font-size: 300px;
position: absolute;
z-index: 1;
width: 200px;
height: 300px;
color: #f9f9f9;
}
.letter1
{
right: 20%;
}
.letter2
{
left: 20%;
}
.letter3
{
right: 15%;
}
.letter4
{
left: 10%;
}
.blue
{
color: #1c7f7f;
}
/*buttons*/
.Underlinelink
{
font-family: 'Montserrat', sans-serif;
font-size: 12px;
font-weight: 700;
line-height: 45px;
text-decoration: underline;
}
.btn
{
font-family: 'Montserrat', sans-serif;
font-size: 12px;
font-weight: 700;
line-height: 40px;
position: relative;
padding: 0 40px;
-webkit-transition: all .5s ease .25s;
transition: all .5s ease .25s;
letter-spacing: .2em;
text-transform: uppercase;
border: 0;
border-top: 2px solid transparent;
border-bottom: 2px solid transparent;
border-radius: 0;
outline: 1px solid transparent;
background: transparent;
}
.btn-default
{
display: inline-block;
color: white;
}
.btn-default:hover
{
border-color: white;
}
.btn:after,
.btn:before
{
position: absolute;
top: 0;
width: 2px;
height: 100%;
content: '';
-webkit-transition: all .2s ease 0s;
transition: all .2s ease 0s;
background: white;
}
.btn:before
{
left: -8px;
}
.btn:hover:before
{
left: 0;
}
.btn:after
{
right: -8px;
}
.btn:hover:after
{
right: 0;
}
.btn-default:hover,
.btn-default:focus,
.btn-default:active,
.btn-default.active,
.open > .dropdown-toggle.btn-default
{
color: #333;
border-color: white;
background-color: #e6e6e6;
}
.btn:active,
.btn.active
{
outline: 0;
background-image: none;
-webkit-box-shadow: none;
box-shadow: none;
}
.btn:focus,
.btn:active:focus,
.btn.active:focus
{
outline: 0;
}
.btn-black
{
color: #282828;
}
.btn-black:after,
.btn-black:before
{
background: #282828;
}
.btn-black:hover
{
color: white;
border-color: #282828;
background-color: #282828;
}
/*NAVBAR */
.navbar-default
{
padding: 30px;
padding-right: 50px;
padding-left: 50px;
-webkit-transition: all .5s ease .25s;
transition: all .5s ease .25s;
border-color: transparent;
background-color: transparent;
}
.NavbarEcommerceBottomWrapper
{
-webkit-transition: height .5s ease .25s;
transition: height .5s ease .25s;
}
.navbar-default .navbar-brand
{
font-family: 'Montserrat', sans-serif;
font-weight: 700;
text-transform: uppercase;
color: white;
}
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus
{
color: white;
background-color: transparent;
}
.affix
{
padding-top: 10px;
padding-bottom: 10px;
background-color: #282828;
}
.navbar-default .navbar-toggle .icon-bar
{
background-color: white;
}
.navbar-default .navbar-toggle
{
border-color: transparent;
}
.navbar-default .navbar-toggle:hover,
.navbar-default .navbar-toggle:focus
{
background-color: transparent;
}
.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .open > a:hover,
.navbar-default .navbar-nav > .open > a:focus
{
color: white;
background-color: transparent;
}
.navbar-nav > li > a
{
font-size: 10px;
font-weight: 900;
position: relative;
letter-spacing: 3px;
text-transform: uppercase;
color: #d5d5d5;
}
.dropdown-menu > li > a
{
font-family: 'Montserrat', sans-serif;
font-size: 10px;
font-weight: 700;
line-height: 1.42857143;
display: block;
clear: both;
padding: 3px 20px;
padding-top: 10px;
padding-bottom: 10px;
white-space: nowrap;
letter-spacing: 1px;
text-transform: uppercase;
color: white;
}
.dropdown-menu
{
font-size: 10px;
position: absolute;
z-index: 1000;
top: 100%;
left: 0;
float: left;
min-width: 160px;
margin: 3px 0 0;
padding: 5px 0;
list-style: none;
text-align: left;
border: 0;
background-color: #323232;
background-clip: padding-box;
box-shadow: none;
}
.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus
{
color: #d5d5d5;
}
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus
{
color: #282828;
background-color: #d5d5d5;
}
.dropdown-submenu
{
position: relative;
}
.dropdown-submenu > .dropdown-menu
{
top: 0;
left: 100%;
margin-top: -6px;
margin-left: -1px;
-webkit-border-radius: 0 6px 6px 6px;
-moz-border-radius: 0 6px 6px 6px;
border-radius: 0 6px 6px 6px;
}
.dropdown-submenu:hover > .dropdown-menu
{
display: block;
}
.dropdown-submenu > a:after
{
display: block;
float: right;
width: 0;
height: 0;
margin-top: 5px;
margin-right: -10px;
content: ' ';
border-width: 5px 0 5px 5px;
border-style: solid;
border-color: transparent;
border-left-color: #ccc;
}
.dropdown-submenu:hover > a:after
{
border-left-color: #fff;
}
.dropdown-submenu.pull-left
{
float: none;
}.dropdown-submenu.pull-left > .dropdown-menu
{
left: -100%;
margin-left: 10px;
-webkit-border-radius: 6px 0 6px 6px;
-moz-border-radius: 6px 0 6px 6px;
border-radius: 6px 0 6px 6px;
}
@media (max-width: 768px)
{
.dropdown-submenu li a
{
text-align: center;
}
}
/*TEXT STYLES*/
h1,
h2,
h3,
h4,
h5,
h6
{
font-family: 'Montserrat', sans-serif;
font-weight: 700;
}
.lato
{
font-family: 'Lato',sans-serif;
font-weight: 100;
}
.lato-normal
{
font-family: 'Lato',sans-serif;
font-weight: 400;
}
h1
{
font-size: 50px;
letter-spacing: 20px;
text-transform: uppercase;
}
h2
{
font-size: 30px;
letter-spacing: 15px;
text-transform: uppercase;
}
h3
{
font-size: 24px;
letter-spacing: 10px;
text-transform: uppercase;
}
h4
{
font-size: 20px;
letter-spacing: 8px;
text-transform: uppercase;
}
h5
{
font-size: 14px;
letter-spacing: 3px;
text-transform: uppercase;
}
h6
{
font-size: 12px;
letter-spacing: 0;
text-transform: uppercase;
}
p
{
font-family: 'Open Sans', sans-serif;
font-size: 14px;
font-weight: 300;
line-height: 24px;
color: #4c4c4c;
}
p.bold
{
font-weight: 700;
}
.WhiteText
{
color: white;
}
.BlackText
{
color: black !important;
}
.GreyText
{
color: #aaa;
}
.NoLetterSpacing
{
letter-spacing: 0;
}
.NoTransform
{
text-transform: none;
}
/*<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->*/
/*<!--Intro -->*/
/*<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->*/
#intro h1,
#intro p
{
color: white;
}
.introLogo
{
position: relative;
width: 160px;
margin-bottom: 20px;
}
#intro .separator
{
margin-top: 30px;
margin-bottom: 30px;
}
.IntroSeparator
{
width: 120px;
}
#intro a
{
margin-top: 20px;
}
.AgencyIntro .container
{
padding-top: 160px;
padding-bottom: 160px;
}
.PlayTrigger
{
margin-top: 40px;
cursor: pointer;
}
.PlayTrigger svg path
{
fill: white;
}
.PlayTrigger svg:hover path
{
fill: #aaa;
}
/*<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->*/
/*<!--Text Separator -->*/
/*<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->*/
#text-separator .container-fluid .col-md-6
{
padding-left: 50px;
}
#text-separator,
#text-separator-clients,
#text-separator-testimonials,
#text-separator-timers
{
overflow: hidden;
padding-top: 50px;
padding-bottom: 50px;
padding-left: 15px;
background-color: #1d1d1d;
}
#text-separator h2,
#text-separator-clients h2,
#text-separator-testimonials h2
{
position: relative;
z-index: 100;
color: white;
}
#text-separator p,
#text-separator-clients p,
#text-separator-testimonials p
{
position: relative;
z-index: 100;
color: #e7e7e7;
}
.textSepLogo
{
position: absolute;
z-index: 1;
top: 0;
right: 0;
}
.timerWrapper
{
padding: 20px;
color: white;
}
.timerWrapper h1
{
letter-spacing: 0;
}
.timerWrapper p
{
color: #d5d5d5;
}
/*<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->*/
/*<!--Welcome Separator -->*/
/*<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->*/
#welcome-separator
{
background-color: white;
}
#welcome-separator .col-md-7,
#welcome-separator .container-fluid
{
padding: 0;
}
#welcome-separator .separator
{
width: 120px;
max-width: 120px;
margin-top: 40px;
margin-bottom: 40px;
}
#welcome-separator .image
{
overflow: hidden;
height: 500px;
}
#welcome-separator .image img
{
height: 100%;
}
.whiteOverlay
{
position: absolute;
z-index: 4;
right: 0;
bottom: 0;
width: 500px;
height: 500px;
background: transparent url('/img/gradient.png') bottom right repeat-y;
-webkit-background-size: 100% 100%;
-moz-background-size: 100% 100%;
-o-background-size: 100% 100%;
background-size: 100% 100%;
}
.welcomeLogo
{
width: 100px;
}
.textOverlay
{
z-index: 6;
margin-left: -200px;
padding-top: 100px;
padding-bottom: 100px;
}
/*<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->*/
/*<!--About -->*/
/*<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->*/
#about
{
background-color: white;
}
#about2
{
background-color: #007f7f;
}
#about2 p
{
color: #e5e5e5;
}
#about .container
{
padding-top: 200px;
}
.aboutIconWrapper
{
position: absolute;
}
.aboutText
{
position: relative;
padding-left: 50px;
}
.aboutIconWrapper
{
font-size: 80px;
z-index: 0;
color: #f5f5f5;
}
.aboutItem
{
margin-top: 30px;
margin-bottom: 30px;
}
.progress-bar
{
-webkit-transition: width .6s ease;
-o-transition: width .6s ease;
transition: width .6s ease;
color: #fff;
background-color: black;
-webkit-box-shadow: none;
box-shadow: none;
}
.progress
{
overflow: hidden;
height: 16px;
margin-bottom: 20px;
border: 3px solid black;
border-radius: 0;
background-color: white;
-webkit-box-shadow: none;
box-shadow: none;
}
.faqIntro
{
position: relative;
z-index: 2;
background: url('/img/faqIntro.jpg') no-repeat center center;
background-repeat: repeat, repeat, repeat ,no-repeat;
background-position: 50% 0, 50% 0, 50% 0, 50% 0;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
/*<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->*/
/*<!--Portfolio -->*/
/*<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->*/
.portfolioIntro
{
height: 300px;
}
.portfolioIntro h2
{
margin-top: 0;
padding-top: 120px;
}
.portfolioIntro h2 span
{
padding: 25px 50px;
color: #cecece;
border: solid 10px #cecece;
}
.portfolioFilters
{
height: 150px;
background-color: #1d1d1d;
}
.grayBackground
{
background-color: #f8f8f8;
}
.tiledBackground
{
background: url('/img/tiled.jpg') repeat;
}
.heightItem
{
padding: 45px;
}
#filters
{
padding-top: 30px;
}
#filters .btn
{
margin: 20px;
}
#owl-item .owl-buttons
{
position: relative;
display: inline-block;
}
#owl-item .owl-prev,
.owl-next
{
display: inline-block;
}
.itemNav
{
margin: 10px;
padding: 5px 10px;
color: white;
background: #282828;
}
#owl-item .owl-controls
{
margin-top: -70px;
text-align: center;
}
.portfolioIntro
{
position: relative;
z-index: 2;
background: url('/img/portfolioIntro.jpg') no-repeat center center;
background-repeat: repeat, repeat, repeat ,no-repeat;
background-position: 50% 0, 50% 0, 50% 0, 50% 0;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
#portfolio .black-overlay
{
background: -moz-radial-gradient(center, ellipse cover, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 100%); /* FF3.6+ */
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,rgba(0,0,0,0)), color-stop(100%,rgba(0,0,0,1))); /* Chrome,Safari4+ */
background: -webkit-radial-gradient(center, ellipse cover, rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-radial-gradient(center, ellipse cover, rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%); /* Opera 12+ */
background: -ms-radial-gradient(center, ellipse cover, rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%); /* IE10+ */
background: radial-gradient(ellipse at center, rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#a6000000',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
}
#portfolio .container
{
padding-top: 100px;
padding-bottom: 100px;
}
.gallery
{
max-width: 100%;
}
.gallery-ecommerce
{
max-width: 100%;
}
.gallery-inner .caption
{
position: absolute;
top: 0;
width: 100%;
height: 100%;
-webkit-transition: all 1s ease-in-out;
opacity: 0;
background: rgba(40, 40, 40, .70);
}
.gallery-inner:hover .caption
{
opacity: 1;
}
.gallery-inner .caption-heading
{
width: 100%;
height: 120px;
}
.caption-heading .separator
{
width: 100px;
max-width: 100px;
margin-top: 20px;
margin-bottom: 20px;
}
.caption-heading .btn-default
{
font-size: 10px;
line-height: 30px;
margin-top: 8px;
}
.gallery-inner .caption-heading,
.gallery-inner .caption-heading p
{
color: white;
}
.gallery-inner .caption-heading p
{
font-size: 12px;
font-style: italic;
}
.gallery
{
min-height: 500px;
background: #4c4c4c;
}
#portfolio .container .gallery
{
background: transparent;
}
/* ---- isotope ---- */
/* clear fix */
.gallery:after
{
display: block;
clear: both;
content: '';
}
.gallery-ecommerce:after
{
display: block;
clear: both;
content: '';
}
/* 5 columns, percentage width */
.gallery .gallery-inner,
.gallery .grid-sizer
{
width: 33.333%;/* change here the column width */
}
.gallery .grid-sizer-two-columns,
.gallery .two-columns
{
width: 50%;
}
.gallery-ecommerce .grid-sizer-three-columns,
.gallery-ecommerce .three-columns
{
width: 33.333%;
}
.gallery .grid-sizer-four-columns,
.gallery .four-columns
{
width: 25%;
}
.four-columns h4
{
letter-spacing: 1px;
}
.gallery .gallery-inner
{
position: absolute;
top: 0;
left: 0;
float: left;
height: auto;
margin: 0;
background: #4c4c4c;
}
.gallery-ecommerce .ShoppingRelated
{
position: absolute;
top: 0;
left: 0;
float: left;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
height: auto;
margin: 0;
border-top: none;
border-right: 10px solid transparent;
border-bottom: 20px solid transparent;
border-left: 10px solid transparent;
-webkit-background-clip: padding-box;
-moz-background-clip: padding-box;
background-clip: padding-box;
}
.galleryImage
{
/*min-width:100%;*/
width: 100%;
height: auto;
}
/* Overlay style */
.overlay
{
position: fixed;
z-index: 3000;
top: 0;
left: 0;
overflow-y: scroll;
width: 100%;
height: 100%;
background: white;
}
.overlay-section
{
position: static;
}
/* Effects */
.overlay-slidedown
{
visibility: hidden;
-webkit-transition: -webkit-transform .4s ease-in-out, visibility 0s .4s;
transition: transform .4s ease-in-out, visibility 0s .4s;
-webkit-transform: translateY(-100%);
transform: translateY(-100%);
}
.overlay-slidedown.open
{
visibility: visible;
-webkit-transition: -webkit-transform .4s ease-in-out;
transition: transform .4s ease-in-out;
-webkit-transform: translateY(0%);
transform: translateY(0%);
}
.overlay-close img
{
cursor: pointer;
}
.overlay-close
{
padding: 30px;
}
#singlePageIntro .container
{
padding: 100px;
padding-bottom: 30px;
}
#singlePageContent .container
{
padding: 10px;
}
#singlePageIntro .separator
{
margin-top: 50px;
margin-bottom: 20px;
}
.singleProjectInfo ul
{
padding: 20px;
list-style: none;
border-left: 5px solid #282828;
}
.singleProjectInfo ul li p
{
display: inline;
}
.singleImageWrapper
{
padding-top: 60px;
}
.singleImageWrapper .videoWrapper
{
position: relative;
height: 0;
padding-top: 25px;
padding-bottom: 56.25%; /* 16:9 */
}
.singleImageWrapper .videoWrapper iframe
{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
/* magnific popup effect */
.mfp-fade.mfp-bg
{
-webkit-transition: all .15s ease-out;
-moz-transition: all .15s ease-out;
transition: all .15s ease-out;
opacity: 0;
}
/* overlay animate in */
.mfp-fade.mfp-bg.mfp-ready
{
opacity: .8;
}
/* overlay animate out */
.mfp-fade.mfp-bg.mfp-removing
{
opacity: 0;
}
/* content at start */
.mfp-fade.mfp-wrap .mfp-content
{
-webkit-transition: all .15s ease-out;
-moz-transition: all .15s ease-out;
transition: all .15s ease-out;
opacity: 0;
}
/* content animate it */
.mfp-fade.mfp-wrap.mfp-ready .mfp-content
{
opacity: 1;
}
/* content animate out */
.mfp-fade.mfp-wrap.mfp-removing .mfp-content
{
opacity: 0;
}
/* end magnific popup effect */
/*<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->*/
/*<!--Team -->*/
/*<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->*/
#team
{
background: white;
}
#team .container
{
padding-bottom: 0;
}
#team .owl-buttons div
{
padding: 5px 9px;
}
#team .owl-buttons i
{
margin-top: 2px;
}
#team .owl-buttons div
{
position: absolute;
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
}
#team .owl-buttons .owl-prev
{
left: 10px;
}
#team .owl-buttons .owl-next
{
right: 10px;
}
#owl-team
{
position: relative;
}
.memberParagraph
{
padding-right: 40px;
}
.memberDescription h2
{
letter-spacing: 0;
}
.memberDescription .position
{
margin-top: 10px;
margin-bottom: 40px;
}
.memberDescription .position span
{
font-family: 'Montserrat', sans-serif;
font-size: 10px;
font-weight: 400;
line-height: 20px;
padding: 6px;
letter-spacing: 3px;
text-transform: uppercase;
border: solid 1px black;
}
.teamSocial
{
margin-top: 20px;
}
.teamSocial a
{
font-size: 18px;
padding: 7px;
}
.teamSocial a:first-child
{
padding-left: 0;
}
/*<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->*/
/*<!--clients logo -->*/
/*<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->*/
#text-separator-clients
{
padding-top: 110px;
padding-bottom: 110px;
}
#text-separator-clients h3 span
{
font-size: 24px;
padding: 25px 50px;
letter-spacing: 10px;
text-transform: uppercase;
color: white;
border: solid 10px white;
}
.clientLogo img
{
width: 180px;
margin-top: 15px;
}
/*<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->*/
/*<!--Services -->*/
/*<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->*/
.serviceBox
{
position: relative;
z-index: 2;
float: left;
width: 50%;
height: 400px;
padding: 50px;
}
.serviceBox .separator
{
width: 100px;
max-width: 100px;
margin-top: 25px;
margin-bottom: 25px;
}
.serviceBox h2
{
margin-top: 0;
padding-top: 140px;
}
.serviceBox h2 span
{
padding: 25px 50px;
border: solid 10px #282828;
}
.serviceBox i
{
font-size: 9em;
}
.introServiceBox
{
position: relative;
z-index: 2;
background: url('/img/backgroundService.jpg') no-repeat center center;
background-repeat: repeat, repeat, repeat ,no-repeat;
background-position: 50% 0, 50% 0, 50% 0, 50% 0;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.whiteBox
{
background: white;
}
.grayBox{
background: #CECECE
}
.blackBox
{
background: #282828;
}
.blackBox i
{
color: white;
}
#servicesSimple
{
background: white;
}
.serviceIconWrapper
{
padding: 20px;
}
.serviceIcon
{
font-size: 40px;
line-height: 40px;
float: left;
width: 40px;
height: 40px;
margin-top: 3px;
transition: all .3s ease-in-out;
text-align: center;
vertical-align: middle;
}
.simpleServiceContent
{
margin-left: 60px;
}
.simpleServiceContent h4
{
letter-spacing: 5px;
}
.serviceIconWrapper
{
padding: 20px;
}
.serviceIcon2
{
font-size: 40px;
line-height: 40px;
margin-bottom: 20px;
transition: all .3s ease-in-out;
}
.simpleServiceContent2 h4
{
letter-spacing: 4px;
}
/*<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->*/
/*<!--Testimonials -->*/
/*<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->*/
#text-separator-testimonials h3 span
{
font-size: 24px;
padding: 25px 50px;
letter-spacing: 6px;
text-transform: uppercase;
color: white;
border: solid 10px white;
}
#text-separator-testimonials h3
{
padding-top: 100px;
}
.review
{
padding: 40px;
text-align: center;
}
.review p.titulation
{
font-size: 10px;
font-style: italic;
color: #c8c8c8;
}
.review h4
{
margin-bottom: 0;
letter-spacing: 0;
color: #898989;
}
.text-separator-title h2
{
padding-top: 100px;
}
/*<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->*/
/*<!--Pricing Tables -->*/
/*<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->*/
#pricing
{
background-color: #f4f4f4;
}
.tableWrapper
{
padding: 60px;
border: solid 10px black;
}
.tableWrapper .separator
{
margin-top: 20px;
margin-bottom: 20px;
padding: 20px;
}
.tableWrapper .subscriptionName h2
{
letter-spacing: 0;
}
.subscriptionList ul
{
padding: 0;
list-style: none;
}
.subscriptionPrice
{
padding-bottom: 10px;
}
.subscriptionPrice h2
{
letter-spacing: 0;
}
.subscriptionPrice h2,
.subscriptionPrice p
{
display: inline;
}
/*<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->*/
/*<!--Contact -->*/
/*<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->*/
#contact
{
background: white;
}
label
{
width: 100%;
}
input:focus,
textarea:focus
{
outline: 0;
}
label input,
textarea
{
width: 100%;
margin-top: 10px;
margin-bottom: 10px;
}
#contact_form #name,
#contact_form #email,
#contact_form #phone,
#contact_form #address
{
font-family: 'Montserrat', sans-serif;
font-size: 10px;
height: 50px;
padding: 10px;
padding-bottom: 0;
letter-spacing: 1px;
text-transform: uppercase;
color: #282828;
border: 0;
border-bottom: 5px solid #282828;
border-left: 5px solid #282828;
background: transparent;
}
#contact_form #comments
{
font-family: 'Montserrat', sans-serif;
font-size: 10px;
height: 200px;
margin-top: 30px;
padding: 10px;
padding-bottom: 0;
letter-spacing: 1px;
text-transform: uppercase;
color: #282828;
border: 0;
border-bottom: 5px solid #282828;
border-left: 5px solid #282828;
background: transparent;
}
.infoContact
{
padding: 20px;
list-style: none;
}
.infoContact li
{
padding-left: 20px;
}
.infoContact li .fa
{
font-size: 18px;
margin-right: 6px;
}
.infoContact li:first-child
{
margin-left: -27px;
}
#contact p.bold
{
padding-top: 30px;
}
.socialContact
{
padding: 0;
list-style: none;
}
.socialContact li
{
display: inline;
}
.socialContact li a
{
font-size: 1.25em;
line-height: 50px;
display: inline-block;
width: 50px;
height: 50px;
-webkit-transition: all .5s ease .25s;
transition: all .5s ease .25s;
text-align: center;
color: white;
background-color: #282828;
}
.socialContact li a:hover
{
background-color: black;
}
#googleMap
{
overflow: hidden;
width: 100%;
height: 350px;
}
.topLine
{
padding: 50px;
background: #282828;
}
#footer .bottomLine
{
margin: 0 auto;
padding: 50px;
background-color: #222;
}
#footer .bottomLine p
{
font-size: 12px;
color: #a5a5a5;
}
#footer .container
{
/*multipage only*/
padding: 0;
}
.footerText
{
padding: 10px 40px;
color: white;;
}
.footerText p
{
color: #a5a5a5;
}
/*footer newsletter*/
.form-control:focus
{
outline: 0;
-webkit-box-shadow: none;
box-shadow: none;
}
.footerText input
{
font-family: 'Montserrat', sans-serif;
font-size: 10px;
line-height: 54px;
height: 54px;
padding-bottom: 3px;
letter-spacing: 1px;
text-transform: uppercase;
color: white;
border: 0;
border-radius: 0;
background: #393939;
}
.input-group-addon
{
height: 54px;
padding-right: 16px;
padding-bottom: 3px;
padding-left: 16px;
letter-spacing: 1px;
text-transform: uppercase;
color: white;
border: 0;
border-radius: 0;
background: #323232;
}
#footer .infoContact
{
padding: 10px;
list-style: none;
color: #a5a5a5;
}
#footer .infoContact li .fa
{
font-size: 40px;
position: absolute;
left: 0;
margin-right: 6px;
opacity: .1;
}
#footer .infoContact li
{
font-size: 12px;
margin: 0;
padding: 0;
}
.bottomLine .footerSocialIcons
{
padding: 20px;
}
.footerSocialIcons
{
list-style: none;
}
.footerSocialIcons li
{
display: inline;
margin: 0 10px;
}
.footerSocialIcons li a
{
color: #a5a5a5;
}
.bottomLine p
{
display: inline;
}
.backToTop a
{
color: white;
}
/*countdown*/
#countdown
{
position: relative;
width: 100%;
height: auto;
margin-top: 40px;
margin-bottom: 0;
text-align: center;
border: 0;
background-color: transparent;
}
#countdown .countdown-section
{
position: relative;
display: inline-block;
width: 25%;
height: auto;
min-height: 150px;
vertical-align: top;
border-left: 1px solid rgba(255,255,255,.4);
}
#countdown .countdown-section:first-child
{
border-left: none;
}
#countdown .countdown-amount
{
font-size: 48px;
font-weight: 700;
line-height: 90px;
display: block;
margin: 0;
color: white;
}
#countdown .countdown-period
{
font-family: 'Open Sans', sans-serif;
font-size: 14px;
font-weight: 300;
color: white;
}
#singlePage
{
position: relative;
padding-bottom: 100px;
}
.paginationRow
{
padding: 80px 10px;;
}
#result h2
{
letter-spacing: 0;
}
iframe
{
border: 0;
}
/*/featured works*/
#featured-works
{
background: white;
}
.featureWrapper
{
padding: 10px;
}
.featureWrapper .caption-heading
{
padding: 10px;
}
#owl-featured .owl-buttons
{
display: inline-block;
}
#owl-featured .owl-prev,
.owl-next
{
display: inline-block;
}
.featuredNav
{
margin: 10px;
padding: 5px 10px;
color: white;
background: #282828;
}
/*pages*/
ul,
ol
{
line-height: 24px;
}
/*BLOG SECTION*/
#blogIntro
{
background: white;
}
#blogIntro .container
{
padding-bottom: 130px;
}
#blogIntro .separator
{
margin-top: 80px;
margin-bottom: 0;
}
#blogContent
{
background: white;
}
#blogContent .container
{
padding-top: 0;
}
/* ---- isotope ---- */
/* clear fix */
.blogPostsWrapper:after
{
display: block;
clear: both;
content: '';
}
.blogPostsWrapper2:after
{
display: block;
clear: both;
content: '';
}
/* ---- .element-item ---- */
/* 5 columns, percentage width */
.blogPost,
.grid-sizer-blog-3
{
width: 33.33%;
}
.blogPost2,
.grid-sizer-blog-2
{
width: 50%;
}
.blogPost,
.blogPost2
{
float: left;
}
.blogPost,
.blogPost2
{
padding: 20px;
}
.post-content
{
padding: 20px;
padding-top: 10px;
}
.post-date p
{
font-size: 90%;
font-style: italic;
}
.post-info p
{
font-size: 90%;
font-style: italic;
}
.blogSeparator
{
width: 35px;
margin: 15px 0;
}
.post-content .btn
{
font-size: 10px;
line-height: 30px;
margin-top: 20px;
padding: 0 10px;
}
.widget ul
{
padding-left: 20px;
list-style-type: square;
}
.widget h4
{
letter-spacing: 2px;
}
.widget
{
margin-bottom: 20px;
padding: 10px;
}
.widget ul li
{
margin-bottom: 10px;
color: #282828;
}
.widget ul li a
{
color: #353535;
}
.form-control
{
font-family: 'Montserrat', sans-serif;
font-size: 12px;
height: 40px;
padding: 8px 12px;
letter-spacing: 1px;
text-transform: uppercase;
border-radius: 0;
}
.form-control:focus
{
border-color: #282828;
outline: 0;
-webkit-box-shadow: none;
box-shadow: none;
}
.input-group-addon
{
font-size: 14px;
font-weight: 400;
line-height: 1;
height: 40px;
padding: 12px 18px;
text-align: center;
color: white;
border: 0;
border-radius: 0;
background-color: #282828;
}
.input-group-addon a
{
color: #fff;
}
.blogPostSeparator
{
width: 60px;
height: 2px;
margin-top: 15px;
margin-bottom: 20px;
background-color: #282828;
}
.blogPost3
{
padding: 30px;
padding-top: 0;
padding-bottom: 0;
}
.blogPost3 .post-content
{
padding-left: 0;
}
.blogPost3 .post-thumbnail img
{
width: 100%;
}
.blogPost3
{
margin-bottom: 60px;
}
.blogPost3 h2
{
letter-spacing: 1px;
}
.blogArticlesSeparator
{
margin-top: 0;
}
#owl-blog-single .owl-buttons
{
display: inline-block;
}
#owl-blog-single .owl-prev,
.owl-next
{
display: inline-block;
}
.blogNav
{
margin: 10px;
padding: 5px 10px;
color: white;
background: #282828;
}
#owl-blog-single .owl-buttons div
{
position: absolute;
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
}
#owl-blog-single .owl-buttons .owl-prev
{
left: 10px;
}
#owl-blog-single .owl-buttons .owl-next
{
right: 10px;
}
#owl-blog-single .owl-controls
{
height: 0;
}
/*shortcodes */
.nav-tabs
{
border-bottom: 3px solid black;
}
.nav-tabs > li > a
{
border-bottom-color: transparent;
border-radius: 0;
}
.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus
{
margin-bottom: -2px;
border: 3px solid black;
border-bottom-color: transparent;
}
.nav-pills > li.active > a,
.nav-pills > li.active > a:hover,
.nav-pills > li.active > a:focus
{
color: #fff;
background-color: #282828;
}
.nav-pills > li > a
{
font-family: 'Montserrat', sans-serif;
font-size: 12px;
font-weight: 900;
text-transform: uppercase;
border-radius: 0;
}
.tab-content
{
padding: 10px;
}
.panel-heading
{
padding: 18px;
}
.panel-group .panel
{
border-radius: 0;
}
.panel
{
border: 2px solid transparent;
border-radius: 0;
}
.panel-title
{
font-size: 12px;
}
.panel-default
{
border-color: black;
}
.buttons
{
padding: 30px;
}
.buttons button
{
margin: 30px;
}
.btn-primary
{
color: #357ebd;
}
.btn-primary:after,
.btn-primary:before
{
background: #357ebd;
}
.btn-success
{
color: #4cae4c;
}
.btn-success:after,
.btn-success:before
{
background: #4cae4c;
}
.btn-info
{
color: #46b8da;
}
.btn-info:after,
.btn-info:before
{
background: #46b8da;
}
.btn-warning
{
color: #eea236;
}
.btn-warning:after,
.btn-warning:before
{
background: #eea236;
}
.btn-danger
{
color: #d43f3a;
}
.btn-danger:after,
.btn-danger:before
{
background: #d43f3a;
}
.alert
{
border-radius: 0;
}
#callToAction
{
background: #282828;
}
#callToAction .container
{
padding-top: 75px;
padding-bottom: 75px;
}
#callToAction h4
{
letter-spacing: 2px;
color: white;
}
#callToAction p
{
padding-top: 15px;
padding-bottom: 15px;
color: #d5d5d5;
}
#callToAction h4
{
letter-spacing: 2px;
color: white;
}
.dropcap
{
font-family: 'Montserrat', sans-serif;
font-size: 50px;
font-weight: 900;
line-height: 40px;
float: left;
padding-top: 4px;
padding-right: 8px;
padding-left: 3px;
color: inherit;
}
h2.AnimatedHeadline b i em
{
font-style: normal;
}
.AnimatedHeadline b i
{
font-style: normal;
text-transform: uppercase;
}
.WordsWrapper
{
position: relative;
display: inline-block;
text-align: left;
}
.WordsWrapper b
{
font-weight: 900;
position: absolute;
top: 0;
left: 0;
display: inline-block;
white-space: nowrap;
}
.WordsWrapper b.is-visible
{
position: relative;
}
.no-js .WordsWrapper b
{
opacity: 0;
}
.no-js .WordsWrapper b.is-visible
{
opacity: 1;
}
.AnimatedHeadline.AnimatedHeadlineRotation .WordsWrapper
{
-webkit-perspective: 300px;
-moz-perspective: 300px;
perspective: 300px;
}
.AnimatedHeadline.AnimatedHeadlineRotation i,
.AnimatedHeadline.AnimatedHeadlineRotation em
{
display: inline-block;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
}
.AnimatedHeadline.AnimatedHeadlineRotation i
{
-webkit-transform: translateZ(-20px) rotateX(90deg);
-moz-transform: translateZ(-20px) rotateX(90deg);
-ms-transform: translateZ(-20px) rotateX(90deg);
-o-transform: translateZ(-20px) rotateX(90deg);
transform: translateZ(-20px) rotateX(90deg);
opacity: 0;
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
-ms-transform-style: preserve-3d;
-o-transform-style: preserve-3d;
transform-style: preserve-3d;
}
.is-visible .AnimatedHeadline.AnimatedHeadlineRotation i
{
opacity: 1;
}
.AnimatedHeadline.AnimatedHeadlineRotation i.in
{
-webkit-animation: cd-AnimatedHeadlineRotation-in .4s forwards;
-moz-animation: cd-AnimatedHeadlineRotation-in .4s forwards;
animation: cd-AnimatedHeadlineRotation-in .4s forwards;
}
.AnimatedHeadline.AnimatedHeadlineRotation i.out
{
-webkit-animation: cd-AnimatedHeadlineRotation-out .4s forwards;
-moz-animation: cd-AnimatedHeadlineRotation-out .4s forwards;
animation: cd-AnimatedHeadlineRotation-out .4s forwards;
}
.AnimatedHeadline.AnimatedHeadlineRotation em
{
-webkit-transform: translateZ(20px);
-moz-transform: translateZ(20px);
-ms-transform: translateZ(20px);
-o-transform: translateZ(20px);
transform: translateZ(20px);
}
.no-csstransitions .AnimatedHeadline.AnimatedHeadlineRotation i
{
-webkit-transform: rotateX(0deg);
-moz-transform: rotateX(0deg);
-ms-transform: rotateX(0deg);
-o-transform: rotateX(0deg);
transform: rotateX(0deg);
opacity: 0;
}
.no-csstransitions .AnimatedHeadline.AnimatedHeadlineRotation i em
{
-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
-o-transform: scale(1);
transform: scale(1);
}
.no-csstransitions .AnimatedHeadline.AnimatedHeadlineRotation .is-visible i
{
opacity: 1;
}
@-webkit-keyframes cd-AnimatedHeadlineRotation-in
{
0%
{
-webkit-transform: translateZ(-20px) rotateX(90deg);
opacity: 0;
}
60%
{
-webkit-transform: translateZ(-20px) rotateX(-10deg);
opacity: 1;
}
100%
{
-webkit-transform: translateZ(-20px) rotateX(0deg);
opacity: 1;
}
}
@-moz-keyframes cd-AnimatedHeadlineRotation-in
{
0%
{
-moz-transform: translateZ(-20px) rotateX(90deg);
opacity: 0;
}
60%
{
-moz-transform: translateZ(-20px) rotateX(-10deg);
opacity: 1;
}
100%
{
-moz-transform: translateZ(-20px) rotateX(0deg);
opacity: 1;
}
}
@keyframes cd-AnimatedHeadlineRotation-in
{
0%
{
-webkit-transform: translateZ(-20px) rotateX(90deg);
-moz-transform: translateZ(-20px) rotateX(90deg);
-ms-transform: translateZ(-20px) rotateX(90deg);
-o-transform: translateZ(-20px) rotateX(90deg);
transform: translateZ(-20px) rotateX(90deg);
opacity: 0;
}
60%
{
-webkit-transform: translateZ(-20px) rotateX(-10deg);
-moz-transform: translateZ(-20px) rotateX(-10deg);
-ms-transform: translateZ(-20px) rotateX(-10deg);
-o-transform: translateZ(-20px) rotateX(-10deg);
transform: translateZ(-20px) rotateX(-10deg);
opacity: 1;
}
100%
{
-webkit-transform: translateZ(-20px) rotateX(0deg);
-moz-transform: translateZ(-20px) rotateX(0deg);
-ms-transform: translateZ(-20px) rotateX(0deg);
-o-transform: translateZ(-20px) rotateX(0deg);
transform: translateZ(-20px) rotateX(0deg);
opacity: 1;
}
}
@-webkit-keyframes cd-AnimatedHeadlineRotation-out
{
0%
{
-webkit-transform: translateZ(-20px) rotateX(0);
opacity: 1;
}
60%
{
-webkit-transform: translateZ(-20px) rotateX(-100deg);
opacity: 0;
}
100%
{
-webkit-transform: translateZ(-20px) rotateX(-90deg);
opacity: 0;
}
}
@-moz-keyframes cd-AnimatedHeadlineRotation-out
{
0%
{
-moz-transform: translateZ(-20px) rotateX(0);
opacity: 1;
}
60%
{
-moz-transform: translateZ(-20px) rotateX(-100deg);
opacity: 0;
}
100%
{
-moz-transform: translateZ(-20px) rotateX(-90deg);
opacity: 0;
}
}
@keyframes cd-AnimatedHeadlineRotation-out
{
0%
{
-webkit-transform: translateZ(-20px) rotateX(0);
-moz-transform: translateZ(-20px) rotateX(0);
-ms-transform: translateZ(-20px) rotateX(0);
-o-transform: translateZ(-20px) rotateX(0);
transform: translateZ(-20px) rotateX(0);
opacity: 1;
}
60%
{
-webkit-transform: translateZ(-20px) rotateX(-100deg);
-moz-transform: translateZ(-20px) rotateX(-100deg);
-ms-transform: translateZ(-20px) rotateX(-100deg);
-o-transform: translateZ(-20px) rotateX(-100deg);
transform: translateZ(-20px) rotateX(-100deg);
opacity: 0;
}
100%
{
-webkit-transform: translateZ(-20px) rotateX(-90deg);
-moz-transform: translateZ(-20px) rotateX(-90deg);
-ms-transform: translateZ(-20px) rotateX(-90deg);
-o-transform: translateZ(-20px) rotateX(-90deg);
transform: translateZ(-20px) rotateX(-90deg);
opacity: 0;
}
}
.AnimatedHeadline.type .WordsWrapper
{
overflow: hidden;
vertical-align: top;
}
.AnimatedHeadline.type .WordsWrapper::after
{
position: absolute;
top: 50%;
right: 0;
bottom: auto;
width: 1px;
height: 90%;
/* vertical bar */
content: '';
-webkit-transform: translateY(-50%);
-moz-transform: translateY(-50%);
-ms-transform: translateY(-50%);
-o-transform: translateY(-50%);
transform: translateY(-50%);
background-color: #aebcb9;
}
.AnimatedHeadline.type .WordsWrapper.waiting::after
{
-webkit-animation: PulseAnimation 1s infinite;
-moz-animation: PulseAnimation 1s infinite;
animation: PulseAnimation 1s infinite;
}
/*.AnimatedHeadline.type .WordsWrapper.selected {*/
/*background-color: #aebcb9;*/
/*}*/
.AnimatedHeadline.type .WordsWrapper.selected::after
{
visibility: hidden;
}
/*.AnimatedHeadline.type .WordsWrapper.selected b {*/
/*color: #0d0d0d;*/
/*}*/
.AnimatedHeadline.type b
{
visibility: hidden;
}
.AnimatedHeadline.type b.is-visible
{
visibility: visible;
}
.AnimatedHeadline.type i
{
position: absolute;
visibility: hidden;
}
.AnimatedHeadline.type i.in
{
position: relative;
visibility: visible;
}
@-webkit-keyframes PulseAnimation
{
0%
{
-webkit-transform: translateY(-50%) scale(1);
opacity: 1;
}
40%
{
-webkit-transform: translateY(-50%) scale(.9);
opacity: 0;
}
100%
{
-webkit-transform: translateY(-50%) scale(0);
opacity: 0;
}
}
@-moz-keyframes PulseAnimation
{
0%
{
-moz-transform: translateY(-50%) scale(1);
opacity: 1;
}
40%
{
-moz-transform: translateY(-50%) scale(.9);
opacity: 0;
}
100%
{
-moz-transform: translateY(-50%) scale(0);
opacity: 0;
}
}
@keyframes PulseAnimation
{
0%
{
-webkit-transform: translateY(-50%) scale(1);
-moz-transform: translateY(-50%) scale(1);
-ms-transform: translateY(-50%) scale(1);
-o-transform: translateY(-50%) scale(1);
transform: translateY(-50%) scale(1);
opacity: 1;
}
40%
{
-webkit-transform: translateY(-50%) scale(.9);
-moz-transform: translateY(-50%) scale(.9);
-ms-transform: translateY(-50%) scale(.9);
-o-transform: translateY(-50%) scale(.9);
transform: translateY(-50%) scale(.9);
opacity: 0;
}
100%
{
-webkit-transform: translateY(-50%) scale(0);
-moz-transform: translateY(-50%) scale(0);
-ms-transform: translateY(-50%) scale(0);
-o-transform: translateY(-50%) scale(0);
transform: translateY(-50%) scale(0);
opacity: 0;
}
}
#demo-canvas
{
position: absolute;
top: 0;
left: 0;
}
.SideParallaxImage
{
position: absolute;
z-index: -1;
top: 0;
width: auto;
height: 700px;
}
.LeftAligned
{
position: absolute;
left: 0;
}
.RightAligned
{
position: absolute;
right: 0;
}
.FullWidthParallax
{
left: 0;
width: 100%;
height: auto;
}
.ServiceWrapper
{
cursor: pointer;
}
.ServiceWrapper i
{
font-size: 50px;
}
.ServiceWrapper
{
margin-bottom: 40px;
}
.ServiceWrapper
{
margin-bottom: 0;
}
.ServiceTitleMobile
{
display: none;
}
.BackgroundIconWrapper
{
position: absolute;
z-index: -1;
top: 40px;
left: 50%;
color: #eee;
}
.BackgroundIcon
{
font-size: 140px;
position: Relative;
left: -50%;
}
.AboutIcon2 i
{
font-size: 50px;
padding: 25px;
border: 1px solid #eee;
border-radius: 50%;
}
.AboutIconWrapper2:hover .AboutIcon2 i
{
border-color: black;
}
.ImagewithCaptionOverlay:hover .CaptionFlyingBox
{
bottom: 40px;
left: 80px;
background: #eaeaea;
}
.TeamMember:hover .TeamMemberCaption2Text
{
padding-top: 0;
opacity: 1;
}
.TeamMemberCaption2Text
{
padding-top: 40px;
padding-right: 20px;
padding-left: 20px;
-webkit-transition: all 350ms cubic-bezier(.77, .155, .445, 1.32);
-moz-transition: all 350ms cubic-bezier(.77, .155, .445, 1.32);
-o-transition: all 350ms cubic-bezier(.77, .155, .445, 1.32);
transition: all 350ms cubic-bezier(.77, .155, .445, 1.32);
opacity: 0;
}
.TeamMemberCaption2
{
position: absolute;
z-index: 1;
bottom: -100%;
left: 0;
width: 100%;
height: 100%;
padding: 40px 35px;
-webkit-transition: all .35s ease-out;
-moz-transition: all .35s ease-out;
-ms-transition: all .35s ease-out;
-o-transition: all .35s ease-out;
transition: all .35s ease-out;
background: rgba(255,255,255,.9);
background: -moz-linear-gradient(top, rgba(255,255,255,1) 0%, rgba(255,255,255,.95) 50%,rgba(255,255,255,.5) 100%);
background: -webkit-linear-gradient(top, rgba(255,255,255,1) 0%, rgba(255,255,255,.95) 50%,rgba(255,255,255,.5) 100%);
background: linear-gradient(to top, rgba(255,255,255,1) 0%, rgba(255,255,255,.95) 50%,rgba(255,255,255,.5) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#a6000000',GradientType=1 );
}
.TeamMember:hover .TeamMemberCaption2
{
bottom: 0;
}
.TeamMember .position
{
margin-top: 20px;
margin-bottom: 20px;
}
.TeamMember .position span
{
font-family: 'Montserrat', sans-serif;
font-size: 10px;
font-weight: 400;
line-height: 20px;
padding: 6px;
letter-spacing: 3px;
text-transform: uppercase;
border: solid 1px black;
}
.NavbarEcommerceTopWrapper
{
/*position:relative;*/
/*display:block;*/
}
.NavbarEcommerceTopWrapper .nav > li > a:hover,
.NavbarEcommerceTopWrapper .nav > li > a:focus
{
text-decoration: none;
background-color: transparent;
}
.NavbarEcommerceTopWrapper .container
{
z-index: inherit !important;
display: table;
overflow: inherit;
}
.NavbarEcommerceTopWrapper .icon
{
vertical-align: middle;
}
.NavbarEcommerceTopWrapper h5
{
font-size: 12px;
}
.NavbarEcommerceTopWrapper
{
overflow: visible;
}
.NavbarEcommerceTop li
{
float: right;
}
.NavbarEcommerceTop .dropdown-menu li
{
float: none;
text-align: left;
}
.NavbarEcommerceTopWrapper
{
position: relative;
z-index: 100;
}
.EcommerceNavbarRow
{
display: table;
width: 100%;
}
.NavbarEcommerceTopWrapper .nav .open > a,
.NavbarEcommerceTopWrapper .nav .open > a:hover,
.NavbarEcommerceTopWrapper .nav .open > a:focus
{
border-color: transparent;
background-color: transparent;
}
.NavbarEcommerceTopWrapper .nav .open
{
display: block;
}
.NavbarEcommerceTop li a
{
font-family: 'Montserrat', sans-serif;
font-size: 10px;
font-weight: 400;
position: relative;
letter-spacing: 0;
text-transform: none;
color: #d5d5d5;
}
.NavbarEcommerceTop .dropdown-menu
{
margin-top: -3px;
}
.NavbarEcommerceTop .dropdown-menu li a
{
padding-bottom: 10px;
}
.NavbarEcommerceMiddle .fa-heart-o
{
font-size: 1.6em;
}
.NavbarEcommerceMiddle .ShoppingCartNumber:after
{
top: 5px;
background: black;
}
.NavbarEcommerceMiddle .ShoppingCartNumber
{
color: white;
}
.NavbarEcommerceTopWrapper .dropdown
{
float: left;
text-align: center;
}
.NavbarEcommerceBottomWrapper
{
/*position:relative;*/
position: absolute;
z-index: 99;
width: 100%;
}
.NavbarEcommerceBottomWrapper.affix
{
position: fixed !important;
top: 0 !important;
}
.NavbarEcommerceBottomWrapper .container
{
overflow: visible;
}
.NavbarEcommerceBottomWrapper .navbar-default
{
margin: 0;
padding: 0;
}
#navbar-collapse > ul > li:first-child > a
{
padding-left: 0;
}
.NavbarEcommerceTopWrapper .container .row
{
z-index: inherit;
}
.HeaderInfo
{
font-family: 'Montserrat', sans-serif;
font-size: 11px;
font-weight: 100;
line-height: 40px;
margin: 0;
color: white;
}
.HeaderInfo span
{
font-family: 'Open Sans', sans-serif;
font-weight: 300;
color: #aaa;
}
.ShoppingCartNumber
{
font-size: 10px;
position: Absolute;
z-index: 100;
top: -8px;
right: 0;
padding: 0;
color: black;
}
.ShoppingCartNumber:after
{
position: absolute;
z-index: -1;
top: 2px;
right: -4px;
width: 14px;
height: 14px;
content: '';
border-radius: 50%;
background: white;
}
.SearchInput
{
position: fixed;
z-index: 9999;
top: -999px;
left: 0;
width: 100%;
padding: 20px 40px 20px;
-webkit-transition: opacity .3s ease-in-out;
-o-transition: opacity .3s ease-in-out;
transition: opacity .3s ease-in-out;
opacity: 0;
background-color: #181818;
}
.SearchInput input
{
font-family: 'Montserrat', sans-serif;
display: block;
letter-spacing: 1px;
text-transform: uppercase;
color: white;
border-color: #181818;
border-radius: 0;
background-color: #181818;
}
.form-control:focus
{
border-color: black;
outline: 0;
-webkit-box-shadow: none;
box-shadow: none;
}
.SearchCloseTrigger
{
font-size: 23px;
position: absolute;
z-index: 99999;
top: 0;
right: 50px;
color: white;
}
.SearchInput.ActiveSearchInput
{
top: 0;
-webkit-transition: opacity .3s ease-in-out;
-o-transition: opacity .3s ease-in-out;
transition: opacity .3s ease-in-out;
opacity: 1;
}
.EcommerceNavbarLogo
{
display: inline-block;
width: 50px;
margin-right: 20px;
padding-top: 20px;
vertical-align: top;
}
.EcommerceLogo
{
display: inline-block;
}
.EcommerceLogoWrapper
{
height: 100%;
}
.EcommerceLogo h2
{
margin-top: 25px;
margin-bottom: 0;
letter-spacing: 0;
}
.CartDropdown
{
min-width: 260px;
}
.ShoppingCartDropdown-header
{
padding-top: 10px;
padding-bottom: 0;
}
.ShoppingCartDropdown-items
{
padding: 15px;
}
.CartDropdown hr
{
margin-top: 5px;
margin-bottom: 5px;
}
.ShoppingCartImageSmall
{
float: left;
width: 48px !important;
height: 48px !important;
margin-right: 15px;
border: 2px solid #eee;
background: white;
}
.ShoppingCartImageSmall img
{
width: 100%;
height: 100%;
}
.ShoppingCartName
{
position: relative;
overflow: hidden;
color: white;
}
.ShoppingCartName a
{
font-size: 12px;
color: white;
}
.ShoppingCartName .ShoppingCartPrice
{
line-height: 14px;
display: block;
color: #999;
}
.ShoppingCartName .ShoppingCartQuantity
{
font-size: 14px!important;
position: absolute;
top: 2px;
right: 0;
display: block;
letter-spacing: 0;
color: white;
}
.ShoppingCartWrapper
{
padding-bottom: 15px;
}
.ShoppingCartDropdown-footer hr
{
margin-top: 0;
margin-bottom: 0;
border-color: #5e5e5e;
}
.ShoppingCartWrapper:last-child
{
padding-bottom: 0;
}
.ShoppingCartDropdown-footer h5
{
color: #eee;
}
.itemIntro
{
width: 100%;
height: 100%;
}
.owl-carousel.owl-intro .owl-item
{
overflow: hidden;
}
.owl-carousel.owl-intro,
.owl-carousel.owl-intro .owl-wrapper-outer,
.owl-carousel.owl-intro .owl-wrapper-outer .owl-wrapper,
.owl-carousel.owl-intro .owl-wrapper-outer .owl-wrapper .owl-item
{
height: 100%;
}
.OwlIntroBackgroundImage
{
position: absolute;
}
.EcommerceIntroContent
{
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
.IntroEcommerceBg
{
position: fixed;
z-index: 1;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
}
.IntroEcommerceBg img
{
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
min-width: 50%;
min-height: 50%;
margin: auto;
}
.owl-intro.owl-theme .owl-controls .owl-buttons div
{
font-size: 12px;
display: inline-block;
zoom: 1;
margin: 5px;
padding: 3px 10px;
opacity: .5;
color: #fff;
-webkit-border-radius: 30px;
-moz-border-radius: 30px;
border-radius: 30px;
*display: inline;/*IE7 life-saver */
filter: Alpha(Opacity=50);/*IE7 fix*/
}
.owl-intro.owl-theme .owl-controls.clickable .owl-buttons div:hover
{
text-decoration: none;
opacity: 1;
filter: Alpha(Opacity=100);/*IE7 fix*/
}
.owl-intro.owl-theme .owl-controls .owl-buttons div
{
position: absolute;
}
.owl-intro.owl-theme .owl-controls .owl-buttons .owl-prev
{
top: 45%;
left: 5px;
}
.owl-intro.owl-theme .owl-controls .owl-buttons .owl-next
{
top: 45%;
right: 5px;
}
.SalePercentage
{
font-family: 'Montserrat', sans-serif;
font-size: 40px;
font-weight: 700;
position: absolute;
z-index: 5;
top: 60px;
right: 40px;
width: 100px;
height: 100px;
padding: 14px;
padding-top: 20px;
letter-spacing: -3px;
color: white;
border-radius: 50px;
background: #5cdbe7;
}
.PromoCaption
{
position: absolute;
z-index: 500;
top: 80px;
left: 40px;
overflow: hidden;
width: 100%;
height: 100%;
}
.PromoCaption h3,
.PromoCaption h4
{
margin: 0;
letter-spacing: 0;
color: white;
}
.SpecialOfferWrapper
{
overflow: hidden;
width: 100%;
height: auto;
}
.SpecialWrapper .Plainblack-overlay
{
z-index: 4;
-webkit-transition: all 1s ease; /* Safari and Chrome */
-moz-transition: all 1s ease; /* Firefox */
-ms-transition: all 1s ease; /* IE 9 */
-o-transition: all 1s ease; /* Opera */
transition: all 1s ease;
opacity: 0;
}
.SpecialWrapper:hover .Plainblack-overlay
{
opacity: .6;
}
.SpecialOfferWrapper img
{
-webkit-transition: all 1s ease; /* Safari and Chrome */
-moz-transition: all 1s ease; /* Firefox */
-ms-transition: all 1s ease; /* IE 9 */
-o-transition: all 1s ease; /* Opera */
transition: all 1s ease;
}
.SpecialWrapper:hover img
{
-webkit-transform: scale(1.25); /* Safari and Chrome */
-moz-transform: scale(1.25); /* Firefox */
-ms-transform: scale(1.25); /* IE 9 */
-o-transform: scale(1.25); /* Opera */
transform: scale(1.25);
}
.PromoCaption a
{
position: relative;
top: 10px;
left: -1000px;
-webkit-transition: all .3s ease; /* Safari and Chrome */
-moz-transition: all .3s ease; /* Firefox */
-ms-transition: all .3s ease; /* IE 9 */
-o-transition: all .3s ease; /* Opera */
transition: all .3s ease;
color: white;
}
.SpecialWrapper:hover .PromoCaption a
{
position: relative;
left: 0;
}
.SpecialOfferWrapper .plainblack-overlay,
.SpecialOfferWrapper .plainwhite-overlay
{
z-index: 5;
}
.shopping-inner .ShoppingImage1,
.ShoppingRelated .ShoppingImage1
{
-webkit-transition: all .3s ease-in-out .3s;
transition: all .3s ease-in-out .3s;
opacity: 1;
}
.shopping-inner .ShoppingImage2,
.ShoppingRelated .ShoppingImage2
{
position: absolute;
top: 0;
-webkit-transition: all .3s ease-in-out .3s;
transition: all .3s ease-in-out .3s;
opacity: 0;
}
.shopping-inner:hover .ShoppingImage1,
.ShoppingRelated:hover .ShoppingImage1
{
opacity: 0;
}
.shopping-inner:hover .ShoppingImage2,
.ShoppingRelated:hover .ShoppingImage2
{
opacity: 1;
}
.ShoppingRelated .ShoppingImage1,
.ShoppingRelated .ShoppingImage2
{
padding: 20px;
}
.QuickButtonsWrapper
{
position: absolute;
bottom: -50px;
left: 0;
width: 100%;
height: auto;
-webkit-transition: all .3s ease-in-out .3s;
transition: all .3s ease-in-out .3s;
}
.ShoppingRelated:hover .QuickButtonsWrapper
{
bottom: 20px;
}
.ShoppingRelated .ImageWrapper
{
overflow: hidden;
}
.QuickButtons
{
font-family: 'Lato', sans-serif;
font-size: 10px;
font-weight: 900;
position: relative;
z-index: 999;
padding-top: 10px;
padding-bottom: 10px;
text-transform: uppercase;
background: #eee;
}
.QuickButtons i
{
padding-right: 5px;
}
.QuickButtons:first-child
{
border-right: 1px solid #ccc;
}
.QuickButtons:hover
{
padding-top: 10px;
padding-bottom: 10px;
background: #ddd;
}
.CategoryBadge,
.NewBadge
{
display: inline-block;
}
.CategoryBadge span
{
font-family: 'Montserrat',sans-serif;
font-size: 11px;
font-weight: 400;
padding: 3px 5px;
text-transform: uppercase;
color: black;
background: transparent;
}
.NewBadge span
{
font-family: 'Montserrat',sans-serif;
font-size: 11px;
font-weight: 400;
padding: 3px 5px;
text-transform: uppercase;
color: white;
background: red;
}
.ShoppingTitle
{
font-family: 'Montserrat',sans-serif;
font-size: 14px;
font-weight: 700;
line-height: 18px;
letter-spacing: .75px;
text-transform: uppercase;
color: #1e1e1e;
}
.price
{
font-family: 'Montserrat',sans-serif;
font-size: 11px;
font-weight: 400;
letter-spacing: .25px;
color: #acb1b4;
}
.featuredTablist .active h6
{
text-decoration: underline;
}
.FilterHeading
{
letter-spacing: 0;
}
.FilterListWrapper ul
{
line-height: 16px;
padding: 10px;
padding-top: 0;
}
#accordion-filters
{
padding: 10px;
border: 5px solid black;
}
#accordion-filters ul li a
{
font-size: 10px;
font-weight: 900;
text-transform: uppercase;
color: #999;
}
.price .disabled
{
text-decoration: line-through;
color: #ddd;
}
.ShoppingRelatedWrapper
{
padding: 15px;
background: white;
-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
}
.SliderMin
{
text-align: left;
}
.SliderMax
{
text-align: right;
}
.SliderMin,
.SliderMax
{
font-size: 11px;
font-weight: 400;
}
.SliderMin span,
.SliderMax span
{
font-weight: 900;
}
.slider-track
{
height: 1px !important;
}
.slider.slider-horizontal
{
height: 1px;
margin-top: 15px;
margin-bottom: 10px;
}
.slider-selection
{
background: #666;;
}
.slider-handle
{
position: absolute;
width: 5px;
height: 20px;
border: 0 solid transparent;
border-radius: 0 !important;
background-color: #000;
background-image: none;
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0);
filter: none;;
}
.slider.slider-horizontal .slider-tick,
.slider.slider-horizontal .slider-handle
{
margin-top: -9px;
margin-left: -3px;
}
#sync2 .synced .item
{
background: #eee;
}
#sync1 .owl-item img
{
padding: 30px;
}
#sync2 .item
{
padding: 5px;
}
#sync1
{
background: white;
-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
}
.owl-theme .owl-controls
{
margin-top: 10px;
text-align: center;
}
/* Styling Next and Prev buttons */
#sync1.owl-theme .owl-controls .owl-buttons div
{
font-size: 40px;
display: inline-block;
zoom: 1;
margin: 5px;
padding: 3px 10px;
opacity: .5;
color: black;
-webkit-border-radius: 30px;
-moz-border-radius: 30px;
border-radius: 30px;
background: transparent;
*display: inline;/*IE7 life-saver */
filter: Alpha(Opacity=50);/*IE7 fix*/
}
/* Clickable class fix problem with hover on touch devices */
/* Use it for non-touch hover action */
#sync1.owl-theme .owl-controls.clickable .owl-buttons div:hover
{
text-decoration: none;
opacity: 1;
filter: Alpha(Opacity=100);/*IE7 fix*/
}
/* Styling Pagination*/
#sync1.owl-theme .owl-controls .owl-page
{
display: inline-block;
zoom: 1;
*display: inline;/*IE7 life-saver */
}
#sync1.owl-theme .owl-controls .owl-page span
{
display: block;
width: 12px;
height: 12px;
margin: 5px 7px;
opacity: .5;
-webkit-border-radius: 20px;
-moz-border-radius: 20px;
border-radius: 20px;
background: #869791;
filter: Alpha(Opacity=50);/*IE7 fix*/
}
#sync1.owl-theme .owl-controls .owl-page.active span,
#sync1.owl-theme .owl-controls.clickable .owl-page:hover span
{
opacity: 1;
filter: Alpha(Opacity=100);/*IE7 fix*/
}
#sync1.owl-theme .owl-controls .owl-buttons div
{
position: absolute;
}
#sync1.owl-theme .owl-controls .owl-buttons .owl-prev
{
top: 40%;
left: 0;
}
#sync1.owl-theme .owl-controls .owl-buttons .owl-next
{
top: 40%;
right: 0;
}
.ProducDescriptionWrapper h3
{
font-size: 40px;
line-height: 30px;
margin-top: 20px;
margin-bottom: 0;
letter-spacing: 0;
text-transform: none;
}
.DetailsPageSmallTitle
{
font-size: 10px;
font-weight: 900;
margin-bottom: 10px;
text-transform: uppercase;
color: #999;
}
.TitleCaption
{
font-size: 10px;
font-weight: 900;
}
.ProducDescriptionWrapper .price
{
font-size: 24px;
margin-top: 30px;
margin-bottom: 30px;
}
.ColorBox
{
display: inline-block;
width: 40px;
height: 40px;
margin-right: 10px;
cursor: pointer;
psoition: relative;
}
.ColorBox.CheckMark:before
{
font: normal normal normal 14px/1 FontAwesome;
font-size: inherit;
font-size: 20px;
position: absolute;
z-index: 3;
display: inline-block;
padding: 10px;
content: '\f00c';
color: white;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.form-control
{
border-radius: 0;
box-shadow: none;
-webkit-appearance: none;
border-colro: black;
}
.ThickBorder .left
{
position: fixed;
z-index: 23;
top: 0;
left: 0;
width: 50px;
height: 100%;
background: white;
}
.ThickBorder .right
{
position: fixed;
z-index: 23;
top: 0;
right: 0;
width: 50px;
height: 100%;
background: white;
}
.ThickBorder .top
{
position: fixed;
z-index: 23;
top: 0;
right: 0;
width: 100%;
height: 50px;
background: white;
}
.ThickBorder .bottom
{
position: fixed;
z-index: 23;
right: 0;
bottom: 0;
width: 100%;
height: 50px;
background: white;
}
.NavbarStyle2
{
padding-top: 0;
}
.NavbarStyle2 .navbar-brand
{
color: #333;
}
.NavbarStyle2 .navbar-nav > .open > a,
.NavbarStyle2 .navbar-nav > .open > a:hover,
.NavbarStyle2 .navbar-nav > .open > a:focus
{
color: black;
}
.NavbarStyle2 .navbar-nav > .active > a,
.NavbarStyle2 .navbar-nav > .active > a:hover,
.NavbarStyle2 .navbar-nav > .active > a:focus
{
color: black;
}
.NavbarStyle2.navbar-default .navbar-toggle .icon-bar
{
background: black;
}
.NavbarStyle3 .navbar-brand
{
color: #333;
}
.NavbarStyle3 .navbar-nav > .open > a,
.NavbarStyle3 .navbar-nav > .open > a:hover,
.NavbarStyle3 .navbar-nav > .open > a:focus
{
color: black;
}
.NavbarStyle3 .navbar-nav > .active > a,
.NavbarStyle3 .navbar-nav > .active > a:hover,
.NavbarStyle3 .navbar-nav > .active > a:focus
{
color: black;
}
.NavbarStyle3.navbar-default .navbar-toggle .icon-bar
{
background: black;
}
.NavbarStyle3.affix
{
background: #f5f5f5;
}
.NavbarStyle3 .navbar-nav > li > a
{
font-size: 10px;
font-weight: 900;
letter-spacing: 0;
text-transform: lowercase;
}
.NavbarStyle4.affix-top
{
opacity: 0;
}
.NavbarStyle4.affix
{
opacity: 1;
}
.fake
{
position: relative;
top: 0;
left: 0;
opacity: 0;
}
.TextTyperWrapper
{
position: absolute;
top: 0;
left: 0;
}
.TextStyling,
.TextStyling > h3,
.TextStyling > h1
{
display: inline;
letter-spacing: 0;
}
/*.TextStyling.fake{*/
/*opacity:0.6;*/
/*}*/
.typed-cursor
{
font-size: 30px;
line-height: inherit;
display: inline-block;
-webkit-animation: blink .7s infinite;
-moz-animation: blink .7s infinite;
animation: blink .7s infinite;
opacity: 1;
}
@keyframes blink
{
0%
{
opacity: 1;
}
50%
{
opacity: 0;
}
100%
{
opacity: 1;
}
}
@-webkit-keyframes blink
{
0%
{
opacity: 1;
}
50%
{
opacity: 0;
}
100%
{
opacity: 1;
}
}
@-moz-keyframes blink
{
0%
{
opacity: 1;
}
50%
{
opacity: 0;
}
100%
{
opacity: 1;
}
}
.timeline-icon.timeline-icon-text.ThickBorderTimeline > span
{
font-weight: 900;
padding: 10px 30px;
text-transform: uppercase;
border: 10px solid black !important;
background: white;
}
.TextHolder2
{
display: inline-block;
letter-spacing: 0;
}
.TextHolder2 .typed-cursor
{
font-size: 50px;
color: white;
}
.BorderedItem
{
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
border: 40px solid transparent;
-webkit-background-clip: padding-box;
-moz-background-clip: padding-box;
background-clip: padding-box;
}
.BorderedItem.BlackBorder
{
border-color: #1d1d1d;
}
.BorderedItem.WhiteBorder
{
border-color: #fff;
}
.ProjectSubTitle
{
font-size: 11px;
font-weight: 900;
margin-top: 20px;
margin-bottom: 10px;
text-transform: uppercase;
color: #aaa;
}
.IntroBoxes
{
height: 350px;
color: white;
background: #333;
}
.IntroBoxTable
{
display: table;
width: 100%;
height: 100%;
}
.IntroBoxCell
{
display: table-cell;
text-align: center;
vertical-align: middle;
}
.BackgroundImage
{
position: absolute;
z-index: 4;
top: 0;
left: 0;
width: 100%;
height: 100%;
-webkit-transition: all .35s ease-out;
-moz-transition: all .35s ease-out;
transition: all .35s ease-out;
opacity: 0;
}
.IntroBox1 .BackgroundImage
{
background: url('/img/portfolioIntro.jpg') no-repeat center center;
background-repeat: repeat, repeat, repeat ,no-repeat;
background-position: 50% 0, 50% 0, 50% 0, 50% 0;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.IntroBox2 .BackgroundImage
{
background: url('/img/background5.jpg') no-repeat center center;
background-repeat: repeat, repeat, repeat ,no-repeat;
background-position: 50% 0, 50% 0, 50% 0, 50% 0;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.IntroBox3 .BackgroundImage
{
background: url('/img/background6.jpg') no-repeat center center;
background-repeat: repeat, repeat, repeat ,no-repeat;
background-position: 50% 0, 50% 0, 50% 0, 50% 0;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.IntroBox4 .BackgroundImage
{
background: url('/img/background7.jpg') no-repeat center center;
background-repeat: repeat, repeat, repeat ,no-repeat;
background-position: 50% 0, 50% 0, 50% 0, 50% 0;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.IntroBoxHoverWrapper:hover .BackgroundImage
{
opacity: .3;
}
.CubeEffect
{
position: relative;
width: 100%;
min-height: 200px;
-webkit-perspective: 1000px;
-moz-perspective: 1000px;
-o-perspective: 1000px;
perspective: 1000px;
}
.CubeWrapper
{
position: absolute;
width: 100%;
height: 100%;
-webkit-transition: -webkit-transform 1s;
-moz-transition: -moz-transform 1s;
-o-transition: -o-transform 1s;
transition: transform 1s;
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
-o-transform-style: preserve-3d;
transform-style: preserve-3d;
}
.CubeWrapper div
{
font-weight: bold;
position: absolute;
display: block;
width: 100%;
height: 100%;
text-align: center;
color: #222;
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
-o-backface-visibility: hidden;
backface-visibility: hidden;
}
.CubeWrapper .ServiceWrapperIcon
{
padding-top: 30px;
-webkit-transform: translateZ( 100px );
-moz-transform: translateZ( 100px );
-o-transform: translateZ( 100px );
transform: translateZ( 100px );
}
.CubeWrapper .ServiceWrapperText
{
-webkit-transform: rotateX( -90deg ) translateZ( 100px );
-moz-transform: rotateX( -90deg ) translateZ( 100px );
-o-transform: rotateX( -90deg ) translateZ( 100px );
transform: rotateX( -90deg ) translateZ( 100px );
}
.ServiceWrapperText i
{
font-size: 80px;
position: absolute;
z-index: -2;
top: 0;
left: 50%;
width: 80px;
margin-top: -30px;
margin-left: -40px;
color: #efefef;
}
.CubeWrapper.show-front
{
-webkit-transform: translateZ( -100px );
-moz-transform: translateZ( -100px );
-o-transform: translateZ( -100px );
transform: translateZ( -100px );
}
.CubeWrapper.show-bottom
{
-webkit-transform: translateZ( -100px ) rotateX( 90deg );
-moz-transform: translateZ( -100px ) rotateX( 90deg );
-o-transform: translateZ( -100px ) rotateX( 90deg );
transform: translateZ( -100px ) rotateX( 90deg );
}
|
DarinLevesque/pkcphotography
|
public/css/style.css
|
CSS
|
mit
| 72,588
|
namespace CameraBazar.Services.Models.Users
{
using System;
public class UserDetailsModel
{
public string Id { get; set; }
public string Email { get; set; }
public string Password { get; set; }
public string Phone { get; set; }
public DateTime LasLogin { get; set; }
}
}
|
VaskoViktorov/SoftUni-Homework
|
11. C# ASP.NET Core - 30.10.2017/06. Razor & Filters - Part II - Exercise/CameraBazar/CameraBazar.Services/Models/Users/UserDetailsModel.cs
|
C#
|
mit
| 335
|
Hakuba
===========
[](https://developer.apple.com/iphone/index.action)
[](https://developer.apple.com/swift)
[](http://mit-license.org)
[](https://github.com/nghialv/Hakuba/issues?state=open)
I want to slim down my view controllers.
I want to manage tableview without the code of `UITableViewDelegate` and `UITableViewDataSource`.
That is why I created `Hakuba`.
( **Hakuba** is one of the most famous ski resorts in Japan. )
Feature
-----
* Don't have to write the code for `UITableViewDelegate` and `UITableViewDataSource` protocols
* Easy to manage your sections and cells (append/reset/insert/remove/update)
* Support dynamic cell height from **ios7**
* Don't have to worry about cell identifier
* Handling cell selection by trailing closure
* Easy to implement header/footer view (floating callback)
* Support for creating cells from Nibs or Storyboards
* Method chaining
* Subscript
* Support loadmore closure
* Complete example
##### Quick example
``` swift
// viewController swift file
hakuba = Hakuba(tableView: tableView)
let cellmodel = YourCellModel(title: "Title", des: "description") {
println("Did select cell with title = \(title)")
}
hakuba[2].append(cellmodel) // append a new cell model in datasource
.slide(.Fade) // show the cell of your cell model in the table view
hakuba[1].remove(1...3)
.slide(.Right)
```
``` swift
// your cell swift file
class YourCellModel : MYCellModel {
let title: String
let des: String
init(title: String, des: String, selectionHandler: MYSelectionHandler) {
self.title = title
self.des = des
super.init(YourCell.self, selectionHandler: selectionHandler)
}
}
class YourCell : MYTableViewCell {
@IBOutlet weak var titleLabel: UILabel!
override func configureCell(data: MYCellModel) {
super.configureCell(data)
if let cellmodel = data as? YourCellModel {
titleLabel.text = cellmodel.title
}
}
}
```
Usage
-----
* Initilization
``` swift
private var hakuba = Hakuba(tableView: tableView)
```
* Section handling
``` swift
let section = hakuba[secIndex] // retrieve a section or create a new section if it doesn't already exist
// inserting
hakuba.insert(section, atIndex: 1)
.slide()
// removing
hakuba.remove(index)
.slide(.Left)
hakuba.removeAll()
.slide()
// handing section index by enum
enum Section : Int, MYSectionIndex {
case Top = 0
case Center
case Bottom
var intValue: Int {
return self.rawValue
}
}
let topSection = hakuba[Section.Top]
```
* Cell handling
``` swift
// 1. appending
hakuba[0].append(cellmodel) // append a cellmodel
.slide(.Fade) // and slide with `Fade` animation
hakuba[1].append(cellmodels) // append a list of cellmodes
.slide(.Left)
// by using section
let section = hakuba[Section.Top]
section.append(cellmodel)
.slide()
// 2. inserting
section.insert(cellmodels, atIndex: 1)
.slide(.Middle)
// 3. reseting
section.reset(cellmodels) // replace current data in section by the new data
.slide()
section.reset() // or remove all data in section
.slide()
// 4. removing
section.remove(1)
.slide(.Right)
section.remove(2...5)
.slide()
section.removeLast()
.slide()
```
``` swift
// updating cell data
let section = hakuba[Section.Top]
section[1].property = newData
section[1].slide()
```
``` swift
section.sort().slide()
section.shuffle().slide()
section.map
section.filter
section.reduce
section.mapFilter
section.each
section.first
section.last
section[1]
section.count
```
* Creating cell model
``` swift
// create a cell model
let cellmodel = MYCellModel(cellClass: YourCell.self, userData: celldata) {
println("Did select")
}
// create a list of cell models from api results
let items = [...] // or your data from API
let cellmodels = items.map { item -> MYCellModel in
return MYCellModel(cellClass: YourCell.self, userData: item) {
println("Did select cell")
}
}
```
* Register cell, header, footer
``` swift
hakuba.registerCellNib(CellClassName)
hakuba.registerCellClass(CellClassName)
hakuba.registerHeaderFooterNib(HeaderOrFooterClassName)
hakuba.registerHeaderFooterClass(HeaderOrFooterClassName)
// register a list of cells by using variadic parameters
hakuba.registerCellNib(CellClass1.self, CellClass2.self, ..., CellClassN.self)
```
* Section header/footer
``` swift
let header = MYHeaderFooterViewModel(viewClass: CustomHeaderView.self, userData: yourData) {
println("Did select header view")
}
hakuba[Section.Top].header = header
// hide header in section 1
hakuba[Section.Center].header?.enabled = false
```
* Loadmore
``` swift
hakuba.loadmoreEnabled = true
hakuba.loadmoreHandler = {
// request api
// append new data
}
```
* Commit editing
``` swift
hakuba.commitEditingHandler = { [weak self] style, indexPath in
self?.hakuba[indexPath.section].remove(indexPath.row)
}
```
* Deselect all cells
``` swift
hakuba.deselectAllCells(animated: true)
```
* Dynamic cell height : when you want to enable dynamic cell height, you only need to set the value of estimated height to the `height` parameter and set `dynamicHeightEnabled = true`
``` swift
let cellmodel = MYCellModel(cellClass: YourCell.self, height: 50, userData: yourCellData) {
println("Did select cell")
}
cellmodel.dynamicHeightEnabled = true
```
* Callback methods in the cell class
``` swift
func willAppear(data: MYCellModel)
func didDisappear(data: MYCellModel)
```
Installation
-----
* Installation with CocoaPods
```
pod 'Hakuba'
```
* Copying all the files into your project
* Using submodule
Requirements
-----
- iOS 7.0+
- Xcode 6.1
License
-----
Hakuba is released under the MIT license. See LICENSE for details.
|
kelvincobanaj/mubu
|
Pods/Hakuba/README.md
|
Markdown
|
mit
| 6,196
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>equations: 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.0 / equations - 1.2+8.8</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
equations
<small>
1.2+8.8
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2021-12-07 06:33:16 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-07 06:33:16 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.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"
authors: [ "Matthieu Sozeau <matthieu.sozeau@inria.fr>" "Cyprien Mangin <cyprien.mangin@m4x.org>" ]
dev-repo: "git://github.com/mattam82/Coq-Equations.git"
maintainer: "matthieu.sozeau@inria.fr"
homepage: "https://mattam82.github.io/Coq-Equations"
bug-reports: "https://github.com/mattam82/Coq-Equations/issues"
license: "LGPL 2.1"
synopsis: "A function definition package for Coq"
description: """
Equations is a function definition plugin for Coq, that allows the
definition of functions by dependent pattern-matching and well-founded,
mutual or nested structural recursion and compiles them into core
terms. It automatically derives the clauses equations, the graph of the
function and its associated elimination principle.
"""
tags: [
"keyword:dependent pattern-matching"
"keyword:functional elimination"
"category:Miscellaneous/Coq Extensions"
"logpath:Equations"
]
build: [
["coq_makefile" "-f" "_CoqProject" "-o" "Makefile"]
[make "-j%{jobs}%"]
]
install: [
[make "install"]
]
depends: [
"coq" {>= "8.8.1" & < "8.9~"}
]
url {
src:
"https://github.com/mattam82/Coq-Equations/archive/v1.2-8.8.tar.gz"
checksum: "md5=d26591b9c27db6ed353d93ce54d97656"
}
</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-equations.1.2+8.8 coq.8.10.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.10.0).
The following dependencies couldn't be met:
- coq-equations -> coq < 8.9~ -> 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-equations.1.2+8.8</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://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
|
coq-bench/coq-bench.github.io
|
clean/Linux-x86_64-4.07.1-2.0.6/released/8.10.0/equations/1.2+8.8.html
|
HTML
|
mit
| 7,167
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>coinduction: 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 / coinduction - 1.2</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
coinduction
<small>
1.2
<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"
maintainer: "damien.pous@ens-lyon.fr"
homepage: "https://github.com/damien-pous/coinduction"
dev-repo: "git+https://github.com/damien-pous/coinduction.git"
bug-reports: "https://github.com/damien-pous/coinduction/issues"
license: "LGPL-3.0-or-later"
synopsis: "A library and plugin for doing proofs by (enhanced) coinduction"
description: """
Coinductive predicates are greatest fixpoints of monotone functions.
The `companion' makes it possible to enhance the associated coinduction scheme.
This library provides a formalisation on enhancements based on the companion, as well as tactics in making it straightforward to perform proofs by enhanced coinduction.
"""
build: [
[make "-j%{jobs}%" ]
]
install: [make "install"]
depends: [
"ocaml"
"coq" {(>= "8.13")}
]
tags: [
"keyword:coinduction"
"keyword:up to techniques"
"keyword:companion"
"logpath:Coinduction"
]
authors: [
"Damien Pous"
]
url {
src:
"https://github.com/damien-pous/coinduction/archive/v1.2.tar.gz"
checksum: "sha512=69112fac78d6f7205ad529fe7d397d87543ed165694b46c20eea77f7050fbec8cb05071dd294223c8fe93517ec56b70b7312685292bba2e9de8fde6bccabebe4"
}
</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-coinduction.1.2 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-coinduction -> coq >= 8.13
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-coinduction.1.2</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://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
|
coq-bench/coq-bench.github.io
|
clean/Linux-x86_64-4.09.1-2.0.6/released/8.11.1/coinduction/1.2.html
|
HTML
|
mit
| 6,965
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>bignums: 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.2 / bignums - 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>
bignums
<small>
8.6.0
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2021-12-09 02:26:46 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-09 02:26:46 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.2 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: "pierre.letouzey@inria.fr"
homepage: "https://github.com/coq/bignums"
dev-repo: "git+https://github.com/coq/bignums.git"
bug-reports: "https://github.com/coq/bignums/issues"
authors: [
"Laurent Théry"
"Benjamin Grégoire"
"Arnaud Spiwack"
"Evgeny Makarov"
"Pierre Letouzey"
]
license: "LGPL-2.1-only"
build: [
[make "-j%{jobs}%" {ocaml:version >= "4.06"}]
]
install: [
[make "install"]
]
depends: [
"ocaml"
"coq" {>= "8.6" & < "8.7~"}
]
tags: [
"keyword:integer numbers"
"keyword:rational numbers"
"keyword:arithmetic"
"keyword:arbitrary-precision"
"category:Miscellaneous/Coq Extensions"
"category:Mathematics/Arithmetic and Number Theory/Number theory"
"category:Mathematics/Arithmetic and Number Theory/Rational numbers"
"date:2017-06-15"
"logpath:Bignums"
]
synopsis: "Bignums, the Coq library of arbitrary large numbers"
description:
"Provides BigN, BigZ, BigQ that used to be part of Coq standard library < 8.7."
url {
src: "https://github.com/coq/bignums/archive/v8.6.0.tar.gz"
checksum: "md5=8200a64b50404a7f952e5ddd8047f646"
}
</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-bignums.8.6.0 coq.8.11.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.11.2).
The following dependencies couldn't be met:
- coq-bignums -> 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-bignums.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://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
|
coq-bench/coq-bench.github.io
|
clean/Linux-x86_64-4.08.1-2.0.5/released/8.11.2/bignums/8.6.0.html
|
HTML
|
mit
| 6,986
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Class: BodysizeTest</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
<script type="text/javascript">
// <![CDATA[
function popupCode( url ) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( "document.all." + id );
else
return false;
elemStyle = elem.style;
if ( elemStyle.display != "block" ) {
elemStyle.display = "block"
} else {
elemStyle.display = "none"
}
return true;
}
// Make codeblocks hidden by default
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
// ]]>
</script>
</head>
<body>
<div id="classHeader">
<table class="header-table">
<tr class="top-aligned-row">
<td><strong>Class</strong></td>
<td class="class-name-in-header">BodysizeTest</td>
</tr>
<tr class="top-aligned-row">
<td><strong>In:</strong></td>
<td>
<a href="../files/test/unit/bodysize_test_rb.html">
test/unit/bodysize_test.rb
</a>
<br />
</td>
</tr>
<tr class="top-aligned-row">
<td><strong>Parent:</strong></td>
<td>
ActiveSupport::TestCase
</td>
</tr>
</table>
</div>
<!-- banner header -->
<div id="bodyContent">
<div id="contextContent">
</div>
<div id="method-list">
<h3 class="section-bar">Methods</h3>
<div class="name-list">
<a href="#M000030">test_create_new</a>
<a href="#M000032">test_retrieve_unapproved_records</a>
<a href="#M000034">test_upload_image</a>
<a href="#M000033">test_upload_incorrect_filetype</a>
<a href="#M000031">test_validations</a>
<a href="#M000035">test_volume_set_upon_save</a>
</div>
</div>
</div>
<!-- if includes -->
<div id="section">
<!-- if method_list -->
<div id="methods">
<h3 class="section-bar">Public Instance methods</h3>
<div id="method-M000030" class="method-detail">
<a name="M000030"></a>
<div class="method-heading">
<a href="BodysizeTest.src/M000030.html" target="Code" class="method-signature"
onclick="popupCode('BodysizeTest.src/M000030.html');return false;">
<span class="method-name">test_create_new</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
<p>
This test is disabled until we know which attributes will be required def
test_invalid_with_empty_attributes
</p>
<pre>
bodysize = Bodysize.new
assert !bodysize.valid?, "Bodysize is not valid with empty attributes"
assert bodysize.errors.invalid?(:creator), "creator is required"
assert bodysize.errors.invalid?(:height), "height is required"
assert bodysize.errors.invalid?(:width), "width is required"
assert bodysize.errors.invalid?(:length), "length is required"
assert bodysize.errors.invalid?(:kingdom), "kingdom is required"
assert bodysize.errors.invalid?(:phylum), "phylum is required"
assert bodysize.errors.invalid?(:class_classification), "class_classification is required"
</pre>
<p>
end
</p>
</div>
</div>
<div id="method-M000032" class="method-detail">
<a name="M000032"></a>
<div class="method-heading">
<a href="BodysizeTest.src/M000032.html" target="Code" class="method-signature"
onclick="popupCode('BodysizeTest.src/M000032.html');return false;">
<span class="method-name">test_retrieve_unapproved_records</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000034" class="method-detail">
<a name="M000034"></a>
<div class="method-heading">
<a href="BodysizeTest.src/M000034.html" target="Code" class="method-signature"
onclick="popupCode('BodysizeTest.src/M000034.html');return false;">
<span class="method-name">test_upload_image</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000033" class="method-detail">
<a name="M000033"></a>
<div class="method-heading">
<a href="BodysizeTest.src/M000033.html" target="Code" class="method-signature"
onclick="popupCode('BodysizeTest.src/M000033.html');return false;">
<span class="method-name">test_upload_incorrect_filetype</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000031" class="method-detail">
<a name="M000031"></a>
<div class="method-heading">
<a href="BodysizeTest.src/M000031.html" target="Code" class="method-signature"
onclick="popupCode('BodysizeTest.src/M000031.html');return false;">
<span class="method-name">test_validations</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
</div>
</div>
<div id="method-M000035" class="method-detail">
<a name="M000035"></a>
<div class="method-heading">
<a href="BodysizeTest.src/M000035.html" target="Code" class="method-signature"
onclick="popupCode('BodysizeTest.src/M000035.html');return false;">
<span class="method-name">test_volume_set_upon_save</span><span class="method-args">()</span>
</a>
</div>
<div class="method-description">
</div>
</div>
</div>
</div>
<div id="validator-badges">
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>
</body>
</html>
|
NESCent/max-bodysize-evol
|
doc/rdoc/classes/BodysizeTest.html
|
HTML
|
mit
| 6,760
|
module GURPS
class Template
@modifiers = []
def initialize name
@name = name
end
def << modifier
@modifiers << modifier
end
def applyTo char
# Apply this template to a GURPS character.
@modifiers.each do |modifier|
modifier.applyTo char
end
char.templates << self
end
end
class PropertyModifier
def initialize prop, modifier, op="add"
@property = prop
@modifier = modifier
@operator = op
end
def applyTo char
if prop = char.try(@property.to_sym)
case @operator
when "add" then prop += @modifier
when "mult" then prop *= @modifier
end
end
end
end
module TemplateShorthands
# @todo Fill this in.
def template templ_name
send templ_name
end
end
end
|
AlexSafatli/gurps
|
lib/gurps/template.rb
|
Ruby
|
mit
| 840
|
package org.karoglan.tollainmear.signeditor.commandexecutor;
import org.karoglan.tollainmear.signeditor.KSECommandManager;
import org.karoglan.tollainmear.signeditor.KSERecordsManager;
import org.karoglan.tollainmear.signeditor.KaroglanSignEditor;
import org.karoglan.tollainmear.signeditor.utils.Translator;
import org.spongepowered.api.command.CommandException;
import org.spongepowered.api.command.CommandResult;
import org.spongepowered.api.command.CommandSource;
import org.spongepowered.api.command.args.CommandContext;
import org.spongepowered.api.command.spec.CommandExecutor;
import org.spongepowered.api.text.serializer.TextSerializers;
import java.io.IOException;
public class ReloadExecutor implements CommandExecutor {
private KSERecordsManager rm;
private KaroglanSignEditor kse = KaroglanSignEditor.getInstance();
@Override
public CommandResult execute(CommandSource src, CommandContext args) throws CommandException {
kse = KaroglanSignEditor.getInstance();
rm = KaroglanSignEditor.getInstance().getKSERecordsManager();
try {
kse.cfgInit();
rm.init();
kse.setTranslator(new Translator(kse));
kse.getTranslator().checkUpdate();
kse.setKseCmdManager(new KSECommandManager(kse));
} catch (IOException e) {
e.printStackTrace();
}
src.sendMessage(TextSerializers.FORMATTING_CODE.deserialize(kse.getTranslator().getstring("message.KSEprefix")+kse.getTranslator().getstring("message.reload")));
return CommandResult.success();
}
}
|
Tollainmear/KaroglanSignEditor
|
src/main/java/org/karoglan/tollainmear/signeditor/commandexecutor/ReloadExecutor.java
|
Java
|
mit
| 1,591
|
package gl8080.lifegame.web.resource;
import java.net.URI;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
import javax.ws.rs.core.UriBuilder;
import gl8080.lifegame.application.definition.RegisterGameDefinitionService;
import gl8080.lifegame.application.definition.RemoveGameDefinitionService;
import gl8080.lifegame.application.definition.SearchGameDefinitionService;
import gl8080.lifegame.application.definition.UpdateGameDefinitionService;
import gl8080.lifegame.logic.definition.GameDefinition;
import gl8080.lifegame.util.Maps;
@Path("/game/definition")
@ApplicationScoped
public class GameDefinitionResource {
@Inject
private RegisterGameDefinitionService registerService;
@Inject
private SearchGameDefinitionService searchService;
@Inject
private UpdateGameDefinitionService saveService;
@Inject
private RemoveGameDefinitionService removeService;
@POST
@Produces(MediaType.APPLICATION_JSON)
public Response register(@QueryParam("size") int size) {
GameDefinition gameDefinition = this.registerService.register(size);
long id = gameDefinition.getId();
URI uri = UriBuilder
.fromResource(GameDefinitionResource.class)
.path(GameDefinitionResource.class, "search")
.build(id);
return Response
.created(uri)
.entity(Maps.map("id", id))
.build();
}
@GET
@Path("/{id}")
@Produces(MediaType.APPLICATION_JSON)
public LifeGameDto search(@PathParam("id") long id) {
GameDefinition gameDefinition = this.searchService.search(id);
return LifeGameDto.of(gameDefinition);
}
@PUT
@Path("/{id}")
@Consumes(MediaType.APPLICATION_JSON)
public Response update(LifeGameDto dto) {
if (dto == null) {
return Response.status(Status.BAD_REQUEST).build();
}
GameDefinition gameDefinition = this.saveService.update(dto);
return Response.ok()
.entity(Maps.map("version", gameDefinition.getVersion()))
.build();
}
@DELETE
@Path("/{id}")
public Response remove(@PathParam("id") long id) {
this.removeService.remove(id);
return Response.noContent().build();
}
}
|
opengl-8080/lifegame-javaee
|
src/main/java/gl8080/lifegame/web/resource/GameDefinitionResource.java
|
Java
|
mit
| 2,858
|
# - Define useful macros
#
# A custom compile definition "DEVELOPER_<CONFIG>" is set on
# each target using the target property COMPILE_DEFINITIONS_<CONFIG>
# target property
if(__MACROLIBRARYTARGETS_ISLOADED)
return()
endif()
set(__MACROLIBRARYTARGETS_ISLOADED TRUE)
include(CMakeParseArguments)
include(MacroDefineModule)
#-----------------------------------------------------------------------
# function compile_definitions_config(<target>)
# Set a custom compile definition for a target on a
# per configuration basis:
# For mode <CONFIG>, define DEVELOPER_<CONFIG>
#
function(compile_definitions_config _target)
if(NOT TARGET ${_target})
message(FATAL_ERROR "compile_definitions_config passed target '${_target}' which is not a valid CMake target")
endif()
if(CMAKE_CONFIGURATION_TYPES)
# - Multimode tools
foreach(_mode ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER ${_mode} _mode_upper)
set_property(TARGET ${_target}
APPEND PROPERTY COMPILE_DEFINITIONS_${_mode_upper}
DEVELOPER_${_mode_upper})
endforeach()
elseif(CMAKE_BUILD_TYPE)
# - Single mode tools, only if set
string(TOUPPER ${CMAKE_BUILD_TYPE} _mode_upper)
set_property(TARGET ${_target}
APPEND PROPERTY COMPILE_DEFINITIONS_${_mode_upper}
DEVELOPER_${_mode_upper})
endif()
endfunction()
#-----------------------------------------------------------------------
# - OBJECT_TARGET
# General build of a library target
#
macro(OBJECT_TARGET)
cmake_parse_arguments(OBJTARG
""
"NAME"
"SOURCES"
${ARGN}
)
# We have to distinguish the static from shared lib, so use -static in
# name. Link its dependencies, and ensure we actually link to the
# -static targets (We should strictly do this for the external
# libraries as well if we want a pure static build).
add_library(${OBJTARG_NAME} OBJECT ${OBJTARG_SOURCES})
compile_definitions_config(${OBJTARG_NAME})
target_compile_features(${OBJTARG_NAME} PUBLIC ${${PROJECT_NAME}_TARGET_COMPILE_FEATURES})
# from DEFINE_MODULE
get_property(SOURCE_GROUPS GLOBAL PROPERTY SOURCE_GROUPS)
foreach(_src_grp ${SOURCE_GROUPS})
get_property(HEADER_FOLDER GLOBAL PROPERTY ${_src_grp}_HEADER_FOLDER)
get_property(SOURCE_FOLDER GLOBAL PROPERTY ${_src_grp}_SOURCE_FOLDER)
get_property(HEADER_FILES GLOBAL PROPERTY ${_src_grp}_HEADER_FILES)
get_property(SOURCE_FILES GLOBAL PROPERTY ${_src_grp}_SOURCE_FILES)
source_group("${HEADER_FOLDER}" FILES ${HEADER_FILES})
source_group("${SOURCE_FOLDER}" FILES ${SOURCE_FILES})
endforeach()
set_property(GLOBAL APPEND
PROPERTY OBJECT_TARGETS ${OBJTARGET_NAME})
endmacro()
#-----------------------------------------------------------------------
# - LIBRARY_TARGET
# General build of a library target
#
macro(LIBRARY_TARGET)
cmake_parse_arguments(LIBTARG
"STATIC;SHARED"
"NAME"
"SOURCES;LINK_LIBRARIES"
${ARGN}
)
set(TARGET_TAG shared)
set(TARGET_TYPE SHARED)
if(LIBTARG_STATIC)
set(TARGET_TAG static)
set(TARGET_TYPE STATIC)
endif()
set(LIBTARGET ${LIBTARG_NAME}-${TARGET_TAG})
# We have to distinguish the static from shared lib, so use -static in
# name. Link its dependencies, and ensure we actually link to the
# -static targets (We should strictly do this for the external
# libraries as well if we want a pure static build).
add_library(${LIBTARGET} ${TARGET_TYPE} ${LIBTARG_SOURCES})
compile_definitions_config(${LIBTARGET})
target_compile_features(${LIBTARGET} PUBLIC ${${PROJECT_NAME}_TARGET_COMPILE_FEATURES})
target_link_libraries(${LIBTARGET} ${LIBTARG_LINK_LIBRARIES})
# But we can rename the output library to the correct name
# On WIN32 we *retain* the -static postfix because otherwise
# we'll conflict with the .lib from the DLL build...
# We could also install differently...
#if(NOT WIN32)
# set_target_properties(${LIBTARG}
# PROPERTIES OUTPUT_NAME ${LIBTARG_NAME})
#endif()
if(LIBTARG_STATIC)
set_target_properties(${LIBTARGET} PROPERTIES
CLEAN_DIRECT_OUTPUT 1
LINKER_LANGUAGE CXX
OUTPUT_NAME ${LIBTARG_NAME}
INSTALL_NAME_DIR ${CMAKE_INSTALL_FULL_LIBDIR}
LINK_FLAGS "${EXTERNAL_CXX_LINK_FLAGS}"
)
else(LIBTARG_STATIC)
set_target_properties(${LIBTARGET} PROPERTIES
CLEAN_DIRECT_OUTPUT 1
LINKER_LANGUAGE CXX
OUTPUT_NAME ${LIBTARG_NAME}
INSTALL_NAME_DIR ${CMAKE_INSTALL_FULL_LIBDIR}
LINK_FLAGS "${EXTERNAL_CXX_LINK_FLAGS}"
VERSION "${${PROJECT_NAME}_MAJOR_VERSION}.${${PROJECT_NAME}_MINOR_VERSION}"
SOVERSION "${${PROJECT_NAME}_MAJOR_VERSION}"
)
endif(LIBTARG_STATIC)
install(TARGETS ${LIBTARGET}
EXPORT LibraryDepends
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT Runtime
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Runtime
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT Development)
set_property(GLOBAL APPEND
PROPERTY EXPORTED_TARGETS ${LIBTARGET})
endmacro()
#-----------------------------------------------------------------------
# - HEADER_TARGET
# General build of a header-only target
#
macro(HEADER_TARGET)
cmake_parse_arguments(HEADTARG
""
"NAME"
"SOURCES;LINK_LIBRARIES"
${ARGN}
)
# We have to distinguish the static from shared lib, so use -static in
# name. Link its dependencies, and ensure we actually link to the
# -static targets (We should strictly do this for the external
# libraries as well if we want a pure static build).
if(BUILD_SHARED_LIBS)
add_library(${HEADTARG_NAME} SHARED ${HEADTARG_SOURCES})
target_compile_features(${HEADTARG_NAME} PUBLIC ${${PROJECT_NAME}_TARGET_COMPILE_FEATURES})
endif()
if(BUILD_STATIC_LIBS)
add_library(${HEADTARG_NAME}-static STATIC ${HEADTARG_SOURCES})
target_compile_features(${HEADTARG_NAME}-static PUBLIC
${${PROJECT_NAME}_TARGET_COMPILE_FEATURES})
endif()
# from DEFINE_MODULE
get_property(SOURCE_GROUPS GLOBAL PROPERTY SOURCE_GROUPS)
foreach(_src_grp ${SOURCE_GROUPS})
get_property(HEADER_FOLDER GLOBAL PROPERTY ${_src_grp}_HEADER_FOLDER)
get_property(SOURCE_FOLDER GLOBAL PROPERTY ${_src_grp}_SOURCE_FOLDER)
get_property(HEADER_FILES GLOBAL PROPERTY ${_src_grp}_HEADER_FILES)
get_property(SOURCE_FILES GLOBAL PROPERTY ${_src_grp}_SOURCE_FILES)
source_group("${HEADER_FOLDER}" FILES ${HEADER_FILES})
source_group("${SOURCE_FOLDER}" FILES ${SOURCE_FILES})
endforeach()
if(BUILD_SHARED_LIBS)
set_target_properties(${HEADTARG_NAME}
PROPERTIES
LINKER_LANGUAGE CXX )
endif()
if(BUILD_STATIC_LIBS)
set_target_properties(${HEADTARG_NAME}-static
PROPERTIES
LINKER_LANGUAGE CXX )
endif()
endmacro()
#-----------------------------------------------------------------------
# - GLOBAL_OBJECT_TARGET
# Build and install of a category library
#
MACRO(GLOBAL_OBJECT_TARGET)
CMAKE_PARSE_ARGUMENTS(GLOBOBJ
"INSTALL_HEADERS"
"NAME"
"COMPONENTS"
${ARGN}
)
# We loop over the component sources one at a time,
# appending properties as we go.
foreach(_comp ${GLOBOBJ_COMPONENTS})
include(${_comp})
# In case we have a global lib with one component, ensure name gets set
if(NOT GLOBOBJ_NAME)
set(GLOBOBJ_NAME ${MODULE_NAME})
endif()
list(APPEND ${GLOBOBJ_NAME}_GLOBAL_SOURCES ${${MODULE_NAME}_SOURCES})
list(APPEND ${GLOBOBJ_NAME}_GLOBAL_HEADERS ${${MODULE_NAME}_HEADERS})
list(APPEND ${GLOBOBJ_NAME}_LINK_LIBRARIES ${${MODULE_NAME}_LINK_LIBRARIES})
list(APPEND ${GLOBOBJ_NAME}_BUILDTREE_INCLUDES ${${MODULE_NAME}_INCDIR})
endforeach()
# Filter out duplicates in LINK_LIBRARIES
if(${GLOBOBJ_NAME}_LINK_LIBRARIES)
list(REMOVE_DUPLICATES ${GLOBOBJ_NAME}_LINK_LIBRARIES)
endif()
OBJECT_TARGET(NAME ${GLOBOBJ_NAME}
SOURCES
${${GLOBOBJ_NAME}_GLOBAL_SOURCES}
${${GLOBOBJ_NAME}_GLOBAL_HEADERS}
)
set_property(GLOBAL APPEND
PROPERTY GLOBAL_OBJECT_TARGETS \$<TARGET_OBJECTS:${GLOBOBJ_NAME}>)
# Header install?
if(GLOBOBJ_INSTALL_HEADERS)
foreach(_header ${${GLOBOBJ_NAME}_GLOBAL_HEADERS})
file(RELATIVE_PATH _fpath "${CMAKE_CURRENT_LIST_DIR}" "${_header}")
get_filename_component(_fpath ${_fpath} PATH)
install(FILES ${_header}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/${_fpath}
COMPONENT Development)
endforeach()
endif()
# Store the include path of the component so that the build tree
# config file can pick up all needed header paths
set_property(GLOBAL APPEND
PROPERTY BUILDTREE_INCLUDE_DIRS ${${GLOBOBJ_NAME}_BUILDTREE_INCLUDES})
set_property(GLOBAL APPEND
PROPERTY INSTALL_HEADER_FILES ${${GLOBOBJNAME}_GLOBAL_HEADERS})
ENDMACRO()
#-----------------------------------------------------------------------
# - GLOBAL_LIBRARY_TARGET
# Build and install of a category library
#
MACRO(GLOBAL_LIBRARY_TARGET)
CMAKE_PARSE_ARGUMENTS(GLOBLIB
"SHARED;STATIC"
"NAME"
"COMPONENTS"
${ARGN}
)
set(GLOBLIB_TYPE SHARED)
set(LIBTARGET ${GLOBLIB_NAME}-shared)
if(GLOBLIB_STATIC)
set(GLOBLIB_TYPE STATIC)
set(LIBTARGET ${GLOBLIB_NAME}-static)
endif()
# We loop over the component sources one at a time,
# appending properties as we go.
foreach(_comp ${GLOBLIB_COMPONENTS})
include(${_comp})
# In case we have a global lib with one component, ensure name gets set
if(NOT GLOBLIB_NAME)
set(GLOBLIB_NAME ${MODULE_NAME})
endif()
list(APPEND ${GLOBLIB_NAME}_GLOBAL_SOURCES ${${MODULE_NAME}_SOURCES})
list(APPEND ${GLOBLIB_NAME}_GLOBAL_HEADERS ${${MODULE_NAME}_HEADERS})
list(APPEND ${GLOBLIB_NAME}_LINK_LIBRARIES ${${MODULE_NAME}_LINK_LIBRARIES})
list(APPEND ${GLOBLIB_NAME}_BUILDTREE_INCLUDES ${${MODULE_NAME}_INCDIR})
endforeach()
# Filter out duplicates in LINK_LIBRARIES
if(${GLOBLIB_NAME}_LINK_LIBRARIES)
list(REMOVE_DUPLICATES ${GLOBLIB_NAME}_LINK_LIBRARIES)
endif()
# Now add the library target
LIBRARY_TARGET(NAME ${GLOBLIB_NAME}
${GLOBLIB_TYPE}
SOURCES
${${GLOBLIB_NAME}_GLOBAL_SOURCES}
${${GLOBLIB_NAME}_GLOBAL_HEADERS}
LINK_LIBRARIES
${${GLOBOBJ_NAME}_LINK_LIBRARIES}
)
set_property(GLOBAL APPEND
PROPERTY GLOBAL_EXPORTED_TARGETS ${LIBTARGET})
# Header install?
install(FILES ${${GLOBLIB_NAME}_GLOBAL_HEADERS}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}
COMPONENT Development)
# Store the include path of the component so that the build tree
# config file can pick up all needed header paths
set_property(GLOBAL APPEND
PROPERTY BUILDTREE_INCLUDE_DIRS ${${GLOBLIB_NAME}_BUILDTREE_INCLUDES})
ENDMACRO()
#-----------------------------------------------------------------------
# - GLOBAL_HEADER_TARGET
# Build and install of a category library
#
MACRO(GLOBAL_HEADER_TARGET)
CMAKE_PARSE_ARGUMENTS(GLOBHEAD
""
"NAME"
"COMPONENTS"
${ARGN}
)
# We loop over the component sources one at a time,
# appending properties as we go.
foreach(_comp ${GLOBHEAD_COMPONENTS})
include(${_comp})
# In case we have a global lib with one component, ensure name gets set
if(NOT GLOBHEAD_NAME)
set(GLOBHEAD_NAME ${MODULE_NAME})
endif()
list(APPEND ${GLOBHEAD_NAME}_GLOBAL_SOURCES ${${MODULE_NAME}_SOURCES})
list(APPEND ${GLOBHEAD_NAME}_GLOBAL_HEADERS ${${MODULE_NAME}_HEADERS})
list(APPEND ${GLOBHEAD_NAME}_LINK_LIBRARIES ${${MODULE_NAME}_LINK_LIBRARIES})
list(APPEND ${GLOBHEAD_NAME}_BUILDTREE_INCLUDES ${${MODULE_NAME}_INCDIR})
endforeach()
# Filter out duplicates in LINK_LIBRARIES
if(${GLOBHEAD_NAME}_LINK_LIBRARIES)
list(REMOVE_DUPLICATES ${GLOBHEAD_NAME}_LINK_LIBRARIES)
endif()
HEADER_TARGET(NAME ${GLOBHEAD_NAME}
SOURCES
${${GLOBHEAD_NAME}_GLOBAL_SOURCES}
${${GLOBHEAD_NAME}_GLOBAL_HEADERS}
LINK_LIBRARIES
${${GLOBHEAD_NAME}_LINK_LIBRARIES}
)
if(BUILD_SHARED_LIBS)
set_property(GLOBAL APPEND
PROPERTY GLOBAL_EXPORTED_TARGETS ${GLOBHEAD_NAME})
elseif(BUILD_STATIC_LIBS)
set_property(GLOBAL APPEND
PROPERTY GLOBAL_EXPORTED_TARGETS ${GLOBHEAD_NAME}-static)
endif()
# Header install?
install(FILES ${${GLOBHEAD_NAME}_GLOBAL_HEADERS}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}
COMPONENT Development)
# Store the include path of the component so that the build tree
# config file can pick up all needed header paths
set_property(GLOBAL APPEND
PROPERTY BUILDTREE_INCLUDE_DIRS ${${GLOBHEAD_NAME}_BUILDTREE_INCLUDES})
ENDMACRO()
|
jrmadsen/madthreading
|
cmake/Modules/MacroLibraryTargets.cmake
|
CMake
|
mit
| 13,917
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>io-list: 17 s 🏆</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / released</a></li>
<li class="active"><a href="">8.13.0 / io-list - 1.1.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
io-list
<small>
1.1.0
<span class="label label-success">17 s 🏆</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2021-12-22 08:53:51 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-22 08:53: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 3 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.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
zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers
# opam file:
opam-version: "2.0"
maintainer: "dev@clarus.me"
homepage: "https://github.com/clarus/io-list"
dev-repo: "git+https://github.com/clarus/io-list.git"
bug-reports: "https://github.com/clarus/io-list/issues"
authors: ["Guillaume Claret"]
license: "MIT"
build: [
["./configure.sh"]
[make "-j%{jobs}%"]
]
install: [
[make "install"]
]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/Io/List.vo"]
depends: [
"ocaml"
"coq" {>= "8.4pl4"}
"coq-io" {>= "3.1.0" & < "4"}
]
synopsis: "Generic functions on lists with effects"
flags: light-uninstall
url {
src: "https://github.com/coq-io/list/archive/1.1.0.tar.gz"
checksum: "md5=5c4c7c9c32155b1ac9f49bb0fea581df"
}
</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-io-list.1.1.0 coq.8.13.0</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-io-list.1.1.0 coq.8.13.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>18 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-io-list.1.1.0 coq.8.13.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>17 s</dd>
</dl>
<h2>Installation size</h2>
<p>Total: 27 K</p>
<ul>
<li>19 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/Io/List.vo</code></li>
<li>6 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/Io/List.glob</code></li>
<li>1 K <code>../ocaml-base-compiler.4.07.1/lib/coq/user-contrib/Io/List.v</code></li>
</ul>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq-io-list.1.1.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://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
|
coq-bench/coq-bench.github.io
|
clean/Linux-x86_64-4.07.1-2.0.6/released/8.13.0/io-list/1.1.0.html
|
HTML
|
mit
| 6,772
|
#!/usr/bin/perl
use strict;
use warnings;
use CGI;
# retruns a hash with year, day, etc. as key
# eg. { DAY => 52, HOUR => 16, MIN => 6, SEC => 56}
sub uptime()
{
if (open(UPTIME, '/proc/uptime')) {
my $uptime = <UPTIME>;
close(UPTIME);
my $secs = (split /\s+/,$uptime)[0];
my %retval = (
"DAY" => int($secs/(24*60*60)),
"HOUR" => ($secs/(60*60))%24,
"MIN" => ($secs/60)%60,
"SEC" => $secs%60
);
return %retval;
}
}
# get_dist returns a string with running distribution (read from /etc/system-release)
sub get_dist()
{
if (open(INFO, '/etc/system-release')) {
my $distribution = <INFO>;
close(INFO);
$distribution =~ s/\R//g;
return $distribution;
}
}
# load() returns load of server
sub load()
{
if (open(LOAD, '/proc/loadavg')) {
my $loadavg = <LOAD>;
close(LOAD);
$loadavg =~ s/^((\d+\.\d+\s){3}).*\n$/$1/;
return $loadavg;
}
}
# cpu_info() returns a hash with info about CPU:
# { "CPUS" => <number of cpus>, "CORES" = <cores per cpu> }
sub cpu_info
{
my $NUM = 0;
my %PHYS;
open(CPU, '/proc/cpuinfo');
while (<CPU>) {
chomp;
if (/^processor\s*:.*$/) {
$NUM +=1;
} elsif (/^physical id\s*: (.*)$/) {
$PHYS{$1} = undef;
}
}
close CPU;
my $cpus = scalar(keys %PHYS);
if ( $cpus == 0 ) {
$cpus = 1;
}
my $cores = int($NUM/$cpus);
my %retval = (
"CPUS" => $cpus,
"CORES" => $cores,
);
return %retval;
}
# num_processes() returns a number of running processes
sub ps()
{
my @retval;
my @output = `/bin/ps aux`;
foreach my $line (@output) {
my($uid,$pid,$cpu,$mem,$vsz,$rss,$tty,$stat,$start,$time,$command) = split(/\s+/, $line, 11);
push(@retval, {
"uid" => $uid,
"pid" => $pid,
"cpu" => $cpu,
"mem" => $mem,
"vsz" => $vsz,
"rss" => $rss,
"stat" => $stat,
"start" => $start,
"time" => $time,
"cmd" => $command,
});
}
shift @retval;
return @retval;
}
# num_files() returns a number of opened files on a system
sub num_files()
{
my @list = `/usr/sbin/lsof`;
return scalar(@list) - 1;
}
# logged_users() returns simple info about logged in users
sub logged_users()
{
my @retval;
my @output = `/usr/bin/who -u`;
foreach my $line (@output) {
my ($name,$term,$date,$time) = split /\s+/, $line;
push(@retval, {
"name" => $name,
"term" => $term,
"date" => $date,
"time" => $time,
});
}
return @retval;
}
# memory() returns a hash with info about system memory
# keys: MEMTOTAL, MEMINFO
sub memory()
{
my $MEMTOTAL;
my $MEMFREE;
my %retval;
open(MEM, '/proc/meminfo');
while (<MEM>) {
chomp;
if (/^MemTotal:\s+(\d+)/) {
$MEMTOTAL = sprintf("%.0f", $1/1024);
} elsif (/^MemFree:\s+(\d+)/) {
$MEMFREE = sprintf("%.0f", $1/1024);
} elsif (/^Buffers:\s+(\d+)/) {
$MEMFREE += sprintf("%.0f", $1/1024);
} elsif (/^Cached:\s+(\d+)/) {
$MEMFREE += sprintf("%.0f", $1/1024);
}
}
%retval = (
"MEMTOTAL" => $MEMTOTAL,
"MEMFREE" => $MEMFREE,
);
return %retval;
}
# let's create a web page
my $q = CGI->new();
$ENV{'LANG'} = 'en_US.utf8';
my %uptime = uptime();
my %cpuinfo = cpu_info();
my %memory = memory();
my @ps = ps();
my @users = logged_users();
print $q->header(-charset=>'utf-8'),
$q->start_html({-title=>'sysinfo', -style=>{-src=>['bootstrap.min.css'], -media=>'all'}}),
$q->start_div({-class=>"container"}),
$q->h1("System info"),
$q->start_dl({-class=>"dl-horizontal"}),
$q->dt("Distribution"),
$q->dd(get_dist()),
$q->dt("CPUs"),
$q->dd($cpuinfo{'CPUS'}),
$q->dt("Cores per CPU"),
$q->dd($cpuinfo{"CORES"}),
$q->dt("Memory"),
$q->dd("Total: $memory{'MEMTOTAL'}, Free: $memory{'MEMFREE'}"),
$q->dt("Load"),
$q->dd(load()),
$q->dt("Uptime"),
$q->dd("$uptime{'DAY'} days, $uptime{'HOUR'} hours, $uptime{'MIN'} minutes and $uptime{'SEC'} seconds"),
$q->dt("No. of open files"),
$q->dd(num_files()),
$q->dt("No. of processes"),
$q->dd(scalar @ps),
$q->end_dl();
print $q->h3("Logged users:"),
$q->start_table({-class=>"table table-striped"}),
$q->start_Tr,
$q->th("Name"),
$q->th("Term"),
$q->th("Date"),
$q->th("Time"),
$q->end_Tr;
foreach (@users) {
print $q->start_Tr,
$q->td($_->{name}),
$q->td($_->{term}),
$q->td($_->{date}),
$q->td($_->{time}),
$q->end_Tr;
};
print $q->end_table();
print $q->h3("Running processes:"),
$q->start_table({-class=>"table table-striped"}),
$q->start_Tr,
$q->th("UID"),
$q->th("PID"),
$q->th("%CPU"),
$q->th("%MEM"),
$q->th("STAT"),
$q->th("START"),
$q->th("TIME"),
$q->th("COMMAND"),
$q->end_Tr;
foreach (@ps) {
print $q->start_Tr,
$q->td($_->{uid}),
$q->td($_->{pid}),
$q->td($_->{cpu}),
$q->td($_->{mem}),
$q->td($_->{stat}),
$q->td($_->{start}),
$q->td($_->{time}),
$q->td($q->code($_->{cmd})),
$q->end_Tr;
};
print $q->end_table(),
$q->end_div(),
$q->end_html();
|
jakubjedelsky/puppet-monit-httpd
|
modules/httpd/files/index.pl
|
Perl
|
mit
| 6,189
|
package edacc.parameterspace.domain;
import java.util.LinkedList;
import java.util.List;
import java.util.Random;
@SuppressWarnings("serial")
public class RealDomain extends Domain {
protected Double low, high;
public static final String name = "Real";
@SuppressWarnings("unused")
private RealDomain() {
}
public RealDomain(Double low, Double high) {
this.low = low;
this.high = high;
}
public RealDomain(Integer low, Integer high) {
this.low = Double.valueOf(low);
this.high = Double.valueOf(high);
}
@Override
public boolean contains(Object value) {
if (!(value instanceof Number)) return false;
double d = ((Number)value).doubleValue();
return d >= this.low && d <= this.high;
}
@Override
public Object randomValue(Random rng) {
return rng.nextDouble() * (this.high - this.low) + this.low;
}
@Override
public String toString() {
return "[" + this.low + "," + this.high + "]";
}
public Double getLow() {
return low;
}
public void setLow(Double low) {
this.low = low;
}
public Double getHigh() {
return high;
}
public void setHigh(Double high) {
this.high = high;
}
@Override
public Object mutatedValue(Random rng, Object value) {
return mutatedValue(rng, value, 0.1f);
}
@Override
public Object mutatedValue(Random rng, Object value, float stdDevFactor) {
if (!contains(value)) return value;
double r = rng.nextGaussian() * ((high - low) * stdDevFactor);
return Math.min(Math.max(this.low, ((Number)value).doubleValue() + r), this.high);
}
@Override
public List<Object> getDiscreteValues() {
List<Object> values = new LinkedList<Object>();
for (double d = low; d <= high; d += (high - low) / 100.0f) {
values.add(d);
}
return values;
}
@Override
public String getName() {
return name;
}
@Override
public List<Object> getGaussianDiscreteValues(Random rng, Object value,
float stdDevFactor, int numberSamples) {
List<Object> vals = new LinkedList<Object>();
for (int i = 0; i < numberSamples; i++) {
vals.add(mutatedValue(rng, value, stdDevFactor));
}
return vals;
}
@Override
public List<Object> getUniformDistributedValues(int numberSamples) {
List<Object> vals = new LinkedList<Object>();
double dist = (high - low) / (double) (numberSamples-1);
double cur = low;
for (int i = 0; i < numberSamples; i++) {
if (i == numberSamples -1)
cur = high;
vals.add(cur);
cur += dist;
}
return vals;
}
@Override
public Object getMidValueOrNull(Object o1, Object o2) {
if (!(o1 instanceof Double) || !(o2 instanceof Double))
return null;
Double d1 = (Double) o1;
Double d2 = (Double) o2;
if (d1.equals(d2)) {
return null;
}
return (d1+d2) / 2;
}
}
|
EDACC/edacc_api
|
src/edacc/parameterspace/domain/RealDomain.java
|
Java
|
mit
| 2,816
|
'use strict';
const isUriStringCheck = require('../strCheck');
/**
* First test if the argument passed in is a String. If true, get page version from uri.
* Otherwise throw an error.
* @example /pages/foo/@published returns published
* @param {string} uri
* @return {string|null}
*/
module.exports = function (uri) {
isUriStringCheck.strCheck(uri);
const result = /\/pages\/.+?@(.+)/.exec(uri);
return result && result[1];
};
|
nymag/clay-utils
|
lib/getPageVersion/index.js
|
JavaScript
|
mit
| 442
|
//# sourceMappingURL=request-constructor.js.map
|
jlberrocal/ng2-dynatable
|
src/interfaces/request-constructor.js
|
JavaScript
|
mit
| 47
|
using Base: promote_eltype
using Base.Broadcast: check_broadcast_shape, broadcast_shape
using Base.Cartesian
if VERSION >= v"0.5.0-dev+5189"
_to_shape(dims::Base.DimsOrInds) = map(_to_shape, dims)
_to_shape(r::Base.OneTo) = Int(last(r))
else
_to_shape(x) = x
end
if VERSION < v"0.5.0-dev+5434"
function gen_nullcheck(narrays::Int, nd::Int)
e_nullcheck = macroexpand(:( @nref $nd isnull_1 d->j_d_1 ))
for k = 2:narrays
isnull = Symbol("isnull_$k")
j_d_k = Symbol("j_d_$k")
e_isnull_k = macroexpand(:( @nref $nd $(isnull) d->$(j_d_k) ))
e_nullcheck = Expr(:||, e_nullcheck, e_isnull_k)
end
return e_nullcheck
end
function gen_broadcast_body(nd::Int, narrays::Int, f, lift::Bool)
F = Expr(:quote, f)
e_nullcheck = gen_nullcheck(narrays, nd)
if lift
return quote
# set up aliases to facilitate subsequent Base.Cartesian magic
B_isnull = B.isnull
@nexprs $narrays k->(values_k = A_k.values)
@nexprs $narrays k->(isnull_k = A_k.isnull)
# check size
@assert ndims(B) == $nd
@ncall $narrays check_broadcast_shape size(B) k->A_k
# main loops
@nloops($nd, i, B,
d->(@nexprs $narrays k->(j_d_k = size(A_k, d) == 1 ? 1 : i_d)), # pre
begin # body
if $e_nullcheck
@inbounds (@nref $nd B_isnull i) = true
else
@nexprs $narrays k->(@inbounds v_k = @nref $nd values_k d->j_d_k)
@inbounds (@nref $nd B i) = (@ncall $narrays $F v)
end
end
)
end
else
return Base.Broadcast.gen_broadcast_body_cartesian(nd, narrays, f)
end
end
function gen_broadcast_function(nd::Int, narrays::Int, f, lift::Bool)
As = [Symbol("A_"*string(i)) for i = 1:narrays]
body = gen_broadcast_body(nd, narrays, f, lift)
@eval let
local _F_
function _F_(B, $(As...))
$body
end
_F_
end
end
function Base.broadcast!(f, X::NullableArray; lift::Bool=false)
broadcast!(f, X, X; lift=lift)
end
@eval let cache = Dict{Any, Dict{Bool, Dict{Int, Dict{Int, Any}}}}()
@doc """
`broadcast!(f, B::NullableArray, As::NullableArray...; lift::Bool=false)`
This method implements the same behavior as that of `broadcast!` when called on
regular `Array` arguments. It also includes the `lift` keyword argument, which
when set to true will lift `f` over the entries of the `As`.
Lifting is disabled by default. Note that this method's signature specifies
the destination `B` array as well as the source `As` arrays as all
`NullableArray`s. Thus, calling `broadcast!` on a arguments consisting
of both `Array`s and `NullableArray`s will fall back to the implementation
of `broadcast!` in `base/broadcast.jl`.
""" ->
function Base.broadcast!(f, B::NullableArray, As::NullableArray...; lift::Bool=false)
nd = ndims(B)
narrays = length(As)
cache_f = Base.@get! cache f Dict{Bool, Dict{Int, Dict{Int, Any}}}()
cache_lift = Base.@get! cache_f lift Dict{Int, Dict{Int, Any}}()
cache_f_na = Base.@get! cache_lift narrays Dict{Int, Any}()
func = Base.@get! cache_f_na nd gen_broadcast_function(nd, narrays, f, lift)
func(B, As...)
return B
end
end # let cache
else
using Base.Broadcast: newindexer, map_newindexer, newindex
function _nullcheck(nargs)
nullcheck = :(isnull_1[I_1])
for i in 2:nargs
sym_isnull = Symbol("isnull_$i")
sym_idx = Symbol("I_$i")
nullcheck = Expr(:||, :($sym_isnull[$sym_idx]), nullcheck)
end
# if 0 argument arrays, treat nullcheck as though it returns false
nargs >= 1 ? nullcheck : :(false)
end
@generated function Base.Broadcast._broadcast!{K,ID,XT,nargs}(f,
Z::NullableArray, keeps::K, Idefaults::ID, Xs::XT, ::Type{Val{nargs}}; lift=false)
nullcheck = _nullcheck(nargs)
quote
T = eltype(Z)
$(Expr(:meta, :noinline))
# destructure keeps and Xs tuples (common to both lifted and non-lifted broadcast)
@nexprs $nargs i->(keep_i = keeps[i])
@nexprs $nargs i->(Idefault_i = Idefaults[i])
if !lift
# destructure the keeps and As tuples
@nexprs $nargs i->(X_i = Xs[i])
@simd for I in CartesianRange(indices(Z))
# reverse-broadcast the indices
@nexprs $nargs i->(I_i = newindex(I, keep_i, Idefault_i))
# extract array values
@nexprs $nargs i->(@inbounds val_i = X_i[I_i])
# call the function and store the result
@inbounds Z[I] = @ncall $nargs f val
end
else
# destructure the indexmaps and Xs tuples
@nexprs $nargs i->(values_i = Xs[i].values)
@nexprs $nargs i->(isnull_i = Xs[i].isnull)
@simd for I in CartesianRange(indices(Z))
# reverse-broadcast the indices
@nexprs $nargs i->(I_i = newindex(I, keep_i, Idefault_i))
if $nullcheck
# if any args are null, store null
@inbounds Z.isnull[I] = true
else
# extract array values
@nexprs $nargs i->(@inbounds val_i = values_i[I_i])
# call the function and store the result
@inbounds Z[I] = @ncall $nargs f val
end
end
end
end
end
@doc """
`broadcast!(f, B::NullableArray, As::NullableArray...; lift::Bool=false)`
This method implements the same behavior as that of `broadcast!` when called
on regular `Array` arguments. It also includes the `lift` keyword argument,
which when set to true will lift `f` over the entries of the `As`.
Lifting is disabled by default. Note that this method's signature specifies
the destination `B` array as well as the source `As` arrays as all
`NullableArray`s. Thus, calling `broadcast!` on a arguments consisting of
both `Array`s and `NullableArray`s will fall back to the implementation of
`broadcast!` in `base/broadcast.jl`.
""" ->
# Required to solve dispatch ambiguity between
# broadcast!(f, X::AbstractArray, x::Number...)
# broadcast!(f, Z::NullableArrays.NullableArray, Xs::NullableArrays.NullableArray...)
@inline Base.broadcast!(f, Z::NullableArray; lift=false) =
broadcast!(f, Z, Z; lift=lift)
@inline function Base.broadcast!(f, Z::NullableArray, Xs::NullableArray...;
lift=false)
nargs = length(Xs)
shape = indices(Z)
check_broadcast_shape(shape, Xs...)
keeps, Idefaults = map_newindexer(shape, Xs)
Base.Broadcast._broadcast!(f, Z, keeps, Idefaults, Xs, Val{nargs}; lift=lift)
return Z
end
end
@doc """
`broadcast(f, As::NullableArray...;lift::Bool=false)`
This method implements the same behavior as that of `broadcast` when called on
regular `Array` arguments. It also includes the `lift` keyword argument, which
when set to true will lift `f` over the entries of the `As`.
Lifting is disabled by default. Note that this method's signature specifies the
source `As` arrays as all `NullableArray`s. Thus, calling `broadcast!` on
arguments consisting of both `Array`s and `NullableArray`s will fall back to the
implementation of `broadcast` in `base/broadcast.jl`.
""" ->
@inline function Base.broadcast(f, Xs::NullableArray...;lift::Bool=false)
return broadcast!(f, NullableArray(eltype(promote_eltype(Xs...)),
_to_shape(broadcast_shape(Xs...))),
Xs...; lift=lift)
end
# broadcasted ops
for (op, scalar_op) in (
(:(@compat Base.:(.==)), :(==)),
(:(@compat Base.:.!=), :!=),
(:(@compat Base.:.<), :<),
(:(@compat Base.:.>), :>),
(:(@compat Base.:.<=), :<=),
(:(@compat Base.:.>=), :>=)
)
@eval begin
($op)(X::NullableArray, Y::NullableArray) = broadcast($scalar_op, X, Y)
end
end
|
JuliaPackageMirrors/NullableArrays.jl
|
src/broadcast.jl
|
Julia
|
mit
| 8,759
|
/*
* jQuery File Upload Plugin 5.0.1
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2010, Sebastian Tschan
* https://blueimp.net
*
* Licensed under the MIT license:
* http://creativecommons.org/licenses/MIT/
*/
/*jslint nomen: false, unparam: true, regexp: false */
/*global document, XMLHttpRequestUpload, Blob, File, FormData, location, jQuery */
(function ($) {
'use strict';
// The fileupload widget listens for change events on file input fields
// defined via fileInput setting and drop events of the given dropZone.
// In addition to the default jQuery Widget methods, the fileupload widget
// exposes the "add" and "send" methods, to add or directly send files
// using the fileupload API.
// By default, files added via file input selection, drag & drop or
// "add" method are uploaded immediately, but it is possible to override
// the "add" callback option to queue file uploads.
$.widget('blueimp.fileupload', {
options: {
// The namespace used for event handler binding on the dropZone and
// fileInput collections.
// If not set, the name of the widget ("fileupload") is used.
namespace: undefined,
// The drop target collection, by the default the complete document.
// Set to null or an empty collection to disable drag & drop support:
dropZone: $(document),
// The file input field collection, that is listened for change events.
// If undefined, it is set to the file input fields inside
// of the widget element on plugin initialization.
// Set to null or an empty collection to disable the change listener.
fileInput: undefined,
// By default, the file input field is replaced with a clone after
// each input field change event. This is required for iframe transport
// queues and allows change events to be fired for the same file
// selection, but can be disabled by setting the following option to false:
replaceFileInput: true,
// The parameter name for the file form data (the request argument name).
// If undefined or empty, the name property of the file input field is
// used, or "files[]" if the file input name property is also empty:
paramName: undefined,
// By default, each file of a selection is uploaded using an individual
// request for XHR type uploads. Set to false to upload file
// selections in one request each:
singleFileUploads: true,
// Set the following option to true to issue all file upload requests
// in a sequential order:
sequentialUploads: false,
// Set the following option to true to force iframe transport uploads:
forceIframeTransport: false,
// By default, XHR file uploads are sent as multipart/form-data.
// The iframe transport is always using multipart/form-data.
// Set to false to enable non-multipart XHR uploads:
multipart: true,
// To upload large files in smaller chunks, set the following option
// to a preferred maximum chunk size. If set to 0, null or undefined,
// or the browser does not support the required Blob API, files will
// be uploaded as a whole.
maxChunkSize: undefined,
// When a non-multipart upload or a chunked multipart upload has been
// aborted, this option can be used to resume the upload by setting
// it to the size of the already uploaded bytes. This option is most
// useful when modifying the options object inside of the "add" or
// "send" callbacks, as the options are cloned for each file upload.
uploadedBytes: undefined,
// By default, failed (abort or error) file uploads are removed from the
// global progress calculation. Set the following option to false to
// prevent recalculating the global progress data:
recalculateProgress: true,
// Additional form data to be sent along with the file uploads can be set
// using this option, which accepts an array of objects with name and
// value properties, a function returning such an array, a FormData
// object (for XHR file uploads), or a simple object.
// The form of the first fileInput is given as parameter to the function:
formData: function (form) {
return form.serializeArray();
},
// The add callback is invoked as soon as files are added to the fileupload
// widget (via file input selection, drag & drop or add API call).
// If the singleFileUploads option is enabled, this callback will be
// called once for each file in the selection for XHR file uplaods, else
// once for each file selection.
// The upload starts when the submit method is invoked on the data parameter.
// The data object contains a files property holding the added files
// and allows to override plugin options as well as define ajax settings.
// Listeners for this callback can also be bound the following way:
// .bind('fileuploadadd', func);
// data.submit() returns a Promise object and allows to attach additional
// handlers using jQuery's Deferred callbacks:
// data.submit().done(func).fail(func).always(func);
add: function (e, data) {
data.submit();
},
// Other callbacks:
// Callback for the start of each file upload request:
// send: function (e, data) {}, // .bind('fileuploadsend', func);
// Callback for successful uploads:
// done: function (e, data) {}, // .bind('fileuploaddone', func);
// Callback for failed (abort or error) uploads:
// fail: function (e, data) {}, // .bind('fileuploadfail', func);
// Callback for completed (success, abort or error) requests:
// always: function (e, data) {}, // .bind('fileuploadalways', func);
// Callback for upload progress events:
// progress: function (e, data) {}, // .bind('fileuploadprogress', func);
// Callback for global upload progress events:
// progressall: function (e, data) {}, // .bind('fileuploadprogressall', func);
// Callback for uploads start, equivalent to the global ajaxStart event:
// start: function (e) {}, // .bind('fileuploadstart', func);
// Callback for uploads stop, equivalent to the global ajaxStop event:
// stop: function (e) {}, // .bind('fileuploadstop', func);
// Callback for change events of the fileInput collection:
// change: function (e, data) {}, // .bind('fileuploadchange', func);
// Callback for drop events of the dropZone collection:
// drop: function (e, data) {}, // .bind('fileuploaddrop', func);
// Callback for dragover events of the dropZone collection:
// dragover: function (e) {}, // .bind('fileuploaddragover', func);
// The plugin options are used as settings object for the ajax calls.
// The following are jQuery ajax settings required for the file uploads:
processData: false,
contentType: false,
cache: false
},
// A list of options that require a refresh after assigning a new value:
_refreshOptionsList: ['namespace', 'dropZone', 'fileInput'],
_isXHRUpload: function (options) {
var undef = 'undefined';
return !options.forceIframeTransport &&
typeof XMLHttpRequestUpload !== undef && typeof File !== undef &&
(!options.multipart || typeof FormData !== undef);
},
_getFormData: function (options) {
var formData;
if (typeof options.formData === 'function') {
return options.formData(options.form);
} else if ($.isArray(options.formData)) {
return options.formData;
} else if (options.formData) {
formData = [];
$.each(options.formData, function (name, value) {
formData.push({name: name, value: value});
});
return formData;
}
return [];
},
_getTotal: function (files) {
var total = 0;
$.each(files, function (index, file) {
total += file.size || 1;
});
return total;
},
_onProgress: function (e, data) {
if (e.lengthComputable) {
var total = data.total || this._getTotal(data.files),
loaded = parseInt(
e.loaded / e.total * (data.chunkSize || total),
10
) + (data.uploadedBytes || 0);
this._loaded += loaded - (data.loaded || data.uploadedBytes || 0);
data.lengthComputable = true;
data.loaded = loaded;
data.total = total;
// Trigger a custom progress event with a total data property set
// to the file size(s) of the current upload and a loaded data
// property calculated accordingly:
this._trigger('progress', e, data);
// Trigger a global progress event for all current file uploads,
// including ajax calls queued for sequential file uploads:
this._trigger('progressall', e, {
lengthComputable: true,
loaded: this._loaded,
total: this._total
});
}
},
_initProgressListener: function (options) {
var that = this,
xhr = options.xhr ? options.xhr() : $.ajaxSettings.xhr();
// Accesss to the native XHR object is required to add event listeners
// for the upload progress event:
if (xhr.upload && xhr.upload.addEventListener) {
xhr.upload.addEventListener('progress', function (e) {
that._onProgress(e, options);
}, false);
options.xhr = function () {
return xhr;
};
}
},
_initXHRData: function (options) {
var formData,
file = options.files[0];
if (!options.multipart || options.blob) {
// For non-multipart uploads and chunked uploads,
// file meta data is not part of the request body,
// so we transmit this data as part of the HTTP headers.
// For cross domain requests, these headers must be allowed
// via Access-Control-Allow-Headers or removed using
// the beforeSend callback:
options.headers = $.extend(options.headers, {
'X-File-Name': file.name,
'X-File-Type': file.type,
'X-File-Size': file.size
});
if (!options.blob) {
// Non-chunked non-multipart upload:
options.contentType = file.type;
options.data = file;
} else if (!options.multipart) {
// Chunked non-multipart upload:
options.contentType = 'application/octet-stream';
options.data = options.blob;
}
}
if (options.multipart) {
if (options.formData instanceof FormData) {
formData = options.formData;
} else {
formData = new FormData();
$.each(this._getFormData(options), function (index, field) {
formData.append(field.name, field.value);
});
}
if (options.blob) {
formData.append(options.paramName, options.blob);
} else {
$.each(options.files, function (index, file) {
// File objects are also Blob instances.
// This check allows the tests to run with
// dummy objects:
if (file instanceof Blob) {
formData.append(options.paramName, file);
}
});
}
options.data = formData;
}
// Blob reference is not needed anymore, free memory:
options.blob = null;
},
_initIframeSettings: function (options) {
// Setting the dataType to iframe enables the iframe transport:
options.dataType = 'iframe ' + (options.dataType || '');
// The iframe transport accepts a serialized array as form data:
options.formData = this._getFormData(options);
},
_initDataSettings: function (options) {
if (this._isXHRUpload(options)) {
if (!this._chunkedUpload(options, true)) {
if (!options.data) {
this._initXHRData(options);
}
this._initProgressListener(options);
}
} else {
this._initIframeSettings(options);
}
},
_initFormSettings: function (options) {
// Retrieve missing options from the input field and the
// associated form, if available:
if (!options.form || !options.form.length) {
options.form = $(options.fileInput.prop('form'));
}
if (!options.paramName) {
options.paramName = options.fileInput.prop('name') ||
'files[]';
}
if (!options.url) {
options.url = options.form.prop('action') || location.href;
}
// The HTTP request method must be "POST" or "PUT":
options.type = (options.type || options.form.prop('method') || '')
.toUpperCase();
if (options.type !== 'POST' && options.type !== 'PUT') {
options.type = 'POST';
}
},
_getAJAXSettings: function (data) {
var options = $.extend({}, this.options, data);
this._initFormSettings(options);
this._initDataSettings(options);
return options;
},
// Maps jqXHR callbacks to the equivalent
// methods of the given Promise object:
_enhancePromise: function (promise) {
promise.success = promise.done;
promise.error = promise.fail;
promise.complete = promise.always;
return promise;
},
// Creates and returns a Promise object enhanced with
// the jqXHR methods abort, success, error and complete:
_getXHRPromise: function (resolveOrReject, context) {
var dfd = $.Deferred(),
promise = dfd.promise();
context = context || this.options.context || promise;
if (resolveOrReject === true) {
dfd.resolveWith(context);
} else if (resolveOrReject === false) {
dfd.rejectWith(context);
}
promise.abort = dfd.promise;
return this._enhancePromise(promise);
},
// Uploads a file in multiple, sequential requests
// by splitting the file up in multiple blob chunks.
// If the second parameter is true, only tests if the file
// should be uploaded in chunks, but does not invoke any
// upload requests:
_chunkedUpload: function (options, testOnly) {
var that = this,
file = options.files[0],
fs = file.size,
ub = options.uploadedBytes = options.uploadedBytes || 0,
mcs = options.maxChunkSize || fs,
// Use the Blob methods with the slice implementation
// according to the W3C Blob API specification:
slice = file.webkitSlice || file.mozSlice || file.slice,
upload,
n,
jqXHR,
pipe;
if (!(this._isXHRUpload(options) && slice && (ub || mcs < fs)) ||
options.data) {
return false;
}
if (testOnly) {
return true;
}
if (ub >= fs) {
file.error = 'uploadedBytes';
return this._getXHRPromise(false);
}
// n is the number of blobs to upload,
// calculated via filesize, uploaded bytes and max chunk size:
n = Math.ceil((fs - ub) / mcs);
// The chunk upload method accepting the chunk number as parameter:
upload = function (i) {
if (!i) {
return that._getXHRPromise(true);
}
// Upload the blobs in sequential order:
return upload(i -= 1).pipe(function () {
// Clone the options object for each chunk upload:
var o = $.extend({}, options);
o.blob = slice.call(
file,
ub + i * mcs,
ub + (i + 1) * mcs
);
// Store the current chunk size, as the blob itself
// will be dereferenced after data processing:
o.chunkSize = o.blob.size;
// Process the upload data (the blob and potential form data):
that._initXHRData(o);
// Add progress listeners for this chunk upload:
that._initProgressListener(o);
jqXHR = ($.ajax(o) || that._getXHRPromise(false, o.context))
.done(function () {
// Create a progress event if upload is done and
// no progress event has been invoked for this chunk:
if (!o.loaded) {
that._onProgress($.Event('progress', {
lengthComputable: true,
loaded: o.chunkSize,
total: o.chunkSize
}), o);
}
options.uploadedBytes = o.uploadedBytes
+= o.chunkSize;
});
return jqXHR;
});
};
// Return the piped Promise object, enhanced with an abort method,
// which is delegated to the jqXHR object of the current upload,
// and jqXHR callbacks mapped to the equivalent Promise methods:
pipe = upload(n);
pipe.abort = function () {
return jqXHR.abort();
};
return this._enhancePromise(pipe);
},
_beforeSend: function (e, data) {
if (this._active === 0) {
// the start callback is triggered when an upload starts
// and no other uploads are currently running,
// equivalent to the global ajaxStart event:
this._trigger('start');
}
this._active += 1;
// Initialize the global progress values:
this._loaded += data.uploadedBytes || 0;
this._total += this._getTotal(data.files);
},
_onDone: function (result, textStatus, jqXHR, options) {
if (!this._isXHRUpload(options)) {
// Create a progress event for each iframe load:
this._onProgress($.Event('progress', {
lengthComputable: true,
loaded: 1,
total: 1
}), options);
}
options.result = result;
options.textStatus = textStatus;
options.jqXHR = jqXHR;
this._trigger('done', null, options);
},
_onFail: function (jqXHR, textStatus, errorThrown, options) {
options.jqXHR = jqXHR;
options.textStatus = textStatus;
options.errorThrown = errorThrown;
this._trigger('fail', null, options);
if (options.recalculateProgress) {
// Remove the failed (error or abort) file upload from
// the global progress calculation:
this._loaded -= options.loaded || options.uploadedBytes || 0;
this._total -= options.total || this._getTotal(options.files);
}
},
_onAlways: function (result, textStatus, jqXHR, options) {
this._active -= 1;
options.result = result;
options.textStatus = textStatus;
options.jqXHR = jqXHR;
this._trigger('always', null, options);
if (this._active === 0) {
// The stop callback is triggered when all uploads have
// been completed, equivalent to the global ajaxStop event:
this._trigger('stop');
// Reset the global progress values:
this._loaded = this._total = 0;
}
},
_onSend: function (e, data) {
var that = this,
jqXHR,
pipe,
options = that._getAJAXSettings(data),
send = function () {
jqXHR = ((that._trigger('send', e, options) !== false && (
that._chunkedUpload(options) ||
$.ajax(options)
)) || that._getXHRPromise(false, options.context)
).done(function (result, textStatus, jqXHR) {
that._onDone(result, textStatus, jqXHR, options);
}).fail(function (jqXHR, textStatus, errorThrown) {
that._onFail(jqXHR, textStatus, errorThrown, options);
}).always(function (result, textStatus, jqXHR) {
that._onAlways(result, textStatus, jqXHR, options);
});
return jqXHR;
};
this._beforeSend(e, options);
if (this.options.sequentialUploads) {
// Return the piped Promise object, enhanced with an abort method,
// which is delegated to the jqXHR object of the current upload,
// and jqXHR callbacks mapped to the equivalent Promise methods:
pipe = (this._sequence = this._sequence.pipe(send, send));
pipe.abort = function () {
return jqXHR.abort();
};
return this._enhancePromise(pipe);
}
return send();
},
_onAdd: function (e, data) {
var that = this,
result = true,
options = $.extend({}, this.options, data);
if (options.singleFileUploads && this._isXHRUpload(options)) {
$.each(data.files, function (index, file) {
var newData = $.extend({}, data, {files: [file]});
newData.submit = function () {
return that._onSend(e, newData);
};
return (result = that._trigger('add', e, newData));
});
return result;
} else if (data.files.length) {
data = $.extend({}, data);
data.submit = function () {
return that._onSend(e, data);
};
return this._trigger('add', e, data);
}
},
// File Normalization for Gecko 1.9.1 (Firefox 3.5) support:
_normalizeFile: function (index, file) {
if (file.name === undefined && file.size === undefined) {
file.name = file.fileName;
file.size = file.fileSize;
}
},
_replaceFileInput: function (input) {
var inputClone = input.clone(true);
$('<form></form>').append(inputClone)[0].reset();
// Detaching allows to insert the fileInput on another form
// without loosing the file input value:
input.after(inputClone).detach();
// Replace the original file input element in the fileInput
// collection with the clone, which has been copied including
// event handlers:
this.options.fileInput = this.options.fileInput.map(function (i, el) {
if (el === input[0]) {
return inputClone[0];
}
return el;
});
},
_onChange: function (e) {
var that = e.data.fileupload,
data = {
files: $.each($.makeArray(e.target.files), that._normalizeFile),
fileInput: $(e.target),
form: $(e.target.form)
};
if (!data.files.length) {
// If the files property is not available, the browser does not
// support the File API and we add a pseudo File object with
// the input value as name with path information removed:
data.files = [{name: e.target.value.replace(/^.*\\/, '')}];
}
// Store the form reference as jQuery data for other event handlers,
// as the form property is not available after replacing the file input:
if (data.form.length) {
data.fileInput.data('blueimp.fileupload.form', data.form);
} else {
data.form = data.fileInput.data('blueimp.fileupload.form');
}
if (that.options.replaceFileInput) {
that._replaceFileInput(data.fileInput);
}
if (that._trigger('change', e, data) === false ||
that._onAdd(e, data) === false) {
return false;
}
},
_onDrop: function (e) {
var that = e.data.fileupload,
dataTransfer = e.dataTransfer = e.originalEvent.dataTransfer,
data = {
files: $.each(
$.makeArray(dataTransfer && dataTransfer.files),
that._normalizeFile
)
};
if (that._trigger('drop', e, data) === false ||
that._onAdd(e, data) === false) {
return false;
}
e.preventDefault();
},
_onDragOver: function (e) {
var that = e.data.fileupload,
dataTransfer = e.dataTransfer = e.originalEvent.dataTransfer;
if (that._trigger('dragover', e) === false) {
return false;
}
if (dataTransfer) {
dataTransfer.dropEffect = dataTransfer.effectAllowed = 'copy';
}
e.preventDefault();
},
_initEventHandlers: function () {
var ns = this.options.namespace || this.name;
this.options.dropZone
.bind('dragover.' + ns, {fileupload: this}, this._onDragOver)
.bind('drop.' + ns, {fileupload: this}, this._onDrop);
this.options.fileInput
.bind('change.' + ns, {fileupload: this}, this._onChange);
},
_destroyEventHandlers: function () {
var ns = this.options.namespace || this.name;
this.options.dropZone
.unbind('dragover.' + ns, this._onDragOver)
.unbind('drop.' + ns, this._onDrop);
this.options.fileInput
.unbind('change.' + ns, this._onChange);
},
_beforeSetOption: function (key, value) {
this._destroyEventHandlers();
},
_afterSetOption: function (key, value) {
var options = this.options;
if (!options.fileInput) {
options.fileInput = $();
}
if (!options.dropZone) {
options.dropZone = $();
}
this._initEventHandlers();
},
_setOption: function (key, value) {
var refresh = $.inArray(key, this._refreshOptionsList) !== -1;
if (refresh) {
this._beforeSetOption(key, value);
}
$.Widget.prototype._setOption.call(this, key, value);
if (refresh) {
this._afterSetOption(key, value);
}
},
_create: function () {
var options = this.options;
if (options.fileInput === undefined) {
options.fileInput = this.element.is('input:file') ?
this.element : this.element.find('input:file');
} else if (!options.fileInput) {
options.fileInput = $();
}
if (!options.dropZone) {
options.dropZone = $();
}
this._sequence = this._getXHRPromise(true);
this._active = this._loaded = this._total = 0;
this._initEventHandlers();
},
destroy: function () {
this._destroyEventHandlers();
$.Widget.prototype.destroy.call(this);
},
enable: function () {
$.Widget.prototype.enable.call(this);
this._initEventHandlers();
},
disable: function () {
this._destroyEventHandlers();
$.Widget.prototype.disable.call(this);
},
// This method is exposed to the widget API and allows adding files
// using the fileupload API. The data parameter accepts an object which
// must have a files property and can contain additional options:
// .fileupload('add', {files: filesList});
add: function (data) {
if (!data || this.options.disabled) {
return;
}
data.files = $.each($.makeArray(data.files), this._normalizeFile);
this._onAdd(null, data);
},
// This method is exposed to the widget API and allows sending files
// using the fileupload API. The data parameter accepts an object which
// must have a files property and can contain additional options:
// .fileupload('send', {files: filesList});
// The method returns a Promise object for the file upload call.
send: function (data) {
if (data && !this.options.disabled) {
data.files = $.each($.makeArray(data.files), this._normalizeFile);
if (data.files.length) {
return this._onSend(null, data);
}
}
return this._getXHRPromise(false, data && data.context);
}
});
}(jQuery));
|
ilyakatz/cucumber-cinema
|
public/javascripts/jquery.fileupload.js
|
JavaScript
|
mit
| 31,875
|
import React from 'react';
import IconBase from './../components/IconBase/IconBase';
export default class IosPint extends React.Component {
render() {
if(this.props.bare) {
return <g>
<path d="M368,170.085c0-21.022-0.973-88.554-19.308-125.013C344.244,36.228,336.25,32,316.999,32H195.001
c-19.25,0-27.246,4.197-31.693,13.041C144.973,81.5,144,149.25,144,170.272c0,98,32,100.353,32,180.853c0,39.5-16,71.402-16,99.402
c0,27,9,29.473,32,29.473h128c23,0,32-2.535,32-29.535c0-28-16-59.715-16-99.215C336,270.75,368,268.085,368,170.085z
M177.602,51.983c0.778-1.546,1.339-1.763,2.53-2.295c1.977-0.884,6.161-1.688,14.869-1.688h121.998
c8.708,0,12.893,0.803,14.869,1.687c1.19,0.532,1.752,0.872,2.53,2.418c8.029,15.967,13.601,42.611,16.105,75.896H161.496
C164.001,94.653,169.572,67.951,177.602,51.983z"></path>
</g>;
} return <IconBase>
<path d="M368,170.085c0-21.022-0.973-88.554-19.308-125.013C344.244,36.228,336.25,32,316.999,32H195.001
c-19.25,0-27.246,4.197-31.693,13.041C144.973,81.5,144,149.25,144,170.272c0,98,32,100.353,32,180.853c0,39.5-16,71.402-16,99.402
c0,27,9,29.473,32,29.473h128c23,0,32-2.535,32-29.535c0-28-16-59.715-16-99.215C336,270.75,368,268.085,368,170.085z
M177.602,51.983c0.778-1.546,1.339-1.763,2.53-2.295c1.977-0.884,6.161-1.688,14.869-1.688h121.998
c8.708,0,12.893,0.803,14.869,1.687c1.19,0.532,1.752,0.872,2.53,2.418c8.029,15.967,13.601,42.611,16.105,75.896H161.496
C164.001,94.653,169.572,67.951,177.602,51.983z"></path>
</IconBase>;
}
};IosPint.defaultProps = {bare: false}
|
fbfeix/react-icons
|
src/icons/IosPint.js
|
JavaScript
|
mit
| 1,517
|
#include "pch.h"
#include "Item.h"
#include "GameManager.h"
#include "ObjectLayer.h"
Item::Item(Vec2 createPos, float scale, BuffTarget buffType)
{
m_UnitType = UNIT_ITEM;
m_CenterSprite->setPosition(createPos);
m_CenterSprite->setScale(scale);
switch (buffType)
{
case BUFF_HP: m_RealSprite = Sprite::create("Images/Unit/item_hp.png"); break;
case BUFF_DAMAGE: m_RealSprite = Sprite::create("Images/Unit/item_damage.png"); break;
case BUFF_COOLTIME: m_RealSprite = Sprite::create("Images/Unit/item_cooltime.png"); break;
case BUFF_SHIELD: m_RealSprite = Sprite::create("Images/Unit/item_shield.png"); break;
case BUFF_SPEED: m_RealSprite = Sprite::create("Images/Unit/item_speed.png"); break;
}
m_RealSprite->setScale(scale);
m_CenterSprite->addChild(m_RealSprite);
}
Item::~Item()
{
}
|
dlakwwkd/CommitAgain
|
Skima/Classes/Item.cpp
|
C++
|
mit
| 873
|
namespace TwitterBackup.Services
{
using TwitterBackup.Data;
using TwitterBackup.Models;
using TwitterBackup.Services.Contracts;
using System.Linq;
using System.Collections.Generic;
using System;
using TwitterBackup.Services.Exceptions;
public class UserService : IUserService
{
private readonly IRepository<User> userRepo;
public UserService(IRepository<User> userRepo)
{
this.userRepo = userRepo;
}
/// <summary>
/// Store user in the TwitterBackup database
/// </summary>
/// <param name="user"></param>
public User Save(User user)
{
if (user == null)
{
throw new ArgumentException("Tweet is not valid");
}
var hasAlreadyExist = userRepo
.All()
.Any(userDTO => userDTO.ScreenName == user.ScreenName);
if (hasAlreadyExist)
{
throw new UserException(UserExceptionType.IsAlreadySaved);
}
var userDataModel = userRepo.Add(user);
return userDataModel;
}
public int GetUsersCount()
{
var usersCount = this.userRepo
.All()
.Count();
return usersCount;
}
public IEnumerable<User> GetUsers()
{
var allUsers = this.userRepo
.All()
.ToArray();
return allUsers;
}
}
}
|
luboganchev/TwitterBackup
|
TwitterBackup/TwitterBackup.Services/UserService.cs
|
C#
|
mit
| 1,545
|
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Binary Search</title>
<link href="styles/js-console.css" rel="stylesheet" />
</head>
<body>
<div id="js-console"></div>
<script src="scripts/js-console.js"></script>
<script>
var arr = new Array(4, 1, 1, 4, 2, 3, 4, 4, 1, 22, 4, 9, 3);
var searchedNumber = 2;
var searchedNumber2 = -15;
var searchedNumber3 = 22;
jsConsole.writeLine("The array is:");
PrintArray(arr);
jsConsole.writeLine();
arr.sort(orderby);
jsConsole.writeLine("The sorted array is:");
PrintArray(arr);
jsConsole.writeLine();
BinarySearch(arr, searchedNumber);
BinarySearch(arr, searchedNumber2);
BinarySearch(arr, searchedNumber3);
function BinarySearch(arr, searchedNumber) {
var start = 0;
var end = arr.length - 1;
var middle;
var numberExists = false;
while (start <= end) {
middle = parseInt((start + end) / 2);//if you do not use parseint function the loop is endless
if (arr[middle] == searchedNumber) {
numberExists = true;
jsConsole.writeLine();
jsConsole.writeLine("The index of the number " + searchedNumber + " in the sorted array is " + middle);
break;
}
if (arr[middle] < searchedNumber) {
start = middle + 1;
}
if (arr[middle] > searchedNumber) {
end = middle - 1;
}
}
if (numberExists == false) {
jsConsole.writeLine();
jsConsole.writeLine("The number " + searchedNumber + " you are searching for does not exist in the array.");
}
}
function orderby(a, b) {
return ((a == b) ? 0 : (a > b) ? 1 : -1);
}
function PrintArray(arr) {
for (counter = 0; counter < arr.length; counter++) {
jsConsole.write(arr[counter] + " ")
}
}
</script>
</body>
</html>
|
georgipyaramov/JavaScriptFundamentals
|
Arrays/Arrays/07.BinarySearch.html
|
HTML
|
mit
| 2,217
|
package ee.golive.personal.model;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
@Entity
@Table(name = "workout")
public class Workout implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "id", unique=true, nullable = false)
private Integer id;
private String source;
private String source_id;
private String sport_type;
private Date date_created;
private Long duration;
private Double calories;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
public String getSource_id() {
return source_id;
}
public void setSource_id(String source_id) {
this.source_id = source_id;
}
public Date getDate_created() {
return date_created;
}
public void setDate_created(Date date_created) {
this.date_created = date_created;
}
public String getSport_type() {
return sport_type;
}
public void setSport_type(String sport_type) {
this.sport_type = sport_type;
}
public Long getDuration() {
return duration;
}
public void setDuration(Long duration) {
this.duration = duration;
}
public Double getCalories() {
return calories;
}
public void setCalories(Double calories) {
this.calories = calories;
}
}
|
ilves/finance
|
src/main/java/ee/golive/personal/model/Workout.java
|
Java
|
mit
| 1,619
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>zfc: 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.0 / zfc - 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>
zfc
<small>
8.9.0
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2021-11-28 06:52:07 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-11-28 06:52:07 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 Preprocessor-pretty-printer of OCaml
conf-findutils 1 Virtual package relying on findutils
conf-perl 1 Virtual package relying on perl
coq 8.5.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
# opam file:
opam-version: "2.0"
maintainer: "Hugo.Herbelin@inria.fr"
homepage: "https://github.com/coq-contribs/zfc"
license: "LGPL 2.1"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/ZFC"]
depends: [
"ocaml"
"coq" {>= "8.9" & < "8.10~"}
]
tags: [
"keyword: set theory"
"keyword: Zermelo-Fraenkel"
"keyword: Calculus of Inductive Constructions"
"category: Mathematics/Logic/Set theory"
]
authors: [
"Benjamin Werner"
]
bug-reports: "https://github.com/coq-contribs/zfc/issues"
dev-repo: "git+https://github.com/coq-contribs/zfc.git"
synopsis: "An encoding of Zermelo-Fraenkel Set Theory in Coq"
description: """
The encoding of Zermelo-Fraenkel Set Theory is largely inspired by
Peter Aczel's work dating back to the eighties. A type Ens is defined,
which represents sets. Two predicates IN and EQ stand for membership
and extensional equality between sets. The axioms of ZFC are then
proved and thus appear as theorems in the development.
A main motivation for this work is the comparison of the respective
expressive power of Coq and ZFC.
A non-computational type-theoretical axiom of choice is necessary to
prove the replacement schemata and the set-theoretical AC.
The main difference between this work and Peter Aczel's is that
propositions are defined on the impredicative level Prop. Since the
definition of Ens is, however, still unchanged, I also added most of
Peter Aczel's definition. The main advantage of Aczel's approach is a
more constructive vision of the existential quantifier (which gives
the set-theoretical axiom of choice for free)."""
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/zfc/archive/v8.9.0.tar.gz"
checksum: "md5=3723e1731f3dc6eed21c116f1415b27a"
}
</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-zfc.8.9.0 coq.8.5.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.5.0).
The following dependencies couldn't be met:
- coq-zfc -> 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 coq-zfc.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://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
|
coq-bench/coq-bench.github.io
|
clean/Linux-x86_64-4.05.0-2.0.1/released/8.5.0/zfc/8.9.0.html
|
HTML
|
mit
| 7,732
|
//
// MBPreferencesRecoveryAttempter.h
// IceCube
//
// Created by Marian Bouček on 13.04.17.
// Copyright © 2017 Marian Bouček. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface MBRecoveryAttempter : NSObject
+ (NSError *)installRecoveryAttempterToErrorIfSupported:(NSError *)error;
@end
|
algi/icecube
|
IceCube/MBRecoveryAttempter.h
|
C
|
mit
| 319
|
{% spaceless %}
<table class="django-datadjable" id="{{ dt.html_id }}"
data-id="{{ dt.html_id }}"
data-columns='{{ dt.js_data_columns }}'
data-sorting='{{ dt.js_initial_ordering }}'
data-adjust_bottom_px='{{ dt.adjust_bottom_px }}'
data-columnfilter='{{ dt.js_columnfilter_init }}'>
<thead>
<tr>{{ dt.thead }}</tr>
</thead>
<tbody></tbody>
<tfoot{% if not dt.show_tablefooter %} style="display:none"{% endif %}>
<tr>{{ dt.tfoot }}</tr>
</tfoot>
</table>
{% endspaceless %}
|
mawimawi/datadjables
|
datadjables/templates/datadjables/table_init.html
|
HTML
|
mit
| 529
|
namespace BlockchainSharp.Tests.Compilers
{
using System;
using BlockchainSharp.Compilers;
using BlockchainSharp.Vm;
using Microsoft.VisualStudio.TestTools.UnitTesting;
[TestClass]
public class SimpleCompilerTests
{
[TestMethod]
public void CompileEmptyString()
{
var compiler = new SimpleCompiler(string.Empty);
var result = compiler.Compile();
Assert.IsNotNull(result);
Assert.AreEqual(0, result.Length);
}
[TestMethod]
public void CompileNullString()
{
var compiler = new SimpleCompiler(null);
var result = compiler.Compile();
Assert.IsNotNull(result);
Assert.AreEqual(0, result.Length);
}
[TestMethod]
public void CompileArithmeticOperations()
{
CompileBytecode("add", Bytecodes.Add);
CompileBytecode("subtract", Bytecodes.Subtract);
CompileBytecode("multiply", Bytecodes.Multiply);
CompileBytecode("divide", Bytecodes.Divide);
}
[TestMethod]
public void CompileStopOperation()
{
CompileBytecode("stop", Bytecodes.Stop);
}
[TestMethod]
public void CompileStorageOperation()
{
CompileBytecode("sload", Bytecodes.SLoad);
CompileBytecode("sstore", Bytecodes.SStore);
}
[TestMethod]
public void CompileDup()
{
CompileBytecode("dup 1", Bytecodes.Dup1);
CompileBytecode("dup 2", Bytecodes.Dup2);
CompileBytecode("dup 3", Bytecodes.Dup3);
CompileBytecode("dup 4", Bytecodes.Dup4);
CompileBytecode("dup 5", Bytecodes.Dup5);
CompileBytecode("dup 6", Bytecodes.Dup6);
CompileBytecode("dup 7", Bytecodes.Dup7);
CompileBytecode("dup 8", Bytecodes.Dup8);
CompileBytecode("dup 9", Bytecodes.Dup9);
CompileBytecode("dup 10", Bytecodes.Dup10);
CompileBytecode("dup 11", Bytecodes.Dup11);
CompileBytecode("dup 12", Bytecodes.Dup12);
CompileBytecode("dup 13", Bytecodes.Dup13);
CompileBytecode("dup 14", Bytecodes.Dup14);
CompileBytecode("dup 15", Bytecodes.Dup15);
CompileBytecode("dup 16", Bytecodes.Dup16);
}
[TestMethod]
public void CompileSwap()
{
CompileBytecode("swap 1", Bytecodes.Swap1);
CompileBytecode("swap 2", Bytecodes.Swap2);
CompileBytecode("swap 3", Bytecodes.Swap3);
CompileBytecode("swap 4", Bytecodes.Swap4);
CompileBytecode("swap 5", Bytecodes.Swap5);
CompileBytecode("swap 6", Bytecodes.Swap6);
CompileBytecode("swap 7", Bytecodes.Swap7);
CompileBytecode("swap 8", Bytecodes.Swap8);
CompileBytecode("swap 9", Bytecodes.Swap9);
CompileBytecode("swap 10", Bytecodes.Swap10);
CompileBytecode("swap 11", Bytecodes.Swap11);
CompileBytecode("swap 12", Bytecodes.Swap12);
CompileBytecode("swap 13", Bytecodes.Swap13);
CompileBytecode("swap 14", Bytecodes.Swap14);
CompileBytecode("swap 15", Bytecodes.Swap15);
CompileBytecode("swap 16", Bytecodes.Swap16);
}
[TestMethod]
public void CompilePop()
{
CompileBytecode("pop", Bytecodes.Pop);
}
[TestMethod]
public void CompileLessThanGreaterThan()
{
CompileBytecode("lessthan", Bytecodes.LessThan);
CompileBytecode("greaterthan", Bytecodes.GreaterThan);
CompileBytecode("lt", Bytecodes.LessThan);
CompileBytecode("gt", Bytecodes.GreaterThan);
}
[TestMethod]
public void CompilePush()
{
CompileBytecode("push 0", Bytecodes.Push1, 0);
CompileBytecode("push 1", Bytecodes.Push1, 1);
CompileBytecode("push 256", Bytecodes.Push2, 1, 0);
}
[TestMethod]
public void CompileEqualIsZero()
{
CompileBytecode("equal", Bytecodes.Equal);
CompileBytecode("eq", Bytecodes.Equal);
CompileBytecode("iszero", Bytecodes.IsZero);
}
[TestMethod]
public void CompileSkippingCommentsAndEmptyLines()
{
CompileBytecode("add\n", Bytecodes.Add);
CompileBytecode("add\r\n", Bytecodes.Add);
CompileBytecode("add\r", Bytecodes.Add);
CompileBytecode("# comment\nadd\n", Bytecodes.Add);
CompileBytecode("\n\nadd # comment\n", Bytecodes.Add);
CompileBytecode("\r\n\r\nadd # comment\n", Bytecodes.Add);
CompileBytecode("\r\radd # comment\n", Bytecodes.Add);
}
[TestMethod]
public void CompileLogicalOperations()
{
CompileBytecode("and", Bytecodes.And);
CompileBytecode("or", Bytecodes.Or);
CompileBytecode("not", Bytecodes.Not);
CompileBytecode("xor", Bytecodes.Xor);
}
[TestMethod]
public void CompileStorageAccess()
{
CompileBytecode("sload", Bytecodes.SLoad);
CompileBytecode("sstore", Bytecodes.SStore);
}
[TestMethod]
public void CompileMemoryAccess()
{
CompileBytecode("mload", Bytecodes.MLoad);
CompileBytecode("mstore", Bytecodes.MStore);
CompileBytecode("mstore8", Bytecodes.MStore8);
}
[TestMethod]
public void CompileJump()
{
CompileBytecode("jump", Bytecodes.Jump);
}
[TestMethod]
public void CompileJumpI()
{
CompileBytecode("jumpi", Bytecodes.JumpI);
}
[TestMethod]
public void CompilePc()
{
CompileBytecode("pc", Bytecodes.Pc);
}
private static void CompileBytecode(string text, Bytecodes bc)
{
var compiler = new SimpleCompiler(text);
var result = compiler.Compile();
Assert.IsNotNull(result);
Assert.AreEqual(1, result.Length);
Assert.AreEqual((byte)bc, result[0]);
}
private static void CompileBytecode(string text, Bytecodes bc, params byte[] bytes)
{
var compiler = new SimpleCompiler(text);
var result = compiler.Compile();
Assert.IsNotNull(result);
Assert.AreEqual(1 + bytes.Length, result.Length);
Assert.AreEqual((byte)bc, result[0]);
for (int k = 0; k < bytes.Length; k++)
Assert.AreEqual(bytes[k], result[k + 1]);
}
}
}
|
ajlopez/BlockchainSharp
|
Src/BlockchainSharp.Tests/Compilers/SimpleCompilerTests.cs
|
C#
|
mit
| 7,021
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>miniml: 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.2 / miniml - 8.10.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
miniml
<small>
8.10.0
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2021-10-27 14:06:13 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-10-27 14:06: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.12.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: "Hugo.Herbelin@inria.fr"
homepage: "https://github.com/coq-contribs/miniml"
license: "LGPL 2.1"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/MiniML"]
depends: [
"ocaml"
"coq" {>= "8.10" & < "8.11~"}
]
tags: [
"keyword: functional programming"
"keyword: Categorical Abstract Machine"
"keyword: compilation"
"keyword: natural semantics"
"category: Computer Science/Semantics and Compilation/Compilation"
]
authors: [
"Samuel Boutin"
]
bug-reports: "https://github.com/coq-contribs/miniml/issues"
dev-repo: "git+https://github.com/coq-contribs/miniml.git"
synopsis: "Correctness of the compilation of Mini-ML into the Categorical Abstract Machine"
description: """
A formalisation of Mini-ML and of the Categorical
Abstract Machine (C.A.M) in natural semantics. It also contains the
definition of the translation from Mini-ML to the CAM and the proof
that this translation is correct"""
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/miniml/archive/v8.10.0.tar.gz"
checksum: "md5=df00ed94ed18950b75878fd60c827e5c"
}
</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-miniml.8.10.0 coq.8.12.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.12.2).
The following dependencies couldn't be met:
- coq-miniml -> 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-miniml.8.10.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://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
|
coq-bench/coq-bench.github.io
|
clean/Linux-x86_64-4.07.1-2.0.6/released/8.12.2/miniml/8.10.0.html
|
HTML
|
mit
| 7,061
|
/**
* Wheel, copyright (c) 2020 - present by Arno van der Vegt
* Distributed under an MIT license: https://arnovandervegt.github.io/wheel/license.txt
**/
const $ = require('../../program/commands');
const errors = require('../errors');
const err = require('../errors').errors;
const t = require('../tokenizer/tokenizer');
const Objct = require('../types/Objct').Objct;
const Var = require('../types/Var');
const CompileRecord = require('./CompileRecord').CompileRecord;
exports.CompileObjct = class extends CompileRecord {
getDataType() {
let token = this._token;
let objct = new Objct(null, this.getNamespacedRecordName(token.lexeme), false, this._compiler.getNamespace()).setToken(token);
objct.setCompiler(this._compiler);
return objct;
}
addLinterItem(token) {
this._linter && this._linter.addObject(this._token);
}
compileExtends(iterator, dataType) {
let token = iterator.skipWhiteSpace().peek();
if (token.lexeme === t.LEXEME_EXTENDS) {
iterator.next();
iterator.skipWhiteSpace();
token = iterator.next();
if (token.cls !== t.TOKEN_IDENTIFIER) {
throw errors.createError(err.IDENTIFIER_EXPECTED, token, 'Identifier expected.');
}
let superObjct = this._scope.findIdentifier(token.lexeme);
if (!superObjct) {
throw errors.createError(err.UNDEFINED_IDENTIFIER, token, 'Undefined identifier.');
}
if (!(superObjct instanceof Objct)) {
throw errors.createError(err.OBJECT_TYPE_EXPECTED, token, 'Object type expected.');
}
dataType.extend(superObjct, this._compiler);
}
}
compileMethodTable(objct, methodTable) {
let compiler = this._compiler;
let program = this._program;
let methods = compiler.getUseInfo().getUseObjct(objct.getName());
// Move the self pointer to the pointer register...
program.addCommand($.CMD_SET, $.T_NUM_G, $.REG_PTR, $.T_NUM_L, 0);
// Get the methods from the super objects...
let superObjct = objct.getParentScope();
while (superObjct instanceof Objct) {
let superMethods = compiler.getUseInfo().getUseObjct(superObjct.getName());
for (let i = 0; i < superMethods; i++) {
methodTable.push(program.getLength());
program.addCommand($.CMD_SET, $.T_NUM_P, 0, $.T_NUM_C, 0);
}
superObjct = superObjct.getParentScope();
}
// Create the virtual method table...
for (let i = 0; i < methods; i++) {
methodTable.push(program.getLength());
// The offset relative to the self pointer and the method offset will be set when the main procedure is found!
program.addCommand($.CMD_SET, $.T_NUM_P, 0, $.T_NUM_C, 0);
}
program.addCommand($.CMD_RET, $.T_NUM_C, 0, 0, 0);
}
compile(iterator) {
let objct = super.compile(iterator);
let compiler = this._compiler;
compiler.getUseInfo().setUseObjct(objct.getName());
if (compiler.getPass() === 0) {
return;
}
let program = this._program;
let codeUsed = program.getCodeUsed();
let methodTable = [];
program.setCodeUsed(true);
objct
.setConstructorCodeOffset(program.getLength())
.setMethodTable(methodTable);
this.compileMethodTable(objct, methodTable);
program.addCommand($.CMD_RET, 0, 0, 0, 0);
program.setCodeUsed(codeUsed);
}
};
|
ArnoVanDerVegt/wheel
|
js/frontend/compiler/keyword/CompileObjct.js
|
JavaScript
|
mit
| 3,710
|
"""Transformation functions for expressions."""
from tt.expressions import BooleanExpression
from tt.transformations.utils import ensure_bexpr
def apply_de_morgans(expr):
"""Convert an expression to a form with De Morgan's Law applied.
:returns: A new expression object, transformed so that De Morgan's Law has
been applied to negated *ANDs* and *ORs*.
:rtype: :class:`BooleanExpression <tt.expressions.bexpr.BooleanExpression>`
:raises InvalidArgumentTypeError: If ``expr`` is not a valid type.
Here's a couple of simple examples showing De Morgan's Law being applied
to a negated AND and a negated OR::
>>> from tt import apply_de_morgans
>>> apply_de_morgans('~(A /\\ B)')
<BooleanExpression "~A \\/ ~B">
>>> apply_de_morgans('~(A \\/ B)')
<BooleanExpression "~A /\\ ~B">
"""
bexpr = ensure_bexpr(expr)
return BooleanExpression(bexpr.tree.apply_de_morgans())
def apply_identity_law(expr):
"""Convert an expression to a form with the Identity Law applied.
It should be noted that this transformation will also annihilate terms
when possible. One such case where this would be applicable is the
expression ``A and 0``, which would be transformed to the constant value
``0``.
:returns: A new expression object, transformed so that the Identity Law
has been applied to applicable *ANDs* and *ORs*.
:rtype: :class:`BooleanExpression <tt.expressions.bexpr.BooleanExpression>`
:raises InvalidArgumentTypeError: If ``expr`` is not a valid type.
Here are a few simple examples showing the behavior of this transformation
across all two-operand scenarios::
>>> from tt import apply_identity_law
>>> apply_identity_law('A and 1')
<BooleanExpression "A">
>>> apply_identity_law('A and 0')
<BooleanExpression "0">
>>> apply_identity_law('A or 0')
<BooleanExpression "A">
>>> apply_identity_law('A or 1')
<BooleanExpression "1">
"""
bexpr = ensure_bexpr(expr)
return BooleanExpression(bexpr.tree.apply_identity_law())
def apply_idempotent_law(expr):
"""Convert an expression to a form with the Idempotent Law applied.
:returns: A new expression object, transformed so that the Idempotent Law
has been applied to applicable clauses.
:rtype: :class:`BooleanExpression <tt.expressions.bexpr.BooleanExpression>`
:raises InvalidArgumentTypeError: If ``expr`` is not a valid data type.
This transformation will apply the Idempotent Law to clauses of *AND* and
*OR* operators containing redundant operands. Here are a couple of simple
examples::
>>> from tt import apply_idempotent_law
>>> apply_idempotent_law('A and A')
<BooleanExpression "A">
>>> apply_idempotent_law('B or B')
<BooleanExpression "B">
This transformation will consider similarly-negated operands to be
redundant; for example::
>>> from tt import apply_idempotent_law
>>> apply_idempotent_law('~A and ~~~A')
<BooleanExpression "~A">
>>> apply_idempotent_law('B or ~B or ~~B or ~~~B or ~~~~B or ~~~~~B')
<BooleanExpression "B or ~B">
Let's also take a quick look at this transformation's ability to prune
redundant operands from CNF and DNF clauses::
>>> from tt import apply_idempotent_law
>>> apply_idempotent_law('(A and B and C and C and B) or (A and A)')
<BooleanExpression "(A and B and C) or A">
Of important note is that this transformation will not recursively apply
the Idempotent Law to operands that bubble up. Here's an example
illustrating this case::
>>> from tt import apply_idempotent_law
>>> apply_idempotent_law('(A or A) and (A or A)')
<BooleanExpression "A and A">
"""
bexpr = ensure_bexpr(expr)
return BooleanExpression(bexpr.tree.apply_idempotent_law())
def apply_inverse_law(expr):
"""Convert an expression to a form with the Inverse Law applied.
:returns: A new expression object, transformed so that the Inverse Law
has been applied to applicable *ANDs* and *ORs*.
:rtype: :class:`BooleanExpression <tt.expressions.bexpr.BooleanExpression>`
:raises InvalidArgumentTypeError: If ``expr`` is not a valid type.
This transformation will apply the Identity Law to simple binary
expressions consisting of negated and non-negated forms of the same
operand. Let's take a look::
>>> from tt.transformations import apply_inverse_law
>>> apply_inverse_law('A and ~A')
<BooleanExpression "0">
>>> apply_inverse_law('A or B or ~B or C')
<BooleanExpression "1">
This transformation will also apply the behavior expected of the Inverse
Law when negated and non-negated forms of the same operand appear in the
same CNF or DNF clause in an expression::
>>> from tt.transformations import apply_inverse_law
>>> apply_inverse_law('(A or B or ~A) -> (C and ~C)')
<BooleanExpression "1 -> 0">
>>> apply_inverse_law('(A or !!!A) xor (not C or not not C)')
<BooleanExpression "1 xor 1">
"""
bexpr = ensure_bexpr(expr)
return BooleanExpression(bexpr.tree.apply_inverse_law())
def coalesce_negations(expr):
"""Convert an expression to a form with all negations condensed.
:returns: A new expression object, transformed so that all "runs" of
logical *NOTs* are condensed into the minimal equivalent number.
:rtype: :class:`BooleanExpression <tt.expressions.bexpr.BooleanExpression>`
:raises InvalidArgumentTypeError: If ``expr`` is not a valid type.
Here's a simple example showing the basic premise of this transformation::
>>> from tt import coalesce_negations
>>> coalesce_negations('~~A or ~B or ~~~C or ~~~~D')
<BooleanExpression "A or ~B or ~C or D">
This transformation works on more complex expressions, too::
>>> coalesce_negations('!!(A -> not not B) or ~(~(A xor B))')
<BooleanExpression "(A -> B) or (A xor B)">
It should be noted that this transformation will also apply negations
to constant operands, as well. The behavior for this functionality is as
follows::
>>> coalesce_negations('~0')
<BooleanExpression "1">
>>> coalesce_negations('~1')
<BooleanExpression "0">
>>> coalesce_negations('~~~0 -> ~1 -> not 1')
<BooleanExpression "1 -> 0 -> 0">
"""
bexpr = ensure_bexpr(expr)
return BooleanExpression(bexpr.tree.coalesce_negations())
def distribute_ands(expr):
"""Convert an expression to distribute ANDs over ORed clauses.
:param expr: The expression to transform.
:type expr: :class:`str <python:str>` or :class:`BooleanExpression \
<tt.expressions.bexpr.BooleanExpression>`
:returns: A new expression object, transformed to distribute ANDs over ORed
clauses.
:rtype: :class:`BooleanExpression <tt.expressions.bexpr.BooleanExpression>`
:raises InvalidArgumentTypeError: If ``expr`` is not a valid type.
Here's a couple of simple examples::
>>> from tt import distribute_ands
>>> distribute_ands('A and (B or C or D)')
<BooleanExpression "(A and B) or (A and C) or (A and D)">
>>> distribute_ands('(A or B) and C')
<BooleanExpression "(A and C) or (B and C)">
And an example involving distributing a sub-expression::
>>> distribute_ands('(A and B) and (C or D or E)')
<BooleanExpression "(A and B and C) or (A and B and D) or \
(A and B and E)">
"""
bexpr = ensure_bexpr(expr)
return BooleanExpression(bexpr.tree.distribute_ands())
def distribute_ors(expr):
"""Convert an expression to distribute ORs over ANDed clauses.
:param expr: The expression to transform.
:type expr: :class:`str <python:str>` or :class:`BooleanExpression \
<tt.expressions.bexpr.BooleanExpression>`
:returns: A new expression object, transformed to distribute ORs over ANDed
clauses.
:rtype: :class:`BooleanExpression <tt.expressions.bexpr.BooleanExpression>`
:raises InvalidArgumentTypeError: If ``expr`` is not a valid type.
Here's a couple of simple examples::
>>> from tt import distribute_ors
>>> distribute_ors('A or (B and C and D and E)')
<BooleanExpression "(A or B) and (A or C) and (A or D) and (A or E)">
>>> distribute_ors('(A and B) or C')
<BooleanExpression "(A or C) and (B or C)">
And an example involving distributing a sub-expression::
>>> distribute_ors('(A or B) or (C and D)')
<BooleanExpression "(A or B or C) and (A or B or D)">
"""
bexpr = ensure_bexpr(expr)
return BooleanExpression(bexpr.tree.distribute_ors())
def to_cnf(expr):
"""Convert an expression to conjunctive normal form (CNF).
This transformation only guarantees to produce an equivalent form of the
passed expression in conjunctive normal form; the transformed expression
may be an inefficent representation of the passed expression.
:param expr: The expression to transform.
:type expr: :class:`str <python:str>` or :class:`BooleanExpression \
<tt.expressions.bexpr.BooleanExpression>`
:returns: A new expression object, transformed to be in CNF.
:rtype: :class:`BooleanExpression <tt.expressions.bexpr.BooleanExpression>`
:raises InvalidArgumentTypeError: If ``expr`` is not a valid type.
Here are a few examples::
>>> from tt import to_cnf
>>> b = to_cnf('(A nor B) impl C')
>>> b
<BooleanExpression "A or B or C">
>>> b.is_cnf
True
>>> b = to_cnf(r'~(~(A /\\ B) /\\ C /\\ D)')
>>> b
<BooleanExpression "(A \\/ ~C \\/ ~D) /\\ (B \\/ ~C \\/ ~D)">
>>> b.is_cnf
True
"""
bexpr = ensure_bexpr(expr)
return BooleanExpression(bexpr.tree.to_cnf())
def to_primitives(expr):
"""Convert an expression to a form with only primitive operators.
All operators will be transformed equivalent form composed only of the
logical AND, OR,and NOT operators. Symbolic operators in the passed
expression will remain symbolic in the transformed expression and the same
applies for plain English operators.
:param expr: The expression to transform.
:type expr: :class:`str <python:str>` or :class:`BooleanExpression \
<tt.expressions.bexpr.BooleanExpression>`
:returns: A new expression object, transformed to contain only primitive
operators.
:rtype: :class:`BooleanExpression <tt.expressions.bexpr.BooleanExpression>`
:raises InvalidArgumentTypeError: If ``expr`` is not a valid type.
Here's a simple transformation of exclusive-or::
>>> from tt import to_primitives
>>> to_primitives('A xor B')
<BooleanExpression "(A and not B) or (not A and B)">
And another example of if-and-only-if (using symbolic operators)::
>>> to_primitives('A <-> B')
<BooleanExpression "(A /\\ B) \\/ (~A /\\ ~B)">
"""
bexpr = ensure_bexpr(expr)
return BooleanExpression(bexpr.tree.to_primitives())
|
welchbj/tt
|
tt/transformations/bexpr.py
|
Python
|
mit
| 11,265
|
const assert = require('assert');
const MockServer = require('../../../../lib/mockserver.js');
const CommandGlobals = require('../../../../lib/globals/commands.js');
const Nightwatch = require('../../../../lib/nightwatch.js');
describe('browser.getFirstElementChild', function(){
before(function(done) {
CommandGlobals.beforeEach.call(this, done);
});
after(function(done) {
CommandGlobals.afterEach.call(this, done);
});
it('.getFirstElementChild', function(done){
MockServer.addMock({
url: '/wd/hub/session/1352110219202/execute',
method: 'POST',
response: {
value: {
'ELEMENT': '1'
}
}
}, true);
this.client.api.getFirstElementChild('#weblogin', function callback(result){
assert.strictEqual(result.value.getId(), '1');
});
this.client.start(done);
});
it('.getFirstElementChild - no such element', function(done) {
MockServer.addMock({
url: '/wd/hub/session/1352110219202/elements',
method: 'POST',
postdata: {
using: 'css selector',
value: '#badDriver'
},
response: {
status: 0,
sessionId: '1352110219202',
value: [{
ELEMENT: '2'
}]
}
});
MockServer.addMock({
url: '/wd/hub/session/1352110219202/execute',
method: 'POST',
response: {
status: 0,
value: null
}
});
this.client.api.getFirstElementChild('#badDriver', function callback(result){
assert.strictEqual(result.value, null);
});
this.client.start(done);
});
it('.getFirstElementChild - webdriver protcol', function(done){
Nightwatch.initW3CClient({
silent: true,
output: false
}).then(client => {
MockServer.addMock({
url: '/session/13521-10219-202/execute/sync',
response: {
value: {
'element-6066-11e4-a52e-4f735466cecf': 'f54dc0ef-c84f-424a-bad0-16fef6595a70'
}
}
}, true);
MockServer.addMock({
url: '/session/13521-10219-202/execute/sync',
response: {
value: {
'element-6066-11e4-a52e-4f735466cecf': 'f54dc0ef-c84f-424a-bad0-16fef6595a70'
}
}
}, true);
client.api.getFirstElementChild('#webdriver', function(result) {
assert.ok(result.value);
assert.strictEqual(result.value.getId(), 'f54dc0ef-c84f-424a-bad0-16fef6595a70');
}).getFirstElementChild('#webdriver', function callback(result){
assert.ok(result.value);
assert.strictEqual(result.value.getId(), 'f54dc0ef-c84f-424a-bad0-16fef6595a70');
});
client.start(done);
});
});
it('.getFirstElementChild - webdriver protcol no such element', function(done){
Nightwatch.initW3CClient({
silent: true,
output: false
}).then(client => {
MockServer.addMock({
url: '/session/13521-10219-202/execute/sync',
response: {
value: null
}
});
client.api.getFirstElementChild('#webdriver', function(result) {
assert.strictEqual(result.value, null);
});
client.start(done);
});
});
});
|
nightwatchjs/nightwatch
|
test/src/api/commands/element/testGetFirstElementChild.js
|
JavaScript
|
mit
| 3,229
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>Clean Blog - Sample Post</title>
<!-- Bootstrap Core CSS -->
<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Theme CSS -->
<link href="css/clean-blog.min.css" rel="stylesheet">
<!-- Custom Fonts -->
<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href='https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
<!-- 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/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-default navbar-custom navbar-fixed-top">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header page-scroll">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
Menu <i class="fa fa-bars"></i>
</button>
<a class="navbar-brand" href="index.html">Start Bootstrap</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li>
<a href="index.html">Home</a>
</li>
<li>
<a href="nationalparks.html">Parks/Reserves</a>
</li>
<li>
<a href="landloss.html">Potential Land Loss</a>
</li>
<li>
<a href="contact.html">Contact</a>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<!-- Page Header -->
<!-- Set your background image for this header on the line below. -->
<header class="intro-header" style="background-image: url('img/post-bg.jpg')">
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<div class="post-heading">
<h1>Man must explore, and this is exploration at its greatest</h1>
<h2 class="subheading">Problems look mighty small from 150 miles up</h2>
<span class="meta">Posted by <a href="#">Start Bootstrap</a> on August 24, 2014</span>
</div>
</div>
</div>
</div>
</header>
<!-- Post Content -->
<article>
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<p>Never in all their history have men been able truly to conceive of the world as one: a single sphere, a globe, having the qualities of a globe, a round earth in which all the directions eventually meet, in which there is no center because every point, or none, is center — an equal earth which all men occupy as equals. The airman's earth, if free men make it, will be truly round: a globe in practice, not in theory.</p>
<p>Science cuts two ways, of course; its products can be used for both good and evil. But there's no turning back from science. The early warnings about technological dangers also come from science.</p>
<p>What was most significant about the lunar voyage was not that man set foot on the Moon but that they set eye on the earth.</p>
<p>A Chinese tale tells of some men sent to harm a young girl who, upon seeing her beauty, become her protectors rather than her violators. That's how I felt seeing the Earth for the first time. I could not help but love and cherish her.</p>
<p>For those who have seen the Earth from space, and for the hundreds and perhaps thousands more who will, the experience most certainly changes your perspective. The things that we share in our world are far more valuable than those which divide us.</p>
<h2 class="section-heading">The Final Frontier</h2>
<p>There can be no thought of finishing for ‘aiming for the stars.’ Both figuratively and literally, it is a task to occupy the generations. And no matter how much progress one makes, there is always the thrill of just beginning.</p>
<p>There can be no thought of finishing for ‘aiming for the stars.’ Both figuratively and literally, it is a task to occupy the generations. And no matter how much progress one makes, there is always the thrill of just beginning.</p>
<blockquote>The dreams of yesterday are the hopes of today and the reality of tomorrow. Science has not yet mastered prophecy. We predict too much for the next year and yet far too little for the next ten.</blockquote>
<p>Spaceflights cannot be stopped. This is not the work of any one man or even a group of men. It is a historical process which mankind is carrying out in accordance with the natural laws of human development.</p>
<h2 class="section-heading">Reaching for the Stars</h2>
<p>As we got further and further away, it [the Earth] diminished in size. Finally it shrank to the size of a marble, the most beautiful you can imagine. That beautiful, warm, living object looked so fragile, so delicate, that if you touched it with a finger it would crumble and fall apart. Seeing this has to change a man.</p>
<a href="#">
<img class="img-responsive" src="img/post-sample-image.jpg" alt="">
</a>
<span class="caption text-muted">To go places and do things that have never been done before – that’s what living is all about.</span>
<p>Space, the final frontier. These are the voyages of the Starship Enterprise. Its five-year mission: to explore strange new worlds, to seek out new life and new civilizations, to boldly go where no man has gone before.</p>
<p>As I stand out here in the wonders of the unknown at Hadley, I sort of realize there’s a fundamental truth to our nature, Man must explore, and this is exploration at its greatest.</p>
<p>Placeholder text by <a href="http://spaceipsum.com/">Space Ipsum</a>. Photographs by <a href="https://www.flickr.com/photos/nasacommons/">NASA on The Commons</a>.</p>
</div>
</div>
</div>
</article>
<hr>
<!-- Footer -->
<footer>
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<ul class="list-inline text-center">
<li>
<a href="#">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-twitter fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
<li>
<a href="#">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-facebook fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
<li>
<a href="#">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-github fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
</ul>
<p class="copyright text-muted">Copyright © Your Website 2016</p>
</div>
</div>
</div>
</footer>
<!-- jQuery -->
<script src="vendor/jquery/jquery.min.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>
<!-- Contact Form JavaScript -->
<script src="js/jqBootstrapValidation.js"></script>
<script src="js/contact_me.js"></script>
<!-- Theme JavaScript -->
<script src="js/clean-blog.min.js"></script>
</body>
</html>
|
DataVizMonicaNikkiStephanie/FirstNationsReserves
|
landloss.html
|
HTML
|
mit
| 9,677
|