text
stringlengths
2
100k
meta
dict
/* * Viry3D * Copyright 2014-2019 by Stack - [email protected] * * 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. */ #include "String.h" #include "memory/Memory.h" #include <stdarg.h> #if VR_WINDOWS #include <Windows.h> #endif namespace Viry3D { static const char BASE64_TABLE[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; String String::Format(const char* format, ...) { String result; va_list vs; va_start(vs, format); int size = vsnprintf(nullptr, 0, format, vs); va_end(vs); char* buffer = Memory::Alloc<char>(size + 1); buffer[size] = 0; va_start(vs, format); size = vsnprintf(buffer, size + 1, format, vs); va_end(vs); result.m_string = buffer; Memory::Free(buffer, size + 1); return result; } String String::Base64(const char* bytes, int size) { int size_pad = size; if (size_pad % 3 != 0) { size_pad += 3 - (size_pad % 3); } int round = size_pad / 3; std::string str(round * 4, '\0'); int index; char a, b, c; for (int i = 0; i < round; ++i) { a = 0; b = 0; c = 0; index = i * 3 + 0; if (index < size) a = bytes[index]; index = i * 3 + 1; if (index < size) b = bytes[index]; index = i * 3 + 2; if (index < size) c = bytes[index]; str[i * 4 + 0] = BASE64_TABLE[(a & 0xfc) >> 2]; str[i * 4 + 1] = BASE64_TABLE[((a & 0x3) << 4) | ((b & 0xf0) >> 4)]; str[i * 4 + 2] = BASE64_TABLE[((b & 0xf) << 2) | ((c & 0xc0) >> 6)]; str[i * 4 + 3] = BASE64_TABLE[c & 0x3f]; } for (int i = size_pad - size, j = 0; i > 0; --i, ++j) { str[(round - 1) * 4 + 3 - j] = '='; } return String(str.c_str()); } String String::Utf8ToGb2312(const String& str) { #if VR_WINDOWS int size = MultiByteToWideChar(CP_UTF8, 0, str.CString(), str.Size(), nullptr, 0); wchar_t* wstr = (wchar_t*) calloc(1, (size + 1) * 2); MultiByteToWideChar(CP_UTF8, 0, str.CString(), str.Size(), wstr, size); size = WideCharToMultiByte(CP_ACP, 0, wstr, size, nullptr, 0, nullptr, false); char* cstr = (char*) calloc(1, size + 1); WideCharToMultiByte(CP_ACP, 0, wstr, size, cstr, size, nullptr, false); String ret = cstr; free(cstr); free(wstr); return ret; #else return str; #endif } String String::Gb2312ToUtf8(const String& str) { #if VR_WINDOWS int size = MultiByteToWideChar(CP_ACP, 0, str.CString(), str.Size(), nullptr, 0); wchar_t* wstr = (wchar_t*) calloc(1, (size + 1) * 2); MultiByteToWideChar(CP_ACP, 0, str.CString(), str.Size(), wstr, size); size = WideCharToMultiByte(CP_UTF8, 0, wstr, size, nullptr, 0, nullptr, false); char* cstr = (char*) calloc(1, size + 1); WideCharToMultiByte(CP_UTF8, 0, wstr, size, cstr, size, nullptr, false); String ret = cstr; free(cstr); free(wstr); return ret; #else return str; #endif } String String::UrlDecode(const String& str) { std::string dest = str.CString(); int i = 0; int j = 0; char c; int size = (int) str.Size(); while (i < size) { c = str[i]; switch (c) { case '+': dest[j++] = ' '; i++; break; case '%': { while (i + 2 < size && c == '%') { auto sub = str.Substring(i + 1, 2); char v = (char) strtol(sub.CString(), nullptr, 16); dest[j++] = v; i += 3; if (i < size) { c = str[i]; } } } break; default: dest[j++] = c; i++; break; } } return String(dest.c_str(), j); } String::String() { } String::String(const char *str): m_string(str) { } String::String(const char* str, int size) : m_string(str, size) { } String::String(const ByteBuffer& buffer) : m_string((const char*) buffer.Bytes(), buffer.Size()) { } int String::Size() const { return (int) m_string.size(); } bool String::Empty() const { return m_string.empty(); } bool String::operator ==(const String& right) const { if (this->Size() == right.Size()) { return Memory::Compare(this->m_string.data(), right.m_string.data(), (int) m_string.size()) == 0; } return false; } bool String::operator !=(const String& right) const { return !(*this == right); } bool String::operator ==(const char* right) const { if (right && this->Size() == strlen(right)) { return Memory::Compare(this->m_string.data(), right, this->Size()) == 0; } return false; } bool String::operator !=(const char* right) const { return !(*this == right); } bool operator ==(const char* left, const String& right) { return right == left; } bool operator !=(const char* left, const String& right) { return right != left; } String String::operator +(const String& right) const { String result; result.m_string = m_string + right.m_string; return result; } String& String::operator +=(const String& right) { *this = *this + right; return *this; } String operator +(const char* left, const String& right) { return String(left) + right; } bool String::operator <(const String& right) const { return m_string < right.m_string; } char& String::operator[](int index) { return m_string[index]; } const char& String::operator[](int index) const { return m_string[index]; } const char* String::CString() const { return m_string.c_str(); } int String::IndexOf(const String& str, int start) const { size_t pos = m_string.find(str.m_string, start); if (pos != std::string::npos) { return (int) pos; } else { return -1; } } bool String::Contains(const String& str) const { return this->IndexOf(str) >= 0; } int String::LastIndexOf(const String& str, int start) const { size_t pos = m_string.rfind(str.m_string, start); if (pos != std::string::npos) { return (int) pos; } else { return -1; } } String String::Replace(const String& old, const String& to) const { String result(*this); int start = 0; while (true) { int index = result.IndexOf(old, start); if (index >= 0) { result.m_string.replace(index, old.m_string.size(), to.m_string); start = index + (int) to.m_string.size(); } else { break; } } return result; } Vector<String> String::Split(const String& separator, bool exclude_empty) const { Vector<String> result; int start = 0; while (true) { int index = this->IndexOf(separator, start); if (index >= 0) { String str = this->Substring(start, index - start); if (!str.Empty() || !exclude_empty) { result.Add(str); } start = index + separator.Size(); } else { break; } } String str = this->Substring(start, -1); if (!str.Empty() || !exclude_empty) { result.Add(str); } return result; } bool String::StartsWith(const String& str) const { if (str.Size() == 0) { return true; } else if (this->Size() < str.Size()) { return false; } else { return Memory::Compare(&(*this)[0], &str[0], str.Size()) == 0; } } bool String::EndsWith(const String& str) const { if (str.Size() == 0) { return true; } else if (this->Size() < str.Size()) { return false; } else { return Memory::Compare(&(*this)[this->Size() - str.Size()], &str[0], str.Size()) == 0; } } String String::Substring(int start, int count) const { String result; result.m_string = m_string.substr(start, count); return result; } static int Utf8ToUnicode32(const char* utf8, char32_t& c32) { int byte_count = 0; for (int i = 0; i < 8; ++i) { unsigned char c = utf8[0]; if (((c << i) & 0x80) == 0) { if (i == 0) { byte_count = 1; } else { byte_count = i; } break; } } if (byte_count >= 1 && byte_count <= 6) { char32_t code = 0; for (int i = 0; i < byte_count; ++i) { unsigned int c = utf8[i]; unsigned char part; if (i == 0) { part = (c << (byte_count + 24)) >> (byte_count + 24); } else { part = c & 0x3f; } code = (code << 6) | part; } c32 = code; return byte_count; } else { return 0; } } static Vector<char> Unicode32ToUtf8(char32_t c32) { Vector<char> buffer; int byte_count = 0; if (c32 <= 0x7f) { byte_count = 1; } else if (c32 <= 0x7ff) { byte_count = 2; } else if (c32 <= 0xffff) { byte_count = 3; } else if (c32 <= 0x1fffff) { byte_count = 4; } else if (c32 <= 0x3ffffff) { byte_count = 5; } else if (c32 <= 0x7fffffff) { byte_count = 6; } std::vector<char> bytes; for (int i = 0; i < byte_count - 1; ++i) { bytes.push_back((c32 & 0x3f) | 0x80); c32 >>= 6; } if (byte_count > 1) { bytes.push_back((char) (c32 | (0xffffff80 >> (byte_count - 1)))); } else { bytes.push_back((char) (c32)); } for (int i = 0; i < byte_count; ++i) { buffer.Add(bytes[byte_count - 1 - i]); } return buffer; } Vector<char32_t> String::ToUnicode32() const { Vector<char32_t> unicode; int size = (int) m_string.size(); for (int i = 0; i < size; ++i) { char32_t unicode32 = 0; int byte_count = Utf8ToUnicode32(&m_string[i], unicode32); if (byte_count > 0) { unicode.Add(unicode32); i += byte_count - 1; } else { break; } } return unicode; } String::String(const char32_t* unicode32) { Vector<char> str; for (int i = 0; unicode32[i] != 0; ++i) { char32_t c32 = unicode32[i]; auto bytes = Unicode32ToUtf8(c32); str.AddRange(&bytes[0], bytes.Size()); } str.Add(0); m_string = &str[0]; } String::String(const char32_t* unicode32, int size) { Vector<char> str; for (int i = 0; i < size; ++i) { char32_t c32 = unicode32[i]; auto bytes = Unicode32ToUtf8(c32); str.AddRange(&bytes[0], bytes.Size()); } str.Add(0); m_string = &str[0]; } String String::ToLower() const { Vector<char> str; for (auto c : m_string) { if (c >= 'A' && c <= 'Z') { c -= 'A' - 'a'; } str.Add(c); } str.Add(0); return String(&str[0]); } String String::ToUpper() const { Vector<char> str; for (auto c : m_string) { if (c >= 'a' && c <= 'z') { c += 'A' - 'a'; } str.Add(c); } str.Add(0); return String(&str[0]); } }
{ "pile_set_name": "Github" }
<component name="libraryTable"> <library name="Maven: org.springframework.cloud:spring-cloud-bus:1.3.0.RELEASE"> <CLASSES> <root url="jar://$USER_HOME$/.m2/repository/org/springframework/cloud/spring-cloud-bus/1.3.0.RELEASE/spring-cloud-bus-1.3.0.RELEASE.jar!/" /> </CLASSES> <JAVADOC> <root url="jar://$USER_HOME$/.m2/repository/org/springframework/cloud/spring-cloud-bus/1.3.0.RELEASE/spring-cloud-bus-1.3.0.RELEASE-javadoc.jar!/" /> </JAVADOC> <SOURCES> <root url="jar://$USER_HOME$/.m2/repository/org/springframework/cloud/spring-cloud-bus/1.3.0.RELEASE/spring-cloud-bus-1.3.0.RELEASE-sources.jar!/" /> </SOURCES> </library> </component>
{ "pile_set_name": "Github" }
// This file is part of libigl, a simple c++ geometry processing library. // // Copyright (C) 2013 Alec Jacobson <[email protected]> // // This Source Code Form is subject to the terms of the Mozilla Public License // v. 2.0. If a copy of the MPL was not distributed with this file, You can // obtain one at http://mozilla.org/MPL/2.0/. #include "forward_kinematics.h" #include <functional> #include <iostream> IGL_INLINE void igl::forward_kinematics( const Eigen::MatrixXd & C, const Eigen::MatrixXi & BE, const Eigen::VectorXi & P, const std::vector< Eigen::Quaterniond,Eigen::aligned_allocator<Eigen::Quaterniond> > & dQ, const std::vector<Eigen::Vector3d> & dT, std::vector< Eigen::Quaterniond,Eigen::aligned_allocator<Eigen::Quaterniond> > & vQ, std::vector<Eigen::Vector3d> & vT) { using namespace std; using namespace Eigen; const int m = BE.rows(); assert(m == P.rows()); assert(m == (int)dQ.size()); assert(m == (int)dT.size()); vector<bool> computed(m,false); vQ.resize(m); vT.resize(m); // Dynamic programming function<void (int) > fk_helper = [&] (int b) { if(!computed[b]) { if(P(b) < 0) { // base case for roots vQ[b] = dQ[b]; const Vector3d r = C.row(BE(b,0)).transpose(); vT[b] = r-dQ[b]*r + dT[b]; }else { // Otherwise first compute parent's const int p = P(b); fk_helper(p); vQ[b] = vQ[p] * dQ[b]; const Vector3d r = C.row(BE(b,0)).transpose(); vT[b] = vT[p] - vQ[b]*r + vQ[p]*(r + dT[b]); } computed[b] = true; } }; for(int b = 0;b<m;b++) { fk_helper(b); } } IGL_INLINE void igl::forward_kinematics( const Eigen::MatrixXd & C, const Eigen::MatrixXi & BE, const Eigen::VectorXi & P, const std::vector< Eigen::Quaterniond,Eigen::aligned_allocator<Eigen::Quaterniond> > & dQ, std::vector< Eigen::Quaterniond,Eigen::aligned_allocator<Eigen::Quaterniond> > & vQ, std::vector<Eigen::Vector3d> & vT) { std::vector<Eigen::Vector3d> dT(BE.rows(),Eigen::Vector3d(0,0,0)); return forward_kinematics(C,BE,P,dQ,dT,vQ,vT); } IGL_INLINE void igl::forward_kinematics( const Eigen::MatrixXd & C, const Eigen::MatrixXi & BE, const Eigen::VectorXi & P, const std::vector< Eigen::Quaterniond,Eigen::aligned_allocator<Eigen::Quaterniond> > & dQ, const std::vector<Eigen::Vector3d> & dT, Eigen::MatrixXd & T) { using namespace Eigen; using namespace std; vector< Quaterniond,aligned_allocator<Quaterniond> > vQ; vector< Vector3d> vT; forward_kinematics(C,BE,P,dQ,dT,vQ,vT); const int dim = C.cols(); T.resize(BE.rows()*(dim+1),dim); for(int e = 0;e<BE.rows();e++) { Affine3d a = Affine3d::Identity(); a.translate(vT[e]); a.rotate(vQ[e]); T.block(e*(dim+1),0,dim+1,dim) = a.matrix().transpose().block(0,0,dim+1,dim); } } IGL_INLINE void igl::forward_kinematics( const Eigen::MatrixXd & C, const Eigen::MatrixXi & BE, const Eigen::VectorXi & P, const std::vector< Eigen::Quaterniond,Eigen::aligned_allocator<Eigen::Quaterniond> > & dQ, Eigen::MatrixXd & T) { std::vector<Eigen::Vector3d> dT(BE.rows(),Eigen::Vector3d(0,0,0)); return forward_kinematics(C,BE,P,dQ,dT,T); } #ifdef IGL_STATIC_LIBRARY // Explicit template instantiation #endif
{ "pile_set_name": "Github" }
<?php namespace Kirby\Database; use Kirby\Exception\InvalidArgumentException; use PHPUnit\Framework\TestCase; use ReflectionProperty; /** * @coversDefaultClass Kirby\Database\Db */ class DbTest extends TestCase { public function setUp(): void { Db::connect([ 'database' => ':memory:', 'type' => 'sqlite' ]); // create a dummy user table which we can use for our tests Db::execute(' CREATE TABLE "users" ( "id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL UNIQUE, "username" TEXT UNIQUE ON CONFLICT FAIL NOT NULL, "fname" TEXT, "lname" TEXT, "password" TEXT NOT NULL, "email" TEXT NOT NULL ); '); // insert some silly dummy data Db::insert('users', [ 'username' => 'john', 'fname' => 'John', 'lname' => 'Lennon', 'email' => '[email protected]', 'password' => 'beatles' ]); Db::insert('users', [ 'username' => 'paul', 'fname' => 'Paul', 'lname' => 'McCartney', 'email' => '[email protected]', 'password' => 'beatles' ]); Db::insert('users', [ 'username' => 'george', 'fname' => 'George', 'lname' => 'Harrison', 'email' => '[email protected]', 'password' => 'beatles' ]); } /** * @covers ::connect */ public function testConnect() { $db = Db::connect(); $this->assertInstanceOf(Database::class, $db); // cached instance $this->assertSame($db, Db::connect()); // new instance $this->assertNotSame($db, Db::connect([ 'type' => 'sqlite', 'database' => ':memory:' ])); // new instance with custom options $db = Db::connect([ 'type' => 'sqlite', 'database' => ':memory:', 'prefix' => 'test_' ]); $this->assertSame('test_', $db->prefix()); // cache of the new instance $this->assertSame($db, Db::connect()); } /** * @covers ::connection */ public function testConnection() { $this->assertInstanceOf(Database::class, Db::connection()); } /** * @covers ::table */ public function testTable() { $tableProp = new ReflectionProperty(Query::class, 'table'); $tableProp->setAccessible(true); $query = Db::table('users'); $this->assertInstanceOf(Query::class, $query); $this->assertSame('users', $tableProp->getValue($query)); } /** * @covers ::query */ public function testQuery() { $result = Db::query('SELECT * FROM users WHERE username = :username', ['username' => 'paul'], ['fetch' => 'array', 'iterator' => 'array']); $this->assertSame('paul', $result[0]['username']); } /** * @covers ::execute */ public function testExecute() { $result = Db::query('SELECT * FROM users WHERE username = :username', ['username' => 'paul'], ['fetch' => 'array', 'iterator' => 'array']); $this->assertSame('paul', $result[0]['username']); $result = Db::execute('DELETE FROM users WHERE username = :username', ['username' => 'paul']); $this->assertTrue($result); $result = Db::query('SELECT * FROM users WHERE username = :username', ['username' => 'paul'], ['fetch' => 'array', 'iterator' => 'array']); $this->assertEmpty($result); } /** * @covers ::__callStatic */ public function testCallStatic() { Db::connect([ 'database' => ':memory:', 'type' => 'sqlite', 'prefix' => 'myprefix_' ]); Db::$queries['test'] = function ($test) { return $test . ' test'; }; $this->assertSame('This is a test', Db::test('This is a')); unset(Db::$queries['test']); $this->assertSame('sqlite', Db::type()); $this->assertSame('myprefix_', Db::prefix()); } /** * @covers ::__callStatic */ public function testCallStaticInvalid() { $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage('Invalid static Db method: thisIsInvalid'); Db::thisIsInvalid(); } /** * @coversNothing */ public function testSelect() { $result = Db::select('users'); $this->assertSame(3, $result->count()); $result = Db::select('users', 'username', ['username' => 'paul']); $this->assertSame(1, $result->count()); $this->assertSame('paul', $result->first()->username()); $result = Db::select('users', 'username', null, 'username ASC', 1, 1); $this->assertSame(1, $result->count()); $this->assertSame('john', $result->first()->username()); } /** * @coversNothing */ public function testFirst() { $result = Db::first('users'); $this->assertSame('john', $result->username()); $result = Db::first('users', '*', ['username' => 'paul']); $this->assertSame('paul', $result->username()); $result = Db::first('users', '*', null, 'username ASC'); $this->assertSame('george', $result->username()); $result = Db::row('users'); $this->assertSame('john', $result->username()); $result = Db::one('users'); $this->assertSame('john', $result->username()); } /** * @coversNothing */ public function testColumn() { $result = Db::column('users', 'username'); $this->assertSame(['john', 'paul', 'george'], $result->toArray()); $result = Db::column('users', 'username', ['username' => 'paul']); $this->assertSame(['paul'], $result->toArray()); $result = Db::column('users', 'username', null, 'username ASC'); $this->assertSame(['george', 'john', 'paul'], $result->toArray()); $result = Db::column('users', 'username', null, 'username ASC', 1, 1); $this->assertSame(['john'], $result->toArray()); } /** * @coversNothing */ public function testInsert() { $result = Db::insert('users', [ 'username' => 'ringo', 'fname' => 'Ringo', 'lname' => 'Starr', 'email' => '[email protected]', 'password' => 'beatles' ]); $this->assertSame(4, $result); $this->assertSame('[email protected]', Db::row('users', '*', ['username' => 'ringo'])->email()); } /** * @coversNothing */ public function testUpdate() { $result = Db::update('users', ['email' => '[email protected]'], ['username' => 'john']); $this->assertTrue($result); $this->assertSame('[email protected]', Db::row('users', '*', ['username' => 'john'])->email()); $this->assertSame('[email protected]', Db::row('users', '*', ['username' => 'paul'])->email()); } /** * @coversNothing */ public function testDelete() { $result = Db::delete('users', ['username' => 'john']); $this->assertTrue($result); $this->assertFalse(Db::one('users', '*', ['username' => 'john'])); $this->assertSame(2, Db::count('users')); } /** * @coversNothing */ public function testCount() { $this->assertSame(3, Db::count('users')); } /** * @coversNothing */ public function testMin() { $this->assertSame(1.0, Db::min('users', 'id')); } /** * @coversNothing */ public function testMax() { $this->assertSame(3.0, Db::max('users', 'id')); } /** * @coversNothing */ public function testAvg() { $this->assertSame(2.0, Db::avg('users', 'id')); } /** * @coversNothing */ public function testSum() { $this->assertSame(6.0, Db::sum('users', 'id')); } }
{ "pile_set_name": "Github" }
JSON backend ------------ .. toctree:: :maxdepth: 2 .. automodule:: cork.json_backend :members: :inherited-members: :undoc-members:
{ "pile_set_name": "Github" }
好奇心原文链接:[魅蓝也出了全面屏手机,但看上去和之前一个模版_智能_好奇心日报-张智伟](https://www.qdaily.com/articles/49328.html) WebArchive归档链接:[魅蓝也出了全面屏手机,但看上去和之前一个模版_智能_好奇心日报-张智伟](http://web.archive.org/web/20180131040811/http://www.qdaily.com:80/articles/49328.html) ![image](http://ww3.sinaimg.cn/large/007d5XDply1g3ybpy9x2bj30u03ufkjl)
{ "pile_set_name": "Github" }
/* @flow */ /* eslint-disable no-console */ import type DOMRenderer from '../../../flowtypes/DOMRenderer' function addClassNameSorting(renderer: DOMRenderer) { const existingRenderRule = renderer.renderRule.bind(renderer) renderer.renderRule = (...args) => { const className = existingRenderRule(...args) return className .split(/\s+/g) .sort((a, b) => (a < b ? -1 : a > b ? +1 : 0)) .join(' ') } return renderer } export default function sortClassNames() { return addClassNameSorting }
{ "pile_set_name": "Github" }
<?php /** * Mockery * * LICENSE * * This source file is subject to the new BSD license that is bundled * with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://github.com/padraic/mockery/blob/master/LICENSE * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * @category Mockery * @package Mockery * @copyright Copyright (c) 2010 Pádraic Brady (http://blog.astrumfutura.com) * @license http://github.com/padraic/mockery/blob/master/LICENSE New BSD License */ namespace Mockery; class Undefined { /** * Call capturing to merely return this same object. * * @param string $method * @param array $args * @return self */ public function __call($method, array $args) { return $this; } /** * Return a string, avoiding E_RECOVERABLE_ERROR * * @return string */ public function __toString() { return __CLASS__ . ":" . spl_object_hash($this); } }
{ "pile_set_name": "Github" }
package docker import ( "github.com/containers/image/v5/docker/reference" "github.com/containers/image/v5/types" ) // bicTransportScope returns a BICTransportScope appropriate for ref. func bicTransportScope(ref dockerReference) types.BICTransportScope { // Blobs can be reused across the whole registry. return types.BICTransportScope{Opaque: reference.Domain(ref.ref)} } // newBICLocationReference returns a BICLocationReference appropriate for ref. func newBICLocationReference(ref dockerReference) types.BICLocationReference { // Blobs are scoped to repositories (the tag/digest are not necessary to reuse a blob). return types.BICLocationReference{Opaque: ref.ref.Name()} } // parseBICLocationReference returns a repository for encoded lr. func parseBICLocationReference(lr types.BICLocationReference) (reference.Named, error) { return reference.ParseNormalizedNamed(lr.Opaque) }
{ "pile_set_name": "Github" }
// Copyright (c) 2013, Suryandaru Triandana <[email protected]> // All rights reserved. // // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Package capability provides utilities for manipulating POSIX capabilities. package capability type Capabilities interface { // Get check whether a capability present in the given // capabilities set. The 'which' value should be one of EFFECTIVE, // PERMITTED, INHERITABLE or BOUNDING. Get(which CapType, what Cap) bool // Empty check whether all capability bits of the given capabilities // set are zero. The 'which' value should be one of EFFECTIVE, // PERMITTED, INHERITABLE or BOUNDING. Empty(which CapType) bool // Full check whether all capability bits of the given capabilities // set are one. The 'which' value should be one of EFFECTIVE, // PERMITTED, INHERITABLE or BOUNDING. Full(which CapType) bool // Set sets capabilities of the given capabilities sets. The // 'which' value should be one or combination (OR'ed) of EFFECTIVE, // PERMITTED, INHERITABLE or BOUNDING. Set(which CapType, caps ...Cap) // Unset unsets capabilities of the given capabilities sets. The // 'which' value should be one or combination (OR'ed) of EFFECTIVE, // PERMITTED, INHERITABLE or BOUNDING. Unset(which CapType, caps ...Cap) // Fill sets all bits of the given capabilities kind to one. The // 'kind' value should be one or combination (OR'ed) of CAPS or // BOUNDS. Fill(kind CapType) // Clear sets all bits of the given capabilities kind to zero. The // 'kind' value should be one or combination (OR'ed) of CAPS or // BOUNDS. Clear(kind CapType) // String return current capabilities state of the given capabilities // set as string. The 'which' value should be one of EFFECTIVE, // PERMITTED, INHERITABLE or BOUNDING. StringCap(which CapType) string // String return current capabilities state as string. String() string // Load load actual capabilities value. This will overwrite all // outstanding changes. Load() error // Apply apply the capabilities settings, so all changes will take // effect. Apply(kind CapType) error } // NewPid create new initialized Capabilities object for given pid. func NewPid(pid int) (Capabilities, error) { return newPid(pid) } // NewFile create new initialized Capabilities object for given named file. func NewFile(name string) (Capabilities, error) { return newFile(name) }
{ "pile_set_name": "Github" }
'use strict'; const url = require('url'); const got = require('got'); const registryUrl = require('registry-url'); const registryAuthToken = require('registry-auth-token'); const semver = require('semver'); module.exports = (name, opts) => { const scope = name.split('/')[0]; const regUrl = registryUrl(scope); const pkgUrl = url.resolve(regUrl, encodeURIComponent(name).replace(/^%40/, '@')); const authInfo = registryAuthToken(regUrl, {recursive: true}); opts = Object.assign({ version: 'latest' }, opts); const headers = { accept: 'application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*' }; if (opts.fullMetadata) { delete headers.accept; } if (authInfo) { headers.authorization = `${authInfo.type} ${authInfo.token}`; } return got(pkgUrl, {json: true, headers}) .then(res => { let data = res.body; let version = opts.version; if (opts.allVersions) { return data; } if (data['dist-tags'][version]) { data = data.versions[data['dist-tags'][version]]; } else if (version) { if (!data.versions[version]) { const versions = Object.keys(data.versions); version = semver.maxSatisfying(versions, version); if (!version) { throw new Error('Version doesn\'t exist'); } } data = data.versions[version]; if (!data) { throw new Error('Version doesn\'t exist'); } } return data; }) .catch(err => { if (err.statusCode === 404) { throw new Error(`Package \`${name}\` doesn't exist`); } throw err; }); };
{ "pile_set_name": "Github" }
// Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-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/map/map10.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename P0 > struct map1 : m_item< typename P0::first , typename P0::second , map0< > > { typedef map1 type; }; template< typename P0, typename P1 > struct map2 : m_item< typename P1::first , typename P1::second , map1<P0> > { typedef map2 type; }; template< typename P0, typename P1, typename P2 > struct map3 : m_item< typename P2::first , typename P2::second , map2< P0,P1 > > { typedef map3 type; }; template< typename P0, typename P1, typename P2, typename P3 > struct map4 : m_item< typename P3::first , typename P3::second , map3< P0,P1,P2 > > { typedef map4 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 > struct map5 : m_item< typename P4::first , typename P4::second , map4< P0,P1,P2,P3 > > { typedef map5 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5 > struct map6 : m_item< typename P5::first , typename P5::second , map5< P0,P1,P2,P3,P4 > > { typedef map6 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6 > struct map7 : m_item< typename P6::first , typename P6::second , map6< P0,P1,P2,P3,P4,P5 > > { typedef map7 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7 > struct map8 : m_item< typename P7::first , typename P7::second , map7< P0,P1,P2,P3,P4,P5,P6 > > { typedef map8 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8 > struct map9 : m_item< typename P8::first , typename P8::second , map8< P0,P1,P2,P3,P4,P5,P6,P7 > > { typedef map9 type; }; template< typename P0, typename P1, typename P2, typename P3, typename P4 , typename P5, typename P6, typename P7, typename P8, typename P9 > struct map10 : m_item< typename P9::first , typename P9::second , map9< P0,P1,P2,P3,P4,P5,P6,P7,P8 > > { typedef map10 type; }; }}
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <!-- This file is automatically generated by Visual Studio .Net. It is used to store generic object data source configuration information. Renaming the file extension or editing the content of this file may cause the file to be unrecognizable by the program. --> <GenericObjectDataSource DisplayName="GetNextDeparturesWithDetailsResponse" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> <TypeInfo>Huxley.ldbStaffServiceReference.GetNextDeparturesWithDetailsResponse, Service References.ldbStaffServiceReference.Reference.cs.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> </GenericObjectDataSource>
{ "pile_set_name": "Github" }
// Copyright 2020 The Cockroach Authors. // // Use of this software is governed by the Business Source License // included in the file licenses/BSL.txt. // // As of the Change Date specified in that file, in accordance with // the Business Source License, use of this software will be governed // by the Apache License, Version 2.0, included in the file // licenses/APL.txt. package errorutil // TenantSQLDeprecatedWrapper is a helper to annotate uses of components that // are in the progress of being phased out due to work towards multi-tenancy. // It is usually usually used under a layer of abstraction that is aware of // the wrapped object's type. // // Deprecated objects are broadly objects that reach deeply into the KV layer // and which will be inaccessible from a SQL tenant server. Their uses in SQL // fall into two categories: // // - functionality essential for multi-tenancy, i.e. a use which will // have to be removed before we can start SQL tenant servers. // - non-essential functionality, which will be disabled when run in // a SQL tenant server. It may or may not be a long-term goal to remove // this usage; this is determined on a case-by-case basis. // // As work towards multi-tenancy is taking place, semi-dedicated SQL tenant // servers are supported. These are essentially SQL tenant servers that get // to reach into the KV layer as needed while the first category above is // being whittled down. // // This wrapper aids that process by offering two methods corresponding to // the categories above: // // Deprecated() trades in a reference to Github issue (tracking the removal of // an essential usage) for the wrapped object; OptionalErr() returns the wrapped // object only if the wrapper was set up to allow this. // // Note that the wrapped object will in fact always have to be present as long // as calls to Deprecated() exist. However, when running semi-dedicated SQL // tenants, the wrapper should be set up with exposed=false so that it can // pretend that the object is in fact not available. // // Finally, once all Deprecated() calls have been removed, it is possible to // treat the wrapper as a pure option type, i.e. wrap a nil value with // exposed=false. type TenantSQLDeprecatedWrapper struct { v interface{} exposed bool } // MakeTenantSQLDeprecatedWrapper wraps an arbitrary object. When the 'exposed' // parameter is set to true, Optional() will return the object. func MakeTenantSQLDeprecatedWrapper(v interface{}, exposed bool) TenantSQLDeprecatedWrapper { return TenantSQLDeprecatedWrapper{v: v, exposed: exposed} } // Optional returns the wrapped object if it is available (meaning that the // wrapper was set up to make it available). This should be called by // functionality that relies on the wrapped object but can be disabled when this // is desired. // // Optional functionality should be used sparingly as it increases the // maintenance and testing burden. It is preferable to use OptionalErr() // (and return the error) where possible. func (w TenantSQLDeprecatedWrapper) Optional() (interface{}, bool) { if !w.exposed { return nil, false } return w.v, true } // OptionalErr calls Optional and returns an error (referring to the optionally // supplied Github issues) if the wrapped object is not available. func (w TenantSQLDeprecatedWrapper) OptionalErr(issue int) (interface{}, error) { v, ok := w.Optional() if !ok { return nil, UnsupportedWithMultiTenancy(issue) } return v, nil }
{ "pile_set_name": "Github" }
<div class="content-wrapper"> <section class="content-header"> <h1>Kotak Pesan</h1> <ol class="breadcrumb"> <li><a href="<?= site_url('hom_sid')?>"><i class="fa fa-home"></i> Home</a></li> <li class="active">Kotak Pesan</li> </ol> </section> <section class="content" id="maincontent"> <form id="mainform" name="mainform" action="" method="post"> <div class="row"> <?php $this->load->view('mailbox/menu_mailbox') ?> <div class="col-md-9"> <div class="box box-info"> <div class="box-header with-border"> <a href="<?= site_url('mailbox/form') ?>" class="btn btn-social btn-flat btn-success btn-sm visible-xs-block visible-sm-inline-block visible-md-inline-block visible-lg-inline-block" title="Tulis Pesan"><i class="fa fa-plus"></i> Tulis Pesan</a> <a href="#confirm-delete" title="Arsipkan Data" <?php if(!$filter_archived) : ?>onclick="deleteAllBox('mainform','<?=site_url("mailbox/archive_all/$kat/$p/$o")?>')"<?php endif ?> class="btn btn-social btn-flat btn-danger btn-sm visible-xs-block visible-sm-inline-block visible-md-inline-block visible-lg-inline-block hapus-terpilih" <?php $filter_archived and print('disabled') ?>><i class='fa fa-file-archive-o'></i> Arsipkan Data Terpilih</a> <a href="<?= site_url("mailbox/clear/$kat/$p/$o") ?>" class="btn btn-social btn-flat bg-purple btn-sm visible-xs-block visible-sm-inline-block visible-md-inline-block visible-lg-inline-block"><i class="fa fa-refresh"></i>Bersihkan Filter</a> </div> <div class="box-body"> <div class="row"> <div class="col-sm-12"> <div class="dataTables_wrapper form-inline dt-bootstrap no-footer"> <form id="mainform" name="mainform" action="" method="post"> <div class="row"> <div class="col-sm-9"> <div class="form-group"> <select class="form-control input-sm select2-nik-ajax" id="nik" style="width:100%" name="nik" data-url="<?= site_url('mailbox/list_pendaftar_mandiri_ajax')?>" onchange="formAction('mainform', '<?=site_url("mailbox/filter_nik/$kat")?>')"> <?php if ($individu): ?> <option value="<?= $individu['nik']?>" selected><?= $individu['nik'] .' - '.$individu['nama']?></option> <?php else : ?> <option value="0" selected>Semua Pendaftar Layanan Mandiri</option> <?php endif;?> </select> </div> <div class="form-group"> <select class="form-control input-sm " name="status" onchange="formAction('mainform','<?=site_url("mailbox/filter_status/$kat")?>')"> <option value="">Semua</option> <option value="1" <?php if ($filter_status==1): ?>selected<?php endif ?>>Sudah Dibaca</option> <option value="2" <?php if ($filter_status==2): ?>selected<?php endif ?>>Belum Dibaca</option> <option value="3" <?php if ($filter_archived): ?>selected<?php endif ?>>Diarsipkan</option> </select> </div> </div> <div class="col-sm-3"> <div class="box-tools"> <div class="input-group input-group-sm pull-right"> <input name="cari" id="cari" class="form-control" placeholder="Cari..." type="text" value="<?=html_escape($cari)?>" onkeypress="if (event.keyCode == 13):$('#'+'mainform').attr('action','<?=site_url("mailbox/search/$kat")?>');$('#'+'mainform').submit();endif;"> <div class="input-group-btn"> <button type="submit" class="btn btn-default" onclick="$('#'+'mainform').attr('action', '<?=site_url("mailbox/search/$kat")?>');$('#'+'mainform').submit();"><i class="fa fa-search"></i></button> </div> </div> </div> </div> </div> <div class="row"> <div class="col-sm-12"> <div class="table-responsive"> <table class="table table-bordered table-striped dataTable table-hover"> <thead class="bg-gray disabled color-palette"> <tr> <th><input type="checkbox" id="checkall"/></th> <th>No</th> <th>Aksi</th> <?php if ($o==2): ?> <th><a href="<?= site_url("mailbox/index/$kat/$p/1")?>"><?= $owner ?> <i class='fa fa-sort-asc fa-sm'></i></a></th> <?php elseif ($o==1): ?> <th><a href="<?= site_url("mailbox/index/$kat/$p/2")?>"><?= $owner ?> <i class='fa fa-sort-desc fa-sm'></i></a></th> <?php else: ?> <th><a href="<?= site_url("mailbox/index/$kat/$p/1")?>"><?= $owner ?> <i class='fa fa-sort fa-sm'></i></a></th> <?php endif; ?> <?php if ($o==4): ?> <th nowrap><a href="<?= site_url("mailbox/index/$kat/$p/3")?>">NIK <i class='fa fa-sort-asc fa-sm'></i></a></th> <?php elseif ($o==3): ?> <th nowrap><a href="<?= site_url("mailbox/index/$kat/$p/4")?>">NIK <i class='fa fa-sort-desc fa-sm'></i></a></th> <?php else: ?> <th nowrap><a href="<?= site_url("mailbox/index/$kat/$p/3")?>">NIK <i class='fa fa-sort fa-sm'></i></a></th> <?php endif; ?> <th>Subjek Pesan</th> <?php if ($o==8): ?> <th nowrap><a href="<?= site_url("mailbox/index/$kat/$p/7")?>">Status Pesan <i class='fa fa-sort-asc fa-sm'></i></a></th> <?php elseif ($o==7): ?> <th nowrap><a href="<?= site_url("mailbox/index/$kat/$p/8")?>">Status Pesan <i class='fa fa-sort-desc fa-sm'></i></a></th> <?php else: ?> <th nowrap><a href="<?= site_url("mailbox/index/$kat/$p/7")?>">Status Pesan <i class='fa fa-sort fa-sm'></i></a></th> <?php endif; ?> <?php if ($o==10): ?> <th><a href="<?= site_url("mailbox/index/$kat/$p/9")?>">Dikirimkan Pada <i class='fa fa-sort-asc fa-sm'></i></a></th> <?php elseif ($o==9): ?> <th><a href="<?= site_url("mailbox/index/$kat/$p/10")?>">Dikirimkan Pada <i class='fa fa-sort-desc fa-sm'></i></a></th> <?php else: ?> <th><a href="<?= site_url("mailbox/index/$kat/$p/9")?>">Dikirimkan Pada <i class='fa fa-sort fa-sm'></i></a></th> <?php endif; ?> </tr> </thead> <tbody> <?php foreach ($main as $data): ?> <tr <?php if ($data['status']!=1): ?>style='background-color:#ffeeaa;'<?php endif; ?>> <td><input type="checkbox" name="id_cb[]" value="<?=$data['id']?>" /></td> <td><?=$data['no']?></td> <td nowrap> <?php if($data['is_archived'] == 0) : ?> <a href="#" data-href="<?=site_url("mailbox/archive/$kat/$p/$o/$data[id]")?>" class="btn bg-maroon btn-flat btn-sm" title="Arsipkan" data-toggle="modal" data-target="#confirm-delete"><i class="fa fa-file-archive-o"></i></a> <?php endif ?> <a href="<?=site_url("mailbox/baca_pesan/{$kat}/{$data['id']}")?>" class="btn bg-navy btn-flat btn-sm" title="Lihat detail pesan"><i class="fa fa-list">&nbsp;</i></a> <?php if($kat != 2 AND $data['is_archived'] != 1) : ?> <?php if ($data['status'] == 1): ?> <a href="<?=site_url('mailbox/pesan_unread/'.$data['id'])?>" class="btn bg-navy btn-flat btn-sm" title="Tandai sebagai belum dibaca"><i class="fa fa-envelope-o"></i></a> <?php else : ?> <a href="<?=site_url('mailbox/pesan_read/'.$data['id'])?>" class="btn bg-navy btn-flat btn-sm" title="Tandai sebagai sudah dibaca"><i class="fa fa-envelope-open-o"></i></a> <?php endif; ?> <?php endif ?> </td> <td nowrap><?=$data['owner']?></td> <td><?=$data['email']?></td> <td width="40%"><?=$data['subjek']?></td> <td><?=$data['status'] == 1 ? 'Sudah Dibaca' : 'Belum Dibaca' ?></td> <td nowrap><?=tgl_indo2($data['tgl_upload'])?></td> </tr> <?php endforeach; ?> </tbody> </table> </div> </div> </div> </form> <div class="row"> <div class="col-sm-6"> <div class="dataTables_length"> <form id="paging" action="<?= site_url("mailbox/index/$kat")?>" method="post" class="form-horizontal"> <label> Tampilkan <select name="per_page" class="form-control input-sm" onchange="$('#paging').submit()"> <option value="20" <?php selected($per_page, 20); ?> >20</option> <option value="50" <?php selected($per_page, 50); ?> >50</option> <option value="100" <?php selected($per_page, 100); ?> >100</option> </select> Dari <strong><?= $paging->num_rows?></strong> Total Data </label> </form> </div> </div> <div class="col-sm-6"> <div class="dataTables_paginate paging_simple_numbers"> <ul class="pagination"> <?php if ($paging->start_link): ?> <li><a href="<?=site_url("mailbox/index/$kat/$paging->start_link/$o")?>" aria-label="First"><span aria-hidden="true">Awal</span></a></li> <?php endif; ?> <?php if ($paging->prev): ?> <li><a href="<?=site_url("mailbox/index/$kat/$paging->prev/$o")?>" aria-label="Previous"><span aria-hidden="true">&laquo;</span></a></li> <?php endif; ?> <?php for ($i=$paging->start_link;$i<=$paging->end_link;$i++): ?> <li <?=jecho($p, $i, "class='active'")?>><a href="<?= site_url("mailbox/index/$i/$o")?>"><?= $i?></a></li> <?php endfor; ?> <?php if ($paging->next): ?> <li><a href="<?=site_url("mailbox/index/$kat/$paging->next/$o")?>" aria-label="Next"><span aria-hidden="true">&raquo;</span></a></li> <?php endif; ?> <?php if ($paging->end_link): ?> <li><a href="<?=site_url("mailbox/index/$kat/$paging->end_link/$o")?>" aria-label="Last"><span aria-hidden="true">Akhir</span></a></li> <?php endif; ?> </ul> </div> </div> </div> </div> </div> </div> <div class='modal fade' id='confirm-delete' tabindex='-1' role='dialog' aria-labelledby='myModalLabel' aria-hidden='true'> <div class='modal-dialog'> <div class='modal-content'> <div class='modal-header'> <button type='button' class='close' data-dismiss='modal' aria-hidden='true'>&times;</button> <h4 class='modal-title' id='myModalLabel'><i class='fa fa-exclamation-triangle text-red'></i> Konfirmasi</h4> </div> <div class='modal-body btn-info'> Apakah Anda yakin ingin mengarsipkan data ini? </div> <div class='modal-footer'> <button type="button" class="btn btn-social btn-flat btn-warning btn-sm" data-dismiss="modal"><i class='fa fa-sign-out'></i> Tutup</button> <a class='btn-ok'> <button type="button" class="btn btn-social btn-flat btn-danger btn-sm" id="ok-delete"><i class='fa fa-file-archive-o'></i> Arsipkan</button> </a> </div> </div> </div> </div> </div> </div> </div> </div> </form> </section> </div>
{ "pile_set_name": "Github" }
require('../../modules/es6.object.get-own-property-descriptor'); var $Object = require('../../modules/_core').Object; module.exports = function getOwnPropertyDescriptor(it, key) { return $Object.getOwnPropertyDescriptor(it, key); };
{ "pile_set_name": "Github" }
# Add project specific ProGuard rules here. # By default, the flags in this file are appended to flags specified # in D:\Android\sdk/tools/proguard/proguard-android.txt # You can edit the include path and order by changing the proguardFiles # directive in build.gradle. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html # Add any project specific keep options here: # If your project uses WebView with JS, uncomment the following # and specify the fully qualified class name to the JavaScript interface # class: #-keepclassmembers class fqcn.of.javascript.interface.for.webview { # public *; #}
{ "pile_set_name": "Github" }
:030000000219FDE5 :03000B000200AA46 :03002B0002015679 :03005B000202E8B6 :030073000202D5B1 :1000800002030406080C10182030406080040608A3 :100090000C10182030406080A0C00003070F1F0D17 :1000A0000D0403060D0502030202C2AFC0D0C0E07A :1000B000206214E5256009E473E525F4F58AD2622F :1000C000D0E0D0D0D2AF3285268AC262E526F46075 :1000D00029D0E0D0D0C293C295C297D2AF32C2939A :1000E000C295C297206F0C206509740ED5E0FDE51E :1000F0007B4290D0E0D0D0D2AF32758A00C28DD290 :100100006201F301B9306805206502D29301B9306C :100110006805206502D29501B9306805206502D2D4 :100120009701B9C29230680A206507740CD5E0FDCA :10013000D29301B9C29430680A206507740CD5E0E7 :10014000FDD29501B9C29630680A206507740CD5B6 :10015000E0FDD29701B9C2AFC2AD53E6EFC0D0C047 :10016000E0D2D3D2AFC2CEE52A600720744F152A61 :1001700021BD7800790020742EE580307E01F430B6 :10018000E30278FF53DACF207E0343DA20307E0388 :1001900043DA10C2D8C271E580307E01F430E30248 :1001A00079FFC3E89970CB306103752A402074034E :1001B000752A40885CD270E86003755F0020740D7A :1001C000E52B6004152B21CD43DA01C2D820700243 :1001D00021E0A85C206102C27020740221DE882226 :1001E0007882B6040385222420CF0AD0E0D0D04301 :1001F000E610D2AD32C2CF053A7802E52A6005306A :100200007402152AC3E55C94014005755F00412125 :10021000756000756900E55F2401F55F5003755F47 :10022000FF7982B7020D306E1DC3E522943240166D :10023000854C227982B7030E306E0BC3E5229432CF :100240004004798E8722C3E5239522600840041577 :100250002341550523D8CA0569E56970021569D59A :100260006A69756A017808E56B60497805C3E569D4 :10027000956B4057C3E569956C50087801756A0322 :1002800002028FC3E569956D50057801756A01C357 :10029000E5629524401E7982B7040241C0206E14A5 :1002A000852462E569046003856B69756A017523BD :1002B0003C0202CBE5622850057562FF41C0F56241 :1002C000E5620470067560FF7569FFD0E0D0D04329 :1002D000E610D2AD32C2AF53E67F7592FA7593FF46 :1002E000C260759104D2AF32C2AF53E6EFC2ADC067 :1002F000D0C0E0C0F0D2D3D2AFA8FBA9FCC2D830A6 :100300007102614F53DACF207E0343DA10307E034F :1003100043DA20D271E580307E01F420E3026126C9 :1003200088278928A13453DACF207E0343DA20308E :100330007E0343DA10C2D8C271307402A120780063 :10034000E580307E01F430E302A120885CA10853EF :10035000DACF207E0343DA20307E0343DA10C27105 :10036000206102812853DACF207E0343DA10307EE9 :100370000343DA20C2D8D27188578958C3E895550B :10038000F8E99556F97B007E087A00C3E8948CE979 :1003900094005005755B00811A882178A2E6A82197 :1003A0006055C3E894C8E994005008E4D2E4FB7AAD :1003B0000A61F5C3E89468E994015008E4D2E3FBCC :1003C0007A0F61F5C3E894D0E994025008E4D2E2D0 :1003D000FB7A1E61F5C3E894A0E994055008E4D2C5 :1003E000E1FB7A3C61F5C3E89498E994085008E48D :1003F000D2E0FB7A787E00C3E89559FCE9955AFD76 :1004000030E70AECF42401FCEDF43400FD755B00E8 :10041000C3EC9AED9E5003755B018859895A855744 :10042000558558567802A108C3E89527F8E995281C :10043000F9307C0281EC307B0281EC307A0281E57C :10044000207502814BE9FDE8FC816AE9C313F9E8F4 :1004500013F830790281E5E9C313F9E813F830782D :100460000281E5E9C313FDE813FC20612CC3EC9481 :0F0470001CED940240028181ED701EC3EC94C814 :10047F0050180529E52970021529C3E529940A505A :10048F0002A120755C00D270A120E5296002152918 :10049F007400207F037896E624FAFEE43400FFC34D :1004AF00EC9EFCED9FFD50067800790081ECC3ECCB :1004BF0094FFED9400400678FF790081ECEC857293 :1004CF00F0A4C5F0A2F733F87900400302050878CD :1004DF00FF7900020508E9C313F9E813F8307C0E21 :1004EF00E9600278FFC3E81338F8E43400F9C3E891 :1004FF0094FFE99400400278FF885CD2702061027B :10050F00A120741FF4552F4BF52FC274EB7002D23C :10051F0074752A40307403752A0A306102A13420A1 :10052F00740353DAFE207403752B20D0F0D0E0D083 :10053F00D0D2AD43E610327901020564790302058A :10054F0064790A020564791E020564796402056400 :10055F0079C80205647817E4D5E0FDD8FAD9F622F8 :10056F007A147B7802058B7A107B8C02058B7A0DBF :10057F007BB402058B7A0B7BC802058BE573D5E044 :10058F0001227902E4C294D5E0FDD295D5E0FDC2F7 :10059F0095D5E0FDD294D5E0FDE920E002D293306D :1005AF00E002D297E573D5E0FDE920E002C2933077 :1005BF00E002C2977496D5E0FDD9C9EAF8D5E0FDFF :1005CF00D8FBDBB8C29422C37C007D0075F0000518 :1005DF00F0EA33FAEB33FB50F6EB13FBEA13FAC3F3 :1005EF00E9FFE8FEE89AF8E99BF95004EFF9EEF815 :1005FF00B3EC33FCED33FDD5F0DFEDF9ECF822E889 :10060F0089F08A20D2D4F8A9F07B0030F70B7BFF5A :10061F00F42401F8E9F43400F9E88520F0A4ADF0F2 :10062F00F8E98520F0A4AFF0FEED2EF974003FFA43 :10063F007C04C3EA13FAE913F9E813F8DCF48BF03E :10064F0030F70AE8F42401F8E9F43400F9E889F006 :10065F00C2D4F8A9F0227882B60403020704C3E5D6 :10066F005C9419401EE52D54067018206E367805DF :10067F007994E7146007780A1460027812C3E54191 :10068F0098401F306E098564627569FF756A018530 :10069F002224E4F544F545F546F547F548C26E02C8 :1006AF000704D26E7994E7147013E523F43333F90A :1006BF0013F8E9540104F9E854FE0206F8E714149C :1006CF007014E523F4333333F913F8E9540304F9C1 :1006DF00E854FC020700E523F433333333F913F8FE :1006EF00E954070404F9E854F8C39440F8E9940076 :1006FF00F98844894522C3E54113F9E54013F8C34E :10070F00E54498F8E54599F9500CC3E89480E994CD :10071F00FF401602073CC3E8947FE99400500302A0 :10072F00073C787F790002073C788079FF884989F8 :10073F004A22E5492546F8E54A3547F9854A20E436 :10074F00300701F43548FA30E709C3EA94F0401551 :10075F0002077AC3EA940F500302077A78FF79FFF2 :10076F007A0F02077A780079007AF0C3E524956151 :10077F00500AC374019524500B020798E54A20E7ED :10078F000E020798E54A30E706884689478A4822CD :10079F0078A5E6FAC3E54933F8E54A33F9D10EE90E :1007AF0030E70BC3E89480E994FF4013E1D2C3E82C :1007BF00947FE994005002E1D2787F7900E1D278FA :1007CF008079FFE820E715C3E52398F84009C3E8CF :1007DF00940140030207F978010207F9E8F42401B4 :1007EF002523F840030207F978FF884B2278A6E605 :1007FF00FAA847A94812060EE930E70CC3E894019E :10080F00E994FF401602082EC3E894FFE9940050C4 :10081F000302082E78FF790002082E780179FFE98C :10082F0020E715C3E54B98F84009C3E8940140034E :10083F000208557801020855E8F42401254BF840C9 :10084F000302085578FF88242278FF20692879A1B0 :10085F00E76023E541601F74FF8541F0848539F01F :0F086F00306A0375F005A4F8C5F0600278FFC386 :10087E00E895645002A864886322C3E5409440E57D :10088E00419401E5635003140199046002F563225B :10089E007883E6F520120F3675E89012054675E856 :1008AE009030EDFDA8BDA9BE120FDD756E30756FCF :1008BE0000C3740013FD7430606613FC74302CFC9E :1008CE0074003DFDECFAEDFBC3E89AE99B4014E59C :1008DE006E2430F56EE56F3400F56FEA2CFAEB3DC1 :1008EE00FB80E5AE6EAF6FC3E56F13F9E56E13F8DF :1008FE00C3E913F9E813F87A03C3E913F9E813F817 :10090E00DAF7AA201A7009756E00756F0002092EAB :10091E001AEA6008EE28FEEF39FFDAF88E6E8F6F56 :10092E002275E890227883E6FF30EDF9A8BDA9BEC6 :10093E000570C3E57094084052757000E9FA79A00D :10094E00E76044EA7007E571601B020967C3E8952A :10095E00716010E5715006600C140209730460F9A1 :10096E00020973E571F571C394A8401B7561C0C38C :10097E0094054013756180C39405400B756140C3A7 :10098E009405400375610075BB0122EFC3940160AD :10099E001F7430601BC3E894FFE994035012C3E840 :1009AE00956EE9956F5009E561600C15610209C5F8 :1009BE00E561F460020561A861C3E524985002A8C0 :1009CE0024C3E89562400AA862E562F4600385627A :1009DE006188258826E570B4070375BB1E22743224 :1009EE0079A787F0A4C5F0A2F733F8C3E895614064 :1009FE0002A861882288248825882688642275406A :100A0E00007541F022C2AF75C820A8CCA9CDAA3A74 :100A1E0030CF010A75C824D2AFAB3BAC3C883B89C2 :100A2E003CC3E89BF8E99C206908F9306602612412 :100A3E00417EAD3D8A3DF9EA9DFA600678FF79FF69 :100A4E004163AE3EAF3F8B3E8C3FA83BA93CC3E813 :100A5E009EF8E99FF9C3E54113FBE54013FAE82A36 :100A6E00F540E93BF54150067540FF7541FF41CB1E :100A7E00AA40AB41AC40AD417E047F02C3EB94046F :100A8E00400D1E1FC3EB94084005206A021E1FC3B3 :100A9E00ED13FDEC13FCDEF7C3EA9CFAEB9DFBEFC6 :100AAE006009C3E913F9E813F8DFF7EA28FAEB391E :100ABE00FB8A408B4150067BFF8B408B41C3EB94EE :100ACE00025002D2663069047F0341F67892E6FF47 :100ADE00C3E537948240110FC3E53794A040010F50 :100AEE00C3EF940640027F057E02E541C4540FF920 :100AFE00E541C454F0F8E540C4540F28F8C3E89E0D :100B0E00FAE99400FB4009C3EA9402EB9400500406 :100B1E007A02E4FB6170AA40AB41EBC4FEEAC45416 :100B2E000F4EFCC3EA9CFAEB9400FBC3E813C3130D :100B3E00F8EA28FAEB3400FB8A408B41C3EB9402AF :100B4E004002C2667802EBC4FE7B00EAC4540F4E2C :100B5E00FAC3EA98FA4005C3940250027A027892D8 :100B6E00E6FF3060026170855192855293D26043E8 :100B7E00E680C3E49AF8E49BF930660261FCE8FA79 :100B8E00E9FBD3E913FDE813FC88518952C3EF94B6 :100B9E00036038EF20E00DE82CF8E93DF9ECFAEDB2 :100BAE00FB020BC5E828F8E939F9C3E82402F8E995 :100BBE003400F97AFE7BFFC3EF9403400E8A538B09 :100BCE0054884D894E8C4F8D508130885389548A6C :100BDE004D8B4E8C4F8D503069127553F07554FFFE :100BEE00754FF07550FF7551F07552FF8130E8FA70 :100BFE00D3E813FC8851C3EF94036020EF20E00785 :100C0E00E82CF8ECFA811CE8282402F87AFEC3EFEF :100C1E00940340088A53884D8C4F813088538A4DF7 :100C2E008C4FE568C3335002646BF5683060028107 :100C3E003A753402D26043E680E52D54066034A83E :100C4E0040A941C3E913F9E813F8C3E913F9E8130E :100C5E00F8306904E92440F9C2AF53E67F7591007C :0E0C6E00C3E498F594E499F595759104D2606D :100C7C0043E680D2AF22D264754300752000306CFD :100C8C0003752040020CA1D26475430075204030DE :100C9C006C0375200078017901206620E52D54063F :100CAC006002C2647914E541C313700104F8C39463 :100CBC001440027814306904781B791B206010E50D :100CCC0043600C306903D53404D26DA154914205B4 :100CDC0043E59E7005E59B020CE8E59A5440B5206F :100CEC0002A13E30690908C3E89940011881C82067 :100CFC00640A08C3E899400281A181C8C264C2AFEA :100D0C0053E67F7591003066127594007595F875F1 :100D1C009104D26043E680D2AF81A1E5417EFFC34E :100D2C00334005C3334001FEC3E49E759400F59532 :100D3C00A11BC3E5339401500281A130640281A14F :100D4C00D802A15281C8C26DC2AF53E67F75910023 :100D5C00855394855495759104854D92854E93D207 :100D6C006043E680D2AFE52D54066008206A020588 :100D7C0033020D90306D0D206C0A2064071581151F :100D8C008102165E2278003064027801E53775F036 :100D9C0007A4F9E5F028F5F0E9A2F013A2F113A2EB :100DAC00F213F537C394785003753778C3E537954C :100DBC00384008D265C293C295C297306002A1C771 :100DCC00854F92855093D26043E68022207D19C2D4 :100DDC00AF754202C294D292306202D297D2AF75F2 :100DEC009F33759E00020FDAC2AF754202C294D2D5 :100DFC0096306202D293D2AF759F33759E00020F6C :100E0C00DA307243207D20C2AF75420390013475F5 :100E1C007B10C297C296306204D295C12BD294D269 :100E2C00AF759E23020FDAC2AF7542039001347581 :100E3C007B10C293C292306204D295C14BD294D231 :100E4C00AF759E22020FDA207D17C2AF7542039058 :100E5C00010FC297306202D295D2AF759E23020F5A :100E6C00DAC2AF75420390010FC293306202D29581 :100E7C00D2AF759E22020FDA207D16C2AF754204E6 :100E8C00C292D296306202D295D2AF759E22020FD8 :100E9C00DAC2AF754204C296D292306202D295D2B7 :100EAC00AF759E23020FDA307249207D23C2AF75D5 :100EBC004205900123757B04C295C294306204D222 :100ECC0093C1D1D292D2AF759F33759E00020FDAC7 :100EDC00C2AF754205900145757B40C295C29430F6 :100EEC006204D297C1F4D296D2AF759F33759E002F :100EFC00020FDA207D1AC2AF754205900105C2952A :100F0C00306202D293D2AF759F33759E00020FDA16 :100F1C00C2AF754205900119C2953062E8D297D2E2 :100F2C00AF759F33759E00020FDA207D16C2AF7528 :100F3C004206C296D294306202D293D2AF759E23EF :100F4C00020FDAC2AF754206C292D294306202D25C :100F5C0097D2AF759E22020FDA307244207D20C2E8 :100F6C00AF754201900145757B40C293C2923062CD :100F7C0004D297E183D296D2AF759E22020FDAC2C9 :100F8C00AF754201900123757B04C297C296306203 :100F9C0005D293020FA4D292D2AF759E23020FDA20 :100FAC00207D17C2AF754201900119C293306202C5 :100FBC00D297D2AF759E22020FDAC2AF7542019062 :100FCC000105C297306202D293D2AF759E23C265DF :100FDC0022900103757B00C293C295C297C292C244 :100FEC0094C296C26222788076070876070876014A :100FFC000876040876FF0876FF087607087602085C :10100C007601087601788C76010876000876B408AB :10101C0076FF0876FF0876FF0876030876FF0876D9 :10102C00010876FF0876250876D00876780876C809 :10103C000876040876FF08760108760008767A08A8 :10104C0076100876010876010876000876FF087697 :10105C0000227887E6FFC2727888C27DE630E10212 :0E106C00D27DC27E7889E630E102D27EC3EFEB :10107A0094026008758E01D27302108B758E00C2BD :10108A0073227880E6149000809378A5F67881E63A :10109A00149000809378A6F67886E61490008D93D3 :1010AA0078A7F6789FE6F87005756B0001D2C3E859 :1010BA00941140027811E82828F56B256B256B28D6 :1010CA00F56C256B2828F56D7886E6F539C3940208 :1010DA005003753902789CE67538FFB402037538F7 :1010EA00A0B4030375388278A3E61490009A93F5A6 :1010FA0066120FDD22227896E6FA7897E6FB788860 :10110A00E6B40305C3EB940EFB307F047A007BFF41 :10111A00C3EB9AFCC3948250027C827572000572FA :10112A00EC8572F0A4C3E5F0947D40F222D27F31BF :10113A00001205551205557A007B007C1012054BEA :10114A00E55C2AFA74003BFBDCF37C04C3EB13FB7B :10115A00EA13FADCF7FEC27F310022757C00757D46 :10116A0000E5EF20E6037520000520903DFFE5200D :10117A00146006901FFF1460009304600375EF1655 :10118A0053D9BF7581C043FF8012054675EF0643E8 :10119A00B203E5B3240220E70DF521E5B120E0060C :1011AA008521B343B101120FDD7580FF75A4007567 :1011BA00F1FE75D4F775900275A5FC75F2FC75D52C :1011CA000075A0FD75A60275F30275D60075B0FF0D :1011DA0075A70175F4FF75E241120FDDE4F8F6D840 :1011EA00FD756801120FF21216B57898867375307C :1011FA0001C2AF12055F12056F120555120576126C :10120A00055512057D1205551217E812055F1205DC :10121A005F12055AC2AF757C00757D0078FA79FABB :10122A00308307D9FBD8F7021C00115E118C11FF1D :10123A00310078988673120FDD75881075890275EA :10124A00C82475910475D84075A82275B80275E648 :10125A0090759B80759D00759A80759C0075D10E5E :10126A0075BC5875BB0175BA1F75E880120546D260 :10127A00AF12089E75360053DACF207E0343DA2078 :10128A00307E0343DA1043DA01C2D8C27112055F15 :10129A00D2617B037A0CE55B70077A0CDB030212DE :1012AA001E12055520700302121EC270E55CC3941B :1012BA000240E1E52F541F855E5DF55EB55DD5DA26 :1012CA00D5C26153DACF207E0343DA20307E03434E :1012DA00DA10C2D8C27178A2E67008D274E52F5427 :1012EA00E0F52FC27575290012055A307409C3E555 :1012FA0029940A4002D27512054B7802307402789A :10130A0000C3E55C9840F0C2AF12056F12056F1278 :10131A00056FD2AF12055F754C0012054B788CE64B :10132A00C394015003021411E530C394015003021F :10133A001411757CA5757DF1207435C3E55C94FFA5 :10134A005003021411C2AF120584D2AF12055AC358 :10135A00E55C940150EFC2AF12056F1205501205F9 :10136A006FD2AF12055AC3E55C94FF40E902186DCB :10137A007F05D27F310012055AC2AFC27F3100AE5B :10138A005CC3E55C947FD2AF50028121120546C24C :10139A00AF120584D2AFDFDA3137C3EE94057897FE :1013AA00F612055F1217F07F0AD27F310012055A32 :1013BA00C2AFC27F3100AE5CC3E55C947FD2AF504E :1013CA00E6120546C2AF12056F12055012056FD21A :1013DA00AFDFD63137EE24037896F6F87997E7C36C :1013EA0094824003985006E824827897F612055FA3 :1013FA0012170312181F12055A3100C3E55C94FF35 :10140A005002613C02186D757C00757D00C3E55C75 :10141A00954C4003855C4C12055A78017988E7B4EB :10142A0003027805C3E55C9840026124C2AF120545 :10143A0084120584120584D2AF12055F753000E468 :10144A00F531F5320531E531F4703F0532789AE627 :10145A007819146012783214600D787D1460087857 :0D146A00FA146003753200C3E53298401D8E :10147700120FDD120546153275310078998673C251 :10148700AF120584D2AF7898867312055A120550A9 :10149700E52A7005307402411E780120740278062F :1014A700C3E55C9840A112055AE52A700302121E93 :1014B700C2AF120FDDE4F522F523F524F525F52655 :1014C700F567D2AF7885E6C333F565E4F544F545AE :1014D700F546F547F548F570F52CF52DF537757098 :1014E7000875BB1E12054612092F30EDFDA8BDA9D0 :1014F700BEE97001F8887112093375700875BB1E53 :10150700115EC2AF7561FF1209EC85226185226207 :10151700852263D2AF7522017524017525017526D1 :1015270001856069756A017888E6B40307C27D3072 :101537007602D27DD268D269753300120F36120F48 :1015470065120A0C120A13120A0C120A13120A0C59 :10155700120C93120665120D91120DD8120A13126E :101567000C82306E03120705206603120858306696 :1015770003120888120D91120E0D120A13120C9302 :10158700306E03120741120D91120E84120A1312C4 :101597000C82306E0312079F120D91120EB3120ABE :1015A70013120C93306E031207FC120D91120F36B3 :1015B700120A1312092F120C82120D91120F6512C3 :1015C7000933120A1330692C85646185646285606A :1015D70069756A0179187A0CC3E533994009C269BC :1015E700D26A8A350215FBC3E55C940140030215F4 :1015F70057021666306A25206C22E535147006C23C :101607006AD26BA157F535C3E55C94014003021517 :10161700577888E6C394036003021666753600C3DD :10162700E55F94014009856462856069756A0178A0 :10163700FA79A4E760027803C3E55F985021307414 :1016470004E52A601A78F0306C058564617820C358 :10165700E541985002A1570536E55C6002C16975FE :101667003600C2AF120FDD7887E6FE7602115E788C :1016770087EEF6E4F522F523F524F525F526F5653D :10168700752C00752D00D2AF12055A120FDD78A404 :10169700E66006D293D295D297307406E52A700297 :1016A700411E788DE6C39401400261018149901A79 :1016B7000D7820121745E520B4A50CA3121745E5B0 :1016C70020B45A030216E3757CA5757DF1120FF25B :1016D700121703757C00757D00021702901A0378B4 :1016E700807B0A121745A308DBF9901A0F788C7BC9 :1016F70019121745A308DBF9901A2822C2AF12174F :1017070088121765901A00740E12174AA3740912EB :10171700174AA3741512174A901A0378807B0A1286 :101727001749A308DBF9901A0F788C7B1912174910 :10173700A308DBF912179B121779901A2822E49352 :10174700F622E6438F01538FFDFFC3E583941C40C8 :101757000122EF857CB7857DB7F0538FFE22438F3B :1017670002438F01857CB7857DB7901A0DF0538FA3 :10177700FC22901A0D74A5F14A901A0E745AF14A78 :10178700227A3079D07820901A40F145E520F70980 :10179700A3DAF7227A3079D0901A40E7F14A09A301 :1017A700DAF922AB74A875BB01027980BB02027912 :1017B70081BB03027982BB04027994BB050279835A :1017C700BB06027986BB07027992BB08027987BB01 :1017D7000902799CBB0A027988BB0B027989E8F771 :1017E700227C0512055FDCFB22C2AF12056F1205D2 :1017F7007612057D12058412055012056F120576C3 :1018070012057D12058412055012056F1205761216 :10181700057D120584D2AF22C2AF12058412057D61 :1018270012057612056F12055012058412057D12F6 :10183700057612056F12055012058412057D1205F3 :101847007612056FD2AF22AE74AF75C2AF12056FB5 :1018570012056F12056F120550DEF212058412058C :0F18670050DFF8D2AF221217F01217E81217E86D :10187600757401757501757600114E7C05AD5C12A7 :10188600055FC3ED955C70F5C3E55C9401400AC342 :10189600E55C94FF40370218B01217AA121703121C :1018A60017F0C2AF75EF161217E8DCD10576C3E55F :1018B600769403500280C21217E80575E5741490F9 :1018C600009F93F808C3E57598500280A91217E89F :1018D6001217E80574C3E574940C50028095120F34 :0C18E600F2121703C2AF75EF161217E8DC :0319FD000211656F :101A00000E091507070104FFFF07020101A55A018E :101A100000B4FFFFFF03FF01FF25D078C804FF01DA :091A200000FF10010100FF00FFAE :101A4000235467794B4631323041485623202020B9 :101A500023424C48454C4923463331302320202033 :101A60002020202020202020202020202020202076 :101C0000C2AFC2D353D9BF7581C043B20343FF8073 :101C1000752438752503B1DC7529A5752AF175E29F :101C20004043F10853A4F775D4FFD2837DFA7803BB :101C300079E67C10752200752300901DE97B0675FE :101C400024987525013083028145208308D8FBD96B :101C5000F9DCF781B7308308D8FBD9F9DCF781B715 :101C6000B19CE493A3C39A6004DDC381B7DBDBB10D :101C70008E6002812E7B08E493FAA3B16FDBF87AC1 :101C800030B16F752200752300B18EEAFCEBFDC305 :101C9000ED94FE400EB18E8A278B28ED30E0048A49 :101CA000828B83B18E7AC270D8C3ED94FE601950D6 :101CB000CEBD002BEC600F7520007521FF7529004B :101CC000752A000200008100A827A9280809D80465 :101CD000D90281DCB192EA89AAF281CE0D81A3C337 :101CE000ED94035053EDA2E092007AC5C3E58294CF :101CF00000E583941C508A200010438F02438F011B :101D00008529B7852AB7F0300029A827A92808090E :101D1000438F01538FFDD804D902A133C3E58394C7 :101D20001C4003A3A11689AAE28529B7852AB7F02A :101D3000A3A116538FFC817F7AC1BD030CE493A34A :101D4000FAB153DCF8B14B817F8181AA22AB23B178 :101D50006FEBFAEA6222752608C3E52313F523E543 :101D60002213F52250066323A0632201D526EAB18F :101D7000DCB1DC75260AEAF4200102D283300102CC :101D8000C283B1DCC3134002C201D526EB22B1925B :101D9000EAFB208302A192308302A197752608AE48 :101DA00024AF25C3EF13FFEE13FEB1E0B1DCC3EAAD :101DB000133083024480FA30E703632201C3E52332 :101DC00013F523E52213F52250066323A0632201B5 :101DD000D526D9E52265236523F52222AE24AF2539 :101DE0000E0FDEFEDFFCD20122424C48656C6934E6 :071DF000373164F310060116 :00000001FF
{ "pile_set_name": "Github" }
/* * Copyright (C) 2015-2016 Apple Inc. 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 list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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. */ #include "config.h" #include "DFGNodeOrigin.h" #if ENABLE(DFG_JIT) namespace JSC { namespace DFG { void NodeOrigin::dump(PrintStream& out) const { out.print("{semantic: ", semantic, ", forExit: ", forExit, ", exitOK: ", exitOK, ", wasHoisted: ", wasHoisted, "}"); } } } // namespace JSC::DFG #endif // ENABLE(DFG_JIT)
{ "pile_set_name": "Github" }
/* ---------------------------------------------------------------------------- * SAM Software Package License * ---------------------------------------------------------------------------- * Copyright (c) 2012, Atmel Corporation * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following condition is met: * * - Redistributions of source code must retain the above copyright notice, * this list of conditions and the disclaimer below. * * Atmel's name may not be used to endorse or promote products derived from * this software without specific prior written permission. * * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE * DISCLAIMED. IN NO EVENT SHALL ATMEL 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. * ---------------------------------------------------------------------------- */ INCLUDE sam4s8_sram.ld
{ "pile_set_name": "Github" }
{ "culture": "ar", "texts": { "ThisFieldIsRequired": "الحقل مطلوب", "MaxLenghtErrorMessage": "اقصى طول للحقل '{0}' حرف" } }
{ "pile_set_name": "Github" }
package mods.eln.node; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import mods.eln.misc.Direction; import net.minecraft.client.gui.GuiScreen; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.Container; import java.io.DataInputStream; public interface INodeEntity { String getNodeUuid(); void serverPublishUnserialize(DataInputStream stream); void serverPacketUnserialize(DataInputStream stream); @SideOnly(Side.CLIENT) GuiScreen newGuiDraw(Direction side, EntityPlayer player); Container newContainer(Direction side, EntityPlayer player); }
{ "pile_set_name": "Github" }
/* * $Id: TestRequestUtilsPopulate.java 471754 2006-11-06 14:55:09Z husted $ * * 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. */ package org.apache.struts.util; import javax.servlet.ServletException; import junit.framework.Test; import junit.framework.TestSuite; import org.apache.struts.action.ActionMapping; import org.apache.struts.util.RequestUtils; import org.apache.struts.Globals; import org.apache.struts.mock.TestMockBase; import org.apache.struts.mock.MockFormBean; import org.apache.struts.mock.MockMultipartRequestHandler; /** * Unit tests for the RequestUtil's <code>populate</code> method. * * @version $Rev: 471754 $ */ public class TestRequestUtilsPopulate extends TestMockBase { /** * Defines the testcase name for JUnit. * * @param theName the testcase's name. */ public TestRequestUtilsPopulate(String theName) { super(theName); } /** * Start the tests. * * @param theArgs the arguments. Not used */ public static void main(String[] theArgs) { junit.awtui.TestRunner.main( new String[] { TestRequestUtilsPopulate.class.getName()}); } /** * @return a test suite (<code>TestSuite</code>) that includes all methods * starting with "test" */ public static Test suite() { // All methods starting with "test" will be executed in the test suite. return new TestSuite(TestRequestUtilsPopulate.class); } public void setUp() { super.setUp(); } public void tearDown() { super.tearDown(); } /** * Ensure that the getMultipartRequestHandler cannot be seen in * a subclass of ActionForm. * * The purpose of this test is to ensure that Bug #38534 is fixed. * */ public void testMultipartVisibility() throws Exception { String mockMappingName = "mockMapping"; String stringValue = "Test"; MockFormBean mockForm = new MockFormBean(); ActionMapping mapping = new ActionMapping(); mapping.setName(mockMappingName); // Set up the mock HttpServletRequest request.setMethod("POST"); request.setContentType("multipart/form-data"); request.setAttribute(Globals.MULTIPART_KEY, MockMultipartRequestHandler.class.getName()); request.setAttribute(Globals.MAPPING_KEY, mapping); request.addParameter("stringProperty", stringValue); request.addParameter("multipartRequestHandler.mapping.name", "Bad"); // Check the Mapping/ActionForm before assertNull("Multipart Handler already set", mockForm.getMultipartRequestHandler()); assertEquals("Mapping name not set correctly", mockMappingName, mapping.getName()); // Try to populate try { RequestUtils.populate(mockForm, request); } catch(ServletException se) { // Expected BeanUtils.populate() to throw a NestedNullException // which gets wrapped in RequestUtils in a ServletException assertEquals("Unexpected type of Exception thrown", "BeanUtils.populate", se.getMessage()); } // Check the Mapping/ActionForm after assertNotNull("Multipart Handler Missing", mockForm.getMultipartRequestHandler()); assertEquals("Mapping name has been modified", mockMappingName, mapping.getName()); } }
{ "pile_set_name": "Github" }
@model MonitoringWebApp.Models.ChangePasswordViewModel @{ ViewBag.Title = "Change Password"; } <h2>@ViewBag.Title.</h2> @using (Html.BeginForm("ChangePassword", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) { @Html.AntiForgeryToken() <h4>Change Password Form</h4> <hr /> @Html.ValidationSummary("", new { @class = "text-danger" }) <div class="form-group"> @Html.LabelFor(m => m.OldPassword, new { @class = "col-md-2 control-label" }) <div class="col-md-10"> @Html.PasswordFor(m => m.OldPassword, new { @class = "form-control" }) </div> </div> <div class="form-group"> @Html.LabelFor(m => m.NewPassword, new { @class = "col-md-2 control-label" }) <div class="col-md-10"> @Html.PasswordFor(m => m.NewPassword, new { @class = "form-control" }) </div> </div> <div class="form-group"> @Html.LabelFor(m => m.ConfirmPassword, new { @class = "col-md-2 control-label" }) <div class="col-md-10"> @Html.PasswordFor(m => m.ConfirmPassword, new { @class = "form-control" }) </div> </div> <div class="form-group"> <div class="col-md-offset-2 col-md-10"> <input type="submit" value="Change password" class="btn btn-default" /> </div> </div> } @section Scripts { @Scripts.Render("~/bundles/jqueryval") }
{ "pile_set_name": "Github" }
(ns restql.core.statement.resolve-chained-values-test (:require [clojure.test :refer :all] [restql.core.statement.resolve-chained-values :refer [resolve-chained-values]])) (deftest resolve-chained-values-test (testing "Do nothing if theres no with chained" (is (= {:from :resource-name :with {:id 1}} (resolve-chained-values {:from :resource-name :with {:id 1}} {})))) (testing "Returns a statement with :empty-chained as value if done-resource status code is not in 399 >= status >= 200" (is (= {:from :resource-name, :with {:id :empty-chained}} (resolve-chained-values {:from :resource-name :with {:id [:done-resource :id]}} [[:done-resource {:status 422 :body "ERROR"}]]))) (is (= {:from :resource-name :with {:id [:empty-chained 2]}} (resolve-chained-values {:from :resource-name :with {:id [:done-resource :id]}} [[:done-resource [{:status 400 :body "ERROR"} {:body {:id 2}}]]])))) (testing "Returns a statement with single done resource value" (is (= {:from :resource-name :with {:id 1}} (resolve-chained-values {:from :resource-name :with {:id [:done-resource :id]}} [[:done-resource {:body {:id 1}}]]))) (is (= {:from :resource-name :with {:id 1 :name "clojurist"}} (resolve-chained-values {:from :resource-name :with {:id 1 :name [:done-resource :resource-id]}} [[:done-resource {:body {:resource-id "clojurist"}}]]))) (is (= {:from :resource-name :with {:id 1 :name ["clojurist"]}} (resolve-chained-values {:from :resource-name :with {:id 1 :name [:done-resource :resource-id]}} [[:done-resource {:body {:resource-id ["clojurist"]}}]])))) (testing "Returns a statement with multiple done resource value" (is (= {:from :resource-name :with {:id [1 2]}} (resolve-chained-values {:from :resource-name :with {:id [:done-resource :id]}} [[:done-resource [{:body {:id 1}} {:body {:id 2}}]]])))) (testing "Returns a statement with single list value" (is (= {:from :resource-name :with {:id [1 2] :name ["a" "b"]}} (resolve-chained-values {:from :resource-name :with {:id [:done-resource :id] :name ["a" "b"]}} [[:done-resource {:body {:id [1 2]}}]])))) (testing "Returns a statement with single list value" (is (= {:from :resource-name :with {:id [[1 2] [2 3]] :name ["a" "b"]}} (resolve-chained-values {:from :resource-name :with {:id [:done-resource :id] :name ["a" "b"]}} [[:done-resource [{:body {:id [1 2]}} {:body {:id [2 3]}}]]])))) (testing "Returns a statement with multiple list value" (is (= {:from :sidekick :with {:id [[1 2] [3 4]]} :method :get} (resolve-chained-values {:from :sidekick :with {:id [:heroes :sidekickId]} :method :get} [[:heroes {:resource :heroes :body [{:id "A" :sidekickId [1 2]} {:id "B" :sidekickId [3 4]}]}]]))) (is (= {:from :sidekick :with {:id [[[1 2] [3 4]]]} :method :get} (resolve-chained-values {:from :sidekick :with {:id [:heroes :sidekickId]} :method :get} [[:heroes [{:resource :heroes :body [{:id "A" :sidekickId [1 2]} {:id "B" :sidekickId [3 4]}]}]]])))) (testing "Returns a statement with single list value" (is (= {:from :resource-name :with {:id [1 nil] :name ["a" "b"]}} (resolve-chained-values {:from :resource-name :with {:id [:done-resource :id] :name ["a" "b"]}} [[:done-resource [{:body {:id 1 :class "rest"}} {:body {:id nil :class "rest"}}]]])))) (testing "Returns a statement with empty param" (is (= {:from :resource-name :with {:id [1 nil] :name ["a" "b"]}} (resolve-chained-values {:from :resource-name :with {:id [:done-resource :id] :name ["a" "b"]}} [[:done-resource [{:body {:id 1 :class "rest"}} {:body {:class "rest"}}]]])))) (testing "Resolve a statement with lists and nested values" (is (= {:from :done-resource :with {:name ["clojure" "java"]}} (resolve-chained-values {:from :done-resource :with {:name [:resource-id :language :id]}} [[:resource-id {:body {:language {:id ["clojure" "java"]}}}]]))) (is (= {:from :done-resource :with {:name "clojure"}} (resolve-chained-values {:from :done-resource :with {:name [:resource-id :language :id]}} [[:resource-id {:body {:language {:id "clojure"}}}]]))) (is (= {:from :done-resource :with {:name ["clojure"]}} (resolve-chained-values {:from :done-resource :with {:name [:resource-id :language :id]}} [[:resource-id {:body {:language [{:id "clojure"}]}}]]))) (is (= {:from :done-resource :with {:name ["clojure" "java"]}} (resolve-chained-values {:from :done-resource :with {:name [:resource-id :language :id]}} [[:resource-id {:body {:language [{:id "clojure"} {:id "java"}]}}]]))) (is (= {:from :done-resource :with {:name ["python" "elixir"]}} (resolve-chained-values {:from :done-resource :with {:name [:resource-id :language :xpto :id]}} [[:resource-id {:body {:language [{:xpto {:id "python"}} {:xpto {:id "elixir"}}]}}]]))) (is (= {:from :done-resource :with {:name [["python" "123"] ["elixir" "345"]]}} (resolve-chained-values {:from :done-resource :with {:name [:resource-id :language :xpto :id]}} [[:resource-id {:body {:language [{:xpto {:id ["python" "123"]}} {:xpto {:id ["elixir" "345"]}}]}}]]))) (is (= {:from :done-resource :with {:name [["python" "123"] ["elixir" "345"]]}} (resolve-chained-values {:from :done-resource :with {:name [:resource-id :language :xpto :asdf :id]}} [[:resource-id {:body {:language [{:xpto {:asdf [{:id "python"} {:id "123"}]}} {:xpto {:asdf [{:id "elixir"} {:id "345"}]}}]}}]]))) (is (= {:from :weapon, :in :villain.weapons, :with {:id [[["DAGGER"] ["GUN"]] [["SWORD"] ["SHOTGUN"]]]}, :method :get} (resolve-chained-values {:from :weapon, :in :villain.weapons, :with {:id [:villain :weapons]}, :method :get} [[:villain [[{:body {:name "1", :weapons ["DAGGER"]}} {:body {:name "2", :weapons ["GUN"]}}] [{:body {:name "3", :weapons ["SWORD"]}} {:body {:name "4", :weapons ["SHOTGUN"]}}]]]])))) (testing "Resolve with encoder" (is (= (binding [*print-meta* true] (pr-str {:from :resource-name :with {:id ^{:encoder :json} [1 nil] :name ["a" "b"]}})) (binding [*print-meta* true] (pr-str (resolve-chained-values {:from :resource-name :with {:id ^{:encoder :json} [:done-resource :id] :name ["a" "b"]}} [[:done-resource [{:body {:id 1 :class "rest"}} {:body {:class "rest"}}]]])))))) (testing "Resolve with encoder on single return value" (is (= (binding [*print-meta* true] (pr-str {:from :resource-name :with {:id ^{:encoder :json} {} :name ["a" "b"]}})) (binding [*print-meta* true] (pr-str (resolve-chained-values {:from :resource-name :with {:id ^{:encoder :json} [:done-resource :id] :name ["a" "b"]}} [[:done-resource {:body {:id {} :class "rest"}}]])))))) (testing "Returns a statement with chained param inside list" (is (= {:from :resource-name :with {:weapon-class ["melee"]}} (resolve-chained-values {:from :resource-name :with {:weapon-class [:done-resource :heroes :weapons :type :class]}} [[:done-resource {:body {:heroes [{:weapons {:type {:class "melee"}}}]}}]]))) (is (= {:from :resource-name :with {:weapon-class [["melee"]]}} (resolve-chained-values {:from :resource-name :with {:weapon-class [[:done-resource :heroes :weapons :type :class]]}} [[:done-resource {:body {:heroes [{:weapons {:type {:class "melee"}}}]}}]]))) (is (= {:from :resource-name :with {:weapon-class [[]]}} (resolve-chained-values {:from :resource-name :with {:weapon-class [[:done-resource :heroes :weapons :type :class]]}} [[:done-resource {:body {:heroes []}}]]))) (is (= {:from :resource-name :with {:weapon-class [[[]]]}} (resolve-chained-values {:from :resource-name :with {:weapon-class [[[:done-resource :heroes :weapons :type :class]]]}} [[:done-resource {:body {:heroes []}}]])))))
{ "pile_set_name": "Github" }
// Package buffer implements a buffer for serialization, consisting of a chain of []byte-s to // reduce copying and to allow reuse of individual chunks. package buffer import ( "io" "sync" ) // PoolConfig contains configuration for the allocation and reuse strategy. type PoolConfig struct { StartSize int // Minimum chunk size that is allocated. PooledSize int // Minimum chunk size that is reused, reusing chunks too small will result in overhead. MaxSize int // Maximum chunk size that will be allocated. } var config = PoolConfig{ StartSize: 128, PooledSize: 512, MaxSize: 32768, } // Reuse pool: chunk size -> pool. var buffers = map[int]*sync.Pool{} func initBuffers() { for l := config.PooledSize; l <= config.MaxSize; l *= 2 { buffers[l] = new(sync.Pool) } } func init() { initBuffers() } // Init sets up a non-default pooling and allocation strategy. Should be run before serialization is done. func Init(cfg PoolConfig) { config = cfg initBuffers() } // putBuf puts a chunk to reuse pool if it can be reused. func putBuf(buf []byte) { size := cap(buf) if size < config.PooledSize { return } if c := buffers[size]; c != nil { c.Put(buf[:0]) } } // getBuf gets a chunk from reuse pool or creates a new one if reuse failed. func getBuf(size int) []byte { if size < config.PooledSize { return make([]byte, 0, size) } if c := buffers[size]; c != nil { v := c.Get() if v != nil { return v.([]byte) } } return make([]byte, 0, size) } // Buffer is a buffer optimized for serialization without extra copying. type Buffer struct { // Buf is the current chunk that can be used for serialization. Buf []byte toPool []byte bufs [][]byte } // EnsureSpace makes sure that the current chunk contains at least s free bytes, // possibly creating a new chunk. func (b *Buffer) EnsureSpace(s int) { if cap(b.Buf)-len(b.Buf) >= s { return } l := len(b.Buf) if l > 0 { if cap(b.toPool) != cap(b.Buf) { // Chunk was reallocated, toPool can be pooled. putBuf(b.toPool) } if cap(b.bufs) == 0 { b.bufs = make([][]byte, 0, 8) } b.bufs = append(b.bufs, b.Buf) l = cap(b.toPool) * 2 } else { l = config.StartSize } if l > config.MaxSize { l = config.MaxSize } b.Buf = getBuf(l) b.toPool = b.Buf } // AppendByte appends a single byte to buffer. func (b *Buffer) AppendByte(data byte) { if cap(b.Buf) == len(b.Buf) { // EnsureSpace won't be inlined. b.EnsureSpace(1) } b.Buf = append(b.Buf, data) } // AppendBytes appends a byte slice to buffer. func (b *Buffer) AppendBytes(data []byte) { for len(data) > 0 { if cap(b.Buf) == len(b.Buf) { // EnsureSpace won't be inlined. b.EnsureSpace(1) } sz := cap(b.Buf) - len(b.Buf) if sz > len(data) { sz = len(data) } b.Buf = append(b.Buf, data[:sz]...) data = data[sz:] } } // AppendBytes appends a string to buffer. func (b *Buffer) AppendString(data string) { for len(data) > 0 { if cap(b.Buf) == len(b.Buf) { // EnsureSpace won't be inlined. b.EnsureSpace(1) } sz := cap(b.Buf) - len(b.Buf) if sz > len(data) { sz = len(data) } b.Buf = append(b.Buf, data[:sz]...) data = data[sz:] } } // Size computes the size of a buffer by adding sizes of every chunk. func (b *Buffer) Size() int { size := len(b.Buf) for _, buf := range b.bufs { size += len(buf) } return size } // DumpTo outputs the contents of a buffer to a writer and resets the buffer. func (b *Buffer) DumpTo(w io.Writer) (written int, err error) { var n int for _, buf := range b.bufs { if err == nil { n, err = w.Write(buf) written += n } putBuf(buf) } if err == nil { n, err = w.Write(b.Buf) written += n } putBuf(b.toPool) b.bufs = nil b.Buf = nil b.toPool = nil return } // BuildBytes creates a single byte slice with all the contents of the buffer. Data is // copied if it does not fit in a single chunk. func (b *Buffer) BuildBytes() []byte { if len(b.bufs) == 0 { ret := b.Buf b.toPool = nil b.Buf = nil return ret } ret := make([]byte, 0, b.Size()) for _, buf := range b.bufs { ret = append(ret, buf...) putBuf(buf) } ret = append(ret, b.Buf...) putBuf(b.toPool) b.bufs = nil b.toPool = nil b.Buf = nil return ret }
{ "pile_set_name": "Github" }
using Models.Produce.NH; using NHibernate; using NHibernate.Cfg; namespace Sample_WebApi.Controllers { public static class ProduceNHConfig { private static Configuration _configuration; private static ISessionFactory _sessionFactory; static ProduceNHConfig() { var modelAssembly = typeof(ItemOfProduce).Assembly; // Configure NHibernate _configuration = new Configuration(); _configuration.Configure(); //configure from the app.config _configuration.SetProperty("connection.connection_string_name", "ProduceTPHConnection"); _configuration.AddAssembly(modelAssembly); // mapping is in this assembly _sessionFactory = _configuration.BuildSessionFactory(); } public static Configuration Configuration { get { return _configuration; } } public static ISessionFactory SessionFactory { get { return _sessionFactory; } } public static ISession OpenSession() { ISession session = _sessionFactory.OpenSession(); return session; } } }
{ "pile_set_name": "Github" }
/* * Copyright 2016 Crown Copyright * * 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 stroom.explorer.client.event; import com.google.gwt.event.shared.EventHandler; import com.google.gwt.event.shared.GwtEvent; import com.google.gwt.event.shared.HasHandlers; import com.gwtplatform.mvp.client.Layer; import stroom.widget.tab.client.presenter.TabData; public class OpenExplorerTabEvent extends GwtEvent<OpenExplorerTabEvent.Handler> { private static Type<Handler> TYPE; private final TabData tabData; private final Layer layer; private OpenExplorerTabEvent(final TabData tabData, final Layer layer) { this.tabData = tabData; this.layer = layer; } public static void fire(final HasHandlers handlers, final TabData tabData, final Layer layer) { handlers.fireEvent(new OpenExplorerTabEvent(tabData, layer)); } public static Type<Handler> getType() { if (TYPE == null) { TYPE = new Type<>(); } return TYPE; } @Override public Type<Handler> getAssociatedType() { return getType(); } @Override protected void dispatch(final Handler handler) { handler.onOpen(this); } public TabData getTabData() { return tabData; } public Layer getLayer() { return layer; } public interface Handler extends EventHandler { void onOpen(OpenExplorerTabEvent event); } }
{ "pile_set_name": "Github" }
#!/home/architect/.virtualenvs/asciivmssconsole3/bin/python3.6 import os import sys import platform our_version = "python" + str(sys.version_info.major) + "." + str(sys.version_info.minor) our_abs_path = os.path.dirname(os.path.abspath(__file__)) #Linux or Windows? oursystem = platform.system(); if (oursystem == "Linux"): program_prefix = "bin"; program_suffix = "lib/" + our_version + "/site-packages/asciivmssdashboard/console.py" python_path = our_abs_path + "/python" + str(sys.version_info.major) + " " else: program_prefix = "Scripts"; program_suffix = "lib/" + "site-packages/asciivmssdashboard/console.py" python_path = our_abs_path.replace("Scripts", "\python.exe ") #Ok, now we have our packages full path. Or should... our_abs_final_path = our_abs_path.replace(program_prefix, program_suffix) #We got some difficulties with Python installation files on Ubuntu... #Python Binary first... if os.path.exists(python_path[:-1]): print("-> Python installation seems OK...") else: print(python_path) print("--> Seems like the Python installation path: " + python_path + "is broken, trying an alternative path...") python_path = python_path.replace("local/", "") #Now our package files... if os.path.exists(our_abs_final_path): print("-> Our Python package installation seems OK...") else: print("--> Seems like our package installation path: " + our_abs_final_path + " is broken, trying an alternative path...") our_abs_final_path = our_abs_final_path.replace("site-packages", "dist-packages") dash_script = python_path + our_abs_final_path #Well, now we have a good guess where our script is installed... print("Executing: " + dash_script) print("Wait a second...") os.system(dash_script)
{ "pile_set_name": "Github" }
// Copyright 2009 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 !gccgo #include "textflag.h" // // System call support for AMD64, OpenBSD // // Just jump to package syscall's implementation for all these functions. // The runtime may know about them. TEXT ·Syscall(SB),NOSPLIT,$0-56 JMP syscall·Syscall(SB) TEXT ·Syscall6(SB),NOSPLIT,$0-80 JMP syscall·Syscall6(SB) TEXT ·Syscall9(SB),NOSPLIT,$0-104 JMP syscall·Syscall9(SB) TEXT ·RawSyscall(SB),NOSPLIT,$0-56 JMP syscall·RawSyscall(SB) TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 JMP syscall·RawSyscall6(SB)
{ "pile_set_name": "Github" }
#ifndef BOOST_MPL_RATIONAL_C_HPP_INCLUDED #define BOOST_MPL_RATIONAL_C_HPP_INCLUDED // 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) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #include <boost/mpl/aux_/config/static_constant.hpp> namespace boost { namespace mpl { template< typename IntegerType , IntegerType N , IntegerType D = 1 > struct rational_c { BOOST_STATIC_CONSTANT(IntegerType, numerator = N); BOOST_STATIC_CONSTANT(IntegerType, denominator = D); typedef rational_c<IntegerType,N,D> type; rational_c() {} }; }} #endif // BOOST_MPL_RATIONAL_C_HPP_INCLUDED
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html lang="en"> <head> <link href="/css/video-js.css" rel="stylesheet"> <!-- If you'd like to support IE8 --> <script src="/js/videojs-ie8.min.js"></script> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-108121762-1"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-108121762-1'); </script> <title>Star Wars: The Clone Wars (2008 - 2015) Full Episodes | ItSaturday.com</title> <meta charset="utf-8"> <link rel="stylesheet" href="/css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="/css/main.css"> <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"> <link rel="stylesheet" type="text/css" href="/css/bootcomplete.css"> <script src="/js/jquery.min.js"></script> <script src="/js/jquery-ui-1.12.1.custom/jquery-ui.min.js"></script> <script src="/js/Lettering.js-master/jquery.lettering.js"></script> <script src="/js/jquery_lazyload.js" type="text/javascript"></script> <script src="https://npmcdn.com/[email protected]/dist/js/tether.min.js"></script> <script src="/js/bootstrap.min.js"></script> <script src="/js/EasyAutocomplete-1.3.5/jquery.easy-autocomplete.js"></script> <link rel="stylesheet" href="/js/EasyAutocomplete-1.3.5/easy-autocomplete.min.css"> <meta name="keywords" content=""/> <meta property="og:title" content="Star Wars: The Clone Wars (2008 - 2015) Full Episodes"/> <meta property="og:description" content=""/> <meta property="og:type" content=""/> <meta property="og:url" content="http://www.itsaturday.com/Star-Wars-The-Clone-Wars-S6-Ep13---Sacrifice.html"/> <meta property="og:image" content="http://www.itsaturday.com/images/seriesImages/2023/Star-Wars-The-Clone-Wars-2008--2015-Full-Episodes.jpg"/> <meta property="og:site_name" content="http://www.itsaturday.com"/> <meta name="twitter:card" content="summary"> <meta name="twitter:site" content="@"> <meta name="twitter:url" content="http://www.itsaturday.com/Star-Wars-The-Clone-Wars-S6-Ep13---Sacrifice.html"> <meta name="twitter:title" content="Star Wars: The Clone Wars (2008 - 2015) Full Episodes"> <meta name="twitter:description" content=""> <meta name="twitter:image" content="http://www.itsaturday.com/images/seriesImages/2023/Star-Wars-The-Clone-Wars-2008--2015-Full-Episodes.jpg"> <meta property="fb:app_id" content="?"/> <meta name="verify-v1" content="?"/> <meta itemprop="url" content="http://www.itsaturday.com/Star-Wars-The-Clone-Wars-S6-Ep13---Sacrifice.html"/> <link rel="image_src" href="http://www.itsaturday.com/images/seriesImages/2023/Star-Wars-The-Clone-Wars-2008--2015-Full-Episodes.jpg"/> <link rel="videothumbnail" href="http://www.itsaturday.com/images/seriesImages/2023/Star-Wars-The-Clone-Wars-2008--2015-Full-Episodes.jpg" type="image/jpeg"/> <script> $("document").ready(function () { lazyload(); }); </script> </head> <body> <div class="header container"> <div class="row hundred"> <div class="float-left" style="width: 240px; margin-left: 20px;"> <h1 class="h1" id="toggle" id="logo"> <h1 id="logo"> <a href="/" class="link-unstyled"> <span class="char1">I</span><span class="char2">t</span><span class="char3 spacer-char">S</span><span class="char4">a</span><span class="char5">t</span><span class="char6">u</span><span class="char7">r</span><span class="char8">d</span><span class="char9">a</span><span class="char3">y</span><span class="char2">!</span> </a> </h1> </h1> </div> <form action="/search/" method="get"><div class="float-left row" style="margin-top: 15px;" > <div class="searchboxwrapper col-12" > <input id="search-input" type="text" class="searchbox rounded" style="" placeholder="Series, Episode, Year..." autocomplete="off" name="q"/> <input class="searchsubmit rounded" type="submit" id="searchsubmit" value=""> </div> </form> </div> </div> </div> <script> </script> <script> $(document).ready(function () { var options = { url: function(phrase) { return "_search.php?q=" + phrase + "&format=json"; }, getValue: "text", template: { type: "links", fields: { link: "website-link" } }, ajaxSettings: { dataType: "json", method: "POST", data: { dataType: "json" } }, preparePostData: function (data) { data.phrase = $("#search-input").val(); return data; }, requestDelay: 400 }; $("#search-input").easyAutocomplete(options); $('input.typeahead').typeahead(options); $("#demo1 h1").lettering(); $("#demo2 h1").lettering('words'); $("#demo3 p").lettering('lines'); $("#demo4 h1").lettering('words').children("span").lettering(); $("#demo5 h1").lettering().children("span").css({ 'display': 'inline-block', '-webkit-transform': 'rotate(-25deg)' }); }); </script> <script> $('#toggle').click(function () { $("#toggle").effect("shake"); $('#toggle').wiggle({ waggle: 5, // amount of wiggle duration: 2, // how long to wiggle (in seconds) interval: 200, // how often to waggle (in milliseconds) wiggleCallback: function (elem) { // callback whenever the element is wiggled } }); }); </script> <div class="sidebar col-3 rounded-bottom"> <h1 class="h3">Star Wars: The Clone Wars </h1> <div class="list-group"><div class="bg-success rounded highlight"><span class="link-unstyled"><i class="fa fa-play-circle fa-fw"></i>S1 Ep1 &#8211; Ambush</span></div><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S1-Ep2---Rising-Malevolence.html">S1 Ep2 &#8211; Rising Malevolence</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S1-Ep3---Shadow-of-Malevolence.html">S1 Ep3 &#8211; Shadow of Malevolence</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S1-Ep4---Destroy-Malevolence.html">S1 Ep4 &#8211; Destroy Malevolence</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S1-Ep5---Rookies.html">S1 Ep5 &#8211; Rookies</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S1-Ep6---Downfall-of-a-Droid.html">S1 Ep6 &#8211; Downfall of a Droid</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S1-Ep7---Duel-of-the-Droids.html">S1 Ep7 &#8211; Duel of the Droids</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S1-Ep8---Bombad-Jedi.html">S1 Ep8 &#8211; Bombad Jedi</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S1-Ep9---Cloak-of-Darkness.html">S1 Ep9 &#8211; Cloak of Darkness</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S1-Ep10---The-Lair-of-General-Grievous.html">S1 Ep10 &#8211; The Lair of General Grievous</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S1-Ep11---Dooku-Captured.html">S1 Ep11 &#8211; Dooku Captured</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S1-Ep12---The-Gungan-General.html">S1 Ep12 &#8211; The Gungan General</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S1-Ep13---Jedi-Crash.html">S1 Ep13 &#8211; Jedi Crash</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S1-Ep14---Defenders-of-Peace.html">S1 Ep14 &#8211; Defenders of Peace</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S1-Ep15---Trespass.html">S1 Ep15 &#8211; Trespass</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S1-Ep16---The-Hidden-Enemy.html">S1 Ep16 &#8211; The Hidden Enemy</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S1-Ep17---Blue-Shadow-Virus.html">S1 Ep17 &#8211; Blue Shadow Virus</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S1-Ep18---Mystery-of-a-Thousand-Moons.html">S1 Ep18 &#8211; Mystery of a Thousand Moons</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S1-Ep19---Storm-Over-Ryloth.html">S1 Ep19 &#8211; Storm Over Ryloth</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S1-Ep20---Innocents-of-Ryloth.html">S1 Ep20 &#8211; Innocents of Ryloth</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S1-Ep21---Liberty-on-Ryloth.html">S1 Ep21 &#8211; Liberty on Ryloth</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S1-Ep22---Hostage-Crisis.html">S1 Ep22 &#8211; Hostage Crisis</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S2-Ep1-2---Holocron-Heist--Cargo-of-Doom.html">S2 Ep1-2 &#8211; Holocron Heist ~ Cargo of Doom</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S2-Ep3---Children-of-the-Force.html">S2 Ep3 &#8211; Children of the Force</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S2-Ep4---Senate-Spy.html">S2 Ep4 &#8211; Senate Spy</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S2-Ep5---Landing-at-Point-Rain.html">S2 Ep5 &#8211; Landing at Point Rain</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S2-Ep6---Weapons-Factory.html">S2 Ep6 &#8211; Weapons Factory</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S2-Ep7---Legacy-of-Terror.html">S2 Ep7 &#8211; Legacy of Terror</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S2-Ep8---Brain-Invaders.html">S2 Ep8 &#8211; Brain Invaders</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S2-Ep9-10---Grievous-Intrigue--The-Deserter.html">S2 Ep9-10 &#8211; Grievous Intrigue ~ The Deserter</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S2-Ep11---Lightsaber-Lost.html">S2 Ep11 &#8211; Lightsaber Lost</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S2-Ep12---The-Mandalore-Plot.html">S2 Ep12 &#8211; The Mandalore Plot</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S2-Ep13---Voyage-of-Temptation.html">S2 Ep13 &#8211; Voyage of Temptation</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S2-Ep14---Duchess-of-Mandalore.html">S2 Ep14 &#8211; Duchess of Mandalore</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S2-Ep15---Senate-Murders.html">S2 Ep15 &#8211; Senate Murders</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S2-Ep16---Cat-and-Mouse.html">S2 Ep16 &#8211; Cat and Mouse</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S2-Ep17---Bounty-Hunters.html">S2 Ep17 &#8211; Bounty Hunters</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S2-Ep18---The-Zillo-Beast.html">S2 Ep18 &#8211; The Zillo Beast</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S2-Ep19---The-Zillo-Beast-Strikes-Back.html">S2 Ep19 &#8211; The Zillo Beast Strikes Back</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S2-Ep20---Death-Trap.html">S2 Ep20 &#8211; Death Trap</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S2-Ep21-22---R2-Come-Home--Lethal-Trackdown.html">S2 Ep21-22 &#8211; R2 Come Home ~ Lethal Trackdown</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S3-Ep1-2---Clone-Cadets---ARC-Troopers.html">S3 Ep1-2 &#8211; Clone Cadets ~ ARC Troopers</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S3-Ep3---Supply-Lines.html">S3 Ep3 &#8211; Supply Lines</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S3-Ep4---Sphere-of-Influence.html">S3 Ep4 &#8211; Sphere of Influence</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S3-Ep5---Corruption.html">S3 Ep5 &#8211; Corruption</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S3-Ep6---The-Academy.html">S3 Ep6 &#8211; The Academy</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S3-Ep7---Assassin.html">S3 Ep7 &#8211; Assassin</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S3-Ep8---Evil-Plans.html">S3 Ep8 &#8211; Evil Plans</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S3-Ep9---Hunt-for-Ziro.html">S3 Ep9 &#8211; Hunt for Ziro</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S3-Ep10---Heroes-on-Both-Sides.html">S3 Ep10 &#8211; Heroes on Both Sides</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S3-Ep11---Pursuit-of-Peace.html">S3 Ep11 &#8211; Pursuit of Peace</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S3-Ep12---Nightsisters.html">S3 Ep12 &#8211; Nightsisters</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S3-Ep13---Monster.html">S3 Ep13 &#8211; Monster</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S3-Ep14---Witches-of-the-Mist.html">S3 Ep14 &#8211; Witches of the Mist</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S3-Ep15---Overlords.html">S3 Ep15 &#8211; Overlords</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S3-Ep16---Altar-of-Mortis.html">S3 Ep16 &#8211; Altar of Mortis</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S3-Ep17---Ghosts-of-Mortis.html">S3 Ep17 &#8211; Ghosts of Mortis</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S3-Ep18---The-Citadel.html">S3 Ep18 &#8211; The Citadel</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S3-Ep19---Counter-Attack.html">S3 Ep19 &#8211; Counter Attack</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S3-Ep20---Citadel-Rescue.html">S3 Ep20 &#8211; Citadel Rescue</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S3-Ep21---Padawan-Lost.html">S3 Ep21 &#8211; Padawan Lost</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S3-Ep22---Wookiee-Hunt.html">S3 Ep22 &#8211; Wookiee Hunt</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S4-Ep1-2---Water-War--Gungan-Attack.html">S4 Ep1-2 &#8211; Water War ~ Gungan Attack</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S4-Ep3---Prisoners.html">S4 Ep3 &#8211; Prisoners</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S4-Ep4---Shadow-Warrior.html">S4 Ep4 &#8211; Shadow Warrior</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S4-Ep5---Mercy-Mission.html">S4 Ep5 &#8211; Mercy Mission</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S4-Ep6---Nomad-Droids.html">S4 Ep6 &#8211; Nomad Droids</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S4-Ep7---Darkness-on-Umbara.html">S4 Ep7 &#8211; Darkness on Umbara</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S4-Ep8---The-General.html">S4 Ep8 &#8211; The General</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S4-Ep9---Plan-of-Dissent.html">S4 Ep9 &#8211; Plan of Dissent</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S4-Ep10---Carnage-of-Krell.html">S4 Ep10 &#8211; Carnage of Krell</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S4-Ep11---Kidnapped.html">S4 Ep11 &#8211; Kidnapped</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S4-Ep12---Slaves-of-the-Republic.html">S4 Ep12 &#8211; Slaves of the Republic</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S4-Ep13---Escape-from-Kadavo.html">S4 Ep13 &#8211; Escape from Kadavo</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S4-Ep14---A-Friend-in-Need.html">S4 Ep14 &#8211; A Friend in Need</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S4-Ep15---Deception.html">S4 Ep15 &#8211; Deception</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S4-Ep16---Friends-and-Enemies.html">S4 Ep16 &#8211; Friends and Enemies</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S4-Ep17---The-Box.html">S4 Ep17 &#8211; The Box</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S4-Ep18---Crisis-on-Naboo.html">S4 Ep18 &#8211; Crisis on Naboo</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S4-Ep19---Massacre.html">S4 Ep19 &#8211; Massacre</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S4-Ep20---Bounty.html">S4 Ep20 &#8211; Bounty</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S4-Ep21---Brothers.html">S4 Ep21 &#8211; Brothers</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S4-Ep22---Revenge.html">S4 Ep22 &#8211; Revenge</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S5-Ep1---Revival.html">S5 Ep1 &#8211; Revival</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S5-Ep2---A-War-on-Two-Fronts.html">S5 Ep2 &#8211; A War on Two Fronts</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S5-Ep3---Front-Runners.html">S5 Ep3 &#8211; Front Runners</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S5-Ep4---The-Soft-War.html">S5 Ep4 &#8211; The Soft War</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S5-Ep5---Tipping-Points.html">S5 Ep5 &#8211; Tipping Points</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S5-Ep6---The-Gathering.html">S5 Ep6 &#8211; The Gathering</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S5-Ep7---A-Test-of-Strength.html">S5 Ep7 &#8211; A Test of Strength</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S5-Ep8---Bound-for-Rescue.html">S5 Ep8 &#8211; Bound for Rescue</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S5-Ep9---A-Necessary-Bond.html">S5 Ep9 &#8211; A Necessary Bond</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S5-Ep10---Secret-Weapons.html">S5 Ep10 &#8211; Secret Weapons</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S5-Ep11---A-Sunny-Day-in-the-Void.html">S5 Ep11 &#8211; A Sunny Day in the Void</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S5-Ep12---Missing-in-Action.html">S5 Ep12 &#8211; Missing in Action</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S5-Ep13---Point-of-No-Return.html">S5 Ep13 &#8211; Point of No Return</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S5-Ep14---Eminence.html">S5 Ep14 &#8211; Eminence</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S5-Ep15---Shades-of-Reason.html">S5 Ep15 &#8211; Shades of Reason</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S5-Ep16---The-Lawless.html">S5 Ep16 &#8211; The Lawless</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S5-Ep17---Sabotage.html">S5 Ep17 &#8211; Sabotage</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S5-Ep18---The-Jedi-Who-Knew-Too-Much.html">S5 Ep18 &#8211; The Jedi Who Knew Too Much</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S5-Ep19---To-Catch-a-Jedi.html">S5 Ep19 &#8211; To Catch a Jedi</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S5-Ep20---The-Wrong-Jedi.html">S5 Ep20 &#8211; The Wrong Jedi</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S6-Ep1---The-Unknown.html">S6 Ep1 &#8211; The Unknown</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S6-Ep2---Conspiracy.html">S6 Ep2 &#8211; Conspiracy</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S6-Ep3---Fugitive.html">S6 Ep3 &#8211; Fugitive</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S6-Ep4---Orders.html">S6 Ep4 &#8211; Orders</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S6-Ep5---An-Old-Friend.html">S6 Ep5 &#8211; An Old Friend</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S6-Ep6---The-Rise-of-Clovis.html">S6 Ep6 &#8211; The Rise of Clovis</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S6-Ep7---Crisis-at-the-Heart.html">S6 Ep7 &#8211; Crisis at the Heart</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S6-Ep8---The-Disappeared-Part-1.html">S6 Ep8 &#8211; The Disappeared: Part 1</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S6-Ep9---The-Disappeared-Part-2.html">S6 Ep9 &#8211; The Disappeared: Part 2</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S6-Ep10---The-Lost-One.html">S6 Ep10 &#8211; The Lost One</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S6-Ep11---Voices.html">S6 Ep11 &#8211; Voices</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S6-Ep12---Destiny.html">S6 Ep12 &#8211; Destiny</a><div class="half-rule"></div><a class="link-group-item list-group-item-padding text-white" href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S6-Ep13---Sacrifice.html">S6 Ep13 &#8211; Sacrifice</a><div class="half-rule"></div><a target='_blank' href=https://www.fastemoji.com/>😂 😍 ❤ 😀 😎 🎉 😊 👍 💩 👩 👩‍🔬 😕 🌸 🐝 🐶 🤦🏽‍♀️ 😻 😸 😺 😹 ☕ 🍕 🍷 ❤️💜 💦 🤷🏽 💻 📆 🔥</a> </div> </div> <header><div><div class="float-right"> &nbsp;<span class="enter-fullscreen black-bg text-white highlight rounded-bottom h6" role="button">fullscreen <i class="fa fa-expand"></i></span> &nbsp;<a href="/Star-Wars-The-Clone-Wars-2008---2015-Full-Episodes/Star-Wars-The-Clone-Wars-S1-Ep2---Rising-Malevolence.html" class="black-bg text-white highlight rounded-bottom h6">next episode <i class="fa fa-chevron-circle-right"></i></a></div> </div><div style="margin-left: 10px;"><h1 class="h3 bold">&nbsp; Star Wars: The Clone Wars S1 Ep1 &#8211; Ambush</h1></div><div style="padding-left: 10px;"> &nbsp; &nbsp;<a href="https://www.cool90s.com/advanced_search_result.php?keywords=Star+Wars%3A+The+Clone+Wars+&search_in_description=1&x=0&y=0" target="_blank"><img src="/images/dvd-icon.png" height="16"> Get on high quality DVD for yourself or as a gift</a></div><div style="padding-left: 10px;"> &nbsp; &nbsp;🌸 <a href="https://www.fastemoji.com" target="_blank">Get the latest emojis in 1-Click copy-paste</a></div> </header> <div class="row"> <div class="col-9 float-right"> <video id="my-video" class="video-js" controls autoplay preload="auto" style="width: 100%" poster="http://www.itsaturday.com/images/seriesImages/2023/Star-Wars-The-Clone-Wars-2008--2015-Full-Episodes.jpg.jpg" data-setup="{}"> <source src="/watch.php?url=https://2.bp.blogspot.com/hjnLR8T4GAG_QcNcpn71AUsBENDpqwAoH5vAJLU3_-AHUu16V_PArdw1sWS1obYg_y0MExXc1UCOqn01_-jPUaYzTWkGIjYHmu_5qat8uORB1nUnsgJI_r5bTTrvN5K1DhOTvNjb=m18&extra=.mp4" type='video/mp4'> <p class="vjs-no-js"> To view this video please enable JavaScript, and consider upgrading to a web browser that <a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a> </p> </video> <script type="text/javascript"> $('.enter-fullscreen').click(function(e) { e.preventDefault(); $('.vjs-play-control').click(); $('.vjs-fullscreen-control').click(); }); </script> <script src="/js/video.js"></script> <blockquote class="blockquote bg-faded"> <img class="img-fluid img-thumbnail rounded-circle float-right col-6 col-md-4 col-lg-3" src="/images/seriesImages/2023/Star-Wars-The-Clone-Wars-2008--2015-Full-Episodes.jpg"> <strong>Star Wars: The Clone Wars</strong> (2008 &#8211; 2015) full episodes watch cartoons online.<br /> Synopsis: The first weekly TV series from Lucasfilm Animation chronicles the adventures of Anakin Skywalker, Yoda, Obi-Wan Kenobi and other popular characters from the &#8220;Star Wars&#8221; universe during the violent Clone Wars, as dwindling numbers of Jedi knights struggle to restore peace.<br /> Creator: George Lucas<br /> Stars: Tom Kane, Dee Bradley Baker, Matt Lanter<br /> More information: <a href="http://www.imdb.com/title/tt0458290/?ref_=ttep_ep_tt" target="_blank">IMDB</a>, <a href="https://en.wikipedia.org/wiki/Star_Wars:_The_Clone_Wars_(2008_TV_series)" target="_blank">Wikipedia</a></p> </blockquote> <!-- Composite Start --> <div id="M285456ScriptRootC169701"> <div id="M285456PreloadC169701"> </div> <script> (function(){ var D=new Date(),d=document,b='body',ce='createElement',ac='appendChild',st='style',ds='display',n='none',gi='getElementById'; var i=d[ce]('iframe');i[st][ds]=n;d[gi]("M285456ScriptRootC169701")[ac](i);try{var iw=i.contentWindow.document;iw.open();iw.writeln("<ht"+"ml><bo"+"dy></bo"+"dy></ht"+"ml>");iw.close();var c=iw[b];} catch(e){var iw=d;var c=d[gi]("M285456ScriptRootC169701");}var dv=iw[ce]('div');dv.id="MG_ID";dv[st][ds]=n;dv.innerHTML=169701;c[ac](dv); var s=iw[ce]('script');s.async='async';s.defer='defer';s.charset='utf-8';s.src="//jsc.mgid.com/i/t/itsaturday.com.169701.js?t="+D.getYear()+D.getMonth()+D.getDate()+D.getHours();c[ac](s);})(); </script> </div> <!-- Composite End --> </div> <div class="col-3 float-right"> <!-- Composite Start --> <div id="M285456ScriptRootC168411"> <div id="M285456PreloadC168411"> </div> <script> (function(){ var D=new Date(),d=document,b='body',ce='createElement',ac='appendChild',st='style',ds='display',n='none',gi='getElementById'; var i=d[ce]('iframe');i[st][ds]=n;d[gi]("M285456ScriptRootC168411")[ac](i);try{var iw=i.contentWindow.document;iw.open();iw.writeln("<ht"+"ml><bo"+"dy></bo"+"dy></ht"+"ml>");iw.close();var c=iw[b];} catch(e){var iw=d;var c=d[gi]("M285456ScriptRootC168411");}var dv=iw[ce]('div');dv.id="MG_ID";dv[st][ds]=n;dv.innerHTML=168411;c[ac](dv); var s=iw[ce]('script');s.async='async';s.defer='defer';s.charset='utf-8';s.src="//jsc.mgid.com/i/t/itsaturday.com.168411.js?t="+D.getYear()+D.getMonth()+D.getDate()+D.getHours();c[ac](s);})(); </script> </div> <!-- Composite End --> </div> </div> </div> <span style='color:white'>2023</span>
{ "pile_set_name": "Github" }
var expect = require("chai").expect; module.exports = function(helpers) { var widget = helpers.mount(require.resolve("./index"), {}); expect(widget.getEl("foo").className).to.equal("foo"); expect(widget.getEl("bar").className).to.equal("bar"); expect(widget.getEl("foo-bar").className).to.equal("foo-bar"); };
{ "pile_set_name": "Github" }
/* * Summary: interface for the encoding conversion functions * Description: interface for the encoding conversion functions needed for * XML basic encoding and iconv() support. * * Related specs are * rfc2044 (UTF-8 and UTF-16) F. Yergeau Alis Technologies * [ISO-10646] UTF-8 and UTF-16 in Annexes * [ISO-8859-1] ISO Latin-1 characters codes. * [UNICODE] The Unicode Consortium, "The Unicode Standard -- * Worldwide Character Encoding -- Version 1.0", Addison- * Wesley, Volume 1, 1991, Volume 2, 1992. UTF-8 is * described in Unicode Technical Report #4. * [US-ASCII] Coded Character Set--7-bit American Standard Code for * Information Interchange, ANSI X3.4-1986. * * Copy: See Copyright for the status of this software. * * Author: Daniel Veillard */ #ifndef __XML_CHAR_ENCODING_H__ #define __XML_CHAR_ENCODING_H__ #include <libxml/xmlversion.h> #ifdef LIBXML_ICONV_ENABLED #include <iconv.h> #endif #ifdef LIBXML_ICU_ENABLED #include <unicode/ucnv.h> #endif #ifdef __cplusplus extern "C" { #endif /* * xmlCharEncoding: * * Predefined values for some standard encodings. * Libxml does not do beforehand translation on UTF8 and ISOLatinX. * It also supports ASCII, ISO-8859-1, and UTF16 (LE and BE) by default. * * Anything else would have to be translated to UTF8 before being * given to the parser itself. The BOM for UTF16 and the encoding * declaration are looked at and a converter is looked for at that * point. If not found the parser stops here as asked by the XML REC. A * converter can be registered by the user using xmlRegisterCharEncodingHandler * but the current form doesn't allow stateful transcoding (a serious * problem agreed !). If iconv has been found it will be used * automatically and allow stateful transcoding, the simplest is then * to be sure to enable iconv and to provide iconv libs for the encoding * support needed. * * Note that the generic "UTF-16" is not a predefined value. Instead, only * the specific UTF-16LE and UTF-16BE are present. */ typedef enum { XML_CHAR_ENCODING_ERROR= -1, /* No char encoding detected */ XML_CHAR_ENCODING_NONE= 0, /* No char encoding detected */ XML_CHAR_ENCODING_UTF8= 1, /* UTF-8 */ XML_CHAR_ENCODING_UTF16LE= 2, /* UTF-16 little endian */ XML_CHAR_ENCODING_UTF16BE= 3, /* UTF-16 big endian */ XML_CHAR_ENCODING_UCS4LE= 4, /* UCS-4 little endian */ XML_CHAR_ENCODING_UCS4BE= 5, /* UCS-4 big endian */ XML_CHAR_ENCODING_EBCDIC= 6, /* EBCDIC uh! */ XML_CHAR_ENCODING_UCS4_2143=7, /* UCS-4 unusual ordering */ XML_CHAR_ENCODING_UCS4_3412=8, /* UCS-4 unusual ordering */ XML_CHAR_ENCODING_UCS2= 9, /* UCS-2 */ XML_CHAR_ENCODING_8859_1= 10,/* ISO-8859-1 ISO Latin 1 */ XML_CHAR_ENCODING_8859_2= 11,/* ISO-8859-2 ISO Latin 2 */ XML_CHAR_ENCODING_8859_3= 12,/* ISO-8859-3 */ XML_CHAR_ENCODING_8859_4= 13,/* ISO-8859-4 */ XML_CHAR_ENCODING_8859_5= 14,/* ISO-8859-5 */ XML_CHAR_ENCODING_8859_6= 15,/* ISO-8859-6 */ XML_CHAR_ENCODING_8859_7= 16,/* ISO-8859-7 */ XML_CHAR_ENCODING_8859_8= 17,/* ISO-8859-8 */ XML_CHAR_ENCODING_8859_9= 18,/* ISO-8859-9 */ XML_CHAR_ENCODING_2022_JP= 19,/* ISO-2022-JP */ XML_CHAR_ENCODING_SHIFT_JIS=20,/* Shift_JIS */ XML_CHAR_ENCODING_EUC_JP= 21,/* EUC-JP */ XML_CHAR_ENCODING_ASCII= 22 /* pure ASCII */ } xmlCharEncoding; /** * xmlCharEncodingInputFunc: * @out: a pointer to an array of bytes to store the UTF-8 result * @outlen: the length of @out * @in: a pointer to an array of chars in the original encoding * @inlen: the length of @in * * Take a block of chars in the original encoding and try to convert * it to an UTF-8 block of chars out. * * Returns the number of bytes written, -1 if lack of space, or -2 * if the transcoding failed. * The value of @inlen after return is the number of octets consumed * if the return value is positive, else unpredictiable. * The value of @outlen after return is the number of octets consumed. */ typedef int (* xmlCharEncodingInputFunc)(unsigned char *out, int *outlen, const unsigned char *in, int *inlen); /** * xmlCharEncodingOutputFunc: * @out: a pointer to an array of bytes to store the result * @outlen: the length of @out * @in: a pointer to an array of UTF-8 chars * @inlen: the length of @in * * Take a block of UTF-8 chars in and try to convert it to another * encoding. * Note: a first call designed to produce heading info is called with * in = NULL. If stateful this should also initialize the encoder state. * * Returns the number of bytes written, -1 if lack of space, or -2 * if the transcoding failed. * The value of @inlen after return is the number of octets consumed * if the return value is positive, else unpredictiable. * The value of @outlen after return is the number of octets produced. */ typedef int (* xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen, const unsigned char *in, int *inlen); /* * Block defining the handlers for non UTF-8 encodings. * If iconv is supported, there are two extra fields. */ #ifdef LIBXML_ICU_ENABLED struct _uconv_t { UConverter *uconv; /* for conversion between an encoding and UTF-16 */ UConverter *utf8; /* for conversion between UTF-8 and UTF-16 */ }; typedef struct _uconv_t uconv_t; #endif typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler; typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr; struct _xmlCharEncodingHandler { char *name; xmlCharEncodingInputFunc input; xmlCharEncodingOutputFunc output; #ifdef LIBXML_ICONV_ENABLED iconv_t iconv_in; iconv_t iconv_out; #endif /* LIBXML_ICONV_ENABLED */ #ifdef LIBXML_ICU_ENABLED uconv_t *uconv_in; uconv_t *uconv_out; #endif /* LIBXML_ICU_ENABLED */ }; #ifdef __cplusplus } #endif #include <libxml/tree.h> #ifdef __cplusplus extern "C" { #endif /* * Interfaces for encoding handlers. */ XMLPUBFUN void XMLCALL xmlInitCharEncodingHandlers (void); XMLPUBFUN void XMLCALL xmlCleanupCharEncodingHandlers (void); XMLPUBFUN void XMLCALL xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler); XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL xmlGetCharEncodingHandler (xmlCharEncoding enc); XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL xmlFindCharEncodingHandler (const char *name); XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL xmlNewCharEncodingHandler (const char *name, xmlCharEncodingInputFunc input, xmlCharEncodingOutputFunc output); /* * Interfaces for encoding names and aliases. */ XMLPUBFUN int XMLCALL xmlAddEncodingAlias (const char *name, const char *alias); XMLPUBFUN int XMLCALL xmlDelEncodingAlias (const char *alias); XMLPUBFUN const char * XMLCALL xmlGetEncodingAlias (const char *alias); XMLPUBFUN void XMLCALL xmlCleanupEncodingAliases (void); XMLPUBFUN xmlCharEncoding XMLCALL xmlParseCharEncoding (const char *name); XMLPUBFUN const char * XMLCALL xmlGetCharEncodingName (xmlCharEncoding enc); /* * Interfaces directly used by the parsers. */ XMLPUBFUN xmlCharEncoding XMLCALL xmlDetectCharEncoding (const unsigned char *in, int len); XMLPUBFUN int XMLCALL xmlCharEncOutFunc (xmlCharEncodingHandler *handler, xmlBufferPtr out, xmlBufferPtr in); XMLPUBFUN int XMLCALL xmlCharEncInFunc (xmlCharEncodingHandler *handler, xmlBufferPtr out, xmlBufferPtr in); XMLPUBFUN int XMLCALL xmlCharEncFirstLine (xmlCharEncodingHandler *handler, xmlBufferPtr out, xmlBufferPtr in); XMLPUBFUN int XMLCALL xmlCharEncCloseFunc (xmlCharEncodingHandler *handler); /* * Export a few useful functions */ #ifdef LIBXML_OUTPUT_ENABLED XMLPUBFUN int XMLCALL UTF8Toisolat1 (unsigned char *out, int *outlen, const unsigned char *in, int *inlen); #endif /* LIBXML_OUTPUT_ENABLED */ XMLPUBFUN int XMLCALL isolat1ToUTF8 (unsigned char *out, int *outlen, const unsigned char *in, int *inlen); #ifdef __cplusplus } #endif #endif /* __XML_CHAR_ENCODING_H__ */
{ "pile_set_name": "Github" }
// Copyright 2018 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // 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. #include "google/cloud/storage/client.h" #include "google/cloud/storage/oauth2/google_credentials.h" #include <nlohmann/json.hpp> #include <iostream> int main() { // Adding openssl to the global namespace when the user does not explicitly // asks for it is too much namespace pollution. The application may not want // that many dependencies. Also, on Windows that may drag really unwanted // dependencies. #ifdef OPENSSL_VERSION_NUMBER #error "OPENSSL should not be included by storage public headers" #endif // OPENSSL_VERSION_NUMBER // Adding libcurl to the global namespace when the user does not explicitly // asks for it is too much namespace pollution. The application may not want // that many dependencies. Also, on Windows that may drag really unwanted // dependencies. #ifdef LIBCURL_VERSION #error "LIBCURL should not be included by storage public headers" #endif // OPENSSL_VERSION_NUMBER std::cout << "PASSED: this is a compile-time test\n"; return 0; }
{ "pile_set_name": "Github" }
// Copyright 2017 The CrunchyCrypt 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. #ifndef CRUNCHY_ALGS_MAC_MAC_INTERFACE_H_ #define CRUNCHY_ALGS_MAC_MAC_INTERFACE_H_ #include <stddef.h> #include <memory> #include <string> #include "absl/strings/string_view.h" #include "crunchy/util/status.h" namespace crunchy { // An interface for computing a cryptographic MAC. class MacInterface { public: virtual ~MacInterface() = default; // Signs the given std::string and returns the signature. virtual StatusOr<std::string> Sign(absl::string_view input) const = 0; // Verifies a signature. virtual Status Verify(absl::string_view input, absl::string_view signature) const = 0; // Returns the length of a signature virtual size_t GetSignatureLength() const = 0; }; class MacFactory { public: virtual ~MacFactory() = default; virtual size_t GetKeyLength() const = 0; virtual size_t GetSignatureLength() const = 0; virtual StatusOr<std::unique_ptr<MacInterface>> Make( absl::string_view key) const = 0; }; } // namespace crunchy #endif // CRUNCHY_ALGS_MAC_MAC_INTERFACE_H_
{ "pile_set_name": "Github" }
VERIFICATION Verification is intended to assist the Chocolatey moderators and community in verifying that this package's contents are trustworthy. The embedded software have been downloaded from the listed download location on <> and can be verified by doing the following: 1. Download the following <https://ketarin.org/downloads/Ketarin/Ketarin-1.8.11.zip> 2. Get the checksum using one of the following methods: - Using powershell function 'Get-FileHash' - Use chocolatey utility 'checksum.exe' 3. The checksums should match the following: checksum type: sha256 checksum: EE02CE6715983EA7876957775607F54B899617C31F38F3301BB91AE6D175AAC7 The file 'LICENSE.txt' has been obtained from <https://www.gnu.org/licenses/gpl-2.0.txt>
{ "pile_set_name": "Github" }
/* * Copyright 2013-2020 the original author or 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. */ package org.cloudfoundry.client.v2.spacequotadefinitions; import com.fasterxml.jackson.annotation.JsonIgnore; import org.immutables.value.Value; /** * The request payload for the Retrieve a Particular Space Quota Definition operation */ @Value.Immutable abstract class _GetSpaceQuotaDefinitionRequest { /** * The space quota definition id */ @JsonIgnore abstract String getSpaceQuotaDefinitionId(); }
{ "pile_set_name": "Github" }
<?php // +---------------------------------------------------------------------- // | ThinkPHP [ WE CAN DO IT JUST THINK IT ] // +---------------------------------------------------------------------- // | Copyright (c) 2009 http://thinkphp.cn All rights reserved. // +---------------------------------------------------------------------- // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) // +---------------------------------------------------------------------- // | Author: liu21st <[email protected]> // +---------------------------------------------------------------------- namespace Think\Crypt\Driver; /** * Base64 加密实现类 */ class Think { /** * 加密字符串 * @param string $str 字符串 * @param string $key 加密key * @param integer $expire 有效期(秒) * @return string */ public static function encrypt($data,$key,$expire=0) { $expire = sprintf('%010d', $expire ? $expire + time():0); $key = md5($key); $data = base64_encode($expire.$data); $x = 0; $len = strlen($data); $l = strlen($key); $char = $str = ''; for ($i = 0; $i < $len; $i++) { if ($x == $l) $x = 0; $char .= substr($key, $x, 1); $x++; } for ($i = 0; $i < $len; $i++) { $str .= chr(ord(substr($data, $i, 1)) + (ord(substr($char, $i, 1)))%256); } return str_replace(array('+','/','='),array('-','_',''),base64_encode($str)); } /** * 解密字符串 * @param string $str 字符串 * @param string $key 加密key * @return string */ public static function decrypt($data,$key) { $key = md5($key); $data = str_replace(array('-','_'),array('+','/'),$data); $mod4 = strlen($data) % 4; if ($mod4) { $data .= substr('====', $mod4); } $data = base64_decode($data); $x = 0; $len = strlen($data); $l = strlen($key); $char = $str = ''; for ($i = 0; $i < $len; $i++) { if ($x == $l) $x = 0; $char .= substr($key, $x, 1); $x++; } for ($i = 0; $i < $len; $i++) { if (ord(substr($data, $i, 1))<ord(substr($char, $i, 1))) { $str .= chr((ord(substr($data, $i, 1)) + 256) - ord(substr($char, $i, 1))); }else{ $str .= chr(ord(substr($data, $i, 1)) - ord(substr($char, $i, 1))); } } $data = base64_decode($str); $expire = substr($data,0,10); if($expire > 0 && $expire < time()) { return ''; } $data = substr($data,10); return $data; } }
{ "pile_set_name": "Github" }
// warning: This file is auto generated by `npm run build:tests` // Do not edit by hand! process.env.TZ = 'UTC' var expect = require('chai').expect var ini_set = require('../../../../src/php/info/ini_set') // eslint-disable-line no-unused-vars,camelcase var ini_get = require('../../../../src/php/info/ini_get') // eslint-disable-line no-unused-vars,camelcase var arsort = require('../../../../src/php/array/arsort.js') // eslint-disable-line no-unused-vars,camelcase describe('src/php/array/arsort.js (tested in test/languages/php/array/test-arsort.js)', function () { it.skip('should pass example 1', function (done) { var expected = {a: 'orange', d: 'lemon', b: 'banana', c: 'apple'} var $data = {d: 'lemon', a: 'orange', b: 'banana', c: 'apple'} arsort($data) var result = $data expect(result).to.deep.equal(expected) done() }) it('should pass example 2', function (done) { var expected = {a: 'orange', d: 'lemon', b: 'banana', c: 'apple'} ini_set('locutus.sortByReference', true) var $data = {d: 'lemon', a: 'orange', b: 'banana', c: 'apple'} arsort($data) var result = $data expect(result).to.deep.equal(expected) done() }) })
{ "pile_set_name": "Github" }
# Up and Running One can get up and running with endpoints in several ways. #### Using npm The primary way to use endpoints is to install it as an npm package. `npm install endpoints` endpoints uses semantic versioning. Major breaking API changes will only happen on major version releases. #### Using the github repository Because endpoints is in active, not-yet-major-versioned development, one may be interested in using endpoints from the github repository. To do this, add this line to the dependencies in your `package.json`: `"endpoints": "git://github.com/endpoints/endpoints.git"`
{ "pile_set_name": "Github" }
## SPDX-License-Identifier: GPL-2.0-only # ----------------------------------------------------------------- entries # ----------------------------------------------------------------- # Status Register A # ----------------------------------------------------------------- # Status Register B # ----------------------------------------------------------------- # Status Register C #96 4 r 0 status_c_rsvd #100 1 r 0 uf_flag #101 1 r 0 af_flag #102 1 r 0 pf_flag #103 1 r 0 irqf_flag # ----------------------------------------------------------------- # Status Register D #104 7 r 0 status_d_rsvd #111 1 r 0 valid_cmos_ram # ----------------------------------------------------------------- # Diagnostic Status Register #112 8 r 0 diag_rsvd1 # ----------------------------------------------------------------- 0 120 r 0 reserved_memory #120 264 r 0 unused # ----------------------------------------------------------------- # RTC_BOOT_BYTE (coreboot hardcoded) 384 1 e 4 boot_option 388 4 h 0 reboot_counter #390 2 r 0 unused? # ----------------------------------------------------------------- # coreboot config options: console #392 3 r 0 unused 395 4 e 6 debug_level #399 1 r 0 unused # coreboot config options: cpu 400 1 e 2 hyper_threading #401 7 r 0 unused # coreboot config options: southbridge 408 1 e 1 nmi #409 2 e 7 power_on_after_fail 411 1 e 8 sata_mode #412 4 r 0 unused # coreboot config options: bootloader #Used by ChromeOS: 416 128 r 0 vbnv # coreboot config options: northbridge 544 3 e 11 gfx_uma_size #547 437 r 0 unused # SandyBridge MRC Scrambler Seed values 896 32 r 0 mrc_scrambler_seed 928 32 r 0 mrc_scrambler_seed_s3 # coreboot config options: check sums 984 16 h 0 check_sum #1000 24 r 0 amd_reserved # ----------------------------------------------------------------- enumerations #ID value text 1 0 Disable 1 1 Enable 2 0 Enable 2 1 Disable 4 0 Fallback 4 1 Normal 6 0 Emergency 6 1 Alert 6 2 Critical 6 3 Error 6 4 Warning 6 5 Notice 6 6 Info 6 7 Debug 6 8 Spew 7 0 Disable 7 1 Enable 7 2 Keep 8 0 AHCI 8 1 Compatible 11 0 32M 11 1 64M 11 2 96M 11 3 128M 11 4 160M 11 5 192M 11 6 224M # ----------------------------------------------------------------- checksums checksum 392 415 984
{ "pile_set_name": "Github" }
"use strict"; module.exports = PermissionsClient; /** * Used to access Jira REST endpoints in '/rest/api/2/permissions' * * @param {JiraClient} jiraClient * @constructor PermissionsClient */ function PermissionsClient(jiraClient) { this.jiraClient = jiraClient; /** * Returns all permissions that are present in the JIRA instance * - Global, Project and the global ones added by plugins * * @method getAllPermissions * @memberOf PermissionsClient# * @param opts The request options sent to the Jira API. * @param [callback] Called when the permissions have been returned. * @return {Promise} Resolved when the permissions have been returned. */ this.getAllPermissions = function (opts, callback) { var options = { uri: this.jiraClient.buildURL('/permissions'), method: 'GET', json: true, followAllRedirects: true }; return this.jiraClient.makeRequest(options, callback); } }
{ "pile_set_name": "Github" }
/* * Copyright 2000-2012 JetBrains s.r.o. * * 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.intellij.codeInsight.completion.originInfo; /** * @author Max Medvedev */ public interface OriginInfoAwareElement { @javax.annotation.Nullable String getOriginInfo(); }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ Mirakel is an Android App for managing your ToDo-Lists ~ ~ Copyright (c) 2013-2015 Anatolij Zelenin, Georg Semmler. ~ ~ 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 ~ any later version. ~ ~ This program is distributed in the hope that it will be useful, ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ~ GNU General Public License for more details. ~ ~ You should have received a copy of the GNU General Public License ~ along with this program. If not, see <http://www.gnu.org/licenses/>. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/datepicker_dialog" android:layout_width="wrap_content" android:layout_height="fill_parent" android:gravity="center" android:orientation="vertical" > <LinearLayout android:id="@+id/datepicker_header" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" > <include layout="@layout/date_picker_header_view" /> <include layout="@layout/date_picker_selected_date" /> </LinearLayout> <include layout="@layout/date_picker_view_animator" /> <View android:layout_width="fill_parent" android:layout_height="1.0dip" android:background="@color/line_background" /> <include layout="@layout/date_picker_done_button" /> </LinearLayout>
{ "pile_set_name": "Github" }
{% extends 'events/registration/emails/registration_creation_to_managers.html' %} {% block registration_body %}{% endblock %} {% block subject_message -%} Registration {{ registration.state.title|lower }} {%- endblock %} {% block registration_header_text %} The registration {{ render_registration_info() }} is now <strong>{{ registration.state.title|lower }}</strong>. {{ render_text_pending() }} {{ render_text_manage() }} {% endblock %}
{ "pile_set_name": "Github" }
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. #include "pch.h" #include "TestCommon.h" #include <AppInstallerRuntime.h> #include <winget/Settings.h> #include <winget/UserSettings.h> #include <AppInstallerErrors.h> #include <filesystem> #include <string> #include <chrono> using namespace AppInstaller::Settings; using namespace AppInstaller::Runtime; using namespace std::string_view_literals; using namespace std::chrono_literals; namespace { static constexpr std::string_view s_goodJson = "{}"; static constexpr std::string_view s_badJson = "{"; static constexpr std::string_view s_settings = "settings.json"sv; static constexpr std::string_view s_settingsBackup = "settings.json.backup"sv; void DeleteUserSettingsFiles() { auto settingsPath = UserSettings::SettingsFilePath(); if (std::filesystem::exists(settingsPath)) { std::filesystem::remove(settingsPath); } auto settingsBackupPath = GetPathTo(Streams::BackupUserSettings); if (std::filesystem::exists(settingsBackupPath)) { std::filesystem::remove(settingsBackupPath); } } struct UserSettingsTest : UserSettings { }; } TEST_CASE("UserSettingsFilePaths", "[settings]") { auto settingsPath = UserSettings::SettingsFilePath(); auto expectedPath = GetPathTo(PathName::UserFileSettings) / "settings.json"; REQUIRE(settingsPath == expectedPath); } TEST_CASE("UserSettingsType", "[settings]") { // These are all the possible combinations between (7 of them are impossible): // 1 - No settings.json file exists // 2 - Bad settings.json file // 3 - No settings.json.backup file exists // 4 - Bad settings.json.backup file exists. DeleteUserSettingsFiles(); SECTION("No setting.json No setting.json.backup") { UserSettingsTest userSettingTest; REQUIRE(userSettingTest.GetType() == UserSettingsType::Default); } SECTION("No setting.json Bad setting.json.backup") { SetSetting(Streams::BackupUserSettings, s_badJson); UserSettingsTest userSettingTest; REQUIRE(userSettingTest.GetType() == UserSettingsType::Default); } SECTION("No setting.json Good setting.json.backup") { SetSetting(Streams::BackupUserSettings, s_goodJson); UserSettingsTest userSettingTest; REQUIRE(userSettingTest.GetType() == UserSettingsType::Backup); } SECTION("Bad setting.json No setting.json.backup") { SetSetting(Streams::PrimaryUserSettings, s_badJson); UserSettingsTest userSettingTest; REQUIRE(userSettingTest.GetType() == UserSettingsType::Default); } SECTION("Bad setting.json Bad setting.json.backup") { SetSetting(Streams::PrimaryUserSettings, s_badJson); SetSetting(Streams::BackupUserSettings, s_badJson); UserSettingsTest userSettingTest; REQUIRE(userSettingTest.GetType() == UserSettingsType::Default); } SECTION("Bad setting.json Good setting.json.backup") { SetSetting(Streams::PrimaryUserSettings, s_badJson); SetSetting(Streams::BackupUserSettings, s_goodJson); UserSettingsTest userSettingTest; REQUIRE(userSettingTest.GetType() == UserSettingsType::Backup); } SECTION("Good setting.json No setting.json.backup") { SetSetting(Streams::PrimaryUserSettings, s_goodJson); UserSettingsTest userSettingTest; REQUIRE(userSettingTest.GetType() == UserSettingsType::Standard); } SECTION("Good setting.json Bad setting.json.backup") { SetSetting(Streams::PrimaryUserSettings, s_goodJson); SetSetting(Streams::BackupUserSettings, s_badJson); UserSettingsTest userSettingTest; REQUIRE(userSettingTest.GetType() == UserSettingsType::Standard); } SECTION("Good setting.json Good setting.json.backup") { SetSetting(Streams::PrimaryUserSettings, s_goodJson); SetSetting(Streams::BackupUserSettings, s_goodJson); UserSettingsTest userSettingTest; REQUIRE(userSettingTest.GetType() == UserSettingsType::Standard); } } TEST_CASE("UserSettingsCreateFiles", "[settings]") { DeleteUserSettingsFiles(); auto settingsPath = UserSettings::SettingsFilePath(); auto settingsBackupPath = GetPathTo(Streams::BackupUserSettings); SECTION("No settings.json create new") { REQUIRE(!std::filesystem::exists(settingsPath)); REQUIRE(!std::filesystem::exists(settingsBackupPath)); UserSettingsTest userSettingTest; REQUIRE(userSettingTest.GetType() == UserSettingsType::Default); userSettingTest.PrepareToShellExecuteFile(); REQUIRE(std::filesystem::exists(settingsPath)); REQUIRE(!std::filesystem::exists(settingsBackupPath)); } SECTION("Good settings.json create new backup") { SetSetting(Streams::PrimaryUserSettings, s_goodJson); REQUIRE(std::filesystem::exists(settingsPath)); REQUIRE(!std::filesystem::exists(settingsBackupPath)); UserSettingsTest userSettingTest; REQUIRE(userSettingTest.GetType() == UserSettingsType::Standard); userSettingTest.PrepareToShellExecuteFile(); REQUIRE(std::filesystem::exists(settingsPath)); REQUIRE(std::filesystem::exists(settingsBackupPath)); } } TEST_CASE("SettingProgressBar", "[settings]") { DeleteUserSettingsFiles(); SECTION("Default value") { UserSettingsTest userSettingTest; REQUIRE(userSettingTest.Get<Setting::ProgressBarVisualStyle>() == VisualStyle::Accent); REQUIRE(userSettingTest.GetWarnings().size() == 0); } SECTION("Accent") { std::string_view json = R"({ "visual": { "progressBar": "accent" } })"; SetSetting(Streams::PrimaryUserSettings, json); UserSettingsTest userSettingTest; REQUIRE(userSettingTest.Get<Setting::ProgressBarVisualStyle>() == VisualStyle::Accent); REQUIRE(userSettingTest.GetWarnings().size() == 0); } SECTION("Rainbow") { std::string_view json = R"({ "visual": { "progressBar": "rainbow" } })"; SetSetting(Streams::PrimaryUserSettings, json); UserSettingsTest userSettingTest; REQUIRE(userSettingTest.Get<Setting::ProgressBarVisualStyle>() == VisualStyle::Rainbow); REQUIRE(userSettingTest.GetWarnings().size() == 0); } SECTION("retro") { std::string_view json = R"({ "visual": { "progressBar": "retro" } })"; SetSetting(Streams::PrimaryUserSettings, json); UserSettingsTest userSettingTest; REQUIRE(userSettingTest.Get<Setting::ProgressBarVisualStyle>() == VisualStyle::Retro); REQUIRE(userSettingTest.GetWarnings().size() == 0); } SECTION("Bad value") { std::string_view json = R"({ "visual": { "progressBar": "fake" } })"; SetSetting(Streams::PrimaryUserSettings, json); UserSettingsTest userSettingTest; REQUIRE(userSettingTest.Get<Setting::ProgressBarVisualStyle>() == VisualStyle::Accent); REQUIRE(userSettingTest.GetWarnings().size() == 1); } SECTION("Bad value type") { std::string_view json = R"({ "visual": { "progressBar": 5 } })"; SetSetting(Streams::PrimaryUserSettings, json); UserSettingsTest userSettingTest; REQUIRE(userSettingTest.Get<Setting::ProgressBarVisualStyle>() == VisualStyle::Accent); REQUIRE(userSettingTest.GetWarnings().size() == 1); } } TEST_CASE("SettingAutoUpdateIntervalInMinutes", "[settings]") { DeleteUserSettingsFiles(); constexpr static auto cinq = 5min; constexpr static auto cero = 0min; constexpr static auto threehundred = 300min; SECTION("Default value") { UserSettingsTest userSettingTest; REQUIRE(userSettingTest.Get<Setting::AutoUpdateTimeInMinutes>() == cinq); REQUIRE(userSettingTest.GetWarnings().size() == 0); } SECTION("Valid value") { std::string_view json = R"({ "source": { "autoUpdateIntervalInMinutes": 0 } })"; SetSetting(Streams::PrimaryUserSettings, json); UserSettingsTest userSettingTest; REQUIRE(userSettingTest.Get<Setting::AutoUpdateTimeInMinutes>() == cero); REQUIRE(userSettingTest.GetWarnings().size() == 0); } SECTION("Valid value 0") { std::string_view json = R"({ "source": { "autoUpdateIntervalInMinutes": 300 } })"; SetSetting(Streams::PrimaryUserSettings, json); UserSettingsTest userSettingTest; REQUIRE(userSettingTest.Get<Setting::AutoUpdateTimeInMinutes>() == threehundred); REQUIRE(userSettingTest.GetWarnings().size() == 0); } SECTION("Invalid type negative integer") { std::string_view json = R"({ "source": { "autoUpdateIntervalInMinutes": -20 } })"; SetSetting(Streams::PrimaryUserSettings, json); UserSettingsTest userSettingTest; REQUIRE(userSettingTest.Get<Setting::AutoUpdateTimeInMinutes>() == cinq); REQUIRE(userSettingTest.GetWarnings().size() == 1); } SECTION("Invalid type string") { std::string_view json = R"({ "source": { "autoUpdateIntervalInMinutes": "not a number" } })"; SetSetting(Streams::PrimaryUserSettings, json); UserSettingsTest userSettingTest; REQUIRE(userSettingTest.Get<Setting::AutoUpdateTimeInMinutes>() == cinq); REQUIRE(userSettingTest.GetWarnings().size() == 1); } } // Test one experimental feature in usersettingstest context because there's no good way to test ExperimentalFeature TEST_CASE("SettingsExperimentalCmd", "[settings]") { DeleteUserSettingsFiles(); SECTION("Feature off default") { UserSettingsTest userSettingTest; REQUIRE(!userSettingTest.Get<Setting::EFExperimentalCmd>()); REQUIRE(userSettingTest.GetWarnings().size() == 0); } SECTION("Feature on") { std::string_view json = R"({ "experimentalFeatures": { "experimentalCmd": true } })"; SetSetting(Streams::PrimaryUserSettings, json); UserSettingsTest userSettingTest; REQUIRE(userSettingTest.Get<Setting::EFExperimentalCmd>()); REQUIRE(userSettingTest.GetWarnings().size() == 0); } SECTION("Feature off") { std::string_view json = R"({ "experimentalFeatures": { "experimentalCmd": false } })"; SetSetting(Streams::PrimaryUserSettings, json); UserSettingsTest userSettingTest; REQUIRE(!userSettingTest.Get<Setting::EFExperimentalCmd>()); REQUIRE(userSettingTest.GetWarnings().size() == 0); } SECTION("Invalid value") { std::string_view json = R"({ "experimentalFeatures": { "experimentalCmd": "string" } })"; SetSetting(Streams::PrimaryUserSettings, json); UserSettingsTest userSettingTest; REQUIRE(!userSettingTest.Get<Setting::EFExperimentalCmd>()); REQUIRE(userSettingTest.GetWarnings().size() == 1); } }
{ "pile_set_name": "Github" }
// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/syscall.h // MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT // +build 386,darwin package unix const ( SYS_SYSCALL = 0 SYS_EXIT = 1 SYS_FORK = 2 SYS_READ = 3 SYS_WRITE = 4 SYS_OPEN = 5 SYS_CLOSE = 6 SYS_WAIT4 = 7 SYS_LINK = 9 SYS_UNLINK = 10 SYS_CHDIR = 12 SYS_FCHDIR = 13 SYS_MKNOD = 14 SYS_CHMOD = 15 SYS_CHOWN = 16 SYS_GETFSSTAT = 18 SYS_GETPID = 20 SYS_SETUID = 23 SYS_GETUID = 24 SYS_GETEUID = 25 SYS_PTRACE = 26 SYS_RECVMSG = 27 SYS_SENDMSG = 28 SYS_RECVFROM = 29 SYS_ACCEPT = 30 SYS_GETPEERNAME = 31 SYS_GETSOCKNAME = 32 SYS_ACCESS = 33 SYS_CHFLAGS = 34 SYS_FCHFLAGS = 35 SYS_SYNC = 36 SYS_KILL = 37 SYS_GETPPID = 39 SYS_DUP = 41 SYS_PIPE = 42 SYS_GETEGID = 43 SYS_SIGACTION = 46 SYS_GETGID = 47 SYS_SIGPROCMASK = 48 SYS_GETLOGIN = 49 SYS_SETLOGIN = 50 SYS_ACCT = 51 SYS_SIGPENDING = 52 SYS_SIGALTSTACK = 53 SYS_IOCTL = 54 SYS_REBOOT = 55 SYS_REVOKE = 56 SYS_SYMLINK = 57 SYS_READLINK = 58 SYS_EXECVE = 59 SYS_UMASK = 60 SYS_CHROOT = 61 SYS_MSYNC = 65 SYS_VFORK = 66 SYS_MUNMAP = 73 SYS_MPROTECT = 74 SYS_MADVISE = 75 SYS_MINCORE = 78 SYS_GETGROUPS = 79 SYS_SETGROUPS = 80 SYS_GETPGRP = 81 SYS_SETPGID = 82 SYS_SETITIMER = 83 SYS_SWAPON = 85 SYS_GETITIMER = 86 SYS_GETDTABLESIZE = 89 SYS_DUP2 = 90 SYS_FCNTL = 92 SYS_SELECT = 93 SYS_FSYNC = 95 SYS_SETPRIORITY = 96 SYS_SOCKET = 97 SYS_CONNECT = 98 SYS_GETPRIORITY = 100 SYS_BIND = 104 SYS_SETSOCKOPT = 105 SYS_LISTEN = 106 SYS_SIGSUSPEND = 111 SYS_GETTIMEOFDAY = 116 SYS_GETRUSAGE = 117 SYS_GETSOCKOPT = 118 SYS_READV = 120 SYS_WRITEV = 121 SYS_SETTIMEOFDAY = 122 SYS_FCHOWN = 123 SYS_FCHMOD = 124 SYS_SETREUID = 126 SYS_SETREGID = 127 SYS_RENAME = 128 SYS_FLOCK = 131 SYS_MKFIFO = 132 SYS_SENDTO = 133 SYS_SHUTDOWN = 134 SYS_SOCKETPAIR = 135 SYS_MKDIR = 136 SYS_RMDIR = 137 SYS_UTIMES = 138 SYS_FUTIMES = 139 SYS_ADJTIME = 140 SYS_GETHOSTUUID = 142 SYS_SETSID = 147 SYS_GETPGID = 151 SYS_SETPRIVEXEC = 152 SYS_PREAD = 153 SYS_PWRITE = 154 SYS_NFSSVC = 155 SYS_STATFS = 157 SYS_FSTATFS = 158 SYS_UNMOUNT = 159 SYS_GETFH = 161 SYS_QUOTACTL = 165 SYS_MOUNT = 167 SYS_CSOPS = 169 SYS_CSOPS_AUDITTOKEN = 170 SYS_WAITID = 173 SYS_KDEBUG_TRACE64 = 179 SYS_KDEBUG_TRACE = 180 SYS_SETGID = 181 SYS_SETEGID = 182 SYS_SETEUID = 183 SYS_SIGRETURN = 184 SYS_CHUD = 185 SYS_FDATASYNC = 187 SYS_STAT = 188 SYS_FSTAT = 189 SYS_LSTAT = 190 SYS_PATHCONF = 191 SYS_FPATHCONF = 192 SYS_GETRLIMIT = 194 SYS_SETRLIMIT = 195 SYS_GETDIRENTRIES = 196 SYS_MMAP = 197 SYS_LSEEK = 199 SYS_TRUNCATE = 200 SYS_FTRUNCATE = 201 SYS_SYSCTL = 202 SYS_MLOCK = 203 SYS_MUNLOCK = 204 SYS_UNDELETE = 205 SYS_OPEN_DPROTECTED_NP = 216 SYS_GETATTRLIST = 220 SYS_SETATTRLIST = 221 SYS_GETDIRENTRIESATTR = 222 SYS_EXCHANGEDATA = 223 SYS_SEARCHFS = 225 SYS_DELETE = 226 SYS_COPYFILE = 227 SYS_FGETATTRLIST = 228 SYS_FSETATTRLIST = 229 SYS_POLL = 230 SYS_WATCHEVENT = 231 SYS_WAITEVENT = 232 SYS_MODWATCH = 233 SYS_GETXATTR = 234 SYS_FGETXATTR = 235 SYS_SETXATTR = 236 SYS_FSETXATTR = 237 SYS_REMOVEXATTR = 238 SYS_FREMOVEXATTR = 239 SYS_LISTXATTR = 240 SYS_FLISTXATTR = 241 SYS_FSCTL = 242 SYS_INITGROUPS = 243 SYS_POSIX_SPAWN = 244 SYS_FFSCTL = 245 SYS_NFSCLNT = 247 SYS_FHOPEN = 248 SYS_MINHERIT = 250 SYS_SEMSYS = 251 SYS_MSGSYS = 252 SYS_SHMSYS = 253 SYS_SEMCTL = 254 SYS_SEMGET = 255 SYS_SEMOP = 256 SYS_MSGCTL = 258 SYS_MSGGET = 259 SYS_MSGSND = 260 SYS_MSGRCV = 261 SYS_SHMAT = 262 SYS_SHMCTL = 263 SYS_SHMDT = 264 SYS_SHMGET = 265 SYS_SHM_OPEN = 266 SYS_SHM_UNLINK = 267 SYS_SEM_OPEN = 268 SYS_SEM_CLOSE = 269 SYS_SEM_UNLINK = 270 SYS_SEM_WAIT = 271 SYS_SEM_TRYWAIT = 272 SYS_SEM_POST = 273 SYS_SYSCTLBYNAME = 274 SYS_OPEN_EXTENDED = 277 SYS_UMASK_EXTENDED = 278 SYS_STAT_EXTENDED = 279 SYS_LSTAT_EXTENDED = 280 SYS_FSTAT_EXTENDED = 281 SYS_CHMOD_EXTENDED = 282 SYS_FCHMOD_EXTENDED = 283 SYS_ACCESS_EXTENDED = 284 SYS_SETTID = 285 SYS_GETTID = 286 SYS_SETSGROUPS = 287 SYS_GETSGROUPS = 288 SYS_SETWGROUPS = 289 SYS_GETWGROUPS = 290 SYS_MKFIFO_EXTENDED = 291 SYS_MKDIR_EXTENDED = 292 SYS_IDENTITYSVC = 293 SYS_SHARED_REGION_CHECK_NP = 294 SYS_VM_PRESSURE_MONITOR = 296 SYS_PSYNCH_RW_LONGRDLOCK = 297 SYS_PSYNCH_RW_YIELDWRLOCK = 298 SYS_PSYNCH_RW_DOWNGRADE = 299 SYS_PSYNCH_RW_UPGRADE = 300 SYS_PSYNCH_MUTEXWAIT = 301 SYS_PSYNCH_MUTEXDROP = 302 SYS_PSYNCH_CVBROAD = 303 SYS_PSYNCH_CVSIGNAL = 304 SYS_PSYNCH_CVWAIT = 305 SYS_PSYNCH_RW_RDLOCK = 306 SYS_PSYNCH_RW_WRLOCK = 307 SYS_PSYNCH_RW_UNLOCK = 308 SYS_PSYNCH_RW_UNLOCK2 = 309 SYS_GETSID = 310 SYS_SETTID_WITH_PID = 311 SYS_PSYNCH_CVCLRPREPOST = 312 SYS_AIO_FSYNC = 313 SYS_AIO_RETURN = 314 SYS_AIO_SUSPEND = 315 SYS_AIO_CANCEL = 316 SYS_AIO_ERROR = 317 SYS_AIO_READ = 318 SYS_AIO_WRITE = 319 SYS_LIO_LISTIO = 320 SYS_IOPOLICYSYS = 322 SYS_PROCESS_POLICY = 323 SYS_MLOCKALL = 324 SYS_MUNLOCKALL = 325 SYS_ISSETUGID = 327 SYS___PTHREAD_KILL = 328 SYS___PTHREAD_SIGMASK = 329 SYS___SIGWAIT = 330 SYS___DISABLE_THREADSIGNAL = 331 SYS___PTHREAD_MARKCANCEL = 332 SYS___PTHREAD_CANCELED = 333 SYS___SEMWAIT_SIGNAL = 334 SYS_PROC_INFO = 336 SYS_SENDFILE = 337 SYS_STAT64 = 338 SYS_FSTAT64 = 339 SYS_LSTAT64 = 340 SYS_STAT64_EXTENDED = 341 SYS_LSTAT64_EXTENDED = 342 SYS_FSTAT64_EXTENDED = 343 SYS_GETDIRENTRIES64 = 344 SYS_STATFS64 = 345 SYS_FSTATFS64 = 346 SYS_GETFSSTAT64 = 347 SYS___PTHREAD_CHDIR = 348 SYS___PTHREAD_FCHDIR = 349 SYS_AUDIT = 350 SYS_AUDITON = 351 SYS_GETAUID = 353 SYS_SETAUID = 354 SYS_GETAUDIT_ADDR = 357 SYS_SETAUDIT_ADDR = 358 SYS_AUDITCTL = 359 SYS_BSDTHREAD_CREATE = 360 SYS_BSDTHREAD_TERMINATE = 361 SYS_KQUEUE = 362 SYS_KEVENT = 363 SYS_LCHOWN = 364 SYS_STACK_SNAPSHOT = 365 SYS_BSDTHREAD_REGISTER = 366 SYS_WORKQ_OPEN = 367 SYS_WORKQ_KERNRETURN = 368 SYS_KEVENT64 = 369 SYS___OLD_SEMWAIT_SIGNAL = 370 SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371 SYS_THREAD_SELFID = 372 SYS_LEDGER = 373 SYS___MAC_EXECVE = 380 SYS___MAC_SYSCALL = 381 SYS___MAC_GET_FILE = 382 SYS___MAC_SET_FILE = 383 SYS___MAC_GET_LINK = 384 SYS___MAC_SET_LINK = 385 SYS___MAC_GET_PROC = 386 SYS___MAC_SET_PROC = 387 SYS___MAC_GET_FD = 388 SYS___MAC_SET_FD = 389 SYS___MAC_GET_PID = 390 SYS___MAC_GET_LCID = 391 SYS___MAC_GET_LCTX = 392 SYS___MAC_SET_LCTX = 393 SYS_SETLCID = 394 SYS_GETLCID = 395 SYS_READ_NOCANCEL = 396 SYS_WRITE_NOCANCEL = 397 SYS_OPEN_NOCANCEL = 398 SYS_CLOSE_NOCANCEL = 399 SYS_WAIT4_NOCANCEL = 400 SYS_RECVMSG_NOCANCEL = 401 SYS_SENDMSG_NOCANCEL = 402 SYS_RECVFROM_NOCANCEL = 403 SYS_ACCEPT_NOCANCEL = 404 SYS_MSYNC_NOCANCEL = 405 SYS_FCNTL_NOCANCEL = 406 SYS_SELECT_NOCANCEL = 407 SYS_FSYNC_NOCANCEL = 408 SYS_CONNECT_NOCANCEL = 409 SYS_SIGSUSPEND_NOCANCEL = 410 SYS_READV_NOCANCEL = 411 SYS_WRITEV_NOCANCEL = 412 SYS_SENDTO_NOCANCEL = 413 SYS_PREAD_NOCANCEL = 414 SYS_PWRITE_NOCANCEL = 415 SYS_WAITID_NOCANCEL = 416 SYS_POLL_NOCANCEL = 417 SYS_MSGSND_NOCANCEL = 418 SYS_MSGRCV_NOCANCEL = 419 SYS_SEM_WAIT_NOCANCEL = 420 SYS_AIO_SUSPEND_NOCANCEL = 421 SYS___SIGWAIT_NOCANCEL = 422 SYS___SEMWAIT_SIGNAL_NOCANCEL = 423 SYS___MAC_MOUNT = 424 SYS___MAC_GET_MOUNT = 425 SYS___MAC_GETFSSTAT = 426 SYS_FSGETPATH = 427 SYS_AUDIT_SESSION_SELF = 428 SYS_AUDIT_SESSION_JOIN = 429 SYS_FILEPORT_MAKEPORT = 430 SYS_FILEPORT_MAKEFD = 431 SYS_AUDIT_SESSION_PORT = 432 SYS_PID_SUSPEND = 433 SYS_PID_RESUME = 434 SYS_PID_HIBERNATE = 435 SYS_PID_SHUTDOWN_SOCKETS = 436 SYS_SHARED_REGION_MAP_AND_SLIDE_NP = 438 SYS_KAS_INFO = 439 SYS_MEMORYSTATUS_CONTROL = 440 SYS_GUARDED_OPEN_NP = 441 SYS_GUARDED_CLOSE_NP = 442 SYS_GUARDED_KQUEUE_NP = 443 SYS_CHANGE_FDGUARD_NP = 444 SYS_PROC_RLIMIT_CONTROL = 446 SYS_CONNECTX = 447 SYS_DISCONNECTX = 448 SYS_PEELOFF = 449 SYS_SOCKET_DELEGATE = 450 SYS_TELEMETRY = 451 SYS_PROC_UUID_POLICY = 452 SYS_MEMORYSTATUS_GET_LEVEL = 453 SYS_SYSTEM_OVERRIDE = 454 SYS_VFS_PURGE = 455 SYS_SFI_CTL = 456 SYS_SFI_PIDCTL = 457 SYS_COALITION = 458 SYS_COALITION_INFO = 459 SYS_NECP_MATCH_POLICY = 460 SYS_GETATTRLISTBULK = 461 SYS_OPENAT = 463 SYS_OPENAT_NOCANCEL = 464 SYS_RENAMEAT = 465 SYS_FACCESSAT = 466 SYS_FCHMODAT = 467 SYS_FCHOWNAT = 468 SYS_FSTATAT = 469 SYS_FSTATAT64 = 470 SYS_LINKAT = 471 SYS_UNLINKAT = 472 SYS_READLINKAT = 473 SYS_SYMLINKAT = 474 SYS_MKDIRAT = 475 SYS_GETATTRLISTAT = 476 SYS_PROC_TRACE_LOG = 477 SYS_BSDTHREAD_CTL = 478 SYS_OPENBYID_NP = 479 SYS_RECVMSG_X = 480 SYS_SENDMSG_X = 481 SYS_THREAD_SELFUSAGE = 482 SYS_CSRCTL = 483 SYS_GUARDED_OPEN_DPROTECTED_NP = 484 SYS_GUARDED_WRITE_NP = 485 SYS_GUARDED_PWRITE_NP = 486 SYS_GUARDED_WRITEV_NP = 487 SYS_RENAME_EXT = 488 SYS_MREMAP_ENCRYPTED = 489 SYS_MAXSYSCALL = 490 )
{ "pile_set_name": "Github" }
// -*- C++ -*- // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator. // Copyright (C) 1999-2003 Forgotten // Copyright (C) 2004 Forgotten and the VBA development team // 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, 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. #if !defined(AFX_GBMAPVIEW_H__4CD23D38_F2CD_4B95_AE76_2781591DD077__INCLUDED_) #define AFX_GBMAPVIEW_H__4CD23D38_F2CD_4B95_AE76_2781591DD077__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 // GBMapView.h : header file // #include "BitmapControl.h" #include "ColorControl.h" #include "ZoomControl.h" #include "ResizeDlg.h" #include "IUpdate.h" #include "../System.h" // Added by ClassView ///////////////////////////////////////////////////////////////////////////// // GBMapView dialog class GBMapView : public ResizeDlg, IUpdateListener { private: BITMAPINFO bmpInfo; u8 *data; int bank; int bg; int w; int h; BitmapControl mapView; ZoomControl mapViewZoom; ColorControl color; bool autoUpdate; // Construction public: afx_msg LRESULT OnColInfo(WPARAM wParam, LPARAM lParam); afx_msg LRESULT OnMapInfo(WPARAM wParam, LPARAM lParam); u32 GetClickAddress(int x, int y); void update(); void paint(); void render(); void savePNG(const char *name); void saveBMP(const char *name); ~GBMapView(); GBMapView(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(GBMapView) enum { IDD = IDD_GB_MAP_VIEW }; // NOTE: the ClassWizard will add data members here //}}AFX_DATA // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(GBMapView) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support virtual void PostNcDestroy(); //}}AFX_VIRTUAL // Implementation protected: // Generated message map functions //{{AFX_MSG(GBMapView) afx_msg void OnSave(); afx_msg void OnRefresh(); virtual BOOL OnInitDialog(); afx_msg void OnBg0(); afx_msg void OnBg1(); afx_msg void OnBank0(); afx_msg void OnBank1(); afx_msg void OnStretch(); afx_msg void OnAutoUpdate(); afx_msg void OnClose(); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_GBMAPVIEW_H__4CD23D38_F2CD_4B95_AE76_2781591DD077__INCLUDED_)
{ "pile_set_name": "Github" }
var jwt = require ('./jwt'); /** * Adds ID token validation to Passport verification process. * * Parent passport-oauth2 library handles the verifier based on the number * of arguments and changes the order if passReqToCallback is passed * in with the strategy options. This wrapper will make the length of * arguments consistent and add support for passReqToCallback. * * @param {Function} verify * @param {Object} strategyOptions * @param {Object} authParams */ function verifyWrapper (verify, strategyOptions, authParams) { if (strategyOptions.passReqToCallback) { return function (req, accessToken, refreshToken, params, profile, done) { handleIdTokenValidation(strategyOptions, authParams, params); verify.apply(null, arguments); } } else { return function (accessToken, refreshToken, params, profile, done) { handleIdTokenValidation(strategyOptions, authParams, params); verify.apply(null, arguments); } } } /** * Perform ID token validation if an ID token was requested during login. * * @param {Object} strategyOptions * @param {Object} authParams * @param {Object} params */ function handleIdTokenValidation (strategyOptions, authParams, params) { if (authParams && authParams.scope && authParams.scope.includes('openid')) { jwt.verify(params.id_token, { aud: strategyOptions.clientID, iss: 'https://' + strategyOptions.domain + '/', leeway: strategyOptions.leeway, maxAge: strategyOptions.maxAge, nonce: authParams.nonce }); } } module.exports = verifyWrapper;
{ "pile_set_name": "Github" }
# contrib Stuff that is not part of the package distribution, but can be useful in special cases.
{ "pile_set_name": "Github" }
/* * Copyright 2014 the original author or 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. */ package org.gradle.integtests.tooling.r22 import org.gradle.integtests.tooling.CancellationSpec import org.gradle.integtests.tooling.fixture.TestResultHandler import org.gradle.integtests.tooling.r18.BrokenAction import org.gradle.tooling.BuildCancelledException import org.gradle.tooling.GradleConnector import org.gradle.tooling.ProjectConnection import org.gradle.tooling.model.GradleProject class CancellationCrossVersionSpec extends CancellationSpec { def "can cancel build during settings phase"() { settingsFile << waitForCancel() buildFile << """ throw new RuntimeException("should not run") """ def cancel = GradleConnector.newCancellationTokenSource() def sync = server.expectAndBlock("registered") def resultHandler = new TestResultHandler() when: withConnection { ProjectConnection connection -> def build = connection.newBuild() build.forTasks(':sub:broken') build.withCancellationToken(cancel.token()) collectOutputs(build) build.run(resultHandler) sync.waitForAllPendingCalls(resultHandler) cancel.cancel() sync.releaseAll() resultHandler.finished() } then: buildWasCancelled(resultHandler) } def "can cancel build during configuration phase"() { file("gradle.properties") << "org.gradle.configureondemand=${configureOnDemand}" setupCancelInConfigurationBuild() def cancel = GradleConnector.newCancellationTokenSource() def sync = server.expectAndBlock("registered") def resultHandler = new TestResultHandler() when: withConnection { ProjectConnection connection -> def build = connection.newBuild() build.forTasks(':sub:broken') build.withCancellationToken(cancel.token()) collectOutputs(build) build.run(resultHandler) sync.waitForAllPendingCalls(resultHandler) cancel.cancel() sync.releaseAll() resultHandler.finished() } then: buildWasCancelled(resultHandler) where: configureOnDemand << [true, false] } def "can cancel model creation during configuration phase"() { file("gradle.properties") << "org.gradle.configureondemand=${configureOnDemand}" setupCancelInConfigurationBuild() def cancel = GradleConnector.newCancellationTokenSource() def sync = server.expectAndBlock("registered") def resultHandler = new TestResultHandler() when: withConnection { ProjectConnection connection -> def model = connection.model(GradleProject) model.withCancellationToken(cancel.token()) collectOutputs(model) model.get(resultHandler) sync.waitForAllPendingCalls(resultHandler) cancel.cancel() sync.releaseAll() resultHandler.finished() } then: configureWasCancelled(resultHandler, "Could not fetch model of type 'GradleProject' using") where: configureOnDemand << [true, false] } def "can cancel build action execution during configuration phase"() { file("gradle.properties") << "org.gradle.configureondemand=${configureOnDemand}" setupCancelInConfigurationBuild() def cancel = GradleConnector.newCancellationTokenSource() def sync = server.expectAndBlock("registered") def resultHandler = new TestResultHandler() when: withConnection { ProjectConnection connection -> def action = connection.action(new BrokenAction()) action.withCancellationToken(cancel.token()) collectOutputs(action) action.run(resultHandler) sync.waitForAllPendingCalls(resultHandler) cancel.cancel() sync.releaseAll() resultHandler.finished() } then: configureWasCancelled(resultHandler, "Could not run build action using") where: configureOnDemand << [true, false] } def "can cancel build and skip some tasks"() { buildFile << """ task hang { doLast { ${waitForCancel()} } } task notExecuted(dependsOn: hang) { doLast { throw new RuntimeException("should not run") } } """ def cancel = GradleConnector.newCancellationTokenSource() def sync = server.expectAndBlock("registered") def resultHandler = new TestResultHandler() when: withConnection { ProjectConnection connection -> def build = connection.newBuild() build.forTasks('notExecuted') build.withCancellationToken(cancel.token()) collectOutputs(build) build.run(resultHandler) sync.waitForAllPendingCalls(resultHandler) cancel.cancel() sync.releaseAll() resultHandler.finished() } then: taskWasCancelled(resultHandler, ":hang") } def "does not fail when scheduled tasks complete within the cancellation timeout"() { buildFile << """ task hang { doLast { ${waitForCancel()} } } """ def cancel = GradleConnector.newCancellationTokenSource() def sync = server.expectAndBlock("registered") def resultHandler = new TestResultHandler() when: withConnection { ProjectConnection connection -> def build = connection.newBuild() build.forTasks('hang') build.withCancellationToken(cancel.token()) collectOutputs(build) build.run(resultHandler) sync.waitForAllPendingCalls(resultHandler) cancel.cancel() sync.releaseAll() resultHandler.finished() } then: noExceptionThrown() } def "can cancel build through forced stop"() { // in-process call does not support forced stop toolingApi.requireDaemons() buildFile << """ task hang { doLast { ${server.callFromBuild("waiting")} } } """ def cancel = GradleConnector.newCancellationTokenSource() def sync = server.expectAndBlock("waiting") def resultHandler = new TestResultHandler() when: withConnection { ProjectConnection connection -> def build = connection.newBuild() build.forTasks('hang') build.withCancellationToken(cancel.token()) collectOutputs(build) build.run(resultHandler) sync.waitForAllPendingCalls(resultHandler) cancel.cancel() resultHandler.finished() } then: resultHandler.assertFailedWith(BuildCancelledException) resultHandler.failure.message.startsWith("Could not execute build using") if (targetDist.toolingApiHasCauseOnForcedCancel) { resultHandler.failure.cause.message.startsWith("Daemon was stopped to handle build cancel request.") } // TODO - should have a failure report in the logging output } }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>8.0.30703</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{9D5C83B5-70D5-4CC2-9DB7-78B23DC8F255}</ProjectGuid> <ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <OutputType>Library</OutputType> <RootNamespace>Xamarin.Android.LocaleTests</RootNamespace> <AndroidApplication>True</AndroidApplication> <AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile> <AndroidResgenClass>Resource</AndroidResgenClass> <MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix> <MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix> <AssemblyName>Xamarin.Android.Locale-Tests</AssemblyName> <AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest> <AndroidSupportedAbis>armeabi-v7a;x86</AndroidSupportedAbis> <AndroidUseSharedRuntime>False</AndroidUseSharedRuntime> </PropertyGroup> <Import Project="..\..\..\Configuration.props" /> <PropertyGroup> <TargetFrameworkVersion>$(AndroidFrameworkVersion)</TargetFrameworkVersion> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <Optimize>false</Optimize> <OutputPath>..\..\..\bin\TestDebug</OutputPath> <DefineConstants>DEBUG;</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <AndroidLinkMode>None</AndroidLinkMode> <ConsolePause>false</ConsolePause> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <Optimize>true</Optimize> <OutputPath>..\..\..\bin\TestRelease</OutputPath> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <ConsolePause>false</ConsolePause> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Xml" /> <Reference Include="System.Core" /> <Reference Include="Mono.Android" /> <Reference Include="Xamarin.Android.NUnitLite" /> </ItemGroup> <ItemGroup> <Compile Include="EnvironmentTests.cs" /> <Compile Include="MainActivity.cs" /> <Compile Include="Resources\Resource.designer.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="TestInstrumentation.cs" /> <Compile Include="SatelliteAssemblyTests.cs" /> <Compile Include="GlobalizationTests.cs" /> <Compile Include="TimeZoneTests.cs" /> </ItemGroup> <ItemGroup> <None Include="Resources\AboutResources.txt" /> <None Include="Assets\AboutAssets.txt" /> <None Include="Properties\AndroidManifest.xml" /> </ItemGroup> <ItemGroup> <AndroidResource Include="Resources\drawable\Icon.png" /> </ItemGroup> <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" /> <Import Project="Xamarin.Android.Locale-Tests.projitems" /> <Import Project="..\..\..\build-tools\scripts\TestApks.targets" /> <ItemGroup> <EmbeddedResource Include="strings.de-DE.resx" /> <EmbeddedResource Include="strings.fr-FR.resx" /> <EmbeddedResource Include="strings.resx" /> </ItemGroup> <ItemGroup> <AndroidEnvironment Include="Environment.txt" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\LibraryResources\LibraryResources.csproj"> <Project>{05768F39-7BAF-43E6-971E-712F5771E88E}</Project> <Name>LibraryResources</Name> </ProjectReference> </ItemGroup> </Project>
{ "pile_set_name": "Github" }
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== """DNC Cores. These modules create a DNC core. They take input, pass parameters to the memory access module, and integrate the output of memory to form an output. """ from __future__ import absolute_import, division, print_function import collections import numpy as np import tensorflow as tf import access import sonnet as snt DNCState = collections.namedtuple('DNCState', ('access_output', 'access_state', 'controller_state')) class DNC(snt.RNNCore): """DNC core module. Contains controller and memory access module. """ def __init__(self, access_config, controller_config, output_size, clip_value=None, name='dnc'): """Initializes the DNC core. Args: access_config: dictionary of access module configurations. controller_config: dictionary of controller (LSTM) module configurations. output_size: output dimension size of core. clip_value: clips controller and core output values to between `[-clip_value, clip_value]` if specified. name: module name (default 'dnc'). Raises: TypeError: if direct_input_size is not None for any access module other than KeyValueMemory. """ super(DNC, self).__init__(name=name) with self._enter_variable_scope(): self._controller = snt.LSTM(**controller_config) self._access = access.MemoryAccess(**access_config) self._access_output_size = np.prod(self._access.output_size.as_list()) self._output_size = output_size self._clip_value = clip_value or 0 self._output_size = tf.TensorShape([output_size]) self._state_size = DNCState( access_output=self._access_output_size, access_state=self._access.state_size, controller_state=self._controller.state_size) def _clip_if_enabled(self, x): if self._clip_value > 0: return tf.clip_by_value(x, -self._clip_value, self._clip_value) else: return x def _build(self, inputs, prev_state): """Connects the DNC core into the graph. Args: inputs: Tensor input. prev_state: A `DNCState` tuple containing the fields `access_output`, `access_state` and `controller_state`. `access_state` is a 3-D Tensor of shape `[batch_size, num_reads, word_size]` containing read words. `access_state` is a tuple of the access module's state, and `controller_state` is a tuple of controller module's state. Returns: A tuple `(output, next_state)` where `output` is a tensor and `next_state` is a `DNCState` tuple containing the fields `access_output`, `access_state`, and `controller_state`. """ prev_access_output = prev_state.access_output prev_access_state = prev_state.access_state prev_controller_state = prev_state.controller_state batch_flatten = snt.BatchFlatten() controller_input = tf.concat( [batch_flatten(inputs), batch_flatten(prev_access_output)], 1) controller_output, controller_state = self._controller( controller_input, prev_controller_state) controller_output = self._clip_if_enabled(controller_output) controller_state = snt.nest.map(self._clip_if_enabled, controller_state) access_output, access_state = self._access(controller_output, prev_access_state) output = tf.concat([controller_output, batch_flatten(access_output)], 1) output = snt.Linear( output_size=self._output_size.as_list()[0], name='output_linear')(output) output = self._clip_if_enabled(output) return output, DNCState( access_output=access_output, access_state=access_state, controller_state=controller_state) def initial_state(self, batch_size, dtype=tf.float32): return DNCState( controller_state=self._controller.initial_state(batch_size, dtype), access_state=self._access.initial_state(batch_size, dtype), access_output=tf.zeros( [batch_size] + self._access.output_size.as_list(), dtype)) @property def state_size(self): return self._state_size @property def output_size(self): return self._output_size
{ "pile_set_name": "Github" }
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Tests")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Tests")] [assembly: AssemblyCopyright("Copyright © 2013")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("7c7c72e6-bf10-4db9-82df-3fc57c3d2dd0")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <!-- This file is automatically generated by Visual Studio .Net. It is used to store generic object data source configuration information. Renaming the file extension or editing the content of this file may cause the file to be unrecognizable by the program. --> <GenericObjectDataSource DisplayName="Task" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> <TypeInfo>AlanJuden.MvcReportViewer.ReportService.Task, Web References.ReportService.Reference.cs.dll, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> </GenericObjectDataSource>
{ "pile_set_name": "Github" }
/* * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <react/components/view/ViewProps.h> #include <react/core/propsConversions.h> #include <react/graphics/Color.h> #include <react/imagemanager/primitives.h> #include <cinttypes> #include <vector> namespace facebook { namespace react { struct AndroidDialogPickerItemsStruct { std::string label; int color; }; static inline void fromRawValue( const RawValue &value, AndroidDialogPickerItemsStruct &result) { auto map = (better::map<std::string, RawValue>)value; auto label = map.find("label"); if (label != map.end()) { fromRawValue(label->second, result.label); } auto color = map.find("color"); // C++ props are not used on Android at the moment, so we can leave // result.color uninitialized if the JS prop has a null value. TODO: revisit // this once we start using C++ props on Android. if (color != map.end() && color->second.hasValue()) { fromRawValue(color->second, result.color); } } static inline std::string toString( const AndroidDialogPickerItemsStruct &value) { return "[Object AndroidDialogPickerItemsStruct]"; } static inline void fromRawValue( const RawValue &value, std::vector<AndroidDialogPickerItemsStruct> &result) { auto items = (std::vector<RawValue>)value; for (const auto &item : items) { AndroidDialogPickerItemsStruct newItem; fromRawValue(item, newItem); result.emplace_back(newItem); } } class AndroidDialogPickerProps final : public ViewProps { public: AndroidDialogPickerProps() = default; AndroidDialogPickerProps( const AndroidDialogPickerProps &sourceProps, const RawProps &rawProps); #pragma mark - Props const SharedColor color{}; const bool enabled{true}; const std::vector<AndroidDialogPickerItemsStruct> items{}; const std::string prompt{""}; const int selected{0}; }; } // namespace react } // namespace facebook
{ "pile_set_name": "Github" }
/* * Dummy C program to hand to g-ir-scanner for finding the * Activatable classes. * */ # include <girepository.h> # include "astroid_activatable.h" int main (int argc, char ** argv) { GOptionContext *ctx; GError *error = NULL; ctx = g_option_context_new (NULL); g_option_context_add_group (ctx, g_irepository_get_option_group ()); if (!g_option_context_parse (ctx, &argc, &argv, &error)) { g_print ("astroid girmain: %s\n", error->message); return 1; } return 0; }
{ "pile_set_name": "Github" }
<p>{{myData
{ "pile_set_name": "Github" }
/** * Range.js * * Copyright 2009, Moxiecode Systems AB * Released under LGPL License. * * License: http://tinymce.moxiecode.com/license * Contributing: http://tinymce.moxiecode.com/contributing */ (function(ns) { // Range constructor function Range(dom) { var t = this, doc = dom.doc, EXTRACT = 0, CLONE = 1, DELETE = 2, TRUE = true, FALSE = false, START_OFFSET = 'startOffset', START_CONTAINER = 'startContainer', END_CONTAINER = 'endContainer', END_OFFSET = 'endOffset', extend = tinymce.extend, nodeIndex = dom.nodeIndex; extend(t, { // Inital states startContainer : doc, startOffset : 0, endContainer : doc, endOffset : 0, collapsed : TRUE, commonAncestorContainer : doc, // Range constants START_TO_START : 0, START_TO_END : 1, END_TO_END : 2, END_TO_START : 3, // Public methods setStart : setStart, setEnd : setEnd, setStartBefore : setStartBefore, setStartAfter : setStartAfter, setEndBefore : setEndBefore, setEndAfter : setEndAfter, collapse : collapse, selectNode : selectNode, selectNodeContents : selectNodeContents, compareBoundaryPoints : compareBoundaryPoints, deleteContents : deleteContents, extractContents : extractContents, cloneContents : cloneContents, insertNode : insertNode, surroundContents : surroundContents, cloneRange : cloneRange }); function setStart(n, o) { _setEndPoint(TRUE, n, o); }; function setEnd(n, o) { _setEndPoint(FALSE, n, o); }; function setStartBefore(n) { setStart(n.parentNode, nodeIndex(n)); }; function setStartAfter(n) { setStart(n.parentNode, nodeIndex(n) + 1); }; function setEndBefore(n) { setEnd(n.parentNode, nodeIndex(n)); }; function setEndAfter(n) { setEnd(n.parentNode, nodeIndex(n) + 1); }; function collapse(ts) { if (ts) { t[END_CONTAINER] = t[START_CONTAINER]; t[END_OFFSET] = t[START_OFFSET]; } else { t[START_CONTAINER] = t[END_CONTAINER]; t[START_OFFSET] = t[END_OFFSET]; } t.collapsed = TRUE; }; function selectNode(n) { setStartBefore(n); setEndAfter(n); }; function selectNodeContents(n) { setStart(n, 0); setEnd(n, n.nodeType === 1 ? n.childNodes.length : n.nodeValue.length); }; function compareBoundaryPoints(h, r) { var sc = t[START_CONTAINER], so = t[START_OFFSET], ec = t[END_CONTAINER], eo = t[END_OFFSET], rsc = r.startContainer, rso = r.startOffset, rec = r.endContainer, reo = r.endOffset; // Check START_TO_START if (h === 0) return _compareBoundaryPoints(sc, so, rsc, rso); // Check START_TO_END if (h === 1) return _compareBoundaryPoints(ec, eo, rsc, rso); // Check END_TO_END if (h === 2) return _compareBoundaryPoints(ec, eo, rec, reo); // Check END_TO_START if (h === 3) return _compareBoundaryPoints(sc, so, rec, reo); }; function deleteContents() { _traverse(DELETE); }; function extractContents() { return _traverse(EXTRACT); }; function cloneContents() { return _traverse(CLONE); }; function insertNode(n) { var startContainer = this[START_CONTAINER], startOffset = this[START_OFFSET], nn, o; // Node is TEXT_NODE or CDATA if ((startContainer.nodeType === 3 || startContainer.nodeType === 4) && startContainer.nodeValue) { if (!startOffset) { // At the start of text startContainer.parentNode.insertBefore(n, startContainer); } else if (startOffset >= startContainer.nodeValue.length) { // At the end of text dom.insertAfter(n, startContainer); } else { // Middle, need to split nn = startContainer.splitText(startOffset); startContainer.parentNode.insertBefore(n, nn); } } else { // Insert element node if (startContainer.childNodes.length > 0) o = startContainer.childNodes[startOffset]; if (o) startContainer.insertBefore(n, o); else startContainer.appendChild(n); } }; function surroundContents(n) { var f = t.extractContents(); t.insertNode(n); n.appendChild(f); t.selectNode(n); }; function cloneRange() { return extend(new Range(dom), { startContainer : t[START_CONTAINER], startOffset : t[START_OFFSET], endContainer : t[END_CONTAINER], endOffset : t[END_OFFSET], collapsed : t.collapsed, commonAncestorContainer : t.commonAncestorContainer }); }; // Private methods function _getSelectedNode(container, offset) { var child; if (container.nodeType == 3 /* TEXT_NODE */) return container; if (offset < 0) return container; child = container.firstChild; while (child && offset > 0) { --offset; child = child.nextSibling; } if (child) return child; return container; }; function _isCollapsed() { return (t[START_CONTAINER] == t[END_CONTAINER] && t[START_OFFSET] == t[END_OFFSET]); }; function _compareBoundaryPoints(containerA, offsetA, containerB, offsetB) { var c, offsetC, n, cmnRoot, childA, childB; // In the first case the boundary-points have the same container. A is before B // if its offset is less than the offset of B, A is equal to B if its offset is // equal to the offset of B, and A is after B if its offset is greater than the // offset of B. if (containerA == containerB) { if (offsetA == offsetB) return 0; // equal if (offsetA < offsetB) return -1; // before return 1; // after } // In the second case a child node C of the container of A is an ancestor // container of B. In this case, A is before B if the offset of A is less than or // equal to the index of the child node C and A is after B otherwise. c = containerB; while (c && c.parentNode != containerA) c = c.parentNode; if (c) { offsetC = 0; n = containerA.firstChild; while (n != c && offsetC < offsetA) { offsetC++; n = n.nextSibling; } if (offsetA <= offsetC) return -1; // before return 1; // after } // In the third case a child node C of the container of B is an ancestor container // of A. In this case, A is before B if the index of the child node C is less than // the offset of B and A is after B otherwise. c = containerA; while (c && c.parentNode != containerB) { c = c.parentNode; } if (c) { offsetC = 0; n = containerB.firstChild; while (n != c && offsetC < offsetB) { offsetC++; n = n.nextSibling; } if (offsetC < offsetB) return -1; // before return 1; // after } // In the fourth case, none of three other cases hold: the containers of A and B // are siblings or descendants of sibling nodes. In this case, A is before B if // the container of A is before the container of B in a pre-order traversal of the // Ranges' context tree and A is after B otherwise. cmnRoot = dom.findCommonAncestor(containerA, containerB); childA = containerA; while (childA && childA.parentNode != cmnRoot) childA = childA.parentNode; if (!childA) childA = cmnRoot; childB = containerB; while (childB && childB.parentNode != cmnRoot) childB = childB.parentNode; if (!childB) childB = cmnRoot; if (childA == childB) return 0; // equal n = cmnRoot.firstChild; while (n) { if (n == childA) return -1; // before if (n == childB) return 1; // after n = n.nextSibling; } }; function _setEndPoint(st, n, o) { var ec, sc; if (st) { t[START_CONTAINER] = n; t[START_OFFSET] = o; } else { t[END_CONTAINER] = n; t[END_OFFSET] = o; } // If one boundary-point of a Range is set to have a root container // other than the current one for the Range, the Range is collapsed to // the new position. This enforces the restriction that both boundary- // points of a Range must have the same root container. ec = t[END_CONTAINER]; while (ec.parentNode) ec = ec.parentNode; sc = t[START_CONTAINER]; while (sc.parentNode) sc = sc.parentNode; if (sc == ec) { // The start position of a Range is guaranteed to never be after the // end position. To enforce this restriction, if the start is set to // be at a position after the end, the Range is collapsed to that // position. if (_compareBoundaryPoints(t[START_CONTAINER], t[START_OFFSET], t[END_CONTAINER], t[END_OFFSET]) > 0) t.collapse(st); } else t.collapse(st); t.collapsed = _isCollapsed(); t.commonAncestorContainer = dom.findCommonAncestor(t[START_CONTAINER], t[END_CONTAINER]); }; function _traverse(how) { var c, endContainerDepth = 0, startContainerDepth = 0, p, depthDiff, startNode, endNode, sp, ep; if (t[START_CONTAINER] == t[END_CONTAINER]) return _traverseSameContainer(how); for (c = t[END_CONTAINER], p = c.parentNode; p; c = p, p = p.parentNode) { if (p == t[START_CONTAINER]) return _traverseCommonStartContainer(c, how); ++endContainerDepth; } for (c = t[START_CONTAINER], p = c.parentNode; p; c = p, p = p.parentNode) { if (p == t[END_CONTAINER]) return _traverseCommonEndContainer(c, how); ++startContainerDepth; } depthDiff = startContainerDepth - endContainerDepth; startNode = t[START_CONTAINER]; while (depthDiff > 0) { startNode = startNode.parentNode; depthDiff--; } endNode = t[END_CONTAINER]; while (depthDiff < 0) { endNode = endNode.parentNode; depthDiff++; } // ascend the ancestor hierarchy until we have a common parent. for (sp = startNode.parentNode, ep = endNode.parentNode; sp != ep; sp = sp.parentNode, ep = ep.parentNode) { startNode = sp; endNode = ep; } return _traverseCommonAncestors(startNode, endNode, how); }; function _traverseSameContainer(how) { var frag, s, sub, n, cnt, sibling, xferNode; if (how != DELETE) frag = doc.createDocumentFragment(); // If selection is empty, just return the fragment if (t[START_OFFSET] == t[END_OFFSET]) return frag; // Text node needs special case handling if (t[START_CONTAINER].nodeType == 3 /* TEXT_NODE */) { // get the substring s = t[START_CONTAINER].nodeValue; sub = s.substring(t[START_OFFSET], t[END_OFFSET]); // set the original text node to its new value if (how != CLONE) { t[START_CONTAINER].deleteData(t[START_OFFSET], t[END_OFFSET] - t[START_OFFSET]); // Nothing is partially selected, so collapse to start point t.collapse(TRUE); } if (how == DELETE) return; frag.appendChild(doc.createTextNode(sub)); return frag; } // Copy nodes between the start/end offsets. n = _getSelectedNode(t[START_CONTAINER], t[START_OFFSET]); cnt = t[END_OFFSET] - t[START_OFFSET]; while (cnt > 0) { sibling = n.nextSibling; xferNode = _traverseFullySelected(n, how); if (frag) frag.appendChild( xferNode ); --cnt; n = sibling; } // Nothing is partially selected, so collapse to start point if (how != CLONE) t.collapse(TRUE); return frag; }; function _traverseCommonStartContainer(endAncestor, how) { var frag, n, endIdx, cnt, sibling, xferNode; if (how != DELETE) frag = doc.createDocumentFragment(); n = _traverseRightBoundary(endAncestor, how); if (frag) frag.appendChild(n); endIdx = nodeIndex(endAncestor); cnt = endIdx - t[START_OFFSET]; if (cnt <= 0) { // Collapse to just before the endAncestor, which // is partially selected. if (how != CLONE) { t.setEndBefore(endAncestor); t.collapse(FALSE); } return frag; } n = endAncestor.previousSibling; while (cnt > 0) { sibling = n.previousSibling; xferNode = _traverseFullySelected(n, how); if (frag) frag.insertBefore(xferNode, frag.firstChild); --cnt; n = sibling; } // Collapse to just before the endAncestor, which // is partially selected. if (how != CLONE) { t.setEndBefore(endAncestor); t.collapse(FALSE); } return frag; }; function _traverseCommonEndContainer(startAncestor, how) { var frag, startIdx, n, cnt, sibling, xferNode; if (how != DELETE) frag = doc.createDocumentFragment(); n = _traverseLeftBoundary(startAncestor, how); if (frag) frag.appendChild(n); startIdx = nodeIndex(startAncestor); ++startIdx; // Because we already traversed it cnt = t[END_OFFSET] - startIdx; n = startAncestor.nextSibling; while (cnt > 0) { sibling = n.nextSibling; xferNode = _traverseFullySelected(n, how); if (frag) frag.appendChild(xferNode); --cnt; n = sibling; } if (how != CLONE) { t.setStartAfter(startAncestor); t.collapse(TRUE); } return frag; }; function _traverseCommonAncestors(startAncestor, endAncestor, how) { var n, frag, commonParent, startOffset, endOffset, cnt, sibling, nextSibling; if (how != DELETE) frag = doc.createDocumentFragment(); n = _traverseLeftBoundary(startAncestor, how); if (frag) frag.appendChild(n); commonParent = startAncestor.parentNode; startOffset = nodeIndex(startAncestor); endOffset = nodeIndex(endAncestor); ++startOffset; cnt = endOffset - startOffset; sibling = startAncestor.nextSibling; while (cnt > 0) { nextSibling = sibling.nextSibling; n = _traverseFullySelected(sibling, how); if (frag) frag.appendChild(n); sibling = nextSibling; --cnt; } n = _traverseRightBoundary(endAncestor, how); if (frag) frag.appendChild(n); if (how != CLONE) { t.setStartAfter(startAncestor); t.collapse(TRUE); } return frag; }; function _traverseRightBoundary(root, how) { var next = _getSelectedNode(t[END_CONTAINER], t[END_OFFSET] - 1), parent, clonedParent, prevSibling, clonedChild, clonedGrandParent, isFullySelected = next != t[END_CONTAINER]; if (next == root) return _traverseNode(next, isFullySelected, FALSE, how); parent = next.parentNode; clonedParent = _traverseNode(parent, FALSE, FALSE, how); while (parent) { while (next) { prevSibling = next.previousSibling; clonedChild = _traverseNode(next, isFullySelected, FALSE, how); if (how != DELETE) clonedParent.insertBefore(clonedChild, clonedParent.firstChild); isFullySelected = TRUE; next = prevSibling; } if (parent == root) return clonedParent; next = parent.previousSibling; parent = parent.parentNode; clonedGrandParent = _traverseNode(parent, FALSE, FALSE, how); if (how != DELETE) clonedGrandParent.appendChild(clonedParent); clonedParent = clonedGrandParent; } }; function _traverseLeftBoundary(root, how) { var next = _getSelectedNode(t[START_CONTAINER], t[START_OFFSET]), isFullySelected = next != t[START_CONTAINER], parent, clonedParent, nextSibling, clonedChild, clonedGrandParent; if (next == root) return _traverseNode(next, isFullySelected, TRUE, how); parent = next.parentNode; clonedParent = _traverseNode(parent, FALSE, TRUE, how); while (parent) { while (next) { nextSibling = next.nextSibling; clonedChild = _traverseNode(next, isFullySelected, TRUE, how); if (how != DELETE) clonedParent.appendChild(clonedChild); isFullySelected = TRUE; next = nextSibling; } if (parent == root) return clonedParent; next = parent.nextSibling; parent = parent.parentNode; clonedGrandParent = _traverseNode(parent, FALSE, TRUE, how); if (how != DELETE) clonedGrandParent.appendChild(clonedParent); clonedParent = clonedGrandParent; } }; function _traverseNode(n, isFullySelected, isLeft, how) { var txtValue, newNodeValue, oldNodeValue, offset, newNode; if (isFullySelected) return _traverseFullySelected(n, how); if (n.nodeType == 3 /* TEXT_NODE */) { txtValue = n.nodeValue; if (isLeft) { offset = t[START_OFFSET]; newNodeValue = txtValue.substring(offset); oldNodeValue = txtValue.substring(0, offset); } else { offset = t[END_OFFSET]; newNodeValue = txtValue.substring(0, offset); oldNodeValue = txtValue.substring(offset); } if (how != CLONE) n.nodeValue = oldNodeValue; if (how == DELETE) return; newNode = n.cloneNode(FALSE); newNode.nodeValue = newNodeValue; return newNode; } if (how == DELETE) return; return n.cloneNode(FALSE); }; function _traverseFullySelected(n, how) { if (how != DELETE) return how == CLONE ? n.cloneNode(TRUE) : n; n.parentNode.removeChild(n); }; }; ns.Range = Range; })(tinymce.dom);
{ "pile_set_name": "Github" }
# ms.js: miliseconds conversion utility ```js ms('2 days') // 172800000 ms('1d') // 86400000 ms('10h') // 36000000 ms('2.5 hrs') // 9000000 ms('2h') // 7200000 ms('1m') // 60000 ms('5s') // 5000 ms('100') // 100 ``` ```js ms(60000) // "1m" ms(2 * 60000) // "2m" ms(ms('10 hours')) // "10h" ``` ```js ms(60000, { long: true }) // "1 minute" ms(2 * 60000, { long: true }) // "2 minutes" ms(ms('10 hours'), { long: true }) // "10 hours" ``` - Node/Browser compatible. Published as [`ms`](https://www.npmjs.org/package/ms) in [NPM](http://nodejs.org/download). - If a number is supplied to `ms`, a string with a unit is returned. - If a string that contains the number is supplied, it returns it as a number (e.g: it returns `100` for `'100'`). - If you pass a string with a number and a valid unit, the number of equivalent ms is returned. ## License MIT
{ "pile_set_name": "Github" }
<?php namespace ManaPHP\Exception; use ManaPHP\Exception; class RuntimeException extends Exception { }
{ "pile_set_name": "Github" }
/* * Copyright (C) 2005-2018 Team Kodi * This file is part of Kodi - https://kodi.tv * * SPDX-License-Identifier: GPL-2.0-or-later * See LICENSES/README.md for more information. */ #include "CryptThreading.h" #include "threads/Thread.h" #include "utils/log.h" #include <openssl/crypto.h> //! @todo Remove support for OpenSSL <1.0 in v19 #define KODI_OPENSSL_NEEDS_LOCK_CALLBACK (OPENSSL_VERSION_NUMBER < 0x10100000L) #define KODI_OPENSSL_USE_THREADID (OPENSSL_VERSION_NUMBER >= 0x10000000L) #if KODI_OPENSSL_NEEDS_LOCK_CALLBACK namespace { CCriticalSection* getlock(int index) { return g_cryptThreadingInitializer.GetLock(index); } void lock_callback(int mode, int type, const char* file, int line) { if (mode & CRYPTO_LOCK) getlock(type)->lock(); else getlock(type)->unlock(); } #if KODI_OPENSSL_USE_THREADID void thread_id(CRYPTO_THREADID* tid) { // C-style cast required due to vastly differing native ID return types CRYPTO_THREADID_set_numeric(tid, (unsigned long)CThread::GetCurrentThreadId()); } #else unsigned long thread_id() { // C-style cast required due to vastly differing native ID return types return (unsigned long)CThread::GetCurrentThreadId(); } #endif } #endif CryptThreadingInitializer::CryptThreadingInitializer() { #if KODI_OPENSSL_NEEDS_LOCK_CALLBACK // OpenSSL < 1.1 needs integration code to support multi-threading // This is absolutely required for libcurl if it uses the OpenSSL backend m_locks.resize(CRYPTO_num_locks()); #if KODI_OPENSSL_USE_THREADID CRYPTO_THREADID_set_callback(thread_id); #else CRYPTO_set_id_callback(thread_id); #endif CRYPTO_set_locking_callback(lock_callback); #endif } CryptThreadingInitializer::~CryptThreadingInitializer() { #if KODI_OPENSSL_NEEDS_LOCK_CALLBACK CSingleLock l(m_locksLock); #if !KODI_OPENSSL_USE_THREADID CRYPTO_set_id_callback(nullptr); #endif CRYPTO_set_locking_callback(nullptr); m_locks.clear(); #endif } CCriticalSection* CryptThreadingInitializer::GetLock(int index) { CSingleLock l(m_locksLock); auto& curlock = m_locks[index]; if (!curlock) { curlock.reset(new CCriticalSection()); } return curlock.get(); }
{ "pile_set_name": "Github" }
// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve < %s \ // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \ // RUN: | FileCheck %s --check-prefix=CHECK-ERROR // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \ // RUN: | llvm-objdump -d -mattr=+sve - | FileCheck %s --check-prefix=CHECK-INST // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve < %s \ // RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN fcmeq p0.h, p0/z, z0.h, #0.0 // CHECK-INST: fcmeq p0.h, p0/z, z0.h, #0.0 // CHECK-ENCODING: [0x00,0x20,0x52,0x65] // CHECK-ERROR: instruction requires: sve // CHECK-UNKNOWN: 00 20 52 65 <unknown> fcmeq p0.s, p0/z, z0.s, #0.0 // CHECK-INST: fcmeq p0.s, p0/z, z0.s, #0.0 // CHECK-ENCODING: [0x00,0x20,0x92,0x65] // CHECK-ERROR: instruction requires: sve // CHECK-UNKNOWN: 00 20 92 65 <unknown> fcmeq p0.d, p0/z, z0.d, #0.0 // CHECK-INST: fcmeq p0.d, p0/z, z0.d, #0.0 // CHECK-ENCODING: [0x00,0x20,0xd2,0x65] // CHECK-ERROR: instruction requires: sve // CHECK-UNKNOWN: 00 20 d2 65 <unknown> fcmeq p0.h, p0/z, z0.h, z1.h // CHECK-INST: fcmeq p0.h, p0/z, z0.h, z1.h // CHECK-ENCODING: [0x00,0x60,0x41,0x65] // CHECK-ERROR: instruction requires: sve // CHECK-UNKNOWN: 00 60 41 65 <unknown> fcmeq p0.s, p0/z, z0.s, z1.s // CHECK-INST: fcmeq p0.s, p0/z, z0.s, z1.s // CHECK-ENCODING: [0x00,0x60,0x81,0x65] // CHECK-ERROR: instruction requires: sve // CHECK-UNKNOWN: 00 60 81 65 <unknown> fcmeq p0.d, p0/z, z0.d, z1.d // CHECK-INST: fcmeq p0.d, p0/z, z0.d, z1.d // CHECK-ENCODING: [0x00,0x60,0xc1,0x65] // CHECK-ERROR: instruction requires: sve // CHECK-UNKNOWN: 00 60 c1 65 <unknown>
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <!-- ~ Copyright 2016 chronicle.software ~ ~ 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. --> <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <parent> <groupId>net.openhft</groupId> <artifactId>java-parent-pom</artifactId> <version>1.1.23</version> <relativePath/> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>compiler</artifactId> <version>2.3.7-SNAPSHOT</version> <packaging>bundle</packaging> <name>OpenHFT/Java-Runtime-Compiler</name> <description>Java Runtime Compiler library.</description> <dependencyManagement> <dependencies> <dependency> <groupId>net.openhft</groupId> <artifactId>third-party-bom</artifactId> <type>pom</type> <version>3.19.2</version> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> <dependencies> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> </dependency> <dependency> <groupId>org.jetbrains</groupId> <artifactId>annotations</artifactId> </dependency> <dependency> <groupId>org.easymock</groupId> <artifactId>easymock</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-simple</artifactId> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.1</version> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>3.0.0</version> <executions> <execution> <id>compiler-test</id> <phase>integration-test</phase> <goals> <goal>exec</goal> </goals> </execution> </executions> <configuration> <classpathScope>test</classpathScope> <executable>java</executable> <arguments> <argument>-classpath</argument> <classpath/> <argument>net.openhft.compiler.CompilerTest</argument> </arguments> </configuration> </plugin> <!-- generate maven dependencies versions file that can be used later to install the right bundle in test phase. The file is: target/classes/META-INF/maven/dependencies.properties --> <plugin> <groupId>org.apache.servicemix.tooling</groupId> <artifactId>depends-maven-plugin</artifactId> <version>1.4.0</version> <executions> <execution> <id>generate-depends-file</id> <goals> <goal>generate-depends-file</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <version>5.1.1</version> <extensions>true</extensions> <configuration> <instructions> <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName> <Bundle-Name>OpenHFT :: ${project.artifactId}</Bundle-Name> <Bundle-Version>${project.version}</Bundle-Version> <Export-Package> net.openhft.compiler.*;-noimport:=true </Export-Package> </instructions> </configuration> <executions> <!-- This execution makes sure that the manifest is available when the tests are executed --> <execution> <goals> <goal>manifest</goal> </goals> </execution> </executions> </plugin> </plugins> </build> <scm> <url>scm:git:[email protected]:OpenHFT/Java-Runtime-Compiler.git</url> <connection>scm:git:[email protected]:OpenHFT/Java-Runtime-Compiler.git</connection> <developerConnection>scm:git:[email protected]:OpenHFT/Java-Runtime-Compiler.git </developerConnection> <tag>master</tag> </scm> </project>
{ "pile_set_name": "Github" }
import BuildArtifacts import RunnerModels import SimulatorPoolModels public struct RuntimeDumpApplicationTestSupport: Hashable { /** Path to hosting application*/ public let appBundle: AppBundleLocation /** Path to Fbsimctl to run simulator*/ public let simulatorControlTool: SimulatorControlTool public init( appBundle: AppBundleLocation, simulatorControlTool: SimulatorControlTool ) { self.appBundle = appBundle self.simulatorControlTool = simulatorControlTool } }
{ "pile_set_name": "Github" }
// SPDX-License-Identifier: GPL-2.0-only /* * Copyright 2014, Michael Ellerman, IBM Corp. */ #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <sys/types.h> #include <sys/wait.h> #include <unistd.h> #include "ebb.h" /* * Tests a cpu event vs an EBB - in that order. The EBB should force the cpu * event off the PMU. */ static int setup_cpu_event(struct event *event, int cpu) { event_init_named(event, 0x400FA, "PM_RUN_INST_CMPL"); event->attr.exclude_kernel = 1; event->attr.exclude_hv = 1; event->attr.exclude_idle = 1; SKIP_IF(require_paranoia_below(1)); FAIL_IF(event_open_with_cpu(event, cpu)); FAIL_IF(event_enable(event)); return 0; } int cpu_event_vs_ebb(void) { union pipe read_pipe, write_pipe; struct event event; int cpu, rc; pid_t pid; SKIP_IF(!ebb_is_supported()); cpu = pick_online_cpu(); FAIL_IF(cpu < 0); FAIL_IF(bind_to_cpu(cpu)); FAIL_IF(pipe(read_pipe.fds) == -1); FAIL_IF(pipe(write_pipe.fds) == -1); pid = fork(); if (pid == 0) { /* NB order of pipes looks reversed */ exit(ebb_child(write_pipe, read_pipe)); } /* We setup the cpu event first */ rc = setup_cpu_event(&event, cpu); if (rc) { kill_child_and_wait(pid); return rc; } /* Signal the child to install its EBB event and wait */ if (sync_with_child(read_pipe, write_pipe)) /* If it fails, wait for it to exit */ goto wait; /* Signal the child to run */ FAIL_IF(sync_with_child(read_pipe, write_pipe)); wait: /* We expect the child to succeed */ FAIL_IF(wait_for_child(pid)); FAIL_IF(event_disable(&event)); FAIL_IF(event_read(&event)); event_report(&event); /* The cpu event may have run */ return 0; } int main(void) { return test_harness(cpu_event_vs_ebb, "cpu_event_vs_ebb"); }
{ "pile_set_name": "Github" }
# Folio-UI-Collection UI components and live documentation for Folio iOS app <img src="https://user-images.githubusercontent.com/40610/44827008-1aaf7b00-ac4c-11e8-83ba-c5fa4572b6e2.png" width=320> <img src="https://user-images.githubusercontent.com/40610/44827011-1c793e80-ac4c-11e8-888b-b72330f669c1.png" width=320> <img src="https://user-images.githubusercontent.com/40610/44827012-1daa6b80-ac4c-11e8-9a33-912bb52621cd.png" width=320> <img src="https://user-images.githubusercontent.com/40610/44827014-21d68900-ac4c-11e8-92c4-5fcc3d49aba1.png" width=320> <img src="https://user-images.githubusercontent.com/40610/44827016-2307b600-ac4c-11e8-9173-c8816530a995.png" width=320> <img src="https://user-images.githubusercontent.com/40610/44827018-2438e300-ac4c-11e8-84fd-26d55ba417ff.png" width=320> <img src="https://user-images.githubusercontent.com/40610/44827026-29962d80-ac4c-11e8-8f24-c9dd1bd94e7c.png" width=320> <img src="https://user-images.githubusercontent.com/40610/46520335-912c4200-c8b6-11e8-8ce7-2f4b62c06f46.gif" width=320> ## Dark Theme <img src="https://user-images.githubusercontent.com/40610/66788380-54ac1100-ef22-11e9-8c6f-df78819945be.png" width=600px>
{ "pile_set_name": "Github" }
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright (c) 1997-2017 Oracle and/or its affiliates. All rights reserved. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common Development * and Distribution License("CDDL") (collectively, the "License"). You * may not use this file except in compliance with the License. You can * obtain a copy of the License at * https://oss.oracle.com/licenses/CDDL+GPL-1.1 * or LICENSE.txt. See the License for the specific * language governing permissions and limitations under the License. * * When distributing the software, include this License Header Notice in each * file and include the License file at LICENSE.txt. * * GPL Classpath Exception: * Oracle designates this particular file as subject to the "Classpath" * exception as provided by Oracle in the GPL Version 2 section of the License * file that accompanied this code. * * Modifications: * If applicable, add the following below the License Header, with the fields * enclosed by brackets [] replaced by your own identifying information: * "Portions Copyright [year] [name of copyright owner]" * * Contributor(s): * If you wish your version of this file to be governed by only the CDDL or * only the GPL Version 2, indicate your decision by adding "[Contributor] * elects to include this software in this distribution under the [CDDL or GPL * Version 2] license." If you don't indicate a single choice of license, a * recipient has the option to distribute your version of this file under * either the CDDL, the GPL Version 2 or to extend the choice of license to * its licensees as provided above. However, if you add GPL Version 2 code * and therefore, elected the GPL Version 2 license, then the option applies * only if the new code is made subject to such option by the copyright * holder. */ package com.sun.xml.bind.v2.model.nav; import java.lang.reflect.GenericArrayType; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.lang.reflect.TypeVariable; import java.lang.reflect.WildcardType; /** * @author Kohsuke Kawaguchi */ abstract class TypeVisitor<T,P> { public final T visit( Type t, P param ) { assert t!=null; if (t instanceof Class) return onClass((Class)t,param); if (t instanceof ParameterizedType) return onParameterizdType( (ParameterizedType)t,param); if(t instanceof GenericArrayType) return onGenericArray((GenericArrayType)t,param); if(t instanceof WildcardType) return onWildcard((WildcardType)t,param); if(t instanceof TypeVariable) return onVariable((TypeVariable)t,param); // covered all the cases assert false; throw new IllegalArgumentException(); } protected abstract T onClass(Class c, P param); protected abstract T onParameterizdType(ParameterizedType p, P param); protected abstract T onGenericArray(GenericArrayType g, P param); protected abstract T onVariable(TypeVariable v, P param); protected abstract T onWildcard(WildcardType w, P param); }
{ "pile_set_name": "Github" }
/* * board initialization should put one of these into dev->platform_data * and place the isp1760 onto platform_bus named "isp1760-hcd". */ #ifndef __LINUX_USB_ISP1760_H #define __LINUX_USB_ISP1760_H struct isp1760_platform_data { unsigned is_isp1761:1; /* Chip is ISP1761 */ unsigned bus_width_16:1; /* 16/32-bit data bus width */ unsigned port1_otg:1; /* Port 1 supports OTG */ unsigned analog_oc:1; /* Analog overcurrent */ unsigned dack_polarity_high:1; /* DACK active high */ unsigned dreq_polarity_high:1; /* DREQ active high */ }; #endif /* __LINUX_USB_ISP1760_H */
{ "pile_set_name": "Github" }
/* Copyright (C) 1999-2020 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger <[email protected]>, 1999 and Jakub Jelinek <[email protected]>, 2000. The GNU C 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. The GNU C 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 the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ int process_elf32_file (const char *file_name, const char *lib, int *flag, unsigned int *osversion, char **soname, void *file_contents, size_t file_length); int process_elf64_file (const char *file_name, const char *lib, int *flag, unsigned int *osversion, char **soname, void *file_contents, size_t file_length); /* Returns 0 if everything is ok, != 0 in case of error. */ int process_elf_file (const char *file_name, const char *lib, int *flag, unsigned int *osversion, char **soname, void *file_contents, size_t file_length) { ElfW(Ehdr) *elf_header = (ElfW(Ehdr) *) file_contents; int ret, file_flag = 0; switch (elf_header->e_machine) { case EM_X86_64: if (elf_header->e_ident[EI_CLASS] == ELFCLASS64) /* X86-64 64bit libraries are always libc.so.6+. */ file_flag = FLAG_X8664_LIB64|FLAG_ELF_LIBC6; else /* X32 libraries are always libc.so.6+. */ file_flag = FLAG_X8664_LIBX32|FLAG_ELF_LIBC6; break; #ifndef SKIP_EM_IA_64 case EM_IA_64: if (elf_header->e_ident[EI_CLASS] == ELFCLASS64) { /* IA64 64bit libraries are always libc.so.6+. */ file_flag = FLAG_IA64_LIB64|FLAG_ELF_LIBC6; break; } goto failed; #endif case EM_386: if (elf_header->e_ident[EI_CLASS] == ELFCLASS32) break; /* Fall through. */ default: #ifndef SKIP_EM_IA_64 failed: #endif error (0, 0, _("%s is for unknown machine %d.\n"), file_name, elf_header->e_machine); return 1; } if (elf_header->e_ident[EI_CLASS] == ELFCLASS32) ret = process_elf32_file (file_name, lib, flag, osversion, soname, file_contents, file_length); else ret = process_elf64_file (file_name, lib, flag, osversion, soname, file_contents, file_length); if (!ret && file_flag) *flag = file_flag; return ret; } #undef __ELF_NATIVE_CLASS #undef process_elf_file #define process_elf_file process_elf32_file #define __ELF_NATIVE_CLASS 32 #include "elf/readelflib.c" #undef __ELF_NATIVE_CLASS #undef process_elf_file #define process_elf_file process_elf64_file #define __ELF_NATIVE_CLASS 64 #include "elf/readelflib.c"
{ "pile_set_name": "Github" }
@rem @rem Copyright 2015 the original author or authors. @rem @rem Licensed under the Apache License, Version 2.0 (the "License"); @rem you may not use this file except in compliance with the License. @rem You may obtain a copy of the License at @rem @rem https://www.apache.org/licenses/LICENSE-2.0 @rem @rem Unless required by applicable law or agreed to in writing, software @rem distributed under the License is distributed on an "AS IS" BASIS, @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem @if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @rem @rem ########################################################################## @rem Set local scope for the variables with windows NT shell if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @rem LUCENE-9471: workaround for gradle leaving junk temp. files behind. SET GRADLE_TEMPDIR=%DIRNAME%\.gradle\tmp IF NOT EXIST "%GRADLE_TEMPDIR%" MKDIR "%GRADLE_TEMPDIR%" SET DEFAULT_JVM_OPTS=%DEFAULT_JVM_OPTS% "-Djava.io.tmpdir=%GRADLE_TEMPDIR%" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if "%ERRORLEVEL%" == "0" goto init echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo. echo Please set the JAVA_HOME variable in your environment to match the echo location of your Java installation. goto fail :findJavaFromJavaHome set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto init echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo. echo Please set the JAVA_HOME variable in your environment to match the echo location of your Java installation. goto fail :init @rem Get command-line arguments, handling Windows variants if not "%OS%" == "Windows_NT" goto win9xME_args :win9xME_args @rem Slurp the command line arguments. set CMD_LINE_ARGS= set _SKIP=2 :win9xME_args_slurp if "x%~1" == "x" goto execute set CMD_LINE_ARGS=%* :execute @rem LUCENE-9266: verify and download the gradle wrapper jar if we don't have one. set GRADLE_WRAPPER_JAR=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar "%JAVA_EXE%" --source 11 "%APP_HOME%/buildSrc/src/main/java/org/apache/lucene/gradle/WrapperDownloader.java" "%GRADLE_WRAPPER_JAR%" IF %ERRORLEVEL% NEQ 0 goto fail @rem Setup the command line set CLASSPATH=%GRADLE_WRAPPER_JAR% @rem Don't fork a daemon mode on initial run that generates local defaults. SET GRADLE_DAEMON_CTRL= IF NOT EXIST "%DIRNAME%\gradle.properties" SET GRADLE_DAEMON_CTRL=--no-daemon @rem Execute Gradle "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %GRADLE_DAEMON_CTRL% %CMD_LINE_ARGS% :end @rem End local scope for the variables with windows NT shell if "%ERRORLEVEL%"=="0" goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 exit /b 1 :mainEnd if "%OS%"=="Windows_NT" endlocal :omega
{ "pile_set_name": "Github" }
<?php use Illuminate\Http\Request; use Illuminate\Support\Facades\Route; /* |-------------------------------------------------------------------------- | API Routes |-------------------------------------------------------------------------- | | Here is where you can register API routes for your application. These | routes are loaded by the RouteServiceProvider within a group which | is assigned the "api" middleware group. Enjoy building your API! | */ Route::middleware('auth:api')->get('/user', function (Request $request) { return $request->user(); });
{ "pile_set_name": "Github" }
/* * Copyright (c) Enalean, 2019 - Present. All Rights Reserved. * * This file is a part of Tuleap. * * Tuleap 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. * * Tuleap 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 Tuleap. If not, see <http://www.gnu.org/licenses/>. */ import angular from "angular"; import tuleap_pullrequest_module from "../../app.js"; import "angular-mocks"; import { createAngularPromiseWrapper } from "../../../../../../../tests/jest/angular-promise-wrapper.js"; describe("ReviewersService", () => { let $rootScope, $httpBackend, ReviewersService, TlpModalService, wrapPromise, pull_request; beforeEach(() => { angular.mock.module(tuleap_pullrequest_module); angular.mock.inject(function ( _$rootScope_, _$httpBackend_, _ReviewersService_, _TlpModalService_ ) { $rootScope = _$rootScope_; $httpBackend = _$httpBackend_; ReviewersService = _ReviewersService_; TlpModalService = _TlpModalService_; }); wrapPromise = createAngularPromiseWrapper($rootScope); pull_request = { id: 1, }; }); describe("getReviewers", () => { let expected_url; beforeEach(() => { expected_url = "/api/v1/pull_requests/" + pull_request.id + "/reviewers"; }); it("Given a pull request with no reviewer, then it will return an empty array", async () => { $httpBackend.expectGET(expected_url).respond({ users: [], }); const promise = wrapPromise(ReviewersService.getReviewers(pull_request)); $httpBackend.flush(); expect(await promise).toEqual([]); }); it("Given a pull request with 2 reviewers, then it will return an array with 2 users", async () => { $httpBackend.expectGET(expected_url).respond({ users: [ { id: 1, username: "lorem", }, { id: 2, username: "ipsum", }, ], }); const promise = wrapPromise(ReviewersService.getReviewers(pull_request)); $httpBackend.flush(); const result = await promise; expect(result.length).toEqual(2); expect(result[1].username).toEqual("ipsum"); }); }); describe("buildUserRepresentationsForPut", () => { it("Given an array of user representations, then it will return an array of PUT user representations based on user ids", () => { const user_representations = [ { avatar_url: "https://example.com/avatar.png", display_name: "Bob Lemoche (bob)", has_avatar: true, id: 102, is_anonymous: false, ldap_id: "102", real_name: "Bob Lemoche", uri: "users/102", user_url: "/users/bob", username: "bob", }, { avatar_url: "https://example.com/avatar.png", display_name: "Woody Bacon (woody)", email: "woody@test", has_avatar: false, id: 103, is_anonymous: false, ldap_id: "103", real_name: "Woody Bacon", selected: true, status: "A", uri: "users/103", user_url: "/users/woody", username: "woody", }, ]; const small_representations = ReviewersService.buildUserRepresentationsForPut( user_representations ); expect(small_representations).toEqual([{ id: 102 }, { id: 103 }]); }); }); describe("updateReviewers", () => { let expected_url, user_representations; beforeEach(() => { expected_url = "/api/v1/pull_requests/" + pull_request.id + "/reviewers"; user_representations = [{ id: 102 }, { id: 103 }]; }); it("Give a pull request and user representations with merge permissions, then it will call a REST route and return a 204 status", async () => { $httpBackend .expectPUT(expected_url, { users: user_representations, }) .respond(204); const promise = ReviewersService.updateReviewers(pull_request, user_representations); $httpBackend.flush(); const result = await wrapPromise(promise); expect(result.status).toEqual(204); }); it("Give a pull request and user representations with wrong permissions, then it will call a REST route and open error modal", async () => { jest.spyOn(TlpModalService, "open").mockImplementation(() => {}); $httpBackend.expectPUT(expected_url, { users: user_representations }).respond(400, { error: "Nope", }); const promise = ReviewersService.updateReviewers(pull_request, user_representations); $httpBackend.flush(); await wrapPromise(promise); expect(TlpModalService.open).toHaveBeenCalled(); }); }); });
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2010 The Android Open Source Project 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 dd 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. --> <android.support.v7.view.menu.ActionMenuItemView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:gravity="center" android:focusable="true" android:paddingTop="4dip" android:paddingBottom="4dip" android:paddingLeft="8dip" android:paddingRight="8dip" android:textAppearance="?attr/actionMenuTextAppearance" android:textColor="?attr/actionMenuTextColor" style="?attr/actionButtonStyle"/>
{ "pile_set_name": "Github" }
/* Copyright 2019 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. */ package fake import ( v1beta1 "k8s.io/api/events/v1beta1" types "k8s.io/apimachinery/pkg/types" core "k8s.io/client-go/testing" ) // CreateWithEventNamespace creats a new event. Returns the copy of the event the server returns, or an error. func (c *FakeEvents) CreateWithEventNamespace(event *v1beta1.Event) (*v1beta1.Event, error) { action := core.NewRootCreateAction(eventsResource, event) if c.ns != "" { action = core.NewCreateAction(eventsResource, c.ns, event) } obj, err := c.Fake.Invokes(action, event) if obj == nil { return nil, err } return obj.(*v1beta1.Event), err } // UpdateWithEventNamespace replaces an existing event. Returns the copy of the event the server returns, or an error. func (c *FakeEvents) UpdateWithEventNamespace(event *v1beta1.Event) (*v1beta1.Event, error) { action := core.NewRootUpdateAction(eventsResource, event) if c.ns != "" { action = core.NewUpdateAction(eventsResource, c.ns, event) } obj, err := c.Fake.Invokes(action, event) if obj == nil { return nil, err } return obj.(*v1beta1.Event), err } // PatchWithEventNamespace patches an existing event. Returns the copy of the event the server returns, or an error. func (c *FakeEvents) PatchWithEventNamespace(event *v1beta1.Event, data []byte) (*v1beta1.Event, error) { pt := types.StrategicMergePatchType action := core.NewRootPatchAction(eventsResource, event.Name, pt, data) if c.ns != "" { action = core.NewPatchAction(eventsResource, c.ns, event.Name, pt, data) } obj, err := c.Fake.Invokes(action, event) if obj == nil { return nil, err } return obj.(*v1beta1.Event), err }
{ "pile_set_name": "Github" }
if (`SELECT $PS_PROTOCOL + $SP_PROTOCOL + $CURSOR_PROTOCOL + $VIEW_PROTOCOL > 0`) { --skip Need normal protocol } # The main testing script --source suite/opt_trace/include/subquery.inc
{ "pile_set_name": "Github" }
class AssignContentHostToSmartProxies < ActiveRecord::Migration[4.2] def up SmartProxy.reset_column_information SmartProxy.all.each do |proxy| content_host = ::Katello::System.where(:name => proxy.name).order("created_at DESC").first if content_host proxy.content_host_id = content_host.id proxy.save! end end end def down SmartProxy.all.each do |proxy| proxy.content_host_id = nil proxy.save! end end end
{ "pile_set_name": "Github" }
package org.bndtools.core.editors.pkginfo; import org.bndtools.core.editors.BndResourceMarkerAnnotationModel; import org.eclipse.core.resources.IFile; import org.eclipse.jface.text.source.IAnnotationModel; import org.eclipse.ui.editors.text.TextFileDocumentProvider; public class PackageInfoDocumentProvider extends TextFileDocumentProvider { @Override protected IAnnotationModel createAnnotationModel(IFile file) { return new BndResourceMarkerAnnotationModel(file); } }
{ "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. */ package org.apache.sysds.runtime.data; import org.apache.commons.lang.math.IntRange; import org.apache.sysds.common.Types.ValueType; import org.apache.sysds.runtime.DMLRuntimeException; import java.io.Serializable; import java.util.Arrays; import java.util.stream.IntStream; import static org.apache.sysds.runtime.data.TensorBlock.DEFAULT_DIMS; public class DataTensorBlock implements Serializable { private static final long serialVersionUID = 3410679389807309521L; private static final int VALID_VALUE_TYPES_LENGTH = ValueType.values().length - 1; protected int[] _dims; protected BasicTensorBlock[] _colsdata = new BasicTensorBlock[VALID_VALUE_TYPES_LENGTH]; protected ValueType[] _schema = null; /** * Contains the (column) index in `_colsdata` for a certain column of the `DataTensor`. Which `_colsdata` to use is specified by the `_schema` */ protected int[] _colsToIx = null; /** * Contains the column of `DataTensor` an `_colsdata` (column) index corresponds to. */ protected int[][] _ixToCols = null; public DataTensorBlock() { this(new ValueType[0], DEFAULT_DIMS); } public DataTensorBlock(int ncols, ValueType vt) { this(vt, new int[]{0, ncols}); } public DataTensorBlock(ValueType[] schema) { _dims = new int[]{0, schema.length}; _schema = schema; _colsToIx = new int[_schema.length]; _ixToCols = new int[VALID_VALUE_TYPES_LENGTH][]; int[] typeIxCounter = new int[VALID_VALUE_TYPES_LENGTH]; for (int i = 0; i < schema.length; i++) { int type = schema[i].ordinal(); _colsToIx[i] = typeIxCounter[type]++; } for (int i = 0; i < schema.length; i++) { int type = schema[i].ordinal(); if (_ixToCols[type] == null) { _ixToCols[type] = new int[typeIxCounter[type]]; typeIxCounter[type] = 0; } _ixToCols[type][typeIxCounter[type]++] = i; } } public DataTensorBlock(ValueType[] schema, int[] dims) { _dims = dims; _schema = schema; _colsToIx = new int[_schema.length]; _ixToCols = new int[VALID_VALUE_TYPES_LENGTH][]; int[] typeIxCounter = new int[VALID_VALUE_TYPES_LENGTH]; for (int i = 0; i < schema.length; i++) { int type = schema[i].ordinal(); _colsToIx[i] = typeIxCounter[type]++; } for (int i = 0; i < schema.length; i++) { int type = schema[i].ordinal(); if (_ixToCols[type] == null) { _ixToCols[type] = new int[typeIxCounter[type]]; typeIxCounter[type] = 0; } _ixToCols[type][typeIxCounter[type]++] = i; } reset(); } public DataTensorBlock(ValueType vt, int[] dims) { _dims = dims; _schema = new ValueType[getDim(1)]; Arrays.fill(_schema, vt); _colsToIx = new IntRange(0, getDim(1)).toArray(); _ixToCols = new int[VALID_VALUE_TYPES_LENGTH][]; _ixToCols[vt.ordinal()] = new IntRange(0, getDim(1)).toArray(); reset(); } public DataTensorBlock(ValueType[] schema, int[] dims, String[][] data) { this(schema, dims); allocateBlock(); for (int i = 0; i < schema.length; i++) { int[] ix = new int[dims.length]; ix[1] = _colsToIx[i]; BasicTensorBlock current = _colsdata[schema[i].ordinal()]; for (int j = 0; j < data[i].length; j++) { current.set(ix, data[i][j]); TensorBlock.getNextIndexes(_dims, ix); if (ix[1] != _colsToIx[i]) { // We want to stay in the current column if (ix[1] == 0) ix[1] = _colsToIx[i]; else { ix[1] = _colsToIx[i]; ix[0]++; } } } } } public DataTensorBlock(double val) { _dims = new int[]{1, 1}; _schema = new ValueType[]{ValueType.FP64}; _colsToIx = new int[]{0}; _ixToCols = new int[VALID_VALUE_TYPES_LENGTH][]; _ixToCols[ValueType.FP64.ordinal()] = new int[]{0}; _colsdata = new BasicTensorBlock[VALID_VALUE_TYPES_LENGTH]; _colsdata[ValueType.FP64.ordinal()] = new BasicTensorBlock(val); } public DataTensorBlock(DataTensorBlock that) { copy(that); } public DataTensorBlock(BasicTensorBlock that) { _dims = that._dims; _schema = new ValueType[_dims[1]]; Arrays.fill(_schema, that._vt); _colsToIx = IntStream.range(0, _dims[1]).toArray(); _ixToCols = new int[VALID_VALUE_TYPES_LENGTH][]; _ixToCols[that._vt.ordinal()] = IntStream.range(0, _dims[1]).toArray(); _colsdata = new BasicTensorBlock[VALID_VALUE_TYPES_LENGTH]; _colsdata[that._vt.ordinal()] = that; } public void reset() { reset(_dims); } public void reset(int[] dims) { if (dims.length < 2) throw new DMLRuntimeException("DataTensor.reset(int[]) invalid number of tensor dimensions: " + dims.length); if (dims[1] > _dims[1]) throw new DMLRuntimeException("DataTensor.reset(int[]) columns can not be added without a provided schema," + " use reset(int[],ValueType[]) instead"); for (int i = 0; i < dims.length; i++) { if (dims[i] < 0) throw new DMLRuntimeException("DataTensor.reset(int[]) invalid dimension " + i + ": " + dims[i]); } _dims = dims; if (getDim(1) < _schema.length) { ValueType[] schema = new ValueType[getDim(1)]; System.arraycopy(_schema, 0, schema, 0, getDim(1)); _schema = schema; } reset(_dims, _schema); } public void reset(int[] dims, ValueType[] schema) { if (dims.length < 2) throw new DMLRuntimeException("DataTensor.reset(int[],ValueType[]) invalid number of tensor dimensions: " + dims.length); if (dims[1] != schema.length) throw new DMLRuntimeException("DataTensor.reset(int[],ValueType[]) column dimension and schema length does not match"); for (int i = 0; i < dims.length; i++) if (dims[i] < 0) throw new DMLRuntimeException("DataTensor.reset(int[],ValueType[]) invalid dimension " + i + ": " + dims[i]); _dims = dims; _schema = schema; _colsToIx = new int[_schema.length]; int[] typeIxCounter = new int[VALID_VALUE_TYPES_LENGTH]; for (int i = 0; i < schema.length; i++) { int type = schema[i].ordinal(); _colsToIx[i] = typeIxCounter[type]++; } int[] colCounters = new int[VALID_VALUE_TYPES_LENGTH]; for (int i = 0; i < getDim(1); i++) { int type = _schema[i].ordinal(); if (_ixToCols[type] == null || _ixToCols[type].length != typeIxCounter[type]) { _ixToCols[type] = new int[typeIxCounter[type]]; } _ixToCols[type][colCounters[type]++] = i; } // typeIxCounter now has the length of the BasicTensors if (_colsdata == null) { allocateBlock(); } else { for (int i = 0; i < _colsdata.length; i++) { if (_colsdata[i] != null) { _colsdata[i].reset(toInternalDims(dims, typeIxCounter[i])); } else if (typeIxCounter[i] != 0) { int[] colDims = toInternalDims(_dims, typeIxCounter[i]); _colsdata[i] = new BasicTensorBlock(ValueType.values()[i], colDims, false); _colsdata[i].allocateBlock(); } } } } public DataTensorBlock allocateBlock() { if (_colsdata == null) _colsdata = new BasicTensorBlock[VALID_VALUE_TYPES_LENGTH]; int[] colDataColumnLength = new int[_colsdata.length]; for (ValueType valueType : _schema) colDataColumnLength[valueType.ordinal()]++; for (int i = 0; i < _colsdata.length; i++) { if (colDataColumnLength[i] != 0) { int[] dims = toInternalDims(_dims, colDataColumnLength[i]); // TODO sparse _colsdata[i] = new BasicTensorBlock(ValueType.values()[i], dims, false); _colsdata[i].allocateBlock(); } } return this; } public boolean isAllocated() { if (_colsdata == null) return false; for (BasicTensorBlock block : _colsdata) { if (block != null && block.isAllocated()) return true; } return false; } public boolean isEmpty(boolean safe) { if (!isAllocated()) { return true; } for (BasicTensorBlock tb : _colsdata) { if (tb != null && !tb.isEmpty(safe)) return false; } return true; } public long getNonZeros() { if (!isAllocated()) { return 0; } long nnz = 0; for (BasicTensorBlock bt : _colsdata) { if (bt != null) nnz += bt.getNonZeros(); } return nnz; } public int getNumRows() { return getDim(0); } public int getNumColumns() { return getDim(1); } public int getNumDims() { return _dims.length; } public int getDim(int i) { return _dims[i]; } public int[] getDims() { return _dims; } public ValueType[] getSchema() { return _schema; } public ValueType getColValueType(int col) { return _schema[col]; } public Object get(int[] ix) { int columns = ix[1]; int[] internalIx = toInternalIx(ix, _colsToIx[columns]); return _colsdata[_schema[columns].ordinal()].get(internalIx); } public double get(int r, int c) { if (getNumDims() != 2) throw new DMLRuntimeException("DataTensor.get(int,int) dimension mismatch: expected=2 actual=" + getNumDims()); return _colsdata[_schema[c].ordinal()].get(r, _colsToIx[c]); } public void set(Object v) { for (BasicTensorBlock bt : _colsdata) bt.set(v); } public void set(int[] ix, Object v) { int columns = ix[1]; int[] internalIx = toInternalIx(ix, _colsToIx[columns]); _colsdata[_schema[columns].ordinal()].set(internalIx, v); } public void set(int r, int c, double v) { if (getNumDims() != 2) throw new DMLRuntimeException("DataTensor.set(int,int,double) dimension mismatch: expected=2 actual=" + getNumDims()); _colsdata[_schema[c].ordinal()].set(r, _colsToIx[c], v); } public void copy(DataTensorBlock that) { _dims = that._dims.clone(); _schema = that._schema.clone(); _colsToIx = that._colsToIx.clone(); _ixToCols = new int[that._ixToCols.length][]; for (int i = 0; i < _ixToCols.length; i++) if (that._ixToCols[i] != null) _ixToCols[i] = that._ixToCols[i].clone(); if (that.isAllocated()) { for (int i = 0; i < _colsdata.length; i++) { if (that._colsdata[i] != null) { _colsdata[i] = new BasicTensorBlock(that._colsdata[i]); } } } } /** * Copy a part of another <code>DataTensorBlock</code> * @param lower lower index of elements to copy (inclusive) * @param upper upper index of elements to copy (exclusive) * @param src source <code>DataTensorBlock</code> */ public void copy(int[] lower, int[] upper, DataTensorBlock src) { int[] subLower = lower.clone(); if (upper[1] == 0) { upper[1] = getDim(1); upper[0]--; } int[] subUpper = upper.clone(); for (int i = 0; i < VALID_VALUE_TYPES_LENGTH; i++) { if (src._colsdata[i] == null) continue; subLower[1] = lower[1]; subUpper[1] = lower[1] + src._colsdata[i].getNumColumns(); _colsdata[i].copy(subLower, subUpper, src._colsdata[i]); } } private static int[] toInternalIx(int[] ix, int col) { int[] internalIx = ix.clone(); internalIx[1] = col; return internalIx; } private static int[] toInternalDims(int[] dims, int cols) { int[] internalDims = dims.clone(); internalDims[1] = cols; return internalDims; } }
{ "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. */ package org.apache.spark.examples.ml; import org.apache.spark.sql.SparkSession; // $example on$ import java.util.Arrays; import org.apache.spark.ml.feature.VectorAssembler; import org.apache.spark.ml.linalg.VectorUDT; import org.apache.spark.ml.linalg.Vectors; import org.apache.spark.sql.Dataset; import org.apache.spark.sql.Row; import org.apache.spark.sql.RowFactory; import org.apache.spark.sql.types.*; import static org.apache.spark.sql.types.DataTypes.*; // $example off$ public class JavaVectorAssemblerExample { public static void main(String[] args) { SparkSession spark = SparkSession .builder() .appName("JavaVectorAssemblerExample") .getOrCreate(); // $example on$ StructType schema = createStructType(new StructField[]{ createStructField("id", IntegerType, false), createStructField("hour", IntegerType, false), createStructField("mobile", DoubleType, false), createStructField("userFeatures", new VectorUDT(), false), createStructField("clicked", DoubleType, false) }); Row row = RowFactory.create(0, 18, 1.0, Vectors.dense(0.0, 10.0, 0.5), 1.0); Dataset<Row> dataset = spark.createDataFrame(Arrays.asList(row), schema); VectorAssembler assembler = new VectorAssembler() .setInputCols(new String[]{"hour", "mobile", "userFeatures"}) .setOutputCol("features"); Dataset<Row> output = assembler.transform(dataset); System.out.println("Assembled columns 'hour', 'mobile', 'userFeatures' to vector column " + "'features'"); output.select("features", "clicked").show(false); // $example off$ spark.stop(); } }
{ "pile_set_name": "Github" }
#!/usr/local/bin/perl &doit(100,"Pentium 100 32",0.0195,0.1000,0.6406,4.6100); # pentium-100 &doit(200,"PPro 200 32",0.0070,0.0340,0.2087,1.4700); # pentium-100 &doit( 25,"R3000 25 32",0.0860,0.4825,3.2417,23.8833); # R3000-25 &doit(200,"R4400 200 32",0.0137,0.0717,0.4730,3.4367); # R4400 32bit &doit(180,"R10000 180 32",0.0061,0.0311,0.1955,1.3871); # R10000 32bit &doit(180,"R10000 180 64",0.0034,0.0149,0.0880,0.5933); # R10000 64bit &doit(400,"DEC 21164 400 64",0.0022,0.0105,0.0637,0.4457); # R10000 64bit sub doit { local($mhz,$label,@data)=@_; for ($i=0; $i <= $#data; $i++) { $data[$i]=1/$data[$i]*200/$mhz; } printf("%s %6.1f %6.1f %6.1f %6.1f\n",$label,@data); }
{ "pile_set_name": "Github" }
/* * Ample SDK - JavaScript GUI Framework * * Copyright (c) 2012 Sergey Ilinsky * Dual licensed under the MIT and GPL licenses. * See: http://www.amplesdk.com/about/licensing/ * */ var cXULElement_menu = function(){}; cXULElement_menu.prototype = new cXULElement("menu"); cXULElement_menu.prototype.$hoverable = true; // Public Properties cXULElement_menu.prototype.menupopup = null; // Reference link to a menupopup element // Class Events Handlers cXULElement_menu.handlers = { "mouseenter": function(oEvent) { if (this.parentNode.selectedItem || this.parentNode instanceof cXULElement_menupopup) this.parentNode.selectItem(this); }, "mousedown": function(oEvent) { if (oEvent.target == this) { if (!this.$isAccessible()) return; if (oEvent.button == 0) this.$activate(); } }, "DOMActivate": function(oEvent) { if (oEvent.target.parentNode instanceof cXULElement_menubar) this.parentNode.selectItem(this.parentNode.selectedItem == this ? null : this); }, "DOMNodeInserted": function(oEvent) { if (oEvent.target.parentNode == this) { if (oEvent.target instanceof cXULElement_menupopup) this.menupopup = oEvent.target; } }, "DOMNodeRemoved": function(oEvent) { if (oEvent.target.parentNode == this) { if (oEvent.target instanceof cXULElement_menupopup) this.menupopup = null; } } }; cXULElement_menu.prototype.$mapAttribute = function(sName, sValue) { if (sName == "open") { // TODO } else if (sName == "selected") { this.$setPseudoClass("selected", sValue == "true"); if (this.parentNode instanceof cXULElement_menupopup) this.$setPseudoClass("selected", sValue == "true", "arrow"); } else if (sName == "label") this.$getContainer("label").innerHTML = ample.$encodeXMLCharacters(sValue || ''); else if (sName == "image") { if (this.parentNode instanceof cXULElement_menupopup) this.$getContainer("image").style.backgroundImage = sValue ? "url(" + sValue + ")" : ''; } else if (sName == "disabled") { this.$setPseudoClass("disabled", sValue == "true"); if (this.parentNode instanceof cXULElement_menupopup) this.$setPseudoClass("disabled", sValue == "true", "arrow"); } else cXULElement.prototype.$mapAttribute.call(this, sName, sValue); }; // Element Render: open cXULElement_menu.prototype.$getTagOpen = function() { if (this.parentNode instanceof cXULElement_menupopup) return '<tr class="xul-menu' + (!this.$isAccessible() ? " disabled" : "") + (this.hasAttribute("class") ? " " + this.getAttribute("class") : "") + '">\ <td width="18"><div class="xul-menu--image"' +(this.hasAttribute("image") ? ' style="background-image:url('+ ample.$encodeXMLCharacters(this.getAttribute("image")) + ')"' : '')+ '></div></td>\ <td nowrap="nowrap" class="xul-menu--label">' + (this.hasAttribute("label") ? ample.$encodeXMLCharacters(this.getAttribute("label")) : ' ')+ '</td>\ <td valign="top" class="xul-menupopup--gateway">'; else return ' <td nowrap="nowrap" valign="center" class="xul-menu' + (!this.$isAccessible() ? " disabled" : "") + (this.hasAttribute("class") ? " " + this.getAttribute("class") : "") + '">\ <div class="xul-menu--label">' + (this.hasAttribute("label") ? ample.$encodeXMLCharacters(this.getAttribute("label")) : ' ') + '</div>\ <div class="xul-menu--gateway">'; }; // Element Render: close cXULElement_menu.prototype.$getTagClose = function() { if (this.parentNode instanceof cXULElement_menupopup) return '</td>\ <td width="16"><div class="xul-menu--arrow' + (!this.$isAccessible() ? ' disabled' : '') + '"><br /></div></td>\ </tr>'; else return ' </div>\ </td>'; }; // Register Element ample.extend(cXULElement_menu);
{ "pile_set_name": "Github" }
sprite $certificatemanager [66x57/16] { 00CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC0 0CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC CCCCC9779CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC CCCC700007CCCBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACCCC CCC90000009CC6000000000000000000000000000000000000000000000000ACCC CCC70000008CC6000000000000000000000000000000000000000000000000ACCC CCC70000008CC6000000000000000000000000000000000000000000000000ACCC CCC9000000ACC6000000000000000000000000000000000000000000000000ACCC CCCC700007CCCBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACCCC CCCCCA88ACCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC CCCC6666666666666666666666666666666666666666666666666666666666BCCC CCCC0000000000000000000000000000000000000000000000000000000000ACCC CCCC0000000000000000000000000007709000000000000000000000000000ACCC CCCC0000000000000000000000000C9CCCCAA9000000000000000000000000ACCC CCCC00000000000000000000000A9CCCCCCCCB990000000000000000000000ACCC CCCC00000000000000000000000CCCCCCCCCCCCA0000000000000000000000ACCC CCCC000000000000000000000BCCCCCCCCCCCCCCC800000000000000000000ACCC CCCC000000000000000000000ACCCCCCCCCCCCBCC700000000000000000000ACCC CCCC00000000000000000000BCCCCCCCCCCCC70BCC90000000000000000000ACCC CCCC00000000000000000000BCCCCCCCCCCB6000BC80000000000000000000ACCC CCCC00000000000000000006CCCCCBCCCCB00006CCA0000000000000000000ACCC CCCC0000000000000000000ACCCC60CCC900006CCCC7000000000000000000ACCC CCCC00000000000000000000CCC6006C800006CCCCA0000000000000000000ACCC CCCC0000000000000000000BCC70000000006CCCCCC7000000000000000000ACCC CCCC00000000000000000006CCB000000006CCCCCCA0000000000000000000ACCC CCCC00000000000000000000BCCB0000006CCCCCCC80000000000000000000ACCC CCCC00000000000000000000BCCCB00006CCCCCCCC90000000000000000000ACCC CCCC000000000000000000000BCCCB006CCCCCCCC700000000000000000000ACCC CCCC000000000000000000000BCCCCB6CCCCCCCCC700000000000000000000ACCC CCCC00000000000000000000007CCCCCCCCCCCCB0000000000000000000000ACCC CCCC0000000000000000000000699CCCCCCCCB890000000000000000000000ACCC CCCC0000000000000000000000660C9CCBCAA9060000000000000000000000ACCC CCCC0000000000000000000000CC700770A000AC6000000000000000000000ACCC CCCC0000000000000000000000CCBAC66A09C9CC6000000000000000000000ACCC CCCC0000000000000000000000CCCCCBCCBCCCCC6000000000000000000000ACCC CCCC0000000000000000000000CCCCCCCCCCCCCC6000000000000000000000ACCC CCCC0000000000000000000000CCCCCCCCCCCCCC6000000000000000000000ACCC CCCC0000000000000000000000CCCCCCB9CCCCCC6000000000000000000000ACCC CCCC0000000000000000000000CCCCCA007CCCCC6000000000000000000000ACCC CCCC0000000000000000000000CCCC900006CCCC6000000000000000000000ACCC CCCC0000000000000000000000CCC70000006BCC6000000000000000000000ACCC CCCC0000000000000000000000CC6000000000BC6000000000000000000000ACCC CCCC0000000000000000000000B60000000000096000000000000000000000ACCC CCCC0000000000000000000000000000000000000000000000000000000000ACCC CCCC0000000000000000000000000000000000000000000000000000000000ACCC CCCC6666666666666666666666666666666666666666666666666666666666BCCC CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC DCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCD FDCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCE FFEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0 } sprite $AWSCertificateManager_certificatemanager [66x57/16] { 00CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC0 0CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC CCCCC9779CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC CCCC700007CCCBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACCCC CCC90000009CC6000000000000000000000000000000000000000000000000ACCC CCC70000008CC6000000000000000000000000000000000000000000000000ACCC CCC70000008CC6000000000000000000000000000000000000000000000000ACCC CCC9000000ACC6000000000000000000000000000000000000000000000000ACCC CCCC700007CCCBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACCCC CCCCCA88ACCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC CCCC6666666666666666666666666666666666666666666666666666666666BCCC CCCC0000000000000000000000000000000000000000000000000000000000ACCC CCCC0000000000000000000000000007709000000000000000000000000000ACCC CCCC0000000000000000000000000C9CCCCAA9000000000000000000000000ACCC CCCC00000000000000000000000A9CCCCCCCCB990000000000000000000000ACCC CCCC00000000000000000000000CCCCCCCCCCCCA0000000000000000000000ACCC CCCC000000000000000000000BCCCCCCCCCCCCCCC800000000000000000000ACCC CCCC000000000000000000000ACCCCCCCCCCCCBCC700000000000000000000ACCC CCCC00000000000000000000BCCCCCCCCCCCC70BCC90000000000000000000ACCC CCCC00000000000000000000BCCCCCCCCCCB6000BC80000000000000000000ACCC CCCC00000000000000000006CCCCCBCCCCB00006CCA0000000000000000000ACCC CCCC0000000000000000000ACCCC60CCC900006CCCC7000000000000000000ACCC CCCC00000000000000000000CCC6006C800006CCCCA0000000000000000000ACCC CCCC0000000000000000000BCC70000000006CCCCCC7000000000000000000ACCC CCCC00000000000000000006CCB000000006CCCCCCA0000000000000000000ACCC CCCC00000000000000000000BCCB0000006CCCCCCC80000000000000000000ACCC CCCC00000000000000000000BCCCB00006CCCCCCCC90000000000000000000ACCC CCCC000000000000000000000BCCCB006CCCCCCCC700000000000000000000ACCC CCCC000000000000000000000BCCCCB6CCCCCCCCC700000000000000000000ACCC CCCC00000000000000000000007CCCCCCCCCCCCB0000000000000000000000ACCC CCCC0000000000000000000000699CCCCCCCCB890000000000000000000000ACCC CCCC0000000000000000000000660C9CCBCAA9060000000000000000000000ACCC CCCC0000000000000000000000CC700770A000AC6000000000000000000000ACCC CCCC0000000000000000000000CCBAC66A09C9CC6000000000000000000000ACCC CCCC0000000000000000000000CCCCCBCCBCCCCC6000000000000000000000ACCC CCCC0000000000000000000000CCCCCCCCCCCCCC6000000000000000000000ACCC CCCC0000000000000000000000CCCCCCCCCCCCCC6000000000000000000000ACCC CCCC0000000000000000000000CCCCCCB9CCCCCC6000000000000000000000ACCC CCCC0000000000000000000000CCCCCA007CCCCC6000000000000000000000ACCC CCCC0000000000000000000000CCCC900006CCCC6000000000000000000000ACCC CCCC0000000000000000000000CCC70000006BCC6000000000000000000000ACCC CCCC0000000000000000000000CC6000000000BC6000000000000000000000ACCC CCCC0000000000000000000000B60000000000096000000000000000000000ACCC CCCC0000000000000000000000000000000000000000000000000000000000ACCC CCCC0000000000000000000000000000000000000000000000000000000000ACCC CCCC6666666666666666666666666666666666666666666666666666666666BCCC CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC DCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCD FDCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCE FFEDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0 } !define CERTIFICATEMANAGER(alias) PUML_ENTITY(component,#769D3F,AWSCertificateManager_certificatemanager,alias,certificatemanager) !definelong CERTIFICATEMANAGER(alias,label,e_type="component",e_color="#769D3F",e_stereo="certificatemanager",e_sprite="AWSCertificateManager_certificatemanager") PUML_ENTITY(e_type,e_color,e_sprite,label,alias,e_stereo) !enddefinelong !define AWSCERTIFICATEMANAGER_CERTIFICATEMANAGER(alias) PUML_ENTITY(component,#769D3F,AWSCertificateManager_certificatemanager,alias,AWSCertificateManager\ncertificatemanager) !definelong AWSCERTIFICATEMANAGER_CERTIFICATEMANAGER(alias,label,e_type="component",e_color="#769D3F",e_stereo="AWSCertificateManager\\ncertificatemanager",e_sprite="AWSCertificateManager_certificatemanager") PUML_ENTITY(e_type,e_color,e_sprite,label,alias,e_stereo) !enddefinelong
{ "pile_set_name": "Github" }
package config import ( "bytes" "fmt" "testing" ) func testConfig(cfg *Config, t *testing.T) { if v, err := cfg.GetBool("a"); err != nil { t.Fatal(err) } else if v != true { t.Fatal(v) } checkInt := func(t *testing.T, cfg *Config, key string, check int) { if v, err := cfg.GetInt(key); err != nil { t.Fatal(err) } else if v != check { t.Fatal(fmt.Sprintf("%s %d != %d", key, v, check)) } } checkInt(t, cfg, "b", 100) checkInt(t, cfg, "kb", 1024) checkInt(t, cfg, "k", 1000) checkInt(t, cfg, "mb", 1024*1024) checkInt(t, cfg, "m", 1000*1000) checkInt(t, cfg, "gb", 1024*1024*1024) checkInt(t, cfg, "g", 1000*1000*1000) } func TestGetConfig(t *testing.T) { cfg := NewConfig() cfg.Values["a"] = "true" cfg.Values["b"] = "100" cfg.Values["kb"] = "1kb" cfg.Values["k"] = "1k" cfg.Values["mb"] = "1mb" cfg.Values["m"] = "1m" cfg.Values["gb"] = "1gb" cfg.Values["g"] = "1g" testConfig(cfg, t) } func TestReadWriteConfig(t *testing.T) { var b = []byte(` # comment a = true b = 100 kb = 1kb k = 1k mb = 1mb m = 1m gb = 1gb g = 1g `) cfg, err := ReadConfig(b) if err != nil { t.Fatal(err) } testConfig(cfg, t) var buf bytes.Buffer if err := cfg.Write(&buf); err != nil { t.Fatal(err) } cfg.Values = make(map[string]string) if err := cfg.Read(&buf); err != nil { t.Fatal(err) } testConfig(cfg, t) }
{ "pile_set_name": "Github" }
using System; using System.Collections.Generic; public class MyDict<S,T> { public void Add (S key, T value) { S[] sa = new S[1]; T[] ta = new T[1]; sa[0] = key; ta[0] = value; } } public abstract class FastFunc<S,T> { public abstract S Invoke (T bla); } public class StringFastFunc : FastFunc<string, int> { public override string Invoke (int bla) { return bla.ToString (); } } public class ArrayFastFunc : FastFunc<byte [], int> { public override byte [] Invoke (int bla) { return new byte [bla]; } } public class IntCache<T> { MyDict<int,T> cache; public T Invoke (FastFunc<T,int> f, int bla) { if (cache == null) cache = new MyDict <int,T> (); T value = f.Invoke (bla); cache.Add (bla, value); return value; } } public class main { public static int Main () { StringFastFunc sff = new StringFastFunc (); ArrayFastFunc aff = new ArrayFastFunc (); IntCache<string> ics = new IntCache<string> (); MyDict<string,string> dss = new MyDict<string,string> (); dss.Add ("123", "456"); ics.Invoke (sff, 123); ics.Invoke (sff, 456); IntCache<byte []> ica = new IntCache<byte []> (); ica.Invoke (aff, 1); ica.Invoke (aff, 2); ica.Invoke (aff, 3); return 0; } }
{ "pile_set_name": "Github" }
body.forest_page_index { font-family: "Century Gothic", CenturyGothic, AppleGothic, sans-serif; text-align: center; color: #333; header { position: absolute; top: 0; left: 0; right: 0; padding: 10px 20px; z-index: 10; } #logo a { float: left; line-height: 20px; font-size: 14px; text-decoration: none; color: #888; } #links_container { float: right; } #links_container a { font-size: 14px; line-height: 20px; text-decoration: none; color: #888; margin-left: 15px; } #links_container a:visited { color: #888; } #links_container a:hover { color: #681a94; } .clear { clear: both; } canvas { display: block; } #control_container { position: fixed; bottom: 0; left: 0; padding: 5px; background-color: rgba(0,0,0,0.3); li { background-color: rgba(255,255,255,0.5); } .label { padding: 10px 0; } .control { margin: 5px; } img { box-shadow: 0 0 3px rgba(0,0,0,0.15); cursor: pointer; border-radius: 5px; &:active { box-shadow: 0 0 3px rgba(0,0,0,0.5); } } .color { border: 1px solid rgba(255,255,255,0.8); width: 50px; text-align: center; padding: 5px; box-shadow: 0 0 3px rgba(0,0,0,0.5) inset; } button.control { cursor: pointer; border: none; width: 80px; padding: 5px 10px; margin: 10px; margin-bottom: 20px; background-color: #681a94; color: #fff; border-radius: 5px; box-shadow: 0 0 1px rgba(255,255,255,0.5) inset, 0 0 1px rgba(0,0,0,0.5); text-shadow: 0 0 1px rgba(0,0,0,0.2); &:active { background-color: #491368; box-shadow: 0 0 1px rgba(0,0,0,0.5) inset, 0 0 1px rgba(0,0,0,0.5); } } } }
{ "pile_set_name": "Github" }
import * as React from 'react'; import { shallow } from 'enzyme'; import { Heading } from './../../src/elements/Heading'; describe('Heading', () => { it('should render a p with .heading', () => { const component = shallow(<Heading>My Heading</Heading>); expect(component.contains(<p className='heading'>My Heading</p>)).toBe(true); }); it('should render a div with .heading', () => { const component = shallow(<Heading tag='div'>My Heading</Heading>); expect(component.contains(<div className='heading'>My Heading</div>)).toBe(true); }); it('should render a p with .heading and custom classNames', () => { const component = shallow(<Heading className='custom'><span>Any Content</span></Heading>); expect(component.hasClass('heading')).toBe(true); expect(component.hasClass('custom')).toBe(true); }); });
{ "pile_set_name": "Github" }
#include "parse_c_type.c" #include "realize_c_type.c" #define CFFI_VERSION_MIN 0x2601 #define CFFI_VERSION_MAX 0x27FF typedef struct FFIObject_s FFIObject; typedef struct LibObject_s LibObject; static PyTypeObject FFI_Type; /* forward */ static PyTypeObject Lib_Type; /* forward */ #include "ffi_obj.c" #include "cglob.c" #include "lib_obj.c" #include "cdlopen.c" #include "commontypes.c" #include "call_python.c" static int init_ffi_lib(PyObject *m) { PyObject *x; int i, res; static char init_done = 0; if (PyType_Ready(&FFI_Type) < 0) return -1; if (PyType_Ready(&Lib_Type) < 0) return -1; if (!init_done) { if (init_global_types_dict(FFI_Type.tp_dict) < 0) return -1; FFIError = PyErr_NewException("ffi.error", NULL, NULL); if (FFIError == NULL) return -1; if (PyDict_SetItemString(FFI_Type.tp_dict, "error", FFIError) < 0) return -1; if (PyDict_SetItemString(FFI_Type.tp_dict, "CType", (PyObject *)&CTypeDescr_Type) < 0) return -1; if (PyDict_SetItemString(FFI_Type.tp_dict, "CData", (PyObject *)&CData_Type) < 0) return -1; for (i = 0; all_dlopen_flags[i].name != NULL; i++) { x = PyInt_FromLong(all_dlopen_flags[i].value); if (x == NULL) return -1; res = PyDict_SetItemString(FFI_Type.tp_dict, all_dlopen_flags[i].name, x); Py_DECREF(x); if (res < 0) return -1; } init_done = 1; } x = (PyObject *)&FFI_Type; Py_INCREF(x); if (PyModule_AddObject(m, "FFI", x) < 0) return -1; x = (PyObject *)&Lib_Type; Py_INCREF(x); if (PyModule_AddObject(m, "Lib", x) < 0) return -1; return 0; } static int make_included_tuples(char *module_name, const char *const *ctx_includes, PyObject **included_ffis, PyObject **included_libs) { Py_ssize_t num = 0; const char *const *p_include; if (ctx_includes == NULL) return 0; for (p_include = ctx_includes; *p_include; p_include++) { num++; } *included_ffis = PyTuple_New(num); *included_libs = PyTuple_New(num); if (*included_ffis == NULL || *included_libs == NULL) goto error; num = 0; for (p_include = ctx_includes; *p_include; p_include++) { PyObject *included_ffi, *included_lib; PyObject *m = PyImport_ImportModule(*p_include); if (m == NULL) goto import_error; included_ffi = PyObject_GetAttrString(m, "ffi"); PyTuple_SET_ITEM(*included_ffis, num, included_ffi); included_lib = (included_ffi == NULL) ? NULL : PyObject_GetAttrString(m, "lib"); PyTuple_SET_ITEM(*included_libs, num, included_lib); Py_DECREF(m); if (included_lib == NULL) goto import_error; if (!FFIObject_Check(included_ffi) || !LibObject_Check(included_lib)) goto import_error; num++; } return 0; import_error: PyErr_Format(PyExc_ImportError, "while loading %.200s: failed to import ffi, lib from %.200s", module_name, *p_include); error: Py_XDECREF(*included_ffis); *included_ffis = NULL; Py_XDECREF(*included_libs); *included_libs = NULL; return -1; } static PyObject *_my_Py_InitModule(char *module_name) { #if PY_MAJOR_VERSION >= 3 struct PyModuleDef *module_def, local_module_def = { PyModuleDef_HEAD_INIT, module_name, NULL, -1, NULL, NULL, NULL, NULL, NULL }; /* note: the 'module_def' is allocated dynamically and leaks, but anyway the C extension module can never be unloaded */ module_def = PyMem_Malloc(sizeof(struct PyModuleDef)); if (module_def == NULL) return PyErr_NoMemory(); *module_def = local_module_def; return PyModule_Create(module_def); #else return Py_InitModule(module_name, NULL); #endif } static PyObject *b_init_cffi_1_0_external_module(PyObject *self, PyObject *arg) { PyObject *m, *modules_dict; FFIObject *ffi; LibObject *lib; Py_ssize_t version, num_exports; char *module_name, *exports, *module_name_with_lib; void **raw; const struct _cffi_type_context_s *ctx; raw = (void **)PyLong_AsVoidPtr(arg); if (raw == NULL) return NULL; module_name = (char *)raw[0]; version = (Py_ssize_t)raw[1]; exports = (char *)raw[2]; ctx = (const struct _cffi_type_context_s *)raw[3]; if (version < CFFI_VERSION_MIN || version > CFFI_VERSION_MAX) { if (!PyErr_Occurred()) PyErr_Format(PyExc_ImportError, "cffi extension module '%s' uses an unknown version tag %p. " "This module might need a more recent version of cffi " "than the one currently installed, which is %s", module_name, (void *)version, CFFI_VERSION); return NULL; } /* initialize the exports array */ num_exports = 25; if (ctx->flags & 1) /* set to mean that 'extern "Python"' is used */ num_exports = 26; memcpy(exports, (char *)cffi_exports, num_exports * sizeof(void *)); /* make the module object */ m = _my_Py_InitModule(module_name); if (m == NULL) return NULL; /* build the FFI and Lib object inside this new module */ ffi = ffi_internal_new(&FFI_Type, ctx); Py_XINCREF(ffi); /* make the ffi object really immortal */ if (ffi == NULL || PyModule_AddObject(m, "ffi", (PyObject *)ffi) < 0) return NULL; lib = lib_internal_new(ffi, module_name, NULL); if (lib == NULL || PyModule_AddObject(m, "lib", (PyObject *)lib) < 0) return NULL; if (make_included_tuples(module_name, ctx->includes, &ffi->types_builder.included_ffis, &lib->l_types_builder->included_libs) < 0) return NULL; /* add manually 'module_name.lib' in sys.modules: see test_import_from_lib */ modules_dict = PySys_GetObject("modules"); if (!modules_dict) return NULL; module_name_with_lib = alloca(strlen(module_name) + 5); strcpy(module_name_with_lib, module_name); strcat(module_name_with_lib, ".lib"); if (PyDict_SetItemString(modules_dict, module_name_with_lib, (PyObject *)lib) < 0) return NULL; #if PY_MAJOR_VERSION >= 3 /* add manually 'module_name' in sys.modules: it seems that Py_InitModule() is not enough to do that */ if (PyDict_SetItemString(modules_dict, module_name, m) < 0) return NULL; #endif return m; }
{ "pile_set_name": "Github" }
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); const Modem = require("docker-modem"); const container_1 = require("./container"); const image_1 = require("./image"); const volume_1 = require("./volume"); const network_1 = require("./network"); const node_1 = require("./node"); const plugin_1 = require("./plugin"); const secret_1 = require("./secret"); const service_1 = require("./service"); const swarm_1 = require("./swarm"); const task_1 = require("./task"); /** * Docker class with all methods */ class Docker { /** * Creates the Docker Object * @param {Object} opts Docker options */ constructor(opts) { this.modem = new Modem(opts); this.container = new container_1.default(this.modem); this.image = new image_1.default(this.modem); this.volume = new volume_1.default(this.modem); this.network = new network_1.default(this.modem); this.node = new node_1.default(this.modem); this.plugin = new plugin_1.default(this.modem); this.secret = new secret_1.default(this.modem); this.service = new service_1.default(this.modem); this.swarm = new swarm_1.default(this.modem); this.task = new task_1.default(this.modem); } /** * Validate credentials for a registry and get identity token, * if available, for accessing the registry without password * https://docs.docker.com/engine/reference/api/docker_remote_api_v1.24/#/check-auth-configuration * @param {Object} opts Auth options * @return {Promise} Promise returning the result */ auth(opts) { const call = { path: '/auth?', method: 'POST', options: opts, statusCodes: { 200: true, 204: true, 500: 'server error' } }; return new Promise((resolve, reject) => { this.modem.dial(call, (err, data) => { if (err) return reject(err); resolve(data); }); }); } /** * Get system wide information about docker * https://docs.docker.com/engine/reference/api/docker_remote_api_v1.24/#/display-system-wide-information * @return {Promise} Promise returning the result */ info() { const call = { path: '/info?', method: 'GET', statusCodes: { 200: true, 500: 'server error' } }; return new Promise((resolve, reject) => { this.modem.dial(call, (err, data) => { if (err) return reject(err); resolve(data); }); }); } /** * Get docker version information of server * https://docs.docker.com/engine/reference/api/docker_remote_api_v1.24/#/show-the-docker-version-information * @return {Promise} Promise returning the result */ version() { const call = { path: '/version?', method: 'GET', statusCodes: { 200: true, 500: 'server error' } }; return new Promise((resolve, reject) => { this.modem.dial(call, (err, data) => { if (err) return reject(err); resolve(data); }); }); } /** * Ping the docker server * https://docs.docker.com/engine/reference/api/docker_remote_api_v1.24/#/ping-the-docker-server * @return {Promise} Promise returning the result */ ping() { const call = { path: '/_ping?', method: 'GET', statusCodes: { 200: true, 500: 'server error' } }; return new Promise((resolve, reject) => { this.modem.dial(call, (err, data) => { if (err) return reject(err); resolve(data); }); }); } /** * Get container events from docker, can be in real time via streaming or via polling (with since) * https://docs.docker.com/engine/reference/api/docker_remote_api_v1.24/#/monitor-docker-s-events * @param {Object} opts Options to send with the request (optional) * @return {Promise} Promise returning the result */ events(opts = {}) { const call = { path: '/events?', method: 'GET', options: opts, isStream: true, statusCodes: { 200: true, 500: 'server error' } }; return new Promise((resolve, reject) => { this.modem.dial(call, (err, data) => { if (err) return reject(err); resolve(data); }); }); } } exports.Docker = Docker; //# sourceMappingURL=docker.js.map
{ "pile_set_name": "Github" }
/* Fontname: -Misc-Fixed-Medium-R-Normal--7-70-75-75-C-50-ISO10646-1 Copyright: Public domain font. Share and enjoy. Glyphs: 191/1848 BBX Build Mode: 0 */ const uint8_t u8g2_font_5x7_tf[1677] U8G2_FONT_SECTION("u8g2_font_5x7_tf") = "\277\0\2\2\3\3\3\4\4\5\7\0\377\6\377\6\0\1\22\2/\6p \5\0\275\1!\6\261\261" "\31)\42\7[\267IV\0#\12-\261\253\206\252\206\252\0$\12-\261[\65\330 \245\5%\11\64" "\261\311 \366\6\1&\11,\261\213)V\61\5'\5\231\267\31(\7r\261S\315\0)\10r\261\211" "\251R\0*\7k\261I\325j+\12-\261\315(\16\231Q\4,\7[\257S%\0-\6\14\265\31" "\1.\6R\261\31\1/\7$\263\7\261\15\60\10s\261\253\134\25\0\61\7s\261K\262\65\62\12\64" "\261S\61\203X\216\0\63\13\64\261\31\31$\215dR\0\64\12\64\261\215\252\32\61\203\4\65\12\64\261" "\31\32l$\223\2\66\12\64\261S\31\254(\223\2\67\13\64\261\31\31\304\14b\6\21\70\12\64\261S" "\61\251(\223\2\71\12\64\261SQ\246\15\222\2:\7j\261\31q\4;\10\63\257\263\221*\1<\10" "k\261M\65\310 =\10\34\263\31\31\215\0>\11k\261\311 \203T\2\77\11s\261k\246\14\23\0" "@\11\64\261SQ\335H\1A\11\64\261SQ\216)\3B\12\64\261Yq\244(G\2C\13\64\261" "SQ\203\14bR\0D\11\64\261Y\321\71\22\0E\13\64\261\31\32\254\14\62\30\1F\13\64\261\31" "\32\254\14\62\310\0G\12\64\261SQ\203\64\323\0H\10\64\261\211rL\63I\7s\261Y\261\65J" "\13\64\261\7\31d\220\201L\12K\12\64\261\211*I\231\312\0L\14\64\261\311 \203\14\62\310`\4" "M\11\64\261\211\343\210f\0N\10\64\261\211k\251\63O\11\64\261S\321\231\24\0P\12\64\261YQ" "\216\224A\6Q\12<\257S\321\134I\243\0R\11\64\261YQ\216\324\14S\12\64\261S\61eT&" "\5T\7s\261Y\261\13U\10\64\261\211\236I\1V\11\64\261\211\316$\25\0W\11\64\261\211\346\70" "b\0X\12\64\261\211\62I\25e\0Y\10s\261IVY\1Z\12\64\261\31\31\304\66\30\1[\7" "s\261\31\261\71\134\11$\263\311(\243\214\2]\7s\261\231\315\21^\5S\271k_\6\14\261\31\1" "`\6R\271\211\1a\10$\261\33Q\251\2b\13\64\261\311 \203\25\345H\0c\7#\261\233\31\10" "d\12\64\261\7\31\244\21e\32e\11$\261Sid\240\0f\11\64\261\255\312\231A\4g\11,\257" "\33\61\251\214\6h\12\64\261\311 \203\25\315\0i\10s\261\313HV\3j\11{\257\315\260T\25\0" "k\13\64\261\311 \203\224d*\3l\7s\261\221]\3m\10$\261IiH\31n\7$\261Y\321" "\14o\10$\261SQ&\5p\11,\257YQ\216\224\1q\11,\257\33Q\246\15\2r\10$\261Y" "Q\203\14s\10$\261\33\32\15\5t\12\64\261\313 \316\14\62\22u\7$\261\211f\32v\7c\261" "IV\5w\7$\261\211r\34x\10$\261\211I\252\30y\11,\257\211\62\225%\0z\10$\261\31" "\261\34\1{\10s\261MI\326 |\5\261\261\71}\12s\261\311 \252\230\42\0~\7\24\271K*" "\1\240\5\0\275\1\241\6\261\261I#\242\11\64\257\215#\65g\2\243\10,\261UqV\2\244\13-" "\261\311 \315\24W\6\1\245\11s\261I\252Z\61\1\246\6\251\261Q\2\247\10{\257\233\252\222\13\250" "\6K\273I\1\251\15=\257[\31\250\64U\322 -\0\252\6\33\267[I\253\7\35\263\213\262\1\254" "\7\24\263\31\31\4\255\5K\265\31\256\14=\257[\31\214\64\247\6i\1\257\6\14\273\31\1\260\6[" "\267\353\2\261\13\65\261\315(\16\231Q\34\2\262\6b\265Q\6\263\6b\265\31i\264\6R\271S\0" "\265\10,\257\211\346H\31\266\10\64\261\33j\365\3\267\6R\265\31\1\270\6R\257S\0\271\7c\265" "K\62\15\272\6\33\267\353\2\273\10\35\263\211\245L\0\274\14<\257\311 \203\14bT\33\4\275\15<" "\257\311 \203\14\222\6\61\3\1\276\13<\257\221\32D\25\325\6\1\277\11s\261\313\60\305T\1\300\11" "\64\261SQ\216)\3\301\11\64\261SQ\216)\3\302\11\64\261SQ\216)\3\303\11\64\261SQ\216" ")\3\304\12\64\261\211I\305\61e\0\305\11\64\261\223*\216)\3\306\11\64\261\33\251\32\252%\307\13" "<\257SQ\203\14b\222\21\310\13\64\261\31\32\254\14\62\30\1\311\13\64\261\31\32\254\14\62\30\1\312" "\13\64\261\31\32\254\14\62\30\1\313\13\64\261\31\32\254\14\62\30\1\314\7s\261Y\261\65\315\7s\261" "Y\261\65\316\7s\261Y\261\65\317\7s\261Y\261\65\320\11\64\261\231iu\215\4\321\10\64\261Is" "\251\63\322\11\64\261S\321\231\24\0\323\11\64\261S\321\231\24\0\324\11\64\261S\321\231\24\0\325\11\64" "\261S\321\231\24\0\326\12\64\261\211IE\63)\0\327\10$\261\211I\252\30\330\11\64\261\33\351HG" "\2\331\10\64\261\211\236I\1\332\10\64\261\211\236I\1\333\10\64\261\211\236I\1\334\12\64\261\211\31E" "\63)\0\335\10s\261IVY\1\336\13\64\261\311`\305\221\62\310\0\337\11\64\261SQ\225V\2\340" "\12\64\261\313(\216\250T\1\341\11\64\261\255\301\210J\25\342\11\64\261\255\322\210J\25\343\12\64\261K" "*\216\250T\1\344\11\64\261\253\341\210J\25\345\11\64\261\223rD\245\12\346\10$\261\33i\305\1\347" "\10k\257\233\31\250\4\350\13\64\261\313(\252\64\62P\0\351\12\64\261\255\201J#\3\5\352\13\64\261" "\213)\252\64\62P\0\353\13\64\261I\231Pid\240\0\354\10s\261\311 \311j\355\7s\261+e" "\65\356\7s\261\253f\65\357\10s\261I\31\310j\360\12\64\261\313\310\212\62)\0\361\11\64\261K*" "\255h\6\362\12\64\261\313(\252(\223\2\363\12\64\261\255\201\212\62)\0\364\12\64\261\323\204\212\62)" "\0\365\12\64\261K*\252(\223\2\366\12\64\261\253\241\212\62)\0\367\11,\261\323pd\250\0\370\11" "$\261\33i\244\221\0\371\11\64\261\313\250\64\323\0\372\7\64\261m\232i\373\10\64\261\323\60\232i\374" "\11\64\261\253Q\64\323\0\375\11<\257m\312T\226\0\376\12\64\257\311`E\71R\6\377\12<\257\253" "Q\224\251,\1\0\0\0\4\377\377\0";
{ "pile_set_name": "Github" }
{if in_array('state', $optionalFields)} <script> var stateNotRequired = true; </script> {/if} <script type="text/javascript" src="{$BASE_PATH_JS}/StatesDropdown.js"></script> {if $registrationDisabled} {include file="$template/includes/alert.tpl" type="error" msg=$LANG.registerCreateAccount|cat:' <strong><a href="cart.php" class="alert-link">'|cat:$LANG.registerCreateAccountOrder|cat:'</a></strong>'} {/if} {if $errormessage} {include file="$template/includes/alert.tpl" type="error" errorshtml=$errormessage} {/if} {if !$registrationDisabled} <form method="post" class="using-password-strength" action="{$smarty.server.PHP_SELF}" role="form"> <input type="hidden" name="register" value="true"/> <div class="row"> <div class="col-md-6"> <div class="form-group"> <label for="firstname" class="control-label">{$LANG.clientareafirstname}</label> <input type="text" name="firstname" id="firstname" value="{$clientfirstname}" class="form-control" {if !in_array('firstname', $optionalFields)}required{/if} /> </div> <div class="form-group"> <label for="lastname" class="control-label">{$LANG.clientarealastname}</label> <input type="text" name="lastname" id="lastname" value="{$clientlastname}" class="form-control" {if !in_array('lastname', $optionalFields)}required{/if} /> </div> <div class="form-group"> <label for="companyname" class="control-label">{$LANG.clientareacompanyname}</label> <input type="text" name="companyname" id="companyname" value="{$clientcompanyname}" class="form-control"/> </div> <div class="form-group"> <label for="email" class="control-label">{$LANG.clientareaemail}</label> <input type="email" name="email" id="email" value="{$clientemail}" class="form-control"/> </div> <div id="newPassword1" class="form-group has-feedback"> <label for="inputNewPassword1" class="control-label">{$LANG.clientareapassword}</label> <input type="password" class="form-control" id="inputNewPassword1" name="password" autocomplete="off" /> <span class="form-control-feedback glyphicon glyphicon-password"></span> {include file="$template/includes/pwstrength.tpl"} </div> <div id="newPassword2" class="form-group has-feedback"> <label for="inputNewPassword2" class="control-label">{$LANG.clientareaconfirmpassword}</label> <input type="password" class="form-control" id="inputNewPassword2" name="password2" autocomplete="off" /> <span class="form-control-feedback glyphicon glyphicon-password"></span> <div id="inputNewPassword2Msg"> </div> </div> </div> <div class="col-md-6"> <div class="form-group"> <label for="address1" class="control-label">{$LANG.clientareaaddress1}</label> <input type="text" name="address1" id="address1" value="{$clientaddress1}" class="form-control" {if !in_array('address1', $optionalFields)}required{/if} /> </div> <div class="form-group"> <label for="address2" class="control-label">{$LANG.clientareaaddress2}</label> <input type="text" name="address2" id="address2" value="{$clientaddress2}" class="form-control"/> </div> <div class="form-group"> <label for="city" class="control-label">{$LANG.clientareacity}</label> <input type="text" name="city" id="city" value="{$clientcity}" class="form-control" {if !in_array('city', $optionalFields)}required{/if} /> </div> <div class="form-group"> <label for="state" class="control-label">{$LANG.clientareastate}</label> <input type="text" name="state" id="state" value="{$clientstate}" class="form-control" {if !in_array('state', $optionalFields)}required{/if} /> </div> <div class="form-group"> <label for="postcode" class="control-label">{$LANG.clientareapostcode}</label> <input type="text" name="postcode" id="postcode" value="{$clientpostcode}" class="form-control" {if !in_array('postcode', $optionalFields)}required{/if} /> </div> <div class="form-group"> <label for="country" class="control-label">{$LANG.clientareacountry}</label> <select id="country" name="country" class="form-control"> {foreach $clientcountries as $countryCode => $countryName} <option value="{$countryCode}"{if (!$clientcountry && $countryCode eq $defaultCountry) || ($countryCode eq $clientcountry)} selected="selected"{/if}> {$countryName} </option> {/foreach} </select> </div> <div class="form-group"> <label for="phonenumber" class="control-label">{$LANG.clientareaphonenumber}</label> <input type="tel" name="phonenumber" id="phonenumber" value="{$clientphonenumber}" class="form-control" {if !in_array('phonenumber', $optionalFields)}required{/if} /> </div> {if $customfields} {foreach from=$customfields key=num item=customfield} <div class="form-group"> <label class="control-label" for="customfield{$customfield.id}">{$customfield.name}</label> <div class="control"> {$customfield.input} {$customfield.description} </div> </div> {/foreach} {/if} {if $currencies} <div class="form-group"> <label for="currency" class="control-label">{$LANG.choosecurrency}</label> <select id="currency" name="currency" class="form-control"> {foreach from=$currencies item=curr} <option value="{$curr.id}"{if !$smarty.post.currency && $curr.default || $smarty.post.currency eq $curr.id } selected{/if}>{$curr.code}</option> {/foreach} </select> </div> {/if} </div> </div> {if $securityquestions} <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title">{$LANG.clientareasecurityquestion}:</h3> </div> <div class="panel-body"> <div class="form-group col-sm-12"> <select name="securityqid" id="securityqid" class="form-control"> {foreach key=num item=question from=$securityquestions} <option value={$question.id}>{$question.question}</option> {/foreach} </select> </div> <div class="form-group"> <label class="col-sm-4 control-label" for="securityqans">{$LANG.clientareasecurityanswer}</label> <div class="col-sm-6"> <input type="password" name="securityqans" id="securityqans" class="form-control" autocomplete="off" /> </div> </div> </div> </div> {/if} {include file="$template/includes/captcha.tpl"} {if $accepttos} <div class="panel panel-danger tospanel"> <div class="panel-heading"> <h3 class="panel-title"><span class="fa fa-exclamation-triangle tosicon"></span> &nbsp; {$LANG.ordertos}</h3> </div> <div class="panel-body"> <div class="col-md-12"> <label class="checkbox"> <input type="checkbox" name="accepttos" class="accepttos"> {$LANG.ordertosagreement} <a href="{$tosurl}" target="_blank">{$LANG.ordertos}</a> </label> </div> </div> </div> {/if} <p align="center"> <input class="btn btn-large btn-primary" type="submit" value="{$LANG.clientregistertitle}"/> </p> </form> {/if}
{ "pile_set_name": "Github" }
/* =========================================================================== Doom 3 GPL Source Code Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company. This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?). Doom 3 Source Code 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. Doom 3 Source Code is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>. In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below. If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. =========================================================================== */ #include "../precompiled.h" #pragma hdrstop /* ============= idJointMat::ToJointQuat ============= */ idJointQuat idJointMat::ToJointQuat( void ) const { idJointQuat jq; float trace; float s; float t; int i; int j; int k; static int next[3] = { 1, 2, 0 }; trace = mat[0 * 4 + 0] + mat[1 * 4 + 1] + mat[2 * 4 + 2]; if ( trace > 0.0f ) { t = trace + 1.0f; s = idMath::InvSqrt( t ) * 0.5f; jq.q[3] = s * t; jq.q[0] = ( mat[1 * 4 + 2] - mat[2 * 4 + 1] ) * s; jq.q[1] = ( mat[2 * 4 + 0] - mat[0 * 4 + 2] ) * s; jq.q[2] = ( mat[0 * 4 + 1] - mat[1 * 4 + 0] ) * s; } else { i = 0; if ( mat[1 * 4 + 1] > mat[0 * 4 + 0] ) { i = 1; } if ( mat[2 * 4 + 2] > mat[i * 4 + i] ) { i = 2; } j = next[i]; k = next[j]; t = ( mat[i * 4 + i] - ( mat[j * 4 + j] + mat[k * 4 + k] ) ) + 1.0f; s = idMath::InvSqrt( t ) * 0.5f; jq.q[i] = s * t; jq.q[3] = ( mat[j * 4 + k] - mat[k * 4 + j] ) * s; jq.q[j] = ( mat[i * 4 + j] + mat[j * 4 + i] ) * s; jq.q[k] = ( mat[i * 4 + k] + mat[k * 4 + i] ) * s; } jq.t[0] = mat[0 * 4 + 3]; jq.t[1] = mat[1 * 4 + 3]; jq.t[2] = mat[2 * 4 + 3]; return jq; }
{ "pile_set_name": "Github" }
require 'spec_helper' describe NodeGroup, :type => :model do describe "associations" do before { @node_group = build(:node_group) } it { should have_many(:node_classes).through(:node_group_class_memberships) } it { should have_many(:nodes).through(:node_group_memberships) } end describe "when destroying" do before :each do @group = create(:node_group) end it "should disassociate nodes" do node = create(:node) node.node_groups << @group @group.destroy node.node_groups.reload.should be_empty node.node_group_memberships.reload.should be_empty end it "should disassociate node_classes" do node_class = create(:node_class) @group.node_classes << node_class @group.destroy node_class.node_group_children.reload.should be_empty node_class.node_group_class_memberships.reload.should be_empty end it "should disassociate node_groups" do group_last = create(:node_group) group_first = create(:node_group) group_first.node_groups << @group @group.node_groups << group_last @group.destroy group_first.reload.node_groups.should be_empty group_first.node_group_edges_out.should be_empty NodeGroupEdge.all.should be_empty end end describe "when including groups" do before :each do @node_group_a = create(:node_group, :name => 'A') @node_group_b = create(:node_group, :name => 'B') end describe "by id" do it "should not allow a group to include itself" do @node_group_a.assigned_node_group_ids = @node_group_a.id @node_group_a.save @node_group_a.should_not be_valid @node_group_a.errors.full_messages.should include("Validation failed: Creating a dependency from group 'A' to itself creates a cycle") @node_group_a.node_groups.should be_empty end it "should not allow a cycle to be formed" do @node_group_b.node_groups << @node_group_a @node_group_a.assigned_node_group_ids = @node_group_b.id @node_group_a.save @node_group_a.should_not be_valid @node_group_a.errors.full_messages.should include("Validation failed: Creating a dependency from group 'A' to group 'B' creates a cycle") @node_group_a.node_groups.should be_empty end it "should allow a group to be included twice through inheritance" do @node_group_c = create(:node_group) @node_group_d = create(:node_group) @node_group_a.node_groups << @node_group_c @node_group_b.node_groups << @node_group_c @node_group_d.assigned_node_group_ids = [@node_group_a.id, @node_group_b.id] @node_group_d.should be_valid @node_group_d.errors.should be_empty @node_group_d.node_groups.should include(@node_group_a,@node_group_b) end end describe "by name" do it "should not allow a group to include itself" do @node_group_a.assigned_node_group_names = @node_group_a.name @node_group_a.save @node_group_a.should_not be_valid @node_group_a.errors.full_messages.should include("Validation failed: Creating a dependency from group 'A' to itself creates a cycle") @node_group_a.node_groups.should be_empty end it "should not allow a cycle to be formed" do @node_group_b.node_groups << @node_group_a @node_group_a.assigned_node_group_names = @node_group_b.name @node_group_a.save @node_group_a.should_not be_valid @node_group_a.errors.full_messages.should include("Validation failed: Creating a dependency from group 'A' to group 'B' creates a cycle") @node_group_a.node_groups.should be_empty end it "should allow a group to be included twice through inheritance" do @node_group_c = create(:node_group) @node_group_d = create(:node_group) @node_group_a.node_groups << @node_group_c @node_group_b.node_groups << @node_group_c @node_group_d.assigned_node_group_names = [@node_group_a.name, @node_group_b.name] @node_group_d.should be_valid @node_group_d.errors.should be_empty @node_group_d.node_groups.should include(@node_group_a,@node_group_b) end end end describe "when including classes" do before :each do @node_group = create(:node_group) @node_class_a = create(:node_class, :name => 'class_a') @node_class_b = create(:node_class, :name => 'class_b') end describe "by id" do describe "with a single id" do it "should set the class" do @node_group.assigned_node_class_ids = @node_class_a.id @node_group.should be_valid @node_group.errors.should be_empty @node_group.node_classes.size.should == 1 @node_group.node_classes.should include(@node_class_a) end end describe "with multiple ids" do it "should set the classes" do @node_group.assigned_node_class_ids = [@node_class_a.id, @node_class_b.id] @node_group.should be_valid @node_group.errors.should be_empty @node_group.node_classes.size.should == 2 @node_group.node_classes.should include(@node_class_a, @node_class_b) end end end describe "by name" do describe "with a single name" do it "should set the class" do @node_group.assigned_node_class_names = @node_class_a.name @node_group.should be_valid @node_group.errors.should be_empty @node_group.node_classes.size.should == 1 @node_group.node_classes.should include(@node_class_a) end end describe "with multiple names" do it "should set the classes" do @node_group.assigned_node_class_names = [@node_class_a.name, @node_class_b.name] @node_group.should be_valid @node_group.errors.should be_empty @node_group.node_classes.size.should == 2 @node_group.node_classes.should include(@node_class_a, @node_class_b) end end end describe "by name, and id" do it "should add all specified classes" do @node_group.assigned_node_class_names = @node_class_a.name @node_group.assigned_node_class_ids = @node_class_b.id @node_group.should be_valid @node_group.errors.should be_empty @node_group.node_classes.size.should == 2 @node_group.node_classes.should include(@node_class_a, @node_class_b) end end end describe "helper" do before :each do @groups = Array.new(3) {|idx| create(:node_group, :name => "Group #{idx}") } end describe "find_from_form_names" do it "should work with a single name" do group = NodeGroup.find_from_form_names("Group 0") group.should include(@groups.first) end it "should work with multiple names" do group = NodeGroup.find_from_form_names("Group 0", "Group 2") group.size.should == 2 group.should include(@groups.first, @groups.last) end end describe "find_from_form_ids" do it "should work with a single id" do group = NodeGroup.find_from_form_ids(@groups.first.id) group.size.should == 1 group.should include(@groups.first) end it "should work with multiple ids" do group = NodeGroup.find_from_form_ids(@groups.first.id, @groups.last.id) group.size.should == 2 group.should include(@groups.first, @groups.last) end it "should work with comma separated ids" do group = NodeGroup.find_from_form_ids("#{@groups.first.id},#{@groups.last.id}") group.size.should == 2 group.should include(@groups.first, @groups.last) end it "should work with the description field" do @groups.each {|o| o.description.should be_nil} obj = create(:node_group, :name => 'anobj', :description => 'A Node Group') obj.description.should == "A Node Group" end end end describe "assigning before validation" do let(:node_groups) { Array.new(2) { |i| create(:node_group, :name => "group#{i}") } } let(:node_classes) { Array.new(2) { |i| create(:node_class, :name => "class#{i}") } } let(:nodes) { Array.new(2) { |i| create(:node, :name => "node#{i}") } } it "should assign groups, classes and nodes by id" do new_group = NodeGroup.new( :assigned_node_group_ids => node_groups.map(&:id), :assigned_node_class_ids => node_classes.map(&:id), :assigned_node_ids => nodes.map(&:id) ) new_group.assign_node_groups new_group.assign_node_classes new_group.assign_nodes new_group.node_groups.should == node_groups new_group.node_classes.should == node_classes new_group.nodes.should == nodes end it "should assign groups, classes and nodes by name" do new_group = NodeGroup.new( :assigned_node_group_names => node_groups.map(&:name), :assigned_node_class_names => node_classes.map(&:name), :assigned_node_names => nodes.map(&:name) ) new_group.assign_node_groups new_group.assign_node_classes new_group.assign_nodes new_group.node_groups.should == node_groups new_group.node_classes.should == node_classes new_group.nodes.should == nodes end it "should add assignment errors to the object" do new_group = NodeGroup.new( :assigned_node_group_ids => ['cow'], :assigned_node_class_ids => ['dog'], :assigned_node_ids => ['pig'] ) new_group.assign_node_groups new_group.assign_node_classes new_group.assign_nodes new_group.node_groups.should be_empty new_group.node_classes.should be_empty new_group.nodes.should be_empty new_group.errors.full_messages.should =~ [ "Couldn't find NodeGroup with 'id'=cow", "Couldn't find NodeClass with 'id'=dog", "Couldn't find Node with 'id'=pig" ] end end end
{ "pile_set_name": "Github" }
/* Copyright 2013 KLab 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. */ // // CiOSTmpFile.cpp // GameEngine // // // #include <unistd.h> #include <fcntl.h> #include "CiOSPathConv.h" #include "CiOSTmpFile.h" #include "CPFInterface.h" CiOSTmpFile::CiOSTmpFile(const char * path) : m_fullpath(0) { m_fullpath = CiOSPathConv::getInstance().fullpath(path); // 平成24年11月27日(火) // ファイルが存在しない場合に該当ファイルが生成されない事への対応と // 権限の付与を行いました。 m_fd = open(m_fullpath, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR); CPFInterface::getInstance().platform().excludePathFromBackup(m_fullpath); } CiOSTmpFile::~CiOSTmpFile() { if(m_fd > 0) { close(m_fd); } delete [] m_fullpath; } size_t CiOSTmpFile::writeTmp(void *ptr, size_t size) { return write(m_fd, ptr, size); }
{ "pile_set_name": "Github" }
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <title>CMSIS-DSP: arm_pid_init_q15.c File Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="cmsis.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript"> $(document).ready(initResizable); </script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { searchBox.OnSelectItem(0); }); </script> <link href="stylsheetf" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 46px;"> <td id="projectlogo"><img alt="Logo" src="CMSIS_Logo_Final.png"/></td> <td style="padding-left: 0.5em;"> <div id="projectname">CMSIS-DSP &#160;<span id="projectnumber">Version 1.4.4</span> </div> <div id="projectbrief">CMSIS DSP Software Library</div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <div id="CMSISnav" class="tabs1"> <ul class="tablist"> <li><a href="../../General/html/index.html"><span>CMSIS</span></a></li> <li><a href="../../Core/html/index.html"><span>CORE</span></a></li> <li><a href="../../Driver/html/index.html"><span>Driver</span></a></li> <li class="current"><a href="../../DSP/html/index.html"><span>DSP</span></a></li> <li><a href="../../RTOS/html/index.html"><span>RTOS API</span></a></li> <li><a href="../../Pack/html/index.html"><span>Pack</span></a></li> <li><a href="../../SVD/html/index.html"><span>SVD</span></a></li> </ul> </div> <!-- Generated by Doxygen 1.8.2 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main&#160;Page</span></a></li> <li><a href="pages.html"><span>Usage&#160;and&#160;Description</span></a></li> <li><a href="modules.html"><span>Reference</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> </div><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> <div id="nav-sync" class="sync"></div> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> $(document).ready(function(){initNavTree('arm__pid__init__q15_8c.html','');}); </script> <div id="doc-content"> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div class="header"> <div class="summary"> <a href="#func-members">Functions</a> </div> <div class="headertitle"> <div class="title">arm_pid_init_q15.c File Reference</div> </div> </div><!--header--> <div class="contents"> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> Functions</h2></td></tr> <tr class="memitem:ga2cb1e3d3ebb167348fdabec74653d5c3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___p_i_d.html#ga2cb1e3d3ebb167348fdabec74653d5c3">arm_pid_init_q15</a> (<a class="el" href="structarm__pid__instance__q15.html">arm_pid_instance_q15</a> *S, int32_t resetStateFlag)</td></tr> <tr class="memdesc:ga2cb1e3d3ebb167348fdabec74653d5c3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialization function for the Q15 PID Control. <a href="group___p_i_d.html#ga2cb1e3d3ebb167348fdabec74653d5c3"></a><br/></td></tr> <tr class="separator:ga2cb1e3d3ebb167348fdabec74653d5c3"><td class="memSeparator" colspan="2">&#160;</td></tr> </table> </div><!-- contents --> </div><!-- doc-content --> <!-- start footer part --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <ul> <li class="navelem"><a class="el" href="dir_be2d3df67661aefe0e3f0071a1d6f8f1.html">DSP_Lib</a></li><li class="navelem"><a class="el" href="dir_7e8aa87db1ad6b3d9b1f25792e7c5208.html">Source</a></li><li class="navelem"><a class="el" href="dir_2540fe3bf997579a35b40d050fd58db0.html">ControllerFunctions</a></li><li class="navelem"><a class="el" href="arm__pid__init__q15_8c.html">arm_pid_init_q15.c</a></li> <li class="footer">Generated on Tue Sep 23 2014 18:52:42 for CMSIS-DSP by ARM Ltd. All rights reserved. <!-- <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.2 --> </li> </ul> </div> </body> </html>
{ "pile_set_name": "Github" }
package com.ullink.slack.simpleslackapi; import lombok.Data; @Data public class SlackTeam { private final String id; private final String name; private final String domain; }
{ "pile_set_name": "Github" }
/*++ Copyright (c) 2004 - 2006, Intel Corporation. All rights reserved.<BR> This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. Module Name: CpuFuncs.h Abstract: --*/ #ifndef _CPU_FUNCS_H_ #define _CPU_FUNCS_H_ #define EFI_CPUID_SIGNATURE 0x0 #define EFI_CPUID_VERSION_INFO 0x1 #define EFI_CPUID_CACHE_INFO 0x2 #define EFI_CPUID_SERIAL_NUMBER 0x3 #define EFI_CPUID_EXTENDED_FUNCTION 0x80000000 #define EFI_CPUID_EXTENDED_CPU_SIG 0x80000001 #define EFI_CPUID_BRAND_STRING1 0x80000002 #define EFI_CPUID_BRAND_STRING2 0x80000003 #define EFI_CPUID_BRAND_STRING3 0x80000004 // // CPUID version information masks // Note: leaving masks here is for the compatibility // use EfiCpuVersion (...) instead // #define EFI_CPUID_FAMILY 0x0F00 #define EFI_CPUID_MODEL 0x00F0 #define EFI_CPUID_STEPPING 0x000F #define EFI_CPUID_PENTIUM_M 0x0600 #define EFI_CPUID_BANIAS 0x0090 #define EFI_CPUID_DOTHAN 0x00D0 #define EFI_CPUID_NETBURST 0x0F00 #define EFI_MSR_IA32_PLATFORM_ID 0x17 #define EFI_MSR_IA32_APIC_BASE 0x1B #define EFI_MSR_EBC_HARD_POWERON 0x2A #define EFI_MSR_EBC_SOFT_POWERON 0x2B #define BINIT_DRIVER_DISABLE 0x40 #define INTERNAL_MCERR_DISABLE 0x20 #define INITIATOR_MCERR_DISABLE 0x10 #define EFI_MSR_EBC_FREQUENCY_ID 0x2C #define EFI_MSR_IA32_BIOS_UPDT_TRIG 0x79 #define EFI_MSR_IA32_BIOS_SIGN_ID 0x8B #define EFI_MSR_PSB_CLOCK_STATUS 0xCD #define EFI_APIC_GLOBAL_ENABLE 0x800 #define EFI_MSR_IA32_MISC_ENABLE 0x1A0 #define LIMIT_CPUID_MAXVAL_ENABLE_BIT 0x00400000 #define AUTOMATIC_THERMAL_CONTROL_ENABLE_BIT 0x00000008 #define COMPATIBLE_FPU_OPCODE_ENABLE_BIT 0x00000004 #define LOGICAL_PROCESSOR_PRIORITY_ENABLE_BIT 0x00000002 #define FAST_STRING_ENABLE_BIT 0x00000001 #define EFI_CACHE_VARIABLE_MTRR_BASE 0x200 #define EFI_CACHE_VARIABLE_MTRR_END 0x20F #define EFI_CACHE_IA32_MTRR_DEF_TYPE 0x2FF #define EFI_CACHE_VALID_ADDRESS 0xFFFFFF000 #define EFI_CACHE_MTRR_VALID 0x800 #define EFI_CACHE_FIXED_MTRR_VALID 0x400 #define EFI_MSR_VALID_MASK 0xFFFFFFFFF #define EFI_IA32_MTRR_FIX64K_00000 0x250 #define EFI_IA32_MTRR_FIX16K_80000 0x258 #define EFI_IA32_MTRR_FIX16K_A0000 0x259 #define EFI_IA32_MTRR_FIX4K_C0000 0x268 #define EFI_IA32_MTRR_FIX4K_C8000 0x269 #define EFI_IA32_MTRR_FIX4K_D0000 0x26A #define EFI_IA32_MTRR_FIX4K_D8000 0x26B #define EFI_IA32_MTRR_FIX4K_E0000 0x26C #define EFI_IA32_MTRR_FIX4K_E8000 0x26D #define EFI_IA32_MTRR_FIX4K_F0000 0x26E #define EFI_IA32_MTRR_FIX4K_F8000 0x26F #define EFI_IA32_MCG_CAP 0x179 #define EFI_IA32_MCG_CTL 0x17B #define EFI_IA32_MC0_CTL 0x400 #define EFI_IA32_MC0_STATUS 0x401 #define EFI_CACHE_UNCACHEABLE 0 #define EFI_CACHE_WRITECOMBINING 1 #define EFI_CACHE_WRITETHROUGH 4 #define EFI_CACHE_WRITEPROTECTED 5 #define EFI_CACHE_WRITEBACK 6 // // Combine f(FamilyId), m(Model), s(SteppingId) to a single 32 bit number // #define EfiMakeCpuVersion(f, m, s) \ (((UINT32) (f) << 16) | ((UINT32) (m) << 8) | ((UINT32) (s))) typedef struct { UINT32 HeaderVersion; UINT32 UpdateRevision; UINT32 Date; UINT32 ProcessorId; UINT32 Checksum; UINT32 LoaderRevision; UINT32 ProcessorFlags; UINT32 DataSize; UINT32 TotalSize; UINT8 Reserved[12]; } EFI_CPU_MICROCODE_HEADER; typedef struct { UINT32 ExtSigCount; UINT32 ExtChecksum; UINT8 Reserved[12]; UINT32 ProcessorId; UINT32 ProcessorFlags; UINT32 Checksum; } EFI_CPU_MICROCODE_EXT_HEADER; typedef struct { UINT32 RegEax; UINT32 RegEbx; UINT32 RegEcx; UINT32 RegEdx; } EFI_CPUID_REGISTER; VOID EfiWriteMsr ( IN UINT32 Input, IN UINT64 Value ) /*++ Routine Description: Write Cpu MSR Arguments: Input -The index value to select the register Value -The value to write to the selected register Returns: None --*/ ; UINT64 EfiReadMsr ( IN UINT32 Input ) /*++ Routine Description: Read Cpu MSR. Arguments: Input: -The index value to select the register Returns: Return the read data --*/ ; VOID EfiCpuid ( IN UINT32 RegEax, OUT EFI_CPUID_REGISTER *Reg ) /*++ Routine Description: Get the Cpu info by execute the CPUID instruction. Arguments: RegEax -The input value to put into register EAX Reg -The Output value Returns: None --*/ ; VOID EfiCpuVersion ( IN UINT16 *FamilyId, OPTIONAL IN UINT8 *Model, OPTIONAL IN UINT8 *SteppingId, OPTIONAL IN UINT8 *Processor OPTIONAL ) /*++ Routine Description: Extract CPU detail version infomation Arguments: FamilyId - FamilyId, including ExtendedFamilyId Model - Model, including ExtendedModel SteppingId - SteppingId Processor - Processor --*/ ; UINT64 EfiReadTsc ( VOID ) /*++ Routine Description: Read Time stamp. Arguments: None Returns: Return the read data --*/ ; VOID EfiCpuidExt ( IN UINT32 RegisterInEax, IN UINT32 CacheLevel, OUT EFI_CPUID_REGISTER *Regs ) /*++ Routine Description: When RegisterInEax != 4, the functionality is the same as EfiCpuid. When RegisterInEax == 4, the function return the deterministic cache parameters by excuting the CPUID instruction Arguments: RegisterInEax: - The input value to put into register EAX CacheLevel: - The deterministic cache level Regs: - The Output value Returns: None --*/ ; #endif
{ "pile_set_name": "Github" }
gcr.io/google_containers/hyperkube-arm:v1.16.2
{ "pile_set_name": "Github" }
package pcap import ( "io" "github.com/brimsec/zq/pkg/nano" "github.com/brimsec/zq/pkg/ranger" "github.com/brimsec/zq/pkg/slicer" ) func NewSlicer(seeker io.ReadSeeker, index Index, span nano.Span) (*slicer.Reader, error) { slices, err := GenerateSlices(index, span) if err != nil { return nil, err } return slicer.NewReader(seeker, slices) } // GenerateSlices takes an index and time span and generates a list of // slices that should be read to enumerate the relevant chunks of an // underlying pcap file. Extra packets may appear in the resulting stream // but all packets that fall within the time range will be produced, i.e., // another layering of time filtering should be applied to resulting packets. func GenerateSlices(index Index, span nano.Span) ([]slicer.Slice, error) { var slices []slicer.Slice for _, section := range index { pslice, err := FindPacketSlice(section.Index, span) if err == ErrNoPcapsFound { continue } if err != nil { return nil, err } for _, slice := range section.Blocks { slices = append(slices, slice) } slices = append(slices, pslice) } return slices, nil } func FindPacketSlice(e ranger.Envelope, span nano.Span) (slicer.Slice, error) { if len(e) == 0 { return slicer.Slice{}, ErrNoPcapsFound } d := e.FindSmallestDomain(ranger.Range{uint64(span.Ts), uint64(span.End())}) gap := d.X1 - d.X0 if gap == 0 { return slicer.Slice{}, ErrNoPcapsFound } return slicer.Slice{d.X0, d.X1 - d.X0}, nil }
{ "pile_set_name": "Github" }