hexsha
stringlengths
40
40
size
int64
5
1.05M
ext
stringclasses
98 values
lang
stringclasses
21 values
max_stars_repo_path
stringlengths
3
945
max_stars_repo_name
stringlengths
4
118
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
945
max_issues_repo_name
stringlengths
4
118
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
134k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
945
max_forks_repo_name
stringlengths
4
135
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
5
1.05M
avg_line_length
float64
1
1.03M
max_line_length
int64
2
1.03M
alphanum_fraction
float64
0
1
702d2abdbf92b2c514edef46728a634254703384
2,316
hpp
C++
include/cppcoro/net/socket_send_operation.hpp
richard-vock/cppcoro
8933f03ff18b6a004a3ff2a271f4f74fafb29a96
[ "MIT" ]
2,324
2017-04-20T00:53:31.000Z
2022-03-31T08:30:35.000Z
include/cppcoro/net/socket_send_operation.hpp
AlexCr4ckPentest/cppcoro
4e6b44eaec34b8a7fb82357515ece84d64381a50
[ "MIT" ]
165
2017-04-10T21:40:51.000Z
2022-02-25T15:45:38.000Z
include/cppcoro/net/socket_send_operation.hpp
AlexCr4ckPentest/cppcoro
4e6b44eaec34b8a7fb82357515ece84d64381a50
[ "MIT" ]
325
2017-05-04T18:48:21.000Z
2022-03-28T19:29:54.000Z
/////////////////////////////////////////////////////////////////////////////// // Copyright (c) Lewis Baker // Licenced under MIT license. See LICENSE.txt for details. /////////////////////////////////////////////////////////////////////////////// #ifndef CPPCORO_NET_SOCKET_SEND_OPERATION_HPP_INCLUDED #define CPPCORO_NET_SOCKET_SEND_OPERATION_HPP_INCLUDED #include <cppcoro/config.hpp> #include <cppcoro/cancellation_token.hpp> #include <cstdint> #if CPPCORO_OS_WINNT # include <cppcoro/detail/win32.hpp> # include <cppcoro/detail/win32_overlapped_operation.hpp> namespace cppcoro::net { class socket; class socket_send_operation_impl { public: socket_send_operation_impl( socket& s, const void* buffer, std::size_t byteCount) noexcept : m_socket(s) , m_buffer(const_cast<void*>(buffer), byteCount) {} bool try_start(cppcoro::detail::win32_overlapped_operation_base& operation) noexcept; void cancel(cppcoro::detail::win32_overlapped_operation_base& operation) noexcept; private: socket& m_socket; cppcoro::detail::win32::wsabuf m_buffer; }; class socket_send_operation : public cppcoro::detail::win32_overlapped_operation<socket_send_operation> { public: socket_send_operation( socket& s, const void* buffer, std::size_t byteCount) noexcept : m_impl(s, buffer, byteCount) {} private: friend class cppcoro::detail::win32_overlapped_operation<socket_send_operation>; bool try_start() noexcept { return m_impl.try_start(*this); } socket_send_operation_impl m_impl; }; class socket_send_operation_cancellable : public cppcoro::detail::win32_overlapped_operation_cancellable<socket_send_operation_cancellable> { public: socket_send_operation_cancellable( socket& s, const void* buffer, std::size_t byteCount, cancellation_token&& ct) noexcept : cppcoro::detail::win32_overlapped_operation_cancellable<socket_send_operation_cancellable>(std::move(ct)) , m_impl(s, buffer, byteCount) {} private: friend class cppcoro::detail::win32_overlapped_operation_cancellable<socket_send_operation_cancellable>; bool try_start() noexcept { return m_impl.try_start(*this); } void cancel() noexcept { return m_impl.cancel(*this); } socket_send_operation_impl m_impl; }; } #endif // CPPCORO_OS_WINNT #endif
24.378947
110
0.718048
2fc7102688c701aaa329bcfa0f786cc0ecbade58
317
py
Python
dkr-py310/docker-student-portal-310/course_files/experimental/py_socket_connector_info.py
pbarton666/virtual_classroom
a9d0dc2eb16ebc4d2fd451c3a3e6f96e37c87675
[ "MIT" ]
null
null
null
dkr-py310/docker-student-portal-310/course_files/experimental/py_socket_connector_info.py
pbarton666/virtual_classroom
a9d0dc2eb16ebc4d2fd451c3a3e6f96e37c87675
[ "MIT" ]
null
null
null
dkr-py310/docker-student-portal-310/course_files/experimental/py_socket_connector_info.py
pbarton666/virtual_classroom
a9d0dc2eb16ebc4d2fd451c3a3e6f96e37c87675
[ "MIT" ]
null
null
null
#py_socket_connector_info.py import socket ip_address= 'localhost' #serving locally only port = 8000 #an arbitrary 4-digit port protocol_family_name= socket.AF_INET #olde tyme IPv4 protocol socket_type= socket.SOCK_STREAM #a simple stream
52.833333
72
0.624606
1a7460983fa368db0f31264f913e4750a7474fd7
1,483
py
Python
packaging/versionator.py
guyang3532/builder
94d4cb20f59ed72e81b5371655ee6d8fa2b75260
[ "BSD-2-Clause" ]
1
2021-06-22T15:33:32.000Z
2021-06-22T15:33:32.000Z
packaging/versionator.py
guyang3532/builder
94d4cb20f59ed72e81b5371655ee6d8fa2b75260
[ "BSD-2-Clause" ]
null
null
null
packaging/versionator.py
guyang3532/builder
94d4cb20f59ed72e81b5371655ee6d8fa2b75260
[ "BSD-2-Clause" ]
1
2019-06-27T20:53:46.000Z
2019-06-27T20:53:46.000Z
#!/usr/bin/env python """ TODO: This was hard to read in pkg_helpers.bash, so I've extracted it to its own script. This script is not yet being called by pkg_helpers.bash yet. """ import os import sys import json import re cuver = os.environ.get('CU_VERSION') cuver = (cuver[:-1] + '.' + cuver[-1]).replace('cu', 'cuda') if cuver != 'cpu' else cuver pytorch_entries = json.load(sys.stdin)['pytorch'] filtered_pytorch_entries_plat_cuda = list(filter( lambda x: (x['platform'] == 'darwin' or cuver in x['fn']), pytorch_entries )) filtered_pytorch_entries_py_ver = list(filter( lambda x: 'py' + os.environ['PYTHON_VERSION'] in x['fn'], filtered_pytorch_entries_plat_cuda )) versions = [x['version'] for x in filtered_pytorch_entries_py_ver] try: last_entry = versions[-1] print(re.sub(r'\\+.*$', '', last_entry)) except Exception as e: all_platforms = set([x['platform'] for x in pytorch_entries]) all_fns = set([x['fn'] for x in pytorch_entries]) msg = "\n\t".join([ "Exception was: " + str(e), "Unfiltered entries count: " + str(len(pytorch_entries)), "Filtered by platform count: " + str(len(filtered_pytorch_entries_plat_cuda)), "Filtered by python version count: " + str(len(filtered_pytorch_entries_py_ver)), "all_platforms:\n" + "".join(map(lambda x: "\t\t" + str(x) + "\n", all_platforms)), "all_fns:\n" + "".join(map(lambda x: "\t\t" + str(x) + "\n", all_fns)), ]) sys.exit(msg)
30.265306
96
0.65408
12bbb57a25439888674e226c8c36e3a275b76d90
6,249
cs
C#
src/Cosmos.Security.Cryptography/Cosmos/Security/Cryptography/SM2/Sm2KeyGenerator.cs
CosmosLoops/OneMore
f4b229b2fbd32f801a39b6c30edc45bbee3493a3
[ "Apache-2.0" ]
3
2021-02-17T08:01:56.000Z
2021-05-16T05:15:39.000Z
src/Cosmos.Security.Cryptography/Cosmos/Security/Cryptography/SM2/Sm2KeyGenerator.cs
CosmosLoops/OneMore
f4b229b2fbd32f801a39b6c30edc45bbee3493a3
[ "Apache-2.0" ]
2
2021-04-25T02:50:14.000Z
2021-04-30T07:04:02.000Z
src/Cosmos.Security.Cryptography/Cosmos/Security/Cryptography/SM2/Sm2KeyGenerator.cs
cosmos-loops/Encryption
f4b229b2fbd32f801a39b6c30edc45bbee3493a3
[ "Apache-2.0" ]
2
2020-09-11T06:41:35.000Z
2020-11-23T01:39:07.000Z
using System; using Cosmos.Conversions; using Org.BouncyCastle.Crypto.Generators; using Org.BouncyCastle.Crypto.Parameters; using Org.BouncyCastle.Math; using Org.BouncyCastle.Math.EC; using Org.BouncyCastle.Pkcs; using Org.BouncyCastle.Security; using Org.BouncyCastle.X509; // ReSharper disable CheckNamespace namespace Cosmos.Security.Cryptography { public static class Sm2KeyGenerator { public static Sm2Key Generate(AsymmetricKeyMode mode) { return mode switch { AsymmetricKeyMode.PublicKey => GeneratePublicKey(), AsymmetricKeyMode.PrivateKey => GeneratePrivateKey(), _ => GenerateKeyInternal() }; } public static Sm2Key Generate(AsymmetricKeyMode mode, ECPoint publicPem, BigInteger privatePem) { return mode switch { AsymmetricKeyMode.PublicKey => GeneratePublicKey(publicPem), AsymmetricKeyMode.PrivateKey => GeneratePrivateKey(privatePem), _ => GenerateKeyInternal(publicPem, privatePem) }; } public static Sm2Key Generate(AsymmetricKeyMode mode, string publicKey, string privateKey) { return mode switch { AsymmetricKeyMode.PublicKey => GeneratePublicKey(publicKey), AsymmetricKeyMode.PrivateKey => GeneratePrivateKey(privateKey), _ => GenerateKeyInternal(publicKey, privateKey) }; } public static Sm2Key GeneratePublicKey() { var sm2 = GenerateKeyPair(); return new Sm2Key { PublicKey = sm2.publicPem, PrivateKey = null, Mode = AsymmetricKeyMode.PublicKey }; } public static Sm2Key GeneratePublicKey(ECPoint publicPem) { return new() { PublicKey = BaseConv.ToBase64(publicPem.GetEncoded()), // Hex.Encode(publicPem.GetEncoded()).GetString(encoding.SafeEncodingValue()).ToUpper(), PrivateKey = null, Mode = AsymmetricKeyMode.PublicKey }; } public static Sm2Key GeneratePublicKey(string publicKey) { return new Sm2Key { PublicKey = publicKey, PrivateKey = null, Mode = AsymmetricKeyMode.PublicKey }; } public static Sm2Key GeneratePrivateKey() { var sm2 = GenerateKeyPair(); return new Sm2Key { PublicKey = null, PrivateKey = sm2.privatePem, Mode = AsymmetricKeyMode.PrivateKey }; } public static Sm2Key GeneratePrivateKey(BigInteger privatePem) { return new() { PublicKey = null, PrivateKey = BaseConv.ToBase64(privatePem.ToByteArray()), // Hex.Encode(privatePem.ToByteArray()).GetString(encoding.SafeEncodingValue()).ToUpper(), Mode = AsymmetricKeyMode.PrivateKey }; } public static Sm2Key GeneratePrivateKey(string privateKey) { return new() { PublicKey = null, PrivateKey = privateKey, Mode = AsymmetricKeyMode.PrivateKey }; } private static Sm2Key GenerateKeyInternal() { var sm2 = GenerateKeyPair(); return new Sm2Key { PublicKey = sm2.publicPem, PrivateKey = sm2.privatePem, Mode = AsymmetricKeyMode.Both }; } private static Sm2Key GenerateKeyInternal(ECPoint publicPem, BigInteger privatePem) { return new Sm2Key(publicPem, privatePem); } private static Sm2Key GenerateKeyInternal(string publicKey, string privateKey) { return new Sm2Key { PublicKey = publicKey, PrivateKey = privateKey, Mode = AsymmetricKeyMode.Both }; } private static (string privatePem, string publicPem) GenerateKeyPair() { var SM2_ECC_P = new BigInteger("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF", 16); var SM2_ECC_A = new BigInteger("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFC", 16); var SM2_ECC_B = new BigInteger("28E9FA9E9D9F5E344D5A9E4BCF6509A7F39789F515AB8F92DDBCBD414D940E93", 16); var SM2_ECC_N = new BigInteger("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123", 16); var SM2_ECC_H = BigInteger.One; var SM2_ECC_GX = new BigInteger("32C4AE2C1F1981195F9904466A39C9948FE30BBFF2660BE1715A4589334C74C7", 16); var SM2_ECC_GY = new BigInteger("BC3736A2F4F6779C59BDCEE36B692153D0A9877CC62A474002DF32E52139F0A0", 16); var SM2_ECC_Random = new SecureRandom(); ECCurve curve = new FpCurve(SM2_ECC_P, SM2_ECC_A, SM2_ECC_B, SM2_ECC_N, SM2_ECC_H); var g = curve.CreatePoint(SM2_ECC_GX, SM2_ECC_GY); var domainParams = new ECDomainParameters(curve, g, SM2_ECC_N); var keyPairGenerator = new ECKeyPairGenerator(); var aKeyGenParams = new ECKeyGenerationParameters(domainParams, SM2_ECC_Random); keyPairGenerator.Init(aKeyGenParams); var asymmetricCipherKeyPair = keyPairGenerator.GenerateKeyPair(); var asymmetricPublicKey = (ECPublicKeyParameters) asymmetricCipherKeyPair.Public; var asymmetricPrivateKey = (ECPrivateKeyParameters) asymmetricCipherKeyPair.Private; var privateKeyInfo = PrivateKeyInfoFactory.CreatePrivateKeyInfo(asymmetricPrivateKey); var priPem = Convert.ToBase64String(privateKeyInfo.GetDerEncoded()); var publicKeyInfo = SubjectPublicKeyInfoFactory.CreateSubjectPublicKeyInfo(asymmetricPublicKey); var pubPem = Convert.ToBase64String(publicKeyInfo.GetDerEncoded()); return (priPem, pubPem); } } }
36.54386
164
0.611138
be4227eb8889c514aaef956486e7ee64787f2fac
1,812
ts
TypeScript
Frontend/src/app/categories/category-form/category-form.component.ts
samaronesalles/RealFinance
8186ae0f8a224cd8b53d4253154a3f99cf217d4b
[ "MIT" ]
1
2020-03-31T23:05:15.000Z
2020-03-31T23:05:15.000Z
Frontend/src/app/categories/category-form/category-form.component.ts
samaronesalles/RealFinance
8186ae0f8a224cd8b53d4253154a3f99cf217d4b
[ "MIT" ]
4
2021-09-02T08:25:28.000Z
2022-02-27T01:38:11.000Z
Frontend/src/app/categories/category-form/category-form.component.ts
samaronesalles/RealFinance
8186ae0f8a224cd8b53d4253154a3f99cf217d4b
[ "MIT" ]
null
null
null
import { Component, OnInit } from '@angular/core'; import { FormGroup, FormBuilder, Validators } from '@angular/forms'; import { CategoryService } from '../category.service' import { Location } from '@angular/common'; import { ActivatedRoute, Router } from '@angular/router'; import { Category } from '../category/category.model'; import { THIS_EXPR } from '@angular/compiler/src/output/output_ast'; import { pipe } from 'rxjs'; import { map, switchMap } from 'rxjs/operators'; @Component({ selector: 'app-category-form', templateUrl: './category-form.component.html', styleUrls: ['./category-form.component.scss'] }) export class CategoryFormComponent implements OnInit { constructor(private fb: FormBuilder, private service: CategoryService, private location: Location, private route: ActivatedRoute, private router: Router) { } form: FormGroup; submitted = false; messageReturn = undefined; categoryTypes: any[] ngOnInit() { this.categoryTypes = this.service.getOptionsRadio(); const category = this.route.snapshot.data['category']; this.form = this.fb.group({ id: category.id, nome: [category.nome, [Validators.required]], descricao: [category.descricao], cor: [category.cor,[Validators.required]], tipo: [category.receita_ou_despesa,[Validators.required]], }); } async onSubmit() { this.submitted = true; if (this.form.valid) { try { const response = await this.service.save(this.form.value); this.router.navigate(['/categories']); } catch (err) { this.messageReturn = err.response.data.error; } } } onCancel() { this.submitted = false; this.form.reset(); } hasError(field: string) { return this.form.get(field).errors; } }
25.166667
160
0.666115
ae6be8c431b9806c93114bd619400560fcc5c481
1,730
lua
Lua
libraries/http.lua
Lexicality/libgmod
8382a24dd0f10e4a9974a04453d82dd8c03900f0
[ "MIT" ]
6
2020-06-25T15:51:09.000Z
2022-01-07T00:56:34.000Z
libraries/http.lua
Lexicality/libgmod
8382a24dd0f10e4a9974a04453d82dd8c03900f0
[ "MIT" ]
1
2021-04-13T20:09:05.000Z
2022-01-07T00:57:54.000Z
libraries/http.lua
Lexicality/libgmod
8382a24dd0f10e4a9974a04453d82dd8c03900f0
[ "MIT" ]
null
null
null
--- The http library allows either the server or client to communicate with external websites via HTTP, both GET (http.Fetch) and POST (http.Post) are supported. A more powerful & advanced method can be used via the global Global.HTTP function. _G.http = {} --- Launches a GET request. --- ℹ **NOTE**: HTTP-requests on private networks don't work. --- To enable HTTP-requests on private networks use Command Line Parameters `-allowlocalhttp` --- @param url string @The URL of the website to fetch. --- @param onSuccess function @Function to be called on success --- @param onFailure function @Function to be called on failure --- @param headers table @KeyValue table for headers function http.Fetch(url, onSuccess, onFailure, headers) end --- Sends an asynchronous POST request to a HTTP server. --- HTTP requests returning a status code >= 400 are still considered a success and will call the onSuccess callback. --- The onFailure callback is usually only called on DNS or TCP errors (e.g. the website is unavailable or the domain does not exist) --- ℹ **NOTE**: HTTP-requests on private networks don't work. To enable HTTP-requests on private networks use Command Line Parameters `-allowlocalhttp` --- @param url string @The url to of the website to fetch. --- @param parameters table @The post parameters to be send to the server --- @param onSuccess function @The function called on success: function( string responseText, number contentLength, table responseHeaders, number statusCode ) --- @param onFailure function @The function called on failure: function( string errorMessage ) --- @param headers table @KeyValue table for headers function http.Post(url, parameters, onSuccess, onFailure, headers) end
69.2
246
0.757803
3f7dafb69cd314d6f094014fc4cc9d0b86f7305a
504
php
PHP
app/Models/EmployerTypeModel.php
SuntechITOverseasEducationPvtLtd/interviewxp_v1
e0ad151d3910e445f758bf37cad0138f746577cf
[ "MIT" ]
null
null
null
app/Models/EmployerTypeModel.php
SuntechITOverseasEducationPvtLtd/interviewxp_v1
e0ad151d3910e445f758bf37cad0138f746577cf
[ "MIT" ]
null
null
null
app/Models/EmployerTypeModel.php
SuntechITOverseasEducationPvtLtd/interviewxp_v1
e0ad151d3910e445f758bf37cad0138f746577cf
[ "MIT" ]
null
null
null
<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; class EmployerTypeModel extends Model { protected $table ="employer_type"; protected $fillable = [ 'member_id', 'designation', 'company_name', 'start_month', 'start_year', 'end_month', 'end_year', 'employer_type', 'display_company', 'country', 'state', 'city', 'description', ]; }
18.666667
40
0.511905
a44bc2c13ef1855316dab07bf5860388f3f97c57
3,479
php
PHP
tests/TwilioProviderTest.php
nikkuang/twilio
6c8df52e7cb260cbf87b2823abc96fd167ced3ce
[ "MIT" ]
null
null
null
tests/TwilioProviderTest.php
nikkuang/twilio
6c8df52e7cb260cbf87b2823abc96fd167ced3ce
[ "MIT" ]
null
null
null
tests/TwilioProviderTest.php
nikkuang/twilio
6c8df52e7cb260cbf87b2823abc96fd167ced3ce
[ "MIT" ]
1
2021-09-02T19:45:23.000Z
2021-09-02T19:45:23.000Z
<?php namespace NotificationChannels\Twilio\Test; use ArrayAccess; use Illuminate\Contracts\Foundation\Application; use Mockery; use Mockery\Adapter\Phpunit\MockeryTestCase; use NotificationChannels\Twilio\Twilio; use NotificationChannels\Twilio\TwilioChannel; use NotificationChannels\Twilio\TwilioConfig; use NotificationChannels\Twilio\TwilioProvider; use Twilio\Rest\Client as TwilioService; class TwilioProviderTest extends MockeryTestCase { /** @var TwilioProvider */ protected $provider; /** @var App */ protected $app; public function setUp(): void { parent::setUp(); $this->app = Mockery::mock(App::class); $this->provider = new TwilioProvider($this->app); } /** @test */ public function it_gives_an_instantiated_twilio_object_when_the_channel_asks_for_it() { $configArray = [ 'account_sid' => 'sid', 'auth_token' => 'token', 'from' => 'from', ]; $this->app->shouldReceive('offsetGet') ->with('config') ->andReturn([ 'services.twilio' => $configArray, ]); $twilio = Mockery::mock(TwilioService::class); $config = Mockery::mock(TwilioConfig::class, $configArray); $this->app->shouldReceive('make')->with(TwilioConfig::class)->andReturn($config); $this->app->shouldReceive('make')->with(TwilioService::class)->andReturn($twilio); $this->app->shouldReceive('when')->with(TwilioChannel::class)->once()->andReturn($this->app); $this->app->shouldReceive('needs')->with(Twilio::class)->once()->andReturn($this->app); $this->app->shouldReceive('give')->with(Mockery::on(function ($twilio) { return $twilio() instanceof Twilio; }))->once(); $this->app->shouldReceive('bind')->with(TwilioService::class, Mockery::on(function ($twilio) { return $twilio() instanceof TwilioService; }))->once()->andReturn($this->app); $this->provider->boot(); } /** @test */ public function it_gives_an_instantiated_twilio_object_when_the_channel_asks_for_it_with_new_config() { $configArray = [ 'username' => 'username', 'password' => 'password', 'account_sid' => 'sid', 'from' => 'from', ]; $this->app->shouldReceive('offsetGet') ->with('config') ->andReturn([ 'services.twilio' => $configArray, ]); $twilio = Mockery::mock(TwilioService::class); $config = Mockery::mock(TwilioConfig::class, $configArray); $this->app->shouldReceive('make')->with(TwilioConfig::class)->andReturn($config); $this->app->shouldReceive('make')->with(TwilioService::class)->andReturn($twilio); $this->app->shouldReceive('when')->with(TwilioChannel::class)->once()->andReturn($this->app); $this->app->shouldReceive('needs')->with(Twilio::class)->once()->andReturn($this->app); $this->app->shouldReceive('give')->with(Mockery::on(function ($twilio) { return $twilio() instanceof Twilio; }))->once(); $this->app->shouldReceive('bind')->with(TwilioService::class, Mockery::on(function ($twilio) { return $twilio() instanceof TwilioService; }))->once()->andReturn($this->app); $this->provider->boot(); } } interface App extends Application, ArrayAccess { }
33.451923
105
0.609945
1be926b44976c8f514ac2d40fc0a2c8b34bf5f3a
306
rb
Ruby
lib/parser/rule.rb
esbel/business-dsl-example
d28d83476ed8b621469ba777c26e7ec86d82cf7b
[ "MIT" ]
1
2016-01-15T20:14:36.000Z
2016-01-15T20:14:36.000Z
lib/parser/rule.rb
esbel/business-dsl-example
d28d83476ed8b621469ba777c26e7ec86d82cf7b
[ "MIT" ]
null
null
null
lib/parser/rule.rb
esbel/business-dsl-example
d28d83476ed8b621469ba777c26e7ec86d82cf7b
[ "MIT" ]
null
null
null
class Parser::Rule < Parser::BaseRule def initialize(expr, opts = {}, &block) raise Parser::NoMatchingRuleProvided.new("Rule must have matching rule Regexp provided.") unless expr.kind_of?(Regexp) @expression = expr @production_code = block end def multiline? false end end
27.818182
126
0.69281
b7770ffe54e055adc39a5bce768cddb392eb68be
1,442
cs
C#
src/RollerSnake/RollerSnakeTuning.cs
daviscook477/ONI-Mods
8b59ae34d5fe8a74e3383756eca6f95a9d588ca5
[ "MIT", "Unlicense" ]
4
2019-07-26T03:02:41.000Z
2021-04-21T16:58:03.000Z
src/RollerSnake/RollerSnakeTuning.cs
daviscook477/ONI-Mods
8b59ae34d5fe8a74e3383756eca6f95a9d588ca5
[ "MIT", "Unlicense" ]
16
2019-08-12T22:10:39.000Z
2022-02-03T08:02:40.000Z
src/RollerSnake/RollerSnakeTuning.cs
daviscook477/ONI-Mods
8b59ae34d5fe8a74e3383756eca6f95a9d588ca5
[ "MIT", "Unlicense" ]
29
2019-07-17T23:02:30.000Z
2022-03-31T21:28:54.000Z
using System.Collections.Generic; using TUNING; namespace RollerSnake { public class RollerSnakeTuning { public static List<FertilityMonitor.BreedingChance> EGG_CHANCES_BASE = new List<FertilityMonitor.BreedingChance>() { new FertilityMonitor.BreedingChance() { egg = RollerSnakeConfig.EggId.ToTag(), weight = 0.98f }, new FertilityMonitor.BreedingChance() { egg = SteelRollerSnakeConfig.EggId.ToTag(), weight = 0.02f }, }; public static List<FertilityMonitor.BreedingChance> EGG_CHANCES_STEEL = new List<FertilityMonitor.BreedingChance>() { new FertilityMonitor.BreedingChance() { egg = RollerSnakeConfig.EggId.ToTag(), weight = 0.35f }, new FertilityMonitor.BreedingChance() { egg = SteelRollerSnakeConfig.EggId.ToTag(), weight = 0.65f }, }; public static float STANDARD_CALORIES_PER_CYCLE = 700000f; public static float STANDARD_STARVE_CYCLES = 10f; public static float STANDARD_STOMACH_SIZE = STANDARD_CALORIES_PER_CYCLE * STANDARD_STARVE_CYCLES; public static int PEN_SIZE_PER_CREATURE = CREATURES.SPACE_REQUIREMENTS.TIER3; public static float EGG_MASS = 1f; } }
35.170732
123
0.599168
15c265de8f276d8fbc93c90210fdd3071b6ad598
316
rb
Ruby
spec/models/inquiry/node_spec.rb
snkmr/shirasagi
f3fd6d3999d1f295fc08f8b00a335184934a3a35
[ "MIT" ]
1
2018-12-01T05:19:22.000Z
2018-12-01T05:19:22.000Z
spec/models/inquiry/node_spec.rb
snkmr/shirasagi
f3fd6d3999d1f295fc08f8b00a335184934a3a35
[ "MIT" ]
2
2015-01-22T06:09:50.000Z
2015-01-22T07:10:51.000Z
spec/models/inquiry/node_spec.rb
snkmr/shirasagi
f3fd6d3999d1f295fc08f8b00a335184934a3a35
[ "MIT" ]
2
2017-04-11T00:47:44.000Z
2019-01-12T07:11:17.000Z
require 'spec_helper' describe Inquiry::Node::Base, type: :model, dbscope: :example do let(:item) { create :inquiry_node_base } it_behaves_like "cms_node#spec" end describe Inquiry::Node::Form, type: :model, dbscope: :example do let(:item) { create :inquiry_node_form } it_behaves_like "cms_node#spec" end
26.333333
64
0.740506
a1044372a48ce097072606a1bfd3ed4403f708b4
475
ts
TypeScript
DataHub/IoTCommunicationGui/ClientApp/src/app/nav-menu/nav-menu.component.ts
LLDevLab/LLDevHomeAutomation
907670f9812529dba51080e6490a2b9fd0c43d41
[ "MIT" ]
1
2021-05-07T18:49:27.000Z
2021-05-07T18:49:27.000Z
DataHub/IoTCommunicationGui/ClientApp/src/app/nav-menu/nav-menu.component.ts
LLDevLab/LLDevHomeAutomation
907670f9812529dba51080e6490a2b9fd0c43d41
[ "MIT" ]
null
null
null
DataHub/IoTCommunicationGui/ClientApp/src/app/nav-menu/nav-menu.component.ts
LLDevLab/LLDevHomeAutomation
907670f9812529dba51080e6490a2b9fd0c43d41
[ "MIT" ]
null
null
null
import { Component, Input, OnChanges, SimpleChanges } from '@angular/core'; import { MenuType } from '../enums'; @Component({ selector: 'app-nav-menu', templateUrl: './nav-menu.component.html', styleUrls: ['./nav-menu.component.css'] }) export class NavMenuComponent implements OnChanges { @Input() menuType: MenuType; constructor() { } ngOnChanges(changes: SimpleChanges) { if (typeof changes.menuType.currentValue === "undefined") return; } }
22.619048
75
0.684211
cd69d1ab40826ee4f2b9f5585fc555b26df8f55c
15,778
cs
C#
CHIP8.Emulator/Chip8.cs
severinkaderli/CHIP8.Emulator
cd10ccc5415e08e2a3166419e24bf2d0c3d1b67f
[ "MIT" ]
2
2017-10-22T06:48:39.000Z
2019-01-04T22:17:35.000Z
CHIP8.Emulator/Chip8.cs
severinkaderli/CHIP8.Emulator
cd10ccc5415e08e2a3166419e24bf2d0c3d1b67f
[ "MIT" ]
null
null
null
CHIP8.Emulator/Chip8.cs
severinkaderli/CHIP8.Emulator
cd10ccc5415e08e2a3166419e24bf2d0c3d1b67f
[ "MIT" ]
null
null
null
using System; using System.IO; using System.Collections.Generic; using System.Drawing; using OpenTK.Input; using OpenTK.Graphics.OpenGL; namespace CHIP8.Emulator { class Chip8 { /// <summary> /// Start of the working RAM. /// </summary> private const int START_PROGRAM_MEMORY = 512; /// <summary> /// True if an input was executed. /// </summary> public bool IsInputExecuted { get; set; } = false; /// <summary> /// Holds the last input. /// </summary> public ushort LastInput { get; set; } /// <summary> /// If true the screen should be redrawn. /// </summary> public bool RenderFlag { get; set; } = false; /// <summary> /// The memory of the CHIP-8. /// </summary> private byte[] Memory { get; set; } = new byte[4096]; /// <summary> /// The current opcode. /// </summary> private ushort Instruction { get; set; } /// <summary> /// CPU registers from V0 to VE. VF is the carry flag. /// </summary> private byte[] V { get; set; } = new byte[16]; /// <summary> /// The index register /// </summary> private ushort I { get; set; } = 0; /// <summary> /// Program counter /// </summary> private ushort PC { get; set; } = 0; /// <summary> /// Array that contains the current screen state. /// </summary> private bool[,] GFX { get; set; } = new bool[64, 32]; /// <summary> /// If greater than zero, this timer counts down. /// </summary> private byte DelayTimer { get; set; } = 0x00; /// <summary> /// If the sound timer reaches zero, a sound is emitted. /// </summary> private byte SoundTimer { get; set; } = 0x00; /// <summary> /// The stack /// </summary> private Stack<ushort> Stack { get; set; } = new Stack<ushort>(16); /// <summary> /// Pointer that point to the current stack position. /// </summary> private int StackPointer { get; set; } /// <summary> /// The current state of the keypad. /// </summary> public bool[] key = new bool[16]; /// <summary> /// The fontset of the CHIP8. /// </summary> byte[] fontset = new byte[80] { 0xF0, 0x90, 0x90, 0x90, 0xF0, // 0 0x20, 0x60, 0x20, 0x20, 0x70, // 1 0xF0, 0x10, 0xF0, 0x80, 0xF0, // 2 0xF0, 0x10, 0xF0, 0x10, 0xF0, // 3 0x90, 0x90, 0xF0, 0x10, 0x10, // 4 0xF0, 0x80, 0xF0, 0x10, 0xF0, // 5 0xF0, 0x80, 0xF0, 0x90, 0xF0, // 6 0xF0, 0x10, 0x20, 0x40, 0x40, // 7 0xF0, 0x90, 0xF0, 0x90, 0xF0, // 8 0xF0, 0x90, 0xF0, 0x10, 0xF0, // 9 0xF0, 0x90, 0xF0, 0x90, 0x90, // A 0xE0, 0x90, 0xE0, 0x90, 0xE0, // B 0xF0, 0x80, 0x80, 0x80, 0xF0, // C 0xE0, 0x90, 0x90, 0x90, 0xE0, // D 0xF0, 0x80, 0xF0, 0x80, 0xF0, // E 0xF0, 0x80, 0xF0, 0x80, 0x80 // F }; /// <summary> /// Initializes and resets the system. /// </summary> /// <param name="fileName"></param> public void Initialize(String fileName) { I = 0; StackPointer = 0; PC = START_PROGRAM_MEMORY; LoadGame(fileName); // Load fontset into memory for(int i = 0; i < fontset.Length; ++i) { Memory[i] = fontset[i]; } } /// <summary> /// Loads a game into memory /// </summary> /// <param name="fileName"></param> private void LoadGame(String fileName) { // If the file doesn't exist, exit the application. if(!File.Exists(fileName)) { Console.WriteLine("File {0} doesn't exist!", fileName); Environment.Exit(1); } // Open the file in binary mode using (BinaryReader binaryReader = new BinaryReader(File.Open(fileName, FileMode.Open))) { // Loading the game into memory for (int i = 0; i < binaryReader.BaseStream.Length; i++) { Memory[START_PROGRAM_MEMORY + i] = binaryReader.ReadByte(); } }; } public void EmulateCycle() { // Fetch the current instruction Instruction = (ushort)(Memory[PC] << 8 | Memory[PC + 1]); byte X = (byte)((Instruction & 0x0F00) >> 8); byte Y = (byte)((Instruction & 0x00F0) >> 4); byte N = (byte)(Instruction & 0x000F); byte NN = (byte)(Instruction & 0x00FF); ushort NNN = (byte)(Instruction & 0x0FFF); // Execute the opcode switch (Instruction & 0xF000) { case 0x0000: if (X == 0x0) { if (N == 0x0) { //Clear the display. RenderFlag = true; GFX = new bool[64, 32]; } if (N == 0xE) { //Return from subroutine. PC = Stack.Pop(); } } else { Console.WriteLine("RCA 1802 CODE -- NOT IPLEMENTED"); } break; case 0x1000: // 1NNN: Jump to the address NNN PC = (ushort)((Instruction & 0x0FFF) - 2); ushort other = (ushort)((Instruction & 0x0FFF) - 2); ushort stuff = (ushort)(NNN - 2); Console.WriteLine("NNN: {0}, Other: {0}", stuff, other); break; case 0x2000: // 2NNN: Jump to the subroutine in address NNN Stack.Push(PC); PC = (ushort)((Instruction & 0x0FFF) - 2); break; case 0x3000: // 3XNN: Skip the next instruction if value of register X equals NN if(V[X] == NN) PC += 2; break; case 0x4000: // 4XNN: Skip the next instruction if value of register X not equals NNN if(V[X] != Memory[PC + 1]) PC += 2; break; case 0x5000: // 5XYN: Skip the next instruction if value of register X and Y are equal if(V[X] == V[Y]) { PC += 2; } break; case 0x6000: // 6XNN: Sets value of register X to NN V[X] = (byte)NN; break; case 0x7000: // 7XNN: Increments value of register X by NN V[X] += (byte)NN; break; case 0x8000: switch (N) { case 0x0: // 8XY0 V[X] = V[Y]; break; case 0x1: // 8XY1 V[X] |= V[Y]; break; case 0x2: // 8XY2 V[X] &= V[Y]; break; case 0x3: // 8XY3 V[X] ^= V[Y]; break; case 0x4: // 8XY4 if ((V[X] + V[Y]) > 255) { V[0xF] = 1; } else { V[0xF] = 0; } V[X] = (byte)(V[X] + V[Y]); break; case 0x5: // 8XY5 if(V[X] > V[Y]) { V[0xF] = 1; } else { V[0xF] = 0; } V[X] = (byte)(V[X] - V[Y]); break; case 0x6: // 8XY6 V[0xF] = (byte)(V[X] & 0x1); V[X] >>= 1; break; case 0x7: // 8XY7 if(V[Y] > V[X]) { V[0xF] = 1; } else { V[0xF] = 0; } V[X] = (byte)(V[Y] - V[X]); break; case 0xE: // 8XYE V[0xF] = (byte)(V[X] >> 7); V[X] <<= 1; break; } break; case 0x9000: // 9NNN: Skip next instruction if register X and Y are not equal. if(V[X] != V[Y]) { PC += 2; } break; case 0xA000: // ANNN: Sets I to the address NNN I = (ushort)(Instruction & 0x0FFF); break; case 0xB000: PC = (ushort)((Instruction & 0x0FFF) + V[0] - 2); break; case 0xC000: Random rnd = new Random(); V[X] = (byte)(rnd.Next(255) & NN); break; case 0xD000: // Print sprite to screen V[0xF] = 0; RenderFlag = true; for(int height = 0; height < N; height++) { byte spritePart = Memory[I + height]; for(int width = 0; width < 8; width++) { if((spritePart & (0x80 >> width)) != 0) { ushort _x = (ushort)((V[X] + width) % 64); ushort _y = (ushort)((V[Y] + height) % 32); if(GFX[_x, _y] == true) { V[0xF] = 1; } GFX[_x, _y] ^= true; } } } break; case 0xE000: if(N == 0xE) { if(key[V[X]]) { PC += 2; } } else { if(!key[V[X]]) { PC += 2; } } break; case 0xF000: switch(N) { case 0x7: // Set Vx to delay timer V[X] = DelayTimer; break; case 0xA: // Do not increase program counter until a key is pressed. Then store pressed key. if (IsInputExecuted) { V[X] = (byte)LastInput; } else { PC -= 2; } break; case 0x5: switch (Y) { case 0x1: // Delay Timer = regiserX DelayTimer = (byte) V[X]; break; case 0x5: // Store registers V0 through Vx in memory starting at location I. for (int i = 0; i <= X; i++) { Memory[I + i] = V[i]; } break; case 0x6: // Read registers V0 through Vx from memory starting at location I. for (int i = 0; i <= X; i++) { V[i] = Memory[I + i]; } break; } break; case 0x8: //Sound Timer = registerX SoundTimer = V[X]; break; case 0xE: //I = I + regiserX I += V[X]; break; case 0x9: //Set I to the location of char in registerX I = (ushort)(V[X] * 5); break; case 0x3: // Store BCD representation of Vx in memory locations I, I+1, and I+2. decimal number = V[X]; Memory[I] = (byte)(number / 100); Memory[I + 1] = (byte)((number % 100) / 10); Memory[I + 2] = (byte)((number % 100) % 10); break; } break; default: Console.WriteLine("Unknown opcode: {0:X}", Instruction); break; } IsInputExecuted = false; PC += 2; if (DelayTimer > 0) { DelayTimer--; } if(SoundTimer > 0) { SoundTimer--; if(SoundTimer == 0) { Console.Beep(); } } } /// <summary> /// Draw the graphics if needed /// </summary> public void DrawGraphics() { for (int i = 0; i < 64; i++) { for (int j = 0; j < 32; j++) { if (GFX[i, j]) { GL.Begin(BeginMode.Quads); GL.Vertex2(i * 10, j * 10); GL.Vertex2(i * 10, j * 10 + 10); GL.Vertex2((i + 1) * 10, j * 10 + 10); GL.Vertex2((i + 1) * 10, j * 10); GL.End(); } } } } /// <summary> /// Set the current state of a key. /// </summary> /// <param name="index">The index of the key</param> /// <param name="state">The state to which the key will be set</param> public void SetKey(ushort index, bool state) { key[index] = state; if(state) { IsInputExecuted = true; LastInput = index; } else { IsInputExecuted = false; } } } }
32.004057
116
0.333122
4d4088164b475720a9f368078583cc7f83bcdd29
224
cs
C#
src/Fabricdot.Domain.Core/Entities/IHasConcurrencyStamp.cs
Winches/Fabricdot.Core
002f29623feb203d6ee8355223c6b2f24bd20487
[ "MIT" ]
8
2021-07-15T09:24:48.000Z
2022-01-19T07:06:52.000Z
src/Fabricdot.Domain.Core/Entities/IHasConcurrencyStamp.cs
Winches/Fabricdot.Core
002f29623feb203d6ee8355223c6b2f24bd20487
[ "MIT" ]
null
null
null
src/Fabricdot.Domain.Core/Entities/IHasConcurrencyStamp.cs
Winches/Fabricdot.Core
002f29623feb203d6ee8355223c6b2f24bd20487
[ "MIT" ]
3
2021-11-11T14:25:00.000Z
2022-02-07T09:30:27.000Z
namespace Fabricdot.Domain.Core.Entities { public interface IHasConcurrencyStamp { /// <summary> /// concurrency token /// </summary> string ConcurrencyStamp { get; set; } } }
22.4
45
0.575893
e27b12edde3ec7baac27972f0ef3f3477f678823
7,457
py
Python
src/token_auth/tests/__init__.py
robmoggach/django-token-auth
7ef6e10c27b0168c1272347d0169cdbd96232ed3
[ "BSD-3-Clause" ]
4
2015-03-04T16:35:18.000Z
2016-07-08T19:50:47.000Z
src/token_auth/tests/__init__.py
robmoggach/django-token-auth
7ef6e10c27b0168c1272347d0169cdbd96232ed3
[ "BSD-3-Clause" ]
null
null
null
src/token_auth/tests/__init__.py
robmoggach/django-token-auth
7ef6e10c27b0168c1272347d0169cdbd96232ed3
[ "BSD-3-Clause" ]
1
2021-02-17T05:22:44.000Z
2021-02-17T05:22:44.000Z
from django.test import TestCase from django.test.client import Client from django.conf import settings from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.utils.encoding import force_unicode import datetime from token_auth.models import ProtectedURL, Token from token_auth.views import TOKEN_COOKIE EMAILS = 'test@test.com;test2@test.com' FORM_DATA_URL_1 = { 'url': '/protected/', 'valid_until': '', 'emails': EMAILS } FORM_DATA_URL_2 = { 'url': '/protected/sub1/', 'valid_until': '', 'emails': EMAILS } FORM_DATA_URL_3 = { 'url': '/protected/sub1/sub2/', 'valid_until': '', 'emails': EMAILS } FORM_DATA_FORWARD_1 = { 'emails': EMAILS } FORM_DATA_FORWARD_2 = { 'emails': 'test@test.com' } class TestURLs(TestCase): urls = 'token_auth.tests.urls' fixtures = ['test_fixtures.json'] def setUp(self): url = ProtectedURL.objects.create(url='/protected/') def login(self, client, password='password'): login = client.login(username='token_auth', password=password) self.failUnless(login, 'Could not log in') def testAddURL(self): client = Client() response = client.get(reverse('create_protected_url')) self.failUnlessEqual(response.status_code, 302) self.login(client) response = client.get(reverse('create_protected_url')) self.failUnlessEqual(response.status_code, 200) self.failUnless(response, "no form in context") self.failUnlessEqual(response.context['form'].errors, {}) response = client.post(reverse('create_protected_url'), FORM_DATA_URL_1) self.failUnlessEqual(response.status_code, 302) response = client.post(reverse('create_protected_url'), FORM_DATA_URL_2) self.failUnlessEqual(response.status_code, 302) response = client.post(reverse('create_protected_url'), FORM_DATA_URL_3) self.failUnlessEqual(response.status_code, 302) def testVisitURL302(self): client = Client() # test that protection works response = client.get('/protected/') self.failUnlessEqual(response.status_code, 302) response = client.get('/protected/sub1/') self.failUnlessEqual(response.status_code, 302) response = client.get('/protected/sub1/sub2/') self.failUnlessEqual(response.status_code, 302) def testVisitURL200Cookie(self): url = '/protected/' token = Token(url=url) token.save() client = Client() # test that tokens work response = client.get(token.use_token()) self.failUnlessEqual(response.status_code, 302) self.failUnlessEqual(client.cookies[TOKEN_COOKIE].value, token.token) response = client.get("/protected/") self.failUnlessEqual(response.status_code, 200) response = client.get("/protected/sub1/") self.failUnlessEqual(response.status_code, 200) response = client.get("/protected/sub1/sub2/") self.failUnlessEqual(response.status_code, 200) response = client.get(token.use_token()) self.failUnlessEqual(response.status_code, 302) # test for two tokens token2 = Token(url=url) token2.save() response = client.get(token2.use_token()) self.failUnlessEqual(response.status_code, 302) self.failUnless(client.cookies[TOKEN_COOKIE].value, token.token + '|' + token2.token) token.delete() token2.delete() # test for expired tokens token3 = Token(url=url) token3.save() response = client.get(token3.use_token()) self.failUnlessEqual(response.status_code, 302) response = client.get("/protected/") self.failUnlessEqual(response.status_code, 200) token3.valid_until = datetime.datetime.today() - datetime.timedelta(days=2) token3.save() response = client.get("/protected/") self.failUnlessEqual(response.status_code, 302) def testVisitURL200User(self): client = Client() self.login(client) response = client.get('/protected/') self.failUnlessEqual(response.status_code, 200) response = client.get('/protected/sub1/') self.failUnlessEqual(response.status_code, 200) response = client.get('/protected/sub1/sub2/') self.failUnlessEqual(response.status_code, 200) def testForwardToken(self): client = Client() # test forwarding of token url = '/protected/' token = Token(url=url) token.save() response = client.get(token.use_token()) self.failUnlessEqual(response.status_code, 302) response = client.get(token.forward_token()) self.failUnlessEqual(response.status_code, 200) self.failUnlessEqual(response.context['token'].can_forward, False) self.failUnlessEqual(force_unicode(response.context['error']), 'Apologies! This token can not be forwarded.') token.delete() token = Token(url=url, forward_count=None) token.save() response = client.get(token.use_token()) self.failUnlessEqual(response.status_code, 302) response = client.get(token.forward_token()) self.failUnlessEqual(response.context['token'].can_forward, True) self.failUnlessEqual(force_unicode(response.context['error'], strings_only=True), None) response = client.post(token.forward_token(), FORM_DATA_FORWARD_1) self.failUnlessEqual(response.status_code, 302) token.delete() # test max number of forwards url = '/protected/' token = Token(url=url, forward_count=3) token.save() response = client.get(token.use_token()) response = client.get(token.forward_token()) self.failUnlessEqual(force_unicode(response.context['error'], strings_only=True), None) response = client.post(token.forward_token(), FORM_DATA_FORWARD_1) self.failUnlessEqual(response.status_code, 302) # grab token from db token = Token.objects.get(pk=token.pk) self.failUnlessEqual(token.forward_count, 1) response = client.post(token.forward_token(), FORM_DATA_FORWARD_1) self.failUnlessEqual(response.status_code, 200) # grab token from db token = Token.objects.get(pk=token.pk) self.failUnlessEqual(token.forward_count, 1) response = client.post(token.forward_token(), FORM_DATA_FORWARD_2) self.failUnlessEqual(response.status_code, 302) # grab token from db token = Token.objects.get(pk=token.pk) self.failUnlessEqual(token.forward_count, 0) def testTokenAuthLogin(self): client = Client() settings.MIDDLEWARE_CLASSES = list(settings.MIDDLEWARE_CLASSES) + ['token_auth.middleware.TokenAuthLoginMiddleware'] from django.contrib.auth.models import User user = User.objects.get(pk=1) url = '/protected/' token = Token(url=url, email=user.email) token.save() response = client.get(token.use_token()) self.failUnlessEqual(response.status_code, 302) response = client.get('/protected/') self.failUnlessEqual(response.status_code, 200) token.delete() response = client.get('/protected/') self.failUnlessEqual(response.status_code, 200)
31.200837
124
0.664208
8ebafb76e51c2f6f070575253e70051f34531ed0
4,319
js
JavaScript
lib/rangy/rangy-serializer.js
PolicyStat/PolicyPad
a7bad6201afb473f2daa4a97207d3637894e7a36
[ "Apache-2.0" ]
2
2016-04-21T16:54:38.000Z
2016-12-06T09:14:38.000Z
lib/rangy/rangy-serializer.js
PolicyStat/PolicyPad
a7bad6201afb473f2daa4a97207d3637894e7a36
[ "Apache-2.0" ]
null
null
null
lib/rangy/rangy-serializer.js
PolicyStat/PolicyPad
a7bad6201afb473f2daa4a97207d3637894e7a36
[ "Apache-2.0" ]
null
null
null
/* Serializer module for Rangy. Serializes Ranges and Selections. An example use would be to store a user's selection on a particular page in a cookie or local storage and restore it on the user's next visit to the same page. Part of Rangy, a cross-browser JavaScript range and selection library http://code.google.com/p/rangy/ Depends on Rangy core. Copyright 2011, Tim Down Licensed under the MIT license. Version: 1.1 Build date: 8 April 2011 */ rangy.createModule("Serializer",function(h,n){function o(c,b){b=b||[];var a=c.nodeType,e=c.childNodes,d=e.length,f=[a,c.nodeName,d].join(":"),g="",k="";switch(a){case 3:g=c.nodeValue.replace(/</g,"&lt;").replace(/>/g,"&gt;");break;case 8:g="<!--"+c.nodeValue.replace(/</g,"&lt;").replace(/>/g,"&gt;")+"--\>";break;default:g="<"+f+">";k="</>";break}g&&b.push(g);for(a=0;a<d;++a)o(e[a],b);k&&b.push(k);return b}function j(c){c=o(c).join("");return u(c).toString(16)}function l(c,b,a){var e=[],d=c;for(a= a||i.getDocument(c).documentElement;d&&d!=a;){e.push(i.getNodeIndex(d,true));d=d.parentNode}return e.join("/")+":"+b}function m(c,b,a){if(b)a||i.getDocument(b);else{a=a||document;b=a.documentElement}c=c.split(":");b=b;a=c[0]?c[0].split("/"):[];for(var e=a.length,d;e--;){d=parseInt(a[e],10);if(d<b.childNodes.length)b=b.childNodes[parseInt(a[e],10)];else throw n.createError("deserializePosition failed: node "+i.inspectNode(b)+" has no child with index "+d+", "+e);}return new i.DomPosition(b,parseInt(c[1], 10))}function p(c,b,a){a=a||h.DomRange.getRangeDocument(c).documentElement;if(!i.isAncestorOf(a,c.commonAncestorContainer,true))throw Error("serializeRange: range is not wholly contained within specified root node");c=l(c.startContainer,c.startOffset,a)+","+l(c.endContainer,c.endOffset,a);b||(c+="{"+j(a)+"}");return c}function q(c,b,a){if(b)a=a||i.getDocument(b);else{a=a||document;b=a.documentElement}var e=/^([^,]+),([^,]+)({([^}]+)})?$/.exec(c);if((c=e[3])&&c!==j(b))throw Error("deserializeRange: checksums of serialized range root node and target root node do not match"); c=m(e[1],b,a);b=m(e[2],b,a);a=h.createRange(a);a.setStart(c.node,c.offset);a.setEnd(b.node,b.offset);return a}function r(c,b,a){if(b)a||i.getDocument(b);else{a=a||document;b=a.documentElement}c=/^([^,]+),([^,]+)({([^}]+)})?$/.exec(c)[3];return!c||c===j(b)}function s(c,b,a){c=c||rangy.getSelection();c=c.getAllRanges();for(var e=[],d=0,f=c.length;d<f;++d)e[d]=p(c[d],b,a);return e.join("|")}function t(c,b,a){if(b)a=a||i.getWindow(b);else{a=a||window;b=a.document.documentElement}c=c.split("|");for(var e= h.getSelection(a),d=[],f=0,g=c.length;f<g;++f)d[f]=q(c[f],b,a.document);e.setRanges(d);return e}h.requireModules(["WrappedSelection","WrappedRange"]);if(typeof encodeURIComponent=="undefined"||typeof decodeURIComponent=="undefined")n.fail("Global object is missing encodeURIComponent and/or decodeURIComponent method");var u=function(){var c=null;return function(b){for(var a=[],e=0,d=b.length,f;e<d;++e){f=b.charCodeAt(e);if(f<128)a.push(f);else f<2048?a.push(f>>6|192,f&63|128):a.push(f>>12|224,f>>6& 63|128,f&63|128)}b=-1;if(!c){e=[];d=0;for(var g;d<256;++d){g=d;for(f=8;f--;)if((g&1)==1)g=g>>>1^3988292384;else g>>>=1;e[d]=g>>>0}c=e}e=c;d=0;for(f=a.length;d<f;++d){g=(b^a[d])&255;b=b>>>8^e[g]}return(b^-1)>>>0}}(),i=h.dom;h.serializePosition=l;h.deserializePosition=m;h.serializeRange=p;h.deserializeRange=q;h.canDeserializeRange=r;h.serializeSelection=s;h.deserializeSelection=t;h.canDeserializeSelection=function(c,b,a){var e;if(b)e=a?a.document:i.getDocument(b);else{a=a||window;b=a.document.documentElement}c= c.split("|");a=0;for(var d=c.length;a<d;++a)if(!r(c[a],b,e))return false;return true};h.restoreSelectionFromCookie=function(c){c=c||window;var b;a:{b=c.document.cookie.split(/[;,]/);for(var a=0,e=b.length,d;a<e;++a){d=b[a].split("=");if(d[0].replace(/^\s+/,"")=="rangySerializedSelection")if(d=d[1]){b=decodeURIComponent(d.replace(/\s+$/,""));break a}}b=null}b&&t(b,c.doc)};h.saveSelectionCookie=function(c,b){c=c||window;b=typeof b=="object"?b:{};var a=b.expires?";expires="+b.expires.toUTCString():"", e=b.path?";path="+b.path:"",d=b.domain?";domain="+b.domain:"",f=b.secure?";secure":"",g=s(rangy.getSelection(c));c.document.cookie=encodeURIComponent("rangySerializedSelection")+"="+encodeURIComponent(g)+a+e+d+f};h.getElementChecksum=j});
187.782609
579
0.677472
90d8da9e1e041cd7127fa6d5b3b9343e084df165
700
dart
Dart
lib/src/models/meta.dart
Xavjer/spotify-dart
1ed33820fec92507a0e7331e9121ec7942ba6656
[ "BSD-3-Clause" ]
null
null
null
lib/src/models/meta.dart
Xavjer/spotify-dart
1ed33820fec92507a0e7331e9121ec7942ba6656
[ "BSD-3-Clause" ]
null
null
null
lib/src/models/meta.dart
Xavjer/spotify-dart
1ed33820fec92507a0e7331e9121ec7942ba6656
[ "BSD-3-Clause" ]
null
null
null
// Copyright (c) 2017, rinukkusu. All rights reserved. Use of this source code // is governed by a BSD-style license that can be found in the LICENSE file. part of spotify.models; @JsonSerializable(createToJson: false) class Meta extends Object { Meta(); factory Meta.fromJson(Map<String, dynamic> json) => _$MetaFromJson(json); /// @JsonKey(name: 'analyzer_version') String? analyzerVersion; /// String? platform; /// @JsonKey(name: 'detailed_status') String? detailedStatus; /// int? status_code; /// //DateTime? timestamp; /// @JsonKey(name: 'analysis_time') double? analysisTime; /// @JsonKey(name: 'input_process') String? inputProcess; }
18.421053
78
0.677143
33d264ae19b84991195751fd2ecaa40a4c05c781
9,429
c
C
deps/gettext/gettext-tools/src/libexpat-compat.c
JamesLinus/poedit
feae6a69f5b101a2b17d55cb9b32f1ab37edb9e2
[ "MIT" ]
1
2019-04-22T09:09:32.000Z
2019-04-22T09:09:32.000Z
deps/gettext/gettext-tools/src/libexpat-compat.c
JamesLinus/poedit
feae6a69f5b101a2b17d55cb9b32f1ab37edb9e2
[ "MIT" ]
null
null
null
deps/gettext/gettext-tools/src/libexpat-compat.c
JamesLinus/poedit
feae6a69f5b101a2b17d55cb9b32f1ab37edb9e2
[ "MIT" ]
null
null
null
/* xgettext libexpat compatibility. Copyright (C) 2002-2003, 2005-2009, 2013, 2015 Free Software Foundation, Inc. This file was written by Bruno Haible <haible@clisp.cons.org>, 2002. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include <stdlib.h> #include <string.h> #if DYNLOAD_LIBEXPAT # include <dlfcn.h> #else # if HAVE_LIBEXPAT # include <expat.h> # endif #endif /* Keep the references to XML_GetCurrent{Line,Column}Number symbols before loading libexpat-compat.h, since they are redefined to rpl_XML_GetCurrent{Line,Column}Number . */ #if !DYNLOAD_LIBEXPAT && XML_MAJOR_VERSION >= 2 static void *p_XML_GetCurrentLineNumber = (void *) &XML_GetCurrentLineNumber; static void *p_XML_GetCurrentColumnNumber = (void *) &XML_GetCurrentColumnNumber; #endif #include "libexpat-compat.h" /* ======================= Different libexpat ABIs. ======================= */ /* There are three different ABIs of libexpat, regarding the functions XML_GetCurrentLineNumber and XML_GetCurrentColumnNumber. In expat < 2.0, they return an 'int'. In expat >= 2.0, they return - a 'long' if expat was compiled with the default flags, or - a 'long long' if expat was compiled with -DXML_LARGE_SIZE. But the <expat.h> include file does not contain the information whether expat was compiled with -DXML_LARGE_SIZE; so the include file is lying! For this information, we need to call XML_GetFeatureList(), for expat >= 2.0.1; for expat = 2.0.0, we have to assume the default flags. */ #if !DYNLOAD_LIBEXPAT && XML_MAJOR_VERSION >= 2 /* expat >= 2.0 -> Return type is 'int64_t' worst-case. */ /* Return true if libexpat was compiled with -DXML_LARGE_SIZE. */ static bool is_XML_LARGE_SIZE_ABI (void) { static bool tested; static bool is_large; if (!tested) { const XML_Feature *features; is_large = false; for (features = XML_GetFeatureList (); features->name != NULL; features++) if (strcmp (features->name, "XML_LARGE_SIZE") == 0) { is_large = true; break; } tested = true; } return is_large; } int64_t rpl_XML_GetCurrentLineNumber (XML_Parser parser) { if (is_XML_LARGE_SIZE_ABI ()) return ((int64_t (*) (XML_Parser)) p_XML_GetCurrentLineNumber) (parser); else return ((long (*) (XML_Parser)) p_XML_GetCurrentLineNumber) (parser); } int64_t rpl_XML_GetCurrentColumnNumber (XML_Parser parser) { if (is_XML_LARGE_SIZE_ABI ()) return ((int64_t (*) (XML_Parser)) p_XML_GetCurrentColumnNumber) (parser); else return ((long (*) (XML_Parser)) p_XML_GetCurrentColumnNumber) (parser); } #endif /* ===================== Dynamic loading of libexpat. ===================== */ #if DYNLOAD_LIBEXPAT static XML_Expat_Version (*p_XML_ExpatVersionInfo) (void); XML_Expat_Version XML_ExpatVersionInfo (void) { return (*p_XML_ExpatVersionInfo) (); } static const XML_Feature * (*p_XML_GetFeatureList) (void); const XML_Feature * XML_GetFeatureList (void) { return (*p_XML_GetFeatureList) (); } enum XML_Size_ABI get_XML_Size_ABI (void) { static bool tested; static enum XML_Size_ABI abi; if (!tested) { if (XML_ExpatVersionInfo () .major >= 2) /* expat >= 2.0 -> XML_Size is 'int64_t' or 'long'. */ { const XML_Feature *features; abi = is_long; for (features = XML_GetFeatureList (); features->name != NULL; features++) if (strcmp (features->name, "XML_LARGE_SIZE") == 0) { abi = is_int64_t; break; } } else /* expat < 2.0 -> XML_Size is 'int'. */ abi = is_int; tested = true; } return abi; } static XML_Parser (*p_XML_ParserCreate) (const XML_Char *encoding); XML_Parser XML_ParserCreate (const XML_Char *encoding) { return (*p_XML_ParserCreate) (encoding); } static void (*p_XML_SetElementHandler) (XML_Parser parser, XML_StartElementHandler start, XML_EndElementHandler end); void XML_SetElementHandler (XML_Parser parser, XML_StartElementHandler start, XML_EndElementHandler end) { (*p_XML_SetElementHandler) (parser, start, end); } static void (*p_XML_SetCharacterDataHandler) (XML_Parser parser, XML_CharacterDataHandler handler); void XML_SetCharacterDataHandler (XML_Parser parser, XML_CharacterDataHandler handler) { (*p_XML_SetCharacterDataHandler) (parser, handler); } static void (*p_XML_SetCommentHandler) (XML_Parser parser, XML_CommentHandler handler); void XML_SetCommentHandler (XML_Parser parser, XML_CommentHandler handler) { (*p_XML_SetCommentHandler) (parser, handler); } static int (*p_XML_Parse) (XML_Parser parser, const char *s, int len, int isFinal); int XML_Parse (XML_Parser parser, const char *s, int len, int isFinal) { return (*p_XML_Parse) (parser, s, len, isFinal); } static enum XML_Error (*p_XML_GetErrorCode) (XML_Parser parser); enum XML_Error XML_GetErrorCode (XML_Parser parser) { return (*p_XML_GetErrorCode) (parser); } static void *p_XML_GetCurrentLineNumber; int64_t XML_GetCurrentLineNumber (XML_Parser parser) { switch (get_XML_Size_ABI ()) { case is_int: return ((int (*) (XML_Parser)) p_XML_GetCurrentLineNumber) (parser); case is_long: return ((long (*) (XML_Parser)) p_XML_GetCurrentLineNumber) (parser); case is_int64_t: return ((int64_t (*) (XML_Parser)) p_XML_GetCurrentLineNumber) (parser); default: abort (); } } static void *p_XML_GetCurrentColumnNumber; int64_t XML_GetCurrentColumnNumber (XML_Parser parser) { switch (get_XML_Size_ABI ()) { case is_int: return ((int (*) (XML_Parser)) p_XML_GetCurrentColumnNumber) (parser); case is_long: return ((long (*) (XML_Parser)) p_XML_GetCurrentColumnNumber) (parser); case is_int64_t: return ((int64_t (*) (XML_Parser)) p_XML_GetCurrentColumnNumber) (parser); default: abort (); } } static const XML_LChar * (*p_XML_ErrorString) (int code); const XML_LChar * XML_ErrorString (int code) { return (*p_XML_ErrorString) (code); } static void (*p_XML_ParserFree) (XML_Parser parser); void XML_ParserFree (XML_Parser parser) { return (*p_XML_ParserFree) (parser); } static int libexpat_loaded = 0; bool load_libexpat () { if (libexpat_loaded == 0) { void *handle; /* Try to load libexpat-2.x. */ handle = dlopen ("libexpat.so.1", RTLD_LAZY); if (handle == NULL) /* Try to load libexpat-1.x. */ handle = dlopen ("libexpat.so.0", RTLD_LAZY); if (handle != NULL && (p_XML_ExpatVersionInfo = (XML_Expat_Version (*) (void)) dlsym (handle, "XML_ExpatVersionInfo")) != NULL && (p_XML_GetFeatureList = (const XML_Feature * (*) (void)) dlsym (handle, "XML_GetFeatureList")) != NULL && (p_XML_ParserCreate = (XML_Parser (*) (const XML_Char *)) dlsym (handle, "XML_ParserCreate")) != NULL && (p_XML_SetElementHandler = (void (*) (XML_Parser, XML_StartElementHandler, XML_EndElementHandler)) dlsym (handle, "XML_SetElementHandler")) != NULL && (p_XML_SetCharacterDataHandler = (void (*) (XML_Parser, XML_CharacterDataHandler)) dlsym (handle, "XML_SetCharacterDataHandler")) != NULL && (p_XML_SetCommentHandler = (void (*) (XML_Parser, XML_CommentHandler)) dlsym (handle, "XML_SetCommentHandler")) != NULL && (p_XML_Parse = (int (*) (XML_Parser, const char *, int, int)) dlsym (handle, "XML_Parse")) != NULL && (p_XML_GetErrorCode = (enum XML_Error (*) (XML_Parser)) dlsym (handle, "XML_GetErrorCode")) != NULL && (p_XML_GetCurrentLineNumber = dlsym (handle, "XML_GetCurrentLineNumber")) != NULL && (p_XML_GetCurrentColumnNumber = dlsym (handle, "XML_GetCurrentColumnNumber")) != NULL && (p_XML_ParserFree = (void (*) (XML_Parser)) dlsym (handle, "XML_ParserFree")) != NULL && (p_XML_ErrorString = (const XML_LChar * (*) (int)) dlsym (handle, "XML_ErrorString")) != NULL) libexpat_loaded = 1; else libexpat_loaded = -1; } return libexpat_loaded >= 0; } #endif
28.746951
87
0.634956
fb88aec7c17e1c94c26673df8e7e36dbf103a23b
482
sql
SQL
OfficeOlympicsDb/dbo/Tables/Record.sql
Matt23488/OfficeOlympics
454a1da9c6ffeab1dc51797d9eb2c57c27b9f296
[ "MIT" ]
null
null
null
OfficeOlympicsDb/dbo/Tables/Record.sql
Matt23488/OfficeOlympics
454a1da9c6ffeab1dc51797d9eb2c57c27b9f296
[ "MIT" ]
null
null
null
OfficeOlympicsDb/dbo/Tables/Record.sql
Matt23488/OfficeOlympics
454a1da9c6ffeab1dc51797d9eb2c57c27b9f296
[ "MIT" ]
null
null
null
CREATE TABLE [dbo].[Record] ( [RecordId] INT IDENTITY(1, 1) NOT NULL, [CompetitorId] INT NOT NULL, [OlympicEventId] INT NOT NULL, [Score] INT NOT NULL, [DateAchieved] DATETIME NOT NULL, CONSTRAINT [PK_Record] PRIMARY KEY CLUSTERED ([RecordId]), CONSTRAINT [FK_Record_Competitor] FOREIGN KEY ([CompetitorId]) REFERENCES [dbo].[Competitor]([CompetitorId]), CONSTRAINT [FK_Record_OlympicEvent] FOREIGN KEY ([OlympicEventId]) REFERENCES [dbo].[OlympicEvent]([OlympicEventId]) )
43.818182
117
0.755187
b76a1c7f3b7d63a8d107257a59dfbaed4a23d4d4
1,211
cs
C#
src/WpfPlus/Mvvm/DelegateCommand.cs
tetrodoxin/WpfPlus.Plus
7cd9141ca3e7d449f507185e46eee3458c7d791e
[ "MIT" ]
1
2020-05-26T00:42:36.000Z
2020-05-26T00:42:36.000Z
src/WpfPlus/Mvvm/DelegateCommand.cs
tetrodoxin/WpfPlus.Plus
7cd9141ca3e7d449f507185e46eee3458c7d791e
[ "MIT" ]
null
null
null
src/WpfPlus/Mvvm/DelegateCommand.cs
tetrodoxin/WpfPlus.Plus
7cd9141ca3e7d449f507185e46eee3458c7d791e
[ "MIT" ]
1
2020-08-25T14:55:04.000Z
2020-08-25T14:55:04.000Z
using System; using System.Windows.Input; namespace WpfPlus.Mvvm { /// <summary> /// A delegate-based implementation of <see cref="ICommand"/> /// that requires no command parameter /// </summary> /// <seealso cref="WpfPlus.Mvvm.DelegateCommandBase" /> public class DelegateCommand : DelegateCommandBase { private Func<bool> _canExecuteDelegate; private Action _executeDelegate; private static Lazy<DelegateCommand> _empty = new Lazy<DelegateCommand>(() => new DelegateCommand(() => { })); public static DelegateCommand Nothing => _empty.Value; public DelegateCommand(Action actionToExecute) : this(actionToExecute, () => true) { } public DelegateCommand(Action actionToExecute, Func<bool> canExecutePredicate) { _executeDelegate = actionToExecute; _canExecuteDelegate = canExecutePredicate; } public void Execute() => _executeDelegate(); protected bool CanExecute() => _canExecuteDelegate(); protected override bool CanExecute(object? parameter) => CanExecute(); protected override void Execute(object? parameter) => Execute(); } }
32.72973
118
0.659785
8ecbef72cc0bf431e8edfabe6bc8c624655d2acb
102
rb
Ruby
examples/mrbgems/c_and_ruby_extension_example/mrblib/example.rb
stuarth/mruby
5211a3f2094d458e92b171cf096d3a18e76afaef
[ "MIT" ]
2,793
2019-07-28T02:15:11.000Z
2022-03-30T02:52:20.000Z
examples/mrbgems/c_and_ruby_extension_example/mrblib/example.rb
Seanpm2001-Ruby-lang/mruby
8b443aa43b752e97b839695708847180e9e518e6
[ "MIT" ]
1,633
2015-01-03T23:39:25.000Z
2022-03-31T08:29:08.000Z
examples/mrbgems/c_and_ruby_extension_example/mrblib/example.rb
ak-mochi/mruby
8981b2fb28dbaed76078aff6c84f19b90832aaaf
[ "MIT" ]
564
2015-01-02T13:41:17.000Z
2022-03-10T08:39:03.000Z
module CRubyExtension def CRubyExtension.ruby_method puts "#{self}: A Ruby Extension" end end
17
36
0.745098
3898250731b3391ec5796fdf3b37c621a805e41b
10,879
php
PHP
src/SclNominetEpp/Domain.php
jpswade/SclNominetEpp
0bcb80c90b70f51d1dafffc82f2c651a2559a693
[ "MIT" ]
null
null
null
src/SclNominetEpp/Domain.php
jpswade/SclNominetEpp
0bcb80c90b70f51d1dafffc82f2c651a2559a693
[ "MIT" ]
null
null
null
src/SclNominetEpp/Domain.php
jpswade/SclNominetEpp
0bcb80c90b70f51d1dafffc82f2c651a2559a693
[ "MIT" ]
null
null
null
<?php namespace SclNominetEpp; use DateTime; /** * A domain record * * @author Tom Oram <tom@scl.co.uk> */ class Domain { //BILLS const BILL_REGISTRAR = 'th'; const BILL_CUSTOMER = 'bc'; /** * Domain name * * @var string */ private $name; /** * Registration Period * * @var int */ private $period = 2; /** * The Person, Company or Entity who owns or holds a domain name. * * @var string */ private $registrant; /** * All the contacts of the registered domain. * * @var array */ private $contacts = array(); /** * All the nameservers of the registered domain. * * @var array */ private $nameservers = array(); /** * The identifier of the sponsoring client. * Specified in the Nominet EPP as "clID" * * @var string */ private $clientID; /** * The identifier of the client that created the domain object. * Specified in the Nominet EPP as "crID" * * @var string */ private $creatorID; /** * The date and time of domain object creation. * Specified in the Nominet EPP as "crDate" * * @var DateTime */ private $created; /** * The date and time identifying the end of the domain object's registration period. * Specified in the Nominet EPP as "exDate" * * @var DateTime */ private $expired; /** * The identifier of the client that last updated the domain object. * This variable MUST be null if the domain has never been modified. * (could be a name and email address or the value submitted from the <clTRID> element if created by EPP) * * @var string */ private $upID = null; /** * * The date and time of the most recent domain-object modification, formatted as: YYYYMMDD. * This variable MUST be null if the domain object has never been modified. * * @var DateTime */ private $upDate = null; /** * If first-bill is not set or set to "th", the registration * invoice will be sent to the registrar, * setting this to "bc" will instead invoice the customer at the non-member registration rate. * * @var string */ private $firstBill = self::BILL_REGISTRAR; /** * If recur-bill is not set or set to "th" invoices for renewals * will be sent to the registrar, * setting this to "bc" will instead invoice the customer at the non-member renewal rate * (the auto-bill and next-bill fields will also be cleared). * * @var string */ private $recurBill = self::BILL_REGISTRAR; /** * The number of days before expiry you wish to automatically renew a domain name. * Values between 1-182. * This field can be cleared by setting the default value of 0. * Auto-bill cannot be set if next-bill, recur-bill or renew-not-required are set. * * @var int */ private $autoBill; /** * The number of days before expiry you wish to automatically renew a domain name. * The next-bill field will reset to 0 after a single registration period. * Values between 1 and 182, indicating how many days before expiry you wish to renew the domain name. * This field can be cleared by setting the default value of 0. * Next-bill cannot be set if auto-bill, recur-bill or renew-not-required are set. * * @var int */ private $nextBill; /** * Domain's current registration status * * @var string */ private $regStatus; /** * Miscellaneous information relating to the domain name. * * @var string */ private $notes; /** * Password * * @var string */ private $password; /** * Set the value of period * * @param integer $period Must be 2 * @return Domain */ public function setPeriod($period) { if (2 !== $period) { throw new \Exception("Invalid period $period."); } $this->period = $period; return $this; } /** * Set $this->name * * @param string $name */ public function setName($name) { $this->name = (string) $name; } /** * Get $this->name * * @return string */ public function getName() { return $this->name; } /** * Set $this->registrant * * @param string $registrant */ public function setRegistrant($registrant) { $this->registrant = (string) $registrant; } /** * Get $this->registrant * * @return string */ public function getRegistrant() { return $this->registrant; } /** * Set add $contact to array of contacts * * @param \SclNominetEpp\Contact $contact */ public function addContact(Contact $contact) { $this->contacts[] = $contact; } /** * Get $this->contacts * * @return array */ public function getContacts() { return $this->contacts; } /** * Remove $contact from the array of contacts if it already exists. * * @param \SclNominetEpp\Contact $contact */ public function removeContact(Contact $contact) { $arrayKey = array_search($contact, $this->contacts); unset($this->contacts[$arrayKey]); } /** * Add $nameserver to the array of nameservers * * @param Nameserver $nameserver */ public function addNameserver(Nameserver $nameserver) { $this->nameservers[] = $nameserver; } /** * Get the array of nameservers * * @return array */ public function getNameservers() { return $this->nameservers; } /** * Remove $namserver from the array of namservers if it already exists. * * @param \SclNominetEpp\Nameserver $nameserver */ public function removeNameserver(Nameserver $nameserver) { $arrayKey = array_search($nameserver, $this->nameservers); unset($this->nameservers[$arrayKey]); } /** * Set the identifier of the sponsoring client. * * @param string $clientID */ public function setClientID($clientID) { $this->clientID = (string) $clientID; } /** * Get the identifier of the sponsoring client. * * @return string */ public function getClientID() { return $this->clientID; } /** * Set the identifier of the client that created the domain object. * * @param string $creatorID */ public function setCreatorID($creatorID) { $this->creatorID = (string) $creatorID; } /** * Get the identifier of the client that created the domain object. * * @return string */ public function getCreatorID() { return $this->creatorID; } /** * Set $this->created * * @param DateTime $created */ public function setCreated(DateTime $created) { $this->created = $created; } /** * Get $this->created * * @return DateTime */ public function getCreated() { return $this->created; } /** * Set $this->expired * * @param DateTime $expired */ public function setExpired(DateTime $expired) { $this->expired = $expired; } /** * Get $this->expired * * @return DateTime */ public function getExpired() { return $this->expired; } /** * Set $this->upID * * @param string $upID */ public function setUpID($upID) { $this->upID = (string) $upID; } /** * Get $this->upID * * @return string */ public function getUpID() { return $this->upID; } /** * Set $this->upDate * * @param DateTime $upDate */ public function setUpDate(DateTime $upDate) { $this->upDate = $upDate->format(DateTime::ATOM); } /** * Get $this->upDate * * @return DateTime */ public function getUpDate() { return DateTime::createFromFormat(DateTime::ATOM, $this->upDate); } /** * Set $this->firstBill * * @param string $firstBill */ public function setFirstBill($firstBill) { $this->firstBill = (string) $firstBill; } /** * Get $this->firstBill * * @return string */ public function getFirstBill() { return $this->firstBill; } /** * Set $this->recurBill * * @param string $recurBill */ public function setRecurBill($recurBill) { $this->recurBill = (string) $recurBill; } /** * Get $this->recurBill * * @return string */ public function getRecurBill() { return $this->recurBill; } /** * Set $this->autoBill * @todo the "settype" of autoBill * @param settype $autoBill */ public function setAutoBill($autoBill) { $this->autoBill = (string) $autoBill; } /** * Get $this->autoBill * @todo the "gettype" of autoBill * @return gettype */ public function getAutoBill() { return $this->autoBill; } /** * Set $this->nextBill * * @param settype $nextBill */ public function setNextBill($nextBill) { $this->nextBill = (string) $nextBill; } /** * Get $this->nextBill * * @return gettype */ public function getNextBill() { return $this->nextBill; } /** * Set $this->regStatus * @param string $regStatus */ public function setRegStatus($regStatus) { $this->regStatus = (string) $regStatus; } /** * Get $this->regStatus; * * @return type */ public function getRegStatus() { return $this->regStatus; } /** * Set $this->notes * * @param settype $notes */ public function setNotes($notes) { $this->notes = $notes; } /** * Get $this->notes * * @return string */ public function getNotes() { return $this->notes; } /** * Get $this->password * * @return string */ public function getPassword() { return $this->password; } /** * Set $this->password * * @param string $password */ public function setPassword($password) { $this->password = (string) $password; } public function __toString() { return $this->getName(); } }
19.961468
109
0.543616
46ca95d64d1d3dfdd0fc39e3125e2c2bae4e38e1
174
py
Python
thinglang/lexer/tokens/inline_comment.py
ofples/thinglang
b1391e8fb42d518fc0018400eecb608d18da915a
[ "MIT" ]
5
2017-11-07T21:32:22.000Z
2019-06-30T18:35:17.000Z
thinglang/lexer/tokens/inline_comment.py
ofples/thinglang
b1391e8fb42d518fc0018400eecb608d18da915a
[ "MIT" ]
null
null
null
thinglang/lexer/tokens/inline_comment.py
ofples/thinglang
b1391e8fb42d518fc0018400eecb608d18da915a
[ "MIT" ]
1
2020-03-25T18:14:08.000Z
2020-03-25T18:14:08.000Z
from thinglang.lexer.lexical_token import LexicalToken class LexicalInlineComment(LexicalToken): """ Signifies the start of an inline comment, given by "#". """
24.857143
59
0.729885
23cbb1921547b7b204dd54b8d842f7bc819d5e70
3,462
js
JavaScript
src/malcolmWidgets/jsonTree/jsonTree.component.test.js
btester271828/malcolmjs
16292d41864f00dd4f7e129618866eb8a732637e
[ "Apache-2.0" ]
7
2017-02-27T17:41:02.000Z
2019-06-20T12:59:06.000Z
src/malcolmWidgets/jsonTree/jsonTree.component.test.js
btester271828/malcolmjs
16292d41864f00dd4f7e129618866eb8a732637e
[ "Apache-2.0" ]
424
2018-04-12T15:15:24.000Z
2022-03-08T23:05:40.000Z
src/malcolmWidgets/jsonTree/jsonTree.component.test.js
btester271828/malcolmjs
16292d41864f00dd4f7e129618866eb8a732637e
[ "Apache-2.0" ]
3
2016-05-19T15:13:03.000Z
2018-11-15T10:58:56.000Z
import React from 'react'; import { createShallow, createMount } from '@material-ui/core/test-utils'; import configureStore from 'redux-mock-store'; import JSONTree from './jsonTree.component'; import { harderAttribute, expectedCopy } from '../table/table.stories'; describe('Table container', () => { let shallow; let mockStore; let state; let mount; beforeEach(() => { shallow = createShallow({ dive: true }); mount = createMount(); mockStore = configureStore(); state = { malcolm: { blocks: { test1: { attributes: [{ ...harderAttribute, localState: {} }], }, }, }, }; state.malcolm.blocks.test1.attributes[0].localState = JSON.parse( JSON.stringify(expectedCopy) ); }); it('renders correctly', () => { const wrapper = shallow( <JSONTree blockName="test1" attributeName="layout" putObject={() => {}} revertHandler={() => {}} store={mockStore(state)} /> ); expect(wrapper.dive()).toMatchSnapshot(); }); /* it('dispatches copy action correctly on first render', () => { state.malcolm.blocks.test1.attributes[0].localState = undefined; const testStore = mockStore(state); mount( <WidgetTable blockName="test1" attributeName="layout" eventHandler={() => {}} setFlag={() => {}} store={testStore} /> ); expect(testStore.getActions().length).toEqual(1); expect(testStore.getActions()[0]).toEqual( malcolmCopyValue(['test1', 'layout']) ); }); it('dispatches submit action on change', () => { const testStore = mockStore(state); const wrapper = mount( <WidgetTable blockName="test1" attributeName="layout" eventHandler={() => {}} setFlag={() => {}} store={testStore} /> ); wrapper .find('input') .first() .simulate('change', { target: { value: 'test' } }); expect(testStore.getActions().length).toEqual(2); expect(testStore.getActions()[1]).toEqual( malcolmUpdateTable( ['test1', 'layout'], { mri: 'PANDA:TTLIN1', name: 'TTLIN1', visible: false, x: 'test', y: 0, }, 0 ) ); }); */ it('revert button hooks up correctly', () => { const revertAction = jest.fn(); const testStore = mockStore(state); const wrapper = mount( <JSONTree blockName="test1" attributeName="layout" store={testStore} revertHandler={revertAction} putObject={() => {}} /> ); const buttons = wrapper.find('button'); buttons.at(buttons.length - 2).simulate('click'); expect(revertAction).toHaveBeenCalledTimes(1); expect(revertAction).toHaveBeenCalledWith(['test1', 'layout']); }); it('submit button hooks up correctly', () => { const putAction = jest.fn(); const testStore = mockStore(state); const wrapper = mount( <JSONTree blockName="test1" attributeName="layout" store={testStore} revertHandler={() => {}} putObject={putAction} /> ); wrapper .find('button') .last() .simulate('click'); expect(putAction).toHaveBeenCalledTimes(1); expect(putAction).toHaveBeenCalledWith( ['test1', 'layout'], expectedCopy.value ); }); });
25.455882
74
0.560081
d195730817b92aea1d63119a33a2bb7f50a09238
934
rs
Rust
task1/task.rs
Nimor111/AdventOfCode2018
b928d291d74924db5294d0711cf9fa75771750f7
[ "Apache-2.0" ]
null
null
null
task1/task.rs
Nimor111/AdventOfCode2018
b928d291d74924db5294d0711cf9fa75771750f7
[ "Apache-2.0" ]
null
null
null
task1/task.rs
Nimor111/AdventOfCode2018
b928d291d74924db5294d0711cf9fa75771750f7
[ "Apache-2.0" ]
null
null
null
use std::fs::File; use std::io::{BufRead, BufReader, Error}; use std::collections::HashSet; fn read_file(filename: &str) -> Result<Vec<i32>, Error> { let f = File::open(filename)?; let buffered = BufReader::new(f); Ok(buffered .lines() .map(|s| s.unwrap().parse().unwrap()) .collect()) } fn accum(vec: Vec<i32>) -> Result<i32, Error> { Ok(vec.into_iter().fold(0, |accum, value| accum + value)) } fn repeating_frequency(vec: Vec<i32>) -> i32 { let mut freq = 0; let mut frequencies = HashSet::new(); loop { for num in &vec { if frequencies.contains(&freq) { return freq; } frequencies.insert(freq); freq += num; } } } pub fn main() -> Result<(), Error> { // println!("{:?}", read_file("data").and_then(accum)); println!("{}", repeating_frequency(read_file("data")?)); Ok(()) }
21.72093
61
0.539615
bb1b9b68f5d7e6eac1a795939ed73f123873f73f
1,829
cs
C#
SharedResources/SharedResources/Screens/iPhone/Accelerometer/ShakeScreen.xib.cs
ghuntley/monotouch-samples
1e1a1e90a4608bbd13887b213b24989b0a4e8472
[ "Apache-2.0" ]
1
2019-03-08T09:32:06.000Z
2019-03-08T09:32:06.000Z
SharedResources/SharedResources/Screens/iPhone/Accelerometer/ShakeScreen.xib.cs
Acidburn0zzz/monotouch-samples
096b304d7226c3252cf042b73838887713a98ec5
[ "Apache-2.0" ]
null
null
null
SharedResources/SharedResources/Screens/iPhone/Accelerometer/ShakeScreen.xib.cs
Acidburn0zzz/monotouch-samples
096b304d7226c3252cf042b73838887713a98ec5
[ "Apache-2.0" ]
null
null
null
using System; using System.Collections.Generic; using System.Linq; using MonoTouch.Foundation; using MonoTouch.UIKit; namespace Example_SharedResources.Screens.iPhone.Accelerometer { public partial class ShakeScreen : UIViewController { #region Constructors // The IntPtr and initWithCoder constructors are required for items that need // to be able to be created from a xib rather than from managed code public ShakeScreen (IntPtr handle) : base(handle) { Initialize (); } [Export("initWithCoder:")] public ShakeScreen (NSCoder coder) : base(coder) { Initialize (); } public ShakeScreen () : base("ShakeScreen", null) { Initialize (); } void Initialize () { } #endregion public override void ViewDidLoad () { base.ViewDidLoad (); Title = "Shake"; } // Called by the iOS to determine if the controller can receive touches and action // messages (such as motion events) public override bool CanBecomeFirstResponder { get { return true; } } public override void ViewDidAppear (bool animated) { base.ViewWillAppear (animated); // tell the iOS that we want motion events BecomeFirstResponder(); } public override void ViewWillDisappear (bool animated) { base.ViewWillDisappear (animated); // be a good citizen and allow other controllers to become first responder ResignFirstResponder(); } // Called after the iOS determines the motion wasn't noise (such as walking up stairs). public override void MotionEnded (UIEventSubtype motion, UIEvent evt) { Console.WriteLine("Motion Ended"); base.MotionEnded(motion, evt); // if the motion was a shake if(motion == UIEventSubtype.MotionShake) { Console.Write("Shake Detected"); lblShakeStatus.Text = "Shook!"; } } } }
22.036145
89
0.697102
660e27763d6c7649cf05112db0f97437a81fe4e6
2,035
py
Python
lekce02_agregace/04_grupovani.py
qenett/pandas-intro-clone
b79d5383f37faf797eb443165fd4e3f3546f41a8
[ "CC0-1.0" ]
1
2020-06-01T11:08:30.000Z
2020-06-01T11:08:30.000Z
lekce02_agregace/04_grupovani.py
qenett/pandas-intro-clone
b79d5383f37faf797eb443165fd4e3f3546f41a8
[ "CC0-1.0" ]
null
null
null
lekce02_agregace/04_grupovani.py
qenett/pandas-intro-clone
b79d5383f37faf797eb443165fd4e3f3546f41a8
[ "CC0-1.0" ]
null
null
null
import pandas u202 = pandas.read_csv("u202.csv", encoding="utf-8") u203 = pandas.read_csv("u203.csv", encoding="utf-8") u302 = pandas.read_csv("u302.csv", encoding="utf-8") u202.dropna(inplace=True) u203.dropna(inplace=True) u302.dropna(inplace=True) u202["místnost"] = "u202" u203["místnost"] = "u203" u302["místnost"] = "u302" maturita = pandas.concat([u202, u203, u302], ignore_index=True) preds = pandas.read_csv("predsedajici.csv", encoding="utf-8") maturita2 = pandas.merge(maturita, preds, on="den") maturita2 = maturita2.rename(columns={"jméno_x": "jméno_student", "jméno_y": "jméno_předseda"}) # ## 4. Grupování # Pandí obdoba databázové operace `GROUP BY` se nazývá... `groupby`. print(maturita2.head()) groups = maturita2.groupby("místnost") # Jak to vypadá? print(groups) # Wtf for key, item in groups: print(key) print(item) # Aha! print(groups.count()) # Můžeme si spočítat průměrnou známku přes předměty. # Jako series. print(maturita2.groupby('předmět')['známka'].mean()) # Jako dataframe. print(maturita2.groupby('předmět')[['známka']].mean()) # Pandy nejsou blbé a průměry počítají jen z numerických sloupců, což je v našem případě jen `známka`. print(maturita2.groupby('předmět').mean()) # Další agregační funkce jsou např. # * `sum` - součet hodnot # * `max` - maximální hodnota # * `min` - minimální hodnota # * `first` - první hodnota # * `last` - poslední hodnota # * `mean` - průměr z hodnot # * `median` - medián z hodnot # * `var` - rozptyl hodnot # * `std` - standardní odchylka hodnot # * `all` - True, pokud jsou všechny hodnoty True # * `any` - True, pokud je alespoň jedna z hodnot True # Můžeme se podívat, jak vypadaly známky mezi jednotlivými předsedy komise. groups_preds = maturita2.groupby("jméno_předseda") print(groups_preds.mean()) print(groups_preds.median()) print(groups_preds.std()) # Když chceme víc agregací najednou, můžeme použít funkci `agg` a dát jí seznam názvů funkcí, které chceme aplikovat. print(groups_preds.agg(["mean", "median", "std"]))
24.22619
117
0.707617
a48c8287d3ab793b3580d1cb545702bea9f17f76
756
php
PHP
app/Http/Controllers/StudentController.php
dzkjz/laravel-advanced-learning
832245e3fe4ba45097abcb6641a7f0de2c4f5469
[ "MIT" ]
1
2021-11-16T10:46:52.000Z
2021-11-16T10:46:52.000Z
app/Http/Controllers/StudentController.php
dzkjz/laravel-advanced-learning
832245e3fe4ba45097abcb6641a7f0de2c4f5469
[ "MIT" ]
null
null
null
app/Http/Controllers/StudentController.php
dzkjz/laravel-advanced-learning
832245e3fe4ba45097abcb6641a7f0de2c4f5469
[ "MIT" ]
null
null
null
<?php namespace App\Http\Controllers; use App\Models\Student; use Illuminate\Http\Request; class StudentController extends Controller { public function showPhone(Request $request) { $student = Student::find(1); $phone = $student->phone; } public function pivotTableTest() { $student = Student::query()->find(1); foreach ($student->teachers as $teacher) { echo $teacher->pivot//访问中间表 [获取的每一个teacher对徐都会自动被赋予pivot属性,代表中间表的一个模型对象,可以像其他的Eloquent模型一样使用] ->created_at;//访问中间表的属性 } } public function getDishesOfStudent(Student $student) { $dishes = $student->dishes; foreach ($dishes as $dish) { echo $dish->name; } } }
21.6
105
0.613757
8aa237594b0fbd834eaf0e4e4c25d27c2961d858
669
rs
Rust
crates/services/src/cri/image_service/image_status.rs
saschagrunert/containrs
3ed113e6d42e6cac744d5a682cb24aa3d77c6707
[ "Apache-2.0" ]
49
2021-09-08T17:03:05.000Z
2022-03-28T19:31:21.000Z
crates/services/src/cri/image_service/image_status.rs
containers/containrs
a4c41da700425ee4b38f46669aed9de06c377e37
[ "Apache-2.0" ]
321
2021-09-09T09:00:04.000Z
2022-03-31T05:29:55.000Z
crates/services/src/cri/image_service/image_status.rs
saschagrunert/containrs
3ed113e6d42e6cac744d5a682cb24aa3d77c6707
[ "Apache-2.0" ]
11
2020-09-04T20:45:11.000Z
2020-11-06T18:32:42.000Z
use crate::cri::{ api::{ImageStatusRequest, ImageStatusResponse}, cri_service::CRIService, }; use std::collections::HashMap; use tonic::{Request, Response, Status}; impl CRIService { /// handle_image_status returns the status of the image. If the image is not /// present, returns a response with ImageStatusResponse.image set to /// None. pub async fn handle_image_status( &self, _request: Request<ImageStatusRequest>, ) -> Result<Response<ImageStatusResponse>, Status> { let resp = ImageStatusResponse { image: None, info: HashMap::new(), }; Ok(Response::new(resp)) } }
29.086957
80
0.64275
dd03c7ef057f8d194e8de5177d3cfcf450936cac
5,146
swift
Swift
tipcalculator/ViewController.swift
hollyham/tipcalculator
8fe50d41f4b33715d0fb4fe63d8fbe6ccb7269fc
[ "Apache-2.0" ]
null
null
null
tipcalculator/ViewController.swift
hollyham/tipcalculator
8fe50d41f4b33715d0fb4fe63d8fbe6ccb7269fc
[ "Apache-2.0" ]
1
2018-01-05T13:41:04.000Z
2018-01-05T13:41:04.000Z
tipcalculator/ViewController.swift
hollyham/tipcalculator
8fe50d41f4b33715d0fb4fe63d8fbe6ccb7269fc
[ "Apache-2.0" ]
null
null
null
// // ViewController.swift // tipcalculator // // Created by Holly Ham on 12/30/17. // Copyright © 2017 Holly Ham. All rights reserved. // import UIKit class ViewController: UIViewController { @IBOutlet weak var billField: UITextField! @IBOutlet weak var tipLabel: UILabel! @IBOutlet weak var totalLabel: UILabel! @IBOutlet weak var tipControl: UISegmentedControl! @IBOutlet weak var resultContainer: UIView! @IBOutlet weak var splitControl: UISegmentedControl! @IBOutlet weak var twoPersonLabel: UILabel! @IBOutlet weak var threePersonLabel: UILabel! @IBOutlet weak var fourPersonLabel: UILabel! let formatter = NumberFormatter() var resultIsHidden = true override func viewDidLoad() { super.viewDidLoad() self.billField.becomeFirstResponder() // Updates text field placeholder to match region's currency formatter.numberStyle = .currency billField.placeholder = formatter.currencySymbol let defaults = UserDefaults.standard // Checks if there is a saved bill amount if( defaults.object(forKey: "billAmount") != nil ){ let timeAtClose = defaults.object(forKey: "closeTime") as! NSDate let duration = timeAtClose.timeIntervalSinceNow if( duration > -600 ){ // Duration is less than 10 minutes (600 seconds) billField.text = defaults.string(forKey: "billAmount") } // Tip and Total should be visible resultIsHidden = false } } override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) let defaults = UserDefaults.standard if (defaults.object(forKey: "tipDefault") != nil){ // Changes tipControl to match default selection tipControl.selectedSegmentIndex = defaults.integer(forKey: "tipDefault") } if (defaults.object(forKey: "splitDefault") != nil){ splitControl.selectedSegmentIndex = defaults.integer(forKey: "splitDefault") } defaults.synchronize() calculateTip(self) //emptyFieldCheck(textField: billField) } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } @IBAction func onTap(_ sender: AnyObject) { view.endEditing(true) } @IBAction func calculateTip(_ sender: AnyObject) { let tipPercentages = [0.15, 0.18, 0.2] let bill = Double(billField.text!) ?? 0 emptyFieldCheck(textField: billField) let tip = bill * tipPercentages[tipControl.selectedSegmentIndex] let total = bill + tip let calculatedVals = [total, tip] let twoPersonCost = calculatedVals[splitControl.selectedSegmentIndex]/2 let threePersonCost = calculatedVals[splitControl.selectedSegmentIndex]/3 let fourPersonCost = calculatedVals[splitControl.selectedSegmentIndex]/4 // Uses correct currency sign for tip and total formatter.numberStyle = .currency formatter.maximumFractionDigits = 2 // Main Labels tipLabel.text = String(format: "%@", formatter.string(from: tip as NSNumber)! ) totalLabel.text = String(format: "%@", formatter.string(from: total as NSNumber)! ) // Split Labels twoPersonLabel.text = String(format: "%@", formatter.string(from: twoPersonCost as NSNumber)! ) threePersonLabel.text = String(format: "%@", formatter.string(from: threePersonCost as NSNumber)! ) fourPersonLabel.text = String(format: "%@", formatter.string(from: fourPersonCost as NSNumber)! ) let defaults = UserDefaults.standard // Saves entered entered bill amount defaults.set(billField.text, forKey: "billAmount") defaults.set(Date(), forKey: "closeTime") defaults.synchronize() } func emptyFieldCheck(textField: UITextField) { // Checks if textfield is empty but result if not hidden if(textField.text == "" && !resultIsHidden){ // Hides results UIView.animate(withDuration: 0.2, animations:{ self.tipControl.center.y += self.view.bounds.height self.resultContainer.center.y += self.view.bounds.height self.billField.center.y += 80 } ) resultIsHidden = true } // Checks if there is input in textfield but results are hidden else if(textField.text != "" && resultIsHidden){ UIView.animate(withDuration: 0.2, animations: { self.tipControl.center.y -= self.view.bounds.height self.resultContainer.center.y -= self.view.bounds.height self.billField.center.y -= 80 } ) resultIsHidden = false } } }
36.496454
107
0.611737
3880c0a513b606d04a26f4b6c93ad1a98eda4c4a
1,170
php
PHP
app/Models/infomationEmploy.php
hoangthanhht/gsxdWebBackend
507b7337ea7c5fdf3dcf07f4e15a1202c77da672
[ "MIT" ]
null
null
null
app/Models/infomationEmploy.php
hoangthanhht/gsxdWebBackend
507b7337ea7c5fdf3dcf07f4e15a1202c77da672
[ "MIT" ]
null
null
null
app/Models/infomationEmploy.php
hoangthanhht/gsxdWebBackend
507b7337ea7c5fdf3dcf07f4e15a1202c77da672
[ "MIT" ]
null
null
null
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class infomationEmploy extends Model { use HasFactory; protected $fillable = [ 'codeEmploy', 'userNameEmploy', 'nameEmploy', 'teleEmploy', 'emailEmploy', 'genderEmploy', 'birthdayEmploy', 'placeOfBirthEmploy', 'homeTownEmploy', 'permanentResidenceEmploy', 'currentAccommodationEmploy', 'majorsEmploy', 'trainingPlacesEmploy', 'nationEmploy', 'religionEmploy', 'qualificationEmploy', 'graduationYearEmploy', 'IDCardEmploy', 'dateRangeEmploy', 'issuedByEmploy', 'accountNumberEmploy', 'bankEmploy', 'branchBankEmploy', 'practicingCertificateTVGS', 'practicingCertificateTVGSEffectiveDate', 'practicingCertificateATLD', 'practicingCertificateTVTK', 'practicingCertificateOther', 'DateOfReceivingTheJob', 'Department', 'Position', 'socialInsurance', 'typeOfContract', 'workStatus', 'socialInsuranceNumber', 'dayOff', 'socialInsurancePremium', 'descriptionEmploy' ,'pathFile' ]; }
22.075472
54
0.686325
db9e1e38a4a7a0943c24a24a9b336ad8429763cd
574
php
PHP
app/Http/Controllers/Api/V1/ContactController.php
jmurphy45/powellsmythe
f07664de30e68a77c22584a22abc304f1d5d6e4f
[ "MIT" ]
null
null
null
app/Http/Controllers/Api/V1/ContactController.php
jmurphy45/powellsmythe
f07664de30e68a77c22584a22abc304f1d5d6e4f
[ "MIT" ]
null
null
null
app/Http/Controllers/Api/V1/ContactController.php
jmurphy45/powellsmythe
f07664de30e68a77c22584a22abc304f1d5d6e4f
[ "MIT" ]
null
null
null
<?php namespace App\Http\Controllers\Api\V1; use App\Http\Requests\ContactUsRequest; use App\Http\Controllers\Controller; use App\Mail\ContactUs; use Illuminate\Support\Facades\Mail; class ContactController extends Controller { /** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(ContactUsRequest $request) { Mail::send(new ContactUs($request)); return response()->json(['message' => 'sucessful'], 200); } }
22.96
65
0.681185
4d919aa01a7362a110519c108a7e65a9e259140a
295
cshtml
C#
HouseholdManager/HouseholdManager.Web/Views/Error/ServerError.cshtml
GalinStoychev/household-manager
2402c5c25d9a4a84bb293c9212db5873336c7103
[ "MIT" ]
3
2017-03-27T12:06:05.000Z
2018-04-09T08:05:39.000Z
HouseholdManager/HouseholdManager.Web/Views/Error/ServerError.cshtml
GalinStoychev/household-manager
2402c5c25d9a4a84bb293c9212db5873336c7103
[ "MIT" ]
null
null
null
HouseholdManager/HouseholdManager.Web/Views/Error/ServerError.cshtml
GalinStoychev/household-manager
2402c5c25d9a4a84bb293c9212db5873336c7103
[ "MIT" ]
null
null
null
@{ ViewBag.Title = "500 Server Error"; Response.StatusCode = 500; } <div class="row"> <div class="col-md-12 text-center"> <h1 class="text-danger">500 Server Error</h1> <h2 class="header-page">Sorry, our server got confused. Plese try again.</h2> </div> </div>
22.692308
85
0.60678
03eef91bb371e8521edb16de45ee0ff479166f7c
1,624
swift
Swift
test/SILGen/lazy_globals_multiple_vars.swift
ackyshake/swift
226a8258078bd4a9987fd5e2485ab72d956deda6
[ "Apache-2.0" ]
4
2016-01-06T22:53:32.000Z
2021-09-11T23:50:05.000Z
test/SILGen/lazy_globals_multiple_vars.swift
ackyshake/swift
226a8258078bd4a9987fd5e2485ab72d956deda6
[ "Apache-2.0" ]
null
null
null
test/SILGen/lazy_globals_multiple_vars.swift
ackyshake/swift
226a8258078bd4a9987fd5e2485ab72d956deda6
[ "Apache-2.0" ]
2
2016-11-04T10:07:52.000Z
2018-04-14T21:55:55.000Z
// RUN: %target-swift-frontend -parse-as-library -emit-silgen %s | FileCheck %s // CHECK: sil private [[INIT_A_B:@globalinit_.*]] : // CHECK: global_addr @_Tv26lazy_globals_multiple_vars1aSi // CHECK: global_addr @_Tv26lazy_globals_multiple_vars1bSi // CHECK: sil hidden [global_init] @_TF26lazy_globals_multiple_varsau1aSi // CHECK: global_addr [[TOKEN_A_B:@globalinit_.*]] : // CHECK: function_ref [[INIT_A_B]] // CHECK: sil hidden [global_init] @_TF26lazy_globals_multiple_varsau1bSi // CHECK: global_addr [[TOKEN_A_B]] // CHECK: function_ref [[INIT_A_B]] var (a, b) = (1, 2) // CHECK: sil private [[INIT_C:@globalinit_.*]] : // CHECK-NOT: global_addr @_Tv26lazy_globals_multiple_vars1dSi // CHECK: global_addr @_Tv26lazy_globals_multiple_vars1cSi // CHECK-NOT: global_addr @_Tv26lazy_globals_multiple_vars1dSi // CHECK: sil hidden [global_init] @_TF26lazy_globals_multiple_varsau1cSi // CHECK: global_addr [[TOKEN_C:@globalinit_.*]] : // CHECK: function_ref [[INIT_C]] // CHECK: sil private [[INIT_D:@globalinit_.*]] : // CHECK-NOT: global_addr @_Tv26lazy_globals_multiple_vars1cSi // CHECK: global_addr @_Tv26lazy_globals_multiple_vars1dSi // CHECK-NOT: global_addr @_Tv26lazy_globals_multiple_vars1cSi // CHECK: sil hidden [global_init] @_TF26lazy_globals_multiple_varsau1dSi // CHECK-NOT: global_addr [[TOKEN_C]] // CHECK: global_addr [[TOKEN_D:@globalinit_.*]] : // CHECK-NOT: global_addr [[TOKEN_C]] // CHECK: function_ref [[INIT_D]] var c = 1, d = 2
52.387097
79
0.685961
23e881d477d16abb75808ce659c01d8424220cdb
607
lua
Lua
src/operators/distinct.lua
xtofl/RxLua
34c8fee29aa467e4c0af1a0417c5c335b2b46a49
[ "MIT" ]
494
2015-08-28T23:13:40.000Z
2022-02-24T08:47:23.000Z
src/operators/distinct.lua
starwing/RxLua
f3d00e6ac3a6cd12bc2e890b0b7fd0c199146b5a
[ "MIT" ]
39
2015-10-25T15:42:06.000Z
2021-11-19T09:13:52.000Z
src/operators/distinct.lua
starwing/RxLua
f3d00e6ac3a6cd12bc2e890b0b7fd0c199146b5a
[ "MIT" ]
89
2015-10-30T00:21:13.000Z
2022-03-16T07:41:11.000Z
local Observable = require 'observable' --- Returns a new Observable that produces the values from the original with duplicates removed. -- @returns {Observable} function Observable:distinct() return Observable.create(function(observer) local values = {} local function onNext(x) if not values[x] then observer:onNext(x) end values[x] = true end local function onError(e) return observer:onError(e) end local function onCompleted() return observer:onCompleted() end return self:subscribe(onNext, onError, onCompleted) end) end
21.678571
96
0.686985
1f066b2fc24c1b9de9ee716ee531947e9b34258a
1,187
cs
C#
MarWac.Merlin/SourceDrivers/InvalidYamlConfigurationFormatException.cs
maw136/merlin
8baddcccd9e409fcb85002d43a1b8e8d911ad421
[ "MIT" ]
null
null
null
MarWac.Merlin/SourceDrivers/InvalidYamlConfigurationFormatException.cs
maw136/merlin
8baddcccd9e409fcb85002d43a1b8e8d911ad421
[ "MIT" ]
null
null
null
MarWac.Merlin/SourceDrivers/InvalidYamlConfigurationFormatException.cs
maw136/merlin
8baddcccd9e409fcb85002d43a1b8e8d911ad421
[ "MIT" ]
null
null
null
using System; using System.Runtime.Serialization; namespace MarWac.Merlin.SourceDrivers { /// <summary> /// Thrown when configuration domain expressed with YAML source is invalid (e.g missing or disorder of expected /// YAML node names/sequences/etc.). In this case YAML source is valid according to the YAML format standard. /// </summary> [Serializable] public class InvalidYamlConfigurationFormatException : SourceReadException { /// <inheritdoc cref="Exception"/> public InvalidYamlConfigurationFormatException() { } /// <inheritdoc cref="Exception"/> public InvalidYamlConfigurationFormatException(string message) : base(message) { } /// <inheritdoc cref="Exception"/> public InvalidYamlConfigurationFormatException(string message, Exception innerException) : base(message, innerException) { } /// <inheritdoc cref="Exception"/> protected InvalidYamlConfigurationFormatException(SerializationInfo info, StreamingContext context) : base(info, context) { } } }
33.914286
117
0.643639
d039ca11426a50f4bee6054978cd1ce62fe85286
577
cpp
C++
sketches/libraries/AUnit/tests/FailingTest/ExternalTests.cpp
gtraines/Robot1
2dfd20dd574aa1ee53b37ce885769d7265d4934b
[ "MIT" ]
113
2018-04-25T12:42:28.000Z
2022-03-26T23:20:17.000Z
sketches/libraries/AUnit/tests/FailingTest/ExternalTests.cpp
gtraines/Robot1
2dfd20dd574aa1ee53b37ce885769d7265d4934b
[ "MIT" ]
47
2018-03-29T21:02:19.000Z
2022-01-10T15:22:40.000Z
sketches/libraries/AUnit/tests/FailingTest/ExternalTests.cpp
gtraines/Robot1
2dfd20dd574aa1ee53b37ce885769d7265d4934b
[ "MIT" ]
11
2018-07-16T16:42:42.000Z
2022-02-20T15:47:35.000Z
#line 2 "ExternalTests.cpp" #include "ExternalTests.h" testing(slow_fail) { static unsigned long start = millis(); if (millis() - start > 1000) fail(); } testing(slow_expire) { static unsigned long start = millis(); if (millis() - start > 1000) expire(); } testingF(CustomAgainFixture, fixture_slow_fail) { static unsigned long start = millis(); assertCommon(5); if (millis() - start > 1000) fail(); } testingF(CustomAgainFixture, fixture_slow_expire) { static unsigned long start = millis(); assertCommon(5); if (millis() - start > 1000) expire(); }
21.37037
51
0.682842
a438da78a102bacedfa479e328d66fc1420beefa
930
php
PHP
app/Models/BahanBaku.php
Danyihza/Slokki
6ca588290a20c907f4afec1fb0bd316707f8c92d
[ "MIT" ]
null
null
null
app/Models/BahanBaku.php
Danyihza/Slokki
6ca588290a20c907f4afec1fb0bd316707f8c92d
[ "MIT" ]
null
null
null
app/Models/BahanBaku.php
Danyihza/Slokki
6ca588290a20c907f4afec1fb0bd316707f8c92d
[ "MIT" ]
null
null
null
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class BahanBaku extends Model { use HasFactory; protected $table = 'bahan_baku'; public $primaryKey = 'id_bahan_baku'; public $keyType = 'string'; /** * The attributes that are mass assignable. * * @var string[] */ protected $fillable = [ 'id_bahan_baku', 'nama_bahan_baku', 'harga_beli', ]; public static function generateBahanBakuId() { $lastId = self::orderBy('id_bahan_baku', 'desc')->first(); if ($lastId) { $lastId = $lastId->id_bahan_baku; $lastId = substr($lastId, 3); $lastId = (int) $lastId; $lastId++; $lastId = str_pad($lastId, 3, '0', STR_PAD_LEFT); return 'BBK' . $lastId; } return 'BBK001'; } }
21.136364
66
0.562366
e547bd452a672a56f69edf973d130bc2815b328f
1,244
sql
SQL
docs/deployment/db_deployment_request/db_scripts/delete_duplicate_series_stage.sql
TCIA/national-biomedical-image-archive
ac26ef878a3d8818a0037e2b74ace6b8068f4ce1
[ "BSD-3-Clause" ]
1
2019-04-22T17:38:54.000Z
2019-04-22T17:38:54.000Z
docs/deployment/db_deployment_request/db_scripts/delete_duplicate_series_stage.sql
TCIA/national-biomedical-image-archive
ac26ef878a3d8818a0037e2b74ace6b8068f4ce1
[ "BSD-3-Clause" ]
null
null
null
docs/deployment/db_deployment_request/db_scripts/delete_duplicate_series_stage.sql
TCIA/national-biomedical-image-archive
ac26ef878a3d8818a0037e2b74ace6b8068f4ce1
[ "BSD-3-Clause" ]
null
null
null
/*L Copyright SAIC, Ellumen and RSNA (CTP) Distributed under the OSI-approved BSD 3-Clause License. See http://ncip.github.com/national-biomedical-image-archive/LICENSE.txt for details. L*/ -- MAKE SURE YOU DONT LEAVE A DANGLING STUDY!!! create temporary table series_temp as select max(general_series_pk_id) as series_pk_id, series_instance_uid from general_series group by series_instance_uid having count(series_instance_uid) > 1; create temporary table image_temp as select image_pk_id from general_image where general_series_pk_id in (select series_pk_id from series_temp); delete c from ct_image c, image_temp i where c.image_pk_id = i.image_pk_id; delete q from qa_status_history q, image_temp i where q.general_image_pk_id = i.image_pk_id; delete g from group9_dicom_tags g, image_temp i where g.image_pk_id = i.image_pk_id; delete gi from general_image gi, series_temp st where gi.general_series_pk_id=st.series_pk_id; delete a from annotation a, series_temp st where a.general_series_pk_id =st.series_pk_id; delete gs from general_series gs, series_temp st where gs.general_series_pk_id=st.series_pk_id ; drop table series_temp; drop table image_temp;
25.387755
89
0.773312
d2ce3810e6a800398b54ce3d1be343c6a010c4a4
2,738
rb
Ruby
spec/pomo/mo_file_spec.rb
e-tobi/get_pomo
2b8e5649fa5860fed91e3967c71785656e6718ed
[ "MIT" ]
7
2015-09-18T15:54:25.000Z
2022-02-07T04:10:42.000Z
spec/pomo/mo_file_spec.rb
e-tobi/get_pomo
2b8e5649fa5860fed91e3967c71785656e6718ed
[ "MIT" ]
7
2015-01-11T23:49:40.000Z
2021-05-21T22:27:42.000Z
spec/pomo/mo_file_spec.rb
e-tobi/get_pomo
2b8e5649fa5860fed91e3967c71785656e6718ed
[ "MIT" ]
4
2015-05-18T11:28:21.000Z
2021-05-21T03:34:53.000Z
# encoding: utf-8 require 'spec_helper' require 'get_pomo/mo_file' describe GetPomo::MoFile do it "parses empty mo file" do GetPomo::MoFile.parse(File.read('spec/files/empty.mo')).should == [] end it "parses empty strings" do GetPomo::MoFile.parse(File.read('spec/files/empty.mo')).should == [] end it "reads singulars" do pending("singular.mo is not encoded correctly for ruby > 1.9.0") if RUBY_VERSION > "1.9.0" t = GetPomo::MoFile.parse(File.read('spec/files/singular.mo'))[0] t.to_hash.should == {:msgid=>"Back",:msgstr=>"Zurück"} end it "reads plurals" do t = GetPomo::MoFile.parse(File.read('spec/files/plural.mo'))[0] t.to_hash.should == {:msgid=>['Axis','Axis'],:msgstr=>['Achse','Achsen']} end it 'reads contexts' do t = GetPomo::MoFile.parse(File.read('spec/files/context.mo')) t[1].to_hash.should == { :msgid=>'Duplicate', :msgstr=>'Duplicado', :msgctxt=>'Noun', } t[2].to_hash.should == { :msgid=>'Duplicate', :msgstr=>'Duplicar', :msgctxt=>'Verb', } end describe 'instance methods' do it "combines multiple translations" do m = GetPomo::MoFile.new m.add_translations_from_text(File.read('spec/files/plural.mo')) m.add_translations_from_text(File.read('spec/files/singular.mo')) m.should have(2).translations m.translations[0].msgid.should_not == m.translations[1].msgid end it "can be initialized with translations" do m = GetPomo::MoFile.new(:translations=>['x']) m.translations.should == ['x'] end it "does not generate duplicate translations" do second_version = File.read('spec/files/singular_2.mo') m = GetPomo::MoFile.new m.add_translations_from_text(File.read('spec/files/singular.mo')) m.add_translations_from_text(second_version) m.to_text.should == second_version end end it "reads metadata" do meta = GetPomo::MoFile.parse(File.read('spec/files/complex.mo')).detect {|t|t.msgid == ''} meta.msgstr.should_not be_empty end describe :to_text do it "writes singulars" do text = File.read('spec/files/singular.mo') GetPomo::MoFile.to_text(GetPomo::MoFile.parse(text)).should == text end it 'writes msgctxt' do translations = GetPomo::PoFile.parse(File.read('spec/files/context.po')) stream = GetPomo::MoFile.to_text(translations) result = GetPomo::MoFile.parse(stream) result[0].to_hash.should == { :msgid=>'Duplicate', :msgstr=>'Duplicado', :msgctxt=>'Noun', } result[1].to_hash.should == { :msgid=>'Duplicate', :msgstr=>'Duplicar', :msgctxt=>'Verb', } end end end
29.12766
94
0.636596
9f9b754f24229148f89859775b136503f53004fd
797
ps1
PowerShell
.github/workflows/scripts/Upload-ReleaseItem.ps1
Smalls1652/SmallsOnline.Azure.AVDSetup
3ad12db5e5a73b0af5da8fb9b4432f9eb6e7baae
[ "MIT" ]
null
null
null
.github/workflows/scripts/Upload-ReleaseItem.ps1
Smalls1652/SmallsOnline.Azure.AVDSetup
3ad12db5e5a73b0af5da8fb9b4432f9eb6e7baae
[ "MIT" ]
null
null
null
.github/workflows/scripts/Upload-ReleaseItem.ps1
Smalls1652/SmallsOnline.Azure.AVDSetup
3ad12db5e5a73b0af5da8fb9b4432f9eb6e7baae
[ "MIT" ]
null
null
null
[CmdletBinding()] param( [Parameter(Position = 0, Mandatory)] [string]$Token, [Parameter(Position = 1, Mandatory)] [string]$Name ) $commonSplat = @{ "Authentication" = "OAuth"; "Token" = (ConvertTo-SecureString -String $Token -AsPlainText -Force); "ErrorAction" = "Stop"; } $releaseId = (Invoke-RestMethod @commonSplat -Method "Get" -Uri $env:TAG_RELEASE_API)[0].id Write-Information -InformationAction "Continue" -MessageData $releaseId Write-Information -InformationAction "Continue" -MessageData "$($env:RELEASE_API_URI)/$($releaseId)/assets?name=$($Name)" Invoke-RestMethod @commonSplat -Method "Post" -Uri "$($env:RELEASE_API_URI)/$($releaseId)/assets?name=$($Name)" -ContentType "application/zip" -InFile "./build/SmallsOnline.Azure.AVDSetup.zip"
37.952381
192
0.70138
e74adaa8197ecaa1f72956cb8a44b58810fedbfe
130
php
PHP
src/Exceptions/MassAssignmentException.php
marcth/ssc-deploy
f54c7c7fdbef6db0fb499ce70cc1fc5bff08fd02
[ "MIT" ]
null
null
null
src/Exceptions/MassAssignmentException.php
marcth/ssc-deploy
f54c7c7fdbef6db0fb499ce70cc1fc5bff08fd02
[ "MIT" ]
null
null
null
src/Exceptions/MassAssignmentException.php
marcth/ssc-deploy
f54c7c7fdbef6db0fb499ce70cc1fc5bff08fd02
[ "MIT" ]
null
null
null
<?php namespace Marcth\GocDeploy\Exceptions; use RuntimeException; class MassAssignmentException extends RuntimeException { }
11.818182
54
0.823077
8aa3bb7841243ebecf8b1affe63e38ad4faaddac
6,339
dart
Dart
lib/widgets/account/payment_item.dart
MohamedAskar/StoreApp
b354891e1f14230f4d5aec98248b3a7f6d18811f
[ "MIT" ]
null
null
null
lib/widgets/account/payment_item.dart
MohamedAskar/StoreApp
b354891e1f14230f4d5aec98248b3a7f6d18811f
[ "MIT" ]
null
null
null
lib/widgets/account/payment_item.dart
MohamedAskar/StoreApp
b354891e1f14230f4d5aec98248b3a7f6d18811f
[ "MIT" ]
null
null
null
import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:store/Provider/payment_provider.dart'; import 'package:store/screens/account/add_payment_screen.dart'; import 'package:store/models/payment.dart'; import 'package:store/screens/store/checkout_screen.dart'; class PaymentItem extends StatelessWidget { const PaymentItem({ this.select, }); final bool select; @override Widget build(BuildContext context) { final payment = Provider.of<Payment>(context, listen: false); return Padding( padding: const EdgeInsets.only(bottom: 16), child: Card( margin: const EdgeInsets.all(0), shape: RoundedRectangleBorder(borderRadius: BorderRadius.zero), color: Colors.white, child: Padding( padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 16), child: Column( children: [ Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Row( children: [ Icon(Icons.payment), SizedBox( width: 20, ), Text( 'MasterCard', style: Theme.of(context).textTheme.bodyText1, ) ], ), Row( children: [ Visibility( visible: select, child: InkWell( onTap: () { Provider.of<PaymentProvider>(context, listen: false) .sortPayment(payment.id); Navigator.of(context).push(PageRouteBuilder( transitionDuration: const Duration(milliseconds: 150), opaque: false, pageBuilder: (_, animation1, __) { return SlideTransition( position: Tween( begin: Offset(1.0, 0.0), end: Offset(0.0, 0.0)) .animate(animation1), child: CheckoutScreen()); })); }, child: Row( children: [ Icon(Icons.person_pin_outlined), SizedBox( width: 4, ), Text( 'Select', style: TextStyle(fontWeight: FontWeight.w600), ), SizedBox( width: 20, ), ], )), ), InkWell( onTap: () { Navigator.of(context).pushNamed( AddPaymentScreen.routeName, arguments: payment.id); }, child: Row( children: [ Icon(Icons.edit_outlined), SizedBox( width: 4, ), Text( 'Edit', style: TextStyle(fontWeight: FontWeight.w600), ), ], )), SizedBox( width: 20, ), InkWell( onTap: () { Provider.of<PaymentProvider>(context, listen: false) .removePayment(payment.id); }, child: Row( children: [ Icon(Icons.delete_outline), SizedBox( width: 4, ), Text( 'Delete', style: TextStyle(fontWeight: FontWeight.w600), ), ], )) ], ), ], ), Divider(), Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text('Card Holder'), SizedBox( height: 20, ), Text('Card Number'), SizedBox( height: 16, ), Text('Expiry Date') ], ), SizedBox( width: 60, ), Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text(payment.cardHolder), SizedBox( height: 20, ), Text( 'Card ending with ${payment.cardNumber.substring(12)}'), SizedBox( height: 16, ), Text('${payment.expiryMonth}/${payment.expiryYear}') ], ) ], ), ], ), ), ), ); } }
37.958084
82
0.318662
c98ceac67ed6a408528c1dc37462173d9567a13f
438
tsx
TypeScript
example-ssr/pages/_app.tsx
KirbyMcKenzie/react-modal-sheet
6366a979fad11390110ca855539ab3fcfa5c5560
[ "MIT" ]
259
2020-08-12T12:10:55.000Z
2022-03-30T15:25:45.000Z
example-ssr/pages/_app.tsx
KirbyMcKenzie/react-modal-sheet
6366a979fad11390110ca855539ab3fcfa5c5560
[ "MIT" ]
62
2020-10-01T04:32:52.000Z
2022-03-20T23:43:34.000Z
example-ssr/pages/_app.tsx
KirbyMcKenzie/react-modal-sheet
6366a979fad11390110ca855539ab3fcfa5c5560
[ "MIT" ]
27
2020-10-14T12:38:59.000Z
2022-03-25T23:41:05.000Z
import { createGlobalStyle } from 'styled-components'; import App from 'next/app'; import './index.css'; const GlobalStyle = createGlobalStyle` body { margin: 0; padding: 0; box-sizing: border-box; } `; class MyApp extends App { render() { const { Component, pageProps } = this.props; return ( <> <GlobalStyle /> <Component {...pageProps} /> </> ); } } export default MyApp;
16.846154
54
0.589041
0313bf4d864851b5817c2a401ca390df47cd0718
789
cpp
C++
leetcode/0219_Contains_Duplicate_2/result.cpp
theck17/notes
f32f0f4b8f821b1ed38d173ef0913efddd094b91
[ "MIT" ]
null
null
null
leetcode/0219_Contains_Duplicate_2/result.cpp
theck17/notes
f32f0f4b8f821b1ed38d173ef0913efddd094b91
[ "MIT" ]
null
null
null
leetcode/0219_Contains_Duplicate_2/result.cpp
theck17/notes
f32f0f4b8f821b1ed38d173ef0913efddd094b91
[ "MIT" ]
null
null
null
/** * Copyright (C) 2021 All rights reserved. * * FileName :result.cpp * Author :C.K * Email :theck17@163.com * DateTime :2021-06-18 18:48:06 * Description : */ #include <string> //字符串类 #include <vector> //STL 动态数组容器 using namespace std; class Solution { public: bool containsNearbyDuplicate(vector<int>& nums, int k) { unordered_set<int> s; if (k <= 0) return false; if (k >= nums.size()) k = nums.size() - 1; for (int i = 0; i < nums.size(); i++) { if (i > k) s.erase(nums[i - k - 1]); if (s.find(nums[i]) != s.end()) return true; s.insert(nums[i]); } return false; } }; int main(){ return 0; }
19.725
58
0.47782
3f3c8e0c73349dc2b7708f4cfad7905772ab656e
4,985
php
PHP
public/creategraph/show_poll.php
devnouveau/my-first-php
51baac5de0130802a0a5bdac8d3ac15e9385351f
[ "MIT" ]
null
null
null
public/creategraph/show_poll.php
devnouveau/my-first-php
51baac5de0130802a0a5bdac8d3ac15e9385351f
[ "MIT" ]
null
null
null
public/creategraph/show_poll.php
devnouveau/my-first-php
51baac5de0130802a0a5bdac8d3ac15e9385351f
[ "MIT" ]
null
null
null
<?php // 입력값 전달받기 $vote = $_POST['vote']; if (empty($vote)) { echo '<p>You have not voted for a politician.</p>'; exit; } /******************************************* DB 처리 *******************************************/ // DB 연결 $db = new mysqli('localhost', 'poll', 'poll', 'poll'); if (mysqli_connect_errno()) { echo '<p>Error: Could not connect to database.<br/> Please try again later.</p>'; exit; } // DB 변경 $v_query = "UPDATE poll_results SET num_votes = num_votes + 1 WHERE candidate = ?"; $v_stmt = $db->prepare($v_query); $v_stmt->bind_param('s', $vote); $v_stmt->execute(); $v_stmt->free_result(); // DB 조회 $r_query = "SELECT candidate, num_votes FROM poll_results"; $r_stmt = $db->prepare($r_query); $r_stmt->execute(); $r_stmt->store_result(); $r_stmt->bind_result($candidate, $num_votes); $num_candidates = $r_stmt->num_rows; // 총 투표수 $total_votes = 0; while ($r_stmt->fetch()) { $total_votes += $num_votes; } $r_stmt->data_seek(0); /******************************************* 변수설정 *******************************************/ // For Unix putenv('GDFONTPATH=/usr/share/fonts/truetype/dejavu'); $width = 500; // width of image in pixels $left_margin = 50; // space to leave on left of graph $right_margin= 50; // space to leave on right of graph $bar_height = 40; $bar_spacing = $bar_height/2; // For Unix $font_name = 'DejaVuSans'; // For Windows //$font_name = 'C:\Windows\Fonts\arial.ttf'; $title_size= 16; // in points $main_size= 12; // in points $small_size= 12; // in points $text_indent = 10; // position for text labels from edge of image // Set up initial point to draw from $x = $left_margin + 60; // place to draw baseline of the graph $y = 50; // ditto $bar_unit = ($width-($x+$right_margin)) / 100; // one "point" on the graph // Calculate height of graph - bars plus gaps plus some margin $height = $num_candidates * ($bar_height + $bar_spacing) + 50; /******************************************* 이미지 그리기 *******************************************/ // Create a blank canvas $im = imagecreatetruecolor($width,$height); // Allocate colors $white = imagecolorallocate($im,255,255,255); $blue = imagecolorallocate($im,0,64,128); $black = imagecolorallocate($im,0,0,0); $pink = imagecolorallocate($im,255,78,243); $text_color = $black; $percent_color = $black; $bg_color = $white; $line_color = $black; $bar_color = $blue; $number_color = $pink; // Create "canvas" to draw on imagefilledrectangle($im, 0, 0, $width, $height, $bg_color); // Draw outline around canvas imagerectangle($im, 0, 0, $width-1, $height-1, $line_color); // Add title $title = 'Poll Results'; $title_dimensions = imagettfbbox($title_size, 0, $font_name, $title); $title_length = $title_dimensions[2] - $title_dimensions[0]; $title_height = abs($title_dimensions[7] - $title_dimensions[1]); $title_above_line = abs($title_dimensions[7]); $title_x = ($width-$title_length)/2; // center it in x $title_y = ($y - $title_height)/2 + $title_above_line; // center in y gap imagettftext($im, $title_size, 0, $title_x, $title_y, $text_color, $font_name, $title); // Draw a base line from a little above first bar location // to a little below last imageline($im, $x, $y-5, $x, $height-15, $line_color); /******************************************* 데이터를 그래프로 그리기 *******************************************/ // Get each line of DB data and draw corresponding bars while ($r_stmt->fetch()) { if ($total_votes > 0) { $percent = intval(($num_votes/$total_votes)*100); } else { $percent = 0; } // 현재 값의 백분률 $percent_dimensions = imagettfbbox($main_size, 0, $font_name, $percent.'%'); $percent_length = $percent_dimensions[2] - $percent_dimensions[0]; imagettftext($im, $main_size, 0, $width-$percent_length-$text_indent, $y+($bar_height/2), $percent_color, $font_name, $percent.'%'); // 현재 값의 막대길이 $bar_length = $x + ($percent * $bar_unit); // 현재 값의 막대 그리기 imagefilledrectangle($im, $x, $y-2, $bar_length, $y+$bar_height, $bar_color); // 현재 값의 제목 그리기 imagettftext($im, $main_size, 0, $text_indent, $y+($bar_height/2), $text_color, $font_name, $candidate); // 100% 외곽선 그리기 imagerectangle($im, $bar_length+1, $y-2, ($x+(100*$bar_unit)), $y+$bar_height, $line_color); // 숫자출력 imagettftext($im, $small_size, 0, $x+(100*$bar_unit)-50, $y+($bar_height/2), $number_color, $font_name, $num_votes.'/'.$total_votes); // y좌표값을 다음 막대 위치로 변경 $y=$y+($bar_height+$bar_spacing); } /******************************************* 이미지 출력 *******************************************/ header('Content-type: image/png'); imagepng($im); /******************************************* 리소스 해제 *******************************************/ $r_stmt->free_result(); $db->close(); imagedestroy($im); ?>
26.375661
81
0.567302
296baa37634433cef05ef421334310fbcca1a705
3,232
swift
Swift
Clark/UI Components/Bubbles/Typing indicator/ClarkTypingIndicator.swift
ignotusverum/Clark
697bb1ae25de18e6a81b0f88ef7ccd0f43092357
[ "MIT" ]
null
null
null
Clark/UI Components/Bubbles/Typing indicator/ClarkTypingIndicator.swift
ignotusverum/Clark
697bb1ae25de18e6a81b0f88ef7ccd0f43092357
[ "MIT" ]
null
null
null
Clark/UI Components/Bubbles/Typing indicator/ClarkTypingIndicator.swift
ignotusverum/Clark
697bb1ae25de18e6a81b0f88ef7ccd0f43092357
[ "MIT" ]
null
null
null
// // ClarkTypingIndicator.swift // Clark // // Created by Vladislav Zagorodnyuk on 8/18/17. // Copyright © 2017 Clark. All rights reserved. // import UIKit import NMessenger import AsyncDisplayKit class ClarkTypingIndicator: ContentNode { // MARK: Private Variables /** gifNode holds the animated typing indicator*/ fileprivate(set) var gifNode = ASDisplayNode() override func didLoad() { super.didLoad() addIndicators() } override func visibilityDidChange(_ isVisible: Bool) { if isVisible { gifNode.removeFromSupernode(); addIndicators() } else{ gifNode.removeFromSupernode(); } } override func didEnterVisibleState() { addIndicators() } func addIndicators(){ backgroundColor = UIColor.clear view.backgroundColor = UIColor.clear gifNode.backgroundColor = UIColor.clear gifNode.view.backgroundColor = UIColor.clear let imageNames = ["loadBubble_0038_Layer-1", "loadBubble_0037_Layer-2", "loadBubble_0036_Layer-3", "loadBubble_0035_Layer-4", "loadBubble_0034_Layer-5", "loadBubble_0033_Layer-6", "loadBubble_0032_Layer-7", "loadBubble_0031_Layer-8", "loadBubble_0030_Layer-9", "loadBubble_0029_Layer-10", "loadBubble_0028_Layer-11", "loadBubble_0027_Layer-12", "loadBubble_0026_Layer-13", "loadBubble_0025_Layer-14", "loadBubble_0024_Layer-15", "loadBubble_0023_Layer-16", "loadBubble_0022_Layer-17", "loadBubble_0021_Layer-18", "loadBubble_0020_Layer-19", "loadBubble_0019_Layer-20", "loadBubble_0018_Layer-21", "loadBubble_0017_Layer-22", "loadBubble_0016_Layer-23", "loadBubble_0015_Layer-24", "loadBubble_0014_Layer-25", "loadBubble_0013_Layer-26", "loadBubble_0012_Layer-27", "loadBubble_0011_Layer-28", "loadBubble_0010_Layer-29", "loadBubble_0009_Layer-30", "loadBubble_0008_Layer-31", "loadBubble_0007_Layer-32", "loadBubble_0006_Layer-33", "loadBubble_0005_Layer-34", "loadBubble_0004_Layer-35", "loadBubble_0003_Layer-36", "loadBubble_0002_Layer-37", "loadBubble_0001_Layer-38", "loadBubble_0000_Layer-39"]; var images = [UIImage]() for imageName in imageNames { if let image = UIImage(named: imageName, in: Bundle(for: NMessengerViewController.self), compatibleWith: nil){ images.append(image) } } let imageView = UIImageView(frame: CGRect(x: 0, y: 0, width: images[0].size.width - 1, height: images[0].size.height - 1)) imageView.contentMode = UIViewContentMode.center imageView.clipsToBounds = true imageView.animationImages = images imageView.animationDuration = 1 imageView.startAnimating() self.gifNode.view.addSubview(imageView) self.gifNode.style.preferredSize = imageView.frame.size self.addSubnode(self.gifNode) self.setNeedsLayout() } override func layoutSpecThatFits(_ constrainedSize: ASSizeRange) -> ASLayoutSpec { let absLayoutSpec = ASAbsoluteLayoutSpec() absLayoutSpec.sizing = .sizeToFit absLayoutSpec.children = [self.gifNode] return absLayoutSpec } }
43.093333
1,109
0.689047
54d855017db6b76022e7e71fdd5891a891c3432e
4,242
cpp
C++
Tools/PL3dsMaxSceneExport_2008/src/PLSceneCell.cpp
ktotheoz/pixellight
43a661e762034054b47766d7e38d94baf22d2038
[ "MIT" ]
83
2015-01-08T15:06:14.000Z
2021-07-20T17:07:00.000Z
Tools/PL3dsMaxSceneExport_2008/src/PLSceneCell.cpp
PixelLightFoundation/pixellight
43a661e762034054b47766d7e38d94baf22d2038
[ "MIT" ]
27
2019-06-18T06:46:07.000Z
2020-02-02T11:11:28.000Z
Tools/PL3dsMaxSceneExport_2008/src/PLSceneCell.cpp
naetherm/PixelLight
d7666f5b49020334cbb5debbee11030f34cced56
[ "MIT" ]
40
2015-02-25T18:24:34.000Z
2021-03-06T09:01:48.000Z
/*********************************************************\ * File: PLSceneCell.cpp * * * Copyright (C) 2002-2013 The PixelLight Team (http://www.pixellight.org/) * * This file is part of PixelLight. * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software * and associated documentation files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, copy, modify, merge, publish, * distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or * substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \*********************************************************/ //[-------------------------------------------------------] //[ Includes ] //[-------------------------------------------------------] #include "PL3dsMaxSceneExport/PLLog.h" #include "PL3dsMaxSceneExport/PLTools.h" #include "PL3dsMaxSceneExport/PLSceneCellPortal.h" #include "PL3dsMaxSceneExport/PLSceneCell.h" //[-------------------------------------------------------] //[ Namespace ] //[-------------------------------------------------------] using namespace PLCore; //[-------------------------------------------------------] //[ Private functions ] //[-------------------------------------------------------] /** * @brief * Constructor */ PLSceneCell::PLSceneCell(PLSceneContainer &cContainer, const String &sName) : PLSceneContainer(&cContainer, sName, TypeCell) { } /** * @brief * Destructor */ PLSceneCell::~PLSceneCell() { } //[-------------------------------------------------------] //[ Private virtual PLSceneNode functions ] //[-------------------------------------------------------] void PLSceneCell::WriteToFile(XmlElement &cSceneElement, const String &sApplicationDrive, const String &sApplicationDir) { static const String sSCCell = "PLScene::SCCell"; PLSceneContainer::WriteToFile(cSceneElement, sApplicationDrive, sApplicationDir, sSCCell); } //[-------------------------------------------------------] //[ Private virtual PLSceneContainer functions ] //[-------------------------------------------------------] void PLSceneCell::PostProcess() { // Call base implementation PLSceneContainer::PostProcess(); // Loop through the list of outgoing cell-portals for (std::vector<PLSceneCellPortal*>::size_type i=0; i<m_lstOutgoingCellPortals.size(); i++) { // Get the cell-portal PLSceneCellPortal *pCellPortal = m_lstOutgoingCellPortals[i]; if (pCellPortal) { // Get the target cell PLSceneNode *pNode = Get(pCellPortal->GetTargetCell()); if (pNode) { if (pNode->GetType() == TypeCell) { // Add this cell-portal to the list of incoming cell-portals of the target cell static_cast<PLSceneCell*>(pNode)->m_lstIncomingCellPortals.push_back(pCellPortal); } else { g_pLog->LogFLine(PLLog::Error, "Cell-portal '%s': There's a scene node with the name '%s', but this is NO (valid target) cell node! (note: 'Parent.' is added automatically by the exporter if required...)", pCellPortal->GetMaxNode()->GetName(), pCellPortal->GetTargetCell().GetASCII()); } } else { g_pLog->LogFLine(PLLog::Error, "Cell-portal '%s': There's no (target) cell with the name '%s'! (note: 'Parent.' is added automatically by the exporter if required...)", pCellPortal->GetMaxNode()->GetName(), pCellPortal->GetTargetCell().GetASCII()); } } } }
42.848485
290
0.578265
0ad0d945a941459ba1dd6139fd34f44b9bce2bc3
706
cs
C#
samples/ResxFileSample/Models/TreeNode.cs
xakepbean/ResxLocalization
8286d1174b698067dff6499830342ae7758966e4
[ "MIT" ]
null
null
null
samples/ResxFileSample/Models/TreeNode.cs
xakepbean/ResxLocalization
8286d1174b698067dff6499830342ae7758966e4
[ "MIT" ]
null
null
null
samples/ResxFileSample/Models/TreeNode.cs
xakepbean/ResxLocalization
8286d1174b698067dff6499830342ae7758966e4
[ "MIT" ]
null
null
null
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace ResxFileSample.Models { public class TreeNode : IEquatable<TreeNode> { public string name { get; set; } public string id { get; set; } public bool isParent { get; set; } public bool Equals(TreeNode other) { if (Object.ReferenceEquals(other, null)) return false; if (Object.ReferenceEquals(this, other)) return true; return id.Equals(other.id); } public override int GetHashCode() { return id.GetHashCode(); } } }
21.393939
66
0.558074
aab4b1f4c7cde51b3d462834f0019fada98cfb5a
16,859
lua
Lua
libmoon/lua/filter.lua
imehrdad2012/MoonGen
ac5abec7ddf7140939be26b4e54f9ecb0e83127a
[ "MIT" ]
null
null
null
libmoon/lua/filter.lua
imehrdad2012/MoonGen
ac5abec7ddf7140939be26b4e54f9ecb0e83127a
[ "MIT" ]
null
null
null
libmoon/lua/filter.lua
imehrdad2012/MoonGen
ac5abec7ddf7140939be26b4e54f9ecb0e83127a
[ "MIT" ]
null
null
null
--------------------------------- --- @file filter.lua --- @brief Filter ... --- @todo TODO docu --------------------------------- local mod = {} local dpdkc = require "dpdkc" local device = require "device" local ffi = require "ffi" local dpdk = require "dpdk" local mbitmask = require "bitmask" local log = require "log" mod.DROP = -1 local dev = device.__devicePrototype ffi.cdef[[ // used by the (undocumented) flow_type fields in filters enum rte_flow_type { RTE_ETH_FLOW_UNKNOWN = 0, RTE_ETH_FLOW_RAW, RTE_ETH_FLOW_IPV4, RTE_ETH_FLOW_FRAG_IPV4, RTE_ETH_FLOW_NONFRAG_IPV4_TCP, RTE_ETH_FLOW_NONFRAG_IPV4_UDP, RTE_ETH_FLOW_NONFRAG_IPV4_SCTP, RTE_ETH_FLOW_NONFRAG_IPV4_OTHER, RTE_ETH_FLOW_IPV6, RTE_ETH_FLOW_FRAG_IPV6, RTE_ETH_FLOW_NONFRAG_IPV6_TCP, RTE_ETH_FLOW_NONFRAG_IPV6_UDP, RTE_ETH_FLOW_NONFRAG_IPV6_SCTP, RTE_ETH_FLOW_NONFRAG_IPV6_OTHER, RTE_ETH_FLOW_L2_PAYLOAD, RTE_ETH_FLOW_IPV6_EX, RTE_ETH_FLOW_IPV6_TCP_EX, RTE_ETH_FLOW_IPV6_UDP_EX, RTE_ETH_FLOW_MAX }; enum rte_eth_payload_type { RTE_ETH_PAYLOAD_UNKNOWN = 0, RTE_ETH_RAW_PAYLOAD, RTE_ETH_L2_PAYLOAD, RTE_ETH_L3_PAYLOAD, RTE_ETH_L4_PAYLOAD, RTE_ETH_PAYLOAD_MAX = 8, }; enum rte_filter_type { RTE_ETH_FILTER_NONE = 0, RTE_ETH_FILTER_MACVLAN, RTE_ETH_FILTER_ETHERTYPE, RTE_ETH_FILTER_FLEXIBLE, RTE_ETH_FILTER_SYN, RTE_ETH_FILTER_NTUPLE, RTE_ETH_FILTER_TUNNEL, RTE_ETH_FILTER_FDIR, RTE_ETH_FILTER_HASH, RTE_ETH_FILTER_MAX }; enum rte_filter_op { RTE_ETH_FILTER_NOP = 0, RTE_ETH_FILTER_ADD, RTE_ETH_FILTER_UPDATE, RTE_ETH_FILTER_DELETE, RTE_ETH_FILTER_FLUSH, RTE_ETH_FILTER_GET, RTE_ETH_FILTER_SET, RTE_ETH_FILTER_INFO, RTE_ETH_FILTER_STATS, RTE_ETH_FILTER_OP_MAX }; enum rte_mac_filter_type { RTE_MAC_PERFECT_MATCH = 1, RTE_MACVLAN_PERFECT_MATCH, RTE_MAC_HASH_MATCH, RTE_MACVLAN_HASH_MATCH, }; struct rte_eth_ethertype_filter { uint8_t mac_addr[6]; uint16_t ether_type; uint16_t flags; uint16_t queue; }; /** * A structure used to define the input for L2 flow */ struct rte_eth_l2_flow { uint16_t ether_type; /**< Ether type in big endian */ }; struct rte_eth_ntuple_filter { uint16_t flags; uint32_t dst_ip; uint32_t dst_ip_mask; uint32_t src_ip; uint32_t src_ip_mask; uint16_t dst_port; uint16_t dst_port_mask; uint16_t src_port; uint16_t src_port_mask; uint8_t proto; uint8_t proto_mask; uint8_t tcp_flags; uint16_t priority; uint16_t queue; }; /** * A structure used to define the input for IPV4 flow */ struct rte_eth_ipv4_flow { uint32_t src_ip; /**< IPv4 source address in big endian. */ uint32_t dst_ip; /**< IPv4 destination address in big endian. */ uint8_t tos; /**< Type of service to match. */ uint8_t ttl; /**< Time to live to match. */ uint8_t proto; /**< Protocol, next header in big endian. */ }; /** * A structure used to define the input for IPV4 UDP flow */ struct rte_eth_udpv4_flow { struct rte_eth_ipv4_flow ip; /**< IPv4 fields to match. */ uint16_t src_port; /**< UDP source port in big endian. */ uint16_t dst_port; /**< UDP destination port in big endian. */ }; /** * A structure used to define the input for IPV4 TCP flow */ struct rte_eth_tcpv4_flow { struct rte_eth_ipv4_flow ip; /**< IPv4 fields to match. */ uint16_t src_port; /**< TCP source port in big endian. */ uint16_t dst_port; /**< TCP destination port in big endian. */ }; /** * A structure used to define the input for IPV4 SCTP flow */ struct rte_eth_sctpv4_flow { struct rte_eth_ipv4_flow ip; /**< IPv4 fields to match. */ uint16_t src_port; /**< SCTP source port in big endian. */ uint16_t dst_port; /**< SCTP destination port in big endian. */ uint32_t verify_tag; /**< Verify tag in big endian */ }; /** * A structure used to define the input for IPV6 flow */ struct rte_eth_ipv6_flow { uint32_t src_ip[4]; /**< IPv6 source address in big endian. */ uint32_t dst_ip[4]; /**< IPv6 destination address in big endian. */ uint8_t tc; /**< Traffic class to match. */ uint8_t proto; /**< Protocol, next header to match. */ uint8_t hop_limits; /**< Hop limits to match. */ }; /** * A structure used to define the input for IPV6 UDP flow */ struct rte_eth_udpv6_flow { struct rte_eth_ipv6_flow ip; /**< IPv6 fields to match. */ uint16_t src_port; /**< UDP source port in big endian. */ uint16_t dst_port; /**< UDP destination port in big endian. */ }; /** * A structure used to define the input for IPV6 TCP flow */ struct rte_eth_tcpv6_flow { struct rte_eth_ipv6_flow ip; /**< IPv6 fields to match. */ uint16_t src_port; /**< TCP source port to in big endian. */ uint16_t dst_port; /**< TCP destination port in big endian. */ }; /** * A structure used to define the input for IPV6 SCTP flow */ struct rte_eth_sctpv6_flow { struct rte_eth_ipv6_flow ip; /**< IPv6 fields to match. */ uint16_t src_port; /**< SCTP source port in big endian. */ uint16_t dst_port; /**< SCTP destination port in big endian. */ uint32_t verify_tag; /**< Verify tag in big endian. */ }; /** * A structure used to define the input for MAC VLAN flow */ struct rte_eth_mac_vlan_flow { uint8_t mac_addr[6]; /**< Mac address to match. */ }; /** * Tunnel type for flow director. */ enum rte_eth_fdir_tunnel_type { RTE_FDIR_TUNNEL_TYPE_UNKNOWN = 0, RTE_FDIR_TUNNEL_TYPE_NVGRE, RTE_FDIR_TUNNEL_TYPE_VXLAN, }; /** * A structure used to define the input for tunnel flow, now it is VxLAN or * NVGRE */ struct rte_eth_tunnel_flow { enum rte_eth_fdir_tunnel_type tunnel_type; /**< Tunnel type to match. */ /** Tunnel ID to match. TNI, VNI... in big endian. */ uint32_t tunnel_id; uint8_t mac_addr[6]; /**< Mac address to match. */ }; /** * An union contains the inputs for all types of flow * Items in flows need to be in big endian */ union rte_eth_fdir_flow { struct rte_eth_l2_flow l2_flow; struct rte_eth_udpv4_flow udp4_flow; struct rte_eth_tcpv4_flow tcp4_flow; struct rte_eth_sctpv4_flow sctp4_flow; struct rte_eth_ipv4_flow ip4_flow; struct rte_eth_udpv6_flow udp6_flow; struct rte_eth_tcpv6_flow tcp6_flow; struct rte_eth_sctpv6_flow sctp6_flow; struct rte_eth_ipv6_flow ipv6_flow; struct rte_eth_mac_vlan_flow mac_vlan_flow; struct rte_eth_tunnel_flow tunnel_flow; }; /** * A structure used to contain extend input of flow */ struct rte_eth_fdir_flow_ext { uint16_t vlan_tci; uint8_t flexbytes[16]; /**< It is filled by the flexible payload to match. */ uint8_t is_vf; /**< 1 for VF, 0 for port dev */ uint16_t dst_id; /**< VF ID, available when is_vf is 1*/ }; struct rte_eth_fdir_input { uint16_t flow_type; union rte_eth_fdir_flow flow; /**< Flow fields to match, dependent on flow_type */ struct rte_eth_fdir_flow_ext flow_ext; /**< Additional fields to match */ }; /** * Behavior will be taken if FDIR match */ enum rte_eth_fdir_behavior { RTE_ETH_FDIR_ACCEPT = 0, RTE_ETH_FDIR_REJECT, RTE_ETH_FDIR_PASSTHRU, }; /** * Flow director report status * It defines what will be reported if FDIR entry is matched. */ enum rte_eth_fdir_status { RTE_ETH_FDIR_NO_REPORT_STATUS = 0, /**< Report nothing. */ RTE_ETH_FDIR_REPORT_ID, /**< Only report FD ID. */ RTE_ETH_FDIR_REPORT_ID_FLEX_4, /**< Report FD ID and 4 flex bytes. */ RTE_ETH_FDIR_REPORT_FLEX_8, /**< Report 8 flex bytes. */ }; struct rte_eth_fdir_action { uint16_t rx_queue; /**< Queue assigned to if FDIR match. */ enum rte_eth_fdir_behavior behavior; /**< Behavior will be taken */ enum rte_eth_fdir_status report_status; /**< Status report option */ uint8_t flex_off; /**< If report_status is RTE_ETH_FDIR_REPORT_ID_FLEX_4 or RTE_ETH_FDIR_REPORT_FLEX_8, flex_off specifies where the reported flex bytes start from in flexible payload. */ }; struct rte_eth_fdir_filter { uint32_t soft_id; /**< ID, an unique value is required when deal with FDIR entry */ struct rte_eth_fdir_input input; /**< Input set */ struct rte_eth_fdir_action action; /**< Action taken when match */ }; /** * A structure used to define the statistics of flow director. * It supports RTE_ETH_FILTER_FDIR with RTE_ETH_FILTER_STATS operation. */ struct rte_eth_fdir_stats { uint32_t collision; /**< Number of filters with collision. */ uint32_t free; /**< Number of free filters. */ uint32_t maxhash; /**< The lookup hash value of the added filter that updated the value of the MAXLEN field */ uint32_t maxlen; /**< Longest linked list of filters. */ uint64_t add; /**< Number of added filters. */ uint64_t remove; /**< Number of removed filters. */ uint64_t f_add; /**< Number of failed added filters. */ uint64_t f_remove; /**< Number of failed removed filters. */ uint32_t guarant_cnt; /**< Number of filters in guaranteed spaces. */ uint32_t best_cnt; /**< Number of filters in best effort spaces. */ }; enum rte_fdir_mode { RTE_FDIR_MODE_NONE = 0, /**< Disable FDIR support. */ RTE_FDIR_MODE_SIGNATURE, /**< Enable FDIR signature filter mode. */ RTE_FDIR_MODE_PERFECT, /**< Enable FDIR perfect filter mode. */ RTE_FDIR_MODE_PERFECT_MAC_VLAN, /**< Enable FDIR filter mode - MAC VLAN. */ RTE_FDIR_MODE_PERFECT_TUNNEL, /**< Enable FDIR filter mode - tunnel. */ }; /** * A structure used to configure FDIR masks that are used by the device * to match the various fields of RX packet headers. */ struct rte_eth_fdir_masks { uint16_t vlan_tci_mask; /**< Bit mask for vlan_tci in big endian */ /** Bit mask for ipv4 flow in big endian. */ struct rte_eth_ipv4_flow ipv4_mask; /** Bit maks for ipv6 flow in big endian. */ struct rte_eth_ipv6_flow ipv6_mask; /** Bit mask for L4 source port in big endian. */ uint16_t src_port_mask; /** Bit mask for L4 destination port in big endian. */ uint16_t dst_port_mask; /** 6 bit mask for proper 6 bytes of Mac address, bit 0 matches the first byte on the wire */ uint8_t mac_addr_byte_mask; /** Bit mask for tunnel ID in big endian. */ uint32_t tunnel_id_mask; uint8_t tunnel_type_mask; /**< 1 - Match tunnel type, 0 - Ignore tunnel type. */ }; /** * A structure used to select bytes extracted from the protocol layers to * flexible payload for filter */ struct rte_eth_flex_payload_cfg { enum rte_eth_payload_type type; /**< Payload type */ uint16_t src_offset[16]; /**< Offset in bytes from the beginning of packet's payload src_offset[i] indicates the flexbyte i's offset in original packet payload. This value should be less than flex_payload_limit in struct rte_eth_fdir_info.*/ }; struct rte_eth_fdir_flex_mask { uint16_t flow_type; uint8_t mask[16]; /**< Mask for the whole flexible payload */ }; struct rte_eth_fdir_flex_conf { uint16_t nb_payloads; /**< The number of following payload cfg */ uint16_t nb_flexmasks; /**< The number of following mask */ struct rte_eth_flex_payload_cfg flex_set[RTE_ETH_PAYLOAD_MAX]; /**< Flex payload configuration for each payload type */ struct rte_eth_fdir_flex_mask flex_mask[RTE_ETH_FLOW_MAX]; /**< Flex mask configuration for each flow type */ }; /** * A structure used to get the information of flow director filter. * It supports RTE_ETH_FILTER_FDIR with RTE_ETH_FILTER_INFO operation. * It includes the mode, flexible payload configuration information, * capabilities and supported flow types, flexible payload characters. * It can be gotten to help taking specific configurations per device. */ struct rte_eth_fdir_info { enum rte_fdir_mode mode; /**< Flow director mode */ struct rte_eth_fdir_masks mask; /** Flex payload configuration information */ struct rte_eth_fdir_flex_conf flex_conf; uint32_t guarant_spc; /**< Guaranteed spaces.*/ uint32_t best_spc; /**< Best effort spaces.*/ /** Bit mask for every supported flow type. */ uint32_t flow_types_mask[1]; uint32_t max_flexpayload; /**< Total flex payload in bytes. */ /** Flexible payload unit in bytes. Size and alignments of all flex payload segments should be multiplies of this value. */ uint32_t flex_payload_unit; /** Max number of flexible payload continuous segments. Each segment should be a multiple of flex_payload_unit.*/ uint32_t max_flex_payload_segment_num; /** Maximum src_offset in bytes allowed. It indicates that src_offset[i] in struct rte_eth_flex_payload_cfg should be less than this value. */ uint16_t flex_payload_limit; /** Flex bitmask unit in bytes. Size of flex bitmasks should be a multiply of this value. */ uint32_t flex_bitmask_unit; /** Max supported size of flex bitmasks in flex_bitmask_unit */ uint32_t max_flex_bitmask_num; }; int rte_eth_dev_filter_ctrl(uint8_t port_id, enum rte_filter_type filter_type, enum rte_filter_op filter_op, void * arg); void fdir_get_infos(uint32_t port_id); ]] local RTE_ETHTYPE_FLAGS_MAC = 1 local RTE_ETHTYPE_FLAGS_DROP = 2 local C = ffi.C function dev:l2Filter(etype, queue) if type(queue) == "table" then if queue.dev.id ~= self.id then log:fatal("Queue must belong to the device being configured") end queue = queue.qid end local flags = 0 if queue == self.DROP then flags = RTE_ETHTYPE_FLAGS_DROP end local filter = ffi.new("struct rte_eth_ethertype_filter", { ether_type = etype, flags = 0, queue = queue }) local ok = C.rte_eth_dev_filter_ctrl(self.id, C.RTE_ETH_FILTER_ETHERTYPE, C.RTE_ETH_FILTER_ADD, filter) if ok ~= 0 and ok ~= -38 then -- -38 means duplicate filter for some reason log:warn("l2 filter error: " .. strError(ok)) end end --- Filter PTP UDP timestamp packets by inspecting the PTP version and type field. --- Packets with PTP version 2 are matched with this filter. --- You can also use the UDP port to filter timestamped packets if you do not send other --- packets to this port. --- Caution: broken on i40e, see i40e-driver docs and timestamper for a work-around --- @param queue the queue to send packets to --- @param type the PTP type to look for, default = 0 --- @param ver the PTP version to look for, default = 2 function dev:filterUdpTimestamps(queue, ptpType, ver) if type(queue) == "table" then queue = queue.qid end if queue == 0 then return end ptpType = ptpType or 0 ver = ver or 2 local filter = ffi.new("struct rte_eth_fdir_filter", { soft_id = 1, input = { -- explicitly only matching UDP flows here would be better -- however, this is no longer possible with the dpdk 2.x filter api :( -- it can no longer match only the protocol type while ignoring port numbers... -- (and reconfiguring the filter for ports all the time is annoying) flow_type = dpdkc.RTE_ETH_FLOW_IPV4, flow = { }, flow_ext = { vlan_tci = 0, flexbytes = {ptpType, ver}, is_vf = 0, dst_id = 0, }, }, action = { rx_queue = queue }, }) local err = C.rte_eth_dev_filter_ctrl(self.id, C.RTE_ETH_FILTER_FDIR, C.RTE_ETH_FILTER_ADD, filter) checkDpdkError(err, "setting fdir filter") end --- Prints all fdir filter informations for debugging purposes. function dev:dumpFilters() C.fdir_get_infos(self.id) end --- Install a 5-tuple filter on the NIC. --- @param filter, a table containing the following fields --- all header fields default to 0 if not provided --- all masks to all bits set if a value is provided, to 0 otherwise --- srcIp, dstIp: IP addresses as strings --- srcIpMask, dstIpMask: IP address masks as strings --- srcPort, dstPort: L4 ports as numbers --- srcPortMask, dstPortMask: port masks --- proto: the L4 protocol id --- protoMask: protocol mask --- priority: the filter priority (see NIC specs for details), default = 1 --- @param queue the target queue (id or queue object) function dev:fiveTupleFilter(filter, queue) local filter = ffi.new("struct rte_eth_ntuple_filter", { flags = 31, -- five-tuple dst_ip = filter.dstIp and parseIPAddress(filter.dstIp) or 0, dst_ip_mask = filter.dstIpMask and parseIPAddress(filter.dstIpMask) or filter.dstIp and 0xFFFFFFFF or 0, src_ip = filter.srcIp and parseIPAddress(filter.srcIp) or 0, src_ip_mask = filter.srcIpMask and parseIPAddress(filter.srcIpMask) or filter.srcIp and 0xFFFFFFFF or 0, dst_port = filter.dstPort or 0, dst_port_mask = filter.dstPortMask or filter.dstPort and 0xFFFF or 0, src_port = filter.srcPort or 0, src_port_mask = filter.srcPortMask or filter.srcPort and 0xFFFF or 0, proto = filter.proto or 0, proto_mask = filter.protoMask or filter.proto and 0xFF or 0, priority = filter.priority or 1, queue = type(queue) == "number" and queue or queue.qid }) local err = C.rte_eth_dev_filter_ctrl(self.id, C.RTE_ETH_FILTER_NTUPLE, C.RTE_ETH_FILTER_ADD, filter) return checkDpdkError(err, "setting 5tuple filter") end
32.358925
121
0.719497
255f7f65edee479b3570aed337532caf830eec75
557
swift
Swift
Provenance/Sources/Nodes/SpinnerCellNode.swift
themuzzleflare/Provenance
f356e598107b3a5ac0beb890d5a5807bd84444be
[ "MIT" ]
null
null
null
Provenance/Sources/Nodes/SpinnerCellNode.swift
themuzzleflare/Provenance
f356e598107b3a5ac0beb890d5a5807bd84444be
[ "MIT" ]
null
null
null
Provenance/Sources/Nodes/SpinnerCellNode.swift
themuzzleflare/Provenance
f356e598107b3a5ac0beb890d5a5807bd84444be
[ "MIT" ]
null
null
null
import AsyncDisplayKit final class SpinnerCellNode: ASCellNode { private let activityIndicatorViewBlock: ASDisplayNodeViewBlock = { return UIActivityIndicatorView.mediumAnimating } init(_ sectionController: SpinnerSC? = nil) { super.init() sectionController?.spinnerDelegate = self setViewBlock(activityIndicatorViewBlock) } } // MARK: - SpinnerDelegate extension SpinnerCellNode: SpinnerDelegate { func startLoading() { guard isNodeLoaded else { return } (self.view as! UIActivityIndicatorView).startAnimating() } }
24.217391
68
0.759425
8cd4a6056a89e3605c3fb7c548cb03f30794e05c
663
sql
SQL
layered_gis/poi_leisure/swimming_pool.sql
zdenulo/bigquery-openstreetmap
2d30845513ac4fa36eec1537456c91a49164eaff
[ "BSD-3-Clause" ]
null
null
null
layered_gis/poi_leisure/swimming_pool.sql
zdenulo/bigquery-openstreetmap
2d30845513ac4fa36eec1537456c91a49164eaff
[ "BSD-3-Clause" ]
null
null
null
layered_gis/poi_leisure/swimming_pool.sql
zdenulo/bigquery-openstreetmap
2d30845513ac4fa36eec1537456c91a49164eaff
[ "BSD-3-Clause" ]
null
null
null
SELECT 2253 AS layer_code, 'poi_leisure' AS layer_class, 'swimming_pool' AS layer_name, feature_type AS gdal_type, osm_id, osm_way_id, osm_timestamp, all_tags, geometry FROM `openstreetmap-public-data-prod.osm_planet.features` WHERE EXISTS(SELECT 1 FROM UNNEST(all_tags) as tags WHERE tags.key = 'amenity' AND tags.value='swimming_pool') OR EXISTS(SELECT 1 FROM UNNEST(all_tags) as tags WHERE tags.key = 'leisure' AND tags.value='swimming_pool') OR EXISTS(SELECT 1 FROM UNNEST(all_tags) as tags WHERE tags.key = 'sport' AND tags.value='swimming') OR EXISTS(SELECT 1 FROM UNNEST(all_tags) as tags WHERE tags.key = 'leisure' AND tags.value='water_park')
82.875
163
0.773756
4922a730dc71cfd8af0ec0421b98b2b876d6dd48
3,166
lua
Lua
Core/AddonLib/Widget/WidgetConstants.lua
kapresoft/wow-addon-actionbar-plus
b621fba0841ae385edee280716a4563421b7665f
[ "MIT" ]
1
2022-01-03T01:48:31.000Z
2022-01-03T01:48:31.000Z
Core/AddonLib/Widget/WidgetConstants.lua
kapresoft/wowaddon-actionbar-plus
b621fba0841ae385edee280716a4563421b7665f
[ "MIT" ]
null
null
null
Core/AddonLib/Widget/WidgetConstants.lua
kapresoft/wowaddon-actionbar-plus
b621fba0841ae385edee280716a4563421b7665f
[ "MIT" ]
null
null
null
local ReloadUI = ReloadUI local LibStub, M, G = ABP_LibGlobals:LibPack() ---@type AceLibFactory local CC = ABP_CommonConstants local AceLibFactory = LibStub('AceLibFactory') local LibSharedMedia = AceLibFactory:GetAceSharedMedia() local LogFactory = LibStub(M.LogFactory) local l = LogFactory('WidgetConstants') -- ######################################################### ADDON_NAME = 'ActionbarPlus' SECURE_ACTION_BUTTON_TEMPLATE = 'SecureActionButtonTemplate' TOPLEFT = 'TOPLEFT' BOTTOMLEFT = 'BOTTOMLEFT' ANCHOR_TOPLEFT = 'ANCHOR_TOPLEFT' CONFIRM_RELOAD_UI = 'CONFIRM_RELOAD_UI' TEXTURE_EMPTY = LibSharedMedia:Fetch(LibSharedMedia.MediaType.BACKGROUND, "Blizzard Dialog Background") TEXTURE_HIGHLIGHT = LibSharedMedia:Fetch(LibSharedMedia.MediaType.BACKGROUND, "Blizzard Dialog Background Gold") TEXTURE_HIGHLIGHT2 = [[Interface\Buttons\WHITE8X8]] TEXTURE_HIGHLIGHT3 = [[Interface\Buttons\ButtonHilight-Square]] TEXTURE_HIGHLIGHT4 = [[Interface\QuestFrame\UI-QuestTitleHighlight]] TEXTURE_CASTING = LibSharedMedia:Fetch(LibSharedMedia.MediaType.BACKGROUND, "Blizzard Rock") ACTIONBAR_UPDATE_USABLE = 'ACTIONBAR_UPDATE_USABLE' ACTIONBAR_UPDATE_STATE = 'ACTIONBAR_UPDATE_STATE' BAG_UPDATE_DELAYED = 'BAG_UPDATE_DELAYED' UNIT_SPELLCAST_START = 'UNIT_SPELLCAST_START' UNIT_SPELLCAST_STOP = 'UNIT_SPELLCAST_STOP' UNIT_SPELLCAST_SUCCEEDED = 'UNIT_SPELLCAST_SUCCEEDED' PLAYER_CONTROL_LOST = 'PLAYER_CONTROL_LOST' PLAYER_CONTROL_GAINED = 'PLAYER_CONTROL_GAINED' HIGHLIGHT_DRAW_LAYER = 'HIGHLIGHT' ARTWORK_DRAW_LAYER = 'ARTWORK' ---@class WidgetConstants local _L = {} ---@type WidgetConstants ABP_WidgetConstants = _L StaticPopupDialogs[CONFIRM_RELOAD_UI] = { text = "Reload UI?", button1 = "Yes", button2 = "No", timeout = 0, whileDead = true, hideOnEscape = true, OnAccept = function() ReloadUI() end, preferredIndex = 3, -- avoid some UI taint, see http://www.wowace.com/announcements/how-to-avoid-some-ui-taint/ } --_G[TEXTURE_DIALOG_GLOBAL_FRAME_NAME] = frame.frame --table.insert(UISpecialFrames, TEXTURE_DIALOG_GLOBAL_FRAME_NAME) function ConfigureFrameToCloseOnEscapeKey(frameName, frameInstance) local frame = frameInstance if frameInstance.frame then frame = frameInstance.frame end setglobal(frameName, frame) table.insert(UISpecialFrames, frameName) end function ShowReloadUIConfirmation() StaticPopup_Show(CONFIRM_RELOAD_UI) end --- ### Example ---``` ---local LibStub, M, A, P, LSM, W, CC, G = ABP_WidgetConstants:LibPack() ---``` ---@return LocalLibStub, Module, Assert, Profile, LibSharedMedia, WidgetLibFactory, CommonConstants, LibGlobals function _L:LibPack() local WidgetLibFactory, Assert, Profile = G:Get(M.WidgetLibFactory, M.Assert, M.Profile) return LibStub, M, Assert, Profile, LibSharedMedia, WidgetLibFactory, ABP_CommonConstants, G end ---@return string, string TEXTURE_EMPTY and TEXTURE_HIGHLIGHT function _L:GetButtonTextures() return TEXTURE_EMPTY, TEXTURE_HIGHLIGHT, TEXTURE_CASTING end ---@return WidgetLibFactory function _L:LibPack_WidgetFactory() return LibStub(M.WidgetLibFactory) end ---@return ButtonUILib function _L:LibPack_ButtonUI() return LibStub(M.ButtonUI) end
38.144578
116
0.781744
b6e362ab9d67e9552e6620a30febd031e8214857
2,740
rb
Ruby
test/db/oracle/table_name_test.rb
headius/activerecord-jdbc-adapter
e9366a5a25dc919e7fe7d6319410aec2e9532edb
[ "BSD-2-Clause" ]
null
null
null
test/db/oracle/table_name_test.rb
headius/activerecord-jdbc-adapter
e9366a5a25dc919e7fe7d6319410aec2e9532edb
[ "BSD-2-Clause" ]
1
2020-11-09T20:07:29.000Z
2020-11-09T20:07:29.000Z
test/db/oracle/table_name_test.rb
headius/activerecord-jdbc-adapter
e9366a5a25dc919e7fe7d6319410aec2e9532edb
[ "BSD-2-Clause" ]
null
null
null
require 'jdbc_common' require 'db/oracle' class OracleTableNameTest < Test::Unit::TestCase def self.startup SerialNumberMigration.up SerialMigration.up end def self.shutdown SerialNumberMigration.down SerialMigration.down end class SerialNumberMigration < ActiveRecord::Migration def self.up columns = [ "serial NUMBER(20) PRIMARY KEY", "serial_patch NUMBER(10)", "updated_at TIMESTAMP", ] execute %Q{CREATE TABLE serial_numbers (\n #{columns.join(",\n")} \n)} end def self.down execute "DROP TABLE serial_numbers" end end class SerialNumber < ActiveRecord::Base; end test 'serial_number' do sn = SerialNumber.new; sn.serial = 1234567890; sn.serial_patch = 11 sn.save! assert sn.reload SerialNumber.columns end if ar_version('3.1') class SerialMigration < ActiveRecord::Migration def self.up columns = [ "sid VARCHAR2(32)", "value NUMBER(20)", "created_at TIMESTAMP", ] execute %Q{CREATE TABLE serials (\n #{columns.join(",\n")} \n)} execute %Q{ CREATE OR REPLACE TRIGGER serials_after_insert BEFORE INSERT ON serials FOR EACH ROW DECLARE BEGIN IF( :new.sid IS NULL ) THEN :new.sid := sys_guid(); END IF; END; } execute %Q{CREATE VIEW serials_view AS SELECT sid, value FROM serials} end def self.down execute %Q{ DECLARE e EXCEPTION; PRAGMA exception_init(e,-4080); BEGIN execute immediate 'DROP TRIGGER serials_after_insert'; EXCEPTION WHEN e THEN null; END; } execute("DROP VIEW serials_view") rescue nil execute "DROP TABLE serials" end end class SerialWithTrigger < ActiveRecord::Base; self.table_name = 'serials' self.primary_key = :sid end class SerialView < ActiveRecord::Base; self.table_name = 'serials_view' self.primary_key = :value end test 'serial with trigger' do st = SerialWithTrigger.create! :value => 1234567890 # puts st.inspect if ActiveRecord::Base.connection.use_insert_returning? assert_not_nil st.sid assert_instance_of String, st.sid st.reload assert_not_nil st.sid else st = SerialWithTrigger.where(:value => 1234567890).first assert_not_nil st.sid assert_instance_of String, st.sid end sv = SerialView.new; sv.value = 42424242; sv.save! if ActiveRecord::Base.connection.use_insert_returning? sv.reload else assert sv = SerialView.where(:value => 42424242).first end end if ar_version('3.1') end
23.826087
76
0.632482
0898a4b356d158640188f815de86b4459c841d8e
74
sh
Shell
scripts/codecov.sh
onufrienkovi/django-core-helpers
fa645c75c85b2e5f6522c9e34de30ad6e3b4f265
[ "MIT" ]
2
2021-05-26T02:33:30.000Z
2021-06-09T01:37:57.000Z
scripts/codecov.sh
onufrienkovi/django-core-helpers
fa645c75c85b2e5f6522c9e34de30ad6e3b4f265
[ "MIT" ]
3
2021-03-30T14:15:33.000Z
2021-09-22T19:22:48.000Z
scripts/codecov.sh
onufrienkovi/django-core-helpers
fa645c75c85b2e5f6522c9e34de30ad6e3b4f265
[ "MIT" ]
null
null
null
#!/usr/bin/env bash set -e bash <(curl -s https://codecov.io/bash) ${@}
12.333333
44
0.594595
c3fa30dad3b1950fbf62910408b470c273a9d0b8
377
rb
Ruby
attributes/default.rb
prometheanfire/cookbook-statsd
0365614c28be833b6c7e05c99eea2600b77ac50f
[ "Apache-2.0" ]
1
2016-05-17T13:35:19.000Z
2016-05-17T13:35:19.000Z
attributes/default.rb
prometheanfire/cookbook-statsd
0365614c28be833b6c7e05c99eea2600b77ac50f
[ "Apache-2.0" ]
null
null
null
attributes/default.rb
prometheanfire/cookbook-statsd
0365614c28be833b6c7e05c99eea2600b77ac50f
[ "Apache-2.0" ]
null
null
null
default['statsd']['graphitePort'] = '2003' default['statsd']['graphiteHost'] = '127.0.0.1' default['statsd']['debug'] = false default['statsd']['address'] = '0.0.0.0' default['statsd']['port'] = 8125 default['statsd']['mgmt_port'] = 8126 default['statsd']['title'] = 'statsd' default['statsd']['flushInterval'] = 60000 default['statsd']['backends'] = [ "./backends/graphite" ]
37.7
57
0.65252
fef7c9f232ab4d566a37f8d98b8fbf4671e46c03
4,956
lua
Lua
apps/loginMaster/actions/UserAction.lua
LuaGameServer/ORGS
5d37e7da1e92ee3d8457e2ff94b58789677333e1
[ "MIT" ]
null
null
null
apps/loginMaster/actions/UserAction.lua
LuaGameServer/ORGS
5d37e7da1e92ee3d8457e2ff94b58789677333e1
[ "MIT" ]
null
null
null
apps/loginMaster/actions/UserAction.lua
LuaGameServer/ORGS
5d37e7da1e92ee3d8457e2ff94b58789677333e1
[ "MIT" ]
1
2018-12-26T02:51:35.000Z
2018-12-26T02:51:35.000Z
--[[ Copyright (c) 2015 gameboxcloud.com Permission is hereby granted, free of chargse, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ]] local gbc = cc.import("#gbc") local UserAction = cc.class("UserAction", gbc.ActionBase) local Session = cc.import("#session") local AccountManager = cc.import("#AccountManager", ...) local ServiceManager = cc.import("#ServiceManager", ...) local resty_md5 = require("resty.md5") local str = require ("resty.string") local _opensession = function(redis, args) local sid = args.sid if not sid then cc.printf("not set argsument: \"sid\"") end local session = Session:new(redis) if not session:start(sid) then --cc.printf("session is expired, or invalid session id") return nil end return session end --登录 function UserAction:signinAction(args, redis) local username = args.username local password = args.password local platform = args.platform or 0 local logintime = args.logintime if not username then --cc.throw("not set argsument: \"username\"") return "no username" end if not password then --cc.throw("not set argsument: \"password\"") return "no password" end local user = AccountManager.Get(username, platform) if not user then local db = self:getInstance():getMysql() user = AccountManager.Load(db, username, platform) end if not user then --cc.throw("not user") return "no account" end if logintime then logintime = tonumber(logintime) local timegap = math.abs(logintime - ngx.now()) --cc.printf(timegap) if timegap > 600 then return "logintime is not correct" end local checkKey = logintime.."-"..user.password local md5 = resty_md5:new() md5:update(checkKey) local md5key = str.to_hex(md5:final()) if string.lower(password) ~= string.lower(md5key) then return "password is not correct" end else if password ~= user.password then return "password is not correct" end end local session = Session:new(redis) session:start() session:set("username", user.username) session:set("platform", user.platform) session:save() -- return result return {sid = session:getSid(), server = ServiceManager.Get("gameServer")} end --注册 function UserAction:signupAction(args, redis) local username = args.username local password = args.password local platform = args.platform or 0 if not username or #username < 5 then cc.throw("not set argsument: \"username\"") end if not password or #password < 5 then cc.throw("not set argsument: \"password\"") end local db = self:getInstance():getMysql() local user = AccountManager.Register(db, { username = username, password = password, platform = platform, createtime = ngx.now(), }) if not user then cc.throw("create account failded") end local session = Session:new(redis) session:start() session:set("username", user.username) session:set("platform", user.platform) session:save() return {sid = session:getSid(), server = ServiceManager.Get("gameServer")} end function UserAction:verifyAction(args, redis) local sid = args.sid local authorization = args.authorization if not sid then cc.throw("not set argsument: \"sid\"") end if not self:hasAuthority(authorization) then cc.throw("not Authority") end local session = _opensession(redis, args) if session then local username = session:get("username") local platform = session:get("platform") local user = AccountManager.Get(username, platform) return user end return nil end -- function UserAction:testAction() -- return dbConfig.get("cfg_bind", 10010) -- end return UserAction
31.169811
78
0.668684
a3b0690ccafd057c6c6dcf3cde48b3d65fcb884c
21,909
swift
Swift
Saving-our-Planet.playgroundbook/Contents/Sources/WorldScene.swift
Vyax/WWDC-2019-Saving-our-Planet
587a4c0bc86b4d31d0d0516a4c03cb4d93ffb60a
[ "MIT" ]
16
2019-05-02T16:05:38.000Z
2019-05-10T23:38:43.000Z
Saving-our-Planet.playgroundbook/Contents/Sources/WorldScene.swift
Vyax/WWDC-2019-Saving-our-Planet
587a4c0bc86b4d31d0d0516a4c03cb4d93ffb60a
[ "MIT" ]
null
null
null
Saving-our-Planet.playgroundbook/Contents/Sources/WorldScene.swift
Vyax/WWDC-2019-Saving-our-Planet
587a4c0bc86b4d31d0d0516a4c03cb4d93ffb60a
[ "MIT" ]
null
null
null
import SceneKit import UIKit final class WorldScene : SCNScene { let worldMapNode = SCNNode() let tappableItemsNode = SCNNode() private var waterColor = #colorLiteral(red: 0.2732537091, green: 0.613705039, blue: 0.6768248677, alpha: 1) private let game: Bool private var airTraffic = 0, shipTraffic = 0, cloudTraffic = 0, birdTraffic: Float = 1 private let options: [String: Any] private var pollution, pollutionBefore: Int private let treeLine: CGFloat = 360 private let mountainElevation: CGFloat = 4 private let cityHeight: CGFloat = -12 private let birdHeight: Float = -26 private let airplaneStartHeight: CGFloat = -20 private let airplaneHeight: CGFloat = -48 private let cloudsHeight: CGFloat = -62 private let airplaneSpeed: Double = 80 private let shipSpeed: Double = 20 private var cityNodes = [CityNode]() private var activeFlights = Set<CityPair>() private var activeCruises = Set<CityPair>() private var treeNodes = Set<Tree>() private var windTurbineNodes = [WindTurbine]() private var madagascarTree: Tree? private var won = false private var trashCollected = 0, windTurbines = 0 private var ticks = 0, nextAirplane = 0, nextShip = 0, nextCloud = 0, nextTrash = 0, nextFireworks = -1 private var tickTimer: Timer! init(options: [String: Any]) { self.options = options if let game = options["game"] as? Bool { self.game = game } else { game = false } if let waterColor = options["waterColor"] as? UIColor { self.waterColor = waterColor } if let pollution = options["pollution"] as? Int { self.pollution = pollution.clamped(min: 1, max: 100) } else { pollution = game ? 50 : 0 } pollutionBefore = pollution if let airTraffic = options["airTraffic"] as? String { if airTraffic == "low" { self.airTraffic += 1 } else if airTraffic == "high" { self.airTraffic -= 1 } } if let shipTraffic = options["shipTraffic"] as? String { if shipTraffic == "low" { self.shipTraffic += 2 } else if shipTraffic == "high" { self.shipTraffic -= 2 } } if let cloudTraffic = options["clouds"] as? String { if cloudTraffic == "low" { self.cloudTraffic += 2 } else if cloudTraffic == "high" { self.cloudTraffic -= 2 } } if let birdTraffic = options["birds"] as? String { if birdTraffic == "low" { self.birdTraffic = 0.75 } else if birdTraffic == "high" { self.birdTraffic = 1.75 } } super.init() let water = SCNNode(geometry: SCNPlane(width: 1000 * 2, height: 600 * 2, color: waterColor)) water.position = SCNVector3(x: 0, y: 0, z: 0) rootNode.addChildNode(water) let camera = SCNCamera() camera.zFar = 1000 camera.focalLength = 25 let cameraNode = SCNNode() cameraNode.position = SCNVector3(0, -270, 650) cameraNode.camera = camera cameraNode.look(at: SCNVector3(0, -15, 0)) rootNode.addChildNode(cameraNode) worldMapNode.pivot = SCNMatrix4MakeTranslation(500, 300, 0) worldMapNode.rotation = SCNVector4(1, 0, 0, CGFloat.pi) worldMapNode.addChildNode(tappableItemsNode) setupLight() if options["empty"] == nil { Continent.allCases.forEach {setupContinent($0)} if options["hideGreenland"] == nil { setupIce() } setupMountains() setupCities() setupTimer() if let windTurbines = options["windTurbines"] as? Int { let number = windTurbines.clamped(min: 0, max: 10) if number > 0 { createWindTurbine(on: .eurasia) } if number > 1 { createWindTurbine(on: .america) } if number > 2 { createWindTurbine(on: .africa) } if number > 3 { createWindTurbine(on: .australia) } if number > 4 { createWindTurbine(on: .eurasia) } if number > 5 { createWindTurbine(on: .america) } if number > 6 { createWindTurbine(on: .africa) } if number > 7 { createWindTurbine(on: .australia) } if number > 8 { createWindTurbine(on: .eurasia) } if number > 9 { createWindTurbine(on: .america) } } } rootNode.addChildNode(worldMapNode) } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } private func setupLight() { let ambientLight = SCNLight() ambientLight.type = .ambient ambientLight.intensity = 80 worldMapNode.light = ambientLight let light = SCNLight() light.type = .spot light.spotInnerAngle = 30 light.spotOuterAngle = 130 light.castsShadow = true light.shadowMode = .forward light.shadowSampleCount = 8 light.shadowMapSize = CGSize(width: 2048, height: 2048) light.zFar = 1000 let sun = SCNNode() sun.position = SCNVector3(320, 200, 600) sun.light = light sun.constraints = [SCNLookAtConstraint(target: worldMapNode)] rootNode.addChildNode(sun) } private func setupContinent(_ continent: Continent) { if (continent == .greenland && options["hideGreenland"] != nil) || (continent == .madagascar && options["hideMadagascar"] != nil) { return } createFlatNode(path: continent.path, depth: 6, chamferRadius: 0, color: continent.groundColor, position: SCNVector3(0, 0, -3)) createFlatNode(path: continent.path, depth: 6, chamferRadius: 2, color: continent.surfaceColor, position: SCNVector3(0, 0, -9)) for _ in 0..<continent.trees * (100 - pollution) / 100 { createTree(on: continent) } if continent == .madagascar { madagascarTree = createTree(on: .madagascar, persistent: true) } } @discardableResult private func createTree(on continent: Continent, persistent: Bool = false) -> Tree{ var position: CGPoint! repeat { position = continent.path.randomPoint(inset: 10) } while continent.cities.contains(where: {$0.path.contains(position)}) || windTurbineNodes.contains(where: {$0.point.distance(to: position) < 10}) let treeKind: Tree.TreeKind let mountains: [UIBezierPath] if continent == .australia { treeKind = .leaf mountains = MapPaths.australiaMountains } else { treeKind = continent.path.bounds.minY + position.y < treeLine ? .pine : .palm mountains = continent == .africa ? MapPaths.africaMountains : MapPaths.greenMountains } let adjustment: CGFloat = mountains.contains(where: {$0.contains(position)}) ? -mountainElevation : 0 let nodePosition = SCNVector3(position.x, position.y, cityHeight + adjustment) let tree = Tree(kind: treeKind, position: nodePosition) if !persistent { treeNodes.insert(tree) } worldMapNode.addChildNode(tree) return tree } private func setupIce() { for path in MapPaths.ice { createFlatNode(path: path, depth: 8, chamferRadius: 4, color: #colorLiteral(red: 0.9962759614, green: 0.9800544381, blue: 0.9929981828, alpha: 1), position: SCNVector3(0, 0, cityHeight - 4)) } } private func setupMountains() { let position = SCNVector3(0, 0, cityHeight - 2) for path in MapPaths.greenMountains { createFlatNode(path: path, depth: mountainElevation, chamferRadius: 2, color: Continent.eurasia.surfaceColor, position: position) } for path in MapPaths.africaMountains { createFlatNode(path: path, depth: mountainElevation, chamferRadius: 2, color: Continent.africa.surfaceColor, position: position) } for path in MapPaths.australiaMountains { createFlatNode(path: path, depth: mountainElevation, chamferRadius: 2, color: Continent.australia.surfaceColor, position: position) } } private func createFlatNode(path: UIBezierPath, depth: CGFloat, chamferRadius: CGFloat, color: UIColor, position: SCNVector3) { let geometry = SCNShape(path: path, extrusionDepth: depth) if chamferRadius > 0 { geometry.chamferMode = .back geometry.chamferRadius = chamferRadius geometry.chamferProfile = UIBezierPath(from: CGPoint(x: 0, y: 1), to: CGPoint(x: 1, y: 0)) } geometry.materials = [SCNMaterial(color: color)] let node = SCNNode(geometry: geometry) node.position = position worldMapNode.addChildNode(node) } private func setupCities() { for city in City.allCases { let cityNode = CityNode(path: city.path, positionZ: cityHeight) worldMapNode.addChildNode(cityNode) cityNodes.append(cityNode) } } private func setupTimer() { startAirplane() startShip() for _ in 1...4 { startCloud(skipFadeIn: true) } if !game { if options["windTurbines"] == nil { createWindTurbine(on: .america) createWindTurbine(on: .america) createWindTurbine(on: .eurasia) createWindTurbine(on: .eurasia) createWindTurbine(on: .africa) createWindTurbine(on: .australia) } } else if pollution > 0 { for _ in 1..<pollution + 10 { placeTrash(skipFadeIn: true) } } for _ in 1 ... (100 - pollution) / 6 { startBird() } tickTimer = Timer.scheduledTimer(withTimeInterval: 1, repeats: true, block: { _ in self.tick() }) } private func tick() { print(pollution) if ticks == nextAirplane { startAirplane() nextAirplane = ticks + airTraffic + Int.random(in: 2...3) } if ticks == nextShip { startShip() nextShip = ticks + shipTraffic + Int.random(in: 4...7) } if ticks == nextCloud { startCloud(skipFadeIn: false) nextCloud = ticks + cloudTraffic + Int.random(in: 5...6) } if pollution < 100 && Float.random(in: 0..<1) * birdTraffic < (100 - Float(pollution)) / 100 { startBird() } print("won \(won) poll \(pollution) turb \(windTurbines)") if won { if ticks == nextFireworks { cityNodes.forEach {$0.launchFireworks()} nextFireworks = ticks + 7 } } else if game { if ticks == nextTrash { pollution += 1 placeTrash(skipFadeIn: false) if windTurbines >= 5 { nextTrash = ticks + 1 } else { nextTrash = ticks + 1 + (Int.random(in: 1 ... 5 - windTurbines) == 1 ? 1 : 0) } } if windTurbines >= 5 && pollution < 20 - windTurbines { victory() } } let difference = (pollution.clamped(min: 0, max: 100) - pollutionBefore.clamped(min: 0, max: 100)) * 2 if difference < 0 { for _ in 1 ... -difference { createTreeAtRandomLocation() } } else if difference > 0 { for _ in 1...difference { removeRandomTree() } } if options["hideMadagascar"] == nil { handleMadagascarTree() } pollutionBefore = pollution ticks += 1 } private func startAirplane() { var city, otherCity: City! var cityPair: CityPair! var tries = 0 repeat { tries += 1 if tries == 100 { return } city = City.randomCity() otherCity = city.randomOtherCity() cityPair = CityPair(first: city, second: otherCity) } while activeFlights.contains {$0 == cityPair || $0 == CityPair(first: otherCity, second: city)} activeFlights.insert(cityPair) let origin = city.path.center let destination = otherCity.path.center let duration = Double(origin.distance(to: destination)) / airplaneSpeed let airplane = Airplane(position: SCNVector3(origin.x, origin.y, airplaneStartHeight)) worldMapNode.addChildNode(airplane) airplane.rotation = SCNVector4(0, 0, 1, origin.angle(to: destination)) airplane.startRoute(travelAction: .sequence([ .move(to: SCNVector3(origin.x + (destination.x - origin.x) * 0.25, origin.y + (destination.y - origin.y) * 0.25, airplaneHeight), duration: duration * 0.25), .move(to: SCNVector3(origin.x + (destination.x - origin.x) * 0.75, origin.y + (destination.y - origin.y) * 0.75, airplaneHeight), duration: duration * 0.5), .move(to: SCNVector3(destination.x, destination.y, airplaneStartHeight), duration: duration * 0.25) ])) delay(duration) { self.activeFlights.remove(cityPair) } } private func startShip() { var city: City! var waterRoute: WaterRoute! var cityPair: CityPair! var tries = 0 repeat { tries += 1 if tries == 100 { return } city = City.randomCoastalCity() waterRoute = city.waterRoutes.randomElement()! cityPair = CityPair(first: city, second: waterRoute.destination) } while activeCruises.contains {$0 == cityPair || $0 == CityPair(first: waterRoute.destination, second: city)} activeCruises.insert(cityPair) let ship = Ship() worldMapNode.addChildNode(ship) let travelAction = SCNAction.moveAlong(path: waterRoute.path, z: -2, speed: shipSpeed) let accident = game && !won && Int.random(in: 1...20) == 1 if accident { pollution += 5 tappableItemsNode.addChildNode(ship.getOilSpill) } ship.startRoute(travelAction: travelAction, accident: accident) delay(travelAction.duration) { self.activeCruises.remove(cityPair) } } private func startCloud(skipFadeIn: Bool) { let origin = CGPoint(x: CGFloat.random(in: 0...1000), y: CGFloat.random(in: 80...520)) let cloud = Cloud(position: SCNVector3(origin.x, origin.y, cloudsHeight), pollution: pollution) let destinationX = origin.x + (Bool.random() || origin.x > 750 ? CGFloat.random(in: -600 ... -200) : CGFloat.random(in: 200...600)) let destinationY = origin.y + CGFloat.random(in: 0...100) cloud.run(to: SCNVector3(destinationX, destinationY, cloudsHeight), duration: TimeInterval.random(in: 30...40), skipFadeIn: skipFadeIn) worldMapNode.addChildNode(cloud) } private func placeTrash(skipFadeIn: Bool) { let position = CGPoint(x: CGFloat.random(in: 100...895), y: CGFloat.random(in: 70...520)) let onLand = MapPaths.continents.contains {$0.contains(position)} let trash: Trash if onLand { let height = cityHeight + (MapPaths.mountains.contains(where: {$0.contains(position)}) ? -mountainElevation : 0) trash = WastePile(position: SCNVector3(position.x, position.y, height)) } else { trash = Bottle(position: SCNVector3(position.x, position.y, 0)) } tappableItemsNode.addChildNode(trash) if !skipFadeIn { trash.opacity = 0 trash.scale = SCNVector3(0, 0, 0) trash.runAction(.group([.fadeIn(duration: 1), .scale(to: 1, duration: 1)])) } } private func createTreeAtRandomLocation() { var x = Int.random(in: 1...Continent.treeCount) for continent in Continent.treeContinents { if x < continent.trees { let tree = createTree(on: continent) tree.opacity = 0 tree.scale = SCNVector3(0, 0, 0) tree.appear() break } x -= continent.trees } } private func startBird() { let bird = Bird(position: SCNVector3(CGFloat.random(in: 100...900), CGFloat.random(in: 100...500), cityHeight - 5), flyHeight: birdHeight) bird.opacity = 0 bird.scale = SCNVector3(0.5, 0.5, 0.5) tappableItemsNode.addChildNode(bird) bird.startFlying() } private func removeRandomTree() { if let tree = treeNodes.randomElement() { treeNodes.remove(tree) tree.fadeOutShrinkAndRemove(duration: 1) } } func handleTap(on nodes: [SCNNode]) { for node in nodes { if let trash = node as? Trash { pollution -= 1 trashCollected += 1 if trashCollected % 25 == 0 { createWindTurbine(on: nil) } trash.fadeOutShrinkAndRemove(duration: 0.25) break } else if let bird = node as? Bird { pollution += 1 bird.fadeOutShrinkAndRemove(duration: 0.25) placeTrash(skipFadeIn: false) } else if let windTurbine = node as? WindTurbine, !windTurbine.built { windTurbines += 1 windTurbine.build() break } } } private func createWindTurbine(on continent: Continent?) { var position: CGPoint! repeat { if let continent = continent { position = continent.path.randomPoint(inset: 7) } else { position = CGPoint(x: CGFloat.random(in: 0...1000), y: CGFloat.random(in: 0...600)) } } while !Continent.treeContinents.contains(where: {$0.path.contains(position)}) || windTurbineNodes.contains(where: {$0.point.distance(to: position) < 50}) || City.allCases.contains(where: {$0.path.center.distance(to: position) < 30}) || treeNodes.contains(where: {$0.point.distance(to: position) < 10}) let windTurbine = WindTurbine(position: SCNVector3(position.x, position.y, cityHeight)) if continent == nil { tappableItemsNode.addChildNode(windTurbine) } else { worldMapNode.addChildNode(windTurbine) windTurbine.build() } windTurbineNodes.append(windTurbine) if game && windTurbines >= 5 && pollution < 20 - windTurbines { victory() } } private func handleMadagascarTree() { if pollution >= 100, let madagascarTree = madagascarTree { madagascarTree.fadeOutShrinkAndRemove(duration: 1) self.madagascarTree = nil } else if pollution < 100, madagascarTree == nil { madagascarTree = createTree(on: .madagascar, persistent: true) madagascarTree!.opacity = 0 madagascarTree!.scale = SCNVector3(0, 0, 0) madagascarTree!.appear() } } private func victory() { if !won { won = true cityNodes.forEach {$0.launchFireworks()} nextFireworks = ticks + 7 startVictoryAirplane() } } private func startVictoryAirplane() { let text = SCNText(string: "Congratulations, you saved the planet!", extrusionDepth: 1/3) text.materials = [SCNMaterial(color: .black)] let textNode = SCNNode(geometry: text) textNode.position = SCNVector3(10, 2, 0.1) textNode.scale = SCNVector3(2.8, 2.8, 2.8) let bannerPath = UIBezierPath() bannerPath.move(to: .zero) bannerPath.addLine(to: CGPoint(x: 650, y: 0)) bannerPath.addLine(to: CGPoint(x: 630, y: 20)) bannerPath.addLine(to: CGPoint(x: 650, y: 40)) bannerPath.addLine(to: CGPoint(x: 0, y: 40)) bannerPath.close() let banner = SCNNode(geometry: SCNShape(path: bannerPath, extrusionDepth: 1, color: Continent.north.surfaceColor)) banner.position = SCNVector3(1200, 300, -100) banner.rotation = SCNVector4(1, 0, 0, Float.pi) banner.addChildNode(textNode) let rope = SCNNode(geometry: SCNBox(width: 20, height: 1, length: 1, color: .black)) rope.position = SCNVector3(-10, 20, 0) banner.addChildNode(rope) let airplane = Airplane(position: SCNVector3(50, -20, 0)) airplane.scale = SCNVector3(3, 3, 3) airplane.rotation = SCNVector4(1, 0, 0, Float.pi) let intermediate = SCNNode() intermediate.rotation = SCNVector4(0, 0, 1, Float.pi) intermediate.addChildNode(airplane) banner.addChildNode(intermediate) worldMapNode.addChildNode(banner) banner.runAction(.sequence([.moveBy(x: -2500, y: 0, z: 0, duration: 25), .removeFromParentNode()])) } }
38.708481
202
0.565977
5f7af835a1511b5b41d9e86a489b8e8baa582e1c
309
kt
Kotlin
app/src/main/java/com/strings/attached/musiclibrary/api/album/AlbumDetailResponse.kt
shubham08gupta/MusicLibrary
352de11b1d6fe623885e451b11322e9f14b4cbac
[ "MIT" ]
null
null
null
app/src/main/java/com/strings/attached/musiclibrary/api/album/AlbumDetailResponse.kt
shubham08gupta/MusicLibrary
352de11b1d6fe623885e451b11322e9f14b4cbac
[ "MIT" ]
null
null
null
app/src/main/java/com/strings/attached/musiclibrary/api/album/AlbumDetailResponse.kt
shubham08gupta/MusicLibrary
352de11b1d6fe623885e451b11322e9f14b4cbac
[ "MIT" ]
null
null
null
package com.strings.attached.musiclibrary.api.album import com.strings.attached.musiclibrary.model.album.AlbumDetail import kotlinx.serialization.Serializable @Serializable data class AlbumDetailResponse( val album: AlbumDetail? = null, val error: String? = null, val message: String? = null, )
25.75
64
0.779935
12511ee90c42bc59c10f621894b377b92e33063d
1,804
cs
C#
WhenWeGetMoney/Controllers/TestController.cs
lynnsamuelson/WhenWeGetMoney
bb4c361a8ac9479f381812fe3939102dee12f43a
[ "MIT" ]
null
null
null
WhenWeGetMoney/Controllers/TestController.cs
lynnsamuelson/WhenWeGetMoney
bb4c361a8ac9479f381812fe3939102dee12f43a
[ "MIT" ]
null
null
null
WhenWeGetMoney/Controllers/TestController.cs
lynnsamuelson/WhenWeGetMoney
bb4c361a8ac9479f381812fe3939102dee12f43a
[ "MIT" ]
null
null
null
using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Http; using System.Web.Http; using WhenWeGetMoney.Models; namespace WhenWeGetMoney.Controllers { public class TestController : ApiController { public WhenWeGetMoneyRepository Repo { get; set; } public TestController() : base() { Repo = new WhenWeGetMoneyRepository(); } public TestController(WhenWeGetMoneyRepository _repo) { Repo = _repo; } //GET: api/Test public string Get() { //return "Monkey Rock!"; //List<Wish> listOfWishes = Repo.GetAllWishes(); //return listOfWishes[1].Content; List<Wish> listOfWishes = Repo.GetAllWishes(); var json = JsonConvert.SerializeObject(listOfWishes); return json; } //public List<Wish> Get() //{ // // return List<Wish> listOfWishes = Repo.GetAllWishes().ToList(); // return Repo.GetAllWishes().ToList(); // //return listOfWishes[0].Content; //} //public IEnumerable<string> Get() //{ // return new string[] { "value1", "value2" }; //}*/ //public string Get() //{ // //return "Monkey Rock!"; //} // GET: api/Test/5 public string Get(int id) { return "value"; } // POST: api/Test public void Post([FromBody]string value) { } // PUT: api/Test/5 public void Put(int id, [FromBody]string value) { } // DELETE: api/Test/5 public void Delete(int id) { } } }
22
78
0.521064
4f2f41ab570231dc61aada55d55751b2665f2427
239
rb
Ruby
lib/chops/view_context.rb
tomasv/chops
4da992fb8834b6d238dc6c79da317ff732d6e49d
[ "MIT" ]
null
null
null
lib/chops/view_context.rb
tomasv/chops
4da992fb8834b6d238dc6c79da317ff732d6e49d
[ "MIT" ]
null
null
null
lib/chops/view_context.rb
tomasv/chops
4da992fb8834b6d238dc6c79da317ff732d6e49d
[ "MIT" ]
null
null
null
module Chops module ViewContext def self.controller=(controller) RequestStore.store[:chops_current_controller] = controller end def self.controller RequestStore.store[:chops_current_controller] end end end
19.916667
64
0.736402
2ca90424d40a4641dd04d9587efb5640fd422d2a
6,106
dart
Dart
test/network/package_aodv_test.dart
ThomasDem14/adhoc_plugin
e977d57d30a4d48a1f58ca9c080727f182fe0c1b
[ "BSD-3-Clause" ]
6
2021-06-08T10:18:33.000Z
2021-12-10T13:25:03.000Z
test/network/package_aodv_test.dart
ThomasDem14/adhoc_plugin
e977d57d30a4d48a1f58ca9c080727f182fe0c1b
[ "BSD-3-Clause" ]
1
2021-11-25T18:24:26.000Z
2021-12-19T11:03:49.000Z
test/network/package_aodv_test.dart
ThomasDem14/adhoc_plugin
e977d57d30a4d48a1f58ca9c080727f182fe0c1b
[ "BSD-3-Clause" ]
1
2021-11-27T09:50:08.000Z
2021-11-27T09:50:08.000Z
import 'package:adhoc_plugin/src/network/aodv/aodv_helper.dart'; import 'package:adhoc_plugin/src/network/aodv/entry_routing_table.dart'; import 'package:adhoc_plugin/src/network/aodv/routing_table.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { late String srcAddr; late String dstAddr; late String next; late int hop; late int dstSeqNum; late int lifetime; late List<String> precursors; late EntryRoutingTable entry; setUp(() { srcAddr = 'srcAddr'; dstAddr = 'dstAddr'; next = 'next'; hop = 42; dstSeqNum = 42; lifetime = 42; precursors = List.empty(growable: true); entry = EntryRoutingTable( dstAddr, next, hop, dstSeqNum, lifetime, precursors ); }); group('EntryRoutingTable tests', () { test('updateDataPath(String address) test', () { entry.updateDataPath(dstAddr); expect( entry.getActivesDataPath(dstAddr), closeTo(DateTime.now().millisecond, 15) ); }); test('getActivesDataPath(String address) test', () { expect(entry.getActivesDataPath('address'), 0); }); test('updatePrecursors(String senderAddr) test', () { entry.updatePrecursors(srcAddr); expect(entry.precursors.contains(srcAddr), true); }); test('displayPrecursors()', () { final precursors = 'precursors: { address }'; entry.updatePrecursors('address'); expect(entry.displayPrecursors(), precursors); }); }); group('RoutingTable tests', () { late RoutingTable table; setUp(() { table = RoutingTable(false); }); test('addEntry(EntryRoutingTable entry) test', () { table.addEntry(entry); expect(table.routingTable.containsKey(entry.dstAddr), true); expect(table.addEntry(entry), true); }); test('removeEntry(String? dstAddr) test', () { table.addEntry(entry); table.removeEntry(entry.dstAddr); expect(table.routingTable.containsKey(entry.dstAddr), false); }); test('getNextFromDest(String? dstAddr) test', () { table.addEntry(entry); expect(table.getNextFromDest(dstAddr), entry); expect(table.getNextFromDest(next), null); }); test('containsDest(String? dstAddr) test', () { table.addEntry(entry); expect(table.containsDest(dstAddr), true); }); test('containsNext(String? nextAddr) test', () { table.addEntry(entry); expect(table.containsNext(next), true); expect(table.containsNext(dstAddr), false); }); test('getDestFromNext(String nextAddr) test', () { expect(table.getDestFromNext(dstAddr), null); }); test('getDestination(String? dstAddr) test', () { table.addEntry(entry); expect(table.getDestination(dstAddr), entry); }); test('getPrecursorsFromDest(String? dstAddr) test', () { expect(table.getPrecursorsFromDest(dstAddr), List.empty(growable: true)); }); test('getDataPathFromAddress(String? addr) test', () { expect(table.getDataPathFromAddress(srcAddr), 0); }); }); group('AodvHelper tests', () { late AodvHelper aodvHelper; setUp(() { aodvHelper = AodvHelper(false); }); test('addEntryRoutingTable(...) test', () { var result = aodvHelper.addEntryRoutingTable( dstAddr, next, hop, dstSeqNum, lifetime, precursors )!; expect(result.dstAddr, entry.dstAddr); }); test('addBroadcastId(String sourceAddress, int rreqId) test', () { expect(aodvHelper.addBroadcastId(srcAddr, 42), true); expect(aodvHelper.addBroadcastId(srcAddr, 42), false); }); test('getNextfromDest(String destAddress) test', () { aodvHelper.addEntryRoutingTable( dstAddr, next, hop, dstSeqNum, lifetime, precursors ); EntryRoutingTable? result = aodvHelper.getNextfromDest(dstAddr)!; expect(result.dstAddr, entry.dstAddr); result = aodvHelper.getNextfromDest('WrongAddr'); expect(result, null); }); test('containsDest(String destAddress) test', () { aodvHelper.addEntryRoutingTable( dstAddr, next, hop, dstSeqNum, lifetime, precursors ); expect(aodvHelper.containsDest(dstAddr), true); expect(aodvHelper.containsDest('test'), false); }); test('getIncrementRreqId() test', () { expect(aodvHelper.getIncrementRreqId(), 2); }); test('getDestination(String? destAddress) test', () { aodvHelper.addEntryRoutingTable( dstAddr, next, hop, dstSeqNum, lifetime, precursors ); var result = aodvHelper.getDestination(dstAddr); expect(result!.dstAddr, entry.dstAddr); result = aodvHelper.getDestination(next); expect(result, null); }); test('sizeRoutingTable() test', () { expect(aodvHelper.sizeRoutingTable(), 0); aodvHelper.addEntryRoutingTable( dstAddr, next, hop, dstSeqNum, lifetime, precursors ); expect(aodvHelper.sizeRoutingTable(), 1); aodvHelper.removeEntry(dstAddr); expect(aodvHelper.sizeRoutingTable(), 0); }); test('containsNext(String nextAddress) test', () { expect(aodvHelper.containsNext(next), false); aodvHelper.addEntryRoutingTable( dstAddr, next, hop, dstSeqNum, lifetime, precursors ); expect(aodvHelper.containsNext(next), true); }); test('getDestFromNext(String nextAddress) test', () { expect(aodvHelper.getDestFromNext(next), null); }); test('getDestination(String? destAddress) test', () { expect(aodvHelper.getDestination(dstAddr), null); aodvHelper.addEntryRoutingTable( dstAddr, next, hop, dstSeqNum, lifetime, precursors ); expect(aodvHelper.getDestination(dstAddr)!.dstAddr, entry.dstAddr); }); test('getPrecursorsFromDest(String destAddress) test', () { expect( aodvHelper.getPrecursorsFromDest('null'), List.empty(growable: true) ); }); test('getDataPathFromAddress(String address) test', () { expect(aodvHelper.getDataPathFromAddress(dstAddr), 0); }); }); }
26.780702
79
0.647396
6f2e59c90f443d3b478c3c0c76e586bf9b2936e6
2,359
html
HTML
application/index/view/resource/list.html
zhuangsuzheng/BLog
b349e5ca6aebbbe0340417eda9809dd62cb7a71a
[ "Apache-2.0" ]
null
null
null
application/index/view/resource/list.html
zhuangsuzheng/BLog
b349e5ca6aebbbe0340417eda9809dd62cb7a71a
[ "Apache-2.0" ]
null
null
null
application/index/view/resource/list.html
zhuangsuzheng/BLog
b349e5ca6aebbbe0340417eda9809dd62cb7a71a
[ "Apache-2.0" ]
null
null
null
<!---资源下载--> <!DOCTYPE html> <html lang="en"> <head> {include file='../application/index/view/model/head.html'} <link rel="stylesheet" href="/static/bt/css/bootstrap.min.css"> <link rel="stylesheet" href="/static/bt/css/bootstrap-theme.min.css"> <link rel="stylesheet" href="/static/self/css/public.css"> <script src="/static/bt/js/jquery.js"></script> <script src="/static/bt/js/bootstrap.js"></script> <script src="/static/bt/js/cookie.js"></script> <script src="/static/bt/js/jquery_md5.js"></script> <script src="/static/self/js/CheckLogin.js"></script> <script src="/static/bt/js/holder.js"></script> <style> #list{ margin-top:3px; overflow: hidden; text-overflow: ellipsis; } </style> <title>资源下载 - 庄宿正的官方网站</title> </head> <body> <div class="container-fluid"> <!---导航开始--> {include file='../application/index/view/model/model.html'} <!---导航结束--> <div class="col-md-2"></div> <div class="col-md-8"> <h4 class="page-header" style="margin:0px;">资源列表</h4> <ul class="list-group"> {volist name="list" id="ls"} <li class="list-group-item" id="list"> <b>{$ls.Title}|</b>{$ls.Content}<br /> <span style="float:right"> <span class="label label-success">{$ls.Time|date='Y-m-d',###}</span> <a href="/Resource/{$ls.Id}" class="label label-primary">--- 查看详情 ---</a> </span> </li> {/volist} </ul> </div> <div class="col-md-2"></div> </body> <script> $(function(){ //$('body').hide(500); //$('body').toggle(1000); //判断用户Cookie是否存在 var Token = $.cookie("UserToken"); $.ajax({ url:"/CheckToken", type:'POST', data:{Token:Token}, success:function(data){ if(data.mag == '1'){ //登录成功 $('.UserLogin').html(data.UserName + " <span class='caret'></span>"); $('.UserLogin').attr('data-toggle','dropdown'); } if(data.mag == '0'){ $('.UserLogin').html("用户登录"); } if(data.mag == '-1'){ $.cookie('Token', null,{ expires: 7, path: '/' }); alert(data.other); } } }); //登录成功 //$('.UserLogin').attr('data-toggle','dropdown'); //UserLogin }); </script> </html>
28.421687
89
0.524375
ba02470322c04d72b4fd33222af8f4418df4e697
2,411
lua
Lua
vendor/RainbowRepacker/tool/engine_android(5)/assets/scripts/hall/matchHall/gameMatchHall/data/matchRecordDataReward.lua
huangtao/cloud-test
8087b1337d47daab9eb39335ca6e286df0e4b4dc
[ "Apache-2.0" ]
1
2018-09-12T15:43:32.000Z
2018-09-12T15:43:32.000Z
vendor/RainbowRepacker/tool/engine_android(5)/assets/scripts/hall/matchHall/gameMatchHall/data/matchRecordDataReward.lua
huangtao/cloud-test
8087b1337d47daab9eb39335ca6e286df0e4b4dc
[ "Apache-2.0" ]
null
null
null
vendor/RainbowRepacker/tool/engine_android(5)/assets/scripts/hall/matchHall/gameMatchHall/data/matchRecordDataReward.lua
huangtao/cloud-test
8087b1337d47daab9eb39335ca6e286df0e4b4dc
[ "Apache-2.0" ]
3
2018-09-12T15:43:33.000Z
2019-07-10T09:50:15.000Z
require("gameData/gameData"); require("core/dict"); --比赛奖励累计数据 local MatchRecordDataReward = class(GameData); MatchRecordDataReward.Delegate = { onGetMatchRecordReward = "onGetMatchRecordReward"; }; MatchRecordDataReward.ctor = function(self) end MatchRecordDataReward.dtor = function(self) end MatchRecordDataReward.initData = function(self) self.m_data = {}; self.m_hasRequestData = false; end MatchRecordDataReward.reset = function(self) self.m_hasRequestData = false; end MatchRecordDataReward.updateMemData = function(self, data) self.m_data = self:_analyseData(data); end MatchRecordDataReward.getData = function(self) self:requestData(); if not (not self.m_hasRequestData and table.isEmpty(self.m_data)) then self:execDelegate(MatchRecordDataReward.Delegate.onGetMatchRecordReward, self.m_data); end end MatchRecordDataReward.requestData = function(self) if not self.m_hasRequestData then OnlineSocketManager.getInstance():sendMsg(PHP_MATCH_RECORD_REWARD_STATISTICS); end end MatchRecordDataReward.onResponseData = function(self, isSuccess, data, sendParam) if isSuccess then self:updateData(true, data); end self:execDelegate(MatchRecordDataReward.Delegate.onGetMatchRecordReward, self.m_data); self.m_hasRequestData = true; end MatchRecordDataReward.loadDictData = function(self, dict) local data = table.verify(json.decode(dict:getString("data"))); self.m_data = self:_analyseData(data); end MatchRecordDataReward.saveDictData = function(self, dict) local data = json.encode(self.m_data) or ""; dict:setString("data", data); end MatchRecordDataReward.getLocalDictName = function(self) self.m_userId = self.m_userId or kUserInfoData:getUserId(); return "match_record_data_reward_" .. self.m_userId; end ---------------------------------------------------------------------------------- MatchRecordDataReward._analyseData = function(self, data) local tmp = {}; for k, v in pairs(table.verify(data)) do local item = { type = number.valueOf(v.type), num = number.valueOf(v.num), }; table.insert(tmp, item); end return tmp; end MatchRecordDataReward.s_socketCmdFuncMap = { [PHP_MATCH_RECORD_REWARD_STATISTICS] = MatchRecordDataReward.onResponseData; }; return MatchRecordDataReward;
27.089888
95
0.707175
8e992adbad30ada9b0068baa5a534042251619ff
367
js
JavaScript
src/utils/router.utils.js
LuciKritZ/critica
ad8014b4c77b32a626fdc48da60c1f17c4012ed7
[ "MIT" ]
null
null
null
src/utils/router.utils.js
LuciKritZ/critica
ad8014b4c77b32a626fdc48da60c1f17c4012ed7
[ "MIT" ]
null
null
null
src/utils/router.utils.js
LuciKritZ/critica
ad8014b4c77b32a626fdc48da60c1f17c4012ed7
[ "MIT" ]
null
null
null
const PLACEHOLDER_ID = ':id'; export const AppRoute = { HOMEPAGE: '/', SEARCH: '/search', PROFILE: '/profile', USER_PROFILE: `/profile/${PLACEHOLDER_ID}`, BOOK_DETAILS: `/books/${PLACEHOLDER_ID}`, MY_BOOKS: `/users/my-books`, BOOKMARKS: `/users/bookmarks`, ADMIN_PANEL: `/admin`, PAYMENT: `/payment`, }; export default AppRoute;
22.9375
47
0.632153
e7818ab1183f3427c8a58fb749c7dc86470678b8
281
php
PHP
app/Modules/Admin/views/_partials/form_buttons/destroy_translation.blade.php
spajz/l5
96e40c4d0ce120a0ace07768b1cc02a650727d05
[ "MIT" ]
null
null
null
app/Modules/Admin/views/_partials/form_buttons/destroy_translation.blade.php
spajz/l5
96e40c4d0ce120a0ace07768b1cc02a650727d05
[ "MIT" ]
null
null
null
app/Modules/Admin/views/_partials/form_buttons/destroy_translation.blade.php
spajz/l5
96e40c4d0ce120a0ace07768b1cc02a650727d05
[ "MIT" ]
null
null
null
@if(isset($item->id) && method_exists($item, 'hasTranslation') && $item->hasTranslation()) <a href="{{ route('admin.' . $moduleLower . '.destroy.translation', [$item->getTranslation()->id])}}" class="btn btn-danger" data-bb="confirm"> Delete Translation </a> @endif
56.2
147
0.637011
20b56994cdb7755fbb2303c1512586cfba1f65c4
9,501
cs
C#
src/NLU.DevOps.Luis.Shared/LuisNLUTrainClient.cs
in4margaret/NLU.DevOps
44fe5bb8090ba4433ceb19b4ea804ffca0108cd2
[ "MIT" ]
1
2020-02-12T15:35:42.000Z
2020-02-12T15:35:42.000Z
src/NLU.DevOps.Luis.Shared/LuisNLUTrainClient.cs
in4margaret/NLU.DevOps
44fe5bb8090ba4433ceb19b4ea804ffca0108cd2
[ "MIT" ]
1
2020-02-12T15:32:47.000Z
2020-02-12T15:32:47.000Z
src/NLU.DevOps.Luis.Shared/LuisNLUTrainClient.cs
in4margaret/NLU.DevOps
44fe5bb8090ba4433ceb19b4ea804ffca0108cd2
[ "MIT" ]
null
null
null
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. namespace NLU.DevOps.Luis { using System; using System.Collections.Generic; using System.Linq; using System.Threading; using System.Threading.Tasks; using Logging; using Microsoft.Azure.CognitiveServices.Language.LUIS.Authoring; using Microsoft.Azure.CognitiveServices.Language.LUIS.Authoring.Models; using Microsoft.Extensions.Logging; using Models; using Newtonsoft.Json.Linq; /// <summary> /// Train and cleanup a LUIS model. /// Implementation of <see cref="INLUTrainClient"/> /// </summary> public sealed class LuisNLUTrainClient : INLUTrainClient { private static readonly TimeSpan TrainStatusDelay = TimeSpan.FromSeconds(2); /// <summary> /// Initializes a new instance of the <see cref="LuisNLUTrainClient"/> class. /// </summary> /// <param name="luisConfiguration">LUIS configuration.</param> /// <param name="luisSettings">LUIS settings.</param> /// <param name="luisClient">LUIS client.</param> public LuisNLUTrainClient(ILuisConfiguration luisConfiguration, LuisSettings luisSettings, ILuisTrainClient luisClient) { this.LuisConfiguration = luisConfiguration ?? throw new ArgumentNullException(nameof(luisConfiguration)); this.LuisSettings = luisSettings ?? throw new ArgumentNullException(nameof(luisSettings)); this.LuisClient = luisClient ?? throw new ArgumentNullException(nameof(luisClient)); this.LuisAppId = luisConfiguration.AppId; } /// <summary> /// Gets the LUIS app ID. /// </summary> public string LuisAppId { get; private set; } private static ILogger Logger => LazyLogger.Value; private static Lazy<ILogger> LazyLogger { get; } = new Lazy<ILogger>(() => ApplicationLogger.LoggerFactory.CreateLogger<LuisNLUTrainClient>()); private ILuisConfiguration LuisConfiguration { get; } private LuisSettings LuisSettings { get; } private ILuisTrainClient LuisClient { get; } /// <inheritdoc /> public async Task TrainAsync( IEnumerable<Models.LabeledUtterance> utterances, CancellationToken cancellationToken) { try { // Validate arguments if (utterances == null) { throw new ArgumentNullException(nameof(utterances)); } if (utterances.Any(utterance => utterance == null)) { throw new ArgumentException("Utterances must not be null.", nameof(utterances)); } // Create application if not passed in. if (this.LuisAppId == null) { this.LuisAppId = await this.LuisClient.CreateAppAsync(this.LuisConfiguration.AppName, cancellationToken).ConfigureAwait(false); Logger.LogTrace($"Created LUIS app '{this.LuisConfiguration.AppName}' with ID '{this.LuisConfiguration}'."); } // Create LUIS import JSON var luisApp = this.CreateLuisApp(utterances); // Import the LUIS model Logger.LogTrace($"Importing LUIS app '{this.LuisConfiguration.AppName ?? this.LuisAppId}' version '{this.LuisConfiguration.VersionId}'."); await this.LuisClient.ImportVersionAsync(this.LuisAppId, this.LuisConfiguration.VersionId, luisApp, cancellationToken).ConfigureAwait(false); // Train the LUIS model Logger.LogTrace($"Training LUIS app '{this.LuisConfiguration.AppName ?? this.LuisAppId}' version '{this.LuisConfiguration.VersionId}'."); await this.LuisClient.TrainAsync(this.LuisAppId, this.LuisConfiguration.VersionId, cancellationToken).ConfigureAwait(false); // Wait for training to complete await this.PollTrainingStatusAsync(cancellationToken).ConfigureAwait(false); // Publishes the LUIS app version Logger.LogTrace($"Publishing LUIS app '{this.LuisConfiguration.AppName ?? this.LuisAppId}' version '{this.LuisConfiguration.VersionId}'."); await this.LuisClient.PublishAppAsync(this.LuisAppId, this.LuisConfiguration.VersionId, cancellationToken).ConfigureAwait(false); } catch (ErrorResponseException ex) { if (ex.Body == null) { Logger.LogError($"Received error with message '{ex.Message}'."); } else { Logger.LogError($"Received error with status code '{ex.Body.Code}' and message '{ex.Body.Message}'."); } throw; } } /// <inheritdoc /> public Task CleanupAsync(CancellationToken cancellationToken) { try { if (this.LuisAppId == null) { throw new InvalidOperationException( $"The '{nameof(this.LuisAppId)}' must be set before calling '{nameof(LuisNLUTrainClient.CleanupAsync)}'."); } return this.LuisClient.DeleteAppAsync(this.LuisAppId, cancellationToken); } catch (ErrorResponseException ex) { if (ex.Body == null) { Logger.LogError($"Received error with message '{ex.Message}'."); } else { Logger.LogError($"Received error with status code '{ex.Body.Code}' and message '{ex.Body.Message}'."); } throw; } } /// <inheritdoc /> public void Dispose() { this.LuisClient.Dispose(); } private LuisApp CreateLuisApp(IEnumerable<Models.LabeledUtterance> utterances) { var luisApp = this.CreateLuisAppTemplate(); // Add intents to model luisApp.Intents = luisApp.Intents ?? new List<HierarchicalModel>(); utterances .Select(utterance => utterance.Intent) .Append("None") .Distinct() .Where(intent => !luisApp.Intents.Any(i => i.Name == intent)) .Select(intent => new HierarchicalModel { Name = intent }) .ToList() .ForEach(luisApp.Intents.Add); // Add utterances to model luisApp.Utterances = luisApp.Utterances ?? new List<JSONUtterance>(); utterances .Select(utterance => utterance.ToJSONUtterance(this.LuisSettings)) .ToList() .ForEach(luisApp.Utterances.Add); return luisApp; } private LuisApp CreateLuisAppTemplate() { var defaultTemplate = new LuisApp( name: this.LuisConfiguration.AppName, versionId: this.LuisConfiguration.VersionId, desc: string.Empty, culture: "en-us", entities: new List<HierarchicalModel>(), closedLists: new List<ClosedList>(), composites: new List<HierarchicalModel>(), patternAnyEntities: new List<PatternAny>(), regexEntities: new List<RegexEntity>(), prebuiltEntities: new List<PrebuiltEntity>(), regexFeatures: new List<JSONRegexFeature>(), modelFeatures: new List<JSONModelFeature>(), patterns: new List<PatternRule>()); var templateJson = JObject.FromObject(defaultTemplate); templateJson.Merge(JObject.FromObject(this.LuisSettings.AppTemplate)); return templateJson.ToObject<LuisApp>(); } private async Task PollTrainingStatusAsync(CancellationToken cancellationToken) { while (true) { try { var trainingStatus = await this.LuisClient.GetTrainingStatusAsync(this.LuisAppId, this.LuisConfiguration.VersionId, cancellationToken).ConfigureAwait(false); var inProgress = trainingStatus .Select(modelInfo => modelInfo.Details.Status) .Any(status => status == "InProgress" || status == "Queued"); if (!inProgress) { if (trainingStatus.Any(modelInfo => modelInfo.Details.Status == "Fail")) { throw new InvalidOperationException("Failure occurred while training LUIS model."); } break; } Logger.LogTrace($"Training jobs not complete. Polling again."); await Task.Delay(TrainStatusDelay, cancellationToken).ConfigureAwait(false); } catch (ErrorResponseException ex) when ((int)ex.Response.StatusCode == 429) { Logger.LogWarning("Received HTTP 429 result from LUIS. Retrying."); await Task.Delay(TrainStatusDelay, cancellationToken).ConfigureAwait(false); } } } } }
41.671053
177
0.570466
8d7d5f7936525160600cb846209400dcaa3821d4
1,871
js
JavaScript
src/pages/Docs/Doc3.js
GokulnathP/git-co-commit.github.io
af16f27680458e492841eade4fdd33b4b18fd590
[ "MIT" ]
1
2020-09-07T13:07:27.000Z
2020-09-07T13:07:27.000Z
src/pages/Docs/Doc3.js
GokulnathP/git-co-commit.github.io
af16f27680458e492841eade4fdd33b4b18fd590
[ "MIT" ]
null
null
null
src/pages/Docs/Doc3.js
GokulnathP/git-co-commit.github.io
af16f27680458e492841eade4fdd33b4b18fd590
[ "MIT" ]
null
null
null
import React from 'react'; import Buttons from '../../Layout/Buttons/Buttons'; import BeforePairing from '../../img/git-co-commit-before-gitpair.webp'; import AfterPairing from '../../img/git-co-commit-after-gitpair.webp'; import classes from './Docs.module.css'; const Doc3 = () => { return ( <> <Buttons prevLink="/get-started/why-do-we-need-pair-programming" nextLink="/get-started/installing-node-js" /> <div className={classes.Content}> <h1 className={classes.Title}>What is git co commit?</h1> <p className={classes.Para}>When a pair or multiple developers work on git projects, there is a convention that allows us to document our co-authors in the commit message. However, adding the co-authorship information on every single commit is painful.</p> <p className={classes.Para}>Do a git commit in the same way it is usually done, with the pair members username, to make them get credit for the commit (if more than one member works on the same code, separate the username by comma). The author’s name(who writes the code - Driver) on the commit will be added automatically.</p> <p className={classes.Para}>Each co-author will be added to the commit message, so that they are also credited in the github contributions view!</p> <h3 className={classes.SubTitle}>Before Pairing</h3> <img className={classes.LenImage} src={BeforePairing} alt="Before Pairing" /> <h3 className={classes.SubTitle}>After Pairing</h3> <img className={classes.LenImage} style={{ width: "100%" }} src={AfterPairing} alt="After Pairing" /> </div> <Buttons prevLink="/get-started/why-do-we-need-pair-programming" nextLink="/get-started/installing-node-js" /> </> ) } export default Doc3;
62.366667
343
0.667557
26bfedd759ebf49ae9ffa1d7e1180bff582ce7c6
1,191
dart
Dart
alryne/lib/src/models/committee.g.dart
goldenercobra/alryne
3b22d0d23c7a16e32d48479380ff6ac723b50a19
[ "MIT" ]
null
null
null
alryne/lib/src/models/committee.g.dart
goldenercobra/alryne
3b22d0d23c7a16e32d48479380ff6ac723b50a19
[ "MIT" ]
7
2018-02-22T20:07:37.000Z
2018-03-09T17:57:28.000Z
alryne/lib/src/models/committee.g.dart
goldenercobra/alryne
3b22d0d23c7a16e32d48479380ff6ac723b50a19
[ "MIT" ]
null
null
null
// GENERATED CODE - DO NOT MODIFY BY HAND part of 'committee.dart'; // ************************************************************************** // Generator: JsonSerializableGenerator // ************************************************************************** Committee _$CommitteeFromJson(Map<String, dynamic> json) => new Committee( topic: json['topic'] as String, delegates: (json['delegates'] as List) ?.map((e) => e == null ? null : new Delegate.fromJson(e as Map<String, dynamic>)) ?.toList(), caucuses: (json['caucuses'] as List) ?.map((e) => e == null ? null : new Caucus.fromJson(e as Map<String, dynamic>)) ?.toList(), crises: (json['crises'] as List) ?.map((e) => e == null ? null : new Crisis.fromJson(e as Map<String, dynamic>)) ?.toList()); abstract class _$CommitteeSerializerMixin { String get topic; List<Delegate> get delegates; List<Caucus> get caucuses; List<Crisis> get crises; Map<String, dynamic> toJson() => <String, dynamic>{ 'topic': topic, 'delegates': delegates, 'caucuses': caucuses, 'crises': crises }; }
33.083333
80
0.515533
af285478a423ef756d66218779af643e917bf77d
246
py
Python
Python/Errors-and-Exceptions/incorrect-regex.py
ekant1999/HackerRank
084d4550b4eaf130837ab26a4efdbcaf8b667cdc
[ "MIT" ]
9
2017-03-19T16:27:31.000Z
2022-02-17T11:42:21.000Z
Python/Errors-and-Exceptions/incorrect-regex.py
ekant1999/HackerRank
084d4550b4eaf130837ab26a4efdbcaf8b667cdc
[ "MIT" ]
null
null
null
Python/Errors-and-Exceptions/incorrect-regex.py
ekant1999/HackerRank
084d4550b4eaf130837ab26a4efdbcaf8b667cdc
[ "MIT" ]
6
2019-02-18T11:26:24.000Z
2022-03-21T14:13:15.000Z
# Enter your code here. Read input from STDIN. Print output to STDOUT import re t = int(raw_input()) for i in range(t): try: x = re.compile(raw_input()) if x: print True except: print False
20.5
70
0.556911
dbce3c5b7496a294a91e1eec90da0e22166a774a
288
php
PHP
resources/lang/ar/cpanel/models.php
Ahmed31916/CarSellerV2
cde2ba0124d240895582b22599037aacdf5b70a3
[ "MIT" ]
null
null
null
resources/lang/ar/cpanel/models.php
Ahmed31916/CarSellerV2
cde2ba0124d240895582b22599037aacdf5b70a3
[ "MIT" ]
null
null
null
resources/lang/ar/cpanel/models.php
Ahmed31916/CarSellerV2
cde2ba0124d240895582b22599037aacdf5b70a3
[ "MIT" ]
null
null
null
<?php return [ "AllModels"=>"انواع السيارات", "Home"=>"الرئيسية", "Models"=>"الانواع", "AddNew"=>"اضافة جديد", "Name_ar"=>"الاسم", "Name_en"=>"Name", "Name_ru"=>"Имя", "BrandName"=>"اسم الشركة", "CarCount"=>"عدد السيارات", "Actions"=>"اجراء", ];
18
34
0.53125
fe6a829dfbf8995288baefc7647a0bc1edf2fa5d
23,434
psm1
PowerShell
Modules/Microsoft365DSC/DSCResources/MSFT_PPTenantIsolationSettings/MSFT_PPTenantIsolationSettings.psm1
malauter/Microsoft365DSC
4ac0b366db19335902bbed71ad1c4b265180ac3e
[ "MIT" ]
96
2019-05-08T17:31:25.000Z
2020-04-08T05:42:14.000Z
Modules/Microsoft365DSC/DSCResources/MSFT_PPTenantIsolationSettings/MSFT_PPTenantIsolationSettings.psm1
malauter/Microsoft365DSC
4ac0b366db19335902bbed71ad1c4b265180ac3e
[ "MIT" ]
314
2019-05-08T11:29:17.000Z
2020-04-08T19:55:01.000Z
Modules/Microsoft365DSC/DSCResources/MSFT_PPTenantIsolationSettings/MSFT_PPTenantIsolationSettings.psm1
malauter/Microsoft365DSC
4ac0b366db19335902bbed71ad1c4b265180ac3e
[ "MIT" ]
68
2019-05-10T10:54:34.000Z
2020-04-07T15:26:47.000Z
function Get-TargetResource { [CmdletBinding()] [OutputType([System.Collections.Hashtable])] param ( [Parameter(Mandatory = $true)] [ValidateSet('Yes')] [System.String] $IsSingleInstance, [Parameter()] [System.Boolean] $Enabled = $true, [Parameter()] [Microsoft.Management.Infrastructure.CimInstance[]] $Rules, [Parameter()] [Microsoft.Management.Infrastructure.CimInstance[]] $RulesToInclude, [Parameter()] [Microsoft.Management.Infrastructure.CimInstance[]] $RulesToExclude, [Parameter()] [System.Management.Automation.PSCredential] $Credential ) Write-Verbose -Message 'Getting the Power Platform Tenant Isolation Settings Configuration' if ($PSBoundParameters.ContainsKey("Rules") -and ` ($PSBoundParameters.ContainsKey("RulesToInclude") -or ` $PSBoundParameters.ContainsKey("RulesToExclude"))) { $message = 'You cannot specify Rules and RulesToInclude/RulesToExclude.' Add-M365DSCEvent -Message $message -EntryType 'Error' ` -EventID 1 -Source $($MyInvocation.MyCommand.Source) throw $message } $ConnectionMode = New-M365DSCConnection -Workload 'PowerPlatforms' ` -InboundParameters $PSBoundParameters $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftGraph' ` -InboundParameters $PSBoundParameters #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies #region Telemetry $ResourceName = $MyInvocation.MyCommand.ModuleName -replace "MSFT_", "" $CommandName = $MyInvocation.MyCommand $data = Format-M365DSCTelemetryParameters -ResourceName $ResourceName ` -CommandName $CommandName ` -Parameters $PSBoundParameters Add-M365DSCTelemetryEvent -Data $data #endregion try { $tenantid = (Get-MgContext).TenantId $tenantIsolationPolicy = Get-PowerAppTenantIsolationPolicy -TenantId $tenantid [Array]$allowedTenants = $tenantIsolationPolicy.properties.allowedTenants | ForEach-Object { $directions = $_.direction if ($directions.inbound -eq $true) { if ($directions.outbound -eq $true) { $direction = 'Both' } else { $direction = 'Inbound' } } elseif ($directions.outbound -eq $true) { $direction = 'Outbound' } else { $direction = 'unknown' } return @{ TenantName = $_.tenantId Direction = $direction } } return @{ IsSingleInstance = 'Yes' Enabled = ($tenantIsolationPolicy.properties.isDisabled -eq $false) Rules = $allowedTenants } } catch { try { Write-Verbose -Message $_ $tenantIdValue = '' if (-not [System.String]::IsNullOrEmpty($TenantId)) { $tenantIdValue = $TenantId } elseif ($null -ne $Credential) { $tenantIdValue = $Credential.UserName.Split('@')[1] } Add-M365DSCEvent -Message $_ -EntryType 'Error' ` -EventID 1 -Source $($MyInvocation.MyCommand.Source) ` -TenantId $tenantIdValue } catch { Write-Verbose -Message $_ } throw $_ } } function Set-TargetResource { [CmdletBinding()] param ( [Parameter(Mandatory = $true)] [ValidateSet('Yes')] [System.String] $IsSingleInstance, [Parameter()] [System.Boolean] $Enabled = $true, [Parameter()] [Microsoft.Management.Infrastructure.CimInstance[]] $Rules, [Parameter()] [Microsoft.Management.Infrastructure.CimInstance[]] $RulesToInclude, [Parameter()] [Microsoft.Management.Infrastructure.CimInstance[]] $RulesToExclude, [Parameter()] [System.Management.Automation.PSCredential] $Credential ) Write-Verbose -Message 'Setting Power Platform Tenant Isolation Settings configuration' if ($PSBoundParameters.ContainsKey("Rules") -and ` ($PSBoundParameters.ContainsKey("RulesToInclude") -or ` $PSBoundParameters.ContainsKey("RulesToExclude"))) { $message = 'You cannot specify Rules and RulesToInclude/RulesToExclude.' Add-M365DSCEvent -Message $message -EntryType 'Error' ` -EventID 1 -Source $($MyInvocation.MyCommand.Source) throw $message } #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies #region Telemetry $ResourceName = $MyInvocation.MyCommand.ModuleName -replace "MSFT_", "" $CommandName = $MyInvocation.MyCommand $data = Format-M365DSCTelemetryParameters -ResourceName $ResourceName ` -CommandName $CommandName ` -Parameters $PSBoundParameters Add-M365DSCTelemetryEvent -Data $data #endregion $ConnectionMode = New-M365DSCConnection -Workload 'PowerPlatforms' ` -InboundParameters $PSBoundParameters $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftGraph' ` -InboundParameters $PSBoundParameters $tenantid = (Get-MgContext).TenantId $tenantIsolationPolicy = Get-PowerAppTenantIsolationPolicy -TenantId $tenantid if ($tenantIsolationPolicy.Properties.isDisabled -ne -not $Enabled) { $tenantIsolationPolicy.Properties.isDisabled = -not $Enabled } [Array]$existingAllowedRules = $tenantIsolationPolicy.Properties.allowedTenants if ($PSBoundParameters.ContainsKey("Rules")) { Write-Verbose "Processing parameter Rules" foreach ($rule in $Rules) { # Check if Rules exist $ruleTenantId = Get-M365TenantId -TenantName $rule.TenantName $direction = [PSCustomObject]@{ inbound = $false outbound = $false } $existingRule = $existingAllowedRules | Where-Object -FilterScript { $_.tenantId -eq $ruleTenantId } if ($null -eq $existingRule) { Write-Verbose "Rule for $($rule.TenantName) does not exist. Adding with direction $($rule.Direction)" switch ($rule.Direction) { 'Inbound' { $direction.inbound = $true } 'Outbound' { $direction.outbound = $true } 'Both' { $direction.inbound = $true $direction.outbound = $true } } $newRule = [PSCustomObject]@{ tenantId = $ruleTenantId tenantDisplayName = '' direction = $direction } $existingAllowedRules += $newRule } else { Write-Verbose "Rule for $($rule.TenantName) exists. Setting specified direction." switch ($rule.Direction) { 'Inbound' { $existingRule.Direction.inbound = $true $existingRule.Direction.outbound = $false } 'Outbound' { $existingRule.Direction.inbound = $false $existingRule.Direction.outbound = $true } 'Both' { $existingRule.Direction.inbound = $true $existingRule.Direction.outbound = $true } } } } $removeRules = @() foreach ($existingRule in $existingAllowedRules) { # Check if rules are not in the specified list if ($null -eq ($Rules | Where-Object -FilterScript { (Get-M365TenantId -TenantName $_.TenantName) -eq $existingRule.tenantId })) { Write-Verbose "Rule for tenant id $($existingRule.tenantId) does not exist in the Rules parameter. Deleting rule." $removeRules += $existingRule.tenantId } } [Array]$newRules = $existingAllowedRules | Where-Object -FilterScript { $_.tenantId -notin $removeRules } $tenantIsolationPolicy.Properties.allowedTenants = $newRules } if ($PSBoundParameters.ContainsKey("RulesToInclude")) { Write-Verbose "Processing parameter RulesToInclude" foreach ($rule in $RulesToInclude) { Write-Verbose "Checking rule for TenantName $($rule.TenantName) with direction $($rule.Direction)" $ruleTenantId = Get-M365TenantId -TenantName $rule.TenantName $direction = [PSCustomObject]@{ inbound = $false outbound = $false } $existingRule = $existingAllowedRules | Where-Object -FilterScript { $_.tenantId -eq $ruleTenantId } if ($null -eq $existingRule) { Write-Verbose "Rule does not exist. Adding with direction $($rule.Direction)" # Rule does not exist, add rule switch ($rule.Direction) { 'Inbound' { $direction.inbound = $true } 'Outbound' { $direction.outbound = $true } 'Both' { $direction.inbound = $true $direction.outbound = $true } } $newRule = [PSCustomObject]@{ tenantId = $ruleTenantId tenantDisplayName = '' direction = $direction } $existingAllowedRules += $newRule } else { Write-Verbose "Rule exists. Setting specified direction." switch ($rule.Direction) { 'Inbound' { $existingRule.Direction.inbound = $true $existingRule.Direction.outbound = $false } 'Outbound' { $existingRule.Direction.inbound = $false $existingRule.Direction.outbound = $true } 'Both' { $existingRule.Direction.inbound = $true $existingRule.Direction.outbound = $true } } } } $tenantIsolationPolicy.Properties.allowedTenants = $existingAllowedRules } if ($PSBoundParameters.ContainsKey("RulesToExclude")) { Write-Verbose "Processing parameter RulesToExclude" foreach ($rule in $RulesToExclude) { Write-Verbose "Checking rule for TenantName $($rule.TenantName)" $ruleTenantId = Get-M365TenantId -TenantName $rule.TenantName $removeRules = @() if ($null -ne ($existingAllowedRules | Where-Object -FilterScript { $_.tenantId -eq $ruleTenantId })) { Write-Verbose "Rule for $($rule.TenantName) is currently configured in the rules. Deleting rule." $removeRules += $ruleTenantId } } [Array]$newRules = $existingAllowedRules | Where-Object -FilterScript { $_.tenantId -notin $removeRules } $tenantIsolationPolicy.Properties.allowedTenants = $newRules } Write-Verbose "Saving changes to the tenant" $null = Set-PowerAppTenantIsolationPolicy -TenantIsolationPolicy $tenantIsolationPolicy -TenantId $tenantId } function Test-TargetResource { [CmdletBinding()] [OutputType([System.Boolean])] param ( [Parameter(Mandatory = $true)] [ValidateSet('Yes')] [System.String] $IsSingleInstance, [Parameter()] [System.Boolean] $Enabled = $true, [Parameter()] [Microsoft.Management.Infrastructure.CimInstance[]] $Rules, [Parameter()] [Microsoft.Management.Infrastructure.CimInstance[]] $RulesToInclude, [Parameter()] [Microsoft.Management.Infrastructure.CimInstance[]] $RulesToExclude, [Parameter()] [System.Management.Automation.PSCredential] $Credential ) Write-Verbose -Message 'Testing Power Platform Tenant Isolation Settings configuration' #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies #region Telemetry $ResourceName = $MyInvocation.MyCommand.ModuleName -replace "MSFT_", "" $CommandName = $MyInvocation.MyCommand $data = Format-M365DSCTelemetryParameters -ResourceName $ResourceName ` -CommandName $CommandName ` -Parameters $PSBoundParameters Add-M365DSCTelemetryEvent -Data $data #endregion $CurrentValues = Get-TargetResource @PSBoundParameters Write-Verbose -Message "Current Values: $(Convert-M365DscHashtableToString -Hashtable $CurrentValues)" Write-Verbose -Message "Target Values: $(Convert-M365DscHashtableToString -Hashtable $PSBoundParameters)" $result = $true $driftedRules = @{} if ($PSBoundParameters.ContainsKey("Rules")) { Write-Verbose "Processing parameter Rules" foreach ($rule in $Rules) { Write-Verbose "Checking Rule for TenantName $($rule.TenantName)." $ruleTenantId = Get-M365TenantId -TenantName $rule.TenantName $existingRule = $CurrentValues.Rules | Where-Object -FilterScript { $_.TenantName -eq $ruleTenantId } if ($null -eq $existingRule) { Write-Verbose "Rule for $($rule.TenantName) does not exist." $driftedRules.($rule.TenantName) = @{ CurrentValue = "Rule does not exist" DesiredValue = "Direction: $($rule.Direction)" } $result = $false } else { Write-Verbose "Rule for $($rule.TenantName) exists. Checking specified direction." if ($rule.Direction -ne $existingRule.Direction) { Write-Verbose "Direction for rule incorrect: Current = $($existingRule.Direction) / Desired = $($rule.Direction)" $driftedRules.($rule.TenantName) = @{ CurrentValue = "Direction: $($existingRule.Direction)" DesiredValue = "Direction: $($rule.Direction)" } $result = $false } } } foreach ($existingRule in $CurrentValues.Rules) { # Check if rules are not in the specified list if ($null -eq ($Rules | Where-Object -FilterScript { (Get-M365TenantId -TenantName $_.TenantName) -eq $existingRule.TenantName })) { Write-Verbose "Rule for tenant id $($existingRule.TenantName) does not exist in the Desired State." $driftedRules.($existingRule.TenantName) = @{ CurrentValue = "Direction: $($existingRule.Direction)" DesiredValue = "Should not exist" } $result = $false } } } if ($PSBoundParameters.ContainsKey("RulesToInclude")) { Write-Verbose "Processing parameter RulesToInclude" $driftedRules = @{} foreach ($rule in $RulesToInclude) { Write-Verbose "Checking Rule for TenantName $($rule.TenantName)." $ruleTenantId = Get-M365TenantId -TenantName $rule.TenantName $existingRule = $CurrentValues.Rules | Where-Object -FilterScript { $_.TenantName -eq $ruleTenantId } if ($null -eq $existingRule) { Write-Verbose "Rule for $($rule.TenantName) does not exist." $driftedRules.($rule.TenantName) = @{ CurrentValue = "Rule does not exist" DesiredValue = "Direction: $($rule.Direction)" } $result = $false } else { Write-Verbose "Rule for $($rule.TenantName) exists. Checking specified direction." if ($rule.Direction -ne $existingRule.Direction) { Write-Verbose "Direction for rule incorrect: Current = $($existingRule.Direction) / Desired = $($rule.Direction)" $driftedRules.($rule.TenantName) = @{ CurrentValue = "Direction: $($existingRule.Direction)" DesiredValue = "Direction: $($rule.Direction)" } $result = $false } } } } if ($PSBoundParameters.ContainsKey("RulesToExclude")) { Write-Verbose "Processing parameter RulesToExclude" $driftedRules = @{} foreach ($rule in $RulesToExclude) { Write-Verbose "Checking Rule for TenantName $($rule.TenantName)." $ruleTenantId = Get-M365TenantId -TenantName $rule.TenantName $existingRule = $CurrentValues.Rules | Where-Object -FilterScript { $_.TenantName -eq $ruleTenantId } if ($null -ne $existingRule) { Write-Verbose "Rule for $($rule.TenantName) exists." $driftedRules.($rule.TenantName) = @{ CurrentValue = "Direction: $($existingRule.Direction)" DesiredValue = "Should not exist" } $result = $false } } } if ($result -eq $false) { $message = "Tenant Isolation Rules not in the Desired State:`n" $message += "<Rules>`n" foreach ($driftedRule in $driftedRules.GetEnumerator()) { $message += " <Rule>`n" $message += " <TenantName>$($driftedRule.Name)</TenantName>`n" $message += " <CurrentValue>$($driftedRule.Value.CurrentValue)</CurrentValue>`n" $message += " <DesiredValue>$($driftedRule.Value.DesiredValue)</DesiredValue>`n" $message += " </Rule>`n" } $message += "</Rules>" Add-M365DSCEvent -Message $message -EntryType 'Error' ` -EventID 1 -Source $($MyInvocation.MyCommand.Source) Write-Verbose -Message "Test-TargetResource returned False" return $false } $TestResult = Test-M365DSCParameterState -CurrentValues $CurrentValues ` -Source $($MyInvocation.MyCommand.Source) ` -DesiredValues $PSBoundParameters ` -ValuesToCheck @("Enabled") Write-Verbose -Message "Test-TargetResource returned $TestResult" return $TestResult } function Export-TargetResource { [CmdletBinding()] [OutputType([System.String])] param ( [Parameter()] [System.Management.Automation.PSCredential] $Credential ) $ConnectionMode = New-M365DSCConnection -Workload 'PowerPlatforms' ` -InboundParameters $PSBoundParameters $ConnectionMode = New-M365DSCConnection -Workload 'MicrosoftGraph' ` -InboundParameters $PSBoundParameters #Ensure the proper dependencies are installed in the current environment. Confirm-M365DSCDependencies #region Telemetry $ResourceName = $MyInvocation.MyCommand.ModuleName -replace "MSFT_", "" $CommandName = $MyInvocation.MyCommand $data = Format-M365DSCTelemetryParameters -ResourceName $ResourceName ` -CommandName $CommandName ` -Parameters $PSBoundParameters Add-M365DSCTelemetryEvent -Data $data #endregion try { $dscContent = '' $Params = @{ IsSingleInstance = 'Yes' } $Results = Get-TargetResource @Params if ($Results.Rules.Count -gt 0) { $Results.Rules = Get-M365DSCTenantIsolationRule $Results.Rules } $Results = Update-M365DSCExportAuthenticationResults -ConnectionMode $ConnectionMode ` -Results $Results $currentDSCBlock = Get-M365DSCExportContentForResource -ResourceName $ResourceName ` -ConnectionMode $ConnectionMode ` -ModulePath $PSScriptRoot ` -Results $Results ` -Credential $Credential $dscContent += $currentDSCBlock Save-M365DSCPartialExport -Content $currentDSCBlock ` -FileName $Global:PartialExportFileName Write-Host $Global:M365DSCEmojiGreenCheckMark return $dscContent } catch { try { Write-Host $Global:M365DSCEmojiRedX Write-Verbose -Message $_ $tenantIdValue = '' if (-not [System.String]::IsNullOrEmpty($TenantId)) { $tenantIdValue = $TenantId } elseif ($null -ne $Credential) { $tenantIdValue = $Credential.UserName.Split('@')[1] } Add-M365DSCEvent -Message $_ -EntryType 'Error' ` -EventID 1 -Source $($MyInvocation.MyCommand.Source) ` -TenantId $tenantIdValue } catch { Write-Verbose -Message $_ } return '' } } function Get-M365TenantId { param ( [Parameter(Mandatory = $true)] [System.String] $TenantName ) if ($TenantName -notmatch ".onmicrosoft.com$") { $TenantName += '.onmicrosoft.com' } $result = Invoke-WebRequest "https://login.windows.net/$TenantName/.well-known/openid-configuration" -UseBasicParsing -Verbose:$false $jsonResult = $result | ConvertFrom-Json return $jsonResult.token_endpoint.Split('/')[3] } function Get-M365DSCTenantIsolationRule { [CmdletBinding()] [OutputType([System.String])] param( [Parameter(Mandatory = $true)] [System.Collections.ArrayList] $Rules ) $StringContent = "@(" foreach ($rule in $Rules) { $StringContent += "ule {r`n" $StringContent += " TenantName = '" + $rule.TenantName + "'`r`n" $StringContent += " Direction = '" + $rule.Direction + "'`r`n" $StringContent += " }`r`n" } $StringContent += " )" return $StringContent } Export-ModuleMember -Function *-TargetResource
34.011611
142
0.551976
e4430e47c13f4a40a781038ff5be9c177d2cf17b
506
sql
SQL
samples/Solitons.Samples.Database/Scripts/Stubs/case000.sql
AlexeyEvlampiev/Solitons.Core
22652ad801ca62e6668e4588f66ce49fa2669f27
[ "MIT" ]
null
null
null
samples/Solitons.Samples.Database/Scripts/Stubs/case000.sql
AlexeyEvlampiev/Solitons.Core
22652ad801ca62e6668e4588f66ce49fa2669f27
[ "MIT" ]
null
null
null
samples/Solitons.Samples.Database/Scripts/Stubs/case000.sql
AlexeyEvlampiev/Solitons.Core
22652ad801ca62e6668e4588f66ce49fa2669f27
[ "MIT" ]
null
null
null
INSERT INTO data.organization(object_id, id, email) VALUES('90b74b98-6ee7-491e-a555-71078545c020','Northwind','john@northwind.com') ON CONFLICT(object_id) DO UPDATE SET id = EXCLUDED.id, email = EXCLUDED.email; SELECT FROM data.user_upsert( '90b74b98-6ee7-491e-a555-71078545c020' ,'katherine@northwind.com', 'customer'); SELECT * FROM api.http_service_upsert( 'e725b5e0-de00-4b1b-8d61-72f244497979', 'Public API', 'Public API', '1.0', 'prospect, customer', 'https://localhost:1234');
22
79
0.729249
24b559a4959003621668b2079e52b4e235fb8d5b
2,631
php
PHP
src/Video/VideoAnalyzer.php
buddhawilliams/soluble-mediatools
5d5bb9d3b8dd91fc48f41e25dc0a95e29fb28395
[ "MIT" ]
138
2018-08-08T13:27:08.000Z
2022-01-14T21:27:18.000Z
src/Video/VideoAnalyzer.php
buddhawilliams/soluble-mediatools
5d5bb9d3b8dd91fc48f41e25dc0a95e29fb28395
[ "MIT" ]
20
2018-08-09T10:30:34.000Z
2020-07-10T10:19:07.000Z
src/Video/VideoAnalyzer.php
buddhawilliams/soluble-mediatools
5d5bb9d3b8dd91fc48f41e25dc0a95e29fb28395
[ "MIT" ]
10
2018-08-20T11:52:37.000Z
2021-01-13T01:53:07.000Z
<?php declare(strict_types=1); /** * @see https://github.com/soluble-io/soluble-mediatools for the canonical repository * * @copyright Copyright (c) 2018-2020 Sébastien Vanvelthem. (https://github.com/belgattitude) * @license https://github.com/soluble-io/soluble-mediatools/blob/master/LICENSE.md MIT */ namespace Soluble\MediaTools\Video; use Psr\Log\LoggerInterface; use Psr\Log\LogLevel; use Psr\Log\NullLogger; use Soluble\MediaTools\Common\Process\ProcessParamsInterface; use Soluble\MediaTools\Video\Config\FFMpegConfigInterface; use Soluble\MediaTools\Video\Detection\InterlaceDetect; use Soluble\MediaTools\Video\Detection\InterlaceDetectGuess; use Soluble\MediaTools\Video\Exception\AnalyzerExceptionInterface; use Soluble\MediaTools\Video\Exception\AnalyzerProcessExceptionInterface; use Soluble\MediaTools\Video\Exception\MissingInputFileException; use Soluble\MediaTools\Video\Exception\ProcessFailedException; use Soluble\MediaTools\Video\Exception\RuntimeReaderException; final class VideoAnalyzer implements VideoAnalyzerInterface { /** @var FFMpegConfigInterface */ private $ffmpegConfig; /** @var LoggerInterface */ private $logger; public function __construct(FFMpegConfigInterface $ffmpegConfig, ?LoggerInterface $logger = null) { $this->ffmpegConfig = $ffmpegConfig; $this->logger = $logger ?? new NullLogger(); } /** * @param int $maxFramesToAnalyze interlacement detection can be heavy, limit the number of frames to analyze * * @throws AnalyzerExceptionInterface * @throws AnalyzerProcessExceptionInterface * @throws ProcessFailedException * @throws MissingInputFileException * @throws RuntimeReaderException */ public function detectInterlacement(string $file, int $maxFramesToAnalyze = InterlaceDetect::DEFAULT_INTERLACE_MAX_FRAMES, ?ProcessParamsInterface $processParams = null): InterlaceDetectGuess { $interlaceDetect = new InterlaceDetect($this->ffmpegConfig); try { return $interlaceDetect->guessInterlacing($file, $maxFramesToAnalyze, $processParams); } catch (\Throwable $e) { $exceptionNs = explode('\\', get_class($e)); $this->logger->log( ($e instanceof MissingInputFileException) ? LogLevel::WARNING : LogLevel::ERROR, sprintf( 'VideoAnalyzer %s: \'%s\'. (%s)', $exceptionNs[count($exceptionNs) - 1], $file, $e->getMessage() ) ); throw $e; } } }
37.056338
195
0.695173
7f75125ef5b372d07bd08df9ec98f45d8715f401
917
php
PHP
app/Http/Controllers/DiaController.php
lucasmknopf/sischool
6381e1d4789a95a2d05b0a134e5d0ca223a60bb7
[ "MIT" ]
null
null
null
app/Http/Controllers/DiaController.php
lucasmknopf/sischool
6381e1d4789a95a2d05b0a134e5d0ca223a60bb7
[ "MIT" ]
null
null
null
app/Http/Controllers/DiaController.php
lucasmknopf/sischool
6381e1d4789a95a2d05b0a134e5d0ca223a60bb7
[ "MIT" ]
null
null
null
<?php namespace App\Http\Controllers; use App\Dia; use App\Http\Requests\DiaRequest; use Illuminate\Http\Request; class DiaController extends Controller { public function index(){ $dias = Dia::all(); return view('dia.list', ['dias'=> $dias]); } public function create(){ return view ('dia.create'); } public function store(DiaRequest $request){ $novo_dia = $request->all(); Dia::create($novo_dia); return redirect()->route('dia'); } public function destroy ($id){ Dia::find ($id)->delete(); return redirect()->route('dia'); } public function edit ($id){ $dia = Dia::find ($id); return view('dia.edit', compact('dia')); } public function update(DiaRequest $request, $id){ $dia = Dia::find($id)->update($request->all()); return redirect()->route('dia'); } }
18.34
55
0.567067
b68b3008b24cf8fdafe7c53c4416e41ff0cd6a43
1,232
rs
Rust
src/scale/errors.rs
0x7CFE/rust-music-theory
55a6f22ce697ce20227e9068cf1b343dce65e124
[ "MIT" ]
511
2020-01-25T05:48:18.000Z
2022-03-26T10:35:45.000Z
src/scale/errors.rs
0x7CFE/rust-music-theory
55a6f22ce697ce20227e9068cf1b343dce65e124
[ "MIT" ]
28
2020-01-26T15:37:10.000Z
2022-01-26T19:19:13.000Z
src/scale/errors.rs
0x7CFE/rust-music-theory
55a6f22ce697ce20227e9068cf1b343dce65e124
[ "MIT" ]
25
2020-01-27T16:58:44.000Z
2022-03-06T12:32:13.000Z
use crate::interval::IntervalError; use crate::note::NoteError; use std::error; use std::fmt; #[derive(Debug, Clone)] pub enum ScaleError { InvalidInterval, ModeFromRegex, InvalidRegex, } impl fmt::Display for ScaleError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { ScaleError::InvalidInterval => { write!(f, "Can't determine the intervals for the scale scale!") } ScaleError::ModeFromRegex => write!(f, "Can't determine the mode!"), ScaleError::InvalidRegex => write!(f, "Invalid scale regex!"), } } } impl error::Error for ScaleError { fn source(&self) -> Option<&(dyn error::Error + 'static)> { None } } impl From<regex::Error> for ScaleError { fn from(e: regex::Error) -> Self { match e { _ => ScaleError::ModeFromRegex, } } } impl From<NoteError> for ScaleError { fn from(e: NoteError) -> Self { match e { _ => ScaleError::InvalidRegex, } } } impl From<IntervalError> for ScaleError { fn from(e: IntervalError) -> Self { match e { _ => ScaleError::InvalidInterval, } } }
22.814815
80
0.566558
93f6184e34aeef80eb9e5ea83ea51dc3e3f5ca30
952
cs
C#
Data Integration Framework/LegacyIntegrator/IISBlobAdapter/IISBlobDetails.cs
Infosys/Intelligent-Bot-Management-
d3c8c29963ca66852d8925d2add0ba66af180b55
[ "Apache-2.0" ]
null
null
null
Data Integration Framework/LegacyIntegrator/IISBlobAdapter/IISBlobDetails.cs
Infosys/Intelligent-Bot-Management-
d3c8c29963ca66852d8925d2add0ba66af180b55
[ "Apache-2.0" ]
null
null
null
Data Integration Framework/LegacyIntegrator/IISBlobAdapter/IISBlobDetails.cs
Infosys/Intelligent-Bot-Management-
d3c8c29963ca66852d8925d2add0ba66af180b55
[ "Apache-2.0" ]
null
null
null
/**************************************************************** Copyright 2021 Infosys Ltd. Use of this source code is governed by Apache License Version 2.0 that can be found in the LICENSE file or at http://www.apache.org/licenses/ ***************************************************************/ //using System; //using System.Collections.Generic; //using System.Linq; //using System.Text; //namespace Infosys.Lif.LegacyIntegratorService //{ // public class IISDoc // { // public string DllPath { get; set; } // public string TypeName { get; set; } // public List<IISDocDetails> IISBlobDetails { get; set; } // } // public class IISDocDetails // { // public string TransportName { get; set; } // //public string RootDNS { get; set; } // public int DataBlockSize {get;set;} // public string DocumentsVirtualDirectoryFromRoot { get; set; } // } //}
34
111
0.542017
ed4d9c29ece3f838c90905a7992bb9aea7c95f6e
394
h
C
AnimalCooking/MenuButtonRenderer.h
TenByTen-Studios/AnimalCooking
8bb22f426cdc819cefde16caa23d8eb045276be8
[ "MIT" ]
null
null
null
AnimalCooking/MenuButtonRenderer.h
TenByTen-Studios/AnimalCooking
8bb22f426cdc819cefde16caa23d8eb045276be8
[ "MIT" ]
23
2020-03-02T16:43:28.000Z
2020-04-16T09:58:08.000Z
AnimalCooking/MenuButtonRenderer.h
TenByTen-Studios/AnimalCooking
8bb22f426cdc819cefde16caa23d8eb045276be8
[ "MIT" ]
null
null
null
#pragma once #include "Component.h" #include "Transform.h" class MenuButtonRenderer : public Component { public: MenuButtonRenderer(Texture* t); ~MenuButtonRenderer() { texture = nullptr; } void setFocused(bool f) { focused = f; } void init() override; void draw() override; void setTexture(Texture* t) { texture = t; } private: Transform* tr_; Texture* texture; bool focused; };
17.130435
45
0.708122
95da4e1cfc29d9fda2f79ce0120f1939e1af776a
1,181
rb
Ruby
spec/phone_spec.rb
amymichellejohnson/phone_book
1723f2806d271b5ba81f6a5b6703a769ac805663
[ "MIT" ]
null
null
null
spec/phone_spec.rb
amymichellejohnson/phone_book
1723f2806d271b5ba81f6a5b6703a769ac805663
[ "MIT" ]
null
null
null
spec/phone_spec.rb
amymichellejohnson/phone_book
1723f2806d271b5ba81f6a5b6703a769ac805663
[ "MIT" ]
null
null
null
require("rspec") require("phone") require("contact") describe("Phone") do before() do Phone.clear() end describe (".all") do it ("is empty at first") do expect(Phone.all()).to(eq([])) end end describe("#save") do it ("adds an object (type and phone number) to the array") do test_phone = Phone.new("Cell", 5034765356) test_phone.save() expect(Phone.all()).to(eq([test_phone])) end end describe(".clear") do it ("clears all objects from the array") do Phone.new("Cell", 5034765356).save() Phone.clear() expect(Phone.all()).to(eq([])) end end describe("#id") do it ("returns unique id for each phone object based on its position in the array") do test_phone = Phone.new("Cell", 5034765356).save() test_phone2 = Phone.new("Home", 5032222222).save() expect(test_phone.id()).to(eq(1)) end end describe(".find") do it ("returns the phone object by its id number") do test_phone = Phone.new("Cell", 5034765356).save() test_phone = Phone.new("Home", 5032222222).save() expect(Phone.find(test_phone.id())).to(eq(test_phone)) end end end
24.102041
88
0.61558
43f646dee33ffffa8de7ba3b3831c00b808a535e
179
ts
TypeScript
__tests__/text_node.test.ts
MeilCli/Jfol.Ts
3ac7d4fb5c4f92ee82ed917d0d681daa1a74d78e
[ "MIT" ]
null
null
null
__tests__/text_node.test.ts
MeilCli/Jfol.Ts
3ac7d4fb5c4f92ee82ed917d0d681daa1a74d78e
[ "MIT" ]
2
2021-05-08T08:07:52.000Z
2021-05-10T16:41:13.000Z
__tests__/text_node.test.ts
MeilCli/Jfol.Ts
3ac7d4fb5c4f92ee82ed917d0d681daa1a74d78e
[ "MIT" ]
null
null
null
import { TextNode, isTextNode } from "../src/nodes/text_node"; test("isTextNode", () => { const value: TextNode = { text: "" }; expect(isTextNode(value)).toBe(true); });
25.571429
62
0.614525
0d3044e2136d8e1fb80bf77566df6ec88880452c
5,629
h
C
concept_tests/drivers/device_driver.h
jedrzejboczar/ubik-micromouse
6470368de0c3207fc278bcfa604d1fdd74aaeb8f
[ "MIT" ]
3
2019-10-30T07:37:47.000Z
2021-01-21T11:50:20.000Z
concept_tests/drivers/device_driver.h
jedrzejboczar/ubik-micromouse
6470368de0c3207fc278bcfa604d1fdd74aaeb8f
[ "MIT" ]
null
null
null
concept_tests/drivers/device_driver.h
jedrzejboczar/ubik-micromouse
6470368de0c3207fc278bcfa604d1fdd74aaeb8f
[ "MIT" ]
null
null
null
#pragma once #include <cstddef> /* * This is an interface for device configuration and control. * It operates directly on hardware. It should confgure device * based on request data and start it in interrupt mode (preferably * with DMA). After waking up from sleep it is required to either * abort() cleaning up the hardware or to prepare the response * based on hardware peration results. */ template<typename RequestData_T, typename ResponseData_T> class Device { public: using RequestData_t = RequestData_T; using ResponseData_t = ResponseData_T; // prepare the device, this function should panic! on fail virtual void configure() = 0; // start device, use given request data, configure interrupt virtual bool start_async(const RequestData_t &data) = 0; // (!) there has to be some connection between the interrupt and the RTOS component // stop device, clean it up and prepare it for another usage virtual void abort() = 0; // set the data from the device for the response virtual void prepare_response(ResponseData_t &data) = 0; }; /* * Interface implemented by the DeviceDriver. * It is required to break the cyclic reference when passing the run * method to DriverTask::set_task_runner(). */ class TaskRunner { public: virtual void run() = 0; }; /* * This is the type that is responsible for all the asynchronious * operations of a device driver. * It should define a type of Queue handles that are sent through * Requests (most probably some kind of pointer) to now where to send * the response. * It creates and manages the request queue of the driver and other * resources required to achieve the functionality. * * It should create a RTOS task/thread that will run the run() method, * which gets overwritten in DeviceDriver class depending on the device. * * We assume that pQueue_t is a pointer. * This is usually the case as we allocate queues on heap returning pointer. */ template<typename pQueue_T> class DriverTask { public: using pQueue_t = pQueue_T; // used to allocate the queue after we know the data size // it should either assert creation or provide an inmplementation of // receive_request that will never receive virtual pQueue_t create_queue(size_t queue_length, size_t data_size) = 0; // this will probably just call create_queue virtual void create_request_queue(size_t data_size) = 0; // wait for queue with some timeout, store to given reference virtual bool receive_request(void *into_buffer) = 0; // asynchronious wait for semaphore/task notification/whatever... virtual bool wait_for_isr() = 0; // send the response to the queue virtual void send_response(pQueue_t response_queue, const void *from_buffer) = 0; virtual void set_task_runner(TaskRunner *runner) = 0; // cannot have static pure virtual methods! // static bool notify(); // this should probably be deined in implementation class // and be called to end wait() }; /* * The class that implements RTOS diver logic. * It derivers methods for asynchronious operaiton based on the RTOS * used. The DriverTask should provide pure virtual method that * is the thread/task main function (so this class "takes" the * thread/task). */ template<typename DriverTask_t, typename Device_t> class DeviceDriver: TaskRunner { // types using pQueue_t = typename DriverTask_t::pQueue_t; using RequestData_t = typename Device_t::RequestData_t; using ResponseData_t = typename Device_t::ResponseData_t; Device_t &device; DriverTask_t &task; public: enum Status { OK, ERROR, // device could not be started TIMEOUT, // timeout when waiting on reponse from device }; struct Request { RequestData_t data; // e.g. poitner + size pQueue_t response_queue; // no response when null, message_type=Response bool requires_response() { return response_queue != nullptr; } }; struct Response { Status status; // ok / hardware error / hardware timeout ResponseData_t data; // e.g. pointer + size }; DeviceDriver(Device_t &device, DriverTask_t &task): device(device), task(task) { task.set_task_runner(this); } virtual void run() final { device.configure(); task.create_request_queue(sizeof(Request)); while (1) { Request request; Response response; // wait for a request in the queue while (!task.receive_request(reinterpret_cast<void *>(&request))) {} // prepare the device and its interrupt if (!device.start_async(request.data)) { response.status = Status::ERROR; } else { // wait for interrupt from device if (!task.wait_for_isr()) { response.status = Status::TIMEOUT; // force stop and clean up the device device.abort(); } else { response.status = Status::OK; // prepare data for reponse if we need to send response if (request.requires_response()) { device.prepare_response(response.data); } } } // send response if it was requested if (request.requires_response()) { task.send_response(request.response_queue, reinterpret_cast<const void *>(&response)); } } } };
33.111765
87
0.658732
06c3c7a6f5717b00db5be2b6e4a4f5cc83105d2f
667
py
Python
app/grandchallenge/reader_studies/migrations/0005_readerstudy_workstation_config.py
njmhendrix/grand-challenge.org
9bc36f5e26561a78bd405e8ea5e4c0f86c95f011
[ "Apache-2.0" ]
1
2021-02-09T10:30:44.000Z
2021-02-09T10:30:44.000Z
app/grandchallenge/reader_studies/migrations/0005_readerstudy_workstation_config.py
njmhendrix/grand-challenge.org
9bc36f5e26561a78bd405e8ea5e4c0f86c95f011
[ "Apache-2.0" ]
null
null
null
app/grandchallenge/reader_studies/migrations/0005_readerstudy_workstation_config.py
njmhendrix/grand-challenge.org
9bc36f5e26561a78bd405e8ea5e4c0f86c95f011
[ "Apache-2.0" ]
null
null
null
# Generated by Django 2.2.6 on 2019-10-15 10:05 import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("workstation_configs", "0001_initial"), ("reader_studies", "0004_auto_20191002_1322"), ] operations = [ migrations.AddField( model_name="readerstudy", name="workstation_config", field=models.ForeignKey( blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to="workstation_configs.WorkstationConfig", ), ) ]
25.653846
61
0.592204
5d1b2a4f682f4dd4ba7a71698dff5a1e231f6ddb
1,943
cpp
C++
firmware/src/main.cpp
brianpepin/lpm
969105a6374fa65c2de4e74a119d614b32e6ea2c
[ "MIT" ]
3
2020-06-02T01:23:18.000Z
2022-02-25T22:20:24.000Z
firmware/src/main.cpp
brianpepin/lpm
969105a6374fa65c2de4e74a119d614b32e6ea2c
[ "MIT" ]
null
null
null
firmware/src/main.cpp
brianpepin/lpm
969105a6374fa65c2de4e74a119d614b32e6ea2c
[ "MIT" ]
null
null
null
#include <globals.h> #include <adc.h> #include <battery.h> #include <button.h> #include <power.h> #include <flash.h> #include <logger.h> #include <views/default.h> Button buttons[] = { {PIN_UP, BUTTON_ACTIVE_LOW}, {PIN_DOWN, BUTTON_ACTIVE_LOW}, {PIN_LEFT, BUTTON_ACTIVE_LOW}, {PIN_RIGHT, BUTTON_ACTIVE_LOW}, {PIN_SELECT, BUTTON_ACTIVE_LOW} }; DPad dpad(buttons); DefaultView defaultView; View *currentView; void setup() { Serial.begin(9600); Power::init(); display.begin(); Flash::init(); Adc::init(); Battery::init(); Logger::init(); pinMode(PIN_UP, INPUT_PULLUP); pinMode(PIN_DOWN, INPUT_PULLUP); pinMode(PIN_LEFT, INPUT_PULLUP); pinMode(PIN_RIGHT, INPUT_PULLUP); pinMode(PIN_SELECT, INPUT_PULLUP); // Start reading all button state // so buttons held down during // power up are ignored. for (unsigned int i = 0; i < COUNT_OF(buttons); i++) { buttons[i].zero(); } defaultView.init(nullptr); currentView = &defaultView; } void loop() { DPad::Action action = dpad.read(); if (action.button == Button_Select) { Power::processPowerButton(action.state); } Power::tick(); if (action.state.changed || Battery::isCharging() || Logger::isLogging()) { Power::resetSleep(); } bool newReading = Adc::update(); bool updated = currentView->processDpad(action, &currentView); updated |= currentView->update(newReading); updated |= Battery::update(); if (newReading && Logger::isLogging()) { int32_t reading; Adc::read(&reading); if (reading < 0) { reading = 0; } updated |= Logger::update(reading); } if (updated) { display.firstPage(); display.setFontDirection(0); do { currentView->render(); Battery::render(); Logger::render(); } while (display.nextPage()); } if (Battery::isDepleted()) { Power::turnOff(); } }
18.158879
75
0.626866
e715274ccafc94ce501569bd536f37065f4f7415
99
php
PHP
hphp/hack/test/lint/stdlib_str_usage.php
donsbot/hhvm
ac98a590f75c569e1249b6c1145c7512c7bd240e
[ "PHP-3.01", "Zend-2.0" ]
1
2022-03-11T02:25:37.000Z
2022-03-11T02:25:37.000Z
hphp/hack/test/lint/stdlib_str_usage.php
donsbot/hhvm
ac98a590f75c569e1249b6c1145c7512c7bd240e
[ "PHP-3.01", "Zend-2.0" ]
3
2022-02-17T04:00:03.000Z
2022-03-24T03:45:33.000Z
hphp/hack/test/lint/stdlib_str_usage.php
donsbot/hhvm
ac98a590f75c569e1249b6c1145c7512c7bd240e
[ "PHP-3.01", "Zend-2.0" ]
1
2022-02-19T09:29:50.000Z
2022-02-19T09:29:50.000Z
<?hh function f() { if (strstr("asdf", "s") === false) {} if (strpos("asdf", "a") === 0) {} }
14.142857
39
0.434343
a171d957e3b3cef40aa1154ea5098142804d5c6c
35
ts
TypeScript
node_modules/intl-list-format/locale-data/ky-KG.d.ts
Meysamsarabadani/devtools-frontend
b8286ab97de4f9b16881495cd76fa40a370ea8dc
[ "BSD-3-Clause" ]
2,389
2015-06-05T05:06:05.000Z
2022-03-31T07:08:56.000Z
node_modules/intl-list-format/locale-data/ky-KG.d.ts
Meysamsarabadani/devtools-frontend
b8286ab97de4f9b16881495cd76fa40a370ea8dc
[ "BSD-3-Clause" ]
157
2016-02-03T06:03:25.000Z
2022-02-03T13:55:47.000Z
node_modules/intl-list-format/locale-data/ky-KG.d.ts
Meysamsarabadani/devtools-frontend
b8286ab97de4f9b16881495cd76fa40a370ea8dc
[ "BSD-3-Clause" ]
388
2015-10-10T12:45:24.000Z
2022-03-22T18:11:08.000Z
//# sourceMappingURL=ky-KG.d.ts.map
35
35
0.742857
0db116e70a6cac4422828c5dbbe8cb74d5db7feb
1,189
cs
C#
cv19ResSupportV3.Tests/V3/UseCase/UpdateResidentUseCaseTest.cs
LBHSPreston/cv-19-res-support-v3
20c8260bed6a43e2545ecfe3d2c5cc1a2f547f74
[ "MIT" ]
null
null
null
cv19ResSupportV3.Tests/V3/UseCase/UpdateResidentUseCaseTest.cs
LBHSPreston/cv-19-res-support-v3
20c8260bed6a43e2545ecfe3d2c5cc1a2f547f74
[ "MIT" ]
5
2020-11-26T11:25:21.000Z
2021-09-24T11:29:06.000Z
cv19ResSupportV3.Tests/V3/UseCase/UpdateResidentUseCaseTest.cs
LBHackney-IT/cv-19-res-support-v3
ce3c54ac9307966be16efa567c6d3810da7d2e67
[ "MIT" ]
null
null
null
using System.Runtime.InteropServices; using cv19ResSupportV3.V3.Domain; using cv19ResSupportV3.V3.Domain.Commands; using cv19ResSupportV3.V3.Factories.Commands; using cv19ResSupportV3.V3.Gateways; using cv19ResSupportV3.V3.UseCase; using FluentAssertions; using Moq; using NUnit.Framework; namespace cv19ResSupportV3.Tests.V3.UseCase { public class UpdateResidentUseCaseTest { private Mock<IResidentGateway> _mockGateway; private UpdateResidentUseCase _classUnderTest; [SetUp] public void SetUp() { _mockGateway = new Mock<IResidentGateway>(); _classUnderTest = new UpdateResidentUseCase(_mockGateway.Object); } [Test] public void CanUpdateAResident() { var resident = new Resident(); _mockGateway.Setup(s => s.UpdateResident(It.IsAny<int>(), It.IsAny<UpdateResident>())).Returns(resident); var response = _classUnderTest.Execute(resident.Id, new UpdateResident()); _mockGateway.Verify(m => m.UpdateResident(It.IsAny<int>(), It.IsAny<UpdateResident>()), Times.Once()); response.Should().Be(resident); } } }
30.487179
117
0.679563
322fb14e9d2ad30a2be117f0db08935225c62714
72
sh
Shell
scripts/stop-system-monitor.sh
pientaa/opening-black-box
9fa3ecd5298a940893f289550d441a38b0bee71d
[ "Apache-2.0" ]
null
null
null
scripts/stop-system-monitor.sh
pientaa/opening-black-box
9fa3ecd5298a940893f289550d441a38b0bee71d
[ "Apache-2.0" ]
24
2020-12-31T09:21:55.000Z
2021-06-16T12:06:00.000Z
scripts/stop-system-monitor.sh
pientaa/opening-black-box
9fa3ecd5298a940893f289550d441a38b0bee71d
[ "Apache-2.0" ]
null
null
null
#!/bin/bash kill -9 $(ps -aux | grep system-monitor | awk '{print $2}')
24
59
0.597222
a96881e9a9375d59c083c41d9058f29ea62a0575
167,268
html
HTML
Documentation/js/html/webgl/RenderingContext.html
babylonhx/babylonHX-Legacy
76c7c40cd783c573c5127e4f87954cfcf402efba
[ "Apache-2.0" ]
1
2015-03-08T20:00:01.000Z
2015-03-08T20:00:01.000Z
Documentation/js/html/webgl/RenderingContext.html
babylonhx/babylonHX-Legacy
76c7c40cd783c573c5127e4f87954cfcf402efba
[ "Apache-2.0" ]
null
null
null
Documentation/js/html/webgl/RenderingContext.html
babylonhx/babylonHX-Legacy
76c7c40cd783c573c5127e4f87954cfcf402efba
[ "Apache-2.0" ]
null
null
null
<!DOCTYPE html> <html lang="en"><head><meta charset="utf-8"/><link href="../../../bootstrap-combined.min.css" rel="stylesheet" /><script type="text/javascript" src="../../../jquery-1.9.1.min.js"></script><script type="text/javascript" src="../../../bootstrap.min.js"></script><link href="../../../styles.css" rel="stylesheet" /><link rel="icon" href="../../../favicon.ico" type="image/x-icon"></link><script type="text/javascript" src="../../../nav.js"></script><script type="text/javascript" src="../../../index.js"></script><script type="text/javascript">var dox = {rootPath: "../../../",platforms: ["types"]};</script><title>RenderingContext</title></head><body><div class="navbar navbar-inverse navbar-fixed-top"><div class="navbar-inner"><form class="navbar-search pull-left" id="searchForm"><input id="search" type="text" class="search-query" placeholder="Filter" autocomplete="off"/></form><ul class="nav"><li id="select-platform" class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">Platform<b class="caret"></b></a><ul class="dropdown-menu"><li data="all"><a href="#">All Platforms</a></li><li data="types"><a href="#">types</a></li></ul></li></ul></div></div><div id="container"><div id="nav"></div><div id="content"><div class="header"><h1><code><span class="directive">class </span><span class="type">js.html.webgl.RenderingContext</span><span class="keyword"> extends</span> <a class="type" href="../../../js/html/CanvasRenderingContext.html">CanvasRenderingContext</a></code></h1></div><div class="body"><p class="availability">Available on all platforms</p><div class="doc"><p></p></div><h2>Class Fields</h2><div class="platform platform-types"><a name="ACTIVE_ATTRIBUTES"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#ACTIVE_ATTRIBUTES"><span class="identifier">ACTIVE_ATTRIBUTES</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="ACTIVE_TEXTURE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#ACTIVE_TEXTURE"><span class="identifier">ACTIVE_TEXTURE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="ACTIVE_UNIFORMS"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#ACTIVE_UNIFORMS"><span class="identifier">ACTIVE_UNIFORMS</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="ALIASED_LINE_WIDTH_RANGE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#ALIASED_LINE_WIDTH_RANGE"><span class="identifier">ALIASED_LINE_WIDTH_RANGE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="ALIASED_POINT_SIZE_RANGE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#ALIASED_POINT_SIZE_RANGE"><span class="identifier">ALIASED_POINT_SIZE_RANGE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="ALPHA"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#ALPHA"><span class="identifier">ALPHA</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="ALPHA_BITS"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#ALPHA_BITS"><span class="identifier">ALPHA_BITS</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="ALWAYS"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#ALWAYS"><span class="identifier">ALWAYS</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="ARRAY_BUFFER"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#ARRAY_BUFFER"><span class="identifier">ARRAY_BUFFER</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="ARRAY_BUFFER_BINDING"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#ARRAY_BUFFER_BINDING"><span class="identifier">ARRAY_BUFFER_BINDING</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="ATTACHED_SHADERS"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#ATTACHED_SHADERS"><span class="identifier">ATTACHED_SHADERS</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="BACK"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#BACK"><span class="identifier">BACK</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="BLEND"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#BLEND"><span class="identifier">BLEND</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="BLEND_COLOR"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#BLEND_COLOR"><span class="identifier">BLEND_COLOR</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="BLEND_DST_ALPHA"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#BLEND_DST_ALPHA"><span class="identifier">BLEND_DST_ALPHA</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="BLEND_DST_RGB"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#BLEND_DST_RGB"><span class="identifier">BLEND_DST_RGB</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="BLEND_EQUATION"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#BLEND_EQUATION"><span class="identifier">BLEND_EQUATION</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="BLEND_EQUATION_ALPHA"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#BLEND_EQUATION_ALPHA"><span class="identifier">BLEND_EQUATION_ALPHA</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="BLEND_EQUATION_RGB"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#BLEND_EQUATION_RGB"><span class="identifier">BLEND_EQUATION_RGB</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="BLEND_SRC_ALPHA"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#BLEND_SRC_ALPHA"><span class="identifier">BLEND_SRC_ALPHA</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="BLEND_SRC_RGB"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#BLEND_SRC_RGB"><span class="identifier">BLEND_SRC_RGB</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="BLUE_BITS"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#BLUE_BITS"><span class="identifier">BLUE_BITS</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="BOOL"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#BOOL"><span class="identifier">BOOL</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="BOOL_VEC2"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#BOOL_VEC2"><span class="identifier">BOOL_VEC2</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="BOOL_VEC3"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#BOOL_VEC3"><span class="identifier">BOOL_VEC3</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="BOOL_VEC4"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#BOOL_VEC4"><span class="identifier">BOOL_VEC4</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="BROWSER_DEFAULT_WEBGL"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#BROWSER_DEFAULT_WEBGL"><span class="identifier">BROWSER_DEFAULT_WEBGL</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="BUFFER_SIZE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#BUFFER_SIZE"><span class="identifier">BUFFER_SIZE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="BUFFER_USAGE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#BUFFER_USAGE"><span class="identifier">BUFFER_USAGE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="BYTE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#BYTE"><span class="identifier">BYTE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="CCW"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#CCW"><span class="identifier">CCW</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="CLAMP_TO_EDGE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#CLAMP_TO_EDGE"><span class="identifier">CLAMP_TO_EDGE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="COLOR_ATTACHMENT0"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#COLOR_ATTACHMENT0"><span class="identifier">COLOR_ATTACHMENT0</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="COLOR_BUFFER_BIT"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#COLOR_BUFFER_BIT"><span class="identifier">COLOR_BUFFER_BIT</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="COLOR_CLEAR_VALUE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#COLOR_CLEAR_VALUE"><span class="identifier">COLOR_CLEAR_VALUE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="COLOR_WRITEMASK"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#COLOR_WRITEMASK"><span class="identifier">COLOR_WRITEMASK</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="COMPILE_STATUS"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#COMPILE_STATUS"><span class="identifier">COMPILE_STATUS</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="COMPRESSED_TEXTURE_FORMATS"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#COMPRESSED_TEXTURE_FORMATS"><span class="identifier">COMPRESSED_TEXTURE_FORMATS</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="CONSTANT_ALPHA"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#CONSTANT_ALPHA"><span class="identifier">CONSTANT_ALPHA</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="CONSTANT_COLOR"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#CONSTANT_COLOR"><span class="identifier">CONSTANT_COLOR</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="CONTEXT_LOST_WEBGL"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#CONTEXT_LOST_WEBGL"><span class="identifier">CONTEXT_LOST_WEBGL</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="CULL_FACE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#CULL_FACE"><span class="identifier">CULL_FACE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="CULL_FACE_MODE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#CULL_FACE_MODE"><span class="identifier">CULL_FACE_MODE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="CURRENT_PROGRAM"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#CURRENT_PROGRAM"><span class="identifier">CURRENT_PROGRAM</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="CURRENT_VERTEX_ATTRIB"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#CURRENT_VERTEX_ATTRIB"><span class="identifier">CURRENT_VERTEX_ATTRIB</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="CW"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#CW"><span class="identifier">CW</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="DECR"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#DECR"><span class="identifier">DECR</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="DECR_WRAP"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#DECR_WRAP"><span class="identifier">DECR_WRAP</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="DELETE_STATUS"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#DELETE_STATUS"><span class="identifier">DELETE_STATUS</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="DEPTH_ATTACHMENT"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#DEPTH_ATTACHMENT"><span class="identifier">DEPTH_ATTACHMENT</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="DEPTH_BITS"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#DEPTH_BITS"><span class="identifier">DEPTH_BITS</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="DEPTH_BUFFER_BIT"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#DEPTH_BUFFER_BIT"><span class="identifier">DEPTH_BUFFER_BIT</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="DEPTH_CLEAR_VALUE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#DEPTH_CLEAR_VALUE"><span class="identifier">DEPTH_CLEAR_VALUE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="DEPTH_COMPONENT"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#DEPTH_COMPONENT"><span class="identifier">DEPTH_COMPONENT</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="DEPTH_COMPONENT16"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#DEPTH_COMPONENT16"><span class="identifier">DEPTH_COMPONENT16</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="DEPTH_FUNC"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#DEPTH_FUNC"><span class="identifier">DEPTH_FUNC</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="DEPTH_RANGE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#DEPTH_RANGE"><span class="identifier">DEPTH_RANGE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="DEPTH_STENCIL"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#DEPTH_STENCIL"><span class="identifier">DEPTH_STENCIL</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="DEPTH_STENCIL_ATTACHMENT"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#DEPTH_STENCIL_ATTACHMENT"><span class="identifier">DEPTH_STENCIL_ATTACHMENT</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="DEPTH_TEST"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#DEPTH_TEST"><span class="identifier">DEPTH_TEST</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="DEPTH_WRITEMASK"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#DEPTH_WRITEMASK"><span class="identifier">DEPTH_WRITEMASK</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="DITHER"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#DITHER"><span class="identifier">DITHER</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="DONT_CARE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#DONT_CARE"><span class="identifier">DONT_CARE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="DST_ALPHA"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#DST_ALPHA"><span class="identifier">DST_ALPHA</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="DST_COLOR"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#DST_COLOR"><span class="identifier">DST_COLOR</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="DYNAMIC_DRAW"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#DYNAMIC_DRAW"><span class="identifier">DYNAMIC_DRAW</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="ELEMENT_ARRAY_BUFFER"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#ELEMENT_ARRAY_BUFFER"><span class="identifier">ELEMENT_ARRAY_BUFFER</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="ELEMENT_ARRAY_BUFFER_BINDING"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#ELEMENT_ARRAY_BUFFER_BINDING"><span class="identifier">ELEMENT_ARRAY_BUFFER_BINDING</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="EQUAL"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#EQUAL"><span class="identifier">EQUAL</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="FASTEST"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#FASTEST"><span class="identifier">FASTEST</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="FLOAT"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#FLOAT"><span class="identifier">FLOAT</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="FLOAT_MAT2"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#FLOAT_MAT2"><span class="identifier">FLOAT_MAT2</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="FLOAT_MAT3"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#FLOAT_MAT3"><span class="identifier">FLOAT_MAT3</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="FLOAT_MAT4"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#FLOAT_MAT4"><span class="identifier">FLOAT_MAT4</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="FLOAT_VEC2"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#FLOAT_VEC2"><span class="identifier">FLOAT_VEC2</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="FLOAT_VEC3"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#FLOAT_VEC3"><span class="identifier">FLOAT_VEC3</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="FLOAT_VEC4"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#FLOAT_VEC4"><span class="identifier">FLOAT_VEC4</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="FRAGMENT_SHADER"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#FRAGMENT_SHADER"><span class="identifier">FRAGMENT_SHADER</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="FRAMEBUFFER"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#FRAMEBUFFER"><span class="identifier">FRAMEBUFFER</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="FRAMEBUFFER_ATTACHMENT_OBJECT_NAME"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#FRAMEBUFFER_ATTACHMENT_OBJECT_NAME"><span class="identifier">FRAMEBUFFER_ATTACHMENT_OBJECT_NAME</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE"><span class="identifier">FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE"><span class="identifier">FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL"><span class="identifier">FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="FRAMEBUFFER_BINDING"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#FRAMEBUFFER_BINDING"><span class="identifier">FRAMEBUFFER_BINDING</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="FRAMEBUFFER_COMPLETE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#FRAMEBUFFER_COMPLETE"><span class="identifier">FRAMEBUFFER_COMPLETE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="FRAMEBUFFER_INCOMPLETE_ATTACHMENT"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#FRAMEBUFFER_INCOMPLETE_ATTACHMENT"><span class="identifier">FRAMEBUFFER_INCOMPLETE_ATTACHMENT</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="FRAMEBUFFER_INCOMPLETE_DIMENSIONS"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#FRAMEBUFFER_INCOMPLETE_DIMENSIONS"><span class="identifier">FRAMEBUFFER_INCOMPLETE_DIMENSIONS</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT"><span class="identifier">FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="FRAMEBUFFER_UNSUPPORTED"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#FRAMEBUFFER_UNSUPPORTED"><span class="identifier">FRAMEBUFFER_UNSUPPORTED</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="FRONT"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#FRONT"><span class="identifier">FRONT</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="FRONT_AND_BACK"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#FRONT_AND_BACK"><span class="identifier">FRONT_AND_BACK</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="FRONT_FACE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#FRONT_FACE"><span class="identifier">FRONT_FACE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="FUNC_ADD"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#FUNC_ADD"><span class="identifier">FUNC_ADD</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="FUNC_REVERSE_SUBTRACT"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#FUNC_REVERSE_SUBTRACT"><span class="identifier">FUNC_REVERSE_SUBTRACT</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="FUNC_SUBTRACT"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#FUNC_SUBTRACT"><span class="identifier">FUNC_SUBTRACT</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="GENERATE_MIPMAP_HINT"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#GENERATE_MIPMAP_HINT"><span class="identifier">GENERATE_MIPMAP_HINT</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="GEQUAL"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#GEQUAL"><span class="identifier">GEQUAL</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="GREATER"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#GREATER"><span class="identifier">GREATER</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="GREEN_BITS"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#GREEN_BITS"><span class="identifier">GREEN_BITS</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="HIGH_FLOAT"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#HIGH_FLOAT"><span class="identifier">HIGH_FLOAT</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="HIGH_INT"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#HIGH_INT"><span class="identifier">HIGH_INT</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="INCR"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#INCR"><span class="identifier">INCR</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="INCR_WRAP"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#INCR_WRAP"><span class="identifier">INCR_WRAP</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="INT"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#INT"><span class="identifier">INT</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="INT_VEC2"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#INT_VEC2"><span class="identifier">INT_VEC2</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="INT_VEC3"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#INT_VEC3"><span class="identifier">INT_VEC3</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="INT_VEC4"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#INT_VEC4"><span class="identifier">INT_VEC4</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="INVALID_ENUM"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#INVALID_ENUM"><span class="identifier">INVALID_ENUM</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="INVALID_FRAMEBUFFER_OPERATION"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#INVALID_FRAMEBUFFER_OPERATION"><span class="identifier">INVALID_FRAMEBUFFER_OPERATION</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="INVALID_OPERATION"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#INVALID_OPERATION"><span class="identifier">INVALID_OPERATION</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="INVALID_VALUE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#INVALID_VALUE"><span class="identifier">INVALID_VALUE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="INVERT"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#INVERT"><span class="identifier">INVERT</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="KEEP"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#KEEP"><span class="identifier">KEEP</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="LEQUAL"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#LEQUAL"><span class="identifier">LEQUAL</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="LESS"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#LESS"><span class="identifier">LESS</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="LINEAR"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#LINEAR"><span class="identifier">LINEAR</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="LINEAR_MIPMAP_LINEAR"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#LINEAR_MIPMAP_LINEAR"><span class="identifier">LINEAR_MIPMAP_LINEAR</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="LINEAR_MIPMAP_NEAREST"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#LINEAR_MIPMAP_NEAREST"><span class="identifier">LINEAR_MIPMAP_NEAREST</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="LINES"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#LINES"><span class="identifier">LINES</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="LINE_LOOP"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#LINE_LOOP"><span class="identifier">LINE_LOOP</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="LINE_STRIP"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#LINE_STRIP"><span class="identifier">LINE_STRIP</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="LINE_WIDTH"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#LINE_WIDTH"><span class="identifier">LINE_WIDTH</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="LINK_STATUS"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#LINK_STATUS"><span class="identifier">LINK_STATUS</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="LOW_FLOAT"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#LOW_FLOAT"><span class="identifier">LOW_FLOAT</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="LOW_INT"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#LOW_INT"><span class="identifier">LOW_INT</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="LUMINANCE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#LUMINANCE"><span class="identifier">LUMINANCE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="LUMINANCE_ALPHA"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#LUMINANCE_ALPHA"><span class="identifier">LUMINANCE_ALPHA</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="MAX_COMBINED_TEXTURE_IMAGE_UNITS"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#MAX_COMBINED_TEXTURE_IMAGE_UNITS"><span class="identifier">MAX_COMBINED_TEXTURE_IMAGE_UNITS</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="MAX_CUBE_MAP_TEXTURE_SIZE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#MAX_CUBE_MAP_TEXTURE_SIZE"><span class="identifier">MAX_CUBE_MAP_TEXTURE_SIZE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="MAX_FRAGMENT_UNIFORM_VECTORS"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#MAX_FRAGMENT_UNIFORM_VECTORS"><span class="identifier">MAX_FRAGMENT_UNIFORM_VECTORS</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="MAX_RENDERBUFFER_SIZE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#MAX_RENDERBUFFER_SIZE"><span class="identifier">MAX_RENDERBUFFER_SIZE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="MAX_TEXTURE_IMAGE_UNITS"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#MAX_TEXTURE_IMAGE_UNITS"><span class="identifier">MAX_TEXTURE_IMAGE_UNITS</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="MAX_TEXTURE_SIZE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#MAX_TEXTURE_SIZE"><span class="identifier">MAX_TEXTURE_SIZE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="MAX_VARYING_VECTORS"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#MAX_VARYING_VECTORS"><span class="identifier">MAX_VARYING_VECTORS</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="MAX_VERTEX_ATTRIBS"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#MAX_VERTEX_ATTRIBS"><span class="identifier">MAX_VERTEX_ATTRIBS</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="MAX_VERTEX_TEXTURE_IMAGE_UNITS"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#MAX_VERTEX_TEXTURE_IMAGE_UNITS"><span class="identifier">MAX_VERTEX_TEXTURE_IMAGE_UNITS</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="MAX_VERTEX_UNIFORM_VECTORS"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#MAX_VERTEX_UNIFORM_VECTORS"><span class="identifier">MAX_VERTEX_UNIFORM_VECTORS</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="MAX_VIEWPORT_DIMS"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#MAX_VIEWPORT_DIMS"><span class="identifier">MAX_VIEWPORT_DIMS</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="MEDIUM_FLOAT"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#MEDIUM_FLOAT"><span class="identifier">MEDIUM_FLOAT</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="MEDIUM_INT"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#MEDIUM_INT"><span class="identifier">MEDIUM_INT</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="MIRRORED_REPEAT"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#MIRRORED_REPEAT"><span class="identifier">MIRRORED_REPEAT</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="NEAREST"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#NEAREST"><span class="identifier">NEAREST</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="NEAREST_MIPMAP_LINEAR"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#NEAREST_MIPMAP_LINEAR"><span class="identifier">NEAREST_MIPMAP_LINEAR</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="NEAREST_MIPMAP_NEAREST"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#NEAREST_MIPMAP_NEAREST"><span class="identifier">NEAREST_MIPMAP_NEAREST</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="NEVER"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#NEVER"><span class="identifier">NEVER</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="NICEST"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#NICEST"><span class="identifier">NICEST</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="NONE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#NONE"><span class="identifier">NONE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="NOTEQUAL"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#NOTEQUAL"><span class="identifier">NOTEQUAL</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="NO_ERROR"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#NO_ERROR"><span class="identifier">NO_ERROR</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="ONE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#ONE"><span class="identifier">ONE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="ONE_MINUS_CONSTANT_ALPHA"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#ONE_MINUS_CONSTANT_ALPHA"><span class="identifier">ONE_MINUS_CONSTANT_ALPHA</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="ONE_MINUS_CONSTANT_COLOR"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#ONE_MINUS_CONSTANT_COLOR"><span class="identifier">ONE_MINUS_CONSTANT_COLOR</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="ONE_MINUS_DST_ALPHA"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#ONE_MINUS_DST_ALPHA"><span class="identifier">ONE_MINUS_DST_ALPHA</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="ONE_MINUS_DST_COLOR"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#ONE_MINUS_DST_COLOR"><span class="identifier">ONE_MINUS_DST_COLOR</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="ONE_MINUS_SRC_ALPHA"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#ONE_MINUS_SRC_ALPHA"><span class="identifier">ONE_MINUS_SRC_ALPHA</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="ONE_MINUS_SRC_COLOR"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#ONE_MINUS_SRC_COLOR"><span class="identifier">ONE_MINUS_SRC_COLOR</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="OUT_OF_MEMORY"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#OUT_OF_MEMORY"><span class="identifier">OUT_OF_MEMORY</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="PACK_ALIGNMENT"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#PACK_ALIGNMENT"><span class="identifier">PACK_ALIGNMENT</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="POINTS"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#POINTS"><span class="identifier">POINTS</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="POLYGON_OFFSET_FACTOR"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#POLYGON_OFFSET_FACTOR"><span class="identifier">POLYGON_OFFSET_FACTOR</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="POLYGON_OFFSET_FILL"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#POLYGON_OFFSET_FILL"><span class="identifier">POLYGON_OFFSET_FILL</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="POLYGON_OFFSET_UNITS"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#POLYGON_OFFSET_UNITS"><span class="identifier">POLYGON_OFFSET_UNITS</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="RED_BITS"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#RED_BITS"><span class="identifier">RED_BITS</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="RENDERBUFFER"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#RENDERBUFFER"><span class="identifier">RENDERBUFFER</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="RENDERBUFFER_ALPHA_SIZE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#RENDERBUFFER_ALPHA_SIZE"><span class="identifier">RENDERBUFFER_ALPHA_SIZE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="RENDERBUFFER_BINDING"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#RENDERBUFFER_BINDING"><span class="identifier">RENDERBUFFER_BINDING</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="RENDERBUFFER_BLUE_SIZE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#RENDERBUFFER_BLUE_SIZE"><span class="identifier">RENDERBUFFER_BLUE_SIZE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="RENDERBUFFER_DEPTH_SIZE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#RENDERBUFFER_DEPTH_SIZE"><span class="identifier">RENDERBUFFER_DEPTH_SIZE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="RENDERBUFFER_GREEN_SIZE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#RENDERBUFFER_GREEN_SIZE"><span class="identifier">RENDERBUFFER_GREEN_SIZE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="RENDERBUFFER_HEIGHT"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#RENDERBUFFER_HEIGHT"><span class="identifier">RENDERBUFFER_HEIGHT</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="RENDERBUFFER_INTERNAL_FORMAT"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#RENDERBUFFER_INTERNAL_FORMAT"><span class="identifier">RENDERBUFFER_INTERNAL_FORMAT</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="RENDERBUFFER_RED_SIZE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#RENDERBUFFER_RED_SIZE"><span class="identifier">RENDERBUFFER_RED_SIZE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="RENDERBUFFER_STENCIL_SIZE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#RENDERBUFFER_STENCIL_SIZE"><span class="identifier">RENDERBUFFER_STENCIL_SIZE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="RENDERBUFFER_WIDTH"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#RENDERBUFFER_WIDTH"><span class="identifier">RENDERBUFFER_WIDTH</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="RENDERER"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#RENDERER"><span class="identifier">RENDERER</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="REPEAT"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#REPEAT"><span class="identifier">REPEAT</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="REPLACE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#REPLACE"><span class="identifier">REPLACE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="RGB"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#RGB"><span class="identifier">RGB</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="RGB565"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#RGB565"><span class="identifier">RGB565</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="RGB5_A1"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#RGB5_A1"><span class="identifier">RGB5_A1</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="RGBA"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#RGBA"><span class="identifier">RGBA</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="RGBA4"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#RGBA4"><span class="identifier">RGBA4</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="SAMPLER_2D"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#SAMPLER_2D"><span class="identifier">SAMPLER_2D</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="SAMPLER_CUBE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#SAMPLER_CUBE"><span class="identifier">SAMPLER_CUBE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="SAMPLES"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#SAMPLES"><span class="identifier">SAMPLES</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="SAMPLE_ALPHA_TO_COVERAGE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#SAMPLE_ALPHA_TO_COVERAGE"><span class="identifier">SAMPLE_ALPHA_TO_COVERAGE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="SAMPLE_BUFFERS"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#SAMPLE_BUFFERS"><span class="identifier">SAMPLE_BUFFERS</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="SAMPLE_COVERAGE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#SAMPLE_COVERAGE"><span class="identifier">SAMPLE_COVERAGE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="SAMPLE_COVERAGE_INVERT"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#SAMPLE_COVERAGE_INVERT"><span class="identifier">SAMPLE_COVERAGE_INVERT</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="SAMPLE_COVERAGE_VALUE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#SAMPLE_COVERAGE_VALUE"><span class="identifier">SAMPLE_COVERAGE_VALUE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="SCISSOR_BOX"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#SCISSOR_BOX"><span class="identifier">SCISSOR_BOX</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="SCISSOR_TEST"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#SCISSOR_TEST"><span class="identifier">SCISSOR_TEST</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="SHADER_TYPE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#SHADER_TYPE"><span class="identifier">SHADER_TYPE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="SHADING_LANGUAGE_VERSION"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#SHADING_LANGUAGE_VERSION"><span class="identifier">SHADING_LANGUAGE_VERSION</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="SHORT"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#SHORT"><span class="identifier">SHORT</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="SRC_ALPHA"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#SRC_ALPHA"><span class="identifier">SRC_ALPHA</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="SRC_ALPHA_SATURATE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#SRC_ALPHA_SATURATE"><span class="identifier">SRC_ALPHA_SATURATE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="SRC_COLOR"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#SRC_COLOR"><span class="identifier">SRC_COLOR</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="STATIC_DRAW"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#STATIC_DRAW"><span class="identifier">STATIC_DRAW</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="STENCIL_ATTACHMENT"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#STENCIL_ATTACHMENT"><span class="identifier">STENCIL_ATTACHMENT</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="STENCIL_BACK_FAIL"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#STENCIL_BACK_FAIL"><span class="identifier">STENCIL_BACK_FAIL</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="STENCIL_BACK_FUNC"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#STENCIL_BACK_FUNC"><span class="identifier">STENCIL_BACK_FUNC</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="STENCIL_BACK_PASS_DEPTH_FAIL"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#STENCIL_BACK_PASS_DEPTH_FAIL"><span class="identifier">STENCIL_BACK_PASS_DEPTH_FAIL</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="STENCIL_BACK_PASS_DEPTH_PASS"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#STENCIL_BACK_PASS_DEPTH_PASS"><span class="identifier">STENCIL_BACK_PASS_DEPTH_PASS</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="STENCIL_BACK_REF"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#STENCIL_BACK_REF"><span class="identifier">STENCIL_BACK_REF</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="STENCIL_BACK_VALUE_MASK"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#STENCIL_BACK_VALUE_MASK"><span class="identifier">STENCIL_BACK_VALUE_MASK</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="STENCIL_BACK_WRITEMASK"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#STENCIL_BACK_WRITEMASK"><span class="identifier">STENCIL_BACK_WRITEMASK</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="STENCIL_BITS"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#STENCIL_BITS"><span class="identifier">STENCIL_BITS</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="STENCIL_BUFFER_BIT"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#STENCIL_BUFFER_BIT"><span class="identifier">STENCIL_BUFFER_BIT</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="STENCIL_CLEAR_VALUE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#STENCIL_CLEAR_VALUE"><span class="identifier">STENCIL_CLEAR_VALUE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="STENCIL_FAIL"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#STENCIL_FAIL"><span class="identifier">STENCIL_FAIL</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="STENCIL_FUNC"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#STENCIL_FUNC"><span class="identifier">STENCIL_FUNC</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="STENCIL_INDEX"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#STENCIL_INDEX"><span class="identifier">STENCIL_INDEX</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="STENCIL_INDEX8"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#STENCIL_INDEX8"><span class="identifier">STENCIL_INDEX8</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="STENCIL_PASS_DEPTH_FAIL"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#STENCIL_PASS_DEPTH_FAIL"><span class="identifier">STENCIL_PASS_DEPTH_FAIL</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="STENCIL_PASS_DEPTH_PASS"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#STENCIL_PASS_DEPTH_PASS"><span class="identifier">STENCIL_PASS_DEPTH_PASS</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="STENCIL_REF"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#STENCIL_REF"><span class="identifier">STENCIL_REF</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="STENCIL_TEST"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#STENCIL_TEST"><span class="identifier">STENCIL_TEST</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="STENCIL_VALUE_MASK"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#STENCIL_VALUE_MASK"><span class="identifier">STENCIL_VALUE_MASK</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="STENCIL_WRITEMASK"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#STENCIL_WRITEMASK"><span class="identifier">STENCIL_WRITEMASK</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="STREAM_DRAW"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#STREAM_DRAW"><span class="identifier">STREAM_DRAW</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="SUBPIXEL_BITS"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#SUBPIXEL_BITS"><span class="identifier">SUBPIXEL_BITS</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE"><span class="identifier">TEXTURE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE0"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE0"><span class="identifier">TEXTURE0</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE1"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE1"><span class="identifier">TEXTURE1</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE10"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE10"><span class="identifier">TEXTURE10</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE11"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE11"><span class="identifier">TEXTURE11</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE12"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE12"><span class="identifier">TEXTURE12</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE13"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE13"><span class="identifier">TEXTURE13</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE14"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE14"><span class="identifier">TEXTURE14</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE15"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE15"><span class="identifier">TEXTURE15</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE16"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE16"><span class="identifier">TEXTURE16</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE17"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE17"><span class="identifier">TEXTURE17</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE18"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE18"><span class="identifier">TEXTURE18</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE19"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE19"><span class="identifier">TEXTURE19</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE2"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE2"><span class="identifier">TEXTURE2</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE20"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE20"><span class="identifier">TEXTURE20</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE21"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE21"><span class="identifier">TEXTURE21</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE22"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE22"><span class="identifier">TEXTURE22</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE23"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE23"><span class="identifier">TEXTURE23</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE24"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE24"><span class="identifier">TEXTURE24</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE25"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE25"><span class="identifier">TEXTURE25</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE26"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE26"><span class="identifier">TEXTURE26</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE27"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE27"><span class="identifier">TEXTURE27</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE28"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE28"><span class="identifier">TEXTURE28</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE29"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE29"><span class="identifier">TEXTURE29</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE3"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE3"><span class="identifier">TEXTURE3</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE30"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE30"><span class="identifier">TEXTURE30</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE31"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE31"><span class="identifier">TEXTURE31</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE4"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE4"><span class="identifier">TEXTURE4</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE5"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE5"><span class="identifier">TEXTURE5</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE6"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE6"><span class="identifier">TEXTURE6</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE7"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE7"><span class="identifier">TEXTURE7</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE8"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE8"><span class="identifier">TEXTURE8</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE9"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE9"><span class="identifier">TEXTURE9</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE_2D"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE_2D"><span class="identifier">TEXTURE_2D</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE_BINDING_2D"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE_BINDING_2D"><span class="identifier">TEXTURE_BINDING_2D</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE_BINDING_CUBE_MAP"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE_BINDING_CUBE_MAP"><span class="identifier">TEXTURE_BINDING_CUBE_MAP</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE_CUBE_MAP"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE_CUBE_MAP"><span class="identifier">TEXTURE_CUBE_MAP</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE_CUBE_MAP_NEGATIVE_X"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE_CUBE_MAP_NEGATIVE_X"><span class="identifier">TEXTURE_CUBE_MAP_NEGATIVE_X</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE_CUBE_MAP_NEGATIVE_Y"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE_CUBE_MAP_NEGATIVE_Y"><span class="identifier">TEXTURE_CUBE_MAP_NEGATIVE_Y</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE_CUBE_MAP_NEGATIVE_Z"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE_CUBE_MAP_NEGATIVE_Z"><span class="identifier">TEXTURE_CUBE_MAP_NEGATIVE_Z</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE_CUBE_MAP_POSITIVE_X"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE_CUBE_MAP_POSITIVE_X"><span class="identifier">TEXTURE_CUBE_MAP_POSITIVE_X</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE_CUBE_MAP_POSITIVE_Y"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE_CUBE_MAP_POSITIVE_Y"><span class="identifier">TEXTURE_CUBE_MAP_POSITIVE_Y</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE_CUBE_MAP_POSITIVE_Z"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE_CUBE_MAP_POSITIVE_Z"><span class="identifier">TEXTURE_CUBE_MAP_POSITIVE_Z</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE_MAG_FILTER"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE_MAG_FILTER"><span class="identifier">TEXTURE_MAG_FILTER</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE_MIN_FILTER"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE_MIN_FILTER"><span class="identifier">TEXTURE_MIN_FILTER</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE_WRAP_S"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE_WRAP_S"><span class="identifier">TEXTURE_WRAP_S</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TEXTURE_WRAP_T"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TEXTURE_WRAP_T"><span class="identifier">TEXTURE_WRAP_T</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TRIANGLES"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TRIANGLES"><span class="identifier">TRIANGLES</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TRIANGLE_FAN"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TRIANGLE_FAN"><span class="identifier">TRIANGLE_FAN</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="TRIANGLE_STRIP"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#TRIANGLE_STRIP"><span class="identifier">TRIANGLE_STRIP</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="UNPACK_ALIGNMENT"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#UNPACK_ALIGNMENT"><span class="identifier">UNPACK_ALIGNMENT</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="UNPACK_COLORSPACE_CONVERSION_WEBGL"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#UNPACK_COLORSPACE_CONVERSION_WEBGL"><span class="identifier">UNPACK_COLORSPACE_CONVERSION_WEBGL</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="UNPACK_FLIP_Y_WEBGL"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#UNPACK_FLIP_Y_WEBGL"><span class="identifier">UNPACK_FLIP_Y_WEBGL</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="UNPACK_PREMULTIPLY_ALPHA_WEBGL"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#UNPACK_PREMULTIPLY_ALPHA_WEBGL"><span class="identifier">UNPACK_PREMULTIPLY_ALPHA_WEBGL</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="UNSIGNED_BYTE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#UNSIGNED_BYTE"><span class="identifier">UNSIGNED_BYTE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="UNSIGNED_INT"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#UNSIGNED_INT"><span class="identifier">UNSIGNED_INT</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="UNSIGNED_SHORT"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#UNSIGNED_SHORT"><span class="identifier">UNSIGNED_SHORT</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="UNSIGNED_SHORT_4_4_4_4"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#UNSIGNED_SHORT_4_4_4_4"><span class="identifier">UNSIGNED_SHORT_4_4_4_4</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="UNSIGNED_SHORT_5_5_5_1"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#UNSIGNED_SHORT_5_5_5_1"><span class="identifier">UNSIGNED_SHORT_5_5_5_1</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="UNSIGNED_SHORT_5_6_5"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#UNSIGNED_SHORT_5_6_5"><span class="identifier">UNSIGNED_SHORT_5_6_5</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="VALIDATE_STATUS"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#VALIDATE_STATUS"><span class="identifier">VALIDATE_STATUS</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="VENDOR"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#VENDOR"><span class="identifier">VENDOR</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="VERSION"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#VERSION"><span class="identifier">VERSION</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="VERTEX_ATTRIB_ARRAY_BUFFER_BINDING"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#VERTEX_ATTRIB_ARRAY_BUFFER_BINDING"><span class="identifier">VERTEX_ATTRIB_ARRAY_BUFFER_BINDING</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="VERTEX_ATTRIB_ARRAY_ENABLED"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#VERTEX_ATTRIB_ARRAY_ENABLED"><span class="identifier">VERTEX_ATTRIB_ARRAY_ENABLED</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="VERTEX_ATTRIB_ARRAY_NORMALIZED"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#VERTEX_ATTRIB_ARRAY_NORMALIZED"><span class="identifier">VERTEX_ATTRIB_ARRAY_NORMALIZED</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="VERTEX_ATTRIB_ARRAY_POINTER"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#VERTEX_ATTRIB_ARRAY_POINTER"><span class="identifier">VERTEX_ATTRIB_ARRAY_POINTER</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="VERTEX_ATTRIB_ARRAY_SIZE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#VERTEX_ATTRIB_ARRAY_SIZE"><span class="identifier">VERTEX_ATTRIB_ARRAY_SIZE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="VERTEX_ATTRIB_ARRAY_STRIDE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#VERTEX_ATTRIB_ARRAY_STRIDE"><span class="identifier">VERTEX_ATTRIB_ARRAY_STRIDE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="VERTEX_ATTRIB_ARRAY_TYPE"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#VERTEX_ATTRIB_ARRAY_TYPE"><span class="identifier">VERTEX_ATTRIB_ARRAY_TYPE</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="VERTEX_SHADER"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#VERTEX_SHADER"><span class="identifier">VERTEX_SHADER</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="VIEWPORT"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#VIEWPORT"><span class="identifier">VIEWPORT</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="ZERO"></a><h3><p><code><span class="keyword">static </span><span class="keyword">var</span> <a href="#ZERO"><span class="identifier">ZERO</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><h2>Instance Fields</h2><div class="platform platform-types"><a name="drawingBufferHeight"></a><h3><p><code><span class="keyword">var</span> <a href="#drawingBufferHeight"><span class="identifier">drawingBufferHeight</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="drawingBufferWidth"></a><h3><p><code><span class="keyword">var</span> <a href="#drawingBufferWidth"><span class="identifier">drawingBufferWidth</span></a>:<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="activeTexture"></a><h3><p><code><span class="keyword">function</span> <a href="#activeTexture"><span class="identifier">activeTexture</span></a>(texture:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="attachShader"></a><h3><p><code><span class="keyword">function</span> <a href="#attachShader"><span class="identifier">attachShader</span></a>(program:<a class="type" href="../../../js/html/webgl/Program.html">Program</a>, shader:<a class="type" href="../../../js/html/webgl/Shader.html">Shader</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="bindAttribLocation"></a><h3><p><code><span class="keyword">function</span> <a href="#bindAttribLocation"><span class="identifier">bindAttribLocation</span></a>(program:<a class="type" href="../../../js/html/webgl/Program.html">Program</a>, index:<a class="type" href="../../../Int.html">Int</a>, name:<a class="type" href="../../../String.html">String</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="bindBuffer"></a><h3><p><code><span class="keyword">function</span> <a href="#bindBuffer"><span class="identifier">bindBuffer</span></a>(target:<a class="type" href="../../../Int.html">Int</a>, buffer:<a class="type" href="../../../js/html/webgl/Buffer.html">Buffer</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="bindFramebuffer"></a><h3><p><code><span class="keyword">function</span> <a href="#bindFramebuffer"><span class="identifier">bindFramebuffer</span></a>(target:<a class="type" href="../../../Int.html">Int</a>, framebuffer:<a class="type" href="../../../js/html/webgl/Framebuffer.html">Framebuffer</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="bindRenderbuffer"></a><h3><p><code><span class="keyword">function</span> <a href="#bindRenderbuffer"><span class="identifier">bindRenderbuffer</span></a>(target:<a class="type" href="../../../Int.html">Int</a>, renderbuffer:<a class="type" href="../../../js/html/webgl/Renderbuffer.html">Renderbuffer</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="bindTexture"></a><h3><p><code><span class="keyword">function</span> <a href="#bindTexture"><span class="identifier">bindTexture</span></a>(target:<a class="type" href="../../../Int.html">Int</a>, texture:<a class="type" href="../../../js/html/webgl/Texture.html">Texture</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="blendColor"></a><h3><p><code><span class="keyword">function</span> <a href="#blendColor"><span class="identifier">blendColor</span></a>(red:<a class="type" href="../../../Float.html">Float</a>, green:<a class="type" href="../../../Float.html">Float</a>, blue:<a class="type" href="../../../Float.html">Float</a>, alpha:<a class="type" href="../../../Float.html">Float</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="blendEquation"></a><h3><p><code><span class="keyword">function</span> <a href="#blendEquation"><span class="identifier">blendEquation</span></a>(mode:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="blendEquationSeparate"></a><h3><p><code><span class="keyword">function</span> <a href="#blendEquationSeparate"><span class="identifier">blendEquationSeparate</span></a>(modeRGB:<a class="type" href="../../../Int.html">Int</a>, modeAlpha:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="blendFunc"></a><h3><p><code><span class="keyword">function</span> <a href="#blendFunc"><span class="identifier">blendFunc</span></a>(sfactor:<a class="type" href="../../../Int.html">Int</a>, dfactor:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="blendFuncSeparate"></a><h3><p><code><span class="keyword">function</span> <a href="#blendFuncSeparate"><span class="identifier">blendFuncSeparate</span></a>(srcRGB:<a class="type" href="../../../Int.html">Int</a>, dstRGB:<a class="type" href="../../../Int.html">Int</a>, srcAlpha:<a class="type" href="../../../Int.html">Int</a>, dstAlpha:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="bufferData"></a><h3><p><code><span class="keyword">function</span> <a href="#bufferData"><span class="identifier">bufferData</span></a>(target:<a class="type" href="../../../Int.html">Int</a>, size:<a class="type" href="../../../Int.html">Int</a>, usage:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p><p><code><span class="keyword">function</span> <a href="#bufferData"><span class="identifier">bufferData</span></a>(target:<a class="type" href="../../../Int.html">Int</a>, data:<a class="type" href="../../../js/html/ArrayBuffer.html">ArrayBuffer</a>, usage:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p><p><code><span class="keyword">function</span> <a href="#bufferData"><span class="identifier">bufferData</span></a>(target:<a class="type" href="../../../Int.html">Int</a>, data:<a class="type" href="../../../js/html/ArrayBufferView.html">ArrayBufferView</a>, usage:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p>Throws DOMException.</p></div></div><div class="platform platform-types"><a name="bufferSubData"></a><h3><p><code><span class="keyword">function</span> <a href="#bufferSubData"><span class="identifier">bufferSubData</span></a>(target:<a class="type" href="../../../Int.html">Int</a>, offset:<a class="type" href="../../../Int.html">Int</a>, data:<a class="type" href="../../../js/html/ArrayBufferView.html">ArrayBufferView</a>):<a class="type" href="../../../Void.html">Void</a></code></p><p><code><span class="keyword">function</span> <a href="#bufferSubData"><span class="identifier">bufferSubData</span></a>(target:<a class="type" href="../../../Int.html">Int</a>, offset:<a class="type" href="../../../Int.html">Int</a>, data:<a class="type" href="../../../js/html/ArrayBuffer.html">ArrayBuffer</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p>Throws DOMException.</p></div></div><div class="platform platform-types"><a name="checkFramebufferStatus"></a><h3><p><code><span class="keyword">function</span> <a href="#checkFramebufferStatus"><span class="identifier">checkFramebufferStatus</span></a>(target:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="clear"></a><h3><p><code><span class="keyword">function</span> <a href="#clear"><span class="identifier">clear</span></a>(mask:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="clearColor"></a><h3><p><code><span class="keyword">function</span> <a href="#clearColor"><span class="identifier">clearColor</span></a>(red:<a class="type" href="../../../Float.html">Float</a>, green:<a class="type" href="../../../Float.html">Float</a>, blue:<a class="type" href="../../../Float.html">Float</a>, alpha:<a class="type" href="../../../Float.html">Float</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="clearDepth"></a><h3><p><code><span class="keyword">function</span> <a href="#clearDepth"><span class="identifier">clearDepth</span></a>(depth:<a class="type" href="../../../Float.html">Float</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="clearStencil"></a><h3><p><code><span class="keyword">function</span> <a href="#clearStencil"><span class="identifier">clearStencil</span></a>(s:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="colorMask"></a><h3><p><code><span class="keyword">function</span> <a href="#colorMask"><span class="identifier">colorMask</span></a>(red:<a class="type" href="../../../Bool.html">Bool</a>, green:<a class="type" href="../../../Bool.html">Bool</a>, blue:<a class="type" href="../../../Bool.html">Bool</a>, alpha:<a class="type" href="../../../Bool.html">Bool</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="compileShader"></a><h3><p><code><span class="keyword">function</span> <a href="#compileShader"><span class="identifier">compileShader</span></a>(shader:<a class="type" href="../../../js/html/webgl/Shader.html">Shader</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="compressedTexImage2D"></a><h3><p><code><span class="keyword">function</span> <a href="#compressedTexImage2D"><span class="identifier">compressedTexImage2D</span></a>(target:<a class="type" href="../../../Int.html">Int</a>, level:<a class="type" href="../../../Int.html">Int</a>, internalformat:<a class="type" href="../../../Int.html">Int</a>, width:<a class="type" href="../../../Int.html">Int</a>, height:<a class="type" href="../../../Int.html">Int</a>, border:<a class="type" href="../../../Int.html">Int</a>, data:<a class="type" href="../../../js/html/ArrayBufferView.html">ArrayBufferView</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="compressedTexSubImage2D"></a><h3><p><code><span class="keyword">function</span> <a href="#compressedTexSubImage2D"><span class="identifier">compressedTexSubImage2D</span></a>(target:<a class="type" href="../../../Int.html">Int</a>, level:<a class="type" href="../../../Int.html">Int</a>, xoffset:<a class="type" href="../../../Int.html">Int</a>, yoffset:<a class="type" href="../../../Int.html">Int</a>, width:<a class="type" href="../../../Int.html">Int</a>, height:<a class="type" href="../../../Int.html">Int</a>, format:<a class="type" href="../../../Int.html">Int</a>, data:<a class="type" href="../../../js/html/ArrayBufferView.html">ArrayBufferView</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="copyTexImage2D"></a><h3><p><code><span class="keyword">function</span> <a href="#copyTexImage2D"><span class="identifier">copyTexImage2D</span></a>(target:<a class="type" href="../../../Int.html">Int</a>, level:<a class="type" href="../../../Int.html">Int</a>, internalformat:<a class="type" href="../../../Int.html">Int</a>, x:<a class="type" href="../../../Int.html">Int</a>, y:<a class="type" href="../../../Int.html">Int</a>, width:<a class="type" href="../../../Int.html">Int</a>, height:<a class="type" href="../../../Int.html">Int</a>, border:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="copyTexSubImage2D"></a><h3><p><code><span class="keyword">function</span> <a href="#copyTexSubImage2D"><span class="identifier">copyTexSubImage2D</span></a>(target:<a class="type" href="../../../Int.html">Int</a>, level:<a class="type" href="../../../Int.html">Int</a>, xoffset:<a class="type" href="../../../Int.html">Int</a>, yoffset:<a class="type" href="../../../Int.html">Int</a>, x:<a class="type" href="../../../Int.html">Int</a>, y:<a class="type" href="../../../Int.html">Int</a>, width:<a class="type" href="../../../Int.html">Int</a>, height:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="createBuffer"></a><h3><p><code><span class="keyword">function</span> <a href="#createBuffer"><span class="identifier">createBuffer</span></a>():<a class="type" href="../../../js/html/webgl/Buffer.html">Buffer</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="createFramebuffer"></a><h3><p><code><span class="keyword">function</span> <a href="#createFramebuffer"><span class="identifier">createFramebuffer</span></a>():<a class="type" href="../../../js/html/webgl/Framebuffer.html">Framebuffer</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="createProgram"></a><h3><p><code><span class="keyword">function</span> <a href="#createProgram"><span class="identifier">createProgram</span></a>():<a class="type" href="../../../js/html/webgl/Program.html">Program</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="createRenderbuffer"></a><h3><p><code><span class="keyword">function</span> <a href="#createRenderbuffer"><span class="identifier">createRenderbuffer</span></a>():<a class="type" href="../../../js/html/webgl/Renderbuffer.html">Renderbuffer</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="createShader"></a><h3><p><code><span class="keyword">function</span> <a href="#createShader"><span class="identifier">createShader</span></a>(type:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../js/html/webgl/Shader.html">Shader</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="createTexture"></a><h3><p><code><span class="keyword">function</span> <a href="#createTexture"><span class="identifier">createTexture</span></a>():<a class="type" href="../../../js/html/webgl/Texture.html">Texture</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="cullFace"></a><h3><p><code><span class="keyword">function</span> <a href="#cullFace"><span class="identifier">cullFace</span></a>(mode:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="deleteBuffer"></a><h3><p><code><span class="keyword">function</span> <a href="#deleteBuffer"><span class="identifier">deleteBuffer</span></a>(buffer:<a class="type" href="../../../js/html/webgl/Buffer.html">Buffer</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="deleteFramebuffer"></a><h3><p><code><span class="keyword">function</span> <a href="#deleteFramebuffer"><span class="identifier">deleteFramebuffer</span></a>(framebuffer:<a class="type" href="../../../js/html/webgl/Framebuffer.html">Framebuffer</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="deleteProgram"></a><h3><p><code><span class="keyword">function</span> <a href="#deleteProgram"><span class="identifier">deleteProgram</span></a>(program:<a class="type" href="../../../js/html/webgl/Program.html">Program</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="deleteRenderbuffer"></a><h3><p><code><span class="keyword">function</span> <a href="#deleteRenderbuffer"><span class="identifier">deleteRenderbuffer</span></a>(renderbuffer:<a class="type" href="../../../js/html/webgl/Renderbuffer.html">Renderbuffer</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="deleteShader"></a><h3><p><code><span class="keyword">function</span> <a href="#deleteShader"><span class="identifier">deleteShader</span></a>(shader:<a class="type" href="../../../js/html/webgl/Shader.html">Shader</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="deleteTexture"></a><h3><p><code><span class="keyword">function</span> <a href="#deleteTexture"><span class="identifier">deleteTexture</span></a>(texture:<a class="type" href="../../../js/html/webgl/Texture.html">Texture</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="depthFunc"></a><h3><p><code><span class="keyword">function</span> <a href="#depthFunc"><span class="identifier">depthFunc</span></a>(func:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="depthMask"></a><h3><p><code><span class="keyword">function</span> <a href="#depthMask"><span class="identifier">depthMask</span></a>(flag:<a class="type" href="../../../Bool.html">Bool</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="depthRange"></a><h3><p><code><span class="keyword">function</span> <a href="#depthRange"><span class="identifier">depthRange</span></a>(zNear:<a class="type" href="../../../Float.html">Float</a>, zFar:<a class="type" href="../../../Float.html">Float</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="detachShader"></a><h3><p><code><span class="keyword">function</span> <a href="#detachShader"><span class="identifier">detachShader</span></a>(program:<a class="type" href="../../../js/html/webgl/Program.html">Program</a>, shader:<a class="type" href="../../../js/html/webgl/Shader.html">Shader</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="disable"></a><h3><p><code><span class="keyword">function</span> <a href="#disable"><span class="identifier">disable</span></a>(cap:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="disableVertexAttribArray"></a><h3><p><code><span class="keyword">function</span> <a href="#disableVertexAttribArray"><span class="identifier">disableVertexAttribArray</span></a>(index:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="drawArrays"></a><h3><p><code><span class="keyword">function</span> <a href="#drawArrays"><span class="identifier">drawArrays</span></a>(mode:<a class="type" href="../../../Int.html">Int</a>, first:<a class="type" href="../../../Int.html">Int</a>, count:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="drawElements"></a><h3><p><code><span class="keyword">function</span> <a href="#drawElements"><span class="identifier">drawElements</span></a>(mode:<a class="type" href="../../../Int.html">Int</a>, count:<a class="type" href="../../../Int.html">Int</a>, type:<a class="type" href="../../../Int.html">Int</a>, offset:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="enable"></a><h3><p><code><span class="keyword">function</span> <a href="#enable"><span class="identifier">enable</span></a>(cap:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="enableVertexAttribArray"></a><h3><p><code><span class="keyword">function</span> <a href="#enableVertexAttribArray"><span class="identifier">enableVertexAttribArray</span></a>(index:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="finish"></a><h3><p><code><span class="keyword">function</span> <a href="#finish"><span class="identifier">finish</span></a>():<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="flush"></a><h3><p><code><span class="keyword">function</span> <a href="#flush"><span class="identifier">flush</span></a>():<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="framebufferRenderbuffer"></a><h3><p><code><span class="keyword">function</span> <a href="#framebufferRenderbuffer"><span class="identifier">framebufferRenderbuffer</span></a>(target:<a class="type" href="../../../Int.html">Int</a>, attachment:<a class="type" href="../../../Int.html">Int</a>, renderbuffertarget:<a class="type" href="../../../Int.html">Int</a>, renderbuffer:<a class="type" href="../../../js/html/webgl/Renderbuffer.html">Renderbuffer</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="framebufferTexture2D"></a><h3><p><code><span class="keyword">function</span> <a href="#framebufferTexture2D"><span class="identifier">framebufferTexture2D</span></a>(target:<a class="type" href="../../../Int.html">Int</a>, attachment:<a class="type" href="../../../Int.html">Int</a>, textarget:<a class="type" href="../../../Int.html">Int</a>, texture:<a class="type" href="../../../js/html/webgl/Texture.html">Texture</a>, level:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="frontFace"></a><h3><p><code><span class="keyword">function</span> <a href="#frontFace"><span class="identifier">frontFace</span></a>(mode:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="generateMipmap"></a><h3><p><code><span class="keyword">function</span> <a href="#generateMipmap"><span class="identifier">generateMipmap</span></a>(target:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="getActiveAttrib"></a><h3><p><code><span class="keyword">function</span> <a href="#getActiveAttrib"><span class="identifier">getActiveAttrib</span></a>(program:<a class="type" href="../../../js/html/webgl/Program.html">Program</a>, index:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../js/html/webgl/ActiveInfo.html">ActiveInfo</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="getActiveUniform"></a><h3><p><code><span class="keyword">function</span> <a href="#getActiveUniform"><span class="identifier">getActiveUniform</span></a>(program:<a class="type" href="../../../js/html/webgl/Program.html">Program</a>, index:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../js/html/webgl/ActiveInfo.html">ActiveInfo</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="getAttachedShaders"></a><h3><p><code><span class="keyword">function</span> <a href="#getAttachedShaders"><span class="identifier">getAttachedShaders</span></a>(program:<a class="type" href="../../../js/html/webgl/Program.html">Program</a>):<a class="type" href="../../../Array.html">Array</a>&lt;<a class="type" href="../../../js/html/webgl/Shader.html">Shader</a>&gt;</code></p><p><code><span class="keyword">function</span> <a href="#getAttachedShaders"><span class="identifier">getAttachedShaders</span></a>(program:<a class="type" href="../../../js/html/webgl/Program.html">Program</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p>Throws DOMException.</p></div></div><div class="platform platform-types"><a name="getAttribLocation"></a><h3><p><code><span class="keyword">function</span> <a href="#getAttribLocation"><span class="identifier">getAttribLocation</span></a>(program:<a class="type" href="../../../js/html/webgl/Program.html">Program</a>, name:<a class="type" href="../../../String.html">String</a>):<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="getBufferParameter"></a><h3><p><code><span class="keyword">function</span> <a href="#getBufferParameter"><span class="identifier">getBufferParameter</span></a>(target:<a class="type" href="../../../Int.html">Int</a>, pname:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Dynamic.html">Dynamic</a></code></p><p><code><span class="keyword">function</span> <a href="#getBufferParameter"><span class="identifier">getBufferParameter</span></a>():<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="getContextAttributes"></a><h3><p><code><span class="keyword">function</span> <a href="#getContextAttributes"><span class="identifier">getContextAttributes</span></a>():<a class="type" href="../../../js/html/webgl/ContextAttributes.html">ContextAttributes</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="getError"></a><h3><p><code><span class="keyword">function</span> <a href="#getError"><span class="identifier">getError</span></a>():<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="getExtension"></a><h3><p><code><span class="keyword">function</span> <a href="#getExtension"><span class="identifier">getExtension</span></a>(name:<a class="type" href="../../../String.html">String</a>):<a class="type" href="../../../Dynamic.html">Dynamic</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="getFramebufferAttachmentParameter"></a><h3><p><code><span class="keyword">function</span> <a href="#getFramebufferAttachmentParameter"><span class="identifier">getFramebufferAttachmentParameter</span></a>(target:<a class="type" href="../../../Int.html">Int</a>, attachment:<a class="type" href="../../../Int.html">Int</a>, pname:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Dynamic.html">Dynamic</a></code></p><p><code><span class="keyword">function</span> <a href="#getFramebufferAttachmentParameter"><span class="identifier">getFramebufferAttachmentParameter</span></a>():<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="getParameter"></a><h3><p><code><span class="keyword">function</span> <a href="#getParameter"><span class="identifier">getParameter</span></a>(pname:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Dynamic.html">Dynamic</a></code></p><p><code><span class="keyword">function</span> <a href="#getParameter"><span class="identifier">getParameter</span></a>():<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="getProgramInfoLog"></a><h3><p><code><span class="keyword">function</span> <a href="#getProgramInfoLog"><span class="identifier">getProgramInfoLog</span></a>(program:<a class="type" href="../../../js/html/webgl/Program.html">Program</a>):<a class="type" href="../../../String.html">String</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="getProgramParameter"></a><h3><p><code><span class="keyword">function</span> <a href="#getProgramParameter"><span class="identifier">getProgramParameter</span></a>(program:<a class="type" href="../../../js/html/webgl/Program.html">Program</a>, pname:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Dynamic.html">Dynamic</a></code></p><p><code><span class="keyword">function</span> <a href="#getProgramParameter"><span class="identifier">getProgramParameter</span></a>():<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="getRenderbufferParameter"></a><h3><p><code><span class="keyword">function</span> <a href="#getRenderbufferParameter"><span class="identifier">getRenderbufferParameter</span></a>(target:<a class="type" href="../../../Int.html">Int</a>, pname:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Dynamic.html">Dynamic</a></code></p><p><code><span class="keyword">function</span> <a href="#getRenderbufferParameter"><span class="identifier">getRenderbufferParameter</span></a>():<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="getShaderInfoLog"></a><h3><p><code><span class="keyword">function</span> <a href="#getShaderInfoLog"><span class="identifier">getShaderInfoLog</span></a>(shader:<a class="type" href="../../../js/html/webgl/Shader.html">Shader</a>):<a class="type" href="../../../String.html">String</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="getShaderParameter"></a><h3><p><code><span class="keyword">function</span> <a href="#getShaderParameter"><span class="identifier">getShaderParameter</span></a>(shader:<a class="type" href="../../../js/html/webgl/Shader.html">Shader</a>, pname:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Dynamic.html">Dynamic</a></code></p><p><code><span class="keyword">function</span> <a href="#getShaderParameter"><span class="identifier">getShaderParameter</span></a>():<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p>Throws DOMException.</p></div></div><div class="platform platform-types"><a name="getShaderPrecisionFormat"></a><h3><p><code><span class="keyword">function</span> <a href="#getShaderPrecisionFormat"><span class="identifier">getShaderPrecisionFormat</span></a>(shadertype:<a class="type" href="../../../Int.html">Int</a>, precisiontype:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../js/html/webgl/ShaderPrecisionFormat.html">ShaderPrecisionFormat</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="getShaderSource"></a><h3><p><code><span class="keyword">function</span> <a href="#getShaderSource"><span class="identifier">getShaderSource</span></a>(shader:<a class="type" href="../../../js/html/webgl/Shader.html">Shader</a>):<a class="type" href="../../../String.html">String</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="getSupportedExtensions"></a><h3><p><code><span class="keyword">function</span> <a href="#getSupportedExtensions"><span class="identifier">getSupportedExtensions</span></a>():<a class="type" href="../../../Array.html">Array</a>&lt;<a class="type" href="../../../String.html">String</a>&gt;</code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="getTexParameter"></a><h3><p><code><span class="keyword">function</span> <a href="#getTexParameter"><span class="identifier">getTexParameter</span></a>(target:<a class="type" href="../../../Int.html">Int</a>, pname:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Dynamic.html">Dynamic</a></code></p><p><code><span class="keyword">function</span> <a href="#getTexParameter"><span class="identifier">getTexParameter</span></a>():<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="getUniform"></a><h3><p><code><span class="keyword">function</span> <a href="#getUniform"><span class="identifier">getUniform</span></a>(program:<a class="type" href="../../../js/html/webgl/Program.html">Program</a>, location:<a class="type" href="../../../js/html/webgl/UniformLocation.html">UniformLocation</a>):<a class="type" href="../../../Dynamic.html">Dynamic</a></code></p><p><code><span class="keyword">function</span> <a href="#getUniform"><span class="identifier">getUniform</span></a>():<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="getUniformLocation"></a><h3><p><code><span class="keyword">function</span> <a href="#getUniformLocation"><span class="identifier">getUniformLocation</span></a>(program:<a class="type" href="../../../js/html/webgl/Program.html">Program</a>, name:<a class="type" href="../../../String.html">String</a>):<a class="type" href="../../../js/html/webgl/UniformLocation.html">UniformLocation</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="getVertexAttrib"></a><h3><p><code><span class="keyword">function</span> <a href="#getVertexAttrib"><span class="identifier">getVertexAttrib</span></a>(index:<a class="type" href="../../../Int.html">Int</a>, pname:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Dynamic.html">Dynamic</a></code></p><p><code><span class="keyword">function</span> <a href="#getVertexAttrib"><span class="identifier">getVertexAttrib</span></a>():<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="getVertexAttribOffset"></a><h3><p><code><span class="keyword">function</span> <a href="#getVertexAttribOffset"><span class="identifier">getVertexAttribOffset</span></a>(index:<a class="type" href="../../../Int.html">Int</a>, pname:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Int.html">Int</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="hint"></a><h3><p><code><span class="keyword">function</span> <a href="#hint"><span class="identifier">hint</span></a>(target:<a class="type" href="../../../Int.html">Int</a>, mode:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="isBuffer"></a><h3><p><code><span class="keyword">function</span> <a href="#isBuffer"><span class="identifier">isBuffer</span></a>(buffer:<a class="type" href="../../../js/html/webgl/Buffer.html">Buffer</a>):<a class="type" href="../../../Bool.html">Bool</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="isContextLost"></a><h3><p><code><span class="keyword">function</span> <a href="#isContextLost"><span class="identifier">isContextLost</span></a>():<a class="type" href="../../../Bool.html">Bool</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="isEnabled"></a><h3><p><code><span class="keyword">function</span> <a href="#isEnabled"><span class="identifier">isEnabled</span></a>(cap:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Bool.html">Bool</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="isFramebuffer"></a><h3><p><code><span class="keyword">function</span> <a href="#isFramebuffer"><span class="identifier">isFramebuffer</span></a>(framebuffer:<a class="type" href="../../../js/html/webgl/Framebuffer.html">Framebuffer</a>):<a class="type" href="../../../Bool.html">Bool</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="isProgram"></a><h3><p><code><span class="keyword">function</span> <a href="#isProgram"><span class="identifier">isProgram</span></a>(program:<a class="type" href="../../../js/html/webgl/Program.html">Program</a>):<a class="type" href="../../../Bool.html">Bool</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="isRenderbuffer"></a><h3><p><code><span class="keyword">function</span> <a href="#isRenderbuffer"><span class="identifier">isRenderbuffer</span></a>(renderbuffer:<a class="type" href="../../../js/html/webgl/Renderbuffer.html">Renderbuffer</a>):<a class="type" href="../../../Bool.html">Bool</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="isShader"></a><h3><p><code><span class="keyword">function</span> <a href="#isShader"><span class="identifier">isShader</span></a>(shader:<a class="type" href="../../../js/html/webgl/Shader.html">Shader</a>):<a class="type" href="../../../Bool.html">Bool</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="isTexture"></a><h3><p><code><span class="keyword">function</span> <a href="#isTexture"><span class="identifier">isTexture</span></a>(texture:<a class="type" href="../../../js/html/webgl/Texture.html">Texture</a>):<a class="type" href="../../../Bool.html">Bool</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="lineWidth"></a><h3><p><code><span class="keyword">function</span> <a href="#lineWidth"><span class="identifier">lineWidth</span></a>(width:<a class="type" href="../../../Float.html">Float</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="linkProgram"></a><h3><p><code><span class="keyword">function</span> <a href="#linkProgram"><span class="identifier">linkProgram</span></a>(program:<a class="type" href="../../../js/html/webgl/Program.html">Program</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="pixelStorei"></a><h3><p><code><span class="keyword">function</span> <a href="#pixelStorei"><span class="identifier">pixelStorei</span></a>(pname:<a class="type" href="../../../Int.html">Int</a>, param:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="polygonOffset"></a><h3><p><code><span class="keyword">function</span> <a href="#polygonOffset"><span class="identifier">polygonOffset</span></a>(factor:<a class="type" href="../../../Float.html">Float</a>, units:<a class="type" href="../../../Float.html">Float</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="readPixels"></a><h3><p><code><span class="keyword">function</span> <a href="#readPixels"><span class="identifier">readPixels</span></a>(x:<a class="type" href="../../../Int.html">Int</a>, y:<a class="type" href="../../../Int.html">Int</a>, width:<a class="type" href="../../../Int.html">Int</a>, height:<a class="type" href="../../../Int.html">Int</a>, format:<a class="type" href="../../../Int.html">Int</a>, type:<a class="type" href="../../../Int.html">Int</a>, pixels:<a class="type" href="../../../js/html/ArrayBufferView.html">ArrayBufferView</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="releaseShaderCompiler"></a><h3><p><code><span class="keyword">function</span> <a href="#releaseShaderCompiler"><span class="identifier">releaseShaderCompiler</span></a>():<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="renderbufferStorage"></a><h3><p><code><span class="keyword">function</span> <a href="#renderbufferStorage"><span class="identifier">renderbufferStorage</span></a>(target:<a class="type" href="../../../Int.html">Int</a>, internalformat:<a class="type" href="../../../Int.html">Int</a>, width:<a class="type" href="../../../Int.html">Int</a>, height:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="sampleCoverage"></a><h3><p><code><span class="keyword">function</span> <a href="#sampleCoverage"><span class="identifier">sampleCoverage</span></a>(value:<a class="type" href="../../../Float.html">Float</a>, invert:<a class="type" href="../../../Bool.html">Bool</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="scissor"></a><h3><p><code><span class="keyword">function</span> <a href="#scissor"><span class="identifier">scissor</span></a>(x:<a class="type" href="../../../Int.html">Int</a>, y:<a class="type" href="../../../Int.html">Int</a>, width:<a class="type" href="../../../Int.html">Int</a>, height:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="shaderSource"></a><h3><p><code><span class="keyword">function</span> <a href="#shaderSource"><span class="identifier">shaderSource</span></a>(shader:<a class="type" href="../../../js/html/webgl/Shader.html">Shader</a>, string:<a class="type" href="../../../String.html">String</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="stencilFunc"></a><h3><p><code><span class="keyword">function</span> <a href="#stencilFunc"><span class="identifier">stencilFunc</span></a>(func:<a class="type" href="../../../Int.html">Int</a>, ref:<a class="type" href="../../../Int.html">Int</a>, mask:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="stencilFuncSeparate"></a><h3><p><code><span class="keyword">function</span> <a href="#stencilFuncSeparate"><span class="identifier">stencilFuncSeparate</span></a>(face:<a class="type" href="../../../Int.html">Int</a>, func:<a class="type" href="../../../Int.html">Int</a>, ref:<a class="type" href="../../../Int.html">Int</a>, mask:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="stencilMask"></a><h3><p><code><span class="keyword">function</span> <a href="#stencilMask"><span class="identifier">stencilMask</span></a>(mask:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="stencilMaskSeparate"></a><h3><p><code><span class="keyword">function</span> <a href="#stencilMaskSeparate"><span class="identifier">stencilMaskSeparate</span></a>(face:<a class="type" href="../../../Int.html">Int</a>, mask:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="stencilOp"></a><h3><p><code><span class="keyword">function</span> <a href="#stencilOp"><span class="identifier">stencilOp</span></a>(fail:<a class="type" href="../../../Int.html">Int</a>, zfail:<a class="type" href="../../../Int.html">Int</a>, zpass:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="stencilOpSeparate"></a><h3><p><code><span class="keyword">function</span> <a href="#stencilOpSeparate"><span class="identifier">stencilOpSeparate</span></a>(face:<a class="type" href="../../../Int.html">Int</a>, fail:<a class="type" href="../../../Int.html">Int</a>, zfail:<a class="type" href="../../../Int.html">Int</a>, zpass:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="texImage2D"></a><h3><p><code><span class="keyword">function</span> <a href="#texImage2D"><span class="identifier">texImage2D</span></a>(target:<a class="type" href="../../../Int.html">Int</a>, level:<a class="type" href="../../../Int.html">Int</a>, internalformat:<a class="type" href="../../../Int.html">Int</a>, format:<a class="type" href="../../../Int.html">Int</a>, type:<a class="type" href="../../../Int.html">Int</a>, video:<a class="type" href="../../../js/html/VideoElement.html">VideoElement</a>):<a class="type" href="../../../Void.html">Void</a></code></p><p><code><span class="keyword">function</span> <a href="#texImage2D"><span class="identifier">texImage2D</span></a>(target:<a class="type" href="../../../Int.html">Int</a>, level:<a class="type" href="../../../Int.html">Int</a>, internalformat:<a class="type" href="../../../Int.html">Int</a>, width:<a class="type" href="../../../Int.html">Int</a>, height:<a class="type" href="../../../Int.html">Int</a>, border:<a class="type" href="../../../Int.html">Int</a>, format:<a class="type" href="../../../Int.html">Int</a>, type:<a class="type" href="../../../Int.html">Int</a>, pixels:<a class="type" href="../../../js/html/ArrayBufferView.html">ArrayBufferView</a>):<a class="type" href="../../../Void.html">Void</a></code></p><p><code><span class="keyword">function</span> <a href="#texImage2D"><span class="identifier">texImage2D</span></a>(target:<a class="type" href="../../../Int.html">Int</a>, level:<a class="type" href="../../../Int.html">Int</a>, internalformat:<a class="type" href="../../../Int.html">Int</a>, format:<a class="type" href="../../../Int.html">Int</a>, type:<a class="type" href="../../../Int.html">Int</a>, pixels:<a class="type" href="../../../js/html/ImageData.html">ImageData</a>):<a class="type" href="../../../Void.html">Void</a></code></p><p><code><span class="keyword">function</span> <a href="#texImage2D"><span class="identifier">texImage2D</span></a>(target:<a class="type" href="../../../Int.html">Int</a>, level:<a class="type" href="../../../Int.html">Int</a>, internalformat:<a class="type" href="../../../Int.html">Int</a>, format:<a class="type" href="../../../Int.html">Int</a>, type:<a class="type" href="../../../Int.html">Int</a>, image:<a class="type" href="../../../js/html/ImageElement.html">ImageElement</a>):<a class="type" href="../../../Void.html">Void</a></code></p><p><code><span class="keyword">function</span> <a href="#texImage2D"><span class="identifier">texImage2D</span></a>(target:<a class="type" href="../../../Int.html">Int</a>, level:<a class="type" href="../../../Int.html">Int</a>, internalformat:<a class="type" href="../../../Int.html">Int</a>, format:<a class="type" href="../../../Int.html">Int</a>, type:<a class="type" href="../../../Int.html">Int</a>, canvas:<a class="type" href="../../../js/html/CanvasElement.html">CanvasElement</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p>Throws DOMException.</p></div></div><div class="platform platform-types"><a name="texParameterf"></a><h3><p><code><span class="keyword">function</span> <a href="#texParameterf"><span class="identifier">texParameterf</span></a>(target:<a class="type" href="../../../Int.html">Int</a>, pname:<a class="type" href="../../../Int.html">Int</a>, param:<a class="type" href="../../../Float.html">Float</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="texParameteri"></a><h3><p><code><span class="keyword">function</span> <a href="#texParameteri"><span class="identifier">texParameteri</span></a>(target:<a class="type" href="../../../Int.html">Int</a>, pname:<a class="type" href="../../../Int.html">Int</a>, param:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="texSubImage2D"></a><h3><p><code><span class="keyword">function</span> <a href="#texSubImage2D"><span class="identifier">texSubImage2D</span></a>(target:<a class="type" href="../../../Int.html">Int</a>, level:<a class="type" href="../../../Int.html">Int</a>, xoffset:<a class="type" href="../../../Int.html">Int</a>, yoffset:<a class="type" href="../../../Int.html">Int</a>, format:<a class="type" href="../../../Int.html">Int</a>, type:<a class="type" href="../../../Int.html">Int</a>, video:<a class="type" href="../../../js/html/VideoElement.html">VideoElement</a>):<a class="type" href="../../../Void.html">Void</a></code></p><p><code><span class="keyword">function</span> <a href="#texSubImage2D"><span class="identifier">texSubImage2D</span></a>(target:<a class="type" href="../../../Int.html">Int</a>, level:<a class="type" href="../../../Int.html">Int</a>, xoffset:<a class="type" href="../../../Int.html">Int</a>, yoffset:<a class="type" href="../../../Int.html">Int</a>, width:<a class="type" href="../../../Int.html">Int</a>, height:<a class="type" href="../../../Int.html">Int</a>, format:<a class="type" href="../../../Int.html">Int</a>, type:<a class="type" href="../../../Int.html">Int</a>, pixels:<a class="type" href="../../../js/html/ArrayBufferView.html">ArrayBufferView</a>):<a class="type" href="../../../Void.html">Void</a></code></p><p><code><span class="keyword">function</span> <a href="#texSubImage2D"><span class="identifier">texSubImage2D</span></a>(target:<a class="type" href="../../../Int.html">Int</a>, level:<a class="type" href="../../../Int.html">Int</a>, xoffset:<a class="type" href="../../../Int.html">Int</a>, yoffset:<a class="type" href="../../../Int.html">Int</a>, format:<a class="type" href="../../../Int.html">Int</a>, type:<a class="type" href="../../../Int.html">Int</a>, pixels:<a class="type" href="../../../js/html/ImageData.html">ImageData</a>):<a class="type" href="../../../Void.html">Void</a></code></p><p><code><span class="keyword">function</span> <a href="#texSubImage2D"><span class="identifier">texSubImage2D</span></a>(target:<a class="type" href="../../../Int.html">Int</a>, level:<a class="type" href="../../../Int.html">Int</a>, xoffset:<a class="type" href="../../../Int.html">Int</a>, yoffset:<a class="type" href="../../../Int.html">Int</a>, format:<a class="type" href="../../../Int.html">Int</a>, type:<a class="type" href="../../../Int.html">Int</a>, image:<a class="type" href="../../../js/html/ImageElement.html">ImageElement</a>):<a class="type" href="../../../Void.html">Void</a></code></p><p><code><span class="keyword">function</span> <a href="#texSubImage2D"><span class="identifier">texSubImage2D</span></a>(target:<a class="type" href="../../../Int.html">Int</a>, level:<a class="type" href="../../../Int.html">Int</a>, xoffset:<a class="type" href="../../../Int.html">Int</a>, yoffset:<a class="type" href="../../../Int.html">Int</a>, format:<a class="type" href="../../../Int.html">Int</a>, type:<a class="type" href="../../../Int.html">Int</a>, canvas:<a class="type" href="../../../js/html/CanvasElement.html">CanvasElement</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p>Throws DOMException.</p></div></div><div class="platform platform-types"><a name="uniform1f"></a><h3><p><code><span class="keyword">function</span> <a href="#uniform1f"><span class="identifier">uniform1f</span></a>(location:<a class="type" href="../../../js/html/webgl/UniformLocation.html">UniformLocation</a>, x:<a class="type" href="../../../Float.html">Float</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="uniform1fv"></a><h3><p><code><span class="keyword">function</span> <a href="#uniform1fv"><span class="identifier">uniform1fv</span></a>(location:<a class="type" href="../../../js/html/webgl/UniformLocation.html">UniformLocation</a>, v:<a class="type" href="../../../js/html/Float32Array.html">Float32Array</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="uniform1i"></a><h3><p><code><span class="keyword">function</span> <a href="#uniform1i"><span class="identifier">uniform1i</span></a>(location:<a class="type" href="../../../js/html/webgl/UniformLocation.html">UniformLocation</a>, x:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="uniform1iv"></a><h3><p><code><span class="keyword">function</span> <a href="#uniform1iv"><span class="identifier">uniform1iv</span></a>(location:<a class="type" href="../../../js/html/webgl/UniformLocation.html">UniformLocation</a>, v:<a class="type" href="../../../js/html/Int32Array.html">Int32Array</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="uniform2f"></a><h3><p><code><span class="keyword">function</span> <a href="#uniform2f"><span class="identifier">uniform2f</span></a>(location:<a class="type" href="../../../js/html/webgl/UniformLocation.html">UniformLocation</a>, x:<a class="type" href="../../../Float.html">Float</a>, y:<a class="type" href="../../../Float.html">Float</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="uniform2fv"></a><h3><p><code><span class="keyword">function</span> <a href="#uniform2fv"><span class="identifier">uniform2fv</span></a>(location:<a class="type" href="../../../js/html/webgl/UniformLocation.html">UniformLocation</a>, v:<a class="type" href="../../../js/html/Float32Array.html">Float32Array</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="uniform2i"></a><h3><p><code><span class="keyword">function</span> <a href="#uniform2i"><span class="identifier">uniform2i</span></a>(location:<a class="type" href="../../../js/html/webgl/UniformLocation.html">UniformLocation</a>, x:<a class="type" href="../../../Int.html">Int</a>, y:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="uniform2iv"></a><h3><p><code><span class="keyword">function</span> <a href="#uniform2iv"><span class="identifier">uniform2iv</span></a>(location:<a class="type" href="../../../js/html/webgl/UniformLocation.html">UniformLocation</a>, v:<a class="type" href="../../../js/html/Int32Array.html">Int32Array</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="uniform3f"></a><h3><p><code><span class="keyword">function</span> <a href="#uniform3f"><span class="identifier">uniform3f</span></a>(location:<a class="type" href="../../../js/html/webgl/UniformLocation.html">UniformLocation</a>, x:<a class="type" href="../../../Float.html">Float</a>, y:<a class="type" href="../../../Float.html">Float</a>, z:<a class="type" href="../../../Float.html">Float</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="uniform3fv"></a><h3><p><code><span class="keyword">function</span> <a href="#uniform3fv"><span class="identifier">uniform3fv</span></a>(location:<a class="type" href="../../../js/html/webgl/UniformLocation.html">UniformLocation</a>, v:<a class="type" href="../../../js/html/Float32Array.html">Float32Array</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="uniform3i"></a><h3><p><code><span class="keyword">function</span> <a href="#uniform3i"><span class="identifier">uniform3i</span></a>(location:<a class="type" href="../../../js/html/webgl/UniformLocation.html">UniformLocation</a>, x:<a class="type" href="../../../Int.html">Int</a>, y:<a class="type" href="../../../Int.html">Int</a>, z:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="uniform3iv"></a><h3><p><code><span class="keyword">function</span> <a href="#uniform3iv"><span class="identifier">uniform3iv</span></a>(location:<a class="type" href="../../../js/html/webgl/UniformLocation.html">UniformLocation</a>, v:<a class="type" href="../../../js/html/Int32Array.html">Int32Array</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="uniform4f"></a><h3><p><code><span class="keyword">function</span> <a href="#uniform4f"><span class="identifier">uniform4f</span></a>(location:<a class="type" href="../../../js/html/webgl/UniformLocation.html">UniformLocation</a>, x:<a class="type" href="../../../Float.html">Float</a>, y:<a class="type" href="../../../Float.html">Float</a>, z:<a class="type" href="../../../Float.html">Float</a>, w:<a class="type" href="../../../Float.html">Float</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="uniform4fv"></a><h3><p><code><span class="keyword">function</span> <a href="#uniform4fv"><span class="identifier">uniform4fv</span></a>(location:<a class="type" href="../../../js/html/webgl/UniformLocation.html">UniformLocation</a>, v:<a class="type" href="../../../js/html/Float32Array.html">Float32Array</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="uniform4i"></a><h3><p><code><span class="keyword">function</span> <a href="#uniform4i"><span class="identifier">uniform4i</span></a>(location:<a class="type" href="../../../js/html/webgl/UniformLocation.html">UniformLocation</a>, x:<a class="type" href="../../../Int.html">Int</a>, y:<a class="type" href="../../../Int.html">Int</a>, z:<a class="type" href="../../../Int.html">Int</a>, w:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="uniform4iv"></a><h3><p><code><span class="keyword">function</span> <a href="#uniform4iv"><span class="identifier">uniform4iv</span></a>(location:<a class="type" href="../../../js/html/webgl/UniformLocation.html">UniformLocation</a>, v:<a class="type" href="../../../js/html/Int32Array.html">Int32Array</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="uniformMatrix2fv"></a><h3><p><code><span class="keyword">function</span> <a href="#uniformMatrix2fv"><span class="identifier">uniformMatrix2fv</span></a>(location:<a class="type" href="../../../js/html/webgl/UniformLocation.html">UniformLocation</a>, transpose:<a class="type" href="../../../Bool.html">Bool</a>, array:<a class="type" href="../../../js/html/Float32Array.html">Float32Array</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="uniformMatrix3fv"></a><h3><p><code><span class="keyword">function</span> <a href="#uniformMatrix3fv"><span class="identifier">uniformMatrix3fv</span></a>(location:<a class="type" href="../../../js/html/webgl/UniformLocation.html">UniformLocation</a>, transpose:<a class="type" href="../../../Bool.html">Bool</a>, array:<a class="type" href="../../../js/html/Float32Array.html">Float32Array</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="uniformMatrix4fv"></a><h3><p><code><span class="keyword">function</span> <a href="#uniformMatrix4fv"><span class="identifier">uniformMatrix4fv</span></a>(location:<a class="type" href="../../../js/html/webgl/UniformLocation.html">UniformLocation</a>, transpose:<a class="type" href="../../../Bool.html">Bool</a>, array:<a class="type" href="../../../js/html/Float32Array.html">Float32Array</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="useProgram"></a><h3><p><code><span class="keyword">function</span> <a href="#useProgram"><span class="identifier">useProgram</span></a>(program:<a class="type" href="../../../js/html/webgl/Program.html">Program</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="validateProgram"></a><h3><p><code><span class="keyword">function</span> <a href="#validateProgram"><span class="identifier">validateProgram</span></a>(program:<a class="type" href="../../../js/html/webgl/Program.html">Program</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="vertexAttrib1f"></a><h3><p><code><span class="keyword">function</span> <a href="#vertexAttrib1f"><span class="identifier">vertexAttrib1f</span></a>(indx:<a class="type" href="../../../Int.html">Int</a>, x:<a class="type" href="../../../Float.html">Float</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="vertexAttrib1fv"></a><h3><p><code><span class="keyword">function</span> <a href="#vertexAttrib1fv"><span class="identifier">vertexAttrib1fv</span></a>(indx:<a class="type" href="../../../Int.html">Int</a>, values:<a class="type" href="../../../js/html/Float32Array.html">Float32Array</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="vertexAttrib2f"></a><h3><p><code><span class="keyword">function</span> <a href="#vertexAttrib2f"><span class="identifier">vertexAttrib2f</span></a>(indx:<a class="type" href="../../../Int.html">Int</a>, x:<a class="type" href="../../../Float.html">Float</a>, y:<a class="type" href="../../../Float.html">Float</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="vertexAttrib2fv"></a><h3><p><code><span class="keyword">function</span> <a href="#vertexAttrib2fv"><span class="identifier">vertexAttrib2fv</span></a>(indx:<a class="type" href="../../../Int.html">Int</a>, values:<a class="type" href="../../../js/html/Float32Array.html">Float32Array</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="vertexAttrib3f"></a><h3><p><code><span class="keyword">function</span> <a href="#vertexAttrib3f"><span class="identifier">vertexAttrib3f</span></a>(indx:<a class="type" href="../../../Int.html">Int</a>, x:<a class="type" href="../../../Float.html">Float</a>, y:<a class="type" href="../../../Float.html">Float</a>, z:<a class="type" href="../../../Float.html">Float</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="vertexAttrib3fv"></a><h3><p><code><span class="keyword">function</span> <a href="#vertexAttrib3fv"><span class="identifier">vertexAttrib3fv</span></a>(indx:<a class="type" href="../../../Int.html">Int</a>, values:<a class="type" href="../../../js/html/Float32Array.html">Float32Array</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="vertexAttrib4f"></a><h3><p><code><span class="keyword">function</span> <a href="#vertexAttrib4f"><span class="identifier">vertexAttrib4f</span></a>(indx:<a class="type" href="../../../Int.html">Int</a>, x:<a class="type" href="../../../Float.html">Float</a>, y:<a class="type" href="../../../Float.html">Float</a>, z:<a class="type" href="../../../Float.html">Float</a>, w:<a class="type" href="../../../Float.html">Float</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="vertexAttrib4fv"></a><h3><p><code><span class="keyword">function</span> <a href="#vertexAttrib4fv"><span class="identifier">vertexAttrib4fv</span></a>(indx:<a class="type" href="../../../Int.html">Int</a>, values:<a class="type" href="../../../js/html/Float32Array.html">Float32Array</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="vertexAttribPointer"></a><h3><p><code><span class="keyword">function</span> <a href="#vertexAttribPointer"><span class="identifier">vertexAttribPointer</span></a>(indx:<a class="type" href="../../../Int.html">Int</a>, size:<a class="type" href="../../../Int.html">Int</a>, type:<a class="type" href="../../../Int.html">Int</a>, normalized:<a class="type" href="../../../Bool.html">Bool</a>, stride:<a class="type" href="../../../Int.html">Int</a>, offset:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div><div class="platform platform-types"><a name="viewport"></a><h3><p><code><span class="keyword">function</span> <a href="#viewport"><span class="identifier">viewport</span></a>(x:<a class="type" href="../../../Int.html">Int</a>, y:<a class="type" href="../../../Int.html">Int</a>, width:<a class="type" href="../../../Int.html">Int</a>, height:<a class="type" href="../../../Int.html">Int</a>):<a class="type" href="../../../Void.html">Void</a></code></p></h3><div class="doc"><p></p></div></div></div></div></div></body></html>
83,634
167,252
0.646274
86d3f91b5846d4ebbdbc53bbc4e9a8a6a0d2f469
26,075
rs
Rust
tokio/src/runtime/thread_pool/worker.rs
fakeshadow/tokio
345b29ca11755c4dcf6c371ddfd9ce3071e60273
[ "MIT" ]
1
2021-06-18T16:35:33.000Z
2021-06-18T16:35:33.000Z
tokio/src/runtime/thread_pool/worker.rs
fakeshadow/tokio
345b29ca11755c4dcf6c371ddfd9ce3071e60273
[ "MIT" ]
null
null
null
tokio/src/runtime/thread_pool/worker.rs
fakeshadow/tokio
345b29ca11755c4dcf6c371ddfd9ce3071e60273
[ "MIT" ]
null
null
null
//! A scheduler is initialized with a fixed number of workers. Each worker is //! driven by a thread. Each worker has a "core" which contains data such as the //! run queue and other state. When `block_in_place` is called, the worker's //! "core" is handed off to a new thread allowing the scheduler to continue to //! make progress while the originating thread blocks. use crate::coop; use crate::loom::rand::seed; use crate::loom::sync::{Arc, Mutex}; use crate::park::{Park, Unpark}; use crate::runtime; use crate::runtime::enter::EnterContext; use crate::runtime::park::{Parker, Unparker}; use crate::runtime::thread_pool::{AtomicCell, Idle}; use crate::runtime::{queue, task}; use crate::util::linked_list::{Link, LinkedList}; use crate::util::FastRand; use std::cell::RefCell; use std::time::Duration; /// A scheduler worker pub(super) struct Worker { /// Reference to shared state shared: Arc<Shared>, /// Index holding this worker's remote state index: usize, /// Used to hand-off a worker's core to another thread. core: AtomicCell<Core>, } /// Core data struct Core { /// Used to schedule bookkeeping tasks every so often. tick: u8, /// When a task is scheduled from a worker, it is stored in this slot. The /// worker will check this slot for a task **before** checking the run /// queue. This effectively results in the **last** scheduled task to be run /// next (LIFO). This is an optimization for message passing patterns and /// helps to reduce latency. lifo_slot: Option<Notified>, /// The worker-local run queue. run_queue: queue::Local<Arc<Worker>>, /// True if the worker is currently searching for more work. Searching /// involves attempting to steal from other workers. is_searching: bool, /// True if the scheduler is being shutdown is_shutdown: bool, /// Tasks owned by the core tasks: LinkedList<Task, <Task as Link>::Target>, /// Parker /// /// Stored in an `Option` as the parker is added / removed to make the /// borrow checker happy. park: Option<Parker>, /// Fast random number generator. rand: FastRand, } /// State shared across all workers pub(super) struct Shared { /// Per-worker remote state. All other workers have access to this and is /// how they communicate between each other. remotes: Box<[Remote]>, /// Submit work to the scheduler while **not** currently on a worker thread. inject: queue::Inject<Arc<Worker>>, /// Coordinates idle workers idle: Idle, /// Cores that have observed the shutdown signal /// /// The core is **not** placed back in the worker to avoid it from being /// stolen by a thread that was spawned as part of `block_in_place`. #[allow(clippy::vec_box)] // we're moving an already-boxed value shutdown_cores: Mutex<Vec<Box<Core>>>, } /// Used to communicate with a worker from other threads. struct Remote { /// Steal tasks from this worker. steal: queue::Steal<Arc<Worker>>, /// Transfers tasks to be released. Any worker pushes tasks, only the owning /// worker pops. pending_drop: task::TransferStack<Arc<Worker>>, /// Unparks the associated worker thread unpark: Unparker, } /// Thread-local context struct Context { /// Worker worker: Arc<Worker>, /// Core data core: RefCell<Option<Box<Core>>>, } /// Starts the workers pub(crate) struct Launch(Vec<Arc<Worker>>); /// Running a task may consume the core. If the core is still available when /// running the task completes, it is returned. Otherwise, the worker will need /// to stop processing. type RunResult = Result<Box<Core>, ()>; /// A task handle type Task = task::Task<Arc<Worker>>; /// A notified task handle type Notified = task::Notified<Arc<Worker>>; // Tracks thread-local state scoped_thread_local!(static CURRENT: Context); pub(super) fn create(size: usize, park: Parker) -> (Arc<Shared>, Launch) { let mut cores = vec![]; let mut remotes = vec![]; // Create the local queues for _ in 0..size { let (steal, run_queue) = queue::local(); let park = park.clone(); let unpark = park.unpark(); cores.push(Box::new(Core { tick: 0, lifo_slot: None, run_queue, is_searching: false, is_shutdown: false, tasks: LinkedList::new(), park: Some(park), rand: FastRand::new(seed()), })); remotes.push(Remote { steal, pending_drop: task::TransferStack::new(), unpark, }); } let shared = Arc::new(Shared { remotes: remotes.into_boxed_slice(), inject: queue::Inject::new(), idle: Idle::new(size), shutdown_cores: Mutex::new(vec![]), }); let mut launch = Launch(vec![]); for (index, core) in cores.drain(..).enumerate() { launch.0.push(Arc::new(Worker { shared: shared.clone(), index, core: AtomicCell::new(Some(core)), })); } (shared, launch) } pub(crate) fn block_in_place<F, R>(f: F) -> R where F: FnOnce() -> R, { // Try to steal the worker core back struct Reset(coop::Budget); impl Drop for Reset { fn drop(&mut self) { CURRENT.with(|maybe_cx| { if let Some(cx) = maybe_cx { let core = cx.worker.core.take(); let mut cx_core = cx.core.borrow_mut(); assert!(cx_core.is_none()); *cx_core = core; // Reset the task budget as we are re-entering the // runtime. coop::set(self.0); } }); } } let mut had_entered = false; CURRENT.with(|maybe_cx| { match (crate::runtime::enter::context(), maybe_cx.is_some()) { (EnterContext::Entered { .. }, true) => { // We are on a thread pool runtime thread, so we just need to set up blocking. had_entered = true; } (EnterContext::Entered { allow_blocking }, false) => { // We are on an executor, but _not_ on the thread pool. // That is _only_ okay if we are in a thread pool runtime's block_on method: if allow_blocking { had_entered = true; return; } else { // This probably means we are on the basic_scheduler or in a LocalSet, // where it is _not_ okay to block. panic!("can call blocking only when running on the multi-threaded runtime"); } } (EnterContext::NotEntered, true) => { // This is a nested call to block_in_place (we already exited). // All the necessary setup has already been done. return; } (EnterContext::NotEntered, false) => { // We are outside of the tokio runtime, so blocking is fine. // We can also skip all of the thread pool blocking setup steps. return; } } let cx = maybe_cx.expect("no .is_some() == false cases above should lead here"); // Get the worker core. If none is set, then blocking is fine! let core = match cx.core.borrow_mut().take() { Some(core) => core, None => return, }; // The parker should be set here assert!(core.park.is_some()); // In order to block, the core must be sent to another thread for // execution. // // First, move the core back into the worker's shared core slot. cx.worker.core.set(core); // Next, clone the worker handle and send it to a new thread for // processing. // // Once the blocking task is done executing, we will attempt to // steal the core back. let worker = cx.worker.clone(); runtime::spawn_blocking(move || run(worker)); }); if had_entered { // Unset the current task's budget. Blocking sections are not // constrained by task budgets. let _reset = Reset(coop::stop()); crate::runtime::enter::exit(f) } else { f() } } /// After how many ticks is the global queue polled. This helps to ensure /// fairness. /// /// The number is fairly arbitrary. I believe this value was copied from golang. const GLOBAL_POLL_INTERVAL: u8 = 61; impl Launch { pub(crate) fn launch(mut self) { for worker in self.0.drain(..) { runtime::spawn_blocking(move || run(worker)); } } } fn run(worker: Arc<Worker>) { // Acquire a core. If this fails, then another thread is running this // worker and there is nothing further to do. let core = match worker.core.take() { Some(core) => core, None => return, }; // Set the worker context. let cx = Context { worker, core: RefCell::new(None), }; let _enter = crate::runtime::enter(true); CURRENT.set(&cx, || { // This should always be an error. It only returns a `Result` to support // using `?` to short circuit. assert!(cx.run(core).is_err()); }); } impl Context { fn run(&self, mut core: Box<Core>) -> RunResult { while !core.is_shutdown { // Increment the tick core.tick(); // Run maintenance, if needed core = self.maintenance(core); // First, check work available to the current worker. if let Some(task) = core.next_task(&self.worker) { core = self.run_task(task, core)?; continue; } // There is no more **local** work to process, try to steal work // from other workers. if let Some(task) = core.steal_work(&self.worker) { core = self.run_task(task, core)?; } else { // Wait for work core = self.park(core); } } core.pre_shutdown(&self.worker); // Signal shutdown self.worker.shared.shutdown(core); Err(()) } fn run_task(&self, task: Notified, mut core: Box<Core>) -> RunResult { // Make sure the worker is not in the **searching** state. This enables // another idle worker to try to steal work. core.transition_from_searching(&self.worker); // Make the core available to the runtime context *self.core.borrow_mut() = Some(core); // Run the task coop::budget(|| { task.run(); // As long as there is budget remaining and a task exists in the // `lifo_slot`, then keep running. loop { // Check if we still have the core. If not, the core was stolen // by another worker. let mut core = match self.core.borrow_mut().take() { Some(core) => core, None => return Err(()), }; // Check for a task in the LIFO slot let task = match core.lifo_slot.take() { Some(task) => task, None => return Ok(core), }; if coop::has_budget_remaining() { // Run the LIFO task, then loop *self.core.borrow_mut() = Some(core); task.run(); } else { // Not enough budget left to run the LIFO task, push it to // the back of the queue and return. core.run_queue.push_back(task, self.worker.inject()); return Ok(core); } } }) } fn maintenance(&self, mut core: Box<Core>) -> Box<Core> { if core.tick % GLOBAL_POLL_INTERVAL == 0 { // Call `park` with a 0 timeout. This enables the I/O driver, timer, ... // to run without actually putting the thread to sleep. core = self.park_timeout(core, Some(Duration::from_millis(0))); // Run regularly scheduled maintenance core.maintenance(&self.worker); } core } fn park(&self, mut core: Box<Core>) -> Box<Core> { core.transition_to_parked(&self.worker); while !core.is_shutdown { core = self.park_timeout(core, None); // Run regularly scheduled maintenance core.maintenance(&self.worker); if core.transition_from_parked(&self.worker) { return core; } } core } fn park_timeout(&self, mut core: Box<Core>, duration: Option<Duration>) -> Box<Core> { // Take the parker out of core let mut park = core.park.take().expect("park missing"); // Store `core` in context *self.core.borrow_mut() = Some(core); // Park thread if let Some(timeout) = duration { park.park_timeout(timeout).expect("park failed"); } else { park.park().expect("park failed"); } // Remove `core` from context core = self.core.borrow_mut().take().expect("core missing"); // Place `park` back in `core` core.park = Some(park); // If there are tasks available to steal, notify a worker if core.run_queue.is_stealable() { self.worker.shared.notify_parked(); } core } } impl Core { /// Increment the tick fn tick(&mut self) { self.tick = self.tick.wrapping_add(1); } /// Return the next notified task available to this worker. fn next_task(&mut self, worker: &Worker) -> Option<Notified> { if self.tick % GLOBAL_POLL_INTERVAL == 0 { worker.inject().pop().or_else(|| self.next_local_task()) } else { self.next_local_task().or_else(|| worker.inject().pop()) } } fn next_local_task(&mut self) -> Option<Notified> { self.lifo_slot.take().or_else(|| self.run_queue.pop()) } fn steal_work(&mut self, worker: &Worker) -> Option<Notified> { if !self.transition_to_searching(worker) { return None; } let num = worker.shared.remotes.len(); // Start from a random worker let start = self.rand.fastrand_n(num as u32) as usize; for i in 0..num { let i = (start + i) % num; // Don't steal from ourself! We know we don't have work. if i == worker.index { continue; } let target = &worker.shared.remotes[i]; if let Some(task) = target.steal.steal_into(&mut self.run_queue) { return Some(task); } } // Fallback on checking the global queue worker.shared.inject.pop() } fn transition_to_searching(&mut self, worker: &Worker) -> bool { if !self.is_searching { self.is_searching = worker.shared.idle.transition_worker_to_searching(); } self.is_searching } fn transition_from_searching(&mut self, worker: &Worker) { if !self.is_searching { return; } self.is_searching = false; worker.shared.transition_worker_from_searching(); } /// Prepare the worker state for parking fn transition_to_parked(&mut self, worker: &Worker) { // When the final worker transitions **out** of searching to parked, it // must check all the queues one last time in case work materialized // between the last work scan and transitioning out of searching. let is_last_searcher = worker .shared .idle .transition_worker_to_parked(worker.index, self.is_searching); // The worker is no longer searching. Setting this is the local cache // only. self.is_searching = false; if is_last_searcher { worker.shared.notify_if_work_pending(); } } /// Returns `true` if the transition happened. fn transition_from_parked(&mut self, worker: &Worker) -> bool { // If a task is in the lifo slot, then we must unpark regardless of // being notified if self.lifo_slot.is_some() { worker.shared.idle.unpark_worker_by_id(worker.index); self.is_searching = true; return true; } if worker.shared.idle.is_parked(worker.index) { return false; } // When unparked, the worker is in the searching state. self.is_searching = true; true } /// Runs maintenance work such as free pending tasks and check the pool's /// state. fn maintenance(&mut self, worker: &Worker) { self.drain_pending_drop(worker); if !self.is_shutdown { // Check if the scheduler has been shutdown self.is_shutdown = worker.inject().is_closed(); } } // Signals all tasks to shut down, and waits for them to complete. Must run // before we enter the single-threaded phase of shutdown processing. fn pre_shutdown(&mut self, worker: &Worker) { // Signal to all tasks to shut down. for header in self.tasks.iter() { header.shutdown(); } loop { self.drain_pending_drop(worker); if self.tasks.is_empty() { break; } // Wait until signalled let park = self.park.as_mut().expect("park missing"); park.park().expect("park failed"); } } // Shutdown the core fn shutdown(&mut self) { assert!(self.tasks.is_empty()); // Take the core let mut park = self.park.take().expect("park missing"); // Drain the queue while self.next_local_task().is_some() {} park.shutdown(); } fn drain_pending_drop(&mut self, worker: &Worker) { use std::mem::ManuallyDrop; for task in worker.remote().pending_drop.drain() { let task = ManuallyDrop::new(task); // safety: tasks are only pushed into the `pending_drop` stacks that // are associated with the list they are inserted into. When a task // is pushed into `pending_drop`, the ref-inc is skipped, so we must // not ref-dec here. // // See `bind` and `release` implementations. unsafe { self.tasks.remove(task.header().into()); } } } } impl Worker { /// Returns a reference to the scheduler's injection queue fn inject(&self) -> &queue::Inject<Arc<Worker>> { &self.shared.inject } /// Return a reference to this worker's remote data fn remote(&self) -> &Remote { &self.shared.remotes[self.index] } fn eq(&self, other: &Worker) -> bool { self.shared.ptr_eq(&other.shared) && self.index == other.index } } impl task::Schedule for Arc<Worker> { fn bind(task: Task) -> Arc<Worker> { CURRENT.with(|maybe_cx| { let cx = maybe_cx.expect("scheduler context missing"); // Track the task cx.core .borrow_mut() .as_mut() .expect("scheduler core missing") .tasks .push_front(task); // Return a clone of the worker cx.worker.clone() }) } fn release(&self, task: &Task) -> Option<Task> { use std::ptr::NonNull; enum Immediate { // Task has been synchronously removed from the Core owned by the // current thread Removed(Option<Task>), // Task is owned by another thread, so we need to notify it to clean // up the task later. MaybeRemote, } let immediate = CURRENT.with(|maybe_cx| { let cx = match maybe_cx { Some(cx) => cx, None => return Immediate::MaybeRemote, }; if !self.eq(&cx.worker) { // Task owned by another core, so we need to notify it. return Immediate::MaybeRemote; } let mut maybe_core = cx.core.borrow_mut(); if let Some(core) = &mut *maybe_core { // Directly remove the task // // safety: the task is inserted in the list in `bind`. unsafe { let ptr = NonNull::from(task.header()); return Immediate::Removed(core.tasks.remove(ptr)); } } Immediate::MaybeRemote }); // Checks if we were called from within a worker, allowing for immediate // removal of a scheduled task. Else we have to go through the slower // process below where we remotely mark a task as dropped. match immediate { Immediate::Removed(task) => return task, Immediate::MaybeRemote => (), }; // Track the task to be released by the worker that owns it // // Safety: We get a new handle without incrementing the ref-count. // A ref-count is held by the "owned" linked list and it is only // ever removed from that list as part of the release process: this // method or popping the task from `pending_drop`. Thus, we can rely // on the ref-count held by the linked-list to keep the memory // alive. // // When the task is removed from the stack, it is forgotten instead // of dropped. let task = unsafe { Task::from_raw(task.header().into()) }; self.remote().pending_drop.push(task); // The worker core has been handed off to another thread. In the // event that the scheduler is currently shutting down, the thread // that owns the task may be waiting on the release to complete // shutdown. if self.inject().is_closed() { self.remote().unpark.unpark(); } None } fn schedule(&self, task: Notified) { self.shared.schedule(task, false); } fn yield_now(&self, task: Notified) { self.shared.schedule(task, true); } } impl Shared { pub(super) fn schedule(&self, task: Notified, is_yield: bool) { CURRENT.with(|maybe_cx| { if let Some(cx) = maybe_cx { // Make sure the task is part of the **current** scheduler. if self.ptr_eq(&cx.worker.shared) { // And the current thread still holds a core if let Some(core) = cx.core.borrow_mut().as_mut() { self.schedule_local(core, task, is_yield); return; } } } // Otherwise, use the inject queue self.inject.push(task); self.notify_parked(); }); } fn schedule_local(&self, core: &mut Core, task: Notified, is_yield: bool) { // Spawning from the worker thread. If scheduling a "yield" then the // task must always be pushed to the back of the queue, enabling other // tasks to be executed. If **not** a yield, then there is more // flexibility and the task may go to the front of the queue. let should_notify = if is_yield { core.run_queue.push_back(task, &self.inject); true } else { // Push to the LIFO slot let prev = core.lifo_slot.take(); let ret = prev.is_some(); if let Some(prev) = prev { core.run_queue.push_back(prev, &self.inject); } core.lifo_slot = Some(task); ret }; // Only notify if not currently parked. If `park` is `None`, then the // scheduling is from a resource driver. As notifications often come in // batches, the notification is delayed until the park is complete. if should_notify && core.park.is_some() { self.notify_parked(); } } pub(super) fn close(&self) { if self.inject.close() { self.notify_all(); } } fn notify_parked(&self) { if let Some(index) = self.idle.worker_to_notify() { self.remotes[index].unpark.unpark(); } } fn notify_all(&self) { for remote in &self.remotes[..] { remote.unpark.unpark(); } } fn notify_if_work_pending(&self) { for remote in &self.remotes[..] { if !remote.steal.is_empty() { self.notify_parked(); return; } } if !self.inject.is_empty() { self.notify_parked(); } } fn transition_worker_from_searching(&self) { if self.idle.transition_worker_from_searching() { // We are the final searching worker. Because work was found, we // need to notify another worker. self.notify_parked(); } } /// Signals that a worker has observed the shutdown signal and has replaced /// its core back into its handle. /// /// If all workers have reached this point, the final cleanup is performed. fn shutdown(&self, core: Box<Core>) { let mut cores = self.shutdown_cores.lock(); cores.push(core); if cores.len() != self.remotes.len() { return; } for mut core in cores.drain(..) { core.shutdown(); } // Drain the injection queue while self.inject.pop().is_some() {} } fn ptr_eq(&self, other: &Shared) -> bool { std::ptr::eq(self, other) } }
31.302521
96
0.557546
0d5cfe06290a7f0088e12ee4250eaed3b2eddb3d
11,439
cs
C#
Assets/Scripts/_Player/Runtimes/KeyRuntimes/RuntimeVolunAmulet.cs
Amulet-Games/VolunsTale-Codes-Repository
2169ad247df9dc859b192fb3c41048af6a8efc1d
[ "MIT" ]
null
null
null
Assets/Scripts/_Player/Runtimes/KeyRuntimes/RuntimeVolunAmulet.cs
Amulet-Games/VolunsTale-Codes-Repository
2169ad247df9dc859b192fb3c41048af6a8efc1d
[ "MIT" ]
null
null
null
Assets/Scripts/_Player/Runtimes/KeyRuntimes/RuntimeVolunAmulet.cs
Amulet-Games/VolunsTale-Codes-Repository
2169ad247df9dc859b192fb3c41048af6a8efc1d
[ "MIT" ]
null
null
null
using System; using System.Collections; using System.Collections.Generic; using UnityEngine; namespace SA { public class RuntimeVolunAmulet : MonoBehaviour { [Header("Intensity Config.")] public float _originalEmitIntensity = 1.4f; public float _maxEmitIntensity = 2.6f; public float _blinkEmitIntensity = 3.2f; float _curEmitIntensity; Color _originalColor; Color _blinkEmitColor; Color _currentColor; [Header("Change Speed Config.")] public float _maxSpeed = 0.2f; public float _minSpeed = 0.5f; public float _maxSpeedIntenDifference = 1.4f; [ReadOnlyInspector] public float _calculatedSpeed; [Header("Volun Absorb Fx.")] public ParticleSystem _volunAbsorbFx; public ParticleSystem _weaponAbsorbFx; public ParticleSystem _armorAbsorbFx; public ParticleSystem _powerupAbsorbFx; public ParticleSystem _ringAbsorbFx; public ParticleSystem _consumableAbsorbFx; [Header("Refs.")] [ReadOnlyInspector, SerializeField] VolunAmuletItem _referedAmuletItem; [ReadOnlyInspector, SerializeField] Transform _hipTransform; [ReadOnlyInspector, SerializeField] Transform _rightHandTransform; [ReadOnlyInspector, SerializeField] Transform _mTransform; [ReadOnlyInspector] StateManager _states; #region Non Serialized. Material amuletMaterial; int _emissionColorPropertyId; int _intensityTweenId; #endregion public void ShowWhenIgnite() { _mTransform.parent = _rightHandTransform; _mTransform.localPosition = _referedAmuletItem._igniteHeldTransform.pos; _mTransform.localEulerAngles = _referedAmuletItem._igniteHeldTransform.eulers; } public void ShowWhenLevelup() { _mTransform.parent = _rightHandTransform; _mTransform.localPosition = _referedAmuletItem._levelupHeldTransform.pos; _mTransform.localEulerAngles = _referedAmuletItem._levelupHeldTransform.eulers; } public void SheathAmulet() { _mTransform.parent = _hipTransform; _mTransform.localPosition = _referedAmuletItem._amuletSheathTransform.pos; _mTransform.localEulerAngles = _referedAmuletItem._amuletSheathTransform.eulers; } #region Blink Amulet / Reset Emission. #region Variants. /// On Enemy Killed. public void OnEnemyAIKilled_BlinkVolunAmulet() { GetEmissionChangeSpeed(); if (LeanTween.isTweening(_intensityTweenId)) LeanTween.cancel(_intensityTweenId); _intensityTweenId = LeanTween.value(0, 1, _calculatedSpeed).setEaseOutCirc(). setOnUpdate ( (value) => amuletMaterial.SetColor(_emissionColorPropertyId, Color.Lerp(_currentColor, _blinkEmitColor, value)) ) .setOnComplete(OnCompleteBlinkEmission).id; void OnCompleteBlinkEmission() { _curEmitIntensity = GetTargetEmissionValue(); float _new_SqrIntensity = Mathf.Pow(2, _curEmitIntensity); Color _targetColor = new Color(_originalColor.r * _new_SqrIntensity, _originalColor.g * _new_SqrIntensity, _originalColor.b * _new_SqrIntensity); if (LeanTween.isTweening(_intensityTweenId)) LeanTween.cancel(_intensityTweenId); _intensityTweenId = LeanTween.value(0, 1, _calculatedSpeed).setEaseOutCirc(). setOnUpdate ( (value) => amuletMaterial.SetColor(_emissionColorPropertyId, Color.Lerp(_blinkEmitColor, _targetColor, value)) ) .setOnComplete(OnCompleteOverwriteCurrentColor).id; void OnCompleteOverwriteCurrentColor() { _currentColor = _targetColor; } } } /// On Armor Preview Ended. public void OnArmorPreviewEnded_BlinkVolunAmulet() { BlinkVolunAmulet_WithOnCompleteAction(_states.ReverseArmorPreviewDissolve); } public void OnPowerupPreviewEnded_BlinkVolunAmulet() { if (_states._savableInventory.powerupSlot != null) { BlinkVolunAmulet_WithOnCompleteAction(_states.ReversePowerupPreviewDissolve); } else { BlinkVolunAmulet(); } } public void OnWeaponAbsorb_BlinkVolunAmulet() { BlinkVolunAmulet(); } public void OnRingAbsorbEnded_BlinkVolunAmulet() { BlinkVolunAmulet_WithOnCompleteAction(_states._savableInventory.ReversePreviewRing); } public void OnConsumableAbsorb_BlinkVolunAmulet() { BlinkVolunAmulet(); } #endregion /// Blink Amulet. public void BlinkVolunAmulet() { GetEmissionChangeSpeed(); if (LeanTween.isTweening(_intensityTweenId)) LeanTween.cancel(_intensityTweenId); _intensityTweenId = LeanTween.value(0, 1, _calculatedSpeed).setEaseOutCirc(). setOnUpdate ( (value) => amuletMaterial.SetColor(_emissionColorPropertyId, Color.Lerp(_currentColor, _blinkEmitColor, value)) ) .setOnComplete(OnCompleteBlinkEmission).id; void OnCompleteBlinkEmission() { _intensityTweenId = LeanTween.value(0, 1, _calculatedSpeed).setEaseOutCirc(). setOnUpdate ( (value) => amuletMaterial.SetColor(_emissionColorPropertyId, Color.Lerp(_blinkEmitColor, _currentColor, value)) ).id; } } /// Blink Amulet With Complete Action. public void BlinkVolunAmulet_WithOnCompleteAction(Action _onCompleteAction) { GetEmissionChangeSpeed(); if (LeanTween.isTweening(_intensityTweenId)) LeanTween.cancel(_intensityTweenId); _intensityTweenId = LeanTween.value(0, 1, _calculatedSpeed).setEaseOutCirc(). setOnUpdate ( (value) => amuletMaterial.SetColor(_emissionColorPropertyId, Color.Lerp(_currentColor, _blinkEmitColor, value)) ) .setOnComplete(OnCompleteBlinkEmission).id; void OnCompleteBlinkEmission() { _intensityTweenId = LeanTween.value(0, 1, _calculatedSpeed).setEaseOutCirc(). setOnUpdate ( (value) => amuletMaterial.SetColor(_emissionColorPropertyId, Color.Lerp(_blinkEmitColor, _currentColor, value)) ) .setOnComplete(OnCompleteOverwriteCurrentColor).id; void OnCompleteOverwriteCurrentColor() { _onCompleteAction.Invoke(); } } } /// On Level up. public void OnLevelupChangeEmission() { _curEmitIntensity = GetTargetEmissionValue(); float _new_SqrIntensity = Mathf.Pow(2, _curEmitIntensity); Color _targetColor = new Color(_originalColor.r * _new_SqrIntensity, _originalColor.g * _new_SqrIntensity, _originalColor.b * _new_SqrIntensity); if (LeanTween.isTweening(_intensityTweenId)) LeanTween.cancel(_intensityTweenId); _intensityTweenId = LeanTween.value(0, 1, 1).setEaseOutCirc(). setOnUpdate ( (value) => amuletMaterial.SetColor(_emissionColorPropertyId, Color.Lerp(_currentColor, _targetColor, value)) ).setOnComplete(OnCompleteOverwriteCurrentColor).id; void OnCompleteOverwriteCurrentColor() { _currentColor = _targetColor; } } /// Set By Current Volun Ratio. (No Lerp) public void SetEmissionColorByCurrentVolun() { _curEmitIntensity = GetTargetEmissionValue(); float _targetEmitIntensity = Mathf.Pow(2, _curEmitIntensity); _currentColor = new Color(_originalColor.r * _targetEmitIntensity, _originalColor.g * _targetEmitIntensity, _originalColor.b * _targetEmitIntensity); amuletMaterial.SetColor(_emissionColorPropertyId, _currentColor); } #endregion #region Play Fx. public void PlayVolunAbsorbFx() { _volunAbsorbFx.gameObject.SetActive(true); _volunAbsorbFx.Play(); } public void PlayWeaponAbsorbFx() { _weaponAbsorbFx.gameObject.SetActive(true); _weaponAbsorbFx.Play(); } public void PlayArmorAbsorbFx() { _armorAbsorbFx.gameObject.SetActive(true); _armorAbsorbFx.Play(); } public void PlayPowerupAbsorbFx() { _powerupAbsorbFx.gameObject.SetActive(true); _powerupAbsorbFx.Play(); } public void PlayRingAbsorbFx() { _ringAbsorbFx.gameObject.SetActive(true); _ringAbsorbFx.Play(); } public void PlayConsumableAbsorbFx() { _consumableAbsorbFx.gameObject.SetActive(true); _consumableAbsorbFx.Play(); } #endregion #region Init. public void Init(SavableInventory _inventory, VolunAmuletItem _referedAmuletItem) { this._referedAmuletItem = _referedAmuletItem; _states = _inventory._states; _hipTransform = _states.hipTransform; _rightHandTransform = _states.rightHandTransform; _mTransform = gameObject.transform; _inventory.runtimeAmulet = this; SheathAmulet(); InitGetMaterialRef(); InitGetBlinkEmitColor(); SetEmissionColorByCurrentVolun(); } void InitGetMaterialRef() { amuletMaterial = GetComponent<MeshRenderer>().material; _emissionColorPropertyId = Shader.PropertyToID("_EmissionColor"); _originalColor = amuletMaterial.GetColor(_emissionColorPropertyId); } void InitGetBlinkEmitColor() { float _new_SqrIntensity = Mathf.Pow(2, _blinkEmitIntensity); _blinkEmitColor = new Color(_originalColor.r * _new_SqrIntensity, _originalColor.g * _new_SqrIntensity, _originalColor.b * _new_SqrIntensity); } #endregion #region Emission Change Speed. void GetEmissionChangeSpeed() { _calculatedSpeed = Mathf.Clamp01((_blinkEmitIntensity - _curEmitIntensity) / _maxSpeedIntenDifference) * (_maxSpeed - _minSpeed) + _minSpeed; } #endregion #region Emission Value. public float GetTargetEmissionValue() { return _states.statsHandler.GetLevelupRequireRatioProgress() * (_maxEmitIntensity - _originalEmitIntensity) + _originalEmitIntensity; } #endregion } }
35.414861
161
0.611505
d6543ae51717ff7fe31fceea9aff28efd682c36c
4,835
cs
C#
ONI/ElectrolyzerFix/Main.cs
gtrafford/unity-mods
e06d9f81451af74a09ee35d292b716341abef767
[ "MIT" ]
6
2018-09-13T22:43:47.000Z
2020-09-22T17:51:33.000Z
ONI/ElectrolyzerFix/Main.cs
gtrafford/unity-mods
e06d9f81451af74a09ee35d292b716341abef767
[ "MIT" ]
null
null
null
ONI/ElectrolyzerFix/Main.cs
gtrafford/unity-mods
e06d9f81451af74a09ee35d292b716341abef767
[ "MIT" ]
9
2018-09-28T06:06:47.000Z
2022-03-07T10:14:34.000Z
using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; using Harmony12; using UnityModManagerNet; namespace ElectrolyzerFix { public class Main { public static UnityModManager.ModEntry mod; static bool Load(UnityModManager.ModEntry modEntry) { mod = modEntry; var harmony = HarmonyInstance.Create(modEntry.Info.Id); harmony.PatchAll(Assembly.GetExecutingAssembly()); return true; } } [HarmonyPatch(typeof(Electrolyzer))] [HarmonyPatch("RoomForPressure", MethodType.Getter)] static class Electrolyzer_RoomForPressure_Patch { //static SimHashes[] condition = new SimHashes[] { SimHashes.Oxygen }; static bool Prefix(Electrolyzer __instance, ref bool __result) { if (!Main.mod.Active) return true; int num = Grid.PosToCell(__instance.transform.GetPosition()); num = Grid.CellAbove(num); var fn = new Func<HashSet<int>, Electrolyzer, bool>(NormalPressure); __result = FloodFillFindAll(fn, __instance, num, 3, true, true); return false; } static bool NormalPressure(HashSet<int> cells, Electrolyzer electrolyzer) { return cells.Average(x => Grid.Mass[x]) < electrolyzer.maxMass; } public static bool FloodFillFindAll<ArgType>(Func<HashSet<int>, ArgType, bool> fn, ArgType arg, int start_cell, int max_depth, bool stop_at_solid, bool stop_at_liquid, SimHashes[] only_elements = null, SimHashes[] ignore_elements = null) { GameUtil.FloodFillNext.Enqueue(new GameUtil.FloodFillInfo { cell = start_cell, depth = 0 }); while (GameUtil.FloodFillNext.Count > 0) { GameUtil.FloodFillInfo floodFillInfo = GameUtil.FloodFillNext.Dequeue(); if (floodFillInfo.depth < max_depth) { if (Grid.IsValidCell(floodFillInfo.cell)) { Element element = Grid.Element[floodFillInfo.cell]; if (!stop_at_solid || !element.IsSolid) { if (!stop_at_liquid || !element.IsLiquid) { if (only_elements == null || Array.Exists(only_elements, x => x == element.id)) { if (ignore_elements == null || !Array.Exists(ignore_elements, x => x == element.id)) { if (!GameUtil.FloodFillVisited.Contains(floodFillInfo.cell)) { GameUtil.FloodFillVisited.Add(floodFillInfo.cell); GameUtil.FloodFillNext.Enqueue(new GameUtil.FloodFillInfo { cell = Grid.CellLeft(floodFillInfo.cell), depth = floodFillInfo.depth + 1 }); GameUtil.FloodFillNext.Enqueue(new GameUtil.FloodFillInfo { cell = Grid.CellRight(floodFillInfo.cell), depth = floodFillInfo.depth + 1 }); GameUtil.FloodFillNext.Enqueue(new GameUtil.FloodFillInfo { cell = Grid.CellAbove(floodFillInfo.cell), depth = floodFillInfo.depth + 1 }); GameUtil.FloodFillNext.Enqueue(new GameUtil.FloodFillInfo { cell = Grid.CellBelow(floodFillInfo.cell), depth = floodFillInfo.depth + 1 }); } } } } } } } } bool result = fn(GameUtil.FloodFillVisited, arg); GameUtil.FloodFillVisited.Clear(); GameUtil.FloodFillNext.Clear(); return result; } } }
42.787611
245
0.448397
7f780d93febd31a881f73f08d7da77cb74377c87
2,064
php
PHP
controllers/Fav.php
Berailitz/yamb
4bd85fd3e57d0a619da54b6c39ea69f4f47e8f07
[ "MIT" ]
null
null
null
controllers/Fav.php
Berailitz/yamb
4bd85fd3e57d0a619da54b6c39ea69f4f47e8f07
[ "MIT" ]
null
null
null
controllers/Fav.php
Berailitz/yamb
4bd85fd3e57d0a619da54b6c39ea69f4f47e8f07
[ "MIT" ]
null
null
null
<?php /* * Yamb - A module for NForum, a replacement of Mobile Module * * @auther paper777 <wuzhyy@163.com> * */ class FavController extends NF_YambController { private $level = 0; public function init() { parent::init(); $this->requestLogin(); if (!empty($this->params['level'])) { $this->level = (int) $this->params['level']; } } public function changeAction() { if (!isset($this->params['form']['ac']) || !isset($this->params['form']['v'])) { $this->fail('缺少参数'); } load('model/favor'); $action = $this->params['form']['ac']; $val = $this->params['form']['v']; try { $fav = Favor::getInstance($this->level); } catch (FavorNullException $e) { $this->fail('内部错误'); } if ($val == '') { $this->fail('缺少参数'); } switch ($action) { case 'ab': try { $val = Board::getInstance($val); if (!$fav->add($val, Favor::$BOARD)) { $this->fail('收藏失败'); } } catch (Exception $e) { $this->fail('版面不存在'); } break; case 'ad': if (!$fav->add(nforum_iconv('utf-8', $this->encoding, $val), Favor::$DIR)) { $this->fail('添加目录失败'); } break; case 'db': try { $val = Board::getInstance($val); if (!$fav->delete($val, Favor::$BOARD)) { $this->fail('取消收藏失败'); } } catch (Exception $e) { $this->fail('版面不存在'); } break; case 'dd': if (!$fav->delete($val, Favor::$DIR)) { $this->fail('删除目录失败'); } break; } return $this->success(); } }
26.126582
92
0.382267
af7a5770f1219659362fe52219dd88eb5e528d33
1,068
py
Python
xtools/math.py
xikasan/xtools
07c5642eb68a68e18d755fdd680058e843c3a789
[ "MIT" ]
1
2020-03-02T10:13:46.000Z
2020-03-02T10:13:46.000Z
xtools/math.py
xikasan/xtools
07c5642eb68a68e18d755fdd680058e843c3a789
[ "MIT" ]
null
null
null
xtools/math.py
xikasan/xtools
07c5642eb68a68e18d755fdd680058e843c3a789
[ "MIT" ]
null
null
null
# coding: utf-8 import numpy as np def d2r(d): if hasattr(d, "__len__"): if isinstance(d, list): return [d2r(de) for de in d] if isinstance(d, tuple): return (d2r(de) for de in d) return d * np.pi / 180 def r2d(r): if hasattr(r, "__len__"): if isinstance(r, list): return [r2d(re) for re in r] if isinstance(r, tuple): return (r2d(re) for re in r) return r * 180 / np.pi def __round(x, d=0): p = 10 ** d return float(np.floor((x * p) + np.copysign(0.5, x))) / p def round(x, d=0): if hasattr(x, "__len__"): if isinstance(x, list): return [ round(xi, d) for xi in x ] if isinstance(x, tuple): return [ round(xi, d) for xi in x ] if isinstance(x, np.ndarray): return np.array([ round(xi, d) for xi in x ]) raise ValueError("Not supported type: {} is given.".format(type(x)) ) return __round(x, d)
23.733333
77
0.486891
5bd30972d90a059ef03ae9bf6422b3c4c050fd72
815
css
CSS
w7d4/skeleton/application.css
MasonChinkin/aA
0118d92a023a8f5358138b01570f874e219e9942
[ "Apache-2.0" ]
null
null
null
w7d4/skeleton/application.css
MasonChinkin/aA
0118d92a023a8f5358138b01570f874e219e9942
[ "Apache-2.0" ]
null
null
null
w7d4/skeleton/application.css
MasonChinkin/aA
0118d92a023a8f5358138b01570f874e219e9942
[ "Apache-2.0" ]
null
null
null
h4 { color: darkblue; cursor: pointer; } h4:hover { text-decoration: underline; } #rainbow { position: absolute; top: 0; left: 300px; } h3 { position: absolute; top: 1px; } .red { background-color: red; width: 100px; height: 100px; } .orange { background-color: orange; width: 50px; height: 50px; } .yellow { background-color: yellow; width: 50px; height: 50px; } .green { background-color: green; width: 100px; height: 100px; } .blue { background-color: blue; width: 100px; height: 100px; } .indigo { background-color: mediumslateblue; width: 50px; height: 50px; } .violet { background-color: darkviolet; width: 100px; height: 100px; } .active { font-weight: 700; } a { display: block; margin-bottom: 10px; } body { background: grey; }
11.013514
36
0.631902
9c123d2ea0d8561c65a4615b3461d01c608894bb
405
kt
Kotlin
app/src/main/java/com/myweatherapp/AppState.kt
Harasz/MyWeatherApp
6aa85edd4686fa3af9f1b8061d1e929db80dce04
[ "MIT" ]
null
null
null
app/src/main/java/com/myweatherapp/AppState.kt
Harasz/MyWeatherApp
6aa85edd4686fa3af9f1b8061d1e929db80dce04
[ "MIT" ]
null
null
null
app/src/main/java/com/myweatherapp/AppState.kt
Harasz/MyWeatherApp
6aa85edd4686fa3af9f1b8061d1e929db80dce04
[ "MIT" ]
null
null
null
package com.myweatherapp import androidx.lifecycle.LiveData import androidx.lifecycle.MutableLiveData import com.myweatherapp.model.WeatherData class AppState { companion object { private val _data = MutableLiveData<WeatherData>() val data: LiveData<WeatherData> = _data @JvmStatic fun updateData(data: WeatherData) { _data.value = data } } }
23.823529
58
0.688889
8293721c93b71efabc4ec8ddffbcc167a1ffddb5
25,974
ps1
PowerShell
helpers/functions/Get-ChocolateyWebFile.ps1
cryptchk/simbols
c68e6213111464a4031ca3cb18f41e741a55a715
[ "Apache-2.0" ]
null
null
null
helpers/functions/Get-ChocolateyWebFile.ps1
cryptchk/simbols
c68e6213111464a4031ca3cb18f41e741a55a715
[ "Apache-2.0" ]
null
null
null
helpers/functions/Get-ChocolateyWebFile.ps1
cryptchk/simbols
c68e6213111464a4031ca3cb18f41e741a55a715
[ "Apache-2.0" ]
2
2020-11-04T08:13:26.000Z
2020-11-06T08:32:57.000Z
# Copyright 2011 - Present RealDimensions Software, LLC & original authors/contributors from https://github.com/chocolatey/chocolatey # # 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. function Get-ChocolateyWebFile { <# .SYNOPSIS Downloads a file from the internets. .DESCRIPTION This will download a file from a url, tracking with a progress bar. It returns the filepath to the downloaded file when it is complete. .NOTES Chocolatey works best when the packages contain the software it is managing and doesn't require downloads. However most software in the Windows world requires redistribution rights and when sharing packages publicly (like on the community feed), maintainers may not have those aforementioned rights. Chocolatey understands how to work with that, hence this function. You are not subject to this limitation with internal packages. .PARAMETER PackageName The name of the package - while this is an arbitrary value, it's recommended that it matches the package id. .PARAMETER FileFullPath This is the full path of the resulting file name. .PARAMETER Url This is the 32 bit url to download the resource from. This resource can be used on 64 bit systems when a package has both a Url and Url64bit specified if a user passes `--forceX86`. If there is only a 64 bit url available, please remove do not use the paramter (only use Url64bit). Will fail on 32bit systems if missing or if a user attempts to force a 32 bit installation on a 64 bit system. Prefer HTTPS when available. Can be HTTP, FTP, or File URIs. .PARAMETER Url64bit OPTIONAL - If there is a 64 bit resource available, use this parameter. Chocolatey will automatically determine if the user is running a 64 bit OS or not and adjust accordingly. Please note that the 32 bit url will be used in the absence of this. This parameter should only be used for 64 bit native software. If the original Url contains both (which is quite rare), set this to '$url' Otherwise remove this parameter. Prefer HTTPS when available. Can be HTTP, FTP, or File URIs. In 0.10.1+, `Url64` is an alias for Url64bit. .PARAMETER Checksum The checksum hash value of the Url resource. This allows a checksum to be validated for files that are not local. The checksum type is covered by ChecksumType. **NOTE:** Checksums in packages are meant as a measure to validate the originally intended file that was used in the creation of a package is the same file that is received at a future date. Since this is used for other steps in the process related to the community repository, it ensures that the file a user receives is the same file a maintainer and a moderator (if applicable), plus any moderation review has intended for you to receive with this package. If you are looking at a remote source that uses the same url for updates, you will need to ensure the package also stays updated in line with those remote resource updates. You should look into [automatic packaging](https://chocolatey.org/docs/automatic-packages) to help provide that functionality. .PARAMETER ChecksumType The type of checkum that the file is validated with - valid values are 'md5', 'sha1', 'sha256' or 'sha512' - defaults to 'md5'. MD5 is not recommended as certain organizations need to use FIPS compliant algorithms for hashing - see https://support.microsoft.com/en-us/kb/811833 for more details. The recommendation is to use at least SHA256. .PARAMETER Checksum64 OPTIONAL if no Url64bit - The checksum hash value of the Url64bit resource. This allows a checksum to be validated for files that are not local. The checksum type is covered by ChecksumType64. **NOTE:** Checksums in packages are meant as a measure to validate the originally intended file that was used in the creation of a package is the same file that is received at a future date. Since this is used for other steps in the process related to the community repository, it ensures that the file a user receives is the same file a maintainer and a moderator (if applicable), plus any moderation review has intended for you to receive with this package. If you are looking at a remote source that uses the same url for updates, you will need to ensure the package also stays updated in line with those remote resource updates. You should look into [automatic packaging](https://chocolatey.org/docs/automatic-packages) to help provide that functionality. **NOTE:** To determine checksums, you can get that from the original site if provided. You can also use the [checksum tool available on the community feed](https://chocolatey.org/packages/checksum) (`choco install checksum`) and use it e.g. `checksum -t sha256 -f path\to\file`. Ensure you provide checksums for all remote resources used. .PARAMETER ChecksumType64 OPTIONAL - The type of checkum that the file is validated with - valid values are 'md5', 'sha1', 'sha256' or 'sha512' - defaults to ChecksumType parameter value. MD5 is not recommended as certain organizations need to use FIPS compliant algorithms for hashing - see https://support.microsoft.com/en-us/kb/811833 for more details. The recommendation is to use at least SHA256. .PARAMETER Options OPTIONAL - Specify custom headers. Available in 0.9.10+. .PARAMETER GetOriginalFileName OPTIONAL switch to allow Chocolatey to determine the original file name from the url resource. Available in 0.9.10+. .PARAMETER ForceDownload OPTIONAL switch to force download of file every time, even if the file already exists. Available in 0.10.1+. .PARAMETER IgnoredArguments Allows splatting with arguments that do not apply. Do not use directly. .EXAMPLE Get-ChocolateyWebFile '__NAME__' 'C:\somepath\somename.exe' 'URL' '64BIT_URL_DELETE_IF_NO_64BIT' .EXAMPLE > # Download from an HTTPS location $toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" Get-ChocolateyWebFile -PackageName 'bob' -FileFullPath "$toolsDir\bob.exe" -Url 'https://somewhere/bob.exe' .EXAMPLE > # Download from FTP $toolsDir = "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)" Get-ChocolateyWebFile -PackageName 'bob' -FileFullPath "$toolsDir\bob.exe" -Url 'ftp://somewhere/bob.exe' .EXAMPLE > # Download from a file share $toolsDir = "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)" Get-ChocolateyWebFile -PackageName 'bob' -FileFullPath "$toolsDir\bob.exe" -Url 'file:///\\fileshare\location\bob.exe' .EXAMPLE > $options = @{ Headers = @{ Accept = 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'; 'Accept-Charset' = 'ISO-8859-1,utf-8;q=0.7,*;q=0.3'; 'Accept-Language' = 'en-GB,en-US;q=0.8,en;q=0.6'; Cookie = 'requiredinfo=info'; Referer = 'https://somelocation.com/'; } } Get-ChocolateyWebFile -PackageName 'package' -FileFullPath "$(Split-Path -Parent $MyInvocation.MyCommand.Definition)\thefile.exe" -Url 'https://somelocation.com/thefile.exe' -Options $options .LINK Install-ChocolateyPackage .LINK Get-WebFile .LINK Get-WebFileName .LINK Get-FtpFile #> param( [parameter(Mandatory=$true, Position=0)][string] $packageName, [parameter(Mandatory=$true, Position=1)][string] $fileFullPath, [parameter(Mandatory=$false, Position=2)][string] $url = '', [parameter(Mandatory=$false, Position=3)] [alias("url64")][string] $url64bit = '', [parameter(Mandatory=$false)][string] $checksum = '', [parameter(Mandatory=$false)][string] $checksumType = '', [parameter(Mandatory=$false)][string] $checksum64 = '', [parameter(Mandatory=$false)][string] $checksumType64 = $checksumType, [parameter(Mandatory=$false)][hashtable] $options = @{Headers=@{}}, [parameter(Mandatory=$false)][switch] $getOriginalFileName, [parameter(Mandatory=$false)][switch] $forceDownload, [parameter(ValueFromRemainingArguments = $true)][Object[]] $ignoredArguments ) Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters if ($url -ne $null) { $url = $url.Replace("//","/").Replace(":/","://") } if ($url64bit -ne $null) { $url64bit = $url64bit.Replace("//","/").Replace(":/","://") } $url32bit = $url # allow user provided values for checksumming $checksum32Override = $env:chocolateyChecksum32 $checksumType32Override = $env:chocolateyChecksumType32 $checksum64Override = $env:chocolateyChecksum64 $checksumType64Override = $env:chocolateyChecksumType64 if ($checksum32Override -ne $null -and $checksum32Override -ne '') { $checksum = $checksum32Override } if ($checksumType32Override -ne $null -and $checksumType32Override -ne '') { $checksumType = $checksumType32Override } if ($checksum64Override -ne $null -and $checksum64Override -ne '') { $checksum64 = $checksum64Override } if ($checksumType64Override -ne $null -and $checksumType64Override -ne '') { $checksumType64 = $checksumType64Override } $checksum32 = $checksum $checksumType32 = $checksumType $bitWidth = 32 if (Get-ProcessorBits 64) { $bitWidth = 64 } Write-Debug "CPU is $bitWidth bit" $bitPackage = '' if ($url32bit -ne $url64bit -and $url64bit -ne $null -and $url64bit -ne '') { $bitPackage = '32 bit' } if ($bitWidth -eq 64 -and $url64bit -ne $null -and $url64bit -ne '') { Write-Debug "Setting url to '$url64bit' and bitPackage to $bitWidth" $bitPackage = '64 bit' $url = $url64bit # only set if urls are different if ($url32bit -ne $url64bit) { $checksum = $checksum64 if ($checkSumType64 -ne '') { $checksumType = $checksumType64 } } } $forceX86 = $env:chocolateyForceX86; if ($forceX86) { Write-Debug "User specified -x86 so forcing 32 bit" if ($url32bit -ne $url64bit) { $bitPackage = '32 bit' } $url = $url32bit $checksum = $checksum32 $checksumType = $checksumType32 } # If we're on 32 bit or attempting to force 32 bit and there is no # 32 bit url, we need to throw an error. if ($url -eq $null -or $url -eq '') { throw "This package does not support $bitWidth bit architecture." } # determine if the url can be SSL/TLS if ($url.StartsWith('http:')) { try { $httpsUrl = $url.Replace("http://", "https://") Get-WebHeaders -Url $httpsUrl -ErrorAction "Stop" | Out-Null $url = $httpsUrl Write-Warning "Url has SSL/TLS available, switching to HTTPS for download" } catch { Write-Debug "Url does not have HTTPS available" } } if ($getOriginalFileName) { try { $fileFullPath = $fileFullPath -replace '\\chocolatey\\chocolatey\\', '\chocolatey\' $fileDirectory = [System.IO.Path]::GetDirectoryName($fileFullPath) $originalFileName = [System.IO.Path]::GetFileName($fileFullPath) $fileFullPath = Get-WebFileName -Url $url -DefaultName $originalFileName $fileFullPath = Join-Path $fileDirectory $fileFullPath $fileFullPath = [System.IO.Path]::GetFullPath($fileFullPath) } catch { Write-Host "Attempt to use original download file name failed for '$url'." } } try { $fileDirectory = $([System.IO.Path]::GetDirectoryName($fileFullPath)) if (!(Test-Path($fileDirectory))) { [System.IO.Directory]::CreateDirectory($fileDirectory) | Out-Null } } catch { Write-Host "Attempt to create directory failed for '$fileFullPath'." } $urlIsRemote = $true $headers = @{} if ($url.StartsWith('http')) { try { $headers = Get-WebHeaders -Url $url -ErrorAction "Stop" } catch { if ($host.Version -lt (New-Object 'Version' 3,0)) { Write-Debug "Converting Security Protocol to SSL3 only for Powershell v2" # this should last for the entire duration $originalProtocol = [System.Net.ServicePointManager]::SecurityProtocol [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Ssl3 try { $headers = Get-WebHeaders -Url $url -ErrorAction "Stop" } catch { Write-Host "Attempt to get headers for $url failed.`n $($_.Exception.Message)" [System.Net.ServicePointManager]::SecurityProtocol = $originalProtocol } } else { Write-Host "Attempt to get headers for $url failed.`n $($_.Exception.Message)" } } $needsDownload = $true $fiCached = New-Object System.IO.FileInfo($fileFullPath) if ($fiCached.Exists -and -not ($forceDownload)) { if ($checksum -ne $null -and $checksum -ne '') { try { Write-Host "File appears to be downloaded already. Verifying with package checksum to determine if it needs to be redownloaded." Get-ChecksumValid -file $fileFullPath -checkSum $checksum -checksumType $checksumType -originalUrl $url -ErrorAction "Stop" $needsDownload = $false } catch { Write-Debug "Existing file failed checksum. Will be redownloaded from url." } } elseif ($headers.Count -ne 0 -and $headers.ContainsKey("Content-Length")) { # if the file already exists there is no reason to download it again. if ($fiCached.Length -eq $headers["Content-Length"]) { $needsDownload = $false } } } if ($needsDownload) { Write-Host "Downloading $packageName $bitPackage from `'$url`'" Get-WebFile -Url $url -FileName $fileFullPath -Options $options } else { Write-Debug "$($packageName)'s requested file has already been downloaded. Using cached copy at '$fileFullPath'." } } elseif ($url.StartsWith('ftp')) { Write-Host "Ftp-ing $packageName from '$url'" Get-FtpFile -Url $url -FileName $fileFullPath } else { if ($url.StartsWith('file:')) { $url = ([uri] $url).LocalPath } Write-Host "Copying $packageName from `'$url`'" Copy-Item $url -Destination $fileFullPath -Force $urlIsRemote = $false } Start-Sleep 2 #give it a sec or two to finish up copying $fi = New-Object System.IO.FileInfo($fileFullPath) # validate file exists if (!($fi.Exists)) { throw "Chocolatey expected a file to be downloaded to `'$fileFullPath`' but nothing exists at that location." } Get-VirusCheckValid -Location $url -File $fileFullPath if ($headers.Count -ne 0 -and ($checksum -eq $null -or $checksum -eq '')) { # validate length is what we expected Write-Debug "Checking that '$fileFullPath' is the size we expect it to be." if ($headers.ContainsKey("Content-Length") -and ($fi.Length -ne $headers["Content-Length"])) { throw "Chocolatey expected a file at '$fileFullPath' to be of length '$($headers["Content-Length"])' but the length was '$($fi.Length)'." } if ($headers.ContainsKey("X-Checksum-Sha1")) { $remoteChecksum = $headers["X-Checksum-Sha1"] Write-Debug "Verifying remote checksum of '$remoteChecksum' for '$fileFullPath'." Get-ChecksumValid -File $fileFullPath -Checksum $remoteChecksum -ChecksumType 'sha1' -OriginalUrl $url } } #skip requirement for embedded files if checksum is not provided if ($urlIsRemote -or ($checksum -ne $null -and $checksum -ne '')) { Write-Debug "Verifying package provided checksum of '$checksum' for '$fileFullPath'." Get-ChecksumValid -File $fileFullPath -Checksum $checksum -ChecksumType $checksumType -OriginalUrl $url } return $fileFullPath } # SIG # Begin signature block # MIIcrQYJKoZIhvcNAQcCoIIcnjCCHJoCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDer0jYr9VCKAdi # /Tp+xOYO94PKlQIRizZFWberSC7be6CCF7cwggUwMIIEGKADAgECAhAECRgbX9W7 # ZnVTQ7VvlVAIMA0GCSqGSIb3DQEBCwUAMGUxCzAJBgNVBAYTAlVTMRUwEwYDVQQK # EwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xJDAiBgNV # BAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0xMzEwMjIxMjAwMDBa # Fw0yODEwMjIxMjAwMDBaMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy # dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD # ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwggEiMA0GCSqGSIb3 # DQEBAQUAA4IBDwAwggEKAoIBAQD407Mcfw4Rr2d3B9MLMUkZz9D7RZmxOttE9X/l # qJ3bMtdx6nadBS63j/qSQ8Cl+YnUNxnXtqrwnIal2CWsDnkoOn7p0WfTxvspJ8fT # eyOU5JEjlpB3gvmhhCNmElQzUHSxKCa7JGnCwlLyFGeKiUXULaGj6YgsIJWuHEqH # CN8M9eJNYBi+qsSyrnAxZjNxPqxwoqvOf+l8y5Kh5TsxHM/q8grkV7tKtel05iv+ # bMt+dDk2DZDv5LVOpKnqagqrhPOsZ061xPeM0SAlI+sIZD5SlsHyDxL0xY4PwaLo # LFH3c7y9hbFig3NBggfkOItqcyDQD2RzPJ6fpjOp/RnfJZPRAgMBAAGjggHNMIIB # yTASBgNVHRMBAf8ECDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBhjATBgNVHSUEDDAK # BggrBgEFBQcDAzB5BggrBgEFBQcBAQRtMGswJAYIKwYBBQUHMAGGGGh0dHA6Ly9v # Y3NwLmRpZ2ljZXJ0LmNvbTBDBggrBgEFBQcwAoY3aHR0cDovL2NhY2VydHMuZGln # aWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEUm9vdENBLmNydDCBgQYDVR0fBHow # eDA6oDigNoY0aHR0cDovL2NybDQuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJl # ZElEUm9vdENBLmNybDA6oDigNoY0aHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0Rp # Z2lDZXJ0QXNzdXJlZElEUm9vdENBLmNybDBPBgNVHSAESDBGMDgGCmCGSAGG/WwA # AgQwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzAK # BghghkgBhv1sAzAdBgNVHQ4EFgQUWsS5eyoKo6XqcQPAYPkt9mV1DlgwHwYDVR0j # BBgwFoAUReuir/SSy4IxLVGLp6chnfNtyA8wDQYJKoZIhvcNAQELBQADggEBAD7s # DVoks/Mi0RXILHwlKXaoHV0cLToaxO8wYdd+C2D9wz0PxK+L/e8q3yBVN7Dh9tGS # dQ9RtG6ljlriXiSBThCk7j9xjmMOE0ut119EefM2FAaK95xGTlz/kLEbBw6RFfu6 # r7VRwo0kriTGxycqoSkoGjpxKAI8LpGjwCUR4pwUR6F6aGivm6dcIFzZcbEMj7uo # +MUSaJ/PQMtARKUT8OZkDCUIQjKyNookAv4vcn4c10lFluhZHen6dGRrsutmQ9qz # sIzV6Q3d9gEgzpkxYz0IGhizgZtPxpMQBvwHgfqL2vmCSfdibqFT+hKUGIUukpHq # aGxEMrJmoecYpJpkUe8wggVAMIIEKKADAgECAhAHdGbtomdvOuySF9IwU3EQMA0G # CSqGSIb3DQEBCwUAMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJ # bmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lDZXJ0 # IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0EwHhcNMTYwMzI0MDAwMDAw # WhcNMTcwMzI4MTIwMDAwWjB9MQswCQYDVQQGEwJVUzEPMA0GA1UECBMGS2Fuc2Fz # MQ8wDQYDVQQHEwZUb3Bla2ExJTAjBgNVBAoTHFJlYWxEaW1lbnNpb25zIFNvZnR3 # YXJlLCBMTEMxJTAjBgNVBAMTHFJlYWxEaW1lbnNpb25zIFNvZnR3YXJlLCBMTEMw # ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC52YS2WKUpBtdkDyJ3G0Qm # 42v+W+yqr7DediVzIeCjHpKNkmmxO8+lS+nniFDjoFGO1JG/G3ZywVRFlM1LKHeP # M1eON6wT0H1gvhxpMzyuC/SRW9wvMtTlvHnjdTLW06Oe9tvGkQkTM8rbzwRDIZ9o # ddT8BxHSOmGelrAN9CwKf60ziw8jKLZnuAuZwSgkX5K7wvOs8viqydlnt7z3Wyim # L+wjue85Mpa7jyjIfnUqssN1qz4nce+e89CxTD2AbWjGwnfTcTgmj3EUSJRQgDRk # J+O/sVzS/V76xajLoPvI4ZlAsMpeK3ptLYqviU3ZaNUzLQWFjuWqc3fhjbWDFF51 # AgMBAAGjggHFMIIBwTAfBgNVHSMEGDAWgBRaxLl7KgqjpepxA8Bg+S32ZXUOWDAd # BgNVHQ4EFgQUT0GgvxvwrOqMjXQ8yw7QDagIVJ4wDgYDVR0PAQH/BAQDAgeAMBMG # A1UdJQQMMAoGCCsGAQUFBwMDMHcGA1UdHwRwMG4wNaAzoDGGL2h0dHA6Ly9jcmwz # LmRpZ2ljZXJ0LmNvbS9zaGEyLWFzc3VyZWQtY3MtZzEuY3JsMDWgM6Axhi9odHRw # Oi8vY3JsNC5kaWdpY2VydC5jb20vc2hhMi1hc3N1cmVkLWNzLWcxLmNybDBMBgNV # HSAERTBDMDcGCWCGSAGG/WwDATAqMCgGCCsGAQUFBwIBFhxodHRwczovL3d3dy5k # aWdpY2VydC5jb20vQ1BTMAgGBmeBDAEEATCBhAYIKwYBBQUHAQEEeDB2MCQGCCsG # AQUFBzABhhhodHRwOi8vb2NzcC5kaWdpY2VydC5jb20wTgYIKwYBBQUHMAKGQmh0 # dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydFNIQTJBc3N1cmVkSURD # b2RlU2lnbmluZ0NBLmNydDAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBCwUAA4IB # AQAD6K2ldfDx7hOZxW6smYkiV4lxXY4bewxGv/gh2hjWgLiQ/sornz2fHDni/kOf # qhn8/3KvYd4V33QqMqjm/qsRpwjj9NC/Q2BGuTg0ax3e/Z9ZIvcYB4xx8CRbGKse # R9lixgMAJZMCWyGzAC/E3XX+BX3B6y8N5zBIKRY1M7xub+LM7zW9LGMhX3e56J7G # UF7zIzQ7ZkaJzfxFbVvEz2/KNoNGiCmA7Y0biMXpX9730Dbg4Z+B4SUe4k4WPLS/ # 3goAq8lVMFtoqShvyvrmYtj2gFjQmH3BzSCSRZrAFbWYDCga57Fq7A4xrF2i67kG # oljzeP+/35wuoOlrggn2EuJ1MIIGajCCBVKgAwIBAgIQAwGaAjr/WLFr1tXq5hfw # ZjANBgkqhkiG9w0BAQUFADBiMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNl # cnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSEwHwYDVQQDExhEaWdp # Q2VydCBBc3N1cmVkIElEIENBLTEwHhcNMTQxMDIyMDAwMDAwWhcNMjQxMDIyMDAw # MDAwWjBHMQswCQYDVQQGEwJVUzERMA8GA1UEChMIRGlnaUNlcnQxJTAjBgNVBAMT # HERpZ2lDZXJ0IFRpbWVzdGFtcCBSZXNwb25kZXIwggEiMA0GCSqGSIb3DQEBAQUA # A4IBDwAwggEKAoIBAQCjZF38fLPggjXg4PbGKuZJdTvMbuBTqZ8fZFnmfGt/a4yd # VfiS457VWmNbAklQ2YPOb2bu3cuF6V+l+dSHdIhEOxnJ5fWRn8YUOawk6qhLLJGJ # zF4o9GS2ULf1ErNzlgpno75hn67z/RJ4dQ6mWxT9RSOOhkRVfRiGBYxVh3lIRvfK # Do2n3k5f4qi2LVkCYYhhchhoubh87ubnNC8xd4EwH7s2AY3vJ+P3mvBMMWSN4+v6 # GYeofs/sjAw2W3rBerh4x8kGLkYQyI3oBGDbvHN0+k7Y/qpA8bLOcEaD6dpAoVk6 # 2RUJV5lWMJPzyWHM0AjMa+xiQpGsAsDvpPCJEY93AgMBAAGjggM1MIIDMTAOBgNV # HQ8BAf8EBAMCB4AwDAYDVR0TAQH/BAIwADAWBgNVHSUBAf8EDDAKBggrBgEFBQcD # CDCCAb8GA1UdIASCAbYwggGyMIIBoQYJYIZIAYb9bAcBMIIBkjAoBggrBgEFBQcC # ARYcaHR0cHM6Ly93d3cuZGlnaWNlcnQuY29tL0NQUzCCAWQGCCsGAQUFBwICMIIB # Vh6CAVIAQQBuAHkAIAB1AHMAZQAgAG8AZgAgAHQAaABpAHMAIABDAGUAcgB0AGkA # ZgBpAGMAYQB0AGUAIABjAG8AbgBzAHQAaQB0AHUAdABlAHMAIABhAGMAYwBlAHAA # dABhAG4AYwBlACAAbwBmACAAdABoAGUAIABEAGkAZwBpAEMAZQByAHQAIABDAFAA # LwBDAFAAUwAgAGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIA # dAB5ACAAQQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQA # IABsAGkAYQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIA # cABvAHIAYQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUA # bgBjAGUALjALBglghkgBhv1sAxUwHwYDVR0jBBgwFoAUFQASKxOYspkH7R7for5X # DStnAs0wHQYDVR0OBBYEFGFaTSS2STKdSip5GoNL9B6Jwcp9MH0GA1UdHwR2MHQw # OKA2oDSGMmh0dHA6Ly9jcmwzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3VyZWRJ # RENBLTEuY3JsMDigNqA0hjJodHRwOi8vY3JsNC5kaWdpY2VydC5jb20vRGlnaUNl # cnRBc3N1cmVkSURDQS0xLmNybDB3BggrBgEFBQcBAQRrMGkwJAYIKwYBBQUHMAGG # GGh0dHA6Ly9vY3NwLmRpZ2ljZXJ0LmNvbTBBBggrBgEFBQcwAoY1aHR0cDovL2Nh # Y2VydHMuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEQ0EtMS5jcnQwDQYJ # KoZIhvcNAQEFBQADggEBAJ0lfhszTbImgVybhs4jIA+Ah+WI//+x1GosMe06Fxlx # F82pG7xaFjkAneNshORaQPveBgGMN/qbsZ0kfv4gpFetW7easGAm6mlXIV00Lx9x # sIOUGQVrNZAQoHuXx/Y/5+IRQaa9YtnwJz04HShvOlIJ8OxwYtNiS7Dgc6aSwNOO # Mdgv420XEwbu5AO2FKvzj0OncZ0h3RTKFV2SQdr5D4HRmXQNJsQOfxu19aDxxncG # KBXp2JPlVRbwuwqrHNtcSCdmyKOLChzlldquxC5ZoGHd2vNtomHpigtt7BIYvfdV # VEADkitrwlHCCkivsNRu4PQUCjob4489yq9qjXvc2EQwggbNMIIFtaADAgECAhAG # /fkDlgOt6gAK6z8nu7obMA0GCSqGSIb3DQEBBQUAMGUxCzAJBgNVBAYTAlVTMRUw # EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x # JDAiBgNVBAMTG0RpZ2lDZXJ0IEFzc3VyZWQgSUQgUm9vdCBDQTAeFw0wNjExMTAw # MDAwMDBaFw0yMTExMTAwMDAwMDBaMGIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxE # aWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xITAfBgNVBAMT # GERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMTCCASIwDQYJKoZIhvcNAQEBBQADggEP # ADCCAQoCggEBAOiCLZn5ysJClaWAc0Bw0p5WVFypxNJBBo/JM/xNRZFcgZ/tLJz4 # FlnfnrUkFcKYubR3SdyJxArar8tea+2tsHEx6886QAxGTZPsi3o2CAOrDDT+GEmC # /sfHMUiAfB6iD5IOUMnGh+s2P9gww/+m9/uizW9zI/6sVgWQ8DIhFonGcIj5BZd9 # o8dD3QLoOz3tsUGj7T++25VIxO4es/K8DCuZ0MZdEkKB4YNugnM/JksUkK5ZZgrE # jb7SzgaurYRvSISbT0C58Uzyr5j79s5AXVz2qPEvr+yJIvJrGGWxwXOt1/HYzx4K # dFxCuGh+t9V3CidWfA9ipD8yFGCV/QcEogkCAwEAAaOCA3owggN2MA4GA1UdDwEB # /wQEAwIBhjA7BgNVHSUENDAyBggrBgEFBQcDAQYIKwYBBQUHAwIGCCsGAQUFBwMD # BggrBgEFBQcDBAYIKwYBBQUHAwgwggHSBgNVHSAEggHJMIIBxTCCAbQGCmCGSAGG # /WwAAQQwggGkMDoGCCsGAQUFBwIBFi5odHRwOi8vd3d3LmRpZ2ljZXJ0LmNvbS9z # c2wtY3BzLXJlcG9zaXRvcnkuaHRtMIIBZAYIKwYBBQUHAgIwggFWHoIBUgBBAG4A # eQAgAHUAcwBlACAAbwBmACAAdABoAGkAcwAgAEMAZQByAHQAaQBmAGkAYwBhAHQA # ZQAgAGMAbwBuAHMAdABpAHQAdQB0AGUAcwAgAGEAYwBjAGUAcAB0AGEAbgBjAGUA # IABvAGYAIAB0AGgAZQAgAEQAaQBnAGkAQwBlAHIAdAAgAEMAUAAvAEMAUABTACAA # YQBuAGQAIAB0AGgAZQAgAFIAZQBsAHkAaQBuAGcAIABQAGEAcgB0AHkAIABBAGcA # cgBlAGUAbQBlAG4AdAAgAHcAaABpAGMAaAAgAGwAaQBtAGkAdAAgAGwAaQBhAGIA # aQBsAGkAdAB5ACAAYQBuAGQAIABhAHIAZQAgAGkAbgBjAG8AcgBwAG8AcgBhAHQA # ZQBkACAAaABlAHIAZQBpAG4AIABiAHkAIAByAGUAZgBlAHIAZQBuAGMAZQAuMAsG # CWCGSAGG/WwDFTASBgNVHRMBAf8ECDAGAQH/AgEAMHkGCCsGAQUFBwEBBG0wazAk # BggrBgEFBQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tMEMGCCsGAQUFBzAC # hjdodHRwOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1cmVkSURS # b290Q0EuY3J0MIGBBgNVHR8EejB4MDqgOKA2hjRodHRwOi8vY3JsMy5kaWdpY2Vy # dC5jb20vRGlnaUNlcnRBc3N1cmVkSURSb290Q0EuY3JsMDqgOKA2hjRodHRwOi8v # Y3JsNC5kaWdpY2VydC5jb20vRGlnaUNlcnRBc3N1cmVkSURSb290Q0EuY3JsMB0G # A1UdDgQWBBQVABIrE5iymQftHt+ivlcNK2cCzTAfBgNVHSMEGDAWgBRF66Kv9JLL # gjEtUYunpyGd823IDzANBgkqhkiG9w0BAQUFAAOCAQEARlA+ybcoJKc4HbZbKa9S # z1LpMUerVlx71Q0LQbPv7HUfdDjyslxhopyVw1Dkgrkj0bo6hnKtOHisdV0XFzRy # R4WUVtHruzaEd8wkpfMEGVWp5+Pnq2LN+4stkMLA0rWUvV5PsQXSDj0aqRRbpoYx # YqioM+SbOafE9c4deHaUJXPkKqvPnHZL7V/CSxbkS3BMAIke/MV5vEwSV/5f4R68 # Al2o/vsHOE8Nxl2RuQ9nRc3Wg+3nkg2NsWmMT/tZ4CMP0qquAHzunEIOz5HXJ7cW # 7g/DvXwKoO4sCFWFIrjrGBpN/CohrUkxg0eVd3HcsRtLSxwQnHcUwZ1PL1qVCCkQ # JjGCBEwwggRIAgEBMIGGMHIxCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2Vy # dCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20xMTAvBgNVBAMTKERpZ2lD # ZXJ0IFNIQTIgQXNzdXJlZCBJRCBDb2RlIFNpZ25pbmcgQ0ECEAd0Zu2iZ2867JIX # 0jBTcRAwDQYJYIZIAWUDBAIBBQCggYQwGAYKKwYBBAGCNwIBDDEKMAigAoAAoQKA # ADAZBgkqhkiG9w0BCQMxDAYKKwYBBAGCNwIBBDAcBgorBgEEAYI3AgELMQ4wDAYK # KwYBBAGCNwIBFTAvBgkqhkiG9w0BCQQxIgQgv/XMP7zWGwLVEPs77K6Qthe/70xu # 4oH+alDiFVuQRwcwDQYJKoZIhvcNAQEBBQAEggEAl9xpKnvMtvMsxKN23qzcOnpv # u4d3DSWJjWOd8XTNttM5P6krPTPlTGIalcgM2f/YR3y3WNP7hZXyjIpptBo8AwW1 # LVI+DNinnFjjXnizpmQld+Eq6G0twN+ryQYElQQd1c1R8RNhCT47CjZmBYxR8N5q # HA7ZqlKWLQnVPF9UZsQ42dugsim4/so8m0p88JWb+JG1FGFJ5u+p+d+UIFNwQ/ce # gEaDajJQzxnGY5ngAx3WKWT/FJcqj6hk4JX1KlbRjeKB3d02m7sbjBdJlHBXk4XD # Yy998ZN6Lhwk9JO3QHHYcwrwA8cFEyYv3zK+DPAwr0hpvHfUqXk69T58cE2WaqGC # Ag8wggILBgkqhkiG9w0BCQYxggH8MIIB+AIBATB2MGIxCzAJBgNVBAYTAlVTMRUw # EwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5kaWdpY2VydC5jb20x # ITAfBgNVBAMTGERpZ2lDZXJ0IEFzc3VyZWQgSUQgQ0EtMQIQAwGaAjr/WLFr1tXq # 5hfwZjAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkq # hkiG9w0BCQUxDxcNMTYxMDA3MDY1ODE4WjAjBgkqhkiG9w0BCQQxFgQUcixhZKIj # DFwNhFLH5EvgD62Ozm4wDQYJKoZIhvcNAQEBBQAEggEAAcSsK/FcSzrw57pUlf4G # HPBN5V4b1GS/uNFYopjsD7xNowhuHKLyUCQb4qx75lZikdGgYcwtTxfPGm3kdPMX # 6gzo9HLP7sJBA9qyCMy+4RPvyDIOk4mhmTiF91y2uJVFLuhLk7sYxq1DLDXJbZIt # vac0eWONInIckaT/qEjWJQSumIEaxkGqEADZQ+XQSAMoryVbpDUi29fA4UAFlnAa # YG2lYC+HgywviIlaC6bfoEBPB0wQa7vePdTca2NKU0KBUKUsROHKpVcUzwIEkVhb # BP+TdjueeXAr5eGZDwfSXFqniD3ThAs+JqvvuliNCL/gkYDZmlC5iUZTJ0fjmzFu # Lw== # SIG # End signature block
48.189239
239
0.806922
8c0d0d633e46a3f6c3b5cc23eda111f976165745
7,743
sql
SQL
PolicyMicroservice/src/main/resources/data.sql
akshitchandora/Policy-Administration-System
f4182c25aabe20bdd530fb4b2866542edead8677
[ "MIT" ]
2
2021-01-29T07:59:13.000Z
2021-04-04T06:56:43.000Z
PolicyMicroservice/src/main/resources/data.sql
akshitchandora/Policy-Administration-System
f4182c25aabe20bdd530fb4b2866542edead8677
[ "MIT" ]
null
null
null
PolicyMicroservice/src/main/resources/data.sql
akshitchandora/Policy-Administration-System
f4182c25aabe20bdd530fb4b2866542edead8677
[ "MIT" ]
1
2021-05-25T04:45:25.000Z
2021-05-25T04:45:25.000Z
INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P01','Building','Owner','2,00,00,000','2 year',8,5,'Chennai','Pay Back'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P02','Building','Owner','4,00,000','2 year',9,10,'Chennai','Fire'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P03','Building','Owner','2,00,000','3 week',7,8,'Pune','Replacement'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P04','Building','Owner','2,00,000','9 week',6,9,'Delhi','Burglary'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P05','Building','Owner','3,00,000','34 week',4,6,'Hyderabad','All Risks'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P06','Building','Owner','5,00,000','2 year',8,9,'Pune','Natural Disaster'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P07','Building','Rented','2,00,000','1 year',7,6,'Mumbai','Pay Back'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P08','Building','Rented','4,00,000','3 year',5,8,'Pune','Fire'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P09','Building','Rented','3,00,000','11 week',4,7,'Chennai','Burglary'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P10','Building','Rented','2,00,000','25 week',6,7,'Delhi','Replacement'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P11','Building','Rented','4,00,000','1 year',6,8,'Pune','Natural Disaster'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P12','Factory Equipment','Owner','4,00,000','3 year',7,9,'Hyderabad','Fire'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P13','Factory Equipment','Owner','3,00,000','2 year',6,8,'Pune','Burglary'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P14','Factory Equipment','Owner','7,00,000','4 year',5,5,'Chennai','Replacement'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P15','Factory Equipment','Owner','5,00,000','2 year',5,7,'Hyderabad','Pay Back'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P16','Factory Equipment','Owner','8,00,000','2 year',7,8,'Pune','All Risks'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P17','Factory Equipment','Owner','5,00,000','1 year',5,6,'Pune','Natural Disaster'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P18','Factory Equipment','Rented','8,00,000','1 year',8,5,'Chennai','Fire'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P19','Factory Equipment','Rented','9,00,000','1 year',7,8,'Mumbai','Burglary'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P20','Factory Equipment','Rented','6,00,000','2 year',5,8,'Mumbai','Replacement'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P21','Factory Equipment','Rented','7,00,000','1 year',7,6,'Chennai','Pay Back'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P22','Factory Equipment','Rented','5,00,000','3 year',4,8,'Hyderabad','All Risks'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P23','Factory Equipment','Rented','7,00,000','2 year',4,9,'Chennai','Natural Disaster'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P24','Property in Transit','Owner','8,00,000','3 year',5,6,'Pune','Pay Back'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P25','Property in Transit','Owner','5,00,000','4 year',4,8,'Mumbai','Burglary'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P26','Property in Transit','Owner','7,00,000','2 year',7,8,'Mumbai','Natural Disaster'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P27','Property in Transit','Owner','9,00,000','9 week',7,9,'Hyderabad','All Risks'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P28','Property in Transit','Owner','7,00,000','1 year',5,7,'Mumbai','Replacement'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P29','Property in Transit','Owner','4,00,000','14 week',9,8,'Chennai','Fire'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P30','Property in Transit','Rented','8,00,000','1 year',6,8,'Hyderabad','Pay Back'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P31','Property in Transit','Rented','3,00,000','2 year',9,5,'Chennai','Burglary'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P32','Property in Transit','Rented','4,00,000','34 week',7,8,'Mumbai','Natural Disaster'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P33','Property in Transit','Rented','6,00,000','2 year',5,8,'Chennai','All Risks'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P34','Property in Transit','Rented','5,00,000','21 week',8,9,'Pune','Replacement'); INSERT INTO Policy_Master(Policy_ID,Property_Type,Consumer_Type,Assured_Sum,Tenure,Business_Value,Property_Value,Base_Location,Type) VALUES ('P35','Property in Transit','Rented','8,00,000','1 year',5,7,'Mumbai','Fire');
215.083333
232
0.798528
5ad986896ee8fce4cd55ce9cf1e534158d03a928
3,582
cs
C#
Runtime/Trigger/Triggers/StratusSelectableProxy.cs
Azurelol/Stratus-Core
ff86ec280eff23054cdff07e35fbbf8d113d5068
[ "MIT" ]
16
2016-08-12T00:39:26.000Z
2021-08-19T17:09:26.000Z
Runtime/Trigger/Triggers/StratusSelectableProxy.cs
Azurelol/Stratus-Core
ff86ec280eff23054cdff07e35fbbf8d113d5068
[ "MIT" ]
13
2017-10-15T14:35:47.000Z
2018-08-05T03:33:51.000Z
Runtime/Trigger/Triggers/StratusSelectableProxy.cs
Azurelol/Stratus-Core
ff86ec280eff23054cdff07e35fbbf8d113d5068
[ "MIT" ]
3
2019-11-03T05:52:48.000Z
2020-11-13T01:15:30.000Z
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using UnityEngine.EventSystems; using UnityEngine.Events; namespace Stratus { public class StratusSelectableProxy : StratusProxy, IEventSystemHandler, IPointerEnterHandler, IPointerExitHandler, IPointerDownHandler, IPointerUpHandler, ISelectHandler, IDeselectHandler { /// <summary> /// A callback consisting of the selectable information /// </summary> [System.Serializable] public class SelectionCallback : UnityEvent<bool> { } public enum SelectionType { Selected, Highlighted, Pressed } public delegate void OnSelectionMessage(bool state); public OnSelectionMessage onSelect { get; set; } public OnSelectionMessage onHighlighted { get; set; } public OnSelectionMessage onPressed { get; set; } public bool interactable => selectable.IsInteractable(); //------------------------------------------------------------------------/ // Fields //------------------------------------------------------------------------/ private Selectable selectable; //------------------------------------------------------------------------/ // Messages //------------------------------------------------------------------------/ void Awake() { selectable = GetComponent<Selectable>(); } public void OnSelect(BaseEventData data) { if (!interactable) return; onSelect?.Invoke(true); } public void OnDeselect(BaseEventData data) { //if (!interactable) // return; onSelect?.Invoke(false); } public void OnPointerEnter(PointerEventData eventData) { if (!interactable) return; onHighlighted?.Invoke(true); } public void OnPointerExit(PointerEventData eventData) { if (!interactable) return; onHighlighted?.Invoke(false); } public void OnPointerDown(PointerEventData eventData) { if (!interactable) return; onPressed?.Invoke(true); } public void OnPointerUp(PointerEventData eventData) { if (!interactable) return; onPressed?.Invoke(false); } //------------------------------------------------------------------------/ // Methods //------------------------------------------------------------------------/ /// <summary> /// Constructs a proxy in order to observe a given Selectable's selection messages /// </summary> /// <param name="target"></param> /// <param name="type"></param> /// <param name="onCollision"></param> /// <param name="persistent"></param> /// <returns></returns> public static StratusSelectableProxy Construct(Selectable target, SelectionType type, OnSelectionMessage callback, bool persistent = true) { var proxy = target.gameObject.GetOrAddComponent<StratusSelectableProxy>(); proxy.persistent = persistent; if (type == SelectionType.Selected) proxy.onSelect += callback; else if (type == SelectionType.Highlighted) proxy.onHighlighted += callback; else if (type == SelectionType.Pressed) proxy.onPressed += callback; return proxy; } /// <summary> /// Constructs a proxy in order to observe a given Selectable's selection messages /// </summary> /// <param name="target"></param> /// <param name="type"></param> /// <param name="onCollision"></param> /// <param name="persistent"></param> /// <returns></returns> public static StratusSelectableProxy Construct(Selectable target, bool persistent = true) { var proxy = target.gameObject.GetOrAddComponent<StratusSelectableProxy>(); proxy.persistent = persistent; return proxy; } } }
28.887097
140
0.617253
e8722e084dbef9cd3c466d5007423c235ae4fe80
5,416
css
CSS
pacote-download/template_matrix/_css/style.css
KawanZadra3112/Meus-Templates
3fcb6fc66846e4d495118c8c4988c3e0986384e7
[ "MIT" ]
null
null
null
pacote-download/template_matrix/_css/style.css
KawanZadra3112/Meus-Templates
3fcb6fc66846e4d495118c8c4988c3e0986384e7
[ "MIT" ]
null
null
null
pacote-download/template_matrix/_css/style.css
KawanZadra3112/Meus-Templates
3fcb6fc66846e4d495118c8c4988c3e0986384e7
[ "MIT" ]
null
null
null
*{padding: 0; margin: 0; box-sizing: border-box;} img{ max-width: 100% ; } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; } .mb-30 { margin-bottom: 30px; } .bl-0 { border-left: 1px solid transparent !important; } .bbt-0{ border-bottom: 0 !important; } .bt-0{ border-top: 0!important; } .br-0 { border-right: 1px solid transparent !important; } /* TOPO SITE */ .container { width: 100%; } .standard { max-width: 1200px; margin-left: 70px; } .clear { clear: both; } .top_esq { float: left; width: 50%; margin-top: 40px; padding: 0 0 0 60px; } .top_esq h1 { font-weight: normal; font-size: 50px; margin-bottom: 10px; } .top_esq h3 { font-weight: normal; font-size: 24px; line-height: 35px; width: 500px; float: left; margin-bottom: 20px; } .top_esq h4 { font-weight: normal; border: 1px solid #363636; background-color: #C0C0C0; font-size: 25px; border-radius: 30px; margin-top: 20px; padding: 10px; float: left; } .top_dir { display: block; width: 50%; height: 500px; background: url('../_img/montanhas.jpg') center center/100% no-repeat #363636; background-size: cover; float: left; } .top_dir:hover { opacity: 0.6; transition-duration: 2s; cursor: pointer; } .top_esq h4:hover { background-color: #363636; border-radius: 40px; color: #C0C0C0; cursor: pointer; transition-duration: 2s; } .top_esq p { width: 500px; line-height: 30px; } /* FIM DO TOPO SITE */ /* PARTE 02 DO SITE */ .pt2_site_esq { background: url('../_img/middle_site.jpg') center center/100% no-repeat; width: 50%; float: left; display: block; height: 500px; } .pt2_site_esq:hover { cursor: pointer; opacity: 0.6; transition-duration: 1.5s; } .pt2_site_dir { float: left; width: 50%; font-family: Arial, Helvetica, sans-serif; } .pt2_site_dir h1 { padding: 10px; margin-top: 150px; margin-left: 30px; } .pt2_site_dir h4 { margin-left: 40px; margin-top: 30px; display: inline-block; border: 2px solid #363636; border-radius: 40px; font-size: 15px; letter-spacing: 2px; text-transform: uppercase; padding: 17px; background-color: gray; } .pt2_site_dir h4:hover { background-color: #363636; border-radius: 30px; transition-duration: 1.5s; color: aqua; cursor: pointer; } .pt2_site_dir p { float: left; margin-left: 40px; line-height: 25px; } /* FIM PARTE 2 DO SITE */ /* PARTE 3 SITE */ .pt3_site_esq { width: 50%; margin-left: 30px; float: left; } .pt3_site_esq p { line-height: 25px; letter-spacing: 1.5 px; margin-top: 30px; margin-left: 20px; width: 500px; } .pt3_site_esq h1 { margin-top: 30px; margin-bottom: -10px; margin-left: 20px; } .pt3_site_esq h4 { margin-left: 20px; margin-top: 30px; border: 2px solid #1C1C1C; background-color: #808080; border-radius: 30px; display: inline-block; padding: 15px; letter-spacing: 2px; text-transform: uppercase; } .pt3_site_esq h4:hover { cursor: pointer; background-color: #4F4F4F; border-radius: 40px; transition-duration: 1.5s; color: turquoise; } .pt3_site_dir { width: 40%; background: url('../_img/pt3_site.jpg') center center/100% no-repeat; display: block; height: 400px; float: right; } .pt3_site_dir:hover{ opacity: 0.6; transition-duration: 1.5s; cursor: pointer; width: 600px; } /* FIM PARTE 3 DO SITE */ /* PARTE 04 SITE */ .pt4_site_esq { background: url('../_img/p4_site.jpg') center center/100% no-repeat; height: 400px; float: left; width: 50%; display: block; } .pt4_site_esq:hover { opacity: 0.6; transition-duration: 1.5s; cursor: pointer; width: 650px; } .pt4_site_dir { margin-left: 50px; width:calc(50% - 50px); float: right; padding: 30px; } .pt4_site_dir h1{ font-family: Arial, Helvetica, sans-serif; margin-top: 100px; margin-bottom: 20px; } .pt4_site_dir p{ letter-spacing: 1px; line-height: 30px; } .pt4_site_dir h4 { margin-top: 10px; border-radius: 30px; letter-spacing: 2px; padding: 18px; display: inline-block; border: 1px solid #708090; background-color: #B0C4DE; text-transform: uppercase; } .pt4_site_dir h4:hover { background-color: #00FFFF; color: white; transition-duration: 1.5s; cursor: pointer; border: 1px solid gray; box-shadow: 4px 4px 3px gray; } /* FIM PARTE 04 SITE */ /* PARTE 05 SITE */ .pt_site_05 { text-align: center; } .pt_site_05 h1 { margin-bottom: 20px; } .pt_site_05 p { letter-spacing: 1px; line-height: 25px; } /* FIM PARTE 05 SITE */ /* PARTE 06 SITE */ .imgs_25 { width: 25%; float: left; margin-top: 30px; } /* FIM PARTE 06 SITE */ /* ULTIMA PARTE SITE */ .imgs_ptultima{ text-align: center; width: 33.33333333333333%; float: left; padding: 40px; border: 1px solid #CCC; } .imgs_ptultima img { width: 80px; } .footer{ width: 100%; text-align: center; color: grey; background-color: #f7f7f7; float: left; padding: 20px; margin-top: 30px; font-size: 12px; } /* FIM DA ULTIMA PARTE SITE */
16.313253
83
0.61226
f610aa4c07d63a4b170aea3c6bde113f89ace473
331
swift
Swift
Sources/Fakery/Generators/Car.swift
EricWVGG/Fakery
cc9df445328124b7f910771d60f4482f1ed8bdce
[ "MIT" ]
null
null
null
Sources/Fakery/Generators/Car.swift
EricWVGG/Fakery
cc9df445328124b7f910771d60f4482f1ed8bdce
[ "MIT" ]
null
null
null
Sources/Fakery/Generators/Car.swift
EricWVGG/Fakery
cc9df445328124b7f910771d60f4482f1ed8bdce
[ "MIT" ]
null
null
null
import Foundation <<<<<<< HEAD public final class Car: Generator { public func brand() -> String { return generate("car.brand") ======= extension Faker { public final class Car: Generator { public func brand() -> String { return generate("car.brand") } >>>>>>> 92d714d5b6626f629e3dccc79963f3ca8b1678d6 } }
20.6875
48
0.652568