text
stringlengths 11
99.8k
| meta
dict |
|---|---|
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.cxf.systests</groupId>
<artifactId>cxf-systests-container-integration</artifactId>
<version>3.4.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>cxf-systests-ci-webapp</artifactId>
<name>Apache CXF Container Integration Test Webapp</name>
<description>Apache CXF Container Integration Test Webapp</description>
<packaging>war</packaging>
<properties>
<cxf.module.name>org.apache.cxf.systests.ci.webapp</cxf.module.name>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</dependency>
</dependencies>
</project>
|
{
"pile_set_name": "Github"
}
|
{
"id": "biancas-poster",
"name": "Bianca's Poster",
"games": {
"nh": {
"sellPrice": {
"currency": "bells",
"value": 250
},
"buyPrices": [
{
"currency": "bells",
"value": 1000
}
]
}
},
"category": "Photos"
}
|
{
"pile_set_name": "Github"
}
|
<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Class OculusManifestPreprocessor
| XRTK-Core </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Class OculusManifestPreprocessor
| XRTK-Core ">
<meta name="generator" content="docfx 2.52.0.0">
<link rel="shortcut icon" href="../favicon.png">
<link rel="stylesheet" href="../styles/docfx.vendor.css">
<link rel="stylesheet" href="../styles/docfx.css">
<link rel="stylesheet" href="../styles/main.css">
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<meta property="docfx:navrel" content="../toc.html">
<meta property="docfx:tocrel" content="toc.html">
</head> <body data-spy="scroll" data-target="#affix" data-offset="120">
<div id="wrapper">
<header>
<nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../logo.png" alt="">
</a>
</div>
<div class="collapse navbar-collapse" id="navbar">
<form class="navbar-form navbar-right" role="search" id="search">
<div class="form-group">
<input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
</div>
</form>
</div>
</div>
</nav>
<div class="subnav navbar navbar-default">
<div class="container hide-when-search" id="breadcrumb">
<ul class="breadcrumb">
<li></li>
</ul>
</div>
</div>
</header>
<div role="main" class="container body-content hide-when-search">
<div class="sidenav hide-when-search">
<a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
<div class="sidetoggle collapse" id="sidetoggle">
<div id="sidetoc"></div>
</div>
</div>
<div class="article row grid-right">
<div class="col-md-10">
<article class="content wrap" id="_content" data-uid="XRTK.Oculus.OculusManifestPreprocessor">
<h1 id="XRTK_Oculus_OculusManifestPreprocessor" data-uid="XRTK.Oculus.OculusManifestPreprocessor" class="text-break">Class OculusManifestPreprocessor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>
<div class="inheritance">
<h5>Inheritance</h5>
<div class="level0"><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object">Object</a></div>
<div class="level1"><span class="xref">OculusManifestPreprocessor</span></div>
</div>
<div class="inheritedMembers">
<h5>Inherited Members</h5>
<div>
<a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.equals#System_Object_Equals_System_Object_">Object.Equals(Object)</a>
</div>
<div>
<a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.equals#System_Object_Equals_System_Object_System_Object_">Object.Equals(Object, Object)</a>
</div>
<div>
<a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.gethashcode#System_Object_GetHashCode">Object.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.gettype#System_Object_GetType">Object.GetType()</a>
</div>
<div>
<a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.memberwiseclone#System_Object_MemberwiseClone">Object.MemberwiseClone()</a>
</div>
<div>
<a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.referenceequals#System_Object_ReferenceEquals_System_Object_System_Object_">Object.ReferenceEquals(Object, Object)</a>
</div>
<div>
<a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.tostring#System_Object_ToString">Object.ToString()</a>
</div>
</div>
<h6><strong>Namespace</strong>: <a class="xref" href="XRTK.Oculus.html">XRTK.Oculus</a></h6>
<h6><strong>Assembly</strong>: XRTK.Oculus.Editor.dll</h6>
<h5 id="XRTK_Oculus_OculusManifestPreprocessor_syntax">Syntax</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public class OculusManifestPreprocessor</code></pre>
</div>
<h3 id="methods">Methods
</h3>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/XRTK/XRTK-Core/new/development/docs-ref-overwrite/new?filename=XRTK_Oculus_OculusManifestPreprocessor_GenerateManifestForSubmission.md&value=---%0Auid%3A%20XRTK.Oculus.OculusManifestPreprocessor.GenerateManifestForSubmission%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/XRTK/XRTK-Core/blob/master/XRTK-Core/Packages/com.xrtk.oculus/Editor/OculusManifestPreprocessor.cs/#L30">View Source</a>
</span>
<a id="XRTK_Oculus_OculusManifestPreprocessor_GenerateManifestForSubmission_" data-uid="XRTK.Oculus.OculusManifestPreprocessor.GenerateManifestForSubmission*"></a>
<h4 id="XRTK_Oculus_OculusManifestPreprocessor_GenerateManifestForSubmission" data-uid="XRTK.Oculus.OculusManifestPreprocessor.GenerateManifestForSubmission">GenerateManifestForSubmission()</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">[MenuItem("Mixed Reality Toolkit/Tools/Create Oculus Quest compatible AndroidManifest.xml", false, 100000)]
public static void GenerateManifestForSubmission()</code></pre>
</div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/XRTK/XRTK-Core/new/development/docs-ref-overwrite/new?filename=XRTK_Oculus_OculusManifestPreprocessor_RemoveAndroidManifest.md&value=---%0Auid%3A%20XRTK.Oculus.OculusManifestPreprocessor.RemoveAndroidManifest%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/XRTK/XRTK-Core/blob/master/XRTK-Core/Packages/com.xrtk.oculus/Editor/OculusManifestPreprocessor.cs/#L98">View Source</a>
</span>
<a id="XRTK_Oculus_OculusManifestPreprocessor_RemoveAndroidManifest_" data-uid="XRTK.Oculus.OculusManifestPreprocessor.RemoveAndroidManifest*"></a>
<h4 id="XRTK_Oculus_OculusManifestPreprocessor_RemoveAndroidManifest" data-uid="XRTK.Oculus.OculusManifestPreprocessor.RemoveAndroidManifest">RemoveAndroidManifest()</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">[MenuItem("Mixed Reality Toolkit/Tools/Remove AndroidManifest.xml", false, 100001)]
public static void RemoveAndroidManifest()</code></pre>
</div>
<h3 id="extensionmethods">Extension Methods</h3>
<div>
<a class="xref" href="XRTK.Extensions.ConverterExtensions.html#XRTK_Extensions_ConverterExtensions_GetBuiltInTypeBytes__1___0_">ConverterExtensions.GetBuiltInTypeBytes<T>(T)</a>
</div>
<div>
<a class="xref" href="XRTK.Utilities.Async.Awaiters.html#XRTK_Utilities_Async_Awaiters_WaitUntil__1___0_System_Func___0_System_Boolean__System_Int32_">Awaiters.WaitUntil<T>(T, Func<T, Boolean>, Int32)</a>
</div>
</article>
</div>
<div class="hidden-sm col-md-2" role="complementary">
<div class="sideaffix">
<div class="contribution">
<ul class="nav">
<li>
<a href="https://github.com/XRTK/XRTK-Core/new/development/docs-ref-overwrite/new?filename=XRTK_Oculus_OculusManifestPreprocessor.md&value=---%0Auid%3A%20XRTK.Oculus.OculusManifestPreprocessor%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a>
</li>
<li>
<a href="https://github.com/XRTK/XRTK-Core/blob/master/XRTK-Core/Packages/com.xrtk.oculus/Editor/OculusManifestPreprocessor.cs/#L28" class="contribution-link">View Source</a>
</li>
</ul>
</div>
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
<!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
</nav>
</div>
</div>
</div>
</div>
<footer>
<div class="grad-bottom"></div>
<div class="footer">
<div class="container">
<span class="pull-right">
<a href="#top">Back to top</a>
</span>
(c) XRTK
</div>
</div>
</footer>
</div>
<script type="text/javascript" src="../styles/docfx.vendor.js"></script>
<script type="text/javascript" src="../styles/docfx.js"></script>
<script type="text/javascript" src="../styles/main.js"></script>
</body>
</html>
|
{
"pile_set_name": "Github"
}
|
+++
title = "Pangram checker"
description = ""
date = 2019-10-17T23:32:31Z
aliases = []
[extra]
id = 5383
[taxonomies]
categories = []
tags = []
+++
{{task}} [[Category:String manipulation]]
{{omit from|Lilypond}}
A pangram is a sentence that contains all the letters of the English alphabet at least once.
For example: ''The quick brown fox jumps over the lazy dog''.
;Task:
Write a function or method to check a sentence to see if it is a [[wp:Pangram|pangram]] (or not) and show its use.
## 360 Assembly
```360asm
* Pangram RC 11/08/2015
PANGRAM CSECT
USING PANGRAM,R12
LR R12,R15
BEGIN LA R9,SENTENCE
LA R6,4
LOOPI LA R10,ALPHABET loop on sentences
LA R7,26
LOOPJ LA R5,0 loop on letters
LR R11,R9
LA R8,60
LOOPK MVC BUFFER+1(1),0(R10) loop in sentence
CLC 0(1,R10),0(R11) if alphabet[j=sentence[i]
BNE NEXTK
LA R5,1 found
NEXTK LA R11,1(R11) next character
BCT R8,LOOPK
LTR R5,R5 if found
BNZ NEXTJ
MVI BUFFER,C'?' not found
B PRINT
NEXTJ LA R10,1(R10) next letter
BCT R7,LOOPJ
MVC BUFFER(2),=CL2'OK'
PRINT MVC BUFFER+3(60),0(R9)
XPRNT BUFFER,80
NEXTI LA R9,60(R9) next sentence
BCT R6,LOOPI
RETURN XR R15,R15
BR R14
ALPHABET DC CL26'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
SENTENCE DC CL60'THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.'
DC CL60'THE FIVE BOXING WIZARDS DUMP QUICKLY.'
DC CL60'HEAVY BOXES PERFORM WALTZES AND JIGS.'
DC CL60'PACK MY BOX WITH FIVE DOZEN LIQUOR JUGS.'
BUFFER DC CL80' '
YREGS
END PANGRAM
```
{{out}}
```txt
OK THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.
?J THE FIVE BOXING WIZARDS DUMP QUICKLY.
?C HEAVY BOXES PERFORM WALTZES AND JIGS.
OK PACK MY BOX WITH FIVE DOZEN LIQUOR JUGS.
```
## ACL2
```Lisp
(defun contains-each (needles haystack)
(if (endp needles)
t
(and (member (first needles) haystack)
(contains-each (rest needles) haystack))))
(defun pangramp (str)
(contains-each (coerce "abcdefghijklmnopqrstuvwxyz" 'list)
(coerce (string-downcase str) 'list)))
```
## ActionScript
{{works with|ActionScript|2.0}}
```ActionScript
function pangram(k:string):Boolean {
var lowerK:String = k.toLowerCase();
var has:Object = {}
for (var i:Number=0; i<=k.length-1; i++) {
has[lowerK.charAt(i)] = true;
}
var result:Boolean = true;
for (var ch:String='a'; ch <= 'z'; ch=String.fromCharCode(ch.charCodeAt(0)+1)) {
result = result && has[ch]
}
return result || false;
}
```
## Ada
### Using character sets
```Ada
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Strings.Maps; use Ada.Strings.Maps;
with Ada.Characters.Handling; use Ada.Characters.Handling;
procedure pangram is
function ispangram(txt: String) return Boolean is
(Is_Subset(To_Set(Span => ('a','z')), To_Set(To_Lower(txt))));
begin
put_line(Boolean'Image(ispangram("This is a test")));
put_line(Boolean'Image(ispangram("The quick brown fox jumps over the lazy dog")));
put_line(Boolean'Image(ispangram("NOPQRSTUVWXYZ abcdefghijklm")));
put_line(Boolean'Image(ispangram("abcdefghijklopqrstuvwxyz"))); --Missing m, n
end pangram;
```
### Using quantified expressions
```Ada
with Ada.Text_IO; use Ada.Text_IO;
with Ada.Characters.Handling; use Ada.Characters.Handling;
procedure pangram is
function ispangram(txt : in String) return Boolean is
(for all Letter in Character range 'a'..'z' =>
(for some Char of txt => To_Lower(Char) = Letter));
begin
put_line(Boolean'Image(ispangram("This is a test")));
put_line(Boolean'Image(ispangram("The quick brown fox jumps over the lazy dog")));
put_line(Boolean'Image(ispangram("NOPQRSTUVWXYZ abcdefghijklm")));
put_line(Boolean'Image(ispangram("abcdefghijklopqrstuvwxyz"))); --Missing m, n
end pangram;
```
{{out}}
```txt
FALSE
TRUE
TRUE
FALSE
```
## ALGOL 68
{{works with|ALGOL 68|Standard - no extensions to language used}}
{{works with|ALGOL 68G|Any - tested with release [http://sourceforge.net/projects/algol68/files/algol68g/algol68g-1.18.0/algol68g-1.18.0-9h.tiny.el5.centos.fc11.i386.rpm/download 1.18.0-9h.tiny]}}
{{works with|ELLA ALGOL 68|Any (with appropriate job cards)}}
```algol68
# init pangram: #
INT la = ABS "a", lz = ABS "z";
INT ua = ABS "A", uz = ABS "Z";
IF lz-la+1 > bits width THEN
put(stand error, "Exception: insufficient bits in word for task");
stop
FI;
PROC is a pangram = (STRING test)BOOL: (
BITS a2z := BIN(ABS(2r1 SHL (lz-la))-1); # assume: ASCII & Binary #
FOR i TO UPB test WHILE
INT c = ABS test[i];
IF la <= c AND c <= lz THEN
a2z := a2z AND NOT(2r1 SHL (c-la))
ELIF ua <= c AND c <= uz THEN
a2z := a2z AND NOT(2r1 SHL (c-ua))
FI;
# WHILE # a2z /= 2r0 DO
SKIP
OD;
a2z = 2r0
);
main:(
[]STRING test list = (
"Big fjiords vex quick waltz nymph",
"The quick brown fox jumps over a lazy dog",
"A quick brown fox jumps over a lazy dog"
);
FOR key TO UPB test list DO
STRING test = test list[key];
IF is a pangram(test) THEN
print(("""",test,""" is a pangram!", new line))
FI
OD
)
```
{{out}}
```txt
"Big fjiords vex quick waltz nymph" is a pangram!
"The quick brown fox jumps over a lazy dog" is a pangram!
```
## APL
```apl
a←'abcdefghijklmnopqrstuvwxyz'
A←'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
Panagram←{∧/ ∨⌿ 2 26⍴(a,A) ∊ ⍵}
Panagram 'This should fail'
0
Panagram 'The quick brown fox jumps over the lazy dog'
1
```
## AppleScript
Out of the box, AppleScript lacks many library basics – no regex, no higher order functions, not even string functions for mapping to upper or lower case.
From OSX 10.10 onwards, we can, however, use ObjC functions from AppleScript by importing the Foundation framework. We do this below to get a toLowerCase() function. If we also add generic filter and map functions, we can write and test a simple isPangram() function as follows:
```AppleScript
use framework "Foundation" -- ( for case conversion function )
-- PANGRAM CHECK -------------------------------------------------------------
-- isPangram :: String -> Bool
on isPangram(s)
script charUnUsed
property lowerCaseString : my toLower(s)
on |λ|(c)
lowerCaseString does not contain c
end |λ|
end script
length of filter(charUnUsed, "abcdefghijklmnopqrstuvwxyz") = 0
end isPangram
-- TEST ----------------------------------------------------------------------
on run
map(isPangram, {¬
"is this a pangram", ¬
"The quick brown fox jumps over the lazy dog"})
--> {false, true}
end run
-- GENERIC FUNCTIONS ---------------------------------------------------------
-- filter :: (a -> Bool) -> [a] -> [a]
on filter(f, xs)
tell mReturn(f)
set lst to {}
set lng to length of xs
repeat with i from 1 to lng
set v to item i of xs
if |λ|(v, i, xs) then set end of lst to v
end repeat
return lst
end tell
end filter
-- map :: (a -> b) -> [a] -> [b]
on map(f, xs)
tell mReturn(f)
set lng to length of xs
set lst to {}
repeat with i from 1 to lng
set end of lst to |λ|(item i of xs, i, xs)
end repeat
return lst
end tell
end map
-- Lift 2nd class handler function into 1st class script wrapper
-- mReturn :: Handler -> Script
on mReturn(f)
if class of f is script then
f
else
script
property |λ| : f
end script
end if
end mReturn
-- toLower :: String -> String
on toLower(str)
set ca to current application
((ca's NSString's stringWithString:(str))'s ¬
lowercaseStringWithLocale:(ca's NSLocale's currentLocale())) as text
end toLower
```
{{Out}}
```AppleScript
{false, true}
```
## ATS
```ATS
(* ****** ****** *)
//
#include
"share/atspre_staload.hats"
#include
"share/HATS/atspre_staload_libats_ML.hats"
//
(* ****** ****** *)
//
fun
letter_check
(
cs: string, c0: char
) : bool = cs.exists()(lam(c) => c0 = c)
//
(* ****** ****** *)
fun
Pangram_check
(text: string): bool = let
//
val
alphabet = "abcdefghijklmnopqrstuvwxyz"
val
((*void*)) = assertloc(length(alphabet) = 26)
//
in
alphabet.forall()(lam(c) => letter_check(text, c) || letter_check(text, toupper(c)))
end // end of [Pangram_check]
(* ****** ****** *)
implement
main0 () =
{
//
val
text0 = "The quick brown fox jumps over the lazy dog."
//
val-true = Pangram_check(text0)
val-false = Pangram_check("This is not a pangram sentence.")
//
} (* end of [main0] *)
(* ****** ****** *)
```
An alternate implementation that makes a single pass through the string:
```ATS
fn is_pangram{n:nat}(s: string(n)): bool = loop(s, i2sz(0)) where {
val letters: arrayref(bool, 26) = arrayref_make_elt<bool>(i2sz(26), false)
fn check(): bool = loop(0) where {
fun loop{i:int | i >= 0 && i <= 26}(i: int(i)) =
if i < 26 then
if letters[i] then loop(i+1) else
false
else true
}
fun add{c:int}(c: char(c)): void =
if (c >= 'A') * (c <= 'Z') then letters[char2int1(c) - char2int1('A')] := true else
if (c >= 'a') * (c <= 'z') then letters[char2int1(c) - char2int1('a')] := true
fun loop{i:nat | i <= n}.<n-i>.(s: string(n), i: size_t(i)): bool =
if string_is_atend(s, i) then check() else
begin
add(s[i]);
loop(s, succ(i))
end
}
```
## AutoHotkey
```autohotkey
Gui, -MinimizeBox
Gui, Add, Edit, w300 r5 vText
Gui, Add, Button, x105 w100 Default, Check Pangram
Gui, Show,, Pangram Checker
Return
GuiClose:
ExitApp
Return
ButtonCheckPangram:
Gui, Submit, NoHide
Loop, 26
If Not InStr(Text, Char := Chr(64 + A_Index)) {
MsgBox,, Pangram, Character %Char% is missing!
Return
}
MsgBox,, Pangram, OK`, this is a Pangram!
Return
```
## AutoIt
```autoit
Pangram("The quick brown fox jumps over the lazy dog")
Func Pangram($s_String)
For $i = 1 To 26
IF Not StringInStr($s_String, Chr(64 + $i)) Then
Return MsgBox(0,"No Pangram", "Character " & Chr(64 + $i) &" is missing")
EndIf
Next
Return MsgBox(0,"Pangram", "Sentence is a Pangram")
EndFunc
```
## AWK
===Solution using string-operations===
```AWK
#!/usr/bin/awk -f
BEGIN {
allChars="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
print isPangram("The quick brown fox jumps over the lazy dog.");
print isPangram("The quick brown fo.");
}
function isPangram(string) {
delete X;
for (k=1; k<length(string); k++) {
X[toupper(substr(string,k,1))]++; # histogram
}
for (k=1; k<=length(allChars); k++) {
if (!X[substr(allChars,k,1)]) return 0;
}
return 1;
}
```
{{out}}
```txt
1
0
```
### Solution using associative arrays and split
{{Works with|gawk|4.1.0}}
{{Works with|mawk|1.3.3}}
```AWK
# usage: awk -f pangram.awk -v p="The five boxing wizards dump quickly." input.txt
#
# Pangram-checker, using associative arrays and split
BEGIN {
alfa="ABCDEFGHIJKLMNOPQRSTUVWXYZ"; ac=split(alfa,A,"")
print "# Checking for all",ac,"chars in '" alfa "' :"
print testPangram("The quick brown fox jumps over the lazy dog.");
print testPangram(p);
}
{ print testPangram($0) }
function testPangram(str, c,i,S,H,hit,miss) {
print str ##
split( toupper(str), S, "")
for (c in S) {
H[ S[c] ]++
#print c, S[c], H[ S[c] ] ##
}
for (i=1; i<=ac; i++) {
c = A[i]
#printf("%2d %c : %4d\n", i, c, H[c] ) ##
if (H[c]) { hit=hit c } else { miss=miss c }
}
print "# hit:",hit, "# miss:",miss, "." ##
if (miss) return 0
return 1
}
```
{{out}}
```txt
# Checking for all 26 chars in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' :
The quick brown fox jumps over the lazy dog.
# hit: ABCDEFGHIJKLMNOPQRSTUVWXYZ # miss: .
1
The five boxing wizards dump quickly.
# hit: ABCDEFGHIKLMNOPQRSTUVWXYZ # miss: J .
0
Heavy boxes perform waltzes and jigs
# hit: ABDEFGHIJLMNOPRSTVWXYZ # miss: CKQU .
0
The quick onyx goblin jumps over the lazy dwarf.
# hit: ABCDEFGHIJKLMNOPQRSTUVWXYZ # miss: .
1
Pack my box with five dozen liquor jugs
# hit: ABCDEFGHIJKLMNOPQRSTUVWXYZ # miss: .
1
```
## BASIC
{{works with|QBasic}}
```qbasic
DECLARE FUNCTION IsPangram! (sentence AS STRING)
DIM x AS STRING
x = "My dog has fleas."
GOSUB doIt
x = "The lazy dog jumps over the quick brown fox."
GOSUB doIt
x = "Jackdaws love my big sphinx of quartz."
GOSUB doIt
x = "What's a jackdaw?"
GOSUB doIt
END
doIt:
PRINT IsPangram!(x), x
RETURN
FUNCTION IsPangram! (sentence AS STRING)
'returns -1 (true) if sentence is a pangram, 0 (false) otherwise
DIM l AS INTEGER, s AS STRING, t AS INTEGER
DIM letters(25) AS INTEGER
FOR l = 1 TO LEN(sentence)
s = UCASE$(MID$(sentence, l, 1))
SELECT CASE s
CASE "A" TO "Z"
t = ASC(s) - 65
letters(t) = 1
END SELECT
NEXT
FOR l = 0 TO 25
IF letters(l) < 1 THEN
IsPangram! = 0
EXIT FUNCTION
END IF
NEXT
IsPangram! = -1
END FUNCTION
```
{{out}}
```txt
0 My dog has fleas.
-1 The quick brown fox jumps over the lazy dog.
-1 Jackdaws love my big sphinx of quartz.
0 What's a jackdaw?
```
=
## Sinclair ZX81 BASIC
=
Works (just) with the 1k RAM model. The "37" that crops up a couple of times stops being a mystery if we remember that the ZX81 character code for <code>A</code> is 38 and that strings (like arrays) are indexed from 1, not from 0.
```basic
10 LET A$="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
20 LET L=26
30 INPUT P$
40 IF LEN P$<26 THEN GOTO 170
50 FAST
60 LET C=1
70 IF P$(C)<"A" OR P$(C)>"Z" THEN GOTO 120
80 IF A$(CODE P$(C)-37)=" " THEN GOTO 120
90 LET A$(CODE P$(C)-37)=" "
100 LET L=L-1
110 IF L=0 THEN GOTO 150
120 IF C=LEN P$ THEN GOTO 170
130 LET C=C+1
140 GOTO 70
150 PRINT "PANGRAM"
160 GOTO 180
170 PRINT "NOT A PANGRAM"
180 SLOW
```
{{in}}
```txt
THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.
```
{{out}}
```txt
PANGRAM
```
{{in}}
```txt
AND DARK THE SUN AND MOON, AND THE ALMANACH DE GOTHA
```
{{out}}
```txt
NOT A PANGRAM
```
## Batch File
```dos
@echo off
setlocal enabledelayedexpansion
%
### The Main Thing
%
call :pangram "The quick brown fox jumps over the lazy dog."
call :pangram "The quick brown fox jumped over the lazy dog."
echo.
pause
exit /b 0
%
### The Function
%
:pangram
set letters=abcdefgihjklmnopqrstuvwxyz
set cnt=0
set inp=%~1
set str=!inp: =!
:loop
set chr=!str:~%cnt%,1!
if "!letters!"=="" (
echo %1 is a pangram^^!
goto :EOF
)
if "!chr!"=="" (
echo %1 is not a pangram.
goto :EOF
)
set letters=!letters:%chr%=!
set /a cnt+=1
goto loop
```
{{Out}}
```txt
"The quick brown fox jumps over the lazy dog." is a pangram!
"The quick brown fox jumped over the lazy dog." is not a pangram.
Press any key to continue . . .
```
## BBC BASIC
```bbcbasic
FOR test% = 1 TO 2
READ test$
PRINT """" test$ """ " ;
IF FNpangram(test$) THEN
PRINT "is a pangram"
ELSE
PRINT "is not a pangram"
ENDIF
NEXT test%
END
DATA "The quick brown fox jumped over the lazy dog"
DATA "The five boxing wizards jump quickly"
DEF FNpangram(A$)
LOCAL C%
A$ = FNlower(A$)
FOR C% = ASC("a") TO ASC("z")
IF INSTR(A$, CHR$(C%)) = 0 THEN = FALSE
NEXT
= TRUE
DEF FNlower(A$)
LOCAL A%, C%
FOR A% = 1 TO LEN(A$)
C% = ASCMID$(A$,A%)
IF C% >= 65 IF C% <= 90 MID$(A$,A%,1) = CHR$(C%+32)
NEXT
= A$
```
{{out}}
```txt
"The quick brown fox jumped over the lazy dog" is not a pangram
"The five boxing wizards jump quickly" is a pangram
```
## Befunge
Reads the sentence to test from stdin.
```befunge>
~>:65*`!#v_:"`"`48*v>g+04p1\4p
^#*`\*93\`0<::-"@"-*<^40!%2g4:_
"pangram."<v*84<_v#-":"g40\" a"
>>:#,_55+,@>"ton">48*>"si tahT"
```
{{in}}
```txt
The quick brown fox jumps over the lazy dog.
```
{{out}}
```txt
That is a pangram.
```
## Bracmat
```bracmat
(isPangram=
k
. low$!arg:?arg
& a:?k
& whl
' ( @(!arg:? !k ?)
& chr$(1+asc$!k):?k:~>z
)
& !k:>z
&
);
```
Some examples:
```txt
isPangram$("the Quick brown FOX jumps over the lazy do")
no
isPangram$("the Quick brown FOX jumps over the lazy dog")
yes
isPangram$"My dog has fleas."
no
isPangram$"The quick brown fox jumps over the lazy dog."
yes
isPangram$"Jackdaws love my big sphinx of quartz."
yes
isPangram$"What's a jackdaw?"
no
isPangram$"Lynx c.q. vos prikt bh: dag zwemjuf!"
yes
```
## Brat
```brat
pangram? = { sentence |
letters = [:a :b :c :d :e :f :g :h :i :j :k :l :m
:n :o :p :q :r :s :t :u :v :w :x :y :z]
sentence.downcase!
letters.reject! { l |
sentence.include? l
}
letters.empty?
}
p pangram? 'The quick brown fox jumps over the lazy dog.' #Prints true
p pangram? 'Probably not a pangram.' #Prints false
```
Alternative version:
```brat
pangram? = { sentence |
sentence.downcase.dice.unique.select(:alpha?).length == 26
}
```
## C
```c
#include <stdio.h>
int is_pangram(const char *s)
{
const char *alpha = ""
"abcdefghjiklmnopqrstuvwxyz"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ";
char ch, wasused[26] = {0};
int total = 0;
while ((ch = *s++) != '\0') {
const char *p;
int idx;
if ((p = strchr(alpha, ch)) == NULL)
continue;
idx = (p - alpha) % 26;
total += !wasused[idx];
wasused[idx] = 1;
if (total == 26)
return 1;
}
return 0;
}
int main(void)
{
int i;
const char *tests[] = {
"The quick brown fox jumps over the lazy dog.",
"The qu1ck brown fox jumps over the lazy d0g."
};
for (i = 0; i < 2; i++)
printf("\"%s\" is %sa pangram\n",
tests[i], is_pangram(tests[i])?"":"not ");
return 0;
}
```
### Using bitmask
Assumes an execution environment using the ASCII character set (will invoke undefined behavior on other systems).
```c
#include <stdio.h>
int pangram(const char *s)
{
int c, mask = (1 << 26) - 1;
while ((c = (*s++)) != '\0') /* 0x20 converts lowercase to upper */
if ((c &= ~0x20) <= 'Z' && c >= 'A')
mask &= ~(1 << (c - 'A'));
return !mask;
}
int main()
{
int i;
const char *s[] = { "The quick brown fox jumps over lazy dogs.",
"The five boxing wizards dump quickly.", };
for (i = 0; i < 2; i++)
printf("%s: %s\n", pangram(s[i]) ? "yes" : "no ", s[i]);
return 0;
}
```
{{out}}
```txt
yes: The quick brown fox jumps over lazy dogs.
no : The five boxing wizards dump quickly.
```
## C#
C# 3.0 or higher (.NET Framework 3.5 or higher)
```c#
using System;
using System.Linq;
static class Program
{
static bool IsPangram(this string text, string alphabet = "abcdefghijklmnopqrstuvwxyz")
{
return alphabet.All(text.ToLower().Contains);
}
static void Main(string[] arguments)
{
Console.WriteLine(arguments.Any() && arguments.First().IsPangram());
}
}
```
Any version of C# language and .NET Framework
```c#
using System;
namespace PangrammChecker
{
public class PangrammChecker
{
public static bool IsPangram(string str)
{
bool[] isUsed = new bool[26];
int ai = (int)'a';
int total = 0;
for (CharEnumerator en = str.ToLower().GetEnumerator(); en.MoveNext(); )
{
int d = (int)en.Current - ai;
if (d >= 0 && d < 26)
if (!isUsed[d])
{
isUsed[d] = true;
total++;
}
}
return (total == 26);
}
}
class Program
{
static void Main(string[] args)
{
string str1 = "The quick brown fox jumps over the lazy dog.";
string str2 = "The qu1ck brown fox jumps over the lazy d0g.";
Console.WriteLine("{0} is {1}a pangram", str1,
PangrammChecker.IsPangram(str1)?"":"not ");
Console.WriteLine("{0} is {1}a pangram", str2,
PangrammChecker.IsPangram(str2)?"":"not ");
Console.WriteLine("Press Return to exit");
Console.ReadLine();
}
}
}
```
## C++
```cpp
#include <algorithm>
#include <cctype>
#include <string>
#include <iostream>
const std::string alphabet("abcdefghijklmnopqrstuvwxyz");
bool is_pangram(std::string s)
{
std::transform(s.begin(), s.end(), s.begin(), ::tolower);
std::sort(s.begin(), s.end());
return std::includes(s.begin(), s.end(), alphabet.begin(), alphabet.end());
}
int main()
{
const auto examples = {"The quick brown fox jumps over the lazy dog",
"The quick white cat jumps over the lazy dog"};
std::cout.setf(std::ios::boolalpha);
for (auto& text : examples) {
std::cout << "Is \"" << text << "\" a pangram? - " << is_pangram(text) << std::endl;
}
}
```
## Ceylon
```ceylon
shared void run() {
function pangram(String sentence) =>
let(alphabet = set('a'..'z'),
letters = set(sentence.lowercased.filter(alphabet.contains)))
letters == alphabet;
value sentences = [
"The quick brown fox jumps over the lazy dog",
"""Watch "Jeopardy!", Alex Trebek's fun TV quiz game.""",
"Pack my box with five dozen liquor jugs.",
"blah blah blah"
];
for(sentence in sentences) {
print("\"``sentence``\" is a pangram? ``pangram(sentence)``");
}
}
```
## Clojure
```lisp
(defn pangram? [s]
(let [letters (into #{} "abcdefghijklmnopqrstuvwxyz")]
(= (->> s .toLowerCase (filter letters) (into #{})) letters)))
```
## COBOL
```COBOL
identification division.
program-id. pan-test.
data division.
working-storage section.
1 text-string pic x(80).
1 len binary pic 9(4).
1 trailing-spaces binary pic 9(4).
1 pangram-flag pic x value "n".
88 is-not-pangram value "n".
88 is-pangram value "y".
procedure division.
begin.
display "Enter text string:"
accept text-string
set is-not-pangram to true
initialize trailing-spaces len
inspect function reverse (text-string)
tallying trailing-spaces for leading space
len for characters after space
call "pangram" using pangram-flag len text-string
cancel "pangram"
if is-pangram
display "is a pangram"
else
display "is not a pangram"
end-if
stop run
.
end program pan-test.
identification division.
program-id. pangram.
data division.
1 lc-alphabet pic x(26) value "abcdefghijklmnopqrstuvwxyz".
linkage section.
1 pangram-flag pic x.
88 is-not-pangram value "n".
88 is-pangram value "y".
1 len binary pic 9(4).
1 text-string pic x(80).
procedure division using pangram-flag len text-string.
begin.
inspect lc-alphabet converting
function lower-case (text-string (1:len))
to space
if lc-alphabet = space
set is-pangram to true
end-if
exit program
.
end program pangram.
```
## CoffeeScript
```coffeescript
is_pangram = (s) ->
# This is optimized for longish strings--as soon as all 26 letters
# are encountered, we will be done. Our worst case scenario is a really
# long non-pangram, or a really long pangram with at least one letter
# only appearing toward the end of the string.
a_code = 'a'.charCodeAt(0)
required_letters = {}
for i in [a_code...a_code+26]
required_letters[String.fromCharCode(i)] = true
cnt = 0
for c in s
c = c.toLowerCase()
if required_letters[c]
cnt += 1
return true if cnt == 26
delete required_letters[c]
false
do ->
tests = [
["is this a pangram", false]
["The quick brown fox jumps over the lazy dog", true]
]
for test in tests
[s, exp_value] = test
throw Error("fail") if is_pangram(s) != exp_value
# try long strings
long_str = ''
for i in [1..500000]
long_str += s
throw Error("fail") if is_pangram(long_str) != exp_value
console.log "Passed tests: #{s}"
```
## Common Lisp
```lisp
(defun pangramp (s)
(null (set-difference
(loop for c from (char-code #\A) upto (char-code #\Z) collect (code-char c))
(coerce (string-upcase s) 'list))))
```
## Component Pascal
BlackBox Component Builder
```oberon2
MODULE BbtPangramChecker;
IMPORT StdLog,DevCommanders,TextMappers;
PROCEDURE Check(str: ARRAY OF CHAR): BOOLEAN;
CONST
letters = 26;
VAR
i,j: INTEGER;
status: ARRAY letters OF BOOLEAN;
resp : BOOLEAN;
BEGIN
FOR i := 0 TO LEN(status) -1 DO status[i] := FALSE END;
FOR i := 0 TO LEN(str) - 1 DO
j := ORD(CAP(str[i])) - ORD('A');
IF (0 <= j) & (25 >= j) & ~status[j] THEN status[j] := TRUE END
END;
resp := TRUE;
FOR i := 0 TO LEN(status) - 1 DO;
resp := resp & status[i]
END;
RETURN resp;
END Check;
PROCEDURE Do*;
VAR
params: DevCommanders.Par;
s: TextMappers.Scanner;
BEGIN
params := DevCommanders.par;
s.ConnectTo(params.text);
s.SetPos(params.beg);
s.Scan;
WHILE (~s.rider.eot) DO
IF (s.type = TextMappers.char) & (s.char = '~') THEN
RETURN
ELSIF (s.type # TextMappers.string) THEN
StdLog.String("Invalid parameter");StdLog.Ln
ELSE
StdLog.Char("'");StdLog.String(s.string + "' is pangram?:> ");
StdLog.Bool(Check(s.string));StdLog.Ln
END;
s.Scan
END
END Do;
END BbtPangramChecker.
```
Execute: ^Q BbtPangramChecker.Do "The quick brown fox jumps over the lazy dog"~ <br/>
^Q BbtPangramChecker.Do "abcdefghijklmnopqrstuvwxyz"~<br/>
^Q BbtPangramChecker.Do "A simple text"~<br/>
{{out}}
```txt
'The quick brown fox jumps over the lazy dog' is pangram?:> $TRUE
'abcdefghijklmnopqrstuvwxyz' is pangram?:> $TRUE
'A simple text' is pangram?:> $FALSE
```
## D
### ASCII Bitmask version
```d
bool isPangram(in string text) pure nothrow @safe @nogc {
uint bitset;
foreach (immutable c; text) {
if (c >= 'a' && c <= 'z')
bitset |= (1u << (c - 'a'));
else if (c >= 'A' && c <= 'Z')
bitset |= (1u << (c - 'A'));
}
return bitset == 0b11_11111111_11111111_11111111;
}
void main() {
assert("the quick brown fox jumps over the lazy dog".isPangram);
assert(!"ABCDEFGHIJKLMNOPQSTUVWXYZ".isPangram);
assert(!"ABCDEFGHIJKL.NOPQRSTUVWXYZ".isPangram);
assert("ABC.D.E.FGHI*J/KL-M+NO*PQ R\nSTUVWXYZ".isPangram);
}
```
### Unicode version
```d
import std.string, std.traits, std.uni;
// Do not compile with -g (debug info).
enum Alphabet : dstring {
DE = "abcdefghijklmnopqrstuvwxyzßäöü",
EN = "abcdefghijklmnopqrstuvwxyz",
SV = "abcdefghijklmnopqrstuvwxyzåäö"
}
bool isPangram(S)(in S s, dstring alpha = Alphabet.EN)
pure /*nothrow*/ if (isSomeString!S) {
foreach (dchar c; alpha)
if (indexOf(s, c) == -1 && indexOf(s, std.uni.toUpper(c)) == -1)
return false;
return true;
}
void main() {
assert(isPangram("the quick brown fox jumps over the lazy dog".dup, Alphabet.EN));
assert(isPangram("Falsches Üben von Xylophonmusik quält jeden größeren Zwerg"d, Alphabet.DE));
assert(isPangram("Yxskaftbud, ge vår wczonmö iqhjälp"w, Alphabet.SV));
}
```
## Delphi
```Delphi
program PangramChecker;
{$APPTYPE CONSOLE}
uses StrUtils;
function IsPangram(const aString: string): Boolean;
var
c: char;
begin
for c := 'a' to 'z' do
if not ContainsText(aString, c) then
Exit(False);
Result := True;
end;
begin
Writeln(IsPangram('The quick brown fox jumps over the lazy dog')); // true
Writeln(IsPangram('Not a panagram')); // false
end.
```
## E
```e
def isPangram(sentence :String) {
return ("abcdefghijklmnopqrstuvwxyz".asSet() &! sentence.toLowerCase().asSet()).size() == 0
}
```
<code>&!</code> is the “but-not” or set difference operator.
## Elixir
```elixir
defmodule Pangram do
def checker(str) do
unused = Enum.to_list(?a..?z) -- to_char_list(String.downcase(str))
Enum.empty?(unused)
end
end
text = "The quick brown fox jumps over the lazy dog."
IO.puts "#{Pangram.checker(text)}\t#{text}"
text = (Enum.to_list(?A..?Z) -- 'Test') |> to_string
IO.puts "#{Pangram.checker(text)}\t#{text}"
```
{{out}}
```txt
true The quick brown fox jumps over the lazy dog.
false ABCDEFGHIJKLMNOPQRSUVWXYZ
```
## Erlang
```Erlang
-module(pangram).
-export([is_pangram/1]).
is_pangram(String) ->
ordsets:is_subset(lists:seq($a, $z), ordsets:from_list(string:to_lower(String))).
```
=={{header|F Sharp|F#}}==
If the difference between the set of letters in the alphabet and the set of letters in the given string (after conversion to lower case) is the empty set then every letter appears somewhere in the given string:
```fsharp
let isPangram (str: string) = (set['a'..'z'] - set(str.ToLower())).IsEmpty
```
## Factor
{{trans|E}}
```factor
: pangram? ( str -- ? )
[ "abcdefghijklmnopqrstuvwxyz" ] dip >lower diff length 0 = ;
"How razorback-jumping frogs can level six piqued gymnasts!" pangram? .
```
=={{header|Fōrmulæ}}==
In [http://wiki.formulae.org/Pangram_checker this] page you can see the solution of this task.
Fōrmulæ programs are not textual, visualization/edition of programs is done showing/manipulating structures but not text ([http://wiki.formulae.org/Editing_F%C5%8Drmul%C3%A6_expressions more info]). Moreover, there can be multiple visual representations of the same program. Even though it is possible to have textual representation —i.e. XML, JSON— they are intended for transportation effects more than visualization and edition.
The option to show Fōrmulæ programs and their results is showing images. Unfortunately images cannot be uploaded in Rosetta Code.
## Forth
```forth
: pangram? ( addr len -- ? )
0 -rot bounds do
i c@ 32 or [char] a -
dup 0 26 within if
1 swap lshift or
else drop then
loop
1 26 lshift 1- = ;
s" The five boxing wizards jump quickly." pangram? . \ -1
```
## Fortran
{{works with|Fortran|90 and later}}
```fortran
module pangram
implicit none
private
public :: is_pangram
character (*), parameter :: lower_case = 'abcdefghijklmnopqrstuvwxyz'
character (*), parameter :: upper_case = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
contains
function to_lower_case (input) result (output)
implicit none
character (*), intent (in) :: input
character (len (input)) :: output
integer :: i
integer :: j
output = input
do i = 1, len (output)
j = index (upper_case, output (i : i))
if (j /= 0) then
output (i : i) = lower_case (j : j)
end if
end do
end function to_lower_case
function is_pangram (input) result (output)
implicit none
character (*), intent (in) :: input
character (len (input)) :: lower_case_input
logical :: output
integer :: i
lower_case_input = to_lower_case (input)
output = .true.
do i = 1, len (lower_case)
if (index (lower_case_input, lower_case (i : i)) == 0) then
output = .false.
exit
end if
end do
end function is_pangram
end module pangram
```
Example:
```fortran
program test
use pangram, only: is_pangram
implicit none
character (256) :: string
string = 'This is a sentence.'
write (*, '(a)') trim (string)
write (*, '(l1)') is_pangram (string)
string = 'The five boxing wizards jumped quickly.'
write (*, '(a)') trim (string)
write (*, '(l1)') is_pangram (string)
end program test
```
{{out}}
```txt
This is a sentence.
F
The five boxing wizards jumped quickly.
T
```
## FreeBASIC
```freebasic
' FB 1.05.0 Win64
Function isPangram(s As Const String) As Boolean
Dim As Integer length = Len(s)
If length < 26 Then Return False
Dim p As String = LCase(s)
For i As Integer = 97 To 122
If Instr(p, Chr(i)) = 0 Then Return False
Next
Return True
End Function
Dim s(1 To 3) As String = _
{ _
"The quick brown fox jumps over the lazy dog", _
"abbdefghijklmnopqrstuVwxYz", _ '' no c!
"How vexingly quick daft zebras jump!" _
}
For i As Integer = 1 To 3:
Print "'"; s(i); "' is "; IIf(isPangram(s(i)), "a", "not a"); " pangram"
Print
Next
Print
Print "Press nay key to quit"
Sleep
```
{{out}}
```txt
'The quick brown fox jumps over the lazy dog' is a pangram
'abbdefghijklmnopqrstuVwxYz' is not a pangram
'How vexingly quick daft zebras jump!' is a pangram
```
## Go
```go
package main
import "fmt"
func main() {
for _, s := range []string{
"The quick brown fox jumps over the lazy dog.",
`Watch "Jeopardy!", Alex Trebek's fun TV quiz game.`,
"Not a pangram.",
} {
if pangram(s) {
fmt.Println("Yes:", s)
} else {
fmt.Println("No: ", s)
}
}
}
func pangram(s string) bool {
var missing uint32 = (1 << 26) - 1
for _, c := range s {
var index uint32
if 'a' <= c && c <= 'z' {
index = uint32(c - 'a')
} else if 'A' <= c && c <= 'Z' {
index = uint32(c - 'A')
} else {
continue
}
missing &^= 1 << index
if missing == 0 {
return true
}
}
return false
}
```
{{out}}
```txt
Yes: The quick brown fox jumps over the lazy dog.
Yes: Watch "Jeopardy!", Alex Trebek's fun TV quiz game.
No: Not a pangram.
```
## Haskell
```haskell
import Data.Char (toLower)
import Data.List ((\\))
pangram :: String -> Bool
pangram = null . (['a' .. 'z'] \\) . map toLower
main = print $ pangram "How razorback-jumping frogs can level six piqued gymnasts!"
```
## HicEst
```HicEst
PangramBrokenAt("This is a Pangram.") ! => 2 (b is missing)
PangramBrokenAt("The quick Brown Fox jumps over the Lazy Dog") ! => 0 (OK)
FUNCTION PangramBrokenAt(string)
CHARACTER string, Alfabet="abcdefghijklmnopqrstuvwxyz"
PangramBrokenAt = INDEX(Alfabet, string, 64)
! option 64: verify = 1st letter of string not in Alfabet
END
```
=={{header|Icon}} and {{header|Unicon}}==
A panagram procedure:
```Icon
procedure panagram(s) #: return s if s is a panagram and fail otherwise
if (map(s) ** &lcase) === &lcase then return s
end
```
And a main to drive it:
```Icon
procedure main(arglist)
if *arglist > 0 then
every ( s := "" ) ||:= !arglist || " "
else
s := "The quick brown fox jumps over the lazy dog."
writes(image(s), " -- is")
writes(if not panagram(s) then "n't")
write(" a panagram.")
end
```
## Io
```Io
Sequence isPangram := method(
letters := " " repeated(26)
ia := "a" at(0)
foreach(ichar,
if(ichar isLetter,
letters atPut((ichar asLowercase) - ia, ichar)
)
)
letters contains(" " at(0)) not // true only if no " " in letters
)
"The quick brown fox jumps over the lazy dog." isPangram println // --> true
"The quick brown fox jumped over the lazy dog." isPangram println // --> false
"ABC.D.E.FGHI*J/KL-M+NO*PQ R\nSTUVWXYZ" isPangram println // --> true
```
## Ioke
```ioke
Text isPangram? = method(
letters = "abcdefghijklmnopqrstuvwxyz" chars
text = self lower chars
letters map(x, text include?(x)) reduce(&&)
)
```
Here is an example of it's use in the Ioke REPL:
```ioke
iik> "The quick brown fox jumps over the lazy dog" isPangram?
"The quick brown fox jumps over the lazy dog" isPangram?
+> true
iik> "The quick brown fox jumps over the" isPangram?
"The quick brown fox jumps over the" isPangram?
+> false
```
## J
'''Solution:'''
```j
require 'strings'
isPangram=: (a. {~ 97+i.26) */@e. tolower
```
'''Example use:'''
```j
isPangram 'The quick brown fox jumps over the lazy dog.'
1
isPangram 'The quick brown fox falls over the lazy dog.'
0
```
## Java
{{works with|Java|1.5+}}
```java5
public class Pangram {
public static boolean isPangram(String test){
for (char a = 'A'; a <= 'Z'; a++)
if ((test.indexOf(a) < 0) && (test.indexOf((char)(a + 32)) < 0))
return false;
return true;
}
public static void main(String[] args){
System.out.println(isPangram("the quick brown fox jumps over the lazy dog"));//true
System.out.println(isPangram("the quick brown fox jumped over the lazy dog"));//false, no s
System.out.println(isPangram("ABCDEFGHIJKLMNOPQRSTUVWXYZ"));//true
System.out.println(isPangram("ABCDEFGHIJKLMNOPQSTUVWXYZ"));//false, no r
System.out.println(isPangram("ABCDEFGHIJKL.NOPQRSTUVWXYZ"));//false, no m
System.out.println(isPangram("ABC.D.E.FGHI*J/KL-M+NO*PQ R\nSTUVWXYZ"));//true
System.out.println(isPangram(""));//false
}
}
```
{{out}}
```txt
true
false
true
false
false
true
false
```
## JavaScript
### ES5
### =Iterative=
```javascript
function isPangram(s) {
var letters = "zqxjkvbpygfwmucldrhsnioate"
// sorted by frequency ascending (http://en.wikipedia.org/wiki/Letter_frequency)
s = s.toLowerCase().replace(/[^a-z]/g,'')
for (var i = 0; i < 26; i++)
if (s.indexOf(letters[i]) < 0) return false
return true
}
console.log(isPangram("is this a pangram")) // false
console.log(isPangram("The quick brown fox jumps over the lazy dog")) // true
```
### ES6
### =Functional=
```JavaScript
(() => {
'use strict';
// isPangram :: String -> Bool
let isPangram = s => {
let lc = s.toLowerCase();
return 'abcdefghijklmnopqrstuvwxyz'
.split('')
.filter(c => lc.indexOf(c) === -1)
.length === 0;
};
// TEST
return [
'is this a pangram',
'The quick brown fox jumps over the lazy dog'
].map(isPangram);
})();
```
{{Out}}
```txt
[false, true]
```
## jq
```jq
def is_pangram:
explode
| map( if 65 <= . and . <= 90 then . + 32 # uppercase
elif 97 <= . and . <= 122 then . # lowercase
else empty
end )
| unique
| length == 26;
# Example:
"The quick brown fox jumps over the lazy dog" | is_pangram
```
{{Out}}
$ jq -M -n -f pangram.jq
true
## Julia
<tt>makepangramchecker</tt> creates a function to test for pangramity based upon the contents of its input string, allowing one to create arbitrary pangram checkers.
```Julia
function makepangramchecker(alphabet)
alphabet = Set(uppercase.(alphabet))
function ispangram(s)
lengthcheck = length(s) ≥ length(alphabet)
return lengthcheck && all(c in uppercase(s) for c in alphabet)
end
return ispangram
end
const tests = ["Pack my box with five dozen liquor jugs.",
"The quick brown fox jumps over a lazy dog.",
"The quick brown fox jumps\u2323over the lazy dog.",
"The five boxing wizards jump quickly.",
"This sentence contains A-Z but not the whole alphabet."]
is_english_pangram = makepangramchecker('a':'z')
for s in tests
println("The sentence \"", s, "\" is ", is_english_pangram(s) ? "" : "not ", "a pangram.")
end
```
{{out}}
```txt
The sentence "Pack my box with five dozen liquor jugs." is a pangram.
The sentence "The quick brown fox jumps over a lazy dog." is a pangram.
The sentence "The quick brown fox jumps⌣over the lazy dog." is a pangram.
The sentence "The five boxing wizards jump quickly." is a pangram.
The sentence "This sentence contains A-Z but not the whole alphabet." is not a pangram.
```
## K
```k
lcase : _ci 97+!26
ucase : _ci 65+!26
tolower : {@[x;p;:;lcase@n@p:&26>n:ucase?/:x]}
panagram: {&/lcase _lin tolower x}
```
Example:
```k
panagram "The quick brown fox jumps over the lazy dog"
1
panagram "Panagram test"
0
```
## Kotlin
```scala
// version 1.0.6
fun isPangram(s: String): Boolean {
if (s.length < 26) return false
val t = s.toLowerCase()
for (c in 'a' .. 'z')
if (c !in t) return false
return true
}
fun main(args: Array<String>) {
val candidates = arrayOf(
"The quick brown fox jumps over the lazy dog",
"New job: fix Mr. Gluck's hazy TV, PDQ!",
"A very bad quack might jinx zippy fowls",
"A very mad quack might jinx zippy fowls" // no 'b' now!
)
for (candidate in candidates)
println("'$candidate' is ${if (isPangram(candidate)) "a" else "not a"} pangram")
}
```
{{out}}
```txt
'The quick brown fox jumps over the lazy dog' is a pangram
'New job: fix Mr. Gluck's hazy TV, PDQ!' is a pangram
'A very bad quack might jinx zippy fowls' is a pangram
'A very mad quack might jinx zippy fowls' is not a pangram
```
## Liberty BASIC
```lb
'Returns 0 if the string is NOT a pangram or >0 if it IS a pangram
string$ = "The quick brown fox jumps over the lazy dog."
Print isPangram(string$)
Function isPangram(string$)
string$ = Lower$(string$)
For i = Asc("a") To Asc("z")
isPangram = Instr(string$, chr$(i))
If isPangram = 0 Then Exit Function
Next i
End Function
```
## Logo
```logo
to remove.all :s :set
if empty? :s [output :set]
if word? :s [output remove.all butfirst :s remove first :s :set]
output remove.all butfirst :s remove.all first :s :set
end
to pangram? :s
output empty? remove.all :s "abcdefghijklmnopqrstuvwxyz
end
show pangram? [The five boxing wizards jump quickly.] ; true
```
## Lua
```lua
require"lpeg"
S, C = lpeg.S, lpeg.C
function ispangram(s)
return #(C(S(s)^0):match"abcdefghijklmnopqrstuvwxyz") == 26
end
print(ispangram"waltz, bad nymph, for quick jigs vex")
print(ispangram"bobby")
print(ispangram"long sentence")
```
## Maple
```Maple
#Used built-in StringTools package
is_pangram := proc(str)
local present := StringTools:-LowerCase~(select(StringTools:-HasAlpha, StringTools:-Explode(str)));
local alphabets := {"a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"};
present := convert(present, set);
return evalb(present = alphabets);
end proc;
```
{{out|Usage}}
<lang>is_pangram("The quick brown fox jumps over the lazy dog.");
is_pangram("The 2 QUIck brown foxes jumped over the lazy DOG!!");
is_pangram(""The quick brown fox jumps over the lay dog.");
```
{{out|Output}}
```txt
true
true
false
```
## Mathematica
```Mathematica
pangramQ[msg_]:=Complement[CharacterRange["a", "z"], Characters[ToLowerCase[msg]]]=== {}
```
Usage:
```txt
pangramQ["The quick brown fox jumps over the lazy dog."]
True
```
Or a slightly more verbose version that outputs the missing characters if the string is not a pangram:
```Mathematica
pangramQ[msg_] :=
Function[If[# === {}, Print["The string is a pangram!"],
Print["The string is not a pangram. It's missing the letters " <>
ToString[#]]]][
Complement[CharacterRange["a", "z"], Characters[ToLowerCase[msg]]]]
```
Usage:
```txt
pangramQ["The quick brown fox jumps over the lazy dog."]
The string is a pangram!
```
```txt
pangramQ["Not a pangram"]
The string is not a pangram. It's missing the letters {b, c, d, e, f, h, i, j, k, l, q, s, u, v, w, x, y, z}
```
## MATLAB
```MATLAB
function trueFalse = isPangram(string)
%This works by histogramming the ascii character codes for lower case
%letters contained in the string (which is first converted to all
%lower case letters). Then it finds the index of the first letter that
%is not contained in the string (this is faster than using the find
%without the second parameter). If the find returns an empty array then
%the original string is a pangram, if not then it isn't.
trueFalse = isempty(find( histc(lower(string),(97:122))==0,1 ));
end
```
{{out}}
```MATLAB
isPangram('The quick brown fox jumps over the lazy dog.')
ans =
1
```
## MiniScript
```MiniScript
sentences = ["The quick brown fox jumps over the lazy dog.",
"Peter Piper picked a peck of pickled peppers.",
"Waltz job vexed quick frog nymphs."]
alphabet = "abcdefghijklmnopqrstuvwxyz"
pangram = function (toCheck)
sentence = toCheck.lower
fail = false
for c in alphabet
if sentence.indexOf(c) == null then return false
end for
return true
end function
for sentence in sentences
if pangram(sentence) then
print """" + sentence + """ is a Pangram"
else
print """" + sentence + """ is not a Pangram"
end if
end for
```
{{out}}
```txt
"The quick brown fox jumps over the lazy dog." is a Pangram
"Peter Piper picked a peck of pickled peppers." is not a Pangram
"Waltz job vexed quick frog nymphs." is a Pangram
```
## NetRexx
NetRexx's <code>verify</code> built–in method is all you need!
```NetRexx
/* NetRexx */
options replace format comments java crossref savelog symbols nobinary
A2Z = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
pangrams = create_samples
loop p_ = 1 to pangrams[0]
pangram = pangrams[p_]
q_ = A2Z.verify(pangram.upper) -- <= it basically all happens in this function call!
say pangram.left(64)'\-'
if q_ == 0 then -
say ' [OK, a pangram]'
else -
say ' [Not a pangram. Missing:' A2Z.substr(q_, 1)']'
end p_
method create_samples public static returns Rexx
pangrams = ''
x_ = 0
x_ = x_ + 1; pangrams[0] = x_; pangrams[x_] = 'The quick brown fox jumps over a lazy dog.' -- best/shortest pangram
x_ = x_ + 1; pangrams[0] = x_; pangrams[x_] = 'The quick brown fox jumps over the lazy dog.' -- not as short but at least it's still a pangram
x_ = x_ + 1; pangrams[0] = x_; pangrams[x_] = 'The quick brown fox jumped over the lazy dog.' -- common misquote; not a pangram
x_ = x_ + 1; pangrams[0] = x_; pangrams[x_] = 'The quick onyx goblin jumps over the lazy dwarf.'
x_ = x_ + 1; pangrams[0] = x_; pangrams[x_] = 'Bored? Craving a pub quiz fix? Why, just come to the Royal Oak!' -- (Used to advertise a pub quiz in Bowness-on-Windermere)
return pangrams
```
{{out}}
<pre style="overflow:scroll">
The quick brown fox jumps over a lazy dog. [OK, a pangram]
The quick brown fox jumps over the lazy dog. [OK, a pangram]
The quick brown fox jumped over the lazy dog. [Not a pangram. Missing: S]
The quick onyx goblin jumps over the lazy dwarf. [OK, a pangram]
Bored? Craving a pub quiz fix? Why, just come to the Royal Oak! [OK, a pangram]
```
## NewLISP
```newlisp
(context 'PGR) ;; Switch to context (say namespace) PGR
(define (is-pangram? str)
(setf chars (explode (upper-case str))) ;; Uppercase + convert string into a list of chars
(setf is-pangram-status true) ;; Default return value of function
(for (c (char "A") (char "Z") 1 (nil? is-pangram-status)) ;; For loop with break condition
(if (not (find (char c) chars)) ;; If char not found in list, "is-pangram-status" becomes "nil"
(setf is-pangram-status nil)
)
)
is-pangram-status ;; Return current value of symbol "is-pangram-status"
)
(context 'MAIN) ;; Back to MAIN context
;; - - - - - - - - - -
(println (PGR:is-pangram? "abcdefghijklmnopqrstuvwxyz")) ;; Print true
(println (PGR:is-pangram? "abcdef")) ;; Print nil
(exit)
```
## Nim
```nim
import rdstdin
proc isPangram(sentence: string, alphabet = {'a'..'z'}): bool =
var sentset: set[char] = {}
for c in sentence: sentset.incl c
alphabet <= sentset
echo isPangram(readLineFromStdin "Sentence: ")
```
Example usage:
```txt
Sentence: The quick brown fox jumps over the lazy dog
true
```
## Objeck
{{trans|Java}}
```objeck
bundle Default {
class Pangram {
function : native : IsPangram(test : String) ~ Bool {
for(a := 'A'; a <= 'Z'; a += 1;) {
if(test->Find(a) < 0 & test->Find(a->ToLower()) < 0) {
return false;
};
};
return true;
}
function : Main(args : String[]) ~ Nil {
IsPangram("the quick brown fox jumps over the lazy dog")->PrintLine(); # true
IsPangram("the quick brown fox jumped over the lazy dog")->PrintLine(); # false, no s
IsPangram("ABCDEFGHIJKLMNOPQRSTUVWXYZ")->PrintLine(); # true
IsPangram("ABCDEFGHIJKLMNOPQSTUVWXYZ")->PrintLine(); # false, no r
IsPangram("ABCDEFGHIJKL.NOPQRSTUVWXYZ")->PrintLine(); # false, no m
IsPangram("ABC.D.E.FGHI*J/KL-M+NO*PQ R\nSTUVWXYZ")->PrintLine(); # true
IsPangram("")->PrintLine(); # false
}
}
}
```
## OCaml
```ocaml
let pangram str =
let ar = Array.make 26 false in
String.iter (function
| 'a'..'z' as c -> ar.(Char.code c - Char.code 'a') <- true
| _ -> ()
) (String.lowercase str);
Array.fold_left ( && ) true ar
```
```ocaml
let check str =
Printf.printf " %b -- %s\n" (pangram str) str
let () =
check "this is a sentence";
check "The quick brown fox jumps over the lazy dog.";
;;
```
{{out}}
false -- this is a sentence
true -- The quick brown fox jumps over the lazy dog.
=={{header|MATLAB}} / {{header|Octave}}==
```matlab
function trueFalse = isPangram(string)
% X is a histogram of letters
X = sparse(abs(lower(string)),1,1,128,1);
trueFalse = full(all(X('a':'z') > 0));
end
```
{{out}}
```txt
>>isPangram('The quick brown fox jumps over the lazy dog.')
ans = 1
```
## min
{{works with|min|0.19.3}}
```min
"abcdefghijklmnopqrstuvwxyz" "" split =alphabet
('alphabet dip lowercase (swap match) prepend all?) :pangram?
"The quick brown fox jumps over the lazy dog." pangram? puts
```
## ML
=
## mLite
=
```ocaml
fun to_locase s = implode ` map (c_downcase) ` explode s
fun is_pangram
(h :: t, T) =
let
val flen = len (filter (fn c = c eql h) T)
in
if (flen = 0) then
false
else
is_pangram (t, T)
end
| ([], T) = true
| S = is_pangram (explode "abcdefghijklmnopqrstuvwxyz", explode ` to_locase S)
fun is_pangram_i
(h :: t, T) =
let
val flen = len (filter (fn c = c eql h) T)
in
if (flen = 0) then
false
else
is_pangram (t, T)
end
| ([], T) = true
| (A,S) = is_pangram (explode A, explode ` to_locase S)
fun test (f, arg, res, ok, notok) = if (f arg eql res) then ("'" @ arg @ "' " @ ok) else ("'" @ arg @ "' " @ notok)
fun test2 (f, arg, res, ok, notok) = if (f arg eql res) then ("'" @ ref (arg,1) @ "' " @ ok) else ("'" @ ref (arg,1) @ "' " @ notok)
;
println ` test (is_pangram, "The quick brown fox jumps over the lazy dog", true, "is a pangram", "is not a pangram");
println ` test (is_pangram, "abcdefghijklopqrstuvwxyz", true, "is a pangram", "is not a pangram");
val SValphabet = "abcdefghijklmnopqrstuvwxyzåäö";
val SVsentence = "Yxskaftbud, ge vår wczonmö iq hjälp";
println ` test2 (is_pangram_i, (SValphabet, SVsentence), true, "is a Swedish pangram", "is not a Swedish pangram");
```
{{out}}
```txt
'The quick brown fox jumps over the lazy dog' is a pangram
'abcdefghijklopqrstuvwxyz' is not a pangram
'Yxskaftbud, ge vår wczonmö iq hjälp' is a Swedish pangram
```
## Oz
```oz
declare
fun {IsPangram Xs}
{List.sub
{List.number &a &z 1}
{Sort {Map Xs Char.toLower} Value.'<'}}
end
in
{Show {IsPangram "The quick brown fox jumps over the lazy dog."}}
```
## PARI/GP
```parigp
pangram(s)={
s=vecsort(Vec(s),,8);
for(i=97,122,
if(!setsearch(s,Strchr(i)) && !setsearch(s,Strchr(i-32)),
return(0)
)
);
1
};
pangram("The quick brown fox jumps over the lazy dog.")
pangram("The quick brown fox jumps over the lazy doe.")
```
## Pascal
See [[Pangram_checker#Delphi | Delphi]]
## Perl
Get an answer with a module, or without.
```perl
use strict;
use warnings;
use feature 'say';
sub pangram1 {
my($str,@set) = @_;
use List::MoreUtils 'all';
all { $str =~ /$_/i } @set;
}
sub pangram2 {
my($str,@set) = @_;
'' eq (join '',@set) =~ s/[$str]//gir;
}
my @alpha = 'a' .. 'z';
for (
'Cozy Lummox Gives Smart Squid Who Asks For Job Pen.',
'Crabby Lummox Gives Smart Squid Who Asks For Job Pen.'
) {
say pangram1($_,@alpha) ? 'Yes' : 'No';
say pangram2($_,@alpha) ? 'Yes' : 'No';
}
```
{{out}}
```txt
Yes
Yes
No
No
```
## Perl 6
```perl6
constant Eng = set 'a' .. 'z';
constant Cyr = set <а б в г д е ж з и й к л м н о п р с т у ф х ц ч ш щ ъ ы ь э ю я ё>;
constant Hex = set 'a' .. 'f';
sub pangram($str, Set $alpha = Eng) {
$alpha ⊆ $str.lc.comb;
}
say pangram("The quick brown fox jumps over the lazy dog.");
say pangram("My dog has fleas.");
say pangram("My dog has fleas.", Hex);
say pangram("My dog backs fleas.", Hex);
say pangram "Съешь же ещё этих мягких французских булок, да выпей чаю", Cyr;
```
{{out}}
```txt
True
False
False
True
True
```
## Phix
```Phix
function pangram(string s)
sequence az = repeat(false,26)
integer count = 0
for i=1 to length(s) do
integer ch = lower(s[i])
if ch>='a'
and ch<='z'
and not az[ch-96] then
count += 1
if count=26 then return {true,0} end if
az[ch-96] = true
end if
end for
return {false,find(false,az)+96}
end function
sequence checks = {"The quick brown fox jumped over the lazy dog",
"The quick brown fox jumps over the lazy dog",
".!$\"AbCdEfghijklmnoprqstuvwxyz",
"THE FIVE BOXING WIZARDS DUMP QUICKLY.",
"THE FIVE BOXING WIZARDS JUMP QUICKLY.",
"HEAVY BOXES PERFORM WALTZES AND JIGS.",
"PACK MY BOX WITH FIVE DOZEN LIQUOR JUGS.",
"Big fjiords vex quick waltz nymph",
"The quick onyx goblin jumps over the lazy dwarf.",
"no"}
for i=1 to length(checks) do
string ci = checks[i]
integer {r,ch} = pangram(ci)
printf(1,"%-50s - %s\n",{ci,iff(r?"yes":"no "&ch)})
end for
```
{{out}}
```txt
The quick brown fox jumped over the lazy dog - no s
The quick brown fox jumps over the lazy dog - yes
.!$"AbCdEfghijklmnoprqstuvwxyz - yes
THE FIVE BOXING WIZARDS DUMP QUICKLY. - no j
THE FIVE BOXING WIZARDS JUMP QUICKLY. - yes
HEAVY BOXES PERFORM WALTZES AND JIGS. - no c
PACK MY BOX WITH FIVE DOZEN LIQUOR JUGS. - yes
Big fjiords vex quick waltz nymph - yes
The quick onyx goblin jumps over the lazy dwarf. - yes
no - no a
```
## PicoLisp
```PicoLisp
(de isPangram (Str)
(not
(diff
'`(chop "abcdefghijklmnopqrstuvwxyz")
(chop (lowc Str)) ) ) )
```
## PHP
{{trans|D}}
```php
function isPangram($text) {
foreach (str_split($text) as $c) {
if ($c >= 'a' && $c <= 'z')
$bitset |= (1 << (ord($c) - ord('a')));
else if ($c >= 'A' && $c <= 'Z')
$bitset |= (1 << (ord($c) - ord('A')));
}
return $bitset == 0x3ffffff;
}
$test = array(
"the quick brown fox jumps over the lazy dog",
"the quick brown fox jumped over the lazy dog",
"ABCDEFGHIJKLMNOPQSTUVWXYZ",
"ABCDEFGHIJKL.NOPQRSTUVWXYZ",
"ABC.D.E.FGHI*J/KL-M+NO*PQ R\nSTUVWXYZ"
);
foreach ($test as $str)
echo "$str : ", isPangram($str) ? 'T' : 'F', '</br>';
```
```txt
the quick brown fox jumps over the lazy dog : T
the quick brown fox jumped over the lazy dog : F
ABCDEFGHIJKLMNOPQSTUVWXYZ : F
ABCDEFGHIJKL.NOPQRSTUVWXYZ : F
ABC.D.E.FGHI*J/KL-M+NO*PQ R STUVWXYZ : T
```
Using array
```php
function is_pangram( $sentence ) {
// define "alphabet"
$alpha = range( 'a', 'z' );
// split lowercased string into array
$a_sentence = str_split( strtolower( $sentence ) );
// check that there are no letters present in alpha not in sentence
return empty( array_diff( $alpha, $a_sentence ) );
}
$tests = array(
"The quick brown fox jumps over the lazy dog.",
"The brown fox jumps over the lazy dog.",
"ABCDEFGHIJKL.NOPQRSTUVWXYZ",
"ABC.D.E.FGHI*J/KL-M+NO*PQ R\nSTUVWXYZ",
"How vexingly quick daft zebras jump",
"Is hotdog?",
"How razorback-jumping frogs can level six piqued gymnasts!"
);
foreach ( $tests as $txt ) {
echo '"', $txt, '"', PHP_EOL;
echo is_pangram( $txt ) ? "Yes" : "No", PHP_EOL, PHP_EOL;
}
```
{{Out}}
```txt
"The quick brown fox jumps over the lazy dog."
Yes
"The brown fox jumps over the lazy dog."
No
"ABCDEFGHIJKL.NOPQRSTUVWXYZ"
No
"ABC.D.E.FGHI*J/KL-M+NO*PQ R
STUVWXYZ"
Yes
"How vexingly quick daft zebras jump"
Yes
"Is hotdog?"
No
"How razorback-jumping frogs can level six piqued gymnasts!"
Yes
```
## PL/I
```PL/I
test_pangram: procedure options (main);
is_pangram: procedure() returns (bit(1) aligned);
declare text character (200) varying;
declare c character (1);
get edit (text) (L);
put skip list (text);
text = lowercase(text);
do c = 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k',
'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u',
'v', 'w', 'x', 'y', 'z';
if index(text, c) = 0 then return ('0'b);
end;
return ('1'b);
end is_pangram;
put skip list ('Please type a sentence');
if is_pangram() then
put skip list ('The sentence is a pangram.');
else
put skip list ('The sentence is not a pangram.');
end test_pangram;
```
{{out}}
```txt
Please type a sentence
the quick brown fox jumps over the lazy dog
The sentence is a pangram.
```
## PowerShell
Cyrillic test sample borrowed from Perl 6.
{{works with|PowerShell|2}}
```PowerShell
function Test-Pangram ( [string]$Text, [string]$Alphabet = 'abcdefghijklmnopqrstuvwxyz' )
{
$Text = $Text.ToLower()
$Alphabet = $Alphabet.ToLower()
$IsPangram = @( $Alphabet.ToCharArray() | Where-Object { $Text.Contains( $_ ) } ).Count -eq $Alphabet.Length
return $IsPangram
}
Test-Pangram 'The quick brown fox jumped over the lazy dog.'
Test-Pangram 'The quick brown fox jumps over the lazy dog.'
Test-Pangram 'Съешь же ещё этих мягких французских булок, да выпей чаю' 'абвгдежзийклмнопрстуфхцчшщъыьэюяё'
```
{{out}}
```txt
False
True
True
```
A faster version can be created using .Net HashSet to do what the F# version does:
```PowerShell
Function Test-Pangram ( [string]$Text, [string]$Alphabet = 'abcdefghijklmnopqrstuvwxyz' )
{
$alSet = [Collections.Generic.HashSet[char]]::new($Alphabet.ToLower())
$textSet = [Collections.Generic.HashSet[char]]::new($Text.ToLower())
$alSet.ExceptWith($textSet) # remove text chars from the alphabet
return $alSet.Count -eq 0 # any alphabet letters still remaining?
}
```
## Prolog
Works with SWI-Prolog
```Prolog
pangram(L) :-
numlist(0'a, 0'z, Alphabet),
forall(member(C, Alphabet), member(C, L)).
pangram_example :-
L1 = "the quick brown fox jumps over the lazy dog",
( pangram(L1) -> R1= ok; R1 = ko),
format('~s --> ~w ~n', [L1,R1]),
L2 = "the quick brown fox jumped over the lazy dog",
( pangram(L2) -> R2 = ok; R2 = ko),
format('~s --> ~w ~n', [L2, R2]).
```
{{out}}
```txt
?- pangram_example.
the quick brown fox jumps over the lazy dog --> ok
the quick brown fox jumped over the lazy dog --> ko
true.
```
## PureBasic
```PureBasic
Procedure IsPangram_fast(String$)
String$ = LCase(string$)
char_a=Asc("a")
; sets bits in a variable if a letter is found, reads string only once
For a = 1 To Len(string$)
char$ = Mid(String$, a, 1)
pos = Asc(char$) - char_a
check.l | 1 << pos
Next
If check & $3FFFFFF = $3FFFFFF
ProcedureReturn 1
EndIf
ProcedureReturn 0
EndProcedure
Procedure IsPangram_simple(String$)
String$ = LCase(string$)
found = 1
For a = Asc("a") To Asc("z")
; searches for every letter in whole string
If FindString(String$, Chr(a), 0) = 0
found = 0
EndIf
Next
ProcedureReturn found
EndProcedure
Debug IsPangram_fast("The quick brown fox jumps over lazy dogs.")
Debug IsPangram_simple("The quick brown fox jumps over lazy dogs.")
Debug IsPangram_fast("No pangram")
Debug IsPangram_simple("No pangram")
```
## Python
Using set arithmetic:
```python
import string, sys
if sys.version_info[0] < 3:
input = raw_input
def ispangram(sentence, alphabet=string.ascii_lowercase):
alphaset = set(alphabet)
return alphaset <= set(sentence.lower())
print ( ispangram(input('Sentence: ')) )
```
{{out}}
```txt
Sentence: The quick brown fox jumps over the lazy dog
True
```
## R
Using the built-in R vector "letters":
```R
checkPangram <- function(sentence){
my.letters <- tolower(unlist(strsplit(sentence, "")))
is.pangram <- all(letters %in% my.letters)
if (is.pangram){
cat("\"", sentence, "\" is a pangram! \n", sep="")
} else {
cat("\"", sentence, "\" is not a pangram! \n", sep="")
}
}
```
{{out}}
```txt
s1 <- "The quick brown fox jumps over the lazy dog"
s2 <- "The quick brown fox jumps over the sluggish dog"
checkPangram(s1)
"The quick brown fox jumps over the lazy dog" is a pangram!
checkPangram(s2)
"The quick brown fox jumps over the sluggish dog" is not a pangram!
```
## Racket
```Racket
#lang racket
(define (pangram? str)
(define chars (regexp-replace* #rx"[^a-z]+" (string-downcase str) ""))
(= 26 (length (remove-duplicates (string->list chars)))))
(pangram? "The quick Brown Fox jumps over the Lazy Dog")
```
## Retro
```Retro
: isPangram? ( $-f )
^strings'toLower
heap [ 27 allot ] preserve
[ @ 'a - dup 0 25 within [ [ 'a + ] [ here + ] bi ! ] &drop if ]
^types'STRING each@ here "abcdefghijklmnopqrstuvwxyz" compare ;
```
## REXX
```REXX
/*REXX program verifies if an entered/supplied string (sentence) is a pangram. */
@abc= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' /*a list of all (Latin) capital letters*/
do forever; say /*keep promoting 'til null (or blanks).*/
say '──────── Please enter a pangramic sentence (or a blank to quit):'; say
pull y /*this also uppercases the Y variable.*/
if y='' then leave /*if nothing entered, then we're done.*/
absent= space( translate( @abc, , y), 0) /*obtain a list of any absent letters. */
if absent=='' then say "──────── Sentence is a pangram."
else say "──────── Sentence isn't a pangram, missing: " absent
say
end /*forever*/
say '──────── PANGRAM program ended. ────────' /*stick a fork in it, we're all done. */
```
{{out|output|:}}
```txt
──────── Please enter a pangramic sentence (or a blank to quit):
The quick brown fox jumped over the lazy dog. ◄■■■■■■■■■■ user input.
──────── Sentence isn't a pangram, missing: S
──────── Please enter a pangramic sentence (or a blank to quit):
The quick brown fox JUMPS over the lazy dog!!! ◄■■■■■■■■■■ user input.
──────── Sentence is a pangram.
──────── Please enter a pangramic sentence (or a blank to quit):
◄■■■■■■■■■■ user input (null or some blanks).
──────── PANGRAM program ended. ────────
```
## Ring
```ring
pangram = 0
s = "The quick brown fox jumps over the lazy dog."
see "" + pangram(s) + " " + s + nl
s = "My dog has fleas."
see "" + pangram(s) + " " + s + nl
func pangram str
str = lower(str)
for i = ascii("a") to ascii("z")
bool = substr(str, char(i)) > 0
pangram = pangram + bool
next
pan = (pangram = 26)
return pan
```
## Ruby
```ruby
def pangram?(sentence)
('a'..'z').all? {|chars| sentence.downcase.include? (chars) }
end
p pangram?('this is a sentence') # ==> false
p pangram?('The quick brown fox jumps over the lazy dog.') # ==> true
```
## Run BASIC
```runbasic
s$ = "The quick brown fox jumps over the lazy dog."
Print pangram(s$);" ";s$
s$ = "My dog has fleas."
Print pangram(s$);" ";s$
function pangram(str$)
str$ = lower$(str$)
for i = asc("a") to asc("z")
pangram = pangram + (instr(str$, chr$(i)) <> 0)
next i
pangram = (pangram = 26)
end function
```
```txt
1 The quick brown fox jumps over the lazy dog.
0 My dog has fleas.
```
## Rust
```rust
#![feature(test)]
extern crate test;
use std::collections::HashSet;
pub fn is_pangram_via_bitmask(s: &str) -> bool {
// Create a mask of set bits and convert to false as we find characters.
let mut mask = (1 << 26) - 1;
for chr in s.chars() {
let val = chr as u32 & !0x20; /* 0x20 converts lowercase to upper */
if val <= 'Z' as u32 && val >= 'A' as u32 {
mask = mask & !(1 << (val - 'A' as u32));
}
}
mask == 0
}
pub fn is_pangram_via_hashset(s: &str) -> bool {
// Insert lowercase letters into a HashSet, then check if we have at least 26.
let letters = s.chars()
.flat_map(|chr| chr.to_lowercase())
.filter(|&chr| chr >= 'a' && chr <= 'z')
.fold(HashSet::new(), |mut letters, chr| {
letters.insert(chr);
letters
});
letters.len() == 26
}
pub fn is_pangram_via_sort(s: &str) -> bool {
// Copy chars into a vector, convert to lowercase, sort, and remove duplicates.
let mut chars: Vec<char> = s.chars()
.flat_map(|chr| chr.to_lowercase())
.filter(|&chr| chr >= 'a' && chr <= 'z')
.collect();
chars.sort();
chars.dedup();
chars.len() == 26
}
fn main() {
let examples = ["The quick brown fox jumps over the lazy dog",
"The quick white cat jumps over the lazy dog"];
for &text in examples.iter() {
let is_pangram_sort = is_pangram_via_sort(text);
println!("Is \"{}\" a pangram via sort? - {}", text, is_pangram_sort);
let is_pangram_bitmask = is_pangram_via_bitmask(text);
println!("Is \"{}\" a pangram via bitmask? - {}",
text,
is_pangram_bitmask);
let is_pangram_hashset = is_pangram_via_hashset(text);
println!("Is \"{}\" a pangram via bitmask? - {}",
text,
is_pangram_hashset);
}
}
```
## Scala
```scala
def is_pangram(sentence: String) = sentence.toLowerCase.filter(c => c >= 'a' && c <= 'z').toSet.size == 26
```
```scala
scala> is_pangram("This is a sentence")
res0: Boolean = false
scala> is_pangram("The quick brown fox jumps over the lazy dog")
res1: Boolean = true
```
## Seed7
```seed7
$ include "seed7_05.s7i";
const func boolean: isPangram (in string: stri) is func
result
var boolean: isPangram is FALSE;
local
var char: ch is ' ';
var set of char: usedChars is (set of char).value;
begin
for ch range lower(stri) do
if ch in {'a' .. 'z'} then
incl(usedChars, ch);
end if;
end for;
isPangram := usedChars = {'a' .. 'z'};
end func;
const proc: main is func
begin
writeln(isPangram("This is a test"));
writeln(isPangram("The quick brown fox jumps over the lazy dog"));
writeln(isPangram("NOPQRSTUVWXYZ abcdefghijklm"));
writeln(isPangram("abcdefghijklopqrstuvwxyz")); # Missing m, n
end func;
```
{{out}}
```txt
FALSE
TRUE
TRUE
FALSE
```
## Sidef
{{trans|Perl 6}}
```ruby
define Eng = 'a'..'z';
define Hex = 'a'..'f';
define Cyr = %w(а б в г д е ж з и й к л м н о п р с т у ф х ц ч ш щ ъ ы ь э ю я ё);
func pangram(str, alpha=Eng) {
var lstr = str.lc;
alpha.all {|c| lstr.contains(c) };
}
say pangram("The quick brown fox jumps over the lazy dog.");
say pangram("My dog has fleas.");
say pangram("My dog has fleas.", Hex);
say pangram("My dog backs fleas.", Hex);
say pangram("Съешь же ещё этих мягких французских булок, да выпей чаю", Cyr);
```
{{out}}
```txt
true
false
false
true
true
```
## Smalltalk
```smalltalk
!String methodsFor: 'testing'!
isPangram
^((self collect: [:c | c asUppercase]) select: [:c | c >= $A and: [c <= $Z]]) asSet size = 26
```
```smalltalk
'The quick brown fox jumps over the lazy dog.' isPangram
```
## SNOBOL4
{{works with|Macro Spitbol}}
{{works with|Snobol4+}}
{{works with|CSnobol}}
```SNOBOL4
define('pangram(str)alfa,c') :(pangram_end)
pangram str = replace(str,&ucase,&lcase)
alfa = &lcase
pgr_1 alfa len(1) . c = :f(return)
str c :s(pgr_1)f(freturn)
pangram_end
define('panchk(str)tf') :(panchk_end)
panchk output = str
tf = 'False'; tf = pangram(str) 'True'
output = 'Pangram: ' tf :(return)
panchk_end
* # Test and display
panchk("The quick brown fox jumped over the lazy dogs.")
panchk("My girl wove six dozen plaid jackets before she quit.")
panchk("This 41-character string: it's a pangram!")
end
```
{{out}}
```txt
The quick brown fox jumped over the lazy dogs.
Pangram: True
My girl wove six dozen plaid jackets before she quit.
Pangram: True
This 41-character string: it's a pangram!
Pangram: False
```
## Swift
```Swift
import Foundation
let str = "the quick brown fox jumps over the lazy dog"
func isPangram(str:String) -> Bool {
let stringArray = Array(str.lowercaseString)
for char in "abcdefghijklmnopqrstuvwxyz" {
if (find(stringArray, char) == nil) {
return false
}
}
return true
}
isPangram(str) // True
isPangram("Test string") // False
```
Swift 2.0:
```swift
func isPangram(str: String) -> Bool {
let (char, alph) = (Set(str.characters), "abcdefghijklmnopqrstuvwxyz".characters)
return !alph.contains {!char.contains($0)}
}
```
## Tcl
```tcl
proc pangram? {sentence} {
set letters [regexp -all -inline {[a-z]} [string tolower $sentence]]
expr {
[llength [lsort -unique $letters]] == 26
}
}
puts [pangram? "This is a sentence"]; # ==> false
puts [pangram? "The quick brown fox jumps over the lazy dog."]; # ==> true
```
=={{header|TI-83 BASIC}}==
```ti83b
:Prompt Str1
:For(L,1,26
:If not(inString(Str1,sub("ABCDEFGHIJKLMNOPQRSTUVWXYZ",L,1))
:L=28
:End
:If L<28
:Disp "IS A PANGRAM"
```
(not tested yet)
## TUSCRIPT
```tuscript
$$ MODE TUSCRIPT,{}
alfabet="abcdefghijklmnopqrstuvwxyz"
sentences = *
DATA The quick brown fox jumps over the lazy dog
DATA the quick brown fox falls over the lazy dog
LOOP s=sentences
getchars =STRINGS (s," {&a} ")
sortchars =ALPHA_SORT (getchars)
reducechars =REDUCE (sortchars)
chars_in_s =EXCHANGE (reducechars," ' ")
IF (chars_in_s==alfabet) PRINT " pangram: ",s
IF (chars_in_s!=alfabet) PRINT "no pangram: ",s
ENDLOOP
```
{{out}}
```txt
pangram: The quick brown fox jumps over the lazy dog
no pangram: the quick brown fox falls over the lazy dog
```
## TXR
```txr
@/.*[Aa].*&.*[Bb].*&.*[Cc].*&.*[Dd].*& \
.*[Ee].*&.*[Ff].*&.*[Gg].*&.*[Hh].*& \
.*[Ii].*&.*[Jj].*&.*[Kk].*&.*[Ll].*& \
.*[Mm].*&.*[Nn].*&.*[Oo].*&.*[Pp].*& \
.*[Qq].*&.*[Rr].*&.*[Ss].*&.*[Tt].*& \
.*[Uu].*&.*[Vv].*&.*[Ww].*&.*[Xx].*& \
.*[Yy].*&.*[Zz].*/
```
{{out|Run}}
```txt
$ echo "The quick brown fox jumped over the lazy dog." | txr is-pangram.txr -
$echo $? # failed termination
1
$ echo "The quick brown fox jumped over the lazy dogs." | txr is-pangram.txr -
$ echo $? # successful termination
0
```
## UNIX Shell
{{works with|Bourne Again SHell}}
```bash
function pangram? {
local alphabet=abcdefghijklmnopqrstuvwxyz
local string="$*"
string="${string,,}"
while [[ -n "$string" && -n "$alphabet" ]]; do
local ch="${string%%${string#?}}"
string="${string#?}"
alphabet="${alphabet/$ch}"
done
[[ -z "$alphabet" ]]
}
```
## Ursala
```Ursala
#import std
is_pangram = ^jZ^(!@l,*+ @rlp -:~&) ~=`A-~ letters
```
example usage:
```Ursala
#cast %bL
test =
is_pangram* <
'The quick brown fox jumps over the lazy dog',
'this is not a pangram'>
```
{{out}}
```txt
<true,false>
```
## VBA
The function pangram() in the VBScript section below will do just fine.
Here is an alternative version:
```vb
Function pangram2(s As String) As Boolean
Const sKey As String = "abcdefghijklmnopqrstuvwxyz"
Dim sLow As String
Dim i As Integer
sLow = LCase(s)
For i = 1 To 26
If InStr(sLow, Mid(sKey, i, 1)) = 0 Then
pangram2 = False
Exit Function
End If
Next
pangram2 = True
End Function
```
Invocation e.g. (typed in the Immediate window):
```txt
print pangram2("the quick brown dog jumps over a lazy fox")
print pangram2("it is time to say goodbye!")
```
## VBScript
### =Implementation=
```vb
function pangram( s )
dim i
dim sKey
dim sChar
dim nOffset
sKey = "abcdefghijklmnopqrstuvwxyz"
for i = 1 to len( s )
sChar = lcase(mid(s,i,1))
if sChar <> " " then
if instr(sKey, sChar) then
nOffset = asc( sChar ) - asc("a") + 1
if nOffset > 1 then
sKey = left(sKey, nOffset - 1) & " " & mid( sKey, nOffset + 1)
else
sKey = " " & mid( sKey, nOffset + 1)
end if
end if
end if
next
pangram = ( ltrim(sKey) = vbnullstring )
end function
function eef( bCond, exp1, exp2 )
if bCond then
eef = exp1
else
eef = exp2
end if
end function
```
### =Invocation=
```vb
wscript.echo eef(pangram("a quick brown fox jumps over the lazy dog"), "is a pangram", "is not a pangram")
wscript.echo eef(pangram(""), "is a pangram", "is not a pangram")"
```
## XPL0
```XPL0
include c:\cxpl\codes; \intrinsic 'code' declarations
string 0; \use zero-terminated strings
func StrLen(Str); \Return number of characters in an ASCIIZ string
char Str;
int I;
for I:= 0 to -1>>1-1 do
if Str(I) = 0 then return I;
func Pangram(S);
char S;
int A, I, C;
[A:= 0;
for I:= 0 to StrLen(S)-1 do
[C:= S(I);
if C>=^A & C<=^Z then C:= C or $20;
if C>=^a & C<=^z then [C:= C - ^a; A:= A or 1<<C];
];
return A = $3FFFFFF;
]; \Pangram
int Sentence, I;
[Sentence:=
["The quick brown fox jumps over the lazy dog.",
"Pack my box with five dozen liquor jugs.",
"Now is the time for all good men to come to the aid of their country."];
for I:= 0 to 3-1 do
[Text(0, if Pangram(Sentence(I)) then "yes" else "no");
CrLf(0);
];
]
```
{{out}}
```txt
yes
yes
no
```
## Yabasic
```Yabasic
sub isPangram$(t$, l1$)
local lt, ll, r$, i, cc, ic
if numparams = 1 then
l1$ = "abcdefghijklmnopqrstuvwxyz"
end if
t$ = lower$(t$)
ll = len(l1$)
for i = 1 to ll
r$ = r$ + " "
next
lt = len(t$)
cc = asc("a")
for i = 1 to lt
ic = asc(mid$(t$, i, 1)) - cc + 1
if ic > 0 and ic <= ll then
mid$(r$, ic, 1) = chr$(ic + cc - 1)
end if
next i
if l1$ = r$ then return "true" else return "false" end if
end sub
print isPangram$("The quick brown fox jumps over the lazy dog.") // --> true
print isPangram$("The quick brown fox jumped over the lazy dog.") // --> false
print isPangram$("ABC.D.E.FGHI*J/KL-M+NO*PQ R\nSTUVWXYZ") // --> true
```
## zkl
```zkl
var letters=["a".."z"].pump(String); //-->"abcdefghijklmnopqrstuvwxyz"
fcn isPangram(text){(not (letters-text.toLower()))}
```
{{out}}
```txt
isPangram("The quick brown fox jumps over the lazy dog.")
True
isPangram("Pack my box with five dozen liquor jugs.")
True
isPangram("Now is the time for all good men to come to the aid of their country.")
False
```
|
{
"pile_set_name": "Github"
}
|
<!--index.wxml-->
<view class="index">
<view class="index-profile">
<open-data type="userAvatarUrl" class="index-profile__img"></open-data>
</view>
<view class="index-title">
{{ title }}
</view>
<view class="index-books">
<view class="index-books__showLayer">
<view class="index-books__item" wx:for="{{ bookList }}" wx:key="{{ index }}">
<view class="index-books__title">书目:</view>
<view class="index-books__controls--show" wx:if="{{ !item.isEditing }}">{{ item.bookName }}
</view>
<view class="index-books__controls--edit-area" wx:else>
<input
type="text"
value="{{ item.bookName }}"
confirm-type="完成"
data-book-id="{{ item.id }}"
bindinput="bindEditBookNameInput"
/>
</view>
<button
class="index-books__controls--edit-btn btn"
type="primary"
data-book-id="{{ item.id }}"
data-index="{{index}}"
bindtap="{{ item.isEditing ? 'updateBook' : 'editBookButtonClicked' }}"
>
{{ item.isEditing ? '保存' : '编辑' }}
</button>
<button
class="index-books__controls--delete btn"
type="warn"
data-book-id="{{ item.id }}"
bindtap="deleteBook"
>
删除
</button>
</view>
</view>
<view class="index-books__input">
<input
type="text"
placeholder="我的床头书"
value="{{ createBookValue }}"
confirm-type="完成"
bindinput="bindCreateBookNameInput"
/>
</view>
<view class="index-books__controls">
<button
class="index-books__controls--create"
bindtap="createBook"
type="primary"
>
添加
</button>
</view>
</view>
</view>
|
{
"pile_set_name": "Github"
}
|
<?xml version="1.0" encoding="UTF-8"?>
<!--
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
* Copyright (C) 2009 - DIGITEO - Vincent COUVERT
*
* Copyright (C) 2012 - 2016 - Scilab Enterprises
*
* This file is hereby licensed under the terms of the GNU GPL v2.0,
* pursuant to article 5.3.4 of the CeCILL v.2.1.
* This file was originally licensed under the terms of the CeCILL v2.1,
* and continues to be available under such terms.
* For more information, see the COPYING file which you should have received
* along with this program.
*
-->
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="m2sci_besselj">
<refnamediv>
<refname>besselj (Matlab function)</refname>
<refpurpose>Bessel functions of the first kind </refpurpose>
</refnamediv>
<refsection>
<title>Matlab/Scilab equivalent</title>
<informaltable border="1" width="100%">
<tr>
<td align="center">
<emphasis role="bold">Matlab</emphasis>
</td>
<td align="center">
<emphasis role="bold">Scilab</emphasis>
</td>
</tr>
<tr>
<td>
<programlisting role="example"><![CDATA[
besselj
]]></programlisting>
</td>
<td>
<programlisting role="example"><![CDATA[
besselj
]]></programlisting>
</td>
</tr>
</informaltable>
</refsection>
<refsection>
<title>Particular cases</title>
<para>
Scilab <emphasis role="bold">besselj</emphasis> function can work with only one output argument, but the Matlab function can work with two outputs arguments.
</para>
</refsection>
<refsection>
<title>Examples</title>
<informaltable border="1" width="100%">
<tr>
<td align="center">
<emphasis role="bold">Matlab</emphasis>
</td>
<td align="center">
<emphasis role="bold">Scilab</emphasis>
</td>
</tr>
<tr>
<td>
<programlisting role="example"><![CDATA[
y = besselj(alpha,x)
y = besselj(alpha,x,1)
[y,ierr] = besselj(alpha,...)
]]></programlisting>
</td>
<td>
<programlisting role="example"><![CDATA[
y = besselj(alpha,x)
y = besselj(alpha,x,ice),ice = 1 or ice = 2
]]></programlisting>
</td>
</tr>
</informaltable>
</refsection>
</refentry>
|
{
"pile_set_name": "Github"
}
|
#%RAML 0.8
title: test API
traits:
- tr:
body:
application/json:
schemas:
- MyType: |
{
"$schema": "http://json-schema.org/draft-04/",
"type": "object",
"properties": {
"arrayProp": {
"items": {
"type": "object", "properties": {
"prop1": { "type": "number" },
"prop2": { "type": "boolean" }
},
"additionalProperties": false
}
}
}
}
/res1:
post:
body:
application/json:
schema: MyType
example: |
{
"arrayProp": [
{
"prop1": 13,
"prop2" : true
}, {
"prop1": 13,
"prop2": false
}
]
}
/res2:
post:
body:
application/json:
schema: MyType
example: |
{
"arrayProp": [
{
"prop1": 13
"prop2": false
} , {
"prop1": 13,
"prop2": false
}
]
}
|
{
"pile_set_name": "Github"
}
|
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="com.jeecms.cms.entity.assist">
<class name="CmsGuestbookExt" table="jc_guestbook_ext">
<meta attribute="sync-DAO">false</meta>
<cache usage="read-write"/>
<id name="id" type="java.lang.Integer" column="guestbook_id">
<generator class="foreign"><param name="property">guestbook</param></generator>
</id>
<property name="title" column="title" type="string" not-null="false" length="255"/>
<property name="content" column="content" type="string" not-null="false"/>
<property name="reply" column="reply" type="string" not-null="false"/>
<property name="email" column="email" type="string" not-null="false" length="100"/>
<property name="phone" column="phone" type="string" not-null="false" length="100"/>
<property name="qq" column="qq" type="string" not-null="false" length="50"/>
<one-to-one name="guestbook" class="CmsGuestbook" constrained="true"/>
</class>
</hibernate-mapping>
|
{
"pile_set_name": "Github"
}
|
<div class="subblock">
<h3><%= t('.owner_tools') %></h3>
<div>
<%= link_to t('.force_update'), act_content_path(action_name: 'manual_refresh'), method: :put, class: "btn info" %>
<%= link_to t('.purge_children'), act_content_path(action_name: 'delete_children'), method: :put, class: "btn info" %>
</div>
</div>
|
{
"pile_set_name": "Github"
}
|
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.3) on Sun Mar 29 22:42:10 IST 2020 -->
<title>Uses of Class com.googlecode.cqengine.quantizer.BigDecimalQuantizer (CQEngine 3.5.0 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2020-03-29">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../jquery/jquery-3.3.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-migrate-3.0.1.js"></script>
<script type="text/javascript" src="../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class com.googlecode.cqengine.quantizer.BigDecimalQuantizer (CQEngine 3.5.0 API)";
}
}
catch(err) {
}
//-->
var pathtoroot = "../../../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../BigDecimalQuantizer.html" title="class in com.googlecode.cqengine.quantizer">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses.html">All Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding"> </div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<main role="main">
<div class="header">
<h2 title="Uses of Class com.googlecode.cqengine.quantizer.BigDecimalQuantizer" class="title">Uses of Class<br>com.googlecode.cqengine.quantizer.BigDecimalQuantizer</h2>
</div>
<div class="classUseContainer">No usage of com.googlecode.cqengine.quantizer.BigDecimalQuantizer</div>
</main>
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../BigDecimalQuantizer.html" title="class in com.googlecode.cqengine.quantizer">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright © 2020. All rights reserved.</small></p>
</footer>
</body>
</html>
|
{
"pile_set_name": "Github"
}
|
{
"acno": "D40572",
"acquisitionYear": 1856,
"additionalImages": [
{
"copyright": null,
"creativeCommons": null,
"filenameBase": "D40572",
"sizes": [
{
"caption": "Enhanced image",
"cleared": true,
"file": "enhanced_images/D405/D40572_E.jpg",
"height": 337,
"resolution": 512,
"size": "large",
"width": 512
}
]
}
],
"all_artists": "Joseph Mallord William Turner",
"catTextResId": 1129878,
"catalogueGroup": {
"accessionRanges": "D05491-D05617; D40568-D40574; D41505",
"completeStatus": "COMPLETE",
"finbergNumber": "XC",
"groupType": "Turner Sketchbook",
"id": 65737,
"shortTitle": "Studies for Pictures: Isleworth Sketchbook"
},
"classification": "on paper, unique",
"contributorCount": 1,
"contributors": [
{
"birthYear": 1775,
"date": "1775\u20131851",
"displayOrder": 1,
"fc": "Joseph Mallord William Turner",
"gender": "Male",
"id": 558,
"mda": "Turner, Joseph Mallord William",
"role": "artist",
"startLetter": "T"
}
],
"creditLine": "Accepted by the nation as part of the Turner Bequest 1856",
"dateRange": {
"endYear": 1805,
"startYear": 1805,
"text": "1805"
},
"dateText": "1805",
"depth": "",
"dimensions": "support: 150 x 258 mm",
"finberg": null,
"foreignTitle": null,
"groupTitle": "Studies for Pictures: Isleworth Sketchbook",
"height": "258",
"id": 64321,
"inscription": null,
"medium": "Pen and ink on paper",
"movementCount": 0,
"pageNumber": 98,
"subjectCount": 1,
"subjects": {
"children": [
{
"children": [
{
"children": [
{
"id": 1827,
"name": "tree"
}
],
"id": 1809,
"name": "trees"
}
],
"id": 60,
"name": "nature"
}
],
"id": 1,
"name": "subject"
},
"thumbnailCopyright": null,
"thumbnailUrl": "http://www.tate.org.uk/art/images/work/D/D40/D40572_8.jpg",
"title": "A View on the Thames",
"units": "mm",
"url": "http://www.tate.org.uk/art/artworks/turner-a-view-on-the-thames-d40572",
"width": "150"
}
|
{
"pile_set_name": "Github"
}
|
The direct utility estimation method in
Section <a class="sectionRef" title="" href="#">passive-rl-section</a> uses distinguished terminal
states to indicate the end of a trial. How could it be modified for
environments with discounted rewards and no terminal states?
|
{
"pile_set_name": "Github"
}
|
/**
* Buttons
* --------------------------------------------------
*/
.button {
// set the color defaults
@include button-style($button-default-bg, $button-default-border, $button-default-active-bg, $button-default-active-border, $button-default-text);
position: relative;
display: inline-block;
margin: 0;
padding: 0 $button-padding;
min-width: ($button-padding * 3) + $button-font-size;
min-height: $button-height + 5px;
border-width: $button-border-width;
border-style: solid;
border-radius: $button-border-radius;
vertical-align: top;
text-align: center;
text-overflow: ellipsis;
font-size: $button-font-size;
line-height: $button-height - $button-border-width + 1px;
cursor: pointer;
&:after {
// used to create a larger button "hit" area
position: absolute;
top: -6px;
right: -6px;
bottom: -6px;
left: -6px;
content: ' ';
}
.icon {
vertical-align: top;
pointer-events: none;
}
.icon:before,
&.icon:before,
&.icon-left:before,
&.icon-right:before {
display: inline-block;
padding: 0 0 $button-border-width 0;
vertical-align: inherit;
font-size: $button-icon-size;
line-height: $button-height - $button-border-width;
pointer-events: none;
}
&.icon-left:before {
float: left;
padding-right: .2em;
padding-left: 0;
}
&.icon-right:before {
float: right;
padding-right: 0;
padding-left: .2em;
}
&.button-block, &.button-full {
margin-top: $button-block-margin;
margin-bottom: $button-block-margin;
}
&.button-light {
@include button-style($button-light-bg, $button-default-border, $button-light-active-bg, $button-default-active-border, $button-light-text);
@include button-clear($button-light-border);
@include button-outline($button-light-border);
}
&.button-stable {
@include button-style($button-stable-bg, $button-default-border, $button-stable-active-bg, $button-default-active-border, $button-stable-text);
@include button-clear($button-stable-border);
@include button-outline($button-stable-border);
}
&.button-positive {
@include button-style($button-positive-bg, $button-default-border, $button-positive-active-bg, $button-default-active-border, $button-positive-text);
@include button-clear($button-positive-bg);
@include button-outline($button-positive-bg);
}
&.button-calm {
@include button-style($button-calm-bg, $button-default-border, $button-calm-active-bg, $button-default-active-border, $button-calm-text);
@include button-clear($button-calm-bg);
@include button-outline($button-calm-bg);
}
&.button-assertive {
@include button-style($button-assertive-bg, $button-default-border, $button-assertive-active-bg, $button-default-active-border, $button-assertive-text);
@include button-clear($button-assertive-bg);
@include button-outline($button-assertive-bg);
}
&.button-balanced {
@include button-style($button-balanced-bg, $button-default-border, $button-balanced-active-bg, $button-default-active-border, $button-balanced-text);
@include button-clear($button-balanced-bg);
@include button-outline($button-balanced-bg);
}
&.button-energized {
@include button-style($button-energized-bg, $button-default-border, $button-energized-active-bg, $button-default-active-border, $button-energized-text);
@include button-clear($button-energized-bg);
@include button-outline($button-energized-bg);
}
&.button-royal {
@include button-style($button-royal-bg, $button-default-border, $button-royal-active-bg, $button-default-active-border, $button-royal-text);
@include button-clear($button-royal-bg);
@include button-outline($button-royal-bg);
}
&.button-dark {
@include button-style($button-dark-bg, $button-default-border, $button-dark-active-bg, $button-default-active-border, $button-dark-text);
@include button-clear($button-dark-bg);
@include button-outline($button-dark-bg);
}
}
.button-small {
padding: 2px $button-small-padding 1px;
min-width: $button-small-height;
min-height: $button-small-height + 2;
font-size: $button-small-font-size;
line-height: $button-small-height - $button-border-width - 1;
.icon:before,
&.icon:before,
&.icon-left:before,
&.icon-right:before {
font-size: $button-small-icon-size;
line-height: $button-small-icon-size + 3;
margin-top: 3px;
}
}
.button-large {
padding: 0 $button-large-padding;
min-width: ($button-large-padding * 3) + $button-large-font-size;
min-height: $button-large-height + 5;
font-size: $button-large-font-size;
line-height: $button-large-height - $button-border-width;
.icon:before,
&.icon:before,
&.icon-left:before,
&.icon-right:before {
padding-bottom: ($button-border-width * 2);
font-size: $button-large-icon-size;
line-height: $button-large-height - ($button-border-width * 2) - 1;
}
}
.button-icon {
@include transition(opacity .1s);
padding: 0 6px;
min-width: initial;
border-color: transparent;
background: none;
&.button.active,
&.button.activated {
border-color: transparent;
background: none;
box-shadow: none;
opacity: 0.3;
}
.icon:before,
&.icon:before {
font-size: $button-large-icon-size;
}
}
.button-clear {
@include button-clear($button-default-border);
@include transition(opacity .1s);
padding: 0 $button-clear-padding;
max-height: $button-height;
border-color: transparent;
background: none;
box-shadow: none;
&.active,
&.activated {
opacity: 0.3;
}
}
.button-outline {
@include button-outline($button-default-border);
@include transition(opacity .1s);
background: none;
box-shadow: none;
}
.padding > .button.button-block:first-child {
margin-top: 0;
}
.button-block {
display: block;
clear: both;
&:after {
clear: both;
}
}
.button-full,
.button-full > .button {
display: block;
margin-right: 0;
margin-left: 0;
border-right-width: 0;
border-left-width: 0;
border-radius: 0;
}
button.button-block,
button.button-full,
.button-full > button.button,
input.button.button-block {
width: 100%;
}
a.button {
text-decoration: none;
.icon:before,
&.icon:before,
&.icon-left:before,
&.icon-right:before {
margin-top: 2px;
}
}
.button.disabled,
.button[disabled] {
opacity: .4;
cursor: default !important;
pointer-events: none;
}
|
{
"pile_set_name": "Github"
}
|
'use strict';
module.exports = function(Chart) {
var helpers = Chart.helpers;
Chart.scaleService = {
// Scale registration object. Extensions can register new scale types (such as log or DB scales) and then
// use the new chart options to grab the correct scale
constructors: {},
// Use a registration function so that we can move to an ES6 map when we no longer need to support
// old browsers
// Scale config defaults
defaults: {},
registerScaleType: function(type, scaleConstructor, defaults) {
this.constructors[type] = scaleConstructor;
this.defaults[type] = helpers.clone(defaults);
},
getScaleConstructor: function(type) {
return this.constructors.hasOwnProperty(type) ? this.constructors[type] : undefined;
},
getScaleDefaults: function(type) {
// Return the scale defaults merged with the global settings so that we always use the latest ones
return this.defaults.hasOwnProperty(type) ? helpers.scaleMerge(Chart.defaults.scale, this.defaults[type]) : {};
},
updateScaleDefaults: function(type, additions) {
var defaults = this.defaults;
if (defaults.hasOwnProperty(type)) {
defaults[type] = helpers.extend(defaults[type], additions);
}
},
addScalesToLayout: function(chart) {
// Adds each scale to the chart.boxes array to be sized accordingly
helpers.each(chart.scales, function(scale) {
// Set ILayoutItem parameters for backwards compatibility
scale.fullWidth = scale.options.fullWidth;
scale.position = scale.options.position;
scale.weight = scale.options.weight;
Chart.layoutService.addBox(chart, scale);
});
}
};
};
|
{
"pile_set_name": "Github"
}
|
{
"name": "volumetric_lighting_scattering.comp",
"properties": {
"name": "volumetric_lighting_scattering.comp",
"gpuProgramName": "volumetric_lighting_scattering.comp.glsl",
"entryPoint": "main",
"preprocessorDefines": "",
"gpuProgramType": 3
}
}
|
{
"pile_set_name": "Github"
}
|
// Animated Icons
// --------------------------
.#{$fa-css-prefix}-spin {
animation: fa-spin 2s infinite linear;
}
.#{$fa-css-prefix}-pulse {
animation: fa-spin 1s infinite steps(8);
}
@keyframes fa-spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
|
{
"pile_set_name": "Github"
}
|
<?php
session_start();
if(!((($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest')||defined('evolette')) && $_SESSION['authorized']===true)) exit();
?>
<div id="ev-feat" style="display:none">
<h2 class="content-heading h-help">Evolette Features</h2>
<p>Evolette has a lot of native scripts for jQuery (no third party hevyweight scripts or plugins). All scripts are well documented, so you'll have no problems to use them. It also powered with TinyMCE WYSIWYG edtor.</p>
<h2 class="inner-heading h-help">Security</h2>
<p>Evolette is well secured. In a word, security is based on the dynamic sessions.</p>
<h2 class="inner-heading h-help">Ajax Features</h2>
<p>Ajax features of templates are very easy to use. They are based on adding special CLASS attribute value to links or forms, which allows you to load desired file (or post a form fields values) to content section or to popup window, or just to send them to file without any callback.</p>
<h2 class="inner-heading h-help">To Do List</h2>
<p>There is an editable To Do list. In this template To Do content is stored in the file. But if your CMS will use not one administrator user, it is better to save it to database for each user. <a class="popup" href="index.php?content=todo">Open To Do</a></p>
<h2 class="inner-heading h-help">Mailing engine</h2>
<p>Evolette has its own simple mailing engine.</p>
<ul>
<li>Message Form could be opened empty like this: <a class="popup" href="index.php?content=new-message">open form</a>.</li>
<li>By using a special CLASS for link, form could be opened with prefilled email address: <a class="sendMessage" href="demo@idangero.us">open form</a>.</li>
<li>Or it can be opened with all prefilled fields by specifying their values in the HREF attribute: <a class="popup" href="?content=new-message&mailto=demo@idangero.us&subject=Demo Subject&message=This message posted from link">open form</a>. </li>
</ul>
<p>You can try to send a message to any email. Mailing Engine is fully functioning!</p>
<h2 class="inner-heading h-help">Popup Engine</h2>
<p>Evolette has a very simple and powerful popup engine, which allows you to include any file to popup window or to include any text message without including a file. It also allows to open included file with an additional POSTed variables.</p>
<h2 class="inner-heading h-help">Forms Handling Engine</h2>
<p>As the Evolette is fully Ajax template, so it's impossible to submit forms with a simple POST or GET methods. Therefore there is a Form Handling engine which takes all form fields values and sends them to target file(specified in the ACTION attribute of form) by one of three ways: first way is to open target file with posted vars in the popup window (like Mailing Engine or To Do), second one is to open target file in content section (like on the article adding/editing page), and the last way is to post vars to file without any callback.</p>
<p>It's very easy to use form handling, all you'll need is to specify special class for form.</p>
<h2 class="inner-heading h-help">Wrappers</h2>
<p>There is a few elements wrappers used in Evolette. Their usage make the creation of some elements much faster. For example good-looking button code looks like: <br />
<strong><span class="button-l"><span class="button-m"><input type="submit" class="button"/></span></span></strong></p>
<p>But it is not so easy to write this code every time. Here is why we need a wrappers. With wrapper all you need is to write: <strong><input type="submit" class="button"/></strong> , and script will wrap this button with spans automatically</p>
</div>
|
{
"pile_set_name": "Github"
}
|
{
"images" : [
{
"idiom" : "universal",
"filename" : "email.pdf",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"preserves-vector-representation" : true
}
}
|
{
"pile_set_name": "Github"
}
|
//
// NSImage+Thumbnail.swift
// WWDC
//
// Created by Guilherme Rambo on 21/05/17.
// Copyright © 2017 Guilherme Rambo. All rights reserved.
//
import Cocoa
extension NSImage {
static func thumbnailImage(with url: URL, maxWidth: CGFloat) -> NSImage? {
guard let inputImage = NSImage(contentsOf: url) else { return nil }
let aspectRatio = inputImage.size.width / inputImage.size.height
let thumbSize = NSSize(width: maxWidth, height: maxWidth * aspectRatio)
let outputImage = NSImage(size: thumbSize)
outputImage.lockFocus()
inputImage.draw(in: NSRect(x: 0, y: 0, width: thumbSize.width, height: thumbSize.height), from: .zero, operation: .sourceOver, fraction: 1)
outputImage.unlockFocus()
return outputImage
}
}
extension NSImage {
func makeFreestandingTemplate(outputSize: NSSize) -> NSImage {
let insetPercentage: CGFloat = 0.25
var insetSize = outputSize
let widthInset = outputSize.width * insetPercentage
let heightInset = outputSize.height * insetPercentage
insetSize.width -= 2 * widthInset
insetSize.height -= 2 * heightInset
let destinationRect = NSRect(origin: CGPoint(x: widthInset, y: heightInset), size: insetSize)
// Circle Template
let circle = CAShapeLayer()
circle.path = CGPath(ellipseIn: CGRect(origin: .zero, size: outputSize), transform: nil)
// New image
let newImage = NSImage(size: outputSize)
newImage.lockFocus()
// Render both into new image
let ctx = NSGraphicsContext.current!.cgContext
circle.render(in: ctx)
draw(in: destinationRect, from: .zero, operation: .xor, fraction: 1)
newImage.unlockFocus()
newImage.isTemplate = true
return newImage
}
}
|
{
"pile_set_name": "Github"
}
|
<pre class='metadata'>
Title: Font Metrics API Level 1
Status: DREAM
Group: houdini
ED: https://drafts.css-houdini.org/font-metrics-api-1/
Shortname: font-metrics-api
Level: 1
Abstract:
Editor: Emil A Eklund, eae@google.com, w3cid 93298
Editor: Alan Stearns, stearns@adobe.com, w3cid 46659
</pre>
<pre class=link-defaults>
spec:dom; type:interface; text:Document
spec:dom; type:interface; text:Element;
spec:cssom-1; type:interface; text:CSS;
</pre>
Introduction {#intro}
=====================
The API exposed by this specification is designed to provide basic font metrics
for both in-document and out-of-document content.
Note: In a future version of this spec support may be added for exposing
information about individual runs of text, including information about
directionality, script, and character properties.
Measure API {#measure-api}
============================================
<pre class='idl'>
partial interface Document {
FontMetrics measureElement(Element element);
FontMetrics measureText(DOMString text, StylePropertyMapReadOnly styleMap);
};
</pre>
Two methods are provided for measuring text, one for in-document measurements
and another for out-of-document measurements. Both return a {{FontMetrics}}
object.
{{Document/measureElement()}} takes an {{Element}} and returns a {{FontMetrics}}
object. If the {{Element}} is not in the document or isn't rendered an empty
{{FontMetrics}} object will be returned.
{{Document/measureText()}} takes a {{DOMString}} and a
{{StylePropertyMapReadOnly}}, returning a {{FontMetrics}} object. Unless a font
is specified as a part of the styleMap the user agents default will be used.
Note: The only styles that apply to the {{Document/measureText()}} method are
those that are passed in as a part of the styleMap. Document styles do not apply.
{{FontMetrics}} object {#fontmetrics-definition}
----------------------------
<pre class='idl'>
interface FontMetrics {
readonly attribute double width;
readonly attribute FrozenArray<double> advances;
readonly attribute double boundingBoxLeft;
readonly attribute double boundingBoxRight;
readonly attribute double height;
readonly attribute double emHeightAscent;
readonly attribute double emHeightDescent;
readonly attribute double boundingBoxAscent;
readonly attribute double boundingBoxDescent;
readonly attribute double fontBoundingBoxAscent;
readonly attribute double fontBoundingBoxDescent;
readonly attribute Baseline dominantBaseline;
readonly attribute FrozenArray<Baseline> baselines;
readonly attribute FrozenArray<Font> fonts;
};
</pre>
The {{FontMetrics}} object has the following attributes:
{{FontMetrics/width}}
The advance width of the line box, in CSS pixels.
{{FontMetrics/advances}}
List of advances for each codepoint in the given text relative to the preceding
codepoint, in CSS pixels. Where a glyph is composed of a sequence of codepoints
the advance for the all but the first codepoint in the sequence will be zero.
{{FontMetrics/boundingBoxLeft}}
The distance parallel to the {{FontMetrics/dominantBaseline}} from the alignment
point given by the text-align property to the left side of the bounding
rectangle of the given text, in CSS pixels; positive numbers indicating a
distance going left from the given alignment point.
Note: The sum of this value and {{FontMetrics/boundingBoxRight}} can be wider
than the {{FontMetrics/width}}, in particular with slanted fonts where
characters overhang their advance width.
{{FontMetrics/boundingBoxRight}}
The distance parallel to the {{FontMetrics/dominantBaseline}} from the alignment
point given by the text-align property to the right side of the bounding
rectangle of the given text, in CSS pixels. Positive numbers indicating a
distance going right from the given alignment point.
{{FontMetrics/height}}
The distance between the highest top and the lowest bottom of the em squares in
the line box, in CSS pixels.
{{FontMetrics/emHeightAscent}}
The distance from the {{FontMetrics/dominantBaseline}} to the highest top of the
em squares in the line box, in CSS pixels.
Positive numbers indicating that the {{FontMetrics/dominantBaseline}} is below
the top of that em square (so this value will usually be positive).
Zero if the {{FontMetrics/dominantBaseline}} is the top of that em square.
Half the font size if the {{FontMetrics/dominantBaseline}} is the middle of that
em square.
{{FontMetrics/emHeightDescent}}
The distance from the {{FontMetrics/dominantBaseline}} to the lowest bottom of
the em squares in the line box, in CSS pixels.
Positive numbers indicating that the {{FontMetrics/dominantBaseline}} is below
the bottom of that em square (so this value will usually be negative).
Zero if the {{FontMetrics/dominantBaseline}} is the bottom of that em square.
{{FontMetrics/boundingBoxAscent}}
The distance from the {{FontMetrics/dominantBaseline}} to the top of the
bounding rectangle of the given text, in CSS pixels; positive numbers indicating
a distance going up from the {{FontMetrics/dominantBaseline}}.
Note: This number can vary greatly based on the input text, even if the first
font specified covers all the characters in the input.
{{FontMetrics/boundingBoxDescent}}
The distance from the {{FontMetrics/dominantBaseline}} to the bottom of the
bounding rectangle of the given text, in CSS pixels; positive numbers indicating
a distance going down from the {{FontMetrics/dominantBaseline}}.
{{FontMetrics/fontBoundingBoxAscent}}
The distance from the {{FontMetrics/dominantBaseline}} to the top of the highest
bounding rectangle of all the fonts used to render the text, in CSS pixels;
positive numbers indicating a distance going up from the
{{FontMetrics/dominantBaseline}}.
Note: This value and {{FontMetrics/fontBoundingBoxDescent}} are useful when
metrics independent of the actual text being measured are desired as the values
will be consistent regardless of the text as long as the same fonts are being
used.
The {{FontMetrics/boundingBoxAscent}} attribute (and its corresponding attribute
for the descent) are useful when metrics specific to the given text are desired.
{{FontMetrics/fontBoundingBoxDescent}}
The distance from the {{FontMetrics/dominantBaseline}} to the bottom of the
lowest bounding rectangle of all the fonts used to render the text, in
CSS pixels; positive numbers indicating a distance going down from the
{{FontMetrics/dominantBaseline}}.
{{FontMetrics/dominantBaseline}}
Reference to the dominant {{Baseline}} for the given text in the list of
{{FontMetrics/baselines}}.
{{FontMetrics/baselines}}
List of all {{Baseline}}s for the given text.
{{Baseline}} object {#baseline-definition}
----------------------------
<pre class='idl'>
interface Baseline {
readonly attribute DOMString name;
readonly attribute double value;
};
</pre>
Each {{Baseline}} object represents a baseline of the measured text and has the
following attributes:
{{Baseline/name}}
Name of the baseline in question.
{{Baseline/value}}
Distance from the {{FontMetrics/dominantBaseline}}, in CSS pixels.
Positive numbers indicating a distance going down from the
{{FontMetrics/dominantBaseline}}.
{{Font}} object {#font-definition}
----------------------------
<pre class='idl'>
interface Font {
readonly attribute DOMString name;
readonly attribute unsigned long glyphsRendered;
};
</pre>
Each {{Font}} object represents a font that was used for at least one glyph in
the measured text. It contains the following fields:
{{Font/name}}
Font family name.
{{Font/glyphsRendered}}
Number of glyphs used from the specific font. If multiple fonts are required to
render the specified text this attribute will indicate how many glyphs where
used from each font.
Note: Indicates the number of glyphs which may be lower than the number of
codepoints.
|
{
"pile_set_name": "Github"
}
|
<!DOCTYPE html>
<html>
<head>
</head>
<body style="font-family: Arial;">
<h1 style="border: 1px solid #ccc; color: red;">Hi</h1>
<table>
<tr>
<td class="headline" style="font-size: 24px; padding: 5px;">Some Headline</td>
</tr>
</table>
</body>
</html>
|
{
"pile_set_name": "Github"
}
|
'use strict'
var consoleControl = require('console-control-strings')
var ThemeSet = require('./theme-set.js')
var themes = module.exports = new ThemeSet()
themes.addTheme('ASCII', {
preProgressbar: '[',
postProgressbar: ']',
progressbarTheme: {
complete: '#',
remaining: '.'
},
activityIndicatorTheme: '-\\|/',
preSubsection: '>'
})
themes.addTheme('colorASCII', themes.getTheme('ASCII'), {
progressbarTheme: {
preComplete: consoleControl.color('inverse'),
complete: ' ',
postComplete: consoleControl.color('stopInverse'),
preRemaining: consoleControl.color('brightBlack'),
remaining: '.',
postRemaining: consoleControl.color('reset')
}
})
themes.addTheme('brailleSpinner', {
preProgressbar: '⸨',
postProgressbar: '⸩',
progressbarTheme: {
complete: '░',
remaining: '⠂'
},
activityIndicatorTheme: '⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏',
preSubsection: '>'
})
themes.addTheme('colorBrailleSpinner', themes.getTheme('brailleSpinner'), {
progressbarTheme: {
preComplete: consoleControl.color('inverse'),
complete: ' ',
postComplete: consoleControl.color('stopInverse'),
preRemaining: consoleControl.color('brightBlack'),
remaining: '░',
postRemaining: consoleControl.color('reset')
}
})
themes.setDefault({}, 'ASCII')
themes.setDefault({hasColor: true}, 'colorASCII')
themes.setDefault({platform: 'darwin', hasUnicode: true}, 'brailleSpinner')
themes.setDefault({platform: 'darwin', hasUnicode: true, hasColor: true}, 'colorBrailleSpinner')
|
{
"pile_set_name": "Github"
}
|
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.camel</groupId>
<artifactId>components</artifactId>
<version>3.6.0-SNAPSHOT</version>
</parent>
<artifactId>camel-lucene</artifactId>
<packaging>jar</packaging>
<name>Camel :: Lucene</name>
<description>Camel Lucene based search component</description>
<properties>
<camel.osgi.import.additional>
org.apache.lucene.*;version="${lucene-version-range}"
</camel.osgi.import.additional>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-support</artifactId>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-core</artifactId>
<version>${lucene-version}</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-queryparser</artifactId>
<version>${lucene-version}</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers-common</artifactId>
<version>${lucene-version}</version>
</dependency>
<!-- test dependencies -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test-junit5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>${basedir}/res</directory>
</fileset>
</filesets>
</configuration>
</plugin>
</plugins>
</build>
</project>
|
{
"pile_set_name": "Github"
}
|
{
"pagination": {
"GetBotAliases": {
"input_token": "nextToken",
"output_token": "nextToken",
"limit_key": "maxResults"
},
"GetBotChannelAssociations": {
"input_token": "nextToken",
"output_token": "nextToken",
"limit_key": "maxResults"
},
"GetBotVersions": {
"input_token": "nextToken",
"output_token": "nextToken",
"limit_key": "maxResults"
},
"GetBots": {
"input_token": "nextToken",
"output_token": "nextToken",
"limit_key": "maxResults"
},
"GetBuiltinIntents": {
"input_token": "nextToken",
"output_token": "nextToken",
"limit_key": "maxResults"
},
"GetBuiltinSlotTypes": {
"input_token": "nextToken",
"output_token": "nextToken",
"limit_key": "maxResults"
},
"GetIntentVersions": {
"input_token": "nextToken",
"output_token": "nextToken",
"limit_key": "maxResults"
},
"GetIntents": {
"input_token": "nextToken",
"output_token": "nextToken",
"limit_key": "maxResults"
},
"GetSlotTypeVersions": {
"input_token": "nextToken",
"output_token": "nextToken",
"limit_key": "maxResults"
},
"GetSlotTypes": {
"input_token": "nextToken",
"output_token": "nextToken",
"limit_key": "maxResults"
}
}
}
|
{
"pile_set_name": "Github"
}
|
'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
function getDecimals(n) {
n = n + '';
var i = n.indexOf('.');
return (i == -1) ? 0 : n.length - i - 1;
}
function getVF(n, opt_precision) {
var v = opt_precision;
if (undefined === v) {
v = Math.min(getDecimals(n), 3);
}
var base = Math.pow(10, v);
var f = ((n * base) | 0) % base;
return {v: v, f: f};
}
$provide.value("$locale", {
"DATETIME_FORMATS": {
"AMPMS": [
"prije podne",
"popodne"
],
"DAY": [
"nedjelja",
"ponedjeljak",
"utorak",
"srijeda",
"\u010detvrtak",
"petak",
"subota"
],
"ERANAMES": [
"Prije nove ere",
"Nove ere"
],
"ERAS": [
"p. n. e.",
"n. e."
],
"FIRSTDAYOFWEEK": 0,
"MONTH": [
"januar",
"februar",
"mart",
"april",
"maj",
"juni",
"juli",
"august",
"septembar",
"oktobar",
"novembar",
"decembar"
],
"SHORTDAY": [
"ned",
"pon",
"uto",
"sri",
"\u010det",
"pet",
"sub"
],
"SHORTMONTH": [
"jan",
"feb",
"mar",
"apr",
"maj",
"jun",
"jul",
"aug",
"sep",
"okt",
"nov",
"dec"
],
"STANDALONEMONTH": [
"januar",
"februar",
"mart",
"april",
"maj",
"juni",
"juli",
"august",
"septembar",
"oktobar",
"novembar",
"decembar"
],
"WEEKENDRANGE": [
5,
6
],
"fullDate": "EEEE, dd. MMMM y.",
"longDate": "dd. MMMM y.",
"medium": "dd. MMM. y. HH:mm:ss",
"mediumDate": "dd. MMM. y.",
"mediumTime": "HH:mm:ss",
"short": "dd.MM.yy. HH:mm",
"shortDate": "dd.MM.yy.",
"shortTime": "HH:mm"
},
"NUMBER_FORMATS": {
"CURRENCY_SYM": "KM",
"DECIMAL_SEP": ",",
"GROUP_SEP": ".",
"PATTERNS": [
{
"gSize": 3,
"lgSize": 3,
"maxFrac": 3,
"minFrac": 0,
"minInt": 1,
"negPre": "-",
"negSuf": "",
"posPre": "",
"posSuf": ""
},
{
"gSize": 3,
"lgSize": 3,
"maxFrac": 2,
"minFrac": 2,
"minInt": 1,
"negPre": "-",
"negSuf": "\u00a0\u00a4",
"posPre": "",
"posSuf": "\u00a0\u00a4"
}
]
},
"id": "bs",
"localeID": "bs",
"pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11 || vf.f % 10 == 1 && vf.f % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14) || vf.f % 10 >= 2 && vf.f % 10 <= 4 && (vf.f % 100 < 12 || vf.f % 100 > 14)) { return PLURAL_CATEGORY.FEW; } return PLURAL_CATEGORY.OTHER;}
});
}]);
|
{
"pile_set_name": "Github"
}
|
var baseClamp = require('./_baseClamp'),
baseToString = require('./_baseToString'),
toInteger = require('./toInteger'),
toString = require('./toString');
/**
* Checks if `string` starts with the given target string.
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to inspect.
* @param {string} [target] The string to search for.
* @param {number} [position=0] The position to search from.
* @returns {boolean} Returns `true` if `string` starts with `target`,
* else `false`.
* @example
*
* _.startsWith('abc', 'a');
* // => true
*
* _.startsWith('abc', 'b');
* // => false
*
* _.startsWith('abc', 'b', 1);
* // => true
*/
function startsWith(string, target, position) {
string = toString(string);
position = position == null
? 0
: baseClamp(toInteger(position), 0, string.length);
target = baseToString(target);
return string.slice(position, position + target.length) == target;
}
module.exports = startsWith;
|
{
"pile_set_name": "Github"
}
|
created_by: Создал
about: Описание
add_description: Добавить описание
phone: Мобильный телефон
email: Email
|
{
"pile_set_name": "Github"
}
|
export { default } from './checkout-confirmation'
|
{
"pile_set_name": "Github"
}
|
---
layout: feature
title: 'Tense'
shortdef: 'tense'
udver: '2'
---
### Description
Tense feature matches the inflectional endings in verbs. In Uralic grammars
there have been various practices in refering to present/future tense and
past/preterite tense, in Universal dependencies we use `Pres` for common
non-past and `Past` for common past, unless language has more complex tense
system. Many grammars give descriptions of e.g. perfect and pluperfect tenses,
but if it's based on auxiliary verb constructions, this is not marked on UD
level.
|
{
"pile_set_name": "Github"
}
|
import { IconDefinition, IconPrefix, IconName } from "@fortawesome/fontawesome-common-types";
export const definition: IconDefinition;
export const faPinterest: IconDefinition;
export const prefix: IconPrefix;
export const iconName: IconName;
export const width: number;
export const height: number;
export const ligatures: string[];
export const unicode: string;
export const svgPathData: string;
|
{
"pile_set_name": "Github"
}
|
/*
* CoreShop.
*
* This source file is subject to the GNU General Public License version 3 (GPLv3)
* For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
* files that are distributed with this source code.
*
* @copyright Copyright (c) 2015-2020 Dominik Pfaffenbauer (https://www.pfaffenbauer.at)
* @license https://www.coreshop.org/license GNU General Public License version 3 (GPLv3)
*
*/
pimcore.registerNS('coreshop.notification.rule.item');
coreshop.notification.rule.item = Class.create(coreshop.rules.item, {
iconCls: 'coreshop_icon_notification_rule',
url: {
save: '/admin/coreshop/notification_rules/save'
},
getPanel: function () {
var items = this.getItems();
this.panel = new Ext.TabPanel({
activeTab: 0,
title: this.data.name,
closable: true,
deferredRender: false,
forceLayout: true,
iconCls: this.iconCls,
buttons: [{
text: t('save'),
iconCls: 'pimcore_icon_apply',
handler: this.save.bind(this)
}],
items: items
});
if (this.data.type) {
this.reloadTypes(this.data.type);
}
return this.panel;
},
getSettings: function () {
var data = this.data;
var types = [];
this.parentPanel.getConfig().types.forEach(function (type) {
types.push([type, t('coreshop_notification_rule_type_' + type)]);
}.bind(this));
var typesStore = new Ext.data.ArrayStore({
data: types,
fields: ['type', 'typeName'],
idProperty: 'type'
});
this.settingsForm = Ext.create('Ext.form.Panel', {
iconCls: 'coreshop_icon_settings',
title: t('settings'),
bodyStyle: 'padding:10px;',
autoScroll: true,
border: false,
items: [
{
xtype: 'textfield',
name: 'name',
fieldLabel: t('name'),
width: 250,
value: data.name
},
{
xtype: 'checkbox',
name: 'active',
fieldLabel: t('active'),
checked: data.active
},
{
xtype: 'combo',
fieldLabel: t('coreshop_notification_rule_type'),
name: 'type',
displayField: 'type',
valueField: 'type',
store: typesStore,
value: this.data.type,
width: 250,
listeners: {
change: function (combo, value) {
this.reloadTypes(value);
}.bind(this)
}
}
]
});
return this.settingsForm;
},
getItems: function () {
return [
this.getSettings()
];
},
reloadTypes: function (type) {
if (this.actions) {
this.actions.destroy();
}
if (this.conditions) {
this.conditions.destroy();
}
var items = this.getItemsForType(type);
this.panel.add(items);
},
getItemsForType: function (type) {
var actionContainerClass = this.getActionContainerClass();
var conditionContainerClass = this.getConditionContainerClass();
var allowedActions = this.parentPanel.getActionsForType(type);
var allowedConditions = this.parentPanel.getConditionsForType(type);
this.actions = new actionContainerClass(allowedActions, type);
this.conditions = new conditionContainerClass(allowedConditions, type);
var items = [
this.conditions.getLayout(),
this.actions.getLayout()
];
// add saved conditions
if (this.data.conditions) {
Ext.each(this.data.conditions, function (condition) {
var conditionType = condition.type.replace(type + '.', '');
if (allowedConditions.indexOf(conditionType) >= 0) {
this.conditions.addCondition(conditionType, condition, false);
}
}.bind(this));
}
// add saved actions
if (this.data.actions) {
Ext.each(this.data.actions, function (action) {
var actionType = action.type.replace(type + '.', '');
if (allowedActions.indexOf(actionType) >= 0) {
this.actions.addAction(actionType, action, false);
}
}.bind(this));
}
return items;
},
getActionContainerClass: function () {
return coreshop.notification.rule.action;
},
getConditionContainerClass: function () {
return coreshop.notification.rule.condition;
}
});
|
{
"pile_set_name": "Github"
}
|
// Load modules
var Url = require('url');
var Code = require('code');
var Hawk = require('../lib');
var Lab = require('lab');
// Declare internals
var internals = {};
// Test shortcuts
var lab = exports.lab = Lab.script();
var describe = lab.experiment;
var it = lab.test;
var expect = Code.expect;
describe('Hawk', function () {
var credentialsFunc = function (id, callback) {
var credentials = {
id: id,
key: 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn',
algorithm: (id === '1' ? 'sha1' : 'sha256'),
user: 'steve'
};
return callback(null, credentials);
};
it('generates a header then successfully parse it (configuration)', function (done) {
var req = {
method: 'GET',
url: '/resource/4?filter=a',
host: 'example.com',
port: 8080
};
credentialsFunc('123456', function (err, credentials1) {
req.authorization = Hawk.client.header(Url.parse('http://example.com:8080/resource/4?filter=a'), req.method, { credentials: credentials1, ext: 'some-app-data' }).field;
expect(req.authorization).to.exist();
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
expect(err).to.not.exist();
expect(credentials2.user).to.equal('steve');
expect(artifacts.ext).to.equal('some-app-data');
done();
});
});
});
it('generates a header then successfully parse it (node request)', function (done) {
var req = {
method: 'POST',
url: '/resource/4?filter=a',
headers: {
host: 'example.com:8080',
'content-type': 'text/plain;x=y'
}
};
var payload = 'some not so random text';
credentialsFunc('123456', function (err, credentials1) {
var reqHeader = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] });
req.headers.authorization = reqHeader.field;
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
expect(err).to.not.exist();
expect(credentials2.user).to.equal('steve');
expect(artifacts.ext).to.equal('some-app-data');
expect(Hawk.server.authenticatePayload(payload, credentials2, artifacts, req.headers['content-type'])).to.equal(true);
var res = {
headers: {
'content-type': 'text/plain'
}
};
res.headers['server-authorization'] = Hawk.server.header(credentials2, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
expect(res.headers['server-authorization']).to.exist();
expect(Hawk.client.authenticate(res, credentials2, artifacts, { payload: 'some reply' })).to.equal(true);
done();
});
});
});
it('generates a header then successfully parse it (absolute request uri)', function (done) {
var req = {
method: 'POST',
url: 'http://example.com:8080/resource/4?filter=a',
headers: {
host: 'example.com:8080',
'content-type': 'text/plain;x=y'
}
};
var payload = 'some not so random text';
credentialsFunc('123456', function (err, credentials1) {
var reqHeader = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] });
req.headers.authorization = reqHeader.field;
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
expect(err).to.not.exist();
expect(credentials2.user).to.equal('steve');
expect(artifacts.ext).to.equal('some-app-data');
expect(Hawk.server.authenticatePayload(payload, credentials2, artifacts, req.headers['content-type'])).to.equal(true);
var res = {
headers: {
'content-type': 'text/plain'
}
};
res.headers['server-authorization'] = Hawk.server.header(credentials2, artifacts, { payload: 'some reply', contentType: 'text/plain', ext: 'response-specific' });
expect(res.headers['server-authorization']).to.exist();
expect(Hawk.client.authenticate(res, credentials2, artifacts, { payload: 'some reply' })).to.equal(true);
done();
});
});
});
it('generates a header then successfully parse it (no server header options)', function (done) {
var req = {
method: 'POST',
url: '/resource/4?filter=a',
headers: {
host: 'example.com:8080',
'content-type': 'text/plain;x=y'
}
};
var payload = 'some not so random text';
credentialsFunc('123456', function (err, credentials1) {
var reqHeader = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] });
req.headers.authorization = reqHeader.field;
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
expect(err).to.not.exist();
expect(credentials2.user).to.equal('steve');
expect(artifacts.ext).to.equal('some-app-data');
expect(Hawk.server.authenticatePayload(payload, credentials2, artifacts, req.headers['content-type'])).to.equal(true);
var res = {
headers: {
'content-type': 'text/plain'
}
};
res.headers['server-authorization'] = Hawk.server.header(credentials2, artifacts);
expect(res.headers['server-authorization']).to.exist();
expect(Hawk.client.authenticate(res, credentials2, artifacts)).to.equal(true);
done();
});
});
});
it('generates a header then fails to parse it (missing server header hash)', function (done) {
var req = {
method: 'POST',
url: '/resource/4?filter=a',
headers: {
host: 'example.com:8080',
'content-type': 'text/plain;x=y'
}
};
var payload = 'some not so random text';
credentialsFunc('123456', function (err, credentials1) {
var reqHeader = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', payload: payload, contentType: req.headers['content-type'] });
req.headers.authorization = reqHeader.field;
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
expect(err).to.not.exist();
expect(credentials2.user).to.equal('steve');
expect(artifacts.ext).to.equal('some-app-data');
expect(Hawk.server.authenticatePayload(payload, credentials2, artifacts, req.headers['content-type'])).to.equal(true);
var res = {
headers: {
'content-type': 'text/plain'
}
};
res.headers['server-authorization'] = Hawk.server.header(credentials2, artifacts);
expect(res.headers['server-authorization']).to.exist();
expect(Hawk.client.authenticate(res, credentials2, artifacts, { payload: 'some reply' })).to.equal(false);
done();
});
});
});
it('generates a header then successfully parse it (with hash)', function (done) {
var req = {
method: 'GET',
url: '/resource/4?filter=a',
host: 'example.com',
port: 8080
};
credentialsFunc('123456', function (err, credentials1) {
req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, payload: 'hola!', ext: 'some-app-data' }).field;
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
expect(err).to.not.exist();
expect(credentials2.user).to.equal('steve');
expect(artifacts.ext).to.equal('some-app-data');
done();
});
});
});
it('generates a header then successfully parse it then validate payload', function (done) {
var req = {
method: 'GET',
url: '/resource/4?filter=a',
host: 'example.com',
port: 8080
};
credentialsFunc('123456', function (err, credentials1) {
req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, payload: 'hola!', ext: 'some-app-data' }).field;
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
expect(err).to.not.exist();
expect(credentials2.user).to.equal('steve');
expect(artifacts.ext).to.equal('some-app-data');
expect(Hawk.server.authenticatePayload('hola!', credentials2, artifacts)).to.be.true();
expect(Hawk.server.authenticatePayload('hello!', credentials2, artifacts)).to.be.false();
done();
});
});
});
it('generates a header then successfully parses and validates payload', function (done) {
var req = {
method: 'GET',
url: '/resource/4?filter=a',
host: 'example.com',
port: 8080
};
credentialsFunc('123456', function (err, credentials1) {
req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, payload: 'hola!', ext: 'some-app-data' }).field;
Hawk.server.authenticate(req, credentialsFunc, { payload: 'hola!' }, function (err, credentials2, artifacts) {
expect(err).to.not.exist();
expect(credentials2.user).to.equal('steve');
expect(artifacts.ext).to.equal('some-app-data');
done();
});
});
});
it('generates a header then successfully parse it (app)', function (done) {
var req = {
method: 'GET',
url: '/resource/4?filter=a',
host: 'example.com',
port: 8080
};
credentialsFunc('123456', function (err, credentials1) {
req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', app: 'asd23ased' }).field;
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
expect(err).to.not.exist();
expect(credentials2.user).to.equal('steve');
expect(artifacts.ext).to.equal('some-app-data');
expect(artifacts.app).to.equal('asd23ased');
done();
});
});
});
it('generates a header then successfully parse it (app, dlg)', function (done) {
var req = {
method: 'GET',
url: '/resource/4?filter=a',
host: 'example.com',
port: 8080
};
credentialsFunc('123456', function (err, credentials1) {
req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data', app: 'asd23ased', dlg: '23434szr3q4d' }).field;
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
expect(err).to.not.exist();
expect(credentials2.user).to.equal('steve');
expect(artifacts.ext).to.equal('some-app-data');
expect(artifacts.app).to.equal('asd23ased');
expect(artifacts.dlg).to.equal('23434szr3q4d');
done();
});
});
});
it('generates a header then fail authentication due to bad hash', function (done) {
var req = {
method: 'GET',
url: '/resource/4?filter=a',
host: 'example.com',
port: 8080
};
credentialsFunc('123456', function (err, credentials1) {
req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, payload: 'hola!', ext: 'some-app-data' }).field;
Hawk.server.authenticate(req, credentialsFunc, { payload: 'byebye!' }, function (err, credentials2, artifacts) {
expect(err).to.exist();
expect(err.output.payload.message).to.equal('Bad payload hash');
done();
});
});
});
it('generates a header for one resource then fail to authenticate another', function (done) {
var req = {
method: 'GET',
url: '/resource/4?filter=a',
host: 'example.com',
port: 8080
};
credentialsFunc('123456', function (err, credentials1) {
req.authorization = Hawk.client.header('http://example.com:8080/resource/4?filter=a', req.method, { credentials: credentials1, ext: 'some-app-data' }).field;
req.url = '/something/else';
Hawk.server.authenticate(req, credentialsFunc, {}, function (err, credentials2, artifacts) {
expect(err).to.exist();
expect(credentials2).to.exist();
done();
});
});
});
});
|
{
"pile_set_name": "Github"
}
|
<?xml version="1.0" encoding="UTF-8"?>
<ajxp_plugin label="CONF_MESSAGE[Notification Center]" description="CONF_MESSAGE[Handle users watches and notifications]" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="file:../core.ajaxplorer/ajxp_registry.xsd">
<class_definition classname="Pydio\Notification\Core\NotificationCenter" filename="plugins/core.notifications/NotificationCenter.php"/>
<client_settings>
<resources>
<i18n namespace="notification.tpl.short" path="plugins/core.notifications/templates/short"/>
<i18n namespace="notification.tpl.long" path="plugins/core.notifications/templates/long"/>
<i18n namespace="notification.tpl.group" path="plugins/core.notifications/templates/group"/>
<i18n namespace="notification.tpl.block" path="plugins/core.notifications/templates/block"/>
<i18n namespace="notification.tpl.location" path="plugins/core.notifications/templates/location"/>
<i18n namespace="notification_center" path="plugins/core.notifications/res/i18n"/>
<js className="PydioNotifications" file="plugins/core.notifications/res/build/PydioNotifications.js" depends="React,PydioComponents"/>
</resources>
</client_settings>
<server_settings>
<param name="activate_notifications" scope="user" description="CONF_MESSAGE[Activate desktop notifications]" label="CONF_MESSAGE[Desktop Notifications]" type="button" choices="run_client_action:activateDesktopNotifications" expose="true" editable="true"/>
<global_param name="USER_EVENTS" description="CONF_MESSAGE[Display a new entry with all events happening on a user workspaces, and alerts. An SQL database must be setup for the FEED_DRIVER configuration.]" label="CONF_MESSAGE[User events and alerts]" type="boolean" default="false"/>
<global_param name="SHOW_WORKSPACES_ACTIVITY" label="CONF_MESSAGE[Display Workspaces Activity]" description="CONF_MESSAGE[Display workspaces activity to the users in the right-hand information panel]" type="boolean" default="true"/>
<global_param type="plugin_instance:feed" name="UNIQUE_FEED_INSTANCE" group="CONF_MESSAGE[Instance Params]" label="CONF_MESSAGE[Feed Instance]" description="CONF_MESSAGE[Choose the plugin]" mandatory="true" default="feed.sql"/>
</server_settings>
<registry_contributions>
<actions>
<action name="get_my_feed">
<processing>
<serverCallback methodName="loadUserFeed"/>
</processing>
</action>
<action name="feed">
<rightsContext adminOnly="false" noUser="false" read="false" userLogged="only" write="false"/>
<processing>
<serverCallback methodName="loadUserFeed" restParams="/feed_type/path+" developerComment="Load an activity feed for the given node. Filtered by what the current user is authorized to see">
<input_param name="path" type="path" description="Optional filter to get activity on a file or a folder"/>
<input_param name="format" type="string" description="html, json, xml, array (internal value)"/>
<input_param name="feed_type" type="string" description="notif, alert or all"/>
<input_param name="offset" type="integer" description="Offset for pagination"/>
<input_param name="limit" type="integer" description="Limit for pagination"/>
<input_param name="merge_description" type="boolean" description="Wether to merge notification title and description in text"/>
<input_param name="merge_description_as_label" type="boolean" description="Wether to merge notification title and description in title"/>
<input_param name="current_repository" type="boolean"
description="Wether to get activity from current repository (true), or compute all from authorized repositories for user (false)"/>
</serverCallback>
</processing>
</action>
<action name="clear_feed">
<processing><serverCallback methodName="clearUserFeed" restParams="/context_type/context_value">
<input_param name="context_type" type="string" description="all|repository|user"/>
<input_param name="context_value" type="string" description="Either empty, or a repo ID, or a userId depending on the context_type"/>
</serverCallback></processing>
</action>
<action name="dismiss_user_alert">
<gui text="notification_center.7" title="notification_center.7" iconClass="mdi mdi-close-circle" src="notification_center/ICON_SIZE/feed.png" accessKey="" hasAccessKey="false">
<context selection="true" dir="" recycle="true" actionBar="true" actionBarGroup="inline-notifications" contextMenu="false" infoPanel="false"/>
<selectionContext dir="true" file="true" recycle="false" unique="true"/>
</gui>
<rightsContext adminOnly="false" noUser="true" read="false" userLogged="only" write="false"/>
<processing>
<clientCallback module="PydioCoreActions.Callbacks.dismissUserAlert"/>
<serverCallback methodName="dismissUserAlert" restParams="/alert_id/occurences" developerComment="Dismiss one or more occurences of alerts">
<input_param name="alert_id" type="integer" description="Id passed in /feed action list"/>
<input_param name="occurences" type="integer" description="1 or more"/>
</serverCallback>
</processing>
</action>
<action name="update_alerts_last_read">
<processing>
<serverCallback methodName="updateAlertsLastRead" restParams="/repository_scope">
<input_param name="repository_scope" type="string" description="all|repositoryId"/>
</serverCallback>
</processing>
</action>
<action name="load_user_recent_items">
<processing>
<serverCallback methodName="loadRecentItemsList" restParams="/"/>
</processing>
</action>
<action name="activateDesktopNotifications">
<gui src="" iconClass="icon-rss" text="notification_center.1" title="notification_title.2">
<context dir="true" recycle="true" selection="false"/>
</gui>
<processing>
<clientCallback module="PydioCoreActions.Callbacks.activateDesktopNotifications"/>
</processing>
</action>
</actions>
<hooks>
<serverCallback methodName="persistChangeHookToFeed" hookName="node.change" defer="true"/>
<serverCallback methodName="persistReadHookToRecentList" hookName="node.read"/>
<serverCallback methodName="persistNotificationToAlerts" hookName="msg.notification"/>
<serverCallback methodName="loadRepositoryInfo" hookName="repository.load_info"/>
<serverCallback methodName="shareAssignRight" hookName="node.share.assign_right"/>
</hooks>
<client_configs>
<component_config component="InfoPanel">
<infoPanel mime="ajxp_root_node,generic_dir,generic_file" reactComponent="PydioNotifications.ActivityPanel"/>
</component_config>
<component_config component="AjxpReactComponent::left_navigator">
<additional_content
id="navigation_alerts"
position="0"
type="ListProvider"
options='{"title":"notification_center.3", "titleClassName":"colorcode-alert", "startOpen":true, "dataModelBadge":{"property":"metadata","metadata_sum":"event_occurence", "className":"alerts_number_badge"}, "fit":"content","silentLoading":true,"actionBarGroups":["inline-notifications"],"nodeProviderProperties":{"get_action":"get_my_feed", "connexion_discrete":true, "format":"xml", "current_repository":"true", "feed_type":"alert", "merge_description":"false"},"reloadOnServerMessage":"tree/reload_user_feed", "connexion_discrete":true, "tipAttribute":"event_description_long", "emptyChildrenMessage":"notification_center.8"}'/>
</component_config>
</client_configs>
</registry_contributions>
<dependencies>
<activePlugin pluginName="core.conf"/>
</dependencies>
</ajxp_plugin>
|
{
"pile_set_name": "Github"
}
|
namespace Scada.Scheme.Model.PropertyGrid
{
partial class FrmFontDialog
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.lblFontName = new System.Windows.Forms.Label();
this.lblFontSize = new System.Windows.Forms.Label();
this.btnCancel = new System.Windows.Forms.Button();
this.btnOK = new System.Windows.Forms.Button();
this.cbFontSize = new System.Windows.Forms.ComboBox();
this.gbStyle = new System.Windows.Forms.GroupBox();
this.chkUnderline = new System.Windows.Forms.CheckBox();
this.chkItalic = new System.Windows.Forms.CheckBox();
this.chkBold = new System.Windows.Forms.CheckBox();
this.cbFontName = new System.Windows.Forms.ComboBox();
this.gbStyle.SuspendLayout();
this.SuspendLayout();
//
// lblFontName
//
this.lblFontName.AutoSize = true;
this.lblFontName.Location = new System.Drawing.Point(9, 9);
this.lblFontName.Name = "lblFontName";
this.lblFontName.Size = new System.Drawing.Size(28, 13);
this.lblFontName.TabIndex = 0;
this.lblFontName.Text = "Font";
//
// lblFontSize
//
this.lblFontSize.AutoSize = true;
this.lblFontSize.Location = new System.Drawing.Point(165, 9);
this.lblFontSize.Name = "lblFontSize";
this.lblFontSize.Size = new System.Drawing.Size(27, 13);
this.lblFontSize.TabIndex = 2;
this.lblFontSize.Text = "Size";
//
// btnCancel
//
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Location = new System.Drawing.Point(193, 153);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(75, 23);
this.btnCancel.TabIndex = 6;
this.btnCancel.Text = "Cancel";
this.btnCancel.UseVisualStyleBackColor = true;
//
// btnOK
//
this.btnOK.Location = new System.Drawing.Point(112, 153);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(75, 23);
this.btnOK.TabIndex = 5;
this.btnOK.Text = "OK";
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// cbFontSize
//
this.cbFontSize.FormattingEnabled = true;
this.cbFontSize.Items.AddRange(new object[] {
"8",
"9",
"10",
"11",
"12",
"14",
"16",
"18",
"20",
"22",
"24",
"26",
"28",
"36",
"48",
"72"});
this.cbFontSize.Location = new System.Drawing.Point(168, 25);
this.cbFontSize.Name = "cbFontSize";
this.cbFontSize.Size = new System.Drawing.Size(100, 21);
this.cbFontSize.TabIndex = 3;
//
// gbStyle
//
this.gbStyle.Controls.Add(this.chkUnderline);
this.gbStyle.Controls.Add(this.chkItalic);
this.gbStyle.Controls.Add(this.chkBold);
this.gbStyle.Location = new System.Drawing.Point(12, 52);
this.gbStyle.Name = "gbStyle";
this.gbStyle.Padding = new System.Windows.Forms.Padding(10, 3, 10, 10);
this.gbStyle.Size = new System.Drawing.Size(256, 95);
this.gbStyle.TabIndex = 4;
this.gbStyle.TabStop = false;
this.gbStyle.Text = "Style";
//
// chkUnderline
//
this.chkUnderline.AutoSize = true;
this.chkUnderline.Location = new System.Drawing.Point(13, 65);
this.chkUnderline.Name = "chkUnderline";
this.chkUnderline.Size = new System.Drawing.Size(71, 17);
this.chkUnderline.TabIndex = 2;
this.chkUnderline.Text = "Underline";
this.chkUnderline.UseVisualStyleBackColor = true;
//
// chkItalic
//
this.chkItalic.AutoSize = true;
this.chkItalic.Location = new System.Drawing.Point(13, 42);
this.chkItalic.Name = "chkItalic";
this.chkItalic.Size = new System.Drawing.Size(48, 17);
this.chkItalic.TabIndex = 1;
this.chkItalic.Text = "Italic";
this.chkItalic.UseVisualStyleBackColor = true;
//
// chkBold
//
this.chkBold.AutoSize = true;
this.chkBold.Location = new System.Drawing.Point(13, 19);
this.chkBold.Name = "chkBold";
this.chkBold.Size = new System.Drawing.Size(47, 17);
this.chkBold.TabIndex = 0;
this.chkBold.Text = "Bold";
this.chkBold.UseVisualStyleBackColor = true;
//
// cbFontName
//
this.cbFontName.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawVariable;
this.cbFontName.FormattingEnabled = true;
this.cbFontName.Location = new System.Drawing.Point(12, 25);
this.cbFontName.Name = "cbFontName";
this.cbFontName.Size = new System.Drawing.Size(150, 21);
this.cbFontName.TabIndex = 1;
this.cbFontName.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.cbFontName_DrawItem);
this.cbFontName.MeasureItem += new System.Windows.Forms.MeasureItemEventHandler(this.cbFontName_MeasureItem);
//
// FrmFontDialog
//
this.AcceptButton = this.btnOK;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnCancel;
this.ClientSize = new System.Drawing.Size(281, 188);
this.Controls.Add(this.cbFontName);
this.Controls.Add(this.gbStyle);
this.Controls.Add(this.cbFontSize);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.lblFontSize);
this.Controls.Add(this.lblFontName);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FrmFontDialog";
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Font";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.FrmFontDialog_FormClosed);
this.Load += new System.EventHandler(this.FrmFontDialog_Load);
this.gbStyle.ResumeLayout(false);
this.gbStyle.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label lblFontName;
private System.Windows.Forms.Label lblFontSize;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.ComboBox cbFontSize;
private System.Windows.Forms.GroupBox gbStyle;
private System.Windows.Forms.CheckBox chkUnderline;
private System.Windows.Forms.CheckBox chkItalic;
private System.Windows.Forms.CheckBox chkBold;
private System.Windows.Forms.ComboBox cbFontName;
}
}
|
{
"pile_set_name": "Github"
}
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Test: Attribute selectors with hyphens and underscores</title>
<link rel="author" title="Microsoft" href="http://www.microsoft.com/" />
<link rel="help" href="http://www.w3.org/TR/CSS21/syndata.html" />
<link rel="match" href="../reference/filler-text-below-green.xht"/>
<meta name="flags" content="" />
<meta name="assert" content="Attribute selectors are valid if they begin with hyphens and then underscores." />
<style type="text/css">
[-_hyphenunderscore="true"], div
{
color: green;
}
</style>
</head>
<body>
<p>Test passes if the "Filler Text" below is green.</p>
<div>Filler Text</div>
</body>
</html>
|
{
"pile_set_name": "Github"
}
|
" Author: Sumner Evans <sumner.evans98@gmail.com>
" Description: write-good for Texinfo files
call ale#handlers#writegood#DefineLinter('texinfo')
|
{
"pile_set_name": "Github"
}
|
/* eslint-disable max-len, max-statements, complexity,
default-case */
// Copyright 2014 The Chromium Authors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/**
* Copyright 2018-2020 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
*
* This file is part of qutebrowser.
*
* qutebrowser is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* qutebrowser is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* Ported chrome-caretbrowsing extension.
* https://cs.chromium.org/chromium/src/ui/accessibility/extensions/caretbrowsing/
*
* The behavior is based on Mozilla's spec whenever possible:
* http://www.mozilla.org/access/keyboard/proposal
*
* The one exception is that Esc is used to escape out of a form control,
* rather than their proposed key (which doesn't seem to work in the
* latest Firefox anyway).
*
* Some details about how Chrome selection works, which will help in
* understanding the code:
*
* The Selection object (window.getSelection()) has four components that
* completely describe the state of the caret or selection:
*
* base and anchor: this is the start of the selection, the fixed point.
* extent and focus: this is the end of the selection, the part that
* moves when you hold down shift and press the left or right arrows.
*
* When the selection is a cursor, the base, anchor, extent, and focus are
* all the same.
*
* There's only one time when the base and anchor are not the same, or the
* extent and focus are not the same, and that's when the selection is in
* an ambiguous state - i.e. it's not clear which edge is the focus and which
* is the anchor. As an example, if you double-click to select a word, then
* the behavior is dependent on your next action. If you press Shift+Right,
* the right edge becomes the focus. But if you press Shift+Left, the left
* edge becomes the focus.
*
* When the selection is in an ambiguous state, the base and extent are set
* to the position where the mouse clicked, and the anchor and focus are set
* to the boundaries of the selection.
*
* The only way to set the selection and give it direction is to use
* the non-standard Selection.setBaseAndExtent method. If you try to use
* Selection.addRange(), the anchor will always be on the left and the focus
* will always be on the right, making it impossible to manipulate
* selections that move from right to left.
*
* Finally, Chrome will throw an exception if you try to set an invalid
* selection - a selection where the left and right edges are not the same,
* but it doesn't span any visible characters. A common example is that
* there are often many whitespace characters in the DOM that are not
* visible on the page; trying to select them will fail. Another example is
* any node that's invisible or not displayed.
*
* While there are probably many possible methods to determine what is
* selectable, this code uses the method of determining if there's a valid
* bounding box for the range or not - keep moving the cursor forwards until
* the range from the previous position and candidate next position has a
* valid bounding box.
*/
"use strict";
window._qutebrowser.caret = (function() {
function isElementInViewport(node) {
let i;
let boundingRect = (node.getClientRects()[0] ||
node.getBoundingClientRect());
if (boundingRect.width <= 1 && boundingRect.height <= 1) {
const rects = node.getClientRects();
for (i = 0; i < rects.length; i++) {
if (rects[i].width > rects[0].height &&
rects[i].height > rects[0].height) {
boundingRect = rects[i];
}
}
}
if (boundingRect === undefined) {
return null;
}
if (boundingRect.top > innerHeight || boundingRect.left > innerWidth) {
return null;
}
if (boundingRect.width <= 1 || boundingRect.height <= 1) {
const children = node.children;
let visibleChildNode = false;
for (i = 0; i < children.length; ++i) {
boundingRect = (children[i].getClientRects()[0] ||
children[i].getBoundingClientRect());
if (boundingRect.width > 1 && boundingRect.height > 1) {
visibleChildNode = true;
break;
}
}
if (visibleChildNode === false) {
return null;
}
}
if (boundingRect.top + boundingRect.height < 10 ||
boundingRect.left + boundingRect.width < -10) {
return null;
}
const computedStyle = window.getComputedStyle(node, null);
if (computedStyle.visibility !== "visible" ||
computedStyle.display === "none" ||
node.hasAttribute("disabled") ||
parseInt(computedStyle.width, 10) === 0 ||
parseInt(computedStyle.height, 10) === 0) {
return null;
}
return boundingRect.top >= -20;
}
function positionCaret() {
const walker = document.createTreeWalker(document.body, -1);
let node;
const textNodes = [];
let el;
while ((node = walker.nextNode())) {
if (node.nodeType === 3 && node.nodeValue.trim() !== "") {
textNodes.push(node);
}
}
for (let i = 0; i < textNodes.length; i++) {
const element = textNodes[i].parentElement;
if (isElementInViewport(element)) {
el = element;
break;
}
}
if (el !== undefined) {
/* eslint-disable no-use-before-define */
const start = new Cursor(el, 0, "");
const end = new Cursor(el, 0, "");
const nodesCrossed = [];
const result = TraverseUtil.getNextChar(
start, end, nodesCrossed, true);
if (result === null) {
return;
}
CaretBrowsing.setAndValidateSelection(start, start);
/* eslint-enable no-use-before-define */
}
}
/**
* Return whether a node is focusable. This includes nodes whose tabindex
* attribute is set to "-1" explicitly - these nodes are not in the tab
* order, but they should still be focused if the user navigates to them
* using linear or smart DOM navigation.
*
* Note that when the tabIndex property of an Element is -1, that doesn't
* tell us whether the tabIndex attribute is missing or set to "-1" explicitly,
* so we have to check the attribute.
*
* @param {Object} targetNode The node to check if it's focusable.
* @return {boolean} True if the node is focusable.
*/
function isFocusable(targetNode) {
if (!targetNode || typeof (targetNode.tabIndex) !== "number") {
return false;
}
if (targetNode.tabIndex >= 0) {
return true;
}
if (targetNode.hasAttribute &&
targetNode.hasAttribute("tabindex") &&
targetNode.getAttribute("tabindex") === "-1") {
return true;
}
return false;
}
const axs = {};
axs.dom = {};
axs.color = {};
axs.utils = {};
axs.dom.parentElement = function(node) {
if (!node) {
return null;
}
const composedNode = axs.dom.composedParentNode(node);
if (!composedNode) {
return null;
}
switch (composedNode.nodeType) {
case Node.ELEMENT_NODE:
return composedNode;
default:
return axs.dom.parentElement(composedNode);
}
};
axs.dom.shadowHost = function(node) {
if ("host" in node) {
return node.host;
}
return null;
};
axs.dom.composedParentNode = function(node) {
if (!node) {
return null;
}
if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
return axs.dom.shadowHost(node);
}
const parentNode = node.parentNode;
if (!parentNode) {
return null;
}
if (parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
return axs.dom.shadowHost(parentNode);
}
if (!parentNode.shadowRoot) {
return parentNode;
}
const points = node.getDestinationInsertionPoints();
if (points.length > 0) {
return axs.dom.composedParentNode(points[points.length - 1]);
}
return null;
};
axs.color.Color = function(red, green, blue, alpha) {
this.red = red;
this.green = green;
this.blue = blue;
this.alpha = alpha;
};
axs.color.parseColor = function(colorText) {
if (colorText === "transparent") {
return new axs.color.Color(0, 0, 0, 0);
}
let match = colorText.match(/^rgb\((\d+), (\d+), (\d+)\)$/);
if (match) {
const blue = parseInt(match[3], 10);
const green = parseInt(match[2], 10);
const red = parseInt(match[1], 10);
return new axs.color.Color(red, green, blue, 1);
}
match = colorText.match(/^rgba\((\d+), (\d+), (\d+), (\d*(\.\d+)?)\)/);
if (match) {
const red = parseInt(match[1], 10);
const green = parseInt(match[2], 10);
const blue = parseInt(match[3], 10);
const alpha = parseFloat(match[4]);
return new axs.color.Color(red, green, blue, alpha);
}
return null;
};
axs.color.flattenColors = function(color1, color2) {
const colorAlpha = color1.alpha;
return new axs.color.Color(
((1 - colorAlpha) * color2.red) + (colorAlpha * color1.red),
((1 - colorAlpha) * color2.green) + (colorAlpha * color1.green),
((1 - colorAlpha) * color2.blue) + (colorAlpha * color2.blue),
color1.alpha + (color2.alpha * (1 - color1.alpha)));
};
axs.utils.getParentBgColor = function(_el) {
let el = _el;
let el2 = el;
let iter = null;
el = [];
for (iter = null; (el2 = axs.dom.parentElement(el2));) {
const style = window.getComputedStyle(el2, null);
if (style) {
const color = axs.color.parseColor(style.backgroundColor);
if (color &&
(style.opacity < 1 &&
(color.alpha *= style.opacity), color.alpha !== 0 &&
(el.push(color), color.alpha === 1))) {
iter = !0;
break;
}
}
}
if (!iter) {
el.push(new axs.color.Color(255, 255, 255, 1));
}
for (el2 = el.pop(); el.length;) {
iter = el.pop();
el2 = axs.color.flattenColors(iter, el2);
}
return el2;
};
axs.utils.getFgColor = function(el, el2, color) {
let color2 = axs.color.parseColor(el.color);
if (!color2) {
return null;
}
if (color2.alpha < 1) {
color2 = axs.color.flattenColors(color2, color);
}
if (el.opacity < 1) {
const el3 = axs.utils.getParentBgColor(el2);
color2.alpha *= el.opacity;
color2 = axs.color.flattenColors(color2, el3);
}
return color2;
};
axs.utils.getBgColor = function(el, elParent) {
let color = axs.color.parseColor(el.backgroundColor);
if (!color) {
return null;
}
if (el.opacity < 1) {
color.alpha *= el.opacity;
}
if (color.alpha < 1) {
const bgColor = axs.utils.getParentBgColor(elParent);
if (bgColor === null) {
return null;
}
color = axs.color.flattenColors(color, bgColor);
}
return color;
};
axs.color.colorChannelToString = function(_color) {
const color = Math.round(_color);
if (color < 15) {
return `0${color.toString(16)}`;
}
return color.toString(16);
};
axs.color.colorToString = function(color) {
if (color.alpha === 1) {
const red = axs.color.colorChannelToString(color.red);
const green = axs.color.colorChannelToString(color.green);
const blue = axs.color.colorChannelToString(color.blue);
return `#${red}${green}${blue}`;
}
const arr = [color.red, color.green, color.blue, color.alpha].join();
return `rgba(${arr})`;
};
/**
* A class to represent a cursor location in the document,
* like the start position or end position of a selection range.
*
* Later this may be extended to support "virtual text" for an object,
* like the ALT text for an image.
*
* Note: we cache the text of a particular node at the time we
* traverse into it. Later we should add support for dynamically
* reloading it.
* @param {Node} node The DOM node.
* @param {number} index The index of the character within the node.
* @param {string} text The cached text contents of the node.
* @constructor
*/
// eslint-disable-next-line func-style
const Cursor = function(node, index, text) {
this.node = node;
this.index = index;
this.text = text;
};
/**
* @return {Cursor} A new cursor pointing to the same location.
*/
Cursor.prototype.clone = function() {
return new Cursor(this.node, this.index, this.text);
};
/**
* Modify this cursor to point to the location that another cursor points to.
* @param {Cursor} otherCursor The cursor to copy from.
*/
Cursor.prototype.copyFrom = function(otherCursor) {
this.node = otherCursor.node;
this.index = otherCursor.index;
this.text = otherCursor.text;
};
/**
* Utility functions for stateless DOM traversal.
* @constructor
*/
const TraverseUtil = {};
/**
* Gets the text representation of a node. This allows us to substitute
* alt text, names, or titles for html elements that provide them.
* @param {Node} node A DOM node.
* @return {string} A text string representation of the node.
*/
TraverseUtil.getNodeText = function(node) {
if (node.constructor === Text) {
return node.data;
}
return "";
};
/**
* Return true if a node should be treated as a leaf node, because
* its children are properties of the object that shouldn't be traversed.
*
* TODO(dmazzoni): replace this with a predicate that detects nodes with
* ARIA roles and other objects that have their own description.
* For now we just detect a couple of common cases.
*
* @param {Node} node A DOM node.
* @return {boolean} True if the node should be treated as a leaf node.
*/
TraverseUtil.treatAsLeafNode = function(node) {
return node.childNodes.length === 0 ||
node.nodeName === "SELECT" ||
node.nodeName === "OBJECT";
};
/**
* Return true only if a single character is whitespace.
* From https://developer.mozilla.org/en/Whitespace_in_the_DOM,
* whitespace is defined as one of the characters
* "\t" TAB \u0009
* "\n" LF \u000A
* "\r" CR \u000D
* " " SPC \u0020.
*
* @param {string} c A string containing a single character.
* @return {boolean} True if the character is whitespace, otherwise false.
*/
TraverseUtil.isWhitespace = function(ch) {
return (ch === " " || ch === "\n" || ch === "\r" || ch === "\t");
};
/**
* Use the computed CSS style to figure out if this DOM node is currently
* visible.
* @param {Node} node A HTML DOM node.
* @return {boolean} Whether or not the html node is visible.
*/
TraverseUtil.isVisible = function(node) {
if (!node.style) {
return true;
}
const style = window.getComputedStyle(node, null);
return (Boolean(style) &&
style.display !== "none" &&
style.visibility !== "hidden");
};
/**
* Use the class name to figure out if this DOM node should be traversed.
* @param {Node} node A HTML DOM node.
* @return {boolean} Whether or not the html node should be traversed.
*/
TraverseUtil.isSkipped = function(_node) {
let node = _node;
if (node.constructor === Text) {
node = node.parentElement;
}
if (node.className === "CaretBrowsing_Caret") {
return true;
}
return false;
};
/**
* Moves the cursor forwards until it has crossed exactly one character.
* @param {Cursor} cursor The cursor location where the search should start.
* On exit, the cursor will be immediately to the right of the
* character returned.
* @param {Array<Node>} nodesCrossed Any HTML nodes crossed between the
* initial and final cursor position will be pushed onto this array.
* @return {?string} The character found, or null if the bottom of the
* document has been reached.
*/
TraverseUtil.forwardsChar = function(cursor, nodesCrossed) {
for (;;) {
let childNode = null;
if (!TraverseUtil.treatAsLeafNode(cursor.node)) {
for (let i = cursor.index;
i < cursor.node.childNodes.length;
i++) {
const node = cursor.node.childNodes[i];
if (TraverseUtil.isSkipped(node)) {
nodesCrossed.push(node);
} else if (TraverseUtil.isVisible(node)) {
childNode = node;
break;
}
}
}
if (childNode) {
cursor.node = childNode;
cursor.index = 0;
cursor.text = TraverseUtil.getNodeText(cursor.node);
if (cursor.node.constructor !== Text) {
nodesCrossed.push(cursor.node);
}
} else {
// Return the next character from this leaf node.
if (cursor.index < cursor.text.length) {
return cursor.text[cursor.index++];
}
// Move to the next sibling, going up the tree as necessary.
while (cursor.node !== null) {
// Try to move to the next sibling.
let siblingNode = null;
for (let node = cursor.node.nextSibling;
node !== null;
node = node.nextSibling) {
if (TraverseUtil.isSkipped(node)) {
nodesCrossed.push(node);
} else if (TraverseUtil.isVisible(node)) {
siblingNode = node;
break;
}
}
if (siblingNode) {
cursor.node = siblingNode;
cursor.text = TraverseUtil.getNodeText(siblingNode);
cursor.index = 0;
if (cursor.node.constructor !== Text) {
nodesCrossed.push(cursor.node);
}
break;
}
// Otherwise, move to the parent.
const parentNode = cursor.node.parentNode;
if (parentNode &&
parentNode.constructor !== HTMLBodyElement) {
cursor.node = cursor.node.parentNode;
cursor.text = null;
cursor.index = 0;
} else {
return null;
}
}
}
}
};
/**
* Finds the next character, starting from endCursor. Upon exit, startCursor
* and endCursor will surround the next character. If skipWhitespace is
* true, will skip until a real character is found. Otherwise, it will
* attempt to select all of the whitespace between the initial position
* of endCursor and the next non-whitespace character.
* @param {Cursor} startCursor On exit, points to the position before
* the char.
* @param {Cursor} endCursor The position to start searching for the next
* char. On exit, will point to the position past the char.
* @param {Array<Node>} nodesCrossed Any HTML nodes crossed between the
* initial and final cursor position will be pushed onto this array.
* @param {boolean} skipWhitespace If true, will keep scanning until a
* non-whitespace character is found.
* @return {?string} The next char, or null if the bottom of the
* document has been reached.
*/
TraverseUtil.getNextChar = function(
startCursor, endCursor, nodesCrossed, skipWhitespace) {
// Save the starting position and get the first character.
startCursor.copyFrom(endCursor);
let fChar = TraverseUtil.forwardsChar(endCursor, nodesCrossed);
if (fChar === null) {
return null;
}
// Keep track of whether the first character was whitespace.
const initialWhitespace = TraverseUtil.isWhitespace(fChar);
// Keep scanning until we find a non-whitespace or non-skipped character.
while ((TraverseUtil.isWhitespace(fChar)) ||
(TraverseUtil.isSkipped(endCursor.node))) {
fChar = TraverseUtil.forwardsChar(endCursor, nodesCrossed);
if (fChar === null) {
return null;
}
}
if (skipWhitespace || !initialWhitespace) {
// If skipWhitepace is true, or if the first character we encountered
// was not whitespace, return that non-whitespace character.
startCursor.copyFrom(endCursor);
startCursor.index--;
return fChar;
}
for (let i = 0; i < nodesCrossed.length; i++) {
if (TraverseUtil.isSkipped(nodesCrossed[i])) {
// We need to make sure that startCursor and endCursor aren't
// surrounding a skippable node.
endCursor.index--;
startCursor.copyFrom(endCursor);
startCursor.index--;
return " ";
}
}
// Otherwise, return all of the whitespace before that last character.
endCursor.index--;
return " ";
};
/**
* The class handling the Caret Browsing implementation in the page.
* Sets up communication with the background page, and then when caret
* browsing is enabled, response to various key events to move the caret
* or selection within the text content of the document.
* @constructor
*/
const CaretBrowsing = {};
/**
* Is caret browsing enabled?
* @type {boolean}
*/
CaretBrowsing.isEnabled = false;
/**
* Keep it enabled even when flipped off (for the options page)?
* @type {boolean}
*/
CaretBrowsing.forceEnabled = false;
/**
* What to do when the caret appears?
* @type {string}
*/
CaretBrowsing.onEnable = undefined;
/**
* What to do when the caret jumps?
* @type {string}
*/
CaretBrowsing.onJump = undefined;
/**
* Is this window / iframe focused? We won't show the caret if not,
* especially so that carets aren't shown in two iframes of the same
* tab.
* @type {boolean}
*/
CaretBrowsing.isWindowFocused = false;
/**
* Is the caret actually visible? This is true only if isEnabled and
* isWindowFocused are both true.
* @type {boolean}
*/
CaretBrowsing.isCaretVisible = false;
/**
* Selection modes.
* NOTE: Values need to line up with SelectionState in browsertab.py!
*
* @type {enum}
*/
CaretBrowsing.SelectionState = {
"NONE": "none",
"NORMAL": "normal",
"LINE": "line",
};
/**
* The actual caret element, an absolute-positioned flashing line.
* @type {Element}
*/
CaretBrowsing.caretElement = undefined;
/**
* The x-position of the caret, in absolute pixels.
* @type {number}
*/
CaretBrowsing.caretX = 0;
/**
* The y-position of the caret, in absolute pixels.
* @type {number}
*/
CaretBrowsing.caretY = 0;
/**
* The width of the caret in pixels.
* @type {number}
*/
CaretBrowsing.caretWidth = 0;
/**
* The height of the caret in pixels.
* @type {number}
*/
CaretBrowsing.caretHeight = 0;
/**
* The foregroundc color.
* @type {string}
*/
CaretBrowsing.caretForeground = "#000";
/**
* The backgroundc color.
* @type {string}
*/
CaretBrowsing.caretBackground = "#fff";
/**
* Is the selection collapsed, i.e. are the start and end locations
* the same? If so, our blinking caret image is shown; otherwise
* the Chrome selection is shown.
* @type {boolean}
*/
CaretBrowsing.isSelectionCollapsed = false;
/**
* Whether we're running on Windows.
* @type {boolean}
*/
CaretBrowsing.isWindows = null;
/**
* Whether we're running on on old Qt 5.7.1.
* There, we need to use -webkit-filter.
* @type {boolean}
*/
CaretBrowsing.needsFilterPrefix = null;
/**
* The id returned by window.setInterval for our stopAnimation function, so
* we can cancel it when we call stopAnimation again.
* @type {number?}
*/
CaretBrowsing.animationFunctionId = null;
/**
* Check if a node is a control that normally allows the user to interact
* with it using arrow keys. We won't override the arrow keys when such a
* control has focus, the user must press Escape to do caret browsing outside
* that control.
* @param {Node} node A node to check.
* @return {boolean} True if this node is a control that the user can
* interact with using arrow keys.
*/
CaretBrowsing.isControlThatNeedsArrowKeys = function(node) {
if (!node) {
return false;
}
if (node === document.body || node !== document.activeElement) {
return false;
}
if (node.constructor === HTMLSelectElement) {
return true;
}
if (node.constructor === HTMLInputElement) {
switch (node.type) {
case "email":
case "number":
case "password":
case "search":
case "text":
case "tel":
case "url":
case "":
return true; // All of these are text boxes.
case "datetime":
case "datetime-local":
case "date":
case "month":
case "radio":
case "range":
case "week":
return true; // These are other input elements that use arrows.
}
}
// Handle focusable ARIA controls.
if (node.getAttribute && isFocusable(node)) {
const role = node.getAttribute("role");
switch (role) {
case "combobox":
case "grid":
case "gridcell":
case "listbox":
case "menu":
case "menubar":
case "menuitem":
case "menuitemcheckbox":
case "menuitemradio":
case "option":
case "radiogroup":
case "scrollbar":
case "slider":
case "spinbutton":
case "tab":
case "tablist":
case "textbox":
case "tree":
case "treegrid":
case "treeitem":
return true;
}
}
return false;
};
CaretBrowsing.injectCaretStyles = function() {
const prefix = CaretBrowsing.needsFilterPrefix ? "-webkit-" : "";
const style = `
.CaretBrowsing_Caret {
position: absolute;
z-index: 2147483647;
min-height: 1em;
min-width: 0.2em;
animation: blink 1s step-end infinite;
--inherited-color: inherit;
background-color: var(--inherited-color, #000);
color: var(--inherited-color, #000);
mix-blend-mode: difference;
${prefix}filter: invert(85%);
}
@keyframes blink {
50% { visibility: hidden; }
}
`;
const node = document.createElement("style");
node.innerHTML = style;
document.body.appendChild(node);
};
/**
* If there's no initial selection, set the cursor just before the
* first text character in the document.
*/
CaretBrowsing.setInitialCursor = function() {
const selectionRange = window.getSelection().toString().length;
if (selectionRange === 0) {
positionCaret();
}
CaretBrowsing.injectCaretStyles();
CaretBrowsing.toggle();
CaretBrowsing.initiated = true;
if (selectionRange > 0) {
CaretBrowsing.selectionState = CaretBrowsing.SelectionState.NORMAL;
} else {
CaretBrowsing.selectionState = CaretBrowsing.SelectionState.NONE;
}
};
/**
* Try to set the window's selection to be between the given start and end
* cursors, and return whether or not it was successful.
* @param {Cursor} start The start position.
* @param {Cursor} end The end position.
* @return {boolean} True if the selection was successfully set.
*/
CaretBrowsing.setAndValidateSelection = function(start, end) {
const sel = window.getSelection();
sel.setBaseAndExtent(start.node, start.index, end.node, end.index);
if (sel.rangeCount !== 1) {
return false;
}
return (sel.anchorNode === start.node &&
sel.anchorOffset === start.index &&
sel.focusNode === end.node &&
sel.focusOffset === end.index);
};
/**
* Set focus to a node if it's focusable. If it's an input element,
* select the text, otherwise it doesn't appear focused to the user.
* Every other control behaves normally if you just call focus() on it.
* @param {Node} node The node to focus.
* @return {boolean} True if the node was focused.
*/
CaretBrowsing.setFocusToNode = function(nodeArg) {
let node = nodeArg;
while (node && node !== document.body) {
if (isFocusable(node) && node.constructor !== HTMLIFrameElement) {
node.focus();
if (node.constructor === HTMLInputElement && node.select) {
node.select();
}
return true;
}
node = node.parentNode;
}
return false;
};
/**
* Set the caret element's normal style, i.e. not when animating.
*/
CaretBrowsing.setCaretElementNormalStyle = function() {
const element = CaretBrowsing.caretElement;
element.className = "CaretBrowsing_Caret";
if (CaretBrowsing.isSelectionCollapsed) {
element.style.opacity = "1.0";
} else {
element.style.opacity = "0.0";
}
element.style.left = `${CaretBrowsing.caretX}px`;
element.style.top = `${CaretBrowsing.caretY}px`;
element.style.width = `${CaretBrowsing.caretWidth}px`;
element.style.height = `${CaretBrowsing.caretHeight}px`;
element.style.color = CaretBrowsing.caretForeground;
};
/**
* Create the caret element. This assumes that caretX, caretY,
* caretWidth, and caretHeight have all been set. The caret is
* animated in so the user can find it when it first appears.
*/
CaretBrowsing.createCaretElement = function() {
const element = document.createElement("div");
element.className = "CaretBrowsing_Caret";
document.body.appendChild(element);
CaretBrowsing.caretElement = element;
CaretBrowsing.setCaretElementNormalStyle();
};
/**
* Recreate the caret element, triggering any intro animation.
*/
CaretBrowsing.recreateCaretElement = function() {
if (CaretBrowsing.caretElement) {
CaretBrowsing.caretElement.parentElement.removeChild(
CaretBrowsing.caretElement);
CaretBrowsing.caretElement = null;
CaretBrowsing.updateIsCaretVisible();
}
};
/**
* Get the rectangle for a cursor position. This is tricky because
* you can't get the bounding rectangle of an empty range, so this function
* computes the rect by trying a range including one character earlier or
* later than the cursor position.
* @param {Cursor} cursor A single cursor position.
* @return {{left: number, top: number, width: number, height: number}}
* The bounding rectangle of the cursor.
*/
CaretBrowsing.getCursorRect = function(cursor) {
let node = cursor.node;
const index = cursor.index;
const rect = {
"left": 0,
"top": 0,
"width": 1,
"height": 0,
};
if (node.constructor === Text) {
let left = index;
let right = index;
const max = node.data.length;
const newRange = document.createRange();
while (left > 0 || right < max) {
if (left > 0) {
left--;
newRange.setStart(node, left);
newRange.setEnd(node, index);
const rangeRect = newRange.getBoundingClientRect();
if (rangeRect && rangeRect.width && rangeRect.height) {
rect.left = rangeRect.right;
rect.top = rangeRect.top;
rect.height = rangeRect.height;
break;
}
}
if (right < max) {
right++;
newRange.setStart(node, index);
newRange.setEnd(node, right);
const rangeRect = newRange.getBoundingClientRect();
if (rangeRect && rangeRect.width && rangeRect.height) {
rect.left = rangeRect.left;
rect.top = rangeRect.top;
rect.height = rangeRect.height;
break;
}
}
}
} else {
rect.height = node.offsetHeight;
while (node !== null) {
rect.left += node.offsetLeft;
rect.top += node.offsetTop;
node = node.offsetParent;
}
}
rect.left += window.pageXOffset;
rect.top += window.pageYOffset;
return rect;
};
/**
* Compute the new location of the caret or selection and update
* the element as needed.
* @param {boolean} scrollToSelection If true, will also scroll the page
* to the caret / selection location.
*/
CaretBrowsing.updateCaretOrSelection =
function(scrollToSelection) {
const sel = window.getSelection();
if (sel.rangeCount === 0) {
if (CaretBrowsing.caretElement) {
CaretBrowsing.isSelectionCollapsed = false;
CaretBrowsing.caretElement.style.opacity = "0.0";
}
return;
}
const range = sel.getRangeAt(0);
if (!range) {
if (CaretBrowsing.caretElement) {
CaretBrowsing.isSelectionCollapsed = false;
CaretBrowsing.caretElement.style.opacity = "0.0";
}
return;
}
if (CaretBrowsing.isControlThatNeedsArrowKeys(
document.activeElement)) {
let node = document.activeElement;
CaretBrowsing.caretWidth = node.offsetWidth;
CaretBrowsing.caretHeight = node.offsetHeight;
CaretBrowsing.caretX = 0;
CaretBrowsing.caretY = 0;
while (node.offsetParent) {
CaretBrowsing.caretX += node.offsetLeft;
CaretBrowsing.caretY += node.offsetTop;
node = node.offsetParent;
}
CaretBrowsing.isSelectionCollapsed = false;
} else if (range.startOffset !== range.endOffset ||
range.startContainer !== range.endContainer) {
const rect = range.getBoundingClientRect();
if (!rect) {
return;
}
CaretBrowsing.caretX = rect.left + window.pageXOffset;
CaretBrowsing.caretY = rect.top + window.pageYOffset;
CaretBrowsing.caretWidth = rect.width;
CaretBrowsing.caretHeight = rect.height;
CaretBrowsing.isSelectionCollapsed = false;
} else {
const rect = CaretBrowsing.getCursorRect(
new Cursor(range.startContainer,
range.startOffset,
TraverseUtil.getNodeText(range.startContainer)));
CaretBrowsing.caretX = rect.left;
CaretBrowsing.caretY = rect.top;
CaretBrowsing.caretWidth = rect.width;
CaretBrowsing.caretHeight = rect.height;
CaretBrowsing.isSelectionCollapsed = true;
}
if (CaretBrowsing.caretElement) {
const element = CaretBrowsing.caretElement;
if (CaretBrowsing.isSelectionCollapsed) {
element.style.opacity = "1.0";
element.style.left = `${CaretBrowsing.caretX}px`;
element.style.top = `${CaretBrowsing.caretY}px`;
element.style.width = `${CaretBrowsing.caretWidth}px`;
element.style.height = `${CaretBrowsing.caretHeight}px`;
} else {
element.style.opacity = "0.0";
}
} else {
CaretBrowsing.createCaretElement();
}
let elem = range.startContainer;
if (elem.constructor === Text) {
elem = elem.parentElement;
}
const style = window.getComputedStyle(elem);
const bg = axs.utils.getBgColor(style, elem);
const fg = axs.utils.getFgColor(style, elem, bg);
CaretBrowsing.caretBackground = axs.color.colorToString(bg);
CaretBrowsing.caretForeground = axs.color.colorToString(fg);
if (scrollToSelection) {
// Scroll just to the "focus" position of the selection,
// the part the user is manipulating.
const rect = CaretBrowsing.getCursorRect(
new Cursor(sel.focusNode, sel.focusOffset,
TraverseUtil.getNodeText(sel.focusNode)));
const yscroll = window.pageYOffset;
const pageHeight = window.innerHeight;
const caretY = rect.top;
const caretHeight = Math.min(rect.height, 30);
if (yscroll + pageHeight < caretY + caretHeight) {
window.scroll(0, (caretY + caretHeight - pageHeight + 100));
} else if (caretY < yscroll) {
window.scroll(0, (caretY - 100));
}
}
};
CaretBrowsing.reverseSelection = () => {
const sel = window.getSelection();
sel.setBaseAndExtent(
sel.extentNode, sel.extentOffset, sel.baseNode,
sel.baseOffset
);
};
CaretBrowsing.selectLine = function() {
const sel = window.getSelection();
sel.modify("extend", "right", "lineboundary");
CaretBrowsing.reverseSelection();
sel.modify("extend", "left", "lineboundary");
CaretBrowsing.reverseSelection();
};
CaretBrowsing.updateLineSelection = function(direction, granularity) {
if (granularity !== "character" && granularity !== "word") {
window.
getSelection().
modify("extend", direction, granularity);
CaretBrowsing.selectLine();
}
};
CaretBrowsing.move = function(direction, granularity, count = 1) {
let action = "move";
if (CaretBrowsing.selectionState !== CaretBrowsing.SelectionState.NONE) {
action = "extend";
}
for (let i = 0; i < count; i++) {
if (CaretBrowsing.selectionState === CaretBrowsing.SelectionState.LINE) {
CaretBrowsing.updateLineSelection(direction, granularity);
} else {
window.
getSelection().
modify(action, direction, granularity);
}
}
if (CaretBrowsing.isWindows &&
(direction === "forward" ||
direction === "right") &&
granularity === "word") {
CaretBrowsing.move("left", "character");
}
};
CaretBrowsing.finishMove = function() {
window.setTimeout(() => {
CaretBrowsing.updateCaretOrSelection(true);
}, 0);
CaretBrowsing.stopAnimation();
};
CaretBrowsing.moveToBlock = function(paragraph, boundary, count = 1) {
let action = "move";
if (CaretBrowsing.selectionState !== CaretBrowsing.SelectionState.NONE) {
action = "extend";
}
for (let i = 0; i < count; i++) {
window.
getSelection().
modify(action, paragraph, "paragraph");
window.
getSelection().
modify(action, boundary, "paragraphboundary");
if (CaretBrowsing.selectionState === CaretBrowsing.SelectionState.LINE) {
CaretBrowsing.selectLine();
}
}
};
CaretBrowsing.toggle = function(value) {
if (CaretBrowsing.forceEnabled) {
CaretBrowsing.recreateCaretElement();
return;
}
if (value === undefined) {
CaretBrowsing.isEnabled = !CaretBrowsing.isEnabled;
} else {
CaretBrowsing.isEnabled = value;
}
CaretBrowsing.updateIsCaretVisible();
};
/**
* Event handler, called when the mouse is clicked. Chrome already
* sets the selection when the mouse is clicked, all we need to do is
* update our cursor.
* @param {Event} evt The DOM event.
* @return {boolean} True if the default action should be performed.
*/
CaretBrowsing.onClick = function() {
if (!CaretBrowsing.isEnabled) {
return true;
}
window.setTimeout(() => {
CaretBrowsing.updateCaretOrSelection(false);
}, 0);
return true;
};
/**
* Update whether or not the caret is visible, based on whether caret browsing
* is enabled and whether this window / iframe has focus.
*/
CaretBrowsing.updateIsCaretVisible = function() {
CaretBrowsing.isCaretVisible =
(CaretBrowsing.isEnabled && CaretBrowsing.isWindowFocused);
if (CaretBrowsing.isCaretVisible && !CaretBrowsing.caretElement) {
CaretBrowsing.setInitialCursor();
CaretBrowsing.updateCaretOrSelection(true);
} else if (!CaretBrowsing.isCaretVisible &&
CaretBrowsing.caretElement) {
if (CaretBrowsing.caretElement) {
CaretBrowsing.isSelectionCollapsed = false;
CaretBrowsing.caretElement.parentElement.removeChild(
CaretBrowsing.caretElement);
CaretBrowsing.caretElement = null;
}
}
};
CaretBrowsing.onWindowFocus = function() {
CaretBrowsing.isWindowFocused = true;
CaretBrowsing.updateIsCaretVisible();
};
CaretBrowsing.onWindowBlur = function() {
CaretBrowsing.isWindowFocused = false;
CaretBrowsing.updateIsCaretVisible();
};
CaretBrowsing.startAnimation = function() {
if (CaretBrowsing.caretElement) {
CaretBrowsing.caretElement.style.animationIterationCount = "infinite";
}
};
CaretBrowsing.stopAnimation = function() {
if (CaretBrowsing.caretElement) {
CaretBrowsing.caretElement.style.animationIterationCount = 0;
window.clearTimeout(CaretBrowsing.animationFunctionId);
CaretBrowsing.animationFunctionId = window.setTimeout(() => {
CaretBrowsing.startAnimation();
}, 1000);
}
};
CaretBrowsing.init = function() {
CaretBrowsing.isWindowFocused = document.hasFocus();
document.addEventListener("click", CaretBrowsing.onClick, false);
window.addEventListener("focus", CaretBrowsing.onWindowFocus, false);
window.addEventListener("blur", CaretBrowsing.onWindowBlur, false);
};
window.setTimeout(() => {
if (!window.caretBrowsingLoaded) {
window.caretBrowsingLoaded = true;
CaretBrowsing.init();
if (document.body &&
document.body.getAttribute("caretbrowsing") === "on") {
CaretBrowsing.forceEnabled = true;
CaretBrowsing.isEnabled = true;
CaretBrowsing.updateIsCaretVisible();
}
}
}, 0);
const funcs = {};
funcs.setInitialCursor = () => {
if (!CaretBrowsing.initiated) {
CaretBrowsing.setInitialCursor();
return CaretBrowsing.selectionState !== CaretBrowsing.SelectionState.NONE;
}
if (window.getSelection().toString().length === 0) {
positionCaret();
}
CaretBrowsing.toggle();
return CaretBrowsing.selectionState !== CaretBrowsing.SelectionState.NONE;
};
funcs.setFlags = (flags) => {
CaretBrowsing.isWindows = flags.includes("windows");
CaretBrowsing.needsFilterPrefix = flags.includes("filter-prefix");
};
funcs.disableCaret = () => {
CaretBrowsing.toggle(false);
};
funcs.toggle = () => {
CaretBrowsing.toggle();
};
funcs.moveRight = (count = 1) => {
CaretBrowsing.move("right", "character", count);
CaretBrowsing.finishMove();
};
funcs.moveLeft = (count = 1) => {
CaretBrowsing.move("left", "character", count);
CaretBrowsing.finishMove();
};
funcs.moveDown = (count = 1) => {
CaretBrowsing.move("forward", "line", count);
CaretBrowsing.finishMove();
};
funcs.moveUp = (count = 1) => {
CaretBrowsing.move("backward", "line", count);
CaretBrowsing.finishMove();
};
funcs.moveToEndOfWord = (count = 1) => {
CaretBrowsing.move("forward", "word", count);
CaretBrowsing.finishMove();
};
funcs.moveToNextWord = (count = 1) => {
CaretBrowsing.move("forward", "word", count);
CaretBrowsing.move("right", "character");
CaretBrowsing.finishMove();
};
funcs.moveToPreviousWord = (count = 1) => {
CaretBrowsing.move("backward", "word", count);
CaretBrowsing.finishMove();
};
funcs.moveToStartOfLine = () => {
CaretBrowsing.move("left", "lineboundary");
CaretBrowsing.finishMove();
};
funcs.moveToEndOfLine = () => {
CaretBrowsing.move("right", "lineboundary");
CaretBrowsing.finishMove();
};
funcs.moveToStartOfNextBlock = (count = 1) => {
CaretBrowsing.moveToBlock("forward", "backward", count);
CaretBrowsing.finishMove();
};
funcs.moveToStartOfPrevBlock = (count = 1) => {
CaretBrowsing.moveToBlock("backward", "backward", count);
CaretBrowsing.finishMove();
};
funcs.moveToEndOfNextBlock = (count = 1) => {
CaretBrowsing.moveToBlock("forward", "forward", count);
CaretBrowsing.finishMove();
};
funcs.moveToEndOfPrevBlock = (count = 1) => {
CaretBrowsing.moveToBlock("backward", "forward", count);
CaretBrowsing.finishMove();
};
funcs.moveToStartOfDocument = () => {
CaretBrowsing.move("backward", "documentboundary");
CaretBrowsing.finishMove();
};
funcs.moveToEndOfDocument = () => {
CaretBrowsing.move("forward", "documentboundary");
CaretBrowsing.finishMove();
};
funcs.dropSelection = () => {
window.getSelection().removeAllRanges();
};
funcs.getSelection = () => window.getSelection().toString();
funcs.toggleSelection = (line) => {
if (line) {
CaretBrowsing.selectionState =
CaretBrowsing.SelectionState.LINE;
CaretBrowsing.selectLine();
CaretBrowsing.finishMove();
} else if (CaretBrowsing.selectionState !== CaretBrowsing.SelectionState.NORMAL) {
CaretBrowsing.selectionState = CaretBrowsing.SelectionState.NORMAL;
} else {
CaretBrowsing.selectionState = CaretBrowsing.SelectionState.NONE;
}
return CaretBrowsing.selectionState;
};
funcs.reverseSelection = () => {
CaretBrowsing.reverseSelection();
};
return funcs;
})();
|
{
"pile_set_name": "Github"
}
|
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Using TensorFlow backend.\n"
]
}
],
"source": [
"import numpy as np\n",
"import json\n",
"from keras.models import Model\n",
"from keras.layers import Input\n",
"from keras.layers.convolutional import Conv2D\n",
"from keras import backend as K\n",
"from collections import OrderedDict"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"def format_decimal(arr, places=6):\n",
" return [round(x * 10**places) / 10**places for x in arr]"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"DATA = OrderedDict()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### pipeline 1"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"random_seed = 1000\n",
"data_in_shape = (17, 17, 2)\n",
"\n",
"layers = [\n",
" Conv2D(5, (3,3), activation='relu', padding='same', strides=(2, 2), data_format='channels_last', use_bias=True),\n",
" Conv2D(4, (3,3), activation='linear', padding='same', strides=(1, 1), data_format='channels_last', use_bias=True),\n",
" Conv2D(2, (3,3), activation='relu', padding='valid', strides=(1, 1), data_format='channels_last', use_bias=True),\n",
" Conv2D(3, (5,5), activation='relu', padding='valid', strides=(1, 1), data_format='channels_last', use_bias=True),\n",
" Conv2D(2, (3,3), activation='linear', padding='valid', strides=(1, 1), data_format='channels_last', use_bias=True)\n",
"]\n",
"\n",
"input_layer = Input(shape=data_in_shape)\n",
"x = layers[0](input_layer)\n",
"for layer in layers[1:-1]:\n",
" x = layer(x)\n",
"output_layer = layers[-1](x)\n",
"model = Model(inputs=input_layer, outputs=output_layer)\n",
"\n",
"np.random.seed(random_seed)\n",
"data_in = 2 * np.random.random(data_in_shape) - 1\n",
"\n",
"# set weights to random (use seed for reproducibility)\n",
"weights = []\n",
"for i, w in enumerate(model.get_weights()):\n",
" np.random.seed(random_seed + i)\n",
" weights.append(2 * np.random.random(w.shape) - 1)\n",
"model.set_weights(weights)\n",
"\n",
"result = model.predict(np.array([data_in]))\n",
"data_out_shape = result[0].shape\n",
"data_in_formatted = format_decimal(data_in.ravel().tolist())\n",
"data_out_formatted = format_decimal(result[0].ravel().tolist())\n",
"\n",
"DATA['pipeline_01'] = {\n",
" 'input': {'data': data_in_formatted, 'shape': data_in_shape},\n",
" 'weights': [{'data': format_decimal(w.ravel().tolist()), 'shape': w.shape} for w in weights],\n",
" 'expected': {'data': data_out_formatted, 'shape': data_out_shape}\n",
"}"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### export for Keras.js tests"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"import os\n",
"\n",
"filename = '../../test/data/pipeline/01.json'\n",
"if not os.path.exists(os.path.dirname(filename)):\n",
" os.makedirs(os.path.dirname(filename))\n",
"with open(filename, 'w') as f:\n",
" json.dump(DATA, f)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{\"pipeline_01\": {\"input\": {\"data\": [0.307179, -0.769986, 0.900566, -0.035617, 0.744949, -0.575335, -0.918581, -0.205611, -0.533736, 0.683481, -0.585835, 0.484939, -0.215692, -0.635487, 0.487079, -0.860836, 0.770674, 0.905289, 0.862287, -0.169138, -0.942037, 0.964055, -0.320725, 0.413374, -0.276246, -0.929788, 0.710117, 0.314507, 0.531366, 0.108174, 0.770186, 0.808395, -0.979157, -0.850887, -0.510742, -0.73339, 0.39585, -0.20359, 0.766244, -0.637985, -0.135002, -0.963714, 0.382876, -0.060619, -0.743556, 0.782674, 0.836407, -0.853758, -0.909104, -0.122854, 0.203442, -0.379546, 0.363816, -0.581974, 0.039209, 0.131978, -0.117665, -0.724888, -0.572914, -0.733256, -0.355407, -0.532226, 0.054996, 0.131942, -0.123549, -0.356255, 0.119282, 0.730691, 0.694566, -0.784366, -0.367361, -0.181043, 0.374178, 0.404471, -0.107604, -0.159356, 0.605261, 0.077235, 0.847001, -0.876185, -0.264833, 0.940798, 0.398208, 0.781951, -0.492895, 0.451054, -0.593011, 0.075024, -0.526114, -0.127016, 0.596049, -0.383182, 0.243033, -0.120704, 0.826647, 0.317372, 0.307263, -0.283084, 0.045883, -0.909825, -0.811381, 0.843224, -0.853911, 0.858835, 0.43403, 0.244621, 0.509979, -0.71666, 0.587644, 0.450806, 0.082879, -0.034831, -0.047045, -0.107934, 0.63214, -0.451297, -0.876076, 0.920593, -0.083764, 0.515784, 0.362317, 0.083556, -0.734335, -0.493589, -0.112289, 0.1175, 0.627729, -0.364343, -0.20591, 0.780336, 0.650832, -0.786626, -0.680448, 0.302439, 0.138128, 0.968167, 0.498318, 0.604799, -0.54338, 0.037427, 0.260217, -0.995629, 0.02643, -0.10162, -0.301287, -0.452637, 0.804166, -0.938051, -0.351662, -0.426815, 0.914272, -0.966934, -0.085353, -0.350128, 0.392927, 0.3855, 0.365292, 0.784261, 0.891156, -0.836385, -0.766222, -0.926262, 0.84758, 0.963802, -0.246749, -0.873048, -0.744287, 0.759778, -0.091904, -0.601018, 0.252064, 0.552859, -0.070904, -0.919266, -0.252198, 0.733837, -0.793589, -0.774978, 0.560268, -0.729902, -0.742883, -0.518994, -0.416378, -0.333527, 0.584328, -0.511306, -0.78923, -0.765839, -0.281298, -0.532119, 0.65626, 0.221575, -0.420019, 0.994877, -0.161517, 0.789445, -0.423508, -0.37311, 0.961123, -0.821726, 0.760378, 0.920009, -0.318366, 0.831071, 0.797277, 0.998735, -0.764629, 0.190218, 0.571854, 0.451473, 0.659159, -0.961103, 0.893633, -0.673254, -0.945135, 0.958047, -0.630267, 0.668912, -0.97545, -0.932668, -0.855912, 0.273892, -0.508473, -0.147774, 0.92673, -0.589615, -0.529108, -0.026501, -0.442497, 0.043248, -0.097879, -0.32872, -0.976222, 0.516042, 0.77989, -0.275965, -0.066363, -0.878685, 0.477652, -0.531969, -0.738158, -0.719768, -0.598863, 0.459657, -0.136082, 0.397067, -0.716891, -0.552125, 0.645655, -0.992376, -0.547147, 0.675121, 0.359423, -0.452114, 0.642834, -0.65893, 0.084555, 0.198223, 0.947512, 0.347592, -0.30919, 0.017157, -0.504988, 0.975185, -0.18213, -0.827767, 0.962281, 0.793245, 0.066392, -0.929715, 0.675438, 0.807816, 0.260682, -0.437998, 0.865408, -0.964172, -0.358725, -0.297628, 0.698402, -0.991327, 0.296135, 0.111031, -0.325199, -0.829535, -0.706708, 0.315692, -0.908343, -0.876177, -0.084321, 0.042117, -0.96889, 0.065587, -0.761545, -0.771358, 0.370507, -0.371447, 0.567487, 0.906827, 0.306348, 0.991507, -0.251738, -0.179506, -0.13481, 0.009328, 0.50426, -0.478935, -0.23036, 0.482967, 0.108361, 0.323875, -0.107073, 0.484604, 0.976787, -0.757528, 0.55991, -0.087214, -0.45433, 0.964335, -0.710762, -0.223378, 0.338984, -0.566817, -0.423957, -0.133355, 0.771202, -0.348399, 0.698459, -0.553718, 0.362846, 0.765188, -0.810349, 0.415447, -0.261726, 0.141378, 0.394877, -0.236814, -0.136671, -0.605446, -0.816587, -0.834155, -0.867417, -0.005713, 0.832653, -0.74534, 0.015888, -0.859369, 0.263748, -0.514297, -0.724415, -0.519365, -0.26064, 0.562583, 0.556172, -0.894421, 0.485605, 0.068895, -0.574381, 0.952707, 0.854282, -0.816716, 0.566863, -0.851922, -0.304581, 0.940295, -0.092955, -0.252095, -0.366209, 0.8118, 0.609144, 0.66955, 0.296141, -0.522011, -0.547367, -0.046487, -0.141129, -0.683622, -0.608246, -0.942115, 0.200807, -0.171167, 0.913158, -0.576902, -0.177556, -0.085063, 0.942418, -0.803642, -0.231319, 0.110499, 0.216448, 0.554095, -0.775795, -0.858061, -0.894796, -0.177721, 0.812784, 0.032743, 0.14351, 0.759765, -0.70414, -0.310653, -0.70489, -0.174463, -0.927175, -0.788743, -0.979671, 0.48012, 0.132285, -0.671046, -0.958749, 0.945391, 0.040751, -0.738711, 0.822168, 0.910797, 0.662187, 0.325641, -0.134855, 0.310373, -0.499573, 0.135194, 0.376075, 0.742203, -0.185185, 0.681693, -0.614504, 0.345224, 0.663712, 0.014513, 0.42408, 0.833134, -0.260953, -0.078377, -0.933143, -0.000877, -0.478206, 0.430175, -0.840631, 0.428118, 0.846154, -0.40912, 0.509388, 0.669512, 0.756252, -0.375561, -0.551532, 0.88488, 0.436005, -0.751576, -0.563339, 0.004887, 0.137054, 0.19583, -0.215128, -0.232628, -0.257705, 0.010894, -0.638739, 0.98891, 0.761058, 0.692921, 0.183508, 0.590217, -0.769043, 0.707619, -0.393498, 0.806385, -0.468566, -0.96876, 0.760738, 0.436183, -0.535061, -0.5628, 0.886738, 0.816212, 0.004339, -0.891716, 0.782022, 0.107881, 0.594794, 0.171877, -0.817309, 0.675026, 0.824638, -0.890092, -0.45473, -0.371234, 0.087631, -0.569719, -0.864876, 0.215788, 0.716897, 0.727561, -0.569618, -0.850193, 0.307958, -0.477611, 0.660603, 0.779336, 0.535998, -0.280336, -0.701544, -0.055577, 0.706065, 0.288925, -0.635776, -0.431255, 0.831398, 0.454381, 0.062509, 0.856797, -0.675694, -0.783077, 0.829229, 0.012088, 0.298661, -0.092186, 0.103526, 0.322325, -0.303668, 0.574324, -0.879712, 0.924606, -0.743586, -0.737669, -0.977774, -0.04452, 0.338219, -0.214654, -0.549583, 0.314906, -0.659444, -0.128102, 0.719527, 0.643744, 0.405795, 0.500263, -0.968486, -0.103665, 0.381867, -0.002469, -0.078127, 0.806476, -0.87487, -0.409392, 0.632035, -0.159183, -0.01837, -0.464667, 0.171106, 0.491622, -0.939924, 0.929357, 0.889669, 0.693238, -0.425875, -0.792446, 0.992246, -0.714005, 0.477842, 0.014597, 0.088993, 0.478136, -0.63804, -0.777092, -0.704203, 0.141475, -0.285228, 0.287741, 0.136988, 0.121701, 0.481481, 0.098355, -0.759691, 0.258656, 0.925657, 0.56495, 0.004887, 0.934166], \"shape\": [17, 17, 2]}, \"weights\": [{\"data\": [0.307179, -0.769986, 0.900566, -0.035617, 0.744949, -0.575335, -0.918581, -0.205611, -0.533736, 0.683481, -0.585835, 0.484939, -0.215692, -0.635487, 0.487079, -0.860836, 0.770674, 0.905289, 0.862287, -0.169138, -0.942037, 0.964055, -0.320725, 0.413374, -0.276246, -0.929788, 0.710117, 0.314507, 0.531366, 0.108174, 0.770186, 0.808395, -0.979157, -0.850887, -0.510742, -0.73339, 0.39585, -0.20359, 0.766244, -0.637985, -0.135002, -0.963714, 0.382876, -0.060619, -0.743556, 0.782674, 0.836407, -0.853758, -0.909104, -0.122854, 0.203442, -0.379546, 0.363816, -0.581974, 0.039209, 0.131978, -0.117665, -0.724888, -0.572914, -0.733256, -0.355407, -0.532226, 0.054996, 0.131942, -0.123549, -0.356255, 0.119282, 0.730691, 0.694566, -0.784366, -0.367361, -0.181043, 0.374178, 0.404471, -0.107604, -0.159356, 0.605261, 0.077235, 0.847001, -0.876185, -0.264833, 0.940798, 0.398208, 0.781951, -0.492895, 0.451054, -0.593011, 0.075024, -0.526114, -0.127016], \"shape\": [3, 3, 2, 5]}, {\"data\": [-0.387536, -0.469873, -0.60788, -0.138957, -0.953773], \"shape\": [5]}, {\"data\": [-0.742023, -0.077688, -0.167692, 0.205448, -0.633864, -0.164175, -0.731823, 0.313236, 0.613465, -0.723716, -0.299231, 0.229032, 0.102561, 0.384949, -0.90948, -0.294898, -0.916217, -0.699031, -0.323329, -0.673445, 0.521949, -0.306796, -0.476018, -0.628623, 0.808028, -0.585043, -0.307429, -0.234868, -0.897584, 0.741743, 0.320785, 0.709132, -0.978084, 0.601894, -0.228816, -0.069558, -0.522066, -0.399597, -0.916222, 0.161549, -0.211915, 0.823372, -0.6549, -0.30403, 0.677588, -0.431259, 0.219659, -0.091937, -0.101636, -0.595218, -0.815428, 0.502932, 0.775249, 0.624226, 0.622601, -0.091075, 0.763603, 0.472659, 0.621131, -0.504549, -0.270214, 0.492749, 0.643055, -0.290058, -0.752162, 0.758918, 0.011832, -0.183967, 0.768298, 0.764241, 0.906398, 0.872853, -0.292238, 0.16788, -0.447741, 0.679196, 0.566614, 0.867549, -0.011606, -0.252108, 0.165669, -0.509362, 0.620632, -0.32465, -0.071143, -0.823613, 0.331067, -0.016903, -0.76138, -0.491146, 0.106088, -0.641492, 0.234893, 0.658853, -0.475623, 0.269103, 0.935505, -0.577134, 0.985015, -0.405957, -0.325882, 0.849518, -0.589155, 0.378331, -0.753075, 0.711411, 0.04547, 0.398327, -0.665657, 0.531142, -0.410293, -0.526649, 0.860648, 0.32795, -0.197082, -0.095526, -0.391361, 0.785465, -0.267269, -0.020154, -0.95189, -0.580742, 0.788104, -0.092433, 0.320354, 0.070651, 0.045416, 0.99799, 0.583116, -0.708131, -0.104784, -0.838947, -0.598224, 0.209105, 0.824956, 0.10438, 0.692046, -0.091308, 0.884896, 0.730617, 0.244486, -0.415624, -0.397714, -0.647236, -0.816162, 0.001325, 0.593873, -0.243723, 0.168275, 0.192345, -0.522916, 0.458154, -0.333828, -0.014549, -0.744552, -0.203297, 0.771256, -0.703928, 0.998892, -0.947633, 0.566086, -0.274437, -0.218108, -0.800599, 0.504541, 0.233776, -0.111802, -0.03089, 0.761595, 0.537963, 0.217941, -0.910822, 0.531235, -0.018533, -0.161811, -0.200401, -0.742618, -0.35126, -0.954474, -0.071092], \"shape\": [3, 3, 5, 4]}, {\"data\": [0.195612, -0.128132, -0.96626, 0.193375], \"shape\": [4]}, {\"data\": [-0.922097, 0.712992, 0.493001, 0.727856, 0.119969, -0.839034, -0.536727, -0.515472, 0.231, 0.214218, -0.791636, -0.148304, 0.309846, 0.742779, -0.123022, 0.427583, -0.882276, 0.818571, 0.043634, 0.454859, -0.007311, -0.744895, -0.368229, 0.324805, -0.388758, -0.556215, -0.542859, 0.685655, 0.350785, -0.312753, 0.591401, 0.95999, 0.136369, -0.58844, -0.506667, -0.208736, 0.548969, 0.653173, 0.128943, 0.180094, -0.16098, 0.208798, 0.666245, 0.347307, -0.384733, -0.88354, -0.328468, -0.515324, 0.479247, -0.360647, 0.09069, -0.221424, 0.091284, 0.202631, 0.208087, 0.582248, -0.164064, -0.925036, -0.678806, -0.212846, 0.960861, 0.536089, -0.038634, -0.473456, -0.409408, 0.620315, -0.873085, -0.695405, -0.024465, 0.762843, -0.928228, 0.557106], \"shape\": [3, 3, 4, 2]}, {\"data\": [0.318429, -0.858397], \"shape\": [2]}, {\"data\": [0.486255, -0.547151, 0.285068, 0.764711, 0.481398, 0.442527, -0.409304, 0.051033, -0.652471, 0.623918, 0.698811, -0.48696, -0.525531, -0.083229, -0.54216, -0.595979, 0.965361, 0.961457, 0.469608, -0.18139, 0.237622, -0.841546, -0.201479, 0.210842, -0.099026, -0.017468, -0.270985, -0.421947, 0.990418, 0.633556, -0.46994, -0.283905, 0.339371, 0.851372, -0.963439, 0.672347, -0.592494, 0.115008, 0.77155, -0.629049, -0.284972, 0.08256, -0.526964, -0.579017, 0.048964, 0.296374, -0.503246, -0.95555, -0.759658, -0.148746, 0.527992, 0.419541, -0.601167, -0.246472, 0.611566, -0.47989, -0.796678, 0.845136, -0.929013, 0.081316, -0.965527, 0.064677, 0.687209, -0.781686, 0.556524, -0.294628, 0.343468, -0.693394, -0.864068, 0.522942, -0.854592, 0.954066, 0.352462, 0.404271, 0.935993, 0.006064, -0.614327, -0.951249, -0.974544, -0.981322, -0.524456, -0.353175, -0.283883, 0.270072, 0.336334, -0.529043, 0.880513, -0.663035, -0.709319, -0.69236, 0.233949, 0.90419, -0.721928, 0.580281, -0.149192, -0.246252, 0.099723, 0.986128, -0.979644, 0.242715, 0.433547, 0.199869, -0.572331, -0.152181, 0.329916, -0.071652, -0.580827, 0.88984, -0.857622, -0.926973, -0.444937, -0.183938, 0.72548, -0.238406, -0.651195, -0.770945, -0.97797, -0.666038, 0.253825, 0.001102, -0.769608, -0.364219, 0.653122, -0.845224, -0.900383, 0.916435, 0.562575, 0.577639, -0.655935, 0.683806, -0.955929, 0.271965, 0.670582, -0.874893, -0.671992, -0.124948, 0.354001, -0.289044, -0.880824, -0.505697, 0.975131, -0.404046, 0.345771, -0.013626, -0.077943, 0.837888, -0.371654, 0.453362, 0.331138, -0.360725], \"shape\": [5, 5, 2, 3]}, {\"data\": [0.0965, 0.594443, -0.987782], \"shape\": [3]}, {\"data\": [0.228005, 0.859479, -0.49018, 0.232871, -0.303968, -0.799141, 0.621228, 0.850429, 0.029476, -0.583346, 0.889636, -0.128896, 0.067108, -0.1059, -0.788773, -0.559347, 0.674802, 0.513275, -0.95495, -0.230976, -0.430566, 0.607782, -0.292593, -0.362274, -0.825576, 0.904458, 0.531651, 0.139053, -0.797761, 0.905804, -0.875903, 0.04377, -0.704592, 0.203555, -0.083031, 0.321316, 0.334565, 0.965166, 0.31912, 0.987618, 0.11275, 0.755438, 0.133156, -0.271605, -0.739053, 0.930942, 0.723852, -0.399546, 0.365907, 0.680404, 0.302211, 0.481088, -0.254831, -0.719056], \"shape\": [3, 3, 3, 2]}, {\"data\": [0.229761, -0.670851], \"shape\": [2]}], \"expected\": {\"data\": [1.396554, 4.630284], \"shape\": [1, 1, 2]}}}\n"
]
}
],
"source": [
"print(json.dumps(DATA))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.3"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
|
{
"pile_set_name": "Github"
}
|
framework module Pods_DemoApp {
umbrella header "Pods-DemoApp-umbrella.h"
export *
module * { export * }
}
|
{
"pile_set_name": "Github"
}
|
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright 2019 Google LLC
~
~ 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
~
~ https://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.
-->
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/questions"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</layout>
|
{
"pile_set_name": "Github"
}
|
[
{
"category": "``apigateway``",
"description": "Update apigateway command to latest version",
"type": "api-change"
},
{
"category": "``ssm``",
"description": "Update ssm command to latest version",
"type": "api-change"
},
{
"category": "``apigatewayv2``",
"description": "Update apigatewayv2 command to latest version",
"type": "api-change"
},
{
"category": "``elbv2``",
"description": "Update elbv2 command to latest version",
"type": "api-change"
},
{
"category": "``application-insights``",
"description": "Update application-insights command to latest version",
"type": "api-change"
},
{
"category": "``fsx``",
"description": "Update fsx command to latest version",
"type": "api-change"
},
{
"category": "``service-quotas``",
"description": "Update service-quotas command to latest version",
"type": "api-change"
},
{
"category": "``resourcegroupstaggingapi``",
"description": "Update resourcegroupstaggingapi command to latest version",
"type": "api-change"
},
{
"category": "``securityhub``",
"description": "Update securityhub command to latest version",
"type": "api-change"
}
]
|
{
"pile_set_name": "Github"
}
|
<?php
return [
/*
|--------------------------------------------------------------------------
| Application Name
|--------------------------------------------------------------------------
|
| This value is the name of your application. This value is used when the
| framework needs to place the application's name in a notification or
| any other location as required by the application or its packages.
|
*/
'name' => env('APP_NAME', 'HackIT'),
'description' => env("Algiers's big student hackathon"),
/*
|--------------------------------------------------------------------------
| Application Environment
|--------------------------------------------------------------------------
|
| This value determines the "environment" your application is currently
| running in. This may determine how you prefer to configure various
| services the application utilizes. Set this in your ".env" file.
|
*/
'env' => env('APP_ENV', 'production'),
/*
|--------------------------------------------------------------------------
| Application Debug Mode
|--------------------------------------------------------------------------
|
| When your application is in debug mode, detailed error messages with
| stack traces will be shown on every error that occurs within your
| application. If disabled, a simple generic error page is shown.
|
*/
'debug' => env('APP_DEBUG', false),
/*
|--------------------------------------------------------------------------
| Application URL
|--------------------------------------------------------------------------
|
| This URL is used by the console to properly generate URLs when using
| the Artisan command line tool. You should set this to the root of
| your application so that it is used when running Artisan tasks.
|
*/
'url' => env('APP_URL', 'http://localhost'),
'asset_url' => env('ASSET_URL', null),
/*
|--------------------------------------------------------------------------
| Application Timezone
|--------------------------------------------------------------------------
|
| Here you may specify the default timezone for your application, which
| will be used by the PHP date and date-time functions. We have gone
| ahead and set this to a sensible default for you out of the box.
|
*/
'timezone' => 'UTC',
/*
|--------------------------------------------------------------------------
| Application Locale Configuration
|--------------------------------------------------------------------------
|
| The application locale determines the default locale that will be used
| by the translation service provider. You are free to set this value
| to any of the locales which will be supported by the application.
|
*/
'locale' => 'en',
/*
|--------------------------------------------------------------------------
| Application Fallback Locale
|--------------------------------------------------------------------------
|
| The fallback locale determines the locale to use when the current one
| is not available. You may change the value to correspond to any of
| the language folders that are provided through your application.
|
*/
'fallback_locale' => 'en',
/*
|--------------------------------------------------------------------------
| Faker Locale
|--------------------------------------------------------------------------
|
| This locale will be used by the Faker PHP library when generating fake
| data for your database seeds. For example, this will be used to get
| localized telephone numbers, street address information and more.
|
*/
'faker_locale' => 'en_US',
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| This key is used by the Illuminate encrypter service and should be set
| to a random, 32 character string, otherwise these encrypted strings
| will not be safe. Please do this before deploying an application!
|
*/
'key' => env('APP_KEY'),
'cipher' => 'AES-256-CBC',
/*
/*
|--------------------------------------------------------------------------
| Autoloaded Service Providers
|--------------------------------------------------------------------------
|
| The service providers listed here will be automatically loaded on the
| request to your application. Feel free to add your own services to
| this array to grant expanded functionality to your applications.
|
*/
'providers' => [
/*
* Laravel Framework Service Providers...
*/
Illuminate\Auth\AuthServiceProvider::class,
Illuminate\Broadcasting\BroadcastServiceProvider::class,
Illuminate\Bus\BusServiceProvider::class,
Illuminate\Cache\CacheServiceProvider::class,
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
Illuminate\Cookie\CookieServiceProvider::class,
Illuminate\Database\DatabaseServiceProvider::class,
Illuminate\Encryption\EncryptionServiceProvider::class,
Illuminate\Filesystem\FilesystemServiceProvider::class,
Illuminate\Foundation\Providers\FoundationServiceProvider::class,
Illuminate\Hashing\HashServiceProvider::class,
Illuminate\Mail\MailServiceProvider::class,
Illuminate\Notifications\NotificationServiceProvider::class,
Illuminate\Pagination\PaginationServiceProvider::class,
Illuminate\Pipeline\PipelineServiceProvider::class,
Illuminate\Queue\QueueServiceProvider::class,
Illuminate\Redis\RedisServiceProvider::class,
Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
Illuminate\Session\SessionServiceProvider::class,
Illuminate\Translation\TranslationServiceProvider::class,
Illuminate\Validation\ValidationServiceProvider::class,
Illuminate\View\ViewServiceProvider::class,
Fedeisas\LaravelMailCssInliner\LaravelMailCssInlinerServiceProvider::class,
/*
* Package Service Providers...
*/
/*
* Application Service Providers...
*/
App\Providers\AppServiceProvider::class,
App\Providers\AuthServiceProvider::class,
// App\Providers\BroadcastServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
],
/*
|--------------------------------------------------------------------------
| Class Aliases
|--------------------------------------------------------------------------
|
| This array of class aliases will be registered when this application
| is started. However, feel free to register as many as you wish as
| the aliases are "lazy" loaded so they don't hinder performance.
|
*/
'aliases' => [
'App' => Illuminate\Support\Facades\App::class,
'Arr' => Illuminate\Support\Arr::class,
'Artisan' => Illuminate\Support\Facades\Artisan::class,
'Auth' => Illuminate\Support\Facades\Auth::class,
'Blade' => Illuminate\Support\Facades\Blade::class,
'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
'Bus' => Illuminate\Support\Facades\Bus::class,
'Cache' => Illuminate\Support\Facades\Cache::class,
'Config' => Illuminate\Support\Facades\Config::class,
'Cookie' => Illuminate\Support\Facades\Cookie::class,
'Crypt' => Illuminate\Support\Facades\Crypt::class,
'DB' => Illuminate\Support\Facades\DB::class,
'Eloquent' => Illuminate\Database\Eloquent\Model::class,
'Event' => Illuminate\Support\Facades\Event::class,
'File' => Illuminate\Support\Facades\File::class,
'Gate' => Illuminate\Support\Facades\Gate::class,
'Hash' => Illuminate\Support\Facades\Hash::class,
'Lang' => Illuminate\Support\Facades\Lang::class,
'Log' => Illuminate\Support\Facades\Log::class,
'Mail' => Illuminate\Support\Facades\Mail::class,
'Notification' => Illuminate\Support\Facades\Notification::class,
'Password' => Illuminate\Support\Facades\Password::class,
'Queue' => Illuminate\Support\Facades\Queue::class,
'Redirect' => Illuminate\Support\Facades\Redirect::class,
'Redis' => Illuminate\Support\Facades\Redis::class,
'Request' => Illuminate\Support\Facades\Request::class,
'Response' => Illuminate\Support\Facades\Response::class,
'Route' => Illuminate\Support\Facades\Route::class,
'Schema' => Illuminate\Support\Facades\Schema::class,
'Session' => Illuminate\Support\Facades\Session::class,
'Storage' => Illuminate\Support\Facades\Storage::class,
'Str' => Illuminate\Support\Str::class,
'URL' => Illuminate\Support\Facades\URL::class,
'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class,
],
];
|
{
"pile_set_name": "Github"
}
|
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example - example-cache-factory</title>
<link href="style.css" rel="stylesheet" type="text/css">
<script src="../../../angular.min.js"></script>
<script src="script.js"></script>
</head>
<body ng-app="cacheExampleApp">
<div ng-controller="CacheController">
<input ng-model="newCacheKey" placeholder="Key">
<input ng-model="newCacheValue" placeholder="Value">
<button ng-click="put(newCacheKey, newCacheValue)">Cache</button>
<p ng-if="keys.length">Cached Values</p>
<div ng-repeat="key in keys">
<span ng-bind="key"></span>
<span>: </span>
<b ng-bind="cache.get(key)"></b>
</div>
<p>Cache Info</p>
<div ng-repeat="(key, value) in cache.info()">
<span ng-bind="key"></span>
<span>: </span>
<b ng-bind="value"></b>
</div>
</div>
</body>
</html>
|
{
"pile_set_name": "Github"
}
|
module network {
export class PlayCardsResolver extends IResolver{
public constructor() {
super();
}
/**
* 发送消息封包
*/
protected Package(data:any):any{
let event = {
action:131,
data:data
};
event = data;
return event;
}
/**
* 接收消息解包
*/
protected Parse(data:any){
return data;
}
}
}
|
{
"pile_set_name": "Github"
}
|
<html>
<head>
<title>CSS background/foreground images</title>
<style type="text/css">
body {
font-family:Verdana; font-size:10pt;
width:100%%; height:100%%;
background-color: window;
padding:10px;
margin:0;
}
header { font-size:150%; }
#c1
{
background-color: threedface;
}
img
{
margin: 6px;
}
img:hover
{
foreground-image-transformation: contrast-brightness-gamma(0.5,0.5, 1.3);
}
img:active
{
foreground-image-transformation: contrast-brightness-gamma(0.25,0.95, 1.0);
}
</style>
</head>
<body>
<header>Image color transformation. Move mouse over the block below. Image will change gamma. On press image will change contrast and brightness.</header>
<p id="c1"><img src="images/flowers.jpg" /> <img src="images/icon.png" /></p>
<pre>
:hover -> foreground-image-transformation: contrast-brightness-gamma(0.5,0.5, 1.3);
:active -> foreground-image-transformation: contrast-brightness-gamma(0.25,0.95, 1.0);
</pre>
</body>
</html>
|
{
"pile_set_name": "Github"
}
|
import decimalAdjust from "discourse/lib/decimal-adjust";
export default function (value, exp) {
return decimalAdjust("round", value, exp);
}
|
{
"pile_set_name": "Github"
}
|
<?xml version="1.0"?>
<entity_profile>
<profile id="Logistician">
<name>Logistician</name>
</profile>
<profile id="Translator">
<name>Translator</name>
</profile>
<profile id="Salesman">
<name>Salesman</name>
</profile>
</entity_profile>
|
{
"pile_set_name": "Github"
}
|
// Configure enzyme adapter
const enzyme = require('enzyme');
const Adapter = require('enzyme-adapter-react-16');
enzyme.configure({ adapter: new Adapter() });
// require all modules ending in ".spec" from the
// current directory and all subdirectories
const testsContext = require.context('./src', true, /.spec$/);
testsContext.keys().forEach(testsContext);
const componentsContext = require.context('./src', true, /.ts$/);
componentsContext.keys().forEach(componentsContext);
|
{
"pile_set_name": "Github"
}
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>EtoApp.1</string>
<key>CFBundleIdentifier</key>
<string>com.example.EtoApp.1</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>LSMinimumSystemVersion</key>
<string>10.12</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>NSHumanReadableCopyright</key>
<string></string>
<key>CFBundleIconFile</key>
<string>Icon.icns</string>
</dict>
</plist>
|
{
"pile_set_name": "Github"
}
|
/**
* Alternate Sphinx design
* Originally created by Armin Ronacher for Werkzeug, adapted by Georg Brandl.
*/
body {
font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'Geneva', 'Verdana', sans-serif;
font-size: 14px;
letter-spacing: -0.01em;
line-height: 150%;
text-align: center;
/*background-color: #AFC1C4; */
background-color: #BFD1D4;
color: black;
padding: 0;
border: 1px solid #aaa;
margin: 0px 80px 0px 80px;
min-width: 740px;
}
a {
color: #CA7900;
text-decoration: none;
}
a:hover {
color: #2491CF;
}
pre {
font-family: 'Consolas', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
font-size: 0.95em;
letter-spacing: 0.015em;
padding: 0.5em;
border: 1px solid #ccc;
background-color: #f8f8f8;
}
td.linenos pre {
padding: 0.5em 0;
border: 0;
background-color: transparent;
color: #aaa;
}
table.highlighttable {
margin-left: 0.5em;
}
table.highlighttable td {
padding: 0 0.5em 0 0.5em;
}
cite, code, tt {
font-family: 'Consolas', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
font-size: 0.95em;
letter-spacing: 0.01em;
}
hr {
border: 1px solid #abc;
margin: 2em;
}
tt {
background-color: #f2f2f2;
border-bottom: 1px solid #ddd;
color: #333;
}
tt.descname {
background-color: transparent;
font-weight: bold;
font-size: 1.2em;
border: 0;
}
tt.descclassname {
background-color: transparent;
border: 0;
}
tt.xref {
background-color: transparent;
font-weight: bold;
border: 0;
}
a tt {
background-color: transparent;
font-weight: bold;
border: 0;
color: #CA7900;
}
a tt:hover {
color: #2491CF;
}
dl {
margin-bottom: 15px;
}
dd p {
margin-top: 0px;
}
dd ul, dd table {
margin-bottom: 10px;
}
dd {
margin-top: 3px;
margin-bottom: 10px;
margin-left: 30px;
}
.refcount {
color: #060;
}
dt:target,
.highlight {
background-color: #fbe54e;
}
dl.class, dl.function {
border-top: 2px solid #888;
}
dl.method, dl.attribute {
border-top: 1px solid #aaa;
}
dl.glossary dt {
font-weight: bold;
font-size: 1.1em;
}
pre {
line-height: 120%;
}
pre a {
color: inherit;
text-decoration: underline;
}
.first {
margin-top: 0 !important;
}
div.document {
background-color: white;
text-align: left;
background-image: url(contents.png);
background-repeat: repeat-x;
}
/*
div.documentwrapper {
width: 100%;
}
*/
div.clearer {
clear: both;
}
div.related h3 {
display: none;
}
div.related ul {
background-image: url(navigation.png);
height: 2em;
list-style: none;
border-top: 1px solid #ddd;
border-bottom: 1px solid #ddd;
margin: 0;
padding-left: 10px;
}
div.related ul li {
margin: 0;
padding: 0;
height: 2em;
float: left;
}
div.related ul li.right {
float: right;
margin-right: 5px;
}
div.related ul li a {
margin: 0;
padding: 0 5px 0 5px;
line-height: 1.75em;
color: #EE9816;
}
div.related ul li a:hover {
color: #3CA8E7;
}
div.body {
margin: 0;
padding: 0.5em 20px 20px 20px;
}
div.bodywrapper {
margin: 0 240px 0 0;
border-right: 1px solid #ccc;
}
div.body a {
text-decoration: underline;
}
div.sphinxsidebar {
margin: 0;
padding: 0.5em 15px 15px 0;
width: 210px;
float: right;
text-align: left;
/* margin-left: -100%; */
}
div.sphinxsidebar h4, div.sphinxsidebar h3 {
margin: 1em 0 0.5em 0;
font-size: 0.9em;
padding: 0.1em 0 0.1em 0.5em;
color: white;
border: 1px solid #86989B;
background-color: #AFC1C4;
}
div.sphinxsidebar ul {
padding-left: 1.5em;
margin-top: 7px;
list-style: none;
padding: 0;
line-height: 130%;
}
div.sphinxsidebar ul ul {
list-style: square;
margin-left: 20px;
}
p {
margin: 0.8em 0 0.5em 0;
}
p.rubric {
font-weight: bold;
}
h1 {
margin: 0;
padding: 0.7em 0 0.3em 0;
font-size: 1.5em;
color: #11557C;
}
h2 {
margin: 1.3em 0 0.2em 0;
font-size: 1.35em;
padding: 0;
}
h3 {
margin: 1em 0 -0.3em 0;
font-size: 1.2em;
}
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
color: black!important;
}
h1 a.anchor, h2 a.anchor, h3 a.anchor, h4 a.anchor, h5 a.anchor, h6 a.anchor {
display: none;
margin: 0 0 0 0.3em;
padding: 0 0.2em 0 0.2em;
color: #aaa!important;
}
h1:hover a.anchor, h2:hover a.anchor, h3:hover a.anchor, h4:hover a.anchor,
h5:hover a.anchor, h6:hover a.anchor {
display: inline;
}
h1 a.anchor:hover, h2 a.anchor:hover, h3 a.anchor:hover, h4 a.anchor:hover,
h5 a.anchor:hover, h6 a.anchor:hover {
color: #777;
background-color: #eee;
}
table {
border-collapse: collapse;
margin: 0 -0.5em 0 -0.5em;
}
table td, table th {
padding: 0.2em 0.5em 0.2em 0.5em;
}
div.footer {
background-color: #E3EFF1;
color: #86989B;
padding: 3px 8px 3px 0;
clear: both;
font-size: 0.8em;
text-align: right;
}
div.footer a {
color: #86989B;
text-decoration: underline;
}
div.pagination {
margin-top: 2em;
padding-top: 0.5em;
border-top: 1px solid black;
text-align: center;
}
div.sphinxsidebar ul.toc {
margin: 1em 0 1em 0;
padding: 0 0 0 0.5em;
list-style: none;
}
div.sphinxsidebar ul.toc li {
margin: 0.5em 0 0.5em 0;
font-size: 0.9em;
line-height: 130%;
}
div.sphinxsidebar ul.toc li p {
margin: 0;
padding: 0;
}
div.sphinxsidebar ul.toc ul {
margin: 0.2em 0 0.2em 0;
padding: 0 0 0 1.8em;
}
div.sphinxsidebar ul.toc ul li {
padding: 0;
}
div.admonition, div.warning {
font-size: 0.9em;
margin: 1em 0 0 0;
border: 1px solid #86989B;
background-color: #f7f7f7;
}
div.admonition p, div.warning p {
margin: 0.5em 1em 0.5em 1em;
padding: 0;
}
div.admonition pre, div.warning pre {
margin: 0.4em 1em 0.4em 1em;
}
div.admonition p.admonition-title,
div.warning p.admonition-title {
margin: 0;
padding: 0.1em 0 0.1em 0.5em;
color: white;
border-bottom: 1px solid #86989B;
font-weight: bold;
background-color: #AFC1C4;
}
div.warning {
border: 1px solid #940000;
}
div.warning p.admonition-title {
background-color: #CF0000;
border-bottom-color: #940000;
}
div.admonition ul, div.admonition ol,
div.warning ul, div.warning ol {
margin: 0.1em 0.5em 0.5em 3em;
padding: 0;
}
div.versioninfo {
margin: 1em 0 0 0;
border: 1px solid #ccc;
background-color: #DDEAF0;
padding: 8px;
line-height: 1.3em;
font-size: 0.9em;
}
a.headerlink {
color: #c60f0f!important;
font-size: 1em;
margin-left: 6px;
padding: 0 4px 0 4px;
text-decoration: none!important;
visibility: hidden;
}
h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
h4:hover > a.headerlink,
h5:hover > a.headerlink,
h6:hover > a.headerlink,
dt:hover > a.headerlink {
visibility: visible;
}
a.headerlink:hover {
background-color: #ccc;
color: white!important;
}
table.indextable td {
text-align: left;
vertical-align: top;
}
table.indextable dl, table.indextable dd {
margin-top: 0;
margin-bottom: 0;
}
table.indextable tr.pcap {
height: 10px;
}
table.indextable tr.cap {
margin-top: 10px;
background-color: #f2f2f2;
}
img.toggler {
margin-right: 3px;
margin-top: 3px;
cursor: pointer;
}
img.inheritance {
border: 0px
}
form.pfform {
margin: 10px 0 20px 0;
}
table.contentstable {
width: 90%;
}
table.contentstable p.biglink {
line-height: 150%;
}
a.biglink {
font-size: 1.3em;
}
span.linkdescr {
font-style: italic;
padding-top: 5px;
font-size: 90%;
}
ul.search {
margin: 10px 0 0 20px;
padding: 0;
}
ul.search li {
padding: 5px 0 5px 20px;
background-image: url(file.png);
background-repeat: no-repeat;
background-position: 0 7px;
}
ul.search li a {
font-weight: bold;
}
ul.search li div.context {
color: #888;
margin: 2px 0 0 30px;
text-align: left;
}
ul.keywordmatches li.goodmatch a {
font-weight: bold;
}
|
{
"pile_set_name": "Github"
}
|
<b:style src="./Node.css"/>
<b:style src="./Node_Expander.css"/>
<b:style src="./Folder.css"/>
<b:define name="selected" type="bool"/>
<b:define name="collapsed" type="bool"/>
<b:define name="disabled" type="bool"/>
<li class="Basis-TreeNode">
<div{content} class="Basis-TreeNode-Title">
<div class="Basis-TreeNode_Expander Basis-TreeNode_Expander__{collapsed}" event-click="toggle" />
<span class="Basis-TreeNode-Caption Basis-TreeNode-FolderCaption Basis-TreeNode-FolderCaption_{collapsed} Basis-TreeNode-Caption__{disabled} Basis-TreeNode-Caption__{selected}" event-click="select">
{title}
</span>
</div>
<ul{childNodesElement} class="Basis-TreeNode-Content Basis-TreeNode-Content__{collapsed}"/>
</li>
|
{
"pile_set_name": "Github"
}
|
'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
function getDecimals(n) {
n = n + '';
var i = n.indexOf('.');
return (i == -1) ? 0 : n.length - i - 1;
}
function getVF(n, opt_precision) {
var v = opt_precision;
if (undefined === v) {
v = Math.min(getDecimals(n), 3);
}
var base = Math.pow(10, v);
var f = ((n * base) | 0) % base;
return {v: v, f: f};
}
$provide.value("$locale", {
"DATETIME_FORMATS": {
"AMPMS": [
"AM",
"PM"
],
"DAY": [
"\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435",
"\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a",
"\u0432\u0442\u043e\u0440\u043d\u0438\u043a",
"\u0441\u0440\u0435\u0434\u0430",
"\u0447\u0435\u0442\u0432\u0435\u0440\u0433",
"\u043f\u044f\u0442\u043d\u0438\u0446\u0430",
"\u0441\u0443\u0431\u0431\u043e\u0442\u0430"
],
"ERANAMES": [
"\u0434\u043e \u043d. \u044d.",
"\u043d. \u044d."
],
"ERAS": [
"\u0434\u043e \u043d. \u044d.",
"\u043d. \u044d."
],
"FIRSTDAYOFWEEK": 0,
"MONTH": [
"\u044f\u043d\u0432\u0430\u0440\u044f",
"\u0444\u0435\u0432\u0440\u0430\u043b\u044f",
"\u043c\u0430\u0440\u0442\u0430",
"\u0430\u043f\u0440\u0435\u043b\u044f",
"\u043c\u0430\u044f",
"\u0438\u044e\u043d\u044f",
"\u0438\u044e\u043b\u044f",
"\u0430\u0432\u0433\u0443\u0441\u0442\u0430",
"\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f",
"\u043e\u043a\u0442\u044f\u0431\u0440\u044f",
"\u043d\u043e\u044f\u0431\u0440\u044f",
"\u0434\u0435\u043a\u0430\u0431\u0440\u044f"
],
"SHORTDAY": [
"\u0432\u0441",
"\u043f\u043d",
"\u0432\u0442",
"\u0441\u0440",
"\u0447\u0442",
"\u043f\u0442",
"\u0441\u0431"
],
"SHORTMONTH": [
"\u044f\u043d\u0432.",
"\u0444\u0435\u0432\u0440.",
"\u043c\u0430\u0440\u0442\u0430",
"\u0430\u043f\u0440.",
"\u043c\u0430\u044f",
"\u0438\u044e\u043d\u044f",
"\u0438\u044e\u043b\u044f",
"\u0430\u0432\u0433.",
"\u0441\u0435\u043d\u0442.",
"\u043e\u043a\u0442.",
"\u043d\u043e\u044f\u0431.",
"\u0434\u0435\u043a."
],
"STANDALONEMONTH": [
"\u044f\u043d\u0432\u0430\u0440\u044c",
"\u0444\u0435\u0432\u0440\u0430\u043b\u044c",
"\u043c\u0430\u0440\u0442",
"\u0430\u043f\u0440\u0435\u043b\u044c",
"\u043c\u0430\u0439",
"\u0438\u044e\u043d\u044c",
"\u0438\u044e\u043b\u044c",
"\u0430\u0432\u0433\u0443\u0441\u0442",
"\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c",
"\u043e\u043a\u0442\u044f\u0431\u0440\u044c",
"\u043d\u043e\u044f\u0431\u0440\u044c",
"\u0434\u0435\u043a\u0430\u0431\u0440\u044c"
],
"WEEKENDRANGE": [
5,
6
],
"fullDate": "EEEE, d MMMM y '\u0433'.",
"longDate": "d MMMM y '\u0433'.",
"medium": "d MMM y '\u0433'. H:mm:ss",
"mediumDate": "d MMM y '\u0433'.",
"mediumTime": "H:mm:ss",
"short": "dd.MM.yy H:mm",
"shortDate": "dd.MM.yy",
"shortTime": "H:mm"
},
"NUMBER_FORMATS": {
"CURRENCY_SYM": "\u0440\u0443\u0431.",
"DECIMAL_SEP": ",",
"GROUP_SEP": "\u00a0",
"PATTERNS": [
{
"gSize": 3,
"lgSize": 3,
"maxFrac": 3,
"minFrac": 0,
"minInt": 1,
"negPre": "-",
"negSuf": "",
"posPre": "",
"posSuf": ""
},
{
"gSize": 3,
"lgSize": 3,
"maxFrac": 2,
"minFrac": 2,
"minInt": 1,
"negPre": "-",
"negSuf": "\u00a0\u00a4",
"posPre": "",
"posSuf": "\u00a0\u00a4"
}
]
},
"id": "ru",
"localeID": "ru",
"pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (vf.v == 0 && i % 10 == 1 && i % 100 != 11) { return PLURAL_CATEGORY.ONE; } if (vf.v == 0 && i % 10 >= 2 && i % 10 <= 4 && (i % 100 < 12 || i % 100 > 14)) { return PLURAL_CATEGORY.FEW; } if (vf.v == 0 && i % 10 == 0 || vf.v == 0 && i % 10 >= 5 && i % 10 <= 9 || vf.v == 0 && i % 100 >= 11 && i % 100 <= 14) { return PLURAL_CATEGORY.MANY; } return PLURAL_CATEGORY.OTHER;}
});
}]);
|
{
"pile_set_name": "Github"
}
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
"use strict";
CodeMirror.defineMode("commonlisp", function (config) {
var assumeBody = /^with|^def|^do|^prog|case$|^cond$|bind$|when$|unless$/;
var numLiteral = /^(?:[+\-]?(?:\d+|\d*\.\d+)(?:[efd][+\-]?\d+)?|[+\-]?\d+(?:\/[+\-]?\d+)?|#b[+\-]?[01]+|#o[+\-]?[0-7]+|#x[+\-]?[\da-f]+)/;
var symbol = /[^\s'`,@()\[\]";]/;
var type;
function readSym(stream) {
var ch;
while (ch = stream.next()) {
if (ch == "\\") stream.next();
else if (!symbol.test(ch)) { stream.backUp(1); break; }
}
return stream.current();
}
function base(stream, state) {
if (stream.eatSpace()) {type = "ws"; return null;}
if (stream.match(numLiteral)) return "number";
var ch = stream.next();
if (ch == "\\") ch = stream.next();
if (ch == '"') return (state.tokenize = inString)(stream, state);
else if (ch == "(") { type = "open"; return "bracket"; }
else if (ch == ")" || ch == "]") { type = "close"; return "bracket"; }
else if (ch == ";") { stream.skipToEnd(); type = "ws"; return "comment"; }
else if (/['`,@]/.test(ch)) return null;
else if (ch == "|") {
if (stream.skipTo("|")) { stream.next(); return "symbol"; }
else { stream.skipToEnd(); return "error"; }
} else if (ch == "#") {
var ch = stream.next();
if (ch == "[") { type = "open"; return "bracket"; }
else if (/[+\-=\.']/.test(ch)) return null;
else if (/\d/.test(ch) && stream.match(/^\d*#/)) return null;
else if (ch == "|") return (state.tokenize = inComment)(stream, state);
else if (ch == ":") { readSym(stream); return "meta"; }
else return "error";
} else {
var name = readSym(stream);
if (name == ".") return null;
type = "symbol";
if (name == "nil" || name == "t") return "atom";
if (name.charAt(0) == ":") return "keyword";
if (name.charAt(0) == "&") return "variable-2";
return "variable";
}
}
function inString(stream, state) {
var escaped = false, next;
while (next = stream.next()) {
if (next == '"' && !escaped) { state.tokenize = base; break; }
escaped = !escaped && next == "\\";
}
return "string";
}
function inComment(stream, state) {
var next, last;
while (next = stream.next()) {
if (next == "#" && last == "|") { state.tokenize = base; break; }
last = next;
}
type = "ws";
return "comment";
}
return {
startState: function () {
return {ctx: {prev: null, start: 0, indentTo: 0}, tokenize: base};
},
token: function (stream, state) {
if (stream.sol() && typeof state.ctx.indentTo != "number")
state.ctx.indentTo = state.ctx.start + 1;
type = null;
var style = state.tokenize(stream, state);
if (type != "ws") {
if (state.ctx.indentTo == null) {
if (type == "symbol" && assumeBody.test(stream.current()))
state.ctx.indentTo = state.ctx.start + config.indentUnit;
else
state.ctx.indentTo = "next";
} else if (state.ctx.indentTo == "next") {
state.ctx.indentTo = stream.column();
}
}
if (type == "open") state.ctx = {prev: state.ctx, start: stream.column(), indentTo: null};
else if (type == "close") state.ctx = state.ctx.prev || state.ctx;
return style;
},
indent: function (state, _textAfter) {
var i = state.ctx.indentTo;
return typeof i == "number" ? i : state.ctx.start + 1;
},
lineComment: ";;",
blockCommentStart: "#|",
blockCommentEnd: "|#"
};
});
CodeMirror.defineMIME("text/x-common-lisp", "commonlisp");
});
|
{
"pile_set_name": "Github"
}
|
<%inherit file="/template.html" />
<%namespace name="badge_index" file="/badge/index.html"/>
<%namespace name="components" file="/components.html"/>
<%def name="title()">${_("Global badges")}</%def>
<%def name="breadcrumbs()">
${h.badge.breadcrumbs(None)|n}
</%def>
<%block name="main_content">
${components.flashmessages()}
%for (type_, data) in c.badge_tables.items():
${badge_index.render_tables(data['global_badges'], data['instance_badges'], data['badge_base_url'], data['badge_header'], data['badge_type'])}
%endfor
</%block>
|
{
"pile_set_name": "Github"
}
|
function test() {
class C {
constructor() { this.x = 1; }
}
return C.prototype.constructor === C
&& new C().x === 1;
}
if (!test())
throw new Error("Test failed");
|
{
"pile_set_name": "Github"
}
|
import React from 'react';
import PropTypes from 'prop-types';
const UilNavigator = (props) => {
const { color, size, ...otherProps } = props
return React.createElement('svg', {
xmlns: 'http://www.w3.org/2000/svg',
width: size,
height: size,
viewBox: '0 0 24 24',
fill: color,
...otherProps
}, React.createElement('path', {
d: 'M20.17,9.23l-14-5.78a3,3,0,0,0-4,3.7L3.71,12,2.13,16.85A3,3,0,0,0,2.94,20a3,3,0,0,0,2,.8,3,3,0,0,0,1.15-.23l14.05-5.78a3,3,0,0,0,0-5.54ZM5.36,18.7a1,1,0,0,1-1.06-.19,1,1,0,0,1-.27-1L5.49,13H19.22ZM5.49,11,4,6.53a1,1,0,0,1,.27-1A1,1,0,0,1,5,5.22a1,1,0,0,1,.39.08L19.22,11Z'
}));
};
UilNavigator.propTypes = {
color: PropTypes.string,
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
};
UilNavigator.defaultProps = {
color: 'currentColor',
size: '24',
};
export default UilNavigator;
|
{
"pile_set_name": "Github"
}
|
/*--------------------------------------------------------------
# Illustrations
--------------------------------------------------------------*/
@import "illustrations/illustrations";
/*--------------------------------------------------------------
# Fonts
--------------------------------------------------------------*/
@import "base/fonts";
/*--------------------------------------------------------------
# Scroll reveal
--------------------------------------------------------------*/
@import "base/scroll-reveal";
/*--------------------------------------------------------------
# Base
--------------------------------------------------------------*/
@import "base/base";
/*--------------------------------------------------------------
# Typography
--------------------------------------------------------------*/
@import "base/typography";
/*--------------------------------------------------------------
# Containers
--------------------------------------------------------------*/
@import "elements/containers";
/*--------------------------------------------------------------
# Buttons
--------------------------------------------------------------*/
@import "elements/buttons";
/*--------------------------------------------------------------
# Forms
--------------------------------------------------------------*/
@import "elements/forms";
/*--------------------------------------------------------------
# Hamburger
--------------------------------------------------------------*/
@import "elements/hamburger";
/*--------------------------------------------------------------
# Modal
--------------------------------------------------------------*/
@import "elements/modal";
/*--------------------------------------------------------------
# Split pattern
--------------------------------------------------------------*/
@import "patterns/split";
/*--------------------------------------------------------------
# Tiles pattern
--------------------------------------------------------------*/
@import "patterns/tiles";
/*--------------------------------------------------------------
# Header
--------------------------------------------------------------*/
@import "layout/header";
/*--------------------------------------------------------------
# Site content
--------------------------------------------------------------*/
@import "layout/main";
/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
@import "layout/footer";
/*--------------------------------------------------------------
# Section
--------------------------------------------------------------*/
@import "sections/section";
/*--------------------------------------------------------------
# Hero
--------------------------------------------------------------*/
@import "sections/hero";
/*--------------------------------------------------------------
# Features split
--------------------------------------------------------------*/
@import "sections/features-split";
/*--------------------------------------------------------------
# Features tiles
--------------------------------------------------------------*/
@import "sections/features-tiles";
/*--------------------------------------------------------------
# Testimonial
--------------------------------------------------------------*/
@import "sections/testimonial";
/*--------------------------------------------------------------
# Call to action
--------------------------------------------------------------*/
@import "sections/cta";
|
{
"pile_set_name": "Github"
}
|
<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %><!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title><la:message key="labels.admin_brand_title"/> | <la:message key="labels.search_list_configuration"/></title>
<jsp:include page="/WEB-INF/view/common/admin/head.jsp"></jsp:include>
</head>
<body class="hold-transition sidebar-mini">
<div class="wrapper">
<jsp:include page="/WEB-INF/view/common/admin/header.jsp"></jsp:include>
<jsp:include page="/WEB-INF/view/common/admin/sidebar.jsp">
<jsp:param name="menuCategoryType" value="log"/>
<jsp:param name="menuType" value="searchList"/>
</jsp:include>
<div class="content-wrapper">
<div class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>
<la:message key="labels.search_list_configuration"/>
</h1>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right">
<li class="breadcrumb-item active"><la:link href="/admin/searchlist/search?q=${f:u(q)}">
<la:message key="labels.search_list_configuration"/>
</la:link></li>
</ol>
</div>
</div>
</div>
</div>
<section class="content">
<la:form action="/admin/searchlist/">
<la:hidden property="crudMode"/>
<la:hidden property="q"/>
<c:if test="${crudMode==2}">
<la:hidden property="id"/>
<la:hidden property="seqNo"/>
<la:hidden property="primaryTerm"/>
</c:if>
<div class="row">
<div class="col-md-12">
<div class="card card-outline <c:if test="${crudMode == 1 || crudMode == 2}">card-success</c:if>">
<div class="card-header">
<h3 class="card-title">
<c:if test="${crudMode == null}">
<la:message key="labels.crud_title_list"/>
</c:if>
<c:if test="${crudMode == 1}">
<la:message key="labels.crud_title_create"/>
</c:if>
<c:if test="${crudMode == 2}">
<la:message key="labels.crud_title_edit"/>
</c:if>
<c:if test="${crudMode == 3}">
<la:message key="labels.crud_title_delete"/>
</c:if>
<c:if test="${crudMode == 4}">
<la:message key="labels.crud_title_details"/>
</c:if>
</h3>
<div class="card-tools">
<div class="btn-group">
<c:choose>
<c:when test="${crudMode == null}">
<la:link href="createnew" styleClass="btn btn-success btn-xs">
<em class="fa fa-plus"></em>
<la:message key="labels.crud_link_create"/>
</la:link>
</c:when>
<c:otherwise>
<la:link href="/admin/searchlist/search?q=${f:u(q)}"
styleClass="btn btn-primary btn-xs">
<em class="fa fa-th-list"></em>
<la:message key="labels.crud_link_list"/>
</la:link>
</c:otherwise>
</c:choose>
</div>
</div>
</div>
<div class="card-body">
<div>
<la:info id="msg" message="true">
<div class="alert alert-info">${msg}</div>
</la:info>
<la:errors property="_global"/>
</div>
<c:if test="${crudMode==2}">
<div class="form-group row">
<label class="col-sm-3 text-sm-right col-form-label">_id</label>
<div class="col-sm-9">${f:h(id)}</div>
</div>
<div class="form-group row">
<label for="doc.doc_id" class="col-sm-3 text-sm-right col-form-label">doc_id</label>
<div class="col-sm-9">
${f:h(doc.doc_id)}
<la:hidden styleId="doc.doc_id" property="doc.doc_id"/>
</div>
</div>
</c:if>
<div class="form-group row">
<label for="doc.url" class="col-sm-3 text-sm-right col-form-label">url</label>
<div class="col-sm-9">
<la:errors property="doc.url"/>
<la:text styleId="doc.url"
property="doc.url" styleClass="form-control"
required="required" data-validation="required"/>
</div>
</div>
<div class="form-group row">
<label for="doc.title" class="col-sm-3 text-sm-right col-form-label">title</label>
<div class="col-sm-9">
<la:errors property="doc.title"/>
<la:text styleId="doc.title"
property="doc.title" styleClass="form-control"
required="required" data-validation="required"/>
</div>
</div>
<div class="form-group row">
<label for="doc.role" class="col-sm-3 text-sm-right col-form-label">role</label>
<div class="col-sm-9">
<la:errors property="doc.role"/>
<la:textarea styleId="doc.role"
property="doc.role" styleClass="form-control"
data-validation-help="1(username) | 2(groupname) | R(rolename) e.g. Rguest"/>
</div>
</div>
<div class="form-group row">
<label for="doc.boost" class="col-sm-3 text-sm-right col-form-label">boost</label>
<div class="col-sm-9">
<la:errors property="doc.boost"/>
<la:text styleId="doc.boost"
property="doc.boost" styleClass="form-control"
title="Floating point number" required="required"
data-validation="custom"
data-validation-regexp="(\+|\-)?\d+(\.\d+)?((e|E)(\+|\-)?\d+)?"
data-validation-help="number (Float)"/>
</div>
</div>
<div class="form-group row">
<label for="doc.label" class="col-sm-3 text-sm-right col-form-label">label</label>
<div class="col-sm-9">
<la:errors property="doc.label"/>
<la:textarea styleId="doc.label" property="doc.label" styleClass="form-control"/>
</div>
</div>
<div class="form-group row">
<label for="doc.lang" class="col-sm-3 text-sm-right col-form-label">lang</label>
<div class="col-sm-9">
<la:errors property="doc.lang"/>
<la:textarea styleId="doc.lang" property="doc.lang" styleClass="form-control"/>
</div>
</div>
<div class="form-group row">
<label for="doc.mimetype" class="col-sm-3 text-sm-right col-form-label">mimetype</label>
<div class="col-sm-9">
<la:errors property="doc.mimetype"/>
<la:text styleId="doc.mimetype" property="doc.mimetype" styleClass="form-control"/>
</div>
</div>
<div class="form-group row">
<label for="doc.filetype" class="col-sm-3 text-sm-right col-form-label">filetype</label>
<div class="col-sm-9">
<la:errors property="doc.filetype"/>
<la:text styleId="doc.filetype" property="doc.filetype" styleClass="form-control"/>
</div>
</div>
<div class="form-group row">
<label for="doc.filename" class="col-sm-3 text-sm-right col-form-label">filename</label>
<div class="col-sm-9">
<la:errors property="doc.filename"/>
<la:text styleId="doc.filename" property="doc.filename" styleClass="form-control"/>
</div>
</div>
<div class="form-group row">
<label for="doc.content" class="col-sm-3 text-sm-right col-form-label">content</label>
<div class="col-sm-9">
<la:errors property="doc.content"/>
<la:text styleId="doc.content" property="doc.content" styleClass="form-control"/>
</div>
</div>
<div class="form-group row">
<label for="doc.has_cache" class="col-sm-3 text-sm-right col-form-label">has_cache</label>
<div class="col-sm-9">
<la:errors property="doc.has_cache"/>
<la:text styleId="doc.has_cache" property="doc.has_cache" styleClass="form-control"/>
</div>
</div>
<div class="form-group row">
<label for="doc.cache" class="col-sm-3 text-sm-right col-form-label">cache</label>
<div class="col-sm-9">
<la:errors property="doc.cache"/>
<la:text styleId="doc.cache" property="doc.cache" styleClass="form-control"/>
</div>
</div>
<div class="form-group row">
<label for="doc.digest" class="col-sm-3 text-sm-right col-form-label">digest</label>
<div class="col-sm-9">
<la:errors property="doc.digest"/>
<la:text styleId="doc.digest" property="doc.digest" styleClass="form-control"/>
</div>
</div>
<div class="form-group row">
<label for="doc.host" class="col-sm-3 text-sm-right col-form-label">host</label>
<div class="col-sm-9">
<la:errors property="doc.host"/>
<la:text styleId="doc.host" property="doc.host" styleClass="form-control"/>
</div>
</div>
<div class="form-group row">
<label for="doc.site" class="col-sm-3 text-sm-right col-form-label">site</label>
<div class="col-sm-9">
<la:errors property="doc.site"/>
<la:text styleId="doc.site" property="doc.site" styleClass="form-control"/>
</div>
</div>
<div class="form-group row">
<label for="doc.segment" class="col-sm-3 text-sm-right col-form-label">segment</label>
<div class="col-sm-9">
<la:errors property="doc.segment"/>
<la:text styleId="doc.segment" property="doc.segment" styleClass="form-control"/>
</div>
</div>
<div class="form-group row">
<label for="doc.config_id" class="col-sm-3 text-sm-right col-form-label">config_id</label>
<div class="col-sm-9">
<la:errors property="doc.config_id"/>
<la:text styleId="doc.config_id" property="doc.config_id" styleClass="form-control"/>
</div>
</div>
<div class="form-group row">
<label for="doc.parent_id" class="col-sm-3 text-sm-right col-form-label">parent_id</label>
<div class="col-sm-9">
<la:errors property="doc.parent_id"/>
<la:text styleId="doc.parent_id" property="doc.parent_id" styleClass="form-control"/>
</div>
</div>
<div class="form-group row">
<label for="doc.content_length" class="col-sm-3 text-sm-right col-form-label">content_length</label>
<div class="col-sm-9">
<la:errors property="doc.content_length"/>
<la:text styleId="doc.content_length"
property="doc.content_length"
styleClass="form-control" title="Integer"
data-validation="custom" data-validation-regexp="^(\d+)?$"
data-validation-help="number (Integer)"/>
</div>
</div>
<div class="form-group row">
<label for="doc.favorite_count" class="col-sm-3 text-sm-right col-form-label">favorite_count</label>
<div class="col-sm-9">
<la:errors property="doc.favorite_count"/>
<la:text styleId="doc.favorite_count"
property="doc.favorite_count"
styleClass="form-control" title="Integer"
data-validation="custom" data-validation-regexp="^(\d+)?$"
data-validation-help="number (Integer)"/>
</div>
</div>
<div class="form-group row">
<label for="doc.click_count" class="col-sm-3 text-sm-right col-form-label">click_count</label>
<div class="col-sm-9">
<la:errors property="doc.click_count"/>
<la:text styleId="doc.click_count"
property="doc.click_count" styleClass="form-control"
title="Integer" data-validation="custom"
data-validation-regexp="^(\d+)?$"
data-validation-help="number (Integer)"/>
</div>
</div>
<div class="form-group row">
<label for="doc.created" class="col-sm-3 text-sm-right col-form-label">created</label>
<div class="col-sm-9">
<la:errors property="doc.created"/>
<la:text styleId="doc.created"
property="doc.created" styleClass="form-control"
title="yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
data-validation="custom"
data-validation-regexp="(^$|^[1-9]\d{3}\-\d\d\-\d\dT\d\d\:\d\d\:\d\d\.\d{3}Z$)"
data-validation-help="yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"/>
</div>
</div>
<div class="form-group row">
<label for="doc.timestamp" class="col-sm-3 text-sm-right col-form-label">timestamp</label>
<div class="col-sm-9">
<la:errors property="doc.timestamp"/>
<la:text styleId="doc.timestamp"
property="doc.timestamp" styleClass="form-control"
title="yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
data-validation="custom"
data-validation-regexp="(^$|^[1-9]\d{3}\-\d\d\-\d\dT\d\d\:\d\d\:\d\d\.\d{3}Z$)"
data-validation-help="yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"/>
</div>
</div>
<div class="form-group row">
<label for="doc.last_modified" class="col-sm-3 text-sm-right col-form-label">last_modified</label>
<div class="col-sm-9">
<la:errors property="doc.last_modified"/>
<la:text styleId="doc.last_modified"
property="doc.last_modified" styleClass="form-control"
title="yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
data-validation="custom"
data-validation-regexp="(^$|^[1-9]\d{3}\-\d\d\-\d\dT\d\d\:\d\d\:\d\d\.\d{3}Z$)"
data-validation-help="yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"/>
</div>
</div>
<div class="form-group row">
<label for="doc.expires" class="col-sm-3 text-sm-right col-form-label">expires</label>
<div class="col-sm-9">
<la:errors property="doc.expires"/>
<la:text styleId="doc.expires"
property="doc.expires" styleClass="form-control"
title="yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
data-validation="custom"
data-validation-regexp="(^$|^[1-9]\d{3}\-\d\d\-\d\dT\d\d\:\d\d\:\d\d\.\d{3}Z$)"
data-validation-help="yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"/>
</div>
</div>
<div class="form-group row">
<label for="doc.virtual_host" class="col-sm-3 text-sm-right col-form-label">virtual_host</label>
<div class="col-sm-9">
<la:errors property="doc.virtual_host"/>
<la:textarea styleId="doc.virtual_host" property="doc.virtual_host" styleClass="form-control"/>
</div>
</div>
</div>
<div class="card-footer">
<c:if test="${crudMode == 1}">
<la:link href="/admin/searchlist/search?q=${f:u(q)}" styleClass="btn btn-default">
<em class="fa fa-arrow-circle-left"></em>
<la:message key="labels.crud_button_back"/>
</la:link>
<button type="submit" class="btn btn-success" name="create"
value="<la:message key="labels.crud_button_create" />">
<em class="fa fa-plus"></em>
<la:message key="labels.crud_button_create"/>
</button>
</c:if>
<c:if test="${crudMode == 2}">
<la:link href="/admin/searchlist/search?q=${f:u(q)}" styleClass="btn btn-default">
<em class="fa fa-arrow-circle-left"></em>
<la:message key="labels.crud_button_back"/>
</la:link>
<button type="submit" class="btn btn-success" name="update"
value="<la:message key="labels.crud_button_update" />">
<em class="fa fa-pencil-alt"></em>
<la:message key="labels.crud_button_update"/>
</button>
</c:if>
</div>
</div>
</div>
</div>
</la:form>
</section>
</div>
<jsp:include page="/WEB-INF/view/common/admin/footer.jsp"></jsp:include>
</div>
<jsp:include page="/WEB-INF/view/common/admin/foot.jsp"></jsp:include>
<script src="${fe:url('/js/admin/plugins/form-validator/jquery.form-validator.min.js')}"
type="text/javascript"></script>
<script src="${fe:url('/js/admin/searchlist.js')}" type="text/javascript"></script>
</body>
</html>
|
{
"pile_set_name": "Github"
}
|
<!doctype html>
<html lang="en">
<head>
<title>Code coverage report for lib/spdy-transport/protocol/spdy/</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../../../../prettify.css" />
<link rel="stylesheet" href="../../../../base.css" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type='text/css'>
.coverage-summary .sorter {
background-image: url(../../../../sort-arrow-sprite.png);
}
</style>
</head>
<body>
<div class='wrapper'>
<div class='pad1'>
<h1>
<a href="../../../../index.html">all files</a> lib/spdy-transport/protocol/spdy/
</h1>
<div class='clearfix'>
<div class='fl pad1y space-right2'>
<span class="strong">90.65% </span>
<span class="quiet">Statements</span>
<span class='fraction'>475/524</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">79.67% </span>
<span class="quiet">Branches</span>
<span class='fraction'>196/246</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">93.24% </span>
<span class="quiet">Functions</span>
<span class='fraction'>69/74</span>
</div>
<div class='fl pad1y space-right2'>
<span class="strong">91.94% </span>
<span class="quiet">Lines</span>
<span class='fraction'>468/509</span>
</div>
</div>
</div>
<div class='status-line high'></div>
<div class="pad1">
<table class="coverage-summary">
<thead>
<tr>
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
</tr>
</thead>
<tbody><tr>
<td class="file high" data-value="constants.js"><a href="constants.js.html">constants.js</a></td>
<td data-value="100" class="pic high"><div class="chart"><div class="cover-fill cover-full" style="width: 100%;"></div><div class="cover-empty" style="width:0%;"></div></div></td>
<td data-value="100" class="pct high">100%</td>
<td data-value="18" class="abs high">18/18</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="18" class="abs high">18/18</td>
</tr>
<tr>
<td class="file high" data-value="dictionary.js"><a href="dictionary.js.html">dictionary.js</a></td>
<td data-value="100" class="pic high"><div class="chart"><div class="cover-fill cover-full" style="width: 100%;"></div><div class="cover-empty" style="width:0%;"></div></div></td>
<td data-value="100" class="pct high">100%</td>
<td data-value="6" class="abs high">6/6</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="6" class="abs high">6/6</td>
</tr>
<tr>
<td class="file high" data-value="framer.js"><a href="framer.js.html">framer.js</a></td>
<td data-value="91.84" class="pic high"><div class="chart"><div class="cover-fill" style="width: 91%;"></div><div class="cover-empty" style="width:9%;"></div></div></td>
<td data-value="91.84" class="pct high">91.84%</td>
<td data-value="245" class="abs high">225/245</td>
<td data-value="81.55" class="pct high">81.55%</td>
<td data-value="103" class="abs high">84/103</td>
<td data-value="93.18" class="pct high">93.18%</td>
<td data-value="44" class="abs high">41/44</td>
<td data-value="92.05" class="pct high">92.05%</td>
<td data-value="239" class="abs high">220/239</td>
</tr>
<tr>
<td class="file high" data-value="index.js"><a href="index.js.html">index.js</a></td>
<td data-value="100" class="pic high"><div class="chart"><div class="cover-fill cover-full" style="width: 100%;"></div><div class="cover-empty" style="width:0%;"></div></div></td>
<td data-value="100" class="pct high">100%</td>
<td data-value="6" class="abs high">6/6</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="0" class="abs high">0/0</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="6" class="abs high">6/6</td>
</tr>
<tr>
<td class="file high" data-value="parser.js"><a href="parser.js.html">parser.js</a></td>
<td data-value="88.05" class="pic high"><div class="chart"><div class="cover-fill" style="width: 88%;"></div><div class="cover-empty" style="width:12%;"></div></div></td>
<td data-value="88.05" class="pct high">88.05%</td>
<td data-value="226" class="abs high">199/226</td>
<td data-value="79.14" class="pct medium">79.14%</td>
<td data-value="139" class="abs medium">110/139</td>
<td data-value="95.83" class="pct high">95.83%</td>
<td data-value="24" class="abs high">23/24</td>
<td data-value="90.78" class="pct high">90.78%</td>
<td data-value="217" class="abs high">197/217</td>
</tr>
<tr>
<td class="file high" data-value="zlib-pool.js"><a href="zlib-pool.js.html">zlib-pool.js</a></td>
<td data-value="91.3" class="pic high"><div class="chart"><div class="cover-fill" style="width: 91%;"></div><div class="cover-empty" style="width:9%;"></div></div></td>
<td data-value="91.3" class="pct high">91.3%</td>
<td data-value="23" class="abs high">21/23</td>
<td data-value="50" class="pct medium">50%</td>
<td data-value="4" class="abs medium">2/4</td>
<td data-value="83.33" class="pct high">83.33%</td>
<td data-value="6" class="abs high">5/6</td>
<td data-value="91.3" class="pct high">91.3%</td>
<td data-value="23" class="abs high">21/23</td>
</tr>
</tbody>
</table>
</div><div class='push'></div><!-- for sticky footer -->
</div><!-- /wrapper -->
<div class='footer quiet pad2 space-top1 center small'>
Code coverage
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Thu Feb 02 2017 23:24:23 GMT+0000 (WET)
</div>
</div>
<script src="../../../../prettify.js"></script>
<script>
window.onload = function () {
if (typeof prettyPrint === 'function') {
prettyPrint();
}
};
</script>
<script src="../../../../sorter.js"></script>
</body>
</html>
|
{
"pile_set_name": "Github"
}
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CSS Writing Modes Test: absolutely positioned non-replaced element - 'direction: ltr' and 'width' is 'auto' and 'left' and 'right' are not 'auto'</title>
<link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/" />
<link rel="help" href="http://www.w3.org/TR/css-writing-modes-3/#vertical-layout" title="7.1 Principles of Layout in Vertical Writing Modes" />
<link rel="help" href="http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-height" title="10.6.4 Absolutely positioned, non-replaced elements" />
<link rel="match" href="abs-pos-non-replaced-vlr-007-ref.xht" />
<meta name="flags" content="ahem image" />
<meta name="assert" content="When 'direction' is 'ltr' and 'width' is 'auto' and 'left' and 'right' are not 'auto' and 'writing-mode' is 'vertical-lr', then solve for 'width'." />
<style type="text/css"><![CDATA[
@font-face {
font-family: Ahem;
src: url("../../../fonts/Ahem.ttf");
}
]]></style>
<style type="text/css"><![CDATA[
html
{
writing-mode: vertical-lr;
}
div#containing-block
{
background: red url("support/bg-red-2col-3row-320x320.png");
color: transparent;
direction: ltr;
font: 80px/1 Ahem;
height: 320px;
position: relative;
width: 320px;
}
div#containing-block > span
{
background-color: green;
height: 1em;
left: 1em;
position: absolute;
right: 2em;
width: auto;
}
/*
"
Layout calculation rules (such as those in CSS2.1, Section 10.3) that apply to the horizontal dimension in horizontal writing modes instead apply to the vertical dimension in vertical writing modes.
"
7.1 Principles of Layout in Vertical Writing Modes
http://www.w3.org/TR/css-writing-modes-3/#vertical-layout
So here, *left properties and *right properties are input into the §10.6.4 algorithms where *left properties refer to *top properties in the layout rules and where *right properties refer to *bottom properties in the layout rules.
"
5. 'height' is 'auto', 'top' and 'bottom' are not 'auto', then 'auto' values for 'margin-top' and 'margin-bottom' are set to 0 and solve for 'height'
"
'left' + 'margin-left' + 'border-left-width' + 'padding-left' + 'width' + 'padding-right' + 'border-right-width' + 'margin-right' + 'right' = width of containing block
So:
160px : right
+
0px : margin-right
+
0px : border-right-width
+
0px : padding-right
+
(solve) : width: auto
+
0px : padding-left
+
0px : border-left-width
+
0px : margin-left
+
80px : left
=====================
320px : width of containing block
And so computed width value must be 80px .
*/
]]></style>
</head>
<body>
<p><img src="support/pass-cdts-abs-pos-non-replaced.png" width="246" height="36" alt="Image download support must be enabled" /></p>
<div id="containing-block">1 2 34<span></span></div>
</body>
</html>
|
{
"pile_set_name": "Github"
}
|
'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
function getDecimals(n) {
n = n + '';
var i = n.indexOf('.');
return (i == -1) ? 0 : n.length - i - 1;
}
function getVF(n, opt_precision) {
var v = opt_precision;
if (undefined === v) {
v = Math.min(getDecimals(n), 3);
}
var base = Math.pow(10, v);
var f = ((n * base) | 0) % base;
return {v: v, f: f};
}
$provide.value("$locale", {
"DATETIME_FORMATS": {
"AMPMS": [
"icheheavo",
"ichamthi"
],
"DAY": [
"Jumapili",
"Jumatatu",
"Jumanne",
"Jumatano",
"Alhamisi",
"Ijumaa",
"Jumamosi"
],
"MONTH": [
"Januari",
"Februari",
"Machi",
"Aprili",
"Mei",
"Juni",
"Julai",
"Agosti",
"Septemba",
"Oktoba",
"Novemba",
"Desemba"
],
"SHORTDAY": [
"Jpi",
"Jtt",
"Jnn",
"Jtn",
"Alh",
"Ijm",
"Jmo"
],
"SHORTMONTH": [
"Jan",
"Feb",
"Mac",
"Apr",
"Mei",
"Jun",
"Jul",
"Ago",
"Sep",
"Okt",
"Nov",
"Dec"
],
"fullDate": "EEEE, d MMMM y",
"longDate": "d MMMM y",
"medium": "d MMM y h:mm:ss a",
"mediumDate": "d MMM y",
"mediumTime": "h:mm:ss a",
"short": "dd/MM/y h:mm a",
"shortDate": "dd/MM/y",
"shortTime": "h:mm a"
},
"NUMBER_FORMATS": {
"CURRENCY_SYM": "TSh",
"DECIMAL_SEP": ".",
"GROUP_SEP": ",",
"PATTERNS": [
{
"gSize": 3,
"lgSize": 3,
"maxFrac": 3,
"minFrac": 0,
"minInt": 1,
"negPre": "-",
"negSuf": "",
"posPre": "",
"posSuf": ""
},
{
"gSize": 3,
"lgSize": 3,
"maxFrac": 2,
"minFrac": 2,
"minInt": 1,
"negPre": "-",
"negSuf": "\u00a0\u00a4",
"posPre": "",
"posSuf": "\u00a0\u00a4"
}
]
},
"id": "asa-tz",
"pluralCat": function (n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
});
}]);
|
{
"pile_set_name": "Github"
}
|
@import url("https://fonts.googleapis.com/css?family=Open+Sans");
#kss-node .kss-section {
margin-bottom: 2rem; }
#kss-node .kss-section:first-child, #kss-node .kss-section:last-child {
border-bottom: 0;
margin-bottom: 0;
padding-bottom: 1rem; }
#kss-node .kss-depth-2 {
margin: 0;
background: url("../assets/hr.png") repeat-x 0 0;
border: 0;
float: left;
clear: both;
width: 100%; }
#kss-node .kss-modifier {
border-top: 0; }
#kss-node .kss-wrapper {
margin-left: 0;
position: relative;
max-width: 1440px;
padding: 0; }
#kss-node .kss-content {
padding-right: 0.5rem;
padding-left: 0.5rem;
margin: 2rem;
clear: both; }
@media (min-width: 40em) {
#kss-node .kss-content {
padding-right: 0.5rem;
padding-left: 0.5rem;
-webkit-transition: all 0.5s ease-in-out;
-o-transition: all 0.5s ease-in-out;
transition: all 0.5s ease-in-out;
margin: 0 3rem 0 325px;
clear: none; } }
#kss-node .kss-sidebar-collapsed + .kss-content {
margin: 0 3rem; }
@media (min-width: 40em) {
#kss-node .kss-sidebar-collapsed + .kss-content {
-webkit-transition: all 0.5s ease-in-out;
-o-transition: all 0.5s ease-in-out;
transition: all 0.5s ease-in-out;
margin: 0 3rem 0 6rem; } }
#kss-node .kss-modifier-original .kss-modifier-example {
padding: 1rem 0; }
#kss-node .kss-overview code,
#kss-node .kss-description code,
#kss-node .kss-description pre {
padding: 2px 6px;
background: #f4f4f4;
border-radius: 4px;
font-size: 14px; }
#kss-node .kss-description blockquote {
margin-bottom: 2rem; }
#kss-node .kss-description h3 {
font-weight: normal;
font-style: normal;
margin: 20px 0 0;
font-size: 16px; }
@media (min-width: 55em) {
#kss-node .kss-description h3 {
font-size: 20px; } }
#kss-node .kss-markup pre {
border-radius: 0 4px 4px 0;
border: 2px solid #f4f4f4;
border-left: 5px solid #e00000; }
#kss-node .kss-sidebar.kss-fixed,
#kss-node .kss-sidebar {
background: #f4f4f4;
padding: 0 2rem;
width: 100%;
margin: 0 auto;
position: relative;
-webkit-box-sizing: border-box;
box-sizing: border-box;
z-index: 999;
-webkit-box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
float: left;
height: 100%; }
#kss-node .kss-sidebar.kss-fixed .kss-sidebar-inner,
#kss-node .kss-sidebar .kss-sidebar-inner {
text-decoration: none;
padding-top: 0;
margin-top: -1rem; }
@media (min-width: 40em) {
#kss-node .kss-sidebar.kss-fixed,
#kss-node .kss-sidebar {
height: 100% !important;
width: 275px;
position: fixed;
padding: 2.5rem 2rem;
overflow-y: auto !important; }
#kss-node .kss-sidebar.kss-fixed .kss-nav,
#kss-node .kss-sidebar .kss-nav {
padding: 0.5rem 0;
margin: 0.5rem 0;
max-height: 100%;
overflow-y: auto !important;
clear: both;
width: 100%; } }
#kss-node .kss-menu > .kss-menu-item {
padding: 0.5rem;
border-bottom: 1px solid #bbbbbb; }
#kss-node .kss-menu > .kss-menu-item:last-child {
border-bottom: 0; }
#kss-node .kss-menu,
#kss-node .kss-menu-child,
#kss-node .kss-menu > .kss-menu-item > a {
border-bottom: 0; }
#kss-node .kss-menu li,
#kss-node .kss-menu-child li,
#kss-node .kss-menu > .kss-menu-item > a li {
list-style: none; }
#kss-node .kss-menu > .kss-menu-item > a > .kss-name,
#kss-node .kss-menu-child > .kss-menu-item > a > .kss-name,
#kss-node .kss-menu > .kss-menu-item > a > .kss-menu-item > a > .kss-name {
text-align: left;
color: #464646;
font-weight: 100; }
#kss-node .kss-menu > .kss-menu-item > a > .kss-name:hover, #kss-node .kss-menu > .kss-menu-item > a > .kss-name:focus, #kss-node .kss-menu > .kss-menu-item > a > .kss-name:active,
#kss-node .kss-menu-child > .kss-menu-item > a > .kss-name:hover,
#kss-node .kss-menu-child > .kss-menu-item > a > .kss-name:focus,
#kss-node .kss-menu-child > .kss-menu-item > a > .kss-name:active,
#kss-node .kss-menu > .kss-menu-item > a > .kss-menu-item > a > .kss-name:hover,
#kss-node .kss-menu > .kss-menu-item > a > .kss-menu-item > a > .kss-name:focus,
#kss-node .kss-menu > .kss-menu-item > a > .kss-menu-item > a > .kss-name:active {
color: #464646;
text-decoration: underline; }
#kss-node .kss-menu-child {
padding: 0; }
#kss-node h1 > a,
#kss-node h2 > a,
#kss-node h3 > a,
#kss-node .kss-menu > .kss-menu-item > a > .kss-ref,
#kss-node .kss-menu-child > .kss-menu-item > a > .kss-ref,
#kss-node .kss-overview a,
#kss-node .kss-description a {
text-align: left;
color: #e00000;
text-decoration: none;
font-weight: bold; }
#kss-node h1 > a:hover, #kss-node h1 > a:focus, #kss-node h1 > a:active,
#kss-node h2 > a:hover,
#kss-node h2 > a:focus,
#kss-node h2 > a:active,
#kss-node h3 > a:hover,
#kss-node h3 > a:focus,
#kss-node h3 > a:active,
#kss-node .kss-menu > .kss-menu-item > a > .kss-ref:hover,
#kss-node .kss-menu > .kss-menu-item > a > .kss-ref:focus,
#kss-node .kss-menu > .kss-menu-item > a > .kss-ref:active,
#kss-node .kss-menu-child > .kss-menu-item > a > .kss-ref:hover,
#kss-node .kss-menu-child > .kss-menu-item > a > .kss-ref:focus,
#kss-node .kss-menu-child > .kss-menu-item > a > .kss-ref:active,
#kss-node .kss-overview a:hover,
#kss-node .kss-overview a:focus,
#kss-node .kss-overview a:active,
#kss-node .kss-description a:hover,
#kss-node .kss-description a:focus,
#kss-node .kss-description a:active {
color: #a51323;
text-decoration: underline; }
#kss-node .kss-doc-title {
text-align: left;
color: #464646;
text-decoration: none;
margin: 0; }
#kss-node h2,
#kss-node h3 {
text-align: left;
color: #464646;
text-decoration: none;
font-weight: normal; }
#kss-node .kss-depth-1 .kss-title,
#kss-node .kss-overview > h1:first-child {
font-weight: 100;
padding-bottom: 0;
margin-bottom: 0;
border-bottom: 0;
font-size: 30px; }
@media (min-width: 55em) {
#kss-node .kss-depth-1 .kss-title,
#kss-node .kss-overview > h1:first-child {
font-size: 38px; } }
#kss-node .kss-depth-2 .kss-title {
font-weight: 100;
padding-bottom: 0;
margin-bottom: 0;
border-bottom: 0;
font-size: 24px; }
@media (min-width: 55em) {
#kss-node .kss-depth-2 .kss-title {
font-size: 28px; } }
#kss-node .kss-header {
background: transparent; }
#kss-node .kss-header .site-logo {
float: left;
margin-top: 1rem;
width: 50%;
max-width: 150px;
margin-top: 0;
margin-bottom: 1rem; }
@media (min-width: 40em) {
#kss-node .kss-header .site-logo {
width: 100%;
max-width: 215px;
margin-top: 1rem;
margin-bottom: 0; } }
#kss-node .kss-overview h1,
#kss-node .kss-overview h2,
#kss-node .kss-overview h3,
#kss-node .kss-overview h4,
#kss-node .kss-overview h5,
#kss-node .kss-overview h6,
#kss-node h1,
#kss-node h2,
#kss-node h3,
#kss-node h4,
#kss-node h5,
#kss-node h6 {
font-weight: normal; }
#kss-node .kss-overview h1 {
margin: 0 0 30px;
padding-bottom: 10px;
font-size: 30px; }
@media (min-width: 55em) {
#kss-node .kss-overview h1 {
font-size: 38px; } }
#kss-node .kss-overview h2 {
font-size: 24px; }
@media (min-width: 55em) {
#kss-node .kss-overview h2 {
font-size: 28px; } }
#kss-node blockquote {
font-style: italic; }
.kss-sidebar,
.nav-btn {
-webkit-transition: all 0.5s ease-in-out;
-o-transition: all 0.5s ease-in-out;
transition: all 0.5s ease-in-out;
overflow: visible !important; }
.kss-sidebar {
width: 200px;
height: 100vh;
position: absolute;
top: 0;
left: 0; }
.no-js .nav-btn {
display: none; }
.nav-btn {
display: none; }
@media (min-width: 40em) {
.nav-btn {
display: block;
position: absolute;
width: 32px;
height: 32px;
background: url("../assets/chevron_left_round_red.png") no-repeat;
right: 10px;
top: 2px;
background-size: 32px;
border: 0;
-webkit-box-shadow: none;
box-shadow: none;
background-color: transparent;
min-height: 0; }
.nav-btn:hover, .nav-btn:focus, .nav-btn:active {
border: 0;
-webkit-box-shadow: none;
box-shadow: none;
background-color: transparent;
cursor: pointer;
-webkit-box-shadow: 0px 3px 15px #888b8d;
box-shadow: 0px 3px 15px #888b8d;
border-radius: 75%; } }
.kss-menu {
opacity: 1;
-webkit-transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
-o-transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
visibility: visible; }
@media (min-width: 40em) {
.kss-sidebar-collapsed {
-webkit-transform: translateX(-82%);
-ms-transform: translateX(-82%);
transform: translateX(-82%);
overflow-y: hidden !important; }
.kss-sidebar-collapsed .kss-menu,
.kss-sidebar-collapsed .kss-header {
opacity: 0;
visibility: hidden; } }
@media (min-width: 40em) {
#kss-node .kss-sidebar.kss-fixed.kss-sidebar-collapsed,
#kss-node .kss-sidebar-collapsed {
overflow-y: hidden !important; } }
.kss-sidebar-collapsed .nav-btn {
-webkit-transform: translateX(100%);
-ms-transform: translateX(100%);
transform: translateX(100%);
background: url("../assets/chevron_right_round_red.png") no-repeat;
background-size: 32px;
right: 40px;
top: 2px;
background-position: 50%;
border: 0;
-webkit-box-shadow: none;
box-shadow: none;
background-color: transparent;
min-height: 0; }
.kss-sidebar-collapsed .nav-btn:hover, .kss-sidebar-collapsed .nav-btn:focus, .kss-sidebar-collapsed .nav-btn:active {
border: 0;
-webkit-box-shadow: none;
box-shadow: none;
background-color: transparent;
cursor: pointer;
-webkit-box-shadow: 0px 3px 15px #888b8d;
box-shadow: 0px 3px 15px #888b8d;
border-radius: 75%; }
.kss-skip-link {
background: #e00000;
border: 3px solid #a51323;
color: #ffffff;
display: inline-block;
left: 0;
list-style: none;
opacity: 1;
padding: 0.8rem;
pointer-events: none;
position: fixed;
text-decoration: underline;
top: -100px;
-webkit-transition: top 0.3s ease-in-out;
-o-transition: top 0.3s ease-in-out;
transition: top 0.3s ease-in-out;
z-index: 99999;
text-transform: capitalize; }
.kss-skip-link:focus, .kss-skip-link:active {
color: #ffffff;
opacity: 1;
top: 0; }
body {
font-family: 'Open Sans', 'Arial', sans-serif;
color: #464646; }
.break {
margin: 3rem 0;
border-bottom: 1px solid #f4f4f4;
clear: both;
float: left;
width: 100%; }
.markup {
margin: 1.5rem 0;
border-bottom: 1px solid #f4f4f4; }
.visuallyhidden {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
white-space: nowrap;
width: 1px; }
.bold {
font-weight: bold !important; }
.js-show-markup {
margin: 0.5rem 0; }
abbr[title] {
text-decoration: none; }
.copied {
color: #42dc42;
display: none; }
.atblock {
position: relative; }
.atblock__title,
.atblock__panel {
overflow: hidden;
position: relative;
padding: 0 0.5rem;
margin: 0 !important; }
.atblock__title p,
.atblock__panel p {
margin: 10px 0 15px !important; }
.atblock__title ul,
.atblock__panel ul {
margin: 0 !important; }
.atblock__title.guidelines p,
.atblock__panel.guidelines p {
margin: 10px 10px 15px 55px !important;
border-left: 2px solid #f4f4f4;
padding-left: 15px;
position: relative; }
.atblock__title + .atblock__panel {
max-height: 0;
visibility: hidden; }
.atblock__title + .atblock__panel[aria-hidden='false'],
.no-js .atblock__title + .atblock__panel:target {
max-height: 100%;
visibility: visible;
padding-bottom: 1rem;
padding-left: 1rem; }
.atblock__title__trigger {
font-size: 18px;
font-weight: normal !important;
padding: 0;
background-repeat: no-repeat;
padding-right: 40px;
display: inline-block !important;
background-image: url("../assets/plus_round_red.png");
background-size: 28px;
background-position: 97% 0%;
border: 0;
-webkit-box-shadow: none;
box-shadow: none;
background-color: transparent;
font-family: 'Open Sans', 'Arial', sans-serif;
height: 30px;
line-height: 1.5;
margin: 0.5rem 0; }
@media (min-width: 55em) {
.atblock__title__trigger {
font-size: 20px;
background-size: 32px;
background-position: 100% 50%; } }
.atblock__title__trigger[aria-expanded='true'] {
content: '';
background: url("../assets/minus_round_red.png");
background-size: 28px;
background-repeat: no-repeat;
background-position: 97% 0%; }
@media (min-width: 55em) {
.atblock__title__trigger[aria-expanded='true'] {
background-size: 32px;
background-position: 100% 50%; } }
.atblock__title__trigger:hover, .atblock__title__trigger:focus, .atblock__title__trigger:active {
border: 0;
-webkit-box-shadow: none;
box-shadow: none;
background-color: transparent; }
.guidelines {
margin-left: 10px;
position: relative; }
.guidelines::before {
content: '';
background: url("../assets/w3c.png");
background-size: 50px;
float: left;
clear: both;
width: 50px;
margin: auto;
position: absolute;
top: 12px;
bottom: 0;
left: 10px;
right: auto;
text-align: left;
background-repeat: no-repeat; }
a[target='_blank']::after {
content: '';
background: url("../assets/icon_new-tab.png");
background-size: 15px;
background-repeat: no-repeat;
margin: 0 0 -2px 5px;
width: 15px;
height: 15px;
display: inline-block; }
.social-link-twitter {
content: '';
background: url("../assets/icon_twitter.png");
background-size: 32px;
background-repeat: no-repeat;
padding: 0.5rem 1rem;
margin: 0.5rem; }
.social-link-twitter[target='_blank']::after {
display: none; }
.social-link-github {
content: '';
background: url("../assets/icon_github.png");
background-size: 32px;
background-repeat: no-repeat;
padding: 0.5rem 1rem;
margin: 0.5rem; }
.social-link-github[target='_blank']::after {
display: none; }
.social-link-out {
position: absolute;
right: 2rem;
top: 2rem; }
.back-to-top {
background-color: transparent;
bottom: 12px;
height: 2.5rem;
width: 2.5rem;
position: fixed;
right: 9px;
-webkit-transform: translateY(130%);
-ms-transform: translateY(130%);
transform: translateY(130%);
-webkit-transition: -webkit-transform 0.5s ease-in-out;
transition: -webkit-transform 0.5s ease-in-out;
-o-transition: transform 0.5s ease-in-out;
transition: transform 0.5s ease-in-out;
transition: transform 0.5s ease-in-out, -webkit-transform 0.5s ease-in-out;
background-image: url("../assets/chevron_up_round_red.png");
background-repeat: no-repeat;
background-size: 42px;
border-radius: 50%;
background-position: 50%; }
.back-to-top:hover, .back-to-top:focus, .back-to-top:active {
border: 0;
-webkit-box-shadow: none;
box-shadow: none;
cursor: pointer;
-webkit-box-shadow: 0px 3px 15px #888b8d;
box-shadow: 0px 3px 15px #888b8d;
border-radius: 50%; }
.show-back-to-top .back-to-top {
-webkit-transform: translateY(0%);
-ms-transform: translateY(0%);
transform: translateY(0%); }
.kss-menu {
display: none; }
.kss-menu li {
list-style: none;
padding: 0 10px; }
.kss-menu a {
text-decoration: none; }
.kss-menu.active {
display: block;
clear: both; }
.kss-menu.active li {
display: block;
clear: both; }
@media (min-width: 40em) {
.kss-menu {
display: block; }
.kss-menu #toggle-menu {
display: none; } }
.kss-nav {
margin-bottom: 0 !important; }
.kss-nav .menu-toggle {
float: right;
margin-top: 1.5rem; }
.kss-nav .navbar-mobile-icon {
display: block; }
.kss-nav .navbar-mobile-icon button {
background: #e00000; }
@media (min-width: 40em) {
.kss-nav .navbar-mobile-icon {
display: none; } }
.card {
position: relative;
max-width: 300px;
display: inline-block; }
.card__image img {
max-width: 100%;
border-radius: 4px;
-o-object-fit: cover;
object-fit: cover;
width: 300px;
height: 300px; }
.card__title {
display: block;
position: absolute;
bottom: 0;
left: 0;
right: 0;
padding: 2rem;
background: rgba(0, 0, 0, 0.65);
margin-bottom: 6px;
border-radius: 0 0 4px 4px;
text-align: center; }
.card__title a {
color: #ffffff; }
|
{
"pile_set_name": "Github"
}
|
{
"name": "odinlib",
"version": "0.2.0",
"description": "A nodejs package for gathering information in odin jobs",
"license": "MIT",
"repository": "github.com/theycallmemac/odin",
"main": "odin/odin.js",
"scripts": {
"test": "mocha"
},
"keywords": [
"odin",
"odinlib"
],
"dependencies": {
"yamljs": "^0.3.0"
},
"devDependencies": {
"eslint": "^7.4.0",
"eslint-config-google": "^0.14.0",
"mocha": "^7.2.0",
"mongodb": "^3.5.8"
}
}
|
{
"pile_set_name": "Github"
}
|
---
exp_name: qm8_gat
exp_dir: exp/qm8_gat
runner: QM8Runner
use_gpu: true
gpus: [0]
seed: 1234
dataset:
loader_name: QM8Data
name: chemistry
data_path: data/QM8/preprocess
meta_data_path: data/QM8/QM8_meta.p
num_atom: 70
num_bond_type: 6
model:
name: GAT
input_dim: 64
hidden_dim: [16, 16, 16, 16, 16, 16, 16]
num_layer: 7
num_heads: [8, 8, 8, 8, 8, 8, 8]
output_dim: 16
dropout: 0.0
loss: MSE
train:
optimizer: Adam
lr_decay: 0.1
lr_decay_steps: [10000]
num_workers: 4
max_epoch: 200
batch_size: 64
display_iter: 100
snapshot_epoch: 10000
valid_epoch: 1
lr: 1.0e-4
wd: 0.0e-4
momentum: 0.9
shuffle: true
is_resume: false
resume_model: None
test:
batch_size: 64
num_workers: 0
test_model:
|
{
"pile_set_name": "Github"
}
|
{% trans_default_domain 'cocorico_booking' %}
{% embed "@CocoricoCore/Dashboard/layout_show_bill.html.twig" %}
{% trans_default_domain 'cocorico_booking' %}
{% set booking = booking_payin_refund.booking %}
{#Currency values#}
{% set amount_dec = booking_payin_refund.amountDecimal %}
{% set amount_fees_dec = booking.amountFeeAsAskerDecimal %}
{% set amount_excl_vat_dec = amount_fees_dec / (1 + vatRate) %}
{% set amount_vat_dec = amount_fees_dec - amount_excl_vat_dec %}
{#Currency formated#}
{% set amount = amount_dec | format_price(app.request.locale, 2) %}
{% set amount_fees = amount_fees_dec | format_price(app.request.locale, 2) %}
{% set amount_vat = amount_vat_dec | format_price(app.request.locale, 2) %}
{% set amount_excl_vat = amount_excl_vat_dec | format_price(app.request.locale, 2) %}
{#Vars#}
{% set listing = booking.listing %}
{% set listing_translation = listing.translations[app.request.locale] %}
{% set user = booking.user %}
{% set user_timezone = booking.timeZoneAsker %}
{% set user_address = booking.user.getAddresses %}
{% set user_address = (user_address is empty) ? null : user_address[0] %}
{% set bill_date_title = 'booking.bill.date.title'|trans %}
{% set bill_date = booking_payin_refund.getPayedAt ? booking_payin_refund.getPayedAt|localizeddate('short', 'none', 'fr', user_timezone) : '' %}
{% set isRefund = true %}
{% endembed %}
|
{
"pile_set_name": "Github"
}
|
{
"action": {
"error": {
"notes": "Inadequate sanitization of FOIA released information",
"variety": [
"Misdelivery"
],
"vector": [
"Inadequate processes"
]
}
},
"actor": {
"internal": {
"job_change": [
"Let go"
],
"motive": [
"NA"
],
"variety": [
"Manager"
]
}
},
"asset": {
"assets": [
{
"amount": 1,
"variety": "S - Web application"
}
],
"cloud": [
"Other"
],
"country": [
"US"
],
"total_amount": 1
},
"attribute": {
"confidentiality": {
"data": [
{
"variety": "Personal"
},
{
"variety": "Internal"
}
],
"data_disclosure": "Yes",
"data_victim": [
"Employee",
"Student"
],
"state": [
"Stored unencrypted"
]
}
},
"confidence": "High",
"discovery_method": {
"external": {
"variety": [
"Customer"
]
}
},
"impact": {
"overall_rating": "Insignificant"
},
"incident_id": "019a5060-ef60-11e9-8b51-736a93581b2e",
"plus": {
"analysis_status": "Validated",
"analyst": "gbassett",
"asset_os": [
"Unknown"
],
"attribute": {
"confidentiality": {
"data_abuse": "No"
}
},
"created": "2019-10-15T20:37:42.582Z",
"dbir_year": 2020,
"event_chain": [
{
"action": "err",
"actor": "int",
"asset": "srv",
"attribute": "cp"
}
],
"github": "12798",
"master_id": "a2724294-4845-48f4-abc1-353c7112d575",
"modified": "2019-10-15T20:37:42.582Z"
},
"reference": "https://news.wttw.com/2018/12/28/cps-ousted-ogden-principal-exposed-private-student-info-new-data-breach",
"schema_version": "1.3.4",
"security_incident": "Confirmed",
"source_id": "vcdb",
"summary": "A principal sent a google drive link to a drive containing sensitive information by email. The principal was then FOIA'd and sent the email as part of the response, including the link with all the sensitive information.",
"targeted": "NA",
"timeline": {
"compromise": {
"unit": "Months"
},
"containment": {
"unit": "Unknown"
},
"discovery": {
"unit": "Weeks"
},
"exfiltration": {
"unit": "Minutes"
},
"incident": {
"year": 2018
}
},
"victim": {
"country": [
"US"
],
"employee_count": "50001 to 100000",
"industry": "611110",
"locations_affected": 1,
"region": [
"019021"
],
"state": "US-IL",
"victim_id": "Chicago Public School System"
}
}
|
{
"pile_set_name": "Github"
}
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Effects Demos</title>
<link rel="stylesheet" href="../demos.css">
</head>
<body>
<div class="demos-nav">
<h4>Examples</h4>
<ul>
<li class="demo-config-on"><a href="default.html">Default functionality</a></li>
</ul>
</div>
</body>
</html>
|
{
"pile_set_name": "Github"
}
|
// Configuration for your app
require("./build-index");
const path = require("path");
const fs = require("fs");
const webpack = require("webpack");
const CopyWebpackPlugin = require("copy-webpack-plugin");
const WebpackDeepScopeAnalysisPlugin = require('webpack-deep-scope-plugin').default;
const minimist = require('minimist');
module.exports = function (ctx) {
return {
// app boot file (/src/boot)
// --> boot files are part of "main.js"
boot: [
"i18n",
"axios",
"apiPath",
"buildPath",
"imagePath",
"avatarPath",
"formatDate",
"successNotify",
"errorNotify",
"request",
"api",
"shared",
"throttle",
"vueDevTools",
"getBreadcrumbs",
"icons",
"customJsBoot"
],
css: ["app.scss"],
extras: [
"line-awesome",
"fontawesome-v5"
//'roboto-font',
//'material-icons', // optional, you are not bound to it
//'ionicons-v4',
//'mdi-v3',
//'eva-icons'
],
framework: {
all: "auto",
// Quasar plugins
plugins: ["Notify", "Meta", "Dialog", "LocalStorage"],
animations: ["bounceInDown", "bounceOutUp"],
iconSet: "line-awesome",
lang: "ru" // Quasar language
},
preFetch: false,
supportIE: false,
build: {
scopeHoisting: true,
vueRouterMode: "history",
// vueCompiler: true,
// gzip: true,
// analyze: true,
// extractCSS: false,
extendWebpack(cfg) {
cfg.resolve.alias.storeInd = path.resolve("./src/store/index/index.js");
cfg.resolve.alias.router = path.resolve("./src/router/index.js");
cfg.resolve.alias.App = path.resolve("./src/App.vue");
cfg.resolve.modules.push(path.resolve("./src"));
cfg.resolve.modules.push(path.resolve("./src/index"));
const htmlWebpackPlugin = cfg.plugins.find(
x => x.constructor.name === "HtmlWebpackPlugin"
);
htmlWebpackPlugin.options.configUId = Math.floor(
Math.random() * 1000000
).toString();
cfg.plugins.push(
new webpack.ProvidePlugin({
Vue: ['vue', 'default'],
sunImport: ['src/utils/sunImport', 'default'],
request: ['src/utils/request', 'default'],
Api: ['src/api/Api', 'default'],
AdminApi: ['src/api/AdminApi', 'default'],
Page: ['src/mixins/Page', 'default']
}));
if (ctx.dev) {
let configPath = "src/config.js";
let args = minimist(process.argv.slice(2));
if (args.config) {
let cpath = path.resolve(args.config)
if (fs.existsSync(cpath))
configPath = args.config;
} else if (fs.existsSync(path.resolve('./src/l.config.js')))
configPath = "src/l.config.js";
console.log("Using config: " + configPath);
cfg.plugins.push(
new CopyWebpackPlugin([
{from: "src/site/statics", to: "site/statics"},
{from: configPath, to: "config.js"},
{from: "src/custom.css", to: "custom.css"},
{from: "src/custom.js", to: "custom.js"}
])
);
} else {
cfg.plugins.push(
new CopyWebpackPlugin([{from: "src/site/statics", to: "site/statics"}])
);
}
cfg.plugins.push(new WebpackDeepScopeAnalysisPlugin());
cfg.optimization.splitChunks.cacheGroups.sun = {
test: /[\\/]src[\\/]/,
minChunks: 1,
priority: -13,
chunks: "all",
reuseExistingChunk: true,
name: function (module) {
const match = module.context.match(/[\\/]src[\\/](.*?)([\\/]|$)/);
if (match && match.length >= 1) {
if (match[1] === "modules") {
const match = module.context.match(/[\\/]src[\\/]modules[\\/](.*?)([\\/]|$)/);
return `sun-${match[1]}`;
}
return `sun-${match[1]}`;
} else
return "sun-main";
}
};
cfg.optimization.splitChunks.cacheGroups.admin = {
test: /[\\/]src[\\/]admin[\\/]/,
minChunks: 1,
priority: -12,
chunks: "all",
reuseExistingChunk: true,
name: function (module) {
const match = module.context.match(/[\\/]src[\\/]admin[\\/](.*?)([\\/]|$)/);
if (match && match.length >= 1)
return `admin-${match[1]}`;
else
return "admin-main";
}
};
delete cfg.optimization.splitChunks.cacheGroups.app;
delete cfg.optimization.splitChunks.cacheGroups.common;
},
env: {
PACKAGE_JSON: JSON.stringify(require("./package"))
}
},
devServer: {
// https: true,
host: "localhost",
port: 5005,
open: true // opens browser window automatically
},
// animations: 'all' --- includes all animations
animations: [],
ssr: {
pwa: false
},
pwa: {
// workboxPluginMode: 'InjectManifest',
// workboxOptions: {},
manifest: {
// name: 'Quasar App',
// short_name: 'Quasar-PWA',
// description: 'Best PWA App in town!',
display: "standalone",
orientation: "portrait",
background_color: "#ffffff",
theme_color: "#027be3",
icons: [
{
src: "statics/icons/icon-128x128.png",
sizes: "128x128",
type: "image/png"
},
{
src: "statics/icons/icon-192x192.png",
sizes: "192x192",
type: "image/png"
},
{
src: "statics/icons/icon-256x256.png",
sizes: "256x256",
type: "image/png"
},
{
src: "statics/icons/icon-384x384.png",
sizes: "384x384",
type: "image/png"
},
{
src: "statics/icons/icon-512x512.png",
sizes: "512x512",
type: "image/png"
}
]
}
},
cordova: {
// id: 'org.cordova.quasar.app'
},
electron: {
// bundler: 'builder', // or 'packager'
extendWebpack(cfg) {
// do something with Electron process Webpack cfg
},
packager: {
// https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options
// OS X / Mac App Store
// appBundleId: '',
// appCategoryType: '',
// osxSign: '',
// protocol: 'myapp://path',
// Window only
// win32metadata: { ... }
},
builder: {
// https://www.electron.build/configuration/configuration
// appId: 'quasar-app'
}
}
};
};
|
{
"pile_set_name": "Github"
}
|
<!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"/>
<title>LCD Library: /Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR3W.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="logoGoogle.jpg"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">LCD Library <span id="projectnumber">1.2.1</span></div>
<div id="projectbrief">LCD Library - LCD control class hierarchy library. Drop in replacement for the LiquidCrystal Library.</div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li id="searchli">
<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="files.html"><span>File List</span></a></li>
<li><a href="globals.html"><span>File Members</span></a></li>
</ul>
</div>
<div class="header">
<div class="headertitle">
<div class="title">/Users/fmalpartida/development/ardWorkspace/LiquidCrystal_I2C/LiquiCrystal_I2C/LiquidCrystal_SR3W.cpp</div> </div>
</div>
<div class="contents">
<a href="_liquid_crystal___s_r3_w_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00002"></a>00002 <span class="comment">// Created by Francisco Malpartida on 7.3.2012.</span>
<a name="l00003"></a>00003 <span class="comment">// Copyright 2011 - Under creative commons license 3.0:</span>
<a name="l00004"></a>00004 <span class="comment">// Attribution-ShareAlike CC BY-SA</span>
<a name="l00005"></a>00005 <span class="comment">//</span>
<a name="l00006"></a>00006 <span class="comment">// This software is furnished "as is", without technical support, and with no </span>
<a name="l00007"></a>00007 <span class="comment">// warranty, express or implied, as to its usefulness for any purpose.</span>
<a name="l00008"></a>00008 <span class="comment">//</span>
<a name="l00009"></a>00009 <span class="comment">// Thread Safe: No</span>
<a name="l00010"></a>00010 <span class="comment">// Extendable: Yes</span>
<a name="l00011"></a>00011 <span class="comment">//</span>
<a name="l00012"></a>00012 <span class="comment">// @file LiquidCrystal_SRG.h</span>
<a name="l00013"></a>00013 <span class="comment">// This file implements a basic liquid crystal library that comes as standard</span>
<a name="l00014"></a>00014 <span class="comment">// in the Arduino SDK but using a generic SHIFT REGISTER extension board.</span>
<a name="l00015"></a>00015 <span class="comment">// </span>
<a name="l00016"></a>00016 <span class="comment">// @brief </span>
<a name="l00017"></a>00017 <span class="comment">// This is a basic implementation of the LiquidCrystal library of the</span>
<a name="l00018"></a>00018 <span class="comment">// Arduino SDK. The original library has been reworked in such a way that </span>
<a name="l00019"></a>00019 <span class="comment">// this class implements the all methods to command an LCD based</span>
<a name="l00020"></a>00020 <span class="comment">// on the Hitachi HD44780 and compatible chipsets using a 3 wire latching</span>
<a name="l00021"></a>00021 <span class="comment">// shift register. While it has been tested with a 74HC595N shift register</span>
<a name="l00022"></a>00022 <span class="comment">// it should also work with other latching shift registers such as the MC14094</span>
<a name="l00023"></a>00023 <span class="comment">// and the HEF4094</span>
<a name="l00024"></a>00024 <span class="comment">//</span>
<a name="l00025"></a>00025 <span class="comment">// This particular driver has been created as generic as possible to enable</span>
<a name="l00026"></a>00026 <span class="comment">// users to configure and connect their LCDs using just 3 digital IOs from the</span>
<a name="l00027"></a>00027 <span class="comment">// AVR or Arduino, and connect the LCD to the outputs of the shiftregister</span>
<a name="l00028"></a>00028 <span class="comment">// in any configuration. The library is configured by passing the IO pins</span>
<a name="l00029"></a>00029 <span class="comment">// that control the strobe, data and clock of the shift register and a map</span>
<a name="l00030"></a>00030 <span class="comment">// of how the shiftregister is connected to the LCD.</span>
<a name="l00031"></a>00031 <span class="comment">// </span>
<a name="l00032"></a>00032 <span class="comment">//</span>
<a name="l00033"></a>00033 <span class="comment">// +--------------------------------------------+</span>
<a name="l00034"></a>00034 <span class="comment">// | MCU |</span>
<a name="l00035"></a>00035 <span class="comment">// | IO1 IO2 IO3 |</span>
<a name="l00036"></a>00036 <span class="comment">// +----+-------------+-------------+-----------+</span>
<a name="l00037"></a>00037 <span class="comment">// | | |</span>
<a name="l00038"></a>00038 <span class="comment">// | | |</span>
<a name="l00039"></a>00039 <span class="comment">// +----+-------------+-------------+-----------+</span>
<a name="l00040"></a>00040 <span class="comment">// | Strobe Data Clock |</span>
<a name="l00041"></a>00041 <span class="comment">// | 8-bit shift/latch register | 74HC595N</span>
<a name="l00042"></a>00042 <span class="comment">// | Qa0 Qb1 Qc2 Qd3 Qe4 Qf5 Qg6 Qh7 |</span>
<a name="l00043"></a>00043 <span class="comment">// +----+----+----+----+----+----+----+----+----+</span>
<a name="l00044"></a>00044 <span class="comment">// | | | | | | | </span>
<a name="l00045"></a>00045 <span class="comment">// |11 |12 |13 |14 |6 |5 |4 (LCD pins)</span>
<a name="l00046"></a>00046 <span class="comment">// +----+----+----+----+----+----+----+----+----+</span>
<a name="l00047"></a>00047 <span class="comment">// | DB4 DB5 DB6 DB7 E Rw RS |</span>
<a name="l00048"></a>00048 <span class="comment">// | LCD Module |</span>
<a name="l00049"></a>00049 <span class="comment">//</span>
<a name="l00050"></a>00050 <span class="comment">// NOTE: Rw is not used by the driver so it can be connected to GND.</span>
<a name="l00051"></a>00051 <span class="comment">//</span>
<a name="l00052"></a>00052 <span class="comment">// The functionality provided by this class and its base class is identical</span>
<a name="l00053"></a>00053 <span class="comment">// to the original functionality of the Arduino LiquidCrystal library.</span>
<a name="l00054"></a>00054 <span class="comment">//</span>
<a name="l00055"></a>00055 <span class="comment">//</span>
<a name="l00056"></a>00056 <span class="comment">// History</span>
<a name="l00057"></a>00057 <span class="comment">// 2012.03.29 bperrybap - fixed constructors not properly using Rs</span>
<a name="l00058"></a>00058 <span class="comment">// Fixed incorrect use of 5x10 for default font </span>
<a name="l00059"></a>00059 <span class="comment">// - now matches original LQ library.</span>
<a name="l00060"></a>00060 <span class="comment">// moved delay to send() so it is per cmd/write vs shiftout()</span>
<a name="l00061"></a>00061 <span class="comment">// NOTE: delay is on hairy edge of working when FAST_MODE is on.</span>
<a name="l00062"></a>00062 <span class="comment">// because of waitUsec().</span>
<a name="l00063"></a>00063 <span class="comment">// There is margin at 16Mhz AVR but might fail on 20Mhz AVRs.</span>
<a name="l00064"></a>00064 <span class="comment">// </span>
<a name="l00065"></a>00065 <span class="comment">// @author F. Malpartida - fmalpartida@gmail.com</span>
<a name="l00066"></a>00066 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00067"></a>00067 <span class="comment">// flags for backlight control</span>
<a name="l00068"></a>00068 <span class="preprocessor">#include <stdio.h></span>
<a name="l00069"></a>00069 <span class="preprocessor">#include <string.h></span>
<a name="l00070"></a>00070 <span class="preprocessor">#include <inttypes.h></span>
<a name="l00071"></a>00071
<a name="l00072"></a>00072 <span class="preprocessor">#if (ARDUINO < 100)</span>
<a name="l00073"></a>00073 <span class="preprocessor"></span><span class="preprocessor">#include <WProgram.h></span>
<a name="l00074"></a>00074 <span class="preprocessor">#else</span>
<a name="l00075"></a>00075 <span class="preprocessor"></span><span class="preprocessor">#include <Arduino.h></span>
<a name="l00076"></a>00076 <span class="preprocessor">#endif</span>
<a name="l00077"></a>00077 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="_liquid_crystal___s_r3_w_8h.html">LiquidCrystal_SR3W.h</a>"</span>
<a name="l00078"></a>00078
<a name="l00079"></a>00079 <span class="preprocessor">#include "<a class="code" href="_fast_i_o_8h.html">FastIO.h</a>"</span>
<a name="l00080"></a>00080
<a name="l00086"></a><a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a65fa786d6e31fe8b1aa51784a9736581">00086</a> <span class="preprocessor">#define LCD_NOBACKLIGHT 0x00</span>
<a name="l00087"></a>00087 <span class="preprocessor"></span>
<a name="l00093"></a><a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#ac059d24dfe9c1e1f7c07cb7869a1833b">00093</a> <span class="preprocessor">#define LCD_BACKLIGHT 0xFF</span>
<a name="l00094"></a>00094 <span class="preprocessor"></span>
<a name="l00095"></a>00095
<a name="l00096"></a>00096 <span class="comment">// Default library configuration parameters used by class constructor with</span>
<a name="l00097"></a>00097 <span class="comment">// only the I2C address field.</span>
<a name="l00098"></a>00098 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00104"></a><a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a22e6626f2c98ed902f8ded47f6438c05">00104</a> <span class="comment"></span><span class="preprocessor">#define EN 4 // Enable bit</span>
<a name="l00105"></a>00105 <span class="preprocessor"></span>
<a name="l00111"></a><a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#afc4ded33ac0ca43defcce639e965748a">00111</a> <span class="preprocessor">#define RW 5 // Read/Write bit</span>
<a name="l00112"></a>00112 <span class="preprocessor"></span>
<a name="l00118"></a><a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#af8903d8eea3868940c60af887473b152">00118</a> <span class="preprocessor">#define RS 6 // Register select bit</span>
<a name="l00119"></a>00119 <span class="preprocessor"></span>
<a name="l00126"></a><a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a3d9bb178282c3cb69740c94ba1e48fed">00126</a> <span class="preprocessor">#define D4 0</span>
<a name="l00127"></a><a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a2ddd4183d444d6d128cbdbd6269e4e0c">00127</a> <span class="preprocessor"></span><span class="preprocessor">#define D5 1</span>
<a name="l00128"></a><a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a79a18a7f5ccf7a7ca31f302bd62527a6">00128</a> <span class="preprocessor"></span><span class="preprocessor">#define D6 2</span>
<a name="l00129"></a><a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a2ba78f059a7ebebc95e7beef690e88d6">00129</a> <span class="preprocessor"></span><span class="preprocessor">#define D7 3</span>
<a name="l00130"></a>00130 <span class="preprocessor"></span>
<a name="l00131"></a>00131
<a name="l00132"></a>00132
<a name="l00133"></a><a class="code" href="class_liquid_crystal___s_r3_w.html#ae1396bcd5e9c5b7ed13182c166de776b">00133</a> <a class="code" href="class_liquid_crystal___s_r3_w.html#ae1396bcd5e9c5b7ed13182c166de776b">LiquidCrystal_SR3W::LiquidCrystal_SR3W</a>(uint8_t data, uint8_t clk, uint8_t strobe)
<a name="l00134"></a>00134 {
<a name="l00135"></a>00135 init( data, clk, strobe, <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#af8903d8eea3868940c60af887473b152">RS</a>, <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#afc4ded33ac0ca43defcce639e965748a">RW</a>, <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a22e6626f2c98ed902f8ded47f6438c05">EN</a>, <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a3d9bb178282c3cb69740c94ba1e48fed">D4</a>, <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a2ddd4183d444d6d128cbdbd6269e4e0c">D5</a>, <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a79a18a7f5ccf7a7ca31f302bd62527a6">D6</a>, <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a2ba78f059a7ebebc95e7beef690e88d6">D7</a> );
<a name="l00136"></a>00136 }
<a name="l00137"></a>00137
<a name="l00138"></a><a class="code" href="class_liquid_crystal___s_r3_w.html#a7b2f382b76bc9d88adb8d681e824b4de">00138</a> <a class="code" href="class_liquid_crystal___s_r3_w.html#ae1396bcd5e9c5b7ed13182c166de776b">LiquidCrystal_SR3W::LiquidCrystal_SR3W</a>(uint8_t data, uint8_t clk, uint8_t strobe,
<a name="l00139"></a>00139 uint8_t backlighPin, <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol)
<a name="l00140"></a>00140 {
<a name="l00141"></a>00141 init( data, clk, strobe, <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#af8903d8eea3868940c60af887473b152">RS</a>, <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#afc4ded33ac0ca43defcce639e965748a">RW</a>, <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a22e6626f2c98ed902f8ded47f6438c05">EN</a>, <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a3d9bb178282c3cb69740c94ba1e48fed">D4</a>, <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a2ddd4183d444d6d128cbdbd6269e4e0c">D5</a>, <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a79a18a7f5ccf7a7ca31f302bd62527a6">D6</a>, <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a2ba78f059a7ebebc95e7beef690e88d6">D7</a> );
<a name="l00142"></a>00142 <a class="code" href="class_liquid_crystal___s_r3_w.html#a894d0ea8ea61c1d15acd8a26d417e477">setBacklightPin</a>(backlighPin, pol);
<a name="l00143"></a>00143 }
<a name="l00144"></a>00144
<a name="l00145"></a><a class="code" href="class_liquid_crystal___s_r3_w.html#a4fab8ff2f21bba3efd133cd8c87fffc0">00145</a> <a class="code" href="class_liquid_crystal___s_r3_w.html#ae1396bcd5e9c5b7ed13182c166de776b">LiquidCrystal_SR3W::LiquidCrystal_SR3W</a>(uint8_t data, uint8_t clk, uint8_t strobe,
<a name="l00146"></a>00146 uint8_t En, uint8_t Rw, uint8_t Rs,
<a name="l00147"></a>00147 uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7 )
<a name="l00148"></a>00148 {
<a name="l00149"></a>00149 init( data, clk, strobe, Rs, Rw, En, d4, d5, d6, d7 );
<a name="l00150"></a>00150 }
<a name="l00151"></a>00151
<a name="l00152"></a><a class="code" href="class_liquid_crystal___s_r3_w.html#a24f051747dfeda48f7b207c3358c8015">00152</a> <a class="code" href="class_liquid_crystal___s_r3_w.html#ae1396bcd5e9c5b7ed13182c166de776b">LiquidCrystal_SR3W::LiquidCrystal_SR3W</a>(uint8_t data, uint8_t clk, uint8_t strobe,
<a name="l00153"></a>00153 uint8_t En, uint8_t Rw, uint8_t Rs,
<a name="l00154"></a>00154 uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7,
<a name="l00155"></a>00155 uint8_t backlighPin, <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol)
<a name="l00156"></a>00156 {
<a name="l00157"></a>00157 init( data, clk, strobe, Rs, Rw, En, d4, d5, d6, d7 );
<a name="l00158"></a>00158 <a class="code" href="class_liquid_crystal___s_r3_w.html#a894d0ea8ea61c1d15acd8a26d417e477">setBacklightPin</a>(backlighPin, pol);
<a name="l00159"></a>00159 }
<a name="l00160"></a>00160
<a name="l00161"></a>00161
<a name="l00162"></a><a class="code" href="class_liquid_crystal___s_r3_w.html#ade34af5b7fe795482f1848c2176d6e56">00162</a> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___s_r3_w.html#ade34af5b7fe795482f1848c2176d6e56">LiquidCrystal_SR3W::send</a>(uint8_t value, uint8_t mode)
<a name="l00163"></a>00163 {
<a name="l00164"></a>00164
<a name="l00165"></a>00165 <span class="keywordflow">if</span> ( mode != <a class="code" href="_l_c_d_8h.html#aa1e30e32b6c2cf8d90a9281328472dbe">FOUR_BITS</a> )
<a name="l00166"></a>00166 {
<a name="l00167"></a>00167 write4bits( (value >> 4), mode ); <span class="comment">// upper nibble</span>
<a name="l00168"></a>00168 }
<a name="l00169"></a>00169 write4bits( (value & 0x0F), mode); <span class="comment">// lower nibble</span>
<a name="l00170"></a>00170
<a name="l00171"></a>00171
<a name="l00172"></a>00172 <span class="preprocessor">#if (F_CPU <= 16000000)</span>
<a name="l00173"></a>00173 <span class="preprocessor"></span> <span class="comment">// No need to use the delay routines on AVR since the time taken to write</span>
<a name="l00174"></a>00174 <span class="comment">// on AVR with SR pin mapping even with fio is longer than LCD command execution.</span>
<a name="l00175"></a>00175 <a class="code" href="_l_c_d_8h.html#a6eac41e4be58d7736ac0c19de225c0dc">waitUsec</a>(37); <span class="comment">//goes away on AVRs</span>
<a name="l00176"></a>00176 <span class="preprocessor">#else</span>
<a name="l00177"></a>00177 <span class="preprocessor"></span> delayMicroseconds ( 37 ); <span class="comment">// commands & data writes need > 37us to complete</span>
<a name="l00178"></a>00178 <span class="preprocessor">#endif</span>
<a name="l00179"></a>00179 <span class="preprocessor"></span>
<a name="l00180"></a>00180 }
<a name="l00181"></a>00181
<a name="l00182"></a>00182
<a name="l00183"></a><a class="code" href="class_liquid_crystal___s_r3_w.html#a894d0ea8ea61c1d15acd8a26d417e477">00183</a> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___s_r3_w.html#a894d0ea8ea61c1d15acd8a26d417e477">LiquidCrystal_SR3W::setBacklightPin</a> ( uint8_t value, <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bc">t_backlighPol</a> pol = <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bca03d440bbbfb042afc85347f994b44fb5">POSITIVE</a> )
<a name="l00184"></a>00184 {
<a name="l00185"></a>00185 _backlightPinMask = ( 1 << value );
<a name="l00186"></a>00186 _backlightStsMask = <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a65fa786d6e31fe8b1aa51784a9736581">LCD_NOBACKLIGHT</a>;
<a name="l00187"></a>00187 <a class="code" href="class_l_c_d.html#a990338759d2abe10b0fb1743b7789566">_polarity</a> = pol;
<a name="l00188"></a>00188 <a class="code" href="class_liquid_crystal___s_r3_w.html#a6d0fc7907ef9fd87c408a21b9bd49295">setBacklight</a> (<a class="code" href="_l_c_d_8h.html#a0f50ae3b4bdb42dd5ad74b2c604a7515">BACKLIGHT_OFF</a>); <span class="comment">// Set backlight to off as initial setup</span>
<a name="l00189"></a>00189 }
<a name="l00190"></a>00190
<a name="l00191"></a><a class="code" href="class_liquid_crystal___s_r3_w.html#a6d0fc7907ef9fd87c408a21b9bd49295">00191</a> <span class="keywordtype">void</span> <a class="code" href="class_liquid_crystal___s_r3_w.html#a6d0fc7907ef9fd87c408a21b9bd49295">LiquidCrystal_SR3W::setBacklight</a> ( uint8_t value )
<a name="l00192"></a>00192 {
<a name="l00193"></a>00193 <span class="comment">// Check if backlight is available</span>
<a name="l00194"></a>00194 <span class="comment">// ----------------------------------------------------</span>
<a name="l00195"></a>00195 <span class="keywordflow">if</span> ( _backlightPinMask != 0x0 )
<a name="l00196"></a>00196 {
<a name="l00197"></a>00197 <span class="comment">// Check for polarity to configure mask accordingly</span>
<a name="l00198"></a>00198 <span class="comment">// ----------------------------------------------------------</span>
<a name="l00199"></a>00199 <span class="keywordflow">if</span> (((<a class="code" href="class_l_c_d.html#a990338759d2abe10b0fb1743b7789566">_polarity</a> == <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bca03d440bbbfb042afc85347f994b44fb5">POSITIVE</a>) && (value > 0)) ||
<a name="l00200"></a>00200 ((<a class="code" href="class_l_c_d.html#a990338759d2abe10b0fb1743b7789566">_polarity</a> == <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bca62d66a51fa7574c652597716f7709865">NEGATIVE</a> ) && ( value == 0 )))
<a name="l00201"></a>00201 {
<a name="l00202"></a>00202 _backlightStsMask = _backlightPinMask & <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#ac059d24dfe9c1e1f7c07cb7869a1833b">LCD_BACKLIGHT</a>;
<a name="l00203"></a>00203 }
<a name="l00204"></a>00204 <span class="keywordflow">else</span>
<a name="l00205"></a>00205 {
<a name="l00206"></a>00206 _backlightStsMask = _backlightPinMask & <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a65fa786d6e31fe8b1aa51784a9736581">LCD_NOBACKLIGHT</a>;
<a name="l00207"></a>00207 }
<a name="l00208"></a>00208 loadSR( _backlightStsMask );
<a name="l00209"></a>00209 }
<a name="l00210"></a>00210 }
<a name="l00211"></a>00211
<a name="l00212"></a>00212
<a name="l00213"></a>00213 <span class="comment">// PRIVATE METHODS</span>
<a name="l00214"></a>00214 <span class="comment">// -----------------------------------------------------------------------------</span>
<a name="l00215"></a>00215
<a name="l00216"></a>00216 <span class="keywordtype">int</span> LiquidCrystal_SR3W::init(uint8_t data, uint8_t clk, uint8_t strobe,
<a name="l00217"></a>00217 uint8_t Rs, uint8_t Rw, uint8_t En,
<a name="l00218"></a>00218 uint8_t d4, uint8_t d5, uint8_t d6, uint8_t d7)
<a name="l00219"></a>00219 {
<a name="l00220"></a>00220 _data = <a class="code" href="_fast_i_o_8cpp.html#a07a19dfbdca1afaca5d666bdaa3be7d5">fio_pinToBit</a>(data);
<a name="l00221"></a>00221 _clk = <a class="code" href="_fast_i_o_8cpp.html#a07a19dfbdca1afaca5d666bdaa3be7d5">fio_pinToBit</a>(clk);
<a name="l00222"></a>00222 _strobe = <a class="code" href="_fast_i_o_8cpp.html#a07a19dfbdca1afaca5d666bdaa3be7d5">fio_pinToBit</a>(strobe);
<a name="l00223"></a>00223 _data_reg = <a class="code" href="_fast_i_o_8cpp.html#a04210cc785c3b4a11c86f794949c327f">fio_pinToOutputRegister</a>(data);
<a name="l00224"></a>00224 _clk_reg = <a class="code" href="_fast_i_o_8cpp.html#a04210cc785c3b4a11c86f794949c327f">fio_pinToOutputRegister</a>(clk);
<a name="l00225"></a>00225 _strobe_reg = <a class="code" href="_fast_i_o_8cpp.html#a04210cc785c3b4a11c86f794949c327f">fio_pinToOutputRegister</a>(strobe);
<a name="l00226"></a>00226
<a name="l00227"></a>00227 <span class="comment">// LCD pin mapping</span>
<a name="l00228"></a>00228 _backlightPinMask = 0;
<a name="l00229"></a>00229 _backlightStsMask = <a class="code" href="_liquid_crystal___s_r3_w_8cpp.html#a65fa786d6e31fe8b1aa51784a9736581">LCD_NOBACKLIGHT</a>;
<a name="l00230"></a>00230 <a class="code" href="class_l_c_d.html#a990338759d2abe10b0fb1743b7789566">_polarity</a> = <a class="code" href="_l_c_d_8h.html#aeeef728bf4726268aa5e99391a1502bca03d440bbbfb042afc85347f994b44fb5">POSITIVE</a>;
<a name="l00231"></a>00231
<a name="l00232"></a>00232 _En = ( 1 << En );
<a name="l00233"></a>00233 _Rw = ( 1 << Rw );
<a name="l00234"></a>00234 _Rs = ( 1 << Rs );
<a name="l00235"></a>00235
<a name="l00236"></a>00236 <span class="comment">// Initialise pin mapping</span>
<a name="l00237"></a>00237 _data_pins[0] = ( 1 << d4 );
<a name="l00238"></a>00238 _data_pins[1] = ( 1 << d5 );
<a name="l00239"></a>00239 _data_pins[2] = ( 1 << d6 );
<a name="l00240"></a>00240 _data_pins[3] = ( 1 << d7 );
<a name="l00241"></a>00241
<a name="l00242"></a>00242 <a class="code" href="class_l_c_d.html#aef093ba3f8e1016267b40ac235a0fa0f">_displayfunction</a> = <a class="code" href="_l_c_d_8h.html#ab8c35d355d2372090c7a347e961c9224">LCD_4BITMODE</a> | <a class="code" href="_l_c_d_8h.html#a8c85cf88d8af66a47c42249d81c94641">LCD_1LINE</a> | <a class="code" href="_l_c_d_8h.html#a9ef57e724c1b846dae0f531aff6fb464">LCD_5x8DOTS</a>;
<a name="l00243"></a>00243
<a name="l00244"></a>00244 <span class="keywordflow">return</span> (1);
<a name="l00245"></a>00245 }
<a name="l00246"></a>00246
<a name="l00247"></a>00247 <span class="keywordtype">void</span> LiquidCrystal_SR3W::write4bits(uint8_t value, uint8_t mode)
<a name="l00248"></a>00248 {
<a name="l00249"></a>00249 uint8_t pinMapValue = 0;
<a name="l00250"></a>00250
<a name="l00251"></a>00251 <span class="comment">// Map the value to LCD pin mapping</span>
<a name="l00252"></a>00252 <span class="comment">// --------------------------------</span>
<a name="l00253"></a>00253 <span class="keywordflow">for</span> ( uint8_t i = 0; i < 4; i++ )
<a name="l00254"></a>00254 {
<a name="l00255"></a>00255 <span class="keywordflow">if</span> ( ( value & 0x1 ) == 1 )
<a name="l00256"></a>00256 {
<a name="l00257"></a>00257 pinMapValue |= _data_pins[i];
<a name="l00258"></a>00258 }
<a name="l00259"></a>00259 value = ( value >> 1 );
<a name="l00260"></a>00260 }
<a name="l00261"></a>00261
<a name="l00262"></a>00262 <span class="comment">// Is it a command or data</span>
<a name="l00263"></a>00263 <span class="comment">// -----------------------</span>
<a name="l00264"></a>00264 mode = ( mode == <a class="code" href="_l_c_d_8h.html#aad9ae913bdfab20dd94ad04ee2d5b045">DATA</a> ) ? _Rs : 0;
<a name="l00265"></a>00265
<a name="l00266"></a>00266 pinMapValue |= mode | _backlightStsMask;
<a name="l00267"></a>00267 loadSR ( pinMapValue | _En ); <span class="comment">// Send with enable high</span>
<a name="l00268"></a>00268 loadSR ( pinMapValue); <span class="comment">// Send with enable low</span>
<a name="l00269"></a>00269 }
<a name="l00270"></a>00270
<a name="l00271"></a>00271
<a name="l00272"></a>00272 <span class="keywordtype">void</span> LiquidCrystal_SR3W::loadSR(uint8_t value)
<a name="l00273"></a>00273 {
<a name="l00274"></a>00274 <span class="comment">// Load the shift register with information</span>
<a name="l00275"></a>00275 <a class="code" href="_fast_i_o_8cpp.html#a56c72b9f00680662229895ab22aaa743">fio_shiftOut</a>(_data_reg, _data, _clk_reg, _clk, value, MSBFIRST);
<a name="l00276"></a>00276
<a name="l00277"></a>00277 <span class="comment">// Strobe the data into the latch</span>
<a name="l00278"></a>00278 <a class="code" href="_fast_i_o_8h.html#a04971fe5fabe4129736708c494e08e6d">ATOMIC_BLOCK</a>(<a class="code" href="_fast_i_o_8h.html#a362c18b15a09703e42e1c246c47420ef">ATOMIC_RESTORESTATE</a>)
<a name="l00279"></a>00279 {
<a name="l00280"></a>00280 <a class="code" href="_fast_i_o_8h.html#a89e1c62276052100c62b6c82a2e95622">fio_digitalWrite_HIGH</a>(_strobe_reg, _strobe);
<a name="l00281"></a>00281 <a class="code" href="_fast_i_o_8h.html#accae9687fdfc5f3492fb6344d62eb190">fio_digitalWrite_SWITCHTO</a>(_strobe_reg, _strobe, LOW);
<a name="l00282"></a>00282 }
<a name="l00283"></a>00283 }
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Defines</a></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>
<hr class="footer"/><address class="footer"><small>Generated on Thu Apr 5 2012 18:17:46 for LCD Library by 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>
|
{
"pile_set_name": "Github"
}
|
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (2.9 0 0);
boundaryField
{
top
{
type fixedValue;
value uniform (2.61933 -0.50632 0);
}
inlet
{
type fixedValue;
value uniform (2.9 0 0);
}
outlet
{
type zeroGradient;
}
bottom
{
type symmetryPlane;
}
frontAndBack
{
type empty;
}
}
// ************************************************************************* //
|
{
"pile_set_name": "Github"
}
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>t157_apple_sign_in_test</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>
|
{
"pile_set_name": "Github"
}
|
{
"description": "ClientIPConfig represents the configurations of Client IP based session affinity.",
"properties": {
"timeoutSeconds": {
"description": "timeoutSeconds specifies the seconds of ClientIP type session sticky time. The value must be >0 && <=86400(for 1 day) if ServiceAffinity == \"ClientIP\". Default value is 10800(for 3 hours).",
"type": "integer",
"format": "int32"
}
},
"$schema": "http://json-schema.org/schema#",
"type": "object"
}
|
{
"pile_set_name": "Github"
}
|
namespace Aurora_Updater
{
partial class MainForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
this.update_progress = new System.Windows.Forms.ProgressBar();
this.richtextUpdateLog = new System.Windows.Forms.RichTextBox();
this.labelApplicationTitle = new System.Windows.Forms.Label();
this.pictureBoxApplicationLogo = new System.Windows.Forms.PictureBox();
this.labelUpdateLog = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.pictureBoxApplicationLogo)).BeginInit();
this.SuspendLayout();
//
// update_progress
//
this.update_progress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.update_progress.Location = new System.Drawing.Point(12, 352);
this.update_progress.Name = "update_progress";
this.update_progress.Size = new System.Drawing.Size(560, 22);
this.update_progress.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
this.update_progress.TabIndex = 0;
//
// richtextUpdateLog
//
this.richtextUpdateLog.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.richtextUpdateLog.Location = new System.Drawing.Point(12, 82);
this.richtextUpdateLog.Name = "richtextUpdateLog";
this.richtextUpdateLog.ReadOnly = true;
this.richtextUpdateLog.Size = new System.Drawing.Size(560, 264);
this.richtextUpdateLog.TabIndex = 1;
this.richtextUpdateLog.Text = "";
//
// labelApplicationTitle
//
this.labelApplicationTitle.AutoSize = true;
this.labelApplicationTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.labelApplicationTitle.Location = new System.Drawing.Point(66, 12);
this.labelApplicationTitle.Name = "labelApplicationTitle";
this.labelApplicationTitle.Size = new System.Drawing.Size(156, 20);
this.labelApplicationTitle.TabIndex = 9;
this.labelApplicationTitle.Text = "Updating Aurora...";
//
// pictureBoxApplicationLogo
//
this.pictureBoxApplicationLogo.Image = global::Aurora_Updater.Properties.Resources.Aurora_updater_logo;
this.pictureBoxApplicationLogo.Location = new System.Drawing.Point(12, 12);
this.pictureBoxApplicationLogo.Name = "pictureBoxApplicationLogo";
this.pictureBoxApplicationLogo.Size = new System.Drawing.Size(48, 48);
this.pictureBoxApplicationLogo.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.pictureBoxApplicationLogo.TabIndex = 8;
this.pictureBoxApplicationLogo.TabStop = false;
//
// labelUpdateLog
//
this.labelUpdateLog.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.labelUpdateLog.AutoSize = true;
this.labelUpdateLog.Location = new System.Drawing.Point(9, 66);
this.labelUpdateLog.Name = "labelUpdateLog";
this.labelUpdateLog.Size = new System.Drawing.Size(75, 13);
this.labelUpdateLog.TabIndex = 10;
this.labelUpdateLog.Text = "Update details";
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(584, 381);
this.Controls.Add(this.richtextUpdateLog);
this.Controls.Add(this.labelUpdateLog);
this.Controls.Add(this.labelApplicationTitle);
this.Controls.Add(this.pictureBoxApplicationLogo);
this.Controls.Add(this.update_progress);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MaximumSize = new System.Drawing.Size(600, 450);
this.MinimizeBox = false;
this.MinimumSize = new System.Drawing.Size(600, 350);
this.Name = "MainForm";
this.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Aurora Updater";
this.Shown += new System.EventHandler(this.Form1_Shown);
((System.ComponentModel.ISupportInitialize)(this.pictureBoxApplicationLogo)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ProgressBar update_progress;
private System.Windows.Forms.RichTextBox richtextUpdateLog;
private System.Windows.Forms.Label labelApplicationTitle;
private System.Windows.Forms.PictureBox pictureBoxApplicationLogo;
private System.Windows.Forms.Label labelUpdateLog;
}
}
|
{
"pile_set_name": "Github"
}
|
.miniChart {
position: relative;
width: 100%;
.chartContent {
position: absolute;
bottom: -28px;
width: 100%;
> div {
margin: 0 -5px;
overflow: hidden;
}
}
.chartLoading {
position: absolute;
top: 16px;
left: 50%;
margin-left: -7px;
}
}
|
{
"pile_set_name": "Github"
}
|
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<ImageView
android:id="@+id/label_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/label_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@android:color/white"
android:textSize="20sp"
fontPath="DINNextLTPro-Light.otf"
tools:ignore="MissingPrefix" />
</merge>
|
{
"pile_set_name": "Github"
}
|
{include file="orderforms/standard_cart/common.tpl"}
<script>
var _localLang = {
'addToCart': '{$LANG.orderForm.addToCart|escape}',
'addedToCartRemove': '{$LANG.orderForm.addedToCartRemove|escape}'
}
</script>
<div id="order-standard_cart">
<div class="row">
<div class="pull-md-right col-md-9">
<div class="header-lined">
<h1>{$LANG.cartdomainsconfig}</h1>
</div>
</div>
<div class="col-md-3 pull-md-left sidebar hidden-xs hidden-sm">
{include file="orderforms/standard_cart/sidebar-categories.tpl"}
</div>
<div class="col-md-9 pull-md-right">
{include file="orderforms/standard_cart/sidebar-categories-collapsed.tpl"}
<form method="post" action="{$smarty.server.PHP_SELF}?a=confdomains" id="frmConfigureDomains">
<input type="hidden" name="update" value="true" />
<p>{$LANG.orderForm.reviewDomainAndAddons}</p>
{if $errormessage}
<div class="alert alert-danger" role="alert">
<p>{$LANG.orderForm.correctErrors}:</p>
<ul>
{$errormessage}
</ul>
</div>
{/if}
{foreach $domains as $num => $domain}
<div class="sub-heading">
<span>{$domain.domain}</span>
</div>
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label>{$LANG.orderregperiod}</label>
<br />
{$domain.regperiod} {$LANG.orderyears}
</div>
</div>
<div class="col-sm-6">
<div class="form-group">
<label>{$LANG.hosting}</label>
<br />
{if $domain.hosting}<span style="color:#009900;">[{$LANG.cartdomainshashosting}]</span>{else}<a href="cart.php" style="color:#cc0000;">[{$LANG.cartdomainsnohosting}]</a>{/if}
</div>
</div>
{if $domain.eppenabled}
<div class="col-sm-12">
<div class="form-group prepend-icon">
<input type="text" name="epp[{$num}]" id="inputEppcode{$num}" value="{$domain.eppvalue}" class="field" placeholder="{$LANG.domaineppcode}" />
<label for="inputEppcode{$num}" class="field-icon">
<i class="fa fa-lock"></i>
</label>
<span class="field-help-text">
{$LANG.domaineppcodedesc}
</span>
</div>
</div>
{/if}
</div>
{if $domain.dnsmanagement || $domain.emailforwarding || $domain.idprotection}
<div class="row addon-products">
{if $domain.dnsmanagement}
<div class="col-sm-{math equation="12 / numAddons" numAddons=$domain.addonsCount}">
<div class="panel panel-default panel-addon{if $domain.dnsmanagementselected} panel-addon-selected{/if}">
<div class="panel-body">
<label>
<input type="checkbox" name="dnsmanagement[{$num}]"{if $domain.dnsmanagementselected} checked{/if} />
{$LANG.domaindnsmanagement}
</label><br />
{$LANG.domainaddonsdnsmanagementinfo}
</div>
<div class="panel-price">
{$domain.dnsmanagementprice} / {$domain.regperiod} {$LANG.orderyears}
</div>
<div class="panel-add">
<i class="fa fa-plus"></i>
{$LANG.orderForm.addToCart}
</div>
</div>
</div>
{/if}
{if $domain.idprotection}
<div class="col-sm-{math equation="12 / numAddons" numAddons=$domain.addonsCount}">
<div class="panel panel-default panel-addon{if $domain.idprotectionselected} panel-addon-selected{/if}">
<div class="panel-body">
<label>
<input type="checkbox" name="idprotection[{$num}]"{if $domain.idprotectionselected} checked{/if} />
{$LANG.domainidprotection}
</label><br />
{$LANG.domainaddonsidprotectioninfo}
</div>
<div class="panel-price">
{$domain.idprotectionprice} / {$domain.regperiod} {$LANG.orderyears}
</div>
<div class="panel-add">
<i class="fa fa-plus"></i>
{$LANG.orderForm.addToCart}
</div>
</div>
</div>
{/if}
{if $domain.emailforwarding}
<div class="col-sm-{math equation="12 / numAddons" numAddons=$domain.addonsCount}">
<div class="panel panel-default panel-addon{if $domain.emailforwardingselected} panel-addon-selected{/if}">
<div class="panel-body">
<label>
<input type="checkbox" name="emailforwarding[{$num}]"{if $domain.emailforwardingselected} checked{/if} />
{$LANG.domainemailforwarding}
</label><br />
{$LANG.domainaddonsemailforwardinginfo}
</div>
<div class="panel-price">
{$domain.emailforwardingprice} / {$domain.regperiod} {$LANG.orderyears}
</div>
<div class="panel-add">
<i class="fa fa-plus"></i>
{$LANG.orderForm.addToCart}
</div>
</div>
</div>
{/if}
</div>
{/if}
{foreach from=$domain.fields key=domainfieldname item=domainfield}
<div class="row">
<div class="col-sm-4">{$domainfieldname}:</div>
<div class="col-sm-8">{$domainfield}</div>
</div>
{/foreach}
{/foreach}
{if $atleastonenohosting}
<div class="sub-heading">
<span>{$LANG.domainnameservers}</span>
</div>
<p>{$LANG.cartnameserversdesc}</p>
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<label for="inputNs1">{$LANG.domainnameserver1}</label>
<input type="text" class="form-control" id="inputNs1" name="domainns1" value="{$domainns1}" />
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<label for="inputNs2">{$LANG.domainnameserver2}</label>
<input type="text" class="form-control" id="inputNs2" name="domainns2" value="{$domainns2}" />
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<label for="inputNs3">{$LANG.domainnameserver3}</label>
<input type="text" class="form-control" id="inputNs3" name="domainns3" value="{$domainns3}" />
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<label for="inputNs1">{$LANG.domainnameserver4}</label>
<input type="text" class="form-control" id="inputNs4" name="domainns4" value="{$domainns4}" />
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<label for="inputNs5">{$LANG.domainnameserver5}</label>
<input type="text" class="form-control" id="inputNs5" name="domainns5" value="{$domainns5}" />
</div>
</div>
</div>
{/if}
<div class="text-center">
<button type="submit" class="btn btn-primary btn-lg">
{$LANG.continue}
<i class="fa fa-arrow-circle-right"></i>
</button>
</div>
</form>
</div>
</div>
</div>
|
{
"pile_set_name": "Github"
}
|
package Paws::ElasticBeanstalk::ListTagsForResource;
use Moose;
has ResourceArn => (is => 'ro', isa => 'Str', required => 1);
use MooseX::ClassAttribute;
class_has _api_call => (isa => 'Str', is => 'ro', default => 'ListTagsForResource');
class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::ElasticBeanstalk::ResourceTagsDescriptionMessage');
class_has _result_key => (isa => 'Str', is => 'ro', default => 'ListTagsForResourceResult');
1;
### main pod documentation begin ###
=head1 NAME
Paws::ElasticBeanstalk::ListTagsForResource - Arguments for method ListTagsForResource on L<Paws::ElasticBeanstalk>
=head1 DESCRIPTION
This class represents the parameters used for calling the method ListTagsForResource on the
L<AWS Elastic Beanstalk|Paws::ElasticBeanstalk> service. Use the attributes of this class
as arguments to method ListTagsForResource.
You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to ListTagsForResource.
=head1 SYNOPSIS
my $elasticbeanstalk = Paws->service('ElasticBeanstalk');
my $ResourceTagsDescriptionMessage = $elasticbeanstalk->ListTagsForResource(
ResourceArn => 'MyResourceArn',
);
# Results:
my $ResourceArn = $ResourceTagsDescriptionMessage->ResourceArn;
my $ResourceTags = $ResourceTagsDescriptionMessage->ResourceTags;
# Returns a L<Paws::ElasticBeanstalk::ResourceTagsDescriptionMessage> object.
Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.
For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/elasticbeanstalk/ListTagsForResource>
=head1 ATTRIBUTES
=head2 B<REQUIRED> ResourceArn => Str
The Amazon Resource Name (ARN) of the resouce for which a tag list is
requested.
Must be the ARN of an Elastic Beanstalk environment.
=head1 SEE ALSO
This class forms part of L<Paws>, documenting arguments for method ListTagsForResource in L<Paws::ElasticBeanstalk>
=head1 BUGS and CONTRIBUTIONS
The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
=cut
|
{
"pile_set_name": "Github"
}
|
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "Tools_00065.png"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "Tools_00065@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x",
"filename" : "Tools_00065@3x.png"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
|
{
"pile_set_name": "Github"
}
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MNNKit: MNNFaceDetection/android/src/main/java/com/alibaba Directory Reference</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="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="projectlogo"><img alt="Logo" src="mnn.jpg"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">MNNKit
 <span id="projectnumber">1.0</span>
</div>
<div id="projectbrief">MNNKit is a collection of AI solutions on mobile phone, powered by MNN engine.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_ff51bd0b7841751e6292791fdaa2b577.html">MNNFaceDetection</a></li><li class="navelem"><a class="el" href="dir_63791b95483cf3c993780521edc19890.html">android</a></li><li class="navelem"><a class="el" href="dir_7f92bc3fdbda6107b6f10f88212fd556.html">src</a></li><li class="navelem"><a class="el" href="dir_d56f97a77027a31056fee7685895f0c4.html">main</a></li><li class="navelem"><a class="el" href="dir_47d122ed7c37c9322d5530106463b8f2.html">java</a></li><li class="navelem"><a class="el" href="dir_98cb6771020ddafee339445588c01181.html">com</a></li><li class="navelem"><a class="el" href="dir_09d68240d7e1d43e5755b29e8c25f971.html">alibaba</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">alibaba Directory Reference</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="subdirs"></a>
Directories</h2></td></tr>
<tr class="memitem:dir_4b583c7e5532556e734d11ce03a6cbac"><td class="memItemLeft" align="right" valign="top">directory  </td><td class="memItemRight" valign="bottom"><a class="el" href="dir_4b583c7e5532556e734d11ce03a6cbac.html">android</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </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.17
</small></address>
</body>
</html>
|
{
"pile_set_name": "Github"
}
|
<sect2>
<title>Installation of Less</title>
<para>Install Less by running the following commands:</para>
<para><screen><userinput>./configure --prefix=/usr --bindir=/bin &&
make &&
make install</userinput></screen></para>
</sect2>
|
{
"pile_set_name": "Github"
}
|
<!--
Description: xhtml:body type
Expect: bozo and entries[0]['content'][0]['type'] == u'application/xhtml+xml'
-->
<rss version="2.0">
<channel>
<item>
<body xmlns="http://www.w3.org/1999/xhtml">
<p>Example content</p>
</body>
</item>
</channel>
</rss
|
{
"pile_set_name": "Github"
}
|
<shapes name="mxgraph.aws2.security_and_identity">
<shape aspect="variable" h="54.8" name="ACM" strokewidth="inherit" w="68">
<connections/>
<foreground>
<fillcolor color="#759C3E"/>
<path>
<move x="68" y="32.2"/>
<line x="34" y="35.6"/>
<line x="34" y="19.2"/>
<line x="68" y="22.6"/>
<close/>
</path>
<fillstroke/>
<fillcolor color="#4B612C"/>
<path>
<move x="0" y="32.2"/>
<line x="34" y="35.6"/>
<line x="34" y="19.2"/>
<line x="0" y="22.6"/>
<close/>
</path>
<fillstroke/>
<fillcolor color="#648339"/>
<rect h="11" w="54.5" x="6.8" y="0"/>
<fillstroke/>
<fillcolor color="#3C4929"/>
<path>
<move x="54.5" y="13.8"/>
<line x="13.6" y="13.8"/>
<line x="6.8" y="11"/>
<line x="61.3" y="11"/>
<close/>
</path>
<fillstroke/>
<fillcolor color="#648339"/>
<rect h="11" w="54.5" x="6.8" y="43.8"/>
<fillstroke/>
<fillcolor color="#B7CA9D"/>
<path>
<move x="54.5" y="41"/>
<line x="13.6" y="41"/>
<line x="6.8" y="43.8"/>
<line x="61.3" y="43.8"/>
<close/>
</path>
<fillstroke/>
</foreground>
</shape>
<shape aspect="variable" h="55.9" name="ACM Certificate Manager" strokewidth="inherit" w="65.1">
<connections/>
<foreground>
<fillcolor color="#4C622C"/>
<path>
<move x="62" y="55.9"/>
<line x="3" y="55.9"/>
<curve x1="1.4" x2="0" x3="0" y1="55.9" y2="54.6" y3="52.9"/>
<line x="0" y="7"/>
<curve x1="0" x2="1.3" x3="3" y1="5.4" y2="4" y3="4"/>
<line x="62.1" y="4"/>
<curve x1="63.7" x2="65.1" x3="65.1" y1="4" y2="5.3" y3="7"/>
<line x="65.1" y="53"/>
<curve x1="65" x2="63.7" x3="62" y1="54.6" y2="55.9" y3="55.9"/>
<close/>
</path>
<fillstroke/>
<fillcolor color="#759C3F"/>
<path>
<move x="62" y="51.9"/>
<line x="3" y="51.9"/>
<curve x1="1.4" x2="0" x3="0" y1="51.9" y2="50.6" y3="48.9"/>
<line x="0" y="3"/>
<curve x1="0" x2="1.3" x3="3" y1="1.4" y2="0" y3="0"/>
<line x="62.1" y="0"/>
<curve x1="63.7" x2="65.1" x3="65.1" y1="0" y2="1.3" y3="3"/>
<line x="65.1" y="49"/>
<curve x1="65" x2="63.7" x3="62" y1="50.6" y2="51.9" y3="51.9"/>
<close/>
</path>
<fillstroke/>
<fillcolor color="#FFFFFF"/>
<rect h="4.4" w="48.7" x="12.8" y="4.1"/>
<fillstroke/>
<ellipse h="7" w="7" x="2.8" y="2.8"/>
<fillstroke/>
<rect h="35.1" w="58" x="3.5" y="12.8"/>
<fillstroke/>
<fillcolor color="#759C3F"/>
<path>
<move x="38" y="34.1"/>
<line x="37.8" y="34.7"/>
<line x="37.3" y="36.1"/>
<line x="36" y="35.5"/>
<line x="35.4" y="35.2"/>
<line x="35.1" y="35.7"/>
<line x="34.2" y="36.9"/>
<line x="33.1" y="36"/>
<line x="32.6" y="35.6"/>
<line x="32.2" y="36"/>
<line x="31" y="36.9"/>
<line x="30.2" y="35.7"/>
<line x="29.9" y="35.2"/>
<line x="29.3" y="35.5"/>
<line x="28" y="36.1"/>
<line x="27.5" y="34.7"/>
<line x="27.3" y="34.1"/>
<line x="26.3" y="34.3"/>
<line x="25.5" y="34.3"/>
<line x="25.5" y="45.3"/>
<line x="32.5" y="39.4"/>
<line x="39.5" y="45.3"/>
<line x="39.5" y="34.3"/>
<line x="38.8" y="34.3"/>
<close/>
</path>
<fillstroke/>
<path>
<move x="41.6" y="24.8"/>
<line x="42.8" y="23.5"/>
<line x="41.3" y="22.5"/>
<line x="42.1" y="20.9"/>
<line x="40.4" y="20.3"/>
<line x="40.8" y="18.6"/>
<line x="39" y="18.4"/>
<line x="38.9" y="16.7"/>
<line x="37.1" y="17"/>
<line x="36.6" y="15.4"/>
<line x="35" y="16.1"/>
<line x="34" y="14.7"/>
<line x="32.6" y="15.8"/>
<line x="31.3" y="14.7"/>
<line x="30.3" y="16.1"/>
<line x="28.7" y="15.4"/>
<line x="28.1" y="17"/>
<line x="26.4" y="16.7"/>
<line x="26.3" y="18.4"/>
<line x="24.5" y="18.6"/>
<line x="24.8" y="20.3"/>
<line x="23.2" y="20.9"/>
<line x="23.9" y="22.5"/>
<line x="22.5" y="23.5"/>
<line x="23.6" y="24.8"/>
<line x="22.5" y="26.1"/>
<line x="23.9" y="27.1"/>
<line x="23.2" y="28.7"/>
<line x="24.8" y="29.3"/>
<line x="24.3" y="31"/>
<line x="25.7" y="31.2"/>
<line x="26" y="31.2"/>
<line x="26.3" y="32.9"/>
<line x="28.1" y="32.6"/>
<line x="28.7" y="34.3"/>
<line x="30.3" y="33.5"/>
<line x="31.3" y="35"/>
<line x="32.6" y="33.8"/>
<line x="34" y="35"/>
<line x="35" y="33.5"/>
<line x="36.6" y="34.3"/>
<line x="37.1" y="32.6"/>
<line x="38.9" y="32.9"/>
<line x="39.1" y="31.2"/>
<line x="39.2" y="31.2"/>
<line x="40.8" y="31"/>
<line x="40.4" y="29.3"/>
<line x="42.1" y="28.7"/>
<line x="41.3" y="27.1"/>
<line x="42.8" y="26.1"/>
<close/>
</path>
<fillstroke/>
<fillcolor color="#FFFFFF"/>
<path>
<move x="30.9" y="25.8"/>
<line x="28.4" y="23.1"/>
<line x="25.6" y="25.9"/>
<line x="25.6" y="25.9"/>
<line x="30.8" y="31.1"/>
<line x="39.6" y="22.3"/>
<line x="37.6" y="20.2"/>
<close/>
</path>
<fillstroke/>
</foreground>
</shape>
<shape aspect="variable" h="72.4" name="Cloud HSM" strokewidth="inherit" w="60">
<connections>
<constraint name="N" perimeter="0" x="0.5" y="0"/>
<constraint name="S" perimeter="0" x="0.5" y="1"/>
<constraint name="W" perimeter="0" x="0" y="0.5"/>
<constraint name="E" perimeter="0" x="1" y="0.5"/>
<constraint name="NW" perimeter="0" x="0" y="0.21"/>
<constraint name="NE" perimeter="0" x="1" y="0.21"/>
<constraint name="SW" perimeter="0" x="0" y="0.79"/>
<constraint name="SE" perimeter="0" x="1" y="0.79"/>
</connections>
<foreground>
<fillcolor color="#769B3F"/>
<path>
<move x="13.9" y="25.3"/>
<line x="6.1" y="24.3"/>
<line x="6.1" y="11.9"/>
<line x="13.9" y="13.9"/>
<close/>
</path>
<fillstroke/>
<fillcolor color="#4C612C"/>
<path>
<move x="46" y="23.4"/>
<line x="53.9" y="22.3"/>
<line x="53.9" y="11.9"/>
<line x="46" y="13.9"/>
<close/>
</path>
<fillstroke/>
<fillcolor color="#769B3F"/>
<path>
<move x="42.9" y="66"/>
<line x="30" y="72.4"/>
<line x="30" y="0"/>
<line x="42.9" y="6.4"/>
<close/>
</path>
<fillstroke/>
<path>
<move x="60" y="36.2"/>
<line x="30" y="36.2"/>
<line x="30" y="14.8"/>
<line x="60" y="23.6"/>
<close/>
</path>
<fillstroke/>
<path>
<move x="53.9" y="60.5"/>
<line x="60" y="57.4"/>
<line x="60" y="15"/>
<line x="53.9" y="11.9"/>
<close/>
</path>
<fillstroke/>
<fillcolor color="#4C612C"/>
<path>
<move x="17.3" y="66.1"/>
<line x="30" y="72.4"/>
<line x="30" y="0"/>
<line x="17.3" y="6.3"/>
<close/>
</path>
<fillstroke/>
<path>
<move x="6.1" y="60.5"/>
<line x="0" y="57.4"/>
<line x="0" y="15"/>
<line x="6.1" y="11.9"/>
<close/>
</path>
<fillstroke/>
<path>
<move x="0" y="57.4"/>
<line x="30" y="72.4"/>
<line x="30" y="14.8"/>
<line x="0" y="23.6"/>
<close/>
</path>
<fillstroke/>
<path>
<move x="42.9" y="36.2"/>
<line x="53.9" y="36.2"/>
<line x="53.9" y="60.5"/>
<line x="42.9" y="57.7"/>
<close/>
</path>
<fillstroke/>
</foreground>
</shape>
<shape aspect="variable" h="72" name="Directory Service" strokewidth="inherit" w="59.6">
<connections>
<constraint name="N" perimeter="0" x="0.5" y="0"/>
<constraint name="S" perimeter="0" x="0.5" y="1"/>
<constraint name="W" perimeter="0" x="0" y="0.5"/>
<constraint name="E" perimeter="0" x="1" y="0.5"/>
<constraint name="NW" perimeter="0" x="0" y="0.21"/>
<constraint name="NE" perimeter="0" x="1" y="0.21"/>
<constraint name="SW" perimeter="0" x="0" y="0.79"/>
<constraint name="SE" perimeter="0" x="1" y="0.79"/>
</connections>
<foreground>
<fillcolor color="#4B612C"/>
<path>
<move x="37.1" y="36"/>
<line x="45.7" y="36"/>
<line x="45.7" y="41.6"/>
<line x="37.1" y="41.1"/>
<close/>
</path>
<fillstroke/>
<path>
<move x="49.9" y="36"/>
<line x="55.8" y="36"/>
<line x="55.8" y="40.6"/>
<line x="49.9" y="40.3"/>
<close/>
</path>
<fillstroke/>
<fillcolor color="#759C3E"/>
<path>
<move x="24.6" y="11.4"/>
<line x="13.9" y="8"/>
<line x="13.9" y="41.6"/>
<line x="24.6" y="40.9"/>
<close/>
</path>
<fillstroke/>
<path>
<move x="11.1" y="14.7"/>
<line x="3.8" y="13"/>
<line x="3.8" y="40.6"/>
<line x="11.1" y="40.3"/>
<close/>
</path>
<fillstroke/>
<path>
<move x="59.6" y="48.7"/>
<line x="29.8" y="57.6"/>
<line x="29.8" y="72"/>
<line x="59.6" y="57.1"/>
<close/>
</path>
<fillstroke/>
<fillcolor color="#4B612C"/>
<path>
<move x="20.9" y="4.5"/>
<line x="29.8" y="0"/>
<line x="29.8" y="43.2"/>
<line x="20.9" y="42.3"/>
<close/>
</path>
<fillstroke/>
<path>
<move x="0" y="48.7"/>
<line x="29.8" y="57.6"/>
<line x="29.8" y="72"/>
<line x="0" y="57.1"/>
<close/>
</path>
<fillstroke/>
<path>
<move x="8.4" y="10.7"/>
<line x="13.9" y="7.9"/>
<line x="13.9" y="41.6"/>
<line x="8.4" y="41.1"/>
<close/>
</path>
<fillstroke/>
<path>
<move x="0" y="14.9"/>
<line x="3.8" y="13"/>
<line x="3.8" y="40.6"/>
<line x="0" y="40.2"/>
<close/>
</path>
<fillstroke/>
<fillcolor color="#B7CA9D"/>
<path>
<move x="59.6" y="48.7"/>
<line x="29.8" y="44.9"/>
<line x="0" y="48.7"/>
<line x="29.8" y="57.6"/>
<close/>
</path>
<fillstroke/>
<fillcolor color="#759C3E"/>
<path>
<move x="38.7" y="4.5"/>
<line x="29.8" y="0"/>
<line x="29.8" y="43.2"/>
<line x="38.7" y="42.3"/>
<close/>
</path>
<fillstroke/>
<path>
<move x="55.8" y="19.8"/>
<line x="59.6" y="21.1"/>
<line x="59.6" y="40.2"/>
<line x="55.8" y="40.6"/>
<close/>
</path>
<fillstroke/>
<path>
<move x="51.2" y="30.9"/>
<line x="45.7" y="30.4"/>
<line x="45.7" y="41.6"/>
<line x="51.2" y="41.1"/>
<close/>
</path>
<fillstroke/>
<path>
<move x="29.8" y="0"/>
<line x="59.6" y="14.9"/>
<line x="59.6" y="36"/>
<line x="29.8" y="36"/>
<close/>
</path>
<fillstroke/>
</foreground>
</shape>
<shape aspect="variable" h="82.4" name="Key Management Service" strokewidth="inherit" w="68.2">
<connections>
<constraint name="N" perimeter="0" x="0.5" y="0"/>
<constraint name="S" perimeter="0" x="0.5" y="1"/>
<constraint name="W" perimeter="0" x="0" y="0.45"/>
<constraint name="E" perimeter="0" x="1" y="0.45"/>
<constraint name="NW" perimeter="0" x="0" y="0.21"/>
<constraint name="NE" perimeter="0" x="1" y="0.21"/>
<constraint name="SW" perimeter="0" x="0.2" y="0.8"/>
<constraint name="SE" perimeter="0" x="0.8" y="0.8"/>
</connections>
<foreground>
<fillcolor color="#769B3F"/>
<path>
<move x="14.4" y="25.8"/>
<line x="6.8" y="24.6"/>
<line x="6.8" y="13.7"/>
<line x="17" y="16.5"/>
<close/>
</path>
<fillstroke/>
<fillcolor color="#4C612C"/>
<path>
<move x="14.9" y="27.2"/>
<line x="0" y="28.5"/>
<line x="0" y="17.1"/>
<line x="6.8" y="13.7"/>
<close/>
</path>
<fillstroke/>
<path>
<move x="53.8" y="25.8"/>
<line x="61.4" y="24.6"/>
<line x="61.4" y="13.7"/>
<line x="51.2" y="16.5"/>
<close/>
</path>
<fillstroke/>
<fillcolor color="#769B3F"/>
<path>
<move x="53.3" y="27.2"/>
<line x="68.2" y="28.5"/>
<line x="68.2" y="17.1"/>
<line x="61.4" y="13.7"/>
<close/>
</path>
<fillstroke/>
<fillcolor color="#4C612C"/>
<path>
<move x="19.7" y="7.2"/>
<line x="11.9" y="23.2"/>
<line x="11.9" y="23.2"/>
<line x="0" y="26.7"/>
<line x="0" y="36.9"/>
<line x="13.8" y="66.4"/>
<line x="34.1" y="82.4"/>
<line x="34.1" y="65.9"/>
<line x="34.1" y="16.5"/>
<line x="34.1" y="0"/>
<close/>
</path>
<fillstroke/>
<fillcolor color="#769B3F"/>
<path>
<move x="68.2" y="36.9"/>
<line x="68.2" y="26.7"/>
<line x="56.3" y="23.2"/>
<line x="56.3" y="23.2"/>
<line x="48.5" y="7.2"/>
<line x="34.1" y="0"/>
<line x="34.1" y="16.5"/>
<line x="34.1" y="65.9"/>
<line x="34.1" y="82.4"/>
<line x="54.4" y="66.4"/>
<close/>
</path>
<fillstroke/>
</foreground>
</shape>
<shape aspect="variable" h="82.4" name="Service Catalog" strokewidth="inherit" w="68.2">
<connections>
<constraint name="N" perimeter="0" x="0.5" y="0"/>
<constraint name="S" perimeter="0" x="0.5" y="1"/>
<constraint name="W" perimeter="0" x="0.29" y="0.5"/>
<constraint name="E" perimeter="0" x="0.71" y="0.5"/>
<constraint name="NW" perimeter="0" x="0.29" y="0.09"/>
<constraint name="NE" perimeter="0" x="0.71" y="0.09"/>
<constraint name="SW" perimeter="0" x="0" y="0.79"/>
<constraint name="SE" perimeter="0" x="1" y="0.79"/>
</connections>
<foreground>
<fillcolor color="#B6C99C"/>
<path>
<move x="68.2" y="59.1"/>
<line x="34" y="52.7"/>
<line x="0" y="59.1"/>
<line x="34" y="73.5"/>
<close/>
</path>
<fillstroke/>
<fillcolor color="#4C612C"/>
<path>
<move x="0" y="59.1"/>
<line x="0" y="65.3"/>
<line x="4.4" y="67.5"/>
<line x="34.1" y="82.4"/>
<line x="34.1" y="72"/>
</path>
<fillstroke/>
<fillcolor color="#769B3F"/>
<path>
<move x="68.2" y="59.1"/>
<line x="68.2" y="65.3"/>
<line x="63.8" y="67.5"/>
<line x="34.1" y="82.4"/>
<line x="34.1" y="72"/>
</path>
<fillstroke/>
<fillcolor color="#4C612C"/>
<path>
<move x="19.7" y="61.6"/>
<line x="34.1" y="65.9"/>
<line x="34.1" y="53.6"/>
<line x="19.7" y="51.5"/>
<close/>
</path>
<fillstroke/>
<fillcolor color="#769B3F"/>
<path>
<move x="48.5" y="61.6"/>
<line x="34.1" y="65.9"/>
<line x="34.1" y="53.6"/>
<line x="48.5" y="51.5"/>
<close/>
</path>
<fillstroke/>
<fillcolor color="#4C612C"/>
<path>
<move x="19.7" y="7.3"/>
<line x="34.1" y="0"/>
<line x="34.1" y="46.5"/>
<line x="19.7" y="45.3"/>
<close/>
</path>
<fillstroke/>
<fillcolor color="#769B3F"/>
<path>
<move x="48.5" y="45.3"/>
<line x="34.1" y="46.5"/>
<line x="34.1" y="0"/>
<line x="48.5" y="7.3"/>
<close/>
</path>
<fillstroke/>
<fillcolor color="#B6C99C"/>
<path>
<move x="34.1" y="50"/>
<line x="48.5" y="51.5"/>
<line x="34.1" y="53.6"/>
<line x="19.7" y="51.5"/>
<close/>
</path>
<fillstroke/>
</foreground>
</shape>
<shape aspect="variable" h="82.4" name="WebApp Firewall" strokewidth="inherit" w="68.2">
<connections>
<constraint name="N" perimeter="0" x="0.5" y="0"/>
<constraint name="S" perimeter="0" x="0.5" y="1"/>
<constraint name="W" perimeter="0" x="0" y="0.56"/>
<constraint name="E" perimeter="0" x="1" y="0.56"/>
<constraint name="NW" perimeter="0" x="0.29" y="0.09"/>
<constraint name="NE" perimeter="0" x="0.71" y="0.09"/>
<constraint name="SW" perimeter="0" x="0" y="0.79"/>
<constraint name="SE" perimeter="0" x="1" y="0.79"/>
</connections>
<foreground>
<fillcolor color="#4C612C"/>
<path>
<move x="19.7" y="61.6"/>
<line x="34.1" y="65.9"/>
<line x="34.1" y="0"/>
<line x="19.7" y="7.2"/>
<close/>
</path>
<fillstroke/>
<fillcolor color="#769B3F"/>
<path>
<move x="48.5" y="61.6"/>
<line x="34.1" y="65.9"/>
<line x="34.1" y="0"/>
<line x="48.5" y="7.2"/>
<close/>
</path>
<fillstroke/>
<fillcolor color="#4C612C"/>
<path>
<move x="58.4" y="55.8"/>
<line x="63.8" y="56.5"/>
<line x="63.8" y="46.5"/>
<line x="58.4" y="46.2"/>
<close/>
</path>
<fillstroke/>
<fillcolor color="#769B3F"/>
<path>
<move x="9.8" y="55.8"/>
<line x="4.4" y="56.5"/>
<line x="4.4" y="46.5"/>
<line x="9.8" y="46.2"/>
<close/>
</path>
<fillstroke/>
<fillcolor color="#B6C99C"/>
<path>
<move x="33.5" y="55.4"/>
<line x="9.6" y="51.2"/>
<line x="4.4" y="51.7"/>
<line x="27.6" y="56.4"/>
<close/>
</path>
<fillstroke/>
<fillcolor color="#769B3F"/>
<path>
<move x="68.2" y="50.8"/>
<line x="34.1" y="57.7"/>
<line x="34.1" y="82.4"/>
<line x="68.2" y="65.3"/>
<close/>
</path>
<fillstroke/>
<path>
<move x="63.8" y="46.5"/>
<line x="68.2" y="46"/>
<line x="68.2" y="65.3"/>
<line x="63.8" y="67.5"/>
<close/>
</path>
<fillstroke/>
<fillcolor color="#B6C99C"/>
<path>
<move x="68.2" y="46"/>
<line x="63" y="45.8"/>
<line x="58.4" y="46.2"/>
<line x="63.8" y="46.5"/>
<close/>
</path>
<fillstroke/>
<fillcolor color="#4C612C"/>
<path>
<move x="0" y="50.8"/>
<line x="34.1" y="57.7"/>
<line x="34.1" y="82.4"/>
<line x="0" y="65.3"/>
<close/>
</path>
<fillstroke/>
<path>
<move x="23.9" y="77.3"/>
<line x="34.1" y="82.4"/>
<line x="34.1" y="49.4"/>
<line x="23.9" y="48.4"/>
<close/>
</path>
<fillstroke/>
<path>
<move x="4.4" y="46.5"/>
<line x="0" y="46"/>
<line x="0" y="65.3"/>
<line x="4.4" y="67.5"/>
<close/>
</path>
<fillstroke/>
<fillcolor color="#B6C99C"/>
<path>
<move x="0" y="46"/>
<line x="5.2" y="45.8"/>
<line x="9.8" y="46.2"/>
<line x="4.4" y="46.5"/>
<close/>
</path>
<fillstroke/>
<path>
<move x="34.1" y="55.5"/>
<line x="39.9" y="56.5"/>
<line x="63.8" y="51.7"/>
<line x="58.7" y="51.2"/>
<close/>
</path>
<fillstroke/>
<fillcolor color="#769B3F"/>
<path>
<move x="44.3" y="76.5"/>
<line x="34.1" y="81.6"/>
<line x="34.1" y="48.6"/>
<line x="44.3" y="47.6"/>
<close/>
</path>
<fillstroke/>
<fillcolor color="#B6C99C"/>
<path>
<move x="44.3" y="48.4"/>
<line x="34.1" y="47.6"/>
<line x="23.9" y="48.4"/>
<line x="34.1" y="49.4"/>
<close/>
</path>
<fillstroke/>
</foreground>
</shape>
</shapes>
|
{
"pile_set_name": "Github"
}
|
(function($K)
{
$K.add('module', 'autocomplete', {
init: function(app, context)
{
this.app = app;
this.$doc = app.$doc;
this.$win = app.$win;
this.$body = app.$body;
this.animate = app.animate;
// defaults
var defaults = {
url: false,
min: 2,
labelClass: false,
target: false,
param: false
};
// context
this.context = context;
this.params = context.getParams(defaults);
this.$element = context.getElement();
this.$target = context.getTarget();
},
start: function()
{
this._build();
this.timeout = null;
this.$element.on('keyup.kube.autocomplete', this._open.bind(this));
},
stop: function()
{
this.$box.remove();
this.$element.off('.kube.autocomplete');
this.$doc.off('.kube.autocomplete');
this.$win.off('.kube.autocomplete');
},
// private
_build: function()
{
this.$box = $K.dom('<div />');
this.$box.addClass('autocomplete');
this.$box.addClass('is-hidden');
this.$body.append(this.$box);
if (this.$target && !this._isInputTarget())
{
this.$target.addClass('autocomplete-labels');
var $closes = this.$target.find('.close');
$closes.on('click', this._removeLabel.bind(this));
}
},
_open: function(e)
{
if (e) e.preventDefault();
clearTimeout(this.timeout);
var value = this.$element.val();
if (value.length >= this.params.min)
{
this._resize();
this.$win.on('resize.kube.autocomplete', this._resize.bind(this));
this.$doc.on('click.kube.autocomplete', this._close.bind(this));
this.$box.addClass('is-open');
this._listen(e);
}
else
{
this._close(e);
}
},
_close: function(e)
{
if (e) e.preventDefault();
this.$box.removeClass('is-open');
this.$box.addClass('is-hidden');
this.$doc.off('.kube.autocomplete');
this.$win.off('.kube.autocomplete');
},
_getPlacement: function(pos, height)
{
return ((this.$doc.height() - (pos.top + height)) < this.$box.height()) ? 'top' : 'bottom';
},
_resize: function()
{
this.$box.width(this.$element.width());
},
_getParamName: function()
{
return (this.params.param) ? this.params.param : this.$element.attr('name');
},
_getTargetName: function()
{
var name = this.$target.attr('data-name');
return (name) ? name : this.$target.attr('id');
},
_lookup: function()
{
var data = this._getParamName() + '=' + this.$element.val();
$K.ajax.post({
url: this.params.url,
data: data,
success: this._complete.bind(this)
});
},
_complete: function(json)
{
this.$box.html('');
if (json.length === 0) return this._close();
for (var i = 0; i < json.length; i++)
{
var $item = $K.dom('<a>');
$item.attr('href', '#');
$item.attr('rel', json[i].id);
$item.html(json[i].name);
$item.on('click', this._set.bind(this));
this.$box.append($item);
}
var pos = this.$element.offset();
var height = this.$element.height();
var width = this.$element.width();
var placement = this._getPlacement(pos, height);
var top = (placement === 'top') ? (pos.top - this.$box.height() - height) : (pos.top + height);
this.$box.css({ width: width + 'px', top: top + 'px', left: pos.left + 'px' });
this.$box.removeClass('is-hidden');
},
_listen: function(e)
{
switch(e.which)
{
case 40: // down
e.preventDefault();
this._select('next');
break;
case 38: // up
e.preventDefault();
this._select('prev');
break;
case 13: // enter
e.preventDefault();
this._set();
break;
case 27: // esc
this._close(e);
break;
default:
this.timeout = setTimeout(this._lookup.bind(this), 300);
break;
}
},
_select: function(type)
{
var $links = this.$box.find('a');
var $active = this.$box.find('.is-active');
$links.removeClass('is-active');
var $item = this._selectItem($active, $links, type);
$item.addClass('is-active');
},
_selectItem: function($active, $links, type)
{
var $item;
var isActive = ($active.length !== 0);
var size = (type === 'next') ? 0 : ($links.length - 1);
if (isActive)
{
$item = $active[type]();
}
if (!isActive || !$item || $item.length === 0)
{
$item = $links.eq(size);
}
return $item;
},
_set: function(e)
{
var $active = this.$box.find('.is-active');
if (e)
{
e.preventDefault();
$active = $K.dom(e.target);
}
var id = $active.attr('rel');
var value = $active.html();
if (this.$target.length !== 0)
{
if (this._isInputTarget())
{
this.$target.val(value);
}
else
{
var $added = this.$target.find('[data-id="' + id + '"]');
if ($added.length === 0)
{
this._addLabel(id, value);
}
}
this.$element.val('');
}
else
{
this.$element.val(value);
}
this.$element.focus();
this.app.broadcast('autocomplete.set', this, value);
this._close();
},
_addLabel: function(id, name)
{
var $label = $K.dom('<span>');
$label.addClass('label');
$label.attr('data-id', id);
$label.text(name + ' ');
if (this.params.labelClass)
{
$label.addClass(this.params.labelClass);
}
var $close = $K.dom('<span>');
$close.addClass('close');
$close.on('click', this._removeLabel.bind(this));
var $input = $K.dom('<input>');
$input.attr('type', 'hidden');
$input.attr('name', this._getTargetName() + '[]');
$input.val(name);
$label.append($close);
$label.append($input);
this.$target.append($label);
},
_isInputTarget: function()
{
return (this.$target.get().tagName === 'INPUT');
},
_removeLabel: function(e)
{
e.preventDefault();
var $el = $K.dom(e.target);
var $label = $el.closest('.label');
this.animate.run($label, 'fadeOut', function()
{
$label.remove();
}.bind(this))
}
});
})(Kube);
|
{
"pile_set_name": "Github"
}
|
<textarea name={{ UEditor.name }} id=id_{{ UEditor.name }} style="display:inline-block;width:{{ UEditor.width }}px;{{ UEditor.css }}">{{UEditor.value}}</textarea>
<script type="text/javascript">
var id_{{ UEditor.name }}= new baidu.editor.ui.Editor({
"UEDITOR_HOME_URL":"{{ STATIC_URL }}ueditor/",
{% ifnotequal UEditor.toolbars None %}"toolbars":{{ UEditor.toolbars|safe }},{% endifnotequal %}
"imageUrl":"/ueditor/ImageUp/{{ UEditor.imagePath }}",
"imagePath":"{{ MEDIA_URL }}{{ UEditor.imagePath }}",
"scrawlUrl":"/ueditor/scrawlUp/{{ UEditor.scrawlPath }}",
"scrawlPath":"{{ MEDIA_URL }}{{ UEditor.scrawlPath }}",
"imageManagerUrl":"/ueditor/ImageManager/{{ UEditor.imageManagerPath }}",
"imageManagerPath":"{{ MEDIA_URL }}{{ UEditor.imageManagerPath }}",
"catcherUrl":"/ueditor/RemoteCatchImage/{{ UEditor.imagePath }}",
"catcherPath":"{{ MEDIA_URL }}{{ UEditor.imagePath }}",
"fileUrl":"/ueditor/FileUp/{{ UEditor.filePath }}",
"filePath":"{{ MEDIA_URL }}{{ UEditor.filePath }}",
"getMovieUrl":"/ueditor/SearchMovie/",
"sourceEditorFirst":{{ UEditor.sourceEditorFirst }}
{% ifnotequal UEditor.options '' %},{{ UEditor.options|safe }}{% endifnotequal %}
});
id_{{UEditor.name}}.render('id_{{ UEditor.name }}');
id_{{UEditor.name}}.addListener('ready',function(){
id_{{UEditor.name}}.setHeight({{ UEditor.height }});
});
</script>
|
{
"pile_set_name": "Github"
}
|
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_description</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>extra_context</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>extra_context</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>extra_context</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_description</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>BaseConsulting_FieldLibrary</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
|
{
"pile_set_name": "Github"
}
|
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!126 &1
NavMeshProjectSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
areas:
- name: Walkable
cost: 1
- name: Not Walkable
cost: 1
- name: Jump
cost: 2
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
- name:
cost: 1
m_LastAgentTypeID: -887442657
m_Settings:
- serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.75
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
debug:
m_Flags: 0
m_SettingNames:
- Humanoid
|
{
"pile_set_name": "Github"
}
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.3.xsd">
<changeSet author="toja" id="1-indices">
<createIndex tableName="LOGRECORD" indexName="LOGRECORD_TIMESTAMPRECORD_fkey">
<column name="TIMESTAMPRECORD"/>
</createIndex>
</changeSet>
</databaseChangeLog>
|
{
"pile_set_name": "Github"
}
|
import {MigrationInterface, QueryRunner} from 'typeorm';
export class tipsAndBitsMessagesToText1573942908160 implements MigrationInterface {
name = 'tipsAndBitsMessagesToText1573942908160';
public async up(queryRunner: QueryRunner): Promise<any> {
await queryRunner.query(`CREATE TABLE "temporary_user_tip" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "amount" float NOT NULL, "currency" varchar NOT NULL, "message" varchar NOT NULL DEFAULT (''), "tippedAt" bigint NOT NULL DEFAULT (0), "sortAmount" float NOT NULL, "userUserId" integer, CONSTRAINT "FK_36683fb221201263b38344a9880" FOREIGN KEY ("userUserId") REFERENCES "user" ("userId") ON DELETE CASCADE ON UPDATE CASCADE)`, undefined);
await queryRunner.query(`INSERT INTO "temporary_user_tip"("id", "amount", "currency", "message", "tippedAt", "sortAmount", "userUserId") SELECT "id", "amount", "currency", "message", "tippedAt", "sortAmount", "userUserId" FROM "user_tip"`, undefined);
await queryRunner.query(`DROP TABLE "user_tip"`, undefined);
await queryRunner.query(`ALTER TABLE "temporary_user_tip" RENAME TO "user_tip"`, undefined);
await queryRunner.query(`CREATE TABLE "temporary_user_bit" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "amount" bigint NOT NULL, "message" varchar NOT NULL DEFAULT (''), "cheeredAt" bigint NOT NULL DEFAULT (0), "userUserId" integer, CONSTRAINT "FK_cca96526faa532e7d20a0f775b0" FOREIGN KEY ("userUserId") REFERENCES "user" ("userId") ON DELETE CASCADE ON UPDATE CASCADE)`, undefined);
await queryRunner.query(`INSERT INTO "temporary_user_bit"("id", "amount", "message", "cheeredAt", "userUserId") SELECT "id", "amount", "message", "cheeredAt", "userUserId" FROM "user_bit"`, undefined);
await queryRunner.query(`DROP TABLE "user_bit"`, undefined);
await queryRunner.query(`ALTER TABLE "temporary_user_bit" RENAME TO "user_bit"`, undefined);
await queryRunner.query(`CREATE TABLE "temporary_user_tip" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "amount" float NOT NULL, "currency" varchar NOT NULL, "message" text NOT NULL DEFAULT (''), "tippedAt" bigint NOT NULL DEFAULT (0), "sortAmount" float NOT NULL, "userUserId" integer, CONSTRAINT "FK_36683fb221201263b38344a9880" FOREIGN KEY ("userUserId") REFERENCES "user" ("userId") ON DELETE CASCADE ON UPDATE CASCADE)`, undefined);
await queryRunner.query(`INSERT INTO "temporary_user_tip"("id", "amount", "currency", "message", "tippedAt", "sortAmount", "userUserId") SELECT "id", "amount", "currency", "message", "tippedAt", "sortAmount", "userUserId" FROM "user_tip"`, undefined);
await queryRunner.query(`DROP TABLE "user_tip"`, undefined);
await queryRunner.query(`ALTER TABLE "temporary_user_tip" RENAME TO "user_tip"`, undefined);
await queryRunner.query(`CREATE TABLE "temporary_user_bit" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "amount" bigint NOT NULL, "message" text NOT NULL DEFAULT (''), "cheeredAt" bigint NOT NULL DEFAULT (0), "userUserId" integer, CONSTRAINT "FK_cca96526faa532e7d20a0f775b0" FOREIGN KEY ("userUserId") REFERENCES "user" ("userId") ON DELETE CASCADE ON UPDATE CASCADE)`, undefined);
await queryRunner.query(`INSERT INTO "temporary_user_bit"("id", "amount", "message", "cheeredAt", "userUserId") SELECT "id", "amount", "message", "cheeredAt", "userUserId" FROM "user_bit"`, undefined);
await queryRunner.query(`DROP TABLE "user_bit"`, undefined);
await queryRunner.query(`ALTER TABLE "temporary_user_bit" RENAME TO "user_bit"`, undefined);
await queryRunner.query(`DROP INDEX "IDX_4d8108fc3e8dcbe5c112f53dd3"`, undefined);
await queryRunner.query(`CREATE TABLE "temporary_twitch_tag_localization_description" ("id" varchar PRIMARY KEY NOT NULL, "locale" varchar NOT NULL, "value" varchar NOT NULL, "tagId" varchar, CONSTRAINT "FK_4d8108fc3e8dcbe5c112f53dd3f" FOREIGN KEY ("tagId") REFERENCES "twitch_tag" ("tag_id") ON DELETE CASCADE ON UPDATE CASCADE)`, undefined);
await queryRunner.query(`INSERT INTO "temporary_twitch_tag_localization_description"("id", "locale", "value", "tagId") SELECT "id", "locale", "value", "tagId" FROM "twitch_tag_localization_description"`, undefined);
await queryRunner.query(`DROP TABLE "twitch_tag_localization_description"`, undefined);
await queryRunner.query(`ALTER TABLE "temporary_twitch_tag_localization_description" RENAME TO "twitch_tag_localization_description"`, undefined);
await queryRunner.query(`CREATE INDEX "IDX_4d8108fc3e8dcbe5c112f53dd3" ON "twitch_tag_localization_description" ("tagId") `, undefined);
await queryRunner.query(`DROP INDEX "IDX_4d8108fc3e8dcbe5c112f53dd3"`, undefined);
await queryRunner.query(`CREATE TABLE "temporary_twitch_tag_localization_description" ("id" varchar PRIMARY KEY NOT NULL, "locale" varchar NOT NULL, "value" text NOT NULL, "tagId" varchar, CONSTRAINT "FK_4d8108fc3e8dcbe5c112f53dd3f" FOREIGN KEY ("tagId") REFERENCES "twitch_tag" ("tag_id") ON DELETE CASCADE ON UPDATE CASCADE)`, undefined);
await queryRunner.query(`INSERT INTO "temporary_twitch_tag_localization_description"("id", "locale", "value", "tagId") SELECT "id", "locale", "value", "tagId" FROM "twitch_tag_localization_description"`, undefined);
await queryRunner.query(`DROP TABLE "twitch_tag_localization_description"`, undefined);
await queryRunner.query(`ALTER TABLE "temporary_twitch_tag_localization_description" RENAME TO "twitch_tag_localization_description"`, undefined);
await queryRunner.query(`CREATE INDEX "IDX_4d8108fc3e8dcbe5c112f53dd3" ON "twitch_tag_localization_description" ("tagId") `, undefined);
}
public async down(queryRunner: QueryRunner): Promise<any> {
await queryRunner.query(`ALTER TABLE "user_bit" RENAME TO "temporary_user_bit"`, undefined);
await queryRunner.query(`CREATE TABLE "user_bit" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "amount" bigint NOT NULL, "message" varchar NOT NULL DEFAULT (''), "cheeredAt" bigint NOT NULL DEFAULT (0), "userUserId" integer, CONSTRAINT "FK_cca96526faa532e7d20a0f775b0" FOREIGN KEY ("userUserId") REFERENCES "user" ("userId") ON DELETE CASCADE ON UPDATE CASCADE)`, undefined);
await queryRunner.query(`INSERT INTO "user_bit"("id", "amount", "message", "cheeredAt", "userUserId") SELECT "id", "amount", "message", "cheeredAt", "userUserId" FROM "temporary_user_bit"`, undefined);
await queryRunner.query(`DROP TABLE "temporary_user_bit"`, undefined);
await queryRunner.query(`ALTER TABLE "user_tip" RENAME TO "temporary_user_tip"`, undefined);
await queryRunner.query(`CREATE TABLE "user_tip" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "amount" float NOT NULL, "currency" varchar NOT NULL, "message" varchar NOT NULL DEFAULT (''), "tippedAt" bigint NOT NULL DEFAULT (0), "sortAmount" float NOT NULL, "userUserId" integer, CONSTRAINT "FK_36683fb221201263b38344a9880" FOREIGN KEY ("userUserId") REFERENCES "user" ("userId") ON DELETE CASCADE ON UPDATE CASCADE)`, undefined);
await queryRunner.query(`INSERT INTO "user_tip"("id", "amount", "currency", "message", "tippedAt", "sortAmount", "userUserId") SELECT "id", "amount", "currency", "message", "tippedAt", "sortAmount", "userUserId" FROM "temporary_user_tip"`, undefined);
await queryRunner.query(`DROP TABLE "temporary_user_tip"`, undefined);
await queryRunner.query(`ALTER TABLE "user_bit" RENAME TO "temporary_user_bit"`, undefined);
await queryRunner.query(`CREATE TABLE "user_bit" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "amount" bigint NOT NULL, "message" varchar NOT NULL DEFAULT (''), "cheeredAt" bigint NOT NULL DEFAULT (0), "userUserId" integer, CONSTRAINT "FK_cca96526faa532e7d20a0f775b0" FOREIGN KEY ("userUserId") REFERENCES "user" ("userId") ON DELETE CASCADE ON UPDATE CASCADE)`, undefined);
await queryRunner.query(`INSERT INTO "user_bit"("id", "amount", "message", "cheeredAt", "userUserId") SELECT "id", "amount", "message", "cheeredAt", "userUserId" FROM "temporary_user_bit"`, undefined);
await queryRunner.query(`DROP TABLE "temporary_user_bit"`, undefined);
await queryRunner.query(`ALTER TABLE "user_tip" RENAME TO "temporary_user_tip"`, undefined);
await queryRunner.query(`CREATE TABLE "user_tip" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "amount" float NOT NULL, "currency" varchar NOT NULL, "message" varchar NOT NULL DEFAULT (''), "tippedAt" bigint NOT NULL DEFAULT (0), "sortAmount" float NOT NULL, "userUserId" integer, CONSTRAINT "FK_36683fb221201263b38344a9880" FOREIGN KEY ("userUserId") REFERENCES "user" ("userId") ON DELETE CASCADE ON UPDATE CASCADE)`, undefined);
await queryRunner.query(`INSERT INTO "user_tip"("id", "amount", "currency", "message", "tippedAt", "sortAmount", "userUserId") SELECT "id", "amount", "currency", "message", "tippedAt", "sortAmount", "userUserId" FROM "temporary_user_tip"`, undefined);
await queryRunner.query(`DROP TABLE "temporary_user_tip"`, undefined);
await queryRunner.query(`DROP INDEX "IDX_4d8108fc3e8dcbe5c112f53dd3"`, undefined);
await queryRunner.query(`ALTER TABLE "twitch_tag_localization_description" RENAME TO "temporary_twitch_tag_localization_description"`, undefined);
await queryRunner.query(`CREATE TABLE "twitch_tag_localization_description" ("id" varchar PRIMARY KEY NOT NULL, "locale" varchar NOT NULL, "value" varchar NOT NULL, "tagId" varchar, CONSTRAINT "FK_4d8108fc3e8dcbe5c112f53dd3f" FOREIGN KEY ("tagId") REFERENCES "twitch_tag" ("tag_id") ON DELETE CASCADE ON UPDATE CASCADE)`, undefined);
await queryRunner.query(`INSERT INTO "twitch_tag_localization_description"("id", "locale", "value", "tagId") SELECT "id", "locale", "value", "tagId" FROM "temporary_twitch_tag_localization_description"`, undefined);
await queryRunner.query(`DROP TABLE "temporary_twitch_tag_localization_description"`, undefined);
await queryRunner.query(`CREATE INDEX "IDX_4d8108fc3e8dcbe5c112f53dd3" ON "twitch_tag_localization_description" ("tagId") `, undefined);
await queryRunner.query(`DROP INDEX "IDX_4d8108fc3e8dcbe5c112f53dd3"`, undefined);
await queryRunner.query(`ALTER TABLE "twitch_tag_localization_description" RENAME TO "temporary_twitch_tag_localization_description"`, undefined);
await queryRunner.query(`CREATE TABLE "twitch_tag_localization_description" ("id" varchar PRIMARY KEY NOT NULL, "locale" varchar NOT NULL, "value" varchar NOT NULL, "tagId" varchar, CONSTRAINT "FK_4d8108fc3e8dcbe5c112f53dd3f" FOREIGN KEY ("tagId") REFERENCES "twitch_tag" ("tag_id") ON DELETE CASCADE ON UPDATE CASCADE)`, undefined);
await queryRunner.query(`INSERT INTO "twitch_tag_localization_description"("id", "locale", "value", "tagId") SELECT "id", "locale", "value", "tagId" FROM "temporary_twitch_tag_localization_description"`, undefined);
await queryRunner.query(`DROP TABLE "temporary_twitch_tag_localization_description"`, undefined);
await queryRunner.query(`CREATE INDEX "IDX_4d8108fc3e8dcbe5c112f53dd3" ON "twitch_tag_localization_description" ("tagId") `, undefined);
}
}
|
{
"pile_set_name": "Github"
}
|
<?xml version="1.0"?>
<window xmlns:html="http://www.w3.org/1999/xhtml" class="reftest-wait" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" title="Testcase bug 311661 - Evil xul testcase, using display:table-row causes crash [@ nsTableRowGroupFrame::GetFirstRow]">
<html:script><![CDATA[
function doe() {
document.documentElement.getElementsByTagName('*')[1].style.display='table-row';
setTimeout(doe2,20);
}
function doe2(){
document.documentElement.getElementsByTagName('*')[1].style.display='';
setTimeout(doe,20);
}
]]></html:script>
<button id="button" onclick="doe()" label="Mozilla should not crash, when clicking this button"/>
<div style="display:table-row"/>
<html:script>
function clickbutton()
{
var ev = document.createEvent('MouseEvents');
ev.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
var button = document.getElementById('button');
button.dispatchEvent(ev);
setTimeout(function() { document.documentElement.className = "" }, 500);
}
window.addEventListener("load", clickbutton, false);
</html:script>
</window>
|
{
"pile_set_name": "Github"
}
|
var rules = require('../../../../lib/rules/util').rules;
module.exports = function(req, res) {
rules.disableDefault();
res.json({ec: 0, em: 'success', defaultRulesIsDisabled: rules.defaultRulesIsDisabled(), list: rules.getSelectedList()});
};
|
{
"pile_set_name": "Github"
}
|
{
"name": "bluetoothconnector",
"full_name": "bluetoothconnector",
"oldname": null,
"aliases": [
],
"versioned_formulae": [
],
"desc": "Connect and disconnect Bluetooth devices",
"license": "MIT",
"homepage": "https://github.com/lapfelix/BluetoothConnector",
"versions": {
"stable": "2.0.0",
"head": "HEAD",
"bottle": true
},
"urls": {
"stable": {
"url": "https://github.com/lapfelix/BluetoothConnector/archive/2.0.0.tar.gz",
"tag": null,
"revision": null
}
},
"revision": 0,
"version_scheme": 0,
"bottle": {
"stable": {
"rebuild": 0,
"cellar": ":any_skip_relocation",
"prefix": "/home/linuxbrew/.linuxbrew",
"root_url": "https://linuxbrew.bintray.com/bottles",
"files": {
"catalina": {
"url": "https://linuxbrew.bintray.com/bottles/bluetoothconnector-2.0.0.catalina.bottle.tar.gz",
"sha256": "38d8b5c89fd8fee4a746eadaceb399d5b7e1148db2cee896381b6e093aef56e3"
},
"mojave": {
"url": "https://linuxbrew.bintray.com/bottles/bluetoothconnector-2.0.0.mojave.bottle.tar.gz",
"sha256": "1a0c1e83b5640a35c48ba982f1b7cf5b1bebdda6fd4957368262c3e001c740e3"
}
}
}
},
"keg_only": false,
"bottle_disabled": false,
"options": [
],
"build_dependencies": [
],
"dependencies": [
],
"recommended_dependencies": [
],
"optional_dependencies": [
],
"uses_from_macos": [
],
"requirements": [
{
"name": "xcode",
"cask": null,
"download": null,
"version": "11.0",
"contexts": [
"build"
]
}
],
"conflicts_with": [
],
"caveats": null,
"installed": [
],
"linked_keg": null,
"pinned": false,
"outdated": false,
"deprecated": false,
"disabled": false
}
|
{
"pile_set_name": "Github"
}
|
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:exsl="http://exslt.org/common"
exclude-result-prefixes="exsl"
version='1.0'>
<!-- ********************************************************************
$Id: xref.xsl,v 1.1 2005/08/28 00:35:05 cbauer Exp $
********************************************************************
This file is part of the XSL DocBook Stylesheet distribution.
See ../README or http://nwalsh.com/docbook/xsl/ for copyright
and other information.
******************************************************************** -->
<!-- Create keys for quickly looking up olink targets -->
<xsl:key name="targetdoc-key" match="document" use="@targetdoc" />
<xsl:key name="targetptr-key" match="div|obj"
use="concat(ancestor::document/@targetdoc, '/', @targetptr)" />
<!-- ==================================================================== -->
<xsl:template match="anchor">
<fo:wrapper id="{@id}"/>
</xsl:template>
<!-- ==================================================================== -->
<xsl:template match="xref" name="xref">
<xsl:variable name="targets" select="key('id',@linkend)"/>
<xsl:variable name="target" select="$targets[1]"/>
<xsl:variable name="refelem" select="local-name($target)"/>
<xsl:call-template name="check.id.unique">
<xsl:with-param name="linkend" select="@linkend"/>
</xsl:call-template>
<xsl:choose>
<xsl:when test="$refelem=''">
<xsl:message>
<xsl:text>XRef to nonexistent id: </xsl:text>
<xsl:value-of select="@linkend"/>
</xsl:message>
<xsl:text>???</xsl:text>
</xsl:when>
<xsl:when test="@endterm">
<fo:basic-link internal-destination="{@linkend}"
xsl:use-attribute-sets="xref.properties">
<xsl:variable name="etargets" select="key('id',@endterm)"/>
<xsl:variable name="etarget" select="$etargets[1]"/>
<xsl:choose>
<xsl:when test="count($etarget) = 0">
<xsl:message>
<xsl:value-of select="count($etargets)"/>
<xsl:text>Endterm points to nonexistent ID: </xsl:text>
<xsl:value-of select="@endterm"/>
</xsl:message>
<xsl:text>???</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="$etarget" mode="endterm"/>
</xsl:otherwise>
</xsl:choose>
</fo:basic-link>
</xsl:when>
<xsl:when test="$target/@xreflabel">
<fo:basic-link internal-destination="{@linkend}"
xsl:use-attribute-sets="xref.properties">
<xsl:call-template name="xref.xreflabel">
<xsl:with-param name="target" select="$target"/>
</xsl:call-template>
</fo:basic-link>
</xsl:when>
<xsl:otherwise>
<fo:basic-link internal-destination="{@linkend}"
xsl:use-attribute-sets="xref.properties">
<xsl:apply-templates select="$target" mode="xref-to">
<xsl:with-param name="referrer" select="."/>
<xsl:with-param name="xrefstyle">
<xsl:choose>
<xsl:when test="@role and not(@xrefstyle) and $use.role.as.xrefstyle != 0">
<xsl:value-of select="@role"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@xrefstyle"/>
</xsl:otherwise>
</xsl:choose>
</xsl:with-param>
</xsl:apply-templates>
</fo:basic-link>
</xsl:otherwise>
</xsl:choose>
<!-- Add standard page reference? -->
<xsl:if test="not(starts-with(normalize-space(@xrefstyle), 'select:') != ''
and (contains(@xrefstyle, 'page')
or contains(@xrefstyle, 'Page')))
and ( $insert.xref.page.number = 'yes'
or $insert.xref.page.number = '1')
or local-name($target) = 'para'">
<fo:basic-link internal-destination="{@linkend}"
xsl:use-attribute-sets="xref.properties">
<xsl:apply-templates select="$target" mode="page.citation">
<xsl:with-param name="id" select="@linkend"/>
</xsl:apply-templates>
</fo:basic-link>
</xsl:if>
</xsl:template>
<!-- ==================================================================== -->
<xsl:template match="*" mode="endterm">
<!-- Process the children of the endterm element -->
<xsl:variable name="endterm">
<xsl:apply-templates select="child::node()"/>
</xsl:variable>
<xsl:choose>
<xsl:when test="function-available('exsl:node-set')">
<xsl:apply-templates select="exsl:node-set($endterm)" mode="remove-ids"/>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="$endterm"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="*" mode="remove-ids">
<xsl:copy>
<xsl:for-each select="@*">
<xsl:choose>
<xsl:when test="name(.) != 'id'">
<xsl:copy/>
</xsl:when>
<xsl:otherwise>
<xsl:message>removing <xsl:value-of select="name(.)"/></xsl:message>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
<xsl:apply-templates mode="remove-ids"/>
</xsl:copy>
</xsl:template>
<!--- ==================================================================== -->
<xsl:template match="*" mode="xref-to">
<xsl:param name="referrer"/>
<xsl:param name="xrefstyle"/>
<xsl:message>
<xsl:text>Don't know what gentext to create for xref to: "</xsl:text>
<xsl:value-of select="name(.)"/>
<xsl:text>"</xsl:text>
</xsl:message>
<xsl:text>???</xsl:text>
</xsl:template>
<xsl:template match="title" mode="xref-to">
<xsl:param name="referrer"/>
<xsl:param name="xrefstyle"/>
<!-- if you xref to a title, xref to the parent... -->
<xsl:choose>
<!-- FIXME: how reliable is this? -->
<xsl:when test="contains(local-name(parent::*), 'info')">
<xsl:apply-templates select="parent::*[2]" mode="xref-to">
<xsl:with-param name="referrer" select="$referrer"/>
<xsl:with-param name="xrefstyle" select="$xrefstyle"/>
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="parent::*" mode="xref-to">
<xsl:with-param name="referrer" select="$referrer"/>
<xsl:with-param name="xrefstyle" select="$xrefstyle"/>
</xsl:apply-templates>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="abstract|article|authorblurb|bibliodiv|bibliomset
|biblioset|blockquote|calloutlist|caution|colophon
|constraintdef|formalpara|glossdiv|important|indexdiv
|itemizedlist|legalnotice|lot|msg|msgexplan|msgmain
|msgrel|msgset|msgsub|note|orderedlist|partintro
|productionset|qandadiv|refsynopsisdiv|segmentedlist
|set|setindex|sidebar|tip|toc|variablelist|warning"
mode="xref-to">
<xsl:param name="referrer"/>
<xsl:param name="xrefstyle"/>
<!-- catch-all for things with (possibly optional) titles -->
<xsl:apply-templates select="." mode="object.xref.markup">
<xsl:with-param name="purpose" select="'xref'"/>
<xsl:with-param name="xrefstyle" select="$xrefstyle"/>
<xsl:with-param name="referrer" select="$referrer"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="author|editor|othercredit|personname" mode="xref-to">
<xsl:param name="referrer"/>
<xsl:param name="xrefstyle"/>
<xsl:call-template name="person.name"/>
</xsl:template>
<xsl:template match="authorgroup" mode="xref-to">
<xsl:param name="referrer"/>
<xsl:param name="xrefstyle"/>
<xsl:call-template name="person.name.list"/>
</xsl:template>
<xsl:template match="figure|example|table|equation" mode="xref-to">
<xsl:param name="referrer"/>
<xsl:param name="xrefstyle"/>
<xsl:apply-templates select="." mode="object.xref.markup">
<xsl:with-param name="purpose" select="'xref'"/>
<xsl:with-param name="xrefstyle" select="$xrefstyle"/>
<xsl:with-param name="referrer" select="$referrer"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="procedure" mode="xref-to">
<xsl:param name="referrer"/>
<xsl:param name="xrefstyle"/>
<xsl:apply-templates select="." mode="object.xref.markup">
<xsl:with-param name="purpose" select="'xref'"/>
<xsl:with-param name="xrefstyle" select="$xrefstyle"/>
<xsl:with-param name="referrer" select="$referrer"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="cmdsynopsis" mode="xref-to">
<xsl:param name="referrer"/>
<xsl:param name="xrefstyle"/>
<xsl:apply-templates select="(.//command)[1]" mode="xref"/>
</xsl:template>
<xsl:template match="funcsynopsis" mode="xref-to">
<xsl:param name="referrer"/>
<xsl:param name="xrefstyle"/>
<xsl:apply-templates select="(.//function)[1]" mode="xref"/>
</xsl:template>
<xsl:template match="dedication|preface|chapter|appendix" mode="xref-to">
<xsl:param name="referrer"/>
<xsl:param name="xrefstyle"/>
<fo:inline text-decoration="underline" color="blue">
<xsl:apply-templates select="." mode="object.xref.markup">
<xsl:with-param name="purpose" select="'xref'"/>
<xsl:with-param name="xrefstyle" select="$xrefstyle"/>
<xsl:with-param name="referrer" select="$referrer"/>
</xsl:apply-templates>
</fo:inline>
</xsl:template>
<xsl:template match="bibliography" mode="xref-to">
<xsl:param name="referrer"/>
<xsl:param name="xrefstyle"/>
<xsl:apply-templates select="." mode="object.xref.markup">
<xsl:with-param name="purpose" select="'xref'"/>
<xsl:with-param name="xrefstyle" select="$xrefstyle"/>
<xsl:with-param name="referrer" select="$referrer"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="biblioentry|bibliomixed" mode="xref-to">
<xsl:param name="referrer"/>
<xsl:param name="xrefstyle"/>
<!-- handles both biblioentry and bibliomixed -->
<xsl:text>[</xsl:text>
<xsl:choose>
<xsl:when test="string(.) = ''">
<xsl:variable name="bib" select="document($bibliography.collection,.)"/>
<xsl:variable name="id" select="@id"/>
<xsl:variable name="entry" select="$bib/bibliography/*[@id=$id][1]"/>
<xsl:choose>
<xsl:when test="$entry">
<xsl:choose>
<xsl:when test="$bibliography.numbered != 0">
<xsl:number from="bibliography" count="biblioentry|bibliomixed"
level="any" format="1"/>
</xsl:when>
<xsl:when test="local-name($entry/*[1]) = 'abbrev'">
<xsl:apply-templates select="$entry/*[1]"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@id"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:message>
<xsl:text>No bibliography entry: </xsl:text>
<xsl:value-of select="$id"/>
<xsl:text> found in </xsl:text>
<xsl:value-of select="$bibliography.collection"/>
</xsl:message>
<xsl:value-of select="@id"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$bibliography.numbered != 0">
<xsl:number from="bibliography" count="biblioentry|bibliomixed"
level="any" format="1"/>
</xsl:when>
<xsl:when test="local-name(*[1]) = 'abbrev'">
<xsl:apply-templates select="*[1]"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@id"/>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
<xsl:text>]</xsl:text>
</xsl:template>
<xsl:template match="glossary" mode="xref-to">
<xsl:param name="referrer"/>
<xsl:param name="xrefstyle"/>
<xsl:apply-templates select="." mode="object.xref.markup">
<xsl:with-param name="purpose" select="'xref'"/>
<xsl:with-param name="xrefstyle" select="$xrefstyle"/>
<xsl:with-param name="referrer" select="$referrer"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="glossentry" mode="xref-to">
<xsl:choose>
<xsl:when test="$glossentry.show.acronym = 'primary'">
<xsl:choose>
<xsl:when test="acronym|abbrev">
<xsl:apply-templates select="(acronym|abbrev)[1]"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="glossterm[1]" mode="xref-to"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="glossterm[1]" mode="xref-to"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="glossterm" mode="xref-to">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="index" mode="xref-to">
<xsl:param name="referrer"/>
<xsl:param name="xrefstyle"/>
<xsl:apply-templates select="." mode="object.xref.markup">
<xsl:with-param name="purpose" select="'xref'"/>
<xsl:with-param name="xrefstyle" select="$xrefstyle"/>
<xsl:with-param name="referrer" select="$referrer"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="listitem" mode="xref-to">
<xsl:param name="referrer"/>
<xsl:param name="xrefstyle"/>
<xsl:apply-templates select="." mode="object.xref.markup">
<xsl:with-param name="purpose" select="'xref'"/>
<xsl:with-param name="xrefstyle" select="$xrefstyle"/>
<xsl:with-param name="referrer" select="$referrer"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="section|simplesect
|sect1|sect2|sect3|sect4|sect5
|refsect1|refsect2|refsect3|refsection" mode="xref-to">
<xsl:param name="referrer"/>
<xsl:param name="xrefstyle"/>
<fo:inline text-decoration="underline" color="blue">
<xsl:apply-templates select="." mode="object.xref.markup">
<xsl:with-param name="purpose" select="'xref'"/>
<xsl:with-param name="xrefstyle" select="$xrefstyle"/>
<xsl:with-param name="referrer" select="$referrer"/>
</xsl:apply-templates>
</fo:inline>
<!-- What about "in Chapter X"? -->
</xsl:template>
<xsl:template match="bridgehead" mode="xref-to">
<xsl:param name="referrer"/>
<xsl:param name="xrefstyle"/>
<xsl:apply-templates select="." mode="object.xref.markup">
<xsl:with-param name="purpose" select="'xref'"/>
<xsl:with-param name="xrefstyle" select="$xrefstyle"/>
<xsl:with-param name="referrer" select="$referrer"/>
</xsl:apply-templates>
<!-- What about "in Chapter X"? -->
</xsl:template>
<xsl:template match="qandaset" mode="xref-to">
<xsl:param name="referrer"/>
<xsl:param name="xrefstyle"/>
<xsl:apply-templates select="." mode="object.xref.markup">
<xsl:with-param name="purpose" select="'xref'"/>
<xsl:with-param name="xrefstyle" select="$xrefstyle"/>
<xsl:with-param name="referrer" select="$referrer"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="qandadiv" mode="xref-to">
<xsl:param name="referrer"/>
<xsl:param name="xrefstyle"/>
<xsl:apply-templates select="." mode="object.xref.markup">
<xsl:with-param name="purpose" select="'xref'"/>
<xsl:with-param name="xrefstyle" select="$xrefstyle"/>
<xsl:with-param name="referrer" select="$referrer"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="qandaentry" mode="xref-to">
<xsl:param name="referrer"/>
<xsl:param name="xrefstyle"/>
<xsl:apply-templates select="question[1]" mode="object.xref.markup">
<xsl:with-param name="purpose" select="'xref'"/>
<xsl:with-param name="xrefstyle" select="$xrefstyle"/>
<xsl:with-param name="referrer" select="$referrer"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="question|answer" mode="xref-to">
<xsl:param name="referrer"/>
<xsl:param name="xrefstyle"/>
<xsl:apply-templates select="." mode="object.xref.markup">
<xsl:with-param name="purpose" select="'xref'"/>
<xsl:with-param name="xrefstyle" select="$xrefstyle"/>
<xsl:with-param name="referrer" select="$referrer"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="part|reference" mode="xref-to">
<xsl:param name="referrer"/>
<xsl:param name="xrefstyle"/>
<xsl:apply-templates select="." mode="object.xref.markup">
<xsl:with-param name="purpose" select="'xref'"/>
<xsl:with-param name="xrefstyle" select="$xrefstyle"/>
<xsl:with-param name="referrer" select="$referrer"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="refentry" mode="xref-to">
<xsl:param name="referrer"/>
<xsl:param name="xrefstyle"/>
<xsl:choose>
<xsl:when test="refmeta/refentrytitle">
<xsl:apply-templates select="refmeta/refentrytitle"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="refnamediv/refname[1]"/>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates select="refmeta/manvolnum"/>
</xsl:template>
<xsl:template match="refnamediv" mode="xref-to">
<xsl:param name="referrer"/>
<xsl:param name="xrefstyle"/>
<xsl:apply-templates select="refname[1]" mode="xref-to">
<xsl:with-param name="xrefstyle" select="$xrefstyle"/>
<xsl:with-param name="referrer" select="$referrer"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="refname" mode="xref-to">
<xsl:param name="referrer"/>
<xsl:param name="xrefstyle"/>
<xsl:apply-templates mode="xref-to">
<xsl:with-param name="xrefstyle" select="$xrefstyle"/>
<xsl:with-param name="referrer" select="$referrer"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="step" mode="xref-to">
<xsl:param name="referrer"/>
<xsl:param name="xrefstyle"/>
<xsl:call-template name="gentext">
<xsl:with-param name="key" select="'Step'"/>
</xsl:call-template>
<xsl:text> </xsl:text>
<xsl:apply-templates select="." mode="number"/>
</xsl:template>
<xsl:template match="varlistentry" mode="xref-to">
<xsl:param name="referrer"/>
<xsl:param name="xrefstyle"/>
<xsl:apply-templates select="term[1]" mode="xref-to">
<xsl:with-param name="xrefstyle" select="$xrefstyle"/>
<xsl:with-param name="referrer" select="$referrer"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="varlistentry/term" mode="xref-to">
<!-- to avoid the comma that will be generated if there are several terms -->
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="co" mode="xref-to">
<xsl:param name="referrer"/>
<xsl:param name="xrefstyle"/>
<xsl:apply-templates select="." mode="callout-bug"/>
</xsl:template>
<xsl:template match="book" mode="xref-to">
<xsl:param name="referrer"/>
<xsl:param name="xrefstyle"/>
<xsl:apply-templates select="." mode="object.xref.markup">
<xsl:with-param name="purpose" select="'xref'"/>
<xsl:with-param name="xrefstyle" select="$xrefstyle"/>
<xsl:with-param name="referrer" select="$referrer"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="para" mode="xref-to">
<xsl:param name="referrer"/>
<xsl:param name="xrefstyle"/>
<xsl:variable name="context" select="(ancestor::simplesect
|ancestor::section
|ancestor::sect1
|ancestor::sect2
|ancestor::sect3
|ancestor::sect4
|ancestor::sect5
|ancestor::refsection
|ancestor::refsect1
|ancestor::refsect2
|ancestor::refsect3
|ancestor::chapter
|ancestor::appendix
|ancestor::preface
|ancestor::partintro
|ancestor::dedication
|ancestor::colophon
|ancestor::bibliography
|ancestor::index
|ancestor::glossary
|ancestor::glossentry
|ancestor::listitem
|ancestor::varlistentry)[last()]"/>
<xsl:apply-templates select="$context" mode="xref-to"/>
<!--
<xsl:apply-templates select="." mode="object.xref.markup">
<xsl:with-param name="purpose" select="'xref'"/>
<xsl:with-param name="xrefstyle" select="$xrefstyle"/>
<xsl:with-param name="referrer" select="$referrer"/>
</xsl:apply-templates>
-->
</xsl:template>
<!-- ==================================================================== -->
<xsl:template match="link" name="link">
<xsl:variable name="targets" select="key('id',@linkend)"/>
<xsl:variable name="target" select="$targets[1]"/>
<xsl:call-template name="check.id.unique">
<xsl:with-param name="linkend" select="@linkend"/>
</xsl:call-template>
<fo:basic-link internal-destination="{@linkend}"
xsl:use-attribute-sets="xref.properties">
<xsl:choose>
<xsl:when test="count(child::node()) > 0">
<!-- If it has content, use it -->
<xsl:apply-templates/>
</xsl:when>
<xsl:otherwise>
<!-- else look for an endterm -->
<xsl:choose>
<xsl:when test="@endterm">
<xsl:variable name="etargets" select="key('id',@endterm)"/>
<xsl:variable name="etarget" select="$etargets[1]"/>
<xsl:choose>
<xsl:when test="count($etarget) = 0">
<xsl:message>
<xsl:value-of select="count($etargets)"/>
<xsl:text>Endterm points to nonexistent ID: </xsl:text>
<xsl:value-of select="@endterm"/>
</xsl:message>
<xsl:text>???</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="$etarget" mode="endterm"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:message>
<xsl:text>Link element has no content and no Endterm. </xsl:text>
<xsl:text>Nothing to show in the link to </xsl:text>
<xsl:value-of select="$target"/>
</xsl:message>
<xsl:text>???</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</fo:basic-link>
</xsl:template>
<xsl:template match="ulink" name="ulink">
<fo:basic-link xsl:use-attribute-sets="xref.properties">
<xsl:attribute name="external-destination">
<xsl:call-template name="fo-external-image">
<xsl:with-param name="filename" select="@url"/>
</xsl:call-template>
</xsl:attribute>
<xsl:choose>
<xsl:when test="count(child::node())=0">
<xsl:call-template name="hyphenate-url">
<xsl:with-param name="url" select="@url"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
</fo:basic-link>
<xsl:if test="count(child::node()) != 0
and string(.) != @url
and $ulink.show != 0">
<!-- yes, show the URI -->
<xsl:choose>
<xsl:when test="$ulink.footnotes != 0 and not(ancestor::footnote)">
<xsl:text> </xsl:text>
<fo:footnote>
<xsl:call-template name="ulink.footnote.number"/>
<fo:footnote-body font-family="{$body.fontset}"
font-size="{$footnote.font.size}">
<fo:block>
<xsl:call-template name="ulink.footnote.number"/>
<xsl:text> </xsl:text>
<fo:inline>
<xsl:value-of select="@url"/>
</fo:inline>
</fo:block>
</fo:footnote-body>
</fo:footnote>
</xsl:when>
<xsl:otherwise>
<fo:inline hyphenate="false">
<xsl:text> [</xsl:text>
<xsl:call-template name="hyphenate-url">
<xsl:with-param name="url" select="@url"/>
</xsl:call-template>
<xsl:text>]</xsl:text>
</fo:inline>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:template>
<xsl:template name="ulink.footnote.number">
<fo:inline font-size="90%">
<!-- FIXME: this isn't going to be perfect! -->
<xsl:text>[</xsl:text>
<xsl:number level="any"
from="chapter|appendix|preface|article|refentry"
format="{$ulink.footnote.number.format}"/>
<xsl:text>]</xsl:text>
</fo:inline>
</xsl:template>
<xsl:template name="hyphenate-url">
<xsl:param name="url" select="''"/>
<xsl:choose>
<xsl:when test="$ulink.hyphenate = ''">
<xsl:value-of select="$url"/>
</xsl:when>
<xsl:when test="contains($url, '/')">
<xsl:value-of select="substring-before($url, '/')"/>
<xsl:text>/</xsl:text>
<xsl:copy-of select="$ulink.hyphenate"/>
<xsl:call-template name="hyphenate-url">
<xsl:with-param name="url" select="substring-after($url, '/')"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$url"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="olink">
<xsl:param name="target.database"
select="document($target.database.document, /)"/>
<xsl:variable name="localinfo" select="@localinfo"/>
<!-- Olink that points to internal id can be a link -->
<xsl:variable name="linkend">
<xsl:choose>
<xsl:when test="@targetdoc and not(@targetptr)" >
<xsl:message>Olink missing @targetptr attribute value</xsl:message>
</xsl:when>
<xsl:when test="not(@targetdoc) and @targetptr" >
<xsl:message>Olink missing @targetdoc attribute value</xsl:message>
</xsl:when>
<xsl:when test="@targetdoc and @targetptr">
<xsl:if test="$current.docid = @targetdoc">
<xsl:if test="id(@targetptr)">
<xsl:value-of select="@targetptr"/>
</xsl:if>
</xsl:if>
</xsl:when>
</xsl:choose>
</xsl:variable>
<xsl:choose>
<xsl:when test="$linkend != ''">
<fo:basic-link internal-destination="{$linkend}"
xsl:use-attribute-sets="xref.properties">
<xsl:call-template name="olink.hottext">
<xsl:with-param name="target.database" select="$target.database"/>
</xsl:call-template>
</fo:basic-link>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="olink.hottext">
<xsl:with-param name="target.database" select="$target.database"/>
</xsl:call-template>
<!-- Append other document title if appropriate -->
<xsl:if test="@targetdoc and @targetptr and $olink.doctitle != 0
and $current.docid != '' and $current.docid != @targetdoc">
<xsl:variable name="doctitle">
<xsl:variable name="seek.targetdoc" select="@targetdoc"/>
<xsl:for-each select="$target.database" >
<xsl:value-of select="key('targetdoc-key', $seek.targetdoc)/div[1]/ttl" />
</xsl:for-each>
</xsl:variable>
<xsl:if test="$doctitle != ''">
<xsl:text> (</xsl:text><xsl:value-of select="$doctitle"/><xsl:text>)</xsl:text>
</xsl:if>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="olink.hottext">
<xsl:param name="target.database"/>
<xsl:choose>
<!-- If it has elements or text (not just PI or comment) -->
<xsl:when test="child::text() or child::*">
<xsl:apply-templates/>
</xsl:when>
<xsl:when test="@targetdoc and @targetptr">
<!-- Get the xref text for this record -->
<xsl:variable name="seek.targetdoc" select="@targetdoc"/>
<xsl:variable name="seek.targetptr" select="@targetptr"/>
<xsl:variable name="xref.text" >
<xsl:for-each select="$target.database" >
<xsl:value-of select="key('targetptr-key', concat($seek.targetdoc, '/', $seek.targetptr))/xreftext"/>
</xsl:for-each>
</xsl:variable>
<xsl:choose>
<xsl:when test="$use.local.olink.style != 0">
<!-- Get the element name and lang for this targetptr -->
<xsl:variable name="element" >
<xsl:for-each select="$target.database" >
<xsl:value-of select="key('targetptr-key', concat($seek.targetdoc, '/', $seek.targetptr))/@element"/>
</xsl:for-each>
</xsl:variable>
<xsl:variable name="lang">
<xsl:variable name="candidate">
<xsl:for-each select="$target.database" >
<xsl:value-of select="key('targetptr-key', concat($seek.targetdoc, '/', $seek.targetptr))/@lang"/>
</xsl:for-each>
</xsl:variable>
<xsl:choose>
<xsl:when test="$candidate != ''">
<xsl:value-of select="$candidate"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="'en'"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="template">
<xsl:call-template name="gentext.template">
<xsl:with-param name="context" select="'title'"/>
<xsl:with-param name="name" select="$element"/>
<xsl:with-param name="lang" select="$lang"/>
</xsl:call-template>
</xsl:variable>
<xsl:call-template name="substitute-markup">
<xsl:with-param name="template" select="$template"/>
<xsl:with-param name="title">
<xsl:for-each select="$target.database" >
<xsl:value-of select="key('targetptr-key', concat($seek.targetdoc, '/', $seek.targetptr))/ttl"/>
</xsl:for-each>
</xsl:with-param>
<xsl:with-param name="label">
<xsl:for-each select="$target.database" >
<xsl:value-of select="key('targetptr-key', concat($seek.targetdoc, '/', $seek.targetptr))/@number"/>
</xsl:for-each>
</xsl:with-param>
</xsl:call-template>
</xsl:when>
<xsl:when test="$xref.text !=''">
<xsl:value-of select="$xref.text"/>
</xsl:when>
<xsl:otherwise>
<xsl:message>Olink error: no generated text for targetdoc/targetptr = <xsl:value-of select="@targetdoc"/>/<xsl:value-of select="@targetptr"/></xsl:message>
<xsl:text>????</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<xsl:text>????</xsl:text>
<!--
<xsl:call-template name="olink.outline">
<xsl:with-param name="outline.base.uri"
select="unparsed-entity-uri(@targetdocent)"/>
<xsl:with-param name="localinfo" select="@localinfo"/>
<xsl:with-param name="return" select="'xreftext'"/>
</xsl:call-template>
-->
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="olink.outline">
<xsl:message terminate="yes">Fatal error: what is this supposed to do?</xsl:message>
</xsl:template>
<!-- ==================================================================== -->
<xsl:template name="title.xref">
<xsl:param name="target" select="."/>
<xsl:choose>
<xsl:when test="local-name($target) = 'figure'
or local-name($target) = 'example'
or local-name($target) = 'equation'
or local-name($target) = 'table'
or local-name($target) = 'dedication'
or local-name($target) = 'preface'
or local-name($target) = 'bibliography'
or local-name($target) = 'glossary'
or local-name($target) = 'index'
or local-name($target) = 'setindex'
or local-name($target) = 'colophon'">
<xsl:call-template name="gentext.startquote"/>
<xsl:apply-templates select="$target" mode="title.markup"/>
<xsl:call-template name="gentext.endquote"/>
</xsl:when>
<xsl:otherwise>
<fo:inline font-style="italic">
<xsl:apply-templates select="$target" mode="title.markup"/>
</fo:inline>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="number.xref">
<xsl:param name="target" select="."/>
<xsl:apply-templates select="$target" mode="label.markup"/>
</xsl:template>
<!-- ==================================================================== -->
<xsl:template name="xref.xreflabel">
<!-- called to process an xreflabel...you might use this to make -->
<!-- xreflabels come out in the right font for different targets, -->
<!-- for example. -->
<xsl:param name="target" select="."/>
<xsl:value-of select="$target/@xreflabel"/>
</xsl:template>
<!-- ==================================================================== -->
<xsl:template match="title" mode="xref">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="command" mode="xref">
<xsl:call-template name="inline.boldseq"/>
</xsl:template>
<xsl:template match="function" mode="xref">
<xsl:call-template name="inline.monoseq"/>
</xsl:template>
<xsl:template match="*" mode="page.citation">
<xsl:param name="id" select="'???'"/>
<fo:inline keep-together.within-line="always">
<xsl:call-template name="substitute-markup">
<xsl:with-param name="template">
<xsl:call-template name="gentext.template">
<xsl:with-param name="name" select="'page.citation'"/>
<xsl:with-param name="context" select="'xref'"/>
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
</fo:inline>
</xsl:template>
<xsl:template match="*" mode="pagenumber.markup">
<fo:page-number-citation ref-id="{@id}"/>
</xsl:template>
<!-- ==================================================================== -->
<xsl:template match="*" mode="insert.title.markup">
<xsl:param name="purpose"/>
<xsl:param name="xrefstyle"/>
<xsl:param name="title"/>
<xsl:choose>
<!-- FIXME: what about the case where titleabbrev is inside the info? -->
<xsl:when test="$purpose = 'xref' and titleabbrev">
<xsl:apply-templates select="." mode="titleabbrev.markup"/>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="$title"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="chapter|appendix" mode="insert.title.markup">
<xsl:param name="purpose"/>
<xsl:param name="xrefstyle"/>
<xsl:param name="title"/>
<xsl:choose>
<xsl:when test="$purpose = 'xref'">
<fo:inline font-style="italic">
<xsl:copy-of select="$title"/>
</fo:inline>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="$title"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="*" mode="insert.subtitle.markup">
<xsl:param name="purpose"/>
<xsl:param name="xrefstyle"/>
<xsl:param name="subtitle"/>
<xsl:copy-of select="$subtitle"/>
</xsl:template>
<xsl:template match="*" mode="insert.label.markup">
<xsl:param name="purpose"/>
<xsl:param name="xrefstyle"/>
<xsl:param name="label"/>
<xsl:copy-of select="$label"/>
</xsl:template>
<xsl:template match="*" mode="insert.pagenumber.markup">
<xsl:param name="purpose"/>
<xsl:param name="xrefstyle"/>
<xsl:param name="pagenumber"/>
<xsl:copy-of select="$pagenumber"/>
</xsl:template>
<xsl:template match="*" mode="insert.direction.markup">
<xsl:param name="purpose"/>
<xsl:param name="xrefstyle"/>
<xsl:param name="direction"/>
<xsl:copy-of select="$direction"/>
</xsl:template>
</xsl:stylesheet>
|
{
"pile_set_name": "Github"
}
|
---
id: i18n
title: Internationalization
---
## Add a language
### Edit your bot configs
In the Admin section > Your bots > Configs

### Switch language
Go back to Studio and switch language

You'll see a "missing translation" notification on your content

### Translate your content
Edit the content and add a translation


## Change the language
Botpress use the browser language to detect the user language. This is stored in the `language` field of the user attributes. It is possible to change the language of a user by modifying this field.
See [updateAttributes](https://botpress.com/reference/modules/_botpress_sdk_.users.html#updateattributes)
Example usage:
```js
await bp.users.updateAttributes('web', 'someId', { language: 'fr' })
```
|
{
"pile_set_name": "Github"
}
|
<manifest package="com.eighteengray.imageprocesslibrary"
xmlns:android="http://schemas.android.com/apk/res/android"
android:installLocation="auto"
>
<application android:allowBackup="true"
android:label="@string/app_name"
android:supportsRtl="true"
>
<activity android:name=".cvdemo.camera.DisplayModeActivity"/>
<activity android:name=".cvdemo.camera.CameraViewActivity"/>
<activity android:name=".cvdemo.CVTestActivity"/>
</application>
</manifest>
|
{
"pile_set_name": "Github"
}
|
<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Create a numeric input control — numericInput • SHINY.SEMANTIC</title>
<!-- jquery -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<!-- Bootstrap -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.4.0/yeti/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.4.1/js/bootstrap.min.js" integrity="sha256-nuL8/2cJ5NDSSwnKD8VqreErSWHtnEP9E7AySL+1ev4=" crossorigin="anonymous"></script>
<!-- bootstrap-toc -->
<link rel="stylesheet" href="../bootstrap-toc.css">
<script src="../bootstrap-toc.js"></script>
<!-- Font Awesome icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/v4-shims.min.css" integrity="sha256-wZjR52fzng1pJHwx4aV2AO3yyTOXrcDW7jBpJtTwVxw=" crossorigin="anonymous" />
<!-- clipboard.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.6/clipboard.min.js" integrity="sha256-inc5kl9MA1hkeYUt+EC3BhlIgyp/2jDIyBLS6k3UxPI=" crossorigin="anonymous"></script>
<!-- headroom.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/headroom.min.js" integrity="sha256-AsUX4SJE1+yuDu5+mAVzJbuYNPHj/WroHuZ8Ir/CkE0=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/headroom/0.11.0/jQuery.headroom.min.js" integrity="sha256-ZX/yNShbjqsohH1k95liqY9Gd8uOiE1S4vZc+9KQ1K4=" crossorigin="anonymous"></script>
<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../pkgdown.js"></script>
<meta property="og:title" content="Create a numeric input control — numericInput" />
<meta property="og:description" content="Create a numeric input control" />
<!-- mathjax -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" integrity="sha256-nvJJv9wWKEm88qvoQl9ekL2J+k/RWIsaSScxxlsrv8k=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/config/TeX-AMS-MML_HTMLorMML.js" integrity="sha256-84DKXVJXs0/F8OTMzX4UR909+jtl4G7SPypPavF+GfA=" crossorigin="anonymous"></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body data-spy="scroll" data-target="#toc">
<div class="container template-reference-topic">
<header>
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand">
<a class="navbar-link" href="../index.html">SHINY.SEMANTIC</a>
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">0.3.1</span>
</span>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>
<a href="../index.html">
<span class="fa fa-home"></span>
Start
</a>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>
<a href="../reference/index.html">
<span class="fa fa-file-code-o"></span>
Functions
</a>
</li>
<li>
<a href="../CHANGELOG.html">
<span class="fa fa-newspaper-o"></span>
Changes
</a>
</li>
<li>
<a href="../CODE_OF_CONDUCT.html">
<span class="fa fa-user-o"></span>
CoC
</a>
</li>
<li>
<a href="https://github.com/Appsilon/shiny.semantic">
<span class="fa fa-github fa-lg"></span>
</a>
</li>
<li>
<a href="https://twitter.com/Appsilon">
<span class="fa fa-twitter fa-lg"></span>
</a>
</li>
</ul>
</div><!--/.nav-collapse -->
</div><!--/.container -->
</div><!--/.navbar -->
</header>
<div class="row">
<div class="col-md-9 contents">
<div class="page-header">
<h1>Create a numeric input control</h1>
<small class="dont-index">Source: <a href='https://github.com/Appsilon/shiny.semantic/blob/master/R/input.R'><code>R/input.R</code></a></small>
<div class="hidden name"><code>numericInput.Rd</code></div>
</div>
<div class="ref-description">
<p>Create a numeric input control</p>
</div>
<pre class="usage"><span class='fu'>numericInput</span>(
<span class='no'>inputId</span>,
<span class='no'>label</span>,
<span class='no'>value</span>,
<span class='kw'>min</span> <span class='kw'>=</span> <span class='fl'>NA</span>,
<span class='kw'>max</span> <span class='kw'>=</span> <span class='fl'>NA</span>,
<span class='kw'>step</span> <span class='kw'>=</span> <span class='fl'>NA</span>,
<span class='kw'>width</span> <span class='kw'>=</span> <span class='kw'>NULL</span>,
<span class='no'>...</span>
)</pre>
<h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a>Arguments</h2>
<table class="ref-arguments">
<colgroup><col class="name" /><col class="desc" /></colgroup>
<tr>
<th>inputId</th>
<td><p>The input slot that will be used to access the value.</p></td>
</tr>
<tr>
<th>label</th>
<td><p>Display label for the control, or NULL for no label.</p></td>
</tr>
<tr>
<th>value</th>
<td><p>Initial value of the numeric input.</p></td>
</tr>
<tr>
<th>min</th>
<td><p>Minimum allowed value.</p></td>
</tr>
<tr>
<th>max</th>
<td><p>Maximum allowed value.</p></td>
</tr>
<tr>
<th>step</th>
<td><p>Interval to use when stepping between min and max.</p></td>
</tr>
<tr>
<th>width</th>
<td><p>The width of the input.</p></td>
</tr>
<tr>
<th>...</th>
<td><p>Other parameters passed to <code><a href='numeric_input.html'>numeric_input</a></code> like <code>type</code> or <code>icon</code>.</p></td>
</tr>
</table>
</div>
<div class="col-md-3 hidden-xs hidden-sm" id="pkgdown-sidebar">
<nav id="toc" data-toggle="toc" class="sticky-top">
<h2 data-toc-skip>Contents</h2>
</nav>
</div>
</div>
<footer>
<div class="copyright">
<p>Developed by Filip Stachura, Krystian Igras, Adam Forys, Dominik Krzeminski.</p>
</div>
<div class="pkgdown">
<p>Site built with <a href="https://pkgdown.r-lib.org/">pkgdown</a> 1.5.1.</p>
</div>
</footer>
</div>
</body>
</html>
|
{
"pile_set_name": "Github"
}
|
<!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.6"/>
<title>libguac: Data Fields</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/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</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">libguac
 <span id="projectnumber">0.9.3</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<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 class="current"><a href="annotated.html"><span>Data Structures</span></a></li>
<li><a href="files.html"><span>Files</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>Data Structures</span></a></li>
<li class="current"><a href="functions.html"><span>Data Fields</span></a></li>
</ul>
</div>
<div id="navrow3" class="tabs2">
<ul class="tablist">
<li class="current"><a href="functions.html"><span>All</span></a></li>
<li><a href="functions_vars.html"><span>Variables</span></a></li>
</ul>
</div>
<div id="navrow4" class="tabs3">
<ul class="tablist">
<li><a href="#index_a"><span>a</span></a></li>
<li><a href="#index_b"><span>b</span></a></li>
<li><a href="#index_c"><span>c</span></a></li>
<li><a href="#index_d"><span>d</span></a></li>
<li><a href="#index_e"><span>e</span></a></li>
<li><a href="#index_f"><span>f</span></a></li>
<li><a href="#index_h"><span>h</span></a></li>
<li><a href="#index_i"><span>i</span></a></li>
<li><a href="#index_k"><span>k</span></a></li>
<li><a href="#index_l"><span>l</span></a></li>
<li><a href="#index_m"><span>m</span></a></li>
<li><a href="#index_o"><span>o</span></a></li>
<li><a href="#index_p"><span>p</span></a></li>
<li><a href="#index_r"><span>r</span></a></li>
<li><a href="#index_s"><span>s</span></a></li>
<li><a href="#index_u"><span>u</span></a></li>
<li><a href="#index_v"><span>v</span></a></li>
<li class="current"><a href="#index_w"><span>w</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)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Macros</a></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">
<div class="textblock">Here is a list of all documented struct and union fields with links to the struct/union documentation for each field:</div>
<h3><a class="anchor" id="index_a"></a>- a -</h3><ul>
<li>ack_handler
: <a class="el" href="structguac__client.html#ada98af16d05a257165080441ad13309a">guac_client</a>
, <a class="el" href="structguac__stream.html#a677e30a2082b332285b723c12c03cbda">guac_stream</a>
</li>
<li>active
: <a class="el" href="structguac__pool.html#ac22871d5c476ca9a6dd25a2446fa0fd3">guac_pool</a>
</li>
<li>argc
: <a class="el" href="structguac__instruction.html#a0745b07a905cd06a37b5e7614db32ec8">guac_instruction</a>
</li>
<li>args
: <a class="el" href="structguac__client__plugin.html#afdcc20662bdf6e448ebe55967331b79a">guac_client_plugin</a>
</li>
<li>argv
: <a class="el" href="structguac__instruction.html#ac3b766830d0b97dce75c5b488aca436c">guac_instruction</a>
</li>
<li>audio_mimetypes
: <a class="el" href="structguac__client__info.html#a662fb7d39af7bddcb2f5c83a6b54f923">guac_client_info</a>
</li>
</ul>
<h3><a class="anchor" id="index_b"></a>- b -</h3><ul>
<li>begin_handler
: <a class="el" href="structguac__audio__encoder.html#a43d161556d3d55031ea486cc8b4ce3f6">guac_audio_encoder</a>
</li>
<li>blob_handler
: <a class="el" href="structguac__client.html#ae394480f2509d5e2f3fa93a57db59ef6">guac_client</a>
, <a class="el" href="structguac__stream.html#a3392ef3fe5c37e2ae95140a1e171cee9">guac_stream</a>
</li>
<li>bps
: <a class="el" href="structguac__audio__stream.html#a1de1be8874fb844002b92ac1e3813866">guac_audio_stream</a>
</li>
</ul>
<h3><a class="anchor" id="index_c"></a>- c -</h3><ul>
<li>channels
: <a class="el" href="structguac__audio__stream.html#af9d1ad90194e24c2967e2f9f18de0ad6">guac_audio_stream</a>
</li>
<li>client
: <a class="el" href="structguac__audio__stream.html#a1771fa5ff88b8f5d4ca4cd5e77a1ffba">guac_audio_stream</a>
</li>
<li>clipboard_handler
: <a class="el" href="structguac__client.html#addf8b9aeb379e6132797f2b7000fb0d1">guac_client</a>
</li>
<li>connection_id
: <a class="el" href="structguac__client.html#ad38b9ded1f04bfe8eb235e551fc08094">guac_client</a>
</li>
</ul>
<h3><a class="anchor" id="index_d"></a>- d -</h3><ul>
<li>data
: <a class="el" href="structguac__audio__stream.html#a9ca03221b02d1206eb698f8ee936c4b7">guac_audio_stream</a>
, <a class="el" href="structguac__client.html#a0569bc7eea8d37b5bd95bcd3821ca0a3">guac_client</a>
, <a class="el" href="structguac__socket.html#ac8340e5627b43138bb50aac6c4368c0d">guac_socket</a>
, <a class="el" href="structguac__stream.html#acdf20063ca408431862d901c9445b429">guac_stream</a>
</li>
</ul>
<h3><a class="anchor" id="index_e"></a>- e -</h3><ul>
<li>encoded_data
: <a class="el" href="structguac__audio__stream.html#a4b58881fe297d3ccac941225e4ff2dd0">guac_audio_stream</a>
</li>
<li>encoded_data_length
: <a class="el" href="structguac__audio__stream.html#a91977a758f703f5b2a8e635f455a3407">guac_audio_stream</a>
</li>
<li>encoded_data_used
: <a class="el" href="structguac__audio__stream.html#ab0648dbc9e47b1d93939087acd0b5394">guac_audio_stream</a>
</li>
<li>encoder
: <a class="el" href="structguac__audio__stream.html#af3b4811ba5a4f1a337d338777fe9049d">guac_audio_stream</a>
</li>
<li>end_handler
: <a class="el" href="structguac__audio__encoder.html#a6fbc4f8efe14c9a119fdfaaef78f7e92">guac_audio_encoder</a>
, <a class="el" href="structguac__client.html#aae4631fe1d35e9ee2b494303921145dc">guac_client</a>
, <a class="el" href="structguac__stream.html#aabe2ae7142cb29070b5021dd3d4255f3">guac_stream</a>
</li>
</ul>
<h3><a class="anchor" id="index_f"></a>- f -</h3><ul>
<li>file_handler
: <a class="el" href="structguac__client.html#abc56a0e12d564843eee4723f82f3d2fc">guac_client</a>
</li>
<li>free_handler
: <a class="el" href="structguac__client.html#a79e29c931fd448cf51f7153fea064169">guac_client</a>
, <a class="el" href="structguac__socket.html#a1044cde496cfe11c914c623dc1e29678">guac_socket</a>
</li>
</ul>
<h3><a class="anchor" id="index_h"></a>- h -</h3><ul>
<li>handle_messages
: <a class="el" href="structguac__client.html#a75a6618618ff90b6ade14c750f7d3343">guac_client</a>
</li>
</ul>
<h3><a class="anchor" id="index_i"></a>- i -</h3><ul>
<li>index
: <a class="el" href="structguac__layer.html#a686a85d9d758ba5f2f4426a4c4ae13ba">guac_layer</a>
, <a class="el" href="structguac__stream.html#a487951c2cc77b2e1637e3aa0b5faaa60">guac_stream</a>
</li>
<li>info
: <a class="el" href="structguac__client.html#ab67a82a9f940360dac0ec0ca96d446cf">guac_client</a>
</li>
<li>init_handler
: <a class="el" href="structguac__client__plugin.html#af650493e50e6abd9b0bb33c917bd0b95">guac_client_plugin</a>
</li>
</ul>
<h3><a class="anchor" id="index_k"></a>- k -</h3><ul>
<li>key_handler
: <a class="el" href="structguac__client.html#ac0ed2c84d5aa62c435e8024310812259">guac_client</a>
</li>
</ul>
<h3><a class="anchor" id="index_l"></a>- l -</h3><ul>
<li>last_received_timestamp
: <a class="el" href="structguac__client.html#a3c8e4b4a92bdeaace0fa2dd32f956ab2">guac_client</a>
</li>
<li>last_sent_timestamp
: <a class="el" href="structguac__client.html#a0f3069566c7a5ca76ce4369715589dad">guac_client</a>
</li>
<li>last_write_timestamp
: <a class="el" href="structguac__socket.html#adf00e9c13ff3808fceb4c71c1172fb51">guac_socket</a>
</li>
<li>length
: <a class="el" href="structguac__audio__stream.html#ae5d8ebcf53b63fc827654fe4c970ff2d">guac_audio_stream</a>
</li>
<li>log_error_handler
: <a class="el" href="structguac__client.html#a59c74b12d77ead505b4e94ba169b2fdf">guac_client</a>
</li>
<li>log_info_handler
: <a class="el" href="structguac__client.html#a055d63be9770e614c7abb2dfc5a8fb0c">guac_client</a>
</li>
</ul>
<h3><a class="anchor" id="index_m"></a>- m -</h3><ul>
<li>mimetype
: <a class="el" href="structguac__audio__encoder.html#a51b8bfeae3709c1859710cbf1039e01b">guac_audio_encoder</a>
</li>
<li>min_size
: <a class="el" href="structguac__pool.html#a71ed274c2481dbcd5e06bf7d8d74d71e">guac_pool</a>
</li>
<li>mouse_handler
: <a class="el" href="structguac__client.html#a13f56570676f29a6f463e1542e156416">guac_client</a>
</li>
</ul>
<h3><a class="anchor" id="index_o"></a>- o -</h3><ul>
<li>opcode
: <a class="el" href="structguac__instruction.html#afe89ba323779cb1c6a68cf3fe9df73cc">guac_instruction</a>
</li>
<li>optimal_height
: <a class="el" href="structguac__client__info.html#a58c3084b5e6b40ad43956562764d8732">guac_client_info</a>
</li>
<li>optimal_resolution
: <a class="el" href="structguac__client__info.html#ae4ab77c47b095cf284971b0fe0fe69a5">guac_client_info</a>
</li>
<li>optimal_width
: <a class="el" href="structguac__client__info.html#aed4ddf74fa55fe039f38225c3373f25b">guac_client_info</a>
</li>
</ul>
<h3><a class="anchor" id="index_p"></a>- p -</h3><ul>
<li>pcm_bytes_written
: <a class="el" href="structguac__audio__stream.html#a3db3ad0af5385d4ea20daece3e4e6d05">guac_audio_stream</a>
</li>
<li>pcm_data
: <a class="el" href="structguac__audio__stream.html#a7cfb92e31f72f1748aa0b3611ffdb0c8">guac_audio_stream</a>
</li>
<li>pipe_handler
: <a class="el" href="structguac__client.html#acd62220caeae9c5da0291a30e29d5dfa">guac_client</a>
</li>
</ul>
<h3><a class="anchor" id="index_r"></a>- r -</h3><ul>
<li>rate
: <a class="el" href="structguac__audio__stream.html#a6810293a6fa915e497d2dd1a643993d9">guac_audio_stream</a>
</li>
<li>read_handler
: <a class="el" href="structguac__socket.html#a10042a8e591737aec8d4db5a3423b250">guac_socket</a>
</li>
</ul>
<h3><a class="anchor" id="index_s"></a>- s -</h3><ul>
<li>select_handler
: <a class="el" href="structguac__socket.html#ad29e7f8a6819ca7bb541e8a947d5bc4f">guac_socket</a>
</li>
<li>size_handler
: <a class="el" href="structguac__client.html#a9768d046d71ad0e81746fa0bffc08092">guac_client</a>
</li>
<li>socket
: <a class="el" href="structguac__client.html#aa634856fd3c522377ba7345f3308000e">guac_client</a>
</li>
<li>state
: <a class="el" href="structguac__client.html#acb3e3f5d0ce5726cdde768f97b473f53">guac_client</a>
, <a class="el" href="structguac__instruction.html#aad671813a07d6d94e9ca14123b7c985c">guac_instruction</a>
, <a class="el" href="structguac__socket.html#ac2d5236c7e570dfee207511241edaa9b">guac_socket</a>
</li>
<li>stream
: <a class="el" href="structguac__audio__stream.html#a4d8f5cfc70ec54b97ba0c4eea596f894">guac_audio_stream</a>
</li>
</ul>
<h3><a class="anchor" id="index_u"></a>- u -</h3><ul>
<li>used
: <a class="el" href="structguac__audio__stream.html#aa9580dff19ff2fd8bf3ac1069fdd8ca6">guac_audio_stream</a>
</li>
</ul>
<h3><a class="anchor" id="index_v"></a>- v -</h3><ul>
<li>value
: <a class="el" href="structguac__pool__int.html#af76ff5f21c6e0f69d95cdd1385ea24a4">guac_pool_int</a>
</li>
<li>video_mimetypes
: <a class="el" href="structguac__client__info.html#a8b5c9d593d6a6a5deaeadbe2973b9fe8">guac_client_info</a>
</li>
</ul>
<h3><a class="anchor" id="index_w"></a>- w -</h3><ul>
<li>write_handler
: <a class="el" href="structguac__audio__encoder.html#a1b74c3dd402b0a6afa5f5b9000d02c74">guac_audio_encoder</a>
, <a class="el" href="structguac__socket.html#a0f5f24200b0dad4ef1443b863d1bfc7d">guac_socket</a>
</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Sep 30 2014 00:05:02 for libguac by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
<!-- Google Analytics -->
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-75289145-1', 'auto');
ga('send', 'pageview');
</script>
<!-- End Google Analytics -->
</body>
</html>
|
{
"pile_set_name": "Github"
}
|
/**
* Loads a Wavefront .mtl file specifying materials
*
* @author angelxuanchang
*/
THREE.MTLLoader = function( baseUrl, options, crossOrigin ) {
this.baseUrl = baseUrl;
this.options = options;
this.crossOrigin = crossOrigin;
};
THREE.MTLLoader.prototype = {
constructor: THREE.MTLLoader,
load: function ( url, onLoad, onProgress, onError ) {
var scope = this;
var loader = new THREE.XHRLoader();
loader.setCrossOrigin( this.crossOrigin );
loader.load( url, function ( text ) {
onLoad( scope.parse( text ) );
}, onProgress, onError );
},
/**
* Parses loaded MTL file
* @param text - Content of MTL file
* @return {THREE.MTLLoader.MaterialCreator}
*/
parse: function ( text ) {
var lines = text.split( "\n" );
var info = {};
var delimiter_pattern = /\s+/;
var materialsInfo = {};
for ( var i = 0; i < lines.length; i ++ ) {
var line = lines[ i ];
line = line.trim();
if ( line.length === 0 || line.charAt( 0 ) === '#' ) {
// Blank line or comment ignore
continue;
}
var pos = line.indexOf( ' ' );
var key = ( pos >= 0 ) ? line.substring( 0, pos ) : line;
key = key.toLowerCase();
var value = ( pos >= 0 ) ? line.substring( pos + 1 ) : "";
value = value.trim();
if ( key === "newmtl" ) {
// New material
info = { name: value };
materialsInfo[ value ] = info;
} else if ( info ) {
if ( key === "ka" || key === "kd" || key === "ks" ) {
var ss = value.split( delimiter_pattern, 3 );
info[ key ] = [ parseFloat( ss[0] ), parseFloat( ss[1] ), parseFloat( ss[2] ) ];
} else {
info[ key ] = value;
}
}
}
var materialCreator = new THREE.MTLLoader.MaterialCreator( this.baseUrl, this.options );
materialCreator.setMaterials( materialsInfo );
return materialCreator;
}
};
/**
* Create a new THREE-MTLLoader.MaterialCreator
* @param baseUrl - Url relative to which textures are loaded
* @param options - Set of options on how to construct the materials
* side: Which side to apply the material
* THREE.FrontSide (default), THREE.BackSide, THREE.DoubleSide
* wrap: What type of wrapping to apply for textures
* THREE.RepeatWrapping (default), THREE.ClampToEdgeWrapping, THREE.MirroredRepeatWrapping
* normalizeRGB: RGBs need to be normalized to 0-1 from 0-255
* Default: false, assumed to be already normalized
* ignoreZeroRGBs: Ignore values of RGBs (Ka,Kd,Ks) that are all 0's
* Default: false
* invertTransparency: If transparency need to be inverted (inversion is needed if d = 0 is fully opaque)
* Default: false (d = 1 is fully opaque)
* @constructor
*/
THREE.MTLLoader.MaterialCreator = function( baseUrl, options ) {
this.baseUrl = baseUrl;
this.options = options;
this.materialsInfo = {};
this.materials = {};
this.materialsArray = [];
this.nameLookup = {};
this.side = ( this.options && this.options.side )? this.options.side: THREE.FrontSide;
this.wrap = ( this.options && this.options.wrap )? this.options.wrap: THREE.RepeatWrapping;
};
THREE.MTLLoader.MaterialCreator.prototype = {
constructor: THREE.MTLLoader.MaterialCreator,
setMaterials: function( materialsInfo ) {
this.materialsInfo = this.convert( materialsInfo );
this.materials = {};
this.materialsArray = [];
this.nameLookup = {};
},
convert: function( materialsInfo ) {
if ( !this.options ) return materialsInfo;
var converted = {};
for ( var mn in materialsInfo ) {
// Convert materials info into normalized form based on options
var mat = materialsInfo[ mn ];
var covmat = {};
converted[ mn ] = covmat;
for ( var prop in mat ) {
var save = true;
var value = mat[ prop ];
var lprop = prop.toLowerCase();
switch ( lprop ) {
case 'kd':
case 'ka':
case 'ks':
// Diffuse color (color under white light) using RGB values
if ( this.options && this.options.normalizeRGB ) {
value = [ value[ 0 ] / 255, value[ 1 ] / 255, value[ 2 ] / 255 ];
}
if ( this.options && this.options.ignoreZeroRGBs ) {
if ( value[ 0 ] === 0 && value[ 1 ] === 0 && value[ 1 ] === 0 ) {
// ignore
save = false;
}
}
break;
case 'd':
// According to MTL format (http://paulbourke.net/dataformats/mtl/):
// d is dissolve for current material
// factor of 1.0 is fully opaque, a factor of 0 is fully dissolved (completely transparent)
if ( this.options && this.options.invertTransparency ) {
value = 1 - value;
}
break;
default:
break;
}
if ( save ) {
covmat[ lprop ] = value;
}
}
}
return converted;
},
preload: function () {
for ( var mn in this.materialsInfo ) {
this.create( mn );
}
},
getIndex: function( materialName ) {
return this.nameLookup[ materialName ];
},
getAsArray: function() {
var index = 0;
for ( var mn in this.materialsInfo ) {
this.materialsArray[ index ] = this.create( mn );
this.nameLookup[ mn ] = index;
index ++;
}
return this.materialsArray;
},
create: function ( materialName ) {
if ( this.materials[ materialName ] === undefined ) {
this.createMaterial_( materialName );
}
return this.materials[ materialName ];
},
createMaterial_: function ( materialName ) {
// Create material
var mat = this.materialsInfo[ materialName ];
var params = {
name: materialName,
side: this.side
};
for ( var prop in mat ) {
var value = mat[ prop ];
switch ( prop.toLowerCase() ) {
// Ns is material specular exponent
case 'kd':
// Diffuse color (color under white light) using RGB values
params[ 'diffuse' ] = new THREE.Color().fromArray( value );
break;
case 'ka':
// Ambient color (color under shadow) using RGB values
params[ 'ambient' ] = new THREE.Color().fromArray( value );
break;
case 'ks':
// Specular color (color when light is reflected from shiny surface) using RGB values
params[ 'specular' ] = new THREE.Color().fromArray( value );
break;
case 'map_kd':
// Diffuse texture map
params[ 'map' ] = this.loadTexture( this.baseUrl + value );
params[ 'map' ].wrapS = this.wrap;
params[ 'map' ].wrapT = this.wrap;
break;
case 'ns':
// The specular exponent (defines the focus of the specular highlight)
// A high exponent results in a tight, concentrated highlight. Ns values normally range from 0 to 1000.
params['shininess'] = value;
break;
case 'd':
// According to MTL format (http://paulbourke.net/dataformats/mtl/):
// d is dissolve for current material
// factor of 1.0 is fully opaque, a factor of 0 is fully dissolved (completely transparent)
if ( value < 1 ) {
params['transparent'] = true;
params['opacity'] = value;
}
break;
default:
break;
}
}
if ( params[ 'diffuse' ] ) {
if ( !params[ 'ambient' ]) params[ 'ambient' ] = params[ 'diffuse' ];
params[ 'color' ] = params[ 'diffuse' ];
}
this.materials[ materialName ] = new THREE.MeshPhongMaterial( params );
return this.materials[ materialName ];
},
loadTexture: function ( url, mapping, onLoad, onError ) {
var texture;
var loader = THREE.Loader.Handlers.get( url );
if ( loader !== null ) {
texture = loader.load( url, onLoad );
} else {
texture = new THREE.Texture();
loader = new THREE.ImageLoader();
loader.crossOrigin = this.crossOrigin;
loader.load( url, function ( image ) {
texture.image = THREE.MTLLoader.ensurePowerOfTwo_( image );
texture.needsUpdate = true;
if ( onLoad ) onLoad( texture );
} );
}
texture.mapping = mapping;
return texture;
}
};
THREE.MTLLoader.ensurePowerOfTwo_ = function ( image ) {
if ( ! THREE.Math.isPowerOfTwo( image.width ) || ! THREE.Math.isPowerOfTwo( image.height ) ) {
var canvas = document.createElement( "canvas" );
canvas.width = THREE.MTLLoader.nextHighestPowerOfTwo_( image.width );
canvas.height = THREE.MTLLoader.nextHighestPowerOfTwo_( image.height );
var ctx = canvas.getContext("2d");
ctx.drawImage( image, 0, 0, image.width, image.height, 0, 0, canvas.width, canvas.height );
return canvas;
}
return image;
};
THREE.MTLLoader.nextHighestPowerOfTwo_ = function( x ) {
--x;
for ( var i = 1; i < 32; i <<= 1 ) {
x = x | x >> i;
}
return x + 1;
};
THREE.EventDispatcher.prototype.apply( THREE.MTLLoader.prototype );
|
{
"pile_set_name": "Github"
}
|
var lodash = require('./lodash');
/**
* Creates a `lodash` object that wraps `value` with explicit method
* chaining enabled.
*
* @static
* @memberOf _
* @category Chain
* @param {*} value The value to wrap.
* @returns {Object} Returns the new `lodash` wrapper instance.
* @example
*
* var users = [
* { 'user': 'barney', 'age': 36 },
* { 'user': 'fred', 'age': 40 },
* { 'user': 'pebbles', 'age': 1 }
* ];
*
* var youngest = _.chain(users)
* .sortBy('age')
* .map(function(chr) {
* return chr.user + ' is ' + chr.age;
* })
* .first()
* .value();
* // => 'pebbles is 1'
*/
function chain(value) {
var result = lodash(value);
result.__chain__ = true;
return result;
}
module.exports = chain;
|
{
"pile_set_name": "Github"
}
|
<div {!! $attributes !!}>
@if ($visibled)
@if (!empty($value))
<a href="{{ $value }}" data-toggle="lightbox">
<img class="thumbnail" src="{{ $value }}">
</a>
@endif
{!! $append !!}
@if($small)
<small class="clearfix">{!! $small !!}</small>
@endif
@endif
</div>
|
{
"pile_set_name": "Github"
}
|
"use strict";
var isImplemented = require("../../../../string/#/@@iterator/is-implemented");
module.exports = function (a) {
a(isImplemented(), true);
};
|
{
"pile_set_name": "Github"
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.