text stringlengths 2 1.04M | meta dict |
|---|---|
package org.zstack.sdk;
public class QueryIdentityZoneFromLocalResult {
public java.util.List inventories;
public void setInventories(java.util.List inventories) {
this.inventories = inventories;
}
public java.util.List getInventories() {
return this.inventories;
}
public java.lang.Long total;
public void setTotal(java.lang.Long total) {
this.total = total;
}
public java.lang.Long getTotal() {
return this.total;
}
}
| {
"content_hash": "9f6c0f386b99dc6a32a20837e228d65f",
"timestamp": "",
"source": "github",
"line_count": 22,
"max_line_length": 60,
"avg_line_length": 22.59090909090909,
"alnum_prop": 0.6639839034205232,
"repo_name": "zstackorg/zstack",
"id": "4a8f3d71f6a2ec712027a0aea952c323a2faacbc",
"size": "497",
"binary": false,
"copies": "5",
"ref": "refs/heads/master",
"path": "sdk/src/main/java/org/zstack/sdk/QueryIdentityZoneFromLocalResult.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "AspectJ",
"bytes": "54952"
},
{
"name": "Batchfile",
"bytes": "1132"
},
{
"name": "Groovy",
"bytes": "832169"
},
{
"name": "Java",
"bytes": "15798995"
},
{
"name": "Shell",
"bytes": "152829"
}
],
"symlink_target": ""
} |
package io.gatling.recorder.util
import java.util.Locale
import io.netty.handler.codec.http.HttpHeaderValues._
object HttpUtils {
val SupportedEncodings = Set(GZIP.toString, DEFLATE.toString)
def filterSupportedEncodings(acceptEncodingHeaderValue: String): String =
acceptEncodingHeaderValue
.split(",")
.filter(encoding => SupportedEncodings.contains(encoding.trim.toLowerCase(Locale.US)))
.mkString(",")
}
| {
"content_hash": "8bf9fe3668c993bfbd75c0b605059ea5",
"timestamp": "",
"source": "github",
"line_count": 17,
"max_line_length": 92,
"avg_line_length": 25.88235294117647,
"alnum_prop": 0.7545454545454545,
"repo_name": "wiacekm/gatling",
"id": "506633efcbaf82d24d0f26836f31071bcd22e4eb",
"size": "1056",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "gatling-recorder/src/main/scala/io/gatling/recorder/util/HttpUtils.scala",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "5105"
},
{
"name": "CSS",
"bytes": "10422"
},
{
"name": "HTML",
"bytes": "182180"
},
{
"name": "Java",
"bytes": "6065"
},
{
"name": "JavaScript",
"bytes": "3690"
},
{
"name": "Python",
"bytes": "7732"
},
{
"name": "Scala",
"bytes": "1990564"
},
{
"name": "Shell",
"bytes": "6180"
}
],
"symlink_target": ""
} |
indoblaxican
============
A revolution in the food industry.
| {
"content_hash": "af18ff6aa253b4371a92fd61d57932f5",
"timestamp": "",
"source": "github",
"line_count": 4,
"max_line_length": 34,
"avg_line_length": 15.5,
"alnum_prop": 0.6451612903225806,
"repo_name": "ankitr/indoblaxican",
"id": "38d67d4a1902ed98f6fd8573bdb0999319a5dc1a",
"size": "62",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "README.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Python",
"bytes": "185"
}
],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<TITLE>
Uses of Package org.apache.poi.hssf.eventusermodel (POI API Documentation)
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Package org.apache.poi.hssf.eventusermodel (POI API Documentation)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/apache/poi/hssf/eventusermodel/package-use.html" target="_top"><B>FRAMES</B></A>
<A HREF="package-use.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<CENTER>
<H2>
<B>Uses of Package<br>org.apache.poi.hssf.eventusermodel</B></H2>
</CENTER>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
Packages that use <A HREF="../../../../../org/apache/poi/hssf/eventusermodel/package-summary.html">org.apache.poi.hssf.eventusermodel</A></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><A HREF="#org.apache.poi.hssf.eventusermodel"><B>org.apache.poi.hssf.eventusermodel</B></A></TD>
<TD>HSSF eventmodel Package provides an event-based API for reading HSSF files. </TD>
</TR>
</TABLE>
<P>
<A NAME="org.apache.poi.hssf.eventusermodel"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
Classes in <A HREF="../../../../../org/apache/poi/hssf/eventusermodel/package-summary.html">org.apache.poi.hssf.eventusermodel</A> used by <A HREF="../../../../../org/apache/poi/hssf/eventusermodel/package-summary.html">org.apache.poi.hssf.eventusermodel</A></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><B><A HREF="../../../../../org/apache/poi/hssf/eventusermodel/class-use/HSSFListener.html#org.apache.poi.hssf.eventusermodel"><B>HSSFListener</B></A></B>
<BR>
Interface for use with the HSSFRequest and HSSFEventFactory.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><B><A HREF="../../../../../org/apache/poi/hssf/eventusermodel/class-use/HSSFRequest.html#org.apache.poi.hssf.eventusermodel"><B>HSSFRequest</B></A></B>
<BR>
An HSSFRequest object should be constructed registering an instance or multiple
instances of HSSFListener with each Record.sid you wish to listen for.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><B><A HREF="../../../../../org/apache/poi/hssf/eventusermodel/class-use/HSSFUserException.html#org.apache.poi.hssf.eventusermodel"><B>HSSFUserException</B></A></B>
<BR>
This exception is provided as a way for API users to throw
exceptions from their event handling code.</TD>
</TR>
</TABLE>
<P>
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/apache/poi/hssf/eventusermodel/package-use.html" target="_top"><B>FRAMES</B></A>
<A HREF="package-use.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
<i>Copyright 2016 The Apache Software Foundation or
its licensors, as applicable.</i>
</BODY>
</HTML>
| {
"content_hash": "9d2dd6982d2e7010053f26c8b35a48c5",
"timestamp": "",
"source": "github",
"line_count": 185,
"max_line_length": 270,
"avg_line_length": 43.69189189189189,
"alnum_prop": 0.6220462699492763,
"repo_name": "jakebooyah/athena",
"id": "ed6118864dac1c1b554f69897261aadb46c6c04d",
"size": "8083",
"binary": false,
"copies": "5",
"ref": "refs/heads/master",
"path": "lib/poi-3.14/docs/apidocs/org/apache/poi/hssf/eventusermodel/package-use.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "16269"
},
{
"name": "HTML",
"bytes": "101501027"
},
{
"name": "Java",
"bytes": "16687"
}
],
"symlink_target": ""
} |
require 'bricolage/parameters'
require 'bricolage/script'
require 'bricolage/sqlstatement'
require 'bricolage/exception'
require 'pathname'
module Bricolage
class JobClass
CLASSES = {}
def JobClass.define(id, &block)
id = id.to_s
raise FatalError, "duplicated job class: #{@id.inspect}" if CLASSES[id]
c = new(id)
c.instance_exec(c, &block)
CLASSES[id] = c
end
LOAD_PATHES = []
def JobClass.add_load_path(path)
LOAD_PATHES.push path
end
def JobClass.primary_load_path
load_path_for_lib_file(__FILE__)
end
def JobClass.load_path_for_lib_file(path)
srcdir = Pathname(path).realpath.parent.parent.parent.cleanpath
srcdir + 'jobclass'
end
add_load_path primary_load_path
def JobClass.get(id)
unless CLASSES[id.to_s]
begin
path = LOAD_PATHES.map {|prefix| prefix + "#{id}.rb" }.detect(&:exist?)
raise ParameterError, "no such job class: #{id}" unless path
::Bricolage.module_eval File.read(path), path.to_path, 1
rescue SystemCallError => err
raise FatalError, "could not load job class: #{id}: #{err.message}"
end
raise FatalError, "job class file loaded but required job class is not defined: #{id}" unless CLASSES[id.to_s]
end
CLASSES[id.to_s]
end
def JobClass.list
LOAD_PATHES.map {|dir|
Dir.glob("#{dir}/*.rb").map {|path| File.basename(path, '.rb') }
}.flatten.uniq.sort
end
def JobClass.each(&block)
CLASSES.each_value(&block)
end
def initialize(id)
@id = id
@parameters = nil
@parameters_filter = nil # optional
@declarations = nil
@script = nil
end
attr_reader :id
def inspect
"\#<#{self.class} #{@id}>"
end
def parameters(&block)
@parameters = block
end
def get_parameters
Parameters::Declarations.new.tap {|params|
@parameters.call(params)
}
end
def parameters_filter(&block)
@parameters_filter = block
end
def invoke_parameters_filter(job)
@parameters_filter.call(job) if @parameters_filter
end
def declarations(&block)
@declarations = block
end
def get_declarations(params)
@declarations ? @declarations.call(params) : Declarations.new
end
def script(&block)
@script = block
end
def get_script(params)
Script.new.tap {|script|
@script.call(params, script)
}
end
end
end
| {
"content_hash": "0212a4402a8bd65abe46fa605b597208",
"timestamp": "",
"source": "github",
"line_count": 112,
"max_line_length": 118,
"avg_line_length": 22.6875,
"alnum_prop": 0.6092089728453365,
"repo_name": "inohiro/bricolage",
"id": "b315f2c5ff859337176d35b55aa1b66c033d84b1",
"size": "2541",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "lib/bricolage/jobclass.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Ruby",
"bytes": "196362"
}
],
"symlink_target": ""
} |
package com.flat502.rox.client;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.ServerSocket;
import java.net.Socket;
import com.flat502.rox.log.Log;
import com.flat502.rox.log.LogFactory;
import com.flat502.rox.utils.Utils;
// A server that will either never accept or never read
// from a connection.
public class DumbServer extends Thread {
private static Log log = LogFactory.getLog(DumbServer.class);
private int port;
private boolean accept;
private byte[] rsp;
private ServerSocket serverSocket;
private IOException exception;
public DumbServer(int port, boolean accept) {
this(port, accept, null);
}
public DumbServer(int port, boolean accept, byte[] rsp) {
this.port = port;
this.accept = accept;
this.rsp = rsp;
log.trace("DumbServer: init: accept=" + accept + ", rsp=" + (rsp != null));
start();
}
@Override
public void run() {
try {
this.serverSocket = new ServerSocket(this.port);
log.trace("DumbServer: listening on " + serverSocket);
if (this.accept) {
Socket socket = this.serverSocket.accept();
log.trace("DumbServer: accepted " + socket);
if (this.rsp != null) {
InputStream is = socket.getInputStream();
byte[] req = new byte[32768];
log.trace("DumbServer: reading ...");
int nread = is.read(req);
log.trace("DumbServer: recv " + nread + " byte(s):\n" + Utils.toHexDump(req, 0, nread));
OutputStream os = socket.getOutputStream();
os.write(this.rsp);
os.flush();
log.trace("DumbServer: wrote " + this.rsp.length + " byte(s):\n" + Utils.toHexDump(rsp));
}
}
} catch (IOException e) {
e.printStackTrace();
this.exception = e;
}
}
public void shutdown() throws IOException {
if (this.exception != null) {
throw this.exception;
}
while (this.serverSocket == null) {
Thread.yield();
}
this.serverSocket.close();
}
}
| {
"content_hash": "169200dc3fe63bed9d7b410588ad2c08",
"timestamp": "",
"source": "github",
"line_count": 78,
"max_line_length": 109,
"avg_line_length": 30.615384615384617,
"alnum_prop": 0.5418760469011725,
"repo_name": "lukehutch/gribbit-rox",
"id": "598d9cff66bf5c704026485d9be25b35b95bc4e9",
"size": "2388",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "tests/com/flat502/rox/client/DumbServer.java",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "HTML",
"bytes": "5335"
},
{
"name": "Java",
"bytes": "1814926"
}
],
"symlink_target": ""
} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>angles: Not compatible</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / extra-dev</a></li>
<li class="active"><a href="">dev / angles - 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>
angles
<small>
8.9.0
<span class="label label-info">Not compatible</span>
</small>
</h1>
<p><em><script>document.write(moment("2020-04-14 10:21:03 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2020-04-14 10:21:03 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 dev Formal proof management system
num 1.3 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.10.0 The OCaml compiler (virtual package)
ocaml-base-compiler 4.10.0 Official release 4.10.0
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.8.1 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "Hugo.Herbelin@inria.fr"
homepage: "https://github.com/coq-contribs/angles"
license: "Unknown"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/Angles"]
depends: [
"ocaml"
"coq" {>= "8.9" & < "8.10~"}
]
tags: [
"keyword: Pcoq"
"keyword: geometry"
"keyword: plane geometry"
"keyword: oriented angles"
"category: Mathematics/Geometry/General"
"date: 2002-01-15"
]
authors: [
"Frédérique Guilhot <Frederique.Guilhot@sophia.inria.fr>"
]
bug-reports: "https://github.com/coq-contribs/angles/issues"
dev-repo: "git+https://github.com/coq-contribs/angles.git"
synopsis: "Formalization of the oriented angles theory"
description: """
The basis of the contribution is a formalization of the
theory of oriented angles of non-zero vectors. Then, we prove some
classical plane geometry theorems: the theorem which gives a necessary
and sufficient condition so that four points are cocyclic, the one
which shows that the reflected points with respect to the sides of a
triangle orthocenter are on its circumscribed circle, the Simson's
theorem and the Napoleon's theorem. The reader can refer to the
associated research report (http://www-sop.inria.fr/lemme/FGRR.ps) and
the README file of the contribution."""
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/angles/archive/v8.9.0.tar.gz"
checksum: "md5=b412dfdd22ced294295c70c09b060e14"
}
</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-angles.8.9.0 coq.dev</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is dev).
The following dependencies couldn't be met:
- coq-angles -> coq < 8.10~ -> ocaml < 4.10
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-angles.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">
<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>
| {
"content_hash": "c6853c2df8b35d86cc9a96acba4ba1e1",
"timestamp": "",
"source": "github",
"line_count": 181,
"max_line_length": 157,
"avg_line_length": 41,
"alnum_prop": 0.5604365988411265,
"repo_name": "coq-bench/coq-bench.github.io",
"id": "e1b90cad8dc45a9fcea2992541029e7f1fb62e25",
"size": "7425",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "clean/Linux-x86_64-4.10.0-2.0.6/extra-dev/dev/angles/8.9.0.html",
"mode": "33188",
"license": "mit",
"language": [],
"symlink_target": ""
} |
Exceptions are a form of error handling.
They are called exceptions, as they normally appear when dealing with some unexpected event.
At any point in our code, we can "raise" an exception.
We do this using the `raise` method, passing in an object - normally an Exception object, although we can also use basic strings.
For example, you'll see in the exercise stubs that we use the built-in `RuntimeError` to tell Ruby that a method hasn't been implemented.
You can also use the shorthand syntax of `raise(ExceptionObject, params)`.
If the exception class is omitted, `RuntimeError` is used by default.
For example:
```ruby
# These are equivalent
raise RuntimeError.new("Please implement this method")
raise RuntimeError, "Please implement this method"
raise "Please implement this method"
```
When Ruby sees this it bubbles the error to the top of the program and then exits.
For example, if you try dividing something by zero, you will see something like this:
```ruby
5/0
#=> Traceback (most recent call last):
#=> ...
#=> ZeroDivisionError (divided by 0)
```
It is important to note that exceptions should be used in cases where something exceptional happens, an error that needs special handling.
Exceptions should not be used for control-flow of a program, as that is considered bad design, which often leads to bad performance and maintainability.
## Class hierarchy
In Ruby exceptions follow a class hierarchy where `Exception` is the base class. These are the most common Ruby's built-in exceptions:
```
Exception
NoMemoryError
ScriptError
LoadError
NotImplementedError
SyntaxError
SignalException
Interrupt
StandardError
ArgumentError
IOError
EOFError
IndexError
LocalJumpError
NameError
NoMethodError
RangeError
FloatDomainError
RegexpError
RuntimeError
SecurityError
SystemCallError
SystemStackError
ThreadError
TypeError
ZeroDivisionError
SystemExit
```
Rescuing errors of a specific class also rescues errors of its children. This is why rescuing from `Exception` can be dangerous.
Ruby uses exceptions to also handle messages from the operative system "Signals", for example `ctrl-c`. This means that rescuing from `Exception` will also capture this system "Signals". So in order to prevent unexpected behaviours the common practice to capture "all errors" is to rescue form `StandardError`.
## Rescue Syntax
Ruby also provide extended rescue clauses for situations that require an special treatment:
```ruby
begin
# ...
rescue CustomError => error
# This block is run if a CustomError occurs
rescue AnotherCustomError => error
# This block is run if a AnotherCustomError occurs
else
# This block is run if no exception occurred at all
ensure
# This block always run, regardless of whether an exception occurred
end
```
This can be useful for example when working with network IO where we always need to remember to close a connection.
Ruby rescue blocks can also use the `retry` keyword which re-runs everything between begin and rescue:
```ruby
counter = 0
begin
counter += 1
api_request
rescue
retry if counter <= 3
end
```
| {
"content_hash": "dc5a3edcacd5b952adad99e7e83f11fd",
"timestamp": "",
"source": "github",
"line_count": 97,
"max_line_length": 310,
"avg_line_length": 32.69072164948454,
"alnum_prop": 0.7637969094922737,
"repo_name": "NeimadTL/ruby",
"id": "ac41fc3cb6703e6c620863cc9236d869a2b96dbc",
"size": "3180",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "concepts/exceptions/about.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "4159"
},
{
"name": "Ruby",
"bytes": "505597"
},
{
"name": "Shell",
"bytes": "1656"
}
],
"symlink_target": ""
} |
{% extends 'base.html' %}
{% block head %}
{{super()}}
{% endblock %}
{% block scripts %}
{{ super() }}
{% endblock %}
{% block header %}
<link rel="stylesheet" href="/static/css/login.css">
<script type="text/javascript" src="/static/js/src/controllers/signin_controller.js"></script>
{% endblock %}
{% block main %}
<div ng-controller="signInUpCtrl" class="wrapper">
<!-- sign in -->
<div ng-class="classSignIn">
<form class="form-signin" method="post" action="/login">
<h2 class="form-signin-heading">Entrar</h2>
<input type="text" class="form-control" name="login" placeholder="Email" required="" autofocus="" />
<input type="password" class="form-control" name="password" placeholder="Senha" required=""/>
<button class="btn btn-lg btn-success btn-block" type="submit">Entrar</button>
<!-- soh para admins por enquanto -->
<!--<div class="sign-up">Ainda não possui uma conta?-->
<!--<a href="#" ng-click="showSignUpScreen()">cadastre-se</a>-->
<!--</div>-->
</form>
</div> <!-- sign in end -->
<form ng-class="classSignUp" method="post" action="/signup"> <!-- sign up -->
<fieldset>
<legend>Criar uma conta</legend>
<div class="form-group">
<label for="inputName" class="col-lg-2 control-label">Nome</label>
<div class="col-lg-10">
<input type="text" class="form-control" id="inputName" placeholder="Nome" name="name">
</div>
</div>
<div class="form-group">
<label for="inputEmail" class="col-lg-2 control-label">Email</label>
<div class="col-lg-10">
<input type="text" class="form-control" id="inputEmail" placeholder="Email" name="email">
</div>
</div>
<div class="form-group">
<label for="inputPassword" class="col-lg-2 control-label">Senha</label>
<div class="col-lg-10">
<input type="password" class="form-control" id="inputPassword" placeholder="Senha" name="password">
</div>
</div>
<div class="form-group">
<label class="col-lg-2 control-label">Gênero</label>
<div class="col-lg-10">
<div class="radio">
<label>
<p><input type="checkbox" id="male" name="male"><label for="male">
<span class="ui"></span>Masculino</label>
</p>
</label>
</div>
<div class="radio">
<label>
<p><input type="checkbox" id="female" name="female"><label for="female">
<span class="ui"></span>Feminino</label>
</p>
</label>
</div>
</div>
</div>
<div class="form-group">
<div class="col-lg-10 col-lg-offset-2">
<button class="btn btn-default">Cancelar</button>
<button type="submit" class="btn btn-primary">Cadastrar</button>
</div>
</div>
</fieldset>
</form> <!-- sign up end -->
</div>
{% endblock %}
</body>
</html> | {
"content_hash": "6995caf26aa5cd55b6d0bb7db50f69bb",
"timestamp": "",
"source": "github",
"line_count": 80,
"max_line_length": 123,
"avg_line_length": 48.4125,
"alnum_prop": 0.4314484895429899,
"repo_name": "jcemelanda/pygame-site",
"id": "9aed5f6baa2ed7bda4ac5535e52a9a6714f1ba6d",
"size": "3875",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "src/app/users/templates/sign-in-up.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "32278"
},
{
"name": "HTML",
"bytes": "205874"
},
{
"name": "JavaScript",
"bytes": "19746"
},
{
"name": "PHP",
"bytes": "2274"
},
{
"name": "Python",
"bytes": "23504"
}
],
"symlink_target": ""
} |
<?php
namespace app\models;
use Yii;
/**
* This is the model class for table "satuanbrg_m".
*
* @property integer $satuanbrg_id
* @property string $satuanbrg_nama
*
* @property BarangM[] $barangMs
*/
class SatuanbrgM extends \yii\db\ActiveRecord
{
/**
* @inheritdoc
*/
public static function tableName()
{
return 'satuanbrg_m';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['satuanbrg_nama'], 'required'],
[['satuanbrg_nama'], 'string'],
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'satuanbrg_id' => 'ID Satuan Barang ',
'satuanbrg_nama' => 'Satuan Nama Barang ',
];
}
/**
* @return \yii\db\ActiveQuery
*/
public function getBarangMs()
{
return $this->hasMany(BarangM::className(), ['satuanbrg_id' => 'satuanbrg_id']);
}
}
| {
"content_hash": "b003ac581920ac703cbb17b601270e1c",
"timestamp": "",
"source": "github",
"line_count": 54,
"max_line_length": 88,
"avg_line_length": 18.09259259259259,
"alnum_prop": 0.5220061412487206,
"repo_name": "taufikmaul/si-hct",
"id": "e89d5913421beef7ddd5578cc5291b9e3b4a2d0c",
"size": "977",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "frontend/models/SatuanbrgM.php",
"mode": "33261",
"license": "bsd-3-clause",
"language": [
{
"name": "Batchfile",
"bytes": "1541"
},
{
"name": "CSS",
"bytes": "3253"
},
{
"name": "PHP",
"bytes": "221107"
}
],
"symlink_target": ""
} |
package java.util
import java.lang.Cloneable
import java.{util => ju}
/* This implementation allows `null` keys and values, although the JavaDoc
* specifies that operations should throw `NullPointerException`s if `null`
* keys or values are used. This makes the implementation easier, notably by
* allowing to reuse the implementation of `j.u.HashMap`, and is acceptable
* given that NPEs are undefined behavior in Scala.js.
*/
class Hashtable[K, V] private (inner: ju.HashMap[K, V])
extends ju.Dictionary[K,V] with ju.Map[K, V] with Cloneable with Serializable {
def this() =
this(new ju.HashMap[K, V]())
def this(initialCapacity: Int) =
this(new ju.HashMap[K, V](initialCapacity))
def this(initialCapacity: Int, loadFactor: Float) =
this(new ju.HashMap[K, V](initialCapacity, loadFactor))
def this(t: ju.Map[_ <: K, _ <: V]) =
this(new ju.HashMap[K, V](t))
def size(): Int =
inner.size()
def isEmpty(): Boolean =
inner.isEmpty()
def keys(): ju.Enumeration[K] =
Collections.enumeration(keySet())
def elements(): ju.Enumeration[V] =
Collections.enumeration(values())
def contains(value: Any): Boolean =
containsValue(value)
def containsValue(value: Any): Boolean =
inner.containsValue(value)
def containsKey(key: Any): Boolean =
inner.containsKey(key)
def get(key: Any): V =
inner.get(key)
// Not implemented
// protected def rehash(): Unit
def put(key: K, value: V): V =
inner.put(key, value)
def remove(key: Any): V =
inner.remove(key)
def putAll(m: ju.Map[_ <: K, _ <: V]): Unit =
inner.putAll(m)
def clear(): Unit =
inner.clear()
override def clone(): AnyRef =
new ju.Hashtable[K, V](this)
override def toString(): String =
inner.toString()
def keySet(): ju.Set[K] =
inner.keySet()
def entrySet(): ju.Set[ju.Map.Entry[K, V]] =
inner.entrySet()
def values(): ju.Collection[V] =
inner.values()
}
| {
"content_hash": "8c94f45f994d1e65f6c3dedd5b45a1df",
"timestamp": "",
"source": "github",
"line_count": 82,
"max_line_length": 83,
"avg_line_length": 23.9390243902439,
"alnum_prop": 0.6551197147223637,
"repo_name": "gzm0/scala-js",
"id": "9667c74811f50d25fbbe392b7a1956c92ad45134",
"size": "2235",
"binary": false,
"copies": "3",
"ref": "refs/heads/main",
"path": "javalib/src/main/scala/java/util/Hashtable.scala",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "1030"
},
{
"name": "JavaScript",
"bytes": "5883"
},
{
"name": "Scala",
"bytes": "8081190"
},
{
"name": "Shell",
"bytes": "1299"
}
],
"symlink_target": ""
} |
<!DOCTYPE html><html lang="en">
<head>
<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; user-scalable=0;">
<meta charset="utf-8">
<title>Phing API Documentation » \SvnCommitTask</title>
<meta name="author" content="Mike van Riel">
<meta name="description" content="">
<link href="../css/template.css" rel="stylesheet" media="all">
<script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script><script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script><script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script><script src="../js/bootstrap.js" type="text/javascript"></script><script src="../js/template.js" type="text/javascript"></script><script src="../js/prettify/prettify.min.js" type="text/javascript"></script><link rel="shortcut icon" href="../img/favicon.ico">
<link rel="apple-touch-icon" href="../img/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png">
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner"><div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></a><a class="brand" href="../index.html">Phing API Documentation</a><div class="nav-collapse"><ul class="nav">
<li class="dropdown">
<a href="#api" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b></a><ul class="dropdown-menu">
<li><a>Packages</a></li>
<li><a href="../packages/Default.html"><i class="icon-folder-open"></i> Default</a></li>
<li><a href="../packages/JSMin.html"><i class="icon-folder-open"></i> JSMin</a></li>
<li><a href="../packages/Parallel.html"><i class="icon-folder-open"></i> Parallel</a></li>
<li><a href="../packages/Phing.html"><i class="icon-folder-open"></i> Phing</a></li>
<li><a href="../packages/phing.html"><i class="icon-folder-open"></i> phing</a></li>
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b></a><ul class="dropdown-menu"><li><a href="../graph_class.html"><i class="icon-list-alt"></i> Class hierarchy diagram</a></li></ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b></a><ul class="dropdown-menu">
<li><a href="../errors.html"><i class="icon-remove-sign"></i> Errors
<span class="label label-info">2573</span></a></li>
<li><a href="../markers.html"><i class="icon-map-marker"></i> Markers
<ul>
<li>todo
<span class="label label-info">15</span>
</li>
<li>fixme
<span class="label label-info">8</span>
</li>
</ul></a></li>
<li><a href="../deprecated.html"><i class="icon-stop"></i> Deprecated elements
<span class="label label-info">11</span></a></li>
</ul>
</li>
</ul></div>
</div></div>
<div class="go_to_top"><a href="#___" style="color: inherit">Back to top <i class="icon-upload icon-white"></i></a></div>
</div>
<div id="___" class="container">
<noscript><div class="alert alert-warning">
Javascript is disabled; several features are only available
if Javascript is enabled.
</div></noscript>
<div class="row">
<div class="span4">
<span class="btn-group visibility" data-toggle="buttons-checkbox"><button class="btn public active" title="Show public elements">Public</button><button class="btn protected" title="Show protected elements">Protected</button><button class="btn private" title="Show private elements">Private</button><button class="btn inherited active" title="Show inherited elements">Inherited</button></span><div class="btn-group view pull-right" data-toggle="buttons-radio">
<button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button><button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
</div>
<ul class="side-nav nav nav-list">
<li class="nav-header">
<i class="icon-custom icon-method"></i> Methods
<ul>
<li class="method public inherited"><a href="#method_getDescription" title="getDescription :: Returns the textual description of the task"><span class="description">Returns the textual description of the task</span><pre>getDescription()</pre></a></li>
<li class="method public inherited"><a href="#method_getForce" title="getForce :: Returns the force switch"><span class="description">Returns the force switch</span><pre>getForce()</pre></a></li>
<li class="method public inherited"><a href="#method_getIgnoreExternals" title="getIgnoreExternals :: Returns the ignore-externals switch"><span class="description">Returns the ignore-externals switch</span><pre>getIgnoreExternals()</pre></a></li>
<li class="method public inherited"><a href="#method_getLocation" title="getLocation :: Returns the location within the buildfile this task occurs."><span class="description">Returns the location within the buildfile this task occurs.</span><pre>getLocation()</pre></a></li>
<li class="method public "><a href="#method_getMessage" title="getMessage :: Gets the commit message"><span class="description">Gets the commit message</span><pre>getMessage()</pre></a></li>
<li class="method public inherited"><a href="#method_getNoCache" title="getNoCache :: Returns the no-auth-cache switch"><span class="description">Returns the no-auth-cache switch</span><pre>getNoCache()</pre></a></li>
<li class="method public inherited"><a href="#method_getOwningTarget" title="getOwningTarget :: Returns the owning target of this task."><span class="description">Returns the owning target of this task.</span><pre>getOwningTarget()</pre></a></li>
<li class="method public inherited"><a href="#method_getPassword" title="getPassword :: Returns the password"><span class="description">Returns the password</span><pre>getPassword()</pre></a></li>
<li class="method public inherited"><a href="#method_getProject" title="getProject :: Returns a reference to current project"><span class="description">Returns a reference to current project</span><pre>getProject()</pre></a></li>
<li class="method public "><a href="#method_getPropertyName" title="getPropertyName :: Returns the name of the property to use for returned revision"><span class="description">Returns the name of the property to use for returned revision</span><pre>getPropertyName()</pre></a></li>
<li class="method public inherited"><a href="#method_getRecursive" title="getRecursive :: Returns the non-recursive switch"><span class="description">Returns the non-recursive switch</span><pre>getRecursive()</pre></a></li>
<li class="method public inherited"><a href="#method_getRepositoryUrl" title="getRepositoryUrl :: Returns the path/URI to the repository"><span class="description">Returns the path/URI to the repository</span><pre>getRepositoryUrl()</pre></a></li>
<li class="method public inherited"><a href="#method_getRuntimeConfigurableWrapper" title="getRuntimeConfigurableWrapper :: Returns the wrapper object for runtime configuration"><span class="description">Returns the wrapper object for runtime configuration</span><pre>getRuntimeConfigurableWrapper()</pre></a></li>
<li class="method public inherited"><a href="#method_getSvnPath" title="getSvnPath :: Returns the path to the SVN executable"><span class="description">Returns the path to the SVN executable</span><pre>getSvnPath()</pre></a></li>
<li class="method public inherited"><a href="#method_getTaskName" title="getTaskName :: Returns the name of task, used only for log messages"><span class="description">Returns the name of task, used only for log messages</span><pre>getTaskName()</pre></a></li>
<li class="method public inherited"><a href="#method_getTaskType" title="getTaskType :: Returns the name of the task under which it was invoked,
usually the XML tagname"><span class="description">Returns the name of the task under which it was invoked,
usually the XML tagname</span><pre>getTaskType()</pre></a></li>
<li class="method public inherited"><a href="#method_getToDir" title="getToDir :: Returns the path to export/checkout to"><span class="description">Returns the path to export/checkout to</span><pre>getToDir()</pre></a></li>
<li class="method public inherited"><a href="#method_getTrustServerCert" title="getTrustServerCert :: Returns the trust-server-cert switch"><span class="description">Returns the trust-server-cert switch</span><pre>getTrustServerCert()</pre></a></li>
<li class="method public inherited"><a href="#method_getUsername" title="getUsername :: Returns the username"><span class="description">Returns the username</span><pre>getUsername()</pre></a></li>
<li class="method public inherited"><a href="#method_getWorkingCopy" title="getWorkingCopy :: Returns the path to the workingcopy"><span class="description">Returns the path to the workingcopy</span><pre>getWorkingCopy()</pre></a></li>
<li class="method public inherited"><a href="#method_init" title="init :: Initialize Task."><span class="description">Initialize Task.</span><pre>init()</pre></a></li>
<li class="method public inherited"><a href="#method_log" title="log :: Provides a project level log event to the task."><span class="description">Provides a project level log event to the task.</span><pre>log()</pre></a></li>
<li class="method public "><a href="#method_main" title="main :: The main entry point"><span class="description">The main entry point</span><pre>main()</pre></a></li>
<li class="method public inherited"><a href="#method_maybeConfigure" title="maybeConfigure :: Configure this task if it hasn't been done already."><span class="description">Configure this task if it hasn't been done already.</span><pre>maybeConfigure()</pre></a></li>
<li class="method public inherited"><a href="#method_perform" title="perform :: Perfrom this task"><span class="description">Perfrom this task</span><pre>perform()</pre></a></li>
<li class="method public inherited"><a href="#method_setDescription" title="setDescription :: Sets a textual description of the task"><span class="description">Sets a textual description of the task</span><pre>setDescription()</pre></a></li>
<li class="method public inherited"><a href="#method_setForce" title="setForce :: Sets the force switch"><span class="description">Sets the force switch</span><pre>setForce()</pre></a></li>
<li class="method public inherited"><a href="#method_setIgnoreExternals" title="setIgnoreExternals :: Sets the ignore-externals switch"><span class="description">Sets the ignore-externals switch</span><pre>setIgnoreExternals()</pre></a></li>
<li class="method public inherited"><a href="#method_setLocation" title="setLocation :: Sets the location within the buildfile this task occurs."><span class="description">Sets the location within the buildfile this task occurs.</span><pre>setLocation()</pre></a></li>
<li class="method public "><a href="#method_setMessage" title="setMessage :: Sets the commit message"><span class="description">Sets the commit message</span><pre>setMessage()</pre></a></li>
<li class="method public inherited"><a href="#method_setNoCache" title="setNoCache :: Sets the no-auth-cache switch"><span class="description">Sets the no-auth-cache switch</span><pre>setNoCache()</pre></a></li>
<li class="method public inherited"><a href="#method_setOwningTarget" title="setOwningTarget :: Sets the owning target this task belongs to."><span class="description">Sets the owning target this task belongs to.</span><pre>setOwningTarget()</pre></a></li>
<li class="method public inherited"><a href="#method_setPassword" title="setPassword :: Sets the password of the user to export"><span class="description">Sets the password of the user to export</span><pre>setPassword()</pre></a></li>
<li class="method public inherited"><a href="#method_setProject" title="setProject :: References the project to the current component."><span class="description">References the project to the current component.</span><pre>setProject()</pre></a></li>
<li class="method public "><a href="#method_setPropertyName" title="setPropertyName :: Sets the name of the property to use for returned revision"><span class="description">Sets the name of the property to use for returned revision</span><pre>setPropertyName()</pre></a></li>
<li class="method public inherited"><a href="#method_setRecursive" title="setRecursive :: Sets the non-recursive switch"><span class="description">Sets the non-recursive switch</span><pre>setRecursive()</pre></a></li>
<li class="method public inherited"><a href="#method_setRepositoryUrl" title="setRepositoryUrl :: Sets the path/URI to the repository"><span class="description">Sets the path/URI to the repository</span><pre>setRepositoryUrl()</pre></a></li>
<li class="method public inherited"><a href="#method_setRuntimeConfigurableWrapper" title="setRuntimeConfigurableWrapper :: Sets the wrapper object this task should use for runtime
configurable elements."><span class="description">Sets the wrapper object this task should use for runtime
configurable elements.</span><pre>setRuntimeConfigurableWrapper()</pre></a></li>
<li class="method public inherited"><a href="#method_setSvnPath" title="setSvnPath :: Sets the path to the SVN executable"><span class="description">Sets the path to the SVN executable</span><pre>setSvnPath()</pre></a></li>
<li class="method public inherited"><a href="#method_setTaskName" title="setTaskName :: Sets the name of this task for log messages"><span class="description">Sets the name of this task for log messages</span><pre>setTaskName()</pre></a></li>
<li class="method public inherited"><a href="#method_setTaskType" title="setTaskType :: Sets the type of the task."><span class="description">Sets the type of the task.</span><pre>setTaskType()</pre></a></li>
<li class="method public inherited"><a href="#method_setToDir" title="setToDir :: Sets the path to export/checkout to"><span class="description">Sets the path to export/checkout to</span><pre>setToDir()</pre></a></li>
<li class="method public inherited"><a href="#method_setTrustServerCert" title="setTrustServerCert :: Sets the trust-server-cert switch"><span class="description">Sets the trust-server-cert switch</span><pre>setTrustServerCert()</pre></a></li>
<li class="method public inherited"><a href="#method_setUsername" title="setUsername :: Sets the username of the user to export"><span class="description">Sets the username of the user to export</span><pre>setUsername()</pre></a></li>
<li class="method public inherited"><a href="#method_setWorkingCopy" title="setWorkingCopy :: Sets the path to the workingcopy"><span class="description">Sets the path to the workingcopy</span><pre>setWorkingCopy()</pre></a></li>
</ul>
</li>
<li class="nav-header protected">» Protected
<ul>
<li class="method protected inherited"><a href="#method_getRegisterSlot" title="getRegisterSlot :: Returns a name"><span class="description">Returns a name</span><pre>getRegisterSlot()</pre></a></li>
<li class="method protected inherited"><a href="#method_run" title="run :: Executes the constructed VersionControl_SVN instance"><span class="description">Executes the constructed VersionControl_SVN instance</span><pre>run()</pre></a></li>
<li class="method protected inherited"><a href="#method_setup" title="setup :: Creates a VersionControl_SVN class based on $mode"><span class="description">Creates a VersionControl_SVN class based on $mode</span><pre>setup()</pre></a></li>
</ul>
</li>
<li class="nav-header">
<i class="icon-custom icon-property"></i> Properties
<ul></ul>
</li>
<li class="nav-header protected">» Protected
<ul>
<li class="property protected inherited"><a href="#property_description" title="$description :: Description of the task"><span class="description"></span><pre>$description</pre></a></li>
<li class="property protected inherited"><a href="#property_fetchMode" title="$fetchMode :: "><span class="description"></span><pre>$fetchMode</pre></a></li>
<li class="property protected inherited"><a href="#property_location" title="$location :: Stored buildfile location"><span class="description"></span><pre>$location</pre></a></li>
<li class="property protected inherited"><a href="#property_oldVersion" title="$oldVersion :: "><span class="description"></span><pre>$oldVersion</pre></a></li>
<li class="property protected inherited"><a href="#property_project" title="$project :: Holds a reference to the project that a project component
(a task, a target, etc.) belongs to"><span class="description"></span><pre>$project</pre></a></li>
<li class="property protected inherited"><a href="#property_svn" title="$svn :: "><span class="description"></span><pre>$svn</pre></a></li>
<li class="property protected inherited"><a href="#property_target" title="$target :: Owning Target object"><span class="description"></span><pre>$target</pre></a></li>
<li class="property protected inherited"><a href="#property_taskName" title="$taskName :: Taskname for logger"><span class="description"></span><pre>$taskName</pre></a></li>
<li class="property protected inherited"><a href="#property_taskType" title="$taskType :: Internal taskname (req)"><span class="description"></span><pre>$taskType</pre></a></li>
<li class="property protected inherited"><a href="#property_wrapper" title="$wrapper :: Wrapper of the task"><span class="description"></span><pre>$wrapper</pre></a></li>
</ul>
</li>
<li class="nav-header private">» Private
<ul>
<li class="property private "><a href="#property_message" title="$message :: Commit message"><span class="description"></span><pre>$message</pre></a></li>
<li class="property private inherited"><a href="#property_mode" title="$mode :: "><span class="description"></span><pre>$mode</pre></a></li>
<li class="property private "><a href="#property_propertyName" title="$propertyName :: Property name where we store the revision number of the just
commited version."><span class="description"></span><pre>$propertyName</pre></a></li>
<li class="property private inherited"><a href="#property_repositoryUrl" title="$repositoryUrl :: "><span class="description"></span><pre>$repositoryUrl</pre></a></li>
<li class="property private inherited"><a href="#property_svnArgs" title="$svnArgs :: "><span class="description"></span><pre>$svnArgs</pre></a></li>
<li class="property private inherited"><a href="#property_svnPath" title="$svnPath :: "><span class="description"></span><pre>$svnPath</pre></a></li>
<li class="property private inherited"><a href="#property_svnSwitches" title="$svnSwitches :: "><span class="description"></span><pre>$svnSwitches</pre></a></li>
<li class="property private inherited"><a href="#property_toDir" title="$toDir :: "><span class="description"></span><pre>$toDir</pre></a></li>
<li class="property private inherited"><a href="#property_workingCopy" title="$workingCopy :: "><span class="description"></span><pre>$workingCopy</pre></a></li>
</ul>
</li>
</ul>
</div>
<div class="span8">
<a id="\SvnCommitTask"></a><ul class="breadcrumb">
<li>
<a href="../index.html"><i class="icon-custom icon-class"></i></a><span class="divider">\</span>
</li>
<li><a href="../namespaces/global.html">global</a></li>
<li class="active">
<span class="divider">\</span><a href="../classes/SvnCommitTask.html">SvnCommitTask</a>
</li>
</ul>
<div class="element class">
<p class="short_description">Commits changes in a local working copy to the repository</p>
<div class="details">
<div class="long_description"><p>Use <a href="Project#createTask">Project#createTask</a> to register a new Task.</p></div>
<table class="table table-bordered">
<tr>
<th>author</th>
<td><a href="mailto:johanp@aditus.nu">Johan Persson</a></td>
</tr>
<tr>
<th>version</th>
<td>$Id: 6fdb36b57778f5c0cd46110fd36c8c261ced0e86 $</td>
</tr>
<tr>
<th>package</th>
<td><a href="../packages/phing.tasks.ext.svn.html">phing.tasks.ext.svn</a></td>
</tr>
<tr>
<th>since</th>
<td>2.4.0</td>
</tr>
<tr>
<th>copyright</th>
<td>2001,2002 THYRELL. All rights reserved</td>
</tr>
</table>
<h3>
<i class="icon-custom icon-method"></i> Methods</h3>
<a id="method_getDescription"></a><div class="element clickable method public method_getDescription" data-toggle="collapse" data-target=".method_getDescription .collapse">
<h2>Returns the textual description of the task</h2>
<pre>getDescription() : string</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Task::getDescription()</td>
</tr>
<tr>
<th>inherited_from</th>
<td>\SvnBaseTask::getDescription()</td>
</tr>
</table>
<h3>Returns</h3>
<div class="subelement response">
<code>string</code>The text description of the task</div>
</div></div>
</div>
<a id="method_getForce"></a><div class="element clickable method public method_getForce" data-toggle="collapse" data-target=".method_getForce .collapse">
<h2>Returns the force switch</h2>
<pre>getForce() </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::getForce()</td>
</tr></table>
</div></div>
</div>
<a id="method_getIgnoreExternals"></a><div class="element clickable method public method_getIgnoreExternals" data-toggle="collapse" data-target=".method_getIgnoreExternals .collapse">
<h2>Returns the ignore-externals switch</h2>
<pre>getIgnoreExternals() </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::getIgnoreExternals()</td>
</tr></table>
</div></div>
</div>
<a id="method_getLocation"></a><div class="element clickable method public method_getLocation" data-toggle="collapse" data-target=".method_getLocation .collapse">
<h2>Returns the location within the buildfile this task occurs.</h2>
<pre>getLocation() : <a href="../classes/Location.html">\Location</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"><p>Used
by <a href="BuildException">BuildException</a> to give detailed error messages.</p></div>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Task::getLocation()</td>
</tr>
<tr>
<th>inherited_from</th>
<td>\SvnBaseTask::getLocation()</td>
</tr>
</table>
<h3>Returns</h3>
<div class="subelement response">
<code><a href="../classes/Location.html">\Location</a></code>The location object describing the position of this
task within the buildfile.</div>
</div></div>
</div>
<a id="method_getMessage"></a><div class="element clickable method public method_getMessage" data-toggle="collapse" data-target=".method_getMessage .collapse">
<h2>Gets the commit message</h2>
<pre>getMessage() </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><div class="long_description"></div></div></div>
</div>
<a id="method_getNoCache"></a><div class="element clickable method public method_getNoCache" data-toggle="collapse" data-target=".method_getNoCache .collapse">
<h2>Returns the no-auth-cache switch</h2>
<pre>getNoCache() </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::getNoCache()</td>
</tr></table>
</div></div>
</div>
<a id="method_getOwningTarget"></a><div class="element clickable method public method_getOwningTarget" data-toggle="collapse" data-target=".method_getOwningTarget .collapse">
<h2>Returns the owning target of this task.</h2>
<pre>getOwningTarget() : <a href="../classes/Target.html">\Target</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Task::getOwningTarget()</td>
</tr>
<tr>
<th>inherited_from</th>
<td>\SvnBaseTask::getOwningTarget()</td>
</tr>
</table>
<h3>Returns</h3>
<div class="subelement response">
<code><a href="../classes/Target.html">\Target</a></code>The target object that owns this task</div>
</div></div>
</div>
<a id="method_getPassword"></a><div class="element clickable method public method_getPassword" data-toggle="collapse" data-target=".method_getPassword .collapse">
<h2>Returns the password</h2>
<pre>getPassword() </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::getPassword()</td>
</tr></table>
</div></div>
</div>
<a id="method_getProject"></a><div class="element clickable method public method_getProject" data-toggle="collapse" data-target=".method_getProject .collapse">
<h2>Returns a reference to current project</h2>
<pre>getProject() : <a href="../classes/Project.html">\Project</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\ProjectComponent::getProject()</td>
</tr>
<tr>
<th>inherited_from</th>
<td>\Task::getProject()</td>
</tr>
<tr>
<th>inherited_from</th>
<td>\SvnBaseTask::getProject()</td>
</tr>
</table>
<h3>Returns</h3>
<div class="subelement response">
<code><a href="../classes/Project.html">\Project</a></code>Reference to current porject object</div>
</div></div>
</div>
<a id="method_getPropertyName"></a><div class="element clickable method public method_getPropertyName" data-toggle="collapse" data-target=".method_getPropertyName .collapse">
<h2>Returns the name of the property to use for returned revision</h2>
<pre>getPropertyName() </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><div class="long_description"></div></div></div>
</div>
<a id="method_getRecursive"></a><div class="element clickable method public method_getRecursive" data-toggle="collapse" data-target=".method_getRecursive .collapse">
<h2>Returns the non-recursive switch</h2>
<pre>getRecursive() </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::getRecursive()</td>
</tr></table>
</div></div>
</div>
<a id="method_getRepositoryUrl"></a><div class="element clickable method public method_getRepositoryUrl" data-toggle="collapse" data-target=".method_getRepositoryUrl .collapse">
<h2>Returns the path/URI to the repository</h2>
<pre>getRepositoryUrl() </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::getRepositoryUrl()</td>
</tr></table>
</div></div>
</div>
<a id="method_getRuntimeConfigurableWrapper"></a><div class="element clickable method public method_getRuntimeConfigurableWrapper" data-toggle="collapse" data-target=".method_getRuntimeConfigurableWrapper .collapse">
<h2>Returns the wrapper object for runtime configuration</h2>
<pre>getRuntimeConfigurableWrapper() : <a href="../classes/RuntimeConfigurable.html">\RuntimeConfigurable</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Task::getRuntimeConfigurableWrapper()</td>
</tr>
<tr>
<th>inherited_from</th>
<td>\SvnBaseTask::getRuntimeConfigurableWrapper()</td>
</tr>
</table>
<h3>Returns</h3>
<div class="subelement response">
<code><a href="../classes/RuntimeConfigurable.html">\RuntimeConfigurable</a></code>The wrapper object used by this task</div>
</div></div>
</div>
<a id="method_getSvnPath"></a><div class="element clickable method public method_getSvnPath" data-toggle="collapse" data-target=".method_getSvnPath .collapse">
<h2>Returns the path to the SVN executable</h2>
<pre>getSvnPath() </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::getSvnPath()</td>
</tr></table>
</div></div>
</div>
<a id="method_getTaskName"></a><div class="element clickable method public method_getTaskName" data-toggle="collapse" data-target=".method_getTaskName .collapse">
<h2>Returns the name of task, used only for log messages</h2>
<pre>getTaskName() : string</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Task::getTaskName()</td>
</tr>
<tr>
<th>inherited_from</th>
<td>\SvnBaseTask::getTaskName()</td>
</tr>
</table>
<h3>Returns</h3>
<div class="subelement response">
<code>string</code>Name of this task</div>
</div></div>
</div>
<a id="method_getTaskType"></a><div class="element clickable method public method_getTaskType" data-toggle="collapse" data-target=".method_getTaskType .collapse">
<h2>Returns the name of the task under which it was invoked,
usually the XML tagname</h2>
<pre>getTaskType() : string</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Task::getTaskType()</td>
</tr>
<tr>
<th>inherited_from</th>
<td>\SvnBaseTask::getTaskType()</td>
</tr>
</table>
<h3>Returns</h3>
<div class="subelement response">
<code>string</code>The type of this task (XML Tag)</div>
</div></div>
</div>
<a id="method_getToDir"></a><div class="element clickable method public method_getToDir" data-toggle="collapse" data-target=".method_getToDir .collapse">
<h2>Returns the path to export/checkout to</h2>
<pre>getToDir() </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::getToDir()</td>
</tr></table>
</div></div>
</div>
<a id="method_getTrustServerCert"></a><div class="element clickable method public method_getTrustServerCert" data-toggle="collapse" data-target=".method_getTrustServerCert .collapse">
<h2>Returns the trust-server-cert switch</h2>
<pre>getTrustServerCert() </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::getTrustServerCert()</td>
</tr></table>
</div></div>
</div>
<a id="method_getUsername"></a><div class="element clickable method public method_getUsername" data-toggle="collapse" data-target=".method_getUsername .collapse">
<h2>Returns the username</h2>
<pre>getUsername() </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::getUsername()</td>
</tr></table>
</div></div>
</div>
<a id="method_getWorkingCopy"></a><div class="element clickable method public method_getWorkingCopy" data-toggle="collapse" data-target=".method_getWorkingCopy .collapse">
<h2>Returns the path to the workingcopy</h2>
<pre>getWorkingCopy() </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::getWorkingCopy()</td>
</tr></table>
</div></div>
</div>
<a id="method_init"></a><div class="element clickable method public method_init" data-toggle="collapse" data-target=".method_init .collapse">
<h2>Initialize Task.</h2>
<pre>init() </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"><p>This method includes any necessary SVN libraries and triggers
appropriate error if they cannot be found. This is not done in header
because we may want this class to be loaded w/o triggering an error.</p></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::init()</td>
</tr></table>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="../classes/BuildException.html">\BuildException</a></code></th>
<td></td>
</tr></table>
</div></div>
</div>
<a id="method_log"></a><div class="element clickable method public method_log" data-toggle="collapse" data-target=".method_log .collapse">
<h2>Provides a project level log event to the task.</h2>
<pre>log(string $msg, integer $level) </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered">
<tr>
<th>see</th>
<td><a href="">\global\BuildEvent</a></td>
</tr>
<tr>
<th>see</th>
<td><a href="">\global\BuildListener</a></td>
</tr>
<tr>
<th>inherited_from</th>
<td>\Task::log()</td>
</tr>
<tr>
<th>inherited_from</th>
<td>\SvnBaseTask::log()</td>
</tr>
</table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$msg</h4>
<code>string</code><p>The message to log</p></div>
<div class="subelement argument">
<h4>$level</h4>
<code>integer</code><p>The priority of the message</p></div>
</div></div>
</div>
<a id="method_main"></a><div class="element clickable method public method_main" data-toggle="collapse" data-target=".method_main .collapse">
<h2>The main entry point</h2>
<pre>main() </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"><p>This method may be
called more than once, if the task is invoked more than once. For
example, if target1 and target2 both depend on target3, then running
<em>phing target1 target2</em> will run all tasks in target3 twice.</p>
<p>Should throw a BuildException if someting goes wrong with the build</p>
<p>This is abstract here. Must be overloaded by real tasks.</p></div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="../classes/BuildException.html">\BuildException</a></code></th>
<td></td>
</tr></table>
</div></div>
</div>
<a id="method_maybeConfigure"></a><div class="element clickable method public method_maybeConfigure" data-toggle="collapse" data-target=".method_maybeConfigure .collapse">
<h2>Configure this task if it hasn't been done already.</h2>
<pre>maybeConfigure() </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Task::maybeConfigure()</td>
</tr>
<tr>
<th>inherited_from</th>
<td>\SvnBaseTask::maybeConfigure()</td>
</tr>
</table>
</div></div>
</div>
<a id="method_perform"></a><div class="element clickable method public method_perform" data-toggle="collapse" data-target=".method_perform .collapse">
<h2>Perfrom this task</h2>
<pre>perform() </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Task::perform()</td>
</tr>
<tr>
<th>inherited_from</th>
<td>\SvnBaseTask::perform()</td>
</tr>
</table>
</div></div>
</div>
<a id="method_setDescription"></a><div class="element clickable method public method_setDescription" data-toggle="collapse" data-target=".method_setDescription .collapse">
<h2>Sets a textual description of the task</h2>
<pre>setDescription(string $desc) </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Task::setDescription()</td>
</tr>
<tr>
<th>inherited_from</th>
<td>\SvnBaseTask::setDescription()</td>
</tr>
</table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$desc</h4>
<code>string</code><p>The text describing the task</p></div>
</div></div>
</div>
<a id="method_setForce"></a><div class="element clickable method public method_setForce" data-toggle="collapse" data-target=".method_setForce .collapse">
<h2>Sets the force switch</h2>
<pre>setForce($value) </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::setForce()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument"><h4>$value</h4></div>
</div></div>
</div>
<a id="method_setIgnoreExternals"></a><div class="element clickable method public method_setIgnoreExternals" data-toggle="collapse" data-target=".method_setIgnoreExternals .collapse">
<h2>Sets the ignore-externals switch</h2>
<pre>setIgnoreExternals($value) </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::setIgnoreExternals()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument"><h4>$value</h4></div>
</div></div>
</div>
<a id="method_setLocation"></a><div class="element clickable method public method_setLocation" data-toggle="collapse" data-target=".method_setLocation .collapse">
<h2>Sets the location within the buildfile this task occurs.</h2>
<pre>setLocation(\Location $location) </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"><p>Called by
the parser to set location information.</p></div>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Task::setLocation()</td>
</tr>
<tr>
<th>inherited_from</th>
<td>\SvnBaseTask::setLocation()</td>
</tr>
</table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$location</h4>
<code><a href="../classes/Location.html">\Location</a></code><p>The location object describing the position of this task within the buildfile.</p></div>
</div></div>
</div>
<a id="method_setMessage"></a><div class="element clickable method public method_setMessage" data-toggle="collapse" data-target=".method_setMessage .collapse">
<h2>Sets the commit message</h2>
<pre>setMessage($message) </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Parameters</h3>
<div class="subelement argument"><h4>$message</h4></div>
</div></div>
</div>
<a id="method_setNoCache"></a><div class="element clickable method public method_setNoCache" data-toggle="collapse" data-target=".method_setNoCache .collapse">
<h2>Sets the no-auth-cache switch</h2>
<pre>setNoCache($value) </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::setNoCache()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument"><h4>$value</h4></div>
</div></div>
</div>
<a id="method_setOwningTarget"></a><div class="element clickable method public method_setOwningTarget" data-toggle="collapse" data-target=".method_setOwningTarget .collapse">
<h2>Sets the owning target this task belongs to.</h2>
<pre>setOwningTarget(\Target $target) </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Task::setOwningTarget()</td>
</tr>
<tr>
<th>inherited_from</th>
<td>\SvnBaseTask::setOwningTarget()</td>
</tr>
</table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$target</h4>
<code><a href="../classes/Target.html">\Target</a></code><p>Reference to owning target</p></div>
</div></div>
</div>
<a id="method_setPassword"></a><div class="element clickable method public method_setPassword" data-toggle="collapse" data-target=".method_setPassword .collapse">
<h2>Sets the password of the user to export</h2>
<pre>setPassword($value) </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::setPassword()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument"><h4>$value</h4></div>
</div></div>
</div>
<a id="method_setProject"></a><div class="element clickable method public method_setProject" data-toggle="collapse" data-target=".method_setProject .collapse">
<h2>References the project to the current component.</h2>
<pre>setProject(<a href="../classes/Project.html">\Project</a> $project) </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\ProjectComponent::setProject()</td>
</tr>
<tr>
<th>inherited_from</th>
<td>\Task::setProject()</td>
</tr>
<tr>
<th>inherited_from</th>
<td>\SvnBaseTask::setProject()</td>
</tr>
</table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$project</h4>
<code><a href="../classes/Project.html">\Project</a></code><p>The reference to the current project</p></div>
</div></div>
</div>
<a id="method_setPropertyName"></a><div class="element clickable method public method_setPropertyName" data-toggle="collapse" data-target=".method_setPropertyName .collapse">
<h2>Sets the name of the property to use for returned revision</h2>
<pre>setPropertyName($propertyName) </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<h3>Parameters</h3>
<div class="subelement argument"><h4>$propertyName</h4></div>
</div></div>
</div>
<a id="method_setRecursive"></a><div class="element clickable method public method_setRecursive" data-toggle="collapse" data-target=".method_setRecursive .collapse">
<h2>Sets the non-recursive switch</h2>
<pre>setRecursive($value) </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::setRecursive()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument"><h4>$value</h4></div>
</div></div>
</div>
<a id="method_setRepositoryUrl"></a><div class="element clickable method public method_setRepositoryUrl" data-toggle="collapse" data-target=".method_setRepositoryUrl .collapse">
<h2>Sets the path/URI to the repository</h2>
<pre>setRepositoryUrl($repositoryUrl) </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::setRepositoryUrl()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument"><h4>$repositoryUrl</h4></div>
</div></div>
</div>
<a id="method_setRuntimeConfigurableWrapper"></a><div class="element clickable method public method_setRuntimeConfigurableWrapper" data-toggle="collapse" data-target=".method_setRuntimeConfigurableWrapper .collapse">
<h2>Sets the wrapper object this task should use for runtime
configurable elements.</h2>
<pre>setRuntimeConfigurableWrapper(\RuntimeConfigurable $wrapper) </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Task::setRuntimeConfigurableWrapper()</td>
</tr>
<tr>
<th>inherited_from</th>
<td>\SvnBaseTask::setRuntimeConfigurableWrapper()</td>
</tr>
</table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$wrapper</h4>
<code><a href="../classes/RuntimeConfigurable.html">\RuntimeConfigurable</a></code><p>The wrapper object this task should use</p></div>
</div></div>
</div>
<a id="method_setSvnPath"></a><div class="element clickable method public method_setSvnPath" data-toggle="collapse" data-target=".method_setSvnPath .collapse">
<h2>Sets the path to the SVN executable</h2>
<pre>setSvnPath($svnPath) </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::setSvnPath()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument"><h4>$svnPath</h4></div>
</div></div>
</div>
<a id="method_setTaskName"></a><div class="element clickable method public method_setTaskName" data-toggle="collapse" data-target=".method_setTaskName .collapse">
<h2>Sets the name of this task for log messages</h2>
<pre>setTaskName(string $name) : string</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Task::setTaskName()</td>
</tr>
<tr>
<th>inherited_from</th>
<td>\SvnBaseTask::setTaskName()</td>
</tr>
</table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$name</h4>
<code>string</code>
</div>
<h3>Returns</h3>
<div class="subelement response">
<code>string</code>A string representing the name of this task for log</div>
</div></div>
</div>
<a id="method_setTaskType"></a><div class="element clickable method public method_setTaskType" data-toggle="collapse" data-target=".method_setTaskType .collapse">
<h2>Sets the type of the task.</h2>
<pre>setTaskType(string $name) </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"><p>Usually this is the name of the XML tag</p></div>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Task::setTaskType()</td>
</tr>
<tr>
<th>inherited_from</th>
<td>\SvnBaseTask::setTaskType()</td>
</tr>
</table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$name</h4>
<code>string</code><p>The type of this task (XML Tag)</p>
</div>
</div></div>
</div>
<a id="method_setToDir"></a><div class="element clickable method public method_setToDir" data-toggle="collapse" data-target=".method_setToDir .collapse">
<h2>Sets the path to export/checkout to</h2>
<pre>setToDir($toDir) </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::setToDir()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument"><h4>$toDir</h4></div>
</div></div>
</div>
<a id="method_setTrustServerCert"></a><div class="element clickable method public method_setTrustServerCert" data-toggle="collapse" data-target=".method_setTrustServerCert .collapse">
<h2>Sets the trust-server-cert switch</h2>
<pre>setTrustServerCert($value) </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::setTrustServerCert()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument"><h4>$value</h4></div>
</div></div>
</div>
<a id="method_setUsername"></a><div class="element clickable method public method_setUsername" data-toggle="collapse" data-target=".method_setUsername .collapse">
<h2>Sets the username of the user to export</h2>
<pre>setUsername($value) </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::setUsername()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument"><h4>$value</h4></div>
</div></div>
</div>
<a id="method_setWorkingCopy"></a><div class="element clickable method public method_setWorkingCopy" data-toggle="collapse" data-target=".method_setWorkingCopy .collapse">
<h2>Sets the path to the workingcopy</h2>
<pre>setWorkingCopy($workingCopy) </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::setWorkingCopy()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument"><h4>$workingCopy</h4></div>
</div></div>
</div>
<a id="method_getRegisterSlot"></a><div class="element clickable method protected method_getRegisterSlot" data-toggle="collapse" data-target=".method_getRegisterSlot .collapse">
<h2>Returns a name</h2>
<pre>getRegisterSlot(string $slotName) </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Task::getRegisterSlot()</td>
</tr>
<tr>
<th>inherited_from</th>
<td>\SvnBaseTask::getRegisterSlot()</td>
</tr>
</table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$slotName</h4>
<code>string</code>
</div>
</div></div>
</div>
<a id="method_run"></a><div class="element clickable method protected method_run" data-toggle="collapse" data-target=".method_run .collapse">
<h2>Executes the constructed VersionControl_SVN instance</h2>
<pre>run(array $args, array $switches) : string</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::run()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$args</h4>
<code>array</code><p>Additional arguments to pass to SVN.</p></div>
<div class="subelement argument">
<h4>$switches</h4>
<code>array</code><p>Switches to pass to SVN.</p></div>
<h3>Returns</h3>
<div class="subelement response">
<code>string</code>Output generated by SVN.</div>
</div></div>
</div>
<a id="method_setup"></a><div class="element clickable method protected method_setup" data-toggle="collapse" data-target=".method_setup .collapse">
<h2>Creates a VersionControl_SVN class based on $mode</h2>
<pre>setup(string $mode) </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::setup()</td>
</tr></table>
<h3>Parameters</h3>
<div class="subelement argument">
<h4>$mode</h4>
<code>string</code><p>The SVN mode to use (info, export, checkout, ...)</p>
</div>
<h3>Exceptions</h3>
<table class="table table-bordered"><tr>
<th><code><a href="../classes/BuildException.html">\BuildException</a></code></th>
<td></td>
</tr></table>
</div></div>
</div>
<h3>
<i class="icon-custom icon-property"></i> Properties</h3>
<a id="property_description"> </a><div class="element clickable property protected property_description" data-toggle="collapse" data-target=".property_description .collapse">
<h2></h2>
<pre>$description : string</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Task::$$description</td>
</tr>
<tr>
<th>inherited_from</th>
<td>\SvnBaseTask::$$description</td>
</tr>
</table>
</div></div>
</div>
<a id="property_fetchMode"> </a><div class="element clickable property protected property_fetchMode" data-toggle="collapse" data-target=".property_fetchMode .collapse">
<h2></h2>
<pre>$fetchMode </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::$$fetchMode</td>
</tr></table>
</div></div>
</div>
<a id="property_location"> </a><div class="element clickable property protected property_location" data-toggle="collapse" data-target=".property_location .collapse">
<h2></h2>
<pre>$location : <a href="../classes/Location.html">\Location</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Task::$$location</td>
</tr>
<tr>
<th>inherited_from</th>
<td>\SvnBaseTask::$$location</td>
</tr>
</table>
</div></div>
</div>
<a id="property_oldVersion"> </a><div class="element clickable property protected property_oldVersion" data-toggle="collapse" data-target=".property_oldVersion .collapse">
<h2></h2>
<pre>$oldVersion </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::$$oldVersion</td>
</tr></table>
</div></div>
</div>
<a id="property_project"> </a><div class="element clickable property protected property_project" data-toggle="collapse" data-target=".property_project .collapse">
<h2></h2>
<pre>$project : <a href="../classes/Project.html">\Project</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\ProjectComponent::$$project</td>
</tr>
<tr>
<th>inherited_from</th>
<td>\Task::$$project</td>
</tr>
<tr>
<th>inherited_from</th>
<td>\SvnBaseTask::$$project</td>
</tr>
</table>
</div></div>
</div>
<a id="property_svn"> </a><div class="element clickable property protected property_svn" data-toggle="collapse" data-target=".property_svn .collapse">
<h2></h2>
<pre>$svn </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::$$svn</td>
</tr></table>
</div></div>
</div>
<a id="property_target"> </a><div class="element clickable property protected property_target" data-toggle="collapse" data-target=".property_target .collapse">
<h2></h2>
<pre>$target : <a href="../classes/Target.html">\Target</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Task::$$target</td>
</tr>
<tr>
<th>inherited_from</th>
<td>\SvnBaseTask::$$target</td>
</tr>
</table>
</div></div>
</div>
<a id="property_taskName"> </a><div class="element clickable property protected property_taskName" data-toggle="collapse" data-target=".property_taskName .collapse">
<h2></h2>
<pre>$taskName : string</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Task::$$taskName</td>
</tr>
<tr>
<th>inherited_from</th>
<td>\SvnBaseTask::$$taskName</td>
</tr>
</table>
</div></div>
</div>
<a id="property_taskType"> </a><div class="element clickable property protected property_taskType" data-toggle="collapse" data-target=".property_taskType .collapse">
<h2></h2>
<pre>$taskType : string</pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Task::$$taskType</td>
</tr>
<tr>
<th>inherited_from</th>
<td>\SvnBaseTask::$$taskType</td>
</tr>
</table>
</div></div>
</div>
<a id="property_wrapper"> </a><div class="element clickable property protected property_wrapper" data-toggle="collapse" data-target=".property_wrapper .collapse">
<h2></h2>
<pre>$wrapper : <a href="../classes/RuntimeConfigurable.html">\RuntimeConfigurable</a></pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered">
<tr>
<th>inherited_from</th>
<td>\Task::$$wrapper</td>
</tr>
<tr>
<th>inherited_from</th>
<td>\SvnBaseTask::$$wrapper</td>
</tr>
</table>
</div></div>
</div>
<a id="property_message"> </a><div class="element clickable property private property_message" data-toggle="collapse" data-target=".property_message .collapse">
<h2></h2>
<pre>$message </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><div class="long_description"></div></div></div>
</div>
<a id="property_mode"> </a><div class="element clickable property private property_mode" data-toggle="collapse" data-target=".property_mode .collapse">
<h2></h2>
<pre>$mode </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::$$mode</td>
</tr></table>
</div></div>
</div>
<a id="property_propertyName"> </a><div class="element clickable property private property_propertyName" data-toggle="collapse" data-target=".property_propertyName .collapse">
<h2></h2>
<pre>$propertyName </pre>
<div class="labels"></div>
<div class="row collapse"><div class="detail-description"><div class="long_description"></div></div></div>
</div>
<a id="property_repositoryUrl"> </a><div class="element clickable property private property_repositoryUrl" data-toggle="collapse" data-target=".property_repositoryUrl .collapse">
<h2></h2>
<pre>$repositoryUrl </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::$$repositoryUrl</td>
</tr></table>
</div></div>
</div>
<a id="property_svnArgs"> </a><div class="element clickable property private property_svnArgs" data-toggle="collapse" data-target=".property_svnArgs .collapse">
<h2></h2>
<pre>$svnArgs </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::$$svnArgs</td>
</tr></table>
</div></div>
</div>
<a id="property_svnPath"> </a><div class="element clickable property private property_svnPath" data-toggle="collapse" data-target=".property_svnPath .collapse">
<h2></h2>
<pre>$svnPath </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::$$svnPath</td>
</tr></table>
</div></div>
</div>
<a id="property_svnSwitches"> </a><div class="element clickable property private property_svnSwitches" data-toggle="collapse" data-target=".property_svnSwitches .collapse">
<h2></h2>
<pre>$svnSwitches </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::$$svnSwitches</td>
</tr></table>
</div></div>
</div>
<a id="property_toDir"> </a><div class="element clickable property private property_toDir" data-toggle="collapse" data-target=".property_toDir .collapse">
<h2></h2>
<pre>$toDir </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::$$toDir</td>
</tr></table>
</div></div>
</div>
<a id="property_workingCopy"> </a><div class="element clickable property private property_workingCopy" data-toggle="collapse" data-target=".property_workingCopy .collapse">
<h2></h2>
<pre>$workingCopy </pre>
<div class="labels"><span class="label">Inherited</span></div>
<div class="row collapse"><div class="detail-description">
<div class="long_description"></div>
<table class="table table-bordered"><tr>
<th>inherited_from</th>
<td>\SvnBaseTask::$$workingCopy</td>
</tr></table>
</div></div>
</div>
</div>
</div>
</div>
</div>
<div class="row"><footer class="span12">
Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by <a href="http://glyphicons.com/">Glyphicons</a>.<br>
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor 2.0.0a11</a> and<br>
generated on 2012-11-20T07:50:34+01:00.<br></footer></div>
</div>
</body>
</html>
| {
"content_hash": "e871e192f1b811b23996484c96869b3b",
"timestamp": "",
"source": "github",
"line_count": 1287,
"max_line_length": 489,
"avg_line_length": 49.28360528360528,
"alnum_prop": 0.7120829917386643,
"repo_name": "theghostbel/pimcore",
"id": "04fda9e6f3378cb3a9e9974cf3a6346c14102420",
"size": "63567",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "pimcore/lib/Deployment/Phing/docs/api/docs/classes/SvnCommitTask.html",
"mode": "33188",
"license": "bsd-3-clause",
"language": [],
"symlink_target": ""
} |
<?php
$tempUsername=$_POST['form-username'];
$tempPassword=$_POST['form-password'];
$exists=checkUser($tempUsername);
if (!$exists) {
if ($_POST['form-password']==$_POST['form-password1']&&
$_POST['form-password']!="") {
//successfull input
$conn=connection();
$inputSql="INSERT INTO users (`username`,`password`)
VALUES ('$tempUsername','$tempPassword')";
$conn->exec($inputSql);
header("Location: index.php");
}else{
$_SESSION['errMessage'] = "Enter the same password twice.";
}
}else{
$_SESSION['errMessage'] = "Username already taken! Enter diferent username.";
}
?> | {
"content_hash": "cb06c9e1124474bd5d82d4e7813800f2",
"timestamp": "",
"source": "github",
"line_count": 24,
"max_line_length": 78,
"avg_line_length": 24.75,
"alnum_prop": 0.6565656565656566,
"repo_name": "aleksandarmileski/schedule",
"id": "6479397145dde688e620d8e1bc18019a6b6052ea",
"size": "594",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "formSignup.php",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "2501"
},
{
"name": "JavaScript",
"bytes": "107"
},
{
"name": "PHP",
"bytes": "18859"
}
],
"symlink_target": ""
} |
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
DOCUMENTATION = r'''
---
module: win_toast
version_added: "2.4"
short_description: Sends Toast windows notification to logged in users on Windows 10 or later hosts
description:
- Sends alerts which appear in the Action Center area of the windows desktop.
options:
expire:
description:
- How long in seconds before the notification expires.
default: 45
group:
description:
- Which notification group to add the notification to.
default: Powershell
msg:
description:
- The message to appear inside the notification. May include \n to format the message to appear within the Action Center.
default: 'Hello, World!'
popup:
description:
- If false, the notification will not pop up and will only appear in the Action Center.
type: bool
default: yes
tag:
description:
- The tag to add to the notification.
default: Ansible
title:
description:
- The notification title, which appears in the pop up..
default: Notification HH:mm
author:
- Jon Hawkesworth (@jhawkesworth)
notes:
- This module must run on a windows 10 or Server 2016 host, so ensure your play targets windows hosts, or delegates to a windows host.
- The module does not fail if there are no logged in users to notify.
- Messages are only sent to the local host where the module is run.
- You must run this module with async, otherwise it will hang until the expire period has passed.
'''
EXAMPLES = r'''
- name: Warn logged in users of impending upgrade (note use of async to stop the module from waiting until notification expires).
win_toast:
expire: 60
title: System Upgrade Notification
msg: Automated upgrade about to start. Please save your work and log off before {{ deployment_start_time }}
async: 60
poll: 0
'''
RETURN = r'''
expire_at_utc:
description: Calculated utc date time when the notification expires.
returned: allways
type: string
sample: 07 July 2017 04:50:54
no_toast_sent_reason:
description: Text containing the reason why a notification was not sent.
returned: when no logged in users are detected
type: string
sample: No logged in users to notify
sent_localtime:
description: local date time when the notification was sent.
returned: allways
type: string
sample: 07 July 2017 05:45:54
time_taken:
description: How long the module took to run on the remote windows host in seconds.
returned: allways
type: float
sample: 0.3706631999999997
toast_sent:
description: Whether the module was able to send a toast notification or not.
returned: allways
type: boolean
sample: false
'''
| {
"content_hash": "afe5b92546e3705bcc025e6b8c5bc9da",
"timestamp": "",
"source": "github",
"line_count": 83,
"max_line_length": 137,
"avg_line_length": 33.95180722891566,
"alnum_prop": 0.7026259758694109,
"repo_name": "e-gob/plataforma-kioscos-autoatencion",
"id": "c56c32f0a15268765991189d8272b711f1d0dd94",
"size": "3157",
"binary": false,
"copies": "42",
"ref": "refs/heads/master",
"path": "scripts/ansible-play/.venv/lib/python2.7/site-packages/ansible/modules/windows/win_toast.py",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "C",
"bytes": "41110"
},
{
"name": "C++",
"bytes": "3804"
},
{
"name": "CSS",
"bytes": "34823"
},
{
"name": "CoffeeScript",
"bytes": "8521"
},
{
"name": "HTML",
"bytes": "61168"
},
{
"name": "JavaScript",
"bytes": "7206"
},
{
"name": "Makefile",
"bytes": "1347"
},
{
"name": "PowerShell",
"bytes": "584344"
},
{
"name": "Python",
"bytes": "25506593"
},
{
"name": "Ruby",
"bytes": "245726"
},
{
"name": "Shell",
"bytes": "5075"
}
],
"symlink_target": ""
} |
cask 'sidneys-pb' do
version '7.0.0'
sha256 '35ea8c3f03ddea43999dc68a6a3fb026d43037f9c4aa534fd8db4fd6a9e68416'
url "https://github.com/sidneys/pb-for-desktop/releases/download/v#{version}/pb-for-desktop-#{version}.dmg"
appcast 'https://github.com/sidneys/pb-for-desktop/releases.atom',
checkpoint: '4b13f31e8f2a0ccdd540fe6ba17b95b14b58d1b840ffdbe4e608166ee0a1ea36'
name 'PB for Desktop'
homepage 'https://github.com/sidneys/pb-for-desktop'
app 'PB for Desktop.app'
zap trash: [
'~/Library/Application Support/PB for Desktop',
'~/Library/Caches/de.sidneys.pb-for-desktop',
'~/Library/Logs/pb-for-desktop',
'~/Library/Preferences/de.sidneys.pb-for-desktop.plist',
'~/Library/Preferences/de.sidneys.pb-for-desktop.helper.plist',
'~/Library/Saved Application State/de.sidneys.pb-for-desktop.savedState',
]
end
| {
"content_hash": "a9e36b3fae83baef49a44b0d39d8e2aa",
"timestamp": "",
"source": "github",
"line_count": 21,
"max_line_length": 109,
"avg_line_length": 44.666666666666664,
"alnum_prop": 0.6780383795309168,
"repo_name": "Ngrd/homebrew-cask",
"id": "cba4b06480100f74f66539b600cc6587ba4fe900",
"size": "938",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "Casks/sidneys-pb.rb",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "Ruby",
"bytes": "1934903"
},
{
"name": "Shell",
"bytes": "71564"
}
],
"symlink_target": ""
} |
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="../dist/sibgif.min.js"></script>
<script type="text/javascript" src="./js/async.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<title>
Example gif
</title>
</head>
<body>
<center>
<h1>Gifs will play when all images are loaded.</h1>
<img id="example2" data-animated-src="./example_gifs/deal_with_it.gif" data-autoplay="0" />
<img id="example1" data-animated-src="./example_gifs/inner_machinations_of_my_mind.gif" data-autoplay="0" />
<img id="example3" data-animated-src="./example_gifs/dat_boi.gif" data-autoplay="0" />
<br>
<script type="text/javascript">
var sup1 = new SuperGif({ gif: document.getElementById('example1'), includeDataURL: true } );
var sup2 = new SuperGif({ gif: document.getElementById('example2'), includeDataURL: true } );
var sup3 = new SuperGif({ gif: document.getElementById('example3'), includeDataURL: true } );
var supergifs = [sup1, sup2, sup3];
async.each(supergifs, function (sup, cb) {
sup.load(cb);
}, function (err) {
if (err) {
console.log(err);
} else {
supergifs.forEach(function (sup) {
sup.play();
});
}
});
</script>
</center>
</body>
</html>
| {
"content_hash": "2fef3a751ed335bdfee41f73254eab1c",
"timestamp": "",
"source": "github",
"line_count": 43,
"max_line_length": 122,
"avg_line_length": 34.83720930232558,
"alnum_prop": 0.609479305740988,
"repo_name": "sibnerian/sibgif",
"id": "dc4e3d951f963c7a7fed7da5630e0783795ea1c8",
"size": "1498",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "examples/async_example.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "38562"
}
],
"symlink_target": ""
} |
import dateparser
import re
import os
import sys
import requests
from pyquery import PyQuery as pq
sys.path.insert(1, os.path.join(sys.path[0], '..'))
from models import trackingStatus, trackingEvent
NAME = "UPS"
ID = __name__[10:]
POPULARITY = 4
def guess(number):
return number.startswith('1Z')
def track(number):
"""Request tracking company about package status.
:param number: package number in tracking company
:return: Package status
"""
r = requests.post("https://wwwapps.ups.com/WebTracking/track",
data={'trackNums': number,
'loc': 'pl_PL',
'track.x': 'Monitoruj'
}
)
d = pq(r.text)
table = d('table.dataTable')
status = 'TRANSIT'
events = []
for x, row in enumerate(table('tr').items()):
if x > 0:
stage = []
for t in row('td').items():
td = t.text()
td = td.translate({ord(c): None for c in '\n\t\r'})
td = re.sub(r'\s+', ' ', td)
stage.append(td)
stage_date = dateparser.parse("{} {}".format(stage[1], stage[2]), settings={'DATE_ORDER': 'YMD'})
events.append(trackingEvent(time=stage_date, place=stage[0], status=stage[3]))
if re.search("Doręczono", stage[3]):
status = "DELIVERED"
if len(events) > 0:
return trackingStatus(number, ID, status, events)
else:
return trackingStatus(number, ID, 'NOTFOUND', [])
| {
"content_hash": "3d077f639b94854f280e57ab0a97cbf6",
"timestamp": "",
"source": "github",
"line_count": 55,
"max_line_length": 109,
"avg_line_length": 28.70909090909091,
"alnum_prop": 0.5332488917036099,
"repo_name": "krzynio/pl-packagetrack",
"id": "dea39c2e7d745f7bb008656e08ab19dc1ae946c1",
"size": "1602",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "providers/ups.py",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "Python",
"bytes": "17778"
}
],
"symlink_target": ""
} |
class AudioContext {
public:
AudioContext();
~AudioContext() {} /// need to finish
GainNode* createGain();
OscillatorNode* createOscillator();
AudioDestinationNode* destination();
int sample_rate();
private:
AudioDestinationNode* destination_ptr;
std::vector<AudioNode*> _nodes;
}; | {
"content_hash": "9ce332739174611695ff93fc36f836dc",
"timestamp": "",
"source": "github",
"line_count": 19,
"max_line_length": 39,
"avg_line_length": 15.578947368421053,
"alnum_prop": 0.7263513513513513,
"repo_name": "VSIONHAIRIES/CFOO",
"id": "46681191d4cffb8944ce79713aa7a8206c26176e",
"size": "556",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "AudioContext.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C++",
"bytes": "35978"
}
],
"symlink_target": ""
} |
require_relative '../../spec_helper'
require_relative 'shared/equal'
describe "Float#==" do
it_behaves_like :float_equal, :==
end
| {
"content_hash": "306df6a39b498036fae79e07e8d7875d",
"timestamp": "",
"source": "github",
"line_count": 6,
"max_line_length": 36,
"avg_line_length": 22.166666666666668,
"alnum_prop": 0.6917293233082706,
"repo_name": "nobu/rubyspec",
"id": "03eea5108e450ab6d0ba4294048a864ea601646a",
"size": "133",
"binary": false,
"copies": "6",
"ref": "refs/heads/master",
"path": "core/float/equal_value_spec.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "145966"
},
{
"name": "Ruby",
"bytes": "6187303"
},
{
"name": "Shell",
"bytes": "65"
}
],
"symlink_target": ""
} |
module Mutest
# Zombifier namespace
class Zombifier
include Anima.new(
:includes,
:load_path,
:kernel,
:namespace,
:pathname,
:require_highjack,
:root_require
)
private(*anima.attribute_names)
include AST::Sexp
LoadError = Class.new(::LoadError)
# Initialize object
#
# @param [Symbol] namespace
#
# @return [undefined]
def initialize(*)
super
@includes = %r{\A#{Regexp.union(includes)}(?:/.*)?\z}
@zombified = Set.new
end
# Call zombifier
#
# @return [self]
def self.call(*args)
new(*args).__send__(:call)
self
end
private
# Original require method
#
# @return [Method]
attr_reader :original
# Run zombifier
#
# @return [undefined]
def call
@original = require_highjack.call(method(:require))
require(root_require)
end
# Test if logical name is subjected to zombification
#
# @param [String]
def include?(logical_name)
!@zombified.include?(logical_name) && includes =~ logical_name
end
# Require file in zombie namespace
#
# @param [#to_s] logical_name
#
# @return [Bool]
# true if successful and false if feature already loaded
def require(logical_name)
logical_name = logical_name.to_s
loaded = original.call(logical_name)
return loaded unless include?(logical_name)
@zombified << logical_name
zombify(find(logical_name))
true
end
# Find file by logical path
#
# @param [String] logical_name
#
# @return [File]
#
# @raise [LoadError]
# otherwise
def find(logical_name)
file_name = "#{logical_name}.rb"
load_path.each do |path|
path = pathname.new(path).join(file_name)
return path if path.file?
end
raise LoadError, "Cannot find file #{file_name.inspect} in load path"
end
# Zombify contents of file
#
# Probably the 2nd valid use of eval ever. (First one is inserting mutests!).
#
# @param [Pathname] source_path
#
# @return [undefined]
def zombify(source_path)
kernel.eval(
Unparser.unparse(namespaced_node(source_path)),
TOPLEVEL_BINDING,
source_path.to_s
)
end
# Namespaced root node
#
# @param [Pathname] source_path
#
# @return [Parser::AST::Node]
def namespaced_node(source_path)
s(:module, s(:const, nil, namespace), Unparser.parse(source_path.read))
end
end
end
| {
"content_hash": "ff53b03bcfe18c43d4f3010a5d348b9e",
"timestamp": "",
"source": "github",
"line_count": 120,
"max_line_length": 81,
"avg_line_length": 21.433333333333334,
"alnum_prop": 0.5890357698289269,
"repo_name": "backus/mutest",
"id": "aa0bf8362f4e09fa42637ca3046b4c084b8f4f94",
"size": "2572",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "lib/mutest/zombifier.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Roff",
"bytes": "932"
},
{
"name": "Ruby",
"bytes": "508062"
},
{
"name": "Shell",
"bytes": "44"
}
],
"symlink_target": ""
} |
namespace tadpole {
void register_builtins(VM& vm) {
// fn help() -> nil
vm.define_native("help", [](sz_t, Value*) -> Value {
std::cout
<< colorful::fg::green << "Welcome to Tadpole! This is the help utility."
<< colorful::reset << std::endl << std::endl;
std::cout << "print(...) Prints the values to stdout stream" << std::endl;
std::cout << "exit() Exit the Tadpole terminal" << std::endl;
std::cout << "time() Returns the current time in seconds since the Epoch" << std::endl;
std::cout << "clock() Returns the CPU time since the start of the process" << std::endl;
std::cout << "gc_count() Returns number of objects tracked by GC" << std::endl;
std::cout << "gc_threshold() Returns the current collection thresholds" << std::endl;
std::cout << "gc_threshold(n) Sets the collection thresholds" << std::endl;
std::cout << "gc_collect() Run a full collection" << std::endl;
return nullptr;
});
// fn print(arg1: Value, arg2: Value, ...) -> nil
vm.define_native("print", [](sz_t nargs, Value* args) -> Value {
for (sz_t i = 0; i < nargs; ++i)
std::cout << args[i] << " ";
std::cout << std::endl;
return nullptr;
});
// fn exit() -> nil
vm.define_native("exit", [&vm](sz_t, Value*) -> Value {
vm.terminate();
return nullptr;
});
// fn time() -> numeric
//
// @returns
// timestamp: numerics -> unit is seconds
vm.define_native("time", [](sz_t, Value*) -> Value {
return std::chrono::duration_cast<std::chrono::milliseconds>(
std::chrono::system_clock::now().time_since_epoch()).count() / 1000.0;
});
// fn clock() -> numeric
//
// @returns
// clock: numeric -> unit is us
vm.define_native("clock", [](sz_t, Value*) -> Value {
return std::chrono::duration_cast<std::chrono::microseconds>(
std::chrono::steady_clock::now().time_since_epoch()).count();
});
// fn gc_count() -> numeric
//
// @returns
// gc_count: numeric -> number of current objects
vm.define_native("gc_count", [](sz_t, Value*) -> Value {
return GC::get_instance().get_count();
});
// fn gc_threshold() -> numeric
//
// @returns
// threshold: numeric -> current number of gc threshold
//
//
// fn gc_threshold(threshold: numeric) -> numeric
//
// @args
// threshold: numeric -> number of gc threshold
//
// @returns
// gc_threshold: numeric -> current numeric of gc threshold
vm.define_native("gc_threshold", [](sz_t nargs, Value* args) -> Value {
if (nargs == 1 && args != nullptr && args[0].as_numeric())
GC::get_instance().set_threshold(args[0].as_integer<sz_t>());
return GC::get_instance().get_threshold();
});
// fn gc_collect() -> nil
vm.define_native("gc_collect", [](sz_t, Value*) -> Value {
GC::get_instance().collect();
return nullptr;
});
}
}
| {
"content_hash": "637276a997f42bd47e8f14986bdce5a9",
"timestamp": "",
"source": "github",
"line_count": 89,
"max_line_length": 104,
"avg_line_length": 34.157303370786515,
"alnum_prop": 0.5519736842105263,
"repo_name": "ASMlover/study",
"id": "5ac086bea2bc8b6b70ce99b0800301a62192151d",
"size": "4773",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "cplusplus/Tadpole5/tadpole/builtin/builtins.cc",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "Assembly",
"bytes": "3055440"
},
{
"name": "Batchfile",
"bytes": "4662"
},
{
"name": "Brainfuck",
"bytes": "571"
},
{
"name": "C",
"bytes": "13569580"
},
{
"name": "C#",
"bytes": "3959"
},
{
"name": "C++",
"bytes": "14741264"
},
{
"name": "CMake",
"bytes": "543917"
},
{
"name": "CSS",
"bytes": "11505"
},
{
"name": "Common Lisp",
"bytes": "114"
},
{
"name": "Emacs Lisp",
"bytes": "6042"
},
{
"name": "Go",
"bytes": "105203"
},
{
"name": "Groovy",
"bytes": "2907"
},
{
"name": "HTML",
"bytes": "911945"
},
{
"name": "Lex",
"bytes": "9370"
},
{
"name": "Lua",
"bytes": "32829"
},
{
"name": "Makefile",
"bytes": "1000611"
},
{
"name": "NASL",
"bytes": "3609"
},
{
"name": "NewLisp",
"bytes": "5805"
},
{
"name": "Perl",
"bytes": "594"
},
{
"name": "Python",
"bytes": "2752752"
},
{
"name": "SWIG",
"bytes": "91"
},
{
"name": "Shell",
"bytes": "9993"
},
{
"name": "Vim script",
"bytes": "92204"
},
{
"name": "Yacc",
"bytes": "6278"
}
],
"symlink_target": ""
} |
package org.apereo.cas.configuration.model.support.pac4j;
/**
* This is {@link Pac4jProperties}.
*
* @author Misagh Moayyed
* @since 5.0.0
*/
public class Pac4jProperties {
private boolean typedIdUsed;
private Facebook facebook = new Facebook();
private Twitter twitter = new Twitter();
private Saml saml = new Saml();
private Oidc oidc = new Oidc();
private Cas cas = new Cas();
private Dropbox dropbox = new Dropbox();
private Github github = new Github();
private Google google = new Google();
private Yahoo yahoo = new Yahoo();
private Foursquare foursquare = new Foursquare();
private WindowsLive windowsLive = new WindowsLive();
public WindowsLive getWindowsLive() {
return windowsLive;
}
public void setWindowsLive(final WindowsLive windowsLive) {
this.windowsLive = windowsLive;
}
public Dropbox getDropbox() {
return dropbox;
}
public void setDropbox(final Dropbox dropbox) {
this.dropbox = dropbox;
}
public Github getGithub() {
return github;
}
public void setGithub(final Github github) {
this.github = github;
}
public Google getGoogle() {
return google;
}
public void setGoogle(final Google google) {
this.google = google;
}
public Yahoo getYahoo() {
return yahoo;
}
public void setYahoo(final Yahoo yahoo) {
this.yahoo = yahoo;
}
public Foursquare getFoursquare() {
return foursquare;
}
public void setFoursquare(final Foursquare foursquare) {
this.foursquare = foursquare;
}
public boolean isTypedIdUsed() {
return typedIdUsed;
}
public void setTypedIdUsed(final boolean typedIdUsed) {
this.typedIdUsed = typedIdUsed;
}
public void setFacebook(final Facebook facebook) {
this.facebook = facebook;
}
public void setTwitter(final Twitter twitter) {
this.twitter = twitter;
}
public void setSaml(final Saml saml) {
this.saml = saml;
}
public void setOidc(final Oidc oidc) {
this.oidc = oidc;
}
public void setCas(final Cas cas) {
this.cas = cas;
}
public Cas getCas() {
return this.cas;
}
public Saml getSaml() {
return this.saml;
}
public Oidc getOidc() {
return this.oidc;
}
public Facebook getFacebook() {
return this.facebook;
}
public Twitter getTwitter() {
return this.twitter;
}
public static class Facebook {
private String id;
private String secret;
private String scope;
private String fields;
public String getId() {
return this.id;
}
public void setId(final String id) {
this.id = id;
}
public String getSecret() {
return this.secret;
}
public void setSecret(final String secret) {
this.secret = secret;
}
public String getScope() {
return this.scope;
}
public void setScope(final String scope) {
this.scope = scope;
}
public String getFields() {
return this.fields;
}
public void setFields(final String fields) {
this.fields = fields;
}
}
public static class Twitter {
private String id;
private String secret;
public String getId() {
return this.id;
}
public void setId(final String id) {
this.id = id;
}
public String getSecret() {
return this.secret;
}
public void setSecret(final String secret) {
this.secret = secret;
}
}
public static class Saml {
private String keystorePassword;
private String privateKeyPassword;
private String keystorePath;
private String identityProviderMetadataPath;
private String maximumAuthenticationLifetime;
private String serviceProviderEntityId;
public String getKeystorePassword() {
return this.keystorePassword;
}
public void setKeystorePassword(final String keystorePassword) {
this.keystorePassword = keystorePassword;
}
public String getPrivateKeyPassword() {
return this.privateKeyPassword;
}
public void setPrivateKeyPassword(final String privateKeyPassword) {
this.privateKeyPassword = privateKeyPassword;
}
public String getKeystorePath() {
return this.keystorePath;
}
public void setKeystorePath(final String keystorePath) {
this.keystorePath = keystorePath;
}
public String getIdentityProviderMetadataPath() {
return this.identityProviderMetadataPath;
}
public void setIdentityProviderMetadataPath(final String identityProviderMetadataPath) {
this.identityProviderMetadataPath = identityProviderMetadataPath;
}
public String getMaximumAuthenticationLifetime() {
return this.maximumAuthenticationLifetime;
}
public void setMaximumAuthenticationLifetime(final String maximumAuthenticationLifetime) {
this.maximumAuthenticationLifetime = maximumAuthenticationLifetime;
}
public String getServiceProviderEntityId() {
return this.serviceProviderEntityId;
}
public void setServiceProviderEntityId(final String serviceProviderEntityId) {
this.serviceProviderEntityId = serviceProviderEntityId;
}
}
public static class Cas {
private String loginUrl;
private String protocol;
public String getLoginUrl() {
return this.loginUrl;
}
public void setLoginUrl(final String loginUrl) {
this.loginUrl = loginUrl;
}
public String getProtocol() {
return this.protocol;
}
public void setProtocol(final String protocol) {
this.protocol = protocol;
}
}
public static class Oidc {
private String id;
private String secret;
private String discoveryUri;
private String useNonce;
private String preferredJwsAlgorithm;
private String maxClockSkew;
private String customParamKey1;
private String customParamValue1;
private String customParamKey2;
private String customParamValue2;
public String getId() {
return this.id;
}
public void setId(final String id) {
this.id = id;
}
public String getSecret() {
return this.secret;
}
public void setSecret(final String secret) {
this.secret = secret;
}
public String getDiscoveryUri() {
return this.discoveryUri;
}
public void setDiscoveryUri(final String discoveryUri) {
this.discoveryUri = discoveryUri;
}
public String getUseNonce() {
return this.useNonce;
}
public void setUseNonce(final String useNonce) {
this.useNonce = useNonce;
}
public String getPreferredJwsAlgorithm() {
return this.preferredJwsAlgorithm;
}
public void setPreferredJwsAlgorithm(final String preferredJwsAlgorithm) {
this.preferredJwsAlgorithm = preferredJwsAlgorithm;
}
public String getMaxClockSkew() {
return this.maxClockSkew;
}
public void setMaxClockSkew(final String maxClockSkew) {
this.maxClockSkew = maxClockSkew;
}
public String getCustomParamKey1() {
return this.customParamKey1;
}
public void setCustomParamKey1(final String customParamKey1) {
this.customParamKey1 = customParamKey1;
}
public String getCustomParamValue1() {
return this.customParamValue1;
}
public void setCustomParamValue1(final String customParamValue1) {
this.customParamValue1 = customParamValue1;
}
public String getCustomParamKey2() {
return this.customParamKey2;
}
public void setCustomParamKey2(final String customParamKey2) {
this.customParamKey2 = customParamKey2;
}
public String getCustomParamValue2() {
return this.customParamValue2;
}
public void setCustomParamValue2(final String customParamValue2) {
this.customParamValue2 = customParamValue2;
}
}
public static class Github {
private String id;
private String secret;
public String getId() {
return this.id;
}
public void setId(final String id) {
this.id = id;
}
public String getSecret() {
return this.secret;
}
public void setSecret(final String secret) {
this.secret = secret;
}
}
public static class Yahoo {
private String id;
private String secret;
public String getId() {
return this.id;
}
public void setId(final String id) {
this.id = id;
}
public String getSecret() {
return this.secret;
}
public void setSecret(final String secret) {
this.secret = secret;
}
}
public static class Foursquare {
private String id;
private String secret;
public String getId() {
return this.id;
}
public void setId(final String id) {
this.id = id;
}
public String getSecret() {
return this.secret;
}
public void setSecret(final String secret) {
this.secret = secret;
}
}
public static class Dropbox {
private String id;
private String secret;
public String getId() {
return this.id;
}
public void setId(final String id) {
this.id = id;
}
public String getSecret() {
return this.secret;
}
public void setSecret(final String secret) {
this.secret = secret;
}
}
public static class WindowsLive {
private String id;
private String secret;
public String getId() {
return this.id;
}
public void setId(final String id) {
this.id = id;
}
public String getSecret() {
return this.secret;
}
public void setSecret(final String secret) {
this.secret = secret;
}
}
public static class Google {
private String id;
private String secret;
private String scope;
public String getScope() {
return scope;
}
public void setScope(final String scope) {
this.scope = scope;
}
public String getId() {
return this.id;
}
public void setId(final String id) {
this.id = id;
}
public String getSecret() {
return this.secret;
}
public void setSecret(final String secret) {
this.secret = secret;
}
}
}
| {
"content_hash": "b80fc280c52e459c3012f848a07e5a48",
"timestamp": "",
"source": "github",
"line_count": 488,
"max_line_length": 98,
"avg_line_length": 23.725409836065573,
"alnum_prop": 0.5796337882190361,
"repo_name": "zhoffice/cas",
"id": "e7b8c405c85c40ccada6bd8e24b2b1497b407dba",
"size": "11578",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "cas-server-core-configuration/src/main/java/org/apereo/cas/configuration/model/support/pac4j/Pac4jProperties.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "25564"
},
{
"name": "HTML",
"bytes": "31521"
},
{
"name": "Java",
"bytes": "2867743"
},
{
"name": "JavaScript",
"bytes": "1150653"
},
{
"name": "Shell",
"bytes": "8412"
}
],
"symlink_target": ""
} |
require 'spec_helper'
describe Huia::Core::String do
subject { described_class.huia_send('createFromValue:', "hello world") }
it_behaves_like :huia_literal
it { should respond_to :to_str }
it { should respond_to :to_s }
its(:value) { should eq "hello world" }
describe 'Huia methods' do
describe 'concat:' do
context "When the argument is a string" do
it 'returns a new, concatenated string' do
result = subject.huia_send('concat:', Huia::Core.string(' of warcraft'))
expect(result.to_s).to eq("hello world of warcraft")
expect(result).not_to equal(subject)
end
end
context "When the argument is not a string" do
it 'raises an exception' do
expect { subject.huia_send('concat:', :foo) }.to raise_error
end
end
end
describe '#toString' do
it 'returns self' do
expect(subject.huia_send('toString')).to equal(subject)
end
end
describe '#push:' do
it 'appends other to self' do
result = subject.huia_send('push:', Huia::Core.string(' of warcraft'))
expect(result.to_s).to eq("hello world of warcraft")
expect(result).to equal(subject)
end
end
describe '#inspect' do
it 'escapes the string for great justice' do
expect(subject.huia_send('inspect').to_s).to eq('"hello world"')
end
end
end
end
| {
"content_hash": "52c929bf88eba14e28d164d98fa9ea02",
"timestamp": "",
"source": "github",
"line_count": 50,
"max_line_length": 82,
"avg_line_length": 28.3,
"alnum_prop": 0.6148409893992933,
"repo_name": "jamesotron/Huia",
"id": "6460a3accec3b88bbf3ab71f5ec4b2684ae2d9fa",
"size": "1415",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "spec/lib/huia/core/string_spec.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Ruby",
"bytes": "171450"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="UTF-8"?>
<!--
*** GENERATED FROM project.xml - DO NOT EDIT ***
*** EDIT ../build.xml INSTEAD ***
For the purpose of easier reading the script
is divided into following sections:
- initialization
- compilation
- jar
- execution
- debugging
- javadoc
- test compilation
- test execution
- test debugging
- applet
- cleanup
-->
<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="GP_project-impl">
<fail message="Please build using Ant 1.8.0 or higher.">
<condition>
<not>
<antversion atleast="1.8.0"/>
</not>
</condition>
</fail>
<target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
<!--
======================
INITIALIZATION SECTION
======================
-->
<target name="-pre-init">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target depends="-pre-init" name="-init-private">
<property file="nbproject/private/config.properties"/>
<property file="nbproject/private/configs/${config}.properties"/>
<property file="nbproject/private/private.properties"/>
</target>
<target depends="-pre-init,-init-private" name="-init-user">
<property file="${user.properties.file}"/>
<!-- The two properties below are usually overridden -->
<!-- by the active platform. Just a fallback. -->
<property name="default.javac.source" value="1.4"/>
<property name="default.javac.target" value="1.4"/>
</target>
<target depends="-pre-init,-init-private,-init-user" name="-init-project">
<property file="nbproject/configs/${config}.properties"/>
<property file="nbproject/project.properties"/>
</target>
<target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
<available file="${manifest.file}" property="manifest.available"/>
<condition property="splashscreen.available">
<and>
<not>
<equals arg1="${application.splash}" arg2="" trim="true"/>
</not>
<available file="${application.splash}"/>
</and>
</condition>
<condition property="main.class.available">
<and>
<isset property="main.class"/>
<not>
<equals arg1="${main.class}" arg2="" trim="true"/>
</not>
</and>
</condition>
<condition property="manifest.available+main.class">
<and>
<isset property="manifest.available"/>
<isset property="main.class.available"/>
</and>
</condition>
<condition property="do.archive">
<not>
<istrue value="${jar.archive.disabled}"/>
</not>
</condition>
<condition property="do.mkdist">
<and>
<isset property="do.archive"/>
<isset property="libs.CopyLibs.classpath"/>
<not>
<istrue value="${mkdist.disabled}"/>
</not>
</and>
</condition>
<condition property="manifest.available+main.class+mkdist.available">
<and>
<istrue value="${manifest.available+main.class}"/>
<isset property="do.mkdist"/>
</and>
</condition>
<condition property="do.archive+manifest.available">
<and>
<isset property="manifest.available"/>
<istrue value="${do.archive}"/>
</and>
</condition>
<condition property="do.archive+main.class.available">
<and>
<isset property="main.class.available"/>
<istrue value="${do.archive}"/>
</and>
</condition>
<condition property="do.archive+splashscreen.available">
<and>
<isset property="splashscreen.available"/>
<istrue value="${do.archive}"/>
</and>
</condition>
<condition property="do.archive+manifest.available+main.class">
<and>
<istrue value="${manifest.available+main.class}"/>
<istrue value="${do.archive}"/>
</and>
</condition>
<condition property="manifest.available-mkdist.available">
<or>
<istrue value="${manifest.available}"/>
<isset property="do.mkdist"/>
</or>
</condition>
<condition property="manifest.available+main.class-mkdist.available">
<or>
<istrue value="${manifest.available+main.class}"/>
<isset property="do.mkdist"/>
</or>
</condition>
<condition property="have.tests">
<or>
<available file="${test.src.dir}"/>
</or>
</condition>
<condition property="have.sources">
<or>
<available file="${src.ecj.dir}"/>
<available file="${src.dir}"/>
</or>
</condition>
<condition property="netbeans.home+have.tests">
<and>
<isset property="netbeans.home"/>
<isset property="have.tests"/>
</and>
</condition>
<condition property="no.javadoc.preview">
<and>
<isset property="javadoc.preview"/>
<isfalse value="${javadoc.preview}"/>
</and>
</condition>
<property name="run.jvmargs" value=""/>
<property name="run.jvmargs.ide" value=""/>
<property name="javac.compilerargs" value=""/>
<property name="work.dir" value="${basedir}"/>
<condition property="no.deps">
<and>
<istrue value="${no.dependencies}"/>
</and>
</condition>
<property name="javac.debug" value="true"/>
<property name="javadoc.preview" value="true"/>
<property name="application.args" value=""/>
<property name="source.encoding" value="${file.encoding}"/>
<property name="runtime.encoding" value="${source.encoding}"/>
<condition property="javadoc.encoding.used" value="${javadoc.encoding}">
<and>
<isset property="javadoc.encoding"/>
<not>
<equals arg1="${javadoc.encoding}" arg2=""/>
</not>
</and>
</condition>
<property name="javadoc.encoding.used" value="${source.encoding}"/>
<property name="includes" value="**"/>
<property name="excludes" value=""/>
<property name="do.depend" value="false"/>
<condition property="do.depend.true">
<istrue value="${do.depend}"/>
</condition>
<path id="endorsed.classpath.path" path="${endorsed.classpath}"/>
<condition else="" property="endorsed.classpath.cmd.line.arg" value="-Xbootclasspath/p:'${toString:endorsed.classpath.path}'">
<length length="0" string="${endorsed.classpath}" when="greater"/>
</condition>
<condition else="false" property="jdkBug6558476">
<and>
<matches pattern="1\.[56]" string="${java.specification.version}"/>
<not>
<os family="unix"/>
</not>
</and>
</condition>
<property name="javac.fork" value="${jdkBug6558476}"/>
<property name="jar.index" value="false"/>
<property name="jar.index.metainf" value="${jar.index}"/>
<property name="copylibs.rebase" value="true"/>
<available file="${meta.inf.dir}/persistence.xml" property="has.persistence.xml"/>
<condition property="junit.available">
<or>
<available classname="org.junit.Test" classpath="${run.test.classpath}"/>
<available classname="junit.framework.Test" classpath="${run.test.classpath}"/>
</or>
</condition>
<condition property="testng.available">
<available classname="org.testng.annotations.Test" classpath="${run.test.classpath}"/>
</condition>
<condition property="junit+testng.available">
<and>
<istrue value="${junit.available}"/>
<istrue value="${testng.available}"/>
</and>
</condition>
<condition else="testng" property="testng.mode" value="mixed">
<istrue value="${junit+testng.available}"/>
</condition>
<condition else="" property="testng.debug.mode" value="-mixed">
<istrue value="${junit+testng.available}"/>
</condition>
</target>
<target name="-post-init">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
<fail unless="src.ecj.dir">Must set src.ecj.dir</fail>
<fail unless="src.dir">Must set src.dir</fail>
<fail unless="test.src.dir">Must set test.src.dir</fail>
<fail unless="build.dir">Must set build.dir</fail>
<fail unless="dist.dir">Must set dist.dir</fail>
<fail unless="build.classes.dir">Must set build.classes.dir</fail>
<fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
<fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
<fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
<fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
<fail unless="dist.jar">Must set dist.jar</fail>
</target>
<target name="-init-macrodef-property">
<macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
<attribute name="name"/>
<attribute name="value"/>
<sequential>
<property name="@{name}" value="${@{value}}"/>
</sequential>
</macrodef>
</target>
<target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-macrodef-javac-with-processors">
<macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
<attribute default="${src.ecj.dir}:${src.dir}" name="srcdir"/>
<attribute default="${build.classes.dir}" name="destdir"/>
<attribute default="${javac.classpath}" name="classpath"/>
<attribute default="${javac.processorpath}" name="processorpath"/>
<attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
<attribute default="${includes}" name="includes"/>
<attribute default="${excludes}" name="excludes"/>
<attribute default="${javac.debug}" name="debug"/>
<attribute default="${empty.dir}" name="sourcepath"/>
<attribute default="${empty.dir}" name="gensrcdir"/>
<element name="customize" optional="true"/>
<sequential>
<property location="${build.dir}/empty" name="empty.dir"/>
<mkdir dir="${empty.dir}"/>
<mkdir dir="@{apgeneratedsrcdir}"/>
<javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
<src>
<dirset dir="@{gensrcdir}" erroronmissingdir="false">
<include name="*"/>
</dirset>
</src>
<classpath>
<path path="@{classpath}"/>
</classpath>
<compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
<compilerarg line="${javac.compilerargs}"/>
<compilerarg value="-processorpath"/>
<compilerarg path="@{processorpath}:${empty.dir}"/>
<compilerarg line="${ap.processors.internal}"/>
<compilerarg line="${annotation.processing.processor.options}"/>
<compilerarg value="-s"/>
<compilerarg path="@{apgeneratedsrcdir}"/>
<compilerarg line="${ap.proc.none.internal}"/>
<customize/>
</javac>
</sequential>
</macrodef>
</target>
<target depends="-init-ap-cmdline-properties" name="-init-macrodef-javac-without-processors" unless="ap.supported.internal">
<macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
<attribute default="${src.ecj.dir}:${src.dir}" name="srcdir"/>
<attribute default="${build.classes.dir}" name="destdir"/>
<attribute default="${javac.classpath}" name="classpath"/>
<attribute default="${javac.processorpath}" name="processorpath"/>
<attribute default="${build.generated.sources.dir}/ap-source-output" name="apgeneratedsrcdir"/>
<attribute default="${includes}" name="includes"/>
<attribute default="${excludes}" name="excludes"/>
<attribute default="${javac.debug}" name="debug"/>
<attribute default="${empty.dir}" name="sourcepath"/>
<attribute default="${empty.dir}" name="gensrcdir"/>
<element name="customize" optional="true"/>
<sequential>
<property location="${build.dir}/empty" name="empty.dir"/>
<mkdir dir="${empty.dir}"/>
<javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
<src>
<dirset dir="@{gensrcdir}" erroronmissingdir="false">
<include name="*"/>
</dirset>
</src>
<classpath>
<path path="@{classpath}"/>
</classpath>
<compilerarg line="${endorsed.classpath.cmd.line.arg}"/>
<compilerarg line="${javac.compilerargs}"/>
<customize/>
</javac>
</sequential>
</macrodef>
</target>
<target depends="-init-macrodef-javac-with-processors,-init-macrodef-javac-without-processors" name="-init-macrodef-javac">
<macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
<attribute default="${src.ecj.dir}:${src.dir}" name="srcdir"/>
<attribute default="${build.classes.dir}" name="destdir"/>
<attribute default="${javac.classpath}" name="classpath"/>
<sequential>
<depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
<classpath>
<path path="@{classpath}"/>
</classpath>
</depend>
</sequential>
</macrodef>
<macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
<attribute default="${build.classes.dir}" name="destdir"/>
<sequential>
<fail unless="javac.includes">Must set javac.includes</fail>
<pathconvert pathsep="${line.separator}" property="javac.includes.binary">
<path>
<filelist dir="@{destdir}" files="${javac.includes}"/>
</path>
<globmapper from="*.java" to="*.class"/>
</pathconvert>
<tempfile deleteonexit="true" property="javac.includesfile.binary"/>
<echo file="${javac.includesfile.binary}" message="${javac.includes.binary}"/>
<delete>
<files includesfile="${javac.includesfile.binary}"/>
</delete>
<delete>
<fileset file="${javac.includesfile.binary}"/>
</delete>
</sequential>
</macrodef>
</target>
<target if="${junit.available}" name="-init-macrodef-junit-init">
<condition else="false" property="nb.junit.batch" value="true">
<and>
<istrue value="${junit.available}"/>
<not>
<isset property="test.method"/>
</not>
</and>
</condition>
<condition else="false" property="nb.junit.single" value="true">
<and>
<istrue value="${junit.available}"/>
<isset property="test.method"/>
</and>
</condition>
</target>
<target name="-init-test-properties">
<property name="test.binaryincludes" value="<nothing>"/>
<property name="test.binarytestincludes" value=""/>
<property name="test.binaryexcludes" value=""/>
</target>
<target if="${nb.junit.single}" name="-init-macrodef-junit-single" unless="${nb.junit.batch}">
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
<attribute default="${includes}" name="includes"/>
<attribute default="${excludes}" name="excludes"/>
<attribute default="**" name="testincludes"/>
<attribute default="" name="testmethods"/>
<element name="customize" optional="true"/>
<sequential>
<property name="junit.forkmode" value="perTest"/>
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
<test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
<syspropertyset>
<propertyref prefix="test-sys-prop."/>
<mapper from="test-sys-prop.*" to="*" type="glob"/>
</syspropertyset>
<formatter type="brief" usefile="false"/>
<formatter type="xml"/>
<jvmarg value="-ea"/>
<customize/>
</junit>
</sequential>
</macrodef>
</target>
<target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-batch" unless="${nb.junit.single}">
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
<attribute default="${includes}" name="includes"/>
<attribute default="${excludes}" name="excludes"/>
<attribute default="**" name="testincludes"/>
<attribute default="" name="testmethods"/>
<element name="customize" optional="true"/>
<sequential>
<property name="junit.forkmode" value="perTest"/>
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
<batchtest todir="${build.test.results.dir}">
<fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
<filename name="@{testincludes}"/>
</fileset>
<fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
<filename name="${test.binarytestincludes}"/>
</fileset>
</batchtest>
<syspropertyset>
<propertyref prefix="test-sys-prop."/>
<mapper from="test-sys-prop.*" to="*" type="glob"/>
</syspropertyset>
<formatter type="brief" usefile="false"/>
<formatter type="xml"/>
<jvmarg value="-ea"/>
<customize/>
</junit>
</sequential>
</macrodef>
</target>
<target depends="-init-macrodef-junit-init,-init-macrodef-junit-single, -init-macrodef-junit-batch" if="${junit.available}" name="-init-macrodef-junit"/>
<target if="${testng.available}" name="-init-macrodef-testng">
<macrodef name="testng" uri="http://www.netbeans.org/ns/j2se-project/3">
<attribute default="${includes}" name="includes"/>
<attribute default="${excludes}" name="excludes"/>
<attribute default="**" name="testincludes"/>
<attribute default="" name="testmethods"/>
<element name="customize" optional="true"/>
<sequential>
<condition else="" property="testng.methods.arg" value="@{testincludes}.@{testmethods}">
<isset property="test.method"/>
</condition>
<union id="test.set">
<fileset dir="${test.src.dir}" excludes="@{excludes},**/*.xml,${excludes}" includes="@{includes}">
<filename name="@{testincludes}"/>
</fileset>
</union>
<taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
<testng classfilesetref="test.set" failureProperty="tests.failed" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="GP_project" testname="TestNG tests" workingDir="${work.dir}">
<xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
<propertyset>
<propertyref prefix="test-sys-prop."/>
<mapper from="test-sys-prop.*" to="*" type="glob"/>
</propertyset>
<customize/>
</testng>
</sequential>
</macrodef>
</target>
<target name="-init-macrodef-test-impl">
<macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
<attribute default="${includes}" name="includes"/>
<attribute default="${excludes}" name="excludes"/>
<attribute default="**" name="testincludes"/>
<attribute default="" name="testmethods"/>
<element implicit="true" name="customize" optional="true"/>
<sequential>
<echo>No tests executed.</echo>
</sequential>
</macrodef>
</target>
<target depends="-init-macrodef-junit" if="${junit.available}" name="-init-macrodef-junit-impl">
<macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
<attribute default="${includes}" name="includes"/>
<attribute default="${excludes}" name="excludes"/>
<attribute default="**" name="testincludes"/>
<attribute default="" name="testmethods"/>
<element implicit="true" name="customize" optional="true"/>
<sequential>
<j2seproject3:junit excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
<customize/>
</j2seproject3:junit>
</sequential>
</macrodef>
</target>
<target depends="-init-macrodef-testng" if="${testng.available}" name="-init-macrodef-testng-impl">
<macrodef name="test-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
<attribute default="${includes}" name="includes"/>
<attribute default="${excludes}" name="excludes"/>
<attribute default="**" name="testincludes"/>
<attribute default="" name="testmethods"/>
<element implicit="true" name="customize" optional="true"/>
<sequential>
<j2seproject3:testng excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
<customize/>
</j2seproject3:testng>
</sequential>
</macrodef>
</target>
<target depends="-init-macrodef-test-impl,-init-macrodef-junit-impl,-init-macrodef-testng-impl" name="-init-macrodef-test">
<macrodef name="test" uri="http://www.netbeans.org/ns/j2se-project/3">
<attribute default="${includes}" name="includes"/>
<attribute default="${excludes}" name="excludes"/>
<attribute default="**" name="testincludes"/>
<attribute default="" name="testmethods"/>
<sequential>
<j2seproject3:test-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
<customize>
<classpath>
<path path="${run.test.classpath}"/>
</classpath>
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
<jvmarg line="${run.jvmargs}"/>
<jvmarg line="${run.jvmargs.ide}"/>
</customize>
</j2seproject3:test-impl>
</sequential>
</macrodef>
</target>
<target if="${junit.available}" name="-init-macrodef-junit-debug" unless="${nb.junit.batch}">
<macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
<attribute default="${includes}" name="includes"/>
<attribute default="${excludes}" name="excludes"/>
<attribute default="**" name="testincludes"/>
<attribute default="" name="testmethods"/>
<element name="customize" optional="true"/>
<sequential>
<property name="junit.forkmode" value="perTest"/>
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
<test methods="@{testmethods}" name="@{testincludes}" todir="${build.test.results.dir}"/>
<syspropertyset>
<propertyref prefix="test-sys-prop."/>
<mapper from="test-sys-prop.*" to="*" type="glob"/>
</syspropertyset>
<formatter type="brief" usefile="false"/>
<formatter type="xml"/>
<jvmarg value="-ea"/>
<jvmarg line="${debug-args-line}"/>
<jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
<customize/>
</junit>
</sequential>
</macrodef>
</target>
<target depends="-init-test-properties" if="${nb.junit.batch}" name="-init-macrodef-junit-debug-batch">
<macrodef name="junit-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
<attribute default="${includes}" name="includes"/>
<attribute default="${excludes}" name="excludes"/>
<attribute default="**" name="testincludes"/>
<attribute default="" name="testmethods"/>
<element name="customize" optional="true"/>
<sequential>
<property name="junit.forkmode" value="perTest"/>
<junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" forkmode="${junit.forkmode}" showoutput="true" tempdir="${build.dir}">
<batchtest todir="${build.test.results.dir}">
<fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
<filename name="@{testincludes}"/>
</fileset>
<fileset dir="${build.test.classes.dir}" excludes="@{excludes},${excludes},${test.binaryexcludes}" includes="${test.binaryincludes}">
<filename name="${test.binarytestincludes}"/>
</fileset>
</batchtest>
<syspropertyset>
<propertyref prefix="test-sys-prop."/>
<mapper from="test-sys-prop.*" to="*" type="glob"/>
</syspropertyset>
<formatter type="brief" usefile="false"/>
<formatter type="xml"/>
<jvmarg value="-ea"/>
<jvmarg line="${debug-args-line}"/>
<jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
<customize/>
</junit>
</sequential>
</macrodef>
</target>
<target depends="-init-macrodef-junit-debug,-init-macrodef-junit-debug-batch" if="${junit.available}" name="-init-macrodef-junit-debug-impl">
<macrodef name="test-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
<attribute default="${includes}" name="includes"/>
<attribute default="${excludes}" name="excludes"/>
<attribute default="**" name="testincludes"/>
<attribute default="" name="testmethods"/>
<element implicit="true" name="customize" optional="true"/>
<sequential>
<j2seproject3:junit-debug excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
<customize/>
</j2seproject3:junit-debug>
</sequential>
</macrodef>
</target>
<target if="${testng.available}" name="-init-macrodef-testng-debug">
<macrodef name="testng-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
<attribute default="${main.class}" name="testClass"/>
<attribute default="" name="testMethod"/>
<element name="customize2" optional="true"/>
<sequential>
<condition else="-testclass @{testClass}" property="test.class.or.method" value="-methods @{testClass}.@{testMethod}">
<isset property="test.method"/>
</condition>
<condition else="-suitename GP_project -testname @{testClass} ${test.class.or.method}" property="testng.cmd.args" value="@{testClass}">
<matches pattern=".*\.xml" string="@{testClass}"/>
</condition>
<delete dir="${build.test.results.dir}" quiet="true"/>
<mkdir dir="${build.test.results.dir}"/>
<j2seproject3:debug classname="org.testng.TestNG" classpath="${debug.test.classpath}">
<customize>
<customize2/>
<jvmarg value="-ea"/>
<arg line="${testng.debug.mode}"/>
<arg line="-d ${build.test.results.dir}"/>
<arg line="-listener org.testng.reporters.VerboseReporter"/>
<arg line="${testng.cmd.args}"/>
</customize>
</j2seproject3:debug>
</sequential>
</macrodef>
</target>
<target depends="-init-macrodef-testng-debug" if="${testng.available}" name="-init-macrodef-testng-debug-impl">
<macrodef name="testng-debug-impl" uri="http://www.netbeans.org/ns/j2se-project/3">
<attribute default="${main.class}" name="testClass"/>
<attribute default="" name="testMethod"/>
<element implicit="true" name="customize2" optional="true"/>
<sequential>
<j2seproject3:testng-debug testClass="@{testClass}" testMethod="@{testMethod}">
<customize2/>
</j2seproject3:testng-debug>
</sequential>
</macrodef>
</target>
<target depends="-init-macrodef-junit-debug-impl" if="${junit.available}" name="-init-macrodef-test-debug-junit">
<macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
<attribute default="${includes}" name="includes"/>
<attribute default="${excludes}" name="excludes"/>
<attribute default="**" name="testincludes"/>
<attribute default="" name="testmethods"/>
<attribute default="${main.class}" name="testClass"/>
<attribute default="" name="testMethod"/>
<sequential>
<j2seproject3:test-debug-impl excludes="@{excludes}" includes="@{includes}" testincludes="@{testincludes}" testmethods="@{testmethods}">
<customize>
<classpath>
<path path="${run.test.classpath}"/>
</classpath>
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
<jvmarg line="${run.jvmargs}"/>
<jvmarg line="${run.jvmargs.ide}"/>
</customize>
</j2seproject3:test-debug-impl>
</sequential>
</macrodef>
</target>
<target depends="-init-macrodef-testng-debug-impl" if="${testng.available}" name="-init-macrodef-test-debug-testng">
<macrodef name="test-debug" uri="http://www.netbeans.org/ns/j2se-project/3">
<attribute default="${includes}" name="includes"/>
<attribute default="${excludes}" name="excludes"/>
<attribute default="**" name="testincludes"/>
<attribute default="" name="testmethods"/>
<attribute default="${main.class}" name="testClass"/>
<attribute default="" name="testMethod"/>
<sequential>
<j2seproject3:testng-debug-impl testClass="@{testClass}" testMethod="@{testMethod}">
<customize2>
<syspropertyset>
<propertyref prefix="test-sys-prop."/>
<mapper from="test-sys-prop.*" to="*" type="glob"/>
</syspropertyset>
</customize2>
</j2seproject3:testng-debug-impl>
</sequential>
</macrodef>
</target>
<target depends="-init-macrodef-test-debug-junit,-init-macrodef-test-debug-testng" name="-init-macrodef-test-debug"/>
<!--
pre NB7.2 profiling section; consider it deprecated
-->
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile, -profile-init-check" if="profiler.info.jvmargs.agent" name="profile-init"/>
<target if="profiler.info.jvmargs.agent" name="-profile-pre-init">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target if="profiler.info.jvmargs.agent" name="-profile-post-init">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target if="profiler.info.jvmargs.agent" name="-profile-init-macrodef-profile">
<macrodef name="resolve">
<attribute name="name"/>
<attribute name="value"/>
<sequential>
<property name="@{name}" value="${env.@{value}}"/>
</sequential>
</macrodef>
<macrodef name="profile">
<attribute default="${main.class}" name="classname"/>
<element name="customize" optional="true"/>
<sequential>
<property environment="env"/>
<resolve name="profiler.current.path" value="${profiler.info.pathvar}"/>
<java classname="@{classname}" dir="${profiler.info.dir}" fork="true" jvm="${profiler.info.jvm}">
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
<jvmarg value="${profiler.info.jvmargs.agent}"/>
<jvmarg line="${profiler.info.jvmargs}"/>
<env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
<arg line="${application.args}"/>
<classpath>
<path path="${run.classpath}"/>
</classpath>
<syspropertyset>
<propertyref prefix="run-sys-prop."/>
<mapper from="run-sys-prop.*" to="*" type="glob"/>
</syspropertyset>
<customize/>
</java>
</sequential>
</macrodef>
</target>
<target depends="-profile-pre-init, init, -profile-post-init, -profile-init-macrodef-profile" if="profiler.info.jvmargs.agent" name="-profile-init-check">
<fail unless="profiler.info.jvm">Must set JVM to use for profiling in profiler.info.jvm</fail>
<fail unless="profiler.info.jvmargs.agent">Must set profiler agent JVM arguments in profiler.info.jvmargs.agent</fail>
</target>
<!--
end of pre NB7.2 profiling section
-->
<target depends="-init-debug-args" name="-init-macrodef-nbjpda">
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
<attribute default="${main.class}" name="name"/>
<attribute default="${debug.classpath}" name="classpath"/>
<attribute default="" name="stopclassname"/>
<sequential>
<nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
<classpath>
<path path="@{classpath}"/>
</classpath>
</nbjpdastart>
</sequential>
</macrodef>
<macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
<attribute default="${build.classes.dir}" name="dir"/>
<sequential>
<nbjpdareload>
<fileset dir="@{dir}" includes="${fix.classes}">
<include name="${fix.includes}*.class"/>
</fileset>
</nbjpdareload>
</sequential>
</macrodef>
</target>
<target name="-init-debug-args">
<property name="version-output" value="java version "${ant.java.version}"/>
<condition property="have-jdk-older-than-1.4">
<or>
<contains string="${version-output}" substring="java version "1.0"/>
<contains string="${version-output}" substring="java version "1.1"/>
<contains string="${version-output}" substring="java version "1.2"/>
<contains string="${version-output}" substring="java version "1.3"/>
</or>
</condition>
<condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
<istrue value="${have-jdk-older-than-1.4}"/>
</condition>
<condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
<os family="windows"/>
</condition>
<condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
<isset property="debug.transport"/>
</condition>
</target>
<target depends="-init-debug-args" name="-init-macrodef-debug">
<macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
<attribute default="${main.class}" name="classname"/>
<attribute default="${debug.classpath}" name="classpath"/>
<element name="customize" optional="true"/>
<sequential>
<java classname="@{classname}" dir="${work.dir}" fork="true">
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
<jvmarg line="${debug-args-line}"/>
<jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
<jvmarg line="${run.jvmargs}"/>
<jvmarg line="${run.jvmargs.ide}"/>
<classpath>
<path path="@{classpath}"/>
</classpath>
<syspropertyset>
<propertyref prefix="run-sys-prop."/>
<mapper from="run-sys-prop.*" to="*" type="glob"/>
</syspropertyset>
<customize/>
</java>
</sequential>
</macrodef>
</target>
<target name="-init-macrodef-java">
<macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
<attribute default="${main.class}" name="classname"/>
<attribute default="${run.classpath}" name="classpath"/>
<attribute default="jvm" name="jvm"/>
<element name="customize" optional="true"/>
<sequential>
<java classname="@{classname}" dir="${work.dir}" fork="true">
<jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
<jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
<redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
<jvmarg line="${run.jvmargs}"/>
<jvmarg line="${run.jvmargs.ide}"/>
<classpath>
<path path="@{classpath}"/>
</classpath>
<syspropertyset>
<propertyref prefix="run-sys-prop."/>
<mapper from="run-sys-prop.*" to="*" type="glob"/>
</syspropertyset>
<customize/>
</java>
</sequential>
</macrodef>
</target>
<target name="-init-macrodef-copylibs">
<macrodef name="copylibs" uri="http://www.netbeans.org/ns/j2se-project/3">
<attribute default="${manifest.file}" name="manifest"/>
<element name="customize" optional="true"/>
<sequential>
<property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
<pathconvert property="run.classpath.without.build.classes.dir">
<path path="${run.classpath}"/>
<map from="${build.classes.dir.resolved}" to=""/>
</pathconvert>
<pathconvert pathsep=" " property="jar.classpath">
<path path="${run.classpath.without.build.classes.dir}"/>
<chainedmapper>
<flattenmapper/>
<filtermapper>
<replacestring from=" " to="%20"/>
</filtermapper>
<globmapper from="*" to="lib/*"/>
</chainedmapper>
</pathconvert>
<taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
<copylibs compress="${jar.compress}" index="${jar.index}" indexMetaInf="${jar.index.metainf}" jarfile="${dist.jar}" manifest="@{manifest}" rebase="${copylibs.rebase}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
<fileset dir="${build.classes.dir}"/>
<manifest>
<attribute name="Class-Path" value="${jar.classpath}"/>
<customize/>
</manifest>
</copylibs>
</sequential>
</macrodef>
</target>
<target name="-init-presetdef-jar">
<presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
<jar compress="${jar.compress}" index="${jar.index}" jarfile="${dist.jar}">
<j2seproject1:fileset dir="${build.classes.dir}"/>
</jar>
</presetdef>
</target>
<target name="-init-ap-cmdline-properties">
<property name="annotation.processing.enabled" value="true"/>
<property name="annotation.processing.processors.list" value=""/>
<property name="annotation.processing.processor.options" value=""/>
<property name="annotation.processing.run.all.processors" value="true"/>
<property name="javac.processorpath" value="${javac.classpath}"/>
<property name="javac.test.processorpath" value="${javac.test.classpath}"/>
<condition property="ap.supported.internal" value="true">
<not>
<matches pattern="1\.[0-5](\..*)?" string="${javac.source}"/>
</not>
</condition>
</target>
<target depends="-init-ap-cmdline-properties" if="ap.supported.internal" name="-init-ap-cmdline-supported">
<condition else="" property="ap.processors.internal" value="-processor ${annotation.processing.processors.list}">
<isfalse value="${annotation.processing.run.all.processors}"/>
</condition>
<condition else="" property="ap.proc.none.internal" value="-proc:none">
<isfalse value="${annotation.processing.enabled}"/>
</condition>
</target>
<target depends="-init-ap-cmdline-properties,-init-ap-cmdline-supported" name="-init-ap-cmdline">
<property name="ap.cmd.line.internal" value=""/>
</target>
<target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-test,-init-macrodef-test-debug,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar,-init-ap-cmdline" name="init"/>
<!--
===================
COMPILATION SECTION
===================
-->
<target name="-deps-jar-init" unless="built-jar.properties">
<property location="${build.dir}/built-jar.properties" name="built-jar.properties"/>
<delete file="${built-jar.properties}" quiet="true"/>
</target>
<target if="already.built.jar.${basedir}" name="-warn-already-built-jar">
<echo level="warn" message="Cycle detected: GP project was already built"/>
</target>
<target depends="init,-deps-jar-init" name="deps-jar" unless="no.deps">
<mkdir dir="${build.dir}"/>
<touch file="${built-jar.properties}" verbose="false"/>
<property file="${built-jar.properties}" prefix="already.built.jar."/>
<antcall target="-warn-already-built-jar"/>
<propertyfile file="${built-jar.properties}">
<entry key="${basedir}" value=""/>
</propertyfile>
</target>
<target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
<target depends="init" name="-check-automatic-build">
<available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
</target>
<target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
<antcall target="clean"/>
</target>
<target depends="init,deps-jar" name="-pre-pre-compile">
<mkdir dir="${build.classes.dir}"/>
</target>
<target name="-pre-compile">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target if="do.depend.true" name="-compile-depend">
<pathconvert property="build.generated.subdirs">
<dirset dir="${build.generated.sources.dir}" erroronmissingdir="false">
<include name="*"/>
</dirset>
</pathconvert>
<j2seproject3:depend srcdir="${src.ecj.dir}:${src.dir}:${build.generated.subdirs}"/>
</target>
<target depends="init,deps-jar,-pre-pre-compile,-pre-compile, -copy-persistence-xml,-compile-depend" if="have.sources" name="-do-compile">
<j2seproject3:javac gensrcdir="${build.generated.sources.dir}"/>
<copy todir="${build.classes.dir}">
<fileset dir="${src.ecj.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
<fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
</copy>
</target>
<target if="has.persistence.xml" name="-copy-persistence-xml">
<mkdir dir="${build.classes.dir}/META-INF"/>
<copy todir="${build.classes.dir}/META-INF">
<fileset dir="${meta.inf.dir}" includes="persistence.xml orm.xml"/>
</copy>
</target>
<target name="-post-compile">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
<target name="-pre-compile-single">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
<fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
<j2seproject3:force-recompile/>
<j2seproject3:javac excludes="" gensrcdir="${build.generated.sources.dir}" includes="${javac.includes}" sourcepath="${src.ecj.dir}:${src.dir}"/>
</target>
<target name="-post-compile-single">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
<!--
====================
JAR BUILDING SECTION
====================
-->
<target depends="init" name="-pre-pre-jar">
<dirname file="${dist.jar}" property="dist.jar.dir"/>
<mkdir dir="${dist.jar.dir}"/>
</target>
<target name="-pre-jar">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive" name="-do-jar-without-manifest" unless="manifest.available-mkdist.available">
<j2seproject1:jar/>
</target>
<target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class-mkdist.available">
<j2seproject1:jar manifest="${manifest.file}"/>
</target>
<target depends="init,compile,-pre-pre-jar,-pre-jar" if="do.archive+manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
<j2seproject1:jar manifest="${manifest.file}">
<j2seproject1:manifest>
<j2seproject1:attribute name="Main-Class" value="${main.class}"/>
</j2seproject1:manifest>
</j2seproject1:jar>
<echo level="info">To run this application from the command line without Ant, try:</echo>
<property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
<property location="${dist.jar}" name="dist.jar.resolved"/>
<pathconvert property="run.classpath.with.dist.jar">
<path path="${run.classpath}"/>
<map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
</pathconvert>
<echo level="info">java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
</target>
<target depends="init" if="do.archive" name="-do-jar-with-libraries-create-manifest" unless="manifest.available">
<tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
<touch file="${tmp.manifest.file}" verbose="false"/>
</target>
<target depends="init" if="do.archive+manifest.available" name="-do-jar-with-libraries-copy-manifest">
<tempfile deleteonexit="true" destdir="${build.dir}" property="tmp.manifest.file"/>
<copy file="${manifest.file}" tofile="${tmp.manifest.file}"/>
</target>
<target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+main.class.available" name="-do-jar-with-libraries-set-main">
<manifest file="${tmp.manifest.file}" mode="update">
<attribute name="Main-Class" value="${main.class}"/>
</manifest>
</target>
<target depends="init,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest" if="do.archive+splashscreen.available" name="-do-jar-with-libraries-set-splashscreen">
<basename file="${application.splash}" property="splashscreen.basename"/>
<mkdir dir="${build.classes.dir}/META-INF"/>
<copy failonerror="false" file="${application.splash}" todir="${build.classes.dir}/META-INF"/>
<manifest file="${tmp.manifest.file}" mode="update">
<attribute name="SplashScreen-Image" value="META-INF/${splashscreen.basename}"/>
</manifest>
</target>
<target depends="init,-init-macrodef-copylibs,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen" if="do.mkdist" name="-do-jar-with-libraries-pack">
<j2seproject3:copylibs manifest="${tmp.manifest.file}"/>
<echo level="info">To run this application from the command line without Ant, try:</echo>
<property location="${dist.jar}" name="dist.jar.resolved"/>
<echo level="info">java -jar "${dist.jar.resolved}"</echo>
</target>
<target depends="-do-jar-with-libraries-pack" if="do.archive" name="-do-jar-with-libraries-delete-manifest">
<delete>
<fileset file="${tmp.manifest.file}"/>
</delete>
</target>
<target depends="init,compile,-pre-pre-jar,-pre-jar,-do-jar-with-libraries-create-manifest,-do-jar-with-libraries-copy-manifest,-do-jar-with-libraries-set-main,-do-jar-with-libraries-set-splashscreen,-do-jar-with-libraries-pack,-do-jar-with-libraries-delete-manifest" name="-do-jar-with-libraries"/>
<target name="-post-jar">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
<!--
=================
EXECUTION SECTION
=================
-->
<target depends="init,compile" description="Run a main class." name="run">
<j2seproject1:java>
<customize>
<arg line="${application.args}"/>
</customize>
</j2seproject1:java>
</target>
<target name="-do-not-recompile">
<property name="javac.includes.binary" value=""/>
</target>
<target depends="init,compile-single" name="run-single">
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
<j2seproject1:java classname="${run.class}"/>
</target>
<target depends="init,compile-test-single" name="run-test-with-main">
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
<j2seproject1:java classname="${run.class}" classpath="${run.test.classpath}"/>
</target>
<!--
=================
DEBUGGING SECTION
=================
-->
<target depends="init" if="netbeans.home" name="-debug-start-debugger">
<j2seproject1:nbjpdastart name="${debug.class}"/>
</target>
<target depends="init" if="netbeans.home" name="-debug-start-debugger-main-test">
<j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${debug.class}"/>
</target>
<target depends="init,compile" name="-debug-start-debuggee">
<j2seproject3:debug>
<customize>
<arg line="${application.args}"/>
</customize>
</j2seproject3:debug>
</target>
<target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
<target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
<j2seproject1:nbjpdastart stopclassname="${main.class}"/>
</target>
<target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
<target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
<fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
<j2seproject3:debug classname="${debug.class}"/>
</target>
<target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
<target depends="init,compile-test-single" if="netbeans.home" name="-debug-start-debuggee-main-test">
<fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
<j2seproject3:debug classname="${debug.class}" classpath="${debug.test.classpath}"/>
</target>
<target depends="init,compile-test-single,-debug-start-debugger-main-test,-debug-start-debuggee-main-test" if="netbeans.home" name="debug-test-with-main"/>
<target depends="init" name="-pre-debug-fix">
<fail unless="fix.includes">Must set fix.includes</fail>
<property name="javac.includes" value="${fix.includes}.java"/>
</target>
<target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
<j2seproject1:nbjpdareload/>
</target>
<target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
<!--
=================
PROFILING SECTION
=================
-->
<!--
pre NB7.2 profiler integration
-->
<target depends="profile-init,compile" description="Profile a project in the IDE." if="profiler.info.jvmargs.agent" name="-profile-pre72">
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
<nbprofiledirect>
<classpath>
<path path="${run.classpath}"/>
</classpath>
</nbprofiledirect>
<profile/>
</target>
<target depends="profile-init,compile-single" description="Profile a selected class in the IDE." if="profiler.info.jvmargs.agent" name="-profile-single-pre72">
<fail unless="profile.class">Must select one file in the IDE or set profile.class</fail>
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
<nbprofiledirect>
<classpath>
<path path="${run.classpath}"/>
</classpath>
</nbprofiledirect>
<profile classname="${profile.class}"/>
</target>
<target depends="profile-init,compile-single" if="profiler.info.jvmargs.agent" name="-profile-applet-pre72">
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
<nbprofiledirect>
<classpath>
<path path="${run.classpath}"/>
</classpath>
</nbprofiledirect>
<profile classname="sun.applet.AppletViewer">
<customize>
<arg value="${applet.url}"/>
</customize>
</profile>
</target>
<target depends="profile-init,compile-test-single" if="profiler.info.jvmargs.agent" name="-profile-test-single-pre72">
<fail unless="netbeans.home">This target only works when run from inside the NetBeans IDE.</fail>
<nbprofiledirect>
<classpath>
<path path="${run.test.classpath}"/>
</classpath>
</nbprofiledirect>
<junit dir="${profiler.info.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" jvm="${profiler.info.jvm}" showoutput="true">
<env key="${profiler.info.pathvar}" path="${profiler.info.agentpath}:${profiler.current.path}"/>
<jvmarg value="${profiler.info.jvmargs.agent}"/>
<jvmarg line="${profiler.info.jvmargs}"/>
<test name="${profile.class}"/>
<classpath>
<path path="${run.test.classpath}"/>
</classpath>
<syspropertyset>
<propertyref prefix="test-sys-prop."/>
<mapper from="test-sys-prop.*" to="*" type="glob"/>
</syspropertyset>
<formatter type="brief" usefile="false"/>
<formatter type="xml"/>
</junit>
</target>
<!--
end of pre NB72 profiling section
-->
<target if="netbeans.home" name="-profile-check">
<condition property="profiler.configured">
<or>
<contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
<contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
</or>
</condition>
</target>
<target depends="-profile-check,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="profile" unless="profiler.info.jvmargs.agent">
<startprofiler/>
<antcall target="run"/>
</target>
<target depends="-profile-check,-profile-single-pre72" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-single" unless="profiler.info.jvmargs.agent">
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
<startprofiler/>
<antcall target="run-single"/>
</target>
<target depends="-profile-test-single-pre72" description="Profile a selected test in the IDE." name="profile-test-single"/>
<target depends="-profile-check" description="Profile a selected test in the IDE." if="profiler.configured" name="profile-test" unless="profiler.info.jvmargs">
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
<startprofiler/>
<antcall target="test-single"/>
</target>
<target depends="-profile-check" description="Profile a selected class in the IDE." if="profiler.configured" name="profile-test-with-main">
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
<startprofiler/>
<antcal target="run-test-with-main"/>
</target>
<target depends="-profile-check,-profile-applet-pre72" if="profiler.configured" name="profile-applet" unless="profiler.info.jvmargs.agent">
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
<startprofiler/>
<antcall target="run-applet"/>
</target>
<!--
===============
JAVADOC SECTION
===============
-->
<target depends="init" if="have.sources" name="-javadoc-build">
<mkdir dir="${dist.javadoc.dir}"/>
<condition else="" property="javadoc.endorsed.classpath.cmd.line.arg" value="-J${endorsed.classpath.cmd.line.arg}">
<and>
<isset property="endorsed.classpath.cmd.line.arg"/>
<not>
<equals arg1="${endorsed.classpath.cmd.line.arg}" arg2=""/>
</not>
</and>
</condition>
<javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
<classpath>
<path path="${javac.classpath}"/>
</classpath>
<fileset dir="${src.ecj.dir}" excludes="*.java,${excludes}" includes="${includes}">
<filename name="**/*.java"/>
</fileset>
<fileset dir="${src.dir}" excludes="*.java,${excludes}" includes="${includes}">
<filename name="**/*.java"/>
</fileset>
<fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
<include name="**/*.java"/>
<exclude name="*.java"/>
</fileset>
<arg line="${javadoc.endorsed.classpath.cmd.line.arg}"/>
</javadoc>
<copy todir="${dist.javadoc.dir}">
<fileset dir="${src.ecj.dir}" excludes="${excludes}" includes="${includes}">
<filename name="**/doc-files/**"/>
</fileset>
<fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
<filename name="**/doc-files/**"/>
</fileset>
<fileset dir="${build.generated.sources.dir}" erroronmissingdir="false">
<include name="**/doc-files/**"/>
</fileset>
</copy>
</target>
<target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
<nbbrowse file="${dist.javadoc.dir}/index.html"/>
</target>
<target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
<!--
=========================
TEST COMPILATION SECTION
=========================
-->
<target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
<mkdir dir="${build.test.classes.dir}"/>
</target>
<target name="-pre-compile-test">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target if="do.depend.true" name="-compile-test-depend">
<j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
</target>
<target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
<j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" processorpath="${javac.test.processorpath}" srcdir="${test.src.dir}"/>
<copy todir="${build.test.classes.dir}">
<fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
</copy>
</target>
<target name="-post-compile-test">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
<target name="-pre-compile-test-single">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target depends="init,deps-jar,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
<fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
<j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
<j2seproject3:javac apgeneratedsrcdir="${build.test.classes.dir}" classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" processorpath="${javac.test.processorpath}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
<copy todir="${build.test.classes.dir}">
<fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
</copy>
</target>
<target name="-post-compile-test-single">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
<!--
=======================
TEST EXECUTION SECTION
=======================
-->
<target depends="init" if="have.tests" name="-pre-test-run">
<mkdir dir="${build.test.results.dir}"/>
</target>
<target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
<j2seproject3:test testincludes="**/*Test.java"/>
</target>
<target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
</target>
<target depends="init" if="have.tests" name="test-report"/>
<target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
<target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
<target depends="init" if="have.tests" name="-pre-test-run-single">
<mkdir dir="${build.test.results.dir}"/>
</target>
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
<j2seproject3:test excludes="" includes="${test.includes}" testincludes="${test.includes}"/>
</target>
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
</target>
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single-method">
<fail unless="test.class">Must select some files in the IDE or set test.class</fail>
<fail unless="test.method">Must select some method in the IDE or set test.method</fail>
<j2seproject3:test excludes="" includes="${javac.includes}" testincludes="${test.class}" testmethods="${test.method}"/>
</target>
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method" if="have.tests" name="-post-test-run-single-method">
<fail if="tests.failed" unless="ignore.failing.tests">Some tests failed; see details above.</fail>
</target>
<target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single-method,-post-test-run-single-method" description="Run single unit test." name="test-single-method"/>
<!--
=======================
TEST DEBUGGING SECTION
=======================
-->
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test">
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
<j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testincludes="${javac.includes}"/>
</target>
<target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-debug-start-debuggee-test-method">
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
<fail unless="test.method">Must select some method in the IDE or set test.method</fail>
<j2seproject3:test-debug excludes="" includes="${javac.includes}" testClass="${test.class}" testMethod="${test.method}" testincludes="${test.class}" testmethods="${test.method}"/>
</target>
<target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
<j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
</target>
<target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
<target depends="init,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test-method" name="debug-test-method"/>
<target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
<j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
</target>
<target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
<!--
=========================
APPLET EXECUTION SECTION
=========================
-->
<target depends="init,compile-single" name="run-applet">
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
<j2seproject1:java classname="sun.applet.AppletViewer">
<customize>
<arg value="${applet.url}"/>
</customize>
</j2seproject1:java>
</target>
<!--
=========================
APPLET DEBUGGING SECTION
=========================
-->
<target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
<j2seproject3:debug classname="sun.applet.AppletViewer">
<customize>
<arg value="${applet.url}"/>
</customize>
</j2seproject3:debug>
</target>
<target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
<!--
===============
CLEANUP SECTION
===============
-->
<target name="-deps-clean-init" unless="built-clean.properties">
<property location="${build.dir}/built-clean.properties" name="built-clean.properties"/>
<delete file="${built-clean.properties}" quiet="true"/>
</target>
<target if="already.built.clean.${basedir}" name="-warn-already-built-clean">
<echo level="warn" message="Cycle detected: GP project was already built"/>
</target>
<target depends="init,-deps-clean-init" name="deps-clean" unless="no.deps">
<mkdir dir="${build.dir}"/>
<touch file="${built-clean.properties}" verbose="false"/>
<property file="${built-clean.properties}" prefix="already.built.clean."/>
<antcall target="-warn-already-built-clean"/>
<propertyfile file="${built-clean.properties}">
<entry key="${basedir}" value=""/>
</propertyfile>
</target>
<target depends="init" name="-do-clean">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}" followsymlinks="false" includeemptydirs="true"/>
</target>
<target name="-post-clean">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
<target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
<target name="-check-call-dep">
<property file="${call.built.properties}" prefix="already.built."/>
<condition property="should.call.dep">
<and>
<not>
<isset property="already.built.${call.subproject}"/>
</not>
<available file="${call.script}"/>
</and>
</condition>
</target>
<target depends="-check-call-dep" if="should.call.dep" name="-maybe-call-dep">
<ant antfile="${call.script}" inheritall="false" target="${call.target}">
<propertyset>
<propertyref prefix="transfer."/>
<mapper from="transfer.*" to="*" type="glob"/>
</propertyset>
</ant>
</target>
</project>
| {
"content_hash": "79adbc7c913ad2ccf604f757df6b9265",
"timestamp": "",
"source": "github",
"line_count": 1420,
"max_line_length": 496,
"avg_line_length": 56.017605633802816,
"alnum_prop": 0.5584889056508895,
"repo_name": "ashkanent/GP_FitnessSharing",
"id": "b920dbef25db121bf6b064ca3241eb1a073d69b8",
"size": "79545",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "GP project/nbproject/build-impl.xml",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "2932"
},
{
"name": "CSS",
"bytes": "2782"
},
{
"name": "Common Lisp",
"bytes": "2814"
},
{
"name": "HTML",
"bytes": "17214850"
},
{
"name": "Java",
"bytes": "3029278"
},
{
"name": "Makefile",
"bytes": "11830"
},
{
"name": "Rust",
"bytes": "727"
},
{
"name": "Shell",
"bytes": "3784"
},
{
"name": "TeX",
"bytes": "1615946"
}
],
"symlink_target": ""
} |
classdef Equation_PhreeqcRM_v1 < Equation
properties
end
methods
function this = Equation_PhreeqcRM_v1 (Parameters)
this=this@Equation (@PhreeqcRM_v1, Parameters);
end
function C_n1 = Time_Stepping (this, parm)
%
end
end
end | {
"content_hash": "e07cee75d8e7b45c7bcc6f3689049317",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 59,
"avg_line_length": 24.23076923076923,
"alnum_prop": 0.5587301587301587,
"repo_name": "TReacLab/TReacLab",
"id": "10fb61a2efc0490c2ca022988f69f52ee70d9741",
"size": "315",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Sources/Utilitaries/Equations/Equation_PhreeqcRM_v1.m",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Matlab",
"bytes": "490518"
}
],
"symlink_target": ""
} |
@charset "UTF-8";
.intake24-as-served-image-chooser {
}
.intake24-as-served-image-container {
position: relative;
}
.intake24-as-served-thumbs-container {
margin-top:10px;
}
.intake24-as-served-image {
width: 100%;
height: auto;
}
.intake24-as-served-image-overlay {
position: absolute;
left:0;
top:0;
right:0;
bottom:0;
}
.intake24-as-served-image-label {
position: absolute;
right: 20px;
bottom: 20px;
font-size: 130%;
background-color: white;
border: 1px solid black;
border-radius: 3px;
padding: 5px;
}
.intake24-as-served-thumbnail {
border: 2px solid white;
cursor: pointer;
}
.intake24-as-served-thumbnail-selected {
border: 2px solid black;
}
.intake24-as-served-thumbnail.weight-factor {
position: relative;
display: inline-block;
text-align: center;
}
.intake24-as-served-thumbnail.weight-factor img {
filter: brightness(70%);
display: block;
}
.intake24-as-served-thumbnail.weight-factor p {
font-size: 400%;
margin: 0;
position: absolute;
top: 0;
color: #fff;
text-shadow: 2px 2px 0px #000;
width: 80px;
line-height: 61px;
}
.intake24-as-served-thumbnail.weight-factor.less p {
top: -5px;
}
.intake24-as-served-weight-factor-container {
position: absolute;
text-align: center;
bottom: 80px;
left: 50%;
transform: translate(-50%);
background: rgba(255, 255, 255, 0.8);
padding: 20px;
border-radius: 5px;
z-index: 500;
font-size: 125%;
}
@media (max-width: 768px) {
.intake24-as-served-weight-factor-container {
transform: none;
font-size: 110%;
left: 20px;
right: 20px;
bottom: 40px;
}
}
.intake24-as-served-weight-factor-container .ui {
line-height: 2;
}
.intake24-as-served-weight-factor-container svg {
height: 2em;
width: 2em;
}
.intake24-as-served-weight-factor-container svg.circled-text {
position: relative;
top: 0.6em;
margin-left: 0.2em;
margin-right: 0.2em;
}
.intake24-as-served-weight-factor-container text.circled-text-text {
font-size: 1px;
font-family: Verdana, sans-serif;
fill: black;
}
.intake24-as-served-weight-factor-container svg.radial-fraction {
position: relative;
top: 0.6em;
margin-left: 0.2em;
margin-right: 0.2em;
}
.intake24-as-served-weight-factor-container circle.circled-text-circle {
fill: white;
stroke-width: 0.1;
stroke: black;
}
.intake24-as-served-weight-factor-container circle.radial-fraction-empty {
fill: #6e6e6e;
stroke-width: 0.1;
stroke: black;
}
.intake24-as-served-weight-factor-container path.radial-fraction-full {
fill: white;
stroke: none;
}
.intake24-as-served-weight-factor-container span.whole {
font-weight: bold;
}
.intake24-as-served-weight-factor-container span.fraction {
font-weight: bold;
}
.intake24-as-served-weight-factor-container button {
color: black;
background: rgba(255,255,255,0.6);
padding: 5px 10px;
margin: 3px;
border: 1px solid gray;
}
.intake24-as-served-weight-factor button:hover {
background: white;
}
| {
"content_hash": "3706cdd08c51906ad9df56159508d32a",
"timestamp": "",
"source": "github",
"line_count": 168,
"max_line_length": 74,
"avg_line_length": 17.74404761904762,
"alnum_prop": 0.6957396846695739,
"repo_name": "digitalinteraction/intake24-survey-frontend",
"id": "50f0cc318f4605bab731a1d0ca61cd0d4dd55ac1",
"size": "3187",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "SurveyServer/public/survey-client/css/intake24-as-served.css",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "55817"
},
{
"name": "HTML",
"bytes": "93587"
},
{
"name": "Java",
"bytes": "2005411"
},
{
"name": "JavaScript",
"bytes": "63612"
},
{
"name": "Scala",
"bytes": "31128"
},
{
"name": "Shell",
"bytes": "329"
}
],
"symlink_target": ""
} |
template class ShareLogWriterT<ShareBytom>;
| {
"content_hash": "0a312ea0c3eb49bffa25b44df568f17c",
"timestamp": "",
"source": "github",
"line_count": 1,
"max_line_length": 43,
"avg_line_length": 44,
"alnum_prop": 0.8636363636363636,
"repo_name": "btccom/btcpool",
"id": "445d2fc6778ea88d42a32a2e39ecf404589451c7",
"size": "75",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/bytom/ShareLoggerBytom.cc",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "804"
},
{
"name": "Bluespec",
"bytes": "3272"
},
{
"name": "C",
"bytes": "17618"
},
{
"name": "C++",
"bytes": "1969542"
},
{
"name": "CMake",
"bytes": "297738"
},
{
"name": "Dockerfile",
"bytes": "79609"
},
{
"name": "Go",
"bytes": "32283"
},
{
"name": "JavaScript",
"bytes": "504"
},
{
"name": "PHP",
"bytes": "61840"
},
{
"name": "Python",
"bytes": "13156"
},
{
"name": "Rust",
"bytes": "17276"
},
{
"name": "Shell",
"bytes": "119841"
},
{
"name": "TSQL",
"bytes": "39854"
}
],
"symlink_target": ""
} |
$(document).ready(function(){
$('#pppanel').click(function() {
$(location).attr('href',redUrl);
});
}); | {
"content_hash": "7cf0219ebebbf5940fe39719102b0d00",
"timestamp": "",
"source": "github",
"line_count": 6,
"max_line_length": 39,
"avg_line_length": 20.833333333333332,
"alnum_prop": 0.504,
"repo_name": "Polaris1123322/HIT-Survey",
"id": "292335b3a0a290f58ade85ed3ebd17c5dcb4a167",
"size": "125",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "scripts/admin/uploadsummary.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "309"
},
{
"name": "Batchfile",
"bytes": "1144"
},
{
"name": "CSS",
"bytes": "894385"
},
{
"name": "HTML",
"bytes": "346261"
},
{
"name": "JavaScript",
"bytes": "2124782"
},
{
"name": "PHP",
"bytes": "6709234"
}
],
"symlink_target": ""
} |
package org.apache.maven.plugins.war.stub;
import java.io.File;
import java.util.HashSet;
import java.util.Properties;
import java.util.Set;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.model.Build;
import org.apache.maven.model.Organization;
import org.apache.maven.project.MavenProject;
/**
* Stub
*/
public class MavenProjectBasicStub
extends MavenProject
{
protected String testRootDir;
protected Properties properties;
public MavenProjectBasicStub()
throws Exception
{
super( new ModelStub() );
properties = new Properties();
}
public Set<Artifact> getArtifacts()
{
return new HashSet<Artifact>();
}
public String getName()
{
return "Test Project ";
}
public File getBasedir()
{
// create an isolated environment
// see setupTestEnvironment for details
//return new File( testRootDir );
return null;
}
public String getGroupId()
{
return "org.apache.maven.plugin.test";
}
public String getArtifactId()
{
return "maven-war-plugin-test";
}
public String getPackaging()
{
return "jar";
}
public String getVersion()
{
return "0.0-Test";
}
public void addProperty( String key, String value )
{
properties.put( key, value );
}
public Properties getProperties()
{
return properties;
}
public String getDescription()
{
return "Test Description";
}
public Organization getOrganization()
{
return new Organization()
{
public String getName()
{
return "Test Name";
}
};
}
@Override
public Build getBuild()
{
Build build = super.getBuild();
build.setDirectory( System.getProperty( "project.build.directory" ) );
build.setOutputDirectory( System.getProperty( "project.build.outputDirectory" ) );
return build;
}
@Override
public MavenProject clone()
{
return this;
}
}
| {
"content_hash": "af5f0f96e87cad5ec3fd02e030d61039",
"timestamp": "",
"source": "github",
"line_count": 113,
"max_line_length": 90,
"avg_line_length": 18.97345132743363,
"alnum_prop": 0.5984141791044776,
"repo_name": "apache/maven-plugins",
"id": "020760e01324c6d73d5311bf61f4a95f53187e01",
"size": "2950",
"binary": false,
"copies": "7",
"ref": "refs/heads/trunk",
"path": "maven-war-plugin/src/test/java/org/apache/maven/plugins/war/stub/MavenProjectBasicStub.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C++",
"bytes": "2714"
},
{
"name": "CSS",
"bytes": "15875"
},
{
"name": "GAP",
"bytes": "1429"
},
{
"name": "Groovy",
"bytes": "347385"
},
{
"name": "HTML",
"bytes": "87959"
},
{
"name": "Java",
"bytes": "7686955"
},
{
"name": "JavaScript",
"bytes": "4347"
},
{
"name": "Shell",
"bytes": "58647"
}
],
"symlink_target": ""
} |
<!DOCTYPE html>
<html>
<head>
<title>zoom</title>
<!--
For production (minified) code, use:
<script type="text/javascript" src="dygraph-combined.js"></script>
-->
<script type="text/javascript" src="../dist/dygraph.js"></script>
<script type="text/javascript" src="data.js"></script>
</head>
<body>
<h3>Click the buttons to change the zoom level or just use the normal
click-and drag. While zoom typically works by click-and-drag, the
buttons are useful for testing.</h3>
<h4>Window coordinates (in dates and values):</h4>
<div id="xdimensions"></div> <div id="ydimensions"></div>
<div style="float: right">
<p>Zoomed: <span id="zoomed">False</span><p/>
<p>Zoomed X: <span id="zoomedX">False</span><p/>
<p>Zoomed Y: <span id="zoomedY">False</span><p/>
</div>
<div id="div_g" style="width:600px; height:300px;"></div>
<p><b>Zoom operations:</b></p>
<p>
<input type="button" value="Y (3,5)" onclick="zoomGraphY(3,5)">
<input type="button" value="Y (0,4)" onclick="zoomGraphY(0,4)">
<input type="button" value="Y (2,4)" onclick="zoomGraphY(2,4)">
<input type="button" value="Y (0,2)" onclick="zoomGraphY(0,2)">
<input type="button" value="Y (0,1)" onclick="zoomGraphY(0,1)">
<br> <br>
<input type="button" value="Oct 8-13" onclick="zoomGraphX(1160261979962, 1163905694248)">
<input type="button" value="Oct 22-28" onclick="zoomGraphX(1161489164461 , 1162008465957)">
<input type="button" value="Oct 23-24" onclick="zoomGraphX(1161575878860, 1161660991675)">
<input type="button" value="Oct 26 6AM-noon" onclick="zoomGraphX(1161770537840, 1161792063332)">
<br> <br>
<input type="button" value="Unzoom" onclick="unzoomGraph()">
<br> <br>
<input type="button" value="pan frame null" onclick="panEdgeFraction(null)">
<input type="button" value="pan frame 0.1" onclick="panEdgeFraction(0.1)">
<input type="button" value="pan frame 0.5" onclick="panEdgeFraction(0.5)">
</p>
<script type="text/javascript">
g = new Dygraph(
document.getElementById("div_g"),
NoisyData, {
errorBars: true,
zoomCallback : function(minDate, maxDate, yRange) {
showDimensions(minDate, maxDate, yRange);
},
drawCallback: function(me, initial) {
document.getElementById("zoomed").innerHTML = "" + me.isZoomed();
document.getElementById("zoomedX").innerHTML = "" + me.isZoomed("x");
document.getElementById("zoomedY").innerHTML = "" + me.isZoomed("y");
}
}
);
// TODO(konigsberg): Implement a visualization that verifies that initial
// displays also show correctly.
// Pull an initial value for logging.
var minDate = g.xAxisRange()[0];
var maxDate = g.xAxisRange()[1];
var minValue = g.yAxisRange()[0];
var maxValue = g.yAxisRange()[1];
showDimensions(minDate, maxDate, [minValue, maxValue]);
function showDimensions(minDate, maxDate, yRanges) {
showXDimensions(minDate, maxDate);
showYDimensions(yRanges);
}
function showXDimensions(first, second) {
var elem = document.getElementById("xdimensions");
elem.innerHTML = "dateWindow : [" + first + ", "+ second + "]";
}
function showYDimensions(ranges) {
var elem = document.getElementById("ydimensions");
elem.innerHTML = "valueRange : [" + ranges + "]";
}
function zoomGraphX(minDate, maxDate) {
g.updateOptions({
dateWindow: [minDate, maxDate]
});
showXDimensions(minDate, maxDate);
}
function zoomGraphY(minValue, maxValue) {
g.updateOptions({
valueRange: [minValue, maxValue]
});
showYDimensions(g.yAxisRanges());
}
function unzoomGraph() {
g.updateOptions({
dateWindow: null,
valueRange: null
});
}
function panEdgeFraction(value) {
g.updateOptions({ panEdgeFraction : value });
}
</script>
</body>
</html>
| {
"content_hash": "9813bc906a4ed1d135fbdadd5d6f9e01",
"timestamp": "",
"source": "github",
"line_count": 116,
"max_line_length": 108,
"avg_line_length": 37.1551724137931,
"alnum_prop": 0.5955916473317865,
"repo_name": "Akiyah/dygraphs",
"id": "afc39a3a0851f6e32bd0d8728cc9f8f5919081a6",
"size": "4310",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "tests/zoom.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "6034"
},
{
"name": "HTML",
"bytes": "256331"
},
{
"name": "Java",
"bytes": "2648"
},
{
"name": "JavaScript",
"bytes": "1486021"
},
{
"name": "Python",
"bytes": "9620"
},
{
"name": "Shell",
"bytes": "11196"
}
],
"symlink_target": ""
} |
<?php
namespace Infuse\Billing\Console;
use Infuse\HasApp;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class ExtendTrialCommand extends Command
{
use HasApp;
protected function configure()
{
$this
->setName('billing:extend-trial')
->setDescription('Extends the free trial')
->addArgument(
'member',
InputArgument::REQUIRED,
'Billable member ID to extend'
)
->addArgument(
'days',
InputArgument::REQUIRED,
'# of days to extend the trial for'
);
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$id = $input->getArgument('member');
$days = $input->getArgument('days');
$modelClass = $this->app['config']->get('billing.model');
$member = $modelClass::where('id', $id)->first();
if (!$member) {
$output->writeln("Member # $id not found");
return 1;
}
if ($member->trial_ends <= 0) {
$output->writeln("Member # $id is not currently trialing");
return 1;
}
$member->trial_ends += $days * 86400;
$member->save();
$ends = date('M d, Y', $member->trial_ends);
$output->writeln("Extended member # $id trial period by $days days to $ends");
return 0;
}
}
| {
"content_hash": "d71682ac8c3414b031b397455b040fa0",
"timestamp": "",
"source": "github",
"line_count": 62,
"max_line_length": 86,
"avg_line_length": 25.887096774193548,
"alnum_prop": 0.557632398753894,
"repo_name": "infusephp/billing",
"id": "f84cb15e77442f904332eaa34b4fe48f34595c89",
"size": "1736",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/Console/ExtendTrialCommand.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "PHP",
"bytes": "83048"
}
],
"symlink_target": ""
} |
#ifndef JPETOPTIONSTYPEHANDLER_H
#define JPETOPTIONSTYPEHANDLER_H
#include <map>
#include <string>
#include <boost/any.hpp>
/**
* @brief Class handling the type of option provided by the user.
*
*/
class JPetOptionsTypeHandler
{
public:
static std::map<std::string, std::string> anyMapToStringMap(const std::map<std::string, boost::any>& optionsMap);
static std::vector<std::string> getAllowedTypes();
static std::string getTypeOfOption(const std::string& option);
static std::string getNameOfOption(const std::string& option);
private:
static const std::vector<std::string> kAllowedTypes;
};
#endif /* !JPETOPTIONSTYPEHANDLER_H */
| {
"content_hash": "8066197f3438217a0a439a656c863285",
"timestamp": "",
"source": "github",
"line_count": 25,
"max_line_length": 115,
"avg_line_length": 26.04,
"alnum_prop": 0.7419354838709677,
"repo_name": "alexkernphysiker/j-pet-framework",
"id": "c2c0ac43e00c17f4e4c23abcc91b7b02a7c39897",
"size": "1302",
"binary": false,
"copies": "2",
"ref": "refs/heads/develop",
"path": "JPetOptionsGenerator/JPetOptionsTypeHandler.h",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C",
"bytes": "6662"
},
{
"name": "C++",
"bytes": "982592"
},
{
"name": "CMake",
"bytes": "18234"
},
{
"name": "Objective-C",
"bytes": "440"
},
{
"name": "PLpgSQL",
"bytes": "49229"
},
{
"name": "Perl",
"bytes": "3684"
},
{
"name": "Python",
"bytes": "5809"
},
{
"name": "Shell",
"bytes": "5847"
}
],
"symlink_target": ""
} |
//META{"name":"kawaiiemotes"}*//
/*@cc_on
@if (@_jscript)
// Offer to self-install for clueless users that try to run this directly.
var shell = WScript.CreateObject("WScript.Shell");
var fs = new ActiveXObject("Scripting.FileSystemObject");
var pathPlugins = shell.ExpandEnvironmentStrings("%APPDATA%\\BetterDiscord\\plugins");
var pathSelf = WScript.ScriptFullName;
// Put the user at ease by addressing them in the first person
shell.Popup("It looks like you mistakenly tried to run me directly. (don't do that!)", 0, "I'm a plugin for BetterDiscord", 0x30);
if (fs.GetParentFolderName(pathSelf) === fs.GetAbsolutePathName(pathPlugins)) {
shell.Popup("I'm in the correct folder already.\nJust reload Discord with Ctrl+R.", 0, "I'm already installed", 0x40);
} else if (!fs.FolderExists(pathPlugins)) {
shell.Popup("I can't find the BetterDiscord plugins folder.\nAre you sure it's even installed?", 0, "Can't install myself", 0x10);
} else if (shell.Popup("Should I copy myself to BetterDiscord's plugins folder for you?", 0, "Do you need some help?", 0x34) === 6) {
fs.CopyFile(pathSelf, fs.BuildPath(pathPlugins, fs.GetFileName(pathSelf)), true);
// Show the user where to put plugins in the future
shell.Exec("explorer " + pathPlugins);
shell.Popup("I'm installed!\nJust reload Discord with Ctrl+R.", 0, "Successfully installed", 0x40);
}
WScript.Quit();
@else @*/
var kawaiiemotes = function () {};
(function () {
"use strict";
// Emote data
function EmoteSet() {
this.emoteMap = new Map();
this.template = "";
this.caseSensitive = true;
this.emoteStyle = EmoteSet.emoteStyle.STANDARD;
this.loaded = false;
};
// emoteStyle enum
EmoteSet.emoteStyle = {
STANDARD: 0, // Surrounded by ":"
TWITCH: 1, // Composed of "word characters" (\w)
};
// template field names enum
EmoteSet.templateField = {
PATH: 0, // The unique path component for this emote name
SIZE: 1, // emote size, usually a single digit between 1 and 4
};
EmoteSet.prototype.load = function(){};
EmoteSet.prototype.getUrl = function (emoteName) {
if (!this.caseSensitive) {
emoteName = emoteName.toLowerCase();
}
var path = this.emoteMap.get(emoteName);
if (path === undefined) {
return undefined;
}
return this.template.replace(/{(\d+)}/g, function (match, field) {
switch (Number(field)) {
case EmoteSet.templateField.PATH:
return path;
case EmoteSet.templateField.SIZE:
return "1";
default:
return match;
}
});
};
// Create and return an emote element, or undefined if no match found
EmoteSet.prototype.createEmote = function (emoteName, options) {
options = $.extend({allowWide: false}, options);
var emoteURL = this.getUrl(emoteName);
if (emoteURL === undefined) {
return undefined;
}
if (this.emoteStyle === EmoteSet.emoteStyle.STANDARD) {
emoteName = ":"+emoteName+":";
}
var emote = $("<img>", {
src: emoteURL,
alt: emoteName,
title: emoteName,
"class": "emoji kawaii-parseemotes",
}).attr("draggable", "false");
// Show a fake favorite button
emote.css("cursor", "pointer");
emote.on("mouseover.kawaiiFavorite", function () {
// Create and insert favorite button
var fav = $("<div>").addClass("fav")
.css("display", "block")
.css("pointer-events", "none")
.appendTo($(".tooltips"));
// Position the button
var position = emote.offset();
position.top -= fav.height()/2;
position.left += emote.width() - fav.width()/2;
fav.offset(position);
// Set a handler to destroy the button
emote.on("mouseout.kawaiiFavorite", function () {
// remove this handler
emote.off("mouseout.kawaiiFavorite");
fav.remove();
});
});
emote.on("click.kawaiiFavorite", function () {
quickEmoteMenu.favorite(emoteName, emoteURL);
});
if (options.allowWide) {
emote.on("load.kawaiiWideEmote", function () {
var wide = this.naturalWidth > this.naturalHeight;
$(this).css("width", wide ? "auto" : "");
});
}
return emote;
};
EmoteSet.prototype.search = function (query) {
const score = function (name, query) {
name = name.toLowerCase();
query = query.toLowerCase();
const d = name.length - query.length;
const i = name.indexOf(query);
if (i === -1) {
return 0;
}
return 1 + (i+1)*(d-i+2);
};
return [...this.emoteMap.keys()]
.map(e => [e, score(e, query)])
.filter(e => e[1] !== 0);
};
function getCompletionsStandard(emoteSets, text) {
const match = text.match(/(^|\s):(\w{2,})$/);
if (match === null) {
return {completions: [], matchText: null, matchStart: -1};
}
const completions = emoteSets
.filter(s => s.emoteStyle === EmoteSet.emoteStyle.STANDARD)
.map(s => s.search(match[2]).map(e => [[":"+e[0]+":", s.createEmote.bind(s, e[0])], e[1]]))
.reduce((a,b) => a.concat(b), []);
const matchText = ":"+match[2], matchStart = match.index + match[1].length;
return {completions, matchText, matchStart};
}
function getCompletionsTwitch(emoteSets, text) {
const match = text.match(/(^|\s)(\w{3,})$/);
if (match === null) {
return {completions: [], matchText: null, matchStart: -1};
}
const completions = emoteSets
.filter(s => s.emoteStyle === EmoteSet.emoteStyle.TWITCH)
.map(s => s.search(match[2])
.filter(e => $.inArray(e[0], bemotes) === -1)
.map(e => [[e[0], s.createEmote.bind(s, e[0])], e[1]])
)
.reduce((a,b) => a.concat(b), []);
const matchText = match[2], matchStart = match.index + match[1].length;
return {completions, matchText, matchStart};
}
const emoteComparator = (function () {
const compare = new Intl.Collator(undefined, {
usage: "sort",
sensitivity: "base",
numeric: true,
}).compare;
return (a,b) => ((a[1]===b[1]) ? compare(a[0],b[0]) : (a[1]-b[1]));
})();
function getCompletions(emoteSets, text) {
let {completions, matchText, matchStart} = getCompletionsStandard(emoteSets, text);
if (matchStart === -1) {
({completions, matchText, matchStart} = getCompletionsTwitch(emoteSets, text));
}
completions = completions
.sort(emoteComparator)
.map(e => e[0]);
return {completions, matchText, matchStart};
}
// Set up event handlers
function startTabComplete(emoteSets, options={}) {
// Cached information about possible completions
// Conflicts should be avoidable, as this is cleared on focus loss
let cached = {};
let textarea;
const {
completionsMenu: showMenu=true,
completionsDelay: delay=250,
completionsWindowSize: windowSize=10,
completionsPreScroll: preScroll=2
} = options;
if (!showMenu) {
return;
}
const shouldCompleteStandard = RegExp.prototype.test.bind(/(?:^|\s):\w{2,}$/);
const shouldCompleteTwitch = RegExp.prototype.test.bind(/(?:^|\s)\w{3,}$/);
const shouldComplete = RegExp.prototype.test.bind(/(?:^|\s)(?:\w|:)\w{2,}$/);
// Show possible completions
let renderCompletions = _.debounce(function () {
const channelTextarea = $(textarea).closest(".channelTextArea-1LDbYG > .inner-zqa7da");
const oldAutocomplete = channelTextarea.children(".kawaii-autocomplete");
const candidateText = textarea.value.slice(0, textarea.selectionEnd);
if (!shouldCompleteTwitch(candidateText) || !prepareCompletions()) {
oldAutocomplete.remove();
return;
}
const {completions, matchText, selectedIndex, windowOffset: firstIndex} = cached;
const matchList = completions.slice(firstIndex, firstIndex+windowSize);
const autocomplete = $("<div>")
.addClass("autocomplete-i9yVHs autocomplete-1vrmpx kawaii-autocomplete")
.on("wheel.kawaii-complete", e => scrollCompletions(e, {locked: true}));
// FIXME: clean up this mess of jQuery
$("<div>", {"class": "autocompleteRowVertical-q1K4ky autocompleteRow-2OthDa"})
.append($("<div>", {"class": "selector-2IcQBU"})
.append($("<div>", {text: "Emotes matching "}).append($("<strong>", {text: matchText}))
.addClass("contentTitle-2tG_sM primary400-hm0Rav weightBold-2yjlgw")))
.appendTo(autocomplete);
autocomplete
.append(matchList.map((e,i) => {
let row = $("<div>", {"class": "autocompleteRowVertical-q1K4ky autocompleteRow-2OthDa"});
let selector = $("<div>", {"class": "selector-2IcQBU selectable-x8iAUj"})
.append($("<div>")
.addClass("flex-lFgbSz flex-1O1GKY horizontal-3Sq5iO horizontal-2VE-Fw flex-1O1GKY directionRow-3v3tfG justifyStart-2NDFzi alignCenter-1dQNNs noWrap-vaXJ4Y content-3JfFJh")
.css("flex", "1 1 auto")
.append(e[1]().toggleClass("emoji icon-17zDF5"))
.append($("<div>", {"class": "marginLeft8-1YseBe", text: e[0]})))
.appendTo(row);
if (i+firstIndex === selectedIndex) {
selector.addClass("selectorSelected-1_M1WV");
}
row.on("mouseenter.kawaii-complete", e => {
cached.selectedIndex = i+firstIndex;
row.siblings().children(".selectorSelected-1_M1WV").removeClass("selectorSelected-1_M1WV");
row.children().addClass("selectorSelected-1_M1WV");
}).on("mousedown.kawaii-complete", e => {
cached.selectedIndex = i+firstIndex;
insertSelectedCompletion();
// Prevent loss of focus
e.preventDefault();
});
return row;
}));
oldAutocomplete.remove();
channelTextarea
.append(autocomplete);
}, delay);
// Scroll through the "window" of completions
function scrollWindow(delta, {locked=false, clamped=false} = {}) {
const {completions, selectedIndex: prevSel, windowOffset} = cached;
if (completions === undefined || completions.length === 0) {
return;
}
// Change selected index
const num = completions.length;
let sel = prevSel + delta;
if (clamped) {
sel = _.clamp(sel, 0, num-1);
} else {
sel = (sel % num) + (sel<0 ? num : 0);
}
cached.selectedIndex = sel;
// Clamp window position to bounds based on new selected index
const boundLower = _.clamp(sel + preScroll - (windowSize-1), 0, num-windowSize);
const boundUpper = _.clamp(sel - preScroll, 0, num-windowSize);
cached.windowOffset = _.clamp(windowOffset + (locked ? delta : 0), boundLower, boundUpper);
// Render immediately
renderCompletions();
renderCompletions.flush();
}
function prepareCompletions() {
const candidateText = textarea.value.slice(0, textarea.selectionEnd);
const {candidateText: lastText} = cached;
if (lastText !== candidateText) {
const {completions, matchText, matchStart} = getCompletions(emoteSets, candidateText);
cached = {candidateText, completions, matchText, matchStart, selectedIndex: 0, windowOffset: 0};
}
const {completions} = cached;
return (completions !== undefined && completions.length !== 0);
}
function destroyCompletions() {
const channelTextarea = $(textarea).closest(".channelTextArea-1LDbYG > .inner-zqa7da");
const oldAutocomplete = channelTextarea.children(".kawaii-autocomplete");
oldAutocomplete.remove();
cached = {};
renderCompletions.cancel();
}
// Insert selected completion at cursor position
function insertSelectedCompletion() {
const {completions, matchStart, selectedIndex} = cached;
if (completions === undefined) {
return;
}
textarea.focus();
// Set beginning of selection at start of partial emote text; end of selection end remains where it is
textarea.selectionStart = matchStart;
document.execCommand("insertText", false, completions[selectedIndex][0] + " ");
destroyCompletions();
}
// Check for matches (overrides TextareaAutosize's onClick, onKeyPress, onKeyUp, maybeShowAutocomplete)
function checkCompletions(e) {
/* jshint validthis: true */
textarea = this;
const candidateText = textarea.value.slice(0, textarea.selectionEnd);
const {candidateText: lastText} = cached;
// If an emote match is impossible, don't override default behavior.
// This allows other completion types (like usernames or channels) to work as usual.
if (!shouldCompleteTwitch(candidateText)) {
destroyCompletions();
return;
}
// Don't override enter when there are no actual completions.
// This allows message sending to work as usual.
if (e.which === 13) {
return;
}
// For any other key, always override, even when there are no actual completions.
// This prevents Discord's emoji autocompletion from kicking in intermittently.
e.stopPropagation();
if (lastText !== candidateText) {
renderCompletions();
}
}
// Browse or insert matches (overrides ChannelTextArea's onKeyDown)
function browseCompletions(e) {
/* jshint validthis: true */
textarea = this;
const candidateText = textarea.value.slice(0, textarea.selectionEnd);
if (!shouldCompleteTwitch(candidateText)) {
return;
}
let delta = 0, options;
switch (e.which) {
// Tab
case 9:
if (!prepareCompletions()) {
break;
}
// Prevent Discord's default behavior (send message)
e.stopPropagation();
// Prevent adding a tab or line break to text
e.preventDefault();
insertSelectedCompletion();
break;
// Up
case 38:
delta = -1;
break;
// Down
case 40:
delta = 1;
break;
// Page Up
case 33:
delta = -windowSize;
options = {locked: true, clamped: true};
break;
// Page Down
case 34:
delta = windowSize;
options = {locked: true, clamped: true};
break;
}
if (delta !== 0 && prepareCompletions()) {
// Prevent Discord's default behavior
e.stopPropagation();
// Prevent cursor movement
e.preventDefault();
scrollWindow(delta, options);
}
}
// Scroll matches
function scrollCompletions(e, options) {
/* jshint validthis: true */
const delta = Math.sign(e.originalEvent.deltaY);
scrollWindow(delta, options);
}
// Check for matches
$(".app").on({
"keyup.kawaii-complete keypress.kawaii-complete click.kawaii-complete": checkCompletions,
"keydown.kawaii-complete": browseCompletions,
"wheel.kawaii-complete": scrollCompletions,
"blur.kawaii-complete": destroyCompletions,
}, ".channelTextArea-1LDbYG textarea");
}
// Tear down event handlers and clean up
function stopTabComplete() {
$(".app").off(".kawaii-complete", ".channelTextArea-1LDbYG textarea");
}
// Filter function for "Twitch-style" emotes, to avoid collisions with common words
// Check if at least 4 word characters
function emoteFilter(name) {
return /^\w{4,}$/.test(name);
}
// Global Twitch emotes (emoteset 0), filtered by emoteFilter
var twitchEmotes = new EmoteSet();
twitchEmotes.template = "https://static-cdn.jtvnw.net/emoticons/v1/{0}/{1}.0";
twitchEmotes.emoteStyle = EmoteSet.emoteStyle.TWITCH;
twitchEmotes.load = function (callbacks) {
callbacks = $.extend({
success: $.noop,
error: $.noop,
}, callbacks);
if (this.loaded) {
callbacks.success(this);
return;
}
var self = this;
// See: https://github.com/justintv/Twitch-API/blob/master/v3_resources/chat.md#get-chatemoticons
$.ajax("https://api.twitch.tv/kraken/chat/emoticon_images?emotesets=0", {
accepts: {json: "application/vnd.twitchtv.v3+json"},
headers: {'Client-ID': 'a7pwjx1l6tr0ygjrzafhznzd4zgg9md'},
dataType: "json",
jsonp: false,
cache: true,
success: function (data) {
var loaded = 0;
var skipped = 0;
data.emoticon_sets[0].forEach(function (emoticon) {
if (emoteFilter(emoticon.code)) {
self.emoteMap.set(emoticon.code, emoticon.id);
loaded++;
} else {
skipped++;
}
});
console.info("KawaiiEmotes:", "Twitch global emotes loaded:", loaded, "skipped:", skipped);
self.loaded = true;
callbacks.success(self);
},
error: function (xhr, textStatus, errorThrown) {
console.warn("KawaiiEmotes:", "Twitch global emotes failed to load:", textStatus, "error:", errorThrown);
callbacks.error(self);
}
});
};
// Twitch subscriber emotes, filtered by emoteFilter
var twitchSubEmotes = new EmoteSet();
twitchSubEmotes.template = "https://static-cdn.jtvnw.net/emoticons/v1/{0}/{1}.0";
twitchSubEmotes.emoteStyle = EmoteSet.emoteStyle.TWITCH;
twitchSubEmotes.load = function (callbacks) {
callbacks = $.extend({
success: $.noop,
error: $.noop,
}, callbacks);
if (this.loaded) {
callbacks.success(this);
return;
}
var self = this;
// See: https://github.com/justintv/Twitch-API/blob/master/v3_resources/chat.md#get-chatemoticons
$.ajax("https://api.twitch.tv/kraken/chat/emoticon_images", {
accepts: {json: "application/vnd.twitchtv.v3+json"},
headers: {'Client-ID': 'a7pwjx1l6tr0ygjrzafhznzd4zgg9md'},
dataType: "json",
jsonp: false,
cache: true,
success: function (data) {
var loaded = 0;
var skipped = 0;
data.emoticons.forEach(function (emoticon) {
if (emoticon.emoticon_set !== null && emoteFilter(emoticon.code)) {
self.emoteMap.set(emoticon.code, emoticon.id);
loaded++;
} else {
skipped++;
}
});
console.info("KawaiiEmotes:", "Twitch subscriber emotes loaded:", loaded, "skipped:", skipped);
self.loaded = true;
callbacks.success(self);
},
error: function (xhr, textStatus, errorThrown) {
console.warn("KawaiiEmotes:", "Twitch subscriber emotes failed to load:", textStatus, "error:", errorThrown);
callbacks.error(self);
}
});
};
// BetterTTV global emotes, filtered by emoteFilter
var bttvEmotes = new EmoteSet();
bttvEmotes.template = "https://cdn.betterttv.net/emote/{0}/{1}x";
bttvEmotes.emoteStyle = EmoteSet.emoteStyle.TWITCH;
bttvEmotes.load = function (callbacks) {
callbacks = $.extend({
success: $.noop,
error: $.noop,
}, callbacks);
if (this.loaded) {
callbacks.success(this);
return;
}
var self = this;
$.ajax("https://api.betterttv.net/2/emotes", {
dataType: "json",
jsonp: false,
cache: true,
success: function (data) {
var loaded = 0;
var skipped = 0;
self.template = data.urlTemplate
.replace("{{id}}", "{0}")
.replace("{{image}}", "{1}x");
data.emotes.forEach(function (emote) {
if (emoteFilter(emote.code)) {
self.emoteMap.set(emote.code, emote.id);
loaded++;
} else {
skipped++;
}
});
console.info("KawaiiEmotes:", "BTTV global emotes loaded:", loaded, "skipped:", skipped);
self.loaded = true;
callbacks.success(self);
},
error: function (xhr, textStatus, errorThrown) {
console.warn("KawaiiEmotes:", "BTTV global emotes failed to load:", textStatus, "error:", errorThrown);
callbacks.error(self);
}
});
};
// FrankerFaceZ global emotes, filtered by emoteFilter
var ffzEmotes = new EmoteSet();
ffzEmotes.template = "https://cdn.frankerfacez.com/emoticon/{0}/{1}";
ffzEmotes.emoteStyle = EmoteSet.emoteStyle.TWITCH;
ffzEmotes.load = function (callbacks) {
callbacks = $.extend({
success: $.noop,
error: $.noop,
}, callbacks);
if (this.loaded) {
callbacks.success(this);
return;
}
var self = this;
// See: https://www.frankerfacez.com/developers
$.ajax("https://api.frankerfacez.com/v1/set/global", {
dataType: "json",
jsonp: false,
cache: true,
success: function (data) {
var loaded = 0;
var skipped = 0;
data.default_sets.forEach(function (set) {
data.sets[set].emoticons.forEach(function (emoticon) {
if (emoteFilter(emoticon.name)) {
self.emoteMap.set(emoticon.name, emoticon.id);
loaded++;
} else {
skipped++;
}
});
});
console.info("KawaiiEmotes:", "FFZ global emotes loaded:", loaded, "skipped:", skipped);
self.loaded = true;
callbacks.success(self);
},
error: function (xhr, textStatus, errorThrown) {
console.warn("KawaiiEmotes:", "FFZ global emotes failed to load:", textStatus, "error:", errorThrown);
callbacks.error(self);
}
});
};
// BD's BTTV2 emote list, unfiltered
// This is BD's massive set of (more or less) every shared emote from BTTV
// TODO: Move downloading of this emote set from main thread to this one
// Or, at least make it asynchronous
// BD's loading should not block on fetching and parsing a 1MB+ JSON file from GitHub
var bttvLegacyEmotes = new EmoteSet();
bttvLegacyEmotes.template = "https://cdn.betterttv.net/emote/{0}/{1}x";
bttvLegacyEmotes.emoteStyle = EmoteSet.emoteStyle.TWITCH;
bttvLegacyEmotes.load = function (callbacks) {
callbacks = $.extend({
success: $.noop,
error: $.noop,
}, callbacks);
if (this.loaded) {
callbacks.success(this);
return;
}
if (emotesBTTV2 === undefined) {
console.warn("KawaiiEmotes:", "BetterDiscord legacy BTTV shared emotes failed to load:", "emotesBTTV2 is undefined");
callbacks.error(this);
}
var self = this;
(function (data) {
var loaded = 0;
var skipped = 0;
Object.keys(data).forEach(function (name) {
self.emoteMap.set(name, data[name]);
loaded++;
});
console.info("KawaiiEmotes:", "BetterDiscord legacy BTTV shared emotes loaded:", loaded, "skipped:", skipped);
self.loaded = true;
callbacks.success(self);
})(emotesBTTV2);
};
// BD's FFZ emote list, unfiltered
// This is BD's massive set of (more or less) every public emote from FFZ
// TODO: Move downloading of this emote set from main thread to this one
// Or, at least make it asynchronous
// BD's loading should not block on fetching and parsing a 1MB+ JSON file from GitHub
var ffzLegacyEmotes = new EmoteSet();
ffzLegacyEmotes.template = "https://cdn.frankerfacez.com/emoticon/{0}/{1}";
ffzLegacyEmotes.emoteStyle = EmoteSet.emoteStyle.TWITCH;
ffzLegacyEmotes.load = function (callbacks) {
callbacks = $.extend({
success: $.noop,
error: $.noop,
}, callbacks);
if (this.loaded) {
callbacks.success(this);
return;
}
if (emotesFfz === undefined) {
console.warn("KawaiiEmotes:", "BetterDiscord legacy FFZ public emotes failed to load:", "emotesFfz is undefined");
callbacks.error(this);
}
var self = this;
(function (data) {
var loaded = 0;
var skipped = 0;
Object.keys(data).forEach(function (name) {
self.emoteMap.set(name, data[name]);
loaded++;
});
console.info("KawaiiEmotes:", "BetterDiscord legacy FFZ public emotes loaded:", loaded, "skipped:", skipped);
self.loaded = true;
callbacks.success(self);
})(emotesFfz);
};
// End emote data
// Settings panel helpers
// Create and return a new top-level settings panel
function topPanel() {
var panel = $("<form>")
.addClass("form")
.css("width", "100%");
return panel;
}
// Create and return a container for control groups
function controlGroups() {
return $("<div>").addClass("control-groups");
}
// Create and return a flexible control group
// settings (object)
// label
// an element or something JQuery-ish
// or, if string, use as plain text
function controlGroup(settings) {
var group = $("<div>").addClass("control-group");
if (typeof settings.label === "string") {
group.append($("<label>").text(settings.label));
} else if (settings.label !== undefined) {
group.append($("<label>").append(settings.label));
}
return group;
}
// Create and return a group of checkboxes
// settings (object)
// items (array)
// an array of settings objects to be passed to checkbox()
// callback (function(state))
// called with the current state, when it changes
// state is an array of boolean values
function checkboxGroup(settings) {
settings = $.extend({
items: [],
callback: $.noop,
}, settings);
var state = settings.items.map(item => item.checked === true);
function onClick(i, itemState) {
if (settings.items[i].callback !== undefined) {
settings.items[i].callback(itemState);
}
state[i] = itemState;
settings.callback(state);
}
var group = $("<ul>").addClass("checkbox-group");
group.append(settings.items.map(function (item, i) {
return checkbox($.extend({}, item, {
callback: onClick.bind(undefined, i),
}));
}));
return group;
}
// Create and return a checkbox
// settings (object)
// label
// an element or something JQuery-ish
// or, if string, use as plain text
// help
// an element or something JQuery-ish
// or, if string, use as plain text
// checked (boolean)
// disabled (boolean)
// callback (function(state))
// called with the current state, when it changes
// state is a boolean
function checkbox(settings) {
settings = $.extend({
checked: false,
disabled: false,
callback: $.noop,
}, settings);
var input = $("<input>").attr("type", "checkbox")
.prop("checked", settings.checked)
.prop("disabled", settings.disabled);
var inner = $("<div>").addClass("checkbox-inner")
.append(input)
.append($("<span>"));
var outer = $("<div>").addClass("checkbox").append(inner);
if (settings.disabled) {
outer.addClass("disabled");
}
if (typeof settings.label === "string") {
outer.append($("<span>").text(settings.label));
} else if (settings.label !== undefined) {
outer.append($("<span>").append(settings.label));
}
outer.on("click.kawaiiSettings", function () {
if (!input.prop("disabled")) {
var checked = !input.prop("checked");
input.prop("checked", checked);
settings.callback(checked);
}
});
var item = $("<li>").append(outer);
var help;
if (typeof settings.help === "string") {
help = $("<div>").text(settings.help);
} else if (settings.help !== undefined) {
help = $("<div>").append(settings.help);
}
if (help !== undefined) {
help.appendTo(item)
.addClass("help-text")
.css("margin-top", "-3px")
.css("margin-left", "27px");
}
return item;
}
// Generate a random string of alphanumeric characters
// length
// number of characters in output (default: 8)
function randomString(length) {
var n = (length !== undefined) ? length : 8;
var c = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
var out = "";
for (let i = 0; i < n; i++) {
out += c[Math.floor(Math.random() * c.length)];
}
return out;
}
// Create and return a group of radio buttons
// settings (object)
// items (array)
// an array of settings objects to be passed to checkbox()
// callback (function(state))
// called with the current state, when it changes
// state is the index of the selected element
function radioGroup(settings) {
settings = $.extend({
items: [],
callback: $.noop,
}, settings);
var name = "kawaiiRadio$" + randomString();
var state = settings.items.findIndex(item => item.checked === true);
function onClick(i, itemState) {
if (!itemState) {
return;
}
if (i !== state) {
if (settings.items[state] !== undefined && settings.items[state].callback !== undefined) {
settings.items[state].callback(false);
}
if (settings.items[i].callback !== undefined) {
settings.items[i].callback(true);
}
state = i;
settings.callback(state);
}
}
var group = $("<ul>").addClass("radio-group");
group.append(settings.items.map(function (item, i) {
return radio($.extend({}, item, {
name: name,
callback: onClick.bind(undefined, i),
}));
}));
return group;
}
// Create and return a radio button
// settings (object)
// label
// an element or something JQuery-ish
// or, if string, use as plain text
// help
// an element or something JQuery-ish
// or, if string, use as plain text
// checked (boolean)
// disabled (boolean)
// name (string)
// name of the radio group this belongs to
// callback (function(state))
// called with the current state, when it changes
// state is a boolean
function radio(settings) {
settings = $.extend({
checked: false,
disabled: false,
callback: $.noop,
}, settings);
var input = $("<input>").attr("type", "radio")
.attr("name", settings.name)
.prop("checked", settings.checked)
.prop("disabled", settings.disabled);
var inner = $("<div>").addClass("radio-inner")
.append(input)
.append($("<span>"));
var outer = $("<div>").addClass("radio").append(inner);
if (settings.disabled) {
outer.addClass("disabled");
}
if (typeof settings.label === "string") {
outer.append($("<span>").text(settings.label));
} else if (settings.label !== undefined) {
outer.append($("<span>").append(settings.label));
}
outer.on("click.kawaiiSettings", function () {
if (!input.prop("disabled")) {
var checked = true;
input.prop("checked", checked);
settings.callback(checked);
}
});
var item = $("<li>").append(outer);
var help;
if (typeof settings.help === "string") {
help = $("<div>").text(settings.help);
} else if (settings.help !== undefined) {
help = $("<div>").append(settings.help);
}
if (help !== undefined) {
help.appendTo(item)
.addClass("help-text")
.css("margin-top", "-3px")
.css("margin-left", "41px");
}
return item;
}
// End settings panel helpers
function initJQueryPlugins($) {
// jQuery Plugins
// Make sure that these are set up after jQuery is available, but before we need any of them
// Should be fine if it happens to be called more than once
// Get or set the scroll distance from the bottom of an element
// Usage identical to scrollTop()
$.fn.scrollBottom = function (val) {
var elem = this[0];
if (val === undefined) {
if (elem === undefined) {
return undefined;
}
return elem.scrollHeight - (this.scrollTop() + this.height());
}
if (elem === undefined) {
return this;
}
return this.scrollTop(elem.scrollHeight - (val + this.height()));
};
// Get the set of text nodes contained within a set of elements
$.fn.textNodes = function () {
return this.map(function () {
const textNodes = [];
let textNodeWalker, currentNode;
if ($(this).find("code").length > 0) {
// If there are any code blocks, rejecting that whole subtree is a bit faster
textNodeWalker = document.createTreeWalker(this, NodeFilter.SHOW_TEXT | NodeFilter.SHOW_ELEMENT, {
acceptNode: function (node) {
if (node.nodeType === Node.TEXT_NODE) {
return NodeFilter.FILTER_ACCEPT;
}
if (node.nodeName.toLowerCase() === "code") {
return NodeFilter.FILTER_REJECT;
}
return NodeFilter.FILTER_SKIP;
}
});
} else {
textNodeWalker = document.createTreeWalker(this, NodeFilter.SHOW_TEXT);
}
while ((currentNode = textNodeWalker.nextNode()) !== null) {
textNodes.push(currentNode);
}
return textNodes;
});
};
// Parse for standard emotes in message text
$.fn.parseEmotesStandard = function (emoteSets, options) {
if (emoteSets === undefined || emoteSets.length === 0) {
return this;
}
this.textNodes().each(function () {
var sub = [];
// separate out potential emotes
// all standard emotes are composed of characters in [a-zA-Z0-9_], i.e. \w between two colons, :
// use a regex with a capture group, so that we can preserve separators
var words = this.data.split(/(:[\w#*]+:)/g);
// non-emoteable words, for building a new text node if necessary
var nonEmote = [];
// whether the text in this node has been modified
var modified = false;
for (var i = 0; i < words.length; i += 2) {
// words[i] is a separator
// words[i+1] is our potential emote, or undefined
// Keep the separator
nonEmote.push(words[i]);
if (words[i+1] === undefined) {
break;
}
var emote;
if (emoteSets.some(function (set) {
emote = set.createEmote(/^:([^:]+):$/.exec(words[i+1])[1], options);
return (emote !== undefined);
})) {
modified = true;
// Create a new text node from any previous text
sub.push(document.createTextNode(nonEmote.join("")));
// Clear out stored words
nonEmote = [];
// Add the emote element
sub.push(emote);
} else {
// Unrecognized as emote, keep the word
nonEmote.push(words[i+1]);
}
}
// If no emotes were found, leave this text node unchanged
if (modified) {
// Replace this node's contents with remaining text
this.data = nonEmote.join("");
}
$(this).before(sub);
});
return this;
};
var emoteMods = new Set([
"flip", "flap", "pulse",
"spin", "spin2", "spin3",
"1spin", "2spin", "3spin",
"shake", "shake2", "shake3",
"tr", "bl", "br",
]);
// Parse for Twitch-style emotes in message text
$.fn.parseEmotesTwitch = function (emoteSets, options) {
if (emoteSets === undefined || emoteSets.length === 0) {
return this;
}
var emoteModsEnabled = settingsCookie["bda-es-8"];
// Find and replace Twitch-style emotes
this.textNodes().each(function () {
var sub = [];
// separate out potential emotes
// all twitch emotes (that we care about) are composed of characters in [a-zA-Z0-9_], i.e. \w
// colons (:) are allowed when used for emote modifiers
// use a regex with a capture group, so that we can preserve separators
var words = this.data.split(/(\s+)/g);
// non-emoteable words, for building a new text node if necessary
var nonEmote = [];
// whether the text in this node has been modified
var modified = false;
for (var i = 0; i < words.length; i += 2) {
// words[i] is our potential emote (+modifer)
// words[i+1] is a separator, or undefined
var res = /^([^:]*)(?::(.*))?$/.exec(words[i]);
// word is our potential emote
var word = res[1];
// modifier is an emote modifier, or undefined
var modifier = res[2];
var emote;
if (($.inArray(word, bemotes) == -1) && emoteSets.some(function (set) {
emote = set.createEmote(word, options);
return (emote !== undefined);
})) {
modified = true;
// Create a new text node from any previous text
sub.push(document.createTextNode(nonEmote.join("")));
// Clear out stored words
nonEmote = [];
// Apply any emote mods, if applicable
if (emoteModsEnabled && emoteMods.has(modifier)) {
emote.addClass("emote"+modifier);
}
// Add the emote element
sub.push(emote);
} else {
// Unrecognized as emote, keep the word
nonEmote.push(words[i]);
}
// Keep the separator
nonEmote.push(words[i+1]);
}
// If no emotes were found, leave this text node unchanged
if (modified) {
// Replace this node's contents with remaining text
this.data = nonEmote.join("");
}
$(this).before(sub);
});
return this;
};
// Parse emotes (of any style) in message text
$.fn.parseEmotes = function (emoteSets, options) {
if (emoteSets === undefined || emoteSets.length === 0) {
return this;
}
var standardSets = [];
var twitchSets = [];
emoteSets.forEach(function (set) {
if (set.emoteStyle === EmoteSet.emoteStyle.STANDARD) {
standardSets.push(set);
} else if (set.emoteStyle === EmoteSet.emoteStyle.TWITCH) {
twitchSets.push(set);
}
});
this.parseEmotesStandard(standardSets, options);
this.parseEmotesTwitch(twitchSets, options);
return this;
};
// Jumboify emotes/emoji appropriately
$.fn.jumboify = function (options) {
options = $.extend({}, $.fn.jumboify.defaults, options);
if (!options.forceJumbo) {
// Properly jumboify emotes/emoji in messages with no other text
this.has(".emoji").each(function () {
// Get the "edited" text, if any, regardless of how it's styled or localized
var edited = $(this).find(".edited").text();
// Get the remaining message text
var text = this.textContent.replace(edited, "").trim();
if (text.length === 0) {
$(this).find(".emoji").addClass("jumboable");
} else {
$(this).find(".emoji").removeClass("jumboable");
}
});
} else {
// Everything is jumboified, similar to old behavior
this.find(".emoji").addClass("jumboable");
}
return this;
};
$.fn.jumboify.defaults = {
forceJumbo: false,
};
// Replace title text with fancy tooltips
$.fn.fancyTooltip = function () {
return this.filter("[title]").each(function () {
var title = $(this).attr("title");
$(this).addClass("kawaii-fancytooltip").removeAttr("title");
$(this).on("mouseover.fancyTooltip", function () {
// Create and insert tooltip
var tooltip = $("<div>").append(title).addClass("tooltip tooltip-top tooltip-brand");
$(".tooltips").append(tooltip);
// Position the tooltip
var position = $(this).offset();
position.top -= 30;
position.left += $(this).width()/2 - tooltip.width()/2 - 10;
tooltip.offset(position);
// Set a handler to destroy the tooltip
$(this).on("mouseout.fancyTooltip", function () {
// remove this handler
$(this).off("mouseout.fancyTooltip");
tooltip.remove();
});
});
});
};
} // initJQueryPlugins
// Helper function for finding all elements matching selector affected by a mutation
function mutationFind(mutation, selector) {
var target = $(mutation.target), addedNodes = $(mutation.addedNodes);
var mutated = target.add(addedNodes).filter(selector);
var descendants = addedNodes.find(selector);
var ancestors = target.parents(selector);
return mutated.add(descendants).add(ancestors);
}
// Helper function for finding all elements matching selector removed by a mutation
function mutationFindRemoved(mutation, selector) {
var removedNodes = $(mutation.removedNodes);
var mutated = removedNodes.filter(selector);
var descendants = removedNodes.find(selector);
return mutated.add(descendants);
}
// Revert all emotes
function revertEmotes() {
// Swap every emote back to its original text
$(".kawaii-parseemotes").each(function() {
var emote = $(this);
emote.replaceWith(document.createTextNode(emote.attr("alt")));
});
}
// Parse the messages for given emote sets
function parseEmoteSets(messages, sets) {
// Figure out whether we're scrolled to the bottom
var messagesContainer = $(".messages");
var atBottom = messagesContainer.scrollBottom() < 0.5;
// Process messages
messages.parseEmotes(sets, {allowWide: settings.allowWide});
if (settingsCookie["bda-es-6"]) {
messages.find(".kawaii-parseemotes[title]").fancyTooltip();
}
messages.jumboify({forceJumbo: settings.forceJumbo});
// Ensure we're still scrolled to the bottom if necessary
if (atBottom) {
messagesContainer.scrollBottom(0);
}
}
const activeEmoteSets = [];
// Settings updated, rebuild active emote sets and rescan for emotes if necessary
function updateSettings() {
const oldEmoteSets = activeEmoteSets.splice(0);
if (settingsCookie["bda-es-7"]) {
activeEmoteSets.push(twitchEmotes);
activeEmoteSets.push(twitchSubEmotes);
}
if (settingsCookie["bda-es-1"]) {
activeEmoteSets.push(ffzEmotes);
activeEmoteSets.push(ffzLegacyEmotes);
}
if (settingsCookie["bda-es-2"]) {
activeEmoteSets.push(bttvEmotes);
activeEmoteSets.push(bttvLegacyEmotes);
}
var modified = false;
if (activeEmoteSets.length !== oldEmoteSets.length) {
modified = true;
} else {
for (var i = 0; i < activeEmoteSets.length; i++) {
if (activeEmoteSets[i] !== oldEmoteSets[i]) {
modified = true;
break;
}
}
}
if (modified) {
reload();
}
}
function reload() {
revertEmotes();
var messages = $(".markup-2BOw-j, .message-content").not(":has(.message-content)");
parseEmoteSets(messages, activeEmoteSets);
}
kawaiiemotes.prototype.observer = function (mutation) {
// Get the set of messages affected by this mutation
var messages = mutationFind(mutation, ".markup-2BOw-j, .message-content").not(":has(.message-content)");
parseEmoteSets(messages, activeEmoteSets);
// Clean up any remaining tooltips
mutationFindRemoved(mutation, ".kawaii-fancytooltip").trigger("mouseout");
};
// Parse the whole document for a single emote set, if it is active
function parseEmoteSetIfActive(set) {
if (activeEmoteSets.indexOf(set) !== -1) {
var messages = $(".markup-2BOw-j, .message-content").not(":has(.message-content)");
parseEmoteSets(messages, [set]);
}
}
// Settings
// forceJumbo
// false - imitate Discord's behavior: emotes only "jumboable" when on a line with no other text
// true - similar to "classic" BD behavior: emotes and emoji are always "jumboable"
// allowWide
// false - all emotes are forced to a square aspect ratio
// true - wide emotes may expand horizontally to meet their intended aspect ratio
// highDpi
// false - always use the base emote size
// true - use srcset to specify high-DPI versions
// completionsMenu
// true - show tab-completion menu for "Twitch-style" emotes
// completionsDelay
// delay (ms) after typing has stopped before searching for completions
// completionsWindowSize
// maximum number of completions to show, and number of items to scroll on Page Up/Down
// completionsPreScroll
// minimum number of nearby items to show next to selected item when scrolling
var settings = {}, defaultSettings = {
forceJumbo: false,
allowWide: false,
highDpi: false,
completionsMenu: true,
};
// Load or store settings from localStorage
function localSettings(settings) {
if (settings === undefined) {
var localSettings;
try {
localSettings = bdPluginStorage.get("kawaiiemotes", "settings");
} catch (err) {
console.warn("KawaiiEmotes:", "unable to load settings:", err);
localSettings = null;
}
if (localSettings === null) {
// try to fall back to localStorage
try {
localSettings = JSON.parse(localStorage.kawaiiemotes);
} catch (err) {
localSettings = {};
}
bdPluginStorage.set("kawaiiemotes", "settings", localSettings);
}
return $.extend({}, defaultSettings, localSettings);
}
try {
bdPluginStorage.set("kawaiiemotes", "settings", settings);
} catch (err) {
console.warn("KawaiiEmotes:", "unable to save settings:", err);
}
}
kawaiiemotes.prototype.load = function () {
};
kawaiiemotes.prototype.unload = function () {
};
kawaiiemotes.prototype.start = function () {
initJQueryPlugins($);
settings = localSettings();
// Save these to be restored later
EmoteModule.prototype.oldObsCallback = EmoteModule.prototype.obsCallback;
settingsPanel.oldUpdateSettings = settingsPanel.updateSettings;
// Disable this, because this plugin's mutation observer handles it
EmoteModule.prototype.obsCallback = $.noop;
// Hook into these to notify when settings are updated
settingsPanel.updateSettings = function () {
this.oldUpdateSettings();
updateSettings();
};
updateSettings();
// Load the emote sets if necessary, and parse the document as they load
twitchEmotes.load({success: parseEmoteSetIfActive});
twitchSubEmotes.load({success: parseEmoteSetIfActive});
bttvEmotes.load({success: parseEmoteSetIfActive});
bttvLegacyEmotes.load({success: parseEmoteSetIfActive});
ffzEmotes.load({success: parseEmoteSetIfActive});
ffzLegacyEmotes.load({success: parseEmoteSetIfActive});
startTabComplete(activeEmoteSets, settings);
};
kawaiiemotes.prototype.stop = function () {
// Restore these
EmoteModule.prototype.obsCallback = EmoteModule.prototype.oldObsCallback;
settingsPanel.updateSettings = settingsPanel.oldUpdateSettings;
revertEmotes();
stopTabComplete();
localSettings(settings);
};
kawaiiemotes.prototype.getSettingsPanel = function () {
var panel = topPanel();
var completionControls = controlGroups().appendTo(panel);
var completionMainControl = controlGroup({label: "Tab-completion"})
.appendTo(completionControls)
.append(checkboxGroup({
callback: state => {
localSettings(settings);
stopTabComplete();
startTabComplete(activeEmoteSets, settings);
},
items: [
{
label: "Show tab-completion menu for BetterDiscord emotes.",
checked: settings.completionsMenu,
callback: state => { settings.completionsMenu = state; },
},
],
}));
var appearanceControls = controlGroups().appendTo(panel);
var tweaksControl = controlGroup({label: "Appearance Tweaks (Experimental)"})
.appendTo(appearanceControls)
.append(checkboxGroup({
callback: state => {
localSettings(settings);
reload();
},
items: [
{
label: "Always Jumboify emotes.",
help: "Emotes and emoji are always jumbo-sized, regardless of whether the message contains any other text.",
checked: settings.forceJumbo,
callback: state => { settings.forceJumbo = state; },
},
{
label: "Allow wide-format emotes.",
help: "Let FFZ's wide-format emotes blow up your line lengths.",
checked: settings.allowWide,
callback: state => { settings.allowWide = state; },
},
{
label: "Use High-DPI Emotes when available. (soon™)",
checked: settings.highDpi,
callback: state => { settings.highDpi = state; },
disabled: true,
},
],
}));
return panel[0];
};
kawaiiemotes.prototype.getName = function () {
return "KawaiiEmotes";
};
kawaiiemotes.prototype.getDescription = function () {
return "Better emote parsing for BetterDiscord";
};
kawaiiemotes.prototype.getVersion = function () {
return "0.4.8";
};
kawaiiemotes.prototype.getAuthor = function () {
return "noodlebox";
};
})();
/*@end @*/
| {
"content_hash": "d926e16edca702e41ecda52f77bd9ec7",
"timestamp": "",
"source": "github",
"line_count": 1500,
"max_line_length": 200,
"avg_line_length": 38.07333333333333,
"alnum_prop": 0.5210821222202766,
"repo_name": "Brettm12345/dotfiles",
"id": "2b46136a1734ac370777b143e9aea9a18a5dd377",
"size": "57112",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "BetterDiscord/plugins/KawaiiEmotes.plugin.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "1469614"
},
{
"name": "HTML",
"bytes": "15056"
},
{
"name": "JavaScript",
"bytes": "1669629"
},
{
"name": "Lua",
"bytes": "315383"
},
{
"name": "Python",
"bytes": "80804"
},
{
"name": "Shell",
"bytes": "226684"
}
],
"symlink_target": ""
} |
/*--------------------------------------------------------------------------*
*
* footerFixed.js
*
* MIT-style license.
*
* 2007 Kazuma Nishihata [to-R]
* http://blog.webcreativepark.net
*
*--------------------------------------------------------------------------*/
new function(){
var footerId = "fixfooter";
//メイン
function footerFixed(){
//ドキュメントの高さ
var dh = document.getElementsByTagName("body")[0].clientHeight;
var dw = document.getElementsByTagName("body")[0].clientHeight;
//フッターのtopからの位置
document.getElementById(footerId).style.top = "0px";
var ft = document.getElementById(footerId).offsetTop;
//フッターの高さ
var fh = document.getElementById(footerId).offsetHeight;
document.getElementById(footerId).style.width = dw;
//ウィンドウの高さ
if (window.innerHeight){
var wh = window.innerHeight;
}else if(document.documentElement && document.documentElement.clientHeight != 0){
var wh = document.documentElement.clientHeight;
}
if(ft+fh<wh){
document.getElementById(footerId).style.position = "relative";
document.getElementById(footerId).style.top = (wh-fh-ft-1)+"px";
}
}
//文字サイズ
function checkFontSize(func){
//判定要素の追加
var e = document.createElement("div");
var s = document.createTextNode("S");
e.appendChild(s);
e.style.visibility="hidden"
e.style.position="absolute"
e.style.top="0"
document.body.appendChild(e);
var defHeight = e.offsetHeight;
//判定関数
function checkBoxSize(){
if(defHeight != e.offsetHeight){
func();
defHeight= e.offsetHeight;
}
}
setInterval(checkBoxSize,1000)
}
//イベントリスナー
function addEvent(elm,listener,fn){
try{
elm.addEventListener(listener,fn,false);
}catch(e){
elm.attachEvent("on"+listener,fn);
}
}
addEvent(window,"load",footerFixed);
addEvent(window,"load",function(){
checkFontSize(footerFixed);
});
addEvent(window,"resize",footerFixed);
}
| {
"content_hash": "de59d0be114c8285d12b362c406a6eba",
"timestamp": "",
"source": "github",
"line_count": 76,
"max_line_length": 83,
"avg_line_length": 25.210526315789473,
"alnum_prop": 0.6351774530271399,
"repo_name": "KarasawaTakahiro/BizTech",
"id": "32ee211b98c7232cad26adbb15361343558c70ce",
"size": "2038",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "public/assets/js/footerFixed.js",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "73532"
},
{
"name": "JavaScript",
"bytes": "33409"
},
{
"name": "PHP",
"bytes": "155853"
}
],
"symlink_target": ""
} |
$(function () {
module("bootstrap-buttons")
test("should be defined on jquery object", function () {
ok($(document.body).button, 'button method is defined')
})
test("should return element", function () {
ok($(document.body).button()[0] == document.body, 'document.body returned')
})
test("should return set state to loading", function () {
var btn = $('<button class="btn" data-loading-text="fat">mdo</button>')
equals(btn.html(), 'mdo', 'btn text equals mdo')
btn.button('loading')
equals(btn.html(), 'fat', 'btn text equals fat')
stop()
setTimeout(function () {
ok(btn.attr('disabled'), 'btn is disabled')
ok(btn.hasClass('disabled'), 'btn has disabled class')
start()
}, 0)
})
test("should return reset state", function () {
var btn = $('<button class="btn" data-loading-text="fat">mdo</button>')
equals(btn.html(), 'mdo', 'btn text equals mdo')
btn.button('loading')
equals(btn.html(), 'fat', 'btn text equals fat')
stop()
setTimeout(function () {
ok(btn.attr('disabled'), 'btn is disabled')
ok(btn.hasClass('disabled'), 'btn has disabled class')
start()
stop()
}, 0)
btn.button('reset')
equals(btn.html(), 'mdo', 'btn text equals mdo')
setTimeout(function () {
ok(!btn.attr('disabled'), 'btn is not disabled')
ok(!btn.hasClass('disabled'), 'btn does not have disabled class')
start()
}, 0)
})
test("should toggle active", function () {
var btn = $('<button class="btn" data-loading-text="fat">mdo</button>')
ok(!btn.hasClass('active'), 'btn does not have active class')
btn.button('toggle')
ok(btn.hasClass('active'), 'btn has class active')
})
}) | {
"content_hash": "d6271fdbb0f91933f6525786fbda1b76",
"timestamp": "",
"source": "github",
"line_count": 54,
"max_line_length": 83,
"avg_line_length": 35.46296296296296,
"alnum_prop": 0.5472584856396867,
"repo_name": "oceatoon/yii-bootstrap",
"id": "8aed857e11acaff6c248336bd20ecca8ec28315e",
"size": "1915",
"binary": false,
"copies": "12",
"ref": "refs/heads/master",
"path": "lib/bootstrap/js/tests/unit/bootstrap-button.js",
"mode": "33188",
"license": "bsd-3-clause",
"language": [],
"symlink_target": ""
} |
<!DOCTYPE html>
<html dir="ltr" lang="en" style="overflow: hidden;padding: 0;margin: 0;">
<head>
<title>RecordRTC Extension</title>
</head>
<body style="padding: 0;margin: 0;overflow: hidden; text-align: center;">
<video style="height: 100%;margin: 0; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px;" autoplay playsinline muted></video>
<p style="font-size: 150%;"><b style="vertical-align: middle;">Recording:</b> <span style="vertical-align: middle;">00:00</span> <button style="vertical-align: middle;">Stop Recording</button></p>
<script src="video.js"></script>
</body>
</html> | {
"content_hash": "50a3831fed417b2fc7e75615d52f1b19",
"timestamp": "",
"source": "github",
"line_count": 11,
"max_line_length": 196,
"avg_line_length": 54.54545454545455,
"alnum_prop": 0.7066666666666667,
"repo_name": "muaz-khan/Chrome-Extensions",
"id": "5e7ad5cea95738f273451b863c77e131e8134b9b",
"size": "602",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "screen-recording/video.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "88789"
},
{
"name": "JavaScript",
"bytes": "825798"
}
],
"symlink_target": ""
} |
#ifndef itkVotingBinaryIterativeHoleFillingImageFilter_h
#define itkVotingBinaryIterativeHoleFillingImageFilter_h
#include "itkVotingBinaryHoleFillingImageFilter.h"
namespace itk
{
/**
* \class VotingBinaryIterativeHoleFillingImageFilter
* \brief Fills in holes and cavities by iteratively applying a voting operation.
*
* This filter uses internally the VotingBinaryHoleFillingImageFilter, and runs
* it iteratively until no pixels are being changed or until it reaches the
* maximum number of iterations. The purpose of the filter is to fill in holes
* of medium size (tens of pixels in radius). In principle the number of
* iterations is related to the size of the holes to be filled in. The larger
* the holes, the more iteration must be run with this filter in order to fill
* in the full hole. The size of the neighborhood is also related to the
* curvature of the hole borders and therefore the hole size. Note that as a
* collateral effect this filter may also fill in cavities in the external side
* of structures.
*
* This filter is templated over a single image type because the output image
* type must be the same as the input image type. This is required in order to
* make the iterations possible, since the output image of one iteration is
* taken as the input image for the next iteration.
*
* \sa Image
* \sa VotingBinaryImageFilter
* \sa VotingBinaryHoleFillingImageFilter
* \sa Neighborhood
* \sa NeighborhoodOperator
* \sa NeighborhoodIterator
*
* \ingroup IntensityImageFilters
* \ingroup ITKLabelVoting
*/
template <typename TImage>
class ITK_TEMPLATE_EXPORT VotingBinaryIterativeHoleFillingImageFilter : public ImageToImageFilter<TImage, TImage>
{
public:
ITK_DISALLOW_COPY_AND_MOVE(VotingBinaryIterativeHoleFillingImageFilter);
/** Convenient type alias for simplifying declarations. */
using InputImageType = TImage;
using OutputImageType = TImage;
/** Standard class type aliases. */
using Self = VotingBinaryIterativeHoleFillingImageFilter;
using Superclass = ImageToImageFilter<InputImageType, OutputImageType>;
using Pointer = SmartPointer<Self>;
using ConstPointer = SmartPointer<const Self>;
/** Method for creation through the object factory. */
itkNewMacro(Self);
/** Run-time type information (and related methods). */
itkTypeMacro(VotingBinaryIterativeHoleFillingImageFilter, ImageToImageFilter);
/** Type of the internal Voting filter that is going to be executed
iteratively */
using VotingFilterType = VotingBinaryHoleFillingImageFilter<InputImageType, OutputImageType>;
/** Image type alias support */
using InputPixelType = typename InputImageType::PixelType;
using OutputPixelType = typename OutputImageType::PixelType;
using InputImageRegionType = typename InputImageType::RegionType;
using OutputImageRegionType = typename OutputImageType::RegionType;
using InputSizeType = typename InputImageType::SizeType;
/** Maximum number of iterations. This filter is executed iteratively as
* long as at least one pixel has changed in a previous iteration, or until
* the maximum number of iterations has been reached. */
itkGetConstReferenceMacro(MaximumNumberOfIterations, unsigned int);
itkSetMacro(MaximumNumberOfIterations, unsigned int);
/** Number of iterations executed at any given time. This is useful at the
* end of the execution in order to verify how many iterations were
* performed. */
itkGetConstReferenceMacro(CurrentNumberOfIterations, unsigned int);
itkSetMacro(CurrentNumberOfIterations, unsigned int);
/** Set the radius of the neighborhood used to compute the median. */
itkSetMacro(Radius, InputSizeType);
/** Get the radius of the neighborhood used to compute the median */
itkGetConstReferenceMacro(Radius, InputSizeType);
/** Set the value associated with the Foreground (or the object) on
the binary input image and the Background . */
itkSetMacro(BackgroundValue, InputPixelType);
itkSetMacro(ForegroundValue, InputPixelType);
/** Get the value associated with the Foreground (or the object) on the
binary input image and the Background . */
itkGetConstReferenceMacro(BackgroundValue, InputPixelType);
itkGetConstReferenceMacro(ForegroundValue, InputPixelType);
/** Majority threshold. It is the number of pixels over 50% that will decide
* whether an OFF pixel will become ON or not. For example, if the
* neighborhood of a pixel has 124 pixels (excluding itself), the 50% will be
* 62, and if you set upd a Majority threshold of 5, that means that the
* filter will require 67 or more neighbor pixels to be ON in order to switch
* the current OFF pixel to ON. The default value is 1. */
itkGetConstReferenceMacro(MajorityThreshold, unsigned int);
itkSetMacro(MajorityThreshold, unsigned int);
/** Returns the number of pixels that changed when the filter was executed. */
itkGetConstReferenceMacro(NumberOfPixelsChanged, unsigned int);
#ifdef ITK_USE_CONCEPT_CHECKING
// Begin concept checking
itkConceptMacro(InputEqualityComparableCheck, (Concept::EqualityComparable<InputPixelType>));
itkConceptMacro(InputOStreamWritableeCheck, (Concept::OStreamWritable<InputPixelType>));
// End concept checking
#endif
protected:
VotingBinaryIterativeHoleFillingImageFilter();
~VotingBinaryIterativeHoleFillingImageFilter() override = default;
void
PrintSelf(std::ostream & os, Indent indent) const override;
/**
* \sa ImageToImageFilter::ThreadedGenerateData(),
* ImageToImageFilter::GenerateData() */
void
GenerateData() override;
private:
InputSizeType m_Radius;
InputPixelType m_ForegroundValue;
InputPixelType m_BackgroundValue;
unsigned int m_MaximumNumberOfIterations;
unsigned int m_CurrentNumberOfIterations;
unsigned int m_MajorityThreshold;
unsigned int m_NumberOfPixelsChanged;
};
} // end namespace itk
#ifndef ITK_MANUAL_INSTANTIATION
# include "itkVotingBinaryIterativeHoleFillingImageFilter.hxx"
#endif
#endif
| {
"content_hash": "e04d7ee1df8e4a9178b0e987a52d50a7",
"timestamp": "",
"source": "github",
"line_count": 150,
"max_line_length": 113,
"avg_line_length": 40.08,
"alnum_prop": 0.7796074517631404,
"repo_name": "richardbeare/ITK",
"id": "92bb2a506732c4930616e6643fc013606ebb6e1b",
"size": "6769",
"binary": false,
"copies": "5",
"ref": "refs/heads/master",
"path": "Modules/Segmentation/LabelVoting/include/itkVotingBinaryIterativeHoleFillingImageFilter.h",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C",
"bytes": "460926"
},
{
"name": "C++",
"bytes": "35344288"
},
{
"name": "CMake",
"bytes": "1651091"
},
{
"name": "CSS",
"bytes": "17428"
},
{
"name": "HTML",
"bytes": "8373"
},
{
"name": "JavaScript",
"bytes": "1522"
},
{
"name": "Objective-C++",
"bytes": "5647"
},
{
"name": "Perl",
"bytes": "6197"
},
{
"name": "Python",
"bytes": "678490"
},
{
"name": "SWIG",
"bytes": "53991"
},
{
"name": "Shell",
"bytes": "194950"
},
{
"name": "Tcl",
"bytes": "7953"
},
{
"name": "XSLT",
"bytes": "8640"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="UTF-8"?>
<CustomFieldTranslation xmlns="http://soap.sforce.com/2006/04/metadata">
<label>Estä kurssin poistaminen</label>
<name>Prevent_Course_Deletion__c</name>
</CustomFieldTranslation>
| {
"content_hash": "6a914c0a830d89c064115873dea9a399",
"timestamp": "",
"source": "github",
"line_count": 5,
"max_line_length": 72,
"avg_line_length": 45.2,
"alnum_prop": 0.7345132743362832,
"repo_name": "SalesforceFoundation/HEDAP",
"id": "79f536c85e0d9270cd81b82da92a52b5a1e948ca",
"size": "227",
"binary": false,
"copies": "1",
"ref": "refs/heads/feature/234",
"path": "force-app/main/default/objectTranslations/Hierarchy_Settings__c-fi/Prevent_Course_Deletion__c.fieldTranslation-meta.xml",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Apex",
"bytes": "1599605"
},
{
"name": "CSS",
"bytes": "621"
},
{
"name": "HTML",
"bytes": "145319"
},
{
"name": "JavaScript",
"bytes": "61802"
},
{
"name": "Python",
"bytes": "28442"
},
{
"name": "RobotFramework",
"bytes": "26714"
}
],
"symlink_target": ""
} |
namespace base {
namespace subtle {
// Memory barriers on ARM are funky, but the kernel is here to help:
//
// * ARMv5 didn't support SMP, there is no memory barrier instruction at
// all on this architecture, or when targeting its machine code.
//
// * Some ARMv6 CPUs support SMP. A full memory barrier can be produced by
// writing a random value to a very specific coprocessor register.
//
// * On ARMv7, the "dmb" instruction is used to perform a full memory
// barrier (though writing to the co-processor will still work).
// However, on single core devices (e.g. Nexus One, or Nexus S),
// this instruction will take up to 200 ns, which is huge, even though
// it's completely un-needed on these devices.
//
// * There is no easy way to determine at runtime if the device is
// single or multi-core. However, the kernel provides a useful helper
// function at a fixed memory address (0xffff0fa0), which will always
// perform a memory barrier in the most efficient way. I.e. on single
// core devices, this is an empty function that exits immediately.
// On multi-core devices, it implements a full memory barrier.
//
// * This source could be compiled to ARMv5 machine code that runs on a
// multi-core ARMv6 or ARMv7 device. In this case, memory barriers
// are needed for correct execution. Always call the kernel helper, even
// when targeting ARMv5TE.
//
inline void MemoryBarrier() {
#if defined(OS_LINUX) || defined(OS_ANDROID)
// Note: This is a function call, which is also an implicit compiler barrier.
typedef void (*KernelMemoryBarrierFunc)();
((KernelMemoryBarrierFunc)0xffff0fa0)();
#elif defined(OS_QNX)
__cpu_membarrier();
#else
#error MemoryBarrier() is not implemented on this platform.
#endif
}
// An ARM toolchain would only define one of these depending on which
// variant of the target architecture is being used. This tests against
// any known ARMv6 or ARMv7 variant, where it is possible to directly
// use ldrex/strex instructions to implement fast atomic operations.
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || \
defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || \
defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || \
defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) || \
defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__)
inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
Atomic32 old_value,
Atomic32 new_value) {
Atomic32 prev_value;
int reloop;
do {
// The following is equivalent to:
//
// prev_value = LDREX(ptr)
// reloop = 0
// if (prev_value != old_value)
// reloop = STREX(ptr, new_value)
__asm__ __volatile__(" ldrex %0, [%3]\n"
" mov %1, #0\n"
" cmp %0, %4\n"
#ifdef __thumb2__
" it eq\n"
#endif
" strexeq %1, %5, [%3]\n"
: "=&r"(prev_value), "=&r"(reloop), "+m"(*ptr)
: "r"(ptr), "r"(old_value), "r"(new_value)
: "cc", "memory");
} while (reloop != 0);
return prev_value;
}
inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
Atomic32 old_value,
Atomic32 new_value) {
Atomic32 result = NoBarrier_CompareAndSwap(ptr, old_value, new_value);
MemoryBarrier();
return result;
}
inline Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr,
Atomic32 old_value,
Atomic32 new_value) {
MemoryBarrier();
return NoBarrier_CompareAndSwap(ptr, old_value, new_value);
}
inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr,
Atomic32 increment) {
Atomic32 value;
int reloop;
do {
// Equivalent to:
//
// value = LDREX(ptr)
// value += increment
// reloop = STREX(ptr, value)
//
__asm__ __volatile__(" ldrex %0, [%3]\n"
" add %0, %0, %4\n"
" strex %1, %0, [%3]\n"
: "=&r"(value), "=&r"(reloop), "+m"(*ptr)
: "r"(ptr), "r"(increment)
: "cc", "memory");
} while (reloop);
return value;
}
inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
Atomic32 increment) {
// TODO(digit): Investigate if it's possible to implement this with
// a single MemoryBarrier() operation between the LDREX and STREX.
// See http://crbug.com/246514
MemoryBarrier();
Atomic32 result = NoBarrier_AtomicIncrement(ptr, increment);
MemoryBarrier();
return result;
}
inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr,
Atomic32 new_value) {
Atomic32 old_value;
int reloop;
do {
// old_value = LDREX(ptr)
// reloop = STREX(ptr, new_value)
__asm__ __volatile__(" ldrex %0, [%3]\n"
" strex %1, %4, [%3]\n"
: "=&r"(old_value), "=&r"(reloop), "+m"(*ptr)
: "r"(ptr), "r"(new_value)
: "cc", "memory");
} while (reloop != 0);
return old_value;
}
// This tests against any known ARMv5 variant.
#elif defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) || \
defined(__ARM_ARCH_5TE__) || defined(__ARM_ARCH_5TEJ__)
// The kernel also provides a helper function to perform an atomic
// compare-and-swap operation at the hard-wired address 0xffff0fc0.
// On ARMv5, this is implemented by a special code path that the kernel
// detects and treats specially when thread pre-emption happens.
// On ARMv6 and higher, it uses LDREX/STREX instructions instead.
//
// Note that this always perform a full memory barrier, there is no
// need to add calls MemoryBarrier() before or after it. It also
// returns 0 on success, and 1 on exit.
//
// Available and reliable since Linux 2.6.24. Both Android and ChromeOS
// use newer kernel revisions, so this should not be a concern.
namespace {
inline int LinuxKernelCmpxchg(Atomic32 old_value,
Atomic32 new_value,
volatile Atomic32* ptr) {
typedef int (*KernelCmpxchgFunc)(Atomic32, Atomic32, volatile Atomic32*);
return ((KernelCmpxchgFunc)0xffff0fc0)(old_value, new_value, ptr);
}
} // namespace
inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
Atomic32 old_value,
Atomic32 new_value) {
Atomic32 prev_value;
for (;;) {
prev_value = *ptr;
if (prev_value != old_value)
return prev_value;
if (!LinuxKernelCmpxchg(old_value, new_value, ptr))
return old_value;
}
}
inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr,
Atomic32 new_value) {
Atomic32 old_value;
do {
old_value = *ptr;
} while (LinuxKernelCmpxchg(old_value, new_value, ptr));
return old_value;
}
inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr,
Atomic32 increment) {
return Barrier_AtomicIncrement(ptr, increment);
}
inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
Atomic32 increment) {
for (;;) {
// Atomic exchange the old value with an incremented one.
Atomic32 old_value = *ptr;
Atomic32 new_value = old_value + increment;
if (!LinuxKernelCmpxchg(old_value, new_value, ptr)) {
// The exchange took place as expected.
return new_value;
}
// Otherwise, *ptr changed mid-loop and we need to retry.
}
}
inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
Atomic32 old_value,
Atomic32 new_value) {
Atomic32 prev_value;
for (;;) {
prev_value = *ptr;
if (prev_value != old_value) {
// Always ensure acquire semantics.
MemoryBarrier();
return prev_value;
}
if (!LinuxKernelCmpxchg(old_value, new_value, ptr))
return old_value;
}
}
inline Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr,
Atomic32 old_value,
Atomic32 new_value) {
// This could be implemented as:
// MemoryBarrier();
// return NoBarrier_CompareAndSwap();
//
// But would use 3 barriers per succesful CAS. To save performance,
// use Acquire_CompareAndSwap(). Its implementation guarantees that:
// - A succesful swap uses only 2 barriers (in the kernel helper).
// - An early return due to (prev_value != old_value) performs
// a memory barrier with no store, which is equivalent to the
// generic implementation above.
return Acquire_CompareAndSwap(ptr, old_value, new_value);
}
#else
# error "Your CPU's ARM architecture is not supported yet"
#endif
// NOTE: Atomicity of the following load and store operations is only
// guaranteed in case of 32-bit alignement of |ptr| values.
inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {
*ptr = value;
}
inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
*ptr = value;
MemoryBarrier();
}
inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) {
MemoryBarrier();
*ptr = value;
}
inline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) { return *ptr; }
inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) {
Atomic32 value = *ptr;
MemoryBarrier();
return value;
}
inline Atomic32 Release_Load(volatile const Atomic32* ptr) {
MemoryBarrier();
return *ptr;
}
} // namespace base::subtle
} // namespace base
#endif // CEF_INCLUDE_BASE_INTERNAL_CEF_ATOMICOPS_X86_GCC_H_
| {
"content_hash": "9ee12bc08976547b3157679aa1d1f12d",
"timestamp": "",
"source": "github",
"line_count": 279,
"max_line_length": 79,
"avg_line_length": 35.89964157706093,
"alnum_prop": 0.6051317891373802,
"repo_name": "kuscsik/chromiumembedded",
"id": "e187beebed15a62e240f174aa5fecc32a71dd695",
"size": "10514",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "include/base/internal/cef_atomicops_arm_gcc.h",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "C",
"bytes": "236657"
},
{
"name": "C++",
"bytes": "4737091"
},
{
"name": "Objective-C",
"bytes": "10778"
},
{
"name": "Objective-C++",
"bytes": "127420"
},
{
"name": "Python",
"bytes": "66551"
},
{
"name": "Shell",
"bytes": "87"
}
],
"symlink_target": ""
} |
#if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
#error "Only <gdk/gdk.h> can be included directly."
#endif
#ifndef __GDK_PANGO_H__
#define __GDK_PANGO_H__
#include <gdk/gdktypes.h>
G_BEGIN_DECLS
/* Pango interaction */
typedef struct _GdkPangoRenderer GdkPangoRenderer;
typedef struct _GdkPangoRendererClass GdkPangoRendererClass;
typedef struct _GdkPangoRendererPrivate GdkPangoRendererPrivate;
#define GDK_TYPE_PANGO_RENDERER (gdk_pango_renderer_get_type())
#define GDK_PANGO_RENDERER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PANGO_RENDERER, GdkPangoRenderer))
#define GDK_IS_PANGO_RENDERER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PANGO_RENDERER))
#define GDK_PANGO_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PANGO_RENDERER, GdkPangoRendererClass))
#define GDK_IS_PANGO_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PANGO_RENDERER))
#define GDK_PANGO_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PANGO_RENDERER, GdkPangoRendererClass))
/**
* GdkPangoRenderer:
*
* #GdkPangoRenderer is a subclass of #PangoRenderer used for rendering
* Pango objects into GDK drawables. The default renderer for a particular
* screen is obtained with gdk_pango_renderer_get_default(); Pango
* functions like pango_renderer_draw_layout() and
* pango_renderer_draw_layout_line() are then used to draw objects with
* the renderer.
*
* In most simple cases, applications can just use gdk_draw_layout(), and
* don't need to directly use #GdkPangoRenderer at all. Using the
* #GdkPangoRenderer directly is most useful when working with a
* transformation such as a rotation, because the Pango drawing functions
* take user space coordinates (coordinates before the transformation)
* instead of device coordinates.
*
* In certain cases it can be useful to subclass #GdkPangoRenderer. Examples
* of reasons to do this are to add handling of custom attributes by
* overriding 'prepare_run' or to do custom drawing of embedded objects
* by overriding 'draw_shape'.
*
* Since: 2.6
**/
struct _GdkPangoRenderer
{
/*< private >*/
PangoRenderer parent_instance;
GdkPangoRendererPrivate *priv;
};
/**
* GdkPangoRendererClass:
*
* #GdkPangoRenderer is the class structure for #GdkPangoRenderer.
*
* Since: 2.6
**/
struct _GdkPangoRendererClass
{
/*< private >*/
PangoRendererClass parent_class;
};
GType gdk_pango_renderer_get_type (void) G_GNUC_CONST;
PangoRenderer *gdk_pango_renderer_new (GdkScreen *screen);
PangoRenderer *gdk_pango_renderer_get_default (GdkScreen *screen);
void gdk_pango_renderer_set_drawable (GdkPangoRenderer *gdk_renderer,
GdkDrawable *drawable);
void gdk_pango_renderer_set_gc (GdkPangoRenderer *gdk_renderer,
GdkGC *gc);
void gdk_pango_renderer_set_stipple (GdkPangoRenderer *gdk_renderer,
PangoRenderPart part,
GdkBitmap *stipple);
void gdk_pango_renderer_set_override_color (GdkPangoRenderer *gdk_renderer,
PangoRenderPart part,
const GdkColor *color);
/************************************************************************/
PangoContext *gdk_pango_context_get_for_screen (GdkScreen *screen);
#ifndef GDK_MULTIHEAD_SAFE
PangoContext *gdk_pango_context_get (void);
#endif
#ifndef GDK_DISABLE_DEPRECATED
void gdk_pango_context_set_colormap (PangoContext *context,
GdkColormap *colormap);
#endif
/* Get a clip region to draw only part of a layout or
* line. index_ranges contains alternating range starts/stops. The
* region is the region which contains the given ranges, i.e. if you
* draw with the region as clip, only the given ranges are drawn.
*/
GdkRegion *gdk_pango_layout_line_get_clip_region (PangoLayoutLine *line,
gint x_origin,
gint y_origin,
const gint *index_ranges,
gint n_ranges);
GdkRegion *gdk_pango_layout_get_clip_region (PangoLayout *layout,
gint x_origin,
gint y_origin,
const gint *index_ranges,
gint n_ranges);
/* Attributes use to render insensitive text in GTK+. */
typedef struct _GdkPangoAttrStipple GdkPangoAttrStipple;
typedef struct _GdkPangoAttrEmbossed GdkPangoAttrEmbossed;
typedef struct _GdkPangoAttrEmbossColor GdkPangoAttrEmbossColor;
struct _GdkPangoAttrStipple
{
PangoAttribute attr;
GdkBitmap *stipple;
};
struct _GdkPangoAttrEmbossed
{
PangoAttribute attr;
gboolean embossed;
};
struct _GdkPangoAttrEmbossColor
{
PangoAttribute attr;
PangoColor color;
};
PangoAttribute *gdk_pango_attr_stipple_new (GdkBitmap *stipple);
PangoAttribute *gdk_pango_attr_embossed_new (gboolean embossed);
PangoAttribute *gdk_pango_attr_emboss_color_new (const GdkColor *color);
G_END_DECLS
#endif /* __GDK_FONT_H__ */
| {
"content_hash": "9d97400eb585f06de87e1ae346481933",
"timestamp": "",
"source": "github",
"line_count": 149,
"max_line_length": 126,
"avg_line_length": 36.395973154362416,
"alnum_prop": 0.6494560206527752,
"repo_name": "brucelane/Cinder-GStreamer",
"id": "39df0ef4d14f7479e5eccaa28fa2ff27727435a1",
"size": "6234",
"binary": false,
"copies": "22",
"ref": "refs/heads/master",
"path": "external/gstreamer/include/gtk-2.0/gdk/gdkpango.h",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "C++",
"bytes": "67745"
}
],
"symlink_target": ""
} |
package com.ee.imperator.test.map;
import java.util.Arrays;
import java.util.List;
import com.ee.imperator.map.Map;
import com.ee.imperator.map.MapProvider;
public class MemoryMapProvider implements MapProvider {
private static final Map INSTANCE = new SimpleMap();
@Override
public List<Map> getMaps() {
return Arrays.asList(INSTANCE);
}
@Override
public Map getMap(int id) {
if(id == 0) {
return INSTANCE;
}
return null;
}
}
| {
"content_hash": "17263a7d96407bed957e550f421744d7",
"timestamp": "",
"source": "github",
"line_count": 24,
"max_line_length": 55,
"avg_line_length": 19.75,
"alnum_prop": 0.689873417721519,
"repo_name": "Assumeru/Imperator4J",
"id": "8013cb58bd4a6a6901467d1a8d275b0347e29ba4",
"size": "474",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/test/java/com/ee/imperator/test/map/MemoryMapProvider.java",
"mode": "33261",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "14888"
},
{
"name": "HTML",
"bytes": "36976"
},
{
"name": "Java",
"bytes": "306346"
},
{
"name": "JavaScript",
"bytes": "75364"
}
],
"symlink_target": ""
} |
package org.pentaho.big.data.kettle.plugins.kafka;
import org.apache.kafka.clients.producer.Producer;
import org.pentaho.di.trans.step.BaseStepData;
import org.pentaho.di.trans.step.StepDataInterface;
public class KafkaProducerOutputData extends BaseStepData implements StepDataInterface {
Producer<Object, Object> kafkaProducer;
int keyFieldIndex;
int messageFieldIndex;
public KafkaProducerOutputData() {
super();
}
}
| {
"content_hash": "a11eac4dec8246ca5e243bb82af53dcf",
"timestamp": "",
"source": "github",
"line_count": 17,
"max_line_length": 88,
"avg_line_length": 25.823529411764707,
"alnum_prop": 0.7995444191343963,
"repo_name": "mkambol/big-data-plugin",
"id": "48272c831acb16078868211f9ef0708cc6a9aa64",
"size": "1351",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "kettle-plugins/kafka/src/main/java/org/pentaho/big/data/kettle/plugins/kafka/KafkaProducerOutputData.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "23"
},
{
"name": "Java",
"bytes": "4532315"
},
{
"name": "PigLatin",
"bytes": "11262"
}
],
"symlink_target": ""
} |
/* *
*
* Exporting module
*
* (c) 2010-2020 Torstein Honsi
*
* License: www.highcharts.com/license
*
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
*
* */
'use strict';
import Chart from '../parts/Chart.js';
import chartNavigationMixin from '../mixins/navigation.js';
import H from '../parts/Globals.js';
var doc = H.doc, isTouchDevice = H.isTouchDevice, win = H.win;
import O from '../parts/Options.js';
var defaultOptions = O.defaultOptions;
import SVGRenderer from '../parts/SVGRenderer.js';
import U from '../parts/Utilities.js';
var addEvent = U.addEvent, css = U.css, createElement = U.createElement, discardElement = U.discardElement, extend = U.extend, find = U.find, fireEvent = U.fireEvent, isObject = U.isObject, merge = U.merge, objectEach = U.objectEach, pick = U.pick, removeEvent = U.removeEvent, uniqueKey = U.uniqueKey;
/**
* Gets fired after a chart is printed through the context menu item or the
* Chart.print method.
*
* @callback Highcharts.ExportingAfterPrintCallbackFunction
*
* @param {Highcharts.Chart} chart
* The chart on which the event occured.
*
* @param {global.Event} event
* The event that occured.
*/
/**
* Gets fired before a chart is printed through the context menu item or the
* Chart.print method.
*
* @callback Highcharts.ExportingBeforePrintCallbackFunction
*
* @param {Highcharts.Chart} chart
* The chart on which the event occured.
*
* @param {global.Event} event
* The event that occured.
*/
/**
* Function to call if the offline-exporting module fails to export a chart on
* the client side.
*
* @callback Highcharts.ExportingErrorCallbackFunction
*
* @param {Highcharts.ExportingOptions} options
* The exporting options.
*
* @param {global.Error} err
* The error from the module.
*/
/**
* Definition for a menu item in the context menu.
*
* @interface Highcharts.ExportingMenuObject
*/ /**
* The text for the menu item.
*
* @name Highcharts.ExportingMenuObject#text
* @type {string|undefined}
*/ /**
* If internationalization is required, the key to a language string.
*
* @name Highcharts.ExportingMenuObject#textKey
* @type {string|undefined}
*/ /**
* The click handler for the menu item.
*
* @name Highcharts.ExportingMenuObject#onclick
* @type {Highcharts.EventCallbackFunction<Highcharts.Chart>|undefined}
*/ /**
* Indicates a separator line instead of an item.
*
* @name Highcharts.ExportingMenuObject#separator
* @type {boolean|undefined}
*/
/**
* Possible MIME types for exporting.
*
* @typedef {"image/png"|"image/jpeg"|"application/pdf"|"image/svg+xml"} Highcharts.ExportingMimeTypeValue
*/
// create shortcuts
var userAgent = win.navigator.userAgent, symbols = H.Renderer.prototype.symbols, isMSBrowser = /Edge\/|Trident\/|MSIE /.test(userAgent), isFirefoxBrowser = /firefox/i.test(userAgent);
// Add language
extend(defaultOptions.lang
/**
* @optionparent lang
*/
, {
/**
* Exporting module only. The text for the menu item to view the chart
* in full screen.
*
* @since 8.0.1
*
* @private
*/
viewFullscreen: 'View in full screen',
/**
* Exporting module only. The text for the menu item to exit the chart
* from full screen.
*
* @since 8.0.1
*
* @private
*/
exitFullscreen: 'Exit from full screen',
/**
* Exporting module only. The text for the menu item to print the chart.
*
* @since 3.0.1
* @requires modules/exporting
*
* @private
*/
printChart: 'Print chart',
/**
* Exporting module only. The text for the PNG download menu item.
*
* @since 2.0
* @requires modules/exporting
*
* @private
*/
downloadPNG: 'Download PNG image',
/**
* Exporting module only. The text for the JPEG download menu item.
*
* @since 2.0
* @requires modules/exporting
*
* @private
*/
downloadJPEG: 'Download JPEG image',
/**
* Exporting module only. The text for the PDF download menu item.
*
* @since 2.0
* @requires modules/exporting
*
* @private
*/
downloadPDF: 'Download PDF document',
/**
* Exporting module only. The text for the SVG download menu item.
*
* @since 2.0
* @requires modules/exporting
*
* @private
*/
downloadSVG: 'Download SVG vector image',
/**
* Exporting module menu. The tooltip title for the context menu holding
* print and export menu items.
*
* @since 3.0
* @requires modules/exporting
*
* @private
*/
contextButtonTitle: 'Chart context menu'
});
if (!defaultOptions.navigation) {
// Buttons and menus are collected in a separate config option set called
// 'navigation'. This can be extended later to add control buttons like
// zoom and pan right click menus.
/**
* A collection of options for buttons and menus appearing in the exporting
* module.
*
* @requires modules/exporting
* @optionparent navigation
*/
defaultOptions.navigation = {};
}
merge(true, defaultOptions.navigation, {
/**
* @optionparent navigation.buttonOptions
*
* @private
*/
buttonOptions: {
theme: {},
/**
* Whether to enable buttons.
*
* @sample highcharts/navigation/buttonoptions-enabled/
* Exporting module loaded but buttons disabled
*
* @type {boolean}
* @default true
* @since 2.0
* @apioption navigation.buttonOptions.enabled
*/
/**
* The pixel size of the symbol on the button.
*
* @sample highcharts/navigation/buttonoptions-height/
* Bigger buttons
*
* @since 2.0
*/
symbolSize: 14,
/**
* The x position of the center of the symbol inside the button.
*
* @sample highcharts/navigation/buttonoptions-height/
* Bigger buttons
*
* @since 2.0
*/
symbolX: 12.5,
/**
* The y position of the center of the symbol inside the button.
*
* @sample highcharts/navigation/buttonoptions-height/
* Bigger buttons
*
* @since 2.0
*/
symbolY: 10.5,
/**
* Alignment for the buttons.
*
* @sample highcharts/navigation/buttonoptions-align/
* Center aligned
*
* @type {Highcharts.AlignValue}
* @since 2.0
*/
align: 'right',
/**
* The pixel spacing between buttons.
*
* @since 2.0
*/
buttonSpacing: 3,
/**
* Pixel height of the buttons.
*
* @sample highcharts/navigation/buttonoptions-height/
* Bigger buttons
*
* @since 2.0
*/
height: 22,
/**
* A text string to add to the individual button.
*
* @sample highcharts/exporting/buttons-text/
* Full text button
* @sample highcharts/exporting/buttons-text-symbol/
* Combined symbol and text
*
* @type {string}
* @default null
* @since 3.0
* @apioption navigation.buttonOptions.text
*/
/**
* The vertical offset of the button's position relative to its
* `verticalAlign`.
*
* @sample highcharts/navigation/buttonoptions-verticalalign/
* Buttons at lower right
*
* @type {number}
* @default 0
* @since 2.0
* @apioption navigation.buttonOptions.y
*/
/**
* The vertical alignment of the buttons. Can be one of `"top"`,
* `"middle"` or `"bottom"`.
*
* @sample highcharts/navigation/buttonoptions-verticalalign/
* Buttons at lower right
*
* @type {Highcharts.VerticalAlignValue}
* @since 2.0
*/
verticalAlign: 'top',
/**
* The pixel width of the button.
*
* @sample highcharts/navigation/buttonoptions-height/
* Bigger buttons
*
* @since 2.0
*/
width: 24
}
});
// Presentational attributes
merge(true, defaultOptions.navigation
/**
* A collection of options for buttons and menus appearing in the exporting
* module.
*
* @optionparent navigation
*/
, {
/**
* CSS styles for the popup menu appearing by default when the export
* icon is clicked. This menu is rendered in HTML.
*
* @see In styled mode, the menu is styled with the `.highcharts-menu`
* class.
*
* @sample highcharts/navigation/menustyle/
* Light gray menu background
*
* @type {Highcharts.CSSObject}
* @default {"border": "1px solid #999999", "background": "#ffffff", "padding": "5px 0"}
* @since 2.0
*
* @private
*/
menuStyle: {
/** @ignore-option */
border: '1px solid #999999',
/** @ignore-option */
background: '#ffffff',
/** @ignore-option */
padding: '5px 0'
},
/**
* CSS styles for the individual items within the popup menu appearing
* by default when the export icon is clicked. The menu items are
* rendered in HTML. Font size defaults to `11px` on desktop and `14px`
* on touch devices.
*
* @see In styled mode, the menu items are styled with the
* `.highcharts-menu-item` class.
*
* @sample {highcharts} highcharts/navigation/menuitemstyle/
* Add a grey stripe to the left
*
* @type {Highcharts.CSSObject}
* @default {"padding": "0.5em 1em", "color": "#333333", "background": "none", "fontSize": "11px/14px", "transition": "background 250ms, color 250ms"}
* @since 2.0
*
* @private
*/
menuItemStyle: {
/** @ignore-option */
padding: '0.5em 1em',
/** @ignore-option */
color: '#333333',
/** @ignore-option */
background: 'none',
/** @ignore-option */
fontSize: isTouchDevice ? '14px' : '11px',
/** @ignore-option */
transition: 'background 250ms, color 250ms'
},
/**
* CSS styles for the hover state of the individual items within the
* popup menu appearing by default when the export icon is clicked. The
* menu items are rendered in HTML.
*
* @see In styled mode, the menu items are styled with the
* `.highcharts-menu-item` class.
*
* @sample highcharts/navigation/menuitemhoverstyle/
* Bold text on hover
*
* @type {Highcharts.CSSObject}
* @default {"background": "#335cad", "color": "#ffffff"}
* @since 2.0
*
* @private
*/
menuItemHoverStyle: {
/** @ignore-option */
background: '#335cad',
/** @ignore-option */
color: '#ffffff'
},
/**
* A collection of options for buttons appearing in the exporting
* module.
*
* In styled mode, the buttons are styled with the
* `.highcharts-contextbutton` and `.highcharts-button-symbol` classes.
*
* @requires modules/exporting
*
* @private
*/
buttonOptions: {
/**
* Fill color for the symbol within the button.
*
* @sample highcharts/navigation/buttonoptions-symbolfill/
* Blue symbol stroke for one of the buttons
*
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
* @since 2.0
*/
symbolFill: '#666666',
/**
* The color of the symbol's stroke or line.
*
* @sample highcharts/navigation/buttonoptions-symbolstroke/
* Blue symbol stroke
*
* @type {Highcharts.ColorString}
* @since 2.0
*/
symbolStroke: '#666666',
/**
* The pixel stroke width of the symbol on the button.
*
* @sample highcharts/navigation/buttonoptions-height/
* Bigger buttons
*
* @since 2.0
*/
symbolStrokeWidth: 3,
/**
* A configuration object for the button theme. The object accepts
* SVG properties like `stroke-width`, `stroke` and `fill`.
* Tri-state button styles are supported by the `states.hover` and
* `states.select` objects.
*
* @sample highcharts/navigation/buttonoptions-theme/
* Theming the buttons
*
* @requires modules/exporting
*
* @since 3.0
*/
theme: {
/**
* The default fill exists only to capture hover events.
*
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
* @default #ffffff
* @apioption navigation.buttonOptions.theme.fill
*/
/**
* Default stroke for the buttons.
* @type {Highcharts.ColorString}
* @default none
* @apioption navigation.buttonOptions.theme.stroke
*/
/**
* Padding for the button.
*/
padding: 5
}
}
});
// Add the export related options
/**
* Options for the exporting module. For an overview on the matter, see
* [the docs](https://www.highcharts.com/docs/export-module/export-module-overview).
*
* @requires modules/exporting
* @optionparent exporting
*/
defaultOptions.exporting = {
/**
* Experimental setting to allow HTML inside the chart (added through
* the `useHTML` options), directly in the exported image. This allows
* you to preserve complicated HTML structures like tables or bi-directional
* text in exported charts.
*
* Disclaimer: The HTML is rendered in a `foreignObject` tag in the
* generated SVG. The official export server is based on PhantomJS,
* which supports this, but other SVG clients, like Batik, does not
* support it. This also applies to downloaded SVG that you want to
* open in a desktop client.
*
* @type {boolean}
* @default false
* @since 4.1.8
* @apioption exporting.allowHTML
*/
/**
* Additional chart options to be merged into the chart before exporting to
* an image format. This does not apply to printing the chart via the export
* menu.
*
* For example, a common use case is to add data labels to improve
* readability of the exported chart, or to add a printer-friendly color
* scheme to exported PDFs.
*
* @sample {highcharts} highcharts/exporting/chartoptions-data-labels/
* Added data labels
* @sample {highstock} highcharts/exporting/chartoptions-data-labels/
* Added data labels
*
* @type {Highcharts.Options}
* @apioption exporting.chartOptions
*/
/**
* Whether to enable the exporting module. Disabling the module will
* hide the context button, but API methods will still be available.
*
* @sample {highcharts} highcharts/exporting/enabled-false/
* Exporting module is loaded but disabled
* @sample {highstock} highcharts/exporting/enabled-false/
* Exporting module is loaded but disabled
*
* @type {boolean}
* @default true
* @since 2.0
* @apioption exporting.enabled
*/
/**
* Function to call if the offline-exporting module fails to export
* a chart on the client side, and [fallbackToExportServer](
* #exporting.fallbackToExportServer) is disabled. If left undefined, an
* exception is thrown instead. Receives two parameters, the exporting
* options, and the error from the module.
*
* @see [fallbackToExportServer](#exporting.fallbackToExportServer)
*
* @type {Highcharts.ExportingErrorCallbackFunction}
* @since 5.0.0
* @requires modules/exporting
* @requires modules/offline-exporting
* @apioption exporting.error
*/
/**
* Whether or not to fall back to the export server if the offline-exporting
* module is unable to export the chart on the client side. This happens for
* certain browsers, and certain features (e.g.
* [allowHTML](#exporting.allowHTML)), depending on the image type exporting
* to. For very complex charts, it is possible that export can fail in
* browsers that don't support Blob objects, due to data URL length limits.
* It is recommended to define the [exporting.error](#exporting.error)
* handler if disabling fallback, in order to notify users in case export
* fails.
*
* @type {boolean}
* @default true
* @since 4.1.8
* @requires modules/exporting
* @requires modules/offline-exporting
* @apioption exporting.fallbackToExportServer
*/
/**
* The filename, without extension, to use for the exported chart.
*
* @sample {highcharts} highcharts/exporting/filename/
* Custom file name
* @sample {highstock} highcharts/exporting/filename/
* Custom file name
*
* @type {string}
* @default chart
* @since 2.0
* @apioption exporting.filename
*/
/**
* An object containing additional key value data for the POST form that
* sends the SVG to the export server. For example, a `target` can be set to
* make sure the generated image is received in another frame, or a custom
* `enctype` or `encoding` can be set.
*
* @type {Highcharts.HTMLAttributes}
* @since 3.0.8
* @apioption exporting.formAttributes
*/
/**
* Path where Highcharts will look for export module dependencies to
* load on demand if they don't already exist on `window`. Should currently
* point to location of [CanVG](https://github.com/canvg/canvg) library,
* [RGBColor.js](https://github.com/canvg/canvg),
* [jsPDF](https://github.com/yWorks/jsPDF) and
* [svg2pdf.js](https://github.com/yWorks/svg2pdf.js), required for client
* side export in certain browsers.
*
* @type {string}
* @default https://code.highcharts.com/{version}/lib
* @since 5.0.0
* @apioption exporting.libURL
*/
/**
* Analogous to [sourceWidth](#exporting.sourceWidth).
*
* @type {number}
* @since 3.0
* @apioption exporting.sourceHeight
*/
/**
* The width of the original chart when exported, unless an explicit
* [chart.width](#chart.width) is set, or a pixel width is set on the
* container. The width exported raster image is then multiplied by
* [scale](#exporting.scale).
*
* @sample {highcharts} highcharts/exporting/sourcewidth/
* Source size demo
* @sample {highstock} highcharts/exporting/sourcewidth/
* Source size demo
* @sample {highmaps} maps/exporting/sourcewidth/
* Source size demo
*
* @type {number}
* @since 3.0
* @apioption exporting.sourceWidth
*/
/**
* The pixel width of charts exported to PNG or JPG. As of Highcharts
* 3.0, the default pixel width is a function of the [chart.width](
* #chart.width) or [exporting.sourceWidth](#exporting.sourceWidth) and the
* [exporting.scale](#exporting.scale).
*
* @sample {highcharts} highcharts/exporting/width/
* Export to 200px wide images
* @sample {highstock} highcharts/exporting/width/
* Export to 200px wide images
*
* @type {number}
* @since 2.0
* @apioption exporting.width
*/
/**
* Default MIME type for exporting if `chart.exportChart()` is called
* without specifying a `type` option. Possible values are `image/png`,
* `image/jpeg`, `application/pdf` and `image/svg+xml`.
*
* @type {Highcharts.ExportingMimeTypeValue}
* @since 2.0
*/
type: 'image/png',
/**
* The URL for the server module converting the SVG string to an image
* format. By default this points to Highchart's free web service.
*
* @since 2.0
*/
url: 'https://export.highcharts.com/',
/**
* When printing the chart from the menu item in the burger menu, if
* the on-screen chart exceeds this width, it is resized. After printing
* or cancelled, it is restored. The default width makes the chart
* fit into typical paper format. Note that this does not affect the
* chart when printing the web page as a whole.
*
* @since 4.2.5
*/
printMaxWidth: 780,
/**
* Defines the scale or zoom factor for the exported image compared
* to the on-screen display. While for instance a 600px wide chart
* may look good on a website, it will look bad in print. The default
* scale of 2 makes this chart export to a 1200px PNG or JPG.
*
* @see [chart.width](#chart.width)
* @see [exporting.sourceWidth](#exporting.sourceWidth)
*
* @sample {highcharts} highcharts/exporting/scale/
* Scale demonstrated
* @sample {highstock} highcharts/exporting/scale/
* Scale demonstrated
* @sample {highmaps} maps/exporting/scale/
* Scale demonstrated
*
* @since 3.0
*/
scale: 2,
/**
* Options for the export related buttons, print and export. In addition
* to the default buttons listed here, custom buttons can be added.
* See [navigation.buttonOptions](#navigation.buttonOptions) for general
* options.
*
* @type {Highcharts.Dictionary<*>}
* @requires modules/exporting
*/
buttons: {
/**
* Options for the export button.
*
* In styled mode, export button styles can be applied with the
* `.highcharts-contextbutton` class.
*
* @declare Highcharts.ExportingButtonsOptionsObject
* @extends navigation.buttonOptions
* @requires modules/exporting
*/
contextButton: {
/**
* A click handler callback to use on the button directly instead of
* the popup menu.
*
* @sample highcharts/exporting/buttons-contextbutton-onclick/
* Skip the menu and export the chart directly
*
* @type {Function}
* @since 2.0
* @apioption exporting.buttons.contextButton.onclick
*/
/**
* See [navigation.buttonOptions.symbolFill](
* #navigation.buttonOptions.symbolFill).
*
* @type {Highcharts.ColorString}
* @default #666666
* @since 2.0
* @apioption exporting.buttons.contextButton.symbolFill
*/
/**
* The horizontal position of the button relative to the `align`
* option.
*
* @type {number}
* @default -10
* @since 2.0
* @apioption exporting.buttons.contextButton.x
*/
/**
* The class name of the context button.
*/
className: 'highcharts-contextbutton',
/**
* The class name of the menu appearing from the button.
*/
menuClassName: 'highcharts-contextmenu',
/**
* The symbol for the button. Points to a definition function in
* the `Highcharts.Renderer.symbols` collection. The default
* `exportIcon` function is part of the exporting module. Possible
* values are "circle", "square", "diamond", "triangle",
* "triangle-down", "menu", "menuball" or custom shape.
*
* @sample highcharts/exporting/buttons-contextbutton-symbol/
* Use a circle for symbol
* @sample highcharts/exporting/buttons-contextbutton-symbol-custom/
* Custom shape as symbol
*
* @type {Highcharts.SymbolKeyValue|"exportIcon"|"menu"|"menuball"|string}
* @since 2.0
*/
symbol: 'menu',
/**
* The key to a [lang](#lang) option setting that is used for the
* button's title tooltip. When the key is `contextButtonTitle`, it
* refers to [lang.contextButtonTitle](#lang.contextButtonTitle)
* that defaults to "Chart context menu".
*
* @since 6.1.4
*/
titleKey: 'contextButtonTitle',
/**
* This option is deprecated, use
* [titleKey](#exporting.buttons.contextButton.titleKey) instead.
*
* @deprecated
* @type {string}
* @apioption exporting.buttons.contextButton._titleKey
*/
/**
* A collection of strings pointing to config options for the menu
* items. The config options are defined in the
* `menuItemDefinitions` option.
*
* By default, there is the "View in full screen" and "Print" menu
* items, plus one menu item for each of the available export types.
*
* @sample {highcharts} highcharts/exporting/menuitemdefinitions/
* Menu item definitions
* @sample {highstock} highcharts/exporting/menuitemdefinitions/
* Menu item definitions
* @sample {highmaps} highcharts/exporting/menuitemdefinitions/
* Menu item definitions
*
* @type {Array<string>}
* @default ["viewFullscreen", "printChart", "separator", "downloadPNG", "downloadJPEG", "downloadPDF", "downloadSVG"]
* @since 2.0
*/
menuItems: [
'viewFullscreen',
'printChart',
'separator',
'downloadPNG',
'downloadJPEG',
'downloadPDF',
'downloadSVG'
]
}
},
/**
* An object consisting of definitions for the menu items in the context
* menu. Each key value pair has a `key` that is referenced in the
* [menuItems](#exporting.buttons.contextButton.menuItems) setting,
* and a `value`, which is an object with the following properties:
*
* - **onclick:** The click handler for the menu item
*
* - **text:** The text for the menu item
*
* - **textKey:** If internationalization is required, the key to a language
* string
*
* Custom text for the "exitFullScreen" can be set only in lang options
* (it is not a separate button).
*
* @sample {highcharts} highcharts/exporting/menuitemdefinitions/
* Menu item definitions
* @sample {highstock} highcharts/exporting/menuitemdefinitions/
* Menu item definitions
* @sample {highmaps} highcharts/exporting/menuitemdefinitions/
* Menu item definitions
*
*
* @type {Highcharts.Dictionary<Highcharts.ExportingMenuObject>}
* @default {"viewFullscreen": {}, "printChart": {}, "separator": {}, "downloadPNG": {}, "downloadJPEG": {}, "downloadPDF": {}, "downloadSVG": {}}
* @since 5.0.13
*/
menuItemDefinitions: {
/**
* @ignore
*/
viewFullscreen: {
textKey: 'viewFullscreen',
onclick: function () {
this.fullscreen.toggle();
}
},
/**
* @ignore
*/
printChart: {
textKey: 'printChart',
onclick: function () {
this.print();
}
},
/**
* @ignore
*/
separator: {
separator: true
},
/**
* @ignore
*/
downloadPNG: {
textKey: 'downloadPNG',
onclick: function () {
this.exportChart();
}
},
/**
* @ignore
*/
downloadJPEG: {
textKey: 'downloadJPEG',
onclick: function () {
this.exportChart({
type: 'image/jpeg'
});
}
},
/**
* @ignore
*/
downloadPDF: {
textKey: 'downloadPDF',
onclick: function () {
this.exportChart({
type: 'application/pdf'
});
}
},
/**
* @ignore
*/
downloadSVG: {
textKey: 'downloadSVG',
onclick: function () {
this.exportChart({
type: 'image/svg+xml'
});
}
}
}
};
/**
* Fires after a chart is printed through the context menu item or the
* `Chart.print` method.
*
* @sample highcharts/chart/events-beforeprint-afterprint/
* Rescale the chart to print
*
* @type {Highcharts.ExportingAfterPrintCallbackFunction}
* @since 4.1.0
* @context Highcharts.Chart
* @requires modules/exporting
* @apioption chart.events.afterPrint
*/
/**
* Fires before a chart is printed through the context menu item or
* the `Chart.print` method.
*
* @sample highcharts/chart/events-beforeprint-afterprint/
* Rescale the chart to print
*
* @type {Highcharts.ExportingBeforePrintCallbackFunction}
* @since 4.1.0
* @context Highcharts.Chart
* @requires modules/exporting
* @apioption chart.events.beforePrint
*/
/**
* The post utility
*
* @private
* @function Highcharts.post
* @param {string} url
* Post URL
* @param {object} data
* Post data
* @param {Highcharts.Dictionary<string>} [formAttributes]
* Additional attributes for the post request
* @return {void}
*/
H.post = function (url, data, formAttributes) {
// create the form
var form = createElement('form', merge({
method: 'post',
action: url,
enctype: 'multipart/form-data'
}, formAttributes), {
display: 'none'
}, doc.body);
// add the data
objectEach(data, function (val, name) {
createElement('input', {
type: 'hidden',
name: name,
value: val
}, null, form);
});
// submit
form.submit();
// clean up
discardElement(form);
};
if (H.isSafari) {
H.win.matchMedia('print').addListener(function (mqlEvent) {
if (!H.printingChart) {
return void 0;
}
if (mqlEvent.matches) {
H.printingChart.beforePrint();
}
else {
H.printingChart.afterPrint();
}
});
}
extend(Chart.prototype, /** @lends Highcharts.Chart.prototype */ {
/* eslint-disable no-invalid-this, valid-jsdoc */
/**
* Exporting module only. A collection of fixes on the produced SVG to
* account for expando properties, browser bugs, VML problems and other.
* Returns a cleaned SVG.
*
* @private
* @function Highcharts.Chart#sanitizeSVG
* @param {string} svg
* SVG code to sanitize
* @param {Highcharts.Options} options
* Chart options to apply
* @return {string}
* Sanitized SVG code
* @requires modules/exporting
*/
sanitizeSVG: function (svg, options) {
var split = svg.indexOf('</svg>') + 6, html = svg.substr(split);
// Remove any HTML added to the container after the SVG (#894, #9087)
svg = svg.substr(0, split);
// Move HTML into a foreignObject
if (options && options.exporting && options.exporting.allowHTML) {
if (html) {
html = '<foreignObject x="0" y="0" ' +
'width="' + options.chart.width + '" ' +
'height="' + options.chart.height + '">' +
'<body xmlns="http://www.w3.org/1999/xhtml">' +
html +
'</body>' +
'</foreignObject>';
svg = svg.replace('</svg>', html + '</svg>');
}
}
svg = svg
.replace(/zIndex="[^"]+"/g, '')
.replace(/symbolName="[^"]+"/g, '')
.replace(/jQuery[0-9]+="[^"]+"/g, '')
.replace(/url\(("|")(.*?)("|")\;?\)/g, 'url($2)')
.replace(/url\([^#]+#/g, 'url(#')
.replace(/<svg /, '<svg xmlns:xlink="http://www.w3.org/1999/xlink" ')
.replace(/ (|NS[0-9]+\:)href=/g, ' xlink:href=') // #3567
.replace(/\n/, ' ')
// Batik doesn't support rgba fills and strokes (#3095)
.replace(/(fill|stroke)="rgba\(([ 0-9]+,[ 0-9]+,[ 0-9]+),([ 0-9\.]+)\)"/g, // eslint-disable-line max-len
'$1="rgb($2)" $1-opacity="$3"')
// Replace HTML entities, issue #347
.replace(/ /g, '\u00A0') // no-break space
.replace(/­/g, '\u00AD'); // soft hyphen
// Further sanitize for oldIE
if (this.ieSanitizeSVG) {
svg = this.ieSanitizeSVG(svg);
}
return svg;
},
/**
* Return the unfiltered innerHTML of the chart container. Used as hook for
* plugins. In styled mode, it also takes care of inlining CSS style rules.
*
* @see Chart#getSVG
*
* @function Highcharts.Chart#getChartHTML
*
* @returns {string}
* The unfiltered SVG of the chart.
*
* @requires modules/exporting
*/
getChartHTML: function () {
if (this.styledMode) {
this.inlineStyles();
}
return this.container.innerHTML;
},
/**
* Return an SVG representation of the chart.
*
* @sample highcharts/members/chart-getsvg/
* View the SVG from a button
*
* @function Highcharts.Chart#getSVG
*
* @param {Highcharts.Options} [chartOptions]
* Additional chart options for the generated SVG representation. For
* collections like `xAxis`, `yAxis` or `series`, the additional
* options is either merged in to the original item of the same
* `id`, or to the first item if a common id is not found.
*
* @return {string}
* The SVG representation of the rendered chart.
*
* @fires Highcharts.Chart#event:getSVG
*
* @requires modules/exporting
*/
getSVG: function (chartOptions) {
var chart = this, chartCopy, sandbox, svg, seriesOptions, sourceWidth, sourceHeight, cssWidth, cssHeight,
// Copy the options and add extra options
options = merge(chart.options, chartOptions);
// Use userOptions to make the options chain in series right (#3881)
options.plotOptions = merge(chart.userOptions.plotOptions, chartOptions && chartOptions.plotOptions);
// ... and likewise with time, avoid that undefined time properties are
// merged over legacy global time options
options.time = merge(chart.userOptions.time, chartOptions && chartOptions.time);
// create a sandbox where a new chart will be generated
sandbox = createElement('div', null, {
position: 'absolute',
top: '-9999em',
width: chart.chartWidth + 'px',
height: chart.chartHeight + 'px'
}, doc.body);
// get the source size
cssWidth = chart.renderTo.style.width;
cssHeight = chart.renderTo.style.height;
sourceWidth = options.exporting.sourceWidth ||
options.chart.width ||
(/px$/.test(cssWidth) && parseInt(cssWidth, 10)) ||
(options.isGantt ? 800 : 600);
sourceHeight = options.exporting.sourceHeight ||
options.chart.height ||
(/px$/.test(cssHeight) && parseInt(cssHeight, 10)) ||
400;
// override some options
extend(options.chart, {
animation: false,
renderTo: sandbox,
forExport: true,
renderer: 'SVGRenderer',
width: sourceWidth,
height: sourceHeight
});
options.exporting.enabled = false; // hide buttons in print
delete options.data; // #3004
// prepare for replicating the chart
options.series = [];
chart.series.forEach(function (serie) {
seriesOptions = merge(serie.userOptions, {
animation: false,
enableMouseTracking: false,
showCheckbox: false,
visible: serie.visible
});
// Used for the navigator series that has its own option set
if (!seriesOptions.isInternal) {
options.series.push(seriesOptions);
}
});
// Assign an internal key to ensure a one-to-one mapping (#5924)
chart.axes.forEach(function (axis) {
if (!axis.userOptions.internalKey) { // #6444
axis.userOptions.internalKey = uniqueKey();
}
});
// generate the chart copy
chartCopy = new H.Chart(options, chart.callback);
// Axis options and series options (#2022, #3900, #5982)
if (chartOptions) {
['xAxis', 'yAxis', 'series'].forEach(function (coll) {
var collOptions = {};
if (chartOptions[coll]) {
collOptions[coll] = chartOptions[coll];
chartCopy.update(collOptions);
}
});
}
// Reflect axis extremes in the export (#5924)
chart.axes.forEach(function (axis) {
var axisCopy = find(chartCopy.axes, function (copy) {
return copy.options.internalKey ===
axis.userOptions.internalKey;
}), extremes = axis.getExtremes(), userMin = extremes.userMin, userMax = extremes.userMax;
if (axisCopy &&
((typeof userMin !== 'undefined' &&
userMin !== axisCopy.min) || (typeof userMax !== 'undefined' &&
userMax !== axisCopy.max))) {
axisCopy.setExtremes(userMin, userMax, true, false);
}
});
// Get the SVG from the container's innerHTML
svg = chartCopy.getChartHTML();
fireEvent(this, 'getSVG', { chartCopy: chartCopy });
svg = chart.sanitizeSVG(svg, options);
// free up memory
options = null;
chartCopy.destroy();
discardElement(sandbox);
return svg;
},
/**
* @private
* @function Highcharts.Chart#getSVGForExport
* @param {Highcharts.ExportingOptions} options
* @param {Highcharts.Options} chartOptions
* @return {string}
* @requires modules/exporting
*/
getSVGForExport: function (options, chartOptions) {
var chartExportingOptions = this.options.exporting;
return this.getSVG(merge({ chart: { borderRadius: 0 } }, chartExportingOptions.chartOptions, chartOptions, {
exporting: {
sourceWidth: ((options && options.sourceWidth) ||
chartExportingOptions.sourceWidth),
sourceHeight: ((options && options.sourceHeight) ||
chartExportingOptions.sourceHeight)
}
}));
},
/**
* Get the default file name used for exported charts. By default it creates
* a file name based on the chart title.
*
* @function Highcharts.Chart#getFilename
*
* @return {string} A file name without extension.
*
* @requires modules/exporting
*/
getFilename: function () {
var s = this.userOptions.title && this.userOptions.title.text, filename = this.options.exporting.filename;
if (filename) {
return filename.replace(/\//g, '-');
}
if (typeof s === 'string') {
filename = s
.toLowerCase()
.replace(/<\/?[^>]+(>|$)/g, '') // strip HTML tags
.replace(/[\s_]+/g, '-')
.replace(/[^a-z0-9\-]/g, '') // preserve only latin
.replace(/^[\-]+/g, '') // dashes in the start
.replace(/[\-]+/g, '-') // dashes in a row
.substr(0, 24)
.replace(/[\-]+$/g, ''); // dashes in the end;
}
if (!filename || filename.length < 5) {
filename = 'chart';
}
return filename;
},
/**
* Exporting module required. Submit an SVG version of the chart to a server
* along with some parameters for conversion.
*
* @sample highcharts/members/chart-exportchart/
* Export with no options
* @sample highcharts/members/chart-exportchart-filename/
* PDF type and custom filename
* @sample highcharts/members/chart-exportchart-custom-background/
* Different chart background in export
* @sample stock/members/chart-exportchart/
* Export with Highstock
*
* @function Highcharts.Chart#exportChart
*
* @param {Highcharts.ExportingOptions} exportingOptions
* Exporting options in addition to those defined in
* [exporting](https://api.highcharts.com/highcharts/exporting).
*
* @param {Highcharts.Options} chartOptions
* Additional chart options for the exported chart. For example a
* different background color can be added here, or `dataLabels` for
* export only.
*
* @return {void}
*
* @requires modules/exporting
*/
exportChart: function (exportingOptions, chartOptions) {
var svg = this.getSVGForExport(exportingOptions, chartOptions);
// merge the options
exportingOptions = merge(this.options.exporting, exportingOptions);
// do the post
H.post(exportingOptions.url, {
filename: exportingOptions.filename ? exportingOptions.filename.replace(/\//g, '-') : this.getFilename(),
type: exportingOptions.type,
// IE8 fails to post undefined correctly, so use 0
width: exportingOptions.width || 0,
scale: exportingOptions.scale,
svg: svg
}, exportingOptions.formAttributes);
},
/**
* Move the chart container(s) to another div.
*
* @function Highcharts#moveContainers
*
* @private
*
* @param {Highcharts.HTMLDOMElement} moveTo
* Move target
* @return {void}
*/
moveContainers: function (moveTo) {
var chart = this;
(chart.fixedDiv ? // When scrollablePlotArea is active (#9533)
[chart.fixedDiv, chart.scrollingContainer] :
[chart.container]).forEach(function (div) {
moveTo.appendChild(div);
});
},
/**
* Prepare chart and document before printing a chart.
*
* @function Highcharts#beforePrint
*
* @private
*
* @return {void}
*
* @fires Highcharts.Chart#event:beforePrint
*/
beforePrint: function () {
var chart = this, body = doc.body, printMaxWidth = chart.options.exporting.printMaxWidth, printReverseInfo = {
childNodes: body.childNodes,
origDisplay: [],
resetParams: void 0
};
var handleMaxWidth;
chart.isPrinting = true;
chart.pointer.reset(null, 0);
fireEvent(chart, 'beforePrint');
// Handle printMaxWidth
handleMaxWidth = printMaxWidth && chart.chartWidth > printMaxWidth;
if (handleMaxWidth) {
printReverseInfo.resetParams = [
chart.options.chart.width,
void 0,
false
];
chart.setSize(printMaxWidth, void 0, false);
}
// hide all body content
[].forEach.call(printReverseInfo.childNodes, function (node, i) {
if (node.nodeType === 1) {
printReverseInfo.origDisplay[i] = node.style.display;
node.style.display = 'none';
}
});
// pull out the chart
chart.moveContainers(body);
// Storage details for undo action after printing
chart.printReverseInfo = printReverseInfo;
},
/**
* Clena up after printing a chart.
*
* @function Highcharts#afterPrint
*
* @private
*
* @param {Highcharts.Chart} chart
* Chart that was (or suppose to be) printed
* @return {void}
*
* @fires Highcharts.Chart#event:afterPrint
*/
afterPrint: function () {
var chart = this;
if (!chart.printReverseInfo) {
return void 0;
}
var childNodes = chart.printReverseInfo.childNodes, origDisplay = chart.printReverseInfo.origDisplay, resetParams = chart.printReverseInfo.resetParams;
// put the chart back in
chart.moveContainers(chart.renderTo);
// restore all body content
[].forEach.call(childNodes, function (node, i) {
if (node.nodeType === 1) {
node.style.display = (origDisplay[i] || '');
}
});
chart.isPrinting = false;
// Reset printMaxWidth
if (resetParams) {
chart.setSize.apply(chart, resetParams);
}
delete chart.printReverseInfo;
delete H.printingChart;
fireEvent(chart, 'afterPrint');
},
/**
* Exporting module required. Clears away other elements in the page and
* prints the chart as it is displayed. By default, when the exporting
* module is enabled, a context button with a drop down menu in the upper
* right corner accesses this function.
*
* @sample highcharts/members/chart-print/
* Print from a HTML button
*
* @function Highcharts.Chart#print
*
* @return {void}
*
* @fires Highcharts.Chart#event:beforePrint
* @fires Highcharts.Chart#event:afterPrint
*
* @requires modules/exporting
*/
print: function () {
var chart = this;
if (chart.isPrinting) { // block the button while in printing mode
return;
}
H.printingChart = chart;
if (!H.isSafari) {
chart.beforePrint();
}
// Give the browser time to draw WebGL content, an issue that randomly
// appears (at least) in Chrome ~67 on the Mac (#8708).
setTimeout(function () {
win.focus(); // #1510
win.print();
// allow the browser to prepare before reverting
if (!H.isSafari) {
setTimeout(function () {
chart.afterPrint();
}, 1000);
}
}, 1);
},
/**
* Display a popup menu for choosing the export type.
*
* @private
* @function Highcharts.Chart#contextMenu
* @param {string} className
* An identifier for the menu.
* @param {Array<string|Highcharts.ExportingMenuObject>} items
* A collection with text and onclicks for the items.
* @param {number} x
* The x position of the opener button
* @param {number} y
* The y position of the opener button
* @param {number} width
* The width of the opener button
* @param {number} height
* The height of the opener button
* @return {void}
* @requires modules/exporting
*/
contextMenu: function (className, items, x, y, width, height, button) {
var chart = this, navOptions = chart.options.navigation, chartWidth = chart.chartWidth, chartHeight = chart.chartHeight, cacheName = 'cache-' + className, menu = chart[cacheName], menuPadding = Math.max(width, height), // for mouse leave detection
innerMenu, menuStyle;
// create the menu only the first time
if (!menu) {
// create a HTML element above the SVG
chart.exportContextMenu = chart[cacheName] = menu =
createElement('div', {
className: className
}, {
position: 'absolute',
zIndex: 1000,
padding: menuPadding + 'px',
pointerEvents: 'auto'
}, chart.fixedDiv || chart.container);
innerMenu = createElement('ul', { className: 'highcharts-menu' }, {
listStyle: 'none',
margin: 0,
padding: 0
}, menu);
// Presentational CSS
if (!chart.styledMode) {
css(innerMenu, extend({
MozBoxShadow: '3px 3px 10px #888',
WebkitBoxShadow: '3px 3px 10px #888',
boxShadow: '3px 3px 10px #888'
}, navOptions.menuStyle));
}
// hide on mouse out
menu.hideMenu = function () {
css(menu, { display: 'none' });
if (button) {
button.setState(0);
}
chart.openMenu = false;
css(chart.renderTo, { overflow: 'hidden' }); // #10361
U.clearTimeout(menu.hideTimer);
fireEvent(chart, 'exportMenuHidden');
};
// Hide the menu some time after mouse leave (#1357)
chart.exportEvents.push(addEvent(menu, 'mouseleave', function () {
menu.hideTimer = win.setTimeout(menu.hideMenu, 500);
}), addEvent(menu, 'mouseenter', function () {
U.clearTimeout(menu.hideTimer);
}),
// Hide it on clicking or touching outside the menu (#2258,
// #2335, #2407)
addEvent(doc, 'mouseup', function (e) {
if (!chart.pointer.inClass(e.target, className)) {
menu.hideMenu();
}
}), addEvent(menu, 'click', function () {
if (chart.openMenu) {
menu.hideMenu();
}
}));
// create the items
items.forEach(function (item) {
if (typeof item === 'string') {
item = chart.options.exporting
.menuItemDefinitions[item];
}
if (isObject(item, true)) {
var element;
if (item.separator) {
element = createElement('hr', null, null, innerMenu);
}
else {
element = createElement('li', {
className: 'highcharts-menu-item',
onclick: function (e) {
if (e) { // IE7
e.stopPropagation();
}
menu.hideMenu();
if (item.onclick) {
item.onclick
.apply(chart, arguments);
}
},
innerHTML: (item.text ||
chart.options.lang[item.textKey])
}, null, innerMenu);
if (!chart.styledMode) {
element.onmouseover = function () {
css(this, navOptions.menuItemHoverStyle);
};
element.onmouseout = function () {
css(this, navOptions.menuItemStyle);
};
css(element, extend({
cursor: 'pointer'
}, navOptions.menuItemStyle));
}
}
// Keep references to menu divs to be able to destroy them
chart.exportDivElements.push(element);
}
});
// Keep references to menu and innerMenu div to be able to destroy
// them
chart.exportDivElements.push(innerMenu, menu);
chart.exportMenuWidth = menu.offsetWidth;
chart.exportMenuHeight = menu.offsetHeight;
}
menuStyle = { display: 'block' };
// if outside right, right align it
if (x + chart.exportMenuWidth > chartWidth) {
menuStyle.right = (chartWidth - x - width - menuPadding) + 'px';
}
else {
menuStyle.left = (x - menuPadding) + 'px';
}
// if outside bottom, bottom align it
if (y + height + chart.exportMenuHeight > chartHeight &&
button.alignOptions.verticalAlign !== 'top') {
menuStyle.bottom = (chartHeight - y - menuPadding) + 'px';
}
else {
menuStyle.top = (y + height - menuPadding) + 'px';
}
css(menu, menuStyle);
css(chart.renderTo, { overflow: '' }); // #10361
chart.openMenu = true;
fireEvent(chart, 'exportMenuShown');
},
/**
* Add the export button to the chart, with options.
*
* @private
* @function Highcharts.Chart#addButton
* @param {Highcharts.NavigationButtonOptions} options
* @return {void}
* @requires modules/exporting
*/
addButton: function (options) {
var chart = this, renderer = chart.renderer, btnOptions = merge(chart.options.navigation.buttonOptions, options), onclick = btnOptions.onclick, menuItems = btnOptions.menuItems, symbol, button, symbolSize = btnOptions.symbolSize || 12;
if (!chart.btnCount) {
chart.btnCount = 0;
}
// Keeps references to the button elements
if (!chart.exportDivElements) {
chart.exportDivElements = [];
chart.exportSVGElements = [];
}
if (btnOptions.enabled === false) {
return;
}
var attr = btnOptions.theme, states = attr.states, hover = states && states.hover, select = states && states.select, callback;
if (!chart.styledMode) {
attr.fill = pick(attr.fill, '#ffffff');
attr.stroke = pick(attr.stroke, 'none');
}
delete attr.states;
if (onclick) {
callback = function (e) {
if (e) {
e.stopPropagation();
}
onclick.call(chart, e);
};
}
else if (menuItems) {
callback = function (e) {
// consistent with onclick call (#3495)
if (e) {
e.stopPropagation();
}
chart.contextMenu(button.menuClassName, menuItems, button.translateX, button.translateY, button.width, button.height, button);
button.setState(2);
};
}
if (btnOptions.text && btnOptions.symbol) {
attr.paddingLeft = pick(attr.paddingLeft, 25);
}
else if (!btnOptions.text) {
extend(attr, {
width: btnOptions.width,
height: btnOptions.height,
padding: 0
});
}
if (!chart.styledMode) {
attr['stroke-linecap'] = 'round';
attr.fill = pick(attr.fill, '#ffffff');
attr.stroke = pick(attr.stroke, 'none');
}
button = renderer
.button(btnOptions.text, 0, 0, callback, attr, hover, select)
.addClass(options.className)
.attr({
title: pick(chart.options.lang[btnOptions._titleKey || btnOptions.titleKey], '')
});
button.menuClassName = (options.menuClassName ||
'highcharts-menu-' + chart.btnCount++);
if (btnOptions.symbol) {
symbol = renderer
.symbol(btnOptions.symbol, btnOptions.symbolX - (symbolSize / 2), btnOptions.symbolY - (symbolSize / 2), symbolSize, symbolSize
// If symbol is an image, scale it (#7957)
, {
width: symbolSize,
height: symbolSize
})
.addClass('highcharts-button-symbol')
.attr({
zIndex: 1
})
.add(button);
if (!chart.styledMode) {
symbol.attr({
stroke: btnOptions.symbolStroke,
fill: btnOptions.symbolFill,
'stroke-width': btnOptions.symbolStrokeWidth || 1
});
}
}
button
.add(chart.exportingGroup)
.align(extend(btnOptions, {
width: button.width,
x: pick(btnOptions.x, chart.buttonOffset) // #1654
}), true, 'spacingBox');
chart.buttonOffset += ((button.width + btnOptions.buttonSpacing) *
(btnOptions.align === 'right' ? -1 : 1));
chart.exportSVGElements.push(button, symbol);
},
/**
* Destroy the export buttons.
* @private
* @function Highcharts.Chart#destroyExport
* @param {global.Event} [e]
* @return {void}
* @requires modules/exporting
*/
destroyExport: function (e) {
var chart = e ? e.target : this, exportSVGElements = chart.exportSVGElements, exportDivElements = chart.exportDivElements, exportEvents = chart.exportEvents, cacheName;
// Destroy the extra buttons added
if (exportSVGElements) {
exportSVGElements.forEach(function (elem, i) {
// Destroy and null the svg elements
if (elem) { // #1822
elem.onclick = elem.ontouchstart = null;
cacheName = 'cache-' + elem.menuClassName;
if (chart[cacheName]) {
delete chart[cacheName];
}
chart.exportSVGElements[i] = elem.destroy();
}
});
exportSVGElements.length = 0;
}
// Destroy the exporting group
if (chart.exportingGroup) {
chart.exportingGroup.destroy();
delete chart.exportingGroup;
}
// Destroy the divs for the menu
if (exportDivElements) {
exportDivElements.forEach(function (elem, i) {
// Remove the event handler
U.clearTimeout(elem.hideTimer); // #5427
removeEvent(elem, 'mouseleave');
// Remove inline events
chart.exportDivElements[i] =
elem.onmouseout =
elem.onmouseover =
elem.ontouchstart =
elem.onclick = null;
// Destroy the div by moving to garbage bin
discardElement(elem);
});
exportDivElements.length = 0;
}
if (exportEvents) {
exportEvents.forEach(function (unbind) {
unbind();
});
exportEvents.length = 0;
}
}
/* eslint-enable no-invalid-this, valid-jsdoc */
});
// These ones are translated to attributes rather than styles
SVGRenderer.prototype.inlineToAttributes = [
'fill',
'stroke',
'strokeLinecap',
'strokeLinejoin',
'strokeWidth',
'textAnchor',
'x',
'y'
];
// These CSS properties are not inlined. Remember camelCase.
SVGRenderer.prototype.inlineBlacklist = [
/-/,
/^(clipPath|cssText|d|height|width)$/,
/^font$/,
/[lL]ogical(Width|Height)$/,
/perspective/,
/TapHighlightColor/,
/^transition/,
/^length$/ // #7700
// /^text (border|color|cursor|height|webkitBorder)/
];
SVGRenderer.prototype.unstyledElements = [
'clipPath',
'defs',
'desc'
];
/**
* Analyze inherited styles from stylesheets and add them inline
*
* @private
* @function Highcharts.Chart#inlineStyles
* @return {void}
*
* @todo: What are the border styles for text about? In general, text has a lot
* of properties.
* @todo: Make it work with IE9 and IE10.
*
* @requires modules/exporting
*/
Chart.prototype.inlineStyles = function () {
var renderer = this.renderer, inlineToAttributes = renderer.inlineToAttributes, blacklist = renderer.inlineBlacklist, whitelist = renderer.inlineWhitelist, // For IE
unstyledElements = renderer.unstyledElements, defaultStyles = {}, dummySVG, iframe, iframeDoc;
// Create an iframe where we read default styles without pollution from this
// body
iframe = doc.createElement('iframe');
css(iframe, {
width: '1px',
height: '1px',
visibility: 'hidden'
});
doc.body.appendChild(iframe);
iframeDoc = iframe.contentWindow.document;
iframeDoc.open();
iframeDoc.write('<svg xmlns="http://www.w3.org/2000/svg"></svg>');
iframeDoc.close();
/**
* Make hyphenated property names out of camelCase
* @private
* @param {string} prop
* Property name in camelCase
* @return {string}
* Hyphenated property name
*/
function hyphenate(prop) {
return prop.replace(/([A-Z])/g, function (a, b) {
return '-' + b.toLowerCase();
});
}
/**
* Call this on all elements and recurse to children
* @private
* @param {Highcharts.HTMLDOMElement} node
* Element child
* @return {void}
*/
function recurse(node) {
var styles, parentStyles, cssText = '', dummy, styleAttr, blacklisted, whitelisted, i;
/**
* Check computed styles and whether they are in the white/blacklist for
* styles or atttributes.
* @private
* @param {string} val
* Style value
* @param {string} prop
* Style property name
* @return {void}
*/
function filterStyles(val, prop) {
// Check against whitelist & blacklist
blacklisted = whitelisted = false;
if (whitelist) {
// Styled mode in IE has a whitelist instead.
// Exclude all props not in this list.
i = whitelist.length;
while (i-- && !whitelisted) {
whitelisted = whitelist[i].test(prop);
}
blacklisted = !whitelisted;
}
// Explicitly remove empty transforms
if (prop === 'transform' && val === 'none') {
blacklisted = true;
}
i = blacklist.length;
while (i-- && !blacklisted) {
blacklisted = (blacklist[i].test(prop) ||
typeof val === 'function');
}
if (!blacklisted) {
// If parent node has the same style, it gets inherited, no need
// to inline it. Top-level props should be diffed against parent
// (#7687).
if ((parentStyles[prop] !== val || node.nodeName === 'svg') &&
defaultStyles[node.nodeName][prop] !== val) {
// Attributes
if (!inlineToAttributes ||
inlineToAttributes.indexOf(prop) !== -1) {
if (val) {
node.setAttribute(hyphenate(prop), val);
}
// Styles
}
else {
cssText += hyphenate(prop) + ':' + val + ';';
}
}
}
}
if (node.nodeType === 1 &&
unstyledElements.indexOf(node.nodeName) === -1) {
styles = win.getComputedStyle(node, null);
parentStyles = node.nodeName === 'svg' ?
{} :
win.getComputedStyle(node.parentNode, null);
// Get default styles from the browser so that we don't have to add
// these
if (!defaultStyles[node.nodeName]) {
/*
if (!dummySVG) {
dummySVG = doc.createElementNS(H.SVG_NS, 'svg');
dummySVG.setAttribute('version', '1.1');
doc.body.appendChild(dummySVG);
}
*/
dummySVG = iframeDoc.getElementsByTagName('svg')[0];
dummy = iframeDoc.createElementNS(node.namespaceURI, node.nodeName);
dummySVG.appendChild(dummy);
// Copy, so we can remove the node
defaultStyles[node.nodeName] = merge(win.getComputedStyle(dummy, null));
// Remove default fill, otherwise text disappears when exported
if (node.nodeName === 'text') {
delete defaultStyles.text.fill;
}
dummySVG.removeChild(dummy);
}
// Loop through all styles and add them inline if they are ok
if (isFirefoxBrowser || isMSBrowser) {
// Some browsers put lots of styles on the prototype
for (var p in styles) { // eslint-disable-line guard-for-in
filterStyles(styles[p], p);
}
}
else {
objectEach(styles, filterStyles);
}
// Apply styles
if (cssText) {
styleAttr = node.getAttribute('style');
node.setAttribute('style', (styleAttr ? styleAttr + ';' : '') + cssText);
}
// Set default stroke width (needed at least for IE)
if (node.nodeName === 'svg') {
node.setAttribute('stroke-width', '1px');
}
if (node.nodeName === 'text') {
return;
}
// Recurse
[].forEach.call(node.children || node.childNodes, recurse);
}
}
/**
* Remove the dummy objects used to get defaults
* @private
* @return {void}
*/
function tearDown() {
dummySVG.parentNode.removeChild(dummySVG);
}
recurse(this.container.querySelector('svg'));
tearDown();
};
symbols.menu = function (x, y, width, height) {
var arr = [
['M', x, y + 2.5],
['L', x + width, y + 2.5],
['M', x, y + height / 2 + 0.5],
['L', x + width, y + height / 2 + 0.5],
['M', x, y + height - 1.5],
['L', x + width, y + height - 1.5]
];
return arr;
};
symbols.menuball = function (x, y, width, height) {
var path = [], h = (height / 3) - 2;
path = path.concat(this.circle(width - h, y, h, h), this.circle(width - h, y + h + 4, h, h), this.circle(width - h, y + 2 * (h + 4), h, h));
return path;
};
/**
* Add the buttons on chart load
* @private
* @function Highcharts.Chart#renderExporting
* @return {void}
* @requires modules/exporting
*/
Chart.prototype.renderExporting = function () {
var chart = this, exportingOptions = chart.options.exporting, buttons = exportingOptions.buttons, isDirty = chart.isDirtyExporting || !chart.exportSVGElements;
chart.buttonOffset = 0;
if (chart.isDirtyExporting) {
chart.destroyExport();
}
if (isDirty && exportingOptions.enabled !== false) {
chart.exportEvents = [];
chart.exportingGroup = chart.exportingGroup ||
chart.renderer.g('exporting-group').attr({
zIndex: 3 // #4955, // #8392
}).add();
objectEach(buttons, function (button) {
chart.addButton(button);
});
chart.isDirtyExporting = false;
}
// Destroy the export elements at chart destroy
addEvent(chart, 'destroy', chart.destroyExport);
};
/* eslint-disable no-invalid-this */
// Add update methods to handle chart.update and chart.exporting.update and
// chart.navigation.update. These must be added to the chart instance rather
// than the Chart prototype in order to use the chart instance inside the update
// function.
addEvent(Chart, 'init', function () {
var chart = this;
/**
* @private
* @param {"exporting"|"navigation"} prop
* Property name in option root
* @param {Highcharts.ExportingOptions|Highcharts.NavigationOptions} options
* Options to update
* @param {boolean} [redraw=true]
* Whether to redraw
* @return {void}
*/
function update(prop, options, redraw) {
chart.isDirtyExporting = true;
merge(true, chart.options[prop], options);
if (pick(redraw, true)) {
chart.redraw();
}
}
chart.exporting = {
update: function (options, redraw) {
update('exporting', options, redraw);
}
};
// Register update() method for navigation. Can not be set the same way as
// for exporting, because navigation options are shared with bindings which
// has separate update() logic.
chartNavigationMixin.addUpdate(function (options, redraw) {
update('navigation', options, redraw);
}, chart);
});
/* eslint-enable no-invalid-this */
Chart.prototype.callbacks.push(function (chart) {
chart.renderExporting();
addEvent(chart, 'redraw', chart.renderExporting);
// Uncomment this to see a button directly below the chart, for quick
// testing of export
/*
var button, viewImage, viewSource;
if (!chart.renderer.forExport) {
viewImage = function () {
var div = doc.createElement('div');
div.innerHTML = chart.getSVGForExport();
chart.renderTo.parentNode.appendChild(div);
};
viewSource = function () {
var pre = doc.createElement('pre');
pre.innerHTML = chart.getSVGForExport()
.replace(/</g, '\n<')
.replace(/>/g, '>');
chart.renderTo.parentNode.appendChild(pre);
};
viewImage();
// View SVG Image
button = doc.createElement('button');
button.innerHTML = 'View SVG Image';
chart.renderTo.parentNode.appendChild(button);
button.onclick = viewImage;
// View SVG Source
button = doc.createElement('button');
button.innerHTML = 'View SVG Source';
chart.renderTo.parentNode.appendChild(button);
button.onclick = viewSource;
}
//*/
});
| {
"content_hash": "a1755a9ade3652728fda5c95da316f8d",
"timestamp": "",
"source": "github",
"line_count": 1996,
"max_line_length": 302,
"avg_line_length": 35.69839679358717,
"alnum_prop": 0.5471692817245347,
"repo_name": "cdnjs/cdnjs",
"id": "fbeea759d9a98fc696d2ee958c92ba29920a9598",
"size": "71254",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "ajax/libs/highcharts/8.1.2/es-modules/modules/exporting.src.js",
"mode": "33188",
"license": "mit",
"language": [],
"symlink_target": ""
} |
package remote_test
import (
. "github.com/cloudfoundry/bosh-utils/internal/github.com/onsi/ginkgo"
. "github.com/cloudfoundry/bosh-utils/internal/github.com/onsi/ginkgo/internal/remote"
. "github.com/cloudfoundry/bosh-utils/internal/github.com/onsi/gomega"
"github.com/cloudfoundry/bosh-utils/internal/github.com/onsi/ginkgo/config"
"github.com/cloudfoundry/bosh-utils/internal/github.com/onsi/ginkgo/reporters"
"github.com/cloudfoundry/bosh-utils/internal/github.com/onsi/ginkgo/types"
"bytes"
"encoding/json"
"net/http"
)
var _ = Describe("Server", func() {
var (
server *Server
)
BeforeEach(func() {
var err error
server, err = NewServer(3)
Ω(err).ShouldNot(HaveOccurred())
server.Start()
})
AfterEach(func() {
server.Close()
})
Describe("Streaming endpoints", func() {
var (
reporterA, reporterB *reporters.FakeReporter
forwardingReporter *ForwardingReporter
suiteSummary *types.SuiteSummary
setupSummary *types.SetupSummary
specSummary *types.SpecSummary
)
BeforeEach(func() {
reporterA = reporters.NewFakeReporter()
reporterB = reporters.NewFakeReporter()
server.RegisterReporters(reporterA, reporterB)
forwardingReporter = NewForwardingReporter(server.Address(), &http.Client{}, &fakeOutputInterceptor{})
suiteSummary = &types.SuiteSummary{
SuiteDescription: "My Test Suite",
}
setupSummary = &types.SetupSummary{
State: types.SpecStatePassed,
}
specSummary = &types.SpecSummary{
ComponentTexts: []string{"My", "Spec"},
State: types.SpecStatePassed,
}
})
It("should make its address available", func() {
Ω(server.Address()).Should(MatchRegexp(`http://127.0.0.1:\d{2,}`))
})
Describe("/SpecSuiteWillBegin", func() {
It("should decode and forward the Ginkgo config and suite summary", func(done Done) {
forwardingReporter.SpecSuiteWillBegin(config.GinkgoConfig, suiteSummary)
Ω(reporterA.Config).Should(Equal(config.GinkgoConfig))
Ω(reporterB.Config).Should(Equal(config.GinkgoConfig))
Ω(reporterA.BeginSummary).Should(Equal(suiteSummary))
Ω(reporterB.BeginSummary).Should(Equal(suiteSummary))
close(done)
})
})
Describe("/BeforeSuiteDidRun", func() {
It("should decode and forward the setup summary", func() {
forwardingReporter.BeforeSuiteDidRun(setupSummary)
Ω(reporterA.BeforeSuiteSummary).Should(Equal(setupSummary))
Ω(reporterB.BeforeSuiteSummary).Should(Equal(setupSummary))
})
})
Describe("/AfterSuiteDidRun", func() {
It("should decode and forward the setup summary", func() {
forwardingReporter.AfterSuiteDidRun(setupSummary)
Ω(reporterA.AfterSuiteSummary).Should(Equal(setupSummary))
Ω(reporterB.AfterSuiteSummary).Should(Equal(setupSummary))
})
})
Describe("/SpecWillRun", func() {
It("should decode and forward the spec summary", func(done Done) {
forwardingReporter.SpecWillRun(specSummary)
Ω(reporterA.SpecWillRunSummaries[0]).Should(Equal(specSummary))
Ω(reporterB.SpecWillRunSummaries[0]).Should(Equal(specSummary))
close(done)
})
})
Describe("/SpecDidComplete", func() {
It("should decode and forward the spec summary", func(done Done) {
forwardingReporter.SpecDidComplete(specSummary)
Ω(reporterA.SpecSummaries[0]).Should(Equal(specSummary))
Ω(reporterB.SpecSummaries[0]).Should(Equal(specSummary))
close(done)
})
})
Describe("/SpecSuiteDidEnd", func() {
It("should decode and forward the suite summary", func(done Done) {
forwardingReporter.SpecSuiteDidEnd(suiteSummary)
Ω(reporterA.EndSummary).Should(Equal(suiteSummary))
Ω(reporterB.EndSummary).Should(Equal(suiteSummary))
close(done)
})
})
})
Describe("Synchronization endpoints", func() {
Describe("GETting and POSTing BeforeSuiteState", func() {
getBeforeSuite := func() types.RemoteBeforeSuiteData {
resp, err := http.Get(server.Address() + "/BeforeSuiteState")
Ω(err).ShouldNot(HaveOccurred())
Ω(resp.StatusCode).Should(Equal(http.StatusOK))
r := types.RemoteBeforeSuiteData{}
decoder := json.NewDecoder(resp.Body)
err = decoder.Decode(&r)
Ω(err).ShouldNot(HaveOccurred())
return r
}
postBeforeSuite := func(r types.RemoteBeforeSuiteData) {
resp, err := http.Post(server.Address()+"/BeforeSuiteState", "application/json", bytes.NewReader(r.ToJSON()))
Ω(err).ShouldNot(HaveOccurred())
Ω(resp.StatusCode).Should(Equal(http.StatusOK))
}
Context("when the first node's Alive has not been registered yet", func() {
It("should return pending", func() {
state := getBeforeSuite()
Ω(state).Should(Equal(types.RemoteBeforeSuiteData{nil, types.RemoteBeforeSuiteStatePending}))
state = getBeforeSuite()
Ω(state).Should(Equal(types.RemoteBeforeSuiteData{nil, types.RemoteBeforeSuiteStatePending}))
})
})
Context("when the first node is Alive but has not responded yet", func() {
BeforeEach(func() {
server.RegisterAlive(1, func() bool {
return true
})
})
It("should return pending", func() {
state := getBeforeSuite()
Ω(state).Should(Equal(types.RemoteBeforeSuiteData{nil, types.RemoteBeforeSuiteStatePending}))
state = getBeforeSuite()
Ω(state).Should(Equal(types.RemoteBeforeSuiteData{nil, types.RemoteBeforeSuiteStatePending}))
})
})
Context("when the first node has responded", func() {
var state types.RemoteBeforeSuiteData
BeforeEach(func() {
server.RegisterAlive(1, func() bool {
return false
})
state = types.RemoteBeforeSuiteData{
Data: []byte("my data"),
State: types.RemoteBeforeSuiteStatePassed,
}
postBeforeSuite(state)
})
It("should return the passed in state", func() {
returnedState := getBeforeSuite()
Ω(returnedState).Should(Equal(state))
})
})
Context("when the first node is no longer Alive and has not responded yet", func() {
BeforeEach(func() {
server.RegisterAlive(1, func() bool {
return false
})
})
It("should return disappeared", func() {
state := getBeforeSuite()
Ω(state).Should(Equal(types.RemoteBeforeSuiteData{nil, types.RemoteBeforeSuiteStateDisappeared}))
state = getBeforeSuite()
Ω(state).Should(Equal(types.RemoteBeforeSuiteData{nil, types.RemoteBeforeSuiteStateDisappeared}))
})
})
})
Describe("GETting RemoteAfterSuiteData", func() {
getRemoteAfterSuiteData := func() bool {
resp, err := http.Get(server.Address() + "/RemoteAfterSuiteData")
Ω(err).ShouldNot(HaveOccurred())
Ω(resp.StatusCode).Should(Equal(http.StatusOK))
a := types.RemoteAfterSuiteData{}
decoder := json.NewDecoder(resp.Body)
err = decoder.Decode(&a)
Ω(err).ShouldNot(HaveOccurred())
return a.CanRun
}
Context("when there are unregistered nodes", func() {
BeforeEach(func() {
server.RegisterAlive(2, func() bool {
return false
})
})
It("should return false", func() {
Ω(getRemoteAfterSuiteData()).Should(BeFalse())
})
})
Context("when all none-node-1 nodes are still running", func() {
BeforeEach(func() {
server.RegisterAlive(2, func() bool {
return true
})
server.RegisterAlive(3, func() bool {
return false
})
})
It("should return false", func() {
Ω(getRemoteAfterSuiteData()).Should(BeFalse())
})
})
Context("when all none-1 nodes are done", func() {
BeforeEach(func() {
server.RegisterAlive(2, func() bool {
return false
})
server.RegisterAlive(3, func() bool {
return false
})
})
It("should return true", func() {
Ω(getRemoteAfterSuiteData()).Should(BeTrue())
})
})
})
})
})
| {
"content_hash": "74cfa7a0e1af051093f679e456bcea45",
"timestamp": "",
"source": "github",
"line_count": 269,
"max_line_length": 113,
"avg_line_length": 28.903345724907062,
"alnum_prop": 0.6834726688102893,
"repo_name": "voelzmo/bosh-release-info-workspace",
"id": "2918771cd1302e7c026d0c0c278033d467f39116",
"size": "7809",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "src/github.com/cloudfoundry/bosh-utils/internal/github.com/onsi/ginkgo/internal/remote/server_test.go",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Go",
"bytes": "2198264"
},
{
"name": "Protocol Buffer",
"bytes": "163"
},
{
"name": "Ruby",
"bytes": "974"
},
{
"name": "Shell",
"bytes": "2784"
}
],
"symlink_target": ""
} |
function escapeStr(str) {
return str
.replace(/\"/g, '\\"')
.replace(/\n/g, '\\n');
}
var renderItem = function(data) {
var lines = [
'### ' + data.title,
];
if (data.description !== undefined) {
lines.push(data.description);
}
lines = lines.concat(['```sh',
data.tip,
'```\n',
]);
if (Array.isArray(data.alternatives)) {
lines.push('__Alternatives:__');
data.alternatives.map(function(alternative){
lines = lines.concat(['```sh', alternative, '```\n'])
});
}
return lines.join('\n');
};
function render(data){
var data = data.data;
var lines = [
`\n## ${data.title}\n`,
];
lines = lines.concat(data.items.map(renderItem));
return lines.join('\n');
}
module.exports = render;
| {
"content_hash": "c6b8a35383153c93511c2e20cc49d486",
"timestamp": "",
"source": "github",
"line_count": 44,
"max_line_length": 59,
"avg_line_length": 17.34090909090909,
"alnum_prop": 0.5570117955439057,
"repo_name": "Imangazaliev/git-tips",
"id": "8b4808bc262f9cc0d88c82b5214570994969799d",
"size": "763",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": ".doxie.render.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "1502"
}
],
"symlink_target": ""
} |
package middleware;
public class UnifyingMiddleware {
private static QueryHandler queryHandler;
public synchronized static QueryHandler getQueryHandler() {
if (queryHandler == null) {
Configurator.init();
queryHandler = new QueryHandler();
}
return queryHandler;
}
}
| {
"content_hash": "dfc5029cb5516a40498eb3e43d50e9ce",
"timestamp": "",
"source": "github",
"line_count": 15,
"max_line_length": 60,
"avg_line_length": 19.2,
"alnum_prop": 0.7395833333333334,
"repo_name": "Junkern/UnifyingColumnStoreAccessor",
"id": "91e153f4171d0d6f6a5f479bfc5360e8ec757fa8",
"size": "288",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/middleware/UnifyingMiddleware.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "40674"
}
],
"symlink_target": ""
} |
@interface SortView : UIView
-(void) setupView: (NSString *)title type: (int) option_type value: (int) value;
@property int value;
@property int option_type;
@property BOOL selected;
-(void) setSelectedWithoutKvo;
@end
| {
"content_hash": "a95a9fe6e39ffed941fd70077025a413",
"timestamp": "",
"source": "github",
"line_count": 7,
"max_line_length": 84,
"avg_line_length": 34.142857142857146,
"alnum_prop": 0.6861924686192469,
"repo_name": "ptolts/dishgo_ios",
"id": "a98f439ca82ff92275868d7f25f62ad5766bcc23",
"size": "400",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Restaurants/SortView.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C++",
"bytes": "519"
},
{
"name": "Objective-C",
"bytes": "586967"
},
{
"name": "Ruby",
"bytes": "5052"
}
],
"symlink_target": ""
} |
/****************************************************************************/
/* */
/* The Mondo Libraries */
/* */
/* Namespace: Mondo.Common */
/* File: Config.cs */
/* Class(es): Config */
/* Purpose: Helper class for accessing data in the .config file */
/* file */
/* */
/* Original Author: Jim Lightfoot */
/* Creation Date: 29 Jun 2006 */
/* */
/* Copyright (c) 2006-2016 - Jim Lightfoot, All rights reserved */
/* */
/* Licensed under the MIT license: */
/* http://www.opensource.org/licenses/mit-license.php */
/* */
/****************************************************************************/
using System;
namespace Mondo.Common
{
/****************************************************************************/
/****************************************************************************/
public interface IConfig
{
string Get(string strAttrName, bool bRequired = false);
string Get(string strAttrName, string strDefault, bool bRequired = false);
void Set(string strAttrName, string strValue);
string GetConnectionString(string strName);
}
/****************************************************************************/
/****************************************************************************/
public static class ConfigExtensions
{
/****************************************************************************/
public static T Get<T>(this IConfig config, string strAttrName, T defaultVal = default(T), bool required = false) where T : struct
{
string val = config.Get(strAttrName, defaultVal.ToString(), required);
return(Utility.Convert<T>(val, defaultVal));
}
/****************************************************************************/
public static T GetSetting<T>(this ISettingsStore store, string name, T defaultVal = default(T)) where T : struct
{
object val = store.GetSetting(name);
if(val == null)
return defaultVal;
return(Utility.Convert<T>(val, defaultVal));
}
}
/****************************************************************************/
/****************************************************************************/
/// <summary>
/// Get values from web.config or app.config
/// </summary>
public static class Config
{
/****************************************************************************/
public static string Get(string strAttrName, bool bRequired = false)
{
return(Get(strAttrName, "", bRequired));
}
/****************************************************************************/
public class MissingEntry : Exception
{
public MissingEntry(string name) : base(string.Format("Config file missing entry for '{0}'", name))
{
}
}
/****************************************************************************/
public static string GetConnectionString(string strName)
{
System.Configuration.ConnectionStringSettings objConnectionString = System.Configuration.ConfigurationManager.ConnectionStrings[strName];
if(objConnectionString == null)
throw new Exception("Named connection string not found: " + strName);
return(objConnectionString.ConnectionString.Normalized());
}
/****************************************************************************/
public static string Get(string strAttrName, string strDefault, bool bRequired = false)
{
string strReturn = strDefault;
try
{
strReturn = System.Configuration.ConfigurationManager.AppSettings[strAttrName].Trim();
if(strReturn != "")
return(strReturn);
}
catch
{
}
if(bRequired)
throw new MissingEntry(strAttrName);
return(strReturn);
}
/****************************************************************************/
public static void Set(string strAttrName, string strValue)
{
System.Configuration.ConfigurationManager.AppSettings[strAttrName] = strValue;
}
/****************************************************************************/
public static T Get<T>(string strAttrName, T defaultVal = default(T), bool required = false) where T : struct
{
string val = Get(strAttrName, defaultVal.ToString(), required);
return(Utility.Convert<T>(val, defaultVal));
}
}
/****************************************************************************/
/* IConfig wrapper around Config class */
/****************************************************************************/
public class AppConfig : IConfig
{
/****************************************************************************/
public string Get(string strAttrName, bool bRequired = false)
{
return(Config.Get(strAttrName, bRequired));
}
/****************************************************************************/
public string Get(string strAttrName, string strDefault, bool bRequired = false)
{
return(Config.Get(strAttrName, strDefault, bRequired));
}
/****************************************************************************/
public void Set(string strAttrName, string strValue)
{
throw new NotImplementedException();
}
/****************************************************************************/
public string GetConnectionString(string strName)
{
return(Config.GetConnectionString(strName));
}
}
}
| {
"content_hash": "c72327d094125f3a5edf72b4c95b1809",
"timestamp": "",
"source": "github",
"line_count": 159,
"max_line_length": 149,
"avg_line_length": 40.56603773584906,
"alnum_prop": 0.37627906976744185,
"repo_name": "jim-lightfoot/mondo",
"id": "ee50f3db9c3e75386f15f1ff17178d628ecb039b",
"size": "6450",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Common/Config.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "752983"
},
{
"name": "XSLT",
"bytes": "7144"
}
],
"symlink_target": ""
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using IvmpDotNet.Imports;
namespace IvmpDotNet.Wrappings {
public class Player : IvmpDotNet.SDK.IPlayer {
public ushort PlayerId {
get;
set;
}
public bool IsConnected {
get { return Imports.Players.Players_IsConnected(this.PlayerId); }
}
public string Name {
get {
return System.Runtime.InteropServices.Marshal.PtrToStringAnsi(Imports.Players.Players_GetName(this.PlayerId));
}
set {
Imports.Players.Players_SetName(this.PlayerId, value);
}
}
public bool GiveWeapon(SDK.Weapons iWeapon, int iAmmo) {
return Imports.Players.Players_GiveWeapon(this.PlayerId, (int)iWeapon, iAmmo);
}
public bool RemoveWeapons() {
return Imports.Players.Players_RemoveWeapons(this.PlayerId);
}
public int Health {
get {
return Players.Players_GetHealth(this.PlayerId);
}
set {
Players.Players_SetHealth(this.PlayerId, value);
}
}
public int Armour {
get {
return Players.Players_GetArmour(this.PlayerId);
}
set {
Players.Players_SetArmour(this.PlayerId, value);
}
}
public int WantedLevel {
set { Players.Players_SetWantedLevel(this.PlayerId, value); }
}
public SDK.CVector3 Coordinates {
get {
return Players.Players_GetCoordinates(this.PlayerId);
}
set {
Players.Players_SetCoordinates(this.PlayerId, value);
}
}
public byte Weather {
set { Players.Players_SetWeather(this.PlayerId, value); }
}
public float Gravity {
set { Players.Players_SetGravity(this.PlayerId, value); }
}
public bool IsInAnyVehicle {
get { return Players.Players_IsInAnyVehicle(this.PlayerId); }
}
public IvmpDotNet.SDK.IVehicle Vehicle {
get {
return new Vehicle() {
VehicleId = Players.Players_GetVehicleId(this.PlayerId)
};
}
}
public int SeatId {
get { return Players.Players_GetSeatId(this.PlayerId); }
}
public bool IsOnFoot {
get { return Players.Players_IsOnFoot(this.PlayerId); }
}
public bool PayAndSpray {
set { Players.Players_TogglePayAndSpray(this.PlayerId, value); }
}
public bool AutoAim {
set { Players.Players_ToggleAutoAim(PlayerId, value); }
}
public IvmpDotNet.SDK.PedModels Model {
get {
return (IvmpDotNet.SDK.PedModels)Players.Players_GetModel(PlayerId);
}
set {
Players.Players_SetModel(PlayerId, (int)value);
}
}
public bool Controls {
set { Players.Players_ToggleControls(PlayerId, true); }
}
public bool IsSpawned {
get { return Players.Players_IsSpawned(PlayerId); }
}
public float Heading {
get {
return Players.Players_GetHeading(PlayerId);
}
set {
Players.Players_SetHeading(PlayerId, value);
}
}
public bool Phsysics {
set { Players.Players_TogglePhysics(PlayerId, value); }
}
public string Ip {
get { return System.Runtime.InteropServices.Marshal.PtrToStringAnsi(Players.Players_GetIp(PlayerId)); }
}
public int Money {
get {
return Players.Players_GetMoney(PlayerId);
}
set {
Players.Players_SetMoney(PlayerId, value);
}
}
public SDK.StateTypes State {
get { return (SDK.StateTypes)Players.Players_GetState(PlayerId); }
}
public SDK.CVector3 Velocity {
get {
return Players.Players_GetVelocity(PlayerId);
}
set {
Players.Players_SetVelocity(PlayerId, value);
}
}
public SDK.Weapons Weapon {
get { return (SDK.Weapons)Players.Players_GetWeapon(PlayerId); }
}
public int Ammo {
get { return Players.Players_GetAmmo(PlayerId); }
}
public string Serial {
get { return System.Runtime.InteropServices.Marshal.PtrToStringAnsi(Players.Players_GetSerial(PlayerId)); }
}
public bool Ducking {
get {
return Players.Players_IsDucking(PlayerId);
}
set {
Players.Players_SetDucking(PlayerId, value);
}
}
public bool Invincible {
set { Players.Players_SetInvincible(PlayerId, value); }
}
public bool HUD {
set { Players.Players_ToggleHUD(PlayerId, value); }
}
public bool Radar {
set { Players.Players_ToggleRadar(PlayerId, value); }
}
public bool Names {
set { Players.Players_ToggleNames(PlayerId, value); }
}
public bool AreaNames {
set { Players.Players_ToggleAreaNames(PlayerId, value); }
}
public int Color {
get {
return Players.Players_GetColor(PlayerId);
}
set {
Players.Players_SetColor(PlayerId, value);
}
}
public Dictionary<SDK.Bodyparts, int> Clothes {
get { throw new NotImplementedException(); }
}
public int Ping {
get { return Players.Players_GetPing(PlayerId); }
}
public bool Helmet {
set {
Players.Players_ToggleHelmet(PlayerId, value);
}
}
public SDK.CVector3 CameraPos {
set { Players.Players_SetCameraPos(PlayerId, value); }
}
public SDK.CVector3 CameraLookAt {
set { Players.Players_SetCameraLookAt(PlayerId, value); }
}
public SDK.CControlState PreviousControlState {
get { return Players.Players_GetPreviousControlState(PlayerId); }
}
public SDK.CControlState ControlState {
get { return Players.Players_GetControlState(PlayerId); }
}
public int Dimension {
get {
return Players.Players_GetDimension(PlayerId);
}
set {
Players.Players_SetDimension(PlayerId, (byte)value);
}
}
public bool BlockWeaponDrop(bool btoggle) {
return Players.Players_blockWeaponDrop(PlayerId, btoggle);
}
public bool BlockWeaponChange(bool btoggle) {
return Players.Players_blockWeaponChange(PlayerId, btoggle);
}
public bool FadeScreenOut(int iDuration) {
return Players.Players_fadeScreenOut(PlayerId, iDuration);
}
public bool FadeScreenIn(int iDuration) {
return Players.Players_fadeScreenIn(PlayerId, iDuration);
}
public bool TriggerPoliceReport(string szAudio) {
return Players.Players_triggerPoliceReport(PlayerId, szAudio);
}
public bool TriggerMissionCompleteAudio(int iMission) {
return Players.Players_triggerMissionCompleteAudio(PlayerId, iMission);
}
public bool TriggerAudioEvent(string szAudio) {
return Players.Players_triggerAudioEvent(PlayerId, szAudio);
}
public bool RequestAnim() {
return Players.Players_requestAnim(PlayerId);
}
public bool ForceAnim(string szGroup, string szAnim) {
return Players.Players_forceAnim(PlayerId, szGroup, szAnim);
}
public bool TriggerEvent(string szEventName, string szFormat) {
return Players.Players_TriggerEvent(PlayerId, szEventName, szFormat);
}
public bool ResetCamera() {
return Players.Players_ResetCamera(PlayerId);
}
public bool RemoveHelmet() {
return Players.Players_RemoveHelmet(PlayerId);
}
public bool Respawn() {
return Players.Players_Respawn(PlayerId);
}
public bool GiveHelmet() {
return Players.Players_GiveHelmet(PlayerId);
}
public bool ResetClothes() {
return Players.Players_ResetClothes(PlayerId);
}
public bool SetClothes(SDK.Bodyparts iBodyPart, int iClothes) {
return Players.Players_SetClothes(PlayerId, (int)iBodyPart, iClothes);
}
public bool SetCameraBehind() {
return Players.Players_SetCameraBehind(PlayerId);
}
public bool RemoveFromVehicle(bool bGraceful) {
return Players.Players_RemoveFromVehicle(PlayerId, bGraceful);
}
public bool WarpIntoVehicle(SDK.IVehicle vehicle, int iSeatId) {
return Players.Players_WarpIntoVehicle(PlayerId, vehicle.VehicleId, iSeatId);
}
public bool DisplayText(float fPosX, float fPosY, string szText, int iTime) {
return Players.Players_DisplayText(PlayerId, fPosX, fPosY, szText, iTime);
}
public bool ToggleFrozen(bool sqbPlayerFrozen, bool sqbCameraFrozen) {
return Players.Players_ToggleFrozen(PlayerId, sqbPlayerFrozen, sqbCameraFrozen);
}
public bool GiveMoney(int iMoney) {
return Players.Players_GiveMoney(PlayerId, iMoney);
}
public bool ResetMoney() {
return Players.Players_ResetMoney(PlayerId);
}
public bool SetSpawnLocation(SDK.CVector3 vecPos, float fRotation) {
return Players.Players_SetSpawnLocation(PlayerId, vecPos, fRotation);
}
public bool IsInVehicle(SDK.IVehicle vehicle) {
return Players.Players_IsInVehicle(PlayerId, vehicle.VehicleId);
}
public bool SetTime(byte iHour, byte iMinute) {
return Players.Players_SetTime(PlayerId, iHour, iMinute);
}
public bool SendMessage(string szMessage, int iColor, bool sqbAllowFormatting) {
return Players.Players_SendMessage(PlayerId, szMessage, iColor, sqbAllowFormatting);
}
public bool Kick(bool sqbKickMessage) {
return Players.Players_Kick(PlayerId, sqbKickMessage);
}
public bool Ban(uint uiSeconds) {
return Players.Players_Ban(PlayerId, uiSeconds);
}
public bool CreatePlayerBlip(SDK.Blips iSprite) {
return Blips.Blips_CreatePlayerBlip(PlayerId, (int)iSprite);
}
public bool DeletePlayerBlip() {
return Blips.Blips_DeletePlayerBlip(PlayerId);
}
public bool TogglePlayerBlipDisplay(bool bToggle) {
return Blips.Blips_TogglePlayerBlipDisplay(PlayerId, bToggle);
}
public bool TogglePlayerShortRange(bool bToggle) {
return Blips.Blips_TogglePlayerShortRange(PlayerId, bToggle);
}
public bool Remove(byte byteReason) {
return Imports.GetPlayerManager.GetPlayerManager_Remove(PlayerId, byteReason);
}
}
}
| {
"content_hash": "890b75e4cc2d28ff401f18faba9a719d",
"timestamp": "",
"source": "github",
"line_count": 385,
"max_line_length": 126,
"avg_line_length": 30.166233766233766,
"alnum_prop": 0.5752540037885311,
"repo_name": "purm/IvmpDotNet",
"id": "73a78c7491ffac7062620e5a421eaebaac63f292",
"size": "11616",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "IvmpDotNet.Core/Wrappings/Player.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "67900"
},
{
"name": "C#",
"bytes": "210033"
},
{
"name": "C++",
"bytes": "499669"
},
{
"name": "Objective-C",
"bytes": "28552"
}
],
"symlink_target": ""
} |
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>History and What's New</title>
<link rel="stylesheet" href="../math.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="../index.html" title="Math Toolkit 2.4.0">
<link rel="up" href="../overview.html" title="Chapter 1. Overview">
<link rel="prev" href="building.html" title="If and How to Build a Boost.Math Library, and its Examples and Tests">
<link rel="next" href="overview_tr1.html" title="C99 and C++ TR1 C-style Functions">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="building.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../overview.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="overview_tr1.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="math_toolkit.history1"></a><a class="link" href="history1.html" title="History and What's New">History and What's New</a>
</h2></div></div></div>
<p>
Currently open bug reports can be viewed <a href="https://svn.boost.org/trac/boost/query?status=assigned&status=new&status=reopened&component=math&col=id&col=summary&col=status&col=type&col=milestone&col=component&order=priority" target="_top">here</a>.
</p>
<p>
All bug reports including closed ones can be viewed <a href="https://svn.boost.org/trac/boost/query?status=assigned&status=closed&status=new&status=reopened&component=math&col=id&col=summary&col=status&col=type&col=milestone&col=component&order=priority" target="_top">here</a>.
</p>
<h5>
<a name="math_toolkit.history1.h0"></a>
<span><a name="math_toolkit.history1.math_2_4_0_boost_1_61"></a></span><a class="link" href="history1.html#math_toolkit.history1.math_2_4_0_boost_1_61">Math-2.4.0
(Boost-1.61)</a>
</h5>
<p>
New Features:
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
Polynomial arithmetic added to tools.
</li></ul></div>
<p>
Patches:
</p>
<h5>
<a name="math_toolkit.history1.h1"></a>
<span><a name="math_toolkit.history1.math_2_3_0_boost_1_60"></a></span><a class="link" href="history1.html#math_toolkit.history1.math_2_3_0_boost_1_60">Math-2.3.0
(Boost-1.60)</a>
</h5>
<p>
New Features:
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Promote the root finding and function minimization code to first class
citizens - these are now officially supported as part of the library.
</li>
<li class="listitem">
Allow the library to be used and tested with compiler exception handling
support turned off. To better facilitate this the default error handling
policies have been changed to <span class="emphasis"><em>errno_on_error</em></span> but only
when the compiler has no exception handling support.
</li>
</ul></div>
<p>
Patches:
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Fix behaviour of the non-central chi-squared distribution when the non-centrality
parameter is zero to match the chi-squared, see <a href="https://svn.boost.org/trac/boost/ticket/11557" target="_top">11557</a>.
</li>
<li class="listitem">
Fix comments in code for the hypergeometric to match what it actually does,
also fixes the parameter access functions to return the correct values.
See <a href="https://svn.boost.org/trac/boost/ticket/11556" target="_top">11556</a>.
</li>
<li class="listitem">
Stopped using hidden visiblity library build with the Oracle compiler as
it leads to unresolved externals from the C++ standard library. See <a href="https://svn.boost.org/trac/boost/ticket/11547" target="_top">11547</a>.
</li>
<li class="listitem">
Fix unintended use of __declspec when building with Oracle C++. See <a href="https://svn.boost.org/trac/boost/ticket/11546" target="_top">11546</a>.
</li>
<li class="listitem">
Fix corner case bug in root bracketing code, see <a href="https://svn.boost.org/trac/boost/ticket/11532" target="_top">11532</a>.
</li>
<li class="listitem">
Add some missing typecasts in arguments to std::max in Bernoulli code.
See <a href="https://svn.boost.org/trac/boost/ticket/11453" target="_top">11453</a>.
</li>
<li class="listitem">
Fix mistaken assumptions about the possible values for FLT_EVAL_METHOD.
See <a href="https://svn.boost.org/trac/boost/ticket/11429" target="_top">11429</a>.
</li>
<li class="listitem">
Completely revamped performance testing and error-rate measuring code so
we can more easily document how well (or not!) we're doing. This information
will hopefully get more frequently updated in future as it's more or less
automatically generated - see the <span class="emphasis"><em>reporting</em></span> sub-directory
for more information.
</li>
<li class="listitem">
Fix some corner cases in the beta, incomplete beta, and incomplete beta
derivative. With thanks to Rocco Romeo.
</li>
<li class="listitem">
Reorganized the Bessel functions internally to improve the performance
of Jn and Yn.
</li>
<li class="listitem">
Fixed skewness formula for triangular distribution, see <a href="https://svn.boost.org/trac/boost/ticket/11768" target="_top">#11768</a>.
</li>
<li class="listitem">
Fixed some examples so they compile on Unix platforms which have an ::exception
struct declared, see <a href="https://svn.boost.org/trac/boost/ticket/11827" target="_top">#11827</a>.
</li>
<li class="listitem">
Correct mistake in triangular distribution skewness formula <a href="https://svn.boost.org/trac/boost/ticket/11768" target="_top">11768</a>,
reported by Juan Leni.
</li>
</ul></div>
<h5>
<a name="math_toolkit.history1.h2"></a>
<span><a name="math_toolkit.history1.math_2_2_1"></a></span><a class="link" href="history1.html#math_toolkit.history1.math_2_2_1">Math-2.2.1</a>
</h5>
<p>
Patch release for Boost-1.58:
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Minor <a href="https://github.com/boostorg/math/pull/13#issuecomment-98905579" target="_top">patch
for Haiku support.</a>
</li>
<li class="listitem">
Fix the decimal digit count for 128-bit floating point types.
</li>
<li class="listitem">
Fix a few documentation typos.
</li>
</ul></div>
<h5>
<a name="math_toolkit.history1.h3"></a>
<span><a name="math_toolkit.history1.math_2_2_0_boost_1_58_0"></a></span><a class="link" href="history1.html#math_toolkit.history1.math_2_2_0_boost_1_58_0">Math-2.2.0
(boost-1.58.0)</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Added two new special functions - <a class="link" href="sf_gamma/trigamma.html" title="Trigamma">trigamma</a>
and <a class="link" href="sf_gamma/polygamma.html" title="Polygamma">polygamma</a>.
</li>
<li class="listitem">
Fixed namespace scope constants so they are constexpr on conforming compilers,
see https://svn.boost.org/trac/boost/ticket/10901.
</li>
<li class="listitem">
Fixed various cases of spurious under/overflow in the incomplete beta and
gamma functions, plus the elliptic integrals, with thanks to Rocco Romeo.
</li>
<li class="listitem">
Fix 3-arg <a class="link" href="sf_poly/legendre.html" title="Legendre (and Associated) Polynomials">legendre_p</a>
and <a class="link" href="sf_poly/legendre.html" title="Legendre (and Associated) Polynomials">legendre_q</a> functions
to not call the policy based overload if the final argument is not actually
a policy.
</li>
<li class="listitem">
Cleaned up some dead code in the incomplete beta function, see <a href="https://svn.boost.org/trac/boost/ticket/10985" target="_top">#10985</a>.
</li>
<li class="listitem">
Fixed extreme-value pdf for large valued inputs, see <a href="https://svn.boost.org/trac/boost/ticket/10938" target="_top">#10938</a>.
</li>
<li class="listitem">
Large update to the Elliptic integral code to use Carlson's latest algorithms
- these should be more stable, more accurate and slightly faster than before.
Also added support for Carlson's RG integral.
</li>
<li class="listitem">
Added <a class="link" href="ellint/ellint_d.html" title="Elliptic Integral D - Legendre Form">ellint_d</a>, <a class="link" href="ellint/jacobi_zeta.html" title="Jacobi Zeta Function">jacobi_zeta</a> and <a class="link" href="ellint/heuman_lambda.html" title="Heuman Lambda Function">heuman_lambda</a> elliptic
integrals.
</li>
<li class="listitem">
Switched documentation to use SVG rather than PNG graphs and equations
- browsers seem to have finally caught up!
</li>
</ul></div>
<h5>
<a name="math_toolkit.history1.h4"></a>
<span><a name="math_toolkit.history1.math_2_1_0_boost_1_57_0"></a></span><a class="link" href="history1.html#math_toolkit.history1.math_2_1_0_boost_1_57_0">Math-2.1.0
(boost-1.57.0)</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Added <a class="link" href="dist_ref/dists/hyperexponential_dist.html" title="Hyperexponential Distribution">Hyperexponential
Distribution</a>.
</li>
<li class="listitem">
Fix some spurious overflows in the incomplete gamma functions (with thanks
to Rocco Romeo).
</li>
<li class="listitem">
Fix bug in derivative of incomplete beta when a = b = 0.5 - this also effects
several non-central distributions, see <a href="https://svn.boost.org/trac/boost/ticket/10480" target="_top">10480</a>.
</li>
<li class="listitem">
Fixed some corner cases in <a class="link" href="rounding/round.html" title="Rounding Functions">round</a>.
</li>
<li class="listitem">
Don't support 80-bit floats in cstdfloat.hpp if standard library support
is broken.
</li>
</ul></div>
<h5>
<a name="math_toolkit.history1.h5"></a>
<span><a name="math_toolkit.history1.math_2_0_0_boost_1_56_0"></a></span><a class="link" href="history1.html#math_toolkit.history1.math_2_0_0_boost_1_56_0">Math-2.0.0
(Boost-1.56.0)</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
<span class="bold"><strong>Breaking change</strong></span>: moved a number of non-core
headers that are predominantly used for internal maintenance into <code class="computeroutput"><span class="identifier">libs</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">include_private</span></code>. The headers effected
are <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">tools</span><span class="special">/</span><span class="identifier">test_data</span><span class="special">.</span><span class="identifier">hpp</span></code>, <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">tools</span><span class="special">/</span><span class="identifier">remez</span><span class="special">.</span><span class="identifier">hpp</span></code>,
<code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">constants</span><span class="special">/</span><span class="identifier">generate</span><span class="special">.</span><span class="identifier">hpp</span></code>, <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">tools</span><span class="special">/</span><span class="identifier">solve</span><span class="special">.</span><span class="identifier">hpp</span></code>,
<code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">tools</span><span class="special">/</span><span class="identifier">test</span><span class="special">.</span><span class="identifier">hpp</span></code>. You can continue to use these headers
by adding <code class="computeroutput"><span class="identifier">libs</span><span class="special">/</span><span class="identifier">math</span><span class="special">/</span><span class="identifier">include_private</span></code> to your compiler's include
path.
</li>
<li class="listitem">
<span class="bold"><strong>Breaking change</strong></span>: A number of distributions
and special functions were returning the maximum finite value rather than
raising an <a class="link" href="error_handling.html#math_toolkit.error_handling.overflow_error">overflow_error</a>,
this has now been fixed, which means these functions now behave as documented.
However, since the default behavior on raising an <a class="link" href="error_handling.html#math_toolkit.error_handling.overflow_error">overflow_error</a>
is to throw a <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">overflow_error</span></code> exception, applications
which have come to reply rely on these functions not throwing may experience
exceptions where they did not before. The special functions involved are
<a class="link" href="sf_gamma/igamma_inv.html" title="Incomplete Gamma Function Inverses">gamma_p_inva</a>,
<a class="link" href="sf_gamma/igamma_inv.html" title="Incomplete Gamma Function Inverses">gamma_q_inva</a>,
<a class="link" href="sf_beta/ibeta_inv_function.html" title="The Incomplete Beta Function Inverses">ibeta_inva</a>,
<a class="link" href="sf_beta/ibeta_inv_function.html" title="The Incomplete Beta Function Inverses">ibetac_inva</a>,
<a class="link" href="sf_beta/ibeta_inv_function.html" title="The Incomplete Beta Function Inverses">ibeta_invb</a>,
<a class="link" href="sf_beta/ibeta_inv_function.html" title="The Incomplete Beta Function Inverses">ibetac_invb</a>,
<a class="link" href="sf_gamma/igamma_inv.html" title="Incomplete Gamma Function Inverses">gamma_p_inv</a>, <a class="link" href="sf_gamma/igamma_inv.html" title="Incomplete Gamma Function Inverses">gamma_q_inv</a>. The distributions
involved are <a class="link" href="dist_ref/dists/pareto.html" title="Pareto Distribution">Pareto
Distribution</a>, <a class="link" href="dist_ref/dists/beta_dist.html" title="Beta Distribution">Beta
Distribution</a>, <a class="link" href="dist_ref/dists/geometric_dist.html" title="Geometric Distribution">Geometric
Distribution</a>, <a class="link" href="dist_ref/dists/negative_binomial_dist.html" title="Negative Binomial Distribution">Negative
Binomial Distribution</a>, <a class="link" href="dist_ref/dists/binomial_dist.html" title="Binomial Distribution">Binomial
Distribution</a>, <a class="link" href="dist_ref/dists/chi_squared_dist.html" title="Chi Squared Distribution">Chi
Squared Distribution</a>, <a class="link" href="dist_ref/dists/gamma_dist.html" title="Gamma (and Erlang) Distribution">Gamma
Distribution</a>, <a class="link" href="dist_ref/dists/inverse_chi_squared_dist.html" title="Inverse Chi Squared Distribution">Inverse
chi squared Distribution</a>, <a class="link" href="dist_ref/dists/inverse_gamma_dist.html" title="Inverse Gamma Distribution">Inverse
Gamma Distribution</a>. See <a href="https://svn.boost.org/trac/boost/ticket/10111" target="_top">#10111</a>.
</li>
<li class="listitem">
Fix <a class="link" href="rounding/round.html" title="Rounding Functions">round</a> and <a class="link" href="rounding/trunc.html" title="Truncation Functions">trunc</a> functions so they can
be used with integer arguments, see <a href="https://svn.boost.org/trac/boost/ticket/10066" target="_top">#10066</a>.
</li>
<li class="listitem">
Fix Halley iteration to handle zero derivative (with non-zero second derivative),
see <a href="https://svn.boost.org/trac/boost/ticket/10046" target="_top">#10046</a>.
</li>
</ul></div>
<h5>
<a name="math_toolkit.history1.h6"></a>
<span><a name="math_toolkit.history1.math_1_9_1"></a></span><a class="link" href="history1.html#math_toolkit.history1.math_1_9_1">Math-1.9.1</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Fix Geometric distribution use of Policies, see <a href="https://svn.boost.org/trac/boost/ticket/9833" target="_top">#9833</a>.
</li>
<li class="listitem">
Fix corner cases in the negative binomial distribution, see <a href="https://svn.boost.org/trac/boost/ticket/9834" target="_top">#9834</a>.
</li>
<li class="listitem">
Fix compilation failures on Mac OS.
</li>
</ul></div>
<h5>
<a name="math_toolkit.history1.h7"></a>
<span><a name="math_toolkit.history1.math_1_9_0"></a></span><a class="link" href="history1.html#math_toolkit.history1.math_1_9_0">Math-1.9.0</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Changed version number to new Boost.Math specific version now that we're
in the modular Boost world.
</li>
<li class="listitem">
Added <a class="link" href="number_series/bernoulli_numbers.html" title="Bernoulli Numbers">Bernoulli
numbers</a>, changed arbitrary precision <a class="link" href="sf_gamma/tgamma.html" title="Gamma">tgamma</a>/<a class="link" href="sf_gamma/lgamma.html" title="Log Gamma">lgamma</a> to use Sterling's
approximation (from Nikhar Agrawal).
</li>
<li class="listitem">
Added first derivatives of the Bessel functions: <a class="link" href="bessel/bessel_derivatives.html" title="Derivatives of the Bessel Functions">cyl_bessel_j_prime</a>,
<a class="link" href="bessel/bessel_derivatives.html" title="Derivatives of the Bessel Functions">cyl_neumann_prime</a>,
<a class="link" href="bessel/bessel_derivatives.html" title="Derivatives of the Bessel Functions">cyl_bessel_i_prime</a>,
<a class="link" href="bessel/bessel_derivatives.html" title="Derivatives of the Bessel Functions">cyl_bessel_k_prime</a>,
<a class="link" href="bessel/bessel_derivatives.html" title="Derivatives of the Bessel Functions">sph_bessel_prime</a>
and <a class="link" href="bessel/bessel_derivatives.html" title="Derivatives of the Bessel Functions">sph_neumann_prime</a>
(from Anton Bikineev).
</li>
<li class="listitem">
Fixed buggy Student's t example code, along with docs for testing sample
means for equivalence.
</li>
<li class="listitem">
Documented <code class="computeroutput"><span class="identifier">max_iter</span></code> parameter
in root finding code better, see <a href="https://svn.boost.org/trac/boost/ticket/9225" target="_top">#9225</a>.
</li>
<li class="listitem">
Add option to explicitly enable/disable use of __float128 in constants
code, see <a href="https://svn.boost.org/trac/boost/ticket/9240" target="_top">#9240</a>.
</li>
<li class="listitem">
Cleaned up handling of negative values in Bessel I0 and I1 code (removed
dead code), see <a href="https://svn.boost.org/trac/boost/ticket/9512" target="_top">#9512</a>.
</li>
<li class="listitem">
Fixed handling of very small values passed to <a class="link" href="sf_gamma/tgamma.html" title="Gamma">tgamma</a>
and <a class="link" href="sf_gamma/lgamma.html" title="Log Gamma">lgamma</a> so they
don't generate spurious overflows (thanks to Rocco Romeo).
</li>
<li class="listitem">
<a href="https://svn.boost.org/trac/boost/ticket/9672" target="_top">#9672 PDF and
CDF of a Laplace distribution throwing domain_error</a> Random variate
can now be infinite.
</li>
<li class="listitem">
Fixed several corner cases in <a class="link" href="factorials/sf_rising_factorial.html" title="Rising Factorial">rising_factorial</a>,
<a class="link" href="factorials/sf_falling_factorial.html" title="Falling Factorial">falling_factorial</a>
and <a class="link" href="sf_gamma/gamma_ratios.html" title="Ratios of Gamma Functions">tgamma_delta_ratio</a>
with thanks to Rocco Romeo.
</li>
<li class="listitem">
Fixed several corner cases in <a class="link" href="factorials/sf_rising_factorial.html" title="Rising Factorial">rising_factorial</a>,
<a class="link" href="factorials/sf_falling_factorial.html" title="Falling Factorial">falling_factorial</a>
and <a class="link" href="sf_gamma/gamma_ratios.html" title="Ratios of Gamma Functions">tgamma_delta_ratio</a>
(thanks to Rocco Romeo).
</li>
<li class="listitem">
Removed constant <code class="computeroutput"><span class="identifier">pow23_four_minus_pi</span>
</code> whose value did not match the name (and was unused by Boost.Math),
see <a href="https://svn.boost.org/trac/boost/ticket/9712" target="_top">#9712</a>.
</li>
</ul></div>
<h5>
<a name="math_toolkit.history1.h8"></a>
<span><a name="math_toolkit.history1.boost_1_55"></a></span><a class="link" href="history1.html#math_toolkit.history1.boost_1_55">Boost-1.55</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Suppress numerous warnings (mostly from GCC-4.8 and MSVC) <a href="https://svn.boost.org/trac/boost/ticket/8384" target="_top">#8384</a>,
<a href="https://svn.boost.org/trac/boost/ticket/8855" target="_top">#8855</a>,
<a href="https://svn.boost.org/trac/boost/ticket/9107" target="_top">#9107</a>,
<a href="https://svn.boost.org/trac/boost/ticket/9109" target="_top">#9109</a>..
</li>
<li class="listitem">
Fixed PGI compilation issue <a href="https://svn.boost.org/trac/boost/ticket/8333" target="_top">#8333</a>.
</li>
<li class="listitem">
Fixed PGI constant value initialization issue that caused erf to generate
incorrect results <a href="https://svn.boost.org/trac/boost/ticket/8621" target="_top">#8621</a>.
</li>
<li class="listitem">
Prevent macro expansion of some C99 macros that are also C++ functions
<a href="https://svn.boost.org/trac/boost/ticket/8732" target="_top">#8732</a>
and <a href="https://svn.boost.org/trac/boost/ticket/8733" target="_top">#8733</a>..
</li>
<li class="listitem">
Fixed Student's T distribution to behave correctly with huge degrees of
freedom (larger than the largest representable integer) <a href="https://svn.boost.org/trac/boost/ticket/8837" target="_top">#8837</a>.
</li>
<li class="listitem">
Make some core functions usable with <code class="computeroutput"><span class="keyword">long</span>
<span class="keyword">double</span></code> even when the platform has
no standard library <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">double</span></code> support <a href="https://svn.boost.org/trac/boost/ticket/8940" target="_top">#8940</a>.
</li>
<li class="listitem">
Fix error handling of distributions to catch invalid scale and location
parameters when the random variable is infinite <a href="https://svn.boost.org/trac/boost/ticket/9042" target="_top">#9042</a>
and <a href="https://svn.boost.org/trac/boost/ticket/9126" target="_top">#9126</a>.
</li>
<li class="listitem">
Add workaround for broken <tuple> in Intel C++ 14 <a href="https://svn.boost.org/trac/boost/ticket/9087" target="_top">#9087</a>.
</li>
<li class="listitem">
Improve consistency of argument reduction in the elliptic integrals <a href="https://svn.boost.org/trac/boost/ticket/9104" target="_top">#9104</a>.
</li>
<li class="listitem">
Fix bug in inverse incomplete beta that results in cancellation errors
when the beta function is really an arcsine or Student's T distribution.
</li>
<li class="listitem">
Fix issue in Bessel I and K function continued fractions that causes spurious
over/underflow.
</li>
<li class="listitem">
Add improvement to non-central chi squared distribution quantile due to
Thomas Luu.
</li>
</ul></div>
<h5>
<a name="math_toolkit.history1.h9"></a>
<span><a name="math_toolkit.history1.boost_1_54"></a></span><a class="link" href="history1.html#math_toolkit.history1.boost_1_54">Boost-1.54</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Major reorganization to incorporate other Boost.Math like Integer Utilities
Integer Utilities (Greatest Common Divisor and Least Common Multiple),
quaternions and octonions. Making new chapter headings.
</li>
<li class="listitem">
Added many references to Boost.Multiprecision and <code class="computeroutput"><span class="identifier">cpp_dec_float_50</span></code>
as an example of a User-defined Type (UDT).
</li>
<li class="listitem">
Added Clang to list of supported compilers.
</li>
<li class="listitem">
Fixed constants to use a thread-safe cache of computed values when used
at arbitrary precision.
</li>
<li class="listitem">
Added finding zeros of Bessel functions <code class="computeroutput"><span class="identifier">cyl_bessel_j_zero</span></code>,
<code class="computeroutput"><span class="identifier">cyl_neumann_zero</span></code>, <code class="computeroutput"><span class="identifier">airy_ai_zero</span></code> and <code class="computeroutput"><span class="identifier">airy_bi_zero</span></code>(by
Christopher Kormanyos).
</li>
<li class="listitem">
More accuracy improvements to the Bessel J and Y functions from Rocco Romeo.
</li>
<li class="listitem">
Fixed nasty cyclic dependency bug that caused some headers to not compile
<a href="https://svn.boost.org/trac/boost/ticket/7999" target="_top">#7999</a>.
</li>
<li class="listitem">
Fixed bug in <a class="link" href="sf_gamma/tgamma.html" title="Gamma">tgamma</a>
that caused spurious overflow for arguments between 142.5 and 143.
</li>
<li class="listitem">
Fixed bug in raise_rounding_error that caused it to return an incorrect
result when throwing an exception is turned off <a href="https://svn.boost.org/trac/boost/ticket/7905" target="_top">#7905</a>.
</li>
<li class="listitem">
Added minimal __float128 support.
</li>
<li class="listitem">
Fixed bug in edge-cases of poisson quantile <a href="https://svn.boost.org/trac/boost/ticket/8308" target="_top">#8308</a>.
</li>
<li class="listitem">
Adjusted heuristics used in Halley iteration to cope with inverting the
incomplete beta in tricky regions where the derivative is flatlining. Example
is computing the quantile of the Fisher F distribution for probabilities
smaller than machine epsilon. See ticket <a href="https://svn.boost.org/trac/boost/ticket/8314" target="_top">#8314</a>.
</li>
</ul></div>
<h5>
<a name="math_toolkit.history1.h10"></a>
<span><a name="math_toolkit.history1.boost_1_53"></a></span><a class="link" href="history1.html#math_toolkit.history1.boost_1_53">Boost-1.53</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Fixed issues <a href="https://svn.boost.org/trac/boost/ticket/7325" target="_top">#7325</a>,
<a href="https://svn.boost.org/trac/boost/ticket/7415" target="_top">#7415</a>
and <a href="https://svn.boost.org/trac/boost/ticket/7416" target="_top">#7416</a>,
<a href="https://svn.boost.org/trac/boost/ticket/7183" target="_top">#7183</a>,
<a href="https://svn.boost.org/trac/boost/ticket/7649" target="_top">#7649</a>,
<a href="https://svn.boost.org/trac/boost/ticket/7694" target="_top">#7694</a>,
<a href="https://svn.boost.org/trac/boost/ticket/4445" target="_top">#4445</a>,
<a href="https://svn.boost.org/trac/boost/ticket/7492" target="_top">#7492</a>,
<a href="https://svn.boost.org/trac/boost/ticket/7891" target="_top">#7891</a>,
<a href="https://svn.boost.org/trac/boost/ticket/7429" target="_top">#7429</a>.
</li>
<li class="listitem">
Fixed mistake in calculating pooled standard deviation in two-sample students
t example <a href="https://svn.boost.org/trac/boost/ticket/7402" target="_top">#7402</a>.
</li>
<li class="listitem">
Improve complex acos/asin/atan, see <a href="https://svn.boost.org/trac/boost/ticket/7290" target="_top">#7290</a>,
<a href="https://svn.boost.org/trac/boost/ticket/7291" target="_top">#7291</a>.
</li>
<li class="listitem">
Improve accuracy in some corner cases of <a class="link" href="bessel/bessel_first.html" title="Bessel Functions of the First and Second Kinds">cyl_bessel_j</a>
and <a class="link" href="sf_gamma/igamma.html" title="Incomplete Gamma Functions">gamma_p</a>/<a class="link" href="sf_gamma/igamma.html" title="Incomplete Gamma Functions">gamma_q</a>
thanks to suggestions from Rocco Romeo.
</li>
<li class="listitem">
Improve accuracy of Bessel J and Y for integer orders thanks to suggestions
from Rocco Romeo.
</li>
</ul></div>
<h5>
<a name="math_toolkit.history1.h11"></a>
<span><a name="math_toolkit.history1.boost_1_52"></a></span><a class="link" href="history1.html#math_toolkit.history1.boost_1_52">Boost-1.52</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Corrected moments for small degrees of freedom <a href="https://svn.boost.org/trac/boost/ticket/7177" target="_top">#7177</a>
(reported by Thomas Mang).
</li>
<li class="listitem">
Added <a class="link" href="airy.html" title="Airy Functions">Airy functions</a> and <a class="link" href="jacobi.html" title="Jacobi Elliptic Functions">Jacobi Elliptic functions</a>.
</li>
<li class="listitem">
Corrected failure to detect bad parameters in many distributions <a href="https://svn.boost.org/trac/boost/ticket/6934" target="_top">#6934</a> (reported
by Florian Schoppmann) by adding a function check_out_of_range to test
many possible bad parameters. This test revealed several distributions
where the checks for bad parameters were ineffective, and these have been
rectified.
</li>
<li class="listitem">
Fixed issue in Hankel functions that causes incorrect values to be returned
for <span class="emphasis"><em>x < 0</em></span> and ν odd, see <a href="https://svn.boost.org/trac/boost/ticket/7135" target="_top">#7135</a>.
</li>
<li class="listitem">
Fixed issues <a href="https://svn.boost.org/trac/boost/ticket/6517" target="_top">#6517</a>,
<a href="https://svn.boost.org/trac/boost/ticket/6362" target="_top">#6362</a>,
<a href="https://svn.boost.org/trac/boost/ticket/7053" target="_top">#7053</a>,
<a href="https://svn.boost.org/trac/boost/ticket/2693" target="_top">#2693</a>,
<a href="https://svn.boost.org/trac/boost/ticket/6937" target="_top">#6937</a>,
<a href="https://svn.boost.org/trac/boost/ticket/7099" target="_top">#7099</a>.
</li>
<li class="listitem">
Permitted infinite degrees of freedom <a href="https://svn.boost.org/trac/boost/ticket/7259" target="_top">#7259</a>
implemented using the normal distribution (requested by Thomas Mang).
</li>
<li class="listitem">
Much enhanced accuracy for large degrees of freedom ν and/or large non-centrality
δ
by switching to use the Students t distribution (or Normal distribution
for infinite degrees of freedom) centered at delta, when δ / (4 * ν) <
epsilon for the floating-point type in use. <a href="https://svn.boost.org/trac/boost/ticket/7259" target="_top">#7259</a>.
It was found that the incomplete beta was suffering from serious cancellation
errors when degrees of freedom was very large. (That has now been fixed
in our code, but any code based on Didonato and Morris's original papers
(probably every implementation out there actually) will have the same issue).
</li>
</ul></div>
<h5>
<a name="math_toolkit.history1.h12"></a>
<span><a name="math_toolkit.history1.boost_1_51"></a></span><a class="link" href="history1.html#math_toolkit.history1.boost_1_51">Boost-1.51</a>
</h5>
<p>
See Boost-1.52 - some items were added but not listed in time for the release.
</p>
<h5>
<a name="math_toolkit.history1.h13"></a>
<span><a name="math_toolkit.history1.boost_1_50"></a></span><a class="link" href="history1.html#math_toolkit.history1.boost_1_50">Boost-1.50</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Promoted math constants to be 1st class citizens, including convenient
access to the most widely used built-in float, double, long double via
three namespaces.
</li>
<li class="listitem">
Added the Owen's T function and Skew Normal distribution written by Benjamin
Sobotta: see <a class="link" href="owens_t.html" title="Owen's T function">Owens T</a> and skew_normal_distrib.
</li>
<li class="listitem">
Added Hankel functions <a class="link" href="hankel/cyl_hankel.html" title="Cyclic Hankel Functions">cyl_hankel_1</a>,
<a class="link" href="hankel/cyl_hankel.html" title="Cyclic Hankel Functions">cyl_hankel_2</a>, <a class="link" href="hankel/sph_hankel.html" title="Spherical Hankel Functions">sph_hankel_1</a> and <a class="link" href="hankel/sph_hankel.html" title="Spherical Hankel Functions">sph_hankel_2</a>.
</li>
<li class="listitem">
Corrected issue <a href="https://svn.boost.org/trac/boost/ticket/6627" target="_top">#6627
nonfinite_num_put formatting of 0.0 is incorrect</a> based on a patch
submitted by K R Walker.
</li>
<li class="listitem">
Changed constant initialization mechanism so that it is thread safe even
for user-defined types, also so that user defined types get the full precision
of the constant, even when <code class="computeroutput"><span class="keyword">long</span>
<span class="keyword">double</span></code> does not. So for example
128-bit rational approximations will work with UDT's and do the right thing,
even though <code class="computeroutput"><span class="keyword">long</span> <span class="keyword">double</span></code>
may be only 64 or 80 bits.
</li>
<li class="listitem">
Fixed issue in <code class="computeroutput"><span class="identifier">bessel_jy</span></code>
which causes Y<sub>8.5</sub>(4π) to yield a NaN.
</li>
</ul></div>
<h5>
<a name="math_toolkit.history1.h14"></a>
<span><a name="math_toolkit.history1.boost_1_49"></a></span><a class="link" href="history1.html#math_toolkit.history1.boost_1_49">Boost-1.49</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Deprecated wrongly named <code class="computeroutput"><span class="identifier">twothirds</span></code>
math constant in favour of <code class="computeroutput"><span class="identifier">two_thirds</span></code>
(with underscore separator). (issue <a href="https://svn.boost.org/trac/boost/ticket/6199" target="_top">#6199</a>).
</li>
<li class="listitem">
Refactored test data and some special function code to improve support
for arbitary precision and/or expression-template-enabled types.
</li>
<li class="listitem">
Added new faster zeta function evaluation method.
</li>
</ul></div>
<p>
Fixed issues:
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Corrected CDF complement for Laplace distribution (issue <a href="https://svn.boost.org/trac/boost/ticket/6151" target="_top">#6151</a>).
</li>
<li class="listitem">
Corrected branch cuts on the complex inverse trig functions, to handle
signed zeros (issue <a href="https://svn.boost.org/trac/boost/ticket/6171" target="_top">#6171</a>).
</li>
<li class="listitem">
Fixed bug in <code class="computeroutput"><span class="identifier">bessel_yn</span></code>
which caused incorrect overflow errors to be raised for negative <span class="emphasis"><em>n</em></span>
(issue <a href="https://svn.boost.org/trac/boost/ticket/6367" target="_top">#6367</a>).
</li>
<li class="listitem">
Also fixed minor/cosmetic/configuration issues <a href="https://svn.boost.org/trac/boost/ticket/6120" target="_top">#6120</a>,
<a href="https://svn.boost.org/trac/boost/ticket/6191" target="_top">#6191</a>,
<a href="https://svn.boost.org/trac/boost/ticket/5982" target="_top">#5982</a>,
<a href="https://svn.boost.org/trac/boost/ticket/6130" target="_top">#6130</a>,
<a href="https://svn.boost.org/trac/boost/ticket/6234" target="_top">#6234</a>,
<a href="https://svn.boost.org/trac/boost/ticket/6307" target="_top">#6307</a>,
<a href="https://svn.boost.org/trac/boost/ticket/6192" target="_top">#6192</a>.
</li>
</ul></div>
<h5>
<a name="math_toolkit.history1.h15"></a>
<span><a name="math_toolkit.history1.boost_1_48"></a></span><a class="link" href="history1.html#math_toolkit.history1.boost_1_48">Boost-1.48</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Added new series evaluation methods to the cyclic Bessel I, J, K and Y
functions. Also taken great care to avoid spurious over and underflow of
these functions. Fixes issue <a href="https://svn.boost.org/trac/boost/ticket/5560" target="_top">#5560</a>
</li>
<li class="listitem">
Added an example of using Inverse Chi-Squared distribution for Bayesian
statistics, provided by Thomas Mang.
</li>
<li class="listitem">
Added tests to use improved version of lexical_cast which handles C99 nonfinites
without using globale facets.
</li>
<li class="listitem">
Corrected wrong out-of-bound uniform distribution CDF complement values
<a href="https://svn.boost.org/trac/boost/ticket/5733" target="_top">#5733</a>.
</li>
<li class="listitem">
Enabled long double support on OpenBSD (issue <a href="https://svn.boost.org/trac/boost/ticket/6014" target="_top">#6014</a>).
</li>
<li class="listitem">
Changed nextafter and related functions to behave in the same way as other
implementations - so that nextafter(+INF, 0) is a finite value (issue
<a href="https://svn.boost.org/trac/boost/ticket/5823" target="_top">#5832</a>).
</li>
<li class="listitem">
Changed tuple include configuration to fix issue when using in conjunction
with Boost.Tr1 (issue <a href="https://svn.boost.org/trac/boost/ticket/5934" target="_top">#5934</a>).
</li>
<li class="listitem">
Changed class eps_tolerance to behave correctly when both ends of the range
are zero (issue <a href="https://svn.boost.org/trac/boost/ticket/6001" target="_top">#6001</a>).
</li>
<li class="listitem">
Fixed missing include guards on prime.hpp (issue <a href="https://svn.boost.org/trac/boost/ticket/5927" target="_top">#5927</a>).
</li>
<li class="listitem">
Removed unused/undocumented constants from constants.hpp (issue <a href="https://svn.boost.org/trac/boost/ticket/5982" target="_top">#5982</a>).
</li>
<li class="listitem">
Fixed missing std:: prefix in nonfinite_num_facets.hpp (issue <a href="https://svn.boost.org/trac/boost/ticket/5914" target="_top">#5914</a>).
</li>
<li class="listitem">
Minor patches for Cray compiler compatibility.
</li>
</ul></div>
<h5>
<a name="math_toolkit.history1.h16"></a>
<span><a name="math_toolkit.history1.boost_1_47"></a></span><a class="link" href="history1.html#math_toolkit.history1.boost_1_47">Boost-1.47</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Added changesign function to sign.hpp to facilitate addition of nonfinite
facets.
</li>
<li class="listitem">
Addition of nonfinite facets from Johan Rade, with tests, examples of use
for C99 format infinity and NaN, and documentation.
</li>
<li class="listitem">
Added tests and documentation of changesign from Johan Rade.
</li>
</ul></div>
<h5>
<a name="math_toolkit.history1.h17"></a>
<span><a name="math_toolkit.history1.boost_1_46_1"></a></span><a class="link" href="history1.html#math_toolkit.history1.boost_1_46_1">Boost-1.46.1</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
Fixed issues <a href="https://svn.boost.org/trac/boost/ticket/5095" target="_top">#5095</a>,
<a href="https://svn.boost.org/trac/boost/ticket/5095" target="_top">#5113</a>.
</li></ul></div>
<h5>
<a name="math_toolkit.history1.h18"></a>
<span><a name="math_toolkit.history1.boost_1_46_0"></a></span><a class="link" href="history1.html#math_toolkit.history1.boost_1_46_0">Boost-1.46.0</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Added Wald, Inverse Gaussian and geometric distributions.
</li>
<li class="listitem">
Added information about configuration macros.
</li>
<li class="listitem">
Added support for mpreal as a real-numbered type.
</li>
</ul></div>
<h5>
<a name="math_toolkit.history1.h19"></a>
<span><a name="math_toolkit.history1.boost_1_45_0"></a></span><a class="link" href="history1.html#math_toolkit.history1.boost_1_45_0">Boost-1.45.0</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Added warnings about potential ambiguity with std random library in distribution
and function names.
</li>
<li class="listitem">
Added inverse gamma distribution and inverse chi_square and scaled inverse
chi_square.
</li>
<li class="listitem">
Editorial revision of documentation, and added FAQ.
</li>
</ul></div>
<h5>
<a name="math_toolkit.history1.h20"></a>
<span><a name="math_toolkit.history1.boost_1_44_0"></a></span><a class="link" href="history1.html#math_toolkit.history1.boost_1_44_0">Boost-1.44.0</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Fixed incorrect range and support for Rayleigh distribution.
</li>
<li class="listitem">
Fixed numerical error in the quantile of the Student's T distribution:
the function was returning garbage values for non-integer degrees of freedom
between 2 and 3.
</li>
</ul></div>
<h5>
<a name="math_toolkit.history1.h21"></a>
<span><a name="math_toolkit.history1.boost_1_41_0"></a></span><a class="link" href="history1.html#math_toolkit.history1.boost_1_41_0">Boost-1.41.0</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
Significantly improved performance for the incomplete gamma function and
its inverse.
</li></ul></div>
<h5>
<a name="math_toolkit.history1.h22"></a>
<span><a name="math_toolkit.history1.boost_1_40_0"></a></span><a class="link" href="history1.html#math_toolkit.history1.boost_1_40_0">Boost-1.40.0</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Added support for MPFR as a bignum type.
</li>
<li class="listitem">
Added some full specializations of the policy classes to reduce compile
times.
</li>
<li class="listitem">
Added logistic and hypergeometric distributions, from Gautam Sewani's Google
Summer of Code project.
</li>
<li class="listitem">
Added Laplace distribution submitted by Thijs van den Berg.
</li>
<li class="listitem">
Updated performance test code to include new distributions, and improved
the performance of the non-central distributions.
</li>
<li class="listitem">
Added SSE2 optimised <a class="link" href="lanczos.html" title="The Lanczos Approximation">Lanczos approximation</a>
code, from Gautam Sewani's Google Summer of Code project.
</li>
<li class="listitem">
Fixed bug in cyl_bessel_i that used an incorrect approximation for ν = 0.5,
also effects the non-central Chi Square Distribution when ν = 3, see bug
report <a href="https://svn.boost.org/trac/boost/ticket/2877" target="_top">#2877</a>.
</li>
<li class="listitem">
Fixed minor bugs <a href="https://svn.boost.org/trac/boost/ticket/2873" target="_top">#2873</a>.
</li>
</ul></div>
<h5>
<a name="math_toolkit.history1.h23"></a>
<span><a name="math_toolkit.history1.boost_1_38_0"></a></span><a class="link" href="history1.html#math_toolkit.history1.boost_1_38_0">Boost-1.38.0</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Added Johan Råde's optimised floating point classification routines.
</li>
<li class="listitem">
Fixed code so that it compiles in GCC's -pedantic mode (bug report <a href="https://svn.boost.org/trac/boost/ticket/1451" target="_top">#1451</a>).
</li>
</ul></div>
<h5>
<a name="math_toolkit.history1.h24"></a>
<span><a name="math_toolkit.history1.boost_1_37_0"></a></span><a class="link" href="history1.html#math_toolkit.history1.boost_1_37_0">Boost-1.37.0</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
Improved accuracy and testing of the inverse hypergeometric functions.
</li></ul></div>
<h5>
<a name="math_toolkit.history1.h25"></a>
<span><a name="math_toolkit.history1.boost_1_36_0"></a></span><a class="link" href="history1.html#math_toolkit.history1.boost_1_36_0">Boost-1.36.0</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Added Noncentral Chi Squared Distribution.
</li>
<li class="listitem">
Added Noncentral Beta Distribution.
</li>
<li class="listitem">
Added Noncentral F Distribution.
</li>
<li class="listitem">
Added Noncentral T Distribution.
</li>
<li class="listitem">
Added Exponential Integral Functions.
</li>
<li class="listitem">
Added Zeta Function.
</li>
<li class="listitem">
Added Rounding and Truncation functions.
</li>
<li class="listitem">
Added Compile time powers of runtime bases.
</li>
<li class="listitem">
Added SSE2 optimizations for Lanczos evaluation.
</li>
</ul></div>
<h5>
<a name="math_toolkit.history1.h26"></a>
<span><a name="math_toolkit.history1.boost_1_35_0_post_review_first_o"></a></span><a class="link" href="history1.html#math_toolkit.history1.boost_1_35_0_post_review_first_o">Boost-1.35.0:
Post Review First Official Release</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Added Policy based framework that allows fine grained control over function
behaviour.
</li>
<li class="listitem">
<span class="bold"><strong>Breaking change:</strong></span> Changed default behaviour
for domain, pole and overflow errors to throw an exception (based on review
feedback), this behaviour can be customised using <a class="link" href="../policy.html" title="Chapter 15. Policies: Controlling Precision, Error Handling etc">Policy</a>'s.
</li>
<li class="listitem">
<span class="bold"><strong>Breaking change:</strong></span> Changed exception thrown
when an internal evaluation error occurs to boost::math::evaluation_error.
</li>
<li class="listitem">
<span class="bold"><strong>Breaking change:</strong></span> Changed discrete quantiles
to return an integer result: this is anything up to 20 times faster than
finding the true root, this behaviour can be customised using <a class="link" href="../policy.html" title="Chapter 15. Policies: Controlling Precision, Error Handling etc">Policy</a>'s.
</li>
<li class="listitem">
Polynomial/rational function evaluation is now customisable and hopefully
faster than before.
</li>
<li class="listitem">
Added performance test program.
</li>
</ul></div>
<h5>
<a name="math_toolkit.history1.h27"></a>
<span><a name="math_toolkit.history1.milestone_4_second_review_candid"></a></span><a class="link" href="history1.html#math_toolkit.history1.milestone_4_second_review_candid">Milestone
4: Second Review Candidate (1st March 2007)</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Moved Xiaogang Zhang's Bessel Functions code into the library, and brought
them into line with the rest of the code.
</li>
<li class="listitem">
Added C# "Distribution Explorer" demo application.
</li>
</ul></div>
<h5>
<a name="math_toolkit.history1.h28"></a>
<span><a name="math_toolkit.history1.milestone_3_first_review_candida"></a></span><a class="link" href="history1.html#math_toolkit.history1.milestone_3_first_review_candida">Milestone
3: First Review Candidate (31st Dec 2006)</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Implemented the main probability distribution and density functions.
</li>
<li class="listitem">
Implemented digamma.
</li>
<li class="listitem">
Added more factorial functions.
</li>
<li class="listitem">
Implemented the Hermite, Legendre and Laguerre polynomials plus the spherical
harmonic functions from TR1.
</li>
<li class="listitem">
Moved Xiaogang Zhang's elliptic integral code into the library, and brought
them into line with the rest of the code.
</li>
<li class="listitem">
Moved Hubert Holin's existing Boost.Math special functions into this library
and brought them into line with the rest of the code.
</li>
</ul></div>
<h5>
<a name="math_toolkit.history1.h29"></a>
<span><a name="math_toolkit.history1.milestone_2_released_september_1"></a></span><a class="link" href="history1.html#math_toolkit.history1.milestone_2_released_september_1">Milestone
2: Released September 10th 2006</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Implement preview release of the statistical distributions.
</li>
<li class="listitem">
Added statistical distributions tutorial.
</li>
<li class="listitem">
Implemented root finding algorithms.
</li>
<li class="listitem">
Implemented the inverses of the incomplete gamma and beta functions.
</li>
<li class="listitem">
Rewrite erf/erfc as rational approximations (valid to 128-bit precision).
</li>
<li class="listitem">
Integrated the statistical results generated from the test data with Boost.Test:
uses a database of expected results, indexed by test, floating point type,
platform, and compiler.
</li>
<li class="listitem">
Improved lgamma near 1 and 2 (rational approximations).
</li>
<li class="listitem">
Improved erf/erfc inverses (rational approximations).
</li>
<li class="listitem">
Implemented Rational function generation (the Remez method).
</li>
</ul></div>
<h5>
<a name="math_toolkit.history1.h30"></a>
<span><a name="math_toolkit.history1.milestone_1_released_march_31st_"></a></span><a class="link" href="history1.html#math_toolkit.history1.milestone_1_released_march_31st_">Milestone
1: Released March 31st 2006</a>
</h5>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
Implement gamma/beta/erf functions along with their incomplete counterparts.
</li>
<li class="listitem">
Generate high quality test data, against which future improvements can
be judged.
</li>
<li class="listitem">
Provide tools for the evaluation of infinite series, continued fractions,
and rational functions.
</li>
<li class="listitem">
Provide tools for testing against tabulated test data, and collecting statistics
on error rates.
</li>
<li class="listitem">
Provide sufficient docs for people to be able to find their way around
the library.
</li>
</ul></div>
<p>
SVN Revisions:
</p>
<p>
Sandbox and trunk last synchonised at revision: .
</p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2006-2010, 2012-2014 Nikhar Agrawal,
Anton Bikineev, Paul A. Bristow, Marco Guazzone, Christopher Kormanyos, Hubert
Holin, Bruno Lalande, John Maddock, Jeremy Murphy, Johan Råde, Gautam Sewani,
Benjamin Sobotta, Thijs van den Berg, Daryle Walker and Xiaogang Zhang<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="building.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../overview.html"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="overview_tr1.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
| {
"content_hash": "db07e0a1ff89cd27b6854ed096034c97",
"timestamp": "",
"source": "github",
"line_count": 1006,
"max_line_length": 697,
"avg_line_length": 57.312127236580515,
"alnum_prop": 0.6553350908838629,
"repo_name": "yinchunlong/abelkhan-1",
"id": "7e44e31992924ab5578028e6c12d099a71ae4394",
"size": "57656",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "ext/c++/thirdpart/c++/boost/libs/math/doc/html/math_toolkit/history1.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ASP",
"bytes": "118649"
},
{
"name": "Assembly",
"bytes": "223360"
},
{
"name": "Batchfile",
"bytes": "32410"
},
{
"name": "C",
"bytes": "2956993"
},
{
"name": "C#",
"bytes": "219949"
},
{
"name": "C++",
"bytes": "184617089"
},
{
"name": "CMake",
"bytes": "125437"
},
{
"name": "CSS",
"bytes": "427629"
},
{
"name": "Cuda",
"bytes": "52444"
},
{
"name": "DIGITAL Command Language",
"bytes": "6246"
},
{
"name": "FORTRAN",
"bytes": "1856"
},
{
"name": "Groff",
"bytes": "5189"
},
{
"name": "HTML",
"bytes": "234939732"
},
{
"name": "IDL",
"bytes": "14"
},
{
"name": "JavaScript",
"bytes": "682223"
},
{
"name": "Lex",
"bytes": "1231"
},
{
"name": "M4",
"bytes": "29689"
},
{
"name": "Makefile",
"bytes": "1083341"
},
{
"name": "Max",
"bytes": "36857"
},
{
"name": "Objective-C",
"bytes": "11406"
},
{
"name": "Objective-C++",
"bytes": "630"
},
{
"name": "PHP",
"bytes": "59030"
},
{
"name": "Perl",
"bytes": "38649"
},
{
"name": "Perl6",
"bytes": "2053"
},
{
"name": "Python",
"bytes": "1780184"
},
{
"name": "QML",
"bytes": "593"
},
{
"name": "QMake",
"bytes": "16692"
},
{
"name": "Rebol",
"bytes": "354"
},
{
"name": "Ruby",
"bytes": "5532"
},
{
"name": "Shell",
"bytes": "354720"
},
{
"name": "Tcl",
"bytes": "1172"
},
{
"name": "TeX",
"bytes": "32117"
},
{
"name": "XSLT",
"bytes": "552736"
},
{
"name": "Yacc",
"bytes": "19623"
}
],
"symlink_target": ""
} |
#ifndef SkNoSaveLayerCanvas_DEFINED
#define SkNoSaveLayerCanvas_DEFINED
#include "SkCanvas.h"
#include "SkRRect.h"
// The NoSaveLayerCanvas is used to play back SkPictures when the saveLayer
// functionality isn't required (e.g., during analysis of the draw calls).
// It also simplifies the clipping calls to only use rectangles.
class SkNoSaveLayerCanvas : public SkCanvas {
public:
SkNoSaveLayerCanvas(SkBaseDevice* device) : INHERITED(device) {}
// turn saveLayer() into save() for speed, should not affect correctness.
virtual int saveLayer(const SkRect* bounds,
const SkPaint* paint,
SaveFlags flags) SK_OVERRIDE {
// Like SkPictureRecord, we don't want to create layers, but we do need
// to respect the save and (possibly) its rect-clip.
int count = this->INHERITED::save(flags);
if (NULL != bounds) {
this->INHERITED::clipRectBounds(bounds, flags, NULL);
}
return count;
}
// disable aa for speed
virtual bool clipRect(const SkRect& rect,
SkRegion::Op op,
bool doAA) SK_OVERRIDE {
return this->INHERITED::clipRect(rect, op, false);
}
// for speed, just respect the bounds, and disable AA. May give us a few
// false positives and negatives.
virtual bool clipPath(const SkPath& path,
SkRegion::Op op,
bool doAA) SK_OVERRIDE {
return this->updateClipConservativelyUsingBounds(path.getBounds(), op,
path.isInverseFillType());
}
virtual bool clipRRect(const SkRRect& rrect,
SkRegion::Op op,
bool doAA) SK_OVERRIDE {
return this->updateClipConservativelyUsingBounds(rrect.getBounds(), op, false);
}
private:
typedef SkCanvas INHERITED;
};
#endif // SkNoSaveLayerCanvas_DEFINED
| {
"content_hash": "3565c48f1dcada61aac43a90c404a5d9",
"timestamp": "",
"source": "github",
"line_count": 55,
"max_line_length": 87,
"avg_line_length": 36.32727272727273,
"alnum_prop": 0.6086086086086087,
"repo_name": "trevorlinton/skia",
"id": "58d28b40b13ed2a2e322951831db827346a1b841",
"size": "2141",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/utils/SkNoSaveLayerCanvas.h",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Assembly",
"bytes": "10259"
},
{
"name": "C",
"bytes": "3500956"
},
{
"name": "C++",
"bytes": "22162341"
},
{
"name": "CSS",
"bytes": "4368"
},
{
"name": "Java",
"bytes": "23451"
},
{
"name": "JavaScript",
"bytes": "33136"
},
{
"name": "Objective-C",
"bytes": "150492"
},
{
"name": "Python",
"bytes": "372693"
},
{
"name": "Shell",
"bytes": "52008"
}
],
"symlink_target": ""
} |
package im.actor.server.session
import akka.contrib.pattern.DistributedPubSubExtension
import scala.concurrent.{ Promise, Future, Await, blocking }
import scala.concurrent.duration._
import scala.util.{ Success, Random }
import akka.actor._
import akka.stream.ActorMaterializer
import akka.testkit.TestProbe
import org.scalatest.concurrent.ScalaFutures
import org.scalatest.{ FlatSpecLike, Matchers }
import im.actor.api.rpc.RpcResult
import im.actor.api.rpc.codecs._
import im.actor.api.rpc.sequence.{ SeqUpdate, WeakUpdate }
import im.actor.server.activation.internal.DummyCodeActivation
import im.actor.server.api.ActorSpecHelpers
import im.actor.server.api.rpc.service.auth.AuthServiceImpl
import im.actor.server.api.rpc.service.sequence.{ SequenceServiceConfig, SequenceServiceImpl }
import im.actor.server.api.rpc.{ RpcApiService, RpcResultCodec }
import im.actor.server.mtproto.codecs.protocol.MessageBoxCodec
import im.actor.server.mtproto.protocol._
import im.actor.server.mtproto.transport.MTPackage
import im.actor.server.oauth.{ GoogleProvider, OAuth2GoogleConfig }
import im.actor.server.presences.{ GroupPresenceManager, PresenceManager }
import im.actor.server.push.WeakUpdatesManager
import im.actor.server.social.SocialManager
import im.actor.server.{ KafkaSpec, SqlSpecHelpers, persist }
import im.actor.util.testing._
abstract class BaseSessionSpec(_system: ActorSystem = { ActorSpecification.createSystem() })
extends ActorSuite(_system) with FlatSpecLike with ScalaFutures with Matchers with SqlSpecHelpers with ActorSpecHelpers {
import SessionMessage._
implicit val materializer = ActorMaterializer()
implicit val (ds, db) = migrateAndInitDb()
implicit val ec = system.dispatcher
implicit val seqUpdManagerRegion = buildSeqUpdManagerRegion()
implicit val weakUpdManagerRegion = WeakUpdatesManager.startRegion()
implicit val presenceManagerRegion = PresenceManager.startRegion()
implicit val groupPresenceManagerRegion = GroupPresenceManager.startRegion()
implicit val socialManagerRegion = SocialManager.startRegion()
val mediator = DistributedPubSubExtension(_system).mediator
implicit val sessionConfig = SessionConfig.load(system.settings.config.getConfig("session"))
Session.startRegion(Some(Session.props(mediator)))
implicit val sessionRegion = Session.startRegionProxy()
val oauthGoogleConfig = OAuth2GoogleConfig.load(system.settings.config.getConfig("services.google.oauth"))
implicit val oauth2Service = new GoogleProvider(oauthGoogleConfig)
val authService = new AuthServiceImpl(new DummyCodeActivation, mediator)
val sequenceConfig = SequenceServiceConfig.load.toOption.get
val sequenceService = new SequenceServiceImpl(sequenceConfig)
system.actorOf(RpcApiService.props(Seq(authService, sequenceService)), "rpcApiService")
protected def createAuthId(): Long = {
val authId = Random.nextLong()
Await.result(db.run(persist.AuthId.create(authId, None, None)), 1.second)
authId
}
protected def expectSeqUpdate(authId: Long, sessionId: Long, sendAckAt: Option[Duration] = Some(0.seconds))(implicit probe: TestProbe): SeqUpdate = {
val mb = expectMessageBox(authId, sessionId)
val update = UpdateBoxCodec.decode(mb.body.asInstanceOf[UpdateBox].bodyBytes).require.value.asInstanceOf[SeqUpdate]
sendAckAt map { delay ⇒
Future {
blocking {
Thread.sleep(delay.toMillis)
sendMessageBox(authId, sessionId, sessionRegion.ref, Random.nextLong, MessageAck(Vector(mb.messageId)))
}
}
}
update
}
protected def expectWeakUpdate(authId: Long, sessionId: Long)(implicit probe: TestProbe): WeakUpdate = {
UpdateBoxCodec.decode(expectMessageBox(authId, sessionId).body.asInstanceOf[UpdateBox].bodyBytes).require.value.asInstanceOf[WeakUpdate]
}
protected def expectRpcResult(sendAckAt: Option[Duration] = Some(0.seconds), expectAckFor: Set[Long] = Set.empty)(implicit probe: TestProbe, sessionRegion: SessionRegion): RpcResult = {
val messages = probe.receiveN(1 + expectAckFor.size).toSet
if (messages.size != expectAckFor.size + 1) {
fail(s"Expected response and acks for ${expectAckFor.mkString(",")}, got: ${messages.mkString(",")}")
} else {
val (rest, ackIds) = messages.foldLeft(Vector.empty[(Long, Long, Long, ProtoMessage)], Set.empty[Long]) {
case ((rest, ackIds), MTPackage(authId, sessionId, mbBytes)) ⇒
val mb = MessageBoxCodec.decode(mbBytes).require.value
mb.body match {
case MessageAck(ids) ⇒ (rest, ackIds ++ ids)
case body ⇒ (rest :+ ((authId, sessionId, mb.messageId, body)), ackIds)
}
}
ackIds shouldEqual expectAckFor
rest match {
case Vector((authId, sessionId, messageId, RpcResponseBox(_, rpcResultBytes))) ⇒
sendAckAt map { delay ⇒
Future {
blocking {
Thread.sleep(delay.toMillis)
sendMessageBox(authId, sessionId, sessionRegion.ref, Random.nextLong, MessageAck(Vector(messageId)))
}
}
}
RpcResultCodec.decode(rpcResultBytes).require.value
case unexpected ⇒ throw new Exception(s"Expected RpcResponseBox but got $unexpected")
}
}
}
protected def expectMessageAck(authId: Long, sessionId: Long)(implicit probe: TestProbe): MessageAck = {
val mb = expectMessageBox(authId, sessionId)
mb.body shouldBe a[MessageAck]
val ack = mb.body.asInstanceOf[MessageAck]
ack
}
protected def expectMessageAck(authId: Long, sessionId: Long, messageId: Long)(implicit probe: TestProbe): MessageAck = {
val mb = expectMessageBox(authId, sessionId)
mb.body shouldBe a[MessageAck]
val ack = mb.body.asInstanceOf[MessageAck]
ack.messageIds should ===(Vector(messageId))
ack
}
protected def expectNewSession(authId: Long, sessionId: Long, messageId: Long)(implicit probe: TestProbe, sessionRegion: SessionRegion): NewSession = {
expectMessageBoxPF(authId, sessionId) {
case mb @ MessageBox(_, NewSession(sid, mid)) if sid == sessionId && mid == messageId ⇒
sendMessageBox(authId, sessionId, sessionRegion.ref, Random.nextLong(), MessageAck(Vector(mb.messageId)))
val ns = mb.body.asInstanceOf[NewSession]
ns should ===(NewSession(sessionId, messageId))
ns
}
}
protected def ignoreNewSession(authId: Long, sessionId: Long)(implicit probe: TestProbe): Unit = {
probe.ignoreMsg {
case MTPackage(aid, sid, body) if aid == authId && sid == sessionId ⇒
MessageBoxCodec.decode(body).require.value.body.isInstanceOf[NewSession]
case _ ⇒ false
}
}
protected def expectMessageBoxPF[T](authId: Long, sessionId: Long, hint: String = "")(pf: PartialFunction[MessageBox, T])(implicit probe: TestProbe): T = {
probe.expectMsgPF() {
case MTPackage(aid, sid, body) if aid == authId && sid == sessionId ⇒
val mb = MessageBoxCodec.decode(body).require.value
assert(pf.isDefinedAt(mb), s"expected: ${hint} but got ${mb}")
pf(mb)
}
}
protected def expectMessageBox(authId: Long, sessionId: Long)(implicit probe: TestProbe): MessageBox = {
val packageBody = probe.expectMsgPF() {
case MTPackage(aid, sid, body) if aid == authId && sid == sessionId ⇒ body
}
MessageBoxCodec.decode(packageBody).require.value
}
protected def sendMessageBox(authId: Long, sessionId: Long, session: ActorRef, messageId: Long, body: ProtoMessage)(implicit probe: TestProbe) =
sendEnvelope(authId, sessionId, session, HandleMessageBox(MessageBoxCodec.encode(MessageBox(messageId, body)).require.toByteArray))
protected def sendEnvelope(authId: Long, sessionId: Long, session: ActorRef, msg: SessionMessage)(implicit probe: TestProbe) = {
session.tell(
Envelope(
authId,
sessionId,
msg
),
probe.ref
)
}
override def afterAll(): Unit = {
super.afterAll()
system.awaitTermination()
closeDb()
}
private def closeDb(): Unit = {
ds.close()
}
}
| {
"content_hash": "e62bea31bcb84bc1d21492f679fea645",
"timestamp": "",
"source": "github",
"line_count": 204,
"max_line_length": 187,
"avg_line_length": 39.80882352941177,
"alnum_prop": 0.7214628740302919,
"repo_name": "JamesWatling/actor-platform",
"id": "95953172f4ecdf5ac8fe1a06383ba17f573544e5",
"size": "8145",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "actor-server/actor-tests/src/test/scala/im/actor/server/session/BaseSessionSpec.scala",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "46482"
},
{
"name": "HTML",
"bytes": "2608"
},
{
"name": "Java",
"bytes": "4085698"
},
{
"name": "JavaScript",
"bytes": "133174"
},
{
"name": "Objective-C",
"bytes": "6115908"
},
{
"name": "Ruby",
"bytes": "2670"
},
{
"name": "Scala",
"bytes": "897043"
},
{
"name": "Shell",
"bytes": "9522"
},
{
"name": "Swift",
"bytes": "503432"
}
],
"symlink_target": ""
} |
package org.unitedinternet.cosmo.service.interceptors;
import java.util.Set;
import org.unitedinternet.cosmo.model.CollectionItem;
import org.unitedinternet.cosmo.model.Item;
/**
* Interface for event remove handler.
* @author ccoman
*
*/
public interface EventRemoveHandler {
/**
* Intercepter executed before removing an item from a collection.
*
* @param parent CollectionItem
* @param items Set<Item> to remove
*/
public void beforeRemove(CollectionItem parent, Set<Item> items);
/**
* Intercepter executed after removing an item from a collection.
* @param parent CollectionItem
* @param items Set<Item> to remove
*/
public void afterRemove(CollectionItem parent, Set<Item> items);
} | {
"content_hash": "594e95c6dc91af1b74a47f280fedde7a",
"timestamp": "",
"source": "github",
"line_count": 31,
"max_line_length": 70,
"avg_line_length": 24.741935483870968,
"alnum_prop": 0.7014341590612777,
"repo_name": "1and1/cosmo",
"id": "4bc427c579b407cc350f198fe33cb54f64121ba1",
"size": "889",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "cosmo-api/src/main/java/org/unitedinternet/cosmo/service/interceptors/EventRemoveHandler.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "HTML",
"bytes": "31807"
},
{
"name": "Java",
"bytes": "3090864"
},
{
"name": "Perl",
"bytes": "22433"
}
],
"symlink_target": ""
} |
BODY {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size:11px;
color:000000;
text-align:left;
font-weight:normal;
background:#ffffff;
margin: 0px;
}
.bundlename {
font-weight:normal;
}
.iconcmd {
vertical-align:text-top;
}
.bundledescription {
font-weight:normal;
color: #888888;
}
form {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.shadow {
background: #eeeeee;
border-color: #ffffee #999999 #999999 #ffffee;
border-style: solid;
border-left-width: 1px;
border-right-width: 1px;
border-top-width: 1px;
border-bottom-width: 1px;
}
.toolview {
background: #eeeeee;
border-color: #ffffee #999999 #999999 #ffffee;
border-style: solid;
border-left-width: 1px;
border-right-width: 1px;
border-top-width: 1px;
border-bottom-width: 1px;
}
TD {
font-family: Verdana, Arial, Helvetica, sans-serif;
text-align:left;
vertical-align:top;
font-size:11px;
}
TD.row_odd {
background: #ffffff;
}
TD.row_even {
background: #ffffff;
}
TR.row_odd {
background: #ffffff;
}
TR.row_even {
background: #ffffff;
}
TABLE.bundletable {
}
TD.tableheader {
font-family: Verdana, Arial, Helvetica, sans-serif;
text-align:left;
vertical-align:top;
font-size:11px;
font-weight:bold;
background: #eeeeee;
}
TD.bottomfish {
}
TH {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size:11px;
color:000000;
text-align:left;
vertical-align:top;
font-weight:bold
}
TD A {
color:000000;
text-decoration:none
font-size:11px;
}
PRE {
font-family: Courier New, Courier;
font-size:11px;
color:000000;
text-align:left;
font-weight:normal;
}
.cmdresult {
}
.error {
font-family: Courier New, Courier;
font-size:11px;
color: #000000;
background: #eeeeee;
text-align:left;
font-weight:normal;
border-width: 1px;
}
.loginerror {
font-size: 11px;
color: #ff0000;
text-align: left;
font-weight: bold;
border-width: 5px;
}
H1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size:19px;
font-weight:bold
}
H2 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size:15px;
font-weight:bold
}
H3 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size:13px;
font-weight:bold
}
H4 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size:11px;
font-weight:bold
}
H5 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size:9px;
font-weight:bold
}
H6 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size:7px;
font-weight:bold
}
TD.menu {
color: #ffffff;
font-size:9px;
font-weight:bold;
text-align:left;
}
A, A:visited, A:selected, A:active {
text-decoration: none;
font-weight: none;
color: #000000;
}
A.std:hover {
text-decoration: underline;
}
A.std {
text-decoration: none;
font-weight: bold;
color: #5555ff;
}
A:hover {
text-decoration: underline;
color: #000000;
}
.small {
font-size:9px;
}
.medium {
font-size:13px;
}
.big {
font-size:17px;
}
.compactinput {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size:11px;
color: #000000;
font-weight:normal
border-width: 1px;
border: 1px;
border-style:solid;
}
.verycompactinput {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size:11px;
color: #000000;
font-weight:normal
border-width: 0px;
border: 0px;
border-style:solid;
}
.compactbutton {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size:11px;
color: #000000;
font-weight:normal
border-width: 0px;
border: 0px;
border-style:solid;
}
.ghosted {
color: #888888;
}
.framed {
border-type: solid;
border-top: 1px solid;
border-left: 1px solid;
border-bottom: 1px solid;
border-right: 1px solid;
background:#eeeeee;
border-color:#000000;
padding-left: 2;
padding-top: 2;
padding-bottom: 2;
padding-right: 2;
text-decoration:none;
font-size: 11px;
}
.boxed {
border-type: solid;
border-top: 1px solid;
border-left: 1px solid;
border-bottom: 1px solid;
border-right: 1px solid;
background:#E7DBAD;
border-color:#000000;
padding-left: 2;
padding-top: 1;
padding-bottom: 2;
padding-right: 2;
text-decoration:none;
float: left;
}
dt {
font-weight:bold;
margin-bottom: 5px;
}
dd {
margin-bottom: 5px;
}
.mail {
font-style:italic;
}
table.yellow {
border-type: solid;
border-top: 5px solid;
border-left: 5px solid;
border-bottom: 5px solid;
border-right: 5px solid;
border-color:#EDF597;
}
| {
"content_hash": "c7e923cd3db1621aadb46d2438f6e27e",
"timestamp": "",
"source": "github",
"line_count": 302,
"max_line_length": 54,
"avg_line_length": 14.973509933774835,
"alnum_prop": 0.6727111897390535,
"repo_name": "knopflerfish/knopflerfish.org",
"id": "d26ad535922a64ae953c6cdf4262ee4c0723d3a6",
"size": "4524",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "osgi/bundles/http/httpconsole/resources/www/console.css",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "CSS",
"bytes": "30451"
},
{
"name": "HTML",
"bytes": "402685"
},
{
"name": "Java",
"bytes": "12620016"
},
{
"name": "Shell",
"bytes": "6245"
},
{
"name": "XSLT",
"bytes": "25470"
}
],
"symlink_target": ""
} |
package org.tensorflow.lite.task.core;
import com.google.auto.value.AutoValue;
/** Options to configure how to accelerate the model inference using dedicated delegates. */
@AutoValue
public abstract class ComputeSettings {
/** TFLite accelerator delegate options. */
public enum Delegate {
NONE(0),
NNAPI(1),
GPU(2);
private final int value;
Delegate(int value) {
this.value = value;
}
public int getValue() {
return value;
}
}
/** Builder for {@link ComputeSettings}. */
@AutoValue.Builder
public abstract static class Builder {
public abstract Builder setDelegate(Delegate delegate);
public abstract ComputeSettings build();
}
public static Builder builder() {
return new AutoValue_ComputeSettings.Builder().setDelegate(DEFAULT_DELEGATE);
}
public abstract Delegate getDelegate();
private static final Delegate DEFAULT_DELEGATE = Delegate.NONE;
}
| {
"content_hash": "ce220caae37528f2fa6bf508a374bc23",
"timestamp": "",
"source": "github",
"line_count": 42,
"max_line_length": 92,
"avg_line_length": 24.214285714285715,
"alnum_prop": 0.6499508357915438,
"repo_name": "chromium/chromium",
"id": "0c2d04283594df611bd5354a0f47bff776e8cb93",
"size": "1685",
"binary": false,
"copies": "8",
"ref": "refs/heads/main",
"path": "third_party/tflite_support/src/tensorflow_lite_support/java/src/java/org/tensorflow/lite/task/core/ComputeSettings.java",
"mode": "33188",
"license": "bsd-3-clause",
"language": [],
"symlink_target": ""
} |
// This file was automatically generated. Do not modify.
'use strict';
goog.provide('Blockly.Msg.dty');
goog.require('Blockly.Msg');
/** @export */ Blockly.Msg.ADD_COMMENT = "टिप्पणी थप्दे";
/** @export */ Blockly.Msg.CANNOT_DELETE_VARIABLE_PROCEDURE = "Can't delete the variable '%1' because it's part of the definition of the function '%2'"; // untranslated
/** @export */ Blockly.Msg.CHANGE_VALUE_TITLE = "मान बदल";
/** @export */ Blockly.Msg.CLEAN_UP = "ब्लकनलाई हटाओ";
/** @export */ Blockly.Msg.COLLAPSE_ALL = "ब्लक भत्काओ";
/** @export */ Blockly.Msg.COLLAPSE_BLOCK = "ब्लक भत्का";
/** @export */ Blockly.Msg.COLOUR_BLEND_COLOUR1 = "रंग 1";
/** @export */ Blockly.Msg.COLOUR_BLEND_COLOUR2 = "रंग 2";
/** @export */ Blockly.Msg.COLOUR_BLEND_HELPURL = "http://meyerweb.com/eric/tools/color-blend/"; // untranslated
/** @export */ Blockly.Msg.COLOUR_BLEND_RATIO = "अनुपात";
/** @export */ Blockly.Msg.COLOUR_BLEND_TITLE = "मिश्रण गर";
/** @export */ Blockly.Msg.COLOUR_BLEND_TOOLTIP = "दियाका अनुपात (0.0 - 1.0) का साथ दुई रंगहरूको मिश्रण गरन्छ ।";
/** @export */ Blockly.Msg.COLOUR_PICKER_HELPURL = "https://en.wikipedia.org/wiki/Color";
/** @export */ Blockly.Msg.COLOUR_PICKER_TOOLTIP = "पैलेट बाट एक रंग चुन ।";
/** @export */ Blockly.Msg.COLOUR_RANDOM_HELPURL = "http://randomcolour.com"; // untranslated
/** @export */ Blockly.Msg.COLOUR_RANDOM_TITLE = "जुनसुकै रङ्ग";
/** @export */ Blockly.Msg.COLOUR_RANDOM_TOOLTIP = "रैन्डम्ली एक रंग चयन गर ।";
/** @export */ Blockly.Msg.COLOUR_RGB_BLUE = "निलो";
/** @export */ Blockly.Msg.COLOUR_RGB_GREEN = "हरियो";
/** @export */ Blockly.Msg.COLOUR_RGB_HELPURL = "http://www.december.com/html/spec/colorper.html"; // untranslated
/** @export */ Blockly.Msg.COLOUR_RGB_RED = "रातो";
/** @export */ Blockly.Msg.COLOUR_RGB_TITLE = "यै रङ्गको";
/** @export */ Blockly.Msg.COLOUR_RGB_TOOLTIP = "रातो, हरियो और नीलोको निर्दिष्ट मात्राकी साथ एक रंग बनाओ । सबै मान ० देखि १०० का बीच हुनु पडन्छ ।";
/** @export */ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_HELPURL = "https://github.com/google/blockly/wiki/Loops#loop-termination-blocks"; // untranslated
/** @export */ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_BREAK = "लूप बाट भाइर निकलौं";
/** @export */ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_OPERATOR_CONTINUE = "लूपको अर्को आईटरेशन जारी राख";
/** @export */ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_BREAK = "भीत्री लूप बाट बाहिर निस्कने";
/** @export */ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_TOOLTIP_CONTINUE = "बचेका लूपलाई छोड, और अर्को आईटरेशन जारी राख ।";
/** @export */ Blockly.Msg.CONTROLS_FLOW_STATEMENTS_WARNING = "सावधान: यो ब्लक केवल लूप भित्रमात्र प्रयोग गद्द सकिन्छ ।";
/** @export */ Blockly.Msg.CONTROLS_FOREACH_HELPURL = "https://github.com/google/blockly/wiki/Loops#for-each"; // untranslated
/** @export */ Blockly.Msg.CONTROLS_FOREACH_TITLE = "%2 सूचीमी भयाः प्रत्येक आइटम %1 खिलाइ";
/** @export */ Blockly.Msg.CONTROLS_FOREACH_TOOLTIP = "सूचीको प्रत्येक आइटमको लागी, आइटममी चरको मान '%1' राखौं और पाछा क्यै कथन लेख ।";
/** @export */ Blockly.Msg.CONTROLS_FOR_HELPURL = "https://github.com/google/blockly/wiki/Loops#count-with"; // untranslated
/** @export */ Blockly.Msg.CONTROLS_FOR_TITLE = "गन्ती गर %1 देखी %2 %3 %4 सम्म";
/** @export */ Blockly.Msg.CONTROLS_FOR_TOOLTIP = "Have the variable '%1' take on the values from the start number to the end number, counting by the specified interval, and do the specified blocks.";
/** @export */ Blockly.Msg.CONTROLS_IF_ELSEIF_TOOLTIP = "यदि ब्लकमा एक शर्त जोडौं ।";
/** @export */ Blockly.Msg.CONTROLS_IF_ELSE_TOOLTIP = "Add a final, catch-all condition to the if block.";
/** @export */ Blockly.Msg.CONTROLS_IF_HELPURL = "https://github.com/google/blockly/wiki/IfElse"; // untranslated
/** @export */ Blockly.Msg.CONTROLS_IF_IF_TOOLTIP = "Add, remove, or reorder sections to reconfigure this if block.";
/** @export */ Blockly.Msg.CONTROLS_IF_MSG_ELSE = "एल्स";
/** @export */ Blockly.Msg.CONTROLS_IF_MSG_ELSEIF = "एल्स इफ";
/** @export */ Blockly.Msg.CONTROLS_IF_MSG_IF = "इफ";
/** @export */ Blockly.Msg.CONTROLS_IF_TOOLTIP_1 = "जब तलक मान सत्य छ, तब तलक क्यै स्टेट्मेंट चलाओ ।";
/** @export */ Blockly.Msg.CONTROLS_IF_TOOLTIP_2 = "यदि एक मान सत्य छ भण्या कथनहरूको प्रथम खण्ड बणाओ । अन्यथा कथनहरूको अर्को भाग निर्मित गर ।";
/** @export */ Blockly.Msg.CONTROLS_IF_TOOLTIP_3 = "If the first value is true, then do the first block of statements. Otherwise, if the second value is true, do the second block of statements.";
/** @export */ Blockly.Msg.CONTROLS_IF_TOOLTIP_4 = "If the first value is true, then do the first block of statements. Otherwise, if the second value is true, do the second block of statements. If none of the values are true, do the last block of statements.";
/** @export */ Blockly.Msg.CONTROLS_REPEAT_HELPURL = "https://en.wikipedia.org/wiki/Color";
/** @export */ Blockly.Msg.CONTROLS_REPEAT_INPUT_DO = "डू";
/** @export */ Blockly.Msg.CONTROLS_REPEAT_TITLE = "%1 पल्ट दोसराओ";
/** @export */ Blockly.Msg.CONTROLS_REPEAT_TOOLTIP = "क्यै स्टेट्मन्ट कैयों पल्ट चलाओ ।";
/** @export */ Blockly.Msg.CONTROLS_WHILEUNTIL_HELPURL = "https://github.com/google/blockly/wiki/Loops#repeat"; // untranslated
/** @export */ Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_UNTIL = "दोहराओ जब तलक";
/** @export */ Blockly.Msg.CONTROLS_WHILEUNTIL_OPERATOR_WHILE = "दोहराओ जब की";
/** @export */ Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_UNTIL = "जब तक मान फॉल्स छ, तब तक क्यै स्टेट्मेंट्स चलाओ ।";
/** @export */ Blockly.Msg.CONTROLS_WHILEUNTIL_TOOLTIP_WHILE = "जब तलक मान सत्य छ, तब तलक क्यै स्टेट्मेंट चलाओ ।";
/** @export */ Blockly.Msg.DELETE_ALL_BLOCKS = "सबै %1 ब्लकनलाई हटाउन्या ?";
/** @export */ Blockly.Msg.DELETE_BLOCK = "ब्लक हटाउन्या";
/** @export */ Blockly.Msg.DELETE_VARIABLE = "'%1' भेरिएबल मेट:";
/** @export */ Blockly.Msg.DELETE_VARIABLE_CONFIRMATION = "'%2' भेरिएबला %1 प्रयोग मेट्ट्या?";
/** @export */ Blockly.Msg.DELETE_X_BLOCKS = " %1 ब्लकहरू हटाउन्या";
/** @export */ Blockly.Msg.DISABLE_BLOCK = "ब्लकलाई निश्क्रिय पाड्डे";
/** @export */ Blockly.Msg.DUPLICATE_BLOCK = "कपी गर";
/** @export */ Blockly.Msg.ENABLE_BLOCK = "ब्लकलाई सक्रिय पाड्डे";
/** @export */ Blockly.Msg.EXPAND_ALL = "ब्लकनलाई फैलाओ";
/** @export */ Blockly.Msg.EXPAND_BLOCK = "ब्लकनलाई फैलाओ";
/** @export */ Blockly.Msg.EXTERNAL_INPUTS = "भाइरका इन्पुटहरू";
/** @export */ Blockly.Msg.HELP = "सहायता";
/** @export */ Blockly.Msg.INLINE_INPUTS = "इनलाइन इन्पुटहरू";
/** @export */ Blockly.Msg.IOS_CANCEL = "खारेजी";
/** @export */ Blockly.Msg.IOS_ERROR = "गल्ती";
/** @export */ Blockly.Msg.IOS_OK = "हुन्छ";
/** @export */ Blockly.Msg.IOS_PROCEDURES_ADD_INPUT = "+ इनपुट थपः";
/** @export */ Blockly.Msg.IOS_PROCEDURES_ALLOW_STATEMENTS = "Allow statements"; // untranslated
/** @export */ Blockly.Msg.IOS_PROCEDURES_DUPLICATE_INPUTS_ERROR = "This function has duplicate inputs."; // untranslated
/** @export */ Blockly.Msg.IOS_PROCEDURES_INPUTS = "इनपुटन";
/** @export */ Blockly.Msg.IOS_VARIABLES_ADD_BUTTON = "जोड़ऽ";
/** @export */ Blockly.Msg.IOS_VARIABLES_ADD_VARIABLE = "+ Add Variable"; // untranslated
/** @export */ Blockly.Msg.IOS_VARIABLES_DELETE_BUTTON = "मेटः";
/** @export */ Blockly.Msg.IOS_VARIABLES_EMPTY_NAME_ERROR = "तम खाली चल नाउँ प्रयोग अरीनाइसक्दाः।";
/** @export */ Blockly.Msg.IOS_VARIABLES_RENAME_BUTTON = "पुनर्नामकरण";
/** @export */ Blockly.Msg.IOS_VARIABLES_VARIABLE_NAME = "चल(भेरिएबल) नाउँ";
/** @export */ Blockly.Msg.LISTS_CREATE_EMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-empty-list"; // untranslated
/** @export */ Blockly.Msg.LISTS_CREATE_EMPTY_TITLE = "create empty list"; // untranslated
/** @export */ Blockly.Msg.LISTS_CREATE_EMPTY_TOOLTIP = "Returns a list, of length 0, containing no data records"; // untranslated
/** @export */ Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TITLE_ADD = "list"; // untranslated
/** @export */ Blockly.Msg.LISTS_CREATE_WITH_CONTAINER_TOOLTIP = "Add, remove, or reorder sections to reconfigure this list block."; // untranslated
/** @export */ Blockly.Msg.LISTS_CREATE_WITH_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-list-with"; // untranslated
/** @export */ Blockly.Msg.LISTS_CREATE_WITH_INPUT_WITH = "create list with"; // untranslated
/** @export */ Blockly.Msg.LISTS_CREATE_WITH_ITEM_TOOLTIP = "Add an item to the list."; // untranslated
/** @export */ Blockly.Msg.LISTS_CREATE_WITH_TOOLTIP = "Create a list with any number of items."; // untranslated
/** @export */ Blockly.Msg.LISTS_GET_INDEX_FIRST = "first"; // untranslated
/** @export */ Blockly.Msg.LISTS_GET_INDEX_FROM_END = "# from end"; // untranslated
/** @export */ Blockly.Msg.LISTS_GET_INDEX_FROM_START = "#"; // untranslated
/** @export */ Blockly.Msg.LISTS_GET_INDEX_GET = "get"; // untranslated
/** @export */ Blockly.Msg.LISTS_GET_INDEX_GET_REMOVE = "get and remove"; // untranslated
/** @export */ Blockly.Msg.LISTS_GET_INDEX_LAST = "last"; // untranslated
/** @export */ Blockly.Msg.LISTS_GET_INDEX_RANDOM = "random"; // untranslated
/** @export */ Blockly.Msg.LISTS_GET_INDEX_REMOVE = "remove"; // untranslated
/** @export */ Blockly.Msg.LISTS_GET_INDEX_TAIL = ""; // untranslated
/** @export */ Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FIRST = "Returns the first item in a list."; // untranslated
/** @export */ Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_FROM = "Returns the item at the specified position in a list."; // untranslated
/** @export */ Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_LAST = "Returns the last item in a list."; // untranslated
/** @export */ Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_RANDOM = "Returns a random item in a list."; // untranslated
/** @export */ Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FIRST = "Removes and returns the first item in a list."; // untranslated
/** @export */ Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_FROM = "Removes and returns the item at the specified position in a list."; // untranslated
/** @export */ Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_LAST = "Removes and returns the last item in a list."; // untranslated
/** @export */ Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_GET_REMOVE_RANDOM = "Removes and returns a random item in a list."; // untranslated
/** @export */ Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FIRST = "Removes the first item in a list."; // untranslated
/** @export */ Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_FROM = "Removes the item at the specified position in a list."; // untranslated
/** @export */ Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_LAST = "Removes the last item in a list."; // untranslated
/** @export */ Blockly.Msg.LISTS_GET_INDEX_TOOLTIP_REMOVE_RANDOM = "Removes a random item in a list."; // untranslated
/** @export */ Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_END = "to # from end"; // untranslated
/** @export */ Blockly.Msg.LISTS_GET_SUBLIST_END_FROM_START = "to #"; // untranslated
/** @export */ Blockly.Msg.LISTS_GET_SUBLIST_END_LAST = "to last"; // untranslated
/** @export */ Blockly.Msg.LISTS_GET_SUBLIST_HELPURL = "https://github.com/google/blockly/wiki/Lists#getting-a-sublist"; // untranslated
/** @export */ Blockly.Msg.LISTS_GET_SUBLIST_START_FIRST = "get sub-list from first"; // untranslated
/** @export */ Blockly.Msg.LISTS_GET_SUBLIST_START_FROM_END = "get sub-list from # from end"; // untranslated
/** @export */ Blockly.Msg.LISTS_GET_SUBLIST_START_FROM_START = "get sub-list from #"; // untranslated
/** @export */ Blockly.Msg.LISTS_GET_SUBLIST_TAIL = ""; // untranslated
/** @export */ Blockly.Msg.LISTS_GET_SUBLIST_TOOLTIP = "Creates a copy of the specified portion of a list."; // untranslated
/** @export */ Blockly.Msg.LISTS_INDEX_FROM_END_TOOLTIP = "%1 is the last item."; // untranslated
/** @export */ Blockly.Msg.LISTS_INDEX_FROM_START_TOOLTIP = "%1 is the first item."; // untranslated
/** @export */ Blockly.Msg.LISTS_INDEX_OF_FIRST = "find first occurrence of item"; // untranslated
/** @export */ Blockly.Msg.LISTS_INDEX_OF_HELPURL = "https://github.com/google/blockly/wiki/Lists#getting-items-from-a-list"; // untranslated
/** @export */ Blockly.Msg.LISTS_INDEX_OF_LAST = "find last occurrence of item"; // untranslated
/** @export */ Blockly.Msg.LISTS_INDEX_OF_TOOLTIP = "Returns the index of the first/last occurrence of the item in the list. Returns %1 if item is not found."; // untranslated
/** @export */ Blockly.Msg.LISTS_INLIST = "in list"; // untranslated
/** @export */ Blockly.Msg.LISTS_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Lists#is-empty"; // untranslated
/** @export */ Blockly.Msg.LISTS_ISEMPTY_TITLE = "%1 is empty"; // untranslated
/** @export */ Blockly.Msg.LISTS_ISEMPTY_TOOLTIP = "Returns true if the list is empty."; // untranslated
/** @export */ Blockly.Msg.LISTS_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Lists#length-of"; // untranslated
/** @export */ Blockly.Msg.LISTS_LENGTH_TITLE = "length of %1"; // untranslated
/** @export */ Blockly.Msg.LISTS_LENGTH_TOOLTIP = "Returns the length of a list."; // untranslated
/** @export */ Blockly.Msg.LISTS_REPEAT_HELPURL = "https://github.com/google/blockly/wiki/Lists#create-list-with"; // untranslated
/** @export */ Blockly.Msg.LISTS_REPEAT_TITLE = "create list with item %1 repeated %2 times"; // untranslated
/** @export */ Blockly.Msg.LISTS_REPEAT_TOOLTIP = "Creates a list consisting of the given value repeated the specified number of times."; // untranslated
/** @export */ Blockly.Msg.LISTS_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Lists#reversing-a-list"; // untranslated
/** @export */ Blockly.Msg.LISTS_REVERSE_MESSAGE0 = "reverse %1"; // untranslated
/** @export */ Blockly.Msg.LISTS_REVERSE_TOOLTIP = "Reverse a copy of a list."; // untranslated
/** @export */ Blockly.Msg.LISTS_SET_INDEX_HELPURL = "https://github.com/google/blockly/wiki/Lists#in-list--set"; // untranslated
/** @export */ Blockly.Msg.LISTS_SET_INDEX_INPUT_TO = "as"; // untranslated
/** @export */ Blockly.Msg.LISTS_SET_INDEX_INSERT = "insert at"; // untranslated
/** @export */ Blockly.Msg.LISTS_SET_INDEX_SET = "set"; // untranslated
/** @export */ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FIRST = "Inserts the item at the start of a list."; // untranslated
/** @export */ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_FROM = "Inserts the item at the specified position in a list."; // untranslated
/** @export */ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_LAST = "Append the item to the end of a list."; // untranslated
/** @export */ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_INSERT_RANDOM = "Inserts the item randomly in a list."; // untranslated
/** @export */ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FIRST = "Sets the first item in a list."; // untranslated
/** @export */ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_FROM = "Sets the item at the specified position in a list."; // untranslated
/** @export */ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_LAST = "Sets the last item in a list."; // untranslated
/** @export */ Blockly.Msg.LISTS_SET_INDEX_TOOLTIP_SET_RANDOM = "Sets a random item in a list."; // untranslated
/** @export */ Blockly.Msg.LISTS_SORT_HELPURL = "https://github.com/google/blockly/wiki/Lists#sorting-a-list"; // untranslated
/** @export */ Blockly.Msg.LISTS_SORT_ORDER_ASCENDING = "ascending"; // untranslated
/** @export */ Blockly.Msg.LISTS_SORT_ORDER_DESCENDING = "descending"; // untranslated
/** @export */ Blockly.Msg.LISTS_SORT_TITLE = "sort %1 %2 %3"; // untranslated
/** @export */ Blockly.Msg.LISTS_SORT_TOOLTIP = "Sort a copy of a list."; // untranslated
/** @export */ Blockly.Msg.LISTS_SORT_TYPE_IGNORECASE = "alphabetic, ignore case"; // untranslated
/** @export */ Blockly.Msg.LISTS_SORT_TYPE_NUMERIC = "numeric"; // untranslated
/** @export */ Blockly.Msg.LISTS_SORT_TYPE_TEXT = "alphabetic"; // untranslated
/** @export */ Blockly.Msg.LISTS_SPLIT_HELPURL = "https://github.com/google/blockly/wiki/Lists#splitting-strings-and-joining-lists"; // untranslated
/** @export */ Blockly.Msg.LISTS_SPLIT_LIST_FROM_TEXT = "make list from text"; // untranslated
/** @export */ Blockly.Msg.LISTS_SPLIT_TEXT_FROM_LIST = "make text from list"; // untranslated
/** @export */ Blockly.Msg.LISTS_SPLIT_TOOLTIP_JOIN = "Join a list of texts into one text, separated by a delimiter."; // untranslated
/** @export */ Blockly.Msg.LISTS_SPLIT_TOOLTIP_SPLIT = "Split text into a list of texts, breaking at each delimiter."; // untranslated
/** @export */ Blockly.Msg.LISTS_SPLIT_WITH_DELIMITER = "with delimiter"; // untranslated
/** @export */ Blockly.Msg.LOGIC_BOOLEAN_FALSE = "असत्य";
/** @export */ Blockly.Msg.LOGIC_BOOLEAN_HELPURL = "https://github.com/google/blockly/wiki/Logic#values"; // untranslated
/** @export */ Blockly.Msg.LOGIC_BOOLEAN_TOOLTIP = "सत्य या असत्य फिर्ता अरन्छ।";
/** @export */ Blockly.Msg.LOGIC_BOOLEAN_TRUE = "सत्य";
/** @export */ Blockly.Msg.LOGIC_COMPARE_HELPURL = "https://en.wikipedia.org/wiki/Inequality_(mathematics)";
/** @export */ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_EQ = "यदी दुवै इनपुट एक अर्काका बराबर छन् भण्या टु रिटर्न गर ।";
/** @export */ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GT = "पैल्लो इनपुट दोसरा इनपुट है ठुलो भया ट्रू फिर्ता अर:।";
/** @export */ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_GTE = "पैल्लो इनपुट दोसरा इनपुट है ठुलो या उइ सित बराबर भया ट्रू फिर्ता अर:।";
/** @export */ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LT = "पैल्लो इनपुट दोसरा इनपुट है नानो भया ट्रू फिर्ता अर:।";
/** @export */ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_LTE = "पैल्लो इनपुट दोसरा इनपुट है नानो या उइ सित बराबर भया ट्रू फिर्ता अर:।";
/** @export */ Blockly.Msg.LOGIC_COMPARE_TOOLTIP_NEQ = "यदी दुवै इनपुट एक अर्काको बराबर नाइथिन् भणया टु रिटर्न गर ।";
/** @export */ Blockly.Msg.LOGIC_NEGATE_HELPURL = "https://github.com/google/blockly/wiki/Logic#not"; // untranslated
/** @export */ Blockly.Msg.LOGIC_NEGATE_TITLE = "not %1"; // untranslated
/** @export */ Blockly.Msg.LOGIC_NEGATE_TOOLTIP = "इनपुट असत्य भयाले सन्य फिर्ता अरन्छ। इनपुट सत्य भयाले असत्य फिर्ता अरन्छ।";
/** @export */ Blockly.Msg.LOGIC_NULL = "शू्य";
/** @export */ Blockly.Msg.LOGIC_NULL_HELPURL = "https://en.wikipedia.org/wiki/Nullable_type"; // untranslated
/** @export */ Blockly.Msg.LOGIC_NULL_TOOLTIP = "शून्य फिर्ता अरन्छ।";
/** @export */ Blockly.Msg.LOGIC_OPERATION_AND = "रे";
/** @export */ Blockly.Msg.LOGIC_OPERATION_HELPURL = "https://github.com/google/blockly/wiki/Logic#logical-operations"; // untranslated
/** @export */ Blockly.Msg.LOGIC_OPERATION_OR = "या";
/** @export */ Blockly.Msg.LOGIC_OPERATION_TOOLTIP_AND = "दुएइ इनपुट ट्रू भया ट्रू फिर्ता अर:।";
/** @export */ Blockly.Msg.LOGIC_OPERATION_TOOLTIP_OR = "कम्तीमी लै १ इनपुट सत्य भयाले सत्य फिर्ता अर।";
/** @export */ Blockly.Msg.LOGIC_TERNARY_CONDITION = "test"; // untranslated
/** @export */ Blockly.Msg.LOGIC_TERNARY_HELPURL = "https://en.wikipedia.org/wiki/%3F:"; // untranslated
/** @export */ Blockly.Msg.LOGIC_TERNARY_IF_FALSE = "if false"; // untranslated
/** @export */ Blockly.Msg.LOGIC_TERNARY_IF_TRUE = "if true"; // untranslated
/** @export */ Blockly.Msg.LOGIC_TERNARY_TOOLTIP = "Check the condition in 'test'. If the condition is true, returns the 'if true' value; otherwise returns the 'if false' value."; // untranslated
/** @export */ Blockly.Msg.MATH_ADDITION_SYMBOL = "+"; // untranslated
/** @export */ Blockly.Msg.MATH_ARITHMETIC_HELPURL = "https://en.wikipedia.org/wiki/Arithmetic"; // untranslated
/** @export */ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_ADD = "Return the sum of the two numbers."; // untranslated
/** @export */ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_DIVIDE = "Return the quotient of the two numbers."; // untranslated
/** @export */ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MINUS = "Return the difference of the two numbers."; // untranslated
/** @export */ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_MULTIPLY = "Return the product of the two numbers."; // untranslated
/** @export */ Blockly.Msg.MATH_ARITHMETIC_TOOLTIP_POWER = "Return the first number raised to the power of the second number."; // untranslated
/** @export */ Blockly.Msg.MATH_CHANGE_HELPURL = "https://en.wikipedia.org/wiki/Programming_idiom#Incrementing_a_counter"; // untranslated
/** @export */ Blockly.Msg.MATH_CHANGE_TITLE = "change %1 by %2"; // untranslated
/** @export */ Blockly.Msg.MATH_CHANGE_TOOLTIP = "Add a number to variable '%1'."; // untranslated
/** @export */ Blockly.Msg.MATH_CONSTANT_HELPURL = "https://en.wikipedia.org/wiki/Mathematical_constant"; // untranslated
/** @export */ Blockly.Msg.MATH_CONSTANT_TOOLTIP = "Return one of the common constants: π (3.141…), e (2.718…), φ (1.618…), sqrt(2) (1.414…), sqrt(½) (0.707…), or ∞ (infinity)."; // untranslated
/** @export */ Blockly.Msg.MATH_CONSTRAIN_HELPURL = "https://en.wikipedia.org/wiki/Clamping_(graphics)"; // untranslated
/** @export */ Blockly.Msg.MATH_CONSTRAIN_TITLE = "constrain %1 low %2 high %3"; // untranslated
/** @export */ Blockly.Msg.MATH_CONSTRAIN_TOOLTIP = "Constrain a number to be between the specified limits (inclusive)."; // untranslated
/** @export */ Blockly.Msg.MATH_DIVISION_SYMBOL = "÷"; // untranslated
/** @export */ Blockly.Msg.MATH_IS_DIVISIBLE_BY = "is divisible by"; // untranslated
/** @export */ Blockly.Msg.MATH_IS_EVEN = "is even"; // untranslated
/** @export */ Blockly.Msg.MATH_IS_NEGATIVE = "is negative"; // untranslated
/** @export */ Blockly.Msg.MATH_IS_ODD = "is odd"; // untranslated
/** @export */ Blockly.Msg.MATH_IS_POSITIVE = "is positive"; // untranslated
/** @export */ Blockly.Msg.MATH_IS_PRIME = "is prime"; // untranslated
/** @export */ Blockly.Msg.MATH_IS_TOOLTIP = "Check if a number is an even, odd, prime, whole, positive, negative, or if it is divisible by certain number. Returns true or false."; // untranslated
/** @export */ Blockly.Msg.MATH_IS_WHOLE = "is whole"; // untranslated
/** @export */ Blockly.Msg.MATH_MODULO_HELPURL = "https://en.wikipedia.org/wiki/Modulo_operation"; // untranslated
/** @export */ Blockly.Msg.MATH_MODULO_TITLE = "remainder of %1 ÷ %2"; // untranslated
/** @export */ Blockly.Msg.MATH_MODULO_TOOLTIP = "Return the remainder from dividing the two numbers."; // untranslated
/** @export */ Blockly.Msg.MATH_MULTIPLICATION_SYMBOL = "×"; // untranslated
/** @export */ Blockly.Msg.MATH_NUMBER_HELPURL = "https://en.wikipedia.org/wiki/Number"; // untranslated
/** @export */ Blockly.Msg.MATH_NUMBER_TOOLTIP = "A number."; // untranslated
/** @export */ Blockly.Msg.MATH_ONLIST_HELPURL = ""; // untranslated
/** @export */ Blockly.Msg.MATH_ONLIST_OPERATOR_AVERAGE = "average of list"; // untranslated
/** @export */ Blockly.Msg.MATH_ONLIST_OPERATOR_MAX = "max of list"; // untranslated
/** @export */ Blockly.Msg.MATH_ONLIST_OPERATOR_MEDIAN = "median of list"; // untranslated
/** @export */ Blockly.Msg.MATH_ONLIST_OPERATOR_MIN = "min of list"; // untranslated
/** @export */ Blockly.Msg.MATH_ONLIST_OPERATOR_MODE = "modes of list"; // untranslated
/** @export */ Blockly.Msg.MATH_ONLIST_OPERATOR_RANDOM = "random item of list"; // untranslated
/** @export */ Blockly.Msg.MATH_ONLIST_OPERATOR_STD_DEV = "standard deviation of list"; // untranslated
/** @export */ Blockly.Msg.MATH_ONLIST_OPERATOR_SUM = "sum of list"; // untranslated
/** @export */ Blockly.Msg.MATH_ONLIST_TOOLTIP_AVERAGE = "Return the average (arithmetic mean) of the numeric values in the list."; // untranslated
/** @export */ Blockly.Msg.MATH_ONLIST_TOOLTIP_MAX = "Return the largest number in the list."; // untranslated
/** @export */ Blockly.Msg.MATH_ONLIST_TOOLTIP_MEDIAN = "Return the median number in the list."; // untranslated
/** @export */ Blockly.Msg.MATH_ONLIST_TOOLTIP_MIN = "Return the smallest number in the list."; // untranslated
/** @export */ Blockly.Msg.MATH_ONLIST_TOOLTIP_MODE = "Return a list of the most common item(s) in the list."; // untranslated
/** @export */ Blockly.Msg.MATH_ONLIST_TOOLTIP_RANDOM = "Return a random element from the list."; // untranslated
/** @export */ Blockly.Msg.MATH_ONLIST_TOOLTIP_STD_DEV = "Return the standard deviation of the list."; // untranslated
/** @export */ Blockly.Msg.MATH_ONLIST_TOOLTIP_SUM = "Return the sum of all the numbers in the list."; // untranslated
/** @export */ Blockly.Msg.MATH_POWER_SYMBOL = "^"; // untranslated
/** @export */ Blockly.Msg.MATH_RANDOM_FLOAT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated
/** @export */ Blockly.Msg.MATH_RANDOM_FLOAT_TITLE_RANDOM = "random fraction"; // untranslated
/** @export */ Blockly.Msg.MATH_RANDOM_FLOAT_TOOLTIP = "Return a random fraction between 0.0 (inclusive) and 1.0 (exclusive)."; // untranslated
/** @export */ Blockly.Msg.MATH_RANDOM_INT_HELPURL = "https://en.wikipedia.org/wiki/Random_number_generation"; // untranslated
/** @export */ Blockly.Msg.MATH_RANDOM_INT_TITLE = "random integer from %1 to %2"; // untranslated
/** @export */ Blockly.Msg.MATH_RANDOM_INT_TOOLTIP = "Return a random integer between the two specified limits, inclusive."; // untranslated
/** @export */ Blockly.Msg.MATH_ROUND_HELPURL = "https://en.wikipedia.org/wiki/Rounding"; // untranslated
/** @export */ Blockly.Msg.MATH_ROUND_OPERATOR_ROUND = "round"; // untranslated
/** @export */ Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDDOWN = "round down"; // untranslated
/** @export */ Blockly.Msg.MATH_ROUND_OPERATOR_ROUNDUP = "round up"; // untranslated
/** @export */ Blockly.Msg.MATH_ROUND_TOOLTIP = "Round a number up or down."; // untranslated
/** @export */ Blockly.Msg.MATH_SINGLE_HELPURL = "https://en.wikipedia.org/wiki/Square_root"; // untranslated
/** @export */ Blockly.Msg.MATH_SINGLE_OP_ABSOLUTE = "absolute"; // untranslated
/** @export */ Blockly.Msg.MATH_SINGLE_OP_ROOT = "square root"; // untranslated
/** @export */ Blockly.Msg.MATH_SINGLE_TOOLTIP_ABS = "Return the absolute value of a number."; // untranslated
/** @export */ Blockly.Msg.MATH_SINGLE_TOOLTIP_EXP = "Return e to the power of a number."; // untranslated
/** @export */ Blockly.Msg.MATH_SINGLE_TOOLTIP_LN = "Return the natural logarithm of a number."; // untranslated
/** @export */ Blockly.Msg.MATH_SINGLE_TOOLTIP_LOG10 = "Return the base 10 logarithm of a number."; // untranslated
/** @export */ Blockly.Msg.MATH_SINGLE_TOOLTIP_NEG = "Return the negation of a number."; // untranslated
/** @export */ Blockly.Msg.MATH_SINGLE_TOOLTIP_POW10 = "Return 10 to the power of a number."; // untranslated
/** @export */ Blockly.Msg.MATH_SINGLE_TOOLTIP_ROOT = "Return the square root of a number."; // untranslated
/** @export */ Blockly.Msg.MATH_SUBTRACTION_SYMBOL = "-"; // untranslated
/** @export */ Blockly.Msg.MATH_TRIG_ACOS = "acos"; // untranslated
/** @export */ Blockly.Msg.MATH_TRIG_ASIN = "asin"; // untranslated
/** @export */ Blockly.Msg.MATH_TRIG_ATAN = "atan"; // untranslated
/** @export */ Blockly.Msg.MATH_TRIG_COS = "cos"; // untranslated
/** @export */ Blockly.Msg.MATH_TRIG_HELPURL = "https://en.wikipedia.org/wiki/Trigonometric_functions"; // untranslated
/** @export */ Blockly.Msg.MATH_TRIG_SIN = "sin"; // untranslated
/** @export */ Blockly.Msg.MATH_TRIG_TAN = "tan"; // untranslated
/** @export */ Blockly.Msg.MATH_TRIG_TOOLTIP_ACOS = "Return the arccosine of a number."; // untranslated
/** @export */ Blockly.Msg.MATH_TRIG_TOOLTIP_ASIN = "Return the arcsine of a number."; // untranslated
/** @export */ Blockly.Msg.MATH_TRIG_TOOLTIP_ATAN = "Return the arctangent of a number."; // untranslated
/** @export */ Blockly.Msg.MATH_TRIG_TOOLTIP_COS = "Return the cosine of a degree (not radian)."; // untranslated
/** @export */ Blockly.Msg.MATH_TRIG_TOOLTIP_SIN = "Return the sine of a degree (not radian)."; // untranslated
/** @export */ Blockly.Msg.MATH_TRIG_TOOLTIP_TAN = "Return the tangent of a degree (not radian)."; // untranslated
/** @export */ Blockly.Msg.NEW_COLOUR_VARIABLE = "Create colour variable..."; // untranslated
/** @export */ Blockly.Msg.NEW_NUMBER_VARIABLE = "Create number variable..."; // untranslated
/** @export */ Blockly.Msg.NEW_STRING_VARIABLE = "Create string variable..."; // untranslated
/** @export */ Blockly.Msg.NEW_VARIABLE = "भेरिएवल बना:";
/** @export */ Blockly.Msg.NEW_VARIABLE_TITLE = "नयाँ भेरिबलको नाम:";
/** @export */ Blockly.Msg.NEW_VARIABLE_TYPE_TITLE = "New variable type:"; // untranslated
/** @export */ Blockly.Msg.ORDINAL_NUMBER_SUFFIX = ""; // untranslated
/** @export */ Blockly.Msg.PROCEDURES_ALLOW_STATEMENTS = "allow statements"; // untranslated
/** @export */ Blockly.Msg.PROCEDURES_BEFORE_PARAMS = "with:"; // untranslated
/** @export */ Blockly.Msg.PROCEDURES_CALLNORETURN_HELPURL = "https://en.wikipedia.org/wiki/Subroutine"; // untranslated
/** @export */ Blockly.Msg.PROCEDURES_CALLNORETURN_TOOLTIP = "Run the user-defined function '%1'."; // untranslated
/** @export */ Blockly.Msg.PROCEDURES_CALLRETURN_HELPURL = "https://en.wikipedia.org/wiki/Subroutine"; // untranslated
/** @export */ Blockly.Msg.PROCEDURES_CALLRETURN_TOOLTIP = "Run the user-defined function '%1' and use its output."; // untranslated
/** @export */ Blockly.Msg.PROCEDURES_CALL_BEFORE_PARAMS = "with:"; // untranslated
/** @export */ Blockly.Msg.PROCEDURES_CREATE_DO = "Create '%1'"; // untranslated
/** @export */ Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT = "Describe this function..."; // untranslated
/** @export */ Blockly.Msg.PROCEDURES_DEFNORETURN_DO = ""; // untranslated
/** @export */ Blockly.Msg.PROCEDURES_DEFNORETURN_HELPURL = "https://en.wikipedia.org/wiki/Subroutine"; // untranslated
/** @export */ Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE = "do something"; // untranslated
/** @export */ Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE = "to"; // untranslated
/** @export */ Blockly.Msg.PROCEDURES_DEFNORETURN_TOOLTIP = "Creates a function with no output."; // untranslated
/** @export */ Blockly.Msg.PROCEDURES_DEFRETURN_HELPURL = "https://en.wikipedia.org/wiki/Subroutine"; // untranslated
/** @export */ Blockly.Msg.PROCEDURES_DEFRETURN_RETURN = "return"; // untranslated
/** @export */ Blockly.Msg.PROCEDURES_DEFRETURN_TOOLTIP = "Creates a function with an output."; // untranslated
/** @export */ Blockly.Msg.PROCEDURES_DEF_DUPLICATE_WARNING = "Warning: This function has duplicate parameters."; // untranslated
/** @export */ Blockly.Msg.PROCEDURES_HIGHLIGHT_DEF = "Highlight function definition"; // untranslated
/** @export */ Blockly.Msg.PROCEDURES_IFRETURN_HELPURL = "http://c2.com/cgi/wiki?GuardClause"; // untranslated
/** @export */ Blockly.Msg.PROCEDURES_IFRETURN_TOOLTIP = "If a value is true, then return a second value."; // untranslated
/** @export */ Blockly.Msg.PROCEDURES_IFRETURN_WARNING = "Warning: This block may be used only within a function definition."; // untranslated
/** @export */ Blockly.Msg.PROCEDURES_MUTATORARG_TITLE = "input name:"; // untranslated
/** @export */ Blockly.Msg.PROCEDURES_MUTATORARG_TOOLTIP = "Add an input to the function."; // untranslated
/** @export */ Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TITLE = "inputs"; // untranslated
/** @export */ Blockly.Msg.PROCEDURES_MUTATORCONTAINER_TOOLTIP = "Add, remove, or reorder inputs to this function."; // untranslated
/** @export */ Blockly.Msg.REDO = "पुन: कायम गद्दे";
/** @export */ Blockly.Msg.REMOVE_COMMENT = "टिप्पणी हटाउन्या";
/** @export */ Blockly.Msg.RENAME_VARIABLE = "भेरिबललाई पुनः नामांकन गर...";
/** @export */ Blockly.Msg.RENAME_VARIABLE_TITLE = "सबै भेरिबलनका %1 नाम बदल्न्या:";
/** @export */ Blockly.Msg.TEXT_APPEND_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated
/** @export */ Blockly.Msg.TEXT_APPEND_TITLE = "to %1 append text %2"; // untranslated
/** @export */ Blockly.Msg.TEXT_APPEND_TOOLTIP = "Append some text to variable '%1'."; // untranslated
/** @export */ Blockly.Msg.TEXT_CHANGECASE_HELPURL = "https://github.com/google/blockly/wiki/Text#adjusting-text-case"; // untranslated
/** @export */ Blockly.Msg.TEXT_CHANGECASE_OPERATOR_LOWERCASE = "to lower case"; // untranslated
/** @export */ Blockly.Msg.TEXT_CHANGECASE_OPERATOR_TITLECASE = "to Title Case"; // untranslated
/** @export */ Blockly.Msg.TEXT_CHANGECASE_OPERATOR_UPPERCASE = "to UPPER CASE"; // untranslated
/** @export */ Blockly.Msg.TEXT_CHANGECASE_TOOLTIP = "Return a copy of the text in a different case."; // untranslated
/** @export */ Blockly.Msg.TEXT_CHARAT_FIRST = "get first letter"; // untranslated
/** @export */ Blockly.Msg.TEXT_CHARAT_FROM_END = "get letter # from end"; // untranslated
/** @export */ Blockly.Msg.TEXT_CHARAT_FROM_START = "get letter #"; // untranslated
/** @export */ Blockly.Msg.TEXT_CHARAT_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-text"; // untranslated
/** @export */ Blockly.Msg.TEXT_CHARAT_LAST = "get last letter"; // untranslated
/** @export */ Blockly.Msg.TEXT_CHARAT_RANDOM = "get random letter"; // untranslated
/** @export */ Blockly.Msg.TEXT_CHARAT_TAIL = ""; // untranslated
/** @export */ Blockly.Msg.TEXT_CHARAT_TITLE = "in text %1 %2"; // untranslated
/** @export */ Blockly.Msg.TEXT_CHARAT_TOOLTIP = "Returns the letter at the specified position."; // untranslated
/** @export */ Blockly.Msg.TEXT_COUNT_HELPURL = "https://github.com/google/blockly/wiki/Text#counting-substrings"; // untranslated
/** @export */ Blockly.Msg.TEXT_COUNT_MESSAGE0 = "count %1 in %2"; // untranslated
/** @export */ Blockly.Msg.TEXT_COUNT_TOOLTIP = "Count how many times some text occurs within some other text."; // untranslated
/** @export */ Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TOOLTIP = "Add an item to the text."; // untranslated
/** @export */ Blockly.Msg.TEXT_CREATE_JOIN_TITLE_JOIN = "join"; // untranslated
/** @export */ Blockly.Msg.TEXT_CREATE_JOIN_TOOLTIP = "Add, remove, or reorder sections to reconfigure this text block."; // untranslated
/** @export */ Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_END = "to letter # from end"; // untranslated
/** @export */ Blockly.Msg.TEXT_GET_SUBSTRING_END_FROM_START = "to letter #"; // untranslated
/** @export */ Blockly.Msg.TEXT_GET_SUBSTRING_END_LAST = "to last letter"; // untranslated
/** @export */ Blockly.Msg.TEXT_GET_SUBSTRING_HELPURL = "https://github.com/google/blockly/wiki/Text#extracting-a-region-of-text"; // untranslated
/** @export */ Blockly.Msg.TEXT_GET_SUBSTRING_INPUT_IN_TEXT = "in text"; // untranslated
/** @export */ Blockly.Msg.TEXT_GET_SUBSTRING_START_FIRST = "get substring from first letter"; // untranslated
/** @export */ Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_END = "get substring from letter # from end"; // untranslated
/** @export */ Blockly.Msg.TEXT_GET_SUBSTRING_START_FROM_START = "get substring from letter #"; // untranslated
/** @export */ Blockly.Msg.TEXT_GET_SUBSTRING_TAIL = ""; // untranslated
/** @export */ Blockly.Msg.TEXT_GET_SUBSTRING_TOOLTIP = "Returns a specified portion of the text."; // untranslated
/** @export */ Blockly.Msg.TEXT_INDEXOF_HELPURL = "https://github.com/google/blockly/wiki/Text#finding-text"; // untranslated
/** @export */ Blockly.Msg.TEXT_INDEXOF_OPERATOR_FIRST = "find first occurrence of text"; // untranslated
/** @export */ Blockly.Msg.TEXT_INDEXOF_OPERATOR_LAST = "find last occurrence of text"; // untranslated
/** @export */ Blockly.Msg.TEXT_INDEXOF_TITLE = "in text %1 %2 %3"; // untranslated
/** @export */ Blockly.Msg.TEXT_INDEXOF_TOOLTIP = "Returns the index of the first/last occurrence of the first text in the second text. Returns %1 if text is not found."; // untranslated
/** @export */ Blockly.Msg.TEXT_ISEMPTY_HELPURL = "https://github.com/google/blockly/wiki/Text#checking-for-empty-text"; // untranslated
/** @export */ Blockly.Msg.TEXT_ISEMPTY_TITLE = "%1 is empty"; // untranslated
/** @export */ Blockly.Msg.TEXT_ISEMPTY_TOOLTIP = "Returns true if the provided text is empty."; // untranslated
/** @export */ Blockly.Msg.TEXT_JOIN_HELPURL = "https://github.com/google/blockly/wiki/Text#text-creation"; // untranslated
/** @export */ Blockly.Msg.TEXT_JOIN_TITLE_CREATEWITH = "create text with"; // untranslated
/** @export */ Blockly.Msg.TEXT_JOIN_TOOLTIP = "Create a piece of text by joining together any number of items."; // untranslated
/** @export */ Blockly.Msg.TEXT_LENGTH_HELPURL = "https://github.com/google/blockly/wiki/Text#text-modification"; // untranslated
/** @export */ Blockly.Msg.TEXT_LENGTH_TITLE = "length of %1"; // untranslated
/** @export */ Blockly.Msg.TEXT_LENGTH_TOOLTIP = "Returns the number of letters (including spaces) in the provided text."; // untranslated
/** @export */ Blockly.Msg.TEXT_PRINT_HELPURL = "https://github.com/google/blockly/wiki/Text#printing-text"; // untranslated
/** @export */ Blockly.Msg.TEXT_PRINT_TITLE = "print %1"; // untranslated
/** @export */ Blockly.Msg.TEXT_PRINT_TOOLTIP = "Print the specified text, number or other value."; // untranslated
/** @export */ Blockly.Msg.TEXT_PROMPT_HELPURL = "https://github.com/google/blockly/wiki/Text#getting-input-from-the-user"; // untranslated
/** @export */ Blockly.Msg.TEXT_PROMPT_TOOLTIP_NUMBER = "Prompt for user for a number."; // untranslated
/** @export */ Blockly.Msg.TEXT_PROMPT_TOOLTIP_TEXT = "Prompt for user for some text."; // untranslated
/** @export */ Blockly.Msg.TEXT_PROMPT_TYPE_NUMBER = "prompt for number with message"; // untranslated
/** @export */ Blockly.Msg.TEXT_PROMPT_TYPE_TEXT = "prompt for text with message"; // untranslated
/** @export */ Blockly.Msg.TEXT_REPLACE_HELPURL = "https://github.com/google/blockly/wiki/Text#replacing-substrings"; // untranslated
/** @export */ Blockly.Msg.TEXT_REPLACE_MESSAGE0 = "replace %1 with %2 in %3"; // untranslated
/** @export */ Blockly.Msg.TEXT_REPLACE_TOOLTIP = "Replace all occurances of some text within some other text."; // untranslated
/** @export */ Blockly.Msg.TEXT_REVERSE_HELPURL = "https://github.com/google/blockly/wiki/Text#reversing-text"; // untranslated
/** @export */ Blockly.Msg.TEXT_REVERSE_MESSAGE0 = "reverse %1"; // untranslated
/** @export */ Blockly.Msg.TEXT_REVERSE_TOOLTIP = "Reverses the order of the characters in the text."; // untranslated
/** @export */ Blockly.Msg.TEXT_TEXT_HELPURL = "https://en.wikipedia.org/wiki/String_(computer_science)"; // untranslated
/** @export */ Blockly.Msg.TEXT_TEXT_TOOLTIP = "A letter, word, or line of text."; // untranslated
/** @export */ Blockly.Msg.TEXT_TRIM_HELPURL = "https://github.com/google/blockly/wiki/Text#trimming-removing-spaces"; // untranslated
/** @export */ Blockly.Msg.TEXT_TRIM_OPERATOR_BOTH = "trim spaces from both sides of"; // untranslated
/** @export */ Blockly.Msg.TEXT_TRIM_OPERATOR_LEFT = "trim spaces from left side of"; // untranslated
/** @export */ Blockly.Msg.TEXT_TRIM_OPERATOR_RIGHT = "trim spaces from right side of"; // untranslated
/** @export */ Blockly.Msg.TEXT_TRIM_TOOLTIP = "Return a copy of the text with spaces removed from one or both ends."; // untranslated
/** @export */ Blockly.Msg.TODAY = "आज";
/** @export */ Blockly.Msg.UNDO = "रद्द गर्न्या";
/** @export */ Blockly.Msg.VARIABLES_DEFAULT_NAME = "वस्तु";
/** @export */ Blockly.Msg.VARIABLES_GET_CREATE_SET = "Create 'set %1'"; // untranslated
/** @export */ Blockly.Msg.VARIABLES_GET_HELPURL = "https://github.com/google/blockly/wiki/Variables#get"; // untranslated
/** @export */ Blockly.Msg.VARIABLES_GET_TOOLTIP = "Returns the value of this variable."; // untranslated
/** @export */ Blockly.Msg.VARIABLES_SET = "set %1 to %2"; // untranslated
/** @export */ Blockly.Msg.VARIABLES_SET_CREATE_GET = "Create 'get %1'"; // untranslated
/** @export */ Blockly.Msg.VARIABLES_SET_HELPURL = "https://github.com/google/blockly/wiki/Variables#set"; // untranslated
/** @export */ Blockly.Msg.VARIABLES_SET_TOOLTIP = "Sets this variable to be equal to the input."; // untranslated
/** @export */ Blockly.Msg.VARIABLE_ALREADY_EXISTS = "'%1' नाउँ अरियाऽ भेरिएबल पैली बठेइ छ।";
/** @export */ Blockly.Msg.VARIABLE_ALREADY_EXISTS_FOR_ANOTHER_TYPE = "A variable named '%1' already exists for another type: '%2'."; // untranslated
/** @export */ Blockly.Msg.PROCEDURES_DEFRETURN_TITLE = Blockly.Msg.PROCEDURES_DEFNORETURN_TITLE;
/** @export */ Blockly.Msg.CONTROLS_IF_IF_TITLE_IF = Blockly.Msg.CONTROLS_IF_MSG_IF;
/** @export */ Blockly.Msg.CONTROLS_WHILEUNTIL_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO;
/** @export */ Blockly.Msg.CONTROLS_IF_MSG_THEN = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO;
/** @export */ Blockly.Msg.CONTROLS_IF_ELSE_TITLE_ELSE = Blockly.Msg.CONTROLS_IF_MSG_ELSE;
/** @export */ Blockly.Msg.PROCEDURES_DEFRETURN_PROCEDURE = Blockly.Msg.PROCEDURES_DEFNORETURN_PROCEDURE;
/** @export */ Blockly.Msg.LISTS_GET_SUBLIST_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST;
/** @export */ Blockly.Msg.LISTS_GET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST;
/** @export */ Blockly.Msg.MATH_CHANGE_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME;
/** @export */ Blockly.Msg.PROCEDURES_DEFRETURN_DO = Blockly.Msg.PROCEDURES_DEFNORETURN_DO;
/** @export */ Blockly.Msg.CONTROLS_IF_ELSEIF_TITLE_ELSEIF = Blockly.Msg.CONTROLS_IF_MSG_ELSEIF;
/** @export */ Blockly.Msg.LISTS_GET_INDEX_HELPURL = Blockly.Msg.LISTS_INDEX_OF_HELPURL;
/** @export */ Blockly.Msg.CONTROLS_FOREACH_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO;
/** @export */ Blockly.Msg.LISTS_SET_INDEX_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST;
/** @export */ Blockly.Msg.CONTROLS_FOR_INPUT_DO = Blockly.Msg.CONTROLS_REPEAT_INPUT_DO;
/** @export */ Blockly.Msg.LISTS_CREATE_WITH_ITEM_TITLE = Blockly.Msg.VARIABLES_DEFAULT_NAME;
/** @export */ Blockly.Msg.TEXT_APPEND_VARIABLE = Blockly.Msg.VARIABLES_DEFAULT_NAME;
/** @export */ Blockly.Msg.TEXT_CREATE_JOIN_ITEM_TITLE_ITEM = Blockly.Msg.VARIABLES_DEFAULT_NAME;
/** @export */ Blockly.Msg.LISTS_INDEX_OF_INPUT_IN_LIST = Blockly.Msg.LISTS_INLIST;
/** @export */ Blockly.Msg.PROCEDURES_DEFRETURN_COMMENT = Blockly.Msg.PROCEDURES_DEFNORETURN_COMMENT;
/** @export */ Blockly.Msg.MATH_HUE = "230";
/** @export */ Blockly.Msg.LOOPS_HUE = "120";
/** @export */ Blockly.Msg.LISTS_HUE = "260";
/** @export */ Blockly.Msg.LOGIC_HUE = "210";
/** @export */ Blockly.Msg.VARIABLES_HUE = "195";
/** @export */ Blockly.Msg.TEXTS_HUE = "160";
/** @export */ Blockly.Msg.PROCEDURES_HUE = "290";
/** @export */ Blockly.Msg.COLOUR_HUE = "20";
/** @export */ Blockly.Msg.VARIABLES_DYNAMIC_HUE = "310"; | {
"content_hash": "9d9454c9cdf0fe3156f29489bbc7bb45",
"timestamp": "",
"source": "github",
"line_count": 430,
"max_line_length": 260,
"avg_line_length": 98.12325581395349,
"alnum_prop": 0.6860379683833812,
"repo_name": "jstnhuang/blockly",
"id": "29fd97287f80054da7a53d801cb42e0a55d3d8ff",
"size": "45561",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "msg/js/dty.js",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "1630"
},
{
"name": "HTML",
"bytes": "82212"
},
{
"name": "JavaScript",
"bytes": "5189091"
},
{
"name": "Python",
"bytes": "61177"
},
{
"name": "Shell",
"bytes": "5970"
}
],
"symlink_target": ""
} |
<?php
namespace Application\GlobalBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* JobRoles
* @ORM\MappedSuperclass
*/
class ChangeScope
{
/**
* @var string
* @ORM\Column(type="string", length=60)
*/
protected $name;
public function setName($name)
{
$this->name = $name;
return $this;
}
public function getName()
{
return $this->name;
}
public function hasDate()
{
if (empty($this->date)) {
return false;
} else {
return true;
}
}
/**
* @var string
* @ORM\Column(type="datetime", nullable=true, options={"default":null})
*/
protected $date;
public function setDate($date)
{
$this->date = $date;
return $this;
}
public function getDate()
{
return $this->date;
}
/**
* @var integer
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
public function __construct()
{
}
public function getId()
{
return $this->id;
}
}
| {
"content_hash": "1bfae91cb3a617c82a3fe5a8412b7b00",
"timestamp": "",
"source": "github",
"line_count": 74,
"max_line_length": 76,
"avg_line_length": 15.54054054054054,
"alnum_prop": 0.5095652173913043,
"repo_name": "RhaLabs/WebPortal",
"id": "3da14bee68e2b842d0a371ea279e0b9faec1d50e",
"size": "1150",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "src/Application/GlobalBundle/Entity/ChangeScope.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "43926"
},
{
"name": "JavaScript",
"bytes": "280"
},
{
"name": "PHP",
"bytes": "268751"
}
],
"symlink_target": ""
} |
package com.google.android.exoplayer2.source.hls.playlist;
import android.net.Uri;
import com.google.android.exoplayer2.C;
import com.google.android.exoplayer2.Format;
import com.google.android.exoplayer2.ParserException;
import com.google.android.exoplayer2.source.UnrecognizedInputFormatException;
import com.google.android.exoplayer2.source.hls.playlist.HlsMediaPlaylist.Segment;
import com.google.android.exoplayer2.upstream.ParsingLoadable;
import com.google.android.exoplayer2.util.MimeTypes;
import com.google.android.exoplayer2.util.Util;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* HLS playlists parsing logic.
*/
public final class HlsPlaylistParser implements ParsingLoadable.Parser<HlsPlaylist> {
private static final String PLAYLIST_HEADER = "#EXTM3U";
private static final String TAG_VERSION = "#EXT-X-VERSION";
private static final String TAG_PLAYLIST_TYPE = "#EXT-X-PLAYLIST-TYPE";
private static final String TAG_STREAM_INF = "#EXT-X-STREAM-INF";
private static final String TAG_MEDIA = "#EXT-X-MEDIA";
private static final String TAG_TARGET_DURATION = "#EXT-X-TARGETDURATION";
private static final String TAG_DISCONTINUITY = "#EXT-X-DISCONTINUITY";
private static final String TAG_DISCONTINUITY_SEQUENCE = "#EXT-X-DISCONTINUITY-SEQUENCE";
private static final String TAG_PROGRAM_DATE_TIME = "#EXT-X-PROGRAM-DATE-TIME";
private static final String TAG_INIT_SEGMENT = "#EXT-X-MAP";
private static final String TAG_MEDIA_DURATION = "#EXTINF";
private static final String TAG_MEDIA_SEQUENCE = "#EXT-X-MEDIA-SEQUENCE";
private static final String TAG_START = "#EXT-X-START";
private static final String TAG_ENDLIST = "#EXT-X-ENDLIST";
private static final String TAG_KEY = "#EXT-X-KEY";
private static final String TAG_BYTERANGE = "#EXT-X-BYTERANGE";
private static final String TAG_DATERANGE = "#EXT-X-DATERANGE";
private static final String TYPE_AUDIO = "AUDIO";
private static final String TYPE_VIDEO = "VIDEO";
private static final String TYPE_SUBTITLES = "SUBTITLES";
private static final String TYPE_CLOSED_CAPTIONS = "CLOSED-CAPTIONS";
private static final String METHOD_NONE = "NONE";
private static final String METHOD_AES128 = "AES-128";
private static final String BOOLEAN_TRUE = "YES";
private static final String BOOLEAN_FALSE = "NO";
private static final String ATTR_CLOSED_CAPTIONS_NONE = "CLOSED-CAPTIONS=NONE";
private static final Pattern REGEX_AVERAGE_BANDWIDTH =
Pattern.compile("AVERAGE-BANDWIDTH=(\\d+)\\b");
private static final Pattern REGEX_BANDWIDTH = Pattern.compile("[^-]BANDWIDTH=(\\d+)\\b");
private static final Pattern REGEX_CODECS = Pattern.compile("CODECS=\"(.+?)\"");
private static final Pattern REGEX_RESOLUTION = Pattern.compile("RESOLUTION=(\\d+x\\d+)");
private static final Pattern REGEX_TARGET_DURATION = Pattern.compile(TAG_TARGET_DURATION
+ ":(\\d+)\\b");
private static final Pattern REGEX_VERSION = Pattern.compile(TAG_VERSION + ":(\\d+)\\b");
private static final Pattern REGEX_PLAYLIST_TYPE = Pattern.compile(TAG_PLAYLIST_TYPE
+ ":(.+)\\b");
private static final Pattern REGEX_MEDIA_SEQUENCE = Pattern.compile(TAG_MEDIA_SEQUENCE
+ ":(\\d+)\\b");
private static final Pattern REGEX_MEDIA_DURATION = Pattern.compile(TAG_MEDIA_DURATION
+ ":([\\d\\.]+)\\b");
private static final Pattern REGEX_TIME_OFFSET = Pattern.compile("TIME-OFFSET=(-?[\\d\\.]+)\\b");
private static final Pattern REGEX_BYTERANGE = Pattern.compile(TAG_BYTERANGE
+ ":(\\d+(?:@\\d+)?)\\b");
private static final Pattern REGEX_ATTR_BYTERANGE =
Pattern.compile("BYTERANGE=\"(\\d+(?:@\\d+)?)\\b\"");
private static final Pattern REGEX_METHOD = Pattern.compile("METHOD=(" + METHOD_NONE + "|"
+ METHOD_AES128 + ")");
private static final Pattern REGEX_URI = Pattern.compile("URI=\"(.+?)\"");
private static final Pattern REGEX_IV = Pattern.compile("IV=([^,.*]+)");
private static final Pattern REGEX_TYPE = Pattern.compile("TYPE=(" + TYPE_AUDIO + "|" + TYPE_VIDEO
+ "|" + TYPE_SUBTITLES + "|" + TYPE_CLOSED_CAPTIONS + ")");
private static final Pattern REGEX_LANGUAGE = Pattern.compile("LANGUAGE=\"(.+?)\"");
private static final Pattern REGEX_NAME = Pattern.compile("NAME=\"(.+?)\"");
private static final Pattern REGEX_INSTREAM_ID =
Pattern.compile("INSTREAM-ID=\"((?:CC|SERVICE)\\d+)\"");
private static final Pattern REGEX_AUTOSELECT = compileBooleanAttrPattern("AUTOSELECT");
private static final Pattern REGEX_DEFAULT = compileBooleanAttrPattern("DEFAULT");
private static final Pattern REGEX_FORCED = compileBooleanAttrPattern("FORCED");
@Override
public HlsPlaylist parse(Uri uri, InputStream inputStream) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream));
Queue<String> extraLines = new LinkedList<>();
String line;
try {
if (!checkPlaylistHeader(reader)) {
throw new UnrecognizedInputFormatException("Input does not start with the #EXTM3U header.",
uri);
}
while ((line = reader.readLine()) != null) {
line = line.trim();
if (line.isEmpty()) {
// Do nothing.
} else if (line.startsWith(TAG_STREAM_INF)) {
extraLines.add(line);
return parseMasterPlaylist(new LineIterator(extraLines, reader), uri.toString());
} else if (line.startsWith(TAG_TARGET_DURATION)
|| line.startsWith(TAG_MEDIA_SEQUENCE)
|| line.startsWith(TAG_MEDIA_DURATION)
|| line.startsWith(TAG_KEY)
|| line.startsWith(TAG_BYTERANGE)
|| line.equals(TAG_DISCONTINUITY)
|| line.equals(TAG_DISCONTINUITY_SEQUENCE)
|| line.equals(TAG_ENDLIST)) {
extraLines.add(line);
return parseMediaPlaylist(new LineIterator(extraLines, reader), uri.toString());
} else {
extraLines.add(line);
}
}
} finally {
Util.closeQuietly(reader);
}
throw new ParserException("Failed to parse the playlist, could not identify any tags.");
}
private static boolean checkPlaylistHeader(BufferedReader reader) throws IOException {
int last = reader.read();
if (last == 0xEF) {
if (reader.read() != 0xBB || reader.read() != 0xBF) {
return false;
}
// The playlist contains a Byte Order Mark, which gets discarded.
last = reader.read();
}
last = skipIgnorableWhitespace(reader, true, last);
int playlistHeaderLength = PLAYLIST_HEADER.length();
for (int i = 0; i < playlistHeaderLength; i++) {
if (last != PLAYLIST_HEADER.charAt(i)) {
return false;
}
last = reader.read();
}
last = skipIgnorableWhitespace(reader, false, last);
return Util.isLinebreak(last);
}
private static int skipIgnorableWhitespace(BufferedReader reader, boolean skipLinebreaks, int c)
throws IOException {
while (c != -1 && Character.isWhitespace(c) && (skipLinebreaks || !Util.isLinebreak(c))) {
c = reader.read();
}
return c;
}
private static HlsMasterPlaylist parseMasterPlaylist(LineIterator iterator, String baseUri)
throws IOException {
HashSet<String> variantUrls = new HashSet<>();
ArrayList<HlsMasterPlaylist.HlsUrl> variants = new ArrayList<>();
ArrayList<HlsMasterPlaylist.HlsUrl> audios = new ArrayList<>();
ArrayList<HlsMasterPlaylist.HlsUrl> subtitles = new ArrayList<>();
Format muxedAudioFormat = null;
List<Format> muxedCaptionFormats = null;
boolean noClosedCaptions = false;
String line;
while (iterator.hasNext()) {
line = iterator.next();
if (line.startsWith(TAG_MEDIA)) {
@C.SelectionFlags int selectionFlags = parseSelectionFlags(line);
String uri = parseOptionalStringAttr(line, REGEX_URI);
String id = parseStringAttr(line, REGEX_NAME);
String language = parseOptionalStringAttr(line, REGEX_LANGUAGE);
Format format;
switch (parseStringAttr(line, REGEX_TYPE)) {
case TYPE_AUDIO:
format = Format.createAudioContainerFormat(id, MimeTypes.APPLICATION_M3U8, null, null,
Format.NO_VALUE, Format.NO_VALUE, Format.NO_VALUE, null, selectionFlags, language);
if (uri == null) {
muxedAudioFormat = format;
} else {
audios.add(new HlsMasterPlaylist.HlsUrl(uri, format));
}
break;
case TYPE_SUBTITLES:
format = Format.createTextContainerFormat(id, MimeTypes.APPLICATION_M3U8,
MimeTypes.TEXT_VTT, null, Format.NO_VALUE, selectionFlags, language);
subtitles.add(new HlsMasterPlaylist.HlsUrl(uri, format));
break;
case TYPE_CLOSED_CAPTIONS:
String instreamId = parseStringAttr(line, REGEX_INSTREAM_ID);
String mimeType;
int accessibilityChannel;
if (instreamId.startsWith("CC")) {
mimeType = MimeTypes.APPLICATION_CEA608;
accessibilityChannel = Integer.parseInt(instreamId.substring(2));
} else /* starts with SERVICE */ {
mimeType = MimeTypes.APPLICATION_CEA708;
accessibilityChannel = Integer.parseInt(instreamId.substring(7));
}
if (muxedCaptionFormats == null) {
muxedCaptionFormats = new ArrayList<>();
}
muxedCaptionFormats.add(Format.createTextContainerFormat(id, null, mimeType, null,
Format.NO_VALUE, selectionFlags, language, accessibilityChannel));
break;
default:
// Do nothing.
break;
}
} else if (line.startsWith(TAG_STREAM_INF)) {
int bitrate = parseIntAttr(line, REGEX_BANDWIDTH);
String averageBandwidthString = parseOptionalStringAttr(line, REGEX_AVERAGE_BANDWIDTH);
if (averageBandwidthString != null) {
// If available, the average bandwidth attribute is used as the variant's bitrate.
bitrate = Integer.parseInt(averageBandwidthString);
}
String codecs = parseOptionalStringAttr(line, REGEX_CODECS);
String resolutionString = parseOptionalStringAttr(line, REGEX_RESOLUTION);
noClosedCaptions |= line.contains(ATTR_CLOSED_CAPTIONS_NONE);
int width;
int height;
if (resolutionString != null) {
String[] widthAndHeight = resolutionString.split("x");
width = Integer.parseInt(widthAndHeight[0]);
height = Integer.parseInt(widthAndHeight[1]);
if (width <= 0 || height <= 0) {
// Resolution string is invalid.
width = Format.NO_VALUE;
height = Format.NO_VALUE;
}
} else {
width = Format.NO_VALUE;
height = Format.NO_VALUE;
}
line = iterator.next(); // #EXT-X-STREAM-INF's URI.
if (variantUrls.add(line)) {
Format format = Format.createVideoContainerFormat(Integer.toString(variants.size()),
MimeTypes.APPLICATION_M3U8, null, codecs, bitrate, width, height, Format.NO_VALUE,
null, 0);
variants.add(new HlsMasterPlaylist.HlsUrl(line, format));
}
}
}
if (noClosedCaptions) {
muxedCaptionFormats = Collections.emptyList();
}
return new HlsMasterPlaylist(baseUri, variants, audios, subtitles, muxedAudioFormat,
muxedCaptionFormats);
}
@C.SelectionFlags
private static int parseSelectionFlags(String line) {
return (parseBooleanAttribute(line, REGEX_DEFAULT, false) ? C.SELECTION_FLAG_DEFAULT : 0)
| (parseBooleanAttribute(line, REGEX_FORCED, false) ? C.SELECTION_FLAG_FORCED : 0)
| (parseBooleanAttribute(line, REGEX_AUTOSELECT, false) ? C.SELECTION_FLAG_AUTOSELECT : 0);
}
private static HlsMediaPlaylist parseMediaPlaylist(LineIterator iterator, String baseUri)
throws IOException {
@HlsMediaPlaylist.PlaylistType int playlistType = HlsMediaPlaylist.PLAYLIST_TYPE_UNKNOWN;
long startOffsetUs = C.TIME_UNSET;
int mediaSequence = 0;
int version = 1; // Default version == 1.
long targetDurationUs = C.TIME_UNSET;
boolean hasEndTag = false;
Segment initializationSegment = null;
List<Segment> segments = new ArrayList<>();
List<String> dateRanges = new ArrayList<>();
long segmentDurationUs = 0;
boolean hasDiscontinuitySequence = false;
int playlistDiscontinuitySequence = 0;
int relativeDiscontinuitySequence = 0;
long playlistStartTimeUs = 0;
long segmentStartTimeUs = 0;
long segmentByteRangeOffset = 0;
long segmentByteRangeLength = C.LENGTH_UNSET;
int segmentMediaSequence = 0;
boolean isEncrypted = false;
String encryptionKeyUri = null;
String encryptionIV = null;
String line;
while (iterator.hasNext()) {
line = iterator.next();
if (line.startsWith(TAG_PLAYLIST_TYPE)) {
String playlistTypeString = parseStringAttr(line, REGEX_PLAYLIST_TYPE);
if ("VOD".equals(playlistTypeString)) {
playlistType = HlsMediaPlaylist.PLAYLIST_TYPE_VOD;
} else if ("EVENT".equals(playlistTypeString)) {
playlistType = HlsMediaPlaylist.PLAYLIST_TYPE_EVENT;
}
} else if (line.startsWith(TAG_START)) {
startOffsetUs = (long) (parseDoubleAttr(line, REGEX_TIME_OFFSET) * C.MICROS_PER_SECOND);
} else if (line.startsWith(TAG_INIT_SEGMENT)) {
String uri = parseStringAttr(line, REGEX_URI);
String byteRange = parseOptionalStringAttr(line, REGEX_ATTR_BYTERANGE);
if (byteRange != null) {
String[] splitByteRange = byteRange.split("@");
segmentByteRangeLength = Long.parseLong(splitByteRange[0]);
if (splitByteRange.length > 1) {
segmentByteRangeOffset = Long.parseLong(splitByteRange[1]);
}
}
initializationSegment = new Segment(uri, segmentByteRangeOffset, segmentByteRangeLength);
segmentByteRangeOffset = 0;
segmentByteRangeLength = C.LENGTH_UNSET;
} else if (line.startsWith(TAG_TARGET_DURATION)) {
targetDurationUs = parseIntAttr(line, REGEX_TARGET_DURATION) * C.MICROS_PER_SECOND;
} else if (line.startsWith(TAG_MEDIA_SEQUENCE)) {
mediaSequence = parseIntAttr(line, REGEX_MEDIA_SEQUENCE);
segmentMediaSequence = mediaSequence;
} else if (line.startsWith(TAG_VERSION)) {
version = parseIntAttr(line, REGEX_VERSION);
} else if (line.startsWith(TAG_MEDIA_DURATION)) {
segmentDurationUs =
(long) (parseDoubleAttr(line, REGEX_MEDIA_DURATION) * C.MICROS_PER_SECOND);
} else if (line.startsWith(TAG_KEY)) {
String method = parseStringAttr(line, REGEX_METHOD);
isEncrypted = METHOD_AES128.equals(method);
if (isEncrypted) {
encryptionKeyUri = parseStringAttr(line, REGEX_URI);
encryptionIV = parseOptionalStringAttr(line, REGEX_IV);
} else {
encryptionKeyUri = null;
encryptionIV = null;
}
} else if (line.startsWith(TAG_BYTERANGE)) {
String byteRange = parseStringAttr(line, REGEX_BYTERANGE);
String[] splitByteRange = byteRange.split("@");
segmentByteRangeLength = Long.parseLong(splitByteRange[0]);
if (splitByteRange.length > 1) {
segmentByteRangeOffset = Long.parseLong(splitByteRange[1]);
}
} else if (line.startsWith(TAG_DISCONTINUITY_SEQUENCE)) {
hasDiscontinuitySequence = true;
playlistDiscontinuitySequence = Integer.parseInt(line.substring(line.indexOf(':') + 1));
} else if (line.equals(TAG_DISCONTINUITY)) {
relativeDiscontinuitySequence++;
} else if (line.startsWith(TAG_PROGRAM_DATE_TIME)) {
if (playlistStartTimeUs == 0) {
long programDatetimeUs =
C.msToUs(Util.parseXsDateTime(line.substring(line.indexOf(':') + 1)));
playlistStartTimeUs = programDatetimeUs - segmentStartTimeUs;
}
} else if (line.startsWith(TAG_DATERANGE)) {
dateRanges.add(line);
} else if (!line.startsWith("#")) {
String segmentEncryptionIV;
if (!isEncrypted) {
segmentEncryptionIV = null;
} else if (encryptionIV != null) {
segmentEncryptionIV = encryptionIV;
} else {
segmentEncryptionIV = Integer.toHexString(segmentMediaSequence);
}
segmentMediaSequence++;
if (segmentByteRangeLength == C.LENGTH_UNSET) {
segmentByteRangeOffset = 0;
}
segments.add(new Segment(line, segmentDurationUs, relativeDiscontinuitySequence,
segmentStartTimeUs, isEncrypted, encryptionKeyUri, segmentEncryptionIV,
segmentByteRangeOffset, segmentByteRangeLength));
segmentStartTimeUs += segmentDurationUs;
segmentDurationUs = 0;
if (segmentByteRangeLength != C.LENGTH_UNSET) {
segmentByteRangeOffset += segmentByteRangeLength;
}
segmentByteRangeLength = C.LENGTH_UNSET;
} else if (line.equals(TAG_ENDLIST)) {
hasEndTag = true;
}
}
return new HlsMediaPlaylist(playlistType, baseUri, startOffsetUs, playlistStartTimeUs,
hasDiscontinuitySequence, playlistDiscontinuitySequence, mediaSequence, version,
targetDurationUs, hasEndTag, playlistStartTimeUs != 0, initializationSegment, segments,
dateRanges);
}
private static int parseIntAttr(String line, Pattern pattern) throws ParserException {
return Integer.parseInt(parseStringAttr(line, pattern));
}
private static double parseDoubleAttr(String line, Pattern pattern) throws ParserException {
return Double.parseDouble(parseStringAttr(line, pattern));
}
private static String parseOptionalStringAttr(String line, Pattern pattern) {
Matcher matcher = pattern.matcher(line);
return matcher.find() ? matcher.group(1) : null;
}
private static String parseStringAttr(String line, Pattern pattern) throws ParserException {
Matcher matcher = pattern.matcher(line);
if (matcher.find() && matcher.groupCount() == 1) {
return matcher.group(1);
}
throw new ParserException("Couldn't match " + pattern.pattern() + " in " + line);
}
private static boolean parseBooleanAttribute(String line, Pattern pattern, boolean defaultValue) {
Matcher matcher = pattern.matcher(line);
if (matcher.find()) {
return matcher.group(1).equals(BOOLEAN_TRUE);
}
return defaultValue;
}
private static Pattern compileBooleanAttrPattern(String attribute) {
return Pattern.compile(attribute + "=(" + BOOLEAN_FALSE + "|" + BOOLEAN_TRUE + ")");
}
private static class LineIterator {
private final BufferedReader reader;
private final Queue<String> extraLines;
private String next;
public LineIterator(Queue<String> extraLines, BufferedReader reader) {
this.extraLines = extraLines;
this.reader = reader;
}
public boolean hasNext() throws IOException {
if (next != null) {
return true;
}
if (!extraLines.isEmpty()) {
next = extraLines.poll();
return true;
}
while ((next = reader.readLine()) != null) {
next = next.trim();
if (!next.isEmpty()) {
return true;
}
}
return false;
}
public String next() throws IOException {
String result = null;
if (hasNext()) {
result = next;
next = null;
}
return result;
}
}
}
| {
"content_hash": "ac40ac2c0ce48784b9a52eabad977a0c",
"timestamp": "",
"source": "github",
"line_count": 461,
"max_line_length": 100,
"avg_line_length": 43.19522776572668,
"alnum_prop": 0.6654949028272987,
"repo_name": "jeoliva/ExoPlayer",
"id": "c64b98b5f354a9191cdb41958d62f65aba4a90e1",
"size": "20532",
"binary": false,
"copies": "2",
"ref": "refs/heads/release-v2",
"path": "library/hls/src/main/java/com/google/android/exoplayer2/source/hls/playlist/HlsPlaylistParser.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C++",
"bytes": "52901"
},
{
"name": "Java",
"bytes": "3865591"
},
{
"name": "Makefile",
"bytes": "13719"
},
{
"name": "Shell",
"bytes": "5657"
}
],
"symlink_target": ""
} |
#import "NSObject.h"
#import "PBXProjectIndexStatusObserving-Protocol.h"
#import "PBXTrackableTask-Protocol.h"
@class NSString, PBXProjectDocument;
@interface XCIndexerProxy : NSObject <PBXTrackableTask, PBXProjectIndexStatusObserving>
{
PBXProjectDocument *_owningProjectDocument;
float _percentComplete;
NSString *_identifier;
NSString *_lastMessageFromIndexer;
NSString *_localizedIndexingFormatString;
}
- (void)indexingDidStop:(id)arg1;
- (void)indexingDidComplete:(id)arg1;
- (void)indexingWillBegin:(id)arg1;
- (void)indexerDidStop:(id)arg1;
- (void)indexer:(id)arg1 willIndexFile:(id)arg2 inProject:(id)arg3 percentComplete:(long long)arg4;
- (id)taskBadge;
- (id)taskDescriptionString;
- (id)taskDisplayString;
- (id)taskIdentifier;
- (BOOL)taskCanBeStoppedManually;
- (BOOL)taskRequiresIntervention;
- (BOOL)taskStopRunning;
- (int)taskProgressType;
- (float)taskPercentComplete;
- (void)disconnect;
- (void)dealloc;
- (id)initWithProjectDocument:(id)arg1;
@end
| {
"content_hash": "2ff74699c72462ebe91f7e4afd3e6a78",
"timestamp": "",
"source": "github",
"line_count": 38,
"max_line_length": 99,
"avg_line_length": 26.31578947368421,
"alnum_prop": 0.772,
"repo_name": "liyong03/YLCleaner",
"id": "041af9a3108d4e1aec6ce1dcfab3a23d1f11656f",
"size": "1140",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "YLCleaner/Xcode-RuntimeHeaders/DevToolsInterface/XCIndexerProxy.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "158958"
},
{
"name": "C++",
"bytes": "612673"
},
{
"name": "Objective-C",
"bytes": "10594281"
},
{
"name": "Ruby",
"bytes": "675"
}
],
"symlink_target": ""
} |
import os
import train
import argparse
def launch_training(model_name, **kwargs):
# Launch training
train.train(model_name, **d_params)
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Experiments for Eve')
parser.add_argument('list_experiments', type=str, nargs='+',
help='List of experiment names. E.g. Eve SGD Adam --> will run a training session with each optimizer')
parser.add_argument('--model_name', default='CNN', type=str,
help='Model name: CNN, Big_CNN or FCN')
parser.add_argument('--batch_size', default=128, type=int,
help='Batch size')
parser.add_argument('--nb_epoch', default=30, type=int,
help='Number of epochs')
parser.add_argument('--dataset', type=str, default="cifar10",
help='Dataset, cifar10, cifar100 or mnist')
args = parser.parse_args()
list_dir = ["figures", "log"]
for d in list_dir:
if not os.path.exists(d):
os.makedirs(d)
for experiment_name in args.list_experiments:
optimizer = experiment_name.split("_")[0]
assert optimizer in ["Eve", "Adam", "SGD"], "Invalid optimizer"
assert args.model_name in ["CNN", "Big_CNN", "FCN"], "Invalid model name"
# Set default params
d_params = {"optimizer": optimizer,
"experiment_name": experiment_name,
"batch_size": args.batch_size,
"nb_epoch": args.nb_epoch,
"dataset": args.dataset
}
# Launch training
launch_training(args.model_name, **d_params)
| {
"content_hash": "eb7c0aa0ea88dc84bb25d61e750208c0",
"timestamp": "",
"source": "github",
"line_count": 47,
"max_line_length": 127,
"avg_line_length": 36.170212765957444,
"alnum_prop": 0.5682352941176471,
"repo_name": "ChampionZP/DeepLearningImplementations",
"id": "4c0e660a1eb46c2712e2b00efe49743d58cd3195",
"size": "1700",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "Eve/main.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Python",
"bytes": "315943"
}
],
"symlink_target": ""
} |
package com.ayo.robot.action;
/**
* Created by Administrator on 2016/12/13.
*/
public interface OnActionCallback {
void action(String actionName);
}
| {
"content_hash": "66ae292c68e1193d5557fa955e29ef5b",
"timestamp": "",
"source": "github",
"line_count": 9,
"max_line_length": 42,
"avg_line_length": 17.444444444444443,
"alnum_prop": 0.7197452229299363,
"repo_name": "cowthan/UI-Robot",
"id": "984d4f39b45a4c24e3ebb66879e8e60fc282c63c",
"size": "157",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "ayo-robot/src/main/java/com/ayo/robot/action/OnActionCallback.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "388710"
}
],
"symlink_target": ""
} |
FROM balenalib/imx8m-var-dart-ubuntu:bionic-run
ENV GO_VERSION 1.17.7
# gcc for cgo
RUN apt-get update && apt-get install -y --no-install-recommends \
g++ \
gcc \
libc6-dev \
make \
pkg-config \
git \
&& rm -rf /var/lib/apt/lists/*
RUN set -x \
&& fetchDeps=' \
curl \
' \
&& apt-get update && apt-get install -y $fetchDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/local/go \
&& curl -SLO "https://storage.googleapis.com/golang/go$GO_VERSION.linux-arm64.tar.gz" \
&& echo "a5aa1ed17d45ee1d58b4a4099b12f8942acbd1dd09b2e9a6abb1c4898043c5f5 go$GO_VERSION.linux-arm64.tar.gz" | sha256sum -c - \
&& tar -xzf "go$GO_VERSION.linux-arm64.tar.gz" -C /usr/local/go --strip-components=1 \
&& rm -f go$GO_VERSION.linux-arm64.tar.gz
ENV GOROOT /usr/local/go
ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
WORKDIR $GOPATH
CMD ["echo","'No CMD command was set in Dockerfile! Details about CMD command could be found in Dockerfile Guide section in our Docs. Here's the link: https://balena.io/docs"]
RUN curl -SLO "https://raw.githubusercontent.com/balena-io-library/base-images/613d8e9ca8540f29a43fddf658db56a8d826fffe/scripts/assets/tests/test-stack@golang.sh" \
&& echo "Running test-stack@golang" \
&& chmod +x test-stack@golang.sh \
&& bash test-stack@golang.sh \
&& rm -rf test-stack@golang.sh
RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo 'Here are a few details about this Docker image (For more information please visit https://www.balena.io/docs/reference/base-images/base-images/): \nArchitecture: ARM v8 \nOS: Ubuntu bionic \nVariant: run variant \nDefault variable(s): UDEV=off \nThe following software stack is preinstalled: \nGo v1.17.7 \nExtra features: \n- Easy way to install packages with `install_packages <package-name>` command \n- Run anywhere with cross-build feature (for ARM only) \n- Keep the container idling with `balena-idle` command \n- Show base image details with `balena-info` command' > /.balena/messages/image-info
RUN echo '#!/bin/sh.real\nbalena-info\nrm -f /bin/sh\ncp /bin/sh.real /bin/sh\n/bin/sh "$@"' > /bin/sh-shim \
&& chmod +x /bin/sh-shim \
&& cp /bin/sh /bin/sh.real \
&& mv /bin/sh-shim /bin/sh | {
"content_hash": "2d04517fce247fe89ef35e0355c2ab23",
"timestamp": "",
"source": "github",
"line_count": 46,
"max_line_length": 672,
"avg_line_length": 50.17391304347826,
"alnum_prop": 0.7049393414211439,
"repo_name": "resin-io-library/base-images",
"id": "52dbdc6bf854b19d4e9b44c5b7881f0e6cd95188",
"size": "2329",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "balena-base-images/golang/imx8m-var-dart/ubuntu/bionic/1.17.7/run/Dockerfile",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Dockerfile",
"bytes": "71234697"
},
{
"name": "JavaScript",
"bytes": "13096"
},
{
"name": "Shell",
"bytes": "12051936"
},
{
"name": "Smarty",
"bytes": "59789"
}
],
"symlink_target": ""
} |
<?php
namespace Bugs\Http;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel
{
/**
* The application's global HTTP middleware stack.
*
* @var array
*/
protected $middleware = [
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
\Bugs\Http\Middleware\EncryptCookies::class,
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\Bugs\Http\Middleware\VerifyCsrfToken::class,
];
/**
* The application's route middleware.
*
* @var array
*/
protected $routeMiddleware = [
'auth' => \Bugs\Http\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'guest' => \Bugs\Http\Middleware\RedirectIfAuthenticated::class,
];
}
| {
"content_hash": "f93dbff59dc28aeedefa57f00e1cad34",
"timestamp": "",
"source": "github",
"line_count": 33,
"max_line_length": 85,
"avg_line_length": 29.848484848484848,
"alnum_prop": 0.6741116751269035,
"repo_name": "maveius/bugs",
"id": "053b4c0b28837519d89a647e13f93fe9be606afd",
"size": "985",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/Http/Kernel.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "412"
},
{
"name": "CSS",
"bytes": "72"
},
{
"name": "JavaScript",
"bytes": "503"
},
{
"name": "PHP",
"bytes": "461984"
}
],
"symlink_target": ""
} |
from decimal import Decimal as D
import logging
from django.views.generic import RedirectView as DjangoRedirectView
from django.views.generic import View
from django.conf import settings
from django.http import HttpResponse
from django.shortcuts import get_object_or_404
from django.contrib import messages
from django.contrib.auth.models import AnonymousUser
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.db.models import get_model
from django.utils.http import urlencode
from django.utils import six
from django.utils.translation import ugettext_lazy as _
import oscar
from oscar.apps.payment.exceptions import UnableToTakePayment
from oscar.core.loading import get_class
from oscar.apps.shipping.methods import FixedPrice, NoShippingRequired
from oscar.apps.checkout import utils as checkout_utils
from paypal.express.facade import (
get_paypal_url, fetch_transaction_details, confirm_transaction)
from paypal.express.exceptions import (
EmptyBasketException, MissingShippingAddressException,
MissingShippingMethodException, InvalidBasket)
from paypal.exceptions import PayPalError
# Load views dynamically
PaymentDetailsView = get_class('checkout.views', 'PaymentDetailsView')
CheckoutSessionMixin = get_class('checkout.session', 'CheckoutSessionMixin')
ShippingAddress = get_model('order', 'ShippingAddress')
Country = get_model('address', 'Country')
Basket = get_model('basket', 'Basket')
Repository = get_class('shipping.repository', 'Repository')
Applicator = get_class('offer.utils', 'Applicator')
Selector = get_class('partner.strategy', 'Selector')
Source = get_model('payment', 'Source')
SourceType = get_model('payment', 'SourceType')
logger = logging.getLogger('paypal.express')
class ShippingMethodMixin(object):
def get_current_shipping_method(self):
session_data = checkout_utils.CheckoutSessionData(self.request)
shipping_method_code = session_data._get('shipping', 'method_code')
shipping_method = Repository().find_by_code(
shipping_method_code,
self.request.basket,
)
if not shipping_method:
shipping_method = self.get_default_shipping_method(
self.request.basket,
)
return shipping_method
def get_default_shipping_method(self, basket):
return Repository().get_default_shipping_method(
request=self.request,
user=self.request.user,
basket=self.request.basket,
)
class RedirectView(ShippingMethodMixin, CheckoutSessionMixin, DjangoRedirectView):
"""
Initiate the transaction with Paypal and redirect the user
to PayPal's Express Checkout to perform the transaction.
"""
permanent = False
# Setting to distinguish if the site has already collected a shipping
# address. This is False when redirecting to PayPal straight from the
# basket page but True when redirecting from checkout.
as_payment_method = False
def get_redirect_url(self, **kwargs):
try:
basket = self.request.basket
url = self._get_redirect_url(basket, **kwargs)
except PayPalError, e:
messages.error(
self.request, _("An error occurred communicating with PayPal"))
logger.exception("An error occurred communicating with PayPal")
if self.as_payment_method:
url = reverse('checkout:payment-details')
else:
url = reverse('basket:summary')
return url
except InvalidBasket as e:
messages.warning(self.request, six.text_type(e))
logger.exception("Invalid Basket")
return reverse('basket:summary')
except EmptyBasketException, e:
messages.error(self.request, _("Your basket is empty"))
logger.exception("Empty basket")
return reverse('basket:summary')
except MissingShippingAddressException, e:
messages.error(
self.request, _("A shipping address must be specified"))
logger.exception("A shipping address must be specified")
return reverse('checkout:shipping-address')
except MissingShippingMethodException:
messages.error(
self.request,
_("A shipping method must be specified"),
)
return reverse('checkout:shipping-method')
else:
# Transaction successfully registered with PayPal. Now freeze the
# basket so it can't be edited while the customer is on the PayPal
# site.
basket.freeze()
logger.info("Basket #%s - redirecting to %s", basket.id, url)
return url
def _get_redirect_url(self, basket, **kwargs):
if basket.is_empty:
raise EmptyBasketException()
params = {
'basket': basket,
'shipping_methods': [] # setup a default empty list
} # to support no_shipping
user = self.request.user
if self.as_payment_method:
if basket.is_shipping_required():
# Only check for shipping details if required.
shipping_addr = self.get_shipping_address(basket)
if not shipping_addr:
raise MissingShippingAddressException()
shipping_method = self.get_shipping_method(
basket, shipping_addr)
if not shipping_method:
raise MissingShippingMethodException()
params['shipping_address'] = shipping_addr
params['shipping_method'] = shipping_method
params['shipping_methods'] = []
else:
shipping_method = self.get_current_shipping_method()
if shipping_method:
params['shipping_methods'] = [shipping_method]
if settings.DEBUG:
# Determine the localserver's hostname to use when
# in testing mode
params['host'] = self.request.META['HTTP_HOST']
if user.is_authenticated():
params['user'] = user
params['paypal_params'] = self._get_paypal_params()
return get_paypal_url(**params)
def _get_paypal_params(self):
"""
Return any additional PayPal parameters
"""
return {}
class CancelResponseView(RedirectView):
permanent = False
def get(self, request, *args, **kwargs):
basket = get_object_or_404(Basket, id=kwargs['basket_id'],
status=Basket.FROZEN)
basket.thaw()
logger.info("Payment cancelled (token %s) - basket #%s thawed",
request.GET.get('token', '<no token>'), basket.id)
return super(CancelResponseView, self).get(request, *args, **kwargs)
def get_redirect_url(self, **kwargs):
messages.error(self.request, _("PayPal transaction cancelled"))
return reverse('basket:summary')
# Upgrading notes: when we drop support for Oscar 0.6, this class can be
# refactored to pass variables around more explicitly (instead of assigning
# things to self so they are accessible in a later method).
class SuccessResponseView(ShippingMethodMixin, PaymentDetailsView):
template_name_preview = 'paypal/express/preview.html'
preview = True
# We don't have the usual pre-conditions (Oscar 0.7+)
@property
def pre_conditions(self):
return [] if oscar.VERSION[:2] >= (0, 8) else ()
def get(self, request, *args, **kwargs):
"""
Fetch details about the successful transaction from PayPal. We use
these details to show a preview of the order with a 'submit' button to
place it.
"""
try:
self.payer_id = request.GET['PayerID']
self.token = request.GET['token']
except KeyError:
# Manipulation - redirect to basket page with warning message
logger.warning("Missing GET params on success response page")
messages.error(
self.request,
_("Unable to determine PayPal transaction details"))
return HttpResponseRedirect(reverse('basket:summary'))
try:
self.txn = fetch_transaction_details(self.token)
except PayPalError as e:
logger.warning(
"Unable to fetch transaction details for token %s: %s",
self.token, e)
messages.error(
self.request,
_("A problem occurred communicating with PayPal - please try again later"))
return HttpResponseRedirect(reverse('basket:summary'))
# Reload frozen basket which is specified in the URL
kwargs['basket'] = self.load_frozen_basket(kwargs['basket_id'])
if not kwargs['basket']:
logger.warning(
"Unable to load frozen basket with ID %s", kwargs['basket_id'])
messages.error(
self.request,
_("No basket was found that corresponds to your "
"PayPal transaction"))
return HttpResponseRedirect(reverse('basket:summary'))
self.request.basket = kwargs['basket']
logger.info(
"Basket #%s showing preview with payer ID %s and token %s",
kwargs['basket'].id, self.payer_id, self.token)
return super(SuccessResponseView, self).get(request, *args, **kwargs)
def load_frozen_basket(self, basket_id):
# Lookup the frozen basket that this txn corresponds to
try:
basket = Basket.objects.get(id=basket_id, status=Basket.FROZEN)
except Basket.DoesNotExist:
return None
# Assign strategy to basket instance
if Selector:
basket.strategy = Selector().strategy(self.request)
# Re-apply any offers
Applicator().apply(self.request, basket)
return basket
def get_context_data(self, **kwargs):
basket = kwargs.get("basket")
shipping_method = self.get_shipping_method(basket, shipping_address=self.get_shipping_address(basket))
if shipping_method is None:
return kwargs
ctx = super(SuccessResponseView, self).get_context_data(**kwargs)
if not hasattr(self, 'payer_id'):
return ctx
# This context generation only runs when in preview mode
ctx.update({
'payer_id': self.payer_id,
'token': self.token,
'paypal_user_email': self.txn.value('EMAIL'),
'paypal_amount': D(self.txn.value('AMT')),
'show_tax_separately': True,
})
return ctx
def post(self, request, *args, **kwargs):
"""
Place an order.
We fetch the txn details again and then proceed with oscar's standard
payment details view for placing the order.
"""
error_msg = _(
"A problem occurred communicating with PayPal "
"- please try again later"
)
try:
self.payer_id = request.POST['payer_id']
self.token = request.POST['token']
except KeyError:
# Probably suspicious manipulation if we get here
messages.error(self.request, error_msg)
return HttpResponseRedirect(reverse('basket:summary'))
try:
self.txn = fetch_transaction_details(self.token)
except PayPalError:
# Unable to fetch txn details from PayPal - we have to bail out
messages.error(self.request, error_msg)
return HttpResponseRedirect(reverse('basket:summary'))
# Reload frozen basket which is specified in the URL
basket = self.load_frozen_basket(kwargs['basket_id'])
if not basket:
messages.error(self.request, error_msg)
return HttpResponseRedirect(reverse('basket:summary'))
submission = self.build_submission(basket=basket)
return self.submit(**submission)
def build_submission(self, **kwargs):
basket = kwargs['basket']
basket.calculate_tax(
self.get_shipping_address(basket)
)
submission = super(
SuccessResponseView, self).build_submission(**kwargs)
# Adding the tax to the total transaction amount to be sent to Paypal
self.txn.amount = self.txn.amount + basket.total_tax
submission['shipping_method'].set_basket(basket)
shipping_method = submission['shipping_method']
total = self.get_order_totals(
basket, shipping_method=shipping_method)
submission['order_total'] = total
# Pass the user email so it can be stored with the order
submission['order_kwargs']['guest_email'] = self.txn.value('EMAIL')
# Pass PP params
submission['payment_kwargs']['payer_id'] = self.payer_id
submission['payment_kwargs']['token'] = self.token
submission['payment_kwargs']['txn'] = self.txn
return submission
# Warning: This method can be removed when we drop support for Oscar 0.6
def get_error_response(self):
# Check that the user's basket is not empty
if self.request.basket.is_empty:
messages.error(self.request, _(
"You need to add some items to your basket to checkout"))
return HttpResponseRedirect(reverse('basket:summary'))
if self.request.basket.is_shipping_required():
shipping_address = self.get_shipping_address(
self.request.basket)
shipping_method = self.get_shipping_method(
self.request.basket, shipping_address=shipping_address)
# Check that shipping address has been completed
if not shipping_address:
messages.error(
self.request, _("Please choose a shipping address"))
return HttpResponseRedirect(
reverse('checkout:shipping-address'))
# Check that shipping method has been set
if not shipping_method:
self.request.basket.thaw()
return HttpResponseRedirect(reverse('basket:summary'))
def handle_payment(self, order_number, total, **kwargs):
"""
Complete payment with PayPal - this calls the 'DoExpressCheckout'
method to capture the money from the initial transaction.
"""
try:
confirm_txn = confirm_transaction(
kwargs['payer_id'], kwargs['token'], kwargs['txn'].amount,
kwargs['txn'].currency)
except PayPalError:
raise UnableToTakePayment()
if not confirm_txn.is_successful:
raise UnableToTakePayment()
# Record payment source and event
source_type, is_created = SourceType.objects.get_or_create(
name='PayPal')
txn_id = getattr(confirm_txn,"txn_id",None)
source = Source(source_type=source_type,
currency=confirm_txn.currency,
amount_allocated=confirm_txn.amount,
amount_debited=confirm_txn.amount,
reference=txn_id)
self.add_payment_source(source)
self.add_payment_event('Settled', confirm_txn.amount,
reference=confirm_txn.correlation_id)
def get_shipping_address(self, basket):
"""
Return a created shipping address instance, created using
the data returned by PayPal.
"""
# Determine names - PayPal uses a single field
ship_to_name = self.txn.value('PAYMENTREQUEST_0_SHIPTONAME')
if ship_to_name is None:
return None
first_name = last_name = None
parts = ship_to_name.split()
if len(parts) == 1:
last_name = ship_to_name
elif len(parts) > 1:
first_name = parts[0]
last_name = " ".join(parts[1:])
return ShippingAddress(
first_name=first_name,
last_name=last_name,
line1=self.txn.value('PAYMENTREQUEST_0_SHIPTOSTREET'),
line2=self.txn.value('PAYMENTREQUEST_0_SHIPTOSTREET2', default=""),
line4=self.txn.value('PAYMENTREQUEST_0_SHIPTOCITY', default=""),
state=self.txn.value('PAYMENTREQUEST_0_SHIPTOSTATE', default=""),
postcode=self.txn.value('PAYMENTREQUEST_0_SHIPTOZIP'),
country=Country.objects.get(iso_3166_1_a2=self.txn.value('PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE'))
)
def get_shipping_method(self, basket, shipping_address=None, **kwargs):
"""
Return the shipping method used
"""
if not basket.is_shipping_required():
return NoShippingRequired()
code = self.checkout_session.shipping_method_code(basket)
shipping_method = self.get_current_shipping_method()
allowed_countries = [country.pk for country in \
shipping_method.countries.all()]
if shipping_address.country.pk not in allowed_countries:
countries = ", ".join(allowed_countries)
message=_("We do not yet ship to countries outside of {}.".format(
countries))
messages.error(self.request, _(message))
return None
charge_incl_tax = D(self.txn.value('PAYMENTREQUEST_0_SHIPPINGAMT'))
# Assume no tax for now
charge_excl_tax = charge_incl_tax
method = shipping_method
name = self.txn.value('SHIPPINGOPTIONNAME')
if shipping_method:
method.name = shipping_method.name
else:
method.name = name
return method
class ShippingOptionsView(View):
def post(self, request, *args, **kwargs):
"""
We use the shipping address given to use by PayPal to
determine the available shipping method
"""
# Basket ID is passed within the URL path. We need to do this as some
# shipping options depend on the user and basket contents. PayPal do
# pass back details of the basket contents but it would be royal pain to
# reconstitute the basket based on those - easier to just to piggy-back
# the basket ID in the callback URL.
basket = get_object_or_404(Basket, id=kwargs['basket_id'])
user = basket.owner
if not user:
user = AnonymousUser()
# Create a shipping address instance using the data passed back
country_code = self.request.POST.get(
'PAYMENTREQUEST_0_SHIPTOCOUNTRY', None)
try:
country = Country.objects.get(iso_3166_1_a2=country_code)
except Country.DoesNotExist:
country = Country()
shipping_address = ShippingAddress(
line1=self.request.POST.get('PAYMENTREQUEST_0_SHIPTOSTREET', None),
line2=self.request.POST.get('PAYMENTREQUEST_0_SHIPTOSTREET2', None),
line4=self.request.POST.get('PAYMENTREQUEST_0_SHIPTOCITY', None),
state=self.request.POST.get('PAYMENTREQUEST_0_SHIPTOSTATE', None),
postcode=self.request.POST.get('PAYMENTREQUEST_0_SHIPTOZIP', None),
country=country
)
methods = self.get_shipping_methods(user, basket, shipping_address)
return self.render_to_response(methods, basket)
def render_to_response(self, methods, basket):
pairs = [
('METHOD', 'CallbackResponse'),
('CURRENCYCODE', self.request.POST.get('CURRENCYCODE', 'GBP')),
]
for index, method in enumerate(methods):
if hasattr(method, 'set_basket'):
# Oscar < 0.8
method.set_basket(basket)
charge = method.charge_incl_tax
else:
cost = method.calculate(basket)
charge = cost.incl_tax
pairs.append(('L_SHIPPINGOPTIONNAME%d' % index,
six.text_type(method.name)))
pairs.append(('L_SHIPPINGOPTIONLABEL%d' % index,
six.text_type(method.name)))
pairs.append(('L_SHIPPINGOPTIONAMOUNT%d' % index, charge))
# For now, we assume tax and insurance to be zero
pairs.append(('L_TAXAMT%d' % index, D('0.00')))
pairs.append(('L_INSURANCEAMT%d' % index, D('0.00')))
# We assume that the first returned method is the default one
pairs.append(('L_SHIPPINGOPTIONISDEFAULT%d' % index, 1 if index == 0 else 0))
else:
# No shipping methods available - we flag this up to PayPal indicating that we
# do not ship to the shipping address.
pairs.append(('NO_SHIPPING_OPTION_DETAILS', 1))
payload = urlencode(pairs)
return HttpResponse(payload)
def get_shipping_methods(self, user, basket, shipping_address):
repo = Repository()
return repo.get_shipping_methods(
user, basket, shipping_addr=shipping_address)
| {
"content_hash": "a3e8c65bd2d004d3eda037868b20a6e9",
"timestamp": "",
"source": "github",
"line_count": 546,
"max_line_length": 110,
"avg_line_length": 38.97435897435897,
"alnum_prop": 0.6113721804511278,
"repo_name": "britco/django-oscar-paypal",
"id": "e115f63304621ecd14aa0abf14cfb965844df1e3",
"size": "21280",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "paypal/express/views.py",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "HTML",
"bytes": "14220"
},
{
"name": "Makefile",
"bytes": "440"
},
{
"name": "Python",
"bytes": "130211"
},
{
"name": "Shell",
"bytes": "104"
}
],
"symlink_target": ""
} |
/* jshint latedef:false */
/* jshint forin:false */
/* jshint noempty:false */
'use strict';
var msRestAzure = require('ms-rest-azure');
exports.BaseResource = msRestAzure.BaseResource;
exports.CloudError = msRestAzure.CloudError;
exports.Sku = require('./sku');
exports.JobMaxRecurrence = require('./jobMaxRecurrence');
exports.JobCollectionQuota = require('./jobCollectionQuota');
exports.JobCollectionProperties = require('./jobCollectionProperties');
exports.JobCollectionDefinition = require('./jobCollectionDefinition');
exports.HttpAuthentication = require('./httpAuthentication');
exports.HttpRequest = require('./httpRequest');
exports.StorageQueueMessage = require('./storageQueueMessage');
exports.ServiceBusMessage = require('./serviceBusMessage');
exports.ServiceBusQueueMessage = require('./serviceBusQueueMessage');
exports.ServiceBusTopicMessage = require('./serviceBusTopicMessage');
exports.RetryPolicy = require('./retryPolicy');
exports.JobErrorAction = require('./jobErrorAction');
exports.JobAction = require('./jobAction');
exports.JobRecurrenceScheduleMonthlyOccurrence = require('./jobRecurrenceScheduleMonthlyOccurrence');
exports.JobRecurrenceSchedule = require('./jobRecurrenceSchedule');
exports.JobRecurrence = require('./jobRecurrence');
exports.JobStatus = require('./jobStatus');
exports.JobProperties = require('./jobProperties');
exports.JobDefinition = require('./jobDefinition');
exports.JobHistoryDefinitionProperties = require('./jobHistoryDefinitionProperties');
exports.JobHistoryDefinition = require('./jobHistoryDefinition');
exports.ClientCertAuthentication = require('./clientCertAuthentication');
exports.BasicAuthentication = require('./basicAuthentication');
exports.OAuthAuthentication = require('./oAuthAuthentication');
exports.ServiceBusAuthentication = require('./serviceBusAuthentication');
exports.ServiceBusBrokeredMessageProperties = require('./serviceBusBrokeredMessageProperties');
exports.JobStateFilter = require('./jobStateFilter');
exports.JobHistoryFilter = require('./jobHistoryFilter');
exports.JobCollectionListResult = require('./jobCollectionListResult');
exports.JobListResult = require('./jobListResult');
exports.JobHistoryListResult = require('./jobHistoryListResult');
exports.discriminators = {
'HttpAuthentication' : exports.HttpAuthentication,
'HttpAuthentication.ClientCertificate' : exports.ClientCertAuthentication,
'HttpAuthentication.Basic' : exports.BasicAuthentication,
'HttpAuthentication.ActiveDirectoryOAuth' : exports.OAuthAuthentication
};
| {
"content_hash": "a4e3a4d214251735e9978bb43c2a52de",
"timestamp": "",
"source": "github",
"line_count": 50,
"max_line_length": 101,
"avg_line_length": 50.84,
"alnum_prop": 0.8040912667191188,
"repo_name": "amarzavery/azure-sdk-for-node",
"id": "5f8a792ad83a703e8191b45d84c6ab66f7a5ac00",
"size": "2859",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "lib/services/schedulerManagement2/lib/models/index.js",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "661"
},
{
"name": "JavaScript",
"bytes": "85615658"
},
{
"name": "Shell",
"bytes": "437"
}
],
"symlink_target": ""
} |
CKEDITOR.plugins.setLang( 'codemirror', 'lt', {
toolbar: 'Šaltinis',
autoFormat: 'Format Selection',
commentSelectedRange: 'Comment Selection',
uncommentSelectedRange: 'Uncomment Selection'
});
| {
"content_hash": "fa6da496f4438ac7b9ac83b0a23d5fd9",
"timestamp": "",
"source": "github",
"line_count": 7,
"max_line_length": 47,
"avg_line_length": 28.571428571428573,
"alnum_prop": 0.75,
"repo_name": "sfarmar/Orchard",
"id": "d0aec6a444135a257d4323a024de6a748febdcfa",
"size": "347",
"binary": false,
"copies": "10",
"ref": "refs/heads/master",
"path": "src/Orchard.Web/Modules/CKEditor/Scripts/ckeditor/plugins/codemirror/lang/lt.js",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "ASP",
"bytes": "1401"
},
{
"name": "C",
"bytes": "4755"
},
{
"name": "C#",
"bytes": "8037024"
},
{
"name": "CSS",
"bytes": "580393"
},
{
"name": "JavaScript",
"bytes": "3899205"
},
{
"name": "PHP",
"bytes": "2203"
},
{
"name": "Shell",
"bytes": "6837"
},
{
"name": "TypeScript",
"bytes": "48134"
},
{
"name": "XSLT",
"bytes": "119918"
}
],
"symlink_target": ""
} |
<!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">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>V8 API Reference Guide for node.js v8.7.0 - v8.8.1: Namespace Members</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">V8 API Reference Guide for node.js v8.7.0 - v8.8.1
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li class="current"><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="namespaces.html"><span>Namespace List</span></a></li>
<li class="current"><a href="namespacemembers.html"><span>Namespace Members</span></a></li>
</ul>
</div>
<div id="navrow3" class="tabs2">
<ul class="tablist">
<li><a href="namespacemembers.html"><span>All</span></a></li>
<li class="current"><a href="namespacemembers_type.html"><span>Typedefs</span></a></li>
<li><a href="namespacemembers_enum.html"><span>Enumerations</span></a></li>
<li><a href="namespacemembers_eval.html"><span>Enumerator</span></a></li>
</ul>
</div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="contents">
 <ul>
<li>AccessCheckCallback
: <a class="el" href="namespacev8.html#a1024fb358d107c1494163217830688e6">v8</a>
</li>
<li>AccessorGetterCallback
: <a class="el" href="namespacev8.html#a722613c87061708a4f1aa050d095f868">v8</a>
</li>
<li>DeprecatedAllowCodeGenerationFromStringsCallback
: <a class="el" href="namespacev8.html#a4d2e4c6b524fc54a5095ed4562012f8d">v8</a>
</li>
<li>EntropySource
: <a class="el" href="namespacev8.html#ab699f4bbbb56350e6e915682e420fcdc">v8</a>
</li>
<li>FunctionEntryHook
: <a class="el" href="namespacev8.html#aaf07fb6bb13f295da3c6568938b7dec5">v8</a>
</li>
<li>GenericNamedPropertyDefinerCallback
: <a class="el" href="namespacev8.html#a66c854bc88d612ab4c65354bc0dc74a0">v8</a>
</li>
<li>GenericNamedPropertyDeleterCallback
: <a class="el" href="namespacev8.html#ad2aecc0406ea4bc02d5a4f84a433b273">v8</a>
</li>
<li>GenericNamedPropertyDescriptorCallback
: <a class="el" href="namespacev8.html#a8cf8faa26baffa84173a24906c0d49f6">v8</a>
</li>
<li>GenericNamedPropertyEnumeratorCallback
: <a class="el" href="namespacev8.html#a20826eb7e52e84fa4f632534e8eddd04">v8</a>
</li>
<li>GenericNamedPropertyGetterCallback
: <a class="el" href="namespacev8.html#a24b1801fa53a7c5a71366d8044927563">v8</a>
</li>
<li>GenericNamedPropertyQueryCallback
: <a class="el" href="namespacev8.html#add9f7ab11e4a9a2b9ad2c4536b0e1a64">v8</a>
</li>
<li>GenericNamedPropertySetterCallback
: <a class="el" href="namespacev8.html#af74716c6e95a269c6cd4314662fd0a7e">v8</a>
</li>
<li>HostImportModuleDynamicallyCallback
: <a class="el" href="namespacev8.html#a550b70205553eed9dd5512e3668fef19">v8</a>
</li>
<li>IndexedPropertyDefinerCallback
: <a class="el" href="namespacev8.html#a967435db933fa9798caac467948499df">v8</a>
</li>
<li>IndexedPropertyDeleterCallback
: <a class="el" href="namespacev8.html#a53863728de14cde48dd6543207b2f2da">v8</a>
</li>
<li>IndexedPropertyDescriptorCallback
: <a class="el" href="namespacev8.html#a7506e91d70d885b5cbeabdf870ac0e88">v8</a>
</li>
<li>IndexedPropertyEnumeratorCallback
: <a class="el" href="namespacev8.html#adbb0a6d5537371953f9ba807d4f6275e">v8</a>
</li>
<li>IndexedPropertyGetterCallback
: <a class="el" href="namespacev8.html#a48e7816ba64447bf32a25d194588daaf">v8</a>
</li>
<li>IndexedPropertyQueryCallback
: <a class="el" href="namespacev8.html#a980b62c33eb664783e61e25c3b27f9ee">v8</a>
</li>
<li>IndexedPropertySetterCallback
: <a class="el" href="namespacev8.html#a4ac7cc6185ebc8b6a199f9fa8e6bf5c3">v8</a>
</li>
<li>JitCodeEventHandler
: <a class="el" href="namespacev8.html#a39243bc91e63d64d111452fdb98c4733">v8</a>
</li>
<li>NamedPropertyDeleterCallback
: <a class="el" href="namespacev8.html#aaba861076c5b111912cfa0791d348437">v8</a>
</li>
<li>NamedPropertyEnumeratorCallback
: <a class="el" href="namespacev8.html#a5f6f16818a9cddacadbfe6d90ca3a6b1">v8</a>
</li>
<li>NamedPropertyGetterCallback
: <a class="el" href="namespacev8.html#a50cae386a68bf9ff23d02aa1161face4">v8</a>
</li>
<li>NamedPropertyQueryCallback
: <a class="el" href="namespacev8.html#ac135beae5f0c8b290255accb438f990e">v8</a>
</li>
<li>NamedPropertySetterCallback
: <a class="el" href="namespacev8.html#a9587769513971dc7cb301b740d9e66b6">v8</a>
</li>
<li>ReturnAddressLocationResolver
: <a class="el" href="namespacev8.html#a8ce54c75241be41ff6a25e9944eefd2a">v8</a>
</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
| {
"content_hash": "2c9d9607def47b5e4781d535a59acae6",
"timestamp": "",
"source": "github",
"line_count": 185,
"max_line_length": 154,
"avg_line_length": 40.77297297297297,
"alnum_prop": 0.70648283176455,
"repo_name": "v8-dox/v8-dox.github.io",
"id": "a776d7b0e5e6ea9082dfa4f71b1111219bb65ab5",
"size": "7543",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "c17ff62/html/namespacemembers_type.html",
"mode": "33188",
"license": "mit",
"language": [],
"symlink_target": ""
} |
namespace CPF
{
namespace StandardTetris
{
class STOpenGLFont
{
public: static unsigned char Courier10FontBitmap[2048];
public: static GLuint gFontTextureName;
public: static void FontMakeTexture();
public: static void FontPrint( float x, float y, const char *format, ... );
};
}
}
#endif
| {
"content_hash": "109e07d2fae68cce89413b91d5c6b856",
"timestamp": "",
"source": "github",
"line_count": 34,
"max_line_length": 79,
"avg_line_length": 9.764705882352942,
"alnum_prop": 0.6656626506024096,
"repo_name": "misakamm/StandardTetris",
"id": "66ea4238f4e9cb2fa7f4a8ed191290775c567e40",
"size": "993",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "StandardTetrisMSVC2005/StandardTetrisMSVC2005/source/CPF.StandardTetris.STOpenGLFont.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "4722"
},
{
"name": "C++",
"bytes": "429364"
}
],
"symlink_target": ""
} |
<!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">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>V8 API Reference Guide for node.js v6.0.0: Member List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">V8 API Reference Guide for node.js v6.0.0
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="classes.html"><span>Class Index</span></a></li>
<li><a href="inherits.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacev8.html">v8</a></li><li class="navelem"><a class="el" href="classv8_1_1Debug.html">Debug</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">v8::Debug Member List</div> </div>
</div><!--header-->
<div class="contents">
<p>This is the complete list of members for <a class="el" href="classv8_1_1Debug.html">v8::Debug</a>, including all inherited members.</p>
<table class="directory">
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>Call</b>(Local< Context > context, v8::Local< v8::Function > fun, Local< Value > data=Local< Value >()) (defined in <a class="el" href="classv8_1_1Debug.html">v8::Debug</a>)</td><td class="entry"><a class="el" href="classv8_1_1Debug.html">v8::Debug</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>CancelDebugBreak</b>(Isolate *isolate) (defined in <a class="el" href="classv8_1_1Debug.html">v8::Debug</a>)</td><td class="entry"><a class="el" href="classv8_1_1Debug.html">v8::Debug</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>CheckDebugBreak</b>(Isolate *isolate) (defined in <a class="el" href="classv8_1_1Debug.html">v8::Debug</a>)</td><td class="entry"><a class="el" href="classv8_1_1Debug.html">v8::Debug</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>DebugBreak</b>(Isolate *isolate) (defined in <a class="el" href="classv8_1_1Debug.html">v8::Debug</a>)</td><td class="entry"><a class="el" href="classv8_1_1Debug.html">v8::Debug</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classv8_1_1Debug.html#a91cd8aa9743e3478bc63fe73abcd557c">DebugMessageDispatchHandler</a> typedef</td><td class="entry"><a class="el" href="classv8_1_1Debug.html">v8::Debug</a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="classv8_1_1Debug.html#ab53894746a21222796062f0e81ea28d8">EventCallback</a> typedef</td><td class="entry"><a class="el" href="classv8_1_1Debug.html">v8::Debug</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classv8_1_1Debug.html#abcf6727d68c5f8c35eef75a72e6a0da8">GetDebugContext</a>(Isolate *isolate)</td><td class="entry"><a class="el" href="classv8_1_1Debug.html">v8::Debug</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr><td class="entry"><a class="el" href="classv8_1_1Debug.html#a10ef14b11ffdd57287f25b39dc728e07">GetInternalProperties</a>(Isolate *isolate, Local< Value > value)</td><td class="entry"><a class="el" href="classv8_1_1Debug.html">v8::Debug</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>GetMirror</b>(Local< Context > context, v8::Local< v8::Value > obj) (defined in <a class="el" href="classv8_1_1Debug.html">v8::Debug</a>)</td><td class="entry"><a class="el" href="classv8_1_1Debug.html">v8::Debug</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr><td class="entry"><a class="el" href="classv8_1_1Debug.html#a526826b857bd3e3efa184e12bcebc694">MessageHandler</a> typedef</td><td class="entry"><a class="el" href="classv8_1_1Debug.html">v8::Debug</a></td><td class="entry"></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classv8_1_1Debug.html#af005b911101260e0458847d149d5610e">ProcessDebugMessages</a>(Isolate *isolate)</td><td class="entry"><a class="el" href="classv8_1_1Debug.html">v8::Debug</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>SendCommand</b>(Isolate *isolate, const uint16_t *command, int length, ClientData *client_data=NULL) (defined in <a class="el" href="classv8_1_1Debug.html">v8::Debug</a>)</td><td class="entry"><a class="el" href="classv8_1_1Debug.html">v8::Debug</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>SetDebugEventListener</b>(Isolate *isolate, EventCallback that, Local< Value > data=Local< Value >()) (defined in <a class="el" href="classv8_1_1Debug.html">v8::Debug</a>)</td><td class="entry"><a class="el" href="classv8_1_1Debug.html">v8::Debug</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr><td class="entry"><a class="el" href="classv8_1_1Debug.html#ab635f979d369bed13187e2594d825517">SetLiveEditEnabled</a>(Isolate *isolate, bool enable)</td><td class="entry"><a class="el" href="classv8_1_1Debug.html">v8::Debug</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>SetMessageHandler</b>(Isolate *isolate, MessageHandler handler) (defined in <a class="el" href="classv8_1_1Debug.html">v8::Debug</a>)</td><td class="entry"><a class="el" href="classv8_1_1Debug.html">v8::Debug</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>V8_DEPRECATED</b>("Use version with an Isolate", static bool SetDebugEventListener(EventCallback that, Local< Value > data=Local< Value >())) (defined in <a class="el" href="classv8_1_1Debug.html">v8::Debug</a>)</td><td class="entry"><a class="el" href="classv8_1_1Debug.html">v8::Debug</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>V8_DEPRECATED</b>("Use version with an Isolate", static void SetMessageHandler(MessageHandler handler)) (defined in <a class="el" href="classv8_1_1Debug.html">v8::Debug</a>)</td><td class="entry"><a class="el" href="classv8_1_1Debug.html">v8::Debug</a></td><td class="entry"></td></tr>
<tr><td class="entry"><a class="el" href="classv8_1_1Debug.html#a6350dc826625864ee045783685bed057">V8_DEPRECATED</a>("Use maybe version", Local< Value > Call(v8::Local< v8::Function > fun, Local< Value > data=Local< Value >()))</td><td class="entry"><a class="el" href="classv8_1_1Debug.html">v8::Debug</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr class="even"><td class="entry"><a class="el" href="classv8_1_1Debug.html#aeda86872fb9c66df641e6d16c8db7182">V8_DEPRECATED</a>("Use maybe version", Local< Value > GetMirror(v8::Local< v8::Value > obj))</td><td class="entry"><a class="el" href="classv8_1_1Debug.html">v8::Debug</a></td><td class="entry"><span class="mlabel">static</span></td></tr>
<tr bgcolor="#f0f0f0"><td class="entry"><b>V8_DEPRECATED</b>("Use version with an Isolate", static void ProcessDebugMessages()) (defined in <a class="el" href="classv8_1_1Debug.html">v8::Debug</a>)</td><td class="entry"><a class="el" href="classv8_1_1Debug.html">v8::Debug</a></td><td class="entry"></td></tr>
<tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>V8_DEPRECATED</b>("Use version with an Isolate", static Local< Context > GetDebugContext()) (defined in <a class="el" href="classv8_1_1Debug.html">v8::Debug</a>)</td><td class="entry"><a class="el" href="classv8_1_1Debug.html">v8::Debug</a></td><td class="entry"></td></tr>
</table></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
| {
"content_hash": "2a634a0202c8d91271917abfe8a244ed",
"timestamp": "",
"source": "github",
"line_count": 127,
"max_line_length": 409,
"avg_line_length": 88.68503937007874,
"alnum_prop": 0.669448637130427,
"repo_name": "v8-dox/v8-dox.github.io",
"id": "000610cf4cef6fa4035b4d2b108b8ea319389db5",
"size": "11263",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "c1729b0/html/classv8_1_1Debug-members.html",
"mode": "33188",
"license": "mit",
"language": [],
"symlink_target": ""
} |
package com.wut.support.networking;
public class MacAddressHelper {
public static String getHostMacAddress() {
StringBuilder sb = new StringBuilder();
sb.append("1.1.1.1");
return sb.toString();
}
public static void main(String[] args) {
String macAddr = MacAddressHelper.getHostMacAddress();
System.out.print("Mac Address: ");
System.out.println(macAddr);
}
} | {
"content_hash": "02f7e95fca0c7253c57169e8ca7954bc",
"timestamp": "",
"source": "github",
"line_count": 17,
"max_line_length": 56,
"avg_line_length": 22.352941176470587,
"alnum_prop": 0.7210526315789474,
"repo_name": "WebUtilityKit/api-server",
"id": "c2fdb153dcb7e516af31f1f833c824c909d83042",
"size": "380",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "core/src/main/java/com/wut/support/networking/MacAddressHelper.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "1119746"
},
{
"name": "JavaScript",
"bytes": "3422"
},
{
"name": "Python",
"bytes": "5253"
},
{
"name": "Shell",
"bytes": "7081"
}
],
"symlink_target": ""
} |
class CreateEntries < ActiveRecord::Migration
def change
create_table :entries do |t|
t.integer "event_id"
t.integer "customer_id"
t.datetime "order_date_time"
t.timestamps null: false
end
add_index :entries, [:event_id, :customer_id], unique: true
end
end
| {
"content_hash": "66dbadc5174fea9c6f55da64b6867989",
"timestamp": "",
"source": "github",
"line_count": 12,
"max_line_length": 63,
"avg_line_length": 24.833333333333332,
"alnum_prop": 0.6543624161073825,
"repo_name": "leminhtuan2015/test_temona",
"id": "a02fa9cd56a39d20ee1767362564fff2832029af",
"size": "298",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "db/migrate/20150422080558_create_entries.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "162071"
},
{
"name": "HTML",
"bytes": "189875"
},
{
"name": "JavaScript",
"bytes": "186158"
},
{
"name": "Ruby",
"bytes": "696171"
}
],
"symlink_target": ""
} |
namespace memory_pressure {
namespace test {
FakeMemoryPressureMonitor::FakeMemoryPressureMonitor() = default;
FakeMemoryPressureMonitor::~FakeMemoryPressureMonitor() = default;
void FakeMemoryPressureMonitor::SetAndNotifyMemoryPressure(
MemoryPressureLevel level) {
memory_pressure_level_ = level;
base::MemoryPressureListener::SimulatePressureNotification(level);
}
base::MemoryPressureMonitor::MemoryPressureLevel
FakeMemoryPressureMonitor::GetCurrentPressureLevel() const {
return memory_pressure_level_;
}
void FakeMemoryPressureMonitor::SetDispatchCallback(
const DispatchCallback& callback) {
LOG(ERROR) << "FakeMemoryPressureMonitor::SetDispatchCallback";
}
} // namespace test
} // namespace memory_pressure
| {
"content_hash": "9f7b8b2ec902669f3fe964c1bdfa9062",
"timestamp": "",
"source": "github",
"line_count": 25,
"max_line_length": 68,
"avg_line_length": 29.64,
"alnum_prop": 0.8083670715249662,
"repo_name": "scheib/chromium",
"id": "c5759849401b7a87bda8c0ee97aaa4f0ab8194a9",
"size": "1003",
"binary": false,
"copies": "2",
"ref": "refs/heads/main",
"path": "components/memory_pressure/fake_memory_pressure_monitor.cc",
"mode": "33188",
"license": "bsd-3-clause",
"language": [],
"symlink_target": ""
} |
/*
* User: anna
* Date: 05-Apr-2007
*/
package com.intellij.ide.favoritesTreeView;
import com.intellij.ide.projectView.impl.GroupByTypeComparator;
import com.intellij.ide.util.treeView.NodeDescriptor;
/**
* @author Konstantin Bulenkov
*/
final class FavoriteComparator extends GroupByTypeComparator {
public FavoriteComparator() {
super(null, FavoritesViewTreeBuilder.ID);
}
@Override
public int compare(NodeDescriptor d1, NodeDescriptor d2) {
if (d1 instanceof FavoritesTreeNodeDescriptor && d2 instanceof FavoritesTreeNodeDescriptor) {
d1 = ((FavoritesTreeNodeDescriptor)d1).getElement();
d2 = ((FavoritesTreeNodeDescriptor)d2).getElement();
}
return super.compare(d1, d2);
}
} | {
"content_hash": "cdc6a4afa492d7d72a528f981840dffa",
"timestamp": "",
"source": "github",
"line_count": 27,
"max_line_length": 97,
"avg_line_length": 26.88888888888889,
"alnum_prop": 0.743801652892562,
"repo_name": "consulo/consulo",
"id": "9e567b48819c6718cb4ef08a535c4df979438fe0",
"size": "726",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "modules/base/lang-impl/src/main/java/com/intellij/ide/favoritesTreeView/FavoriteComparator.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "299"
},
{
"name": "C",
"bytes": "52718"
},
{
"name": "C++",
"bytes": "72795"
},
{
"name": "CMake",
"bytes": "854"
},
{
"name": "CSS",
"bytes": "64655"
},
{
"name": "Groovy",
"bytes": "36006"
},
{
"name": "HTML",
"bytes": "173780"
},
{
"name": "Java",
"bytes": "64026758"
},
{
"name": "Lex",
"bytes": "5909"
},
{
"name": "Objective-C",
"bytes": "23787"
},
{
"name": "Python",
"bytes": "3276"
},
{
"name": "SCSS",
"bytes": "9782"
},
{
"name": "Shell",
"bytes": "5689"
},
{
"name": "Thrift",
"bytes": "1216"
},
{
"name": "XSLT",
"bytes": "49230"
}
],
"symlink_target": ""
} |
title: Qbservable.Return<TResult>(IQbservableProvider, TResult)
---
# Qbservable.Return\<TResult\> Method (IQbservableProvider, TResult)
Returns a queryable observable sequence that contains a single element with a specified value.
**Namespace:** [System.Reactive.Linq](System.Reactive.Linq/System.Reactive.Linq)
**Assembly:** System.Reactive.Providers (in System.Reactive.Providers.dll)
## Syntax
```vb
'Declaration
<ExtensionAttribute> _
Public Shared Function Return(Of TResult) ( _
provider As IQbservableProvider, _
value As TResult _
) As IQbservable(Of TResult)
```
```vb
'Usage
Dim provider As IQbservableProvider
Dim value As TResult
Dim returnValue As IQbservable(Of TResult)
returnValue = provider.Return(value)
```
```csharp
public static IQbservable<TResult> Return<TResult>(
this IQbservableProvider provider,
TResult value
)
```
```c++
[ExtensionAttribute]
public:
generic<typename TResult>
static IQbservable<TResult>^ Return(
IQbservableProvider^ provider,
TResult value
)
```
```fsharp
static member Return :
provider:IQbservableProvider *
value:'TResult -> IQbservable<'TResult>
```
```javascript
JScript does not support generic types and methods.
```
#### Type Parameters
- TResult
The type of result.
#### Parameters
- provider
Type: [System.Reactive.Linq.IQbservableProvider](IQbservableProvider/IQbservableProvider)
The local Qbservable provider.
- value
Type: TResult
The single element in the resulting queryable observable sequence.
#### Return Value
Type: [System.Reactive.Linq.IQbservable](IQbservable/IQbservable(TSource))\<TResult\>
The queryable observable sequence containing the single specified element.
#### Usage Note
In Visual Basic and C\#, you can call this method as an instance method on any object of type [IQbservableProvider](IQbservableProvider/IQbservableProvider). When you use instance method syntax to call this method, omit the first parameter. For more information, see [](https://msdn.microsoft.com/en-us/library/Bb384936) or [](https://msdn.microsoft.com/en-us/library/Bb383977).
## See Also
#### Reference
[Qbservable Class](Qbservable/Qbservable)
[Return Overload](Return/Qbservable.Return)
[System.Reactive.Linq Namespace](System.Reactive.Linq/System.Reactive.Linq)
# Qbservable.Return\<TResult\> Method (IQbservableProvider, TResult, IScheduler)
Returns a queryable observable sequence that contains a single value with a specified value and scheduler.
**Namespace:** [System.Reactive.Linq](System.Reactive.Linq/System.Reactive.Linq)
**Assembly:** System.Reactive.Providers (in System.Reactive.Providers.dll)
## Syntax
```vb
'Declaration
<ExtensionAttribute> _
Public Shared Function Return(Of TResult) ( _
provider As IQbservableProvider, _
value As TResult, _
scheduler As IScheduler _
) As IQbservable(Of TResult)
```
```vb
'Usage
Dim provider As IQbservableProvider
Dim value As TResult
Dim scheduler As IScheduler
Dim returnValue As IQbservable(Of TResult)
returnValue = provider.Return(value, _
scheduler)
```
```csharp
public static IQbservable<TResult> Return<TResult>(
this IQbservableProvider provider,
TResult value,
IScheduler scheduler
)
```
```c++
[ExtensionAttribute]
public:
generic<typename TResult>
static IQbservable<TResult>^ Return(
IQbservableProvider^ provider,
TResult value,
IScheduler^ scheduler
)
```
```fsharp
static member Return :
provider:IQbservableProvider *
value:'TResult *
scheduler:IScheduler -> IQbservable<'TResult>
```
```javascript
JScript does not support generic types and methods.
```
#### Type Parameters
- TResult
The type of result.
#### Parameters
- provider
Type: [System.Reactive.Linq.IQbservableProvider](IQbservableProvider/IQbservableProvider)
The local Qbservable provider.
- value
Type: TResult
The single element in the resulting observable sequence.
- scheduler
Type: [System.Reactive.Concurrency.IScheduler](IScheduler/IScheduler)
The scheduler to send the single element on.
#### Return Value
Type: [System.Reactive.Linq.IQbservable](IQbservable/IQbservable(TSource))\<TResult\>
The queryable observable sequence containing the single specified element.
#### Usage Note
In Visual Basic and C\#, you can call this method as an instance method on any object of type [IQbservableProvider](IQbservableProvider/IQbservableProvider). When you use instance method syntax to call this method, omit the first parameter. For more information, see [](https://msdn.microsoft.com/en-us/library/Bb384936) or [](https://msdn.microsoft.com/en-us/library/Bb383977).
## See Also
#### Reference
[Qbservable Class](Qbservable/Qbservable)
[Return Overload](Return/Qbservable.Return)
[System.Reactive.Linq Namespace](System.Reactive.Linq/System.Reactive.Linq)
| {
"content_hash": "8d2f8b34b4e6a837655a4d36dfe8c2bb",
"timestamp": "",
"source": "github",
"line_count": 187,
"max_line_length": 378,
"avg_line_length": 26.09090909090909,
"alnum_prop": 0.7513834802213568,
"repo_name": "reactiveui/website",
"id": "d596244e12364b8433b0d9a866be4d459bc5faa3",
"size": "4883",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "input/reactive-extensions/Return/Qbservable.Return(TResult).md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "78"
},
{
"name": "C#",
"bytes": "4974"
},
{
"name": "CSS",
"bytes": "17724"
},
{
"name": "HTML",
"bytes": "65685"
},
{
"name": "JavaScript",
"bytes": "21424"
},
{
"name": "Less",
"bytes": "36887"
},
{
"name": "PowerShell",
"bytes": "4239"
},
{
"name": "Shell",
"bytes": "1658"
}
],
"symlink_target": ""
} |
export LSCOLORS="exfxcxdxbxegedabagacad"
export CLICOLOR=true
fpath=($DOTFILES/functions $fpath)
autoload -U $DOTFILES/functions/*(:t)
HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
setopt NO_BG_NICE # don't nice background tasks
setopt NO_HUP
setopt NO_LIST_BEEP
setopt LOCAL_OPTIONS # allow functions to have local options
setopt LOCAL_TRAPS # allow functions to have local traps
setopt HIST_VERIFY
setopt SHARE_HISTORY # share history between sessions ???
setopt EXTENDED_HISTORY # add timestamps to history
setopt PROMPT_SUBST
setopt CORRECT
setopt COMPLETE_IN_WORD
setopt IGNORE_EOF
setopt APPEND_HISTORY # adds history
setopt INC_APPEND_HISTORY SHARE_HISTORY # adds history incrementally and share it across sessions
setopt HIST_IGNORE_ALL_DUPS # don't record dupes in history
setopt HIST_REDUCE_BLANKS
# don't expand aliases _before_ completion has finished
# like: git comm-[tab]
setopt complete_aliases
zle -N newtab
bindkey '^[^[[D' backward-word
bindkey '^[^[[C' forward-word
bindkey '^[[5D' beginning-of-line
bindkey '^[[5C' end-of-line
bindkey '^[[3~' delete-char
bindkey '^[^N' newtab
bindkey '^?' backward-delete-char
| {
"content_hash": "e8e9cabedc1e718661271d3790b6a679",
"timestamp": "",
"source": "github",
"line_count": 42,
"max_line_length": 98,
"avg_line_length": 27.428571428571427,
"alnum_prop": 0.7717013888888888,
"repo_name": "chitacan/dotfiles",
"id": "324a626f253480d2f63b5959a10cecbdd94ac04e",
"size": "1152",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "zsh/config.zsh",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "AppleScript",
"bytes": "2048"
},
{
"name": "CSS",
"bytes": "85"
},
{
"name": "CoffeeScript",
"bytes": "1025"
},
{
"name": "Ruby",
"bytes": "17345"
},
{
"name": "Shell",
"bytes": "18296"
}
],
"symlink_target": ""
} |
require 'spec_helper'
describe Projects::ErrorTrackingHelper do
include Gitlab::Routing.url_helpers
set(:project) { create(:project) }
describe '#error_tracking_data' do
let(:setting_path) { project_settings_operations_path(project) }
let(:index_path) do
project_error_tracking_index_path(project, format: :json)
end
context 'without error_tracking_setting' do
it 'returns frontend configuration' do
expect(error_tracking_data(project)).to eq(
'index-path' => index_path,
'enable-error-tracking-link' => setting_path,
'error-tracking-enabled' => 'false',
"illustration-path" => "/images/illustrations/cluster_popover.svg"
)
end
end
context 'with error_tracking_setting' do
let(:error_tracking_setting) do
create(:project_error_tracking_setting, project: project)
end
context 'when enabled' do
before do
error_tracking_setting.update!(enabled: true)
end
it 'show error tracking enabled' do
expect(error_tracking_data(project)).to include(
'error-tracking-enabled' => 'true'
)
end
end
context 'when disabled' do
before do
error_tracking_setting.update!(enabled: false)
end
it 'show error tracking not enabled' do
expect(error_tracking_data(project)).to include(
'error-tracking-enabled' => 'false'
)
end
end
end
end
end
| {
"content_hash": "037fc7d8b4913524a9096b2d70c4d20e",
"timestamp": "",
"source": "github",
"line_count": 56,
"max_line_length": 76,
"avg_line_length": 27.321428571428573,
"alnum_prop": 0.6124183006535948,
"repo_name": "axilleas/gitlabhq",
"id": "7516a636c93de5fffa2faed2f4a1c97770825f23",
"size": "1561",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "spec/helpers/projects/error_tracking_helper_spec.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "683690"
},
{
"name": "Clojure",
"bytes": "79"
},
{
"name": "Dockerfile",
"bytes": "1907"
},
{
"name": "HTML",
"bytes": "1340167"
},
{
"name": "JavaScript",
"bytes": "4309733"
},
{
"name": "Ruby",
"bytes": "19732082"
},
{
"name": "Shell",
"bytes": "44575"
},
{
"name": "Vue",
"bytes": "1040466"
}
],
"symlink_target": ""
} |
// Copyright 2007-2010 Baptiste Lepilleur
// Distributed under MIT license, or public domain if desired and
// recognized in your jurisdiction.
// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
#ifndef CPPTL_JSON_FEATURES_H_INCLUDED
#define CPPTL_JSON_FEATURES_H_INCLUDED
#if !defined(JSON_IS_AMALGAMATION)
#include "forwards.h"
#endif // if !defined(JSON_IS_AMALGAMATION)
namespace rmq {
namespace Json {
/** \brief Configuration passed to reader and writer.
* This configuration object can be used to force the Reader or Writer
* to behave in a standard conforming way.
*/
class JSON_API Features {
public:
/** \brief A configuration that allows all features and assumes all strings
* are UTF-8.
* - C & C++ comments are allowed
* - Root object can be any JSON value
* - Assumes Value strings are encoded in UTF-8
*/
static Features all();
/** \brief A configuration that is strictly compatible with the JSON
* specification.
* - Comments are forbidden.
* - Root object must be either an array or an object value.
* - Assumes Value strings are encoded in UTF-8
*/
static Features strictMode();
/** \brief Initialize the configuration like JsonConfig::allFeatures;
*/
Features();
/// \c true if comments are allowed. Default: \c true.
bool allowComments_;
/// \c true if root must be either an array or an object value. Default: \c
/// false.
bool strictRoot_;
/// \c true if dropped null placeholders are allowed. Default: \c false.
bool allowDroppedNullPlaceholders_;
/// \c true if numeric object key are allowed. Default: \c false.
bool allowNumericKeys_;
};
} // namespace Json
} // namespace rmq
#endif // CPPTL_JSON_FEATURES_H_INCLUDED
| {
"content_hash": "cd97e594a5d92ef3adcd787ba92e0dc7",
"timestamp": "",
"source": "github",
"line_count": 59,
"max_line_length": 80,
"avg_line_length": 29.71186440677966,
"alnum_prop": 0.7124928693667998,
"repo_name": "hooligan520/rocketmq-client4cpp-linux",
"id": "d109790330b944c14b0bea5394ad3ca966715a7a",
"size": "1753",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "src/jsoncpp/json/features.h",
"mode": "33261",
"license": "apache-2.0",
"language": [
{
"name": "C",
"bytes": "1804"
},
{
"name": "C++",
"bytes": "1117827"
},
{
"name": "Makefile",
"bytes": "2349"
},
{
"name": "Shell",
"bytes": "1152"
}
],
"symlink_target": ""
} |
local Setup = require 'Setup'
local Master = require 'Master'
local AsyncMaster = require 'async/AsyncMaster'
local AsyncEvaluation = require 'async/AsyncEvaluation'
-- Parse options and perform setup
local setup = Setup(arg)
local opt = setup.opt
-- Start master experiment runner
if opt.async then
if opt.mode == 'train' then
local master = AsyncMaster(opt)
master:start()
elseif opt.mode == 'eval' then
local eval = AsyncEvaluation(opt)
eval:evaluate()
end
else
local master = Master(opt)
if opt.mode == 'train' then
master:train()
elseif opt.mode == 'eval' then
master:evaluate()
end
end
| {
"content_hash": "9331f3328e35e622dd764e017e7987e6",
"timestamp": "",
"source": "github",
"line_count": 27,
"max_line_length": 55,
"avg_line_length": 23.444444444444443,
"alnum_prop": 0.7030015797788309,
"repo_name": "DanielTea/Unity_AI",
"id": "c6533778a895558ab1f54971d71b229f04edde2c",
"size": "633",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "unity3d-roll-a-ball-master/Atari2/main.lua",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "5189"
},
{
"name": "Lua",
"bytes": "177017"
},
{
"name": "Shell",
"bytes": "4880"
}
],
"symlink_target": ""
} |
<!-- Top -->
# AudioPlayr
[](https://prettier.io)

[](http://badge.fury.io/js/audioplayr)
[](https://gitter.im/FullScreenShenanigans/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Audio playback manager for persistent and on-demand themes and sounds.
<!-- /Top -->
## Usage
### Constructor
```typescript
import { AudioPlayr } from "audioplayr";
const audioPlayer = new AudioPlayr();
audioPlayer.play("Hello world.mp3");
```
#### `nameTransform`
By default, provided names are treated as the `src` file names for their sounds.
You can define a mapping of names to file names by providing a `nameTransform` method.
It should take in a `string` and return a `string`.
```typescript
const audioPlayer = new AudioPlayr({
nameTransform: (name: string) => `Sounds/${name}.mp3`,
storage: new ItemsHoldr(),
});
// Plays "Sounds/Hello world.mp3"
audioPlayer.play("Hello world");
```
Internally, all sound names will be transformed with the `nameTransform`.
#### `storage`
You must pass a `storage` parameter to an `AudioPlayr` to keep muted and volume stored locally.
It should have the following methods:
- `getMuted(): boolean`
- `getVolume(): boolean`
- `setMuted(value: boolean)`
- `setVolume(value: number)`
You can use the provided `wrapNativeStorage` method to have that come from `localStorage`:
```typescript
import { AudioPlayr, wrapNativeStorage } from "audioplayr";
const audioPlayer = new AudioPlayr({
storage: wrapNativeStorage(localStorage),
});
```
Keys that may be stored are:
- `"muted"`
- `"volume"`
### `play`
Parameters:
- `name: string`: Name of the audio file, used as its `src`.
- `settings: Object` _(optional)_: Any additional options.
Returns: `Promise<void>` for _starting_ playback.
```typescript
audioPlayer.play("beep.mp3");
```
If the same audio name is played twice, the first will be stopped before the second starts.
```typescript
audioPlayer.play("beep.mp3");
// ...
audioPlayer.play("beep.mp3");
```
`settings` may contain any of the following keys:
- `alias`:
Changes what name the sound will be stored under.
Defaults to the given name.
As with `play`, if two sounds with the same `alias` are played, the first will be stopped before the second starts.
```typescript
audioPlayer.play("Overworld.mp3", { alias: "Theme" });
// ...
audioPlayer.play("Underworld.mp3", { alias: "Theme" });
```
If a `nameTransform` was provided, it's applied to this alias as well.
- `loop`:
Whether the sound should loop continuously.
Defaults to `false`.
```typescript
audioPlayer.play("Bloop.mp3", { loop: true });
```
- `muted`:
Whether the sound should be muted.
Defaults to `false`.
```typescript
audioPlayer.play("Boop.mp3", { muted: true });
```
If the `AudioPlayr` is globally muted, `muted: false` will be ignored.
- `volume`:
Volume as a number in `[0, 1]`.
Defaults to `1`.
```typescript
audioPlayer.play("Bop.mp3", { volume: 0.5 });
```
The sound's playing volume is computed as this times the global volume.
### `getMuted`
Returns: `boolean` for whether all sounds are muted.
### `getVolume`
Returns: `number` in `[0, 1]` for global sound volume.
### `setMuted`
Parameters:
- `muted: boolean`: Whether this all sounds are globally muted.
Returns: `Promise<void>` for setting whether all sounds are globally muted.
### `setVolume`
Parameters:
- `volume: number`: `number` in `[0, 1]` for global sound volume.
Returns: `Promise<void>` for setting the global sound volume.
### `pauseAll`
Returns: `Promise<void>` for pausing all sounds.
Pauses all sounds in parallel.
This only affects sounds that are playing.
### `resumeAll`
Returns: `Promise<void>` for resuming all sounds.
Resumes all sounds in parallel.
This only affects sounds that are paused.
### `stopAll`
Returns: `Promise<void>` for stopping all sounds.
Stops all sounds.
Any individual sound settings are cleared.
## `hasSound`
Parameters:
- `alias: string`: Alias to check under.
- `name: string` _(optional)_: Name the sound must have, if not the same as `alias`.
Returns: `boolean` for whether a sound exists under the alias.
<!-- Development -->
## Development
This repository is a portion of the [EightBittr monorepo](https://raw.githubusercontent.com/FullScreenShenanigans/EightBittr).
See its [docs/Development.md](../../docs/Development.md) for details on how to get started. 💖
### Running Tests
```shell
yarn run test
```
Tests are written in [Mocha](https://github.com/mochajs/mocha) and [Chai](https://github.com/chaijs/chai).
Their files are written using alongside source files under `src/` and named `*.test.ts?`.
Whenever you add, remove, or rename a `*.test.t*` file under `src/`, `watch` will re-run `yarn run test:setup` to regenerate the list of static test files in `test/index.html`.
You can open that file in a browser to debug through the tests, or run `yarn test:run` to run them in headless Chrome.
<!-- Maps -->
<!-- /Maps -->
<!-- /Development -->
| {
"content_hash": "e6b9d446230a8fb9601cd2fa168217c1",
"timestamp": "",
"source": "github",
"line_count": 210,
"max_line_length": 258,
"avg_line_length": 26.080952380952382,
"alnum_prop": 0.6958188789483294,
"repo_name": "FullScreenShenanigans/GameStartr",
"id": "fd9d932ad7a274e425270fe7a97586c0d020ac94",
"size": "5480",
"binary": false,
"copies": "2",
"ref": "refs/heads/react-hooks",
"path": "packages/audioplayr/README.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "TypeScript",
"bytes": "115677"
}
],
"symlink_target": ""
} |
/**
* Example code to start the runtime.
*/
const { WASI } = require('wasi');
const path = require("path");
const fs = require("fs");
const tvmjs = require("../../dist");
const wasmPath = tvmjs.wasmPath();
const wasmSource = fs.readFileSync(path.join(wasmPath, "tvmjs_runtime.wasm"));
const wasi = new WASI({ args: process.argv, env: process.env });
// Here we pass the javascript module generated by emscripten as the
// LibraryProvider to provide WASI related libraries.
const tvm = new tvmjs.Instance(new WebAssembly.Module(wasmSource), wasi);
// List all the global functions from the runtime.
console.log("Runtime using WASI\n", tvm.listGlobalFuncNames());
| {
"content_hash": "4b91ccdc14c74e5cdf7c7cb3c2f53ad3",
"timestamp": "",
"source": "github",
"line_count": 19,
"max_line_length": 78,
"avg_line_length": 35.1578947368421,
"alnum_prop": 0.7200598802395209,
"repo_name": "dmlc/tvm",
"id": "95ec2e0b1d07586a0579b701e4515b8e3f526e08",
"size": "1475",
"binary": false,
"copies": "5",
"ref": "refs/heads/main",
"path": "web/apps/node/wasi_example.js",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ANTLR",
"bytes": "6112"
},
{
"name": "C",
"bytes": "92947"
},
{
"name": "C++",
"bytes": "5765945"
},
{
"name": "CMake",
"bytes": "74045"
},
{
"name": "Go",
"bytes": "112384"
},
{
"name": "HTML",
"bytes": "8625"
},
{
"name": "Java",
"bytes": "171101"
},
{
"name": "JavaScript",
"bytes": "49803"
},
{
"name": "Makefile",
"bytes": "55807"
},
{
"name": "Objective-C",
"bytes": "15241"
},
{
"name": "Objective-C++",
"bytes": "46673"
},
{
"name": "Python",
"bytes": "7183810"
},
{
"name": "Rust",
"bytes": "181961"
},
{
"name": "Scala",
"bytes": "202148"
},
{
"name": "Shell",
"bytes": "97271"
},
{
"name": "Tcl",
"bytes": "53645"
},
{
"name": "Verilog",
"bytes": "30605"
}
],
"symlink_target": ""
} |
module Jekyll::Minibundle::Test
module Assertions
def assert_contains_only(collection, expected_elements)
assert_respond_to collection, :size
collection_size = collection.size
expected_elements_size = expected_elements.size
assert_equal(expected_elements_size, collection_size, lambda do
"Expected #{mu_pp(collection)} to have size #{expected_elements_size} instead of #{collection_size}"
end)
remaining = collection.dup.to_a
expected_elements.each do |e|
index = remaining.index(e)
remaining.delete_at(index) if index
end
assert(remaining.empty?, lambda do
"Expected\n\n#{mu_pp(collection)}\n\nto include only\n\n#{mu_pp(expected_elements)}"
end)
end
end
end
| {
"content_hash": "f10c98ff49e963bd520e3506af25bb68",
"timestamp": "",
"source": "github",
"line_count": 24,
"max_line_length": 108,
"avg_line_length": 32,
"alnum_prop": 0.6744791666666666,
"repo_name": "ckcastro/ckcastro.github.io",
"id": "9596396288e99ca9dbf33c846f4bd43ffbee1dfc",
"size": "768",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "vendor/bundle/ruby/2.5.0/gems/jekyll-minibundle-2.2.0/test/support/assertions.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "64936384"
},
{
"name": "JavaScript",
"bytes": "1034548"
},
{
"name": "Ruby",
"bytes": "6229"
},
{
"name": "SCSS",
"bytes": "58859"
}
],
"symlink_target": ""
} |
<?php
namespace Neos\FluidAdaptor\Tests\Unit\ViewHelpers\Form;
use TYPO3Fluid\Fluid\Core\ViewHelper\TagBuilder;
require_once(__DIR__ . '/Fixtures/EmptySyntaxTreeNode.php');
require_once(__DIR__ . '/Fixtures/Fixture_UserDomainClass.php');
require_once(__DIR__ . '/FormFieldViewHelperBaseTestcase.php');
/**
* Test for the "Password" Form view helper
*/
class PasswordViewHelperTest extends \Neos\FluidAdaptor\Tests\Unit\ViewHelpers\Form\FormFieldViewHelperBaseTestcase
{
/**
* @var \Neos\FluidAdaptor\ViewHelpers\Form\PasswordViewHelper
*/
protected $viewHelper;
public function setUp()
{
parent::setUp();
$this->viewHelper = $this->getAccessibleMock(\Neos\FluidAdaptor\ViewHelpers\Form\PasswordViewHelper::class, array('setErrorClassAttribute', 'registerFieldNameForFormTokenGeneration'));
$this->arguments['name'] = '';
$this->injectDependenciesIntoViewHelper($this->viewHelper);
$this->viewHelper->initializeArguments();
}
/**
* @test
*/
public function renderCorrectlySetsTagName()
{
$mockTagBuilder = $this->createMock(TagBuilder::class);
$mockTagBuilder->expects($this->atLeastOnce())->method('setTagName')->with('input');
$this->viewHelper->injectTagBuilder($mockTagBuilder);
$this->viewHelper->initialize();
$this->viewHelper->render();
}
/**
* @test
*/
public function renderCorrectlySetsTypeNameAndValueAttributes()
{
$mockTagBuilder = $this->getMockBuilder(TagBuilder::class)->setMethods(array('setContent', 'render', 'addAttribute'))->getMock();
$mockTagBuilder->expects($this->at(0))->method('addAttribute')->with('type', 'password');
$mockTagBuilder->expects($this->at(1))->method('addAttribute')->with('name', 'NameOfTextbox');
$this->viewHelper->expects($this->once())->method('registerFieldNameForFormTokenGeneration')->with('NameOfTextbox');
$mockTagBuilder->expects($this->at(2))->method('addAttribute')->with('value', 'Current value');
$mockTagBuilder->expects($this->once())->method('render');
$this->viewHelper->injectTagBuilder($mockTagBuilder);
$arguments = array(
'name' => 'NameOfTextbox',
'value' => 'Current value'
);
$this->viewHelper->setArguments($arguments);
$this->viewHelper->setViewHelperNode(new \Neos\FluidAdaptor\ViewHelpers\Fixtures\EmptySyntaxTreeNode());
$this->viewHelper->initialize();
$this->viewHelper->render();
}
/**
* @test
*/
public function renderCorrectlySetsRequiredAttribute()
{
$mockTagBuilder = $this->getMockBuilder(TagBuilder::class)->setMethods(array('addAttribute', 'setContent', 'render'))->disableOriginalConstructor()->getMock();
$mockTagBuilder->expects($this->at(0))->method('addAttribute')->with('type', 'password');
$mockTagBuilder->expects($this->at(1))->method('addAttribute')->with('name', 'NameOfTextbox');
$this->viewHelper->expects($this->once())->method('registerFieldNameForFormTokenGeneration')->with('NameOfTextbox');
$mockTagBuilder->expects($this->at(2))->method('addAttribute')->with('value', 'Current value');
$mockTagBuilder->expects($this->at(3))->method('addAttribute')->with('required', 'required');
$mockTagBuilder->expects($this->once())->method('render');
$this->viewHelper->injectTagBuilder($mockTagBuilder);
$arguments = array(
'name' => 'NameOfTextbox',
'value' => 'Current value'
);
$this->viewHelper->setArguments($arguments);
$this->viewHelper->setViewHelperNode(new \Neos\FluidAdaptor\ViewHelpers\Fixtures\EmptySyntaxTreeNode());
$this->viewHelper->initialize();
$this->viewHelper->render(true);
}
/**
* @test
*/
public function renderCallsSetErrorClassAttribute()
{
$this->viewHelper->expects($this->once())->method('setErrorClassAttribute');
$this->viewHelper->render();
}
}
| {
"content_hash": "96e2e8ba193e94889939226fb0f1909b",
"timestamp": "",
"source": "github",
"line_count": 101,
"max_line_length": 192,
"avg_line_length": 40.40594059405941,
"alnum_prop": 0.6544964469492771,
"repo_name": "gerhard-boden/flow-development-collection",
"id": "d30b2c4aeb508f98465c7175d3c2beabdff82f33",
"size": "4371",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Neos.FluidAdaptor/Tests/Unit/ViewHelpers/Form/PasswordViewHelperTest.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "1976"
},
{
"name": "Batchfile",
"bytes": "775"
},
{
"name": "CSS",
"bytes": "4358"
},
{
"name": "Gherkin",
"bytes": "10531"
},
{
"name": "HTML",
"bytes": "38295"
},
{
"name": "PHP",
"bytes": "7687802"
},
{
"name": "PLpgSQL",
"bytes": "1164"
},
{
"name": "Shell",
"bytes": "4266"
}
],
"symlink_target": ""
} |
import unittest
from dce_lti_py import LaunchParams, DEFAULT_LTI_VERSION, InvalidLTIConfigError
from dce_lti_py.launch_params import InvalidLaunchParamError
class TestLaunchParams(unittest.TestCase):
def test_constructor(self):
lp = LaunchParams()
self.assertTrue(lp['lti_version'], DEFAULT_LTI_VERSION)
self.assertTrue(lp['lti_message_type'], 'basic-lti-launch-request')
lp = LaunchParams({
'lti_version': 'LTI-foo',
'lti_message_type': 'bar',
'resource_link_id': 123
})
self.assertTrue(lp['resource_link_id'], 123)
self.assertTrue(lp['lti_version'], 'LTI-foo')
self.failUnlessRaises(InvalidLaunchParamError, LaunchParams, {
'foo': 'bar'
})
def test_get_item(self):
lp = LaunchParams()
self.assertEqual(lp['lti_version'], DEFAULT_LTI_VERSION)
with self.assertRaises(KeyError):
foo = lp['foo']
def test_set_item(self):
lp = LaunchParams()
lp['lti_version'] = 'bar'
self.assertEqual(lp['lti_version'], 'bar')
def test_list_params(self):
lp = LaunchParams({'roles': 'foo,bar,baz'})
self.assertEqual(lp['roles'], ['foo','bar','baz'])
self.assertEqual(lp._params['roles'], 'foo,bar,baz')
lp['roles'] = ['bar','baz']
self.assertEqual(lp['roles'], ['bar','baz'])
self.assertEqual(lp._params['roles'], 'bar,baz')
lp['roles'] = 'blah, bluh '
self.assertEqual(lp['roles'], ['blah','bluh'])
def test_non_spec_params(self):
lp = LaunchParams()
lp.set_non_spec_param('foo', 'bar')
self.assertEqual(lp.get_non_spec_param('foo'), 'bar')
self.assertEqual(lp._params['foo'], 'bar')
self.assertRaises(KeyError, lp.get('foo'))
def test_dict_behavior(self):
lp = LaunchParams({
'lti_version': 'foo',
'lti_message_type': 'bar'
})
self.assertEqual(len(lp), 2)
lp.update({'resource_link_id': 1})
self.assertEqual(len(lp), 3)
self.failUnlessRaises(InvalidLaunchParamError, lp.update, {
'foo': 'bar'
})
self.assertItemsEqual(
lp.keys(),
['lti_version', 'lti_message_type', 'resource_link_id']
)
self.assertEqual(dict(lp), {
'lti_version': 'foo',
'lti_message_type': 'bar',
'resource_link_id': 1
})
| {
"content_hash": "3a1f743f94dbfbdbd1b8b703c6de201c",
"timestamp": "",
"source": "github",
"line_count": 82,
"max_line_length": 79,
"avg_line_length": 30.317073170731707,
"alnum_prop": 0.5619469026548672,
"repo_name": "brainheart/dce_lti_py",
"id": "c40d97b3c176de5fea283f14d9bd1fccb25f0a40",
"size": "2486",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "tests/test_launch_params.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Python",
"bytes": "78868"
}
],
"symlink_target": ""
} |
#ifndef SkFontMgr_android_parser_DEFINED
#define SkFontMgr_android_parser_DEFINED
#include "SkString.h"
#include "SkTDArray.h"
#include <climits>
#include <limits>
/** \class SkLanguage
The SkLanguage class represents a human written language, and is used by
text draw operations to determine which glyph to draw when drawing
characters with variants (ie Han-derived characters).
*/
class SkLanguage {
public:
SkLanguage() { }
SkLanguage(const SkString& tag) : fTag(tag) { }
SkLanguage(const char* tag) : fTag(tag) { }
SkLanguage(const char* tag, size_t len) : fTag(tag, len) { }
SkLanguage(const SkLanguage& b) : fTag(b.fTag) { }
/** Gets a BCP 47 language identifier for this SkLanguage.
@return a BCP 47 language identifier representing this language
*/
const SkString& getTag() const { return fTag; }
/** Performs BCP 47 fallback to return an SkLanguage one step more general.
@return an SkLanguage one step more general
*/
SkLanguage getParent() const;
bool operator==(const SkLanguage& b) const {
return fTag == b.fTag;
}
bool operator!=(const SkLanguage& b) const {
return fTag != b.fTag;
}
SkLanguage& operator=(const SkLanguage& b) {
fTag = b.fTag;
return *this;
}
private:
//! BCP 47 language identifier
SkString fTag;
};
enum FontVariants {
kDefault_FontVariant = 0x01,
kCompact_FontVariant = 0x02,
kElegant_FontVariant = 0x04,
kLast_FontVariant = kElegant_FontVariant,
};
typedef uint32_t FontVariant;
// Must remain trivially movable (can be memmoved).
struct FontFileInfo {
FontFileInfo() : fIndex(0), fWeight(0), fStyle(Style::kAuto) { }
SkString fFileName;
int fIndex;
int fWeight;
enum class Style { kAuto, kNormal, kItalic } fStyle;
struct Axis {
Axis() : fTag(SkSetFourByteTag('\0','\0','\0','\0')), fValue(0) { }
SkFourByteTag fTag;
SkFixed fValue;
};
SkTArray<Axis, true> fAxes;
};
/**
* A font family provides one or more names for a collection of fonts, each of
* which has a different style (normal, italic) or weight (thin, light, bold,
* etc).
* Some fonts may occur in compact variants for use in the user interface.
* Android distinguishes "fallback" fonts to support non-ASCII character sets.
*/
struct FontFamily {
FontFamily(const SkString& basePath, bool isFallbackFont)
: fVariant(kDefault_FontVariant)
, fOrder(-1)
, fIsFallbackFont(isFallbackFont)
, fBasePath(basePath)
{ }
SkTArray<SkString, true> fNames;
SkTArray<FontFileInfo, true> fFonts;
SkLanguage fLanguage;
FontVariant fVariant;
int fOrder; // internal to the parser, not useful to users.
bool fIsFallbackFont;
const SkString fBasePath;
};
namespace SkFontMgr_Android_Parser {
/** Parses system font configuration files and appends result to fontFamilies. */
void GetSystemFontFamilies(SkTDArray<FontFamily*>& fontFamilies);
/** Parses font configuration files and appends result to fontFamilies. */
void GetCustomFontFamilies(SkTDArray<FontFamily*>& fontFamilies,
const SkString& basePath,
const char* fontsXml,
const char* fallbackFontsXml,
const char* langFallbackFontsDir = NULL);
} // SkFontMgr_Android_Parser namespace
/** Parses a null terminated string into an integer type, checking for overflow.
* http://www.w3.org/TR/html-markup/datatypes.html#common.data.integer.non-negative-def
*
* If the string cannot be parsed into 'value', returns false and does not change 'value'.
*/
template <typename T> static bool parse_non_negative_integer(const char* s, T* value) {
SK_COMPILE_ASSERT(std::numeric_limits<T>::is_integer, T_must_be_integer);
if (*s == '\0') {
return false;
}
const T nMax = std::numeric_limits<T>::max() / 10;
const T dMax = std::numeric_limits<T>::max() - (nMax * 10);
T n = 0;
for (; *s; ++s) {
// Check if digit
if (*s < '0' || '9' < *s) {
return false;
}
T d = *s - '0';
// Check for overflow
if (n > nMax || (n == nMax && d > dMax)) {
return false;
}
n = (n * 10) + d;
}
*value = n;
return true;
}
/** Parses a null terminated string into a signed fixed point value with bias N.
*
* Like http://www.w3.org/TR/html-markup/datatypes.html#common.data.float-def ,
* but may start with '.' and does not support 'e'. '-?((:digit:+(.:digit:+)?)|(.:digit:+))'
*
* Checks for overflow.
* Low bit rounding is not defined (is currently truncate).
* Bias (N) required to allow for the sign bit and 4 bits of integer.
*
* If the string cannot be parsed into 'value', returns false and does not change 'value'.
*/
template <int N, typename T> static bool parse_fixed(const char* s, T* value) {
SK_COMPILE_ASSERT(std::numeric_limits<T>::is_integer, T_must_be_integer);
SK_COMPILE_ASSERT(std::numeric_limits<T>::is_signed, T_must_be_signed);
SK_COMPILE_ASSERT(sizeof(T) * CHAR_BIT - N >= 5, N_must_leave_four_bits_plus_sign);
bool negate = false;
if (*s == '-') {
++s;
negate = true;
}
if (*s == '\0') {
return false;
}
const T nMax = (std::numeric_limits<T>::max() >> N) / 10;
const T dMax = (std::numeric_limits<T>::max() >> N) - (nMax * 10);
T n = 0;
T frac = 0;
for (; *s; ++s) {
// Check if digit
if (*s < '0' || '9' < *s) {
// If it wasn't a digit, check if it is a '.' followed by something.
if (*s != '.' || s[1] == '\0') {
return false;
}
// Find the end, verify digits.
for (++s; *s; ++s) {
if (*s < '0' || '9' < *s) {
return false;
}
}
// Read back toward the '.'.
for (--s; *s != '.'; --s) {
T d = *s - '0';
frac = (frac + (d << N)) / 10; // This requires four bits overhead.
}
break;
}
T d = *s - '0';
// Check for overflow
if (n > nMax || (n == nMax && d > dMax)) {
return false;
}
n = (n * 10) + d;
}
if (negate) {
n = -n;
frac = -frac;
}
*value = (n << N) + frac;
return true;
}
#endif /* SkFontMgr_android_parser_DEFINED */
| {
"content_hash": "bf36d4afc1929bff86913d02e7997f6d",
"timestamp": "",
"source": "github",
"line_count": 210,
"max_line_length": 93,
"avg_line_length": 31.085714285714285,
"alnum_prop": 0.5848651960784313,
"repo_name": "pcwalton/skia",
"id": "d2a430513f6f7cc55b8fc8e19b89f9be6aa1429a",
"size": "6691",
"binary": false,
"copies": "6",
"ref": "refs/heads/master",
"path": "src/ports/SkFontMgr_android_parser.h",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Batchfile",
"bytes": "1133"
},
{
"name": "C",
"bytes": "882173"
},
{
"name": "C++",
"bytes": "26978691"
},
{
"name": "Go",
"bytes": "677"
},
{
"name": "HTML",
"bytes": "477"
},
{
"name": "Java",
"bytes": "26662"
},
{
"name": "JavaScript",
"bytes": "7593"
},
{
"name": "Lua",
"bytes": "25531"
},
{
"name": "Makefile",
"bytes": "8897"
},
{
"name": "Objective-C",
"bytes": "23483"
},
{
"name": "Objective-C++",
"bytes": "98026"
},
{
"name": "PHP",
"bytes": "116206"
},
{
"name": "Python",
"bytes": "377714"
},
{
"name": "Shell",
"bytes": "53092"
}
],
"symlink_target": ""
} |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="cy" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Capricoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+39"/>
<source><b>Capricoin</b> version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+41"/>
<source>Copyright © 2009-2014 The Bitcoin developers
Copyright © 2012-2014 The NovaCoin developers
Copyright © 2014 The Capricoin developers</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>
This is experimental software.
Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>AddressBookPage</name>
<message>
<location filename="../forms/addressbookpage.ui" line="+14"/>
<source>Address Book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<source>Double-click to edit address or label</source>
<translation>Clicio dwywaith i olygu cyfeiriad neu label</translation>
</message>
<message>
<location line="+27"/>
<source>Create a new address</source>
<translation>Creu cyfeiriad newydd</translation>
</message>
<message>
<location line="+14"/>
<source>Copy the currently selected address to the system clipboard</source>
<translation>Copio'r cyfeiriad sydd wedi'i ddewis i'r clipfwrdd system</translation>
</message>
<message>
<location line="-11"/>
<source>&New Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-46"/>
<source>These are your Capricoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+60"/>
<source>&Copy Address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Show &QR Code</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Sign a message to prove you own a Capricoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Sign &Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Delete the currently selected address from the list</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-14"/>
<source>Verify a message to ensure it was signed with a specified Capricoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Verify Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>&Delete</source>
<translation>&Dileu</translation>
</message>
<message>
<location filename="../addressbookpage.cpp" line="+65"/>
<source>Copy &Label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>&Edit</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+250"/>
<source>Export Address Book Data</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Error exporting</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>AddressTableModel</name>
<message>
<location filename="../addresstablemodel.cpp" line="+144"/>
<source>Label</source>
<translation>Label</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Cyfeiriad</translation>
</message>
<message>
<location line="+36"/>
<source>(no label)</source>
<translation>(heb label)</translation>
</message>
</context>
<context>
<name>AskPassphraseDialog</name>
<message>
<location filename="../forms/askpassphrasedialog.ui" line="+26"/>
<source>Passphrase Dialog</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>Enter passphrase</source>
<translation>Teipiwch gyfrinymadrodd</translation>
</message>
<message>
<location line="+14"/>
<source>New passphrase</source>
<translation>Cyfrinymadrodd newydd</translation>
</message>
<message>
<location line="+14"/>
<source>Repeat new passphrase</source>
<translation>Ailadroddwch gyfrinymadrodd newydd</translation>
</message>
<message>
<location line="+33"/>
<source>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>For staking only</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="+35"/>
<source>Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>10 or more random characters</b>, or <b>eight or more words</b>.</source>
<translation>Dewiswch gyfrinymadrodd newydd ar gyfer y waled. <br/> Defnyddiwch cyfrinymadrodd o <b>10 neu fwy o lythyrennau hapgyrch</b>, neu <b> wyth neu fwy o eiriau.</translation>
</message>
<message>
<location line="+1"/>
<source>Encrypt wallet</source>
<translation>Amgryptio'r waled</translation>
</message>
<message>
<location line="+7"/>
<source>This operation needs your wallet passphrase to unlock the wallet.</source>
<translation>Mae angen i'r gweithred hon ddefnyddio'ch cyfrinymadrodd er mwyn datgloi'r waled.</translation>
</message>
<message>
<location line="+5"/>
<source>Unlock wallet</source>
<translation>Datgloi'r waled</translation>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to decrypt the wallet.</source>
<translation>Mae angen i'r gweithred hon ddefnyddio'ch cyfrinymadrodd er mwyn dadgryptio'r waled.</translation>
</message>
<message>
<location line="+5"/>
<source>Decrypt wallet</source>
<translation>Dadgryptio'r waled</translation>
</message>
<message>
<location line="+3"/>
<source>Change passphrase</source>
<translation>Newid cyfrinymadrodd</translation>
</message>
<message>
<location line="+1"/>
<source>Enter the old and new passphrase to the wallet.</source>
<translation>Teipiwch yr hen cyfrinymadrodd a chyfrinymadrodd newydd i mewn i'r waled.</translation>
</message>
<message>
<location line="+46"/>
<source>Confirm wallet encryption</source>
<translation>Cadarnau amgryptiad y waled</translation>
</message>
<message>
<location line="+1"/>
<source>Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Are you sure you wish to encrypt your wallet?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+103"/>
<location line="+24"/>
<source>Warning: The Caps Lock key is on!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-133"/>
<location line="+60"/>
<source>Wallet encrypted</source>
<translation>Waled wedi'i amgryptio</translation>
</message>
<message>
<location line="-58"/>
<source>Capricoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<location line="+7"/>
<location line="+44"/>
<location line="+6"/>
<source>Wallet encryption failed</source>
<translation>Amgryptiad waled wedi methu</translation>
</message>
<message>
<location line="-56"/>
<source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
<translation>Methodd amgryptiad y waled oherwydd gwall mewnol. Ni amgryptwyd eich waled.</translation>
</message>
<message>
<location line="+7"/>
<location line="+50"/>
<source>The supplied passphrases do not match.</source>
<translation>Dydy'r cyfrinymadroddion a ddarparwyd ddim yn cyd-fynd â'u gilydd.</translation>
</message>
<message>
<location line="-38"/>
<source>Wallet unlock failed</source>
<translation>Methodd ddatgloi'r waled</translation>
</message>
<message>
<location line="+1"/>
<location line="+12"/>
<location line="+19"/>
<source>The passphrase entered for the wallet decryption was incorrect.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-20"/>
<source>Wallet decryption failed</source>
<translation>Methodd dadgryptiad y waled</translation>
</message>
<message>
<location line="+14"/>
<source>Wallet passphrase was successfully changed.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>BitcoinGUI</name>
<message>
<location filename="../bitcoingui.cpp" line="+282"/>
<source>Sign &message...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+251"/>
<source>Synchronizing with network...</source>
<translation>Cysoni â'r rhwydwaith...</translation>
</message>
<message>
<location line="-319"/>
<source>&Overview</source>
<translation>&Trosolwg</translation>
</message>
<message>
<location line="+1"/>
<source>Show general overview of wallet</source>
<translation>Dangos trosolwg cyffredinol y waled</translation>
</message>
<message>
<location line="+17"/>
<source>&Transactions</source>
<translation>&Trafodion</translation>
</message>
<message>
<location line="+1"/>
<source>Browse transaction history</source>
<translation>Pori hanes trafodion</translation>
</message>
<message>
<location line="+5"/>
<source>&Address Book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Edit the list of stored addresses and labels</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-13"/>
<source>&Receive coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show the list of addresses for receiving payments</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-7"/>
<source>&Send coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>E&xit</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Quit application</source>
<translation>Gadael rhaglen</translation>
</message>
<message>
<location line="+6"/>
<source>Show information about Capricoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>About &Qt</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show information about Qt</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>&Options...</source>
<translation>&Opsiynau</translation>
</message>
<message>
<location line="+4"/>
<source>&Encrypt Wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Backup Wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>&Change Passphrase...</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+259"/>
<source>~%n block(s) remaining</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+6"/>
<source>Downloaded %1 of %2 blocks of transaction history (%3% done).</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-256"/>
<source>&Export...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-64"/>
<source>Send coins to a Capricoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+47"/>
<source>Modify configuration options for Capricoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>Export the data in the current tab to a file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-14"/>
<source>Encrypt or decrypt wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Backup wallet to another location</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Change the passphrase used for wallet encryption</source>
<translation>Newid y cyfrinymadrodd a ddefnyddiwyd ar gyfer amgryptio'r waled</translation>
</message>
<message>
<location line="+10"/>
<source>&Debug window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Open debugging and diagnostic console</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-5"/>
<source>&Verify message...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-202"/>
<source>Capricoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+180"/>
<source>&About Capricoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>&Show / Hide</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Unlock wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>&Lock Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Lock wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>&File</source>
<translation>&Ffeil</translation>
</message>
<message>
<location line="+8"/>
<source>&Settings</source>
<translation>&Gosodiadau</translation>
</message>
<message>
<location line="+8"/>
<source>&Help</source>
<translation>&Cymorth</translation>
</message>
<message>
<location line="+12"/>
<source>Tabs toolbar</source>
<translation>Bar offer tabiau</translation>
</message>
<message>
<location line="+8"/>
<source>Actions toolbar</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<location line="+9"/>
<source>[testnet]</source>
<translation>[testnet]</translation>
</message>
<message>
<location line="+0"/>
<location line="+60"/>
<source>Capricoin client</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+75"/>
<source>%n active connection(s) to Capricoin network</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+40"/>
<source>Downloaded %1 blocks of transaction history.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+413"/>
<source>Staking.<br>Your weight is %1<br>Network weight is %2<br>Expected time to earn reward is %3</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Not staking because wallet is locked</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Not staking because wallet is offline</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Not staking because wallet is syncing</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Not staking because you don't have mature coins</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="-403"/>
<source>%n second(s) ago</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="-312"/>
<source>About Capricoin card</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show information about Capricoin card</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>&Unlock Wallet...</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+297"/>
<source>%n minute(s) ago</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n hour(s) ago</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n day(s) ago</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+6"/>
<source>Up to date</source>
<translation>Cyfamserol</translation>
</message>
<message>
<location line="+7"/>
<source>Catching up...</source>
<translation>Dal i fyny</translation>
</message>
<message>
<location line="+10"/>
<source>Last received block was generated %1.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+59"/>
<source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Confirm transaction fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+27"/>
<source>Sent transaction</source>
<translation>Trafodiad a anfonwyd</translation>
</message>
<message>
<location line="+1"/>
<source>Incoming transaction</source>
<translation>Trafodiad sy'n cyrraedd</translation>
</message>
<message>
<location line="+1"/>
<source>Date: %1
Amount: %2
Type: %3
Address: %4
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+100"/>
<location line="+15"/>
<source>URI handling</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-15"/>
<location line="+15"/>
<source>URI can not be parsed! This can be caused by an invalid Capricoin address or malformed URI parameters.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>Wallet is <b>encrypted</b> and currently <b>unlocked</b></source>
<translation>Mae'r waled <b>wedi'i amgryptio</b> ac <b>heb ei gloi</b> ar hyn o bryd</translation>
</message>
<message>
<location line="+10"/>
<source>Wallet is <b>encrypted</b> and currently <b>locked</b></source>
<translation>Mae'r waled <b>wedi'i amgryptio</b> ac <b>ar glo</b> ar hyn o bryd</translation>
</message>
<message>
<location line="+25"/>
<source>Backup Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Wallet Data (*.dat)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Backup Failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>There was an error trying to save the wallet data to the new location.</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+76"/>
<source>%n second(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n minute(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n hour(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n day(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+18"/>
<source>Not staking</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../bitcoin.cpp" line="+109"/>
<source>A fatal error occurred. Capricoin can no longer continue safely and will quit.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>ClientModel</name>
<message>
<location filename="../clientmodel.cpp" line="+90"/>
<source>Network Alert</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>CoinControlDialog</name>
<message>
<location filename="../forms/coincontroldialog.ui" line="+14"/>
<source>Coin Control</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Quantity:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+32"/>
<source>Bytes:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+48"/>
<source>Amount:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+32"/>
<source>Priority:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+48"/>
<source>Fee:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Low Output:</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="+551"/>
<source>no</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../forms/coincontroldialog.ui" line="+51"/>
<source>After Fee:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Change:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+69"/>
<source>(un)select all</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Tree mode</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>List mode</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+45"/>
<source>Amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Address</source>
<translation>Cyfeiriad</translation>
</message>
<message>
<location line="+5"/>
<source>Date</source>
<translation>Dyddiad</translation>
</message>
<message>
<location line="+5"/>
<source>Confirmations</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Confirmed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Priority</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="-515"/>
<source>Copy address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<location line="+26"/>
<source>Copy amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-25"/>
<source>Copy transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>Copy quantity</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Copy fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy after fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy bytes</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy priority</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy low output</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy change</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+317"/>
<source>highest</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>high</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>medium-high</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>medium</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>low-medium</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>low</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>lowest</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+155"/>
<source>DUST</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>yes</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>This label turns red, if the transaction size is bigger than 10000 bytes.
This means a fee of at least %1 per kb is required.
Can vary +/- 1 Byte per input.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Transactions with higher priority get more likely into a block.
This label turns red, if the priority is smaller than "medium".
This means a fee of at least %1 per kb is required.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This label turns red, if any recipient receives an amount smaller than %1.
This means a fee of at least %2 is required.
Amounts below 0.546 times the minimum relay fee are shown as DUST.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This label turns red, if the change is smaller than %1.
This means a fee of at least %2 is required.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+37"/>
<location line="+66"/>
<source>(no label)</source>
<translation>(heb label)</translation>
</message>
<message>
<location line="-9"/>
<source>change from %1 (%2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>(change)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>EditAddressDialog</name>
<message>
<location filename="../forms/editaddressdialog.ui" line="+14"/>
<source>Edit Address</source>
<translation>Golygu'r cyfeiriad</translation>
</message>
<message>
<location line="+11"/>
<source>&Label</source>
<translation>&Label</translation>
</message>
<message>
<location line="+10"/>
<source>The label associated with this address book entry</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Address</source>
<translation>&Cyfeiriad</translation>
</message>
<message>
<location line="+10"/>
<source>The address associated with this address book entry. This can only be modified for sending addresses.</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../editaddressdialog.cpp" line="+20"/>
<source>New receiving address</source>
<translation>Cyfeiriad derbyn newydd</translation>
</message>
<message>
<location line="+4"/>
<source>New sending address</source>
<translation>Cyfeiriad anfon newydd</translation>
</message>
<message>
<location line="+3"/>
<source>Edit receiving address</source>
<translation>Golygu'r cyfeiriad derbyn</translation>
</message>
<message>
<location line="+4"/>
<source>Edit sending address</source>
<translation>Golygu'r cyfeiriad anfon</translation>
</message>
<message>
<location line="+76"/>
<source>The entered address "%1" is already in the address book.</source>
<translation>Mae'r cyfeiriad "%1" sydd newydd gael ei geisio gennych yn y llyfr cyfeiriad yn barod.</translation>
</message>
<message>
<location line="-5"/>
<source>The entered address "%1" is not a valid Capricoin address.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Could not unlock wallet.</source>
<translation>Methodd ddatgloi'r waled.</translation>
</message>
<message>
<location line="+5"/>
<source>New key generation failed.</source>
<translation>Methodd gynhyrchu allwedd newydd.</translation>
</message>
</context>
<context>
<name>GUIUtil::HelpMessageBox</name>
<message>
<location filename="../guiutil.cpp" line="+420"/>
<location line="+12"/>
<source>Capricoin-Qt</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-12"/>
<source>version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Usage:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>command-line options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>UI options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set language, for example "de_DE" (default: system locale)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Start minimized</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show splash screen on startup (default: 1)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>OptionsDialog</name>
<message>
<location filename="../forms/optionsdialog.ui" line="+14"/>
<source>Options</source>
<translation>Opsiynau</translation>
</message>
<message>
<location line="+16"/>
<source>&Main</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Pay transaction &fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Reserved amount does not participate in staking and is therefore spendable at any time.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Reserve</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Automatically start Capricoin after logging in to the system.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Start Capricoin on system login</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Detach block and address databases at shutdown. This means they can be moved to another data directory, but it slows down shutdown. The wallet is always detached.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Detach databases at shutdown</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>&Network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Automatically open the Capricoin client port on the router. This only works when your router supports UPnP and it is enabled.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Map port using &UPnP</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Connect to the Capricoin network through a SOCKS proxy (e.g. when connecting through Tor).</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Connect through SOCKS proxy:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Proxy &IP:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>IP address of the proxy (e.g. 127.0.0.1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Port:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Port of the proxy (e.g. 9050)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>SOCKS &Version:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>SOCKS version of the proxy (e.g. 5)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+36"/>
<source>&Window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Show only a tray icon after minimizing the window.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Minimize to the tray instead of the taskbar</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>M&inimize on close</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>&Display</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>User Interface &language:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>The user interface language can be set here. This setting will take effect after restarting Capricoin.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>&Unit to show amounts in:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Choose the default subdivision unit to show in the interface and when sending coins.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>Whether to show Capricoin addresses in the transaction list or not.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Display addresses in transaction list</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Whether to show coin control features or not.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Display coin &control features (experts only!)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+71"/>
<source>&OK</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>&Cancel</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>&Apply</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../optionsdialog.cpp" line="+55"/>
<source>default</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+149"/>
<location line="+9"/>
<source>Warning</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-9"/>
<location line="+9"/>
<source>This setting will take effect after restarting Capricoin.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>The supplied proxy address is invalid.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>OverviewPage</name>
<message>
<location filename="../forms/overviewpage.ui" line="+14"/>
<source>Form</source>
<translation>Ffurflen</translation>
</message>
<message>
<location line="+33"/>
<location line="+231"/>
<source>The displayed information may be out of date. Your wallet automatically synchronizes with the Capricoin network after a connection is established, but this process has not completed yet.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-160"/>
<source>Stake:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>Unconfirmed:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-107"/>
<source>Wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+49"/>
<source>Spendable:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Your current spendable balance</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+71"/>
<source>Immature:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>Mined balance that has not yet matured</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+20"/>
<source>Total:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Your current total balance</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+46"/>
<source><b>Recent transactions</b></source>
<translation><b>Trafodion diweddar</b></translation>
</message>
<message>
<location line="-108"/>
<source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-29"/>
<source>Total of coins that was staked, and do not yet count toward the current balance</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../overviewpage.cpp" line="+113"/>
<location line="+1"/>
<source>out of sync</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>QRCodeDialog</name>
<message>
<location filename="../forms/qrcodedialog.ui" line="+14"/>
<source>QR Code Dialog</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+59"/>
<source>Request Payment</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+56"/>
<source>Amount:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-44"/>
<source>Label:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Message:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+71"/>
<source>&Save As...</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../qrcodedialog.cpp" line="+62"/>
<source>Error encoding URI into QR Code.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+40"/>
<source>The entered amount is invalid, please check.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Resulting URI too long, try to reduce the text for label / message.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Save QR Code</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>PNG Images (*.png)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>RPCConsole</name>
<message>
<location filename="../forms/rpcconsole.ui" line="+46"/>
<source>Client name</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<location line="+23"/>
<location line="+26"/>
<location line="+23"/>
<location line="+23"/>
<location line="+36"/>
<location line="+53"/>
<location line="+23"/>
<location line="+23"/>
<location filename="../rpcconsole.cpp" line="+348"/>
<source>N/A</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-217"/>
<source>Client version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-45"/>
<source>&Information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+68"/>
<source>Using OpenSSL version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+49"/>
<source>Startup time</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>Network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Number of connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>On testnet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Block chain</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Current number of blocks</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Estimated total blocks</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Last block time</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+52"/>
<source>&Open</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Command-line options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Show the Capricoin-Qt help message to get a list with possible Capricoin command-line options.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Show</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>&Console</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-260"/>
<source>Build date</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-104"/>
<source>Capricoin - Debug window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Capricoin Core</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+279"/>
<source>Debug log file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Open the Capricoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+102"/>
<source>Clear console</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../rpcconsole.cpp" line="-33"/>
<source>Welcome to the Capricoin RPC console.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Type <b>help</b> for an overview of available commands.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SendCoinsDialog</name>
<message>
<location filename="../forms/sendcoinsdialog.ui" line="+14"/>
<location filename="../sendcoinsdialog.cpp" line="+182"/>
<location line="+5"/>
<location line="+5"/>
<location line="+5"/>
<location line="+6"/>
<location line="+5"/>
<location line="+5"/>
<source>Send Coins</source>
<translation>Anfon arian</translation>
</message>
<message>
<location line="+76"/>
<source>Coin Control Features</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+20"/>
<source>Inputs...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>automatically selected</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>Insufficient funds!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+77"/>
<source>Quantity:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<location line="+35"/>
<source>0</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-19"/>
<source>Bytes:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+51"/>
<source>Amount:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+22"/>
<location line="+86"/>
<location line="+86"/>
<location line="+32"/>
<source>0.00 hack</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-191"/>
<source>Priority:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>medium</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+32"/>
<source>Fee:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Low Output:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
<source>no</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+32"/>
<source>After Fee:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>Change</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+50"/>
<source>custom change address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+106"/>
<source>Send to multiple recipients at once</source>
<translation>Anfon at pobl lluosog ar yr un pryd</translation>
</message>
<message>
<location line="+3"/>
<source>Add &Recipient</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+20"/>
<source>Remove all transaction fields</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Clear &All</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+28"/>
<source>Balance:</source>
<translation>Gweddill:</translation>
</message>
<message>
<location line="+16"/>
<source>123.456 hack</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+31"/>
<source>Confirm the send action</source>
<translation>Cadarnhau'r gweithrediad anfon</translation>
</message>
<message>
<location line="+3"/>
<source>S&end</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../sendcoinsdialog.cpp" line="-173"/>
<source>Enter a Capricoin address (e.g. CapricoinfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>Copy quantity</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy after fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy bytes</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy priority</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy low output</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy change</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+86"/>
<source><b>%1</b> to %2 (%3)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Confirm send coins</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Are you sure you want to send %1?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source> and </source>
<translation type="unfinished"/>
</message>
<message>
<location line="+29"/>
<source>The recipient address is not valid, please recheck.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>The amount to pay must be larger than 0.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>The amount exceeds your balance.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>The total exceeds your balance when the %1 transaction fee is included.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Duplicate address found, can only send to each address once per send operation.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Error: Transaction creation failed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+251"/>
<source>WARNING: Invalid Capricoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<source>(no label)</source>
<translation>(heb label)</translation>
</message>
<message>
<location line="+4"/>
<source>WARNING: unknown change address</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SendCoinsEntry</name>
<message>
<location filename="../forms/sendcoinsentry.ui" line="+14"/>
<source>Form</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>A&mount:</source>
<translation>&Maint</translation>
</message>
<message>
<location line="+13"/>
<source>Pay &To:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<location filename="../sendcoinsentry.cpp" line="+25"/>
<source>Enter a label for this address to add it to your address book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+9"/>
<source>&Label:</source>
<translation>&Label:</translation>
</message>
<message>
<location line="+18"/>
<source>The address to send the payment to (e.g. CapricoinfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Choose address from address book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
<message>
<location line="+7"/>
<source>Paste address from clipboard</source>
<translation>Gludo cyfeiriad o'r glipfwrdd</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation>Alt+P</translation>
</message>
<message>
<location line="+7"/>
<source>Remove this recipient</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../sendcoinsentry.cpp" line="+1"/>
<source>Enter a Capricoin address (e.g. CapricoinfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>SignVerifyMessageDialog</name>
<message>
<location filename="../forms/signverifymessagedialog.ui" line="+14"/>
<source>Signatures - Sign / Verify a Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+13"/>
<location line="+124"/>
<source>&Sign Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-118"/>
<source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>The address to sign the message with (e.g. CapricoinfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+10"/>
<location line="+203"/>
<source>Choose an address from the address book</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-193"/>
<location line="+203"/>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
<message>
<location line="-193"/>
<source>Paste address from clipboard</source>
<translation>Gludo cyfeiriad o'r glipfwrdd</translation>
</message>
<message>
<location line="+10"/>
<source>Alt+P</source>
<translation>Alt+P</translation>
</message>
<message>
<location line="+12"/>
<source>Enter the message you want to sign here</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>Copy the current signature to the system clipboard</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>Sign the message to prove you own this Capricoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>Reset all sign message fields</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<location line="+146"/>
<source>Clear &All</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-87"/>
<location line="+70"/>
<source>&Verify Message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-64"/>
<source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+21"/>
<source>The address the message was signed with (e.g. CapricoinfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+40"/>
<source>Verify the message to ensure it was signed with the specified Capricoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>Reset all verify message fields</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../signverifymessagedialog.cpp" line="+27"/>
<location line="+3"/>
<source>Enter a Capricoin address (e.g. CapricoinfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-2"/>
<source>Click "Sign Message" to generate signature</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Enter Capricoin signature</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+82"/>
<location line="+81"/>
<source>The entered address is invalid.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-81"/>
<location line="+8"/>
<location line="+73"/>
<location line="+8"/>
<source>Please check the address and try again.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-81"/>
<location line="+81"/>
<source>The entered address does not refer to a key.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-73"/>
<source>Wallet unlock was cancelled.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Private key for the entered address is not available.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+12"/>
<source>Message signing failed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Message signed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+59"/>
<source>The signature could not be decoded.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<location line="+13"/>
<source>Please check the signature and try again.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>The signature did not match the message digest.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Message verification failed.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Message verified.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionDesc</name>
<message>
<location filename="../transactiondesc.cpp" line="+19"/>
<source>Open until %1</source>
<translation>Agor tan %1</translation>
</message>
<message numerus="yes">
<location line="-2"/>
<source>Open for %n block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+8"/>
<source>conflicted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1/offline</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1/unconfirmed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>%1 confirmations</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>Status</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+7"/>
<source>, broadcast through %n node(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+4"/>
<source>Date</source>
<translation>Dyddiad</translation>
</message>
<message>
<location line="+7"/>
<source>Source</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Generated</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<location line="+17"/>
<source>From</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<location line="+22"/>
<location line="+58"/>
<source>To</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-77"/>
<location line="+2"/>
<source>own address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-2"/>
<source>label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+37"/>
<location line="+12"/>
<location line="+45"/>
<location line="+17"/>
<location line="+30"/>
<source>Credit</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="-102"/>
<source>matures in %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+2"/>
<source>not accepted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+44"/>
<location line="+8"/>
<location line="+15"/>
<location line="+30"/>
<source>Debit</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-39"/>
<source>Transaction fee</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Net amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Message</source>
<translation>Neges</translation>
</message>
<message>
<location line="+2"/>
<source>Comment</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Generated coins must mature 510 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Debug information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Transaction</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Inputs</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+23"/>
<source>Amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>true</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>false</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-211"/>
<source>, has not been successfully broadcast yet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>unknown</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionDescDialog</name>
<message>
<location filename="../forms/transactiondescdialog.ui" line="+14"/>
<source>Transaction details</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>This pane shows a detailed description of the transaction</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionTableModel</name>
<message>
<location filename="../transactiontablemodel.cpp" line="+226"/>
<source>Date</source>
<translation>Dyddiad</translation>
</message>
<message>
<location line="+0"/>
<source>Type</source>
<translation>Math</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Cyfeiriad</translation>
</message>
<message>
<location line="+0"/>
<source>Amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+60"/>
<source>Open until %1</source>
<translation>Agor tan %1</translation>
</message>
<message>
<location line="+12"/>
<source>Confirmed (%1 confirmations)</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="-15"/>
<source>Open for %n more block(s)</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+6"/>
<source>Offline</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Unconfirmed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Confirming (%1 of %2 recommended confirmations)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Conflicted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Immature (%1 confirmations, will be available after %2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>This block was not received by any other nodes and will probably not be accepted!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Generated but not accepted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+42"/>
<source>Received with</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Received from</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Sent to</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Payment to yourself</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Mined</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+38"/>
<source>(n/a)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+190"/>
<source>Transaction status. Hover over this field to show number of confirmations.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Date and time that the transaction was received.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Type of transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Destination address of transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Amount removed from or added to balance.</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>TransactionView</name>
<message>
<location filename="../transactionview.cpp" line="+55"/>
<location line="+16"/>
<source>All</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-15"/>
<source>Today</source>
<translation>Heddiw</translation>
</message>
<message>
<location line="+1"/>
<source>This week</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This month</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Last month</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>This year</source>
<translation>Eleni</translation>
</message>
<message>
<location line="+1"/>
<source>Range...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Received with</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Sent to</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>To yourself</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Mined</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Other</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Enter address or label to search</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Min amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+34"/>
<source>Copy address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Copy transaction ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Edit label</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Show transaction details</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+144"/>
<source>Export Transaction Data</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Comma separated file (*.csv)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Confirmed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Date</source>
<translation>Dyddiad</translation>
</message>
<message>
<location line="+1"/>
<source>Type</source>
<translation>Math</translation>
</message>
<message>
<location line="+1"/>
<source>Label</source>
<translation>Label</translation>
</message>
<message>
<location line="+1"/>
<source>Address</source>
<translation>Cyfeiriad</translation>
</message>
<message>
<location line="+1"/>
<source>Amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>ID</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error exporting</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>Could not write to file %1.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+100"/>
<source>Range:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>to</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>WalletModel</name>
<message>
<location filename="../walletmodel.cpp" line="+206"/>
<source>Sending...</source>
<translation type="unfinished"/>
</message>
</context>
<context>
<name>bitcoin-core</name>
<message>
<location filename="../bitcoinstrings.cpp" line="+33"/>
<source>Capricoin version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Usage:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Send command to -server or Capricoind</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>List commands</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Get help for a command</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Options:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Specify configuration file (default: Capricoin.conf)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Specify pid file (default: Capricoind.pid)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Specify wallet file (within data directory)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Specify data directory</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Set database cache size in megabytes (default: 25)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set database disk log size in megabytes (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>Listen for connections on <port> (default: 15714 or testnet: 25714)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Maintain at most <n> connections to peers (default: 125)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Connect to a node to retrieve peer addresses, and disconnect</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Specify your own public address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Bind to given address. Use [host]:port notation for IPv6</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Stake your coins to support network and gain reward (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Threshold for disconnecting misbehaving peers (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-44"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+51"/>
<source>Detach block and address databases. Increases shutdown time (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+109"/>
<source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-5"/>
<source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds </source>
<translation type="unfinished"/>
</message>
<message>
<location line="-87"/>
<source>Listen for JSON-RPC connections on <port> (default: 15715 or testnet: 25715)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-11"/>
<source>Accept command line and JSON-RPC commands</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+101"/>
<source>Error: Transaction creation failed </source>
<translation type="unfinished"/>
</message>
<message>
<location line="-5"/>
<source>Error: Wallet locked, unable to create transaction </source>
<translation type="unfinished"/>
</message>
<message>
<location line="-8"/>
<source>Importing blockchain data file.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Importing bootstrap blockchain data file.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-88"/>
<source>Run in the background as a daemon and accept commands</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Use the test network</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-24"/>
<source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-38"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+117"/>
<source>Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-20"/>
<source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+61"/>
<source>Warning: Please check that your computer's date and time are correct! If your clock is wrong Capricoin will not work properly.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-31"/>
<source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-18"/>
<source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-30"/>
<source>Attempt to recover private keys from a corrupt wallet.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Block creation options:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-62"/>
<source>Connect only to the specified node(s)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Discover own IP address (default: 1 when listening and no -externalip)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+94"/>
<source>Failed to listen on any port. Use -listen=0 if you want this.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-90"/>
<source>Find peers using DNS lookup (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Sync checkpoints policy (default: strict)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+83"/>
<source>Invalid -tor address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Invalid amount for -reservebalance=<amount></source>
<translation type="unfinished"/>
</message>
<message>
<location line="-82"/>
<source>Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-16"/>
<source>Only connect to nodes in network <net> (IPv4, IPv6 or Tor)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+28"/>
<source>Output extra debugging information. Implies all other -debug* options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Output extra network debugging information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Prepend debug output with timestamp</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+35"/>
<source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-74"/>
<source>Select the version of socks proxy to use (4-5, default: 5)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+41"/>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Send trace/debug info to debugger</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+28"/>
<source>Set maximum block size in bytes (default: 250000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Set minimum block size in bytes (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-29"/>
<source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-42"/>
<source>Specify connection timeout in milliseconds (default: 5000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+109"/>
<source>Unable to sign checkpoint, wrong checkpointkey?
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-80"/>
<source>Use UPnP to map the listening port (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Use UPnP to map the listening port (default: 1 when listening)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-25"/>
<source>Use proxy to reach tor hidden services (default: same as -proxy)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+42"/>
<source>Username for JSON-RPC connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+47"/>
<source>Verifying database integrity...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+57"/>
<source>WARNING: syncronized checkpoint violation detected, but skipped!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Warning: Disk space is low!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-2"/>
<source>Warning: This version is obsolete, upgrade required!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-48"/>
<source>wallet.dat corrupt, salvage failed</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-54"/>
<source>Password for JSON-RPC connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-84"/>
<source>%s, you must set a rpcpassword in the configuration file:
%s
It is recommended you use the following random password:
rpcuser=Capricoinrpc
rpcpassword=%s
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %%s | mail -s "Capricoin Alert" admin@foo.com
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+51"/>
<source>Find peers using internet relay chat (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+15"/>
<source>When creating transactions, ignore inputs with value less than this (default: 0.01)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+16"/>
<source>Allow JSON-RPC connections from specified IP address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Send commands to node running on <ip> (default: 127.0.0.1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Require a confirmations for change (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Enforce transaction scripts to use canonical PUSH operators (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Upgrade wallet to latest format</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set key pool size to <n> (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Rescan the block chain for missing wallet transactions</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>How many blocks to check at startup (default: 2500, 0 = all)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>How thorough the block verification is (0-6, default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Imports blocks from external blk000?.dat file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Use OpenSSL (https) for JSON-RPC connections</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Server certificate file (default: server.cert)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Server private key (default: server.pem)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+53"/>
<source>Error: Wallet unlocked for staking only, unable to create transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+18"/>
<source>WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-158"/>
<source>This help message</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+95"/>
<source>Wallet %s resides outside data directory %s.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Cannot obtain a lock on data directory %s. Capricoin is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-98"/>
<source>Capricoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+140"/>
<source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-130"/>
<source>Connect through socks proxy</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Allow DNS lookups for -addnode, -seednode and -connect</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+122"/>
<source>Loading addresses...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-15"/>
<source>Error loading blkindex.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Error loading wallet.dat: Wallet corrupted</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error loading wallet.dat: Wallet requires newer version of Capricoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Wallet needed to be rewritten: restart Capricoin to complete</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error loading wallet.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-16"/>
<source>Invalid -proxy address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Unknown -socks proxy version requested: %i</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Cannot resolve -bind address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Cannot resolve -externalip address: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-24"/>
<source>Invalid amount for -paytxfee=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+44"/>
<source>Error: could not start node</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Sending...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Invalid amount</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Insufficient funds</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-34"/>
<source>Loading block index...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-103"/>
<source>Add a node to connect to and attempt to keep the connection open</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+122"/>
<source>Unable to bind to %s on this computer. Capricoin is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-97"/>
<source>Fee per KB to add to transactions you send</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+55"/>
<source>Invalid amount for -mininput=<amount>: '%s'</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Loading wallet...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+8"/>
<source>Cannot downgrade wallet</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Cannot initialize keypool</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Cannot write default address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Rescanning...</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Done loading</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-167"/>
<source>To use the %s option</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Error</source>
<translation>Gwall</translation>
</message>
<message>
<location line="+6"/>
<source>You must set rpcpassword=<password> in the configuration file:
%s
If the file does not exist, create it with owner-readable-only file permissions.</source>
<translation type="unfinished"/>
</message>
</context>
</TS> | {
"content_hash": "207fd8ef546f89df129c774dadfb3c49",
"timestamp": "",
"source": "github",
"line_count": 3285,
"max_line_length": 395,
"avg_line_length": 33.5607305936073,
"alnum_prop": 0.589884532005406,
"repo_name": "Capricoinofficial/Capricoin",
"id": "2c549e0f1900e8665ff54505f566cb66cf48be45",
"size": "110252",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/qt/locale/bitcoin_cy.ts",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Assembly",
"bytes": "51312"
},
{
"name": "C",
"bytes": "706676"
},
{
"name": "C++",
"bytes": "2622200"
},
{
"name": "CSS",
"bytes": "1127"
},
{
"name": "HTML",
"bytes": "50615"
},
{
"name": "Makefile",
"bytes": "11970"
},
{
"name": "NSIS",
"bytes": "5947"
},
{
"name": "Objective-C",
"bytes": "858"
},
{
"name": "Objective-C++",
"bytes": "3536"
},
{
"name": "Python",
"bytes": "48302"
},
{
"name": "QMake",
"bytes": "14506"
},
{
"name": "Shell",
"bytes": "8748"
}
],
"symlink_target": ""
} |
declare namespace Jymfony.Component.HttpFoundation.Session {
import SessionStorageInterface = Jymfony.Component.HttpFoundation.Session.Storage.SessionStorageInterface;
import FlashBagInterface = Jymfony.Component.HttpFoundation.Session.Flash.FlashBagInterface;
export class Session extends implementationOf(SessionInterface) {
private _storage: SessionStorageInterface;
private _attributesName: string;
private _flashesName: string;
/**
* Constructor.
*/
__construct(storage: SessionStorageInterface, attributeBag?: AttributeBagInterface, flashBag?: FlashBagInterface): void;
constructor(storage: SessionStorageInterface, attributeBag?: AttributeBagInterface, flashBag?: FlashBagInterface);
/**
* @inheritdoc
*/
start(): Promise<void>;
/**
* @inheritdoc
*/
public id: string;
/**
* @inheritdoc
*/
public name: string;
/**
* @inheritdoc
*/
invalidate(lifetime?: number): Promise<void>;
/**
* @inheritdoc
*/
migrate(destroy?: boolean, lifetime?: number): Promise<void>;
/**
* @inheritdoc
*/
save(): Promise<void>;
/**
* @inheritdoc
*/
has(name: string): boolean;
/**
* @inheritdoc
*/
get(name: string, defaultValue?: any): string | any;
/**
* @inheritdoc
*/
set(name: string, value: any): void;
/**
* @inheritdoc
*/
all(): Record<string, any>;
/**
* @inheritdoc
*/
replace(attributes: Record<string, any>): void;
/**
* @inheritdoc
*/
remove(name: string): void;
/**
* @inheritdoc
*/
clear(): void;
/**
* @inheritdoc
*/
public readonly started: boolean;
/**
* @inheritdoc
*/
registerBag(bag: SessionBagInterface): void;
/**
* @inheritdoc
*/
getBag(name: string): SessionBagInterface;
/**
* @inheritdoc
*/
public readonly attributesBag: AttributeBagInterface;
/**
* @inheritdoc
*/
public readonly flashBag: FlashBagInterface;
}
}
| {
"content_hash": "f94dc442f5ba433ff7a99da95b4bcaed",
"timestamp": "",
"source": "github",
"line_count": 106,
"max_line_length": 128,
"avg_line_length": 23.0188679245283,
"alnum_prop": 0.5168032786885246,
"repo_name": "massimilianobraglia/jymfony",
"id": "50edf637d95d5d4288b4fe3d867e5c8a7efb9823",
"size": "2440",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/Component/HttpFoundation/types/Session/Session.d.ts",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "2981759"
}
],
"symlink_target": ""
} |
using System;
using System.Linq;
using Bool = System.Int16;
using Softopoulos.Crestron.Core;
namespace Softopoulos.Crestron.PhilipsHue
{
public class LightBulbProperties
{
public LightBulbProperties()
{
TransitionTimeToUse = -1;
}
internal LightBulbProperties(LightBulb lightBulbFromWhichToSetAll)
{
Bool trueBool = PlatformConverter.ToPlatformBool(true);
SetBrightness = trueBool;
SetBrightnessPercentage = trueBool;
SetHue = trueBool;
SetSaturation = trueBool;
SetSaturationPercentage = trueBool;
SetXY = trueBool;
SetColorTemperature = trueBool;
Brightness = lightBulbFromWhichToSetAll.Brightness;
BrightnessPercentage = lightBulbFromWhichToSetAll.BrightnessPercentage;
Hue = lightBulbFromWhichToSetAll.Hue;
Saturation = lightBulbFromWhichToSetAll.Saturation;
SaturationPercentage = lightBulbFromWhichToSetAll.SaturationPercentage;
XY = lightBulbFromWhichToSetAll.XY.ToArray();
ColorTemperature = lightBulbFromWhichToSetAll.ColorTemperature;
}
public Bool SetBrightness { get; set; }
public ushort Brightness { get; set; }
public Bool SetBrightnessPercentage { get; set; }
public ushort BrightnessPercentage { get; set; }
public Bool SetHue { get; set; }
public ushort Hue { get; set; }
public Bool SetSaturation { get; set; }
public ushort Saturation { get; set; }
public Bool SetSaturationPercentage { get; set; }
public ushort SaturationPercentage { get; set; }
public Bool SetXY { get; set; }
public float[] XY { get; set; }
public Bool SetColorTemperature { get; set; }
public ushort ColorTemperature { get; set; }
public string ColorNameOrHexRgb { get; set; }
public Bool SetBrightnessOffset { get; set; }
public short BrightnessOffset { get; set; }
public Bool SetHueOffset { get; set; }
public int HueOffset { get; set; }
public Bool SetSaturationOffset { get; set; }
public short SaturationOffset { get; set; }
public Bool SetXYOffset { get; set; }
public float[] XYOffset { get; set; }
public Bool SetColorTemperatureOffset { get; set; }
public short ColorTemperatureOffset { get; set; }
public short TransitionTimeToUse { get; set; }
}
} | {
"content_hash": "37e3f0e95bd3dd9ce49eb8ae758d623d",
"timestamp": "",
"source": "github",
"line_count": 65,
"max_line_length": 74,
"avg_line_length": 34.41538461538462,
"alnum_prop": 0.7223960661600357,
"repo_name": "Softopoulos/Crestron",
"id": "414d9e1564d244b054b429974e40c662f60cdaab",
"size": "2237",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "PhilipsHue/LightBulbProperties.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "75"
},
{
"name": "C#",
"bytes": "207745"
}
],
"symlink_target": ""
} |
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class Fleer : Vehicle {
//store the target
public GameObject target;
//private obstacles array
private GameObject[] obstacles;
//get a reference to the GameManager
private GameManager gm;
//weights for steering forces
public float seekWt = 75.0f;
public float fleeWt = 90.0f;
public float avoidWt = 10.0f;
public float avoidDist = 20.0f;
//flocking weights
public float separationWt = 20f;
public float separationDist = 2f;
public float cohesionWt = 1f;
public float alignmentWt = 1f;
public float boundsWt = 100f;
Vector3 center;
bool shouldIWander = true;
bool readyToEscape = false;
public float rayCastingHitDistance = 40f;
public float ViewDegree = 90f;
private bool foundHit = false;
RaycastHit hit;
// Use this for initialization
override public void Start () {
base.Start();
obstacles = GameObject.FindGameObjectsWithTag("Obstacle");
gm = GameObject.Find("MainGo").GetComponent<GameManager>();
center = new Vector3(257.7f, 0f, 164.8f);
center.y = 1f;
hit = new RaycastHit ();
}
protected override void CalcSteeringForces() {
//get a force vector
Vector3 force = Vector3.zero;
Debug.DrawLine (transform.position, transform.position + transform.forward * 10, Color.red);
if (shouldIWander == true)
{
force += Wander() * 70f;
}
Vector3 rayDirection = target.transform.position - transform.position;
rayDirection.y = 2f;
if ((Vector3.Angle (rayDirection, transform.forward)) <= ViewDegree) {
if(Physics.Raycast(transform.position, rayDirection, out hit, rayCastingHitDistance))
{
if(hit.transform.gameObject.tag == "Dead")
{
shouldIWander = false;
Debug.Log("RUN AWAY");
force += evade (target.transform.position) * fleeWt;
Debug.DrawRay(transform.position, rayDirection, Color.magenta);
}
else
{
shouldIWander = true;
}
}
}
if (Doors.doorOpen == true)
{
shouldIWander = false;
force += Arrive(GameObject.FindGameObjectWithTag("SaveZone").transform.position) * seekWt;
}
//Boundries
Debug.Log ("OffStage: " + offStage () + "| ReadyToEscape:" + readyToEscape);
if (offStage () && readyToEscape == false) {
//Debug.Log("HERE1");
force += Seek (center) * boundsWt;
Debug.Log("HERE");
}
if (offStage () && readyToEscape == true && Doors.doorOpen == false) {
force += Seek(center) * boundsWt;
}
//ObstacleAvoidance
for (int i = 0; i < obstacles.Length; i++ ) {
force += AvoidObstacle(obstacles[i], avoidDist) * avoidWt;
}
//limit Force and apply
force = Vector3.ClampMagnitude(force, maxForce);
ApplyForce(force);
}
// Gets the closest zombie
public GameObject getClosestTarget()
{
float distance = 100000f;
GameObject closeZombie = null;
List<GameObject> zom = gm.Zombies;
foreach (GameObject zombi in zom)
{
float tempDistance = Vector3.Distance(zombi.transform.position, transform.position);
if(tempDistance < distance)
{
distance = tempDistance;
closeZombie = zombi;
}
}
return closeZombie;
}
// checks if you still in the stage
protected bool offStage()
{
bool off = false;
if (transform.position.x > 393.56f) {
off = true;
} else if (transform.position.x < 98f) {
off = true;
} else if (transform.position.z > 294.08f) {
off = true;
} else if (transform.position.z < 6f) {
off = true;
}
return off;
}
//Detect if you enter the safe spot
void OnTriggerEnter(Collider other)
{
if (other.gameObject.tag == "SafePointStartHere") {
readyToEscape = true;
}
}
}
| {
"content_hash": "a22524c1e2bfc6d2491a5dad13a27d69",
"timestamp": "",
"source": "github",
"line_count": 166,
"max_line_length": 94,
"avg_line_length": 22.126506024096386,
"alnum_prop": 0.6724748162265178,
"repo_name": "Sasha-Shum/The-End-of-the-World-",
"id": "d07de2696c7baccffa8b197ce421e1b5c6aa737f",
"size": "3675",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Scripts/Fleer.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "24640"
},
{
"name": "HTML",
"bytes": "3692"
}
],
"symlink_target": ""
} |
<?php
namespace Scribe\MantleBundle\Doctrine\Base\Model\Locale;
use Scribe\MantleBundle\Doctrine\Entity\Locale\Locale;
/**
* Class HasLocale.
*/
trait HasLocale
{
/**
* @var Locale
*/
protected $locale;
/**
* @return $this
*/
public function initializeLocale()
{
$this->locale = null;
return $this;
}
/**
* @param Locale $locale
*
* @return $this
*/
public function setLocale(Locale $locale)
{
$this->locale = $locale;
return $this;
}
/**
* @return Locale
*/
public function getLocale()
{
return $this->locale;
}
/**
* @return bool
*/
public function hasLocale()
{
return (bool) ($this->locale !== null);
}
/**
* @return $this
*/
public function clearLocale()
{
return $this->initializeLocale();
}
}
/* EOF */
| {
"content_hash": "97e3e9a2eb05ec7893104b0b208214f0",
"timestamp": "",
"source": "github",
"line_count": 66,
"max_line_length": 57,
"avg_line_length": 14.227272727272727,
"alnum_prop": 0.5069222577209798,
"repo_name": "scr-be/mantle-bundle",
"id": "98e4f3edf5a244995789e3a3413cc236e5f5b509",
"size": "1175",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/Doctrine/Base/Model/Locale/HasLocale.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "116467"
},
{
"name": "HTML",
"bytes": "45088"
},
{
"name": "JavaScript",
"bytes": "27201"
},
{
"name": "PHP",
"bytes": "683613"
}
],
"symlink_target": ""
} |
Runtime
===========
Projects for Runtime
1 RuntimeStudy
2 BundleTest&DynamicClassBundle
| {
"content_hash": "764fba533a29f892caa84b7acbfc614c",
"timestamp": "",
"source": "github",
"line_count": 6,
"max_line_length": 31,
"avg_line_length": 14.833333333333334,
"alnum_prop": 0.7528089887640449,
"repo_name": "scorpiozj/iOSTreasure",
"id": "2929b4799bc25aedd07e20ad354a739edc34ecf7",
"size": "89",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Runtime/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Objective-C",
"bytes": "298233"
},
{
"name": "Shell",
"bytes": "711"
}
],
"symlink_target": ""
} |
(function(buster, define) {
var assert, fail, sentinel;
assert = buster.assert;
fail = buster.assertions.fail;
sentinel = {};
function noop() {}
define('when/unfold/list-test', function (require) {
var list;
list = require('when/unfold/list');
buster.testCase('when/unfold/list', {
'should produce an empty list when proceed returns truthy immediately': function(done) {
var spy;
spy = this.stub().returns(true);
list(noop, spy, sentinel).then(
function(value) {
assert.equals(value, []);
}
).ensure(done);
},
'should produce a list of N elements': function(done) {
var len = 3;
function condition(i) {
return i == len;
}
function generate(x) {
return [x, x+1];
}
list(generate, condition, 0).then(
function(result) {
assert.equals(result.length, len);
assert.equals(result, [0, 1, 2]);
}
).ensure(done);
}
});
});
}(
this.buster || require('buster'),
typeof define === 'function' && define.amd ? define : function (id, factory) {
var packageName = id.split(/[\/\-\.]/)[0], pathToRoot = id.replace(/[^\/]+/g, '..');
pathToRoot = pathToRoot.length > 2 ? pathToRoot.substr(3) : pathToRoot;
factory(function (moduleId) {
return require(moduleId.indexOf(packageName) === 0 ? pathToRoot + moduleId.substr(packageName.length) : moduleId);
});
}
// Boilerplate for AMD and Node
));
| {
"content_hash": "f0d2a5b14d45eab91a2fa6228470cd65",
"timestamp": "",
"source": "github",
"line_count": 65,
"max_line_length": 117,
"avg_line_length": 21.415384615384614,
"alnum_prop": 0.6257183908045977,
"repo_name": "mighdoll/sparkle",
"id": "a04eda347ca72f3cb9c41bc51e250c9ebd45d7ed",
"size": "1392",
"binary": false,
"copies": "11",
"ref": "refs/heads/master",
"path": "protocol/src/main/resources/web/lib/when/test/unfold/list-test.js",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "1347"
},
{
"name": "CSS",
"bytes": "1256191"
},
{
"name": "HTML",
"bytes": "123161"
},
{
"name": "JavaScript",
"bytes": "4467636"
},
{
"name": "Scala",
"bytes": "1016366"
},
{
"name": "Shell",
"bytes": "11999"
}
],
"symlink_target": ""
} |
package org.gradle.plugins.ide.eclipse.model.internal;
import com.google.common.base.Function;
import com.google.common.base.Joiner;
import com.google.common.collect.Collections2;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.LinkedHashMultimap;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Multimap;
import com.google.common.collect.Sets;
import org.gradle.api.file.DirectoryTree;
import org.gradle.api.file.FileCollection;
import org.gradle.internal.metaobject.DynamicObjectUtil;
import org.gradle.api.specs.Spec;
import org.gradle.api.tasks.SourceSet;
import org.gradle.api.tasks.util.PatternSet;
import org.gradle.internal.Cast;
import org.gradle.internal.Pair;
import org.gradle.plugins.ide.eclipse.internal.EclipsePluginConstants;
import org.gradle.plugins.ide.eclipse.model.EclipseClasspath;
import org.gradle.plugins.ide.eclipse.model.SourceFolder;
import org.gradle.util.CollectionUtils;
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Set;
public class SourceFoldersCreator {
public List<SourceFolder> createSourceFolders(final EclipseClasspath classpath) {
Function<File, String> provideRelativePath = new Function<File, String>() {
@Override
public String apply(File input) {
return classpath.getProject().relativePath(input);
}
};
List<SourceFolder> sourceFolders = projectRelativeFolders(classpath.getSourceSets(), provideRelativePath, classpath.getDefaultOutputDir());
return collectRegularAndExternalSourceFolders(sourceFolders, new Function<Pair<Collection<SourceFolder>, Collection<SourceFolder>>, List<SourceFolder>>() {
@Override
public List<SourceFolder> apply(Pair<Collection<SourceFolder>, Collection<SourceFolder>> sourceFolders) {
List<SourceFolder> entries = Lists.newArrayListWithCapacity(sourceFolders.getLeft().size() + sourceFolders.getRight().size());
entries.addAll(sourceFolders.getLeft());
entries.addAll(sourceFolders.getRight());
return entries;
}
});
}
/**
* Returns the the list of external source folders defining only the name and path attributes.
*
* @return source folders that live outside of the project
*/
public List<SourceFolder> getBasicExternalSourceFolders(Iterable<SourceSet> sourceSets, Function<File, String> provideRelativePath, File defaultOutputDir) {
List<SourceFolder> basicSourceFolders = basicProjectRelativeFolders(sourceSets, provideRelativePath, defaultOutputDir);
return collectRegularAndExternalSourceFolders(basicSourceFolders, new Function<Pair<Collection<SourceFolder>, Collection<SourceFolder>>, List<SourceFolder>>() {
@Override
public List<SourceFolder> apply(Pair<Collection<SourceFolder>, Collection<SourceFolder>> sourceFolders) {
return Lists.newArrayList(sourceFolders.right());
}
});
}
private <T> T collectRegularAndExternalSourceFolders(List<SourceFolder> sourceFolder, Function<Pair<Collection<SourceFolder>, Collection<SourceFolder>>, T> collector) {
Pair<Collection<SourceFolder>, Collection<SourceFolder>> partitionedFolders = CollectionUtils.partition(sourceFolder, new Spec<SourceFolder>() {
@Override
public boolean isSatisfiedBy(SourceFolder sourceFolder) {
return sourceFolder.getPath().contains("..");
}
});
Collection<SourceFolder> externalSourceFolders = partitionedFolders.getLeft();
Collection<SourceFolder> regularSourceFolders = partitionedFolders.getRight();
List<String> sources = Lists.newArrayList(Collections2.transform(regularSourceFolders, new Function<SourceFolder, String>() {
@Override
public String apply(SourceFolder sourceFolder) {
return sourceFolder.getName();
}
}));
Collection<SourceFolder> dedupedExternalSourceFolders = trimAndDedup(externalSourceFolders, sources);
return collector.apply(Pair.of(regularSourceFolders, dedupedExternalSourceFolders));
}
private List<SourceFolder> projectRelativeFolders(Iterable<SourceSet> sourceSets, Function<File, String> provideRelativePath, File defaultOutputDir) {
String defaultOutputPath = PathUtil.normalizePath(provideRelativePath.apply(defaultOutputDir));
ArrayList<SourceFolder> entries = Lists.newArrayList();
List<SourceSet> sortedSourceSets = sortSourceSetsAsPerUsualConvention(sourceSets);
Map<SourceSet, String> sourceSetOutputPaths = collectSourceSetOutputPaths(sortedSourceSets, defaultOutputPath);
Multimap<SourceSet, SourceSet> sourceSetUsages = getSourceSetUsages(sortedSourceSets);
for (SourceSet sourceSet : sortedSourceSets) {
List<DirectoryTree> sortedSourceDirs = sortSourceDirsAsPerUsualConvention(sourceSet.getAllSource().getSrcDirTrees());
for (DirectoryTree tree : sortedSourceDirs) {
File dir = tree.getDir();
if (dir.isDirectory()) {
String relativePath = provideRelativePath.apply(dir);
SourceFolder folder = new SourceFolder(relativePath, null);
folder.setDir(dir);
folder.setName(dir.getName());
folder.setIncludes(getIncludesForTree(sourceSet, tree));
folder.setExcludes(getExcludesForTree(sourceSet, tree));
folder.setOutput(sourceSetOutputPaths.get(sourceSet));
addScopeAttributes(folder, sourceSet, sourceSetUsages);
addSourceSetAttribute(sourceSet, folder);
entries.add(folder);
}
}
}
return entries;
}
private List<SourceFolder> basicProjectRelativeFolders(Iterable<SourceSet> sourceSets, Function<File, String> provideRelativePath, File defaultOutputDir) {
ArrayList<SourceFolder> entries = Lists.newArrayList();
List<SourceSet> sortedSourceSets = sortSourceSetsAsPerUsualConvention(sourceSets);
for (SourceSet sourceSet : sortedSourceSets) {
List<DirectoryTree> sortedSourceDirs = sortSourceDirsAsPerUsualConvention(sourceSet.getAllSource().getSrcDirTrees());
for (DirectoryTree tree : sortedSourceDirs) {
File dir = tree.getDir();
if (dir.isDirectory()) {
SourceFolder folder = new SourceFolder(provideRelativePath.apply(dir), null);
folder.setDir(dir);
folder.setName(dir.getName());
entries.add(folder);
}
}
}
return entries;
}
private List<SourceFolder> trimAndDedup(Collection<SourceFolder> externalSourceFolders, List<String> givenSources) {
// externals are mapped to linked resources so we just need a name of the resource, without full path
// non unique folder names are naively deduped by adding parent filename as a prefix till unique
// since this seems like a rare edge case this simple approach should be enough
List<SourceFolder> trimmedSourceFolders = Lists.newArrayList();
for (SourceFolder folder : externalSourceFolders) {
folder.trim();
File parentFile = folder.getDir().getParentFile();
while (givenSources.contains(folder.getName()) && parentFile != null) {
folder.trim(parentFile.getName());
parentFile = parentFile.getParentFile();
}
givenSources.add(folder.getName());
trimmedSourceFolders.add(folder);
}
return trimmedSourceFolders;
}
private void addScopeAttributes(SourceFolder folder, SourceSet sourceSet, Multimap<SourceSet, SourceSet> sourceSetUsages) {
folder.getEntryAttributes().put(EclipsePluginConstants.GRADLE_SCOPE_ATTRIBUTE_NAME, sanitizeNameForAttribute(sourceSet));
folder.getEntryAttributes().put(EclipsePluginConstants.GRADLE_USED_BY_SCOPE_ATTRIBUTE_NAME, Joiner.on(',').join(getUsingSourceSetNames(sourceSet, sourceSetUsages)));
}
private List<String> getUsingSourceSetNames(SourceSet sourceSet, Multimap<SourceSet, SourceSet> sourceSetUsages) {
Collection<SourceSet> usingSourceSets = sourceSetUsages.get(sourceSet);
List<String> usingSourceSetNames = Lists.newArrayList();
for (SourceSet usingSourceSet : usingSourceSets) {
usingSourceSetNames.add(sanitizeNameForAttribute(usingSourceSet));
}
return usingSourceSetNames;
}
private String sanitizeNameForAttribute(SourceSet sourceSet) {
return sourceSet.getName().replaceAll(",", "");
}
private Multimap<SourceSet, SourceSet> getSourceSetUsages(Iterable<SourceSet> sourceSets) {
Multimap<SourceSet, SourceSet> usages = LinkedHashMultimap.create();
for (SourceSet sourceSet : sourceSets) {
for (SourceSet otherSourceSet : sourceSets) {
if (containsOutputOf(sourceSet, otherSourceSet)) {
usages.put(otherSourceSet, sourceSet);
}
}
}
return usages;
}
private boolean containsOutputOf(SourceSet sourceSet, SourceSet otherSourceSet) {
try {
return containsAll(sourceSet.getRuntimeClasspath(), otherSourceSet.getOutput());
} catch (Exception e) {
return false;
}
}
private boolean containsAll(FileCollection first, FileCollection second) {
for (File file : second) {
if (!first.contains(file)) {
return false;
}
}
return true;
}
private void addSourceSetAttribute(SourceSet sourceSet, SourceFolder folder) {
// Using the test sources feature introduced in Eclipse Photon
String name = sourceSet.getName();
if (!SourceSet.MAIN_SOURCE_SET_NAME.equals(name)) {
if (SourceSet.TEST_SOURCE_SET_NAME.equals(name) || folder.getPath().toLowerCase().contains("test")) {
folder.getEntryAttributes().put(EclipsePluginConstants.TEST_SOURCES_ATTRIBUTE_KEY, EclipsePluginConstants.TEST_SOURCES_ATTRIBUTE_VALUE);
}
}
}
private Map<SourceSet, String> collectSourceSetOutputPaths(Iterable<SourceSet> sourceSets, String defaultOutputPath) {
Set<String> existingPaths = Sets.newHashSet(defaultOutputPath);
Map<SourceSet, String> result = Maps.newHashMap();
for (SourceSet sourceSet : sourceSets) {
String path = collectSourceSetOutputPath(sourceSet.getName(), existingPaths, "");
existingPaths.add(path);
result.put(sourceSet, path);
}
return result;
}
private String collectSourceSetOutputPath(String sourceSetName, Set<String> existingPaths, String suffix) {
String path = "bin/" + sourceSetName + suffix;
return existingPaths.contains(path) ? collectSourceSetOutputPath(sourceSetName, existingPaths, suffix + "_") : path;
}
private List<String> getExcludesForTree(SourceSet sourceSet, DirectoryTree directoryTree) {
List<Set<String>> excludesByType = getFiltersForTreeGroupedByType(sourceSet, directoryTree, "excludes");
return CollectionUtils.intersection(excludesByType);
}
private List<String> getIncludesForTree(SourceSet sourceSet, DirectoryTree directoryTree) {
List<Set<String>> includesByType = getFiltersForTreeGroupedByType(sourceSet, directoryTree, "includes");
for (Set<String> it : includesByType) {
if (it.isEmpty()) {
return Collections.emptyList();
}
}
List<String> allIncludes = CollectionUtils.flattenCollections(String.class, includesByType);
return ImmutableSet.copyOf(allIncludes).asList();
}
private List<Set<String>> getFiltersForTreeGroupedByType(SourceSet sourceSet, DirectoryTree directoryTree, String filterOperation) {
// check for duplicate entries in java and resources
Set<File> javaSrcDirs = sourceSet.getAllJava().getSrcDirs();
Set<File> resSrcDirs = sourceSet.getResources().getSrcDirs();
List<File> srcDirs = CollectionUtils.intersection(Lists.newArrayList(javaSrcDirs, resSrcDirs));
if (!srcDirs.contains(directoryTree.getDir())) {
return Lists.<Set<String>>newArrayList(collectFilters(directoryTree.getPatterns(), filterOperation));
} else {
Set<String> resourcesFilter = collectFilters(sourceSet.getResources().getSrcDirTrees(), directoryTree.getDir(), filterOperation);
Set<String> sourceFilter = collectFilters(sourceSet.getAllJava().getSrcDirTrees(), directoryTree.getDir(), filterOperation);
return Lists.<Set<String>>newArrayList(resourcesFilter, sourceFilter);
}
}
private Set<String> collectFilters(Set<DirectoryTree> directoryTrees, File targetDir, String filterOperation) {
for (DirectoryTree directoryTree : directoryTrees) {
if (directoryTree.getDir().equals(targetDir)) {
PatternSet patterns = directoryTree.getPatterns();
return collectFilters(patterns, filterOperation);
}
}
return Collections.emptySet();
}
private Set<String> collectFilters(PatternSet patterns, String filterOperation) {
return Cast.<Set<String>>uncheckedCast(DynamicObjectUtil.asDynamicObject(patterns).getProperty(filterOperation));
}
private List<SourceSet> sortSourceSetsAsPerUsualConvention(Iterable<SourceSet> sourceSets) {
return CollectionUtils.sort(sourceSets, new Comparator<SourceSet>() {
@Override
public int compare(SourceSet left, SourceSet right) {
return toComparable(left).compareTo(toComparable(right));
}
});
}
private List<DirectoryTree> sortSourceDirsAsPerUsualConvention(Iterable<DirectoryTree> sourceDirs) {
return CollectionUtils.sort(sourceDirs, new Comparator<DirectoryTree>() {
@Override
public int compare(DirectoryTree left, DirectoryTree right) {
return toComparable(left).compareTo(toComparable(right));
}
});
}
private static Comparable toComparable(SourceSet sourceSet) {
String name = sourceSet.getName();
if (SourceSet.MAIN_SOURCE_SET_NAME.equals(name)) {
return 0;
} else if (SourceSet.TEST_SOURCE_SET_NAME.equals(name)) {
return 1;
} else {
return 2;
}
}
private static Comparable toComparable(DirectoryTree tree) {
String path = tree.getDir().getPath();
if (path.endsWith("java")) {
return 0;
} else if (path.endsWith("resources")) {
return 2;
} else {
return 1;
}
}
}
| {
"content_hash": "8285e7bc2726536cd923a28c55d99c34",
"timestamp": "",
"source": "github",
"line_count": 317,
"max_line_length": 173,
"avg_line_length": 48.201892744479494,
"alnum_prop": 0.6825916230366492,
"repo_name": "robinverduijn/gradle",
"id": "05d70ed4995d8220a2418b7d88262510536a79b2",
"size": "15895",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "subprojects/ide/src/main/java/org/gradle/plugins/ide/eclipse/model/internal/SourceFoldersCreator.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Assembly",
"bytes": "277"
},
{
"name": "Brainfuck",
"bytes": "54"
},
{
"name": "C",
"bytes": "98580"
},
{
"name": "C++",
"bytes": "1805886"
},
{
"name": "CSS",
"bytes": "188237"
},
{
"name": "CoffeeScript",
"bytes": "620"
},
{
"name": "GAP",
"bytes": "424"
},
{
"name": "Gherkin",
"bytes": "191"
},
{
"name": "Groovy",
"bytes": "25537093"
},
{
"name": "HTML",
"bytes": "77104"
},
{
"name": "Java",
"bytes": "24906063"
},
{
"name": "JavaScript",
"bytes": "209481"
},
{
"name": "Kotlin",
"bytes": "2846791"
},
{
"name": "Objective-C",
"bytes": "840"
},
{
"name": "Objective-C++",
"bytes": "441"
},
{
"name": "Perl",
"bytes": "37849"
},
{
"name": "Python",
"bytes": "57"
},
{
"name": "Ruby",
"bytes": "16"
},
{
"name": "Scala",
"bytes": "29814"
},
{
"name": "Shell",
"bytes": "7212"
},
{
"name": "Swift",
"bytes": "6972"
},
{
"name": "XSLT",
"bytes": "42845"
}
],
"symlink_target": ""
} |
<?php
class PlanScheduleController extends BaseController {
/**
* Display a listing of the resource.
* GET /planschedule
*
* @return Response
*/
public function index()
{
//
}
/**
* Show the form for creating a new resource.
* GET /planschedule/create
*
* @return Response
*/
public function create()
{
//
}
/**
* Store a newly created resource in storage.
* POST /planschedule
*
* @return Response
*/
public function store()
{
//
}
/**
* Display the specified resource.
* GET /planschedule/{id}
*
* @param int $id
* @return Response
*/
public function show($id)
{
//
}
/**
* Show the form for editing the specified resource.
* GET /planschedule/{id}/edit
*
* @param int $id
* @return Response
*/
public function edit($id)
{
$user = Auth::user();
$club = $user->Clubs()->FirstOrFail();
$schedule = SchedulePayment::where('id','=',$id)->where('club_id','=',$club->id)->first();
if(!$schedule){
return "Unauthorized";
}
$plan = Plan::find($schedule->plan_id);
$title = 'League Together - '.$club->name.' Schedule';
return View::make('app.club.plan.schedule.edit')
->with('page_title', $title)
->with('club', $club)
->with('plan', $plan)
->with('schedule',$schedule)
->withUser($user);
}
/**
* Update the specified resource in storage.
* PUT /planschedule/{id}
*
* @param int $id
* @return Response
*/
public function update($id)
{
$user =Auth::user();
$club = $user->clubs()->FirstOrFail();
$schedule = SchedulePayment::where('id','=',$id)->where('club_id','=',$club->id)->first();
if(!$schedule){
return "Unauthorized";
}
$plan = Plan::find($schedule->plan_id);
$validator= Validator::make(Input::all(), SchedulePayment::$rules);
//check if recurrences
if($validator->passes()){
//calculate amounts
$subtotal = Input::get('subtotal');
$fee = ($subtotal / getenv("SV_FEE")) - $subtotal ;
$total = $fee + $subtotal;
$schedule->date = Input::get('date');
$schedule->subtotal = number_format($subtotal, 2);
$schedule->fee = number_format($fee, 2);
$schedule->total = number_format($total, 2);
$status = $schedule->save();
$schedule->touch();
if ( $status )
{
return Redirect::action('PlanScheduleController@edit', $schedule->id )
->with( 'notice', 'Payment Schedule updated successfully');
}
return Redirect::action('PlanScheduleController@edit', $schedule->id)
->with( 'warning', $status);
}
$error = $validator->errors()->all(':message');
return Redirect::action('PlanScheduleController@edit', $schedule->id)
->withErrors($validator)
->withInput();
}
public function destroy($id)
{
$user = Auth::user();
$club = $user->Clubs()->FirstOrFail();
$schedule = SchedulePayment::where('id','=',$id)->where('club_id','=',$club->id)->first();
if(!$schedule){
return "Unauthorized";
}
$status= $schedule->delete();
if($status){
return Redirect::action('AccountingController@index');
}
return Redirect::action('PlanScheduleController@delete', $id)->withErrors($status);
}
public function delete($id)
{
$user = Auth::user();
$club = $user->Clubs()->FirstOrFail();
$schedule = SchedulePayment::where('id','=',$id)->where('club_id','=',$club->id)->first();
if(!$schedule){
return "Unauthorized";
}
$plan = Plan::find($schedule->plan_id);
$title = 'League Together - '.$club->name.' Schedule';
return View::make('app.club.plan.schedule.delete')
->with('page_title', $title)
->with('club', $club)
->with('plan', $plan)
->with('schedule',$schedule)
->withUser($user);
}
} | {
"content_hash": "89bc0555dca03ec4c95cbed154e18912",
"timestamp": "",
"source": "github",
"line_count": 170,
"max_line_length": 92,
"avg_line_length": 21.61764705882353,
"alnum_prop": 0.6084353741496599,
"repo_name": "PlusTechnologies/league-production",
"id": "d7863a6dc212152546323323677764b95be94328",
"size": "3675",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/controllers/PlanScheduleController.php",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ApacheConf",
"bytes": "356"
},
{
"name": "CSS",
"bytes": "84997"
},
{
"name": "JavaScript",
"bytes": "193"
},
{
"name": "PHP",
"bytes": "1663078"
}
],
"symlink_target": ""
} |
from .vnsgitmd import MdApi
from .vnsgittd import TdApi
from .sgit_constant import * | {
"content_hash": "45ddcffca1f6bc8bc354ea4bef266894",
"timestamp": "",
"source": "github",
"line_count": 3,
"max_line_length": 28,
"avg_line_length": 28,
"alnum_prop": 0.8095238095238095,
"repo_name": "msincenselee/vnpy",
"id": "ccec073e3ffa5e2ac7cf9d2edbf2710c47acfb04",
"size": "84",
"binary": false,
"copies": "2",
"ref": "refs/heads/vnpy2",
"path": "vnpy/api/sgit/__init__.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "751"
},
{
"name": "C",
"bytes": "2862615"
},
{
"name": "C++",
"bytes": "14985812"
},
{
"name": "Cython",
"bytes": "42495"
},
{
"name": "Python",
"bytes": "12716181"
},
{
"name": "Shell",
"bytes": "17068"
}
],
"symlink_target": ""
} |
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>pylab_examples example code: print_stdout.py — Matplotlib 1.3.1 documentation</title>
<link rel="stylesheet" href="../../_static/pythonista.css" type="text/css" />
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../../',
VERSION: '1.3.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../../_static/jquery.js"></script>
<script type="text/javascript" src="../../_static/underscore.js"></script>
<script type="text/javascript" src="../../_static/doctools.js"></script>
<link rel="search" type="application/opensearchdescription+xml"
title="Search within Matplotlib 1.3.1 documentation"
href="../../_static/opensearch.xml"/>
<link rel="top" title="Matplotlib 1.3.1 documentation" href="../../index.html" />
<link rel="shortcut icon" type="image/png" href="../../_static/py.png" />
<link rel="stylesheet" href="../_static/pythonista.css" type="text/css" />
<meta name = "viewport" content = "width=device-width,initial-scale=1.0,user-scalable=no;">
<script type="text/javascript">
var getTextForSample = function(i) {
codeBlock = document.getElementsByClassName('highlight-python')[i];
return codeBlock.innerText;
}
var copySample = function (i) {
window.location.href = '/__pythonista_copy__/' + encodeURI(getTextForSample(i));
}
var openSample = function (i) {
window.location.href = '/__pythonista_open__/' + encodeURI(getTextForSample(i));
}
//Source: http://ejohn.org/blog/partial-functions-in-javascript/
Function.prototype.partial = function() {
var fn = this,
args = Array.prototype.slice.call(arguments);
return function() {
var arg = 0;
for (var i = 0; i < args.length && arg < arguments.length; i++)
if (args[i] === undefined) args[i] = arguments[arg++];
return fn.apply(this, args);
};
};
window.onload=function() {
//Add "Copy" and "Open in Editor" buttons for code samples:
var inApp = navigator.userAgent.match(/AppleWebKit/i) != null && navigator.userAgent.match(/Safari/i) == null;
if (inApp) {
codeBlocks = document.getElementsByClassName('highlight-python');
for (var i = 0; i < codeBlocks.length; i++) {
codeBlock = codeBlocks[i];
if (codeBlock.innerText.indexOf('>>>') == 0) {
//Don't add header for interactive sessions
continue;
}
var codeHeader = document.createElement('div');
codeHeader.className = 'pythonista-code-header';
var copyButton = document.createElement('button');
copyButton.className = 'pythonista-button';
copyButton.innerText = 'Copy';
copyButton.addEventListener('click', copySample.partial(i));
codeHeader.appendChild(copyButton);
var openButton = document.createElement('button');
openButton.className = 'pythonista-button';
openButton.innerText = 'Open in Editor';
openButton.addEventListener('click', openSample.partial(i));
codeHeader.appendChild(openButton);
codeBlock.parentElement.insertBefore(codeHeader, codeBlock);
}
}
}
</script>
</head>
<body ontouchstart="">
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li><a href="http://omz-software.com/pythonista"><img src="../../_static/py.png" alt=""
style="vertical-align: middle; margin-top: -4px; margin-right: 4px;"/></a></li>
<li><a href="../../index.html">Matplotlib 1.3.1 documentation</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="body">
<div class="section" id="pylab-examples-example-code-print-stdout-py">
<span id="pylab-examples-print-stdout"></span><h1>pylab_examples example code: print_stdout.py<a class="headerlink" href="#pylab-examples-example-code-print-stdout-py" title="Permalink to this headline">¶</a></h1>
<p>[<a class="reference external" href="print_stdout.py">source code</a>]</p>
<div class="highlight-python"><div class="highlight"><pre><span class="c">#!/usr/bin/env python</span>
<span class="c"># -*- noplot -*-</span>
<span class="c"># print png to standard out</span>
<span class="c"># usage: python print_stdout.py > somefile.png</span>
<span class="kn">import</span> <span class="nn">sys</span>
<span class="kn">import</span> <span class="nn">matplotlib</span>
<span class="n">matplotlib</span><span class="o">.</span><span class="n">use</span><span class="p">(</span><span class="s">'Agg'</span><span class="p">)</span>
<span class="kn">from</span> <span class="nn">pylab</span> <span class="kn">import</span> <span class="o">*</span>
<span class="n">plot</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">])</span>
<span class="n">savefig</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">stdout</span><span class="p">)</span>
<span class="n">show</span><span class="p">()</span>
</pre></div>
</div>
<p>Keywords: python, matplotlib, pylab, example, codex (see <a class="reference internal" href="../../faq/howto_faq.html#how-to-search-examples"><em>Search examples</em></a>)</p>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
© <a href="../../copyright.html">Copyright</a> 2002 - 2012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the matplotlib development team; 2012 - 2013 The matplotlib development team.
<br />
The Python Software Foundation is a non-profit corporation.
<a href="http://www.python.org/psf/donations/">Please donate.</a>
<br />
Last updated on May 03, 2016.
<a href="../../bugs.html">Found a bug</a>?
<br />
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.2.1.
</div>
</body>
</html> | {
"content_hash": "f6958663893996882ccc1b51c0eb4f76",
"timestamp": "",
"source": "github",
"line_count": 153,
"max_line_length": 213,
"avg_line_length": 47.111111111111114,
"alnum_prop": 0.5843507214206437,
"repo_name": "leesavide/pythonista-docs",
"id": "ce2f1edf0e8293d9e479f03e0a07ff5a588e4226",
"size": "7210",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Documentation/matplotlib/examples/pylab_examples/print_stdout.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "84392"
},
{
"name": "HTML",
"bytes": "70040156"
},
{
"name": "JavaScript",
"bytes": "89777"
},
{
"name": "Python",
"bytes": "884325"
}
],
"symlink_target": ""
} |
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="MerchantOrderCancellationStrategy.cs" company="Sitecore Corporation">
// Copyright (c) Sitecore Corporation 1999-2015
// </copyright>
// <summary>
// Defines the MerchantOrderCancellationStrategy type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
// Copyright 2015 Sitecore Corporation A/S
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
// except in compliance with the License. You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the
// License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
// either express or implied. See the License for the specific language governing permissions
// and limitations under the License.
// -------------------------------------------------------------------------------------------
namespace Sitecore.Ecommerce.Merchant.OrderManagement
{
using System.Linq;
using Diagnostics;
using Ecommerce.OrderManagement;
using Ecommerce.OrderManagement.Orders;
/// <summary>
/// Defines the merchant order cancellation strategy class.
/// </summary>
public class MerchantOrderCancellationStrategy : ProcessingStrategy
{
/// <summary>
/// Gets or sets StateManager.
/// </summary>
public virtual CoreOrderStateConfiguration StateManager { get; set; }
/// <summary>
/// Gets or sets the reason substate code.
/// </summary>
/// <value>The reason substate code.</value>
public string ReasonSubstateCode { get; set; }
/// <summary>
/// Gets or sets the order security.
/// </summary>
/// <value>
/// The order security.
/// </value>
[CanBeNull]
public MerchantOrderSecurity OrderSecurity { get; set; }
/// <summary>
/// Runs the processor.
/// </summary>
/// <param name="order">The order.</param>
public override void Process(Order order)
{
Assert.ArgumentNotNull(order, "order");
Assert.IsNotNull(this.StateManager, "Unable to cancel the order. The inner state manager is not set.");
Assert.IsNotNull(this.OrderSecurity, "Unable to cancel the order. OrderSecurity cannot be null.");
Assert.IsTrue(this.OrderSecurity.CanCancel(order), "Unable to cancel the order. Cancellation denied.");
State cancelledState = this.StateManager.GetFollowingStates(order.State).SingleOrDefault(state => state.Code == OrderStateCode.Cancelled);
Assert.IsNotNull(cancelledState, "Unable to cancel the order. Cancellation not allowed for the current state.");
order.State = cancelledState;
Substate substate = order.State.Substates.SingleOrDefault(s => s.Code == this.ReasonSubstateCode);
Assert.IsNotNull(substate, "Unable to cancel the order. Cancellation reason code not found.");
substate.Active = true;
}
}
} | {
"content_hash": "cdf8da3b1458e1686e9a8637306b8a37",
"timestamp": "",
"source": "github",
"line_count": 76,
"max_line_length": 144,
"avg_line_length": 42.48684210526316,
"alnum_prop": 0.617218953236296,
"repo_name": "Sitecore/SES-7.5",
"id": "676795a7139c36163db774bf3aca0bbcd09c01cb",
"size": "3231",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "code/Core/Sitecore.Ecommerce.Merchant/OrderManagement/MerchantOrderCancellationStrategy.cs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ASP",
"bytes": "130615"
},
{
"name": "C#",
"bytes": "3762627"
},
{
"name": "CSS",
"bytes": "64845"
},
{
"name": "JavaScript",
"bytes": "27304"
},
{
"name": "XSLT",
"bytes": "119659"
}
],
"symlink_target": ""
} |
int main(int argc, char *argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([RAAppDelegate class]));
}
}
| {
"content_hash": "7e8f13eced1349e9579891f74394b72e",
"timestamp": "",
"source": "github",
"line_count": 6,
"max_line_length": 90,
"avg_line_length": 25.5,
"alnum_prop": 0.6928104575163399,
"repo_name": "benzhipeng/RATreeView",
"id": "5e7315773f2a0eb70bbea159a48059e0e8cd7007",
"size": "352",
"binary": false,
"copies": "13",
"ref": "refs/heads/master",
"path": "Demo/main.m",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Objective-C",
"bytes": "155107"
},
{
"name": "Ruby",
"bytes": "720"
}
],
"symlink_target": ""
} |
from __future__ import unicode_literals
import datetime
from django.contrib.admin import ModelAdmin, TabularInline
from django.contrib.admin.helpers import InlineAdminForm
from django.contrib.admin.tests import AdminSeleniumWebDriverTestCase
from django.contrib.auth.models import Permission, User
from django.contrib.contenttypes.models import ContentType
from django.test import RequestFactory, TestCase, override_settings
from django.urls import reverse
from .admin import InnerInline, site as admin_site
from .models import (
Author, BinaryTree, Book, Chapter, Child, ChildModel1, ChildModel2,
Fashionista, FootNote, Holder, Holder2, Holder3, Holder4, Inner, Inner2,
Inner3, Inner4Stacked, Inner4Tabular, Novel, OutfitItem, Parent,
ParentModelWithCustomPk, Person, Poll, Profile, ProfileCollection,
Question, Sighting, SomeChildModel, SomeParentModel, Teacher,
)
INLINE_CHANGELINK_HTML = 'class="inlinechangelink">Change</a>'
class TestDataMixin(object):
@classmethod
def setUpTestData(cls):
# password = "secret"
User.objects.create(
pk=100, username='super', first_name='Super', last_name='User', email='super@example.com',
password='sha1$995a3$6011485ea3834267d719b4c801409b8b1ddd0158', is_active=True, is_superuser=True,
is_staff=True, last_login=datetime.datetime(2007, 5, 30, 13, 20, 10),
date_joined=datetime.datetime(2007, 5, 30, 13, 20, 10)
)
@override_settings(PASSWORD_HASHERS=['django.contrib.auth.hashers.SHA1PasswordHasher'],
ROOT_URLCONF="admin_inlines.urls")
class TestInline(TestDataMixin, TestCase):
def setUp(self):
holder = Holder(dummy=13)
holder.save()
Inner(dummy=42, holder=holder).save()
result = self.client.login(username='super', password='secret')
self.assertEqual(result, True)
self.factory = RequestFactory()
def test_can_delete(self):
"""
can_delete should be passed to inlineformset factory.
"""
holder = Holder.objects.get(dummy=13)
response = self.client.get(
reverse('admin:admin_inlines_holder_change', args=(holder.id,))
)
inner_formset = response.context['inline_admin_formsets'][0].formset
expected = InnerInline.can_delete
actual = inner_formset.can_delete
self.assertEqual(expected, actual, 'can_delete must be equal')
def test_readonly_stacked_inline_label(self):
"""Bug #13174."""
holder = Holder.objects.create(dummy=42)
Inner.objects.create(holder=holder, dummy=42, readonly='')
response = self.client.get(
reverse('admin:admin_inlines_holder_change', args=(holder.id,))
)
self.assertContains(response, '<label>Inner readonly label:</label>')
def test_many_to_many_inlines(self):
"Autogenerated many-to-many inlines are displayed correctly (#13407)"
response = self.client.get(reverse('admin:admin_inlines_author_add'))
# The heading for the m2m inline block uses the right text
self.assertContains(response, '<h2>Author-book relationships</h2>')
# The "add another" label is correct
self.assertContains(response, 'Add another Author-book relationship')
# The '+' is dropped from the autogenerated form prefix (Author_books+)
self.assertContains(response, 'id="id_Author_books-TOTAL_FORMS"')
def test_inline_primary(self):
person = Person.objects.create(firstname='Imelda')
item = OutfitItem.objects.create(name='Shoes')
# Imelda likes shoes, but can't carry her own bags.
data = {
'shoppingweakness_set-TOTAL_FORMS': 1,
'shoppingweakness_set-INITIAL_FORMS': 0,
'shoppingweakness_set-MAX_NUM_FORMS': 0,
'_save': 'Save',
'person': person.id,
'max_weight': 0,
'shoppingweakness_set-0-item': item.id,
}
response = self.client.post(reverse('admin:admin_inlines_fashionista_add'), data)
self.assertEqual(response.status_code, 302)
self.assertEqual(len(Fashionista.objects.filter(person__firstname='Imelda')), 1)
def test_custom_form_tabular_inline_label(self):
"""
A model form with a form field specified (TitleForm.title1) should have
its label rendered in the tabular inline.
"""
response = self.client.get(reverse('admin:admin_inlines_titlecollection_add'))
self.assertContains(response, '<th class="required">Title1</th>', html=True)
def test_tabular_non_field_errors(self):
"""
Ensure that non_field_errors are displayed correctly, including the
right value for colspan. Refs #13510.
"""
data = {
'title_set-TOTAL_FORMS': 1,
'title_set-INITIAL_FORMS': 0,
'title_set-MAX_NUM_FORMS': 0,
'_save': 'Save',
'title_set-0-title1': 'a title',
'title_set-0-title2': 'a different title',
}
response = self.client.post(reverse('admin:admin_inlines_titlecollection_add'), data)
# Here colspan is "4": two fields (title1 and title2), one hidden field and the delete checkbox.
self.assertContains(
response,
'<tr><td colspan="4"><ul class="errorlist nonfield">'
'<li>The two titles must be the same</li></ul></td></tr>'
)
def test_no_parent_callable_lookup(self):
"""Admin inline `readonly_field` shouldn't invoke parent ModelAdmin callable"""
# Identically named callable isn't present in the parent ModelAdmin,
# rendering of the add view shouldn't explode
response = self.client.get(reverse('admin:admin_inlines_novel_add'))
self.assertEqual(response.status_code, 200)
# View should have the child inlines section
self.assertContains(
response,
'<div class="js-inline-admin-formset inline-group" id="chapter_set-group"'
)
def test_callable_lookup(self):
"""Admin inline should invoke local callable when its name is listed in readonly_fields"""
response = self.client.get(reverse('admin:admin_inlines_poll_add'))
self.assertEqual(response.status_code, 200)
# Add parent object view should have the child inlines section
self.assertContains(
response,
'<div class="js-inline-admin-formset inline-group" id="question_set-group"'
)
# The right callable should be used for the inline readonly_fields
# column cells
self.assertContains(response, '<p>Callable in QuestionInline</p>')
def test_help_text(self):
"""
Ensure that the inlines' model field help texts are displayed when
using both the stacked and tabular layouts.
Ref #8190.
"""
response = self.client.get(reverse('admin:admin_inlines_holder4_add'))
self.assertContains(response, '<p class="help">Awesome stacked help text is awesome.</p>', 4)
self.assertContains(
response,
'<img src="/static/admin/img/icon-unknown.svg" '
'class="help help-tooltip" width="10" height="10" '
'alt="(Awesome tabular help text is awesome.)" '
'title="Awesome tabular help text is awesome." />',
1
)
# ReadOnly fields
response = self.client.get(reverse('admin:admin_inlines_capofamiglia_add'))
self.assertContains(
response,
'<img src="/static/admin/img/icon-unknown.svg" '
'class="help help-tooltip" width="10" height="10" '
'alt="(Help text for ReadOnlyInline)" '
'title="Help text for ReadOnlyInline" />',
1
)
def test_inline_hidden_field_no_column(self):
"""#18263 -- Make sure hidden fields don't get a column in tabular inlines"""
parent = SomeParentModel.objects.create(name='a')
SomeChildModel.objects.create(name='b', position='0', parent=parent)
SomeChildModel.objects.create(name='c', position='1', parent=parent)
response = self.client.get(reverse('admin:admin_inlines_someparentmodel_change', args=(parent.pk,)))
self.assertNotContains(response, '<td class="field-position">')
self.assertContains(response, (
'<input id="id_somechildmodel_set-1-position" '
'name="somechildmodel_set-1-position" type="hidden" value="1" />'))
def test_non_related_name_inline(self):
"""
Ensure that multiple inlines with related_name='+' have correct form
prefixes. Bug #16838.
"""
response = self.client.get(reverse('admin:admin_inlines_capofamiglia_add'))
self.assertContains(response,
'<input type="hidden" name="-1-0-id" id="id_-1-0-id" />', html=True)
self.assertContains(response,
'<input type="hidden" name="-1-0-capo_famiglia" id="id_-1-0-capo_famiglia" />', html=True)
self.assertContains(response,
'<input id="id_-1-0-name" type="text" class="vTextField" '
'name="-1-0-name" maxlength="100" />', html=True)
self.assertContains(response,
'<input type="hidden" name="-2-0-id" id="id_-2-0-id" />', html=True)
self.assertContains(response,
'<input type="hidden" name="-2-0-capo_famiglia" id="id_-2-0-capo_famiglia" />', html=True)
self.assertContains(response,
'<input id="id_-2-0-name" type="text" class="vTextField" '
'name="-2-0-name" maxlength="100" />', html=True)
@override_settings(USE_L10N=True, USE_THOUSAND_SEPARATOR=True)
def test_localize_pk_shortcut(self):
"""
Ensure that the "View on Site" link is correct for locales that use
thousand separators
"""
holder = Holder.objects.create(pk=123456789, dummy=42)
inner = Inner.objects.create(pk=987654321, holder=holder, dummy=42, readonly='')
response = self.client.get(reverse('admin:admin_inlines_holder_change', args=(holder.id,)))
inner_shortcut = 'r/%s/%s/' % (ContentType.objects.get_for_model(inner).pk, inner.pk)
self.assertContains(response, inner_shortcut)
def test_custom_pk_shortcut(self):
"""
Ensure that the "View on Site" link is correct for models with a
custom primary key field. Bug #18433.
"""
parent = ParentModelWithCustomPk.objects.create(my_own_pk="foo", name="Foo")
child1 = ChildModel1.objects.create(my_own_pk="bar", name="Bar", parent=parent)
child2 = ChildModel2.objects.create(my_own_pk="baz", name="Baz", parent=parent)
response = self.client.get(reverse('admin:admin_inlines_parentmodelwithcustompk_change', args=('foo',)))
child1_shortcut = 'r/%s/%s/' % (ContentType.objects.get_for_model(child1).pk, child1.pk)
child2_shortcut = 'r/%s/%s/' % (ContentType.objects.get_for_model(child2).pk, child2.pk)
self.assertContains(response, child1_shortcut)
self.assertContains(response, child2_shortcut)
def test_create_inlines_on_inherited_model(self):
"""
Ensure that an object can be created with inlines when it inherits
another class. Bug #19524.
"""
data = {
'name': 'Martian',
'sighting_set-TOTAL_FORMS': 1,
'sighting_set-INITIAL_FORMS': 0,
'sighting_set-MAX_NUM_FORMS': 0,
'sighting_set-0-place': 'Zone 51',
'_save': 'Save',
}
response = self.client.post(reverse('admin:admin_inlines_extraterrestrial_add'), data)
self.assertEqual(response.status_code, 302)
self.assertEqual(Sighting.objects.filter(et__name='Martian').count(), 1)
def test_custom_get_extra_form(self):
bt_head = BinaryTree.objects.create(name="Tree Head")
BinaryTree.objects.create(name="First Child", parent=bt_head)
# The maximum number of forms should respect 'get_max_num' on the
# ModelAdmin
max_forms_input = (
'<input id="id_binarytree_set-MAX_NUM_FORMS" '
'name="binarytree_set-MAX_NUM_FORMS" type="hidden" value="%d" />'
)
# The total number of forms will remain the same in either case
total_forms_hidden = (
'<input id="id_binarytree_set-TOTAL_FORMS" '
'name="binarytree_set-TOTAL_FORMS" type="hidden" value="2" />'
)
response = self.client.get(reverse('admin:admin_inlines_binarytree_add'))
self.assertContains(response, max_forms_input % 3)
self.assertContains(response, total_forms_hidden)
response = self.client.get(reverse('admin:admin_inlines_binarytree_change', args=(bt_head.id,)))
self.assertContains(response, max_forms_input % 2)
self.assertContains(response, total_forms_hidden)
def test_min_num(self):
"""
Ensure that min_num and extra determine number of forms.
"""
class MinNumInline(TabularInline):
model = BinaryTree
min_num = 2
extra = 3
modeladmin = ModelAdmin(BinaryTree, admin_site)
modeladmin.inlines = [MinNumInline]
min_forms = (
'<input id="id_binarytree_set-MIN_NUM_FORMS" '
'name="binarytree_set-MIN_NUM_FORMS" type="hidden" value="2" />'
)
total_forms = (
'<input id="id_binarytree_set-TOTAL_FORMS" '
'name="binarytree_set-TOTAL_FORMS" type="hidden" value="5" />'
)
request = self.factory.get(reverse('admin:admin_inlines_binarytree_add'))
request.user = User(username='super', is_superuser=True)
response = modeladmin.changeform_view(request)
self.assertContains(response, min_forms)
self.assertContains(response, total_forms)
def test_custom_min_num(self):
"""
Ensure that get_min_num is called and used correctly.
"""
bt_head = BinaryTree.objects.create(name="Tree Head")
BinaryTree.objects.create(name="First Child", parent=bt_head)
class MinNumInline(TabularInline):
model = BinaryTree
extra = 3
def get_min_num(self, request, obj=None, **kwargs):
if obj:
return 5
return 2
modeladmin = ModelAdmin(BinaryTree, admin_site)
modeladmin.inlines = [MinNumInline]
min_forms = (
'<input id="id_binarytree_set-MIN_NUM_FORMS" '
'name="binarytree_set-MIN_NUM_FORMS" type="hidden" value="%d" />'
)
total_forms = (
'<input id="id_binarytree_set-TOTAL_FORMS" '
'name="binarytree_set-TOTAL_FORMS" type="hidden" value="%d" />'
)
request = self.factory.get(reverse('admin:admin_inlines_binarytree_add'))
request.user = User(username='super', is_superuser=True)
response = modeladmin.changeform_view(request)
self.assertContains(response, min_forms % 2)
self.assertContains(response, total_forms % 5)
request = self.factory.get(reverse('admin:admin_inlines_binarytree_change', args=(bt_head.id,)))
request.user = User(username='super', is_superuser=True)
response = modeladmin.changeform_view(request, object_id=str(bt_head.id))
self.assertContains(response, min_forms % 5)
self.assertContains(response, total_forms % 8)
def test_inline_nonauto_noneditable_pk(self):
response = self.client.get(reverse('admin:admin_inlines_author_add'))
self.assertContains(
response,
'<input id="id_nonautopkbook_set-0-rand_pk" '
'name="nonautopkbook_set-0-rand_pk" type="hidden" />',
html=True
)
self.assertContains(
response,
'<input id="id_nonautopkbook_set-2-0-rand_pk" '
'name="nonautopkbook_set-2-0-rand_pk" type="hidden" />',
html=True
)
def test_inline_editable_pk(self):
response = self.client.get(reverse('admin:admin_inlines_author_add'))
self.assertContains(
response,
'<input class="vIntegerField" id="id_editablepkbook_set-0-manual_pk" '
'name="editablepkbook_set-0-manual_pk" type="text" />',
html=True, count=1
)
self.assertContains(
response,
'<input class="vIntegerField" id="id_editablepkbook_set-2-0-manual_pk" '
'name="editablepkbook_set-2-0-manual_pk" type="text" />',
html=True, count=1
)
def test_stacked_inline_edit_form_contains_has_original_class(self):
holder = Holder.objects.create(dummy=1)
holder.inner_set.create(dummy=1)
response = self.client.get(reverse('admin:admin_inlines_holder_change', args=(holder.pk,)))
self.assertContains(
response,
'<div class="inline-related has_original" id="inner_set-0">',
count=1
)
self.assertContains(
response,
'<div class="inline-related" id="inner_set-1">',
count=1
)
def test_inlines_show_change_link_registered(self):
"Inlines `show_change_link` for registered models when enabled."
holder = Holder4.objects.create(dummy=1)
item1 = Inner4Stacked.objects.create(dummy=1, holder=holder)
item2 = Inner4Tabular.objects.create(dummy=1, holder=holder)
items = (
('inner4stacked', item1.pk),
('inner4tabular', item2.pk),
)
response = self.client.get(reverse('admin:admin_inlines_holder4_change', args=(holder.pk,)))
self.assertTrue(response.context['inline_admin_formset'].opts.has_registered_model)
for model, pk in items:
url = reverse('admin:admin_inlines_%s_change' % model, args=(pk,))
self.assertContains(response, '<a href="%s" %s' % (url, INLINE_CHANGELINK_HTML))
def test_inlines_show_change_link_unregistered(self):
"Inlines `show_change_link` disabled for unregistered models."
parent = ParentModelWithCustomPk.objects.create(my_own_pk="foo", name="Foo")
ChildModel1.objects.create(my_own_pk="bar", name="Bar", parent=parent)
ChildModel2.objects.create(my_own_pk="baz", name="Baz", parent=parent)
response = self.client.get(reverse('admin:admin_inlines_parentmodelwithcustompk_change', args=('foo',)))
self.assertFalse(response.context['inline_admin_formset'].opts.has_registered_model)
self.assertNotContains(response, INLINE_CHANGELINK_HTML)
def test_tabular_inline_show_change_link_false_registered(self):
"Inlines `show_change_link` disabled by default."
poll = Poll.objects.create(name="New poll")
Question.objects.create(poll=poll)
response = self.client.get(reverse('admin:admin_inlines_poll_change', args=(poll.pk,)))
self.assertTrue(response.context['inline_admin_formset'].opts.has_registered_model)
self.assertNotContains(response, INLINE_CHANGELINK_HTML)
@override_settings(PASSWORD_HASHERS=['django.contrib.auth.hashers.SHA1PasswordHasher'],
ROOT_URLCONF="admin_inlines.urls")
class TestInlineMedia(TestDataMixin, TestCase):
def setUp(self):
result = self.client.login(username='super', password='secret')
self.assertEqual(result, True)
def test_inline_media_only_base(self):
holder = Holder(dummy=13)
holder.save()
Inner(dummy=42, holder=holder).save()
change_url = reverse('admin:admin_inlines_holder_change', args=(holder.id,))
response = self.client.get(change_url)
self.assertContains(response, 'my_awesome_admin_scripts.js')
def test_inline_media_only_inline(self):
holder = Holder3(dummy=13)
holder.save()
Inner3(dummy=42, holder=holder).save()
change_url = reverse('admin:admin_inlines_holder3_change', args=(holder.id,))
response = self.client.get(change_url)
self.assertContains(response, 'my_awesome_inline_scripts.js')
def test_all_inline_media(self):
holder = Holder2(dummy=13)
holder.save()
Inner2(dummy=42, holder=holder).save()
change_url = reverse('admin:admin_inlines_holder2_change', args=(holder.id,))
response = self.client.get(change_url)
self.assertContains(response, 'my_awesome_admin_scripts.js')
self.assertContains(response, 'my_awesome_inline_scripts.js')
@override_settings(ROOT_URLCONF="admin_inlines.urls")
class TestInlineAdminForm(TestCase):
def test_immutable_content_type(self):
"""Regression for #9362
The problem depends only on InlineAdminForm and its "original"
argument, so we can safely set the other arguments to None/{}. We just
need to check that the content_type argument of Child isn't altered by
the internals of the inline form."""
sally = Teacher.objects.create(name='Sally')
john = Parent.objects.create(name='John')
joe = Child.objects.create(name='Joe', teacher=sally, parent=john)
iaf = InlineAdminForm(None, None, {}, {}, joe)
parent_ct = ContentType.objects.get_for_model(Parent)
self.assertEqual(iaf.original.content_type, parent_ct)
@override_settings(PASSWORD_HASHERS=['django.contrib.auth.hashers.SHA1PasswordHasher'],
ROOT_URLCONF="admin_inlines.urls")
class TestInlineProtectedOnDelete(TestDataMixin, TestCase):
def setUp(self):
result = self.client.login(username='super', password='secret')
self.assertEqual(result, True)
def test_deleting_inline_with_protected_delete_does_not_validate(self):
lotr = Novel.objects.create(name='Lord of the rings')
chapter = Chapter.objects.create(novel=lotr, name='Many Meetings')
foot_note = FootNote.objects.create(chapter=chapter, note='yadda yadda')
change_url = reverse('admin:admin_inlines_novel_change', args=(lotr.id,))
response = self.client.get(change_url)
data = {
'name': lotr.name,
'chapter_set-TOTAL_FORMS': 1,
'chapter_set-INITIAL_FORMS': 1,
'chapter_set-MAX_NUM_FORMS': 1000,
'_save': 'Save',
'chapter_set-0-id': chapter.id,
'chapter_set-0-name': chapter.name,
'chapter_set-0-novel': lotr.id,
'chapter_set-0-DELETE': 'on'
}
response = self.client.post(change_url, data)
self.assertContains(response, "Deleting chapter %s would require deleting "
"the following protected related objects: foot note %s"
% (chapter, foot_note))
@override_settings(ROOT_URLCONF="admin_inlines.urls")
class TestInlinePermissions(TestCase):
"""
Make sure the admin respects permissions for objects that are edited
inline. Refs #8060.
"""
def setUp(self):
self.user = User(username='admin')
self.user.is_staff = True
self.user.is_active = True
self.user.set_password('secret')
self.user.save()
self.author_ct = ContentType.objects.get_for_model(Author)
self.holder_ct = ContentType.objects.get_for_model(Holder2)
self.book_ct = ContentType.objects.get_for_model(Book)
self.inner_ct = ContentType.objects.get_for_model(Inner2)
# User always has permissions to add and change Authors, and Holders,
# the main (parent) models of the inlines. Permissions on the inlines
# vary per test.
permission = Permission.objects.get(codename='add_author', content_type=self.author_ct)
self.user.user_permissions.add(permission)
permission = Permission.objects.get(codename='change_author', content_type=self.author_ct)
self.user.user_permissions.add(permission)
permission = Permission.objects.get(codename='add_holder2', content_type=self.holder_ct)
self.user.user_permissions.add(permission)
permission = Permission.objects.get(codename='change_holder2', content_type=self.holder_ct)
self.user.user_permissions.add(permission)
author = Author.objects.create(pk=1, name='The Author')
book = author.books.create(name='The inline Book')
self.author_change_url = reverse('admin:admin_inlines_author_change', args=(author.id,))
# Get the ID of the automatically created intermediate model for the Author-Book m2m
author_book_auto_m2m_intermediate = Author.books.through.objects.get(author=author, book=book)
self.author_book_auto_m2m_intermediate_id = author_book_auto_m2m_intermediate.pk
holder = Holder2.objects.create(dummy=13)
inner2 = Inner2.objects.create(dummy=42, holder=holder)
self.holder_change_url = reverse('admin:admin_inlines_holder2_change', args=(holder.id,))
self.inner2_id = inner2.id
self.assertEqual(
self.client.login(username='admin', password='secret'),
True)
def test_inline_add_m2m_noperm(self):
response = self.client.get(reverse('admin:admin_inlines_author_add'))
# No change permission on books, so no inline
self.assertNotContains(response, '<h2>Author-book relationships</h2>')
self.assertNotContains(response, 'Add another Author-Book Relationship')
self.assertNotContains(response, 'id="id_Author_books-TOTAL_FORMS"')
def test_inline_add_fk_noperm(self):
response = self.client.get(reverse('admin:admin_inlines_holder2_add'))
# No permissions on Inner2s, so no inline
self.assertNotContains(response, '<h2>Inner2s</h2>')
self.assertNotContains(response, 'Add another Inner2')
self.assertNotContains(response, 'id="id_inner2_set-TOTAL_FORMS"')
def test_inline_change_m2m_noperm(self):
response = self.client.get(self.author_change_url)
# No change permission on books, so no inline
self.assertNotContains(response, '<h2>Author-book relationships</h2>')
self.assertNotContains(response, 'Add another Author-Book Relationship')
self.assertNotContains(response, 'id="id_Author_books-TOTAL_FORMS"')
def test_inline_change_fk_noperm(self):
response = self.client.get(self.holder_change_url)
# No permissions on Inner2s, so no inline
self.assertNotContains(response, '<h2>Inner2s</h2>')
self.assertNotContains(response, 'Add another Inner2')
self.assertNotContains(response, 'id="id_inner2_set-TOTAL_FORMS"')
def test_inline_add_m2m_add_perm(self):
permission = Permission.objects.get(codename='add_book', content_type=self.book_ct)
self.user.user_permissions.add(permission)
response = self.client.get(reverse('admin:admin_inlines_author_add'))
# No change permission on Books, so no inline
self.assertNotContains(response, '<h2>Author-book relationships</h2>')
self.assertNotContains(response, 'Add another Author-Book Relationship')
self.assertNotContains(response, 'id="id_Author_books-TOTAL_FORMS"')
def test_inline_add_fk_add_perm(self):
permission = Permission.objects.get(codename='add_inner2', content_type=self.inner_ct)
self.user.user_permissions.add(permission)
response = self.client.get(reverse('admin:admin_inlines_holder2_add'))
# Add permission on inner2s, so we get the inline
self.assertContains(response, '<h2>Inner2s</h2>')
self.assertContains(response, 'Add another Inner2')
self.assertContains(response, '<input type="hidden" id="id_inner2_set-TOTAL_FORMS" '
'value="3" name="inner2_set-TOTAL_FORMS" />', html=True)
def test_inline_change_m2m_add_perm(self):
permission = Permission.objects.get(codename='add_book', content_type=self.book_ct)
self.user.user_permissions.add(permission)
response = self.client.get(self.author_change_url)
# No change permission on books, so no inline
self.assertNotContains(response, '<h2>Author-book relationships</h2>')
self.assertNotContains(response, 'Add another Author-Book Relationship')
self.assertNotContains(response, 'id="id_Author_books-TOTAL_FORMS"')
self.assertNotContains(response, 'id="id_Author_books-0-DELETE"')
def test_inline_change_m2m_change_perm(self):
permission = Permission.objects.get(codename='change_book', content_type=self.book_ct)
self.user.user_permissions.add(permission)
response = self.client.get(self.author_change_url)
# We have change perm on books, so we can add/change/delete inlines
self.assertContains(response, '<h2>Author-book relationships</h2>')
self.assertContains(response, 'Add another Author-book relationship')
self.assertContains(response, '<input type="hidden" id="id_Author_books-TOTAL_FORMS" '
'value="4" name="Author_books-TOTAL_FORMS" />', html=True)
self.assertContains(
response,
'<input type="hidden" id="id_Author_books-0-id" value="%i" '
'name="Author_books-0-id" />' % self.author_book_auto_m2m_intermediate_id,
html=True
)
self.assertContains(response, 'id="id_Author_books-0-DELETE"')
def test_inline_change_fk_add_perm(self):
permission = Permission.objects.get(codename='add_inner2', content_type=self.inner_ct)
self.user.user_permissions.add(permission)
response = self.client.get(self.holder_change_url)
# Add permission on inner2s, so we can add but not modify existing
self.assertContains(response, '<h2>Inner2s</h2>')
self.assertContains(response, 'Add another Inner2')
# 3 extra forms only, not the existing instance form
self.assertContains(
response,
'<input type="hidden" id="id_inner2_set-TOTAL_FORMS" value="3" '
'name="inner2_set-TOTAL_FORMS" />',
html=True
)
self.assertNotContains(response, '<input type="hidden" id="id_inner2_set-0-id" '
'value="%i" name="inner2_set-0-id" />' % self.inner2_id, html=True)
def test_inline_change_fk_change_perm(self):
permission = Permission.objects.get(codename='change_inner2', content_type=self.inner_ct)
self.user.user_permissions.add(permission)
response = self.client.get(self.holder_change_url)
# Change permission on inner2s, so we can change existing but not add new
self.assertContains(response, '<h2>Inner2s</h2>')
# Just the one form for existing instances
self.assertContains(response, '<input type="hidden" id="id_inner2_set-TOTAL_FORMS" '
'value="1" name="inner2_set-TOTAL_FORMS" />', html=True)
self.assertContains(response, '<input type="hidden" id="id_inner2_set-0-id" '
'value="%i" name="inner2_set-0-id" />' % self.inner2_id, html=True)
# max-num 0 means we can't add new ones
self.assertContains(response, '<input type="hidden" id="id_inner2_set-MAX_NUM_FORMS" '
'value="0" name="inner2_set-MAX_NUM_FORMS" />', html=True)
def test_inline_change_fk_add_change_perm(self):
permission = Permission.objects.get(codename='add_inner2', content_type=self.inner_ct)
self.user.user_permissions.add(permission)
permission = Permission.objects.get(codename='change_inner2', content_type=self.inner_ct)
self.user.user_permissions.add(permission)
response = self.client.get(self.holder_change_url)
# Add/change perm, so we can add new and change existing
self.assertContains(response, '<h2>Inner2s</h2>')
# One form for existing instance and three extra for new
self.assertContains(response, '<input type="hidden" id="id_inner2_set-TOTAL_FORMS" '
'value="4" name="inner2_set-TOTAL_FORMS" />', html=True)
self.assertContains(response, '<input type="hidden" id="id_inner2_set-0-id" '
'value="%i" name="inner2_set-0-id" />' % self.inner2_id, html=True)
def test_inline_change_fk_change_del_perm(self):
permission = Permission.objects.get(codename='change_inner2', content_type=self.inner_ct)
self.user.user_permissions.add(permission)
permission = Permission.objects.get(codename='delete_inner2', content_type=self.inner_ct)
self.user.user_permissions.add(permission)
response = self.client.get(self.holder_change_url)
# Change/delete perm on inner2s, so we can change/delete existing
self.assertContains(response, '<h2>Inner2s</h2>')
# One form for existing instance only, no new
self.assertContains(response, '<input type="hidden" id="id_inner2_set-TOTAL_FORMS" '
'value="1" name="inner2_set-TOTAL_FORMS" />', html=True)
self.assertContains(response, '<input type="hidden" id="id_inner2_set-0-id" '
'value="%i" name="inner2_set-0-id" />' % self.inner2_id, html=True)
self.assertContains(response, 'id="id_inner2_set-0-DELETE"')
def test_inline_change_fk_all_perms(self):
permission = Permission.objects.get(codename='add_inner2', content_type=self.inner_ct)
self.user.user_permissions.add(permission)
permission = Permission.objects.get(codename='change_inner2', content_type=self.inner_ct)
self.user.user_permissions.add(permission)
permission = Permission.objects.get(codename='delete_inner2', content_type=self.inner_ct)
self.user.user_permissions.add(permission)
response = self.client.get(self.holder_change_url)
# All perms on inner2s, so we can add/change/delete
self.assertContains(response, '<h2>Inner2s</h2>')
# One form for existing instance only, three for new
self.assertContains(response, '<input type="hidden" id="id_inner2_set-TOTAL_FORMS" '
'value="4" name="inner2_set-TOTAL_FORMS" />', html=True)
self.assertContains(response, '<input type="hidden" id="id_inner2_set-0-id" '
'value="%i" name="inner2_set-0-id" />' % self.inner2_id, html=True)
self.assertContains(response, 'id="id_inner2_set-0-DELETE"')
@override_settings(PASSWORD_HASHERS=['django.contrib.auth.hashers.SHA1PasswordHasher'],
ROOT_URLCONF="admin_inlines.urls")
class SeleniumFirefoxTests(AdminSeleniumWebDriverTestCase):
available_apps = ['admin_inlines'] + AdminSeleniumWebDriverTestCase.available_apps
webdriver_class = 'selenium.webdriver.firefox.webdriver.WebDriver'
def setUp(self):
# password = "secret"
User.objects.create(
pk=100, username='super', first_name='Super', last_name='User', email='super@example.com',
password='sha1$995a3$6011485ea3834267d719b4c801409b8b1ddd0158', is_active=True, is_superuser=True,
is_staff=True, last_login=datetime.datetime(2007, 5, 30, 13, 20, 10),
date_joined=datetime.datetime(2007, 5, 30, 13, 20, 10)
)
def test_add_stackeds(self):
"""
Ensure that the "Add another XXX" link correctly adds items to the
stacked formset.
"""
self.admin_login(username='super', password='secret')
self.selenium.get('%s%s' % (self.live_server_url,
reverse('admin:admin_inlines_holder4_add')))
inline_id = '#inner4stacked_set-group'
rows_length = lambda: len(self.selenium.find_elements_by_css_selector(
'%s .dynamic-inner4stacked_set' % inline_id))
self.assertEqual(rows_length(), 3)
add_button = self.selenium.find_element_by_link_text(
'Add another Inner4 stacked')
add_button.click()
self.assertEqual(rows_length(), 4)
def test_delete_stackeds(self):
self.admin_login(username='super', password='secret')
self.selenium.get('%s%s' % (self.live_server_url,
reverse('admin:admin_inlines_holder4_add')))
inline_id = '#inner4stacked_set-group'
rows_length = lambda: len(self.selenium.find_elements_by_css_selector(
'%s .dynamic-inner4stacked_set' % inline_id))
self.assertEqual(rows_length(), 3)
add_button = self.selenium.find_element_by_link_text(
'Add another Inner4 stacked')
add_button.click()
add_button.click()
self.assertEqual(rows_length(), 5, msg="sanity check")
for delete_link in self.selenium.find_elements_by_css_selector(
'%s .inline-deletelink' % inline_id):
delete_link.click()
self.assertEqual(rows_length(), 3)
def test_add_inlines(self):
"""
Ensure that the "Add another XXX" link correctly adds items to the
inline form.
"""
self.admin_login(username='super', password='secret')
self.selenium.get('%s%s' % (self.live_server_url,
reverse('admin:admin_inlines_profilecollection_add')))
# Check that there's only one inline to start with and that it has the
# correct ID.
self.assertEqual(len(self.selenium.find_elements_by_css_selector(
'.dynamic-profile_set')), 1)
self.assertEqual(self.selenium.find_elements_by_css_selector(
'.dynamic-profile_set')[0].get_attribute('id'),
'profile_set-0')
self.assertEqual(len(self.selenium.find_elements_by_css_selector(
'.dynamic-profile_set#profile_set-0 input[name=profile_set-0-first_name]')), 1)
self.assertEqual(len(self.selenium.find_elements_by_css_selector(
'.dynamic-profile_set#profile_set-0 input[name=profile_set-0-last_name]')), 1)
# Add an inline
self.selenium.find_element_by_link_text('Add another Profile').click()
# Check that the inline has been added, that it has the right id, and
# that it contains the right fields.
self.assertEqual(len(self.selenium.find_elements_by_css_selector(
'.dynamic-profile_set')), 2)
self.assertEqual(self.selenium.find_elements_by_css_selector(
'.dynamic-profile_set')[1].get_attribute('id'), 'profile_set-1')
self.assertEqual(len(self.selenium.find_elements_by_css_selector(
'.dynamic-profile_set#profile_set-1 input[name=profile_set-1-first_name]')), 1)
self.assertEqual(len(self.selenium.find_elements_by_css_selector(
'.dynamic-profile_set#profile_set-1 input[name=profile_set-1-last_name]')), 1)
# Let's add another one to be sure
self.selenium.find_element_by_link_text('Add another Profile').click()
self.assertEqual(len(self.selenium.find_elements_by_css_selector(
'.dynamic-profile_set')), 3)
self.assertEqual(self.selenium.find_elements_by_css_selector(
'.dynamic-profile_set')[2].get_attribute('id'), 'profile_set-2')
self.assertEqual(len(self.selenium.find_elements_by_css_selector(
'.dynamic-profile_set#profile_set-2 input[name=profile_set-2-first_name]')), 1)
self.assertEqual(len(self.selenium.find_elements_by_css_selector(
'.dynamic-profile_set#profile_set-2 input[name=profile_set-2-last_name]')), 1)
# Enter some data and click 'Save'
self.selenium.find_element_by_name('profile_set-0-first_name').send_keys('0 first name 1')
self.selenium.find_element_by_name('profile_set-0-last_name').send_keys('0 last name 2')
self.selenium.find_element_by_name('profile_set-1-first_name').send_keys('1 first name 1')
self.selenium.find_element_by_name('profile_set-1-last_name').send_keys('1 last name 2')
self.selenium.find_element_by_name('profile_set-2-first_name').send_keys('2 first name 1')
self.selenium.find_element_by_name('profile_set-2-last_name').send_keys('2 last name 2')
self.selenium.find_element_by_xpath('//input[@value="Save"]').click()
self.wait_page_loaded()
# Check that the objects have been created in the database
self.assertEqual(ProfileCollection.objects.all().count(), 1)
self.assertEqual(Profile.objects.all().count(), 3)
def test_delete_inlines(self):
self.admin_login(username='super', password='secret')
self.selenium.get('%s%s' % (self.live_server_url,
reverse('admin:admin_inlines_profilecollection_add')))
# Add a few inlines
self.selenium.find_element_by_link_text('Add another Profile').click()
self.selenium.find_element_by_link_text('Add another Profile').click()
self.selenium.find_element_by_link_text('Add another Profile').click()
self.selenium.find_element_by_link_text('Add another Profile').click()
self.assertEqual(len(self.selenium.find_elements_by_css_selector(
'#profile_set-group table tr.dynamic-profile_set')), 5)
self.assertEqual(len(self.selenium.find_elements_by_css_selector(
'form#profilecollection_form tr.dynamic-profile_set#profile_set-0')), 1)
self.assertEqual(len(self.selenium.find_elements_by_css_selector(
'form#profilecollection_form tr.dynamic-profile_set#profile_set-1')), 1)
self.assertEqual(len(self.selenium.find_elements_by_css_selector(
'form#profilecollection_form tr.dynamic-profile_set#profile_set-2')), 1)
self.assertEqual(len(self.selenium.find_elements_by_css_selector(
'form#profilecollection_form tr.dynamic-profile_set#profile_set-3')), 1)
self.assertEqual(len(self.selenium.find_elements_by_css_selector(
'form#profilecollection_form tr.dynamic-profile_set#profile_set-4')), 1)
# Click on a few delete buttons
self.selenium.find_element_by_css_selector(
'form#profilecollection_form tr.dynamic-profile_set#profile_set-1 td.delete a').click()
self.selenium.find_element_by_css_selector(
'form#profilecollection_form tr.dynamic-profile_set#profile_set-2 td.delete a').click()
# Verify that they're gone and that the IDs have been re-sequenced
self.assertEqual(len(self.selenium.find_elements_by_css_selector(
'#profile_set-group table tr.dynamic-profile_set')), 3)
self.assertEqual(len(self.selenium.find_elements_by_css_selector(
'form#profilecollection_form tr.dynamic-profile_set#profile_set-0')), 1)
self.assertEqual(len(self.selenium.find_elements_by_css_selector(
'form#profilecollection_form tr.dynamic-profile_set#profile_set-1')), 1)
self.assertEqual(len(self.selenium.find_elements_by_css_selector(
'form#profilecollection_form tr.dynamic-profile_set#profile_set-2')), 1)
def test_alternating_rows(self):
self.admin_login(username='super', password='secret')
self.selenium.get('%s%s' % (self.live_server_url,
reverse('admin:admin_inlines_profilecollection_add')))
# Add a few inlines
self.selenium.find_element_by_link_text('Add another Profile').click()
self.selenium.find_element_by_link_text('Add another Profile').click()
row_selector = 'form#profilecollection_form tr.dynamic-profile_set'
self.assertEqual(len(self.selenium.find_elements_by_css_selector(
"%s.row1" % row_selector)), 2, msg="Expect two row1 styled rows")
self.assertEqual(len(self.selenium.find_elements_by_css_selector(
"%s.row2" % row_selector)), 1, msg="Expect one row2 styled row")
def test_collapsed_inlines(self):
# Collapsed inlines have SHOW/HIDE links.
self.admin_login(username='super', password='secret')
self.selenium.get(self.live_server_url + reverse('admin:admin_inlines_author_add'))
# One field is in a stacked inline, other in a tabular one.
test_fields = ['#id_nonautopkbook_set-0-title', '#id_nonautopkbook_set-2-0-title']
show_links = self.selenium.find_elements_by_link_text('SHOW')
self.assertEqual(len(show_links), 2)
for show_index, field_name in enumerate(test_fields, 0):
self.wait_until_invisible(field_name)
show_links[show_index].click()
self.wait_until_visible(field_name)
hide_links = self.selenium.find_elements_by_link_text('HIDE')
self.assertEqual(len(hide_links), 2)
for hide_index, field_name in enumerate(test_fields, 0):
self.wait_until_visible(field_name)
hide_links[hide_index].click()
self.wait_until_invisible(field_name)
class SeleniumChromeTests(SeleniumFirefoxTests):
webdriver_class = 'selenium.webdriver.chrome.webdriver.WebDriver'
class SeleniumIETests(SeleniumFirefoxTests):
webdriver_class = 'selenium.webdriver.ie.webdriver.WebDriver'
| {
"content_hash": "f43aead75026a0822f9ea2a868c28a94",
"timestamp": "",
"source": "github",
"line_count": 902,
"max_line_length": 112,
"avg_line_length": 49.90022172949002,
"alnum_prop": 0.6464341257498334,
"repo_name": "benjaminjkraft/django",
"id": "f59f87e6deef62d3905713a58fcc4fecf5f5138c",
"size": "45010",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "tests/admin_inlines/tests.py",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "CSS",
"bytes": "52334"
},
{
"name": "HTML",
"bytes": "170510"
},
{
"name": "JavaScript",
"bytes": "256027"
},
{
"name": "Makefile",
"bytes": "125"
},
{
"name": "Python",
"bytes": "11459633"
},
{
"name": "Shell",
"bytes": "809"
},
{
"name": "Smarty",
"bytes": "130"
}
],
"symlink_target": ""
} |
import Model from 'ember-data/model';
import { belongsTo } from 'ember-data/relationships';
export default Model.extend({
task: belongsTo('task', { async: true }),
skill: belongsTo('skill', { async: true })
});
| {
"content_hash": "f12b6f082a38d2f6eca4fa738d668242",
"timestamp": "",
"source": "github",
"line_count": 7,
"max_line_length": 53,
"avg_line_length": 30.857142857142858,
"alnum_prop": 0.6851851851851852,
"repo_name": "jderr-mx/code-corps-ember",
"id": "fdbf9401a8171ea69f1704affe8af9ae6bea52f0",
"size": "216",
"binary": false,
"copies": "2",
"ref": "refs/heads/develop",
"path": "app/models/task-skill.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "150855"
},
{
"name": "HTML",
"bytes": "220649"
},
{
"name": "JavaScript",
"bytes": "1188778"
}
],
"symlink_target": ""
} |
fn with_closure_expecting_fn_with_free_region<F>(_: F)
where
F: for<'a> FnOnce(fn(&'a u32), &i32),
{
}
fn with_closure_expecting_fn_with_bound_region<F>(_: F)
where
F: FnOnce(fn(&u32), &i32),
{
}
fn expect_free_supply_free_from_fn<'x>(x: &'x u32) {
// Here, the type given for `'x` "obscures" a region from the
// expected signature that is bound at closure level.
with_closure_expecting_fn_with_free_region(|x: fn(&'x u32), y| {});
//~^ ERROR mismatched types
//~| ERROR mismatched types
}
fn expect_free_supply_free_from_closure() {
// A variant on the previous test. Here, the region `'a` will be
// bound at the closure level, just as is expected, so no error
// results.
type Foo<'a> = fn(&'a u32);
with_closure_expecting_fn_with_free_region(|_x: Foo<'_>, y| {});
}
fn expect_free_supply_bound() {
// Here, we are given a function whose region is bound at closure level,
// but we expect one bound in the argument. Error results.
with_closure_expecting_fn_with_free_region(|x: fn(&u32), y| {});
//~^ ERROR mismatched types
}
fn expect_bound_supply_free_from_fn<'x>(x: &'x u32) {
// Here, we are given a `fn(&u32)` but we expect a `fn(&'x
// u32)`. In principle, this could be ok, but we demand equality.
with_closure_expecting_fn_with_bound_region(|x: fn(&'x u32), y| {});
//~^ ERROR mismatched types
}
fn expect_bound_supply_free_from_closure() {
// A variant on the previous test. Here, the region `'a` will be
// bound at the closure level, but we expect something bound at
// the argument level.
type Foo<'a> = fn(&'a u32);
with_closure_expecting_fn_with_bound_region(|x: Foo<'_>, y| {
//~^ ERROR mismatched types
});
}
fn expect_bound_supply_bound<'x>(x: &'x u32) {
// No error in this case. The supplied type supplies the bound
// regions, and hence we are able to figure out the type of `y`
// from the expected type
with_closure_expecting_fn_with_bound_region(|x: for<'z> fn(&'z u32), y| {});
}
fn main() {}
| {
"content_hash": "1cc730ce5a74b67f8a9be12fcb9242fe",
"timestamp": "",
"source": "github",
"line_count": 60,
"max_line_length": 80,
"avg_line_length": 34.28333333333333,
"alnum_prop": 0.6310160427807486,
"repo_name": "aidancully/rust",
"id": "c81c40c18b45b2f4f8ac9322a50a55536de567a8",
"size": "2057",
"binary": false,
"copies": "9",
"ref": "refs/heads/master",
"path": "src/test/ui/closure-expected-type/expect-fn-supply-fn.rs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ANTLR",
"bytes": "26968"
},
{
"name": "Assembly",
"bytes": "20050"
},
{
"name": "Awk",
"bytes": "159"
},
{
"name": "C",
"bytes": "726643"
},
{
"name": "C++",
"bytes": "54397"
},
{
"name": "CSS",
"bytes": "22328"
},
{
"name": "JavaScript",
"bytes": "38337"
},
{
"name": "LLVM",
"bytes": "5040"
},
{
"name": "Lex",
"bytes": "9238"
},
{
"name": "Makefile",
"bytes": "238787"
},
{
"name": "Pascal",
"bytes": "13073"
},
{
"name": "Puppet",
"bytes": "3193"
},
{
"name": "Python",
"bytes": "149063"
},
{
"name": "RenderScript",
"bytes": "26426"
},
{
"name": "Rust",
"bytes": "18504256"
},
{
"name": "Shell",
"bytes": "270708"
},
{
"name": "TeX",
"bytes": "57"
},
{
"name": "Yacc",
"bytes": "80496"
}
],
"symlink_target": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.