text
stringlengths 2
14k
| meta
dict |
|---|---|
<ul>
<li>br</li>
<li>em</li>
<li>strong</li>
<li>code</li>
<li>a</li>
<li>img</li>
<li>hr</li>
<li>ul, ol</li>
<li>pre</li>
<li>div</li>
<li>p</li>
<li>blockquote</li>
<li>h1 ~ h6</li>
</ul>
|
{
"pile_set_name": "Github"
}
|
export class KeyboardControls {
constructor(visualizer, bindings) {
this.visualizer = visualizer;
this.keyState = {};
this.keyBindings = bindings;
this.el = null;
this._onKeyUp = null;
this._onKeyDown = null;
}
attach(el) {
if (!el) el = document.body;
this.el = el;
// Make element focusable
el.querySelector("canvas").setAttribute("tabindex", 0);
this._onKeyUp = (e) => {
if (document.activeElement.tagName == "INPUT") return;
if (typeof this.keyBindings[e.code] !== "undefined") {
const event = this.keyBindings[e.code];
if (typeof event === "function") {
event();
}
else {
this.keyState[event] = false;
if (!this.visualizer.isPlaying() &&
Object.values(this.keyState).every((v) => !v)) {
}
}
e.preventDefault();
}
};
this._onKeyDown = (e) => {
if (document.activeElement.tagName == "INPUT") return;
if (typeof this.keyBindings[e.code] !== "undefined") {
const event = this.keyBindings[e.code];
if (typeof event !== "function") {
this.keyState[event] = true;
if (!this.visualizer.isPlaying()) {
// Run the Pixi event loop while keys are down
this.visualizer.application.start();
}
}
e.preventDefault();
}
};
el.addEventListener("keyup", this._onKeyUp);
el.addEventListener("keydown", this._onKeyDown);
}
destroy() {
this.el.removeEventListener("keyup", this._onKeyUp);
this.el.removeEventListener("keydown", this._onKeyDown);
this.visualizer = null;
}
handleKeys(dt) {
dt *= this.visualizer.timeStep * this.visualizer.scrubSpeed * 50;
if (this.keyState["scrubBackwards"]) {
this.visualizer.pause();
this.visualizer.advanceTime(-dt);
this.visualizer.render();
}
else if (this.keyState["scrubForwards"]) {
this.visualizer.pause();
this.visualizer.advanceTime(dt);
this.visualizer.render(dt);
}
if (this.keyState["panUp"]) {
this.visualizer.camera.panBy(0, 1);
}
else if (this.keyState["panDown"]) {
this.visualizer.camera.panBy(0, -1);
}
if (this.keyState["panLeft"]) {
this.visualizer.camera.panBy(1, 0);
}
else if (this.keyState["panRight"]) {
this.visualizer.camera.panBy(-1, 0);
}
if (this.keyState["zoomIn"]) {
this.visualizer.camera.zoomBy(0.5, 0.5, dt);
}
else if (this.keyState["zoomOut"]) {
this.visualizer.camera.zoomBy(0.5, 0.5, -dt);
}
}
}
|
{
"pile_set_name": "Github"
}
|
export function union<T>(...sets: Set<T>[]): Set<T> {
const result = new Set<T>()
for (const set of sets) {
for (const item of set) {
result.add(item)
}
}
return result
}
export function intersection<T>(set: Set<T>, ...sets: Set<T>[]): Set<T> {
const result = new Set<T>()
top: for (const item of set) {
for (const other of sets) {
if (!other.has(item))
continue top
}
result.add(item)
}
return result
}
export function difference<T>(set: Set<T>, ...sets: Set<T>[]): Set<T> {
const result = new Set<T>(set)
for (const item of union(...sets)) {
result.delete(item)
}
return result
}
|
{
"pile_set_name": "Github"
}
|
/*
* Copyright 2010-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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.
*/
package com.amazonaws.services.rekognition.model.transform;
import com.amazonaws.services.rekognition.model.*;
import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*;
import com.amazonaws.transform.*;
import com.amazonaws.util.json.AwsJsonReader;
/**
* JSON unmarshaller for POJO Emotion
*/
class EmotionJsonUnmarshaller implements Unmarshaller<Emotion, JsonUnmarshallerContext> {
public Emotion unmarshall(JsonUnmarshallerContext context) throws Exception {
AwsJsonReader reader = context.getReader();
if (!reader.isContainer()) {
reader.skipValue();
return null;
}
Emotion emotion = new Emotion();
reader.beginObject();
while (reader.hasNext()) {
String name = reader.nextName();
if (name.equals("Type")) {
emotion.setType(StringJsonUnmarshaller.getInstance()
.unmarshall(context));
} else if (name.equals("Confidence")) {
emotion.setConfidence(FloatJsonUnmarshaller.getInstance()
.unmarshall(context));
} else {
reader.skipValue();
}
}
reader.endObject();
return emotion;
}
private static EmotionJsonUnmarshaller instance;
public static EmotionJsonUnmarshaller getInstance() {
if (instance == null)
instance = new EmotionJsonUnmarshaller();
return instance;
}
}
|
{
"pile_set_name": "Github"
}
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE122_Heap_Based_Buffer_Overflow__c_CWE805_wchar_t_snprintf_53a.c
Label Definition File: CWE122_Heap_Based_Buffer_Overflow__c_CWE805.string.label.xml
Template File: sources-sink-53a.tmpl.c
*/
/*
* @description
* CWE: 122 Heap Based Buffer Overflow
* BadSource: Allocate using malloc() and set data pointer to a small buffer
* GoodSource: Allocate using malloc() and set data pointer to a large buffer
* Sink: snprintf
* BadSink : Copy string to data using snprintf
* Flow Variant: 53 Data flow: data passed as an argument from one function through two others to a fourth; all four functions are in different source files
*
* */
#include "std_testcase.h"
#include <wchar.h>
#ifdef _WIN32
#define SNPRINTF _snwprintf
#else
#define SNPRINTF snprintf
#endif
#ifndef OMITBAD
/* bad function declaration */
void CWE122_Heap_Based_Buffer_Overflow__c_CWE805_wchar_t_snprintf_53b_badSink(wchar_t * data);
void CWE122_Heap_Based_Buffer_Overflow__c_CWE805_wchar_t_snprintf_53_bad()
{
wchar_t * data;
data = NULL;
/* FLAW: Allocate and point data to a small buffer that is smaller than the large buffer used in the sinks */
data = (wchar_t *)malloc(50*sizeof(wchar_t));
data[0] = L'\0'; /* null terminate */
CWE122_Heap_Based_Buffer_Overflow__c_CWE805_wchar_t_snprintf_53b_badSink(data);
}
#endif /* OMITBAD */
#ifndef OMITGOOD
/* good function declaration */
void CWE122_Heap_Based_Buffer_Overflow__c_CWE805_wchar_t_snprintf_53b_goodG2BSink(wchar_t * data);
/* goodG2B uses the GoodSource with the BadSink */
static void goodG2B()
{
wchar_t * data;
data = NULL;
/* FIX: Allocate and point data to a large buffer that is at least as large as the large buffer used in the sink */
data = (wchar_t *)malloc(100*sizeof(wchar_t));
data[0] = L'\0'; /* null terminate */
CWE122_Heap_Based_Buffer_Overflow__c_CWE805_wchar_t_snprintf_53b_goodG2BSink(data);
}
void CWE122_Heap_Based_Buffer_Overflow__c_CWE805_wchar_t_snprintf_53_good()
{
goodG2B();
}
#endif /* OMITGOOD */
/* Below is the main(). It is only used when building this testcase on
* its own for testing or for building a binary to use in testing binary
* analysis tools. It is not used when compiling all the testcases as one
* application, which is how source code analysis tools are tested.
*/
#ifdef INCLUDEMAIN
int main(int argc, char * argv[])
{
/* seed randomness */
srand( (unsigned)time(NULL) );
#ifndef OMITGOOD
printLine("Calling good()...");
CWE122_Heap_Based_Buffer_Overflow__c_CWE805_wchar_t_snprintf_53_good();
printLine("Finished good()");
#endif /* OMITGOOD */
#ifndef OMITBAD
printLine("Calling bad()...");
CWE122_Heap_Based_Buffer_Overflow__c_CWE805_wchar_t_snprintf_53_bad();
printLine("Finished bad()");
#endif /* OMITBAD */
return 0;
}
#endif
|
{
"pile_set_name": "Github"
}
|
/*=============================================================================
Copyright (c) 2011 Eric Niebler
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(BOOST_FUSION_ACCUMULATE_FWD_HPP_INCLUDED)
#define BOOST_FUSION_ACCUMULATE_FWD_HPP_INCLUDED
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/support/is_sequence.hpp>
#include <boost/utility/enable_if.hpp>
namespace boost { namespace fusion
{
namespace result_of
{
template <typename Sequence, typename State, typename F>
struct accumulate;
}
template <typename Sequence, typename State, typename F>
BOOST_FUSION_GPU_ENABLED
typename
lazy_enable_if<
traits::is_sequence<Sequence>
, result_of::accumulate<Sequence, State const, F>
>::type
accumulate(Sequence& seq, State const& state, F f);
template <typename Sequence, typename State, typename F>
BOOST_FUSION_GPU_ENABLED
typename
lazy_enable_if<
traits::is_sequence<Sequence>
, result_of::accumulate<Sequence const, State const, F>
>::type
accumulate(Sequence const& seq, State const& state, F f);
}}
#endif
|
{
"pile_set_name": "Github"
}
|
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.
//
// You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
// copy, modify, and distribute this software in source code or binary form for use
// in connection with the web services and APIs provided by Facebook.
//
// As with any software that integrates with the Facebook platform, your use of
// this software is subject to the Facebook Developer Principles and Policies
// [http://developers.facebook.com/policy/]. This copyright notice shall be
// included in all copies or substantial portions of the software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
// @generated
//
"com_accountkit_account_verified" = "Korisnički račun potvrđen!";
"com_accountkit_button_begin" = "Započni";
"com_accountkit_button_cancel" = "Odustani";
"com_accountkit_button_confirm" = "Potvrdi";
"com_accountkit_button_continue" = "Nastavi";
"com_accountkit_button_edit" = "UREDI";
"com_accountkit_button_log_in" = "Prijavi se";
"com_accountkit_button_next" = "Dalje";
"com_accountkit_button_ok" = "U redu";
"com_accountkit_button_resend_code_in" = "Ponovo pošaljite SMS za %1$d";
"com_accountkit_button_resend_sms" = "Ponovo pošalji SMS";
"com_accountkit_button_send" = "Pošalji";
"com_accountkit_button_send_code_in_call" = "Primite poziv";
"com_accountkit_button_send_code_in_call_details" = "Preuzmite kôd u glasovnom pozivu";
"com_accountkit_button_send_code_in_call_from_facebook_details" = "Preuzmite kôd u glasovnom pozivu iz Facebooka";
"com_accountkit_button_send_code_in_fb" = "Preuzmite kôd na Facebooku";
"com_accountkit_button_send_code_in_fb_details" = "Kôd će stići u obliku obavijesti s Facebooka";
"com_accountkit_button_start" = "Početak";
"com_accountkit_button_start_over" = "Pokušajte ponovno";
"com_accountkit_button_submit" = "Pošalji";
"com_accountkit_check_email" = "Otvorite e-poštu";
"com_accountkit_code_sent_to" = "Potvrdite svoj broj mobitela %1$@";
"com_accountkit_confirmation_code_agreement" = "Dodirnite %1$@ za prihvaćanje Facebookovih <a href=\"%2$@\">Uvjeta</a>, <a href=\"%3$@\">Pravila o upotrebi podataka</a> te <a href=\"%4$@\">pravila o upotrebi kolačića</a>.";
"com_accountkit_confirmation_code_agreement_app_privacy_policy" = "Dodirnite %1$@ za prihvaćanje Facebookovih <a href=\"%2$@\">Uvjeta</a>, <a href=\"%3$@\">Pravila o upotrebi podataka</a>, <a href=\"%4$@\">pravila o upotrebi kolačića</a> i <a href=\"%5$@\">Pravila o zaštiti privatnosti</a> koje primjenjuje %6$@.";
"com_accountkit_confirmation_code_agreement_app_privacy_policy_and_terms" = "Dodirnite %1$@ za prihvaćanje Facebookovih <a href=\"%2$@\">Uvjeta</a>, <a href=\"%3$@\">Pravila o upotrebi podataka</a>, <a href=\"%4$@\">pravila o upotrebi kolačića</a> i <a href=\"%5$@\">Pravila o zaštiti privatnosti</a>, kao i <a href=\"%6$@\">Uvjeta pružanja usluge</a> koje primjenjuje %7$@.";
"com_accountkit_confirmation_code_agreement_app_privacy_policy_and_terms_instant_verification" = "Dodirnite %1$@ za prihvaćanje Facebookovih <a href=\"%2$@\">Uvjeta</a>, <a href=\"%3$@\">Pravila o upotrebi podataka</a>, <a href=\"%4$@\">pravila o upotrebi kolačića</a> te <a href=\"%5$@\">Pravila o zaštiti privatnosti</a> te <a href=\"%6$@\">Uvjeta pružanja usluge</a> koje primjenjuje %7$@. <a href=\"%8$@\">Saznajte više</a> o tome kako smo potvrdili vaš račun.";
"com_accountkit_confirmation_code_agreement_app_privacy_policy_instant_verification" = "Dodirnite %1$@ za prihvaćanje Facebookovih <a href=\"%2$@\">Uvjeta</a>, <a href=\"%3$@\">Pravila o upotrebi podataka</a>, <a href=\"%4$@\">pravila o upotrebi kolačića</a> te <a href=\"%5$@\">Pravila o zaštiti privatnosti</a> koje primjenjuje %6$@. <a href=\"%7$@\">Saznajte više</a> o tome kako smo potvrdili vaš račun.";
"com_accountkit_confirmation_code_agreement_instant_verification" = "Dodirnite %1$@ za prihvaćanje Facebookovih <a href=\"%2$@\">Uvjeta</a>, <a href=\"%3$@\">Pravila o upotrebi podataka</a> te <a href=\"%4$@\">pravila o upotrebi kolačića</a>. <a href=\"%5$@\">Saznajte više</a> o tome kako smo potvrdili vaš račun.";
"com_accountkit_confirmation_code_text" = "Nije mi stigao kôd";
"com_accountkit_confirmation_code_title" = "Unesite svoj kôd";
"com_accountkit_email_invalid" = "Adresa e-pošte nije točna. Pokušajte ponovo.";
"com_accountkit_email_loading_title" = "Potvrđujemo adresu e-pošte...";
"com_accountkit_email_login_retry_title" = "Potvrdite adresu e-pošte";
"com_accountkit_email_login_text" = "Dodirnite %1$@ kako biste dobili potvrdu putem e-pošte od Facebookova alata Account Kit i lakše upotrebljavali %2$@. Za to vam ne treba korisnički račun za Facebook. <a href=\"%3$@\">Saznajte kako se Facebook služi vašim podacima</a>.";
"com_accountkit_email_login_title" =
|
{
"pile_set_name": "Github"
}
|
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>JTabbedPane.ModelListener (Java SE 12 & JDK 12 )</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="keywords" content="javax.swing.JTabbedPane.ModelListener class">
<meta name="keywords" content="stateChanged()">
<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="JTabbedPane.ModelListener (Java SE 12 & JDK 12 )";
}
}
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="../../module-summary.html">Module</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/JTabbedPane.ModelListener.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><div style="margin-top: 14px;"><strong>Java SE 12 & JDK 12</strong> </div></div>
</div>
<div class="subNav">
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor.summary">Constr</a> | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor.detail">Constr</a> | </li>
<li>Method</li>
</ul>
</div>
<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>
<a id="skip.navbar.top">
<!-- -->
</a>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding"> </div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="moduleLabelInType">Module</span> <a href="../../module-summary.html">java.desktop</a></div>
<div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">javax.swing</a></div>
<h2 title="Class JTabbedPane.ModelListener" class="title">Class JTabbedPane.ModelListener</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="../../../java.base/java/lang/Object.html" title="class in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>javax.swing.JTabbedPane.ModelListener</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="../../../java.base/java/io/Serializable.html" title="interface in java.io">Serializable</a></code>, <code><a href="../../../java.base/java/util/EventListener.html" title="interface in java.util">EventListener</a></code>, <code><a href="event/ChangeListener.html" title="interface in javax.swing.event">ChangeListener</a></code></dd>
</dl>
<dl>
<dt>Enclosing class:</dt>
<dd><a href="JTabbedPane.html" title="class in javax.swing">JTabbedPane</a></dd>
</dl>
<hr>
<pre>protected class <span class="typeNameLabel">JTabbedPane.ModelListener</span>
extends <a href="../../../java.base/java/lang/Object.html" title="class in java.lang">Object</a>
implements <a href="event/ChangeListener.html" title="interface in javax.swing.event">ChangeListener</a>, <a href="../../../java.base/java/io/Serializable.html" title="interface in java.io">Serializable</a></pre>
<div class="block">We pass <code>ModelChanged</code> events along to the listeners with
the tabbedpane (instead of the model itself) as the event source.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<div class="memberSummary">
<table>
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier</th>
<th class="colSecond" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code>protected </code></td>
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">ModelListener</a></span>()</code></th>
<td class="colLast"> </td>
</tr>
</tbody>
</table
|
{
"pile_set_name": "Github"
}
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Copyright (C) Kongsberg Oil & Gas Technologies. All rights reserved.
;;; Written by mortene@sim.no, 2000-09-26.
;;; Eval following region
;; Make scene-graph and first viewer
(define text (new-sotext3))
(define interpolatefloat (new-sointerpolatefloat))
(-> (-> text 'string) 'connectFrom (-> interpolatefloat 'output))
(define viewer (new-soxtexaminerviewer))
(-> viewer 'setscenegraph text)
(-> viewer 'show)
;;; End initial eval-region
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;; Test input fields of SoInterpolateFloat engine, play around ;;;;;;;;;;;;
(set-mfield-values! (-> interpolatefloat 'input0) 0 '(0 1 2 3))
(set-mfield-values! (-> interpolatefloat 'input1) 0 '(1 2 0 3))
(-> (-> interpolatefloat 'alpha) 'setvalue 0.1)
;; Copy the scenegraph.
(define viewer-copy (new-soxtexaminerviewer))
(-> viewer-copy 'setscenegraph (-> (-> viewer 'getscenegraph) 'copy 1))
(-> viewer-copy 'show)
;; Export scenegraph with engine.
(define writeaction (new-sowriteaction))
(-> writeaction 'apply (-> viewer 'getscenegraph))
;; Read scenegraph with engine in it.
(let ((buffer "#Inventor V2.1 ascii\n\n Text3 { string \"\" = InterpolateFloat { alpha 0.7 input0 [ 0, 1 ] input1 [ 2, 3] } . output }")
(input (new-soinput)))
(-> input 'setbuffer (void-cast buffer) (string-length buffer))
(let ((sceneroot (sodb::readall input)))
(-> viewer 'setscenegraph sceneroot)
(-> viewer 'viewall)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;; Confirmed and potential bugs. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;; Fixed bugs and false alarms (ex-possible bugs) ;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;; scratch area ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(-> (-> text 'justification) 'setValue SoText3::CENTER)
(-> (-> text 'parts) 'setValue SoText3::ALL)
(-> (-> text 'string) 'disconnect)
(-> viewer 'viewAll)
|
{
"pile_set_name": "Github"
}
|
// SPDX-License-Identifier: GPL-2.0
#include <sys/types.h>
#include <errno.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <regex.h>
#include "../../../util/debug.h"
#include "../../../util/header.h"
static inline void
cpuid(unsigned int op, unsigned int *a, unsigned int *b, unsigned int *c,
unsigned int *d)
{
__asm__ __volatile__ (".byte 0x53\n\tcpuid\n\t"
"movl %%ebx, %%esi\n\t.byte 0x5b"
: "=a" (*a),
"=S" (*b),
"=c" (*c),
"=d" (*d)
: "a" (op));
}
static int
__get_cpuid(char *buffer, size_t sz, const char *fmt)
{
unsigned int a, b, c, d, lvl;
int family = -1, model = -1, step = -1;
int nb;
char vendor[16];
cpuid(0, &lvl, &b, &c, &d);
strncpy(&vendor[0], (char *)(&b), 4);
strncpy(&vendor[4], (char *)(&d), 4);
strncpy(&vendor[8], (char *)(&c), 4);
vendor[12] = '\0';
if (lvl >= 1) {
cpuid(1, &a, &b, &c, &d);
family = (a >> 8) & 0xf; /* bits 11 - 8 */
model = (a >> 4) & 0xf; /* Bits 7 - 4 */
step = a & 0xf;
/* extended family */
if (family == 0xf)
family += (a >> 20) & 0xff;
/* extended model */
if (family >= 0x6)
model += ((a >> 16) & 0xf) << 4;
}
nb = scnprintf(buffer, sz, fmt, vendor, family, model, step);
/* look for end marker to ensure the entire data fit */
if (strchr(buffer, '$')) {
buffer[nb-1] = '\0';
return 0;
}
return ENOBUFS;
}
int
get_cpuid(char *buffer, size_t sz)
{
return __get_cpuid(buffer, sz, "%s,%u,%u,%u$");
}
char *
get_cpuid_str(struct perf_pmu *pmu __maybe_unused)
{
char *buf = malloc(128);
if (buf && __get_cpuid(buf, 128, "%s-%u-%X-%X$") < 0) {
free(buf);
return NULL;
}
return buf;
}
/* Full CPUID format for x86 is vendor-family-model-stepping */
static bool is_full_cpuid(const char *id)
{
const char *tmp = id;
int count = 0;
while ((tmp = strchr(tmp, '-')) != NULL) {
count++;
tmp++;
}
if (count == 3)
return true;
return false;
}
int strcmp_cpuid_str(const char *mapcpuid, const char *id)
{
regex_t re;
regmatch_t pmatch[1];
int match;
bool full_mapcpuid = is_full_cpuid(mapcpuid);
bool full_cpuid = is_full_cpuid(id);
/*
* Full CPUID format is required to identify a platform.
* Error out if the cpuid string is incomplete.
*/
if (full_mapcpuid && !full_cpuid) {
pr_info("Invalid CPUID %s. Full CPUID is required, "
"vendor-family-model-stepping\n", id);
return 1;
}
if (regcomp(&re, mapcpuid, REG_EXTENDED) != 0) {
/* Warn unable to generate match particular string. */
pr_info("Invalid regular expression %s\n", mapcpuid);
return 1;
}
match = !regexec(&re, id, 1, pmatch, 0);
regfree(&re);
if (match) {
size_t match_len = (pmatch[0].rm_eo - pmatch[0].rm_so);
size_t cpuid_len;
/* If the full CPUID format isn't required,
* ignoring the stepping.
*/
if (!full_mapcpuid && full_cpuid)
cpuid_len = strrchr(id, '-') - id;
else
cpuid_len = strlen(id);
/* Verify the entire string matched. */
if (match_len == cpuid_len)
return 0;
}
return 1;
}
|
{
"pile_set_name": "Github"
}
|
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
FOUNDATION_EXPORT double QuickLayoutVersionNumber;
FOUNDATION_EXPORT const unsigned char QuickLayoutVersionString[];
|
{
"pile_set_name": "Github"
}
|
//
// Deprecated.swift
// RxDataSources
//
// Created by Krunoslav Zaher on 10/8/17.
// Copyright © 2017 kzaher. All rights reserved.
//
#if os(iOS) || os(tvOS)
extension CollectionViewSectionedDataSource {
@available(*, deprecated, renamed: "configureSupplementaryView")
public var supplementaryViewFactory: ConfigureSupplementaryView? {
get {
return self.configureSupplementaryView
}
set {
self.configureSupplementaryView = newValue
}
}
}
#endif
|
{
"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"};
$provide.value("$locale", {
"DATETIME_FORMATS": {
"AMPMS": [
"AM",
"PM"
],
"DAY": [
"dimanche",
"lundi",
"mardi",
"mercredi",
"jeudi",
"vendredi",
"samedi"
],
"ERANAMES": [
"avant J\u00e9sus-Christ",
"apr\u00e8s J\u00e9sus-Christ"
],
"ERAS": [
"av. J.-C.",
"ap. J.-C."
],
"FIRSTDAYOFWEEK": 0,
"MONTH": [
"janvier",
"f\u00e9vrier",
"mars",
"avril",
"mai",
"juin",
"juillet",
"ao\u00fbt",
"septembre",
"octobre",
"novembre",
"d\u00e9cembre"
],
"SHORTDAY": [
"dim.",
"lun.",
"mar.",
"mer.",
"jeu.",
"ven.",
"sam."
],
"SHORTMONTH": [
"janv.",
"f\u00e9vr.",
"mars",
"avr.",
"mai",
"juin",
"juil.",
"ao\u00fbt",
"sept.",
"oct.",
"nov.",
"d\u00e9c."
],
"STANDALONEMONTH": [
"janvier",
"f\u00e9vrier",
"mars",
"avril",
"mai",
"juin",
"juillet",
"ao\u00fbt",
"septembre",
"octobre",
"novembre",
"d\u00e9cembre"
],
"WEEKENDRANGE": [
5,
6
],
"fullDate": "EEEE d MMMM y",
"longDate": "d MMMM y",
"medium": "d MMM y HH:mm:ss",
"mediumDate": "d MMM y",
"mediumTime": "HH:mm:ss",
"short": "dd/MM/y HH:mm",
"shortDate": "dd/MM/y",
"shortTime": "HH:mm"
},
"NUMBER_FORMATS": {
"CURRENCY_SYM": "\u20ac",
"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": "fr-gp",
"localeID": "fr_GP",
"pluralCat": function(n, opt_precision) { var i = n | 0; if (i == 0 || i == 1) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
});
}]);
|
{
"pile_set_name": "Github"
}
|
#![allow(unused_imports)]
use super::*;
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
extern "C" {
# [wasm_bindgen (extends = :: js_sys :: Object , js_name = CustomElementRegistry , typescript_type = "CustomElementRegistry")]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `CustomElementRegistry` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CustomElementRegistry`*"]
pub type CustomElementRegistry;
# [wasm_bindgen (catch , method , structural , js_class = "CustomElementRegistry" , js_name = define)]
#[doc = "The `define()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/define)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CustomElementRegistry`*"]
pub fn define(
this: &CustomElementRegistry,
name: &str,
function_constructor: &::js_sys::Function,
) -> Result<(), JsValue>;
#[cfg(feature = "ElementDefinitionOptions")]
# [wasm_bindgen (catch , method , structural , js_class = "CustomElementRegistry" , js_name = define)]
#[doc = "The `define()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/define)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CustomElementRegistry`, `ElementDefinitionOptions`*"]
pub fn define_with_options(
this: &CustomElementRegistry,
name: &str,
function_constructor: &::js_sys::Function,
options: &ElementDefinitionOptions,
) -> Result<(), JsValue>;
# [wasm_bindgen (method , structural , js_class = "CustomElementRegistry" , js_name = get)]
#[doc = "The `get()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/get)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CustomElementRegistry`*"]
pub fn get(this: &CustomElementRegistry, name: &str) -> ::wasm_bindgen::JsValue;
#[cfg(feature = "Node")]
# [wasm_bindgen (method , structural , js_class = "CustomElementRegistry" , js_name = upgrade)]
#[doc = "The `upgrade()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/upgrade)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CustomElementRegistry`, `Node`*"]
pub fn upgrade(this: &CustomElementRegistry, root: &Node);
# [wasm_bindgen (catch , method , structural , js_class = "CustomElementRegistry" , js_name = whenDefined)]
#[doc = "The `whenDefined()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CustomElementRegistry/whenDefined)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CustomElementRegistry`*"]
pub fn when_defined(
this: &CustomElementRegistry,
name: &str,
) -> Result<::js_sys::Promise, JsValue>;
}
|
{
"pile_set_name": "Github"
}
|
// +build !appengine
package mail
import (
"bytes"
"encoding/base64"
"errors"
"fmt"
"io"
"mime/multipart"
"net/smtp"
"net/textproto"
"strings"
"sort"
"gnd.la/util/stringutil"
)
var (
errNoAdminEmail = errors.New("mail.Admin specified as a mail destinary, but no mail.AdminEmail() has been set")
crlf = []byte("\r\n")
)
func joinAddrs(addrs []string) (string, error) {
var values []string
for _, v := range addrs {
if v == Admin {
addr := AdminEmail()
if addr == "" {
return "", errNoAdminEmail
}
addrs, err := ParseAddressList(addr)
if err != nil {
return "", fmt.Errorf("invalid admin address %q: %s", addr, err)
}
values = append(values, addrs...)
continue
}
values = append(values, v)
}
return strings.Join(values, ", "), nil
}
func makeBoundary() string {
return "Gondola-Boundary-" + stringutil.Random(32)
}
func sendMail(to []string, cc []string, bcc []string, msg *Message) error {
from := Config.DefaultFrom
server := Config.MailServer
if msg.Server != "" {
server = msg.Server
}
if msg.From != "" {
from = msg.From
}
if from == "" {
return errNoFrom
}
var auth smtp.Auth
cram, username, password, server := parseServer(server)
if username != "" || password != "" {
if cram {
auth = smtp.CRAMMD5Auth(username, password)
} else {
auth = smtp.PlainAuth("", username, password, server)
}
}
var buf bytes.Buffer
headers := msg.Headers
if headers == nil {
headers = make(Headers)
}
if msg.Subject != "" {
headers["Subject"] = msg.Subject
}
headers["From"] = from
if msg.ReplyTo != "" {
headers["Reply-To"] = msg.ReplyTo
}
var err error
if len(to) > 0 {
headers["To"], err = joinAddrs(to)
if err != nil {
return err
}
for ii, v := range to {
if v == Admin {
if Config.AdminEmail == "" {
return errNoAdminEmail
}
to[ii] = Config.AdminEmail
}
}
}
if len(cc) > 0 {
headers["Cc"], err = joinAddrs(cc)
if err != nil {
return err
}
}
if len(bcc) > 0 {
headers["Bcc"], err = joinAddrs(bcc)
if err != nil {
return err
}
}
hk := make([]string, 0, len(headers))
for k := range headers {
hk = append(hk, k)
}
sort.Strings(hk)
for _, k := range hk {
buf.WriteString(fmt.Sprintf("%s: %s\r\n", k, headers[k]))
}
buf.WriteString("MIME-Version: 1.0\r\n")
mw := multipart.NewWriter(&buf)
mw.SetBoundary(makeBoundary())
// Create a multipart mixed first
fmt.Fprintf(&buf, "Content-Type: multipart/mixed;\r\n\tboundary=%q\r\n\r\n", mw.Boundary())
var bodyWriter *multipart.Writer
if msg.TextBody != "" && msg.HTMLBody != "" {
boundary := makeBoundary()
outerHeader := make(textproto.MIMEHeader)
// First part is a multipart/alternative, which contains the text and html bodies
outerHeader.Set("Content-Type", fmt.Sprintf("multipart/alternative; boundary=%q", boundary))
iw, err := mw.CreatePart(outerHeader)
if err != nil {
return err
}
bodyWriter = multipart.NewWriter(iw)
bodyWriter.SetBoundary(boundary)
} else {
bodyWriter = mw
}
if msg.TextBody != "" {
textHeader := make(textproto.MIMEHeader)
textHeader.Set("Content-Type", "text/plain; charset=UTF-8")
tpw, err := bodyWriter.CreatePart(textHeader)
if err != nil {
return err
}
if _, err := io.WriteString(tpw, msg.TextBody); err != nil {
return err
}
tpw.Write(crlf)
tpw.Write(crlf)
}
attached := make(map[*Attachment]bool)
if msg.HTMLBody != "" {
var htmlAttachments []*Attachment
for _, v := range msg.Attachments {
if v.ContentID != "" && strings.Contains(msg.HTMLBody, fmt.Sprintf("cid:%s", v.ContentID)) {
htmlAttachments = append(htmlAttachments, v)
attached[v] = true
}
}
var htmlWriter *multipart.Writer
if len(htmlAttachments) > 0 {
relatedHeader := make(textproto.MIMEHeader)
relatedBoundary := makeBoundary()
relatedHeader.Set("Content-Type", fmt.Sprintf("multipart/related; boundary=%q; type=\"text/html\"", relatedBoundary))
rw, err := bodyWriter.CreatePart(relatedHeader)
if err != nil {
return err
}
htmlWriter = multipart.NewWriter(rw)
htmlWriter.SetBoundary(relatedBoundary)
} else {
htmlWriter = bodyWriter
}
htmlHeader := make(textproto.MIMEHeader)
htmlHeader.Set("Content-Type", "text/html; charset=UTF-8")
thw, err := htmlWriter.CreatePart(htmlHeader)
if err != nil {
return err
}
if _, err := io.WriteString(thw, msg.HTMLBody); err != nil {
return err
}
thw.Write(crlf)
thw.Write(crlf)
for _, v := range htmlAttachments {
attachmentHeader := make(textproto.MIMEHeader)
attachmentHeader.Set("Content-Disposition", "inline")
attachmentHeader.Set("Content-Id", fmt.Sprintf("<%s>", v.ContentID))
attachmentHeader.Set("Content-Transfer-Encoding", "base64")
attachmentHeader.Set("Content-Type", v.ContentType)
aw, err := htmlWriter.CreatePart(attachmentHeader)
if err != nil {
return err
}
b := make([]byte, base64.StdEncoding.EncodedLen(len(v.Data)))
base64.StdEncoding.Encode(b, v.Data)
aw.Write(b)
}
if htmlWriter != bodyWriter {
if err := htmlWriter.Close(); err != nil {
return err
}
}
}
if bodyWriter != mw {
if err := bodyWriter.Close(); err != nil {
return err
}
}
for _, v := range msg.Attachments {
if attached[v] {
continue
}
attachmentHeader := make(textproto.MIMEHeader)
attachmentHeader.Set("Content-Disposition", fmt.Sprintf("attachment; filename=%q", v.Name))
attachmentHeader.Set("Content-Transfer-Encoding", "base64")
attachmentHeader.Set("Content-Type", v.ContentType)
aw, err := mw.CreatePart(attachmentHeader)
if err != nil {
return err
}
b := make([]byte, base64.StdEncoding.EncodedLen(len(v.Data)))
base64.StdEncoding.Encode(b, v.Data
|
{
"pile_set_name": "Github"
}
|
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
from azure.cli.core.commands import CliCommandType
from ._format import (
registry_output_format,
usage_output_format,
policy_output_format,
credential_output_format,
webhook_output_format,
webhook_get_config_output_format,
webhook_list_events_output_format,
webhook_ping_output_format,
replication_output_format,
endpoints_output_format,
build_output_format,
task_output_format,
task_identity_format,
taskrun_output_format,
run_output_format,
helm_list_output_format,
helm_show_output_format,
scope_map_output_format,
token_output_format,
token_credential_output_format,
agentpool_output_format
)
from ._client_factory import (
cf_acr_registries,
cf_acr_replications,
cf_acr_webhooks,
cf_acr_tasks,
cf_acr_taskruns,
cf_acr_runs,
cf_acr_scope_maps,
cf_acr_tokens,
cf_acr_token_credentials,
cf_acr_private_endpoint_connections,
cf_acr_agentpool
)
def load_command_table(self, _): # pylint: disable=too-many-statements
acr_custom_util = CliCommandType(
operations_tmpl='azure.cli.command_modules.acr.custom#{}',
table_transformer=registry_output_format,
client_factory=cf_acr_registries
)
acr_login_util = CliCommandType(
operations_tmpl='azure.cli.command_modules.acr.custom#{}'
)
acr_import_util = CliCommandType(
operations_tmpl='azure.cli.command_modules.acr.import#{}',
client_factory=cf_acr_registries
)
acr_policy_util = CliCommandType(
operations_tmpl='azure.cli.command_modules.acr.policy#{}',
table_transformer=policy_output_format,
client_factory=cf_acr_registries
)
acr_cred_util = CliCommandType(
operations_tmpl='azure.cli.command_modules.acr.credential#{}',
table_transformer=credential_output_format,
client_factory=cf_acr_registries
)
acr_repo_util = CliCommandType(
operations_tmpl='azure.cli.command_modules.acr.repository#{}'
)
acr_webhook_util = CliCommandType(
operations_tmpl='azure.cli.command_modules.acr.webhook#{}',
table_transformer=webhook_output_format,
client_factory=cf_acr_webhooks
)
acr_replication_util = CliCommandType(
operations_tmpl='azure.cli.command_modules.acr.replication#{}',
table_transformer=replication_output_format,
client_factory=cf_acr_replications
)
acr_build_util = CliCommandType(
operations_tmpl='azure.cli.command_modules.acr.build#{}',
table_transformer=build_output_format,
client_factory=cf_acr_runs
)
acr_run_util = CliCommandType(
operations_tmpl='azure.cli.command_modules.acr.run#{}',
table_transformer=run_output_format,
client_factory=cf_acr_runs
)
acr_pack_util = CliCommandType(
operations_tmpl='azure.cli.command_modules.acr.pack#{}',
table_transformer=run_output_format,
client_factory=cf_acr_runs
)
acr_task_util = CliCommandType(
operations_tmpl='azure.cli.command_modules.acr.task#{}',
table_transformer=task_output_format,
client_factory=cf_acr_tasks
)
acr_taskrun_util = CliCommandType(
operations_tmpl='azure.cli.command_modules.acr.taskrun#{}',
table_transformer=taskrun_output_format,
client_factory=cf_acr_taskruns
)
acr_helm_util = CliCommandType(
operations_tmpl='azure.cli.command_modules.acr.helm#{}'
)
acr_network_rule_util = CliCommandType(
operations_tmpl='azure.cli.command_modules.acr.network_rule#{}',
client_factory=cf_acr_registries
)
acr_check_health_util = CliCommandType(
operations_tmpl='azure.cli.command_modules.acr.check_health#{}'
)
acr_scope_map_util = CliCommandType(
operations_tmpl='azure.cli.command_modules.acr.scope_map#{}',
table_transformer=scope_map_output_format,
client_factory=cf_acr_scope_maps
)
acr_token_util = CliCommandType(
operations_tmpl='azure.cli.command_modules.acr.token#{}',
table_transformer=token_output_format,
client_factory=cf_acr_tokens
)
acr_token_credential_generate_util = CliCommandType(
operations_tmpl='azure.cli.command_modules.acr.token#{}',
table_transformer=token_credential_output_format,
client_factory=cf_acr_token_credentials
)
acr_agentpool_util = CliCommandType(
operations_tmpl='azure.cli.command_modules.acr.agentpool#{}',
table_transformer=agentpool_output_format,
client_factory=cf_acr_agentpool
)
acr_private_endpoint_connection_util = CliCommandType(
operations_tmpl='azure.cli.command_modules.acr.private_endpoint_connection#{}',
client_factory=cf_acr_private_endpoint_connections
)
with self.command_group('acr', acr_custom_util) as g:
g.command('check-name', 'acr_check_name', table_transformer=None)
g.command('list', 'acr_list')
g.command('create', 'acr_create')
g.command('delete', 'acr_delete')
g.show_command('show', 'acr_show')
g.command('show-usage', 'acr_show_usage', table_transformer=usage_output_format)
g.command('show-endpoints', 'acr_show_endpoints', table_transformer=endpoints_output_format)
g.generic_update_command('update',
getter_name='acr_update_get',
setter_name='acr_update_set',
custom_func_name='acr_update_custom',
custom_func_type=acr_custom_util,
client_factory=cf_acr_registries)
with self.command_group('acr', acr_login_util) as g:
g.command('login', 'acr_login')
with self.command_group('acr', acr_import_util) as g:
g.command('import', 'acr_import')
with self.command_group('acr credential', acr_cred_util) as g:
g.show_command('show', 'acr_credential_show')
g.command('renew', '
|
{
"pile_set_name": "Github"
}
|
fileFormatVersion: 2
guid: f2526e443ce2efb4cb419bda6a034df6
timeCreated: 1490642887
licenseType: Pro
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
|
{
"pile_set_name": "Github"
}
|
//===--- SwiftPrivateThreadExtras.swift -----------------------------------===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
//
// This file contains wrappers for pthread APIs that are less painful to use
// than the C APIs.
//
//===----------------------------------------------------------------------===//
#if canImport(Darwin)
import Darwin
#elseif canImport(Glibc)
import Glibc
#elseif os(Windows)
import MSVCRT
import WinSDK
#endif
/// An abstract base class to encapsulate the context necessary to invoke
/// a block from pthread_create.
internal class ThreadBlockContext {
/// Execute the block, and return an `UnsafeMutablePointer` to memory
/// allocated with `UnsafeMutablePointer.alloc` containing the result of the
/// block.
func run() -> UnsafeMutableRawPointer { fatalError("abstract") }
}
internal class ThreadBlockContextImpl<Argument, Result>: ThreadBlockContext {
let block: (Argument) -> Result
let arg: Argument
init(block: @escaping (Argument) -> Result, arg: Argument) {
self.block = block
self.arg = arg
super.init()
}
override func run() -> UnsafeMutableRawPointer {
let result = UnsafeMutablePointer<Result>.allocate(capacity: 1)
result.initialize(to: block(arg))
return UnsafeMutableRawPointer(result)
}
}
/// Entry point for `pthread_create` that invokes a block context.
internal func invokeBlockContext(
_ contextAsVoidPointer: UnsafeMutableRawPointer?
) -> UnsafeMutableRawPointer! {
// The context is passed in +1; we're responsible for releasing it.
let context = Unmanaged<ThreadBlockContext>
.fromOpaque(contextAsVoidPointer!)
.takeRetainedValue()
return context.run()
}
#if os(Windows)
public typealias ThreadHandle = HANDLE
#else
public typealias ThreadHandle = pthread_t
#if os(Linux) || os(Android)
internal func _make_pthread_t() -> pthread_t {
return pthread_t()
}
#else
internal func _make_pthread_t() -> pthread_t? {
return nil
}
#endif
#endif
/// Block-based wrapper for `pthread_create`.
public func _stdlib_thread_create_block<Argument, Result>(
_ start_routine: @escaping (Argument) -> Result,
_ arg: Argument
) -> (CInt, ThreadHandle?) {
let context = ThreadBlockContextImpl(block: start_routine, arg: arg)
// We hand ownership off to `invokeBlockContext` through its void context
// argument.
let contextAsVoidPointer = Unmanaged.passRetained(context).toOpaque()
#if os(Windows)
let threadID =
_beginthreadex(nil, 0, { invokeBlockContext($0)!
.assumingMemoryBound(to: UInt32.self).pointee },
contextAsVoidPointer, 0, nil)
if threadID == 0 {
return (errno, nil)
} else {
return (0, ThreadHandle(bitPattern: threadID))
}
#else
var threadID = _make_pthread_t()
let result = pthread_create(&threadID, nil,
{ invokeBlockContext($0) }, contextAsVoidPointer)
if result == 0 {
return (result, threadID)
} else {
return (result, nil)
}
#endif
}
/// Block-based wrapper for `pthread_join`.
public func _stdlib_thread_join<Result>(
_ thread: ThreadHandle,
_ resultType: Result.Type
) -> (CInt, Result?) {
#if os(Windows)
let result = WaitForSingleObject(thread, INFINITE)
guard result == WAIT_OBJECT_0 else { return (CInt(result), nil) }
var dwResult: DWORD = 0
GetExitCodeThread(thread, &dwResult)
CloseHandle(thread)
let value: Result = withUnsafePointer(to: &dwResult) {
$0.withMemoryRebound(to: Result.self, capacity: 1) {
$0.pointee
}
}
return (CInt(result), value)
#else
var threadResultRawPtr: UnsafeMutableRawPointer?
let result = pthread_join(thread, &threadResultRawPtr)
if result == 0 {
let threadResultPtr = threadResultRawPtr!.assumingMemoryBound(
to: Result.self)
let threadResult = threadResultPtr.pointee
threadResultPtr.deinitialize(count: 1)
threadResultPtr.deallocate()
return (result, threadResult)
} else {
return (result, nil)
}
#endif
}
public class _stdlib_Barrier {
var _threadBarrier: _stdlib_thread_barrier_t
var _threadBarrierPtr: UnsafeMutablePointer<_stdlib_thread_barrier_t> {
return _getUnsafePointerToStoredProperties(self)
.assumingMemoryBound(to: _stdlib_thread_barrier_t.self)
}
public init(threadCount: Int) {
self._threadBarrier = _stdlib_thread_barrier_t()
let ret = _stdlib_thread_barrier_init(
_threadBarrierPtr, CUnsignedInt(threadCount))
if ret != 0 {
fatalError("_stdlib_thread_barrier_init() failed")
}
}
deinit {
_stdlib_thread_barrier_destroy(_threadBarrierPtr)
}
public func wait() {
let ret = _stdlib_thread_barrier_wait(_threadBarrierPtr)
if !(ret == 0 || ret == _stdlib_THREAD_BARRIER_SERIAL_THREAD) {
fatalError("_stdlib_thread_barrier_wait() failed")
}
}
}
|
{
"pile_set_name": "Github"
}
|
version https://git-lfs.github.com/spec/v1
oid sha256:2aa3ff0c0b8e1a5f7ce4fce717d6632d3687f95d420401bb2f5fe3dde75cab09
size 6557
|
{
"pile_set_name": "Github"
}
|
package plugins.core.combat;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import akka.actor.ActorRef;
import akka.actor.ActorSelection;
import akka.actor.Props;
import akka.actor.UntypedActor;
import io.gamemachine.chat.ChatSubscriptions;
import io.gamemachine.core.ActorUtil;
import io.gamemachine.core.GameEntityManager;
import io.gamemachine.core.GameEntityManagerService;
import io.gamemachine.core.GameMachineLoader;
import io.gamemachine.core.PlayerMessage;
import io.gamemachine.grid.Grid;
import io.gamemachine.grid.GridService;
import io.gamemachine.messages.CombatLog;
import io.gamemachine.messages.GameMessage;
import io.gamemachine.messages.PlayerSkill;
import io.gamemachine.messages.RegionInfo;
import io.gamemachine.messages.StatusEffect;
import io.gamemachine.messages.StatusEffectTarget;
import io.gamemachine.messages.TrackData;
import io.gamemachine.messages.Zone;
import io.gamemachine.regions.ZoneService;
public class StatusEffectManager extends UntypedActor {
private static final Logger logger = LoggerFactory.getLogger(StatusEffectManager.class);
public static String name = StatusEffectManager.class.getSimpleName();
public static boolean combatLogEnabled = true;
public static List<GridSet> gridsets = new ArrayList<GridSet>();
public static Set<String> handlerZones = new HashSet<String>();
public static void tell(String gridName, String zone, StatusEffectTarget statusEffectTarget, ActorRef sender) {
String actorName = null;
if (!hasEffects(statusEffectTarget)) {
logger.warn("No effects found for skill " + statusEffectTarget.skillRequest.playerSkill.id);
return;
}
if (activeEffectCount(statusEffectTarget) > 0) {
actorName = ActiveEffectHandler.actorName(gridName, zone);
ActorSelection sel = ActorUtil.getSelectionByName(actorName);
sel.tell(statusEffectTarget.clone(), sender);
}
if (passiveEffectCount(statusEffectTarget) > 0) {
actorName = PassiveEffectHandler.actorName(gridName, zone);
ActorSelection sel = ActorUtil.getSelectionByName(actorName);
sel.tell(statusEffectTarget.clone(), sender);
}
}
private static boolean hasEffects(StatusEffectTarget statusEffectTarget) {
if (StatusEffectData.skillEffects.containsKey(statusEffectTarget.skillRequest.playerSkill.id)) {
return true;
} else {
return false;
}
}
private static int passiveEffectCount(StatusEffectTarget statusEffectTarget) {
int count = 0;
for (StatusEffect statusEffect : StatusEffectData.skillEffects.get(statusEffectTarget.skillRequest.playerSkill.id)) {
if (statusEffect.type == StatusEffect.Type.AttributeMaxDecrease || statusEffect.type == StatusEffect.Type.AttributeMaxIncrease) {
count++;
}
}
return count;
}
private static int activeEffectCount(StatusEffectTarget statusEffectTarget) {
int count = 0;
for (StatusEffect statusEffect : StatusEffectData.skillEffects.get(statusEffectTarget.skillRequest.playerSkill.id)) {
if (statusEffect.type == StatusEffect.Type.AttributeDecrease || statusEffect.type == StatusEffect.Type.AttributeIncrease) {
count++;
}
}
return count;
}
public static int getEffectValue(StatusEffect statusEffect, PlayerSkill playerSkill, String characterId) {
GameEntityManager gameEntityManager = GameEntityManagerService.instance().getGameEntityManager();
return gameEntityManager.getEffectValue(statusEffect, playerSkill.id, characterId);
}
public static boolean inGroup(String playerId) {
String playerGroup = ChatSubscriptions.playerGroup(playerId);
if (playerGroup.equals("nogroup")) {
return false;
} else {
return true;
}
}
public static void skillUsed(PlayerSkill playerSkill, String characterId) {
GameEntityManager gameEntityManager = GameEntityManagerService.instance().getGameEntityManager();
gameEntityManager.skillUsed(playerSkill.id, characterId);
}
public static String playerGroup(String playerId) {
return ChatSubscriptions.playerGroup(playerId);
}
public static boolean inSameGroup(String playerId, String otherId) {
if (!inGroup(playerId)) {
return false;
}
String otherGroup = ChatSubscriptions.playerGroup(otherId);
if (playerGroup(playerId).equals(otherGroup)) {
return true;
} else {
return false;
}
}
public static boolean DeductCost(VitalsProxy vitalsProxy, StatusEffect statusEffect) {
if (statusEffect.resourceCost == 0) {
return true;
}
if (statusEffect.resource == StatusEffect.Resource.ResourceStamina) {
if (vitalsProxy.get("stamina") < statusEffect.resourceCost) {
//logger.warn("Insufficient stamina needed " + statusEffect.resourceCost);
return false;
}
vitalsProxy.subtract("stamina", statusEffect.resourceCost);
} else if (statusEffect.resource == StatusEffect.Resource.ResourceMagic) {
if (vitalsProxy.get("magic") < statusEffect.resourceCost) {
//logger.warn("Insufficient magic needed " + statusEffect.resourceCost);
return false;
}
vitalsProxy.subtract("magic", statusEffect.resourceCost);
}
return true;
}
public static void sendCombatDamage(VitalsProxy origin, VitalsProxy target, int value, CombatLog.Type type, String zone) {
GameEntityManager gameEntityManager = GameEntityManagerService.instance().getGameEntityManager();
gameEntityManager.combatDamage(origin, target, value, type);
if (!combatLogEnabled) {
return;
}
GameMessage msg = new GameMessage();
msg.combatLog = new CombatLog();
msg.combatLog.origin = origin.getEntityId();
msg.combatLog.target = target.getEntityId();
msg.combatLog.value = value;
msg.combatLog.type = type;
Grid grid = GridService.getInstance().getGrid(zone, "default");
TrackData trackData = grid.get(msg.combatLog.origin);
if (trackData != null) {
PlayerMessage.tell(msg, trackData.id);
}
trackData = grid.get(msg.combatLog.target);
if (trackData != null) {
PlayerMessage.tell(msg, trackData.id);
}
}
public StatusEffectManager() {
createDefaultEffectHandlers();
}
private void createDefaultEffectHandlers() {
int zoneCount = RegionInfo.db().findAll().size();
if (zoneCount == 0) {
logger.warn("Combat system requires at least one zone configured");
return;
}
for (Zone zone : ZoneService.staticZones()) {
createEffectHandler(zone.name);
}
}
public static void createEffectHandler(String zone) {
if (handlerZones.contains(zone)) {
logger.warn("effect handler already created for zone " + zone);
return;
}
GridSet gridSet = new GridSet();
gridSet.zone = zone;
GridService.getInstance().createForZone(zone);
gridSet.playerGrid = GridService.getInstance().getGrid(zone, "default");
gridSet.objectGrid = GridService.getInstance().getGrid(zone, "build_objects");
gridsets
|
{
"pile_set_name": "Github"
}
|
package com.trinity.sample.view.foucs
enum class AutoFocusTrigger {
GESTURE,
METHOD
}
|
{
"pile_set_name": "Github"
}
|
Escreva um **servidor** HTTP que recebe apenas requisições de POST e converte os caracteres no corpo da requisição para caixa-alta e retorna-os para o cliente.
Seu servidor deve "escutar" na porta provida a você pelo primeiro argumento para seu programa.
----------------------------------------------------------------------
## DICAS
Ainda que você não esteja restrito ao uso das capacidades de streaming dos objetos `request` e `response`, será muito mais fácil se você decidir usá-las.
Existe um grande número de pacotes diferentes no npm que você pode usar para *"transformar"* um streaming de dados enquanto ele está sendo passado. Para esse exercício, o pacote `through2-map` oferece a API mais simples.
`through2-map` permite que você crie um *stream transformador* usando apenas uma única função que recebe um bloco de dados e retorna um outro bloco de dados. Ela é designada para funcionar como um `Array#map()`, só que para streams:
```js
const map = require('through2-map')
inStream.pipe(map(function (chunk) {
return chunk.toString().split('').reverse().join('')
})).pipe(outStream)
```
No exemplo acima, a data que estamos recebendo de `inStream` é convertida para uma String (se já não estiver nesse formato), os caracteres são revertidos e o resultado é passado para o `outStream`. Sendo assim nós fizemos um reversor de caracteres! Lembre-se que o tamanho do bloco é determinado pelo fluxo e você tem muito pouco controle sobre ele para os dados que está recebendo.
Para instalar `through2-map` type:
```sh
$ npm install through2-map
```
Se você não possuir uma conexão à Internet, simplesmente crie uma pasta `node_modules` e copie o diretório inteiro para o módulo que você quiser usar de dentro do diretório de instalação do {{appname}}:
{rootdir:/node_modules/through2-map}
A documentação do through2-map foi instalada junto com o {appname} no seu sistema e você pode lê-los apontando seu navegador para cá:
{rootdir:/docs/through2-map.html}
|
{
"pile_set_name": "Github"
}
|
// mkerrors.sh -m32
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build 386,darwin
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs -- -m32 _const.go
package unix
import "syscall"
const (
AF_APPLETALK = 0x10
AF_CCITT = 0xa
AF_CHAOS = 0x5
AF_CNT = 0x15
AF_COIP = 0x14
AF_DATAKIT = 0x9
AF_DECnet = 0xc
AF_DLI = 0xd
AF_E164 = 0x1c
AF_ECMA = 0x8
AF_HYLINK = 0xf
AF_IEEE80211 = 0x25
AF_IMPLINK = 0x3
AF_INET = 0x2
AF_INET6 = 0x1e
AF_IPX = 0x17
AF_ISDN = 0x1c
AF_ISO = 0x7
AF_LAT = 0xe
AF_LINK = 0x12
AF_LOCAL = 0x1
AF_MAX = 0x28
AF_NATM = 0x1f
AF_NDRV = 0x1b
AF_NETBIOS = 0x21
AF_NS = 0x6
AF_OSI = 0x7
AF_PPP = 0x22
AF_PUP = 0x4
AF_RESERVED_36 = 0x24
AF_ROUTE = 0x11
AF_SIP = 0x18
AF_SNA = 0xb
AF_SYSTEM = 0x20
AF_UNIX = 0x1
AF_UNSPEC = 0x0
AF_UTUN = 0x26
ALTWERASE = 0x200
ATTR_BIT_MAP_COUNT = 0x5
ATTR_CMN_ACCESSMASK = 0x20000
ATTR_CMN_ACCTIME = 0x1000
ATTR_CMN_ADDEDTIME = 0x10000000
ATTR_CMN_BKUPTIME = 0x2000
ATTR_CMN_CHGTIME = 0x800
ATTR_CMN_CRTIME = 0x200
ATTR_CMN_DATA_PROTECT_FLAGS = 0x40000000
ATTR_CMN_DEVID = 0x2
ATTR_CMN_DOCUMENT_ID = 0x100000
ATTR_CMN_ERROR = 0x20000000
ATTR_CMN_EXTENDED_SECURITY = 0x400000
ATTR_CMN_FILEID = 0x2000000
ATTR_CMN_FLAGS = 0x40000
ATTR_CMN_FNDRINFO = 0x4000
ATTR_CMN_FSID = 0x4
ATTR_CMN_FULLPATH = 0x8000000
ATTR_CMN_GEN_COUNT = 0x80000
ATTR_CMN_GRPID = 0x10000
ATTR_CMN_GRPUUID = 0x1000000
ATTR_CMN_MODTIME = 0x400
ATTR_CMN_NAME = 0x1
ATTR_CMN_NAMEDATTRCOUNT = 0x80000
ATTR_CMN_NAMEDATTRLIST = 0x100000
ATTR_CMN_OBJID = 0x20
ATTR_CMN_OBJPERMANENTID = 0x40
ATTR_CMN_OBJTAG = 0x10
ATTR_CMN_OBJTYPE = 0x8
ATTR_CMN_OWNERID = 0x8000
ATTR_CMN_PARENTID = 0x4000000
ATTR_CMN_PAROBJID = 0x80
ATTR_CMN_RETURNED_ATTRS = 0x80000000
ATTR_CMN_SCRIPT = 0x100
ATTR_CMN_SETMASK = 0x41c7ff00
ATTR_CMN_USERACCESS = 0x200000
ATTR_CMN_UUID = 0x800000
ATTR_CMN_VALIDMASK = 0xffffffff
ATTR_CMN_VOLSETMASK = 0x6700
ATTR_FILE_ALLOCSIZE = 0x4
ATTR_FILE_CLUMPSIZE = 0x10
ATTR_FILE_DATAALLOCSIZE = 0x400
ATTR_FILE_DATAEXTENTS = 0x800
ATTR_FILE_DATALENGTH = 0x200
ATTR_FILE_DEVTYPE = 0x20
ATTR_FILE_FILETYPE = 0x40
ATTR_FILE_FORKCOUNT = 0x80
ATTR_FILE_FORKLIST = 0x100
ATTR_FILE_IOBLOCKSIZE = 0x8
ATTR_FILE_LINKCOUNT = 0x1
ATTR_FILE_RSRCALLOCSIZE = 0x2000
ATTR_FILE_RSRCEXTENTS = 0x4000
ATTR_FILE_RSRCLENGTH = 0x1000
ATTR_FILE_SETMASK = 0x20
ATTR_FILE_TOTALSIZE = 0x2
ATTR_FILE_VALIDMASK = 0x37ff
ATTR_VOL_ALLOCATIONCLUMP = 0x40
ATTR_VOL_ATTRIBUTES = 0x40000000
ATTR_VOL_CAPABILITIES = 0x20000
ATTR_VOL_DIRCOUNT = 0x400
ATTR_VOL_ENCODINGSUSED = 0x10000
ATTR_VOL_FILECOUNT = 0x200
ATTR_VOL_FSTYPE = 0x1
ATTR_VOL_INFO = 0x80000000
ATTR_VOL_IOBLOCKSIZE = 0x80
ATTR_VOL_MAXOBJCOUNT = 0x800
ATTR_VOL_MINALLOCATION = 0x20
ATTR_VOL_MOUNTEDDEVICE = 0x8000
ATTR_VOL_MOUNTFLAGS = 0x4000
ATTR_VOL_MOUNTPOINT = 0x1000
ATTR_VOL_NAME = 0x2000
ATTR_VOL_OBJCOUNT = 0x100
ATTR_VOL_QUOTA_SIZE = 0x10000000
ATTR_VOL_RESERVED_SIZE = 0x20000000
ATTR_VOL_SETMASK = 0x80002000
ATTR_VOL_SIGNATURE = 0x2
ATTR_VOL_SIZE = 0x4
ATTR_VOL_SPACEAVAIL = 0x10
ATTR_VOL_SPACEFREE = 0x8
ATTR_VOL_UUID = 0x40000
ATTR_VOL_VALIDMASK = 0xf007ffff
B0 = 0x0
B110 = 0x6e
B115200 = 0x1c200
B1200 = 0x4b0
B134 = 0x86
B14400 = 0x3840
B150 = 0x96
B1800 = 0x708
B19200 = 0x4b00
B200 = 0xc8
B230400 = 0x38400
B2400 = 0x960
B28800 = 0x7080
B300 = 0x12c
B38400 = 0x9600
B4800 = 0x12c0
B50 = 0x32
B57600 = 0xe100
B600 = 0x258
B7200 = 0x1c20
B75 = 0x4b
B76800 = 0x12c00
B9600 = 0x2580
BIOCFLUSH = 0x20004268
BIOCGBLEN = 0x40044266
BIOCGDLT = 0x4004426a
BIOCGDLTLIST = 0xc00c4279
BIOCGETIF = 0x4020426b
BIOCGHDRCMPLT
|
{
"pile_set_name": "Github"
}
|
/* Copyright 2012 Yaqiang Wang,
* yaqiang.wang@gmail.com
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or (at
* your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
* General Public License for more details.
*/
package org.meteoinfo.data.mapdata.geotiff;
import java.util.HashMap;
/**
*
* @author yaqiang
*/
public class Tag implements Comparable {
// <editor-fold desc="Variables">
private static HashMap map = new HashMap();
public static final Tag NewSubfileType = new Tag("NewSubfileType", 254);
public static final Tag ImageWidth = new Tag("ImageWidth", 256);
public static final Tag ImageLength = new Tag("ImageLength", 257);
public static final Tag BitsPerSample = new Tag("BitsPerSample", 258);
public static final Tag Compression = new Tag("Compression", 259);
public static final Tag PhotometricInterpretation = new Tag("PhotometricInterpretation", 262);
public static final Tag FillOrder = new Tag("FillOrder", 266);
public static final Tag DocumentName = new Tag("DocumentName", 269);
public static final Tag ImageDescription = new Tag("ImageDescription", 270);
public static final Tag StripOffsets = new Tag("StripOffsets", 273);
public static final Tag Orientation = new Tag("Orientation", 274);
public static final Tag SamplesPerPixel = new Tag("SamplesPerPixel", 277);
public static final Tag RowsPerStrip = new Tag("RowsPerStrip", 278);
public static final Tag StripByteCounts = new Tag("StripByteCounts", 279);
public static final Tag XResolution = new Tag("XResolution", 282);
public static final Tag YResolution = new Tag("YResolution", 283);
public static final Tag PlanarConfiguration = new Tag("PlanarConfiguration", 284);
public static final Tag ResolutionUnit = new Tag("ResolutionUnit", 296);
public static final Tag PageNumber = new Tag("PageNumber", 297);
public static final Tag Software = new Tag("Software", 305);
public static final Tag ColorMap = new Tag("ColorMap", 320);
public static final Tag TileWidth = new Tag("TileWidth", 322);
public static final Tag TileLength = new Tag("TileLength", 323);
public static final Tag TileOffsets = new Tag("TileOffsets", 324);
public static final Tag TileByteCounts = new Tag("TileByteCounts", 325);
public static final Tag SampleFormat = new Tag("SampleFormat", 339);
public static final Tag SMinSampleValue = new Tag("SMinSampleValue", 340);
public static final Tag SMaxSampleValue = new Tag("SMaxSampleValue", 341);
public static final Tag ModelPixelScaleTag = new Tag("ModelPixelScaleTag", 33550);
public static final Tag IntergraphMatrixTag = new Tag("IntergraphMatrixTag", 33920);
public static final Tag ModelTiepointTag = new Tag("ModelTiepointTag", 33922);
public static final Tag ModelTransformationTag = new Tag("ModelTransformationTag", 34264);
public static final Tag GeoKeyDirectoryTag = new Tag("GeoKeyDirectoryTag", 34735);
public static final Tag GeoDoubleParamsTag = new Tag("GeoDoubleParamsTag", 34736);
public static final Tag GeoAsciiParamsTag = new Tag("GeoAsciiParamsTag", 34737);
public static final Tag GDALNoData = new Tag("GDALNoDataTag", 42113);
private String name;
private int code;
// </editor-fold>
// <editor-fold desc="Constructor">
static Tag get(int code) {
return (Tag) map.get(new Integer(code));
}
private Tag(String name, int code) {
this.name = name;
this.code = code;
map.put(new Integer(code), this);
}
Tag(int code) {
this.code = code;
}
// </editor-fold>
// <editor-fold desc="Get Set Methods">
/**
* Get name
*
* @return Name
*/
public String getName() {
return this.name;
}
/**
* Get code
*
* @return Code
*/
public int getCode() {
return this.code;
}
// </editor-fold>
// <editor-fold desc="Methods">
/**
* To string
*
* @return String
*/
@Override
public String toString() {
return this.code + " (" + this.name + ")";
}
/**
* Compare to
*
* @param o Object
* @return Int
*/
@Override
public int compareTo(Object o) {
return this.code - ((Tag) o).getCode();
}
// </editor-fold>
}
|
{
"pile_set_name": "Github"
}
|
/*
* 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.
*/
using System;
using System.Collections.Generic;
using Aliyun.Acs.Core.Transform;
using Aliyun.Acs.Iot.Model.V20180120;
namespace Aliyun.Acs.Iot.Transform.V20180120
{
public class CreateProductTagsResponseUnmarshaller
{
public static CreateProductTagsResponse Unmarshall(UnmarshallerContext context)
{
CreateProductTagsResponse createProductTagsResponse = new CreateProductTagsResponse();
createProductTagsResponse.HttpResponse = context.HttpResponse;
createProductTagsResponse.RequestId = context.StringValue("CreateProductTags.RequestId");
createProductTagsResponse.Success = context.BooleanValue("CreateProductTags.Success");
createProductTagsResponse.ErrorMessage = context.StringValue("CreateProductTags.ErrorMessage");
createProductTagsResponse.Code = context.StringValue("CreateProductTags.Code");
List<CreateProductTagsResponse.CreateProductTags_ProductTag> createProductTagsResponse_invalidProductTags = new List<CreateProductTagsResponse.CreateProductTags_ProductTag>();
for (int i = 0; i < context.Length("CreateProductTags.InvalidProductTags.Length"); i++) {
CreateProductTagsResponse.CreateProductTags_ProductTag productTag = new CreateProductTagsResponse.CreateProductTags_ProductTag();
productTag.TagKey = context.StringValue("CreateProductTags.InvalidProductTags["+ i +"].TagKey");
productTag.TagValue = context.StringValue("CreateProductTags.InvalidProductTags["+ i +"].TagValue");
createProductTagsResponse_invalidProductTags.Add(productTag);
}
createProductTagsResponse.InvalidProductTags = createProductTagsResponse_invalidProductTags;
return createProductTagsResponse;
}
}
}
|
{
"pile_set_name": "Github"
}
|
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program 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.
*
* This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#include "../../inc/MarlinConfigPre.h"
#if HAS_UI_320x240
#include "ui_320x240.h"
#include "../ultralcd.h"
#include "../menu/menu.h"
#include "../../libs/numtostr.h"
#include "../../sd/cardreader.h"
#include "../../module/temperature.h"
#include "../../module/printcounter.h"
#include "../../module/planner.h"
#include "../../module/motion.h"
#if DISABLED(LCD_PROGRESS_BAR) && BOTH(FILAMENT_LCD_DISPLAY, SDSUPPORT)
#include "../../feature/filwidth.h"
#include "../../gcode/parser.h"
#endif
#if ENABLED(AUTO_BED_LEVELING_UBL)
#include "../../feature/bedlevel/bedlevel.h"
#endif
#if !HAS_LCD_MENU
#error "Seriously? High resolution TFT screen without menu?"
#endif
static bool draw_menu_navigation = false;
void MarlinUI::tft_idle() {
#if ENABLED(TOUCH_SCREEN)
if (draw_menu_navigation) {
add_control(48, 206, PAGE_UP, imgPageUp, encoderTopLine > 0);
add_control(240, 206, PAGE_DOWN, imgPageDown, encoderTopLine + LCD_HEIGHT < screen_items);
add_control(144, 206, BACK, imgBack);
draw_menu_navigation = false;
}
#endif
tft.queue.async();
TERN_(TOUCH_SCREEN, touch.idle());
}
void MarlinUI::init_lcd() {
tft.init();
tft.set_font(MENU_FONT_NAME);
#ifdef SYMBOLS_FONT_NAME
tft.add_glyphs(SYMBOLS_FONT_NAME);
#endif
TERN_(TOUCH_SCREEN, touch.init());
clear_lcd();
}
bool MarlinUI::detected() { return true; }
void MarlinUI::clear_lcd() {
#if ENABLED(TOUCH_SCREEN)
touch.reset();
draw_menu_navigation = false;
#endif
tft.queue.reset();
tft.fill(0, 0, TFT_WIDTH, TFT_HEIGHT, COLOR_BACKGROUND);
}
#if ENABLED(SHOW_BOOTSCREEN)
#ifndef BOOTSCREEN_TIMEOUT
#define BOOTSCREEN_TIMEOUT 1500
#endif
void MarlinUI::show_bootscreen() {
tft.queue.reset();
tft.canvas(0, 0, TFT_WIDTH, TFT_HEIGHT);
tft.add_image(0, 0, imgBootScreen); // MarlinLogo320x240x16
#ifdef WEBSITE_URL
tft.add_text(4, 188, COLOR_WEBSITE_URL, WEBSITE_URL);
#endif
tft.queue.sync();
safe_delay(BOOTSCREEN_TIMEOUT);
clear_lcd();
}
#endif // SHOW_BOOTSCREEN
void MarlinUI::draw_kill_screen() {
tft.queue.reset();
tft.fill(0, 0, TFT_WIDTH, TFT_HEIGHT, COLOR_KILL_SCREEN_BG);
tft.canvas(0, 60, TFT_WIDTH, 20);
tft.set_background(COLOR_KILL_SCREEN_BG);
tft_string.set(status_message);
tft_string.trim();
tft.add_text(tft_string.center(TFT_WIDTH), 0, COLOR_KILL_SCREEN_TEXT, tft_string);
tft.canvas(0, 120, TFT_WIDTH, 20);
tft.set_background(COLOR_KILL_SCREEN_BG);
tft_string.set(GET_TEXT(MSG_HALTED));
tft_string.trim();
tft.add_text(tft_string.center(TFT_WIDTH), 0, COLOR_KILL_SCREEN_TEXT, tft_string);
tft.canvas(0, 160, TFT_WIDTH, 20);
tft.set_background(COLOR_KILL_SCREEN_BG);
tft_string.set(GET_TEXT(MSG_PLEASE_RESET));
tft_string.trim();
tft.add_text(tft_string.center(TFT_WIDTH), 0, COLOR_KILL_SCREEN_TEXT, tft_string);
tft.queue.sync();
}
void draw_heater_status(uint16_t x, uint16_t y, const int8_t Heater) {
MarlinImage image = imgHotEnd;
uint16_t Color;
float currentTemperature, targetTemperature;
if (Heater >= 0) { // HotEnd
currentTemperature = thermalManager.degHotend(Heater);
targetTemperature = thermalManager.degTargetHotend(Heater);
}
#if HAS_HEATED_BED
else if (Heater == H_BED) {
currentTemperature = thermalManager.degBed();
targetTemperature = thermalManager.degTargetBed();
}
#endif // HAS_HEATED_BED
#if HAS_TEMP_CHAMBER
else if (Heater == H_CHAMBER) {
currentTemperature = thermalManager.degChamber();
#if HAS_HEATED_CHAMBER
targetTemperature = thermalManager.degTargetChamber();
#else
targetTemperature = ABSOLUTE_ZERO;
#endif
}
#endif // HAS_TEMP_CHAMBER
else return;
TERN_(TOUCH_SCREEN, if (targetTemperature >= 0) touch.add_control(HEATER, x, y, 64, 100, Heater));
tft.canvas(x, y, 64, 100);
tft.set_background(COLOR_BACKGROUND);
Color = currentTemperature < 0 ? COLOR_INACTIVE : COLOR_COLD;
if (Heater >= 0) { // HotEnd
if (currentTemperature >= 50) Color = COLOR_HOTEND;
}
#if HAS_HEATED_BED
else if (Heater == H_BED) {
if (currentTemperature >= 50) Color = COLOR_HEATED_BED;
image = targetTemperature > 0 ? imgBedHeated : imgBed;
}
#endif // HAS_HEATED_BED
#if HAS_TEMP_CHAMBER
else if (Heater == H_CHAMBER) {
if (currentTemperature >= 50) Color = COLOR_CHAMBER;
image = targetTemperature > 0 ? imgChamberHeated : imgChamber;
}
#endif // HAS_TEMP_CHAMBER
tft.add_image(0, 18, image, Color);
tft_string.set((uint8_t *)i16tostr3rj(currentTemperature + 0.
|
{
"pile_set_name": "Github"
}
|
testConstructorMessageCause(org.apache.commons.math.FunctionEvaluationExceptionTest)
testConstructorMessage(org.apache.commons.math.FunctionEvaluationExceptionTest)
testConstructor(org.apache.commons.math.FunctionEvaluationExceptionTest)
testConstructorCause(org.apache.commons.math.MathConfigurationExceptionTest)
testConstructorMessageCause(org.apache.commons.math.MathConfigurationExceptionTest)
testConstructorMessage(org.apache.commons.math.MathConfigurationExceptionTest)
testConstructor(org.apache.commons.math.MathConfigurationExceptionTest)
testSerialization(org.apache.commons.math.MathExceptionTest)
testConstructorCause(org.apache.commons.math.MathExceptionTest)
testConstructorMessageCause(org.apache.commons.math.MathExceptionTest)
testConstructorMessage(org.apache.commons.math.MathExceptionTest)
testPrintStackTrace(org.apache.commons.math.MathExceptionTest)
testConstructor(org.apache.commons.math.MathExceptionTest)
testSetMaximalIterationCount(org.apache.commons.math.analysis.BisectionSolverTest)
testSetRelativeAccuracy(org.apache.commons.math.analysis.BisectionSolverTest)
testSetAbsoluteAccuracy(org.apache.commons.math.analysis.BisectionSolverTest)
testSerialization(org.apache.commons.math.analysis.BisectionSolverTest)
testSetFunctionValueAccuracy(org.apache.commons.math.analysis.BisectionSolverTest)
testResetRelativeAccuracy(org.apache.commons.math.analysis.BisectionSolverTest)
testResetAbsoluteAccuracy(org.apache.commons.math.analysis.BisectionSolverTest)
testResetMaximalIterationCount(org.apache.commons.math.analysis.BisectionSolverTest)
testResetFunctionValueAccuracy(org.apache.commons.math.analysis.BisectionSolverTest)
testQuinticZero(org.apache.commons.math.analysis.BisectionSolverTest)
testSinZero(org.apache.commons.math.analysis.BisectionSolverTest)
testBadEndpoints(org.apache.commons.math.analysis.BrentSolverTest)
testQuinticZero(org.apache.commons.math.analysis.BrentSolverTest)
testSinZero(org.apache.commons.math.analysis.BrentSolverTest)
testConstructorCause(org.apache.commons.math.analysis.ConvergenceExceptionTest)
testConstructorMessageCause(org.apache.commons.math.analysis.ConvergenceExceptionTest)
testConstructorMessage(org.apache.commons.math.analysis.ConvergenceExceptionTest)
testConstructor(org.apache.commons.math.analysis.ConvergenceExceptionTest)
testParameters(org.apache.commons.math.analysis.DividedDifferenceInterpolatorTest)
testSinFunction(org.apache.commons.math.analysis.DividedDifferenceInterpolatorTest)
testExpm1Function(org.apache.commons.math.analysis.DividedDifferenceInterpolatorTest)
testLinearFunction(org.apache.commons.math.analysis.LaguerreSolverTest)
testQuadraticFunction(org.apache.commons.math.analysis.LaguerreSolverTest)
testParameters(org.apache.commons.math.analysis.LaguerreSolverTest)
testQuinticFunction2(org.apache.commons.math.analysis.LaguerreSolverTest)
testQuinticFunction(org.apache.commons.math.analysis.LaguerreSolverTest)
testExpm1Function2(org.apache.commons.math.analysis.MullerSolverTest)
testParameters(org.apache.commons.math.analysis.MullerSolverTest)
testSinFunction(org.apache.commons.math.analysis.MullerSolverTest)
testQuinticFunction2(org.apache.commons.math.analysis.MullerSolverTest)
testExpm1Function(org.apache.commons.math.analysis.MullerSolverTest)
testSinFunction2(org.apache.commons.math.analysis.MullerSolverTest)
testQuinticFunction(org.apache.commons.math.analysis.MullerSolverTest)
testParameters(org.apache.commons.math.analysis.NevilleInterpolatorTest)
testSinFunction(org.apache.commons.math.analysis.NevilleInterpolatorTest)
testExpm1Function(org.apache.commons.math.analysis.NevilleInterpolatorTest)
testSerialization(org.apache.commons.math.analysis.NewtonSolverTest)
testQuinticZero(org.apache.commons.math.analysis.NewtonSolverTest)
testSinZero(org.apache.commons.math.analysis.NewtonSolverTest)
testLinearFunction(org.apache.commons.math.analysis.PolynomialFunctionLagrangeFormTest)
testQuadraticFunction(org.apache.commons.math.analysis.PolynomialFunctionLagrangeFormTest)
testParameters(org.apache.commons.math.analysis.PolynomialFunctionLagrangeFormTest)
testQuinticFunction(org.apache.commons.math.analysis.PolynomialFunctionLagrangeFormTest)
testLinearFunction(org.apache.commons.math.analysis.PolynomialFunctionNewtonFormTest)
testQuadraticFunction(org.apache.commons.math.analysis.PolynomialFunctionNewtonFormTest)
testParameters(org.apache.commons.math.analysis.PolynomialFunctionNewtonFormTest)
testQuinticFunction(org.apache.commons.math.analysis.PolynomialFunctionNewtonFormTest)
testQuadratic(org.apache.commons.math.analysis.PolynomialFunctionTest)
testConstants(org.apache.commons.math.analysis.PolynomialFunctionTest)
testQuintic(org.apache.commons.math.analysis.PolynomialFunctionTest)
testLinear(org.apache.commons.math.analysis.PolynomialFunctionTest)
testfirstDerivativeComparision(org.apache.commons.math.analysis.PolynomialFunctionTest)
testValues(org.apache.commons.math.analysis.PolynomialSplineFunctionTest)
testConstructor(org.apache.commons.math.analysis.PolynomialSplineFunctionTest)
testParameters(org.apache.commons.math.analysis.RiddersSolverTest)
testSinFunction(org.apache.commons.math.analysis.RiddersSolverTest)
testExpm1Function(org.apache.commons.math.analysis.RiddersSolverTest)
testQuinticFunction(org.apache.commons.math.analysis.RiddersSolverTest)
testParameters(org.apache.commons.math.analysis.RombergIntegratorTest)
testSinFunction(org.apache.commons.math.analysis.RombergIntegratorTest)
testQuinticFunction(org.apache.commons.math.analysis.RombergIntegratorTest)
testParameters(org.apache.commons.math.analysis.SimpsonIntegratorTest)
testSinFunction(org.apache.commons.math.analysis.SimpsonIntegratorTest)
testQuinticFunction(org.apache.commons.math.analysis.SimpsonIntegratorTest)
testInterpolateSin(org.apache.commons.math.analysis.SplineInterpolatorTest)
testInterpolateLinearDegenerateTwoSegment(org.apache.commons.math.analysis.SplineInterpolatorTest)
testIllegalArguments(org.apache.commons.math.analysis.SplineInterpolatorTest)
testInterpolateLinear(org.apache.commons.math.analysis.SplineInterpolatorTest)
testInterpolateLinearDegenerateThreeSegment(org.apache.commons.math.analysis.SplineInterpolatorTest)
testParameters(org.apache.commons.math.analysis.TrapezoidIntegratorTest)
testSinFunction(org.apache.commons.math.analysis.TrapezoidIntegratorTest)
testQuinticFunction(org.apache.commons.math.analysis.TrapezoidIntegratorTest)
testNewBrentSolverValid(org.apache.commons.math.analysis.UnivariateRealSolverFactoryImplTest)
testNewBisectionSolverValid(org.apache.commons.math.analysis.UnivariateRealSolverFactoryImplTest)
testNewBrentSolverNull(org.apache.commons.math.analysis.UnivariateRealSolverFactoryImplTest)
testNewBisectionSolverNull(org.apache.commons.math.analysis.UnivariateRealSolverFactoryImplTest)
testNewNewtonSolverNull(org.apache.commons.math.analysis.UnivariateRealSolverFactoryImplTest)
testNewNewtonSolverValid(org.apache.commons.math.analysis.UnivariateReal
|
{
"pile_set_name": "Github"
}
|
/***************************************************************************/
/* */
/* ftlcdfil.h */
/* */
/* FreeType API for color filtering of subpixel bitmap glyphs */
/* (specification). */
/* */
/* Copyright 2006-2018 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */
/* understand and accept it fully. */
/* */
/***************************************************************************/
#ifndef FTLCDFIL_H_
#define FTLCDFIL_H_
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_PARAMETER_TAGS_H
#ifdef FREETYPE_H
#error "freetype.h of FreeType 1 has been loaded!"
#error "Please fix the directory search order for header files"
#error "so that freetype.h of FreeType 2 is found first."
#endif
FT_BEGIN_HEADER
/***************************************************************************
*
* @section:
* lcd_filtering
*
* @title:
* LCD Filtering
*
* @abstract:
* Reduce color fringes of subpixel-rendered bitmaps.
*
* @description:
* Should you #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your
* `ftoption.h', which enables patented ClearType-style rendering,
* the LCD-optimized glyph bitmaps should be filtered to reduce color
* fringes inherent to this technology. The default FreeType LCD
* rendering uses different technology, and API described below,
* although available, does nothing.
*
* ClearType-style LCD rendering exploits the color-striped structure of
* LCD pixels, increasing the available resolution in the direction of
* the stripe (usually horizontal RGB) by a factor of~3. Since these
* subpixels are color pixels, using them unfiltered creates severe
* color fringes. Use the @FT_Library_SetLcdFilter API to specify a
* low-pass filter, which is then applied to subpixel-rendered bitmaps
* generated through @FT_Render_Glyph. The filter sacrifices some of
* the higher resolution to reduce color fringes, making the glyph image
* slightly blurrier. Positional improvements will remain.
*
* A filter should have two properties:
*
* 1) It should be normalized, meaning the sum of the 5~components
* should be 256 (0x100). It is possible to go above or under this
* target sum, however: going under means tossing out contrast, going
* over means invoking clamping and thereby non-linearities that
* increase contrast somewhat at the expense of greater distortion
* and color-fringing. Contrast is better enhanced through stem
* darkening.
*
* 2) It should be color-balanced, meaning a filter `{~a, b, c, b, a~}'
* where a~+ b~=~c. It distributes the computed coverage for one
* subpixel to all subpixels equally, sacrificing some won resolution
* but drastically reducing color-fringing. Positioning improvements
* remain! Note that color-fringing can only really be minimized
* when using a color-balanced filter and alpha-blending the glyph
* onto a surface in linear space; see @FT_Render_Glyph.
*
* Regarding the form, a filter can be a `boxy' filter or a `beveled'
* filter. Boxy filters are sharper but are less forgiving of non-ideal
* gamma curves of a screen (viewing angles!), beveled filters are
* fuzzier but more tolerant.
*
* Examples:
*
* - [0x10 0x40 0x70 0x40 0x10] is beveled and neither balanced nor
* normalized.
*
* - [0x1A 0x33 0x4D 0x33 0x1A] is beveled and balanced but not
* normalized.
*
* - [0x19 0x33 0x66 0x4c 0x19] is beveled and normalized but not
* balanced.
*
* - [0x00 0x4c 0x66 0x4c 0x00] is boxily beveled and normalized but not
* balanced.
*
* - [0x00 0x55 0x56 0x55 0x00] is boxy, normalized, and almost
* balanced.
*
* - [0x08 0x4D 0x56 0x4D 0x08] is beveled, normalized and, almost
* balanced.
*
* The filter affects glyph bitmaps rendered through @FT_Render_Glyph,
* @FT_Load_Glyph, and @FT_Load_Char. It does _not_ affect the output
* of @FT_Outline_Render and @FT_Outline_Get_Bitmap.
*
* If this feature is activated, the dimensions of LCD glyph bitmaps are
* either wider or taller than the dimensions of the corresponding
* outline with regard to the pixel grid. For example, for
* @FT_RENDER_MODE_LCD, the filter adds 3~subpixels to the left, and
* 3~subpixels to the right. The bitmap offset values are adjusted
* accordingly, so clients shouldn't need to modify their layout and
* glyph positioning code when enabling the filter.
*
* It is important to understand that linear alpha blending and gamma
* correction is critical for correctly rendering glyphs onto surfaces
* without artifacts and even more critical when subpixel rendering is
* involved.
*
* Each of the 3~alpha values (subpixels) is independently used to blend
* one color channel. That is, red alpha blends the red channel of the
* text color with the red channel of the background pixel. The
* distribution of density values by the color-balanced filter assumes
* alpha blending is done in linear space; only then color artifacts
* cancel out.
*/
/****************************************************************************
*
* @enum:
* FT_LcdFilter
*
* @description:
* A list of values to identify various types of LCD filters.
*
* @values:
* FT_LCD_FILTER_NONE ::
* Do not perform filtering. When used with subpixel rendering, this
* results in sometimes severe color fringes.
*
* FT_LCD_FILTER_DEFAULT ::
* The default filter reduces color fringes considerably, at the cost
* of a slight blurriness in the output.
*
* It is a beveled, normalized, and color-balanced five-tap filter
* that is more forgiving to screens with non-ideal gamma curves and
* viewing angles. Note that while color-fringing is reduced, it can
* only be minimized by using linear alpha blending and gamma
* correction to render glyphs onto surfaces. The default filter
* weights are [0x08 0x4D 0x56 0x4D 0x08].
*
* FT_LCD_FILTER_LIGHT ::
* The light filter is a variant that is sharper at the cost of
* slightly more color fringes than the default one.
*
* It is a boxy, normalized, and color-balanced three-tap filter that
* is less forgiving to screens with non-ideal gamma curves and
* viewing angles. This filter works best when the rendering system
* uses linear alpha blending and gamma correction to render glyphs
* onto surfaces. The
|
{
"pile_set_name": "Github"
}
|
<?php
$lang['L_NOFTPPOSSIBLE']="Es stehen keine FTP-Funktionen zur Verfügung!";
$lang['L_INFO_LOCATION']="Du befindest dich auf ";
$lang['L_INFO_DATABASES']="Folgende Datenbank(en) befinden sich auf dem MySql-Server:";
$lang['L_INFO_NODB']="Datenbank existiert nicht";
$lang['L_INFO_DBDETAIL']="Detail-Information von Datenbank ";
$lang['L_INFO_DBEMPTY']="Die Datenbank ist leer!";
$lang['L_INFO_RECORDS']="Datensätze";
$lang['L_INFO_SIZE']="Größe";
$lang['L_INFO_LASTUPDATE']="letztes Update";
$lang['L_INFO_SUM']="insgesamt";
$lang['L_INFO_OPTIMIZED']="optimiert";
$lang['L_OPTIMIZE_DATABASES']="Tabellen optimieren";
$lang['L_CHECK_TABLES']="Tabellen überprüfen";
$lang['L_CLEAR_DATABASE']="Datenbank leeren";
$lang['L_DELETE_DATABASE']="Datenbank löschen";
$lang['L_INFO_CLEARED']="wurde geleert";
$lang['L_INFO_DELETED']="wurde gelöscht";
$lang['L_INFO_EMPTYDB1']="Soll die Datenbank";
$lang['L_INFO_EMPTYDB2']=" wirklich geleert werden? (Achtung! Alle Daten gehen unwiderruflich verloren)";
$lang['L_INFO_KILLDB']=" wirklich gelöscht werden? (Achtung! Alle Daten gehen unwiderruflich verloren)";
$lang['L_PROCESSKILL1']="Es wird versucht, Prozess ";
$lang['L_PROCESSKILL2']="zu beenden.";
$lang['L_PROCESSKILL3']="Es wird seit ";
$lang['L_PROCESSKILL4']=" Sekunde(n) versucht, Prozess ";
$lang['L_HTACC_CREATE']="Verzeichnisschutz erstellen";
$lang['L_ENCRYPTION_TYPE']="Verschlüsselungsart";
$lang['L_HTACC_CRYPT']="Crypt maximal 8 Zeichen (Linux und Unix-Systeme)";
$lang['L_HTACC_MD5']="MD5 (Linux und Unix-Systeme)";
$lang['L_HTACC_NO_ENCRYPTION']="unverschlüsselt (Windows)";
$lang['L_HTACCESS8']="Es besteht bereits ein Verzeichnisschutz. Wenn Du einen neuen erstellst, wird der alte überschrieben!";
$lang['L_HTACC_NO_USERNAME']="Du musst einen Namen eingeben!";
$lang['L_PASSWORDS_UNEQUAL']="Die Passwörter sind nicht identisch oder leer!";
$lang['L_HTACC_CONFIRM_DELETE']="Soll der Verzeichnisschutz jetzt erstellt werden?";
$lang['L_HTACC_CREATED']="Der Verzeichnisschutz wurde erstellt.";
$lang['L_HTACC_CONTENT']="Inhalt der Datei";
$lang['L_HTACC_CREATE_ERROR']="Es ist ein Fehler bei der Erstellung des Verzeichnisschutzes aufgetreten!<br>Bitte erzeuge die Dateien manuell mit folgendem Inhalt";
$lang['L_HTACC_PROPOSED']="Dringend empfohlen";
$lang['L_HTACC_EDIT']=".htaccess editieren";
$lang['L_HTACCESS18']=".htaccess erstellen in ";
$lang['L_HTACCESS19']="Neu laden ";
$lang['L_HTACCESS20']="Skript ausführen";
$lang['L_HTACCESS21']="Handler zufügen";
$lang['L_HTACCESS22']="Ausführbar machen";
$lang['L_HTACCESS23']="Verzeichnis-Listing";
$lang['L_HTACCESS24']="Error-Dokument";
$lang['L_HTACCESS25']="Rewrite aktivieren";
$lang['L_HTACCESS26']="Deny / Allow";
$lang['L_HTACCESS27']="Redirect";
$lang['L_HTACCESS28']="Error-Log";
$lang['L_HTACCESS29']="weitere Beispiele und Dokumentation";
$lang['L_HTACCESS30']="Provider";
$lang['L_HTACCESS31']="allgemein";
$lang['L_HTACCESS32']="Achtung! Die .htaccess hat eine direkte Auswirkung auf den Browser.<br>Bei falscher Anwendung sind die Seiten nicht mehr erreichbar.";
$lang['L_PHPBUG']="Bug in zlib! Keine Kompression möglich!";
$lang['L_DISABLEDFUNCTIONS']="Abgeschaltete Funktionen";
$lang['L_NOGZPOSSIBLE']="Da zlib nicht installiert ist, stehen keine GZip-Funktionen zur Verfügung!";
$lang['L_DELETE_HTACCESS']="Verzeichnisschutz entfernen (.htaccess löschen)";
$lang['L_WRONG_RIGHTS']="Die Datei oder das Verzeichnis '%s' ist für mich nicht beschreibbar.<br>
Entweder hat sie/es den falschen Besitzer (Owner) oder die falschen Rechte (Chmod).<br>
Bitte setze die richtigen Attribute mit Deinem FTP-Programm. <br>
Die Datei oder das Verzeichnis benötigt die Rechte %s.<br>";
$lang['L_CANT_CREATE_DIR']="Ich konntes das Verzeichnis '%s' nicht erstellen.
Bitte erstelle es mit Deinem FTP-Programm.";
$lang['L_TABLE_TYPE']="Typ";
$lang['L_CHECK']="prüfen";
$lang['L_HTACC_SHA1']="SHA1 (alle Systeme)";
$lang['L_OS']="Betriebssystem";
$lang['L_MSD_VERSION']="MySQLDumper-Version";
$lang['L_MYSQL_VERSION']="MySQL-Version";
$lang['L_PHP_VERSION']="PHP-Version";
$lang['L_MAX_EXECUTION_TIME']="Maximale Ausführungszeit";
$lang['L_PHP_EXTENSIONS']="PHP-Erweiterungen";
$lang['L_MEMORY']="Speicher";
$lang['L_FILE_MISSING']="konnte Datei nicht finden";
?>
|
{
"pile_set_name": "Github"
}
|
/* (No Commment) */
"CFBundleName" = "餐厅";
|
{
"pile_set_name": "Github"
}
|
## run-all-benchmarks.pkg
# Compiled by:
# src/app/benchmarks/benchmarks.lib
stipulate
package bj = benchmark_junk; # benchmark_junk is from src/app/benchmarks/benchmark-junk.pkg
herein
package run_all_benchmarks {
#
fun run_all_benchmarks ()
=
{
r = ([]: List( bj::Benchmark_Result ));
# Linux times seem accurate to about 4ms
# so I tweak these to run about 400ms each
# to give us times accurate to roughly +-1%:
r = tagged_int_loop::run_benchmark 200000000 ! r; # tagged_int_loop is from src/app/benchmarks/tagged-int-loop.pkg
r = one_word_int_loop::run_benchmark 200000000 ! r; # one_word_int_loop is from src/app/benchmarks/one-word-int-loop.pkg
r = tagged_int_loops::run_benchmark 200 ! r; # tagged_int_loops is from src/app/benchmarks/tagged-int-loops.pkg
r = one_word_int_loops::run_benchmark 200 ! r; # one_word_int_loops is from src/app/benchmarks/one-word-int-loops.pkg
r = tagged_int_loop_with_overflow_trapping::run_benchmark 200000000 ! r; # tagged_int_loop is from src/app/benchmarks/tagged-int-loop.pkg
r = one_word_int_loop_with_overflow_trapping::run_benchmark 200000000 ! r; # one_word_int_loop is from src/app/benchmarks/one-word-int-loop.pkg
r = tagged_int_loops_with_overflow_trapping::run_benchmark 200 ! r; # tagged_int_loops is from src/app/benchmarks/tagged-int-loops.pkg
r = one_word_int_loops_with_overflow_trapping::run_benchmark 200 ! r; # one_word_int_loops is from src/app/benchmarks/one-word-int-loops.pkg
r = tagged_int_shellsort::run_benchmark 15000000 ! r; # tagged_int_shellsort is from src/app/benchmarks/tagged-int-shellsort.pkg
r = tagged_int_shellsort_no_bounds_checking::run_benchmark 15000000 ! r; # tagged_int_shellsort_no_bounds_checking is from src/app/benchmarks/tagged-int-shellsort.pkg
bj::summarize_all_benchmarks (reverse r);
};
my _ =
run_all_benchmarks ();
};
end;
|
{
"pile_set_name": "Github"
}
|
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build amd64,linux
// +build !gccgo
package unix
import "syscall"
//go:noescape
func gettimeofday(tv *Timeval) (err syscall.Errno)
|
{
"pile_set_name": "Github"
}
|
{% load static %}
<script src="{% static 'fiber/js/markitup-1.1.10/jquery.markitup.js' %}" type="text/javascript"></script>
<script src="{% static 'fiber/js/markitup-1.1.10/sets/textile_fiber/set.js' %}" type="text/javascript"></script>
<script src="{% static 'fiber/js/fiber.markitup.js' %}" type="text/javascript"></script>
|
{
"pile_set_name": "Github"
}
|
jsToolBar.strings = {};
jsToolBar.strings['Strong'] = 'Gras';
jsToolBar.strings['Italic'] = 'Italique';
jsToolBar.strings['Underline'] = 'Souligné';
jsToolBar.strings['Deleted'] = 'Rayé';
jsToolBar.strings['Code'] = 'Code en ligne';
jsToolBar.strings['Heading 1'] = 'Titre niveau 1';
jsToolBar.strings['Heading 2'] = 'Titre niveau 2';
jsToolBar.strings['Heading 3'] = 'Titre niveau 3';
jsToolBar.strings['Unordered list'] = 'Liste à puces';
jsToolBar.strings['Ordered list'] = 'Liste numérotée';
jsToolBar.strings['Quote'] = 'Citer';
jsToolBar.strings['Unquote'] = 'Supprimer citation';
jsToolBar.strings['Preformatted text'] = 'Texte préformaté';
jsToolBar.strings['Wiki link'] = 'Lien vers une page Wiki';
jsToolBar.strings['Image'] = 'Image';
|
{
"pile_set_name": "Github"
}
|
// Copyright (c) 2006 Foundation for Research and Technology-Hellas (Greece).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
// 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.
//
// Licensees holding a valid commercial license may use this file in
// accordance with the commercial license agreement provided with the software.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
//
// $URL$
// $Id$
//
//
// Author(s) : Menelaos Karavelas <mkaravel@iacm.forth.gr>
#ifndef CGAL_VORONOI_DIAGRAM_2_VALIDITY_TESTERS_H
#define CGAL_VORONOI_DIAGRAM_2_VALIDITY_TESTERS_H 1
#include <CGAL/license/Voronoi_diagram_2.h>
#include <CGAL/Voronoi_diagram_2/basic.h>
#include <algorithm>
#include <CGAL/Triangulation_utils_2.h>
#include <CGAL/Voronoi_diagram_2/Finder_classes.h>
namespace CGAL {
namespace VoronoiDiagram_2 { namespace Internal {
//=========================================================================
//=========================================================================
template<class VDA, class Base_it>
class Edge_validity_tester
{
// tests whether a halfedge has as face a face with zero area.
private:
const VDA* vda_;
private:
typedef Triangulation_cw_ccw_2 CW_CCW_2;
// Base_it is essentially VDA::Edges_iterator_base
typedef Base_it Edges_iterator_base;
typedef typename VDA::Halfedge_handle Halfedge_handle;
typedef typename VDA::Delaunay_graph::Vertex_handle Delaunay_vertex_handle;
public:
Edge_validity_tester(const VDA* vda = NULL) : vda_(vda) {}
bool operator()(const Edges_iterator_base& eit) const {
CGAL_assertion( !vda_->edge_rejector()(vda_->dual(), eit->dual()) );
int cw_i = CW_CCW_2::cw( eit->dual().second );
CGAL_assertion_code( int ccw_i = CW_CCW_2::ccw( eit->dual().second ); )
CGAL_assertion_code(Delaunay_vertex_handle v_ccw_i = eit->dual().first->vertex(ccw_i);)
CGAL_assertion( !vda_->face_rejector()(vda_->dual(), v_ccw_i) );
Delaunay_vertex_handle v_cw_i = eit->dual().first->vertex(cw_i);
if ( !vda_->face_rejector()(vda_->dual(), v_cw_i) ) {
return false;
}
Halfedge_handle he(eit);
Halfedge_handle he_opp = eit->opposite();
CGAL_assertion( he_opp->opposite() == he );
return he->face()->dual() < he_opp->face()->dual();
}
};
//=========================================================================
//=========================================================================
template<class VDA>
class Vertex_validity_tester
{
private:
const VDA* vda_;
private:
typedef typename VDA::Delaunay_graph::Face_handle Delaunay_face_handle;
typedef typename VDA::Delaunay_graph::Finite_faces_iterator
Delaunay_faces_iterator;
public:
Vertex_validity_tester(const VDA* vda = NULL) : vda_(vda) {}
bool operator()(const Delaunay_faces_iterator& fit) const {
Delaunay_face_handle f(fit);
Delaunay_face_handle fvalid = Find_valid_vertex<VDA>()(vda_,f);
return f != fvalid;
}
};
//=========================================================================
//=========================================================================
} } //namespace VoronoiDiagram_2::Internal
} //namespace CGAL
#endif // CGAL_VORONOI_DIAGRAM_2_VALIDITY_TESTERS_H
|
{
"pile_set_name": "Github"
}
|
# Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
#
# !!! IMPORTANT !!!
#
# Before you edit this file, please keep in mind that contributing to the project
# translations is possible ONLY via the Transifex online service.
#
# To submit your translations, visit https://www.transifex.com/ckeditor/ckeditor5.
#
# To learn more, check out the official contributor's guide:
# https://ckeditor.com/docs/ckeditor5/latest/framework/guides/contributing/contributing.html
#
msgid ""
msgstr ""
"Language-Team: Lithuanian (https://www.transifex.com/ckeditor/teams/11143/lt/)\n"
"Language: lt\n"
"Plural-Forms: nplurals=4; plural=(n % 10 == 1 && (n % 100 > 19 || n % 100 < 11) ? 0 : (n % 10 >= 2 && n % 10 <=9) && (n % 100 > 19 || n % 100 < 11) ? 1 : n % 1 != 0 ? 2: 3);\n"
msgctxt "Toolbar button tooltip for inserting an image or file via a CKFinder file browser."
msgid "Insert image or file"
msgstr "Įterpti vaizdą ar failą"
msgctxt "Error message displayed when inserting a resized version of an image failed."
msgid "Could not obtain resized image URL."
msgstr "Nepavyko gauti pakeisto dydžio paveiksliuko URL."
msgctxt "Title of a notification displayed when inserting a resized version of an image failed."
msgid "Selecting resized image failed"
msgstr "Nepavyko pasirinkti pakeisto vaizdo"
msgctxt "Error message displayed when an image cannot be inserted at the current position."
msgid "Could not insert image at the current position."
msgstr "Nepavyko įterpti vaizdo į dabartinę vietą."
msgctxt "Title of a notification displayed when an image cannot be inserted at the current position."
msgid "Inserting image failed"
msgstr "Nepavyko įterpti vaizdo"
|
{
"pile_set_name": "Github"
}
|
1
00:00:32,332 --> 00:00:37,337
♪♪~
2
00:00:37,337 --> 00:00:45,245
♪♪~
3
00:00:45,245 --> 00:00:49,349
(カメラのシャッター音)
4
00:00:49,349 --> 00:00:53,336
(小宮山志保)財布は現金のみ。
カード類 免許証 一切なし。
5
00:00:53,336 --> 00:00:56,373
(村瀬健吾)身元のわかる所持品は
一切なしか…。
6
00:00:56,373 --> 00:00:59,426
名無しの死体ってわけね。
7
00:00:59,426 --> 00:01:01,426
(村瀬)ああ。
8
00:01:03,363 --> 00:01:05,348
(浅輪直樹)
あれ? どうしたんですか?
9
00:01:05,348 --> 00:01:07,417
(加納倫太郎)プルタブ開いてるのに
全然飲んでない。
10
00:01:07,417 --> 00:01:09,417
本当ですね。
11
00:01:10,503 --> 00:01:12,503
どうして飲まなかったんだろう?
12
00:01:13,306 --> 00:01:17,360
(青柳 靖)
昨日 男の声を聞いたんですね?
13
00:01:17,360 --> 00:01:20,380
ええ そうなんです。
夕方6時過ぎに→
14
00:01:20,380 --> 00:01:24,351
犬の散歩に出たんですけど
この下の道に来た時に…。
15
00:01:24,351 --> 00:01:26,353
≪返してくれよ!
16
00:01:26,353 --> 00:01:28,338
(青柳)「返してくれ」か…。
17
00:01:28,338 --> 00:01:31,441
(早瀬川真澄)死因は
頭部を強打した事による脳挫傷。
18
00:01:31,441 --> 00:01:34,311
死亡推定時刻は
昨日の午後6時前後。
19
00:01:34,311 --> 00:01:37,330
ちょうど主婦が
男の声を聞いた時刻に一致するな。
20
00:01:37,330 --> 00:01:39,366
お疲れさまです。
あ お疲れさまです。
21
00:01:39,366 --> 00:01:43,353
現場の缶コーヒーの
分析結果が出ました。
22
00:01:43,353 --> 00:01:46,356
コーヒーの中から 致死量の
スリーパーが検出されました。
23
00:01:46,356 --> 00:01:48,358
ん? スリーパー?
24
00:01:48,358 --> 00:01:51,394
スリーパーは粉末状の合成麻薬。
25
00:01:51,394 --> 00:01:54,347
多量に摂取すると
心拍や血圧が低下して→
26
00:01:54,347 --> 00:01:56,299
眠るように死ねるって言われてる。
27
00:01:56,299 --> 00:01:59,336
最近 北欧経由で入ってきた
新しい麻薬で→
28
00:01:59,336 --> 00:02:02,372
まだ それほど
出回ってないはずなんだけど。
29
00:02:02,372 --> 00:02:05,342
浅輪君
缶コーヒーに付着してた指紋は?
30
00:02:05,342 --> 00:02:07,444
被害者の指紋と一致しました。
31
00:02:07,444 --> 00:02:10,444
あと 気になる事があるんです。
(志保)何?
32
00:02:12,365 --> 00:02:15,368
これと同じような
スリーパー入りの缶コーヒーを飲んで→
33
00:02:15,368 --> 00:02:17,320
死亡した遺体が
すでに3体発見されてます。
34
00:02:17,320 --> 00:02:21,408
えっ!?
所持品は現金入りの財布のみ。
35
00:02:21,408 --> 00:02:23,408
3体とも 身元がわからなかった。
36
00:02:24,344 --> 00:02:27,314
(青柳)けど なんで 3人とも
身元がわかんねえのかな?
37
00:02:27,314 --> 00:02:32,352
そうね。 身なりを見る限り
普通の生活者って感じなのにね。
38
00:02:32,352 --> 00:02:34,337
(矢沢英明)
まず最初に発見されたのが→
39
00:02:34,337 --> 00:02:38,341
Aさん。
発見されたのは4月2日 朝。
40
00:02:38,341 --> 00:02:41,244
死亡推定時刻は
前日の午後6時前後になります。
41
00:02:41,244 --> 00:02:44,364
場所 夕日の丘緑地。
42
00:02:44,364 --> 00:02:46,366
見た目
気持ちよく寝てるようにしか→
43
00:02:46,366 --> 00:02:50,353
見えないですね。
次に発見されたのがBさん。
44
00:02:50,353 --> 00:02:53,323
発見された日が5月11日 朝。
45
00:02:53,323 --> 00:02:57,360
死亡推定時刻
前夜の午後10時前後。
46
00:02:57,360 --> 00:03:00,363
場所 あすか台丘陵 展望広場。
47
00:03:00,363 --> 00:03:03,450
知ってる ここ!
星 すっごいきれいに見えるのよ。
48
00:03:03,450 --> 00:03:06,450
星? 星とか見るのか? 小宮山君。
49
00:03:07,253 --> 00:03:09,272
(志保)悪い?
(村瀬)いや…。
50
00:03:09,272 --> 00:03:11,341
矢沢 次。
51
00:03:11,341 --> 00:03:14,327
で 3番目に発見されたのが
Cさん。
|
{
"pile_set_name": "Github"
}
|
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _LIBSPL_LIBDEVINFO_H
#define _LIBSPL_LIBDEVINFO_H
#endif /* _LIBSPL_LIBDEVINFO_H */
|
{
"pile_set_name": "Github"
}
|
; Joomla! Project
; Copyright (C) 2005 - 2017 Open Source Matters. All rights reserved.
; License GNU General Public License version 2 or later; see LICENSE.txt, see LICENSE.php
; Note : All ini files need to be saved as UTF-8
COM_POSTINSTALL="Post-installation Messages"
COM_POSTINSTALL_BTN_HIDE="Hide this message"
COM_POSTINSTALL_BTN_RESET="Reset Messages"
COM_POSTINSTALL_CONFIGURATION="Post-installation Messages: Options"
COM_POSTINSTALL_LBL_MESSAGES="Post-installation and Upgrade Messages"
COM_POSTINSTALL_LBL_NOMESSAGES_DESC="You have read all the messages."
COM_POSTINSTALL_LBL_NOMESSAGES_TITLE="No Messages"
COM_POSTINSTALL_LBL_RELEASENEWS="Release news <a href="_QQ_"https://www.joomla.org/announcements/release-news.html"_QQ_">from the Joomla! Project</a>"
COM_POSTINSTALL_LBL_SINCEVERSION="Since version %s"
COM_POSTINSTALL_MESSAGES_FOR="Showing messages for"
COM_POSTINSTALL_MESSAGES_TITLE="Post-installation Messages for %s"
COM_POSTINSTALL_XML_DESCRIPTION="Displays post-installation and post-upgrade messages for Joomla and its extensions."
|
{
"pile_set_name": "Github"
}
|
// Copyright 2008 The Closure Library Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/**
* @fileoverview An alternative custom button renderer that uses even more CSS
* voodoo than the default implementation to render custom buttons with fake
* rounded corners and dimensionality (via a subtle flat shadow on the bottom
* half of the button) without the use of images.
*
* Based on the Custom Buttons 3.1 visual specification, see
* http://go/custombuttons
*
* @author eae@google.com (Emil A Eklund)
* @see ../demos/imagelessbutton.html
*/
goog.provide('goog.ui.ImagelessButtonRenderer');
goog.require('goog.dom.classes');
goog.require('goog.ui.Button');
goog.require('goog.ui.ControlContent');
goog.require('goog.ui.CustomButtonRenderer');
goog.require('goog.ui.INLINE_BLOCK_CLASSNAME');
goog.require('goog.ui.registry');
/**
* Custom renderer for {@link goog.ui.Button}s. Imageless buttons can contain
* almost arbitrary HTML content, will flow like inline elements, but can be
* styled like block-level elements.
*
* @constructor
* @extends {goog.ui.CustomButtonRenderer}
*/
goog.ui.ImagelessButtonRenderer = function() {
goog.ui.CustomButtonRenderer.call(this);
};
goog.inherits(goog.ui.ImagelessButtonRenderer, goog.ui.CustomButtonRenderer);
/**
* The singleton instance of this renderer class.
* @type {goog.ui.ImagelessButtonRenderer?}
* @private
*/
goog.ui.ImagelessButtonRenderer.instance_ = null;
goog.addSingletonGetter(goog.ui.ImagelessButtonRenderer);
/**
* Default CSS class to be applied to the root element of components rendered
* by this renderer.
* @type {string}
*/
goog.ui.ImagelessButtonRenderer.CSS_CLASS =
goog.getCssName('goog-imageless-button');
/**
* Returns the button's contents wrapped in the following DOM structure:
* <div class="goog-inline-block goog-imageless-button">
* <div class="goog-inline-block goog-imageless-button-outer-box">
* <div class="goog-imageless-button-inner-box">
* <div class="goog-imageless-button-pos-box">
* <div class="goog-imageless-button-top-shadow"> </div>
* <div class="goog-imageless-button-content">Contents...</div>
* </div>
* </div>
* </div>
* </div>
* @override
*/
goog.ui.ImagelessButtonRenderer.prototype.createDom;
/** @override */
goog.ui.ImagelessButtonRenderer.prototype.getContentElement = function(
element) {
return /** @type {Element} */ (element && element.firstChild &&
element.firstChild.firstChild &&
element.firstChild.firstChild.firstChild.lastChild);
};
/**
* Takes a text caption or existing DOM structure, and returns the content
* wrapped in a pseudo-rounded-corner box. Creates the following DOM structure:
* <div class="goog-inline-block goog-imageless-button-outer-box">
* <div class="goog-inline-block goog-imageless-button-inner-box">
* <div class="goog-imageless-button-pos">
* <div class="goog-imageless-button-top-shadow"> </div>
* <div class="goog-imageless-button-content">Contents...</div>
* </div>
* </div>
* </div>
* Used by both {@link #createDom} and {@link #decorate}. To be overridden
* by subclasses.
* @param {goog.ui.ControlContent} content Text caption or DOM structure to wrap
* in a box.
* @param {goog.dom.DomHelper} dom DOM helper, used for document interaction.
* @return {Element} Pseudo-rounded-corner box containing the content.
* @override
*/
goog.ui.ImagelessButtonRenderer.prototype.createButton = function(content,
dom) {
var baseClass = this.getCssClass();
var inlineBlock = goog.ui.INLINE_BLOCK_CLASSNAME + ' ';
return dom.createDom('div',
inlineBlock + goog.getCssName(baseClass, 'outer-box'),
dom.createDom('div',
inlineBlock + goog.getCssName(baseClass, 'inner-box'),
dom.createDom('div', goog.getCssName(baseClass, 'pos'),
dom.createDom('div', goog.getCssName(baseClass, 'top-shadow'),
'\u00A0'),
dom.createDom('div', goog.getCssName(baseClass, 'content'),
content))));
};
/**
* Check if the button's element has a box structure.
* @param {goog.ui.Button} button Button instance whose structure is being
* checked.
* @param {Element} element Element of the button.
* @return {boolean} Whether the element has a box structure.
* @protected
* @override
*/
goog.ui.ImagelessButtonRenderer.prototype.hasBoxStructure = function(
button, element) {
var outer = button.getDomHelper().getFirstElementChild(element);
var outerClassName = goog.getCssName(this.getCssClass(), 'outer-box');
if (outer && goog.dom.classes.has(outer, outerClassName)) {
var inner = button.getDomHelper().getFirstElementChild(outer);
var innerClassName = goog.getCssName(this.getCssClass(), 'inner-box');
if (inner && goog.dom.classes.has(inner, innerClassName)) {
var pos = button.getDomHelper().getFirstElementChild(inner);
var posClassName = goog.getCssName(this.getCssClass(), 'pos');
if (pos && goog.dom.classes.has(pos, posClassName)) {
var shadow = button.getDomHelper().getFirstElementChild(pos);
var shadowClassName = goog.getCssName(
this.getCssClass(), 'top-shadow');
if (shadow && goog.dom.classes.has(shadow, shadowClassName)) {
var content = button.getDomHelper().getNextElementSibling(shadow);
var contentClassName = goog.getCssName(
this.getCssClass(), 'content');
if (content && goog.dom.classes.has(content, contentClassName)) {
// We have a proper box structure.
return true;
}
}
}
}
}
return false;
};
/**
* Returns the CSS class to be applied to the root element of components
* rendered using this renderer.
* @return {string} Renderer-specific CSS class.
* @override
*/
goog.ui.ImagelessButtonRenderer.prototype.getCssClass = function() {
return goog.ui.ImagelessButtonRenderer.CSS_CLASS;
};
// Register a decorator factory function for goog.ui.ImagelessButtonRenderer.
goog.ui.registry.setDecoratorByClassName(
goog.ui.ImagelessButtonRenderer.CSS_CLASS,
function() {
return new goog.ui.Button(null,
goog.ui.ImagelessButtonRenderer.getInstance());
});
// Register a decorator factory function for toggle buttons using the
// goog.ui.ImagelessButtonRenderer.
goog.ui.registry.setDecoratorByClassName(
goog.getCssName('goog-imageless-toggle-button'),
function() {
var button = new goog.ui.Button(
|
{
"pile_set_name": "Github"
}
|
//
// LMJCalendarViewController.m
// PLMMPRJK
//
// Created by HuXuPeng on 2017/5/7.
// Copyright © 2017年 GoMePrjk. All rights reserved.
//
#import "LMJCalendarViewController.h"
#import "LMJEventTool.h"
@interface LMJCalendarViewController ()
@end
@implementation LMJCalendarViewController
- (void)viewDidLoad {
[super viewDidLoad];
LMJWeak(self);
LMJEventModel *eventModel = [[LMJEventModel alloc] init];
// @property (nonatomic, strong) NSString *title; //标题
// @property (nonatomic, strong) NSString *location; //地点
//@"yyyy-MM-dd HH:mm"
// @property (nonatomic, strong) NSString *startDateStr; //开始时间
// @property (nonatomic, strong) NSString *endDateStr; //结束时间
// @property (nonatomic, assign) BOOL allDay; //是否全天
// @property (nonatomic, strong) NSString *notes; //备注
// if (alarmStr.length == 0) {
// alarmTime = 0;
// } else if ([alarmStr isEqualToString:@"不提醒"]) {
// alarmTime = 0;
// } else if ([alarmStr isEqualToString:@"1分钟前"]) {
// alarmTime = 60.0 * -1.0f;
// } else if ([alarmStr isEqualToString:@"10分钟前"]) {
// alarmTime = 60.0 * -10.f;
// } else if ([alarmStr isEqualToString:@"30分钟前"]) {
// alarmTime = 60.0 * -30.f;
// } else if ([alarmStr isEqualToString:@"1小时前"]) {
// alarmTime = 60.0 * -60.f;
// } else if ([alarmStr isEqualToString:@"1天前"]) {
// alarmTime = 60.0 * - 60.f * 24;
// @property (nonatomic, strong) NSString *alarmStr; //提醒
eventModel.title = @"eventModel标题";
eventModel.location = @"BeiJing";
eventModel.startDateStr = @"2018-04-05 19:10";
eventModel.endDateStr = @"2018-04-05 20:10";
eventModel.allDay = YES;
eventModel.notes = @"eventModel备注";
eventModel.alarmStr = @"1小时前";
self.addItem([LMJWordItem itemWithTitle:@"事件标题: " subTitle:@"" itemOperation:nil])
.addItem([LMJWordItem itemWithTitle:@"增加日历事件" subTitle: nil itemOperation:^(NSIndexPath *indexPath) {
[[LMJEventTool sharedEventTool] createEventWithEventModel:eventModel];
[weakself.view makeToast:@"增加了"];
}])
.addItem([LMJWordItem itemWithTitle:@"查找" subTitle: nil itemOperation:^(NSIndexPath *indexPath) {
EKEvent *event = [[LMJEventTool sharedEventTool] getEventWithEKEventModel:eventModel];
weakself.sections.firstObject.items.firstObject.subTitle = event.title;
[weakself.tableView reloadRow:0 inSection:0 withRowAnimation:0];
}])
.addItem([LMJWordItem itemWithTitle:@"删除" subTitle:nil itemOperation:^(NSIndexPath *indexPath) {
BOOL isDeleted = [[LMJEventTool sharedEventTool] deleteEvent:eventModel];
if (isDeleted) {
[weakself.view makeToast:@"删除成功"];
weakself.sections.firstObject.items.firstObject.subTitle = nil;
[weakself.tableView reloadRow:0 inSection:0 withRowAnimation:0];
}else {
[weakself.view makeToast:@"删除失败"];
}
}]);
}
#pragma mark - LMJNavUIBaseViewControllerDataSource
/** 导航条左边的按钮 */
- (UIImage *)lmjNavigationBarLeftButtonImage:(UIButton *)leftButton navigationBar:(LMJNavigationBar *)navigationBar
{
[leftButton setImage:[UIImage imageNamed:@"NavgationBar_white_back"] forState:UIControlStateHighlighted];
return [UIImage imageNamed:@"NavgationBar_blue_back"];
}
#pragma mark - LMJNavUIBaseViewControllerDelegate
/** 左边的按钮的点击 */
-(void)leftButtonEvent:(UIButton *)sender navigationBar:(LMJNavigationBar *)navigationBar
{
[self.navigationController popViewControllerAnimated:YES];
}
@end
|
{
"pile_set_name": "Github"
}
|
using System;
using System.Text;
using System.Collections.Generic;
using System.IO;
using System.Windows.Forms;
using DotSpatial.Positioning;
namespace Diagnostics
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
}
}
}
|
{
"pile_set_name": "Github"
}
|
<!DOCTYPE html>
<!-- this file is auto-generated. DO NOT EDIT.
/*
** Copyright (c) 2012 The Khronos Group Inc.
**
** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the
** "Materials"), to deal in the Materials without restriction, including
** without limitation the rights to use, copy, modify, merge, publish,
** distribute, sublicense, and/or sell copies of the Materials, and to
** permit persons to whom the Materials are furnished to do so, subject to
** the following conditions:
**
** The above copyright notice and this permission notice shall be included
** in all copies or substantial portions of the Materials.
**
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
*/
-->
<html>
<head>
<meta charset="utf-8">
<title>WebGL GLSL conformance test: operators_001_to_008.html</title>
<link rel="stylesheet" href="../../../../resources/js-test-style.css" />
<link rel="stylesheet" href="../../../resources/ogles-tests.css" />
<script src="../../../../resources/js-test-pre.js"></script>
<script src="../../../resources/webgl-test.js"></script>
<script src="../../../resources/webgl-test-utils.js"></script>
<script src="../../ogles-utils.js"></script>
</head>
<body>
<canvas id="example" width="500" height="500" style="width: 16px; height: 16px;"></canvas>
<div id="description"></div>
<div id="console"></div>
</body>
<script>
"use strict";
OpenGLESTestRunner.run({
"tests": [
{
"referenceProgram": {
"vertexShader": "../default/default.vert",
"uniforms": {
"result": {
"count": 1,
"type": "uniform4fv",
"value": [
1.0,
1.0,
1.0,
1.0
]
}
},
"fragmentShader": "../default/expected.frag"
},
"model": null,
"testProgram": {
"vertexShader": "../default/default.vert",
"fragmentShader": "postfixincrement_frag.frag"
},
"name": "postfixincrement_frag.test.html",
"pattern": "compare"
},
{
"referenceProgram": {
"vertexShader": "../default/default.vert",
"uniforms": {
"result": {
"count": 1,
"type": "uniform4fv",
"value": [
1.0,
1.0,
1.0,
1.0
]
}
},
"fragmentShader": "../default/expected.frag"
},
"model": null,
"testProgram": {
"vertexShader": "postfixincrement_vert.vert",
"fragmentShader": "../default/default.frag"
},
"name": "postfixincrement_vert.test.html",
"pattern": "compare"
},
{
"referenceProgram": {
"vertexShader": "../default/default.vert",
"uniforms": {
"result": {
"count": 1,
"type": "uniform4fv",
"value": [
1.0,
1.0,
1.0,
1.0
]
}
},
"fragmentShader": "../default/expected.frag"
},
"model": null,
"testProgram": {
"vertexShader": "../default/default.vert",
"fragmentShader": "postfixdecrement_frag.frag"
},
"name": "postfixdecrement_frag.test.html",
"pattern": "compare"
},
{
"referenceProgram": {
"vertexShader": "../default/default.vert",
"uniforms": {
"result": {
"count": 1,
"type": "uniform4fv",
"value": [
1.0,
1.0,
1.0,
1.0
]
}
},
"fragmentShader": "../default/expected.frag"
},
"model": null,
"testProgram": {
"vertexShader": "postfixdecrement_vert.vert",
"fragmentShader": "../default/default.frag"
},
"name": "postfixdecrement_vert.test.html",
"pattern": "compare"
},
{
"referenceProgram": {
"vertexShader": "../default/default.vert",
"uniforms": {
"result": {
"count": 1,
"type": "uniform4fv",
"value": [
1.0,
1.0,
1.0,
1.0
]
}
},
"fragmentShader": "../default/expected.frag"
},
"model": null,
"testProgram": {
"vertexShader": "../default/default.vert",
"fragmentShader": "prefixincrement_frag.frag"
},
"name": "prefixincrement_frag.test.html",
"pattern": "compare"
},
{
"referenceProgram": {
"vertexShader": "../default/default.vert",
"uniforms": {
"result": {
"count": 1,
"type": "uniform4fv",
"value": [
1.0,
1.0,
1.0,
1.0
]
}
},
"fragmentShader": "../default/expected.frag"
},
"model": null,
"testProgram": {
"vertexShader": "prefixincrement_vert.vert",
"fragmentShader": "../default/default.frag"
},
"name": "prefixincrement_vert.test.html",
"pattern": "compare"
},
{
"referenceProgram": {
"vertexShader": "../default/default.vert",
"uniforms": {
"result": {
"count": 1,
"type": "uniform4fv",
"value": [
1.0,
1.0,
1.0,
1.0
]
}
},
"fragmentShader": "../default/expected.frag"
},
"model": null,
"testProgram": {
"vertexShader": "../default/default.vert",
"fragmentShader": "prefixdecrement_frag.frag"
},
"name": "prefixdecrement_frag.test.html",
"pattern": "compare"
},
{
"referenceProgram": {
"vertexShader": "../default/default.vert",
"uniforms": {
"result": {
"count": 1,
"type": "uniform4fv",
"value": [
1.0,
1.0,
1.0,
1.0
]
}
},
"fragmentShader": "../default/expected.frag"
},
"model": null,
"testProgram": {
"vertexShader": "prefixdecrement_vert.vert",
"fragmentShader": "../default/default.frag"
},
"name": "prefixdecrement_vert.test.html",
"pattern": "compare"
}
]
});
var successfullyParsed = true;
</script>
</html>
|
{
"pile_set_name": "Github"
}
|
--[[
文件:classical-ai.lua
主题:经典战术
]]--
--[[
PART 00:常用工具函数
]]--
--判断卡牌的花色是否相符
function MatchSuit(card, suit_table)
if #suit_table > 0 then
local cardsuit = card:getSuit()
for _,suit in pairs(suit_table) do
if cardsuit == suit then
return true
end
end
end
return false
end
--判断卡牌的类型是否相符
function MatchType(card, type_table)
if type(suit_table) == "string" then
type_table = type_table:split("|")
end
if #type_table > 0 then
for _,cardtype in pairs(type_table) do
if card:isKindOf(cardtype) then
return true
end
end
end
return false
end
--[[
PART 01:3V3经典战术
内容:黄金一波流、绝情阵
]]--
--黄金一波流--
--相关信息
sgs.GoldenWaveDetail = {
KurouActor = {}, --苦肉执行者
YijiActor = {}, --遗计执行者
JijiuActor = {}, --急救执行者
EruptSignal = {}, --起爆信号(五谷丰登中,急救执行者得到的红色牌)
}
--判断是否使用黄金一波流
function GoldenWaveStart(self)
local huanggai = self.player
local room = huanggai:getRoom()
sgs.GoldenWaveDetail.EruptSignal = {}
if huanggai:hasSkill("kurou") then
local guojia, huatuo
if #self.friends_noself > 1 then
for _,friend in pairs(self.friends_noself) do
if friend:hasSkill("yiji") then
guojia = friend
elseif friend:hasSkill("jijiu") then
huatuo = friend
else
room:setPlayerMark(friend, "GWF_Forbidden", 1)
end
end
end
if guojia and huatuo then
sgs.GoldenWaveDetail.KurouActor = {huanggai:objectName()}
sgs.GoldenWaveDetail.YijiActor = {guojia:objectName()}
sgs.GoldenWaveDetail.JijiuActor = {huatuo:objectName()}
room:setPlayerMark(huanggai, "GoldenWaveFlow", 1)
room:setPlayerMark(guojia, "GoldenWaveFlow", 1)
room:setPlayerMark(huatuo, "GoldenWaveFlow", 1)
return true
else
sgs.GoldenWaveDetail.KurouActor = {}
sgs.GoldenWaveDetail.YijiActor = {}
sgs.GoldenWaveDetail.JijiuActor = {}
room:setPlayerMark(huanggai, "GWF_Forbidden", 1)
return false
end
end
room:setPlayerMark(huanggai, "GWF_Forbidden", 1)
return false
end
--黄金苦肉
function GWFKurouTurnUse(self)
local huanggai = self.player
local released = sgs.GoldenWaveDetail.EruptSignal["Released"]
if released then
if self.getHp() > 1 then
return sgs.Card_Parse("@KurouCard=.")
end
else
return sgs.Card_Parse("@KurouCard=.")
end
end
--黄金遗计
function GWFYijiAsk(player, card_ids)
local guojia = self.player
local released = sgs.GoldenWaveDetail.EruptSignal["Released"]
local huanggai = sgs.GoldenWaveDetail.KurouActor[1]
local huatuo = sgs.GoldenWaveDetail.JijiuActor[1]
if released then
for _,id in ipairs(card_ids) do
return huanggai, id
end
else
for _,id in ipairs(card_ids) do
local card = sgs.Sanguosha:getCard(id)
if MatchType(card, "Crossbow|AOE|Duel") then
return huanggai, id
elseif card:isRed() and huatuo:isAlive() then
return huatuo, id
else
return huanggai, id
end
end
end
end
--黄金急救
function GWFJijiuSignal(card, player, card_place)
local huatuo = player
if #EruptSignal > 0 then
if card:getId() == EruptSignal[1] then
local cards = player:getCards("he")
for _,id in sgs.qlist(cards) do
if id ~= EruptSignal[1] then
local acard = sgs.Sanguosha:getCard(id)
if acard:isRed() then
return false
end
end
end
sgs.GoldenWaveDetail.EruptSignal["Released"] = card:getId()
end
end
return true
end
--命苦的郭嘉(未完成)
--绝情阵
--相关信息
sgs.RuthlessDetail = {
JianxiongActor = {}, --奸雄执行者
TianxiangActor = {}, --天香执行者
YijiActor = {}, --遗计执行者
}
--判断是否使用绝情阵
function RuthlessStart(self)
local caocao = self.player
local room = caocao:getRoom()
if caocao:hasSkill("jianxiong") then
local xiaoqiao, guojia
if #self.friends_noself > 1 then
for _,friend in pairs(self.friends_noself) do
if friend:hasSkill("yiji") then
guojia = friend
elseif friend:hasSkill("tianxiang") then
xiaoqiao = friend
else
room:setPlayerMark(friend, "RL_Forbidden", 1)
end
end
end
if xiaoqiao and guojia then
sgs.RuthlessDetail.JianxiongActor = {caocao:objectName()}
sgs.RuthlessDetail.TianxiangActor = {xiaoqiao:objectName()}
sgs.RuthlessDetail.YijiActor = {guojia:objectName()}
room:setPlayerMark(caocao, "Ruthless", 1)
room:setPlayerMark(guojia, "Ruthless", 1)
room:setPlayerMark(xiaoqiao, "Ruthless", 1)
return true
else
sgs.RuthlessDetail.JianxiongActor = {}
sgs.RuthlessDetail.TianxiangActor = {}
sgs.RuthlessDetail.YijiActor = {}
room:setPlayerMark(caocao, "RL_Forbidden", 1)
return false
end
end
room:setPlayerMark(caocao, "RL_Forbidden", 1)
return false
end
--绝情天香
function RLTianxiangSkillUse(self, data)
local xiaoqiao = self.player
local caocao = sgs.RuthlessDetail.JianxiongActor[1]
local damage = data
if damage then
local aoe = damage.card
if aoe and a
|
{
"pile_set_name": "Github"
}
|
//
// detail/winrt_ssocket_service.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef ASIO_DETAIL_WINRT_SSOCKET_SERVICE_HPP
#define ASIO_DETAIL_WINRT_SSOCKET_SERVICE_HPP
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
#if defined(ASIO_WINDOWS_RUNTIME)
#include "asio/error.hpp"
#include "asio/io_service.hpp"
#include "asio/detail/addressof.hpp"
#include "asio/detail/winrt_socket_connect_op.hpp"
#include "asio/detail/winrt_ssocket_service_base.hpp"
#include "asio/detail/winrt_utils.hpp"
#include "asio/detail/push_options.hpp"
namespace clmdep_asio {
namespace detail {
template <typename Protocol>
class winrt_ssocket_service :
public winrt_ssocket_service_base
{
public:
// The protocol type.
typedef Protocol protocol_type;
// The endpoint type.
typedef typename Protocol::endpoint endpoint_type;
// The native type of a socket.
typedef Windows::Networking::Sockets::StreamSocket^ native_handle_type;
// The implementation type of the socket.
struct implementation_type : base_implementation_type
{
// Default constructor.
implementation_type()
: base_implementation_type(),
protocol_(endpoint_type().protocol())
{
}
// The protocol associated with the socket.
protocol_type protocol_;
};
// Constructor.
winrt_ssocket_service(clmdep_asio::io_service& io_service)
: winrt_ssocket_service_base(io_service)
{
}
// Move-construct a new socket implementation.
void move_construct(implementation_type& impl,
implementation_type& other_impl)
{
this->base_move_construct(impl, other_impl);
impl.protocol_ = other_impl.protocol_;
other_impl.protocol_ = endpoint_type().protocol();
}
// Move-assign from another socket implementation.
void move_assign(implementation_type& impl,
winrt_ssocket_service& other_service,
implementation_type& other_impl)
{
this->base_move_assign(impl, other_service, other_impl);
impl.protocol_ = other_impl.protocol_;
other_impl.protocol_ = endpoint_type().protocol();
}
// Move-construct a new socket implementation from another protocol type.
template <typename Protocol1>
void converting_move_construct(implementation_type& impl,
typename winrt_ssocket_service<
Protocol1>::implementation_type& other_impl)
{
this->base_move_construct(impl, other_impl);
impl.protocol_ = protocol_type(other_impl.protocol_);
other_impl.protocol_ = typename Protocol1::endpoint().protocol();
}
// Open a new socket implementation.
clmdep_asio::error_code open(implementation_type& impl,
const protocol_type& protocol, clmdep_asio::error_code& ec)
{
if (is_open(impl))
{
ec = clmdep_asio::error::already_open;
return ec;
}
try
{
impl.socket_ = ref new Windows::Networking::Sockets::StreamSocket;
impl.protocol_ = protocol;
ec = clmdep_asio::error_code();
}
catch (Platform::Exception^ e)
{
ec = clmdep_asio::error_code(e->HResult,
clmdep_asio::system_category());
}
return ec;
}
// Assign a native socket to a socket implementation.
clmdep_asio::error_code assign(implementation_type& impl,
const protocol_type& protocol, const native_handle_type& native_socket,
clmdep_asio::error_code& ec)
{
if (is_open(impl))
{
ec = clmdep_asio::error::already_open;
return ec;
}
impl.socket_ = native_socket;
impl.protocol_ = protocol;
ec = clmdep_asio::error_code();
return ec;
}
// Bind the socket to the specified local endpoint.
clmdep_asio::error_code bind(implementation_type&,
const endpoint_type&, clmdep_asio::error_code& ec)
{
ec = clmdep_asio::error::operation_not_supported;
return ec;
}
// Get the local endpoint.
endpoint_type local_endpoint(const implementation_type& impl,
clmdep_asio::error_code& ec) const
{
endpoint_type endpoint;
endpoint.resize(do_get_endpoint(impl, true,
endpoint.data(), endpoint.size(), ec));
return endpoint;
}
// Get the remote endpoint.
endpoint_type remote_endpoint(const implementation_type& impl,
clmdep_asio::error_code& ec) const
{
endpoint_type endpoint;
endpoint.resize(do_get_endpoint(impl, false,
endpoint.data(), endpoint.size(), ec));
return endpoint;
}
// Set a socket option.
template <typename Option>
clmdep_asio::error_code set_option(implementation_type& impl,
const Option& option, clmdep_asio::error_code& ec)
{
return do_set_option(impl, option.level(impl.protocol_),
option.name(impl.protocol_), option.data(impl.protocol_),
option.size(impl.protocol_), ec);
}
// Get a socket option.
template <typename Option>
clmdep_asio::error_code get_option(const implementation_type& impl,
Option& option, clmdep_asio::error_code& ec) const
{
std::size_t size = option.size(impl.protocol_);
do_get_option(impl, option.level(impl.protocol_),
option.name(impl.protocol_),
option.data(impl.protocol_), &size, ec);
if (!ec)
option.resize(impl.protocol_, size);
return ec;
}
// Connect the socket to the specified endpoint.
clmdep_asio::error_code connect(implementation_type& impl,
const endpoint_type& peer_endpoint, clmdep_asio::error_code& ec)
{
return do_connect(impl, peer_endpoint.data(), ec);
}
// Start an asynchronous connect.
template <typename Handler>
void async_connect(implementation_type& impl,
const endpoint_type& peer_endpoint, Handler& handler)
{
bool is_continuation =
clmdep_asio_handler_cont_helpers::is_continuation(handler);
// Allocate and construct an operation to wrap the handler.
typedef winrt_socket_connect_op<Handler> op;
typename op::ptr p = { clmdep_asio::detail::addressof(handler),
clmdep_asio_handler_alloc_helpers::allocate(
sizeof(op), handler), 0 };
p.p = new (p.v) op(handler);
ASIO_HANDLER_CREATION((p.p, "socket", &impl, "async_connect"));
start_connect_op(impl, peer_endpoint.data(), p.p, is_continuation);
p.v = p.p = 0;
}
};
} // namespace detail
} // namespace clmdep_
|
{
"pile_set_name": "Github"
}
|
{
"jsonSchemaSemanticVersion": "1.0.0",
"imports": [
{
"corpusPath": "cdm:/foundations.1.1.cdm.json"
},
{
"corpusPath": "/core/operationsCommon/Common.1.0.cdm.json",
"moniker": "base_Common"
},
{
"corpusPath": "/core/operationsCommon/DataEntityView.1.0.cdm.json",
"moniker": "base_DataEntityView"
},
{
"corpusPath": "/core/operationsCommon/Tables/SupplyChain/ProductInformationManagement/Main/InventTable.1.0.cdm.json"
},
{
"corpusPath": "/core/operationsCommon/Tables/SupplyChain/ProcurementAndSourcing/WorksheetHeader/PurchTable.1.0.cdm.json"
},
{
"corpusPath": "/core/operationsCommon/Tables/SupplyChain/ProcurementAndSourcing/Transaction/VendPackingSlipJour.1.0.cdm.json"
},
{
"corpusPath": "/core/operationsCommon/Tables/SupplyChain/ProcurementAndSourcing/Transaction/VendPackingSlipTrans.1.0.cdm.json"
},
{
"corpusPath": "/core/operationsCommon/Tables/Finance/Ledger/Main/CompanyInfo.1.0.cdm.json"
}
],
"definitions": [
{
"entityName": "PurchPackingSlipTmp",
"extendsEntity": "base_Common/Common",
"exhibitsTraits": [
{
"traitReference": "is.CDM.entityVersion",
"arguments": [
{
"name": "versionNumber",
"value": "1.0"
}
]
}
],
"hasAttributes": [
{
"name": "ExternalItemNum",
"dataType": "ExternalItemId",
"isNullable": true,
"description": ""
},
{
"name": "InventDimPrint",
"dataType": "FreeTxt",
"isNullable": true,
"description": ""
},
{
"name": "InventDimProduct",
"dataType": "InventDimPrint",
"isNullable": true,
"description": ""
},
{
"name": "ItemId",
"dataType": "ItemId",
"isNullable": true,
"description": ""
},
{
"name": "JournalRecId",
"dataType": "VendPackingSlipJourRecId",
"description": ""
},
{
"name": "Name",
"dataType": "ItemFreeTxt",
"isNullable": true,
"description": ""
},
{
"name": "Ordered",
"dataType": "PurchQty",
"isNullable": true,
"description": ""
},
{
"name": "PackingSlipId",
"dataType": "PackingSlipId",
"isNullable": true,
"description": ""
},
{
"name": "pdsCWQty",
"dataType": "PdsCWInventQty",
"isNullable": true,
"description": ""
},
{
"name": "pdsCWStr",
"dataType": "String255",
"isNullable": true,
"description": ""
},
{
"name": "pdsCWUnitId",
"dataType": "PdsCWUnitId",
"isNullable": true,
"description": ""
},
{
"name": "PurchId",
"dataType": "PurchIdBase",
"isNullable": true,
"description": ""
},
{
"name": "PurchUnitTxt",
"dataType": "UnitOfMeasureReportingText",
"isNullable": true,
"description": ""
},
{
"name": "Qty",
"dataType": "PurchDeliveredQty",
"isNullable": true,
"description": ""
},
{
"name": "Remain",
"dataType": "PurchQty",
"isNullable": true,
"description": ""
},
{
"name": "ValueMST",
"dataType": "AmountMST",
"isNullable": true,
"displayName": "Value",
"description": ""
},
{
"name": "VendPackingSlipTrans",
"dataType": "VendPackingSlipTransRecId",
"description": ""
},
{
"name": "DataAreaId",
"dataType": "string",
"isReadOnly": true
},
{
"entity": {
"entityReference": "InventTable"
},
"name": "Relationship_InventTableRelationship",
"resolutionGuidance": {
"entityByReference": {
"allowReference": true
}
}
},
{
"entity": {
"entityReference": "PurchTable"
},
"name": "Relationship_PurchTableRelationship",
"resolutionGuidance": {
"entityByReference": {
"allowReference": true
}
}
},
{
"entity": {
"entityReference": "VendPackingSlipJour"
},
"name": "Relationship_VendPackingSlipJourRelationship",
"resolutionGuidance": {
"entityByReference": {
"allowReference": true
}
}
},
{
"entity": {
"entityReference": "VendPackingSlipTrans"
},
"name": "Relationship_VendPackingSlipTransRelationship",
"resolutionGuidance": {
"entityByReference": {
"allowReference": true
}
}
},
{
"entity": {
"entityReference": "CompanyInfo"
},
"name": "Relationship_CompanyRelationship",
"resolutionGuidance": {
"entityByReference": {
"allowReference": true
}
}
}
],
"displayName": "Show packing slip"
},
{
"dataTypeName": "ExternalItemId",
"extendsDataType": "string"
},
{
"dataTypeName": "FreeTxt",
"extendsDataType": "string"
},
{
"dataTypeName": "InventDimPrint",
"extendsDataType": "string"
},
{
"dataTypeName": "ItemId",
"extendsDataType": "string"
},
{
"dataTypeName": "VendPackingSlipJourRecId",
"extendsDataType": "bigInteger"
},
{
"dataTypeName": "ItemFreeTxt",
"extendsDataType": "string"
},
{
"dataTypeName": "PurchQty",
"extendsDataType": "decimal"
},
{
"dataTypeName": "PackingSlipId",
"extendsDataType": "string"
},
{
"dataTypeName": "PdsCWInventQty",
"extendsDataType": "decimal"
},
{
"dataTypeName": "String255",
"extendsDataType": "string"
},
{
"dataTypeName": "PdsCWUnitId",
"extendsDataType": "string"
},
{
"dataTypeName": "PurchIdBase",
"extendsDataType": "string"
},
{
"dataTypeName": "UnitOfMeasureReportingText",
"extendsDataType": "string"
},
{
"dataType
|
{
"pile_set_name": "Github"
}
|
require 'tzinfo/timezone_definition'
module TZInfo
module Definitions
module America
module Halifax
include TimezoneDefinition
timezone 'America/Halifax' do |tz|
tz.offset :o0, -15264, 0, :LMT
tz.offset :o1, -14400, 0, :AST
tz.offset :o2, -14400, 3600, :ADT
tz.offset :o3, -14400, 3600, :AWT
tz.offset :o4, -14400, 3600, :APT
tz.transition 1902, 6, :o1, 724774703, 300
tz.transition 1916, 4, :o2, 7262864, 3
tz.transition 1916, 10, :o1, 19369101, 8
tz.transition 1918, 4, :o2, 9686791, 4
tz.transition 1918, 10, :o1, 58125545, 24
tz.transition 1920, 5, :o2, 7267361, 3
tz.transition 1920, 8, :o1, 19380525, 8
tz.transition 1921, 5, :o2, 7268447, 3
tz.transition 1921, 9, :o1, 19383501, 8
tz.transition 1922, 4, :o2, 7269524, 3
tz.transition 1922, 9, :o1, 19386421, 8
tz.transition 1923, 5, :o2, 7270637, 3
tz.transition 1923, 9, :o1, 19389333, 8
tz.transition 1924, 5, :o2, 7271729, 3
tz.transition 1924, 9, :o1, 19392349, 8
tz.transition 1925, 5, :o2, 7272821, 3
tz.transition 1925, 9, :o1, 19395373, 8
tz.transition 1926, 5, :o2, 7273955, 3
tz.transition 1926, 9, :o1, 19398173, 8
tz.transition 1927, 5, :o2, 7275005, 3
tz.transition 1927, 9, :o1, 19401197, 8
tz.transition 1928, 5, :o2, 7276139, 3
tz.transition 1928, 9, :o1, 19403989, 8
tz.transition 1929, 5, :o2, 7277231, 3
tz.transition 1929, 9, :o1, 19406861, 8
tz.transition 1930, 5, :o2, 7278323, 3
tz.transition 1930, 9, :o1, 19409877, 8
tz.transition 1931, 5, :o2, 7279415, 3
tz.transition 1931, 9, :o1, 19412901, 8
tz.transition 1932, 5, :o2, 7280486, 3
tz.transition 1932, 9, :o1, 19415813, 8
tz.transition 1933, 4, :o2, 7281578, 3
tz.transition 1933, 10, :o1, 19418781, 8
tz.transition 1934, 5, :o2, 7282733, 3
tz.transition 1934, 9, :o1, 19421573, 8
tz.transition 1935, 6, :o2, 7283867, 3
tz.transition 1935, 9, :o1, 19424605, 8
tz.transition 1936, 6, :o2, 7284962, 3
tz.transition 1936, 9, :o1, 19427405, 8
tz.transition 1937, 5, :o2, 7285967, 3
tz.transition 1937, 9, :o1, 19430429, 8
tz.transition 1938, 5, :o2, 7287059, 3
tz.transition 1938, 9, :o1, 19433341, 8
tz.transition 1939, 5, :o2, 7288235, 3
tz.transition 1939, 9, :o1, 19436253, 8
tz.transition 1940, 5, :o2, 7289264, 3
tz.transition 1940, 9, :o1, 19439221, 8
tz.transition 1941, 5, :o2, 7290356, 3
tz.transition 1941, 9, :o1, 19442133, 8
tz.transition 1942, 2, :o3, 9721599, 4
tz.transition 1945, 8, :o4, 58360379, 24
tz.transition 1945, 9, :o1, 58361489, 24
tz.transition 1946, 4, :o2, 9727755, 4
tz.transition 1946, 9, :o1, 58370225, 24
tz.transition 1947, 4, :o2, 9729211, 4
tz.transition 1947, 9, :o1, 58378961, 24
tz.transition 1948, 4, :o2, 9730667, 4
tz.transition 1948, 9, :o1, 58387697, 24
tz.transition 1949, 4, :o2, 9732123, 4
tz.transition 1949, 9, :o1, 58396433, 24
tz.transition 1951, 4, :o2, 9735063, 4
tz.transition 1951, 9, :o1, 58414073, 24
tz.transition 1952, 4, :o2, 9736519, 4
tz.transition 1952, 9, :o1, 58422809, 24
tz.transition 1953, 4, :o2, 9737975, 4
tz.transition 1953, 9, :o1, 58431545, 24
tz.transition 1954, 4, :o2, 9739431, 4
tz.transition 1954, 9, :o1, 58440281, 24
tz.transition 1956, 4, :o2, 9742371, 4
tz.transition 1956, 9, :o1, 58457921, 24
tz.transition 1957, 4, :o2, 9743827, 4
tz.transition 1957, 9, :o1, 58466657, 24
tz.transition 1958, 4, :o2, 9745283, 4
tz.transition 1958, 9, :o1, 58475393, 24
tz.transition 1959, 4, :o2, 9746739, 4
tz.transition 1959, 9, :o1, 58484129, 24
tz.transition 1962, 4, :o2, 9751135, 4
tz.transition 1962, 10, :o1, 58511177, 24
tz.transition 1963, 4, :o2, 9752591, 4
tz.transition 1963, 10, :o1, 58519913, 24
tz.transition 1964, 4, :o2, 9754047, 4
tz.transition 1964, 10, :o1, 58528649, 24
tz.transition 1965, 4, :o2, 9755503, 4
tz.transition 1965, 10, :o1, 58537553, 24
tz.transition 1966, 4, :o2, 9756959, 4
tz.transition 1966, 10, :o1, 58546289, 24
tz.transition 1967, 4, :o2, 9758443, 4
tz.transition 1967, 10, :o1, 58555025, 24
tz.transition 1968, 4, :o2, 9759899, 4
tz.transition 1968, 10, :o1, 58563761, 24
tz.transition 1969, 4, :o2, 9761355, 4
tz.transition 1969, 10, :o1, 58572497, 24
tz.transition 1970, 4, :o2, 9957600
tz.transition 1970, 10, :o1, 25678800
tz.transition 1971, 4, :o2, 41407200
tz.transition 1971, 10, :o1, 57733200
tz.transition 1972, 4, :o2, 73461600
tz.transition 1972, 10, :o1, 89182800
tz.transition 1973, 4, :o2, 104911200
tz.transition 1973, 10, :o1, 120632400
tz.transition 1974, 4, :o2, 136360800
tz.transition 1974, 10, :o1, 152082000
tz.transition 1975, 4, :o2, 167810400
tz.transition 1975, 10, :o1, 183531600
tz.transition 1976, 4, :o
|
{
"pile_set_name": "Github"
}
|
%verify "executed"
%include "arm-vfp/funop.S" {"instr":"ftosizs s1, s0"}
|
{
"pile_set_name": "Github"
}
|
Title: Wine 0.9.41 发布
Date: 2007-07-14 08:02
Author: toy
Category: Apps
Slug: wine-0941-released
[Wine](http://www.winehq.org/) 于昨日获得了小幅更新,发布了新的 0.9.41
版。这个版本不仅实现了一些新的改进,而且也修订了许多
bug。目前,仅有该版本的源码包可用,适用于常见 Linux
发行版的二进制包还需稍作等待。

据悉,该版本的 Wine 主要包括下列改进:
- 实现了许多 gdiplus 函数
- 更为完整的 pdh.dll 实现
- 支持 MSI 远程调用
- 在 crypt32.dll 中提供了消息支持
现在,你可以[获取 Wine 0.9.41
的源码包](http://prdownloads.sourceforge.net/wine/wine-0.9.41.tar.bz2)自行编译。当然,你也可以等候官方提供预编译的二进制包。
|
{
"pile_set_name": "Github"
}
|
// Copyright 2015 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include <memory>
#include <optional>
#include <vector>
#include "Common/CommonTypes.h"
class PointerWrap;
namespace DiscIO
{
struct Partition;
}
namespace DVDInterface
{
enum class ReplyType : u32;
}
namespace DiscIO
{
enum class Platform;
class Volume;
} // namespace DiscIO
namespace IOS::ES
{
class TMDReader;
class TicketReader;
} // namespace IOS::ES
namespace DVDThread
{
void Start();
void Stop();
void DoState(PointerWrap& p);
void SetDisc(std::unique_ptr<DiscIO::Volume> disc);
bool HasDisc();
bool IsEncryptedAndHashed();
DiscIO::Platform GetDiscType();
u64 PartitionOffsetToRawOffset(u64 offset, const DiscIO::Partition& partition);
IOS::ES::TMDReader GetTMD(const DiscIO::Partition& partition);
IOS::ES::TicketReader GetTicket(const DiscIO::Partition& partition);
bool IsInsertedDiscRunning();
// This function returns true and calls SConfig::SetRunningGameMetadata(Volume&, Partition&)
// if both of the following conditions are true:
// - A disc is inserted
// - The title_id argument doesn't contain a value, or its value matches the disc's title ID
bool UpdateRunningGameMetadata(const DiscIO::Partition& partition,
std::optional<u64> title_id = {});
void StartRead(u64 dvd_offset, u32 length, const DiscIO::Partition& partition,
DVDInterface::ReplyType reply_type, s64 ticks_until_completion);
void StartReadToEmulatedRAM(u32 output_address, u64 dvd_offset, u32 length,
const DiscIO::Partition& partition, DVDInterface::ReplyType reply_type,
s64 ticks_until_completion);
} // namespace DVDThread
|
{
"pile_set_name": "Github"
}
|
/*
* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package java.lang.instrument;
/*
* Copyright 2003 Wily Technology, Inc.
*/
/**
* This class serves as a parameter block to the <code>Instrumentation.redefineClasses</code> method.
* Serves to bind the <code>Class</code> that needs redefining together with the new class file bytes.
*
* @see java.lang.instrument.Instrumentation#redefineClasses
* @since 1.5
*/
public final class ClassDefinition {
/**
* The class to redefine
*/
private final Class<?> mClass;
/**
* The replacement class file bytes
*/
private final byte[] mClassFile;
/**
* Creates a new <code>ClassDefinition</code> binding using the supplied
* class and class file bytes. Does not copy the supplied buffer, just captures a reference to it.
*
* @param theClass the <code>Class</code> that needs redefining
* @param theClassFile the new class file bytes
*
* @throws java.lang.NullPointerException if the supplied class or array is <code>null</code>.
*/
public
ClassDefinition( Class<?> theClass,
byte[] theClassFile) {
if (theClass == null || theClassFile == null) {
throw new NullPointerException();
}
mClass = theClass;
mClassFile = theClassFile;
}
/**
* Returns the class.
*
* @return the <code>Class</code> object referred to.
*/
public Class<?>
getDefinitionClass() {
return mClass;
}
/**
* Returns the array of bytes that contains the new class file.
*
* @return the class file bytes.
*/
public byte[]
getDefinitionClassFile() {
return mClassFile;
}
}
|
{
"pile_set_name": "Github"
}
|
{{#with tryGetTargetReflectionDeep}}
{{#ifCond ../name '===' name}}
Re-exports <a href="{{relativeURL url}}">{{name}}</a>
{{else if flags.isExported}}
Renames and re-exports <a href="{{relativeURL url}}">{{name}}</a>
{{else}}
Renames and exports <a href="{{relativeURL url}}">{{name}}</a>
{{/ifCond}}
{{else}}
Re-exports {{name}}
{{/with}}
|
{
"pile_set_name": "Github"
}
|
import random
import multiaddr
import pytest
from libp2p.peer.id import ID
from libp2p.peer.peerinfo import InvalidAddrError, PeerInfo, info_from_p2p_addr
ALPHABETS = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
VALID_MULTI_ADDR_STR = "/ip4/127.0.0.1/tcp/8000/p2p/3YgLAeMKSAPcGqZkAt8mREqhQXmJT8SN8VCMN4T6ih4GNX9wvK8mWJnWZ1qA2mLdCQ" # noqa: E501
def test_init_():
random_addrs = [random.randint(0, 255) for r in range(4)]
random_id_string = ""
for _ in range(10):
random_id_string += random.SystemRandom().choice(ALPHABETS)
peer_id = ID(random_id_string.encode())
peer_info = PeerInfo(peer_id, random_addrs)
assert peer_info.peer_id == peer_id
assert peer_info.addrs == random_addrs
@pytest.mark.parametrize(
"addr",
(
pytest.param(multiaddr.Multiaddr("/"), id="empty multiaddr"),
pytest.param(
multiaddr.Multiaddr("/ip4/127.0.0.1"),
id="multiaddr without peer_id(p2p protocol)",
),
),
)
def test_info_from_p2p_addr_invalid(addr):
with pytest.raises(InvalidAddrError):
info_from_p2p_addr(addr)
def test_info_from_p2p_addr_valid():
m_addr = multiaddr.Multiaddr(VALID_MULTI_ADDR_STR)
info = info_from_p2p_addr(m_addr)
assert (
info.peer_id.pretty()
== "3YgLAeMKSAPcGqZkAt8mREqhQXmJT8SN8VCMN4T6ih4GNX9wvK8mWJnWZ1qA2mLdCQ"
)
assert len(info.addrs) == 1
assert str(info.addrs[0]) == "/ip4/127.0.0.1/tcp/8000"
|
{
"pile_set_name": "Github"
}
|
/*
* Copyright (C) 2014 Freescale Semiconductor
*
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __FSL_DPAA_FD_H
#define __FSL_DPAA_FD_H
/* Place-holder for FDs, we represent it via the simplest form that we need for
* now. Different overlays may be needed to support different options, etc. (It
* is impractical to define One True Struct, because the resulting encoding
* routines (lots of read-modify-writes) would be worst-case performance whether
* or not circumstances required them.) */
struct dpaa_fd {
union {
u32 words[8];
struct dpaa_fd_simple {
u32 addr_lo;
u32 addr_hi;
u32 len;
/* offset in the MS 16 bits, BPID in the LS 16 bits */
u32 bpid_offset;
u32 frc; /* frame context */
/* "err", "va", "cbmt", "asal", [...] */
u32 ctrl;
/* flow context */
u32 flc_lo;
u32 flc_hi;
} simple;
};
};
enum dpaa_fd_format {
dpaa_fd_single = 0,
dpaa_fd_list,
dpaa_fd_sg
};
static inline u64 ldpaa_fd_get_addr(const struct dpaa_fd *fd)
{
return (u64)((((uint64_t)fd->simple.addr_hi) << 32)
+ fd->simple.addr_lo);
}
static inline void ldpaa_fd_set_addr(struct dpaa_fd *fd, u64 addr)
{
fd->simple.addr_hi = upper_32_bits(addr);
fd->simple.addr_lo = lower_32_bits(addr);
}
static inline u32 ldpaa_fd_get_len(const struct dpaa_fd *fd)
{
return fd->simple.len;
}
static inline void ldpaa_fd_set_len(struct dpaa_fd *fd, u32 len)
{
fd->simple.len = len;
}
static inline uint16_t ldpaa_fd_get_offset(const struct dpaa_fd *fd)
{
return (uint16_t)(fd->simple.bpid_offset >> 16) & 0x0FFF;
}
static inline void ldpaa_fd_set_offset(struct dpaa_fd *fd, uint16_t offset)
{
fd->simple.bpid_offset &= 0xF000FFFF;
fd->simple.bpid_offset |= (u32)offset << 16;
}
static inline uint16_t ldpaa_fd_get_bpid(const struct dpaa_fd *fd)
{
return (uint16_t)(fd->simple.bpid_offset & 0xFFFF);
}
static inline void ldpaa_fd_set_bpid(struct dpaa_fd *fd, uint16_t bpid)
{
fd->simple.bpid_offset &= 0xFFFF0000;
fd->simple.bpid_offset |= (u32)bpid;
}
/* When frames are dequeued, the FDs show up inside "dequeue" result structures
* (if at all, not all dequeue results contain valid FDs). This structure type
* is intentionally defined without internal detail, and the only reason it
* isn't declared opaquely (without size) is to allow the user to provide
* suitably-sized (and aligned) memory for these entries. */
struct ldpaa_dq {
uint32_t dont_manipulate_directly[16];
};
/* Parsing frame dequeue results */
#define LDPAA_DQ_STAT_FQEMPTY 0x80
#define LDPAA_DQ_STAT_HELDACTIVE 0x40
#define LDPAA_DQ_STAT_FORCEELIGIBLE 0x20
#define LDPAA_DQ_STAT_VALIDFRAME 0x10
#define LDPAA_DQ_STAT_ODPVALID 0x04
#define LDPAA_DQ_STAT_VOLATILE 0x02
#define LDPAA_DQ_STAT_EXPIRED 0x01
uint32_t ldpaa_dq_flags(const struct ldpaa_dq *);
static inline int ldpaa_dq_is_pull(const struct ldpaa_dq *dq)
{
return (int)(ldpaa_dq_flags(dq) & LDPAA_DQ_STAT_VOLATILE);
}
static inline int ldpaa_dq_is_pull_complete(
const struct ldpaa_dq *dq)
{
return (int)(ldpaa_dq_flags(dq) & LDPAA_DQ_STAT_EXPIRED);
}
/* seqnum/odpid are valid only if VALIDFRAME and ODPVALID flags are TRUE */
uint16_t ldpaa_dq_seqnum(const struct ldpaa_dq *);
uint16_t ldpaa_dq_odpid(const struct ldpaa_dq *);
uint32_t ldpaa_dq_fqid(const struct ldpaa_dq *);
uint32_t ldpaa_dq_byte_count(const struct ldpaa_dq *);
uint32_t ldpaa_dq_frame_count(const struct ldpaa_dq *);
uint32_t ldpaa_dq_fqd_ctx_hi(const struct ldpaa_dq *);
uint32_t ldpaa_dq_fqd_ctx_lo(const struct ldpaa_dq *);
/* get the Frame Descriptor */
const struct dpaa_fd *ldpaa_dq_fd(const struct ldpaa_dq *);
#endif /* __FSL_DPAA_FD_H */
|
{
"pile_set_name": "Github"
}
|
##
##
|
{
"pile_set_name": "Github"
}
|
// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build aix
// +build ppc
package unix
//sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = getrlimit64
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) = setrlimit64
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = lseek64
//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
func setTimespec(sec, nsec int64) Timespec {
return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
}
func setTimeval(sec, usec int64) Timeval {
return Timeval{Sec: int32(sec), Usec: int32(usec)}
}
func (iov *Iovec) SetLen(length int) {
iov.Len = uint32(length)
}
func (msghdr *Msghdr) SetControllen(length int) {
msghdr.Controllen = uint32(length)
}
func (msghdr *Msghdr) SetIovlen(length int) {
msghdr.Iovlen = int32(length)
}
func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
func Fstat(fd int, stat *Stat_t) error {
return fstat(fd, stat)
}
func Fstatat(dirfd int, path string, stat *Stat_t, flags int) error {
return fstatat(dirfd, path, stat, flags)
}
func Lstat(path string, stat *Stat_t) error {
return lstat(path, stat)
}
func Stat(path string, statptr *Stat_t) error {
return stat(path, statptr)
}
|
{
"pile_set_name": "Github"
}
|
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Vis versjonsmerknader"
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Fant ${APPLICATION_EXECUTABLE}-prosess(er) som må stoppes.$\nVil du at installasjonsprogrammet skal stoppe dem for deg?"
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Terminerer ${APPLICATION_EXECUTABLE}-prosesser."
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Fant ikke prosess som skulle termineres!"
StrCpy $PageReinstall_NEW_Field_1 "En eldre versjon av ${APPLICATION_NAME} er installert på systemet ditt. Det anbefales at du avinstallerer den versjonen før installering av ny versjon. Velg hva du vil gjøre og klikk Neste for å fortsette."
StrCpy $PageReinstall_NEW_Field_2 "Avinstaller før installering"
StrCpy $PageReinstall_NEW_Field_3 "Ikke avinstaller"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "Allerede installert"
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE "Velg hvordan du vil installere ${APPLICATION_NAME}."
StrCpy $PageReinstall_OLD_Field_1 "En nyere versjon av ${APPLICATION_NAME} er allerede installert! Det anbefales ikke at du installerer en eldre versjon. Hvis du virkelig ønsker å installere denne eldre versjonen, er det bedre å avinstallere gjeldende versjon først. Velg hva du vil gjøre og klikk Neste for å fortsette."
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} er installert allerede.$\n$\nVelg hva du ønsker å gjøre og klikk Neste for å fortsette."
StrCpy $PageReinstall_SAME_Field_2 "Legg til/installer komponenter på nytt"
StrCpy $PageReinstall_SAME_Field_3 "Avinstaller ${APPLICATION_NAME}"
StrCpy $UNINSTALLER_APPDATA_TITLE "Avinstaller ${APPLICATION_NAME}"
StrCpy $PageReinstall_SAME_MUI_HEADER_TEXT_SUBTITLE "Velg hva slags vedlikehold som skal utføres."
StrCpy $SEC_APPLICATION_DETAILS "Installerer ${APPLICATION_NAME} grunnleggende."
StrCpy $OPTION_SECTION_SC_SHELL_EXT_SECTION "Integrering med Windows Utforsker"
StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "Installerer integrering med Windows Utforsker"
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "Snarvei i Start-menyen"
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "Legger til snarvei for ${APPLICATION_NAME} i Start-menyen."
StrCpy $OPTION_SECTION_SC_DESKTOP_SECTION "Snarvei på skrivebordet"
StrCpy $OPTION_SECTION_SC_DESKTOP_DetailPrint "Oppretter snarveier på skrivebordet"
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_SECTION "Snarvei i Hurtigstart"
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_DetailPrint "Oppretter snarvei i Hurtigstart"
StrCpy $OPTION_SECTION_SC_APPLICATION_Desc "${APPLICATION_NAME} grunnleggende."
StrCpy $OPTION_SECTION_SC_START_MENU_Desc "${APPLICATION_NAME}-snarvei."
StrCpy $OPTION_SECTION_SC_DESKTOP_Desc "Skrivebordssnarvei for ${APPLICATION_NAME}."
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_Desc "Hurtigstart-snarvei for ${APPLICATION_NAME}."
StrCpy $UNINSTALLER_FILE_Detail "Skriver Avinstallasjonsprogram."
StrCpy $UNINSTALLER_REGISTRY_Detail "Skriver registernøkler for installasjonsprogrammet"
StrCpy $UNINSTALLER_FINISHED_Detail "Ferdig"
StrCpy $UNINSTALL_MESSAGEBOX "Det ser ikke ut som ${APPLICATION_NAME} er installert i mappe '$INSTDIR'.$\n$\nFortsett likevel (ikke anbefalt)?"
StrCpy $UNINSTALL_ABORT "Avinstallering avbrutt av bruker"
StrCpy $INIT_NO_QUICK_LAUNCH "Hurtigstart-snarvei (I/T)"
StrCpy $INIT_NO_DESKTOP "Snarvei på skrivebordet (skriver over eksisterende)"
StrCpy $UAC_ERROR_ELEVATE "Klarte ikke å heve tilgangsnivå. Feil: "
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "Dette installasjonsprogrammet krever administrasjonstilgang. Prøv igjen"
StrCpy $INIT_INSTALLER_RUNNING "Installasjonsprogrammet kjører allerede."
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "Avinstallasjonsprogrammet krever administrasjonstilgang. Prøv igjen"
StrCpy $UAC_ERROR_LOGON_SERVICE "Påloggingstjenesten kjører ikke, avbryter!"
StrCpy $INIT_UNINSTALLER_RUNNING "Avinstallasjonsprogrammet kjører allerede."
StrCpy $SectionGroup_Shortcuts "Snarveier"
|
{
"pile_set_name": "Github"
}
|
<a class="{% if not nav_item.is_link %}reference internal{% endif %}{% if nav_item.active%} current{%endif%}" href="{% if not nav_item.is_section %}{{ nav_item.url|url }}{% else %}#{% endif %}">{{ nav_item.title }}</a>
{%- set navlevel = navlevel + 1 %}
{%- if navlevel <= config.theme.navigation_depth
and ((nav_item.is_page and nav_item.toc.items
and (not config.theme.titles_only
and (nav_item == page or not config.theme.collapse_navigation)))
or (nav_item.is_section and nav_item.children)) %}
<ul{% if nav_item.active %} class="current"{% endif %}>
{%- if nav_item.is_page %}
{#- Skip first level of toc which is page title. #}
{%- set toc_item = nav_item.toc.items[0] %}
{%- include 'toc.html' %}
{%- elif nav_item.is_section %}
{%- for nav_item in nav_item.children %}
<li class="toctree-l{{ navlevel }}{% if nav_item.active%} current{%endif%}">
{%- include 'nav.html' %}
</li>
{%- endfor %}
{%- endif %}
</ul>
{%- endif %}
{%- set navlevel = navlevel - 1 %}
|
{
"pile_set_name": "Github"
}
|
94e2c25a08522071ca4d2314ddb2a4a1 *tests/data/fate/vsynth_lena-ffvhuff444p16.avi
26360720 tests/data/fate/vsynth_lena-ffvhuff444p16.avi
05ccd9a38f9726030b3099c0c99d3a13 *tests/data/fate/vsynth_lena-ffvhuff444p16.out.rawvideo
stddev: 0.45 PSNR: 55.06 MAXDIFF: 7 bytes: 7603200/ 7603200
|
{
"pile_set_name": "Github"
}
|
# /* **************************************************************************
# * *
# * (C) Copyright Edward Diener 2014. *
# * Distributed under the Boost Software License, Version 1.0. (See *
# * accompanying file LICENSE_1_0.txt or copy at *
# * http://www.boost.org/LICENSE_1_0.txt) *
# * *
# ************************************************************************** */
#
# /* See http://www.boost.org for most recent version. */
#
# ifndef BOOST_PREPROCESSOR_ARRAY_DETAIL_GET_DATA_HPP
# define BOOST_PREPROCESSOR_ARRAY_DETAIL_GET_DATA_HPP
#
# include <boost/preprocessor/config/config.hpp>
# include <boost/preprocessor/tuple/rem.hpp>
# include <boost/preprocessor/control/if.hpp>
# include <boost/preprocessor/control/iif.hpp>
# include <boost/preprocessor/facilities/is_1.hpp>
#
# /* BOOST_PP_ARRAY_DETAIL_GET_DATA */
#
# define BOOST_PP_ARRAY_DETAIL_GET_DATA_NONE(size, data)
# if BOOST_PP_VARIADICS && !(BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400)
# if BOOST_PP_VARIADICS_MSVC
# define BOOST_PP_ARRAY_DETAIL_GET_DATA_ANY_VC_DEFAULT(size, data) BOOST_PP_TUPLE_REM(size) data
# define BOOST_PP_ARRAY_DETAIL_GET_DATA_ANY_VC_CAT(size, data) BOOST_PP_TUPLE_REM_CAT(size) data
# define BOOST_PP_ARRAY_DETAIL_GET_DATA_ANY(size, data) \
BOOST_PP_IIF \
( \
BOOST_PP_IS_1(size), \
BOOST_PP_ARRAY_DETAIL_GET_DATA_ANY_VC_CAT, \
BOOST_PP_ARRAY_DETAIL_GET_DATA_ANY_VC_DEFAULT \
) \
(size,data) \
/**/
# else
# define BOOST_PP_ARRAY_DETAIL_GET_DATA_ANY(size, data) BOOST_PP_TUPLE_REM(size) data
# endif
# else
# define BOOST_PP_ARRAY_DETAIL_GET_DATA_ANY(size, data) BOOST_PP_TUPLE_REM(size) data
# endif
# define BOOST_PP_ARRAY_DETAIL_GET_DATA(size, data) \
BOOST_PP_IF \
( \
size, \
BOOST_PP_ARRAY_DETAIL_GET_DATA_ANY, \
BOOST_PP_ARRAY_DETAIL_GET_DATA_NONE \
) \
(size,data) \
/**/
#
# endif /* BOOST_PREPROCESSOR_ARRAY_DETAIL_GET_DATA_HPP */
|
{
"pile_set_name": "Github"
}
|
////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2007-2016 Hartmut Kaiser
// Copyright (c) 2008-2009 Chirag Dekate, Anshul Tandon
// Copyright (c) 2012-2013 Thomas Heller
//
// SPDX-License-Identifier: BSL-1.0
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
////////////////////////////////////////////////////////////////////////////////
#pragma once
#include <hpx/config.hpp>
#include <hpx/assert.hpp>
#include <hpx/modules/errors.hpp>
#include <hpx/topology/cpu_mask.hpp>
#include <boost/variant.hpp>
#include <cstddef>
#include <cstdint>
#include <limits>
#include <string>
#include <utility>
#include <vector>
namespace hpx { namespace threads {
namespace detail {
typedef std::vector<std::int64_t> bounds_type;
enum distribution_type
{
compact = 0x01,
scatter = 0x02,
balanced = 0x04,
numa_balanced = 0x08
};
struct spec_type
{
enum type
{
unknown,
thread,
socket,
numanode,
core,
pu
};
HPX_CORE_EXPORT static char const* type_name(type t);
static std::int64_t all_entities()
{
return (std::numeric_limits<std::int64_t>::min)();
}
spec_type(type t = unknown, std::int64_t min = all_entities(),
std::int64_t max = all_entities())
: type_(t)
, index_bounds_()
{
if (t != unknown)
{
if (max == 0 || max == all_entities())
{
// one or all entities
index_bounds_.push_back(min);
}
else if (min != all_entities())
{
// all entities between min and -max, or just min,max
HPX_ASSERT(min >= 0);
index_bounds_.push_back(min);
index_bounds_.push_back(max);
}
}
}
bool operator==(spec_type const& rhs) const
{
if (type_ != rhs.type_ ||
index_bounds_.size() != rhs.index_bounds_.size())
return false;
for (std::size_t i = 0; i < index_bounds_.size(); ++i)
{
if (index_bounds_[i] != rhs.index_bounds_[i])
return false;
}
return true;
}
type type_;
bounds_type index_bounds_;
};
typedef std::vector<spec_type> mapping_type;
typedef std::pair<spec_type, mapping_type> full_mapping_type;
typedef std::vector<full_mapping_type> mappings_spec_type;
typedef boost::variant<distribution_type, mappings_spec_type>
mappings_type;
HPX_CORE_EXPORT bounds_type extract_bounds(
spec_type const& m, std::size_t default_last, error_code& ec);
HPX_CORE_EXPORT void parse_mappings(std::string const& spec,
mappings_type& mappings, error_code& ec = throws);
} // namespace detail
HPX_CORE_EXPORT void parse_affinity_options(std::string const& spec,
std::vector<mask_type>& affinities, std::size_t used_cores,
std::size_t max_cores, std::size_t num_threads,
std::vector<std::size_t>& num_pus, bool use_process_mask,
error_code& ec = throws);
// backwards compatibility helper
inline void parse_affinity_options(std::string const& spec,
std::vector<mask_type>& affinities, error_code& ec = throws)
{
std::vector<std::size_t> num_pus;
parse_affinity_options(
spec, affinities, 1, 1, affinities.size(), num_pus, false, ec);
}
}} // namespace hpx::threads
|
{
"pile_set_name": "Github"
}
|
@extends('errors/layout')
@section('title') 403 Forbidden @endsection
@section('content')
<h1><i class="fa fa-ban red"></i> 403 Forbidden</h1>
<p class="lead">抱歉!您可能被禁止访问该页面,如有问题请联系管理员。</p>
<p>
<a class="btn btn-default btn-lg" href="{{ route('website.index') }}"><span class="green">返回首页</span></a>
</p>
@endsection
|
{
"pile_set_name": "Github"
}
|
{
"path": "../../../notebooks/minio_setup.ipynb"
}
|
{
"pile_set_name": "Github"
}
|
/*
* stree.c
*
* Copyright 2010 Alexander Petukhov <devel(at)apetukhov.ru>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
/*
* Contains function to manipulate stack trace tree view.
*/
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <geanyplugin.h>
#include "stree.h"
#include "breakpoints.h"
#include "utils.h"
#include "debug_module.h"
#include "pixbuf.h"
#include "cell_renderers/cellrendererframeicon.h"
/* Tree view columns */
enum
{
S_FRAME, /* the frame if it's a frame, or NULL if it's a thread */
S_THREAD_ID,
S_ACTIVE,
S_N_COLUMNS
};
/* active thread and frame */
static glong active_thread_id = 0;
static int active_frame_index = 0;
/* callbacks */
static select_frame_cb select_frame = NULL;
static select_thread_cb select_thread = NULL;
static move_to_line_cb move_to_line = NULL;
/* tree view, model and store handles */
static GtkWidget *tree = NULL;
static GtkTreeModel *model = NULL;
static GtkTreeStore *store = NULL;
static GtkTreeViewColumn *column_filepath = NULL;
static GtkTreeViewColumn *column_address = NULL;
/* cell renderer for a frame arrow */
static GtkCellRenderer *renderer_arrow = NULL;
static GType frame_get_type (void);
G_DEFINE_BOXED_TYPE(frame, frame, frame_ref, frame_unref)
#define STREE_TYPE_FRAME (frame_get_type ())
/* finds the iter for thread @thread_id */
static gboolean find_thread_iter (gint thread_id, GtkTreeIter *iter)
{
gboolean found = FALSE;
if (gtk_tree_model_get_iter_first(model, iter))
{
do
{
gint existing_thread_id;
gtk_tree_model_get(model, iter, S_THREAD_ID, &existing_thread_id, -1);
if (existing_thread_id == thread_id)
found = TRUE;
}
while (! found && gtk_tree_model_iter_next(model, iter));
}
return found;
}
/*
* frame arrow clicked callback
*/
static void on_frame_arrow_clicked(CellRendererFrameIcon *cell_renderer, gchar *path, gpointer user_data)
{
GtkTreePath *new_active_frame = gtk_tree_path_new_from_string (path);
if (gtk_tree_path_get_indices(new_active_frame)[1] != active_frame_index)
{
GtkTreeIter thread_iter;
GtkTreeIter iter;
GtkTreePath *old_active_frame;
find_thread_iter (active_thread_id, &thread_iter);
old_active_frame = gtk_tree_model_get_path (model, &thread_iter);
gtk_tree_path_append_index(old_active_frame, active_frame_index);
gtk_tree_model_get_iter(model, &iter, old_active_frame);
gtk_tree_store_set (store, &iter, S_ACTIVE, FALSE, -1);
active_frame_index = gtk_tree_path_get_indices(new_active_frame)[1];
select_frame(active_frame_index);
gtk_tree_model_get_iter(model, &iter, new_active_frame);
gtk_tree_store_set (store, &iter, S_ACTIVE, TRUE, -1);
gtk_tree_path_free(old_active_frame);
}
gtk_tree_path_free(new_active_frame);
}
/*
* shows a tooltip for a file name
*/
static gboolean on_query_tooltip(GtkWidget *widget, gint x, gint y, gboolean keyboard_mode, GtkTooltip *tooltip, gpointer user_data)
{
GtkTreePath *tpath = NULL;
GtkTreeViewColumn *column = NULL;
gboolean show = FALSE;
int bx, by;
gtk_tree_view_convert_widget_to_bin_window_coords(GTK_TREE_VIEW(widget), x, y, &bx, &by);
if (gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(widget), bx, by, &tpath, &column, NULL, NULL))
{
if (2 == gtk_tree_path_get_depth(tpath))
{
gint start_pos, width;
gtk_tree_view_column_cell_get_position(column, renderer_arrow, &start_pos, &width);
if (column == column_filepath)
{
frame *f;
GtkTreeIter iter;
gtk_tree_model_get_iter(model, &iter, tpath);
gtk_tree_model_get(model, &iter, S_FRAME, &f, -1);
gtk_tooltip_set_text(tooltip, f->file);
gtk_tree_view_set_tooltip_row(GTK_TREE_VIEW(widget), tooltip, tpath);
show = TRUE;
frame_unref(f);
}
else if (column == column_address && bx >= start_pos && bx < start_pos + width)
{
gtk_tooltip_set_text(tooltip, gtk_tree_path_get_indices(tpath)[1] == active_frame_index ? _("Active frame") : _("Click an arrow to switch to a frame"));
gtk_tree_view_set_tooltip_row(GTK_TREE_VIEW(widget), tooltip, tpath);
show = TRUE;
}
}
gtk_tree_path_free(tpath);
}
return show;
}
/*
* shows arrow icon for the frame rows, hides renderer for a thread ones
*/
static void on_render_arrow(GtkTreeViewColumn *tree_column, GtkCellRenderer *cell, GtkTreeModel *tree_model,
GtkTreeIter *iter, gpointer data)
{
GtkTreePath *tpath = gtk_tree_model_get_path(model, iter);
g_object_set(cell, "visible", 1 != gtk_tree_path_get_depth(tpath), NULL);
gtk_tree_path_free(tpath);
}
/*
* empty line renderer text for thread row
*/
static void on_render_line(GtkTreeViewColumn *tree_column, GtkCellRenderer *cell, GtkTreeModel *tree_model,
GtkTreeIter *iter, gpointer data)
{
frame *f;
gtk_tree_model_get (model, iter, S_FRAME, &f, -1);
if (! f)
g_object_set(cell, "text", "", NULL);
else
{
GValue value = G_VALUE_INIT;
g_value_init(&value, G_TYPE_INT);
g_value_set_int (&value, f->line);
g_object_set_property
|
{
"pile_set_name": "Github"
}
|
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_UNITS_ACCELERATION_DERIVED_DIMENSION_HPP
#define BOOST_UNITS_ACCELERATION_DERIVED_DIMENSION_HPP
#include <boost/units/derived_dimension.hpp>
#include <boost/units/physical_dimensions/length.hpp>
#include <boost/units/physical_dimensions/time.hpp>
namespace boost {
namespace units {
/// derived dimension for acceleration : L T^-2
typedef derived_dimension<length_base_dimension,1,
time_base_dimension,-2>::type acceleration_dimension;
} // namespace units
} // namespace boost
#endif // BOOST_UNITS_ACCELERATION_DERIVED_DIMENSION_HPP
|
{
"pile_set_name": "Github"
}
|
# Copyright(c) 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
Import-Module -DisableNameChecking ..\..\..\BuildTools.psm1
try {
Push-Location
Set-Location IO.Swagger
$url = "http://localhost:7412"
$job = Run-Kestrel $url
Set-Location ../IO.SwaggerTest
$env:ASPNETCORE_URLS = $url
dotnet test --test-adapter-path:. --logger:junit 2>&1 | %{ "$_" }
} finally {
Stop-Job $job
Receive-Job $job
Remove-Job $job
Pop-Location
}
|
{
"pile_set_name": "Github"
}
|
/*
* Copyright 2006-2009, 2017, 2020 United States Government, as represented by the
* Administrator of the National Aeronautics and Space Administration.
* All rights reserved.
*
* The NASA World Wind Java (WWJ) platform is licensed under the Apache License,
* Version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*
* NASA World Wind Java (WWJ) also contains the following 3rd party Open Source
* software:
*
* Jackson Parser – Licensed under Apache 2.0
* GDAL – Licensed under MIT
* JOGL – Licensed under Berkeley Software Distribution (BSD)
* Gluegen – Licensed under Berkeley Software Distribution (BSD)
*
* A complete listing of 3rd Party software notices and licenses included in
* NASA World Wind Java (WWJ) can be found in the WorldWindJava-v2.2 3rd-party
* notices and licenses PDF found in code directory.
*/
package gov.nasa.worldwindx.examples;
import gov.nasa.worldwind.avlist.AVKey;
import gov.nasa.worldwind.geom.*;
import gov.nasa.worldwind.globes.Globe;
import gov.nasa.worldwind.layers.RenderableLayer;
import gov.nasa.worldwind.render.*;
import gov.nasa.worldwind.util.ContourList;
import gov.nasa.worldwind.util.combine.ShapeCombiner;
/**
* Shows how to use the {@link gov.nasa.worldwind.util.combine.Combinable} interface and the {@link
* gov.nasa.worldwind.util.combine.ShapeCombiner} class to combine WorldWind surface shapes into a complex set of
* contours by using boolean operations.
* <p>
* This example creates two static SurfaceCircle instances that partially overlap and displays them in a layer named
* "Original". A ShapeCombiner is used to combine the two surface circles into a potentially complex set of contours
* using boolean operations. Three examples of such operations are given: union, intersection and difference. The result
* of each operation is displayed in a separate layer beneath the original shapes.
*
* @author dcollins
* @version $Id: ShapeCombining.java 2411 2014-10-30 21:27:00Z dcollins $
*/
public class ShapeCombining extends ApplicationTemplate
{
public static class AppFrame extends ApplicationTemplate.AppFrame
{
public AppFrame()
{
ShapeAttributes attrs = new BasicShapeAttributes();
attrs.setInteriorOpacity(0.5);
attrs.setOutlineWidth(2);
// Create two surface circles that partially overlap, and add them to a layer named "Original".
SurfaceCircle shape1 = new SurfaceCircle(attrs, LatLon.fromDegrees(50, -105), 500000);
SurfaceCircle shape2 = new SurfaceCircle(attrs, LatLon.fromDegrees(50, -100), 500000);
shape1.setValue(AVKey.DISPLAY_NAME, "Original");
shape2.setValue(AVKey.DISPLAY_NAME, "Original");
RenderableLayer originalLayer = new RenderableLayer();
originalLayer.setName("Original");
originalLayer.addRenderable(shape1);
originalLayer.addRenderable(shape2);
this.getWwd().getModel().getLayers().add(originalLayer);
// Set up a ShapeCombiner to combine the two surface circles into a potentially complex set of contours
// using boolean operations: union, intersection and difference.
Globe globe = this.getWwd().getModel().getGlobe();
double resolutionRadians = 10000 / globe.getRadius(); // 10km resolution
ShapeCombiner shapeCombiner = new ShapeCombiner(globe, resolutionRadians);
// Compute the union of the two surface circles. Display the result 10 degrees beneath the original.
ContourList union = shapeCombiner.union(shape1, shape2);
this.displayContours(union, "Union", Position.fromDegrees(-10, 0, 0));
// Compute the intersection of the two surface circles. Display the result 20 degrees beneath the original.
ContourList intersection = shapeCombiner.intersection(shape1, shape2);
this.displayContours(intersection, "Intersection", Position.fromDegrees(-20, 0, 0));
// Compute the difference of the two surface circles. Display the result 30 degrees beneath the original.
ContourList difference = shapeCombiner.difference(shape1, shape2);
this.displayContours(difference, "Difference", Position.fromDegrees(-30, 0, 0));
}
protected void displayContours(ContourList contours, String displayName, Position offset)
{
ShapeAttributes attrs = new BasicShapeAttributes();
attrs.setInteriorMaterial(Material.CYAN);
attrs.setInteriorOpacity(0.5);
attrs.setOutlineMaterial(Material.WHITE);
attrs.setOutlineWidth(2);
SurfaceMultiPolygon shape = new SurfaceMultiPolygon(attrs, contours);
shape.setValue(AVKey.DISPLAY_NAME, displayName);
shape.setPathType(AVKey.LINEAR);
shape.move(offset);
RenderableLayer layer = new RenderableLayer();
layer.setName(displayName);
layer.addRenderable(shape);
this.getWwd().getModel().getLayers().add(layer);
}
}
public static void main(String[] args)
{
start("WorldWind Shape Combining", AppFrame.class);
}
}
|
{
"pile_set_name": "Github"
}
|
CODE_SIGN_IDENTITY =
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Moya-macOS
FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Alamofire-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/ReactiveSwift-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/Result-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/RxAtomic-macOS" "${PODS_CONFIGURATION_BUILD_DIR}/RxSwift-macOS"
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/Moya
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
|
{
"pile_set_name": "Github"
}
|
using UnityEngine;
using UnityEditor;
namespace Lockstep
{
[CustomPropertyDrawer(typeof(PathObjectAttribute))]
public class EditorPathObject : UnityEditor.PropertyDrawer
{
const float defaultPropertyHeight = 16f;
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
{
return defaultPropertyHeight;
}
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
PathObjectAttribute Atb = attribute as PathObjectAttribute;
SerializedProperty prefabNameProp = property.FindPropertyRelative("_path");
//SerializedProperty prefabProp = property.FindPropertyRelative ("_editorPrefab");
//string lastName = prefabNameProp.stringValue;
UnityEngine.Object obj = PathObjectFactory.Load(prefabNameProp.stringValue) as UnityEngine.Object;
obj = (UnityEngine.Object)EditorGUI.ObjectField(position, label, obj, Atb.ObjectType, false);
string relativePath = "";
if (obj != null)
{
if (PathObjectUtility.TryGetPath(obj, out relativePath) == false)
{
Debug.LogErrorFormat("Object '{0}' is not detected to be in a Resources folder.", obj);
return;
}
}
prefabNameProp.stringValue = obj != null ? relativePath : "";
/*if (lastName != prefabNameProp.stringValue) {
if (PathPrefabFactory.Load (prefabNameProp.stringValue) == null) {
prefabProp.objectReferenceValue = null;
}
}*/
}
}
}
|
{
"pile_set_name": "Github"
}
|
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_UNITS_PRESSURE_DERIVED_DIMENSION_HPP
#define BOOST_UNITS_PRESSURE_DERIVED_DIMENSION_HPP
#include <boost/units/derived_dimension.hpp>
#include <boost/units/physical_dimensions/length.hpp>
#include <boost/units/physical_dimensions/mass.hpp>
#include <boost/units/physical_dimensions/time.hpp>
namespace boost {
namespace units {
/// derived dimension for pressure : L^-1 M T^-2
typedef derived_dimension<length_base_dimension,-1,
mass_base_dimension,1,
time_base_dimension,-2>::type pressure_dimension;
} // namespace units
} // namespace boost
#endif // BOOST_UNITS_PRESSURE_DERIVED_DIMENSION_HPP
|
{
"pile_set_name": "Github"
}
|
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.services.jackett;
in
{
options = {
services.jackett = {
enable = mkEnableOption "Jackett";
dataDir = mkOption {
type = types.str;
default = "/var/lib/jackett/.config/Jackett";
description = "The directory where Jackett stores its data files.";
};
openFirewall = mkOption {
type = types.bool;
default = false;
description = "Open ports in the firewall for the Jackett web interface.";
};
user = mkOption {
type = types.str;
default = "jackett";
description = "User account under which Jackett runs.";
};
group = mkOption {
type = types.str;
default = "jackett";
description = "Group under which Jackett runs.";
};
package = mkOption {
type = types.package;
default = pkgs.jackett;
defaultText = "pkgs.jackett";
description = "Jackett package to use.";
};
};
};
config = mkIf cfg.enable {
systemd.tmpfiles.rules = [
"d '${cfg.dataDir}' 0700 ${cfg.user} ${cfg.group} - -"
];
systemd.services.jackett = {
description = "Jackett";
after = [ "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Type = "simple";
User = cfg.user;
Group = cfg.group;
ExecStart = "${cfg.package}/bin/Jackett --NoUpdates --DataFolder '${cfg.dataDir}'";
Restart = "on-failure";
};
};
networking.firewall = mkIf cfg.openFirewall {
allowedTCPPorts = [ 9117 ];
};
users.users = mkIf (cfg.user == "jackett") {
jackett = {
group = cfg.group;
home = cfg.dataDir;
uid = config.ids.uids.jackett;
};
};
users.groups = mkIf (cfg.group == "jackett") {
jackett.gid = config.ids.gids.jackett;
};
};
}
|
{
"pile_set_name": "Github"
}
|
; RUN: opt < %s -instcombine -S | FileCheck %s
; <rdar://problem/10803154>
; There should be no transformation.
; CHECK: %a = trunc i32 %x to i8
; CHECK: %b = icmp ne i8 %a, 0
; CHECK: %c = and i32 %x, 16711680
; CHECK: %d = icmp ne i32 %c, 0
; CHECK: %e = and i1 %b, %d
; CHECK: ret i1 %e
define i1 @f1(i32 %x) {
%a = trunc i32 %x to i8
%b = icmp ne i8 %a, 0
%c = and i32 %x, 16711680
%d = icmp ne i32 %c, 0
%e = and i1 %b, %d
ret i1 %e
}
|
{
"pile_set_name": "Github"
}
|
from __future__ import unicode_literals
from __future__ import print_function
from threading import Thread, RLock, Event
from datetime import datetime, timedelta
from operator import attrgetter
import logging
log = logging.getLogger("moya.runtime")
class Task(object):
"""A task scheduled for a given time"""
def __init__(self, name, callable, run_time=None, repeat=None):
self.name = name
self.callable = callable
self.run_time = run_time
self.repeat = repeat
def __unicode__(self):
if self.repeat:
return "<task '{}' repeats {}>".format(self.name, self.repeat)
else:
return "<task '{}'>".format(self.name)
__repr__ = __unicode__
def advance(self):
"""Set run time to next cycle"""
if self.repeat:
self.run_time = self.run_time + self.repeat
return True
else:
return False
def ready(self, t):
"""Check if this task is ready to be execute"""
return t >= self.run_time
def run(self):
"""Run the task in it's own thread"""
run_thread = Thread(target=self._run)
run_thread.start()
def _run(self):
try:
self.callable()
except Exception as e:
log.exception("Error in scheduled task '%s'", self.name)
class Scheduler(Thread):
"""A thread that manages scheduled / repeating tasks"""
# The granularity at which tasks can be scheduled
# Super precision is not required given that tasks are unlikely to be more than one a minute
poll_seconds = 1
def __init__(self):
super(Scheduler, self).__init__()
self.lock = RLock()
self.quit_event = Event()
self.tasks = []
self.new_tasks = []
def run(self):
while 1:
# Better than a sleep because we can interrupt it
self.quit_event.wait(self.poll_seconds)
if self.quit_event.is_set():
break
with self.lock:
self.tasks += self.new_tasks
del self.new_tasks[:]
self._check_tasks()
del self.tasks[:]
with self.lock:
del self.new_tasks[:]
def stop(self, wait=True):
"""Stop processing tasks and block till everything has quit"""
self.quit_event.set()
if wait:
self.join()
def _check_tasks(self):
if not self.tasks:
return
t = datetime.utcnow()
ready_tasks = None
self.tasks.sort(key=attrgetter("run_time"))
for i, task in enumerate(self.tasks):
if not task.ready(t):
ready_tasks = self.tasks[:i]
del self.tasks[:i]
break
else:
ready_tasks = self.tasks[:]
del self.tasks[:]
if ready_tasks:
for task in ready_tasks:
if self.quit_event.is_set():
break
task.run()
if task.advance():
self.tasks.append(task)
def add_repeat_task(self, name, callable, repeat):
"""Add a task to be invoked every `repeat` seconds"""
if isinstance(repeat, (int, long, float)):
repeat = timedelta(seconds=repeat)
run_time = datetime.utcnow() + repeat
task = Task(name, callable, run_time=run_time, repeat=repeat)
with self.lock:
self.new_tasks.append(task)
return task
if __name__ == "__main__":
import time
def hello():
print("Hello")
def world():
print("world")
scheduler = Scheduler()
print(scheduler.add_repeat_task("hello", hello, repeat=5))
print(scheduler.add_repeat_task("world", world, repeat=3))
scheduler.start()
try:
while 1:
time.sleep(1)
except:
scheduler.stop()
print("Stopped")
raise
|
{
"pile_set_name": "Github"
}
|
<?php
/*
* This file is part of PHPExifTool.
*
* (c) 2012 Romain Neutron <imprec@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPExiftool\Driver\Tag\FLIR;
use JMS\Serializer\Annotation\ExclusionPolicy;
use PHPExiftool\Driver\AbstractTag;
/**
* @ExclusionPolicy("all")
*/
class DetectorBoard extends AbstractTag
{
protected $Id = 4;
protected $Name = 'DetectorBoard';
protected $FullName = 'FLIR::Parts';
protected $GroupName = 'FLIR';
protected $g0 = 'MakerNotes';
protected $g1 = 'FLIR';
protected $g2 = 'Camera';
protected $Type = 'undef';
protected $Writable = false;
protected $Description = 'Detector Board';
protected $flag_Permanent = true;
protected $Index = 5;
}
|
{
"pile_set_name": "Github"
}
|
//===- llvm/Assembly/PrintModulePass.h - Printing Pass ----------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file defines two passes to print out a module. The PrintModulePass pass
// simply prints out the entire module when it is executed. The
// PrintFunctionPass class is designed to be pipelined with other
// FunctionPass's, and prints out the functions of the module as they are
// processed.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_ASSEMBLY_PRINTMODULEPASS_H
#define LLVM_ASSEMBLY_PRINTMODULEPASS_H
#include <string>
namespace llvm {
class FunctionPass;
class ModulePass;
class raw_ostream;
/// createPrintModulePass - Create and return a pass that writes the
/// module to the specified raw_ostream.
ModulePass *createPrintModulePass(raw_ostream *OS,
bool DeleteStream=false,
const std::string &Banner = "");
/// createPrintFunctionPass - Create and return a pass that prints
/// functions to the specified raw_ostream as they are processed.
FunctionPass *createPrintFunctionPass(const std::string &Banner,
raw_ostream *OS,
bool DeleteStream=false);
} // End llvm namespace
#endif
|
{
"pile_set_name": "Github"
}
|
/* xoreos - A reimplementation of BioWare's Aurora engine
*
* xoreos is the legal property of its developers, whose names
* can be found in the AUTHORS file distributed with this source
* distribution.
*
* xoreos 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.
*
* xoreos 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 xoreos. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file
* A container of The Witcher objects.
*/
#ifndef ENGINES_WITCHER_OBJECTCONTAINER_H
#define ENGINES_WITCHER_OBJECTCONTAINER_H
#include <list>
#include <map>
#include "src/common/types.h"
#include "src/aurora/nwscript/objectcontainer.h"
#include "src/engines/witcher/types.h"
namespace Engines {
namespace Witcher {
class Object;
class Module;
class Area;
class Waypoint;
class Situated;
class Placeable;
class Door;
class Creature;
class Location;
/** A class able to sort objects by distance to a target object. */
class ObjectDistanceSort {
public:
ObjectDistanceSort(const Witcher::Object &target);
bool operator()(Witcher::Object *a, Witcher::Object *b);
private:
float xt, yt, zt;
float getDistance(Witcher::Object &a);
};
class ObjectContainer : public ::Aurora::NWScript::ObjectContainer {
public:
ObjectContainer();
~ObjectContainer();
void clearObjects();
/** Add an object to this container. */
void addObject(Witcher::Object &object);
/** Remove an object from this container. */
void removeObject(Witcher::Object &object);
/** Return the first object of this type. */
::Aurora::NWScript::Object *getFirstObjectByType(ObjectType type) const;
/** Return a search context to iterate over all objects of this type. */
::Aurora::NWScript::ObjectSearch *findObjectsByType(ObjectType type) const;
static Witcher::Object *toObject(::Aurora::NWScript::Object *object);
static Module *toModule (Aurora::NWScript::Object *object);
static Area *toArea (Aurora::NWScript::Object *object);
static Waypoint *toWaypoint (Aurora::NWScript::Object *object);
static Situated *toSituated (Aurora::NWScript::Object *object);
static Placeable *toPlaceable(Aurora::NWScript::Object *object);
static Door *toDoor (Aurora::NWScript::Object *object);
static Creature *toCreature (Aurora::NWScript::Object *object);
static Creature *toPC (Aurora::NWScript::Object *object);
static Location *toLocation(Aurora::NWScript::EngineType *engineType);
private:
typedef std::list<Witcher::Object *> ObjectList;
typedef std::map<ObjectType, ObjectList> ObjectMap;
ObjectMap _objects;
};
} // End of namespace Witcher
} // End of namespace Engines
#endif // ENGINES_WITCHER_OBJECTCONTAINER_H
|
{
"pile_set_name": "Github"
}
|
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPLv3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or later as published by the Free
** Software Foundation and appearing in the file LICENSE.GPL included in
** the packaging of this file. Please review the following information to
** ensure the GNU General Public License version 2.0 requirements will be
** met: http://www.gnu.org/licenses/gpl-2.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.6
import QtQuick.Templates 2.0 as T
import QtQuick.Controls.Universal 2.0
T.TabButton {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
contentItem.implicitHeight + topPadding + bottomPadding)
baselineOffset: contentItem.y + contentItem.baselineOffset
padding: 12 // PivotItemMargin
contentItem: Text {
text: control.text
font: control.font
elide: Text.ElideRight
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
opacity: control.checked || control.down ? 1.0 : 0.2
color: control.Universal.foreground
}
}
|
{
"pile_set_name": "Github"
}
|
{
"_args": [
[
{
"raw": "os-homedir@^1.0.0",
"scope": null,
"escapedName": "os-homedir",
"name": "os-homedir",
"rawSpec": "^1.0.0",
"spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"/Users/chengwei/kafka-doc-zh/doc/zh/node_modules/tildify"
]
],
"_from": "os-homedir@>=1.0.0 <2.0.0",
"_id": "os-homedir@1.0.2",
"_inCache": true,
"_location": "/os-homedir",
"_nodeVersion": "6.6.0",
"_npmOperationalInternal": {
"host": "packages-16-east.internal.npmjs.com",
"tmp": "tmp/os-homedir-1.0.2.tgz_1475211519628_0.7873868853785098"
},
"_npmUser": {
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
},
"_npmVersion": "3.10.3",
"_phantomChildren": {},
"_requested": {
"raw": "os-homedir@^1.0.0",
"scope": null,
"escapedName": "os-homedir",
"name": "os-homedir",
"rawSpec": "^1.0.0",
"spec": ">=1.0.0 <2.0.0",
"type": "range"
},
"_requiredBy": [
"/tildify"
],
"_resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
"_shasum": "ffbc4988336e0e833de0c168c7ef152121aa7fb3",
"_shrinkwrap": null,
"_spec": "os-homedir@^1.0.0",
"_where": "/Users/chengwei/kafka-doc-zh/doc/zh/node_modules/tildify",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"bugs": {
"url": "https://github.com/sindresorhus/os-homedir/issues"
},
"dependencies": {},
"description": "Node.js 4 `os.homedir()` ponyfill",
"devDependencies": {
"ava": "*",
"path-exists": "^2.0.0",
"xo": "^0.16.0"
},
"directories": {},
"dist": {
"shasum": "ffbc4988336e0e833de0c168c7ef152121aa7fb3",
"tarball": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz"
},
"engines": {
"node": ">=0.10.0"
},
"files": [
"index.js"
],
"gitHead": "b1b0ae70a5965fef7005ff6509a5dd1a78c95e36",
"homepage": "https://github.com/sindresorhus/os-homedir#readme",
"keywords": [
"builtin",
"core",
"ponyfill",
"polyfill",
"shim",
"os",
"homedir",
"home",
"dir",
"directory",
"folder",
"user",
"path"
],
"license": "MIT",
"maintainers": [
{
"name": "sindresorhus",
"email": "sindresorhus@gmail.com"
}
],
"name": "os-homedir",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/sindresorhus/os-homedir.git"
},
"scripts": {
"test": "xo && ava"
},
"version": "1.0.2"
}
|
{
"pile_set_name": "Github"
}
|
---
title: "Delete androidStoreApp"
description: "Deletes a androidStoreApp."
author: "dougeby"
localization_priority: Normal
ms.prod: "intune"
doc_type: apiPageType
---
# Delete androidStoreApp
Namespace: microsoft.graph
> **Important:** Microsoft Graph APIs under the /beta version are subject to change; production use is not supported.
> **Note:** The Microsoft Graph API for Intune requires an [active Intune license](https://go.microsoft.com/fwlink/?linkid=839381) for the tenant.
Deletes a [androidStoreApp](../resources/intune-apps-androidstoreapp.md).
## Prerequisites
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see [Permissions](/graph/permissions-reference).
|Permission type|Permissions (from most to least privileged)|
|:---|:---|
|Delegated (work or school account)|DeviceManagementApps.ReadWrite.All|
|Delegated (personal Microsoft account)|Not supported.|
|Application|DeviceManagementApps.ReadWrite.All|
## HTTP Request
<!-- {
"blockType": "ignored"
}
-->
``` http
DELETE /deviceAppManagement/mobileApps/{mobileAppId}
DELETE /deviceAppManagement/mobileApps/{mobileAppId}/userStatuses/{userAppInstallStatusId}/app
DELETE /deviceAppManagement/mobileApps/{mobileAppId}/deviceStatuses/{mobileAppInstallStatusId}/app
```
## Request headers
|Header|Value|
|:---|:---|
|Authorization|Bearer <token> Required.|
|Accept|application/json|
## Request body
Do not supply a request body for this method.
## Response
If successful, this method returns a `204 No Content` response code.
## Example
### Request
Here is an example of the request.
``` http
DELETE https://graph.microsoft.com/beta/deviceAppManagement/mobileApps/{mobileAppId}
```
### Response
Here is an example of the response. Note: The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
``` http
HTTP/1.1 204 No Content
```
|
{
"pile_set_name": "Github"
}
|
// +build integration
package integration
import (
"fmt"
"os"
"testing"
"github.com/apex/log"
"github.com/apex/log/handlers/cli"
"github.com/aws/aws-sdk-go/aws"
"github.com/stretchr/testify/assert"
"github.com/versent/unicreds"
)
func init() {
log.SetHandler(cli.Default)
log.SetLevel(log.DebugLevel)
}
func TestIntegrationGetSecret(t *testing.T) {
var err error
region := os.Getenv("AWS_REGION")
if region == "" {
region = "us-west-2"
}
alias := os.Getenv("UNICREDS_KEY_ALIAS")
if alias == "" {
alias = "alias/unicreds"
}
tableName := os.Getenv("UNICREDS_TABLE_NAME")
if tableName == "" {
tableName = "credential-store"
}
unicreds.SetAwsConfig(aws.String(region), nil)
encContext := unicreds.NewEncryptionContextValue()
(*encContext)["test"] = aws.String("123")
for i := 0; i < 15; i++ {
err = unicreds.PutSecret(aws.String(tableName), alias, "Integration1", fmt.Sprintf("secret%d", i), unicreds.PaddedInt(i), encContext)
if err != nil {
log.Errorf("put err: %v", err)
}
assert.Nil(t, err)
}
cred, err := unicreds.GetHighestVersionSecret(aws.String(tableName), "Integration1", encContext)
assert.Nil(t, err)
assert.Equal(t, cred.Name, "Integration1")
assert.Equal(t, cred.Secret, "secret14")
assert.NotZero(t, cred.CreatedAt)
assert.NotZero(t, cred.Version)
for i := 0; i < 15; i++ {
cred, err := unicreds.GetSecret(aws.String(tableName), "Integration1", unicreds.PaddedInt(i), encContext)
assert.Nil(t, err)
assert.Equal(t, cred.Name, "Integration1")
assert.Equal(t, cred.Secret, fmt.Sprintf("secret%d", i))
assert.NotZero(t, cred.CreatedAt)
assert.Equal(t, cred.Version, unicreds.PaddedInt(i))
}
creds, err := unicreds.GetAllSecrets(aws.String(tableName), true)
assert.Nil(t, err)
assert.Len(t, creds, 15)
// change the context and ensure this triggers an error
(*encContext)["test"] = aws.String("345")
cred, err = unicreds.GetHighestVersionSecret(aws.String(tableName), "Integration1", encContext)
assert.Error(t, err)
assert.Nil(t, cred)
err = unicreds.DeleteSecret(aws.String(tableName), "Integration1")
assert.Nil(t, err)
}
|
{
"pile_set_name": "Github"
}
|
<p>
<em>This section describes the status of this document at the time of its publication. Other
documents may supersede this document. A list of current
<abbr title="World Wide Web Consortium">W3C</abbr> publications and the latest revision of this
technical report can be found in the
<a href="http://www.w3.org/TR/"><abbr title="World Wide Web Consortium">W3C</abbr> technical
reports index</a> at http://www.w3.org/TR/.</em>
</p>
<p>
This document was published by the <a href="https://www.w3.org/webauthn/">Web Authentication Working Group</a>
as an Editors' Draft. This document is intended to become a W3C Recommendation.
Feedback and comments on this specification are welcome. Please use
<a href="https://github.com/w3c/webauthn/issues">Github issues</a>.
Discussions may also be found in the
<a href="http://lists.w3.org/Archives/Public/public-webauthn/">public-webauthn@w3.org archives</a>.
</p>
<p>
Publication as an Editors' Draft does not imply endorsement by the
<abbr title="World Wide Web Consortium">W3C</abbr> Membership. This is a draft document and may
be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite
this document as other than work in progress.
</p>
<p>
This document was produced by a group operating under the
<a href="http://www.w3.org/Consortium/Patent-Policy/">
<abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>.
<abbr title="World Wide Web Consortium">W3C</abbr> maintains a
<a href="https://www.w3.org/2004/01/pp-impl/87227/status" rel="disclosure">public list of any
patent disclosures</a> made in connection with the deliverables of the group; that page also
includes instructions for disclosing a patent. An individual who has actual knowledge of a
patent which the individual believes contains
<a href="http://www.w3.org/Consortium/Patent-Policy/#def-essential">Essential
Claim(s)</a> must disclose the information in accordance with
<a href="http://www.w3.org/Consortium/Patent-Policy/#sec-Disclosure">section 6 of the
<abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>.
</p>
<p>
This document is governed by the <a id="w3c_process_revision" href="https://www.w3.org/2020/Process-20200915/">15 September 2020 W3C Process Document</a>.
</p>
<p>[STATUSTEXT]
|
{
"pile_set_name": "Github"
}
|
https://github.com/easymotion/vim-easymotion.git
|
{
"pile_set_name": "Github"
}
|
**This airport has been automatically generated**
We have no information about VG33[*] airport other than its name, ICAO and location (US).
This airport will have to be done from scratch, which includes adding runways, taxiways, parking locations, boundaries...
Good luck if you decide to do this airport!
|
{
"pile_set_name": "Github"
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ncdc_datasets.r
\name{ncdc_datasets}
\alias{ncdc_datasets}
\title{Search NOAA datasets}
\usage{
ncdc_datasets(
datasetid = NULL,
datatypeid = NULL,
stationid = NULL,
locationid = NULL,
startdate = NULL,
enddate = NULL,
sortfield = NULL,
sortorder = NULL,
limit = 25,
offset = NULL,
token = NULL,
...
)
}
\arguments{
\item{datasetid}{(optional) Accepts a single valid dataset id. Data returned
will be from the dataset specified.}
\item{datatypeid}{Accepts a valid data type id or a vector or list of data
type ids. (optional)}
\item{stationid}{Accepts a valid station id or a vector or list of station
ids}
\item{locationid}{Accepts a valid location id or a vector or list of
location ids (optional)}
\item{startdate}{(optional) Accepts valid ISO formated date (yyyy-mm-dd) or date time
(YYYY-MM-DDThh:mm:ss). Data returned will have data after the specified date. The
date range must be less than 1 year.}
\item{enddate}{(optional) Accepts valid ISO formated date (yyyy-mm-dd) or date time
(YYYY-MM-DDThh:mm:ss). Data returned will have data before the specified date. The
date range must be less than 1 year.}
\item{sortfield}{The field to sort results by. Supports id, name, mindate,
maxdate, and datacoverage fields (optional)}
\item{sortorder}{Which order to sort by, asc or desc. Defaults to
asc (optional)}
\item{limit}{Defaults to 25, limits the number of results in the response.
Maximum is 1000 (optional)}
\item{offset}{Defaults to 0, used to offset the resultlist (optional)}
\item{token}{This must be a valid token token supplied to you by NCDC's
Climate Data Online access token generator. (required) See
\strong{Authentication} section below for more details.}
\item{...}{Curl options passed on to \code{\link[crul]{HttpClient}}
(optional)}
}
\value{
A data.frame for all datasets, or a list of length two, each with
a data.frame.
}
\description{
From the NOAA API docs: All of our data are in datasets. To retrieve
any data from us, you must know what dataset it is in.
}
\section{Authentication}{
Get an API key (aka, token) at \url{https://www.ncdc.noaa.gov/cdo-web/token}.
You can pass your token in as an argument or store it one of two places:
\itemize{
\item your .Rprofile file with the entry
\code{options(noaakey = "your-noaa-token")}
\item your .Renviron file with the entry
\code{NOAA_KEY=your-noaa-token}
}
See \code{\link{Startup}} for information on how to create/find your
.Rrofile and .Renviron files
}
\examples{
\dontrun{
# Get a table of all datasets
ncdc_datasets()
# Get details from a particular dataset
ncdc_datasets(datasetid='ANNUAL')
# Get datasets with Temperature at the time of observation (TOBS) data type
ncdc_datasets(datatypeid='TOBS')
## two datatypeid's
ncdc_datasets(datatypeid=c('TOBS', "ACMH"))
# Get datasets with data for a series of the same parameter arg, in this case
# stationid's
ncdc_datasets(stationid='COOP:310090')
ncdc_datasets(stationid=c('COOP:310090','COOP:310184','COOP:310212'))
# Multiple datatypeid's
ncdc_datasets(datatypeid=c('ACMC','ACMH','ACSC'))
ncdc_datasets(datasetid='ANNUAL', datatypeid=c('ACMC','ACMH','ACSC'))
ncdc_datasets(datasetid='GSOY', datatypeid=c('ACMC','ACMH','ACSC'))
# Multiple locationid's
ncdc_datasets(locationid="FIPS:30091")
ncdc_datasets(locationid=c("FIPS:30103", "FIPS:30091"))
}
}
\references{
\url{https://www.ncdc.noaa.gov/cdo-web/webservices/v2}
}
\seealso{
Other ncdc:
\code{\link{ncdc_combine}()},
\code{\link{ncdc_datacats}()},
\code{\link{ncdc_datatypes}()},
\code{\link{ncdc_locs_cats}()},
\code{\link{ncdc_locs}()},
\code{\link{ncdc_plot}()},
\code{\link{ncdc_stations}()},
\code{\link{ncdc}()}
}
\concept{ncdc}
|
{
"pile_set_name": "Github"
}
|
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_XmlRpc
* @subpackage Value
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id: BigInteger.php 24594 2012-01-05 21:27:01Z matthew $
*/
/**
* Zend_XmlRpc_Value_Integer
*/
require_once 'Zend/XmlRpc/Value/Integer.php';
/**
* @category Zend
* @package Zend_XmlRpc
* @subpackage Value
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Zend_XmlRpc_Value_BigInteger extends Zend_XmlRpc_Value_Integer
{
/**
* @param mixed $value
*/
public function __construct($value)
{
require_once 'Zend/Crypt/Math/BigInteger.php';
$integer = new Zend_Crypt_Math_BigInteger;
$this->_value = $integer->init($value);
$this->_type = self::XMLRPC_TYPE_I8;
}
/**
* Return bigint value
*
* @return string
*/
public function getValue()
{
return $this->_value;
}
}
|
{
"pile_set_name": "Github"
}
|
# encoding: utf-8
module ThemesForRails
class << self
def config
@config ||= ThemesForRails::Config.new
yield(@config) if block_given?
@config
end
def available_themes(&block)
Dir.glob(File.join(config.themes_path, "*"), &block)
end
alias each_theme_dir available_themes
def available_theme_names
available_themes.map {|theme| File.basename(theme) }
end
def add_themes_path_to_sass
if ThemesForRails.config.sass_is_available?
each_theme_dir do |dir|
if File.directory?(dir) # Need to get rid of the '.' and '..'
sass_dir = "#{dir}/stylesheets/sass"
css_dir = "#{dir}/stylesheets"
unless already_configured_in_sass?(sass_dir)
Sass::Plugin.add_template_location sass_dir, css_dir
end
end
end
else
raise "Sass is not available. What are you trying to do?"
end
end
def already_configured_in_sass?(sass_dir)
Sass::Plugin.template_location_array.map(&:first).include?(sass_dir)
end
end
end
require 'active_support/dependencies'
require 'themes_for_rails/interpolation'
require 'themes_for_rails/config'
require 'themes_for_rails/common_methods'
require 'themes_for_rails/url_helpers'
require 'themes_for_rails/action_view'
require 'themes_for_rails/assets_controller'
require 'themes_for_rails/action_controller'
require 'themes_for_rails/action_mailer'
require 'themes_for_rails/railtie'
require 'themes_for_rails/routes'
|
{
"pile_set_name": "Github"
}
|
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\BrowserKit;
/**
* Request object.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @api
*/
class Request
{
protected $uri;
protected $method;
protected $parameters;
protected $files;
protected $cookies;
protected $server;
protected $content;
/**
* Constructor.
*
* @param string $uri The request URI
* @param string $method The HTTP method request
* @param array $parameters The request parameters
* @param array $files An array of uploaded files
* @param array $cookies An array of cookies
* @param array $server An array of server parameters
* @param string $content The raw body data
*
* @api
*/
public function __construct($uri, $method, array $parameters = array(), array $files = array(), array $cookies = array(), array $server = array(), $content = null)
{
$this->uri = $uri;
$this->method = $method;
$this->parameters = $parameters;
$this->files = $files;
$this->cookies = $cookies;
$this->server = $server;
$this->content = $content;
}
/**
* Gets the request URI.
*
* @return string The request URI
*
* @api
*/
public function getUri()
{
return $this->uri;
}
/**
* Gets the request HTTP method.
*
* @return string The request HTTP method
*
* @api
*/
public function getMethod()
{
return $this->method;
}
/**
* Gets the request parameters.
*
* @return array The request parameters
*
* @api
*/
public function getParameters()
{
return $this->parameters;
}
/**
* Gets the request server files.
*
* @return array The request files
*
* @api
*/
public function getFiles()
{
return $this->files;
}
/**
* Gets the request cookies.
*
* @return array The request cookies
*
* @api
*/
public function getCookies()
{
return $this->cookies;
}
/**
* Gets the request server parameters.
*
* @return array The request server parameters
*
* @api
*/
public function getServer()
{
return $this->server;
}
/**
* Gets the request raw body data.
*
* @return string The request raw body data.
*
* @api
*/
public function getContent()
{
return $this->content;
}
}
|
{
"pile_set_name": "Github"
}
|
#ifndef GRAPHICS_API_GLES3
#define NO_NATIVE_SHADOWMAP
#endif
#ifdef NO_NATIVE_SHADOWMAP
#define TEXTURE2D_SHADOW(textureName) uniform mediump sampler2D textureName
#define SAMPLE_TEXTURE2D_SHADOW(textureName, coord3) (texture2D(textureName,coord3.xy).r<coord3.z?0.0:1.0)
#define TEXTURE2D_SHADOW_PARAM(shadowMap) mediump sampler2D shadowMap
#else
#define TEXTURE2D_SHADOW(textureName) uniform mediump sampler2DShadow textureName
#define SAMPLE_TEXTURE2D_SHADOW(textureName, coord3) textureLod(textureName,coord3,0.0)
#define TEXTURE2D_SHADOW_PARAM(shadowMap) mediump sampler2DShadow shadowMap
#endif
#if defined(RECEIVESHADOW)&&defined(SHADOW)
#define CALCULATE_SHADOWS
#endif
#if defined(RECEIVESHADOW)&&defined(SHADOW_SPOT)
#define CALCULATE_SPOTSHADOWS
#endif
uniform vec4 u_ShadowBias; // x: depth bias, y: normal bias
#if defined(CALCULATE_SHADOWS)||defined(CALCULATE_SPOTSHADOWS)
#include "ShadowSampleTent.glsl"
uniform vec4 u_ShadowMapSize;
uniform vec4 u_ShadowParams; // x: shadowStrength y: ShadowSpotLightStrength
float sampleShdowMapFiltered4(TEXTURE2D_SHADOW_PARAM(shadowMap),vec3 shadowCoord,vec4 shadowMapSize)
{
float attenuation;
vec4 attenuation4;
vec2 offset=shadowMapSize.xy/2.0;
vec3 shadowCoord0=shadowCoord + vec3(-offset,0.0);
vec3 shadowCoord1=shadowCoord + vec3(offset.x,-offset.y,0.0);
vec3 shadowCoord2=shadowCoord + vec3(-offset.x,offset.y,0.0);
vec3 shadowCoord3=shadowCoord + vec3(offset,0.0);
attenuation4.x = SAMPLE_TEXTURE2D_SHADOW(shadowMap, shadowCoord0);
attenuation4.y = SAMPLE_TEXTURE2D_SHADOW(shadowMap, shadowCoord1);
attenuation4.z = SAMPLE_TEXTURE2D_SHADOW(shadowMap, shadowCoord2);
attenuation4.w = SAMPLE_TEXTURE2D_SHADOW(shadowMap, shadowCoord3);
attenuation = dot(attenuation4, vec4(0.25));
return attenuation;
}
float sampleShdowMapFiltered9(TEXTURE2D_SHADOW_PARAM(shadowMap),vec3 shadowCoord,vec4 shadowmapSize)
{
float attenuation;
float fetchesWeights[9];
vec2 fetchesUV[9];
sampleShadowComputeSamplesTent5x5(shadowmapSize, shadowCoord.xy, fetchesWeights, fetchesUV);
attenuation = fetchesWeights[0] * SAMPLE_TEXTURE2D_SHADOW(shadowMap, vec3(fetchesUV[0].xy, shadowCoord.z));
attenuation += fetchesWeights[1] * SAMPLE_TEXTURE2D_SHADOW(shadowMap, vec3(fetchesUV[1].xy, shadowCoord.z));
attenuation += fetchesWeights[2] * SAMPLE_TEXTURE2D_SHADOW(shadowMap, vec3(fetchesUV[2].xy, shadowCoord.z));
attenuation += fetchesWeights[3] * SAMPLE_TEXTURE2D_SHADOW(shadowMap, vec3(fetchesUV[3].xy, shadowCoord.z));
attenuation += fetchesWeights[4] * SAMPLE_TEXTURE2D_SHADOW(shadowMap, vec3(fetchesUV[4].xy, shadowCoord.z));
attenuation += fetchesWeights[5] * SAMPLE_TEXTURE2D_SHADOW(shadowMap, vec3(fetchesUV[5].xy, shadowCoord.z));
attenuation += fetchesWeights[6] * SAMPLE_TEXTURE2D_SHADOW(shadowMap, vec3(fetchesUV[6].xy, shadowCoord.z));
attenuation += fetchesWeights[7] * SAMPLE_TEXTURE2D_SHADOW(shadowMap, vec3(fetchesUV[7].xy, shadowCoord.z));
attenuation += fetchesWeights[8] * SAMPLE_TEXTURE2D_SHADOW(shadowMap, vec3(fetchesUV[8].xy, shadowCoord.z));
return attenuation;
}
#endif
#if defined(CALCULATE_SHADOWS)//shader中自定义的宏不可用ifdef 必须改成if defined
TEXTURE2D_SHADOW(u_ShadowMap);
uniform mat4 u_ShadowMatrices[4];
uniform vec4 u_ShadowSplitSpheres[4];// max cascade is 4
mediump int computeCascadeIndex(vec3 positionWS)
{
vec3 fromCenter0 = positionWS - u_ShadowSplitSpheres[0].xyz;
vec3 fromCenter1 = positionWS - u_ShadowSplitSpheres[1].xyz;
vec3 fromCenter2 = positionWS - u_ShadowSplitSpheres[2].xyz;
vec3 fromCenter3 = positionWS - u_ShadowSplitSpheres[3].xyz;
mediump vec4 comparison = vec4(
dot(fromCenter0, fromCenter0)<u_ShadowSplitSpheres[0].w,
dot(fromCenter1, fromCenter1)<u_ShadowSplitSpheres[1].w,
dot(fromCenter2, fromCenter2)<u_ShadowSplitSpheres[2].w,
dot(fromCenter3, fromCenter3)<u_ShadowSplitSpheres[3].w);
comparison.yzw = clamp(comparison.yzw - comparison.xyz,0.0,1.0);//keep the nearest
mediump vec4 indexCoefficient = vec4(4.0,3.0,2.0,1.0);
mediump int index = 4 - int(dot(comparison, indexCoefficient));
return index;
}
vec4 getShadowCoord(vec4 positionWS)
{
#ifdef SHADOW_CASCADE
mediump int cascadeIndex = computeCascadeIndex(positionWS.xyz);
if(cascadeIndex > 3)// out of shadow range cascadeIndex is 4.
return vec4(0.0);
#ifdef GRAPHICS_API_GLES3
return u_ShadowMatrices[cascadeIndex] * positionWS;
#else
mat4 shadowMat;
if(cascadeIndex == 0)
shadowMat = u_ShadowMatrices[0];
else if(cascadeIndex == 1)
shadowMat = u_ShadowMatrices[1];
else if(cascadeIndex == 2)
shadowMat = u_ShadowMatrices[2];
else
shadowMat = u_ShadowMatrices[3];
return shadowMat * positionWS;
#endif
#else
return u_ShadowMatrices[0] * positionWS;
#endif
}
float sampleShadowmap(vec4 shadowCoord)
{
shadowCoord.xyz /= shadowCoord.w;
float attenuation = 1.0;
if(shadowCoord.z > 0.0 && shadowCoord.z < 1.0)
{
#if defined(SHADOW_SOFT_SHADOW_HIGH)
attenuation = sampleShdowMapFiltered9(u_ShadowMap,shadowCoord.xyz,u_ShadowMapSize);
#elif defined(SHADOW_SOFT_SHADOW_LOW)
attenuation = sampleShdowMapFiltered4(u_ShadowMap,shadowCoord.xyz,u_ShadowMapSize);
#else
attenuation = SAMPLE_TEXTURE2D_SHADOW(u_ShadowMap,shadowCoord.xyz);
#endif
attenuation = mix(1.0,attenuation,u_ShadowParams.x);//shadowParams.x:shadow strength
}
return attenuation;
|
{
"pile_set_name": "Github"
}
|
/**
* Created with JetBrains PhpStorm.
* User: xuheng
* Date: 12-9-26
* Time: 下午12:29
* To change this template use File | Settings | File Templates.
*/
//清空上次查选的痕迹
editor.firstForSR = 0;
editor.currentRangeForSR = null;
//给tab注册切换事件
/**
* tab点击处理事件
* @param tabHeads
* @param tabBodys
* @param obj
*/
function clickHandler( tabHeads,tabBodys,obj ) {
//head样式更改
for ( var k = 0, len = tabHeads.length; k < len; k++ ) {
tabHeads[k].className = "";
}
obj.className = "focus";
//body显隐
var tabSrc = obj.getAttribute( "tabSrc" );
for ( var j = 0, length = tabBodys.length; j < length; j++ ) {
var body = tabBodys[j],
id = body.getAttribute( "id" );
if ( id != tabSrc ) {
body.style.zIndex = 1;
} else {
body.style.zIndex = 200;
}
}
}
/**
* TAB切换
* @param tabParentId tab的父节点ID或者对象本身
*/
function switchTab( tabParentId ) {
var tabElements = $G( tabParentId ).children,
tabHeads = tabElements[0].children,
tabBodys = tabElements[1].children;
for ( var i = 0, length = tabHeads.length; i < length; i++ ) {
var head = tabHeads[i];
if ( head.className === "focus" )clickHandler(tabHeads,tabBodys, head );
head.onclick = function () {
clickHandler(tabHeads,tabBodys,this);
}
}
}
//是否区分大小写
function getMatchCase(id) {
return $G(id).checked ? true : false;
}
//查找
$G("nextFindBtn").onclick = function (txt, dir, mcase) {
var findtxt = $G("findtxt").value, obj;
if (!findtxt) {
return false;
}
obj = {
searchStr:findtxt,
dir:1,
casesensitive:getMatchCase("matchCase")
};
if (!frCommond(obj)) {
alert(lang.getEnd);
}
};
$G("nextReplaceBtn").onclick = function (txt, dir, mcase) {
var findtxt = $G("findtxt1").value, obj;
if (!findtxt) {
return false;
}
obj = {
searchStr:findtxt,
dir:1,
casesensitive:getMatchCase("matchCase1")
};
frCommond(obj);
};
$G("preFindBtn").onclick = function (txt, dir, mcase) {
var findtxt = $G("findtxt").value, obj;
if (!findtxt) {
return false;
}
obj = {
searchStr:findtxt,
dir:-1,
casesensitive:getMatchCase("matchCase")
};
if (!frCommond(obj)) {
alert(lang.getStart);
}
};
$G("preReplaceBtn").onclick = function (txt, dir, mcase) {
var findtxt = $G("findtxt1").value, obj;
if (!findtxt) {
return false;
}
obj = {
searchStr:findtxt,
dir:-1,
casesensitive:getMatchCase("matchCase1")
};
frCommond(obj);
};
//替换
$G("repalceBtn").onclick = function () {
var findtxt = $G("findtxt1").value.replace(/^\s|\s$/g, ""), obj,
replacetxt = $G("replacetxt").value.replace(/^\s|\s$/g, "");
if (!findtxt) {
return false;
}
if (findtxt == replacetxt || (!getMatchCase("matchCase1") && findtxt.toLowerCase() == replacetxt.toLowerCase())) {
return false;
}
obj = {
searchStr:findtxt,
dir:1,
casesensitive:getMatchCase("matchCase1"),
replaceStr:replacetxt
};
frCommond(obj);
};
//全部替换
$G("repalceAllBtn").onclick = function () {
var findtxt = $G("findtxt1").value.replace(/^\s|\s$/g, ""), obj,
replacetxt = $G("replacetxt").value.replace(/^\s|\s$/g, "");
if (!findtxt) {
return false;
}
if (findtxt == replacetxt || (!getMatchCase("matchCase1") && findtxt.toLowerCase() == replacetxt.toLowerCase())) {
return false;
}
obj = {
searchStr:findtxt,
casesensitive:getMatchCase("matchCase1"),
replaceStr:replacetxt,
all:true
};
var num = frCommond(obj);
if (num) {
alert(lang.countMsg.replace("{#count}", num));
}
};
//执行
var frCommond = function (obj) {
return editor.execCommand("searchreplace", obj);
};
switchTab("searchtab");
|
{
"pile_set_name": "Github"
}
|
/*
* Callbacks prototypes for FSM
*
* Copyright (C) 1996 Universidade de Lisboa
*
* Written by Pedro Roque Marques (roque@di.fc.ul.pt)
*
* This software may be used and distributed according to the terms of
* the GNU General Public License, incorporated herein by reference.
*/
#ifndef CALLBACKS_H
#define CALLBACKS_H
extern void cb_out_1(struct pcbit_dev *dev, struct pcbit_chan *chan,
struct callb_data *data);
extern void cb_out_2(struct pcbit_dev *dev, struct pcbit_chan *chan,
struct callb_data *data);
extern void cb_in_1(struct pcbit_dev *dev, struct pcbit_chan *chan,
struct callb_data *data);
extern void cb_in_2(struct pcbit_dev *dev, struct pcbit_chan *chan,
struct callb_data *data);
extern void cb_in_3(struct pcbit_dev *dev, struct pcbit_chan *chan,
struct callb_data *data);
extern void cb_disc_1(struct pcbit_dev *dev, struct pcbit_chan *chan,
struct callb_data *data);
extern void cb_disc_2(struct pcbit_dev *dev, struct pcbit_chan *chan,
struct callb_data *data);
extern void cb_disc_3(struct pcbit_dev *dev, struct pcbit_chan *chan,
struct callb_data *data);
extern void cb_notdone(struct pcbit_dev *dev, struct pcbit_chan *chan,
struct callb_data *data);
extern void cb_selp_1(struct pcbit_dev *dev, struct pcbit_chan *chan,
struct callb_data *data);
extern void cb_open(struct pcbit_dev *dev, struct pcbit_chan *chan,
struct callb_data *data);
#endif
|
{
"pile_set_name": "Github"
}
|
'use strict';
const runAction = require('./action');
const extend = require('node.extend');
const fs = require('fs');
const path = require('path');
const {promisify} = require('util');
const pkg = require('../package.json');
const promiseTimeout = require('p-timeout');
const puppeteer = require('puppeteer');
const semver = require('semver');
const runnerJavascriptPromises = {};
const readFile = promisify(fs.readFile);
module.exports = pa11y;
/**
* Run accessibility tests on a web page.
* @public
* @param {String} url - The URL to run tests against.
* @param {Object} [options={}] - Options to change the way tests run.
* @param {Function} [callback] - An optional callback to use instead of promises.
* @returns {Promise} Returns a promise which resolves with a results object.
*/
async function pa11y(url, options = {}, callback) {
const state = {};
let pa11yError;
let pa11yResults;
[url, options, callback] = parseArguments(url, options, callback);
try {
// Verify that the given options are valid
verifyOptions(options);
// Call the actual Pa11y test runner with
// a timeout if it takes too long
pa11yResults = await promiseTimeout(
runPa11yTest(url, options, state),
options.timeout,
`Pa11y timed out (${options.timeout}ms)`
);
} catch (error) {
// Capture error if a callback is provided, otherwise reject with error
if (callback) {
pa11yError = error;
} else {
throw error;
}
} finally {
await stateCleanup(state);
}
// Run callback if present, and resolve with pa11yResults
return callback ? callback(pa11yError, pa11yResults) : pa11yResults;
}
/**
* Parse arguments from the command-line to properly identify the url, options, and callback
* @private
* @param {String} url - The URL to run tests against.
* @param {Object} [options={}] - Options to change the way tests run.
* @param {Function} [callback] - An optional callback to use instead of promises.
* @returns {Array} the new values of url, options, and callback
*/
function parseArguments(url, options, callback) {
if (!callback && typeof options === 'function') {
callback = options;
options = {};
}
if (typeof url !== 'string') {
options = url;
url = options.url;
}
url = sanitizeUrl(url);
options = defaultOptions(options);
return [url,
options,
callback];
}
/**
* Default the passed in options using Pa11y's defaults.
* @private
* @param {Object} [options] - The options to apply defaults to.
* @returns {Object} Returns the defaulted options.
*/
function defaultOptions(options) {
options = extend({}, pa11y.defaults, options);
options.ignore = options.ignore.map(ignored => ignored.toLowerCase());
if (!options.includeNotices) {
options.ignore.push('notice');
}
if (!options.includeWarnings) {
options.ignore.push('warning');
}
return options;
}
/**
* Internal Pa11y test runner.
* @private
* @param {String} url - The URL to run tests against.
* @param {Object} options - Options to change the way tests run.
* @param {Object} state - The current pa11y internal state, fields will be mutated by
* this function.
* @returns {Promise} Returns a promise which resolves with a results object.
*/
async function runPa11yTest(url, options, state) {
options.log.info(`Running Pa11y on URL ${url}`);
await setBrowser(options, state);
await setPage(options, state);
await interceptRequests(options, state);
await gotoUrl(url, options, state);
await runActionsList(options, state);
await injectRunners(options, state);
// Launch the test runner!
options.log.debug('Running Pa11y on the page');
/* istanbul ignore next */
if (options.wait > 0) {
options.log.debug(`Waiting for ${options.wait}ms`);
}
const results = await runPa11yWithOptions(options, state);
options.log.debug(`Document title: "${results.documentTitle}"`);
await saveScreenCapture(options, state);
return results;
}
/**
* Ensures that puppeteer resources are freed and listeners removed.
* @private
* @param {Object} state - The last-known state of the test-run.
* @returns {Promise} A promise which resolves when resources are released
*/
async function stateCleanup(state) {
if (state.browser && state.autoClose) {
await state.browser.close();
} else if (state.page) {
state.page.removeListener('request', state.requestInterceptCallback);
state.page.removeListener('console', state.consoleCallback);
if (state.autoClosePage) {
await state.page.close();
}
}
}
/**
* Sets or initialises the browser.
* @private
* @param {Object} options - Options to change the way tests run.
* @param {Object} state - The current pa11y internal state, fields will be mutated by
* this function.
* @returns {Promise} A promise which resolves when resources are released
*/
async function setBrowser(options, state) {
if (options.browser) {
options.log.debug(
'Using a pre-configured Headless Chrome instance, ' +
'the `chromeLaunchConfig` option will be ignored'
);
state.browser = options.browser;
state.autoClose = false;
} else {
// Launch a Headless Chrome browser. We use a
// state object which is accessible from the
// wrapping function
options.log.debug('Launching Headless Chrome');
state.browser = await puppeteer.launch(
options.chromeLaunchConfig
);
state.autoClose = true;
}
}
/**
* Configures the browser page to be used for the test.
* @private
* @param {Object} [options] - Options to change the way tests run.
* @param {Object} state - The current pa11y internal state, fields will be mutated by
* this function.
* @returns {Promise} A promise which resolves when the page has been configured.
*/
async function setPage(options, state) {
if (options.browser && options.page) {
state.page = options.page;
state.autoClosePage = false;
} else {
state.page = await state.browser.newPage();
state.autoClosePage = true;
}
// Listen for console logs on the page so that we can
// output them for debugging purposes
state.consoleCallback = message => {
options.log.debug(`Browser Console: ${message.text()}`);
};
state.page.on('console', state.consoleCallback);
options.log.debug('Opening URL in Headless Chrome');
if (options.userAgent) {
await state.page.setUserAgent(options.userAgent);
}
await state.page.setViewport(options.viewport);
}
/**
* Configures the browser page to intercept requests if necessary
* @private
* @param {Object} [options] - Options to change the way tests run.
* @param {Object} state - The current pa11y internal state, fields will be mutated by
* this function.
* @returns {Promise} A promise which resolves immediately if no listeners are necessary
* or after listener functions have been attached.
*/
async function interceptRequests(options, state) {
// Avoid to use `page.setRequestInterception` when not necessary
// because it occasionally stops page load:
// https://github.com/GoogleChrome/puppeteer/issues/3111
// https://github.com/GoogleChrome/
|
{
"pile_set_name": "Github"
}
|
--- glibc-2.3.2/configure-orig 2009-03-26 15:46:33.000000000 +0100
+++ glibc-2.3.2/configure 2009-03-26 15:49:15.000000000 +0100
@@ -3850,67 +3850,6 @@
# These programs are version sensitive.
-for ac_prog in ${ac_tool_prefix}gcc ${ac_tool_prefix}cc
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
- ac_cv_prog_CC="$ac_prog"
- echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
- echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- test -n "$CC" && break
-done
-
-if test -z "$CC"; then
- ac_verc_fail=yes
-else
- # Found it, now check the version.
- echo "$as_me:$LINENO: checking version of $CC" >&5
-echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
- ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'`
- case $ac_prog_version in
- '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
- 3.[2-9]*)
- ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
- *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
-
- esac
- echo "$as_me:$LINENO: result: $ac_prog_version" >&5
-echo "${ECHO_T}$ac_prog_version" >&6
-fi
-if test $ac_verc_fail = yes; then
- critic_missing="$critic_missing gcc"
-fi
-
for ac_prog in gnumake gmake make
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
{
"pile_set_name": "Github"
}
|
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Main Menu -->
<string name="shows">節目</string>
<string name="lists">清單</string>
<string name="movies">電影</string>
<string name="statistics">統計</string>
<string name="navigation_more">More</string>
<string name="search">搜尋</string>
<string name="preferences">設置</string>
<string name="help">說明</string>
<string name="no_more_updates">此版本的 Android 將不會收到 SeriesGuide 的任何更新。</string>
<!-- Media items -->
<string name="show_details">Details</string>
<string name="episode">集數</string>
<string name="episode_number">第 %d 集</string>
<string name="episodes">集數</string>
<string name="season">季</string>
<string name="season_number">第 %d 季</string>
<string name="specialseason">特集</string>
<string name="ratings">評分</string>
<!-- Descriptions -->
<string name="description_overview">簡介</string>
<string name="description_poster">顯示海報</string>
<string name="description_image">影集圖片</string>
<string name="description_menu_overflow">更多選項</string>
<!-- Actions -->
<string name="clear">清除</string>
<string name="discard">放棄</string>
<string name="save_selection">儲存所選項目</string>
<string name="action_display_all">顯示全部</string>
<string name="web_search">網頁搜尋</string>
<string name="add_to_homescreen">新增至主螢幕</string>
<string name="action_open">開啟</string>
<string name="sync_manually">手動同步</string>
<string name="sync_and_update">同步 & 和更新</string>
<string name="sync_and_download_all">同步& 及下載</string>
<string name="action_turn_off">關閉</string>
<string name="action_stream">Stream or purchase</string>
<!-- Search -->
<string name="clear_search_history">清除搜尋記錄</string>
<string name="search_hint">搜尋集數</string>
<!-- Status messages -->
<string name="updated">已更新到最新版本。</string>
<string name="updated_details">Details</string>
<string name="norating">無</string>
<string name="unknown">不明</string>
<string name="offline">連接到網路,然後再試一次。</string>
<string name="app_not_available">沒有應用程式可以處理此需求</string>
<string name="people_empty">什麼東西都沒有? !點擊以在試一次。</string>
<string name="database_error">無法修改資料。</string>
<string name="reinstall_info">嘗試在設置中備份,然後重新安裝應用並恢復備份。</string>
<string name="api_error_generic">無法移除節目%s。請稍後再試。</string>
<string name="api_failed">失敗:%s</string>
<string name="copy_to_clipboard">已複製至剪貼簿</string>
<!-- Sharing -->
<string name="share">分享</string>
<string name="share_show">分享節目</string>
<string name="share_episode">分享此集</string>
<string name="share_movie">分享電影</string>
<string name="addtocalendar">新增至行事曆</string>
<string name="addtocalendar_failed">無法建立行事曆事件。</string>
<string name="links">連結</string>
<!-- Comments -->
<string name="comments">評論</string>
<string name="shout_hint">輸入評論(英語,五個字以上)</string>
<string name="shout_invalid">你的評論不遵守規則 !</string>
<string name="action_post">發布</string>
<string name="isspoiler">警告爆雷</string>
<string name="no_shouts">成為第一個留言者</string>
<string name="refresh">重新整理</string>
<plurals name="replies_plural">
<item quantity="other">%d 回覆</item>
</plurals>
<!-- Metadata -->
<string name="episode_number_disk">DVD</string>
<string name="episode_firstaired">播出日期</string>
<string name="episode_firstaired_unknown">播出日期不明</string>
<string name="episode_dvdnumber">DVD集數</string>
<string name="original_release">原始版本</string>
<string name="show_genres">戲劇類別</string>
<string name="show_contentrating">節目分級</string>
<string name="show_release_times">發布時間</string>
<string name="episode_directors">導演</string>
<string name="episode_gueststars">神秘嘉賓</string>
<string name="episode_writers">編劇</string>
<string name="show_isalive">待續</string>
<string name="show_isnotalive">已完結</string>
<string name="show_isUpcoming">即將播出</string>
<string name="no_translation">%2$s沒有%1$s的翻譯說明。</string>
<string name="no_translation_title">無翻譯</string>
<string name="no_spoilers">一些細節已隱藏起來避免劇透,可前往設定關閉此功能。</string>
<string name="format_source">來源:%s</string>
<string name="format_last_edited">上次編輯於:%s</string>
<!-- Date and Time -->
<string name="today">今天</string>
<string name="now">目前</string>
<string name="daily">每日</string>
<string name="runtime_minutes">%s 分鐘</string>
<!-- Flagging -->
<string name="mark_all">全部已觀看</string>
<string name="unmark_all">全部未觀看</string>
<string name="action_watched_up_to">Watched up to here</string>
<string name="confirmation_watched_up_to">Set all episodes up to here watched?</string>
<string name="collect_all">將所有影集標示為已蒐藏</string>
<string name="uncollect_all">取消所有影集蒐藏
|
{
"pile_set_name": "Github"
}
|
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_gamification
#
# Translators:
# Martin Trigaux <mat@odoo.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.saas~18\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-09-20 09:53+0000\n"
"PO-Revision-Date: 2017-09-20 09:53+0000\n"
"Last-Translator: Martin Trigaux <mat@odoo.com>, 2017\n"
"Language-Team: Kabyle (https://www.transifex.com/odoo/teams/41243/kab/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: kab\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: hr_gamification
#: model_terms:ir.actions.act_window,help:hr_gamification.goals_menu_groupby_action2
msgid ""
"A goal is defined by a user and a goal type.\n"
" Goals can be created automatically by using challenges."
msgstr ""
#. module: hr_gamification
#: model:ir.model.fields,help:hr_gamification.field_hr_employee_badge_ids
msgid ""
"All employee badges, linked to the employee either directly or through the "
"user"
msgstr ""
#. module: hr_gamification
#: model_terms:ir.actions.act_window,help:hr_gamification.challenge_list_action2
msgid ""
"Assign a list of goals to chosen users to evaluate them.\n"
" The challenge can use a period (weekly, monthly...) for automatic creation of goals.\n"
" The goals are created for the specified users or member of the group."
msgstr ""
#. module: hr_gamification
#: model:ir.model.fields,field_description:hr_gamification.field_res_users_badge_ids
#: model:ir.ui.menu,name:hr_gamification.gamification_badge_menu_hr
msgid "Badges"
msgstr ""
#. module: hr_gamification
#: model_terms:ir.ui.view,arch_db:hr_gamification.hr_hr_employee_view_form
msgid ""
"Badges are rewards of good work. Give them to people you believe deserve it."
msgstr ""
#. module: hr_gamification
#: model:ir.model.fields,help:hr_gamification.field_hr_employee_direct_badge_ids
msgid "Badges directly linked to the employee"
msgstr ""
#. module: hr_gamification
#: model_terms:ir.ui.view,arch_db:hr_gamification.view_badge_wizard_reward
msgid "Cancel"
msgstr "Sefsex"
#. module: hr_gamification
#: model:ir.actions.act_window,name:hr_gamification.challenge_list_action2
#: model:ir.ui.menu,name:hr_gamification.gamification_challenge_menu_hr
#: model:ir.ui.menu,name:hr_gamification.menu_hr_gamification
msgid "Challenges"
msgstr ""
#. module: hr_gamification
#: model_terms:ir.actions.act_window,help:hr_gamification.challenge_list_action2
msgid "Click to create a challenge."
msgstr ""
#. module: hr_gamification
#: model_terms:ir.actions.act_window,help:hr_gamification.goals_menu_groupby_action2
msgid "Click to create a goal."
msgstr ""
#. module: hr_gamification
#: model_terms:ir.ui.view,arch_db:hr_gamification.hr_hr_employee_view_form
msgid "Click to grant this employee his first badge"
msgstr ""
#. module: hr_gamification
#: model_terms:ir.ui.view,arch_db:hr_gamification.view_badge_wizard_reward
msgid "Describe what they did and why it matters (will be public)"
msgstr ""
#. module: hr_gamification
#: model:ir.model.fields,field_description:hr_gamification.field_hr_employee_direct_badge_ids
msgid "Direct Badge"
msgstr ""
#. module: hr_gamification
#: model:ir.model,name:hr_gamification.model_hr_employee
#: model:ir.model.fields,field_description:hr_gamification.field_gamification_badge_user_employee_id
#: model:ir.model.fields,field_description:hr_gamification.field_gamification_badge_user_wizard_employee_id
msgid "Employee"
msgstr ""
#. module: hr_gamification
#: model:ir.model.fields,field_description:hr_gamification.field_hr_employee_badge_ids
msgid "Employee Badges"
msgstr ""
#. module: hr_gamification
#: model:ir.model.fields,field_description:hr_gamification.field_hr_employee_goal_ids
msgid "Employee HR Goals"
msgstr ""
#. module: hr_gamification
#: model:ir.model,name:hr_gamification.model_gamification_badge
msgid "Gamification badge"
msgstr ""
#. module: hr_gamification
#: model:ir.model,name:hr_gamification.model_gamification_badge_user
msgid "Gamification user badge"
msgstr ""
#. module: hr_gamification
#: model:ir.model.fields,field_description:hr_gamification.field_res_users_goal_ids
msgid "Goal"
msgstr ""
#. module: hr_gamification
#: model:ir.actions.act_window,name:hr_gamification.goals_menu_groupby_action2
#: model:ir.ui.menu,name:hr_gamification.gamification_goal_menu_hr
msgid "Goals History"
msgstr ""
#. module: hr_gamification
#: model_terms:ir.ui.view,arch_db:hr_gamification.hr_hr_employee_view_form
msgid "Grant a Badge"
msgstr ""
#. module: hr_gamification
#: model_terms:ir.ui.view,arch_db:hr_gamification.hr_badge_form_view
msgid "Granted"
msgstr ""
#. module: hr_gamification
#: model:ir.model.fields,field_description:hr_gamification.field_gamification_badge_granted_employees_count
msgid "Granted Employees Count"
msgstr ""
#. module: hr_gamification
#: model:ir.model.fields,field_description:hr_gamification.field_hr_employee_has_badges
msgid "Has Badges"
msgstr ""
#. module: hr_gamification
#: model_terms:ir.ui.view,arch_db:hr_gamification.hr_hr_employee_view_form
msgid "Received Badges"
msgstr ""
#. module: hr_gamification
#: model:ir.actions.act_window,name:hr_gamification.action_reward_wizard
#: model_terms:ir.ui.view,arch_db:hr_gamification.view_badge_wizard_reward
msgid "Reward Employee"
msgstr ""
#. module: hr_gamification
#: model_terms:ir.ui.view,arch_db:hr_gamification.view_badge_wizard_reward
msgid "Reward Employee with"
msgstr ""
#. module: hr_gamification
#: code:addons/hr_gamification/models/gamification.py:18
#, python-format
msgid "The selected employee does not correspond to the selected user."
msgstr ""
#. module: hr_gamification
#: model:ir.model,name:hr_gamification.model_res_users
msgid "Users"
msgstr ""
#. module
|
{
"pile_set_name": "Github"
}
|
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>0.0.0</Version>
<Nullable>annotations</Nullable>
<GenerateFullPaths>true</GenerateFullPaths>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DebugType Condition="'$(Configuration)'=='Release'">none</DebugType>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\MvcTemplate.Components\MvcTemplate.Components.csproj" />
</ItemGroup>
</Project>
|
{
"pile_set_name": "Github"
}
|
/*
* GDevelop Core
* Copyright 2008-present Florian Rival (Florian.Rival@gmail.com). All rights
* reserved. This project is released under the MIT License.
*/
#ifndef GDCORE_PROPERTYDESCRIPTOR
#define GDCORE_PROPERTYDESCRIPTOR
#include <vector>
#include "GDCore/String.h"
namespace gd {
class SerializerElement;
}
namespace gd {
/**
* \brief Used to describe a property shown in a property grid.
* \see gd::Object
* \see gd::EffectMetadata
*/
class GD_CORE_API PropertyDescriptor {
public:
/**
* \brief Create a property being a simple gd::String with the specified
* value.
*
* \param propertyValue The value of the property.
*/
PropertyDescriptor(gd::String propertyValue)
: currentValue(propertyValue), type("string"), label(""), hidden(false) {}
/**
* \brief Empty constructor creating an empty property to be displayed.
*/
PropertyDescriptor() : hidden(false){};
/**
* \brief Destructor
*/
virtual ~PropertyDescriptor();
/**
* \brief Change the value displayed in the property grid
*/
PropertyDescriptor& SetValue(gd::String value) {
currentValue = value;
return *this;
}
/**
* \brief Change the type of the value displayed in the property grid.
* \note The type is arbitrary and is interpreted by the class updating the
* property grid: Refer to it or to the documentation of the class which is
* returning the PropertyDescriptor to learn more about valid values for the
* type.
*/
PropertyDescriptor& SetType(gd::String type_) {
type = type_;
return *this;
}
/**
* \brief Change the label displayed in the property grid.
*/
PropertyDescriptor& SetLabel(gd::String label_) {
label = label_;
return *this;
}
/**
* \brief Change the description displayed to the user, if any.
*/
PropertyDescriptor& SetDescription(gd::String description_) {
description = description_;
return *this;
}
/**
* \brief Add an information about the property.
* \note The information are arbitrary and are interpreted by the class
* updating the property grid: Refer to it or to the documentation of the
* class which is returning the PropertyDescriptor to learn more about valid
* values for the extra information.
*/
PropertyDescriptor& AddExtraInfo(const gd::String& info) {
extraInformation.push_back(info);
return *this;
}
const gd::String& GetValue() const { return currentValue; }
const gd::String& GetType() const { return type; }
const gd::String& GetLabel() const { return label; }
const gd::String& GetDescription() const { return description; }
const std::vector<gd::String>& GetExtraInfo() const {
return extraInformation;
}
/**
* \brief Set if the property should be shown or hidden in the editor.
*/
PropertyDescriptor& SetHidden(bool enable = true) {
hidden = enable;
return *this;
}
/**
* \brief Check if the property should be shown or hidden in the editor.
*/
bool IsHidden() const { return hidden; }
/** \name Serialization
*/
///@{
/**
* \brief Serialize the PropertyDescriptor.
*/
virtual void SerializeTo(SerializerElement& element) const;
/**
* \brief Unserialize the PropertyDescriptor.
*/
virtual void UnserializeFrom(const SerializerElement& element);
/**
* \brief Serialize only the value and extra informations.
*/
virtual void SerializeValuesTo(SerializerElement& element) const;
/**
* \brief Unserialize only the value and extra informations.
*/
virtual void UnserializeValuesFrom(const SerializerElement& element);
///@}
private:
gd::String currentValue; ///< The current value to be shown.
gd::String
type; ///< The type of the property. This is arbitrary and interpreted by
///< the class responsible for updating the property grid.
gd::String label; //< The user-friendly property name
gd::String description; //< The user-friendly property description
std::vector<gd::String>
extraInformation; ///< Can be used to store for example the available
///< choices, if a property is a displayed as a combo
///< box.
bool hidden;
};
} // namespace gd
#endif
|
{
"pile_set_name": "Github"
}
|
sat
|
{
"pile_set_name": "Github"
}
|
bin.includes = feature.xml
|
{
"pile_set_name": "Github"
}
|
--- gpu/command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc.orig 2019-04-08 08:32:57 UTC
+++ gpu/command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc
@@ -562,7 +562,7 @@ class GLCopyTextureCHROMIUMES3Test : public GLCopyText
bool ShouldSkipNorm16() const {
DCHECK(!ShouldSkipTest());
-#if (defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX)) && \
+#if (defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)) && \
(defined(ARCH_CPU_X86) || defined(ARCH_CPU_X86_64))
// Make sure it's tested; it is safe to assume that the flag is always true
// on desktop.
|
{
"pile_set_name": "Github"
}
|
#ifndef ABSTRACT_H
#define ABSTRACT_H
#ifdef PROFILE
#define printf(a, b) Serial.println(b)
#endif
#if defined ARDUINO_SAM_DUE || defined ADAFRUIT_GRAND_CENTRAL_M4
#define HostOS 0x01
#endif
#ifdef CORE_TEENSY
#define HostOS 0x04
#endif
#ifdef ESP32
#define HostOS 0x05
#endif
#ifdef _STM32_DEF_
#define HostOS 0x06
#endif
/* Memory abstraction functions */
/*===============================================================================*/
bool _RamLoad(char* filename, uint16 address) {
File f;
bool result = false;
if (f = SD.open(filename, FILE_READ)) {
while (f.available())
_RamWrite(address++, f.read());
f.close();
result = true;
}
return(result);
}
/* Filesystem (disk) abstraction fuctions */
/*===============================================================================*/
File rootdir, userdir;
#define FOLDERCHAR '/'
typedef struct {
uint8 dr;
uint8 fn[8];
uint8 tp[3];
uint8 ex, s1, s2, rc;
uint8 al[16];
uint8 cr, r0, r1, r2;
} CPM_FCB;
typedef struct {
uint8 dr;
uint8 fn[8];
uint8 tp[3];
uint8 ex, s1, s2, rc;
uint8 al[16];
} CPM_DIRENTRY;
#if defined board_teensy41
static DirFat_t fileDirEntry;
#else
static dir_t fileDirEntry;
#endif
File _sys_fopen_w(uint8* filename) {
return(SD.open((char*)filename, O_CREAT | O_WRITE));
}
int _sys_fputc(uint8 ch, File& f) {
return(f.write(ch));
}
void _sys_fflush(File& f) {
f.flush();
}
void _sys_fclose(File& f) {
f.close();
}
int _sys_select(uint8* disk) {
uint8 result = FALSE;
File f;
digitalWrite(LED, HIGH ^ LEDinv);
if (f = SD.open((char*)disk, O_READ)) {
if (f.isDirectory())
result = TRUE;
f.close();
}
digitalWrite(LED, LOW ^ LEDinv);
return(result);
}
long _sys_filesize(uint8* filename) {
long l = -1;
File f;
digitalWrite(LED, HIGH ^ LEDinv);
if (f = SD.open((char*)filename, O_RDONLY)) {
l = f.size();
f.close();
}
digitalWrite(LED, LOW ^ LEDinv);
return(l);
}
int _sys_openfile(uint8* filename) {
File f;
int result = 0;
digitalWrite(LED, HIGH ^ LEDinv);
f = SD.open((char*)filename, O_READ);
if (f) {
f.dirEntry(&fileDirEntry);
f.close();
result = 1;
}
digitalWrite(LED, LOW ^ LEDinv);
return(result);
}
int _sys_makefile(uint8* filename) {
File f;
int result = 0;
digitalWrite(LED, HIGH ^ LEDinv);
f = SD.open((char*)filename, O_CREAT | O_WRITE);
if (f) {
f.close();
result = 1;
}
digitalWrite(LED, LOW ^ LEDinv);
return(result);
}
int _sys_deletefile(uint8* filename) {
digitalWrite(LED, HIGH ^ LEDinv);
return(SD.remove((char*)filename));
digitalWrite(LED, LOW ^ LEDinv);
}
int _sys_renamefile(uint8* filename, uint8* newname) {
File f;
int result = 0;
digitalWrite(LED, HIGH ^ LEDinv);
f = SD.open((char*)filename, O_WRITE | O_APPEND);
if (f) {
if (f.rename((char*)newname)) {
f.close();
result = 1;
}
}
digitalWrite(LED, LOW ^ LEDinv);
return(result);
}
#ifdef DEBUGLOG
void _sys_logbuffer(uint8* buffer) {
#ifdef CONSOLELOG
puts((char*)buffer);
#else
File f;
uint8 s = 0;
while (*(buffer + s)) // Computes buffer size
++s;
if (f = SD.open(LogName, O_CREAT | O_APPEND | O_WRITE)) {
f.write(buffer, s);
f.flush();
f.close();
}
#endif
}
#endif
bool _sys_extendfile(char* fn, unsigned long fpos)
{
uint8 result = true;
File f;
unsigned long i;
digitalWrite(LED, HIGH ^ LEDinv);
if (f = SD.open(fn, O_WRITE | O_APPEND)) {
if (fpos > f.size()) {
for (i = 0; i < f.size() - fpos; ++i) {
if (f.write((uint8)0) != 1) {
result = false;
break;
}
}
}
f.close();
} else {
result = false;
}
digitalWrite(LED, LOW ^ LEDinv);
return(result);
}
uint8 _sys_readseq(uint8* filename, long fpos) {
uint8 result = 0xff;
File f;
uint8 bytesread;
uint8 dmabuf[BlkSZ];
uint8 i;
digitalWrite(LED, HIGH ^ LEDinv);
f = SD.open((char*)filename, O_READ);
if (f) {
if (f.seek(fpos)) {
for (i = 0; i < BlkSZ; ++i)
dmabuf[i] = 0x1a;
bytesread = f.read(&dmabuf[0], BlkSZ);
if (bytesread) {
for (i = 0; i < BlkSZ; ++i)
_RamWrite(dmaAddr + i, dmabuf[i]);
}
result = bytesread ? 0x00 : 0x01;
} else {
result = 0x01;
}
f.close();
} else {
result = 0x10;
}
digitalWrite(LED, LOW ^ LEDinv);
return(result);
}
uint8 _sys_writeseq(uint8* filename, long fpos) {
uint8 result = 0xff;
File f;
digitalWrite(LED, HIGH ^ LEDinv);
if (_sys_extendfile((char*)filename, fpos))
f = SD.open((char*)filename, O_RDWR);
if (f) {
if (f.seek(fpos)) {
if (f.write(_RamSysAddr(dmaAddr), BlkSZ))
result = 0x00;
} else {
result = 0x01;
}
f.close();
} else {
result = 0x10;
}
digitalWrite(LED, LOW ^ LEDinv);
return(result);
}
uint8 _sys_readrand(uint8* filename, long fpos) {
uint8 result = 0xff;
File f;
uint8 bytesread;
uint8 dmabuf[BlkSZ];
uint8 i;
long extSize;
digitalWrite(LED, HIGH ^ LEDinv);
f = SD.open((char*)filename, O_READ);
if (f) {
if (f.seek(f
|
{
"pile_set_name": "Github"
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.