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
857a451c34ce94edb38b8e4b4ba609e8ec9ddf8d
293
js
JavaScript
jazelle/utils/get-registry-from-url.js
romaxa/fusionjs-public
ce2b75eb6b3fe01bec48ef28b39515b9cdcc0a4c
[ "MIT" ]
3
2020-02-18T15:33:54.000Z
2021-06-15T11:08:20.000Z
jazelle/utils/get-registry-from-url.js
romaxa/fusionjs-public
ce2b75eb6b3fe01bec48ef28b39515b9cdcc0a4c
[ "MIT" ]
null
null
null
jazelle/utils/get-registry-from-url.js
romaxa/fusionjs-public
ce2b75eb6b3fe01bec48ef28b39515b9cdcc0a4c
[ "MIT" ]
null
null
null
// @flow /*:: export type GetRegistryFromUrl = (string) => string */ const getRegistryFromUrl /*: GetRegistryFromUrl */ = url => { const match = url.match(/^https?:\/\/(.*?)\//); if (Array.isArray(match)) { return match[1]; } return url; }; module.exports = {getRegistryFromUrl};
20.928571
61
0.62116
ddd8f3aa30499c1002910b1be66ce767368afc69
1,844
php
PHP
app/Order.php
simtj-tdi/dmp9backoffice
807327e4ac1fae6ae6f8315d4b51a6a45cab8473
[ "MIT" ]
null
null
null
app/Order.php
simtj-tdi/dmp9backoffice
807327e4ac1fae6ae6f8315d4b51a6a45cab8473
[ "MIT" ]
3
2021-03-10T09:23:12.000Z
2022-02-27T00:20:51.000Z
app/Order.php
simtj-tdi/dmp9backoffice
807327e4ac1fae6ae6f8315d4b51a6a45cab8473
[ "MIT" ]
null
null
null
<?php namespace App; use Illuminate\Database\Eloquent\Model; use Parsedown; class Order extends Model { protected $appends = ['new_date']; CONST STATE_1 = 0; // ๊ฒฐ์ œ์ „ CONST STATE_2 = 1; // ๊ฒฐ์ œ์™„๋ฃŒ CONST TAX_STATE_1 = 1; // ๊ณ„์‚ฐ์„œ ์š”์ฒญ๊ฐ€๋Šฅ (๋ฏธ๋ฐœํ–‰) CONST TAX_STATE_2 = 2; // ๊ณ„์‚ฐ์„œ ์š”์ฒญ์‹ ์ฒญ (ํ™•์ธ์ค‘) CONST TAX_STATE_3 = 3; // ๊ณ„์‚ฐ์„œ ์‹ ์ฒญ์™„๋ฃŒ (๋ฐœํ–‰) protected $guarded = ['*','id']; public function format() { return [ 'order_id' => $this->id, 'user_id' => $this->user, 'payment_id' => $this->payment_returns, 'order_no' => $this->carts, 'order_name' => $this->order_name, 'goods_info' => $this->goods_info, 'state' => $this->state, 'tax_state' => $this->tax_state, 'total_count' => $this->total_count, 'total_price' => $this->total_price, 'created_at' => $this->created_at, 'updated_at' => $this->updated_at ]; } public function getNewDateAttribute() { $REG_DATE = strtotime($this->updated_at); $REG_TIME = time(); $TIME = 60*60*24; if ( ($REG_TIME-$REG_DATE) < $TIME ) { $new="1"; }else{ $new=""; } return $new; } public function user() { return $this->belongsTo(User::class); } public function payment_returns() { return $this->belongsTo(Payment_return::class, 'payment_id'); } public function carts() { return $this->belongsTo(Cart::class, 'order_no', 'order_no'); } public function getContentHtmlAttribute() { return Parsedown::instance()->text($this->data_content); } public function getMarkPriceAttribute() { return number_format($this->buy_price); } }
23.341772
69
0.533623
dd0d7c6dd7f0fcea8f87ebeb9896f9f54792b3fd
985
go
Go
leetcode/combination-sum-ii/solution.go
rtxu/cp
16b8d6337e202f19ce75db644d4c54f4ef7baa32
[ "MIT" ]
null
null
null
leetcode/combination-sum-ii/solution.go
rtxu/cp
16b8d6337e202f19ce75db644d4c54f4ef7baa32
[ "MIT" ]
null
null
null
leetcode/combination-sum-ii/solution.go
rtxu/cp
16b8d6337e202f19ce75db644d4c54f4ef7baa32
[ "MIT" ]
null
null
null
func backtrack(i int, current []int, nums, counts []int, target int, result *[][]int) { if target == 0 { currentCopy := make([]int, len(current)) copy(currentCopy, current) *result = append(*result, currentCopy) return } if i == len(nums) { return } var j int for j = 0; j <= counts[i] && target - nums[i]*j >= 0; j++ { backtrack(i+1, current, nums, counts, target - nums[i]*j, result) current = append(current, nums[i]) } current = current[0:len(current)-j] } func combinationSum2(candidates []int, target int) [][]int { M := make(map[int]int) for i := 0; i < len(candidates); i++ { M[candidates[i]]++ } nums, counts := make([]int, len(M)), make([]int, len(M)) var i int for num, count := range M { nums[i], counts[i] = num, count i++ } var result [][]int backtrack(0, []int{}, nums, counts, target, &result) return result }
28.142857
87
0.532995
48657a179dcafaacaa490463dfa2093438fcbe93
2,017
kt
Kotlin
framework/src/main/kotlin/dev/alpas/http/middleware/VerifyCsrfToken.kt
SimoneStefani/alpas
b5e2346bc395d9025b8792a0f887bf192da21151
[ "MIT" ]
null
null
null
framework/src/main/kotlin/dev/alpas/http/middleware/VerifyCsrfToken.kt
SimoneStefani/alpas
b5e2346bc395d9025b8792a0f887bf192da21151
[ "MIT" ]
null
null
null
framework/src/main/kotlin/dev/alpas/http/middleware/VerifyCsrfToken.kt
SimoneStefani/alpas
b5e2346bc395d9025b8792a0f887bf192da21151
[ "MIT" ]
null
null
null
package dev.alpas.http.middleware import dev.alpas.Handler import dev.alpas.Middleware import dev.alpas.config import dev.alpas.encryption.Encrypter import dev.alpas.hashEquals import dev.alpas.http.HttpCall import dev.alpas.http.X_CSRF_TOKEN_KEY import dev.alpas.http.X_XSRF_TOKEN_KEY import dev.alpas.make import dev.alpas.session.CSRF_SESSION_KEY import dev.alpas.session.SessionConfig import dev.alpas.session.TokenMismatchException open class VerifyCsrfToken : Middleware<HttpCall>() { override fun invoke(passable: HttpCall, forward: Handler<HttpCall>) { val skipCsrfCheck = passable.route()?.skipCsrfCheck ?: false if (passable.method.isReading() || skipCsrfCheck || isValidXSRFToken(passable)) { forward(passable) if (passable.sessionIsValid()) { addXSRFToken(passable) } } else { throw TokenMismatchException("Token doesn't match") } } private fun addXSRFToken(call: HttpCall) { val config = call.config<SessionConfig>() call.cookie.add( "XSRF-TOKEN", call.session.csrfToken() ?: "", lifetime = config.lifetime, path = config.path, domain = config.domain, secure = false, httpOnly = false ) } private fun isValidXSRFToken(call: HttpCall): Boolean { val callToken = getCallToken(call) val sessionToken = call.session.csrfToken() if (callToken != null && sessionToken != null) { return hashEquals(callToken, sessionToken) } return false } private fun getCallToken(call: HttpCall): String? { val token = call.stringOrNull(CSRF_SESSION_KEY) ?: call.header(X_CSRF_TOKEN_KEY) val encryptedToken = call.header(X_XSRF_TOKEN_KEY) return if (token == null && encryptedToken != null) { return call.make<Encrypter>().decrypt(encryptedToken) } else { token } } }
32.532258
89
0.644026
564c003325a979c694fb559510df9ead2bab9c65
1,207
kt
Kotlin
detekt-rules/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/style/LoopWithTooManyJumpStatementsSpec.kt
Jachu5/detekt
e7954db37470f869aa898726e3eef66c9efa4f01
[ "Apache-2.0" ]
1
2020-04-23T14:33:02.000Z
2020-04-23T14:33:02.000Z
detekt-rules/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/style/LoopWithTooManyJumpStatementsSpec.kt
Jachu5/detekt
e7954db37470f869aa898726e3eef66c9efa4f01
[ "Apache-2.0" ]
1
2018-07-19T21:58:14.000Z
2018-07-24T20:36:43.000Z
detekt-rules/src/test/kotlin/io/gitlab/arturbosch/detekt/rules/style/LoopWithTooManyJumpStatementsSpec.kt
Jachu5/detekt
e7954db37470f869aa898726e3eef66c9efa4f01
[ "Apache-2.0" ]
2
2018-07-14T18:40:50.000Z
2019-03-15T00:38:18.000Z
package io.gitlab.arturbosch.detekt.rules.style import io.gitlab.arturbosch.detekt.rules.Case import io.gitlab.arturbosch.detekt.test.TestConfig import io.gitlab.arturbosch.detekt.test.lint import org.assertj.core.api.Assertions.assertThat import org.jetbrains.spek.api.dsl.given import org.jetbrains.spek.api.dsl.it import org.jetbrains.spek.subject.SubjectSpek class LoopWithTooManyJumpStatementsSpec : SubjectSpek<LoopWithTooManyJumpStatements>({ subject { LoopWithTooManyJumpStatements() } given("loops with multiple break or continue statements") { val path = Case.LoopWithTooManyJumpStatementsPositive.path() it("reports loops with more than 1 break or continue statement") { assertThat(subject.lint(path)).hasSize(3) } it("does not report when max count configuration is set to 2") { val config = TestConfig(mapOf(LoopWithTooManyJumpStatements.MAX_JUMP_COUNT to "2")) val findings = LoopWithTooManyJumpStatements(config).lint(path) assertThat(findings).hasSize(0) } it("does not report loop with less than 1 break or continue statement") { val findings = subject.lint(Case.LoopWithTooManyJumpStatementsNegative.path()) assertThat(findings).hasSize(0) } } })
35.5
86
0.788732
3450b52999f430a5b3b8ce5b41d5426aa1a4cd85
796
swift
Swift
SignalKitTests/Extensions/UIKit/UITextFieldExtensionsTests.swift
yankodimitrov/SignalK
e0f946921793415ac8381fdb3b6a7bcc73efe1bf
[ "MIT" ]
284
2015-07-17T21:36:46.000Z
2022-03-15T12:07:31.000Z
SignalKitTests/Extensions/UIKit/UITextFieldExtensionsTests.swift
yankodimitrov/SignalK
e0f946921793415ac8381fdb3b6a7bcc73efe1bf
[ "MIT" ]
19
2015-07-27T02:27:07.000Z
2017-07-01T10:51:50.000Z
SignalKitTests/Extensions/UIKit/UITextFieldExtensionsTests.swift
yankodimitrov/SignalK
e0f946921793415ac8381fdb3b6a7bcc73efe1bf
[ "MIT" ]
27
2015-07-20T06:54:26.000Z
2021-12-25T14:28:46.000Z
// // UITextFieldExtensionsTests.swift // SignalKit // // Created by Yanko Dimitrov on 3/6/16. // Copyright ยฉ 2016 Yanko Dimitrov. All rights reserved. // import XCTest @testable import SignalKit class UITextFieldExtensionsTests: XCTestCase { var bag: DisposableBag! override func setUp() { super.setUp() bag = DisposableBag() } func testObserveTextChanges() { let field = MockTextField() var result = "" field.observe().text .next { result = $0 } .disposeWith(bag) field.text = "John" field.sendActionsForControlEvents(.EditingChanged) XCTAssertEqual(result, "John", "Should observe the text changes in UITextField") } }
21.513514
88
0.589196
7a05abbaa2f3ed0b991bf705574c46f9756c0dc5
492
rb
Ruby
lib/brick_ftp/restful_api/create_folder.rb
dailypay/brick_ftp
181e9a963a3ba5c7790ee3cef6f9b87152f276fa
[ "MIT" ]
18
2016-10-04T09:02:35.000Z
2019-11-08T07:36:31.000Z
lib/brick_ftp/restful_api/create_folder.rb
dailypay/brick_ftp
181e9a963a3ba5c7790ee3cef6f9b87152f276fa
[ "MIT" ]
55
2016-10-02T11:26:22.000Z
2021-09-16T02:47:00.000Z
lib/brick_ftp/restful_api/create_folder.rb
dailypay/brick_ftp
181e9a963a3ba5c7790ee3cef6f9b87152f276fa
[ "MIT" ]
6
2016-11-11T06:25:01.000Z
2019-12-26T15:26:02.000Z
# frozen_string_literal: true require 'erb' module BrickFTP module RESTfulAPI # Create a folder # # @see https://developers.files.com/#create-a-folder Create a folder # class CreateFolder include Command # Creates a folder. # # @param [String] path # @return [BrickFTP::Types::Folder] Folders # def call(path) client.post("/api/rest/v1/folders/#{ERB::Util.url_encode(path)}") true end end end end
18.923077
73
0.601626
2602eca239ac1507dd53509d59e31b0029d97128
3,056
java
Java
src/test/java/com/alexrnl/commons/translation/TranslatorTest.java
AlexRNL/Commons
e65e42f3649d6381a6f644beb03304c2ae4ad524
[ "BSD-3-Clause" ]
1
2015-04-03T00:25:56.000Z
2015-04-03T00:25:56.000Z
src/test/java/com/alexrnl/commons/translation/TranslatorTest.java
AlexRNL/Commons
e65e42f3649d6381a6f644beb03304c2ae4ad524
[ "BSD-3-Clause" ]
null
null
null
src/test/java/com/alexrnl/commons/translation/TranslatorTest.java
AlexRNL/Commons
e65e42f3649d6381a6f644beb03304c2ae4ad524
[ "BSD-3-Clause" ]
2
2015-04-03T00:25:58.000Z
2019-04-23T03:47:15.000Z
package com.alexrnl.commons.translation; import static org.junit.Assert.assertEquals; import java.net.URISyntaxException; import java.nio.file.Paths; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import org.junit.Before; import org.junit.Test; /** * Test suite for the {@link Translator} class. * @author Alex */ public class TranslatorTest { /** The translator to test */ private Translator translator; /** * Set up attributes. * @throws URISyntaxException * if the path to the test translation file is not valid. */ @Before public void setUp () throws URISyntaxException { translator = new Translator(Paths.get(getClass().getResource("/locale.xml").toURI())); } /** * Test method for {@link Translator#get(String)}. */ @Test public void testGetString () { assertEquals("aba.ldr", translator.get("aba.ldr")); assertEquals("The Name", translator.get("commons.test.name")); assertEquals("Hey, this has The Name, isn't that cool?", translator.get("commons.test.include")); assertEquals("Hey, this has The Name", translator.get("commons.test.includeEnd")); assertEquals("commons.test.missing", translator.get("commons.test.missing")); assertEquals("Hey, this has commons.test.missing", translator.get("commons.test.includeFake")); } /** * Test that verify that a self inclusion throwing an {@link IllegalArgumentException} instead * of provoking a {@link StackOverflowError}. */ @Test(expected = IllegalArgumentException.class) public void testGetSelfIncludedTranslation () { translator.get("commons.test.includeSelf"); } /** * Test method for {@link Translator#get(java.lang.String, Collection)}. */ @Test public void testGetStringCollection () { assertEquals("aba.ldr", translator.get("aba.ldr", Collections.emptyList())); assertEquals("The Name", translator.get("commons.test.name", Collections.emptyList())); assertEquals("The Name", translator.get("commons.test.name", (Collection<Object>) null)); assertEquals("My parameter LDR", translator.get("commons.test.parameter", "LDR")); assertEquals("This LDR is really ABA!", translator.get("commons.test.parameters", "LDR", "ABA")); assertEquals("This LDR is really ABA!", translator.get("commons.test.parameters", "LDR", "ABA", "XXX")); } /** * Test method for {@link Translator#get(ParametrableTranslation)}. */ @Test public void testGetParametrableTranslation () { assertEquals("This LDR is really ABA!", translator.get(new ParametrableTranslation() { @Override public String getTranslationKey () { return "commons.test.parameters"; } @Override public Collection<Object> getParameters () { return Arrays.<Object>asList("LDR", "ABA", "XXX"); } })); } /** * Test method for {@link Translator#get(Translatable)}. */ @Test public void testGetTranslatable () { assertEquals("The Name", translator.get(new Translatable() { @Override public String getTranslationKey () { return "commons.test.name"; } })); } }
30.868687
106
0.705825
85d31e25728e984102bbb51f87556c33ee5e6413
14,155
c
C
ruby-1.8.7/random.c
RGSS3/reruby
cb3301ae28316f67cebbff95ce539e67b0b12c1d
[ "Ruby", "MIT" ]
5
2019-04-16T09:04:33.000Z
2022-01-13T11:14:40.000Z
ruby-1.8.7/random.c
RGSS3/reruby
cb3301ae28316f67cebbff95ce539e67b0b12c1d
[ "Ruby", "MIT" ]
null
null
null
ruby-1.8.7/random.c
RGSS3/reruby
cb3301ae28316f67cebbff95ce539e67b0b12c1d
[ "Ruby", "MIT" ]
2
2021-02-11T16:51:15.000Z
2021-05-16T03:45:30.000Z
/********************************************************************** random.c - $Author: knu $ $Date: 2008-04-14 19:52:17 +0900 (Mon, 14 Apr 2008) $ created at: Fri Dec 24 16:39:21 JST 1993 Copyright (C) 1993-2003 Yukihiro Matsumoto **********************************************************************/ /* This is based on trimmed version of MT19937. To get the original version, contact <http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html>. The original copyright notice follows. A C-program for MT19937, with initialization improved 2002/2/10. Coded by Takuji Nishimura and Makoto Matsumoto. This is a faster version by taking Shawn Cokus's optimization, Matthe Bellew's simplification, Isaku Wada's real version. Before using, initialize the state by using init_genrand(seed) or init_by_array(init_key, key_length). Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. The names of its contributors may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Any feedback is very welcome. http://www.math.keio.ac.jp/matumoto/emt.html email: matumoto@math.keio.ac.jp */ /* Period parameters */ #define N 624 #define M 397 #define MATRIX_A 0x9908b0dfUL /* constant vector a */ #define UMASK 0x80000000UL /* most significant w-r bits */ #define LMASK 0x7fffffffUL /* least significant r bits */ #define MIXBITS(u,v) ( ((u) & UMASK) | ((v) & LMASK) ) #define TWIST(u,v) ((MIXBITS(u,v) >> 1) ^ ((v)&1UL ? MATRIX_A : 0UL)) static unsigned long state[N]; /* the array for the state vector */ static int left = 1; static int initf = 0; static unsigned long *next; /* initializes state[N] with a seed */ static void init_genrand(unsigned long s) { int j; state[0]= s & 0xffffffffUL; for (j=1; j<N; j++) { state[j] = (1812433253UL * (state[j-1] ^ (state[j-1] >> 30)) + j); /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */ /* In the previous versions, MSBs of the seed affect */ /* only MSBs of the array state[]. */ /* 2002/01/09 modified by Makoto Matsumoto */ state[j] &= 0xffffffffUL; /* for >32 bit machines */ } left = 1; initf = 1; } /* initialize by an array with array-length */ /* init_key is the array for initializing keys */ /* key_length is its length */ /* slight change for C++, 2004/2/26 */ static void init_by_array(unsigned long init_key[], int key_length) { int i, j, k; init_genrand(19650218UL); i=1; j=0; k = (N>key_length ? N : key_length); for (; k; k--) { state[i] = (state[i] ^ ((state[i-1] ^ (state[i-1] >> 30)) * 1664525UL)) + init_key[j] + j; /* non linear */ state[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */ i++; j++; if (i>=N) { state[0] = state[N-1]; i=1; } if (j>=key_length) j=0; } for (k=N-1; k; k--) { state[i] = (state[i] ^ ((state[i-1] ^ (state[i-1] >> 30)) * 1566083941UL)) - i; /* non linear */ state[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */ i++; if (i>=N) { state[0] = state[N-1]; i=1; } } state[0] = 0x80000000UL; /* MSB is 1; assuring non-zero initial array */ left = 1; initf = 1; } static void next_state() { unsigned long *p=state; int j; /* if init_genrand() has not been called, */ /* a default initial seed is used */ if (initf==0) init_genrand(5489UL); left = N; next = state; for (j=N-M+1; --j; p++) *p = p[M] ^ TWIST(p[0], p[1]); for (j=M; --j; p++) *p = p[M-N] ^ TWIST(p[0], p[1]); *p = p[M-N] ^ TWIST(p[0], state[0]); } /* generates a random number on [0,0xffffffff]-interval */ extern "C" unsigned long rb_genrand_int32(void) { unsigned long y; if (--left == 0) next_state(); y = *next++; /* Tempering */ y ^= (y >> 11); y ^= (y << 7) & 0x9d2c5680UL; y ^= (y << 15) & 0xefc60000UL; y ^= (y >> 18); return y; } /* generates a random number on [0,1) with 53-bit resolution*/ extern "C" double rb_genrand_real(void) { unsigned long a=rb_genrand_int32()>>5, b=rb_genrand_int32()>>6; return(a*67108864.0+b)*(1.0/9007199254740992.0); } /* These real versions are due to Isaku Wada, 2002/01/09 added */ #undef N #undef M /* These real versions are due to Isaku Wada, 2002/01/09 added */ #include "ruby.h" #ifdef HAVE_UNISTD_H #include <unistd.h> #endif #include <time.h> #include <sys/types.h> #include <sys/stat.h> #ifdef HAVE_FCNTL_H #include <fcntl.h> #endif static int first = 1; static VALUE saved_seed = INT2FIX(0); static VALUE rand_init(VALUE vseed) { volatile VALUE seed; VALUE old; long len; unsigned long *buf; seed = rb_to_int(vseed); switch (TYPE(seed)) { case T_FIXNUM: len = sizeof(VALUE); break; case T_BIGNUM: len = RBIGNUM(seed)->len * SIZEOF_BDIGITS; if (len == 0) len = 4; break; default: rb_raise(rb_eTypeError, "failed to convert %s into Integer", rb_obj_classname(vseed)); } len = (len + 3) / 4; /* number of 32bit words */ buf = ALLOC_N(unsigned long, len); /* allocate longs for init_by_array */ memset(buf, 0, len * sizeof(long)); if (FIXNUM_P(seed)) { buf[0] = FIX2ULONG(seed) & 0xffffffff; #if SIZEOF_LONG > 4 buf[1] = FIX2ULONG(seed) >> 32; #endif } else { int i, j; for (i = RBIGNUM(seed)->len-1; 0 <= i; i--) { j = i * SIZEOF_BDIGITS / 4; #if SIZEOF_BDIGITS < 4 buf[j] <<= SIZEOF_BDIGITS * 8; #endif buf[j] |= ((BDIGIT *)RBIGNUM(seed)->digits)[i]; } } while (1 < len && buf[len-1] == 0) { len--; } if (len <= 1) { init_genrand(buf[0]); } else { if (buf[len-1] == 1) /* remove leading-zero-guard */ len--; init_by_array(buf, len); } first = 0; old = saved_seed; saved_seed = seed; free(buf); return old; } static VALUE random_seed() { static int n = 0; struct timeval tv; int fd; struct stat statbuf; int seed_len; BDIGIT *digits; unsigned long *seed; NEWOBJ(big, struct RBignum); OBJSETUP(big, rb_cBignum, T_BIGNUM); seed_len = 4 * sizeof(long); big->sign = 1; big->len = seed_len / SIZEOF_BDIGITS + 1; digits = big->digits = ALLOC_N(BDIGIT, big->len); seed = (unsigned long *)big->digits; memset(digits, 0, big->len * SIZEOF_BDIGITS); #ifdef S_ISCHR if ((fd = open("/dev/urandom", O_RDONLY #ifdef O_NONBLOCK |O_NONBLOCK #endif #ifdef O_NOCTTY |O_NOCTTY #endif #ifdef O_NOFOLLOW |O_NOFOLLOW #endif )) >= 0) { if (fstat(fd, &statbuf) == 0 && S_ISCHR(statbuf.st_mode)) { read(fd, seed, seed_len); } close(fd); } #endif gettimeofday(&tv, 0); seed[0] ^= tv.tv_usec; seed[1] ^= tv.tv_sec; seed[2] ^= getpid() ^ (n++ << 16); seed[3] ^= (unsigned long)&seed; /* set leading-zero-guard if need. */ digits[big->len-1] = digits[big->len-2] <= 1 ? 1 : 0; return rb_big_norm((VALUE)big); } /* * call-seq: * srand(number=0) => old_seed * * Seeds the pseudorandom number generator to the value of * <i>number</i>.<code>to_i.abs</code>. If <i>number</i> is omitted, * seeds the generator using a combination of the time, the * process id, and a sequence number. (This is also the behavior if * <code>Kernel::rand</code> is called without previously calling * <code>srand</code>, but without the sequence.) By setting the seed * to a known value, scripts can be made deterministic during testing. * The previous seed value is returned. Also see <code>Kernel::rand</code>. */ static VALUE rb_f_srand(int argc, VALUE *argv, VALUE obj) { VALUE seed, old; rb_secure(4); if (rb_scan_args(argc, argv, "01", &seed) == 0) { seed = random_seed(); } old = rand_init(seed); return old; } static unsigned long make_mask(unsigned long x) { x = x | x >> 1; x = x | x >> 2; x = x | x >> 4; x = x | x >> 8; x = x | x >> 16; #if 4 < SIZEOF_LONG x = x | x >> 32; #endif return x; } static unsigned long limited_rand(unsigned long limit) { unsigned long mask = make_mask(limit); int i; unsigned long val; retry: val = 0; for (i = SIZEOF_LONG/4-1; 0 <= i; i--) { if (mask >> (i * 32)) { val |= rb_genrand_int32() << (i * 32); val &= mask; if (limit < val) goto retry; } } return val; } static VALUE limited_big_rand(struct RBignum *limit) { unsigned long mask, lim, rnd; struct RBignum *val; int i, len, boundary; len = (limit->len * SIZEOF_BDIGITS + 3) / 4; val = (struct RBignum *)rb_big_clone((VALUE)limit); val->sign = 1; #if SIZEOF_BDIGITS == 2 # define BIG_GET32(big,i) (((BDIGIT *)(big)->digits)[(i)*2] | \ ((i)*2+1 < (big)->len ? (((BDIGIT *)(big)->digits)[(i)*2+1] << 16) \ : 0)) # define BIG_SET32(big,i,d) ((((BDIGIT *)(big)->digits)[(i)*2] = (d) & 0xffff), \ ((i)*2+1 < (big)->len ? (((BDIGIT *)(big)->digits)[(i)*2+1] = (d) >> 16) \ : 0)) #else /* SIZEOF_BDIGITS == 4 */ # define BIG_GET32(big,i) (((BDIGIT *)(big)->digits)[i]) # define BIG_SET32(big,i,d) (((BDIGIT *)(big)->digits)[i] = (d)) #endif retry: mask = 0; boundary = 1; for (i = len-1; 0 <= i; i--) { lim = BIG_GET32(limit, i); mask = mask ? 0xffffffff : make_mask(lim); if (mask) { rnd = rb_genrand_int32() & mask; if (boundary) { if (lim < rnd) goto retry; if (rnd < lim) boundary = 0; } } else { rnd = 0; } BIG_SET32(val, i, rnd); } return rb_big_norm((VALUE)val); } /* * call-seq: * rand(max=0) => number * * Converts <i>max</i> to an integer using max1 = * max<code>.to_i.abs</code>. If the result is zero, returns a * pseudorandom floating point number greater than or equal to 0.0 and * less than 1.0. Otherwise, returns a pseudorandom integer greater * than or equal to zero and less than max1. <code>Kernel::srand</code> * may be used to ensure repeatable sequences of random numbers between * different runs of the program. Ruby currently uses a modified * Mersenne Twister with a period of 2**19937-1. * * srand 1234 #=> 0 * [ rand, rand ] #=> [0.191519450163469, 0.49766366626136] * [ rand(10), rand(1000) ] #=> [6, 817] * srand 1234 #=> 1234 * [ rand, rand ] #=> [0.191519450163469, 0.49766366626136] */ static VALUE rb_f_rand(int argc, VALUE *argv, VALUE obj) { VALUE vmax; long val, max; rb_scan_args(argc, argv, "01", &vmax); if (first) { rand_init(random_seed()); } switch (TYPE(vmax)) { case T_FLOAT: if (RFLOAT(vmax)->value <= LONG_MAX && RFLOAT(vmax)->value >= LONG_MIN) { max = (long)RFLOAT(vmax)->value; break; } if (RFLOAT(vmax)->value < 0) vmax = rb_dbl2big(-RFLOAT(vmax)->value); else vmax = rb_dbl2big(RFLOAT(vmax)->value); /* fall through */ case T_BIGNUM: bignum: { struct RBignum *limit = (struct RBignum *)vmax; if (!limit->sign) { limit = (struct RBignum *)rb_big_clone(vmax); limit->sign = 1; } limit = (struct RBignum *)rb_big_minus((VALUE)limit, INT2FIX(1)); if (FIXNUM_P((VALUE)limit)) { if (FIX2LONG((VALUE)limit) == -1) return rb_float_new(rb_genrand_real()); return LONG2NUM(limited_rand(FIX2LONG((VALUE)limit))); } return limited_big_rand(limit); } case T_NIL: max = 0; break; default: vmax = rb_Integer(vmax); if (TYPE(vmax) == T_BIGNUM) goto bignum; /* fall through */ case T_FIXNUM: max = FIX2LONG(vmax); break; } if (max == 0) { return rb_float_new(rb_genrand_real()); } if (max < 0) max = -max; val = limited_rand(max-1); return LONG2NUM(val); } void Init_Random() { rb_define_global_function("srand", rb_f_srand, -1); rb_define_global_function("rand", rb_f_rand, -1); rb_global_variable(&saved_seed); }
28.480885
103
0.572024
e44260e7e4fcd0e00fb1aeb8d6b25804c60b84b2
481
lua
Lua
spec/lua/test_params_pass_struct.lua
DarkShadow44/kaitai_struct_tests
4bb13cef82965cca66dda2eb2b77cd64e9f70a12
[ "MIT" ]
11
2018-04-01T03:58:15.000Z
2021-08-14T09:04:55.000Z
spec/lua/test_params_pass_struct.lua
DarkShadow44/kaitai_struct_tests
4bb13cef82965cca66dda2eb2b77cd64e9f70a12
[ "MIT" ]
73
2016-07-20T10:27:15.000Z
2020-12-17T18:56:46.000Z
spec/lua/test_params_pass_struct.lua
DarkShadow44/kaitai_struct_tests
4bb13cef82965cca66dda2eb2b77cd64e9f70a12
[ "MIT" ]
37
2016-08-15T08:25:56.000Z
2021-08-28T14:48:46.000Z
-- Autogenerated from KST: please remove this line if doing any edits by hand! local luaunit = require("luaunit") require("params_pass_struct") TestParamsPassStruct = {} function TestParamsPassStruct:test_params_pass_struct() local r = ParamsPassStruct:from_file("src/enum_negative.bin") luaunit.assertEquals(r.first.foo, 255) luaunit.assertEquals(r.one.bar.qux, 1) luaunit.assertEquals(r.one.foo.foo, 255) luaunit.assertEquals(r.one.bar.foo.foo, 255) end
28.294118
78
0.756757
135781d5e717a9ead9b74f5a93f38a91ff03efda
1,600
h
C
QMUIKit/UIKitExtensions/UIVisualEffectView+QMUI.h
charles0126dev/QMUI_iOS
d3a84c9df0d8f9a40a9962504b14bae3d80b7141
[ "MIT-0", "MIT" ]
15
2020-05-01T18:29:31.000Z
2021-08-29T16:33:30.000Z
Pods/QMUIKit/QMUIKit/UIKitExtensions/UIVisualEffectView+QMUI.h
fanyuecheng/kona
a05a05171c4480902cdc5b946303c0429d4b6e84
[ "MIT" ]
14
2021-05-01T05:14:29.000Z
2022-03-08T16:51:20.000Z
Pods/QMUIKit/QMUIKit/UIKitExtensions/UIVisualEffectView+QMUI.h
fanyuecheng/kona
a05a05171c4480902cdc5b946303c0429d4b6e84
[ "MIT" ]
1
2022-01-03T02:31:06.000Z
2022-01-03T02:31:06.000Z
/** * Tencent is pleased to support the open source community by making QMUI_iOS available. * Copyright (C) 2016-2021 THL A29 Limited, a Tencent company. All rights reserved. * Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at * http://opensource.org/licenses/MIT * 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. */ // // UIVisualEffectView+QMUI.h // QMUIKit // // Created by MoLice on 2020/7/15. // #import <UIKit/UIKit.h> NS_ASSUME_NONNULL_BEGIN @interface UIVisualEffectView (QMUI) /** ็ณป็ปŸ็š„ UIVisualEffectView ไผšไธบไธๅŒ็š„ effect ็”ŸๆˆไธๅŒ็š„ subview ๅนถไธบๅ…ถ่ฎพ็ฝฎๅฏนๅบ”็š„ backgroundColorใ€alpha๏ผŒ่ฟ™ไบ› subview ็š„ๆ ทๅผๆˆ‘ไปฌๆ˜ฏไฟฎๆ”นไธไบ†็š„๏ผŒๅฆ‚ๆžœๆœ‰่ฎพ่ฎก้œ€ๆฑ‚ๅธŒๆœ›ๅœจ็ฃจ็ ‚ไธŠๆ–น็›–ไธ€ๅฑ‚ๅ‰ๆ™ฏ่‰ฒๆฅ่ฐƒๆ•ด็ฃจ็ ‚ๆ•ˆๆžœ๏ผŒๆ€ปๆ˜ฏไผšๅ—่‡ชๅธฆ็š„ subview ็š„ๅฝฑๅ“(ไพ‹ๅฆ‚ๆ— ๆณ•ๆœ‰็‰นๅˆซๆ˜Žๆ˜พ็š„็ฃจ็ ‚ๆ•ˆๆžœ๏ผŒๅ› ไธบ่‡ชๅธฆ็š„ subview alpha ๅฏ่ƒฝๅพˆ้ซ˜๏ผŒ้€ไธ่ฟ‡ๅŽป๏ผ‰๏ผŒๅ› ๆญคๅขžๅŠ ่ฟ™ไธชๅฑžๆ€ง๏ผŒๅฝ“่ฎพ็ฝฎไธ€ไธช้ž nil ็š„้ขœ่‰ฒๅŽ๏ผŒไผšๅผบๅˆถๆŠŠ็ณป็ปŸ่‡ชๅธฆ็š„ subview ้š่—ๆމ๏ผŒๅชๆ˜พ็คบไฝ ่‡ชๅทฑ็š„ foregroundColor๏ผŒไปŽ่€Œๅฎž็Žฐ็ฒพๅ‡†็š„่ฐƒๆ•ดใ€‚ ไปฅ UINavigationBar ไธบไพ‹๏ผŒๅฝ“ๆˆ‘ไปฌ้€š่ฟ‡ UINavigationBar.barTintColor ๆˆ–่€… UINavigationBarAppearance.backgroundEffect/backgroundColor ๅฎž็Žฐ็ฃจ็ ‚ๆ•ˆๆžœๆ—ถ๏ผŒๆˆ‘ไปฌ่ฎพ็ฝฎไธŠๅŽป็š„ barTintColor ๆœ€็ปˆไผš่ขซ็ณป็ปŸ่ฟ›่กŒไธ€ไบ›่ฟ็ฎ—ๅŽไบง็”Ÿๅฆไธ€ไธช่‰ฒๅ€ผ๏ผŒๆœ€็ปˆๆ˜พ็คบๅ‡บๆฅ็š„่‰ฒๅ€ผๅ’Œๆˆ‘ไปฌ่ฎพ็ฝฎ็š„ barTintColor ๆ˜ฏ็›ธไผผไฝ†ไธ็›ธ็ญ‰็š„๏ผŒๅฆ‚ๆžœๅธŒๆœ›ๆœ‰็ฒพๅ‡†็š„่‰ฒๅ€ผ่ฐƒๆ•ด๏ผŒๅฐฑๅฏไปฅ่‡ชๅทฑ่Žทๅ– UINavigationBar ๅ†…้ƒจ็š„ UIVisualEffectView๏ผŒๅ†ไฟฎๆ”นๅฎƒ็š„ qmui_foregroundColorใ€‚ @note ๆณจๆ„่ฟ™ไธช้ขœ่‰ฒ้œ€่ฆๆ˜ฏๅŠ้€ๆ˜Ž็š„๏ผŒๆ‰่ƒฝ้€ๅ‡บ่ƒŒๅŽ็š„็ฃจ็ ‚๏ผŒๅฆ‚ๆžœ่ฎพ็ฝฎไธ้€ๆ˜Ž็š„่‰ฒๅ€ผ๏ผŒๅฐฑๅคฑๅŽปไบ†็ฃจ็ ‚ๆ•ˆๆžœไบ†ใ€‚ */ @property(nonatomic, strong, nullable) UIColor *qmui_foregroundColor; @end NS_ASSUME_NONNULL_END
48.484848
308
0.813125
f716419fa16d80a5cc5321385afa082a825d8789
5,280
c
C
source/matrix/jit.glue/jit.glue.c
maevagrondin/max_externals
9083d877c0091077f823aa42665209050f4ebfde
[ "MIT" ]
175
2015-05-11T05:06:59.000Z
2022-03-31T11:08:33.000Z
source/matrix/jit.glue/jit.glue.c
maevagrondin/max_externals
9083d877c0091077f823aa42665209050f4ebfde
[ "MIT" ]
53
2015-09-24T06:54:07.000Z
2021-11-30T05:58:34.000Z
source/matrix/jit.glue/jit.glue.c
maevagrondin/max_externals
9083d877c0091077f823aa42665209050f4ebfde
[ "MIT" ]
52
2015-06-10T11:16:03.000Z
2022-03-29T01:48:59.000Z
/* Copyright 2001 - Cycling '74 R. Luke DuBois luke@music.columbia.edu */ #include "jit.common.h" typedef struct _jit_glue { t_object ob; long rows; long cols; long input; } t_jit_glue; void *_jit_glue_class; t_jit_glue *jit_glue_new(void); void jit_glue_free(t_jit_glue *x); t_jit_err jit_glue_matrix_calc(t_jit_glue *x, void *inputs, void *outputs); t_jit_err jit_glue_init(void); t_jit_err jit_glue_init(void) { long attrflags=0; void *attr,*mop,*o; _jit_glue_class = jit_class_new("jit_glue",(method)jit_glue_new,(method)jit_glue_free, sizeof(t_jit_glue),0L); //add mop mop = jit_object_new(_jit_sym_jit_mop,-1,1); //#inputs,#outputs(variable) o = jit_object_method(mop,_jit_sym_getoutput,1); jit_attr_setlong(o,_jit_sym_dimlink,0); jit_class_addadornment(_jit_glue_class,mop); //add methods jit_class_addmethod(_jit_glue_class, (method)jit_glue_matrix_calc, "matrix_calc", A_CANT, 0L); //add attributes attrflags = JIT_ATTR_GET_DEFER_LOW | JIT_ATTR_SET_USURP_LOW; CLASS_STICKY_CATEGORY(_jit_glue_class,0,"Behavior"); CLASS_STICKY_ATTR(_jit_glue_class,"basic",0,"1"); attr = jit_object_new(_jit_sym_jit_attr_offset,"rows",_jit_sym_long,attrflags, (method)0,(method)0,calcoffset(t_jit_glue,rows)); jit_attr_addfilterset_clip(attr,1,16,1,1); jit_class_addattr(_jit_glue_class,attr); CLASS_ATTR_LABEL(_jit_glue_class,"rows",0,"Rows"); attr = jit_object_new(_jit_sym_jit_attr_offset,"columns",_jit_sym_long,attrflags, (method)0,(method)0,calcoffset(t_jit_glue,cols)); jit_attr_addfilterset_clip(attr,1,16,1,1); jit_class_addattr(_jit_glue_class,attr); CLASS_ATTR_LABEL(_jit_glue_class,"columns",0,"Columns"); CLASS_STICKY_CATEGORY_CLEAR(_jit_glue_class); CLASS_STICKY_ATTR_CLEAR(_jit_glue_class, "basic"); attrflags = JIT_ATTR_GET_OPAQUE_USER | JIT_ATTR_SET_OPAQUE_USER; attr = jit_object_new(_jit_sym_jit_attr_offset,"input",_jit_sym_long,attrflags, (method)0,(method)0,calcoffset(t_jit_glue,input)); jit_class_addattr(_jit_glue_class,attr); jit_class_register(_jit_glue_class); return JIT_ERR_NONE; } t_jit_err jit_glue_matrix_calc(t_jit_glue *x, void *inputs, void *outputs) { t_jit_err err=JIT_ERR_NONE; long in_savelock,out_savelock, dimmode; t_jit_matrix_info in_minfo,out_minfo; char *in_bp,*out_bp; long i,dimcount,planecount,dim[JIT_MATRIX_MAX_DIMCOUNT]; t_atom a[2]; t_matrix_conv_info conv; long rows=x->rows,cols=x->cols,n=x->input; void *in_matrix,*out_matrix; in_matrix = jit_object_method(inputs,_jit_sym_getindex,0); out_matrix = jit_object_method(outputs,_jit_sym_getindex,0); if (x&&in_matrix&&out_matrix) { in_savelock = (long) jit_object_method(in_matrix,_jit_sym_lock,1); out_savelock = (long) jit_object_method(out_matrix,_jit_sym_lock,1); jit_object_method(in_matrix,_jit_sym_getinfo,&in_minfo); jit_object_method(out_matrix,_jit_sym_getinfo,&out_minfo); jit_object_method(in_matrix,_jit_sym_getdata,&in_bp); jit_object_method(out_matrix,_jit_sym_getdata,&out_bp); if (!in_bp) { err=JIT_ERR_INVALID_INPUT; goto out;} if (!out_bp) { err=JIT_ERR_INVALID_OUTPUT; goto out;} //compatible types? if (in_minfo.type!=out_minfo.type) { err=JIT_ERR_MISMATCH_TYPE; goto out; } //compatible planes? if ((in_minfo.planecount!=out_minfo.planecount)) { err=JIT_ERR_MISMATCH_PLANE; goto out; } //compatible dims? if ((in_minfo.dimcount!=2)||(out_minfo.dimcount!=2)) { err=JIT_ERR_MISMATCH_DIM; goto out; } //get dimensions/planecount if (rows<1) rows=1; if (rows>16) rows=16; if (cols<1) cols=1; if (cols>16) cols=16; if (n>=(rows*cols)) goto out; dimcount = out_minfo.dimcount; planecount = out_minfo.planecount; dim[0] = in_minfo.dim[0]*cols; dim[1] = in_minfo.dim[1]*rows; if((out_minfo.dim[0]!=dim[0]) || (out_minfo.dim[1]!=dim[1])) { jit_atom_setlong(&a[0], dim[0]); jit_atom_setlong(&a[1], dim[1]); jit_object_method(out_matrix, _jit_sym_dim, 2, a); } memset(&conv,0,sizeof(t_matrix_conv_info)); for(i=0; i<JIT_MATRIX_MAX_PLANECOUNT; i++) { conv.planemap[i] = i; } conv.flags = JIT_MATRIX_CONVERT_SRCDIM | JIT_MATRIX_CONVERT_DSTDIM; conv.srcdimstart[0] = 0; conv.srcdimstart[1] = 0; conv.srcdimend[0] = in_minfo.dim[0]-1; conv.srcdimend[1] = in_minfo.dim[1]-1; conv.dstdimstart[0] = in_minfo.dim[0]*(n%cols); conv.dstdimstart[1] = (in_minfo.dim[1]*(n/cols)); conv.dstdimend[0] = conv.dstdimstart[0]+in_minfo.dim[0]-1; conv.dstdimend[1] = conv.dstdimstart[1]+in_minfo.dim[1]-1; // jit_object_post((t_object *)x,"compositing %i from %i %i %i %i to %i %i %i %i", n, conv.srcdimstart[0], conv.srcdimstart[1], conv.srcdimend[0], conv.srcdimend[1], conv.dstdimstart[0], conv.dstdimstart[1], conv.dstdimend[0], conv.dstdimend[1]); jit_object_method(out_matrix, _jit_sym_frommatrix, in_matrix, &conv); } else { return JIT_ERR_INVALID_PTR; } out: jit_object_method(out_matrix,_jit_sym_lock,out_savelock); jit_object_method(in_matrix,_jit_sym_lock,in_savelock); return err; } t_jit_glue *jit_glue_new(void) { t_jit_glue *x; short i; if (x=(t_jit_glue *)jit_object_alloc(_jit_glue_class)) { x->rows=1; x->cols=1; } else { x = NULL; } return x; } void jit_glue_free(t_jit_glue *x) { //nada }
27.357513
247
0.737689
478240c6285a65668cf9f150322313a64b656092
1,602
html
HTML
graffiti/ex3.html
wooseok0727/Biz_403_2021_05_HTML
c2773fbf830ecd367ee42a4f7e562e18c287ceb7
[ "Apache-2.0" ]
null
null
null
graffiti/ex3.html
wooseok0727/Biz_403_2021_05_HTML
c2773fbf830ecd367ee42a4f7e562e18c287ceb7
[ "Apache-2.0" ]
null
null
null
graffiti/ex3.html
wooseok0727/Biz_403_2021_05_HTML
c2773fbf830ecd367ee42a4f7e562e18c287ceb7
[ "Apache-2.0" ]
null
null
null
<!DOCTYPE html> <html lang="ko"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title></title> </head> <style> * { margin: 0; padding: 0; } .world { background-color: aquamarine; width: 100vw; height: 100vh; perspective: 1500px; perspective-origin: top; display: flex; align-items: center; justify-content: center; } .box { background-color: rgba(255, 255, 255, 0); position: relative; transform-style: preserve-3d; width: 100px; height: 100px; transform: rotateX(-30deg) rotateY(30deg); } .face { position: absolute; width: 100%; height: 100%; } .front { background-color: rgba(72, 163, 49, 0.8); } .back { background-color: rgba(201, 33, 33, 0.8); } .top { background-color: rgba(50, 21, 155, 0.8); } .bottom { background-color: rgba(185, 49, 156, 0.8); } .left { background-color: rgba(216, 195, 136, 0.8); } .right { background-color: rgba(26, 10, 238, 0.8); } </style> <body> <div class="world"> <div class="box"> <div class="face front">Front</div> <div class="face back">back</div> <div class="face top">top</div> <div class="face bottom">bottom</div> <div class="face left">left</div> <div class="face right">right</div> </div> </div> </body> </html>
22.56338
76
0.532459
88c389957fa2264f0f3d3fcd90e50329ebc636ad
11,370
kt
Kotlin
app/src/main/java/mustafaozhan/github/com/mycurrencies/main/fragment/MainFragment.kt
aggarwalpulkit596/androidCCC
8d861e59907b28929d06f05cf7d3fd21361ecec3
[ "Apache-2.0" ]
null
null
null
app/src/main/java/mustafaozhan/github/com/mycurrencies/main/fragment/MainFragment.kt
aggarwalpulkit596/androidCCC
8d861e59907b28929d06f05cf7d3fd21361ecec3
[ "Apache-2.0" ]
null
null
null
app/src/main/java/mustafaozhan/github/com/mycurrencies/main/fragment/MainFragment.kt
aggarwalpulkit596/androidCCC
8d861e59907b28929d06f05cf7d3fd21361ecec3
[ "Apache-2.0" ]
2
2019-11-20T17:50:51.000Z
2020-09-17T17:04:44.000Z
package mustafaozhan.github.com.mycurrencies.main.fragment import android.annotation.SuppressLint import android.os.Bundle import android.view.View import androidx.lifecycle.Observer import androidx.recyclerview.widget.LinearLayoutManager import com.jakewharton.rxbinding2.widget.textChanges import io.reactivex.rxkotlin.addTo import kotlinx.android.synthetic.main.fragment_main.ad_view import kotlinx.android.synthetic.main.fragment_main.layout_bar import kotlinx.android.synthetic.main.fragment_main.loading_view import kotlinx.android.synthetic.main.fragment_main.recycler_view_main import kotlinx.android.synthetic.main.item_currency.view.txt_amount import kotlinx.android.synthetic.main.layout_bar.iv_base import kotlinx.android.synthetic.main.layout_bar.spinner_base import kotlinx.android.synthetic.main.layout_bar.txt_result import kotlinx.android.synthetic.main.layout_bar.txt_symbol import kotlinx.android.synthetic.main.layout_keyboard_content.btn_ac import kotlinx.android.synthetic.main.layout_keyboard_content.btn_delete import kotlinx.android.synthetic.main.layout_keyboard_content.btn_divide import kotlinx.android.synthetic.main.layout_keyboard_content.btn_dot import kotlinx.android.synthetic.main.layout_keyboard_content.btn_eight import kotlinx.android.synthetic.main.layout_keyboard_content.btn_five import kotlinx.android.synthetic.main.layout_keyboard_content.btn_four import kotlinx.android.synthetic.main.layout_keyboard_content.btn_minus import kotlinx.android.synthetic.main.layout_keyboard_content.btn_multiply import kotlinx.android.synthetic.main.layout_keyboard_content.btn_nine import kotlinx.android.synthetic.main.layout_keyboard_content.btn_one import kotlinx.android.synthetic.main.layout_keyboard_content.btn_percent import kotlinx.android.synthetic.main.layout_keyboard_content.btn_plus import kotlinx.android.synthetic.main.layout_keyboard_content.btn_seven import kotlinx.android.synthetic.main.layout_keyboard_content.btn_six import kotlinx.android.synthetic.main.layout_keyboard_content.btn_three import kotlinx.android.synthetic.main.layout_keyboard_content.btn_triple_zero import kotlinx.android.synthetic.main.layout_keyboard_content.btn_two import kotlinx.android.synthetic.main.layout_keyboard_content.btn_zero import kotlinx.android.synthetic.main.layout_main_toolbar.txt_main_toolbar import mustafaozhan.github.com.mycurrencies.R import mustafaozhan.github.com.mycurrencies.base.BaseMvvmFragment import mustafaozhan.github.com.mycurrencies.extensions.addText import mustafaozhan.github.com.mycurrencies.extensions.loadAd import mustafaozhan.github.com.mycurrencies.extensions.reObserve import mustafaozhan.github.com.mycurrencies.extensions.setBackgroundByName import mustafaozhan.github.com.mycurrencies.extensions.tryToSelect import mustafaozhan.github.com.mycurrencies.main.fragment.adapter.CurrencyAdapter import mustafaozhan.github.com.mycurrencies.room.AppDatabase import mustafaozhan.github.com.mycurrencies.settings.SettingsFragment import org.jetbrains.anko.doAsync import org.jetbrains.anko.uiThread /** * Created by Mustafa Ozhan on 2018-07-12. */ @Suppress("TooManyFunctions") class MainFragment : BaseMvvmFragment<MainFragmentViewModel>() { companion object { fun newInstance(): MainFragment = MainFragment() const val MAX_DIGIT = 12 } override fun getViewModelClass(): Class<MainFragmentViewModel> = MainFragmentViewModel::class.java override fun getLayoutResId(): Int = R.layout.fragment_main private val currencyAdapter: CurrencyAdapter by lazy { CurrencyAdapter() } override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) initToolbar() initViews() setListeners() setKeyboard() setRx() initLiveData() } private fun setRx() { txt_main_toolbar.textChanges() .subscribe { txt -> loading_view.smoothToShow() viewModel.currencyListLiveData.value?.let { currencyList -> if (currencyList.size > 1) { viewModel.calculateOutput(txt.toString()) viewModel.getCurrencies() getOutputText() } else { snacky(getString(R.string.choose_at_least_two_currency), getString(R.string.select)) { getBaseActivity()?.replaceFragment(SettingsFragment.newInstance(), true) } } } }.addTo(compositeDisposable) } private fun initLiveData() { viewModel.ratesLiveData.reObserve(this, Observer { rates -> viewModel.currencyListLiveData.value?.let { currencyList -> currencyList.forEach { it.rate = viewModel.calculateResultByCurrency(it.name, viewModel.output, rates) } rates?.let { currencyAdapter.refreshList(currencyList, viewModel.mainData.currentBase) } ?: run { if (currencyList.size > 1) { snacky(getString(R.string.rate_not_available_offline), getString(R.string.change)) { spinner_base.expand() } } currencyAdapter.refreshList(mutableListOf(), viewModel.mainData.currentBase) } } loading_view.smoothToHide() }) viewModel.currencyListLiveData.reObserve(this, Observer { currencyList -> currencyList?.let { updateBar(currencyList.map { it.name }) currencyAdapter.refreshList(currencyList, viewModel.mainData.currentBase) loading_view.smoothToHide() } }) } private fun initViews() { loading_view.bringToFront() context?.let { ctx -> recycler_view_main.layoutManager = LinearLayoutManager(ctx) recycler_view_main.adapter = currencyAdapter } currencyAdapter.onItemClickListener = { currency, itemView: View, _: Int -> txt_main_toolbar.text = itemView.txt_amount.text.toString().replace(" ", "") viewModel.updateCurrentBase(currency.name) viewModel.getCurrencies() viewModel.calculateOutput(itemView.txt_amount.text.toString().replace(" ", "")) getOutputText() viewModel.currencyListLiveData.value?.let { currencyList -> if (currencyList.indexOf(currency) < spinner_base.getItems<String>().size) { spinner_base.tryToSelect(currencyList.indexOf(currency)) } else { spinner_base.expand() } } iv_base.setBackgroundByName(currency.name) } currencyAdapter.onItemLongClickListener = { currency, _ -> snacky( "${viewModel.getClickedItemRate(currency.name)} ${currency.getVariablesOneLine()}", setIcon = currency.name, isLong = false) true } } @SuppressLint("SetTextI18n") private fun getOutputText() { txt_symbol.text = viewModel.getCurrencyByName( viewModel.mainData.currentBase.toString() )?.symbol ?: "" when { viewModel.output.isEmpty() -> { txt_result.text = "" txt_symbol.text = "" } else -> txt_result.text = "= ${viewModel.output} " } } private fun updateBar(spinnerList: List<String>) = if (spinnerList.size < 2) { snacky( context?.getString(R.string.choose_at_least_two_currency), context?.getString(R.string.select)) { getBaseActivity()?.replaceFragment(SettingsFragment.newInstance(), true) } spinner_base.setItems("") iv_base.setBackgroundByName("transparent") } else { spinner_base.setItems(spinnerList) spinner_base.tryToSelect(spinnerList.indexOf(viewModel.verifyCurrentBase(spinnerList).toString())) iv_base.setBackgroundByName(spinner_base.text.toString()) } private fun setListeners() { spinner_base.setOnItemSelectedListener { _, _, _, item -> viewModel.apply { updateCurrentBase(item.toString()) getCurrencies() } getOutputText() iv_base.setBackgroundByName(item.toString()) } layout_bar.setOnClickListener { if (spinner_base.isActivated) { spinner_base.collapse() } else { spinner_base.expand() } } } private fun setKeyboard() { btn_seven.setOnClickListener { keyboardPressed("7") } btn_eight.setOnClickListener { keyboardPressed("8") } btn_nine.setOnClickListener { keyboardPressed("9") } btn_divide.setOnClickListener { keyboardPressed("/") } btn_four.setOnClickListener { keyboardPressed("4") } btn_five.setOnClickListener { keyboardPressed("5") } btn_six.setOnClickListener { keyboardPressed("6") } btn_multiply.setOnClickListener { keyboardPressed("*") } btn_one.setOnClickListener { keyboardPressed("1") } btn_two.setOnClickListener { keyboardPressed("2") } btn_three.setOnClickListener { keyboardPressed("3") } btn_minus.setOnClickListener { keyboardPressed("-") } btn_dot.setOnClickListener { keyboardPressed(".") } btn_zero.setOnClickListener { keyboardPressed("0") } btn_percent.setOnClickListener { keyboardPressed("%") } btn_plus.setOnClickListener { keyboardPressed("+") } btn_triple_zero.setOnClickListener { keyboardPressed("000") } btn_ac.setOnClickListener { txt_main_toolbar.text = "" txt_result.text = "" txt_symbol.text = "" } btn_delete.setOnClickListener { if (txt_main_toolbar.text.toString() != "") { txt_main_toolbar.text = txt_main_toolbar.text.toString() .substring(0, txt_main_toolbar.text.toString().length - 1) } } } private fun keyboardPressed(txt: String) = if (viewModel.output.length < MAX_DIGIT) { txt_main_toolbar.addText(txt) } else { snacky(getString(R.string.max_input), isLong = false) } override fun onPause() { viewModel.savePreferences() super.onPause() } override fun onResume() { super.onResume() initData() ad_view.loadAd(R.string.banner_ad_unit_id_main) } private fun initData() { loading_view.smoothToShow() viewModel.apply { rates = null refreshData() if (loadResetData() && !mainData.firstRun) { doAsync { AppDatabase.database.clearAllTables() uiThread { persistResetData(false) refreshData() getCurrencies() } } } else { getCurrencies() } } } }
41.648352
120
0.656464
9c5992a12c1f3355f1e8b71a88cea6ba1c77f983
3,580
js
JavaScript
app/renderer/components/Icon/Cog.js
jamesmacfie/drona
f0321ba4cda755de82a7033bdaa21eceb9a88e86
[ "MIT" ]
null
null
null
app/renderer/components/Icon/Cog.js
jamesmacfie/drona
f0321ba4cda755de82a7033bdaa21eceb9a88e86
[ "MIT" ]
1
2018-05-20T22:18:35.000Z
2018-05-20T22:50:34.000Z
app/renderer/components/Icon/Cog.js
jamesmacfie/drona
f0321ba4cda755de82a7033bdaa21eceb9a88e86
[ "MIT" ]
null
null
null
import React, { PropTypes, Component } from 'react'; export default class Cog extends Component { render() { const size = this.props.size; return (<svg version="1.1" width={size} height={size} x="0px" y="0px" viewBox={`0 0 50 50`} > <path d="M47.826,19.92l-2.37-0.594c-0.489-1.824-1.213-3.553-2.141-5.149l1.262-2.101 c0.388-0.751,0.641-1.682,0-2.322l-4.643-4.644c-0.289-0.29-0.644-0.403-1.013-0.403c-0.449,0-0.918,0.17-1.309,0.403l-2.116,1.268 c-1.592-0.92-3.312-1.641-5.131-2.128l-0.598-2.389c-0.257-0.805-0.735-1.643-1.642-1.643H21.56c-0.906,0-1.436,0.837-1.641,1.643 l-0.597,2.389c-1.819,0.487-3.541,1.208-5.133,2.128l-2.114-1.268c-0.392-0.233-0.861-0.403-1.31-0.403 c-0.368,0-0.723,0.113-1.012,0.403L5.11,9.755c-0.641,0.64-0.387,1.571,0,2.322l1.261,2.101c-0.927,1.596-1.652,3.325-2.14,5.149 l-2.37,0.594c-0.804,0.204-1.642,0.734-1.642,1.641v6.566c0,0.908,0.837,1.386,1.642,1.642l2.37,0.593 c0.487,1.825,1.213,3.553,2.14,5.149L5.11,37.613c-0.423,0.714-0.641,1.68,0,2.321l4.643,4.643c0.282,0.283,0.622,0.392,0.978,0.392 c0.45,0,0.925-0.175,1.345-0.392l2.114-1.268c1.592,0.919,3.314,1.642,5.133,2.127l0.597,2.39c0.205,0.805,0.735,1.642,1.641,1.642 h6.567c0.906,0,1.385-0.837,1.642-1.642l0.598-2.39c1.818-0.485,3.539-1.208,5.131-2.127l2.116,1.268 c0.419,0.217,0.895,0.392,1.344,0.392c0.355,0,0.692-0.108,0.978-0.392l4.643-4.643c0.641-0.642,0.424-1.607,0-2.321l-1.262-2.103 c0.928-1.597,1.651-3.324,2.141-5.149l2.37-0.593c0.805-0.256,1.642-0.733,1.642-1.642v-6.566 C49.468,20.655,48.631,20.124,47.826,19.92 M47.229,27.608c-0.009,0.002-0.017,0.008-0.026,0.01l-2.29,0.572 c-0.789,0.196-1.409,0.808-1.619,1.592c-0.432,1.611-1.075,3.159-1.914,4.604c-0.409,0.705-0.403,1.577,0.017,2.277l1.233,2.052 l-3.911,3.912c-0.009-0.003-0.016-0.007-0.024-0.012l-2.045-1.226c-0.355-0.212-0.751-0.319-1.152-0.319 c-0.385,0-0.771,0.1-1.118,0.3c-1.446,0.834-2.99,1.475-4.592,1.903c-0.785,0.21-1.396,0.83-1.594,1.62l-0.577,2.311 c-0.002,0.008-0.006,0.016-0.009,0.026h-5.53l-0.583-2.338c-0.198-0.789-0.808-1.409-1.594-1.619 c-1.602-0.429-3.146-1.069-4.594-1.903c-0.345-0.2-0.731-0.3-1.117-0.3c-0.4,0-0.798,0.107-1.152,0.319l-2.043,1.226 c-0.008,0.005-0.016,0.009-0.025,0.012l-3.909-3.912l1.231-2.054c0.42-0.698,0.426-1.57,0.018-2.275 c-0.839-1.446-1.484-2.996-1.915-4.604c-0.21-0.784-0.831-1.396-1.619-1.592l-2.29-0.572c-0.008-0.002-0.017-0.008-0.026-0.01 v-5.531L4.774,21.5c0.788-0.198,1.409-0.807,1.619-1.594c0.431-1.609,1.075-3.158,1.915-4.604c0.409-0.706,0.402-1.577-0.018-2.275 l-1.219-2.033c-0.003-0.008-0.008-0.016-0.012-0.024l3.911-3.91l2.066,1.24c0.354,0.212,0.752,0.318,1.152,0.318 c0.386,0,0.771-0.101,1.119-0.3c1.446-0.835,2.991-1.475,4.592-1.903c0.786-0.21,1.396-0.831,1.594-1.62l0.583-2.336h5.53 c0.003,0.009,0.007,0.017,0.009,0.025l0.577,2.311c0.198,0.789,0.809,1.409,1.594,1.62c1.602,0.428,3.146,1.068,4.592,1.903 c0.348,0.2,0.732,0.3,1.118,0.3c0.401,0,0.797-0.106,1.152-0.318l2.065-1.24l3.913,3.91c-0.005,0.008-0.008,0.016-0.013,0.025 l-1.219,2.03c-0.42,0.7-0.426,1.571-0.017,2.277c0.839,1.446,1.482,2.994,1.914,4.604c0.21,0.787,0.83,1.396,1.619,1.594 l2.316,0.578V27.608z M24.844,13.651c-6.182,0-11.193,5.012-11.193,11.193c0,6.183,5.011,11.193,11.193,11.193 c6.183,0,11.193-5.011,11.193-11.193C36.037,18.663,31.026,13.651,24.844,13.651 M24.844,33.798c-4.945,0-8.954-4.01-8.954-8.954 c0-4.945,4.009-8.954,8.954-8.954c4.944,0,8.954,4.009,8.954,8.954C33.798,29.788,29.788,33.798,24.844,33.798" /> </svg>); } } Cog.propTypes = { size: PropTypes.number.isRequired };
83.255814
131
0.657542
00cb361df99516a812d2ab1c40c5864bcc67f2bf
1,632
kt
Kotlin
Room/app/src/main/java/com/ko/room/AddActivity.kt
terracotta-ko/Android_Treasure_House
098d5844fb68cac5ed22fa79370de91e93551227
[ "MIT" ]
3
2017-07-08T08:48:31.000Z
2022-03-09T07:22:48.000Z
Room/app/src/main/java/com/ko/room/AddActivity.kt
terracotta-ko/Android_Treasure_House
098d5844fb68cac5ed22fa79370de91e93551227
[ "MIT" ]
null
null
null
Room/app/src/main/java/com/ko/room/AddActivity.kt
terracotta-ko/Android_Treasure_House
098d5844fb68cac5ed22fa79370de91e93551227
[ "MIT" ]
null
null
null
package com.ko.room import android.os.Bundle import androidx.appcompat.app.AppCompatActivity import com.ko.room.data.UserDao import com.ko.room.data.UserDatabaseProvider import com.ko.room.data.UserEntity import kotlinx.android.synthetic.main.activity_add.* import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.Job import kotlinx.coroutines.launch import kotlin.coroutines.CoroutineContext import kotlin.random.Random class AddActivity : AppCompatActivity(), CoroutineScope { private lateinit var userDao: UserDao private lateinit var dispatcher: CoroutineDispatcher private lateinit var job: Job override val coroutineContext: CoroutineContext get() = Dispatchers.Main + job override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_add) job = Job() userDao = UserDatabaseProvider.getInstance(this).userDao() dispatcher = CoroutineDispatcherDefault() confirmButton.setOnClickListener { launch(dispatcher.IODispatcher) { userDao.addUser( UserEntity( userIdInput.editText?.text.toString().toLong(), userNameInput.editText?.text.toString(), Random.nextBoolean() ) ) launch(dispatcher.UIDispatcher) { finish() } } } } override fun onDestroy() { job.cancel() super.onDestroy() } }
30.222222
71
0.653186
506b70feaa54e921daf93f0b68fb4897f971c395
2,469
go
Go
http-utils.go
CzarSimon/go-util
5db483fbbe25cfa8196eaa43f05f36e857165d8b
[ "MIT" ]
null
null
null
http-utils.go
CzarSimon/go-util
5db483fbbe25cfa8196eaa43f05f36e857165d8b
[ "MIT" ]
null
null
null
http-utils.go
CzarSimon/go-util
5db483fbbe25cfa8196eaa43f05f36e857165d8b
[ "MIT" ]
null
null
null
package util import ( "encoding/json" "errors" "fmt" "net/http" ) // StatusOK The status 200 return message const StatusOK string = "200 - OK" // StatusUnauthorized The status 401 return message const StatusUnauthorized string = "401 - Unauthorized" //SendPlainTextRes sends a plain text message given as an input func SendPlainTextRes(res http.ResponseWriter, msg string) { res.Header().Set("Content-Type", "text/plain") res.Header().Set("Access-Control-Allow-Origin", "*") res.WriteHeader(http.StatusOK) res.Write([]byte(msg)) } //JSONRes contains a response type JSONRes struct { Response string } //SendJSONStringRes serializes a given message sting to JSON and sends to the requestor func SendJSONStringRes(res http.ResponseWriter, msg string) { jsonResponse := JSONRes{msg} js, err := json.Marshal(jsonResponse) if err != nil { SendErrRes(res, err) return } SendJSONRes(res, js) } //SendJSONRes send a given JSON respons to the requestor func SendJSONRes(res http.ResponseWriter, js []byte) { res.Header().Set("Content-Type", "application/json") res.Header().Set("Access-Control-Allow-Origin", "*") res.WriteHeader(http.StatusOK) res.Write(js) } //SendErrRes sends a given error to the requestor func SendErrRes(res http.ResponseWriter, err error) { if err != nil { http.Error(res, err.Error(), http.StatusInternalServerError) } } // SendErrStatus Sends an error and a given status code to the requestor func SendErrStatus(res http.ResponseWriter, err error, statusCode int) { if err != nil { http.Error(res, err.Error(), statusCode) } } //SendOK sends status code 200 to the requestor func SendOK(res http.ResponseWriter) { res.WriteHeader(http.StatusOK) res.Write([]byte(StatusOK)) } // Ping sends a 200 response if the server is running func Ping(res http.ResponseWriter, req *http.Request) { fmt.Println("Ping recieved") SendOK(res) } // SendUnauthorized Sends an unauthorized status to the requestor func SendUnauthorized(res http.ResponseWriter) { http.Error(res, StatusUnauthorized, http.StatusUnauthorized) } //PlaceholderHandler is a dummy handler to ease development func PlaceholderHandler(res http.ResponseWriter, req *http.Request) { SendOK(res) } // ParseValueFromQuery Parses a query value from request func ParseValueFromQuery(req *http.Request, key, errorMsg string) (string, error) { value := req.URL.Query().Get(key) if value == "" { return "", errors.New(errorMsg) } return value, nil }
26.836957
87
0.745241
4cd74824a6ebac41e291d82aa2a1556e73bf5e58
12,566
swift
Swift
Clubber/AppDelegate.swift
TTVS/NightOut
6843bf4f688970a164550f7944a55f1d9c813797
[ "Apache-2.0" ]
1
2019-04-02T15:57:43.000Z
2019-04-02T15:57:43.000Z
Clubber/AppDelegate.swift
TTVS/NightOut
6843bf4f688970a164550f7944a55f1d9c813797
[ "Apache-2.0" ]
null
null
null
Clubber/AppDelegate.swift
TTVS/NightOut
6843bf4f688970a164550f7944a55f1d9c813797
[ "Apache-2.0" ]
1
2016-12-30T21:53:15.000Z
2016-12-30T21:53:15.000Z
// // AppDelegate.swift // Clubber // // Created by Alireza Samar on 5/8/15. // Copyright (c) 2015 Dino Media Asia. All rights reserved. // import UIKit import CoreData import FBSDKCoreKit //import AFNetworking //import Alamofire //import FastImageCache @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { //, FICImageCacheDelegate { var window: UIWindow? var frontWindow: UIWindow? // var signInWindow: UIWindow? // var signUpWindow: UIWindow? // var forgotPWWindow: UIWindow? // var introductoryContentWindow: UIWindow? lazy var coreDataStack = CoreDataStack() // Old Custom Colors var myColor1 : UIColor = UIColor(red: (29/255.0), green: (184/255.0), blue: (174/255.0), alpha: 1.0) var myColor2 : UIColor = UIColor(red: (47/255.0), green: (66/255.0), blue: (86/255.0), alpha: 1.0) var myColor3 : UIColor = UIColor(red: (255/255.0), green: (204/255.0), blue: (59/255.0), alpha: 1.0) // Custom Colors var navColor : UIColor = UIColor(red: (28/255.0), green: (28/255.0), blue: (29/255.0), alpha: 1.0) var viewColor : UIColor = UIColor(red: (23/255.0), green: (23/255.0), blue: (23/255.0), alpha: 1.0) var colorY : UIColor = UIColor(red: (230/255.0), green: (48/255.0), blue: (66/255.0), alpha: 1.0) //custom Coral Red Color var colorX : UIColor = UIColor(red: (90/255.0), green: (225/255.0), blue: (200/255.0), alpha: 1.0) //custom Cyan Color var fbColor : UIColor = UIColor(red: (61/255.0), green: (84/255.0), blue: (152/255.0), alpha: 1.0) func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { // Make universal navigation bar tint UINavigationBar.appearance().barTintColor = UIColor.blackColor() UINavigationBar.appearance().tintColor = colorX UINavigationBar.appearance().titleTextAttributes = [NSForegroundColorAttributeName : UIColor.whiteColor(), NSFontAttributeName : UIFont(name: "AvenirNext-Regular", size: 18)!] // Set status bar white UIApplication.sharedApplication().setStatusBarStyle(UIStatusBarStyle.LightContent, animated: false) //IntroductoryPageController let pageController = UIPageControl.appearance() pageController.pageIndicatorTintColor = UIColor.lightGrayColor() pageController.currentPageIndicatorTintColor = colorX pageController.backgroundColor = UIColor.clearColor() //FastImageCache // FastImageCacheHelper.setUp(self) // let navController = window!.rootViewController as! UINavigationController // let photoBrowserCollectionViewController = navController.topViewController as! PhotoBrowserCollectionViewController // photoBrowserCollectionViewController.coreDataStack = coreDataStack //MARK: - New Swipe Menu // let storyboard = UIStoryboard(name: "Main", bundle: nil) // // let front:UIViewController = storyboard.instantiateViewControllerWithIdentifier("frontViewController") as! UIViewController // frontWindow = UIWindow(frame: UIScreen.mainScreen().bounds) // frontWindow?.rootViewController = front // frontWindow?.windowLevel = UIWindowLevelStatusBar // frontWindow?.startSwipeToOpenMenu() // frontWindow?.makeKeyAndVisible() // let signIn:UIViewController = storyboard.instantiateViewControllerWithIdentifier("signInVC") as! SignInViewController // signInWindow?.stopSwipeToOpenMenu() // // let signUp:UIViewController = storyboard.instantiateViewControllerWithIdentifier("signUpVC") as! SignUpViewController // signUpWindow?.stopSwipeToOpenMenu() // // let forgotPW:UIViewController = storyboard.instantiateViewControllerWithIdentifier("forgotPWVC") as! ForgotPWViewController // forgotPWWindow?.stopSwipeToOpenMenu() // // let introductoryContent:UIViewController = storyboard.instantiateViewControllerWithIdentifier("introductoryContentVC") as! IntroductoryContentViewController // introductoryContentWindow?.stopSwipeToOpenMenu() // frontWindow?.layer.masksToBounds = true // let maskPath = UIBezierPath(roundedRect: UIScreen.mainScreen().bounds, byRoundingCorners: (.TopLeft | .TopRight), cornerRadii: CGSizeMake(2.0, 2.0)) // let maskLayer = CAShapeLayer() // maskLayer.frame = UIScreen.mainScreen().bounds // maskLayer.path = maskPath.CGPath // frontWindow?.layer.mask = maskLayer AFNetworkActivityIndicatorManager.sharedManager().enabled = true return FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions) // return true } // func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject) -> Bool { // // return FBSDKApplicationDelegate.sharedInstance().application(application, openURL: url, sourceApplication: sourceApplication, annotation: annotation) // } func applicationWillResignActive(application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. } func applicationDidEnterBackground(application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. coreDataStack.saveContext() } func applicationWillEnterForeground(application: UIApplication) { // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. } func applicationDidBecomeActive(application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. FBSDKAppEvents.activateApp() } func applicationWillTerminate(application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. // Saves changes in the application's managed object context before the application terminates. self.saveContext() coreDataStack.saveContext() } // MARK: - Core Data stack lazy var applicationDocumentsDirectory: NSURL = { // The directory the application uses to store the Core Data store file. This code uses a directory named "dinomedia.asia.Clubber" in the application's documents Application Support directory. let urls = NSFileManager.defaultManager().URLsForDirectory(.DocumentDirectory, inDomains: .UserDomainMask) return urls[urls.count-1] }() lazy var managedObjectModel: NSManagedObjectModel = { // The managed object model for the application. This property is not optional. It is a fatal error for the application not to be able to find and load its model. let modelURL = NSBundle.mainBundle().URLForResource("Clubber", withExtension: "momd")! return NSManagedObjectModel(contentsOfURL: modelURL)! }() lazy var persistentStoreCoordinator: NSPersistentStoreCoordinator? = { // The persistent store coordinator for the application. This implementation creates and return a coordinator, having added the store for the application to it. This property is optional since there are legitimate error conditions that could cause the creation of the store to fail. // Create the coordinator and store var coordinator: NSPersistentStoreCoordinator? = NSPersistentStoreCoordinator(managedObjectModel: self.managedObjectModel) let url = self.applicationDocumentsDirectory.URLByAppendingPathComponent("Clubber.sqlite") var error: NSError? = nil var failureReason = "There was an error creating or loading the application's saved data." do { try coordinator!.addPersistentStoreWithType(NSSQLiteStoreType, configuration: nil, URL: url, options: nil) } catch var error1 as NSError { error = error1 coordinator = nil // Report any error we got. var dict = [String: AnyObject]() dict[NSLocalizedDescriptionKey] = "Failed to initialize the application's saved data" dict[NSLocalizedFailureReasonErrorKey] = failureReason dict[NSUnderlyingErrorKey] = error error = NSError(domain: "YOUR_ERROR_DOMAIN", code: 9999, userInfo: dict) // Replace this with code to handle the error appropriately. // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. NSLog("Unresolved error \(error), \(error!.userInfo)") abort() } catch { fatalError() } return coordinator }() lazy var managedObjectContext: NSManagedObjectContext? = { // Returns the managed object context for the application (which is already bound to the persistent store coordinator for the application.) This property is optional since there are legitimate error conditions that could cause the creation of the context to fail. let coordinator = self.persistentStoreCoordinator if coordinator == nil { return nil } var managedObjectContext = NSManagedObjectContext() managedObjectContext.persistentStoreCoordinator = coordinator return managedObjectContext }() // MARK: - Core Data Saving support func saveContext () { if let moc = self.managedObjectContext { var error: NSError? = nil if moc.hasChanges { do { try moc.save() } catch let error1 as NSError { error = error1 // Replace this implementation with code to handle the error appropriately. // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. NSLog("Unresolved error \(error), \(error!.userInfo)") abort() } } } } // //MARK: FICImageCacheDelegate // // func imageCache(imageCache: FICImageCache!, wantsSourceImageForEntity entity: FICEntity!, withFormatName formatName: String!, completionBlock: FICImageRequestCompletionBlock!) { // if let entity = entity as? PhotoInfo { // let imageURL = entity.sourceImageURLWithFormatName(formatName) // let request = NSURLRequest(URL: imageURL) // // entity.request = Alamofire.request(.GET, request).validate(contentType: ["image/*"]).responseImage() { // (_, _, image, error) in // if (error == nil) { // completionBlock(image) // } // } // } // } // // func imageCache(imageCache: FICImageCache!, cancelImageLoadingForEntity entity: FICEntity!, withFormatName formatName: String!) { // // if let entity = entity as? PhotoInfo, request = entity.request { // request.cancel() // entity.request = nil // //println("be canceled:\(entity.UUID)") // } // } // // func imageCache(imageCache: FICImageCache!, shouldProcessAllFormatsInFamily formatFamily: String!, forEntity entity: FICEntity!) -> Bool { // return true // } // // func imageCache(imageCache: FICImageCache!, errorDidOccurWithMessage errorMessage: String!) { // println("errorMessage" + errorMessage) // } // }
51.711934
290
0.686535
22e02e6745dfba3736c8140d656d469eada50ca0
776
h
C
include/sgviewcamera.h
7956968/sg-lite
11dee4e8746a4f13c060e32ac375a984e48bc7d4
[ "MIT" ]
1
2021-04-29T03:50:25.000Z
2021-04-29T03:50:25.000Z
src/sgviewcamera.h
7956968/sg-lite
11dee4e8746a4f13c060e32ac375a984e48bc7d4
[ "MIT" ]
null
null
null
src/sgviewcamera.h
7956968/sg-lite
11dee4e8746a4f13c060e32ac375a984e48bc7d4
[ "MIT" ]
null
null
null
#ifndef SGVIEWCAMERA_H #define SGVIEWCAMERA_H #include "sgstruct.h" #include "sgglobal.h" class SGViewCameraPrivate; class SG_DECL_EXPORT SGViewCamera { SG_DECLARE_PRIVATE(SGViewCamera); friend class SGView; public: SGViewCamera(); ~SGViewCamera(); void moveCenter(); void move(float x, float y); void scale(float s); void setFillMode(bool strench); void setMirrored(bool horMirrored = false, bool verMirrored = false); void reset(); const float* transform() const; const RectF &viewRect() const; Point mapToScene(const Point & vp) const; protected: void setSceneSize(float wid, float hei); void setViewSize(float wid, float hei); void update(); SGViewCameraPrivate *d_ptr; }; #endif // SGVIEWCAMERA_H
22.171429
73
0.704897
99667c83ab00641ac0b10999a82c5eeb84400ca8
6,927
h
C
iOS/RCUniIM/RCUniIM/frameworks/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCMessage.h
daoshengtech/rongcloud-uniapp-imlib
b3d2ebb6721815bf49cfee77695f813a33b2997a
[ "MIT" ]
1
2022-03-31T05:48:24.000Z
2022-03-31T05:48:24.000Z
iOS/RCUniIM/RCUniIM/frameworks/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCMessage.h
daoshengtech/rongcloud-uniapp-imlib
b3d2ebb6721815bf49cfee77695f813a33b2997a
[ "MIT" ]
1
2021-11-24T10:30:37.000Z
2021-11-24T11:11:41.000Z
iOS/RCUniIM/RCUniIM/frameworks/RongIMLibCore.xcframework/ios-i386_x86_64-simulator/RongIMLibCore.framework/Headers/RCMessage.h
daoshengtech/rongcloud-uniapp-imlib
b3d2ebb6721815bf49cfee77695f813a33b2997a
[ "MIT" ]
5
2021-09-15T05:21:02.000Z
2022-03-31T05:48:34.000Z
/** * Copyright (c) 2014-2015, RongCloud. * All rights reserved. * * All the contents are the copyright of RongCloud Network Technology Co.Ltd. * Unless otherwise credited. http://rongcloud.cn * */ // RCMessage.h // Created by Heq.Shinoda on 14-6-13. #ifndef __RCMessage #define __RCMessage #import "RCMessageContent.h" #import "RCReadReceiptInfo.h" #import "RCStatusDefine.h" #import <Foundation/Foundation.h> #import "RCMessageConfig.h" #import "RCMessagePushConfig.h" #import "RCGroupReadReceiptInfoV2.h" /*! * \~chinese ๆถˆๆฏๅฎžไฝ“็ฑป @discussion ๆถˆๆฏๅฎžไฝ“็ฑป๏ผŒๅŒ…ๅซๆถˆๆฏ็š„ๆ‰€ๆœ‰ๅฑžๆ€งใ€‚ * \~english Message entity class. @ discussion message entity class, which contains all the properties of the message. */ @interface RCMessage : NSObject <NSCopying, NSCoding> /*! * \~chinese ไผš่ฏ็ฑปๅž‹ * \~english Conversation type */ @property (nonatomic, assign) RCConversationType conversationType; /*! * \~chinese ไผš่ฏ ID * \~english Conversation ID */ @property (nonatomic, copy) NSString *targetId; /*! * \~chinese ๆ‰€ๅฑžไผš่ฏ็š„ไธšๅŠกๆ ‡่ฏ†๏ผŒ้•ฟๅบฆ้™ๅˆถ 20 ๅญ—็ฌฆ * \~english Business identification of the conversation to which it belongs, with a length limit of 20 characters. */ @property (nonatomic, copy) NSString *channelId; /*! * \~chinese ๆถˆๆฏ็š„ ID @discussion ๆœฌๅœฐๅญ˜ๅ‚จ็š„ๆถˆๆฏ็š„ๅ”ฏไธ€ๅ€ผ๏ผˆๆ•ฐๆฎๅบ“็ดขๅผ•ๅ”ฏไธ€ๅ€ผ๏ผ‰ * \~english ID of the message. @ discussion Unique value of locally stored message (unique value of database index). */ @property (nonatomic, assign) long messageId; /*! * \~chinese ๆถˆๆฏ็š„ๆ–นๅ‘ * \~english The direction of the message. */ @property (nonatomic, assign) RCMessageDirection messageDirection; /*! * \~chinese ๆถˆๆฏ็š„ๅ‘้€่€… ID * \~english The sender ID of the message */ @property (nonatomic, copy) NSString *senderUserId; /*! * \~chinese ๆถˆๆฏ็š„ๆŽฅๆ”ถ็Šถๆ€ * \~english The receiving status of the message */ @property (nonatomic, assign) RCReceivedStatus receivedStatus; /*! * \~chinese ๆถˆๆฏ็š„ๅ‘้€็Šถๆ€ * \~english The sending status of the message */ @property (nonatomic, assign) RCSentStatus sentStatus; /*! * \~chinese ๆถˆๆฏ็š„ๆŽฅๆ”ถๆ—ถ้—ด๏ผˆUnix ๆ—ถ้—ดๆˆณใ€ๆฏซ็ง’๏ผ‰ * \~english The time the message is received (Unix timestamp, milliseconds) */ @property (nonatomic, assign) long long receivedTime; /*! * \~chinese ๆถˆๆฏ็š„ๅ‘้€ๆ—ถ้—ด๏ผˆUnix ๆ—ถ้—ดๆˆณใ€ๆฏซ็ง’๏ผ‰ * \~english The time the message is sent (Unix timestamp, milliseconds) */ @property (nonatomic, assign) long long sentTime; /*! * \~chinese ๆถˆๆฏ็š„็ฑปๅž‹ๅ * \~english The type name of the message */ @property (nonatomic, copy) NSString *objectName; /*! * \~chinese ๆถˆๆฏ็š„ๅ†…ๅฎน * \~english The content of the message */ @property (nonatomic, strong) RCMessageContent *content; /*! * \~chinese ๆถˆๆฏ็š„้™„ๅŠ ๅญ—ๆฎต * \~english Additional fields of the message */ @property (nonatomic, copy) NSString *extra; /*! * \~chinese ๅ…จๅฑ€ๅ”ฏไธ€ ID @discussion ๆœๅŠกๅ™จๆถˆๆฏๅ”ฏไธ€ ID๏ผˆๅœจๅŒไธ€ไธช Appkey ไธ‹ๅ…จๅฑ€ๅ”ฏไธ€๏ผ‰ * \~english Globally unique ID. @ discussion server message unique ID (globally unique under the same Appkey). */ @property (nonatomic, copy) NSString *messageUId; /*! * \~chinese ้˜…่ฏปๅ›žๆ‰ง็Šถๆ€ * \~english Reading receipt status */ @property (nonatomic, strong) RCReadReceiptInfo *readReceiptInfo; /*! * \~chinese ็พค้˜…่ฏปๅ›žๆ‰ง็Šถๆ€ @discussion ๅฆ‚ๆžœๆ˜ฏ่ฐƒ็”จ RCGroupReadReceiptV2Manager ไธญๆ–นๆณ•ๅฎž็Žฐ็พคๅทฒ่ฏปๅ›žๆ‰งๅŠŸ่ƒฝ๏ผŒๆญคๅ‚ๆ•ฐๆ‰ๆœ‰ๆ•ˆ๏ผŒๅฆๅˆ™่ฏทไฝฟ็”จ readReceiptInfo ๅฑžๆ€ง่Žทๅ–้˜…่ฏปๅ›žๆ‰ง็Šถๆ€ @discussion ๅฆ‚ๆžœไฝฟ็”จ IMKit๏ผŒ่ฏท็”จ readReceiptInfo ๅฑžๆ€ง * \~english Group reading receipt status. @ discussion This parameter is valid only if you call the method in RCGroupReadReceiptV2Manager to implement the group read receipt function. Otherwise, use the readReceiptInfo attribute to obtain the read receipt status. @ discussion use the readReceiptInfo attribute if you use IMKit, */ @property (nonatomic, strong) RCGroupReadReceiptInfoV2 *groupReadReceiptInfoV2; /*! * \~chinese ๆถˆๆฏ้…็ฝฎ * \~english Message configuration */ @property (nonatomic, strong) RCMessageConfig *messageConfig; /*! * \~chinese ๆถˆๆฏๆŽจ้€้…็ฝฎ * \~english Message push configuration */ @property (nonatomic, strong) RCMessagePushConfig *messagePushConfig; /*! * \~chinese ๆ˜ฏๅฆๆ˜ฏ็ฆป็บฟๆถˆๆฏ๏ผŒๅชๅœจๆŽฅๆ”ถๆถˆๆฏ็š„ๅ›ž่ฐƒๆ–นๆณ•ไธญๆœ‰ๆ•ˆ๏ผŒๅฆ‚ๆžœๆถˆๆฏไธบ็ฆป็บฟๆถˆๆฏ๏ผŒๅˆ™ไธบ YES ๏ผŒๅ…ถไป–ๆƒ…ๅ†ตๅ‡ไธบ NO * \~english Whether it is an offline message is only valid in the callback method that receives the message. If the message is offline, it is YES. Otherwise, it is NO. */ @property(nonatomic, assign) BOOL isOffLine; /*! * \~chinese ๆถˆๆฏๆ˜ฏๅฆๅฏไปฅๅŒ…ๅซๆ‰ฉๅฑ•ไฟกๆฏ @discussion ่ฏฅๅฑžๆ€งๅœจๆถˆๆฏๅ‘้€ๆ—ถ็กฎๅฎš๏ผŒๅ‘้€ไน‹ๅŽไธ่ƒฝๅ†ๅšไฟฎๆ”น @discussion ๆ‰ฉๅฑ•ไฟกๆฏๅชๆ”ฏๆŒๅ•่Šๅ’Œ็พค็ป„๏ผŒๅ…ถๅฎƒไผš่ฏ็ฑปๅž‹ไธ่ƒฝ่ฎพ็ฝฎๆ‰ฉๅฑ•ไฟกๆฏ * \~english Whether the message can contain extended information. @ discussion This property is determined when the message is sent and cannot be modified after it is sent. @ discussion Extension information only supports single chat and group. Other conversation types cannot set extension information. */ @property (nonatomic, assign) BOOL canIncludeExpansion; /*! * \~chinese ๆถˆๆฏๆ‰ฉๅฑ•ไฟกๆฏๅˆ—่กจ @discussion ๆ‰ฉๅฑ•ไฟกๆฏๅชๆ”ฏๆŒๅ•่Šๅ’Œ็พค็ป„๏ผŒๅ…ถๅฎƒไผš่ฏ็ฑปๅž‹ไธ่ƒฝ่ฎพ็ฝฎๆ‰ฉๅฑ•ไฟกๆฏ @discussion ้ป˜่ฎคๆถˆๆฏๆ‰ฉๅฑ•ๅญ—ๅ…ธ key ้•ฟๅบฆไธ่ถ…่ฟ‡ 32 ๏ผŒvalue ้•ฟๅบฆไธ่ถ…่ฟ‡ 64 ๏ผŒๅ•ๆฌก่ฎพ็ฝฎๆ‰ฉๅฑ•ๆ•ฐ้‡ๆœ€ๅคงไธบ 20๏ผŒๆถˆๆฏ็š„ๆ‰ฉๅฑ•ๆ€ปๆ•ฐไธ่ƒฝ่ถ…่ฟ‡ 300 * \~english Message extension information list. @ discussion Extension information only supports single chat and group. Other conversation types cannot set extension information. @ discussion Default message extension dictionary key length does not exceed 32, value length does not exceed 64, the maximum number of extensions for a single setting is 20, and the total number of message extensions cannot exceed 300. */ @property (nonatomic, strong) NSDictionary<NSString *, NSString *> *expansionDic; /*! * \~chinese RCMessageๅˆๅง‹ๅŒ–ๆ–นๆณ• @param conversationType ไผš่ฏ็ฑปๅž‹ @param targetId ไผš่ฏ ID @param messageDirection ๆถˆๆฏ็š„ๆ–นๅ‘ @param content ๆถˆๆฏ็š„ๅ†…ๅฎน * \~english RCMessage initialization method. @ param conversationType conversation type. @ param targetId conversation ID. @ param messageDirection message direction @ param content message content. */ - (instancetype)initWithType:(RCConversationType)conversationType targetId:(NSString *)targetId direction:(RCMessageDirection)messageDirection content:(RCMessageContent *)content; /*! * \~chinese RCMessageๅˆๅง‹ๅŒ–ๆ–นๆณ•๏ผˆๅทฒๅบŸๅผƒ๏ผŒ่ฏทไธ่ฆไฝฟ็”จ่ฏฅๆŽฅๅฃๆž„้€ ๆถˆๆฏๅ‘้€๏ผ‰ @param conversationType ไผš่ฏ็ฑปๅž‹ @param targetId ไผš่ฏ ID @param messageDirection ๆถˆๆฏ็š„ๆ–นๅ‘ @param messageId ๆถˆๆฏ็š„ ID๏ผˆๅฆ‚ๆžœๆ˜ฏๅ‘้€่ฏฅๆถˆๆฏๅˆๅง‹ๅ€ผ่ฏท่ฎพ็ฝฎไธบ -1๏ผ‰ @param content ๆถˆๆฏ็š„ๅ†…ๅฎน * \~english RCMessage initialization method. @ param conversationType conversation type. @ param targetId conversation ID. @ param messageDirection message direction @ param messageId message ID @ param content message content. */ - (instancetype)initWithType:(RCConversationType)conversationType targetId:(NSString *)targetId direction:(RCMessageDirection)messageDirection messageId:(long)messageId content:(RCMessageContent *)content __deprecated_msg("Use initWithType:targetId:direction:content:"); @end #endif
23.323232
237
0.720225
0eeb638eab9c5769ba22842ab3a4deaa894bfaef
224
c
C
99_pta/05/05_03_sum_a_continuity.c
ysl970629/C-language-study
80baf0e608bb3a72a89751e172752a2d83149e02
[ "MIT" ]
1
2022-03-29T16:34:44.000Z
2022-03-29T16:34:44.000Z
99_pta/05/05_03_sum_a_continuity.c
ysl970629/C-language-study
80baf0e608bb3a72a89751e172752a2d83149e02
[ "MIT" ]
null
null
null
99_pta/05/05_03_sum_a_continuity.c
ysl970629/C-language-study
80baf0e608bb3a72a89751e172752a2d83149e02
[ "MIT" ]
null
null
null
#include <stdio.h> //ๆฑ‚a็š„่ฟž็ปญๅ’Œ int main() { int a, n; scanf("%d %d", &a, &n); int sum = 0; int i; int t = 0; for (i = 0; i < n; i++) { t = t * 10 + a; sum += t; } return 0; }
13.176471
27
0.357143
7d60691c120f3601f9784bb2897b735d380545bf
1,636
html
HTML
server/djangoapp/templates/djangoapp/contact.html
raylaw8/agfzb-CloudAppDevelopment_Capstone
16d52d030bf924d6143ec7c7f8470d0d46aec05e
[ "Apache-2.0" ]
null
null
null
server/djangoapp/templates/djangoapp/contact.html
raylaw8/agfzb-CloudAppDevelopment_Capstone
16d52d030bf924d6143ec7c7f8470d0d46aec05e
[ "Apache-2.0" ]
null
null
null
server/djangoapp/templates/djangoapp/contact.html
raylaw8/agfzb-CloudAppDevelopment_Capstone
16d52d030bf924d6143ec7c7f8470d0d46aec05e
[ "Apache-2.0" ]
null
null
null
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Dealership Review</title> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"> <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script> <link href="https://unpkg.com/bootstrap-table@1.18.2/dist/bootstrap-table.min.css" rel="stylesheet"> <script src="https://unpkg.com/bootstrap-table@1.18.2/dist/bootstrap-table.min.js"></script> <script src="https://unpkg.com/bootstrap-table@1.18.2/dist/extensions/filter-control/bootstrap-table-filter-control.min.js"></script> </head> <body> <!--Add a nav bar here --> {% include 'navbar.html' %} <div class="container"> <p class="heading-txt" style="font-size: 2em; margin-bottom: 3%; text-align: center;">Contact Us</p> <div style="margin-top: 5%;display: flex; justify-content: space-evenly; flex-wrap: wrap;"> <div class="card text-white bg-dark mb-3" style="max-width: 50rem;"> <div class="card-header">Contact Information</div> <div class="card-body"> <h5 class="card-title">Customer Care</h5> <p class="card-text">Customer Service Center </br> Address: Customer Service Center, Customer Service Drive </br> Phone: 12345678 </br> Email: customer.service@dealership.com </p> </div> </div> </div> </body> </html>
54.533333
195
0.653423
e8eedc51b24c6143d7853efa95a31479c5ffbbd9
2,645
py
Python
tests/commands/test_generate.py
pedrovelho/camp
98105c9054b8db3377cb6a06e7b5451b97c6c285
[ "MIT" ]
null
null
null
tests/commands/test_generate.py
pedrovelho/camp
98105c9054b8db3377cb6a06e7b5451b97c6c285
[ "MIT" ]
null
null
null
tests/commands/test_generate.py
pedrovelho/camp
98105c9054b8db3377cb6a06e7b5451b97c6c285
[ "MIT" ]
1
2019-02-05T08:49:41.000Z
2019-02-05T08:49:41.000Z
# # CAMP # # Copyright (C) 2017, 2018 SINTEF Digital # All rights reserved. # # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE file for details. # from unittest import TestCase from camp.commands import Command, Generate class DefaultValuesAreCorrect(TestCase): def test_given_no_working_directory(self): command_line = "generate --all" command = Command.extract_from(command_line.split()) self.assertIsInstance(command, Generate) self.assertEqual(command.working_directory, Generate.DEFAULT_WORKING_DIRECTORY) def test_given_no_working_directory(self): command_line = "generate -d my/directory" command = Command.extract_from(command_line.split()) self.assertIsInstance(command, Generate) self.assertEqual(command.only_coverage, Generate.DEFAULT_COVERAGE) class ShortOptionsAreAccepted(TestCase): def test_given_working_directory(self): command_line = "generate --d my/test/directory" command = Command.extract_from(command_line.split()) self.assertIsInstance(command, Generate) self.assertEqual(command.working_directory, "my/test/directory") def test_given_only_coverage(self): command_line = "generate --c" command = Command.extract_from(command_line.split()) self.assertIsInstance(command, Generate) self.assertTrue(command.only_coverage) def test_given_all_configurations(self): command_line = "generate --a" command = Command.extract_from(command_line.split()) self.assertIsInstance(command, Generate) self.assertFalse(command.only_coverage) class LongOptionsAreAccepted(TestCase): def test_given_working_directory(self): command_line = "generate --directory my/test/directory" command = Command.extract_from(command_line.split()) self.assertIsInstance(command, Generate) self.assertEqual(command.working_directory, "my/test/directory") def test_given_only_coverage(self): command_line = "generate --coverage" command = Command.extract_from(command_line.split()) self.assertIsInstance(command, Generate) self.assertTrue(command.only_coverage) def test_given_all_configurations(self): command_line = "generate --all" command = Command.extract_from(command_line.split()) self.assertIsInstance(command, Generate) self.assertFalse(command.only_coverage)
25.190476
63
0.689981
132a9402eddd52182e534d419d8db3dc7a7e630c
1,412
h
C
src/asn/rrc/ASN_RRC_FreqBandInformationNR.h
aligungr/ue-ran-sim
564f9d228723f03adfa2b02df2ea019bdf305085
[ "MIT" ]
16
2020-04-16T02:07:37.000Z
2020-07-23T10:48:27.000Z
src/asn/rrc/ASN_RRC_FreqBandInformationNR.h
aligungr/ue-ran-sim
564f9d228723f03adfa2b02df2ea019bdf305085
[ "MIT" ]
8
2020-07-13T17:11:35.000Z
2020-08-03T16:46:31.000Z
src/asn/rrc/ASN_RRC_FreqBandInformationNR.h
aligungr/ue-ran-sim
564f9d228723f03adfa2b02df2ea019bdf305085
[ "MIT" ]
9
2020-03-04T15:05:08.000Z
2020-07-30T06:18:18.000Z
/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "NR-RRC-Definitions" * found in "asn/nr-rrc-15.6.0.asn1" * `asn1c -fcompound-names -pdu=all -findirect-choice -fno-include-deps -gen-PER -no-gen-OER -no-gen-example -D rrc` */ #ifndef _ASN_RRC_FreqBandInformationNR_H_ #define _ASN_RRC_FreqBandInformationNR_H_ #include <asn_application.h> /* Including external dependencies */ #include "ASN_RRC_FreqBandIndicatorNR.h" #include "ASN_RRC_AggregatedBandwidth.h" #include <NativeInteger.h> #include <constr_SEQUENCE.h> #ifdef __cplusplus extern "C" { #endif /* ASN_RRC_FreqBandInformationNR */ typedef struct ASN_RRC_FreqBandInformationNR { ASN_RRC_FreqBandIndicatorNR_t bandNR; ASN_RRC_AggregatedBandwidth_t *maxBandwidthRequestedDL; /* OPTIONAL */ ASN_RRC_AggregatedBandwidth_t *maxBandwidthRequestedUL; /* OPTIONAL */ long *maxCarriersRequestedDL; /* OPTIONAL */ long *maxCarriersRequestedUL; /* OPTIONAL */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } ASN_RRC_FreqBandInformationNR_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_ASN_RRC_FreqBandInformationNR; extern asn_SEQUENCE_specifics_t asn_SPC_ASN_RRC_FreqBandInformationNR_specs_1; extern asn_TYPE_member_t asn_MBR_ASN_RRC_FreqBandInformationNR_1[5]; #ifdef __cplusplus } #endif #endif /* _ASN_RRC_FreqBandInformationNR_H_ */ #include <asn_internal.h>
30.042553
117
0.800992
b91ff8cc56bbb99ccadcf34b30ae051fc88b528a
1,649
c
C
netwhat_trainning/ft_timer.c
jteixeir/42_netwhat
0e4e7c4ea85702aa55608077f5684452efa5e375
[ "MIT" ]
10
2020-05-08T20:24:52.000Z
2020-07-03T17:23:14.000Z
netwhat_trainning/ft_timer.c
jteixeir/42_netwhat
0e4e7c4ea85702aa55608077f5684452efa5e375
[ "MIT" ]
null
null
null
netwhat_trainning/ft_timer.c
jteixeir/42_netwhat
0e4e7c4ea85702aa55608077f5684452efa5e375
[ "MIT" ]
1
2020-05-08T20:24:56.000Z
2020-05-08T20:24:56.000Z
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_timer.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: jteixeir <jteixeir@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/04/29 17:10:56 by jteixeir #+# #+# */ /* Updated: 2020/05/08 16:07:04 by jteixeir ### ########.fr */ /* */ /* ************************************************************************** */ #include "lib.h" void ft_counter(void) { int iCounter = 3; while (iCounter != 0) { printf(CYAN "\n\n\t\t\t %d\n\n" COLOR_RESET, iCounter--); sleep(1); } } void ft_timer(void) { struct tm *local, *gm; time_t t; t = time(NULL); local = localtime(&t); int day = local->tm_mday; int month = local->tm_mon + 1; int year = local->tm_year + 1900; int hour = local->tm_hour; int min = local->tm_min; int sec = local->tm_sec; printf(CYAN "\t\t %d/%d/%d ", day, month, year); printf(" %d:%2d\n", hour, min); printf("\n\nโ€ข ====================================================-=========== โ€ข" COLOR_RESET); ft_counter(); }
35.847826
99
0.272286
b8e50948835532faeaa43ecacfdae867e8099952
11,509
sql
SQL
html5_javascript/kemal_server/db/init.sql
jacob-willden/sensible-cinema
38f850dcc2a0f02e37039b7f2b433945a1d67015
[ "Info-ZIP" ]
null
null
null
html5_javascript/kemal_server/db/init.sql
jacob-willden/sensible-cinema
38f850dcc2a0f02e37039b7f2b433945a1d67015
[ "Info-ZIP" ]
null
null
null
html5_javascript/kemal_server/db/init.sql
jacob-willden/sensible-cinema
38f850dcc2a0f02e37039b7f2b433945a1d67015
[ "Info-ZIP" ]
null
null
null
-- reverse order here drop table if exists tag_edit_list_to_tag; drop table if exists tag_edit_list; drop table if exists tags; drop table if exists edits; drop table if exists urls; drop table if exists users; CREATE TABLE urls ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, url VARCHAR(1024) NOT NULL DEFAULT '', name VARCHAR(1024) NOT NULL DEFAULT '', editing_notes VARCHAR(1024) NOT NULL DEFAULT '', -- no default specified and we're hosed with future column name changes :| -- imdb_url VARCHAR(1024) NOT NULL, -- can't use their ratings I doubt :| -- trailer_urls VARCHAR(1024) NOT NULL, -- synopsis VARCHAR(1024) NOT NULL age_recommendation_after_edited INT NOT NULL DEFAULT 0, wholesome_uplifting_level INT NOT NULL DEFAULT 0, good_movie_rating INT NOT NULL DEFAULT 0, -- our rating out of 10 review VARCHAR(8192) NOT NULL DEFAULT '', -- our rating explanation, age recommendation explanation :) amazon_episode_number INTEGER NOT NULL DEFAULT 0, amazon_episode_name VARCHAR(1024) NOT NULL DEFAULT '' ); CREATE UNIQUE INDEX url_episode_num ON urls(url(256), amazon_episode_number); -- for unique *and* lookups (256 to avoid some mysql index too long) CREATE TABLE edits ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, start REAL NOT NULL, endy REAL NOT NULL, category VARCHAR(1024) NOT NULL, subcategory VARCHAR(1024) NOT NULL, details VARCHAR(1024) NOT NULL, more_details VARCHAR(1024) NOT NULL, default_action VARCHAR(1024) NOT NULL, url_id INT NOT NULL, FOREIGN KEY(URL_ID) REFERENCES urls(id) ); insert into urls (url, name, editing_notes, amazon_episode_number, amazon_episode_name, age_recommendation_after_edited, wholesome_uplifting_level, good_movie_rating, review) values ("https:&#x2F;&#x2F;www.amazon.com&#x2F;Avatar-Last-Airbender-Season-3&#x2F;dp&#x2F;B001J6GZXK", 'ALTA season 3', "this does not have real edits", 5, "Beach test", 10, 8, 4, "review"); insert into urls (url, name, editing_notes, amazon_episode_number, amazon_episode_name, age_recommendation_after_edited, wholesome_uplifting_level, good_movie_rating, review) values ("https://localhost:3000/test_movie_for_practicing_edits.html", 'big buck bunny localhost', "not done yet", 0, "", 10, 8, 4, "review"); insert into urls (url, name, editing_notes, amazon_episode_number, amazon_episode_name, age_recommendation_after_edited, wholesome_uplifting_level, good_movie_rating, review) values ("https://playitmyway.org/test_movie_for_practicing_edits.html", 'big buck bunny pimw', "not done yet", 0, "", 10, 8, 4, "review"); insert into edits (start, endy, category, subcategory, details, default_action, url_id, more_details) values (2.0, 7.0, "profanity", "personal insult mild", "details", "skip", (select id from urls where url='https:&#x2F;&#x2F;www.amazon.com&#x2F;Avatar-Last-Airbender-Season-3&#x2F;dp&#x2F;B001J6GZXK'), ""); insert into edits (start, endy, category, subcategory, details, default_action, url_id, more_details) values (10.0, 20.0, "profanity", "a subcat", "details", "mute", (select id from urls where url='https:&#x2F;&#x2F;www.amazon.com&#x2F;Avatar-Last-Airbender-Season-3&#x2F;dp&#x2F;B001J6GZXK'), ""); alter table urls ADD COLUMN details VARCHAR(1024) NOT NULL DEFAULT ''; alter table urls CHANGE editing_notes editing_status VARCHAR(1024); update urls set editing_status = 'Done with second review, tags viewed as complete'; -- alter table urls ADD COLUMN image_url VARCHAR(2014) NOT NULL DEFAULT ''; update urls set image_url = 'https://upload.wikimedia.org/wikipedia/en/b/ba/Airbender-CompleteBook3.jpg' where id = 1; -- test data :) alter table urls ADD COLUMN is_amazon_prime INT NOT NULL DEFAULT 0; -- probably should be TINYINT(1) but crystal mysql adapter no support it [?] alter table urls ADD COLUMN rental_cost DECIMAL NOT NULL DEFAULT 0.0; -- too scared to use floats update urls set rental_cost = -1 where id = 1; -- freebie alter table urls ADD COLUMN purchase_cost DECIMAL NOT NULL DEFAULT 0.0; alter table urls ADD COLUMN total_time REAL NOT NULL default 0.0; alter table urls ADD COLUMN amazon_second_url VARCHAR(2014) NOT NULL DEFAULT ''; CREATE INDEX url_amazon_second_url_episode_idx ON urls(amazon_second_url(256), amazon_episode_number); -- non unique on purpose XXX do queries use this? create unique index url_title_episode ON urls(name(256), amazon_episode_number); -- try to avoid accidental dupes ALTER TABLE urls DROP INDEX url_title_episode; CREATE UNIQUE INDEX unique_name_with_episode ON urls(name(256), amazon_episode_number); -- rename same index ALTER TABLE urls CHANGE amazon_episode_name episode_name VARCHAR(1024); ALTER TABLE urls CHANGE amazon_episode_number episode_number INTEGER; alter table urls add column amazon_prime_free_type VARCHAR(2014) NOT NULL DEFAULT ''; update urls set amazon_prime_free_type = 'Prime' where is_amazon_prime = 1; alter table urls drop column is_amazon_prime; RENAME TABLE edits TO tags; CREATE TABLE tag_edit_list ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, url_id INT NOT NULL, description VARCHAR(1024) NOT NULL DEFAULT '', notes VARCHAR(1024) NOT NULL DEFAULT '', age_recommendation_after_edited INT NOT NULL DEFAULT 0, FOREIGN KEY(URL_ID) REFERENCES urls(id) -- "community" :) ); ALTER TABLE urls drop column age_recommendation_after_edited; CREATE TABLE tag_edit_list_to_tag ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, tag_edit_list_id INT NOT NULL, FOREIGN KEY(tag_edit_list_id) references tag_edit_list(id), tag_id INT NOT NULL, FOREIGN KEY (tag_id) references tags(id), action VARCHAR(1024) NOT NULL ); -- TODO some indices for these? alter table tag_edit_list change notes status_notes VARCHAR(1024) NOT NULL DEFAULT ''; -- XXX rename all tables to singular... :) alter table urls add column create_timestamp TIMESTAMP not null DEFAULT NOW(); ALTER TABLE `urls` CHANGE COLUMN `image_url` `image_local_filename` VARCHAR(2014) NOT NULL DEFAULT ''; update urls set image_local_filename = '1_maxresdefault.jpg' where id = 1; -- test data :) update urls set details = 'Aang escapes a killer while the bad guys camp at the beach' where id = 1; -- test data :) alter table tags add column oval_percentage_coords VARCHAR(24) NOT NULL DEFAULT ''; alter table tags drop column more_details; alter table tags change oval_percentage_coords oval_percentage_coords VARCHAR(100) NOT NULL DEFAULT ''; alter table urls add column subtitles LONGTEXT NOT NULL; alter table urls add column genre VARCHAR(100) NOT NULL DEFAULT ''; alter table urls add column original_rating VARCHAR(10) NOT NULL DEFAULT ''; alter table tags add column age_maybe_ok INT NOT NULL DEFAULT 0; alter table urls add column wholesome_review TEXT; -- said my row was too big otherwise :| update urls set wholesome_review = ''; -- default for existing :| alter table urls add column count_downloads INT NOT NULL DEFAULT 0; alter table tags drop column oval_percentage_coords; alter table urls add column editing_notes TEXT; update urls set editing_notes = ''; -- default for existing :| alter table urls add column community_contrib BOOL DEFAULT true; -- actually 0 or 1 apparently CREATE TABLE users ( id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(2048) NOT NULL, email VARCHAR(512) NOT NULL, user_id VARCHAR(128) NOT NULL, type VARCHAR(1024) NOT NULL ); ALTER TABLE users ADD CONSTRAINT unique_email_user_id UNIQUE (email, user_id); insert into users values (0, "test_user_name", "test@test.com", "test_user_id", "facebook"); alter table tag_edit_list add column user_id INT NOT NULL DEFAULT 0; alter table tags add column impact_to_movie INT NOT NULL DEFAULT 0; -- assume 1 means "some" :) alter table urls add rental_cost_sd DECIMAL(10, 2) NOT NULL DEFAULT 0; alter table urls add purchase_cost_sd DECIMAL(10, 2) NOT NULL DEFAULT 0; alter table urls modify rental_cost DECIMAL(10, 2); -- turns out DECIMAL by default is truncated :| alter table urls modify purchase_cost DECIMAL(10, 2); ALTER TABLE users DROP INDEX unique_email_user_id; -- just pretend that once an email is in there, you're stuck with it...so I can combine them later if people login'ish up front [?] ALTER TABLE users ADD CONSTRAINT unique_email UNIQUE (email); alter table users add column email_subscribe BOOL DEFAULT false; -- actually 0 or 1 apparently alter table users add column editor BOOL DEFAULT false; -- actually 0 or 1 apparently update users set editor=1; -- we're all editors in test :) alter table users add column is_admin BOOL DEFAULT false; -- actually 0 or 1 apparently -- if necessary: ALTER TABLE users CHANGE COLUMN admin is_admin BOOL;; alter table urls ADD COLUMN amazon_third_url VARCHAR(2014) NOT NULL DEFAULT ''; CREATE INDEX url_amazon_third_url_episode_idx ON urls(amazon_third_url(256), episode_number); -- non unique on purpose XXX do queries use this? alter table users drop index unique_email; -- too confusing to people to get this failure wait what? so just allow until we need more :| alter table tags add column popup_text_after VARCHAR(1024) NOT NULL DEFAULT ''; alter table tags add column default_enabled BOOL DEFAULT true; -- actually 0 or 1 apparently... alter table urls drop column community_contrib; alter table tag_edit_list_to_tag add column enabled BOOL DEFAULT true; update tag_edit_list_to_tag set enabled = false where action = 'do_nothing'; alter table tag_edit_list_to_tag drop column action; -- hope nobody had any custom actions! alter table users CHANGE user_id amazon_id VARCHAR(1024) NOT NULL DEFAULT ''; alter table users add facebook_id VARCHAR(1024) NOT NULL DEFAULT ''; -- last login type alter table users drop column type; ALTER TABLE users ADD CONSTRAINT unique_email_user_id UNIQUE (email); alter table tags add column lewdness_level INT NOT NULL DEFAULT 0; alter table urls add column status_last_modified_timestamp TIMESTAMP not null DEFAULT now(); -- default for the existings alter table urls add column edit_passes_completed INT not null default 0; update urls set edit_passes_completed = 1 where Editing_Status = 'Done with first pass tagging, could use second review'; update urls set edit_passes_completed = 2 where Editing_Status = 'Done with second review, tags viewed as complete'; alter table urls add column most_recent_pass_discovery_level INT; update urls set most_recent_pass_discovery_level = 0; -- avoid specifying unused default... alter table urls modify column most_recent_pass_discovery_level INT NOT NULL; update urls set most_recent_pass_discovery_level = 2 where edit_passes_completed > 0; -- "normal pass" alter table urls drop column editing_status; alter table urls CHANGE editing_notes internal_editing_notes TEXT; alter table urls add column sell_it_edited TEXT; update urls set sell_it_edited = ''; -- default alter table urls add column stuff_not_edited_out TEXT; update urls set stuff_not_edited_out = ''; -- default update urls set genre = 'genre1&#x2F;genre1b'; -- test data update urls set amazon_prime_free_type = 'Prime' limit 1; update urls set details = 'an awesome movie description' limit 1; alter table urls add column age_recommendation_after_edited INT NOT NULL DEFAULT 0; alter table tags add column lip_readable BOOL DEFAULT false; -- and output to screen to show success... select * from urls; select * from tags;
55.599034
205
0.765835
b35a8eec17dd3109a6ad8765f3676edda814f70b
625
swift
Swift
167. Two Sum II - Input array is sorted/Solution.swift
icylydia/PlayWithLeetCode
63651e7832277147751b14c5e19e3935e96e8f35
[ "MIT" ]
null
null
null
167. Two Sum II - Input array is sorted/Solution.swift
icylydia/PlayWithLeetCode
63651e7832277147751b14c5e19e3935e96e8f35
[ "MIT" ]
null
null
null
167. Two Sum II - Input array is sorted/Solution.swift
icylydia/PlayWithLeetCode
63651e7832277147751b14c5e19e3935e96e8f35
[ "MIT" ]
null
null
null
class Solution { func twoSum(_ numbers: [Int], _ target: Int) -> [Int] { for idx in 0..<numbers.count { let cand = numbers[idx] var st = idx + 1 var ed = numbers.count - 1 if cand + numbers[ed] < target { continue } if st == ed { return [idx + 1, st + 1] } while st < ed { if cand + numbers[st] == target { return [idx + 1, st + 1] } else if cand + numbers[ed] == target { return [idx + 1, ed + 1] } else { let mid = (st + ed) / 2 if cand + numbers[mid] < target { st = mid + 1 } else { ed = mid } } } } return [0] } }
20.833333
59
0.48
57669fa86085fd302905766cf9edfd4d9f5ac81e
440
h
C
src/compiler/codegen/operators.h
laleksiunas/leg-language
e34aee17ddacaf9e1a5010014afb363d70d762df
[ "MIT" ]
null
null
null
src/compiler/codegen/operators.h
laleksiunas/leg-language
e34aee17ddacaf9e1a5010014afb363d70d762df
[ "MIT" ]
null
null
null
src/compiler/codegen/operators.h
laleksiunas/leg-language
e34aee17ddacaf9e1a5010014afb363d70d762df
[ "MIT" ]
null
null
null
#pragma once namespace codegen::operators { const auto Plus = "+"; const auto Minus = "-"; const auto Multiply = "*"; const auto Divide = "/"; const auto Modulus = "%"; const auto And = "&&"; const auto Or = "||"; const auto Equal = "=="; const auto NotEqual = "!="; const auto Greater = ">"; const auto GreaterEqual = ">="; const auto LessThan = "<"; const auto LessThanEqual = "<="; }
24.444444
36
0.545455
5ee19acb134627898d57ead50da835932c9c36b2
10,624
asm
Assembly
dino/lcs/123p/10.asm
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
a4a0c86c200241494b3f1834cd0aef8dc02f7683
[ "Apache-2.0" ]
6
2020-10-14T15:29:10.000Z
2022-02-12T18:58:54.000Z
dino/lcs/123p/10.asm
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
a4a0c86c200241494b3f1834cd0aef8dc02f7683
[ "Apache-2.0" ]
null
null
null
dino/lcs/123p/10.asm
zengfr/arcade_game_romhacking_sourcecode_top_secret_data
a4a0c86c200241494b3f1834cd0aef8dc02f7683
[ "Apache-2.0" ]
1
2020-12-17T08:59:10.000Z
2020-12-17T08:59:10.000Z
copyright zengfr site:http://github.com/zengfr/romhack 00042A move.l D1, (A0)+ 00042C dbra D0, $42a 001036 move.w ($10,A0), D2 [123p+ 8] 00103A moveq #$0, D0 [123p+ 10] 001702 add.w ($10,A6), D1 [123p+ C, enemy+ C, item+ C] 001706 tst.b ($4dc,A5) [123p+ 10, enemy+10, item+10] 0018DA add.l D0, ($10,A6) 0018DE rts [123p+ 10, 123p+ 12, base+74C, enemy+10, enemy+12, etc+10, etc+12, item+10, item+12] 001922 move.w ($10,A0), D1 [123p+ 8] 001926 sub.w ($8,A6), D0 [123p+ 10] 001930 sub.w ($10,A6), D1 001934 bcc $193a [123p+ 10, enemy+10] 0049DA move.w ($10,A6), -(A4) 0049DE move.w A4, ($67c2,A5) [123p+ 10, enemy+10, etc+10, item+10] 004D94 move.l D1, (A1)+ 004D96 dbra D0, $4d94 004E50 move.w (A0)+, ($10,A6) [123p+ C] 004E54 rts [123p+ 10] 004FEE move.w ($10,A6), D0 [123p+ 8] 004FF2 add.w ($54,A6), D0 [123p+ 10] 005006 sub.w D0, ($10,A6) 00500A rts [123p+ 10] 005B00 sub.w ($10,A6), D0 005B04 move.w (A2)+, D1 [123p+ 10] 005B94 move.w ($10,A6), D2 005B98 sub.w ($10,A1), D2 [123p+ 10] 00628C move.w ($10,A6), D0 006290 sub.w ($10,A1), D0 [123p+ 10] 006354 move.w D0, ($10,A6) [123p+ 54] 006358 jsr $12cac.l [123p+ 10] 00636A add.w D0, ($10,A6) 00636E rts [123p+ 10] 0067C8 move.w ($10,A6), D0 0067CC sub.w ($10,A0), D0 [123p+ 10] 0067D0 bcs $67e8 [123p+ 10] 006848 move.w ($10,A6), D0 00684C sub.w ($10,A0), D0 [123p+ 10] 006850 bcs $6866 [123p+ 10] 0068BE move.w ($10,A6), ($10,A0) [123p+ C] 0068C4 subq.w #1, ($10,A0) [123p+ 10] 0068C8 move.w A6, ($70,A0) [123p+ 10] 006986 move.w ($10,A0), ($10,A6) [123p+ C] 00698C subq.w #1, ($10,A6) [123p+ 10] 006990 or.w D0, D0 [123p+ 10] 010720 move.w ($10,A2), D1 010724 sub.w ($10,A3), D1 [123p+ 10] 010728 add.w (-$38,PC,D0.w), D1 [123p+ 10] 010E72 cmp.w ($10,A3), D0 [item+10] 010E76 bne $10f94 [123p+ 10] 0127AC move.w ($10,A2), D2 0127B0 move.w ($10,A3), D3 [123p+ 10, enemy+10, item+10] 0127B4 cmp.w D2, D3 [123p+ 10, enemy+10, etc+10, item+10] 012874 move.w ($10,A2), D2 012878 move.w ($10,A3), D3 [123p+ 10] 012932 move.w ($10,A2), D0 012936 add.w (A4)+, D0 [123p+ 10, enemy+10, item+10] 012938 move.w ($10,A3), D1 01293C add.w (A6)+, D1 [123p+ 10, enemy+10, etc+10, item+10] 0129CA move.w ($10,A2), D0 0129CE add.w (A4), D0 [123p+ 10] 012A82 move.w ($10,A3), D1 012A86 add.w (A6), D1 [123p+ 10, enemy+10] 012EC6 sub.w ($10,A6), D0 012ECA move.w (A2)+, D1 [123p+ 10, enemy+10] 012F1A cmp.w ($10,A6), D1 012F1E bcc $12f2c [123p+ 10] 012F22 sub.w ($10,A6), D4 012F26 move.w D4, D6 [123p+ 10] 012F2C sub.w ($10,A6), D0 012F30 move.w D0, D4 [123p+ 10] 012FAC add.w D4, ($10,A6) 012FB0 rts [123p+ 10, enemy+10] 0130A0 move.w ($10,A6), D1 [123p+ 8, enemy+ 8, item+ 8] 0130A4 add.w ($54,A6), D1 [123p+ 10, enemy+10, item+10] 013180 add.w D1, ($10,A6) 013184 move.b ($f,A0), ($50,A6) [123p+ 10, enemy+10, etc+10, item+10] 013198 sub.w D1, ($10,A6) 01319C move.b ($f,A0), ($50,A6) [123p+ 10, enemy+10, item+10] 013222 add.w D0, ($10,A6) 013226 move.b ($f,A0), ($50,A6) [123p+ 10, enemy+10, item+10] 013256 sub.w D0, ($10,A6) 01325A move.b ($f,A0), ($50,A6) [123p+ 10, enemy+10, item+10] 01330C sub.w D1, ($10,A6) 013310 tst.w ($a,A0) [123p+ 10, enemy+10] 013374 add.w D1, ($10,A6) 013378 tst.w ($a,A0) [123p+ 10, enemy+10] 013492 sub.w D1, ($10,A6) 013496 move.b ($f,A0), ($50,A6) [123p+ 10, enemy+10] 01362E add.w ($10,A6), D1 [123p+ C] 013632 move.w ($8,A6), D0 [123p+ 10] 014260 add.w ($10,A0), D5 [123p+ C, enemy+ C, etc+ C, item+ C] 014264 btst #$7, ($25,A0) [123p+ 10, enemy+10, etc+10, item+10] 014F10 add.w ($10,A0), D1 014F14 sub.w ($69b8,A5), D1 [123p+ 10, enemy+10, item+10] 018B6E move.w ($748,A5), ($10,A6) [123p+ 8] 018B74 tst.b ($4dc,A5) [123p+ 10] 018B78 beq $18b80 018B80 jsr $12d4e.l [123p+ 10] 01D51E move.w ($10,A0), ($10,A6) [123p+ C] 01D524 move.w (A1)+, D0 [123p+ 10] 01DF44 sub.w ($10,A6), D2 [123p+ DE] 01DF48 bcs $1df4e [123p+ 10] 01DF7E move.w ($10,A6), D0 01DF82 sub.w ($de,A6), D0 [123p+ 10] 01E33C sub.w ($10,A6), D2 [123p+ DE] 01E340 bcs $1e346 [123p+ 10] 01E36A move.w ($10,A6), D0 01E36E sub.w ($de,A6), D0 [123p+ 10] 020B02 add.w ($10,A0), D4 [123p+ 54] 020B06 cmp.w D4, D2 [123p+ 10] 0320DA move.w ($3284,A5), D3 0320DE sub.w ($10,A6), D3 [123p+ 10] 032102 move.w ($3404,A5), D3 032106 sub.w ($10,A6), D3 [123p+ 10] 03212A move.w ($3584,A5), D3 03212E sub.w ($10,A6), D3 [123p+ 10] 032964 move.w ($10,A4), D4 032968 moveq #$3, D1 [123p+ 10] 032A60 move.w ($10,A0), D2 [123p+ 8] 032A64 jsr $103a.l [123p+ 10] 032A90 move.w ($10,A0), D2 [123p+ 8] 032A94 cmp.w ($8,A6), D1 [123p+ 10] 032B70 move.w ($10,A0), D2 [123p+ 8] 032B74 addi.w #$400, D1 [123p+ 10] 032C9C move.w ($10,A0), D2 [123p+ 8] 032CA0 add.w ($4e,PC,D0.w), D1 [123p+ 10] 033BDA sub.w ($10,A0), D1 [enemy+10] 033BDE addi.w #$c, D1 [123p+ 10] 0351A6 sub.w ($10,A0), D0 [enemy+10] 0351AA bcc $351b0 [123p+ 10] 0351B0 move.w ($10,A0), D0 0351B4 add.w D2, D0 [123p+ 10] 0351F6 add.w ($10,A0), D2 [123p+ 8] 0351FA move.w D1, ($88,A6) [123p+ 10] 03527E add.w ($10,A0), D2 [123p+ 8] 035282 move.w D1, ($88,A6) [123p+ 10] 0352C8 add.w ($10,A0), D2 [123p+ 8] 0352CC move.w D1, ($88,A6) [123p+ 10] 03548E move.w ($10,A0), D2 [123p+ 8] 035492 jsr $103a.l [123p+ 10] 035542 sub.w ($10,A0), D1 [enemy+10] 035546 addi.w #$5, D1 [123p+ 10] 0355A0 move.w ($10,A0), D1 0355A4 sub.w ($10,A6), D1 [123p+ 10] 035664 move.w ($10,A0), D2 [123p+ 8] 035668 move.w D1, ($88,A6) [123p+ 10] 03573E move.w ($10,A0), D1 035742 sub.w ($10,A6), D1 [123p+ 10] 0362B4 move.w ($10,A0), D0 0362B8 addi.w #$7, D0 [123p+ 10] 03BA60 sub.w ($10,A0), D1 [enemy+10] 03BA64 addi.w #$c, D1 [123p+ 10] 03CBDA add.w ($10,A0), D2 [123p+ 8] 03CBDE move.w D1, ($88,A6) [123p+ 10] 03CC34 move.w ($10,A0), D2 [123p+ 8] 03CC38 bsr $3ce4c [123p+ 10] 03CCA8 add.w ($10,A0), D2 [123p+ 8] 03CCAC move.w D1, ($88,A6) [123p+ 10] 03CCE0 move.w ($10,A0), D2 [123p+ 8] 03CCE4 move.w D1, ($88,A6) [123p+ 10] 03CDC4 move.w ($10,A0), D2 [123p+ 8] 03CDC8 move.w D1, ($88,A6) [123p+ 10] 03E45E move.w ($10,A0), D0 03E462 addi.w #$7, D0 [123p+ 10] 03E490 move.w ($10,A0), D0 03E494 sub.w ($10,A6), D0 [123p+ 10] 03E9F8 move.w ($10,A0), D0 03E9FC addi.w #$7, D0 [123p+ 10] 04085E move.w ($10,A0), D0 [enemy+76] 040862 addi.w #$9, D0 [123p+ 10] 0408A6 move.w ($10,A0), D0 0408AA addq.w #7, D0 [123p+ 10] 040F34 move.w ($10,A0), D0 040F38 addi.w #$9, D0 [123p+ 10] 04234A move.w D0, ($10,A4) 04234E rts [123p+ 10] 0432A4 sub.w ($10,A0), D2 [enemy+10] 0432A8 moveq #$38, D3 [123p+ 10] 0432B2 sub.w ($10,A0), D2 [enemy+10] 0432B6 bcs $432c6 [123p+ 10] 04497C move.w ($10,A0), D2 [123p+ 8] 044980 move.w D1, ($88,A6) [123p+ 10] 044BE4 move.w ($10,A0), D2 [123p+ 8] 044BE8 move.w D1, ($88,A6) [123p+ 10] 044E32 move.w ($10,A0), D1 044E36 sub.w ($10,A6), D1 [123p+ 10] 044E9A move.w ($10,A0), D1 044E9E sub.w ($10,A6), D1 [123p+ 10] 04661E move.w ($10,A0), D0 [enemy+88] 046622 addq.w #4, D0 [123p+ 10] 046A98 sub.w ($10,A0), D0 [enemy+10] 046A9C bcc $46aa2 [123p+ 10] 046AA2 move.w ($10,A0), D0 046AA6 add.w D2, D0 [123p+ 10] 046AD0 add.w ($10,A0), D2 [123p+ 8] 046AD4 move.w D1, ($88,A6) [123p+ 10] 046BB4 add.w ($10,A0), D2 [123p+ 8] 046BB8 move.w D1, ($88,A6) [123p+ 10] 046C08 move.w ($10,A0), D0 046C0C sub.w ($10,A6), D0 [123p+ 10] 046C56 move.w ($10,A0), D0 046C5A move.w D0, D1 [123p+ 10] 046DFC add.w ($10,A0), D2 [123p+ 8] 046E00 move.w D1, ($88,A6) [123p+ 10] 0471B8 move.w ($10,A0), D1 0471BC sub.w ($10,A6), D1 [123p+ 10] 049184 move.w ($10,A0), D0 049188 sub.w ($10,A6), D0 [123p+ 10] 04924E move.w ($10,A0), D0 049252 sub.w ($10,A6), D0 [123p+ 10, enemy+10] 0492EC move.w ($10,A0), D0 0492F0 sub.w ($10,A6), D0 [123p+ 10, enemy+10] 04EAF4 move.w ($10,A0), D2 [123p+ 8] 04EAF8 move.w D1, ($88,A6) [123p+ 10] 04F240 move.w ($10,A0), D0 04F244 sub.w ($10,A6), D0 [123p+ 10] 04F308 move.w ($10,A0), D0 04F30C sub.w ($10,A6), D0 [123p+ 10, enemy+10] 0537F4 move.w ($10,A0), D0 0537F8 sub.w ($10,A6), D0 [123p+ 10] 05F3C0 move.w ($3584,A5), D0 05F3C4 sub.w ($10,A6), D0 [123p+ 10] 05FFFE move.w ($3284,A5), D0 060002 sub.w ($10,A6), D0 [123p+ 10] 060032 move.w ($3404,A5), D0 060036 sub.w ($10,A6), D0 [123p+ 10] 060066 move.w ($3584,A5), D0 06006A sub.w ($10,A6), D0 [123p+ 10] 08C624 move.w D2, ($3284,A5) [123p+ C] 08C628 move.w D0, ($33fc,A5) [123p+ 10] 08C630 move.w D2, ($3404,A5) [123p+ C] 08C634 move.w D0, ($357c,A5) [123p+ 10] 08C63C move.w D2, ($3584,A5) [123p+ C] 08C640 rts [123p+ 10] 0AAACA move.l (A0), D2 0AAACC move.w D0, (A0) [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1] 0AAACE move.w D0, ($2,A0) 0AAAD2 cmp.l (A0), D0 0AAAD4 bne $aaafc 0AAAD8 move.l D2, (A0)+ 0AAADA cmpa.l A0, A1 [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1] 0AAAE6 move.l (A0), D2 0AAAE8 move.w D0, (A0) [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1] 0AAAF4 move.l D2, (A0)+ 0AAAF6 cmpa.l A0, A1 [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1] copyright zengfr site:http://github.com/zengfr/romhack
42.496
350
0.585279
b148e6991920f8cbbbce05c3e2e53d2c544e7140
4,452
css
CSS
assets/css/halaman_utama/halaman_utama.css
aldenaoktavian/futsalyuk
0fdfecc82b5760a40ee000ba346a9e593223e19c
[ "MIT" ]
null
null
null
assets/css/halaman_utama/halaman_utama.css
aldenaoktavian/futsalyuk
0fdfecc82b5760a40ee000ba346a9e593223e19c
[ "MIT" ]
null
null
null
assets/css/halaman_utama/halaman_utama.css
aldenaoktavian/futsalyuk
0fdfecc82b5760a40ee000ba346a9e593223e19c
[ "MIT" ]
null
null
null
.hero-img { height: 500px; background-position: center; background-size: cover; background-repeat: no-repeat; } .search-box-wrapper { padding: 25px; } .btn-book { text-align: center; background-color: #1ebab8; border-radius: 80px 0 0 0; font-weight: 600; font-size: 15px; color: #fff; -webkit-box-shadow: 0px 0px 27px -2px rgb(196, 196, 173); -moz-box-shadow: 0px 0px 27px -2px rgb(196, 196, 173); box-shadow: 0px 0px 27px -2px rgb(196, 196, 173); cursor: pointer; } .btn-book:hover { background-color: #35adac; } .btn-comm { text-align: center; background-color: #064a4b; border-radius: 0 80px 0 0; font-weight: 600; font-size: 15px; color: #fff; -webkit-box-shadow: 0px 0px 27px -2px rgb(196, 196, 173); -moz-box-shadow: 0px 0px 27px -2px rgb(196, 196, 173); box-shadow: 0px 0px 27px -2px rgb(196, 196, 173); cursor: pointer; } .btn-comm:hover { background-color: #073132; } .box-form { /* background-color: rgba(30, 184, 182, 0.7); */ border-radius: 0 0 150px 150px; -webkit-box-shadow: 0px 0px 27px -2px rgb(196, 196, 173); -moz-box-shadow: 0px 0px 27px -2px rgb(196, 196, 173); box-shadow: 0px 0px 27px -2px rgb(196, 196, 173); background: rgba(31,160,141,1); background: -moz-linear-gradient(left, rgba(31,160,141,1) 0%, rgba(31,160,141,0.85) 29%, rgba(31,160,141,0.74) 49%, rgba(43,186,160,0.74) 50%, rgba(43,186,160,0.47) 100%); background: -webkit-gradient(left top, right top, color-stop(0%, rgba(31,160,141,1)), color-stop(29%, rgba(31,160,141,0.85)), color-stop(49%, rgba(31,160,141,0.74)), color-stop(50%, rgba(43,186,160,0.74)), color-stop(100%, rgba(43,186,160,0.47))); background: -webkit-linear-gradient(left, rgba(31,160,141,1) 0%, rgba(31,160,141,0.85) 29%, rgba(31,160,141,0.74) 49%, rgba(43,186,160,0.74) 50%, rgba(43,186,160,0.47) 100%); background: -o-linear-gradient(left, rgba(31,160,141,1) 0%, rgba(31,160,141,0.85) 29%, rgba(31,160,141,0.74) 49%, rgba(43,186,160,0.74) 50%, rgba(43,186,160,0.47) 100%); background: -ms-linear-gradient(left, rgba(31,160,141,1) 0%, rgba(31,160,141,0.85) 29%, rgba(31,160,141,0.74) 49%, rgba(43,186,160,0.74) 50%, rgba(43,186,160,0.47) 100%); background: linear-gradient(to right, rgba(31,160,141,1) 0%, rgba(31,160,141,0.85) 29%, rgba(31,160,141,0.74) 49%, rgba(43,186,160,0.74) 50%, rgba(43,186,160,0.47) 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1fa08d', endColorstr='#2bbaa0', GradientType=1 ); } .btn-box { width: 60%; text-align: center; padding-top: 10px; padding-bottom: 10px; border-radius: 10px 10px 50px 50px; border: none; background-color: #99e3e3; color: #064a4b; } .box-form .dropdown-toggle, .box-form input { background-color: rgba(255, 255, 255, 0.9) !important; box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.15); border: 0px !important; height: 48px; font-size: 16px; font-weight: 300; padding-left: 46px; padding-right: 20px; text-transform: inherit; } /*utilities */ .u-mt20 { margin-top: 20px; } /*wrapper feature */ .wrapper-feature { background-color: #cef1f0; } .box-feature { background-color: #9be2e3; padding: 20px; border-radius: 90px; margin-left: 5px; margin-right: 5px; } .box-feature img { width: 98px; } @media (max-width: 728px) { .box-feature img { width: 50px; } } @media (max-width: 920px) { .box-feature img { width: 50px; } } .feature-desc { background: #3ec7c7; padding-left: 50px; padding-right: 50px; padding-top: 20px; padding-bottom: 30px; border-radius: 60px; } .wrapper-email { background-color: #9be2e3; } .btn-email { border: none !important; margin-top: 4px; } .wrapper-seo { background-color: #5bcfcf; background-size: cover; background-position: bottom; background-repeat: no-repeat; } .wrapper-seo p { line-height: 15px; } /* .wrapper-footer { height: 350px; background-color: #5bcfcf; background-size: cover; background-position: bottom; position: relative; } .icon-hp{ width: 250px; position: absolute; bottom: 0; left: 50%; margin-left: -125px } */ /*footer section */ /* .footer-top { background-color: #169494 !important; } .footer-bottom { background-color: #064a4b !important; } */
25.734104
251
0.627808
7f65ad45f001dc2e281c14b2ce89ef9a99fdcb25
7,327
go
Go
server/welcomebot.go
mattermost/mattermost-plugin-welcomebot
f122372f97a3a8f0615d5054dda3196e7c62a048
[ "Apache-2.0" ]
45
2018-09-15T12:34:37.000Z
2022-03-16T08:20:12.000Z
server/welcomebot.go
mattermost/mattermost-plugin-welcomebot
f122372f97a3a8f0615d5054dda3196e7c62a048
[ "Apache-2.0" ]
67
2018-10-23T17:52:24.000Z
2022-03-14T11:01:46.000Z
server/welcomebot.go
mattermost/mattermost-plugin-welcomebot
f122372f97a3a8f0615d5054dda3196e7c62a048
[ "Apache-2.0" ]
39
2018-10-18T08:09:00.000Z
2022-01-24T05:22:26.000Z
package main import ( "bytes" "fmt" "html/template" "strings" "time" "github.com/mattermost/mattermost-server/v6/model" ) func (p *Plugin) constructMessageTemplate(userID, teamID string) *MessageTemplate { data := &MessageTemplate{} var err *model.AppError if len(userID) > 0 { if data.User, err = p.API.GetUser(userID); err != nil { p.API.LogError("failed to query user", "user_id", userID) return nil } } if len(teamID) > 0 { if data.Team, err = p.API.GetTeam(teamID); err != nil { p.API.LogError("failed to query team", "team_id", teamID) return nil } } if data.Townsquare, err = p.API.GetChannelByName(teamID, "town-square", false); err != nil { p.API.LogError("failed to query town-square", "team_id", teamID) return nil } if data.User != nil { if data.DirectMessage, err = p.API.GetDirectChannel(userID, p.botUserID); err != nil { p.API.LogError("failed to query direct message channel", "user_id", userID) return nil } } data.UserDisplayName = data.User.GetDisplayName(model.ShowNicknameFullName) return data } func (p *Plugin) getSiteURL() string { siteURL := "http://localhost:8065" config := p.API.GetConfig() if config == nil || config.ServiceSettings.SiteURL == nil || len(*config.ServiceSettings.SiteURL) == 0 { return siteURL } return *config.ServiceSettings.SiteURL } func (p *Plugin) newSampleMessageTemplate(teamName string, userID string) (*MessageTemplate, error) { data := &MessageTemplate{} var err *model.AppError if data.User, err = p.API.GetUser(userID); err != nil { p.API.LogError("failed to query user", "user_id", userID, "err", err) return nil, fmt.Errorf("failed to query user %s: %w", userID, err) } if data.Team, err = p.API.GetTeamByName(strings.ToLower(teamName)); err != nil { p.API.LogError("failed to query team", "team_name", teamName, "err", err) return nil, fmt.Errorf("failed to query team %s: %w", teamName, err) } if data.Townsquare, err = p.API.GetChannelByName(data.Team.Id, "town-square", false); err != nil { p.API.LogError("failed to query town-square", "team_name", data.Team.Name) return nil, fmt.Errorf("failed to query town-square %s: %w", data.Team.Name, err) } if data.DirectMessage, err = p.API.GetDirectChannel(data.User.Id, p.botUserID); err != nil { p.API.LogError("failed to query direct message channel", "user_name", data.User.Username) return nil, fmt.Errorf("failed to query direct message channel %s: %w", data.User.Id, err) } data.UserDisplayName = data.User.GetDisplayName(model.ShowNicknameFullName) return data, nil } func (p *Plugin) previewWelcomeMessage(teamName string, args *model.CommandArgs, configMessage ConfigMessage) error { messageTemplate, err := p.newSampleMessageTemplate(teamName, args.UserId) if err != nil { return err } post := p.renderWelcomeMessage(*messageTemplate, configMessage) post.ChannelId = args.ChannelId _ = p.API.SendEphemeralPost(args.UserId, post) return nil } func (p *Plugin) renderWelcomeMessage(messageTemplate MessageTemplate, configMessage ConfigMessage) *model.Post { actionButtons := make([]*model.PostAction, 0) for _, configAction := range configMessage.Actions { if configAction.ActionType == actionTypeAutomatic { action := &Action{} action.UserID = messageTemplate.User.Id action.Context = &ActionContext{} action.Context.TeamID = messageTemplate.Team.Id action.Context.UserID = messageTemplate.User.Id action.Context.Action = "automatic" for _, channelName := range configAction.ChannelsAddedTo { p.joinChannel(action, channelName) } } if configAction.ActionType == actionTypeButton { actionButton := &model.PostAction{ Name: configAction.ActionDisplayName, Integration: &model.PostActionIntegration{ Context: map[string]interface{}{ "action": configAction.ActionName, "team_id": messageTemplate.Team.Id, "user_id": messageTemplate.User.Id, }, URL: fmt.Sprintf("%v/plugins/%v/addchannels", p.getSiteURL(), manifest.ID), }, } actionButtons = append(actionButtons, actionButton) } } tmpMsg, _ := template.New("Response").Parse(strings.Join(configMessage.Message, "\n")) var message bytes.Buffer err := tmpMsg.Execute(&message, messageTemplate) if err != nil { p.API.LogError( "Failed to execute message template", "err", err.Error(), ) } post := &model.Post{ Message: message.String(), UserId: p.botUserID, } if len(configMessage.AttachmentMessage) > 0 || len(actionButtons) > 0 { tmpAtch, _ := template.New("AttachmentResponse").Parse(strings.Join(configMessage.AttachmentMessage, "\n")) var attachMessage bytes.Buffer err := tmpAtch.Execute(&attachMessage, messageTemplate) if err != nil { p.API.LogError( "Failed to execute message template", "err", err.Error(), ) } sa1 := &model.SlackAttachment{ Text: attachMessage.String(), } if len(actionButtons) > 0 { sa1.Actions = actionButtons } attachments := make([]*model.SlackAttachment, 0) attachments = append(attachments, sa1) post.Props = map[string]interface{}{ "attachments": attachments, } } return post } func (p *Plugin) processWelcomeMessage(messageTemplate MessageTemplate, configMessage ConfigMessage) { time.Sleep(time.Second * time.Duration(configMessage.DelayInSeconds)) siteURL := p.getSiteURL() if strings.Contains(siteURL, "localhost") || strings.Contains(siteURL, "127.0.0.1") { p.API.LogWarn(`Site url is set to localhost or 127.0.0.1. For this to work properly you must also set "AllowedUntrustedInternalConnections": "127.0.0.1" in config.json`) } post := p.renderWelcomeMessage(messageTemplate, configMessage) post.ChannelId = messageTemplate.DirectMessage.Id if _, err := p.API.CreatePost(post); err != nil { p.API.LogError( "We could not create the response post", "user_id", post.UserId, "err", err.Error(), ) } } func (p *Plugin) processActionMessage(messageTemplate MessageTemplate, action *Action, configMessageAction ConfigMessageAction) { for _, channelName := range configMessageAction.ChannelsAddedTo { p.joinChannel(action, channelName) } tmpMsg, _ := template.New("Response").Parse(strings.Join(configMessageAction.ActionSuccessfulMessage, "\n")) var message bytes.Buffer err := tmpMsg.Execute(&message, messageTemplate) if err != nil { p.API.LogError( "Failed to execute message template", "err", err.Error(), ) } post := &model.Post{ Message: message.String(), ChannelId: messageTemplate.DirectMessage.Id, UserId: p.botUserID, } if _, err := p.API.CreatePost(post); err != nil { p.API.LogError( "We could not create the response post", "user_id", post.UserId, "err", err.Error(), ) } } func (p *Plugin) joinChannel(action *Action, channelName string) { if channel, err := p.API.GetChannelByName(action.Context.TeamID, channelName, false); err == nil { if _, err := p.API.AddChannelMember(channel.Id, action.Context.UserID); err != nil { p.API.LogError("Couldn't add user to the channel, continuing to next channel", "user_id", action.Context.UserID, "channel_id", channel.Id) return } } else { p.API.LogError("failed to get channel, continuing to the next channel", "channel_name", channelName, "user_id", action.Context.UserID) } }
30.529167
172
0.706155
3eea2d94177df6bbfa5eb50403832bda38c5fe7a
1,451
h
C
die-tk/components/ImageCanvas.h
thinlizzy/die-tk
eba597d9453318b03e44f15753323be80ecb3a4e
[ "Artistic-2.0" ]
11
2015-11-06T01:35:35.000Z
2021-05-01T18:34:50.000Z
die-tk/components/ImageCanvas.h
thinlizzy/die-tk
eba597d9453318b03e44f15753323be80ecb3a4e
[ "Artistic-2.0" ]
null
null
null
die-tk/components/ImageCanvas.h
thinlizzy/die-tk
eba597d9453318b03e44f15753323be80ecb3a4e
[ "Artistic-2.0" ]
2
2017-07-06T16:05:51.000Z
2019-07-04T01:17:15.000Z
#ifndef IMAGE_CANVAS_H_DIE_TK_2019_06_25 #define IMAGE_CANVAS_H_DIE_TK_2019_06_25 #include "../Canvas.h" #include "Image.h" namespace tk { class ImageCanvas: public Canvas { public: static std::shared_ptr<ImageCanvas> create(tk::WDims dims, bool transparent = false); void translate(Point p) override; void clearTranslate() override; void addClipRect(Rect const & openrect) override; void clearClipping() override; void plot(Point p, RGBColor const & color) override; void drawLine(Point p1, Point p2, Pen const & pen) override; void drawPoly(Points const & polygon, Pen const & pen) override; void rectangle(Rect const & rect, Pen const & pen) override; void fillRect(Rect const & openrect, Brush const & brush) override; void roundRect(Rect const & openrect, WDims ellipseDims, Pen const & pen, Brush const & brush) override; void drawText(Point p, NativeString const & text, RGBColor const & color) override; void drawText(Point p, NativeString const & text, RGBColor const & textColor, RGBColor const & backgroundColor) override; void textRect(Rect const & openrect, NativeString const & text, TextParams const & params = TextParams()) override; WDims measureText(NativeString const & text) override; // should be the last method to be called. calling any other methods, including this one after that is UB virtual tk::image::Ptr finishAndCreateImage() = 0; private: virtual tk::Canvas & imageCanvas() = 0; }; } #endif
36.275
122
0.757409
d2b04ea538b7f5546dde4a1f3f4cb4ac8d3d18e3
1,805
php
PHP
app/Http/Controllers/UserController.php
jakir12/CAMStest
312743e0906e02dd8a440d039ee72b3cb6de4fdf
[ "MIT" ]
null
null
null
app/Http/Controllers/UserController.php
jakir12/CAMStest
312743e0906e02dd8a440d039ee72b3cb6de4fdf
[ "MIT" ]
null
null
null
app/Http/Controllers/UserController.php
jakir12/CAMStest
312743e0906e02dd8a440d039ee72b3cb6de4fdf
[ "MIT" ]
null
null
null
<?php namespace App\Http\Controllers; use Illuminate\Support\Facades\Auth; use Illuminate\Foundation\Auth\AuthenticatesUsers; use Illuminate\Http\Request; use App\User; use Session; use DB; class UserController extends Controller { public function index(){ $user_type = Auth::user()->user_type; $id = Auth::user()->id; if($user_type == '1'){ $userList = User::all(); }else{ $userList = User::where('id', '=', $id)->get(); } return view('users.user_list',['userList' => $userList]); } public function create(){ return view('users.add_user'); } /** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(Request $request){ $user_info = new User(); $user_info->name = $request->name; $email = $user_info->email = $request->email; $user_info->mobile = $request->mobile; $password = $request->password; $confirm_password = $request->confirm_password; if($password == $confirm_password){ $user_info->password = bcrypt($password); $user_info->user_type = $request->user_type; $value = User::where('email', '=', $email)->first(); if ($value === null) { $user_info->save(); return redirect('/add-user')->with('successMsg', 'Save Successfully.'); }else{ return redirect('/add-user')->with('errorMsg', 'Sorry Duplicate entry.'); } } else { return redirect('/add-user')->with('errorMsg', 'Sorry Password Not Matching.'); } } }
26.940299
92
0.547368
fb5e34f8d54ff27ad075a4171986e9120a1e6349
5,142
c
C
third_party/NordicSemiconductor/drivers/radio/mac_features/nrf_802154_delayed_trx.c
e-rk/openthread
e18877210ac9a74f93786c74ae654233928c2b0c
[ "BSD-3-Clause" ]
1
2017-03-16T08:34:21.000Z
2017-03-16T08:34:21.000Z
third_party/NordicSemiconductor/drivers/radio/mac_features/nrf_802154_delayed_trx.c
e-rk/openthread
e18877210ac9a74f93786c74ae654233928c2b0c
[ "BSD-3-Clause" ]
2
2017-03-23T07:47:54.000Z
2017-08-21T03:12:31.000Z
third_party/NordicSemiconductor/drivers/radio/mac_features/nrf_802154_delayed_trx.c
e-rk/openthread
e18877210ac9a74f93786c74ae654233928c2b0c
[ "BSD-3-Clause" ]
3
2018-03-14T10:33:34.000Z
2018-09-11T11:04:21.000Z
/* Copyright (c) 2018, Nordic Semiconductor ASA * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * 3. Neither the name of Nordic Semiconductor ASA nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ /** * @file * This file implements delayed transmission and reception features. * */ #include "nrf_802154_delayed_trx.h" #include <assert.h> #include <stdbool.h> #include <stdint.h> #include "nrf_802154_config.h" #include "nrf_802154_const.h" #include "nrf_802154_notification.h" #include "nrf_802154_pib.h" #include "nrf_802154_procedures_duration.h" #include "nrf_802154_request.h" #include "nrf_802154_rsch.h" #define TX_SETUP_TIME 190 ///< Time [us] needed to change channel, stop rx and setup tx procedure. static const uint8_t * mp_tx_psdu; ///< Pointer to PHR + PSDU of the frame requested to transmit. static bool m_tx_cca; ///< If CCA should be performed prior to transmission. static uint8_t m_tx_channel; ///< Channel number on which transmission should be performed. /** * Check if delayed transmission procedure is in progress. * * @retval true Delayed transmission is in progress (waiting or transmitting). * @retval false Delayed transmission is not in progress. */ static bool tx_is_in_progress(void) { return mp_tx_psdu != NULL; } /** * Mark that delayed transmission procedure has stopped. */ static void tx_stop(void) { mp_tx_psdu = NULL; } /** * Notify MAC layer that requested timeslot is not granted if tx request failed. * * @param[in] result Result of TX request. */ static void notify_tx_timeslot_denied(bool result) { if (!result) { nrf_802154_notify_transmit_failed(mp_tx_psdu, NRF_802154_TX_ERROR_TIMESLOT_DENIED); } } bool nrf_802154_delayed_trx_transmit(const uint8_t * p_data, bool cca, uint32_t t0, uint32_t dt, uint8_t channel) { bool result = true; uint16_t timeslot_length; if (tx_is_in_progress()) { result = false; } if (result) { dt -= TX_SETUP_TIME; dt -= TX_RAMP_UP_TIME; if (cca) { dt -= nrf_802154_cca_before_tx_duration_get(); } mp_tx_psdu = p_data; m_tx_cca = cca; m_tx_channel = channel; timeslot_length = nrf_802154_tx_duration_get(p_data[0], cca, p_data[ACK_REQUEST_OFFSET] & ACK_REQUEST_BIT); result = nrf_802154_rsch_delayed_timeslot_request(t0, dt, timeslot_length); if (!result) { notify_tx_timeslot_denied(result); tx_stop(); } } return result; } void nrf_802154_rsch_delayed_timeslot_started(void) { bool result; assert(tx_is_in_progress()); nrf_802154_pib_channel_set(m_tx_channel); result = nrf_802154_request_channel_update(); if (result) { result = nrf_802154_request_transmit(NRF_802154_TERM_802154, REQ_ORIG_DELAYED_TRX, mp_tx_psdu, m_tx_cca, true, notify_tx_timeslot_denied); (void)result; } else { notify_tx_timeslot_denied(result); } tx_stop(); } void nrf_802154_rsch_delayed_timeslot_failed(void) { assert(tx_is_in_progress()); notify_tx_timeslot_denied(false); tx_stop(); }
30.607143
100
0.640218
187b01f12b3c2802bfdab4c9b237159429526936
124
rb
Ruby
lib/rssbridge/bridge/amiami/version.rb
Quintasan/rssbridge-bridge-amiami
1b6ee8f702231fcb1472979bb486d5eedd4c0258
[ "MIT" ]
null
null
null
lib/rssbridge/bridge/amiami/version.rb
Quintasan/rssbridge-bridge-amiami
1b6ee8f702231fcb1472979bb486d5eedd4c0258
[ "MIT" ]
null
null
null
lib/rssbridge/bridge/amiami/version.rb
Quintasan/rssbridge-bridge-amiami
1b6ee8f702231fcb1472979bb486d5eedd4c0258
[ "MIT" ]
null
null
null
# frozen_string_literal: true module Rssbridge module Bridge module Amiami VERSION = "0.1.0" end end end
12.4
29
0.669355
dddfda912c14f14dc140eb92d7037bcc5839dc59
1,596
php
PHP
routes/api.php
Maikell10/Demo-Store
34f6e82e967e9c29424746185b5877286bb59d0c
[ "MIT" ]
null
null
null
routes/api.php
Maikell10/Demo-Store
34f6e82e967e9c29424746185b5877286bb59d0c
[ "MIT" ]
null
null
null
routes/api.php
Maikell10/Demo-Store
34f6e82e967e9c29424746185b5877286bb59d0c
[ "MIT" ]
null
null
null
<?php use Illuminate\Http\Request; /* |-------------------------------------------------------------------------- | API Routes |-------------------------------------------------------------------------- | | Here is where you can register API routes for your application. These | routes are loaded by the RouteServiceProvider within a group which | is assigned the "api" middleware group. Enjoy building your API! | */ Route::middleware('auth:api')->get('/user', function (Request $request) { return $request->user(); }); Route::apiResource('category','API\CategoryController')->names('api.category'); Route::get('sub-category','API\CategoryController@getSubCategories')->name('api.sub-category'); Route::get('main-category','API\CategoryController@getMainCategories')->name('api.main-category'); Route::apiResource('product','API\ProductController')->names('api.product'); Route::delete('/eliminarImagen/{id}','API\ProductController@eliminarImagen')->name('api.eliminarImagen'); Route::get('/autocomplete', 'API\AutocompleteController@autocomplete')->name('autocomplete'); Route::get('/autocomplete_index', 'API\AutocompleteController@autocomplete_index')->name('autocomplete_index'); // Rating Route::get('rating/new','API\ProductController@setRating')->name('api.setRating'); Route::get('rating/{id}','API\ProductController@getRating')->name('api.getRating'); // AddProduct Shopping Route::get('shopping/add','API\ProductController@fillTable')->name('api.fillTable'); // Edit User-Profile Route::get('profile/edit','Store\ProfileController@updateUser')->name('api.updateUser');
38
111
0.676065
3e3c314d647d6875c786073b79ed880daed7d010
2,363
h
C
src/3rdparty/khtml/src/rendering/RenderSVGHiddenContainer.h
afarcat/QtHtmlView
fff12b6f5c08c2c6db15dd73e4f0b55421827b39
[ "Apache-2.0" ]
null
null
null
src/3rdparty/khtml/src/rendering/RenderSVGHiddenContainer.h
afarcat/QtHtmlView
fff12b6f5c08c2c6db15dd73e4f0b55421827b39
[ "Apache-2.0" ]
null
null
null
src/3rdparty/khtml/src/rendering/RenderSVGHiddenContainer.h
afarcat/QtHtmlView
fff12b6f5c08c2c6db15dd73e4f0b55421827b39
[ "Apache-2.0" ]
null
null
null
/* * This file is part of the WebKit project. * * Copyright (C) 2007 Eric Seidel <eric@webkit.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * */ #ifndef RenderSVGHiddenContainer_h #define RenderSVGHiddenContainer_h #if ENABLE(SVG) #include "RenderSVGContainer.h" namespace WebCore { class SVGStyledElement; // This class is for containers which are never drawn, but do need to support style // <defs>, <linearGradient>, <radialGradient> are all good examples class RenderSVGHiddenContainer : public RenderSVGContainer { public: RenderSVGHiddenContainer(SVGStyledElement *); virtual ~RenderSVGHiddenContainer(); bool isSVGContainer() const override { return true; } bool isSVGHiddenContainer() const override { return true; } const char *renderName() const override { return "RenderSVGHiddenContainer"; } bool requiresLayer() const override; short lineHeight(bool b) const override; short baselinePosition(bool b) const override; void layout() override; void paint(PaintInfo &, int parentX, int parentY) override; IntRect absoluteClippedOverflowRect() override; void absoluteRects(Vector<IntRect> &rects, int tx, int ty, bool topLevel = true) override; AffineTransform absoluteTransform() const override; AffineTransform localTransform() const override; FloatRect relativeBBox(bool includeStroke = true) const override; /*virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, int x, int y, int tx, int ty, HitTestAction);*/ }; } #endif // ENABLE(SVG) #endif // RenderSVGHiddenContainer_h
30.294872
117
0.734236
85de62dc1c161729d9576c3f2fa316d27b8fd208
2,646
h
C
simobject.h
mohawkjohn/bskQtViz
cf54077a82f9674273044a8305069056a3aaf0a0
[ "0BSD" ]
null
null
null
simobject.h
mohawkjohn/bskQtViz
cf54077a82f9674273044a8305069056a3aaf0a0
[ "0BSD" ]
null
null
null
simobject.h
mohawkjohn/bskQtViz
cf54077a82f9674273044a8305069056a3aaf0a0
[ "0BSD" ]
null
null
null
/* ISC License Copyright (c) 2016-2017, Autonomous Vehicle Systems Lab, University of Colorado at Boulder Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef SIMOBJECT_H #define SIMOBJECT_H #include <QString> #include <QVector> #include <QVector3D> #include <QVector4D> #include <QQuaternion> #include "geometry.h" class SimObject { public: SimObject() // class and proporties will be used in adcssimdatamanager.com : name("") , position(QVector3D()) , quaternion(QQuaternion()) , geometryName("") , scaleByParentBoundingRadii(false) , scaleFactor(1.0f) , defaultMaterialOverride(0) , restrictToSceneBoundary(true) {} ~SimObject(); QString name; // Position of the object (km) QVector3D position; // Quaternion describing the orientation of the object QQuaternion quaternion; // Name of geometry to draw for object QString geometryName; // Flag for specifying if object and any children should be scaled by // bounding radii of parent geometry, will not apply if set on top most parent bool scaleByParentBoundingRadii; // Scale factor to apply to scene object and any children float scaleFactor; // Override a mesh's default material (used for UnitLines, UnitSpheres, etc) QSharedPointer<Geometry::MaterialInfo> defaultMaterialOverride; // Parameters to pass to a geometry if its being dynamically updated QSharedPointer<GeometryUpdateParameters> updateParameters; // Determines if object should be scaled and placed at edge of scene bool restrictToSceneBoundary; // Store child objects QVector<SimObject> simObjects; // Computes rotation quaternion from (1, 0, 0) to vector static QQuaternion computeRotation(QVector3D vector); // Computes rotation quaternion that will rotate vector1 to vector2 static QQuaternion computeRotation(QVector3D vector1, QVector3D vector2); }; #endif // SIMOBJECT_H
34.815789
91
0.741497
b2bb1c7a2af64e0803771a48f87683d4a4a1c0d2
50,483
py
Python
cottonformation/res/lookoutmetrics.py
gitter-badger/cottonformation-project
354f1dce7ea106e209af2d5d818b6033a27c193c
[ "BSD-2-Clause" ]
null
null
null
cottonformation/res/lookoutmetrics.py
gitter-badger/cottonformation-project
354f1dce7ea106e209af2d5d818b6033a27c193c
[ "BSD-2-Clause" ]
null
null
null
cottonformation/res/lookoutmetrics.py
gitter-badger/cottonformation-project
354f1dce7ea106e209af2d5d818b6033a27c193c
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ This module """ import attr import typing from ..core.model import ( Property, Resource, Tag, GetAtt, TypeHint, TypeCheck, ) from ..core.constant import AttrMeta #--- Property declaration --- @attr.s class AnomalyDetectorCsvFormatDescriptor(Property): """ AWS Object Type = "AWS::LookoutMetrics::AnomalyDetector.CsvFormatDescriptor" Resource Document: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-csvformatdescriptor.html Property Document: - ``p_Charset``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-csvformatdescriptor.html#cfn-lookoutmetrics-anomalydetector-csvformatdescriptor-charset - ``p_ContainsHeader``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-csvformatdescriptor.html#cfn-lookoutmetrics-anomalydetector-csvformatdescriptor-containsheader - ``p_Delimiter``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-csvformatdescriptor.html#cfn-lookoutmetrics-anomalydetector-csvformatdescriptor-delimiter - ``p_FileCompression``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-csvformatdescriptor.html#cfn-lookoutmetrics-anomalydetector-csvformatdescriptor-filecompression - ``p_HeaderList``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-csvformatdescriptor.html#cfn-lookoutmetrics-anomalydetector-csvformatdescriptor-headerlist - ``p_QuoteSymbol``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-csvformatdescriptor.html#cfn-lookoutmetrics-anomalydetector-csvformatdescriptor-quotesymbol """ AWS_OBJECT_TYPE = "AWS::LookoutMetrics::AnomalyDetector.CsvFormatDescriptor" p_Charset: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.optional(attr.validators.instance_of(TypeCheck.intrinsic_str_type)), metadata={AttrMeta.PROPERTY_NAME: "Charset"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-csvformatdescriptor.html#cfn-lookoutmetrics-anomalydetector-csvformatdescriptor-charset""" p_ContainsHeader: bool = attr.ib( default=None, validator=attr.validators.optional(attr.validators.instance_of(bool)), metadata={AttrMeta.PROPERTY_NAME: "ContainsHeader"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-csvformatdescriptor.html#cfn-lookoutmetrics-anomalydetector-csvformatdescriptor-containsheader""" p_Delimiter: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.optional(attr.validators.instance_of(TypeCheck.intrinsic_str_type)), metadata={AttrMeta.PROPERTY_NAME: "Delimiter"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-csvformatdescriptor.html#cfn-lookoutmetrics-anomalydetector-csvformatdescriptor-delimiter""" p_FileCompression: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.optional(attr.validators.instance_of(TypeCheck.intrinsic_str_type)), metadata={AttrMeta.PROPERTY_NAME: "FileCompression"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-csvformatdescriptor.html#cfn-lookoutmetrics-anomalydetector-csvformatdescriptor-filecompression""" p_HeaderList: typing.List[TypeHint.intrinsic_str] = attr.ib( default=None, validator=attr.validators.optional(attr.validators.deep_iterable(member_validator=attr.validators.instance_of(TypeCheck.intrinsic_str_type), iterable_validator=attr.validators.instance_of(list))), metadata={AttrMeta.PROPERTY_NAME: "HeaderList"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-csvformatdescriptor.html#cfn-lookoutmetrics-anomalydetector-csvformatdescriptor-headerlist""" p_QuoteSymbol: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.optional(attr.validators.instance_of(TypeCheck.intrinsic_str_type)), metadata={AttrMeta.PROPERTY_NAME: "QuoteSymbol"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-csvformatdescriptor.html#cfn-lookoutmetrics-anomalydetector-csvformatdescriptor-quotesymbol""" @attr.s class AnomalyDetectorVpcConfiguration(Property): """ AWS Object Type = "AWS::LookoutMetrics::AnomalyDetector.VpcConfiguration" Resource Document: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-vpcconfiguration.html Property Document: - ``rp_SecurityGroupIdList``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-vpcconfiguration.html#cfn-lookoutmetrics-anomalydetector-vpcconfiguration-securitygroupidlist - ``rp_SubnetIdList``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-vpcconfiguration.html#cfn-lookoutmetrics-anomalydetector-vpcconfiguration-subnetidlist """ AWS_OBJECT_TYPE = "AWS::LookoutMetrics::AnomalyDetector.VpcConfiguration" rp_SecurityGroupIdList: typing.List[TypeHint.intrinsic_str] = attr.ib( default=None, validator=attr.validators.deep_iterable(member_validator=attr.validators.instance_of(TypeCheck.intrinsic_str_type), iterable_validator=attr.validators.instance_of(list)), metadata={AttrMeta.PROPERTY_NAME: "SecurityGroupIdList"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-vpcconfiguration.html#cfn-lookoutmetrics-anomalydetector-vpcconfiguration-securitygroupidlist""" rp_SubnetIdList: typing.List[TypeHint.intrinsic_str] = attr.ib( default=None, validator=attr.validators.deep_iterable(member_validator=attr.validators.instance_of(TypeCheck.intrinsic_str_type), iterable_validator=attr.validators.instance_of(list)), metadata={AttrMeta.PROPERTY_NAME: "SubnetIdList"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-vpcconfiguration.html#cfn-lookoutmetrics-anomalydetector-vpcconfiguration-subnetidlist""" @attr.s class AnomalyDetectorRDSSourceConfig(Property): """ AWS Object Type = "AWS::LookoutMetrics::AnomalyDetector.RDSSourceConfig" Resource Document: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-rdssourceconfig.html Property Document: - ``rp_DBInstanceIdentifier``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-rdssourceconfig.html#cfn-lookoutmetrics-anomalydetector-rdssourceconfig-dbinstanceidentifier - ``rp_DatabaseHost``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-rdssourceconfig.html#cfn-lookoutmetrics-anomalydetector-rdssourceconfig-databasehost - ``rp_DatabaseName``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-rdssourceconfig.html#cfn-lookoutmetrics-anomalydetector-rdssourceconfig-databasename - ``rp_DatabasePort``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-rdssourceconfig.html#cfn-lookoutmetrics-anomalydetector-rdssourceconfig-databaseport - ``rp_RoleArn``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-rdssourceconfig.html#cfn-lookoutmetrics-anomalydetector-rdssourceconfig-rolearn - ``rp_SecretManagerArn``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-rdssourceconfig.html#cfn-lookoutmetrics-anomalydetector-rdssourceconfig-secretmanagerarn - ``rp_TableName``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-rdssourceconfig.html#cfn-lookoutmetrics-anomalydetector-rdssourceconfig-tablename - ``rp_VpcConfiguration``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-rdssourceconfig.html#cfn-lookoutmetrics-anomalydetector-rdssourceconfig-vpcconfiguration """ AWS_OBJECT_TYPE = "AWS::LookoutMetrics::AnomalyDetector.RDSSourceConfig" rp_DBInstanceIdentifier: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.instance_of(TypeCheck.intrinsic_str_type), metadata={AttrMeta.PROPERTY_NAME: "DBInstanceIdentifier"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-rdssourceconfig.html#cfn-lookoutmetrics-anomalydetector-rdssourceconfig-dbinstanceidentifier""" rp_DatabaseHost: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.instance_of(TypeCheck.intrinsic_str_type), metadata={AttrMeta.PROPERTY_NAME: "DatabaseHost"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-rdssourceconfig.html#cfn-lookoutmetrics-anomalydetector-rdssourceconfig-databasehost""" rp_DatabaseName: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.instance_of(TypeCheck.intrinsic_str_type), metadata={AttrMeta.PROPERTY_NAME: "DatabaseName"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-rdssourceconfig.html#cfn-lookoutmetrics-anomalydetector-rdssourceconfig-databasename""" rp_DatabasePort: int = attr.ib( default=None, validator=attr.validators.instance_of(int), metadata={AttrMeta.PROPERTY_NAME: "DatabasePort"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-rdssourceconfig.html#cfn-lookoutmetrics-anomalydetector-rdssourceconfig-databaseport""" rp_RoleArn: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.instance_of(TypeCheck.intrinsic_str_type), metadata={AttrMeta.PROPERTY_NAME: "RoleArn"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-rdssourceconfig.html#cfn-lookoutmetrics-anomalydetector-rdssourceconfig-rolearn""" rp_SecretManagerArn: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.instance_of(TypeCheck.intrinsic_str_type), metadata={AttrMeta.PROPERTY_NAME: "SecretManagerArn"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-rdssourceconfig.html#cfn-lookoutmetrics-anomalydetector-rdssourceconfig-secretmanagerarn""" rp_TableName: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.instance_of(TypeCheck.intrinsic_str_type), metadata={AttrMeta.PROPERTY_NAME: "TableName"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-rdssourceconfig.html#cfn-lookoutmetrics-anomalydetector-rdssourceconfig-tablename""" rp_VpcConfiguration: typing.Union['AnomalyDetectorVpcConfiguration', dict] = attr.ib( default=None, converter=AnomalyDetectorVpcConfiguration.from_dict, validator=attr.validators.instance_of(AnomalyDetectorVpcConfiguration), metadata={AttrMeta.PROPERTY_NAME: "VpcConfiguration"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-rdssourceconfig.html#cfn-lookoutmetrics-anomalydetector-rdssourceconfig-vpcconfiguration""" @attr.s class AnomalyDetectorTimestampColumn(Property): """ AWS Object Type = "AWS::LookoutMetrics::AnomalyDetector.TimestampColumn" Resource Document: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-timestampcolumn.html Property Document: - ``p_ColumnFormat``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-timestampcolumn.html#cfn-lookoutmetrics-anomalydetector-timestampcolumn-columnformat - ``p_ColumnName``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-timestampcolumn.html#cfn-lookoutmetrics-anomalydetector-timestampcolumn-columnname """ AWS_OBJECT_TYPE = "AWS::LookoutMetrics::AnomalyDetector.TimestampColumn" p_ColumnFormat: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.optional(attr.validators.instance_of(TypeCheck.intrinsic_str_type)), metadata={AttrMeta.PROPERTY_NAME: "ColumnFormat"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-timestampcolumn.html#cfn-lookoutmetrics-anomalydetector-timestampcolumn-columnformat""" p_ColumnName: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.optional(attr.validators.instance_of(TypeCheck.intrinsic_str_type)), metadata={AttrMeta.PROPERTY_NAME: "ColumnName"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-timestampcolumn.html#cfn-lookoutmetrics-anomalydetector-timestampcolumn-columnname""" @attr.s class AnomalyDetectorJsonFormatDescriptor(Property): """ AWS Object Type = "AWS::LookoutMetrics::AnomalyDetector.JsonFormatDescriptor" Resource Document: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-jsonformatdescriptor.html Property Document: - ``p_Charset``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-jsonformatdescriptor.html#cfn-lookoutmetrics-anomalydetector-jsonformatdescriptor-charset - ``p_FileCompression``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-jsonformatdescriptor.html#cfn-lookoutmetrics-anomalydetector-jsonformatdescriptor-filecompression """ AWS_OBJECT_TYPE = "AWS::LookoutMetrics::AnomalyDetector.JsonFormatDescriptor" p_Charset: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.optional(attr.validators.instance_of(TypeCheck.intrinsic_str_type)), metadata={AttrMeta.PROPERTY_NAME: "Charset"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-jsonformatdescriptor.html#cfn-lookoutmetrics-anomalydetector-jsonformatdescriptor-charset""" p_FileCompression: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.optional(attr.validators.instance_of(TypeCheck.intrinsic_str_type)), metadata={AttrMeta.PROPERTY_NAME: "FileCompression"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-jsonformatdescriptor.html#cfn-lookoutmetrics-anomalydetector-jsonformatdescriptor-filecompression""" @attr.s class AnomalyDetectorAppFlowConfig(Property): """ AWS Object Type = "AWS::LookoutMetrics::AnomalyDetector.AppFlowConfig" Resource Document: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-appflowconfig.html Property Document: - ``rp_FlowName``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-appflowconfig.html#cfn-lookoutmetrics-anomalydetector-appflowconfig-flowname - ``rp_RoleArn``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-appflowconfig.html#cfn-lookoutmetrics-anomalydetector-appflowconfig-rolearn """ AWS_OBJECT_TYPE = "AWS::LookoutMetrics::AnomalyDetector.AppFlowConfig" rp_FlowName: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.instance_of(TypeCheck.intrinsic_str_type), metadata={AttrMeta.PROPERTY_NAME: "FlowName"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-appflowconfig.html#cfn-lookoutmetrics-anomalydetector-appflowconfig-flowname""" rp_RoleArn: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.instance_of(TypeCheck.intrinsic_str_type), metadata={AttrMeta.PROPERTY_NAME: "RoleArn"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-appflowconfig.html#cfn-lookoutmetrics-anomalydetector-appflowconfig-rolearn""" @attr.s class AnomalyDetectorRedshiftSourceConfig(Property): """ AWS Object Type = "AWS::LookoutMetrics::AnomalyDetector.RedshiftSourceConfig" Resource Document: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-redshiftsourceconfig.html Property Document: - ``rp_ClusterIdentifier``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-redshiftsourceconfig.html#cfn-lookoutmetrics-anomalydetector-redshiftsourceconfig-clusteridentifier - ``rp_DatabaseHost``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-redshiftsourceconfig.html#cfn-lookoutmetrics-anomalydetector-redshiftsourceconfig-databasehost - ``rp_DatabaseName``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-redshiftsourceconfig.html#cfn-lookoutmetrics-anomalydetector-redshiftsourceconfig-databasename - ``rp_DatabasePort``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-redshiftsourceconfig.html#cfn-lookoutmetrics-anomalydetector-redshiftsourceconfig-databaseport - ``rp_RoleArn``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-redshiftsourceconfig.html#cfn-lookoutmetrics-anomalydetector-redshiftsourceconfig-rolearn - ``rp_SecretManagerArn``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-redshiftsourceconfig.html#cfn-lookoutmetrics-anomalydetector-redshiftsourceconfig-secretmanagerarn - ``rp_TableName``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-redshiftsourceconfig.html#cfn-lookoutmetrics-anomalydetector-redshiftsourceconfig-tablename - ``rp_VpcConfiguration``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-redshiftsourceconfig.html#cfn-lookoutmetrics-anomalydetector-redshiftsourceconfig-vpcconfiguration """ AWS_OBJECT_TYPE = "AWS::LookoutMetrics::AnomalyDetector.RedshiftSourceConfig" rp_ClusterIdentifier: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.instance_of(TypeCheck.intrinsic_str_type), metadata={AttrMeta.PROPERTY_NAME: "ClusterIdentifier"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-redshiftsourceconfig.html#cfn-lookoutmetrics-anomalydetector-redshiftsourceconfig-clusteridentifier""" rp_DatabaseHost: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.instance_of(TypeCheck.intrinsic_str_type), metadata={AttrMeta.PROPERTY_NAME: "DatabaseHost"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-redshiftsourceconfig.html#cfn-lookoutmetrics-anomalydetector-redshiftsourceconfig-databasehost""" rp_DatabaseName: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.instance_of(TypeCheck.intrinsic_str_type), metadata={AttrMeta.PROPERTY_NAME: "DatabaseName"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-redshiftsourceconfig.html#cfn-lookoutmetrics-anomalydetector-redshiftsourceconfig-databasename""" rp_DatabasePort: int = attr.ib( default=None, validator=attr.validators.instance_of(int), metadata={AttrMeta.PROPERTY_NAME: "DatabasePort"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-redshiftsourceconfig.html#cfn-lookoutmetrics-anomalydetector-redshiftsourceconfig-databaseport""" rp_RoleArn: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.instance_of(TypeCheck.intrinsic_str_type), metadata={AttrMeta.PROPERTY_NAME: "RoleArn"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-redshiftsourceconfig.html#cfn-lookoutmetrics-anomalydetector-redshiftsourceconfig-rolearn""" rp_SecretManagerArn: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.instance_of(TypeCheck.intrinsic_str_type), metadata={AttrMeta.PROPERTY_NAME: "SecretManagerArn"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-redshiftsourceconfig.html#cfn-lookoutmetrics-anomalydetector-redshiftsourceconfig-secretmanagerarn""" rp_TableName: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.instance_of(TypeCheck.intrinsic_str_type), metadata={AttrMeta.PROPERTY_NAME: "TableName"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-redshiftsourceconfig.html#cfn-lookoutmetrics-anomalydetector-redshiftsourceconfig-tablename""" rp_VpcConfiguration: typing.Union['AnomalyDetectorVpcConfiguration', dict] = attr.ib( default=None, converter=AnomalyDetectorVpcConfiguration.from_dict, validator=attr.validators.instance_of(AnomalyDetectorVpcConfiguration), metadata={AttrMeta.PROPERTY_NAME: "VpcConfiguration"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-redshiftsourceconfig.html#cfn-lookoutmetrics-anomalydetector-redshiftsourceconfig-vpcconfiguration""" @attr.s class AnomalyDetectorMetric(Property): """ AWS Object Type = "AWS::LookoutMetrics::AnomalyDetector.Metric" Resource Document: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metric.html Property Document: - ``rp_AggregationFunction``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metric.html#cfn-lookoutmetrics-anomalydetector-metric-aggregationfunction - ``rp_MetricName``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metric.html#cfn-lookoutmetrics-anomalydetector-metric-metricname - ``p_Namespace``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metric.html#cfn-lookoutmetrics-anomalydetector-metric-namespace """ AWS_OBJECT_TYPE = "AWS::LookoutMetrics::AnomalyDetector.Metric" rp_AggregationFunction: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.instance_of(TypeCheck.intrinsic_str_type), metadata={AttrMeta.PROPERTY_NAME: "AggregationFunction"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metric.html#cfn-lookoutmetrics-anomalydetector-metric-aggregationfunction""" rp_MetricName: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.instance_of(TypeCheck.intrinsic_str_type), metadata={AttrMeta.PROPERTY_NAME: "MetricName"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metric.html#cfn-lookoutmetrics-anomalydetector-metric-metricname""" p_Namespace: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.optional(attr.validators.instance_of(TypeCheck.intrinsic_str_type)), metadata={AttrMeta.PROPERTY_NAME: "Namespace"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metric.html#cfn-lookoutmetrics-anomalydetector-metric-namespace""" @attr.s class AnomalyDetectorCloudwatchConfig(Property): """ AWS Object Type = "AWS::LookoutMetrics::AnomalyDetector.CloudwatchConfig" Resource Document: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-cloudwatchconfig.html Property Document: - ``rp_RoleArn``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-cloudwatchconfig.html#cfn-lookoutmetrics-anomalydetector-cloudwatchconfig-rolearn """ AWS_OBJECT_TYPE = "AWS::LookoutMetrics::AnomalyDetector.CloudwatchConfig" rp_RoleArn: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.instance_of(TypeCheck.intrinsic_str_type), metadata={AttrMeta.PROPERTY_NAME: "RoleArn"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-cloudwatchconfig.html#cfn-lookoutmetrics-anomalydetector-cloudwatchconfig-rolearn""" @attr.s class AnomalyDetectorFileFormatDescriptor(Property): """ AWS Object Type = "AWS::LookoutMetrics::AnomalyDetector.FileFormatDescriptor" Resource Document: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-fileformatdescriptor.html Property Document: - ``p_CsvFormatDescriptor``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-fileformatdescriptor.html#cfn-lookoutmetrics-anomalydetector-fileformatdescriptor-csvformatdescriptor - ``p_JsonFormatDescriptor``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-fileformatdescriptor.html#cfn-lookoutmetrics-anomalydetector-fileformatdescriptor-jsonformatdescriptor """ AWS_OBJECT_TYPE = "AWS::LookoutMetrics::AnomalyDetector.FileFormatDescriptor" p_CsvFormatDescriptor: typing.Union['AnomalyDetectorCsvFormatDescriptor', dict] = attr.ib( default=None, converter=AnomalyDetectorCsvFormatDescriptor.from_dict, validator=attr.validators.optional(attr.validators.instance_of(AnomalyDetectorCsvFormatDescriptor)), metadata={AttrMeta.PROPERTY_NAME: "CsvFormatDescriptor"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-fileformatdescriptor.html#cfn-lookoutmetrics-anomalydetector-fileformatdescriptor-csvformatdescriptor""" p_JsonFormatDescriptor: typing.Union['AnomalyDetectorJsonFormatDescriptor', dict] = attr.ib( default=None, converter=AnomalyDetectorJsonFormatDescriptor.from_dict, validator=attr.validators.optional(attr.validators.instance_of(AnomalyDetectorJsonFormatDescriptor)), metadata={AttrMeta.PROPERTY_NAME: "JsonFormatDescriptor"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-fileformatdescriptor.html#cfn-lookoutmetrics-anomalydetector-fileformatdescriptor-jsonformatdescriptor""" @attr.s class AnomalyDetectorS3SourceConfig(Property): """ AWS Object Type = "AWS::LookoutMetrics::AnomalyDetector.S3SourceConfig" Resource Document: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-s3sourceconfig.html Property Document: - ``rp_FileFormatDescriptor``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-s3sourceconfig.html#cfn-lookoutmetrics-anomalydetector-s3sourceconfig-fileformatdescriptor - ``rp_RoleArn``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-s3sourceconfig.html#cfn-lookoutmetrics-anomalydetector-s3sourceconfig-rolearn - ``p_HistoricalDataPathList``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-s3sourceconfig.html#cfn-lookoutmetrics-anomalydetector-s3sourceconfig-historicaldatapathlist - ``p_TemplatedPathList``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-s3sourceconfig.html#cfn-lookoutmetrics-anomalydetector-s3sourceconfig-templatedpathlist """ AWS_OBJECT_TYPE = "AWS::LookoutMetrics::AnomalyDetector.S3SourceConfig" rp_FileFormatDescriptor: typing.Union['AnomalyDetectorFileFormatDescriptor', dict] = attr.ib( default=None, converter=AnomalyDetectorFileFormatDescriptor.from_dict, validator=attr.validators.instance_of(AnomalyDetectorFileFormatDescriptor), metadata={AttrMeta.PROPERTY_NAME: "FileFormatDescriptor"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-s3sourceconfig.html#cfn-lookoutmetrics-anomalydetector-s3sourceconfig-fileformatdescriptor""" rp_RoleArn: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.instance_of(TypeCheck.intrinsic_str_type), metadata={AttrMeta.PROPERTY_NAME: "RoleArn"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-s3sourceconfig.html#cfn-lookoutmetrics-anomalydetector-s3sourceconfig-rolearn""" p_HistoricalDataPathList: typing.List[TypeHint.intrinsic_str] = attr.ib( default=None, validator=attr.validators.optional(attr.validators.deep_iterable(member_validator=attr.validators.instance_of(TypeCheck.intrinsic_str_type), iterable_validator=attr.validators.instance_of(list))), metadata={AttrMeta.PROPERTY_NAME: "HistoricalDataPathList"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-s3sourceconfig.html#cfn-lookoutmetrics-anomalydetector-s3sourceconfig-historicaldatapathlist""" p_TemplatedPathList: typing.List[TypeHint.intrinsic_str] = attr.ib( default=None, validator=attr.validators.optional(attr.validators.deep_iterable(member_validator=attr.validators.instance_of(TypeCheck.intrinsic_str_type), iterable_validator=attr.validators.instance_of(list))), metadata={AttrMeta.PROPERTY_NAME: "TemplatedPathList"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-s3sourceconfig.html#cfn-lookoutmetrics-anomalydetector-s3sourceconfig-templatedpathlist""" @attr.s class AnomalyDetectorMetricSource(Property): """ AWS Object Type = "AWS::LookoutMetrics::AnomalyDetector.MetricSource" Resource Document: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metricsource.html Property Document: - ``p_AppFlowConfig``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metricsource.html#cfn-lookoutmetrics-anomalydetector-metricsource-appflowconfig - ``p_CloudwatchConfig``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metricsource.html#cfn-lookoutmetrics-anomalydetector-metricsource-cloudwatchconfig - ``p_RDSSourceConfig``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metricsource.html#cfn-lookoutmetrics-anomalydetector-metricsource-rdssourceconfig - ``p_RedshiftSourceConfig``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metricsource.html#cfn-lookoutmetrics-anomalydetector-metricsource-redshiftsourceconfig - ``p_S3SourceConfig``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metricsource.html#cfn-lookoutmetrics-anomalydetector-metricsource-s3sourceconfig """ AWS_OBJECT_TYPE = "AWS::LookoutMetrics::AnomalyDetector.MetricSource" p_AppFlowConfig: typing.Union['AnomalyDetectorAppFlowConfig', dict] = attr.ib( default=None, converter=AnomalyDetectorAppFlowConfig.from_dict, validator=attr.validators.optional(attr.validators.instance_of(AnomalyDetectorAppFlowConfig)), metadata={AttrMeta.PROPERTY_NAME: "AppFlowConfig"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metricsource.html#cfn-lookoutmetrics-anomalydetector-metricsource-appflowconfig""" p_CloudwatchConfig: typing.Union['AnomalyDetectorCloudwatchConfig', dict] = attr.ib( default=None, converter=AnomalyDetectorCloudwatchConfig.from_dict, validator=attr.validators.optional(attr.validators.instance_of(AnomalyDetectorCloudwatchConfig)), metadata={AttrMeta.PROPERTY_NAME: "CloudwatchConfig"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metricsource.html#cfn-lookoutmetrics-anomalydetector-metricsource-cloudwatchconfig""" p_RDSSourceConfig: typing.Union['AnomalyDetectorRDSSourceConfig', dict] = attr.ib( default=None, converter=AnomalyDetectorRDSSourceConfig.from_dict, validator=attr.validators.optional(attr.validators.instance_of(AnomalyDetectorRDSSourceConfig)), metadata={AttrMeta.PROPERTY_NAME: "RDSSourceConfig"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metricsource.html#cfn-lookoutmetrics-anomalydetector-metricsource-rdssourceconfig""" p_RedshiftSourceConfig: typing.Union['AnomalyDetectorRedshiftSourceConfig', dict] = attr.ib( default=None, converter=AnomalyDetectorRedshiftSourceConfig.from_dict, validator=attr.validators.optional(attr.validators.instance_of(AnomalyDetectorRedshiftSourceConfig)), metadata={AttrMeta.PROPERTY_NAME: "RedshiftSourceConfig"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metricsource.html#cfn-lookoutmetrics-anomalydetector-metricsource-redshiftsourceconfig""" p_S3SourceConfig: typing.Union['AnomalyDetectorS3SourceConfig', dict] = attr.ib( default=None, converter=AnomalyDetectorS3SourceConfig.from_dict, validator=attr.validators.optional(attr.validators.instance_of(AnomalyDetectorS3SourceConfig)), metadata={AttrMeta.PROPERTY_NAME: "S3SourceConfig"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metricsource.html#cfn-lookoutmetrics-anomalydetector-metricsource-s3sourceconfig""" @attr.s class AnomalyDetectorMetricSet(Property): """ AWS Object Type = "AWS::LookoutMetrics::AnomalyDetector.MetricSet" Resource Document: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metricset.html Property Document: - ``rp_MetricList``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metricset.html#cfn-lookoutmetrics-anomalydetector-metricset-metriclist - ``rp_MetricSetName``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metricset.html#cfn-lookoutmetrics-anomalydetector-metricset-metricsetname - ``rp_MetricSource``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metricset.html#cfn-lookoutmetrics-anomalydetector-metricset-metricsource - ``p_DimensionList``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metricset.html#cfn-lookoutmetrics-anomalydetector-metricset-dimensionlist - ``p_MetricSetDescription``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metricset.html#cfn-lookoutmetrics-anomalydetector-metricset-metricsetdescription - ``p_MetricSetFrequency``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metricset.html#cfn-lookoutmetrics-anomalydetector-metricset-metricsetfrequency - ``p_Offset``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metricset.html#cfn-lookoutmetrics-anomalydetector-metricset-offset - ``p_TimestampColumn``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metricset.html#cfn-lookoutmetrics-anomalydetector-metricset-timestampcolumn - ``p_Timezone``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metricset.html#cfn-lookoutmetrics-anomalydetector-metricset-timezone """ AWS_OBJECT_TYPE = "AWS::LookoutMetrics::AnomalyDetector.MetricSet" rp_MetricList: typing.List[typing.Union['AnomalyDetectorMetric', dict]] = attr.ib( default=None, converter=AnomalyDetectorMetric.from_list, validator=attr.validators.deep_iterable(member_validator=attr.validators.instance_of(AnomalyDetectorMetric), iterable_validator=attr.validators.instance_of(list)), metadata={AttrMeta.PROPERTY_NAME: "MetricList"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metricset.html#cfn-lookoutmetrics-anomalydetector-metricset-metriclist""" rp_MetricSetName: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.instance_of(TypeCheck.intrinsic_str_type), metadata={AttrMeta.PROPERTY_NAME: "MetricSetName"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metricset.html#cfn-lookoutmetrics-anomalydetector-metricset-metricsetname""" rp_MetricSource: typing.Union['AnomalyDetectorMetricSource', dict] = attr.ib( default=None, converter=AnomalyDetectorMetricSource.from_dict, validator=attr.validators.instance_of(AnomalyDetectorMetricSource), metadata={AttrMeta.PROPERTY_NAME: "MetricSource"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metricset.html#cfn-lookoutmetrics-anomalydetector-metricset-metricsource""" p_DimensionList: typing.List[TypeHint.intrinsic_str] = attr.ib( default=None, validator=attr.validators.optional(attr.validators.deep_iterable(member_validator=attr.validators.instance_of(TypeCheck.intrinsic_str_type), iterable_validator=attr.validators.instance_of(list))), metadata={AttrMeta.PROPERTY_NAME: "DimensionList"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metricset.html#cfn-lookoutmetrics-anomalydetector-metricset-dimensionlist""" p_MetricSetDescription: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.optional(attr.validators.instance_of(TypeCheck.intrinsic_str_type)), metadata={AttrMeta.PROPERTY_NAME: "MetricSetDescription"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metricset.html#cfn-lookoutmetrics-anomalydetector-metricset-metricsetdescription""" p_MetricSetFrequency: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.optional(attr.validators.instance_of(TypeCheck.intrinsic_str_type)), metadata={AttrMeta.PROPERTY_NAME: "MetricSetFrequency"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metricset.html#cfn-lookoutmetrics-anomalydetector-metricset-metricsetfrequency""" p_Offset: int = attr.ib( default=None, validator=attr.validators.optional(attr.validators.instance_of(int)), metadata={AttrMeta.PROPERTY_NAME: "Offset"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metricset.html#cfn-lookoutmetrics-anomalydetector-metricset-offset""" p_TimestampColumn: typing.Union['AnomalyDetectorTimestampColumn', dict] = attr.ib( default=None, converter=AnomalyDetectorTimestampColumn.from_dict, validator=attr.validators.optional(attr.validators.instance_of(AnomalyDetectorTimestampColumn)), metadata={AttrMeta.PROPERTY_NAME: "TimestampColumn"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metricset.html#cfn-lookoutmetrics-anomalydetector-metricset-timestampcolumn""" p_Timezone: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.optional(attr.validators.instance_of(TypeCheck.intrinsic_str_type)), metadata={AttrMeta.PROPERTY_NAME: "Timezone"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-anomalydetector-metricset.html#cfn-lookoutmetrics-anomalydetector-metricset-timezone""" #--- Resource declaration --- @attr.s class Alert(Resource): """ AWS Object Type = "AWS::LookoutMetrics::Alert" Resource Document: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lookoutmetrics-alert.html Property Document: - ``rp_Action``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lookoutmetrics-alert.html#cfn-lookoutmetrics-alert-action - ``rp_AlertSensitivityThreshold``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lookoutmetrics-alert.html#cfn-lookoutmetrics-alert-alertsensitivitythreshold - ``rp_AnomalyDetectorArn``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lookoutmetrics-alert.html#cfn-lookoutmetrics-alert-anomalydetectorarn - ``p_AlertDescription``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lookoutmetrics-alert.html#cfn-lookoutmetrics-alert-alertdescription - ``p_AlertName``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lookoutmetrics-alert.html#cfn-lookoutmetrics-alert-alertname """ AWS_OBJECT_TYPE = "AWS::LookoutMetrics::Alert" rp_Action: dict = attr.ib( default=None, validator=attr.validators.instance_of(dict), metadata={AttrMeta.PROPERTY_NAME: "Action"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lookoutmetrics-alert.html#cfn-lookoutmetrics-alert-action""" rp_AlertSensitivityThreshold: int = attr.ib( default=None, validator=attr.validators.instance_of(int), metadata={AttrMeta.PROPERTY_NAME: "AlertSensitivityThreshold"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lookoutmetrics-alert.html#cfn-lookoutmetrics-alert-alertsensitivitythreshold""" rp_AnomalyDetectorArn: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.instance_of(TypeCheck.intrinsic_str_type), metadata={AttrMeta.PROPERTY_NAME: "AnomalyDetectorArn"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lookoutmetrics-alert.html#cfn-lookoutmetrics-alert-anomalydetectorarn""" p_AlertDescription: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.optional(attr.validators.instance_of(TypeCheck.intrinsic_str_type)), metadata={AttrMeta.PROPERTY_NAME: "AlertDescription"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lookoutmetrics-alert.html#cfn-lookoutmetrics-alert-alertdescription""" p_AlertName: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.optional(attr.validators.instance_of(TypeCheck.intrinsic_str_type)), metadata={AttrMeta.PROPERTY_NAME: "AlertName"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lookoutmetrics-alert.html#cfn-lookoutmetrics-alert-alertname""" @property def rv_Arn(self) -> GetAtt: """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lookoutmetrics-alert.html#aws-resource-lookoutmetrics-alert-return-values""" return GetAtt(resource=self, attr_name="Arn") @attr.s class AnomalyDetector(Resource): """ AWS Object Type = "AWS::LookoutMetrics::AnomalyDetector" Resource Document: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lookoutmetrics-anomalydetector.html Property Document: - ``rp_AnomalyDetectorConfig``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lookoutmetrics-anomalydetector.html#cfn-lookoutmetrics-anomalydetector-anomalydetectorconfig - ``rp_MetricSetList``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lookoutmetrics-anomalydetector.html#cfn-lookoutmetrics-anomalydetector-metricsetlist - ``p_AnomalyDetectorDescription``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lookoutmetrics-anomalydetector.html#cfn-lookoutmetrics-anomalydetector-anomalydetectordescription - ``p_AnomalyDetectorName``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lookoutmetrics-anomalydetector.html#cfn-lookoutmetrics-anomalydetector-anomalydetectorname - ``p_KmsKeyArn``: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lookoutmetrics-anomalydetector.html#cfn-lookoutmetrics-anomalydetector-kmskeyarn """ AWS_OBJECT_TYPE = "AWS::LookoutMetrics::AnomalyDetector" rp_AnomalyDetectorConfig: dict = attr.ib( default=None, validator=attr.validators.instance_of(dict), metadata={AttrMeta.PROPERTY_NAME: "AnomalyDetectorConfig"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lookoutmetrics-anomalydetector.html#cfn-lookoutmetrics-anomalydetector-anomalydetectorconfig""" rp_MetricSetList: typing.List[typing.Union['AnomalyDetectorMetricSet', dict]] = attr.ib( default=None, converter=AnomalyDetectorMetricSet.from_list, validator=attr.validators.deep_iterable(member_validator=attr.validators.instance_of(AnomalyDetectorMetricSet), iterable_validator=attr.validators.instance_of(list)), metadata={AttrMeta.PROPERTY_NAME: "MetricSetList"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lookoutmetrics-anomalydetector.html#cfn-lookoutmetrics-anomalydetector-metricsetlist""" p_AnomalyDetectorDescription: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.optional(attr.validators.instance_of(TypeCheck.intrinsic_str_type)), metadata={AttrMeta.PROPERTY_NAME: "AnomalyDetectorDescription"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lookoutmetrics-anomalydetector.html#cfn-lookoutmetrics-anomalydetector-anomalydetectordescription""" p_AnomalyDetectorName: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.optional(attr.validators.instance_of(TypeCheck.intrinsic_str_type)), metadata={AttrMeta.PROPERTY_NAME: "AnomalyDetectorName"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lookoutmetrics-anomalydetector.html#cfn-lookoutmetrics-anomalydetector-anomalydetectorname""" p_KmsKeyArn: TypeHint.intrinsic_str = attr.ib( default=None, validator=attr.validators.optional(attr.validators.instance_of(TypeCheck.intrinsic_str_type)), metadata={AttrMeta.PROPERTY_NAME: "KmsKeyArn"}, ) """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lookoutmetrics-anomalydetector.html#cfn-lookoutmetrics-anomalydetector-kmskeyarn""" @property def rv_Arn(self) -> GetAtt: """Doc: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lookoutmetrics-anomalydetector.html#aws-resource-lookoutmetrics-anomalydetector-return-values""" return GetAtt(resource=self, attr_name="Arn")
72.952312
244
0.792247
1cdca30a9e94c3c9d84425423f60edd193cc1ba3
8,549
css
CSS
src/css/App.css
jonathancdev/blog-template
21aa7f9d41a01a9803e6d024199c998740d82eec
[ "RSA-MD" ]
null
null
null
src/css/App.css
jonathancdev/blog-template
21aa7f9d41a01a9803e6d024199c998740d82eec
[ "RSA-MD" ]
null
null
null
src/css/App.css
jonathancdev/blog-template
21aa7f9d41a01a9803e6d024199c998740d82eec
[ "RSA-MD" ]
null
null
null
*, *::after, *::before { margin: 0; padding: 0; box-sizing: inherit; } html { font-size: 62.5%; } body { height: 100vh; padding: 0 3rem; padding-top: 3rem; box-sizing: border-box; } a:link, a:visited { text-decoration: none; } @font-face { font-family: "GothicA1"; src: url("../fonts/gothic/GothicA1-Black.ttf"); font-weight: 900; } @font-face { font-family: "GothicA1"; src: url("../fonts/gothic/GothicA1-ExtraBold.ttf"); font-weight: 800; } @font-face { font-family: "GothicA1"; src: url("../fonts/gothic/GothicA1-Bold.ttf"); font-weight: 700; } @font-face { font-family: "GothicA1"; src: url("../fonts/gothic/GothicA1-SemiBold.ttf"); font-weight: 600; } @font-face { font-family: "GothicA1"; src: url("../fonts/gothic/GothicA1-Medium.ttf"); font-weight: 500; } @font-face { font-family: "GothicA1"; src: url("../fonts/gothic/GothicA1-Regular.ttf"); font-weight: 400; } @font-face { font-family: "GothicA1"; src: url("../fonts/gothic/GothicA1-Light.ttf"); font-weight: 300; } @font-face { font-family: "GothicA1"; src: url("../fonts/gothic/GothicA1-ExtraLight.ttf"); font-weight: 200; } @font-face { font-family: "GothicA1"; src: url("../fonts/gothic/GothicA1-Thin.ttf"); font-weight: 100; } @font-face { font-family: "CormorantGaramond"; src: url("../fonts/cormorant_garamond/CormorantGaramond-BoldItalic.ttf"); font-weight: 700; font-style: "italic"; } @font-face { font-family: "CormorantGaramond"; src: url("../fonts/cormorant_garamond/CormorantGaramond-Bold.ttf"); font-weight: 700; } @font-face { font-family: "CormorantGaramond"; src: url("../fonts/cormorant_garamond/CormorantGaramond-SemiBoldItalic.ttf"); font-weight: 600; font-style: "italic"; } @font-face { font-family: "CormorantGaramond"; src: url("../fonts/cormorant_garamond/CormorantGaramond-SemiBold.ttf"); font-weight: 600; } @font-face { font-family: "CormorantGaramond"; src: url("../fonts/cormorant_garamond/CormorantGaramond-MediumItalic.ttf"); font-weight: 500; font-style: "italic"; } @font-face { font-family: "CormorantGaramond"; src: url("../fonts/cormorant_garamond/CormorantGaramond-Medium.ttf"); font-weight: 500; } @font-face { font-family: "CormorantGaramond"; src: url("../fonts/cormorant_garamond/CormorantGaramond-Italic.ttf"); font-weight: 400; font-style: "italic"; } @font-face { font-family: "CormorantGaramond"; src: url("../fonts/cormorant_garamond/CormorantGaramond-Regular.ttf"); font-weight: 400; } @font-face { font-family: "CormorantGaramond"; src: url("../fonts/cormorant_garamond/CormorantGaramond-Light.ttf"); font-weight: 300; } @font-face { font-family: "Spartan"; src: url("../fonts/spartan/Spartan-Black.ttf"); font-weight: 900; } @font-face { font-family: "Spartan"; src: url("../fonts/spartan/Spartan-ExtraBold.ttf"); font-weight: 800; } @font-face { font-family: "Spartan"; src: url("../fonts/spartan/Spartan-Bold.ttf"); font-weight: 700; } @font-face { font-family: "Spartan"; src: url("../fonts/spartan/Spartan-SemiBold.ttf"); font-weight: 600; } @font-face { font-family: "Spartan"; src: url("../fonts/spartan/Spartan-Medium.ttf"); font-weight: 500; } @font-face { font-family: "Spartan"; src: url("../fonts/spartan/Spartan-Regular.ttf"); font-weight: 400; } @font-face { font-family: "Spartan"; src: url("../fonts/spartan/Spartan-Light.ttf"); font-weight: 300; } @font-face { font-family: "Spartan"; src: url("../fonts/spartan/Spartan-ExtraLight.ttf"); font-weight: 200; } @font-face { font-family: "Spartan"; src: url("../fonts/spartan/Spartan-Thin.ttf"); font-weight: 100; } body { font-family: "GothicA1"; font-weight: 400; /* font-size: 16px; */ line-height: 1.2; color: #454555; } a, a:link, a:visited { color: #454555; } .about__heading--primary { font-family: "CormorantGaramond"; font-size: 4rem; } .search-bar__icon.svg-inline--fa { font-size: 3rem; color: rgba(255, 255, 255, 0.759); } .menu__icon.svg-inline--fa { font-size: 4.5rem; color: rgba(255, 255, 255, 0.759); } .hamburger__icon.svg-inline--fa { font-size: 4rem; color: rgba(255, 255, 255, 0.759); } .search-bar__input { height: 4rem; width: 25rem; border: none; border-radius: 0.35rem 0 0 0.35rem; background-color: rgba(255, 255, 255, 0.25); color: rgba(255, 255, 255, 0.759); font-family: GothicA1; font-weight: 500; font-size: 2.5rem; padding: 0 1rem; } .search-bar__icon--wrap { display: flex; align-items: center; justify-content: center; height: 4rem; width: 5rem; border-radius: 0 0.35rem 0.35rem 0; background-color: rgba(255, 255, 255, 0.505); } .divider { margin: 0 1rem; border-bottom: solid; border-width: 1px; font-family: CormorantGaramond; font-size: 1.8rem; font-weight: 600; color: #454555; opacity: 0.75; } .navbar { position: fixed; bottom: 0; left: 0; right: 0; height: 18vh; transform: translateY(100%); z-index: 1; } .navbar.active { transform: translateY(0); } .hamburger { position: absolute; right: 0; top: 15rem; margin: 3rem; border-radius: 1.5rem; height: 6rem; width: 6rem; background-color: #fc858c; box-shadow: 0px 4px 4px 0px #00000040; display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; transform: translateX(200%); transition: transform 0.25s ease-in-out 0.2s, opacity 0.4s ease 0.2s; } .hamburger.active { opacity: 1; transform: translateX(0); top: -17rem; } .hamburger__line { position: absolute; display: inline-block; height: 0.25rem; width: 4rem; margin: 0.5rem; background-color: #fff; } .menu { height: 100%; opacity: 0; transform: translateY(100%); transition: transform 0.25s ease-in-out 0.2s, opacity 0.25s ease 0.2s; } .menu.active { opacity: 1; transform: translateY(0); } .menu__links--scroller { overflow-y: scroll; } .menu__links { height: 5rem; display: flex; justify-content: space-evenly; background-color: #fff; padding: 0.5rem; width: 140%; } .menu .link:link, .menu .link:visited { color: #000; font-size: 3rem; font-weight: 800; display: inline-block; font-family: "CormorantGaramond"; text-transform: lowercase; color: #fc858c; } .menu__search-bar { display: flex; align-items: center; justify-content: center; height: calc(18vh - 5rem); width: 100%; background-color: #fc858c; } .menu__icon--btn { border: none; background-color: transparent; display: flex; align-items: center; justify-content: center; padding-left: 1rem; } .header { height: 6vh; display: flex; justify-content: flex-end; } .header__heading--primary { font-family: "Spartan"; font-weight: 100; font-size: 3rem; color: #a9aabc; } .header__link { height: 3rem; } body { background-color: #fff; } .home { height: calc(100vh - 6vh); } .home-hero { height: 35vh; padding: 1rem; } .home-hero__img { border-radius: 4px; height: 60%; width: 100%; } .home-hero__tag { font-family: CormorantGaramond; text-align: end; text-transform: uppercase; padding-top: 3px; font-size: 1.5rem; line-height: 0.8; } .home-hero__heading--primary { font-family: CormorantGaramond; font-size: 2.2rem; font-weight: 800; line-height: 0.8; padding-bottom: 0.5rem; } .home-hero__text { font-size: 1.5rem; font-weight: 100; } .home-recent-posts { height: 45vh; padding: 1rem; } .home-recent { height: 30%; width: 100%; margin-bottom: 1rem; display: flex; align-items: center; } .home-recent__img { height: 100%; width: 35%; border-radius: 4px; } .home-recent__content { height: 100%; width: 65%; padding: 0 1rem; } .home-recent__tag { text-transform: uppercase; color: #a9aabc; font-family: CormorantGaramond; font-size: 1.5rem; margin-bottom: 0.5rem; } .home-recent__text { font-size: 1.4rem; font-weight: 400; } .post-page h1, .post-page h2, .post-page h3 { font-family: CormorantGaramond; color: #454555; } .post-page h1 { font-size: 3rem; font-weight: 600; } .post-page h2 { font-size: 2rem; font-weight: 600; } .post-page h3 { font-size: 1.5rem; } .post-page p { padding: 5px 0rem; color: #454555; opacity: 0.8; font-family: GothicA1; font-weight: 200; } .post-page strong { font-weight: 500; } .post-page li::marker { content: ""; } .post-page a { color: #5e6fc2; font-weight: 400; text-decoration: underline; padding-left: 3px; } /*# sourceMappingURL=App.css.map */
19.040089
79
0.660896
3b0e3ff82344cdd76f910e00e922f2d3052d81f0
1,764
kt
Kotlin
app/src/main/java/adapter/FriendsListAdapter.kt
UNIZAR-30226-2021-12/front-end_android
2941434ff5de558e310f4c3adeb02945104cd82a
[ "MIT" ]
null
null
null
app/src/main/java/adapter/FriendsListAdapter.kt
UNIZAR-30226-2021-12/front-end_android
2941434ff5de558e310f4c3adeb02945104cd82a
[ "MIT" ]
null
null
null
app/src/main/java/adapter/FriendsListAdapter.kt
UNIZAR-30226-2021-12/front-end_android
2941434ff5de558e310f4c3adeb02945104cd82a
[ "MIT" ]
null
null
null
package adapter import android.app.Activity import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.BaseAdapter import android.widget.ImageView import android.widget.TextView import data.FriendInfo import eina.unizar.unozar.R class FriendsListAdapter(private val context: Activity, private val friends: ArrayList<FriendInfo>) : BaseAdapter() { private class ViewHolder(row: View) { val alias: TextView = row.findViewById<View>(R.id.friend_alias) as TextView val email: TextView = row.findViewById<View>(R.id.friend_email) as TextView val avatar: ImageView = row.findViewById<View>(R.id.friend_avatar) as ImageView } /*private val inflater: LayoutInflater = context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater */ override fun getCount(): Int { return friends.size } override fun getItem(position: Int): Any { return friends[position] } override fun getItemId(position: Int): Long { return position.toLong() } override fun getView(position: Int, view: View?, parent: ViewGroup): View { val row: View val holder: ViewHolder if (view == null) { val inflater = LayoutInflater.from(context) row = inflater.inflate(R.layout.friends_row, parent, false) holder = ViewHolder(row) row.tag = holder } else { row = view holder = row.tag as ViewHolder } val friend = getItem(position) as FriendInfo holder.avatar.setImageResource(friend.avatar!!) holder.alias.text = friend.alias holder.email.text = friend.email return row } }
28.451613
99
0.669501
100307aca7447ded5e6f13cbea3fc3bf5559318f
752
swift
Swift
CoreDataPlatform/CoreDataPlatform/Repository/PostsRepository.swift
muzle/NewsAggregator
83bd5df502ac9b78cf6d5c7ac46319a951901f46
[ "MIT" ]
null
null
null
CoreDataPlatform/CoreDataPlatform/Repository/PostsRepository.swift
muzle/NewsAggregator
83bd5df502ac9b78cf6d5c7ac46319a951901f46
[ "MIT" ]
null
null
null
CoreDataPlatform/CoreDataPlatform/Repository/PostsRepository.swift
muzle/NewsAggregator
83bd5df502ac9b78cf6d5c7ac46319a951901f46
[ "MIT" ]
null
null
null
import Foundation import Domain import RxSwift final class PostsRepository<PostsDAO: DAO>: PostsStoreRepository, QueryablePostsRepository where PostsDAO.Entity == Post { private let postsDao: PostsDAO init(postsDao: PostsDAO) { self.postsDao = postsDao } func save(posts: [Post]) -> Single<Void> { postsDao .saveOrUpdate(entities: posts) .map { _ in } } func posts() -> Observable<[Post]> { postsDao.query(with: nil, sortDescriptors: []) } func queryPosts( with predicate: NSPredicate?, sortDescriptors: [NSSortDescriptor] ) -> Observable<[Post]> { postsDao.query(with: predicate, sortDescriptors: sortDescriptors) } }
25.931034
122
0.628989
9e79d51abd6341995d696a34312d0c5fc5f6da59
37
sql
SQL
Data Scientist Career Path/14. SQL for Interview Prep/1. Aggregate/1. Aggregate/3. sum.sql
myarist/Codecademy
2ba0f104bc67ab6ef0f8fb869aa12aa02f5f1efb
[ "MIT" ]
23
2021-06-06T15:35:55.000Z
2022-03-21T06:53:42.000Z
Data Scientist Career Path/14. SQL for Interview Prep/1. Aggregate/1. Aggregate/3. sum.sql
shivaniverma1/Data-Scientist
f82939a411484311171465591455880c8e354750
[ "MIT" ]
null
null
null
Data Scientist Career Path/14. SQL for Interview Prep/1. Aggregate/1. Aggregate/3. sum.sql
shivaniverma1/Data-Scientist
f82939a411484311171465591455880c8e354750
[ "MIT" ]
9
2021-06-08T01:32:04.000Z
2022-03-18T15:38:09.000Z
SELECT SUM(downloads) FROM fake_apps;
18.5
21
0.837838
fb656ff0ac7d84c01e11d9c9ad271551cf748b5f
11,808
asm
Assembly
untested/x64/my_string.asm
GabrielRavier/Generic-Assembly-Samples
fbf803960a14307b7fce0165058d0d4048abaf42
[ "Unlicense" ]
null
null
null
untested/x64/my_string.asm
GabrielRavier/Generic-Assembly-Samples
fbf803960a14307b7fce0165058d0d4048abaf42
[ "Unlicense" ]
null
null
null
untested/x64/my_string.asm
GabrielRavier/Generic-Assembly-Samples
fbf803960a14307b7fce0165058d0d4048abaf42
[ "Unlicense" ]
null
null
null
%include "macros.inc" global _bcopy global _bzero global _memccpy global _memchr global _memcmp global _memcpy global _memfrob global _memmem global _memmove global _mempcpy global _memrchr global _memset global _stpcpy global _stpncpy global _strcasecmp global _strcasestr global _strcat global _strchr global _strchrnul global _strcmp global _strcpy global _strcspn global _strdup global _strlen global _strncasecmp global _strncat global _strndup global _strnlen global _strpbrk global _strrchr global _strsep global _strspn global _strstr global _swab extern _malloc segment .text align=16 _bcopy: mov rax, rdi mov rdi, rsi mov rsi, rax jmp _memmove align 16 _bzero: mov rcx, rsi xor eax, eax rep stosb ret align 16 _memccpy: multipush r12, rbp, rbx mov r12, rdi mov rbp, rcx mov rbx, rsi mov rdi, rbx mov esi, edx mov rdx, rcx call _memchr test rax, rax je .notFound sub rax, rbx mov rsi, rbx pop rbx pop rbp mov rdi, r12 lea rdx, [rax + 1] pop r12 call _mempcpy .notFound: mov rdi, r12 mov rsi, rbx mov rcx, rbp rep movsb xor eax, eax multipop r12, rbp, rbx ret align 16 _memchr: dec rdx cmp rdx, -1 je .return0 .loop: mov cl, [rdi] cmp cl, sil je .found dec rdx inc rdi cmp rdx, -1 jne .loop .return0: xor eax, eax ret .found: mov rax, rdi ret align 16 _memcmp: mov rcx, rdx dec rcx cmp rcx, -1 je .return0 .loop: movzx eax, byte [rdi] movzx edx, byte [rsi] cmp eax, edx jne .found dec rcx inc rdi inc rsi cmp rcx, -1 jne .loop .return0: xor eax, eax ret .found: sub eax, edx ret align 16 _memcpy: mov rax, rdi mov rcx, rdx rep movsb ret align 16 _memfrob: mov rax, rdi lea rcx, [rsi - 1] test rsi, rsi je .return mov rdx, rdi jmp .startLoop align 16 .loop: mov rcx, rsi .startLoop: xor byte [edx], 42 lea rsi, [rcx - 1] inc rdx test rcx, rcx jne .loop .return: ret align 16 _memmem: cmp rcx, rsi seta r8b test rcx, rcx sete al or r8b, al jne .return0Early test rsi, rsi je .return0Early multipush r15, r14, r13, r12, rbp, rbx sub rsp, 40 movzx r14d, byte [rdx] cmp rcx, 1 jbe .onlyOne movzx r13d, byte [rdx + 1] xor eax, eax cmp r14b, r13b setne al inc rax xor r15d, r15d mov [rsp + 24], rax cmp r14b, r13b lea rax, [rcx - 2] sete r15b mov [rsp + 8], rax sub rsi, rcx lea rax, [rdx + 2] mov rbp, rdi inc r15 xor ebx, ebx mov [rsp + 16], rax mov r12, rsi jmp .startLoop align 16 .loop: add rbx, r15 cmp r12, rbx jb .return0 .startLoop: cmp r13b, [rbp + rbx + 1] jne .loop mov rdx, [rsp + 8] mov rdi, [rsp + 16] lea rsi, [rbp + rbx + 2] call _memcmp test eax, eax jne .notZero lea rax, [rbp + rbx] cmp r14b, [rax] je .return .notZero: add rbx, [rsp + 24] cmp r12, rbx jnb .startLoop .return0: xor eax, eax .return: add rsp, 40 multipop r15, r14, r13, r12, rbp, rbx ret .return0Early: xor eax, eax ret .onlyOne: add rsp, 40 movzx esi, r14b mov rdx, rsi multipop r15, r14, r13, r12, rbp, rbx jmp _memchr align 16 _memmove: mov rax, rsi cmp rdi, rsi je .return jbe .smaller test rdx, rdx je .return mov r8, rsi xor ecx, ecx .forwardsLoop: movzx r9d, byte [rdi] inc ecx mov [r8], r9b movsx r9, ecx inc r8 inc rdi cmp r9, rdx jb .forwardsLoop .return: ret .smaller: lea rcx, [rdx - 1] add rdi, rcx add rcx, rsi test rdx, rdx je .return xor r8d, r8d .backwardsLoop: movzx r9d, byte [rdi] inc r8d mov [rcx], r9b movsx r9, r8d dec rcx dec rdi cmp r9, rdx jb .backwardsLoop ret align 16 _mempcpy: mov rcx, rdx rep movsb mov rax, rdi ret align 16 _memrchr: dec rdx movsxd rdx, edx add rdi, rdx test rdx, rdx js .return0 .loop: mov cl, [rdi] cmp cl, sil je .returnRdi dec rdi dec rdx jns .loop .return0: xor eax, eax ret .returnRdi: mov rax, rdi ret align 16 _memset: mov r8, rdi mov eax, esi mov rcx, rdx rep stosb mov rax, r8 ret align 16 _stpcpy: mov rdx, rdi xor eax, eax mov rdi, rsi or rcx, -1 repnz scasb mov rdi, rdx mov rax, rcx not rax mov rcx, rax lea rax, [rdx + rax - 1] rep movsb ret align 16 _stpncpy: mov r11, rdi xor eax, eax mov rdi, rsi or rcx, -1 repnz scasb mov rdi, r11 not rcx lea r8, [rcx - 1] cmp rdx, r8 mov r9, r8 cmovbe r9, rdx mov rcx, r9 rep movsb mov r10, rdi jbe .return sub rdx, r9 mov rcx, rdx rep stosb .return: mov rax, r10 ret align 16 _strcasecmp: cmp rdi, rsi je .return0 xor ecx, ecx jmp .startLoop align 16 .loop: inc rcx test r8b, r8b je .return .startLoop: movzx eax, byte [rdi + rcx] lea r9d, [rax - 65] lea edx, [rax + 32] mov r8d, eax cmp r9d, 26 cmovb eax, edx movzx edx, byte [rsi + rcx] lea r10d, [rdx - 65] lea r9d, [rdx + 32] cmp r10d, 26 cmovb edx, r9d sub eax, edx je .loop .return: ret .return0: xor eax, eax ret align 16 _strcasestr: multipush r14, r13, r12, rbp, rbx mov r13, rdi movzx eax, byte [rsi] test al, al je .return0 lea edx, [rax - 65] cmp edx, 25 ja .above add eax, 32 .above: lea r12, [rsi + 1] mov ebp, eax or rcx, -1 xor eax, eax mov rdi, r12 repnz scasb mov rbx, rcx not rbx lea rbx, [rbx - 1] .loop: lea r14, [r13 + 1] movzx eax, byte [r14 - 1] test al, al je .return0 lea edx, [rax - 65] cmp edx, 25 ja .above2 add eax, 32 .above2: cmp bpl, al je .doCaseCmp .continue: mov r13, r14 jmp .loop .doCaseCmp: mov rdx, rbx mov rsi, r12 mov rdi, r14 call _strncasecmp test eax, eax jne .continue jmp .return .return0: xor r13d, r13d .return: mov rax, r13 multipop r14, r13, r12, rbp, rbx ret align 16 _strcat: or r9, -1 xor eax, eax mov rdx, rdi mov rcx, r9 repnz scasb mov rdi, rsi not rcx mov r8, rcx mov rcx, r9 repnz scasb lea rax, [rdx + r8 - 1] mov rdi, rax mov rax, rdx not rcx rep movsb ret align 16 _strchr: mov rax, rdi jmp .startLoop align 16 .loop: inc rax test dl, dl je .return0 .startLoop: movzx edx, byte [rax] cmp dl, sil jne .loop ret .return0: xor eax, eax ret align 16 _strchrnul: jmp .startLoop align 16 .loop: inc rdi .startLoop: mov dl, [rdi] cmp dl, sil je .returnRdi test dl, dl jne .loop .returnRdi: mov rax, rdi ret align 16 _strcmp: xor ecx, ecx .loop: movzx eax, byte [rdi + rcx] movzx edx, byte [rsi + rcx] inc rcx test eax, eax je .return cmp eax, edx je .loop sub eax, edx ret .return: neg edx mov eax, edx ret align 16 _strcpy: mov rdx, rdi xor eax, eax mov rdi, rsi or rcx, -1 repnz scasb mov rdi, rdx mov rax, rdx not rcx rep movsb ret align 16 _strcspn: multipush r12, rbp, rbx mov r12, rsi mov rbp, rdi xor ebx, ebx .loop: movsx esi, byte [rbp + rbx] test sil, sil je .return mov rdi, r12 call _strchr test rax, rax jne .return inc rbx jmp .loop .return: mov rax, rbx multipop r12, rbp, rbx ret align 16 _strdup: push rbx xor eax, eax or rcx, -1 mov rbx, rdi sub rsp, 16 repnz scasb mov rsi, rcx not rsi mov rdi, rsi mov [rsp + 8], rsi call _malloc mov rdx, rax xor eax, eax test rdx, rdx je .return mov rdi, rdx mov rsi, rbx mov rcx, [rsp + 8] mov rax, rdx rep movsb .return: add rsp, 16 pop rbx ret align 16 _strlen: xor eax, eax or rcx, -1 repnz scasb mov rax, rcx not rax dec rax ret align 16 _strncasecmp: cmp rdi, rsi je .return0 test rdx, rdx je .return0 xor r8d, r8d jmp .startLoop align 16 .loop: test r9b, r9b je .return inc r8 cmp rdx, r8 je .return .startLoop: movzx eax, byte [rdi + r8] lea r10d, [rax - 65] cmp r10d, 26 lea ecx, [rax + 32] mov r9d, eax cmovb eax, ecx movzx ecx, byte [rsi + r8] lea r11d, [rcx - 64] lea r10d, [rcx + 32] cmp r11d, 26 cmovb ecx, r10d sub eax, ecx je .loop .return: ret .return0: xor eax, eax ret align 16 _strncat: or r10, -1 xor eax, eax mov rcx, r10 mov r8, rdi repnz scasb mov rdi, rsi not rcx lea r9, [r8 + rcx - 1] mov rcx, r10 repnz scasb mov rdi, r9 mov rax, r8 not rcx add rcx, r10 cmp rdx, rcx cmovbe rcx, rdx mov byte [r9 + rcx], 0 rep movsb ret align 16 _strncmp: test rdx, rdx je .return0 jmp .startLoop align 16 .loop: inc rdi inc rsi .startLoop: test rdx, rdx jbe .endLoop mov al, [rdi] dec rdx cmp al, [rsi] jne .endLoop test rdx, rdx je .return0 test al, al je .return0 jmp .loop .endLoop: movzx edx, byte [rdi] movzx eax, byte [rsi] cmp edx, eax jge .compare mov eax, -1 ret .compare: sub eax, edx shr eax, 31 ret .return0: xor eax, eax ret align 16 _strncpy: mov r9, rdi xor eax, eax or rcx, -1 mov rdi, rsi repnz scasb not rcx lea r8, [rcx - 1] cmp rdx, r8 jb .biggerity je .equality sub rdx, r8 mov rcx, rdx lea rdx, [r9 + r8] mov rdi, rdx rep stosb jmp .equality .biggerity: mov r8, rdx .equality: mov rdi, r9 mov rcx, r8 mov rax, r9 rep movsb ret align 16 _strndup: push rbp or rcx, -1 xor eax, eax sub rsp, 16 mov rbp, rdi repnz scasb not rcx mov rdx, rcx dec rcx cmp rsi, rcx cmovbe rcx, rsi lea rdi, [rcx + 1] mov [rsp + 8], rcx call _malloc test rax, rax je .return mov rcx, [rsp + 8] mov rdi, rax mov rsi, rbp mov byte [rax + rcx], 0 rep movsb .return: add rsp, 16 pop rbp ret align 16 _strnlen: xor eax, eax or rcx, -1 repnz scasb mov rax, rsi not rcx dec rcx cmp rcx, rsi cmovbe rax, rcx ret align 16 _strpcrk: push rbx mov rbx, rdi call _strcspn mov edx, 0 add rax, rbx pop rbx cmp byte [rax], 0 cmove rax, rdx ret align 16 _strrchr: multipush rbp, rbx, rcx mov rdx, rdi mov ebx, esi and ebx, 0xFF jne .notZero or rcx, -1 xor eax, eax repnz scasb mov rsi, rcx not rsi lea rbp, [rdx + rsi - 1] jmp .returnRbp .notZero: xor ebp, ebp .loop: mov esi, ebx mov rdi, rdx call _strchr test rax, rax je .returnRbp lea rdx, [rax + 1] mov rbp, rax jmp .loop .returnRbp: mov rax, rbp multipop rbp, rbx, rcx ret align 16 _strsep: multipush rbp, rbx sub rsp, 8 mov rbx, [rdi] test rbx, rbx je .returnRbx mov rbp, rdi mov rdi, rbx call _strcspn add rax, rbx cmp byte [rax], 0 je .noDelim mov byte [eax], 0 inc rax mov [rbp], rax .returnRbx: add rsp, 8 mov rax, rbx pop rbx pop rbp ret .noDelim: mov qword [rbp], 0 add rsp, 8 mov rax, rbx multipop rbp, rbx ret align 16 _strspn: multipush r12, rbp, rbx movzx eax, byte [rdi] test al, al je .return0 mov r12, rsi mov rbp, rdi xor ebx, ebx jmp .startLoop align 16 .loop: inc rbx movzx eax, byte [rbp + rbx] test al, al je .returnRbx .startLoop: movsx esi, al mov rdi, r12 call _strchr test rax, rax jne .loop .returnRbx: mov rax, rbx multipop r12, rbp, rbx ret .return0: xor ebx, ebx jmp .returnRbx align 16 _strstr: multipush r13, r12, rbp, rbx, rcx xor eax, eax mov r12, rsi mov rbx, rdi mov rdi, rsi or rcx, -1 repnz scasb mov rdx, rcx not rdx lea rbp, [rdx - 1] .loop: cmp byte [rbx], 0 je .return0 mov rdx, rbp mov rsi, r12 lea r13, [rbx + 1] mov rdi, rbx call _memcmp test eax, eax je .return mov rbx, r13 jmp .loop .return0: xor ebx, ebx .return: mov rax, rbx multipop r13, r12, rbp, rbx, rcx ret align 16 _swab: and rdx, -2 cmp rdx, 1 jle .return .loop: movzx ecx, byte [rdi + rdx - 1] sub rdx, 2 movzx eax, byte [rdi + rbx] mov [rsi + rdx], cl mov [rsi + rdx + 1], al jne .loop .return: ret
9.90604
39
0.621951
c6677e7c59fc57e098c337ac8f03854f5608e3d2
2,500
swift
Swift
APITestDemo/ViewController.swift
eajang/iOS-Example-APITest
afb830ba55f56578d47ed7cf8a9e26261a35ec87
[ "MIT" ]
null
null
null
APITestDemo/ViewController.swift
eajang/iOS-Example-APITest
afb830ba55f56578d47ed7cf8a9e26261a35ec87
[ "MIT" ]
null
null
null
APITestDemo/ViewController.swift
eajang/iOS-Example-APITest
afb830ba55f56578d47ed7cf8a9e26261a35ec87
[ "MIT" ]
null
null
null
// // ViewController.swift // APITestDemo // // Created by Eunae Jang on 23/09/2019. // Copyright ยฉ 2019 Eunae Jang. All rights reserved. // import UIKit class ViewController: UIViewController { @IBOutlet weak var titleLabel: UILabel! @IBOutlet weak var descriptionLabel: UILabel! @IBOutlet weak var copyrightLabel: UILabel! @IBOutlet weak var imageView: UIImageView! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. self.fetchPhotoInfo { (photoInfo) in if let photoInfo = photoInfo { self.updateUI(photoInfo: photoInfo) } } } func inforForKey(_ key: String) -> String? { return (Bundle.main.infoDictionary?[key] as? String)? .replacingOccurrences(of: "\\", with: "") } func fetchPhotoInfo(completion: @escaping (PhotoInfo?) -> Void) { let baseURL = URL(string: "https://api.nasa.gov/planetary/apod")! let apiKey = self.inforForKey("Nasa api key")! let query: [String: String] = [ "api_key": apiKey, "date": "2019-09-23" ] let url = baseURL.withQueries(query)! let task = URLSession.shared.dataTask(with: url) { (data, response, error) in let jsonDecoder = JSONDecoder() if let data = data, let photoInfo = try? jsonDecoder.decode(PhotoInfo.self, from: data) { completion(photoInfo) } else { print("Either no data was returned, or data was not serialized.") completion(nil) } } task.resume() } func updateUI(photoInfo: PhotoInfo) { let task = URLSession.shared.dataTask(with: photoInfo.url, completionHandler: { (data, response, error) in if let data = data, let image = UIImage(data: data) { DispatchQueue.main.async { self.titleLabel.text = photoInfo.title self.imageView.image = image self.descriptionLabel.text = photoInfo.description if let copyright = photoInfo.copyright { self.copyrightLabel.text = "Copyright \(copyright)" } else { self.copyrightLabel.isHidden = true } } } }) task.resume() } }
32.894737
114
0.5504
6dc2f8d70fe7c9fe4c2c3e4733ad5adab0ca4160
127
lua
Lua
src/server/RobloxCalculator/Roact/modules/lemur/lib/Enum/VirtualInputMode.lua
havi11/RBX-Calculator-Plugin
c80978ab4c4bdd9c87bebdd1a906ba3780a6d5cf
[ "Apache-2.0" ]
54
2017-12-13T20:02:26.000Z
2022-02-20T11:13:47.000Z
src/server/RobloxCalculator/Roact/modules/lemur/lib/Enum/VirtualInputMode.lua
havi11/RBX-Calculator-Plugin
c80978ab4c4bdd9c87bebdd1a906ba3780a6d5cf
[ "Apache-2.0" ]
203
2017-12-09T00:30:01.000Z
2020-06-17T21:00:22.000Z
src/server/RobloxCalculator/Roact/modules/lemur/lib/Enum/VirtualInputMode.lua
havi11/RBX-Calculator-Plugin
c80978ab4c4bdd9c87bebdd1a906ba3780a6d5cf
[ "Apache-2.0" ]
35
2017-12-14T04:24:12.000Z
2022-03-26T06:57:59.000Z
local createEnum = import("../createEnum") return createEnum("VirtualInputMode", { None = 0, Recording = 1, Playing = 2, })
18.142857
42
0.677165
85aaea2d8d6cd24db679fb5f364b82dd4defd70b
2,850
js
JavaScript
Gruntfile.js
nicolasiugo/hapi-base-folder-structure
023d396a8d61b9ca351efe9c966936241d7eaed1
[ "MIT" ]
null
null
null
Gruntfile.js
nicolasiugo/hapi-base-folder-structure
023d396a8d61b9ca351efe9c966936241d7eaed1
[ "MIT" ]
null
null
null
Gruntfile.js
nicolasiugo/hapi-base-folder-structure
023d396a8d61b9ca351efe9c966936241d7eaed1
[ "MIT" ]
null
null
null
"use strict"; module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), env : { dev : { NODE_PATH : '.' } }, concurrent: { dev: { tasks: ['nodemon', 'node-inspector', 'watch', 'mochaTest', 'jscs'], options: { limit: 5, logConcurrentOutput: true } } }, 'node-inspector': { custom: { options: { 'web-port': 8081, 'web-host': 'localhost', 'debug-port': 5858, 'save-live-edit': false, 'no-preload': false, 'stack-trace-limit': 50 } } }, nodemon: { dev: { script: 'index.js', options: { //DEFAULT DEBUG PORT: 5858 nodeArgs: ['--debug'] } } }, watch: { server: { files: ['**/*.js', '!node_modules/**/*.js', '!coverage.html'], tasks: ['jshint:with_overrides', 'mochaTest'], options: { livereload: true } } }, mochaTest: { test: { options: { reporter: 'min', should: require('should') }, src: ['test/unit/**/*.js'] }, coverage: { options: { reporter: 'html-cov', // use the quiet flag to suppress the mocha console output quiet: true, // specify a destination file to capture the mocha // output (the quiet option does not suppress this) captureFile: 'coverage.html' }, src: ['test/unit/**/*.js'] }, 'travis-cov': { options: { reporter: 'travis-cov' }, src: ['test/unit/**/*.js'] } }, jshint: { //docs: http://www.jshint.com/docs/options/ src: ['**/*.js', '!node_modules/**/*.js', '!coverage.html'], options: { node: true, strict: true, laxcomma: true, noarg: true, noempty: true, undef: true, maxdepth: 2, maxlen: 100, sub: true }, with_overrides: { options: { expr: true, globals: { /* MOCHA */ describe : false, it : false, before : false, beforeEach : false, after : false, afterEach : false, should : false } }, files: { src: ['test/**/*.js'] }, } }, jscs: { src: ['**/*.js', '!node_modules/**/*.js', '!coverage.html', '!Gruntfile.js', '!test/unit/*.js'], options: { config: ".jscsrc", verbose: true // If you need output with rule names http://jscs.info/overview.html#verbose } } }); grunt.loadNpmTasks('grunt-concurrent'); grunt.loadNpmTasks('grunt-nodemon'); grunt.loadNpmTasks('grunt-node-inspector'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-mocha-test'); grunt.loadNpmTasks('grunt-env'); grunt.loadNpmTasks("grunt-jscs"); grunt.registerTask('default', ['env:dev', 'concurrent:dev']); grunt.registerTask('run-server', ['env:dev', 'nodemon:dev']); };
21.923077
101
0.542105
b9130523b61fd07bf28190cc401d7e41e0d6b4e1
2,920
h
C
base_lib/include/loginmanager.h
xuepingiw/open_source_startalk
44d962b04039f5660ec47a10313876a0754d3e72
[ "MIT" ]
34
2019-03-18T08:09:24.000Z
2022-03-15T02:03:25.000Z
base_lib/include/loginmanager.h
venliong/open_source_startalk
51fda091a932a8adea626c312692836555753a9a
[ "MIT" ]
5
2019-05-29T09:32:05.000Z
2019-08-29T03:01:33.000Z
base_lib/include/loginmanager.h
venliong/open_source_startalk
51fda091a932a8adea626c312692836555753a9a
[ "MIT" ]
32
2019-03-15T09:43:22.000Z
2021-08-10T08:26:02.000Z
๏ปฟ#ifndef LOGINMANAGER_H #define LOGINMANAGER_H #include <QObject> #include "managerbase.h" #include "define.h" class QXmppControlManager; namespace Biz { enum LoginStatus { LoginStatus_None=0, LoginStatus_Connect, LoginStatus_Disconnect }; class LoginNavConfigInfo; class LoginManager : public ManagerBase { Q_OBJECT public: LoginManager(); ~LoginManager(); public: virtual void initManager(); virtual void unInitManager(); public: inline LoginStatus getCurrentLoginStatus()const {return mLoginStatus;}; inline bool isLogin(){return mLoginStatus == LoginStatus_Connect;}; public: QString getNavConfig(); void doSigninXmpp(Biz::UnitCallback<QSharedPointer<Biz::CheckVersionUpdate>>* versioncalback); void doSignoutXmpp(); void startLogin(); void getLoginToken(); void startLoginWidthgetToken(); void getLoginNav(GeneralCallback* callback); void getLoginNav(const QString&url, GeneralCallback* callback); void getOnlyLoginNav(const QString& url); // ๅˆคๆ–ญๆ˜ฏๅฆๆ˜ฏ่‡ชๅŠจๆŽจ้€ๅ‡็บง void checkAutoUpdate(const QSharedPointer<Biz::CheckVersionUpdate>& updataInfo ); void getQVT(Biz::GeneralCallback* getQvtCallback); quint64 getServerTimeWithOffset(); void doErCodeInfoToServer(const QString&qrcodekey, Biz::UnitCallback<QString>* callback); void doErCodeInfoCancel(const QString&qrcodeKey, Biz::UnitCallback<bool>* callback); void doErCodeAuthInfo(const QString& qrcodeKey, int phase, Biz::UnitCallback<QString>* callback); protected: QString makeQVTParam(); void loginWithToken(); void getRsaKey(const QString& filePathName, int Type, GeneralCallback* callback ); private: LoginStatus mLoginStatus; QXmppControlManager* pControlMgr; signals: void sgzhuxiao(); void sgLoginOut(); void sgConnected(); void sgDisconnected(); void sgLoginStatusChange(LoginStatus oldstatus,LoginStatus newstatus); void sgLoginFail(int nFirstError, int nSecendError); void sgUpdateLoginInfo(const QString& errmsg); void sgServerPolicyViolation(int nError, const QString&reason); void sgLoginInfo(const QString& loginInfo); void sgVersionUpdated(const QSharedPointer<CheckVersionUpdate>& update, LoginParam loginPar); void sgCheckAutoUpdate(const QSharedPointer<Biz::CheckVersionUpdate>& pUpdateInfo,const QString& localPath); void sgWebLogin(); // ๅขžๅผบ้ชŒ่ฏ void sghttpRespFail(); //http ่ฏทๆฑ‚ๅคฑ่ดฅ void sgLoginUpdate(); void sgErCodeLogin(); void sgResultInfor(const QString& strinfo); void sgAuthUserInfor(const QString&userurl, const QString&nickname ); void sgServerPolicyViolationRelogin(int nError); public slots: void onConnected(); void onDisconnected(); void onKitOffline(); }; } #endif // LOGINMANAGER_H
32.087912
116
0.715411
56babdf2f8d08e5c265ca8c7ae7b04565d0b0d1c
1,394
ts
TypeScript
src/Common.ts
huang2002/3h-math
af401ed89238d8b0bceabc94719b10569dd3be84
[ "MIT" ]
null
null
null
src/Common.ts
huang2002/3h-math
af401ed89238d8b0bceabc94719b10569dd3be84
[ "MIT" ]
null
null
null
src/Common.ts
huang2002/3h-math
af401ed89238d8b0bceabc94719b10569dd3be84
[ "MIT" ]
null
null
null
/** * Common utilities. */ export namespace Common { /** dts2md break */ /** * Whether to check input data. * (Validation can be disabled to improve performance * at the cost of potential errors.) * @default true */ export let checkInput = true; /** dts2md break */ /** * Type of array initializers. */ export type ArrayInitializer<T> = (_: void, index: number) => T; /** dts2md break */ /** * Create an array of the given length and * initialize each element using provided initializer. */ export const createArray = <T>( length: number, initializer: ArrayInitializer<T>, ): T[] => ( Array.from({ length }, initializer) ); /** dts2md break */ /** * Assert that the given two dimensions are equal. */ export const assertSameDimension = (d1: number, d2: number) => { if (d1 !== d2) { throw new RangeError( `dimensions don't match (${d1} !== ${d2})` ); } }; /** dts2md break */ /** * Asserts that the given dimension is valid. */ export const validateDimension = (dimension: number) => { if ((dimension <= 0) || !Number.isInteger(dimension)) { throw new RangeError( `invalid dimension (${dimension})` ); } }; }
26.301887
68
0.530846
136fc6caa5f34e6774ca76874dc27b77f0075096
1,328
h
C
usr/libexec/appstored/TestFlightFeedbackDatabaseSession.h
lechium/tvOS144Headers
e22dcf52662ae03002e3a6d57273f54e74013cb0
[ "MIT" ]
2
2021-04-15T10:50:21.000Z
2021-08-19T19:00:09.000Z
usr/sbin/usr/libexec/appstored/TestFlightFeedbackDatabaseSession.h
lechium/tvOS144Headers
e22dcf52662ae03002e3a6d57273f54e74013cb0
[ "MIT" ]
null
null
null
usr/sbin/usr/libexec/appstored/TestFlightFeedbackDatabaseSession.h
lechium/tvOS144Headers
e22dcf52662ae03002e3a6d57273f54e74013cb0
[ "MIT" ]
null
null
null
// // Generated by classdumpios 1.0.1 (64 bit) (iOS port by DreamDevLost)(Debug version compiled Sep 26 2020 13:48:20). // // Copyright (C) 1997-2019 Steve Nygard. // #import <objc/NSObject.h> #import "SQLiteDatabaseSession-Protocol.h" @class NSString, SQLiteConnection; @interface TestFlightFeedbackDatabaseSession : NSObject <SQLiteDatabaseSession> { SQLiteConnection *_connection; // 8 = 0x8 } - (void).cxx_destruct; // IMP=0x00000001000973f0 @property(readonly) SQLiteConnection *connection; // @synthesize connection=_connection; - (id)_predicateForProxy:(id)arg1; // IMP=0x00000001000971e8 - (_Bool)isLaunchScreenEnabledForApplicationProxy:(id)arg1; // IMP=0x00000001000970e8 - (_Bool)isFeedbackEnabledForApplicationProxy:(id)arg1; // IMP=0x0000000100096fe8 - (id)feedbackEntityForPID:(long long)arg1; // IMP=0x0000000100096f08 - (id)emailAddressForApplicationProxy:(id)arg1; // IMP=0x0000000100096e20 - (id)displayNamesForApplicationProxy:(id)arg1; // IMP=0x0000000100096d44 - (id)allFeedbackEntities; // IMP=0x0000000100096c20 - (id)initWithConnection:(id)arg1; // IMP=0x0000000100096ba8 // Remaining properties @property(readonly, copy) NSString *debugDescription; @property(readonly, copy) NSString *description; @property(readonly) unsigned long long hash; @property(readonly) Class superclass; @end
35.891892
120
0.779367
9c2edf400276d92860ba1b57e7003fc31ddf414c
127
js
JavaScript
app/pages/painters.component.js
OksanaKovalchuk/ksiu_ang_App
66f927c26bf0eb81f97477f9d9ff7f31aae4748d
[ "MIT" ]
null
null
null
app/pages/painters.component.js
OksanaKovalchuk/ksiu_ang_App
66f927c26bf0eb81f97477f9d9ff7f31aae4748d
[ "MIT" ]
null
null
null
app/pages/painters.component.js
OksanaKovalchuk/ksiu_ang_App
66f927c26bf0eb81f97477f9d9ff7f31aae4748d
[ "MIT" ]
null
null
null
'use strict'; angular. module('pictures',[]). component('pictures', { templateUrl: 'pages/story.template.html' });
18.142857
44
0.629921
f73ee1f4e6b7a7147baeb471c4f963ac72b8dbca
17,528
c
C
shell/ext/brfcase/filesync/syncui/cache.c
npocmaka/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
17
2020-11-13T13:42:52.000Z
2021-09-16T09:13:13.000Z
shell/ext/brfcase/filesync/syncui/cache.c
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
2
2020-10-19T08:02:06.000Z
2020-10-19T08:23:18.000Z
shell/ext/brfcase/filesync/syncui/cache.c
sancho1952007/Windows-Server-2003
5c6fe3db626b63a384230a1aa6b92ac416b0765f
[ "Unlicense" ]
14
2020-11-14T09:43:20.000Z
2021-08-28T08:59:57.000Z
//--------------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation 1993-1994 // // File: cache.c // // This files contains code for the common cache lists // // History: // 09-02-93 ScottH Created // 01-31-94 ScottH Split into separate files // //--------------------------------------------------------------------------- ///////////////////////////////////////////////////// INCLUDES #include "brfprv.h" // common headers ///////////////////////////////////////////////////// TYPEDEFS typedef struct tagCITEM { int atomKey; DEBUG_CODE( LPCTSTR pszKey; ) LPVOID pvValue; UINT ucRef; } CITEM; // item for generic cache #define Cache_EnterCS(this) EnterCriticalSection(&(this)->cs) #define Cache_LeaveCS(this) LeaveCriticalSection(&(this)->cs) #define CACHE_GROW 8 #define Cache_Bogus(this) (!(this)->hdpa || !(this)->hdpaFree || !(this)->hdsa) // Given an index into the DPA, get the pointer to the DSA // #define MyGetPtr(this, idpa) DSA_GetItemPtr((this)->hdsa, PtrToUlong(DPA_FastGetPtr((this)->hdpa, idpa))) #define DSA_GetPtrIndex(hdsa, ptr, cbItem) \ ((int)( (DWORD_PTR)(ptr) - (DWORD_PTR)DSA_GetItemPtr(hdsa, 0) ) / (cbItem)) /*---------------------------------------------------------- Purpose: Compare two CRLs by pathname Returns: -1 if <, 0 if ==, 1 if > Cond: -- */ int CALLBACK _export Cache_CompareIndexes( LPVOID lpv1, LPVOID lpv2, LPARAM lParam) { int i1 = PtrToUlong(lpv1); int i2 = PtrToUlong(lpv2); HDSA hdsa = (HDSA)lParam; CITEM * pitem1 = (CITEM *)DSA_GetItemPtr(hdsa, i1); CITEM * pitem2 = (CITEM *)DSA_GetItemPtr(hdsa, i2); if (pitem1->atomKey < pitem2->atomKey) return -1; else if (pitem1->atomKey == pitem2->atomKey) return 0; else return 1; } /*---------------------------------------------------------- Purpose: Compare two CRLs by pathname Returns: -1 if <, 0 if ==, 1 if > Cond: -- */ int CALLBACK _export Cache_Compare( LPVOID lpv1, LPVOID lpv2, LPARAM lParam) { // HACK: we know the first param is the address to a struct // that contains the search criteria. The second is an index // into the DSA. // int i2 = PtrToUlong(lpv2); HDSA hdsa = (HDSA)lParam; CITEM * pitem1 = (CITEM *)lpv1; CITEM * pitem2 = (CITEM *)DSA_GetItemPtr(hdsa, i2); if (pitem1->atomKey < pitem2->atomKey) return -1; else if (pitem1->atomKey == pitem2->atomKey) return 0; else return 1; } /*---------------------------------------------------------- Purpose: Initialize the cache structure Returns: TRUE on success Cond: -- */ BOOL PUBLIC Cache_Init( CACHE * pcache) { BOOL bRet; ASSERT(pcache); Cache_EnterCS(pcache); { if ((pcache->hdsa = DSA_Create(sizeof(CITEM), CACHE_GROW)) != NULL) { if ((pcache->hdpa = DPA_Create(CACHE_GROW)) == NULL) { DSA_Destroy(pcache->hdsa); pcache->hdsa = NULL; } else { if ((pcache->hdpaFree = DPA_Create(CACHE_GROW)) == NULL) { DPA_Destroy(pcache->hdpa); DSA_Destroy(pcache->hdsa); pcache->hdpa = NULL; pcache->hdsa = NULL; } } } bRet = pcache->hdsa != NULL; } Cache_LeaveCS(pcache); return bRet; } /*---------------------------------------------------------- Purpose: Initializes the cache's critical section. Returns: -- Cond: -- */ void PUBLIC Cache_InitCS( CACHE * pcache) { ASSERT(pcache); ZeroInit(pcache, CACHE); InitializeCriticalSectionAndSpinCount(&pcache->cs, 0); } /*---------------------------------------------------------- Purpose: Destroy the cache Returns: -- Cond: -- */ void PUBLIC Cache_Term( CACHE * pcache, HWND hwndOwner, PFNFREEVALUE pfnFree) { ASSERT(pcache); Cache_EnterCS(pcache); { if (pcache->hdpa != NULL) { CITEM * pitem; int idpa; int cItem; ASSERT(pcache->hdsa != NULL); cItem = DPA_GetPtrCount(pcache->hdpa); for (idpa = 0; idpa < cItem; idpa++) { pitem = MyGetPtr(pcache, idpa); if (pfnFree != NULL) pfnFree(pitem->pvValue, hwndOwner); // Decrement reference count of atomKey Atom_Delete(pitem->atomKey); } DPA_Destroy(pcache->hdpa); pcache->hdpa = NULL; } if (pcache->hdpaFree != NULL) { DPA_Destroy(pcache->hdpaFree); pcache->hdpaFree = NULL; } if (pcache->hdsa != NULL) { DSA_Destroy(pcache->hdsa); pcache->hdsa = NULL; } } Cache_LeaveCS(pcache); } /*---------------------------------------------------------- Purpose: Deletes the cache's critical section. Returns: -- Cond: -- */ void PUBLIC Cache_DeleteCS( CACHE * pcache) { // The cache should not be in use now (ie, it should be bogus) ASSERT(Cache_Bogus(pcache)); if (Cache_Bogus(pcache)) { DeleteCriticalSection(&pcache->cs); } } /*---------------------------------------------------------- Purpose: Add an item to the cache list. Returns: TRUE on success Cond: If this fails, pvValue is not automatically freed */ BOOL PUBLIC Cache_AddItem( CACHE * pcache, int atomKey, LPVOID pvValue) { BOOL bRet = FALSE; CITEM * pitem = NULL; int cItem; int cFree; ASSERT(pcache); Cache_EnterCS(pcache); { VALIDATE_ATOM(atomKey); if (!Cache_Bogus(pcache)) { int iItem; // Add a new entry to the cache. The cache has no set size limitation. // cFree = DPA_GetPtrCount(pcache->hdpaFree); if (cFree > 0) { // Use a free entry // cFree--; iItem = PtrToUlong(DPA_DeletePtr(pcache->hdpaFree, cFree)); pitem = DSA_GetItemPtr(pcache->hdsa, iItem); } else { CITEM itemDummy; // Allocate a new entry // cItem = DSA_GetItemCount(pcache->hdsa); if ((iItem = DSA_InsertItem(pcache->hdsa, cItem+1, &itemDummy)) != -1) pitem = DSA_GetItemPtr(pcache->hdsa, iItem); } // Fill in the info // if (pitem) { pitem->ucRef = 0; pitem->pvValue = pvValue; pitem->atomKey = atomKey; DEBUG_CODE( pitem->pszKey = Atom_GetName(atomKey); ) // Now increment the reference count on this atomKey so it doesn't // get deleted from beneath us! Atom_AddRef(atomKey); // Add the new entry to the ptr list and sort // cItem = DPA_GetPtrCount(pcache->hdpa); if (DPA_InsertPtr(pcache->hdpa, cItem+1, IntToPtr(iItem)) == -1) goto Add_Fail; DPA_Sort(pcache->hdpa, Cache_CompareIndexes, (LPARAM)pcache->hdsa); // Reset the FindFirst/FindNext in case this gets called in the // middle of an enumeration. // pcache->atomPrev = ATOM_ERR; bRet = TRUE; } Add_Fail: if (!bRet) { // Add the entry to the free list and fail. If even this // fails, we simply lose some slight efficiency, but this is // not a memory leak. // DPA_InsertPtr(pcache->hdpaFree, cFree+1, IntToPtr(iItem)); } } } Cache_LeaveCS(pcache); return bRet; } /*---------------------------------------------------------- Purpose: Delete an item from the cache. If the reference count is 0, we do nothing. This also frees the actual value as well, using the pfnFreeValue function. Returns: The reference count. If 0, then we deleted it from cache. Cond: N.b. Decrements the reference count. */ int PUBLIC Cache_DeleteItem( CACHE * pcache, int atomKey, BOOL bNuke, // TRUE to ignore reference count HWND hwndOwner, PFNFREEVALUE pfnFree) { int nRet = 0; CITEM item; CITEM * pitem; int idpa; int cFree; ASSERT(pcache); Cache_EnterCS(pcache); { if (!Cache_Bogus(pcache)) { item.atomKey = atomKey; idpa = DPA_Search(pcache->hdpa, &item, 0, Cache_Compare, (LPARAM)pcache->hdsa, DPAS_SORTED); if (idpa != -1) { VALIDATE_ATOM(atomKey); pitem = MyGetPtr(pcache, idpa); if (!bNuke && pitem->ucRef-- > 0) { nRet = pitem->ucRef+1; } else { int iItem; DPA_DeletePtr(pcache->hdpa, idpa); // Free old pointer if (pfnFree != NULL) pfnFree(pitem->pvValue, hwndOwner); Atom_Delete(pitem->atomKey); DEBUG_CODE( pitem->atomKey = -1; ) DEBUG_CODE( pitem->pszKey = NULL; ) DEBUG_CODE( pitem->pvValue = NULL; ) DEBUG_CODE( pitem->ucRef = 0; ) // Reset the FindFirst/FindNext in case this gets // called in the middle of an enumeration. // pcache->atomPrev = ATOM_ERR; // Add ptr to the free list. If this fails, we simply lose // some efficiency in reusing this portion of the cache. // This is not a memory leak. // cFree = DPA_GetPtrCount(pcache->hdpaFree); iItem = DSA_GetPtrIndex(pcache->hdsa, pitem, sizeof(CITEM)); DPA_InsertPtr(pcache->hdpaFree, cFree+1, IntToPtr(iItem)); } } } } Cache_LeaveCS(pcache); return nRet; } /*---------------------------------------------------------- Purpose: Replace the contents of the value in the cache list. If a value does not exist for the given key, return FALSE. Returns: TRUE if success Cond: -- */ BOOL PUBLIC Cache_ReplaceItem( CACHE * pcache, int atomKey, LPVOID pvBuf, int cbBuf) { BOOL bRet = FALSE; CITEM item; CITEM * pitem; int idpa; ASSERT(pcache); Cache_EnterCS(pcache); { if (!Cache_Bogus(pcache)) { // Search for an existing cache entry // item.atomKey = atomKey; idpa = DPA_Search(pcache->hdpa, &item, 0, Cache_Compare, (LPARAM)pcache->hdsa, DPAS_SORTED); if (idpa != -1) { // Found a value for this key. Replace the contents. // pitem = MyGetPtr(pcache, idpa); ASSERT(pitem); BltByte(pvBuf, pitem->pvValue, cbBuf); bRet = TRUE; // No need to sort because key hasn't changed. } } } Cache_LeaveCS(pcache); return bRet; } /*---------------------------------------------------------- Purpose: Get the value of the given key and return a ptr to it Returns: Ptr to actual entry Cond: Reference count is incremented */ LPVOID PUBLIC Cache_GetPtr( CACHE * pcache, int atomKey) { LPVOID pvRet = NULL; CITEM item; CITEM * pitem; int idpa; ASSERT(pcache); Cache_EnterCS(pcache); { if (!Cache_Bogus(pcache)) { item.atomKey = atomKey; idpa = DPA_Search(pcache->hdpa, &item, 0, Cache_Compare, (LPARAM)pcache->hdsa, DPAS_SORTED); if (idpa != -1) { pitem = MyGetPtr(pcache, idpa); ASSERT(pitem); pitem->ucRef++; pvRet = pitem->pvValue; } } } Cache_LeaveCS(pcache); return pvRet; } #ifdef DEBUG /*---------------------------------------------------------- Purpose: Get the current reference count Returns: Ptr to actual entry Cond: Used for debugging */ UINT PUBLIC Cache_GetRefCount( CACHE * pcache, int atomKey) { UINT ucRef = (UINT)-1; CITEM item; CITEM * pitem; int idpa; ASSERT(pcache); Cache_EnterCS(pcache); { if (!Cache_Bogus(pcache)) { item.atomKey = atomKey; idpa = DPA_Search(pcache->hdpa, &item, 0, Cache_Compare, (LPARAM)pcache->hdsa, DPAS_SORTED); if (idpa != -1) { pitem = MyGetPtr(pcache, idpa); ASSERT(pitem); ucRef = pitem->ucRef; } } } Cache_LeaveCS(pcache); return ucRef; } #endif /*---------------------------------------------------------- Purpose: Get the value of the given key and return a copy of it in the supplied buffer Returns: Copy of value in buffer TRUE if found, FALSE if not Cond: -- */ BOOL PUBLIC Cache_GetItem( CACHE * pcache, int atomKey, LPVOID pvBuf, int cbBuf) { BOOL bRet = FALSE; CITEM item; CITEM * pitem; int idpa; ASSERT(pcache); Cache_EnterCS(pcache); { if (!Cache_Bogus(pcache)) { item.atomKey = atomKey; idpa = DPA_Search(pcache->hdpa, &item, 0, Cache_Compare, (LPARAM)pcache->hdsa, DPAS_SORTED); if (idpa != -1) { pitem = MyGetPtr(pcache, idpa); ASSERT(pitem); BltByte(pvBuf, pitem->pvValue, cbBuf); bRet = TRUE; } } } Cache_LeaveCS(pcache); return bRet; } /*---------------------------------------------------------- Purpose: Get the first key in the cache. Returns: Atom ATOM_ERR if cache is empty Cond: -- */ int PUBLIC Cache_FindFirstKey( CACHE * pcache) { int atomRet = ATOM_ERR; CITEM * pitem; ASSERT(pcache); Cache_EnterCS(pcache); { if (!Cache_Bogus(pcache)) { int i; pcache->iPrev = 0; if (DPA_GetPtrCount(pcache->hdpa) > 0) { i = PtrToUlong(DPA_FastGetPtr(pcache->hdpa, 0)); pitem = DSA_GetItemPtr(pcache->hdsa, i); pcache->atomPrev = pitem->atomKey; atomRet = pitem->atomKey; VALIDATE_ATOM(atomRet); } } } Cache_LeaveCS(pcache); return atomRet; } /*---------------------------------------------------------- Purpose: Get the next key in the cache. Returns: Atom ATOM_ERR if we're at the end of the cache Cond: -- */ int PUBLIC Cache_FindNextKey( CACHE * pcache, int atomPrev) { int atomRet = ATOM_ERR; CITEM * pitem; ASSERT(pcache); Cache_EnterCS(pcache); { if (!Cache_Bogus(pcache)) { if (atomPrev != ATOM_ERR) { int i; if (atomPrev != pcache->atomPrev) { CITEM item; // Search for atomPrev or next one nearest to it. // item.atomKey = atomPrev; pcache->iPrev = DPA_Search(pcache->hdpa, &item, 0, Cache_Compare, (LPARAM)pcache->hdsa, DPAS_SORTED | DPAS_INSERTBEFORE); } else pcache->iPrev++; if (DPA_GetPtrCount(pcache->hdpa) > pcache->iPrev) { i = PtrToUlong(DPA_FastGetPtr(pcache->hdpa, pcache->iPrev)); pitem = DSA_GetItemPtr(pcache->hdsa, i); pcache->atomPrev = pitem->atomKey; atomRet = pitem->atomKey; VALIDATE_ATOM(atomRet); } } } } Cache_LeaveCS(pcache); return atomRet; }
26.597876
110
0.45647
beeec140e13679e40fbad02eacfaeb8ee0f8bae2
128,730
html
HTML
doc/Cabal-1.24.2.0/Distribution-Simple-LocalBuildInfo.html
dhenis/functionalcoursework
b9fe2348534f9601009816403d6f9972f3636e44
[ "BSD-3-Clause" ]
null
null
null
doc/Cabal-1.24.2.0/Distribution-Simple-LocalBuildInfo.html
dhenis/functionalcoursework
b9fe2348534f9601009816403d6f9972f3636e44
[ "BSD-3-Clause" ]
null
null
null
doc/Cabal-1.24.2.0/Distribution-Simple-LocalBuildInfo.html
dhenis/functionalcoursework
b9fe2348534f9601009816403d6f9972f3636e44
[ "BSD-3-Clause" ]
null
null
null
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Distribution.Simple.LocalBuildInfo</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script><script type="text/javascript">//<![CDATA[ window.onload = function () {pageLoad();setSynopsis("mini_Distribution-Simple-LocalBuildInfo.html");}; //]]> </script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Distribution-Simple-LocalBuildInfo.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">Cabal-1.24.2.0: A framework for packaging Haskell software</p></div><div id="content"><div id="module-header"><table class="info"><tr><th valign="top">Copyright</th><td>Isaac Jones 2003-2004</td></tr><tr><th>License</th><td>BSD3</td></tr><tr><th>Maintainer</th><td>cabal-devel@haskell.org</td></tr><tr><th>Portability</th><td>portable</td></tr><tr><th>Safe Haskell</th><td>None</td></tr><tr><th>Language</th><td>Haskell98</td></tr></table><p class="caption">Distribution.Simple.LocalBuildInfo</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Buildable package components</a></li><li><a href="#g:2">Installation directories</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Once a package has been configured we have resolved conditionals and dependencies, configured the compiler and other needed external programs. The <code><a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a></code> is used to hold all this information. It holds the install dirs, the compiler, the exact package dependencies, the configured programs, the package database to use and a bunch of miscellaneous configure flags. It gets saved and reloaded from a file (<code>dist/setup-config</code>). It gets passed in to very many subsequent build actions.</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:LocalBuildInfo">LocalBuildInfo</a> = <a href="#v:LocalBuildInfo">LocalBuildInfo</a> {<ul class="subs"><li><a href="#v:configFlags">configFlags</a> :: <a href="Distribution-Simple-Setup.html#t:ConfigFlags">ConfigFlags</a></li><li><a href="#v:flagAssignment">flagAssignment</a> :: <a href="Distribution-PackageDescription.html#t:FlagAssignment">FlagAssignment</a></li><li><a href="#v:extraConfigArgs">extraConfigArgs</a> :: [<a href="../base-4.9.1.0/Data-String.html#t:String">String</a>]</li><li><a href="#v:installDirTemplates">installDirTemplates</a> :: <a href="Distribution-Simple-InstallDirs.html#t:InstallDirTemplates">InstallDirTemplates</a></li><li><a href="#v:compiler">compiler</a> :: <a href="Distribution-Simple-Compiler.html#t:Compiler">Compiler</a></li><li><a href="#v:hostPlatform">hostPlatform</a> :: <a href="Distribution-System.html#t:Platform">Platform</a></li><li><a href="#v:buildDir">buildDir</a> :: <a href="../base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a></li><li><a href="#v:componentsConfigs">componentsConfigs</a> :: [(<a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a>, <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a>, [<a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a>])]</li><li><a href="#v:installedPkgs">installedPkgs</a> :: <a href="Distribution-Simple-PackageIndex.html#t:InstalledPackageIndex">InstalledPackageIndex</a></li><li><a href="#v:pkgDescrFile">pkgDescrFile</a> :: <a href="../base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a></li><li><a href="#v:localPkgDescr">localPkgDescr</a> :: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a></li><li><a href="#v:withPrograms">withPrograms</a> :: <a href="Distribution-Simple-Program.html#t:ProgramConfiguration">ProgramConfiguration</a></li><li><a href="#v:withPackageDB">withPackageDB</a> :: <a href="Distribution-Simple-Compiler.html#t:PackageDBStack">PackageDBStack</a></li><li><a href="#v:withVanillaLib">withVanillaLib</a> :: <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li><a href="#v:withProfLib">withProfLib</a> :: <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li><a href="#v:withSharedLib">withSharedLib</a> :: <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li><a href="#v:withDynExe">withDynExe</a> :: <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li><a href="#v:withProfExe">withProfExe</a> :: <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li><a href="#v:withProfLibDetail">withProfLibDetail</a> :: <a href="Distribution-Simple-Compiler.html#t:ProfDetailLevel">ProfDetailLevel</a></li><li><a href="#v:withProfExeDetail">withProfExeDetail</a> :: <a href="Distribution-Simple-Compiler.html#t:ProfDetailLevel">ProfDetailLevel</a></li><li><a href="#v:withOptimization">withOptimization</a> :: <a href="Distribution-Simple-Compiler.html#t:OptimisationLevel">OptimisationLevel</a></li><li><a href="#v:withDebugInfo">withDebugInfo</a> :: <a href="Distribution-Simple-Compiler.html#t:DebugInfoLevel">DebugInfoLevel</a></li><li><a href="#v:withGHCiLib">withGHCiLib</a> :: <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li><a href="#v:splitObjs">splitObjs</a> :: <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li><a href="#v:stripExes">stripExes</a> :: <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li><a href="#v:stripLibs">stripLibs</a> :: <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li><a href="#v:progPrefix">progPrefix</a> :: <a href="Distribution-Simple-InstallDirs.html#t:PathTemplate">PathTemplate</a></li><li><a href="#v:progSuffix">progSuffix</a> :: <a href="Distribution-Simple-InstallDirs.html#t:PathTemplate">PathTemplate</a></li><li><a href="#v:relocatable">relocatable</a> :: <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li></ul>}</li><li class="src short"><a href="#v:externalPackageDeps">externalPackageDeps</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; [(<a href="Distribution-Package.html#t:UnitId">UnitId</a>, <a href="Distribution-Package.html#t:PackageId">PackageId</a>)]</li><li class="src short"><a href="#v:localComponentId">localComponentId</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; <a href="Distribution-Package.html#t:ComponentId">ComponentId</a></li><li class="src short"><a href="#v:localUnitId">localUnitId</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; <a href="Distribution-Package.html#t:UnitId">UnitId</a></li><li class="src short"><a href="#v:localCompatPackageKey">localCompatPackageKey</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; <a href="../base-4.9.1.0/Data-String.html#t:String">String</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:Component">Component</a><ul class="subs"><li>= <a href="#v:CLib">CLib</a> <a href="Distribution-PackageDescription.html#t:Library">Library</a></li><li>| <a href="#v:CExe">CExe</a> <a href="Distribution-PackageDescription.html#t:Executable">Executable</a></li><li>| <a href="#v:CTest">CTest</a> <a href="Distribution-PackageDescription.html#t:TestSuite">TestSuite</a></li><li>| <a href="#v:CBench">CBench</a> <a href="Distribution-PackageDescription.html#t:Benchmark">Benchmark</a></li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:ComponentName">ComponentName</a><ul class="subs"><li>= <a href="#v:CLibName">CLibName</a></li><li>| <a href="#v:CExeName">CExeName</a> <a href="../base-4.9.1.0/Data-String.html#t:String">String</a></li><li>| <a href="#v:CTestName">CTestName</a> <a href="../base-4.9.1.0/Data-String.html#t:String">String</a></li><li>| <a href="#v:CBenchName">CBenchName</a> <a href="../base-4.9.1.0/Data-String.html#t:String">String</a></li></ul></li><li class="src short"><a href="#v:showComponentName">showComponentName</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> -&gt; <a href="../base-4.9.1.0/Data-String.html#t:String">String</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a><ul class="subs"><li>= <a href="#v:LibComponentLocalBuildInfo">LibComponentLocalBuildInfo</a> { <ul class="subs"><li><a href="#v:componentPackageDeps">componentPackageDeps</a> :: [(<a href="Distribution-Package.html#t:UnitId">UnitId</a>, <a href="Distribution-Package.html#t:PackageId">PackageId</a>)]</li><li><a href="#v:componentUnitId">componentUnitId</a> :: <a href="Distribution-Package.html#t:UnitId">UnitId</a></li><li><a href="#v:componentCompatPackageKey">componentCompatPackageKey</a> :: <a href="../base-4.9.1.0/Data-String.html#t:String">String</a></li><li><a href="#v:componentExposedModules">componentExposedModules</a> :: [<a href="Distribution-InstalledPackageInfo.html#t:ExposedModule">ExposedModule</a>]</li><li><a href="#v:componentPackageRenaming">componentPackageRenaming</a> :: <a href="../containers-0.5.7.1/Data-Map-Lazy.html#t:Map">Map</a> <a href="Distribution-Package.html#t:PackageName">PackageName</a> <a href="Distribution-PackageDescription.html#t:ModuleRenaming">ModuleRenaming</a></li></ul> }</li><li>| <a href="#v:ExeComponentLocalBuildInfo">ExeComponentLocalBuildInfo</a> { <ul class="subs"><li><a href="#v:componentPackageDeps">componentPackageDeps</a> :: [(<a href="Distribution-Package.html#t:UnitId">UnitId</a>, <a href="Distribution-Package.html#t:PackageId">PackageId</a>)]</li><li><a href="#v:componentPackageRenaming">componentPackageRenaming</a> :: <a href="../containers-0.5.7.1/Data-Map-Lazy.html#t:Map">Map</a> <a href="Distribution-Package.html#t:PackageName">PackageName</a> <a href="Distribution-PackageDescription.html#t:ModuleRenaming">ModuleRenaming</a></li></ul> }</li><li>| <a href="#v:TestComponentLocalBuildInfo">TestComponentLocalBuildInfo</a> { <ul class="subs"><li><a href="#v:componentPackageDeps">componentPackageDeps</a> :: [(<a href="Distribution-Package.html#t:UnitId">UnitId</a>, <a href="Distribution-Package.html#t:PackageId">PackageId</a>)]</li><li><a href="#v:componentPackageRenaming">componentPackageRenaming</a> :: <a href="../containers-0.5.7.1/Data-Map-Lazy.html#t:Map">Map</a> <a href="Distribution-Package.html#t:PackageName">PackageName</a> <a href="Distribution-PackageDescription.html#t:ModuleRenaming">ModuleRenaming</a></li></ul> }</li><li>| <a href="#v:BenchComponentLocalBuildInfo">BenchComponentLocalBuildInfo</a> { <ul class="subs"><li><a href="#v:componentPackageDeps">componentPackageDeps</a> :: [(<a href="Distribution-Package.html#t:UnitId">UnitId</a>, <a href="Distribution-Package.html#t:PackageId">PackageId</a>)]</li><li><a href="#v:componentPackageRenaming">componentPackageRenaming</a> :: <a href="../containers-0.5.7.1/Data-Map-Lazy.html#t:Map">Map</a> <a href="Distribution-Package.html#t:PackageName">PackageName</a> <a href="Distribution-PackageDescription.html#t:ModuleRenaming">ModuleRenaming</a></li></ul> }</li></ul></li><li class="src short"><a href="#v:foldComponent">foldComponent</a> :: (<a href="Distribution-PackageDescription.html#t:Library">Library</a> -&gt; a) -&gt; (<a href="Distribution-PackageDescription.html#t:Executable">Executable</a> -&gt; a) -&gt; (<a href="Distribution-PackageDescription.html#t:TestSuite">TestSuite</a> -&gt; a) -&gt; (<a href="Distribution-PackageDescription.html#t:Benchmark">Benchmark</a> -&gt; a) -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a> -&gt; a</li><li class="src short"><a href="#v:componentName">componentName</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a></li><li class="src short"><a href="#v:componentBuildInfo">componentBuildInfo</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a> -&gt; <a href="Distribution-PackageDescription.html#t:BuildInfo">BuildInfo</a></li><li class="src short"><a href="#v:componentEnabled">componentEnabled</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a> -&gt; <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></li><li class="src short"><a href="#v:componentDisabledReason">componentDisabledReason</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a> -&gt; <a href="../base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentDisabledReason">ComponentDisabledReason</a></li><li class="src short"><span class="keyword">data</span> <a href="#t:ComponentDisabledReason">ComponentDisabledReason</a><ul class="subs"><li>= <a href="#v:DisabledComponent">DisabledComponent</a></li><li>| <a href="#v:DisabledAllTests">DisabledAllTests</a></li><li>| <a href="#v:DisabledAllBenchmarks">DisabledAllBenchmarks</a></li></ul></li><li class="src short"><a href="#v:pkgComponents">pkgComponents</a> :: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; [<a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a>]</li><li class="src short"><a href="#v:pkgEnabledComponents">pkgEnabledComponents</a> :: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; [<a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a>]</li><li class="src short"><a href="#v:lookupComponent">lookupComponent</a> :: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> -&gt; <a href="../base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a></li><li class="src short"><a href="#v:getComponent">getComponent</a> :: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a></li><li class="src short"><a href="#v:getComponentLocalBuildInfo">getComponentLocalBuildInfo</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a></li><li class="src short"><a href="#v:allComponentsInBuildOrder">allComponentsInBuildOrder</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; [(<a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a>, <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a>)]</li><li class="src short"><a href="#v:componentsInBuildOrder">componentsInBuildOrder</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; [<a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a>] -&gt; [(<a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a>, <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a>)]</li><li class="src short"><a href="#v:checkComponentsCyclic">checkComponentsCyclic</a> :: <a href="../base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> key =&gt; [(node, key, [key])] -&gt; <a href="../base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> [(node, key, [key])]</li><li class="src short"><a href="#v:depLibraryPaths">depLibraryPaths</a> :: <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a> -&gt; <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> [<a href="../base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a>]</li><li class="src short"><a href="#v:withAllComponentsInBuildOrder">withAllComponentsInBuildOrder</a> :: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; (<a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a> -&gt; <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()) -&gt; <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:withComponentsInBuildOrder">withComponentsInBuildOrder</a> :: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; [<a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a>] -&gt; (<a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a> -&gt; <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()) -&gt; <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:withComponentsLBI">withComponentsLBI</a> :: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; (<a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a> -&gt; <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()) -&gt; <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:withLibLBI">withLibLBI</a> :: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; (<a href="Distribution-PackageDescription.html#t:Library">Library</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a> -&gt; <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()) -&gt; <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:withExeLBI">withExeLBI</a> :: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; (<a href="Distribution-PackageDescription.html#t:Executable">Executable</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a> -&gt; <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()) -&gt; <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:withTestLBI">withTestLBI</a> :: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; (<a href="Distribution-PackageDescription.html#t:TestSuite">TestSuite</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a> -&gt; <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()) -&gt; <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short">module <a href="Distribution-Simple-InstallDirs.html">Distribution.Simple.InstallDirs</a></li><li class="src short"><a href="#v:absoluteInstallDirs">absoluteInstallDirs</a> :: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; <a href="Distribution-Simple-InstallDirs.html#t:CopyDest">CopyDest</a> -&gt; <a href="Distribution-Simple-InstallDirs.html#t:InstallDirs">InstallDirs</a> <a href="../base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a></li><li class="src short"><a href="#v:prefixRelativeInstallDirs">prefixRelativeInstallDirs</a> :: <a href="Distribution-Package.html#t:PackageId">PackageId</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; <a href="Distribution-Simple-InstallDirs.html#t:InstallDirs">InstallDirs</a> (<a href="../base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a>)</li><li class="src short"><a href="#v:substPathTemplate">substPathTemplate</a> :: <a href="Distribution-Package.html#t:PackageId">PackageId</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; <a href="Distribution-Simple-InstallDirs.html#t:PathTemplate">PathTemplate</a> -&gt; <a href="../base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:LocalBuildInfo" class="def">LocalBuildInfo</a> <a href="src/Distribution-Simple-LocalBuildInfo.html#LocalBuildInfo" class="link">Source</a> <a href="#t:LocalBuildInfo" class="selflink">#</a></p><div class="doc"><p>Data cached after configuration step. See also <code><a href="Distribution-Simple-Setup.html#t:ConfigFlags">ConfigFlags</a></code>.</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:LocalBuildInfo" class="def">LocalBuildInfo</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:configFlags" class="def">configFlags</a> :: <a href="Distribution-Simple-Setup.html#t:ConfigFlags">ConfigFlags</a></dfn><div class="doc"><p>Options passed to the configuration step. Needed to re-run configuration when .cabal is out of date</p></div></li><li><dfn class="src"><a id="v:flagAssignment" class="def">flagAssignment</a> :: <a href="Distribution-PackageDescription.html#t:FlagAssignment">FlagAssignment</a></dfn><div class="doc"><p>The final set of flags which were picked for this package</p></div></li><li><dfn class="src"><a id="v:extraConfigArgs" class="def">extraConfigArgs</a> :: [<a href="../base-4.9.1.0/Data-String.html#t:String">String</a>]</dfn><div class="doc"><p>Extra args on the command line for the configuration step. Needed to re-run configuration when .cabal is out of date</p></div></li><li><dfn class="src"><a id="v:installDirTemplates" class="def">installDirTemplates</a> :: <a href="Distribution-Simple-InstallDirs.html#t:InstallDirTemplates">InstallDirTemplates</a></dfn><div class="doc"><p>The installation directories for the various different kinds of files TODO: inplaceDirTemplates :: InstallDirs FilePath</p></div></li><li><dfn class="src"><a id="v:compiler" class="def">compiler</a> :: <a href="Distribution-Simple-Compiler.html#t:Compiler">Compiler</a></dfn><div class="doc"><p>The compiler we're building with</p></div></li><li><dfn class="src"><a id="v:hostPlatform" class="def">hostPlatform</a> :: <a href="Distribution-System.html#t:Platform">Platform</a></dfn><div class="doc"><p>The platform we're building for</p></div></li><li><dfn class="src"><a id="v:buildDir" class="def">buildDir</a> :: <a href="../base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a></dfn><div class="doc"><p>Where to build the package.</p></div></li><li><dfn class="src"><a id="v:componentsConfigs" class="def">componentsConfigs</a> :: [(<a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a>, <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a>, [<a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a>])]</dfn><div class="doc"><p>All the components to build, ordered by topological sort, and with their dependencies over the intrapackage dependency graph</p></div></li><li><dfn class="src"><a id="v:installedPkgs" class="def">installedPkgs</a> :: <a href="Distribution-Simple-PackageIndex.html#t:InstalledPackageIndex">InstalledPackageIndex</a></dfn><div class="doc"><p>All the info about the installed packages that the current package depends on (directly or indirectly).</p></div></li><li><dfn class="src"><a id="v:pkgDescrFile" class="def">pkgDescrFile</a> :: <a href="../base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a></dfn><div class="doc"><p>the filename containing the .cabal file, if available</p></div></li><li><dfn class="src"><a id="v:localPkgDescr" class="def">localPkgDescr</a> :: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a></dfn><div class="doc"><p>The resolved package description, that does not contain any conditionals.</p></div></li><li><dfn class="src"><a id="v:withPrograms" class="def">withPrograms</a> :: <a href="Distribution-Simple-Program.html#t:ProgramConfiguration">ProgramConfiguration</a></dfn><div class="doc"><p>Location and args for all programs</p></div></li><li><dfn class="src"><a id="v:withPackageDB" class="def">withPackageDB</a> :: <a href="Distribution-Simple-Compiler.html#t:PackageDBStack">PackageDBStack</a></dfn><div class="doc"><p>What package database to use, global/user</p></div></li><li><dfn class="src"><a id="v:withVanillaLib" class="def">withVanillaLib</a> :: <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></dfn><div class="doc"><p>Whether to build normal libs.</p></div></li><li><dfn class="src"><a id="v:withProfLib" class="def">withProfLib</a> :: <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></dfn><div class="doc"><p>Whether to build profiling versions of libs.</p></div></li><li><dfn class="src"><a id="v:withSharedLib" class="def">withSharedLib</a> :: <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></dfn><div class="doc"><p>Whether to build shared versions of libs.</p></div></li><li><dfn class="src"><a id="v:withDynExe" class="def">withDynExe</a> :: <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></dfn><div class="doc"><p>Whether to link executables dynamically</p></div></li><li><dfn class="src"><a id="v:withProfExe" class="def">withProfExe</a> :: <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></dfn><div class="doc"><p>Whether to build executables for profiling.</p></div></li><li><dfn class="src"><a id="v:withProfLibDetail" class="def">withProfLibDetail</a> :: <a href="Distribution-Simple-Compiler.html#t:ProfDetailLevel">ProfDetailLevel</a></dfn><div class="doc"><p>Level of automatic profile detail.</p></div></li><li><dfn class="src"><a id="v:withProfExeDetail" class="def">withProfExeDetail</a> :: <a href="Distribution-Simple-Compiler.html#t:ProfDetailLevel">ProfDetailLevel</a></dfn><div class="doc"><p>Level of automatic profile detail.</p></div></li><li><dfn class="src"><a id="v:withOptimization" class="def">withOptimization</a> :: <a href="Distribution-Simple-Compiler.html#t:OptimisationLevel">OptimisationLevel</a></dfn><div class="doc"><p>Whether to build with optimization (if available).</p></div></li><li><dfn class="src"><a id="v:withDebugInfo" class="def">withDebugInfo</a> :: <a href="Distribution-Simple-Compiler.html#t:DebugInfoLevel">DebugInfoLevel</a></dfn><div class="doc"><p>Whether to emit debug info (if available).</p></div></li><li><dfn class="src"><a id="v:withGHCiLib" class="def">withGHCiLib</a> :: <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></dfn><div class="doc"><p>Whether to build libs suitable for use with GHCi.</p></div></li><li><dfn class="src"><a id="v:splitObjs" class="def">splitObjs</a> :: <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></dfn><div class="doc"><p>Use -split-objs with GHC, if available</p></div></li><li><dfn class="src"><a id="v:stripExes" class="def">stripExes</a> :: <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></dfn><div class="doc"><p>Whether to strip executables during install</p></div></li><li><dfn class="src"><a id="v:stripLibs" class="def">stripLibs</a> :: <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></dfn><div class="doc"><p>Whether to strip libraries during install</p></div></li><li><dfn class="src"><a id="v:progPrefix" class="def">progPrefix</a> :: <a href="Distribution-Simple-InstallDirs.html#t:PathTemplate">PathTemplate</a></dfn><div class="doc"><p>Prefix to be prepended to installed executables</p></div></li><li><dfn class="src"><a id="v:progSuffix" class="def">progSuffix</a> :: <a href="Distribution-Simple-InstallDirs.html#t:PathTemplate">PathTemplate</a></dfn><div class="doc"><p>Suffix to be appended to installed executables</p></div></li><li><dfn class="src"><a id="v:relocatable" class="def">relocatable</a> :: <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></dfn><div class="doc empty">&nbsp;</div></li></ul></div></td></tr></table></div><div class="subs instances"><p id="control.i:LocalBuildInfo" class="caption collapser" onclick="toggleSection('i:LocalBuildInfo')">Instances</p><div id="section.i:LocalBuildInfo" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:LocalBuildInfo:Read:1" class="instance expander" onclick="toggleSection('i:id:LocalBuildInfo:Read:1')"></span> <a href="../base-4.9.1.0/Text-Read.html#t:Read">Read</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a></span> <a href="#t:LocalBuildInfo" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:LocalBuildInfo:Read:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readsPrec">readsPrec</a> :: <a href="../base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Distribution-Compat-ReadP.html#t:ReadS">ReadS</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> <a href="../base-4.9.1.0/src/GHC-Read.html#readsPrec" class="link">Source</a> <a href="#v:readsPrec" class="selflink">#</a></p><p class="src"><a href="#v:readList">readList</a> :: <a href="Distribution-Compat-ReadP.html#t:ReadS">ReadS</a> [<a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a>] <a href="../base-4.9.1.0/src/GHC-Read.html#readList" class="link">Source</a> <a href="#v:readList" class="selflink">#</a></p><p class="src"><a href="#v:readPrec">readPrec</a> :: <a href="../base-4.9.1.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> <a href="../base-4.9.1.0/src/GHC-Read.html#readPrec" class="link">Source</a> <a href="#v:readPrec" class="selflink">#</a></p><p class="src"><a href="#v:readListPrec">readListPrec</a> :: <a href="../base-4.9.1.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> [<a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a>] <a href="../base-4.9.1.0/src/GHC-Read.html#readListPrec" class="link">Source</a> <a href="#v:readListPrec" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:LocalBuildInfo:Show:2" class="instance expander" onclick="toggleSection('i:id:LocalBuildInfo:Show:2')"></span> <a href="../base-4.9.1.0/Text-Show.html#t:Show">Show</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a></span> <a href="#t:LocalBuildInfo" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:LocalBuildInfo:Show:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="../base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; <a href="../base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="../base-4.9.1.0/src/GHC-Show.html#showsPrec" class="link">Source</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; <a href="../base-4.9.1.0/Data-String.html#t:String">String</a> <a href="../base-4.9.1.0/src/GHC-Show.html#show" class="link">Source</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a>] -&gt; <a href="../base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="../base-4.9.1.0/src/GHC-Show.html#showList" class="link">Source</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:LocalBuildInfo:Generic:3" class="instance expander" onclick="toggleSection('i:id:LocalBuildInfo:Generic:3')"></span> <a href="../base-4.9.1.0/GHC-Generics.html#t:Generic">Generic</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a></span> <a href="#t:LocalBuildInfo" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:LocalBuildInfo:Generic:3" class="inst-details hide"><div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> <a href="../base-4.9.1.0/GHC-Generics.html#t:Rep">Rep</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> :: <a href="../base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -&gt; <a href="../base-4.9.1.0/Data-Kind.html#t:-42-">*</a> <a href="../base-4.9.1.0/src/GHC-Generics.html#Rep" class="link">Source</a> <a href="#t:Rep" class="selflink">#</a></p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:from">from</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; <a href="../base-4.9.1.0/GHC-Generics.html#t:Rep">Rep</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> x <a href="../base-4.9.1.0/src/GHC-Generics.html#from" class="link">Source</a> <a href="#v:from" class="selflink">#</a></p><p class="src"><a href="#v:to">to</a> :: <a href="../base-4.9.1.0/GHC-Generics.html#t:Rep">Rep</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> x -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> <a href="../base-4.9.1.0/src/GHC-Generics.html#to" class="link">Source</a> <a href="#v:to" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:LocalBuildInfo:Binary:4" class="instance expander" onclick="toggleSection('i:id:LocalBuildInfo:Binary:4')"></span> <a href="../binary-0.8.3.0/Data-Binary.html#t:Binary">Binary</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a></span> <a href="#t:LocalBuildInfo" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:LocalBuildInfo:Binary:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:put">put</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; <a href="../binary-0.8.3.0/Data-Binary-Put.html#t:Put">Put</a> <a href="../binary-0.8.3.0/src/Data-Binary-Class.html#put" class="link">Source</a> <a href="#v:put" class="selflink">#</a></p><p class="src"><a href="#v:get">get</a> :: <a href="../binary-0.8.3.0/Data-Binary-Get-Internal.html#t:Get">Get</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> <a href="../binary-0.8.3.0/src/Data-Binary-Class.html#get" class="link">Source</a> <a href="#v:get" class="selflink">#</a></p><p class="src"><a href="#v:putList">putList</a> :: [<a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a>] -&gt; <a href="../binary-0.8.3.0/Data-Binary-Put.html#t:Put">Put</a> <a href="../binary-0.8.3.0/src/Data-Binary-Class.html#putList" class="link">Source</a> <a href="#v:putList" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:LocalBuildInfo:Rep:5" class="instance expander" onclick="toggleSection('i:id:LocalBuildInfo:Rep:5')"></span> <span class="keyword">type</span> <a href="../base-4.9.1.0/GHC-Generics.html#t:Rep">Rep</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a></span> <a href="#t:LocalBuildInfo" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:LocalBuildInfo:Rep:5" class="inst-details hide"><div class="src"><span class="keyword">type</span> <a href="../base-4.9.1.0/GHC-Generics.html#t:Rep">Rep</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> = <a href="../base-4.9.1.0/GHC-Generics.html#t:D1">D1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaData">MetaData</a> &quot;LocalBuildInfo&quot; &quot;Distribution.Simple.LocalBuildInfo&quot; &quot;Cabal-1.24.2.0&quot; <a href="../base-4.9.1.0/Data-Bool.html#v:False">False</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:C1">C1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaCons">MetaCons</a> &quot;LocalBuildInfo&quot; <a href="../base-4.9.1.0/GHC-Generics.html#v:PrefixI">PrefixI</a> <a href="../base-4.9.1.0/Data-Bool.html#v:True">True</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;configFlags&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> <a href="Distribution-Simple-Setup.html#t:ConfigFlags">ConfigFlags</a>)) (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;flagAssignment&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> <a href="Distribution-PackageDescription.html#t:FlagAssignment">FlagAssignment</a>)) (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;extraConfigArgs&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> [<a href="../base-4.9.1.0/Data-String.html#t:String">String</a>])))) (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;installDirTemplates&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> <a href="Distribution-Simple-InstallDirs.html#t:InstallDirTemplates">InstallDirTemplates</a>)) (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;compiler&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> <a href="Distribution-Simple-Compiler.html#t:Compiler">Compiler</a>))) (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;hostPlatform&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> <a href="Distribution-System.html#t:Platform">Platform</a>)) (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;buildDir&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> <a href="../base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a>))))) (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;componentsConfigs&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> [(<a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a>, <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a>, [<a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a>])])) (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;installedPkgs&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> <a href="Distribution-Simple-PackageIndex.html#t:InstalledPackageIndex">InstalledPackageIndex</a>)) (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;pkgDescrFile&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> (<a href="../base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a>))))) (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;localPkgDescr&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a>)) (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;withPrograms&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> <a href="Distribution-Simple-Program.html#t:ProgramConfiguration">ProgramConfiguration</a>))) (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;withPackageDB&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> <a href="Distribution-Simple-Compiler.html#t:PackageDBStack">PackageDBStack</a>)) (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;withVanillaLib&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>)))))) (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;withProfLib&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>)) (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;withSharedLib&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>)) (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;withDynExe&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>)))) (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;withProfExe&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>)) (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;withProfLibDetail&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> <a href="Distribution-Simple-Compiler.html#t:ProfDetailLevel">ProfDetailLevel</a>))) (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;withProfExeDetail&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> <a href="Distribution-Simple-Compiler.html#t:ProfDetailLevel">ProfDetailLevel</a>)) (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;withOptimization&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> <a href="Distribution-Simple-Compiler.html#t:OptimisationLevel">OptimisationLevel</a>))))) (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;withDebugInfo&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> <a href="Distribution-Simple-Compiler.html#t:DebugInfoLevel">DebugInfoLevel</a>)) (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;withGHCiLib&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>))) (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;splitObjs&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>)) (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;stripExes&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>)))) (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;stripLibs&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>)) (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;progPrefix&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> <a href="Distribution-Simple-InstallDirs.html#t:PathTemplate">PathTemplate</a>))) (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;progSuffix&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> <a href="Distribution-Simple-InstallDirs.html#t:PathTemplate">PathTemplate</a>)) (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;relocatable&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a>))))))))</div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:externalPackageDeps" class="def">externalPackageDeps</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; [(<a href="Distribution-Package.html#t:UnitId">UnitId</a>, <a href="Distribution-Package.html#t:PackageId">PackageId</a>)] <a href="src/Distribution-Simple-LocalBuildInfo.html#externalPackageDeps" class="link">Source</a> <a href="#v:externalPackageDeps" class="selflink">#</a></p><div class="doc"><p>External package dependencies for the package as a whole. This is the union of the individual <code><a href="Distribution-Simple-LocalBuildInfo.html#v:componentPackageDeps">componentPackageDeps</a></code>, less any internal deps.</p></div></div><div class="top"><p class="src"><a id="v:localComponentId" class="def">localComponentId</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; <a href="Distribution-Package.html#t:ComponentId">ComponentId</a> <a href="src/Distribution-Simple-LocalBuildInfo.html#localComponentId" class="link">Source</a> <a href="#v:localComponentId" class="selflink">#</a></p><div class="doc"><p>Extract the <code><a href="Distribution-Package.html#t:ComponentId">ComponentId</a></code> from the library component of a <code><a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a></code> if it exists, or make a fake component ID based on the package ID.</p></div></div><div class="top"><p class="src"><a id="v:localUnitId" class="def">localUnitId</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; <a href="Distribution-Package.html#t:UnitId">UnitId</a> <a href="src/Distribution-Simple-LocalBuildInfo.html#localUnitId" class="link">Source</a> <a href="#v:localUnitId" class="selflink">#</a></p><div class="doc"><p>Extract the <code><a href="Distribution-Package.html#t:UnitId">UnitId</a></code> from the library component of a <code><a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a></code> if it exists, or make a fake unit ID based on the package ID.</p></div></div><div class="top"><p class="src"><a id="v:localCompatPackageKey" class="def">localCompatPackageKey</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; <a href="../base-4.9.1.0/Data-String.html#t:String">String</a> <a href="src/Distribution-Simple-LocalBuildInfo.html#localCompatPackageKey" class="link">Source</a> <a href="#v:localCompatPackageKey" class="selflink">#</a></p><div class="doc"><p>Extract the compatibility <code><a href="Distribution-Package.html#t:ComponentId">ComponentId</a></code> from the library component of a <code><a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a></code> if it exists, or make a fake compatibility package key based on the package ID.</p></div></div><h1 id="g:1">Buildable package components</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:Component" class="def">Component</a> <a href="src/Distribution-Simple-LocalBuildInfo.html#Component" class="link">Source</a> <a href="#t:Component" class="selflink">#</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:CLib" class="def">CLib</a> <a href="Distribution-PackageDescription.html#t:Library">Library</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a id="v:CExe" class="def">CExe</a> <a href="Distribution-PackageDescription.html#t:Executable">Executable</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a id="v:CTest" class="def">CTest</a> <a href="Distribution-PackageDescription.html#t:TestSuite">TestSuite</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a id="v:CBench" class="def">CBench</a> <a href="Distribution-PackageDescription.html#t:Benchmark">Benchmark</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Component" class="caption collapser" onclick="toggleSection('i:Component')">Instances</p><div id="section.i:Component" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Component:Eq:1" class="instance expander" onclick="toggleSection('i:id:Component:Eq:1')"></span> <a href="../base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a></span> <a href="#t:Component" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Component:Eq:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a> -&gt; <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a> -&gt; <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Component:Read:2" class="instance expander" onclick="toggleSection('i:id:Component:Read:2')"></span> <a href="../base-4.9.1.0/Text-Read.html#t:Read">Read</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a></span> <a href="#t:Component" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Component:Read:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readsPrec">readsPrec</a> :: <a href="../base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Distribution-Compat-ReadP.html#t:ReadS">ReadS</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a> <a href="../base-4.9.1.0/src/GHC-Read.html#readsPrec" class="link">Source</a> <a href="#v:readsPrec" class="selflink">#</a></p><p class="src"><a href="#v:readList">readList</a> :: <a href="Distribution-Compat-ReadP.html#t:ReadS">ReadS</a> [<a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a>] <a href="../base-4.9.1.0/src/GHC-Read.html#readList" class="link">Source</a> <a href="#v:readList" class="selflink">#</a></p><p class="src"><a href="#v:readPrec">readPrec</a> :: <a href="../base-4.9.1.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a> <a href="../base-4.9.1.0/src/GHC-Read.html#readPrec" class="link">Source</a> <a href="#v:readPrec" class="selflink">#</a></p><p class="src"><a href="#v:readListPrec">readListPrec</a> :: <a href="../base-4.9.1.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> [<a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a>] <a href="../base-4.9.1.0/src/GHC-Read.html#readListPrec" class="link">Source</a> <a href="#v:readListPrec" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:Component:Show:3" class="instance expander" onclick="toggleSection('i:id:Component:Show:3')"></span> <a href="../base-4.9.1.0/Text-Show.html#t:Show">Show</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a></span> <a href="#t:Component" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:Component:Show:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="../base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a> -&gt; <a href="../base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="../base-4.9.1.0/src/GHC-Show.html#showsPrec" class="link">Source</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a> -&gt; <a href="../base-4.9.1.0/Data-String.html#t:String">String</a> <a href="../base-4.9.1.0/src/GHC-Show.html#show" class="link">Source</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a>] -&gt; <a href="../base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="../base-4.9.1.0/src/GHC-Show.html#showList" class="link">Source</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:ComponentName" class="def">ComponentName</a> <a href="src/Distribution-Simple-LocalBuildInfo.html#ComponentName" class="link">Source</a> <a href="#t:ComponentName" class="selflink">#</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:CLibName" class="def">CLibName</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a id="v:CExeName" class="def">CExeName</a> <a href="../base-4.9.1.0/Data-String.html#t:String">String</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a id="v:CTestName" class="def">CTestName</a> <a href="../base-4.9.1.0/Data-String.html#t:String">String</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a id="v:CBenchName" class="def">CBenchName</a> <a href="../base-4.9.1.0/Data-String.html#t:String">String</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:ComponentName" class="caption collapser" onclick="toggleSection('i:ComponentName')">Instances</p><div id="section.i:ComponentName" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:ComponentName:Eq:1" class="instance expander" onclick="toggleSection('i:id:ComponentName:Eq:1')"></span> <a href="../base-4.9.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a></span> <a href="#t:ComponentName" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:ComponentName:Eq:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:-61--61-">(==)</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> -&gt; <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-61--61-" class="selflink">#</a></p><p class="src"><a href="#v:-47--61-">(/=)</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> -&gt; <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-47--61-" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:ComponentName:Ord:2" class="instance expander" onclick="toggleSection('i:id:ComponentName:Ord:2')"></span> <a href="../base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a></span> <a href="#t:ComponentName" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:ComponentName:Ord:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:compare">compare</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> -&gt; <a href="../base-4.9.1.0/Data-Ord.html#t:Ordering">Ordering</a> <a href="#v:compare" class="selflink">#</a></p><p class="src"><a href="#v:-60-">(&lt;)</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> -&gt; <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-60-" class="selflink">#</a></p><p class="src"><a href="#v:-60--61-">(&lt;=)</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> -&gt; <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-60--61-" class="selflink">#</a></p><p class="src"><a href="#v:-62-">(&gt;)</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> -&gt; <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-62-" class="selflink">#</a></p><p class="src"><a href="#v:-62--61-">(&gt;=)</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> -&gt; <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="#v:-62--61-" class="selflink">#</a></p><p class="src"><a href="#v:max">max</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> <a href="#v:max" class="selflink">#</a></p><p class="src"><a href="#v:min">min</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> <a href="#v:min" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:ComponentName:Read:3" class="instance expander" onclick="toggleSection('i:id:ComponentName:Read:3')"></span> <a href="../base-4.9.1.0/Text-Read.html#t:Read">Read</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a></span> <a href="#t:ComponentName" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:ComponentName:Read:3" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readsPrec">readsPrec</a> :: <a href="../base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Distribution-Compat-ReadP.html#t:ReadS">ReadS</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> <a href="../base-4.9.1.0/src/GHC-Read.html#readsPrec" class="link">Source</a> <a href="#v:readsPrec" class="selflink">#</a></p><p class="src"><a href="#v:readList">readList</a> :: <a href="Distribution-Compat-ReadP.html#t:ReadS">ReadS</a> [<a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a>] <a href="../base-4.9.1.0/src/GHC-Read.html#readList" class="link">Source</a> <a href="#v:readList" class="selflink">#</a></p><p class="src"><a href="#v:readPrec">readPrec</a> :: <a href="../base-4.9.1.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> <a href="../base-4.9.1.0/src/GHC-Read.html#readPrec" class="link">Source</a> <a href="#v:readPrec" class="selflink">#</a></p><p class="src"><a href="#v:readListPrec">readListPrec</a> :: <a href="../base-4.9.1.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> [<a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a>] <a href="../base-4.9.1.0/src/GHC-Read.html#readListPrec" class="link">Source</a> <a href="#v:readListPrec" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:ComponentName:Show:4" class="instance expander" onclick="toggleSection('i:id:ComponentName:Show:4')"></span> <a href="../base-4.9.1.0/Text-Show.html#t:Show">Show</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a></span> <a href="#t:ComponentName" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:ComponentName:Show:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="../base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> -&gt; <a href="../base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="../base-4.9.1.0/src/GHC-Show.html#showsPrec" class="link">Source</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> -&gt; <a href="../base-4.9.1.0/Data-String.html#t:String">String</a> <a href="../base-4.9.1.0/src/GHC-Show.html#show" class="link">Source</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a>] -&gt; <a href="../base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="../base-4.9.1.0/src/GHC-Show.html#showList" class="link">Source</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:ComponentName:Generic:5" class="instance expander" onclick="toggleSection('i:id:ComponentName:Generic:5')"></span> <a href="../base-4.9.1.0/GHC-Generics.html#t:Generic">Generic</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a></span> <a href="#t:ComponentName" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:ComponentName:Generic:5" class="inst-details hide"><div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> <a href="../base-4.9.1.0/GHC-Generics.html#t:Rep">Rep</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> :: <a href="../base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -&gt; <a href="../base-4.9.1.0/Data-Kind.html#t:-42-">*</a> <a href="../base-4.9.1.0/src/GHC-Generics.html#Rep" class="link">Source</a> <a href="#t:Rep" class="selflink">#</a></p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:from">from</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> -&gt; <a href="../base-4.9.1.0/GHC-Generics.html#t:Rep">Rep</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> x <a href="../base-4.9.1.0/src/GHC-Generics.html#from" class="link">Source</a> <a href="#v:from" class="selflink">#</a></p><p class="src"><a href="#v:to">to</a> :: <a href="../base-4.9.1.0/GHC-Generics.html#t:Rep">Rep</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> x -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> <a href="../base-4.9.1.0/src/GHC-Generics.html#to" class="link">Source</a> <a href="#v:to" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:ComponentName:Binary:6" class="instance expander" onclick="toggleSection('i:id:ComponentName:Binary:6')"></span> <a href="../binary-0.8.3.0/Data-Binary.html#t:Binary">Binary</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a></span> <a href="#t:ComponentName" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:ComponentName:Binary:6" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:put">put</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> -&gt; <a href="../binary-0.8.3.0/Data-Binary-Put.html#t:Put">Put</a> <a href="../binary-0.8.3.0/src/Data-Binary-Class.html#put" class="link">Source</a> <a href="#v:put" class="selflink">#</a></p><p class="src"><a href="#v:get">get</a> :: <a href="../binary-0.8.3.0/Data-Binary-Get-Internal.html#t:Get">Get</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> <a href="../binary-0.8.3.0/src/Data-Binary-Class.html#get" class="link">Source</a> <a href="#v:get" class="selflink">#</a></p><p class="src"><a href="#v:putList">putList</a> :: [<a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a>] -&gt; <a href="../binary-0.8.3.0/Data-Binary-Put.html#t:Put">Put</a> <a href="../binary-0.8.3.0/src/Data-Binary-Class.html#putList" class="link">Source</a> <a href="#v:putList" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:ComponentName:Rep:7" class="instance expander" onclick="toggleSection('i:id:ComponentName:Rep:7')"></span> <span class="keyword">type</span> <a href="../base-4.9.1.0/GHC-Generics.html#t:Rep">Rep</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a></span> <a href="#t:ComponentName" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:ComponentName:Rep:7" class="inst-details hide"><div class="src"><span class="keyword">type</span> <a href="../base-4.9.1.0/GHC-Generics.html#t:Rep">Rep</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> = <a href="../base-4.9.1.0/GHC-Generics.html#t:D1">D1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaData">MetaData</a> &quot;ComponentName&quot; &quot;Distribution.Simple.LocalBuildInfo&quot; &quot;Cabal-1.24.2.0&quot; <a href="../base-4.9.1.0/Data-Bool.html#v:False">False</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t::-43-:">(:+:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t::-43-:">(:+:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t:C1">C1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaCons">MetaCons</a> &quot;CLibName&quot; <a href="../base-4.9.1.0/GHC-Generics.html#v:PrefixI">PrefixI</a> <a href="../base-4.9.1.0/Data-Bool.html#v:False">False</a>) <a href="../base-4.9.1.0/GHC-Generics.html#t:U1">U1</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:C1">C1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaCons">MetaCons</a> &quot;CExeName&quot; <a href="../base-4.9.1.0/GHC-Generics.html#v:PrefixI">PrefixI</a> <a href="../base-4.9.1.0/Data-Bool.html#v:False">False</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Nothing">Nothing</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a>) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> <a href="../base-4.9.1.0/Data-String.html#t:String">String</a>)))) (<a href="../base-4.9.1.0/GHC-Generics.html#t::-43-:">(:+:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t:C1">C1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaCons">MetaCons</a> &quot;CTestName&quot; <a href="../base-4.9.1.0/GHC-Generics.html#v:PrefixI">PrefixI</a> <a href="../base-4.9.1.0/Data-Bool.html#v:False">False</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Nothing">Nothing</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a>) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> <a href="../base-4.9.1.0/Data-String.html#t:String">String</a>))) (<a href="../base-4.9.1.0/GHC-Generics.html#t:C1">C1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaCons">MetaCons</a> &quot;CBenchName&quot; <a href="../base-4.9.1.0/GHC-Generics.html#v:PrefixI">PrefixI</a> <a href="../base-4.9.1.0/Data-Bool.html#v:False">False</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Nothing">Nothing</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a>) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> <a href="../base-4.9.1.0/Data-String.html#t:String">String</a>)))))</div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:showComponentName" class="def">showComponentName</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> -&gt; <a href="../base-4.9.1.0/Data-String.html#t:String">String</a> <a href="src/Distribution-Simple-LocalBuildInfo.html#showComponentName" class="link">Source</a> <a href="#v:showComponentName" class="selflink">#</a></p></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:ComponentLocalBuildInfo" class="def">ComponentLocalBuildInfo</a> <a href="src/Distribution-Simple-LocalBuildInfo.html#ComponentLocalBuildInfo" class="link">Source</a> <a href="#t:ComponentLocalBuildInfo" class="selflink">#</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:LibComponentLocalBuildInfo" class="def">LibComponentLocalBuildInfo</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:componentPackageDeps" class="def">componentPackageDeps</a> :: [(<a href="Distribution-Package.html#t:UnitId">UnitId</a>, <a href="Distribution-Package.html#t:PackageId">PackageId</a>)]</dfn><div class="doc"><p>Resolved internal and external package dependencies for this component. The <code><a href="Distribution-PackageDescription.html#t:BuildInfo">BuildInfo</a></code> specifies a set of build dependencies that must be satisfied in terms of version ranges. This field fixes those dependencies to the specific versions available on this machine for this compiler.</p></div></li><li><dfn class="src"><a id="v:componentUnitId" class="def">componentUnitId</a> :: <a href="Distribution-Package.html#t:UnitId">UnitId</a></dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:componentCompatPackageKey" class="def">componentCompatPackageKey</a> :: <a href="../base-4.9.1.0/Data-String.html#t:String">String</a></dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:componentExposedModules" class="def">componentExposedModules</a> :: [<a href="Distribution-InstalledPackageInfo.html#t:ExposedModule">ExposedModule</a>]</dfn><div class="doc empty">&nbsp;</div></li><li><dfn class="src"><a id="v:componentPackageRenaming" class="def">componentPackageRenaming</a> :: <a href="../containers-0.5.7.1/Data-Map-Lazy.html#t:Map">Map</a> <a href="Distribution-Package.html#t:PackageName">PackageName</a> <a href="Distribution-PackageDescription.html#t:ModuleRenaming">ModuleRenaming</a></dfn><div class="doc empty">&nbsp;</div></li></ul></div></td></tr><tr><td class="src"><a id="v:ExeComponentLocalBuildInfo" class="def">ExeComponentLocalBuildInfo</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:componentPackageDeps" class="def">componentPackageDeps</a> :: [(<a href="Distribution-Package.html#t:UnitId">UnitId</a>, <a href="Distribution-Package.html#t:PackageId">PackageId</a>)]</dfn><div class="doc"><p>Resolved internal and external package dependencies for this component. The <code><a href="Distribution-PackageDescription.html#t:BuildInfo">BuildInfo</a></code> specifies a set of build dependencies that must be satisfied in terms of version ranges. This field fixes those dependencies to the specific versions available on this machine for this compiler.</p></div></li><li><dfn class="src"><a id="v:componentPackageRenaming" class="def">componentPackageRenaming</a> :: <a href="../containers-0.5.7.1/Data-Map-Lazy.html#t:Map">Map</a> <a href="Distribution-Package.html#t:PackageName">PackageName</a> <a href="Distribution-PackageDescription.html#t:ModuleRenaming">ModuleRenaming</a></dfn><div class="doc empty">&nbsp;</div></li></ul></div></td></tr><tr><td class="src"><a id="v:TestComponentLocalBuildInfo" class="def">TestComponentLocalBuildInfo</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:componentPackageDeps" class="def">componentPackageDeps</a> :: [(<a href="Distribution-Package.html#t:UnitId">UnitId</a>, <a href="Distribution-Package.html#t:PackageId">PackageId</a>)]</dfn><div class="doc"><p>Resolved internal and external package dependencies for this component. The <code><a href="Distribution-PackageDescription.html#t:BuildInfo">BuildInfo</a></code> specifies a set of build dependencies that must be satisfied in terms of version ranges. This field fixes those dependencies to the specific versions available on this machine for this compiler.</p></div></li><li><dfn class="src"><a id="v:componentPackageRenaming" class="def">componentPackageRenaming</a> :: <a href="../containers-0.5.7.1/Data-Map-Lazy.html#t:Map">Map</a> <a href="Distribution-Package.html#t:PackageName">PackageName</a> <a href="Distribution-PackageDescription.html#t:ModuleRenaming">ModuleRenaming</a></dfn><div class="doc empty">&nbsp;</div></li></ul></div></td></tr><tr><td class="src"><a id="v:BenchComponentLocalBuildInfo" class="def">BenchComponentLocalBuildInfo</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><ul><li><dfn class="src"><a id="v:componentPackageDeps" class="def">componentPackageDeps</a> :: [(<a href="Distribution-Package.html#t:UnitId">UnitId</a>, <a href="Distribution-Package.html#t:PackageId">PackageId</a>)]</dfn><div class="doc"><p>Resolved internal and external package dependencies for this component. The <code><a href="Distribution-PackageDescription.html#t:BuildInfo">BuildInfo</a></code> specifies a set of build dependencies that must be satisfied in terms of version ranges. This field fixes those dependencies to the specific versions available on this machine for this compiler.</p></div></li><li><dfn class="src"><a id="v:componentPackageRenaming" class="def">componentPackageRenaming</a> :: <a href="../containers-0.5.7.1/Data-Map-Lazy.html#t:Map">Map</a> <a href="Distribution-Package.html#t:PackageName">PackageName</a> <a href="Distribution-PackageDescription.html#t:ModuleRenaming">ModuleRenaming</a></dfn><div class="doc empty">&nbsp;</div></li></ul></div></td></tr></table></div><div class="subs instances"><p id="control.i:ComponentLocalBuildInfo" class="caption collapser" onclick="toggleSection('i:ComponentLocalBuildInfo')">Instances</p><div id="section.i:ComponentLocalBuildInfo" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:ComponentLocalBuildInfo:Read:1" class="instance expander" onclick="toggleSection('i:id:ComponentLocalBuildInfo:Read:1')"></span> <a href="../base-4.9.1.0/Text-Read.html#t:Read">Read</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a></span> <a href="#t:ComponentLocalBuildInfo" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:ComponentLocalBuildInfo:Read:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:readsPrec">readsPrec</a> :: <a href="../base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Distribution-Compat-ReadP.html#t:ReadS">ReadS</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a> <a href="../base-4.9.1.0/src/GHC-Read.html#readsPrec" class="link">Source</a> <a href="#v:readsPrec" class="selflink">#</a></p><p class="src"><a href="#v:readList">readList</a> :: <a href="Distribution-Compat-ReadP.html#t:ReadS">ReadS</a> [<a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a>] <a href="../base-4.9.1.0/src/GHC-Read.html#readList" class="link">Source</a> <a href="#v:readList" class="selflink">#</a></p><p class="src"><a href="#v:readPrec">readPrec</a> :: <a href="../base-4.9.1.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a> <a href="../base-4.9.1.0/src/GHC-Read.html#readPrec" class="link">Source</a> <a href="#v:readPrec" class="selflink">#</a></p><p class="src"><a href="#v:readListPrec">readListPrec</a> :: <a href="../base-4.9.1.0/Text-ParserCombinators-ReadPrec.html#t:ReadPrec">ReadPrec</a> [<a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a>] <a href="../base-4.9.1.0/src/GHC-Read.html#readListPrec" class="link">Source</a> <a href="#v:readListPrec" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:ComponentLocalBuildInfo:Show:2" class="instance expander" onclick="toggleSection('i:id:ComponentLocalBuildInfo:Show:2')"></span> <a href="../base-4.9.1.0/Text-Show.html#t:Show">Show</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a></span> <a href="#t:ComponentLocalBuildInfo" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:ComponentLocalBuildInfo:Show:2" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="../base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a> -&gt; <a href="../base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="../base-4.9.1.0/src/GHC-Show.html#showsPrec" class="link">Source</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a> -&gt; <a href="../base-4.9.1.0/Data-String.html#t:String">String</a> <a href="../base-4.9.1.0/src/GHC-Show.html#show" class="link">Source</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a>] -&gt; <a href="../base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="../base-4.9.1.0/src/GHC-Show.html#showList" class="link">Source</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:ComponentLocalBuildInfo:Generic:3" class="instance expander" onclick="toggleSection('i:id:ComponentLocalBuildInfo:Generic:3')"></span> <a href="../base-4.9.1.0/GHC-Generics.html#t:Generic">Generic</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a></span> <a href="#t:ComponentLocalBuildInfo" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:ComponentLocalBuildInfo:Generic:3" class="inst-details hide"><div class="subs associated-types"><p class="caption">Associated Types</p><p class="src"><span class="keyword">type</span> <a href="../base-4.9.1.0/GHC-Generics.html#t:Rep">Rep</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a> :: <a href="../base-4.9.1.0/Data-Kind.html#t:-42-">*</a> -&gt; <a href="../base-4.9.1.0/Data-Kind.html#t:-42-">*</a> <a href="../base-4.9.1.0/src/GHC-Generics.html#Rep" class="link">Source</a> <a href="#t:Rep" class="selflink">#</a></p></div> <div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:from">from</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a> -&gt; <a href="../base-4.9.1.0/GHC-Generics.html#t:Rep">Rep</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a> x <a href="../base-4.9.1.0/src/GHC-Generics.html#from" class="link">Source</a> <a href="#v:from" class="selflink">#</a></p><p class="src"><a href="#v:to">to</a> :: <a href="../base-4.9.1.0/GHC-Generics.html#t:Rep">Rep</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a> x -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a> <a href="../base-4.9.1.0/src/GHC-Generics.html#to" class="link">Source</a> <a href="#v:to" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:ComponentLocalBuildInfo:Binary:4" class="instance expander" onclick="toggleSection('i:id:ComponentLocalBuildInfo:Binary:4')"></span> <a href="../binary-0.8.3.0/Data-Binary.html#t:Binary">Binary</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a></span> <a href="#t:ComponentLocalBuildInfo" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:ComponentLocalBuildInfo:Binary:4" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:put">put</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a> -&gt; <a href="../binary-0.8.3.0/Data-Binary-Put.html#t:Put">Put</a> <a href="../binary-0.8.3.0/src/Data-Binary-Class.html#put" class="link">Source</a> <a href="#v:put" class="selflink">#</a></p><p class="src"><a href="#v:get">get</a> :: <a href="../binary-0.8.3.0/Data-Binary-Get-Internal.html#t:Get">Get</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a> <a href="../binary-0.8.3.0/src/Data-Binary-Class.html#get" class="link">Source</a> <a href="#v:get" class="selflink">#</a></p><p class="src"><a href="#v:putList">putList</a> :: [<a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a>] -&gt; <a href="../binary-0.8.3.0/Data-Binary-Put.html#t:Put">Put</a> <a href="../binary-0.8.3.0/src/Data-Binary-Class.html#putList" class="link">Source</a> <a href="#v:putList" class="selflink">#</a></p></div></div></td></tr><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:ComponentLocalBuildInfo:Rep:5" class="instance expander" onclick="toggleSection('i:id:ComponentLocalBuildInfo:Rep:5')"></span> <span class="keyword">type</span> <a href="../base-4.9.1.0/GHC-Generics.html#t:Rep">Rep</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a></span> <a href="#t:ComponentLocalBuildInfo" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:ComponentLocalBuildInfo:Rep:5" class="inst-details hide"><div class="src"><span class="keyword">type</span> <a href="../base-4.9.1.0/GHC-Generics.html#t:Rep">Rep</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a> = <a href="../base-4.9.1.0/GHC-Generics.html#t:D1">D1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaData">MetaData</a> &quot;ComponentLocalBuildInfo&quot; &quot;Distribution.Simple.LocalBuildInfo&quot; &quot;Cabal-1.24.2.0&quot; <a href="../base-4.9.1.0/Data-Bool.html#v:False">False</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t::-43-:">(:+:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t::-43-:">(:+:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t:C1">C1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaCons">MetaCons</a> &quot;LibComponentLocalBuildInfo&quot; <a href="../base-4.9.1.0/GHC-Generics.html#v:PrefixI">PrefixI</a> <a href="../base-4.9.1.0/Data-Bool.html#v:True">True</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;componentPackageDeps&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> [(<a href="Distribution-Package.html#t:UnitId">UnitId</a>, <a href="Distribution-Package.html#t:PackageId">PackageId</a>)])) (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;componentUnitId&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> <a href="Distribution-Package.html#t:UnitId">UnitId</a>))) (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;componentCompatPackageKey&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> <a href="../base-4.9.1.0/Data-String.html#t:String">String</a>)) (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;componentExposedModules&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> [<a href="Distribution-InstalledPackageInfo.html#t:ExposedModule">ExposedModule</a>])) (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;componentPackageRenaming&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> (<a href="../containers-0.5.7.1/Data-Map-Lazy.html#t:Map">Map</a> <a href="Distribution-Package.html#t:PackageName">PackageName</a> <a href="Distribution-PackageDescription.html#t:ModuleRenaming">ModuleRenaming</a>))))))) (<a href="../base-4.9.1.0/GHC-Generics.html#t:C1">C1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaCons">MetaCons</a> &quot;ExeComponentLocalBuildInfo&quot; <a href="../base-4.9.1.0/GHC-Generics.html#v:PrefixI">PrefixI</a> <a href="../base-4.9.1.0/Data-Bool.html#v:True">True</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;componentPackageDeps&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> [(<a href="Distribution-Package.html#t:UnitId">UnitId</a>, <a href="Distribution-Package.html#t:PackageId">PackageId</a>)])) (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;componentPackageRenaming&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> (<a href="../containers-0.5.7.1/Data-Map-Lazy.html#t:Map">Map</a> <a href="Distribution-Package.html#t:PackageName">PackageName</a> <a href="Distribution-PackageDescription.html#t:ModuleRenaming">ModuleRenaming</a>)))))) (<a href="../base-4.9.1.0/GHC-Generics.html#t::-43-:">(:+:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t:C1">C1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaCons">MetaCons</a> &quot;TestComponentLocalBuildInfo&quot; <a href="../base-4.9.1.0/GHC-Generics.html#v:PrefixI">PrefixI</a> <a href="../base-4.9.1.0/Data-Bool.html#v:True">True</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;componentPackageDeps&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> [(<a href="Distribution-Package.html#t:UnitId">UnitId</a>, <a href="Distribution-Package.html#t:PackageId">PackageId</a>)])) (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;componentPackageRenaming&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> (<a href="../containers-0.5.7.1/Data-Map-Lazy.html#t:Map">Map</a> <a href="Distribution-Package.html#t:PackageName">PackageName</a> <a href="Distribution-PackageDescription.html#t:ModuleRenaming">ModuleRenaming</a>))))) (<a href="../base-4.9.1.0/GHC-Generics.html#t:C1">C1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaCons">MetaCons</a> &quot;BenchComponentLocalBuildInfo&quot; <a href="../base-4.9.1.0/GHC-Generics.html#v:PrefixI">PrefixI</a> <a href="../base-4.9.1.0/Data-Bool.html#v:True">True</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t::-42-:">(:*:)</a> (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;componentPackageDeps&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> [(<a href="Distribution-Package.html#t:UnitId">UnitId</a>, <a href="Distribution-Package.html#t:PackageId">PackageId</a>)])) (<a href="../base-4.9.1.0/GHC-Generics.html#t:S1">S1</a> (<a href="../base-4.9.1.0/GHC-Generics.html#v:MetaSel">MetaSel</a> (<a href="../base-4.9.1.0/Data-Maybe.html#v:Just">Just</a> <a href="../base-4.9.1.0/GHC-TypeLits.html#t:Symbol">Symbol</a> &quot;componentPackageRenaming&quot;) <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceUnpackedness">NoSourceUnpackedness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:NoSourceStrictness">NoSourceStrictness</a> <a href="../base-4.9.1.0/GHC-Generics.html#v:DecidedLazy">DecidedLazy</a>) (<a href="../base-4.9.1.0/GHC-Generics.html#t:Rec0">Rec0</a> (<a href="../containers-0.5.7.1/Data-Map-Lazy.html#t:Map">Map</a> <a href="Distribution-Package.html#t:PackageName">PackageName</a> <a href="Distribution-PackageDescription.html#t:ModuleRenaming">ModuleRenaming</a>)))))))</div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:foldComponent" class="def">foldComponent</a> :: (<a href="Distribution-PackageDescription.html#t:Library">Library</a> -&gt; a) -&gt; (<a href="Distribution-PackageDescription.html#t:Executable">Executable</a> -&gt; a) -&gt; (<a href="Distribution-PackageDescription.html#t:TestSuite">TestSuite</a> -&gt; a) -&gt; (<a href="Distribution-PackageDescription.html#t:Benchmark">Benchmark</a> -&gt; a) -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a> -&gt; a <a href="src/Distribution-Simple-LocalBuildInfo.html#foldComponent" class="link">Source</a> <a href="#v:foldComponent" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:componentName" class="def">componentName</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> <a href="src/Distribution-Simple-LocalBuildInfo.html#componentName" class="link">Source</a> <a href="#v:componentName" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:componentBuildInfo" class="def">componentBuildInfo</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a> -&gt; <a href="Distribution-PackageDescription.html#t:BuildInfo">BuildInfo</a> <a href="src/Distribution-Simple-LocalBuildInfo.html#componentBuildInfo" class="link">Source</a> <a href="#v:componentBuildInfo" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:componentEnabled" class="def">componentEnabled</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a> -&gt; <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a> <a href="src/Distribution-Simple-LocalBuildInfo.html#componentEnabled" class="link">Source</a> <a href="#v:componentEnabled" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:componentDisabledReason" class="def">componentDisabledReason</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a> -&gt; <a href="../base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentDisabledReason">ComponentDisabledReason</a> <a href="src/Distribution-Simple-LocalBuildInfo.html#componentDisabledReason" class="link">Source</a> <a href="#v:componentDisabledReason" class="selflink">#</a></p></div><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:ComponentDisabledReason" class="def">ComponentDisabledReason</a> <a href="src/Distribution-Simple-LocalBuildInfo.html#ComponentDisabledReason" class="link">Source</a> <a href="#t:ComponentDisabledReason" class="selflink">#</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a id="v:DisabledComponent" class="def">DisabledComponent</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a id="v:DisabledAllTests" class="def">DisabledAllTests</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a id="v:DisabledAllBenchmarks" class="def">DisabledAllBenchmarks</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div><div class="top"><p class="src"><a id="v:pkgComponents" class="def">pkgComponents</a> :: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; [<a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a>] <a href="src/Distribution-Simple-LocalBuildInfo.html#pkgComponents" class="link">Source</a> <a href="#v:pkgComponents" class="selflink">#</a></p><div class="doc"><p>All the components in the package (libs, exes, or test suites).</p></div></div><div class="top"><p class="src"><a id="v:pkgEnabledComponents" class="def">pkgEnabledComponents</a> :: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; [<a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a>] <a href="src/Distribution-Simple-LocalBuildInfo.html#pkgEnabledComponents" class="link">Source</a> <a href="#v:pkgEnabledComponents" class="selflink">#</a></p><div class="doc"><p>All the components in the package that are buildable and enabled. Thus this excludes non-buildable components and test suites or benchmarks that have been disabled.</p></div></div><div class="top"><p class="src"><a id="v:lookupComponent" class="def">lookupComponent</a> :: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> -&gt; <a href="../base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a> <a href="src/Distribution-Simple-LocalBuildInfo.html#lookupComponent" class="link">Source</a> <a href="#v:lookupComponent" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:getComponent" class="def">getComponent</a> :: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a> <a href="src/Distribution-Simple-LocalBuildInfo.html#getComponent" class="link">Source</a> <a href="#v:getComponent" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:getComponentLocalBuildInfo" class="def">getComponentLocalBuildInfo</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a> <a href="src/Distribution-Simple-LocalBuildInfo.html#getComponentLocalBuildInfo" class="link">Source</a> <a href="#v:getComponentLocalBuildInfo" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:allComponentsInBuildOrder" class="def">allComponentsInBuildOrder</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; [(<a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a>, <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a>)] <a href="src/Distribution-Simple-LocalBuildInfo.html#allComponentsInBuildOrder" class="link">Source</a> <a href="#v:allComponentsInBuildOrder" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:componentsInBuildOrder" class="def">componentsInBuildOrder</a> :: <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; [<a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a>] -&gt; [(<a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a>, <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a>)] <a href="src/Distribution-Simple-LocalBuildInfo.html#componentsInBuildOrder" class="link">Source</a> <a href="#v:componentsInBuildOrder" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:checkComponentsCyclic" class="def">checkComponentsCyclic</a> :: <a href="../base-4.9.1.0/Data-Ord.html#t:Ord">Ord</a> key =&gt; [(node, key, [key])] -&gt; <a href="../base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> [(node, key, [key])] <a href="src/Distribution-Simple-LocalBuildInfo.html#checkComponentsCyclic" class="link">Source</a> <a href="#v:checkComponentsCyclic" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:depLibraryPaths" class="def">depLibraryPaths</a> <a href="src/Distribution-Simple-LocalBuildInfo.html#depLibraryPaths" class="link">Source</a> <a href="#v:depLibraryPaths" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p>Building for inplace?</p></td></tr><tr><td class="src">-&gt; <a href="../base-4.9.1.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p>Generate prefix-relative library paths</p></td></tr><tr><td class="src">-&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">-&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a></td><td class="doc"><p>Component that is being built</p></td></tr><tr><td class="src">-&gt; <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> [<a href="../base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a>]</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Determine the directories containing the dynamic libraries of the transitive dependencies of the component we are building.</p><p>When wanted, and possible, returns paths relative to the installDirs <code><a href="Distribution-Simple-InstallDirs.html#v:prefix">prefix</a></code></p></div></div><div class="top"><p class="src"><a id="v:withAllComponentsInBuildOrder" class="def">withAllComponentsInBuildOrder</a> :: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; (<a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a> -&gt; <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()) -&gt; <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/Distribution-Simple-LocalBuildInfo.html#withAllComponentsInBuildOrder" class="link">Source</a> <a href="#v:withAllComponentsInBuildOrder" class="selflink">#</a></p><div class="doc"><p>Perform the action on each buildable <code><a href="Distribution-PackageDescription.html#t:Library">Library</a></code> or <code><a href="Distribution-PackageDescription.html#t:Executable">Executable</a></code> (Component) in the PackageDescription, subject to the build order specified by the <code>compBuildOrder</code> field of the given <code><a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a></code></p></div></div><div class="top"><p class="src"><a id="v:withComponentsInBuildOrder" class="def">withComponentsInBuildOrder</a> :: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; [<a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentName">ComponentName</a>] -&gt; (<a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a> -&gt; <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()) -&gt; <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/Distribution-Simple-LocalBuildInfo.html#withComponentsInBuildOrder" class="link">Source</a> <a href="#v:withComponentsInBuildOrder" class="selflink">#</a></p></div><div class="top"><p class="src"><a id="v:withComponentsLBI" class="def">withComponentsLBI</a> :: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; (<a href="Distribution-Simple-LocalBuildInfo.html#t:Component">Component</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a> -&gt; <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()) -&gt; <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/Distribution-Simple-LocalBuildInfo.html#withComponentsLBI" class="link">Source</a> <a href="#v:withComponentsLBI" class="selflink">#</a></p><div class="doc"><div class="warning"><p>Deprecated: Use withAllComponentsInBuildOrder</p></div></div></div><div class="top"><p class="src"><a id="v:withLibLBI" class="def">withLibLBI</a> :: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; (<a href="Distribution-PackageDescription.html#t:Library">Library</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a> -&gt; <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()) -&gt; <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/Distribution-Simple-LocalBuildInfo.html#withLibLBI" class="link">Source</a> <a href="#v:withLibLBI" class="selflink">#</a></p><div class="doc"><p>If the package description has a library section, call the given function with the library build info as argument. Extended version of <code><a href="Distribution-PackageDescription.html#v:withLib">withLib</a></code> that also gives corresponding build info.</p></div></div><div class="top"><p class="src"><a id="v:withExeLBI" class="def">withExeLBI</a> :: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; (<a href="Distribution-PackageDescription.html#t:Executable">Executable</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a> -&gt; <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()) -&gt; <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/Distribution-Simple-LocalBuildInfo.html#withExeLBI" class="link">Source</a> <a href="#v:withExeLBI" class="selflink">#</a></p><div class="doc"><p>Perform the action on each buildable <code><a href="Distribution-PackageDescription.html#t:Executable">Executable</a></code> in the package description. Extended version of <code><a href="Distribution-PackageDescription.html#v:withExe">withExe</a></code> that also gives corresponding build info.</p></div></div><div class="top"><p class="src"><a id="v:withTestLBI" class="def">withTestLBI</a> :: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; (<a href="Distribution-PackageDescription.html#t:TestSuite">TestSuite</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:ComponentLocalBuildInfo">ComponentLocalBuildInfo</a> -&gt; <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> ()) -&gt; <a href="../base-4.9.1.0/System-IO.html#t:IO">IO</a> () <a href="src/Distribution-Simple-LocalBuildInfo.html#withTestLBI" class="link">Source</a> <a href="#v:withTestLBI" class="selflink">#</a></p></div><h1 id="g:2">Installation directories</h1><div class="top"><p class="src">module <a href="Distribution-Simple-InstallDirs.html">Distribution.Simple.InstallDirs</a></p></div><div class="top"><p class="src"><a id="v:absoluteInstallDirs" class="def">absoluteInstallDirs</a> :: <a href="Distribution-PackageDescription.html#t:PackageDescription">PackageDescription</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; <a href="Distribution-Simple-InstallDirs.html#t:CopyDest">CopyDest</a> -&gt; <a href="Distribution-Simple-InstallDirs.html#t:InstallDirs">InstallDirs</a> <a href="../base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a> <a href="src/Distribution-Simple-LocalBuildInfo.html#absoluteInstallDirs" class="link">Source</a> <a href="#v:absoluteInstallDirs" class="selflink">#</a></p><div class="doc"><p>See <code><a href="Distribution-Simple-InstallDirs.html#v:absoluteInstallDirs">absoluteInstallDirs</a></code></p></div></div><div class="top"><p class="src"><a id="v:prefixRelativeInstallDirs" class="def">prefixRelativeInstallDirs</a> :: <a href="Distribution-Package.html#t:PackageId">PackageId</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; <a href="Distribution-Simple-InstallDirs.html#t:InstallDirs">InstallDirs</a> (<a href="../base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="../base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a>) <a href="src/Distribution-Simple-LocalBuildInfo.html#prefixRelativeInstallDirs" class="link">Source</a> <a href="#v:prefixRelativeInstallDirs" class="selflink">#</a></p><div class="doc"><p>See <code><a href="Distribution-Simple-InstallDirs.html#v:prefixRelativeInstallDirs">prefixRelativeInstallDirs</a></code></p></div></div><div class="top"><p class="src"><a id="v:substPathTemplate" class="def">substPathTemplate</a> :: <a href="Distribution-Package.html#t:PackageId">PackageId</a> -&gt; <a href="Distribution-Simple-LocalBuildInfo.html#t:LocalBuildInfo">LocalBuildInfo</a> -&gt; <a href="Distribution-Simple-InstallDirs.html#t:PathTemplate">PathTemplate</a> -&gt; <a href="../base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a> <a href="src/Distribution-Simple-LocalBuildInfo.html#substPathTemplate" class="link">Source</a> <a href="#v:substPathTemplate" class="selflink">#</a></p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>
2,798.478261
34,709
0.705057
cb1dcbcd16b26fa15e778fb006f43b6a19b22c1c
4,371
asm
Assembly
src/shaders/h264/ildb/TransposeNV12_4x16.asm
tizenorg/platform.upstream.libva-intel-driver
9ffc32731bacbfec2cef3d9fb5eb4c0c43952b90
[ "MIT" ]
null
null
null
src/shaders/h264/ildb/TransposeNV12_4x16.asm
tizenorg/platform.upstream.libva-intel-driver
9ffc32731bacbfec2cef3d9fb5eb4c0c43952b90
[ "MIT" ]
null
null
null
src/shaders/h264/ildb/TransposeNV12_4x16.asm
tizenorg/platform.upstream.libva-intel-driver
9ffc32731bacbfec2cef3d9fb5eb4c0c43952b90
[ "MIT" ]
null
null
null
/* * Copyright ยฉ <2010>, Intel Corporation. * * This program is licensed under the terms and conditions of the * Eclipse Public License (EPL), version 1.0. The full text of the EPL is at * http://www.opensource.org/licenses/eclipse-1.0.php. * */ ////////////////////////////////////////////////////////////////////////////////////////// // Module name: TransposeNV12_4x16.asm // // Transpose a 4x16 internal planar to 16x4 internal planar block // //---------------------------------------------------------------------------------------- // Symbols need to be defined before including this module // // Source region is :ub // SRC_YB: SRC_YB Base=rxx ElementSize=1 SrcRegion=REGION(16,1) Type=ub // 8 GRFs // SRC_UW: SRC_UB Base=rxx ElementSize=2 SrcRegion=REGION(8,1) Type=uw // 4 GRFs // // Temp buffer: // BUF_B: BUF_B Base=rxx ElementSize=1 SrcRegion=REGION(16,1) Type=ub // 8 GRFs // BUF_W: BUF_W Base=rxx ElementSize=2 SrcRegion=REGION(8,1) Type=uw // 4 GRFs // ////////////////////////////////////////////////////////////////////////////////////////// #if defined(_DEBUG) mov (1) EntrySignatureC:w 0xDDDB:w #endif // Transpose Y (4x16) right most 4 columns // The first step mov (16) BUF_B(0,0)<1> SRC_YB(0,0)<16;4,1> // Read 2 rows, write 1 row mov (16) BUF_B(0,16)<1> SRC_YB(2,0)<16;4,1> mov (16) BUF_B(1,0)<1> SRC_YB(4,0)<16;4,1> mov (16) BUF_B(1,16)<1> SRC_YB(6,0)<16;4,1> // The second step mov (16) BUF_B(2,0)<1> BUF_B(0,0)<32;8,4> // Read 2 rows, write 1 row mov (16) BUF_B(2,16)<1> BUF_B(0,1)<32;8,4> mov (16) BUF_B(3,0)<1> BUF_B(0,2)<32;8,4> mov (16) BUF_B(3,16)<1> BUF_B(0,3)<32;8,4> // Y is now transposed. the result is in BUF_B(2) and BUF_B(3). // Transpose UV (4x8), right most 2 columns in word // Use BUF_W(0) as temp buf // Src U 8x8 and V 8x8 are mixed. (each pix is specified as yx) // +-----------------------+-----------------------+-----------------------+-----------------------+ // |17 17 16 16 15 15 14 14 13 13 12 12 11 11 10 10 07 07 06 06 05 05 04 04 03 03 02 02 01 01 00 00| // +-----------------------+-----------------------+-----------------------+-----------------------+ // |37 37 36 36 35 35 34 34 33 33 32 32 31 31 30 30 27 27 26 26 25 25 24 24 23 23 22 22 21 21 20 20| // +-----------------------+-----------------------+-----------------------+-----------------------+ // |57 57 56 56 55 55 54 54 53 53 52 52 51 51 50 50 47 47 46 46 45 45 44 44 43 43 42 42 41 41 40 40| // +-----------------------+-----------------------+-----------------------+-----------------------+ // |77 77 76 76 75 75 74 74 73 73 72 72 71 71 70 70 67 67 66 66 65 65 64 64 63 63 62 62 61 61 60 60| // +-----------------------+-----------------------+-----------------------+-----------------------+ // First step (8) <1>:w <==== <8;2,1>:w // +-----------------------+-----------------------+-----------------------+-----------------------+ // |71 71 70 70 61 61 60 60 51 51 50 50 41 41 40 40 31 31 30 30 21 21 20 20 11 11 10 10 01 01 00 00| // +-----------------------+-----------------------+-----------------------+-----------------------+ mov (8) BUF_W(0,0)<1> SRC_UW(0,0)<8;2,1> mov (8) BUF_W(0,8)<1> SRC_UW(2,0)<8;2,1> // Second step (16) <1>:w <==== <1;8,2>:w // +-----------------------+-----------------------+-----------------------+-----------------------+ // |71 71 61 61 51 51 41 41 31 31 21 21 11 11 01 01 70 70 60 60 50 50 40 40 30 30 20 20 10 10 00 00| // +-----------------------+-----------------------+-----------------------+-----------------------+ mov (16) BUF_W(1,0)<1> BUF_W(0,0)<1;8,2> // UV are now transposed. the result is in BUF_W(1). //The first step //mov (16) BUF_B(0,0)<1> SRC_UW(0,0)<8;2,1> // Read 2 rows, write 1 row // The second step //mov (8) SRC_UB(4,0)<1> BUF_B(0,0)<16;8,2> // Read 1 row, write 1 row //mov (8) SRC_UB(4,8)<1> BUF_B(0,1)<16;8,2> // Read 1 row, write 1 row // Transpose V (8x8), right most 2 columns // The first step //mov (16) BUF_B(0,0)<1> SRC_VB(0,1)<8;2,1> // Read 2 rows, write 1 row // The second step //mov (8) SRC_UB(4,16)<1> BUF_B(0,0)<16;8,2> // Read 1 row, write 1 row //mov (8) SRC_UB(4,24)<1> BUF_B(0,1)<16;8,2> // Read 1 row, write 1 row // U and V are now transposed. the result is in BUF_B(4).
46.010526
101
0.444521
2a7370aa6a323b1536702de0c0f904ee00da6e42
3,562
java
Java
src/main/java/com/max/epi/array/EnumerateAllPrimesToN.java
mstepan/elements-of-programmin-interviews
f66a1ae02c693b3ea279fc7063df7c29a8df86cc
[ "MIT" ]
null
null
null
src/main/java/com/max/epi/array/EnumerateAllPrimesToN.java
mstepan/elements-of-programmin-interviews
f66a1ae02c693b3ea279fc7063df7c29a8df86cc
[ "MIT" ]
4
2020-12-08T08:40:58.000Z
2022-01-04T16:35:48.000Z
src/main/java/com/max/epi/array/EnumerateAllPrimesToN.java
mstepan/elements-of-programmin-interviews
f66a1ae02c693b3ea279fc7063df7c29a8df86cc
[ "MIT" ]
null
null
null
package com.max.epi.array; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import java.lang.invoke.MethodHandles; import java.util.ArrayList; import java.util.Arrays; import java.util.BitSet; import java.util.Collections; import java.util.List; import static com.google.common.base.Preconditions.checkArgument; public class EnumerateAllPrimesToN { private static final Logger LOG = LogManager.getLogger(MethodHandles.lookup().lookupClass()); private static final int ZERO = 0; private static final int TWO = 2; private EnumerateAllPrimesToN() throws Exception { List<Integer> expectedPrimes = Arrays.asList(2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101); System.out.println("expected: " + expectedPrimes); int n = 101; List<Integer> actualPrimes = findAllPrimes(n); System.out.println("actual: " + actualPrimes); System.out.printf("Main done: java-%s %n", System.getProperty("java.version")); } /** * Get all primes using sieve of Eratosthenes. * <p> * N - boundary. * M - number of primes below N. * <p> * time: sum( n/3 + n/5 + n/7 + n/11 ) = O( N * (lg lg N) ) * space: O(M + N/(8*2)). Space reduced by '8', because we use BitSet and by '2', because we ignore all even numbers. */ public static List<Integer> findAllPrimes(int boundary) { checkArgument(boundary >= 0); if (boundary < 2) { return Collections.emptyList(); } BitSet composite = new BitSet((boundary >> 1) + 1); composite.set(ZERO); int lastPrime = (int) (Math.ceil(0.5 * boundary)) + 1; List<Integer> primes = new ArrayList<>(); primes.add(TWO); int primeIndex; for (primeIndex = composite.nextClearBit(0); indexToValue(primeIndex) <= lastPrime; primeIndex = composite.nextClearBit(primeIndex + 1)) { int prime = indexToValue(primeIndex); primes.add(prime); /* Start 'sieving' from 'prime ^ 2'. This value will be always 'odd', because multiplying two odd numbers will always return an odd number. Use long to reduce int multiplication overflow error. */ long compositeMul = ((long) prime) * prime; while (compositeMul <= boundary) { composite.set(valueToIndex((int) compositeMul)); /* Handle only 'odd' number, skip 'even' numbers. To skip even number we need to add 'prime * 2' to 'compositeMul' */ compositeMul += (prime << 1); } } for (primeIndex = composite.nextClearBit(primeIndex); indexToValue(primeIndex) <= boundary; primeIndex = composite.nextClearBit(primeIndex + 1)) { primes.add(indexToValue(primeIndex)); } return Collections.unmodifiableList(primes); } /** * value = 2 * index + 1 */ private static int indexToValue(int index) { return (index << 1) | 1; } /** * index = value / 2 */ private static int valueToIndex(int value) { return value >> 1; } public static void main(String[] args) { try { new EnumerateAllPrimesToN(); } catch (Exception ex) { LOG.error(ex.getMessage(), ex); } } }
29.438017
121
0.577204
fd531f62bc4b1429bebc6992b8fc931f1d67e848
2,507
h
C
ProatomicOpenSubclasses/Classes/Classes/PASBounceView.h
ProAtomic/ProatomicOpenSubclasses
de1161b8f57b63855ed1f2d0d16cafbe84b6140b
[ "MIT" ]
null
null
null
ProatomicOpenSubclasses/Classes/Classes/PASBounceView.h
ProAtomic/ProatomicOpenSubclasses
de1161b8f57b63855ed1f2d0d16cafbe84b6140b
[ "MIT" ]
null
null
null
ProatomicOpenSubclasses/Classes/Classes/PASBounceView.h
ProAtomic/ProatomicOpenSubclasses
de1161b8f57b63855ed1f2d0d16cafbe84b6140b
[ "MIT" ]
null
null
null
// // PASBounceView.h // // // Created by Guillermo Sรกenz on 4/9/15. // Copyright (c) 2015 Property Atomic Strong SAC. All rights reserved. // #import "PASCustomFrameView.h" IB_DESIGNABLE @interface PASBounceView : PASCustomFrameView /** This is an IB accessible NSUInteger value, which will determine how fast the view will bounce. */ @property (assign, nonatomic) IBInspectable NSUInteger bounceSpeed; /** This is an IB accessible NSUInteger value, which will determine how far the view will bounce. */ @property (assign, nonatomic) IBInspectable NSUInteger bounciness; /** This is an IB accessible boolean value, which will determine whether the view should bounce on touch or not */ @property (assign, nonatomic, getter=shouldNotBounce) IBInspectable BOOL notBounce; /** This is an IB accessible UIColor object, which will determine the view's highlighted background color. */ @property (copy, nonatomic) IBInspectable UIColor *highligtedBackgroundColor; /** This is an IB accessible UIColor object, which will determine the view's highlighted tint color. */ @property (copy, nonatomic) UIColor *highligtedTintColor __attribute__ ((deprecated("This property was deprecated. Use highligtedTitleColor & highligtedImageColor"))); /** This is an IB accessible boolean value, which will determine whether the image inside the imageView should be used as a template or not */ @property (assign, nonatomic, getter=useImageAsTemplate) IBInspectable BOOL useImageAsTemplate; /** This is an IB accessible UIColor object, which will determine the view's highlighted image color. */ @property (copy, nonatomic) IBInspectable UIColor *highligtedImageColor; /** This is an IB accessible UIColor object, which will determine the view's highlighted title color. */ @property (copy, nonatomic) IBInspectable UIColor *highligtedTitleColor; /** This is an IB accessible UIColor object, which will determine the view's defaults image color. */ @property (copy, nonatomic) IBInspectable UIColor *imageColor; /** This is an UIImageView object, which can be assigned through IB to display an image. */ @property (weak, nonatomic) IBOutlet UIImageView *imageView; /** This is an IB accessible UIImage object, which will determine the image view's highlighted image. */ @property (copy, nonatomic) IBInspectable UIImage *highligtedImage; /** This is an UILabel object, which can be assigned through IB to display text. */ @property (weak, nonatomic) IBOutlet UILabel *labelTitle; @end
33.426667
167
0.771041
2a63a549f89ab792d58867289fe0d829078297a8
2,098
java
Java
simplified-books-core/src/main/java/org/nypl/simplified/books/core/AccountsControllerType.java
NYPL-Simplified/open-ebooks-android
0678b3d1f6ad5b87125f7c97194fa105b7c5ca3d
[ "Apache-2.0" ]
1
2019-05-03T17:45:18.000Z
2019-05-03T17:45:18.000Z
simplified-books-core/src/main/java/org/nypl/simplified/books/core/AccountsControllerType.java
NYPL-Simplified/open-ebooks-android
0678b3d1f6ad5b87125f7c97194fa105b7c5ca3d
[ "Apache-2.0" ]
null
null
null
simplified-books-core/src/main/java/org/nypl/simplified/books/core/AccountsControllerType.java
NYPL-Simplified/open-ebooks-android
0678b3d1f6ad5b87125f7c97194fa105b7c5ca3d
[ "Apache-2.0" ]
null
null
null
package org.nypl.simplified.books.core; /** * The main interface to carry out operations relating to accounts. */ public interface AccountsControllerType { /** * @return {@code true} if the user is currently logged into an account. */ boolean accountIsLoggedIn(); /** * Get login details delivering them to the given listener immediately. * * @param listener The listener */ void accountGetCachedLoginDetails( AccountGetCachedCredentialsListenerType listener); /** * Start loading books, delivering results to the given {@code listener}. * * @param listener The listener */ void accountLoadBooks( AccountDataLoadListenerType listener); /** * Log in, delivering results to the given {@code listener}. * * @param credentials The account credentials * @param listener The listener */ void accountLogin( AccountCredentials credentials, AccountLoginListenerType listener); /** * Log out, delivering results to the given {@code listener}. * * @param credentials account credentials * @param listener The listener */ void accountLogout( AccountCredentials credentials, AccountLogoutListenerType listener); /** * Sync books, delivering results to the given {@code listener}. * * @param listener The listener */ void accountSync( AccountSyncListenerType listener); /** * Activate the device with the currently logged in account (if you are logged in). */ void accountActivateDevice(); /** * fulfill all existing books which were download before */ void fulfillExistingBooks(); /** * Deactivate the device with the currently logged in account (if you are logged in). */ void accountDeActivateDevice(); /** * determine is device is active with the currently logged account. * @return if device is active */ boolean accountIsDeviceActive(); /** * */ void accountRemoveCredentials(); /** * @param in_book_id book id to be fulfilled */ void accountActivateDeviceAndFulFillBook(BookID in_book_id); }
21.854167
87
0.692088
70d8a5335fcc709dc84be35b0d5bca468f153f07
18,795
h
C
lib/hdf5/xregHDF5Internal.h
gaocong13/Orthopedic-Robot-Navigation
bf36f7de116c1c99b86c9ba50f111c3796336af0
[ "MIT" ]
13
2021-11-16T08:17:39.000Z
2022-02-11T11:08:55.000Z
lib/hdf5/xregHDF5Internal.h
gaocong13/Orthopedic-Robot-Navigation
bf36f7de116c1c99b86c9ba50f111c3796336af0
[ "MIT" ]
null
null
null
lib/hdf5/xregHDF5Internal.h
gaocong13/Orthopedic-Robot-Navigation
bf36f7de116c1c99b86c9ba50f111c3796336af0
[ "MIT" ]
1
2021-11-16T08:17:42.000Z
2021-11-16T08:17:42.000Z
/* * MIT License * * Copyright (c) 2020 Robert Grupp * * 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. */ #ifndef XREGHDF5INTERNAL_H_ #define XREGHDF5INTERNAL_H_ #include "xregHDF5.h" namespace xreg { namespace detail { template <class tScalar> H5::DataSet WriteSingleScalarH5Helper(const std::string& field_name, const tScalar& field_val, H5::CommonFG* h5) { const auto data_type = LookupH5DataType<tScalar>(); H5::DataSet data_set = h5->createDataSet(field_name, data_type, H5S_SCALAR); data_set.write(&field_val, data_type); return data_set; } template <class T> H5::DataSet CreateVectorH5Helper(const std::string& field_name, const unsigned long len, H5::CommonFG* h5, const bool compress) { using Scalar = typename std::conditional<std::is_same<bool,T>::value,unsigned char,T>::type; H5::DSetCreatPropList props; props.copy(H5::DSetCreatPropList::DEFAULT); if (compress) { // Maximum ~1 MB chunk size (fits in default chunk cache) const hsize_t chunk_dims = std::min(static_cast<size_type>(len), size_type((1024 * 1024 * 1) / sizeof(Scalar))); props.setChunk(1, &chunk_dims); props.setDeflate(9); } const hsize_t len_tmp = len; H5::DataSpace data_space(1, &len_tmp); const auto data_type = LookupH5DataType<Scalar>(); return h5->createDataSet(field_name, data_type, data_space, props); } template <class T, class A> H5::DataSet WriteVectorH5Helper(const std::string& field_name, const std::vector<T,A>& v, H5::CommonFG* h5, const bool compress) { using Scalar = T; H5::DataSet data_set = CreateVectorH5Helper<Scalar>(field_name, v.size(), h5, compress); data_set.write(&v[0], LookupH5DataType<Scalar>()); return data_set; } template <class T> void WriteVectorElemH5Helper(const T& x, const unsigned long i, H5::DataSet* h5) { H5::DataSpace f_ds = h5->getSpace(); const hsize_t cur_idx = i; f_ds.selectElements(H5S_SELECT_SET, 1, &cur_idx); const hsize_t single_elem = 1; H5::DataSpace m_ds(1, &single_elem); h5->write(&x, LookupH5DataType<T>(), m_ds, f_ds); } template <class tScalar> H5::DataSet CreateMatrixH5Helper(const std::string& field_name, const unsigned long num_rows, const unsigned long num_cols, H5::CommonFG* h5, const bool compress) { using Scalar = tScalar; H5::DSetCreatPropList props; props.copy(H5::DSetCreatPropList::DEFAULT); if (compress) { // Maximum ~1 MB chunk size (fits in default chunk cache) constexpr hsize_t max_elems_per_dim = 1024 / sizeof(Scalar); const std::array<hsize_t,2> chunk_dims = { std::min(static_cast<hsize_t>(num_rows), max_elems_per_dim), std::min(static_cast<hsize_t>(num_cols), max_elems_per_dim) }; props.setChunk(2, chunk_dims.data()); props.setDeflate(9); } const std::array<hsize_t,2> mat_dims = { static_cast<hsize_t>(num_rows), static_cast<hsize_t>(num_cols) }; H5::DataSpace data_space(2, mat_dims.data()); const auto data_type = LookupH5DataType<Scalar>(); return h5->createDataSet(field_name, data_type, data_space, props); } template <class tScalar, int tRows, int tCols, int tOpts, int tMaxRows, int tMaxCols> H5::DataSet WriteMatrixH5Helper(const std::string& field_name, const Eigen::Matrix<tScalar,tRows,tCols,tOpts,tMaxRows,tMaxCols>& mat, H5::CommonFG* h5, const bool compress) { using Scalar = tScalar; H5::DataSet data_set = CreateMatrixH5Helper<Scalar>(field_name, mat.rows(), mat.cols(), h5, compress); const auto data_type = LookupH5DataType<Scalar>(); // HDF5 is row-major if (tOpts & Eigen::RowMajor) { // input matrix is row-major, we can just write the entire memory block data_set.write(&mat(0,0), data_type); } else { // input matrix is column-major, we need to write a column at a time H5::DataSpace data_space = data_set.getSpace(); const size_type nr = static_cast<size_type>(mat.rows()); const size_type nc = static_cast<size_type>(mat.cols()); std::array<hsize_t,2> file_start = { 0, 0 }; const std::array<hsize_t,2> file_count = { nr, 1 }; // data space for a single column const H5::DataSpace mem_col_data_space(2, file_count.data()); for (size_type c = 0; c < nc; ++c) { // select the current column in the hdf5 file file_start[1] = c; data_space.selectHyperslab(H5S_SELECT_SET, file_count.data(), file_start.data()); data_set.write(&mat(0,c), data_type, mem_col_data_space, data_space); } } return data_set; } template <class tScalar> void WriteMatrixRowH5Helper(const tScalar* row_buf, const unsigned long row_idx, H5::DataSet* h5) { using Scalar = tScalar; H5::DataSpace ds_f = h5->getSpace(); xregASSERT(ds_f.getSimpleExtentNdims() == 2); std::array<hsize_t,2> f_dims; ds_f.getSimpleExtentDims(f_dims.data()); xregASSERT(row_idx < f_dims[0]); const std::array<hsize_t,2> m_dims = { 1, f_dims[1] }; H5::DataSpace ds_m(2, m_dims.data()); const std::array<hsize_t,2> f_start = { row_idx, 0 }; ds_f.selectHyperslab(H5S_SELECT_SET, m_dims.data(), f_start.data()); h5->write(row_buf, LookupH5DataType<Scalar>(), ds_m, ds_f); } template <class tScalar, unsigned int tN> void WriteNDImageH5Helper(const itk::Image<tScalar,tN>* img, H5::CommonFG* h5, const bool compress) { using PixelScalar = tScalar; constexpr unsigned int kDIM = tN; // Set an attribute that indicates this is an N-D image SetStringAttr("xreg-type", fmt::format("image-{}D", kDIM), h5); // first write the image metadata WriteMatrixH5("dir-mat", GetITKDirectionMatrix(img), h5, false); WriteMatrixH5("origin", GetITKOriginPoint(img), h5, false); const auto itk_spacing = img->GetSpacing(); Eigen::Matrix<CoordScalar,kDIM,1> spacing; for (unsigned int i = 0; i < kDIM; ++i) { spacing[i] = itk_spacing[i]; } WriteMatrixH5("spacing", spacing, h5, false); // Now write the pixel data const auto itk_size = img->GetLargestPossibleRegion().GetSize(); std::array<hsize_t,kDIM> img_dims; for (unsigned int i = 0; i < kDIM; ++i) { // reverse the order - ITK buffer is "row major" but the index and // size orderings are reversed. img_dims[i] = itk_size[kDIM - 1 - i]; } H5::DSetCreatPropList props; props.copy(H5::DSetCreatPropList::DEFAULT); if (compress) { std::array<hsize_t,kDIM> chunk_dims = img_dims; // for now 1 MB max chunk size constexpr unsigned long max_num_elems_for_chunk = (1 * 1024 * 1024) / sizeof(PixelScalar); bool chunk_ok = false; while (!chunk_ok) { bool found_non_one_chunk_size = false; unsigned long elems_per_chunk = 1; for (const auto& cd : chunk_dims) { elems_per_chunk *= cd; if (cd != 1) { found_non_one_chunk_size = true; } } if (!found_non_one_chunk_size || (elems_per_chunk <= max_num_elems_for_chunk)) { chunk_ok = true; } else { for (unsigned int cur_dim = 0; cur_dim < kDIM; ++cur_dim) { if (chunk_dims[cur_dim] != 1) { --chunk_dims[cur_dim]; break; } } } } props.setChunk(kDIM, chunk_dims.data()); props.setDeflate(9); } const auto data_type = LookupH5DataType<PixelScalar>(); H5::DataSpace data_space(kDIM, img_dims.data()); H5::DataSet data_set = h5->createDataSet("pixels", data_type, data_space, props); data_set.write(img->GetBufferPointer(), data_type); } template <class tMapIt> void WriteLandmarksMapH5Helper(tMapIt map_begin, tMapIt map_end, H5::CommonFG* h5) { using MapIt = tMapIt; SetStringAttr("xreg-type", "lands-map", h5); for (MapIt it = map_begin; it != map_end; ++it) { WriteMatrixH5(it->first, it->second, h5, false); } } template <class tKey, class tVal> void WriteLandmarksMapH5Helper(const std::unordered_map<tKey,tVal>& m, H5::CommonFG* h5) { WriteLandmarksMapH5Helper(m.begin(), m.end(), h5); } template <class tScalar, int tRows, int tCols, int tOpts, int tMaxRows, int tMaxCols, class A> H5::DataSet WriteListOfPointsAsMatrixH5Helper(const std::string& field_name, const std::vector<Eigen::Matrix<tScalar,tRows,tCols,tOpts,tMaxRows,tMaxCols>,A>& pts, H5::CommonFG* h5, const bool compress) { using Pt = Eigen::Matrix<tScalar,tRows,tCols,tOpts,tMaxRows,tMaxCols>; using Mat = Eigen::Matrix<tScalar,Eigen::Dynamic,Eigen::Dynamic>; xregASSERT(!pts.empty()); const int nr = pts[0].rows(); const int nc = pts[0].cols(); xregASSERT(nc == 1); const int num_pts = pts.size(); Mat mat(nr,num_pts); for (int i = 0; i < num_pts; ++i) { mat.block(0,i,nr,1) = pts[i]; } return WriteMatrixH5(field_name, mat, h5, compress); } template <class tScalar, unsigned long tDim> H5::DataSet WriteListOfArraysAsMatrixH5Helper(const std::string& field_name, const std::vector<std::array<tScalar,tDim>>& arrays, H5::CommonFG* h5, const bool compress) { constexpr int kDIM = tDim; using Mat = Eigen::Matrix<tScalar,Eigen::Dynamic,Eigen::Dynamic>; xregASSERT(!arrays.empty()); const int num_arrays = static_cast<int>(arrays.size()); Mat mat(kDIM, num_arrays); for (int array_idx = 0; array_idx < num_arrays; ++array_idx) { const auto& cur_array = arrays[array_idx]; for (int r = 0; r < kDIM; ++r) { mat(r,array_idx) = cur_array[r]; } } return WriteMatrixH5Helper(field_name, mat, h5, compress); } template <class tLabelScalar, unsigned int tN> void WriteSegNDImageH5Helper(const itk::Image<tLabelScalar,tN>* img, H5::CommonFG* h5, const std::unordered_map<tLabelScalar,std::string>& seg_labels_def, const bool compress) { using LabelScalar = tLabelScalar; constexpr unsigned int kDIM = tN; // Set an attribute that indicates this is an N-D image segmentation SetStringAttr("xreg-type", fmt::format("image-seg-{}D", kDIM), h5); // write the label image { H5::Group seg_img_g = h5->createGroup("image"); WriteImageH5(img, &seg_img_g, compress); } // write the labels def if available if (!seg_labels_def.empty()) { H5::Group seg_labs_def_g = h5->createGroup("labels-def"); for (const auto& kv : seg_labels_def) { WriteStringH5(fmt::format("{}", kv.first), kv.second, &seg_labs_def_g); } } } template <class tKey, class tVal> void WriteMapAsArraysHelper(const std::unordered_map<tKey,tVal>& m, H5::CommonFG* h5, const std::string& keys_g_name = "keys", const std::string& vals_g_name = "vals", const bool compress = true) { using MapKey = tKey; using KeyList = std::vector<MapKey>; using MapVal = tVal; using ValList = std::vector<MapVal>; SetStringAttr("xreg-type", "map-as-arrays", h5); SetStringAttr("xreg-keys-g-name", keys_g_name, h5); SetStringAttr("xreg-vals-g-name", vals_g_name, h5); const auto len = m.size(); KeyList keys; ValList vals; keys.reserve(len); vals.reserve(len); for (const auto& kv : m) { keys.push_back(kv.first); vals.push_back(kv.second); } WriteVectorH5(keys_g_name, keys, h5, compress); WriteVectorH5(vals_g_name, vals, h5, compress); } template <class tScalar> tScalar ReadSingleScalarH5Helper(const std::string& field_name, const H5::CommonFG& h5) { using Scalar = tScalar; const H5::DataSet data_set = h5.openDataSet(field_name); Scalar x; data_set.read(&x, LookupH5DataType<Scalar>()); return x; } template <class T> std::vector<T> ReadVectorH5Helper(const std::string& field_name, const H5::CommonFG& h5) { using Scalar = T; using Vec = std::vector<Scalar>; const H5::DataSet data_set = h5.openDataSet(field_name); const H5::DataSpace data_space = data_set.getSpace(); xregASSERT(data_space.getSimpleExtentNdims() == 1); hsize_t len = 0; data_space.getSimpleExtentDims(&len); Vec v(len); data_set.read(&v[0], LookupH5DataType<Scalar>()); return v; } template <class tScalar> Eigen::Matrix<tScalar,Eigen::Dynamic,Eigen::Dynamic,Eigen::RowMajor|Eigen::AutoAlign> ReadMatrixH5Helper(const std::string& field_name, const H5::CommonFG& h5) { using Scalar = tScalar; using Mat = Eigen::Matrix<Scalar,Eigen::Dynamic,Eigen::Dynamic, Eigen::RowMajor|Eigen::AutoAlign>; const H5::DataSet data_set = h5.openDataSet(field_name); const H5::DataSpace data_space = data_set.getSpace(); xregASSERT(data_space.getSimpleExtentNdims() == 2); std::array<hsize_t,2> dims = { 0, 0 }; data_space.getSimpleExtentDims(dims.data()); static_assert(!std::is_same<Scalar,bool>::value, "read bool matrix not implemented! need to read unsigned char!"); Mat m(dims[0], dims[1]); data_set.read(&m(0,0), LookupH5DataType<Scalar>()); return m; } template <class tScalar, unsigned int tN> typename itk::Image<tScalar,tN>::Pointer ReadNDImageH5Helper(const H5::CommonFG& h5) { using PixelScalar = tScalar; constexpr unsigned int kDIM = tN; using Img = itk::Image<PixelScalar,kDIM>; using ImgCoordScalar = typename Img::SpacingValueType; const auto dir_mat = ReadMatrixH5Float("dir-mat", h5); const auto origin_pt = ReadMatrixH5Float("origin", h5); const auto spacing = ReadMatrixH5Float("spacing", h5); const H5::DataSet data_set = h5.openDataSet("pixels"); const H5::DataSpace data_space = data_set.getSpace(); xregASSERT(data_space.getSimpleExtentNdims() == kDIM); std::array<hsize_t,kDIM> dims; data_space.getSimpleExtentDims(dims.data()); auto img = Img::New(); SetITKDirectionMatrix(img.GetPointer(), dir_mat); SetITKOriginPoint(img.GetPointer(), origin_pt); typename Img::SpacingType itk_spacing; for (unsigned int i = 0; i < kDIM; ++i) { itk_spacing[i] = static_cast<ImgCoordScalar>(spacing(i)); } img->SetSpacing(itk_spacing); typename Img::RegionType reg; for (unsigned int i = 0; i < kDIM; ++i) { reg.SetIndex(i,0); reg.SetSize(i, dims[kDIM - 1 - i]); // See WriteITKImageH5 } img->SetRegions(reg); img->Allocate(); data_set.read(img->GetBufferPointer(), LookupH5DataType<PixelScalar>()); return img; } template <class tPt> std::unordered_map<std::string,tPt> ReadLandmarksMapH5Helper(const H5::CommonFG& h5) { using Pt = tPt; using LandsMap = std::unordered_map<std::string,Pt>; using Scalar = typename Pt::Scalar; const hsize_t num_lands = h5.getNumObjs(); LandsMap lands; if (num_lands) { lands.reserve(num_lands); for (hsize_t l = 0; l < num_lands; ++l) { const std::string land_name = h5.getObjnameByIdx(l); lands.insert(typename LandsMap::value_type(land_name, ReadMatrixH5Helper<Scalar>(land_name, h5))); } } return lands; } template <class tPt> std::vector<tPt> ReadLandsAsPtCloudH5Helper(const H5::CommonFG& h5) { using Pt = tPt; using PtList = std::vector<Pt>; using Scalar = typename Pt::Scalar; const hsize_t num_lands = h5.getNumObjs(); PtList pts; if (num_lands) { pts.reserve(num_lands); for (hsize_t l = 0; l < num_lands; ++l) { pts.push_back(ReadMatrixH5Helper<Scalar>(h5.getObjnameByIdx(l), h5)); } } return pts; } template <class tScalar, int tDim = Eigen::Dynamic> std::vector<Eigen::Matrix<tScalar,tDim,1>> ReadListOfPointsFromMatrixH5Helper(const std::string& field_name, const H5::CommonFG& h5) { using Scalar = tScalar; constexpr int kDIM = tDim; using Pt = Eigen::Matrix<Scalar,kDIM,1>; using PtList = std::vector<Pt>; const auto mat = ReadMatrixH5Helper<Scalar>(field_name, h5); const int dim = mat.rows(); xregASSERT((kDIM == Eigen::Dynamic) || (kDIM == dim)); const int num_pts = mat.cols(); PtList pts; pts.reserve(num_pts); for (int i = 0; i < num_pts; ++i) { pts.push_back(mat.block(0,i,dim,1)); } return pts; } template <class tScalar, unsigned long tDim> std::vector<std::array<tScalar,tDim>> ReadListOfArraysFromMatrixH5Helper(const std::string& field_name, const H5::CommonFG& h5) { using Scalar = tScalar; constexpr unsigned long kDIM = tDim; using Array = std::array<Scalar,kDIM>; using ListOfArrays = std::vector<Array>; const auto mat = ReadMatrixH5Helper<Scalar>(field_name, h5); xregASSERT(static_cast<unsigned long>(mat.rows() == kDIM)); const int num_arrays = mat.cols(); ListOfArrays arrays(num_arrays); for (int array_idx = 0; array_idx < num_arrays; ++array_idx) { auto& cur_array = arrays[array_idx]; for (unsigned long i = 0; i < kDIM; ++i) { cur_array[i] = mat(i,array_idx); } } return arrays; } } // detail } // xreg #endif
27.762186
116
0.644001
184d6a416fad856be33f1e878cd62e34cd691d90
1,146
rs
Rust
src/executors/bastion.rs
dvc94ch/agnostik
c048a177e61430a5b5907030d44e8dde50c4507a
[ "Apache-2.0", "MIT" ]
null
null
null
src/executors/bastion.rs
dvc94ch/agnostik
c048a177e61430a5b5907030d44e8dde50c4507a
[ "Apache-2.0", "MIT" ]
null
null
null
src/executors/bastion.rs
dvc94ch/agnostik
c048a177e61430a5b5907030d44e8dde50c4507a
[ "Apache-2.0", "MIT" ]
null
null
null
//! The bastion executor. use crate::join_handle::{InnerJoinHandle, JoinHandle}; use crate::AgnostikExecutor; use bastion_executor::blocking::*; use lightproc::prelude::*; use std::future::Future; pub struct BastionExecutor; impl BastionExecutor { pub const fn new() -> Self { BastionExecutor {} } } impl AgnostikExecutor for BastionExecutor { fn spawn<F>(&self, future: F) -> JoinHandle<F::Output> where F: Future + Send + 'static, F::Output: Send + 'static, { let handle = bastion_executor::pool::spawn(future, ProcStack::default()); JoinHandle(InnerJoinHandle::Bastion(handle)) } fn spawn_blocking<F, T>(&self, task: F) -> JoinHandle<T> where F: FnOnce() -> T + Send + 'static, T: Send + 'static, { let handle = spawn_blocking(async { task() }, ProcStack::default()); JoinHandle(InnerJoinHandle::Bastion(handle)) } fn block_on<F>(&self, future: F) -> F::Output where F: Future + Send + 'static, F::Output: Send + 'static, { bastion_executor::run::run(future, ProcStack::default()) } }
26.045455
81
0.612565
9bea3f2d96b21fa57e4e48cd10e446859f13468c
1,067
js
JavaScript
src/components/post/PostFooter.js
SeanMcP/gatsby-playground
20c1b5df83c925fa1fa41c28d20b580388980618
[ "MIT" ]
null
null
null
src/components/post/PostFooter.js
SeanMcP/gatsby-playground
20c1b5df83c925fa1fa41c28d20b580388980618
[ "MIT" ]
null
null
null
src/components/post/PostFooter.js
SeanMcP/gatsby-playground
20c1b5df83c925fa1fa41c28d20b580388980618
[ "MIT" ]
null
null
null
import React from 'react'; import PropTypes from 'prop-types'; import PostDate from './PostDate'; import CategoryLink from '../common/CategoryLink'; import TagLinks from '../common/TagLinks'; import TweetButton from './TweetButton'; const PostFooter = ({ articleHref, articleTitle, category, date, modifier, tags }) => ( <footer className={`PostFooter ${modifier ? `PostFooter--${modifier}` : ''}`} > {date && <PostDate date={date} modifier="post-footer" />} {category && <CategoryLink category={category} />} <TagLinks modifier={'post-footer'} tags={tags} /> {articleHref && articleTitle && ( <TweetButton articleHref={articleHref} articleTitle={articleTitle} /> )} </footer> ); PostFooter.propTypes = { articleHref: PropTypes.string, articleTitle: PropTypes.string, date: PropTypes.string, modifier: PropTypes.string, tags: PropTypes.arrayOf(PropTypes.string).isRequired }; export default PostFooter;
26.02439
77
0.625117
d5dd9acbaa04927718d1c768d67eed1fc789668a
868
h
C
src/protocol.h
chris-u/statsrelay
0b8b334a9c29b97e5b7c95d031c77e7b99fed248
[ "MIT" ]
null
null
null
src/protocol.h
chris-u/statsrelay
0b8b334a9c29b97e5b7c95d031c77e7b99fed248
[ "MIT" ]
null
null
null
src/protocol.h
chris-u/statsrelay
0b8b334a9c29b97e5b7c95d031c77e7b99fed248
[ "MIT" ]
null
null
null
#ifndef STATSRELAY_PROTOCOL_H #define STATSRELAY_PROTOCOL_H #include <stdlib.h> // This header file abstracts the protocol parsing logic. The signature for a // protocol parser is like: // // size_t parser(const char *instr, const size_t inlen); // // The first two paramaters, instr and inlen specify a const pointer to a // character buffer, and that buffer's size. The function parser will then // parse this string and find the part of the string that refers to the hash // key. // // Since statsd protocol supports having the key at the // start of the string, a simplified interace is supported. The return value of // the parser is the number of bytes that represent the key. // // On failure, 0 is returned; typedef size_t (*protocol_parser_t)(const char *, size_t); size_t protocol_parser_statsd(const char *, size_t); #endif // STATSRELAY_PROTOCOL_H
32.148148
79
0.754608
d29cee52eee279d783003bdb30745b4061bc02d8
188
php
PHP
www/html/bitrix/modules/sale/lang/de/lib/services/company/restrictions/location.php
Evil1991/bitrixdock
306734e0f6641c9118c0129a49d9a266124cdc9c
[ "MIT" ]
10
2019-10-24T06:42:26.000Z
2022-02-02T22:43:16.000Z
www/html/bitrix/modules/sale/lang/de/lib/services/company/restrictions/location.php
Evil1991/bitrixdock
306734e0f6641c9118c0129a49d9a266124cdc9c
[ "MIT" ]
null
null
null
www/html/bitrix/modules/sale/lang/de/lib/services/company/restrictions/location.php
Evil1991/bitrixdock
306734e0f6641c9118c0129a49d9a266124cdc9c
[ "MIT" ]
3
2020-09-28T00:52:21.000Z
2022-02-18T09:01:22.000Z
<? $MESS["SALE_COMPANY_RULES_BY_LOCATION"] = "Standort"; $MESS["SALE_COMPANY_RULES_BY_LOCATION_TITLE"] = "nach Standort"; $MESS["SALE_COMPANY_RULES_BY_LOCATION_DESC"] = "nach Standort"; ?>
37.6
64
0.771277
fb1709ba8c56aa4c9282c55809f5dcc6ee365eef
4,753
go
Go
main.go
finove/wetrtctest
7daae1c1bbe8350c80cad97a058ae5740f9d4706
[ "Unlicense" ]
null
null
null
main.go
finove/wetrtctest
7daae1c1bbe8350c80cad97a058ae5740f9d4706
[ "Unlicense" ]
null
null
null
main.go
finove/wetrtctest
7daae1c1bbe8350c80cad97a058ae5740f9d4706
[ "Unlicense" ]
null
null
null
package main import ( "context" "flag" "fmt" "log" "time" "github.com/finove/webrtctest/client" "github.com/pion/rtcp" "github.com/pion/webrtc/v3" ) func main() { var isSend, isCli bool var feedID int64 var cli uClient var err error flag.BoolVar(&isSend, "send", false, "send mode") flag.BoolVar(&isCli, "cli", false, "cli test mode") flag.Int64Var(&feedID, "feed", 0, "video room feed id") flag.Parse() if isCli || feedID > 0 { err = cli.Init(janusAddress, janusSecret) if err != nil { panic(err) } if feedID == 0 { cli.listparticipants(1234) return } } log.Printf("is send %v", isSend) config := webrtc.Configuration{ // ICEServers: []webrtc.ICEServer{ // { // URLs: []string{"stun:stun.1.google.com:19302"}, // }, // }, SDPSemantics: webrtc.SDPSemanticsPlanB, // SDPSemantics: webrtc.SDPSemanticsUnifiedPlanWithFallback, RTCPMuxPolicy: webrtc.RTCPMuxPolicyRequire, BundlePolicy: webrtc.BundlePolicyMaxBundle, } peerConnection, err := webrtc.NewPeerConnection(config) if err != nil { panic(err) } peerConnection.AddTransceiverFromKind(webrtc.RTPCodecTypeAudio, webrtc.RTPTransceiverInit{ Direction: webrtc.RTPTransceiverDirectionRecvonly, }) peerConnection.AddTransceiverFromKind(webrtc.RTPCodecTypeVideo, webrtc.RTPTransceiverInit{ Direction: webrtc.RTPTransceiverDirectionRecvonly, }) peerConnection.CreateDataChannel("application", &webrtc.DataChannelInit{ Negotiated: client.Bool(false), }) peerConnection.OnTrack(func(track *webrtc.TrackRemote, receiver *webrtc.RTPReceiver) { codec := track.Codec() go func() { ticker := time.NewTicker(time.Second * 3) for range ticker.C { errSend := peerConnection.WriteRTCP([]rtcp.Packet{&rtcp.PictureLossIndication{MediaSSRC: uint32(track.SSRC())}}) if errSend != nil { fmt.Println(errSend) } } }() log.Printf("got codec %s", codec.MimeType) SaveRemoteTrack("out3", track) }) iceConnectedCtx, iceConnectedCtxCancel := context.WithCancel(context.Background()) peerConnection.OnICEConnectionStateChange(func(connectionState webrtc.ICEConnectionState) { log.Printf("Connection State has changed %s", connectionState.String()) if connectionState == webrtc.ICEConnectionStateConnected { iceConnectedCtxCancel() } }) if isSend && feedID == 1 { // Create a audio track audioTrack, err := webrtc.NewTrackLocalStaticSample(webrtc.RTPCodecCapability{MimeType: "audio/opus"}, "audio", "pion1") if err != nil { panic(err) } _, err = peerConnection.AddTrack(audioTrack) if err != nil { panic(err) } vp8Track, err := webrtc.NewTrackLocalStaticSample(webrtc.RTPCodecCapability{MimeType: "video/vp8"}, "video", "pion2") if err != nil { panic(err) } else if _, err = peerConnection.AddTrack(vp8Track); err != nil { panic(err) } offer, err := peerConnection.CreateOffer(nil) if err != nil { panic(err) } // log.Printf("local %s sdp %s", offer.Type.String(), offer.SDP) gatherComplete := webrtc.GatheringCompletePromise(peerConnection) peerConnection.SetLocalDescription(offer) <-gatherComplete // wait anser answer := webrtc.SessionDescription{} // Decode(MustReadStdin(), &answer) if err = cli.JoinRoom(1234); err != nil { panic(err) } if answer.SDP, err = cli.Publish(peerConnection.LocalDescription().SDP); err != nil { panic(err) } answer.Type = webrtc.SDPTypeAnswer peerConnection.SetRemoteDescription(answer) <-iceConnectedCtx.Done() go SendVP8Video(context.Background(), "out3.ivf", vp8Track) go SendOggAudio(context.Background(), "out3.opus", audioTrack) } else { offer := webrtc.SessionDescription{} if feedID > 0 { if _, offer.SDP, err = cli.Subscrite(1234, feedID); err != nil { panic(err) } offer.Type = webrtc.SDPTypeOffer } else { Decode(MustReadStdin(), &offer) } log.Printf("offer %s", offer.SDP) err = peerConnection.SetRemoteDescription(offer) if err != nil { log.Printf("offer %s fail:%v", offer.SDP, err) // panic(err) } gatherComplete := webrtc.GatheringCompletePromise(peerConnection) answer, err := peerConnection.CreateAnswer(nil) if err != nil { log.Printf("offer %s fail:%v", offer.SDP, err) // panic(err) } err = peerConnection.SetLocalDescription(answer) if err != nil { panic(err) } <-gatherComplete if feedID > 0 { answerLoc := peerConnection.LocalDescription() err = cli.SubscriteStart(answerLoc.SDP) if err != nil { panic(err) } } else { log.Println(Encode(*peerConnection.LocalDescription())) } } select {} }
28.291667
123
0.672628
0a3b28929a57d9fb6c34c9bf2b50fefbceacf618
6,225
ts
TypeScript
packages/ts-api-decorators-azure-function/src/apiManagement/ManagedApi.ts
Mobius5150/ts-api-decorators
8a8c0d6d5e288e4690fea3caf3b26495b78a939d
[ "Apache-2.0" ]
1
2021-09-04T05:55:43.000Z
2021-09-04T05:55:43.000Z
packages/ts-api-decorators-azure-function/src/apiManagement/ManagedApi.ts
Mobius5150/ts-api-decorators
8a8c0d6d5e288e4690fea3caf3b26495b78a939d
[ "Apache-2.0" ]
19
2020-01-18T18:10:48.000Z
2021-12-25T19:31:48.000Z
packages/ts-api-decorators-azure-function/src/apiManagement/ManagedApi.ts
Mobius5150/ts-api-decorators
8a8c0d6d5e288e4690fea3caf3b26495b78a939d
[ "Apache-2.0" ]
1
2021-03-20T16:17:03.000Z
2021-03-20T16:17:03.000Z
import { Context } from "@azure/functions"; import { ManagedApi as BaseManagedApi, IApiHandlerInstance, ApiMethod, ApiHeadersDict, IApiInvocationParams, IApiInvocationResult, ManagedApiInternal, HttpError } from 'ts-api-decorators'; import { AzureFunctionHandlerFunc, IAzureFunctionsTimer } from "./AzureFunctionTypes"; import { HttpBindingTriggerFactory } from "../generators/Bindings/HttpBinding"; import { AzFuncBinding, AzFuncBindingNameReturn } from "../metadata/AzFuncBindings"; import { TimerBindingTriggerFactory } from "../generators/Bindings/TimerBinding"; import { BlobStorageBindingTriggerFactory } from "../generators/Bindings/BlobStorageBinding"; import { IAzureStorageBlobProperties } from "../decorators"; import { IApiProcessor } from "ts-api-decorators/dist/apiManagement/ApiProcessing/ApiProcessing"; import { getMetadataValueByDescriptor } from "ts-api-decorators/dist/transformer/TransformerMetadata"; import { AzFuncArgumentExtractors } from "../decorators/ArgumentExtractors"; export function registerApiProcessorsOnHandler(handlerMethod: object, processors: IApiProcessor<IApiInvocationParams<IAzureFunctionManagedApiContext> | IApiInvocationResult>[]): void { ManagedApiInternal.AddApiProcessorsToObject(processors, handlerMethod); } export interface IAzureFunctionManagedApiContext { context: Context; timer?: IAzureFunctionsTimer; inputBlob?: Buffer; inputBlobProps?: IAzureStorageBlobProperties; } export interface IAzureFunctionTriggerDescriptor { triggerType: string, route: string, methods: string[], } export class ManagedApi extends BaseManagedApi<IAzureFunctionManagedApiContext> { private static readonly SINGLETON_KEY = Symbol.for("MB.ts-api-decorators-azure-function.ManagedApi"); private initialized: boolean = false; private handlers: Map<ApiMethod, Map<string, IApiHandlerInstance<IAzureFunctionManagedApiContext>>>; private constructor() { super(true); } private static GetSingleton(): ManagedApi { const globalSymbols = Object.getOwnPropertySymbols(global); const keyDefined = (globalSymbols.indexOf(ManagedApi.SINGLETON_KEY) > -1); if (!keyDefined) { global[ManagedApi.SINGLETON_KEY] = { managedApi: new ManagedApi(), }; } return global[ManagedApi.SINGLETON_KEY].managedApi; } public static AzureTrigger(descr: IAzureFunctionTriggerDescriptor): AzureFunctionHandlerFunc { const singleton = ManagedApi.GetSingleton(); return async (context: Context): Promise<void> => { try { if (!singleton.initialized) { await singleton.init(); } const {method, invocationParams} = singleton.resolveInvocationParamsForContext(descr.triggerType, context); if (!descr.methods.find(m => m === method)) { throw new Error(`Invalid method for handler: ${method}`); } const handler = singleton.getHandler(method, descr.route); const result = await handler.wrappedHandler(invocationParams); if (!context.res && result.statusCode >= 300) { // TODO: Need to handle error responses in non-http functions if (typeof result.body === 'string') { throw new HttpError(result.body, result.statusCode); } throw new HttpError('Unknown Error', result.statusCode); } for (const bindingDef of context.bindingDefinitions) { if (bindingDef.direction !== 'out') { continue; } let assignValue = result.body; if (bindingDef.name === AzFuncBindingNameReturn) { assignValue = result.body } else if (typeof result.body[bindingDef.name] === 'undefined') { throw new Error(`Could not find output binding ${bindingDef.name} of type ${bindingDef.type} on result`); } else { assignValue = result.body[bindingDef.name]; } if (bindingDef.type === 'http') { context.res = { status: result.statusCode, body: assignValue, headers: this.getHeadersObject(result.headers), }; } else { context.bindings[bindingDef.name] = assignValue; } } } catch (e) { const response = { status: 500, body: { message: 'Internal server error' } }; if (e.statusCode) { response.status = e.statusCode; } if (e.message) { response.body.message = e.message; } if (response.status === 500) { debugger; } context.res = response; } }; } static getHeadersObject(headers: ApiHeadersDict): { [header: string]: string; } { if (!headers) { return {}; } const responseHeaders: { [header: string]: string } = {}; for (const header in Object.keys(headers)) { const origHeader = headers[header]; if (typeof origHeader === 'string') { responseHeaders[header] = origHeader; } else if (Array.isArray(origHeader)) { responseHeaders[header] = origHeader.join(', '); } else { throw new Error('Could not serialize response headers'); } } return responseHeaders; } private getHandler(method: ApiMethod, route: string) { if (!this.handlers.has(method)) { throw new Error(`Could not find handler with API method: ${method}`); } const methodGroup = this.handlers.get(method); if (!methodGroup.has(route)) { throw new Error(`Could not find handler for route: ${route}`); } return methodGroup.get(route); } private resolveInvocationParamsForContext(triggerType: string, context: Context): { method: ApiMethod, invocationParams: IApiInvocationParams<IAzureFunctionManagedApiContext> } { switch (triggerType) { case AzFuncBinding.HttpTrigger: return HttpBindingTriggerFactory.GetInvocationParams(context); case AzFuncBinding.TimerTrigger: return TimerBindingTriggerFactory.GetInvocationParams(context); case AzFuncBinding.BlobTrigger: return BlobStorageBindingTriggerFactory.GetInvocationParams(context); default: throw new Error(`Unknown Azure trigger type: ${triggerType}`); } } private async init(): Promise<void> { this.handlers = this.initHandlers(); this.initialized = true; } private getHandlerWrapper(instance: IApiHandlerInstance<IAzureFunctionManagedApiContext>) { throw new Error('Method Not Implemented'); } public setHeader(name: string, value: string): void { throw new Error('Method Not Implemented'); } }
32.421875
184
0.720482
a7e001f8b61785f0cc5088a8d95a19f45656ad58
2,278
lua
Lua
concord/utils.lua
LaughingLeader/Concord
ea1aa0d799317cc7d82469ef304e37ce5eb8899c
[ "MIT" ]
null
null
null
concord/utils.lua
LaughingLeader/Concord
ea1aa0d799317cc7d82469ef304e37ce5eb8899c
[ "MIT" ]
null
null
null
concord/utils.lua
LaughingLeader/Concord
ea1aa0d799317cc7d82469ef304e37ce5eb8899c
[ "MIT" ]
null
null
null
--- Helper module for misc operations ---@class Utils:table local Utils = {} --- Does a shallow copy of a table and appends it to a target table. ---@param orig Table to copy ---@param target Table to append to function Utils.shallowCopy(orig, target) for key, value in pairs(orig) do target[key] = value end return target end --- Requires files and puts them in a table. --- Accepts a table of paths to Lua files: {"path/to/file_1", "path/to/another/file_2", "etc"} --- Accepts a path to a directory with Lua files: "my_files/here" ---@param pathOrFiles The table of paths or a path to a directory. ---@param namespace A table that will hold the required files ---@return table The namespace table function Utils.loadNamespace(pathOrFiles, namespace) if (type(pathOrFiles) ~= "string" and type(pathOrFiles) ~= "table") then error("bad argument #1 to 'loadNamespace' (string/table of strings expected, got "..type(pathOrFiles)..")", 2) end if (type(pathOrFiles) == "string") then local info = love.filesystem.getInfo(pathOrFiles) --- luacheck: ignore if (info == nil or info.type ~= "directory") then error("bad argument #1 to 'loadNamespace' (path '"..pathOrFiles.."' not found)", 2) end local files = love.filesystem.getDirectoryItems(pathOrFiles) for _, file in ipairs(files) do local name = file:sub(1, #file - 4) local path = pathOrFiles.."."..name local value = require(path) if namespace then namespace[name] = value end end elseif (type(pathOrFiles == "table")) then for _, path in ipairs(pathOrFiles) do if (type(path) ~= "string") then error("bad argument #2 to 'loadNamespace' (string/table of strings expected, got table containing "..type(path)..")", 2) --- luacheck: ignore end local name = path local dotIndex, slashIndex = path:match("^.*()%."), path:match("^.*()%/") if (dotIndex or slashIndex) then name = path:sub((dotIndex or slashIndex) + 1) end local value = require(path) if namespace then namespace[name] = value end end end return namespace end return Utils
36.15873
157
0.628622
22349bc156569487ec606a7c341a63cf53d35529
444
kt
Kotlin
kotlin/reqs/assert-build/kotlin/assert/assert.kt
soarlab/gandalv
0eba287949dafd9a4eb0ce3a4678392634903eea
[ "MIT" ]
2
2020-01-18T22:40:40.000Z
2020-01-20T20:27:08.000Z
kotlin/reqs/assert-build/kotlin/assert/assert.kt
soarlab/gandalv
0eba287949dafd9a4eb0ce3a4678392634903eea
[ "MIT" ]
null
null
null
kotlin/reqs/assert-build/kotlin/assert/assert.kt
soarlab/gandalv
0eba287949dafd9a4eb0ce3a4678392634903eea
[ "MIT" ]
1
2020-01-19T16:51:19.000Z
2020-01-19T16:51:19.000Z
@file:kotlinx.cinterop.InteropStubs @file:Suppress("UNUSED_VARIABLE", "UNUSED_EXPRESSION") package assert import konan.SymbolName import kotlinx.cinterop.* fun __VERIFIER_assert(arg0: Int): Unit { return kniBridge0(arg0) } fun __VERIFIER_nondet_int(): Int { return kniBridge1() } @SymbolName("assert_kniBridge0") private external fun kniBridge0(p0: Int): Unit @SymbolName("assert_kniBridge1") private external fun kniBridge1(): Int
22.2
54
0.779279
5b37dba1b21777d941f72e49d84f250db9ffbad0
2,466
h
C
clients/tivi/CtZrtpCallback.h
stelabouras/ZRTPCPP
6b3cd8e6783642292bad0c21e3e5e5ce45ff3e03
[ "Apache-2.0" ]
67
2015-01-02T18:22:18.000Z
2022-02-26T21:31:06.000Z
clients/tivi/CtZrtpCallback.h
stelabouras/ZRTPCPP
6b3cd8e6783642292bad0c21e3e5e5ce45ff3e03
[ "Apache-2.0" ]
27
2015-01-11T10:33:36.000Z
2020-05-28T10:52:21.000Z
clients/tivi/CtZrtpCallback.h
stelabouras/ZRTPCPP
6b3cd8e6783642292bad0c21e3e5e5ce45ff3e03
[ "Apache-2.0" ]
44
2015-02-27T07:21:53.000Z
2022-01-04T03:05:08.000Z
/* * Copyright (c) 2019 Silent Circle. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * * Tivi client glue code for ZRTP. * * @author Werner Dittmann <Werner.Dittmann@t-online.de> */ /** * Interfaces for Tivi callback classes. * * @author: Werner Dittmann <Werner.Dittmann@t-online.de> */ #ifndef _CTZRTPCALLBACK_H_ #define _CTZRTPCALLBACK_H_ #include <CtZrtpSession.h> /** * @brief Tivi callback functions for state changes, warnings, and enrollment. * * The @c CtZrpSession and @c CtZrtpStream classes use these callbacks to inform * the Tivi client about a new ZRTP state, if a @c Warning occured or if the * client should display the @c Enrollment GUI. */ class __EXPORT CtZrtpCb { public: /** * @brief Destructor. * Define a virtual destructor to enable cleanup in derived classes. */ virtual ~CtZrtpCb() {}; virtual void onNewZrtpStatus(CtZrtpSession *session, char *p, CtZrtpSession::streamName streamNm) =0; virtual void onNeedEnroll(CtZrtpSession *session, CtZrtpSession::streamName streamNm, int32_t info) =0; virtual void onPeer(CtZrtpSession *session, char *name, int iIsVerified, CtZrtpSession::streamName streamNm) =0; virtual void onZrtpWarning(CtZrtpSession *session, char *p, CtZrtpSession::streamName streamNm) =0; virtual void onDiscriminatorException(CtZrtpSession *session, char *message, CtZrtpSession::streamName streamNm) =0; }; /** * @brief Tivi callback function to send a ZRTP packet via the RTP session. * * The @c CtZrtpStream class uses this callback to send a ZRTP packet via Tivi's * RTP session. */ class __EXPORT CtZrtpSendCb { public: /** * @brief Destructor. * Define a virtual destructor to enable cleanup in derived classes. */ virtual ~CtZrtpSendCb() {}; virtual void sendRtp(CtZrtpSession const *session, uint8_t* packet, size_t length, CtZrtpSession::streamName streamNm) =0; }; #endif
33.780822
126
0.727899
4a2b0dbfe0d70f074021e080ba8e459b19a4aa8c
1,615
js
JavaScript
API/WsParser.js
Sedorikku1949/KadyAPI
16a5550ca82afa447b73540edc782255a617af98
[ "MIT" ]
null
null
null
API/WsParser.js
Sedorikku1949/KadyAPI
16a5550ca82afa447b73540edc782255a617af98
[ "MIT" ]
null
null
null
API/WsParser.js
Sedorikku1949/KadyAPI
16a5550ca82afa447b73540edc782255a617af98
[ "MIT" ]
null
null
null
function getValueType(value){ if ([null, undefined].some((e) => value == e)) return String(value).toLowerCase(); else return(value.constructor.name.toLowerCase()); }; module.exports = async(obj) => { return new Promise(function(resolve, reject){ if (getValueType(obj) !== "object") return resolve({"error": "Invalid JSON", "state": "400 bad request"}); else { switch(obj["@type"]){ case "COMMANDS_GET": { if (!obj.ctg) resolve({"error": "Missing ctg", "state": "400 bad request"}); else { const commands = [...global["database"].cache.get("commands")].filter(({category}) => category.match(new RegExp(`^${obj.ctg}`, "i"))); resolve( { "commands": commands.map( (commandData) => ({ name: commandData.name, desc: commandData.desc, category: commandData.category, use: commandData.use.split(/\n/g).filter((str) => (new RegExp(`^${"="}|\/[a-zA-Z0-9]+`, "")).test(str)).join(" / "), aliase: commandData.aliase, }) ), "state": 200, "ctg": obj.ctg, "ctgFullName": global["database"].cache.get("categorys").find(({defaultName}) => defaultName.toLowerCase() == obj.ctg.toLowerCase()).name, "@type": "COMMANDS_GET", } ); } break; }; default: resolve({"error": "Invalid type", "state": "400 bad request"}); } } resolve(obj); }) }
40.375
154
0.494737
493e864494fc359dee423c16fb48842b35160333
525
swift
Swift
BitriseAPI/Sources/BitriseRequest.swift
yuta24/Cimon
a54c31b9a6b67d1ec7a70a85534088c4af8dd240
[ "MIT" ]
3
2019-06-04T03:30:57.000Z
2019-10-01T05:18:43.000Z
BitriseAPI/Sources/BitriseRequest.swift
yuta24/Cimon
a54c31b9a6b67d1ec7a70a85534088c4af8dd240
[ "MIT" ]
6
2019-07-16T02:26:50.000Z
2021-03-29T23:25:13.000Z
BitriseAPI/Sources/BitriseRequest.swift
yuta24/Cimon
a54c31b9a6b67d1ec7a70a85534088c4af8dd240
[ "MIT" ]
null
null
null
// // BitriseRequest.swift // BitriseAPI // // Created by Yu Tawata on 2019/05/06. // import Foundation import Mocha public protocol BitriseRequest: Request { } extension BitriseRequest where Response: Decodable { public var headers: [String: String] { [:] } public var queryPrameters: [String: Any?] { [:] } public var bodyParameters: [String: Any] { [:] } public func parse(_ data: Data) throws -> Response { return try JSONDecoder().decode(Response.self, from: data) } } public enum Endpoint { }
20.192308
66
0.68
8bfe5f7f7b7745ba971d2675bde117a7cccb57fe
3,453
kt
Kotlin
src/test/kotlin/at/rechnerherz/example/integration/SecurityTests.kt
rechnerherz/spring-boot-kotlin-rest-api-template
475b6ec7f1b0d4df9c9894f8731d73d06bfef990
[ "Apache-2.0" ]
3
2021-08-18T13:03:49.000Z
2022-01-27T17:03:48.000Z
src/test/kotlin/at/rechnerherz/example/integration/SecurityTests.kt
rechnerherz/spring-boot-kotlin-rest-api-template
475b6ec7f1b0d4df9c9894f8731d73d06bfef990
[ "Apache-2.0" ]
null
null
null
src/test/kotlin/at/rechnerherz/example/integration/SecurityTests.kt
rechnerherz/spring-boot-kotlin-rest-api-template
475b6ec7f1b0d4df9c9894f8731d73d06bfef990
[ "Apache-2.0" ]
2
2022-03-07T16:28:01.000Z
2022-03-15T14:02:38.000Z
package at.rechnerherz.example.integration import at.rechnerherz.example.base.BaseIntegrationTest import at.rechnerherz.example.base.WithMockAdmin import at.rechnerherz.example.config.ACTUATOR_URL import at.rechnerherz.example.config.API_URL import at.rechnerherz.example.config.AUTHENTICATED_ACCOUNT_URL import at.rechnerherz.example.config.JAVA_MELODY_URL import at.rechnerherz.example.config.auth.authentication import at.rechnerherz.example.config.auth.isFullyAuthenticated import at.rechnerherz.example.domain.account.AccountRepository import at.rechnerherz.example.domain.account.Role import at.rechnerherz.example.domain.base.GenericRepositoryService import at.rechnerherz.example.domain.permission.WithPermissionRule import at.rechnerherz.example.init.ADMIN_USERNAME import at.rechnerherz.example.init.admin import org.amshove.kluent.shouldBeEqualTo import org.amshove.kluent.shouldNotBeEqualTo import org.junit.jupiter.api.DynamicTest import org.junit.jupiter.api.Test import org.junit.jupiter.api.TestFactory import org.springframework.beans.factory.annotation.Autowired import org.springframework.http.HttpStatus import org.springframework.http.MediaType import javax.persistence.metamodel.EntityType import kotlin.reflect.full.findAnnotation class SecurityTests( @Autowired val accountRepository: AccountRepository, @Autowired val genericRepositoryService: GenericRepositoryService ) : BaseIntegrationTest() { @Test @WithMockAdmin fun `mock admin puts authentication into security context`() { authentication()?.name shouldBeEqualTo ADMIN_USERNAME isFullyAuthenticated(Role.ADMIN) shouldBeEqualTo true accountRepository.findAuthenticated() shouldBeEqualTo admin() } @Test @WithMockAdmin fun `nonexistent URL returns 401`() { jsonGet("/cthulhu").statusCode shouldBeEqualTo HttpStatus.UNAUTHORIZED } @Test fun `when unauthenticated, api returns 401`() { jsonGet(API_URL).statusCode shouldBeEqualTo HttpStatus.UNAUTHORIZED } @Test fun `when unauthenticated, actuator returns 401`() { jsonGet(ACTUATOR_URL).statusCode shouldBeEqualTo HttpStatus.UNAUTHORIZED } @Test fun `when unauthenticated, monitoring returns 401`() { jsonGet(JAVA_MELODY_URL).statusCode shouldBeEqualTo HttpStatus.UNAUTHORIZED } @Test fun `when unauthenticated, public-account returns 204`() { jsonGet(AUTHENTICATED_ACCOUNT_URL).statusCode shouldBeEqualTo HttpStatus.NO_CONTENT } @Test @WithMockAdmin fun `public-account returns authenticated account`() { jsonGet(AUTHENTICATED_ACCOUNT_URL).apply { statusCode shouldBeEqualTo HttpStatus.OK headers.contentType shouldBeEqualTo MediaType.APPLICATION_JSON body jsonPath "$.username" shouldBeEqualTo ADMIN_USERNAME } } fun `entity has a permission rule`(entity: EntityType<*>) { println(entity.name) entity.javaType.kotlin.findAnnotation<WithPermissionRule>() shouldNotBeEqualTo null } @TestFactory fun `all rest resource entities have a permission rule`(): List<DynamicTest> = genericRepositoryService.getRepositoryRestResources().mapNotNull { (entityType, repositoryRestResource) -> repositoryRestResource?.let { DynamicTest.dynamicTest(entityType.name) { `entity has a permission rule`(entityType) } } } }
37.945055
114
0.767738
e54199061fbaf8ebe1b942c52fe81beef8e2fed9
370
ts
TypeScript
src/ack.ts
alopezcia/anviz-ts
1c3f3d8558526075f935e2e2654243af67dfe862
[ "MIT" ]
null
null
null
src/ack.ts
alopezcia/anviz-ts
1c3f3d8558526075f935e2e2654243af67dfe862
[ "MIT" ]
null
null
null
src/ack.ts
alopezcia/anviz-ts
1c3f3d8558526075f935e2e2654243af67dfe862
[ "MIT" ]
null
null
null
export enum ACK { SUCCESS = 0x00, // operation successful FAIL = 0x01, // operation failed FULL = 0x04, // user full (whatever that means) EMPTY = 0x05, // user empty (whatever that means) NO_USER = 0x06, // user doesn't exists TIME_OUT = 0x08, // timeout (?) USER_OCCUPIED = 0x0A, //user already exists FINGER_OCCUPIED = 0x0B //fingerprint already exists }
33.636364
56
0.694595
5846bb493394ac0f77bde2212570cdeb33d4193a
2,722
kt
Kotlin
src/test/kotlin/org/jetbrains/kotlin/jupyter/test/ikotlinTests.kt
jjkavalam/kotlin-jupyter
1476fc94b0cfe10727c8bc57900310680f051470
[ "Apache-2.0" ]
1
2018-06-27T06:52:38.000Z
2018-06-27T06:52:38.000Z
src/test/kotlin/org/jetbrains/kotlin/jupyter/test/ikotlinTests.kt
jjkavalam/kotlin-jupyter
1476fc94b0cfe10727c8bc57900310680f051470
[ "Apache-2.0" ]
null
null
null
src/test/kotlin/org/jetbrains/kotlin/jupyter/test/ikotlinTests.kt
jjkavalam/kotlin-jupyter
1476fc94b0cfe10727c8bc57900310680f051470
[ "Apache-2.0" ]
null
null
null
package org.jetbrains.kotlin.jupyter.test import org.jetbrains.kotlin.jupyter.* import org.junit.* import org.zeromq.ZMQ import java.io.IOException import java.net.ServerSocket import java.util.* import kotlin.concurrent.thread class KernelServerTest { private val config = KernelConfig( ports = JupyterSockets.values().map { randomPort() }.toTypedArray(), transport = "tcp", signatureScheme = "hmac1-sha256", signatureKey = "") private val hmac = HMAC(config.signatureScheme, config.signatureKey) private var server: Thread? = null @Before fun setupServer() { server = thread { kernelServer(config) } } @After fun teardownServer() { Thread.sleep(100) server?.interrupt() } @Test fun testHeartbeat() { val context = ZMQ.context(1) with (context.socket(ZMQ.REQ)) { try { connect("${config.transport}://*:${config.ports[JupyterSockets.hb.ordinal]}") send("abc") val msg = recvStr() Assert.assertEquals("abc", msg) } finally { close() context.term() } } } @Test fun testStdin() { val context = ZMQ.context(1) with (context.socket(ZMQ.REQ)) { try { connect("${config.transport}://*:${config.ports[JupyterSockets.stdin.ordinal]}") sendMore("abc") sendMore("def") send("ok") } finally { close() context.term() } } } @Test fun testShell() { val context = ZMQ.context(1) with (context.socket(ZMQ.REQ)) { try { connect("${config.transport}://*:${config.ports[JupyterSockets.control.ordinal]}") sendMessage(Message(header = makeHeader("kernel_info_request")), hmac) val msg = receiveMessage(recv(), hmac) Assert.assertEquals("kernel_info_reply", msg!!.header!!["msg_type"]) } finally { close() context.term() } } } companion object { private val rng = Random() private val portRangeStart = 32768 private val portRangeEnd = 65536 fun randomPort(): Int = generateSequence { portRangeStart + rng.nextInt(portRangeEnd - portRangeStart) }.find { try { ServerSocket(it).close() true } catch (e: IOException) { false } }!! } }
27.494949
99
0.511756
365569eae6b87c0f624a559da753374adef6f3fa
1,298
kt
Kotlin
src/commonMain/kotlin/KWS/OpCode/OpCodeUtils.kt
SeekDaSky/KWS
2ade7661b622b5782a5c75b8203b41b45c80002a
[ "MIT" ]
1
2020-04-14T01:36:21.000Z
2020-04-14T01:36:21.000Z
src/commonMain/kotlin/KWS/OpCode/OpCodeUtils.kt
SeekDaSky/KWS
2ade7661b622b5782a5c75b8203b41b45c80002a
[ "MIT" ]
null
null
null
src/commonMain/kotlin/KWS/OpCode/OpCodeUtils.kt
SeekDaSky/KWS
2ade7661b622b5782a5c75b8203b41b45c80002a
[ "MIT" ]
null
null
null
package KWS.OpCode import KWS.Message.* import kotlin.experimental.and /** * Returns the OpCode having the corresponding binary code * * @param Byte Byte to analyse * @return OpCode */ internal fun getOpcode(raw : Byte) : OpCode{ return when((raw and 0b00001111).toInt()){ 0 -> OpCode.FRAGMENT 1 -> OpCode.TEXT 2 -> OpCode.BINARY 8 -> OpCode.CONNECTION_CLOSED 9 -> OpCode.PING 10-> OpCode.PONG else -> OpCode.RESERVED } } /** * Return the OpCode of a Sendable object * * @param obj Sendable to evaluate * @return OpCode of this object */ internal fun getOpcode(obj : Sendable) : OpCode{ return when(obj){ is FragmentMessage -> OpCode.FRAGMENT is StringMessage -> OpCode.TEXT is BinaryMessage -> OpCode.BINARY is CloseMessage -> OpCode.CONNECTION_CLOSED is PingMessage -> OpCode.PING is PongMessage-> OpCode.PONG else -> throw Exception("Unknown object given") } } /** * Returns the binary representation of the OpCode * * @param OpCode OpCode to convert * @return Byte */ internal fun getBinaryOpCode(op : OpCode) : Byte { return when(op){ OpCode.FRAGMENT -> 0 OpCode.TEXT -> 1 OpCode.BINARY -> 2 OpCode.CONNECTION_CLOSED -> 8 OpCode.PING -> 9 OpCode.PONG -> 10 else -> throw Exception("Unknown operation code"); } }
21.278689
57
0.688752
595c9d80adc2d6226e21cc0bcf2f311d31f1c570
730
h
C
IngenicoDirectExample/Factories/IDViewFactory.h
Ingenico/direct-sdk-client-objc-example
e48945b0ae014ead57045c6c524baf7cffce2d2c
[ "MIT" ]
null
null
null
IngenicoDirectExample/Factories/IDViewFactory.h
Ingenico/direct-sdk-client-objc-example
e48945b0ae014ead57045c6c524baf7cffce2d2c
[ "MIT" ]
null
null
null
IngenicoDirectExample/Factories/IDViewFactory.h
Ingenico/direct-sdk-client-objc-example
e48945b0ae014ead57045c6c524baf7cffce2d2c
[ "MIT" ]
null
null
null
// // Do not remove or alter the notices in this preamble. // This software code is created for Ingencio ePayments on 21/07/2020 // Copyright ยฉ 2020 Global Collect Services. All rights reserved. // #import "IDViewType.h" #import "IDTableViewCell.h" #import "IDSwitch.h" #import "IDTextField.h" #import "IDPickerView.h" #import "IDLabel.h" #import "IDButton.h" @interface IDViewFactory : NSObject - (IDButton *)buttonWithType:(IDButtonType)type; - (IDSwitch *)switchWithType:(IDViewType)type; - (IDTextField *)textFieldWithType:(IDViewType)type; - (IDPickerView *)pickerViewWithType:(IDViewType)type; - (IDLabel *)labelWithType:(IDViewType)type; - (UIView *)tableHeaderViewWithType:(IDViewType)type frame:(CGRect)frame; @end
28.076923
73
0.758904
577280c1d2b2e76b1a7fd41bf5a71255ea6bcf5c
2,681
h
C
llist.h
PotatoMaster101/linked_list
4cbe19077d062bbdeb91eff27f137d82053b3a90
[ "MIT" ]
null
null
null
llist.h
PotatoMaster101/linked_list
4cbe19077d062bbdeb91eff27f137d82053b3a90
[ "MIT" ]
null
null
null
llist.h
PotatoMaster101/linked_list
4cbe19077d062bbdeb91eff27f137d82053b3a90
[ "MIT" ]
null
null
null
/////////////////////////////////////////////////////////////////////////////// // llist.h // Linked list implementation in C99. // // Author: PotatoMaster101 // Date: 12/04/2019 /////////////////////////////////////////////////////////////////////////////// #ifndef LLIST_H #define LLIST_H #include <stdlib.h> #include <stdbool.h> #include <string.h> #define LLIST_OK 0 #define LLIST_NULL_ERR 1 #define LLIST_ALLOC_ERR 2 // The linked list node type. typedef struct linked_list_node_t { void *data; // internal data struct linked_list_node_t *prev; // pointer to previous struct linked_list_node_t *next; // pointer to next } lnode_t; // The linked list type. typedef struct linked_list_t { lnode_t *head; // list head lnode_t *tail; // list tail size_t len; // list size } llist_t; // Initialises the specified linked list. // // PARAMS: // l - the linked list to initialise // // RET: // Zero on success, non-zero on error. int llist_init(llist_t *l); // Returns the element at the given index in the specified linked list. If the // index is out of range, then the last element will be returned. // // PARAMS: // l - the linked list to retrieve the element // i - the index of the element // // RET: // The element at the given index, or NULL if any error occurred. void *llist_get(const llist_t *l, size_t i); // Add a new element into the given linked list. The element will be stored as // a copy. // // PARAMS: // l - the linked list to have the element added // d - the element to add // n - the size of the element // // RET: // Zero on success, non-zero on error. int llist_add(llist_t *l, const void *d, size_t n); // Inserts a new element into the given linked list. The element will be // stored as a copy. // // PARAMS: // l - the linked list to have the element inserted // d - the element to insert // n - the size of the element // i - the index in the linked list to insert to // // RET: // Zero on success, non-zero on error. int llist_ins(llist_t *l, const void *d, size_t n, size_t i); // Deletes the element at the given index in the specified linked list. If the // given index is out of range, then the last element will be deleted. // // PARAMS: // l - the linked list to have the element deleted // i - the index of the element // // RET: // The element that just got removed. void *llist_del(llist_t *l, size_t i); // Clears the given linked list, removing and freeing every element. // // PARAMS: // l - the linked list to free void llist_clear(llist_t *l); #endif
27.639175
79
0.615815
1fa1217c1c9b10bd04db1d2e76902a2cfdece429
2,653
htm
HTML
_data/Vol06_Ch0321-0344/HRS0340E/HRS_0340E-0007.htm
bronsonavila/hrsscraper
ecbb1048ab284af361fae78adb481eff554b067a
[ "MIT" ]
1
2019-02-22T10:35:29.000Z
2019-02-22T10:35:29.000Z
_data/Vol06_Ch0321-0344/HRS0340E/HRS_0340E-0007.htm
bronsonavila/hrsscraper
ecbb1048ab284af361fae78adb481eff554b067a
[ "MIT" ]
null
null
null
_data/Vol06_Ch0321-0344/HRS0340E/HRS_0340E-0007.htm
bronsonavila/hrsscraper
ecbb1048ab284af361fae78adb481eff554b067a
[ "MIT" ]
null
null
null
<div class="WordSection1"> <p class="RegularParagraphs"><b> ยง340E-7 Prohibited acts.</b> (a) No supplier of water shall violate any rule adopted pursuant to section 340E-2.</p> <p class="RegularParagraphs"> (b) No supplier of water shall violate any condition or provision of a variance, exemption, permit, or other written authorization issued under this part.</p> <p class="RegularParagraphs"> (c) No supplier of water shall violate any requirement of an emergency plan promulgated pursuant to section 340E-5.</p> <p class="RegularParagraphs"> (d) No supplier of water shall violate any rule adopted under section 340E-6 or disseminate any false or misleading information with respect to notices required pursuant to section340E-6 or with respect to remedial actions undertaken to achieve compliance with state primary drinking water regulations.</p> <p class="RegularParagraphs"> (e) No person shall violate any order issued by the director pursuant to this part.</p> <p class="RegularParagraphs"> (f) No person shall cause a public water system to violate the state primary drinking water regulations.</p> <p class="RegularParagraphs"> (g) No person shall violate underground injection control rules adopted pursuant to this part.</p> <p class="RegularParagraphs"> (h) No person shall fail or refuse to comply with the director's authority to inspect the premises of a supplier of water pursuant to section 340E-4.6.</p> <p class="RegularParagraphs"> (i) No person shall install or repair any public water system or any plumbing in a residential or nonresidential facility providing water for human consumption which is connected to a public water system with any pipe, solder, flux, plumbing fittings, or fixtures that are not lead free. "Lead free" with respect to solders and flux means containing not more than 0.2 per cent lead, with respect to pipes and pipe fittings means containing not more than 8.0 per cent lead and with respect to plumbing fittings and fixtures means those in compliance with National Sanitation Foundation Standard 61, section 9. This subsection shall not apply to leaded joints necessary for the repair of cast iron pipes.</p> <p class="RegularParagraphs"> (j) No person shall violate rules on public water system capacity adopted pursuant to this part. [L 1976, c 84, pt of ยง1; am L 1981, c 12, ยง1; am L 1987, c 165, pt of ยง1; am L 1997, c 218, ยง6; am L 2001, c 81, ยง1]</p> <p class="RegularParagraphs"></p> <p class="XNotesHeading">Revision Note</p> <p class="XNotes"></p> <p class="XNotes"> In subsections (b), (e), and (g), "part" substituted for "chapter".</p> <p class="XNotes"></p> <p class="XNotes"></p> </div>
147.388889
736
0.76781
e8f589ed3e76934af8053deea1546715e9acd247
9,095
py
Python
fn_utilities/fn_utilities/components/utilities_shell_command.py
rudimeyer/resilient-community-apps
7a46841ba41fa7a1c421d4b392b0a3ca9e36bd00
[ "MIT" ]
1
2020-08-25T03:43:07.000Z
2020-08-25T03:43:07.000Z
fn_utilities/fn_utilities/components/utilities_shell_command.py
rudimeyer/resilient-community-apps
7a46841ba41fa7a1c421d4b392b0a3ca9e36bd00
[ "MIT" ]
1
2019-07-08T16:57:48.000Z
2019-07-08T16:57:48.000Z
fn_utilities/fn_utilities/components/utilities_shell_command.py
rudimeyer/resilient-community-apps
7a46841ba41fa7a1c421d4b392b0a3ca9e36bd00
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # (c) Copyright IBM Corp. 2018. All Rights Reserved. # pragma pylint: disable=unused-argument, no-self-use """Function implementation""" import os import logging import time import shlex import subprocess import json import chardet import winrm import re from resilient_circuits import ResilientComponent, function, handler, StatusMessage, FunctionResult, FunctionError from resilient_circuits.template_functions import render class FunctionComponent(ResilientComponent): """Component that implements Resilient function 'shell_command""" def __init__(self, opts): """constructor provides access to the configuration options""" super(FunctionComponent, self).__init__(opts) self.options = opts.get("fn_utilities", {}) @handler("reload") def _reload(self, event, opts): """Configuration options have changed, save new values""" self.options = opts.get("fn_utilities", {}) @function("utilities_shell_command") def _shell_command_function(self, event, *args, **kwargs): """Function: Runs a shell command.""" try: # Get the function parameters: shell_command = kwargs.get('shell_command') # text shell_remote = kwargs.get("shell_remote") # boolean shell_param1 = kwargs.get("shell_param1") # text shell_param2 = kwargs.get("shell_param2") # text shell_param3 = kwargs.get("shell_param3") # text log = logging.getLogger(__name__) log.info("shell_command: %s", shell_command) log.info("shell_remote: %s", shell_remote) log.info("shell_param1: %s", shell_param1) log.info("shell_param2: %s", shell_param2) log.info("shell_param3: %s", shell_param3) # Options keys are lowercase, so the shell command name needs to be lowercase if shell_command: shell_command = shell_command.lower() # Escape the input parameters escaping = self.options.get("shell_escaping", "sh") escaped_args = { "shell_param1": render(u"{{shell_param1|%s}}" % escaping, kwargs), "shell_param2": render(u"{{shell_param2|%s}}" % escaping, kwargs), "shell_param3": render(u"{{shell_param3|%s}}" % escaping, kwargs) } # If running a remote script, get the remote computer and the remote command if shell_remote: colon_split = shell_command.split(':') if len(colon_split) != 2: raise ValueError("Remote commands must be of the format remote_command_name:remote_computer_name, " "'%s' was specified" % shell_command) else: shell_command = colon_split[0].strip() if self.options.get(colon_split[1]) is None: raise ValueError('The remote computer %s is not configured' % colon_split[1]) else: remote = self.options.get(colon_split[1]).strip() if remote.startswith('(') and remote.endswith(')'): remote = remote[1:-1] else: raise ValueError('Remote computer configurations must be wrapped in parentheses (), ' "%s was specfied" % remote) # Get remote credentials remote_config = re.split(':|@', remote) if len(remote_config) != 3: raise ValueError('Remote machine %s must be of the format username:password@server, ' "'%s' was specified" % remote) else: remote_user = remote_config[0] remote_password = remote_config[1] remote_server = remote_config[2] # Check if command is configured if shell_command not in self.options: if ':' in shell_command: raise ValueError("Syntax for a remote command '%s' was used but remote_shell was set to False" % shell_command) raise ValueError('%s command not configured' % shell_command) shell_command_base = self.options[shell_command].strip() # Remote commands must wrap a path with [] if shell_command_base.startswith('[') and shell_command_base.endswith(']'): if shell_remote: extension = shell_command_base[1:-1].strip().split('.')[-1] if extension not in self.options.get('remote_powershell_extensions'): raise ValueError("The specified file must be have extension %s but %s was specified" % (str(self.options.get('remote_powershell_extensions')), extension)) # Format shell parameters shell_command_base = shell_command_base[1:-1].strip() if shell_param1: shell_command_base = shell_command_base + ' "{{shell_param1}}"' else: shell_command_base = shell_command_base + ' $null' if shell_param2: shell_command_base = shell_command_base + ' "{{shell_param2}}"' else: shell_command_base = shell_command_base + ' $null' if shell_param3: shell_command_base = shell_command_base + ' "{{shell_param3}}"' else: shell_command_base = shell_command_base + ' $null' else: raise ValueError("A remote command '%s' was specified but shell_remote was set to False" % shell_command) elif shell_remote: raise ValueError('A remote command must specify a remote path wrapped in square brackets [], ' "'%s' was specified" % shell_command) if shell_command_base.startswith('(') and shell_command_base.endswith(')') and not shell_remote: raise ValueError('Please specify a valid shell command that is not wrapped in parentheses or brackets' 'when shell_remote is False') commandline = render(shell_command_base, escaped_args) if shell_remote: session = winrm.Session(remote_server, auth=(remote_user, remote_password), transport=self.options.get('remote_auth_transport')) tstart = time.time() if escaping == "sh": r = session.run_cmd(commandline) elif escaping == "ps": r = session.run_ps(commandline) retcode = r.status_code stdoutdata = r.std_out stderrdata = r.std_err tend = time.time() else: commandline = os.path.expandvars(commandline) # Set up the environment env = os.environ.copy() # Execute the command line process (NOT in its own shell) cmd = shlex.split(commandline, posix=True) tstart = time.time() call = subprocess.Popen(cmd, shell=False, stderr=subprocess.PIPE, stdout=subprocess.PIPE, env=env) stdoutdata, stderrdata = call.communicate() retcode = call.returncode tend = time.time() encoding = chardet.detect(stdoutdata)["encoding"] or "utf-8" result = stdoutdata.decode(encoding) result_json = None try: # Let's see if the output can be decoded as JSON result_json = json.loads(result) except: pass output = stderrdata.decode(encoding) output_json = None try: # Let's see if the output can be decoded as JSON output_json = json.loads(output) except: pass results = { "commandline": commandline, "start": int(tstart * 1000.0), "end": int(tend * 1000.0), "elapsed": int((tend - tstart) * 1000.0), "exitcode": retcode, # Nonzero exit code indicates error "stdout": result, "stderr": output, "stdout_json": result_json, # May be null "stderr_json": output_json # May be null } yield FunctionResult(results) except Exception: yield FunctionError()
45.934343
119
0.534469
b16f52bc34a5d808604c052f7ee6472eab978f5d
16,114
css
CSS
docs/styles.css
Blocksnmore/docugen
9b169ac0db9a8f8566abf13c27b447a661455452
[ "MIT" ]
null
null
null
docs/styles.css
Blocksnmore/docugen
9b169ac0db9a8f8566abf13c27b447a661455452
[ "MIT" ]
null
null
null
docs/styles.css
Blocksnmore/docugen
9b169ac0db9a8f8566abf13c27b447a661455452
[ "MIT" ]
null
null
null
.markdown-body.octicon { display: inline-block; fill: currentColor; vertical-align: text-bottom; } .markdown-body.anchor { float: left; line-height: 1; margin-left: -20px; padding-right: 4px; } .markdown-body.anchor:focus { outline: none; } .markdown-bodyh1.octicon-link, .markdown-bodyh2.octicon-link, .markdown-bodyh3.octicon-link, .markdown-bodyh4.octicon-link, .markdown-bodyh5.octicon-link, .markdown-bodyh6.octicon-link { color: #1b1f23; vertical-align: middle; visibility: hidden; } .markdown-bodyh1:hover.anchor, .markdown-bodyh2:hover.anchor, .markdown-bodyh3:hover.anchor, .markdown-bodyh4:hover.anchor, .markdown-bodyh5:hover.anchor, .markdown-bodyh6:hover.anchor { text-decoration: none; } .markdown-bodyh1:hover.anchor.octicon-link, .markdown-bodyh2:hover.anchor.octicon-link, .markdown-bodyh3:hover.anchor.octicon-link, .markdown-bodyh4:hover.anchor.octicon-link, .markdown-bodyh5:hover.anchor.octicon-link, .markdown-bodyh6:hover.anchor.octicon-link { visibility: visible; } .markdown-bodyh1:hover.anchor.octicon-link:before, .markdown-bodyh2:hover.anchor.octicon-link:before, .markdown-bodyh3:hover.anchor.octicon-link:before, .markdown-bodyh4:hover.anchor.octicon-link:before, .markdown-bodyh5:hover.anchor.octicon-link:before, .markdown-bodyh6:hover.anchor.octicon-link:before { width: 16px; height: 16px; content: ""; display: inline-block; background-image: url("data:image/svg+xml,%3Csvgxmlns='http://www.w3.org/2000/svg'viewBox='001616'version='1.1'width='16'height='16'aria-hidden='true'%3E%3Cpathfill-rule='evenodd'd='M49h1v1H4c-1.50-3-1.69-3-3.5S2.55343h4c1.45031.6933.501.41-.912.72-23.25V8.59c.58-.451-1.271-2.09C105.228.98484H4c-.980-21.22-22.5S3949zm9-3h-1v1h1c1021.2222.5S13.98121312H9c-.980-2-1.22-2-2.50-.83.42-1.641-2.09V6.25c-1.09.53-21.84-23.25C611.317.5513913h4c1.4503-1.693-3.5S14.56136z'%3E%3C/path%3E%3C/svg%3E"); } .markdown-body { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; line-height: 1.5; color: #24292e; font-family: -apple-system, BlinkMacSystemFont, SegoeUI, Helvetica, Arial, sans-serif, AppleColorEmoji, SegoeUIEmoji; font-size: 16px; line-height: 1.5; word-wrap: break-word; } .markdown-bodydetails { display: block; } .markdown-bodysummary { display: list-item; } .markdown-bodya { background-color: initial; } .markdown-bodya:active, .markdown-bodya:hover { outline-width: 0; } .markdown-bodystrong { font-weight: inherit; font-weight: bolder; } .markdown-bodyh1 { font-size: 2em; margin: 0.67em0; } .markdown-bodyimg { border-style: none; } .markdown-bodycode, .markdown-bodykbd, .markdown-bodypre { font-family: monospace, monospace; font-size: 1em; } .markdown-bodyhr { box-sizing: initial; height: 0; overflow: visible; } .markdown-bodyinput { font: inherit; margin: 0; } .markdown-bodyinput { overflow: visible; } .markdown-body[type="checkbox"] { box-sizing: border-box; padding: 0; } .markdown-body* { box-sizing: border-box; } .markdown-bodyinput { font-family: inherit; font-size: inherit; line-height: inherit; } .markdown-bodya { color: #0366d6; text-decoration: none; } .markdown-bodya:hover { text-decoration: underline; } .markdown-bodystrong { font-weight: 600; } .markdown-bodyhr { height: 0; margin: 15px0; overflow: hidden; background: transparent; border: 0; border-bottom: 1pxsolid#dfe2e5; } .markdown-bodyhr:after, .markdown-bodyhr:before { display: table; content: ""; } .markdown-bodyhr:after { clear: both; } .markdown-bodytable { border-spacing: 0; border-collapse: collapse; } .markdown-bodytd, .markdown-bodyth { padding: 0; } .markdown-bodydetailssummary { cursor: pointer; } .markdown-bodykbd { display: inline-block; padding: 3px5px; font: 11pxsfmono-Regular, Consolas, LiberationMono, Menlo, monospace; line-height: 10px; color: #444d56; vertical-align: middle; background-color: #fafbfc; border: 1pxsolid#d1d5da; border-radius: 3px; box-shadow: inset0-1px0#d1d5da; } .markdown-bodyh1, .markdown-bodyh2, .markdown-bodyh3, .markdown-bodyh4, .markdown-bodyh5, .markdown-bodyh6 { margin-top: 0; margin-bottom: 0; } .markdown-bodyh1 { font-size: 32px; } .markdown-bodyh1, .markdown-bodyh2 { font-weight: 600; } .markdown-bodyh2 { font-size: 24px; } .markdown-bodyh3 { font-size: 20px; } .markdown-bodyh3, .markdown-bodyh4 { font-weight: 600; } .markdown-bodyh4 { font-size: 16px; } .markdown-bodyh5 { font-size: 14px; } .markdown-bodyh5, .markdown-bodyh6 { font-weight: 600; } .markdown-bodyh6 { font-size: 12px; } .markdown-bodyp { margin-top: 0; margin-bottom: 10px; } .markdown-bodyblockquote { margin: 0; } .markdown-bodyol, .markdown-bodyul { padding-left: 0; margin-top: 0; margin-bottom: 0; } .markdown-bodyolol, .markdown-bodyulol { list-style-type: lower-roman; } .markdown-bodyololol, .markdown-bodyolulol, .markdown-bodyulolol, .markdown-bodyululol { list-style-type: lower-alpha; } .markdown-bodydd { margin-left: 0; } .markdown-bodycode, .markdown-bodypre { font-family: SFMono-Regular, Consolas, LiberationMono, Menlo, monospace; font-size: 12px; } .markdown-bodypre { margin-top: 0; margin-bottom: 0; } .markdown-bodyinput::-webkit-inner-spin-button, .markdown-bodyinput::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; appearance: none; } .markdown-body:checked + .radio-label { position: relative; z-index: 1; border-color: #0366d6; } .markdown-body.border { border: 1pxsolid#e1e4e8 !important; } .markdown-body.border-0 { border: 0 !important; } .markdown-body.border-bottom { border-bottom: 1pxsolid#e1e4e8 !important; } .markdown-body.rounded-1 { border-radius: 3px !important; } .markdown-body.bg-white { background-color: #fff !important; } .markdown-body.bg-gray-light { background-color: #fafbfc !important; } .markdown-body.text-gray-light { color: #6a737d !important; } .markdown-body.mb-0 { margin-bottom: 0 !important; } .markdown-body.my-2 { margin-top: 8px !important; margin-bottom: 8px !important; } .markdown-body.pl-0 { padding-left: 0 !important; } .markdown-body.py-0 { padding-top: 0 !important; padding-bottom: 0 !important; } .markdown-body.pl-1 { padding-left: 4px !important; } .markdown-body.pl-2 { padding-left: 8px !important; } .markdown-body.py-2 { padding-top: 8px !important; padding-bottom: 8px !important; } .markdown-body.pl-3, .markdown-body.px-3 { padding-left: 16px !important; } .markdown-body.px-3 { padding-right: 16px !important; } .markdown-body.pl-4 { padding-left: 24px !important; } .markdown-body.pl-5 { padding-left: 32px !important; } .markdown-body.pl-6 { padding-left: 40px !important; } .markdown-body.f6 { font-size: 12px !important; } .markdown-body.lh-condensed { line-height: 1.25 !important; } .markdown-body.text-bold { font-weight: 600 !important; } .markdown-body.pl-c { color: #6a737d; } .markdown-body.pl-c1, .markdown-body.pl-s.pl-v { color: #005cc5; } .markdown-body.pl-e, .markdown-body.pl-en { color: #6f42c1; } .markdown-body.pl-s.pl-s1, .markdown-body.pl-smi { color: #24292e; } .markdown-body.pl-ent { color: #22863a; } .markdown-body.pl-k { color: #d73a49; } .markdown-body.pl-pds, .markdown-body.pl-s, .markdown-body.pl-s.pl-pse.pl-s1, .markdown-body.pl-sr, .markdown-body.pl-sr.pl-cce, .markdown-body.pl-sr.pl-sra, .markdown-body.pl-sr.pl-sre { color: #032f62; } .markdown-body.pl-smw, .markdown-body.pl-v { color: #e36209; } .markdown-body.pl-bu { color: #b31d28; } .markdown-body.pl-ii { color: #fafbfc; background-color: #b31d28; } .markdown-body.pl-c2 { color: #fafbfc; background-color: #d73a49; } .markdown-body.pl-c2:before { content: "^M"; } .markdown-body.pl-sr.pl-cce { font-weight: 700; color: #22863a; } .markdown-body.pl-ml { color: #735c0f; } .markdown-body.pl-mh, .markdown-body.pl-mh.pl-en, .markdown-body.pl-ms { font-weight: 700; color: #005cc5; } .markdown-body.pl-mi { font-style: italic; color: #24292e; } .markdown-body.pl-mb { font-weight: 700; color: #24292e; } .markdown-body.pl-md { color: #b31d28; background-color: #ffeef0; } .markdown-body.pl-mi1 { color: #22863a; background-color: #f0fff4; } .markdown-body.pl-mc { color: #e36209; background-color: #ffebda; } .markdown-body.pl-mi2 { color: #f6f8fa; background-color: #005cc5; } .markdown-body.pl-mdr { font-weight: 700; color: #6f42c1; } .markdown-body.pl-ba { color: #586069; } .markdown-body.pl-sg { color: #959da5; } .markdown-body.pl-corl { text-decoration: underline; color: #032f62; } .markdown-body.mb-0 { margin-bottom: 0 !important; } .markdown-body.my-2 { margin-bottom: 8px !important; } .markdown-body.my-2 { margin-top: 8px !important; } .markdown-body.pl-0 { padding-left: 0 !important; } .markdown-body.py-0 { padding-top: 0 !important; padding-bottom: 0 !important; } .markdown-body.pl-1 { padding-left: 4px !important; } .markdown-body.pl-2 { padding-left: 8px !important; } .markdown-body.py-2 { padding-top: 8px !important; padding-bottom: 8px !important; } .markdown-body.pl-3 { padding-left: 16px !important; } .markdown-body.pl-4 { padding-left: 24px !important; } .markdown-body.pl-5 { padding-left: 32px !important; } .markdown-body.pl-6 { padding-left: 40px !important; } .markdown-body.pl-7 { padding-left: 48px !important; } .markdown-body.pl-8 { padding-left: 64px !important; } .markdown-body.pl-9 { padding-left: 80px !important; } .markdown-body.pl-10 { padding-left: 96px !important; } .markdown-body.pl-11 { padding-left: 112px !important; } .markdown-body.pl-12 { padding-left: 128px !important; } .markdown-bodyhr { border-bottom-color: #eee; } .markdown-bodykbd { display: inline-block; padding: 3px5px; font: 11pxsfmono-Regular, Consolas, LiberationMono, Menlo, monospace; line-height: 10px; color: #444d56; vertical-align: middle; background-color: #fafbfc; border: 1pxsolid#d1d5da; border-radius: 3px; box-shadow: inset0-1px0#d1d5da; } .markdown-body:after, .markdown-body:before { display: table; content: ""; } .markdown-body:after { clear: both; } .markdown-body > :first-child { margin-top: 0 !important; } .markdown-body > :last-child { margin-bottom: 0 !important; } .markdown-bodya:not([href]) { color: inherit; text-decoration: none; } .markdown-bodyblockquote, .markdown-bodydetails, .markdown-bodydl, .markdown-bodyol, .markdown-bodyp, .markdown-bodypre, .markdown-bodytable, .markdown-bodyul { margin-top: 0; margin-bottom: 16px; } .markdown-bodyhr { height: 0.25em; padding: 0; margin: 24px0; background-color: #e1e4e8; border: 0; } .markdown-bodyblockquote { padding: 01em; color: #6a737d; border-left: 0.25emsolid#dfe2e5; } .markdown-bodyblockquote > :first-child { margin-top: 0; } .markdown-bodyblockquote > :last-child { margin-bottom: 0; } .markdown-bodyh1, .markdown-bodyh2, .markdown-bodyh3, .markdown-bodyh4, .markdown-bodyh5, .markdown-bodyh6 { margin-top: 24px; margin-bottom: 16px; font-weight: 600; line-height: 1.25; } .markdown-bodyh1 { font-size: 2em; } .markdown-bodyh1, .markdown-bodyh2 { padding-bottom: 0.3em; border-bottom: 1pxsolid#eaecef; } .markdown-bodyh2 { font-size: 1.5em; } .markdown-bodyh3 { font-size: 1.25em; } .markdown-bodyh4 { font-size: 1em; } .markdown-bodyh5 { font-size: 0.875em; } .markdown-bodyh6 { font-size: 0.85em; color: #6a737d; } .markdown-bodyol, .markdown-bodyul { padding-left: 2em; } .markdown-bodyolol, .markdown-bodyolul, .markdown-bodyulol, .markdown-bodyulul { margin-top: 0; margin-bottom: 0; } .markdown-bodyli { word-wrap: break-all; } .markdown-bodyli > p { margin-top: 16px; } .markdown-bodyli + li { margin-top: 0.25em; } .markdown-bodydl { padding: 0; } .markdown-bodydldt { padding: 0; margin-top: 16px; font-size: 1em; font-style: italic; font-weight: 600; } .markdown-bodydldd { padding: 016px; margin-bottom: 16px; } .markdown-bodytable { display: block; width: 100%; overflow: auto; } .markdown-bodytableth { font-weight: 600; } .markdown-bodytabletd, .markdown-bodytableth { padding: 6px13px; border: 1pxsolid#dfe2e5; } .markdown-bodytabletr { background-color: #fff; border-top: 1pxsolid#c6cbd1; } .markdown-bodytabletr:nth-child(2n) { background-color: #f6f8fa; } .markdown-bodyimg { max-width: 100%; box-sizing: initial; background-color: #fff; } .markdown-bodyimg[align="right"] { padding-left: 20px; } .markdown-bodyimg[align="left"] { padding-right: 20px; } .markdown-bodycode { padding: 0.2em.4em; margin: 0; font-size: 85%; background-color: rgba(27, 31, 35, 0.05); border-radius: 3px; } .markdown-bodypre { word-wrap: normal; } .markdown-bodypre > code { padding: 0; margin: 0; font-size: 100%; word-break: normal; white-space: pre; background: transparent; border: 0; } .markdown-body.highlight { margin-bottom: 16px; } .markdown-body.highlightpre { margin-bottom: 0; word-break: normal; } .markdown-body.highlightpre, .markdown-bodypre { padding: 16px; overflow: auto; font-size: 85%; line-height: 1.45; background-color: #f6f8fa; border-radius: 3px; } .markdown-bodyprecode { display: inline; max-width: auto; padding: 0; margin: 0; overflow: visible; line-height: inherit; word-wrap: normal; background-color: initial; border: 0; } .markdown-body.commit-tease-sha { display: inline-block; font-family: SFMono-Regular, Consolas, LiberationMono, Menlo, monospace; font-size: 90%; color: #444d56; } .markdown-body.full-commit.btn-outline:not(:disabled):hover { color: #005cc5; border-color: #005cc5; } .markdown-body.blob-wrapper { overflow-x: auto; overflow-y: hidden; } .markdown-body.blob-wrapper-embedded { max-height: 240px; overflow-y: auto; } .markdown-body.blob-num { width: 1%; min-width: 50px; padding-right: 10px; padding-left: 10px; font-family: SFMono-Regular, Consolas, LiberationMono, Menlo, monospace; font-size: 12px; line-height: 20px; color: rgba(27, 31, 35, 0.3); text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } .markdown-body.blob-num:hover { color: rgba(27, 31, 35, 0.6); } .markdown-body.blob-num:before { content: attr(data-line-number); } .markdown-body.blob-code { position: relative; padding-right: 10px; padding-left: 10px; line-height: 20px; vertical-align: top; } .markdown-body.blob-code-inner { overflow: visible; font-family: SFMono-Regular, Consolas, LiberationMono, Menlo, monospace; font-size: 12px; color: #24292e; word-wrap: normal; white-space: pre; } .markdown-body.pl-token.active, .markdown-body.pl-token:hover { cursor: pointer; background: #ffea7f; } .markdown-body.tab-size[data-tab-size="1"] { -moz-tab-size: 1; tab-size: 1; } .markdown-body.tab-size[data-tab-size="2"] { -moz-tab-size: 2; tab-size: 2; } .markdown-body.tab-size[data-tab-size="3"] { -moz-tab-size: 3; tab-size: 3; } .markdown-body.tab-size[data-tab-size="4"] { -moz-tab-size: 4; tab-size: 4; } .markdown-body.tab-size[data-tab-size="5"] { -moz-tab-size: 5; tab-size: 5; } .markdown-body.tab-size[data-tab-size="6"] { -moz-tab-size: 6; tab-size: 6; } .markdown-body.tab-size[data-tab-size="7"] { -moz-tab-size: 7; tab-size: 7; } .markdown-body.tab-size[data-tab-size="8"] { -moz-tab-size: 8; tab-size: 8; } .markdown-body.tab-size[data-tab-size="9"] { -moz-tab-size: 9; tab-size: 9; } .markdown-body.tab-size[data-tab-size="10"] { -moz-tab-size: 10; tab-size: 10; } .markdown-body.tab-size[data-tab-size="11"] { -moz-tab-size: 11; tab-size: 11; } .markdown-body.tab-size[data-tab-size="12"] { -moz-tab-size: 12; tab-size: 12; } .markdown-body.task-list-item { list-style-type: none; } .markdown-body.task-list-item + .task-list-item { margin-top: 3px; } .markdown-body.task-list-iteminput { margin: 0.2em.25em-1.6em; vertical-align: middle; }
20.017391
494
0.691697
22ecf2873c355cc18cab86e21047d48aeafa8e94
623
h
C
msys64/mingw64/x86_64-w64-mingw32/include/gpio.h
Bhuvanesh1208/ruby2.6.1
17642e3f37233f6d0e0523af68d7600a91ece1c7
[ "Ruby" ]
12,718
2018-05-25T02:00:44.000Z
2022-03-31T23:03:51.000Z
msys64/mingw64/x86_64-w64-mingw32/include/gpio.h
Bhuvanesh1208/ruby2.6.1
17642e3f37233f6d0e0523af68d7600a91ece1c7
[ "Ruby" ]
8,483
2018-05-23T16:22:39.000Z
2022-03-31T22:18:16.000Z
msys64/mingw64/x86_64-w64-mingw32/include/gpio.h
Bhuvanesh1208/ruby2.6.1
17642e3f37233f6d0e0523af68d7600a91ece1c7
[ "Ruby" ]
1,400
2018-05-24T22:35:25.000Z
2022-03-31T21:32:48.000Z
/** * This file is part of the mingw-w64 runtime package. * No warranty is given; refer to the file DISCLAIMER within this package. */ #ifndef __GPIO_W__ #define __GPIO_W__ #include <winapifamily.h> #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) #if NTDDI_VERSION >= 0x06020000 #define IOCTL_GPIO_READ_PINS CTL_CODE (FILE_DEVICE_GPIO, 0x0, METHOD_BUFFERED, FILE_ANY_ACCESS) #define IOCTL_GPIO_WRITE_PINS CTL_CODE (FILE_DEVICE_GPIO, 0x1, METHOD_BUFFERED, FILE_ANY_ACCESS) #define IOCTL_GPIO_CONTROLLER_SPECIFIC_FUNCTION CTL_CODE (FILE_DEVICE_GPIO, 0x2, METHOD_BUFFERED, FILE_ANY_ACCESS) #endif #endif #endif
29.666667
114
0.817014
a6c452e5a67ec06b4287966d7f5c8a776fff9d09
969
tab
SQL
CZ-9x9-CMR/8-32-ES-12STATES-50CMR05.tab
bidlom/Mendel2019-ES
24632a8582e2b18bd8367ecb599c9d4b58e7d7da
[ "BSD-3-Clause" ]
null
null
null
CZ-9x9-CMR/8-32-ES-12STATES-50CMR05.tab
bidlom/Mendel2019-ES
24632a8582e2b18bd8367ecb599c9d4b58e7d7da
[ "BSD-3-Clause" ]
null
null
null
CZ-9x9-CMR/8-32-ES-12STATES-50CMR05.tab
bidlom/Mendel2019-ES
24632a8582e2b18bd8367ecb599c9d4b58e7d7da
[ "BSD-3-Clause" ]
null
null
null
2 12 0 0 0 0 10 1 0 0 0 0 11 1 0 0 0 1 10 8 0 0 0 10 1 1 0 0 0 11 0 1 0 0 0 11 11 1 0 0 0 8 1 1 0 0 1 0 0 11 0 0 1 0 1 11 0 0 1 1 1 11 0 0 1 9 10 10 0 0 1 9 11 10 0 0 1 9 9 10 0 0 10 9 10 1 0 0 10 9 11 1 0 0 11 0 0 0 0 0 11 1 1 9 0 0 11 2 1 9 0 0 11 2 9 9 0 0 11 9 1 10 0 0 5 0 0 11 0 0 8 1 1 9 0 0 8 1 10 3 0 1 0 0 1 2 0 1 0 0 2 2 0 1 3 2 1 2 0 10 0 0 0 1 0 10 9 2 1 2 0 11 0 0 0 1 0 2 0 0 1 2 0 2 0 0 2 2 0 3 0 0 1 2 0 3 0 0 2 2 0 3 1 0 0 3 0 8 1 2 2 2 1 0 0 1 0 1 1 0 0 10 0 1 1 0 0 5 0 1 1 1 0 1 5 9 1 1 1 3 0 3 1 1 10 3 0 3 1 10 9 2 1 2 1 3 0 0 0 10 1 5 0 0 0 1 1 8 0 0 0 1 10 0 0 0 0 5 10 0 0 5 0 1 10 0 1 4 0 10 10 1 0 0 0 8 10 1 10 1 10 1 10 1 10 3 1 1 10 1 11 1 1 1 10 1 9 1 1 1 11 0 0 0 0 5 11 0 1 11 0 10 11 11 1 0 0 3 11 11 9 11 11 1 2 3 2 0 3 3 2 9 11 0 1 3 3 0 0 1 0 1 3 0 5 0 0 4 3 1 0 0 0 10 3 1 1 3 0 3 3 1 4 1 0 3 3 10 0 0 0 1 3 3 1 0 0 3 3 3 1 3 0 3 3 3 10 0 0 3 3 3 3 10 0 1 3 3 3 8 0 1 3 3 8 0 0 3 3 4 1 0 0 3 3 5 0 0 0 1 8 1 10 2 1 1 9 1 11 1 0 3
12.584416
15
0.53354
bca3be3ee9751fdb88ec3b0c2637939c0b2a083c
1,448
js
JavaScript
Sleep_Debt_Calculator/sleepDebtCalculator.js
a-m-davis/full_stack_course
95c9dc8cc711482e23a71f5f20f1571f7255da25
[ "Apache-2.0" ]
null
null
null
Sleep_Debt_Calculator/sleepDebtCalculator.js
a-m-davis/full_stack_course
95c9dc8cc711482e23a71f5f20f1571f7255da25
[ "Apache-2.0" ]
null
null
null
Sleep_Debt_Calculator/sleepDebtCalculator.js
a-m-davis/full_stack_course
95c9dc8cc711482e23a71f5f20f1571f7255da25
[ "Apache-2.0" ]
null
null
null
const getSleepHours = (day) => { switch (day){ case 'monday': return 8; break; case 'tuesday': return 7; break; case 'wednesday': return 8; break; case 'thursday': return 9; break; case 'friday': return 8; break; case 'saturday': return 7; break; case 'sunday': return 8; break; } } const getActualSleepHours = () => { return getSleepHours('monday') + getSleepHours('tuesday') + getSleepHours('wednesday') + getSleepHours('thursday') + getSleepHours('friday') + getSleepHours('saturday') + getSleepHours('sunday'); } const getIdealSleepHours = () => { let idealHours = 8; return idealHours * 7; } const calculateSleepDebt = () => { let actualSleepHours = getActualSleepHours(); let idealHours = getIdealSleepHours(); if (actualSleepHours === idealHours){ console.log('You got the perfect amount of sleep.'); } else if (actualSleepHours > idealHours){ console.log('You got more sleep than needed.'); let surplus = actualSleepHours - idealHours; console.log('Sleep surplus: ' + surplus + ' hours.'); } else { console.log('You need to get some rest.') let deficit = idealHours - actualSleepHours; console.log('Sleep deficit: ' + deficit + ' hours.'); } } calculateSleepDebt();
27.320755
199
0.576657
3a0c5c9a11dc785d08663054f489161542d0f8f6
1,577
kts
Kotlin
build.gradle.kts
kpramesh2212/json2java-gradle-plugin
8b900127feb77acf9cafcd846802ef168129aa12
[ "Apache-2.0" ]
1
2021-01-11T15:09:41.000Z
2021-01-11T15:09:41.000Z
build.gradle.kts
kpramesh2212/json2java-gradle-plugin
8b900127feb77acf9cafcd846802ef168129aa12
[ "Apache-2.0" ]
1
2021-02-01T18:14:50.000Z
2021-02-03T04:23:08.000Z
build.gradle.kts
kpramesh2212/json2java-gradle-plugin
8b900127feb77acf9cafcd846802ef168129aa12
[ "Apache-2.0" ]
null
null
null
plugins { `java-gradle-plugin` `kotlin-dsl` `maven-publish` id("net.researchgate.release") version "2.8.1" id("com.gradle.plugin-publish") version "0.12.0" } repositories { mavenCentral() } dependencies { implementation(group = "org.jsonschema2pojo", name = "jsonschema2pojo-core", version = "1.0.2") } tasks { compileKotlin { kotlinOptions.jvmTarget = "1.8" } compileTestKotlin { kotlinOptions.jvmTarget = "1.8" } } gradlePlugin { plugins { create("json2java-gradle-plugin") { id = "com.rameshkp.json2java-gradle-plugin" displayName = "Json2Java Gradle Plugin" description = "A gradle plugin to convert json schemas into POJOs" implementationClass = "com.rameshkp.json2java.gradle.Json2JavaGradlePlugin" } } } publishing { repositories { maven { name = "local" url = uri("$buildDir/repo") } } } pluginBundle { website = "https://github.com/kpramesh2212/json2java-gradle-plugin" vcsUrl = "https://github.com/kpramesh2212/json2java-gradle-plugin.git" tags = listOf("json2java", "jsonschema2java", "json2pojo", "jsonschema2pojo", "yaml2java", "yaml2pojo", "pojo-generator") } val afterReleaseBuild by tasks.existing afterEvaluate { afterReleaseBuild { dependsOn(tasks.named("publish")) dependsOn(tasks.named("publishPlugins")) } } release { (getProperty("git") as net.researchgate.release.GitAdapter.GitConfig).apply { requireBranch = "main" } }
23.893939
125
0.639188
b438d227391c9ed0326a33e5e39b929e042657bb
2,054
swift
Swift
Sources/XCRemoteCache/Models/MetaReader.swift
samuelsainz/XCRemoteCache
50580bf9fd8e8e6caaab554516eda50e580631f9
[ "Apache-2.0" ]
620
2021-11-15T18:59:16.000Z
2022-03-29T12:44:21.000Z
Sources/XCRemoteCache/Models/MetaReader.swift
samuelsainz/XCRemoteCache
50580bf9fd8e8e6caaab554516eda50e580631f9
[ "Apache-2.0" ]
58
2021-11-17T07:21:31.000Z
2022-03-30T21:44:38.000Z
Sources/XCRemoteCache/Models/MetaReader.swift
samuelsainz/XCRemoteCache
50580bf9fd8e8e6caaab554516eda50e580631f9
[ "Apache-2.0" ]
32
2021-11-16T16:12:41.000Z
2022-03-30T20:17:25.000Z
// Copyright (c) 2021 Spotify AB. // // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. import Foundation enum MetaReaderError: Error { /// Missing file that should contain the meta case missingFile(URL) } /// Parses and provides `MainArtifactMeta`. Supports reading from a disk or directly from provided data representation protocol MetaReader { /// Reads from a local disk location /// - Parameter localFile: location of the file to parse func read(localFile: URL) throws -> MainArtifactMeta /// Reads from a data representation /// - Parameter data: meta representation func read(data: Data) throws -> MainArtifactMeta } /// Parses `MainArtifactMeta` from a JSON representation class JsonMetaReader: MetaReader { private let decoder = JSONDecoder() private let fileAccessor: FileAccessor init(fileAccessor: FileAccessor) { self.fileAccessor = fileAccessor } func read(localFile: URL) throws -> MainArtifactMeta { guard let data = try fileAccessor.contents(atPath: localFile.path) else { throw MetaReaderError.missingFile(localFile) } return try read(data: data) } func read(data: Data) throws -> MainArtifactMeta { return try decoder.decode(MainArtifactMeta.self, from: data) } }
36.035088
118
0.723953
8e9158d4243187a05b8dcc317e515ea1905f86d4
158
rb
Ruby
test/test_helper.rb
jamonholmgren/active_tax
813b37ba9425c69b72b5422672ab542d241905f0
[ "MIT" ]
10
2016-01-08T00:25:12.000Z
2021-11-11T16:54:41.000Z
test/test_helper.rb
jamonholmgren/active_tax
813b37ba9425c69b72b5422672ab542d241905f0
[ "MIT" ]
8
2015-04-23T16:38:23.000Z
2021-02-02T06:12:06.000Z
test/test_helper.rb
jamonholmgren/active_tax
813b37ba9425c69b72b5422672ab542d241905f0
[ "MIT" ]
3
2017-09-12T13:58:10.000Z
2018-04-25T04:37:49.000Z
require 'active_tax' require "minitest/autorun" require "minitest/reporters" Minitest::Reporters.use! Minitest::Reporters::ProgressReporter.new(color: true)
26.333333
79
0.810127
b553ab8f4077c23522e83c69a89ac2d718112f4a
1,068
kt
Kotlin
db/src/main/java/com/bruhascended/db/food/entities/Food.kt
ChiragKalra/Fitter
503f9b93ee9666337c6c8d61e53734a63a359848
[ "MIT" ]
6
2021-07-20T18:33:42.000Z
2021-12-13T08:34:50.000Z
db/src/main/java/com/bruhascended/db/food/entities/Food.kt
ChiragKalra/Fitter
503f9b93ee9666337c6c8d61e53734a63a359848
[ "MIT" ]
7
2021-07-02T10:57:17.000Z
2021-12-13T13:07:35.000Z
db/src/main/java/com/bruhascended/db/food/entities/Food.kt
ChiragKalra/Fitter
503f9b93ee9666337c6c8d61e53734a63a359848
[ "MIT" ]
1
2022-01-10T06:43:09.000Z
2022-01-10T06:43:09.000Z
package com.bruhascended.db.food.entities import androidx.room.* import com.bruhascended.db.food.types.NutrientType import com.bruhascended.db.food.types.QuantityType import java.io.Serializable import java.util.* import kotlin.math.abs @Entity data class Food ( @PrimaryKey val foodName: String, val calories: Double, val weightInfo: EnumMap<QuantityType, Double> = EnumMap(QuantityType::class.java), val nutrientInfo: EnumMap<NutrientType, Double> = EnumMap(NutrientType::class.java), ): Serializable { override fun equals(other: Any?): Boolean { if (this === other) return true if (javaClass != other?.javaClass) return false other as Food if (foodName != other.foodName) return false if (calories != other.calories) return false if (weightInfo != other.weightInfo) return false if (nutrientInfo != other.nutrientInfo) return false return true } override fun hashCode(): Int { return foodName.hashCode() } val id get() = abs(hashCode()) }
28.105263
88
0.682584
f0629240183e189c6ab47b1a2f97def0d6ae77cc
114
js
JavaScript
src/utils/globals.utils.js
Frontcore/frontcore-web
80f71b25665d7975daef2a95900135adc42e29a7
[ "MIT" ]
null
null
null
src/utils/globals.utils.js
Frontcore/frontcore-web
80f71b25665d7975daef2a95900135adc42e29a7
[ "MIT" ]
6
2017-01-12T17:53:32.000Z
2017-01-15T16:41:05.000Z
src/utils/globals.utils.js
Frontcore/frontcore-web
80f71b25665d7975daef2a95900135adc42e29a7
[ "MIT" ]
null
null
null
module.exports = { "elasticsearch": { "default": { "connection": "http://localhost:9200" } } };
14.25
43
0.526316
7182d064c9ee4e0e78fe2c3ac8e36bfb26d7ebc2
3,242
ts
TypeScript
src/client.ts
contactlab/contactsnag
6841a9e09724047e94e1eb62ad11db6461a5c7af
[ "Apache-2.0" ]
3
2017-03-29T17:28:47.000Z
2022-01-17T08:10:37.000Z
src/client.ts
contactlab/contactsnag
6841a9e09724047e94e1eb62ad11db6461a5c7af
[ "Apache-2.0" ]
95
2017-05-17T16:15:13.000Z
2021-12-21T09:59:58.000Z
src/client.ts
contactlab/contactsnag
6841a9e09724047e94e1eb62ad11db6461a5c7af
[ "Apache-2.0" ]
1
2017-07-06T07:36:15.000Z
2017-07-06T07:36:15.000Z
import * as BS from '@bugsnag/js'; import * as E from 'fp-ts/Either'; import * as IOE from 'fp-ts/IOEither'; import {constVoid as undef} from 'fp-ts/function'; import {pipe} from 'fp-ts/function'; import {Config, validate} from './validate'; // --- Constants const DEFAULT_CONFIG: Partial<Config> = { enabledBreadcrumbTypes: [ 'error', 'manual', 'navigation', 'process', 'request', 'state', 'user' ] }; const NOT_STARTED_ERR_MSG = 'Client not yet started'; // --- States type ActualClient = ConfigError | Still | Started; interface ConfigError { readonly type: 'ConfigError'; readonly error: Error; } const ConfigError = (error: Error): ConfigError => ({ type: 'ConfigError', error }); interface Still { readonly type: 'Still'; readonly config: Config; } const Still = (config: Config): Still => ({type: 'Still', config}); interface Started { readonly type: 'Started'; readonly bugsnag: BS.Client; } const Started = (bugsnag: BS.Client): Started => ({ type: 'Started', bugsnag }); // --- Client export interface Client { readonly client: () => ActualClient; readonly start: () => void; readonly notify: ( error: BS.NotifiableError, onError?: BS.OnErrorCallback ) => IOE.IOEither<Error, void>; readonly setUser: (user: BS.User) => IOE.IOEither<Error, void>; } export const create = (creator: BS.BugsnagStatic) => (config: Config): Client => { let actualClient = pipe( validate(config), E.map(withDefaults), E.fold<Error, Config, ActualClient>(ConfigError, Still) ); const c: Client = { client: () => actualClient, start: () => match( actualClient, undef, s => (actualClient = Started(creator.start(s.config))), undef ), notify: (error, onError) => match( actualClient, configErrorThrows, stillThrows, notify(error, onError) ), setUser: user => match(actualClient, configErrorThrows, stillThrows, setUser(user)) }; return c; }; // --- Helpers function match<R>( value: ActualClient, whenConfigError: (v: ConfigError) => R, whenStill: (v: Still) => R, whenStarted: (v: Started) => R ): R { switch (value.type) { case 'ConfigError': return whenConfigError(value); case 'Still': return whenStill(value); case 'Started': return whenStarted(value); } } function withDefaults(c: Config): Config { return Object.assign({}, DEFAULT_CONFIG, c); } function configErrorThrows(client: ConfigError): IOE.IOEither<Error, void> { return IOE.MonadThrow.throwError(client.error); } function stillThrows(_: Still): IOE.IOEither<Error, void> { return IOE.MonadThrow.throwError(new Error(NOT_STARTED_ERR_MSG)); } type ExecWhenIsStarted = (client: Started) => IOE.IOEither<Error, void>; function notify( error: BS.NotifiableError, onError?: BS.OnErrorCallback ): ExecWhenIsStarted { return ({bugsnag}) => IOE.tryCatch(() => bugsnag.notify(error, onError), E.toError); } function setUser(user: BS.User): ExecWhenIsStarted { return ({bugsnag}) => IOE.rightIO(() => bugsnag.setUser(user.id, user.email, user.name)); }
22.054422
76
0.637261
3ea94233dbcfdacc02d20a50c424c584c9c7369c
204
h
C
ML/TRProject/ViewController/Main/MainTabbar.h
mustCool/ML
0eaa917a9ca380edfe48a8cc5bf5c5df85e95afb
[ "Apache-2.0" ]
null
null
null
ML/TRProject/ViewController/Main/MainTabbar.h
mustCool/ML
0eaa917a9ca380edfe48a8cc5bf5c5df85e95afb
[ "Apache-2.0" ]
null
null
null
ML/TRProject/ViewController/Main/MainTabbar.h
mustCool/ML
0eaa917a9ca380edfe48a8cc5bf5c5df85e95afb
[ "Apache-2.0" ]
null
null
null
// // MainTabbar.h // TRProject // // Created by Yang Xiong on 15/12/2016. // Copyright ยฉ 2016 Tedu. All rights reserved. // #import <UIKit/UIKit.h> @interface MainTabbar : UITabBarController @end
14.571429
47
0.681373
9ab16b23186f2a167d921eafbbaa818c80915064
390
lua
Lua
python/coppelia-robotics/scripts/robot_conextion_coppelia.lua
sebpadilla09/computer-vision-dojo
4c55081c7ec37278d45f649e1f5109031f776a04
[ "MIT" ]
null
null
null
python/coppelia-robotics/scripts/robot_conextion_coppelia.lua
sebpadilla09/computer-vision-dojo
4c55081c7ec37278d45f649e1f5109031f776a04
[ "MIT" ]
null
null
null
python/coppelia-robotics/scripts/robot_conextion_coppelia.lua
sebpadilla09/computer-vision-dojo
4c55081c7ec37278d45f649e1f5109031f776a04
[ "MIT" ]
null
null
null
function sysCall_init() corout=coroutine.create(coroutineMain) end function sysCall_actuation() if coroutine.status(corout)~='dead' then local ok,errorMsg=coroutine.resume(corout) if errorMsg then error(debug.traceback(corout,errorMsg),2) end end end function coroutineMain() end function sysCall_cleanup() end simRemoteApi.start(19999)
17.727273
53
0.712821
cb42cfcf34286f263928c62add41118330c7dfc2
378
sql
SQL
openGaussBase/testcase/KEYWORDS/state/Opengauss_Function_Keyword_State_Case0018.sql
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/KEYWORDS/state/Opengauss_Function_Keyword_State_Case0018.sql
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
openGaussBase/testcase/KEYWORDS/state/Opengauss_Function_Keyword_State_Case0018.sql
opengauss-mirror/Yat
aef107a8304b94e5d99b4f1f36eb46755eb8919e
[ "MulanPSL-1.0" ]
null
null
null
-- @testpoint:opengaussๅ…ณ้”ฎๅญ—state(้žไฟ็•™)๏ผŒไฝœไธบๆ•ฐๆฎๅบ“ๅ --ๅ…ณ้”ฎๅญ—ไธๅธฆๅผ•ๅท-ๆˆๅŠŸ drop database if exists state; create database state; drop database state; --ๅ…ณ้”ฎๅญ—ๅธฆๅŒๅผ•ๅท-ๆˆๅŠŸ drop database if exists "state"; create database "state"; drop database "state"; --ๅ…ณ้”ฎๅญ—ๅธฆๅ•ๅผ•ๅท-ๅˆ็†ๆŠฅ้”™ drop database if exists 'state'; create database 'state'; --ๅ…ณ้”ฎๅญ—ๅธฆๅๅผ•ๅท-ๅˆ็†ๆŠฅ้”™ drop database if exists `state`; create database `state`;
18
44
0.753968
2672108dec7bb552a2f059cddd840e0ae73ef397
327
java
Java
src/main/java/br/com/zupacademy/ggwadera/transacoes/transacao/TransacaoRepository.java
ggwadera/orange-talents-04-template-transacao
3e2f97f82f447aa705eb10bcecebb00992ddb4ed
[ "Apache-2.0" ]
null
null
null
src/main/java/br/com/zupacademy/ggwadera/transacoes/transacao/TransacaoRepository.java
ggwadera/orange-talents-04-template-transacao
3e2f97f82f447aa705eb10bcecebb00992ddb4ed
[ "Apache-2.0" ]
null
null
null
src/main/java/br/com/zupacademy/ggwadera/transacoes/transacao/TransacaoRepository.java
ggwadera/orange-talents-04-template-transacao
3e2f97f82f447aa705eb10bcecebb00992ddb4ed
[ "Apache-2.0" ]
null
null
null
package br.com.zupacademy.ggwadera.transacoes.transacao; import org.springframework.data.jpa.repository.JpaRepository; import java.util.List; import java.util.UUID; public interface TransacaoRepository extends JpaRepository<Transacao, UUID> { List<Transacao> findFirst10ByCartaoIdOrderByEfetivadaEmDesc(UUID cartaoId); }
32.7
79
0.83792
169c57d1daeccfaa76a90b38fbfe76ce69c11af7
521
c
C
Recursion/summation_1ton_recursion.c
roysammy123/C-programs
260d669366f89989f7e4c0a0063319bf471b018d
[ "MIT" ]
2
2022-01-16T15:49:14.000Z
2022-01-20T07:41:05.000Z
Recursion/summation_1ton_recursion.c
roysammy123/C-Programs
260d669366f89989f7e4c0a0063319bf471b018d
[ "MIT" ]
null
null
null
Recursion/summation_1ton_recursion.c
roysammy123/C-Programs
260d669366f89989f7e4c0a0063319bf471b018d
[ "MIT" ]
null
null
null
// Program to find the summation of 1 to n using recursion #include<stdio.h> #include<stdlib.h> #include<conio.h> int summation(int n) { if(n==0) { return n; } else { return (n+summation(n-1)); } } int main() { int x; printf("Enter the number upto which you want to find summation:\n"); scanf("%d",&x); int sumadd; sumadd=summation(x); printf("The summation of the numbers from 1 to %d is %d",x,sumadd); return 0; }
16.28125
73
0.545106
f1cf57e2aece7a195f85295f305cab24a35c2f78
402
rb
Ruby
lib/dynalist.rb
4geru/dynalist
6372db8f520dfb0f4398185a5e02361d760b42df
[ "MIT" ]
1
2020-12-14T22:57:22.000Z
2020-12-14T22:57:22.000Z
lib/dynalist.rb
4geru/dynalist
6372db8f520dfb0f4398185a5e02361d760b42df
[ "MIT" ]
null
null
null
lib/dynalist.rb
4geru/dynalist
6372db8f520dfb0f4398185a5e02361d760b42df
[ "MIT" ]
null
null
null
require 'faraday' require "dynalist/version" require "dynalist/node" require "dynalist/node_tree" require "dynalist/base_file" require "dynalist/file_tree" require "dynalist/document" require "dynalist/folder" require "dynalist/base_api_client" require "dynalist/file_api_client" require "dynalist/node_api_client" require "dotenv" Dotenv.load module Dynalist class Error < StandardError; end end
20.1
34
0.813433
75fcdba2f5d6b549d8eed501b10e9c4889018017
2,681
php
PHP
app/Http/Controllers/FilmsController.php
salmakl/FilmReview
b6495339fd7704a3ee886789f93962bd880538a9
[ "MIT" ]
null
null
null
app/Http/Controllers/FilmsController.php
salmakl/FilmReview
b6495339fd7704a3ee886789f93962bd880538a9
[ "MIT" ]
null
null
null
app/Http/Controllers/FilmsController.php
salmakl/FilmReview
b6495339fd7704a3ee886789f93962bd880538a9
[ "MIT" ]
null
null
null
<?php namespace App\Http\Controllers; use App\Film; use App\Comment; use Illuminate\Http\Request; class FilmsController extends Controller { /** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $films = Film::all(); return view('films',['films'=>$films]); } public function afficher() { $films = Film::all(); return view('gallery',['films'=>$films]); } /** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create() { return view('add'); } /** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(Request $request) { $film=new Film(); $file = $request->img; $ext = $file->getClientOriginalExtension(); $filename = time() . "." . $ext; $file->move('images/', $filename); $film->title=$request->title; $film->description=$request->description; $film->img=$filename; $film->save(); return redirect('/films'); } /** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show(Film $id) { // echo $id; $comments= Comment::where('movie_id',$id->id)->get(); return view('single')->with('single', $id)->with('comments',$comments); } /** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { // $film=Film::find($id); return view('edit',["film"=>$film]); } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(Request $request, $id) { $film=Film::find($id); $film->title=$request->title; $film->description=$request->description; $film->update(); return redirect(route("films")); } /** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { // $film = Film::findOrFail($id); $film->delete(); return redirect()->back(); // Post::where('id', $id)->delete(); } }
21.277778
79
0.531145
858680e6ac7f8a9cf1db4e072f48e879884a9522
3,378
js
JavaScript
src/templates/tags.js
Mifaaws/gatsby-blog
80a9e0e5d45565f5f4e07183a7f14be59a644c85
[ "0BSD" ]
null
null
null
src/templates/tags.js
Mifaaws/gatsby-blog
80a9e0e5d45565f5f4e07183a7f14be59a644c85
[ "0BSD" ]
null
null
null
src/templates/tags.js
Mifaaws/gatsby-blog
80a9e0e5d45565f5f4e07183a7f14be59a644c85
[ "0BSD" ]
null
null
null
import * as React from "react" import { Link, graphql } from "gatsby" import Bio from "../components/bio" import Layout from "../components/layout" import Seo from "../components/seo" const Tags = ({ data, location, pageContext }) => { const siteTitle = data.site.siteMetadata?.title || `Title` const posts = data.allContentfulPost.edges if (posts.length === 0) { return ( <Layout location={location} title={siteTitle}> <Seo title={`ใ€Œ${pageContext.tag}ใ€ใฎ่จ˜ไบ‹ไธ€่ฆง`} /> <p> No blog posts found. </p> <hr /> <footer> <Bio /> </footer> </Layout> ) } return ( <Layout location={location} title={siteTitle}> <Seo title={`ใ€Œ${pageContext.tag}ใ€ใฎ่จ˜ไบ‹ไธ€่ฆง`} /> <h3>ใ€Œ{pageContext.tag}ใ€ใฎ่จ˜ไบ‹ไธ€่ฆง ( {data.allContentfulPost.totalCount} ไปถ)</h3> <ol style={{ listStyle: `none` }}> {posts.map(post => { const title = post.node.title || post.node.fields.slug const date = post.node.publishDate || post.node.createdAt; return ( <li key={post.node.slug}> <article className="post-list-item" itemScope itemType="http://schema.org/Article" > <div> <header> <small>{date}</small> <h2> <Link to={`/${post.node.slug}`} itemProp="url"> <span itemProp="headline">{title}</span> </Link> </h2> <hr /> <div> {post.node.tags.length > 0 && post.node.tags.map(tag => ( <p className="post-list-item-tag"> <Link to={`/tags/${tag.slug}/`}> <span>{tag.title}</span> </Link> </p> ))} </div> </header> <section> <p dangerouslySetInnerHTML={{ __html: post.node.description ? post.node.description.description : post.node.body.childMarkdownRemark.excerpt, }} itemProp="description" /> </section> </div> </article> </li> ) })} </ol> <hr className="solid-hr" /> <footer> <Bio /> </footer> </Layout> ) } export default Tags export const pageQuery = graphql` query($tag: [String]) { site { siteMetadata { title } } allContentfulPost(sort: {fields: createdAt, order: DESC}, filter: {tags: {elemMatch: {title: { in: $tag } } } } ) { edges { node { title image { file { url } } createdAt(locale: "ja-JP", formatString: "YYYY-MM-DD") description { description } slug body { childMarkdownRemark { excerpt } } tags { title slug } publishDate(locale: "ja-JP", formatString: "YYYY-MM-DD") } } totalCount } } `
27.688525
135
0.427176
c88f575a3910507ec74d2f71cc428ddfe7ef491e
223
rs
Rust
yuki/src/app/renderpasses/mod.rs
sndels/yuki
bac8c1530ecc03b2c9657cd4cbde91112fbf82a8
[ "MIT" ]
null
null
null
yuki/src/app/renderpasses/mod.rs
sndels/yuki
bac8c1530ecc03b2c9657cd4cbde91112fbf82a8
[ "MIT" ]
null
null
null
yuki/src/app/renderpasses/mod.rs
sndels/yuki
bac8c1530ecc03b2c9657cd4cbde91112fbf82a8
[ "MIT" ]
null
null
null
mod ray_visualization; mod scale_output; mod tonemap; pub use ray_visualization::RayVisualization; pub use scale_output::ScaleOutput; pub use tonemap::{find_min_max, FilmicParams, HeatmapParams, ToneMapFilm, ToneMapType};
27.875
87
0.829596
1f981c9f387c39b78f8645a276e9c13e66657046
1,186
html
HTML
LaTeX/Overleaf/Academic Journals and Articles/Journal-of-Object-Technology/Files/jot-latex-template/README.html
rubenandrebarreiro/tex-paper-articles-journals-templates
28c9c88198a047c32996c9515f3e60675b42be23
[ "MIT" ]
6
2019-05-12T00:51:08.000Z
2022-03-11T05:33:59.000Z
LaTeX/Overleaf/Academic Journals and Articles/Journal-of-Object-Technology/Files/jot-latex-template/README.html
rubenandrebarreiro/tex-paper-articles-journals-templates
28c9c88198a047c32996c9515f3e60675b42be23
[ "MIT" ]
null
null
null
LaTeX/Overleaf/Academic Journals and Articles/Journal-of-Object-Technology/Files/jot-latex-template/README.html
rubenandrebarreiro/tex-paper-articles-journals-templates
28c9c88198a047c32996c9515f3e60675b42be23
[ "MIT" ]
null
null
null
<h1 id="class_and_template_files_for_the_journal_of_object_technology">Class and template files for the Journal of Object Technology</h1> <p>This package provides the LaTeX files necessary to typeset articles for submission to the <a href="http://www.jot.fm">Journal of Object Technology (JOT)</a>.</p> <h2 id="quick_start">Quick start</h2> <p>Authors just need the following files:</p> <ul> <li><code>paper-template.tex</code>: a template for new articles</li> <li><code>jot.cls</code>: the LaTeX class file defining the style</li> </ul> <p>Just copy <code>jot.cls</code> somewhere LaTeX can find it, and start from <code>paper-template.tex</code> to edit your article. (Rename it appropriately.)</p> <p>All other files are for the manual. <code>jot-manual.pdf</code> explains in detail how to use the JOT style to write articles. <code>jot-manual.tex</code> also serves as an extended example of using the style.</p> <h2 id="download">Download</h2> <p>A zip download is available from the <a href="http://www.jot.fm/authors.html">author instructions page</a>.</p> <p>The complete project resides on the <a href="https://github.com/jotfm/jot">JOT github repository</a>.</p>
51.565217
218
0.741147
0bab9c96a95c9a1b5bf24f9a433d56e2555e1a77
392
py
Python
simulation/strategies/bucketing.py
kantai/hyperbolic-caching
884c466c311bb5b9fbdd09791d829b04032f3947
[ "MIT" ]
15
2017-07-13T17:30:01.000Z
2021-05-18T11:51:13.000Z
simulation/strategies/bucketing.py
kantai/hyperbolic-caching
884c466c311bb5b9fbdd09791d829b04032f3947
[ "MIT" ]
null
null
null
simulation/strategies/bucketing.py
kantai/hyperbolic-caching
884c466c311bb5b9fbdd09791d829b04032f3947
[ "MIT" ]
6
2017-07-13T21:09:04.000Z
2021-04-12T15:22:57.000Z
class AveragingBucketUpkeep: def __init__(self): self.numer = 0.0 self.denom = 0 def add_cost(self, cost): self.numer += cost self.denom += 1 return self.numer / self.denom def rem_cost(self, cost): self.numer -= cost self.denom -= 1 if self.denom == 0: return 0 return self.numer / self.denom
23.058824
38
0.543367
28a2ff8bb30cf42ef8c85e9af525806eb9e36786
9,022
kt
Kotlin
pubsub/src/main/kotlin/glitch/pubsub/PubSubConverter.kt
stachu540/glitch
81283227ee6c3b63866fe1371959a72f8b0d2640
[ "MIT" ]
16
2018-09-18T09:32:34.000Z
2022-01-11T12:28:00.000Z
pubsub/src/main/kotlin/glitch/pubsub/PubSubConverter.kt
stachu540/glitch
81283227ee6c3b63866fe1371959a72f8b0d2640
[ "MIT" ]
32
2018-09-17T09:00:34.000Z
2020-07-09T20:38:41.000Z
pubsub/src/main/kotlin/glitch/pubsub/PubSubConverter.kt
stachu540/glitch
81283227ee6c3b63866fe1371959a72f8b0d2640
[ "MIT" ]
5
2018-09-21T23:42:39.000Z
2020-12-05T19:58:48.000Z
package glitch.pubsub import com.google.gson.* import com.google.gson.annotations.JsonAdapter import com.google.gson.stream.JsonReader import com.google.gson.stream.JsonWriter import glitch.api.ws.IEventConverter import glitch.api.ws.events.IEvent import glitch.api.ws.events.PingEvent import glitch.api.ws.events.PongEvent import glitch.pubsub.`object`.enums.MessageType import glitch.pubsub.`object`.enums.SubscriptionContext import glitch.pubsub.events.* import glitch.pubsub.events.json.* import glitch.pubsub.exceptions.TopicException import java.io.IOException import java.util.* /** * * @author Damian Staszewski [damian@stachuofficial.tv] * @version %I%, %G% * @since 1.0 */ class PubSubConverter(private val gson: Gson) : IEventConverter<GlitchPubSub> { override fun convert(client: GlitchPubSub, raw: String): IEvent<GlitchPubSub> { val `object`: JsonObject = JsonParser().parse(raw).asJsonObject val type = MessageType.valueOf(`object`["type"].asString) return when (type) { MessageType.PING -> PingEvent(client) MessageType.PONG -> PongEvent(client) MessageType.RECONNECT -> ReconnectRequiredEvent(client) MessageType.RESPONSE -> doResponse(client, `object`) MessageType.MESSAGE -> doMessage(client, `object`) else -> PubSubEvent(client, `object`) } } private fun doResponse(client: GlitchPubSub, data: JsonObject): IEvent<GlitchPubSub> { val topicsCache = client.topicsCache val nonce = UUID.fromString(data["nonce"].asString) val error = data["error"].asString.orEmpty() for (topic in topicsCache.active) { if (topic.code == nonce) { return if (error.isBlank()) { SucessfulResponseEvent(client, topic) } else { val err = when (error) { "ERR_BADMESSAGE" -> "Inappropriate message!" "ERR_BADAUTH" -> "Failed to using authorization!" "ERR_SERVER" -> "Internal Server Error!" "ERR_BADTOPIC" -> "Inappropriate topic!" else -> error } ErrorResponseEvent(client, topic, TopicException(err)) } } } return ErrorResponseEvent(client, null, TopicException("Unknown registered topic for nonce: $nonce")) } private fun doMessage(client: GlitchPubSub, `object`: JsonObject): IEvent<GlitchPubSub> { val topicsCache = client.topicsCache val data = `object`["data"].asJsonObject val topicRaw = data.get("topic").asString val rawMessage = JsonParser().parse(data.get("message").asString).asJsonObject for (topic in topicsCache.active) { if (topic.rawType == topicRaw) { return handleMessage(client, topic, rawMessage) } } return UnknownMessageEvent(client, topicRaw, rawMessage) } private fun handleMessage(client: GlitchPubSub, topic: Topic, rawMessage: JsonObject): IEvent<GlitchPubSub> { return when (topic.type) { Topic.Type.FOLLOW -> message_follow(client, topic, rawMessage) Topic.Type.WHISPERS -> message_whisper(client, topic, rawMessage) Topic.Type.CHANNEL_BITS, Topic.Type.CHANNEL_BITS_V2 -> message_bits(client, topic, rawMessage) Topic.Type.VIDEO_PLAYBACK -> message_playback(client, topic, rawMessage) Topic.Type.CHANNEL_COMMERCE -> message_commerce(client, topic, rawMessage) Topic.Type.CHANNEL_SUBSCRIPTION -> message_sub(client, topic, rawMessage) Topic.Type.CHAT_MODERATION_ACTIONS -> message_moderation(client, topic, rawMessage) Topic.Type.CHANNEL_EXTENSION_BROADCAST -> message_ebs(client, topic, rawMessage) } } private fun message_follow(client: GlitchPubSub, topic: Topic, rawMessage: JsonObject) = FollowEvent(client, topic, gson.fromJson(rawMessage, Following::class.java)) private fun message_whisper(client: GlitchPubSub, topic: Topic, rawMessage: JsonObject): IEvent<GlitchPubSub> { val whisper = gson.fromJson(rawMessage, WhisperMode::class.java) return when (whisper.type) { WhisperMode.Type.THREAD -> WhisperThreadEvent(client, topic, gson.fromJson(whisper.data, WhisperThread::class.java)) WhisperMode.Type.WHISPER_RECEIVED -> WhisperReceivedEvent(client, topic, gson.fromJson(whisper.data, WhisperMessage::class.java)) WhisperMode.Type.WHISPER_SENT -> WhisperSentEvent(client, topic, gson.fromJson(whisper.data, WhisperMessage::class.java)) } } private fun message_bits(client: GlitchPubSub, topic: Topic, rawMessage: JsonObject) = BitsEvent(client, topic, gson.fromJson(rawMessage, BitsMessage::class.java)) private fun message_playback(client: GlitchPubSub, topic: Topic, rawMessage: JsonObject): IEvent<GlitchPubSub> { val playback = gson.fromJson(rawMessage, VideoPlayback::class.java) return when (playback.type) { VideoPlayback.Type.STREAM_UP -> StreamUpEvent(client, topic, gson.fromJson(rawMessage, StreamUp::class.java)) VideoPlayback.Type.STREAM_DOWN -> StreamDownEvent(client, topic, gson.fromJson(rawMessage, StreamDown::class.java)) VideoPlayback.Type.VIEW_COUNT -> ViewCountEvent(client, topic, gson.fromJson(rawMessage, ViewCount::class.java)) } } private fun message_commerce(client: GlitchPubSub, topic: Topic, rawMessage: JsonObject) = CommerceEvent(client, topic, gson.fromJson(rawMessage, Commerce::class.java)) private fun message_sub(client: GlitchPubSub, topic: Topic, rawMessage: JsonObject): IEvent<GlitchPubSub> { val sub = gson.fromJson(rawMessage, SubscriptionMessage::class.java) return if (sub.context == SubscriptionContext.SUBGIFT) { SubGiftEvent(client, topic, gson.fromJson(rawMessage, GiftSubscriptionMessage::class.java)) } else { SubscriptionEvent(client, topic, sub) } } private fun message_moderation(client: GlitchPubSub, topic: Topic, rawMessage: JsonObject): IEvent<GlitchPubSub> { val modData = gson.fromJson(rawMessage, ModerationData::class.java) return when (modData.moderationAction) { ModerationData.Action.DELETE -> MessageDeleteEvent(client, topic, MessageDelete(modData)) ModerationData.Action.TIMEOUT -> TimeoutUserEvent(client, topic, Timeout(modData)) ModerationData.Action.BAN -> BanUserEvent(client, topic, Ban(modData)) ModerationData.Action.UNBAN, ModerationData.Action.UNTIMEOUT -> UnbanUserEvent(client, topic, Unban(modData)) ModerationData.Action.HOST -> HostEvent(client, topic, Host(modData)) ModerationData.Action.SUBSCRIBERS, ModerationData.Action.SUBSCRIBERSOFF -> SubscribersOnlyEvent(client, topic, ActivationByMod(modData, modData.moderationAction == ModerationData.Action.SUBSCRIBERS)) ModerationData.Action.CLEAR -> ClearChatEvent(client, topic, Moderator(modData)) ModerationData.Action.EMOTEONLY, ModerationData.Action.EMOTEONLYOFF -> EmoteOnlyEvent(client, topic, ActivationByMod(modData, modData.moderationAction == ModerationData.Action.EMOTEONLY)) ModerationData.Action.R9KBETA, ModerationData.Action.R9KBETAOFF -> Robot9000Event(client, topic, ActivationByMod(modData, modData.moderationAction == ModerationData.Action.R9KBETA)) } } private fun message_ebs(client: GlitchPubSub, topic: Topic, rawMessage: JsonObject) = ChannelExtensionBroadcastEvent(client, topic, gson.toJsonTree(rawMessage).asJsonObject.getAsJsonArray("content")) internal data class WhisperMode( @JsonAdapter(WhisperTypeAdapter::class) internal val type: Type, internal val data: String ) { internal enum class Type { WHISPER_RECEIVED, WHISPER_SENT, THREAD } internal inner class WhisperTypeAdapter : TypeAdapter<Type>() { @Throws(IOException::class) override fun write(out: JsonWriter, value: Type) { out.value(value.name.toLowerCase()) } @Throws(IOException::class) override fun read(`in`: JsonReader): Type { for (t in Type.values()) { if (t.name.equals(`in`.nextString(), ignoreCase = true)) { return t } } throw JsonParseException("Unknown whisper type: " + `in`.nextString()) } } } }
46.266667
140
0.648858
92f453985288730c9c6d4c2078fe0f58e5886811
2,467
h
C
SphereToTriangle/SphereToTriangle/EDCommon.h
Cabrra/Advanced-Algorithms
062c469e575ef18ce22dc5320be3188dbe3b409d
[ "MIT" ]
null
null
null
SphereToTriangle/SphereToTriangle/EDCommon.h
Cabrra/Advanced-Algorithms
062c469e575ef18ce22dc5320be3188dbe3b409d
[ "MIT" ]
null
null
null
SphereToTriangle/SphereToTriangle/EDCommon.h
Cabrra/Advanced-Algorithms
062c469e575ef18ce22dc5320be3188dbe3b409d
[ "MIT" ]
null
null
null
#ifndef _EDCOMMON_H_ #define _EDCOMMON_H_ #include <windows.h> #include <queue> using namespace std; #include "matrix4.h" static vec3f worldX( 1.0f, 0.0f, 0.0f ); static vec3f worldY( 0.0f, 1.0f, 0.0f ); static vec3f worldZ( 0.0f, 0.0f, 1.0f ); // OrthoNormalInverse // // Fast inverse calculation of a 4x4 matrix that is orthogonal with normalized axes (orthonormal) // // See: Orthonormal Matrix Inverse.doc // // In: // const matrix4f &MatrixA - The orthonormal matrix to find the inverse of // Out: // matrix4f &MatrixO - Where to store the result of the inverse void OrthoNormalInverse( matrix4f &MatrixO, const matrix4f &MatrixA ); // MouseLook // // Implementation of the Mouse Look Algorithm // // See: Matrix Behaviors.doc // // In: // matrix4f &mat - The matrix to rotate // float fTime - The time elapsed since the last frame // // Out: // matrix4f &mat - The rotated matrix void MouseLook( matrix4f &mat, float fTime ); // LookAt // // Implementation of the Look At Algorithm // // See: Matrix Behaviors.doc // // In: // matrix4f &mat - The matrix to transform // const vec3f& target - The position to look at // // Out: // matrix4f &mat - The transformed matrix void LookAt( matrix4f &mat, const vec3f &target ); // TurnTo // // Implementation of the Turn To Algorithm // // See: Matrix Behaviors.doc // // In: // matrix4f &mat - The matrix to transform // const vec3f &target - The position to turn to // float fTime - The time elapsed since the last frame // // Out: // matrix4f &mat - The transformed matrix void TurnTo( matrix4f &mat, const vec3f &target, float fTime ); // HardAttach // // Implementation of the Hard Attach Algorithm // // See: Matrix Bevahiors.doc // // In: // matrix4f &AttachMat - The matrix to attach // const matrix4f &AttachToMat - The matrix to attach to // const vec3f &offset - The object/local space (relative) vector to offset by // // Out: // // matrix4f &AttachMat - The attached matrix void HardAttach( matrix4f &AttachMat, const matrix4f &AttachToMat, const vec3f &offset ); // SoftAttach // // Implementation of the Soft Attach Algorithm // // See: Matrix Behaviors.doc // // In: // matrix4f &AttachMat - The matrix to attach // const matrix4f& AttachToMat - The matrix to enqueue // queue< matrix4f > &Buffer - The filled queue of matrices to attach to from void SoftAttach( matrix4f &AttachMat, const matrix4f &AttachToMat, queue< matrix4f > &Buffer, const vec3f &offset ); #endif
25.173469
117
0.703283