text stringlengths 2 99k | meta dict |
|---|---|
---
title: 機能フィルターを使用してユーザーのサブセットに対して機能を有効にする
titleSuffix: Azure App Configuration
description: 機能フィルターを使用してユーザーのサブセットに対して機能を有効にする方法を説明します
ms.service: azure-app-configuration
ms.custom: devx-track-csharp
author: lisaguthrie
ms.author: lcozzens
ms.topic: conceptual
ms.date: 3/9/2020
ms.openlocfilehash: 5b2eb942581f6e4163012b0f767d04c02689bb7b
ms.sourcegitcommit: 4913da04fd0f3cf7710ec08d0c1867b62c2effe7
ms.translationtype: HT
ms.contentlocale: ja-JP
ms.lasthandoff: 08/14/2020
ms.locfileid: "88206758"
---
# <a name="use-feature-filters-to-enable-a-feature-for-a-subset-of-users"></a>機能フィルターを使用してユーザーのサブセットに対して機能を有効にする
機能フラグを使用すると、アプリケーションの機能をアクティブ化または非アクティブ化することができます。 単純な機能フラグは、オンまたはオフのいずれかです。 アプリケーションは常に同じように動作します。 たとえば、機能フラグを使用して新しい機能をロールアウトします。 機能フラグを有効にすると、すべてのユーザーに新しい機能が表示されます。 機能フラグを無効にすると、新しい機能は表示されなくなります。
これに対し、"_条件付き機能フラグ_" を使用すると、機能フラグを動的に有効または無効にすることができます。 機能フラグの条件によっては、アプリケーションの動作が異なる場合があります。 最初に、ユーザーの小さなサブセットに新しい機能を表示するとします。 条件付き機能フラグを使用すると、一部のユーザーに対しては機能フラグを有効にし、他のユーザーに対しては無効にすることができます。 "_機能フィルター_" では、評価のたびに機能フラグの状態が判断されます。
`Microsoft.FeatureManagement` ライブラリには、次の 2 つの機能フィルターがあります。
- `PercentageFilter` では、パーセンテージに基づいて機能フラグが有効にされます。
- `TimeWindowFilter` では、指定した時間帯に機能フラグが有効にされます。
また、[Microsoft.FeatureManagement.IFeatureFilter インターフェイス](/dotnet/api/microsoft.featuremanagement.ifeaturefilter)を実装する独自の機能フィルターを作成することもできます。
## <a name="registering-a-feature-filter"></a>機能フィルターの登録
機能フィルターを登録するには、機能フィルターの名前を指定して `AddFeatureFilter` メソッドを呼び出します。 たとえば、次のコードでは `PercentageFilter` が登録されます。
```csharp
public void ConfigureServices(IServiceCollection services)
{
services.AddControllersWithViews();
services.AddFeatureManagement().AddFeatureFilter<PercentageFilter>();
}
```
## <a name="configuring-a-feature-filter-in-azure-app-configuration"></a>Azure App Configuration での機能フィルターの構成
一部の機能フィルターには追加の設定があります。 たとえば、`PercentageFilter` ではパーセンテージに基づいて機能がアクティブ化されます。 使用するパーセンテージを定義する設定があります。
定義されている機能フラグに対するこれらの設定は、Azure App Configuration で構成できます。 たとえば、`PercentageFilter` を使用して、Web アプリに対する要求の 50% について機能フラグを有効にするには、次の手順のようにします。
1. 「[クイックスタート: ASP.NET Core アプリに機能フラグを追加する](./quickstart-feature-flag-aspnet-core.md)」の手順に従って、機能フラグを使用して Web アプリを作成します。
1. Azure portal で、お使いの構成ストアにアクセスし、 **[機能マネージャー]** をクリックします。
1. クイックスタートで作成した *Beta* 機能フラグのコンテキスト メニューをクリックします。 **[編集]** をクリックします。
> [!div class="mx-imgBorder"]
> 
1. **[編集]** 画面で、 **[オン]** ラジオ ボタンがまだ選択されていない場合はオンにします。 次に、 **[フィルターの追加]** ボタンをクリックします。 ( **[オン]** ラジオ ボタンのラベルが **[条件付き]** に変わります)。
1. **[キー]** フィールドに、「*Microsoft.Percentage*」と入力します。
> [!div class="mx-imgBorder"]
> 
1. 機能フィルター キーの横にあるコンテキスト メニューをクリックします。 **[パラメーターの編集]** をクリックします。
> [!div class="mx-imgBorder"]
> 
1. **[名前]** ヘッダーの下をポイントして、グリッドにテキスト ボックスを表示します。 **[名前]** に「*値*」と入力し、 **[値]** に「50」と入力します。 **[値]** フィールドは、機能フィルターを有効にする要求の割合を示します。
> [!div class="mx-imgBorder"]
> 
1. **[適用]** をクリックして、 **[機能フラグの編集]** 画面に戻ります。 次に、 **[適用]** を再びクリックして、機能フラグの設定を保存します。
1. 機能フラグの **[状態]** が、 *[条件付き]* と表示されるようになります。 この状態は、機能フィルターによって適用される条件に基づいて、機能フラグが要求ごとに有効または無効になることを示します。
> [!div class="mx-imgBorder"]
> 
## <a name="feature-filters-in-action"></a>機能フィルターの動作
この機能フラグの効果を確認するには、アプリケーションを起動し、ブラウザーの **[更新]** ボタンを何回かクリックします。 約 50% の時間は、ツール バーに *Beta* と表示されます。 要求のサブセットに対する *Beta* 機能は `PercentageFilter` によって非アクティブ化されるため、残りの時間は表示されません。 次のビデオでは、この動作を示します。
> [!div class="mx-imgBorder"]
> 
## <a name="next-steps"></a>次のステップ
> [!div class="nextstepaction"]
> [機能管理の概要](./concept-feature-management.md)
| {
"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 linux,gccgo,386
package unix
import (
"syscall"
"unsafe"
)
func seek(fd int, offset int64, whence int) (int64, syscall.Errno) {
var newoffset int64
offsetLow := uint32(offset & 0xffffffff)
offsetHigh := uint32((offset >> 32) & 0xffffffff)
_, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0)
return newoffset, err
}
func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) {
fd, _, err := Syscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0)
return int(fd), err
}
func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) {
fd, _, err := RawSyscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0)
return int(fd), err
}
| {
"pile_set_name": "Github"
} |
package br.com.leonardoz.features.locks;
import java.util.concurrent.Executors;
/**
* Every Java object has an intrinsic lock (or a monitor lock) associated with
* it.
*
* Every Java object can be used as a lock.
*
* Intrinsic Locks are mutually exclusive, so one only thread can 'hold' the
* lock at time when it's using the synchronization mechanism.
*
* The lock is freed when the synchronized method/block ends.
*
* Synchronize serializes access for what is locked and guarantee memory
* visibility for the changes that happened inside the synchronized scope to all
* threads.
*
* Intrinsic locks are reentrant: if you are holding it, you can acquire it
* again, without deadlocking.
*/
public class UsingIntrinsicLocks {
private boolean state;
/**
* When used in method signature, synchronized use 'this' as a lock.
*
* Instead of 'this', other objects variables can be used
*/
public synchronized void mySynchronizedMethod() {
state = !state;
// Everything in this method can only be accessed by the thread who hold the
// lock.
System.out.println("My state is:" + state);
// Without sync: states have no order guarantee true, true, false, true...
// With sync: always true, false, true, false...
}
/**
* It's possible to lock only a block inside the method
*/
public void mySynchronizedBlock() {
/*
* Everything in this block can only be accessed by the thread who hold the
* lock. The message bellow will be printed before the message inside the
* synchronized block
*/
System.out.println("Who owns my lock: " + Thread.currentThread().getName());
synchronized (this) {
state = !state;
System.out.println("Who owns my lock after state changes: " + Thread.currentThread().getName());
System.out.println("State is: " + state);
System.out.println("====");
}
}
/**
* Already holds a lock when called
*/
public synchronized void reentrancy() {
System.out.println("Before acquiring again");
// Tries to hold it without releasing the lock
synchronized (this) {
System.out.println("I'm own it! " + Thread.currentThread().getName());
}
}
public static void main(String[] args) throws InterruptedException {
var executor = Executors.newCachedThreadPool();
var self = new UsingIntrinsicLocks();
for (int i = 0; i < 100; i++) {
executor.execute(() -> self.mySynchronizedMethod());
}
Thread.sleep(1000);
for (int i = 0; i < 10; i++) {
executor.execute(() -> self.mySynchronizedBlock());
}
Thread.sleep(1000);
for (int i = 0; i < 10; i++) {
executor.execute(() -> self.reentrancy());
}
executor.shutdown();
}
}
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" manifest="cll.appcache" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>14.4. Logical connection of bridi</title>
<link rel="stylesheet" type="text/css" href="final.css" />
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
<link rel="home" href="index.html" title="The Complete Lojban Language" />
<link rel="up" href="chapter-connectives.html" title="Chapter 14. If Wishes Were Horses: The Lojban Connective System" />
<link rel="prev" href="section-six-types.html" title="14.3. The six types of logical connectives" />
<link rel="next" href="section-forethought-bridi-connection.html" title="14.5. Forethought bridi connection" />
<script xmlns="" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:docbook="http://docbook.org/ns/docbook" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=MML_HTMLorMML"></script>
<meta xmlns="" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:docbook="http://docbook.org/ns/docbook" name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<div xmlns="" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:docbook="http://docbook.org/ns/docbook" class="navheader">
<table width="100%" summary="Chapter Header">
<tr>
<th colspan="3" align="center">Chapter 14. If Wishes Were Horses: The Lojban Connective System</th>
</tr>
</table>
<table width="100%" summary="Navigation header">
<tr>
<td width="50%" align="right">
<a accesskey="p" href="section-six-types.html">Prev: Section 14.3</a>
</td>
<td width="50%" align="left">
<a accesskey="n" href="section-forethought-bridi-connection.html">Next: Section 14.5</a>
</td>
</tr>
</table>
</div>
<div xmlns="" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:docbook="http://docbook.org/ns/docbook" class="toc-link" align="center">
<a accesskey="h" href="index.html">Table of Contents</a>
</div>
<div xmlns="" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:docbook="http://docbook.org/ns/docbook" class="back-to-info-link" align="center">
<a accesskey="b" href="http://www.lojban.org/cll">Book Info Page</a>
</div>
<hr xmlns="" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:docbook="http://docbook.org/ns/docbook" />
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a id="section-bridi-connection"></a>14.4. <a id="c14s4"></a>Logical connection of bridi</h2>
</div>
</div>
</div>
<p><a id="idm22952489283856" class="indexterm"></a><a id="idm22952489282720" class="indexterm"></a> Now we are ready to express
<a class="xref" href="chapter-connectives.html#example-random-id-mJ6y" title="Example 14.1. ">Example 14.1</a> in Lojban! The kind of logical connective which is placed between two Lojban bridi to connect them logically is an ijek:</p>
<div class="interlinear-gloss-example example">
<a id="example-random-id-h2hN"></a>
<p class="title">
<strong>Example 14.3.
<a id="c14e4d1"></a>
</strong>
</p>
<div class="interlinear-gloss-example example-contents">
<div class="informaltable">
<table class="interlinear-gloss">
<colgroup></colgroup>
<tr class="jbo">
<td>la</td>
<td>djan.</td>
<td>nanmu</td>
<td>.ija</td>
<td>la</td>
<td>djeimyz.</td>
<td>ninmu</td>
</tr>
<tr class="gloss">
<td>That-named</td>
<td>John</td>
<td>is-a-man</td>
<td>or</td>
<td>that-named</td>
<td>James</td>
<td>is-a-woman.</td>
</tr>
</table>
</div>
</div>
</div>
<br class="interlinear-gloss-example example-break" />
<p class="indent">Here we have two separate Lojban bridi,
<span xml:lang="jbo" class="foreignphrase" lang="jbo"><em xml:lang="jbo" class="foreignphrase" lang="jbo"><a id="idm22952489270816" class="indexterm"></a>la djan. nanmu</em></span> and
<span xml:lang="jbo" class="foreignphrase" lang="jbo"><em xml:lang="jbo" class="foreignphrase" lang="jbo"><a id="idm22952489268864" class="indexterm"></a>la djeimyz. ninmu</em></span>. These bridi are connected by
<span xml:lang="jbo" class="foreignphrase" lang="jbo"><em xml:lang="jbo" class="foreignphrase" lang="jbo"><a id="idm22952489267216" class="indexterm"></a><a class="glossterm" href="go01.html#valsi-i"><em class="glossterm">.i</em></a></em></span><span xml:lang="jbo" class="foreignphrase" lang="jbo"><em xml:lang="jbo" class="foreignphrase" lang="jbo"><a id="idm22952489265024" class="indexterm"></a><a class="glossterm" href="go01.html#valsi-ja"><em class="glossterm">ja</em></a></em></span>, the ijek for the truth function
<span class="logical-vowel">A</span>. The
<span xml:lang="jbo" class="foreignphrase" lang="jbo"><em xml:lang="jbo" class="foreignphrase" lang="jbo"><a id="idm22952489261936" class="indexterm"></a><a class="glossterm" href="go01.html#valsi-i"><em class="glossterm">i</em></a></em></span> portion of the ijek tells us that we are dealing with separate sentences here. Similarly, we can now say:</p>
<div class="interlinear-gloss-example example">
<a id="example-random-id-qGiu"></a>
<p class="title">
<strong>Example 14.4.
<a id="c14e4d2"></a>
</strong>
</p>
<div class="interlinear-gloss-example example-contents">
<div class="informaltable">
<table class="interlinear-gloss">
<colgroup></colgroup>
<tr class="jbo">
<td>la</td>
<td>djan.</td>
<td>nanmu</td>
<td>.ije</td>
<td>la</td>
<td>djeimyz.</td>
<td>ninmu</td>
</tr>
<tr class="gloss">
<td>That-named</td>
<td>John</td>
<td>is-a-man</td>
<td>and</td>
<td>that-named</td>
<td>James</td>
<td>is-a-woman.</td>
</tr>
</table>
</div>
</div>
</div>
<br class="interlinear-gloss-example example-break" />
<div class="interlinear-gloss-example example">
<a id="example-random-id-qGIu"></a>
<p class="title">
<strong>Example 14.5.
<a id="c14e4d3"></a>
</strong>
</p>
<div class="interlinear-gloss-example example-contents">
<div class="informaltable">
<table class="interlinear-gloss">
<colgroup></colgroup>
<tr class="jbo">
<td>la</td>
<td>djan.</td>
<td>nanmu</td>
<td>.ijo</td>
<td>la</td>
<td>djeimyz.</td>
<td>ninmu</td>
</tr>
<tr class="gloss">
<td>That-named</td>
<td>John</td>
<td>is-a-man</td>
<td>if-and-only-if</td>
<td>that-named</td>
<td>James</td>
<td>is-a-woman.</td>
</tr>
</table>
</div>
</div>
</div>
<br class="interlinear-gloss-example example-break" />
<div class="interlinear-gloss-example example">
<a id="example-random-id-qgJC"></a>
<p class="title">
<strong>Example 14.6.
<a id="c14e4d4"></a>
</strong>
</p>
<div class="interlinear-gloss-example example-contents">
<div class="informaltable">
<table class="interlinear-gloss">
<colgroup></colgroup>
<tr class="jbo">
<td>la</td>
<td>djan.</td>
<td>nanmu</td>
<td>.iju</td>
<td>la</td>
<td>djeimyz.</td>
<td>ninmu</td>
</tr>
<tr class="gloss">
<td>That-named</td>
<td>John</td>
<td>is-a-man</td>
<td>whether-or-not</td>
<td>that-named</td>
<td>James</td>
<td>is-a-woman.</td>
</tr>
</table>
</div>
</div>
</div>
<br class="interlinear-gloss-example example-break" />
<p class="indent"><a id="idm22952489234288" class="indexterm"></a> To obtain the other truth tables listed in
<a class="xref" href="section-four-basics.html" title="14.2. The Four basic vowels">Section 14.2</a>, we need to know how to negate the two bridi which represent the component sentences. We could negate them directly by inserting
<span xml:lang="jbo" class="foreignphrase" lang="jbo"><em xml:lang="jbo" class="foreignphrase" lang="jbo"><a id="idm22952489232048" class="indexterm"></a><a class="glossterm" href="go01.html#valsi-na"><em class="glossterm">na</em></a></em></span> before the selbri, but Lojban also allows us to place the negation within the connective itself.</p>
<p><a id="idm22952489229600" class="indexterm"></a> To negate the first or left-hand bridi, prefix
<span xml:lang="jbo" class="foreignphrase" lang="jbo"><em xml:lang="jbo" class="foreignphrase" lang="jbo"><a id="idm22952489228288" class="indexterm"></a><a class="glossterm" href="go01.html#valsi-na"><em class="glossterm">na</em></a></em></span> to the JA cmavo but after the
<span xml:lang="jbo" class="foreignphrase" lang="jbo"><em xml:lang="jbo" class="foreignphrase" lang="jbo"><a id="idm22952489225920" class="indexterm"></a><a class="glossterm" href="go01.html#valsi-i"><em class="glossterm">i</em></a></em></span>. To negate the second or right-hand bridi, suffix
<span xml:lang="jbo" class="foreignphrase" lang="jbo"><em xml:lang="jbo" class="foreignphrase" lang="jbo"><a id="idm22952489223328" class="indexterm"></a>-nai</em></span> to the JA cmavo. In either case, the negating word is placed on the side of the connective that is closest to the bridi being negated.</p>
<p>So to express the truth table FTTF, which requires
<span class="logical-vowel">O</span> with either of the two bridi negated (not both), we can say either:</p>
<div class="interlinear-gloss-example example">
<a id="example-random-id-qgKB"></a>
<p class="title">
<strong>Example 14.7.
<a id="c14e4d5"></a>
</strong>
</p>
<div class="interlinear-gloss-example example-contents">
<div class="informaltable">
<table class="interlinear-gloss">
<colgroup></colgroup>
<tr class="jbo">
<td>la</td>
<td>djan.</td>
<td>nanmu</td>
<td>.inajo</td>
<td>la</td>
<td>djeimyz.</td>
<td>ninmu</td>
</tr>
<tr class="gloss">
<td>That-named</td>
<td>John</td>
<td>is-not-a-man</td>
<td>if-and-only-if</td>
<td>that-named</td>
<td>James</td>
<td>is-a-woman.</td>
</tr>
</table>
</div>
</div>
</div>
<br class="interlinear-gloss-example example-break" />
<div class="interlinear-gloss-example example">
<a id="example-random-id-qgLH"></a>
<p class="title">
<strong>Example 14.8.
<a id="c14e4d6"></a>
</strong>
</p>
<div class="interlinear-gloss-example example-contents">
<div class="informaltable">
<table class="interlinear-gloss">
<colgroup></colgroup>
<tr class="jbo">
<td>la</td>
<td>djan.</td>
<td>nanmu</td>
<td>.ijonai</td>
<td>la</td>
<td>djeimyz.</td>
<td>ninmu</td>
</tr>
<tr class="gloss">
<td>That-named</td>
<td>John</td>
<td>is-a-man</td>
<td>if-and-only-if</td>
<td>that-named</td>
<td>James</td>
<td>is-not-a-woman.</td>
</tr>
</table>
</div>
</div>
</div>
<br class="interlinear-gloss-example example-break" />
<p class="indent">The meaning of both
<a class="xref" href="section-bridi-connection.html#example-random-id-qgKB" title="Example 14.7. ">Example 14.7</a> and
<a class="xref" href="section-bridi-connection.html#example-random-id-qgLH" title="Example 14.8. ">Example 14.8</a> is the same as that of:</p>
<div class="example">
<a id="example-random-id-1Kp9"></a>
<p class="title">
<strong>Example 14.9.
<a id="c14e4d7"></a>
</strong>
</p>
<div class="example-contents">
<p>John is a man or James is a woman, but not both.</p>
</div>
</div>
<br class="example-break" />
<p class="indent">Here is another example:</p>
<div class="interlinear-gloss-example example">
<a id="example-random-id-FXSC"></a>
<p class="title">
<strong>Example 14.10.
<a id="c14e4d8"></a>
</strong>
</p>
<div class="interlinear-gloss-example example-contents">
<div class="informaltable">
<table class="interlinear-gloss">
<colgroup></colgroup>
<tr class="jbo">
<td>la</td>
<td>djan.</td>
<td>nanmu</td>
<td>.ijanai</td>
<td>la</td>
<td>djeimyz.</td>
<td>ninmu</td>
</tr>
<tr class="gloss">
<td>That-named</td>
<td>John</td>
<td>is-a-man</td>
<td>or</td>
<td>that-named</td>
<td>James</td>
<td>is-not-a-woman.</td>
</tr>
</table>
</div>
<div class="informaltable">
<table class="interlinear-gloss">
<tr class="para">
<td colspan="12321">
<p class="natlang">John is a man if James is a woman.</p>
</td>
</tr>
</table>
</div>
</div>
</div>
<br class="interlinear-gloss-example example-break" />
<p class="indent"><a id="idm22952489187568" class="indexterm"></a><a id="idm22952489186400" class="indexterm"></a> How's that again? Are those two English sentences in
<a class="xref" href="section-bridi-connection.html#example-random-id-FXSC" title="Example 14.10. ">Example 14.10</a> really equivalent? In English, no. The Lojban TTFT truth function can be glossed
<span class="quote">“<span class="quote">A if B</span>”</span>, but the
<span class="quote">“<span class="quote">if</span>”</span> does not quite have its English sense.
<a class="xref" href="section-bridi-connection.html#example-random-id-FXSC" title="Example 14.10. ">Example 14.10</a> is true so long as John is a man, even if James is not a woman; likewise, it is true just because James is not a woman, regardless of John's gender. This kind of
<span class="quote">“<span class="quote">if-then</span>”</span> is technically known as a
<span class="quote">“<span class="quote">material conditional</span>”</span>.</p>
<p>Since James is not a woman (by our assertions in
<a class="xref" href="chapter-connectives.html#section-connectives-introduction" title="14.1. Logical connection and truth tables">Section 14.1</a>), the English sentence
<span class="quote">“<span class="quote">John is a man if James is a woman</span>”</span> seems to be neither true nor false, since it assumes something which is not true. It turns out to be most convenient to treat this
<span class="quote">“<span class="quote">if</span>”</span> as TTFT, which on investigation means that
<a class="xref" href="section-bridi-connection.html#example-random-id-FXSC" title="Example 14.10. ">Example 14.10</a> is true.
<a class="xref" href="section-bridi-connection.html#example-random-id-EdY5" title="Example 14.11. ">Example 14.11</a>, however, is equally true:</p>
<div class="interlinear-gloss-example example">
<a id="example-random-id-EdY5"></a>
<p class="title">
<strong>Example 14.11.
<a id="c14e4d9"></a>
</strong>
</p>
<div class="interlinear-gloss-example example-contents">
<div class="informaltable">
<table class="interlinear-gloss">
<colgroup></colgroup>
<tr class="jbo">
<td>la</td>
<td>djan.</td>
<td>ninmu</td>
<td>.ijanai</td>
<td>la</td>
<td>djeimyz.</td>
<td>ninmu</td>
</tr>
<tr class="gloss">
<td>That-named</td>
<td>John</td>
<td>is-a-woman</td>
<td>if</td>
<td>that-named</td>
<td>James</td>
<td>is-a-woman.</td>
</tr>
</table>
</div>
</div>
</div>
<br class="interlinear-gloss-example example-break" />
<p class="indent"><a id="idm22952489169952" class="indexterm"></a><a id="idm22952489168816" class="indexterm"></a> This can be thought of as a principle of consistency, and may be paraphrased as follows:
<span class="quote">“<span class="quote">If a false statement is true, any statement follows from it.</span>”</span> All uses of English
<span class="quote">“<span class="quote">if</span>”</span> must be considered very carefully when translating into Lojban to see if they really fit this Lojban mold.</p>
<p><a id="idm22952489166016" class="indexterm"></a><a id="idm22952489164864" class="indexterm"></a><a class="xref" href="section-bridi-connection.html#example-random-id-9CCS" title="Example 14.12. ">Example 14.12</a>, which uses the TFTT truth function, is subject to the same rules: the stated gloss of TFTT as
<span class="quote">“<span class="quote">only if</span>”</span> works naturally only when the right-hand bridi is false; if it is true, the left-hand bridi may be either true or false. The last gloss of
<a class="xref" href="section-bridi-connection.html#example-random-id-9CCS" title="Example 14.12. ">Example 14.12</a> illustrates the use of
<span class="quote">“<span class="quote">if ... then</span>”</span> as a more natural substitute for
<span class="quote">“<span class="quote">only if</span>”</span>.</p>
<div class="interlinear-gloss-example example">
<a id="example-random-id-9CCS"></a>
<p class="title">
<strong>Example 14.12.
<a id="c14e4d10"></a>
</strong>
</p>
<div class="interlinear-gloss-example example-contents">
<div class="informaltable">
<table class="interlinear-gloss">
<colgroup></colgroup>
<tr class="jbo">
<td>la</td>
<td>djan.</td>
<td>nanmu</td>
<td>.inaja</td>
<td>la</td>
<td>djeimyz.</td>
<td>ninmu</td>
</tr>
<tr class="gloss">
<td>That-named</td>
<td>John</td>
<td>is-not-a-man</td>
<td>or</td>
<td>that-named</td>
<td>James</td>
<td>is-a-woman.</td>
</tr>
</table>
</div>
<div class="informaltable">
<table class="interlinear-gloss">
<tr class="para">
<td colspan="12321">
<p class="natlang">John is a man only if James is a woman.</p>
</td>
</tr>
<tr class="para">
<td colspan="12321">
<p class="natlang">If John is a man, then James is a woman.</p>
</td>
</tr>
</table>
</div>
</div>
</div>
<br class="interlinear-gloss-example example-break" />
<p class="indent"><a id="idm22952489148048" class="indexterm"></a> The following example illustrates the use of
<span xml:lang="jbo" class="foreignphrase" lang="jbo"><em xml:lang="jbo" class="foreignphrase" lang="jbo"><a id="idm22952489146416" class="indexterm"></a><a class="glossterm" href="go01.html#valsi-se"><em class="glossterm">se</em></a></em></span> to, in effect, exchange the two sentences. The normal use of
<span xml:lang="jbo" class="foreignphrase" lang="jbo"><em xml:lang="jbo" class="foreignphrase" lang="jbo"><a id="idm22952489144096" class="indexterm"></a><a class="glossterm" href="go01.html#valsi-se"><em class="glossterm">se</em></a></em></span> is to (in effect) transpose places of a bridi, as explained in
<a class="xref" href="section-place-conversion.html" title="5.11. Conversion of simple selbri">Section 5.11</a>.</p>
<div class="interlinear-gloss-example example">
<a id="example-random-id-z43X"></a>
<p class="title">
<strong>Example 14.13.
<a id="c14e4d11"></a>
</strong>
</p>
<div class="interlinear-gloss-example example-contents">
<div class="informaltable">
<table class="interlinear-gloss">
<colgroup></colgroup>
<tr class="jbo">
<td>la</td>
<td>djan.</td>
<td>nanmu</td>
<td>.iseju</td>
<td>la</td>
<td>djeimyz.</td>
<td>ninmu</td>
</tr>
</table>
</div>
<div class="informaltable">
<table class="interlinear-gloss">
<tr class="para">
<td colspan="12321">
<p class="natlang">Whether or not John is a man, James is a woman.</p>
</td>
</tr>
</table>
</div>
</div>
</div>
<br class="interlinear-gloss-example example-break" />
<p class="indent"><a id="idm22952489132432" class="indexterm"></a><a id="idm22952489131584" class="indexterm"></a><a id="idm22952489130480" class="indexterm"></a> If both
<span xml:lang="jbo" class="foreignphrase" lang="jbo"><em xml:lang="jbo" class="foreignphrase" lang="jbo"><a id="idm22952489128896" class="indexterm"></a><a class="glossterm" href="go01.html#valsi-na"><em class="glossterm">na</em></a></em></span> and
<span xml:lang="jbo" class="foreignphrase" lang="jbo"><em xml:lang="jbo" class="foreignphrase" lang="jbo"><a id="idm22952489126544" class="indexterm"></a><a class="glossterm" href="go01.html#valsi-se"><em class="glossterm">se</em></a></em></span> are present, which is legal but never necessary,
<span xml:lang="jbo" class="foreignphrase" lang="jbo"><em xml:lang="jbo" class="foreignphrase" lang="jbo"><a id="idm22952489124160" class="indexterm"></a><a class="glossterm" href="go01.html#valsi-na"><em class="glossterm">na</em></a></em></span> would come before
<span xml:lang="jbo" class="foreignphrase" lang="jbo"><em xml:lang="jbo" class="foreignphrase" lang="jbo"><a id="idm22952489121792" class="indexterm"></a><a class="glossterm" href="go01.html#valsi-se"><em class="glossterm">se</em></a></em></span>.</p>
<p><a id="idm22952489119552" class="indexterm"></a><a id="idm22952489118704" class="indexterm"></a><a id="idm22952489117856" class="indexterm"></a> The full syntax of ijeks, therefore, is:</p>
<div class="blockquote">
<blockquote class="blockquote">
<p class="grammar-template">
.i [na] [se] JA [nai]
</p>
</blockquote>
</div>
<p>where the cmavo in brackets are optional.</p>
</div>
<hr xmlns="" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:docbook="http://docbook.org/ns/docbook" />
<div xmlns="" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:docbook="http://docbook.org/ns/docbook" class="navheader">
<table width="100%" summary="Chapter Header">
<tr>
<th colspan="3" align="center">Chapter 14. If Wishes Were Horses: The Lojban Connective System</th>
</tr>
</table>
<table width="100%" summary="Navigation header">
<tr>
<td width="50%" align="right">
<a accesskey="p" href="section-six-types.html">Prev: Section 14.3</a>
</td>
<td width="50%" align="left">
<a accesskey="n" href="section-forethought-bridi-connection.html">Next: Section 14.5</a>
</td>
</tr>
</table>
</div>
<div xmlns="" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:docbook="http://docbook.org/ns/docbook" class="toc-link" align="center">
<a accesskey="h" href="index.html">Table of Contents</a>
</div>
<div xmlns="" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:docbook="http://docbook.org/ns/docbook" class="back-to-info-link" align="center">
<a accesskey="b" href="http://www.lojban.org/cll">Book Info Page</a>
</div>
</body>
</html>
| {
"pile_set_name": "Github"
} |
version: '2'
services:
mysql:
image: mysql:5.7.31
environment:
- MYSQL_ROOT_PASSWORD=secret
- MYSQL_DATABASE=bookstack
- MYSQL_USER=bookstack
- MYSQL_PASSWORD=secret
volumes:
- mysql-data:/var/lib/mysql
bookstack:
image: solidnerd/bookstack:0.29.3
depends_on:
- mysql
environment:
- DB_HOST=mysql:3306
- DB_DATABASE=bookstack
- DB_USERNAME=bookstack
- DB_PASSWORD=secret
volumes:
- uploads:/var/www/bookstack/public/uploads
- storage-uploads:/var/www/bookstack/storage/uploads
ports:
- "8080:8080"
volumes:
mysql-data:
uploads:
storage-uploads:
| {
"pile_set_name": "Github"
} |
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
// or more contributor license agreements. Licensed under the Elastic License;
// you may not use this file except in compliance with the Elastic License.
package system
import (
"crypto/sha256"
"encoding/base64"
"hash"
)
// EntityHash calculates a standard entity hash.
type EntityHash struct {
hash.Hash
}
// NewEntityHash creates a new EntityHash.
func NewEntityHash() EntityHash {
return EntityHash{sha256.New()}
}
// Sum returns the base64 representation of the hash,
// truncated to 12 bytes.
func (h *EntityHash) Sum() string {
hash := h.Hash.Sum(nil)
if len(hash) > 12 {
hash = hash[:12]
}
return base64.RawStdEncoding.EncodeToString(hash)
}
| {
"pile_set_name": "Github"
} |
type ('a, 'error) t = ('a, 'error) result =
| Ok of 'a
| Error of 'error
let ok x = Ok x
let return = ok
let is_ok = function
| Ok _ -> true
| Error _ -> false
let is_error = function
| Ok _ -> false
| Error _ -> true
let ok_exn = function
| Ok x -> x
| Error e -> raise e
let try_with f =
match f () with
| s -> Ok s
| exception e -> Error e
let bind t ~f =
match t with
| Ok x -> f x
| Error _ as t -> t
let ( >>= ) x f = bind x ~f
let map x ~f =
match x with
| Ok x -> Ok (f x)
| Error _ as x -> x
let map_error x ~f =
match x with
| Ok _ as res -> res
| Error x -> Error (f x)
let iter t ~f =
match t with
| Ok x -> f x
| Error _ -> ()
let to_option = function
| Ok p -> Some p
| Error _ -> None
let errorf fmt = Printf.ksprintf (fun x -> Error x) fmt
let both a b =
match a with
| Error e -> Error e
| Ok a -> (
match b with
| Error e -> Error e
| Ok b -> Ok (a, b) )
module O = struct
let ( >>= ) t f = bind t ~f
let ( >>| ) t f = map t ~f
let ( let* ) = ( >>= )
let ( let+ ) = ( >>| )
let ( and+ ) = both
end
open O
type ('a, 'error) result = ('a, 'error) t
module List = struct
let map t ~f =
let rec loop acc = function
| [] -> Ok (List.rev acc)
| x :: xs -> f x >>= fun x -> loop (x :: acc) xs
in
loop [] t
let all =
let rec loop acc = function
| [] -> Ok (List.rev acc)
| t :: l -> t >>= fun x -> loop (x :: acc) l
in
fun l -> loop [] l
let concat_map =
let rec loop f acc = function
| [] -> Ok (List.rev acc)
| x :: l -> f x >>= fun y -> loop f (List.rev_append y acc) l
in
fun l ~f -> loop f [] l
let rec iter t ~f =
match t with
| [] -> Ok ()
| x :: xs -> f x >>= fun () -> iter xs ~f
let rec fold_left t ~f ~init =
match t with
| [] -> Ok init
| x :: xs -> f init x >>= fun init -> fold_left xs ~f ~init
end
let hash h1 h2 t =
Stdlib.Hashtbl.hash
( match t with
| Ok s -> h1 s
| Error e -> h2 e )
let equal e1 e2 x y =
match (x, y) with
| Ok x, Ok y -> e1 x y
| Error x, Error y -> e2 x y
| _, _ -> false
module Option = struct
let iter t ~f =
match t with
| None -> Ok ()
| Some x -> x >>= f
end
let to_dyn ok err = function
| Ok e -> Dyn.Encoder.constr "Ok" [ ok e ]
| Error e -> Dyn.Encoder.constr "Error" [ err e ]
| {
"pile_set_name": "Github"
} |
/*
* (C) Copyright 2010,2011
* NVIDIA Corporation <www.nvidia.com>
*
* SPDX-License-Identifier: GPL-2.0+
*/
#ifndef __H_
#define _TPS6586X_H_
enum {
/* SM0-2 PWM/PFM Mode Selection */
TPS6586X_PWM_SM0 = 1 << 0,
TPS6586X_PWM_SM1 = 1 << 1,
TPS6586X_PWM_SM2 = 1 << 2,
};
/**
* Enable PWM mode for selected SM0-2
*
* @param mask Mask of synchronous converter to enable (TPS6586X_PWM_...)
* @return 0 if ok, -1 on error
*/
int tps6586x_set_pwm_mode(int mask);
/**
* Adjust SM0 and SM1 voltages to the given targets in incremental steps.
*
* @param sm0_target Target voltage for SM0 in 25mW units, 0=725mV, 31=1.5V
* @param sm1_target Target voltage for SM1 in 25mW units, 0=725mV, 31=1.5V
* @param step Amount to change voltage in each step, in 25mW units
* @param rate Slew ratein mV/us: 0=instantly, 1=0.11, 2=0.22,
* 3=0.44, 4=0.88, 5=1.76, 6=3.52, 7=7.04
* @param min_sm0_over_sm1 Minimum amount by which sm0 must exceed sm1.
* If this condition is not met, no adjustment will be
* done and an error will be reported. Use -1 to skip
* this check.
* @return 0 if ok, -1 on error
*/
int tps6586x_adjust_sm0_sm1(int sm0_target, int sm1_target, int step, int rate,
int min_sm0_over_sm1);
/**
* Set up the TPS6586X I2C bus number. This will be used for all operations
* on the device. This function must be called before using other functions.
*
* @param bus I2C bus number containing the TPS6586X chip
* @return 0 (always succeeds)
*/
int tps6586x_init(int bus);
#endif /* _TPS6586X_H_ */
| {
"pile_set_name": "Github"
} |
@annotate: folktale.result.Ok.prototype.matchWith
@annotate: folktale.result.Error.prototype.matchWith
category: Pattern matching
---
Chooses and executes a function for each variant in the Result structure.
## Example::
const Result = require('folktale/result');
Result.Ok(1).matchWith({
Ok: ({ value }) => `ok ${value}`,
Error: ({ value }) => `error ${value}`
});
// ==> 'ok 1'
Result.Error(1).matchWith({
Ok: ({ value }) => `ok ${value}`,
Error: ({ value }) => `error ${value}`
});
// ==> 'error 1' | {
"pile_set_name": "Github"
} |
/*
* Copyright (c) 2004-2007 Apple Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this
* file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPLE_LICENSE_HEADER_END@
*/
#ifndef _OBJC_AUTO_H_
#define _OBJC_AUTO_H_
#include <objc/objc.h>
#include <malloc/malloc.h>
#include <stdint.h>
#include <stddef.h>
#include <string.h>
#include <Availability.h>
#include <TargetConditionals.h>
#include <sys/types.h>
#include <libkern/OSAtomic.h>
// Define OBJC_SILENCE_GC_DEPRECATIONS=1 to temporarily
// silence deprecation warnings for GC functions.
#if OBJC_SILENCE_GC_DEPRECATIONS
# define OBJC_GC_DEPRECATED(message)
#elif __has_extension(attribute_deprecated_with_message)
# define OBJC_GC_DEPRECATED(message) __attribute__((deprecated(message ". Define OBJC_SILENCE_GC_DEPRECATIONS=1 to temporarily silence this diagnostic.")))
#else
# define OBJC_GC_DEPRECATED(message) __attribute__((deprecated))
#endif
enum {
OBJC_RATIO_COLLECTION = (0 << 0),
OBJC_GENERATIONAL_COLLECTION = (1 << 0),
OBJC_FULL_COLLECTION = (2 << 0),
OBJC_EXHAUSTIVE_COLLECTION = (3 << 0),
OBJC_COLLECT_IF_NEEDED = (1 << 3),
OBJC_WAIT_UNTIL_DONE = (1 << 4)
};
enum {
OBJC_CLEAR_RESIDENT_STACK = (1 << 0)
};
#if !defined(OBJC_NO_GC) || \
(OBJC_DECLARE_SYMBOLS && !defined(OBJC_NO_GC_API))
/* Out-of-line declarations */
OBJC_EXPORT void objc_collect(unsigned long options)
__OSX_DEPRECATED(10.6, 10.8, "it does nothing") __IOS_UNAVAILABLE __TVOS_UNAVAILABLE __WATCHOS_UNAVAILABLE __BRIDGEOS_UNAVAILABLE;
OBJC_EXPORT BOOL objc_collectingEnabled(void)
__OSX_DEPRECATED(10.5, 10.8, "it always returns NO") __IOS_UNAVAILABLE __TVOS_UNAVAILABLE __WATCHOS_UNAVAILABLE __BRIDGEOS_UNAVAILABLE;
OBJC_EXPORT malloc_zone_t *objc_collectableZone(void)
__OSX_DEPRECATED(10.7, 10.8, "it always returns nil") __IOS_UNAVAILABLE __TVOS_UNAVAILABLE __WATCHOS_UNAVAILABLE __BRIDGEOS_UNAVAILABLE;
OBJC_EXPORT void objc_setCollectionThreshold(size_t threshold)
__OSX_DEPRECATED(10.5, 10.8, "it does nothing") __IOS_UNAVAILABLE __TVOS_UNAVAILABLE __WATCHOS_UNAVAILABLE __BRIDGEOS_UNAVAILABLE;
OBJC_EXPORT void objc_setCollectionRatio(size_t ratio)
__OSX_DEPRECATED(10.5, 10.8, "it does nothing") __IOS_UNAVAILABLE __TVOS_UNAVAILABLE __WATCHOS_UNAVAILABLE __BRIDGEOS_UNAVAILABLE;
OBJC_EXPORT BOOL objc_atomicCompareAndSwapPtr(id predicate, id replacement, volatile id *objectLocation)
__OSX_DEPRECATED(10.6, 10.8, "use OSAtomicCompareAndSwapPtr instead") __IOS_UNAVAILABLE __TVOS_UNAVAILABLE __WATCHOS_UNAVAILABLE __BRIDGEOS_UNAVAILABLE OBJC_ARC_UNAVAILABLE;
OBJC_EXPORT BOOL objc_atomicCompareAndSwapPtrBarrier(id predicate, id replacement, volatile id *objectLocation)
__OSX_DEPRECATED(10.6, 10.8, "use OSAtomicCompareAndSwapPtrBarrier instead") __IOS_UNAVAILABLE __TVOS_UNAVAILABLE __WATCHOS_UNAVAILABLE __BRIDGEOS_UNAVAILABLE OBJC_ARC_UNAVAILABLE;
OBJC_EXPORT BOOL objc_atomicCompareAndSwapGlobal(id predicate, id replacement, volatile id *objectLocation)
__OSX_DEPRECATED(10.6, 10.8, "use OSAtomicCompareAndSwapPtr instead") __IOS_UNAVAILABLE __TVOS_UNAVAILABLE __WATCHOS_UNAVAILABLE __BRIDGEOS_UNAVAILABLE OBJC_ARC_UNAVAILABLE;
OBJC_EXPORT BOOL objc_atomicCompareAndSwapGlobalBarrier(id predicate, id replacement, volatile id *objectLocation)
__OSX_DEPRECATED(10.6, 10.8, "use OSAtomicCompareAndSwapPtrBarrier instead") __IOS_UNAVAILABLE __TVOS_UNAVAILABLE __WATCHOS_UNAVAILABLE __BRIDGEOS_UNAVAILABLE OBJC_ARC_UNAVAILABLE;
OBJC_EXPORT BOOL objc_atomicCompareAndSwapInstanceVariable(id predicate, id replacement, volatile id *objectLocation)
__OSX_DEPRECATED(10.6, 10.8, "use OSAtomicCompareAndSwapPtr instead") __IOS_UNAVAILABLE __TVOS_UNAVAILABLE __WATCHOS_UNAVAILABLE __BRIDGEOS_UNAVAILABLE OBJC_ARC_UNAVAILABLE;
OBJC_EXPORT BOOL objc_atomicCompareAndSwapInstanceVariableBarrier(id predicate, id replacement, volatile id *objectLocation)
__OSX_DEPRECATED(10.6, 10.8, "use OSAtomicCompareAndSwapPtrBarrier instead") __IOS_UNAVAILABLE __TVOS_UNAVAILABLE __WATCHOS_UNAVAILABLE __BRIDGEOS_UNAVAILABLE OBJC_ARC_UNAVAILABLE;
OBJC_EXPORT id objc_assign_strongCast(id val, id *dest)
__OSX_DEPRECATED(10.4, 10.8, "use a simple assignment instead") __IOS_UNAVAILABLE __TVOS_UNAVAILABLE __WATCHOS_UNAVAILABLE __BRIDGEOS_UNAVAILABLE;
OBJC_EXPORT id objc_assign_global(id val, id *dest)
__OSX_DEPRECATED(10.4, 10.8, "use a simple assignment instead") __IOS_UNAVAILABLE __TVOS_UNAVAILABLE __WATCHOS_UNAVAILABLE __BRIDGEOS_UNAVAILABLE;
OBJC_EXPORT id objc_assign_threadlocal(id val, id *dest)
__OSX_DEPRECATED(10.7, 10.8, "use a simple assignment instead") __IOS_UNAVAILABLE __TVOS_UNAVAILABLE __WATCHOS_UNAVAILABLE __BRIDGEOS_UNAVAILABLE;
OBJC_EXPORT id objc_assign_ivar(id value, id dest, ptrdiff_t offset)
__OSX_DEPRECATED(10.4, 10.8, "use a simple assignment instead") __IOS_UNAVAILABLE __TVOS_UNAVAILABLE __WATCHOS_UNAVAILABLE __BRIDGEOS_UNAVAILABLE;
OBJC_EXPORT void *objc_memmove_collectable(void *dst, const void *src, size_t size)
__OSX_DEPRECATED(10.4, 10.8, "use memmove instead") __IOS_UNAVAILABLE __TVOS_UNAVAILABLE __WATCHOS_UNAVAILABLE __BRIDGEOS_UNAVAILABLE;
OBJC_EXPORT id objc_read_weak(id *location)
__OSX_DEPRECATED(10.5, 10.8, "use a simple read instead, or convert to zeroing __weak") __IOS_UNAVAILABLE __TVOS_UNAVAILABLE __WATCHOS_UNAVAILABLE __BRIDGEOS_UNAVAILABLE;
OBJC_EXPORT id objc_assign_weak(id value, id *location)
__OSX_DEPRECATED(10.5, 10.8, "use a simple assignment instead, or convert to zeroing __weak") __IOS_UNAVAILABLE __TVOS_UNAVAILABLE __WATCHOS_UNAVAILABLE __BRIDGEOS_UNAVAILABLE;
OBJC_EXPORT void objc_registerThreadWithCollector(void)
__OSX_DEPRECATED(10.6, 10.8, "it does nothing") __IOS_UNAVAILABLE __TVOS_UNAVAILABLE __WATCHOS_UNAVAILABLE __BRIDGEOS_UNAVAILABLE;
OBJC_EXPORT void objc_unregisterThreadWithCollector(void)
__OSX_DEPRECATED(10.6, 10.8, "it does nothing") __IOS_UNAVAILABLE __TVOS_UNAVAILABLE __WATCHOS_UNAVAILABLE __BRIDGEOS_UNAVAILABLE;
OBJC_EXPORT void objc_assertRegisteredThreadWithCollector(void)
__OSX_DEPRECATED(10.6, 10.8, "it does nothing") __IOS_UNAVAILABLE __TVOS_UNAVAILABLE __WATCHOS_UNAVAILABLE __BRIDGEOS_UNAVAILABLE;
OBJC_EXPORT void objc_clear_stack(unsigned long options)
__OSX_DEPRECATED(10.5, 10.8, "it does nothing") __IOS_UNAVAILABLE __TVOS_UNAVAILABLE __WATCHOS_UNAVAILABLE __BRIDGEOS_UNAVAILABLE;
OBJC_EXPORT BOOL objc_is_finalized(void *ptr)
__OSX_DEPRECATED(10.4, 10.8, "it always returns NO") __IOS_UNAVAILABLE __TVOS_UNAVAILABLE __WATCHOS_UNAVAILABLE __BRIDGEOS_UNAVAILABLE;
OBJC_EXPORT void objc_finalizeOnMainThread(Class cls)
__OSX_DEPRECATED(10.5, 10.5, "it does nothing") __IOS_UNAVAILABLE __TVOS_UNAVAILABLE __WATCHOS_UNAVAILABLE __BRIDGEOS_UNAVAILABLE;
OBJC_EXPORT BOOL objc_collecting_enabled(void)
__OSX_DEPRECATED(10.4, 10.5, "it always returns NO") __IOS_UNAVAILABLE __TVOS_UNAVAILABLE __WATCHOS_UNAVAILABLE __BRIDGEOS_UNAVAILABLE;
OBJC_EXPORT void objc_set_collection_threshold(size_t threshold)
__OSX_DEPRECATED(10.4, 10.5, "it does nothing") __IOS_UNAVAILABLE __TVOS_UNAVAILABLE __WATCHOS_UNAVAILABLE __BRIDGEOS_UNAVAILABLE;
OBJC_EXPORT void objc_set_collection_ratio(size_t ratio)
__OSX_DEPRECATED(10.4, 10.5, "it does nothing") __IOS_UNAVAILABLE __TVOS_UNAVAILABLE __WATCHOS_UNAVAILABLE __BRIDGEOS_UNAVAILABLE;
OBJC_EXPORT void objc_start_collector_thread(void)
__OSX_DEPRECATED(10.4, 10.5, "it does nothing") __IOS_UNAVAILABLE __TVOS_UNAVAILABLE __WATCHOS_UNAVAILABLE __BRIDGEOS_UNAVAILABLE;
OBJC_EXPORT void objc_startCollectorThread(void)
__OSX_DEPRECATED(10.5, 10.7, "it does nothing") __IOS_UNAVAILABLE __TVOS_UNAVAILABLE __WATCHOS_UNAVAILABLE __BRIDGEOS_UNAVAILABLE;
OBJC_EXPORT id objc_allocate_object(Class cls, int extra)
__OSX_DEPRECATED(10.4, 10.4, "use class_createInstance instead") __IOS_UNAVAILABLE __TVOS_UNAVAILABLE __WATCHOS_UNAVAILABLE __BRIDGEOS_UNAVAILABLE;
/* !defined(OBJC_NO_GC) */
#else
/* defined(OBJC_NO_GC) */
/* Inline declarations */
OBJC_GC_DEPRECATED("it does nothing")
static OBJC_INLINE void objc_collect(unsigned long options __unused) { }
OBJC_GC_DEPRECATED("it always returns NO")
static OBJC_INLINE BOOL objc_collectingEnabled(void) { return NO; }
#if TARGET_OS_OSX
OBJC_GC_DEPRECATED("it always returns nil")
static OBJC_INLINE malloc_zone_t *objc_collectableZone(void) { return nil; }
#endif
OBJC_GC_DEPRECATED("it does nothing")
static OBJC_INLINE void objc_setCollectionThreshold(size_t threshold __unused) { }
OBJC_GC_DEPRECATED("it does nothing")
static OBJC_INLINE void objc_setCollectionRatio(size_t ratio __unused) { }
OBJC_GC_DEPRECATED("it does nothing")
static OBJC_INLINE void objc_startCollectorThread(void) { }
#if __has_feature(objc_arc)
/* Covers for GC memory operations are unavailable in ARC */
#else
OBJC_GC_DEPRECATED("use OSAtomicCompareAndSwapPtr instead")
static OBJC_INLINE BOOL objc_atomicCompareAndSwapPtr(id predicate, id replacement, volatile id *objectLocation)
{ return OSAtomicCompareAndSwapPtr((void *)predicate, (void *)replacement, (void * volatile *)objectLocation); }
OBJC_GC_DEPRECATED("use OSAtomicCompareAndSwapPtrBarrier instead")
static OBJC_INLINE BOOL objc_atomicCompareAndSwapPtrBarrier(id predicate, id replacement, volatile id *objectLocation)
{ return OSAtomicCompareAndSwapPtrBarrier((void *)predicate, (void *)replacement, (void * volatile *)objectLocation); }
OBJC_GC_DEPRECATED("use OSAtomicCompareAndSwapPtr instead")
static OBJC_INLINE BOOL objc_atomicCompareAndSwapGlobal(id predicate, id replacement, volatile id *objectLocation)
{ return objc_atomicCompareAndSwapPtr(predicate, replacement, objectLocation); }
OBJC_GC_DEPRECATED("use OSAtomicCompareAndSwapPtrBarrier instead")
static OBJC_INLINE BOOL objc_atomicCompareAndSwapGlobalBarrier(id predicate, id replacement, volatile id *objectLocation)
{ return objc_atomicCompareAndSwapPtrBarrier(predicate, replacement, objectLocation); }
OBJC_GC_DEPRECATED("use OSAtomicCompareAndSwapPtr instead")
static OBJC_INLINE BOOL objc_atomicCompareAndSwapInstanceVariable(id predicate, id replacement, volatile id *objectLocation)
{ return objc_atomicCompareAndSwapPtr(predicate, replacement, objectLocation); }
OBJC_GC_DEPRECATED("use OSAtomicCompareAndSwapPtrBarrier instead")
static OBJC_INLINE BOOL objc_atomicCompareAndSwapInstanceVariableBarrier(id predicate, id replacement, volatile id *objectLocation)
{ return objc_atomicCompareAndSwapPtrBarrier(predicate, replacement, objectLocation); }
OBJC_GC_DEPRECATED("use a simple assignment instead")
static OBJC_INLINE id objc_assign_strongCast(id val, id *dest)
{ return (*dest = val); }
OBJC_GC_DEPRECATED("use a simple assignment instead")
static OBJC_INLINE id objc_assign_global(id val, id *dest)
{ return (*dest = val); }
OBJC_GC_DEPRECATED("use a simple assignment instead")
static OBJC_INLINE id objc_assign_threadlocal(id val, id *dest)
{ return (*dest = val); }
OBJC_GC_DEPRECATED("use a simple assignment instead")
static OBJC_INLINE id objc_assign_ivar(id val, id dest, ptrdiff_t offset)
{ return (*(id*)((intptr_t)(char *)dest+offset) = val); }
OBJC_GC_DEPRECATED("use a simple read instead, or convert to zeroing __weak")
static OBJC_INLINE id objc_read_weak(id *location)
{ return *location; }
OBJC_GC_DEPRECATED("use a simple assignment instead, or convert to zeroing __weak")
static OBJC_INLINE id objc_assign_weak(id value, id *location)
{ return (*location = value); }
/* MRC */
#endif
OBJC_GC_DEPRECATED("use memmove instead")
static OBJC_INLINE void *objc_memmove_collectable(void *dst, const void *src, size_t size)
{ return memmove(dst, src, size); }
OBJC_GC_DEPRECATED("it does nothing")
static OBJC_INLINE void objc_finalizeOnMainThread(Class cls __unused) { }
OBJC_GC_DEPRECATED("it always returns NO")
static OBJC_INLINE BOOL objc_is_finalized(void *ptr __unused) { return NO; }
OBJC_GC_DEPRECATED("it does nothing")
static OBJC_INLINE void objc_clear_stack(unsigned long options __unused) { }
OBJC_GC_DEPRECATED("it always returns NO")
static OBJC_INLINE BOOL objc_collecting_enabled(void) { return NO; }
OBJC_GC_DEPRECATED("it does nothing")
static OBJC_INLINE void objc_set_collection_threshold(size_t threshold __unused) { }
OBJC_GC_DEPRECATED("it does nothing")
static OBJC_INLINE void objc_set_collection_ratio(size_t ratio __unused) { }
OBJC_GC_DEPRECATED("it does nothing")
static OBJC_INLINE void objc_start_collector_thread(void) { }
#if __has_feature(objc_arc)
extern id objc_allocate_object(Class cls, int extra) UNAVAILABLE_ATTRIBUTE;
#else
OBJC_EXPORT id class_createInstance(Class cls, size_t extraBytes)
OBJC_AVAILABLE(10.0, 2.0, 9.0, 1.0, 2.0);
OBJC_GC_DEPRECATED("use class_createInstance instead")
static OBJC_INLINE id objc_allocate_object(Class cls, int extra)
{ return class_createInstance(cls, (size_t)extra); }
#endif
OBJC_GC_DEPRECATED("it does nothing")
static OBJC_INLINE void objc_registerThreadWithCollector() { }
OBJC_GC_DEPRECATED("it does nothing")
static OBJC_INLINE void objc_unregisterThreadWithCollector() { }
OBJC_GC_DEPRECATED("it does nothing")
static OBJC_INLINE void objc_assertRegisteredThreadWithCollector() { }
/* defined(OBJC_NO_GC) */
#endif
#endif
| {
"pile_set_name": "Github"
} |
'use strict'
const u = require('universalify').fromCallback
const path = require('path')
const fs = require('graceful-fs')
const mkdir = require('../mkdirs')
const pathExists = require('../path-exists').pathExists
function createLink (srcpath, dstpath, callback) {
function makeLink (srcpath, dstpath) {
fs.link(srcpath, dstpath, err => {
if (err) return callback(err)
callback(null)
})
}
pathExists(dstpath, (err, destinationExists) => {
if (err) return callback(err)
if (destinationExists) return callback(null)
fs.lstat(srcpath, (err) => {
if (err) {
err.message = err.message.replace('lstat', 'ensureLink')
return callback(err)
}
const dir = path.dirname(dstpath)
pathExists(dir, (err, dirExists) => {
if (err) return callback(err)
if (dirExists) return makeLink(srcpath, dstpath)
mkdir.mkdirs(dir, err => {
if (err) return callback(err)
makeLink(srcpath, dstpath)
})
})
})
})
}
function createLinkSync (srcpath, dstpath) {
const destinationExists = fs.existsSync(dstpath)
if (destinationExists) return undefined
try {
fs.lstatSync(srcpath)
} catch (err) {
err.message = err.message.replace('lstat', 'ensureLink')
throw err
}
const dir = path.dirname(dstpath)
const dirExists = fs.existsSync(dir)
if (dirExists) return fs.linkSync(srcpath, dstpath)
mkdir.mkdirsSync(dir)
return fs.linkSync(srcpath, dstpath)
}
module.exports = {
createLink: u(createLink),
createLinkSync
}
| {
"pile_set_name": "Github"
} |
ofxLibwebsockets
| {
"pile_set_name": "Github"
} |
using Xunit;
namespace Coverlet.Integration.DeterministicBuild
{
public class TemplateTest
{
[Fact]
public void Answer()
{
DeepThought dt = new DeepThought();
Assert.Equal(42, dt.AnswerToTheUltimateQuestionOfLifeTheUniverseAndEverything());
}
}
}
| {
"pile_set_name": "Github"
} |
<?php
declare(strict_types=1);
namespace Phpml\NeuralNetwork\Training;
use Phpml\NeuralNetwork\Node\Neuron;
use Phpml\NeuralNetwork\Training\Backpropagation\Sigma;
class Backpropagation
{
/**
* @var float
*/
private $learningRate;
/**
* @var array
*/
private $sigmas = [];
/**
* @var array
*/
private $prevSigmas = [];
public function __construct(float $learningRate)
{
$this->setLearningRate($learningRate);
}
public function setLearningRate(float $learningRate): void
{
$this->learningRate = $learningRate;
}
/**
* @param mixed $targetClass
*/
public function backpropagate(array $layers, $targetClass): void
{
$layersNumber = count($layers);
// Backpropagation.
for ($i = $layersNumber; $i > 1; --$i) {
$this->sigmas = [];
foreach ($layers[$i - 1]->getNodes() as $key => $neuron) {
if ($neuron instanceof Neuron) {
$sigma = $this->getSigma($neuron, $targetClass, $key, $i == $layersNumber);
foreach ($neuron->getSynapses() as $synapse) {
$synapse->changeWeight($this->learningRate * $sigma * $synapse->getNode()->getOutput());
}
}
}
$this->prevSigmas = $this->sigmas;
}
// Clean some memory (also it helps make MLP persistency & children more maintainable).
$this->sigmas = [];
$this->prevSigmas = [];
}
private function getSigma(Neuron $neuron, int $targetClass, int $key, bool $lastLayer): float
{
$neuronOutput = $neuron->getOutput();
$sigma = $neuron->getDerivative();
if ($lastLayer) {
$value = 0;
if ($targetClass === $key) {
$value = 1;
}
$sigma *= ($value - $neuronOutput);
} else {
$sigma *= $this->getPrevSigma($neuron);
}
$this->sigmas[] = new Sigma($neuron, $sigma);
return $sigma;
}
private function getPrevSigma(Neuron $neuron): float
{
$sigma = 0.0;
foreach ($this->prevSigmas as $neuronSigma) {
$sigma += $neuronSigma->getSigmaForNeuron($neuron);
}
return $sigma;
}
}
| {
"pile_set_name": "Github"
} |
package com.zhy.adapter.recyclerview.base;
/**
* Created by zhy on 16/6/22.
*/
public interface ItemViewDelegate<T>
{
int getItemViewLayoutId();
boolean isForViewType(T item, int position);
void convert(ViewHolder holder, T t, int position);
}
| {
"pile_set_name": "Github"
} |
// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build riscv64,linux
package unix
const (
SizeofPtr = 0x8
SizeofShort = 0x2
SizeofInt = 0x4
SizeofLong = 0x8
SizeofLongLong = 0x8
PathMax = 0x1000
)
type (
_C_short int16
_C_int int32
_C_long int64
_C_long_long int64
)
type Timespec struct {
Sec int64
Nsec int64
}
type Timeval struct {
Sec int64
Usec int64
}
type Timex struct {
Modes uint32
Offset int64
Freq int64
Maxerror int64
Esterror int64
Status int32
Constant int64
Precision int64
Tolerance int64
Time Timeval
Tick int64
Ppsfreq int64
Jitter int64
Shift int32
Stabil int64
Jitcnt int64
Calcnt int64
Errcnt int64
Stbcnt int64
Tai int32
_ [44]byte
}
type Time_t int64
type Tms struct {
Utime int64
Stime int64
Cutime int64
Cstime int64
}
type Utimbuf struct {
Actime int64
Modtime int64
}
type Rusage struct {
Utime Timeval
Stime Timeval
Maxrss int64
Ixrss int64
Idrss int64
Isrss int64
Minflt int64
Majflt int64
Nswap int64
Inblock int64
Oublock int64
Msgsnd int64
Msgrcv int64
Nsignals int64
Nvcsw int64
Nivcsw int64
}
type Rlimit struct {
Cur uint64
Max uint64
}
type _Gid_t uint32
type Stat_t struct {
Dev uint64
Ino uint64
Mode uint32
Nlink uint32
Uid uint32
Gid uint32
Rdev uint64
_ uint64
Size int64
Blksize int32
_ int32
Blocks int64
Atim Timespec
Mtim Timespec
Ctim Timespec
_ [2]int32
}
type StatxTimestamp struct {
Sec int64
Nsec uint32
_ int32
}
type Statx_t struct {
Mask uint32
Blksize uint32
Attributes uint64
Nlink uint32
Uid uint32
Gid uint32
Mode uint16
_ [1]uint16
Ino uint64
Size uint64
Blocks uint64
Attributes_mask uint64
Atime StatxTimestamp
Btime StatxTimestamp
Ctime StatxTimestamp
Mtime StatxTimestamp
Rdev_major uint32
Rdev_minor uint32
Dev_major uint32
Dev_minor uint32
_ [14]uint64
}
type Dirent struct {
Ino uint64
Off int64
Reclen uint16
Type uint8
Name [256]uint8
_ [5]byte
}
type Fsid struct {
Val [2]int32
}
type Flock_t struct {
Type int16
Whence int16
Start int64
Len int64
Pid int32
_ [4]byte
}
type FscryptPolicy struct {
Version uint8
Contents_encryption_mode uint8
Filenames_encryption_mode uint8
Flags uint8
Master_key_descriptor [8]uint8
}
type FscryptKey struct {
Mode uint32
Raw [64]uint8
Size uint32
}
type KeyctlDHParams struct {
Private int32
Prime int32
Base int32
}
const (
FADV_NORMAL = 0x0
FADV_RANDOM = 0x1
FADV_SEQUENTIAL = 0x2
FADV_WILLNEED = 0x3
FADV_DONTNEED = 0x4
FADV_NOREUSE = 0x5
)
type RawSockaddrInet4 struct {
Family uint16
Port uint16
Addr [4]byte /* in_addr */
Zero [8]uint8
}
type RawSockaddrInet6 struct {
Family uint16
Port uint16
Flowinfo uint32
Addr [16]byte /* in6_addr */
Scope_id uint32
}
type RawSockaddrUnix struct {
Family uint16
Path [108]int8
}
type RawSockaddrLinklayer struct {
Family uint16
Protocol uint16
Ifindex int32
Hatype uint16
Pkttype uint8
Halen uint8
Addr [8]uint8
}
type RawSockaddrNetlink struct {
Family uint16
Pad uint16
Pid uint32
Groups uint32
}
type RawSockaddrHCI struct {
Family uint16
Dev uint16
Channel uint16
}
type RawSockaddrL2 struct {
Family uint16
Psm uint16
Bdaddr [6]uint8
Cid uint16
Bdaddr_type uint8
_ [1]byte
}
type RawSockaddrRFCOMM struct {
Family uint16
Bdaddr [6]uint8
Channel uint8
_ [1]byte
}
type RawSockaddrCAN struct {
Family uint16
Ifindex int32
Addr [8]byte
}
type RawSockaddrALG struct {
Family uint16
Type [14]uint8
Feat uint32
Mask uint32
Name [64]uint8
}
type RawSockaddrVM struct {
Family uint16
Reserved1 uint16
Port uint32
Cid uint32
Zero [4]uint8
}
type RawSockaddrXDP struct {
Family uint16
Flags uint16
Ifindex uint32
Queue_id uint32
Shared_umem_fd uint32
}
type RawSockaddrPPPoX [0x1e]byte
type RawSockaddrTIPC struct {
Family uint16
Addrtype uint8
Scope int8
Addr [12]byte
}
type RawSockaddr struct {
Family uint16
Data [14]uint8
}
type RawSockaddrAny struct {
Addr RawSockaddr
Pad [96]uint8
}
type _Socklen uint32
type Linger struct {
Onoff int32
Linger int32
}
type Iovec struct {
Base *byte
Len uint64
}
type IPMreq struct {
Multiaddr [4]byte /* in_addr */
Interface [4]byte /* in_addr */
}
type IPMreqn struct {
Multiaddr [4]byte /* in_addr */
Address [4]byte /* in_addr */
Ifindex int32
}
type IPv6Mreq struct {
Multiaddr [16]byte /* in6_addr */
Interface uint32
}
type PacketMreq struct {
Ifindex int32
Type uint16
Alen uint16
Address [8]uint8
}
type Msghdr struct {
Name *byte
Namelen uint32
Iov *Iovec
Iovlen uint64
Control *byte
Controllen uint64
Flags int32
_ [4]byte
}
type Cmsghdr struct {
Len uint64
Level int32
Type int32
}
type Inet4Pktinfo struct {
Ifindex int32
Spec_dst [4]byte /* in_addr */
Addr [4]byte /* in_addr */
}
type Inet6Pktinfo struct {
Addr [16]byte /* in6_addr */
Ifindex uint32
}
type IPv6MTUInfo struct {
Addr RawSockaddrInet6
Mtu uint32
}
type ICMPv6Filter struct {
Data [8]uint32
}
type Ucred struct {
Pid int32
Uid uint32
Gid uint32
}
type TCPInfo struct {
State uint8
Ca_state uint8
Retransmits uint8
Probes uint8
Backoff uint8
Options uint8
Rto uint32
Ato uint32
Snd_mss uint32
Rcv_mss uint32
Unacked uint32
Sacked uint32
Lost uint32
Retrans uint32
Fackets uint32
Last_data_sent uint32
Last_ack_sent uint32
Last_data_recv uint32
Last_ack_recv uint32
Pmtu uint32
Rcv_ssthresh uint32
Rtt uint32
Rttvar uint32
Snd_ssthresh uint32
Snd_cwnd uint32
Advmss uint32
Reordering uint32
Rcv_rtt uint32
Rcv_space uint32
Total_retrans uint32
}
type CanFilter struct {
Id uint32
Mask uint32
}
const (
SizeofSockaddrInet4 = 0x10
SizeofSockaddrInet6 = 0x1c
SizeofSockaddrAny = 0x70
SizeofSockaddrUnix = 0x6e
SizeofSockaddrLinklayer = 0x14
SizeofSockaddrNetlink = 0xc
SizeofSockaddrHCI = 0x6
SizeofSockaddrL2 = 0xe
SizeofSockaddrRFCOMM = 0xa
SizeofSockaddrCAN = 0x10
SizeofSockaddrALG = 0x58
SizeofSockaddrVM = 0x10
SizeofSockaddrXDP = 0x10
SizeofSockaddrPPPoX = 0x1e
SizeofSockaddrTIPC = 0x10
SizeofLinger = 0x8
SizeofIovec = 0x10
SizeofIPMreq = 0x8
SizeofIPMreqn = 0xc
SizeofIPv6Mreq = 0x14
SizeofPacketMreq = 0x10
SizeofMsghdr = 0x38
SizeofCmsghdr = 0x10
SizeofInet4Pktinfo = 0xc
SizeofInet6Pktinfo = 0x14
SizeofIPv6MTUInfo = 0x20
SizeofICMPv6Filter = 0x20
SizeofUcred = 0xc
SizeofTCPInfo = 0x68
SizeofCanFilter = 0x8
)
const (
NDA_UNSPEC = 0x0
NDA_DST = 0x1
NDA_LLADDR = 0x2
NDA_CACHEINFO = 0x3
NDA_PROBES = 0x4
NDA_VLAN = 0x5
NDA_PORT = 0x6
NDA_VNI = 0x7
NDA_IFINDEX = 0x8
NDA_MASTER = 0x9
NDA_LINK_NETNSID = 0xa
NDA_SRC_VNI = 0xb
NTF_USE = 0x1
NTF_SELF = 0x2
NTF_MASTER = 0x4
NTF_PROXY = 0x8
NTF_EXT_LEARNED = 0x10
NTF_OFFLOADED = 0x20
NTF_ROUTER = 0x80
NUD_INCOMPLETE = 0x1
NUD_REACHABLE = 0x2
NUD_STALE = 0x4
NUD_DELAY = 0x8
NUD_PROBE = 0x10
NUD_FAILED = 0x20
NUD_NOARP = 0x40
NUD_PERMANENT = 0x80
NUD_NONE = 0x0
IFA_UNSPEC = 0x0
IFA_ADDRESS = 0x1
IFA_LOCAL = 0x2
IFA_LABEL = 0x3
IFA_BROADCAST = 0x4
IFA_ANYCAST = 0x5
IFA_CACHEINFO = 0x6
IFA_MULTICAST = 0x7
IFA_FLAGS = 0x8
IFA_RT_PRIORITY = 0x9
IFA_TARGET_NETNSID = 0xa
IFLA_UNSPEC = 0x0
IFLA_ADDRESS = 0x1
IFLA_BROADCAST = 0x2
IFLA_IFNAME = 0x3
IFLA_MTU = 0x4
IFLA_LINK = 0x5
IFLA_QDISC = 0x6
IFLA_STATS = 0x7
IFLA_COST = 0x8
IFLA_PRIORITY = 0x9
IFLA_MASTER = 0xa
IFLA_WIRELESS = 0xb
IFLA_PROTINFO = 0xc
IFLA_TXQLEN = 0xd
IFLA_MAP = 0xe
IFLA_WEIGHT = 0xf
IFLA_OPERSTATE = 0x10
IFLA_LINKMODE = 0x11
IFLA_LINKINFO = 0x12
IFLA_NET_NS_PID = 0x13
IFLA_IFALIAS = 0x14
IFLA_NUM_VF = 0x15
IFLA_VFINFO_LIST = 0x16
IFLA_STATS64 = 0x17
IFLA_VF_PORTS = 0x18
IFLA_PORT_SELF = 0x19
IFLA_AF_SPEC = 0x1a
IFLA_GROUP = 0x1b
IFLA_NET_NS_FD = 0x1c
IFLA_EXT_MASK = 0x1d
IFLA_PROMISCUITY = 0x1e
IFLA_NUM_TX_QUEUES = 0x1f
IFLA_NUM_RX_QUEUES = 0x20
IFLA_CARRIER = 0x21
IFLA_PHYS_PORT_ID = 0x22
IFLA_CARRIER_CHANGES = 0x23
IFLA_PHYS_SWITCH_ID = 0x24
IFLA_LINK_NETNSID = 0x25
IFLA_PHYS_PORT_NAME = 0x26
IFLA_PROTO_DOWN = 0x27
IFLA_GSO_MAX_SEGS = 0x28
IFLA_GSO_MAX_SIZE = 0x29
IFLA_PAD = 0x2a
IFLA_XDP = 0x2b
IFLA_EVENT = 0x2c
IFLA_NEW_NETNSID = 0x2d
IFLA_IF_NETNSID = 0x2e
IFLA_TARGET_NETNSID = 0x2e
IFLA_CARRIER_UP_COUNT = 0x2f
IFLA_CARRIER_DOWN_COUNT = 0x30
IFLA_NEW_IFINDEX = 0x31
IFLA_MIN_MTU = 0x32
IFLA_MAX_MTU = 0x33
IFLA_MAX = 0x33
IFLA_INFO_KIND = 0x1
IFLA_INFO_DATA = 0x2
IFLA_INFO_XSTATS = 0x3
IFLA_INFO_SLAVE_KIND = 0x4
IFLA_INFO_SLAVE_DATA = 0x5
RT_SCOPE_UNIVERSE = 0x0
RT_SCOPE_SITE = 0xc8
RT_SCOPE_LINK = 0xfd
RT_SCOPE_HOST = 0xfe
RT_SCOPE_NOWHERE = 0xff
RT_TABLE_UNSPEC = 0x0
RT_TABLE_COMPAT = 0xfc
RT_TABLE_DEFAULT = 0xfd
RT_TABLE_MAIN = 0xfe
RT_TABLE_LOCAL = 0xff
RT_TABLE_MAX = 0xffffffff
RTA_UNSPEC = 0x0
RTA_DST = 0x1
RTA_SRC = 0x2
RTA_IIF = 0x3
RTA_OIF = 0x4
RTA_GATEWAY = 0x5
RTA_PRIORITY = 0x6
RTA_PREFSRC = 0x7
RTA_METRICS = 0x8
RTA_MULTIPATH = 0x9
RTA_FLOW = 0xb
RTA_CACHEINFO = 0xc
RTA_TABLE = 0xf
RTA_MARK = 0x10
RTA_MFC_STATS = 0x11
RTA_VIA = 0x12
RTA_NEWDST = 0x13
RTA_PREF = 0x14
RTA_ENCAP_TYPE = 0x15
RTA_ENCAP = 0x16
RTA_EXPIRES = 0x17
RTA_PAD = 0x18
RTA_UID = 0x19
RTA_TTL_PROPAGATE = 0x1a
RTA_IP_PROTO = 0x1b
RTA_SPORT = 0x1c
RTA_DPORT = 0x1d
RTN_UNSPEC = 0x0
RTN_UNICAST = 0x1
RTN_LOCAL = 0x2
RTN_BROADCAST = 0x3
RTN_ANYCAST = 0x4
RTN_MULTICAST = 0x5
RTN_BLACKHOLE = 0x6
RTN_UNREACHABLE = 0x7
RTN_PROHIBIT = 0x8
RTN_THROW = 0x9
RTN_NAT = 0xa
RTN_XRESOLVE = 0xb
RTNLGRP_NONE = 0x0
RTNLGRP_LINK = 0x1
RTNLGRP_NOTIFY = 0x2
RTNLGRP_NEIGH = 0x3
RTNLGRP_TC = 0x4
RTNLGRP_IPV4_IFADDR = 0x5
RTNLGRP_IPV4_MROUTE = 0x6
RTNLGRP_IPV4_ROUTE = 0x7
RTNLGRP_IPV4_RULE = 0x8
RTNLGRP_IPV6_IFADDR = 0x9
RTNLGRP_IPV6_MROUTE = 0xa
RTNLGRP_IPV6_ROUTE = 0xb
RTNLGRP_IPV6_IFINFO = 0xc
RTNLGRP_IPV6_PREFIX = 0x12
RTNLGRP_IPV6_RULE = 0x13
RTNLGRP_ND_USEROPT = 0x14
SizeofNlMsghdr = 0x10
SizeofNlMsgerr = 0x14
SizeofRtGenmsg = 0x1
SizeofNlAttr = 0x4
SizeofRtAttr = 0x4
SizeofIfInfomsg = 0x10
SizeofIfAddrmsg = 0x8
SizeofRtMsg = 0xc
SizeofRtNexthop = 0x8
SizeofNdUseroptmsg = 0x10
SizeofNdMsg = 0xc
)
type NlMsghdr struct {
Len uint32
Type uint16
Flags uint16
Seq uint32
Pid uint32
}
type NlMsgerr struct {
Error int32
Msg NlMsghdr
}
type RtGenmsg struct {
Family uint8
}
type NlAttr struct {
Len uint16
Type uint16
}
type RtAttr struct {
Len uint16
Type uint16
}
type IfInfomsg struct {
Family uint8
_ uint8
Type uint16
Index int32
Flags uint32
Change uint32
}
type IfAddrmsg struct {
Family uint8
Prefixlen uint8
Flags uint8
Scope uint8
Index uint32
}
type RtMsg struct {
Family uint8
Dst_len uint8
Src_len uint8
Tos uint8
Table uint8
Protocol uint8
Scope uint8
Type uint8
Flags uint32
}
type RtNexthop struct {
Len uint16
Flags uint8
Hops uint8
Ifindex int32
}
type NdUseroptmsg struct {
Family uint8
Pad1 uint8
Opts_len uint16
Ifindex int32
Icmp_type uint8
Icmp_code uint8
Pad2 uint16
Pad3 uint32
}
type NdMsg struct {
Family uint8
Pad1 uint8
Pad2 uint16
Ifindex int32
State uint16
Flags uint8
Type uint8
}
const (
SizeofSockFilter = 0x8
SizeofSockFprog = 0x10
)
type SockFilter struct {
Code uint16
Jt uint8
Jf uint8
K uint32
}
type SockFprog struct {
Len uint16
Filter *SockFilter
}
type InotifyEvent struct {
Wd int32
Mask uint32
Cookie uint32
Len uint32
}
const SizeofInotifyEvent = 0x10
type PtraceRegs struct {
Pc uint64
Ra uint64
Sp uint64
Gp uint64
Tp uint64
T0 uint64
T1 uint64
T2 uint64
S0 uint64
S1 uint64
A0 uint64
A1 uint64
A2 uint64
A3 uint64
A4 uint64
A5 uint64
A6 uint64
A7 uint64
S2 uint64
S3 uint64
S4 uint64
S5 uint64
S6 uint64
S7 uint64
S8 uint64
S9 uint64
S10 uint64
S11 uint64
T3 uint64
T4 uint64
T5 uint64
T6 uint64
}
type FdSet struct {
Bits [16]int64
}
type Sysinfo_t struct {
Uptime int64
Loads [3]uint64
Totalram uint64
Freeram uint64
Sharedram uint64
Bufferram uint64
Totalswap uint64
Freeswap uint64
Procs uint16
Pad uint16
Totalhigh uint64
Freehigh uint64
Unit uint32
_ [0]uint8
_ [4]byte
}
type Utsname struct {
Sysname [65]byte
Nodename [65]byte
Release [65]byte
Version [65]byte
Machine [65]byte
Domainname [65]byte
}
type Ustat_t struct {
Tfree int32
Tinode uint64
Fname [6]uint8
Fpack [6]uint8
_ [4]byte
}
type EpollEvent struct {
Events uint32
_ int32
Fd int32
Pad int32
}
const (
AT_EMPTY_PATH = 0x1000
AT_FDCWD = -0x64
AT_NO_AUTOMOUNT = 0x800
AT_REMOVEDIR = 0x200
AT_STATX_SYNC_AS_STAT = 0x0
AT_STATX_FORCE_SYNC = 0x2000
AT_STATX_DONT_SYNC = 0x4000
AT_SYMLINK_FOLLOW = 0x400
AT_SYMLINK_NOFOLLOW = 0x100
AT_EACCESS = 0x200
)
type PollFd struct {
Fd int32
Events int16
Revents int16
}
const (
POLLIN = 0x1
POLLPRI = 0x2
POLLOUT = 0x4
POLLRDHUP = 0x2000
POLLERR = 0x8
POLLHUP = 0x10
POLLNVAL = 0x20
)
type Sigset_t struct {
Val [16]uint64
}
const _C__NSIG = 0x41
type SignalfdSiginfo struct {
Signo uint32
Errno int32
Code int32
Pid uint32
Uid uint32
Fd int32
Tid uint32
Band uint32
Overrun uint32
Trapno uint32
Status int32
Int int32
Ptr uint64
Utime uint64
Stime uint64
Addr uint64
Addr_lsb uint16
_ uint16
Syscall int32
Call_addr uint64
Arch uint32
_ [28]uint8
}
const PERF_IOC_FLAG_GROUP = 0x1
type Termios struct {
Iflag uint32
Oflag uint32
Cflag uint32
Lflag uint32
Line uint8
Cc [19]uint8
Ispeed uint32
Ospeed uint32
}
type Winsize struct {
Row uint16
Col uint16
Xpixel uint16
Ypixel uint16
}
type Taskstats struct {
Version uint16
Ac_exitcode uint32
Ac_flag uint8
Ac_nice uint8
Cpu_count uint64
Cpu_delay_total uint64
Blkio_count uint64
Blkio_delay_total uint64
Swapin_count uint64
Swapin_delay_total uint64
Cpu_run_real_total uint64
Cpu_run_virtual_total uint64
Ac_comm [32]uint8
Ac_sched uint8
Ac_pad [3]uint8
_ [4]byte
Ac_uid uint32
Ac_gid uint32
Ac_pid uint32
Ac_ppid uint32
Ac_btime uint32
Ac_etime uint64
Ac_utime uint64
Ac_stime uint64
Ac_minflt uint64
Ac_majflt uint64
Coremem uint64
Virtmem uint64
Hiwater_rss uint64
Hiwater_vm uint64
Read_char uint64
Write_char uint64
Read_syscalls uint64
Write_syscalls uint64
Read_bytes uint64
Write_bytes uint64
Cancelled_write_bytes uint64
Nvcsw uint64
Nivcsw uint64
Ac_utimescaled uint64
Ac_stimescaled uint64
Cpu_scaled_run_real_total uint64
Freepages_count uint64
Freepages_delay_total uint64
Thrashing_count uint64
Thrashing_delay_total uint64
}
const (
TASKSTATS_CMD_UNSPEC = 0x0
TASKSTATS_CMD_GET = 0x1
TASKSTATS_CMD_NEW = 0x2
TASKSTATS_TYPE_UNSPEC = 0x0
TASKSTATS_TYPE_PID = 0x1
TASKSTATS_TYPE_TGID = 0x2
TASKSTATS_TYPE_STATS = 0x3
TASKSTATS_TYPE_AGGR_PID = 0x4
TASKSTATS_TYPE_AGGR_TGID = 0x5
TASKSTATS_TYPE_NULL = 0x6
TASKSTATS_CMD_ATTR_UNSPEC = 0x0
TASKSTATS_CMD_ATTR_PID = 0x1
TASKSTATS_CMD_ATTR_TGID = 0x2
TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
)
type CGroupStats struct {
Sleeping uint64
Running uint64
Stopped uint64
Uninterruptible uint64
Io_wait uint64
}
const (
CGROUPSTATS_CMD_UNSPEC = 0x3
CGROUPSTATS_CMD_GET = 0x4
CGROUPSTATS_CMD_NEW = 0x5
CGROUPSTATS_TYPE_UNSPEC = 0x0
CGROUPSTATS_TYPE_CGROUP_STATS = 0x1
CGROUPSTATS_CMD_ATTR_UNSPEC = 0x0
CGROUPSTATS_CMD_ATTR_FD = 0x1
)
type Genlmsghdr struct {
Cmd uint8
Version uint8
Reserved uint16
}
const (
CTRL_CMD_UNSPEC = 0x0
CTRL_CMD_NEWFAMILY = 0x1
CTRL_CMD_DELFAMILY = 0x2
CTRL_CMD_GETFAMILY = 0x3
CTRL_CMD_NEWOPS = 0x4
CTRL_CMD_DELOPS = 0x5
CTRL_CMD_GETOPS = 0x6
CTRL_CMD_NEWMCAST_GRP = 0x7
CTRL_CMD_DELMCAST_GRP = 0x8
CTRL_CMD_GETMCAST_GRP = 0x9
CTRL_ATTR_UNSPEC = 0x0
CTRL_ATTR_FAMILY_ID = 0x1
CTRL_ATTR_FAMILY_NAME = 0x2
CTRL_ATTR_VERSION = 0x3
CTRL_ATTR_HDRSIZE = 0x4
CTRL_ATTR_MAXATTR = 0x5
CTRL_ATTR_OPS = 0x6
CTRL_ATTR_MCAST_GROUPS = 0x7
CTRL_ATTR_OP_UNSPEC = 0x0
CTRL_ATTR_OP_ID = 0x1
CTRL_ATTR_OP_FLAGS = 0x2
CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
CTRL_ATTR_MCAST_GRP_NAME = 0x1
CTRL_ATTR_MCAST_GRP_ID = 0x2
)
type cpuMask uint64
const (
_CPU_SETSIZE = 0x400
_NCPUBITS = 0x40
)
const (
BDADDR_BREDR = 0x0
BDADDR_LE_PUBLIC = 0x1
BDADDR_LE_RANDOM = 0x2
)
type PerfEventAttr struct {
Type uint32
Size uint32
Config uint64
Sample uint64
Sample_type uint64
Read_format uint64
Bits uint64
Wakeup uint32
Bp_type uint32
Ext1 uint64
Ext2 uint64
Branch_sample_type uint64
Sample_regs_user uint64
Sample_stack_user uint32
Clockid int32
Sample_regs_intr uint64
Aux_watermark uint32
Sample_max_stack uint16
_ uint16
}
type PerfEventMmapPage struct {
Version uint32
Compat_version uint32
Lock uint32
Index uint32
Offset int64
Time_enabled uint64
Time_running uint64
Capabilities uint64
Pmc_width uint16
Time_shift uint16
Time_mult uint32
Time_offset uint64
Time_zero uint64
Size uint32
_ [948]uint8
Data_head uint64
Data_tail uint64
Data_offset uint64
Data_size uint64
Aux_head uint64
Aux_tail uint64
Aux_offset uint64
Aux_size uint64
}
const (
PerfBitDisabled uint64 = CBitFieldMaskBit0
PerfBitInherit = CBitFieldMaskBit1
PerfBitPinned = CBitFieldMaskBit2
PerfBitExclusive = CBitFieldMaskBit3
PerfBitExcludeUser = CBitFieldMaskBit4
PerfBitExcludeKernel = CBitFieldMaskBit5
PerfBitExcludeHv = CBitFieldMaskBit6
PerfBitExcludeIdle = CBitFieldMaskBit7
PerfBitMmap = CBitFieldMaskBit8
PerfBitComm = CBitFieldMaskBit9
PerfBitFreq = CBitFieldMaskBit10
PerfBitInheritStat = CBitFieldMaskBit11
PerfBitEnableOnExec = CBitFieldMaskBit12
PerfBitTask = CBitFieldMaskBit13
PerfBitWatermark = CBitFieldMaskBit14
PerfBitPreciseIPBit1 = CBitFieldMaskBit15
PerfBitPreciseIPBit2 = CBitFieldMaskBit16
PerfBitMmapData = CBitFieldMaskBit17
PerfBitSampleIDAll = CBitFieldMaskBit18
PerfBitExcludeHost = CBitFieldMaskBit19
PerfBitExcludeGuest = CBitFieldMaskBit20
PerfBitExcludeCallchainKernel = CBitFieldMaskBit21
PerfBitExcludeCallchainUser = CBitFieldMaskBit22
PerfBitMmap2 = CBitFieldMaskBit23
PerfBitCommExec = CBitFieldMaskBit24
PerfBitUseClockID = CBitFieldMaskBit25
PerfBitContextSwitch = CBitFieldMaskBit26
)
const (
PERF_TYPE_HARDWARE = 0x0
PERF_TYPE_SOFTWARE = 0x1
PERF_TYPE_TRACEPOINT = 0x2
PERF_TYPE_HW_CACHE = 0x3
PERF_TYPE_RAW = 0x4
PERF_TYPE_BREAKPOINT = 0x5
PERF_COUNT_HW_CPU_CYCLES = 0x0
PERF_COUNT_HW_INSTRUCTIONS = 0x1
PERF_COUNT_HW_CACHE_REFERENCES = 0x2
PERF_COUNT_HW_CACHE_MISSES = 0x3
PERF_COUNT_HW_BRANCH_INSTRUCTIONS = 0x4
PERF_COUNT_HW_BRANCH_MISSES = 0x5
PERF_COUNT_HW_BUS_CYCLES = 0x6
PERF_COUNT_HW_STALLED_CYCLES_FRONTEND = 0x7
PERF_COUNT_HW_STALLED_CYCLES_BACKEND = 0x8
PERF_COUNT_HW_REF_CPU_CYCLES = 0x9
PERF_COUNT_HW_CACHE_L1D = 0x0
PERF_COUNT_HW_CACHE_L1I = 0x1
PERF_COUNT_HW_CACHE_LL = 0x2
PERF_COUNT_HW_CACHE_DTLB = 0x3
PERF_COUNT_HW_CACHE_ITLB = 0x4
PERF_COUNT_HW_CACHE_BPU = 0x5
PERF_COUNT_HW_CACHE_NODE = 0x6
PERF_COUNT_HW_CACHE_OP_READ = 0x0
PERF_COUNT_HW_CACHE_OP_WRITE = 0x1
PERF_COUNT_HW_CACHE_OP_PREFETCH = 0x2
PERF_COUNT_HW_CACHE_RESULT_ACCESS = 0x0
PERF_COUNT_HW_CACHE_RESULT_MISS = 0x1
PERF_COUNT_SW_CPU_CLOCK = 0x0
PERF_COUNT_SW_TASK_CLOCK = 0x1
PERF_COUNT_SW_PAGE_FAULTS = 0x2
PERF_COUNT_SW_CONTEXT_SWITCHES = 0x3
PERF_COUNT_SW_CPU_MIGRATIONS = 0x4
PERF_COUNT_SW_PAGE_FAULTS_MIN = 0x5
PERF_COUNT_SW_PAGE_FAULTS_MAJ = 0x6
PERF_COUNT_SW_ALIGNMENT_FAULTS = 0x7
PERF_COUNT_SW_EMULATION_FAULTS = 0x8
PERF_COUNT_SW_DUMMY = 0x9
PERF_COUNT_SW_BPF_OUTPUT = 0xa
PERF_SAMPLE_IP = 0x1
PERF_SAMPLE_TID = 0x2
PERF_SAMPLE_TIME = 0x4
PERF_SAMPLE_ADDR = 0x8
PERF_SAMPLE_READ = 0x10
PERF_SAMPLE_CALLCHAIN = 0x20
PERF_SAMPLE_ID = 0x40
PERF_SAMPLE_CPU = 0x80
PERF_SAMPLE_PERIOD = 0x100
PERF_SAMPLE_STREAM_ID = 0x200
PERF_SAMPLE_RAW = 0x400
PERF_SAMPLE_BRANCH_STACK = 0x800
PERF_SAMPLE_BRANCH_USER = 0x1
PERF_SAMPLE_BRANCH_KERNEL = 0x2
PERF_SAMPLE_BRANCH_HV = 0x4
PERF_SAMPLE_BRANCH_ANY = 0x8
PERF_SAMPLE_BRANCH_ANY_CALL = 0x10
PERF_SAMPLE_BRANCH_ANY_RETURN = 0x20
PERF_SAMPLE_BRANCH_IND_CALL = 0x40
PERF_SAMPLE_BRANCH_ABORT_TX = 0x80
PERF_SAMPLE_BRANCH_IN_TX = 0x100
PERF_SAMPLE_BRANCH_NO_TX = 0x200
PERF_SAMPLE_BRANCH_COND = 0x400
PERF_SAMPLE_BRANCH_CALL_STACK = 0x800
PERF_SAMPLE_BRANCH_IND_JUMP = 0x1000
PERF_SAMPLE_BRANCH_CALL = 0x2000
PERF_SAMPLE_BRANCH_NO_FLAGS = 0x4000
PERF_SAMPLE_BRANCH_NO_CYCLES = 0x8000
PERF_SAMPLE_BRANCH_TYPE_SAVE = 0x10000
PERF_FORMAT_TOTAL_TIME_ENABLED = 0x1
PERF_FORMAT_TOTAL_TIME_RUNNING = 0x2
PERF_FORMAT_ID = 0x4
PERF_FORMAT_GROUP = 0x8
PERF_RECORD_MMAP = 0x1
PERF_RECORD_LOST = 0x2
PERF_RECORD_COMM = 0x3
PERF_RECORD_EXIT = 0x4
PERF_RECORD_THROTTLE = 0x5
PERF_RECORD_UNTHROTTLE = 0x6
PERF_RECORD_FORK = 0x7
PERF_RECORD_READ = 0x8
PERF_RECORD_SAMPLE = 0x9
PERF_RECORD_MMAP2 = 0xa
PERF_RECORD_AUX = 0xb
PERF_RECORD_ITRACE_START = 0xc
PERF_RECORD_LOST_SAMPLES = 0xd
PERF_RECORD_SWITCH = 0xe
PERF_RECORD_SWITCH_CPU_WIDE = 0xf
PERF_RECORD_NAMESPACES = 0x10
PERF_CONTEXT_HV = -0x20
PERF_CONTEXT_KERNEL = -0x80
PERF_CONTEXT_USER = -0x200
PERF_CONTEXT_GUEST = -0x800
PERF_CONTEXT_GUEST_KERNEL = -0x880
PERF_CONTEXT_GUEST_USER = -0xa00
PERF_FLAG_FD_NO_GROUP = 0x1
PERF_FLAG_FD_OUTPUT = 0x2
PERF_FLAG_PID_CGROUP = 0x4
PERF_FLAG_FD_CLOEXEC = 0x8
)
const (
CBitFieldMaskBit0 = 0x1
CBitFieldMaskBit1 = 0x2
CBitFieldMaskBit2 = 0x4
CBitFieldMaskBit3 = 0x8
CBitFieldMaskBit4 = 0x10
CBitFieldMaskBit5 = 0x20
CBitFieldMaskBit6 = 0x40
CBitFieldMaskBit7 = 0x80
CBitFieldMaskBit8 = 0x100
CBitFieldMaskBit9 = 0x200
CBitFieldMaskBit10 = 0x400
CBitFieldMaskBit11 = 0x800
CBitFieldMaskBit12 = 0x1000
CBitFieldMaskBit13 = 0x2000
CBitFieldMaskBit14 = 0x4000
CBitFieldMaskBit15 = 0x8000
CBitFieldMaskBit16 = 0x10000
CBitFieldMaskBit17 = 0x20000
CBitFieldMaskBit18 = 0x40000
CBitFieldMaskBit19 = 0x80000
CBitFieldMaskBit20 = 0x100000
CBitFieldMaskBit21 = 0x200000
CBitFieldMaskBit22 = 0x400000
CBitFieldMaskBit23 = 0x800000
CBitFieldMaskBit24 = 0x1000000
CBitFieldMaskBit25 = 0x2000000
CBitFieldMaskBit26 = 0x4000000
CBitFieldMaskBit27 = 0x8000000
CBitFieldMaskBit28 = 0x10000000
CBitFieldMaskBit29 = 0x20000000
CBitFieldMaskBit30 = 0x40000000
CBitFieldMaskBit31 = 0x80000000
CBitFieldMaskBit32 = 0x100000000
CBitFieldMaskBit33 = 0x200000000
CBitFieldMaskBit34 = 0x400000000
CBitFieldMaskBit35 = 0x800000000
CBitFieldMaskBit36 = 0x1000000000
CBitFieldMaskBit37 = 0x2000000000
CBitFieldMaskBit38 = 0x4000000000
CBitFieldMaskBit39 = 0x8000000000
CBitFieldMaskBit40 = 0x10000000000
CBitFieldMaskBit41 = 0x20000000000
CBitFieldMaskBit42 = 0x40000000000
CBitFieldMaskBit43 = 0x80000000000
CBitFieldMaskBit44 = 0x100000000000
CBitFieldMaskBit45 = 0x200000000000
CBitFieldMaskBit46 = 0x400000000000
CBitFieldMaskBit47 = 0x800000000000
CBitFieldMaskBit48 = 0x1000000000000
CBitFieldMaskBit49 = 0x2000000000000
CBitFieldMaskBit50 = 0x4000000000000
CBitFieldMaskBit51 = 0x8000000000000
CBitFieldMaskBit52 = 0x10000000000000
CBitFieldMaskBit53 = 0x20000000000000
CBitFieldMaskBit54 = 0x40000000000000
CBitFieldMaskBit55 = 0x80000000000000
CBitFieldMaskBit56 = 0x100000000000000
CBitFieldMaskBit57 = 0x200000000000000
CBitFieldMaskBit58 = 0x400000000000000
CBitFieldMaskBit59 = 0x800000000000000
CBitFieldMaskBit60 = 0x1000000000000000
CBitFieldMaskBit61 = 0x2000000000000000
CBitFieldMaskBit62 = 0x4000000000000000
CBitFieldMaskBit63 = 0x8000000000000000
)
type SockaddrStorage struct {
Family uint16
_ [118]uint8
_ uint64
}
type TCPMD5Sig struct {
Addr SockaddrStorage
Flags uint8
Prefixlen uint8
Keylen uint16
_ uint32
Key [80]uint8
}
type HDDriveCmdHdr struct {
Command uint8
Number uint8
Feature uint8
Count uint8
}
type HDGeometry struct {
Heads uint8
Sectors uint8
Cylinders uint16
Start uint64
}
type HDDriveID struct {
Config uint16
Cyls uint16
Reserved2 uint16
Heads uint16
Track_bytes uint16
Sector_bytes uint16
Sectors uint16
Vendor0 uint16
Vendor1 uint16
Vendor2 uint16
Serial_no [20]uint8
Buf_type uint16
Buf_size uint16
Ecc_bytes uint16
Fw_rev [8]uint8
Model [40]uint8
Max_multsect uint8
Vendor3 uint8
Dword_io uint16
Vendor4 uint8
Capability uint8
Reserved50 uint16
Vendor5 uint8
TPIO uint8
Vendor6 uint8
TDMA uint8
Field_valid uint16
Cur_cyls uint16
Cur_heads uint16
Cur_sectors uint16
Cur_capacity0 uint16
Cur_capacity1 uint16
Multsect uint8
Multsect_valid uint8
Lba_capacity uint32
Dma_1word uint16
Dma_mword uint16
Eide_pio_modes uint16
Eide_dma_min uint16
Eide_dma_time uint16
Eide_pio uint16
Eide_pio_iordy uint16
Words69_70 [2]uint16
Words71_74 [4]uint16
Queue_depth uint16
Words76_79 [4]uint16
Major_rev_num uint16
Minor_rev_num uint16
Command_set_1 uint16
Command_set_2 uint16
Cfsse uint16
Cfs_enable_1 uint16
Cfs_enable_2 uint16
Csf_default uint16
Dma_ultra uint16
Trseuc uint16
TrsEuc uint16
CurAPMvalues uint16
Mprc uint16
Hw_config uint16
Acoustic uint16
Msrqs uint16
Sxfert uint16
Sal uint16
Spg uint32
Lba_capacity_2 uint64
Words104_125 [22]uint16
Last_lun uint16
Word127 uint16
Dlf uint16
Csfo uint16
Words130_155 [26]uint16
Word156 uint16
Words157_159 [3]uint16
Cfa_power uint16
Words161_175 [15]uint16
Words176_205 [30]uint16
Words206_254 [49]uint16
Integrity_word uint16
}
type Statfs_t struct {
Type int64
Bsize int64
Blocks uint64
Bfree uint64
Bavail uint64
Files uint64
Ffree uint64
Fsid Fsid
Namelen int64
Frsize int64
Flags int64
Spare [4]int64
}
const (
ST_MANDLOCK = 0x40
ST_NOATIME = 0x400
ST_NODEV = 0x4
ST_NODIRATIME = 0x800
ST_NOEXEC = 0x8
ST_NOSUID = 0x2
ST_RDONLY = 0x1
ST_RELATIME = 0x1000
ST_SYNCHRONOUS = 0x10
)
type TpacketHdr struct {
Status uint64
Len uint32
Snaplen uint32
Mac uint16
Net uint16
Sec uint32
Usec uint32
_ [4]byte
}
type Tpacket2Hdr struct {
Status uint32
Len uint32
Snaplen uint32
Mac uint16
Net uint16
Sec uint32
Nsec uint32
Vlan_tci uint16
Vlan_tpid uint16
_ [4]uint8
}
type Tpacket3Hdr struct {
Next_offset uint32
Sec uint32
Nsec uint32
Snaplen uint32
Len uint32
Status uint32
Mac uint16
Net uint16
Hv1 TpacketHdrVariant1
_ [8]uint8
}
type TpacketHdrVariant1 struct {
Rxhash uint32
Vlan_tci uint32
Vlan_tpid uint16
_ uint16
}
type TpacketBlockDesc struct {
Version uint32
To_priv uint32
Hdr [40]byte
}
type TpacketBDTS struct {
Sec uint32
Usec uint32
}
type TpacketHdrV1 struct {
Block_status uint32
Num_pkts uint32
Offset_to_first_pkt uint32
Blk_len uint32
Seq_num uint64
Ts_first_pkt TpacketBDTS
Ts_last_pkt TpacketBDTS
}
type TpacketReq struct {
Block_size uint32
Block_nr uint32
Frame_size uint32
Frame_nr uint32
}
type TpacketReq3 struct {
Block_size uint32
Block_nr uint32
Frame_size uint32
Frame_nr uint32
Retire_blk_tov uint32
Sizeof_priv uint32
Feature_req_word uint32
}
type TpacketStats struct {
Packets uint32
Drops uint32
}
type TpacketStatsV3 struct {
Packets uint32
Drops uint32
Freeze_q_cnt uint32
}
type TpacketAuxdata struct {
Status uint32
Len uint32
Snaplen uint32
Mac uint16
Net uint16
Vlan_tci uint16
Vlan_tpid uint16
}
const (
TPACKET_V1 = 0x0
TPACKET_V2 = 0x1
TPACKET_V3 = 0x2
)
const (
SizeofTpacketHdr = 0x20
SizeofTpacket2Hdr = 0x20
SizeofTpacket3Hdr = 0x30
SizeofTpacketStats = 0x8
SizeofTpacketStatsV3 = 0xc
)
const (
NF_INET_PRE_ROUTING = 0x0
NF_INET_LOCAL_IN = 0x1
NF_INET_FORWARD = 0x2
NF_INET_LOCAL_OUT = 0x3
NF_INET_POST_ROUTING = 0x4
NF_INET_NUMHOOKS = 0x5
)
const (
NF_NETDEV_INGRESS = 0x0
NF_NETDEV_NUMHOOKS = 0x1
)
const (
NFPROTO_UNSPEC = 0x0
NFPROTO_INET = 0x1
NFPROTO_IPV4 = 0x2
NFPROTO_ARP = 0x3
NFPROTO_NETDEV = 0x5
NFPROTO_BRIDGE = 0x7
NFPROTO_IPV6 = 0xa
NFPROTO_DECNET = 0xc
NFPROTO_NUMPROTO = 0xd
)
type Nfgenmsg struct {
Nfgen_family uint8
Version uint8
Res_id uint16
}
const (
NFNL_BATCH_UNSPEC = 0x0
NFNL_BATCH_GENID = 0x1
)
const (
NFT_REG_VERDICT = 0x0
NFT_REG_1 = 0x1
NFT_REG_2 = 0x2
NFT_REG_3 = 0x3
NFT_REG_4 = 0x4
NFT_REG32_00 = 0x8
NFT_REG32_01 = 0x9
NFT_REG32_02 = 0xa
NFT_REG32_03 = 0xb
NFT_REG32_04 = 0xc
NFT_REG32_05 = 0xd
NFT_REG32_06 = 0xe
NFT_REG32_07 = 0xf
NFT_REG32_08 = 0x10
NFT_REG32_09 = 0x11
NFT_REG32_10 = 0x12
NFT_REG32_11 = 0x13
NFT_REG32_12 = 0x14
NFT_REG32_13 = 0x15
NFT_REG32_14 = 0x16
NFT_REG32_15 = 0x17
NFT_CONTINUE = -0x1
NFT_BREAK = -0x2
NFT_JUMP = -0x3
NFT_GOTO = -0x4
NFT_RETURN = -0x5
NFT_MSG_NEWTABLE = 0x0
NFT_MSG_GETTABLE = 0x1
NFT_MSG_DELTABLE = 0x2
NFT_MSG_NEWCHAIN = 0x3
NFT_MSG_GETCHAIN = 0x4
NFT_MSG_DELCHAIN = 0x5
NFT_MSG_NEWRULE = 0x6
NFT_MSG_GETRULE = 0x7
NFT_MSG_DELRULE = 0x8
NFT_MSG_NEWSET = 0x9
NFT_MSG_GETSET = 0xa
NFT_MSG_DELSET = 0xb
NFT_MSG_NEWSETELEM = 0xc
NFT_MSG_GETSETELEM = 0xd
NFT_MSG_DELSETELEM = 0xe
NFT_MSG_NEWGEN = 0xf
NFT_MSG_GETGEN = 0x10
NFT_MSG_TRACE = 0x11
NFT_MSG_NEWOBJ = 0x12
NFT_MSG_GETOBJ = 0x13
NFT_MSG_DELOBJ = 0x14
NFT_MSG_GETOBJ_RESET = 0x15
NFT_MSG_MAX = 0x19
NFTA_LIST_UNPEC = 0x0
NFTA_LIST_ELEM = 0x1
NFTA_HOOK_UNSPEC = 0x0
NFTA_HOOK_HOOKNUM = 0x1
NFTA_HOOK_PRIORITY = 0x2
NFTA_HOOK_DEV = 0x3
NFT_TABLE_F_DORMANT = 0x1
NFTA_TABLE_UNSPEC = 0x0
NFTA_TABLE_NAME = 0x1
NFTA_TABLE_FLAGS = 0x2
NFTA_TABLE_USE = 0x3
NFTA_CHAIN_UNSPEC = 0x0
NFTA_CHAIN_TABLE = 0x1
NFTA_CHAIN_HANDLE = 0x2
NFTA_CHAIN_NAME = 0x3
NFTA_CHAIN_HOOK = 0x4
NFTA_CHAIN_POLICY = 0x5
NFTA_CHAIN_USE = 0x6
NFTA_CHAIN_TYPE = 0x7
NFTA_CHAIN_COUNTERS = 0x8
NFTA_CHAIN_PAD = 0x9
NFTA_RULE_UNSPEC = 0x0
NFTA_RULE_TABLE = 0x1
NFTA_RULE_CHAIN = 0x2
NFTA_RULE_HANDLE = 0x3
NFTA_RULE_EXPRESSIONS = 0x4
NFTA_RULE_COMPAT = 0x5
NFTA_RULE_POSITION = 0x6
NFTA_RULE_USERDATA = 0x7
NFTA_RULE_PAD = 0x8
NFTA_RULE_ID = 0x9
NFT_RULE_COMPAT_F_INV = 0x2
NFT_RULE_COMPAT_F_MASK = 0x2
NFTA_RULE_COMPAT_UNSPEC = 0x0
NFTA_RULE_COMPAT_PROTO = 0x1
NFTA_RULE_COMPAT_FLAGS = 0x2
NFT_SET_ANONYMOUS = 0x1
NFT_SET_CONSTANT = 0x2
NFT_SET_INTERVAL = 0x4
NFT_SET_MAP = 0x8
NFT_SET_TIMEOUT = 0x10
NFT_SET_EVAL = 0x20
NFT_SET_OBJECT = 0x40
NFT_SET_POL_PERFORMANCE = 0x0
NFT_SET_POL_MEMORY = 0x1
NFTA_SET_DESC_UNSPEC = 0x0
NFTA_SET_DESC_SIZE = 0x1
NFTA_SET_UNSPEC = 0x0
NFTA_SET_TABLE = 0x1
NFTA_SET_NAME = 0x2
NFTA_SET_FLAGS = 0x3
NFTA_SET_KEY_TYPE = 0x4
NFTA_SET_KEY_LEN = 0x5
NFTA_SET_DATA_TYPE = 0x6
NFTA_SET_DATA_LEN = 0x7
NFTA_SET_POLICY = 0x8
NFTA_SET_DESC = 0x9
NFTA_SET_ID = 0xa
NFTA_SET_TIMEOUT = 0xb
NFTA_SET_GC_INTERVAL = 0xc
NFTA_SET_USERDATA = 0xd
NFTA_SET_PAD = 0xe
NFTA_SET_OBJ_TYPE = 0xf
NFT_SET_ELEM_INTERVAL_END = 0x1
NFTA_SET_ELEM_UNSPEC = 0x0
NFTA_SET_ELEM_KEY = 0x1
NFTA_SET_ELEM_DATA = 0x2
NFTA_SET_ELEM_FLAGS = 0x3
NFTA_SET_ELEM_TIMEOUT = 0x4
NFTA_SET_ELEM_EXPIRATION = 0x5
NFTA_SET_ELEM_USERDATA = 0x6
NFTA_SET_ELEM_EXPR = 0x7
NFTA_SET_ELEM_PAD = 0x8
NFTA_SET_ELEM_OBJREF = 0x9
NFTA_SET_ELEM_LIST_UNSPEC = 0x0
NFTA_SET_ELEM_LIST_TABLE = 0x1
NFTA_SET_ELEM_LIST_SET = 0x2
NFTA_SET_ELEM_LIST_ELEMENTS = 0x3
NFTA_SET_ELEM_LIST_SET_ID = 0x4
NFT_DATA_VALUE = 0x0
NFT_DATA_VERDICT = 0xffffff00
NFTA_DATA_UNSPEC = 0x0
NFTA_DATA_VALUE = 0x1
NFTA_DATA_VERDICT = 0x2
NFTA_VERDICT_UNSPEC = 0x0
NFTA_VERDICT_CODE = 0x1
NFTA_VERDICT_CHAIN = 0x2
NFTA_EXPR_UNSPEC = 0x0
NFTA_EXPR_NAME = 0x1
NFTA_EXPR_DATA = 0x2
NFTA_IMMEDIATE_UNSPEC = 0x0
NFTA_IMMEDIATE_DREG = 0x1
NFTA_IMMEDIATE_DATA = 0x2
NFTA_BITWISE_UNSPEC = 0x0
NFTA_BITWISE_SREG = 0x1
NFTA_BITWISE_DREG = 0x2
NFTA_BITWISE_LEN = 0x3
NFTA_BITWISE_MASK = 0x4
NFTA_BITWISE_XOR = 0x5
NFT_BYTEORDER_NTOH = 0x0
NFT_BYTEORDER_HTON = 0x1
NFTA_BYTEORDER_UNSPEC = 0x0
NFTA_BYTEORDER_SREG = 0x1
NFTA_BYTEORDER_DREG = 0x2
NFTA_BYTEORDER_OP = 0x3
NFTA_BYTEORDER_LEN = 0x4
NFTA_BYTEORDER_SIZE = 0x5
NFT_CMP_EQ = 0x0
NFT_CMP_NEQ = 0x1
NFT_CMP_LT = 0x2
NFT_CMP_LTE = 0x3
NFT_CMP_GT = 0x4
NFT_CMP_GTE = 0x5
NFTA_CMP_UNSPEC = 0x0
NFTA_CMP_SREG = 0x1
NFTA_CMP_OP = 0x2
NFTA_CMP_DATA = 0x3
NFT_RANGE_EQ = 0x0
NFT_RANGE_NEQ = 0x1
NFTA_RANGE_UNSPEC = 0x0
NFTA_RANGE_SREG = 0x1
NFTA_RANGE_OP = 0x2
NFTA_RANGE_FROM_DATA = 0x3
NFTA_RANGE_TO_DATA = 0x4
NFT_LOOKUP_F_INV = 0x1
NFTA_LOOKUP_UNSPEC = 0x0
NFTA_LOOKUP_SET = 0x1
NFTA_LOOKUP_SREG = 0x2
NFTA_LOOKUP_DREG = 0x3
NFTA_LOOKUP_SET_ID = 0x4
NFTA_LOOKUP_FLAGS = 0x5
NFT_DYNSET_OP_ADD = 0x0
NFT_DYNSET_OP_UPDATE = 0x1
NFT_DYNSET_F_INV = 0x1
NFTA_DYNSET_UNSPEC = 0x0
NFTA_DYNSET_SET_NAME = 0x1
NFTA_DYNSET_SET_ID = 0x2
NFTA_DYNSET_OP = 0x3
NFTA_DYNSET_SREG_KEY = 0x4
NFTA_DYNSET_SREG_DATA = 0x5
NFTA_DYNSET_TIMEOUT = 0x6
NFTA_DYNSET_EXPR = 0x7
NFTA_DYNSET_PAD = 0x8
NFTA_DYNSET_FLAGS = 0x9
NFT_PAYLOAD_LL_HEADER = 0x0
NFT_PAYLOAD_NETWORK_HEADER = 0x1
NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
NFT_PAYLOAD_CSUM_NONE = 0x0
NFT_PAYLOAD_CSUM_INET = 0x1
NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
NFTA_PAYLOAD_UNSPEC = 0x0
NFTA_PAYLOAD_DREG = 0x1
NFTA_PAYLOAD_BASE = 0x2
NFTA_PAYLOAD_OFFSET = 0x3
NFTA_PAYLOAD_LEN = 0x4
NFTA_PAYLOAD_SREG = 0x5
NFTA_PAYLOAD_CSUM_TYPE = 0x6
NFTA_PAYLOAD_CSUM_OFFSET = 0x7
NFTA_PAYLOAD_CSUM_FLAGS = 0x8
NFT_EXTHDR_F_PRESENT = 0x1
NFT_EXTHDR_OP_IPV6 = 0x0
NFT_EXTHDR_OP_TCPOPT = 0x1
NFTA_EXTHDR_UNSPEC = 0x0
NFTA_EXTHDR_DREG = 0x1
NFTA_EXTHDR_TYPE = 0x2
NFTA_EXTHDR_OFFSET = 0x3
NFTA_EXTHDR_LEN = 0x4
NFTA_EXTHDR_FLAGS = 0x5
NFTA_EXTHDR_OP = 0x6
NFTA_EXTHDR_SREG = 0x7
NFT_META_LEN = 0x0
NFT_META_PROTOCOL = 0x1
NFT_META_PRIORITY = 0x2
NFT_META_MARK = 0x3
NFT_META_IIF = 0x4
NFT_META_OIF = 0x5
NFT_META_IIFNAME = 0x6
NFT_META_OIFNAME = 0x7
NFT_META_IIFTYPE = 0x8
NFT_META_OIFTYPE = 0x9
NFT_META_SKUID = 0xa
NFT_META_SKGID = 0xb
NFT_META_NFTRACE = 0xc
NFT_META_RTCLASSID = 0xd
NFT_META_SECMARK = 0xe
NFT_META_NFPROTO = 0xf
NFT_META_L4PROTO = 0x10
NFT_META_BRI_IIFNAME = 0x11
NFT_META_BRI_OIFNAME = 0x12
NFT_META_PKTTYPE = 0x13
NFT_META_CPU = 0x14
NFT_META_IIFGROUP = 0x15
NFT_META_OIFGROUP = 0x16
NFT_META_CGROUP = 0x17
NFT_META_PRANDOM = 0x18
NFT_RT_CLASSID = 0x0
NFT_RT_NEXTHOP4 = 0x1
NFT_RT_NEXTHOP6 = 0x2
NFT_RT_TCPMSS = 0x3
NFT_HASH_JENKINS = 0x0
NFT_HASH_SYM = 0x1
NFTA_HASH_UNSPEC = 0x0
NFTA_HASH_SREG = 0x1
NFTA_HASH_DREG = 0x2
NFTA_HASH_LEN = 0x3
NFTA_HASH_MODULUS = 0x4
NFTA_HASH_SEED = 0x5
NFTA_HASH_OFFSET = 0x6
NFTA_HASH_TYPE = 0x7
NFTA_META_UNSPEC = 0x0
NFTA_META_DREG = 0x1
NFTA_META_KEY = 0x2
NFTA_META_SREG = 0x3
NFTA_RT_UNSPEC = 0x0
NFTA_RT_DREG = 0x1
NFTA_RT_KEY = 0x2
NFT_CT_STATE = 0x0
NFT_CT_DIRECTION = 0x1
NFT_CT_STATUS = 0x2
NFT_CT_MARK = 0x3
NFT_CT_SECMARK = 0x4
NFT_CT_EXPIRATION = 0x5
NFT_CT_HELPER = 0x6
NFT_CT_L3PROTOCOL = 0x7
NFT_CT_SRC = 0x8
NFT_CT_DST = 0x9
NFT_CT_PROTOCOL = 0xa
NFT_CT_PROTO_SRC = 0xb
NFT_CT_PROTO_DST = 0xc
NFT_CT_LABELS = 0xd
NFT_CT_PKTS = 0xe
NFT_CT_BYTES = 0xf
NFT_CT_AVGPKT = 0x10
NFT_CT_ZONE = 0x11
NFT_CT_EVENTMASK = 0x12
NFTA_CT_UNSPEC = 0x0
NFTA_CT_DREG = 0x1
NFTA_CT_KEY = 0x2
NFTA_CT_DIRECTION = 0x3
NFTA_CT_SREG = 0x4
NFT_LIMIT_PKTS = 0x0
NFT_LIMIT_PKT_BYTES = 0x1
NFT_LIMIT_F_INV = 0x1
NFTA_LIMIT_UNSPEC = 0x0
NFTA_LIMIT_RATE = 0x1
NFTA_LIMIT_UNIT = 0x2
NFTA_LIMIT_BURST = 0x3
NFTA_LIMIT_TYPE = 0x4
NFTA_LIMIT_FLAGS = 0x5
NFTA_LIMIT_PAD = 0x6
NFTA_COUNTER_UNSPEC = 0x0
NFTA_COUNTER_BYTES = 0x1
NFTA_COUNTER_PACKETS = 0x2
NFTA_COUNTER_PAD = 0x3
NFTA_LOG_UNSPEC = 0x0
NFTA_LOG_GROUP = 0x1
NFTA_LOG_PREFIX = 0x2
NFTA_LOG_SNAPLEN = 0x3
NFTA_LOG_QTHRESHOLD = 0x4
NFTA_LOG_LEVEL = 0x5
NFTA_LOG_FLAGS = 0x6
NFTA_QUEUE_UNSPEC = 0x0
NFTA_QUEUE_NUM = 0x1
NFTA_QUEUE_TOTAL = 0x2
NFTA_QUEUE_FLAGS = 0x3
NFTA_QUEUE_SREG_QNUM = 0x4
NFT_QUOTA_F_INV = 0x1
NFT_QUOTA_F_DEPLETED = 0x2
NFTA_QUOTA_UNSPEC = 0x0
NFTA_QUOTA_BYTES = 0x1
NFTA_QUOTA_FLAGS = 0x2
NFTA_QUOTA_PAD = 0x3
NFTA_QUOTA_CONSUMED = 0x4
NFT_REJECT_ICMP_UNREACH = 0x0
NFT_REJECT_TCP_RST = 0x1
NFT_REJECT_ICMPX_UNREACH = 0x2
NFT_REJECT_ICMPX_NO_ROUTE = 0x0
NFT_REJECT_ICMPX_PORT_UNREACH = 0x1
NFT_REJECT_ICMPX_HOST_UNREACH = 0x2
NFT_REJECT_ICMPX_ADMIN_PROHIBITED = 0x3
NFTA_REJECT_UNSPEC = 0x0
NFTA_REJECT_TYPE = 0x1
NFTA_REJECT_ICMP_CODE = 0x2
NFT_NAT_SNAT = 0x0
NFT_NAT_DNAT = 0x1
NFTA_NAT_UNSPEC = 0x0
NFTA_NAT_TYPE = 0x1
NFTA_NAT_FAMILY = 0x2
NFTA_NAT_REG_ADDR_MIN = 0x3
NFTA_NAT_REG_ADDR_MAX = 0x4
NFTA_NAT_REG_PROTO_MIN = 0x5
NFTA_NAT_REG_PROTO_MAX = 0x6
NFTA_NAT_FLAGS = 0x7
NFTA_MASQ_UNSPEC = 0x0
NFTA_MASQ_FLAGS = 0x1
NFTA_MASQ_REG_PROTO_MIN = 0x2
NFTA_MASQ_REG_PROTO_MAX = 0x3
NFTA_REDIR_UNSPEC = 0x0
NFTA_REDIR_REG_PROTO_MIN = 0x1
NFTA_REDIR_REG_PROTO_MAX = 0x2
NFTA_REDIR_FLAGS = 0x3
NFTA_DUP_UNSPEC = 0x0
NFTA_DUP_SREG_ADDR = 0x1
NFTA_DUP_SREG_DEV = 0x2
NFTA_FWD_UNSPEC = 0x0
NFTA_FWD_SREG_DEV = 0x1
NFTA_OBJREF_UNSPEC = 0x0
NFTA_OBJREF_IMM_TYPE = 0x1
NFTA_OBJREF_IMM_NAME = 0x2
NFTA_OBJREF_SET_SREG = 0x3
NFTA_OBJREF_SET_NAME = 0x4
NFTA_OBJREF_SET_ID = 0x5
NFTA_GEN_UNSPEC = 0x0
NFTA_GEN_ID = 0x1
NFTA_GEN_PROC_PID = 0x2
NFTA_GEN_PROC_NAME = 0x3
NFTA_FIB_UNSPEC = 0x0
NFTA_FIB_DREG = 0x1
NFTA_FIB_RESULT = 0x2
NFTA_FIB_FLAGS = 0x3
NFT_FIB_RESULT_UNSPEC = 0x0
NFT_FIB_RESULT_OIF = 0x1
NFT_FIB_RESULT_OIFNAME = 0x2
NFT_FIB_RESULT_ADDRTYPE = 0x3
NFTA_FIB_F_SADDR = 0x1
NFTA_FIB_F_DADDR = 0x2
NFTA_FIB_F_MARK = 0x4
NFTA_FIB_F_IIF = 0x8
NFTA_FIB_F_OIF = 0x10
NFTA_FIB_F_PRESENT = 0x20
NFTA_CT_HELPER_UNSPEC = 0x0
NFTA_CT_HELPER_NAME = 0x1
NFTA_CT_HELPER_L3PROTO = 0x2
NFTA_CT_HELPER_L4PROTO = 0x3
NFTA_OBJ_UNSPEC = 0x0
NFTA_OBJ_TABLE = 0x1
NFTA_OBJ_NAME = 0x2
NFTA_OBJ_TYPE = 0x3
NFTA_OBJ_DATA = 0x4
NFTA_OBJ_USE = 0x5
NFTA_TRACE_UNSPEC = 0x0
NFTA_TRACE_TABLE = 0x1
NFTA_TRACE_CHAIN = 0x2
NFTA_TRACE_RULE_HANDLE = 0x3
NFTA_TRACE_TYPE = 0x4
NFTA_TRACE_VERDICT = 0x5
NFTA_TRACE_ID = 0x6
NFTA_TRACE_LL_HEADER = 0x7
NFTA_TRACE_NETWORK_HEADER = 0x8
NFTA_TRACE_TRANSPORT_HEADER = 0x9
NFTA_TRACE_IIF = 0xa
NFTA_TRACE_IIFTYPE = 0xb
NFTA_TRACE_OIF = 0xc
NFTA_TRACE_OIFTYPE = 0xd
NFTA_TRACE_MARK = 0xe
NFTA_TRACE_NFPROTO = 0xf
NFTA_TRACE_POLICY = 0x10
NFTA_TRACE_PAD = 0x11
NFT_TRACETYPE_UNSPEC = 0x0
NFT_TRACETYPE_POLICY = 0x1
NFT_TRACETYPE_RETURN = 0x2
NFT_TRACETYPE_RULE = 0x3
NFTA_NG_UNSPEC = 0x0
NFTA_NG_DREG = 0x1
NFTA_NG_MODULUS = 0x2
NFTA_NG_TYPE = 0x3
NFTA_NG_OFFSET = 0x4
NFT_NG_INCREMENTAL = 0x0
NFT_NG_RANDOM = 0x1
)
type RTCTime struct {
Sec int32
Min int32
Hour int32
Mday int32
Mon int32
Year int32
Wday int32
Yday int32
Isdst int32
}
type RTCWkAlrm struct {
Enabled uint8
Pending uint8
Time RTCTime
}
type RTCPLLInfo struct {
Ctrl int32
Value int32
Max int32
Min int32
Posmult int32
Negmult int32
Clock int64
}
type BlkpgIoctlArg struct {
Op int32
Flags int32
Datalen int32
Data *byte
}
type BlkpgPartition struct {
Start int64
Length int64
Pno int32
Devname [64]uint8
Volname [64]uint8
_ [4]byte
}
const (
BLKPG = 0x1269
BLKPG_ADD_PARTITION = 0x1
BLKPG_DEL_PARTITION = 0x2
BLKPG_RESIZE_PARTITION = 0x3
)
const (
NETNSA_NONE = 0x0
NETNSA_NSID = 0x1
NETNSA_PID = 0x2
NETNSA_FD = 0x3
)
type XDPRingOffset struct {
Producer uint64
Consumer uint64
Desc uint64
}
type XDPMmapOffsets struct {
Rx XDPRingOffset
Tx XDPRingOffset
Fr XDPRingOffset
Cr XDPRingOffset
}
type XDPUmemReg struct {
Addr uint64
Len uint64
Size uint32
Headroom uint32
}
type XDPStatistics struct {
Rx_dropped uint64
Rx_invalid_descs uint64
Tx_invalid_descs uint64
}
type XDPDesc struct {
Addr uint64
Len uint32
Options uint32
}
const (
NCSI_CMD_UNSPEC = 0x0
NCSI_CMD_PKG_INFO = 0x1
NCSI_CMD_SET_INTERFACE = 0x2
NCSI_CMD_CLEAR_INTERFACE = 0x3
NCSI_ATTR_UNSPEC = 0x0
NCSI_ATTR_IFINDEX = 0x1
NCSI_ATTR_PACKAGE_LIST = 0x2
NCSI_ATTR_PACKAGE_ID = 0x3
NCSI_ATTR_CHANNEL_ID = 0x4
NCSI_PKG_ATTR_UNSPEC = 0x0
NCSI_PKG_ATTR = 0x1
NCSI_PKG_ATTR_ID = 0x2
NCSI_PKG_ATTR_FORCED = 0x3
NCSI_PKG_ATTR_CHANNEL_LIST = 0x4
NCSI_CHANNEL_ATTR_UNSPEC = 0x0
NCSI_CHANNEL_ATTR = 0x1
NCSI_CHANNEL_ATTR_ID = 0x2
NCSI_CHANNEL_ATTR_VERSION_MAJOR = 0x3
NCSI_CHANNEL_ATTR_VERSION_MINOR = 0x4
NCSI_CHANNEL_ATTR_VERSION_STR = 0x5
NCSI_CHANNEL_ATTR_LINK_STATE = 0x6
NCSI_CHANNEL_ATTR_ACTIVE = 0x7
NCSI_CHANNEL_ATTR_FORCED = 0x8
NCSI_CHANNEL_ATTR_VLAN_LIST = 0x9
NCSI_CHANNEL_ATTR_VLAN_ID = 0xa
)
type ScmTimestamping struct {
Ts [3]Timespec
}
const (
SOF_TIMESTAMPING_TX_HARDWARE = 0x1
SOF_TIMESTAMPING_TX_SOFTWARE = 0x2
SOF_TIMESTAMPING_RX_HARDWARE = 0x4
SOF_TIMESTAMPING_RX_SOFTWARE = 0x8
SOF_TIMESTAMPING_SOFTWARE = 0x10
SOF_TIMESTAMPING_SYS_HARDWARE = 0x20
SOF_TIMESTAMPING_RAW_HARDWARE = 0x40
SOF_TIMESTAMPING_OPT_ID = 0x80
SOF_TIMESTAMPING_TX_SCHED = 0x100
SOF_TIMESTAMPING_TX_ACK = 0x200
SOF_TIMESTAMPING_OPT_CMSG = 0x400
SOF_TIMESTAMPING_OPT_TSONLY = 0x800
SOF_TIMESTAMPING_OPT_STATS = 0x1000
SOF_TIMESTAMPING_OPT_PKTINFO = 0x2000
SOF_TIMESTAMPING_OPT_TX_SWHW = 0x4000
SOF_TIMESTAMPING_LAST = 0x4000
SOF_TIMESTAMPING_MASK = 0x7fff
SCM_TSTAMP_SND = 0x0
SCM_TSTAMP_SCHED = 0x1
SCM_TSTAMP_ACK = 0x2
)
type SockExtendedErr struct {
Errno uint32
Origin uint8
Type uint8
Code uint8
Pad uint8
Info uint32
Data uint32
}
type FanotifyEventMetadata struct {
Event_len uint32
Vers uint8
Reserved uint8
Metadata_len uint16
Mask uint64
Fd int32
Pid int32
}
type FanotifyResponse struct {
Fd int32
Response uint32
}
const (
CRYPTO_MSG_BASE = 0x10
CRYPTO_MSG_NEWALG = 0x10
CRYPTO_MSG_DELALG = 0x11
CRYPTO_MSG_UPDATEALG = 0x12
CRYPTO_MSG_GETALG = 0x13
CRYPTO_MSG_DELRNG = 0x14
CRYPTO_MSG_GETSTAT = 0x15
)
const (
CRYPTOCFGA_UNSPEC = 0x0
CRYPTOCFGA_PRIORITY_VAL = 0x1
CRYPTOCFGA_REPORT_LARVAL = 0x2
CRYPTOCFGA_REPORT_HASH = 0x3
CRYPTOCFGA_REPORT_BLKCIPHER = 0x4
CRYPTOCFGA_REPORT_AEAD = 0x5
CRYPTOCFGA_REPORT_COMPRESS = 0x6
CRYPTOCFGA_REPORT_RNG = 0x7
CRYPTOCFGA_REPORT_CIPHER = 0x8
CRYPTOCFGA_REPORT_AKCIPHER = 0x9
CRYPTOCFGA_REPORT_KPP = 0xa
CRYPTOCFGA_REPORT_ACOMP = 0xb
CRYPTOCFGA_STAT_LARVAL = 0xc
CRYPTOCFGA_STAT_HASH = 0xd
CRYPTOCFGA_STAT_BLKCIPHER = 0xe
CRYPTOCFGA_STAT_AEAD = 0xf
CRYPTOCFGA_STAT_COMPRESS = 0x10
CRYPTOCFGA_STAT_RNG = 0x11
CRYPTOCFGA_STAT_CIPHER = 0x12
CRYPTOCFGA_STAT_AKCIPHER = 0x13
CRYPTOCFGA_STAT_KPP = 0x14
CRYPTOCFGA_STAT_ACOMP = 0x15
)
type CryptoUserAlg struct {
Name [64]uint8
Driver_name [64]uint8
Module_name [64]uint8
Type uint32
Mask uint32
Refcnt uint32
Flags uint32
}
type CryptoStatAEAD struct {
Type [64]uint8
Encrypt_cnt uint64
Encrypt_tlen uint64
Decrypt_cnt uint64
Decrypt_tlen uint64
Err_cnt uint64
}
type CryptoStatAKCipher struct {
Type [64]uint8
Encrypt_cnt uint64
Encrypt_tlen uint64
Decrypt_cnt uint64
Decrypt_tlen uint64
Verify_cnt uint64
Sign_cnt uint64
Err_cnt uint64
}
type CryptoStatCipher struct {
Type [64]uint8
Encrypt_cnt uint64
Encrypt_tlen uint64
Decrypt_cnt uint64
Decrypt_tlen uint64
Err_cnt uint64
}
type CryptoStatCompress struct {
Type [64]uint8
Compress_cnt uint64
Compress_tlen uint64
Decompress_cnt uint64
Decompress_tlen uint64
Err_cnt uint64
}
type CryptoStatHash struct {
Type [64]uint8
Hash_cnt uint64
Hash_tlen uint64
Err_cnt uint64
}
type CryptoStatKPP struct {
Type [64]uint8
Setsecret_cnt uint64
Generate_public_key_cnt uint64
Compute_shared_secret_cnt uint64
Err_cnt uint64
}
type CryptoStatRNG struct {
Type [64]uint8
Generate_cnt uint64
Generate_tlen uint64
Seed_cnt uint64
Err_cnt uint64
}
type CryptoStatLarval struct {
Type [64]uint8
}
type CryptoReportLarval struct {
Type [64]uint8
}
type CryptoReportHash struct {
Type [64]uint8
Blocksize uint32
Digestsize uint32
}
type CryptoReportCipher struct {
Type [64]uint8
Blocksize uint32
Min_keysize uint32
Max_keysize uint32
}
type CryptoReportBlkCipher struct {
Type [64]uint8
Geniv [64]uint8
Blocksize uint32
Min_keysize uint32
Max_keysize uint32
Ivsize uint32
}
type CryptoReportAEAD struct {
Type [64]uint8
Geniv [64]uint8
Blocksize uint32
Maxauthsize uint32
Ivsize uint32
}
type CryptoReportComp struct {
Type [64]uint8
}
type CryptoReportRNG struct {
Type [64]uint8
Seedsize uint32
}
type CryptoReportAKCipher struct {
Type [64]uint8
}
type CryptoReportKPP struct {
Type [64]uint8
}
type CryptoReportAcomp struct {
Type [64]uint8
}
const (
BPF_REG_0 = 0x0
BPF_REG_1 = 0x1
BPF_REG_2 = 0x2
BPF_REG_3 = 0x3
BPF_REG_4 = 0x4
BPF_REG_5 = 0x5
BPF_REG_6 = 0x6
BPF_REG_7 = 0x7
BPF_REG_8 = 0x8
BPF_REG_9 = 0x9
BPF_REG_10 = 0xa
BPF_MAP_CREATE = 0x0
BPF_MAP_LOOKUP_ELEM = 0x1
BPF_MAP_UPDATE_ELEM = 0x2
BPF_MAP_DELETE_ELEM = 0x3
BPF_MAP_GET_NEXT_KEY = 0x4
BPF_PROG_LOAD = 0x5
BPF_OBJ_PIN = 0x6
BPF_OBJ_GET = 0x7
BPF_PROG_ATTACH = 0x8
BPF_PROG_DETACH = 0x9
BPF_PROG_TEST_RUN = 0xa
BPF_PROG_GET_NEXT_ID = 0xb
BPF_MAP_GET_NEXT_ID = 0xc
BPF_PROG_GET_FD_BY_ID = 0xd
BPF_MAP_GET_FD_BY_ID = 0xe
BPF_OBJ_GET_INFO_BY_FD = 0xf
BPF_PROG_QUERY = 0x10
BPF_RAW_TRACEPOINT_OPEN = 0x11
BPF_BTF_LOAD = 0x12
BPF_BTF_GET_FD_BY_ID = 0x13
BPF_TASK_FD_QUERY = 0x14
BPF_MAP_LOOKUP_AND_DELETE_ELEM = 0x15
BPF_MAP_TYPE_UNSPEC = 0x0
BPF_MAP_TYPE_HASH = 0x1
BPF_MAP_TYPE_ARRAY = 0x2
BPF_MAP_TYPE_PROG_ARRAY = 0x3
BPF_MAP_TYPE_PERF_EVENT_ARRAY = 0x4
BPF_MAP_TYPE_PERCPU_HASH = 0x5
BPF_MAP_TYPE_PERCPU_ARRAY = 0x6
BPF_MAP_TYPE_STACK_TRACE = 0x7
BPF_MAP_TYPE_CGROUP_ARRAY = 0x8
BPF_MAP_TYPE_LRU_HASH = 0x9
BPF_MAP_TYPE_LRU_PERCPU_HASH = 0xa
BPF_MAP_TYPE_LPM_TRIE = 0xb
BPF_MAP_TYPE_ARRAY_OF_MAPS = 0xc
BPF_MAP_TYPE_HASH_OF_MAPS = 0xd
BPF_MAP_TYPE_DEVMAP = 0xe
BPF_MAP_TYPE_SOCKMAP = 0xf
BPF_MAP_TYPE_CPUMAP = 0x10
BPF_MAP_TYPE_XSKMAP = 0x11
BPF_MAP_TYPE_SOCKHASH = 0x12
BPF_MAP_TYPE_CGROUP_STORAGE = 0x13
BPF_MAP_TYPE_REUSEPORT_SOCKARRAY = 0x14
BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE = 0x15
BPF_MAP_TYPE_QUEUE = 0x16
BPF_MAP_TYPE_STACK = 0x17
BPF_PROG_TYPE_UNSPEC = 0x0
BPF_PROG_TYPE_SOCKET_FILTER = 0x1
BPF_PROG_TYPE_KPROBE = 0x2
BPF_PROG_TYPE_SCHED_CLS = 0x3
BPF_PROG_TYPE_SCHED_ACT = 0x4
BPF_PROG_TYPE_TRACEPOINT = 0x5
BPF_PROG_TYPE_XDP = 0x6
BPF_PROG_TYPE_PERF_EVENT = 0x7
BPF_PROG_TYPE_CGROUP_SKB = 0x8
BPF_PROG_TYPE_CGROUP_SOCK = 0x9
BPF_PROG_TYPE_LWT_IN = 0xa
BPF_PROG_TYPE_LWT_OUT = 0xb
BPF_PROG_TYPE_LWT_XMIT = 0xc
BPF_PROG_TYPE_SOCK_OPS = 0xd
BPF_PROG_TYPE_SK_SKB = 0xe
BPF_PROG_TYPE_CGROUP_DEVICE = 0xf
BPF_PROG_TYPE_SK_MSG = 0x10
BPF_PROG_TYPE_RAW_TRACEPOINT = 0x11
BPF_PROG_TYPE_CGROUP_SOCK_ADDR = 0x12
BPF_PROG_TYPE_LWT_SEG6LOCAL = 0x13
BPF_PROG_TYPE_LIRC_MODE2 = 0x14
BPF_PROG_TYPE_SK_REUSEPORT = 0x15
BPF_PROG_TYPE_FLOW_DISSECTOR = 0x16
BPF_CGROUP_INET_INGRESS = 0x0
BPF_CGROUP_INET_EGRESS = 0x1
BPF_CGROUP_INET_SOCK_CREATE = 0x2
BPF_CGROUP_SOCK_OPS = 0x3
BPF_SK_SKB_STREAM_PARSER = 0x4
BPF_SK_SKB_STREAM_VERDICT = 0x5
BPF_CGROUP_DEVICE = 0x6
BPF_SK_MSG_VERDICT = 0x7
BPF_CGROUP_INET4_BIND = 0x8
BPF_CGROUP_INET6_BIND = 0x9
BPF_CGROUP_INET4_CONNECT = 0xa
BPF_CGROUP_INET6_CONNECT = 0xb
BPF_CGROUP_INET4_POST_BIND = 0xc
BPF_CGROUP_INET6_POST_BIND = 0xd
BPF_CGROUP_UDP4_SENDMSG = 0xe
BPF_CGROUP_UDP6_SENDMSG = 0xf
BPF_LIRC_MODE2 = 0x10
BPF_FLOW_DISSECTOR = 0x11
BPF_STACK_BUILD_ID_EMPTY = 0x0
BPF_STACK_BUILD_ID_VALID = 0x1
BPF_STACK_BUILD_ID_IP = 0x2
BPF_ADJ_ROOM_NET = 0x0
BPF_HDR_START_MAC = 0x0
BPF_HDR_START_NET = 0x1
BPF_LWT_ENCAP_SEG6 = 0x0
BPF_LWT_ENCAP_SEG6_INLINE = 0x1
BPF_OK = 0x0
BPF_DROP = 0x2
BPF_REDIRECT = 0x7
BPF_SOCK_OPS_VOID = 0x0
BPF_SOCK_OPS_TIMEOUT_INIT = 0x1
BPF_SOCK_OPS_RWND_INIT = 0x2
BPF_SOCK_OPS_TCP_CONNECT_CB = 0x3
BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB = 0x4
BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB = 0x5
BPF_SOCK_OPS_NEEDS_ECN = 0x6
BPF_SOCK_OPS_BASE_RTT = 0x7
BPF_SOCK_OPS_RTO_CB = 0x8
BPF_SOCK_OPS_RETRANS_CB = 0x9
BPF_SOCK_OPS_STATE_CB = 0xa
BPF_SOCK_OPS_TCP_LISTEN_CB = 0xb
BPF_TCP_ESTABLISHED = 0x1
BPF_TCP_SYN_SENT = 0x2
BPF_TCP_SYN_RECV = 0x3
BPF_TCP_FIN_WAIT1 = 0x4
BPF_TCP_FIN_WAIT2 = 0x5
BPF_TCP_TIME_WAIT = 0x6
BPF_TCP_CLOSE = 0x7
BPF_TCP_CLOSE_WAIT = 0x8
BPF_TCP_LAST_ACK = 0x9
BPF_TCP_LISTEN = 0xa
BPF_TCP_CLOSING = 0xb
BPF_TCP_NEW_SYN_RECV = 0xc
BPF_TCP_MAX_STATES = 0xd
BPF_FIB_LKUP_RET_SUCCESS = 0x0
BPF_FIB_LKUP_RET_BLACKHOLE = 0x1
BPF_FIB_LKUP_RET_UNREACHABLE = 0x2
BPF_FIB_LKUP_RET_PROHIBIT = 0x3
BPF_FIB_LKUP_RET_NOT_FWDED = 0x4
BPF_FIB_LKUP_RET_FWD_DISABLED = 0x5
BPF_FIB_LKUP_RET_UNSUPP_LWT = 0x6
BPF_FIB_LKUP_RET_NO_NEIGH = 0x7
BPF_FIB_LKUP_RET_FRAG_NEEDED = 0x8
BPF_FD_TYPE_RAW_TRACEPOINT = 0x0
BPF_FD_TYPE_TRACEPOINT = 0x1
BPF_FD_TYPE_KPROBE = 0x2
BPF_FD_TYPE_KRETPROBE = 0x3
BPF_FD_TYPE_UPROBE = 0x4
BPF_FD_TYPE_URETPROBE = 0x5
)
type CapUserHeader struct {
Version uint32
Pid int32
}
type CapUserData struct {
Effective uint32
Permitted uint32
Inheritable uint32
}
const (
LINUX_CAPABILITY_VERSION_1 = 0x19980330
LINUX_CAPABILITY_VERSION_2 = 0x20071026
LINUX_CAPABILITY_VERSION_3 = 0x20080522
)
const (
LO_FLAGS_READ_ONLY = 0x1
LO_FLAGS_AUTOCLEAR = 0x4
LO_FLAGS_PARTSCAN = 0x8
LO_FLAGS_DIRECT_IO = 0x10
)
type LoopInfo struct {
Number int32
Device uint32
Inode uint64
Rdevice uint32
Offset int32
Encrypt_type int32
Encrypt_key_size int32
Flags int32
Name [64]uint8
Encrypt_key [32]uint8
Init [2]uint64
Reserved [4]uint8
_ [4]byte
}
type LoopInfo64 struct {
Device uint64
Inode uint64
Rdevice uint64
Offset uint64
Sizelimit uint64
Number uint32
Encrypt_type uint32
Encrypt_key_size uint32
Flags uint32
File_name [64]uint8
Crypt_name [64]uint8
Encrypt_key [32]uint8
Init [2]uint64
}
type TIPCSocketAddr struct {
Ref uint32
Node uint32
}
type TIPCServiceRange struct {
Type uint32
Lower uint32
Upper uint32
}
type TIPCServiceName struct {
Type uint32
Instance uint32
Domain uint32
}
type TIPCSubscr struct {
Seq TIPCServiceRange
Timeout uint32
Filter uint32
Handle [8]uint8
}
type TIPCEvent struct {
Event uint32
Lower uint32
Upper uint32
Port TIPCSocketAddr
S TIPCSubscr
}
type TIPCGroupReq struct {
Type uint32
Instance uint32
Scope uint32
Flags uint32
}
type TIPCSIOCLNReq struct {
Peer uint32
Id uint32
Linkname [68]uint8
}
type TIPCSIOCNodeIDReq struct {
Peer uint32
Id [16]uint8
}
const (
TIPC_CLUSTER_SCOPE = 0x2
TIPC_NODE_SCOPE = 0x3
)
| {
"pile_set_name": "Github"
} |
ALTER TABLE character_db_version CHANGE COLUMN required_12339_02_characters_calendar_invites required_12487_01_characters_characters bit;
UPDATE characters SET drunk = (drunk / 256) & 0xFF;
ALTER TABLE characters CHANGE drunk drunk tinyint(3) unsigned NOT NULL DEFAULT '0';
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8"?>
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>test-project</groupId>
<artifactId>test-project</artifactId>
<version>2.4.4</version>
</parent>
<artifactId>test-project-broker-pom</artifactId>
<name>Test Project Broker POM</name>
<packaging>pom</packaging>
<modules>
<module>broker-ejb</module>
</modules>
</project>
| {
"pile_set_name": "Github"
} |
<html class="reftest-print">
<head>
<title>crash in nsContentList::nsContentList on print preview</title>
</head><body>
<iframe onload="window.location.reload()" src="data:text/html,">
</iframe>
</body></html>
| {
"pile_set_name": "Github"
} |
/**
******************************************************************************
* @file startup_stm32f427_437xx.s
* @author MCD Application Team
* @version V1.8.0
* @date 09-November-2016
* @brief STM32F427xx/437xx Devices vector table for Atollic TrueSTUDIO toolchain.
* This module performs:
* - Set the initial SP
* - Set the initial PC == Reset_Handler,
* - Set the vector table entries with the exceptions ISR address
* - Configure the clock system and the external SRAM mounted on
* STM324x7I-EVAL board to be used as data memory
* (optional, to be enabled by user)
* - Branches to main in the C library (which eventually
* calls main()).
* After Reset the Cortex-M4 processor is in Thread mode,
* priority is Privileged, and the Stack is set to Main.
******************************************************************************
* @attention
*
* <h2><center>© COPYRIGHT 2016 STMicroelectronics</center></h2>
*
* Licensed under MCD-ST Liberty SW License Agreement V2, (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.st.com/software_license_agreement_liberty_v2
*
* 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.
*
******************************************************************************
*/
.syntax unified
.cpu cortex-m4
.fpu softvfp
.thumb
.global g_pfnVectors
.global Default_Handler
/* start address for the initialization values of the .data section.
defined in linker script */
.word _sidata
/* start address for the .data section. defined in linker script */
.word _sdata
/* end address for the .data section. defined in linker script */
.word _edata
/* start address for the .bss section. defined in linker script */
.word _sbss
/* end address for the .bss section. defined in linker script */
.word _ebss
/* stack used for SystemInit_ExtMemCtl; always internal RAM used */
/**
* @brief This is the code that gets called when the processor first
* starts execution following a reset event. Only the absolutely
* necessary set is performed, after which the application
* supplied main() routine is called.
* @param None
* @retval : None
*/
.section .text.Reset_Handler
.weak Reset_Handler
.type Reset_Handler, %function
Reset_Handler:
/* Copy the data segment initializers from flash to SRAM */
movs r1, #0
b LoopCopyDataInit
CopyDataInit:
ldr r3, =_sidata
ldr r3, [r3, r1]
str r3, [r0, r1]
adds r1, r1, #4
LoopCopyDataInit:
ldr r0, =_sdata
ldr r3, =_edata
adds r2, r0, r1
cmp r2, r3
bcc CopyDataInit
ldr r2, =_sbss
b LoopFillZerobss
/* Zero fill the bss segment. */
FillZerobss:
movs r3, #0
str r3, [r2], #4
LoopFillZerobss:
ldr r3, = _ebss
cmp r2, r3
bcc FillZerobss
/* Call the clock system intitialization function.*/
bl SystemInit
/* Call static constructors */
bl __libc_init_array
/* Call the application's entry point.*/
bl main
bx lr
.size Reset_Handler, .-Reset_Handler
/**
* @brief This is the code that gets called when the processor receives an
* unexpected interrupt. This simply enters an infinite loop, preserving
* the system state for examination by a debugger.
* @param None
* @retval None
*/
.section .text.Default_Handler,"ax",%progbits
Default_Handler:
Infinite_Loop:
b Infinite_Loop
.size Default_Handler, .-Default_Handler
/******************************************************************************
*
* The minimal vector table for a Cortex M3. Note that the proper constructs
* must be placed on this to ensure that it ends up at physical address
* 0x0000.0000.
*
*******************************************************************************/
.section .isr_vector,"a",%progbits
.type g_pfnVectors, %object
.size g_pfnVectors, .-g_pfnVectors
g_pfnVectors:
.word _estack
.word Reset_Handler
.word NMI_Handler
.word HardFault_Handler
.word MemManage_Handler
.word BusFault_Handler
.word UsageFault_Handler
.word 0
.word 0
.word 0
.word 0
.word SVC_Handler
.word DebugMon_Handler
.word 0
.word PendSV_Handler
.word SysTick_Handler
/* External Interrupts */
.word WWDG_IRQHandler /* Window WatchDog */
.word PVD_IRQHandler /* PVD through EXTI Line detection */
.word TAMP_STAMP_IRQHandler /* Tamper and TimeStamps through the EXTI line */
.word RTC_WKUP_IRQHandler /* RTC Wakeup through the EXTI line */
.word FLASH_IRQHandler /* FLASH */
.word RCC_IRQHandler /* RCC */
.word EXTI0_IRQHandler /* EXTI Line0 */
.word EXTI1_IRQHandler /* EXTI Line1 */
.word EXTI2_IRQHandler /* EXTI Line2 */
.word EXTI3_IRQHandler /* EXTI Line3 */
.word EXTI4_IRQHandler /* EXTI Line4 */
.word DMA1_Stream0_IRQHandler /* DMA1 Stream 0 */
.word DMA1_Stream1_IRQHandler /* DMA1 Stream 1 */
.word DMA1_Stream2_IRQHandler /* DMA1 Stream 2 */
.word DMA1_Stream3_IRQHandler /* DMA1 Stream 3 */
.word DMA1_Stream4_IRQHandler /* DMA1 Stream 4 */
.word DMA1_Stream5_IRQHandler /* DMA1 Stream 5 */
.word DMA1_Stream6_IRQHandler /* DMA1 Stream 6 */
.word ADC_IRQHandler /* ADC1, ADC2 and ADC3s */
.word CAN1_TX_IRQHandler /* CAN1 TX */
.word CAN1_RX0_IRQHandler /* CAN1 RX0 */
.word CAN1_RX1_IRQHandler /* CAN1 RX1 */
.word CAN1_SCE_IRQHandler /* CAN1 SCE */
.word EXTI9_5_IRQHandler /* External Line[9:5]s */
.word TIM1_BRK_TIM9_IRQHandler /* TIM1 Break and TIM9 */
.word TIM1_UP_TIM10_IRQHandler /* TIM1 Update and TIM10 */
.word TIM1_TRG_COM_TIM11_IRQHandler /* TIM1 Trigger and Commutation and TIM11 */
.word TIM1_CC_IRQHandler /* TIM1 Capture Compare */
.word TIM2_IRQHandler /* TIM2 */
.word TIM3_IRQHandler /* TIM3 */
.word TIM4_IRQHandler /* TIM4 */
.word I2C1_EV_IRQHandler /* I2C1 Event */
.word I2C1_ER_IRQHandler /* I2C1 Error */
.word I2C2_EV_IRQHandler /* I2C2 Event */
.word I2C2_ER_IRQHandler /* I2C2 Error */
.word SPI1_IRQHandler /* SPI1 */
.word SPI2_IRQHandler /* SPI2 */
.word USART1_IRQHandler /* USART1 */
.word USART2_IRQHandler /* USART2 */
.word USART3_IRQHandler /* USART3 */
.word EXTI15_10_IRQHandler /* External Line[15:10]s */
.word RTC_Alarm_IRQHandler /* RTC Alarm (A and B) through EXTI Line */
.word OTG_FS_WKUP_IRQHandler /* USB OTG FS Wakeup through EXTI line */
.word TIM8_BRK_TIM12_IRQHandler /* TIM8 Break and TIM12 */
.word TIM8_UP_TIM13_IRQHandler /* TIM8 Update and TIM13 */
.word TIM8_TRG_COM_TIM14_IRQHandler /* TIM8 Trigger and Commutation and TIM14 */
.word TIM8_CC_IRQHandler /* TIM8 Capture Compare */
.word DMA1_Stream7_IRQHandler /* DMA1 Stream7 */
.word FSMC_IRQHandler /* FSMC */
.word SDIO_IRQHandler /* SDIO */
.word TIM5_IRQHandler /* TIM5 */
.word SPI3_IRQHandler /* SPI3 */
.word UART4_IRQHandler /* UART4 */
.word UART5_IRQHandler /* UART5 */
.word TIM6_DAC_IRQHandler /* TIM6 and DAC1&2 underrun errors */
.word TIM7_IRQHandler /* TIM7 */
.word DMA2_Stream0_IRQHandler /* DMA2 Stream 0 */
.word DMA2_Stream1_IRQHandler /* DMA2 Stream 1 */
.word DMA2_Stream2_IRQHandler /* DMA2 Stream 2 */
.word DMA2_Stream3_IRQHandler /* DMA2 Stream 3 */
.word DMA2_Stream4_IRQHandler /* DMA2 Stream 4 */
.word ETH_IRQHandler /* Ethernet */
.word ETH_WKUP_IRQHandler /* Ethernet Wakeup through EXTI line */
.word CAN2_TX_IRQHandler /* CAN2 TX */
.word CAN2_RX0_IRQHandler /* CAN2 RX0 */
.word CAN2_RX1_IRQHandler /* CAN2 RX1 */
.word CAN2_SCE_IRQHandler /* CAN2 SCE */
.word OTG_FS_IRQHandler /* USB OTG FS */
.word DMA2_Stream5_IRQHandler /* DMA2 Stream 5 */
.word DMA2_Stream6_IRQHandler /* DMA2 Stream 6 */
.word DMA2_Stream7_IRQHandler /* DMA2 Stream 7 */
.word USART6_IRQHandler /* USART6 */
.word I2C3_EV_IRQHandler /* I2C3 event */
.word I2C3_ER_IRQHandler /* I2C3 error */
.word OTG_HS_EP1_OUT_IRQHandler /* USB OTG HS End Point 1 Out */
.word OTG_HS_EP1_IN_IRQHandler /* USB OTG HS End Point 1 In */
.word OTG_HS_WKUP_IRQHandler /* USB OTG HS Wakeup through EXTI */
.word OTG_HS_IRQHandler /* USB OTG HS */
.word DCMI_IRQHandler /* DCMI */
.word CRYP_IRQHandler /* CRYP crypto */
.word HASH_RNG_IRQHandler /* Hash and Rng */
.word FPU_IRQHandler /* FPU */
.word UART7_IRQHandler /* UART7 */
.word UART8_IRQHandler /* UART8 */
.word SPI4_IRQHandler /* SPI4 */
.word SPI5_IRQHandler /* SPI5 */
.word SPI6_IRQHandler /* SPI6 */
.word SAI1_IRQHandler /* SAI1 */
.word LTDC_IRQHandler /* LTDC */
.word LTDC_ER_IRQHandler /* LTDC error */
.word DMA2D_IRQHandler /* DMA2D */
/*******************************************************************************
*
* Provide weak aliases for each Exception handler to the Default_Handler.
* As they are weak aliases, any function with the same name will override
* this definition.
*
*******************************************************************************/
.weak NMI_Handler
.thumb_set NMI_Handler,Default_Handler
.weak HardFault_Handler
.thumb_set HardFault_Handler,Default_Handler
.weak MemManage_Handler
.thumb_set MemManage_Handler,Default_Handler
.weak BusFault_Handler
.thumb_set BusFault_Handler,Default_Handler
.weak UsageFault_Handler
.thumb_set UsageFault_Handler,Default_Handler
.weak SVC_Handler
.thumb_set SVC_Handler,Default_Handler
.weak DebugMon_Handler
.thumb_set DebugMon_Handler,Default_Handler
.weak PendSV_Handler
.thumb_set PendSV_Handler,Default_Handler
.weak SysTick_Handler
.thumb_set SysTick_Handler,Default_Handler
.weak WWDG_IRQHandler
.thumb_set WWDG_IRQHandler,Default_Handler
.weak PVD_IRQHandler
.thumb_set PVD_IRQHandler,Default_Handler
.weak TAMP_STAMP_IRQHandler
.thumb_set TAMP_STAMP_IRQHandler,Default_Handler
.weak RTC_WKUP_IRQHandler
.thumb_set RTC_WKUP_IRQHandler,Default_Handler
.weak FLASH_IRQHandler
.thumb_set FLASH_IRQHandler,Default_Handler
.weak RCC_IRQHandler
.thumb_set RCC_IRQHandler,Default_Handler
.weak EXTI0_IRQHandler
.thumb_set EXTI0_IRQHandler,Default_Handler
.weak EXTI1_IRQHandler
.thumb_set EXTI1_IRQHandler,Default_Handler
.weak EXTI2_IRQHandler
.thumb_set EXTI2_IRQHandler,Default_Handler
.weak EXTI3_IRQHandler
.thumb_set EXTI3_IRQHandler,Default_Handler
.weak EXTI4_IRQHandler
.thumb_set EXTI4_IRQHandler,Default_Handler
.weak DMA1_Stream0_IRQHandler
.thumb_set DMA1_Stream0_IRQHandler,Default_Handler
.weak DMA1_Stream1_IRQHandler
.thumb_set DMA1_Stream1_IRQHandler,Default_Handler
.weak DMA1_Stream2_IRQHandler
.thumb_set DMA1_Stream2_IRQHandler,Default_Handler
.weak DMA1_Stream3_IRQHandler
.thumb_set DMA1_Stream3_IRQHandler,Default_Handler
.weak DMA1_Stream4_IRQHandler
.thumb_set DMA1_Stream4_IRQHandler,Default_Handler
.weak DMA1_Stream5_IRQHandler
.thumb_set DMA1_Stream5_IRQHandler,Default_Handler
.weak DMA1_Stream6_IRQHandler
.thumb_set DMA1_Stream6_IRQHandler,Default_Handler
.weak ADC_IRQHandler
.thumb_set ADC_IRQHandler,Default_Handler
.weak CAN1_TX_IRQHandler
.thumb_set CAN1_TX_IRQHandler,Default_Handler
.weak CAN1_RX0_IRQHandler
.thumb_set CAN1_RX0_IRQHandler,Default_Handler
.weak CAN1_RX1_IRQHandler
.thumb_set CAN1_RX1_IRQHandler,Default_Handler
.weak CAN1_SCE_IRQHandler
.thumb_set CAN1_SCE_IRQHandler,Default_Handler
.weak EXTI9_5_IRQHandler
.thumb_set EXTI9_5_IRQHandler,Default_Handler
.weak TIM1_BRK_TIM9_IRQHandler
.thumb_set TIM1_BRK_TIM9_IRQHandler,Default_Handler
.weak TIM1_UP_TIM10_IRQHandler
.thumb_set TIM1_UP_TIM10_IRQHandler,Default_Handler
.weak TIM1_TRG_COM_TIM11_IRQHandler
.thumb_set TIM1_TRG_COM_TIM11_IRQHandler,Default_Handler
.weak TIM1_CC_IRQHandler
.thumb_set TIM1_CC_IRQHandler,Default_Handler
.weak TIM2_IRQHandler
.thumb_set TIM2_IRQHandler,Default_Handler
.weak TIM3_IRQHandler
.thumb_set TIM3_IRQHandler,Default_Handler
.weak TIM4_IRQHandler
.thumb_set TIM4_IRQHandler,Default_Handler
.weak I2C1_EV_IRQHandler
.thumb_set I2C1_EV_IRQHandler,Default_Handler
.weak I2C1_ER_IRQHandler
.thumb_set I2C1_ER_IRQHandler,Default_Handler
.weak I2C2_EV_IRQHandler
.thumb_set I2C2_EV_IRQHandler,Default_Handler
.weak I2C2_ER_IRQHandler
.thumb_set I2C2_ER_IRQHandler,Default_Handler
.weak SPI1_IRQHandler
.thumb_set SPI1_IRQHandler,Default_Handler
.weak SPI2_IRQHandler
.thumb_set SPI2_IRQHandler,Default_Handler
.weak USART1_IRQHandler
.thumb_set USART1_IRQHandler,Default_Handler
.weak USART2_IRQHandler
.thumb_set USART2_IRQHandler,Default_Handler
.weak USART3_IRQHandler
.thumb_set USART3_IRQHandler,Default_Handler
.weak EXTI15_10_IRQHandler
.thumb_set EXTI15_10_IRQHandler,Default_Handler
.weak RTC_Alarm_IRQHandler
.thumb_set RTC_Alarm_IRQHandler,Default_Handler
.weak OTG_FS_WKUP_IRQHandler
.thumb_set OTG_FS_WKUP_IRQHandler,Default_Handler
.weak TIM8_BRK_TIM12_IRQHandler
.thumb_set TIM8_BRK_TIM12_IRQHandler,Default_Handler
.weak TIM8_UP_TIM13_IRQHandler
.thumb_set TIM8_UP_TIM13_IRQHandler,Default_Handler
.weak TIM8_TRG_COM_TIM14_IRQHandler
.thumb_set TIM8_TRG_COM_TIM14_IRQHandler,Default_Handler
.weak TIM8_CC_IRQHandler
.thumb_set TIM8_CC_IRQHandler,Default_Handler
.weak DMA1_Stream7_IRQHandler
.thumb_set DMA1_Stream7_IRQHandler,Default_Handler
.weak FSMC_IRQHandler
.thumb_set FSMC_IRQHandler,Default_Handler
.weak SDIO_IRQHandler
.thumb_set SDIO_IRQHandler,Default_Handler
.weak TIM5_IRQHandler
.thumb_set TIM5_IRQHandler,Default_Handler
.weak SPI3_IRQHandler
.thumb_set SPI3_IRQHandler,Default_Handler
.weak UART4_IRQHandler
.thumb_set UART4_IRQHandler,Default_Handler
.weak UART5_IRQHandler
.thumb_set UART5_IRQHandler,Default_Handler
.weak TIM6_DAC_IRQHandler
.thumb_set TIM6_DAC_IRQHandler,Default_Handler
.weak TIM7_IRQHandler
.thumb_set TIM7_IRQHandler,Default_Handler
.weak DMA2_Stream0_IRQHandler
.thumb_set DMA2_Stream0_IRQHandler,Default_Handler
.weak DMA2_Stream1_IRQHandler
.thumb_set DMA2_Stream1_IRQHandler,Default_Handler
.weak DMA2_Stream2_IRQHandler
.thumb_set DMA2_Stream2_IRQHandler,Default_Handler
.weak DMA2_Stream3_IRQHandler
.thumb_set DMA2_Stream3_IRQHandler,Default_Handler
.weak DMA2_Stream4_IRQHandler
.thumb_set DMA2_Stream4_IRQHandler,Default_Handler
.weak ETH_IRQHandler
.thumb_set ETH_IRQHandler,Default_Handler
.weak ETH_WKUP_IRQHandler
.thumb_set ETH_WKUP_IRQHandler,Default_Handler
.weak CAN2_TX_IRQHandler
.thumb_set CAN2_TX_IRQHandler,Default_Handler
.weak CAN2_RX0_IRQHandler
.thumb_set CAN2_RX0_IRQHandler,Default_Handler
.weak CAN2_RX1_IRQHandler
.thumb_set CAN2_RX1_IRQHandler,Default_Handler
.weak CAN2_SCE_IRQHandler
.thumb_set CAN2_SCE_IRQHandler,Default_Handler
.weak OTG_FS_IRQHandler
.thumb_set OTG_FS_IRQHandler,Default_Handler
.weak DMA2_Stream5_IRQHandler
.thumb_set DMA2_Stream5_IRQHandler,Default_Handler
.weak DMA2_Stream6_IRQHandler
.thumb_set DMA2_Stream6_IRQHandler,Default_Handler
.weak DMA2_Stream7_IRQHandler
.thumb_set DMA2_Stream7_IRQHandler,Default_Handler
.weak USART6_IRQHandler
.thumb_set USART6_IRQHandler,Default_Handler
.weak I2C3_EV_IRQHandler
.thumb_set I2C3_EV_IRQHandler,Default_Handler
.weak I2C3_ER_IRQHandler
.thumb_set I2C3_ER_IRQHandler,Default_Handler
.weak OTG_HS_EP1_OUT_IRQHandler
.thumb_set OTG_HS_EP1_OUT_IRQHandler,Default_Handler
.weak OTG_HS_EP1_IN_IRQHandler
.thumb_set OTG_HS_EP1_IN_IRQHandler,Default_Handler
.weak OTG_HS_WKUP_IRQHandler
.thumb_set OTG_HS_WKUP_IRQHandler,Default_Handler
.weak OTG_HS_IRQHandler
.thumb_set OTG_HS_IRQHandler,Default_Handler
.weak DCMI_IRQHandler
.thumb_set DCMI_IRQHandler,Default_Handler
.weak CRYP_IRQHandler
.thumb_set CRYP_IRQHandler,Default_Handler
.weak HASH_RNG_IRQHandler
.thumb_set HASH_RNG_IRQHandler,Default_Handler
.weak FPU_IRQHandler
.thumb_set FPU_IRQHandler,Default_Handler
.weak UART7_IRQHandler
.thumb_set UART7_IRQHandler,Default_Handler
.weak UART8_IRQHandler
.thumb_set UART8_IRQHandler,Default_Handler
.weak SPI4_IRQHandler
.thumb_set SPI4_IRQHandler,Default_Handler
.weak SPI5_IRQHandler
.thumb_set SPI5_IRQHandler,Default_Handler
.weak SPI6_IRQHandler
.thumb_set SPI6_IRQHandler,Default_Handler
.weak SAI1_IRQHandler
.thumb_set SAI1_IRQHandler,Default_Handler
.weak LTDC_IRQHandler
.thumb_set LTDC_IRQHandler,Default_Handler
.weak LTDC_ER_IRQHandler
.thumb_set LTDC_ER_IRQHandler,Default_Handler
.weak DMA2D_IRQHandler
.thumb_set DMA2D_IRQHandler,Default_Handler
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
| {
"pile_set_name": "Github"
} |
name: Execute tests
on:
push:
branches:
- master
tags-ignore:
- '**'
pull_request:
jobs: # Docs: <https://help.github.com/en/articles/workflow-syntax-for-github-actions>
tests:
name: PHP ${{ matrix.php }}, ${{ matrix.setup }} setup
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
setup: ['basic', 'lowest']
php: ['7.1', '7.2', '7.3', '7.4']
include:
- php: '7.1'
setup: 'basic'
coverage: 'true'
- php: '7.4'
setup: 'basic'
coverage: 'true'
steps:
- name: Check out code
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@master # Action page: <https://github.com/shivammathur/setup-php>
with:
php-version: ${{ matrix.php }}
extensions: mbstring, pdo, pdo_sqlite, sqlite3 # definition is required for php 7.4
- name: Get Composer Cache Directory # Docs: <https://github.com/actions/cache/blob/master/examples.md#php---composer>
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies # Docs: <https://github.com/actions/cache/blob/master/examples.md#php---composer>
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install Composer 'hirak/prestissimo' package
run: composer global require hirak/prestissimo --update-no-dev
- name: Install lowest Composer dependencies
if: matrix.setup == 'lowest'
run: composer update --prefer-dist --no-interaction --no-suggest --prefer-lowest
- name: Install basic Composer dependencies
if: matrix.setup == 'basic'
run: composer update --prefer-dist --no-interaction --no-suggest
- name: Show most important packages versions
run: composer info | grep -e laravel/laravel -e phpunit/phpunit -e phpstan/phpstan
- name: Execute tests
if: matrix.coverage != 'true'
run: composer test
- name: Execute tests with code coverage
if: matrix.coverage == 'true'
run: composer test-cover
- uses: codecov/codecov-action@v1 # Docs: <https://github.com/codecov/codecov-action>
if: matrix.coverage == 'true'
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage/clover.xml
fail_ci_if_error: false
lint-changelog:
name: Lint changelog file
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Lint changelog file
uses: docker://avtodev/markdown-lint:v1 # Action page: <https://github.com/avto-dev/markdown-lint>
with:
rules: '/lint/rules/changelog.js'
config: '/lint/config/changelog.yml'
args: './CHANGELOG.md'
| {
"pile_set_name": "Github"
} |
<?php
/**
* Copyright 2011 Bas de Nooijer. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this listof conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are
* those of the authors and should not be interpreted as representing official
* policies, either expressed or implied, of the copyright holder.
*
* @copyright Copyright 2011 Bas de Nooijer <solarium@raspberry.nl>
* @license http://github.com/basdenooijer/solarium/raw/master/COPYING
* @link http://www.solarium-project.org/
*/
/**
* @namespace
*/
namespace Solarium\QueryType\Update\Query;
use Solarium\Core\Client\Client;
use Solarium\Core\Query\Query as BaseQuery;
use Solarium\QueryType\Update\RequestBuilder;
use Solarium\QueryType\Update\ResponseParser;
use Solarium\Exception\RuntimeException;
use Solarium\Exception\InvalidArgumentException;
use Solarium\QueryType\Update\Query\Command\Command;
use Solarium\QueryType\Update\Query\Command\Add as AddCommand;
use Solarium\QueryType\Update\Query\Command\Commit as CommitCommand;
use Solarium\QueryType\Update\Query\Command\Delete as DeleteCommand;
use Solarium\QueryType\Update\Query\Command\Optimize as OptimizeCommand;
use Solarium\QueryType\Update\Query\Command\Rollback as RollbackCommand;
use Solarium\QueryType\Update\Query\Document\DocumentInterface;
/**
* Update query
*
* Can be used to send multiple update commands to solr, e.g. add, delete,
* rollback, commit, optimize.
* Multiple commands of any type can be combined into a single update query.
*/
class Query extends BaseQuery
{
/**
* Update command add
*/
const COMMAND_ADD = 'add';
/**
* Update command delete
*/
const COMMAND_DELETE = 'delete';
/**
* Update command commit
*/
const COMMAND_COMMIT = 'commit';
/**
* Update command rollback
*/
const COMMAND_ROLLBACK = 'rollback';
/**
* Update command optimize
*/
const COMMAND_OPTIMIZE = 'optimize';
/**
* Update command types
*
* @var array
*/
protected $commandTypes = array(
self::COMMAND_ADD => 'Solarium\QueryType\Update\Query\Command\Add',
self::COMMAND_DELETE => 'Solarium\QueryType\Update\Query\Command\Delete',
self::COMMAND_COMMIT => 'Solarium\QueryType\Update\Query\Command\Commit',
self::COMMAND_OPTIMIZE => 'Solarium\QueryType\Update\Query\Command\Optimize',
self::COMMAND_ROLLBACK => 'Solarium\QueryType\Update\Query\Command\Rollback',
);
/**
* Default options
*
* @var array
*/
protected $options = array(
'handler' => 'update',
'resultclass' => 'Solarium\QueryType\Update\Result',
'documentclass' => 'Solarium\QueryType\Update\Query\Document\Document',
'omitheader' => false,
);
/**
* Array of commands
*
* The commands will be executed in the order of this array, this can be
* important in some cases. For instance a rollback.
*
* @var Command[]
*/
protected $commands = array();
/**
* Get type for this query
*
* @return string
*/
public function getType()
{
return Client::QUERY_UPDATE;
}
/**
* Get a requestbuilder for this query
*
* @return RequestBuilder
*/
public function getRequestBuilder()
{
return new RequestBuilder;
}
/**
* Get a response parser for this query
*
* @return ResponseParser
*/
public function getResponseParser()
{
return new ResponseParser;
}
/**
* Initialize options
*
* Several options need some extra checks or setup work, for these options
* the setters are called.
*
* @throws RuntimeException
* @return void
*/
protected function init()
{
if (isset($this->options['command'])) {
foreach ($this->options['command'] as $key => $value) {
$type = $value['type'];
if ($type == self::COMMAND_ADD) {
throw new RuntimeException(
"Adding documents is not supported in configuration, use the API for this"
);
}
$this->add($key, $this->createCommand($type, $value));
}
}
}
/**
* Create a command instance
*
* @throws InvalidArgumentException
* @param string $type
* @param mixed $options
* @return Command
*/
public function createCommand($type, $options = null)
{
$type = strtolower($type);
if (!isset($this->commandTypes[$type])) {
throw new InvalidArgumentException("Update commandtype unknown: " . $type);
}
$class = $this->commandTypes[$type];
return new $class($options);
}
/**
* Get all commands for this update query
*
* @return Command[]
*/
public function getCommands()
{
return $this->commands;
}
/**
* Add a command to this update query
*
* The command must be an instance of one of the Solarium\QueryType\Update_*
* classes.
*
* @param string $key
* @param object $command
* @return self Provides fluent interface
*/
public function add($key, $command)
{
if (0 !== strlen($key)) {
$this->commands[$key] = $command;
} else {
$this->commands[] = $command;
}
return $this;
}
/**
* Remove a command
*
* You can remove a command by passing its key or by passing the command instance.
*
* @param string|\Solarium\QueryType\Update\Query\Command\Command $command
* @return self Provides fluent interface
*/
public function remove($command)
{
if (is_object($command)) {
foreach ($this->commands as $key => $instance) {
if ($instance === $command) {
unset($this->commands[$key]);
break;
}
}
} else {
if (isset($this->commands[$command])) {
unset($this->commands[$command]);
}
}
return $this;
}
/**
* Convenience method for adding a rollback command
*
* If you need more control, like choosing a key for the command you need to
* create you own command instance and use the add method.
*
* @return self Provides fluent interface
*/
public function addRollback()
{
return $this->add(null, new RollbackCommand);
}
/**
* Convenience method for adding a delete query command
*
* If you need more control, like choosing a key for the command you need to
* create you own command instance and use the add method.
*
* @param string $query
* @param array $bind Bind values for placeholders in the query string
* @return self Provides fluent interface
*/
public function addDeleteQuery($query, $bind = null)
{
if (!is_null($bind)) {
$query = $this->getHelper()->assemble($query, $bind);
}
$delete = new DeleteCommand;
$delete->addQuery($query);
return $this->add(null, $delete);
}
/**
* Convenience method to add a multi delete query command
*
* If you need more control, like choosing a key for the command you need to
* create you own command instance and use the add method.
*
* @param array $queries
* @return self Provides fluent interface
*/
public function addDeleteQueries($queries)
{
$delete = new DeleteCommand;
$delete->addQueries($queries);
return $this->add(null, $delete);
}
/**
* Convenience method to add a delete by ID command
*
* If you need more control, like choosing a key for the command you need to
* create you own command instance and use the add method.
*
* @param int|string $id
* @return self Provides fluent interface
*/
public function addDeleteById($id)
{
$delete = new DeleteCommand;
$delete->addId($id);
return $this->add(null, $delete);
}
/**
* Convenience method to add a delete by IDs command
*
* If you need more control, like choosing a key for the command you need to
* create you own command instance and use the add method.
*
* @param array $ids
* @return self Provides fluent interface
*/
public function addDeleteByIds($ids)
{
$delete = new DeleteCommand;
$delete->addIds($ids);
return $this->add(null, $delete);
}
/**
* Convenience method to add a 'add document' command
*
* If you need more control, like choosing a key for the command you need to
* create you own command instance and use the add method.
*
* @param DocumentInterface $document
* @param boolean $overwrite
* @param int $commitWithin
* @return self Provides fluent interface
*/
public function addDocument(DocumentInterface $document, $overwrite = null, $commitWithin = null)
{
return $this->addDocuments(array($document), $overwrite, $commitWithin);
}
/**
* Convenience method to add a 'add documents' command
*
* If you need more control, like choosing a key for the command you need to
* create you own command instance and use the add method.
*
* @param array $documents
* @param boolean $overwrite
* @param int $commitWithin
* @return self Provides fluent interface
*/
public function addDocuments($documents, $overwrite = null, $commitWithin = null)
{
$add = new AddCommand;
if (null !== $overwrite) {
$add->setOverwrite($overwrite);
}
if (null !== $commitWithin) {
$add->setCommitWithin($commitWithin);
}
$add->addDocuments($documents);
return $this->add(null, $add);
}
/**
* Convenience method to add a commit command
*
* If you need more control, like choosing a key for the command you need to
* create you own command instance and use the add method.
*
* @param boolean $softCommit
* @param boolean $waitSearcher
* @param boolean $expungeDeletes
* @return self Provides fluent interface
*/
public function addCommit($softCommit = null, $waitSearcher = null, $expungeDeletes = null)
{
$commit = new CommitCommand();
if (null !== $softCommit) {
$commit->setSoftCommit($softCommit);
}
if (null !== $waitSearcher) {
$commit->setWaitSearcher($waitSearcher);
}
if (null !== $expungeDeletes) {
$commit->setExpungeDeletes($expungeDeletes);
}
return $this->add(null, $commit);
}
/**
* Convenience method to add an optimize command
*
* If you need more control, like choosing a key for the command you need to
* create you own command instance and use the add method.
*
* @param boolean $softCommit
* @param boolean $waitSearcher
* @param int $maxSegments
* @return self Provides fluent interface
*/
public function addOptimize($softCommit = null, $waitSearcher = null, $maxSegments = null)
{
$optimize = new OptimizeCommand();
if (null !== $softCommit) {
$optimize->setSoftCommit($softCommit);
}
if (null !== $waitSearcher) {
$optimize->setWaitSearcher($waitSearcher);
}
if (null !== $maxSegments) {
$optimize->setMaxSegments($maxSegments);
}
return $this->add(null, $optimize);
}
/**
* Set a custom document class for use in the createDocument method
*
* This class should implement the document interface
*
* @param string $value classname
* @return self Provides fluent interface
*/
public function setDocumentClass($value)
{
return $this->setOption('documentclass', $value);
}
/**
* Get the current documentclass option
*
* The value is a classname, not an instance
*
* @return string
*/
public function getDocumentClass()
{
return $this->getOption('documentclass');
}
/**
* Create a document object instance
*
* You can optionally directly supply the fields and boosts
* to get a ready-made document instance for direct use in an add command
*
* @since 2.1.0
*
* @param array $fields
* @param array $boosts
* @param array $modifiers
* @return DocumentInterface
*/
public function createDocument($fields = array(), $boosts = array(), $modifiers = array())
{
$class = $this->getDocumentClass();
return new $class($fields, $boosts, $modifiers);
}
}
| {
"pile_set_name": "Github"
} |
package io.quarkus.it.elasticsearch;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import org.apache.http.util.EntityUtils;
import org.elasticsearch.client.Request;
import org.elasticsearch.client.Response;
import org.elasticsearch.client.RestClient;
import io.vertx.core.json.JsonArray;
import io.vertx.core.json.JsonObject;
@ApplicationScoped
public class FruitService {
@Inject
RestClient restClient;
public void index(Fruit fruit) throws IOException {
Request request = new Request(
"PUT",
"/fruits/_doc/" + fruit.id);
request.setJsonEntity(JsonObject.mapFrom(fruit).toString());
restClient.performRequest(request);
}
public Fruit get(String id) throws IOException {
Request request = new Request(
"GET",
"/fruits/_doc/" + id);
Response response = restClient.performRequest(request);
String responseBody = EntityUtils.toString(response.getEntity());
JsonObject json = new JsonObject(responseBody);
return json.getJsonObject("_source").mapTo(Fruit.class);
}
public List<Fruit> searchByColor(String color) throws IOException {
return search("color", color);
}
public List<Fruit> searchByName(String name) throws IOException {
return search("name", name);
}
private List<Fruit> search(String term, String match) throws IOException {
Request request = new Request(
"GET",
"/fruits/_search");
//construct a JSON query like {"query": {"match": {"<term>": "<match"}}
JsonObject termJson = new JsonObject().put(term, match);
JsonObject matchJson = new JsonObject().put("match", termJson);
JsonObject queryJson = new JsonObject().put("query", matchJson);
request.setJsonEntity(queryJson.encode());
Response response = restClient.performRequest(request);
String responseBody = EntityUtils.toString(response.getEntity());
JsonObject json = new JsonObject(responseBody);
JsonArray hits = json.getJsonObject("hits").getJsonArray("hits");
List<Fruit> results = new ArrayList<>(hits.size());
for (int i = 0; i < hits.size(); i++) {
JsonObject hit = hits.getJsonObject(i);
Fruit fruit = hit.getJsonObject("_source").mapTo(Fruit.class);
results.add(fruit);
}
return results;
}
}
| {
"pile_set_name": "Github"
} |
//
// Generated by class-dump 3.5 (64 bit) (Debug version compiled Jun 9 2015 22:53:21).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2014 by Steve Nygard.
//
#import <objc/NSObject.h>
@class ICPPhotoStreamLibrary, ICPSharedPhotoStreamService, ICPTaskQueue, NSError, NSMutableDictionary, NSURL;
@interface ICPSharedPhotoStreamLibraryManager : NSObject
{
NSURL *_libraryURL;
ICPPhotoStreamLibrary *_library;
NSError *_libraryError;
long long _state;
ICPSharedPhotoStreamService *_sharedStreamService;
ICPTaskQueue *_taskQueue;
NSMutableDictionary *_knownImportRequestAssetCollectionIdentifiers;
}
@property(retain) NSMutableDictionary *knownImportRequestAssetCollectionIdentifiers; // @synthesize knownImportRequestAssetCollectionIdentifiers=_knownImportRequestAssetCollectionIdentifiers;
@property(retain) ICPTaskQueue *taskQueue; // @synthesize taskQueue=_taskQueue;
@property __weak ICPSharedPhotoStreamService *sharedStreamService; // @synthesize sharedStreamService=_sharedStreamService;
@property long long state; // @synthesize state=_state;
@property(retain) NSError *libraryError; // @synthesize libraryError=_libraryError;
@property(retain) ICPPhotoStreamLibrary *library; // @synthesize library=_library;
@property(retain) NSURL *libraryURL; // @synthesize libraryURL=_libraryURL;
- (void).cxx_destruct;
- (id)versionModelIdsForMediaItemIdentifiers:(id)arg1;
- (id)albumModelIdsForSharedStreamsWithIdentifiers:(id)arg1;
- (id)assetFileBookmarkDataForMediaItemWithIdentifier:(id)arg1;
- (void)deleteVersionsWithMediaItemIdentifiers:(id)arg1 reply:(CDUnknownBlockType)arg2;
- (void)importAssets:(id)arg1 completionHandler:(CDUnknownBlockType)arg2;
- (void)clearAccountDependentState;
- (void)removeKnownImportRequestAssetCollectionIdentifiersForIdentifiers:(id)arg1;
- (void)clearKnownImportRequestAssetCollectionIdentifiers;
- (void)expireKnownImportRequestAssetCollectionIdentifiers;
- (BOOL)checkAndNotePendingImportRequest:(id)arg1;
- (void)_importDownloadedAssetsForRebuild:(BOOL)arg1 modelStreamIdentifiers:(id)arg2 completionHandler:(CDUnknownBlockType)arg3;
- (void)_importDownloadedAssetsForRebuild:(BOOL)arg1 completionHandler:(CDUnknownBlockType)arg2;
- (void)_resortContentOfStreamsWithIdentifiers:(id)arg1 completionHandler:(CDUnknownBlockType)arg2;
- (void)updateContentListForAlbumsForRebuild:(BOOL)arg1 completionHandler:(CDUnknownBlockType)arg2;
- (id)_persistedMetadataLibraryUpdateTasksForStreamInfo:(id)arg1 currentProperties:(id)arg2;
- (void)updateAlbumListWithCompletionHandler:(CDUnknownBlockType)arg1;
- (void)requestAlbumListUpdateWithCompletionHandler:(CDUnknownBlockType)arg1;
- (void)deleteLibraryWithCompletionHandler:(CDUnknownBlockType)arg1;
- (void)closeLibraryWithCompletionHandler:(CDUnknownBlockType)arg1;
- (void)openLibraryWithCompletionHandler:(CDUnknownBlockType)arg1;
- (id)initWithLibraryURL:(id)arg1 sharedStreamService:(id)arg2;
@end
| {
"pile_set_name": "Github"
} |
type=item
items=minecraft:glowstone_dust
nbt.display.Name=ipattern:*golden powder* | {
"pile_set_name": "Github"
} |
'use strict';
var test = require('tape');
var dragula = require('..');
test('public api matches expectation', function (t) {
t.equal(typeof dragula, 'function', 'dragula is a function');
t.end();
});
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Copyright (C) 2014 - Open Source Geospatial Foundation. All rights reserved.
This code is licensed under the GPL 2.0 license, available at the root
application directory.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-wps</artifactId>
<version>2.19-SNAPSHOT</version>
</parent>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-web-wps</artifactId>
<packaging>jar</packaging>
<name>Web Processing Service GUI</name>
<dependencies>
<dependency>
<groupId>org.geoserver.web</groupId>
<artifactId>gs-web-demo</artifactId>
<version>${gs.version}</version>
</dependency>
<dependency>
<groupId>org.geoserver.web</groupId>
<artifactId>gs-web-sec-core</artifactId>
<version>${gs.version}</version>
</dependency>
<dependency>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-wps-core</artifactId>
<version>${gs.version}</version>
</dependency>
<dependency>
<groupId>xalan</groupId>
<artifactId>serializer</artifactId>
</dependency>
<dependency>
<groupId>org.geoserver.web</groupId>
<artifactId>gs-web-core</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
<version>${gs.version}</version>
</dependency>
<dependency>
<groupId>org.geoserver</groupId>
<artifactId>gs-main</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
<version>${gs.version}</version>
</dependency>
<dependency>
<groupId>xmlunit</groupId>
<artifactId>xmlunit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.wicket</groupId>
<artifactId>wicket-extensions</artifactId>
</dependency>
<dependency>
<groupId>org.geoserver.extension</groupId>
<artifactId>gs-wps-core</artifactId>
<classifier>tests</classifier>
<scope>test</scope>
<version>${gs.version}</version>
</dependency>
</dependencies>
</project>
| {
"pile_set_name": "Github"
} |
/*
Copyright (C) 2017 Red Hat, 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.
*/
package hostfolder
import (
"github.com/minishift/minishift/pkg/util/os/atexit"
"github.com/spf13/cobra"
)
var removeCmd = &cobra.Command{
Use: "remove HOST_FOLDER_NAME",
Short: "Removes the specified host folder config.",
Long: `Removes the specified host folder config. This command does not remove the host folder or any data.`,
Run: func(cmd *cobra.Command, args []string) {
if len(args) < 1 {
atexit.ExitWithMessage(1, "Usage: minishift hostfolder remove HOST_FOLDER_NAME")
}
hostFolderManager := getHostFolderManager()
name := args[0]
err := hostFolderManager.Remove(name)
if err != nil {
atexit.ExitWithMessage(1, err.Error())
}
},
}
func init() {
HostFolderCmd.AddCommand(removeCmd)
}
| {
"pile_set_name": "Github"
} |
title: Project scanner
summary: Scans repository for iOS, macOS, Android, Xamarin, Fastlane and Cordova projects
description: |-
For iOS and macOS projects detects CocoaPods and scan Xcode project files
for valid Xcode command line configurations.
For Android projects checks for build.gradle files and lists all the gradle tasks,
also checks for gradlew file.
For Xamarin projects checks the solution files and lists the configuration options,
also checks for NuGet and Xamarin Components packages.
For Cordova projects checks for config.xml file.
For Fastlane detects Fastfile and lists the available lanes.
website: https://github.com/bitrise-steplib/steps-project-scanner
source_code_url: https://github.com/bitrise-steplib/steps-project-scanner
support_url: https://github.com/bitrise-steplib/steps-project-scanner/issues
published_at: 2017-05-08T15:49:22.662177256+02:00
source:
git: https://github.com/bitrise-steplib/steps-project-scanner.git
commit: ae18afc82fb5424f2aeb995161b0d905a77e5b83
type_tags:
- utility
is_requires_admin_user: false
is_always_run: false
is_skippable: false
inputs:
- opts:
is_required: true
title: Directory to scan.
scan_dir: $BITRISE_SOURCE_DIR
- opts:
is_required: true
title: Directory to save scan results.
output_dir: $BITRISE_SOURCE_DIR/scan_result
- opts:
description: |
If provided, the scan results will be sent to the given
URL, with a POST request.
is_dont_change_value: true
title: POST url to send the scan results to
scan_result_submit_url: $BITRISE_SCAN_RESULT_POST_URL
- opts:
description: |
If provided and `scan_result_submit_url` also provided,
this API Token will be used for sending the Scan Results.
is_dont_change_value: true
title: API Token for scan result submission
scan_result_submit_api_token: $BITRISE_APP_API_TOKEN
| {
"pile_set_name": "Github"
} |
/*
* Copyright (C) 2012 Facebook, 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.
*/
package com.facebook.swift.codec.recursion;
import com.facebook.swift.codec.ThriftField;
import com.facebook.swift.codec.ThriftStruct;
import java.util.List;
import java.util.Objects;
@ThriftStruct
public class ViaNestedListElementType
{
@ThriftField(value = 1)
public List<List<ViaNestedListElementType>> children;
@ThriftField(2)
public String data;
@Override
public boolean equals(Object obj)
{
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
final ViaNestedListElementType that = (ViaNestedListElementType) obj;
return Objects.equals(data, that.data) &&
Objects.equals(children, that.children);
}
}
| {
"pile_set_name": "Github"
} |
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
// The Blank Application template is documented at http://go.microsoft.com/fwlink/?LinkId=402347&clcid=0x409
namespace AppServicesClientApp
{
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
sealed partial class App : Application
{
/// <summary>
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
public App()
{
this.InitializeComponent();
this.Suspending += OnSuspending;
}
/// <summary>
/// Invoked when the application is launched normally by the end user. Other entry points
/// will be used such as when the application is launched to open a specific file.
/// </summary>
/// <param name="e">Details about the launch request and process.</param>
protected override void OnLaunched(LaunchActivatedEventArgs e)
{
#if DEBUG
if (System.Diagnostics.Debugger.IsAttached)
{
this.DebugSettings.EnableFrameRateCounter = true;
}
#endif
Frame rootFrame = Window.Current.Content as Frame;
// Do not repeat app initialization when the Window already has content,
// just ensure that the window is active
if (rootFrame == null)
{
// Create a Frame to act as the navigation context and navigate to the first page
rootFrame = new Frame();
// Set the default language
rootFrame.Language = Windows.Globalization.ApplicationLanguages.Languages[0];
rootFrame.NavigationFailed += OnNavigationFailed;
if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
{
//TODO: Load state from previously suspended application
}
// Place the frame in the current Window
Window.Current.Content = rootFrame;
}
if (rootFrame.Content == null)
{
// When the navigation stack isn't restored navigate to the first page,
// configuring the new page by passing required information as a navigation
// parameter
rootFrame.Navigate(typeof(MainPage), e.Arguments);
}
// Ensure the current window is active
Window.Current.Activate();
}
/// <summary>
/// Invoked when Navigation to a certain page fails
/// </summary>
/// <param name="sender">The Frame which failed navigation</param>
/// <param name="e">Details about the navigation failure</param>
void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
{
throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
}
/// <summary>
/// Invoked when application execution is being suspended. Application state is saved
/// without knowing whether the application will be terminated or resumed with the contents
/// of memory still intact.
/// </summary>
/// <param name="sender">The source of the suspend request.</param>
/// <param name="e">Details about the suspend request.</param>
private void OnSuspending(object sender, SuspendingEventArgs e)
{
var deferral = e.SuspendingOperation.GetDeferral();
//TODO: Save application state and stop any background activity
deferral.Complete();
}
}
}
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" ?>
<annotation>
<folder>widerface</folder>
<filename>2--Demonstration_2_Demonstration_Protesters_2_858.jpg</filename>
<source>
<database>wider face Database</database>
<annotation>PASCAL VOC2007</annotation>
<image>flickr</image>
<flickrid>-1</flickrid>
</source>
<owner>
<flickrid>yanyu</flickrid>
<name>yanyu</name>
</owner>
<size>
<width>1024</width>
<height>768</height>
<depth>3</depth>
</size>
<segmented>0</segmented>
<object>
<name>face</name>
<pose>Unspecified</pose>
<truncated>1</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>804</xmin>
<ymin>380</ymin>
<xmax>820</xmax>
<ymax>396</ymax>
</bndbox>
<lm>
<x1>808.714</x1>
<y1>384.786</y1>
<x2>815.25</x2>
<y2>384.036</y2>
<x3>813.536</x3>
<y3>387.679</y3>
<x4>808.5</x4>
<y4>391.0</y4>
<x5>814.393</x5>
<y5>390.679</y5>
<visible>1</visible>
<blur>0.49</blur>
</lm>
<has_lm>1</has_lm>
</object>
<object>
<name>face</name>
<pose>Unspecified</pose>
<truncated>1</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>775</xmin>
<ymin>395</ymin>
<xmax>790</xmax>
<ymax>411</ymax>
</bndbox>
<lm>
<x1>777.482</x1>
<y1>398.804</y1>
<x2>783.129</x2>
<y2>398.393</y2>
<x3>778.406</x3>
<y3>402.603</y3>
<x4>777.996</x4>
<y4>406.812</y4>
<x5>781.795</x5>
<y5>407.121</y5>
<visible>1</visible>
<blur>0.4</blur>
</lm>
<has_lm>1</has_lm>
</object>
<object>
<name>face</name>
<pose>Unspecified</pose>
<truncated>1</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>720</xmin>
<ymin>383</ymin>
<xmax>738</xmax>
<ymax>405</ymax>
</bndbox>
<lm>
<x1>723.714</x1>
<y1>390.714</y1>
<x2>730.714</x2>
<y2>389.714</y2>
<x3>725.714</x3>
<y3>393.857</y3>
<x4>726.571</x4>
<y4>397.714</y4>
<x5>730.714</x5>
<y5>397.714</y5>
<visible>0</visible>
<blur>0.51</blur>
</lm>
<has_lm>1</has_lm>
</object>
<object>
<name>face</name>
<pose>Unspecified</pose>
<truncated>1</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>699</xmin>
<ymin>369</ymin>
<xmax>715</xmax>
<ymax>386</ymax>
</bndbox>
<lm>
<x1>705.103</x1>
<y1>377.281</y1>
<x2>710.348</x2>
<y2>374.379</y2>
<x3>709.121</x3>
<y3>378.286</y3>
<x4>709.902</x4>
<y4>382.415</y4>
<x5>712.692</x5>
<y5>380.295</y5>
<visible>0</visible>
<blur>0.4</blur>
</lm>
<has_lm>1</has_lm>
</object>
<object>
<name>face</name>
<pose>Unspecified</pose>
<truncated>1</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>653</xmin>
<ymin>359</ymin>
<xmax>676</xmax>
<ymax>392</ymax>
</bndbox>
<lm>
<x1>654.219</x1>
<y1>372.772</y1>
<x2>665.339</x2>
<y2>372.353</y2>
<x3>653.799</x3>
<y3>376.339</y3>
<x4>655.688</x4>
<y4>384.312</y4>
<x5>661.772</x5>
<y5>384.312</y5>
<visible>0</visible>
<blur>0.54</blur>
</lm>
<has_lm>1</has_lm>
</object>
<object>
<name>face</name>
<pose>Unspecified</pose>
<truncated>1</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>631</xmin>
<ymin>349</ymin>
<xmax>657</xmax>
<ymax>379</ymax>
</bndbox>
<has_lm>0</has_lm>
</object>
<object>
<name>face</name>
<pose>Unspecified</pose>
<truncated>1</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>572</xmin>
<ymin>380</ymin>
<xmax>592</xmax>
<ymax>400</ymax>
</bndbox>
<lm>
<x1>576.545</x1>
<y1>389.804</y1>
<x2>581.768</x2>
<y2>389.402</y2>
<x3>578.018</x3>
<y3>394.089</y3>
<x4>578.152</x4>
<y4>396.768</y4>
<x5>582.839</x5>
<y5>395.964</y5>
<visible>0</visible>
<blur>0.47</blur>
</lm>
<has_lm>1</has_lm>
</object>
<object>
<name>face</name>
<pose>Unspecified</pose>
<truncated>1</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>519</xmin>
<ymin>357</ymin>
<xmax>540</xmax>
<ymax>391</ymax>
</bndbox>
<lm>
<x1>524.469</x1>
<y1>368.469</y1>
<x2>525.344</x2>
<y2>368.25</y2>
<x3>522.062</x3>
<y3>376.781</y3>
<x4>526.656</x4>
<y4>382.031</y4>
<x5>527.094</x5>
<y5>382.031</y5>
<visible>1</visible>
<blur>0.43</blur>
</lm>
<has_lm>1</has_lm>
</object>
<object>
<name>face</name>
<pose>Unspecified</pose>
<truncated>1</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>507</xmin>
<ymin>374</ymin>
<xmax>521</xmax>
<ymax>392</ymax>
</bndbox>
<lm>
<x1>510.987</x1>
<y1>379.004</y1>
<x2>517.616</x2>
<y2>378.763</y2>
<x3>514.723</x3>
<y3>383.344</y3>
<x4>511.71</x4>
<y4>386.478</y4>
<x5>517.134</x5>
<y5>385.875</y5>
<visible>1</visible>
<blur>0.48</blur>
</lm>
<has_lm>1</has_lm>
</object>
<object>
<name>face</name>
<pose>Unspecified</pose>
<truncated>1</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>598</xmin>
<ymin>384</ymin>
<xmax>610</xmax>
<ymax>399</ymax>
</bndbox>
<has_lm>0</has_lm>
</object>
<object>
<name>face</name>
<pose>Unspecified</pose>
<truncated>1</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>419</xmin>
<ymin>348</ymin>
<xmax>446</xmax>
<ymax>379</ymax>
</bndbox>
<lm>
<x1>428.786</x1>
<y1>357.076</y1>
<x2>430.996</x2>
<y2>358.08</y2>
<x3>427.781</x3>
<y3>362.098</y3>
<x4>428.585</x4>
<y4>367.121</y4>
<x5>430.594</x5>
<y5>368.125</y5>
<visible>1</visible>
<blur>0.5</blur>
</lm>
<has_lm>1</has_lm>
</object>
<object>
<name>face</name>
<pose>Unspecified</pose>
<truncated>1</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>377</xmin>
<ymin>366</ymin>
<xmax>404</xmax>
<ymax>392</ymax>
</bndbox>
<lm>
<x1>383.384</x1>
<y1>372.902</y1>
<x2>388.812</x2>
<y2>373.071</y2>
<x3>381.348</x3>
<y3>379.009</y3>
<x4>384.741</x4>
<y4>384.098</y4>
<x5>389.491</x5>
<y5>383.929</y5>
<visible>0</visible>
<blur>0.54</blur>
</lm>
<has_lm>1</has_lm>
</object>
<object>
<name>face</name>
<pose>Unspecified</pose>
<truncated>1</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>329</xmin>
<ymin>376</ymin>
<xmax>345</xmax>
<ymax>400</ymax>
</bndbox>
<has_lm>0</has_lm>
</object>
<object>
<name>face</name>
<pose>Unspecified</pose>
<truncated>1</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>284</xmin>
<ymin>364</ymin>
<xmax>304</xmax>
<ymax>390</ymax>
</bndbox>
<has_lm>0</has_lm>
</object>
<object>
<name>face</name>
<pose>Unspecified</pose>
<truncated>1</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>260</xmin>
<ymin>366</ymin>
<xmax>281</xmax>
<ymax>401</ymax>
</bndbox>
<has_lm>0</has_lm>
</object>
<object>
<name>face</name>
<pose>Unspecified</pose>
<truncated>1</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>222</xmin>
<ymin>360</ymin>
<xmax>241</xmax>
<ymax>391</ymax>
</bndbox>
<has_lm>0</has_lm>
</object>
<object>
<name>face</name>
<pose>Unspecified</pose>
<truncated>1</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>97</xmin>
<ymin>346</ymin>
<xmax>118</xmax>
<ymax>383</ymax>
</bndbox>
<lm>
<x1>101.321</x1>
<y1>360.424</y1>
<x2>108.42</x2>
<y2>361.134</y2>
<x3>99.665</x3>
<y3>365.866</y3>
<x4>104.634</x4>
<y4>373.674</y4>
<x5>109.839</x5>
<y5>373.438</y5>
<visible>0</visible>
<blur>0.53</blur>
</lm>
<has_lm>1</has_lm>
</object>
<object>
<name>face</name>
<pose>Unspecified</pose>
<truncated>1</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>8</xmin>
<ymin>353</ymin>
<xmax>37</xmax>
<ymax>387</ymax>
</bndbox>
<lm>
<x1>15.357</x1>
<y1>364.071</y1>
<x2>28.0</x2>
<y2>363.214</y2>
<x3>19.214</x3>
<y3>369.857</y3>
<x4>19.429</x4>
<y4>377.357</y4>
<x5>26.5</x5>
<y5>377.143</y5>
<visible>1</visible>
<blur>0.54</blur>
</lm>
<has_lm>1</has_lm>
</object>
</annotation>
| {
"pile_set_name": "Github"
} |
/*
*
* mdp - make dummy policy
*
* When pointed at a kernel tree, builds a dummy policy for that kernel
* with exactly one type with full rights to itself.
*
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* Copyright (C) IBM Corporation, 2006
*
* Authors: Serge E. Hallyn <serue@us.ibm.com>
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
static void usage(char *name)
{
printf("usage: %s [-m] policy_file context_file\n", name);
exit(1);
}
/* Class/perm mapping support */
struct security_class_mapping {
const char *name;
const char *perms[sizeof(unsigned) * 8 + 1];
};
#include "classmap.h"
#include "initial_sid_to_string.h"
int main(int argc, char *argv[])
{
int i, j, mls = 0;
int initial_sid_to_string_len;
char **arg, *polout, *ctxout;
FILE *fout;
if (argc < 3)
usage(argv[0]);
arg = argv+1;
if (argc==4 && strcmp(argv[1], "-m") == 0) {
mls = 1;
arg++;
}
polout = *arg++;
ctxout = *arg;
fout = fopen(polout, "w");
if (!fout) {
printf("Could not open %s for writing\n", polout);
usage(argv[0]);
}
/* print out the classes */
for (i = 0; secclass_map[i].name; i++)
fprintf(fout, "class %s\n", secclass_map[i].name);
fprintf(fout, "\n");
initial_sid_to_string_len = sizeof(initial_sid_to_string) / sizeof (char *);
/* print out the sids */
for (i = 1; i < initial_sid_to_string_len; i++)
fprintf(fout, "sid %s\n", initial_sid_to_string[i]);
fprintf(fout, "\n");
/* print out the class permissions */
for (i = 0; secclass_map[i].name; i++) {
struct security_class_mapping *map = &secclass_map[i];
fprintf(fout, "class %s\n", map->name);
fprintf(fout, "{\n");
for (j = 0; map->perms[j]; j++)
fprintf(fout, "\t%s\n", map->perms[j]);
fprintf(fout, "}\n\n");
}
fprintf(fout, "\n");
/* NOW PRINT OUT MLS STUFF */
if (mls) {
printf("MLS not yet implemented\n");
exit(1);
}
/* types, roles, and allows */
fprintf(fout, "type base_t;\n");
fprintf(fout, "role base_r types { base_t };\n");
for (i = 0; secclass_map[i].name; i++)
fprintf(fout, "allow base_t base_t:%s *;\n",
secclass_map[i].name);
fprintf(fout, "user user_u roles { base_r };\n");
fprintf(fout, "\n");
/* default sids */
for (i = 1; i < initial_sid_to_string_len; i++)
fprintf(fout, "sid %s user_u:base_r:base_t\n", initial_sid_to_string[i]);
fprintf(fout, "\n");
fprintf(fout, "fs_use_xattr ext2 user_u:base_r:base_t;\n");
fprintf(fout, "fs_use_xattr ext3 user_u:base_r:base_t;\n");
fprintf(fout, "fs_use_xattr ext4 user_u:base_r:base_t;\n");
fprintf(fout, "fs_use_xattr jfs user_u:base_r:base_t;\n");
fprintf(fout, "fs_use_xattr xfs user_u:base_r:base_t;\n");
fprintf(fout, "fs_use_xattr reiserfs user_u:base_r:base_t;\n");
fprintf(fout, "fs_use_xattr jffs2 user_u:base_r:base_t;\n");
fprintf(fout, "fs_use_xattr gfs2 user_u:base_r:base_t;\n");
fprintf(fout, "fs_use_xattr lustre user_u:base_r:base_t;\n");
fprintf(fout, "fs_use_task eventpollfs user_u:base_r:base_t;\n");
fprintf(fout, "fs_use_task pipefs user_u:base_r:base_t;\n");
fprintf(fout, "fs_use_task sockfs user_u:base_r:base_t;\n");
fprintf(fout, "fs_use_trans mqueue user_u:base_r:base_t;\n");
fprintf(fout, "fs_use_trans devpts user_u:base_r:base_t;\n");
fprintf(fout, "fs_use_trans hugetlbfs user_u:base_r:base_t;\n");
fprintf(fout, "fs_use_trans tmpfs user_u:base_r:base_t;\n");
fprintf(fout, "fs_use_trans shm user_u:base_r:base_t;\n");
fprintf(fout, "genfscon proc / user_u:base_r:base_t\n");
fclose(fout);
fout = fopen(ctxout, "w");
if (!fout) {
printf("Wrote policy, but cannot open %s for writing\n", ctxout);
usage(argv[0]);
}
fprintf(fout, "/ user_u:base_r:base_t\n");
fprintf(fout, "/.* user_u:base_r:base_t\n");
fclose(fout);
return 0;
}
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="utf-8"?>
<plugin game="Halo2" baseSize="0x284">
<!-- Automatically generated plugin -->
<revisions>
<revision author="Iron_Forge" version="1">Added basic layout of plugin...</revision>
<revision author="Iron_Forge" version="2">Added some known values...</revision>
<revision author="XZodia" version="3">Added grenades, fp models, damage calls</revision>
<revision author="km00" version="4">Updated a load of stuff</revision>
<revision author="XZodia" version="5">Completed</revision>
<revision author="Lord Zedd" version="6">Updates</revision>
</revisions>
<undefined name="Unknown" offset="0x0" visible="false" />
<undefined name="Unknown" offset="0x4" visible="false" />
<undefined name="Unknown" offset="0x8" visible="false" />
<undefined name="Unknown" offset="0xC" visible="false" />
<undefined name="Unknown" offset="0x10" visible="false" />
<undefined name="Unknown" offset="0x14" visible="false" />
<undefined name="Unknown" offset="0x18" visible="false" />
<undefined name="Unknown" offset="0x1C" visible="false" />
<undefined name="Unknown" offset="0x20" visible="false" />
<undefined name="Unknown" offset="0x24" visible="false" />
<undefined name="Unknown" offset="0x28" visible="false" />
<undefined name="Unknown" offset="0x2C" visible="false" />
<undefined name="Unknown" offset="0x30" visible="false" />
<undefined name="Unknown" offset="0x34" visible="false" />
<undefined name="Unknown" offset="0x38" visible="false" />
<undefined name="Unknown" offset="0x3C" visible="false" />
<undefined name="Unknown" offset="0x40" visible="false" />
<undefined name="Unknown" offset="0x44" visible="false" />
<undefined name="Unknown" offset="0x48" visible="false" />
<undefined name="Unknown" offset="0x4C" visible="false" />
<undefined name="Unknown" offset="0x50" visible="false" />
<undefined name="Unknown" offset="0x54" visible="false" />
<undefined name="Unknown" offset="0x58" visible="false" />
<undefined name="Unknown" offset="0x5C" visible="false" />
<undefined name="Unknown" offset="0x60" visible="false" />
<undefined name="Unknown" offset="0x64" visible="false" />
<undefined name="Unknown" offset="0x68" visible="false" />
<undefined name="Unknown" offset="0x6C" visible="false" />
<undefined name="Unknown" offset="0x70" visible="false" />
<undefined name="Unknown" offset="0x74" visible="false" />
<undefined name="Unknown" offset="0x78" visible="false" />
<undefined name="Unknown" offset="0x7C" visible="false" />
<undefined name="Unknown" offset="0x80" visible="false" />
<undefined name="Unknown" offset="0x84" visible="false" />
<undefined name="Unknown" offset="0x88" visible="false" />
<undefined name="Unknown" offset="0x8C" visible="false" />
<undefined name="Unknown" offset="0x90" visible="false" />
<undefined name="Unknown" offset="0x94" visible="false" />
<undefined name="Unknown" offset="0x98" visible="false" />
<undefined name="Unknown" offset="0x9C" visible="false" />
<undefined name="Unknown" offset="0xA0" visible="false" />
<undefined name="Unknown" offset="0xA4" visible="false" />
<undefined name="Unknown" offset="0xA8" visible="false" />
<enum32 name="Language" offset="0xAC" visible="true">
<option name="English" value="0x0" />
<option name="Japanese" value="0x1" />
<option name="German" value="0x2" />
<option name="French" value="0x3" />
<option name="Spanish" value="0x4" />
<option name="Italian" value="0x5" />
<option name="Korean" value="0x6" />
<option name="Chinese" value="0x7" />
<option name="Portuguese" value="0x8" />
</enum32>
<reflexive name="Havok Cleanup Resources" offset="0xB0" visible="true" entrySize="0x8">
<tagRef name="Object Cleanup Effect" offset="0x0" visible="true" />
</reflexive>
<reflexive name="Collision Damage" offset="0xB8" visible="true" entrySize="0x48">
<tagRef name="Collision Damage" offset="0x0" visible="true" />
<float32 name="Min Game Acceleration" offset="0x8" visible="true" />
<float32 name="Max Game Acceleration" offset="0xC" visible="true" />
<float32 name="Min Game Scale" offset="0x10" visible="true" />
<float32 name="Max Game Scale" offset="0x14" visible="true" />
<float32 name="Min Absolute Acceleration" offset="0x18" visible="true" />
<float32 name="Max Absolute Acceleration" offset="0x1C" visible="true" />
<float32 name="Min Absolute Scale" offset="0x20" visible="true" />
<float32 name="Max Absolute Scale" offset="0x24" visible="true" />
<undefined name="Unknown" offset="0x28" visible="false" />
<undefined name="Unknown" offset="0x2C" visible="false" />
<undefined name="Unknown" offset="0x30" visible="false" />
<undefined name="Unknown" offset="0x34" visible="false" />
<undefined name="Unknown" offset="0x38" visible="false" />
<undefined name="Unknown" offset="0x3C" visible="false" />
<undefined name="Unknown" offset="0x40" visible="false" />
<undefined name="Unknown" offset="0x44" visible="false" />
</reflexive>
<reflexive name="Sound Globals" offset="0xC0" visible="true" entrySize="0x24">
<tagRef name="Sound Classes" offset="0x0" visible="true" />
<tagRef name="Sound Effects" offset="0x8" visible="true" />
<tagRef name="Sound Mix" offset="0x10" visible="true" />
<tagRef name="Sound Combat Dialogue Constants" offset="0x18" visible="true" />
<tagref name="Sound Gestalt" offset="0x20" withClass="false" visible="true" />
</reflexive>
<reflexive name="AI Globals" offset="0xC8" visible="true" entrySize="0x168">
<float32 name="Danger Broadly Facing" offset="0x0" visible="true" />
<undefined name="Unknown" offset="0x4" visible="false" />
<float32 name="Danger Shooting Near" offset="0x8" visible="true" />
<undefined name="Unknown" offset="0xC" visible="false" />
<float32 name="Danger Shooting At" offset="0x10" visible="true" />
<undefined name="Unknown" offset="0x14" visible="false" />
<float32 name="Danger Extremely Close" offset="0x18" visible="true" />
<undefined name="Unknown" offset="0x1C" visible="false" />
<float32 name="Danger Shield Damage" offset="0x20" visible="true" />
<float32 name="Danger Extended Shield Damage" offset="0x24" visible="true" />
<float32 name="Danger Body Damage" offset="0x28" visible="true" />
<float32 name="Danger Extended Body Damage" offset="0x2C" visible="true" />
<undefined name="Unknown" offset="0x30" visible="false" />
<undefined name="Unknown" offset="0x34" visible="false" />
<undefined name="Unknown" offset="0x38" visible="false" />
<undefined name="Unknown" offset="0x3C" visible="false" />
<undefined name="Unknown" offset="0x40" visible="false" />
<undefined name="Unknown" offset="0x44" visible="false" />
<undefined name="Unknown" offset="0x48" visible="false" />
<undefined name="Unknown" offset="0x4C" visible="false" />
<undefined name="Unknown" offset="0x50" visible="false" />
<undefined name="Unknown" offset="0x54" visible="false" />
<undefined name="Unknown" offset="0x58" visible="false" />
<undefined name="Unknown" offset="0x5C" visible="false" />
<tagRef name="Global Dialogue" offset="0x60" visible="true" />
<stringid name="Default Mission Dialogue Sound Effect" offset="0x68" visible="true" />
<undefined name="Unknown" offset="0x6C" visible="false" />
<undefined name="Unknown" offset="0x70" visible="false" />
<undefined name="Unknown" offset="0x74" visible="false" />
<undefined name="Unknown" offset="0x78" visible="false" />
<undefined name="Unknown" offset="0x7C" visible="false" />
<float32 name="Jump Down" offset="0x80" visible="true" />
<float32 name="Jump Step" offset="0x84" visible="true" />
<float32 name="Jump Crouch" offset="0x88" visible="true" />
<float32 name="Jump Stand" offset="0x8C" visible="true" />
<float32 name="Jump Storey" offset="0x90" visible="true" />
<float32 name="Jump Tower" offset="0x94" visible="true" />
<float32 name="Max Jump Down Height Down" offset="0x98" visible="true" />
<float32 name="Max Jump Down Height Step" offset="0x9C" visible="true" />
<float32 name="Max Jump Down Height Crouch" offset="0xA0" visible="true" />
<float32 name="Max Jump Down Height Stand" offset="0xA4" visible="true" />
<float32 name="Max Jump Down Height Storey" offset="0xA8" visible="true" />
<float32 name="Max Jump Down Height Tower" offset="0xAC" visible="true" />
<float32 name="Hoist Step min" offset="0xB0" visible="true" />
<float32 name="Hoist Step max" offset="0xB4" visible="true" />
<float32 name="Hoist Crouch min" offset="0xB8" visible="true" />
<float32 name="Hoist Crouch max" offset="0xBC" visible="true" />
<float32 name="Hoist Stand min" offset="0xC0" visible="true" />
<float32 name="Hoist Stand max" offset="0xC4" visible="true" />
<undefined name="Unknown" offset="0xC8" visible="false" />
<undefined name="Unknown" offset="0xCC" visible="false" />
<undefined name="Unknown" offset="0xD0" visible="false" />
<undefined name="Unknown" offset="0xD4" visible="false" />
<undefined name="Unknown" offset="0xD8" visible="false" />
<undefined name="Unknown" offset="0xDC" visible="false" />
<float32 name="Vault Step min" offset="0xE0" visible="true" />
<float32 name="Vault Step max" offset="0xE4" visible="true" />
<float32 name="Vault Crouch min" offset="0xE8" visible="true" />
<float32 name="Vault Crouch max" offset="0xEC" visible="true" />
<undefined name="Unknown" offset="0xF0" visible="false" />
<undefined name="Unknown" offset="0xF4" visible="false" />
<undefined name="Unknown" offset="0xF8" visible="false" />
<undefined name="Unknown" offset="0xFC" visible="false" />
<undefined name="Unknown" offset="0x100" visible="false" />
<undefined name="Unknown" offset="0x104" visible="false" />
<undefined name="Unknown" offset="0x108" visible="false" />
<undefined name="Unknown" offset="0x10C" visible="false" />
<undefined name="Unknown" offset="0x110" visible="false" />
<undefined name="Unknown" offset="0x114" visible="false" />
<undefined name="Unknown" offset="0x118" visible="false" />
<undefined name="Unknown" offset="0x11C" visible="false" />
<reflexive name="Gravemind Properties" offset="0x120" visible="true" entrySize="0xC">
<float32 name="Minimum Retreat Time" offset="0x0" visible="true" />
<float32 name="Ideal Retreat Time" offset="0x4" visible="true" />
<float32 name="Maximum Retreat Time" offset="0x8" visible="true" />
</reflexive>
<undefined name="Unknown" offset="0x128" visible="false" />
<undefined name="Unknown" offset="0x12C" visible="false" />
<undefined name="Unknown" offset="0x130" visible="false" />
<undefined name="Unknown" offset="0x134" visible="false" />
<undefined name="Unknown" offset="0x138" visible="false" />
<undefined name="Unknown" offset="0x13C" visible="false" />
<undefined name="Unknown" offset="0x140" visible="false" />
<undefined name="Unknown" offset="0x144" visible="false" />
<undefined name="Unknown" offset="0x148" visible="false" />
<undefined name="Unknown" offset="0x14C" visible="false" />
<undefined name="Unknown" offset="0x150" visible="false" />
<undefined name="Unknown" offset="0x154" visible="false" />
<float32 name="Scary Target Threshold" offset="0x158" visible="true" />
<float32 name="Scary Weapon Threshold" offset="0x15C" visible="true" />
<float32 name="Player Scariness" offset="0x160" visible="true" />
<float32 name="Berserking Actor Scariness" offset="0x164" visible="true" />
</reflexive>
<reflexive name="Damage Table" offset="0xD0" visible="true" entrySize="0x8">
<reflexive name="Damage Groups" offset="0x0" visible="true" entrySize="0xC">
<stringId name="Name" offset="0x0" visible="true" />
<reflexive name="Armor Modifiers" offset="0x4" visible="true" entrySize="0x8">
<stringId name="Name" offset="0x0" visible="true" />
<float32 name="Damage Multiplier" offset="0x4" visible="true" />
</reflexive>
</reflexive>
</reflexive>
<undefined name="Null Block" offset="0xD8" visible="false" />
<undefined name="Null Block" offset="0xDC" visible="false" />
<reflexive name="Sounds" offset="0xE0" visible="true" entrySize="0x8">
<tagRef name="Sound (Obsolete)" offset="0x0" visible="true" />
</reflexive>
<reflexive name="Camera" offset="0xE8" visible="true" entrySize="0x14">
<tagRef name="Default Unit Camera Track" offset="0x0" visible="true" />
<float32 name="Default Change Pause" offset="0x8" visible="true" />
<float32 name="First Person Change Pause" offset="0xC" visible="true" />
<float32 name="Following Camera Change Pause" offset="0x10" visible="true" />
</reflexive>
<reflexive name="Player Control" offset="0xF0" visible="true" entrySize="0x80">
<float32 name="Magnetism Friction" offset="0x0" visible="true" />
<float32 name="Magnetism Adhesion" offset="0x4" visible="true" />
<float32 name="Inconsequential Target Scale" offset="0x8" visible="true" />
<undefined name="Unknown" offset="0xC" visible="false" />
<undefined name="Unknown" offset="0x10" visible="false" />
<undefined name="Unknown" offset="0x14" visible="false" />
<float32 name="Crosshair Location x" offset="0x18" visible="true" />
<float32 name="Crosshair Location y" offset="0x1C" visible="true" />
<comment title="Sprinting" />
<float32 name="Seconds To Start" offset="0x20" visible="true" />
<float32 name="Seconds To Full Speed" offset="0x24" visible="true" />
<float32 name="Decay Rate" offset="0x28" visible="true" />
<float32 name="Full Speed Multiplier" offset="0x2C" visible="true" />
<float32 name="Pegged Magnitude" offset="0x30" visible="true" />
<float32 name="Pegged Angular Threshold" offset="0x34" visible="true" />
<undefined name="Unknown" offset="0x38" visible="false" />
<undefined name="Unknown" offset="0x3C" visible="false" />
<comment title="Looking" />
<float32 name="Look Default Pitch Rate" offset="0x40" visible="true" />
<float32 name="Look Default Yaw Rate" offset="0x44" visible="true" />
<float32 name="Look Peg Threshold" offset="0x48" visible="true" />
<float32 name="Look Yaw Acceleration Time" offset="0x4C" visible="true" />
<float32 name="Look Yaw Acceleration Scale" offset="0x50" visible="true" />
<float32 name="Look Pitch Acceleration Time" offset="0x54" visible="true" />
<float32 name="Look Pitch Acceleration Scale" offset="0x58" visible="true" />
<float32 name="Look Autoleveling Scale" offset="0x5C" visible="true" />
<undefined name="Unknown" offset="0x60" visible="false" />
<undefined name="Unknown" offset="0x64" visible="false" />
<float32 name="Gravity Scale" offset="0x68" visible="true" />
<int16 name="Unknown" offset="0x6C" visible="false" />
<int16 name="Minimum Autoleveling Ticks" offset="0x6E" visible="true" />
<degree name="Minimum Angle For Vehicle Flipping" offset="0x70" visible="true" />
<reflexive name="Look Function" offset="0x74" visible="true" entrySize="0x4">
<float32 name="Scale" offset="0x0" visible="true" />
</reflexive>
<float32 name="Minimum Action Hold Time" offset="0x7C" visible="true" />
</reflexive>
<reflexive name="Difficulty" offset="0xF8" visible="true" entrySize="0x284">
<float32 name="Easy Enemy Damage" offset="0x0" visible="true" />
<float32 name="Normal Enemy Damage" offset="0x4" visible="true" />
<float32 name="Hard Enemy Damage" offset="0x8" visible="true" />
<float32 name="Impossible Enemy Damage" offset="0xC" visible="true" />
<float32 name="Easy Enemy Vitality" offset="0x10" visible="true" />
<float32 name="Normal Enemy Vitality" offset="0x14" visible="true" />
<float32 name="Hard Enemy Vitality" offset="0x18" visible="true" />
<float32 name="Impossible Enemy Vitality" offset="0x1C" visible="true" />
<float32 name="Easy Enemy Shield" offset="0x20" visible="true" />
<float32 name="Normal Enemy Shield" offset="0x24" visible="true" />
<float32 name="Hard Enemy Shield" offset="0x28" visible="true" />
<float32 name="Impossible Enemy Shield" offset="0x2C" visible="true" />
<float32 name="Easy Enemy Recharge" offset="0x30" visible="true" />
<float32 name="Normal Enemy Recharge" offset="0x34" visible="true" />
<float32 name="Hard Enemy Recharge" offset="0x38" visible="true" />
<float32 name="Impossible Enemy Recharge" offset="0x3C" visible="true" />
<float32 name="Easy Friend Damage" offset="0x40" visible="true" />
<float32 name="Normal Friend Damage" offset="0x44" visible="true" />
<float32 name="Hard Friend Damage" offset="0x48" visible="true" />
<float32 name="Impossible Friend Damage" offset="0x4C" visible="true" />
<float32 name="Easy Friend Vitality" offset="0x50" visible="true" />
<float32 name="Normal Friend Vitality" offset="0x54" visible="true" />
<float32 name="Hard Friend Vitality" offset="0x58" visible="true" />
<float32 name="Impossible Friend Vitality" offset="0x5C" visible="true" />
<float32 name="Easy Friend Shield" offset="0x60" visible="true" />
<float32 name="Normal Friend Shield" offset="0x64" visible="true" />
<float32 name="Hard Friend Shield" offset="0x68" visible="true" />
<float32 name="Impossible Friend Shield" offset="0x6C" visible="true" />
<float32 name="Easy Friend Recharge" offset="0x70" visible="true" />
<float32 name="Normal Friend Recharge" offset="0x74" visible="true" />
<float32 name="Hard Friend Recharge" offset="0x78" visible="true" />
<float32 name="Impossible Friend Recharge" offset="0x7C" visible="true" />
<float32 name="Easy Infection Forms" offset="0x80" visible="true" />
<float32 name="Normal Infection Forms" offset="0x84" visible="true" />
<float32 name="Hard Infection Forms" offset="0x88" visible="true" />
<float32 name="Impossible Infection Forms" offset="0x8C" visible="true" />
<float32 name="Easy Unknown" offset="0x90" visible="false" />
<float32 name="Normal Unknown" offset="0x94" visible="false" />
<float32 name="Hard Unknown" offset="0x98" visible="false" />
<float32 name="Impossible Unknown" offset="0x9C" visible="false" />
<float32 name="Easy Rate of Fire" offset="0xA0" visible="true" />
<float32 name="Normal Rate of Fire" offset="0xA4" visible="true" />
<float32 name="Hard Rate of Fire" offset="0xA8" visible="true" />
<float32 name="Impossible Rate of Fire" offset="0xAC" visible="true" />
<float32 name="Easy Projectile Error" offset="0xB0" visible="true" />
<float32 name="Normal Projectile Error" offset="0xB4" visible="true" />
<float32 name="Hard Projectile Error" offset="0xB8" visible="true" />
<float32 name="Impossible Projectile Error" offset="0xBC" visible="true" />
<float32 name="Easy Burst Error" offset="0xC0" visible="true" />
<float32 name="Normal Burst Error" offset="0xC4" visible="true" />
<float32 name="Hard Burst Error" offset="0xC8" visible="true" />
<float32 name="Impossible Burst Error" offset="0xCC" visible="true" />
<float32 name="Easy Target Delay" offset="0xD0" visible="true" />
<float32 name="Normal Target Delay" offset="0xD4" visible="true" />
<float32 name="Hard Target Delay" offset="0xD8" visible="true" />
<float32 name="Impossible Target Delay" offset="0xDC" visible="true" />
<float32 name="Easy Burst Separation" offset="0xE0" visible="true" />
<float32 name="Normal Burst Separation" offset="0xE4" visible="true" />
<float32 name="Hard Burst Separation" offset="0xE8" visible="true" />
<float32 name="Impossible Burst Separation" offset="0xEC" visible="true" />
<float32 name="Easy Target Tracking" offset="0xF0" visible="true" />
<float32 name="Normal Target Tracking" offset="0xF4" visible="true" />
<float32 name="Hard Target Tracking" offset="0xF8" visible="true" />
<float32 name="Impossible Target Tracking" offset="0xFC" visible="true" />
<float32 name="Easy Target Leading" offset="0x100" visible="true" />
<float32 name="Normal Target Leading" offset="0x104" visible="true" />
<float32 name="Hard Target Leading" offset="0x108" visible="true" />
<float32 name="Impossible Target Leading" offset="0x10C" visible="true" />
<float32 name="Easy Overcharge Chance" offset="0x110" visible="true" />
<float32 name="Normal Overcharge Chance" offset="0x114" visible="true" />
<float32 name="Hard Overcharge Chance" offset="0x118" visible="true" />
<float32 name="Impossible Overcharge Chance" offset="0x11C" visible="true" />
<float32 name="Easy Special Fire Delay" offset="0x120" visible="true" />
<float32 name="Normal Special Fire Delay" offset="0x124" visible="true" />
<float32 name="Hard Special Fire Delay" offset="0x128" visible="true" />
<float32 name="Impossible Special Fire Delay" offset="0x12C" visible="true" />
<float32 name="Easy Guidance vs Player" offset="0x130" visible="true" />
<float32 name="Normal Guidance vs Player" offset="0x134" visible="true" />
<float32 name="Hard Guidance vs Player" offset="0x138" visible="true" />
<float32 name="Impossible Guidance vs Player" offset="0x13C" visible="true" />
<float32 name="Easy Melee Delay Base" offset="0x140" visible="true" />
<float32 name="Normal Melee Delay Base" offset="0x144" visible="true" />
<float32 name="Hard Melee Delay Base" offset="0x148" visible="true" />
<float32 name="Impossible Melee Delay Base" offset="0x14C" visible="true" />
<float32 name="Easy Melee Delay Scale" offset="0x150" visible="true" />
<float32 name="Normal Melee Delay Scale" offset="0x154" visible="true" />
<float32 name="Hard Melee Delay Scale" offset="0x158" visible="true" />
<float32 name="Impossible Melee Delay Scale" offset="0x15C" visible="true" />
<float32 name="Easy Unknown" offset="0x160" visible="false" />
<float32 name="Normal Unknown" offset="0x164" visible="false" />
<float32 name="Hard Unknown" offset="0x168" visible="false" />
<float32 name="Impossible Unknown" offset="0x16C" visible="false" />
<float32 name="Easy Grenade Chance Scale" offset="0x170" visible="true" />
<float32 name="Normal Grenade Chance Scale" offset="0x174" visible="true" />
<float32 name="Hard Grenade Chance Scale" offset="0x178" visible="true" />
<float32 name="Impossible Grenade Chance Scale" offset="0x17C" visible="true" />
<float32 name="Easy Grenade Timer Scale" offset="0x180" visible="true" />
<float32 name="Normal Grenade Timer Scale" offset="0x184" visible="true" />
<float32 name="Hard Grenade Timer Scale" offset="0x188" visible="true" />
<float32 name="Impossible Grenade Timer Scale" offset="0x18C" visible="true" />
<float32 name="Easy Unknown" offset="0x190" visible="false" />
<float32 name="Normal Unknown" offset="0x194" visible="false" />
<float32 name="Hard Unknown" offset="0x198" visible="false" />
<float32 name="Impossible Unknown" offset="0x19C" visible="false" />
<float32 name="Easy Unknown" offset="0x1A0" visible="false" />
<float32 name="Normal Unknown" offset="0x1A4" visible="false" />
<float32 name="Hard Unknown" offset="0x1A8" visible="false" />
<float32 name="Impossible Unknown" offset="0x1AC" visible="false" />
<float32 name="Easy Unknown" offset="0x1B0" visible="false" />
<float32 name="Normal Unknown" offset="0x1B4" visible="false" />
<float32 name="Hard Unknown" offset="0x1B8" visible="false" />
<float32 name="Impossible Unknown" offset="0x1BC" visible="false" />
<float32 name="Easy Major Upgrade Normal" offset="0x1C0" visible="true" />
<float32 name="Normal Major Upgrade Normal" offset="0x1C4" visible="true" />
<float32 name="Hard Major Upgrade Normal" offset="0x1C8" visible="true" />
<float32 name="Impossible Major Upgrade Normal" offset="0x1CC" visible="true" />
<float32 name="Easy Major Upgrade Few" offset="0x1D0" visible="true" />
<float32 name="Normal Major Upgrade Few" offset="0x1D4" visible="true" />
<float32 name="Hard Major Upgrade Few" offset="0x1D8" visible="true" />
<float32 name="Impossible Major Upgrade Few" offset="0x1DC" visible="true" />
<float32 name="Easy Major Upgrade Many" offset="0x1E0" visible="true" />
<float32 name="Normal Major Upgrade Many" offset="0x1E4" visible="true" />
<float32 name="Hard Major Upgrade Many" offset="0x1E8" visible="true" />
<float32 name="Impossible Major Upgrade Many" offset="0x1EC" visible="true" />
<float32 name="Easy Player Vehicle Ram Chance" offset="0x1F0" visible="true" />
<float32 name="Normal Player Vehicle Ram Chance" offset="0x1F4" visible="true" />
<float32 name="Hard Player Vehicle Ram Chance" offset="0x1F8" visible="true" />
<float32 name="Impossible Player Vehicle Ram Chance" offset="0x1FC" visible="true" />
<undefined name="Unknown" offset="0x200" visible="false" />
<undefined name="Unknown" offset="0x204" visible="false" />
<undefined name="Unknown" offset="0x208" visible="false" />
<undefined name="Unknown" offset="0x20C" visible="false" />
<undefined name="Unknown" offset="0x210" visible="false" />
<undefined name="Unknown" offset="0x214" visible="false" />
<undefined name="Unknown" offset="0x218" visible="false" />
<undefined name="Unknown" offset="0x21C" visible="false" />
<undefined name="Unknown" offset="0x220" visible="false" />
<undefined name="Unknown" offset="0x224" visible="false" />
<undefined name="Unknown" offset="0x228" visible="false" />
<undefined name="Unknown" offset="0x22C" visible="false" />
<undefined name="Unknown" offset="0x230" visible="false" />
<undefined name="Unknown" offset="0x234" visible="false" />
<undefined name="Unknown" offset="0x238" visible="false" />
<undefined name="Unknown" offset="0x23C" visible="false" />
<undefined name="Unknown" offset="0x240" visible="false" />
<undefined name="Unknown" offset="0x244" visible="false" />
<undefined name="Unknown" offset="0x248" visible="false" />
<undefined name="Unknown" offset="0x24C" visible="false" />
<undefined name="Unknown" offset="0x250" visible="false" />
<undefined name="Unknown" offset="0x254" visible="false" />
<undefined name="Unknown" offset="0x258" visible="false" />
<undefined name="Unknown" offset="0x25C" visible="false" />
<undefined name="Unknown" offset="0x260" visible="false" />
<undefined name="Unknown" offset="0x264" visible="false" />
<undefined name="Unknown" offset="0x268" visible="false" />
<undefined name="Unknown" offset="0x26C" visible="false" />
<undefined name="Unknown" offset="0x270" visible="false" />
<undefined name="Unknown" offset="0x274" visible="false" />
<undefined name="Unknown" offset="0x278" visible="false" />
<undefined name="Unknown" offset="0x27C" visible="false" />
<undefined name="Unknown" offset="0x280" visible="false" />
</reflexive>
<reflexive name="Grenades" offset="0x100" visible="true" entrySize="0x2C">
<int16 name="Maximum Count" offset="0x0" visible="true" />
<int16 name="Unknown" offset="0x2" visible="false" />
<tagRef name="Throwing Effect" offset="0x4" visible="true" />
<undefined name="Unknown" offset="0xC" visible="false" />
<undefined name="Unknown" offset="0x10" visible="false" />
<undefined name="Unknown" offset="0x14" visible="false" />
<undefined name="Unknown" offset="0x18" visible="false" />
<tagRef name="Equipment" offset="0x1C" visible="true" />
<tagRef name="Projectile" offset="0x24" visible="true" />
</reflexive>
<reflexive name="Rasterizer Data" offset="0x108" visible="true" entrySize="0x108">
<comment title="Function Textures" />
<tagRef name="Distance Attenuation" offset="0x0" visible="true" />
<tagRef name="Vector Normalization" offset="0x8" visible="true" />
<tagRef name="Gradients" offset="0x10" visible="true" />
<tagRef name="Loading Screen" offset="0x18" visible="true" />
<tagRef name="Loading Screen Sweep" offset="0x20" visible="true" />
<tagRef name="Loading Screen Spinner" offset="0x28" visible="true" />
<tagRef name="Glow" offset="0x30" visible="true" />
<tagRef name="Loading Screen Logos" offset="0x38" visible="true" />
<tagRef name="Loading Screen Tickers" offset="0x40" visible="true" />
<undefined name="Unknown" offset="0x48" visible="false" />
<undefined name="Unknown" offset="0x4C" visible="false" />
<undefined name="Unknown" offset="0x50" visible="false" />
<undefined name="Unknown" offset="0x54" visible="false" />
<reflexive name="Global Vertex Shaders" offset="0x58" visible="true" entrySize="0x8">
<tagRef name="Vertex Shader" offset="0x0" visible="true" />
</reflexive>
<comment title="Default Textures" />
<tagRef name="Default 2D" offset="0x60" visible="true" />
<tagRef name="Default 3D" offset="0x68" visible="true" />
<tagRef name="Default Cube Map" offset="0x70" visible="true" />
<comment title="Experimental Textures" />
<tagRef name="Unknown" offset="0x78" visible="true" />
<tagRef name="Unknown" offset="0x80" visible="true" />
<tagRef name="Unknown" offset="0x88" visible="true" />
<tagRef name="Unknown" offset="0x90" visible="true" />
<comment title="Video Effect Textures" />
<tagRef name="Unknown" offset="0x98" visible="true" />
<tagRef name="Unknown" offset="0xA0" visible="true" />
<undefined name="Unknown" offset="0xA8" visible="false" />
<undefined name="Unknown" offset="0xAC" visible="false" />
<undefined name="Unknown" offset="0xB0" visible="false" />
<undefined name="Unknown" offset="0xB4" visible="false" />
<undefined name="Unknown" offset="0xB8" visible="false" />
<undefined name="Unknown" offset="0xBC" visible="false" />
<undefined name="Unknown" offset="0xC0" visible="false" />
<undefined name="Unknown" offset="0xC4" visible="false" />
<undefined name="Unknown" offset="0xC8" visible="false" />
<tagRef name="Global Shader" offset="0xCC" visible="true" />
<comment title="Active Camouflage" />
<bitfield16 name="Flags" offset="0xD4" visible="true">
<bit name="Tint Edge Density" index="0" />
</bitfield16>
<int16 name="Unknown" offset="0xD6" visible="false" />
<float32 name="Refraction Amount" offset="0xD8" visible="true" />
<float32 name="Distance Falloff" offset="0xDC" visible="true" />
<float32 name="Tint Color Red" offset="0xE0" visible="true" />
<float32 name="Tint Color Green" offset="0xE4" visible="true" />
<float32 name="Tint Color Blue" offset="0xE8" visible="true" />
<float32 name="Hyper Stealth Refraction" offset="0xEC" visible="true" />
<float32 name="Hyper Stealth Distance Falloff" offset="0xF0" visible="true" />
<float32 name="Hyper Stealth Tint Red" offset="0xF4" visible="true" />
<float32 name="Hyper Stealth Tint Green" offset="0xF8" visible="true" />
<float32 name="Hyper Stealth Tint Blue" offset="0xFC" visible="true" />
<comment title="PC Textures" />
<tagRef name="Unknown" offset="0x100" visible="true" />
</reflexive>
<reflexive name="Interface Tags" offset="0x110" visible="true" entrySize="0x98">
<tagRef name="Obsolete 1" offset="0x0" visible="true" />
<tagRef name="Obsolete 2" offset="0x8" visible="true" />
<tagRef name="Screen Color Table" offset="0x10" visible="true" />
<tagRef name="HUD Color Table" offset="0x18" visible="true" />
<tagRef name="Editor Color Table" offset="0x20" visible="true" />
<tagRef name="Dialog Color Table" offset="0x28" visible="true" />
<tagRef name="HUD Globals" offset="0x30" visible="true" />
<tagRef name="Motion Sensor Sweep Bitmap" offset="0x38" visible="true" />
<tagRef name="Motion Sensor Sweep Bitmap Mask" offset="0x40" visible="true" />
<tagRef name="Multiplayer HUD Bitmap" offset="0x48" visible="true" />
<tagRef name="Unknown" offset="0x50" visible="true" />
<tagRef name="HUD Digits Definition" offset="0x58" visible="true" />
<tagRef name="Motion Sensor Blip Bitmap" offset="0x60" visible="true" />
<tagRef name="Interface Goo Map 1" offset="0x68" visible="true" />
<tagRef name="Interface Goo Map 2" offset="0x70" visible="true" />
<tagRef name="Interface Goo Map 3" offset="0x78" visible="true" />
<tagRef name="Main Menu UI Globals" offset="0x80" visible="true" />
<tagRef name="Single Player UI Globals" offset="0x88" visible="true" />
<tagRef name="Multiplayer UI Globals" offset="0x90" visible="true" />
</reflexive>
<reflexive name="Weapon List" offset="0x118" visible="true" entrySize="0x98">
<tagRef name="Weapon" offset="0x0" visible="true" />
</reflexive>
<reflexive name="Cheat Powerups" offset="0x120" visible="true" entrySize="0x98">
<tagRef name="Powerup" offset="0x0" visible="true" />
</reflexive>
<reflexive name="Multiplayer Information" offset="0x128" visible="true" entrySize="0x98">
<tagRef name="Flag" offset="0x0" visible="true" />
<tagRef name="Unit" offset="0x8" visible="true" />
<reflexive name="Vehicles" offset="0x10" visible="true" entrySize="0x98">
<tagRef name="Vehicle" offset="0x0" visible="true" />
</reflexive>
<tagRef name="Hill Shader" offset="0x18" visible="true" />
<tagRef name="Flag Shader" offset="0x20" visible="true" />
<tagRef name="Ball" offset="0x28" visible="true" />
<reflexive name="Sounds" offset="0x30" visible="true" entrySize="0x98">
<tagRef name="Sound" offset="0x0" visible="true" />
</reflexive>
<tagRef name="In Game Text" offset="0x38" visible="true" />
<undefined name="Unknown" offset="0x40" visible="false" />
<undefined name="Unknown" offset="0x44" visible="false" />
<undefined name="Unknown" offset="0x48" visible="false" />
<undefined name="Unknown" offset="0x4C" visible="false" />
<undefined name="Unknown" offset="0x50" visible="false" />
<undefined name="Unknown" offset="0x54" visible="false" />
<undefined name="Unknown" offset="0x58" visible="false" />
<undefined name="Unknown" offset="0x5C" visible="false" />
<undefined name="Unknown" offset="0x60" visible="false" />
<undefined name="Unknown" offset="0x64" visible="false" />
<undefined name="General Events Block" offset="0x68" visible="false" />
<undefined name="General Events Block" offset="0x6C" visible="false" />
<undefined name="Slayer Events Block" offset="0x70" visible="false" />
<undefined name="Slayer Events Block" offset="0x74" visible="false" />
<undefined name="CTF Events Block" offset="0x78" visible="false" />
<undefined name="CTF Events Block" offset="0x7C" visible="false" />
<undefined name="Oddball Events Block" offset="0x80" visible="false" />
<undefined name="Oddball Events Block" offset="0x84" visible="false" />
<undefined name="Null Block" offset="0x88" visible="false" />
<undefined name="Null Block" offset="0x8C" visible="false" />
<undefined name="King Events Block" offset="0x90" visible="false" />
<undefined name="King Events Block" offset="0x94" visible="false" />
</reflexive>
<reflexive name="Player Information" offset="0x130" visible="true" entrySize="0x11C">
<tagRef name="Unit" offset="0x0" visible="true" />
<undefined name="Unknown" offset="0x8" visible="false" />
<undefined name="Unknown" offset="0xC" visible="false" />
<undefined name="Unknown" offset="0x10" visible="false" />
<undefined name="Unknown" offset="0x14" visible="false" />
<undefined name="Unknown" offset="0x18" visible="false" />
<undefined name="Unknown" offset="0x1C" visible="false" />
<undefined name="Unknown" offset="0x20" visible="false" />
<float32 name="Walking Speed" offset="0x24" visible="true" />
<undefined name="Unknown" offset="0x28" visible="false" />
<float32 name="Run Forward" offset="0x2C" visible="true" />
<float32 name="Run Backward" offset="0x30" visible="true" />
<float32 name="Run Sideways" offset="0x34" visible="true" />
<float32 name="Run Acceleration" offset="0x38" visible="true" />
<float32 name="Sneak Forward" offset="0x3C" visible="true" />
<float32 name="Sneak Backward" offset="0x40" visible="true" />
<float32 name="Sneak Sideways" offset="0x44" visible="true" />
<float32 name="Sneak Acceleration" offset="0x48" visible="true" />
<float32 name="Airborn Acceleration" offset="0x4C" visible="true" />
<undefined name="Unknown" offset="0x50" visible="false" />
<undefined name="Unknown" offset="0x54" visible="false" />
<undefined name="Unknown" offset="0x58" visible="false" />
<undefined name="Unknown" offset="0x5C" visible="false" />
<float32 name="Grenade Origin x" offset="0x60" visible="true" />
<float32 name="Grenade Origin y" offset="0x64" visible="true" />
<float32 name="Grenade Origin z" offset="0x68" visible="true" />
<undefined name="Unknown" offset="0x6C" visible="false" />
<undefined name="Unknown" offset="0x70" visible="false" />
<undefined name="Unknown" offset="0x74" visible="false" />
<float32 name="Stun Movement Penalty" offset="0x78" visible="true" />
<float32 name="Stun Turning Penalty" offset="0x7C" visible="true" />
<float32 name="Stun Jumping Penalty" offset="0x80" visible="true" />
<float32 name="Minimum Stun Time" offset="0x84" visible="true" />
<float32 name="Maximum Stun Time" offset="0x88" visible="true" />
<undefined name="Unknown" offset="0x8C" visible="false" />
<undefined name="Unknown" offset="0x90" visible="false" />
<float32 name="First Person Idle Time min" offset="0x94" visible="true" />
<float32 name="First Person Idle Time max" offset="0x98" visible="true" />
<float32 name="First Person Skip Fraction" offset="0x9C" visible="true" />
<undefined name="Unknown" offset="0xA0" visible="false" />
<undefined name="Unknown" offset="0xA4" visible="false" />
<undefined name="Unknown" offset="0xA8" visible="false" />
<undefined name="Unknown" offset="0xAC" visible="false" />
<tagRef name="Coop Respawn Effect" offset="0xB0" visible="true" />
<int32 name="Binoculars Zoom Count" offset="0xB8" visible="true" />
<float32 name="Binoculars Zoom Range min" offset="0xBC" visible="true" />
<float32 name="Binoculars Zoom Range max" offset="0xC0" visible="true" />
<tagRef name="Binoculars Zoom In Sound" offset="0xC4" visible="true" />
<tagRef name="Binoculars Zoom Out Sound" offset="0xCC" visible="true" />
<undefined name="Unknown" offset="0xD4" visible="false" />
<undefined name="Unknown" offset="0xD8" visible="false" />
<undefined name="Unknown" offset="0xDC" visible="false" />
<undefined name="Unknown" offset="0xE0" visible="false" />
<tagRef name="Active Camouflage On" offset="0xE4" visible="true" />
<tagRef name="Active Camouflage Off" offset="0xEC" visible="true" />
<tagRef name="Active Camouflage Error" offset="0xF4" visible="true" />
<tagRef name="Active Camouflage Ready" offset="0xFC" visible="true" />
<tagRef name="Flashlight On" offset="0x104" visible="true" />
<tagRef name="Flashlight Off" offset="0x10C" visible="true" />
<tagRef name="Ice Cream" offset="0x114" visible="true" />
</reflexive>
<reflexive name="Player Representation" offset="0x138" visible="true" entrySize="0xBC">
<tagRef name="First Person Hands" offset="0x0" visible="true" />
<tagRef name="First Person Body" offset="0x8" visible="true" />
<undefined name="Unknown" offset="0x10" visible="false" />
<undefined name="Unknown" offset="0x14" visible="false" />
<undefined name="Unknown" offset="0x18" visible="false" />
<undefined name="Unknown" offset="0x1C" visible="false" />
<undefined name="Unknown" offset="0x20" visible="false" />
<undefined name="Unknown" offset="0x24" visible="false" />
<undefined name="Unknown" offset="0x28" visible="false" />
<undefined name="Unknown" offset="0x2C" visible="false" />
<undefined name="Unknown" offset="0x30" visible="false" />
<undefined name="Unknown" offset="0x34" visible="false" />
<undefined name="Unknown" offset="0x38" visible="false" />
<undefined name="Unknown" offset="0x3C" visible="false" />
<undefined name="Unknown" offset="0x40" visible="false" />
<undefined name="Unknown" offset="0x44" visible="false" />
<undefined name="Unknown" offset="0x48" visible="false" />
<undefined name="Unknown" offset="0x4C" visible="false" />
<undefined name="Unknown" offset="0x50" visible="false" />
<undefined name="Unknown" offset="0x54" visible="false" />
<undefined name="Unknown" offset="0x58" visible="false" />
<undefined name="Unknown" offset="0x5C" visible="false" />
<undefined name="Unknown" offset="0x60" visible="false" />
<undefined name="Unknown" offset="0x64" visible="false" />
<undefined name="Unknown" offset="0x68" visible="false" />
<undefined name="Unknown" offset="0x6C" visible="false" />
<undefined name="Unknown" offset="0x70" visible="false" />
<undefined name="Unknown" offset="0x74" visible="false" />
<undefined name="Unknown" offset="0x78" visible="false" />
<undefined name="Unknown" offset="0x7C" visible="false" />
<undefined name="Unknown" offset="0x80" visible="false" />
<undefined name="Unknown" offset="0x84" visible="false" />
<undefined name="Unknown" offset="0x88" visible="false" />
<undefined name="Unknown" offset="0x8C" visible="false" />
<undefined name="Unknown" offset="0x90" visible="false" />
<undefined name="Unknown" offset="0x94" visible="false" />
<undefined name="Unknown" offset="0x98" visible="false" />
<undefined name="Unknown" offset="0x9C" visible="false" />
<undefined name="Unknown" offset="0xA0" visible="false" />
<undefined name="Unknown" offset="0xA4" visible="false" />
<undefined name="Unknown" offset="0xA8" visible="false" />
<undefined name="Unknown" offset="0xAC" visible="false" />
<tagRef name="Third Person Unit" offset="0xB0" visible="true" />
<stringId name="Third Person Unit Variant" offset="0xB8" visible="true" />
</reflexive>
<reflexive name="Falling Damage" offset="0x140" visible="true" entrySize="0x68">
<undefined name="Unknown" offset="0x0" visible="false" />
<undefined name="Unknown" offset="0x4" visible="false" />
<float32 name="Harmful Falling Distance min" offset="0x8" visible="true" />
<float32 name="Harmful Falling Distance max" offset="0xC" visible="true" />
<tagRef name="Falling Damage" offset="0x10" visible="true" />
<undefined name="Unknown" offset="0x18" visible="false" />
<undefined name="Unknown" offset="0x1C" visible="false" />
<float32 name="Maximum Falling Distance" offset="0x20" visible="true" />
<tagRef name="Distance Damage" offset="0x24" visible="true" />
<tagRef name="Vehicle Environment Collision Damage" offset="0x2C" visible="true" />
<tagRef name="Vehicle Killed Unit Damage Effect" offset="0x34" visible="true" />
<tagRef name="Vehicle Collision Damage" offset="0x3C" visible="true" />
<tagRef name="Flaming Death Damage" offset="0x44" visible="true" />
<undefined name="Unknown" offset="0x4C" visible="false" />
<undefined name="Unknown" offset="0x50" visible="false" />
<undefined name="Unknown" offset="0x54" visible="false" />
<undefined name="Unknown" offset="0x58" visible="false" />
<float32 name="Unknown" offset="0x5C" visible="false" />
<float32 name="Unknown" offset="0x60" visible="false" />
<float32 name="Unknown" offset="0x64" visible="false" />
</reflexive>
<reflexive name="Old Materials" offset="0x148" visible="true" entrySize="0x24">
<stringId name="New Material Name" offset="0x0" visible="true" />
<stringId name="New General Material Name" offset="0x4" visible="true" />
<float32 name="Ground Friction Scale" offset="0x8" visible="true" />
<float32 name="Ground Friction Normal k1 Scale" offset="0xC" visible="true" />
<float32 name="Ground Friction Normal k0 Scale" offset="0x10" visible="true" />
<float32 name="Ground Depth Scale" offset="0x14" visible="true" />
<float32 name="Ground Damp Fraction Scale" offset="0x18" visible="true" />
<tagRef name="Melee Hit Sound" offset="0x1C" visible="true" />
</reflexive>
<reflexive name="Materials" offset="0x150" visible="true" entrySize="0xB4">
<stringId name="Name" offset="0x0" visible="true" />
<stringId name="Parent Name" offset="0x4" visible="true" />
<int16 name="Unknown" offset="0x8" visible="false" />
<bitfield16 name="Flags" offset="0xA" visible="true">
<bit name="Flammable" index="0" />
<bit name="Biomass" index="1" />
</bitfield16>
<enum16 name="Old Material Type" offset="0xC" visible="true">
<option name="Dirt" value="0x0" />
<option name="Sand" value="0x1" />
<option name="Stone" value="0x2" />
<option name="Snow" value="0x3" />
<option name="Wood" value="0x4" />
<option name="Metal (Hollow)" value="0x5" />
<option name="Metal (Thin)" value="0x6" />
<option name="Metal (Thick)" value="0x7" />
<option name="Rubber" value="0x8" />
<option name="Glass" value="0x9" />
<option name="Force Field" value="0xA" />
<option name="Grunt" value="0xB" />
<option name="Hunter Armor" value="0xC" />
<option name="Hunter Skin" value="0xD" />
<option name="Elite" value="0xE" />
<option name="Jackal" value="0xF" />
<option name="Jackal Energy Shield" value="0x10" />
<option name="Engineer Skin" value="0x11" />
<option name="Engineer Force Field" value="0x12" />
<option name="Flood Combat Form" value="0x13" />
<option name="Flood Carrier Form" value="0x14" />
<option name="Cyborg Armor" value="0x15" />
<option name="Cyborg Energy Shield" value="0x16" />
<option name="Human Armor" value="0x17" />
<option name="Human Skin" value="0x18" />
<option name="Sentinel" value="0x19" />
<option name="Monitor" value="0x1A" />
<option name="Plastic" value="0x1B" />
<option name="Water" value="0x1C" />
<option name="Leaves" value="0x1D" />
<option name="Elite Energy Shield" value="0x1E" />
<option name="Ice" value="0x1F" />
<option name="Hunter Shield" value="0x20" />
</enum16>
<int16 name="Unknown" offset="0xE" visible="false" />
<stringId name="General Armor" offset="0x10" visible="true" />
<stringId name="Specific Armor" offset="0x14" visible="true" />
<undefined name="Unknown" offset="0x18" visible="false" />
<float32 name="Friction" offset="0x1C" visible="true" />
<float32 name="Restitution" offset="0x20" visible="true" />
<float32 name="Density" offset="0x24" visible="true" />
<tagRef name="Old Material Physics" offset="0x28" visible="true" />
<tagRef name="Breakable Surface" offset="0x30" visible="true" />
<tagRef name="Sound Sweetener Small" offset="0x38" visible="true" />
<tagRef name="Sound Sweetener Medium" offset="0x40" visible="true" />
<tagRef name="Sound Sweetener Large" offset="0x48" visible="true" />
<tagRef name="Sound Sweetener Rolling" offset="0x50" visible="true" />
<tagRef name="Sound Sweetener Grinding" offset="0x58" visible="true" />
<tagRef name="Sound Sweetener Melee" offset="0x60" visible="true" />
<tagRef name="Unknown" offset="0x68" visible="true" />
<tagRef name="Effect Sweetener Small" offset="0x70" visible="true" />
<tagRef name="Effect Sweetener Medium" offset="0x78" visible="true" />
<tagRef name="Effect Sweetener Large" offset="0x80" visible="true" />
<tagRef name="Effect Sweetener Rolling" offset="0x88" visible="true" />
<tagRef name="Effect Sweetener Grinding" offset="0x90" visible="true" />
<tagRef name="Effect Sweetener Melee" offset="0x98" visible="true" />
<tagRef name="Unknown" offset="0xA0" visible="true" />
<bitfield32 name="Sweetener Inheritance Flags" offset="0xA8" visible="true">
<bit name="Sound Small" index="0" />
<bit name="Sound Medium" index="1" />
<bit name="Sound Large" index="2" />
<bit name="Sound Rolling" index="3" />
<bit name="Sound Grinding" index="4" />
<bit name="Sound Melee" index="4" />
<bit name="Bit 5" index="5" />
<bit name="Effect Small" index="6" />
<bit name="Effect Medium" index="7" />
<bit name="Effect Large" index="8" />
<bit name="Effect Rolling" index="9" />
<bit name="Effect Grinding" index="10" />
<bit name="Effect Melee" index="11" />
<bit name="Bit 12" index="5" />
</bitfield32>
<tagRef name="Material Effects" offset="0xAC" visible="true" />
</reflexive>
<reflexive name="Multiplayer UI" offset="0x158" visible="true" entrySize="0x20">
<tagRef name="Random Player Names" offset="0x0" visible="true" />
<reflexive name="Obsolete Profile Colors" offset="0x8" visible="true" entrySize="0xC">
<colorf name="Color" offset="0x0" format="rgb" visible="true" />
</reflexive>
<reflexive name="Team Colors" offset="0x10" visible="true" entrySize="0xC">
<colorf name="Color" offset="0x0" format="rgb" visible="true" />
</reflexive>
<tagRef name="Team Names" offset="0x18" visible="true" />
</reflexive>
<reflexive name="Profile Colors" offset="0x160" visible="true" entrySize="0xC">
<colourf name="Color" offset="0x0" format="rgb" visible="true" />
</reflexive>
<tagRef name="Multiplayer Globals" offset="0x168" visible="true" />
<reflexive name="Runtime Level Data" offset="0x170" visible="true" entrySize="0x8">
<reflexive name="Campaign Levels" offset="0x0" visible="true" entrySize="0x108">
<int32 name="Campaign ID" offset="0x0" visible="true" />
<int32 name="Map ID" offset="0x4" visible="true" />
<ascii name="Path" offset="0x8" visible="true" size="0x100" />
</reflexive>
</reflexive>
<reflexive name="UI Level Data" offset="0x178" visible="true" entrySize="0x18">
<reflexive name="Campaigns" offset="0x0" visible="true" entrySize="0xB44">
<int32 name="Campaign ID" offset="0x0" visible="true" />
<utf16 name="English Name" offset="0x4" visible="true" size="0x40" />
<utf16 name="Japanese Name" offset="0x44" visible="true" size="0x40" />
<utf16 name="German Name" offset="0x84" visible="true" size="0x40" />
<utf16 name="French Name" offset="0xC4" visible="true" size="0x40" />
<utf16 name="Spanish Name" offset="0x104" visible="true" size="0x40" />
<utf16 name="Italian Name" offset="0x144" visible="true" size="0x40" />
<utf16 name="Korean Name" offset="0x184" visible="true" size="0x40" />
<utf16 name="Chinese Name" offset="0x1C4" visible="true" size="0x40" />
<utf16 name="Portuguese Name" offset="0x204" visible="true" size="0x40" />
<utf16 name="English Description" offset="0x244" visible="true" size="0x100" />
<utf16 name="Japanese Description" offset="0x344" visible="true" size="0x100" />
<utf16 name="German Description" offset="0x444" visible="true" size="0x100" />
<utf16 name="French Description" offset="0x544" visible="true" size="0x100" />
<utf16 name="Spanish Description" offset="0x644" visible="true" size="0x100" />
<utf16 name="Italian Description" offset="0x744" visible="true" size="0x100" />
<utf16 name="Korean Description" offset="0x844" visible="true" size="0x100" />
<utf16 name="Chinese Description" offset="0x944" visible="true" size="0x100" />
<utf16 name="Portuguese Description" offset="0xA44" visible="true" size="0x100" />
</reflexive>
<reflexive name="Campaign Levels" offset="0x8" visible="true" entrySize="0xB50">
<int32 name="Campaign ID" offset="0x0" visible="true" />
<int32 name="Map ID" offset="0x4" visible="true" />
<tagRef name="Bitmap" offset="0x8" visible="true" />
<utf16 name="English Name" offset="0x10" visible="true" size="0x40" />
<utf16 name="Japanese Name" offset="0x50" visible="true" size="0x40" />
<utf16 name="German Name" offset="0x90" visible="true" size="0x40" />
<utf16 name="French Name" offset="0xD0" visible="true" size="0x40" />
<utf16 name="Spanish Name" offset="0x110" visible="true" size="0x40" />
<utf16 name="Italian Name" offset="0x150" visible="true" size="0x40" />
<utf16 name="Korean Name" offset="0x190" visible="true" size="0x40" />
<utf16 name="Chinese Name" offset="0x1D0" visible="true" size="0x40" />
<utf16 name="Portuguese Name" offset="0x210" visible="true" size="0x40" />
<utf16 name="English Description" offset="0x250" visible="true" size="0x100" />
<utf16 name="Japanese Description" offset="0x350" visible="true" size="0x100" />
<utf16 name="German Description" offset="0x450" visible="true" size="0x100" />
<utf16 name="French Description" offset="0x550" visible="true" size="0x100" />
<utf16 name="Spanish Description" offset="0x650" visible="true" size="0x100" />
<utf16 name="Italian Description" offset="0x750" visible="true" size="0x100" />
<utf16 name="Korean Description" offset="0x850" visible="true" size="0x100" />
<utf16 name="Chinese Description" offset="0x950" visible="true" size="0x100" />
<utf16 name="Portuguese Description" offset="0xA50" visible="true" size="0x100" />
</reflexive>
<reflexive name="Multiplayer Levels" offset="0x10" visible="true" entrySize="0xC64">
<int32 name="Map ID" offset="0x0" visible="true" />
<tagRef name="Bitmap" offset="0x4" visible="true" />
<utf16 name="English Name" offset="0xC" visible="true" size="0x40" />
<utf16 name="Japanese Name" offset="0x4C" visible="true" size="0x40" />
<utf16 name="German Name" offset="0x8C" visible="true" size="0x40" />
<utf16 name="French Name" offset="0xCC" visible="true" size="0x40" />
<utf16 name="Spanish Name" offset="0x10C" visible="true" size="0x40" />
<utf16 name="Italian Name" offset="0x14C" visible="true" size="0x40" />
<utf16 name="Korean Name" offset="0x18C" visible="true" size="0x40" />
<utf16 name="Chinese Name" offset="0x1CC" visible="true" size="0x40" />
<utf16 name="Portuguese Name" offset="0x20C" visible="true" size="0x40" />
<utf16 name="English Description" offset="0x24C" visible="true" size="0x100" />
<utf16 name="Japanese Description" offset="0x34C" visible="true" size="0x100" />
<utf16 name="German Description" offset="0x44C" visible="true" size="0x100" />
<utf16 name="French Description" offset="0x54C" visible="true" size="0x100" />
<utf16 name="Spanish Description" offset="0x64C" visible="true" size="0x100" />
<utf16 name="Italian Description" offset="0x74C" visible="true" size="0x100" />
<utf16 name="Korean Description" offset="0x84C" visible="true" size="0x100" />
<utf16 name="Chinese Description" offset="0x94C" visible="true" size="0x100" />
<utf16 name="Portuguese Description" offset="0xA4C" visible="true" size="0x100" />
<ascii name="Path" offset="0xB4C" visible="true" size="0x100" />
<int32 name="Sort Order" offset="0xC4C" visible="true" />
<bitfield8 name="Flags" offset="0xC50" visible="true">
<bit name="Unlockable" index="1" />
</bitfield8>
<int8 name="Unknown" offset="0xC51" visible="false" />
<int8 name="Unknown" offset="0xC52" visible="false" />
<int8 name="Unknown" offset="0xC53" visible="false" />
<uint8 name="Max Teams None" offset="0xC54" visible="true" />
<uint8 name="Max Teams CTF" offset="0xC55" visible="true" />
<uint8 name="Max Teams Slayer" offset="0xC56" visible="true" />
<uint8 name="Max Teams Oddball" offset="0xC57" visible="true" />
<uint8 name="Max Teams KOTH" offset="0xC58" visible="true" />
<uint8 name="Max Teams Race" offset="0xC59" visible="true" />
<uint8 name="Max Teams Headhunter" offset="0xC5A" visible="true" />
<uint8 name="Max Teams Juggernaut" offset="0xC5B" visible="true" />
<uint8 name="Max Teams Territories" offset="0xC5C" visible="true" />
<uint8 name="Max Teams Assault" offset="0xC5D" visible="true" />
<uint8 name="Max Teams Stub 10" offset="0xC5E" visible="true" />
<uint8 name="Max Teams Stub 11" offset="0xC5F" visible="true" />
<uint8 name="Max Teams Stub 12" offset="0xC60" visible="true" />
<uint8 name="Max Teams Stub 13" offset="0xC61" visible="true" />
<uint8 name="Max Teams Stub 14" offset="0xC62" visible="true" />
<uint8 name="Max Teams Stub 15" offset="0xC63" visible="true" />
</reflexive>
</reflexive>
<tagRef name="Default Global Lighting" offset="0x180" visible="true" />
<comment title="English Locales" />
<uint32 name="Unknown" offset="0x188" visible="false" />
<uint32 name="Unknown" offset="0x18C" visible="false" />
<uint32 name="String Count" offset="0x190" visible="true" />
<uint32 name="Locale Table Size" offset="0x194" visible="true" />
<uint32 name="Locale Index Table Offset" offset="0x198" visible="true" />
<uint32 name="Locale Data Index Offset" offset="0x19C" visible="true" />
<uint32 name="Unknown" offset="0x1A0" visible="false" />
<comment title="Japanese Locales" />
<uint32 name="Unknown" offset="0x1A4" visible="false" />
<uint32 name="Unknown" offset="0x1A8" visible="false" />
<uint32 name="String Count" offset="0x1AC" visible="true" />
<uint32 name="Locale Table Size" offset="0x1B0" visible="true" />
<uint32 name="Locale Index Table Offset" offset="0x1B4" visible="true" />
<uint32 name="Locale Data Index Offset" offset="0x1B8" visible="true" />
<uint32 name="Unknown" offset="0x1BC" visible="false" />
<comment title="German Locales" />
<uint32 name="Unknown" offset="0x1C0" visible="false" />
<uint32 name="Unknown" offset="0x1C4" visible="false" />
<uint32 name="String Count" offset="0x1C8" visible="true" />
<uint32 name="Locale Table Size" offset="0x1CC" visible="true" />
<uint32 name="Locale Index Table Offset" offset="0x1D0" visible="true" />
<uint32 name="Locale Data Index Offset" offset="0x1D4" visible="true" />
<uint32 name="Unknown" offset="0x1D8" visible="false" />
<comment title="French Locales" />
<uint32 name="Unknown" offset="0x1DC" visible="false" />
<uint32 name="Unknown" offset="0x1E0" visible="false" />
<uint32 name="String Count" offset="0x1E4" visible="true" />
<uint32 name="Locale Table Size" offset="0x1E8" visible="true" />
<uint32 name="Locale Index Table Offset" offset="0x1EC" visible="true" />
<uint32 name="Locale Data Index Offset" offset="0x1F0" visible="true" />
<uint32 name="Unknown" offset="0x1F4" visible="false" />
<comment title="Spanish Locales" />
<uint32 name="Unknown" offset="0x1F8" visible="false" />
<uint32 name="Unknown" offset="0x1FC" visible="false" />
<uint32 name="String Count" offset="0x200" visible="true" />
<uint32 name="Locale Table Size" offset="0x204" visible="true" />
<uint32 name="Locale Index Table Offset" offset="0x208" visible="true" />
<uint32 name="Locale Data Index Offset" offset="0x20C" visible="true" />
<uint32 name="Unknown" offset="0x210" visible="false" />
<comment title="Italian Locales" />
<uint32 name="Unknown" offset="0x214" visible="false" />
<uint32 name="Unknown" offset="0x218" visible="false" />
<uint32 name="String Count" offset="0x21C" visible="true" />
<uint32 name="Locale Table Size" offset="0x220" visible="true" />
<uint32 name="Locale Index Table Offset" offset="0x224" visible="true" />
<uint32 name="Locale Data Index Offset" offset="0x228" visible="true" />
<uint32 name="Unknown" offset="0x22C" visible="false" />
<comment title="Korean Locales" />
<uint32 name="Unknown" offset="0x230" visible="false" />
<uint32 name="Unknown" offset="0x234" visible="false" />
<uint32 name="String Count" offset="0x238" visible="true" />
<uint32 name="Locale Table Size" offset="0x23C" visible="true" />
<uint32 name="Locale Index Table Offset" offset="0x240" visible="true" />
<uint32 name="Locale Data Index Offset" offset="0x244" visible="true" />
<uint32 name="Unknown" offset="0x248" visible="false" />
<comment title="Chinese Locales" />
<uint32 name="Unknown" offset="0x24C" visible="false" />
<uint32 name="Unknown" offset="0x250" visible="false" />
<uint32 name="String Count" offset="0x254" visible="true" />
<uint32 name="Locale Table Size" offset="0x258" visible="true" />
<uint32 name="Locale Index Table Offset" offset="0x25C" visible="true" />
<uint32 name="Locale Data Index Offset" offset="0x260" visible="true" />
<uint32 name="Unknown" offset="0x264" visible="false" />
<comment title="Portuguese Locales" />
<uint32 name="Unknown" offset="0x268" visible="false" />
<uint32 name="Unknown" offset="0x26C" visible="false" />
<uint32 name="String Count" offset="0x270" visible="true" />
<uint32 name="Locale Table Size" offset="0x274" visible="true" />
<uint32 name="Locale Index Table Offset" offset="0x278" visible="true" />
<uint32 name="Locale Data Index Offset" offset="0x27C" visible="true" />
<uint32 name="Unknown" offset="0x280" visible="false" />
</plugin> | {
"pile_set_name": "Github"
} |
"S3 (Amazon Simple Storage Service)" = "S3 (Amazon Simple Storage Service)";
/* Use your Access Key ID as the value of the AWSAccessKeyId parameter in requests you send to Amazon Web Services (when required). Your Access Key ID identifies you as the party responsible for the request. */
"Access Key ID" = "ID prístupového kľúča";
/* Since your Access Key ID is not encrypted in requests to AWS, it could be discovered and used by anyone. Services that are not free require you to provide additional information, a request signature, to verify that a request containing your unique Access Key ID could only have come from you. */
"Secret Access Key" = "Tajný prístupový kľúč";
/* The current status of the distribution. When the status is Deployed, the distribution's information is fully propagated throughout the Amazon CloudFront system. */
"InProgress" = "Prebieha";
/* The current status of the distribution. When the status is Deployed, the distribution's information is fully propagated throughout the Amazon CloudFront system. */
"Deployed" = "Rozmiestnená";
"eu-west-1" = "EÚ (Írsko)";
"eu-west-2" = "EU (London)";
"eu-west-3" = "EU (Paris)";
"eu-north-1" = "EU (Stockholm)";
"eu-south-1" = "EU (Milan)";
"us-east-1" = "US štandard";
"us-west-1" = "US západ (severná Kalifornia)";
"us-west-2" = "US západ (Oregon)";
"ap-southeast-1" = "Ázia a Tichomorie (Singapur)";
"ap-northeast-1" = "Ázia a Tichomorie (Tokio)";
"sa-east-1" = "Južná Amerika (São Paulo)";
"ap-southeast-2" = "Ázia a Tichomorie (Sydney)";
"eu-central-1" = "EU (Frankfurt)";
"us-east-2" = "US East (Ohio)";
"ap-northeast-2" = "Asia Pacific (Seoul)";
"ap-south-1" = "Asia Pacific (Mumbai)";
"ap-east-1" = "Asia Pacific (Hong Kong)";
"ca-central-1" = "Canada (Montreal)";
"cn-north-1" = "China (Beijing)";
"cn-northwest-1" = "China (Ningxia)";
"me-south-1" = "Middle East (Bahrain)";
"af-south-1" = "Africa (Cape Town)";
/* Delivery methods including streaming protocols. */
"Download (HTTP)" = "Prevzatie (HTTP) CDN";
"Streaming (RTMP)" = "Živý prenos (RTMP) CDN";
"Custom Origin Server (HTTP/HTTPS)" = "Vlastný zdrojový server (HTTP/HTTPS) CDN";
/* S3 Website Configuration (HTTP) with index document */
"Website Configuration (HTTP)" = "Konfigurácia webovej stránky (HTTP)";
"NoSuchWebsiteConfiguration" = "Zadaný bucket nemá skonfigurovanú webovú stránku";
/* Storage class */
"STANDARD" = "Bežné Amazon S3 úložisko";
"STANDARD_IA" = "Standard IA (Infrequent Access)";
"INTELLIGENT_TIERING" = "Intelligent-Tiering";
"ONEZONE_IA" = "One Zone-Infrequent Access";
"REDUCED_REDUNDANCY" = "Úložisko so zníženou redundanciou (RRS)";
"GLACIER" = "Glacier";
"DEEP_ARCHIVE" = "Glacier Deep Archive";
/* Google Storage */
"MULTI_REGIONAL" = "Multi-Regional";
"REGIONAL" = "Regional";
"NEARLINE" = "Nearline";
"COLDLINE" = "Coldline";
/* Google Login Credentials */
"Google Account Email" = "Email účtu Google";
"Google Account Password" = "Heslo účtu Google";
/* MFA */
"Multi-Factor Authentication" = "Multifaktorová autentifikácia";
"MFA Serial Number" = "Sériové číslo MFA";
"MFA Authentication Code" = "Overovací kód MFA";
/* ACL Editing */
"Canonical User ID" = "ID používateľa";
"Email Address" = "Emailová adresa";
/* Amazon Related ACL Scopes */
"Amazon Customer Email Address" = "Emailová adresa zákazníka Amazon";
/* Google Storage Related ACL Scopes */
"Google Account Email Address" = "Emailová adresa účtu Google";
"Google Group Email Address" = "Emailová adresa Google Group";
"Google Apps Domain" = "Doména Google Apps";
"http://acs.amazonaws.com/groups/global/AllUsers" = "Každý";
"http://acs.amazonaws.com/groups/s3/LogDelivery" = "Doručenie záznamu";
"AllUsers" ="Everyone";
"AllAuthenticatedUsers" = "Držitelia účtu Google";
/* Signed URL Expiry */
"Pre-Signed" = "Podpísané";
"Expires {0}" = "Expiruje {0}";
/* HTTP Metadata */
"Custom Header" = "Vlastná hlavička";
/* CloudFront object invalidation */
"{0} invalidations in progress" = "Prebieha zneplatnení: {0}";
"{0} invalidations completed" = "Dokončených zneplatnení: {0}";
"Bucket name is not DNS compatible" = "Názov bucketu nie je kompatibilný s DNS";
/* Lifecyle configuration */
"after {0} Days" = "po {0} dňoch";
| {
"pile_set_name": "Github"
} |
foo: 'bar' #Comment
arr: ['x', 'y', 'z'] # Comment here
bar: kittens | {
"pile_set_name": "Github"
} |
---
title: "Installation: Ubuntu"
---
# Ubuntu Installation
**General dependencies**
sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler
sudo apt-get install --no-install-recommends libboost-all-dev
**CUDA**: Install by `apt-get` or the NVIDIA `.run` package.
The NVIDIA package tends to follow more recent library and driver versions, but the installation is more manual.
If installing from packages, install the library and latest driver separately; the driver bundled with the library is usually out-of-date.
This can be skipped for CPU-only installation.
**BLAS**: install ATLAS by `sudo apt-get install libatlas-base-dev` or install OpenBLAS by `sudo apt-get install libopenblas-dev` or MKL for better CPU performance.
**Python** (optional): if you use the default Python you will need to `sudo apt-get install` the `python-dev` package to have the Python headers for building the pycaffe interface.
**Compatibility notes, 16.04**
CUDA 8 is required on Ubuntu 16.04.
**Remaining dependencies, 14.04**
Everything is packaged in 14.04.
sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev
**Remaining dependencies, 12.04**
These dependencies need manual installation in 12.04.
# glog
wget https://github.com/google/glog/archive/v0.3.3.tar.gz
tar zxvf v0.3.3.tar.gz
cd glog-0.3.3
./configure
make && make install
# gflags
wget https://github.com/schuhschuh/gflags/archive/master.zip
unzip master.zip
cd gflags-master
mkdir build && cd build
export CXXFLAGS="-fPIC" && cmake .. && make VERBOSE=1
make && make install
# lmdb
git clone https://github.com/LMDB/lmdb
cd lmdb/libraries/liblmdb
make && make install
Note that glog does not compile with the most recent gflags version (2.1), so before that is resolved you will need to build with glog first.
Continue with [compilation](installation.html#compilation).
| {
"pile_set_name": "Github"
} |
package me.sweetll.tucao.business.home.adapter
import android.view.View
import android.widget.ImageView
import android.widget.TextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import me.sweetll.tucao.R
import me.sweetll.tucao.model.json.Video
import me.sweetll.tucao.extension.formatByWan
import me.sweetll.tucao.extension.load
import me.sweetll.tucao.model.json.Channel
class AnimationAdapter(data: MutableList<Pair<Channel, List<Video>>>?): BaseQuickAdapter<Pair<Channel, List<Video>>, BaseViewHolder>(R.layout.item_recommend_video, data) {
override fun convert(helper: BaseViewHolder, item: Pair<Channel, List<Video>>) {
val channel = item.first
helper.setText(R.id.text_channel, channel.name)
item.second.take(4).forEachIndexed {
index, result ->
val thumbImg: ImageView
val playText: TextView
val titleText: TextView
when (index) {
0 -> {
thumbImg = helper.getView(R.id.img_thumb1)
playText = helper.getView(R.id.text_play1)
titleText = helper.getView(R.id.text_title1)
helper.setTag(R.id.card1, result.hid)
helper.addOnClickListener(R.id.card1)
}
1 -> {
thumbImg = helper.getView(R.id.img_thumb2)
playText = helper.getView(R.id.text_play2)
titleText = helper.getView(R.id.text_title2)
helper.setTag(R.id.card2, result.hid)
helper.addOnClickListener(R.id.card2)
}
2 -> {
thumbImg = helper.getView(R.id.img_thumb3)
playText = helper.getView(R.id.text_play3)
titleText = helper.getView(R.id.text_title3)
helper.setTag(R.id.card3, result.hid)
helper.addOnClickListener(R.id.card3)
}
else -> {
thumbImg = helper.getView(R.id.img_thumb4)
playText = helper.getView(R.id.text_play4)
titleText = helper.getView(R.id.text_title4)
helper.setTag(R.id.card4, result.hid)
helper.addOnClickListener(R.id.card4)
}
}
titleText.tag = result.thumb
thumbImg.load(mContext, result.thumb)
playText.text = result.play.formatByWan()
titleText.text = result.title
}
for (index in item.second.size .. 3) {
when (index) {
0 -> {
helper.getView<View>(R.id.card1).visibility = View.INVISIBLE
}
1 -> {
helper.getView<View>(R.id.card2).visibility = View.INVISIBLE
}
2 -> {
helper.getView<View>(R.id.card3).visibility = View.INVISIBLE
}
else -> {
helper.getView<View>(R.id.card4).visibility = View.INVISIBLE
}
}
}
if (channel.id != 0) {
helper.setText(R.id.text_more, "更多${channel.name}内容")
helper.setTag(R.id.card_more, channel.id)
helper.setGone(R.id.card_more, true)
helper.setGone(R.id.img_rank, false)
helper.addOnClickListener(R.id.card_more)
}
}
}
| {
"pile_set_name": "Github"
} |
/*
* \brief Include before including Linux headers in C++
* \author Christian Helmuth
* \date 2014-08-21
*/
/*
* Copyright (C) 2014-2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#define extern_c_begin
extern "C" {
/* some warnings should only be switched of for Linux headers */
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpointer-arith"
#pragma GCC diagnostic ignored "-Wsign-compare"
/* deal with C++ keywords used for identifiers etc. */
#define private private_
#define class class_
#define new new_
#define typename typename_
| {
"pile_set_name": "Github"
} |
import React, {Component} from 'react';
import ReactDOM, { findDOMNode } from 'react-dom';
import cx from 'classnames';
import {Easer} from 'functional-easing';
import {Track, TrackedDiv, TrackDocument} from 'react-track';
import {tween, combine} from 'react-imation';
import {topTop,
topBottom,
centerCenter,
topCenter,
bottomBottom,
bottomTop,
getDocumentRect,
getDocumentElement,
calculateScrollY} from 'react-track/tracking-formulas';
import {rgb, rgba, scale, rotate,
px, percent, translate3d} from 'react-imation/tween-value-factories';
const easeOutBounce = new Easer().using('out-bounce');
class App extends Component {
componentDidMount() {
// initialize svg
var node = findDOMNode(this.sparkPath);
var length = ~~ node.getTotalLength();
this.offsetTarget = length;
node.style.strokeDasharray = length + ' ' + length; // i'm cheating
}
render() {
return (
<TrackDocument formulas={[getDocumentElement, getDocumentRect, calculateScrollY,
topTop, topBottom, topCenter, centerCenter, bottomBottom,
bottomTop]}>
{(documentElement, documentRect, scrollY, topTop,
topBottom, topCenter, centerCenter, bottomBottom, bottomTop) =>
<div style={{minHeight:'5000px'}}>
<a href="https://github.com/gilbox/react-track">
<img
style={{position: 'absolute', top: 0, right: 0, border: 0}}
src="https://camo.githubusercontent.com/e7bbb0521b397edbd5fe43e7f760759336b5e05f/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f677265656e5f3030373230302e706e67"
alt="Fork me on GitHub"
dataCanonicalSrc="https://s3.amazonaws.com/github/ribbons/forkme_right_green_007200.png" /></a>
<Track className="hero" formulas={[topTop]}>
{ (Div, posTopTop) =>
<Div>
<a href="https://github.com/gilbox/react-track">
<h1
style={tween(scrollY, {
[posTopTop]: { opacity: 1, transform: translate3d(0,150,0) },
[posTopTop+200]: { opacity: 0, transform: translate3d(0,100,0) } })}>
<span>
<svg width="296px" height="228px" viewBox="0 0 296 228" version="1.1">
<g id="Page-1" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
<path
ref={r => this.sparkPath = r}
style={{strokeDashoffset: tween(scrollY, {
[posTopTop]: 0,
[posTopTop+150]: this.offsetTarget })}}
d="M43.7774442,71.4898495 C68.1223861,13.9815032 2.19454397,48.0407223 21.6782286,62.6489207 C35.6643945,73.1352682 58.9096882,70.7747789 65.8766598,90.2775999 C81.3266094,133.527037 58.7305466,191.386016 8.96667524,191.386016 C-21.7867278,124.419226 58.5165505,95.0604409 105.657733,71.4898495 C111.587019,68.5252065 106.843786,84.8551006 105.657733,91.3772797 C99.6123965,124.620967 91.5214411,157.47733 85.7703029,190.833069 C84.8685764,196.062948 81.6274642,214.829299 80.7937857,222.32616 C80.6715598,223.425278 80.7937857,226.749731 80.7937857,225.643838 C80.7937857,178.19023 80.0535912,132.979764 92.3994463,86.6741293 C93.8113405,81.3785334 108.30594,39.7685738 124.99843,54.0751457 C156.752595,81.2905735 92.5724441,93.4702936 121.127805,96.0680044 C128.282422,96.7188674 135.65546,97.5726529 142.680287,96.0680044 C148.736462,94.7708318 187.108665,71.4402165 175.273058,59.6046093 C159.768414,44.0999652 147.084798,89.2989658 152.06795,90.5447538 C167.304679,94.3539362 163.498851,72.3099498 171.408646,72.3099498 C175.432165,72.3099498 170.909757,82.6418308 174.726325,83.9156104 C188.108938,88.3820577 200.672172,72.3568753 206.772362,66.2337527 C207.900248,65.1016258 206.423589,91.2727357 216.160024,86.1211829 C225.148096,81.3655893 232.107661,66.8252089 236.053667,57.9457702 C238.752882,51.8719041 253.48624,1.58873203 246.553435,1.58873203 C241.137697,1.58873203 228.944808,94.9098646 223.342114,100.491575 C218.092273,105.721754 247.690967,38.5929831 260.364668,41.3698053 C278.111625,45.2581835 231.741761,65.8490563 230.530416,69.4830892 C229.69667,71.984328 235.745427,70.3606023 238.265453,71.1357154 C260.054171,77.8375207 284.345377,96.4449716 294.622491,116.999199" id="Path-13" stroke="#382513" strokeWidth="3"></path>
</g>
</svg>
</span>
</h1>
</a>
<div
className="down-arrow"
style={tween(scrollY, {
[posTopTop]: {opacity: 1, transform: translate3d(0,0,0)},
[posTopTop+200]: {opacity: 0, transform: translate3d(0,-150,0)}
})}>v</div>
</Div>
}</Track>
{/* fade */}
<Track component="h2" formulas={[topBottom, centerCenter]}>
{(H2,posTopBottom,posCenterCenter) =>
<H2
style={tween(scrollY, {
[posTopBottom]: {opacity: 0},
[posCenterCenter]: {opacity: 1} })}>fade</H2>
}</Track>
{/* move */}
<Track component="h2" formulas={[topBottom, centerCenter]}>
{(H2,posTopBottom,posCenterCenter) =>
<H2
style={tween(scrollY, {
[posTopBottom]: { marginLeft: px(-500), opacity: 0 },
[posCenterCenter]: { marginLeft: px(0), opacity: 1 }
}, easeOutBounce)}>move</H2>
}</Track>
{/* spin */}
<TrackedDiv formulas={[topBottom, centerCenter]}>
{(posTopBottom,posCenterCenter) =>
<h2
style={tween(scrollY, {
[posTopBottom]: { transform: rotate(0) },
[posCenterCenter]: { transform: rotate(360) } })}>spin</h2>
}</TrackedDiv>
{/* scale */}
<TrackedDiv formulas={[topCenter]}>
{(posTopCenter) =>
<h2
proxy="scale-proxy"
style={tween(scrollY, {
[posTopCenter-201]: { transform: scale(0.01), opacity: 0},
[posTopCenter-200]: { transform: scale(0.01), opacity: 1 },
[posTopCenter+70]: { transform: scale(1), opacity: 1 }
}, easeOutBounce)}>scale</h2>
}</TrackedDiv>
{/* pin, reveal, slide, color, unpin */}
<TrackedDiv className="pin-cont" formulas={[topTop, bottomBottom]}>
{(posTopTop, posBottomBottom) =>
<section
className={cx("pin",{
'pin-pin':scrollY > posTopTop,
'pin-unpin':scrollY > posBottomBottom})}>
<h3
className="pin-txt"
style={tween(scrollY,{
[posTopTop]: { top: percent(0), marginTop: px(0) },
[posTopTop+50]: { top: percent(50), marginTop: px(-60) }
})}>pin</h3>
<div
className="reveal"
style={tween(scrollY, {
[posTopTop+100]: {width: percent(0), backgroundColor: rgba(92, 131, 47, 1)},
[posTopTop+250]: {width: percent(100), backgroundColor: rgba(56, 37, 19, 1)}
})}>
<h3 className="reveal-txt">reveal</h3>
</div>
<div
className={cx("slide",{hide:scrollY < posTopTop+250})}
style={tween(scrollY, {
[posTopTop+250]: { bottom: percent(100), backgroundColor: rgb(92, 131, 47) },
[posTopTop+400]: { bottom: percent(0), backgroundColor: rgb(40, 73, 7) },
[posTopTop+450]: { bottom: percent(0), backgroundColor: rgb(0, 0, 170) },
[posTopTop+500]: { bottom: percent(0), backgroundColor: rgb(170, 0, 0) },
[posTopTop+550]: { bottom: percent(0), backgroundColor: rgb(92, 131, 47) }
})}>
{/* when we hit the appropriate scroll position, change the
text to 'slide' or 'color' depending on the position */}
<h3 className="slide-txt">
{scrollY > posTopTop+400 ? 'color' : 'slide'}
</h3>
<h3
className={cx("unpin-txt",{hide:scrollY < posTopTop+600})}
style={tween(scrollY, {
[posTopTop+600]: { top: percent(100) },
[posBottomBottom]: { top: percent(50) }
})}>unpin</h3>
</div>
</section>
}</TrackedDiv>
<div className="spacer50"></div>
{/* parallax */}
<a href="https://www.flickr.com/photos/rafagarcia_/15262287738/in/pool-83823859@N00/">
<Track component="div" formulas={[topBottom, bottomTop]}>
{(Div, posTopBottom, posBottomTop) =>
<Div className="parallax-cont">
<div className="parallax-shadow" />
<div
className="parallax-img"
style={tween(scrollY, {
[posTopBottom]: {transform: translate3d(0,0,0)},
[posBottomTop]: {transform: translate3d(0,-80,0)}
})}></div>
<h3
className="parallax-txt fade2"
style={tween(scrollY, {
[posTopBottom]: { transform: combine(scale(0.8), translate3d(0,120,0)) },
[posBottomTop]: { transform: combine(scale(0.8), translate3d(0,-120,0)) }
})}>parallax</h3>
<h3
className="parallax-txt fade1"
style={tween(scrollY, {
[posTopBottom]: {transform: combine(scale(0.9), translate3d(0,160,0)) },
[posBottomTop]: {transform: combine(scale(0.9), translate3d(0,-160,0)) }
})}>parallax</h3>
<h3
className="parallax-txt"
style={tween(scrollY, {
[posTopBottom]: {transform: translate3d(0,200,0)},
[posBottomTop]: {transform: translate3d(0,-200,0)}
})}>parallax</h3>
</Div>
}</Track>
</a>
<div className="spacer50"></div>
<a href="https://github.com/gilbox/react-track">
<img className="center" src="GitHub-Mark-64px.png" alt=""/>
</a>
<div className="spacer10"></div>
<p className="center">This demo was inspired by <a href="http://janpaepke.github.io/ScrollMagic/">ScrollMagic</a></p>
<div className="spacer10"></div>
</div>
}</TrackDocument>
)
}
}
ReactDOM.render(<App/>, document.getElementById('example'));
| {
"pile_set_name": "Github"
} |
/**
* This header is generated by class-dump-z 0.2b.
*
* Source: /System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices
*/
#import <PhotoLibraryServices/XXUnknownSuperclass.h>
@class NSMutableDictionary, NSData;
@interface PLPhotoBakedThumbnailsCollection : XXUnknownSuperclass {
NSData *_data; // 4 = 0x4
NSMutableDictionary *_bakedThumbnails; // 8 = 0x8
}
+ (void)setTesting:(BOOL)testing; // 0x5aa79
- (void)saveToFile:(id)file; // 0x5b0a1
- (void)setBakedThumbnails:(id)thumbnails forFormat:(int)format; // 0x5af8d
- (id)bakedThumbnailsForFormat:(int)format; // 0x5ae2d
- (id)availableFormats; // 0x5ae0d
- (void)_parseDataWithContentsOfFile:(id)file; // 0x5ab45
- (void)dealloc; // 0x5aae5
- (id)initWithContentsOfFile:(id)file; // 0x5aa9d
- (id)init; // 0x5aa89
@end
| {
"pile_set_name": "Github"
} |
//
// PolylineNode.swift
// MapboxSceneKit
//
// Created by Jim Martin on 9/11/18.
// Copyright © 2018 MapBox. All rights reserved.
//
import Foundation
import SceneKit
// MARK: - Constructors
@objc(MBPolylineNode)
public class PolylineNode: SCNNode {
private var lineRenderer: PolylineRenderer
private let positionCurve: BezierSpline3D
private let colorCurve: BezierSpline3D
private let radiusCurve: BezierSpline3D
/// Top-level initializer
private init( positionCurve: BezierSpline3D,
radiusCurve: BezierSpline3D,
colorCurve: BezierSpline3D,
sampleCount: Int) {
//Find and instantiate the appropriate renderer
self.lineRenderer = PolylineRendererVersion.getValidRenderer()
self.positionCurve = positionCurve
self.radiusCurve = radiusCurve
self.colorCurve = colorCurve
super.init()
lineRenderer.render(self, withSampleCount: sampleCount)
}
/// PolylineNode is a line drawn through the given positions. Can be sampled later at any point on the line.
///
/// - Parameters:
/// - positions: The list of SCNVector3 positions. Drawn through each position from 0...n
/// - radius: The width of the line in local space
/// - color: The color of the line
@objc
public convenience init(positions: [SCNVector3], radius: CGFloat, color: UIColor ) {
//define the polyline's curves from the inputs
let pos = BezierSpline3D(curvePoints: positions)
let col = BezierSpline3D(curvePoints: [color])
let rad = BezierSpline3D(curvePoints: [radius])
self.init(positionCurve: pos, radiusCurve: rad, colorCurve: col, sampleCount: positions.count)
}
/// PolylineNode is a line drawn through the given positions. Can be sampled later at any point on the line.
///
/// - Parameters:
/// - positions: The list of SCNVector3 positions. Drawn through each position from 0...n
/// - startRadius: The width of the initial point of the line. Linearly interpolated from start to end positions.
/// - endRadius: The width of the final point of the line. Linearly interpolated from start to end positions.
/// - startColor: The color of the initial point of the line. Linearly interpolated from start to end.
/// - endColor: The color of the final point of the line. Linearly interpolated from start to end.
@available(iOS 10.0, *)
@objc
public convenience init(positions: [SCNVector3], startRadius: CGFloat, endRadius: CGFloat,
startColor: UIColor, endColor: UIColor){
//define the polyline's curves from the inputs
let pos = BezierSpline3D(curvePoints: positions)
let col = BezierSpline3D(curvePoints: [startColor, endColor])
let rad = BezierSpline3D(curvePoints: [startRadius, endRadius])
self.init(positionCurve: pos, radiusCurve: rad, colorCurve: col, sampleCount: positions.count)
}
/// PolylineNode is a line drawn through the given positions. Can be sampled later at any point on the line.
///
/// - Parameters:
/// - positions: The list of SCNVector3 positions. Drawn through each position from 0...n
/// - radii: The list of radii, distributed evenly along the line
/// - colors: The list of colors, distributed evenly along the line
@available(iOS 10.0, *)
@objc
public convenience init(positions: [SCNVector3], radii: [CGFloat], colors: [UIColor]) {
let pos = BezierSpline3D(curvePoints: positions)
let col = BezierSpline3D(curvePoints: colors)
let rad = BezierSpline3D(curvePoints: radii)
self.init(positionCurve: pos, radiusCurve: rad, colorCurve: col, sampleCount: positions.count)
}
public required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") }
}
// MARK: - Public methods
public extension PolylineNode {
/// Position along the polyline
///
/// - Parameter progress: normalized progress along the polyline.
/// 0.0 = the beginning, 0.5 = halfway, 1.0 = the end of the line.
/// - Returns: the local position at the given progress
func getPositon(atProgress progress: CGFloat) -> SCNVector3 {
return positionCurve.evaluate(progress: progress)
}
/// Radius along the polyline
///
/// - Parameter progress: normalized progress along the polyline.
/// 0.0 = the beginning, 0.5 = halfway, 1.0 = the end of the line.
/// - Returns: the radius at the given progress
func getRadius(atProgress progress: CGFloat) -> CGFloat {
return radiusCurve.evaluate(progress: progress).toRadius()
}
/// Color along the polyline
///
/// - Parameter progress: normalized progress along the polyline.
/// 0.0 = the beginning, 0.5 = halfway, 1.0 = the end of the line.
/// - Returns: the UIColor at the given progress
func getColor(atProgress progress: CGFloat) -> UIColor {
return colorCurve.evaluate(progress: progress).toColor()
}
}
// MARK: - BezierSpline Extensions
/// Extension to use the bezierspline class for other parameters
fileprivate extension BezierSpline3D {
//color splines, doesn't support alpha
convenience init(curvePoints: [UIColor]) {
var points = [SCNVector3]()
for color in curvePoints {
var red: CGFloat = 0
var green: CGFloat = 0
var blue: CGFloat = 0
var alpha: CGFloat = 0
color.getRed(&red, green: &green, blue: &blue, alpha: &alpha)
points.append(SCNVector3(red, green, blue))
}
self.init(curvePoints: points)
}
//radius spline, uses the x-component only
convenience init(curvePoints: [CGFloat]) {
var points = [SCNVector3]()
for radius in curvePoints {
points.append(SCNVector3(radius, 0, 0))
}
self.init(curvePoints: points)
}
}
| {
"pile_set_name": "Github"
} |
{
"images" : [
{
"idiom" : "universal",
"filename" : "arrow.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "arrow@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
} | {
"pile_set_name": "Github"
} |
#version 310 es
precision mediump float;
precision highp int;
struct ResType
{
highp float _m0;
int _m1;
};
struct ResType_1
{
highp vec2 _m0;
ivec2 _m1;
};
layout(location = 0) in float v0;
layout(location = 1) in vec2 v1;
layout(location = 0) out float FragColor;
void main()
{
ResType _16;
_16._m0 = frexp(v0, _16._m1);
mediump int e0 = _16._m1;
float f0 = _16._m0;
ResType _22;
_22._m0 = frexp(v0 + 1.0, _22._m1);
e0 = _22._m1;
f0 = _22._m0;
ResType_1 _35;
_35._m0 = frexp(v1, _35._m1);
mediump ivec2 e1 = _35._m1;
vec2 f1 = _35._m0;
float r0;
float _41 = modf(v0, r0);
float m0 = _41;
vec2 r1;
vec2 _45 = modf(v1, r1);
vec2 m1 = _45;
FragColor = ((((f0 + f1.x) + f1.y) + m0) + m1.x) + m1.y;
}
| {
"pile_set_name": "Github"
} |
StartTest(function (t) {
t.getHarness([
{
preload : [
'../../../extjs-4.2.0/resources/css/ext-all.css',
'../../../extjs-4.2.0/ext-all-debug.js'
],
url : 'testfiles/604_extjs_components.t.js'
}
]);
t.chain([
{ waitFor : 'harnessReady' },
{ action : "dblclick", target : "#SiestaSelf-testTree => .x-grid-row:nth-child(1) > .x-grid-cell:nth-child(1) .x-tree-node-text", offset : [70, 4] },
{ waitFor : 'HarnessIdle' },
{ action : "click", target : "toolbar button[iconCls=icon-search] => .icon-search", offset : [6, 3] },
{ action : "moveCursorTo", target : ">>#SiestaSelf-resultpanel-domContainer", offset : [42, 20] },
{
desc : 'Inspector box at cursor',
waitFor : function () {
var EXT = Ext.query('iframe.tr-iframe')[ 0 ].contentWindow.Ext
var buttonInInnerTest = EXT.ComponentQuery.query('[text=Foo]')[0];
var domContainer = t.cq1('domcontainer');
var boxEl = Ext.getBody().down('.cmp-inspector-box');
return t.compareObjects({
width : buttonInInnerTest.el.getWidth() + 5,
height : buttonInInnerTest.getHeight() + 5,
x : buttonInInnerTest.getX(),
y : buttonInInnerTest.getY()
}, {
width : t.anyNumberApprox(boxEl.getWidth(), 5),
height : t.anyNumberApprox(boxEl.getHeight(), 5),
x : t.anyNumberApprox(boxEl.getX() - domContainer.getX() - 5, 5),
y : t.anyNumberApprox(boxEl.getY() - domContainer.getY() - 5, 5)
})
}
}
]);
}); | {
"pile_set_name": "Github"
} |
# `(中等)` [1424.diagonal-traverse-ii 对角线遍历 II](https://leetcode-cn.com/problems/diagonal-traverse-ii/)
[contest](https://leetcode-cn.com/contest/weekly-contest-186/problems/diagonal-traverse-ii/)
### 题目描述
<p>给你一个列表 <code>nums</code> ,里面每一个元素都是一个整数列表。请你依照下面各图的规则,按顺序返回 <code>nums</code> 中对角线上的整数。</p>
<p> </p>
<p><strong>示例 1:</strong></p>
<p><strong><img style="height: 143px; width: 158px;" src="https://assets.leetcode-cn.com/aliyun-lc-upload/uploads/2020/04/23/sample_1_1784.png" alt=""></strong></p>
<pre><strong>输入:</strong>nums = [[1,2,3],[4,5,6],[7,8,9]]
<strong>输出:</strong>[1,4,2,7,5,3,8,6,9]
</pre>
<p><strong>示例 2:</strong></p>
<p><strong><img style="height: 177px; width: 230px;" src="https://assets.leetcode-cn.com/aliyun-lc-upload/uploads/2020/04/23/sample_2_1784.png" alt=""></strong></p>
<pre><strong>输入:</strong>nums = [[1,2,3,4,5],[6,7],[8],[9,10,11],[12,13,14,15,16]]
<strong>输出:</strong>[1,6,2,8,7,3,9,4,12,10,5,13,11,14,15,16]
</pre>
<p><strong>示例 3:</strong></p>
<pre><strong>输入:</strong>nums = [[1,2,3],[4],[5,6,7],[8],[9,10,11]]
<strong>输出:</strong>[1,4,2,5,3,8,6,9,7,10,11]
</pre>
<p><strong>示例 4:</strong></p>
<pre><strong>输入:</strong>nums = [[1,2,3,4,5,6]]
<strong>输出:</strong>[1,2,3,4,5,6]
</pre>
<p> </p>
<p><strong>提示:</strong></p>
<ul>
<li><code>1 <= nums.length <= 10^5</code></li>
<li><code>1 <= nums[i].length <= 10^5</code></li>
<li><code>1 <= nums[i][j] <= 10^9</code></li>
<li><code>nums</code> 中最多有 <code>10^5</code> 个数字。</li>
</ul>
---
### 思路
```
```
[发布的题解](https://leetcode-cn.com/problems/diagonal-traverse-ii/solution/diagonal-traverse-ii-by-ikaruga/)
### 答题
``` C++
vector<int> findDiagonalOrder(vector<vector<int>>& nums) {
vector<vector<int>> st;
for (int i = 0; i < nums.size(); i++) {
for (int j = 0; j < nums[i].size(); j++) {
int k = i + j;
if (k == st.size()) {
st.push_back(vector<int>());
}
st[k].push_back(nums[i][j]);
}
}
vector<int> ans;
for (auto& s : st) {
ans.insert(ans.end(), s.rbegin(), s.rend());
}
return ans;
}
```
| {
"pile_set_name": "Github"
} |
from .layer_authentication import YowAuthenticationProtocolLayer
| {
"pile_set_name": "Github"
} |
package handlers
import (
"fmt"
"github.com/authelia/authelia/internal/middlewares"
)
// LogoutPost is the handler logging out the user attached to the given cookie.
func LogoutPost(ctx *middlewares.AutheliaCtx) {
ctx.Logger.Tracef("Destroy session")
err := ctx.Providers.SessionProvider.DestroySession(ctx.RequestCtx)
if err != nil {
ctx.Error(fmt.Errorf("Unable to destroy session during logout: %s", err), operationFailedMessage)
}
ctx.ReplyOK()
}
| {
"pile_set_name": "Github"
} |
/*
Copyright The Kubernetes Authors.
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.
*/
// Code generated by set-gen. DO NOT EDIT.
package sets
import (
"reflect"
"sort"
)
// sets.String is a set of strings, implemented via map[string]struct{} for minimal memory consumption.
type String map[string]Empty
// NewString creates a String from a list of values.
func NewString(items ...string) String {
ss := String{}
ss.Insert(items...)
return ss
}
// StringKeySet creates a String from a keys of a map[string](? extends interface{}).
// If the value passed in is not actually a map, this will panic.
func StringKeySet(theMap interface{}) String {
v := reflect.ValueOf(theMap)
ret := String{}
for _, keyValue := range v.MapKeys() {
ret.Insert(keyValue.Interface().(string))
}
return ret
}
// Insert adds items to the set.
func (s String) Insert(items ...string) {
for _, item := range items {
s[item] = Empty{}
}
}
// Delete removes all items from the set.
func (s String) Delete(items ...string) {
for _, item := range items {
delete(s, item)
}
}
// Has returns true if and only if item is contained in the set.
func (s String) Has(item string) bool {
_, contained := s[item]
return contained
}
// HasAll returns true if and only if all items are contained in the set.
func (s String) HasAll(items ...string) bool {
for _, item := range items {
if !s.Has(item) {
return false
}
}
return true
}
// HasAny returns true if any items are contained in the set.
func (s String) HasAny(items ...string) bool {
for _, item := range items {
if s.Has(item) {
return true
}
}
return false
}
// Difference returns a set of objects that are not in s2
// For example:
// s1 = {a1, a2, a3}
// s2 = {a1, a2, a4, a5}
// s1.Difference(s2) = {a3}
// s2.Difference(s1) = {a4, a5}
func (s String) Difference(s2 String) String {
result := NewString()
for key := range s {
if !s2.Has(key) {
result.Insert(key)
}
}
return result
}
// Union returns a new set which includes items in either s1 or s2.
// For example:
// s1 = {a1, a2}
// s2 = {a3, a4}
// s1.Union(s2) = {a1, a2, a3, a4}
// s2.Union(s1) = {a1, a2, a3, a4}
func (s1 String) Union(s2 String) String {
result := NewString()
for key := range s1 {
result.Insert(key)
}
for key := range s2 {
result.Insert(key)
}
return result
}
// Intersection returns a new set which includes the item in BOTH s1 and s2
// For example:
// s1 = {a1, a2}
// s2 = {a2, a3}
// s1.Intersection(s2) = {a2}
func (s1 String) Intersection(s2 String) String {
var walk, other String
result := NewString()
if s1.Len() < s2.Len() {
walk = s1
other = s2
} else {
walk = s2
other = s1
}
for key := range walk {
if other.Has(key) {
result.Insert(key)
}
}
return result
}
// IsSuperset returns true if and only if s1 is a superset of s2.
func (s1 String) IsSuperset(s2 String) bool {
for item := range s2 {
if !s1.Has(item) {
return false
}
}
return true
}
// Equal returns true if and only if s1 is equal (as a set) to s2.
// Two sets are equal if their membership is identical.
// (In practice, this means same elements, order doesn't matter)
func (s1 String) Equal(s2 String) bool {
return len(s1) == len(s2) && s1.IsSuperset(s2)
}
type sortableSliceOfString []string
func (s sortableSliceOfString) Len() int { return len(s) }
func (s sortableSliceOfString) Less(i, j int) bool { return lessString(s[i], s[j]) }
func (s sortableSliceOfString) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
// List returns the contents as a sorted string slice.
func (s String) List() []string {
res := make(sortableSliceOfString, 0, len(s))
for key := range s {
res = append(res, key)
}
sort.Sort(res)
return []string(res)
}
// UnsortedList returns the slice with contents in random order.
func (s String) UnsortedList() []string {
res := make([]string, 0, len(s))
for key := range s {
res = append(res, key)
}
return res
}
// Returns a single element from the set.
func (s String) PopAny() (string, bool) {
for key := range s {
s.Delete(key)
return key, true
}
var zeroValue string
return zeroValue, false
}
// Len returns the size of the set.
func (s String) Len() int {
return len(s)
}
func lessString(lhs, rhs string) bool {
return lhs < rhs
}
| {
"pile_set_name": "Github"
} |
/**
* \file ThinProtobuf.h
*
* This library provides a number of low-level encoding functions for reading and writing
* data to a Google protocol buffer format. In other words, this is a kind of light-weight
* substitute for Google's official protobuf library (and the protoc compiler), which avoids
* that dependency and allows for a simpler reader / writer implementation that doesn't rely
* on the compilation of protobuf message definition files. This leads to cleaner, simpler
* and faster code than the often overkill solutions based on Google's protobuf library.
*
* \note This header is generally intended to be included in a cpp file implementing the
* protobuf reading / writing code, as it contains static, inline and unnamed namespace
* elements. There is no danger in including it in a header, it's just that there is no
* point to that (encoding / decoding functions are an implementation detail, after all!).
*
* \author S. Mikael Persson <mikael.s.persson@gmail.com>
* \date January 2015
*/
/*
* Copyright 2015 Sven Mikael Persson
*
* THIS SOFTWARE IS DISTRIBUTED UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE v3 (GPLv3).
*
* This file is part of templight-tools.
*
* Templight-tools 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.
*
* Templight-tools 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 templight-tools (as LICENSE in the root folder).
* If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TEMPLIGHT_THIN_PROTOBUF_H
#define TEMPLIGHT_THIN_PROTOBUF_H
#include <ostream>
#include <istream>
#include <string>
#include <cstdint>
namespace thin_protobuf {
namespace {
#define TPROTO_ORDER_LITTLE_ENDIAN 1
#define TPROTO_ORDER_BIG_ENDIAN 2
#define TPROTO_ORDER_PDP_ENDIAN 3
#ifdef __GNUC__
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
#define TPROTO_BYTE_ORDER TPROTO_ORDER_LITTLE_ENDIAN
#elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
#define TPROTO_BYTE_ORDER TPROTO_ORDER_BIG_ENDIAN
#else
#define TPROTO_BYTE_ORDER TPROTO_ORDER_PDP_ENDIAN
#endif
#endif // __GNUC__
#ifdef _MSC_VER
// Windows only support little-endian platforms:
#define TPROTO_BYTE_ORDER TPROTO_ORDER_LITTLE_ENDIAN
#endif // _MSC_VER
union float_to_ulong {
float f;
std::uint32_t ui32;
};
union double_to_ulong {
double d;
std::uint64_t ui64;
std::uint32_t ui32[2];
};
union int64_to_uint64 {
std::int64_t i64;
std::uint64_t ui64;
};
union ulong_to_uword {
std::uint32_t ui32;
std::uint16_t ui16[2];
std::uint8_t ui8[4];
};
void le2h_1ui32(std::uint32_t& value) {
#if TPROTO_BYTE_ORDER == TPROTO_ORDER_BIG_ENDIAN
ulong_to_uword tmp; tmp.ui32 = value;
std::uint8_t tmp_b = tmp.ui8[0];
tmp.ui8[0] = tmp.ui8[3];
tmp.ui8[3] = tmp_b;
tmp_b = tmp.ui8[1];
tmp.ui8[1] = tmp.ui8[2];
tmp.ui8[2] = tmp_b;
value = tmp.ui32;
#elif TPROTO_BYTE_ORDER == TPROTO_ORDER_PDP_ENDIAN
ulong_to_uword tmp; tmp.ui32 = value;
std::uint16_t tmp2 = tmp.ui16[0];
tmp.ui16[0] = tmp.ui16[1];
tmp.ui16[1] = tmp2;
value = tmp.ui32;
#endif
};
void le2h_2ui32(double_to_ulong& value) {
#if TPROTO_BYTE_ORDER == TPROTO_ORDER_BIG_ENDIAN
le2h_1ui32(value.ui32[0]);
le2h_1ui32(value.ui32[1]);
std::uint32_t tmp = value.ui32[0];
value.ui32[0] = value.ui32[1];
value.ui32[1] = tmp;
#endif
};
}
/** \brief Loads a single variable-length integer (uint32, uint64) from an input stream.
*
* Loads a single variable-length integer (uint32, uint64) from an input stream.
* \param p_buf An input stream from which to read.
* \return The variable-length integer (uint32, uint64) that was read from the input stream.
*/
inline std::uint64_t loadVarInt(std::istream& p_buf) {
std::uint64_t u = 0;
if ( !p_buf )
return u;
std::uint8_t shifts = 0;
char c;
while( p_buf.get(c) ) {
u |= (c & 0x7F) << shifts;
if( !(c & 0x80) )
return u;
shifts += 7;
};
return u;
}
/** \brief Meta-function to get the wire value for a variable-length integer with a given tag number.
*
* This meta-function gives a compile-time wire value corresponding to a variable-length
* integer field (uint32, uint64) with a given tag number. In other words,
* if the protobuf message has a field like: "optional uint32 foo = 3;", then
* the wire value would be "getVarIntWire<3>::value".
*/
template <unsigned int tag>
struct getVarIntWire {
static const unsigned int value = (tag << 3);
};
/** \brief Meta-function to get the wire value for a variable-length integer with a given tag number.
*
* This meta-function gives a compile-time wire value corresponding to a variable-length
* integer field (uint32, uint64) with a given tag number. In other words,
* if the protobuf message has a field like: "optional uint32 foo = 3;", then
* the wire value would be "getIntWire<3>::value".
*/
template <unsigned int tag>
struct getIntWire {
static const unsigned int value = (tag << 3);
};
/** \brief Loads a single signed integer (int32, int64, sint32, sint64) from an input stream.
*
* Loads a single signed integer (int32, int64, sint32, sint64) from an input stream.
* \param p_buf An input stream from which to read.
* \return The signed integer (int32, int64, sint32, sint64) that was read from the input stream.
*/
inline std::int64_t loadSInt(std::istream& p_buf) {
std::uint64_t u = loadVarInt(p_buf);
return (u >> 1) ^ (-static_cast<std::uint64_t>(u & 1));
}
/** \brief Meta-function to get the wire value for a signed integer with a given tag number.
*
* This meta-function gives a compile-time wire value corresponding to a signed integer
* field (int32, int64, sint32, sint64) with a given tag number. In other words,
* if the protobuf message has a field like: "optional int64 foo = 4;", then
* the wire value would be "getSIntWire<4>::value".
*/
template <unsigned int tag>
struct getSIntWire {
static const unsigned int value = (tag << 3);
};
/** \brief Loads a single double (fixed64, sfixed64, double) from an input stream.
*
* Loads a single double (fixed64, sfixed64, double) from an input stream.
* \param p_buf An input stream from which to read.
* \return The double (fixed64, sfixed64, double) that was read from the input stream.
*/
inline double loadDouble(std::istream& p_buf) {
double_to_ulong tmp;
if( ! p_buf.read(reinterpret_cast<char*>(&tmp), sizeof(double)) )
return 0.0;
le2h_2ui32(tmp);
return tmp.d;
}
/** \brief Meta-function to get the wire value for a double with a given tag number.
*
* This meta-function gives a compile-time wire value corresponding to a double
* field (fixed64, sfixed64, double) with a given tag number. In other words,
* if the protobuf message has a field like: "optional double foo = 3;", then
* the wire value would be "getFloatWire<3>::value".
*/
template <unsigned int tag>
struct getDoubleWire {
static const unsigned int value = (tag << 3) | 1;
};
/** \brief Loads a single float (fixed32, sfixed32, float) from an input stream.
*
* Loads a single float (fixed32, sfixed32, float) from an input stream.
* \param p_buf An input stream from which to read.
* \return The float (fixed32, sfixed32, float) that was read from the input stream.
*/
inline float loadFloat(std::istream& p_buf) {
float_to_ulong tmp;
if( ! p_buf.read(reinterpret_cast<char*>(&tmp), sizeof(float)) )
return 0.0;
le2h_1ui32(tmp.ui32);
return tmp.f;
}
/** \brief Meta-function to get the wire value for a float with a given tag number.
*
* This meta-function gives a compile-time wire value corresponding to a float
* field (fixed32, sfixed32, float) with a given tag number. In other words,
* if the protobuf message has a field like: "optional float foo = 4;", then
* the wire value would be "getFloatWire<4>::value".
*/
template <unsigned int tag>
struct getFloatWire {
static const unsigned int value = (tag << 3) | 5;
};
/** \brief Loads a single bool (bool) from an input stream.
*
* Loads a single bool (bool) from an input stream.
* \param p_buf An input stream from which to read.
* \return The bool (bool) that was read from the input stream.
*/
inline bool loadBool(std::istream& p_buf) {
if ( ! p_buf )
return false;
return p_buf.get();
}
/** \brief Meta-function to get the wire value for a bool with a given tag number.
*
* This meta-function gives a compile-time wire value corresponding to a bool
* field with a given tag number. In other words,
* if the protobuf message has a field like: "optional bool foo = 3;", then
* the wire value would be "getBoolWire<3>::value".
*/
template <unsigned int tag>
struct getBoolWire {
static const unsigned int value = (tag << 3);
};
/** \brief Loads a string (string, bytes, message, ..) from an input stream.
*
* Loads a string (string, bytes, message, ..) from an input stream. This is a
* length-delimited field composed of the length (as a varint) and
* a corresponding number of bytes following it. All those bytes are
* read into a string that is returned by this function.
* \note The strings are length-delimited, meaning that they can
* contain zero characters in the middle of them, i.e., they
* are not "C-style" null-terminated strings.
* \param p_buf An input stream from which to read.
* \return The string that was read from the input stream.
*/
inline std::string loadString(std::istream& p_buf) {
unsigned int u = loadVarInt(p_buf);
std::string s(u,'\0');
p_buf.read(&s[0], u);
return s; //NRVO
}
/** \brief Meta-function to get the wire value for a string with a given tag number.
*
* This meta-function gives a compile-time wire value corresponding to a string
* field (string, bytes, message, ..) with a given tag number. In other words,
* if the protobuf message has a field like: "optional string name = 1;", then
* the wire value would be "getStringWire<1>::value".
*/
template <unsigned int tag>
struct getStringWire {
static const unsigned int value = (tag << 3) | 2;
};
/** \brief Skips the next chunk of data, identified by a given wire type.
*
* This function skips the next chunk of data identified by a given wire value.
* This is because the typical work-flow of reading protobuf data is to first
* read the wire value, match it against a number of expected wire values, and
* if not found, either report it as an error (unknown chunk) or simply skip
* the chunk (basic forward compatibility). This function is used in the latter
* case, when skipping a chunk.
* \param p_buf An input stream from which to read.
* \param wire The wire value seen, which describes the chunk of data ahead
* on the input stream.
*/
inline void skipData(std::istream& p_buf, unsigned int wire) {
switch(wire & 0x7) {
case 0:
loadVarInt(p_buf);
break;
case 1:
p_buf.ignore(sizeof(double));
break;
case 2: {
unsigned int u = loadVarInt(p_buf);
p_buf.ignore(u);
break;
};
case 5:
p_buf.ignore(sizeof(float));
break;
default:
break;
}
}
/** \brief Saves a single variable-length integer (uint32, uint64) to an output stream.
*
* Saves a single variable-length integer (uint32, uint64) to an output stream.
* \param OS An output stream to write to.
* \param u The variable-length integer (uint32, uint64) to write to the output stream.
*/
inline void saveVarInt(std::ostream& OS, std::uint64_t u) {
std::uint8_t buf[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; // 80-bits, supports at most a 64-bit varint.
std::uint8_t* pbuf = buf;
*pbuf = (u & 0x7F); u >>= 7;
while(u) {
*pbuf |= 0x80; // set first msb because there is more to come.
pbuf++;
*pbuf = (u & 0x7F); u >>= 7;
};
OS.write(reinterpret_cast<char*>(buf), pbuf - buf + 1);
}
/** \brief Saves a variable-length integer field (uint32, uint64) to an output stream.
*
* Saves a variable-length integer field (uint32, uint64) to an output stream, with a
* given tag number. For example, if the field is "optional uint64 foo = 4;", then
* the field of value "foo_value" could be saved to a stream "OS"
* with "saveVarInt(OS, 4, foo_value);".
* \param OS An output stream to write to.
* \param tag The tag number of the field, to be written into the wire value.
* \param u The variable-length integer (uint32, uint64) to write to the output stream.
*/
inline void saveVarInt(std::ostream& OS, unsigned int tag, std::uint64_t u) {
saveVarInt(OS, (tag << 3)); // wire-type 0: Varint.
saveVarInt(OS, u);
}
/** \brief Saves a variable-length integer field (uint32, uint64) to an output stream.
*
* Saves a variable-length integer field (uint32, uint64) to an output stream, with a
* given tag number. For example, if the field is "optional uint64 foo = 4;", then
* the field of value "foo_value" could be saved to a stream "OS"
* with "saveInt(OS, 4, foo_value);".
* \param OS An output stream to write to.
* \param tag The tag number of the field, to be written into the wire value.
* \param i The variable-length integer (uint32, uint64) to write to the output stream.
*/
inline void saveInt(std::ostream& OS, unsigned int tag, std::int64_t i) {
saveVarInt(OS, (tag << 3)); // wire-type 0: Varint.
int64_to_uint64 tmp; tmp.i64 = i;
saveVarInt(OS, tmp.ui64);
}
/** \brief Saves a single signed integer (int32, int64, sint32, sint64) to an output stream.
*
* Saves a single signed integer (int32, int64, sint32, sint64) to an output stream.
* \param OS An output stream to write to.
* \param i The signed integer (int32, int64, sint32, sint64) to write to the output stream.
*/
inline void saveSInt(std::ostream& OS, std::int64_t i) {
// Apply the ZigZag encoding for the sign:
saveVarInt(OS, (i << 1) ^ (i >> (sizeof(std::int64_t) * 8 - 1)));
}
/** \brief Saves a signed integer field (int32, int64, sint32, sint64) to an output stream.
*
* Saves a signed integer field (int32, int64, sint32, sint64) to an output stream, with a
* given tag number. For example, if the field is "optional int64 foo = 4;", then
* the field of value "foo_value" could be saved to a stream "OS"
* with "saveSInt(OS, 4, foo_value);".
* \param OS An output stream to write to.
* \param tag The tag number of the field, to be written into the wire value.
* \param i The signed integer (int32, int64, sint32, sint64) to write to the output stream.
*/
inline void saveSInt(std::ostream& OS, unsigned int tag, std::int64_t i) {
saveVarInt(OS, (tag << 3)); // wire-type 0: Varint.
saveSInt(OS, i);
}
/** \brief Saves a single double (fixed64, sfixed64, double) to an output stream.
*
* Saves a single double (fixed64, sfixed64, double) to an output stream.
* \param OS An output stream to write to.
* \param d The double (fixed64, sfixed64, double) to write to the output stream.
*/
inline void saveDouble(std::ostream& OS, double d) {
double_to_ulong tmp = { d };
le2h_2ui32(tmp);
OS.write(reinterpret_cast<char*>(&tmp), sizeof(double));
}
/** \brief Saves a double field (fixed64, sfixed64, double) to an output stream.
*
* Saves a double field (fixed64, sfixed64, double) to an output stream, with a
* given tag number. For example, if the field is "optional double foo = 3;", then
* the field of value "foo_value" could be saved to a stream "OS"
* with "saveDouble(OS, 3, foo_value);".
* \param OS An output stream to write to.
* \param tag The tag number of the field, to be written into the wire value.
* \param d The double (fixed64, sfixed64, double) to write to the output stream.
*/
inline void saveDouble(std::ostream& OS, unsigned int tag, double d) {
saveVarInt(OS, (tag << 3) | 1); // wire-type 1: 64-bit.
saveDouble(OS, d);
}
/** \brief Saves a single float (fixed32, sfixed32, float) to an output stream.
*
* Saves a single float (fixed32, sfixed32, float) to an output stream.
* \param OS An output stream to write to.
* \param d The float (fixed32, sfixed32, float) to write to the output stream.
*/
inline void saveFloat(std::ostream& OS, float d) {
float_to_ulong tmp = { d };
le2h_1ui32(tmp.ui32);
OS.write(reinterpret_cast<char*>(&tmp), sizeof(float));
}
/** \brief Saves a float field (fixed32, sfixed32, float) to an output stream.
*
* Saves a float field (fixed32, sfixed32, float) to an output stream, with a
* given tag number. For example, if the field is "optional float foo = 3;", then
* the field of value "foo_value" could be saved to a stream "OS"
* with "saveFloat(OS, 3, foo_value);".
* \param OS An output stream to write to.
* \param tag The tag number of the field, to be written into the wire value.
* \param d The float (fixed32, sfixed32, float) to write to the output stream.
*/
inline void saveFloat(std::ostream& OS, unsigned int tag, float d) {
saveVarInt(OS, (tag << 3) | 5); // wire-type 5: 32-bit.
saveFloat(OS, d);
}
/** \brief Saves a single bool (bool) to an output stream.
*
* Saves a single bool (bool) to an output stream.
* \param OS An output stream to write to.
* \param b The bool (bool) to write to the output stream.
*/
inline void saveBool(std::ostream& OS, bool b) {
char tmp = 0;
if(b) tmp = 1;
OS.write(&tmp, 1);
}
/** \brief Saves a bool field (bool) to an output stream.
*
* Saves a bool field (bool) to an output stream, with a
* given tag number. For example, if the field is "optional bool foo = 3;", then
* the field of value "foo_value" could be saved to a stream "OS"
* with "saveBool(OS, 3, foo_value);".
* \param OS An output stream to write to.
* \param tag The tag number of the field, to be written into the wire value.
* \param b The bool (bool) to write to the output stream.
*/
inline void saveBool(std::ostream& OS, unsigned int tag, bool b) {
saveVarInt(OS, (tag << 3)); // wire-type 0: varint.
saveBool(OS, b);
}
/** \brief Saves a single string (string, bytes, message, ..) to an output stream.
*
* Saves a single string (string, bytes, message, ..) to an output stream.
* \param OS An output stream to write to.
* \param s The string field (string, bytes, message, ..) to write to the output stream.
*/
inline void saveString(std::ostream& OS, const std::string& s) {
unsigned int u = s.size();
saveVarInt(OS, u);
OS.write(s.data(), u);
}
/** \brief Saves a string field (string, bytes, message, ..) to an output stream.
*
* Saves a string field (string, bytes, message, ..) to an output stream, with a
* given tag number. For example, if the field is "optional string foo = 6;", then
* the field of value "foo_value" could be saved to a stream "OS"
* with "saveBool(OS, 6, foo_value);".
* \param OS An output stream to write to.
* \param tag The tag number of the field, to be written into the wire value.
* \param s The string field (string, bytes, message, ..) to write to the output stream.
*/
inline void saveString(std::ostream& OS, unsigned int tag, const std::string& s) {
saveVarInt(OS, (tag << 3) | 2); // wire-type 2: length-delimited.
saveString(OS, s);
}
} // namespace thin_protobuf
#endif
| {
"pile_set_name": "Github"
} |
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
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(FUSION_INCLUDE_AS_VECTOR)
#define FUSION_INCLUDE_AS_VECTOR
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/container/vector/convert.hpp>
#endif
| {
"pile_set_name": "Github"
} |
<?php
namespace Drupal\Tests\comment\Unit\Plugin\views\field;
use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\comment\Plugin\views\field\CommentBulkForm;
use Drupal\Core\Entity\EntityRepositoryInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Tests\UnitTestCase;
/**
* @coversDefaultClass \Drupal\comment\Plugin\views\field\CommentBulkForm
* @group comment
*/
class CommentBulkFormTest extends UnitTestCase {
/**
* {@inheritdoc}
*/
protected function tearDown(): void {
parent::tearDown();
$container = new ContainerBuilder();
\Drupal::setContainer($container);
}
/**
* Tests the constructor assignment of actions.
*/
public function testConstructor() {
$actions = [];
for ($i = 1; $i <= 2; $i++) {
$action = $this->createMock('\Drupal\system\ActionConfigEntityInterface');
$action->expects($this->any())
->method('getType')
->will($this->returnValue('comment'));
$actions[$i] = $action;
}
$action = $this->createMock('\Drupal\system\ActionConfigEntityInterface');
$action->expects($this->any())
->method('getType')
->will($this->returnValue('user'));
$actions[] = $action;
$entity_storage = $this->createMock('Drupal\Core\Entity\EntityStorageInterface');
$entity_storage->expects($this->any())
->method('loadMultiple')
->will($this->returnValue($actions));
$entity_type_manager = $this->createMock(EntityTypeManagerInterface::class);
$entity_type_manager->expects($this->once())
->method('getStorage')
->with('action')
->will($this->returnValue($entity_storage));
$entity_repository = $this->createMock(EntityRepositoryInterface::class);
$language_manager = $this->createMock('Drupal\Core\Language\LanguageManagerInterface');
$messenger = $this->createMock('Drupal\Core\Messenger\MessengerInterface');
$views_data = $this->getMockBuilder('Drupal\views\ViewsData')
->disableOriginalConstructor()
->getMock();
$views_data->expects($this->any())
->method('get')
->with('comment')
->will($this->returnValue(['table' => ['entity type' => 'comment']]));
$container = new ContainerBuilder();
$container->set('views.views_data', $views_data);
$container->set('string_translation', $this->getStringTranslationStub());
\Drupal::setContainer($container);
$storage = $this->createMock('Drupal\views\ViewEntityInterface');
$storage->expects($this->any())
->method('get')
->with('base_table')
->will($this->returnValue('comment'));
$executable = $this->getMockBuilder('Drupal\views\ViewExecutable')
->disableOriginalConstructor()
->getMock();
$executable->storage = $storage;
$display = $this->getMockBuilder('Drupal\views\Plugin\views\display\DisplayPluginBase')
->disableOriginalConstructor()
->getMock();
$definition['title'] = '';
$options = [];
$comment_bulk_form = new CommentBulkForm([], 'comment_bulk_form', $definition, $entity_type_manager, $language_manager, $messenger, $entity_repository);
$comment_bulk_form->init($executable, $display, $options);
$reflected_actions = (new \ReflectionObject($comment_bulk_form))->getProperty('actions');
$reflected_actions->setAccessible(TRUE);
$this->assertEquals(array_slice($actions, 0, -1, TRUE), $reflected_actions->getValue($comment_bulk_form));
}
}
| {
"pile_set_name": "Github"
} |
/*
* Copyright 2017 Red Hat, Inc. and/or its affiliates.
*
* 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.
*/
package org.drools.compiler.oopath.model;
import org.drools.core.phreak.AbstractReactiveObject;
public class Toy extends AbstractReactiveObject {
private String name;
private String owner;
public Toy(String name) {
this.name = name;
}
public String getName() {
return name;
}
public void setName( String name ) {
this.name = name;
notifyModification();
}
public String getOwner() {
return owner;
}
public void setOwner(String owner) {
this.owner = owner;
}
@Override
public String toString() {
return "Toy: " + name;
}
}
| {
"pile_set_name": "Github"
} |
def ode_step(v, i, dt):
"""
Evolves membrane potential by one step of discrete time integration
Args:
v (numpy array of floats)
membrane potential at previous time step of shape (neurons)
v (numpy array of floats)
synaptic input at current time step of shape (neurons)
dt (float)
time step increment
Returns:
v (numpy array of floats)
membrane potential at current time step of shape (neurons)
"""
v = v + dt/tau * (el - v + r*i)
return v
def spike_clamp(v, delta_spike):
"""
Resets membrane potential of neurons if v>= vth
and clamps to vr if interval of time since last spike < t_ref
Args:
v (numpy array of floats)
membrane potential of shape (neurons)
delta_spike (numpy array of floats)
interval of time since last spike of shape (neurons)
Returns:
v (numpy array of floats)
membrane potential of shape (neurons)
spiked (numpy array of floats)
boolean array of neurons that spiked of shape (neurons)
"""
# boolean array spiked indexes neurons with v>=vth
spiked = (v >= vth)
v[spiked] = vr
# boolean array clamped indexes refractory neurons
clamped = (t_ref > delta_spike)
v[clamped] = vr
return v, spiked
# set random number generator
np.random.seed(2020)
# initialize step_end, t_range, n, v_n, syn and raster
t_range = np.arange(0, t_max, dt)
step_end = len(t_range)
n = 500
v_n = el * np.ones([n,step_end])
syn = i_mean * (1 + 0.1*(t_max/dt)**(0.5)*(2*np.random.random([n,step_end])-1))
raster = np.zeros([n,step_end])
# initialize t_ref and last_spike
mu = 0.01
sigma = 0.007
t_ref = mu + sigma*np.random.normal(size=n)
t_ref[t_ref<0] = 0
# initialize t_ref and last_spike
last_spike = -t_ref * np.ones([n])
# loop time steps
for step, t in enumerate(t_range):
if step==0:
continue
v_n[:,step] = ode_step(v_n[:,step-1], syn[:,step], dt)
v_n[:,step], spiked = spike_clamp(v_n[:,step], t - last_spike)
# update raster and last_spike
raster[spiked,step] = 1.
last_spike[spiked] = t
# plot multiple realizations of Vm, spikes and mean spike rate
with plt.xkcd():
plot_all(t_range, v_n, raster) | {
"pile_set_name": "Github"
} |
/*
* linux/fs/nfs/nfs4_fs.h
*
* Copyright (C) 2005 Trond Myklebust
*
* NFSv4-specific filesystem definitions and declarations
*/
#ifndef __LINUX_FS_NFS_NFS4_FS_H
#define __LINUX_FS_NFS_NFS4_FS_H
#if IS_ENABLED(CONFIG_NFS_V4)
#define NFS4_MAX_LOOP_ON_RECOVER (10)
#include <linux/seqlock.h>
struct idmap;
enum nfs4_client_state {
NFS4CLNT_MANAGER_RUNNING = 0,
NFS4CLNT_CHECK_LEASE,
NFS4CLNT_LEASE_EXPIRED,
NFS4CLNT_RECLAIM_REBOOT,
NFS4CLNT_RECLAIM_NOGRACE,
NFS4CLNT_DELEGRETURN,
NFS4CLNT_SESSION_RESET,
NFS4CLNT_LEASE_CONFIRM,
NFS4CLNT_SERVER_SCOPE_MISMATCH,
NFS4CLNT_PURGE_STATE,
NFS4CLNT_BIND_CONN_TO_SESSION,
};
#define NFS4_RENEW_TIMEOUT 0x01
#define NFS4_RENEW_DELEGATION_CB 0x02
struct nfs4_minor_version_ops {
u32 minor_version;
unsigned init_caps;
int (*call_sync)(struct rpc_clnt *clnt,
struct nfs_server *server,
struct rpc_message *msg,
struct nfs4_sequence_args *args,
struct nfs4_sequence_res *res);
bool (*match_stateid)(const nfs4_stateid *,
const nfs4_stateid *);
int (*find_root_sec)(struct nfs_server *, struct nfs_fh *,
struct nfs_fsinfo *);
int (*free_lock_state)(struct nfs_server *,
struct nfs4_lock_state *);
const struct nfs4_state_recovery_ops *reboot_recovery_ops;
const struct nfs4_state_recovery_ops *nograce_recovery_ops;
const struct nfs4_state_maintenance_ops *state_renewal_ops;
};
#define NFS_SEQID_CONFIRMED 1
struct nfs_seqid_counter {
ktime_t create_time;
int owner_id;
int flags;
u32 counter;
spinlock_t lock; /* Protects the list */
struct list_head list; /* Defines sequence of RPC calls */
struct rpc_wait_queue wait; /* RPC call delay queue */
};
struct nfs_seqid {
struct nfs_seqid_counter *sequence;
struct list_head list;
struct rpc_task *task;
};
static inline void nfs_confirm_seqid(struct nfs_seqid_counter *seqid, int status)
{
if (seqid_mutating_err(-status))
seqid->flags |= NFS_SEQID_CONFIRMED;
}
/*
* NFS4 state_owners and lock_owners are simply labels for ordered
* sequences of RPC calls. Their sole purpose is to provide once-only
* semantics by allowing the server to identify replayed requests.
*/
struct nfs4_state_owner {
struct nfs_server *so_server;
struct list_head so_lru;
unsigned long so_expires;
struct rb_node so_server_node;
struct rpc_cred *so_cred; /* Associated cred */
spinlock_t so_lock;
atomic_t so_count;
unsigned long so_flags;
struct list_head so_states;
struct nfs_seqid_counter so_seqid;
seqcount_t so_reclaim_seqcount;
struct mutex so_delegreturn_mutex;
};
enum {
NFS_OWNER_RECLAIM_REBOOT,
NFS_OWNER_RECLAIM_NOGRACE
};
#define NFS_LOCK_NEW 0
#define NFS_LOCK_RECLAIM 1
#define NFS_LOCK_EXPIRED 2
/*
* struct nfs4_state maintains the client-side state for a given
* (state_owner,inode) tuple (OPEN) or state_owner (LOCK).
*
* OPEN:
* In order to know when to OPEN_DOWNGRADE or CLOSE the state on the server,
* we need to know how many files are open for reading or writing on a
* given inode. This information too is stored here.
*
* LOCK: one nfs4_state (LOCK) to hold the lock stateid nfs4_state(OPEN)
*/
struct nfs4_lock_owner {
unsigned int lo_type;
#define NFS4_ANY_LOCK_TYPE (0U)
#define NFS4_FLOCK_LOCK_TYPE (1U << 0)
#define NFS4_POSIX_LOCK_TYPE (1U << 1)
union {
fl_owner_t posix_owner;
pid_t flock_owner;
} lo_u;
};
struct nfs4_lock_state {
struct list_head ls_locks; /* Other lock stateids */
struct nfs4_state * ls_state; /* Pointer to open state */
#define NFS_LOCK_INITIALIZED 0
unsigned long ls_flags;
struct nfs_seqid_counter ls_seqid;
nfs4_stateid ls_stateid;
atomic_t ls_count;
struct nfs4_lock_owner ls_owner;
};
/* bits for nfs4_state->flags */
enum {
LK_STATE_IN_USE,
NFS_DELEGATED_STATE, /* Current stateid is delegation */
NFS_OPEN_STATE, /* OPEN stateid is set */
NFS_O_RDONLY_STATE, /* OPEN stateid has read-only state */
NFS_O_WRONLY_STATE, /* OPEN stateid has write-only state */
NFS_O_RDWR_STATE, /* OPEN stateid has read/write state */
NFS_STATE_RECLAIM_REBOOT, /* OPEN stateid server rebooted */
NFS_STATE_RECLAIM_NOGRACE, /* OPEN stateid needs to recover state */
NFS_STATE_POSIX_LOCKS, /* Posix locks are supported */
NFS_STATE_RECOVERY_FAILED, /* OPEN stateid state recovery failed */
};
struct nfs4_state {
struct list_head open_states; /* List of states for the same state_owner */
struct list_head inode_states; /* List of states for the same inode */
struct list_head lock_states; /* List of subservient lock stateids */
struct nfs4_state_owner *owner; /* Pointer to the open owner */
struct inode *inode; /* Pointer to the inode */
unsigned long flags; /* Do we hold any locks? */
spinlock_t state_lock; /* Protects the lock_states list */
seqlock_t seqlock; /* Protects the stateid/open_stateid */
nfs4_stateid stateid; /* Current stateid: may be delegation */
nfs4_stateid open_stateid; /* OPEN stateid */
/* The following 3 fields are protected by owner->so_lock */
unsigned int n_rdonly; /* Number of read-only references */
unsigned int n_wronly; /* Number of write-only references */
unsigned int n_rdwr; /* Number of read/write references */
fmode_t state; /* State on the server (R,W, or RW) */
atomic_t count;
};
struct nfs4_exception {
long timeout;
int retry;
struct nfs4_state *state;
struct inode *inode;
};
struct nfs4_state_recovery_ops {
int owner_flag_bit;
int state_flag_bit;
int (*recover_open)(struct nfs4_state_owner *, struct nfs4_state *);
int (*recover_lock)(struct nfs4_state *, struct file_lock *);
int (*establish_clid)(struct nfs_client *, struct rpc_cred *);
struct rpc_cred * (*get_clid_cred)(struct nfs_client *);
int (*reclaim_complete)(struct nfs_client *, struct rpc_cred *);
int (*detect_trunking)(struct nfs_client *, struct nfs_client **,
struct rpc_cred *);
};
struct nfs4_state_maintenance_ops {
int (*sched_state_renewal)(struct nfs_client *, struct rpc_cred *, unsigned);
struct rpc_cred * (*get_state_renewal_cred_locked)(struct nfs_client *);
int (*renew_lease)(struct nfs_client *, struct rpc_cred *);
};
extern const struct dentry_operations nfs4_dentry_operations;
/* dir.c */
int nfs_atomic_open(struct inode *, struct dentry *, struct file *,
unsigned, umode_t, int *);
/* super.c */
extern struct file_system_type nfs4_fs_type;
/* nfs4namespace.c */
rpc_authflavor_t nfs_find_best_sec(struct nfs4_secinfo_flavors *);
struct rpc_clnt *nfs4_create_sec_client(struct rpc_clnt *, struct inode *, struct qstr *);
struct vfsmount *nfs4_submount(struct nfs_server *, struct dentry *,
struct nfs_fh *, struct nfs_fattr *);
/* nfs4proc.c */
extern int nfs4_proc_setclientid(struct nfs_client *, u32, unsigned short, struct rpc_cred *, struct nfs4_setclientid_res *);
extern int nfs4_proc_setclientid_confirm(struct nfs_client *, struct nfs4_setclientid_res *arg, struct rpc_cred *);
extern int nfs4_proc_get_rootfh(struct nfs_server *, struct nfs_fh *, struct nfs_fsinfo *);
extern int nfs4_proc_bind_conn_to_session(struct nfs_client *, struct rpc_cred *cred);
extern int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred);
extern int nfs4_destroy_clientid(struct nfs_client *clp);
extern int nfs4_init_clientid(struct nfs_client *, struct rpc_cred *);
extern int nfs41_init_clientid(struct nfs_client *, struct rpc_cred *);
extern int nfs4_do_close(struct nfs4_state *state, gfp_t gfp_mask, int wait);
extern int nfs4_server_capabilities(struct nfs_server *server, struct nfs_fh *fhandle);
extern int nfs4_proc_fs_locations(struct rpc_clnt *, struct inode *, const struct qstr *,
struct nfs4_fs_locations *, struct page *);
extern struct rpc_clnt *nfs4_proc_lookup_mountpoint(struct inode *, struct qstr *,
struct nfs_fh *, struct nfs_fattr *);
extern int nfs4_proc_secinfo(struct inode *, const struct qstr *, struct nfs4_secinfo_flavors *);
extern const struct xattr_handler *nfs4_xattr_handlers[];
extern int nfs4_set_rw_stateid(nfs4_stateid *stateid,
const struct nfs_open_context *ctx,
const struct nfs_lock_context *l_ctx,
fmode_t fmode);
#if defined(CONFIG_NFS_V4_1)
static inline struct nfs4_session *nfs4_get_session(const struct nfs_server *server)
{
return server->nfs_client->cl_session;
}
extern int nfs4_setup_sequence(const struct nfs_server *server,
struct nfs4_sequence_args *args, struct nfs4_sequence_res *res,
struct rpc_task *task);
extern int nfs41_setup_sequence(struct nfs4_session *session,
struct nfs4_sequence_args *args, struct nfs4_sequence_res *res,
struct rpc_task *task);
extern int nfs4_proc_create_session(struct nfs_client *, struct rpc_cred *);
extern int nfs4_proc_destroy_session(struct nfs4_session *, struct rpc_cred *);
extern int nfs4_proc_get_lease_time(struct nfs_client *clp,
struct nfs_fsinfo *fsinfo);
extern int nfs4_proc_layoutcommit(struct nfs4_layoutcommit_data *data,
bool sync);
static inline bool
is_ds_only_client(struct nfs_client *clp)
{
return (clp->cl_exchange_flags & EXCHGID4_FLAG_MASK_PNFS) ==
EXCHGID4_FLAG_USE_PNFS_DS;
}
static inline bool
is_ds_client(struct nfs_client *clp)
{
return clp->cl_exchange_flags & EXCHGID4_FLAG_USE_PNFS_DS;
}
#else /* CONFIG_NFS_v4_1 */
static inline struct nfs4_session *nfs4_get_session(const struct nfs_server *server)
{
return NULL;
}
static inline int nfs4_setup_sequence(const struct nfs_server *server,
struct nfs4_sequence_args *args, struct nfs4_sequence_res *res,
struct rpc_task *task)
{
rpc_call_start(task);
return 0;
}
static inline bool
is_ds_only_client(struct nfs_client *clp)
{
return false;
}
static inline bool
is_ds_client(struct nfs_client *clp)
{
return false;
}
#endif /* CONFIG_NFS_V4_1 */
extern const struct nfs4_minor_version_ops *nfs_v4_minor_ops[];
extern const u32 nfs4_fattr_bitmap[3];
extern const u32 nfs4_statfs_bitmap[3];
extern const u32 nfs4_pathconf_bitmap[3];
extern const u32 nfs4_fsinfo_bitmap[3];
extern const u32 nfs4_fs_locations_bitmap[3];
void nfs4_free_client(struct nfs_client *);
struct nfs_client *nfs4_alloc_client(const struct nfs_client_initdata *);
/* nfs4renewd.c */
extern void nfs4_schedule_state_renewal(struct nfs_client *);
extern void nfs4_renewd_prepare_shutdown(struct nfs_server *);
extern void nfs4_kill_renewd(struct nfs_client *);
extern void nfs4_renew_state(struct work_struct *);
/* nfs4state.c */
struct rpc_cred *nfs4_get_setclientid_cred(struct nfs_client *clp);
struct rpc_cred *nfs4_get_machine_cred_locked(struct nfs_client *clp);
struct rpc_cred *nfs4_get_renew_cred_locked(struct nfs_client *clp);
int nfs4_discover_server_trunking(struct nfs_client *clp,
struct nfs_client **);
int nfs40_discover_server_trunking(struct nfs_client *clp,
struct nfs_client **, struct rpc_cred *);
#if defined(CONFIG_NFS_V4_1)
struct rpc_cred *nfs4_get_exchange_id_cred(struct nfs_client *clp);
int nfs41_discover_server_trunking(struct nfs_client *clp,
struct nfs_client **, struct rpc_cred *);
extern void nfs4_schedule_session_recovery(struct nfs4_session *, int);
extern void nfs41_server_notify_target_slotid_update(struct nfs_client *clp);
extern void nfs41_server_notify_highest_slotid_update(struct nfs_client *clp);
#else
static inline void nfs4_schedule_session_recovery(struct nfs4_session *session, int err)
{
}
#endif /* CONFIG_NFS_V4_1 */
extern struct nfs4_state_owner *nfs4_get_state_owner(struct nfs_server *, struct rpc_cred *, gfp_t);
extern void nfs4_put_state_owner(struct nfs4_state_owner *);
extern void nfs4_purge_state_owners(struct nfs_server *);
extern struct nfs4_state * nfs4_get_open_state(struct inode *, struct nfs4_state_owner *);
extern void nfs4_put_open_state(struct nfs4_state *);
extern void nfs4_close_state(struct nfs4_state *, fmode_t);
extern void nfs4_close_sync(struct nfs4_state *, fmode_t);
extern void nfs4_state_set_mode_locked(struct nfs4_state *, fmode_t);
extern void nfs_inode_find_state_and_recover(struct inode *inode,
const nfs4_stateid *stateid);
extern void nfs4_schedule_lease_recovery(struct nfs_client *);
extern int nfs4_wait_clnt_recover(struct nfs_client *clp);
extern int nfs4_client_recover_expired_lease(struct nfs_client *clp);
extern void nfs4_schedule_state_manager(struct nfs_client *);
extern void nfs4_schedule_path_down_recovery(struct nfs_client *clp);
extern int nfs4_schedule_stateid_recovery(const struct nfs_server *, struct nfs4_state *);
extern void nfs41_handle_sequence_flag_errors(struct nfs_client *clp, u32 flags);
extern void nfs41_handle_server_scope(struct nfs_client *,
struct nfs41_server_scope **);
extern void nfs4_put_lock_state(struct nfs4_lock_state *lsp);
extern int nfs4_set_lock_state(struct nfs4_state *state, struct file_lock *fl);
extern int nfs4_select_rw_stateid(nfs4_stateid *, struct nfs4_state *,
fmode_t, const struct nfs_lockowner *);
extern struct nfs_seqid *nfs_alloc_seqid(struct nfs_seqid_counter *counter, gfp_t gfp_mask);
extern int nfs_wait_on_sequence(struct nfs_seqid *seqid, struct rpc_task *task);
extern void nfs_increment_open_seqid(int status, struct nfs_seqid *seqid);
extern void nfs_increment_lock_seqid(int status, struct nfs_seqid *seqid);
extern void nfs_release_seqid(struct nfs_seqid *seqid);
extern void nfs_free_seqid(struct nfs_seqid *seqid);
extern void nfs4_free_lock_state(struct nfs_server *server, struct nfs4_lock_state *lsp);
extern const nfs4_stateid zero_stateid;
/* nfs4super.c */
struct nfs_mount_info;
extern struct nfs_subversion nfs_v4;
struct dentry *nfs4_try_mount(int, const char *, struct nfs_mount_info *, struct nfs_subversion *);
extern bool nfs4_disable_idmapping;
extern unsigned short max_session_slots;
extern unsigned short send_implementation_id;
#define NFS4_CLIENT_ID_UNIQ_LEN (64)
extern char nfs4_client_id_uniquifier[NFS4_CLIENT_ID_UNIQ_LEN];
/* nfs4sysctl.c */
#ifdef CONFIG_SYSCTL
int nfs4_register_sysctl(void);
void nfs4_unregister_sysctl(void);
#else
static inline int nfs4_register_sysctl(void)
{
return 0;
}
static inline void nfs4_unregister_sysctl(void)
{
}
#endif
/* nfs4xdr.c */
extern struct rpc_procinfo nfs4_procedures[];
struct nfs4_mount_data;
/* callback_xdr.c */
extern struct svc_version nfs4_callback_version1;
extern struct svc_version nfs4_callback_version4;
static inline void nfs4_stateid_copy(nfs4_stateid *dst, const nfs4_stateid *src)
{
memcpy(dst, src, sizeof(*dst));
}
static inline bool nfs4_stateid_match(const nfs4_stateid *dst, const nfs4_stateid *src)
{
return memcmp(dst, src, sizeof(*dst)) == 0;
}
static inline bool nfs4_valid_open_stateid(const struct nfs4_state *state)
{
return test_bit(NFS_STATE_RECOVERY_FAILED, &state->flags) == 0;
}
#else
#define nfs4_close_state(a, b) do { } while (0)
#define nfs4_close_sync(a, b) do { } while (0)
#endif /* CONFIG_NFS_V4 */
#endif /* __LINUX_FS_NFS_NFS4_FS.H */
| {
"pile_set_name": "Github"
} |
// SPDX-License-Identifier: GPL-2.0+
/*
*
* Copyright (c) 2015 Free Electrons
* Copyright (c) 2015 NextThing Co.
* Copyright (c) 2018 Microchip Technology, Inc.
*
* Maxime Ripard <maxime.ripard@free-electrons.com>
* Eugen Hristev <eugen.hristev@microchip.com>
*
*/
#include <common.h>
#include <dm.h>
#include <log.h>
#include <w1.h>
#include <w1-eeprom.h>
#include <dm/device-internal.h>
int w1_eeprom_read_buf(struct udevice *dev, unsigned int offset,
u8 *buf, unsigned int count)
{
const struct w1_eeprom_ops *ops = device_get_ops(dev);
u64 id = 0;
int ret;
if (!ops->read_buf)
return -ENOSYS;
ret = w1_eeprom_get_id(dev, &id);
if (ret)
return ret;
if (!id)
return -ENODEV;
return ops->read_buf(dev, offset, buf, count);
}
int w1_eeprom_register_new_device(u64 id)
{
u8 family = id & 0xff;
int ret;
struct udevice *dev;
for (ret = uclass_first_device(UCLASS_W1_EEPROM, &dev);
!ret && dev;
uclass_next_device(&dev)) {
if (ret || !dev) {
debug("cannot find w1 eeprom dev\n");
return ret;
}
if (dev_get_driver_data(dev) == family) {
struct w1_device *w1;
w1 = dev_get_parent_platdata(dev);
if (w1->id) /* device already in use */
continue;
w1->id = id;
debug("%s: Match found: %s:%s %llx\n", __func__,
dev->name, dev->driver->name, id);
return 0;
}
}
debug("%s: No matches found: error %d\n", __func__, ret);
return ret;
}
int w1_eeprom_get_id(struct udevice *dev, u64 *id)
{
struct w1_device *w1 = dev_get_parent_platdata(dev);
if (!w1)
return -ENODEV;
*id = w1->id;
return 0;
}
UCLASS_DRIVER(w1_eeprom) = {
.name = "w1_eeprom",
.id = UCLASS_W1_EEPROM,
.flags = DM_UC_FLAG_SEQ_ALIAS,
#if CONFIG_IS_ENABLED(OF_CONTROL)
.post_bind = dm_scan_fdt_dev,
#endif
};
int w1_eeprom_dm_init(void)
{
struct udevice *dev;
struct uclass *uc;
int ret;
ret = uclass_get(UCLASS_W1_EEPROM, &uc);
if (ret) {
debug("W1_EEPROM uclass not available\n");
return ret;
}
uclass_foreach_dev(dev, uc) {
ret = device_probe(dev);
if (ret == -ENODEV) { /* No such device. */
debug("W1_EEPROM not available.\n");
continue;
}
if (ret) { /* Other error. */
printf("W1_EEPROM probe failed, error %d\n", ret);
continue;
}
}
return 0;
}
| {
"pile_set_name": "Github"
} |
CREATE TABLE memos (
id integer,
title text,
content text
);
INSERT INTO memos VALUES (1, 'PostgreSQL', 'PostgreSQL is a RDBMS.');
INSERT INTO memos VALUES (2, 'Groonga', 'Groonga is fast full text search engine.');
INSERT INTO memos VALUES (3, 'PGroonga', 'PGroonga is a PostgreSQL extension that uses Groonga.');
CREATE INDEX pgrn_index ON memos
USING pgroonga ((ARRAY[title, content])
pgroonga_text_array_full_text_search_ops_v2);
SET enable_seqscan = off;
SET enable_indexscan = on;
SET enable_bitmapscan = off;
\pset format unaligned
EXPLAIN (COSTS OFF)
SELECT id, title, content, pgroonga_score(tableoid, ctid)
FROM memos
WHERE ARRAY[title, content] &@
('PostgreSQL',
NULL,
NULL,
'pgrn_index')::pgroonga_full_text_search_condition_with_scorers
\g |sed -r -e "s/('.+'|ROW.+)::pgroonga/pgroonga/g"
QUERY PLAN
Index Scan using pgrn_index on memos
Index Cond: (ARRAY[title, content] &@ pgroonga_full_text_search_condition_with_scorers)
(2 rows)
\pset format aligned
SELECT id, title, content, pgroonga_score(tableoid, ctid)
FROM memos
WHERE ARRAY[title, content] &@
('PostgreSQL',
NULL,
NULL,
'pgrn_index')::pgroonga_full_text_search_condition_with_scorers;
id | title | content | pgroonga_score
----+------------+-------------------------------------------------------+----------------
1 | PostgreSQL | PostgreSQL is a RDBMS. | 2
3 | PGroonga | PGroonga is a PostgreSQL extension that uses Groonga. | 1
(2 rows)
DROP TABLE memos;
| {
"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.
#
ignite.version=2.10.0-SNAPSHOT
ignite.build=0
ignite.revision=DEV
ignite.rel.date=01011970
ignite.update.status.params=test=vfvfvskfkeievskjv
ignite.update.notifier.enabled.by.default=false
| {
"pile_set_name": "Github"
} |
// SPDX-License-Identifier: GPL-2.0
#include <linux/cache.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/pid_namespace.h>
#include "internal.h"
/*
* /proc/self:
*/
static const char *proc_self_get_link(struct dentry *dentry,
struct inode *inode,
struct delayed_call *done)
{
struct pid_namespace *ns = inode->i_sb->s_fs_info;
pid_t tgid = task_tgid_nr_ns(current, ns);
char *name;
if (!tgid)
return ERR_PTR(-ENOENT);
/* max length of unsigned int in decimal + NULL term */
name = kmalloc(10 + 1, dentry ? GFP_KERNEL : GFP_ATOMIC);
if (unlikely(!name))
return dentry ? ERR_PTR(-ENOMEM) : ERR_PTR(-ECHILD);
sprintf(name, "%u", tgid);
set_delayed_call(done, kfree_link, name);
return name;
}
static const struct inode_operations proc_self_inode_operations = {
.get_link = proc_self_get_link,
};
static unsigned self_inum __ro_after_init;
int proc_setup_self(struct super_block *s)
{
struct inode *root_inode = d_inode(s->s_root);
struct pid_namespace *ns = s->s_fs_info;
struct dentry *self;
inode_lock(root_inode);
self = d_alloc_name(s->s_root, "self");
if (self) {
struct inode *inode = new_inode_pseudo(s);
if (inode) {
inode->i_ino = self_inum;
inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
inode->i_mode = S_IFLNK | S_IRWXUGO;
inode->i_uid = GLOBAL_ROOT_UID;
inode->i_gid = GLOBAL_ROOT_GID;
inode->i_op = &proc_self_inode_operations;
d_add(self, inode);
} else {
dput(self);
self = ERR_PTR(-ENOMEM);
}
} else {
self = ERR_PTR(-ENOMEM);
}
inode_unlock(root_inode);
if (IS_ERR(self)) {
pr_err("proc_fill_super: can't allocate /proc/self\n");
return PTR_ERR(self);
}
ns->proc_self = self;
return 0;
}
void __init proc_self_init(void)
{
proc_alloc_inum(&self_inum);
}
| {
"pile_set_name": "Github"
} |
/**
* Copyright 2019 Anthony Trinh
*
* 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.
*/
package ch.qos.logback.classic.testUtil;
import ch.qos.logback.classic.pattern.ClassicConverter;
import ch.qos.logback.classic.spi.ILoggingEvent;
public class SampleConverter extends ClassicConverter {
static public final String SAMPLE_STR = "sample";
@Override
public String convert(ILoggingEvent event) {
return SAMPLE_STR;
}
}
| {
"pile_set_name": "Github"
} |
#!/bin/bash
mv DESCRIPTION DESCRIPTION.old
grep -v '^Priority: ' DESCRIPTION.old > DESCRIPTION
mkdir -p ~/.R
echo -e "CC=$CC
FC=$FC
CXX=$CXX
CXX98=$CXX
CXX11=$CXX
CXX14=$CXX" > ~/.R/Makevars
$R CMD INSTALL --build . | {
"pile_set_name": "Github"
} |
package raft
import (
"fmt"
"io"
"time"
"github.com/armon/go-metrics"
)
// FSM provides an interface that can be implemented by
// clients to make use of the replicated log.
type FSM interface {
// Apply log is invoked once a log entry is committed.
// It returns a value which will be made available in the
// ApplyFuture returned by Raft.Apply method if that
// method was called on the same Raft node as the FSM.
Apply(*Log) interface{}
// Snapshot is used to support log compaction. This call should
// return an FSMSnapshot which can be used to save a point-in-time
// snapshot of the FSM. Apply and Snapshot are not called in multiple
// threads, but Apply will be called concurrently with Persist. This means
// the FSM should be implemented in a fashion that allows for concurrent
// updates while a snapshot is happening.
Snapshot() (FSMSnapshot, error)
// Restore is used to restore an FSM from a snapshot. It is not called
// concurrently with any other command. The FSM must discard all previous
// state.
Restore(io.ReadCloser) error
}
// BatchingFSM extends the FSM interface to add an ApplyBatch function. This can
// optionally be implemented by clients to enable multiple logs to be applied to
// the FSM in batches. Up to MaxAppendEntries could be sent in a batch.
type BatchingFSM interface {
// ApplyBatch is invoked once a batch of log entries has been committed and
// are ready to be applied to the FSM. ApplyBatch will take in an array of
// log entries. These log entries will be in the order they were committed,
// will not have gaps, and could be of a few log types. Clients should check
// the log type prior to attempting to decode the data attached. Presently
// the LogCommand and LogConfiguration types will be sent.
//
// The returned slice must be the same length as the input and each response
// should correlate to the log at the same index of the input. The returned
// values will be made available in the ApplyFuture returned by Raft.Apply
// method if that method was called on the same Raft node as the FSM.
ApplyBatch([]*Log) []interface{}
FSM
}
// FSMSnapshot is returned by an FSM in response to a Snapshot
// It must be safe to invoke FSMSnapshot methods with concurrent
// calls to Apply.
type FSMSnapshot interface {
// Persist should dump all necessary state to the WriteCloser 'sink',
// and call sink.Close() when finished or call sink.Cancel() on error.
Persist(sink SnapshotSink) error
// Release is invoked when we are finished with the snapshot.
Release()
}
// runFSM is a long running goroutine responsible for applying logs
// to the FSM. This is done async of other logs since we don't want
// the FSM to block our internal operations.
func (r *Raft) runFSM() {
var lastIndex, lastTerm uint64
batchingFSM, batchingEnabled := r.fsm.(BatchingFSM)
configStore, configStoreEnabled := r.fsm.(ConfigurationStore)
commitSingle := func(req *commitTuple) {
// Apply the log if a command or config change
var resp interface{}
// Make sure we send a response
defer func() {
// Invoke the future if given
if req.future != nil {
req.future.response = resp
req.future.respond(nil)
}
}()
switch req.log.Type {
case LogCommand:
start := time.Now()
resp = r.fsm.Apply(req.log)
metrics.MeasureSince([]string{"raft", "fsm", "apply"}, start)
case LogConfiguration:
if !configStoreEnabled {
// Return early to avoid incrementing the index and term for
// an unimplemented operation.
return
}
start := time.Now()
configStore.StoreConfiguration(req.log.Index, DecodeConfiguration(req.log.Data))
metrics.MeasureSince([]string{"raft", "fsm", "store_config"}, start)
}
// Update the indexes
lastIndex = req.log.Index
lastTerm = req.log.Term
}
commitBatch := func(reqs []*commitTuple) {
if !batchingEnabled {
for _, ct := range reqs {
commitSingle(ct)
}
return
}
// Only send LogCommand and LogConfiguration log types. LogBarrier types
// will not be sent to the FSM.
shouldSend := func(l *Log) bool {
switch l.Type {
case LogCommand, LogConfiguration:
return true
}
return false
}
var lastBatchIndex, lastBatchTerm uint64
sendLogs := make([]*Log, 0, len(reqs))
for _, req := range reqs {
if shouldSend(req.log) {
sendLogs = append(sendLogs, req.log)
}
lastBatchIndex = req.log.Index
lastBatchTerm = req.log.Term
}
var responses []interface{}
if len(sendLogs) > 0 {
start := time.Now()
responses = batchingFSM.ApplyBatch(sendLogs)
metrics.MeasureSince([]string{"raft", "fsm", "applyBatch"}, start)
metrics.AddSample([]string{"raft", "fsm", "applyBatchNum"}, float32(len(reqs)))
// Ensure we get the expected responses
if len(sendLogs) != len(responses) {
panic("invalid number of responses")
}
}
// Update the indexes
lastIndex = lastBatchIndex
lastTerm = lastBatchTerm
var i int
for _, req := range reqs {
var resp interface{}
// If the log was sent to the FSM, retrieve the response.
if shouldSend(req.log) {
resp = responses[i]
i++
}
if req.future != nil {
req.future.response = resp
req.future.respond(nil)
}
}
}
restore := func(req *restoreFuture) {
// Open the snapshot
meta, source, err := r.snapshots.Open(req.ID)
if err != nil {
req.respond(fmt.Errorf("failed to open snapshot %v: %v", req.ID, err))
return
}
// Attempt to restore
start := time.Now()
if err := r.fsm.Restore(source); err != nil {
req.respond(fmt.Errorf("failed to restore snapshot %v: %v", req.ID, err))
source.Close()
return
}
source.Close()
metrics.MeasureSince([]string{"raft", "fsm", "restore"}, start)
// Update the last index and term
lastIndex = meta.Index
lastTerm = meta.Term
req.respond(nil)
}
snapshot := func(req *reqSnapshotFuture) {
// Is there something to snapshot?
if lastIndex == 0 {
req.respond(ErrNothingNewToSnapshot)
return
}
// Start a snapshot
start := time.Now()
snap, err := r.fsm.Snapshot()
metrics.MeasureSince([]string{"raft", "fsm", "snapshot"}, start)
// Respond to the request
req.index = lastIndex
req.term = lastTerm
req.snapshot = snap
req.respond(err)
}
for {
select {
case ptr := <-r.fsmMutateCh:
switch req := ptr.(type) {
case []*commitTuple:
commitBatch(req)
case *restoreFuture:
restore(req)
default:
panic(fmt.Errorf("bad type passed to fsmMutateCh: %#v", ptr))
}
case req := <-r.fsmSnapshotCh:
snapshot(req)
case <-r.shutdownCh:
return
}
}
}
| {
"pile_set_name": "Github"
} |
using System;
using System.Windows;
using Cirrious.CrossCore;
using Cirrious.MvvmCross.ViewModels;
using Cirrious.MvvmCross.Wpf.Views;
namespace $rootnamespace$
{
public partial class App : Application
{
private bool _setupComplete;
private void DoSetup()
{
LoadMvxAssemblyResources();
var presenter = new MvxSimpleWpfViewPresenter(MainWindow);
var setup = new Setup(Dispatcher, presenter);
setup.Initialize();
var start = Mvx.Resolve<IMvxAppStart>();
start.Start();
_setupComplete = true;
}
protected override void OnActivated(EventArgs e)
{
if (!_setupComplete)
DoSetup();
base.OnActivated(e);
}
private void LoadMvxAssemblyResources()
{
for (var i = 0;; i++)
{
string key = "MvxAssemblyImport" + i;
var data = TryFindResource(key);
if (data == null)
return;
}
}
}
} | {
"pile_set_name": "Github"
} |
/*
* The MIT License
* Copyright © 2014-2019 Ilkka Seppälä
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.iluwatar.layers.dto;
import java.util.Optional;
/**
* DTO for cake layers.
*/
public class CakeLayerInfo {
public final Optional<Long> id;
public final String name;
public final int calories;
/**
* Constructor.
*/
public CakeLayerInfo(Long id, String name, int calories) {
this.id = Optional.of(id);
this.name = name;
this.calories = calories;
}
/**
* Constructor.
*/
public CakeLayerInfo(String name, int calories) {
this.id = Optional.empty();
this.name = name;
this.calories = calories;
}
@Override
public String toString() {
return String.format("CakeLayerInfo id=%d name=%s calories=%d", id.orElse(-1L), name, calories);
}
}
| {
"pile_set_name": "Github"
} |
/*
* JSweet transpiler - http://www.jsweet.org
* Copyright (C) 2015 CINCHEO SAS <renaud.pawlak@cincheo.fr>
*
* 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, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
package org.jsweet;
import static org.jsweet.transpiler.TranspilationHandler.OUTPUT_LOGGER;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
import org.apache.log4j.Level;
import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.jsweet.transpiler.EcmaScriptComplianceLevel;
import org.jsweet.transpiler.JSweetFactory;
import org.jsweet.transpiler.JSweetOptions;
import org.jsweet.transpiler.JSweetProblem;
import org.jsweet.transpiler.JSweetTranspiler;
import org.jsweet.transpiler.ModuleKind;
import org.jsweet.transpiler.ModuleResolution;
import org.jsweet.transpiler.SourceFile;
import org.jsweet.transpiler.util.ConsoleTranspilationHandler;
import org.jsweet.transpiler.util.ErrorCountTranspilationHandler;
import org.jsweet.transpiler.util.ProcessUtil;
import org.jsweet.transpiler.util.Util;
import com.martiansoftware.jsap.FlaggedOption;
import com.martiansoftware.jsap.JSAP;
import com.martiansoftware.jsap.JSAPException;
import com.martiansoftware.jsap.JSAPResult;
import com.martiansoftware.jsap.Switch;
import com.martiansoftware.jsap.stringparsers.EnumeratedStringParser;
import com.martiansoftware.jsap.stringparsers.FileStringParser;
/**
* The command line launcher for the JSweet transpiler.
*
* <pre>
Command line options:
[-h|--help]
[-w|--watch]
Start a process that watches the input directories for changes and
re-run transpilation on-the-fly.
[-v|--verbose]
Turn on general information logging (INFO LEVEL)
[-V|--veryVerbose]
Turn on all levels of logging
[--encoding <encoding>]
Force the Java compiler to use a specific encoding (UTF-8, UTF-16, ...).
(default: UTF-8)
[--outEncoding <encoding>]
Force the generated TypeScript output code for the given encoding (UTF-8, UTF-16, ...).
(default: UTF-8)
[--jdkHome <jdkHome>]
Set the JDK home directory to be used to find the Java compiler. If not
set, the transpiler will try to use the JAVA_HOME environment variable.
Note that the expected JDK version is greater or equals to version 8.
(-i|--input) input1:input2:...:inputN
An input directory (or column-separated input directories) containing
Java files to be transpiled. Java files will be recursively looked up in
sub-directories. Inclusion and exclusion patterns can be defined with
the 'includes' and 'excludes' options.
(--extraInput) input1:input2:...:inputN
An input directory (or column-separated input directories) containing
Java source files to help the tranpilation (typically for libraries).
Files in these directories will not generate any corresponding TS files
but will help resolving various generation issues (such as default
methods, tricking overloading cases, ...).
[--includes includes1:includes2:...:includesN ]
A column-separated list of expressions matching files to be included
(relatively to the input directory).
[--excludes excludes1:excludes2:...:excludesN ]
A column-separated list of expressions matching files to be excluded
(relatively to the input directory).
[(-d|--defInput) defInput1:defInput2:...:defInputN ]
An input directory (or column-separated input directories) containing
TypeScript definition files (*.d.ts) to be used for transpilation.
Definition files will be recursively looked up in sub-diredctories.
[--noRootDirectories]
Skip the root directories (i.e. packages annotated with
@jsweet.lang.Root) so that the generated file hierarchy starts at the
root directories rather than including the entire directory structure.
[--tsout <tsout>]
Specify where to place generated TypeScript files. (default: .ts)
[(-o|--jsout) <jsout>]
Specify where to place generated JavaScript files (ignored if jsFile is
specified). (default: js)
[--disableSinglePrecisionFloats]
By default, for a target version >=ES5, JSweet will force Java floats to
be mapped to JavaScript numbers that will be constrained with ES5
Math.fround function. If this option is true, then the calls to
Math.fround are erased and the generated program will use the JavaScript
default precision (double precision).
[--tsOnly]
Do not compile the TypeScript output (let an external TypeScript
compiler do so).
[--ignoreDefinitions]
Ignore definitions from def.* packages, so that they are not generated
in d.ts definition files. If this option is not set, the transpiler
generates d.ts definition files in the directory given by the tsout
option.
[--ignoreJavaErrors]
Ignore Java compilation errors. Do not use unless you know what you are
doing.
[--declaration]
Generate the d.ts files along with the js files, so that other programs
can use them to compile.
[--dtsout <dtsout>]
Specify where to place generated d.ts files when the declaration option
is set (by default, d.ts files are generated in the JavaScript output
directory - next to the corresponding js files).
[--candiesJsOut <candiesJsOut>]
Specify where to place extracted JavaScript files from candies.
(default: js/candies)
[--sourceRoot <sourceRoot>]
Specify the location where debugger should locate Java files instead of
source locations. Use this flag if the sources will be located at
run-time in a different location than that at design-time. The location
specified will be embedded in the sourceMap to direct the debugger where
the source files will be located.
[--classpath <classpath>]
The JSweet transpilation classpath (candy jars). This classpath should
at least contain the core candy.
[(-m|--module) <module>]
The module kind (none, commonjs, amd, system, umd, es2015). (default:
none)
[--moduleResolution <moduleResolution>]
The module resolution strategy (classic, node). (default: classic)
[-b|--bundle]
Bundle up all the generated code in a single file, which can be used in
the browser. The bundle files are called 'bundle.ts', 'bundle.d.ts', or
'bundle.js' depending on the kind of generated code. NOTE: bundles are
not compatible with any module kind other than 'none'.
[(-f|--factoryClassName) <factoryClassName>]
Use the given factory to tune the default transpiler behavior.
[--sourceMap]
Generate source map files for the Java files, so that it is possible to
debug Java files directly with a debugger that supports source maps
(most JavaScript debuggers).
[--enableAssertions]
Java 'assert' statements are transpiled as runtime JavaScript checks.
[--header <header>]
A file that contains a header to be written at the beginning of each
generated file. If left unspecified, JSweet will generate a default
header.
[--workingDir <workingDir>]
The directory JSweet uses to store temporary files such as extracted
candies. JSweet uses '.jsweet' if left unspecified.
[--targetVersion <targetVersion>]
The EcmaScript target (JavaScript) version. Possible values: [ES3, ES5,
ES6] (default: ES3)
[--extraSystemPath <extraSystemPath>]
Allow an extra path to be added to the system path.
[--disableStaticsLazyInitialization]
Do not generate lazy initialization code of static fields that is meant
to emulate the Java behavior. When disables, the code is more readable
but it may result into runtime static initialization issues (cross-class
static dependencies).
* </pre>
*
* @author Renaud Pawlak
*/
public class JSweetCommandLineLauncher {
private static final Logger logger = Logger.getLogger(JSweetCommandLineLauncher.class);
private static int errorCount = 0;
private static Pattern toPattern(String expression) {
if (!expression.contains("*") && !expression.contains(".")) {
expression += "*";
}
return Pattern.compile(expression.replace(".", "\\.").replace("*", ".*"));
}
private JSweetCommandLineLauncher() {
}
/**
* JSweet transpiler command line entry point. To use the JSweet transpiler
* from Java, see {@link #transpileWithArgs(String[])} or
* {@link JSweetTranspiler}.
*/
public static void main(String[] args) {
System.exit(transpileWithArgs(args));
}
/**
* API entry point with command line arguments (same as the main entry point
* but returns error codes instead of exiting the VM).
*/
public static int transpileWithArgs(String[] args) {
try {
JSAP jsapSpec = defineArgs();
JSAPResult jsapArgs = parseArgs(jsapSpec, args);
if (!jsapArgs.success()) {
printUsage(jsapSpec);
return -1;
}
if (jsapArgs.getBoolean("help")) {
printUsage(jsapSpec);
}
LogManager.getLogger("org.jsweet").setLevel(Level.WARN);
if (jsapArgs.getBoolean("verbose")) {
LogManager.getLogger("org.jsweet").setLevel(Level.INFO);
}
if (jsapArgs.getBoolean("veryVerbose")) {
LogManager.getLogger("org.jsweet").setLevel(Level.ALL);
}
JSweetConfig.initClassPath(jsapArgs.getString("jdkHome"));
JSweetTranspilationTask transpilationTask = new JSweetTranspilationTask(jsapArgs);
transpilationTask.run();
if (jsapArgs.getBoolean("watch")) {
new JSweetFileWatcher(transpilationTask).execute();
}
} catch (Throwable t) {
t.printStackTrace();
return 1;
}
return errorCount > 0 ? 1 : 0;
}
private static JSAP defineArgs() throws JSAPException {
// Verbose output
JSAP jsap = new JSAP();
Switch switchArg;
FlaggedOption optionArg;
// Help
switchArg = new Switch("help");
switchArg.setShortFlag('h');
switchArg.setLongFlag("help");
switchArg.setDefault("false");
jsap.registerParameter(switchArg);
// Watch
switchArg = new Switch("watch");
switchArg.setShortFlag('w');
switchArg.setLongFlag("watch");
switchArg.setDefault("false");
switchArg.setHelp(
"Start a process that watches the input directories for changes and re-run transpilation on-the-fly.");
jsap.registerParameter(switchArg);
// Verbose
switchArg = new Switch("verbose");
switchArg.setLongFlag("verbose");
switchArg.setShortFlag('v');
switchArg.setHelp("Turn on general information logging (INFO LEVEL)");
switchArg.setDefault("false");
jsap.registerParameter(switchArg);
switchArg = new Switch("veryVerbose");
switchArg.setLongFlag("veryVerbose");
switchArg.setShortFlag('V');
switchArg.setHelp("Turn on all levels of logging.");
switchArg.setDefault("false");
jsap.registerParameter(switchArg);
// Java compiler's encoding
optionArg = new FlaggedOption(JSweetOptions.encoding);
optionArg.setLongFlag(JSweetOptions.encoding);
optionArg.setStringParser(JSAP.STRING_PARSER);
optionArg.setRequired(false);
optionArg.setDefault("UTF-8");
optionArg.setHelp("Force the Java compiler to use a specific encoding (UTF-8, UTF-16, ...).");
jsap.registerParameter(optionArg);
// Output encoding
optionArg = new FlaggedOption(JSweetOptions.outEncoding);
optionArg.setLongFlag(JSweetOptions.outEncoding);
optionArg.setStringParser(JSAP.STRING_PARSER);
optionArg.setRequired(false);
optionArg.setDefault("UTF-8");
optionArg.setHelp("Force the generated TypeScript output code for the given encoding (UTF-8, UTF-16, ...).");
jsap.registerParameter(optionArg);
// JDK home directory
optionArg = new FlaggedOption("jdkHome");
optionArg.setLongFlag("jdkHome");
optionArg.setStringParser(JSAP.STRING_PARSER);
optionArg.setRequired(false);
optionArg.setHelp(
"Set the JDK home directory to be used to find the Java compiler. If not set, the transpiler will try to use the JAVA_HOME environment variable. Note that the expected JDK version is greater or equals to version 8.");
jsap.registerParameter(optionArg);
// Input directories
optionArg = new FlaggedOption("input");
optionArg.setShortFlag('i');
optionArg.setLongFlag("input");
optionArg.setList(true);
optionArg.setStringParser(FileStringParser.getParser());
optionArg.setListSeparator(File.pathSeparatorChar);
optionArg.setRequired(true);
optionArg.setHelp(
"An input directory (or column-separated input directories) containing Java files to be transpiled. Java files will be recursively looked up in sub-directories. Inclusion and exclusion patterns can be defined with the 'includes' and 'excludes' options.");
jsap.registerParameter(optionArg);
// Extra input directories
optionArg = new FlaggedOption("extraInput");
optionArg.setLongFlag("extraInput");
optionArg.setList(true);
optionArg.setStringParser(FileStringParser.getParser());
optionArg.setListSeparator(File.pathSeparatorChar);
optionArg.setHelp(
"An input directory (or column-separated input directories) containing Java source files to help the tranpilation (typically for libraries). Files in these directories will not generate any corresponding TS files but will help resolving various generation issues (such as default methods, tricking overloading cases, ...).");
jsap.registerParameter(optionArg);
// Included files
optionArg = new FlaggedOption("includes");
optionArg.setLongFlag("includes");
optionArg.setList(true);
optionArg.setListSeparator(File.pathSeparatorChar);
optionArg.setHelp(
"A column-separated list of expressions matching files to be included (relatively to the input directory).");
jsap.registerParameter(optionArg);
// Excluded files
optionArg = new FlaggedOption("excludes");
optionArg.setLongFlag("excludes");
optionArg.setList(true);
optionArg.setListSeparator(File.pathSeparatorChar);
optionArg.setHelp(
"A column-separated list of expressions matching files to be excluded (relatively to the input directory).");
jsap.registerParameter(optionArg);
// Definition directories
optionArg = new FlaggedOption(JSweetOptions.defInput);
optionArg.setShortFlag('d');
optionArg.setLongFlag(JSweetOptions.defInput);
optionArg.setList(true);
optionArg.setStringParser(FileStringParser.getParser());
optionArg.setListSeparator(File.pathSeparatorChar);
optionArg.setRequired(false);
optionArg.setHelp(
"An input directory (or column-separated input directories) containing TypeScript definition files (*.d.ts) to be used for transpilation. Definition files will be recursively looked up in sub-diredctories.");
jsap.registerParameter(optionArg);
// Skip empty root dirs
switchArg = new Switch(JSweetOptions.noRootDirectories);
switchArg.setLongFlag(JSweetOptions.noRootDirectories);
switchArg.setHelp(
"Skip the root directories (i.e. packages annotated with @jsweet.lang.Root) so that the generated file hierarchy starts at the root directories rather than including the entire directory structure.");
switchArg.setDefault("false");
jsap.registerParameter(switchArg);
// TypeScript output directory
optionArg = new FlaggedOption(JSweetOptions.tsout);
optionArg.setLongFlag(JSweetOptions.tsout);
optionArg.setDefault(".ts");
optionArg.setHelp("Specify where to place generated TypeScript files.");
optionArg.setStringParser(FileStringParser.getParser());
optionArg.setRequired(false);
jsap.registerParameter(optionArg);
// JavaScript output directory
optionArg = new FlaggedOption(JSweetOptions.jsout);
optionArg.setShortFlag('o');
optionArg.setLongFlag(JSweetOptions.jsout);
optionArg.setDefault("js");
optionArg.setHelp("Specify where to place generated JavaScript files (ignored if jsFile is specified).");
optionArg.setStringParser(FileStringParser.getParser());
optionArg.setRequired(false);
jsap.registerParameter(optionArg);
// Disable single precision floats
switchArg = new Switch(JSweetOptions.disableSinglePrecisionFloats);
switchArg.setLongFlag(JSweetOptions.disableSinglePrecisionFloats);
switchArg.setHelp(
"By default, for a target version >=ES5, JSweet will force Java floats to be mapped to JavaScript numbers that will be constrained with ES5 Math.fround function. If this option is true, then the calls to Math.fround are erased and the generated program will use the JavaScript default precision (double precision).");
jsap.registerParameter(switchArg);
// Transients as non-enumerable properties
switchArg = new Switch(JSweetOptions.nonEnumerableTransients);
switchArg.setLongFlag(JSweetOptions.nonEnumerableTransients);
switchArg.setHelp(
"Generate Java transient fields as non-enumerable JavaScript properties..");
jsap.registerParameter(switchArg);
// Do not generate JavaScript
switchArg = new Switch(JSweetOptions.tsOnly);
switchArg.setLongFlag(JSweetOptions.tsOnly);
switchArg.setHelp("Do not compile the TypeScript output (let an external TypeScript compiler do so).");
jsap.registerParameter(switchArg);
// Do not generate d.ts files that correspond to def.* packages
switchArg = new Switch(JSweetOptions.ignoreDefinitions);
switchArg.setLongFlag(JSweetOptions.ignoreDefinitions);
switchArg.setHelp(
"Ignore definitions from def.* packages, so that they are not generated in d.ts definition files. If this option is not set, the transpiler generates d.ts definition files in the directory given by the tsout option.");
jsap.registerParameter(switchArg);
switchArg = new Switch(JSweetOptions.ignoreJavaErrors);
switchArg.setLongFlag(JSweetOptions.ignoreJavaErrors);
switchArg.setHelp(
"Ignore Java compilation errors. Do not use unless you know what you are doing.");
jsap.registerParameter(switchArg);
// Generates declarations
switchArg = new Switch(JSweetOptions.declaration);
switchArg.setLongFlag(JSweetOptions.declaration);
switchArg.setHelp(
"Generate the d.ts files along with the js files, so that other programs can use them to compile.");
jsap.registerParameter(switchArg);
// Declarations output directory
optionArg = new FlaggedOption(JSweetOptions.dtsout);
optionArg.setLongFlag(JSweetOptions.dtsout);
optionArg.setHelp(
"Specify where to place generated d.ts files when the declaration option is set (by default, d.ts files are generated in the JavaScript output directory - next to the corresponding js files).");
optionArg.setStringParser(FileStringParser.getParser());
optionArg.setRequired(false);
jsap.registerParameter(optionArg);
// Candies javascript output directory
optionArg = new FlaggedOption(JSweetOptions.candiesJsOut);
optionArg.setLongFlag(JSweetOptions.candiesJsOut);
optionArg.setDefault("js/candies");
optionArg.setHelp("Specify where to place extracted JavaScript files from candies.");
optionArg.setStringParser(FileStringParser.getParser());
optionArg.setRequired(false);
jsap.registerParameter(optionArg);
// Source root directory for source maps
optionArg = new FlaggedOption(JSweetOptions.sourceRoot);
optionArg.setLongFlag(JSweetOptions.sourceRoot);
optionArg.setHelp(
"Specify the location where debugger should locate Java files instead of source locations. Use this flag if the sources will be located at run-time in a different location than that at design-time. The location specified will be embedded in the sourceMap to direct the debugger where the source files will be located.");
optionArg.setStringParser(FileStringParser.getParser());
optionArg.setRequired(false);
jsap.registerParameter(optionArg);
// Classpath
optionArg = new FlaggedOption(JSweetOptions.classpath);
optionArg.setLongFlag(JSweetOptions.classpath);
optionArg.setHelp(
"The JSweet transpilation classpath (candy jars). This classpath should at least contain the core candy.");
optionArg.setStringParser(JSAP.STRING_PARSER);
optionArg.setRequired(false);
jsap.registerParameter(optionArg);
// Module
optionArg = new FlaggedOption(JSweetOptions.module);
optionArg.setLongFlag(JSweetOptions.module);
optionArg.setShortFlag('m');
optionArg.setDefault("none");
optionArg.setHelp("The module kind (none, commonjs, amd, system, umd, es2015).");
optionArg.setStringParser(EnumeratedStringParser.getParser("none;commonjs;amd;system;umd;es2015"));
optionArg.setRequired(false);
jsap.registerParameter(optionArg);
// Module resolution
optionArg = new FlaggedOption(JSweetOptions.moduleResolution);
optionArg.setLongFlag(JSweetOptions.moduleResolution);
optionArg.setDefault(ModuleResolution.classic.name());
optionArg.setHelp("The module resolution strategy (classic, node).");
optionArg.setStringParser(EnumeratedStringParser.getParser("classic;node"));
optionArg.setRequired(false);
jsap.registerParameter(optionArg);
// Bundle
switchArg = new Switch(JSweetOptions.bundle);
switchArg.setLongFlag(JSweetOptions.bundle);
switchArg.setShortFlag('b');
switchArg.setHelp(
"Bundle up all the generated code in a single file, which can be used in the browser. The bundle files are called 'bundle.ts', 'bundle.d.ts', or 'bundle.js' depending on the kind of generated code. NOTE: bundles are not compatible with any module kind other than 'none'.");
switchArg.setDefault("false");
jsap.registerParameter(switchArg);
// Factory class name
optionArg = new FlaggedOption("factoryClassName");
optionArg.setLongFlag("factoryClassName");
optionArg.setShortFlag('f');
optionArg.setHelp("Use the given factory to tune the default transpiler behavior.");
optionArg.setStringParser(JSAP.STRING_PARSER);
optionArg.setRequired(false);
jsap.registerParameter(optionArg);
// // Adapters
// optionArg = new FlaggedOption("adapters");
// optionArg.setLongFlag("adapters");
// optionArg.setList(true);
// optionArg.setStringParser(JSAP.STRING_PARSER);
// optionArg.setListSeparator(':');
// optionArg.setRequired(false);
// optionArg.setHelp(
// "A column-separated list of adapter class names (fully qualified) to
// be used to extend the transpiler behavior. As the name suggests, an
// adapter is an object that adapts the TypeScript default printer in
// order to tune the generated code. All the adapter classes must be
// accessible within the 'jsweet_extension' directory to be created at
// the root of the transpiled project. The adapter classes can be
// provided as Java class files (*.class) or Java source files (*.java).
// In the latter case, they will be on-the-fly compiled by JSweet.");
// jsap.registerParameter(optionArg);
// Debug
switchArg = new Switch(JSweetOptions.sourceMap);
switchArg.setLongFlag(JSweetOptions.sourceMap);
switchArg.setHelp(
"Generate source map files for the Java files, so that it is possible to debug Java files directly with a debugger that supports source maps (most JavaScript debuggers).");
switchArg.setDefault("false");
jsap.registerParameter(switchArg);
// Enable assertions
switchArg = new Switch(JSweetOptions.enableAssertions);
switchArg.setLongFlag(JSweetOptions.enableAssertions);
switchArg.setHelp("Java 'assert' statements are transpiled as runtime JavaScript checks.");
switchArg.setDefault("false");
jsap.registerParameter(switchArg);
// Header file
optionArg = new FlaggedOption(JSweetOptions.header);
optionArg.setLongFlag(JSweetOptions.header);
optionArg.setHelp(
"A file that contains a header to be written at the beginning of each generated file. If left unspecified, JSweet will generate a default header.");
optionArg.setStringParser(FileStringParser.getParser());
optionArg.setRequired(false);
jsap.registerParameter(optionArg);
// Working directory
optionArg = new FlaggedOption("workingDir");
optionArg.setLongFlag("workingDir");
optionArg.setHelp(
"The directory JSweet uses to store temporary files such as extracted candies. JSweet uses '.jsweet' if left unspecified.");
optionArg.setStringParser(FileStringParser.getParser());
optionArg.setRequired(false);
jsap.registerParameter(optionArg);
optionArg = new FlaggedOption(JSweetOptions.targetVersion);
optionArg.setLongFlag(JSweetOptions.targetVersion);
optionArg.setHelp("The EcmaScript target (JavaScript) version. Possible values: "
+ Arrays.asList(EcmaScriptComplianceLevel.values()));
optionArg.setDefault("ES3");
optionArg.setRequired(false);
jsap.registerParameter(optionArg);
// Extra system path
optionArg = new FlaggedOption(JSweetOptions.extraSystemPath);
optionArg.setLongFlag(JSweetOptions.extraSystemPath);
optionArg.setHelp("Allow an extra path to be added to the system path.");
optionArg.setStringParser(FileStringParser.getParser());
optionArg.setRequired(false);
jsap.registerParameter(optionArg);
// Disable statics lazy initialization
switchArg = new Switch(JSweetOptions.disableStaticsLazyInitialization);
switchArg.setLongFlag(JSweetOptions.disableStaticsLazyInitialization);
switchArg.setHelp(
"Do not generate lazy initialization code of static fields that is meant " +
"to emulate the Java behavior. When disables, the code is more readable " +
"but it may result into runtime static initialization issues (cross-class " +
"static dependencies).");
jsap.registerParameter(switchArg);
// Sort class members
switchArg = new Switch(JSweetOptions.sortClassMembers);
switchArg.setLongFlag(JSweetOptions.sortClassMembers);
switchArg.setHelp(
"If enabled, class members are sorted using " +
"PrinterAdapter#getClassMemberComparator(), to be overloaded by the user to "+
"implement the desired order.");
jsap.registerParameter(switchArg);
return jsap;
}
private static JSAPResult parseArgs(JSAP jsapSpec, String[] commandLineArgs) {
OUTPUT_LOGGER.info("JSweet transpiler version " + JSweetConfig.getVersionNumber() + " (build date: "
+ JSweetConfig.getBuildDate() + ")");
if (jsapSpec == null) {
throw new IllegalStateException("no args, please call setArgs before");
}
JSAPResult arguments = jsapSpec.parse(commandLineArgs);
if (!arguments.success()) {
// print out specific error messages describing the problems
for (java.util.Iterator<?> errs = arguments.getErrorMessageIterator(); errs.hasNext();) {
System.out.println("Error: " + errs.next());
}
}
if (!arguments.success() || arguments.getBoolean("help")) {
}
return arguments;
}
private static void printUsage(JSAP jsapSpec) {
System.out.println("Command line options:");
System.out.println(jsapSpec.getHelp());
}
private static class JSweetTranspilationTask implements TranspilationTask {
private JSAPResult jsapArgs;
private List<File> inputDirList;
private List<File> extraInputDirList;
private LinkedList<File> javaInputFiles;
private LinkedList<File> extraJavaInputFiles;
public JSweetTranspilationTask(JSAPResult jsapArgs) {
this.jsapArgs = jsapArgs;
inputDirList = new ArrayList<File>();
inputDirList.addAll(Arrays.asList(jsapArgs.getFileArray("input")));
if (jsapArgs.userSpecified("extraInput")) {
extraInputDirList = Arrays.asList(jsapArgs.getFileArray("extraInput"));
}
logger.info("input dirs: " + inputDirList);
}
@Override
public List<File> getInputDirList() {
return inputDirList;
}
@Override
public void run() throws Exception {
String classPath = jsapArgs.getString(JSweetOptions.classpath);
logger.info("classpath: " + classPath);
ErrorCountTranspilationHandler transpilationHandler = new ErrorCountTranspilationHandler(
new ConsoleTranspilationHandler());
try {
String[] included = jsapArgs.getStringArray("includes");
String[] excluded = jsapArgs.getStringArray("excludes");
List<Pattern> includedPatterns = included == null ? null
: Arrays.asList(included).stream().map(s -> toPattern(s)).collect(Collectors.toList());
List<Pattern> excludedPatterns = excluded == null ? null
: Arrays.asList(excluded).stream().map(s -> toPattern(s)).collect(Collectors.toList());
logger.info("included: " + includedPatterns);
logger.info("excluded: " + excludedPatterns);
javaInputFiles = new LinkedList<File>();
for (File inputDir : inputDirList) {
Util.addFiles(f -> {
String path = inputDir.toURI().relativize(f.toURI()).getPath();
if (path.endsWith(".java")) {
if (includedPatterns == null || includedPatterns.isEmpty() || includedPatterns != null
&& includedPatterns.stream().anyMatch(p -> p.matcher(path).matches())) {
if (excludedPatterns != null && !excludedPatterns.isEmpty()
&& excludedPatterns.stream().anyMatch(p -> p.matcher(path).matches())) {
return false;
}
return true;
}
}
return false;
}, inputDir, javaInputFiles);
}
extraJavaInputFiles = new LinkedList<File>();
if (extraInputDirList != null) {
for (File inputDir : extraInputDirList) {
Util.addFiles(f -> {
String path = inputDir.toURI().relativize(f.toURI()).getPath();
if (path.endsWith(".java")) {
if (includedPatterns == null || includedPatterns.isEmpty() || includedPatterns != null
&& includedPatterns.stream().anyMatch(p -> p.matcher(path).matches())) {
if (excludedPatterns != null && !excludedPatterns.isEmpty()
&& excludedPatterns.stream().anyMatch(p -> p.matcher(path).matches())) {
return false;
}
return true;
}
}
return false;
}, inputDir, extraJavaInputFiles);
}
}
javaInputFiles.addAll(extraJavaInputFiles);
File tsOutputDir = null;
if (jsapArgs.userSpecified(JSweetOptions.tsout) && jsapArgs.getFile(JSweetOptions.tsout) != null) {
tsOutputDir = jsapArgs.getFile(JSweetOptions.tsout);
tsOutputDir.mkdirs();
}
logger.info("ts output dir: " + tsOutputDir);
File jsOutputDir = null;
if (jsapArgs.userSpecified(JSweetOptions.jsout) && jsapArgs.getFile(JSweetOptions.jsout) != null) {
jsOutputDir = jsapArgs.getFile(JSweetOptions.jsout);
jsOutputDir.mkdirs();
}
logger.info("js output dir: " + jsOutputDir);
File dtsOutputDir = null;
if (jsapArgs.userSpecified(JSweetOptions.dtsout) && jsapArgs.getFile(JSweetOptions.dtsout) != null) {
dtsOutputDir = jsapArgs.getFile(JSweetOptions.dtsout);
}
File candiesJsOutputDir = null;
if (jsapArgs.userSpecified(JSweetOptions.candiesJsOut) && jsapArgs.getFile(JSweetOptions.candiesJsOut) != null) {
candiesJsOutputDir = jsapArgs.getFile(JSweetOptions.candiesJsOut);
}
File sourceRootDir = null;
if (jsapArgs.userSpecified(JSweetOptions.sourceRoot) && jsapArgs.getFile(JSweetOptions.sourceRoot) != null) {
sourceRootDir = jsapArgs.getFile(JSweetOptions.sourceRoot);
}
JSweetFactory factory = null;
String factoryClassName = jsapArgs.getString("factoryClassName");
if (factoryClassName != null) {
try {
factory = (JSweetFactory) Thread.currentThread().getContextClassLoader()
.loadClass(factoryClassName).newInstance();
} catch (Exception e) {
try {
// try forName just in case
factory = (JSweetFactory) Class.forName(factoryClassName).newInstance();
} catch (Exception e2) {
throw new RuntimeException(
"cannot find or instantiate factory class: " + factoryClassName
+ " (make sure the class is in the plugin's classpath and that it defines an empty public constructor)",
e2);
}
}
}
if (factory == null) {
factory = new JSweetFactory();
}
JSweetTranspiler transpiler = new JSweetTranspiler(factory, jsapArgs.getFile("workingDir"), tsOutputDir,
jsOutputDir, candiesJsOutputDir, classPath);
if (jsapArgs.userSpecified(JSweetOptions.bundle)) {
transpiler.setBundle(jsapArgs.getBoolean(JSweetOptions.bundle));
}
if (jsapArgs.userSpecified(JSweetOptions.noRootDirectories)) {
transpiler.setNoRootDirectories(jsapArgs.getBoolean(JSweetOptions.noRootDirectories));
}
if (jsapArgs.userSpecified(JSweetOptions.sourceMap)) {
transpiler.setGenerateSourceMaps(jsapArgs.getBoolean(JSweetOptions.sourceMap));
}
if (sourceRootDir != null) {
transpiler.setSourceRoot(sourceRootDir);
}
if (jsapArgs.userSpecified(JSweetOptions.module)) {
transpiler.setModuleKind(ModuleKind.valueOf(jsapArgs.getString(JSweetOptions.module)));
}
if (jsapArgs.userSpecified(JSweetOptions.moduleResolution)) {
transpiler.setModuleResolution(
ModuleResolution.valueOf(jsapArgs.getString(JSweetOptions.moduleResolution)));
}
if (jsapArgs.userSpecified(JSweetOptions.encoding)) {
transpiler.setEncoding(jsapArgs.getString(JSweetOptions.encoding));
}
if (jsapArgs.userSpecified(JSweetOptions.outEncoding)) {
transpiler.setOutEncoding(jsapArgs.getString(JSweetOptions.outEncoding));
}
if (jsapArgs.userSpecified(JSweetOptions.nonEnumerableTransients)) {
transpiler.setNonEnumerableTransients(jsapArgs.getBoolean(JSweetOptions.nonEnumerableTransients));
}
if (jsapArgs.userSpecified(JSweetOptions.enableAssertions)) {
transpiler.setIgnoreAssertions(!jsapArgs.getBoolean(JSweetOptions.enableAssertions));
}
if (jsapArgs.userSpecified(JSweetOptions.declaration)) {
transpiler.setGenerateDeclarations(jsapArgs.getBoolean(JSweetOptions.declaration));
}
if (jsapArgs.userSpecified(JSweetOptions.tsOnly)) {
transpiler.setGenerateJsFiles(!jsapArgs.getBoolean(JSweetOptions.tsOnly));
}
if (jsapArgs.userSpecified(JSweetOptions.ignoreDefinitions)) {
transpiler.setGenerateDefinitions(!jsapArgs.getBoolean(JSweetOptions.ignoreDefinitions));
}
if (jsapArgs.userSpecified(JSweetOptions.ignoreJavaErrors)) {
transpiler.setIgnoreJavaErrors(jsapArgs.getBoolean(JSweetOptions.ignoreJavaErrors));
}
if (jsapArgs.userSpecified(JSweetOptions.dtsout)) {
transpiler.setDeclarationsOutputDir(dtsOutputDir);
}
if (jsapArgs.userSpecified(JSweetOptions.header)) {
transpiler.setHeaderFile(jsapArgs.getFile(JSweetOptions.header));
}
if (jsapArgs.userSpecified(JSweetOptions.targetVersion)) {
transpiler.setEcmaTargetVersion(
JSweetTranspiler.getEcmaTargetVersion(jsapArgs.getString(JSweetOptions.targetVersion)));
}
if (jsapArgs.userSpecified(JSweetOptions.disableSinglePrecisionFloats)) {
transpiler.setDisableSinglePrecisionFloats(jsapArgs.getBoolean(JSweetOptions.disableSinglePrecisionFloats));
}
if (jsapArgs.userSpecified(JSweetOptions.extraSystemPath)) {
ProcessUtil.addExtraPath(jsapArgs.getString(JSweetOptions.extraSystemPath));
}
if (jsapArgs.userSpecified(JSweetOptions.disableStaticsLazyInitialization)) {
transpiler.setLazyInitializedStatics(!jsapArgs.getBoolean(JSweetOptions.disableStaticsLazyInitialization));
}
if (jsapArgs.userSpecified(JSweetOptions.sortClassMembers)) {
transpiler.setSortClassMembers(jsapArgs.getBoolean(JSweetOptions.sortClassMembers));
}
if (tsOutputDir != null) {
transpiler.setTsOutputDir(tsOutputDir);
}
if (jsOutputDir != null) {
transpiler.setJsOutputDir(jsOutputDir);
}
// transpiler.setAdapters(Arrays.asList(jsapArgs.getStringArray("adapters")));
List<File> files = Arrays.asList(jsapArgs.getFileArray(JSweetOptions.defInput));
logger.info("definition input dirs: " + files);
for (File f : files) {
transpiler.addTsDefDir(f);
}
transpiler.transpile(transpilationHandler, extraJavaInputFiles.stream().map(f -> f.toString())
.collect(Collectors.toSet()), SourceFile.toSourceFiles(javaInputFiles));
} catch (NoClassDefFoundError error) {
transpilationHandler.report(JSweetProblem.JAVA_COMPILER_NOT_FOUND, null,
JSweetProblem.JAVA_COMPILER_NOT_FOUND.getMessage());
}
errorCount = transpilationHandler.getErrorCount();
if (errorCount > 0) {
OUTPUT_LOGGER.info("transpilation failed with " + errorCount + " error(s) and "
+ transpilationHandler.getWarningCount() + " warning(s)");
} else {
if (transpilationHandler.getWarningCount() > 0) {
OUTPUT_LOGGER.info(
"transpilation completed with " + transpilationHandler.getWarningCount() + " warning(s)");
} else {
OUTPUT_LOGGER.info("transpilation successfully completed with no errors and no warnings");
}
}
}
}
}
| {
"pile_set_name": "Github"
} |
/*
* # Fomantic - Menu
* http://github.com/fomantic/Fomantic-UI/
*
*
* Copyright 2015 Contributor
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/
/*******************************
Standard
*******************************/
/*--------------
Menu
---------------*/
.ui.menu {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
margin: 1rem 0;
font-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
background: #FFFFFF;
font-weight: normal;
border: 1px solid rgba(34, 36, 38, 0.15);
-webkit-box-shadow: 0 1px 2px 0 rgba(34, 36, 38, 0.15);
box-shadow: 0 1px 2px 0 rgba(34, 36, 38, 0.15);
border-radius: 0.28571429rem;
min-height: 2.85714286em;
}
.ui.menu:after {
content: '';
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.ui.menu:first-child {
margin-top: 0;
}
.ui.menu:last-child {
margin-bottom: 0;
}
/*--------------
Sub-Menu
---------------*/
.ui.menu .menu {
margin: 0;
}
.ui.menu:not(.vertical) > .menu {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
}
/*--------------
Item
---------------*/
.ui.menu:not(.vertical) .item {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.ui.menu .item {
position: relative;
vertical-align: middle;
line-height: 1;
text-decoration: none;
-webkit-tap-highlight-color: transparent;
-webkit-box-flex: 0;
-ms-flex: 0 0 auto;
flex: 0 0 auto;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
background: none;
padding: 0.92857143em 1.14285714em;
text-transform: none;
color: rgba(0, 0, 0, 0.87);
font-weight: normal;
-webkit-transition: background 0.1s ease, color 0.1s ease, -webkit-box-shadow 0.1s ease;
transition: background 0.1s ease, color 0.1s ease, -webkit-box-shadow 0.1s ease;
transition: background 0.1s ease, box-shadow 0.1s ease, color 0.1s ease;
transition: background 0.1s ease, box-shadow 0.1s ease, color 0.1s ease, -webkit-box-shadow 0.1s ease;
}
.ui.menu > .item:first-child {
border-radius: 0.28571429rem 0 0 0.28571429rem;
}
/* Border */
.ui.menu .item:before {
position: absolute;
content: '';
top: 0;
right: 0;
height: 100%;
width: 1px;
background: rgba(34, 36, 38, 0.1);
}
/*--------------
Text Content
---------------*/
.ui.menu .text.item > *,
.ui.menu .item > a:not(.ui),
.ui.menu .item > p:only-child {
-webkit-user-select: text;
-moz-user-select: text;
-ms-user-select: text;
user-select: text;
line-height: 1.3;
}
.ui.menu .item > p:first-child {
margin-top: 0;
}
.ui.menu .item > p:last-child {
margin-bottom: 0;
}
/*--------------
Icons
---------------*/
.ui.menu .item > i.icon {
opacity: 0.9;
float: none;
margin: 0 0.35714286em 0 0;
}
/*--------------
Button
---------------*/
.ui.menu:not(.vertical) .item > .button {
position: relative;
top: 0;
margin: -0.5em 0;
padding-bottom: 0.78571429em;
padding-top: 0.78571429em;
font-size: 1em;
}
/*----------------
Grid / Container
-----------------*/
.ui.menu > .grid,
.ui.menu > .container {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: inherit;
-ms-flex-align: inherit;
align-items: inherit;
-webkit-box-orient: inherit;
-webkit-box-direction: inherit;
-ms-flex-direction: inherit;
flex-direction: inherit;
}
/*--------------
Inputs
---------------*/
.ui.menu .item > .input {
width: 100%;
}
.ui.menu:not(.vertical) .item > .input {
position: relative;
top: 0;
margin: -0.5em 0;
}
.ui.menu .item > .input input {
font-size: 1em;
padding-top: 0.57142857em;
padding-bottom: 0.57142857em;
}
/*--------------
Header
---------------*/
.ui.menu .header.item,
.ui.vertical.menu .header.item {
margin: 0;
background: '';
text-transform: normal;
font-weight: bold;
}
.ui.vertical.menu .item > .header:not(.ui) {
margin: 0 0 0.5em;
font-size: 1em;
font-weight: bold;
}
/*--------------
Dropdowns
---------------*/
/* Dropdown Icon */
.ui.menu .item > i.dropdown.icon {
padding: 0;
float: right;
margin: 0 0 0 1em;
}
/* Menu */
.ui.menu .dropdown.item .menu {
min-width: calc(100% - 1px);
border-radius: 0 0 0.28571429rem 0.28571429rem;
background: #FFFFFF;
margin: 0 0 0;
-webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08);
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08);
-webkit-box-orient: vertical !important;
-webkit-box-direction: normal !important;
-ms-flex-direction: column !important;
flex-direction: column !important;
}
/* Menu Items */
.ui.menu .ui.dropdown .menu > .item {
margin: 0;
text-align: left;
font-size: 1em !important;
padding: 0.78571429em 1.14285714em !important;
background: transparent !important;
color: rgba(0, 0, 0, 0.87) !important;
text-transform: none !important;
font-weight: normal !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
-webkit-transition: none !important;
transition: none !important;
}
.ui.menu .ui.dropdown .menu > .item:hover {
background: rgba(0, 0, 0, 0.05) !important;
color: rgba(0, 0, 0, 0.95) !important;
}
.ui.menu .ui.dropdown .menu > .selected.item {
background: rgba(0, 0, 0, 0.05) !important;
color: rgba(0, 0, 0, 0.95) !important;
}
.ui.menu .ui.dropdown .menu > .active.item {
background: rgba(0, 0, 0, 0.03) !important;
font-weight: bold !important;
color: rgba(0, 0, 0, 0.95) !important;
}
.ui.menu .ui.dropdown.item .menu .item:not(.filtered) {
display: block;
}
.ui.menu .ui.dropdown .menu > .item > .icons,
.ui.menu .ui.dropdown .menu > .item > i.icon:not(.dropdown) {
display: inline-block;
font-size: 1em !important;
float: none;
margin: 0 0.75em 0 0 !important;
}
/* Secondary */
.ui.secondary.menu .dropdown.item > .menu,
.ui.text.menu .dropdown.item > .menu {
border-radius: 0.28571429rem;
margin-top: 0.35714286em;
}
/* Pointing */
.ui.menu .pointing.dropdown.item .menu {
margin-top: 0.75em;
}
/* Inverted */
.ui.inverted.menu .search.dropdown.item > .search,
.ui.inverted.menu .search.dropdown.item > .text {
color: rgba(255, 255, 255, 0.9);
}
/* Vertical */
.ui.vertical.menu .dropdown.item > i.icon {
float: right;
content: "\f0da";
margin-left: 1em;
}
.ui.vertical.menu .dropdown.item .menu {
left: 100%;
/* IE needs 0, all others support max-content to show dropdown icon inline, so keep both settings! */
min-width: 0;
min-width: -webkit-max-content;
min-width: -moz-max-content;
min-width: max-content;
margin: 0 0 0 0;
-webkit-box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08);
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08);
border-radius: 0 0.28571429rem 0.28571429rem 0.28571429rem;
}
.ui.vertical.menu .dropdown.item.upward .menu {
bottom: 0;
}
.ui.vertical.menu .dropdown.item:not(.upward) .menu {
top: 0;
}
.ui.vertical.menu .active.dropdown.item {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.ui.vertical.menu .dropdown.active.item {
-webkit-box-shadow: none;
box-shadow: none;
}
/* Evenly Divided */
.ui.item.menu .dropdown .menu .item {
width: 100%;
}
/*--------------
Labels
---------------*/
.ui.menu .item > .label:not(.floating) {
margin-left: 1em;
padding: 0.3em 0.78571429em;
}
.ui.vertical.menu .item > .label {
margin-top: -0.15em;
margin-bottom: -0.15em;
padding: 0.3em 0.78571429em;
}
.ui.menu .item > .floating.label {
padding: 0.3em 0.78571429em;
}
.ui.menu .item > .label {
background: #999999;
color: #FFFFFF;
}
.ui.menu .item > .image.label img {
margin: -0.2833em 0.8em -0.2833em -0.8em;
height: 1.5666em;
}
/*--------------
Images
---------------*/
.ui.menu .item > img:not(.ui) {
display: inline-block;
vertical-align: middle;
margin: -0.3em 0;
width: 2.5em;
}
.ui.vertical.menu .item > img:not(.ui):only-child {
display: block;
max-width: 100%;
width: auto;
}
/*******************************
Coupling
*******************************/
/*--------------
List
---------------*/
/* Menu divider shouldnt apply */
.ui.menu .list .item:before {
background: none !important;
}
/*--------------
Sidebar
---------------*/
/* Show vertical dividers below last */
.ui.vertical.sidebar.menu > .item:first-child:before {
display: block !important;
}
.ui.vertical.sidebar.menu > .item::before {
top: auto;
bottom: 0;
}
/*--------------
Container
---------------*/
@media only screen and (max-width: 767.98px) {
.ui.menu > .ui.container {
width: 100% !important;
margin-left: 0 !important;
margin-right: 0 !important;
}
}
@media only screen and (min-width: 768px) {
.ui.menu:not(.secondary):not(.text):not(.tabular):not(.borderless) > .container > .item:not(.right):not(.borderless):first-child {
border-left: 1px solid rgba(34, 36, 38, 0.1);
}
.ui.menu:not(.secondary):not(.text):not(.tabular):not(.borderless) > .container > .right.item:not(.borderless):last-child,
.ui.menu:not(.secondary):not(.text):not(.tabular):not(.borderless) > .container > .right.menu > .item:not(.borderless):last-child {
border-right: 1px solid rgba(34, 36, 38, 0.1);
}
}
/*******************************
States
*******************************/
/*--------------
Hover
---------------*/
.ui.link.menu .item:hover,
.ui.menu .dropdown.item:hover,
.ui.menu .link.item:hover,
.ui.menu a.item:hover {
cursor: pointer;
background: rgba(0, 0, 0, 0.03);
color: rgba(0, 0, 0, 0.95);
}
/*--------------
Pressed
---------------*/
.ui.link.menu .item:active,
.ui.menu .link.item:active,
.ui.menu a.item:active {
background: rgba(0, 0, 0, 0.03);
color: rgba(0, 0, 0, 0.95);
}
/*--------------
Active
---------------*/
.ui.menu .active.item {
background: rgba(0, 0, 0, 0.05);
color: rgba(0, 0, 0, 0.95);
font-weight: normal;
-webkit-box-shadow: none;
box-shadow: none;
}
.ui.menu .active.item > i.icon {
opacity: 1;
}
/*--------------
Active Hover
---------------*/
.ui.menu .active.item:hover,
.ui.vertical.menu .active.item:hover {
background-color: rgba(0, 0, 0, 0.05);
color: rgba(0, 0, 0, 0.95);
}
/*--------------
Disabled
---------------*/
.ui.ui.menu .item.disabled {
cursor: default;
background-color: transparent;
color: rgba(40, 40, 40, 0.3);
pointer-events: none;
}
/*******************************
Types
*******************************/
/*------------------
Floated Menu / Item
-------------------*/
/* Left Floated */
.ui.menu:not(.vertical) .left.item,
.ui.menu:not(.vertical) .left.menu {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
margin-right: auto !important;
}
/* Right Floated */
.ui.menu:not(.vertical) .right.item,
.ui.menu:not(.vertical) .right.menu {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
margin-left: auto !important;
}
.ui.menu:not(.vertical) :not(.dropdown) > .left.menu,
.ui.menu:not(.vertical) :not(.dropdown) > .right.menu {
display: inherit;
}
/* Center */
.ui.menu:not(.vertical) .center.item,
.ui.menu:not(.vertical) .center.menu {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
margin-left: auto !important;
margin-right: auto !important;
}
/* Swapped Borders */
.ui.menu .right.item::before,
.ui.menu .right.menu > .item::before {
right: auto;
left: 0;
}
/* Remove Outer Borders */
.ui.menu .center.item:last-child::before,
.ui.menu .center.menu > .item:last-child::before {
display: none;
}
/*--------------
Vertical
---------------*/
.ui.vertical.menu {
display: block;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
background: #FFFFFF;
-webkit-box-shadow: 0 1px 2px 0 rgba(34, 36, 38, 0.15);
box-shadow: 0 1px 2px 0 rgba(34, 36, 38, 0.15);
}
/*--- Item ---*/
.ui.vertical.menu .item {
display: block;
background: none;
border-top: none;
border-right: none;
}
.ui.vertical.menu > .item:first-child {
border-radius: 0.28571429rem 0.28571429rem 0 0;
}
.ui.vertical.menu > .item:last-child {
border-radius: 0 0 0.28571429rem 0.28571429rem;
}
/*--- Label ---*/
.ui.vertical.menu .item > .label {
float: right;
text-align: center;
}
/*--- Icon ---*/
.ui.vertical.menu .item > i.icon,
.ui.vertical.menu .item > i.icons {
width: 1.18em;
float: right;
margin: 0 0 0 0.5em;
}
.ui.vertical.menu .item > .label + i.icon {
float: none;
margin: 0 0.5em 0 0;
}
/*--- Border ---*/
.ui.vertical.menu .item:before {
position: absolute;
content: '';
top: 0;
left: 0;
width: 100%;
height: 1px;
background: rgba(34, 36, 38, 0.1);
}
.ui.vertical.menu .item:first-child:before {
display: none !important;
}
/*--- Sub Menu ---*/
.ui.vertical.menu .item > .menu {
margin: 0.5em -1.14285714em 0;
}
.ui.vertical.menu .menu .item {
background: none;
padding: 0.5em 1.33333333em;
font-size: 0.85714286em;
color: rgba(0, 0, 0, 0.5);
}
.ui.vertical.menu .item .menu a.item:hover,
.ui.vertical.menu .item .menu .link.item:hover {
color: rgba(0, 0, 0, 0.85);
}
.ui.vertical.menu .menu .item:before {
display: none;
}
/* Vertical Active */
.ui.vertical.menu .active.item {
background: rgba(0, 0, 0, 0.05);
border-radius: 0;
-webkit-box-shadow: none;
box-shadow: none;
}
.ui.vertical.menu > .active.item:first-child {
border-radius: 0.28571429rem 0.28571429rem 0 0;
}
.ui.vertical.menu > .active.item:last-child {
border-radius: 0 0 0.28571429rem 0.28571429rem;
}
.ui.vertical.menu > .active.item:only-child {
border-radius: 0.28571429rem;
}
.ui.vertical.menu .active.item .menu .active.item {
border-left: none;
}
.ui.vertical.menu .item .menu .active.item {
background-color: transparent;
font-weight: bold;
color: rgba(0, 0, 0, 0.95);
}
/*--------------
Tabular
---------------*/
.ui.tabular.menu {
border-radius: 0;
-webkit-box-shadow: none !important;
box-shadow: none !important;
border: none;
background: none transparent;
border-bottom: 1px solid #D4D4D5;
}
.ui.tabular.fluid.menu {
width: calc(100% + 2px) !important;
}
.ui.tabular.menu .item {
background: transparent;
border-bottom: none;
border-left: 1px solid transparent;
border-right: 1px solid transparent;
border-top: 2px solid transparent;
padding: 0.92857143em 1.42857143em;
color: rgba(0, 0, 0, 0.87);
}
.ui.tabular.menu .item:before {
display: none;
}
/* Hover */
.ui.tabular.menu .item:hover {
background-color: transparent;
color: rgba(0, 0, 0, 0.8);
}
/* Active */
.ui.tabular.menu .active.item {
background: none #FFFFFF;
color: rgba(0, 0, 0, 0.95);
border-top-width: 1px;
border-color: #D4D4D5;
font-weight: bold;
margin-bottom: -1px;
-webkit-box-shadow: none;
box-shadow: none;
border-radius: 0.28571429rem 0.28571429rem 0 0 !important;
}
/* Coupling with segment for attachment */
.ui.tabular.menu + .attached:not(.top).segment,
.ui.tabular.menu + .attached:not(.top).segment + .attached:not(.top).segment {
border-top: none;
margin-left: 0;
margin-top: 0;
margin-right: 0;
width: 100%;
}
.top.attached.segment + .ui.bottom.tabular.menu {
position: relative;
width: calc(100% + 2px);
left: -1px;
}
/* Bottom Vertical Tabular */
.ui.bottom.tabular.menu {
background: none transparent;
border-radius: 0;
-webkit-box-shadow: none !important;
box-shadow: none !important;
border-bottom: none;
border-top: 1px solid #D4D4D5;
}
.ui.bottom.tabular.menu .item {
background: none;
border-left: 1px solid transparent;
border-right: 1px solid transparent;
border-bottom: 1px solid transparent;
border-top: none;
}
.ui.bottom.tabular.menu .active.item {
background: none #FFFFFF;
color: rgba(0, 0, 0, 0.95);
border-color: #D4D4D5;
margin: -1px 0 0 0;
border-radius: 0 0 0.28571429rem 0.28571429rem !important;
}
/* Vertical Tabular (Left) */
.ui.vertical.tabular.menu {
background: none transparent;
border-radius: 0;
-webkit-box-shadow: none !important;
box-shadow: none !important;
border-bottom: none;
border-right: 1px solid #D4D4D5;
}
.ui.vertical.tabular.menu .item {
background: none;
border-left: 1px solid transparent;
border-bottom: 1px solid transparent;
border-top: 1px solid transparent;
border-right: none;
}
.ui.vertical.tabular.menu .active.item {
background: none #FFFFFF;
color: rgba(0, 0, 0, 0.95);
border-color: #D4D4D5;
margin: 0 -1px 0 0;
border-radius: 0.28571429rem 0 0 0.28571429rem !important;
}
/* Vertical Right Tabular */
.ui.vertical.right.tabular.menu {
background: none transparent;
border-radius: 0;
-webkit-box-shadow: none !important;
box-shadow: none !important;
border-bottom: none;
border-right: none;
border-left: 1px solid #D4D4D5;
}
.ui.vertical.right.tabular.menu .item {
background: none;
border-right: 1px solid transparent;
border-bottom: 1px solid transparent;
border-top: 1px solid transparent;
border-left: none;
}
.ui.vertical.right.tabular.menu .active.item {
background: none #FFFFFF;
color: rgba(0, 0, 0, 0.95);
border-color: #D4D4D5;
margin: 0 0 0 -1px;
border-radius: 0 0.28571429rem 0.28571429rem 0 !important;
}
/* Dropdown */
.ui.tabular.menu .active.dropdown.item {
margin-bottom: 0;
border-left: 1px solid transparent;
border-right: 1px solid transparent;
border-top: 2px solid transparent;
border-bottom: none;
}
/*--------------
Pagination
---------------*/
.ui.pagination.menu {
margin: 0;
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
vertical-align: middle;
}
.ui.pagination.menu .item:last-child {
border-radius: 0 0.28571429rem 0.28571429rem 0;
}
.ui.compact.menu .item:last-child {
border-radius: 0 0.28571429rem 0.28571429rem 0;
}
.ui.pagination.menu .item:last-child:before {
display: none;
}
.ui.pagination.menu .item {
min-width: 3em;
text-align: center;
}
.ui.pagination.menu .icon.item i.icon {
vertical-align: top;
}
/* Active */
.ui.pagination.menu .active.item {
border-top: none;
padding-top: 0.92857143em;
background-color: rgba(0, 0, 0, 0.05);
color: rgba(0, 0, 0, 0.95);
-webkit-box-shadow: none;
box-shadow: none;
}
/*--------------
Secondary
---------------*/
.ui.secondary.menu {
background: none;
margin-left: -0.35714286em;
margin-right: -0.35714286em;
border-radius: 0;
border: none;
-webkit-box-shadow: none;
box-shadow: none;
}
/* Item */
.ui.secondary.menu .item {
-ms-flex-item-align: center;
align-self: center;
-webkit-box-shadow: none;
box-shadow: none;
border: none;
padding: 0.78571429em 0.92857143em;
margin: 0 0.35714286em;
background: none;
-webkit-transition: color 0.1s ease;
transition: color 0.1s ease;
border-radius: 0.28571429rem;
}
/* No Divider */
.ui.secondary.menu .item:before {
display: none !important;
}
/* Header */
.ui.secondary.menu .header.item {
border-radius: 0;
border-right: none;
background: none transparent;
}
/* Image */
.ui.secondary.menu .item > img:not(.ui) {
margin: 0;
}
/* Hover */
.ui.secondary.menu .dropdown.item:hover,
.ui.secondary.menu .link.item:hover,
.ui.secondary.menu a.item:hover {
background: rgba(0, 0, 0, 0.05);
color: rgba(0, 0, 0, 0.95);
}
/* Active */
.ui.secondary.menu .active.item {
-webkit-box-shadow: none;
box-shadow: none;
background: rgba(0, 0, 0, 0.05);
color: rgba(0, 0, 0, 0.95);
border-radius: 0.28571429rem;
}
/* Active Hover */
.ui.secondary.menu .active.item:hover {
-webkit-box-shadow: none;
box-shadow: none;
background: rgba(0, 0, 0, 0.05);
color: rgba(0, 0, 0, 0.95);
}
/* Inverted */
.ui.secondary.inverted.menu .link.item:not(.disabled),
.ui.secondary.inverted.menu a.item:not(.disabled) {
color: rgba(255, 255, 255, 0.7);
}
.ui.secondary.inverted.menu .dropdown.item:hover,
.ui.secondary.inverted.menu .link.item:hover,
.ui.secondary.inverted.menu a.item:hover {
background: rgba(255, 255, 255, 0.08);
color: #ffffff;
}
.ui.secondary.inverted.menu .active.item {
background: rgba(255, 255, 255, 0.15);
color: #ffffff;
}
/* Fix item margins */
.ui.secondary.item.menu {
margin-left: 0;
margin-right: 0;
}
.ui.secondary.item.menu .item:last-child {
margin-right: 0;
}
.ui.secondary.attached.menu {
-webkit-box-shadow: none;
box-shadow: none;
}
/*---------------------
Secondary Vertical
-----------------------*/
/* Sub Menu */
.ui.vertical.secondary.menu .item:not(.dropdown) > .menu {
margin: 0 -0.92857143em;
}
.ui.vertical.secondary.menu .item:not(.dropdown) > .menu > .item {
margin: 0;
padding: 0.5em 1.33333333em;
}
.ui.secondary.vertical.menu > .item {
border: none;
margin: 0 0 0.35714286em;
border-radius: 0.28571429rem !important;
}
.ui.secondary.vertical.menu > .header.item {
border-radius: 0;
}
/* Sub Menu */
.ui.vertical.secondary.menu .item > .menu .item {
background-color: transparent;
}
/* Inverted */
.ui.secondary.inverted.menu {
background-color: transparent;
}
/*---------------------
Secondary Pointing
-----------------------*/
.ui.secondary.pointing.menu {
margin-left: 0;
margin-right: 0;
border-bottom: 2px solid rgba(34, 36, 38, 0.15);
}
.ui.secondary.pointing.menu .item {
border-bottom-color: transparent;
border-bottom-style: solid;
border-radius: 0;
-ms-flex-item-align: end;
align-self: flex-end;
margin: 0 0 -2px;
padding: 0.85714286em 1.14285714em;
border-bottom-width: 2px;
-webkit-transition: color 0.1s ease;
transition: color 0.1s ease;
}
.ui.secondary.pointing.menu .ui.dropdown .menu .item {
border-bottom-width: 0;
}
.ui.secondary.pointing.menu .item > .label:not(.floating) {
margin-top: -0.3em;
margin-bottom: -0.3em;
}
.ui.secondary.pointing.menu .item > .circular.label {
margin-top: -0.5em;
margin-bottom: -0.5em;
}
/* Item Types */
.ui.secondary.pointing.menu .header.item {
color: rgba(0, 0, 0, 0.85) !important;
}
.ui.secondary.pointing.menu .text.item {
-webkit-box-shadow: none !important;
box-shadow: none !important;
}
.ui.secondary.pointing.menu .item:after {
display: none;
}
/* Hover */
.ui.secondary.pointing.menu .dropdown.item:hover,
.ui.secondary.pointing.menu .link.item:hover,
.ui.secondary.pointing.menu a.item:hover {
background-color: transparent;
color: rgba(0, 0, 0, 0.87);
}
/* Pressed */
.ui.secondary.pointing.menu .dropdown.item:active,
.ui.secondary.pointing.menu .link.item:active,
.ui.secondary.pointing.menu a.item:active {
background-color: transparent;
border-color: rgba(34, 36, 38, 0.15);
}
/* Active */
.ui.secondary.pointing.menu .active.item {
background-color: transparent;
-webkit-box-shadow: none;
box-shadow: none;
border-color: currentColor;
font-weight: bold;
color: rgba(0, 0, 0, 0.95);
}
/* Active Hover */
.ui.secondary.pointing.menu .active.item:hover {
border-color: currentColor;
color: rgba(0, 0, 0, 0.95);
}
/* Active Dropdown */
.ui.secondary.pointing.menu .active.dropdown.item {
border-color: transparent;
}
/* Vertical Pointing */
.ui.secondary.vertical.pointing.menu {
border-bottom-width: 0;
border-right-width: 2px;
border-right-style: solid;
border-right-color: rgba(34, 36, 38, 0.15);
}
.ui.secondary.vertical.pointing.menu .item {
border-bottom: none;
border-right-style: solid;
border-right-color: transparent;
border-radius: 0 !important;
margin: 0 -2px 0 0;
border-right-width: 2px;
}
/* Vertical Active */
.ui.secondary.vertical.pointing.menu .active.item {
border-color: currentColor;
}
/* Inverted */
.ui.secondary.inverted.pointing.menu {
border-color: rgba(255, 255, 255, 0.1);
}
.ui.secondary.inverted.pointing.menu .item:not(.disabled) {
color: rgba(255, 255, 255, 0.9);
}
.ui.secondary.inverted.pointing.menu .header.item {
color: #FFFFFF !important;
}
/* Hover */
.ui.secondary.inverted.pointing.menu .link.item:hover,
.ui.secondary.inverted.pointing.menu a.item:hover {
color: #ffffff;
}
/* Active */
.ui.ui.secondary.inverted.pointing.menu .active.item {
border-color: #FFFFFF;
color: #ffffff;
background-color: transparent;
}
/*--------------
Text Menu
---------------*/
.ui.text.menu {
background: none transparent;
border-radius: 0;
-webkit-box-shadow: none;
box-shadow: none;
border: none;
margin: 1em -0.5em;
}
.ui.text.menu .item {
border-radius: 0;
-webkit-box-shadow: none;
box-shadow: none;
-ms-flex-item-align: center;
align-self: center;
margin: 0 0;
padding: 0.35714286em 0.5em;
font-weight: normal;
color: rgba(0, 0, 0, 0.6);
-webkit-transition: opacity 0.1s ease;
transition: opacity 0.1s ease;
}
/* Border */
.ui.text.menu .item:before,
.ui.text.menu .menu .item:before {
display: none !important;
}
/* Header */
.ui.text.menu .header.item {
background-color: transparent;
opacity: 1;
color: rgba(0, 0, 0, 0.85);
font-size: 0.92857143em;
text-transform: uppercase;
font-weight: bold;
}
/* Image */
.ui.text.menu .item > img:not(.ui) {
margin: 0;
}
/*--- fluid text ---*/
.ui.text.item.menu .item {
margin: 0;
}
/*--- vertical text ---*/
.ui.vertical.text.menu {
margin: 1em 0;
}
.ui.vertical.text.menu:first-child {
margin-top: 0;
}
.ui.vertical.text.menu:last-child {
margin-bottom: 0;
}
.ui.vertical.text.menu .item {
margin: 0.57142857em 0;
padding-left: 0;
padding-right: 0;
}
.ui.vertical.text.menu .item > i.icon {
float: none;
margin: 0 0.35714286em 0 0;
}
.ui.vertical.text.menu .header.item {
margin: 0.57142857em 0 0.71428571em;
}
/* Vertical Sub Menu */
.ui.vertical.text.menu .item:not(.dropdown) > .menu {
margin: 0;
}
.ui.vertical.text.menu .item:not(.dropdown) > .menu > .item {
margin: 0;
padding: 0.5em 0;
}
/*--- hover ---*/
.ui.text.menu .item:hover {
opacity: 1;
background-color: transparent;
}
/*--- active ---*/
.ui.text.menu .active.item {
background-color: transparent;
border: none;
-webkit-box-shadow: none;
box-shadow: none;
font-weight: normal;
color: rgba(0, 0, 0, 0.95);
}
/*--- active hover ---*/
.ui.text.menu .active.item:hover {
background-color: transparent;
}
/* Disable Bariations */
.ui.text.pointing.menu .active.item:after {
-webkit-box-shadow: none;
box-shadow: none;
}
.ui.text.attached.menu {
-webkit-box-shadow: none;
box-shadow: none;
}
/* Inverted */
.ui.inverted.text.menu,
.ui.inverted.text.menu .item,
.ui.inverted.text.menu .item:hover,
.ui.inverted.text.menu .active.item {
background-color: transparent;
}
/* Fluid */
.ui.fluid.text.menu {
margin-left: 0;
margin-right: 0;
}
/*--------------
Icon Only
---------------*/
/* Vertical Menu */
.ui.vertical.icon.menu {
display: inline-block;
width: auto;
}
/* Item */
.ui.icon.menu .item {
height: auto;
text-align: center;
color: #1B1C1D;
}
/* Icon */
.ui.icon.menu .item > i.icon:not(.dropdown) {
margin: 0;
opacity: 1;
}
/* Icon Gylph */
.ui.icon.menu i.icon:before {
opacity: 1;
}
/* (x) Item Icon */
.ui.menu .icon.item > i.icon {
width: auto;
margin: 0 auto;
}
/* Vertical Icon */
.ui.vertical.icon.menu .item > i.icon:not(.dropdown) {
display: block;
opacity: 1;
margin: 0 auto;
float: none;
}
/* Inverted */
.ui.inverted.icon.menu .item {
color: #FFFFFF;
}
/*--------------
Labeled Icon
---------------*/
/* Menu */
.ui.labeled.icon.menu {
text-align: center;
}
/* Item */
.ui.labeled.icon.menu .item {
min-width: 6em;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
}
/* Icon */
.ui.labeled.icon.menu > .item > i.icon:not(.dropdown) {
height: 1em;
display: block;
font-size: 1.71428571em !important;
margin: 0 auto 0.5rem !important;
}
/* Fluid */
.ui.fluid.labeled.icon.menu > .item {
min-width: 0;
}
/*******************************
Variations
*******************************/
/*--------------
Stackable
---------------*/
@media only screen and (max-width: 767.98px) {
.ui.stackable.menu {
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
}
.ui.stackable.menu .item {
width: 100% !important;
}
.ui.stackable.menu .item:before {
position: absolute;
content: '';
top: auto;
bottom: 0;
left: 0;
width: 100%;
height: 1px;
background: rgba(34, 36, 38, 0.1);
}
.ui.stackable.menu .left.menu,
.ui.stackable.menu .left.item {
margin-right: 0 !important;
}
.ui.stackable.menu .right.menu,
.ui.stackable.menu .right.item {
margin-left: 0 !important;
}
.ui.stackable.menu .center.menu,
.ui.stackable.menu .center.item {
margin-left: 0 !important;
margin-right: 0 !important;
}
.ui.stackable.menu .right.menu,
.ui.stackable.menu .center.menu,
.ui.stackable.menu .left.menu {
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
}
}
/*--------------
Colors
---------------*/
.ui.ui.ui.menu .primary.active.item,
.ui.ui.primary.menu .active.item:hover,
.ui.ui.primary.menu .active.item {
color: #2185D0;
}
.ui.ui.ui.menu .red.active.item,
.ui.ui.red.menu .active.item:hover,
.ui.ui.red.menu .active.item {
color: #DB2828;
}
.ui.ui.ui.menu .orange.active.item,
.ui.ui.orange.menu .active.item:hover,
.ui.ui.orange.menu .active.item {
color: #F2711C;
}
.ui.ui.ui.menu .yellow.active.item,
.ui.ui.yellow.menu .active.item:hover,
.ui.ui.yellow.menu .active.item {
color: #FBBD08;
}
.ui.ui.ui.menu .olive.active.item,
.ui.ui.olive.menu .active.item:hover,
.ui.ui.olive.menu .active.item {
color: #B5CC18;
}
.ui.ui.ui.menu .green.active.item,
.ui.ui.green.menu .active.item:hover,
.ui.ui.green.menu .active.item {
color: #21BA45;
}
.ui.ui.ui.menu .teal.active.item,
.ui.ui.teal.menu .active.item:hover,
.ui.ui.teal.menu .active.item {
color: #00B5AD;
}
.ui.ui.ui.menu .blue.active.item,
.ui.ui.blue.menu .active.item:hover,
.ui.ui.blue.menu .active.item {
color: #2185D0;
}
.ui.ui.ui.menu .violet.active.item,
.ui.ui.violet.menu .active.item:hover,
.ui.ui.violet.menu .active.item {
color: #6435C9;
}
.ui.ui.ui.menu .purple.active.item,
.ui.ui.purple.menu .active.item:hover,
.ui.ui.purple.menu .active.item {
color: #A333C8;
}
.ui.ui.ui.menu .pink.active.item,
.ui.ui.pink.menu .active.item:hover,
.ui.ui.pink.menu .active.item {
color: #E03997;
}
.ui.ui.ui.menu .brown.active.item,
.ui.ui.brown.menu .active.item:hover,
.ui.ui.brown.menu .active.item {
color: #A5673F;
}
.ui.ui.ui.menu .grey.active.item,
.ui.ui.grey.menu .active.item:hover,
.ui.ui.grey.menu .active.item {
color: #767676;
}
.ui.ui.ui.menu .black.active.item,
.ui.ui.black.menu .active.item:hover,
.ui.ui.black.menu .active.item {
color: #1B1C1D;
}
/*--------------
Inverted
---------------*/
.ui.inverted.menu {
border: 0 solid transparent;
background: #1B1C1D;
-webkit-box-shadow: none;
box-shadow: none;
}
/* Menu Item */
.ui.inverted.menu .item,
.ui.inverted.menu .item > a:not(.ui) {
background: transparent;
color: rgba(255, 255, 255, 0.9);
}
.ui.inverted.menu .item.menu {
background: transparent;
}
/*--- Border ---*/
.ui.inverted.menu .item:before {
background: rgba(255, 255, 255, 0.08);
}
.ui.vertical.inverted.menu .item:before {
background: rgba(255, 255, 255, 0.08);
}
/* Sub Menu */
.ui.vertical.inverted.menu .menu .item,
.ui.vertical.inverted.menu .menu .item a:not(.ui) {
color: rgba(255, 255, 255, 0.5);
}
/* Header */
.ui.inverted.menu .header.item {
margin: 0;
background: transparent;
-webkit-box-shadow: none;
box-shadow: none;
}
/* Disabled */
.ui.ui.inverted.menu .item.disabled {
color: rgba(225, 225, 225, 0.3);
}
/*--- Hover ---*/
.ui.link.inverted.menu .item:hover,
.ui.inverted.menu .dropdown.item:hover,
.ui.inverted.menu .link.item:hover,
.ui.inverted.menu a.item:hover {
background: rgba(255, 255, 255, 0.08);
color: #ffffff;
}
.ui.vertical.inverted.menu .item .menu a.item:hover,
.ui.vertical.inverted.menu .item .menu .link.item:hover {
background: transparent;
color: #ffffff;
}
/*--- Pressed ---*/
.ui.inverted.menu a.item:active,
.ui.inverted.menu .link.item:active {
background: rgba(255, 255, 255, 0.08);
color: #ffffff;
}
/*--- Active ---*/
.ui.inverted.menu .active.item {
background: #3D3E3F;
color: #ffffff !important;
}
.ui.inverted.vertical.menu .item .menu .active.item {
background: transparent;
color: #FFFFFF;
}
.ui.inverted.pointing.menu .active.item:after {
background: #3D3E3F;
margin: 0 !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
border: none !important;
}
/*--- Active Hover ---*/
.ui.inverted.menu .active.item:hover {
background: #3D3E3F;
color: #FFFFFF !important;
}
.ui.inverted.pointing.menu .active.item:hover:after {
background: #3D3E3F;
}
/*--------------
Floated
---------------*/
.ui.floated.menu {
float: left;
margin: 0 0.5rem 0 0;
}
.ui.floated.menu .item:last-child:before {
display: none;
}
.ui.right.floated.menu {
float: right;
margin: 0 0 0 0.5rem;
}
/*--------------
Inverted
---------------*/
.ui.ui.ui.inverted.menu .primary.active.item,
.ui.ui.inverted.primary.menu {
background-color: #2185D0;
}
.ui.inverted.primary.menu .item:before {
background-color: rgba(34, 36, 38, 0.1);
}
.ui.ui.inverted.primary.menu .active.item {
background-color: rgba(0, 0, 0, 0.1);
}
.ui.inverted.pointing.primary.menu .active.item {
background-color: #1678c2;
}
.ui.ui.ui.inverted.menu .red.active.item,
.ui.ui.inverted.red.menu {
background-color: #DB2828;
}
.ui.inverted.red.menu .item:before {
background-color: rgba(34, 36, 38, 0.1);
}
.ui.ui.inverted.red.menu .active.item {
background-color: rgba(0, 0, 0, 0.1);
}
.ui.inverted.pointing.red.menu .active.item {
background-color: #d01919;
}
.ui.ui.ui.inverted.menu .orange.active.item,
.ui.ui.inverted.orange.menu {
background-color: #F2711C;
}
.ui.inverted.orange.menu .item:before {
background-color: rgba(34, 36, 38, 0.1);
}
.ui.ui.inverted.orange.menu .active.item {
background-color: rgba(0, 0, 0, 0.1);
}
.ui.inverted.pointing.orange.menu .active.item {
background-color: #f26202;
}
.ui.ui.ui.inverted.menu .yellow.active.item,
.ui.ui.inverted.yellow.menu {
background-color: #FBBD08;
}
.ui.inverted.yellow.menu .item:before {
background-color: rgba(34, 36, 38, 0.1);
}
.ui.ui.inverted.yellow.menu .active.item {
background-color: rgba(0, 0, 0, 0.1);
}
.ui.inverted.pointing.yellow.menu .active.item {
background-color: #eaae00;
}
.ui.ui.ui.inverted.menu .olive.active.item,
.ui.ui.inverted.olive.menu {
background-color: #B5CC18;
}
.ui.inverted.olive.menu .item:before {
background-color: rgba(34, 36, 38, 0.1);
}
.ui.ui.inverted.olive.menu .active.item {
background-color: rgba(0, 0, 0, 0.1);
}
.ui.inverted.pointing.olive.menu .active.item {
background-color: #a7bd0d;
}
.ui.ui.ui.inverted.menu .green.active.item,
.ui.ui.inverted.green.menu {
background-color: #21BA45;
}
.ui.inverted.green.menu .item:before {
background-color: rgba(34, 36, 38, 0.1);
}
.ui.ui.inverted.green.menu .active.item {
background-color: rgba(0, 0, 0, 0.1);
}
.ui.inverted.pointing.green.menu .active.item {
background-color: #16ab39;
}
.ui.ui.ui.inverted.menu .teal.active.item,
.ui.ui.inverted.teal.menu {
background-color: #00B5AD;
}
.ui.inverted.teal.menu .item:before {
background-color: rgba(34, 36, 38, 0.1);
}
.ui.ui.inverted.teal.menu .active.item {
background-color: rgba(0, 0, 0, 0.1);
}
.ui.inverted.pointing.teal.menu .active.item {
background-color: #009c95;
}
.ui.ui.ui.inverted.menu .blue.active.item,
.ui.ui.inverted.blue.menu {
background-color: #2185D0;
}
.ui.inverted.blue.menu .item:before {
background-color: rgba(34, 36, 38, 0.1);
}
.ui.ui.inverted.blue.menu .active.item {
background-color: rgba(0, 0, 0, 0.1);
}
.ui.inverted.pointing.blue.menu .active.item {
background-color: #1678c2;
}
.ui.ui.ui.inverted.menu .violet.active.item,
.ui.ui.inverted.violet.menu {
background-color: #6435C9;
}
.ui.inverted.violet.menu .item:before {
background-color: rgba(34, 36, 38, 0.1);
}
.ui.ui.inverted.violet.menu .active.item {
background-color: rgba(0, 0, 0, 0.1);
}
.ui.inverted.pointing.violet.menu .active.item {
background-color: #5829bb;
}
.ui.ui.ui.inverted.menu .purple.active.item,
.ui.ui.inverted.purple.menu {
background-color: #A333C8;
}
.ui.inverted.purple.menu .item:before {
background-color: rgba(34, 36, 38, 0.1);
}
.ui.ui.inverted.purple.menu .active.item {
background-color: rgba(0, 0, 0, 0.1);
}
.ui.inverted.pointing.purple.menu .active.item {
background-color: #9627ba;
}
.ui.ui.ui.inverted.menu .pink.active.item,
.ui.ui.inverted.pink.menu {
background-color: #E03997;
}
.ui.inverted.pink.menu .item:before {
background-color: rgba(34, 36, 38, 0.1);
}
.ui.ui.inverted.pink.menu .active.item {
background-color: rgba(0, 0, 0, 0.1);
}
.ui.inverted.pointing.pink.menu .active.item {
background-color: #e61a8d;
}
.ui.ui.ui.inverted.menu .brown.active.item,
.ui.ui.inverted.brown.menu {
background-color: #A5673F;
}
.ui.inverted.brown.menu .item:before {
background-color: rgba(34, 36, 38, 0.1);
}
.ui.ui.inverted.brown.menu .active.item {
background-color: rgba(0, 0, 0, 0.1);
}
.ui.inverted.pointing.brown.menu .active.item {
background-color: #975b33;
}
.ui.ui.ui.inverted.menu .grey.active.item,
.ui.ui.inverted.grey.menu {
background-color: #767676;
}
.ui.inverted.grey.menu .item:before {
background-color: rgba(34, 36, 38, 0.1);
}
.ui.ui.inverted.grey.menu .active.item {
background-color: rgba(0, 0, 0, 0.1);
}
.ui.inverted.pointing.grey.menu .active.item {
background-color: #838383;
}
.ui.ui.ui.inverted.menu .black.active.item,
.ui.ui.inverted.black.menu {
background-color: #1B1C1D;
}
.ui.inverted.black.menu .item:before {
background-color: rgba(34, 36, 38, 0.1);
}
.ui.ui.inverted.black.menu .active.item {
background-color: rgba(0, 0, 0, 0.1);
}
.ui.inverted.pointing.black.menu .active.item {
background-color: #27292a;
}
.ui.ui.ui.inverted.pointing.menu .active.item:after {
background-color: inherit;
}
/*--------------
Fitted
---------------*/
.ui.fitted.menu .item,
.ui.fitted.menu .item .menu .item,
.ui.menu .fitted.item {
padding: 0;
}
.ui.horizontally.fitted.menu .item,
.ui.horizontally.fitted.menu .item .menu .item,
.ui.menu .horizontally.fitted.item {
padding-top: 0.92857143em;
padding-bottom: 0.92857143em;
}
.ui.vertically.fitted.menu .item,
.ui.vertically.fitted.menu .item .menu .item,
.ui.menu .vertically.fitted.item {
padding-left: 1.14285714em;
padding-right: 1.14285714em;
}
/*--------------
Borderless
---------------*/
.ui.borderless.menu .item:before,
.ui.borderless.menu .item .menu .item:before,
.ui.menu .borderless.item:before {
background: none !important;
}
/*-------------------
Compact
--------------------*/
.ui.compact.menu {
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: inline-flex;
margin: 0;
vertical-align: middle;
}
.ui.compact.vertical.menu {
/* IE hack to make dropdown icons appear inline */
display: -ms-inline-flexbox !important;
display: inline-block;
}
.ui.compact.menu:not(.secondary) .item:last-child {
border-radius: 0 0.28571429rem 0.28571429rem 0;
}
.ui.compact.menu .item:last-child:before {
display: none;
}
.ui.compact.vertical.menu {
width: auto !important;
}
.ui.compact.vertical.menu .item:last-child::before {
display: block;
}
/*-------------------
Fluid
--------------------*/
.ui.menu.fluid,
.ui.vertical.menu.fluid {
width: 100% !important;
}
/*-------------------
Evenly Sized
--------------------*/
.ui.item.menu,
.ui.item.menu .item {
width: 100%;
padding-left: 0 !important;
padding-right: 0 !important;
margin-left: 0 !important;
margin-right: 0 !important;
text-align: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
}
.ui.attached.item.menu:not(.tabular) {
margin: 0 -1px !important;
}
.ui.item.menu .item:last-child:before {
display: none;
}
.ui.menu.two.item .item {
width: 50%;
}
.ui.menu.three.item .item {
width: 33.333%;
}
.ui.menu.four.item .item {
width: 25%;
}
.ui.menu.five.item .item {
width: 20%;
}
.ui.menu.six.item .item {
width: 16.666%;
}
.ui.menu.seven.item .item {
width: 14.285%;
}
.ui.menu.eight.item .item {
width: 12.5%;
}
.ui.menu.nine.item .item {
width: 11.11%;
}
.ui.menu.ten.item .item {
width: 10%;
}
.ui.menu.eleven.item .item {
width: 9.09%;
}
.ui.menu.twelve.item .item {
width: 8.333%;
}
/*--------------
Fixed
---------------*/
.ui.menu.fixed {
position: fixed;
z-index: 101;
margin: 0;
width: 100%;
}
.ui.menu.fixed,
.ui.menu.fixed .item:first-child,
.ui.menu.fixed .item:last-child {
border-radius: 0 !important;
}
.ui.fixed.menu,
.ui[class*="top fixed"].menu {
top: 0;
left: 0;
right: auto;
bottom: auto;
}
.ui[class*="top fixed"].menu {
border-top: none;
border-left: none;
border-right: none;
}
.ui[class*="right fixed"].menu {
border-top: none;
border-bottom: none;
border-right: none;
top: 0;
right: 0;
left: auto;
bottom: auto;
width: auto;
height: 100%;
}
.ui[class*="bottom fixed"].menu {
border-bottom: none;
border-left: none;
border-right: none;
bottom: 0;
left: 0;
top: auto;
right: auto;
}
.ui[class*="left fixed"].menu {
border-top: none;
border-bottom: none;
border-left: none;
top: 0;
left: 0;
right: auto;
bottom: auto;
width: auto;
height: 100%;
}
/* Coupling with Grid */
.ui.fixed.menu + .ui.grid {
padding-top: 2.75rem;
}
/*-------------------
Pointing
--------------------*/
.ui.pointing.menu .item:after {
visibility: hidden;
position: absolute;
content: '';
top: 100%;
left: 50%;
-webkit-transform: translateX(-50%) translateY(-50%) rotate(45deg);
transform: translateX(-50%) translateY(-50%) rotate(45deg);
background: none;
margin: 0.5px 0 0;
width: 0.57142857em;
height: 0.57142857em;
border: none;
border-bottom: 1px solid #D4D4D5;
border-right: 1px solid #D4D4D5;
z-index: 2;
-webkit-transition: background 0.1s ease;
transition: background 0.1s ease;
}
.ui.vertical.pointing.menu .item:after {
position: absolute;
top: 50%;
right: 0;
bottom: auto;
left: auto;
-webkit-transform: translateX(50%) translateY(-50%) rotate(45deg);
transform: translateX(50%) translateY(-50%) rotate(45deg);
margin: 0 -0.5px 0 0;
border: none;
border-top: 1px solid #D4D4D5;
border-right: 1px solid #D4D4D5;
}
.ui.pointing.menu .ui.dropdown .menu .item:after,
.ui.vertical.pointing.menu .ui.dropdown .menu .item:after {
display: none;
}
/* Active */
.ui.pointing.menu .active.item:after {
visibility: visible;
}
.ui.pointing.menu .active.dropdown.item:after {
visibility: hidden;
}
/* Don't double up pointers */
.ui.pointing.menu .dropdown.active.item:after,
.ui.pointing.menu .active.item .menu .active.item:after {
display: none;
}
/* Colors */
.ui.pointing.menu .active.item:hover:after {
background-color: #F2F2F2;
}
.ui.pointing.menu .active.item:after {
background-color: #F2F2F2;
}
.ui.pointing.menu .active.item:hover:after {
background-color: #F2F2F2;
}
.ui.vertical.pointing.menu .active.item:hover:after {
background-color: #F2F2F2;
}
.ui.vertical.pointing.menu .active.item:after {
background-color: #F2F2F2;
}
.ui.vertical.pointing.menu .menu .active.item:after {
background-color: #FFFFFF;
}
.ui.inverted.pointing.menu .primary.active.item:after {
background-color: #2185D0;
}
.ui.inverted.pointing.menu .secondary.active.item:after {
background-color: #1B1C1D;
}
.ui.inverted.pointing.menu .red.active.item:after {
background-color: #DB2828;
}
.ui.inverted.pointing.menu .orange.active.item:after {
background-color: #F2711C;
}
.ui.inverted.pointing.menu .yellow.active.item:after {
background-color: #FBBD08;
}
.ui.inverted.pointing.menu .olive.active.item:after {
background-color: #B5CC18;
}
.ui.inverted.pointing.menu .green.active.item:after {
background-color: #21BA45;
}
.ui.inverted.pointing.menu .teal.active.item:after {
background-color: #00B5AD;
}
.ui.inverted.pointing.menu .blue.active.item:after {
background-color: #2185D0;
}
.ui.inverted.pointing.menu .violet.active.item:after {
background-color: #6435C9;
}
.ui.inverted.pointing.menu .purple.active.item:after {
background-color: #A333C8;
}
.ui.inverted.pointing.menu .pink.active.item:after {
background-color: #E03997;
}
.ui.inverted.pointing.menu .brown.active.item:after {
background-color: #A5673F;
}
.ui.inverted.pointing.menu .grey.active.item:after {
background-color: #767676;
}
.ui.inverted.pointing.menu .black.active.item:after {
background-color: #1B1C1D;
}
/*--------------
Attached
---------------*/
/* Middle */
.ui.attached.menu {
top: 0;
bottom: 0;
border-radius: 0;
margin: 0 -1px;
width: calc(100% + 2px);
max-width: calc(100% + 2px);
-webkit-box-shadow: none;
box-shadow: none;
}
.ui.attached + .ui.attached.menu:not(.top) {
border-top: none;
}
/* Top */
.ui[class*="top attached"].menu {
bottom: 0;
margin-bottom: 0;
top: 0;
margin-top: 1rem;
border-radius: 0.28571429rem 0.28571429rem 0 0;
}
.ui.menu[class*="top attached"]:first-child {
margin-top: 0;
}
/* Bottom */
.ui[class*="bottom attached"].menu {
bottom: 0;
margin-top: 0;
top: 0;
margin-bottom: 1rem;
-webkit-box-shadow: 0 1px 2px 0 rgba(34, 36, 38, 0.15), none;
box-shadow: 0 1px 2px 0 rgba(34, 36, 38, 0.15), none;
border-radius: 0 0 0.28571429rem 0.28571429rem;
}
.ui[class*="bottom attached"].menu:last-child {
margin-bottom: 0;
}
/* Attached Menu Item */
.ui.top.attached.menu > .item:first-child {
border-radius: 0.28571429rem 0 0 0;
}
.ui.bottom.attached.menu > .item:first-child {
border-radius: 0 0 0 0.28571429rem;
}
/* Tabular Attached */
.ui.attached.menu:not(.tabular) {
border: 1px solid #D4D4D5;
}
.ui.attached.inverted.menu {
border: none;
}
.ui.attached.tabular.menu {
margin-left: 0;
margin-right: 0;
width: 100%;
}
/*--------------
Sizes
---------------*/
.ui.menu {
font-size: 1rem;
}
.ui.vertical.menu {
width: 15rem;
}
.ui.mini.menu,
.ui.mini.menu .dropdown,
.ui.mini.menu .dropdown .menu > .item {
font-size: 0.78571429rem;
}
.ui.mini.vertical.menu:not(.icon) {
width: 9rem;
}
.ui.tiny.menu,
.ui.tiny.menu .dropdown,
.ui.tiny.menu .dropdown .menu > .item {
font-size: 0.85714286rem;
}
.ui.tiny.vertical.menu:not(.icon) {
width: 11rem;
}
.ui.small.menu,
.ui.small.menu .dropdown,
.ui.small.menu .dropdown .menu > .item {
font-size: 0.92857143rem;
}
.ui.small.vertical.menu:not(.icon) {
width: 13rem;
}
.ui.large.menu,
.ui.large.menu .dropdown,
.ui.large.menu .dropdown .menu > .item {
font-size: 1.07142857rem;
}
.ui.large.vertical.menu:not(.icon) {
width: 18rem;
}
.ui.big.menu,
.ui.big.menu .dropdown,
.ui.big.menu .dropdown .menu > .item {
font-size: 1.14285714rem;
}
.ui.big.vertical.menu:not(.icon) {
width: 20rem;
}
.ui.huge.menu,
.ui.huge.menu .dropdown,
.ui.huge.menu .dropdown .menu > .item {
font-size: 1.21428571rem;
}
.ui.huge.vertical.menu:not(.icon) {
width: 22rem;
}
.ui.massive.menu,
.ui.massive.menu .dropdown,
.ui.massive.menu .dropdown .menu > .item {
font-size: 1.28571429rem;
}
.ui.massive.vertical.menu:not(.icon) {
width: 25rem;
}
/*-------------------
Inverted dropdowns
--------------------*/
.ui.menu .ui.inverted.inverted.dropdown.item .menu {
background: #1B1C1D;
-webkit-box-shadow: none;
box-shadow: none;
}
.ui.menu .ui.inverted.dropdown .menu > .item {
color: rgba(255, 255, 255, 0.8) !important;
}
.ui.menu .ui.inverted.dropdown .menu > .active.item {
background: transparent !important;
color: rgba(255, 255, 255, 0.8) !important;
}
.ui.menu .ui.inverted.dropdown .menu > .item:hover {
background: rgba(255, 255, 255, 0.08) !important;
color: rgba(255, 255, 255, 0.8) !important;
}
.ui.menu .ui.inverted.dropdown .menu > .selected.item {
background: rgba(255, 255, 255, 0.15) !important;
color: rgba(255, 255, 255, 0.8) !important;
}
/* Vertical */
.ui.vertical.menu .inverted.dropdown.item .menu {
-webkit-box-shadow: none;
box-shadow: none;
}
/*******************************
Theme Overrides
*******************************/
/*******************************
Site Overrides
*******************************/
| {
"pile_set_name": "Github"
} |
import { Swal } from '../../utils'
describe('padding', () => {
it('padding should allow 0', () => {
Swal.fire({
padding: 0,
})
expect(Swal.getPopup().style.padding).to.equal('0px')
})
it('padding should allow a number', () => {
Swal.fire({
padding: 15,
})
expect(Swal.getPopup().style.padding).to.equal('15px')
})
it('padding should allow a string', () => {
Swal.fire({
padding: '2rem',
})
expect(Swal.getPopup().style.padding).to.equal('2rem')
})
it('padding should be empty with undefined', () => {
Swal.fire({
padding: undefined,
})
expect(Swal.getPopup().style.padding).to.equal('')
})
it('padding should be empty with an object', () => {
Swal.fire({
padding: {},
})
expect(Swal.getPopup().style.padding).to.equal('')
})
it('padding should be empty with an array', () => {
Swal.fire({
padding: [],
})
expect(Swal.getPopup().style.padding).to.equal('')
})
it('padding should be empty with `true`', () => {
Swal.fire({
padding: true,
})
expect(Swal.getPopup().style.padding).to.equal('')
})
})
| {
"pile_set_name": "Github"
} |
/*
* Copyright ©2018 vbill.cn.
* <p>
* 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.
* </p>
*/
package cn.vbill.middleware.porter.common.util.compile;
/**
* java文件对象
*
* @author: zhangkewei[zhang_kw@suixingpay.com]
* @date: 2018年03月19日 14:03
* @version: V1.0
* @review: zhangkewei[zhang_kw@suixingpay.com]/2018年03月19日 14:03
*/
public interface JavaFile {
/**
* getClassName
*
* @return
*/
String getClassName();
}
| {
"pile_set_name": "Github"
} |
//// { order: 3, compiler: { strictNullChecks: true } }
// JavaScript 文件中的代码流会影响整个程序的类型。
const users = [{ name: "Ahmed" }, { name: "Gemma" }, { name: "Jon" }];
// 我们尝试找到名为 “jon” 的用户。
const jon = users.find((u) => u.name === "jon");
// 在上面的情况中,“find” 可能失败,在这种情况下我们不能得到一个对象,
// 它会创建如下类型:
//
// { name: string } | undefined
//
// 如果您将鼠标悬停在下面的三个用到 ‘jon’ 的地方,您会看到类型的
// 变化依赖于文本在哪里:
if (jon) {
jon;
} else {
jon;
}
// 类型 ‘{ name: string } | undefined’ 使用了叫做
// 并集类型的 TypeScript 的功能,并集类型是声明对象可能是
// 几种东西之一的方式。
//
// 管道符号充当不同类型间的分隔符,JavaScript 的动态特性意味着许多
// 函数会收到和返回不同类型的对象,因此我们需要能够表达需要处理的对象。
// 我们可以通过几种方式来使用它。让我们看一下具有不同类型的值的数组。
const identifiers = ["Hello", "World", 24, 19];
// 我们可以使用 ‘typeof x === y’ 的 JavaScript 语法来检查第一个
// 元素的类型。您可以将鼠标悬停在下面的 ‘randomIdentifier’ 上以
// 查看它在不同的位置之间的变化。
const randomIdentifier = identifiers[0];
if (typeof randomIdentifier === "number") {
randomIdentifier;
} else {
randomIdentifier;
}
// 控制流分析代表着我们可以编写原始 JavaScript,而 TypeScript 将尝试
// 去了解代码类型在不同位置如何变化。
// 去了解更多关于代码流分析的信息:
// - example:type-guards
// 要继续阅读示例,您可以跳转到以下不同的位置:
//
// - 现代 JavaScript: example:immutability
// - 类型守卫: example:type-guards
// - JavaScript 函数式编程 example:function-chaining
| {
"pile_set_name": "Github"
} |
using System;
namespace OpenRasta.Client
{
public class ProgressEventArgs : EventArgs
{
public ProgressEventArgs(int progress)
{
Progress = progress;
}
public int Progress { get; set; }
}
} | {
"pile_set_name": "Github"
} |
""" Python Character Mapping Codec cp856 generated from 'MAPPINGS/VENDORS/MISC/CP856.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_table)
def decode(self,input,errors='strict'):
return codecs.charmap_decode(input,errors,decoding_table)
class IncrementalEncoder(codecs.IncrementalEncoder):
def encode(self, input, final=False):
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
class IncrementalDecoder(codecs.IncrementalDecoder):
def decode(self, input, final=False):
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
class StreamWriter(Codec,codecs.StreamWriter):
pass
class StreamReader(Codec,codecs.StreamReader):
pass
### encodings module API
def getregentry():
return codecs.CodecInfo(
name='cp856',
encode=Codec().encode,
decode=Codec().decode,
incrementalencoder=IncrementalEncoder,
incrementaldecoder=IncrementalDecoder,
streamreader=StreamReader,
streamwriter=StreamWriter,
)
### Decoding Table
decoding_table = (
u'\x00' # 0x00 -> NULL
u'\x01' # 0x01 -> START OF HEADING
u'\x02' # 0x02 -> START OF TEXT
u'\x03' # 0x03 -> END OF TEXT
u'\x04' # 0x04 -> END OF TRANSMISSION
u'\x05' # 0x05 -> ENQUIRY
u'\x06' # 0x06 -> ACKNOWLEDGE
u'\x07' # 0x07 -> BELL
u'\x08' # 0x08 -> BACKSPACE
u'\t' # 0x09 -> HORIZONTAL TABULATION
u'\n' # 0x0A -> LINE FEED
u'\x0b' # 0x0B -> VERTICAL TABULATION
u'\x0c' # 0x0C -> FORM FEED
u'\r' # 0x0D -> CARRIAGE RETURN
u'\x0e' # 0x0E -> SHIFT OUT
u'\x0f' # 0x0F -> SHIFT IN
u'\x10' # 0x10 -> DATA LINK ESCAPE
u'\x11' # 0x11 -> DEVICE CONTROL ONE
u'\x12' # 0x12 -> DEVICE CONTROL TWO
u'\x13' # 0x13 -> DEVICE CONTROL THREE
u'\x14' # 0x14 -> DEVICE CONTROL FOUR
u'\x15' # 0x15 -> NEGATIVE ACKNOWLEDGE
u'\x16' # 0x16 -> SYNCHRONOUS IDLE
u'\x17' # 0x17 -> END OF TRANSMISSION BLOCK
u'\x18' # 0x18 -> CANCEL
u'\x19' # 0x19 -> END OF MEDIUM
u'\x1a' # 0x1A -> SUBSTITUTE
u'\x1b' # 0x1B -> ESCAPE
u'\x1c' # 0x1C -> FILE SEPARATOR
u'\x1d' # 0x1D -> GROUP SEPARATOR
u'\x1e' # 0x1E -> RECORD SEPARATOR
u'\x1f' # 0x1F -> UNIT SEPARATOR
u' ' # 0x20 -> SPACE
u'!' # 0x21 -> EXCLAMATION MARK
u'"' # 0x22 -> QUOTATION MARK
u'#' # 0x23 -> NUMBER SIGN
u'$' # 0x24 -> DOLLAR SIGN
u'%' # 0x25 -> PERCENT SIGN
u'&' # 0x26 -> AMPERSAND
u"'" # 0x27 -> APOSTROPHE
u'(' # 0x28 -> LEFT PARENTHESIS
u')' # 0x29 -> RIGHT PARENTHESIS
u'*' # 0x2A -> ASTERISK
u'+' # 0x2B -> PLUS SIGN
u',' # 0x2C -> COMMA
u'-' # 0x2D -> HYPHEN-MINUS
u'.' # 0x2E -> FULL STOP
u'/' # 0x2F -> SOLIDUS
u'0' # 0x30 -> DIGIT ZERO
u'1' # 0x31 -> DIGIT ONE
u'2' # 0x32 -> DIGIT TWO
u'3' # 0x33 -> DIGIT THREE
u'4' # 0x34 -> DIGIT FOUR
u'5' # 0x35 -> DIGIT FIVE
u'6' # 0x36 -> DIGIT SIX
u'7' # 0x37 -> DIGIT SEVEN
u'8' # 0x38 -> DIGIT EIGHT
u'9' # 0x39 -> DIGIT NINE
u':' # 0x3A -> COLON
u';' # 0x3B -> SEMICOLON
u'<' # 0x3C -> LESS-THAN SIGN
u'=' # 0x3D -> EQUALS SIGN
u'>' # 0x3E -> GREATER-THAN SIGN
u'?' # 0x3F -> QUESTION MARK
u'@' # 0x40 -> COMMERCIAL AT
u'A' # 0x41 -> LATIN CAPITAL LETTER A
u'B' # 0x42 -> LATIN CAPITAL LETTER B
u'C' # 0x43 -> LATIN CAPITAL LETTER C
u'D' # 0x44 -> LATIN CAPITAL LETTER D
u'E' # 0x45 -> LATIN CAPITAL LETTER E
u'F' # 0x46 -> LATIN CAPITAL LETTER F
u'G' # 0x47 -> LATIN CAPITAL LETTER G
u'H' # 0x48 -> LATIN CAPITAL LETTER H
u'I' # 0x49 -> LATIN CAPITAL LETTER I
u'J' # 0x4A -> LATIN CAPITAL LETTER J
u'K' # 0x4B -> LATIN CAPITAL LETTER K
u'L' # 0x4C -> LATIN CAPITAL LETTER L
u'M' # 0x4D -> LATIN CAPITAL LETTER M
u'N' # 0x4E -> LATIN CAPITAL LETTER N
u'O' # 0x4F -> LATIN CAPITAL LETTER O
u'P' # 0x50 -> LATIN CAPITAL LETTER P
u'Q' # 0x51 -> LATIN CAPITAL LETTER Q
u'R' # 0x52 -> LATIN CAPITAL LETTER R
u'S' # 0x53 -> LATIN CAPITAL LETTER S
u'T' # 0x54 -> LATIN CAPITAL LETTER T
u'U' # 0x55 -> LATIN CAPITAL LETTER U
u'V' # 0x56 -> LATIN CAPITAL LETTER V
u'W' # 0x57 -> LATIN CAPITAL LETTER W
u'X' # 0x58 -> LATIN CAPITAL LETTER X
u'Y' # 0x59 -> LATIN CAPITAL LETTER Y
u'Z' # 0x5A -> LATIN CAPITAL LETTER Z
u'[' # 0x5B -> LEFT SQUARE BRACKET
u'\\' # 0x5C -> REVERSE SOLIDUS
u']' # 0x5D -> RIGHT SQUARE BRACKET
u'^' # 0x5E -> CIRCUMFLEX ACCENT
u'_' # 0x5F -> LOW LINE
u'`' # 0x60 -> GRAVE ACCENT
u'a' # 0x61 -> LATIN SMALL LETTER A
u'b' # 0x62 -> LATIN SMALL LETTER B
u'c' # 0x63 -> LATIN SMALL LETTER C
u'd' # 0x64 -> LATIN SMALL LETTER D
u'e' # 0x65 -> LATIN SMALL LETTER E
u'f' # 0x66 -> LATIN SMALL LETTER F
u'g' # 0x67 -> LATIN SMALL LETTER G
u'h' # 0x68 -> LATIN SMALL LETTER H
u'i' # 0x69 -> LATIN SMALL LETTER I
u'j' # 0x6A -> LATIN SMALL LETTER J
u'k' # 0x6B -> LATIN SMALL LETTER K
u'l' # 0x6C -> LATIN SMALL LETTER L
u'm' # 0x6D -> LATIN SMALL LETTER M
u'n' # 0x6E -> LATIN SMALL LETTER N
u'o' # 0x6F -> LATIN SMALL LETTER O
u'p' # 0x70 -> LATIN SMALL LETTER P
u'q' # 0x71 -> LATIN SMALL LETTER Q
u'r' # 0x72 -> LATIN SMALL LETTER R
u's' # 0x73 -> LATIN SMALL LETTER S
u't' # 0x74 -> LATIN SMALL LETTER T
u'u' # 0x75 -> LATIN SMALL LETTER U
u'v' # 0x76 -> LATIN SMALL LETTER V
u'w' # 0x77 -> LATIN SMALL LETTER W
u'x' # 0x78 -> LATIN SMALL LETTER X
u'y' # 0x79 -> LATIN SMALL LETTER Y
u'z' # 0x7A -> LATIN SMALL LETTER Z
u'{' # 0x7B -> LEFT CURLY BRACKET
u'|' # 0x7C -> VERTICAL LINE
u'}' # 0x7D -> RIGHT CURLY BRACKET
u'~' # 0x7E -> TILDE
u'\x7f' # 0x7F -> DELETE
u'\u05d0' # 0x80 -> HEBREW LETTER ALEF
u'\u05d1' # 0x81 -> HEBREW LETTER BET
u'\u05d2' # 0x82 -> HEBREW LETTER GIMEL
u'\u05d3' # 0x83 -> HEBREW LETTER DALET
u'\u05d4' # 0x84 -> HEBREW LETTER HE
u'\u05d5' # 0x85 -> HEBREW LETTER VAV
u'\u05d6' # 0x86 -> HEBREW LETTER ZAYIN
u'\u05d7' # 0x87 -> HEBREW LETTER HET
u'\u05d8' # 0x88 -> HEBREW LETTER TET
u'\u05d9' # 0x89 -> HEBREW LETTER YOD
u'\u05da' # 0x8A -> HEBREW LETTER FINAL KAF
u'\u05db' # 0x8B -> HEBREW LETTER KAF
u'\u05dc' # 0x8C -> HEBREW LETTER LAMED
u'\u05dd' # 0x8D -> HEBREW LETTER FINAL MEM
u'\u05de' # 0x8E -> HEBREW LETTER MEM
u'\u05df' # 0x8F -> HEBREW LETTER FINAL NUN
u'\u05e0' # 0x90 -> HEBREW LETTER NUN
u'\u05e1' # 0x91 -> HEBREW LETTER SAMEKH
u'\u05e2' # 0x92 -> HEBREW LETTER AYIN
u'\u05e3' # 0x93 -> HEBREW LETTER FINAL PE
u'\u05e4' # 0x94 -> HEBREW LETTER PE
u'\u05e5' # 0x95 -> HEBREW LETTER FINAL TSADI
u'\u05e6' # 0x96 -> HEBREW LETTER TSADI
u'\u05e7' # 0x97 -> HEBREW LETTER QOF
u'\u05e8' # 0x98 -> HEBREW LETTER RESH
u'\u05e9' # 0x99 -> HEBREW LETTER SHIN
u'\u05ea' # 0x9A -> HEBREW LETTER TAV
u'\ufffe' # 0x9B -> UNDEFINED
u'\xa3' # 0x9C -> POUND SIGN
u'\ufffe' # 0x9D -> UNDEFINED
u'\xd7' # 0x9E -> MULTIPLICATION SIGN
u'\ufffe' # 0x9F -> UNDEFINED
u'\ufffe' # 0xA0 -> UNDEFINED
u'\ufffe' # 0xA1 -> UNDEFINED
u'\ufffe' # 0xA2 -> UNDEFINED
u'\ufffe' # 0xA3 -> UNDEFINED
u'\ufffe' # 0xA4 -> UNDEFINED
u'\ufffe' # 0xA5 -> UNDEFINED
u'\ufffe' # 0xA6 -> UNDEFINED
u'\ufffe' # 0xA7 -> UNDEFINED
u'\ufffe' # 0xA8 -> UNDEFINED
u'\xae' # 0xA9 -> REGISTERED SIGN
u'\xac' # 0xAA -> NOT SIGN
u'\xbd' # 0xAB -> VULGAR FRACTION ONE HALF
u'\xbc' # 0xAC -> VULGAR FRACTION ONE QUARTER
u'\ufffe' # 0xAD -> UNDEFINED
u'\xab' # 0xAE -> LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
u'\xbb' # 0xAF -> RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
u'\u2591' # 0xB0 -> LIGHT SHADE
u'\u2592' # 0xB1 -> MEDIUM SHADE
u'\u2593' # 0xB2 -> DARK SHADE
u'\u2502' # 0xB3 -> BOX DRAWINGS LIGHT VERTICAL
u'\u2524' # 0xB4 -> BOX DRAWINGS LIGHT VERTICAL AND LEFT
u'\ufffe' # 0xB5 -> UNDEFINED
u'\ufffe' # 0xB6 -> UNDEFINED
u'\ufffe' # 0xB7 -> UNDEFINED
u'\xa9' # 0xB8 -> COPYRIGHT SIGN
u'\u2563' # 0xB9 -> BOX DRAWINGS DOUBLE VERTICAL AND LEFT
u'\u2551' # 0xBA -> BOX DRAWINGS DOUBLE VERTICAL
u'\u2557' # 0xBB -> BOX DRAWINGS DOUBLE DOWN AND LEFT
u'\u255d' # 0xBC -> BOX DRAWINGS DOUBLE UP AND LEFT
u'\xa2' # 0xBD -> CENT SIGN
u'\xa5' # 0xBE -> YEN SIGN
u'\u2510' # 0xBF -> BOX DRAWINGS LIGHT DOWN AND LEFT
u'\u2514' # 0xC0 -> BOX DRAWINGS LIGHT UP AND RIGHT
u'\u2534' # 0xC1 -> BOX DRAWINGS LIGHT UP AND HORIZONTAL
u'\u252c' # 0xC2 -> BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
u'\u251c' # 0xC3 -> BOX DRAWINGS LIGHT VERTICAL AND RIGHT
u'\u2500' # 0xC4 -> BOX DRAWINGS LIGHT HORIZONTAL
u'\u253c' # 0xC5 -> BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
u'\ufffe' # 0xC6 -> UNDEFINED
u'\ufffe' # 0xC7 -> UNDEFINED
u'\u255a' # 0xC8 -> BOX DRAWINGS DOUBLE UP AND RIGHT
u'\u2554' # 0xC9 -> BOX DRAWINGS DOUBLE DOWN AND RIGHT
u'\u2569' # 0xCA -> BOX DRAWINGS DOUBLE UP AND HORIZONTAL
u'\u2566' # 0xCB -> BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL
u'\u2560' # 0xCC -> BOX DRAWINGS DOUBLE VERTICAL AND RIGHT
u'\u2550' # 0xCD -> BOX DRAWINGS DOUBLE HORIZONTAL
u'\u256c' # 0xCE -> BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL
u'\xa4' # 0xCF -> CURRENCY SIGN
u'\ufffe' # 0xD0 -> UNDEFINED
u'\ufffe' # 0xD1 -> UNDEFINED
u'\ufffe' # 0xD2 -> UNDEFINED
u'\ufffe' # 0xD3 -> UNDEFINEDS
u'\ufffe' # 0xD4 -> UNDEFINED
u'\ufffe' # 0xD5 -> UNDEFINED
u'\ufffe' # 0xD6 -> UNDEFINEDE
u'\ufffe' # 0xD7 -> UNDEFINED
u'\ufffe' # 0xD8 -> UNDEFINED
u'\u2518' # 0xD9 -> BOX DRAWINGS LIGHT UP AND LEFT
u'\u250c' # 0xDA -> BOX DRAWINGS LIGHT DOWN AND RIGHT
u'\u2588' # 0xDB -> FULL BLOCK
u'\u2584' # 0xDC -> LOWER HALF BLOCK
u'\xa6' # 0xDD -> BROKEN BAR
u'\ufffe' # 0xDE -> UNDEFINED
u'\u2580' # 0xDF -> UPPER HALF BLOCK
u'\ufffe' # 0xE0 -> UNDEFINED
u'\ufffe' # 0xE1 -> UNDEFINED
u'\ufffe' # 0xE2 -> UNDEFINED
u'\ufffe' # 0xE3 -> UNDEFINED
u'\ufffe' # 0xE4 -> UNDEFINED
u'\ufffe' # 0xE5 -> UNDEFINED
u'\xb5' # 0xE6 -> MICRO SIGN
u'\ufffe' # 0xE7 -> UNDEFINED
u'\ufffe' # 0xE8 -> UNDEFINED
u'\ufffe' # 0xE9 -> UNDEFINED
u'\ufffe' # 0xEA -> UNDEFINED
u'\ufffe' # 0xEB -> UNDEFINED
u'\ufffe' # 0xEC -> UNDEFINED
u'\ufffe' # 0xED -> UNDEFINED
u'\xaf' # 0xEE -> MACRON
u'\xb4' # 0xEF -> ACUTE ACCENT
u'\xad' # 0xF0 -> SOFT HYPHEN
u'\xb1' # 0xF1 -> PLUS-MINUS SIGN
u'\u2017' # 0xF2 -> DOUBLE LOW LINE
u'\xbe' # 0xF3 -> VULGAR FRACTION THREE QUARTERS
u'\xb6' # 0xF4 -> PILCROW SIGN
u'\xa7' # 0xF5 -> SECTION SIGN
u'\xf7' # 0xF6 -> DIVISION SIGN
u'\xb8' # 0xF7 -> CEDILLA
u'\xb0' # 0xF8 -> DEGREE SIGN
u'\xa8' # 0xF9 -> DIAERESIS
u'\xb7' # 0xFA -> MIDDLE DOT
u'\xb9' # 0xFB -> SUPERSCRIPT ONE
u'\xb3' # 0xFC -> SUPERSCRIPT THREE
u'\xb2' # 0xFD -> SUPERSCRIPT TWO
u'\u25a0' # 0xFE -> BLACK SQUARE
u'\xa0' # 0xFF -> NO-BREAK SPACE
)
### Encoding table
encoding_table=codecs.charmap_build(decoding_table)
| {
"pile_set_name": "Github"
} |
module ioddr_tester (
input wire CLK,
input wire CLKB,
output wire ERR,
output wire Q,
input wire D
);
parameter USE_PHY_ODDR = 1;
parameter USE_PHY_IDDR = 1;
parameter USE_IDELAY = 0;
parameter DDR_CLK_EDGE = "SAME_EDGE";
// Data generator
wire [1:0] g_dat;
data_generator gen (
.CLK (CLK),
.CE (1'b1),
.D1 (g_dat[0]),
.D2 (g_dat[1])
);
// Data delay
wire [1:0] d_dat;
reg [1:0] d_d1;
reg [1:0] d_d2;
always @(posedge CLK) begin
d_d1 <= {g_dat[0], d_d1[1]};
d_d2 <= {g_dat[1], d_d2[1]};
end
assign d_dat = {d_d2[0], d_d1[0]};
// ODDR
oddr_wrapper # (
.USE_PHY_ODDR (USE_PHY_ODDR),
.DDR_CLK_EDGE (DDR_CLK_EDGE)
) oddr_wrapper (
.C (CLK),
.OCE (1'b1),
.S (0),
.R (0),
.D1 (g_dat[0]),
.D2 (g_dat[1]),
.OQ (Q)
);
// IDDR
wire [1:0] r_dat;
iddr_wrapper # (
.USE_IDELAY (USE_IDELAY),
.USE_PHY_IDDR (USE_PHY_IDDR),
.DDR_CLK_EDGE (DDR_CLK_EDGE)
) iddr_wrapper (
.C (CLK),
.CB (CLKB),
.CE (1'b1),
.S (0),
.R (0),
.D (D),
.Q1 (r_dat[1]),
.Q2 (r_dat[0])
);
// Re-clock received data in OPPOSITE_EDGE MODE
wire [1:0] r_dat2;
generate if(DDR_CLK_EDGE == "OPPOSITE_EDGE") begin
reg tmp;
always @(posedge CLK)
tmp <= r_dat[0];
assign r_dat2 = {r_dat[1], tmp};
end else begin
assign r_dat2 = r_dat;
end endgenerate
// Data comparator
reg err_r;
always @(posedge CLK)
err_r <= r_dat2 != d_dat;
// Error pulse prolonger
reg [20:0] cnt;
wire err = !cnt[20];
always @(posedge CLK)
if (err_r) cnt <= 1 << 24;
else if (err) cnt <= cnt - 1;
else cnt <= cnt;
assign ERR = err;
endmodule
| {
"pile_set_name": "Github"
} |
{
"types": {
"EIP712Domain": [
{
"name": "name",
"type": "string"
},
{
"name": "version",
"type": "string"
},
{
"name": "chainId",
"type": "uint256"
},
{
"name": "verifyingContract",
"type": "address"
}
],
"Foo": [
{
"name": "addys",
"type": "address[]"
},
{
"name": "stringies",
"type": "string[]"
},
{
"name": "inties",
"type": "uint[]"
}
]
},
"primaryType": "Foo",
"domain": {
"name": "Lorem",
"version": "1",
"chainId": "1",
"verifyingContract": "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC"
},
"message": {
"addys": [
"0x0000000000000000000000000000000000000001",
"0x0000000000000000000000000000000000000002",
"0x0000000000000000000000000000000000000003"
],
"stringies": [
"lorem",
"ipsum",
"dolores"
],
"inties": [
"0x0000000000000000000000000000000000000001",
"3",
4.0
]
}
}
| {
"pile_set_name": "Github"
} |
// Copyright 2012 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 windows,race
package windows
import (
"runtime"
"unsafe"
)
const raceenabled = true
func raceAcquire(addr unsafe.Pointer) {
runtime.RaceAcquire(addr)
}
func raceReleaseMerge(addr unsafe.Pointer) {
runtime.RaceReleaseMerge(addr)
}
func raceReadRange(addr unsafe.Pointer, len int) {
runtime.RaceReadRange(addr, len)
}
func raceWriteRange(addr unsafe.Pointer, len int) {
runtime.RaceWriteRange(addr, len)
}
| {
"pile_set_name": "Github"
} |
/*****************************************************************
|
| Platinum - Managed DeviceData
|
| Copyright (c) 2004-2010, Plutinosoft, LLC.
| All rights reserved.
| http://www.plutinosoft.com
|
| 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.
|
| OEMs, ISVs, VARs and other distributors that combine and
| distribute commercially licensed software with Platinum software
| and do not wish to distribute the source code for the commercially
| licensed software under version 2, or (at your option) any later
| version, of the GNU General Public License (the "GPL") must enter
| into a commercial license agreement with Plutinosoft, LLC.
|
| 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; see the file LICENSE.txt. If not, write to
| the Free Software Foundation, Inc.,
| 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
| http://www.gnu.org/licenses/gpl-2.0.html
|
****************************************************************/
#pragma once
namespace Platinum
{
/*----------------------------------------------------------------------
| DeviceIcon
+---------------------------------------------------------------------*/
public ref class DeviceIcon : public ManagedWrapper<PLT_DeviceIcon>
{
public:
// properties
PLATINUM_MANAGED_IMPLEMENT_STRING_PROPERTY(String^, MimeType, m_MimeType, m_pHandle);
PLATINUM_MANAGED_IMPLEMENT_PROPERTY(Int32, Width, m_Width, m_pHandle);
PLATINUM_MANAGED_IMPLEMENT_PROPERTY(Int32, Height, m_Height, m_pHandle);
PLATINUM_MANAGED_IMPLEMENT_PROPERTY(Int32, Depth, m_Depth, m_pHandle);
PLATINUM_MANAGED_IMPLEMENT_STRING_PROPERTY(String^, UrlPath, m_UrlPath, m_pHandle);
internal:
DeviceIcon(PLT_DeviceIcon& native) :
ManagedWrapper<PLT_DeviceIcon>(native)
{}
public:
DeviceIcon() :
ManagedWrapper<PLT_DeviceIcon>()
{}
DeviceIcon(String^ mimeType, Int32 width, Int32 height, Int32 depth, String^ urlPath) :
ManagedWrapper<PLT_DeviceIcon>()
{
MimeType = mimeType;
Width = width;
Height = height;
Depth = depth;
UrlPath = urlPath;
}
};
}
// marshal wrapper
PLATINUM_MANAGED_MARSHAL_AS(Platinum::DeviceIcon, PLT_DeviceIcon);
namespace Platinum
{
ref class Service;
/*----------------------------------------------------------------------
| DeviceData
+---------------------------------------------------------------------*/
public ref class DeviceData
{
protected:
PLT_DeviceDataReference* m_pHandle;
public:
property String^ Description
{
String^ get()
{
NPT_String s;
Helpers::ThrowOnError((*m_pHandle)->GetDescription(s));
return gcnew String(s);
}
}
property Uri^ DescriptionUrl
{
Uri^ get()
{
return marshal_as<Uri^>((*m_pHandle)->GetDescriptionUrl());
}
}
property Uri^ UrlBase
{
Uri^ get()
{
return marshal_as<Uri^>((*m_pHandle)->GetURLBase());
}
}
property Uri^ IconUrl
{
Uri^ get()
{
return marshal_as<Uri^>((*m_pHandle)->GetIconUrl());
}
}
property TimeSpan^ LeaseTime
{
TimeSpan^ get()
{
return marshal_as<TimeSpan>((*m_pHandle)->GetLeaseTime());
}
}
property String^ UUID
{
String^ get()
{
return gcnew String((*m_pHandle)->GetUUID());
}
}
property String^ FriendlyName
{
String^ get()
{
return gcnew String((*m_pHandle)->GetFriendlyName());
}
}
property String^ TypeName
{
String^ get()
{
return gcnew String((*m_pHandle)->GetType());
}
}
property String^ ModelDescription
{
String^ get()
{
return gcnew String((*m_pHandle)->GetModelDescription());
}
}
property String^ ParentUUID
{
String^ get()
{
return gcnew String((*m_pHandle)->GetParentUUID());
}
}
property IEnumerable<Service^>^ Services
{
IEnumerable<Service^>^ get();
}
property IEnumerable<DeviceData^>^ EmbeddedDevices
{
IEnumerable<DeviceData^>^ get();
}
internal:
property PLT_DeviceDataReference& Handle
{
PLT_DeviceDataReference& get()
{
return *m_pHandle;
}
}
public:
DeviceData^ FindEmbeddedDeviceByType(String^ type);
Service^ FindServiceById(String^ serviceId);
Service^ FindServiceByType(String^ type);
Service^ FindServiceBySCPDURL(Uri^ url);
Service^ FindServiceByControlURL(Uri^ url);
Service^ FindServiceByEventSubURL(Uri^ url);
public:
virtual Boolean Equals(Object^ obj) override
{
if (obj == nullptr)
return false;
if (!this->GetType()->IsInstanceOfType(obj))
return false;
return (*m_pHandle == *((DeviceData^)obj)->m_pHandle);
}
internal:
DeviceData(PLT_DeviceDataReference& devData)
{
if (devData.IsNull())
throw gcnew ArgumentNullException("devData");
m_pHandle = new PLT_DeviceDataReference(devData);
}
DeviceData(PLT_DeviceData& devData)
{
m_pHandle = new PLT_DeviceDataReference(&devData);
}
public:
~DeviceData()
{
// clean-up managed
// clean-up unmanaged
this->!DeviceData();
}
!DeviceData()
{
// clean-up unmanaged
if (m_pHandle != 0)
{
delete m_pHandle;
m_pHandle = 0;
}
}
};
}
// marshal wrapper
PLATINUM_MANAGED_MARSHAL_AS(Platinum::DeviceData, PLT_DeviceData);
PLATINUM_MANAGED_MARSHAL_AS(Platinum::DeviceData, PLT_DeviceDataReference);
| {
"pile_set_name": "Github"
} |
#!/bin/bash
echo "### start build_docker_image.sh for joynr-backend-jee-2 ###"
EXTRA_OPTIONS="--no-cache"
set -e -x
if [ -d target ]; then
rm -Rf target
fi
mkdir target
function copy_war {
if [ ! -f $1 ]; then
echo "ERROR: Missing $1 build artifact. Can't proceed."
exit 1
fi
cp $1 $2
}
DISCOVERY_WAR_FILE=../../../../java/backend-services/discovery-directory-jee/target/discovery-directory-jee-shared-db*.war
ACCESS_CTRL_WAR_FILE=../../../../java/backend-services/domain-access-controller-jee/target/domain-access-controller-jee*.war
copy_war $DISCOVERY_WAR_FILE target/discovery-directory-jee-shared-db.war
copy_war $ACCESS_CTRL_WAR_FILE target/domain-access-controller-jee.war
if [ -z "$(docker version 2>/dev/null)" ]; then
echo "ERROR: The docker command seems to be unavailable."
exit 1
fi
docker build $EXTRA_OPTIONS -t joynr-backend-jee-2:latest .
#docker image prune
rm -rf target
echo "### end build_docker_image.sh for joynr-backend-jee-2 ###"
| {
"pile_set_name": "Github"
} |
# Release History
## 0.4.1 (2018-05-29)
**Bugfixes**
- Compatibility of the sdist with wheel 0.31.0
- msrestazure dependency version range
## 0.4.0 (2018-01-02)
**Features**
- Delete all resources associated with cluster with the optional
deleteAll paramater.
## 0.3.0 (2017-10-25)
**Features**
- ACS orchestrator properties property is now optional.
## 0.2.0 (2017-10-17)
**Features**
- Kubernetes orchestrator service principal property is now optional.
## 0.1.0 (2017-09-22)
**Features**
- Initial private preview release.
| {
"pile_set_name": "Github"
} |
/*
Note: The MPU6886 is an I2C sensor and uses the Arduino Wire library.
Because the sensor is not 5V tolerant, we are using a 3.3 V 8 MHz Pro Mini or
a 3.3 V Teensy 3.1. We have disabled the internal pull-ups used by the Wire
library in the Wire.h/twi.c utility file. We are also using the 400 kHz fast
I2C mode by setting the TWI_FREQ to 400000L /twi.h utility file.
*/
#ifndef _MPU6886_H_
#define _MPU6886_H_
#include <Wire.h>
#include <Arduino.h>
#include "MahonyAHRS.h"
#define MPU6886_ADDRESS 0x68
#define MPU6886_WHOAMI 0x75
#define MPU6886_ACCEL_INTEL_CTRL 0x69
#define MPU6886_SMPLRT_DIV 0x19
#define MPU6886_INT_PIN_CFG 0x37
#define MPU6886_INT_ENABLE 0x38
#define MPU6886_FIFO_WM_INT_STATUS 0x39
#define MPU6886_INT_STATUS 0x3A
#define MPU6886_ACCEL_WOM_X_THR 0x20
#define MPU6886_ACCEL_WOM_Y_THR 0x21
#define MPU6886_ACCEL_WOM_Z_THR 0x22
#define MPU6886_ACCEL_XOUT_H 0x3B
#define MPU6886_ACCEL_XOUT_L 0x3C
#define MPU6886_ACCEL_YOUT_H 0x3D
#define MPU6886_ACCEL_YOUT_L 0x3E
#define MPU6886_ACCEL_ZOUT_H 0x3F
#define MPU6886_ACCEL_ZOUT_L 0x40
#define MPU6886_TEMP_OUT_H 0x41
#define MPU6886_TEMP_OUT_L 0x42
#define MPU6886_GYRO_XOUT_H 0x43
#define MPU6886_GYRO_XOUT_L 0x44
#define MPU6886_GYRO_YOUT_H 0x45
#define MPU6886_GYRO_YOUT_L 0x46
#define MPU6886_GYRO_ZOUT_H 0x47
#define MPU6886_GYRO_ZOUT_L 0x48
#define MPU6886_USER_CTRL 0x6A
#define MPU6886_PWR_MGMT_1 0x6B
#define MPU6886_PWR_MGMT_2 0x6C
#define MPU6886_CONFIG 0x1A
#define MPU6886_GYRO_CONFIG 0x1B
#define MPU6886_ACCEL_CONFIG 0x1C
#define MPU6886_ACCEL_CONFIG2 0x1D
#define MPU6886_FIFO_EN 0x23
//#define G (9.8)
#define RtA 57.324841
#define AtR 0.0174533
#define Gyro_Gr 0.0010653
class MPU6886 {
public:
enum Ascale {
AFS_2G = 0,
AFS_4G,
AFS_8G,
AFS_16G
};
enum Gscale {
GFS_250DPS = 0,
GFS_500DPS,
GFS_1000DPS,
GFS_2000DPS
};
Gscale Gyscale = GFS_2000DPS;
Ascale Acscale = AFS_8G;
public:
MPU6886();
int Init(void);
void enableWakeOnMotion(Ascale ascale, uint8_t thresh_num_lsb);
void getAccelAdc(int16_t* ax, int16_t* ay, int16_t* az);
void getGyroAdc(int16_t* gx, int16_t* gy, int16_t* gz);
void getTempAdc(int16_t *t);
void getAccelData(float* ax, float* ay, float* az);
void getGyroData(float* gx, float* gy, float* gz);
void getTempData(float *t);
void SetGyroFsr(Gscale scale);
void SetAccelFsr(Ascale scale);
void getAhrsData(float *pitch,float *roll,float *yaw);
void SetINTPinActiveLogic(uint8_t level);
void DisableAllIRQ();
void ClearAllIRQ();
public:
float aRes, gRes;
private:
private:
void I2C_Read_NBytes(uint8_t driver_Addr, uint8_t start_Addr, uint8_t number_Bytes, uint8_t *read_Buffer);
void I2C_Write_NBytes(uint8_t driver_Addr, uint8_t start_Addr, uint8_t number_Bytes, uint8_t *write_Buffer);
void getGres();
void getAres();
};
#endif | {
"pile_set_name": "Github"
} |
describe "Output", ->
el = undefined
beforeEach ->
document.body.innerHTML = """
<section class="quo">
<header></header>
</section>"""
el = $$ "section"
it "can get the descendants of each element in the current instance", ->
children = el.find "header"
expect(children.length > 0).toBeTruthy()
it "can get the parent of each element in the current instance", ->
children = el.find "header"
expect(children.parent().html()).toEqual el.html()
it "can get the children of each element in the current instance", ->
children = el.children()
header = $$ "section > header"
expect(children.html()).toEqual header.html()
el.append "<footer></footer>"
children = el.children("header")
expect(children.html()).toEqual header.html()
it "can retrieve the DOM elements matched by the QuoJS object.", ->
dom = el.get(0)
expect(dom).toBeTruthy()
dom = el.get(1)
expect(dom).not.toBeTruthy()
it "can reduce the set of matched elements to the first in the set.", ->
el.append "<footer></footer>"
expect(el.children().length).toEqual 2
expect(el.children().first().length).toEqual 1
it "can reduce the set of matched elements to the final one in the set.", ->
el.append "<footer>quojs</footer>"
last = el.children().last()
expect(last.length).toEqual 1
expect(last.text()).toEqual "quojs"
it "can get the first element that matches the selector by testing the element itself and traversing up through its ancestors", ->
header = $$ "section header"
dom = header.closest "section"
expect(dom.html()).toEqual el.html()
it "can get the immediately following sibling of each element in the instance", ->
el.append "<footer></footer>"
header = $$ "section header"
footer = $$ "section footer"
expect(header.next().html()).toEqual footer.html()
it "can get the immediately preceding sibling of each element in the instance", ->
el.append "<footer></footer>"
header = $$ "section header"
footer = $$ "section footer"
expect(footer.prev().html()).toEqual header.html()
| {
"pile_set_name": "Github"
} |
one
two
three
four
| {
"pile_set_name": "Github"
} |
// Copyright Aleksey Gurtovoy 2000-2004
//
// 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)
//
// Preprocessed version of "boost/mpl/vector.hpp" header
// -- DO NOT modify by hand!
namespace boost { namespace mpl {
template<
typename T0 = na, typename T1 = na, typename T2 = na, typename T3 = na
, typename T4 = na, typename T5 = na, typename T6 = na, typename T7 = na
, typename T8 = na, typename T9 = na, typename T10 = na, typename T11 = na
, typename T12 = na, typename T13 = na, typename T14 = na
, typename T15 = na, typename T16 = na, typename T17 = na
, typename T18 = na, typename T19 = na
>
struct vector;
template<
>
struct vector<
na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
, na, na, na
>
: vector0< >
{
typedef vector0< >::type type;
};
template<
typename T0
>
struct vector<
T0, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
, na, na, na
>
: vector1<T0>
{
typedef typename vector1<T0>::type type;
};
template<
typename T0, typename T1
>
struct vector<
T0, T1, na, na, na, na, na, na, na, na, na, na, na, na, na, na, na
, na, na, na
>
: vector2< T0,T1 >
{
typedef typename vector2< T0,T1 >::type type;
};
template<
typename T0, typename T1, typename T2
>
struct vector<
T0, T1, T2, na, na, na, na, na, na, na, na, na, na, na, na, na, na
, na, na, na
>
: vector3< T0,T1,T2 >
{
typedef typename vector3< T0,T1,T2 >::type type;
};
template<
typename T0, typename T1, typename T2, typename T3
>
struct vector<
T0, T1, T2, T3, na, na, na, na, na, na, na, na, na, na, na, na, na
, na, na, na
>
: vector4< T0,T1,T2,T3 >
{
typedef typename vector4< T0,T1,T2,T3 >::type type;
};
template<
typename T0, typename T1, typename T2, typename T3, typename T4
>
struct vector<
T0, T1, T2, T3, T4, na, na, na, na, na, na, na, na, na, na, na, na
, na, na, na
>
: vector5< T0,T1,T2,T3,T4 >
{
typedef typename vector5< T0,T1,T2,T3,T4 >::type type;
};
template<
typename T0, typename T1, typename T2, typename T3, typename T4
, typename T5
>
struct vector<
T0, T1, T2, T3, T4, T5, na, na, na, na, na, na, na, na, na, na, na
, na, na, na
>
: vector6< T0,T1,T2,T3,T4,T5 >
{
typedef typename vector6< T0,T1,T2,T3,T4,T5 >::type type;
};
template<
typename T0, typename T1, typename T2, typename T3, typename T4
, typename T5, typename T6
>
struct vector<
T0, T1, T2, T3, T4, T5, T6, na, na, na, na, na, na, na, na, na, na
, na, na, na
>
: vector7< T0,T1,T2,T3,T4,T5,T6 >
{
typedef typename vector7< T0,T1,T2,T3,T4,T5,T6 >::type type;
};
template<
typename T0, typename T1, typename T2, typename T3, typename T4
, typename T5, typename T6, typename T7
>
struct vector<
T0, T1, T2, T3, T4, T5, T6, T7, na, na, na, na, na, na, na, na, na
, na, na, na
>
: vector8< T0,T1,T2,T3,T4,T5,T6,T7 >
{
typedef typename vector8< T0,T1,T2,T3,T4,T5,T6,T7 >::type type;
};
template<
typename T0, typename T1, typename T2, typename T3, typename T4
, typename T5, typename T6, typename T7, typename T8
>
struct vector<
T0, T1, T2, T3, T4, T5, T6, T7, T8, na, na, na, na, na, na, na, na
, na, na, na
>
: vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >
{
typedef typename vector9< T0,T1,T2,T3,T4,T5,T6,T7,T8 >::type type;
};
template<
typename T0, typename T1, typename T2, typename T3, typename T4
, typename T5, typename T6, typename T7, typename T8, typename T9
>
struct vector<
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, na, na, na, na, na, na, na
, na, na, na
>
: vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >
{
typedef typename vector10< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type;
};
template<
typename T0, typename T1, typename T2, typename T3, typename T4
, typename T5, typename T6, typename T7, typename T8, typename T9
, typename T10
>
struct vector<
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, na, na, na, na, na, na
, na, na, na
>
: vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >
{
typedef typename vector11< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10 >::type type;
};
template<
typename T0, typename T1, typename T2, typename T3, typename T4
, typename T5, typename T6, typename T7, typename T8, typename T9
, typename T10, typename T11
>
struct vector<
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, na, na, na, na
, na, na, na, na
>
: vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >
{
typedef typename vector12< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11 >::type type;
};
template<
typename T0, typename T1, typename T2, typename T3, typename T4
, typename T5, typename T6, typename T7, typename T8, typename T9
, typename T10, typename T11, typename T12
>
struct vector<
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, na, na, na
, na, na, na, na
>
: vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >
{
typedef typename vector13< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12 >::type type;
};
template<
typename T0, typename T1, typename T2, typename T3, typename T4
, typename T5, typename T6, typename T7, typename T8, typename T9
, typename T10, typename T11, typename T12, typename T13
>
struct vector<
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, na, na
, na, na, na, na
>
: vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >
{
typedef typename vector14< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13 >::type type;
};
template<
typename T0, typename T1, typename T2, typename T3, typename T4
, typename T5, typename T6, typename T7, typename T8, typename T9
, typename T10, typename T11, typename T12, typename T13, typename T14
>
struct vector<
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, na
, na, na, na, na
>
: vector15<
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
>
{
typedef typename vector15< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14 >::type type;
};
template<
typename T0, typename T1, typename T2, typename T3, typename T4
, typename T5, typename T6, typename T7, typename T8, typename T9
, typename T10, typename T11, typename T12, typename T13, typename T14
, typename T15
>
struct vector<
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
, T15, na, na, na, na
>
: vector16<
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
, T15
>
{
typedef typename vector16< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15 >::type type;
};
template<
typename T0, typename T1, typename T2, typename T3, typename T4
, typename T5, typename T6, typename T7, typename T8, typename T9
, typename T10, typename T11, typename T12, typename T13, typename T14
, typename T15, typename T16
>
struct vector<
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
, T15, T16, na, na, na
>
: vector17<
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
, T15, T16
>
{
typedef typename vector17< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16 >::type type;
};
template<
typename T0, typename T1, typename T2, typename T3, typename T4
, typename T5, typename T6, typename T7, typename T8, typename T9
, typename T10, typename T11, typename T12, typename T13, typename T14
, typename T15, typename T16, typename T17
>
struct vector<
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
, T15, T16, T17, na, na
>
: vector18<
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
, T15, T16, T17
>
{
typedef typename vector18< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17 >::type type;
};
template<
typename T0, typename T1, typename T2, typename T3, typename T4
, typename T5, typename T6, typename T7, typename T8, typename T9
, typename T10, typename T11, typename T12, typename T13, typename T14
, typename T15, typename T16, typename T17, typename T18
>
struct vector<
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
, T15, T16, T17, T18, na
>
: vector19<
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
, T15, T16, T17, T18
>
{
typedef typename vector19< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18 >::type type;
};
/// primary template (not a specialization!)
template<
typename T0, typename T1, typename T2, typename T3, typename T4
, typename T5, typename T6, typename T7, typename T8, typename T9
, typename T10, typename T11, typename T12, typename T13, typename T14
, typename T15, typename T16, typename T17, typename T18, typename T19
>
struct vector
: vector20<
T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
, T15, T16, T17, T18, T19
>
{
typedef typename vector20< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19 >::type type;
};
}}
| {
"pile_set_name": "Github"
} |
/*
* Copyright 2017 ObjectBox Ltd. 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.
*/
package io.objectbox.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* UIDs identify entities (and properties) uniquely in the meta object model file (objectbox-model/default.json).
* With UIDs you can map entities to their meta model representation in a stable way without its name.
* Once a UID is set, you can rename the entity as often as you like - ObjectBox keeps track of it automatically.
* Thus, it is advisable to lookup the UID in objectbox-model/default.json and use it here before renaming a entity.
*/
@Retention(RetentionPolicy.CLASS)
@Target({ElementType.FIELD, ElementType.TYPE})
public @interface Uid {
/**
* The UID associated with an entity/property.
* <p>
* Special values:
* <ul>
* <li>empty (or zero): and the ObjectBox Gradle plugin will set it automatically to the current value.</li>
* <li>-1: will assign a new ID and UID forcing the property/entity to be treated as new
* (for entities: all property IDs and UIDs will be renewed too)</li>
* </ul>
*/
long value() default 0;
}
| {
"pile_set_name": "Github"
} |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/reexports.R
\docType{import}
\name{reexports}
\alias{reexports}
\alias{mutate}
\alias{group_by}
\alias{get_summary_stats}
\title{Objects exported from other packages}
\keyword{internal}
\description{
These objects are imported from other packages. Follow the links
below to see their documentation.
\describe{
\item{dplyr}{\code{\link[dplyr]{group_by}}, \code{\link[dplyr]{mutate}}}
\item{rstatix}{\code{\link[rstatix]{get_summary_stats}}}
}}
| {
"pile_set_name": "Github"
} |
{******************************************************************************}
{* DCPcrypt v2.0 written by David Barton (crypto@cityinthesky.co.uk) **********}
{******************************************************************************}
{* A binary compatible implementation of MD5 **********************************}
{******************************************************************************}
{* Copyright (c) 1999-2002 David Barton *}
{* Permission is hereby granted, free of charge, to any person obtaining a *}
{* copy of this software and associated documentation files (the "Software"), *}
{* to deal in the Software without restriction, including without limitation *}
{* the rights to use, copy, modify, merge, publish, distribute, sublicense, *}
{* and/or sell copies of the Software, and to permit persons to whom the *}
{* Software is furnished to do so, subject to the following conditions: *}
{* *}
{* The above copyright notice and this permission notice shall be included in *}
{* all copies or substantial portions of the Software. *}
{* *}
{* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *}
{* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *}
{* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *}
{* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *}
{* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *}
{* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *}
{* DEALINGS IN THE SOFTWARE. *}
{******************************************************************************}
unit DCPmd5;
interface
uses
Classes, Sysutils, DCPcrypt2, DCPconst;
type
TDCP_md5= class(TDCP_hash)
protected
LenHi, LenLo: longword;
Index: DWord;
CurrentHash: array[0..3] of DWord;
HashBuffer: array[0..63] of byte;
procedure Compress;
public
class function GetId: integer; override;
class function GetAlgorithm: string; override;
class function GetHashSize: integer; override;
class function SelfTest: boolean; override;
procedure Init; override;
procedure Burn; override;
procedure Update(const Buffer; Size: longword); override;
procedure Final(var Digest); override;
end;
{******************************************************************************}
{******************************************************************************}
implementation
{$R-}{$Q-}
function LRot32(a, b: longword): longword;
begin
Result:= (a shl b) or (a shr (32-b));
end;
procedure TDCP_md5.Compress;
var
Data: array[0..15] of dword;
A, B, C, D: dword;
begin
Move(HashBuffer,Data,Sizeof(Data));
A:= CurrentHash[0];
B:= CurrentHash[1];
C:= CurrentHash[2];
D:= CurrentHash[3];
A:= B + LRot32(A + (D xor (B and (C xor D))) + Data[ 0] + $d76aa478,7);
D:= A + LRot32(D + (C xor (A and (B xor C))) + Data[ 1] + $e8c7b756,12);
C:= D + LRot32(C + (B xor (D and (A xor B))) + Data[ 2] + $242070db,17);
B:= C + LRot32(B + (A xor (C and (D xor A))) + Data[ 3] + $c1bdceee,22);
A:= B + LRot32(A + (D xor (B and (C xor D))) + Data[ 4] + $f57c0faf,7);
D:= A + LRot32(D + (C xor (A and (B xor C))) + Data[ 5] + $4787c62a,12);
C:= D + LRot32(C + (B xor (D and (A xor B))) + Data[ 6] + $a8304613,17);
B:= C + LRot32(B + (A xor (C and (D xor A))) + Data[ 7] + $fd469501,22);
A:= B + LRot32(A + (D xor (B and (C xor D))) + Data[ 8] + $698098d8,7);
D:= A + LRot32(D + (C xor (A and (B xor C))) + Data[ 9] + $8b44f7af,12);
C:= D + LRot32(C + (B xor (D and (A xor B))) + Data[10] + $ffff5bb1,17);
B:= C + LRot32(B + (A xor (C and (D xor A))) + Data[11] + $895cd7be,22);
A:= B + LRot32(A + (D xor (B and (C xor D))) + Data[12] + $6b901122,7);
D:= A + LRot32(D + (C xor (A and (B xor C))) + Data[13] + $fd987193,12);
C:= D + LRot32(C + (B xor (D and (A xor B))) + Data[14] + $a679438e,17);
B:= C + LRot32(B + (A xor (C and (D xor A))) + Data[15] + $49b40821,22);
A:= B + LRot32(A + (C xor (D and (B xor C))) + Data[ 1] + $f61e2562,5);
D:= A + LRot32(D + (B xor (C and (A xor B))) + Data[ 6] + $c040b340,9);
C:= D + LRot32(C + (A xor (B and (D xor A))) + Data[11] + $265e5a51,14);
B:= C + LRot32(B + (D xor (A and (C xor D))) + Data[ 0] + $e9b6c7aa,20);
A:= B + LRot32(A + (C xor (D and (B xor C))) + Data[ 5] + $d62f105d,5);
D:= A + LRot32(D + (B xor (C and (A xor B))) + Data[10] + $02441453,9);
C:= D + LRot32(C + (A xor (B and (D xor A))) + Data[15] + $d8a1e681,14);
B:= C + LRot32(B + (D xor (A and (C xor D))) + Data[ 4] + $e7d3fbc8,20);
A:= B + LRot32(A + (C xor (D and (B xor C))) + Data[ 9] + $21e1cde6,5);
D:= A + LRot32(D + (B xor (C and (A xor B))) + Data[14] + $c33707d6,9);
C:= D + LRot32(C + (A xor (B and (D xor A))) + Data[ 3] + $f4d50d87,14);
B:= C + LRot32(B + (D xor (A and (C xor D))) + Data[ 8] + $455a14ed,20);
A:= B + LRot32(A + (C xor (D and (B xor C))) + Data[13] + $a9e3e905,5);
D:= A + LRot32(D + (B xor (C and (A xor B))) + Data[ 2] + $fcefa3f8,9);
C:= D + LRot32(C + (A xor (B and (D xor A))) + Data[ 7] + $676f02d9,14);
B:= C + LRot32(B + (D xor (A and (C xor D))) + Data[12] + $8d2a4c8a,20);
A:= B + LRot32(A + (B xor C xor D) + Data[ 5] + $fffa3942,4);
D:= A + LRot32(D + (A xor B xor C) + Data[ 8] + $8771f681,11);
C:= D + LRot32(C + (D xor A xor B) + Data[11] + $6d9d6122,16);
B:= C + LRot32(B + (C xor D xor A) + Data[14] + $fde5380c,23);
A:= B + LRot32(A + (B xor C xor D) + Data[ 1] + $a4beea44,4);
D:= A + LRot32(D + (A xor B xor C) + Data[ 4] + $4bdecfa9,11);
C:= D + LRot32(C + (D xor A xor B) + Data[ 7] + $f6bb4b60,16);
B:= C + LRot32(B + (C xor D xor A) + Data[10] + $bebfbc70,23);
A:= B + LRot32(A + (B xor C xor D) + Data[13] + $289b7ec6,4);
D:= A + LRot32(D + (A xor B xor C) + Data[ 0] + $eaa127fa,11);
C:= D + LRot32(C + (D xor A xor B) + Data[ 3] + $d4ef3085,16);
B:= C + LRot32(B + (C xor D xor A) + Data[ 6] + $04881d05,23);
A:= B + LRot32(A + (B xor C xor D) + Data[ 9] + $d9d4d039,4);
D:= A + LRot32(D + (A xor B xor C) + Data[12] + $e6db99e5,11);
C:= D + LRot32(C + (D xor A xor B) + Data[15] + $1fa27cf8,16);
B:= C + LRot32(B + (C xor D xor A) + Data[ 2] + $c4ac5665,23);
A:= B + LRot32(A + (C xor (B or (not D))) + Data[ 0] + $f4292244,6);
D:= A + LRot32(D + (B xor (A or (not C))) + Data[ 7] + $432aff97,10);
C:= D + LRot32(C + (A xor (D or (not B))) + Data[14] + $ab9423a7,15);
B:= C + LRot32(B + (D xor (C or (not A))) + Data[ 5] + $fc93a039,21);
A:= B + LRot32(A + (C xor (B or (not D))) + Data[12] + $655b59c3,6);
D:= A + LRot32(D + (B xor (A or (not C))) + Data[ 3] + $8f0ccc92,10);
C:= D + LRot32(C + (A xor (D or (not B))) + Data[10] + $ffeff47d,15);
B:= C + LRot32(B + (D xor (C or (not A))) + Data[ 1] + $85845dd1,21);
A:= B + LRot32(A + (C xor (B or (not D))) + Data[ 8] + $6fa87e4f,6);
D:= A + LRot32(D + (B xor (A or (not C))) + Data[15] + $fe2ce6e0,10);
C:= D + LRot32(C + (A xor (D or (not B))) + Data[ 6] + $a3014314,15);
B:= C + LRot32(B + (D xor (C or (not A))) + Data[13] + $4e0811a1,21);
A:= B + LRot32(A + (C xor (B or (not D))) + Data[ 4] + $f7537e82,6);
D:= A + LRot32(D + (B xor (A or (not C))) + Data[11] + $bd3af235,10);
C:= D + LRot32(C + (A xor (D or (not B))) + Data[ 2] + $2ad7d2bb,15);
B:= C + LRot32(B + (D xor (C or (not A))) + Data[ 9] + $eb86d391,21);
Inc(CurrentHash[0],A);
Inc(CurrentHash[1],B);
Inc(CurrentHash[2],C);
Inc(CurrentHash[3],D);
Index:= 0;
FillChar(HashBuffer,Sizeof(HashBuffer),0);
end;
class function TDCP_md5.GetHashSize: integer;
begin
Result:= 128;
end;
class function TDCP_md5.GetId: integer;
begin
Result:= DCP_md5;
end;
class function TDCP_md5.GetAlgorithm: string;
begin
Result:= 'MD5';
end;
class function TDCP_md5.SelfTest: boolean;
const
Test1Out: array[0..15] of byte=
($90,$01,$50,$98,$3c,$d2,$4f,$b0,$d6,$96,$3f,$7d,$28,$e1,$7f,$72);
Test2Out: array[0..15] of byte=
($c3,$fc,$d3,$d7,$61,$92,$e4,$00,$7d,$fb,$49,$6c,$ca,$67,$e1,$3b);
var
TestHash: TDCP_md5;
TestOut: array[0..19] of byte;
begin
TestHash:= TDCP_md5.Create(nil);
TestHash.Init;
TestHash.UpdateStr('abc');
TestHash.Final(TestOut);
Result:= CompareMem(@TestOut,@Test1Out,Sizeof(Test1Out));
TestHash.Init;
TestHash.UpdateStr('abcdefghijklmnopqrstuvwxyz');
TestHash.Final(TestOut);
Result:= CompareMem(@TestOut,@Test2Out,Sizeof(Test2Out)) and Result;
TestHash.Free;
end;
procedure TDCP_md5.Init;
begin
Burn;
CurrentHash[0]:= $67452301;
CurrentHash[1]:= $efcdab89;
CurrentHash[2]:= $98badcfe;
CurrentHash[3]:= $10325476;
fInitialized:= true;
end;
procedure TDCP_md5.Burn;
begin
LenHi:= 0; LenLo:= 0;
Index:= 0;
FillChar(HashBuffer,Sizeof(HashBuffer),0);
FillChar(CurrentHash,Sizeof(CurrentHash),0);
fInitialized:= false;
end;
procedure TDCP_md5.Update(const Buffer; Size: longword);
var
PBuf: ^byte;
begin
if not fInitialized then
raise EDCP_hash.Create('Hash not initialized');
Inc(LenHi,Size shr 29);
Inc(LenLo,Size*8);
if LenLo< (Size*8) then
Inc(LenHi);
PBuf:= @Buffer;
while Size> 0 do
begin
if (Sizeof(HashBuffer)-Index)<= DWord(Size) then
begin
Move(PBuf^,HashBuffer[Index],Sizeof(HashBuffer)-Index);
Dec(Size,Sizeof(HashBuffer)-Index);
Inc(PBuf,Sizeof(HashBuffer)-Index);
Compress;
end
else
begin
Move(PBuf^,HashBuffer[Index],Size);
Inc(Index,Size);
Size:= 0;
end;
end;
end;
procedure TDCP_md5.Final(var Digest);
begin
if not fInitialized then
raise EDCP_hash.Create('Hash not initialized');
HashBuffer[Index]:= $80;
if Index>= 56 then
Compress;
PDWord(@HashBuffer[56])^:= LenLo;
PDWord(@HashBuffer[60])^:= LenHi;
Compress;
Move(CurrentHash,Digest,Sizeof(CurrentHash));
Burn;
end;
end.
| {
"pile_set_name": "Github"
} |
The following files extend or replace some of the the newlib functionality:
_startup.c: a customised startup sequence, written in C
_exit.c: a customised exit() implementation
_syscalls.c: local versions of the libnosys/librdimon code
_sbrk.c: a custom _sbrk() to match the actual linker scripts
assert.c: implementation for the asserion macros
_cxx.cpp: local versions of some C++ support, to avoid references to
large functions.
| {
"pile_set_name": "Github"
} |
(:
: eXist-db Open Source Native XML Database
: Copyright (C) 2001 The eXist-db Authors
:
: info@exist-db.org
: http://www.exist-db.org
:
: 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.
:
: You should have received a copy of the GNU Lesser General Public
: License along with this library; if not, write to the Free Software
: Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
:)
xquery version "3.1";
module namespace fn-rng="http://exist-db.org/xquery/test/fnRandomNumberGenerator";
declare namespace test="http://exist-db.org/xquery/xqsuite";
declare variable $fn-rng:long-seed := 123456789;
declare variable $fn-rng:text-seed := 'sample seed';
declare variable $fn-rng:date-seed := xs:date('1970-01-01');
declare variable $fn-rng:dateTime-seed := xs:dateTime('1970-01-01T00:00:00.000Z');
declare
%test:assertExists
function fn-rng:seed-number () {
fn:random-number-generator($fn-rng:long-seed)
};
declare
%test:assertExists
function fn-rng:seed-text () {
fn:random-number-generator($fn-rng:text-seed)
};
declare
%test:assertExists
function fn-rng:seed-date () {
fn:random-number-generator($fn-rng:date-seed)
};
declare
%test:assertExists
function fn-rng:seed-dateTime () {
fn:random-number-generator($fn-rng:dateTime-seed)
};
declare
%test:assertExists
function fn-rng:seed-current-dateTime () {
fn:random-number-generator(fn:current-dateTime())
};
declare
%test:assertTrue
function fn-rng:deterministic () {
fn:random-number-generator($fn-rng:long-seed)?number eq
fn:random-number-generator($fn-rng:long-seed)?number
};
declare
%test:assertTrue
function fn-rng:deterministic-next () {
fn:random-number-generator($fn-rng:long-seed)?next()?number eq
fn:random-number-generator($fn-rng:long-seed)?next()?number
};
declare
%private
function fn-rng:get-generator-reference () {
fn:random-number-generator($fn-rng:long-seed)
};
declare
%test:assertTrue
function fn-rng:deterministic-reference () {
let $fn := fn-rng:get-generator-reference()
return
$fn?number eq
$fn?number
};
declare
%test:assertTrue
function fn-rng:deterministic-reference-next () {
let $fn := fn-rng:get-generator-reference()
return
$fn?next()?number eq
$fn?next()?number
};
declare variable $fn-rng:generator-reference := fn-rng:get-generator-reference();
declare
%private
function fn-rng:number-from-generator-reference () {
$fn-rng:generator-reference?next()?number
};
declare
%test:assertTrue
function fn-rng:deterministic-side-effect () {
let $call := fn-rng:number-from-generator-reference()
return
fn-rng:number-from-generator-reference() eq
$fn-rng:generator-reference?next()?number
};
| {
"pile_set_name": "Github"
} |
# makefile for libpng on BeOS x86 ELF with gcc
# modified from makefile.linux by Sander Stoks
# Copyright (C) 2002, 2006, 2008, 2010-2011 Glenn Randers-Pehrson
# Copyright (C) 1999 Greg Roelofs
# Copyright (C) 1996, 1997 Andreas Dilger
#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
# Library name:
LIBNAME=libpng15
PNGMAJ = 15
# Shared library names:
LIBSO=$(LIBNAME).so
LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
LIBSOREL=$(LIBSOMAJ).$(RELEASE)
OLDSO=libpng.so
# Utilities:
CC=gcc
AR_RC=ar rc
MKDIR_P=mkdir -p
LN_SF=ln -sf
RANLIB=ranlib
RM_F=/bin/rm -f
# Where the zlib library and include files are located
ZLIBLIB=/usr/local/lib
ZLIBINC=/usr/local/include
ALIGN=
# For i386:
# ALIGN=-malign-loops=2 -malign-functions=2
WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
-Wmissing-declarations -Wtraditional -Wcast-align \
-Wstrict-prototypes -Wmissing-prototypes #-Wconversion
# On BeOS, -O1 is actually better than -O3. This is a known bug but it's
# still here in R4.5
CFLAGS=-I$(ZLIBINC) -W -Wall -O1 -funroll-loops \
$(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
# LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz
LDFLAGS=-L. -Wl,-soname=$(LIBSOMAJ) -L$(ZLIBLIB) -lz
# where make install puts libpng.a, libpng15.so*, and png.h
prefix=/usr/local
exec_prefix=$(prefix)
INCPATH=$(prefix)/include
LIBPATH=$(exec_prefix)/lib
MANPATH=$(prefix)/man
BINPATH=$(exec_prefix)/bin
# override DESTDIR= on the make install command line to easily support
# installing into a temporary location. Example:
#
# make install DESTDIR=/tmp/build/libpng
#
# If you're going to install into a temporary location
# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
# you execute make install.
DESTDIR=
DB=$(DESTDIR)$(BINPATH)
DI=$(DESTDIR)$(INCPATH)
DL=$(DESTDIR)$(LIBPATH)
DM=$(DESTDIR)$(MANPATH)
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
pngwtran.o pngmem.o pngerror.o pngpread.o
OBJSDLL = $(OBJS)
.SUFFIXES: .c .o
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
# try include scripts/pnglibconf.mak for more options
pnglibconf.h: scripts/pnglibconf.h.prebuilt
cp scripts/pnglibconf.h.prebuilt $@
libpng.a: $(OBJS)
$(AR_RC) $@ $(OBJS)
$(RANLIB) $@
libpng.pc:
cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
-e s!@exec_prefix@!$(exec_prefix)! \
-e s!@libdir@!$(LIBPATH)! \
-e s!@includedir@!$(INCPATH)! \
-e s!-lpng15!-lpng15\ -lz\ -lm! > libpng.pc
libpng-config:
( cat scripts/libpng-config-head.in; \
echo prefix=\"$(prefix)\"; \
echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
echo libs=\"-lpng15 -lz \"; \
cat scripts/libpng-config-body.in ) > libpng-config
chmod +x libpng-config
$(LIBSO): $(LIBSOMAJ)
$(LN_SF) $(LIBSOMAJ) $(LIBSO)
cp $(LIBSO)* /boot/home/config/lib
$(LIBSOMAJ): $(OBJSDLL)
$(CC) -nostart -Wl,-soname,$(LIBSOMAJ) -o \
$(LIBSOMAJ) $(OBJSDLL) $(LDFLAGS)
pngtest: pngtest.o $(LIBSO)
$(CC) -L$(ZLIBLIB) -L. -lz -lpng15 -o pngtest pngtest.o
test: pngtest
./pngtest
install-headers: png.h pngconf.h pnglibconf.h
-@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
-@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h
-@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
-@$(RM_F) $(DI)/libpng
(cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
install-static: install-headers libpng.a
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
cp libpng.a $(DL)/$(LIBNAME).a
chmod 644 $(DL)/$(LIBNAME).a
-@$(RM_F) $(DL)/libpng.a
(cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
install-shared: install-headers $(LIBSOMAJ) libpng.pc
-@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
-@$(RM_F) $(DL)/$(LIBSO)
-@$(RM_F) $(DL)/$(LIBSOREL)
-@$(RM_F) $(DL)/$(OLDSO)
cp $(LIBSOMAJ) $(DL)/$(LIBSOREL)
chmod 755 $(DL)/$(LIBSOREL)
(cd $(DL); \
$(LN_SF) $(LIBSOREL) $(LIBSO); \
$(LN_SF) $(LIBSO) $(OLDSO))
-@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
-@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
-@$(RM_F) $(DL)/pkgconfig/libpng.pc
cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
(cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
install-man: libpng.3 libpngpf.3 png.5
-@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
-@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
-@$(RM_F) $(DM)/man3/libpng.3
-@$(RM_F) $(DM)/man3/libpngpf.3
cp libpng.3 $(DM)/man3
cp libpngpf.3 $(DM)/man3
-@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
-@$(RM_F) $(DM)/man5/png.5
cp png.5 $(DM)/man5
install-config: libpng-config
-@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
-@$(RM_F) $(DB)/libpng-config
-@$(RM_F) $(DB)/$(LIBNAME)-config
cp libpng-config $(DB)/$(LIBNAME)-config
chmod 755 $(DB)/$(LIBNAME)-config
(cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
install: install-static install-shared install-man install-config
# If you installed in $(DESTDIR), test-installed won't work until you
# move the library to its final location. Use test-dd to test it
# before then.
test-dd:
echo
echo Testing installed dynamic shared library in $(DL).
$(CC) -I$(DI) $(CFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-L$(DL) -L$(ZLIBLIB) -Wl,-rpath $(ZLIBLIB):$(DL) \
-o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
./pngtestd pngtest.png
test-installed:
$(CC) $(CFLAGS) \
`$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
-o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
./pngtesti pngtest.png
clean:
$(RM_F) *.o libpng.a pngtest pngout.png libpng-config \
$(LIBSO) $(LIBSOMAJ)* pngtesti \
pnglibconf.h libpng.pc
# DO NOT DELETE THIS LINE -- make depend depends on it.
png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngtest.o: png.h pngconf.h pnglibconf.h
| {
"pile_set_name": "Github"
} |
package toml
// tomlType represents any Go type that corresponds to a TOML type.
// While the first draft of the TOML spec has a simplistic type system that
// probably doesn't need this level of sophistication, we seem to be militating
// toward adding real composite types.
type tomlType interface {
typeString() string
}
// typeEqual accepts any two types and returns true if they are equal.
func typeEqual(t1, t2 tomlType) bool {
if t1 == nil || t2 == nil {
return false
}
return t1.typeString() == t2.typeString()
}
func typeIsHash(t tomlType) bool {
return typeEqual(t, tomlHash) || typeEqual(t, tomlArrayHash)
}
type tomlBaseType string
func (btype tomlBaseType) typeString() string {
return string(btype)
}
func (btype tomlBaseType) String() string {
return btype.typeString()
}
var (
tomlInteger tomlBaseType = "Integer"
tomlFloat tomlBaseType = "Float"
tomlDatetime tomlBaseType = "Datetime"
tomlString tomlBaseType = "String"
tomlBool tomlBaseType = "Bool"
tomlArray tomlBaseType = "Array"
tomlHash tomlBaseType = "Hash"
tomlArrayHash tomlBaseType = "ArrayHash"
)
// typeOfPrimitive returns a tomlType of any primitive value in TOML.
// Primitive values are: Integer, Float, Datetime, String and Bool.
//
// Passing a lexer item other than the following will cause a BUG message
// to occur: itemString, itemBool, itemInteger, itemFloat, itemDatetime.
func (p *parser) typeOfPrimitive(lexItem item) tomlType {
switch lexItem.typ {
case itemInteger:
return tomlInteger
case itemFloat:
return tomlFloat
case itemDatetime:
return tomlDatetime
case itemString:
return tomlString
case itemMultilineString:
return tomlString
case itemRawString:
return tomlString
case itemRawMultilineString:
return tomlString
case itemBool:
return tomlBool
}
p.bug("Cannot infer primitive type of lex item '%s'.", lexItem)
panic("unreachable")
}
// typeOfArray returns a tomlType for an array given a list of types of its
// values.
//
// In the current spec, if an array is homogeneous, then its type is always
// "Array". If the array is not homogeneous, an error is generated.
func (p *parser) typeOfArray(types []tomlType) tomlType {
// Empty arrays are cool.
if len(types) == 0 {
return tomlArray
}
theType := types[0]
for _, t := range types[1:] {
if !typeEqual(theType, t) {
p.panicf("Array contains values of type '%s' and '%s', but "+
"arrays must be homogeneous.", theType, t)
}
}
return tomlArray
}
| {
"pile_set_name": "Github"
} |
from __future__ import division, absolute_import, print_function
import math
import textwrap
import sys
import pytest
import numpy as np
from numpy.testing import assert_, assert_equal
from . import util
class TestF77Callback(util.F2PyTest):
code = """
subroutine t(fun,a)
integer a
cf2py intent(out) a
external fun
call fun(a)
end
subroutine func(a)
cf2py intent(in,out) a
integer a
a = a + 11
end
subroutine func0(a)
cf2py intent(out) a
integer a
a = 11
end
subroutine t2(a)
cf2py intent(callback) fun
integer a
cf2py intent(out) a
external fun
call fun(a)
end
subroutine string_callback(callback, a)
external callback
double precision callback
double precision a
character*1 r
cf2py intent(out) a
r = 'r'
a = callback(r)
end
subroutine string_callback_array(callback, cu, lencu, a)
external callback
integer callback
integer lencu
character*8 cu(lencu)
integer a
cf2py intent(out) a
a = callback(cu, lencu)
end
"""
@pytest.mark.slow
@pytest.mark.parametrize('name', 't,t2'.split(','))
def test_all(self, name):
self.check_function(name)
@pytest.mark.slow
def test_docstring(self):
expected = """
a = t(fun,[fun_extra_args])
Wrapper for ``t``.
Parameters
----------
fun : call-back function
Other Parameters
----------------
fun_extra_args : input tuple, optional
Default: ()
Returns
-------
a : int
Notes
-----
Call-back functions::
def fun(): return a
Return objects:
a : int
"""
assert_equal(self.module.t.__doc__, textwrap.dedent(expected).lstrip())
def check_function(self, name):
t = getattr(self.module, name)
r = t(lambda: 4)
assert_(r == 4, repr(r))
r = t(lambda a: 5, fun_extra_args=(6,))
assert_(r == 5, repr(r))
r = t(lambda a: a, fun_extra_args=(6,))
assert_(r == 6, repr(r))
r = t(lambda a: 5 + a, fun_extra_args=(7,))
assert_(r == 12, repr(r))
r = t(lambda a: math.degrees(a), fun_extra_args=(math.pi,))
assert_(r == 180, repr(r))
r = t(math.degrees, fun_extra_args=(math.pi,))
assert_(r == 180, repr(r))
r = t(self.module.func, fun_extra_args=(6,))
assert_(r == 17, repr(r))
r = t(self.module.func0)
assert_(r == 11, repr(r))
r = t(self.module.func0._cpointer)
assert_(r == 11, repr(r))
class A(object):
def __call__(self):
return 7
def mth(self):
return 9
a = A()
r = t(a)
assert_(r == 7, repr(r))
r = t(a.mth)
assert_(r == 9, repr(r))
@pytest.mark.skipif(sys.platform=='win32',
reason='Fails with MinGW64 Gfortran (Issue #9673)')
def test_string_callback(self):
def callback(code):
if code == 'r':
return 0
else:
return 1
f = getattr(self.module, 'string_callback')
r = f(callback)
assert_(r == 0, repr(r))
@pytest.mark.skipif(sys.platform=='win32',
reason='Fails with MinGW64 Gfortran (Issue #9673)')
def test_string_callback_array(self):
# See gh-10027
cu = np.zeros((1, 8), 'S1')
def callback(cu, lencu):
if cu.shape != (lencu, 8):
return 1
if cu.dtype != 'S1':
return 2
if not np.all(cu == b''):
return 3
return 0
f = getattr(self.module, 'string_callback_array')
res = f(callback, cu, len(cu))
assert_(res == 0, repr(res))
| {
"pile_set_name": "Github"
} |
/* crypto/hmac/hmac.h */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
* This package is an SSL implementation written
* by Eric Young (eay@cryptsoft.com).
* The implementation was written so as to conform with Netscapes SSL.
*
* This library is free for commercial and non-commercial use as long as
* the following conditions are aheared to. The following conditions
* apply to all code found in this distribution, be it the RC4, RSA,
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
* included with this distribution is covered by the same copyright terms
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
*
* Copyright remains Eric Young's, and as such any Copyright notices in
* the code are not to be removed.
* If this package is used in a product, Eric Young should be given attribution
* as the author of the parts of the library used.
* This can be in the form of a textual message at program startup or
* in documentation (online or textual) provided with the package.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* "This product includes cryptographic software written by
* Eric Young (eay@cryptsoft.com)"
* The word 'cryptographic' can be left out if the rouines from the library
* being used are not cryptographic related :-).
* 4. If you include any Windows specific code (or a derivative thereof) from
* the apps directory (application code) you must include an acknowledgement:
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
*
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* The licence and distribution terms for any publically available version or
* derivative of this code cannot be changed. i.e. this code cannot simply be
* copied and put under another distribution licence
* [including the GNU Public Licence.]
*/
#ifndef HEADER_HMAC_H
#define HEADER_HMAC_H
#include <openssl/opensslconf.h>
#ifdef OPENSSL_NO_HMAC
#error HMAC is disabled.
#endif
#include <openssl/evp.h>
#define HMAC_MAX_MD_CBLOCK 128 /* largest known is SHA512 */
#ifdef __cplusplus
extern "C" {
#endif
typedef struct hmac_ctx_st
{
const EVP_MD *md;
EVP_MD_CTX md_ctx;
EVP_MD_CTX i_ctx;
EVP_MD_CTX o_ctx;
unsigned int key_length;
unsigned char key[HMAC_MAX_MD_CBLOCK];
} HMAC_CTX;
#define HMAC_size(e) (EVP_MD_size((e)->md))
void HMAC_CTX_init(HMAC_CTX *ctx);
void HMAC_CTX_cleanup(HMAC_CTX *ctx);
#define HMAC_cleanup(ctx) HMAC_CTX_cleanup(ctx) /* deprecated */
int HMAC_Init(HMAC_CTX *ctx, const void *key, int len,
const EVP_MD *md); /* deprecated */
int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
const EVP_MD *md, ENGINE *impl);
int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len);
int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len);
unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len,
const unsigned char *d, size_t n, unsigned char *md,
unsigned int *md_len);
int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx);
void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags);
#ifdef __cplusplus
}
#endif
#endif
| {
"pile_set_name": "Github"
} |
// go run mksyscall.go -tags linux,riscv64 syscall_linux.go syscall_linux_riscv64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
// +build linux,riscv64
package unix
import (
"syscall"
"unsafe"
)
var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func FanotifyInit(flags uint, event_f_flags uint) (fd int, err error) {
r0, _, e1 := Syscall(SYS_FANOTIFY_INIT, uintptr(flags), uintptr(event_f_flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fchmodat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ioctl(fd int, req uint, arg uintptr) (err error) {
_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(oldpath)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(newpath)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 unsafe.Pointer
if len(buf) > 0 {
_p1 = unsafe.Pointer(&buf[0])
} else {
_p1 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(oldpath)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(newpath)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unlinkat(dirfd int, path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getcwd(buf []byte) (n int, err error) {
var _p0 unsafe.Pointer
if len(buf) > 0 {
_p0 = unsafe.Pointer(&buf[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
wpid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) {
var _p0 unsafe.Pointer
if len(buf) > 0 {
_p0 = unsafe.Pointer(&buf[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0)
ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func keyctlJoin(cmd int, arg2 string) (ret int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(arg2)
if err != nil {
return
}
r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0)
ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(arg3)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(arg4)
if err != nil {
return
}
r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0)
ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) {
var _p0 unsafe.Pointer
if len(payload) > 0 {
_p0 = unsafe.Pointer(&payload[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) {
var _p0 unsafe.Pointer
if len(buf) > 0 {
_p0 = unsafe.Pointer(&buf[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0)
ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(keyType)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(restriction)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func keyctlRestrictKeyring(cmd int, arg2 int) (err error) {
_, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(arg)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(source)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(target)
if err != nil {
return
}
var _p2 *byte
_p2, err = BytePtrFromString(fstype)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Acct(path string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(keyType)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(description)
if err != nil {
return
}
var _p2 unsafe.Pointer
if len(payload) > 0 {
_p2 = unsafe.Pointer(&payload[0])
} else {
_p2 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0)
id = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Adjtimex(buf *Timex) (state int, err error) {
r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
state = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Capget(hdr *CapUserHeader, data *CapUserData) (err error) {
_, _, e1 := Syscall(SYS_CAPGET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Capset(hdr *CapUserHeader, data *CapUserData) (err error) {
_, _, e1 := Syscall(SYS_CAPSET, uintptr(unsafe.Pointer(hdr)), uintptr(unsafe.Pointer(data)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chdir(path string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chroot(path string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ClockGetres(clockid int32, res *Timespec) (err error) {
_, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ClockGettime(clockid int32, time *Timespec) (err error) {
_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) {
_, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Close(fd int) (err error) {
_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func DeleteModule(name string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(name)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup(oldfd int) (fd int, err error) {
r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup3(oldfd int, newfd int, flags int) (err error) {
_, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func EpollCreate1(flag int) (fd int, err error) {
r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
_, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Eventfd(initval uint, flags int) (fd int, err error) {
r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Exit(code int) {
SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchdir(fd int) (err error) {
_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmod(fd int, mode uint32) (err error) {
_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fcntl(fd int, cmd int, arg int) (val int, err error) {
r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
val = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fdatasync(fd int) (err error) {
_, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(attr)
if err != nil {
return
}
var _p1 unsafe.Pointer
if len(dest) > 0 {
_p1 = unsafe.Pointer(&dest[0])
} else {
_p1 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0)
sz = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func FinitModule(fd int, params string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(params)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Flistxattr(fd int, dest []byte) (sz int, err error) {
var _p0 unsafe.Pointer
if len(dest) > 0 {
_p0 = unsafe.Pointer(&dest[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest)))
sz = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Flock(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fremovexattr(fd int, attr string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(attr)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(attr)
if err != nil {
return
}
var _p1 unsafe.Pointer
if len(dest) > 0 {
_p1 = unsafe.Pointer(&dest[0])
} else {
_p1 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fsync(fd int) (err error) {
_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getdents(fd int, buf []byte) (n int, err error) {
var _p0 unsafe.Pointer
if len(buf) > 0 {
_p0 = unsafe.Pointer(&buf[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpgid(pid int) (pgid int, err error) {
r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
pgid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpid() (pid int) {
r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0)
pid = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getppid() (ppid int) {
r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0)
ppid = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpriority(which int, who int) (prio int, err error) {
r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
prio = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrandom(buf []byte, flags int) (n int, err error) {
var _p0 unsafe.Pointer
if len(buf) > 0 {
_p0 = unsafe.Pointer(&buf[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrusage(who int, rusage *Rusage) (err error) {
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getsid(pid int) (sid int, err error) {
r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
sid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Gettid() (tid int) {
r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0)
tid = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(attr)
if err != nil {
return
}
var _p2 unsafe.Pointer
if len(dest) > 0 {
_p2 = unsafe.Pointer(&dest[0])
} else {
_p2 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
sz = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func InitModule(moduleImage []byte, params string) (err error) {
var _p0 unsafe.Pointer
if len(moduleImage) > 0 {
_p0 = unsafe.Pointer(&moduleImage[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
var _p1 *byte
_p1, err = BytePtrFromString(params)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(pathname)
if err != nil {
return
}
r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
watchdesc = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func InotifyInit1(flags int) (fd int, err error) {
r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
success = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Kill(pid int, sig syscall.Signal) (err error) {
_, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Klogctl(typ int, buf []byte) (n int, err error) {
var _p0 unsafe.Pointer
if len(buf) > 0 {
_p0 = unsafe.Pointer(&buf[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(attr)
if err != nil {
return
}
var _p2 unsafe.Pointer
if len(dest) > 0 {
_p2 = unsafe.Pointer(&dest[0])
} else {
_p2 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
sz = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Listxattr(path string, dest []byte) (sz int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 unsafe.Pointer
if len(dest) > 0 {
_p1 = unsafe.Pointer(&dest[0])
} else {
_p1 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
sz = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Llistxattr(path string, dest []byte) (sz int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 unsafe.Pointer
if len(dest) > 0 {
_p1 = unsafe.Pointer(&dest[0])
} else {
_p1 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
sz = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lremovexattr(path string, attr string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(attr)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lsetxattr(path string, attr string, data []byte, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(attr)
if err != nil {
return
}
var _p2 unsafe.Pointer
if len(data) > 0 {
_p2 = unsafe.Pointer(&data[0])
} else {
_p2 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func MemfdCreate(name string, flags int) (fd int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(name)
if err != nil {
return
}
r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func PivotRoot(newroot string, putold string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(newroot)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(putold)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) {
_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
_, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func read(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Removexattr(path string, attr string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(attr)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(oldpath)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(newpath)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(keyType)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(description)
if err != nil {
return
}
var _p2 *byte
_p2, err = BytePtrFromString(callback)
if err != nil {
return
}
r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0)
id = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setdomainname(p []byte) (err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sethostname(p []byte) (err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setpgid(pid int, pgid int) (err error) {
_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setsid() (pid int, err error) {
r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
pid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Settimeofday(tv *Timeval) (err error) {
_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setns(fd int, nstype int) (err error) {
_, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setpriority(which int, who int, prio int) (err error) {
_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setxattr(path string, attr string, data []byte, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(attr)
if err != nil {
return
}
var _p2 unsafe.Pointer
if len(data) > 0 {
_p2 = unsafe.Pointer(&data[0])
} else {
_p2 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func signalfd(fd int, sigmask *Sigset_t, maskSize uintptr, flags int) (newfd int, err error) {
r0, _, e1 := Syscall6(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(sigmask)), uintptr(maskSize), uintptr(flags), 0, 0)
newfd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sync() {
SyscallNoError(SYS_SYNC, 0, 0, 0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Syncfs(fd int) (err error) {
_, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sysinfo(info *Sysinfo_t) (err error) {
_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
n = int64(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
_, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Times(tms *Tms) (ticks uintptr, err error) {
r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
ticks = uintptr(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Umask(mask int) (oldmask int) {
r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0)
oldmask = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Uname(buf *Utsname) (err error) {
_, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unmount(target string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(target)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unshare(flags int) (err error) {
_, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func write(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func exitThread(code int) (err error) {
_, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func readlen(fd int, p *byte, np int) (n int, err error) {
r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func writelen(fd int, p *byte, np int) (n int, err error) {
r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func munmap(addr uintptr, length uintptr) (err error) {
_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Madvise(b []byte, advice int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mprotect(b []byte, prot int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlockall(flags int) (err error) {
_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Msync(b []byte, flags int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) {
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func faccessat(dirfd int, path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(pathname)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) {
r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
var _p0 unsafe.Pointer
if len(events) > 0 {
_p0 = unsafe.Pointer(&events[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_EPOLL_PWAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
_, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchown(fd int, uid int, gid int) (err error) {
_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstat(fd int, stat *Stat_t) (err error) {
_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstatfs(fd int, buf *Statfs_t) (err error) {
_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Ftruncate(fd int, length int64) (err error) {
_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getegid() (egid int) {
r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
egid = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Geteuid() (euid int) {
r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
euid = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getgid() (gid int) {
r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
gid = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrlimit(resource int, rlim *Rlimit) (err error) {
_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getuid() (uid int) {
r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
uid = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Listen(s int, n int) (err error) {
_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Seek(fd int, offset int64, whence int) (off int64, err error) {
r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
off = int64(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
written = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setfsgid(gid int) (err error) {
_, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setfsuid(uid int) (err error) {
_, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setregid(rgid int, egid int) (err error) {
_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setresgid(rgid int, egid int, sgid int) (err error) {
_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setresuid(ruid int, euid int, suid int) (err error) {
_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setrlimit(resource int, rlim *Rlimit) (err error) {
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setreuid(ruid int, euid int) (err error) {
_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
n = int64(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Statfs(path string, buf *Statfs_t) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Truncate(path string, length int64) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getgroups(n int, list *_Gid_t) (nn int, err error) {
r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
nn = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setgroups(n int, list *_Gid_t) (err error) {
_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func socket(domain int, typ int, proto int) (fd int, err error) {
r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
var _p0 unsafe.Pointer
if len(buf) > 0 {
_p0 = unsafe.Pointer(&buf[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
xaddr = uintptr(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Gettimeofday(tv *Timeval) (err error) {
_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe2(p *[2]_C_int, flags int) (err error) {
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(cmdline)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
| {
"pile_set_name": "Github"
} |
/*
* Warewolf - Once bitten, there's no going back
* Copyright 2019 by Warewolf Ltd <alpha@warewolf.io>
* Licensed under GNU Affero General Public License 3.0 or later.
* Some rights reserved.
* Visit our website for more information <http://warewolf.io/>
* AUTHORS <http://warewolf.io/authors.php> , CONTRIBUTORS <http://warewolf.io/contributors.php>
* @license GNU Affero General Public License <http://www.gnu.org/licenses/agpl-3.0.html>
*/
using System;
using Dev2.Common.Interfaces.Infrastructure.Providers.Errors;
using Warewolf.Resource.Errors;
namespace Dev2.Providers.Validation.Rules
{
public class IsPositiveNumberRule : Rule<string>
{
public IsPositiveNumberRule(Func<string> getValue)
: base(getValue)
{
ErrorText = ErrorResource.MustBeRealNumber;
}
public override IActionableErrorInfo Check()
{
var isValid = false;
var value = GetValue();
if (int.TryParse(value, out int x) && x >= 0)
{
isValid = true;
}
return isValid ? null : CreatError();
}
}
}
| {
"pile_set_name": "Github"
} |
<!doctype html>
<html class="no-js">
<head>
<!-- Meta, title, CSS, favicons, etc. -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Veneto Admin · 404 </title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<!--<link rel="shortcut icon" href="/favicon.ico">-->
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<link rel="stylesheet" href="dist/css/bootstrap.min.css">
<link rel="stylesheet" href="dist/css/veneto-admin.min.css">
<link rel="stylesheet" href="demo/css/demo.css">
<link rel="stylesheet" href="dist/assets/font-awesome/css/font-awesome.css">
<!--[if lt IE 9]>
<script src="dist/assets/libs/html5shiv/html5shiv.min.js"></script>
<script src="dist/assets/libs/respond/respond.min.js"></script>
<![endif]-->
</head>
<body class="body-error body-error-404">
<div class="container">
<div class="error-container">
<h1>404</h1>
<h3 class="margin-lg-vertical">Sorry, the page you were looking for doesn’t exist.</h3>
<form action="#" class="form-inline">
<div class="input-group">
<input type="text" placeholder="Search for page" class="form-control">
<span class="input-group-btn">
<button type="submit" class="btn btn-success">Search</button>
</span>
</div>
</form>
</div>
</div>
</body>
</html>
| {
"pile_set_name": "Github"
} |
/*
---
name: Locale.es-AR.Date
description: Date messages for Spanish (Argentina).
license: MIT-style license
authors:
- Ãlfons Sanchez
- Diego Massanti
requires:
- /Locale
- /Locale.es-ES.Date
provides: [Locale.es-AR.Date]
...
*/
Locale.define('es-AR', 'Date', {
months: ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'],
months_abbr: ['ene', 'feb', 'mar', 'abr', 'may', 'jun', 'jul', 'ago', 'sep', 'oct', 'nov', 'dic'],
days: ['Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado'],
days_abbr: ['dom', 'lun', 'mar', 'mié', 'juv', 'vie', 'sáb'],
// Culture's date order: DD/MM/YYYY
dateOrder: ['date', 'month', 'year'],
shortDate: '%d/%m/%Y',
shortTime: '%H:%M',
AM: 'AM',
PM: 'PM',
firstDayOfWeek: 1,
// Date.Extras
ordinal: '',
lessThanMinuteAgo: 'hace menos de un minuto',
minuteAgo: 'hace un minuto',
minutesAgo: 'hace {delta} minutos',
hourAgo: 'hace una hora',
hoursAgo: 'hace unas {delta} horas',
dayAgo: 'hace un día',
daysAgo: 'hace {delta} días',
weekAgo: 'hace una semana',
weeksAgo: 'hace unas {delta} semanas',
monthAgo: 'hace un mes',
monthsAgo: 'hace {delta} meses',
yearAgo: 'hace un año',
yearsAgo: 'hace {delta} años',
lessThanMinuteUntil: 'menos de un minuto desde ahora',
minuteUntil: 'un minuto desde ahora',
minutesUntil: '{delta} minutos desde ahora',
hourUntil: 'una hora desde ahora',
hoursUntil: 'unas {delta} horas desde ahora',
dayUntil: 'un día desde ahora',
daysUntil: '{delta} días desde ahora',
weekUntil: 'una semana desde ahora',
weeksUntil: 'unas {delta} semanas desde ahora',
monthUntil: 'un mes desde ahora',
monthsUntil: '{delta} meses desde ahora',
yearUntil: 'un año desde ahora',
yearsUntil: '{delta} años desde ahora'
});
/*
---
name: Locale.es-AR.Form.Validator
description: Form Validator messages for Spanish (Argentina).
license: MIT-style license
authors:
- Diego Massanti
requires:
- /Locale
provides: [Locale.es-AR.Form.Validator]
...
*/
Locale.define('es-AR', 'FormValidator', {
required: 'Este campo es obligatorio.',
minLength: 'Por favor ingrese al menos {minLength} caracteres (ha ingresado {length} caracteres).',
maxLength: 'Por favor no ingrese más de {maxLength} caracteres (ha ingresado {length} caracteres).',
integer: 'Por favor ingrese un número entero en este campo. Números con decimales (p.e. 1,25) no se permiten.',
numeric: 'Por favor ingrese solo valores numéricos en este campo (p.e. "1" o "1,1" o "-1" o "-1,1").',
digits: 'Por favor use sólo números y puntuación en este campo (por ejemplo, un número de teléfono con guiones y/o puntos no está permitido).',
alpha: 'Por favor use sólo letras (a-z) en este campo. No se permiten espacios ni otros caracteres.',
alphanum: 'Por favor, usa sólo letras (a-z) o números (0-9) en este campo. No se permiten espacios u otros caracteres.',
dateSuchAs: 'Por favor ingrese una fecha válida como {date}',
dateInFormatMDY: 'Por favor ingrese una fecha válida, utulizando el formato DD/MM/YYYY (p.e. "31/12/1999")',
email: 'Por favor, ingrese una dirección de e-mail válida. Por ejemplo, "fred@dominio.com".',
url: 'Por favor ingrese una URL válida como http://www.example.com.',
currencyDollar: 'Por favor ingrese una cantidad válida de pesos. Por ejemplo $100,00 .',
oneRequired: 'Por favor ingrese algo para por lo menos una de estas entradas.',
errorPrefix: 'Error: ',
warningPrefix: 'Advertencia: ',
// Form.Validator.Extras
noSpace: 'No se permiten espacios en este campo.',
reqChkByNode: 'No hay elementos seleccionados.',
requiredChk: 'Este campo es obligatorio.',
reqChkByName: 'Por favor selecciona una {label}.',
match: 'Este campo necesita coincidir con el campo {matchName}',
startDate: 'la fecha de inicio',
endDate: 'la fecha de fin',
currendDate: 'la fecha actual',
afterDate: 'La fecha debe ser igual o posterior a {label}.',
beforeDate: 'La fecha debe ser igual o anterior a {label}.',
startMonth: 'Por favor selecciona un mes de origen',
sameMonth: 'Estas dos fechas deben estar en el mismo mes - debes cambiar una u otra.'
});
| {
"pile_set_name": "Github"
} |
test_types
6. Built-in types
6.1 Truth value testing
6.2 Boolean operations
6.3 Comparisons
6.4 Numeric types (mostly conversions)
6.4.1 32-bit integers
6.4.2 Long integers
6.4.3 Floating point numbers
6.5 Sequence types
6.5.1 Strings
6.5.2 Tuples [see test_tuple.py]
6.5.3 Lists [see test_list.py]
6.6 Mappings == Dictionaries [see test_dict.py]
Buffers
| {
"pile_set_name": "Github"
} |
import copy
import operator
from functools import wraps, update_wrapper
# You can't trivially replace this `functools.partial` because this binds to
# classes and returns bound instances, whereas functools.partial (on CPython)
# is a type and its instances don't bind.
def curry(_curried_func, *args, **kwargs):
def _curried(*moreargs, **morekwargs):
return _curried_func(*(args+moreargs), **dict(kwargs, **morekwargs))
return _curried
def memoize(func, cache, num_args):
"""
Wrap a function so that results for any argument tuple are stored in
'cache'. Note that the args to the function must be usable as dictionary
keys.
Only the first num_args are considered when creating the key.
"""
@wraps(func)
def wrapper(*args):
mem_args = args[:num_args]
if mem_args in cache:
return cache[mem_args]
result = func(*args)
cache[mem_args] = result
return result
return wrapper
class cached_property(object):
"""
Decorator that creates converts a method with a single
self argument into a property cached on the instance.
"""
def __init__(self, func):
self.func = func
def __get__(self, instance, type):
res = instance.__dict__[self.func.__name__] = self.func(instance)
return res
class Promise(object):
"""
This is just a base class for the proxy class created in
the closure of the lazy function. It can be used to recognize
promises in code.
"""
pass
def lazy(func, *resultclasses):
"""
Turns any callable into a lazy evaluated callable. You need to give result
classes or types -- at least one is needed so that the automatic forcing of
the lazy evaluation code is triggered. Results are not memoized; the
function is evaluated on every access.
"""
class __proxy__(Promise):
"""
Encapsulate a function call and act as a proxy for methods that are
called on the result of that function. The function is not evaluated
until one of the methods on the result is called.
"""
__dispatch = None
def __init__(self, args, kw):
self.__args = args
self.__kw = kw
if self.__dispatch is None:
self.__prepare_class__()
def __reduce__(self):
return (
_lazy_proxy_unpickle,
(func, self.__args, self.__kw) + resultclasses
)
def __prepare_class__(cls):
cls.__dispatch = {}
for resultclass in resultclasses:
cls.__dispatch[resultclass] = {}
for type_ in reversed(resultclass.mro()):
for (k, v) in type_.__dict__.items():
# All __promise__ return the same wrapper method, but they
# also do setup, inserting the method into the dispatch
# dict.
meth = cls.__promise__(resultclass, k, v)
if hasattr(cls, k):
continue
setattr(cls, k, meth)
cls._delegate_str = str in resultclasses
cls._delegate_unicode = unicode in resultclasses
assert not (cls._delegate_str and cls._delegate_unicode), "Cannot call lazy() with both str and unicode return types."
if cls._delegate_unicode:
cls.__unicode__ = cls.__unicode_cast
elif cls._delegate_str:
cls.__str__ = cls.__str_cast
__prepare_class__ = classmethod(__prepare_class__)
def __promise__(cls, klass, funcname, method):
# Builds a wrapper around some magic method and registers that magic
# method for the given type and method name.
def __wrapper__(self, *args, **kw):
# Automatically triggers the evaluation of a lazy value and
# applies the given magic method of the result type.
res = func(*self.__args, **self.__kw)
for t in type(res).mro():
if t in self.__dispatch:
return self.__dispatch[t][funcname](res, *args, **kw)
raise TypeError("Lazy object returned unexpected type.")
if klass not in cls.__dispatch:
cls.__dispatch[klass] = {}
cls.__dispatch[klass][funcname] = method
return __wrapper__
__promise__ = classmethod(__promise__)
def __unicode_cast(self):
return func(*self.__args, **self.__kw)
def __str_cast(self):
return str(func(*self.__args, **self.__kw))
def __cmp__(self, rhs):
if self._delegate_str:
s = str(func(*self.__args, **self.__kw))
elif self._delegate_unicode:
s = unicode(func(*self.__args, **self.__kw))
else:
s = func(*self.__args, **self.__kw)
if isinstance(rhs, Promise):
return -cmp(rhs, s)
else:
return cmp(s, rhs)
def __mod__(self, rhs):
if self._delegate_str:
return str(self) % rhs
elif self._delegate_unicode:
return unicode(self) % rhs
else:
raise AssertionError('__mod__ not supported for non-string types')
def __deepcopy__(self, memo):
# Instances of this class are effectively immutable. It's just a
# collection of functions. So we don't need to do anything
# complicated for copying.
memo[id(self)] = self
return self
@wraps(func)
def __wrapper__(*args, **kw):
# Creates the proxy object, instead of the actual value.
return __proxy__(args, kw)
return __wrapper__
def _lazy_proxy_unpickle(func, args, kwargs, *resultclasses):
return lazy(func, *resultclasses)(*args, **kwargs)
def allow_lazy(func, *resultclasses):
"""
A decorator that allows a function to be called with one or more lazy
arguments. If none of the args are lazy, the function is evaluated
immediately, otherwise a __proxy__ is returned that will evaluate the
function when needed.
"""
@wraps(func)
def wrapper(*args, **kwargs):
for arg in list(args) + kwargs.values():
if isinstance(arg, Promise):
break
else:
return func(*args, **kwargs)
return lazy(func, *resultclasses)(*args, **kwargs)
return wrapper
empty = object()
def new_method_proxy(func):
def inner(self, *args):
if self._wrapped is empty:
self._setup()
return func(self._wrapped, *args)
return inner
class LazyObject(object):
"""
A wrapper for another class that can be used to delay instantiation of the
wrapped class.
By subclassing, you have the opportunity to intercept and alter the
instantiation. If you don't need to do that, use SimpleLazyObject.
"""
def __init__(self):
self._wrapped = empty
__getattr__ = new_method_proxy(getattr)
def __setattr__(self, name, value):
if name == "_wrapped":
# Assign to __dict__ to avoid infinite __setattr__ loops.
self.__dict__["_wrapped"] = value
else:
if self._wrapped is empty:
self._setup()
setattr(self._wrapped, name, value)
def __delattr__(self, name):
if name == "_wrapped":
raise TypeError("can't delete _wrapped.")
if self._wrapped is empty:
self._setup()
delattr(self._wrapped, name)
def _setup(self):
"""
Must be implemented by subclasses to initialise the wrapped object.
"""
raise NotImplementedError
# introspection support:
__members__ = property(lambda self: self.__dir__())
__dir__ = new_method_proxy(dir)
class SimpleLazyObject(LazyObject):
"""
A lazy object initialised from any function.
Designed for compound objects of unknown type. For builtins or objects of
known type, use django.utils.functional.lazy.
"""
def __init__(self, func):
"""
Pass in a callable that returns the object to be wrapped.
If copies are made of the resulting SimpleLazyObject, which can happen
in various circumstances within Django, then you must ensure that the
callable can be safely run more than once and will return the same
value.
"""
self.__dict__['_setupfunc'] = func
super(SimpleLazyObject, self).__init__()
def _setup(self):
self._wrapped = self._setupfunc()
__str__ = new_method_proxy(str)
__unicode__ = new_method_proxy(unicode)
def __deepcopy__(self, memo):
if self._wrapped is empty:
# We have to use SimpleLazyObject, not self.__class__, because the
# latter is proxied.
result = SimpleLazyObject(self._setupfunc)
memo[id(self)] = result
return result
else:
return copy.deepcopy(self._wrapped, memo)
# Because we have messed with __class__ below, we confuse pickle as to what
# class we are pickling. It also appears to stop __reduce__ from being
# called. So, we define __getstate__ in a way that cooperates with the way
# that pickle interprets this class. This fails when the wrapped class is a
# builtin, but it is better than nothing.
def __getstate__(self):
if self._wrapped is empty:
self._setup()
return self._wrapped.__dict__
# Need to pretend to be the wrapped class, for the sake of objects that care
# about this (especially in equality tests)
__class__ = property(new_method_proxy(operator.attrgetter("__class__")))
__eq__ = new_method_proxy(operator.eq)
__hash__ = new_method_proxy(hash)
__nonzero__ = new_method_proxy(bool)
class lazy_property(property):
"""
A property that works with subclasses by wrapping the decorated
functions of the base class.
"""
def __new__(cls, fget=None, fset=None, fdel=None, doc=None):
if fget is not None:
@wraps(fget)
def fget(instance, instance_type=None, name=fget.__name__):
return getattr(instance, name)()
if fset is not None:
@wraps(fset)
def fset(instance, value, name=fset.__name__):
return getattr(instance, name)(value)
if fdel is not None:
@wraps(fdel)
def fdel(instance, name=fdel.__name__):
return getattr(instance, name)()
return property(fget, fset, fdel, doc)
def partition(predicate, values):
"""
Splits the values into two sets, based on the return value of the function
(True/False). e.g.:
>>> partition(lambda: x > 3, range(5))
[1, 2, 3], [4]
"""
results = ([], [])
for item in values:
results[predicate(item)].append(item)
return results
| {
"pile_set_name": "Github"
} |
# @expo-google-fonts/dm-mono




This package lets you use the [**DM Mono**](https://fonts.google.com/specimen/DM+Mono) font family from [Google Fonts](https://fonts.google.com/) in your Expo app.
## DM Mono

This font family contains [6 styles](#-gallery).
- `DMMono_300Light`
- `DMMono_300Light_Italic`
- `DMMono_400Regular`
- `DMMono_400Regular_Italic`
- `DMMono_500Medium`
- `DMMono_500Medium_Italic`
## Usage
Run this command from the shell in the root directory of your Expo project to add the font family package to your project
```sh
expo install @expo-google-fonts/dm-mono expo-font
```
Now add code like this to your project
```js
import React, { useState, useEffect } from 'react';
import { Text, View, StyleSheet } from 'react-native';
import { AppLoading } from 'expo';
import {
useFonts,
DMMono_300Light,
DMMono_300Light_Italic,
DMMono_400Regular,
DMMono_400Regular_Italic,
DMMono_500Medium,
DMMono_500Medium_Italic,
} from '@expo-google-fonts/dm-mono';
export default () => {
let [fontsLoaded] = useFonts({
DMMono_300Light,
DMMono_300Light_Italic,
DMMono_400Regular,
DMMono_400Regular_Italic,
DMMono_500Medium,
DMMono_500Medium_Italic,
});
let fontSize = 24;
let paddingVertical = 6;
if (!fontsLoaded) {
return <AppLoading />;
} else {
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Text
style={{
fontSize,
paddingVertical,
// Note the quoting of the value for `fontFamily` here; it expects a string!
fontFamily: 'DMMono_300Light',
}}>
DM Mono Light
</Text>
<Text
style={{
fontSize,
paddingVertical,
// Note the quoting of the value for `fontFamily` here; it expects a string!
fontFamily: 'DMMono_300Light_Italic',
}}>
DM Mono Light Italic
</Text>
<Text
style={{
fontSize,
paddingVertical,
// Note the quoting of the value for `fontFamily` here; it expects a string!
fontFamily: 'DMMono_400Regular',
}}>
DM Mono Regular
</Text>
<Text
style={{
fontSize,
paddingVertical,
// Note the quoting of the value for `fontFamily` here; it expects a string!
fontFamily: 'DMMono_400Regular_Italic',
}}>
DM Mono Italic
</Text>
<Text
style={{
fontSize,
paddingVertical,
// Note the quoting of the value for `fontFamily` here; it expects a string!
fontFamily: 'DMMono_500Medium',
}}>
DM Mono Medium
</Text>
<Text
style={{
fontSize,
paddingVertical,
// Note the quoting of the value for `fontFamily` here; it expects a string!
fontFamily: 'DMMono_500Medium_Italic',
}}>
DM Mono Medium Italic
</Text>
</View>
);
}
};
```
## 🔡 Gallery
||||
|-|-|-|
|||||
|||||
## 👩💻 Use During Development
If you are trying out lots of different fonts, you can try using the [`@expo-google-fonts/dev` package](https://github.com/expo/google-fonts/tree/master/font-packages/dev#readme).
You can import *any* font style from any Expo Google Fonts package from it. It will load the fonts
over the network at runtime instead of adding the asset as a file to your project, so it may take longer
for your app to get to interactivity at startup, but it is extremely convenient
for playing around with any style that you want.
## 📖 License
The `@expo-google-fonts/dm-mono` package and its code are released under the MIT license.
All the fonts in the Google Fonts catalog are free and open source.
Check the [DM Mono page on Google Fonts](https://fonts.google.com/specimen/DM+Mono) for the specific license of this font family.
You can use these fonts freely in your products & projects - print or digital, commercial or otherwise. However, you can't sell the fonts on their own. This isn't legal advice, please consider consulting a lawyer and see the full license for all details.
## 🔗 Links
- [DM Mono on Google Fonts](https://fonts.google.com/specimen/DM+Mono)
- [Google Fonts](https://fonts.google.com/)
- [This package on npm](https://www.npmjs.com/package/@expo-google-fonts/dm-mono)
- [This package on GitHub](https://github.com/expo/google-fonts/tree/master/font-packages/dm-mono)
- [The Expo Google Fonts project on GitHub](https://github.com/expo/google-fonts)
- [`@expo-google-fonts/dev` Devlopment Package](https://github.com/expo/google-fonts/tree/master/font-packages/dev)
## 🤝 Contributing
Contributions are very welcome! This entire directory, including what you are reading now, was generated from code. Instead of submitting PRs to this directly, please make contributions to [the generator](https://github.com/expo/google-fonts/tree/master/packages/generator) instead.
| {
"pile_set_name": "Github"
} |
/* ###
* IP: GHIDRA
*
* 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.
*/
package ghidra.framework.model;
import ghidra.framework.plugintool.PluginTool;
/**
* Represents a connection between a producer tool and a
* consumer tool.
*/
public interface ToolConnection {
/**
* Get the tool that produces an event
* @return the tool
*/
public PluginTool getProducer();
/**
* Get the tool that consumes an event
* @return the tool
*/
public PluginTool getConsumer();
/**
* Get the list of event names that is an intersection
* between what the producer produces and what the
* consumers consumes.
*
* @return an array of event names
*/
public String[] getEvents();
/**
* Connect the tools for the given event name.
*
* @param eventName name of event to connect
*
* @throws IllegalArgumentException if eventName is not valid for this
* producer/consumer pair.
*/
public void connect(String eventName);
/**
* Break the connection between the tools for the
* given event name.
*
* @param eventName name of event to disconnect
*
* @throws IllegalArgumentException if eventName is not valid for this
* producer/consumer pair.
*/
public void disconnect(String eventName);
/**
* Return whether the tools are connected for the
* given event name.
*
* @param eventName name of event to check
* @return true if the tools are connected by eventName.
*/
public boolean isConnected(String eventName);
}
| {
"pile_set_name": "Github"
} |
<?xml version='1.0' encoding="utf-8"?>
<charsets>
<copyright>
Copyright (C) 2003 MySQL AB
Use is subject to license terms
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; version 2 of the License.
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
</copyright>
<charset name="cp1257">
<ctype>
<map>
00
20 20 20 20 20 20 20 20 20 28 28 28 28 28 20 20
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
48 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10
84 84 84 84 84 84 84 84 84 84 10 10 10 10 10 10
10 81 81 81 81 81 81 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 01 01 01 01 01 10 10 10 10 10
10 82 82 82 82 82 82 02 02 02 02 02 02 02 02 02
02 02 02 02 02 02 02 02 02 02 02 10 10 10 10 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 01 00 01 00 00 00 00 01
00 00 00 00 00 00 00 00 02 00 02 00 00 00 00 02
01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01
01 01 01 01 01 01 01 00 01 01 01 01 01 01 01 02
02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
02 02 02 02 02 02 02 00 02 02 02 02 02 02 02 00
</map>
</ctype>
<lower>
<map>
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F
30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F
40 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F
70 71 72 73 74 75 76 77 78 79 7A 5B 5C 5D 5E 5F
60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F
70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F
80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F
90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F
A0 A1 A2 A3 A4 A5 A6 A7 B8 A9 BA AB AC AD AE BF
B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF
E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF
F0 F1 F2 F3 F4 F5 F6 D7 F8 F9 FA FB FC FD FE DF
E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF
F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 FA FB FC FD FE FF
</map>
</lower>
<upper>
<map>
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F
30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F
40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F
50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F
60 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F
50 51 52 53 54 55 56 57 58 59 5A 7B 7C 7D 7E 7F
80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F
90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F
A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 BA AB AC AD AE AF
B0 B1 B2 B3 B4 B5 B6 B7 A8 B9 BA BB BC BD BE AF
C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF
D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF
C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF
D0 D1 D2 D3 D4 D5 D6 F7 D8 D9 DA DB DC DD DE FF
</map>
</upper>
<unicode>
<map>
0000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000A 000B 000C 000D 000E 000F
0010 0011 0012 0013 0014 0015 0016 0017 0018 0019 001A 001B 001C 001D 001E 001F
0020 0021 0022 0023 0024 0025 0026 0027 0028 0029 002A 002B 002C 002D 002E 002F
0030 0031 0032 0033 0034 0035 0036 0037 0038 0039 003A 003B 003C 003D 003E 003F
0040 0041 0042 0043 0044 0045 0046 0047 0048 0049 004A 004B 004C 004D 004E 004F
0050 0051 0052 0053 0054 0055 0056 0057 0058 0059 005A 005B 005C 005D 005E 005F
0060 0061 0062 0063 0064 0065 0066 0067 0068 0069 006A 006B 006C 006D 006E 006F
0070 0071 0072 0073 0074 0075 0076 0077 0078 0079 007A 007B 007C 007D 007E 007F
20AC 0000 201A 0000 201E 2026 2020 2021 0000 2030 0000 2039 0000 00A8 02C7 00B8
0000 2018 2019 201C 201D 2022 2013 2014 0000 2122 0000 203A 0000 00AF 02DB 0000
00A0 0000 00A2 00A3 00A4 0000 00A6 00A7 00D8 00A9 0156 00AB 00AC 00AD 00AE 00C6
00B0 00B1 00B2 00B3 00B4 00B5 00B6 00B7 00F8 00B9 0157 00BB 00BC 00BD 00BE 00E6
0104 012E 0100 0106 00C4 00C5 0118 0112 010C 00C9 0179 0116 0122 0136 012A 013B
0160 0143 0145 00D3 014C 00D5 00D6 00D7 0172 0141 015A 016A 00DC 017B 017D 00DF
0105 012F 0101 0107 00E4 00E5 0119 0113 010D 00E9 017A 0117 0123 0137 012B 013C
0161 0144 0146 00F3 014D 00F5 00F6 00F7 0173 0142 015B 016B 00FC 017C 017E 02D9
</map>
</unicode>
<collation name="cp1257_lithuanian_ci">
<map>
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F
30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F
40 41 43 44 46 47 4A 4B 4C 4D 50 51 52 53 54 55
56 57 58 59 5B 5C 5F 60 61 4E FF 62 63 64 65 66
67 41 43 44 46 47 4A 4B 4C 4D 50 51 52 53 54 55
56 57 58 59 5B 5C 5F 60 61 4E FF 68 69 6A 6B FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
42 4F FF FF FF FF 48 FF 45 FF FF 49 FF FF FF FF
5A FF FF FF FF FF FF FF 5E FF FF 5D FF FF FF FF
FF 4F FF FF FF FF 48 FF 45 FF FF 49 FF FF FF FF
5A FF FF FF FF FF FF FF 5E FF FF 5D FF FF FF FF
</map>
</collation>
<collation name="cp1257_bin" flag="binary"/>
<collation name="cp1257_general_ci">
<map>
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F
30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F
40 41 4D 4F 55 57 61 63 67 69 6F 71 75 7B 7D 83
8F 91 93 97 9E A0 A8 AA AC AE B0 B8 B9 BA BB BC
BD 41 4D 4F 55 57 61 63 67 69 6F 71 75 7B 7D 83
8F 91 93 97 9E A0 A8 AA AC AE B0 BE BF C0 C1 C4
C5 C6 C7 C8 C9 CA CB CC CD CE CF D0 D1 D2 D3 D4
D5 D6 D7 D8 D9 DA DB DC DD DE DF E0 E1 E2 E3 E4
E5 E6 E7 E8 E9 EA EB EC 83 ED 93 EE EF F0 F1 41
F2 F3 F4 F5 F6 F7 F8 F9 83 FA 93 FB FC FD FE 41
41 69 41 4F 41 41 57 57 4F 57 B0 57 63 71 69 75
97 7D 7D 83 83 83 83 C2 A0 75 97 A0 A0 B0 B0 97
41 69 41 4F 41 41 57 57 4F 57 B0 57 63 71 69 75
97 7D 7D 83 83 83 83 C3 A0 75 97 A0 A0 B0 B0 FF
</map>
</collation>
<collation name="cp1257_ci">
<map>
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F
30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F
40 41 4D 4F 55 57 61 63 67 69 6F 71 75 7B 7D 83
8F 91 93 97 9E A0 A8 AA AC AE B0 B8 B9 BA BB BC
BD 41 4D 4F 55 57 61 63 67 69 6F 71 75 7B 7D 83
8F 91 93 97 9E A0 A8 AA AC AE B0 BE BF C0 C1 C4
C5 C6 C7 C8 C9 CA CB CC CD CE CF D0 D1 D2 D3 D4
D5 D6 D7 D8 D9 DA DB DC DD DE DF E0 E1 E2 E3 E4
E5 E6 E7 E8 E9 EA EB EC 85 ED 95 EE EF F0 F1 4B
F2 F3 F4 F5 F6 F7 F8 F9 85 FA 95 FB FC FD FE 4B
43 6B 45 51 47 49 59 5B 53 5D B2 5F 65 73 6D 77
99 7F 81 87 89 8B 8D C2 A2 79 9B A4 A6 B4 B6 9D
43 6B 45 51 47 49 59 5B 53 5D B2 5F 65 73 6D 77
99 7F 81 87 89 8B 8D C3 A2 79 9B A4 A6 B4 B6 FF
</map>
</collation>
<collation name="cp1257_cs">
<map>
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F
30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F
40 41 4D 4F 55 57 61 63 67 69 6F 71 75 7B 7D 83
8F 91 93 97 9E A0 A8 AA AC AE B0 B8 B9 BA BB BC
BD 42 4E 50 56 58 62 64 68 6A 70 72 76 7C 7E 84
90 92 94 98 9F A1 A9 AB AD AF B1 BE BF C0 C1 C4
C5 C6 C7 C8 C9 CA CB CC CD CE CF D0 D1 D2 D3 D4
D5 D6 D7 D8 D9 DA DB DC DD DE DF E0 E1 E2 E3 E4
E5 E6 E7 E8 E9 EA EB EC 85 ED 95 EE EF F0 F1 4B
F2 F3 F4 F5 F6 F7 F8 F9 86 FA 96 FB FC FD FE 4C
43 6B 45 51 47 49 59 5B 53 5D B2 5F 65 73 6D 77
99 7F 81 87 89 8B 8D C2 A2 79 9B A4 A6 B4 B6 9D
44 6C 46 52 48 4A 5A 5C 54 5E B3 60 66 74 6E 78
9A 80 82 88 8A 8C 8E C3 A3 7A 9C A5 A7 B5 B7 FF
</map>
</collation>
<collation name="cp1257ltlv">
<map>
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F
30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F
40 41 47 49 4D 4F 57 59 5D 5F 65 67 6B 6F 71 75
79 7B 7D 81 85 87 8D 8F 91 93 95 FF FF FF FF FF
FF 42 48 4A 4E 50 58 5A 5E 60 66 68 6C 70 72 76
7A 7C 7E 82 86 88 8E 90 92 94 96 FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF 7F FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF 80 FF FF FF FF FF
45 63 43 FF FF FF 53 51 4B FF FF 55 5B 69 61 6D
83 FF 73 FF 77 FF FF FF 8B FF FF 89 FF 99 97 FF
46 64 44 FF FF FF 54 52 4C FF FF 56 5C 6A 62 6E
84 FF 74 FF 78 FF FF FF 8C FF FF 8A FF 9A 98 FF
</map>
</collation>
</charset>
</charsets>
| {
"pile_set_name": "Github"
} |
# Beacuse AWS Lambda uses an older version of glibc than nixpkgs, we need to build fully static
# binaries.
#
# Unfortunately we cannot build a haskell static binary if the package uses template haskell.
# This is because haskell uses dynamically linked libraries to run template haskell at compile
# time, however we have passed the `-optl=-static` flag which is passed to all linker invocations
# causing these intermediate dynamically linked libraries to fail linking.
#
# In order to get around this we make sure that the TH code is all in libraries and create
# a single haskell file that does nothing other than import the main function from the library.
# We can then pass the `-optl=-static` flag and statically link this as it does not use TH.
{ pkgs, lib, haskellPackages }:
let
ghc = haskellPackages.ghcWithPackages (p: [ p.marlowe-symbolic ]);
main = pkgs.writeText "app.hs"
''
module Main where
import qualified Marlowe.Symbolic.Lambda as Lambda
main = Lambda.main
'';
z3 = pkgs.z3.override { staticbin = true; };
openssl = (pkgs.openssl.override { static = true; }).overrideAttrs(old : {
# "no-shared" per https://github.com/NixOS/nixpkgs/pull/77542, should be able to
# get rid of this when we update nixpkgs
configureFlags = old.configureFlags ++ [ "no-shared" ];
});
gmp6 = pkgs.gmp6.override { withStatic = true; };
zlib = pkgs.zlib.override { static = true; };
ncurses = pkgs.ncurses.override { enableStatic = true; };
libffi = pkgs.libffi.overrideAttrs (old: { dontDisableStatic = true; });
numactl = pkgs.numactl.overrideAttrs (_: { configureFlags = "--enable-static"; });
killallz3 = pkgs.writeScriptBin "killallz3" ''
kill -9 $(ps aux | grep z3 | grep -v grep | awk '{print $2}')
'';
in
pkgs.stdenv.mkDerivation {
name = "marlowe-symbolic-lambda";
nativeBuildInputs = [ pkgs.zip ];
unpackPhase = "true";
buildPhase =
''
mkdir -p $out/bin
${ghc}/bin/${ghc.targetPrefix}ghc ${main} -static -threaded -o $out/bin/bootstrap \
-optl=-static \
-optl=-L${lib.getLib ncurses}/lib \
-optl=-L${lib.getLib zlib}/lib \
-optl=-L${lib.getLib gmp6}/lib \
-optl=-L${lib.getLib openssl}/lib \
-optl=-L${lib.getLib libffi}/lib \
-optl=-L${lib.getLib numactl}/lib
'';
installPhase = ''
zip -j marlowe-symbolic.zip $out/bin/bootstrap ${z3}/bin/z3 ${killallz3}/bin/killallz3
mv marlowe-symbolic.zip $out/marlowe-symbolic.zip
'';
# Marlowe lambda builds with musl, and only on linux
meta.platforms = lib.platforms.linux;
}
| {
"pile_set_name": "Github"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.