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
5ff815177c0837e379628551f1c2000289956020
1,028
asm
Assembly
ASM/src/link_anim.asm
Triaphlax/OoT-Randomizer
d6755f8e4b1c6b5d5612e583f8f91fa303f1669b
[ "MIT" ]
344
2018-07-07T07:36:26.000Z
2022-03-27T22:48:10.000Z
ASM/src/link_anim.asm
Triaphlax/OoT-Randomizer
d6755f8e4b1c6b5d5612e583f8f91fa303f1669b
[ "MIT" ]
1,076
2018-07-09T04:01:39.000Z
2022-03-31T17:18:22.000Z
ASM/src/link_anim.asm
Triaphlax/OoT-Randomizer
d6755f8e4b1c6b5d5612e583f8f91fa303f1669b
[ "MIT" ]
320
2018-07-02T01:19:41.000Z
2022-03-25T01:28:30.000Z
override_changelinkanimdefaultstop: addiu sp, sp, -0x28 sw ra, 0x0024(sp) sw a0, 0x0028(sp) sw a1, 0x002C(sp) sw a2, 0x0030(sp) jal 0x8008A194 ;SkelAnime_GetFrameCount lw a0, 0x0030(sp) mtc1 v0, f4 mtc1 zero, f0 addiu t6, zero, 0x0002 cvt.s.w f6, f4 sw t6, 0x0018(sp) lw a0, 0x0028(sp) lw a1, 0x002C(sp) lw a2, 0x0030(sp) lui a3, 0x3F80 li t0, 0x040032B0 bne a2, t0, @@skip ;if next animation is heavy rock pickup, change speed nop lui a3, 0x4040 ;3.0f @@skip: swc1 f6, 0x0014(sp) swc1 f0, 0x0010(sp) jal 0x8008C000 ;SkelAnime_ChangeLinkAnim swc1 f0, 0x001C(sp) lw ra, 0x0024(sp) lw ra, 0x0024(sp) jr ra addiu sp, sp, 0x28
32.125
82
0.442607
8c17475acd62d08b2a86a9fc9cd9023eada76373
232
swift
Swift
Connect4/Connect4/Connect4App.swift
markpc17/connect4-swiftui-mac
1f67426644a08a1bfaebc09358b2e5c10de58444
[ "MIT" ]
null
null
null
Connect4/Connect4/Connect4App.swift
markpc17/connect4-swiftui-mac
1f67426644a08a1bfaebc09358b2e5c10de58444
[ "MIT" ]
null
null
null
Connect4/Connect4/Connect4App.swift
markpc17/connect4-swiftui-mac
1f67426644a08a1bfaebc09358b2e5c10de58444
[ "MIT" ]
null
null
null
// // Connect4App.swift // Connect4 // // Created by Mark Carruthers on 05/04/2021. // import SwiftUI @main struct Connect4App: App { var body: some Scene { WindowGroup { ContentView() } } }
12.888889
45
0.568966
5d63262becca760d28efa30038147faed57303f6
992
sql
SQL
sql/create/companies.sql
nassan/Newbidder
6d3530d95fd8080f41882f016125bde19814e1b5
[ "Apache-2.0" ]
9
2020-12-24T18:26:51.000Z
2022-01-02T22:01:52.000Z
sql/create/companies.sql
nassan/Newbidder
6d3530d95fd8080f41882f016125bde19814e1b5
[ "Apache-2.0" ]
5
2021-01-06T22:03:05.000Z
2021-01-06T22:03:07.000Z
sql/create/companies.sql
nassan/Newbidder
6d3530d95fd8080f41882f016125bde19814e1b5
[ "Apache-2.0" ]
21
2020-12-24T21:37:44.000Z
2022-02-16T06:46:36.000Z
CREATE TABLE IF NOT EXISTS companies ( id serial, customer_id text NOT NULL, customer_name text NOT NULL, email text NOT NULL, telephone text NOT NULL, firstname text NOT NULL, lastname text NOT NULL, address text NOT NULL, citystate text NOT NULL, country text NOT NULL, postalcode text NOT NULL, description text DEFAULT NULL, budget float default 0, PRIMARY KEY (id) ); insert into companies (customer_id, customer_name, email, telephone, firstname, lastname, address, citystate, country, postalcode, budget) VALUES ('rtb4free', 'Jacamars Inc', 'ben.faul@rtb4free.com','555-555-5555', 'Ben', 'Faul', '3820 Del Amo Blvd #226', 'Torrance, CA', 'USA', '90503',0.0); insert into companies (customer_id, customer_name, email, telephone, firstname, lastname, address, citystate, country, postalcode, budget) VALUES ('test', 'The Test Corp.', 'test.test@test.com','666-666-66666', 'Test', 'Test', '3820 Del Amo Blvd #226', 'Torrance, CA', 'USA', '90503', 0.0);
43.130435
154
0.714718
fc0bf3ca6086261236ffd1fa6a9fb85df717a841
816
lua
Lua
ConsolePortKeyboard/Core/Update.lua
waldnercharles/ConsolePort
f685151cfa1dfeeab338a9c4ffa7e4fb440c935b
[ "Artistic-2.0" ]
null
null
null
ConsolePortKeyboard/Core/Update.lua
waldnercharles/ConsolePort
f685151cfa1dfeeab338a9c4ffa7e4fb440c935b
[ "Artistic-2.0" ]
null
null
null
ConsolePortKeyboard/Core/Update.lua
waldnercharles/ConsolePort
f685151cfa1dfeeab338a9c4ffa7e4fb440c935b
[ "Artistic-2.0" ]
null
null
null
--------------------------------------------------------------- -- Update handler to grab the current keyboard focus --------------------------------------------------------------- local Keyboard = ConsolePortKeyboard local GetFocus = GetCurrentKeyBoardFocus local isEnabled = true local focus local function UpdateKeyboardFocus(self, elapsed) if isEnabled then focus = GetFocus() if focus and focus:IsObjectType("EditBox") and Keyboard.Focus ~= focus then Keyboard:SetFocus(focus) elseif not focus and Keyboard.Focus then Keyboard:CLOSE() end end end function Keyboard:SetEnabled(state) isEnabled = state if isEnabled then ConsolePort:AddUpdateSnippet(UpdateKeyboardFocus) else ConsolePort:RemoveUpdateSnippet(UpdateKeyboardFocus) if Keyboard.Focus then Keyboard:CLOSE() end end end
27.2
77
0.667892
fb9559a6f5d92ad12bbc76d92cffbdf12810a8d3
6,719
java
Java
src/main/java/com/alicloud/openservices/tablestore/model/filter/SingleColumnValueFilter.java
aliyun/aliyun-tablestore-java-sdk
ed2568f2b53af016e328eb4f4c6b6823d8dc9f2b
[ "Apache-2.0" ]
50
2016-05-20T11:23:14.000Z
2021-11-02T07:04:45.000Z
src/main/java/com/alicloud/openservices/tablestore/model/filter/SingleColumnValueFilter.java
aliyun/aliyun-tablestore-java-sdk
ed2568f2b53af016e328eb4f4c6b6823d8dc9f2b
[ "Apache-2.0" ]
24
2016-06-04T05:41:58.000Z
2022-03-22T12:03:27.000Z
src/main/java/com/alicloud/openservices/tablestore/model/filter/SingleColumnValueFilter.java
aliyun/aliyun-tablestore-java-sdk
ed2568f2b53af016e328eb4f4c6b6823d8dc9f2b
[ "Apache-2.0" ]
21
2016-06-23T05:56:54.000Z
2022-02-27T03:25:06.000Z
package com.alicloud.openservices.tablestore.model.filter; import com.alicloud.openservices.tablestore.ClientException; import com.alicloud.openservices.tablestore.model.ColumnValue; import com.alicloud.openservices.tablestore.core.protocol.OTSProtocolBuilder; import com.alicloud.openservices.tablestore.core.utils.Preconditions; import com.alicloud.openservices.tablestore.model.condition.SingleColumnValueCondition; import com.alicloud.openservices.tablestore.model.filter.Filter; import com.google.protobuf.ByteString; /** * TableStore查询操作时使用的过滤器,SingleColumnValueFilter用于表示查询的行内数据列和数据值的比较关系。 * <p>可以表示的列与值的比较关系包括:EQUAL(=), NOT_EQUAL(!=), GREATER_THAN(&gt;), GREATER_EQUAL(&gt;=), LESS_THAN(&lt;)以及LESS_EQUAL(&lt;=)。</p> * <p>由于TableStore一行的属性列不固定,有可能存在有filter条件的列在该行不存在的情况,这时{@link SingleColumnValueFilter#passIfMissing}参数控制在这种情况下对该行的过滤结果。</p> * 如果设置{@link SingleColumnValueFilter#passIfMissing}为true,则若列在该行中不存在,则返回该行; * 如果设置{@link SingleColumnValueFilter#passIfMissing}为false,则若列在该行中不存在,则不返回该行。 * 默认值为true。 * <p>由于TableStore的属性列可能有多个版本,有可能存在该列的一个版本的值与给定值匹配但是另一个版本的值不匹配的情况,</p> * 这时{@link SingleColumnValueFilter#latestVersionsOnly}参数控制在这种情况下对该行的过滤结果。 * 如果设置{@link SingleColumnValueFilter#latestVersionsOnly}为true,则只会对最新版本的值进行比较,否则会对该列的所有版本(最新的max_versions个)进行比较, * 只要有一个版本的值匹配就认为条件成立。默认值为true。 * */ public class SingleColumnValueFilter extends ColumnValueFilter { public enum CompareOperator { EQUAL, NOT_EQUAL, GREATER_THAN, GREATER_EQUAL, LESS_THAN, LESS_EQUAL; } private CompareOperator operator; private String columnName; private ColumnValue columnValue; private boolean passIfMissing = true; private boolean latestVersionsOnly = true; /** * 构造函数。 * * @param columnName 列的名称 * @param operator 比较函数 * @param columnValue 列的值 */ public SingleColumnValueFilter(String columnName, final CompareOperator operator, final ColumnValue columnValue) { setColumnName(columnName); setOperator(operator); setColumnValue(columnValue); } /** * 获取列的比较操作符。 * * @return 比较操作符。 */ public CompareOperator getOperator() { return operator; } /** * 设置列的比较操作符。 * * @param operator 比较操作符 * @return this for chain invocation */ public SingleColumnValueFilter setOperator(CompareOperator operator) { Preconditions.checkNotNull(operator, "The operator should not be null."); this.operator = operator; return this; } /** * 获取列名。 * * @return 列的名称。 */ public String getColumnName() { return columnName; } /** * 设置列的名称。 * * @param columnName 列的名称 * @return this for chain invocation */ public SingleColumnValueFilter setColumnName(String columnName) { Preconditions.checkArgument(columnName != null && !columnName.isEmpty(), "The name of column should not be null or empty."); this.columnName = columnName; return this; } /** * 获取列的对比值。 * * @return 列的对比值。 */ public ColumnValue getColumnValue() { return columnValue; } /** * 设置列的对比值。 * * @param columnValue 列的对比值。 * @return this for chain invocation */ public SingleColumnValueFilter setColumnValue(ColumnValue columnValue) { Preconditions.checkNotNull(columnValue, "The value of column should not be null."); this.columnValue = columnValue; return this; } /** * 返回设置的passIfMissing的值。 * * @return passIfMissing的值。 */ public boolean isPassIfMissing() { return passIfMissing; } /** * 设置passIfMissing。 * <p>由于TableStore一行的属性列不固定,有可能存在有filter条件的列在该行不存在的情况,这时{@link SingleColumnValueFilter#passIfMissing}参数控制在这种情况下对该行的过滤结果。</p> * <p>如果设置{@link SingleColumnValueFilter#passIfMissing}为true,则若列在该行中不存在,则返回该行;</p> * <p>如果设置{@link SingleColumnValueFilter#passIfMissing}为false,则若列在该行中不存在,则不返回该行。</p> * <p>默认值为true。</p> * * @param passIfMissing * @return this for chain invocation */ public SingleColumnValueFilter setPassIfMissing(boolean passIfMissing) { this.passIfMissing = passIfMissing; return this; } /** * 返回设置的latestVersionsOnly的值。 * * @return latestVersionsOnly的值。 */ public boolean isLatestVersionsOnly() { return latestVersionsOnly; } /** * 设置latestVersionsOnly。 * <p>由于TableStore的属性列可能有多个版本,有可能存在该列的一个版本的值与给定值匹配但是另一个版本的值不匹配的情况,</p> * 这时{@link SingleColumnValueFilter#latestVersionsOnly}参数控制在这种情况下对该行的过滤结果。 * <p>如果设置{@link SingleColumnValueFilter#latestVersionsOnly}为true,则只会对最新版本的值进行比较,否则会对该列的所有版本(最新的max_versions个)进行比较,</p> * <p>只要有一个版本的值匹配就认为filter条件成立。默认值为true。</p> * * @param latestVersionsOnly * @return */ public SingleColumnValueFilter setLatestVersionsOnly(boolean latestVersionsOnly) { this.latestVersionsOnly = latestVersionsOnly; return this; } public SingleColumnValueCondition toCondition() { SingleColumnValueCondition.CompareOperator filterOperator; switch (operator) { case EQUAL: filterOperator = SingleColumnValueCondition.CompareOperator.EQUAL; break; case NOT_EQUAL: filterOperator = SingleColumnValueCondition.CompareOperator.NOT_EQUAL; break; case GREATER_THAN: filterOperator = SingleColumnValueCondition.CompareOperator.GREATER_THAN; break; case GREATER_EQUAL: filterOperator = SingleColumnValueCondition.CompareOperator.GREATER_EQUAL; break; case LESS_THAN: filterOperator = SingleColumnValueCondition.CompareOperator.LESS_THAN; break; case LESS_EQUAL: filterOperator = SingleColumnValueCondition.CompareOperator.LESS_EQUAL; break; default: throw new ClientException("Unknown operator: " + operator.name()); } SingleColumnValueCondition singleColumnValueCondition = new SingleColumnValueCondition(columnName, filterOperator, columnValue); singleColumnValueCondition.setLatestVersionsOnly(latestVersionsOnly); singleColumnValueCondition.setPassIfMissing(passIfMissing); return singleColumnValueCondition; } @Override public FilterType getFilterType() { return FilterType.SINGLE_COLUMN_VALUE_FILTER; } @Override public ByteString serialize() { return OTSProtocolBuilder.buildSingleColumnValueFilter(this); } }
33.595
136
0.689091
a28d1eebc9e30db6ecbb7586380fdefbb5f09878
8,708
swift
Swift
PennMobile/Auth/TOTPFetcher.swift
pennlabs/penn-mobile-ios
e0a18c86826b73f1e4668c78ed1f923ece7a5bb4
[ "MIT" ]
35
2015-09-10T12:28:09.000Z
2021-04-08T00:30:15.000Z
PennMobile/Auth/TOTPFetcher.swift
pennlabs/penn-mobile-ios
e0a18c86826b73f1e4668c78ed1f923ece7a5bb4
[ "MIT" ]
167
2015-09-11T21:28:51.000Z
2022-02-13T21:57:42.000Z
PennMobile/Auth/TOTPFetcher.swift
pennlabs/penn-mobile-ios
e0a18c86826b73f1e4668c78ed1f923ece7a5bb4
[ "MIT" ]
5
2018-07-09T04:30:13.000Z
2020-10-23T23:28:35.000Z
// // TOTPFetcher.swift // PennMobile // // Created by Josh Doman on 10/5/19. // Copyright © 2019 PennLabs. All rights reserved. // import Foundation //import WKZombie import WebKit class TOTPFetcher: NSObject { static let instance = TOTPFetcher() public var isFetching = false private override init() {} // func fetchAndSaveTOTPSecret(_ completion: ((_ secret: String?) -> Void)? = nil) { // isFetching = true // if let _ = UserDefaults.standard.getTwoFactorEnabledDate() { // UserDefaults.standard.setTwoFactorEnabledDate(nil) // } else { // UserDefaults.standard.setTwoFactorEnabledDate(Date()) // } // // let operation = TOTPFetcherOperation { (secret) in // self.isFetching = false // if let secret = secret { // let genericPwdQueryable = // GenericPasswordQueryable(service: "PennWebLogin") // let secureStore = // SecureStore(secureStoreQueryable: genericPwdQueryable) // try? secureStore.setValue(secret, for: "TOTPSecret") // // UserDefaults.standard.setTwoFactorEnabledDate(nil) // } // completion?(secret) // // if (secret != nil) { // FirebaseAnalyticsManager.shared.trackEvent(action: .twoStepRetrieval, result: .success, content: true) // } else { // FirebaseAnalyticsManager.shared.trackEvent(action: .twoStepRetrieval, result: .failed, content: false) // } // } // operation.run() // } // // class TOTPFetcherOperation { // // fileprivate let urlStr = "https://twostep.apps.upenn.edu/twoFactor/twoFactorUi/app/UiMain.index" // // var completion: (_ secret: String?) -> Void // // init(completion: @escaping (_ secret: String?) -> Void) { // self.completion = completion // } // // func run() { // TOTPNetworkManager.instance.login { // DispatchQueue.main.async { // WKWebsiteDataStore.createDataStoreWithSavedCookies { (dataStore) in // DispatchQueue.main.async { // let zombie = WKZombie(dataStore: dataStore) // Logger.enabled = true // WKZombie.setInstance(zombie: zombie) // // let url = URL(string: self.urlStr)! // open(url) // === self.checkUrl // // } // } // } // } // } // // //Check if we need to actually log the user in before getting the TOTP code // func checkUrl(result: Result<HTMLPage>) { // switch result { // case .success(let page): // guard let url = page.url else { return } // if url.absoluteString.contains("weblogin") { // //User was not logged in, so log him in first before going to TOTP Page. // let genericPwdQueryable = // GenericPasswordQueryable(service: "PennWebLogin") // let secureStore = // SecureStore(secureStoreQueryable: genericPwdQueryable) // guard let pennkey = try? secureStore.getValue(for: "PennKey") else { return } // guard let password = try? secureStore.getValue(for: "PennKey Password") else { return } // // inspect() // >>> get(by: .id("pennname")) // >>> setAttribute("value", value: pennkey) // >>> get(by: .id("password")) // >>> setAttribute("value", value: password) // >>> get(by: .id("login-form")) // >>> submit // === self.goToTOTPPage // } // else { // //User was already logged in, so we just go to the TOTP page // inspect() // === self.goToTOTPPage // } // case .error: // self.completion(nil) // } // } // // func goToTOTPPage(result: Result<HTMLPage>) { // inspect() // >>> get(by: .attribute("action", "../../twoFactorUi/app/UiMain.totpAdd")) // >>> setAttribute("id", value: "TOTPForm") //Add an ID because WKZombie can only submit forms with an ID or name // >>> get(by: .id("TOTPForm")) // >>> submit // >>> get(by: .attribute("action", "UiMain.totpAppIntegrate")) // >>> setAttribute("id", value: "TOTPForm2") //This form also needs an ID to be submitted by WKZombie // >>> get(by: .id("TOTPForm2")) // >>> submit // === self.resultAfterLoggedIn // } // // func getTokenFromPageAndVerify(page: HTMLPage) { // let elementResult = page.findElements(.attribute("style", "white-space: nowrap;")) // switch elementResult { // case .success(let values): // if let secret = values.first?.text { // verifySecret(secret: secret, page: page) // // Go to verification page and verify // } // case .error: //handle error if TOTP code not found // self.completion(nil) // } // } // // func verifySecret(secret: String, page: HTMLPage) { // // Generate 1-time token using secret // guard let token = TwoFactorTokenGenerator.instance.generate(secret: secret) else { // self.completion(nil) // return // } // // inspect() // >>> get(by: .attribute("action", "UiMain.totpSubmitAppIntegrate")) // >>> setAttribute("id", value: "TOTPForm") // >>> get(by: .id("TOTPForm")) // >>> submit // >>> get(by: .name("twoFactorCode")) // >>> setAttribute("value", value: token) // >>> get(by: .attribute("action", "UiMain.totpSubmitAppCode")) // >>> setAttribute("id", value: "TOTPForm") // >>> get(by: .id("TOTPForm")) // >>> submit // >>> get(by: .class("error")) // === { (result: Result<HTMLElement>) in // switch result{ // case .success(let result): // handle success // guard let r = result.text else { return } // if r.contains("Success: activation code is valid.") { // //The code has been successfully verified, so we can save the TOTP code // self.completion(secret) // NotificationCenter.default.post(name: Notification.Name(rawValue: "TOTPCodeFetched"), object: nil) // } // else { // //The TOTP code was not verified so we have an error // self.completion(nil) // } // case .error: // handle error // self.completion(nil) // } // } // } // // func resultAfterLoggedIn(result: Result<HTMLPage>) { // switch result { // case .success(let page): // handle success // self.getTokenFromPageAndVerify(page: page) // case .error: // handle error // self.completion(nil) // } // } // } } extension WKWebsiteDataStore { static func createDataStoreWithSavedCookies(_ callback: @escaping (WKWebsiteDataStore) -> Void) { let wkDataStore = WKWebsiteDataStore.nonPersistent() let sharedCookies: Array<HTTPCookie> = HTTPCookieStorage.shared.cookies ?? [] let dispatchGroup = DispatchGroup() if sharedCookies.count > 0 { for cookie in sharedCookies { dispatchGroup.enter() wkDataStore.httpCookieStore.setCookie(cookie) { dispatchGroup.leave() } } dispatchGroup.notify(queue: DispatchQueue.main) { callback(wkDataStore) } } else { callback(wkDataStore) } } }
41.865385
132
0.481167
41cf71c161c1a1911b3362c0e9910ef502cc9f56
1,039
h
C
Headers/Frameworks/Flexo/FFColorSelectionOSCDelegate-Protocol.h
CommandPost/FinalCutProFrameworks
d98b00ff0c84af80942d71514e9238d624aca50a
[ "MIT" ]
3
2020-11-19T10:04:02.000Z
2021-10-02T17:25:21.000Z
Headers/Frameworks/Flexo/FFColorSelectionOSCDelegate-Protocol.h
CommandPost/FinalCutProFrameworks
d98b00ff0c84af80942d71514e9238d624aca50a
[ "MIT" ]
null
null
null
Headers/Frameworks/Flexo/FFColorSelectionOSCDelegate-Protocol.h
CommandPost/FinalCutProFrameworks
d98b00ff0c84af80942d71514e9238d624aca50a
[ "MIT" ]
null
null
null
// // Generated by class-dump 3.5 (64 bit) (Debug version compiled Mar 11 2021 20:53:35). // // Copyright (C) 1997-2019 Steve Nygard. // #import <Flexo/NSObject-Protocol.h> @class FFColorSelectionOSC, FFEffect, FFEffectStack; @protocol FFColorSelectionOSCDelegate <NSObject> - (FFEffect *)effect; - (long long)effectCountForReference; @optional @property(readonly, getter=wantsSaturatedResult) BOOL wantsSaturatedResult; - (void)colorSelectionOSC:(FFColorSelectionOSC *)arg1 didModifyAdjustmentsForToolClass:(Class)arg2; - (void)colorSelectionOSC:(FFColorSelectionOSC *)arg1 willModifyAdjustmentsForToolClass:(Class)arg2; - (void)didInsertIntrinsicEffect:(FFEffect *)arg1 toEffectStack:(FFEffectStack *)arg2 atIndex:(unsigned long long)arg3; - (void)modifyAdjustmentsWithRed:(double)arg1 green:(double)arg2 blue:(double)arg3 bufferData:(char *)arg4 bufferWidth:(double)arg5 bufferHeight:(double)arg6 bytesPerRow:(unsigned int)arg7; - (int)HDRDelinearizedForWorkingSpace:(int)arg1; - (long long)colorSelectionOSCSampleModel; @end
41.56
189
0.795958
dd6aca665a8d70d5beea8f0643ebd211ff53950d
354
php
PHP
app/Claims.php
webexpert786/creditooLaravel
3eebce980b3381991d9913ed5d6442a2027f681f
[ "MIT" ]
null
null
null
app/Claims.php
webexpert786/creditooLaravel
3eebce980b3381991d9913ed5d6442a2027f681f
[ "MIT" ]
null
null
null
app/Claims.php
webexpert786/creditooLaravel
3eebce980b3381991d9913ed5d6442a2027f681f
[ "MIT" ]
null
null
null
<?php namespace App; use Illuminate\Database\Eloquent\Model; class Claims extends Model { protected $table = 'claims'; protected $primaryKey = 'id'; protected $fillable = [ 'id','company_id', 'status', 'paid_status' ]; public function companyClaim() { return $this->hasOne('App\CompanyClaims'); } }
14.16
51
0.612994
8d6d070a83825f359fb05470a49be4ed92d74809
531
kt
Kotlin
api/src/main/kotlin/command/Commands.kt
jangalinski/axon-giftcard-samples
1111f88fb9a286cd442382fd319765065003cd0c
[ "BSD-3-Clause" ]
null
null
null
api/src/main/kotlin/command/Commands.kt
jangalinski/axon-giftcard-samples
1111f88fb9a286cd442382fd319765065003cd0c
[ "BSD-3-Clause" ]
null
null
null
api/src/main/kotlin/command/Commands.kt
jangalinski/axon-giftcard-samples
1111f88fb9a286cd442382fd319765065003cd0c
[ "BSD-3-Clause" ]
null
null
null
package io.github.jangalinski.axon.giftcard.api.command import org.axonframework.modelling.command.TargetAggregateIdentifier import org.axonframework.serialization.Revision sealed class Command(@TargetAggregateIdentifier open val id: String) @Revision("1") data class IssueCmd( override val id: String, val amount: Int ) : Command(id) @Revision("1") data class RedeemCmd( override val id: String, val amount: Int ) : Command(id) @Revision("1") data class CancelCmd( override val id: String ) : Command(id)
22.125
68
0.753296
85877ad165914d8c93f188a87b449ea696b7caec
4,106
js
JavaScript
oldpage/js/data.js
damnever/Damnever.github.io
419d65060b4c8917bf1ab7a5be21ff30d1f6a680
[ "Apache-2.0" ]
3
2015-03-15T15:42:06.000Z
2015-07-11T03:59:23.000Z
oldpage/js/data.js
damnever/Damnever.github.io
419d65060b4c8917bf1ab7a5be21ff30d1f6a680
[ "Apache-2.0" ]
1
2015-12-16T09:53:27.000Z
2015-12-16T09:53:33.000Z
oldpage/js/data.js
damnever/Damnever.github.io
419d65060b4c8917bf1ab7a5be21ff30d1f6a680
[ "Apache-2.0" ]
null
null
null
var data = new Array(); data.push({ 'date' : '1994/11/06', 'title' : 'Hello world!', 'intro' : '顶着<a href="http://baike.baidu.com/view/32644.htm#8" target="_blank">法律</a>的约束来到这个世界!', 'summary' : '在天朝非法逗留。', }); data.push({ 'date' : '2012/04/04', 'title' : '高三某日', 'intro' : '<a href="http://movie.douban.com/subject/3205624/" target="_blank">《社交网络》</a>,里面那小子简直太酷了,我以后也要像他一样。', 'summary' : '这傻屌!', }); data.push({ 'date' : '2012/09/07', 'title' : '步入大学', 'intro' : '带着满腔的热血进入<a href="http://jsj.csuft.edu.cn/" target="_blank">中南林业科技大学软件工程专业</a>。', 'summary' : '误入 Qi 途!', }); data.push({ 'date' : '2013/01/20', 'title' : '一个学期过去了', 'intro' : '学了一个学期的 CPP,感觉自己 low 爆了,那小哥一个晚上就能撸出个网站,我特么受够了这些黑底白字,曾百度了好一阵子 CPP 到底怎么做软件,怎么写网站。', 'summary' : '无知,茫茫苦海,何处是岸?', }); data.push({ 'date' : '2013/05/04', 'title' : '一个学期开始了', 'intro' : '在回学校的火车上无意中发现微信公众平台开发的教程,用的是 PHP,想学!但还得先学 HTML,在 w3school上发现 XHTML, XML 都和这货长得好像,搜了好久关于如何学习 HTML,学习它们的顺序是什么。', 'summary' : '依然迷茫,听说大部分人工作都和专业不相关哦!', }); data.push({ 'date' : '2013/07/10', 'title' : '又一个学期过去了', 'intro' : '好歹学会了也仅仅学会了 HTML。折腾了一学期单核1G内存的华硕老爷机,不再对电脑畏首畏脑了,装系统的次数比重启的次数还多。', 'summary' : '单纯,原来编程也是这么好玩嘛!这页面还可以放音乐放视频,切换来切换去,酷毙了。', }); data.push({ 'date' : '2013/09/05', 'title' : '一个艰难的学期', 'intro' : '想要改变,<a href="http://user.qzone.qq.com/1186561974/blog/1380079848" target="_blank">动员舍友</a>,结果…… <br />数据结构与算法竟然是用的 C 语言?cin, cout 和 <<, >> 都不知道哪个配哪个了,第一次觉得时间过得很快。期间折腾过 WordPress,超哥的小栈(dongxiaochao.biz <a href="https://www.google.com.hk/?hl=zh-cn#newwindow=1&safe=strict&hl=zh-cn&q=%E8%B6%85%E5%93%A5%E7%9A%84%E5%B0%8F%E6%A0%88" target="_blank">Google 上的残留碎片</a>)已死去。', 'summary' : '迷茫日子里的些许充实,这种感觉真的很棒!', }); data.push({ 'date' : '2013/12/28', 'title' : 'Google 很强大', 'intro' : '数据库课程设计用 Google 搜了一份仓库管理系统的 C++ 源码,从来没接触过 MFC,改了关于界面,小组成员皆 90+ 。。。老师名字和源码作者名字是一样的,真是铤而走险。', 'summary' : '善用工具也是一种能力⁄(⁄ ⁄•⁄ω⁄•⁄ ⁄)⁄', }); data.push({ 'date' : '2014/02/20', 'title' : '大二下学期', 'intro' : '还不知道自己今后要做什么,听说 Java 找工作不错,正好要学就好好学吧!Java 真的很烂吗?黑客貌似很炫酷,我想做黑客!听说黑客很喜欢 Python,我也要学!还有数据库,Web,汇编……黑客什么都要懂!游戏是暴利行业啊!', 'summary' : '浮躁,急于求成,这条路不是这么容易走的,小猴子下山肯定一事无成。', }); data.push({ 'date' : '2014/06/20', 'title' : '不是一个人的战斗', 'intro' : '利用 Java Swing 山寨了QQ,当然不是全部,利用 Tornado 的 RequestHandler 搞了几个简单的 Web 页面,最后被老师发现是我一个人做的,搞得小组成员很是不愉快,其中一个人从此是路人。。。不过和班上大牛开始打成一片。', 'summary' : '其实分享才是这个世界上最快乐的事情', }); data.push({ 'date' : '2014/09/10', 'title' : '一个多星期', 'intro' : '学校开设 J2EE,心想做网站的是不是该逃了?花了一天在网上扫了一遍 JSP 基础知识,晚上蒙生一个想法,花了一个多星期打造了一个小型论坛类网站 <a href="http://deathzuo.sinaapp.com" target="_blank">DeathZuo</a>(作死),只用了教材前四章知识(没有JavaBean,Servlet ...),别提多烂了,已关掉 JVM。', 'summary' : '说不定那天就派上用场了!', }); data.push({ 'date' : '2014/10/15', 'title' : '十天', 'intro' : '毕竟学习 Python 这么久了,做网站前面已经被恶心到了,对第三方 Web 框架没有学习的欲望。<br/>发现<a href="http://www.liaoxuefeng.com/wiki/001374738125095c955c1e6d8bb493182103fac9270762a000/001397616003925a3d157284cd24bc0952d6c4a7c9d8c55000" target="_blank">打造小框架的 Python 教程</a>,自己也准备试下,但是不看完整个教程更本不知道那框架里的有些代码是干嘛的。好吧,自己动手丰衣足食!姑且叫它 <b>LTok</b>(Lightweight is ok.)。<br/><b>源码:</b><a href="https://github.com/Damnever/LTsite" target="_blank">https://github.com/Damnever/LTsite</a><br /><b>在线Demo:</b><a href="http://d2ak.sinaapp.com/" target="_blank">http://d2ak.sinaapp.com/</a>', 'summary' : '脚踏实地才能有所成!', }); // 最近 data.push({ 'date' : '2015/01/15', 'title' : 'Clear, keep digging!', 'intro' : '花了几天终于把 Python 学习笔记整理了一下,或者叫做待学列表 ...<br>猛戳: <a href="https://github.com/Damnever/Note/blob/master/Python.md" target="_blank">Python.md</a>', 'summary' : '2015了?推延2012计划的2013一定要开始的2014一定要变得niubi的niubi计划!', }); // 忽略 data.push({ 'date' : '2015/01/02', 'title' : '五天', 'intro' : '丫的课程设计,只用了一个Activity差点没把自己恶心死。这都不算什么,最不爽的是@#$%^&*!一时竟无语凌噎不是随便就能体会的……BUG?不留下几个难泄我愤愤之情!<br/>这效果杠(zha)杠(zha)的:<br/><video controls="controls" src="./imgs/aplayer_view.ogv" width="450" height="450"/>', 'summary' : '一个学期又要完了。从一个错误点出发,总比一直不开始要好!', });
40.254902
552
0.643205
ca13e79f7b134e09444724444daf83c33c953fc9
1,687
dart
Dart
lib/domain/service/impl/fake/fake_user_service.dart
yeshu-cn/MockApp
7e72794c2c57477c0d07e45091699b74d6ab1503
[ "MIT" ]
9
2022-01-17T02:29:57.000Z
2022-02-08T07:03:46.000Z
lib/domain/service/impl/fake/fake_user_service.dart
yeshu-cn/MockApp
7e72794c2c57477c0d07e45091699b74d6ab1503
[ "MIT" ]
null
null
null
lib/domain/service/impl/fake/fake_user_service.dart
yeshu-cn/MockApp
7e72794c2c57477c0d07e45091699b74d6ab1503
[ "MIT" ]
4
2022-01-23T07:58:27.000Z
2022-02-08T07:03:41.000Z
import 'package:lushan/domain/model/user.dart'; import 'package:lushan/domain/repository/user_repository.dart'; import 'package:lushan/domain/service/dto/user_dto.dart'; import 'package:lushan/domain/service/user_service.dart'; import 'package:uuid/uuid.dart'; class FakeUserService extends UserService { UserRepository _userRepository; FakeUserService(this._userRepository); @override Future<String> createUser(UserDTO user) async { user.uid = Uuid().v4(); User item = User.fromMap(user.toMap()); return await _userRepository.addUser(item); } @override Future<UserDTO?> getUser(String uid) async { var user = await _userRepository.queryUserById(uid); if (null == user) { return null; } else { return UserDTO.fromMap(user.toMap()); } } @override Future<UserDTO?> getUserByPhone(String phone) async { var user = await _userRepository.queryUserByPhone(phone); if (null == user) { return null; } else { return UserDTO.fromMap(user.toMap()); } } @override Future<UserDTO?> getUserByThirdParty( String thirdPartyUid, String thirdPartyType) async { var user = await _userRepository.queryUserByThirdParty( thirdPartyUid, thirdPartyType); if (null == user) { return null; } else { return UserDTO.fromMap(user.toMap()); } } @override Future<bool> userExists(String phone) async { var user = await _userRepository.queryUserByPhone(phone); return user != null ? true : false; } @override Future<bool> updateUser(UserDTO user) async { var item = User.fromMap(user.toMap()); return await _userRepository.updateUser(item); } }
26.777778
63
0.690575
2cc61f489e5189b884686bca7a192e1ee8e36866
2,344
swift
Swift
BTTTouchBarPluginSampleCustomString/SamplePluginCustomString.swift
kant/BetterTouchToolPlugins
424702f41ee7f2c4dafaff45e6a4864c804fae64
[ "MIT" ]
48
2019-06-23T01:55:34.000Z
2021-10-30T22:18:51.000Z
BTTTouchBarPluginSampleCustomString/SamplePluginCustomString.swift
kant/BetterTouchToolPlugins
424702f41ee7f2c4dafaff45e6a4864c804fae64
[ "MIT" ]
1
2020-02-10T03:30:02.000Z
2020-02-10T22:16:33.000Z
BTTTouchBarPluginSampleCustomString/SamplePluginCustomString.swift
kant/BetterTouchToolPlugins
424702f41ee7f2c4dafaff45e6a4864c804fae64
[ "MIT" ]
3
2019-07-08T20:55:29.000Z
2020-11-13T00:49:42.000Z
import Foundation import AppKit @objc class SamplePluginCustomString : NSObject, BTTPluginInterface { // the delegate will be set automatically after this plugin is loaded in BTT var delegate : BTTTouchBarPluginDelegate? var configurationValues: Dictionary<AnyHashable, Any> = [:]; override init() { super.init(); DispatchQueue.main.asyncAfter(deadline: .now() + 1) { self.updateStringRegularly(); } } /* MARK: Option 3: Returning a NSViewController instance * if you return a view controller BTT will display the view * controller's view on * the Touch Bar. * You are responsible for any styling you want to apply. * Make sure to always return the same instance of the button * here. */ func touchBarTitleString() -> String? { return "Hello Custom String!"; } func updateStringRegularly() { let date = NSDate(); let calendar = NSCalendar.current; let component = calendar.component(.second, from: date as Date); let newString = "Hello Custom String! \(component)"; self.delegate?.update(with: newString, sender: self); // every second DispatchQueue.main.asyncAfter(deadline: .now() + 1) { self.updateStringRegularly(); } } // here you can configure what items are shown in the BTT configuration side-bar for this plugin class func configurationFormItems() -> BTTPluginFormItem? { // here we just create a text field, we will receive the // current value in didReceiveNewConfigurationValues let item = BTTPluginFormItem.init(); item.formFieldType = BTTFormTypeTextField; item.formLabel1 = "Custom Widget Name"; // the id must stat with plugin_var_ (will be added automatically if necessary) item.formFieldID = "plugin_var_widgetName"; return item; } func didReceiveNewConfigurationValues(_ configurationValues: [AnyHashable : Any]) { self.configurationValues = configurationValues; } // this will tell BTT to execute the actions the user assigned to this widget @objc func executeAssignedBTTActions() { self.delegate?.executeAssignedBTTActions(self); } }
33.485714
100
0.646758
bad9bb49d78153e7319e831a7d7914c289ce836e
455
swift
Swift
AppliveryBehaviorTests/Mocks/ConfigPersisterMock.swift
applivery/applivery-ios-sdk
b3bd55bee38fc2d97e3273c5c4c89032430ed713
[ "MIT" ]
32
2016-01-31T22:40:18.000Z
2022-02-07T17:54:57.000Z
AppliveryBehaviorTests/Mocks/ConfigPersisterMock.swift
applivery/applivery-ios-sdk
b3bd55bee38fc2d97e3273c5c4c89032430ed713
[ "MIT" ]
43
2016-02-16T22:58:52.000Z
2021-11-19T18:49:58.000Z
AppliveryBehaviorTests/Mocks/ConfigPersisterMock.swift
applivery/applivery-ios-sdk
b3bd55bee38fc2d97e3273c5c4c89032430ed713
[ "MIT" ]
6
2018-03-22T02:40:46.000Z
2022-02-04T14:01:53.000Z
// // ConfigPersisterMock.swift // AppliverySDK // // Created by Alejandro Jiménez on 5/10/15. // Copyright © 2015 Applivery S.L. All rights reserved. // import UIKit @testable import Applivery class ConfigPersisterMock: ConfigPersister { // INPUT var config: Config? // OUTPUT var saveCalled = false override func getConfig() -> Config? { return self.config } override func saveConfig(_ config: Config) { self.saveCalled = true } }
16.25
56
0.707692
e0d5b91c0b5c349a22ebbb9f30c8b6a6879bf9af
18,066
asm
Assembly
fiat-amd64/96.86_ratio12000_seed3346530064135123_square_p224.asm
dderjoel/fiat-crypto
57a9612577d766a0ae83169ea9517bfa7f01ea4e
[ "BSD-1-Clause", "Apache-2.0", "MIT-0", "MIT" ]
491
2015-11-25T23:44:39.000Z
2022-03-29T17:31:21.000Z
fiat-amd64/96.86_ratio12000_seed3346530064135123_square_p224.asm
dderjoel/fiat-crypto
57a9612577d766a0ae83169ea9517bfa7f01ea4e
[ "BSD-1-Clause", "Apache-2.0", "MIT-0", "MIT" ]
755
2016-02-02T14:03:05.000Z
2022-03-31T16:47:23.000Z
fiat-amd64/96.86_ratio12000_seed3346530064135123_square_p224.asm
dderjoel/fiat-crypto
57a9612577d766a0ae83169ea9517bfa7f01ea4e
[ "BSD-1-Clause", "Apache-2.0", "MIT-0", "MIT" ]
117
2015-10-25T16:28:15.000Z
2022-02-08T23:01:09.000Z
SECTION .text GLOBAL square_p224 square_p224: sub rsp, 0x130 ; last 0x30 (6) for Caller - save regs mov [ rsp + 0x100 ], rbx; saving to stack mov [ rsp + 0x108 ], rbp; saving to stack mov [ rsp + 0x110 ], r12; saving to stack mov [ rsp + 0x118 ], r13; saving to stack mov [ rsp + 0x120 ], r14; saving to stack mov [ rsp + 0x128 ], r15; saving to stack mov rax, [ rsi + 0x0 ]; load m64 x4 to register64 mov rdx, [ rsi + 0x8 ]; arg1[1] to rdx mulx r10, r11, rax; x10, x9<- x4 * arg1[1] mov rdx, rax; x4 to rdx mulx rax, rbx, [ rsi + 0x0 ]; x12, x11<- x4 * arg1[0] mov rbp, 0xffffffffffffffff ; moving imm to reg xchg rdx, rbx; x11, swapping with x4, which is currently in rdx mulx r12, r13, rbp; _, x20<- x11 * 0xffffffffffffffff add r11, rax; could be done better, if r0 has been u8 as well mov r12, r13; _, copying x20 here, cause x20 is needed in a reg for other than _, namely all: , x26--x27, _--x34, x24--x25, x22--x23, size: 4 mov r14, -0x2 ; moving imm to reg inc r14; OF<-0x0, preserve CF (debug: 6; load -2, increase it, save as -1) adox r12, rdx mov r12, 0xffffffff00000000 ; moving imm to reg mov rdx, r12; 0xffffffff00000000 to rdx mulx r12, r15, r13; x27, x26<- x20 * 0xffffffff00000000 mov rcx, [ rsi + 0x8 ]; load m64 x1 to register64 adox r15, r11 mov r8, rdx; preserving value of 0xffffffff00000000 into a new reg mov rdx, [ rsi + 0x0 ]; saving arg1[0] in rdx. mulx r9, rax, rcx; x50, x49<- x1 * arg1[0] seto dl; spill OF x36 to reg (rdx) inc r14; OF<-0x0, preserve CF (debug: state 2 (y: -1, n: 0)) adox rax, r15 xchg rdx, rbp; 0xffffffffffffffff, swapping with x36, which is currently in rdx mulx r11, r15, rax; _, x68<- x58 * 0xffffffffffffffff mulx r11, r14, r15; x73, x72<- x68 * 0xffffffffffffffff xchg rdx, r15; x68, swapping with 0xffffffffffffffff, which is currently in rdx mov [ rsp + 0x0 ], rdi; spilling out1 to mem mulx r15, rdi, r8; x75, x74<- x68 * 0xffffffff00000000 seto r8b; spill OF x59 to reg (r8) mov [ rsp + 0x8 ], rdi; spilling x74 to mem mov rdi, -0x2 ; moving imm to reg inc rdi; OF<-0x0, preserve CF (debug: 6; load -2, increase it, save as -1) adox r14, r15 mov r15, 0xffffffff ; moving imm to reg mov [ rsp + 0x10 ], r14; spilling x76 to mem mulx rdi, r14, r15; x71, x70<- x68 * 0xffffffff adox r14, r11 mov r11, 0x0 ; moving imm to reg adox rdi, r11 mov r15, -0x3 ; moving imm to reg inc r15; OF<-0x0, preserve CF (debug 7; load -3, increase it, save it as -2). #last resort adox rdx, rax mov rdx, [ rsi + 0x10 ]; arg1[2] to rdx mulx rax, r11, rbx; x8, x7<- x4 * arg1[2] adcx r11, r10 mov rdx, 0xffffffffffffffff ; moving imm to reg mulx r10, r15, r13; x25, x24<- x20 * 0xffffffffffffffff seto dl; spill OF x82 to reg (rdx) mov [ rsp + 0x18 ], rdi; spilling x80 to mem mov rdi, -0x2 ; moving imm to reg inc rdi; OF<-0x0, preserve CF (debug: 6; load -2, increase it, save as -1) adox r15, r12 seto r12b; spill OF x29 to reg (r12) inc rdi; OF<-0x0, preserve CF (debug: state 2 (y: -1, n: 0)) mov rdi, -0x1 ; moving imm to reg movzx rbp, bpl adox rbp, rdi; loading flag adox r11, r15 xchg rdx, rcx; x1, swapping with x82, which is currently in rdx mulx rbp, r15, [ rsi + 0x8 ]; x48, x47<- x1 * arg1[1] setc dil; spill CF x16 to reg (rdi) clc; adcx r15, r9 setc r9b; spill CF x52 to reg (r9) clc; mov [ rsp + 0x20 ], r14; spilling x78 to mem mov r14, -0x1 ; moving imm to reg movzx r8, r8b adcx r8, r14; loading flag adcx r11, r15 mov r8, [ rsi + 0x10 ]; load m64 x2 to register64 seto r15b; spill OF x38 to reg (r15) inc r14; OF<-0x0, preserve CF (debug: state 2 (y: -1, n: 0)) mov r14, -0x1 ; moving imm to reg movzx rcx, cl adox rcx, r14; loading flag adox r11, [ rsp + 0x8 ] xchg rdx, r8; x2, swapping with x1, which is currently in rdx mulx rcx, r14, [ rsi + 0x0 ]; x99, x98<- x2 * arg1[0] mov [ rsp + 0x28 ], rcx; spilling x99 to mem setc cl; spill CF x61 to reg (rcx) clc; adcx r14, r11 mov r11, 0xffffffffffffffff ; moving imm to reg xchg rdx, r11; 0xffffffffffffffff, swapping with x2, which is currently in rdx mov byte [ rsp + 0x30 ], cl; spilling byte x61 to mem mov [ rsp + 0x38 ], rbp; spilling x48 to mem mulx rcx, rbp, r14; _, x117<- x107 * 0xffffffffffffffff mov rcx, rdx; preserving value of 0xffffffffffffffff into a new reg mov rdx, [ rsi + 0x18 ]; saving arg1[3] in rdx. mov byte [ rsp + 0x40 ], r9b; spilling byte x52 to mem mulx rbx, r9, rbx; x6, x5<- x4 * arg1[3] mov rdx, rbp; _, copying x117 here, cause x117 is needed in a reg for other than _, namely all: , x119--x120, x123--x124, _--x131, x121--x122, size: 4 setc cl; spill CF x108 to reg (rcx) clc; adcx rdx, r14 seto dl; spill OF x84 to reg (rdx) mov r14, -0x1 ; moving imm to reg inc r14; OF<-0x0, preserve CF (debug: state 5 (thanks Paul)) mov r14, -0x1 ; moving imm to reg movzx rdi, dil adox rdi, r14; loading flag adox rax, r9 mov rdi, 0xffffffff ; moving imm to reg xchg rdx, rdi; 0xffffffff, swapping with x84, which is currently in rdx mulx r13, r9, r13; x23, x22<- x20 * 0xffffffff setc r14b; spill CF x131 to reg (r14) clc; mov rdx, -0x1 ; moving imm to reg movzx r12, r12b adcx r12, rdx; loading flag adcx r10, r9 mov rdx, r8; x1 to rdx mulx r8, r12, [ rsi + 0x10 ]; x46, x45<- x1 * arg1[2] seto r9b; spill OF x18 to reg (r9) mov [ rsp + 0x48 ], r8; spilling x46 to mem mov r8, -0x1 ; moving imm to reg inc r8; OF<-0x0, preserve CF (debug: state 5 (thanks Paul)) mov r8, -0x1 ; moving imm to reg movzx r15, r15b adox r15, r8; loading flag adox rax, r10 setc r15b; spill CF x31 to reg (r15) movzx r10, byte [ rsp + 0x40 ]; load byte memx52 to register64 clc; adcx r10, r8; loading flag adcx r12, [ rsp + 0x38 ] seto r10b; spill OF x40 to reg (r10) movzx r8, byte [ rsp + 0x30 ]; load byte memx61 to register64 mov [ rsp + 0x50 ], rbx; spilling x6 to mem mov rbx, 0x0 ; moving imm to reg dec rbx; OF<-0x0, preserve CF (debug: state 4 (thanks Paul)) adox r8, rbx; loading flag adox rax, r12 seto r8b; spill OF x63 to reg (r8) inc rbx; OF<-0x0, preserve CF (debug: state 2 (y: -1, n: 0)) mov r12, -0x1 ; moving imm to reg movzx rdi, dil adox rdi, r12; loading flag adox rax, [ rsp + 0x10 ] xchg rdx, r11; x2, swapping with x1, which is currently in rdx mulx rdi, rbx, [ rsi + 0x8 ]; x97, x96<- x2 * arg1[1] setc r12b; spill CF x54 to reg (r12) clc; adcx rbx, [ rsp + 0x28 ] mov [ rsp + 0x58 ], rdi; spilling x97 to mem mov rdi, 0xffffffff00000000 ; moving imm to reg xchg rdx, rdi; 0xffffffff00000000, swapping with x2, which is currently in rdx mov byte [ rsp + 0x60 ], r8b; spilling byte x63 to mem mov byte [ rsp + 0x68 ], r12b; spilling byte x54 to mem mulx r8, r12, rbp; x124, x123<- x117 * 0xffffffff00000000 setc dl; spill CF x101 to reg (rdx) clc; mov [ rsp + 0x70 ], r8; spilling x124 to mem mov r8, -0x1 ; moving imm to reg movzx rcx, cl adcx rcx, r8; loading flag adcx rax, rbx seto cl; spill OF x86 to reg (rcx) inc r8; OF<-0x0, preserve CF (debug: state 2 (y: -1, n: 0)) mov rbx, -0x1 ; moving imm to reg movzx r14, r14b adox r14, rbx; loading flag adox rax, r12 mov r14, [ rsi + 0x18 ]; load m64 x3 to register64 xchg rdx, r14; x3, swapping with x101, which is currently in rdx mulx r12, r8, [ rsi + 0x0 ]; x148, x147<- x3 * arg1[0] setc bl; spill CF x110 to reg (rbx) clc; adcx r8, rax mov rax, 0xffffffffffffffff ; moving imm to reg xchg rdx, rax; 0xffffffffffffffff, swapping with x3, which is currently in rdx mov [ rsp + 0x78 ], r12; spilling x148 to mem mov byte [ rsp + 0x80 ], bl; spilling byte x110 to mem mulx r12, rbx, r8; _, x166<- x156 * 0xffffffffffffffff mov r12, 0xffffffff00000000 ; moving imm to reg xchg rdx, rbx; x166, swapping with 0xffffffffffffffff, which is currently in rdx mov byte [ rsp + 0x88 ], r14b; spilling byte x101 to mem mulx rbx, r14, r12; x173, x172<- x166 * 0xffffffff00000000 mov r12, 0xffffffffffffffff ; moving imm to reg mov [ rsp + 0x90 ], r14; spilling x172 to mem mov byte [ rsp + 0x98 ], cl; spilling byte x86 to mem mulx r14, rcx, r12; x171, x170<- x166 * 0xffffffffffffffff setc r12b; spill CF x157 to reg (r12) clc; adcx rcx, rbx mov rbx, 0xffffffff ; moving imm to reg mov [ rsp + 0xa0 ], rcx; spilling x174 to mem mov byte [ rsp + 0xa8 ], r12b; spilling byte x157 to mem mulx rcx, r12, rbx; x169, x168<- x166 * 0xffffffff adcx r12, r14 movzx r14, r15b; x32, copying x31 here, cause x31 is needed in a reg for other than x32, namely all: , x32, size: 1 lea r14, [ r14 + r13 ] mov r13, 0x0 ; moving imm to reg adcx rcx, r13 movzx r15, r9b; x19, copying x18 here, cause x18 is needed in a reg for other than x19, namely all: , x19, size: 1 mov r13, [ rsp + 0x50 ]; load m64 x6 to register64 lea r15, [ r15 + r13 ]; r8/64 + m8 clc; mov r13, -0x1 ; moving imm to reg movzx r10, r10b adcx r10, r13; loading flag adcx r15, r14 mov r9, rdx; preserving value of x166 into a new reg mov rdx, [ rsi + 0x18 ]; saving arg1[3] in rdx. mulx r11, r10, r11; x44, x43<- x1 * arg1[3] seto dl; spill OF x133 to reg (rdx) movzx r14, byte [ rsp + 0x68 ]; load byte memx54 to register64 inc r13; OF<-0x0, preserve CF (debug: state 2 (y: -1, n: 0)) mov r13, -0x1 ; moving imm to reg adox r14, r13; loading flag adox r10, [ rsp + 0x48 ] seto r14b; spill OF x56 to reg (r14) movzx r13, byte [ rsp + 0x60 ]; load byte memx63 to register64 mov rbx, 0x0 ; moving imm to reg dec rbx; OF<-0x0, preserve CF (debug: state 4 (thanks Paul)) adox r13, rbx; loading flag adox r15, r10 movzx r13, r14b; x57, copying x56 here, cause x56 is needed in a reg for other than x57, namely all: , x57, size: 1 lea r13, [ r13 + r11 ] setc r11b; spill CF x42 to reg (r11) movzx r10, byte [ rsp + 0x98 ]; load byte memx86 to register64 clc; adcx r10, rbx; loading flag adcx r15, [ rsp + 0x20 ] movzx r10, r11b; x66, copying x42 here, cause x42 is needed in a reg for other than x66, namely all: , x66--x67, size: 1 adox r10, r13 mov r11, [ rsp + 0x18 ]; x89, copying x80 here, cause x80 is needed in a reg for other than x89, namely all: , x89--x90, size: 1 adcx r11, r10 xchg rdx, rdi; x2, swapping with x133, which is currently in rdx mulx r14, r13, [ rsi + 0x10 ]; x95, x94<- x2 * arg1[2] seto r10b; spill OF x91 to reg (r10) adc r10b, 0x0 movzx r10, r10b adox r9, r8 movzx r9, byte [ rsp + 0x88 ]; load byte memx101 to register64 adcx r9, rbx; loading flag adcx r13, [ rsp + 0x58 ] setc r9b; spill CF x103 to reg (r9) movzx r8, byte [ rsp + 0x80 ]; load byte memx110 to register64 clc; adcx r8, rbx; loading flag adcx r15, r13 mov r8, 0xffffffffffffffff ; moving imm to reg xchg rdx, rbp; x117, swapping with x2, which is currently in rdx mulx r13, rbx, r8; x122, x121<- x117 * 0xffffffffffffffff seto r8b; spill OF x180 to reg (r8) mov [ rsp + 0xb0 ], rcx; spilling x178 to mem mov rcx, -0x2 ; moving imm to reg inc rcx; OF<-0x0, preserve CF (debug: 6; load -2, increase it, save as -1) adox rbx, [ rsp + 0x70 ] setc cl; spill CF x112 to reg (rcx) clc; mov [ rsp + 0xb8 ], r12; spilling x176 to mem mov r12, -0x1 ; moving imm to reg movzx rdi, dil adcx rdi, r12; loading flag adcx r15, rbx xchg rdx, rax; x3, swapping with x117, which is currently in rdx mulx rdi, rbx, [ rsi + 0x8 ]; x146, x145<- x3 * arg1[1] setc r12b; spill CF x135 to reg (r12) clc; adcx rbx, [ rsp + 0x78 ] mov byte [ rsp + 0xc0 ], r10b; spilling byte x91 to mem setc r10b; spill CF x150 to reg (r10) mov [ rsp + 0xc8 ], rdi; spilling x146 to mem movzx rdi, byte [ rsp + 0xa8 ]; load byte memx157 to register64 clc; mov byte [ rsp + 0xd0 ], r12b; spilling byte x135 to mem mov r12, -0x1 ; moving imm to reg adcx rdi, r12; loading flag adcx r15, rbx seto dil; spill OF x126 to reg (rdi) inc r12; OF<-0x0, preserve CF (debug: state 2 (y: -1, n: 0)) mov rbx, -0x1 ; moving imm to reg movzx r8, r8b adox r8, rbx; loading flag adox r15, [ rsp + 0x90 ] xchg rdx, rbp; x2, swapping with x3, which is currently in rdx mulx rdx, r8, [ rsi + 0x18 ]; x93, x92<- x2 * arg1[3] setc bl; spill CF x159 to reg (rbx) mov [ rsp + 0xd8 ], rdx; spilling x93 to mem seto dl; spill OF x182 to reg (rdx) mov byte [ rsp + 0xe0 ], r10b; spilling byte x150 to mem mov r10, r15; x190, copying x181 here, cause x181 is needed in a reg for other than x190, namely all: , x200, x190--x191, size: 2 sub r10, 0x00000001 dec r12; OF<-0x0, preserve CF (debug: state 3 (y: 0, n: -1)) movzx r9, r9b adox r9, r12; loading flag adox r14, r8 seto r9b; spill OF x105 to reg (r9) inc r12; OF<-0x0, preserve CF (debug: state 2 (y: -1, n: 0)) mov r8, -0x1 ; moving imm to reg movzx rcx, cl adox rcx, r8; loading flag adox r11, r14 mov rcx, 0xffffffff ; moving imm to reg xchg rdx, rax; x117, swapping with x182, which is currently in rdx mulx rdx, r14, rcx; x120, x119<- x117 * 0xffffffff mov r12, rdx; preserving value of x120 into a new reg mov rdx, [ rsi + 0x10 ]; saving arg1[2] in rdx. mulx r8, rcx, rbp; x144, x143<- x3 * arg1[2] seto dl; spill OF x114 to reg (rdx) mov [ rsp + 0xe8 ], r10; spilling x190 to mem mov r10, 0x0 ; moving imm to reg dec r10; OF<-0x0, preserve CF (debug: state 4 (thanks Paul)) movzx rdi, dil adox rdi, r10; loading flag adox r13, r14 setc dil; spill CF x191 to reg (rdi) movzx r14, byte [ rsp + 0xd0 ]; load byte memx135 to register64 clc; adcx r14, r10; loading flag adcx r11, r13 setc r14b; spill CF x137 to reg (r14) movzx r13, byte [ rsp + 0xe0 ]; load byte memx150 to register64 clc; adcx r13, r10; loading flag adcx rcx, [ rsp + 0xc8 ] setc r13b; spill CF x152 to reg (r13) clc; movzx rbx, bl adcx rbx, r10; loading flag adcx r11, rcx setc bl; spill CF x161 to reg (rbx) clc; movzx rax, al adcx rax, r10; loading flag adcx r11, [ rsp + 0xa0 ] movzx rax, r9b; x106, copying x105 here, cause x105 is needed in a reg for other than x106, namely all: , x106, size: 1 mov rcx, [ rsp + 0xd8 ]; load m64 x93 to register64 lea rax, [ rax + rcx ]; r8/64 + m8 setc cl; spill CF x184 to reg (rcx) seto r9b; spill OF x128 to reg (r9) movzx r10, dil; x191, copying x191 here, cause x191 is needed in a reg for other than x191, namely all: , x192--x193, size: 1 add r10, -0x1 mov r10, r11; x192, copying x183 here, cause x183 is needed in a reg for other than x192, namely all: , x201, x192--x193, size: 2 mov byte [ rsp + 0xf0 ], bl; spilling byte x161 to mem mov rbx, 0xffffffff00000000 ; moving imm to reg sbb r10, rbx mov rbx, 0x0 ; moving imm to reg dec rbx; OF<-0x0, preserve CF (debug: state 4 (thanks Paul)) mov [ rsp + 0xf8 ], r10; spilling x192 to mem movzx r10, byte [ rsp + 0xc0 ]; load byte memx91 to register64 movzx rdx, dl adox rdx, rbx; loading flag adox rax, r10 mov rdx, [ rsi + 0x18 ]; arg1[3] to rdx mulx rbp, r10, rbp; x142, x141<- x3 * arg1[3] movzx rdx, r9b; x129, copying x128 here, cause x128 is needed in a reg for other than x129, namely all: , x129, size: 1 lea rdx, [ rdx + r12 ] seto r12b; spill OF x116 to reg (r12) inc rbx; OF<-0x0, preserve CF (debug: state 2 (y: -1, n: 0)) mov r9, -0x1 ; moving imm to reg movzx r14, r14b adox r14, r9; loading flag adox rax, rdx seto r14b; spill OF x139 to reg (r14) dec rbx; OF<-0x0, preserve CF (debug: state 1(0x0) (thanks Paul)) movzx r13, r13b adox r13, rbx; loading flag adox r8, r10 movzx r9, r14b; x140, copying x139 here, cause x139 is needed in a reg for other than x140, namely all: , x140, size: 1 movzx r12, r12b lea r9, [ r9 + r12 ] seto r13b; spill OF x154 to reg (r13) movzx r12, byte [ rsp + 0xf0 ]; load byte memx161 to register64 inc rbx; OF<-0x0, preserve CF (debug: state 2 (y: -1, n: 0)) mov r10, -0x1 ; moving imm to reg adox r12, r10; loading flag adox rax, r8 seto r12b; spill OF x163 to reg (r12) dec rbx; OF<-0x0, preserve CF (debug: state 1(0x0) (thanks Paul)) movzx rcx, cl adox rcx, rbx; loading flag adox rax, [ rsp + 0xb8 ] seto r10b; spill OF x186 to reg (r10) mov rcx, rax; x194, copying x185 here, cause x185 is needed in a reg for other than x194, namely all: , x194--x195, x202, size: 2 mov rdx, 0xffffffffffffffff ; moving imm to reg sbb rcx, rdx movzx r14, r13b; x155, copying x154 here, cause x154 is needed in a reg for other than x155, namely all: , x155, size: 1 lea r14, [ r14 + rbp ] inc rbx; OF<-0x0, preserve CF (debug: state 2 (y: -1, n: 0)) mov rbp, -0x1 ; moving imm to reg movzx r12, r12b adox r12, rbp; loading flag adox r9, r14 seto r8b; spill OF x165 to reg (r8) dec rbx; OF<-0x0, preserve CF (debug: state 1(0x0) (thanks Paul)) movzx r10, r10b adox r10, rbx; loading flag adox r9, [ rsp + 0xb0 ] seto bpl; spill OF x188 to reg (rbp) mov r13, r9; x196, copying x187 here, cause x187 is needed in a reg for other than x196, namely all: , x203, x196--x197, size: 2 mov r12, 0xffffffff ; moving imm to reg sbb r13, r12 movzx r10, bpl; x189, copying x188 here, cause x188 is needed in a reg for other than x189, namely all: , x189, size: 1 movzx r8, r8b lea r10, [ r10 + r8 ] sbb r10, 0x00000000 mov r10, [ rsp + 0xe8 ]; x200, copying x190 here, cause x190 is needed in a reg for other than x200, namely all: , x200, size: 1 cmovc r10, r15; if CF, x200<- x181 (nzVar) mov r15, [ rsp + 0x0 ]; load m64 out1 to register64 mov [ r15 + 0x0 ], r10; out1[0] = x200 cmovc r13, r9; if CF, x203<- x187 (nzVar) mov [ r15 + 0x18 ], r13; out1[3] = x203 mov r14, [ rsp + 0xf8 ]; x201, copying x192 here, cause x192 is needed in a reg for other than x201, namely all: , x201, size: 1 cmovc r14, r11; if CF, x201<- x183 (nzVar) cmovc rcx, rax; if CF, x202<- x185 (nzVar) mov [ r15 + 0x10 ], rcx; out1[2] = x202 mov [ r15 + 0x8 ], r14; out1[1] = x201 mov rbx, [ rsp + 0x100 ]; restoring from stack mov rbp, [ rsp + 0x108 ]; restoring from stack mov r12, [ rsp + 0x110 ]; restoring from stack mov r13, [ rsp + 0x118 ]; restoring from stack mov r14, [ rsp + 0x120 ]; restoring from stack mov r15, [ rsp + 0x128 ]; restoring from stack add rsp, 0x130 ret ; cpu AMD Ryzen 9 5950X 16-Core Processor ; clocked at 2200 MHz ; first cyclecount 100.64, best 96.67469879518072, lastGood 96.86046511627907 ; seed 3346530064135123 ; CC / CFLAGS clang / -march=native -mtune=native -O3 ; time needed: 9430 ms / 500 runs=> 18.86ms/run ; Time spent for assembling and measureing (initial batch_size=86, initial num_batches=101): 1068 ms ; Ratio (time for assembling + measure)/(total runtime for 500runs): 0.11325556733828208 ; number reverted permutation/ tried permutation: 194 / 254 =76.378% ; number reverted decision/ tried decision: 155 / 247 =62.753%
40.965986
150
0.689029
dbcfd3576ffa68ef4586ac1fd1e8fdd8cd6bd87b
3,981
kt
Kotlin
Chapter07/src/main/kotlin/com/packtpub/functionalkotlin/chapter07/dispatchers.kt
appleDev20/Functional-Kotlin
3b605e238113ac85465407717fceaacd1e5f40c7
[ "MIT" ]
50
2018-02-20T14:14:29.000Z
2022-02-18T02:28:25.000Z
Chapter07/src/main/kotlin/com/packtpub/functionalkotlin/chapter07/dispatchers.kt
MarioAriasC/FunctionalKotlin
e5b1ac5afb43a8e9c247087cbbb4c4399d2a2839
[ "Apache-2.0" ]
null
null
null
Chapter07/src/main/kotlin/com/packtpub/functionalkotlin/chapter07/dispatchers.kt
MarioAriasC/FunctionalKotlin
e5b1ac5afb43a8e9c247087cbbb4c4399d2a2839
[ "Apache-2.0" ]
23
2018-03-15T01:32:42.000Z
2022-01-09T15:13:58.000Z
package com.packtpub.functionalkotlin.chapter07 fun workingOn() = "I'm working in thread ${Thread.currentThread().name}" fun log(msg: String) = println("[${Thread.currentThread().name}] $msg") fun log(msg: Any) = log(msg.toString()) /*fun main(args: Array<String>) = runBlocking<Unit> { val jobs = listOf( launch(Unconfined) { println("Unconfined: ${workingOn()}") }, launch(coroutineContext) { println("coroutineContext: ${workingOn()}") }, launch(CommonPool) { println("CommonPool: ${workingOn()}") }, launch(newSingleThreadContext("MyOwnThread")) { println("newSTC: ${workingOn()}") } ) jobs.forEach { it.join() } }*/ /* fun main(args: Array<String>) = runBlocking<Unit> { val jobs = listOf( launch(Unconfined) { println("Unconfined: ${workingOn()}") delay(500) println("Unconfined: ${workingOn()}") }, launch(coroutineContext) { println("coroutineContext: ${workingOn()}") delay(500) println("coroutineContext: ${workingOn()}") } ) jobs.forEach { it.join() } }*/ /* fun main(args: Array<String>) = runBlocking<Unit> { val a = async(coroutineContext) { log("I'm computing a piece of the answer") 6 } val b = async(coroutineContext) { log("I'm computing another piece of the answer") 7 } log("The answer is ${a.await() + b.await()}") }*/ /* fun main(args: Array<String>) { newSingleThreadContext("Ctx1").use { ctx1 -> newSingleThreadContext("Ctx2").use { ctx2 -> runBlocking(ctx1) { println("Job is ${coroutineContext[Job]}") log("Started in ctx1") kotlinx.coroutines.experimental.run(ctx2) { log("Working in ctx2") } log("Back to ctx1") } } } }*/ /* fun main(args: Array<String>) = runBlocking<Unit> { val request = launch { val job1 = launch { log("Job1: I have my own context and execute independently") delay(1000) log("job1: I am not affected by cancellation of the request") } val job2 = launch(coroutineContext) { delay(100) log("job2: I am child of the request coroutine") delay(1000) log("job2: I will not execute this line of my parent request is cancelled") } job1.join() job2.join() } delay(500) request.cancel() delay(1000) log("main: Who has survived request cancellation?") }*/ /*fun main(args: Array<String>) = runBlocking<Unit> { val request = launch(coroutineContext) { val job1 = launch(coroutineContext + CommonPool) { log("Job1: I have my own context and execute independently") delay(1000) log("job1: I am not affected by cancellation of the request") } *//*val job2 = launch(coroutineContext) { delay(100) log("job2: I am child of the request coroutine") delay(1000) log("job2: I will not execute this line of my parent request is cancelled") }*//* job1.join() // job2.join() } delay(500) request.cancel() delay(1000) log("main: Who has survived request cancellation?") }*/ /* fun main(args: Array<String>) = runBlocking<Unit> { val request = launch { repeat(3) { i -> launch(coroutineContext) { delay((i + 1) * 200L) log("Coroutine $i is done") } } log("request: I'm done and I don't explicitly join my children that are still active") } request.join() log("Now processing of the request complete") }*/ /* fun main(args: Array<String>) = runBlocking<Unit>(CoroutineName("main")) { log("started main coroutine") val v1 = async(CoroutineName("v1coroutine")) { delay(500) log("Computing v1") 252 } val v2 = async(CoroutineName("v2coroutine")){ delay(1000) log("Computing v2") 6 } log("the answer for v1 / v2 = ${v1.await() / v2.await()}") }*/ /* fun main(args: Array<String>) = runBlocking<Unit> { val job = Job() val coroutines = List(10) { index -> launch(coroutineContext, parent = job ) { delay((1 + index) * 200L) log("Coroutine $index is done") } } log("Launched ${coroutines.size} coroutines") delay(500L) log("Cancelling the job") job.cancelAndJoin() }*/
22.87931
88
0.64632
fb050060b57fbca53af5e3c690cb26dade953a9e
13,698
h
C
test/fixtures/cpp-root/external/SQLAPI/include/sl3API.h
Pivotal-Field-Engineering/cpp-buildpack
17f03c5c5019073397cdb6aba5b9d630c85e33ea
[ "Apache-2.0" ]
1
2019-05-29T01:20:58.000Z
2019-05-29T01:20:58.000Z
test/fixtures/cpp-root/external/SQLAPI/include/sl3API.h
Pivotal-Field-Engineering/cpp-buildpack
17f03c5c5019073397cdb6aba5b9d630c85e33ea
[ "Apache-2.0" ]
null
null
null
test/fixtures/cpp-root/external/SQLAPI/include/sl3API.h
Pivotal-Field-Engineering/cpp-buildpack
17f03c5c5019073397cdb6aba5b9d630c85e33ea
[ "Apache-2.0" ]
null
null
null
////////////////////////////////////////////////////////////////////// // slAPI.h ////////////////////////////////////////////////////////////////////// #if !defined(__SLAPI_H__) #define __SLAPI_H__ #include <SQLAPI.h> #include <sqlite3.h> extern void AddSQLite3Support(const SAConnection * pCon); extern void ReleaseSQLite3Support(); typedef int (*sqlite3_open_t)(const void *filename, sqlite3 **ppDb); typedef const char * (*sqlite3_libversion_t)(void); typedef int (*sqlite3_libversion_number_t)(void); typedef int (*sqlite3_threadsafe_t)(void); typedef int (*sqlite3_close_t)(sqlite3 *); typedef int (*sqlite3_extended_result_codes_t)(sqlite3*, int onoff); typedef sqlite3_int64 (*sqlite3_last_insert_rowid_t)(sqlite3*); typedef int (*sqlite3_changes_t)(sqlite3*); typedef int (*sqlite3_total_changes_t)(sqlite3*); typedef void (*sqlite3_interrupt_t)(sqlite3*); typedef int (*sqlite3_complete_t)(const char *sql); typedef int (*sqlite3_complete16_t)(const void *sql); typedef int (*sqlite3_busy_handler_t)(sqlite3*, int(*)(void*,int), void*); typedef int (*sqlite3_busy_timeout_t)(sqlite3*, int ms); typedef void (*sqlite3_free_table_t)(char **result); typedef char *(*sqlite3_mprintf_t)(const char*,...); typedef char *(*sqlite3_vmprintf_t)(const char*, va_list); typedef char *(*sqlite3_snprintf_t)(int,char*,const char*, ...); typedef void *(*sqlite3_malloc_t)(int); typedef void *(*sqlite3_realloc_t)(void*, int); typedef void (*sqlite3_free_t)(void*); typedef sqlite3_int64 (*sqlite3_memory_used_t)(void); typedef sqlite3_int64 (*sqlite3_memory_highwater_t)(int resetFlag); typedef void *(*sqlite3_trace_t)(sqlite3*, void(*xTrace)(void*,const char*), void*); typedef void (*sqlite3_progress_handler_t)(sqlite3*, int, int(*)(void*), void*); typedef int (*sqlite3_errcode_t)(sqlite3 *db); typedef const void *(*sqlite3_errmsg_t)(sqlite3*); typedef int (*sqlite3_bind_blob_t)(sqlite3_stmt*, int, const void*, int n, void(*)(void*)); typedef int (*sqlite3_bind_double_t)(sqlite3_stmt*, int, double); typedef int (*sqlite3_bind_int_t)(sqlite3_stmt*, int, int); typedef int (*sqlite3_bind_int64_t)(sqlite3_stmt*, int, sqlite3_int64); typedef int (*sqlite3_bind_null_t)(sqlite3_stmt*, int); typedef int (*sqlite3_bind_text_t)(sqlite3_stmt*, int, const void*, int n, void(*)(void*)); typedef int (*sqlite3_bind_value_t)(sqlite3_stmt*, int, const sqlite3_value*); typedef int (*sqlite3_bind_zeroblob_t)(sqlite3_stmt*, int, int n); typedef int (*sqlite3_bind_parameter_count_t)(sqlite3_stmt*); typedef const char *(*sqlite3_bind_parameter_name_t)(sqlite3_stmt*, int); typedef int (*sqlite3_bind_parameter_index_t)(sqlite3_stmt*, const char *zName); typedef int (*sqlite3_clear_bindings_t)(sqlite3_stmt*); typedef int (*sqlite3_column_count_t)(sqlite3_stmt *pStmt); typedef const void *(*sqlite3_column_name_t)(sqlite3_stmt*, int N); typedef const char *(*sqlite3_column_database_name_t)(sqlite3_stmt*,int); typedef const void *(*sqlite3_column_database_name16_t)(sqlite3_stmt*,int); typedef const char *(*sqlite3_column_table_name_t)(sqlite3_stmt*,int); typedef const void *(*sqlite3_column_table_name16_t)(sqlite3_stmt*,int); typedef const char *(*sqlite3_column_origin_name_t)(sqlite3_stmt*,int); typedef const void *(*sqlite3_column_origin_name16_t)(sqlite3_stmt*,int); typedef const void *(*sqlite3_column_decltype_t)(sqlite3_stmt *, int); typedef int (*sqlite3_step_t)(sqlite3_stmt*); typedef int (*sqlite3_data_count_t)(sqlite3_stmt *pStmt); typedef const void *(*sqlite3_column_blob_t)(sqlite3_stmt*, int iCol); typedef int (*sqlite3_column_bytes_t)(sqlite3_stmt*, int iCol); typedef double (*sqlite3_column_double_t)(sqlite3_stmt*, int iCol); typedef int (*sqlite3_column_int_t)(sqlite3_stmt*, int iCol); typedef sqlite3_int64 (*sqlite3_column_int64_t)(sqlite3_stmt*, int iCol); typedef const void *(*sqlite3_column_text_t)(sqlite3_stmt*, int iCol); typedef int (*sqlite3_column_type_t)(sqlite3_stmt*, int iCol); typedef sqlite3_value *(*sqlite3_column_value_t)(sqlite3_stmt*, int iCol); typedef int (*sqlite3_finalize_t)(sqlite3_stmt *pStmt); typedef int (*sqlite3_reset_t)(sqlite3_stmt *pStmt); typedef int (*sqlite3_aggregate_count_t)(sqlite3_context*); typedef int (*sqlite3_expired_t)(sqlite3_stmt*); typedef int (*sqlite3_transfer_bindings_t)(sqlite3_stmt*, sqlite3_stmt*); typedef int (*sqlite3_global_recover_t)(void); typedef void (*sqlite3_thread_cleanup_t)(void); typedef const void *(*sqlite3_value_blob_t)(sqlite3_value*); typedef int (*sqlite3_value_bytes_t)(sqlite3_value*); typedef int (*sqlite3_value_bytes16_t)(sqlite3_value*); typedef double (*sqlite3_value_double_t)(sqlite3_value*); typedef int (*sqlite3_value_int_t)(sqlite3_value*); typedef sqlite3_int64 (*sqlite3_value_int64_t)(sqlite3_value*); typedef const unsigned char *(*sqlite3_value_text_t)(sqlite3_value*); typedef const void *(*sqlite3_value_text16_t)(sqlite3_value*); typedef const void *(*sqlite3_value_text16le_t)(sqlite3_value*); typedef const void *(*sqlite3_value_text16be_t)(sqlite3_value*); typedef int (*sqlite3_value_type_t)(sqlite3_value*); typedef int (*sqlite3_value_numeric_type_t)(sqlite3_value*); typedef void *(*sqlite3_aggregate_context_t)(sqlite3_context*, int nBytes); typedef void *(*sqlite3_user_data_t)(sqlite3_context*); typedef void *(*sqlite3_get_auxdata_t)(sqlite3_context*, int); typedef void (*sqlite3_set_auxdata_t)(sqlite3_context*, int, void*, void (*)(void*)); typedef void (*sqlite3_result_blob_t)(sqlite3_context*, const void*, int, void(*)(void*)); typedef void (*sqlite3_result_double_t)(sqlite3_context*, double); typedef void (*sqlite3_result_error_t)(sqlite3_context*, const char*, int); typedef void (*sqlite3_result_error16_t)(sqlite3_context*, const void*, int); typedef void (*sqlite3_result_error_toobig_t)(sqlite3_context*); typedef void (*sqlite3_result_error_nomem_t)(sqlite3_context*); typedef void (*sqlite3_result_int_t)(sqlite3_context*, int); typedef void (*sqlite3_result_int64_t)(sqlite3_context*, sqlite3_int64); typedef void (*sqlite3_result_null_t)(sqlite3_context*); typedef void (*sqlite3_result_text_t)(sqlite3_context*, const char*, int, void(*)(void*)); typedef void (*sqlite3_result_text16_t)(sqlite3_context*, const void*, int, void(*)(void*)); typedef void (*sqlite3_result_text16le_t)(sqlite3_context*, const void*, int,void(*)(void*)); typedef void (*sqlite3_result_text16be_t)(sqlite3_context*, const void*, int,void(*)(void*)); typedef void (*sqlite3_result_value_t)(sqlite3_context*, sqlite3_value*); typedef void (*sqlite3_result_zeroblob_t)(sqlite3_context*, int n); typedef int (*sqlite3_sleep_t)(int); typedef int (*sqlite3_get_autocommit_t)(sqlite3*); typedef sqlite3 *(*sqlite3_db_handle_t)(sqlite3_stmt*); typedef void *(*sqlite3_commit_hook_t)(sqlite3*, int(*)(void*), void*); typedef void *(*sqlite3_rollback_hook_t)(sqlite3*, void(*)(void *), void*); typedef int (*sqlite3_enable_shared_cache_t)(int); typedef int (*sqlite3_release_memory_t)(int); typedef void (*sqlite3_soft_heap_limit_t)(int); typedef int(*sqlite3_load_extension_t)( sqlite3 *db, /* Load the extension into this database connection */ const char *zFile, /* Name of the shared library containing extension */ const char *zProc, /* Entry point. Derived from zFile if 0 */ char **pzErrMsg /* Put error message here if not 0 */ ); typedef int (*sqlite3_enable_load_extension_t)(sqlite3 *db, int onoff); typedef int (*sqlite3_auto_extension_t)(void *xEntryPoint); typedef void (*sqlite3_reset_auto_extension_t)(void); typedef int (*sqlite3_declare_vtab_t)(sqlite3*, const char *zCreateTable); typedef int (*sqlite3_overload_function_t)(sqlite3*, const char *zFuncName, int nArg); typedef int (*sqlite3_blob_close_t)(sqlite3_blob *); typedef int (*sqlite3_blob_bytes_t)(sqlite3_blob *); typedef int (*sqlite3_blob_read_t)(sqlite3_blob *, void *z, int n, int iOffset); typedef int (*sqlite3_blob_write_t)(sqlite3_blob *, const void *z, int n, int iOffset); typedef sqlite3_vfs *(*sqlite3_vfs_find_t)(const char *zVfsName); typedef int (*sqlite3_vfs_register_t)(sqlite3_vfs*, int makeDflt); typedef int (*sqlite3_vfs_unregister_t)(sqlite3_vfs*); typedef sqlite3_mutex *(*sqlite3_mutex_alloc_t)(int); typedef void (*sqlite3_mutex_free_t)(sqlite3_mutex*); typedef void (*sqlite3_mutex_enter_t)(sqlite3_mutex*); typedef int (*sqlite3_mutex_try_t)(sqlite3_mutex*); typedef void (*sqlite3_mutex_leave_t)(sqlite3_mutex*); typedef int (*sqlite3_mutex_held_t)(sqlite3_mutex*); typedef int (*sqlite3_mutex_notheld_t)(sqlite3_mutex*); typedef int (*sqlite3_file_control_t)(sqlite3*, const char *zDbName, int op, void*); typedef int (*sqlite3_exec_t)( sqlite3*, /* An open database */ const char *sql, /* SQL to be evaluted */ int (*callback)(void*,int,char**,char**), /* Callback function */ void *, /* 1st argument to callback */ char **errmsg /* Error msg written here */ ); typedef int (*sqlite3_prepare_t)( sqlite3 *db, /* Database handle */ const void *zSql, /* SQL statement, UTF-16 encoded */ int nByte, /* Maximum length of zSql in bytes. */ sqlite3_stmt **ppStmt, /* OUT: Statement handle */ const void **pzTail /* OUT: Pointer to unused portion of zSql */ ); typedef int (*sqlite3_open_v2_t)(const char *filename, sqlite3 **ppDb, int flags, const char *zVfs); typedef sqlite3_backup *(*sqlite3_backup_init_t)( sqlite3 *pDest, /* Destination database handle */ const char *zDestName, /* Destination database name */ sqlite3 *pSource, /* Source database handle */ const char *zSourceName /* Source database name */ ); typedef int (*sqlite3_backup_step_t)(sqlite3_backup *p, int nPage); typedef int (*sqlite3_backup_finish_t)(sqlite3_backup *p); typedef int (*sqlite3_backup_remaining_t)(sqlite3_backup *p); typedef int (*sqlite3_backup_pagecount_t)(sqlite3_backup *p); typedef int (*sqlite3_table_column_metadata_t)( sqlite3 *db, /* Connection handle */ const char *zDbName, /* Database name or NULL */ const char *zTableName, /* Table name */ const char *zColumnName, /* Column name */ char const **pzDataType, /* OUTPUT: Declared data type */ char const **pzCollSeq, /* OUTPUT: Collation sequence name */ int *pNotNull, /* OUTPUT: True if NOT NULL constraint exists */ int *pPrimaryKey, /* OUTPUT: True if column part of PK */ int *pAutoinc /* OUTPUT: True if column is auto-increment */ ); typedef void *(*sqlite3_update_hook_t)( sqlite3*, void(*)(void *,int ,char const *,char const *,sqlite3_int64), void* ); typedef int(*sqlite3_key_t)(sqlite3 *db, const void *pKey, int nKey); typedef int(*sqlite3_rekey_t)(sqlite3 *db, const void *pKey, int nKey); // API declarations class SQLAPI_API sl3API : public saAPI { public: sl3API(); sqlite3_open_t sqlite3_open; sqlite3_libversion_t sqlite3_libversion; sqlite3_libversion_number_t sqlite3_libversion_number; sqlite3_errcode_t sqlite3_errcode; sqlite3_errmsg_t sqlite3_errmsg; sqlite3_close_t sqlite3_close; sqlite3_exec_t sqlite3_exec; sqlite3_prepare_t sqlite3_prepare; sqlite3_bind_parameter_index_t sqlite3_bind_parameter_index; sqlite3_column_count_t sqlite3_column_count; sqlite3_column_name_t sqlite3_column_name; sqlite3_column_type_t sqlite3_column_type; sqlite3_column_bytes_t sqlite3_column_bytes; sqlite3_step_t sqlite3_step; sqlite3_db_handle_t sqlite3_db_handle; sqlite3_reset_t sqlite3_reset; sqlite3_clear_bindings_t sqlite3_clear_bindings; sqlite3_finalize_t sqlite3_finalize; sqlite3_interrupt_t sqlite3_interrupt; sqlite3_changes_t sqlite3_changes; sqlite3_column_int64_t sqlite3_column_int64; sqlite3_column_double_t sqlite3_column_double; sqlite3_column_blob_t sqlite3_column_blob; sqlite3_column_text_t sqlite3_column_text; sqlite3_bind_blob_t sqlite3_bind_blob; sqlite3_bind_double_t sqlite3_bind_double; sqlite3_bind_int_t sqlite3_bind_int; sqlite3_bind_int64_t sqlite3_bind_int64; sqlite3_bind_null_t sqlite3_bind_null; sqlite3_bind_text_t sqlite3_bind_text; sqlite3_busy_handler_t sqlite3_busy_handler; sqlite3_busy_timeout_t sqlite3_busy_timeout; sqlite3_threadsafe_t sqlite3_threadsafe; sqlite3_last_insert_rowid_t sqlite3_last_insert_rowid; sqlite3_column_decltype_t sqlite3_column_decltype; sqlite3_open_v2_t sqlite3_open_v2; sqlite3_backup_init_t sqlite3_backup_init; sqlite3_backup_step_t sqlite3_backup_step; sqlite3_backup_finish_t sqlite3_backup_finish; sqlite3_backup_remaining_t sqlite3_backup_remaining; sqlite3_backup_pagecount_t sqlite3_backup_pagecount; sqlite3_table_column_metadata_t sqlite3_table_column_metadata; sqlite3_column_value_t sqlite3_column_value; sqlite3_value_type_t sqlite3_value_type; sqlite3_update_hook_t sqlite3_update_hook; sqlite3_load_extension_t sqlite3_load_extension; sqlite3_enable_load_extension_t sqlite3_enable_load_extension; sqlite3_key_t sqlite3_key; sqlite3_rekey_t sqlite3_rekey; sqlite3_free_t sqlite3_free; }; class SQLAPI_API sl3ConnectionHandles : public saConnectionHandles { public: sl3ConnectionHandles(); sqlite3 *pDb; }; class SQLAPI_API sl3CommandHandles : public saCommandHandles { public: sl3CommandHandles(); sqlite3_stmt *pStmt; }; extern sl3API g_sl3API; #endif //__SLAPI_H__
49.273381
101
0.749233
e836fdc55f05f83cafb761490a05bdec10ae3ec3
6,502
cpp
C++
client/src/bindings/Audio.cpp
xxshady/altv-js-module
64f5b23ff417b25a65d56e92fd39f28fb23dead7
[ "MIT" ]
1
2021-09-27T19:23:39.000Z
2021-09-27T19:23:39.000Z
client/src/bindings/Audio.cpp
xxshady/altv-js-module
64f5b23ff417b25a65d56e92fd39f28fb23dead7
[ "MIT" ]
null
null
null
client/src/bindings/Audio.cpp
xxshady/altv-js-module
64f5b23ff417b25a65d56e92fd39f28fb23dead7
[ "MIT" ]
null
null
null
#include "V8Helpers.h" #include "V8BindHelpers.h" #include "V8ResourceImpl.h" #include "V8Class.h" #include "../CV8ScriptRuntime.h" #include "cpp-sdk/script-objects/IAudio.h" static void Constructor(const v8::FunctionCallbackInfo<v8::Value>& info) { V8_GET_ISOLATE_CONTEXT_RESOURCE(); V8_CHECK_CONSTRUCTOR(); V8_CHECK_ARGS_LEN_MIN_MAX(2, 4); V8_ARG_TO_STRING(1, source); V8_ARG_TO_NUMBER(2, volume); uint32_t category = 0; bool frontend = false; if(info.Length() == 3 || info.Length() == 4) { if(info[2]->IsNumber()) { V8_ARG_TO_UINT32(3, categ); category = categ; } else { V8_ARG_TO_STRING(3, categ); category = alt::ICore::Instance().Hash(categ); } if(info.Length() == 4) { V8_ARG_TO_BOOLEAN(4, frntnd); frontend = frntnd; } } auto audio = alt::ICore::Instance().CreateAudio(source, volume, category, frontend, resource->GetResource()); V8_BIND_BASE_OBJECT(audio, "Failed to create Audio"); } static void On(const v8::FunctionCallbackInfo<v8::Value>& info) { V8_GET_ISOLATE_CONTEXT_RESOURCE(); V8_CHECK_ARGS_LEN(2); V8_ARG_TO_STRING(1, evName); V8_ARG_TO_FUNCTION(2, fun); V8_GET_THIS_BASE_OBJECT(audio, alt::IAudio); static_cast<CV8ResourceImpl*>(resource)->SubscribeAudio(audio, evName.ToString(), fun, V8::SourceLocation::GetCurrent(isolate)); } static void Off(const v8::FunctionCallbackInfo<v8::Value>& info) { V8_GET_ISOLATE_CONTEXT_RESOURCE(); V8_CHECK_ARGS_LEN(2); V8_ARG_TO_STRING(1, evName); V8_ARG_TO_FUNCTION(2, fun); V8_GET_THIS_BASE_OBJECT(audio, alt::IAudio); static_cast<CV8ResourceImpl*>(resource)->UnsubscribeAudio(audio, evName.ToString(), fun); } static void GetEventListeners(const v8::FunctionCallbackInfo<v8::Value>& info) { V8_GET_ISOLATE_CONTEXT_RESOURCE(); V8_CHECK_ARGS_LEN(1); V8_GET_THIS_BASE_OBJECT(audio, alt::IAudio); V8_ARG_TO_STRING(1, eventName); std::vector<V8::EventCallback*> handlers = static_cast<CV8ResourceImpl*>(resource)->GetAudioHandlers(audio, eventName.ToString()); auto array = v8::Array::New(isolate, handlers.size()); for(int i = 0; i < handlers.size(); i++) { array->Set(ctx, i, handlers[i]->fn.Get(isolate)); } V8_RETURN(array); } static void CategoryGetter(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info) { V8_GET_ISOLATE(); V8_GET_THIS_BASE_OBJECT(audio, alt::IAudio); V8_RETURN_UINT(audio->GetCategory()); } static void CategorySetter(v8::Local<v8::String>, v8::Local<v8::Value> val, const v8::PropertyCallbackInfo<void>& info) { V8_GET_ISOLATE_CONTEXT(); V8_GET_THIS_BASE_OBJECT(audio, alt::IAudio); int64_t category; if(val->IsNumber()) { V8_TO_INTEGER(val, categ); category = categ; } else if(val->IsString()) { V8_TO_STRING(val, categ); category = alt::ICore::Instance().Hash(categ); } audio->SetCategory(category); } static void AddOutput(const v8::FunctionCallbackInfo<v8::Value>& info) { V8_GET_ISOLATE_CONTEXT(); V8_GET_THIS_BASE_OBJECT(audio, alt::IAudio); V8_CHECK_ARGS_LEN(1); if(info[0]->IsInt32() || info[0]->IsUint32()) { V8_ARG_TO_INT(1, scriptId); audio->AddOutput(scriptId); } else { V8_ARG_TO_BASE_OBJECT(1, entity, alt::IEntity, "Entity"); audio->AddOutput(entity); } } static void RemoveOutput(const v8::FunctionCallbackInfo<v8::Value>& info) { V8_GET_ISOLATE_CONTEXT(); V8_GET_THIS_BASE_OBJECT(audio, alt::IAudio); V8_CHECK_ARGS_LEN(1); if(info[0]->IsInt32() || info[0]->IsUint32()) { V8_ARG_TO_INT(1, scriptId); audio->RemoveOutput(scriptId); } else { V8_ARG_TO_BASE_OBJECT(1, entity, alt::IEntity, "Entity"); audio->RemoveOutput(entity); } } static void GetOutputs(const v8::FunctionCallbackInfo<v8::Value>& info) { V8_GET_ISOLATE_CONTEXT_RESOURCE(); V8_GET_THIS_BASE_OBJECT(audio, alt::IAudio); auto list = audio->GetOutputs(); auto arr = v8::Array::New(isolate, list->GetSize()); for(int i = 0; i < list->GetSize(); i++) { auto val = list->Get(i); if(val->GetType() == alt::IMValue::Type::BASE_OBJECT) { auto baseObj = resource->GetBaseObjectOrNull(val.As<alt::IMValueBaseObject>()->Value()); arr->Set(ctx, i, baseObj); } else if(val->GetType() == alt::IMValue::Type::UINT) arr->Set(ctx, i, v8::Integer::NewFromUnsigned(isolate, val.As<alt::IMValueUInt>()->Value())); } V8_RETURN(arr); } static void Seek(const v8::FunctionCallbackInfo<v8::Value>& info) { V8_GET_ISOLATE_CONTEXT(); V8_GET_THIS_BASE_OBJECT(audio, alt::IAudio); V8_CHECK_ARGS_LEN(1); V8_ARG_TO_NUMBER(1, time); audio->Seek(time); } extern V8Class v8BaseObject; extern V8Class v8Audio("Audio", v8BaseObject, &Constructor, [](v8::Local<v8::FunctionTemplate> tpl) { using namespace alt; v8::Isolate* isolate = v8::Isolate::GetCurrent(); V8::SetMethod(isolate, tpl, "on", &On); V8::SetMethod(isolate, tpl, "off", &Off); V8::SetMethod(isolate, tpl, "getEventListeners", GetEventListeners); V8::SetAccessor<IAudio, StringView, &IAudio::GetSource, &IAudio::SetSource>(isolate, tpl, "source"); V8::SetAccessor<IAudio, bool, &IAudio::IsLoop, &IAudio::SetLoop>(isolate, tpl, "looped"); V8::SetAccessor<IAudio, float, &IAudio::GetVolume, &IAudio::SetVolume>(isolate, tpl, "volume"); V8::SetAccessor(isolate, tpl, "category", &CategoryGetter, &CategorySetter); V8::SetAccessor<IAudio, bool, &IAudio::IsFrontendPlay>(isolate, tpl, "frontendPlay"); V8::SetAccessor<IAudio, double, &IAudio::GetCurrentTime>(isolate, tpl, "currentTime"); V8::SetAccessor<IAudio, double, &IAudio::GetMaxTime>(isolate, tpl, "maxTime"); V8::SetAccessor<IAudio, bool, &IAudio::IsPlaying>(isolate, tpl, "playing"); V8::SetMethod(isolate, tpl, "addOutput", &AddOutput); V8::SetMethod(isolate, tpl, "removeOutput", &RemoveOutput); V8::SetMethod(isolate, tpl, "getOutputs", &GetOutputs); V8::SetMethod<IAudio, &IAudio::Play>(isolate, tpl, "play"); V8::SetMethod<IAudio, &IAudio::Pause>(isolate, tpl, "pause"); V8::SetMethod<IAudio, &IAudio::Reset>(isolate, tpl, "reset"); V8::SetMethod(isolate, tpl, "seek", &Seek); });
30.961905
134
0.657182
9a84217cf71b4c82d995d2a35d85cc6725f6839b
4,690
swift
Swift
PetWalk/PetWalk/View/Walk/WalkControl.swift
wydryd125/Let-s-mung
2bd7a3227b72f84d5927c54915313068e66a149a
[ "MIT" ]
null
null
null
PetWalk/PetWalk/View/Walk/WalkControl.swift
wydryd125/Let-s-mung
2bd7a3227b72f84d5927c54915313068e66a149a
[ "MIT" ]
null
null
null
PetWalk/PetWalk/View/Walk/WalkControl.swift
wydryd125/Let-s-mung
2bd7a3227b72f84d5927c54915313068e66a149a
[ "MIT" ]
null
null
null
// // BottomView.swift // Temp // // Created by 정유경 on 2020/01/15. // Copyright © 2020 정유경. All rights reserved. // import UIKit import MobileCoreServices protocol BottomViewDelegate: class { func playButtonAction(_ sender: UIButton) } protocol BottomViewImagePickerDelegate: class { func cameraButtonAction() } class WalkControl: UIView { // MARK: UI let stopButton: UIButton = { let button = UIButton() button.tag = 0 button.layer.borderColor = #colorLiteral(red: 0.4474043121, green: 0.7858899112, blue: 0.7191998518, alpha: 1) button.layer.borderWidth = 8 button.setImage(UIImage(named: "play"), for: .normal) button.addTarget(self, action: #selector(stopButtonTouched), for: .touchUpInside) return button }() let playButton: UIButton = { let button = UIButton() button.tag = 1 button.backgroundColor = #colorLiteral(red: 0.4474043121, green: 0.7858899112, blue: 0.7191998518, alpha: 1) button.setImage(UIImage(named: "play2"), for: .normal) button.addTarget(self, action: #selector(playButtonTouched), for: .touchUpInside) return button }() let cameraButton: UIButton = { let button = UIButton() button.backgroundColor = #colorLiteral(red: 0.4474043121, green: 0.7858899112, blue: 0.7191998518, alpha: 1) button.setImage(UIImage(named: "camera2"), for: .normal) button.addTarget(self, action: #selector(cameraButtonTouched), for: .touchUpInside) return button }() weak var delegate: BottomViewDelegate? weak var imagePickerDelegate: BottomViewImagePickerDelegate? // play, pause, stop enum ButtonStatus: String { case play, pause2, stop2 } var currentStatus = ButtonStatus.play { didSet { self.stopButton.setImage(UIImage(named: currentStatus.rawValue), for: .normal) self.stopButton.imageEdgeInsets = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0) } } // MARK: Initialize override init(frame: CGRect) { super.init(frame: frame) setupUI() setupConstraints() } private func setupUI() { self.stopButton.layer.cornerRadius = UI.buttonSize / 2 self.playButton.layer.cornerRadius = UI.buttonSize / 4 self.cameraButton.layer.cornerRadius = UI.buttonSize / 4 } private struct UI { static let buttonSize: CGFloat = 120 static let spacing: CGFloat = 32 } func setupConstraints() { [self.stopButton, self.playButton, self.cameraButton] .forEach { self.addSubview($0) } self.stopButton.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ self.stopButton.topAnchor.constraint(equalTo: self.topAnchor), self.stopButton.bottomAnchor.constraint(equalTo: self.bottomAnchor), self.stopButton.centerXAnchor.constraint(equalTo: self.centerXAnchor), self.stopButton.widthAnchor.constraint(equalToConstant: UI.buttonSize), self.stopButton.heightAnchor.constraint(equalToConstant: UI.buttonSize), ]) self.playButton.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ self.playButton.trailingAnchor.constraint(equalTo: self.stopButton.leadingAnchor, constant: -UI.spacing), self.playButton.centerYAnchor.constraint(equalTo: self.stopButton.centerYAnchor), self.playButton.widthAnchor.constraint(equalToConstant: UI.buttonSize / 2), self.playButton.heightAnchor.constraint(equalToConstant: UI.buttonSize / 2), ]) self.cameraButton.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ self.cameraButton.leadingAnchor.constraint(equalTo: self.stopButton.trailingAnchor, constant: UI.spacing), self.cameraButton.centerYAnchor.constraint(equalTo: self.stopButton.centerYAnchor), self.cameraButton.widthAnchor.constraint(equalToConstant: UI.buttonSize / 2), self.cameraButton.heightAnchor.constraint(equalToConstant: UI.buttonSize / 2), ]) } // MARK: Actions @objc func stopButtonTouched(_ sender: UIButton) { delegate?.playButtonAction(sender) } @objc func playButtonTouched(_ sender: UIButton) { stopButton.setImage(UIImage(named: "pause2"), for: .normal) delegate?.playButtonAction(sender) playButton.alpha = 0 } @objc func cameraButtonTouched(_ sender: UIButton) { imagePickerDelegate?.cameraButtonAction() } func setStatus(status: ButtonStatus) { switch status { case .play: currentStatus = .pause2 case .pause2: currentStatus = .stop2 case.stop2: currentStatus = .pause2 } } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } }
32.797203
114
0.714286
26440c68b8eaa4b310f0c19e08c625906a669320
1,009
java
Java
httpserver-auth/src/main/java/com/stulsoft/pvertx/httpserverauth/MainAuth.java
ysden123/pvertx
a310f7141310f4981f739aa05675affed5e0fa99
[ "MIT" ]
null
null
null
httpserver-auth/src/main/java/com/stulsoft/pvertx/httpserverauth/MainAuth.java
ysden123/pvertx
a310f7141310f4981f739aa05675affed5e0fa99
[ "MIT" ]
null
null
null
httpserver-auth/src/main/java/com/stulsoft/pvertx/httpserverauth/MainAuth.java
ysden123/pvertx
a310f7141310f4981f739aa05675affed5e0fa99
[ "MIT" ]
null
null
null
package com.stulsoft.pvertx.httpserverauth; import com.stulsoft.pvertx.common.Terminator; import com.stulsoft.pvertx.httpserverauth.auth.AuthorizationProvider; import com.stulsoft.pvertx.httpserverauth.auth.LdapAuth; import com.stulsoft.pvertx.httpserverauth.verticles.HttpServer2; import io.vertx.core.Verticle; import io.vertx.core.Vertx; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * @author Yuriy Stul * @since 5/2/2018 */ public class MainAuth { private final static Logger logger = LoggerFactory.getLogger(MainAuth.class); public static void main(String[] args) { logger.info("Started MainAuth"); Vertx vertx = Vertx.vertx(); Verticle httpServer = new HttpServer2(); logger.info("Deploying HttpServer"); vertx.deployVerticle(new AuthorizationProvider()); vertx.deployVerticle(new LdapAuth()); vertx.deployVerticle(httpServer); Terminator.terminate(vertx); logger.info("Stopped MainAuth"); } }
29.676471
81
0.729435
fbad75c83c91b0e30389326f0464bb55ebbf9b05
757
java
Java
lua-commons-web/lua-commons-web-core/src/main/java/org/lua/commons/webapi/json/JsonTools.java
mrkosterix/lua-commons
20b573728562d24c1b1904e9d07b963aafc0789c
[ "MIT" ]
1
2020-07-31T06:40:24.000Z
2020-07-31T06:40:24.000Z
lua-commons-web/lua-commons-web-core/src/main/java/org/lua/commons/webapi/json/JsonTools.java
mrkosterix/lua-commons
20b573728562d24c1b1904e9d07b963aafc0789c
[ "MIT" ]
null
null
null
lua-commons-web/lua-commons-web-core/src/main/java/org/lua/commons/webapi/json/JsonTools.java
mrkosterix/lua-commons
20b573728562d24c1b1904e9d07b963aafc0789c
[ "MIT" ]
null
null
null
package org.lua.commons.webapi.json; import org.lua.commons.baseapi.LuaThread; import org.lua.commons.baseapi.types.LuaObject; public class JsonTools { public static String toJson(LuaThread thread, LuaObject object) { return thread.lua.getExtension(JsonTypeCastManager.class).toJson( thread, object); } public static LuaObject toLua(LuaThread thread, String json) { return thread.lua.getExtension(JsonTypeCastManager.class).toLua(thread, json); } public static String array(String[] jsons) { StringBuilder builder = new StringBuilder(); builder.append('['); for (int i = 0; i < jsons.length; i++) { if (i > 0) builder.append(','); builder.append(jsons[i]); } builder.append(']'); return builder.toString(); } }
24.419355
73
0.712021
d2e7d53125a3131c7f22620b27bc0e7f0e49a9d0
1,552
php
PHP
src/Darryldecode/Backend/Components/User/routes.php
digideskio/backckendlara
2ef8fe396aaaa110cf0f6445f0e87281c6bdf275
[ "Apache-2.0" ]
null
null
null
src/Darryldecode/Backend/Components/User/routes.php
digideskio/backckendlara
2ef8fe396aaaa110cf0f6445f0e87281c6bdf275
[ "Apache-2.0" ]
null
null
null
src/Darryldecode/Backend/Components/User/routes.php
digideskio/backckendlara
2ef8fe396aaaa110cf0f6445f0e87281c6bdf275
[ "Apache-2.0" ]
null
null
null
<?php Route::group(array('prefix'=> 'users'), function() { Route::get('/', array( 'before' => array(), 'as' => 'backend.users', 'uses' => 'UserController@index' )); Route::get('/available_permissions', array( 'before' => array(), 'as' => 'backend.users.getAvailablePermissions', 'uses' => 'UserController@getAvailablePermissions' )); Route::post('/', array( 'before' => array(), 'as' => 'backend.users.postCreate', 'uses' => 'UserController@postCreate' )); Route::put('/{userId}', array( 'before' => array(), 'as' => 'backend.users.putUpdate', 'uses' => 'UserController@putUpdate' )); Route::delete('/{userId}', array( 'before' => array(), 'as' => 'backend.users.delete', 'uses' => 'UserController@delete' )); }); Route::group(array('prefix'=> 'groups'), function() { Route::get('/', array( 'before' => array(), 'as' => 'backend.groups', 'uses' => 'GroupController@index' )); Route::post('/', array( 'before' => array(), 'as' => 'backend.groups.postGroups', 'uses' => 'GroupController@postCreate' )); Route::put('/{groupId}', array( 'before' => array(), 'as' => 'backend.groups.putGroup', 'uses' => 'GroupController@putUpdate' )); Route::delete('/{groupId}', array( 'before' => array(), 'as' => 'backend.groups.delete', 'uses' => 'GroupController@delete' )); });
28.740741
58
0.511598
f7328a361e8d57ccccacd0eb273547db770bdae7
2,533
swift
Swift
iRemeber/Pods/Bits/Sources/Bits/Byte+Alphabet.swift
cclovett/iRemeberM
ca7ecf9aa2a20156c638e23e4859e10d9bd2bb54
[ "MIT" ]
32
2019-06-27T03:31:30.000Z
2022-02-26T23:03:05.000Z
iRemeber/Pods/Bits/Sources/Bits/Byte+Alphabet.swift
cclovett/iRemeberM
ca7ecf9aa2a20156c638e23e4859e10d9bd2bb54
[ "MIT" ]
8
2017-02-08T12:28:11.000Z
2018-02-01T18:46:22.000Z
iRemeber/Pods/Bits/Sources/Bits/Byte+Alphabet.swift
cclovett/iRemeberM
ca7ecf9aa2a20156c638e23e4859e10d9bd2bb54
[ "MIT" ]
8
2017-04-24T09:36:19.000Z
2017-11-18T15:12:06.000Z
extension Byte { /// A public static let A: Byte = 0x41 /// B public static let B: Byte = 0x42 /// C public static let C: Byte = 0x43 /// D public static let D: Byte = 0x44 /// E public static let E: Byte = 0x45 /// F public static let F: Byte = 0x46 /// F public static let G: Byte = 0x47 /// F public static let H: Byte = 0x48 /// F public static let I: Byte = 0x49 /// F public static let J: Byte = 0x4A /// F public static let K: Byte = 0x4B /// F public static let L: Byte = 0x4C /// F public static let M: Byte = 0x4D /// F public static let N: Byte = 0x4E /// F public static let O: Byte = 0x4F /// F public static let P: Byte = 0x50 /// F public static let Q: Byte = 0x51 /// F public static let R: Byte = 0x52 /// F public static let S: Byte = 0x53 /// F public static let T: Byte = 0x54 /// F public static let U: Byte = 0x55 /// F public static let V: Byte = 0x56 /// F public static let W: Byte = 0x57 /// F public static let X: Byte = 0x58 /// F public static let Y: Byte = 0x59 /// Z public static let Z: Byte = 0x5A } extension Byte { /// a public static let a: Byte = 0x61 /// b public static let b: Byte = 0x62 /// c public static let c: Byte = 0x63 /// d public static let d: Byte = 0x64 /// e public static let e: Byte = 0x65 /// f public static let f: Byte = 0x66 /// g public static let g: Byte = 0x67 /// h public static let h: Byte = 0x68 /// i public static let i: Byte = 0x69 /// j public static let j: Byte = 0x6A /// k public static let k: Byte = 0x6B /// l public static let l: Byte = 0x6C /// m public static let m: Byte = 0x6D /// n public static let n: Byte = 0x6E /// o public static let o: Byte = 0x6F /// p public static let p: Byte = 0x70 /// q public static let q: Byte = 0x71 /// r public static let r: Byte = 0x72 /// s public static let s: Byte = 0x73 /// t public static let t: Byte = 0x74 /// u public static let u: Byte = 0x75 /// v public static let v: Byte = 0x76 /// w public static let w: Byte = 0x77 /// x public static let x: Byte = 0x78 /// y public static let y: Byte = 0x79 /// z public static let z: Byte = 0x7A }
15.83125
36
0.52349
52ce12768412721d6738d2add13fb3fc64425deb
284
sql
SQL
tests/suites/0_stateless/06_0002_show_create_database.sql
l1ch40/databend
9694155616bfce8d685937f608447688917fe802
[ "Apache-2.0" ]
1,788
2021-03-23T12:44:33.000Z
2021-09-13T06:53:37.000Z
tests/suites/0_stateless/06_0002_show_create_database.sql
l1ch40/databend
9694155616bfce8d685937f608447688917fe802
[ "Apache-2.0" ]
1,438
2021-03-23T06:59:13.000Z
2021-09-13T06:48:06.000Z
tests/suites/0_stateless/06_0002_show_create_database.sql
l1ch40/databend
9694155616bfce8d685937f608447688917fe802
[ "Apache-2.0" ]
156
2021-03-23T08:52:45.000Z
2021-09-12T07:19:02.000Z
SHOW CREATE DATABASE `system`; DROP DATABASE IF EXISTS `test`; CREATE DATABASE `test`; SHOW CREATE DATABASE `test`; DROP DATABASE `test`; CREATE DATABASE `datafuselabs` ENGINE=github(token='xxx'); -- {ErrorCode 9001} SHOW CREATE DATABASE `datafuselabs`; DROP DATABASE `datafuselabs`;
31.555556
78
0.764085
09aad2c50835529cc9b5a40411b9b3200c954463
1,279
swift
Swift
CryptoTick/Classes/Networking/CoinCapAPI.swift
jimmya/CryptoTick
3fb7ec687d133ff1e7112273a5386d7cfab3bdf2
[ "MIT" ]
null
null
null
CryptoTick/Classes/Networking/CoinCapAPI.swift
jimmya/CryptoTick
3fb7ec687d133ff1e7112273a5386d7cfab3bdf2
[ "MIT" ]
null
null
null
CryptoTick/Classes/Networking/CoinCapAPI.swift
jimmya/CryptoTick
3fb7ec687d133ff1e7112273a5386d7cfab3bdf2
[ "MIT" ]
null
null
null
// // CoinCapAPI.swift // CryptoTick // // Created by Jimmy Arts on 29/05/2017. // Copyright © 2017 Jimmy Arts. All rights reserved. // import Foundation import Moya import RxSwift let coincapProvider = RxMoyaProvider<CoinCap>() public enum CoinCap { case getGlobal case getCoins case getFront case getHistory(coin: String) } extension CoinCap: TargetType { func request() -> Observable<Response> { return coincapProvider.request(self).filterSuccessfulStatusCodes() } public var baseURL: URL { return URL(string: "http://www.coincap.io")! } public var path: String { switch self { case .getGlobal: return "/global" case .getCoins: return "/coins" case .getFront: return "/front" case .getHistory(let coin): return "/history/1day/\(coin)" } } public var method: Moya.Method { return .get } public var parameters: [String: Any]? { return nil } public var parameterEncoding: ParameterEncoding { return URLEncoding.default } public var task: Task { return .request } public var sampleData: Data { return Data() } }
20.301587
76
0.590305
01644dbc37591c3280891978fdf50fc9872c129d
40,478
psm1
PowerShell
PISecurityAudit/Scripts/PISYSAUDIT/PISYSAUDITCHECKLIB2.psm1
JeromeLefebvre/PI-Security-Audit-Tools
0b430b0e5c873cfda8594fe90fa4bad5998878d9
[ "Apache-2.0" ]
null
null
null
PISecurityAudit/Scripts/PISYSAUDIT/PISYSAUDITCHECKLIB2.psm1
JeromeLefebvre/PI-Security-Audit-Tools
0b430b0e5c873cfda8594fe90fa4bad5998878d9
[ "Apache-2.0" ]
null
null
null
PISecurityAudit/Scripts/PISYSAUDIT/PISYSAUDITCHECKLIB2.psm1
JeromeLefebvre/PI-Security-Audit-Tools
0b430b0e5c873cfda8594fe90fa4bad5998878d9
[ "Apache-2.0" ]
1
2020-04-28T09:02:03.000Z
2020-04-28T09:02:03.000Z
# *********************************************************************** # Validation library # *********************************************************************** # * Modulename: PISYSAUDIT # * Filename: PISYSAUDITCHECKLIB2.psm1 # * Description: Validation rules for PI Data Archive. # * # * Copyright 2016 OSIsoft, LLC # * Licensed under the Apache License, Version 2.0 (the "License"); # * you may not use this file except in compliance with the License. # * You may obtain a copy of the License at # * # * <http://www.apache.org/licenses/LICENSE-2.0> # * # * Unless required by applicable law or agreed to in writing, software # * distributed under the License is distributed on an "AS IS" BASIS, # * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # * See the License for the specific language governing permissions and # * limitations under the License. # * # * Modifications copyright (C) <YYYY> <Name>, <Org> # * <Description of modification> # * # ************************************************************************ # Version History: # ------------------------------------------------------------------------ # Version 1.0.0.8 Initial release on OSIsoft Users Community. # Authors: Jim Davidson, Bryan Owen and Mathieu Hamel from OSIsoft. # # ************************************************************************ # ........................................................................ # Internal Functions # ........................................................................ function GetFunctionName { return (Get-Variable MyInvocation -Scope 1).Value.MyCommand.Name } # ........................................................................ # Public Functions # ........................................................................ function Get-PISysAudit_FunctionsFromLibrary2 { <# .SYNOPSIS Get functions from PI Data Archive library. #> # Form a list of all functions that need to be called to test # the PI Data Archive compliance. [System.Collections.HashTable]$listOfFunctions = @{} $listOfFunctions.Add("Get-PISysAudit_CheckPIServerDBSecurity_PIWorldReadAccess", 1) $listOfFunctions.Add("Get-PISysAudit_CheckPIServerSubSysVersions", 1) $listOfFunctions.Add("Get-PISysAudit_CheckPIAdminTrustsDisabled", 1) $listOfFunctions.Add("Get-PISysAudit_CheckEditDays", 1) $listOfFunctions.Add("Get-PISysAudit_CheckAutoTrustConfig", 1) $listOfFunctions.Add("Get-PISysAudit_CheckExpensiveQueryProtection", 1) $listOfFunctions.Add("Get-PISysAudit_CheckExplicitLoginDisabled",1) $listOfFunctions.Add("Get-PISysAudit_CheckPIAdminUsage",1) $listOfFunctions.Add("Get-PISysAudit_CheckPISPN",1) # Return the list. return $listOfFunctions } function Get-PISysAudit_CheckPIServerDBSecurity_PIWorldReadAccess { <# .SYNOPSIS AU20001 - PI Data Archive Table Security Check .DESCRIPTION VALIDATION: examines the database security of the PI Data Archive and flags any ACLs that contain access for PIWorld as weak. <br/> COMPLIANCE: remove PIWorld access from all database security ACLs. Note that prior removing PIWorld access, you need to evaluate which applications are relying on that access so that you can grant those applications access explicitly. #> [CmdletBinding(DefaultParameterSetName="Default", SupportsShouldProcess=$false)] param( [parameter(Mandatory=$true, Position=0, ParameterSetName = "Default")] [alias("at")] [System.Collections.HashTable] $AuditTable, [parameter(Mandatory=$false, ParameterSetName = "Default")] [alias("lc")] [boolean] $LocalComputer = $true, [parameter(Mandatory=$false, ParameterSetName = "Default")] [alias("rcn")] [string] $RemoteComputerName = "", [parameter(Mandatory=$false, ParameterSetName = "Default")] [alias("dbgl")] [int] $DBGLevel = 0) BEGIN {} PROCESS { # Get and store the function Name. $fn = GetFunctionName $msg = "" try { # Initialize objects. $securityWeaknessCounter = 0 $warningMessage = "" # Execute the PIConfig script. $outputFileContent = Invoke-PISysAudit_PIConfigScript -f "CheckPIWorldReadAccess.dif" ` -lc $LocalComputer -rcn $RemoteComputerName -dbgl $DBGLevel # Validate rules # Example of output. # PIAFLINK^piadmin: A(r,w) | piadmins: A(r,w) | PIWorld: A() # PIARCADMIN^piadmin: A(r,w) | piadmins: A(r,w) | PIWorld: A() # PIARCDATA^piadmin: A(r,w) | piadmins: A(r,w) | PIWorld: A() # ... # Read each line to find the one containing the token to replace. foreach($line in $outputFileContent) { # Skip line if not containing the delimiter. if($line.Contains("^")) { $securityWeakness = $false # Find the delimiter $position = $line.IndexOf("^") # Specific Database $length = $position $dbName = $line.SubString(0, $length) # Find the ACL $length = $line.Length - $position - 1 $acl = ($line.SubString($position + 1, $length)).ToLower() $process = $false # Perform the test on specific databases. Switch($dbName.ToLower()) { "pibatch" { $process = $true } "pibatchlegacy" { $process = $true } "picampaign" { $process = $true } "pidbsec" { $process = $true } "pids" { $process = $true } "piheadingsets" { $process = $true } "pimodules" { $process = $true } "pitransferrecords" { $process = $true } "piuser" { $process = $true } default { $process = $false } } if($process) { # Remove piadmin: A(r,w) from the ACL if($acl.Contains("piworld: a(r,w)")) { $securityWeakness = $true } elseif($acl.Contains("piworld: a(r)")) { $securityWeakness = $true } elseif($acl.Contains("piworld: a(w)")) { $securityWeakness = $true } } # Increment the counter if a weakness has been discovered. if($securityWeakness) { $securityWeaknessCounter++ if($securityWeaknessCounter -eq 1) { $warningMessage = $dbName } else { $warningMessage = $warningMessage + "; " + $dbName } } } } # Check if the counter is 0 = compliant, 1 or more it is not compliant if($securityWeaknessCounter -gt 0) { $result = $false if($securityWeaknessCounter -eq 1) { $warningMessage = "The following database presents a weakness: " + $warningMessage + "." } else { $warningMessage = "The following databases present weaknesses: " + $warningMessage + "." } } else { $result = $true $warningMessage = "No databases identified that present a weakness." } $msg = $warningMessage } catch { # Return the error message. $msg = "A problem occurred during the processing of the validation check." Write-PISysAudit_LogMessage $msg "Error" $fn -eo $_ $result = "N/A" } # Define the results in the audit table $AuditTable = New-PISysAuditObject -lc $LocalComputer -rcn $RemoteComputerName ` -at $AuditTable "AU20001" ` -ain "PI Data Archive Table Security" -aiv $result ` -msg $msg ` -Group1 "PI System" -Group2 "PI Data Archive" -Group3 "DB Security" ` -Severity "Moderate" } END {} #*************************** #End of exported function #*************************** } function Get-PISysAudit_CheckPIAdminTrustsDisabled { <# .SYNOPSIS AU20002 - PI Admin Trusts Disabled Check .DESCRIPTION VALIDATION: verifies that the piadmin PI User cannot be used in a PI Trust. <br/> COMPLIANCE: disable Trusts with piadmin. This can be done by checking "User cannot be used in a Trust" in the Properties menu for the piadmin PI User. To access this menu open use the Idenitities, Users, & Groups plugin in PI SMT, navigate to the PI User tab, right click the piadmin entry and select Properties in the context menu. #> [CmdletBinding(DefaultParameterSetName="Default", SupportsShouldProcess=$false)] param( [parameter(Mandatory=$true, Position=0, ParameterSetName = "Default")] [alias("at")] [System.Collections.HashTable] $AuditTable, [parameter(Mandatory=$false, ParameterSetName = "Default")] [alias("lc")] [boolean] $LocalComputer = $true, [parameter(Mandatory=$false, ParameterSetName = "Default")] [alias("rcn")] [string] $RemoteComputerName = "", [parameter(Mandatory=$false, ParameterSetName = "Default")] [alias("dbgl")] [int] $DBGLevel = 0) BEGIN {} PROCESS { # Get and store the function Name. $fn = GetFunctionName $msg = "" try { # Initialize objects. $securityValidationCounter = 0 $securityBits = 0 # Execute the PIConfig script. $outputFileContent = Invoke-PISysAudit_PIConfigScript -f "CheckPIAdminTrustsDisabled.dif" ` -lc $LocalComputer -rcn $RemoteComputerName -dbgl $DBGLevel # Validate rules # Example of output. # piadmin,24 # Read each line to find the one containing the token to replace. foreach($line in $outputFileContent) { # First line only. $tokens = $line.Split(",") $securityBits = [int16]$tokens[1] break } #Look for piadmin with identid=1 # Requires: # - explicit login disabled (bit5=16) # - deletion disabled (bit4=8) # - trust login disabled (bit3=4) if ( $securityBits -band 4 ) { $securityValidationCounter++ } if ( $securityBits -band 8 ) { $securityValidationCounter++ } if ( $securityBits -band 16 ) { $securityValidationCounter++ } # Check if the counter is 3 = compliant, 2 or less it is not compliant if($securityValidationCounter -eq 3) { $result = $true $msg = "The piadmin user cannot be assigned to a trust." } else { $result = $false $msg = "The piadmin user can be assigned to a trust." } } catch { # Return the error message. $msg = "A problem occurred during the processing of the validation check." Write-PISysAudit_LogMessage $msg "Error" $fn -eo $_ $result = "N/A" } #...................................... # Define the results in the audit table #...................................... $AuditTable = New-PISysAuditObject -lc $LocalComputer -rcn $RemoteComputerName ` -at $AuditTable "AU20002" ` -ain "PI Admin Trusts Disabled" -aiv $result ` -msg $msg ` -Group1 "PI System" -Group2 "PI Data Archive" ` -Severity "Severe" } END {} #*************************** #End of exported function #*************************** } function Get-PISysAudit_CheckPIServerSubSysVersions { <# .SYNOPSIS AU20003 - PI Data Archive SubSystem Version Check .DESCRIPTION VALIDATION: verifies that the PI Data Archive is using the most recent release. <br/> COMPLIANCE: upgrade the PI Data Archive to the latest version, PI Data Archive 2016 (3.4.400.1162). For more information, see the "Upgrade a PI Data Archive Server" section of the PI Data Archive Installation and Upgrade Guide, Live Library: <br/> <a href="https://livelibrary.osisoft.com/LiveLibrary/content/en/server-v7/GUID-0BDEB1F5-C72F-4865-91F7-F3D38A2975BD ">https://livelibrary.osisoft.com/LiveLibrary/content/en/server-v7/GUID-0BDEB1F5-C72F-4865-91F7-F3D38A2975BD </a> #> [CmdletBinding(DefaultParameterSetName="Default", SupportsShouldProcess=$false)] param( [parameter(Mandatory=$true, Position=0, ParameterSetName = "Default")] [alias("at")] [System.Collections.HashTable] $AuditTable, [parameter(Mandatory=$false, ParameterSetName = "Default")] [alias("lc")] [boolean] $LocalComputer = $true, [parameter(Mandatory=$false, ParameterSetName = "Default")] [alias("rcn")] [string] $RemoteComputerName = "", [parameter(Mandatory=$false, ParameterSetName = "Default")] [alias("dbgl")] [int] $DBGLevel = 0) BEGIN {} PROCESS { # Get and store the function Name. $fn = GetFunctionName $msg = "" $Severity = "Unknown" try { # Execute the piversion CLU. $outputFileContent = Invoke-PISysAudit_PIVersionCommand -lc $LocalComputer -rcn $RemoteComputerName -dbgl $DBGLevel # Validate rules # Example of output. # Installation version,3.4.390.16 # Installation binaries,64-bit # PI Build Name,390_Release_20120924.1 # -------------------------------- # C:\Program Files\PI\adm\apisnap.exe,Release Branch,3.4.390.16 # C:\Program Files\PI\adm\ipisql.exe,Release Branch,3.4.390.16 # ... # C:\Program Files\PI\bin\piaflink.exe,Release Branch,3.4.390.16 # C:\Program Files\PI\bin\pialarm.exe,Release Branch,3.4.390.16 # ... # Read each line to find the one containing the token to replace. $result = $false foreach($line in $OutputFileContent) { if($line.Contains("Installation version")) { $tokens = $line.Split(",") $installationVersion = $tokens[1] } } $result = $false $installVersionTokens = $installationVersion.Split(".") # Form an integer value with all the version tokens. [string]$temp = $InstallVersionTokens[0] + $installVersionTokens[1] + $installVersionTokens[2] + $installVersionTokens[3] $installVersionInt64 = [Convert]::ToInt64($temp) # Not compliant if under 3.4.380.36 version # Warn if 3.4.380.36 or 3.4.385.59 version $result = $true $upgradeMessage = "Upgrading to 3.4.400.1162 is recommended." if ($installVersionInt64 -ge 344001162) { $result = $true; $msg = "Version is compliant"; $Severity = "severe" } elseif ($installVersionInt64 -ge 3438036 -and $installVersionInt64 -lt 344001162 ) { $result = $false; $msg = $upgradeMessage; $Severity = "severe" } elseif ($installVersionInt64 -lt 3438036) { $result = $false; $msg = $upgradeMessage; $Severity = "critical" } } catch { # Return the error message. $msg = "A problem occurred during the processing of the validation check." Write-PISysAudit_LogMessage $msg "Error" $fn -eo $_ $result = "N/A" } # Define the results in the audit table $AuditTable = New-PISysAuditObject -lc $LocalComputer -rcn $RemoteComputerName ` -at $AuditTable "AU20003" ` -ain "PI Data Archive SubSystem Versions" -aiv $result ` -msg $msg ` -Group1 "PI System" -Group2 "PI Data Archive" -Group3 "PI Subsystems" ` -Severity $Severity } END {} #*************************** #End of exported function #*************************** } function Get-PISysAudit_CheckEditDays { <# .SYNOPSIS AU20004 - Check Edit Days .DESCRIPTION VALIDATION: verified that the Edit Days tuning parameter is set. <br/> COMPLIANCE: set to a value greater than zero. EditDays defines the number of past days where events can be modified in the Snapshot or Archive databases. A zero value means no time check is done. For instructions to set EditDays, see "Modify the EditDays tuning parameter" section in the PI Data Archive System Management Guide:<br/> <a href="https://livelibrary.osisoft.com/LiveLibrary/content/en/server-v7/GUID-0865CC31-BF8C-4347-B717-15071ED51399 ">https://livelibrary.osisoft.com/LiveLibrary/content/en/server-v7/GUID-0865CC31-BF8C-4347-B717-15071ED51399 </a> #> [CmdletBinding(DefaultParameterSetName="Default", SupportsShouldProcess=$false)] param( [parameter(Mandatory=$true, Position=0, ParameterSetName = "Default")] [alias("at")] [System.Collections.HashTable] $AuditTable, [parameter(Mandatory=$false, ParameterSetName = "Default")] [alias("lc")] [boolean] $LocalComputer = $true, [parameter(Mandatory=$false, ParameterSetName = "Default")] [alias("rcn")] [string] $RemoteComputerName = "", [parameter(Mandatory=$false, ParameterSetName = "Default")] [alias("dbgl")] [int] $DBGLevel = 0) BEGIN {} PROCESS { # Get and store the function Name. $fn = GetFunctionName $msg = "" try { # Execute the PIConfig script. $outputFileContent = Invoke-PISysAudit_PIConfigScript -f "CheckEditDays.dif" ` -lc $LocalComputer -rcn $RemoteComputerName -dbgl $DBGLevel # Validate rules # Example of output. # if the file is empty, it means it is configure to default value of 1 # otherwise the file would contain Autotrustconfig,<value> # Read each line to find the one containing the token to replace. $valueFound = $false if($null -ne $outputFileContent) { foreach($line in $outputFileContent) { # Skip line if not containing the value autotrustconfig. if($line.ToLower().Contains("editdays")) { # Set the flag. $valueFound = $true # Find the delimiter $tokens = $line.Split(",") if($tokens[1] -eq 0) { $result = $false $msg = "EditDays using non-compliant value of 0." } else { $result = $true $msg = "EditDays specified as a non-zero value." } break } } } # The default value is set to 0 which is not compliant. if($valueFound -eq $false) { $result = $false $msg = "EditDays not specified, using non-compliant default of 0." } } catch { # Return the error message. $msg = "A problem occurred during the processing of the validation check." Write-PISysAudit_LogMessage $msg "Error" $fn -eo $_ $result = "N/A" } # Define the results in the audit table $AuditTable = New-PISysAuditObject -lc $LocalComputer -rcn $RemoteComputerName ` -at $AuditTable "AU20004" ` -ain "Edit Days" -aiv $result ` -msg $msg ` -Group1 "PI System" -Group2 "PI Data Archive" ` -Severity "Severe" } END {} #*************************** #End of exported function #*************************** } function Get-PISysAudit_CheckAutoTrustConfig { <# .SYNOPSIS AU20005 - Auto Trust Configuration .DESCRIPTION VALIDATION: verifies that the autotrustconfig tuning parameter is set to create either no trusts or a trust for the loopback automatically (127.0.0.1). <br/> COMPLIANCE: set the autotrustconfig tuning parameter to a value of 0 (do not automatically create any PI Trust entries) or 1 (create the trust entry for the loopback IP address 127.0.0.1 only). #> [CmdletBinding(DefaultParameterSetName="Default", SupportsShouldProcess=$false)] param( [parameter(Mandatory=$true, Position=0, ParameterSetName = "Default")] [alias("at")] [System.Collections.HashTable] $AuditTable, [parameter(Mandatory=$false, ParameterSetName = "Default")] [alias("lc")] [boolean] $LocalComputer = $true, [parameter(Mandatory=$false, ParameterSetName = "Default")] [alias("rcn")] [string] $RemoteComputerName = "", [parameter(Mandatory=$false, ParameterSetName = "Default")] [alias("dbgl")] [int] $DBGLevel = 0) BEGIN {} PROCESS { # Get and store the function Name. $fn = GetFunctionName $msg = "" try { # Execute the PIConfig script. $outputFileContent = Invoke-PISysAudit_PIConfigScript -f "CheckAutoTrustConfig.dif" ` -lc $LocalComputer -rcn $RemoteComputerName -dbgl $DBGLevel # Validate rules # Example of output. # if the file is empty, it means it is configure to default value of 1 # otherwise the file would contain Autotrustconfig,<value> # Read each line to find the one containing the token to replace. $valueFound = $false if($null -ne $outputFileContent) { foreach($line in $outputFileContent) { # Skip line if not containing the value autotrustconfig. if($line.ToLower().Contains("autotrustconfig")) { # Set the flag. $valueFound = $true # Find the delimiter $tokens = $line.Split(",") # 0 - Do not automatically create any PI Trust entries. # 0x01 - Create the trust entry for the loopback IP address 127.0.0.1 # 0x02 - Create the trust entry for the "localhost" hostname # 0x04 - Create the trust entry for the IP address # 0x08 - Create the trust entry for the short hostname # 0x10 - Create the trust entry for the FQDN hostname # 0x1F - Create the old (pre 3.4.370.x) trust entries switch ($tokens[1]) { 0 { $description = "Does not automatically create any PI Trust entries."; break; } 1 { $description = "Creates the trust entry for the loopback IP address 127.0.0.1"; break; } 2 { $description = "Creates the trust entry for the `"localhost`" hostname"; break; } 4 { $description = "Creates the trust entry for the IP address"; break; } 8 { $description = "Creates the trust entry for the short hostname"; break; } 16 { $description = "Creates the trust entry for the FQDN hostname"; break; } 32 { $description = "Creates the old (pre 3.4.370.x) trust entries"; break; } default {$description = "Unknown configuration" } } if($tokens[1] -le 1) { $result = $true $msg = "Tuning parameter compliant: {0}" } else { $result = $false $msg = "Tuning parameter not compliant: {0}" } $msg = [string]::Format($msg, $description) break } } } # The default value is set to 1 which is compliant. if($valueFound -eq $false) { $result = $true $msg = "Tuning parameter compliant: Create the trust entry for the loopback IP address 127.0.0.1" } } catch { # Return the error message. $msg = "A problem occurred during the processing of the validation check." Write-PISysAudit_LogMessage $msg "Error" $fn -eo $_ $result = "N/A" } # Define the results in the audit table $AuditTable = New-PISysAuditObject -lc $LocalComputer -rcn $RemoteComputerName ` -at $AuditTable "AU20005" ` -ain "Auto Trust Configuration" -aiv $result ` -msg $msg ` -Group1 "PI System" -Group2 "PI Data Archive" -Group3 "Authentication" ` -Severity "Severe" } END {} #*************************** #End of exported function #*************************** } function Get-PISysAudit_CheckExpensiveQueryProtection { <# .SYNOPSIS AU20006 - Expensive Query Protection Check .DESCRIPTION VALIDATION: verify that the PI Data Archive has protection against expensive queries. <br/> COMPLIANCE: set the archive_maxqueryexecutionsec tuning parameter to a value between 60 and 300. For more information on this parameter and other that can protect against expensive queries, see the knowledgebase article 3224OSI8 <br/> <a href="https://techsupport.osisoft.com/Troubleshooting/KB/3224OSI8">https://techsupport.osisoft.com/Troubleshooting/KB/3224OSI8 </a> #> [CmdletBinding(DefaultParameterSetName="Default", SupportsShouldProcess=$false)] param( [parameter(Mandatory=$true, Position=0, ParameterSetName = "Default")] [alias("at")] [System.Collections.HashTable] $AuditTable, [parameter(Mandatory=$false, ParameterSetName = "Default")] [alias("lc")] [boolean] $LocalComputer = $true, [parameter(Mandatory=$false, ParameterSetName = "Default")] [alias("rcn")] [string] $RemoteComputerName = "", [parameter(Mandatory=$false, ParameterSetName = "Default")] [alias("dbgl")] [int] $DBGLevel = 0) BEGIN {} PROCESS { # Get and store the function Name. $fn = GetFunctionName $msg = "" try { # Initialize objects. $securityValidationCounter = 0 $securityBits = 0 # Execute the piversion CLU. $outputFileContent = Invoke-PISysAudit_PIVersionCommand -lc $LocalComputer -rcn $RemoteComputerName -dbgl $DBGLevel # Validate rules # Example of output. # Installation version,3.4.390.16 # Installation binaries,64-bit # PI Build Name,390_Release_20120924.1 # -------------------------------- # C:\Program Files\PI\adm\apisnap.exe,Release Branch,3.4.390.16 # C:\Program Files\PI\adm\ipisql.exe,Release Branch,3.4.390.16 # ... # C:\Program Files\PI\bin\piaflink.exe,Release Branch,3.4.390.16 # C:\Program Files\PI\bin\pialarm.exe,Release Branch,3.4.390.16 # ... # Read each line to find the one containing the token to replace. $result = $false foreach($line in $outputFileContent) { if($line.Contains("Installation version")) { $tokens = $line.Split(",") $installationVersion = $tokens[1] } } $installVersionTokens = $installationVersion.Split(".") # Form an integer value with all the version tokens. [string]$temp = $InstallVersionTokens[0] + $installVersionTokens[1] + $installVersionTokens[2] + $installVersionTokens[3] $installVersionInt64 = [Convert]::ToInt64($temp) # Execute the PIConfig script. $outputFileContent = Invoke-PISysAudit_PIConfigScript -f "CheckExpensiveQuery.dif" ` -lc $LocalComputer -rcn $RemoteComputerName -dbgl $DBGLevel # Validate rules # Example of output. # if the file is empty, it means it is configure to default value of 0 if the piarchss # is prior to (KB 3224OSI8) 3.4.390.x, otherwise it is set to 260. # otherwise the file would contain Archive_MaxQueryExecutionSec,<value> # Read each line to find the one containing the token to replace. $valueFound = $false if($null -ne $outputFileContent) { foreach($line in $outputFileContent) { if($line.ToLower().Contains("archive_maxqueryexecutionsec")) { # First line only. $tokens = $line.Split(",") $timeout = [int16]$tokens[1] $valueFound = $true break } } } # Default value for PI Data Archive prior to 3.4.390.16 was 0 # Check if the timeout setting is between 60 and 300. if(($valueFound -eq $false) -and ($installVersionInt64 -lt 3439016)) { $result = $false $msg = "Using the non-compliant default of 0." } elseif(($valueFound -eq $false) -and ($installVersionInt64 -ge 3439016)) { $result = $true $msg = "Using the compliant default of 260." } elseif($valueFound -and ($timeout -ge 60) -and ($timeout -le 300)) { $result = $true $msg = "Using a compliant value of {0}." $msg = [string]::Format($msg, $timeout) } else { $result = $false $msg = "Using a non-compliant value of {0}." $msg = [string]::Format($msg, $timeout) } } catch { # Return the error message. $msg = "A problem occurred during the processing of the validation check." Write-PISysAudit_LogMessage $msg "Error" $fn -eo $_ $result = "N/A" } #...................................... # Define the results in the audit table #...................................... $AuditTable = New-PISysAuditObject -lc $LocalComputer -rcn $RemoteComputerName ` -at $AuditTable "AU20006" ` -ain "Expensive Query Protection" -aiv $result ` -msg $msg ` -Group1 "PI System" -Group2 "PI Data Archive" -Group3 "PI Archive Subsystem" ` -Severity "Severe" } END {} #*************************** #End of exported function #*************************** } function Get-PISysAudit_CheckExplicitLoginDisabled { <# .SYNOPSIS AU20007 - Check if the explicit login is disabled .DESCRIPTION VALIDATION: verifies that explicit login is disabled as an authentication protocol. <br/> COMPLIANCE: set the tuning parameter Server_AuthenticationPolicy to a value greater than 3. This is equivalent to the third notch, "Disable explicit login", or higher on the Security Settings plugin in PI SMT. For more information, see "Security Best Practice #2" and "Security Best Practice #3" in KB00833. <br/> <a href="https://techsupport.osisoft.com/Troubleshooting/KB/KB00833">https://techsupport.osisoft.com/Troubleshooting/KB/KB00833 </a> #> [CmdletBinding(DefaultParameterSetName="Default", SupportsShouldProcess=$false)] param( [parameter(Mandatory=$true, Position=0, ParameterSetName = "Default")] [alias("at")] [System.Collections.HashTable] $AuditTable, [parameter(Mandatory=$false, ParameterSetName = "Default")] [alias("lc")] [boolean] $LocalComputer = $true, [parameter(Mandatory=$false, ParameterSetName = "Default")] [alias("rcn")] [string] $RemoteComputerName = "", [parameter(Mandatory=$false, ParameterSetName = "Default")] [alias("dbgl")] [int] $DBGLevel = 0) BEGIN {} PROCESS { # Get and store the function Name. $fn = GetFunctionName $msg = "" try { # Execute the PIConfig script. $outputFileContent = Invoke-PISysAudit_PIConfigScript -f "CheckPIServerAuthPolicy.dif" ` -lc $LocalComputer -rcn $RemoteComputerName -dbgl $DBGLevel # Validate rules $ServerAuthPolicy = $outputFileContent[0] switch ($ServerAuthPolicy) { 0 { $description = "All authentication options enabled."; break; } 2 { $description = "Explicit logins for users with blank passwords disabled."; break; } 3 { $description = "Explicit logins disabled."; break; } 19 { $description = "Explicit logins and SDK Trusts disabled."; break; } 51 { $description = "All trusts and explicit login disabled."; break; } default {$description = "Unrecognized configuration" } } $msgPolicy ="" if($ServerAuthPolicy -lt 3) { $result = $false $msgPolicy = "Using non-compliant policy:" } else { $result = $true $msgPolicy = "Using compliant policy:" } $msg = [string]::Format("{0} {1}", $msgPolicy,$description) } catch { # Return the error message. $msg = "A problem occurred during the processing of the validation check." Write-PISysAudit_LogMessage $msg "Error" $fn -eo $_ $result = "N/A" } # Define the results in the audit table $AuditTable = New-PISysAuditObject -lc $LocalComputer -rcn $RemoteComputerName ` -at $AuditTable "AU20007" ` -ain "Explicit login disabled" -aiv $result ` -msg $msg ` -Group1 "PI System" -Group2 "PI Data Archive" ` -Severity "Severe" } END {} #*************************** #End of exported function #*************************** } function Get-PISysAudit_CheckPIAdminUsage { <# .SYNOPSIS AU20008 - Check if piadmin is not used .DESCRIPTION VALIDATION: verifies that piadmin is not used in trusts or mappings. <br/> COMPLIANCE: replace any trusts or mappings that use piadmin with a mapping or trust to a PI Identity with appropriate privilege for the applications that will use it. For more information, see "Security Best Practice" #4 in KB00833: <br/> <a href="https://techsupport.osisoft.com/Troubleshooting/KB/KB00833 ">https://techsupport.osisoft.com/Troubleshooting/KB/KB00833 </a> #> [CmdletBinding(DefaultParameterSetName="Default", SupportsShouldProcess=$false)] param( [parameter(Mandatory=$true, Position=0, ParameterSetName = "Default")] [alias("at")] [System.Collections.HashTable] $AuditTable, [parameter(Mandatory=$false, ParameterSetName = "Default")] [alias("lc")] [boolean] $LocalComputer = $true, [parameter(Mandatory=$false, ParameterSetName = "Default")] [alias("rcn")] [string] $RemoteComputerName = "", [parameter(Mandatory=$false, ParameterSetName = "Default")] [alias("dbgl")] [int] $DBGLevel = 0) BEGIN {} PROCESS { # Get and store the function Name. $fn = GetFunctionName $msg = "" try { # Execute the PIConfig scripts. $noncompliantTrusts = Invoke-PISysAudit_PIConfigScript -f "CheckPIAdminUsageInTrusts.dif" ` -lc $LocalComputer -rcn $RemoteComputerName -dbgl $DBGLevel $noncompliantMappings = Invoke-PISysAudit_PIConfigScript -f "CheckPIAdminUsageInMappings.dif" ` -lc $LocalComputer -rcn $RemoteComputerName -dbgl $DBGLevel $result = $true #Iterate through the returned results (is any) and append ; delimiter for the output message. if($noncompliantTrusts){ $noncompliantTrusts = $noncompliantTrusts | ForEach-Object {$_ + ';'} $result = $false $msg = "Trust(s) that present weaknesses: " + $noncompliantTrusts + ".`n" } if($noncompliantMappings){ $noncompliantMappings = $noncompliantMappings | ForEach-Object {$_ + ';'} $result = $false $msg += "Mappings(s) that present weaknesses: " + $noncompliantMappings } if($result -eq $true){ $msg = "No Trust(s) or Mapping(s) identified as weaknesses." } } catch { # Return the error message. $msg = "A problem occurred during the processing of the validation check." Write-PISysAudit_LogMessage $msg "Error" $fn -eo $_ $result = "N/A" } # Define the results in the audit table $AuditTable = New-PISysAuditObject -lc $LocalComputer -rcn $RemoteComputerName ` -at $AuditTable "AU20008" ` -ain "piadmin is not used" -aiv $result ` -msg $msg ` -Group1 "PI System" -Group2 "PI Data Archive" ` -Severity "Severe" } END {} #*************************** #End of exported function #*************************** } function Get-PISysAudit_CheckPISPN { <# .SYNOPSIS AU20009 - Check PI Server SPN .DESCRIPTION VALIDATION: Checks PI Data Archive SPN assignment.<br/> COMPLIANCE: PI Data Archive SPNs exist and are assigned to the account running pinetmgr. Presently only local system is supported. Correct SPN assignment makes Kerberos Authentication possible. For more information, see "PI and Kerberos authentication" in the PI Live Library. <br/> <a href="https://livelibrary.osisoft.com/LiveLibrary/content/en/server-v7/GUID-531FFEC4-9BBB-4CA0-9CE7-7434B21EA06D">https://livelibrary.osisoft.com/LiveLibrary/content/en/server-v7/GUID-531FFEC4-9BBB-4CA0-9CE7-7434B21EA06D </a> #> [CmdletBinding(DefaultParameterSetName="Default", SupportsShouldProcess=$false)] param( [parameter(Mandatory=$true, Position=0, ParameterSetName = "Default")] [alias("at")] [System.Collections.HashTable] $AuditTable, [parameter(Mandatory=$false, ParameterSetName = "Default")] [alias("lc")] [boolean] $LocalComputer = $true, [parameter(Mandatory=$false, ParameterSetName = "Default")] [alias("rcn")] [string] $RemoteComputerName = "", [parameter(Mandatory=$false, ParameterSetName = "Default")] [alias("dbgl")] [int] $DBGLevel = 0) BEGIN {} PROCESS { # Get and store the function Name. $fn = GetFunctionName $msg = "" try { $serviceType = "piserver" $serviceName = "pinetmgr" $result = Invoke-PISysAudit_SPN -svctype $serviceType -svcname $serviceName -lc $LocalComputer -rcn $RemoteComputerName -dbgl $DBGLevel If ($result) { $msg = "The Service Principal Name exists and it is assigned to the correct Service Account." } Else { $msg = "The Service Principal Name does NOT exist or is NOT assigned to the correct Service Account." } } catch { # Return the error message. $msg = "A problem occurred during the processing of the validation check." Write-PISysAudit_LogMessage $msg "Error" $fn -eo $_ $result = "N/A" } # Define the results in the audit table $AuditTable = New-PISysAuditObject -lc $LocalComputer -rcn $RemoteComputerName ` -at $AuditTable "AU20009" ` -ain "PI Data Archive SPN Check" -aiv $result ` -msg $msg ` -Group1 "PI System" -Group2 "PI Data Archive"` -Severity "Moderate" } END {} #*************************** #End of exported function #*************************** } function Get-PISysAudit_CheckTrusts { <# .SYNOPSIS AU20010 - Trust configuration strength .DESCRIPTION Audit ID: AU20010 Audit Check Name: Trust configuration strength Category: Severe Compliance: Any existing trusts should be only for PI API connections. These trusts should at a minimum be 2+ (app name specified). Warnings for open trusts. #> [CmdletBinding(DefaultParameterSetName="Default", SupportsShouldProcess=$false)] param( [parameter(Mandatory=$true, Position=0, ParameterSetName = "Default")] [alias("at")] [System.Collections.HashTable] $AuditTable, [parameter(Mandatory=$false, ParameterSetName = "Default")] [alias("lc")] [boolean] $LocalComputer = $true, [parameter(Mandatory=$false, ParameterSetName = "Default")] [alias("rcn")] [string] $RemoteComputerName = "", [parameter(Mandatory=$false, ParameterSetName = "Default")] [alias("dbgl")] [int] $DBGLevel = 0) BEGIN {} PROCESS { # Get and store the function Name. $fn = GetFunctionName $msg = "" try { # Execute the PIConfig scripts. } catch { # Return the error message. $msg = "A problem occurred during the processing of the validation check." Write-PISysAudit_LogMessage $msg "Error" $fn -eo $_ $result = "N/A" } # Define the results in the audit table $AuditTable = New-PISysAuditObject -lc $LocalComputer -rcn $RemoteComputerName ` -at $AuditTable "AU20010" ` -ain "Trust configuration strength" -aiv $result ` -msg $msg ` -Group1 "PI System" -Group2 "PI Data Archive" ` -Severity "Severe" } END {} #*************************** #End of exported function #*************************** } # ........................................................................ # Add your cmdlet after this section. Don't forget to add an intruction # to export them at the bottom of this script. # ........................................................................ function Get-PISysAudit_TemplateAU2xxxx { <# .SYNOPSIS AU2xxxx - <Name> .DESCRIPTION VALIDATION: <Enter what the verification checks> COMPLIANCE: <Enter what it needs to be compliant> #> [CmdletBinding(DefaultParameterSetName="Default", SupportsShouldProcess=$false)] param( [parameter(Mandatory=$true, Position=0, ParameterSetName = "Default")] [alias("at")] [System.Collections.HashTable] $AuditTable, [parameter(Mandatory=$false, ParameterSetName = "Default")] [alias("lc")] [boolean] $LocalComputer = $true, [parameter(Mandatory=$false, ParameterSetName = "Default")] [alias("rcn")] [string] $RemoteComputerName = "", [parameter(Mandatory=$false, ParameterSetName = "Default")] [alias("dbgl")] [int] $DBGLevel = 0) BEGIN {} PROCESS { # Get and store the function Name. $fn = GetFunctionName $msg = "" try { # Enter routine. } catch { # Return the error message. $msg = "A problem occurred during the processing of the validation check." Write-PISysAudit_LogMessage $msg "Error" $fn -eo $_ $result = "N/A" } # Define the results in the audit table $AuditTable = New-PISysAuditObject -lc $LocalComputer -rcn $RemoteComputerName ` -at $AuditTable "AU2xxxx" ` -ain "<Name>" -aiv $result ` -msg $msg ` -Group1 "<Category 1>" -Group2 "<Category 2>" -Group3 "<Category 3>" -Group4 "<Category 4>"` -Severity "<Severity>" } END {} #*************************** #End of exported function #*************************** } # ........................................................................ # Export Module Member # ........................................................................ # <Do not remove> Export-ModuleMember Get-PISysAudit_FunctionsFromLibrary2 Export-ModuleMember Get-PISysAudit_CheckPIAdminTrustsDisabled Export-ModuleMember Get-PISysAudit_CheckPIServerSubSysVersions Export-ModuleMember Get-PISysAudit_CheckPIServerDBSecurity_PIWorldReadAccess Export-ModuleMember Get-PISysAudit_CheckEditDays Export-ModuleMember Get-PISysAudit_CheckAutoTrustConfig Export-ModuleMember Get-PISysAudit_CheckExpensiveQueryProtection Export-ModuleMember Get-PISysAudit_CheckExplicitLoginDisabled Export-ModuleMember Get-PISysAudit_CheckPIAdminUsage Export-ModuleMember Get-PISysAudit_CheckPISPN # </Do not remove> # ........................................................................ # Add your new Export-ModuleMember instruction after this section. # Replace the Get-PISysAudit_TemplateAU2xxxx with the name of your # function. # ........................................................................ # Export-ModuleMember Get-PISysAudit_TemplateAU2xxxx
32.908943
229
0.635827
034b8aca49165fa5b43d2ea4d62333af760cac00
370
kt
Kotlin
app/src/test/java/com/hewking/develop/basics/TestStaticFunc.kt
hewking/AndroidDeveloper
1c562a7d9cb97b93990353e13ee8ba33ca2f4d33
[ "MIT" ]
null
null
null
app/src/test/java/com/hewking/develop/basics/TestStaticFunc.kt
hewking/AndroidDeveloper
1c562a7d9cb97b93990353e13ee8ba33ca2f4d33
[ "MIT" ]
1
2020-03-06T08:29:53.000Z
2020-03-06T08:29:53.000Z
app/src/test/java/com/hewking/develop/basics/TestStaticFunc.kt
hewking/AndroidDeveloper
1c562a7d9cb97b93990353e13ee8ba33ca2f4d33
[ "MIT" ]
null
null
null
package com.hewking.develop.basics /** * @author: jianhao * @create: 2020/7/8 * @description: */ class TestStaticFunc { companion object{ /** * 会使用静态方法 */ @JvmStatic fun test(){ } /** * 被静态初始化的Companion对象的 方法 */ fun bar(){ } } }
12.333333
35
0.405405
39f8c8276569a966a58f5e28c21e7f0006f4721f
793
java
Java
src/ContaPoupanca.java
andersonlop/Herancas
e7ad4087375d684aa82179a7c0cac9cb72ef609b
[ "MIT" ]
null
null
null
src/ContaPoupanca.java
andersonlop/Herancas
e7ad4087375d684aa82179a7c0cac9cb72ef609b
[ "MIT" ]
null
null
null
src/ContaPoupanca.java
andersonlop/Herancas
e7ad4087375d684aa82179a7c0cac9cb72ef609b
[ "MIT" ]
null
null
null
public class ContaPoupanca extends Conta{ private int diaAniversario; private double taxaDejuros; public ContaPoupanca(int numero, int agencia, String banco, double saldo, int diaAniversario, double taxaDejuros) { super(numero, agencia, banco, saldo); this.diaAniversario = diaAniversario; this.taxaDejuros = taxaDejuros; } public double getSaldo() { return this.saldo + this.taxaDejuros*this.saldo; } public boolean sacar(double quantia) { this.saldo -= quantia; return true; } @Override public String toString() { return super.toString() + "ContaPoupanca{" + "diaAniversario=" + diaAniversario + ", taxaDejuros=" + taxaDejuros + '}'; } }
27.344828
119
0.617907
fb8feb24e2f87fa4b4b9472ff1b1a1e86d88199a
17,170
java
Java
org.afplib/src/main/java/org/afplib/base/impl/BasePackageImpl.java
moritzfl/afplib
7f36a87a07707d90becfc5d54500652d0fcf9afb
[ "Apache-2.0" ]
36
2016-07-11T16:09:36.000Z
2022-02-09T15:35:59.000Z
org.afplib/src/main/java/org/afplib/base/impl/BasePackageImpl.java
moritzfl/afplib
7f36a87a07707d90becfc5d54500652d0fcf9afb
[ "Apache-2.0" ]
55
2017-01-17T14:30:42.000Z
2022-03-24T11:02:17.000Z
org.afplib/src/main/java/org/afplib/base/impl/BasePackageImpl.java
moritzfl/afplib
7f36a87a07707d90becfc5d54500652d0fcf9afb
[ "Apache-2.0" ]
22
2016-03-03T09:28:27.000Z
2022-02-24T12:31:17.000Z
/** */ package org.afplib.base.impl; import java.nio.charset.Charset; import org.afplib.afplib.AfplibPackage; import org.afplib.afplib.impl.AfplibPackageImpl; import org.afplib.base.BaseFactory; import org.afplib.base.BasePackage; import org.afplib.base.SFGrouper; import org.afplib.base.Triplet; import org.afplib.base.util.BaseValidator; import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EDataType; import org.eclipse.emf.ecore.EOperation; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EReference; import org.eclipse.emf.ecore.EValidator; import org.eclipse.emf.ecore.impl.EPackageImpl; /** * <!-- begin-user-doc --> * An implementation of the model <b>Package</b>. * <!-- end-user-doc --> * @generated */ public class BasePackageImpl extends EPackageImpl implements BasePackage { /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass afpEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass sfEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass unknsfEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass sfGrouperEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EClass tripletEClass = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EDataType modcaStringEDataType = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EDataType modcaString4EDataType = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EDataType modcaString8EDataType = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EDataType modcaString32EDataType = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private EDataType charsetEDataType = null; /** * Creates an instance of the model <b>Package</b>, registered with * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package * package URI value. * <p>Note: the correct way to create the package is via the static * factory method {@link #init init()}, which also performs * initialization of the package, or returns the registered package, * if one already exists. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see org.eclipse.emf.ecore.EPackage.Registry * @see org.afplib.base.BasePackage#eNS_URI * @see #init() * @generated */ private BasePackageImpl() { super(eNS_URI, BaseFactory.eINSTANCE); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private static boolean isInited = false; /** * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends. * * <p>This method is used to initialize {@link BasePackage#eINSTANCE} when that field is accessed. * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #eNS_URI * @see #createPackageContents() * @see #initializePackageContents() * @generated */ public static BasePackage init() { if (isInited) return (BasePackage)EPackage.Registry.INSTANCE.getEPackage(BasePackage.eNS_URI); // Obtain or create and register package BasePackageImpl theBasePackage = (BasePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof BasePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new BasePackageImpl()); isInited = true; // Obtain or create and register interdependencies AfplibPackageImpl theAfplibPackage = (AfplibPackageImpl)(EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI) instanceof AfplibPackageImpl ? EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI) : AfplibPackage.eINSTANCE); // Load packages theAfplibPackage.loadPackage(); // Create package meta-data objects theBasePackage.createPackageContents(); // Initialize created meta-data theBasePackage.initializePackageContents(); // Fix loaded packages theAfplibPackage.fixPackageContents(); // Register package validator EValidator.Registry.INSTANCE.put (theBasePackage, new EValidator.Descriptor() { public EValidator getEValidator() { return BaseValidator.INSTANCE; } }); // Mark meta-data to indicate it can't be changed theBasePackage.freeze(); // Update the registry and return the package EPackage.Registry.INSTANCE.put(BasePackage.eNS_URI, theBasePackage); return theBasePackage; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getAFP() { return afpEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getAFP_StructuredFields() { return (EReference)afpEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getSF() { return sfEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getSF_Number() { return (EAttribute)sfEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getSF_Offset() { return (EAttribute)sfEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getSF_Id() { return (EAttribute)sfEClass.getEStructuralFeatures().get(2); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getSF_Length() { return (EAttribute)sfEClass.getEStructuralFeatures().get(3); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EReference getSF_Children() { return (EReference)sfEClass.getEStructuralFeatures().get(4); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getSF_RawData() { return (EAttribute)sfEClass.getEStructuralFeatures().get(5); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getSF_Charset() { return (EAttribute)sfEClass.getEStructuralFeatures().get(6); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getUNKNSF() { return unknsfEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getSFGrouper() { return sfGrouperEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EClass getTriplet() { return tripletEClass; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getTriplet_Label() { return (EAttribute)tripletEClass.getEStructuralFeatures().get(0); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getTriplet_Charset() { return (EAttribute)tripletEClass.getEStructuralFeatures().get(1); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getTriplet_FileOffset() { return (EAttribute)tripletEClass.getEStructuralFeatures().get(2); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getTriplet_TripletLength() { return (EAttribute)tripletEClass.getEStructuralFeatures().get(3); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getTriplet_TripletId() { return (EAttribute)tripletEClass.getEStructuralFeatures().get(4); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EAttribute getTriplet_TripletNumber() { return (EAttribute)tripletEClass.getEStructuralFeatures().get(5); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EDataType getModcaString() { return modcaStringEDataType; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EDataType getModcaString4() { return modcaString4EDataType; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EDataType getModcaString8() { return modcaString8EDataType; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EDataType getModcaString32() { return modcaString32EDataType; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EDataType getCharset() { return charsetEDataType; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public BaseFactory getBaseFactory() { return (BaseFactory)getEFactoryInstance(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private boolean isCreated = false; /** * Creates the meta-model objects for the package. This method is * guarded to have no affect on any invocation but its first. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void createPackageContents() { if (isCreated) return; isCreated = true; // Create classes and their features afpEClass = createEClass(AFP); createEReference(afpEClass, AFP__STRUCTURED_FIELDS); sfEClass = createEClass(SF); createEAttribute(sfEClass, SF__NUMBER); createEAttribute(sfEClass, SF__OFFSET); createEAttribute(sfEClass, SF__ID); createEAttribute(sfEClass, SF__LENGTH); createEReference(sfEClass, SF__CHILDREN); createEAttribute(sfEClass, SF__RAW_DATA); createEAttribute(sfEClass, SF__CHARSET); unknsfEClass = createEClass(UNKNSF); sfGrouperEClass = createEClass(SF_GROUPER); tripletEClass = createEClass(TRIPLET); createEAttribute(tripletEClass, TRIPLET__LABEL); createEAttribute(tripletEClass, TRIPLET__CHARSET); createEAttribute(tripletEClass, TRIPLET__FILE_OFFSET); createEAttribute(tripletEClass, TRIPLET__TRIPLET_LENGTH); createEAttribute(tripletEClass, TRIPLET__TRIPLET_ID); createEAttribute(tripletEClass, TRIPLET__TRIPLET_NUMBER); // Create data types modcaStringEDataType = createEDataType(MODCA_STRING); modcaString4EDataType = createEDataType(MODCA_STRING4); modcaString8EDataType = createEDataType(MODCA_STRING8); modcaString32EDataType = createEDataType(MODCA_STRING32); charsetEDataType = createEDataType(CHARSET); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ private boolean isInitialized = false; /** * Complete the initialization of the package and its meta-model. This * method is guarded to have no affect on any invocation but its first. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void initializePackageContents() { if (isInitialized) return; isInitialized = true; // Initialize package setName(eNAME); setNsPrefix(eNS_PREFIX); setNsURI(eNS_URI); // Create type parameters // Set bounds for type parameters // Add supertypes to classes unknsfEClass.getESuperTypes().add(this.getSF()); sfGrouperEClass.getESuperTypes().add(this.getSF()); // Initialize classes and features; add operations and parameters initEClass(afpEClass, org.afplib.base.AFP.class, "AFP", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getAFP_StructuredFields(), this.getSF(), null, "structuredFields", null, 0, -1, org.afplib.base.AFP.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(sfEClass, org.afplib.base.SF.class, "SF", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getSF_Number(), ecorePackage.getELong(), "number", null, 0, 1, org.afplib.base.SF.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getSF_Offset(), ecorePackage.getELong(), "offset", null, 0, 1, org.afplib.base.SF.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getSF_Id(), ecorePackage.getEInt(), "id", null, 0, 1, org.afplib.base.SF.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getSF_Length(), ecorePackage.getEInt(), "length", null, 0, 1, org.afplib.base.SF.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getSF_Children(), this.getSF(), null, "children", null, 0, -1, org.afplib.base.SF.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getSF_RawData(), ecorePackage.getEByteArray(), "rawData", null, 0, 1, org.afplib.base.SF.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getSF_Charset(), this.getCharset(), "charset", null, 0, 1, org.afplib.base.SF.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); addEOperation(sfEClass, ecorePackage.getEBoolean(), "isBegin", 0, 1, IS_UNIQUE, IS_ORDERED); addEOperation(sfEClass, ecorePackage.getEBoolean(), "isEnd", 0, 1, IS_UNIQUE, IS_ORDERED); EOperation op = addEOperation(sfEClass, ecorePackage.getEBoolean(), "isDefault", 0, 1, IS_UNIQUE, IS_ORDERED); addEParameter(op, ecorePackage.getEString(), "value", 0, 1, IS_UNIQUE, IS_ORDERED); initEClass(unknsfEClass, org.afplib.base.UNKNSF.class, "UNKNSF", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(sfGrouperEClass, SFGrouper.class, "SFGrouper", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEClass(tripletEClass, Triplet.class, "Triplet", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEAttribute(getTriplet_Label(), ecorePackage.getEString(), "label", null, 0, 1, Triplet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getTriplet_Charset(), this.getCharset(), "charset", null, 0, 1, Triplet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getTriplet_FileOffset(), ecorePackage.getELong(), "fileOffset", null, 0, 1, Triplet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getTriplet_TripletLength(), ecorePackage.getEInt(), "tripletLength", null, 0, 1, Triplet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getTriplet_TripletId(), ecorePackage.getEInt(), "tripletId", null, 0, 1, Triplet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getTriplet_TripletNumber(), ecorePackage.getEInt(), "tripletNumber", null, 0, 1, Triplet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); // Initialize data types initEDataType(modcaStringEDataType, String.class, "ModcaString", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); initEDataType(modcaString4EDataType, String.class, "ModcaString4", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); initEDataType(modcaString8EDataType, String.class, "ModcaString8", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); initEDataType(modcaString32EDataType, String.class, "ModcaString32", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); initEDataType(charsetEDataType, Charset.class, "Charset", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS); // Create resource createResource(eNS_URI); // Create annotations // http:///org/eclipse/emf/ecore/util/ExtendedMetaData createExtendedMetaDataAnnotations(); } /** * Initializes the annotations for <b>http:///org/eclipse/emf/ecore/util/ExtendedMetaData</b>. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected void createExtendedMetaDataAnnotations() { String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData"; addAnnotation (modcaString4EDataType, source, new String[] { "name", "ModcaString4", "baseType", "java.lang.String", "minLength", "4", "maxLength", "4" }); addAnnotation (modcaString8EDataType, source, new String[] { "name", "ModcaString8", "baseType", "java.lang.String", "minLength", "8", "maxLength", "8" }); addAnnotation (modcaString32EDataType, source, new String[] { "name", "ModcaString32", "baseType", "java.lang.String", "minLength", "32", "maxLength", "32" }); } } //BasePackageImpl
29.809028
254
0.689575
15d93fd6c77e1e815dfbcd20ae3a733b5fa3c28f
1,121
rb
Ruby
lib/naive_bayes.rb
sisodiaa/naive_bayes
cb0c771afd74a57f12266f3d879733dcbd978e39
[ "MIT" ]
null
null
null
lib/naive_bayes.rb
sisodiaa/naive_bayes
cb0c771afd74a57f12266f3d879733dcbd978e39
[ "MIT" ]
null
null
null
lib/naive_bayes.rb
sisodiaa/naive_bayes
cb0c771afd74a57f12266f3d879733dcbd978e39
[ "MIT" ]
null
null
null
require 'naive_bayes/version' require 'naive_bayes/dataset' require 'naive_bayes/text_classifier' # Classifier module NaiveBayes def self.classifier(dataset:, delimiter:, percent:, categories:, text:) # Load data from CSV and split it into training and testing dataset data = Dataset.load_data(dataset, delimiter) training_data, test_data = Dataset.split(data, percent) # Initiate a naive bayes text classifier object with classes text_classifier = TextClassifier.new(categories) # Train naive bayes text classifier text_classifier.train_data(training_data) # Test naive bayes text classifier accuracy = text_classifier.test_data(test_data) # Predict class for given text prediction = text_classifier.predict(text) print_data(training_data.size, test_data.size, accuracy, prediction) end def self.print_data(train_size, test_size, accuracy, prediction) puts "Training Dataset Size: #{train_size}" puts "Test Dataset Size: #{test_size}" puts "Accuracy on test dataset: #{(accuracy * 100).round(2)}%" puts "Category: #{prediction}\n\n" end end
32.970588
73
0.743979
e9d23e4b83ce58a89a67fde0a11c04df75470c79
5,086
go
Go
geopattern/pattern/pattern.go
mrcook/svgtoolkit
a5570de81bc304ac6218156fc0c9c56259bf3474
[ "MIT" ]
null
null
null
geopattern/pattern/pattern.go
mrcook/svgtoolkit
a5570de81bc304ac6218156fc0c9c56259bf3474
[ "MIT" ]
null
null
null
geopattern/pattern/pattern.go
mrcook/svgtoolkit
a5570de81bc304ac6218156fc0c9c56259bf3474
[ "MIT" ]
null
null
null
// Package pattern is used to generate various geo patterns. // // pat := pattern.New(400, 400, "The Pattern Package", canvas) // pat.Generate() // // Then add additional elements to the svg.Canvas as needed. package pattern import ( "fmt" "io" "github.com/mrcook/svgtoolkit/geopattern/colour" "github.com/mrcook/svgtoolkit/geopattern/seed" "github.com/mrcook/svgtoolkit/svg" ) const defaultBackgroundColour = "#933c3c" // Pattern represents a pattern state. It should be populated with the required // packages for correct usage. It requires a svg.Canvas upon which to write the // SVG shapes, along with basic colour and styling configuration. type Pattern struct { X int // Horizontal Position Y int // Vertical Position Width int // Width of the pattern canvas Height int // Height of the pattern canvas Seed *seed.Seed // Seed is used for select one of the generators. BaseColour *colour.Colour // Base colour for the pattern. Styles *StylePreset // A set of styles for the pattern. Generators []GeneratorType // A list of generators to choose from. Svg *svg.Canvas // SVG document to write to. } // New returns a Pattern instance where the settings, such as colour, generator // list, etc., are given a set of sensible defaults. The seed can be any string, // such as a name. func New(width, height int, seedValue string, image io.Writer) (*Pattern, error) { if seedValue == "" { return nil, fmt.Errorf("seed string required") } // tessellation requires at least 100 if width < 100 || height < 100 { return nil, fmt.Errorf("both width and height must be >= 100") } bgColour, _ := colour.NewWithSeed(defaultBackgroundColour, seedValue) pattern := &Pattern{ Width: width, Height: height, Seed: seed.New(seedValue), BaseColour: bgColour, Styles: DefaultStylePresets(), Generators: DefaultGenerators, Svg: svg.New(width, height, image), } return pattern, nil } // Generate is the function which produces a coloured geo pattern. // // Before executing this will check that all dependencies are satisfied. If // possible defaults will be used, although Seed and Svg will return an error. func (p Pattern) Generate() error { if p.Seed == nil { return fmt.Errorf("seed must be initialized") } if p.Svg == nil { return fmt.Errorf("svg must be initialized") } if p.BaseColour == nil { p.BaseColour, _ = colour.New(defaultBackgroundColour) } if len(p.Generators) == 0 { p.Generators = DefaultGenerators } if p.Styles == nil { p.Styles = DefaultStylePresets() } p.Svg.Group(p.Svg.Transform(p.Svg.Translate(p.X, p.Y))) // generate background plane p.Svg.Rect(0, 0, p.Width, p.Height, fmt.Sprintf(`fill="%s"`, p.Svg.RGB(p.BaseColour.Rgb()))) if err := p.generatePatterns(); err != nil { return err } p.Svg.GroupClose() return nil } // Selects the pattern generator based on the seed and executes it. func (p Pattern) generatePatterns() error { // trigger pattern generator: chevron, etc. generatorID := p.determineGeneratorIndex() switch generatorID { case Chevrons: p.Chevrons() case CirclesConcentric: p.CirclesConcentric() case CirclesOverlapping: p.CirclesOverlapping() case Diamonds: p.Diamonds() case Hexagons: p.Hexagons() case Octagons: p.Octagons() case Plaid: p.Plaid() case PlusSigns: p.PlusSigns() case RingsOverlapping: p.RingsOverlapping() case SineWaves: p.SineWaves() case Squares: p.Squares() case SquaresMosaic: p.SquaresMosaic() case SquaresNested: p.SquaresNested() case Tessellation: p.Tessellation() case Triangles: p.Triangles() case Xes: p.Xes() default: return fmt.Errorf("invalid generator ID: %d", generatorID) } return nil } func (p Pattern) reMap(value, vMin, vMax, dMin, dMax float64) float64 { return colour.ReMap(value, vMin, vMax, dMin, dMax) } func (p Pattern) seedToInt(index, len int) float64 { return float64(p.Seed.ToInt(index, len)) } func (p Pattern) fillColour(val int) string { if val%2 == 0 { return p.Styles.FillColourLight } else { return p.Styles.FillColourDark } } func (p Pattern) opacity(colourValue float64) float64 { return colour.ReMap(colourValue, 0, 15, p.Styles.OpacityMin, p.Styles.OpacityMax) } func (p Pattern) determineGeneratorIndex() GeneratorType { index := p.Seed.ToInt(20, 1) if index >= len(p.Generators) { return Xes } return p.Generators[index] } // GeneratorType identifies the type of pattern generator. type GeneratorType int // The complete list of available generators. const ( Chevrons GeneratorType = iota CirclesConcentric CirclesOverlapping Diamonds Hexagons Octagons Plaid PlusSigns RingsOverlapping SineWaves Squares SquaresMosaic SquaresNested Tessellation Triangles Xes ) // DefaultGenerators is the complete list of generators. var DefaultGenerators = []GeneratorType{ Chevrons, CirclesConcentric, Diamonds, Hexagons, SquaresMosaic, SquaresNested, Octagons, CirclesOverlapping, RingsOverlapping, Plaid, PlusSigns, SineWaves, Squares, Tessellation, Triangles, Xes, }
25.557789
109
0.720606
e8f21b2851b4e9689c28bcfb704675efc7d4cf9e
1,087
cpp
C++
Online Judges/CodeForces/1157CIncreasingSubsequence.cpp
NelsonGomesNeto/ProgramC
e743b1b869f58f7f3022d18bac00c5e0b078562e
[ "MIT" ]
3
2018-12-18T13:39:42.000Z
2021-06-23T18:05:18.000Z
Online Judges/CodeForces/1157CIncreasingSubsequence.cpp
NelsonGomesNeto/ProgramC
e743b1b869f58f7f3022d18bac00c5e0b078562e
[ "MIT" ]
1
2018-11-02T21:32:40.000Z
2018-11-02T22:47:12.000Z
Online Judges/CodeForces/1157CIncreasingSubsequence.cpp
NelsonGomesNeto/ProgramC
e743b1b869f58f7f3022d18bac00c5e0b078562e
[ "MIT" ]
6
2018-10-27T14:07:52.000Z
2019-11-14T13:49:29.000Z
#include <bits/stdc++.h> #define lli long long int using namespace std; const int maxN = 2e5; int n; lli a[maxN]; char movements[maxN + 1]; int main() { scanf("%d", &n); for (int i = 0; i < n; i ++) scanf("%lld", &a[i]); int ans = 0, lo = 0, hi = n - 1, prv = 0; for (; ans < n; ans ++) { if (a[lo] > prv && a[lo] == a[hi]) { int left = ans, p = 0; while (left < n && a[lo] > p) p = a[lo ++], left ++; int right = ans; p = 0; while (right < n && a[hi] > p) p = a[hi --], right ++; if (left > right) for (int i = ans; i < left; i ++) movements[i] = 'L'; else for (int i = ans; i < right; i ++) movements[i] = 'R'; ans = max(left, right); break; } else if (a[lo] > prv && a[hi] > prv) { if (a[lo] < a[hi]) movements[ans] = 'L', prv = a[lo ++]; else movements[ans] = 'R', prv = a[hi --]; } else if (a[lo] > prv) movements[ans] = 'L', prv = a[lo ++]; else if (a[hi] > prv) movements[ans] = 'R', prv = a[hi --]; else break; } printf("%d\n", ans); printf("%s\n", movements); return(0); }
27.871795
84
0.469181
afb28d589a37d83f8c64d9ea66d3317523e99ef3
480
asm
Assembly
programs/oeis/112/A112751.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/112/A112751.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/112/A112751.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A112751: Number of numbers less than or equal to n of the form 3^i*5^j. ; 1,1,2,2,3,3,3,3,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10 mov $2,$0 mov $4,$0 add $4,1 lpb $4 mov $0,$2 sub $4,1 sub $0,$4 add $0,1 mov $5,$0 mov $0,4 mov $3,2025 mod $3,$5 trn $0,$3 mov $5,$0 div $5,4 add $1,$5 lpe mov $0,$1
21.818182
212
0.535417
c465b0546ef316ed35ab45876be9336ab017e0c9
822
h
C
driver/src/runtime/icd/CLCommandQueue.h
okayvlev/red-o-lator
a94cd05b647aa40c5e5a97650df6bcce9bed90f9
[ "MIT" ]
null
null
null
driver/src/runtime/icd/CLCommandQueue.h
okayvlev/red-o-lator
a94cd05b647aa40c5e5a97650df6bcce9bed90f9
[ "MIT" ]
null
null
null
driver/src/runtime/icd/CLCommandQueue.h
okayvlev/red-o-lator
a94cd05b647aa40c5e5a97650df6bcce9bed90f9
[ "MIT" ]
null
null
null
#pragma once #include <iostream> #include <memory> #include <queue> #include "IcdDispatchTable.h" #include "runtime/command/Command.h" #include "runtime/icd/CLContext.h" class Command; class CLCommandQueue { public: explicit CLCommandQueue(IcdDispatchTable* dispatchTable, CLContext* context, cl_command_queue_properties properties); virtual ~CLCommandQueue(); IcdDispatchTable* const dispatchTable; CLContext* const context; cl_command_queue_properties properties; unsigned int referenceCount = 1; void enqueue(const std::shared_ptr<const Command>& command); void flush(); size_t size(); private: std::queue<std::shared_ptr<const Command>> commands = std::queue<std::shared_ptr<const Command>>(); };
22.216216
68
0.678832
39e69a177fd7c1f4f8c6892209a6af612a42b408
1,178
dart
Dart
lib/app/modules/splash/splash_page.dart
Hellyson-Ferreira/flutter_go_fast
66a72fc7f3ae537af07672467d9e24462ed88e4f
[ "MIT" ]
null
null
null
lib/app/modules/splash/splash_page.dart
Hellyson-Ferreira/flutter_go_fast
66a72fc7f3ae537af07672467d9e24462ed88e4f
[ "MIT" ]
null
null
null
lib/app/modules/splash/splash_page.dart
Hellyson-Ferreira/flutter_go_fast
66a72fc7f3ae537af07672467d9e24462ed88e4f
[ "MIT" ]
null
null
null
import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:flutter/material.dart'; import 'package:flutter_go_fast/app/app_controller.dart'; import 'package:flutter_modular/flutter_modular.dart'; class SplashPage extends StatefulWidget { @override _SplashPageState createState() => _SplashPageState(); } class _SplashPageState extends State<SplashPage> { @override void initState() { Firestore.instance.collection('books').document() .setData({ 'title': 'Game Of Thrones', 'author': 'George R. R. Martin' }); super.initState(); } @override Widget build(BuildContext context) { return Scaffold( body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ RaisedButton( child: Text('Dark mode'), onPressed: () { Modular.get<AppController>().setThemeData(ThemeMode.dark); }, ), RaisedButton( child: Text('Ligth mode'), onPressed: () {Modular.get<AppController>().setThemeData(ThemeMode.light);}, ), ], ), ), ); } }
28.731707
90
0.611205
cb61984b1eef855dc0333eff9e36fefd009fbf96
30,552
html
HTML
mbls/330f0e49_9020291_0.html
notus629/notus629.github.io
f834e9390431de69f80ea2e1145e0c5876a07652
[ "MIT" ]
1
2017-06-02T07:57:10.000Z
2017-06-02T07:57:10.000Z
mbls/330f0e49_9020291_0.html
notus629/notus629.github.io
f834e9390431de69f80ea2e1145e0c5876a07652
[ "MIT" ]
null
null
null
mbls/330f0e49_9020291_0.html
notus629/notus629.github.io
f834e9390431de69f80ea2e1145e0c5876a07652
[ "MIT" ]
null
null
null
<html><head></head> <body> <div><br></div><div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><b>phpize</b> [1]</font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas">&nbsp; &nbsp;&nbsp;The phpize command is used to <font class="Apple-style-span" color="#ff0000"><b>prepare the build environment for a PHP extension</b></font>.&nbsp;</font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas">&nbsp; &nbsp;&nbsp;</font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><b>用 phpize 来编译扩展,并安装</b></font></div></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div><font class="Apple-style-span" face="Consolas"><br></font></div></div></blockquote><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><span class="Apple-style-span" style="font-family: Consolas; "><table border="0" cellpadding="0" cellspacing="0" style="max-width: 100%; background: none !important; border-collapse: collapse; border-spacing: 0px; border-radius: 0px !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 1px 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left !important; top: auto !important; vertical-align: baseline !important; width: 1000px; box-sizing: content-box !important; font-family: Consolas, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, Courier, monospace !important; font-weight: normal; font-style: normal; font-size: 13px; min-height: auto !important; color: rgb(51, 51, 51); font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><tbody style="border-radius: 0px !important; background: none !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: static !important; right: auto !important; text-align: left !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-family: Consolas, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, Courier, monospace !important; font-weight: normal !important; font-style: normal !important; font-size: 1em !important; min-height: auto !important;"><tr style="margin: 0px !important; padding: 0px !important; border-radius: 0px !important; background: none !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; outline: 0px !important; overflow: visible !important; position: static !important; right: auto !important; text-align: left !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-family: Consolas, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, Courier, monospace !important; font-weight: normal !important; font-style: normal !important; font-size: 1em !important; min-height: auto !important;"><td class="gutter" style="margin: 0px !important; padding: 0px !important; border-radius: 0px !important; background: none !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; outline: 0px !important; overflow: visible !important; position: static !important; right: auto !important; text-align: left !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-family: Consolas, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, Courier, monospace !important; font-weight: normal !important; font-style: normal !important; font-size: 1em !important; min-height: auto !important; color: rgb(175, 175, 175) !important;"><div class="line number1 index0 alt2" style="border-radius: 0px !important; background: none white !important; border-width: 0px 3px 0px 0px !important; border-top-style: initial !important; border-right-style: solid !important; border-bottom-style: initial !important; border-left-style: initial !important; border-top-color: initial !important; border-right-color: rgb(108, 226, 108) !important; border-bottom-color: initial !important; border-left-color: initial !important; border-image: initial !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 0.5em 0px 1em !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-family: Consolas, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, Courier, monospace !important; font-weight: normal !important; font-style: normal !important; font-size: 1em !important; min-height: auto !important; white-space: pre !important;">1</div><div class="line number2 index1 alt1" style="border-radius: 0px !important; background: none white !important; border-width: 0px 3px 0px 0px !important; border-top-style: initial !important; border-right-style: solid !important; border-bottom-style: initial !important; border-left-style: initial !important; border-top-color: initial !important; border-right-color: rgb(108, 226, 108) !important; border-bottom-color: initial !important; border-left-color: initial !important; border-image: initial !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 0.5em 0px 1em !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-family: Consolas, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, Courier, monospace !important; font-weight: normal !important; font-style: normal !important; font-size: 1em !important; min-height: auto !important; white-space: pre !important;">2</div><div class="line number3 index2 alt2" style="border-radius: 0px !important; background: none white !important; border-width: 0px 3px 0px 0px !important; border-top-style: initial !important; border-right-style: solid !important; border-bottom-style: initial !important; border-left-style: initial !important; border-top-color: initial !important; border-right-color: rgb(108, 226, 108) !important; border-bottom-color: initial !important; border-left-color: initial !important; border-image: initial !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 0.5em 0px 1em !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-family: Consolas, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, Courier, monospace !important; font-weight: normal !important; font-style: normal !important; font-size: 1em !important; min-height: auto !important; white-space: pre !important;">3</div><div class="line number4 index3 alt1" style="border-radius: 0px !important; background: none white !important; border-width: 0px 3px 0px 0px !important; border-top-style: initial !important; border-right-style: solid !important; border-bottom-style: initial !important; border-left-style: initial !important; border-top-color: initial !important; border-right-color: rgb(108, 226, 108) !important; border-bottom-color: initial !important; border-left-color: initial !important; border-image: initial !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 0.5em 0px 1em !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-family: Consolas, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, Courier, monospace !important; font-weight: normal !important; font-style: normal !important; font-size: 1em !important; min-height: auto !important; white-space: pre !important;">4</div><div class="line number5 index4 alt2" style="border-radius: 0px !important; background: none white !important; border-width: 0px 3px 0px 0px !important; border-top-style: initial !important; border-right-style: solid !important; border-bottom-style: initial !important; border-left-style: initial !important; border-top-color: initial !important; border-right-color: rgb(108, 226, 108) !important; border-bottom-color: initial !important; border-left-color: initial !important; border-image: initial !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 0.5em 0px 1em !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-family: Consolas, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, Courier, monospace !important; font-weight: normal !important; font-style: normal !important; font-size: 1em !important; min-height: auto !important; white-space: pre !important;">5</div><div class="line number6 index5 alt1" style="border-radius: 0px !important; background: none white !important; border-width: 0px 3px 0px 0px !important; border-top-style: initial !important; border-right-style: solid !important; border-bottom-style: initial !important; border-left-style: initial !important; border-top-color: initial !important; border-right-color: rgb(108, 226, 108) !important; border-bottom-color: initial !important; border-left-color: initial !important; border-image: initial !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 0.5em 0px 1em !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-family: Consolas, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, Courier, monospace !important; font-weight: normal !important; font-style: normal !important; font-size: 1em !important; min-height: auto !important; white-space: pre !important;">6</div></td><td class="code" style="margin: 0px !important; padding: 0px !important; border-radius: 0px !important; background: none !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; outline: 0px !important; overflow: visible !important; position: static !important; right: auto !important; text-align: left !important; top: auto !important; vertical-align: baseline !important; width: 970px; box-sizing: content-box !important; font-family: Consolas, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, Courier, monospace !important; font-weight: normal !important; font-style: normal !important; font-size: 1em !important; min-height: auto !important;"><div class="container" style="width: auto !important; margin: 0px !important; border-radius: 0px !important; background: none !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; outline: 0px !important; overflow: visible !important; padding: 0px !important; position: relative !important; right: auto !important; text-align: left !important; top: auto !important; vertical-align: baseline !important; box-sizing: content-box !important; font-family: Consolas, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, Courier, monospace !important; font-weight: normal !important; font-style: normal !important; font-size: 1em !important; min-height: auto !important;"><div class="line number1 index0 alt2" style="border-radius: 0px !important; background: none white !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; right: auto !important; text-align: left !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-family: Consolas, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, Courier, monospace !important; font-weight: normal !important; font-style: normal !important; font-size: 1em !important; min-height: auto !important; white-space: pre !important;"><code class="bash comments" style="padding: 0px !important; font-family: Consolas, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, Courier, monospace !important; font-size: 1em !important; color: rgb(0, 130, 0) !important; border-radius: 0px !important; background: none !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; right: auto !important; text-align: left !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-weight: normal !important; font-style: normal !important; min-height: auto !important;">##&nbsp;the&nbsp;sources&nbsp;for&nbsp;an&nbsp;extension&nbsp;are&nbsp;in&nbsp;a&nbsp;directory&nbsp;named&nbsp;extname</code></div><div class="line number2 index1 alt1" style="border-radius: 0px !important; background: none white !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; right: auto !important; text-align: left !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-family: Consolas, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, Courier, monospace !important; font-weight: normal !important; font-style: normal !important; font-size: 1em !important; min-height: auto !important; white-space: pre !important;"><code class="bash plain" style="padding: 0px !important; font-family: Consolas, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, Courier, monospace !important; font-size: 1em !important; color: black !important; border-radius: 0px !important; background: none !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; right: auto !important; text-align: left !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-weight: normal !important; font-style: normal !important; min-height: auto !important;">$&nbsp;</code><code class="bash functions" style="padding: 0px !important; font-family: Consolas, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, Courier, monospace !important; font-size: 1em !important; color: rgb(255, 20, 147) !important; border-radius: 0px !important; background: none !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; right: auto !important; text-align: left !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-weight: normal !important; font-style: normal !important; min-height: auto !important;">cd</code>&nbsp;<code class="bash plain" style="padding: 0px !important; font-family: Consolas, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, Courier, monospace !important; font-size: 1em !important; color: black !important; border-radius: 0px !important; background: none !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; right: auto !important; text-align: left !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-weight: normal !important; font-style: normal !important; min-height: auto !important;">extname</code></div><div class="line number3 index2 alt2" style="border-radius: 0px !important; background: none white !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; right: auto !important; text-align: left !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-family: Consolas, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, Courier, monospace !important; font-weight: normal !important; font-style: normal !important; font-size: 1em !important; min-height: auto !important; white-space: pre !important;"><code class="bash plain" style="padding: 0px !important; font-family: Consolas, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, Courier, monospace !important; font-size: 1em !important; color: black !important; border-radius: 0px !important; background: none !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; right: auto !important; text-align: left !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-weight: normal !important; font-style: normal !important; min-height: auto !important;">$&nbsp;phpize</code></div><div class="line number4 index3 alt1" style="border-radius: 0px !important; background: none white !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; right: auto !important; text-align: left !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-family: Consolas, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, Courier, monospace !important; font-weight: normal !important; font-style: normal !important; font-size: 1em !important; min-height: auto !important; white-space: pre !important;"><code class="bash plain" style="padding: 0px !important; font-family: Consolas, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, Courier, monospace !important; font-size: 1em !important; color: black !important; border-radius: 0px !important; background: none !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; right: auto !important; text-align: left !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-weight: normal !important; font-style: normal !important; min-height: auto !important;">$&nbsp;.</code><code class="bash plain" style="padding: 0px !important; font-family: Consolas, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, Courier, monospace !important; font-size: 1em !important; color: black !important; border-radius: 0px !important; background: none !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; right: auto !important; text-align: left !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-weight: normal !important; font-style: normal !important; min-height: auto !important;">/configure</code></div><div class="line number5 index4 alt2" style="border-radius: 0px !important; background: none white !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; right: auto !important; text-align: left !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-family: Consolas, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, Courier, monospace !important; font-weight: normal !important; font-style: normal !important; font-size: 1em !important; min-height: auto !important; white-space: pre !important;"><code class="bash plain" style="padding: 0px !important; font-family: Consolas, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, Courier, monospace !important; font-size: 1em !important; color: black !important; border-radius: 0px !important; background: none !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; right: auto !important; text-align: left !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-weight: normal !important; font-style: normal !important; min-height: auto !important;">$&nbsp;</code><code class="bash functions" style="padding: 0px !important; font-family: Consolas, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, Courier, monospace !important; font-size: 1em !important; color: rgb(255, 20, 147) !important; border-radius: 0px !important; background: none !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; right: auto !important; text-align: left !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-weight: normal !important; font-style: normal !important; min-height: auto !important;">make</code></div><div class="line number6 index5 alt1" style="border-radius: 0px !important; background: none white !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; padding: 0px 1em !important; position: static !important; right: auto !important; text-align: left !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-family: Consolas, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, Courier, monospace !important; font-weight: normal !important; font-style: normal !important; font-size: 1em !important; min-height: auto !important; white-space: pre !important;"><code class="bash comments" style="padding: 0px !important; font-family: Consolas, &quot;Bitstream Vera Sans Mono&quot;, &quot;Courier New&quot;, Courier, monospace !important; font-size: 1em !important; color: rgb(0, 130, 0) !important; border-radius: 0px !important; background: none !important; border: 0px !important; bottom: auto !important; float: none !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin: 0px !important; outline: 0px !important; overflow: visible !important; position: static !important; right: auto !important; text-align: left !important; top: auto !important; vertical-align: baseline !important; width: auto !important; box-sizing: content-box !important; font-weight: normal !important; font-style: normal !important; min-height: auto !important;">#&nbsp;make&nbsp;install</code></div></div></td></tr></tbody></table></span></blockquote><div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas">&nbsp; &nbsp; 安装完成后,会创建一个 extname.so 文件,并放入 php 的扩展目录 (extension directory)</font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas">&nbsp; &nbsp; 接下来,须手动在 php.ini 中加入: extension=extname.so</font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><b>若系统没有 phpize 命令</b> [1]</font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas">&nbsp; &nbsp; 如果是使用已经预编译好的 packages,需要再安装合适的 php packages 的 devel 版,因为该版本通常会包含 phpize 命令,以及用来构建 PHP 和 PHP extension 的合适的头文件。</font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas">&nbsp;</font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><b>References</b></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas">&nbsp; &nbsp; [1]&nbsp;<a href="http://php.net/manual/en/install.pecl.phpize.php">http://php.net/manual/en/install.pecl.phpize.php</a></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div></div><div><font class="Apple-style-span" face="Consolas"><span class="Apple-style-span" style="font-family: 'Times New Roman'; "><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div><div><font class="Apple-style-span" face="Consolas"><br></font></div></span></font></div><script type="text/javascript" language="javascript" src="jquery.js"></script><script type="text/javascript" language="javascript" src="itemlink.js"></script></body></html>
7,638
30,523
0.753044
fb91e5836bed0433389e7aca0d13b5117d089f21
3,642
java
Java
src/android/tests/src/com/google/android/inputmethod/japanese/userdictionary/UserDictionaryUtilTest.java
sousuke0422/crIME
abc711e0c2cad19950703d59ed4d1ffe4bd76953
[ "BSD-3-Clause" ]
1
2018-09-14T09:11:39.000Z
2018-09-14T09:11:39.000Z
src/android/tests/src/com/google/android/inputmethod/japanese/userdictionary/UserDictionaryUtilTest.java
sousuke0422/crIME
abc711e0c2cad19950703d59ed4d1ffe4bd76953
[ "BSD-3-Clause" ]
108
2018-05-29T17:33:53.000Z
2019-07-22T00:01:54.000Z
src/android/tests/src/com/google/android/inputmethod/japanese/userdictionary/UserDictionaryUtilTest.java
sousuke0422/crIME
abc711e0c2cad19950703d59ed4d1ffe4bd76953
[ "BSD-3-Clause" ]
1
2021-12-29T08:15:14.000Z
2021-12-29T08:15:14.000Z
// Copyright 2010-2018, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * 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. // * Neither the name of Google Inc. 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 // 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. package org.mozc.android.inputmethod.japanese.userdictionary; import org.mozc.android.inputmethod.japanese.testing.Parameter; import android.net.Uri; import junit.framework.TestCase; import java.io.File; import java.util.Arrays; /** */ public class UserDictionaryUtilTest extends TestCase { public void testGenerateDictionaryNameByUri() { class TestData extends Parameter { final String expectedName; final String filePath; final String[] dictionaryNameList; TestData(String expectedName, String filePath, String[] dictionaryNameList) { this.expectedName = expectedName; this.filePath = filePath; this.dictionaryNameList = dictionaryNameList; } } TestData[] testDataList = { // Simplest case. new TestData("abc", "abc", new String[] {}), // With directory name. new TestData("abc", "directory/abc", new String[] {}), // With extension. new TestData("abc", "abc.txt", new String[] {}), // With both directory and extension. new TestData("abc", "directory/abc.txt", new String[] {}), // File name containing two periods. new TestData("abc.def", "directory/abc.def.txt", new String[] {}), // File name beginning with '.'. new TestData(".abc", "directory/.abc", new String[] {}), // The case where the (first) generated name is already in the dictionary name list. new TestData("abc (1)", "dictionary/abc.txt", new String[] { "abc" }), // The case where the first and second generated name are already // in the dictionary name list. new TestData("abc (2)", "dictionary/abc.txt", new String[] { "abc", "abc (1)" }), }; for (TestData testData : testDataList) { assertEquals(testData.toString(), testData.expectedName, UserDictionaryUtil.generateDictionaryNameByUri( Uri.fromFile(new File(testData.filePath)), Arrays.asList(testData.dictionaryNameList))); } } }
39.16129
92
0.688083
0c65da84089329c25641612fa70d2bc7761e3149
3,289
html
HTML
material/code/visionbook/matlab_code/stprtool/doc/manual/probab/list/sigmoid.html
xiaohaijin/ComputerVision
0be6f619d81f07e0c39bd4623a1792395b7d3b29
[ "MIT" ]
3
2018-12-24T19:36:04.000Z
2022-02-12T16:31:08.000Z
material/code/visionbook/matlab_code/stprtool/doc/manual/probab/list/sigmoid.html
xiaohaijin/ComputerVision
0be6f619d81f07e0c39bd4623a1792395b7d3b29
[ "MIT" ]
null
null
null
material/code/visionbook/matlab_code/stprtool/doc/manual/probab/list/sigmoid.html
xiaohaijin/ComputerVision
0be6f619d81f07e0c39bd4623a1792395b7d3b29
[ "MIT" ]
null
null
null
<html> <head> <meta HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=ISO-8859-1"> <title>sigmoid.m</title> <link rel="stylesheet" type="text/css" href="../../m-syntax.css"> </head> <body> <code> <span class=defun_kw>function</span>&nbsp;<span class=defun_out>y</span>=<span class=defun_name>sigmoid</span>(<span class=defun_in>X,arg1,arg2</span>)<br> <span class=h1>%&nbsp;SIGMOID&nbsp;Evaluates&nbsp;sigmoid&nbsp;function.</span><br> <span class=help>%</span><br> <span class=help>%&nbsp;<span class=help_field>Synopsis:</span></span><br> <span class=help>%&nbsp;&nbsp;y&nbsp;=&nbsp;sigmoid(X,model)</span><br> <span class=help>%&nbsp;&nbsp;y&nbsp;=&nbsp;sigmois(X,A1,A2)</span><br> <span class=help>%</span><br> <span class=help>%&nbsp;<span class=help_field>Description:</span></span><br> <span class=help>%&nbsp;&nbsp;y&nbsp;=&nbsp;sigmoid(X,model)&nbsp;returns&nbsp;</span><br> <span class=help>%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;y&nbsp;=&nbsp;1/(1+exp(A(1)*X&nbsp;+&nbsp;A(2))</span><br> <span class=help>%</span><br> <span class=help>%&nbsp;&nbsp;where&nbsp;A&nbsp;=&nbsp;model.A.</span><br> <span class=help>%</span><br> <span class=help>%&nbsp;&nbsp;y&nbsp;=&nbsp;sigmois(X,&nbsp;A1,&nbsp;A2)&nbsp;allows&nbsp;A&nbsp;to&nbsp;be&nbsp;given&nbsp;as&nbsp;A&nbsp;=&nbsp;[A1&nbsp;A2].</span><br> <span class=help>%</span><br> <span class=help>%&nbsp;<span class=help_field>Input:</span></span><br> <span class=help>%&nbsp;&nbsp;X&nbsp;[1&nbsp;x&nbsp;num_data]&nbsp;Inputs.</span><br> <span class=help>%&nbsp;&nbsp;model.A&nbsp;[2&nbsp;x&nbsp;1]&nbsp;Sigmoid&nbsp;parameters.</span><br> <span class=help>%</span><br> <span class=help>%&nbsp;<span class=help_field>Output:</span></span><br> <span class=help>%&nbsp;&nbsp;y&nbsp;[1&nbsp;x&nbsp;num_data]&nbsp;Evaluated&nbsp;sigmoid&nbsp;function.</span><br> <span class=help>%</span><br> <span class=help>%&nbsp;See&nbsp;also&nbsp;</span><br> <span class=help>%&nbsp;&nbsp;MLSIGMOID.</span><br> <span class=help>%</span><br> <hr> <span class=help1>%&nbsp;<span class=help1_field>About:</span>&nbsp;Statistical&nbsp;Pattern&nbsp;Recognition&nbsp;Toolbox</span><br> <span class=help1>%&nbsp;(C)&nbsp;1999-2003,&nbsp;Written&nbsp;by&nbsp;Vojtech&nbsp;Franc&nbsp;and&nbsp;Vaclav&nbsp;Hlavac</span><br> <span class=help1>%&nbsp;&lt;a&nbsp;href="http://www.cvut.cz"&gt;Czech&nbsp;Technical&nbsp;University&nbsp;Prague&lt;/a&gt;</span><br> <span class=help1>%&nbsp;&lt;a&nbsp;href="http://www.feld.cvut.cz"&gt;Faculty&nbsp;of&nbsp;Electrical&nbsp;Engineering&lt;/a&gt;</span><br> <span class=help1>%&nbsp;&lt;a&nbsp;href="http://cmp.felk.cvut.cz"&gt;Center&nbsp;for&nbsp;Machine&nbsp;Perception&lt;/a&gt;</span><br> <br> <span class=help1>%&nbsp;<span class=help1_field>Modifications:</span></span><br> <span class=help1>%&nbsp;3-jun-2004,&nbsp;VF</span><br> <span class=help1>%&nbsp;8-may-2003,&nbsp;VF</span><br> <br> <hr> <span class=keyword>if</span>&nbsp;<span class=stack>nargin</span>&nbsp;==&nbsp;3,<br> &nbsp;&nbsp;y&nbsp;=&nbsp;1./(1+exp(X*arg1&nbsp;+&nbsp;arg2));<br> <span class=keyword>else</span><br> &nbsp;&nbsp;model=c2s(arg1);<br> &nbsp;&nbsp;y&nbsp;=&nbsp;1./(1+exp(X*model.A(1)+model.A(2)));<br> <span class=keyword>end</span><br> <br> <span class=jump>return</span>;<br> <span class=comment>%&nbsp;EOF</span><br> </code>
58.732143
170
0.696868
715787ae3a97af5f6f91b246461b6874bbd2742e
1,188
kt
Kotlin
kotlin/structures/FenwickTree3D.kt
igarash1/codelibrary
4566f3145be72827d72cb93abca8bfd93f1c58df
[ "Unlicense" ]
null
null
null
kotlin/structures/FenwickTree3D.kt
igarash1/codelibrary
4566f3145be72827d72cb93abca8bfd93f1c58df
[ "Unlicense" ]
1
2021-01-13T08:37:20.000Z
2021-01-13T08:37:20.000Z
kotlin/structures/FenwickTree3D.kt
igarash1/codelibrary
4566f3145be72827d72cb93abca8bfd93f1c58df
[ "Unlicense" ]
null
null
null
package structures object FenwickTree3D { fun add(t: Array<Array<IntArray>>, x: Int, y: Int, z: Int, value: Int) { var i = x while (i < t.size) { var j = y while (j < t[0].length) { var k = z while (k < t[0][0].length) { t[i][j][k] += value k = k or k + 1 } j = j or j + 1 } i = i or i + 1 } } // sum[(0, 0, 0), (x, y, z)] fun sum(t: Array<Array<IntArray>>, x: Int, y: Int, z: Int): Int { var res = 0 var i = x while (i >= 0) { var j = y while (j >= 0) { var k = z while (k >= 0) { res += t[i][j][k] k = (k and k + 1) - 1 } j = (j and j + 1) - 1 } i = (i and i + 1) - 1 } return res } fun main(args: Array<String?>?) { val t = Array(10) { Array(20) { IntArray(30) } } add(t, 0, 0, 0, 1) add(t, 9, 19, 29, -2) System.out.println(-1 == sum(t, 9, 19, 29)) } }
25.826087
76
0.327441
fbe5517252b6123caa01ca43c145b644af6d1c3c
4,272
java
Java
rt/security/src/main/java/org/apache/cxf/rt/security/crypto/MessageDigestUtils.java
sho25/cxf
4e2e93d8335f22575bf366df2a1b6cde681ad0ec
[ "Apache-2.0" ]
null
null
null
rt/security/src/main/java/org/apache/cxf/rt/security/crypto/MessageDigestUtils.java
sho25/cxf
4e2e93d8335f22575bf366df2a1b6cde681ad0ec
[ "Apache-2.0" ]
5
2021-02-03T19:35:39.000Z
2022-03-31T20:59:21.000Z
rt/security/src/main/java/org/apache/cxf/rt/security/crypto/MessageDigestUtils.java
sho25/cxf
4e2e93d8335f22575bf366df2a1b6cde681ad0ec
[ "Apache-2.0" ]
null
null
null
begin_unit|revision:0.9.5;language:Java;cregit-version:0.0.1 begin_comment comment|/** * 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. */ end_comment begin_package package|package name|org operator|. name|apache operator|. name|cxf operator|. name|rt operator|. name|security operator|. name|crypto package|; end_package begin_import import|import name|java operator|. name|nio operator|. name|charset operator|. name|StandardCharsets import|; end_import begin_import import|import name|java operator|. name|security operator|. name|MessageDigest import|; end_import begin_import import|import name|java operator|. name|security operator|. name|NoSuchAlgorithmException import|; end_import begin_import import|import name|org operator|. name|apache operator|. name|cxf operator|. name|common operator|. name|util operator|. name|StringUtils import|; end_import begin_comment comment|/** * The utility Message Digest generator which can be used for generating * random values */ end_comment begin_class specifier|public specifier|final class|class name|MessageDigestUtils block|{ specifier|public specifier|static specifier|final name|String name|ALGO_SHA_1 init|= literal|"SHA-1" decl_stmt|; specifier|public specifier|static specifier|final name|String name|ALGO_SHA_256 init|= literal|"SHA-256" decl_stmt|; specifier|public specifier|static specifier|final name|String name|ALGO_MD5 init|= literal|"MD5" decl_stmt|; specifier|private name|MessageDigestUtils parameter_list|() block|{ } specifier|public specifier|static name|String name|generate parameter_list|( name|byte index|[] name|input parameter_list|) block|{ return|return name|generate argument_list|( name|input argument_list|, name|ALGO_SHA_256 argument_list|) return|; block|} specifier|public specifier|static name|String name|generate parameter_list|( name|byte index|[] name|input parameter_list|, name|String name|algo parameter_list|) block|{ try|try block|{ name|byte index|[] name|messageDigest init|= name|createDigest argument_list|( name|input argument_list|, name|algo argument_list|) decl_stmt|; return|return name|StringUtils operator|. name|toHexString argument_list|( name|messageDigest argument_list|) return|; block|} catch|catch parameter_list|( name|NoSuchAlgorithmException name|e parameter_list|) block|{ throw|throw operator|new name|SecurityException argument_list|( name|e argument_list|) throw|; block|} block|} specifier|public specifier|static name|byte index|[] name|createDigest parameter_list|( name|String name|input parameter_list|, name|String name|algo parameter_list|) block|{ try|try block|{ return|return name|createDigest argument_list|( name|input operator|. name|getBytes argument_list|( name|StandardCharsets operator|. name|UTF_8 argument_list|) argument_list|, name|algo argument_list|) return|; block|} catch|catch parameter_list|( name|NoSuchAlgorithmException name|e parameter_list|) block|{ throw|throw operator|new name|SecurityException argument_list|( name|e argument_list|) throw|; block|} block|} specifier|public specifier|static name|byte index|[] name|createDigest parameter_list|( name|byte index|[] name|input parameter_list|, name|String name|algo parameter_list|) throws|throws name|NoSuchAlgorithmException block|{ name|MessageDigest name|md init|= name|MessageDigest operator|. name|getInstance argument_list|( name|algo argument_list|) decl_stmt|; return|return name|md operator|. name|digest argument_list|( name|input argument_list|) return|; block|} block|} end_class end_unit
16.243346
810
0.799625
4a88b7d7ecaf49e59bf2b45c931cc249940c280b
1,042
html
HTML
src/index.html
melvins1234/electron-crud
54457f92012d4c9957c1925c2949d0053cdfc9e8
[ "CC0-1.0" ]
null
null
null
src/index.html
melvins1234/electron-crud
54457f92012d4c9957c1925c2949d0053cdfc9e8
[ "CC0-1.0" ]
34
2021-10-04T13:25:31.000Z
2022-03-31T13:26:49.000Z
src/index.html
melvins1234/electron-crud
54457f92012d4c9957c1925c2949d0053cdfc9e8
[ "CC0-1.0" ]
null
null
null
<!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP --> <link rel="stylesheet" href="../assets/css/preset.css" /> <link rel="stylesheet" href="../assets/css/style.css" /> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" /> <title>Sticky Note</title> </head> <body> <div id="root"> <!-- Header --> <header class="header"> <h1 class="header__title">Sticky Note</h1> <i class="fas fa-plus header__icon"></i> </header> <!-- Body --> <main class="body"> <div class="body__blank"> <img class="body__image" src="../assets/images/note.svg" alt=""></img> <p>Tap the new note button above to create a note.</p> </div> <div class="body__notes-list"></div> </main> </div> <!-- You can also require other files to run in this process --> <script src="../renderer.js"></script> </body> </html>
28.162162
111
0.570058
e8ce1b1746a12033e16447addf9918797d31ffd6
323
cpp
C++
Layer.cpp
MoNazar/DeepLearning-Backpropagation
eab59664f2b2d79f8d4e83ea7de038ebd7924747
[ "MIT" ]
4
2017-02-02T19:23:36.000Z
2022-02-16T12:28:47.000Z
Layer.cpp
MoNazar/DeepLearning-Backpropagation
eab59664f2b2d79f8d4e83ea7de038ebd7924747
[ "MIT" ]
null
null
null
Layer.cpp
MoNazar/DeepLearning-Backpropagation
eab59664f2b2d79f8d4e83ea7de038ebd7924747
[ "MIT" ]
1
2019-10-07T01:19:31.000Z
2019-10-07T01:19:31.000Z
#include "Layer.h" Layer::Layer() { } Layer::~Layer() { if (NULL != neurons_){ delete[] neurons_; neurons_ = NULL; } if (NULL != neurons_){ delete[] neurons_; neurons_ = NULL; } } Layer::Layer(int neurons_num) : neurons_num_(neurons_num) { neurons_ = new Neuron[neurons_num_]; }
12.423077
58
0.585139
ca363f7557c9e9d629b9aedb422a192d880ef370
1,683
lua
Lua
ESP8266/Programs/paginaHtmlConf.lua
giulianofiorotto/IoT-Framework-ESP8266
40dd21e3f3d627c0eb92b37294a24c7816355fd8
[ "Apache-2.0" ]
8
2016-02-01T14:05:13.000Z
2019-04-13T12:33:42.000Z
ESP8266/Programs/paginaHtmlConf.lua
giulianofiorotto/IoT-Framework-ESP8266
40dd21e3f3d627c0eb92b37294a24c7816355fd8
[ "Apache-2.0" ]
null
null
null
ESP8266/Programs/paginaHtmlConf.lua
giulianofiorotto/IoT-Framework-ESP8266
40dd21e3f3d627c0eb92b37294a24c7816355fd8
[ "Apache-2.0" ]
3
2017-03-24T16:39:25.000Z
2018-11-21T01:44:00.000Z
file.remove("configPage.lua") file.open("configPage.lua","w") file.writeline([[ <!DOCTYPE html> <html> <head> <title>ESP8266-12 conf</title> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css"> <link rel="stylesheet" href="http://192.168.0.3/ESP8266/moduleSetup.css"> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> </head> <body> <div class="container"> <div class="row"> <div class="col-sm-6 col-md-4 col-md-offset-4"> <h1 class="text-center login-title">Inserisci le credenziali per accedere alla tua rete WiFi</h1> <div class="account-wall"> <label class="text-center login-title">]]..wifi.sta.getip()..[[</label> <form class="form-signin" method="GET" action=""> <input type="text" class="form-control" placeholder="Nome modulo" name="nome" required> <input type="text" class="form-control" placeholder="SSID" name="SSID" required autofocus> <input type="password" class="form-control" placeholder="Password" name="password" required> <button class="btn btn-lg btn-primary btn-block" type="submit">Set</button> </form> </div> </div> </div> </div> </body> </html> ]]) file.close()
49.5
119
0.548425
eaef7e05e4755df0140f8fb7f7a7ac75cf24c7e2
619
sql
SQL
sql_stats/stats_complete_mapping.sql
thehyve/ohdsi-drug-mapping
90b441b210983c15acca1588d10bf2be91e2b842
[ "Apache-2.0" ]
3
2017-07-25T22:10:07.000Z
2018-05-31T01:35:48.000Z
sql_stats/stats_complete_mapping.sql
thehyve/ohdsi-drug-mapping
90b441b210983c15acca1588d10bf2be91e2b842
[ "Apache-2.0" ]
null
null
null
sql_stats/stats_complete_mapping.sql
thehyve/ohdsi-drug-mapping
90b441b210983c15acca1588d10bf2be91e2b842
[ "Apache-2.0" ]
null
null
null
SELECT concept_class_id, COUNT(DISTINCT vnr), ROUND( COUNT(DISTINCT vnr)*100/4754::decimal, 1) AS "Percentage based on Count", SUM(frequency), ROUND( SUM(frequency)*100/1093056::decimal, 1) AS "Percentage based on Frequency" -- Frequency is met dubbele tellingen voor drug component en drug form. FROM map.varenr_mapping_curated GROUP BY concept_class_id -- ORDER BY concept_class_id ; -- Manual mapping SELECT concept_class, COUNT(DISTINCT map_manual_drug.vnr), SUM(frequency) FROM auh.map_manual_drug JOIN auh.frequencies on frequencies.vnr = map_manual_drug.vnr GROUP BY concept_class ;
30.95
85
0.765751
572eed8b7aeb9aa7b29c33eec4747bfa32339596
451
h
C
include/sprites.h
hxhieu/32blit-hello
a44aa10291b54d9b0211f41e9a314b2f11235ac2
[ "MIT" ]
null
null
null
include/sprites.h
hxhieu/32blit-hello
a44aa10291b54d9b0211f41e9a314b2f11235ac2
[ "MIT" ]
null
null
null
include/sprites.h
hxhieu/32blit-hello
a44aa10291b54d9b0211f41e9a314b2f11235ac2
[ "MIT" ]
null
null
null
#pragma once #include <stdint.h> namespace mitmeo { namespace blit_invaders { namespace sprites { const uint8_t player_idle = 0; const uint8_t player_left = 1; const uint8_t player_right = 2; const uint8_t vulcan_1 = 16; const uint8_t vulcan_2 = 17; const uint8_t invader_lgreen_1 = 3; const uint8_t invader_lgreen_2 = 19; } } }
21.47619
48
0.560976
12b876750472c51f6c398301dc97cd1896990e51
1,456
tab
SQL
FR-12x12-CMR/all/8-32-ES-12STATES-60CMR00.tab
bidlom/Mendel2019-ES
24632a8582e2b18bd8367ecb599c9d4b58e7d7da
[ "BSD-3-Clause" ]
null
null
null
FR-12x12-CMR/all/8-32-ES-12STATES-60CMR00.tab
bidlom/Mendel2019-ES
24632a8582e2b18bd8367ecb599c9d4b58e7d7da
[ "BSD-3-Clause" ]
null
null
null
FR-12x12-CMR/all/8-32-ES-12STATES-60CMR00.tab
bidlom/Mendel2019-ES
24632a8582e2b18bd8367ecb599c9d4b58e7d7da
[ "BSD-3-Clause" ]
null
null
null
2 12 0 0 0 0 8 8 0 0 0 0 9 8 0 0 0 1 1 1 0 0 0 1 4 1 0 0 0 1 5 1 0 0 0 3 1 1 0 0 0 3 2 1 0 0 0 3 5 1 0 0 0 5 0 4 0 0 0 5 1 1 0 0 0 5 4 1 0 0 0 6 0 5 0 0 0 8 5 5 0 0 0 9 0 5 0 0 1 0 0 9 0 0 1 0 1 0 0 0 1 0 2 0 0 0 1 3 3 3 0 0 1 3 6 3 0 0 3 0 1 0 0 0 3 0 2 0 0 0 3 0 3 0 0 0 4 3 0 6 0 0 4 6 0 6 0 0 4 9 0 3 0 0 5 0 0 9 0 0 5 1 0 6 0 0 5 10 3 3 0 0 5 9 0 3 0 0 7 0 2 0 0 0 8 0 10 10 0 0 8 0 9 10 0 1 3 0 2 0 0 10 2 0 3 7 0 10 2 0 7 7 0 2 3 0 0 6 0 3 0 0 2 3 0 3 0 0 3 3 0 3 3 0 0 6 0 5 0 0 0 3 0 5 10 2 2 0 0 6 0 0 0 3 0 7 0 0 0 3 0 7 0 0 3 3 0 8 0 0 2 2 0 8 0 0 3 2 0 9 0 0 0 3 1 0 0 1 0 1 1 0 0 1 1 1 1 0 0 11 0 5 1 0 0 5 0 1 1 0 1 0 0 0 1 0 3 0 1 0 1 0 3 2 1 1 1 0 5 11 0 1 1 0 6 0 1 0 1 0 6 3 1 1 1 1 1 0 0 0 1 3 0 0 0 5 1 3 0 1 1 1 1 4 6 1 1 0 1 4 9 1 1 0 1 5 0 1 1 1 1 6 0 1 1 1 11 0 0 0 0 11 11 0 11 0 0 5 2 0 0 1 0 1 2 0 0 5 0 1 2 0 1 0 0 0 2 0 1 2 1 2 2 0 3 0 0 0 2 1 1 0 0 0 2 1 1 2 1 2 2 1 3 2 1 2 2 1 5 2 0 0 2 1 5 2 7 2 2 1 7 2 5 2 2 2 3 0 2 2 2 2 7 0 2 2 2 3 5 2 7 2 2 5 3 0 3 2 2 7 3 0 3 2 3 0 5 0 0 0 3 1 1 2 1 2 3 1 1 2 2 2 3 11 0 0 0 3 3 2 1 0 0 3 3 2 5 0 0 3 3 2 6 0 5 3 3 2 7 0 0 3 3 3 0 0 0 5 3 3 5 0 3 3 3 3 6 0 0 3 3 3 6 0 5 3 3 3 7 0 0 3 3 5 2 0 3 3 3 6 0 0 0 3 3 7 0 0 0 3 3 7 2 0 3 3 4 0 0 1 0 1 5 0 0 1 0 1 5 0 0 11 0 1 5 0 3 0 0 0 5 1 3 2 2 2 5 1 3 2 3 2 5 1 5 3 0 0 5 1 5 3 11 7 5 3 0 0 0 7 6 2 5 0 0 3 6 3 5 0 0 3 7 3 0 0 0 1 7 5 0 0 0 6 7 5 11 3 11 5 7 5 2 0 3 3 8 5 10 2 2 2 8 5 10 2 5 2 8 5 9 3 11 5 9 0 0 0 0 11 9 0 11 0 0 5
12.033058
13
0.508242
291450a80030f23d6de0ca41ad1801ed787388f4
465
py
Python
stock/views.py
shrionit/invoicegen_backend
88d7f670f2d74aab3fb7f4922bdf8711a24bd40f
[ "MIT" ]
null
null
null
stock/views.py
shrionit/invoicegen_backend
88d7f670f2d74aab3fb7f4922bdf8711a24bd40f
[ "MIT" ]
null
null
null
stock/views.py
shrionit/invoicegen_backend
88d7f670f2d74aab3fb7f4922bdf8711a24bd40f
[ "MIT" ]
null
null
null
from api.views import * from stock.serializers import * class StockViewSet(viewsets.ModelViewSet): queryset = Stock.objects.all() serializer_class = StockSerializer class RawMaterialViewSet(viewsets.ModelViewSet): queryset = RawMaterial.objects.all() serializer_class = RawMaterialSerializer class RawMaterialEntryViewSet(viewsets.ModelViewSet): queryset = RawMaterialEntry.objects.all() serializer_class = RawMaterialEntrySerializer
24.473684
53
0.791398
4b42af6cb5bedb3ec68f173853c500da5265038e
234
html
HTML
eventtools/templates/eventtools/month_calendar.html
atkinson/glamkit-eventtools
ed0b06c22ca3390506f4fac327493f871b0b4520
[ "BSD-3-Clause" ]
1
2015-11-05T10:26:49.000Z
2015-11-05T10:26:49.000Z
eventtools/templates/eventtools/month_calendar.html
atkinson/glamkit-eventtools
ed0b06c22ca3390506f4fac327493f871b0b4520
[ "BSD-3-Clause" ]
null
null
null
eventtools/templates/eventtools/month_calendar.html
atkinson/glamkit-eventtools
ed0b06c22ca3390506f4fac327493f871b0b4520
[ "BSD-3-Clause" ]
null
null
null
{% include 'eventtools/month_header.html' %} {% load month_calendar %} <tbody> {% for week in month_calendar %} <tr> {% for day in week %} {% annotated_day day day.classes day.events %} {% endfor %} </tr> {% endfor %} </tbody>
18
46
0.628205
8ed4388cb6ab71768b824f1868f1db41037be655
19,050
lua
Lua
app/src/main/assets/Files/games/default/files/stairs/init.lua
sergcomp/mobilecraft-v-1.0
b42d56cb0a24dabe32676a9b7c401b5e2ef1eaed
[ "Apache-2.0" ]
null
null
null
app/src/main/assets/Files/games/default/files/stairs/init.lua
sergcomp/mobilecraft-v-1.0
b42d56cb0a24dabe32676a9b7c401b5e2ef1eaed
[ "Apache-2.0" ]
null
null
null
app/src/main/assets/Files/games/default/files/stairs/init.lua
sergcomp/mobilecraft-v-1.0
b42d56cb0a24dabe32676a9b7c401b5e2ef1eaed
[ "Apache-2.0" ]
null
null
null
stairs = {} stairs.mod = "redo" function default.node_sound_wool_defaults(table) table = table or {} table.footstep = table.footstep or {name = "wool_coat_movement", gain = 1.0} table.dug = table.dug or {name = "wool_coat_movement", gain = 0.25} table.place = table.place or {name = "default_place_node", gain = 1.0} return table end stairs.wood = default.node_sound_wood_defaults() stairs.dirt = default.node_sound_dirt_defaults() stairs.stone = default.node_sound_stone_defaults() stairs.glass = default.node_sound_glass_defaults() stairs.leaves = default.node_sound_leaves_defaults() stairs.wool = default.node_sound_wool_defaults() -- Xanadu only --stairs.wool = stairs.leaves -- Node will be called stairs:stair_<subname> function stairs.register_stair(subname, recipeitem, groups, images, description, snds) minetest.register_node(":stairs:stair_" .. subname, { description = description.." Stair", -- drawtype = "nodebox", drawtype = "mesh", mesh = "stairs_stair.obj", tiles = images, paramtype = "light", paramtype2 = "facedir", is_ground_content = false, groups = groups, sounds = snds, -- node_box = { -- type = "fixed", -- fixed = { -- {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, -- {-0.5, 0, 0, 0.5, 0.5, 0.5}, -- }, -- }, selection_box = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, {-0.5, 0, 0, 0.5, 0.5, 0.5}, }, }, collision_box = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, {-0.5, 0, 0, 0.5, 0.5, 0.5}, }, }, on_place = minetest.rotate_node }) minetest.register_craft({ output = 'stairs:stair_' .. subname .. ' 6', recipe = { {recipeitem, recipeitem, recipeitem}, {"", recipeitem, ""}, {recipeitem, recipeitem, recipeitem}, }, }) end -- Node will be called stairs:slab_<subname> function stairs.register_slab(subname, recipeitem, groups, images, description, snds) minetest.register_node(":stairs:slab_" .. subname, { description = description.." Slab", drawtype = "nodebox", tiles = images, paramtype = "light", paramtype2 = "facedir", is_ground_content = false, groups = groups, sounds = snds, node_box = { type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, }, on_place = minetest.rotate_node }) minetest.register_craft({ output = 'stairs:slab_' .. subname .. ' 6', recipe = { {recipeitem, recipeitem, recipeitem}, }, }) end -- Node will be called stairs:corner_<subname> function stairs.register_corner(subname, recipeitem, groups, images, description, snds) minetest.register_node(":stairs:corner_" .. subname, { description = description.." Corner", drawtype = "nodebox", tiles = images, paramtype = "light", paramtype2 = "facedir", is_ground_content = false, groups = groups, sounds = snds, node_box = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, {-0.5, 0, 0, 0, 0.5, 0.5}, }, }, on_place = minetest.rotate_node }) minetest.register_craft({ output = 'stairs:corner_' .. subname .. ' 4', recipe = { {"", "", recipeitem}, {"", recipeitem, recipeitem}, {recipeitem, recipeitem, recipeitem}, }, }) end -- Node will be called stairs:invcorner_<subname> function stairs.register_invcorner(subname, recipeitem, groups, images, description, snds) minetest.register_node(":stairs:invcorner_" .. subname, { description = description.." Inverted Corner", drawtype = "nodebox", tiles = images, paramtype = "light", paramtype2 = "facedir", is_ground_content = false, groups = groups, sounds = snds, node_box = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, {-0.5, 0, 0, 0.5, 0.5, 0.5}, {-0.5, 0, -0.5, 0, 0.5, 0}, }, }, on_place = minetest.rotate_node }) minetest.register_craft({ output = 'stairs:invcorner_' .. subname .. ' 8', recipe = { {recipeitem, "", ""}, {recipeitem, recipeitem, ""}, {recipeitem, recipeitem, recipeitem}, }, }) end -- Nodes will be called stairs:{stair,slab,corner,invcorner}_<subname> function stairs.register_all(subname, recipeitem, groups, images, desc, snds) stairs.register_stair(subname, recipeitem, groups, images, desc, snds) stairs.register_slab(subname, recipeitem, groups, images, desc, snds) stairs.register_corner(subname, recipeitem, groups, images, desc, snds) stairs.register_invcorner(subname, recipeitem, groups, images, desc, snds) end -- Helper local grp = {} --= Default Minetest stairs.register_all("wood", "default:wood", {choppy=2,oddly_breakable_by_hand=2,flammable=3}, {"default_wood.png"}, "Wooden", stairs.wood) stairs.register_all("junglewood", "default:junglewood", {choppy=2,oddly_breakable_by_hand=2,flammable=3, not_in_craft_guide=1}, {"default_junglewood.png"}, "Jungle Wood", stairs.wood) stairs.register_all("pine_wood", "default:pinewood", {choppy=2,oddly_breakable_by_hand=1,flammable=3, not_in_craft_guide=1}, {"default_pine_wood.png"}, "Pine Wood", stairs.wood) stairs.register_all("cobble", "default:cobble", {cracky=3,stone=2}, {"default_cobble.png"}, "Cobble", stairs.stone) stairs.register_all("mossy_cobble", "default:mossycobble", {cracky=3, stone=2, not_in_craft_guide=1}, {"default_mossycobble.png"}, "Mossy Cobble", stairs.stone) stairs.register_all("cloud", "default:cloud", {unbreakable=1, not_in_craft_guide=1}, {"default_cloud.png"}, "Cloud", stairs.wool) stairs.register_all("coal", "default:coalblock", {cracky=3, not_in_craft_guide=1}, {"default_coal_block.png"}, "Coal", stairs.stone) stairs.register_all("steel", "default:steelblock", {cracky=1,level=2, not_in_craft_guide=1}, {"default_steel_block.png"}, "Steel", stairs.stone) stairs.register_all("gold", "default:goldblock", {cracky=1, not_in_craft_guide=1}, {"default_gold_block.png"}, "Gold", stairs.stone) stairs.register_all("diamond", "default:diamondblock", {cracky=1,level=3, not_in_craft_guide=1}, {"default_diamond_block.png"}, "Diamond", stairs.stone) stairs.register_all("stone", "default:stone", {cracky=3,stone=1, not_in_craft_guide=1}, {"default_stone.png"}, "Stone", stairs.stone) stairs.register_all("mossycobble", "default:mossycobble", {cracky=3, not_in_craft_guide=1}, {"default_mossycobble.png"}, "Mossy Cobble", stairs.stone) stairs.register_all("brick", "default:brick", {cracky=3, not_in_craft_guide=1}, {"default_brick.png"}, "Brick", stairs.stone) stairs.register_all("sandstone", "default:sandstone", {crumbly=2,cracky=3, not_in_craft_guide=1}, {"default_sandstone_bottom.png"}, "Sandstone", stairs.stone) stairs.register_all("glass", "default:glass", {cracky=3,oddly_breakable_by_hand=3, not_in_craft_guide=1}, {"default_glass.png"}, "Glass", stairs.glass) stairs.register_all("obsidian", "default:obsidian", {cracky=1,level=2, unbreakable=1, not_in_craft_guide=1}, {"default_obsidian.png"}, "Obsidian", stairs.stone) stairs.register_all("stonebrick", "default:stonebrick", {cracky=2,stone=1, not_in_craft_guide=1}, {"default_stone_brick.png"}, "Stone Brick", stairs.stone) --= Farming Mod if minetest.get_modpath("farming") then stairs.register_all("straw", "farming:straw", {snappy = 3, flammable = 4, not_in_craft_guide = 1}, {"farming_straw.png"}, "Straw", stairs.leaves) end --= Mobs Mod if mobs and mobs.mod and mobs.mod == "redo" then grp = {crumbly = 3, flammable = 2, not_in_craft_guide = 1} stairs.register_all("cheeseblock", "mobs:cheeseblock", grp, {"mobs_cheeseblock.png"}, "Cheese Block", stairs.dirt) stairs.register_all("honey_block", "mobs:honey_block", grp, {"mobs_honey_block.png"}, "Honey Block", stairs.dirt) end --= Lapis Mod if minetest.get_modpath("lapis") then grp = {cracky = 3, not_in_craft_guide = 1} stairs.register_all("lapis", "lapis:lapisblock", grp, {"lapis_block.png"}, "Lapis", stairs.stone) stairs.register_all("lapis_brick", "lapis:lapis_brick", grp, {"lapis_brick.png"}, "Lapis Brick", stairs.stone) stairs.register_all("lapis_cobble", "lapis:lapis_cobble", grp, {"lapis_cobble.png"}, "Lapis Cobble", stairs.stone) stairs.register_all("lazurite", "lapis:lazurite", grp, {"lapis_lazurite.png"}, "Lazurite", stairs.stone) stairs.register_all("lazurite_brick", "lapis:lazurite_brick", grp, {"lapis_lazurite_brick.png"}, "Lazurite Brick", stairs.stone) end --= Homedecor Mod if minetest.get_modpath("homedecor") then local grp = {snappy = 3} stairs.register_all("shingles_asphalt", "homedecor:shingles_asphalt", grp, {"homedecor_shingles_asphalt.png"}, "Asphalt Shingle", stairs.leaves) stairs.register_all("shingles_terracotta", "homedecor:roof_tile_terracotta", grp, {"homedecor_shingles_terracotta.png"}, "Terracotta Shingle", stairs.leaves) stairs.register_all("shingles_wood", "homedecor:shingles_wood", grp, {"homedecor_shingles_wood.png"}, "Wooden Shingle", stairs.leaves) end --= Xanadu Mod if minetest.get_modpath("xanadu") then grp = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, not_in_craft_guide = 1} minetest.register_alias("stairs:slab_stained_wood_brown", "stairs:slab_junglewood") minetest.register_alias("stairs:stair_stained_wood_brown", "stairs:stair_junglewood") minetest.register_alias("stairs:invcorner_stained_wood_brown", "stairs:invcorner_junglewood") minetest.register_alias("stairs:corner_stained_wood_brown", "stairs:corner_junglewood") stairs.register_all("stained_wood_white", "xanadu:stained_wood_white", grp, {"stained_wood_white.png"}, "White Wooden", stairs.wood) minetest.register_alias("stairs:slab_stained_wood_pink", "stairs:slab_acacia_wood") minetest.register_alias("stairs:stair_stained_wood_pink", "stairs:stair_acacia_wood") minetest.register_alias("stairs:invcorner_stained_wood_pink", "stairs:invcorner_acacia_wood") minetest.register_alias("stairs:corner_stained_wood_pink", "stairs:corner_acacia_wood") stairs.register_all("stained_wood_red", "xanadu:stained_wood_red", grp, {"stained_wood_red.png"}, "Red Wooden", stairs.wood) -- Decorative blocks grp = {cracky = 3, not_in_craft_guide = 1} stairs.register_all("stone1", "bakedclay:stone1", grp, {"stone1.png"}, "Decorative Stone 1", stairs.stone) stairs.register_all("stone2", "bakedclay:stone2", grp, {"stone2.png"}, "Decorative Stone 2", stairs.stone) stairs.register_all("stone3", "bakedclay:stone3", grp, {"stone3.png"}, "Decorative Stone 3", stairs.stone) stairs.register_all("stone4", "bakedclay:stone4", grp, {"stone4.png"}, "Decorative Stone 4", stairs.stone) stairs.register_all("stone5", "bakedclay:stone5", grp, {"stone5.png"}, "Decorative Stone 5", stairs.stone) stairs.register_all("stone6", "bakedclay:stone6", grp, {"stone6.png"}, "Decorative Stone 6", stairs.stone) stairs.register_all("sandstonebrick4", "bakedclay:sandstonebrick4", grp, {"sandstonebrick4.png"}, "Decorative Sandstone 4", stairs.stone) stairs.register_slab("desert_cobble1", "bakedclay:desert_cobble1", grp, {"desert_cobble1.png"}, "Decorative desert cobble 1", stairs.stone) stairs.register_slab("desert_cobble5", "bakedclay:desert_cobble5", grp, {"desert_cobble5.png"}, "Decorative desert cobble 5", stairs.stone) stairs.register_slab("desert_stone1", "bakedclay:desert_stone1", grp, {"desert_stone1.png"}, "Decorative desert stone 1", stairs.stone) stairs.register_slab("desert_stone3", "bakedclay:desert_stone3", grp, {"desert_stone3.png"}, "Decorative desert stone 3", stairs.stone) stairs.register_slab("desert_stone4", "bakedclay:desert_stone4", grp, {"desert_stone4.png"}, "Decorative desert stone 4", stairs.stone) stairs.register_slab("desert_stone5", "bakedclay:desert_stone5", grp, {"desert_stone5.png"}, "Decorative desert stone 5", stairs.stone) stairs.register_slab("red1", "bakedclay:red1", grp, {"baked_clay_red1.png"}, "Decorative baked red clay 1", stairs.stone) stairs.register_all("bred2", "bakedclay:red2", grp, {"baked_clay_red2.png"}, "Decorative baked red clay 2", stairs.stone) end --= Baked Clay mod if minetest.get_modpath("bakedclay") then grp = {cracky = 3, not_in_craft_guide = 1} stairs.register_all("bakedclay_white", "bakedclay:white", grp, {"baked_clay_white.png"}, "Baked Clay White", stairs.stone) stairs.register_all("bakedclay_grey", "bakedclay:grey", grp, {"baked_clay_grey.png"}, "Baked Clay Grey", stairs.stone) stairs.register_all("bakedclay_black", "bakedclay:black", grp, {"baked_clay_black.png"}, "Baked Clay Black", stairs.stone) stairs.register_all("bakedclay_red", "bakedclay:red", grp, {"baked_clay_red.png"}, "Baked Clay Red", stairs.stone) stairs.register_all("bakedclay_yellow", "bakedclay:yellow", grp, {"baked_clay_yellow.png"}, "Baked Clay Yellow", stairs.stone) stairs.register_all("bakedclay_green", "bakedclay:green", grp, {"baked_clay_green.png"}, "Baked Clay Green", stairs.stone) stairs.register_all("bakedclay_cyan", "bakedclay:cyan", grp, {"baked_clay_cyan.png"}, "Baked Clay Cyan", stairs.stone) stairs.register_all("bakedclay_blue", "bakedclay:blue", grp, {"baked_clay_blue.png"}, "Baked Clay Blue", stairs.stone) stairs.register_all("bakedclay_magenta", "bakedclay:magenta", grp, {"baked_clay_magenta.png"}, "Baked Clay Magenta", stairs.stone) stairs.register_all("bakedclay_orange", "bakedclay:orange", grp, {"baked_clay_orange.png"}, "Baked Clay Orange", stairs.stone) stairs.register_all("bakedclay_violet", "bakedclay:violet", grp, {"baked_clay_violet.png"}, "Baked Clay Violet", stairs.stone) stairs.register_all("bakedclay_brown", "bakedclay:brown", grp, {"baked_clay_brown.png"}, "Baked Clay Brown", stairs.stone) stairs.register_all("bakedclay_pink", "bakedclay:pink", grp, {"baked_clay_pink.png"}, "Baked Clay Pink", stairs.stone) stairs.register_all("bakedclay_dark_grey", "bakedclay:dark_grey", grp, {"baked_clay_dark_grey.png"}, "Baked Clay Dark Grey", stairs.stone) stairs.register_all("bakedclay_dark_green", "bakedclay:dark_green", grp, {"baked_clay_dark_green.png"}, "Baked Clay Dark Green", stairs.stone) end --= Castle Mod if minetest.get_modpath("castle") then stairs.register_all("pavement", "castle:pavement", {cracky=2, not_in_craft_guide=1}, {"castle_pavement_brick.png"}, "Paving", stairs.stone) stairs.register_all("dungeon_stone", "castle:dungeon_stone", {cracky=2, not_in_craft_guide=1}, {"castle_dungeon_stone.png"}, "Dungeon", stairs.stone) stairs.register_all("stonewall", "castle:stonewall", {cracky=3, not_in_craft_guide=1}, {"castle_stonewall.png"}, "Castle Wall", stairs.stone) end --= Ethereal Mod if minetest.get_modpath("ethereal") then stairs.register_all("bamboo_floor", "ethereal:bamboo_floor", {snappy = 3, choppy = 3 , flammable=2, not_in_craft_guide=1}, {"bamboo_floor.png"}, "Bamboo", stairs.wood) stairs.register_all("crystal_block", "ethereal:crystal_block", {cracky=1, level=2, not_in_craft_guide=1}, {"crystal_block.png"}, "Crystal Block", stairs.glass) stairs.register_all("icebrick", "ethereal:icebrick", {crumbly=3, melts = 1, not_in_craft_guide=1}, {"brick_ice.png"}, "Ice Brick", stairs.glass) stairs.register_all("snowbrick", "ethereal:snowbrick", {crumbly=3, melts = 1, not_in_craft_guide=1}, {"brick_snow.png"}, "Snow Brick", default.node_sound_dirt_defaults({ footstep = {name="default_snow_footstep", gain=0.25}, dug = {name="default_snow_footstep", gain=0.75}, })) stairs.register_all("dry_dirt", "ethereal:dry_dirt", {crumbly=3, not_in_craft_guide=1}, {"ethereal_dry_dirt.png"}, "Dry Dirt", stairs.dirt) stairs.register_all("mushroom_trunk", "ethereal:mushroom_trunk", {choppy=2,oddly_breakable_by_hand=1,flammable=2, not_in_craft_guide=1}, {"mushroom_trunk.png"}, "Mushroom Trunk", stairs.wood) stairs.register_all("mushroom", "ethereal:mushroom", {choppy=2,oddly_breakable_by_hand=1,flammable=2, not_in_craft_guide=1}, {"mushroom_block.png"}, "Mushroom Top", stairs.wood) stairs.register_all("frost_wood", "ethereal:frost_wood", {choppy=2,oddly_breakable_by_hand=1,put_out_fire=1, not_in_craft_guide=1}, {"frost_wood.png"}, "Frost Wood", stairs.wood) stairs.register_all("yellow_wood", "ethereal:yellow_wood", {choppy=2,oddly_breakable_by_hand=1,put_out_fire=1, not_in_craft_guide=1}, {"yellow_wood.png"}, "Healing Tree Wood", stairs.wood) stairs.register_all("palm_wood", "ethereal:palm_wood", {choppy=2,oddly_breakable_by_hand=1,flammable=3, not_in_craft_guide=1}, {"moretrees_palm_wood.png"}, "Palm Wood", stairs.wood) stairs.register_all("banana_wood", "ethereal:banana_wood", {choppy=2,oddly_breakable_by_hand=1,flammable=3, not_in_craft_guide=1}, {"banana_wood.png"}, "Banana Wood", stairs.wood) stairs.register_all("willow_wood", "ethereal:willow_wood", {choppy=2,oddly_breakable_by_hand=1,flammable=3, not_in_craft_guide=1}, {"willow_wood.png"}, "Willow Wood", stairs.wood) stairs.register_all("redwood_wood", "ethereal:redwood_wood", {choppy=2,oddly_breakable_by_hand=1,flammable=3, not_in_craft_guide=1}, {"redwood_wood.png"}, "Redwood Wood", stairs.wood) stairs.register_all("acacia_wood", "ethereal:acacia_wood", {choppy=2,oddly_breakable_by_hand=1,flammable=3, not_in_craft_guide=1}, {"moretrees_acacia_wood.png"}, "Acacia Wood", stairs.wood) end --= Wool Mod if minetest.get_modpath("wool") then grp = { snappy = 2, choppy = 2, oddly_breakable_by_hand = 3, flammable = 3, wool = 1, not_in_craft_guide = 1 } stairs.register_all("wool_white", "wool:white", grp, {"wool_white.png"}, "White Wool", stairs.wool) stairs.register_all("wool_grey", "wool:grey", grp, {"wool_grey.png"}, "Grey Wool", stairs.wool) stairs.register_all("wool_black", "wool:black", grp, {"wool_black.png"}, "Black Wool", stairs.wool) stairs.register_all("wool_red", "wool:red", grp, {"wool_red.png"}, "Red Wool", stairs.wool) stairs.register_all("wool_yellow", "wool:yellow", grp, {"wool_yellow.png"}, "Yellow Wool", stairs.wool) stairs.register_all("wool_green", "wool:green", grp, {"wool_green.png"}, "Green Wool", stairs.wool) stairs.register_all("wool_cyan", "wool:cyan", grp, {"wool_cyan.png"}, "Cyan Wool", stairs.wool) stairs.register_all("wool_blue", "wool:blue", grp, {"wool_blue.png"}, "Blue Wool", stairs.wool) stairs.register_all("wool_magenta", "wool:magenta", grp, {"wool_magenta.png"}, "Magenta Wool", stairs.wool) stairs.register_all("wool_orange", "wool:orange", grp, {"wool_orange.png"}, "Orange Wool", stairs.wool) stairs.register_all("wool_violet", "wool:violet", grp, {"wool_violet.png"}, "Violet Wool", stairs.wool) stairs.register_all("wool_brown", "wool:brown", grp, {"wool_brown.png"}, "Brown Wool", stairs.wool) stairs.register_all("wool_pink", "wool:pink", grp, {"wool_pink.png"}, "Pink Wool", stairs.wool) stairs.register_all("wool_dark_grey", "wool:dark_grey", grp, {"wool_dark_grey.png"}, "Dark Grey Wool", stairs.wool) stairs.register_all("wool_dark_green", "wool:dark_green", grp, {"wool_dark_green.png"}, "Dark Green Wool", stairs.wool) end
23.576733
93
0.715066
5533ec1b362b580ec1bcd0dddce78ce7533b4708
1,269
sql
SQL
queries/Stream Analytics - SQL Queries/archive/conversations_view.sql
traceyt/cdchealthbot
36af074d1d8ee04d63c5cc070f311ad6dacfdbf9
[ "MIT" ]
null
null
null
queries/Stream Analytics - SQL Queries/archive/conversations_view.sql
traceyt/cdchealthbot
36af074d1d8ee04d63c5cc070f311ad6dacfdbf9
[ "MIT" ]
3
2020-04-09T12:56:00.000Z
2021-05-11T10:08:37.000Z
queries/Stream Analytics - SQL Queries/archive/conversations_view.sql
traceyt/cdchealthbot
36af074d1d8ee04d63c5cc070f311ad6dacfdbf9
[ "MIT" ]
null
null
null
drop view Conversations_View SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE VIEW [dbo].[Conversations_View] AS SELECT * From ( select [dbo].[Steps].convid, FORMAT ([Messages].[eventtime], 'yyyy-MM-dd') as [date], FORMAT ([Messages].[eventtime], 'HH') as [hour], [dbo].[Steps].steplabel, [dbo].[Steps].stepresponseentity FROM [dbo].[Steps] inner join [dbo].[Messages] on [dbo].[Messages].convid = [dbo].[Steps].convid inner join [dbo].[Messages] Messages2 on Messages2.convid = [dbo].[Steps].convid where [dbo].[Messages].eventtype = 'ScenarioStart' and [Messages].dialogname like ('%/scenarios/covid19') and Messages2.eventtype = 'ScenarioEnded' and [Messages2].dialogname like ('%/scenarios/covid19_core') and not exists ( select count(*) as [count], convid from Messages where dialogname like ('%/scenarios/covid19') and eventtype = 'ScenarioStart' and [Messages].convid = [Steps].convid group by convid having count(*) > 1 ) ) as Source PIVOT(Min(stepResponseEntity) for [steplabel] in ([State], [Gender], [Age], [Ill], [LTCF], [HCF], [ED SYM], [911 SYM])) as PivotTable ; GO
42.3
145
0.617809
acf39c8f42463bca096458f30087454f0d14bc41
3,831
hpp
C++
src/greenlet/greenlet_thread_state_dict_cleanup.hpp
SouvikGhosh05/greenlet
3e534d6b7b758d07880e3fef6678fffde4d30b2f
[ "PSF-2.0", "MIT" ]
1,089
2015-01-03T11:02:54.000Z
2022-03-31T04:37:57.000Z
src/greenlet/greenlet_thread_state_dict_cleanup.hpp
SouvikGhosh05/greenlet
3e534d6b7b758d07880e3fef6678fffde4d30b2f
[ "PSF-2.0", "MIT" ]
195
2015-01-22T21:54:22.000Z
2022-03-29T06:00:20.000Z
src/greenlet/greenlet_thread_state_dict_cleanup.hpp
SouvikGhosh05/greenlet
3e534d6b7b758d07880e3fef6678fffde4d30b2f
[ "PSF-2.0", "MIT" ]
205
2015-01-03T01:59:52.000Z
2022-03-15T08:32:24.000Z
#ifndef GREENLET_THREAD_STATE_DICT_CLEANUP_HPP #define GREENLET_THREAD_STATE_DICT_CLEANUP_HPP #include "greenlet_internal.hpp" #include "greenlet_thread_state.hpp" #ifdef __clang__ # pragma clang diagnostic push # pragma clang diagnostic ignored "-Wmissing-field-initializers" #endif #ifndef G_THREAD_STATE_DICT_CLEANUP_TYPE // shut the compiler up if it looks at this file in isolation #define ThreadStateCreator int #endif // Define a Python object that goes in the Python thread state dict // when the greenlet thread state is created, and which owns the // reference to the greenlet thread local state. // When the thread state dict is cleaned up, so too is the thread // state. This works best if we make sure there are no circular // references to the thread state. typedef struct _PyGreenletCleanup { PyObject_HEAD ThreadStateCreator* thread_state_creator; } PyGreenletCleanup; static void cleanup_do_dealloc(PyGreenletCleanup* self) { ThreadStateCreator* tmp = self->thread_state_creator; self->thread_state_creator = nullptr; if (tmp) { delete tmp; } } static void cleanup_dealloc(PyGreenletCleanup* self) { PyObject_GC_UnTrack(self); cleanup_do_dealloc(self); } static int cleanup_clear(PyGreenletCleanup* self) { // This method is never called by our test cases. cleanup_do_dealloc(self); return 0; } static int cleanup_traverse(PyGreenletCleanup* self, visitproc visit, void* arg) { if (self->thread_state_creator) { return self->thread_state_creator->tp_traverse(visit, arg); } return 0; } static int cleanup_is_gc(PyGreenlet* UNUSED(self)) { return 1; } static PyTypeObject PyGreenletCleanup_Type = { PyVarObject_HEAD_INIT(NULL, 0) "greenlet._greenlet.ThreadStateCleanup", sizeof(struct _PyGreenletCleanup), 0, /* tp_itemsize */ /* methods */ (destructor)cleanup_dealloc, /* tp_dealloc */ 0, /* tp_print */ 0, /* tp_getattr */ 0, /* tp_setattr */ 0, /* tp_compare */ 0, /* tp_repr */ 0, /* tp_as _number*/ 0, /* tp_as _sequence*/ 0, /* tp_as _mapping*/ 0, /* tp_hash */ 0, /* tp_call */ 0, /* tp_str */ 0, /* tp_getattro */ 0, /* tp_setattro */ 0, /* tp_as_buffer*/ G_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ "Internal use only", /* tp_doc */ (traverseproc)cleanup_traverse, /* tp_traverse */ (inquiry)cleanup_clear, /* tp_clear */ 0, /* tp_richcompare */ // XXX: Don't our flags promise a weakref? 0, /* tp_weaklistoffset */ 0, /* tp_iter */ 0, /* tp_iternext */ 0, /* tp_methods */ 0, /* tp_members */ 0, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ 0, /* tp_descr_set */ 0, /* tp_dictoffset */ 0, /* tp_init */ PyType_GenericAlloc, /* tp_alloc */ PyType_GenericNew, /* tp_new */ PyObject_GC_Del, /* tp_free */ (inquiry)cleanup_is_gc, /* tp_is_gc */ }; #ifdef __clang__ # pragma clang diagnostic pop #endif #endif
32.193277
69
0.536674
e825d5d087e774c063b3c2f3ca42ef51544fa843
223
asm
Assembly
util/system/context_x86.asm
HeyLey/catboost
f472aed90604ebe727537d9d4a37147985e10ec2
[ "Apache-2.0" ]
6,989
2017-07-18T06:23:18.000Z
2022-03-31T15:58:36.000Z
util/system/context_x86.asm
HeyLey/catboost
f472aed90604ebe727537d9d4a37147985e10ec2
[ "Apache-2.0" ]
1,978
2017-07-18T09:17:58.000Z
2022-03-31T14:28:43.000Z
util/system/context_x86.asm
HeyLey/catboost
f472aed90604ebe727537d9d4a37147985e10ec2
[ "Apache-2.0" ]
1,228
2017-07-18T09:03:13.000Z
2022-03-29T05:57:40.000Z
%macro EXPORT 1 %ifdef DARWIN global _%1 _%1: %else global %1 %1: %endif %endmacro %ifdef _x86_64_ %include "context_x86_64.asm" %else %include "context_i686.asm" %endif
13.9375
33
0.565022
04f5de8a52bebd27c9a22e006643b4be41d02931
654
java
Java
storage/db/src/main/java/org/artifactory/storage/db/aql/sql/builder/query/sql/type/BuildModuleSqlGenerator.java
alancnet/artifactory
7ac3ea76471a00543eaf60e82b554d8edd894c0f
[ "Apache-2.0" ]
3
2016-01-21T11:49:08.000Z
2018-12-11T21:02:11.000Z
storage/db/src/main/java/org/artifactory/storage/db/aql/sql/builder/query/sql/type/BuildModuleSqlGenerator.java
alancnet/artifactory
7ac3ea76471a00543eaf60e82b554d8edd894c0f
[ "Apache-2.0" ]
null
null
null
storage/db/src/main/java/org/artifactory/storage/db/aql/sql/builder/query/sql/type/BuildModuleSqlGenerator.java
alancnet/artifactory
7ac3ea76471a00543eaf60e82b554d8edd894c0f
[ "Apache-2.0" ]
5
2015-12-08T10:22:21.000Z
2021-06-15T16:14:00.000Z
package org.artifactory.storage.db.aql.sql.builder.query.sql.type; import com.google.common.collect.Lists; import org.artifactory.storage.db.aql.sql.builder.links.TableLink; import org.artifactory.storage.db.aql.sql.model.SqlTableEnum; import java.util.List; /** * The class contains tweaking information and optimizations for Build module . * * @author Gidi Shabat */ public class BuildModuleSqlGenerator extends BasicSqlGenerator { @Override protected List<TableLink> getExclude() { return Lists.newArrayList(); } @Override protected SqlTableEnum getMainTable() { return SqlTableEnum.build_modules; } }
25.153846
79
0.746177
8fbe019827f7ac4f32fbd0a998bd94f4840430cb
526
sql
SQL
toolchain/db/0008-add-features.sql
bokesan/icfpcontest2021.github.io
ee54acf7d3cadaf4e5e027cbf7d8023c94250a0a
[ "BSD-3-Clause" ]
8
2021-06-24T17:42:02.000Z
2021-08-11T16:24:29.000Z
toolchain/db/0008-add-features.sql
bokesan/icfpcontest2021.github.io
ee54acf7d3cadaf4e5e027cbf7d8023c94250a0a
[ "BSD-3-Clause" ]
5
2021-06-15T07:23:21.000Z
2021-08-03T12:56:53.000Z
toolchain/db/0008-add-features.sql
bokesan/icfpcontest2021.github.io
ee54acf7d3cadaf4e5e027cbf7d8023c94250a0a
[ "BSD-3-Clause" ]
4
2021-07-12T11:51:02.000Z
2021-08-03T12:20:16.000Z
DO $do$ DECLARE _version INT := 8; BEGIN IF EXISTS (SELECT version FROM db_version WHERE version < _version) THEN CREATE TABLE features ( id BOOL PRIMARY KEY DEFAULT TRUE, bonuses BOOL NOT NULL DEFAULT FALSE, -- Only allow a single row. CONSTRAINT features_id_single CHECK (id) ); INSERT INTO features DEFAULT VALUES; REVOKE DELETE, TRUNCATE ON features FROM public; UPDATE db_version SET version = _version; END IF; END $do$
27.684211
76
0.631179
9357427919e263b0388c54c586b1d5d7f236a291
40
psm1
PowerShell
modules/AWSPowerShell/Cmdlets/AppMesh/AWS.Tools.AppMesh.Aliases.psm1
ajsing/aws-tools-for-powershell
25372542f23afd465fc419c4ec1f6175d7f3dee2
[ "Apache-2.0" ]
181
2019-03-29T16:45:16.000Z
2022-03-24T22:46:45.000Z
modules/AWSPowerShell/Cmdlets/AppMesh/AWS.Tools.AppMesh.Aliases.psm1
lukeenterprise/aws-tools-for-powershell
acc809bc80d092fc1fb2c21780ff9ea06f3d104c
[ "Apache-2.0" ]
233
2019-03-29T12:22:54.000Z
2022-03-30T08:14:56.000Z
modules/AWSPowerShell/Cmdlets/AppMesh/AWS.Tools.AppMesh.Aliases.psm1
lukeenterprise/aws-tools-for-powershell
acc809bc80d092fc1fb2c21780ff9ea06f3d104c
[ "Apache-2.0" ]
70
2019-05-09T05:43:10.000Z
2022-02-22T15:09:32.000Z
# AppMesh Export-ModuleMember -Alias *
13.333333
28
0.75
90e62ba00894ce3da4d2bdf065f0a727caee38db
14,498
py
Python
source/repositories/create_config.py
stackArmor/compliant-framework-for-federal-and-dod-workloads-in-aws-govcloud-us
8d2aa7426e352242bbded64e3c6da88199aef025
[ "Apache-2.0" ]
36
2020-12-22T18:40:50.000Z
2022-03-23T03:48:13.000Z
source/repositories/create_config.py
stackArmor/compliant-framework-for-federal-and-dod-workloads-in-aws-govcloud-us
8d2aa7426e352242bbded64e3c6da88199aef025
[ "Apache-2.0" ]
10
2021-03-01T20:29:10.000Z
2022-02-15T23:28:58.000Z
source/repositories/create_config.py
stackArmor/compliant-framework-for-federal-and-dod-workloads-in-aws-govcloud-us
8d2aa7426e352242bbded64e3c6da88199aef025
[ "Apache-2.0" ]
17
2020-12-18T15:23:15.000Z
2022-03-20T17:47:39.000Z
###################################################################################################################### # Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # # # Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance # # with the License. A copy of the License is located at # # # # http://www.apache.org/licenses/LICENSE-2.0 # # # # or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES # # OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions # # and limitations under the License. # ###################################################################################################################### import json import boto3 import optparse SSM_GOVCLOUD_CENTRAL_ACCOUNT_ID = '/compliant/framework/central/aws-us-gov/id' SSM_GOVCLOUD_LOGGING_ACCOUNT_ID = '/compliant/framework/accounts/core/logging/aws-us-gov/id' SSM_GOVCLOUD_TRANSIT_ACCOUNT_ID = '/compliant/framework/accounts/prod/transit/aws-us-gov/id' SSM_GOVCLOUD_MANAGEMENT_SERVICES_ACCOUNT_ID = '/compliant/framework/accounts/prod/management-services/aws-us-gov/id' def get_param(parameter_key): class ParameterNotFoundException(Exception): pass for stack in stack_data['Stacks']: for parameter in stack['Parameters']: if (parameter_key == parameter['ParameterKey']): return parameter['ParameterValue'] raise ParameterNotFoundException() def get_config(): ssm_client = boto3.client('ssm') central_account_id = ssm_client.get_parameter( Name=SSM_GOVCLOUD_CENTRAL_ACCOUNT_ID )['Parameter']['Value'] logging_account_id = ssm_client.get_parameter( Name=SSM_GOVCLOUD_LOGGING_ACCOUNT_ID )['Parameter']['Value'] transit_account_id = ssm_client.get_parameter( Name=SSM_GOVCLOUD_TRANSIT_ACCOUNT_ID )['Parameter']['Value'] management_services_account_id = ssm_client.get_parameter( Name=SSM_GOVCLOUD_MANAGEMENT_SERVICES_ACCOUNT_ID )['Parameter']['Value'] return { 'partition': 'aws-us-gov', 'region': 'us-gov-west-1', 'complianceSet': 'tbd', 'core': { 'notificationsEmail': get_param('frameworkNotificationEmail'), "primaryRegion": "us-gov-west-1" }, "deployToRegions": [ "us-gov-west-1" ], 'environments': [ 'default' ], 'stackSets': { 'security-baseline': { 'parameters': { 'pNotificationsEmail': get_param('environmentNotificationEmail') } }, 'backup-services': { 'parameters': {} } }, 'federation': { 'enabled': False }, 'central': { 'accountId': central_account_id, 'organizationId': organization_id, 'ssmParameters': { '/compliant/framework/logging/account/id': logging_account_id, '/compliant/framework/central/service-catalog/provider-name': 'Central Services', '/compliant/framework/central/service-catalog/access-role-name': 'CompliantFrameworkAccountAccessRole' } }, 'logging': { 'accountId': logging_account_id }, 'transit': { "us-gov-west-1": { 'environments': { 'default': { 'accountId': transit_account_id } }, 'enableVpcFirewall': False, 'enableVirtualFirewall': True, 'ssmParameters': { # # Transit Gateway # '/compliant/framework/transit/transit-gateway/amazon-side-asn': get_param('transitGatewayAmazonSideAsn'), '/compliant/framework/transit/firewall-vpc/virtual-firewall/a/asn': get_param('firewallAAsn'), '/compliant/framework/transit/firewall-vpc/virtual-firewall/b/asn': get_param('firewallBAsn'), # # Transit - Firewall VPC # '/compliant/framework/transit/firewall-vpc/cidr': get_param('firewallVpcCidrBlock'), '/compliant/framework/transit/firewall-vpc/nipr-cidr': get_param('firewallVpcNiprCidrBlock'), '/compliant/framework/transit/firewall-vpc/instance-tenancy': get_param('firewallVpcInstanceTenancy'), '/compliant/framework/transit/firewall-vpc/external-subnet/a/cidr': get_param('firewallVpcExternalSubnetACidrBlock'), '/compliant/framework/transit/firewall-vpc/external-subnet/b/cidr': get_param('firewallVpcExternalSubnetBCidrBlock'), # '/compliant/framework/transit/firewall-vpc/external-subnet/c/cidr': get_param('firewallVpcExternalSubnetCCidrBlock'), '/compliant/framework/transit/firewall-vpc/internal-subnet/a/cidr': get_param('firewallVpcInternalSubnetACidrBlock'), '/compliant/framework/transit/firewall-vpc/internal-subnet/b/cidr': get_param('firewallVpcInternalSubnetBCidrBlock'), # '/compliant/framework/transit/firewall-vpc/internal-subnet/c/cidr': get_param('firewallVpcInternalSubnetCCidrBlock'), '/compliant/framework/transit/firewall-vpc/management-subnet/a/cidr': get_param('firewallVpcManagementSubnetACidrBlock'), '/compliant/framework/transit/firewall-vpc/management-subnet/b/cidr': get_param('firewallVpcManagementSubnetBCidrBlock'), # '/compliant/framework/transit/firewall-vpc/management-subnet/c/cidr': get_param('firewallVpcManagementSubnetCCidrBlock'), '/compliant/framework/transit/firewall-vpc/tgw-attach-subnet/a/cidr': get_param('firewallVpcTransitGatewayAttachmentSubnetACidrBlock'), '/compliant/framework/transit/firewall-vpc/tgw-attach-subnet/b/cidr': get_param('firewallVpcTransitGatewayAttachmentSubnetBCidrBlock'), # '/compliant/framework/transit/firewall-vpc/tgw-attach-subnet/c/cidr': get_param('firewallVpcTransitGatewayAttachmentSubnetCCidrBlock'), '/compliant/framework/transit/firewall-vpc/igw/enabled': True, '/compliant/framework/transit/firewall-vpc/tgw/attached': True, } } }, 'managementServices': { "us-gov-west-1": { 'environments': { 'default': { 'accountId': management_services_account_id } }, 'enableDirectoryVpc': True, 'enableExternalAccessVpc': True, 'ssmParameters': { # # Management Services - Management Services VPC # '/compliant/framework/management-services/management-services-vpc/cidr': get_param('managementServicesVpcCidrBlock'), '/compliant/framework/management-services/management-services-vpc/instance-tenancy': get_param('managementServicesVpcInstanceTenancy'), '/compliant/framework/management-services/management-services-vpc/application-subnet/a/cidr': get_param('managementServicesVpcApplicationSubnetACidrBlock'), '/compliant/framework/management-services/management-services-vpc/application-subnet/b/cidr': get_param('managementServicesVpcApplicationSubnetBCidrBlock'), # '/compliant/framework/management-services/management-services-vpc/application-subnet/c/cidr': get_param('managementServicesVpcApplicationSubnetCCidrBlock'), '/compliant/framework/management-services/management-services-vpc/data-subnet/a/cidr': get_param('managementServicesVpcDataSubnetACidrBlock'), '/compliant/framework/management-services/management-services-vpc/data-subnet/b/cidr': get_param('managementServicesVpcDataSubnetBCidrBlock'), # '/compliant/framework/management-services/management-services-vpc/data-subnet/c/cidr': get_param('managementServicesVpcDataSubnetCCidrBlock'), '/compliant/framework/management-services/management-services-vpc/tgw-attach-subnet/a/cidr': get_param('managementServicesVpcTransitGatewayAttachmentSubnetACidrBlock'), '/compliant/framework/management-services/management-services-vpc/tgw-attach-subnet/b/cidr': get_param('managementServicesVpcTransitGatewayAttachmentSubnetBCidrBlock'), # '/compliant/framework/management-services/management-services-vpc/tgw-attach-subnet/c/cidr': get_param('managementServicesVpcTransitGatewayAttachmentSubnetCCidrBlock'), # # Management Services - External Access VPC # '/compliant/framework/management-services/external-access-vpc/cidr': get_param('externalAccessVpcCidrBlock'), '/compliant/framework/management-services/external-access-vpc/instance-tenancy': get_param('externalAccessVpcInstanceTenancy'), '/compliant/framework/management-services/external-access-vpc/public-subnet/a/cidr': get_param('externalAccessVpcPublicSubnetACidrBlock'), '/compliant/framework/management-services/external-access-vpc/public-subnet/b/cidr': get_param('externalAccessVpcPublicSubnetBCidrBlock'), # '/compliant/framework/management-services/external-access-vpc/public-subnet/c/cidr': get_param('externalAccessVpcPublicSubnetCCidrBlock'), '/compliant/framework/management-services/external-access-vpc/application-subnet/a/cidr': get_param('externalAccessVpcApplicationSubnetACidrBlock'), '/compliant/framework/management-services/external-access-vpc/application-subnet/b/cidr': get_param('externalAccessVpcApplicationSubnetBCidrBlock'), # '/compliant/framework/management-services/external-access-vpc/application-subnet/c/cidr': get_param('externalAccessVpcApplicationSubnetCCidrBlock'), '/compliant/framework/management-services/external-access-vpc/tgw-attach-subnet/a/cidr': get_param('externalAccessVpcTransitGatewayAttachmentSubnetACidrBlock'), '/compliant/framework/management-services/external-access-vpc/tgw-attach-subnet/b/cidr': get_param('externalAccessVpcTransitGatewayAttachmentSubnetBCidrBlock'), # '/compliant/framework/management-services/external-access-vpc/tgw-attach-subnet/c/cidr': get_param('externalAccessVpcTransitGatewayAttachmentSubnetCCidrBlock'), # # Management Services - Directory VPC # '/compliant/framework/management-services/directory-vpc/cidr': get_param('directoryVpcCidrBlock'), '/compliant/framework/management-services/directory-vpc/instance-tenancy': get_param('directoryVpcInstanceTenancy'), '/compliant/framework/management-services/directory-vpc/application-subnet/a/cidr': get_param('directoryVpcApplicationSubnetACidrBlock'), '/compliant/framework/management-services/directory-vpc/application-subnet/b/cidr': get_param('directoryVpcApplicationSubnetBCidrBlock'), # '/compliant/framework/management-services/directory-vpc/application-subnet/c/cidr': get_param('directoryVpcApplicationSubnetCCidrBlock'), '/compliant/framework/management-services/directory-vpc/data-subnet/a/cidr': get_param('directoryVpcDataSubnetACidrBlock'), '/compliant/framework/management-services/directory-vpc/data-subnet/b/cidr': get_param('directoryVpcDataSubnetBCidrBlock'), # '/compliant/framework/management-services/directory-vpc/data-subnet/c/cidr': get_param('directoryVpcDataSubnetCCidrBlock'), '/compliant/framework/management-services/directory-vpc/tgw-attach-subnet/a/cidr': get_param('directoryVpcTransitGatewayAttachmentSubnetACidrBlock'), '/compliant/framework/management-services/directory-vpc/tgw-attach-subnet/b/cidr': get_param('directoryVpcTransitGatewayAttachmentSubnetBCidrBlock'), # '/compliant/framework/management-services/directory-vpc/tgw-attach-subnet/c/cidr': get_param('directoryVpcTransitGatewayAttachmentSubnetCCidrBlock'), } } }, 'plugins': { } } parser = optparse.OptionParser() parser.add_option('--stack-name', action='store', dest='stack_name') parser.add_option('--out-file', action='store', dest='out_file') parser.add_option('--aws-access-key-id', action='store', dest='aws_access_key_id') parser.add_option('--aws-secret-access-key', action='store', dest='aws_secret_access_key') parser.add_option('--region', action='store', dest='region') options, _remainder = parser.parse_args() # Get the Organization ID org_client_gc = boto3.client('organizations', aws_access_key_id=options.aws_access_key_id, aws_secret_access_key=options.aws_secret_access_key, region_name=options.region) organization_id = org_client_gc.describe_organization()['Organization']['Id'] # Get the input parameters cfn_client = boto3.client('cloudformation') stack_data = cfn_client.describe_stacks(StackName=options.stack_name) # Create the config, write to file config = get_config() with open(options.out_file, "w") as f: f.write(json.dumps(config, indent=2, default=str))
66.504587
190
0.628156
fbb269e134b451857998f65232a03f87280b6cd5
1,620
java
Java
Software Testing, JUnit, Selenium/HOP/Module 9/startUsingSeleniumWebDriver/src/test/java/com/eviltester/webdriver/MyFirstSafariTest.java
Michael-Wittmann/Other-programs
7781893a231e2b3af1d80adf19f12d89cf6212a1
[ "MIT" ]
null
null
null
Software Testing, JUnit, Selenium/HOP/Module 9/startUsingSeleniumWebDriver/src/test/java/com/eviltester/webdriver/MyFirstSafariTest.java
Michael-Wittmann/Other-programs
7781893a231e2b3af1d80adf19f12d89cf6212a1
[ "MIT" ]
null
null
null
Software Testing, JUnit, Selenium/HOP/Module 9/startUsingSeleniumWebDriver/src/test/java/com/eviltester/webdriver/MyFirstSafariTest.java
Michael-Wittmann/Other-programs
7781893a231e2b3af1d80adf19f12d89cf6212a1
[ "MIT" ]
null
null
null
package com.eviltester.webdriver; import org.junit.Assert; import org.junit.Test; import org.openqa.selenium.WebDriver; import org.openqa.selenium.safari.SafariDriver; public class MyFirstSafariTest { /** The following code is for the Safari Driver. This will only work on a Mac operating system. The safari driver is installed by default with the operating system. It should just work on a mac. You may need to change the safari properties to allow automated execution. - Safari \ Preferences \ Advanced \ [x] show develop menu in menu bar - Develop \ Allow Remote Execution */ @Test public void startWebDriver(){ WebDriver driver = new SafariDriver(); driver.navigate().to("https://testpages.herokuapp.com"); Assert.assertTrue("title should start with Selenium", driver.getTitle().startsWith("Selenium")); // safari driver now seems to prefer just close or quit, but not both //driver.close(); driver.quit(); } /* if https://testpages.herokuapp.com is not working then you can download the test pages app from github https://github.com/eviltester/TestingApp/tree/master/java/testingapps/seleniumtestpages The herokuapp and github release are maintained. You can also find legacy test pages at: - https://compendiumdev.co.uk/selenium/testpages - https://www.seleniumsimplified.com/testpages/ If you want to learn more about Selenium WebDriver then check out my online courses: https://eviltester.com/courses */ }
26.129032
103
0.685802
2a40b2c13764a53f7eb04f34af3734198e572c22
6,011
java
Java
src/com/jlj/action/VcoreAction.java
dspjlj/wsp
544c9d263a418458951fffe5c32a8e2fd98f7aeb
[ "Apache-2.0" ]
1
2016-01-06T01:55:01.000Z
2016-01-06T01:55:01.000Z
src/com/jlj/action/VcoreAction.java
dspjlj/wsp
544c9d263a418458951fffe5c32a8e2fd98f7aeb
[ "Apache-2.0" ]
null
null
null
src/com/jlj/action/VcoreAction.java
dspjlj/wsp
544c9d263a418458951fffe5c32a8e2fd98f7aeb
[ "Apache-2.0" ]
null
null
null
package com.jlj.action; import java.io.PrintWriter; import java.util.List; import java.util.Map; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts2.interceptor.RequestAware; import org.apache.struts2.interceptor.ServletRequestAware; import org.apache.struts2.interceptor.ServletResponseAware; import org.apache.struts2.interceptor.SessionAware; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; import com.jlj.model.Bigtype; import com.jlj.model.Pubclient; import com.jlj.model.Screenimg; import com.jlj.service.IBigtypeService; import com.jlj.service.IPubclientService; import com.jlj.service.IScreenimgService; import com.jlj.service.IVcoreService; import com.jlj.util.SignUtil; import com.opensymphony.xwork2.ActionSupport; @Component("vcoreAction") @Scope("prototype") public class VcoreAction extends ActionSupport implements RequestAware, SessionAware,ServletResponseAware,ServletRequestAware { private static final long serialVersionUID = 3222279472851543374L; private IVcoreService vcoreService; private IScreenimgService screenimgService; private IBigtypeService bigtypeService; private IPubclientService pubclientService; Map<String,Object> request; Map<String,Object> session; private javax.servlet.http.HttpServletResponse response; private javax.servlet.http.HttpServletRequest req; //成为开发者 public String vcheck() throws Exception{ // 1、获取微信公众账号原始ID String vxinpublic = req.getParameter("vxinpublic"); // 2、判断是否数据库存在该注册公众号,若有则提取该公众账号的信息token用 Pubclient pubclient = pubclientService.queryPubclientByFrontpa(vxinpublic); if(pubclient==null){ System.out.println(vxinpublic+"----------- is bad"); return null; } String token = pubclient.getToken(); System.out.println("vcheck--------------vxinpublic="+vxinpublic+",token="+token); // 3、检查是否来自微信,是否校验成功 // 微信加密签名 String signature = req.getParameter("signature"); // 时间戳 String timestamp = req.getParameter("timestamp"); // 随机数 String nonce = req.getParameter("nonce"); // 随机字符串 String echostr = req.getParameter("echostr"); PrintWriter out = response.getWriter(); // 通过检验signature对请求进行校验,若校验成功则原样返回echostr,表示接入成功,否则接入失败 if (SignUtil.checkSignature(signature, timestamp, nonce, token)) { out.print(echostr); } out.close(); out = null; return null; } //得到从微信服务器过来的post返回响应 public String vresponse() throws Exception{ // 将请求、响应的编码均设置为UTF-8(防止中文乱码) req.setCharacterEncoding("UTF-8"); response.setCharacterEncoding("UTF-8"); // 1、获取微信公众账号英文名 String vxinpublic = req.getParameter("vxinpublic"); // 2、判断是否数据库存在该注册公众号,若有则提取该公众账号的信息token用 Pubclient pubclient = pubclientService.queryPubclientByFrontpa(vxinpublic); if(pubclient==null){ System.out.println(vxinpublic+"----------- is bad"); return null; } String token = pubclient.getToken(); System.out.println("vresponse--------------vxinpublic="+vxinpublic+",token="+token); // 微信加密签名 String signature = req.getParameter("signature"); // 时间戳 String timestamp = req.getParameter("timestamp"); // 随机数 String nonce = req.getParameter("nonce"); // 响应消息 PrintWriter out = response.getWriter(); // Z、检查判断是否信息来自微信 if (SignUtil.checkSignature(signature, timestamp, nonce, token)) { // 调用核心业务类接收消息、处理消息[传入session放openid值] // 3、根据事件或回复内容产生相应的响应结果 String respMessage = vcoreService.processRequest(req,vxinpublic); out.print(respMessage); } out.close(); return null; } public String vprocess() throws Exception{ if("GET".equals(req.getMethod())){ return this.vcheck(); }else{ return this.vresponse(); } } private String frontpa; private String openid; private List<Screenimg> screenimgs; private List<Bigtype> bigtypes; public String venter(){ session.put("frontpa", frontpa); session.put("openid", openid); screenimgs = screenimgService.getScreenimgsByCondition(2, frontpa); bigtypes = bigtypeService.getBigtypesByPublicAccount(frontpa); return "travel"; } //get、set------------------------------------------- public IPubclientService getPubclientService() { return pubclientService; } @Resource public void setPubclientService(IPubclientService pubclientService) { this.pubclientService = pubclientService; } public IScreenimgService getScreenimgService() { return screenimgService; } @Resource public void setScreenimgService(IScreenimgService screenimgService) { this.screenimgService = screenimgService; } public IBigtypeService getBigtypeService() { return bigtypeService; } @Resource public void setBigtypeService(IBigtypeService bigtypeService) { this.bigtypeService = bigtypeService; } public IVcoreService getVcoreService() { return vcoreService; } @Resource public void setVcoreService(IVcoreService vcoreService) { this.vcoreService = vcoreService; } // 获得HttpServletResponse对象 public void setServletResponse(HttpServletResponse response) { this.response = response; } public void setServletRequest(HttpServletRequest req) { this.req = req; } public Map<String, Object> getRequest() { return request; } public void setRequest(Map<String, Object> request) { this.request = request; } public Map<String, Object> getSession() { return session; } public void setSession(Map<String, Object> session) { this.session = session; } public String getFrontpa() { return frontpa; } public void setFrontpa(String frontpa) { this.frontpa = frontpa; } public List<Screenimg> getScreenimgs() { return screenimgs; } public void setScreenimgs(List<Screenimg> screenimgs) { this.screenimgs = screenimgs; } public List<Bigtype> getBigtypes() { return bigtypes; } public void setBigtypes(List<Bigtype> bigtypes) { this.bigtypes = bigtypes; } public String getOpenid() { return openid; } public void setOpenid(String openid) { this.openid = openid; } }
28.353774
86
0.745966
1814b510be112b4b0fb4c063c56ffb91b401056b
827
rb
Ruby
lib/video_cache.rb
vokythoai/funny_movie
083644f2f9b8375ebaa775a32b9b919b37b38b85
[ "MIT" ]
1
2022-03-28T11:51:42.000Z
2022-03-28T11:51:42.000Z
lib/video_cache.rb
vokythoai/funny_movie
083644f2f9b8375ebaa775a32b9b919b37b38b85
[ "MIT" ]
null
null
null
lib/video_cache.rb
vokythoai/funny_movie
083644f2f9b8375ebaa775a32b9b919b37b38b85
[ "MIT" ]
null
null
null
# VideoCache module VideoCache def self.get(key) json_str = Rails.cache.read(key) parse_string(json_str) end def self.set(key, value) json_str = to_json(value) Rails.cache.write(key, value) rescue => _ nil end def self.del(key) Rails.cache.delete(key) end def self.is_numeric?(str) true if Float(str) rescue false end def self.is_json?(str) begin !!JSON.parse(str) rescue false end end def self.parse_json(json_str) JSON.parse(json_str) rescue JSON::ParserError json_str end def self.parse_string(str) return parse_json(str) if is_json?(str) return Float(str) if is_numeric?(str) str end def self.to_json(value) return value.to_json if value.instance_of?(Hash) || value.instance_of?(Array) value end end
17.229167
81
0.662636
fb3c76a5c8ece3d27cb18eda800d044997491482
3,100
java
Java
modules/core/src/test/java/be/wegenenverkeer/integration/jdbdc/postgres/AbstractIntegrationTest.java
kwark/atomium
9e7a5550a6cfe2c2a9edb2c20d4e7eeda88f01a0
[ "MIT" ]
null
null
null
modules/core/src/test/java/be/wegenenverkeer/integration/jdbdc/postgres/AbstractIntegrationTest.java
kwark/atomium
9e7a5550a6cfe2c2a9edb2c20d4e7eeda88f01a0
[ "MIT" ]
null
null
null
modules/core/src/test/java/be/wegenenverkeer/integration/jdbdc/postgres/AbstractIntegrationTest.java
kwark/atomium
9e7a5550a6cfe2c2a9edb2c20d4e7eeda88f01a0
[ "MIT" ]
null
null
null
package be.wegenenverkeer.integration.jdbdc.postgres; import be.wegenenverkeer.atomium.store.CreateEventTableOp; import be.wegenenverkeer.atomium.store.JdbcDialect; import be.wegenenverkeer.atomium.store.JdbcEventStoreMetadata; import be.wegenenverkeer.atomium.store.PostgresDialect; import org.junit.After; import org.junit.Before; import org.junit.BeforeClass; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.sql.Connection; import java.sql.Driver; import java.sql.SQLException; import java.sql.Statement; import java.util.Properties; /** * Abstract base class for integration tests against a Postgres database. * <p> * We assume that PG environment vars are suitably set when tests are run so that proper connection to the database will be establised * <p> * Created by Karel Maesen, Geovise BVBA on 13/12/16. */ public abstract class AbstractIntegrationTest { static final String TEST_SCHEMA = "ATTEST"; static final Logger LOG = LoggerFactory.getLogger("chapters.introduction.HelloWorld1"); static Driver postgresDriver; static JdbcDialect dialect = PostgresDialect.INSTANCE; static String databaseUrl = "jdbc:postgresql://localhost/atomium_test"; JdbcEventStoreMetadata metadata = new JdbcEventStoreMetadata("events", "event_id", "updated", "id", "seqno", "json"); boolean withTableCreation(){ return false; } @BeforeClass public static void loadDriver() { try { postgresDriver = java.sql.DriverManager.getDriver(databaseUrl); } catch (SQLException e) { throw new RuntimeException(e); } } @Before public void createSchemaAndTable() { doSql(String.format("CREATE SCHEMA IF NOT EXISTS %s", TEST_SCHEMA)); if (withTableCreation()) { try (Connection conn = mkConnection(TEST_SCHEMA); CreateEventTableOp op = dialect.mkCreateEventTableOp(conn, metadata)) { op.execute(); } catch (SQLException e) { throw new RuntimeException(e); } } } @After public void dropSchema() { doSql(String.format("DROP SCHEMA %s CASCADE", TEST_SCHEMA)); } void doSql(String sql) { doSql(sql, null); } void doSql(String sql, String schema) { try (Connection connection = mkConnection(schema); Statement stmt = connection.createStatement()) { LOG.info("Executing SQL: " + sql); stmt.execute(sql); } catch (SQLException e) { LOG.warn("SQL Execution failure: " + e.getMessage()); throw new RuntimeException(e); } } Connection mkConnection(String schema) throws SQLException { Connection conn; if (schema == null ) { conn = postgresDriver.connect(databaseUrl, null); } else { Properties props = new Properties(); props.put("currentSchema", schema); conn = postgresDriver.connect(databaseUrl, props); } conn.setAutoCommit(true); return conn; } }
31.313131
134
0.662903
0bbb2f57dce3a68a0bde786aea5504fe310d9581
1,568
js
JavaScript
bin/system.js
ghosthamlet/lumen
43e07eac751337aae6c5a378ca7331101489f985
[ "BSD-2-Clause" ]
1
2019-10-15T18:32:17.000Z
2019-10-15T18:32:17.000Z
bin/system.js
ghosthamlet/lumen
43e07eac751337aae6c5a378ca7331101489f985
[ "BSD-2-Clause" ]
null
null
null
bin/system.js
ghosthamlet/lumen
43e07eac751337aae6c5a378ca7331101489f985
[ "BSD-2-Clause" ]
1
2018-07-27T18:36:04.000Z
2018-07-27T18:36:04.000Z
var fs = require("fs"); var child_process = require("child_process"); var read_file = function (path) { return fs.readFileSync(path, "utf8"); }; var write_file = function (path, data) { return fs.writeFileSync(path, data, "utf8"); }; var file_exists63 = function (path) { return fs.existsSync(path, "utf8") && fs.statSync(path).isFile(); }; var directory_exists63 = function (path) { return fs.existsSync(path, "utf8") && fs.statSync(path).isDirectory(); }; var path_separator = require("path").sep; var path_join = function () { var __parts = unstash(Array.prototype.slice.call(arguments, 0)); return reduce(function (x, y) { return x + path_separator + y; }, __parts) || ""; }; var get_environment_variable = function (name) { return process.env[name]; }; var write = function (x) { var __out = process.stdout; return __out.write(x); }; var exit = function (code) { return process.exit(code); }; var argv = cut(process.argv, 2); var reload = function (module) { delete require.cache[require.resolve(module)]; return require(module); }; var run = function (command) { return child_process.execSync(command).toString(); }; exports["read-file"] = read_file; exports["write-file"] = write_file; exports["file-exists?"] = file_exists63; exports["directory-exists?"] = directory_exists63; exports["path-separator"] = path_separator; exports["path-join"] = path_join; exports["get-environment-variable"] = get_environment_variable; exports.write = write; exports.exit = exit; exports.argv = argv; exports.reload = reload; exports.run = run;
30.153846
72
0.703444
4b42014a8cb4e1d877b9bceea8972a24a846db37
1,227
html
HTML
public/index.html
StreamBoard98/WaveformServiceProxy
b10e88813ad2c9ec28e4fd6bd038e7c5b31b877c
[ "MIT" ]
null
null
null
public/index.html
StreamBoard98/WaveformServiceProxy
b10e88813ad2c9ec28e4fd6bd038e7c5b31b877c
[ "MIT" ]
null
null
null
public/index.html
StreamBoard98/WaveformServiceProxy
b10e88813ad2c9ec28e4fd6bd038e7c5b31b877c
[ "MIT" ]
null
null
null
<!DOCTYPE html> <html> <head> <title>StreamBoardProxy</title> <link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css" integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ" crossorigin="anonymous"> <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"> <script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script> <script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script> </head> <body> <!-- Static Skeleton --> <div class='container'> <div class='top'> <div id='musicPlayer'>music player</div> <div id='albumModal'></div> <div id='waveform'></div> </div> <div class='bottom'> <div id='artistInfo'>artist info</div> <div id='comments'>comments</div> <div id='suggestedTracks'>suggested tracks</div> </div> </div> <script src="http://localhost:4001/bundle.js"></script> <script src="http://localhost:6969/bundle.js"></script> <script src="http://localhost:3000/waveform.js"></script> <script src="http://localhost:1458/bundle.js"></script> </body> </html>
36.088235
171
0.675632
655ca6de4b9e5fb283e7decb9dbeb94ee4dfd662
1,872
rs
Rust
src/geometry/vector.rs
keyvank/pbrusty
e8ee7780eaacaa3da64502a3a63689dd6dac12d4
[ "MIT" ]
2
2021-11-28T13:06:53.000Z
2021-11-28T20:51:50.000Z
src/geometry/vector.rs
keyvank/pbrusty
e8ee7780eaacaa3da64502a3a63689dd6dac12d4
[ "MIT" ]
null
null
null
src/geometry/vector.rs
keyvank/pbrusty
e8ee7780eaacaa3da64502a3a63689dd6dac12d4
[ "MIT" ]
null
null
null
use std::ops::{Add, Div, Mul, Neg, Sub}; #[derive(Debug, Copy, Clone, PartialEq)] pub struct Vector { pub x: f32, pub y: f32, pub z: f32, } impl Vector { pub fn new(x: f32, y: f32, z: f32) -> Vector { Vector { x: x, y: y, z: z } } pub fn dot(a: Self, b: Self) -> f32 { a.x * b.x + a.y * b.y + a.z * b.z } pub fn cross(a: Self, b: Self) -> Vector { Vector { x: a.y * b.z - a.z * b.y, y: a.z * b.x - a.x * b.z, z: a.x * b.y - a.y * b.x, } } pub fn length_squared(self) -> f32 { Vector::dot(self, self) } pub fn length(self) -> f32 { self.length_squared().sqrt() } pub fn normalized(self) -> Vector { self / self.length() } } impl Add for Vector { type Output = Self; fn add(self, other: Self) -> Self { Self { x: self.x + other.x, y: self.y + other.y, z: self.z + other.z, } } } impl Sub for Vector { type Output = Self; fn sub(self, other: Self) -> Self { Self { x: self.x - other.x, y: self.y - other.y, z: self.z - other.z, } } } impl Mul<f32> for Vector { type Output = Self; fn mul(self, other: f32) -> Self { Self { x: self.x * other, y: self.y * other, z: self.z * other, } } } impl Div<f32> for Vector { type Output = Self; fn div(self, other: f32) -> Self { let recip = 1f32 / other; Self { x: self.x * recip, y: self.y * recip, z: self.z * recip, } } } impl Neg for Vector { type Output = Self; fn neg(self) -> Self { Self { x: -self.x, y: -self.y, z: -self.z, } } }
18.72
50
0.426816
46c35895f2b1576cb090406659b6ed8d49fd116a
983
html
HTML
src/app/pages/home/featured-courses/featured-courses.component.html
renansigolo/devacademy-website
88609da1a85a46ea2b96afeb8e5c11917de30af6
[ "Apache-2.0" ]
null
null
null
src/app/pages/home/featured-courses/featured-courses.component.html
renansigolo/devacademy-website
88609da1a85a46ea2b96afeb8e5c11917de30af6
[ "Apache-2.0" ]
null
null
null
src/app/pages/home/featured-courses/featured-courses.component.html
renansigolo/devacademy-website
88609da1a85a46ea2b96afeb8e5c11917de30af6
[ "Apache-2.0" ]
null
null
null
<section class="featured-courses"> <h2>Upcoming Courses</h2> <div class="featured-courses__container"> <ng-container *ngIf="courses; else noCourses"> <mat-card class="card" *ngFor="let course of courses"> <img mat-card-image [src]="course.imageUrl" alt="Course Image" /> <mat-card-title-group> <mat-card-title>{{ course.title }}</mat-card-title> <mat-card-subtitle>{{ course.level }}</mat-card-subtitle> </mat-card-title-group> <mat-card-content> <p>{{ course.description | slice: 0:200 }}...</p> <button mat-flat-button color="accent" [routerLink]="['/course/', course.slug]" > Enrol Now </button> </mat-card-content> </mat-card> </ng-container> <ng-template #noCourses> <div class="no-courses"> <h2>More courses are coming soon...</h2> </div> </ng-template> </div> </section>
29.787879
73
0.550356
df22c710467c7376560ab1482d7f010cc1967942
593
swift
Swift
iSstp/WindowController.swift
axot/isstp
c4d9ac57b0d3d5b6291371f5909eb1dda2b017d5
[ "MIT" ]
40
2017-04-26T22:05:35.000Z
2022-03-27T14:31:10.000Z
iSstp/WindowController.swift
axot/isstp
c4d9ac57b0d3d5b6291371f5909eb1dda2b017d5
[ "MIT" ]
18
2017-04-27T05:27:45.000Z
2022-01-20T12:14:50.000Z
iSstp/WindowController.swift
axot/isstp
c4d9ac57b0d3d5b6291371f5909eb1dda2b017d5
[ "MIT" ]
11
2017-07-30T09:45:37.000Z
2022-03-09T20:50:43.000Z
// // WindowController.swift // iSstp // // Created by Zheng Shao on 2/26/15. // Copyright (c) 2015 axot. All rights reserved. // import Cocoa class WindowController: NSWindowController { override func awakeFromNib() { window!.collectionBehavior = NSWindow.CollectionBehavior.canJoinAllSpaces NotificationCenter.default.addObserver(self, selector: #selector(WindowController.reopen), name: NSNotification.Name(rawValue: "Window Open"), object: nil) } @objc func reopen() { window!.orderFront(self) window!.makeKeyAndOrderFront(self) } }
25.782609
163
0.703204
59b9c43d71a11523a6f4903c429d2a490bfeea4a
43,579
hpp
C++
src/SFML/Graphics/GLLoader.hpp
BlueCobold/SFML
4add6faf06ca0335ac6d66475c1375c25254ae43
[ "Zlib" ]
null
null
null
src/SFML/Graphics/GLLoader.hpp
BlueCobold/SFML
4add6faf06ca0335ac6d66475c1375c25254ae43
[ "Zlib" ]
null
null
null
src/SFML/Graphics/GLLoader.hpp
BlueCobold/SFML
4add6faf06ca0335ac6d66475c1375c25254ae43
[ "Zlib" ]
null
null
null
//////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library // Copyright (C) 2007-2015 Laurent Gomila (laurent@sfml-dev.org) // // This software is provided 'as-is', without any express or implied warranty. // In no event will the authors be held liable for any damages arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it freely, // subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; // you must not claim that you wrote the original software. // If you use this software in a product, an acknowledgment // in the product documentation would be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, // and must not be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source distribution. // //////////////////////////////////////////////////////////// #ifndef SF_POINTER_C_GENERATED_HEADER_OPENGL_HPP #define SF_POINTER_C_GENERATED_HEADER_OPENGL_HPP #if defined(__glew_h__) || defined(__GLEW_H__) #error Attempt to include auto-generated header after including glew.h #endif #if defined(__gl_h_) || defined(__GL_H__) #error Attempt to include auto-generated header after including gl.h #endif #if defined(__glext_h_) || defined(__GLEXT_H_) #error Attempt to include auto-generated header after including glext.h #endif #if defined(__gltypes_h_) #error Attempt to include auto-generated header after gltypes.h #endif #if defined(__gl_ATI_h_) #error Attempt to include auto-generated header after including glATI.h #endif #define __glew_h__ #define __GLEW_H__ #define __gl_h_ #define __GL_H__ #define __glext_h_ #define __GLEXT_H_ #define __gltypes_h_ #define __gl_ATI_h_ #ifndef APIENTRY #if defined(__MINGW32__) || defined(__CYGWIN__) #define APIENTRY __stdcall #elif (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__) #define APIENTRY __stdcall #else #define APIENTRY #endif #endif /*APIENTRY*/ #ifndef CODEGEN_FUNCPTR #define CODEGEN_REMOVE_FUNCPTR #if defined(_WIN32) #define CODEGEN_FUNCPTR APIENTRY #else #define CODEGEN_FUNCPTR #endif #endif /*CODEGEN_FUNCPTR*/ #ifndef GLAPI #if defined(_WIN32) #if defined(__MINGW32__) || defined(__CYGWIN__) #define GLAPI extern #else #define GLAPI __declspec(dllimport) #endif #else #define GLAPI extern #endif #endif #ifndef GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS #define GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS #endif /*GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS*/ #include <stddef.h> #ifndef GLEXT_64_TYPES_DEFINED /* This code block is duplicated in glxext.h, so must be protected */ #define GLEXT_64_TYPES_DEFINED /* Define int32_t, int64_t, and uint64_t types for UST/MSC */ /* (as used in the GL_EXT_timer_query extension). */ #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L #include <inttypes.h> #elif defined(__sun__) || defined(__digital__) #include <inttypes.h> #if defined(__STDC__) #if defined(__arch64__) || defined(_LP64) typedef long int int64_t; typedef unsigned long int uint64_t; #else typedef long long int int64_t; typedef unsigned long long int uint64_t; #endif /* __arch64__ */ #endif /* __STDC__ */ #elif defined( __VMS ) || defined(__sgi) #include <inttypes.h> #elif defined(__SCO__) || defined(__USLC__) #include <stdint.h> #elif defined(__UNIXOS2__) || defined(__SOL64__) typedef long int int32_t; typedef long long int int64_t; typedef unsigned long long int uint64_t; #elif defined(_WIN32) && defined(__GNUC__) #include <stdint.h> #elif defined(_WIN32) typedef __int32 int32_t; typedef __int64 int64_t; typedef unsigned __int64 uint64_t; #else /* Fallback if nothing above works */ #include <inttypes.h> #endif #endif typedef unsigned int GLenum; typedef unsigned char GLboolean; typedef unsigned int GLbitfield; typedef void GLvoid; typedef signed char GLbyte; typedef short GLshort; typedef int GLint; typedef unsigned char GLubyte; typedef unsigned short GLushort; typedef unsigned int GLuint; typedef int GLsizei; typedef float GLfloat; typedef float GLclampf; typedef double GLdouble; typedef double GLclampd; typedef char GLchar; typedef char GLcharARB; #ifdef __APPLE__ typedef void *GLhandleARB; #else typedef unsigned int GLhandleARB; #endif typedef unsigned short GLhalfARB; typedef unsigned short GLhalf; typedef GLint GLfixed; typedef ptrdiff_t GLintptr; typedef ptrdiff_t GLsizeiptr; typedef int64_t GLint64; typedef uint64_t GLuint64; typedef ptrdiff_t GLintptrARB; typedef ptrdiff_t GLsizeiptrARB; typedef int64_t GLint64EXT; typedef uint64_t GLuint64EXT; typedef struct __GLsync *GLsync; struct _cl_context; struct _cl_event; typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam); typedef unsigned short GLhalfNV; typedef GLintptr GLvdpauSurfaceNV; #ifdef __cplusplus extern "C" { #endif /*__cplusplus*/ extern int sfogl_ext_EXT_blend_minmax; extern int sfogl_ext_EXT_blend_subtract; extern int sfogl_ext_ARB_multitexture; extern int sfogl_ext_EXT_blend_func_separate; extern int sfogl_ext_ARB_shading_language_100; extern int sfogl_ext_ARB_shader_objects; extern int sfogl_ext_ARB_vertex_shader; extern int sfogl_ext_ARB_fragment_shader; extern int sfogl_ext_ARB_texture_non_power_of_two; extern int sfogl_ext_EXT_blend_equation_separate; extern int sfogl_ext_EXT_framebuffer_object; #define GL_BLEND_EQUATION_EXT 0x8009 #define GL_FUNC_ADD_EXT 0x8006 #define GL_MAX_EXT 0x8008 #define GL_MIN_EXT 0x8007 #define GL_FUNC_REVERSE_SUBTRACT_EXT 0x800B #define GL_FUNC_SUBTRACT_EXT 0x800A #define GL_ACTIVE_TEXTURE_ARB 0x84E0 #define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1 #define GL_MAX_TEXTURE_UNITS_ARB 0x84E2 #define GL_TEXTURE0_ARB 0x84C0 #define GL_TEXTURE10_ARB 0x84CA #define GL_TEXTURE11_ARB 0x84CB #define GL_TEXTURE12_ARB 0x84CC #define GL_TEXTURE13_ARB 0x84CD #define GL_TEXTURE14_ARB 0x84CE #define GL_TEXTURE15_ARB 0x84CF #define GL_TEXTURE16_ARB 0x84D0 #define GL_TEXTURE17_ARB 0x84D1 #define GL_TEXTURE18_ARB 0x84D2 #define GL_TEXTURE19_ARB 0x84D3 #define GL_TEXTURE1_ARB 0x84C1 #define GL_TEXTURE20_ARB 0x84D4 #define GL_TEXTURE21_ARB 0x84D5 #define GL_TEXTURE22_ARB 0x84D6 #define GL_TEXTURE23_ARB 0x84D7 #define GL_TEXTURE24_ARB 0x84D8 #define GL_TEXTURE25_ARB 0x84D9 #define GL_TEXTURE26_ARB 0x84DA #define GL_TEXTURE27_ARB 0x84DB #define GL_TEXTURE28_ARB 0x84DC #define GL_TEXTURE29_ARB 0x84DD #define GL_TEXTURE2_ARB 0x84C2 #define GL_TEXTURE30_ARB 0x84DE #define GL_TEXTURE31_ARB 0x84DF #define GL_TEXTURE3_ARB 0x84C3 #define GL_TEXTURE4_ARB 0x84C4 #define GL_TEXTURE5_ARB 0x84C5 #define GL_TEXTURE6_ARB 0x84C6 #define GL_TEXTURE7_ARB 0x84C7 #define GL_TEXTURE8_ARB 0x84C8 #define GL_TEXTURE9_ARB 0x84C9 #define GL_BLEND_DST_ALPHA_EXT 0x80CA #define GL_BLEND_DST_RGB_EXT 0x80C8 #define GL_BLEND_SRC_ALPHA_EXT 0x80CB #define GL_BLEND_SRC_RGB_EXT 0x80C9 #define GL_SHADING_LANGUAGE_VERSION_ARB 0x8B8C #define GL_BOOL_ARB 0x8B56 #define GL_BOOL_VEC2_ARB 0x8B57 #define GL_BOOL_VEC3_ARB 0x8B58 #define GL_BOOL_VEC4_ARB 0x8B59 #define GL_FLOAT_MAT2_ARB 0x8B5A #define GL_FLOAT_MAT3_ARB 0x8B5B #define GL_FLOAT_MAT4_ARB 0x8B5C #define GL_FLOAT_VEC2_ARB 0x8B50 #define GL_FLOAT_VEC3_ARB 0x8B51 #define GL_FLOAT_VEC4_ARB 0x8B52 #define GL_INT_VEC2_ARB 0x8B53 #define GL_INT_VEC3_ARB 0x8B54 #define GL_INT_VEC4_ARB 0x8B55 #define GL_OBJECT_ACTIVE_UNIFORMS_ARB 0x8B86 #define GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB 0x8B87 #define GL_OBJECT_ATTACHED_OBJECTS_ARB 0x8B85 #define GL_OBJECT_COMPILE_STATUS_ARB 0x8B81 #define GL_OBJECT_DELETE_STATUS_ARB 0x8B80 #define GL_OBJECT_INFO_LOG_LENGTH_ARB 0x8B84 #define GL_OBJECT_LINK_STATUS_ARB 0x8B82 #define GL_OBJECT_SHADER_SOURCE_LENGTH_ARB 0x8B88 #define GL_OBJECT_SUBTYPE_ARB 0x8B4F #define GL_OBJECT_TYPE_ARB 0x8B4E #define GL_OBJECT_VALIDATE_STATUS_ARB 0x8B83 #define GL_PROGRAM_OBJECT_ARB 0x8B40 #define GL_SAMPLER_1D_ARB 0x8B5D #define GL_SAMPLER_1D_SHADOW_ARB 0x8B61 #define GL_SAMPLER_2D_ARB 0x8B5E #define GL_SAMPLER_2D_RECT_ARB 0x8B63 #define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64 #define GL_SAMPLER_2D_SHADOW_ARB 0x8B62 #define GL_SAMPLER_3D_ARB 0x8B5F #define GL_SAMPLER_CUBE_ARB 0x8B60 #define GL_SHADER_OBJECT_ARB 0x8B48 #define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB 0x8B4D #define GL_MAX_VARYING_FLOATS_ARB 0x8B4B #define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB 0x8B4C #define GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB 0x8B4A #define GL_OBJECT_ACTIVE_ATTRIBUTES_ARB 0x8B89 #define GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB 0x8B8A #define GL_VERTEX_SHADER_ARB 0x8B31 #define GL_FRAGMENT_SHADER_ARB 0x8B30 #define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB 0x8B8B #define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB 0x8B49 #define GL_BLEND_EQUATION_ALPHA_EXT 0x883D #define GL_BLEND_EQUATION_RGB_EXT 0x8009 #define GL_COLOR_ATTACHMENT0_EXT 0x8CE0 #define GL_COLOR_ATTACHMENT10_EXT 0x8CEA #define GL_COLOR_ATTACHMENT11_EXT 0x8CEB #define GL_COLOR_ATTACHMENT12_EXT 0x8CEC #define GL_COLOR_ATTACHMENT13_EXT 0x8CED #define GL_COLOR_ATTACHMENT14_EXT 0x8CEE #define GL_COLOR_ATTACHMENT15_EXT 0x8CEF #define GL_COLOR_ATTACHMENT1_EXT 0x8CE1 #define GL_COLOR_ATTACHMENT2_EXT 0x8CE2 #define GL_COLOR_ATTACHMENT3_EXT 0x8CE3 #define GL_COLOR_ATTACHMENT4_EXT 0x8CE4 #define GL_COLOR_ATTACHMENT5_EXT 0x8CE5 #define GL_COLOR_ATTACHMENT6_EXT 0x8CE6 #define GL_COLOR_ATTACHMENT7_EXT 0x8CE7 #define GL_COLOR_ATTACHMENT8_EXT 0x8CE8 #define GL_COLOR_ATTACHMENT9_EXT 0x8CE9 #define GL_DEPTH_ATTACHMENT_EXT 0x8D00 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT 0x8CD1 #define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT 0x8CD0 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT 0x8CD4 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT 0x8CD3 #define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT 0x8CD2 #define GL_FRAMEBUFFER_BINDING_EXT 0x8CA6 #define GL_FRAMEBUFFER_COMPLETE_EXT 0x8CD5 #define GL_FRAMEBUFFER_EXT 0x8D40 #define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT 0x8CD6 #define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT 0x8CD9 #define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT 0x8CDB #define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT 0x8CDA #define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT 0x8CD7 #define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT 0x8CDC #define GL_FRAMEBUFFER_UNSUPPORTED_EXT 0x8CDD #define GL_INVALID_FRAMEBUFFER_OPERATION_EXT 0x0506 #define GL_MAX_COLOR_ATTACHMENTS_EXT 0x8CDF #define GL_MAX_RENDERBUFFER_SIZE_EXT 0x84E8 #define GL_RENDERBUFFER_ALPHA_SIZE_EXT 0x8D53 #define GL_RENDERBUFFER_BINDING_EXT 0x8CA7 #define GL_RENDERBUFFER_BLUE_SIZE_EXT 0x8D52 #define GL_RENDERBUFFER_DEPTH_SIZE_EXT 0x8D54 #define GL_RENDERBUFFER_EXT 0x8D41 #define GL_RENDERBUFFER_GREEN_SIZE_EXT 0x8D51 #define GL_RENDERBUFFER_HEIGHT_EXT 0x8D43 #define GL_RENDERBUFFER_INTERNAL_FORMAT_EXT 0x8D44 #define GL_RENDERBUFFER_RED_SIZE_EXT 0x8D50 #define GL_RENDERBUFFER_STENCIL_SIZE_EXT 0x8D55 #define GL_RENDERBUFFER_WIDTH_EXT 0x8D42 #define GL_STENCIL_ATTACHMENT_EXT 0x8D20 #define GL_STENCIL_INDEX16_EXT 0x8D49 #define GL_STENCIL_INDEX1_EXT 0x8D46 #define GL_STENCIL_INDEX4_EXT 0x8D47 #define GL_STENCIL_INDEX8_EXT 0x8D48 #define GL_2D 0x0600 #define GL_2_BYTES 0x1407 #define GL_3D 0x0601 #define GL_3D_COLOR 0x0602 #define GL_3D_COLOR_TEXTURE 0x0603 #define GL_3_BYTES 0x1408 #define GL_4D_COLOR_TEXTURE 0x0604 #define GL_4_BYTES 0x1409 #define GL_ACCUM 0x0100 #define GL_ACCUM_ALPHA_BITS 0x0D5B #define GL_ACCUM_BLUE_BITS 0x0D5A #define GL_ACCUM_BUFFER_BIT 0x00000200 #define GL_ACCUM_CLEAR_VALUE 0x0B80 #define GL_ACCUM_GREEN_BITS 0x0D59 #define GL_ACCUM_RED_BITS 0x0D58 #define GL_ADD 0x0104 #define GL_ALL_ATTRIB_BITS 0xFFFFFFFF #define GL_ALPHA 0x1906 #define GL_ALPHA12 0x803D #define GL_ALPHA16 0x803E #define GL_ALPHA4 0x803B #define GL_ALPHA8 0x803C #define GL_ALPHA_BIAS 0x0D1D #define GL_ALPHA_BITS 0x0D55 #define GL_ALPHA_SCALE 0x0D1C #define GL_ALPHA_TEST 0x0BC0 #define GL_ALPHA_TEST_FUNC 0x0BC1 #define GL_ALPHA_TEST_REF 0x0BC2 #define GL_ALWAYS 0x0207 #define GL_AMBIENT 0x1200 #define GL_AMBIENT_AND_DIFFUSE 0x1602 #define GL_AND 0x1501 #define GL_AND_INVERTED 0x1504 #define GL_AND_REVERSE 0x1502 #define GL_ATTRIB_STACK_DEPTH 0x0BB0 #define GL_AUTO_NORMAL 0x0D80 #define GL_BACK 0x0405 #define GL_BITMAP 0x1A00 #define GL_BITMAP_TOKEN 0x0704 #define GL_BLEND 0x0BE2 #define GL_BLEND_DST 0x0BE0 #define GL_BLEND_SRC 0x0BE1 #define GL_BLUE 0x1905 #define GL_BLUE_BIAS 0x0D1B #define GL_BLUE_BITS 0x0D54 #define GL_BLUE_SCALE 0x0D1A #define GL_BYTE 0x1400 #define GL_C3F_V3F 0x2A24 #define GL_C4F_N3F_V3F 0x2A26 #define GL_C4UB_V2F 0x2A22 #define GL_C4UB_V3F 0x2A23 #define GL_CCW 0x0901 #define GL_CLAMP 0x2900 #define GL_CLEAR 0x1500 #define GL_CLIENT_ALL_ATTRIB_BITS 0xFFFFFFFF #define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1 #define GL_CLIENT_PIXEL_STORE_BIT 0x00000001 #define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002 #define GL_CLIP_PLANE0 0x3000 #define GL_CLIP_PLANE1 0x3001 #define GL_CLIP_PLANE2 0x3002 #define GL_CLIP_PLANE3 0x3003 #define GL_CLIP_PLANE4 0x3004 #define GL_CLIP_PLANE5 0x3005 #define GL_COEFF 0x0A00 #define GL_COLOR 0x1800 #define GL_COLOR_ARRAY 0x8076 #define GL_COLOR_ARRAY_POINTER 0x8090 #define GL_COLOR_ARRAY_SIZE 0x8081 #define GL_COLOR_ARRAY_STRIDE 0x8083 #define GL_COLOR_ARRAY_TYPE 0x8082 #define GL_COLOR_BUFFER_BIT 0x00004000 #define GL_COLOR_CLEAR_VALUE 0x0C22 #define GL_COLOR_INDEX 0x1900 #define GL_COLOR_INDEXES 0x1603 #define GL_COLOR_LOGIC_OP 0x0BF2 #define GL_COLOR_MATERIAL 0x0B57 #define GL_COLOR_MATERIAL_FACE 0x0B55 #define GL_COLOR_MATERIAL_PARAMETER 0x0B56 #define GL_COLOR_WRITEMASK 0x0C23 #define GL_COMPILE 0x1300 #define GL_COMPILE_AND_EXECUTE 0x1301 #define GL_CONSTANT_ATTENUATION 0x1207 #define GL_COPY 0x1503 #define GL_COPY_INVERTED 0x150C #define GL_COPY_PIXEL_TOKEN 0x0706 #define GL_CULL_FACE 0x0B44 #define GL_CULL_FACE_MODE 0x0B45 #define GL_CURRENT_BIT 0x00000001 #define GL_CURRENT_COLOR 0x0B00 #define GL_CURRENT_INDEX 0x0B01 #define GL_CURRENT_NORMAL 0x0B02 #define GL_CURRENT_RASTER_COLOR 0x0B04 #define GL_CURRENT_RASTER_DISTANCE 0x0B09 #define GL_CURRENT_RASTER_INDEX 0x0B05 #define GL_CURRENT_RASTER_POSITION 0x0B07 #define GL_CURRENT_RASTER_POSITION_VALID 0x0B08 #define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06 #define GL_CURRENT_TEXTURE_COORDS 0x0B03 #define GL_CW 0x0900 #define GL_DECAL 0x2101 #define GL_DECR 0x1E03 #define GL_DEPTH 0x1801 #define GL_DEPTH_BIAS 0x0D1F #define GL_DEPTH_BITS 0x0D56 #define GL_DEPTH_BUFFER_BIT 0x00000100 #define GL_DEPTH_CLEAR_VALUE 0x0B73 #define GL_DEPTH_COMPONENT 0x1902 #define GL_DEPTH_FUNC 0x0B74 #define GL_DEPTH_RANGE 0x0B70 #define GL_DEPTH_SCALE 0x0D1E #define GL_DEPTH_TEST 0x0B71 #define GL_DEPTH_WRITEMASK 0x0B72 #define GL_DITHER 0x0BD0 #define GL_DOMAIN 0x0A02 #define GL_DONT_CARE 0x1100 #define GL_DOUBLE 0x140A #define GL_DOUBLEBUFFER 0x0C32 #define GL_DRAW_BUFFER 0x0C01 #define GL_DRAW_PIXEL_TOKEN 0x0705 #define GL_DST_ALPHA 0x0304 #define GL_DST_COLOR 0x0306 #define GL_EDGE_FLAG 0x0B43 #define GL_EDGE_FLAG_ARRAY 0x8079 #define GL_EDGE_FLAG_ARRAY_POINTER 0x8093 #define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C #define GL_EMISSION 0x1600 #define GL_ENABLE_BIT 0x00002000 #define GL_EQUAL 0x0202 #define GL_EQUIV 0x1509 #define GL_EVAL_BIT 0x00010000 #define GL_EXP 0x0800 #define GL_EXP2 0x0801 #define GL_EXTENSIONS 0x1F03 #define GL_EYE_LINEAR 0x2400 #define GL_EYE_PLANE 0x2502 #define GL_FALSE 0 #define GL_FASTEST 0x1101 #define GL_FEEDBACK 0x1C01 #define GL_FEEDBACK_BUFFER_POINTER 0x0DF0 #define GL_FEEDBACK_BUFFER_SIZE 0x0DF1 #define GL_FEEDBACK_BUFFER_TYPE 0x0DF2 #define GL_FILL 0x1B02 #define GL_FLAT 0x1D00 #define GL_FLOAT 0x1406 #define GL_FRONT 0x0404 #define GL_FRONT_AND_BACK 0x0408 #define GL_FRONT_FACE 0x0B46 #define GL_GEQUAL 0x0206 #define GL_GREATER 0x0204 #define GL_GREEN 0x1904 #define GL_GREEN_BIAS 0x0D19 #define GL_GREEN_BITS 0x0D53 #define GL_GREEN_SCALE 0x0D18 #define GL_HINT_BIT 0x00008000 #define GL_INCR 0x1E02 #define GL_INDEX_ARRAY 0x8077 #define GL_INDEX_ARRAY_POINTER 0x8091 #define GL_INDEX_ARRAY_STRIDE 0x8086 #define GL_INDEX_ARRAY_TYPE 0x8085 #define GL_INDEX_BITS 0x0D51 #define GL_INDEX_CLEAR_VALUE 0x0C20 #define GL_INDEX_LOGIC_OP 0x0BF1 #define GL_INDEX_MODE 0x0C30 #define GL_INDEX_OFFSET 0x0D13 #define GL_INDEX_SHIFT 0x0D12 #define GL_INDEX_WRITEMASK 0x0C21 #define GL_INT 0x1404 #define GL_INTENSITY 0x8049 #define GL_INTENSITY12 0x804C #define GL_INTENSITY16 0x804D #define GL_INTENSITY4 0x804A #define GL_INTENSITY8 0x804B #define GL_INVALID_ENUM 0x0500 #define GL_INVALID_OPERATION 0x0502 #define GL_INVALID_VALUE 0x0501 #define GL_INVERT 0x150A #define GL_KEEP 0x1E00 #define GL_LEQUAL 0x0203 #define GL_LESS 0x0201 #define GL_LIGHTING 0x0B50 #define GL_LINE 0x1B01 #define GL_LINEAR 0x2601 #define GL_LINEAR_ATTENUATION 0x1208 #define GL_LINEAR_MIPMAP_LINEAR 0x2703 #define GL_LINEAR_MIPMAP_NEAREST 0x2701 #define GL_LINES 0x0001 #define GL_LINE_BIT 0x00000004 #define GL_LINE_LOOP 0x0002 #define GL_LINE_RESET_TOKEN 0x0707 #define GL_LINE_SMOOTH 0x0B20 #define GL_LINE_SMOOTH_HINT 0x0C52 #define GL_LINE_STIPPLE 0x0B24 #define GL_LINE_STIPPLE_PATTERN 0x0B25 #define GL_LINE_STIPPLE_REPEAT 0x0B26 #define GL_LINE_STRIP 0x0003 #define GL_LINE_TOKEN 0x0702 #define GL_LINE_WIDTH 0x0B21 #define GL_LINE_WIDTH_GRANULARITY 0x0B23 #define GL_LINE_WIDTH_RANGE 0x0B22 #define GL_LOAD 0x0101 #define GL_LOGIC_OP 0x0BF1 #define GL_LOGIC_OP_MODE 0x0BF0 #define GL_LUMINANCE 0x1909 #define GL_LUMINANCE12 0x8041 #define GL_LUMINANCE12_ALPHA12 0x8047 #define GL_LUMINANCE12_ALPHA4 0x8046 #define GL_LUMINANCE16 0x8042 #define GL_LUMINANCE16_ALPHA16 0x8048 #define GL_LUMINANCE4 0x803F #define GL_LUMINANCE4_ALPHA4 0x8043 #define GL_LUMINANCE6_ALPHA2 0x8044 #define GL_LUMINANCE8 0x8040 #define GL_LUMINANCE8_ALPHA8 0x8045 #define GL_LUMINANCE_ALPHA 0x190A #define GL_MAP_COLOR 0x0D10 #define GL_MAP_STENCIL 0x0D11 #define GL_MATRIX_MODE 0x0BA0 #define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35 #define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B #define GL_MAX_CLIP_PLANES 0x0D32 #define GL_MAX_EVAL_ORDER 0x0D30 #define GL_MAX_LIGHTS 0x0D31 #define GL_MAX_LIST_NESTING 0x0B31 #define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36 #define GL_MAX_NAME_STACK_DEPTH 0x0D37 #define GL_MAX_PIXEL_MAP_TABLE 0x0D34 #define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38 #define GL_MAX_TEXTURE_SIZE 0x0D33 #define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39 #define GL_MAX_VIEWPORT_DIMS 0x0D3A #define GL_MODELVIEW 0x1700 #define GL_MODELVIEW_MATRIX 0x0BA6 #define GL_MODELVIEW_STACK_DEPTH 0x0BA3 #define GL_MODULATE 0x2100 #define GL_MULT 0x0103 #define GL_N3F_V3F 0x2A25 #define GL_NAND 0x150E #define GL_NEAREST 0x2600 #define GL_NEAREST_MIPMAP_LINEAR 0x2702 #define GL_NEAREST_MIPMAP_NEAREST 0x2700 #define GL_NEVER 0x0200 #define GL_NICEST 0x1102 #define GL_NONE 0 #define GL_NOOP 0x1505 #define GL_NOR 0x1508 #define GL_NORMALIZE 0x0BA1 #define GL_NORMAL_ARRAY 0x8075 #define GL_NORMAL_ARRAY_POINTER 0x808F #define GL_NORMAL_ARRAY_STRIDE 0x807F #define GL_NORMAL_ARRAY_TYPE 0x807E #define GL_NOTEQUAL 0x0205 #define GL_NO_ERROR 0 #define GL_OBJECT_LINEAR 0x2401 #define GL_OBJECT_PLANE 0x2501 #define GL_ONE 1 #define GL_ONE_MINUS_DST_ALPHA 0x0305 #define GL_ONE_MINUS_DST_COLOR 0x0307 #define GL_ONE_MINUS_SRC_ALPHA 0x0303 #define GL_ONE_MINUS_SRC_COLOR 0x0301 #define GL_OR 0x1507 #define GL_ORDER 0x0A01 #define GL_OR_INVERTED 0x150D #define GL_OR_REVERSE 0x150B #define GL_OUT_OF_MEMORY 0x0505 #define GL_PACK_ALIGNMENT 0x0D05 #define GL_PACK_LSB_FIRST 0x0D01 #define GL_PACK_ROW_LENGTH 0x0D02 #define GL_PACK_SKIP_PIXELS 0x0D04 #define GL_PACK_SKIP_ROWS 0x0D03 #define GL_PACK_SWAP_BYTES 0x0D00 #define GL_PASS_THROUGH_TOKEN 0x0700 #define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50 #define GL_PIXEL_MODE_BIT 0x00000020 #define GL_POINT 0x1B00 #define GL_POINTS 0x0000 #define GL_POINT_BIT 0x00000002 #define GL_POINT_SIZE 0x0B11 #define GL_POINT_SIZE_GRANULARITY 0x0B13 #define GL_POINT_SIZE_RANGE 0x0B12 #define GL_POINT_SMOOTH 0x0B10 #define GL_POINT_SMOOTH_HINT 0x0C51 #define GL_POINT_TOKEN 0x0701 #define GL_POLYGON 0x0009 #define GL_POLYGON_BIT 0x00000008 #define GL_POLYGON_MODE 0x0B40 #define GL_POLYGON_OFFSET_FACTOR 0x8038 #define GL_POLYGON_OFFSET_FILL 0x8037 #define GL_POLYGON_OFFSET_LINE 0x2A02 #define GL_POLYGON_OFFSET_POINT 0x2A01 #define GL_POLYGON_OFFSET_UNITS 0x2A00 #define GL_POLYGON_SMOOTH 0x0B41 #define GL_POLYGON_SMOOTH_HINT 0x0C53 #define GL_POLYGON_STIPPLE 0x0B42 #define GL_POLYGON_STIPPLE_BIT 0x00000010 #define GL_POLYGON_TOKEN 0x0703 #define GL_POSITION 0x1203 #define GL_PROJECTION 0x1701 #define GL_PROJECTION_MATRIX 0x0BA7 #define GL_PROJECTION_STACK_DEPTH 0x0BA4 #define GL_PROXY_TEXTURE_1D 0x8063 #define GL_PROXY_TEXTURE_2D 0x8064 #define GL_Q 0x2003 #define GL_QUADRATIC_ATTENUATION 0x1209 #define GL_QUADS 0x0007 #define GL_QUAD_STRIP 0x0008 #define GL_R 0x2002 #define GL_R3_G3_B2 0x2A10 #define GL_READ_BUFFER 0x0C02 #define GL_RED 0x1903 #define GL_RED_BIAS 0x0D15 #define GL_RED_BITS 0x0D52 #define GL_RED_SCALE 0x0D14 #define GL_RENDER 0x1C00 #define GL_RENDERER 0x1F01 #define GL_RENDER_MODE 0x0C40 #define GL_REPEAT 0x2901 #define GL_REPLACE 0x1E01 #define GL_RETURN 0x0102 #define GL_RGB 0x1907 #define GL_RGB10 0x8052 #define GL_RGB10_A2 0x8059 #define GL_RGB12 0x8053 #define GL_RGB16 0x8054 #define GL_RGB4 0x804F #define GL_RGB5 0x8050 #define GL_RGB5_A1 0x8057 #define GL_RGB8 0x8051 #define GL_RGBA 0x1908 #define GL_RGBA12 0x805A #define GL_RGBA16 0x805B #define GL_RGBA2 0x8055 #define GL_RGBA4 0x8056 #define GL_RGBA8 0x8058 #define GL_RGBA_MODE 0x0C31 #define GL_S 0x2000 #define GL_SCISSOR_BIT 0x00080000 #define GL_SCISSOR_BOX 0x0C10 #define GL_SCISSOR_TEST 0x0C11 #define GL_SET 0x150F #define GL_SHADE_MODEL 0x0B54 #define GL_SHININESS 0x1601 #define GL_SHORT 0x1402 #define GL_SMOOTH 0x1D01 #define GL_SPECULAR 0x1202 #define GL_SPHERE_MAP 0x2402 #define GL_SRC_ALPHA 0x0302 #define GL_SRC_ALPHA_SATURATE 0x0308 #define GL_SRC_COLOR 0x0300 #define GL_STACK_OVERFLOW 0x0503 #define GL_STACK_UNDERFLOW 0x0504 #define GL_STENCIL 0x1802 #define GL_STENCIL_BITS 0x0D57 #define GL_STENCIL_BUFFER_BIT 0x00000400 #define GL_STENCIL_CLEAR_VALUE 0x0B91 #define GL_STENCIL_FAIL 0x0B94 #define GL_STENCIL_FUNC 0x0B92 #define GL_STENCIL_INDEX 0x1901 #define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 #define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 #define GL_STENCIL_REF 0x0B97 #define GL_STENCIL_TEST 0x0B90 #define GL_STENCIL_VALUE_MASK 0x0B93 #define GL_STENCIL_WRITEMASK 0x0B98 #define GL_STEREO 0x0C33 #define GL_SUBPIXEL_BITS 0x0D50 #define GL_T 0x2001 #define GL_T2F_C3F_V3F 0x2A2A #define GL_T2F_C4F_N3F_V3F 0x2A2C #define GL_T2F_C4UB_V3F 0x2A29 #define GL_T2F_N3F_V3F 0x2A2B #define GL_T2F_V3F 0x2A27 #define GL_T4F_C4F_N3F_V4F 0x2A2D #define GL_T4F_V4F 0x2A28 #define GL_TEXTURE 0x1702 #define GL_TEXTURE_1D 0x0DE0 #define GL_TEXTURE_2D 0x0DE1 #define GL_TEXTURE_ALPHA_SIZE 0x805F #define GL_TEXTURE_BINDING_1D 0x8068 #define GL_TEXTURE_BINDING_2D 0x8069 #define GL_TEXTURE_BIT 0x00040000 #define GL_TEXTURE_BLUE_SIZE 0x805E #define GL_TEXTURE_BORDER 0x1005 #define GL_TEXTURE_BORDER_COLOR 0x1004 #define GL_TEXTURE_COMPONENTS 0x1003 #define GL_TEXTURE_COORD_ARRAY 0x8078 #define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092 #define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088 #define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A #define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089 #define GL_TEXTURE_ENV 0x2300 #define GL_TEXTURE_ENV_COLOR 0x2201 #define GL_TEXTURE_ENV_MODE 0x2200 #define GL_TEXTURE_GEN_MODE 0x2500 #define GL_TEXTURE_GEN_Q 0x0C63 #define GL_TEXTURE_GEN_R 0x0C62 #define GL_TEXTURE_GEN_S 0x0C60 #define GL_TEXTURE_GEN_T 0x0C61 #define GL_TEXTURE_GREEN_SIZE 0x805D #define GL_TEXTURE_HEIGHT 0x1001 #define GL_TEXTURE_INTENSITY_SIZE 0x8061 #define GL_TEXTURE_INTERNAL_FORMAT 0x1003 #define GL_TEXTURE_LUMINANCE_SIZE 0x8060 #define GL_TEXTURE_MAG_FILTER 0x2800 #define GL_TEXTURE_MATRIX 0x0BA8 #define GL_TEXTURE_MIN_FILTER 0x2801 #define GL_TEXTURE_PRIORITY 0x8066 #define GL_TEXTURE_RED_SIZE 0x805C #define GL_TEXTURE_RESIDENT 0x8067 #define GL_TEXTURE_STACK_DEPTH 0x0BA5 #define GL_TEXTURE_WIDTH 0x1000 #define GL_TEXTURE_WRAP_S 0x2802 #define GL_TEXTURE_WRAP_T 0x2803 #define GL_TRANSFORM_BIT 0x00001000 #define GL_TRIANGLES 0x0004 #define GL_TRIANGLE_FAN 0x0006 #define GL_TRIANGLE_STRIP 0x0005 #define GL_TRUE 1 #define GL_UNPACK_ALIGNMENT 0x0CF5 #define GL_UNPACK_LSB_FIRST 0x0CF1 #define GL_UNPACK_ROW_LENGTH 0x0CF2 #define GL_UNPACK_SKIP_PIXELS 0x0CF4 #define GL_UNPACK_SKIP_ROWS 0x0CF3 #define GL_UNPACK_SWAP_BYTES 0x0CF0 #define GL_UNSIGNED_BYTE 0x1401 #define GL_UNSIGNED_INT 0x1405 #define GL_UNSIGNED_SHORT 0x1403 #define GL_V2F 0x2A20 #define GL_V3F 0x2A21 #define GL_VENDOR 0x1F00 #define GL_VERSION 0x1F02 #define GL_VERTEX_ARRAY 0x8074 #define GL_VERTEX_ARRAY_POINTER 0x808E #define GL_VERTEX_ARRAY_SIZE 0x807A #define GL_VERTEX_ARRAY_STRIDE 0x807C #define GL_VERTEX_ARRAY_TYPE 0x807B #define GL_VIEWPORT 0x0BA2 #define GL_VIEWPORT_BIT 0x00000800 #define GL_XOR 0x1506 #define GL_ZERO 0 #define GL_ZOOM_X 0x0D16 #define GL_ZOOM_Y 0x0D17 #define GL_ALIASED_LINE_WIDTH_RANGE 0x846E #define GL_ALIASED_POINT_SIZE_RANGE 0x846D #define GL_BGR 0x80E0 #define GL_BGRA 0x80E1 #define GL_CLAMP_TO_EDGE 0x812F #define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8 #define GL_MAX_3D_TEXTURE_SIZE 0x8073 #define GL_MAX_ELEMENTS_INDICES 0x80E9 #define GL_MAX_ELEMENTS_VERTICES 0x80E8 #define GL_PACK_IMAGE_HEIGHT 0x806C #define GL_PACK_SKIP_IMAGES 0x806B #define GL_PROXY_TEXTURE_3D 0x8070 #define GL_RESCALE_NORMAL 0x803A #define GL_SEPARATE_SPECULAR_COLOR 0x81FA #define GL_SINGLE_COLOR 0x81F9 #define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23 #define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22 #define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13 #define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12 #define GL_TEXTURE_3D 0x806F #define GL_TEXTURE_BASE_LEVEL 0x813C #define GL_TEXTURE_BINDING_3D 0x806A #define GL_TEXTURE_DEPTH 0x8071 #define GL_TEXTURE_MAX_LEVEL 0x813D #define GL_TEXTURE_MAX_LOD 0x813B #define GL_TEXTURE_MIN_LOD 0x813A #define GL_TEXTURE_WRAP_R 0x8072 #define GL_UNPACK_IMAGE_HEIGHT 0x806E #define GL_UNPACK_SKIP_IMAGES 0x806D #define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 #define GL_UNSIGNED_BYTE_3_3_2 0x8032 #define GL_UNSIGNED_INT_10_10_10_2 0x8036 #define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 #define GL_UNSIGNED_INT_8_8_8_8 0x8035 #define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 #define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 #define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 #define GL_UNSIGNED_SHORT_5_6_5 0x8363 #define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 #ifndef GL_EXT_blend_minmax #define GL_EXT_blend_minmax 1 extern void (CODEGEN_FUNCPTR *sf_ptrc_glBlendEquationEXT)(GLenum); #define glBlendEquationEXT sf_ptrc_glBlendEquationEXT #endif /*GL_EXT_blend_minmax*/ #ifndef GL_ARB_multitexture #define GL_ARB_multitexture 1 extern void (CODEGEN_FUNCPTR *sf_ptrc_glActiveTextureARB)(GLenum); #define glActiveTextureARB sf_ptrc_glActiveTextureARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glClientActiveTextureARB)(GLenum); #define glClientActiveTextureARB sf_ptrc_glClientActiveTextureARB #endif /*GL_ARB_multitexture*/ #ifndef GL_EXT_blend_func_separate #define GL_EXT_blend_func_separate 1 extern void (CODEGEN_FUNCPTR *sf_ptrc_glBlendFuncSeparateEXT)(GLenum, GLenum, GLenum, GLenum); #define glBlendFuncSeparateEXT sf_ptrc_glBlendFuncSeparateEXT #endif /*GL_EXT_blend_func_separate*/ #ifndef GL_ARB_shader_objects #define GL_ARB_shader_objects 1 extern void (CODEGEN_FUNCPTR *sf_ptrc_glAttachObjectARB)(GLhandleARB, GLhandleARB); #define glAttachObjectARB sf_ptrc_glAttachObjectARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glCompileShaderARB)(GLhandleARB); #define glCompileShaderARB sf_ptrc_glCompileShaderARB extern GLhandleARB (CODEGEN_FUNCPTR *sf_ptrc_glCreateProgramObjectARB)(); #define glCreateProgramObjectARB sf_ptrc_glCreateProgramObjectARB extern GLhandleARB (CODEGEN_FUNCPTR *sf_ptrc_glCreateShaderObjectARB)(GLenum); #define glCreateShaderObjectARB sf_ptrc_glCreateShaderObjectARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glDeleteObjectARB)(GLhandleARB); #define glDeleteObjectARB sf_ptrc_glDeleteObjectARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glDetachObjectARB)(GLhandleARB, GLhandleARB); #define glDetachObjectARB sf_ptrc_glDetachObjectARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glGetActiveUniformARB)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *); #define glGetActiveUniformARB sf_ptrc_glGetActiveUniformARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glGetAttachedObjectsARB)(GLhandleARB, GLsizei, GLsizei *, GLhandleARB *); #define glGetAttachedObjectsARB sf_ptrc_glGetAttachedObjectsARB extern GLhandleARB (CODEGEN_FUNCPTR *sf_ptrc_glGetHandleARB)(GLenum); #define glGetHandleARB sf_ptrc_glGetHandleARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glGetInfoLogARB)(GLhandleARB, GLsizei, GLsizei *, GLcharARB *); #define glGetInfoLogARB sf_ptrc_glGetInfoLogARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glGetObjectParameterfvARB)(GLhandleARB, GLenum, GLfloat *); #define glGetObjectParameterfvARB sf_ptrc_glGetObjectParameterfvARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glGetObjectParameterivARB)(GLhandleARB, GLenum, GLint *); #define glGetObjectParameterivARB sf_ptrc_glGetObjectParameterivARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glGetShaderSourceARB)(GLhandleARB, GLsizei, GLsizei *, GLcharARB *); #define glGetShaderSourceARB sf_ptrc_glGetShaderSourceARB extern GLint (CODEGEN_FUNCPTR *sf_ptrc_glGetUniformLocationARB)(GLhandleARB, const GLcharARB *); #define glGetUniformLocationARB sf_ptrc_glGetUniformLocationARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glGetUniformfvARB)(GLhandleARB, GLint, GLfloat *); #define glGetUniformfvARB sf_ptrc_glGetUniformfvARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glGetUniformivARB)(GLhandleARB, GLint, GLint *); #define glGetUniformivARB sf_ptrc_glGetUniformivARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glLinkProgramARB)(GLhandleARB); #define glLinkProgramARB sf_ptrc_glLinkProgramARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glShaderSourceARB)(GLhandleARB, GLsizei, const GLcharARB **, const GLint *); #define glShaderSourceARB sf_ptrc_glShaderSourceARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniform1fARB)(GLint, GLfloat); #define glUniform1fARB sf_ptrc_glUniform1fARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniform1fvARB)(GLint, GLsizei, const GLfloat *); #define glUniform1fvARB sf_ptrc_glUniform1fvARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniform1iARB)(GLint, GLint); #define glUniform1iARB sf_ptrc_glUniform1iARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniform1ivARB)(GLint, GLsizei, const GLint *); #define glUniform1ivARB sf_ptrc_glUniform1ivARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniform2fARB)(GLint, GLfloat, GLfloat); #define glUniform2fARB sf_ptrc_glUniform2fARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniform2fvARB)(GLint, GLsizei, const GLfloat *); #define glUniform2fvARB sf_ptrc_glUniform2fvARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniform2iARB)(GLint, GLint, GLint); #define glUniform2iARB sf_ptrc_glUniform2iARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniform2ivARB)(GLint, GLsizei, const GLint *); #define glUniform2ivARB sf_ptrc_glUniform2ivARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniform3fARB)(GLint, GLfloat, GLfloat, GLfloat); #define glUniform3fARB sf_ptrc_glUniform3fARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniform3fvARB)(GLint, GLsizei, const GLfloat *); #define glUniform3fvARB sf_ptrc_glUniform3fvARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniform3iARB)(GLint, GLint, GLint, GLint); #define glUniform3iARB sf_ptrc_glUniform3iARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniform3ivARB)(GLint, GLsizei, const GLint *); #define glUniform3ivARB sf_ptrc_glUniform3ivARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniform4fARB)(GLint, GLfloat, GLfloat, GLfloat, GLfloat); #define glUniform4fARB sf_ptrc_glUniform4fARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniform4fvARB)(GLint, GLsizei, const GLfloat *); #define glUniform4fvARB sf_ptrc_glUniform4fvARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniform4iARB)(GLint, GLint, GLint, GLint, GLint); #define glUniform4iARB sf_ptrc_glUniform4iARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniform4ivARB)(GLint, GLsizei, const GLint *); #define glUniform4ivARB sf_ptrc_glUniform4ivARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniformMatrix2fvARB)(GLint, GLsizei, GLboolean, const GLfloat *); #define glUniformMatrix2fvARB sf_ptrc_glUniformMatrix2fvARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniformMatrix3fvARB)(GLint, GLsizei, GLboolean, const GLfloat *); #define glUniformMatrix3fvARB sf_ptrc_glUniformMatrix3fvARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glUniformMatrix4fvARB)(GLint, GLsizei, GLboolean, const GLfloat *); #define glUniformMatrix4fvARB sf_ptrc_glUniformMatrix4fvARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glUseProgramObjectARB)(GLhandleARB); #define glUseProgramObjectARB sf_ptrc_glUseProgramObjectARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glValidateProgramARB)(GLhandleARB); #define glValidateProgramARB sf_ptrc_glValidateProgramARB #endif /*GL_ARB_shader_objects*/ #ifndef GL_ARB_vertex_shader #define GL_ARB_vertex_shader 1 extern void (CODEGEN_FUNCPTR *sf_ptrc_glBindAttribLocationARB)(GLhandleARB, GLuint, const GLcharARB *); #define glBindAttribLocationARB sf_ptrc_glBindAttribLocationARB extern void (CODEGEN_FUNCPTR *sf_ptrc_glGetActiveAttribARB)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *); #define glGetActiveAttribARB sf_ptrc_glGetActiveAttribARB extern GLint (CODEGEN_FUNCPTR *sf_ptrc_glGetAttribLocationARB)(GLhandleARB, const GLcharARB *); #define glGetAttribLocationARB sf_ptrc_glGetAttribLocationARB #endif /*GL_ARB_vertex_shader*/ #ifndef GL_EXT_blend_equation_separate #define GL_EXT_blend_equation_separate 1 extern void (CODEGEN_FUNCPTR *sf_ptrc_glBlendEquationSeparateEXT)(GLenum, GLenum); #define glBlendEquationSeparateEXT sf_ptrc_glBlendEquationSeparateEXT #endif /*GL_EXT_blend_equation_separate*/ #ifndef GL_EXT_framebuffer_object #define GL_EXT_framebuffer_object 1 extern void (CODEGEN_FUNCPTR *sf_ptrc_glBindFramebufferEXT)(GLenum, GLuint); #define glBindFramebufferEXT sf_ptrc_glBindFramebufferEXT extern void (CODEGEN_FUNCPTR *sf_ptrc_glBindRenderbufferEXT)(GLenum, GLuint); #define glBindRenderbufferEXT sf_ptrc_glBindRenderbufferEXT extern GLenum (CODEGEN_FUNCPTR *sf_ptrc_glCheckFramebufferStatusEXT)(GLenum); #define glCheckFramebufferStatusEXT sf_ptrc_glCheckFramebufferStatusEXT extern void (CODEGEN_FUNCPTR *sf_ptrc_glDeleteFramebuffersEXT)(GLsizei, const GLuint *); #define glDeleteFramebuffersEXT sf_ptrc_glDeleteFramebuffersEXT extern void (CODEGEN_FUNCPTR *sf_ptrc_glDeleteRenderbuffersEXT)(GLsizei, const GLuint *); #define glDeleteRenderbuffersEXT sf_ptrc_glDeleteRenderbuffersEXT extern void (CODEGEN_FUNCPTR *sf_ptrc_glFramebufferRenderbufferEXT)(GLenum, GLenum, GLenum, GLuint); #define glFramebufferRenderbufferEXT sf_ptrc_glFramebufferRenderbufferEXT extern void (CODEGEN_FUNCPTR *sf_ptrc_glFramebufferTexture1DEXT)(GLenum, GLenum, GLenum, GLuint, GLint); #define glFramebufferTexture1DEXT sf_ptrc_glFramebufferTexture1DEXT extern void (CODEGEN_FUNCPTR *sf_ptrc_glFramebufferTexture2DEXT)(GLenum, GLenum, GLenum, GLuint, GLint); #define glFramebufferTexture2DEXT sf_ptrc_glFramebufferTexture2DEXT extern void (CODEGEN_FUNCPTR *sf_ptrc_glFramebufferTexture3DEXT)(GLenum, GLenum, GLenum, GLuint, GLint, GLint); #define glFramebufferTexture3DEXT sf_ptrc_glFramebufferTexture3DEXT extern void (CODEGEN_FUNCPTR *sf_ptrc_glGenFramebuffersEXT)(GLsizei, GLuint *); #define glGenFramebuffersEXT sf_ptrc_glGenFramebuffersEXT extern void (CODEGEN_FUNCPTR *sf_ptrc_glGenRenderbuffersEXT)(GLsizei, GLuint *); #define glGenRenderbuffersEXT sf_ptrc_glGenRenderbuffersEXT extern void (CODEGEN_FUNCPTR *sf_ptrc_glGenerateMipmapEXT)(GLenum); #define glGenerateMipmapEXT sf_ptrc_glGenerateMipmapEXT extern void (CODEGEN_FUNCPTR *sf_ptrc_glGetFramebufferAttachmentParameterivEXT)(GLenum, GLenum, GLenum, GLint *); #define glGetFramebufferAttachmentParameterivEXT sf_ptrc_glGetFramebufferAttachmentParameterivEXT extern void (CODEGEN_FUNCPTR *sf_ptrc_glGetRenderbufferParameterivEXT)(GLenum, GLenum, GLint *); #define glGetRenderbufferParameterivEXT sf_ptrc_glGetRenderbufferParameterivEXT extern GLboolean (CODEGEN_FUNCPTR *sf_ptrc_glIsFramebufferEXT)(GLuint); #define glIsFramebufferEXT sf_ptrc_glIsFramebufferEXT extern GLboolean (CODEGEN_FUNCPTR *sf_ptrc_glIsRenderbufferEXT)(GLuint); #define glIsRenderbufferEXT sf_ptrc_glIsRenderbufferEXT extern void (CODEGEN_FUNCPTR *sf_ptrc_glRenderbufferStorageEXT)(GLenum, GLenum, GLsizei, GLsizei); #define glRenderbufferStorageEXT sf_ptrc_glRenderbufferStorageEXT #endif /*GL_EXT_framebuffer_object*/ GLAPI void APIENTRY glBlendFunc(GLenum, GLenum); GLAPI void APIENTRY glClear(GLbitfield); GLAPI void APIENTRY glClearColor(GLfloat, GLfloat, GLfloat, GLfloat); GLAPI void APIENTRY glClearDepth(GLdouble); GLAPI void APIENTRY glClearStencil(GLint); GLAPI void APIENTRY glClipPlane(GLenum, const GLdouble *); GLAPI void APIENTRY glColorMask(GLboolean, GLboolean, GLboolean, GLboolean); GLAPI void APIENTRY glCopyPixels(GLint, GLint, GLsizei, GLsizei, GLenum); GLAPI void APIENTRY glCullFace(GLenum); GLAPI void APIENTRY glDepthFunc(GLenum); GLAPI void APIENTRY glDepthMask(GLboolean); GLAPI void APIENTRY glDepthRange(GLdouble, GLdouble); GLAPI void APIENTRY glDisable(GLenum); GLAPI void APIENTRY glDrawBuffer(GLenum); GLAPI void APIENTRY glEnable(GLenum); GLAPI void APIENTRY glFinish(); GLAPI void APIENTRY glFlush(); GLAPI void APIENTRY glFrontFace(GLenum); GLAPI void APIENTRY glFrustum(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glGetBooleanv(GLenum, GLboolean *); GLAPI void APIENTRY glGetDoublev(GLenum, GLdouble *); GLAPI GLenum APIENTRY glGetError(); GLAPI void APIENTRY glGetFloatv(GLenum, GLfloat *); GLAPI void APIENTRY glGetIntegerv(GLenum, GLint *); GLAPI const GLubyte * APIENTRY glGetString(GLenum); GLAPI void APIENTRY glGetTexEnvfv(GLenum, GLenum, GLfloat *); GLAPI void APIENTRY glGetTexEnviv(GLenum, GLenum, GLint *); GLAPI void APIENTRY glGetTexGendv(GLenum, GLenum, GLdouble *); GLAPI void APIENTRY glGetTexGenfv(GLenum, GLenum, GLfloat *); GLAPI void APIENTRY glGetTexGeniv(GLenum, GLenum, GLint *); GLAPI void APIENTRY glGetTexImage(GLenum, GLint, GLenum, GLenum, GLvoid *); GLAPI void APIENTRY glGetTexLevelParameterfv(GLenum, GLint, GLenum, GLfloat *); GLAPI void APIENTRY glGetTexLevelParameteriv(GLenum, GLint, GLenum, GLint *); GLAPI void APIENTRY glGetTexParameterfv(GLenum, GLenum, GLfloat *); GLAPI void APIENTRY glGetTexParameteriv(GLenum, GLenum, GLint *); GLAPI void APIENTRY glHint(GLenum, GLenum); GLAPI void APIENTRY glIndexMask(GLuint); GLAPI GLboolean APIENTRY glIsEnabled(GLenum); GLAPI void APIENTRY glLineWidth(GLfloat); GLAPI void APIENTRY glLoadIdentity(); GLAPI void APIENTRY glLoadMatrixd(const GLdouble *); GLAPI void APIENTRY glLoadMatrixf(const GLfloat *); GLAPI void APIENTRY glMatrixMode(GLenum); GLAPI void APIENTRY glMultMatrixd(const GLdouble *); GLAPI void APIENTRY glMultMatrixf(const GLfloat *); GLAPI void APIENTRY glOrtho(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble); GLAPI void APIENTRY glPointSize(GLfloat); GLAPI void APIENTRY glPopAttrib(); GLAPI void APIENTRY glPopMatrix(); GLAPI void APIENTRY glPushAttrib(GLbitfield); GLAPI void APIENTRY glPushMatrix(); GLAPI void APIENTRY glReadBuffer(GLenum); GLAPI void APIENTRY glReadPixels(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid *); GLAPI void APIENTRY glScissor(GLint, GLint, GLsizei, GLsizei); GLAPI void APIENTRY glShadeModel(GLenum); GLAPI void APIENTRY glStencilFunc(GLenum, GLint, GLuint); GLAPI void APIENTRY glStencilMask(GLuint); GLAPI void APIENTRY glStencilOp(GLenum, GLenum, GLenum); GLAPI void APIENTRY glTexImage1D(GLenum, GLint, GLint, GLsizei, GLint, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glTexImage2D(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glTexParameterf(GLenum, GLenum, GLfloat); GLAPI void APIENTRY glTexParameterfv(GLenum, GLenum, const GLfloat *); GLAPI void APIENTRY glTexParameteri(GLenum, GLenum, GLint); GLAPI void APIENTRY glTexParameteriv(GLenum, GLenum, const GLint *); GLAPI void APIENTRY glViewport(GLint, GLint, GLsizei, GLsizei); GLAPI void APIENTRY glBindTexture(GLenum, GLuint); GLAPI void APIENTRY glColorPointer(GLint, GLenum, GLsizei, const GLvoid *); GLAPI void APIENTRY glCopyTexImage1D(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint); GLAPI void APIENTRY glCopyTexImage2D(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint); GLAPI void APIENTRY glCopyTexSubImage1D(GLenum, GLint, GLint, GLint, GLint, GLsizei); GLAPI void APIENTRY glCopyTexSubImage2D(GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); GLAPI void APIENTRY glDeleteTextures(GLsizei, const GLuint *); GLAPI void APIENTRY glDisableClientState(GLenum); GLAPI void APIENTRY glDrawArrays(GLenum, GLint, GLsizei); GLAPI void APIENTRY glDrawElements(GLenum, GLsizei, GLenum, const GLvoid *); GLAPI void APIENTRY glEnableClientState(GLenum); GLAPI void APIENTRY glGenTextures(GLsizei, GLuint *); GLAPI void APIENTRY glGetPointerv(GLenum, GLvoid **); GLAPI void APIENTRY glNormalPointer(GLenum, GLsizei, const GLvoid *); GLAPI void APIENTRY glPolygonOffset(GLfloat, GLfloat); GLAPI void APIENTRY glPopClientAttrib(); GLAPI void APIENTRY glPushClientAttrib(GLbitfield); GLAPI void APIENTRY glTexCoordPointer(GLint, GLenum, GLsizei, const GLvoid *); GLAPI void APIENTRY glTexSubImage1D(GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glTexSubImage2D(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); GLAPI void APIENTRY glVertexPointer(GLint, GLenum, GLsizei, const GLvoid *); extern void (CODEGEN_FUNCPTR *sf_ptrc_glBlendColor)(GLfloat, GLfloat, GLfloat, GLfloat); #define glBlendColor sf_ptrc_glBlendColor extern void (CODEGEN_FUNCPTR *sf_ptrc_glBlendEquation)(GLenum); #define glBlendEquation sf_ptrc_glBlendEquation extern void (CODEGEN_FUNCPTR *sf_ptrc_glCopyTexSubImage3D)(GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); #define glCopyTexSubImage3D sf_ptrc_glCopyTexSubImage3D extern void (CODEGEN_FUNCPTR *sf_ptrc_glDrawRangeElements)(GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *); #define glDrawRangeElements sf_ptrc_glDrawRangeElements extern void (CODEGEN_FUNCPTR *sf_ptrc_glTexImage3D)(GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *); #define glTexImage3D sf_ptrc_glTexImage3D extern void (CODEGEN_FUNCPTR *sf_ptrc_glTexSubImage3D)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); #define glTexSubImage3D sf_ptrc_glTexSubImage3D enum sfogl_LoadStatus { sfogl_LOAD_FAILED = 0, sfogl_LOAD_SUCCEEDED = 1 }; int sfogl_LoadFunctions(); int sfogl_GetMinorVersion(); int sfogl_GetMajorVersion(); int sfogl_IsVersionGEQ(int majorVersion, int minorVersion); #ifdef __cplusplus } #endif /*__cplusplus*/ #endif //SF_POINTER_C_GENERATED_HEADER_OPENGL_HPP
39.509519
152
0.851534
d784bf6a57ff77916116d7de97f48dccb3c4ef2c
1,593
sql
SQL
databasepi.sql
LucasGaldinno/crud-produtos
4fe392efdc64a1f1c60861eff8b207e75909989d
[ "MIT" ]
null
null
null
databasepi.sql
LucasGaldinno/crud-produtos
4fe392efdc64a1f1c60861eff8b207e75909989d
[ "MIT" ]
null
null
null
databasepi.sql
LucasGaldinno/crud-produtos
4fe392efdc64a1f1c60861eff8b207e75909989d
[ "MIT" ]
null
null
null
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Tempo de geração: 14-Fev-2022 às 02:22 -- Versão do servidor: 10.4.21-MariaDB -- versão do PHP: 8.0.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Banco de dados: `databasepi` -- -- -------------------------------------------------------- -- -- Estrutura da tabela `hibernate_sequence` -- CREATE TABLE `hibernate_sequence` ( `next_val` bigint(20) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Extraindo dados da tabela `hibernate_sequence` -- INSERT INTO `hibernate_sequence` (`next_val`) VALUES (9); -- -------------------------------------------------------- -- -- Estrutura da tabela `produto` -- CREATE TABLE `produto` ( `codigo` bigint(20) NOT NULL, `descricao` varchar(255) DEFAULT NULL, `nome` varchar(255) DEFAULT NULL, `qtd_produto` varchar(255) DEFAULT NULL, `valor` varchar(255) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Índices para tabelas despejadas -- -- -- Índices para tabela `produto` -- ALTER TABLE `produto` ADD PRIMARY KEY (`codigo`); COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
23.086957
67
0.666667
c32d49f6433035f647d62fa70ce5319e717b7eec
469
dart
Dart
lib/services/apis/bookmarks/bookmark_remove_multiple_places_api.dart
juniorise/cambodia_geography_mobile
bb0e9ccee03cd133416bfab306fdeeb4c52b1e13
[ "MIT" ]
11
2021-07-30T05:38:43.000Z
2022-02-18T17:35:13.000Z
lib/services/apis/bookmarks/bookmark_remove_multiple_places_api.dart
theacheng/cambodia_geography
bb0e9ccee03cd133416bfab306fdeeb4c52b1e13
[ "MIT" ]
75
2021-07-23T16:35:20.000Z
2021-12-09T18:12:42.000Z
lib/services/apis/bookmarks/bookmark_remove_multiple_places_api.dart
juniorise/cambodia_geography_mobile
bb0e9ccee03cd133416bfab306fdeeb4c52b1e13
[ "MIT" ]
4
2021-09-04T10:21:02.000Z
2021-12-08T13:19:24.000Z
import 'package:cambodia_geography/services/apis/base_resource_owner_api.dart'; class BookmarkRemoveMultiplePlacesApi extends BaseResourceOwnerApi { @override String get nameInUrl => "bookmark/remove_places"; Future<void> removeMultiplePlaces({ required List<String> placeIds, }) { return super.delete( body: { "placeId": placeIds, }, ); } @override objectTransformer(Map<String, dynamic> json) { return json; } }
21.318182
79
0.697228
a55bdf63ebb53fd4585663a7f98fada793d4d76d
1,767
ps1
PowerShell
PsXLDeploy/Private/Add-Tag.ps1
Plork/PSXLDeploy
bcc0195466cf9ee922ed979fe0bf0b124f160f66
[ "Apache-2.0" ]
1
2017-12-12T13:59:32.000Z
2017-12-12T13:59:32.000Z
PsXLDeploy/Private/Add-Tag.ps1
Plork/PsXLDeploy
bcc0195466cf9ee922ed979fe0bf0b124f160f66
[ "Apache-2.0" ]
null
null
null
PsXLDeploy/Private/Add-Tag.ps1
Plork/PsXLDeploy
bcc0195466cf9ee922ed979fe0bf0b124f160f66
[ "Apache-2.0" ]
null
null
null
function Add-Tag { <# .SYNOPSIS Add tags to an configuration item. .DESCRIPTION Add tags to an configuration item xml. .PARAMETER ConfigurationItem The XML body of the configuration item. .PARAMETER Tags The XML body of the configuration item. .OUTPUTS [xml] with the configuration item with the updated tags is returned. .EXAMPLE Add-Tag -ConfigurationItem $ConfigurationItem -Tags Tag1,Tag2 .LINK https://docs.xebialabs.com/generated/xl-deploy/6.0.x/rest-api/ #> [cmdletbinding(SupportsShouldProcess)] [OutputType([xml])] param( [Parameter(ValueFromPipeline, Mandatory)] [xml]$ConfigurationItem, [string[]]$Tags ) PROCESS { $RepositoryID = ($ConfigurationItem | Select-XML -XPath ("//*/@id")).Id $Type = Get-RepositoryType -ConfigurationItem $ConfigurationItem ForEach ($Tag in $Tags) { $TagsElement = $ConfigurationItem | Select-Xml -XPath ("//tags/value[. ='{0}']" -f $Tag) if (-not $TagsElement) { if ($PSCmdlet.ShouldProcess($RepositoryId, ("Add tag '{0}'." -f $Tag))) { $TagsElement = $ConfigurationItem.CreateElement('value') $TagsElement.Innertext = $Tag $Tagsnode = $ConfigurationItem.$Type.SelectSingleNode('tags') $null = $Tagsnode.AppendChild($TagsElement) } } Else { Write-Verbose -Message ("{0} already a tag of {1}" -f $Tag, $RepositoryId) } } } End { return $ConfigurationItem } }
31.553571
100
0.543294
9bc69dd0d7431cc305d757ee7b0623ec8eb205e5
1,750
sql
SQL
src/test/resources/sql-schema.sql
saifr96/New-IMS
948d1716542b95eced3018143cfa60dc5f3e70e6
[ "MIT" ]
null
null
null
src/test/resources/sql-schema.sql
saifr96/New-IMS
948d1716542b95eced3018143cfa60dc5f3e70e6
[ "MIT" ]
null
null
null
src/test/resources/sql-schema.sql
saifr96/New-IMS
948d1716542b95eced3018143cfa60dc5f3e70e6
[ "MIT" ]
null
null
null
DROP TABLE IF EXISTS `customers`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `customers` ( `id` int(20) NOT NULL AUTO_INCREMENT, `first_name` varchar(45) CHARACTER SET latin1 NOT NULL, `surname` varchar(45) CHARACTER SET latin1 NOT NULL, PRIMARY KEY (`id`,`first_name`,`surname`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 COLLATE=latin1_bin; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `order_line`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `order_line` ( `id` int(20) NOT NULL AUTO_INCREMENT, `order_id` int(20) DEFAULT NULL, `product_id` int(20) DEFAULT NULL, `price` decimal(6,2) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `orders`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `orders` ( `id` int(11) NOT NULL AUTO_INCREMENT, `customer_id` int(20) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `products`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `products` ( `id` int(20) NOT NULL AUTO_INCREMENT, `product_name` varchar(45) NOT NULL, `Price` decimal(6,2) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; /*!40101 SET character_set_client = @saved_cs_client */;
37.234043
75
0.724571
2b730a97f626852b8e0eee8ed4511c56b712cf56
30,717
lua
Lua
src/core/init.lua
richardhundt/shine
c86d1c329c60cf77f413d2b192142dee73fec55c
[ "MIT" ]
133
2015-01-20T15:36:48.000Z
2022-03-23T06:35:48.000Z
src/core/init.lua
richardhundt/shine
c86d1c329c60cf77f413d2b192142dee73fec55c
[ "MIT" ]
14
2015-01-05T21:02:33.000Z
2019-11-14T18:05:32.000Z
src/core/init.lua
richardhundt/shine
c86d1c329c60cf77f413d2b192142dee73fec55c
[ "MIT" ]
16
2015-02-09T09:07:22.000Z
2022-03-06T18:40:32.000Z
--[=[ Copyright (C) 2013-2018 Richard Hundt and contributors. See Copyright Notice in shine ]=] local loader = require("shine.lang.loader").loader table.insert(package.loaders, 1, loader) local ffi = require('ffi') local lpeg = require('lpeg') local null = ffi.cast('void*', 0x0) local Class local Range local Object local export = { } export._VERSION = "0.1.1" local type, tonumber, tostring = _G.type, _G.tonumber, _G.tostring local getmetatable, setmetatable = _G.getmetatable, _G.setmetatable local pcall, unpack, select = _G.pcall, _G.unpack, _G.select local __is__, __match__ local Meta = { } Meta.__index = Meta Meta.__members__ = { } Meta.__getters__ = { } Meta.__setters__ = { } Meta.__getindex = rawget Meta.__setindex = rawset Meta.__tostring = function(o) if o.__tostring__ then return o:__tostring__() end return tostring(rawget(o, '__name') or type(o)) end local Function = setmetatable({ __name = 'Function' }, Meta) Function.__tostring = function(self) local info = debug.getinfo(self, 'un') local nparams = info.nparams local params = {} for i = 1, nparams do params[i] = debug.getlocal(self, i) end if info.isvararg then params[#params+1] = '...' end return string.format('function(%s): %p', table.concat(params,', '), self) end function Function.__index(self, k) return Function.__members__[k] end Function.__members__.clone = function(self) local copy = loadstring(string.dump(self)) local info = debug.getinfo(self, 'u') for i=1, info.nups do debug.upvaluejoin(copy, i, self, i) end setfenv(copy, getfenv(self)) return copy end function Function.__members__.compose(f1, f2) return function(...) return f1(f2(...)) end end function Function.__members__.andthen(f1, f2) return f2:compose(f1) end function Function.__uadd(f1, f2) return f2:compose(f1) end debug.setmetatable(function() end, Function) local Module = setmetatable({ __name = 'Module' }, Meta) function Module.__index(self, k) if self.__getters__[k] then return self.__getters__[k](self) end if self.__members__[k] then return self.__members__[k] end return nil end function Module.__newindex(self, k, v) if self.__setters__[k] then self.__setters__[k](self, v) else rawset(self, k, v) end end function Module.__tostring(self) if self.__tostring__ then return self:__tostring__() else return string.format('%s', self.__name) end end function Module.__call(self, ...) if self.__apply then return self:__apply(...) end local body = self.__body:clone() local name = self.__name .. '@' .. string.format('%p', module) local module = { __body = body, __name = name } module.__getters__ = { } module.__setters__ = { } module.__members__ = { } module.__include__ = { } module.__is = function(self, that) if that == self then return true end local m = getmetatable(that) if m == Module then m = that end if m and m.__include__ and m.__include__[self] then return true end return false end setfenv(body, setmetatable({ __self__ = module }, { __index = getfenv(2) })) body(setmetatable(module, Module), ...) return module end local function module(name, body) local module = { __name = name, __body = body } module.__getters__ = { } module.__setters__ = { } module.__members__ = { } module.__include__ = { } module.__is = function(self, that) if that == self then return true end local m = getmetatable(that) if m == Module then m = that end if m and m.__include__ and m.__include__[self] then return true end return false end setfenv(body, setmetatable({ __self__ = module }, { __index = getfenv(2) })) body(setmetatable(module, Module)) return module end Class = setmetatable({ __name = 'Class' }, Meta) function Class.__call(class, ...) local obj if class.__apply then obj = class:__apply(...) else obj = { } setmetatable(obj, class) if class.__members__.self then class.__members__.self(obj, ...) end end return obj end function Class.__tostring(class) return string.format("%s", class.__name) end Object = setmetatable({ }, Class) Object.__name = 'Object' Object.__body = function(self) end Object.__getters__ = { } Object.__setters__ = { } Object.__members__ = { } Object.__include__ = { } local special = { __add__ = { '__add', function(a, b) return a:__add__(b) end }; __sub__ = { '__sub', function(a, b) return a:__sub__(b) end }; __mul__ = { '__mul', function(a, b) return a:__mul__(b) end }; __div__ = { '__div', function(a, b) return a:__div__(b) end }; __pow__ = { '__pow', function(a, b) return a:__pow__(b) end }; __mod__ = { '__mod', function(a, b) return a:__mod__(b) end }; __len__ = { '__len', function(a, b) return a:__len__(b) end }; __unm__ = { '__unm', function(a, b) return a:__unm__(b) end }; __get__ = { '__getindex', function(a, k) return a:__get__(k) end }; __set__ = { '__setindex', function(a, k, v) a:__set__(k, v) end }; __concat__ = { '__concat', function(a, b) return a:__concat__(b) end }; __pairs__ = { '__pairs', function(a, b) return a:__pairs__() end }; __ipairs__ = { '__ipairs', function(a, b) return a:__ipairs__() end }; __call__ = { '__call', function(self, ...) return self:__call__(...) end }; __tostring__ = { '__tostring', function(self, ...) return self:__tostring__(...) end }; } local function class(name, body, ...) local base if select('#', ...) > 0 then if select(1, ...) == nil then error("attempt to extend a 'nil' value", 2) end base = ... end if not base then base = Object end local class = { __name = name, __base = base, __body = body } local __getters__ = { } local __setters__ = { } local __members__ = { } local __include__ = { } setmetatable(__getters__, { __index = base.__getters__ }) setmetatable(__setters__, { __index = base.__setters__ }) setmetatable(__members__, { __index = base.__members__ }) setmetatable(__include__, { __index = base.__include__ }) class.__getters__ = __getters__ class.__setters__ = __setters__ class.__members__ = __members__ class.__include__ = __include__ function __getters__.__class(self) return class end function class.__index(o, k) if __getters__[k] then return __getters__[k](o) end if __members__[k] then return __members__[k] end if class.__getindex then return class.__getindex(o, k) end return nil end function class.__newindex(o, k, v) if __setters__[k] then __setters__[k](o, v) elseif class.__setindex then class.__setindex(o, k, v) else rawset(o, k, v) end end function __members__.__tostring__(o) return string.format('<%s>: %p', tostring(class.__name), o) end setfenv(body, setmetatable({ __self__ = class }, { __index = getfenv(2) })) body(setmetatable(class, Class), base.__members__) for name, delg in pairs(special) do if __members__[name] then class[delg[1]] = delg[2] end end if class.__finalize then local retv = class:__finalize() if retv ~= nil then return retv end end return class end local function include(into, ...) for i=1, select('#', ...) do if select(i, ...) == nil then error("attempt to include a nil value", 2) end end local args = { ... } for i=1, #args do local from = args[i] for k,v in pairs(from.__getters__) do into.__getters__[k] = v end for k,v in pairs(from.__setters__) do into.__setters__[k] = v end for k,v in pairs(from.__members__) do into.__members__[k] = v end if from.__included then from:__included(into) end if from.__include__ then for k,v in pairs(from.__include__) do into.__include__[k] = true end end into.__include__[from] = true end end local Array = class("Array", function(self) local Array = self local unpack, select, table = unpack, select, table function self:__apply(...) return setmetatable({ length = select('#', ...), [0] = select(1, ...), select(2, ...) }, self) end function self.__each(a) local l = a.length local i = -1 return function(a) i = i + 1 local v = a[i] if i < l then return i, v end return nil end, a end function self.__pairs(self) return function(self, ctrl) local i = ctrl + 1 if i < self.length then return i, self[i] end end, self, -1 end function self.__ipairs(self) return function(self, ctrl) local i = ctrl + 1 if i < self.length then return i, self[i] end end, self, -1 end function self.__members__:join(sep) local t = { } for i=0, #self - 1 do t[#t + 1] = tostring(self[i]) end return table.concat(t, sep) end function self.__members__:push(val) self[self.length] = val end function self.__members__:pop() local last = self[self.length - 1] self[self.length - 1] = nil self.length = self.length - 1 return last end function self.__members__:shift() local v = self[0] local l = self.length for i=1, l - 1 do self[i - 1] = self[i] end self.length = l - 1 self[l - 1] = nil return v end function self.__members__:unshift(v) local l = self.length for i = l - 1, 0, -1 do self[i + 1] = self[i] end self.length = l + 1 self[0] = v end function self.__members__:slice(offset, count) local a = Array() for i=offset, offset + count - 1 do a[a.length] = self[i] end return a end function self.__members__:reverse() local a = Array() for i = self.length - 1, 0, -1 do a[a.length] = self[i] end return a end local gaps = { 1391376, 463792, 198768, 86961, 33936, 13776, 4592, 1968, 861, 336, 112, 48, 21, 7, 3, 1 } local less = function(a, b) return a < b end function self.__members__:sort(cmp, n) n = n or self.length cmp = cmp or less for i=1, #gaps do local gap = gaps[i] for i = gap, n - 1 do local v = self[i] for j = i - gap, 0, -gap do local tv = self[j] if not cmp(v, tv) then break end self[i] = tv i = j end self[i] = v end end return self end function self.__spread(a) return unpack(a, 0, a.length - 1) end function self.__len(a) return a.length end function self.__tostring(a) if a.__tostring__ then return a:__tostring__() end return string.format("<Array>: %p", self) end function self.__index(a, k) if Array.__members__[k] then return Array.__members__[k] end if type(k) == 'number' and k < 0 then return a[#a + k] end if type(k) == 'table' and getmetatable(k) == Range then local l, r = k.left, k.right if l < 0 then l = a.length + l end if r < 0 then r = a.length + r end return Array.__members__.slice(a, l, r - l) end return nil end function self.__newindex(a, k, v) if type(k) == 'number' and k >= a.length then a.length = k + 1 end rawset(a, k, v) end function self.__members__:__tostring__() local b = { } for i=0, self.length - 1 do b[#b + 1] = tostring(self[i]) end return '['..table.concat(b, ',')..']' end function self.__members__:map(f) local b = Array() for i=0, self.length - 1 do b[i] = f(self[i]) end return b end function self:__match(that) if type(that) == "table" then if not __is__(that, Array) then return false end if that.length ~= self.length then return false end for i=0, self.length - 1 do if not __match__(self[i], that[i]) then return false end end return true end end end) local Any = class("Any", function(self) function self.__match(self, that) for i=1, #self do if __match__(self[i], that) then return true end end return false end end) local function any(...) return setmetatable({ ... }, Any) end local All = class("All", function(self) function self.__match(self, that) for i=1, #self do if not __match__(self[i], that) then return false end end return true end end) local function all(...) return setmetatable({ ... }, All) end local function try(try, catch, finally) local ok, rv = pcall(try) if not ok and catch ~= nil then ok, rv = pcall(catch, rv) if not ok then error("error in error handling", 2) end end if finally then finally() end return rv end local String = class("String", function(self) local string = _G.string for k, v in pairs(string) do self.__members__[k] = v end self.__apply = function(_, v) return tostring(v) end self.__getindex = function(o, k) local t = type(k) if t == "table" and getmetatable(k) == Range then return string.sub(o, k.left, k.right) elseif t == 'number' then return string.sub(o, k, k) end end self.__members__.self = function(self, that) return tostring(that) end self.__members__.split = function(self, sep, max, raw) if not max then max = math.huge end if not sep then sep = '%s+' end local out = { } local pos = 1 while max > 1 do local lhs, rhs = string.find(self, sep, pos, raw) if not lhs then break end if sep == "" then out[#out + 1] = string.sub(self, pos, lhs) pos = lhs + 1 else out[#out + 1] = string.sub(self, pos, lhs - 1) pos = rhs + 1 end max = max - 1 end out[#out + 1] = string.sub(self, pos) return out end self.__members__.__tostring__ = tostring end) debug.setmetatable("", String) local Error = class("Error", function(self) self.__members__.self = function(self, mesg) self.message = mesg self.trace = debug.traceback(mesg, 2) end self.__members__.__tostring__ = function(self) return self.message end end) local function spread(o) local m = getmetatable(o) if m and m.__spread then return m.__spread(o) end return unpack(o) end local function each(o, ...) if type(o) == 'function' then return o, ... end local m = getmetatable(o) if m and m.__each then return m.__each(o, ...) end return pairs(o) end Range = { } Range.__index = Range function Range.__match(self, that) local n = tonumber(that) if type(n) == 'number' and n == n then return n >= self.left and n <= self.right end return false end function Range.__tostring(self) return string.format("Range(%s, %s)", self.left, self.right) end function Range.__each(self) local i, r = self.left, self.right local n = i <= r and 1 or -1 return function() local j = i i = i + n if n > 0 and j > r then return nil elseif n < 0 and j < r then return nil end return j end end local function range(left, right, incl) return setmetatable({ left = left, right = right, incl = incl, }, Range) end local function import(path, ...) local from = path if type(from) == 'string' then from = require(from) end local list = { } for i=1, select('#', ...) do local key = select(i, ...) local val = from[key] if val == nil then local pkg if type(path) == 'string' then pkg = string.format("%q", path) else pkg = tostring(path) end error(string.format("import %q from %s is nil", key, pkg), 2) end list[i] = val end return unpack(list) end local ArrayPattern, TablePattern, ApplyPattern local __var__ = newproxy() function __match__(that, this) local type_this = type(this) local type_that = type(that) local meta_that = getmetatable(that) if meta_that then if meta_that.__match then return meta_that.__match(that, this) elseif __is__(this, that) then return true else return this == that end elseif type_this ~= type_that then return false else return this == that end end local function expand(iter, stat, ctrl, ...) if iter == nil then return ... end local k, v, _1, _2, _3 = iter(stat, ctrl) if k == nil then return ... end if v == __var__ then return expand(_1, _2, _3, expand(iter, stat, k, ...)) end return v, expand(iter, stat, k, ...) end local function extract(patt, subj) return expand(patt:bind(subj)) end TablePattern = class("TablePattern", function(self) self.__apply = function(self, keys, desc, meta) return setmetatable({ keys = keys; desc = desc; meta = meta; }, self) end self.__pairs = function(self) local i = 0 return function(self, _) i = i + 1 local k = self.keys[i] if k ~= nil then return k, self.desc[k] end end, self, nil end self.__match = function(self, that) if type(that) ~= 'table' then return false end local desc = self.desc local meta = self.meta if meta and getmetatable(that) ~= meta then return false end for k, v in pairs(self) do if v == __var__ then if that[k] == nil then return false end else if not __match__(v, that[k]) then return false end end end return true end self.__members__.bind = function(self, subj) if subj == nil then return end local meta = self.meta local iter, stat, ctrl = pairs(self) return function(stat, ctrl) for k, v in iter, stat, ctrl do if v == __var__ then if meta then -- XXX: assert instead? return k, meta.__index(subj, k) else return k, subj[k] end elseif type(v) == 'table' then return k, __var__, v:bind(subj[k]) end end end, stat, ctrl end end) ArrayPattern = class("ArrayPattern", function(self) self.__apply = function(self, ...) return setmetatable({ length = select('#', ...), [0] = select(1, ...), select(2, ...) }, self) end self.__ipairs = function(self) return function(self, ctrl) local i = ctrl + 1 if i < self.length then return i, self[i] end end, self, -1 end self.__match = function(self, that) if type(that) ~= 'table' then return false end if getmetatable(that) ~= Array then return false end for i, v in ipairs(self) do if v ~= __var__ then if not __match__(v, that[i]) then return false end end end return true end self.__members__.bind = function(self, subj) if subj == nil then return end local iter, stat, ctrl = ipairs(self) return function(stat, ctrl) for i, v in iter, stat, ctrl do if v == __var__ then return i, subj[i] elseif type(v) == 'table' then return i, __var__, v:bind(subj[i]) end end end, stat, ctrl end end) ApplyPattern = class("ApplyPattern", function(self) self.__apply = function(self, base, ...) return setmetatable({ base = base, narg = select('#', ...), ... }, self) end self.__match = function(self, that) local base = self.base if base.__match then return base.__match(base, that) end return getmetatable(that) == self.base end self.__members__.bind = function(self, subj) if subj == nil then return end local i = 1 local si, ss, sc if self.base.__unapply then si, ss, sc = self.base:__unapply(subj) elseif type(subj) == 'table' then si, ss, sc = ipairs(subj) else error("cannot bind "..tostring(subj).." to: "..tostring(self.base)) end local last = false return function(self) while i <= self.narg do local k = i local v = self[i] i = i + 1 if last then return k, nil end local _k, _v = si(ss, sc) if _k == nil then last = true end sc = _k if v == __var__ then return k, _v elseif type(v) == 'table' then return k, __var__, v:bind(_v) end end end, self, nil end end) local Pattern = setmetatable(getmetatable(lpeg.P(1)), Meta) Pattern.__name = 'Pattern' Pattern.__call = function(self, ...) return self:match(...) end Pattern.__tostring = function(self) return string.format('Pattern<%p>', self) end Pattern.__match = function(self, subj) if type(subj) ~= 'string' then return false end return self:match(subj) end Pattern.__index.__match = function(self, subj, ...) if type(subj) ~= 'string' then return false end return self:match(subj, ...) end Pattern.__index.__unapply = function(self, subj) return ipairs{ self:match(subj) } end Pattern.__index.find = function(self, subj, i) local patt = self / 0 patt = lpeg.P{ lpeg.Cp() * patt * lpeg.Cp() + 1 * lpeg.V(1) } local i, e = patt:match(subj, i or 1) if i then return i, e - 1 else return i end end Pattern.__index.gsub = function(self, subj, rep) local patt = lpeg.Cs((self / rep + 1)^0) return patt:match(subj) end local Grammar = setmetatable({ __name = 'Grammar' }, Meta) function Grammar.__tostring(self) return string.format("Grammar<%s>", self.__name) end function Grammar.__index(self, k) if self.__getters__[k] then return self.__getters__[k](self) end if self.__members__[k] then return self.__members__[k] end return nil end function Grammar.__newindex(self, k, v) if self.__setters__[k] then self.__setters__[k](self, v) else rawset(self, k, v) end end function Grammar.__call(self, subj, ...) return self:__match(subj, ...) end local function grammar(name, body) local members = { } local getters = { } local setters = { } local include = { } local gram = setmetatable({ __name = name, __members__ = members, __getters__ = getters, __setters__ = setters, __include__ = include }, Grammar) setfenv(body, setmetatable({ }, { __index = getfenv(2) })) body(gram) local patt = { } for k, v in pairs(members) do if lpeg.type(v) == 'pattern' then patt[k] = v end end patt[1] = gram[1] gram.__unapply = function(self, subj) if not self.__patt then self.__patt = lpeg.P(patt) end return self.__patt:__unapply(subj) end gram.__match = function(self, subj, ...) if not self.__patt then self.__patt = lpeg.P(patt) end return self.__patt:__match(subj, ...) end return gram end local rule = { } lpeg.setmaxstack(1024) do local def = { } def.nl = lpeg.P("\n") def.pos = lpeg.Cp() local any=lpeg.P(1) lpeg.locale(def) def.a = def.alpha def.c = def.cntrl def.d = def.digit def.g = def.graph def.l = def.lower def.p = def.punct def.s = def.space def.u = def.upper def.w = def.alnum def.x = def.xdigit def.A = any - def.a def.C = any - def.c def.D = any - def.d def.G = any - def.g def.L = any - def.l def.P = any - def.p def.S = any - def.s def.U = any - def.u def.W = any - def.w def.X = any - def.x rule.def = def rule.Def = function(id) if def[id] == nil then error("No predefined pattern '"..tostring(id).."'", 2) end return def[id] end local mm = getmetatable(lpeg.P(0)) mm.__mod = mm.__div rule.__add = mm.__add rule.__sub = mm.__sub rule.__pow = mm.__pow rule.__mul = mm.__mul rule.__div = mm.__div rule.__len = mm.__len rule.__unm = mm.__unm rule.__mod = mm.__div for k,v in pairs(lpeg) do rule[k] = v end local function backref(s, i, c) if type(c) ~= "string" then return nil end local e = #c + i if string.sub(s, i, e - 1) == c then return e else return nil end end rule.Cbr = function(name) return lpeg.Cmt(lpeg.Cb(name), backref) end end local __magic__ local function environ(mod) return setmetatable(mod, { __index = __magic__ }) end local function warn(msg, lvl) local info = debug.getinfo((lvl or 1) + 1, "Sl") local tmpl = "%s:%s: %s\n" io.stderr:write(tmpl:format(info.short_src, info.currentline, msg)) end local bit = require("bit") local Nil = setmetatable({ __name = 'Nil' }, Meta) local Number = setmetatable({ __name = 'Number' }, Meta) local Boolean = setmetatable({ __name = 'Boolean' }, Meta) local Table = setmetatable({ __name = 'Table' }, Meta) local UserData = setmetatable({ __name = 'UserData' }, Meta) local Coroutine = setmetatable({ __name = 'Coroutine' }, Meta) local CData = setmetatable({ __name = 'CData' }, Meta) for k, v in pairs(table) do Table[k] = v end function Table.keys(t) local ks = { } for k, v in pairs(t) do ks[#ks + 1] = k end return ks end for k, v in pairs(coroutine) do Coroutine[k] = v end for k, v in pairs(ffi) do CData[k] = v end local native = { [Nil] = 'nil', [Number] = 'number', [Boolean] = 'boolean', [String] = 'string', [Table] = 'table', [Function] = 'function', [Coroutine] = 'thread', [UserData] = 'userdata', [CData] = 'cdata', } local function _is_type(m_a, m_b) if m_a == nil then return false elseif m_a == m_b then return true else return _is_type(m_a.__base, m_b) end end function __is__(a, b) if type(b) == 'table' and b.__is then return b:__is(a) end if type(a) == 'cdata' then return ffi.istype(b, a) elseif getmetatable(a) == b then return true elseif native[b] then return type(a) == native[b] elseif b == Pattern then return lpeg.type(a) == 'pattern' elseif getmetatable(b) == Class then return _is_type(getmetatable(a), b) end return false end local typemap = { } for k, v in pairs(native) do typemap[v] = k end local function typeof(a) local t = type(a) if t == 'table' or t == 'userdata' then local m = getmetatable(a) if m then return m end end if t == 'cdata' then return ffi.typeof(a) end return typemap[type(a)] end local loadchunk = require("shine.lang.loader").loadchunk local function eval(chunk, env, ...) eval = assert(loadchunk(chunk, "eval", { eval = true })) env = env or getfenv(2) setfenv(eval, env) return eval(...) end local function check(name, expr, type) if not __is__(expr, type) then error(string.format("bad assignment to '%s' (%s expected got %s)", name, tostring(type), tostring(typeof(expr)) ), 2) end return expr end local usrop_events = { [':!'] = '__ubang', [':?'] = '__uques', [':='] = '__ueq', [':>'] = '__ugt', [':<'] = '__ult', [':|'] = '__upipe', [':^'] = '__ucar', [':&'] = '__uamp', [':~'] = '__utilde', [':+'] = '__uadd', [':-'] = '__usub', [':*'] = '__umul', [':/'] = '__udiv', [':%'] = '__umod' } local function usrop(op, a, b) local o, mt, h = usrop_events[op] mt = getmetatable(a) if mt and mt[o] then h = mt[o] end if h == nil then mt = getmetatable(b) if mt and mt[o] then h = mt[o] end if h == nil then error(string.format("no handler for operator '%s'", op), 2) end end return h(a, b) end local function __in__(names, expr) local t = { } for i=1, #names do t[i] = expr[names[i]] end return unpack(t, 1, #names) end __magic__ = { -- builtin types Meta = Meta; Nil = Nil; Number = Number; Boolean = Boolean; String = String; Function = Function; Coroutine = Coroutine; UserData = UserData; Table = Table; Array = Array; Error = Error; Module = Module; Grammar = Grammar; Class = Class; Object = Object; Pattern = Pattern; ArrayPattern = ArrayPattern; TablePattern = TablePattern; ApplyPattern = ApplyPattern; -- builtin functions try = try; class = class; module = module; import = import; yield = coroutine.yield; take = coroutine.yield; throw = error; warn = warn; grammar = grammar; include = include; typeof = typeof; eval = eval; any = any; all = all; -- utility environ = environ; -- constants null = null; __usrop__ = usrop; -- operators __check__ = check; __rule__ = rule; __range__ = range; __spread__ = spread; __match__ = __match__; __extract__ = extract; __each__ = each; __var__ = __var__; __in__ = __in__; __is__ = __is__; __as__ = setmetatable; __lshift__ = bit.lshift; __rshift__ = bit.rshift; __arshift__ = bit.arshift; __bnot__ = bit.bnot; __band__ = bit.band; __bor__ = bit.bor; __bxor__ = bit.bxor; } setmetatable(__magic__, { __index = function(t, n) local v = rawget(_G, n) if v == nil then error("variable '"..n.."' is not declared", 2) end rawset(t, n, v) return v end }) _G.__magic__ = __magic__ export.__magic__ = __magic__ package.loaded["core"] = export return export
24.320665
90
0.577498
b1ff5bb10b2d3d2bda51c94ccc3a0cb149f61158
4,550
asm
Assembly
src/tools.asm
drwuro/teleporter64
aba1ab46fb190441b1dc553c8336267646f8a76d
[ "Unlicense" ]
3
2020-07-01T08:14:52.000Z
2021-04-19T21:30:34.000Z
src/tools.asm
drwuro/teleporter64
aba1ab46fb190441b1dc553c8336267646f8a76d
[ "Unlicense" ]
null
null
null
src/tools.asm
drwuro/teleporter64
aba1ab46fb190441b1dc553c8336267646f8a76d
[ "Unlicense" ]
null
null
null
;------------------------------- !zone ;-- clear screen using space characters ;-- clear_screen lda #$20 ;-- space character ldx #$00 .loop sta SCR_BASE, x sta SCR_BASE + $100, x sta SCR_BASE + $200, x sta SCR_BASE + $300, x dex bne .loop rts ;------------------------------- !zone ;-- clear color ram ;-- color has to be in A ;-- clear_color_ram ldx #$00 .loop sta $D800, x sta $D900, x sta $DA00, x sta $DB00, x dex bne .loop rts ;------------------------------- !zone ;-- initialize screen stuff ;-- init_screen ;-- set screen colors to black lda #BLK sta $D020 sta $D021 ;-- select VICBANK lda $DD00 and #%11111100 ora #%00000010 ;-- xxxxxx10 = vic bank 1 at $4000-$7FFF sta $DD00 ;-- memory setup lda $D018 and #%11110001 ora #%00000010 ;-- xxxx001x = char memory in $0800-$0FFF + VICBANK ;--sta $D018 ;--lda $D018 and #%00001111 ora #%00000000 ;-- 0000xxxx = screen memory in $0000-$03FF + VICBANK sta $D018 ;-- reset sprites lda #0 sta SPRITE_XF sta SPR_ENAB rts ;------------------------------- !zone ;-- turn off screen ;-- turn_off_screen lda $D011 and #%01101111 ;-- bit #7 = bit #8 of irq raster line, bit #4 = screen off/on sta $D011 rts ;-- turn screen back on ;-- turn_on_screen lda $D011 ora #%00010000 and #%01111111 ;-- always clear bit #8 of irq raster line sta $D011 rts ;------------------------------- !zone turn_off_runstop_restore lda #$C1 sta $0318 lda #$FE sta $0319 rts turn_off_charset_toggle ;-- shift + cbm lda #$80 sta $0291 rts ;------------------------------- !zone copy_charset sei ;-- make original charset visible to RAM lda $01 and #%11111011 sta $01 ;-- copy original charset to CHR_BASE +MEMCOPY_HUGE $D000, $D800, CHR_BASE ;-- make original charset invisible again lda $01 ora #%00000100 sta $01 cli rts ;------------------------------- !zone get_joy_dir lda $DC00 ;-- read joystick port 2 and #%00011111 cmp #%00011111 ;-- check for neutral position beq .no_joy ;-- only write if it's a clear direction (no diagonals) cmp #%00011011 bne + lda #DIR_LEFT rts + cmp #%00010111 bne + lda #DIR_RIGHT rts + cmp #%00011110 bne + lda #DIR_UP rts + cmp #%00011101 bne .no_joy lda #DIR_DOWN rts .no_joy lda #DIR_STOP rts ;------------------------------- !zone ;-- print string on screen ;-- invertmask !byte 0 print_str clc adc #<SCR_BASE sta .o2 +1 sta .o3 +1 ;-- delta for LSB is 0 tya adc #>SCR_BASE sta .o2 +2 adc #(>COL_BASE) - (>SCR_BASE) sta .o3 +2 ldx #$00 .loop oo1 lda $FFFF, x ora invertmask cmp #$FF beq .end .o2 sta SCR_BASE, x oo2 lda #$FF .o3 sta COL_BASE, x inx jmp .loop .end rts !macro STRING_OUTPUT .straddr, .x, .y, .c { lda #<.straddr sta oo1 +1 lda #>.straddr sta oo1 +2 lda #.c sta oo2 +1 lda #<(.x + .y * 40) ldy #>(.x + .y * 40) jsr print_str } !macro STRING_OUTPUT_INV .straddr, .x, .y, .c { lda #%10000000 sta invertmask +STRING_OUTPUT .straddr, .x, .y, .c lda #$00 sta invertmask } !macro STRING_OUTPUT .straddr, .x, .y { sta oo2 +1 ;-- color lda #<.straddr sta oo1 +1 lda #>.straddr sta oo1 +2 lda #<(.x + .y * 40) ldy #>(.x + .y * 40) jsr print_str } straddr !word 0 .scraddr !word 0 HIGH = $22 LOW = $21 ;-- non-macro version ;-- x and y have to be in x and y ;-- string address has to be put into straddr ;-- color has to be in a string_output sta oo2 +1 ;-- color lda #0 sta HIGH lda straddr sta oo1 +1 lda straddr +1 sta oo1 +2 ;-- y * 40 tya sta LOW ;-- *1 asl asl ;-- *4, carry clear (0..24 * 4) adc LOW ;-- *5 asl asl ;-- *20 rol HIGH ;-- save carry asl ;-- *40 rol HIGH ;-- save carry sta LOW txa adc LOW ;-- add X sta LOW lda HIGH adc #$0 sta HIGH ;-- call the string function lda LOW ldy HIGH jsr print_str rts
15.371622
82
0.492967
680c60814ab5c97b1efc6474ef0e42d3dc7092a7
1,282
hpp
C++
ServerPipe.hpp
chrisoldwood/NCL
d57e50ffecddee5c422b6d4cbbadeeb6c65411e9
[ "MIT" ]
8
2015-02-12T00:41:19.000Z
2020-09-11T13:14:05.000Z
ServerPipe.hpp
chrisoldwood/NCL
d57e50ffecddee5c422b6d4cbbadeeb6c65411e9
[ "MIT" ]
null
null
null
ServerPipe.hpp
chrisoldwood/NCL
d57e50ffecddee5c422b6d4cbbadeeb6c65411e9
[ "MIT" ]
4
2017-04-27T14:25:06.000Z
2020-07-23T10:54:29.000Z
/****************************************************************************** ** (C) Chris Oldwood ** ** MODULE: SERVERPIPE.HPP ** COMPONENT: Network & Comms Library ** DESCRIPTION: The CServerPipe class declaration. ** ******************************************************************************* */ // Check for previous inclusion #ifndef SERVERPIPE_HPP #define SERVERPIPE_HPP #if _MSC_VER > 1000 #pragma once #endif #include "NamedPipe.hpp" /****************************************************************************** ** ** The server end of a Named Pipe. ** ******************************************************************************* */ class CServerPipe : public CNamedPipe { public: // // Constructors/Destructor. // CServerPipe(); virtual ~CServerPipe(); // // Methods. // void Create(const tchar* pszName); bool Accept(); virtual void Close(); protected: // // Members. // // // Constants. // static const DWORD DEF_OPEN_MODE; static const DWORD DEF_PIPE_MODE; static const DWORD DEF_BUF_SIZE; }; /****************************************************************************** ** ** Implementation of inline functions. ** ******************************************************************************* */ #endif // SERVERPIPE_HPP
19.424242
79
0.427457
941b6ea731581eb7dae5d7b409af5672bb25c64e
1,933
cpp
C++
examples/server.cpp
gridem/Synca
8ae652c8b57f0bb2d4a3145d47a76e1d10498974
[ "Apache-2.0" ]
116
2015-02-27T11:30:56.000Z
2021-05-26T20:35:56.000Z
examples/server.cpp
gridem/Synca
8ae652c8b57f0bb2d4a3145d47a76e1d10498974
[ "Apache-2.0" ]
3
2016-09-11T11:08:49.000Z
2018-03-19T10:38:57.000Z
examples/server.cpp
gridem/Synca
8ae652c8b57f0bb2d4a3145d47a76e1d10498974
[ "Apache-2.0" ]
17
2015-09-06T07:00:50.000Z
2019-06-01T08:13:16.000Z
/* * Copyright 2014 Grigory Demchenko (aka gridem) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "network.h" #include "mt.h" #include "core.h" #include "helpers.h" namespace server { using namespace mt; using namespace synca; using namespace synca::net; void serve(int port) { ThreadPool net(4, "net"); service<NetworkTag>().attach(net); scheduler<DefaultTag>().attach(net); go([port] { Acceptor acceptor(port); while (true) { JLOG("accepting"); acceptor.goAccept([](Socket& socket) { JLOG("accepted"); while (true) { Buffer sz(1, 0); socket.read(sz); Buffer str(size_t(sz[0]), 0); socket.read(str); JLOG("read: " << str); str += " world!"; sz[0] = char(str.size()); socket.write(sz); socket.write(str); JLOG("written: " << str); } }); } }, net); } } int main(int argc, char* argv[]) { try { server::serve(8800); } catch (std::exception& e) { RLOG("Error: " << e.what()); return 1; } catch (...) { RLOG("Unknown error"); return 2; } RLOG("main ended"); return 0; }
24.468354
75
0.527677
c5bb62ef2c29e42a964be5fda2febc9314ad2549
1,120
cpp
C++
src/CoreLib/Components/ScriptComponent.cpp
demacedius/BurgWar
4749db9d7037031d164ae6320bf17179d6167a69
[ "MIT" ]
45
2018-09-29T14:16:04.000Z
2022-03-10T18:53:58.000Z
src/CoreLib/Components/ScriptComponent.cpp
demacedius/BurgWar
4749db9d7037031d164ae6320bf17179d6167a69
[ "MIT" ]
46
2019-12-22T17:29:41.000Z
2022-03-20T14:15:06.000Z
src/CoreLib/Components/ScriptComponent.cpp
demacedius/BurgWar
4749db9d7037031d164ae6320bf17179d6167a69
[ "MIT" ]
19
2018-09-29T11:53:25.000Z
2022-01-14T17:00:07.000Z
// Copyright (C) 2020 Jérôme Leclercq // This file is part of the "Burgwar" project // For conditions of distribution and use, see copyright notice in LICENSE #include <CoreLib/Components/ScriptComponent.hpp> namespace bw { ScriptComponent::ScriptComponent(const Logger& logger, std::shared_ptr<const ScriptedElement> element, std::shared_ptr<ScriptingContext> context, sol::table entityTable, PropertyValueMap properties) : m_eventCallbacks(element->eventCallbacks), m_customEventCallbacks(element->customEventCallbacks), m_element(std::move(element)), m_context(std::move(context)), m_nextCallbackId(m_element->nextCallbackId), m_entityTable(std::move(entityTable)), m_logger(Ndk::EntityHandle::InvalidHandle, logger), m_properties(std::move(properties)), m_timeBeforeTick(0.f) { } ScriptComponent::~ScriptComponent() = default; void ScriptComponent::UpdateEntity(const Ndk::EntityHandle& entity) { m_entityTable["_Entity"] = entity; m_logger.UpdateEntity(entity); } void ScriptComponent::OnAttached() { UpdateEntity(m_entity); } Ndk::ComponentIndex ScriptComponent::componentIndex; }
29.473684
201
0.780357
8a35b36d46d64f49d0a3aeafe1e3aa0d042d5711
615
rs
Rust
src/test/ui/issues/issue-53675-a-test-called-panic.rs
komaeda/rust
b2c6b8c29f13f8d1f242da89e587960b95337819
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
518
2015-08-13T08:50:23.000Z
2020-07-23T19:52:51.000Z
src/test/ui/issues/issue-53675-a-test-called-panic.rs
komaeda/rust
b2c6b8c29f13f8d1f242da89e587960b95337819
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
157
2015-08-09T12:52:55.000Z
2020-07-19T20:02:52.000Z
src/test/ui/issues/issue-53675-a-test-called-panic.rs
komaeda/rust
b2c6b8c29f13f8d1f242da89e587960b95337819
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
29
2015-09-06T00:03:53.000Z
2020-04-05T10:05:38.000Z
// rust-lang/rust#53675: At one point the compiler errored when a test // named `panic` used the `assert!` macro in expression position. // compile-pass // compile-flags: --test mod in_expression_position { #[test] fn panic() { assert!(true) } } mod in_statement_position { #[test] fn panic() { assert!(true); } } mod what_if_we_use_panic_directly_in_expr { #[test] #[should_panic] fn panic() { panic!("in expr") } } mod what_if_we_use_panic_directly_in_stmt { #[test] #[should_panic] fn panic() { panic!("in stmt"); } }
16.621622
70
0.598374
a5c0f214b341dcd0bc9a29c2c1f50f12b7fddc92
544
lua
Lua
mainHost/SublarmsOS/utils/OpenRednet.lua
enlim/SublarmsOS
9875db311c247b9926fe954d9357138985a00b69
[ "MIT" ]
null
null
null
mainHost/SublarmsOS/utils/OpenRednet.lua
enlim/SublarmsOS
9875db311c247b9926fe954d9357138985a00b69
[ "MIT" ]
null
null
null
mainHost/SublarmsOS/utils/OpenRednet.lua
enlim/SublarmsOS
9875db311c247b9926fe954d9357138985a00b69
[ "MIT" ]
null
null
null
function openRednet() local listOfSides = rs.getSides() local listOfPoss = {} local count = 0 while true do count = count + 1 if peripheral.isPresent(tostring(listOfSides[count])) and peripheral.getType(listOfSides[count]) == "modem" then table.insert(listOfPoss, tostring(listOfSides[count])) end if count == 6 and table.maxn(listOfPoss) == 0 then return nil end if count == 6 and table.maxn(listOfPoss) ~= 0 then rednet.open(listOfPoss[1]) return listOfPoss[1] end end end
23.652174
116
0.659926
281a73113e5ee6c38a240698a1a55fdaa6c181aa
683
go
Go
dns/question_test.go
jordanabderrachid/dns
6b83c9fad65a49a13516277f02b26bca50dd9311
[ "MIT" ]
1
2017-10-08T09:45:19.000Z
2017-10-08T09:45:19.000Z
dns/question_test.go
jordanabderrachid/dns
6b83c9fad65a49a13516277f02b26bca50dd9311
[ "MIT" ]
null
null
null
dns/question_test.go
jordanabderrachid/dns
6b83c9fad65a49a13516277f02b26bca50dd9311
[ "MIT" ]
null
null
null
package dns_test import "testing" import "github.com/jordanabderrachid/dns/dns" import "bytes" func TestQuestionToBytes(t *testing.T) { n := dns.Name{} n.SetName("foo") var cases = []struct { q dns.Question expected []byte }{ { dns.Question{Name: n}, []byte{3, 102, 111, 111, 0, 0, 0, 0, 0}, }, { dns.Question{Name: n, Type: dns.ANYQType, Class: dns.ANYClass}, []byte{3, 102, 111, 111, 0, 0, 255, 0, 255}, }, } for _, c := range cases { actual := c.q.ToBytes() if bytes.Compare(actual, c.expected) != 0 { t.Fatalf("Question ToBytes returned unexpected output. actual=%v expected=%v question=%v", actual, c.expected, c.q) } } }
20.088235
93
0.61347
f2cb7983e83e6f06c9413bf9880a390b7774db59
1,949
swift
Swift
SwipeTest/CardView.swift
AleksandrTsvetkov/SwipeAnimations
de163c6f6c028fe6b8b003a1c0b4440fc4b48744
[ "MIT" ]
null
null
null
SwipeTest/CardView.swift
AleksandrTsvetkov/SwipeAnimations
de163c6f6c028fe6b8b003a1c0b4440fc4b48744
[ "MIT" ]
null
null
null
SwipeTest/CardView.swift
AleksandrTsvetkov/SwipeAnimations
de163c6f6c028fe6b8b003a1c0b4440fc4b48744
[ "MIT" ]
null
null
null
// // CardView.swift // SwipeTest // // Created by Александр Цветков on 05.06.2020. // Copyright © 2020 Александр Цветков. All rights reserved. // import UIKit class CardView: UIView { private let shadowView: UIView = { let view = UIView() view.backgroundColor = .systemTeal view.layer.cornerRadius = 10 view.layer.shadowColor = UIColor.black.cgColor view.layer.shadowOffset = CGSize(width: 5, height: 5) view.layer.shadowRadius = 10 view.layer.shadowOpacity = 1 return view }() let imageView: UIImageView = { let view = UIImageView() view.backgroundColor = .clear view.contentMode = .scaleToFill view.clipsToBounds = true view.layer.cornerRadius = 10 return view }() override init(frame: CGRect) { super.init(frame: frame) layer.cornerRadius = 10 addSubview(shadowView) shadowView.addSubview(imageView) backgroundColor = .white imageView.translatesAutoresizingMaskIntoConstraints = false shadowView.translatesAutoresizingMaskIntoConstraints = false NSLayoutConstraint.activate([ imageView.topAnchor.constraint(equalTo: self.topAnchor), imageView.leadingAnchor.constraint(equalTo: self.leadingAnchor), imageView.trailingAnchor.constraint(equalTo: self.trailingAnchor), imageView.bottomAnchor.constraint(equalTo: self.bottomAnchor), shadowView.topAnchor.constraint(equalTo: self.topAnchor), shadowView.leadingAnchor.constraint(equalTo: self.leadingAnchor), shadowView.trailingAnchor.constraint(equalTo: self.trailingAnchor), shadowView.bottomAnchor.constraint(equalTo: self.bottomAnchor) ]) } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } }
33.033898
79
0.652129
c7f2ecac43c70a76efbb09f6948b0e0742fe69c3
2,803
py
Python
fedml_api/distributed/fedavg_robust/FedAvgRobustAPI.py
GabriJP/FedML
9ccf52baddc065bf9cf3ca8ae2eeaadbc338e988
[ "Apache-2.0" ]
null
null
null
fedml_api/distributed/fedavg_robust/FedAvgRobustAPI.py
GabriJP/FedML
9ccf52baddc065bf9cf3ca8ae2eeaadbc338e988
[ "Apache-2.0" ]
null
null
null
fedml_api/distributed/fedavg_robust/FedAvgRobustAPI.py
GabriJP/FedML
9ccf52baddc065bf9cf3ca8ae2eeaadbc338e988
[ "Apache-2.0" ]
null
null
null
from mpi4py import MPI from fedml_api.distributed.fedavg_robust.FedAvgRobustAggregator import FedAvgRobustAggregator from fedml_api.distributed.fedavg_robust.FedAvgRobustClientManager import FedAvgRobustClientManager from fedml_api.distributed.fedavg_robust.FedAvgRobustServerManager import FedAvgRobustServerManager from fedml_api.distributed.fedavg_robust.FedAvgRobustTrainer import FedAvgRobustTrainer def FedML_init(): comm = MPI.COMM_WORLD process_id = comm.Get_rank() worker_number = comm.Get_size() return comm, process_id, worker_number def FedML_FedAvgRobust_distributed(process_id, worker_number, device, comm, model, train_data_num, train_data_global, test_data_global, train_data_local_num_dict, train_data_local_dict, test_data_local_dict, poisoned_train_loader, targetted_task_test_loader, num_dps_poisoned_dataset, args): if process_id == 0: init_server(args, device, comm, process_id, worker_number, model, train_data_num, train_data_global, test_data_global, train_data_local_dict, test_data_local_dict, train_data_local_num_dict, targetted_task_test_loader) else: init_client(args, device, comm, process_id, worker_number, model, train_data_num, train_data_local_num_dict, train_data_local_dict, poisoned_train_loader, num_dps_poisoned_dataset) def init_server(args, device, comm, rank, size, model, train_data_num, train_data_global, test_data_global, train_data_local_dict, test_data_local_dict, train_data_local_num_dict, targetted_task_test_loader): # aggregator worker_num = size - 1 aggregator = FedAvgRobustAggregator(train_data_global, test_data_global, train_data_num, train_data_local_dict, test_data_local_dict, train_data_local_num_dict, worker_num, device, model, targetted_task_test_loader, args) # start the distributed training server_manager = FedAvgRobustServerManager(args, aggregator, comm, rank, size) server_manager.send_init_msg() server_manager.run() def init_client(args, device, comm, process_id, size, model, train_data_num, train_data_local_num_dict, train_data_local_dict, poisoned_train_loader, num_dps_poisoned_dataset): # trainer client_index = process_id - 1 trainer = FedAvgRobustTrainer(client_index, train_data_local_dict, train_data_local_num_dict, train_data_num, device, model, poisoned_train_loader, num_dps_poisoned_dataset, args) client_manager = FedAvgRobustClientManager(args, trainer, comm, process_id, size) client_manager.run()
53.903846
117
0.738851
6caa1bf18cdefac6a7e1e0bd4f706b84639a0b64
468
go
Go
434-number-of-segments-in-a-string/number-of-segments-in-a-string.go
robotLJW/leetcode-golang
5361c620f72cc66c98ce3546c328f6f189700dbc
[ "Apache-2.0" ]
null
null
null
434-number-of-segments-in-a-string/number-of-segments-in-a-string.go
robotLJW/leetcode-golang
5361c620f72cc66c98ce3546c328f6f189700dbc
[ "Apache-2.0" ]
null
null
null
434-number-of-segments-in-a-string/number-of-segments-in-a-string.go
robotLJW/leetcode-golang
5361c620f72cc66c98ce3546c328f6f189700dbc
[ "Apache-2.0" ]
null
null
null
package _34_number_of_segments_in_a_string func countSegments(s string) int { count := 0 isBlank, isWord := false, false for i := 0; i < len(s); i++ { if s[i] == ' ' { if isBlank == true { continue } else { if isWord == true { count++ isWord = false } isBlank = true } } else { isBlank = false if isWord == true { continue } else { isWord = true } } } if isWord == true { count++ } return count }
15.096774
42
0.542735
65380b922221efe3ab83a1ce124526460a9adeeb
10,392
py
Python
lewansoul-lx16a/lewansoul_lx16a.py
christophschnabl/lewansoul-lx16a
fc92dc3470bc12353576bae00f6bc0873c753a7a
[ "MIT" ]
2
2019-10-22T10:37:56.000Z
2020-01-19T20:43:45.000Z
lewansoul-lx16a/lewansoul_lx16a.py
christophschnabl/lewansoul-lx16a
fc92dc3470bc12353576bae00f6bc0873c753a7a
[ "MIT" ]
null
null
null
lewansoul-lx16a/lewansoul_lx16a.py
christophschnabl/lewansoul-lx16a
fc92dc3470bc12353576bae00f6bc0873c753a7a
[ "MIT" ]
1
2022-01-05T08:20:38.000Z
2022-01-05T08:20:38.000Z
__all__ = [ 'ServoController', 'TimeoutError', 'SERVO_ERROR_OVER_TEMPERATURE', 'SERVO_ERROR_OVER_VOLTAGE', 'SERVO_ERROR_LOCKED_ROTOR', ] from serial.serialutil import * from functools import partial import threading import logging SERVO_ID_ALL = 0xfe SERVO_MOVE_TIME_WRITE = 1 SERVO_MOVE_TIME_READ = 2 SERVO_MOVE_TIME_WAIT_WRITE = 7 SERVO_MOVE_TIME_WAIT_READ = 8 SERVO_MOVE_START = 11 SERVO_MOVE_STOP = 12 SERVO_ID_WRITE = 13 SERVO_ID_READ = 14 SERVO_ANGLE_OFFSET_ADJUST = 17 SERVO_ANGLE_OFFSET_WRITE = 18 SERVO_ANGLE_OFFSET_READ = 19 SERVO_ANGLE_LIMIT_WRITE = 20 SERVO_ANGLE_LIMIT_READ = 21 SERVO_VIN_LIMIT_WRITE = 22 SERVO_VIN_LIMIT_READ = 23 SERVO_TEMP_MAX_LIMIT_WRITE = 24 SERVO_TEMP_MAX_LIMIT_READ = 25 SERVO_TEMP_READ = 26 SERVO_VIN_READ = 27 SERVO_POS_READ = 28 SERVO_OR_MOTOR_MODE_WRITE = 29 SERVO_OR_MOTOR_MODE_READ = 30 SERVO_LOAD_OR_UNLOAD_WRITE = 31 SERVO_LOAD_OR_UNLOAD_READ = 32 SERVO_LED_CTRL_WRITE = 33 SERVO_LED_CTRL_READ = 34 SERVO_LED_ERROR_WRITE = 35 SERVO_LED_ERROR_READ = 36 SERVO_ERROR_OVER_TEMPERATURE = 1 SERVO_ERROR_OVER_VOLTAGE = 2 SERVO_ERROR_LOCKED_ROTOR = 4 def lower_byte(value): return int(value) % 256 def higher_byte(value): return int(value / 256) % 256 def word(low, high): return int(low) + int(high)*256 def clamp(range_min, range_max, value): return min(range_max, max(range_min, value)) class TimeoutError(RuntimeError): pass LOGGER = logging.getLogger('lewansoul.servos.lx16a') class Servo(object): def __init__(self, controller, servo_id): self.__dict__.update({ '_controller': controller, 'servo_id': servo_id, }) def __hasattr__(self, name): return hasattr(self._controller, name) def __getattr__(self, name): attr = getattr(self._controller, name) if callable(attr): attr = partial(attr, self.servo_id) return attr class ServoController(object): def __init__(self, serial, timeout=1): self._serial = serial self._timeout = timeout self._lock = threading.RLock() def _command(self, servo_id, command, params): length = 3 + len(params) checksum = 255-((servo_id + length + command + sum(params)) % 256) LOGGER.debug('Sending servo control packet: %s', [ 0x55, 0x55, servo_id, length, command, params, checksum ]) with self._lock: self._serial.write(bytearray([ 0x55, 0x55, servo_id, length, command, params, checksum ])) def _wait_for_response(self, servo_id, command, timeout=None): timeout = Timeout(timeout or self._timeout) def read(size=1): self._serial.timeout = timeout.time_left() data = self._serial.read(size) if len(data) != size: raise TimeoutError() return data while True: data = [] data += read(1) if data[-1] != 0x55: continue data += read(1) if data[-1] != 0x55: continue data += read(3) sid = data[2] length = data[3] cmd = data[4] if length > 7: LOGGER.error('Invalid length for packet %s', list(data)) continue data += read(length-3) if length > 3 else [] params = data[5:] data += read(1) checksum = data[-1] if 255-(sid + length + cmd + sum(params)) % 256 != checksum: LOGGER.error('Invalid checksum for packet %s', list(data)) continue if cmd != command: LOGGER.warning('Got unexpected command %s response %s', cmd, list(data)) continue if servo_id != SERVO_ID_ALL and sid != servo_id: LOGGER.warning('Got command response from unexpected servo %s', sid) continue return [sid, cmd, params] def _query(self, servo_id, command, timeout=None): with self._lock: self._command(servo_id, command) return self._wait_for_response(servo_id, command, timeout=timeout) def servo(self, servo_id): return Servo(self, servo_id) def get_servo_id(self, servo_id=SERVO_ID_ALL, timeout=None): response = self._query(servo_id, SERVO_ID_READ, timeout=timeout) return response[2] def set_servo_id(self, servo_id, new_servo_id): self._command(servo_id, SERVO_ID_WRITE, new_servo_id) def move(self, servo_id, position, time=0): position = clamp(0, 1000, position) time = clamp(0, 30000, time) self._command( servo_id, SERVO_MOVE_TIME_WRITE, (lower_byte(position), higher_byte(position), lower_byte(time), higher_byte(time)) ) def get_prepared_move(self, servo_id, timeout=None): """Returns servo position and time tuple""" response = self._query(servo_id, SERVO_MOVE_TIME_WAIT_READ, timeout=timeout) return word(response[2], response[3]), word(response[4], response[5]) def move_prepare(self, servo_id, position, time=0): position = clamp(0, 1000, position) time = clamp(0, 30000, time) self._command( servo_id, SERVO_MOVE_TIME_WAIT_WRITE, lower_byte(position), higher_byte(position), lower_byte(time), higher_byte(time), ) def move_start(self, servo_id=SERVO_ID_ALL): self._command(servo_id, SERVO_MOVE_START) def move_stop(self, servo_id=SERVO_ID_ALL): self._command(servo_id, SERVO_MOVE_STOP) def get_position_offset(self, servo_id, timeout=None): response = self._query(servo_id, SERVO_ANGLE_OFFSET_READ, timeout=timeout) deviation = response[2] if deviation > 127: deviation -= 256 return deviation def set_position_offset(self, servo_id, deviation): deviation = clamp(-125, 125, deviation) if deviation < 0: deviation += 256 self._command(servo_id, SERVO_ANGLE_OFFSET_ADJUST, deviation) def save_position_offset(self, servo_id): self._command(servo_id, SERVO_ANGLE_OFFSET_WRITE) def get_position_limits(self, servo_id, timeout=None): response = self._query(servo_id, SERVO_ANGLE_LIMIT_READ, timeout=timeout) return word(response[2], response[3]), word(response[4], response[5]) def set_position_limits(self, servo_id, min_position, max_position): min_position = clamp(0, 1000, min_position) max_position = clamp(0, 1000, max_position) self._command( servo_id, SERVO_ANGLE_LIMIT_WRITE, lower_byte(min_position), higher_byte(min_position), lower_byte(max_position), higher_byte(max_position), ) def get_voltage_limits(self, servo_id, timeout=None): response = self._query(servo_id, SERVO_VIN_LIMIT_READ, timeout=timeout) return word(response[2], response[3]), word(response[4], response[5]) def set_voltage_limits(self, servo_id, min_voltage, max_voltage): min_voltage = clamp(4500, 12000, min_voltage) max_voltage = clamp(4500, 12000, max_voltage) self._command( servo_id, SERVO_VIN_LIMIT_WRITE, lower_byte(min_voltage), higher_byte(min_voltage), lower_byte(max_voltage), higher_byte(max_voltage), ) def get_max_temperature_limit(self, servo_id, timeout=None): response = self._query(servo_id, SERVO_TEMP_MAX_LIMIT_READ, timeout=timeout) return response[2] def set_max_temperature_limit(self, servo_id, max_temperature): max_temperature = clamp(50, 100, max_temperature) self._command(servo_id, SERVO_TEMP_MAX_LIMIT_WRITE, max_temperature) def get_temperature(self, servo_id, timeout=None): response = self._query(servo_id, SERVO_TEMP_READ, timeout=timeout) return response[2] def get_voltage(self, servo_id, timeout=None): response = self._query(servo_id, SERVO_VIN_READ, timeout=timeout) return word(response[2], response[3]) def get_position(self, servo_id, timeout=None): response = self._query(servo_id, SERVO_POS_READ, timeout=timeout) position = word(response[2], response[3]) if position > 32767: position -= 65536 return position def get_mode(self, servo_id, timeout=None): response = self._query(servo_id, SERVO_OR_MOTOR_MODE_READ, timeout=timeout) return response[2] def get_motor_speed(self, servo_id, timeout=None): response = self._query(servo_id, SERVO_OR_MOTOR_MODE_READ, timeout=timeout) if response[2] != 1: return 0 speed = word(response[4], response[5]) if speed > 32767: speed -= 65536 return speed def set_servo_mode(self, servo_id): self._command( servo_id, SERVO_OR_MOTOR_MODE_WRITE, 0, 0, 0, 0, ) def set_motor_mode(self, servo_id, speed=0): speed = clamp(-1000, 1000, speed) if speed < 0: speed += 65536 self._command( servo_id, SERVO_OR_MOTOR_MODE_WRITE, 1, 0, lower_byte(speed), higher_byte(speed), ) def is_motor_on(self, servo_id, timeout=None): response = self._query(servo_id, SERVO_LOAD_OR_UNLOAD_READ, timeout=timeout) return response[2] == 1 def motor_on(self, servo_id): self._command(servo_id, SERVO_LOAD_OR_UNLOAD_WRITE, 1) def motor_off(self, servo_id): self._command(servo_id, SERVO_LOAD_OR_UNLOAD_WRITE, 0) def is_led_on(self, servo_id, timeout=None): response = self._query(servo_id, SERVO_LED_CTRL_READ, timeout=timeout) return response[2] == 0 def led_on(self, servo_id): self._command(servo_id, SERVO_LED_CTRL_WRITE, 0) def led_off(self, servo_id): self._command(servo_id, SERVO_LED_CTRL_WRITE, 1) def get_led_errors(self, servo_id, timeout=None): response = self._query(servo_id, SERVO_LED_ERROR_READ, timeout=timeout) return response[2] def set_led_errors(self, servo_id, error): error = clamp(0, 7, error) self._command(servo_id, SERVO_LED_ERROR_WRITE, error)
32.373832
84
0.647998
fecdd319d6b72fdd1bc454d49da3927ef521f390
58,493
html
HTML
dotNET/pdfclown.lib/build/docs/api/a00418.html
XoriantOpenSource/PDFClown
ed4eb7b74c7b6702ae13f1fc4891c9fff73b877c
[ "Apache-2.0" ]
2
2020-11-18T12:41:50.000Z
2021-12-01T18:10:45.000Z
dotNET/pdfclown.lib/build/docs/api/a00418.html
XoriantOpenSource/PDFClown
ed4eb7b74c7b6702ae13f1fc4891c9fff73b877c
[ "Apache-2.0" ]
null
null
null
dotNET/pdfclown.lib/build/docs/api/a00418.html
XoriantOpenSource/PDFClown
ed4eb7b74c7b6702ae13f1fc4891c9fff73b877c
[ "Apache-2.0" ]
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/xhtml;charset=UTF-8"/> <title>PDF Clown 0.1.2: org.pdfclown.tokens.XRefStream Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.6.3 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main&nbsp;Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li> <li><a href="classes.html"><span>Class&nbsp;Index</span></a></li> <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li> <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="a00883.html">org</a>.<a class="el" href="a00884.html">pdfclown</a>.<a class="el" href="a00914.html">tokens</a>.<a class="el" href="a00418.html">XRefStream</a> </div> </div> <div class="contents"> <h1>org.pdfclown.tokens.XRefStream Class Reference</h1><!-- doxytag: class="org::pdfclown::tokens::XRefStream" --><!-- doxytag: inherits="org::pdfclown::objects::PdfStream" --> <p>Cross-reference stream containing cross-reference information [<a class="el" href="a00399.html" title="Indicates the PDF compatibility level of the annotated element.">PDF</a>:1.6:3.4.7]. <a href="#_details">More...</a></p> <div class="dynheader"> Inheritance diagram for org.pdfclown.tokens.XRefStream:</div> <div class="dynsection"> <div class="center"> <img src="a00418.png" usemap="#org.pdfclown.tokens.XRefStream_map" alt=""/> <map id="org.pdfclown.tokens.XRefStream_map" name="org.pdfclown.tokens.XRefStream_map"> <area href="a00392.html" alt="org.pdfclown.objects.PdfStream" shape="rect" coords="134,168,393,192"/> <area href="a00378.html" alt="org.pdfclown.objects.PdfDataObject" shape="rect" coords="0,112,259,136"/> <area href="a00201.html" alt="org.pdfclown.documents.files.IFileResource" shape="rect" coords="269,112,528,136"/> <area href="a00386.html" alt="org.pdfclown.objects.PdfObject" shape="rect" coords="0,56,259,80"/> <area href="a00372.html" alt="org.pdfclown.objects.IVisitable" shape="rect" coords="0,0,259,24"/> </map> </div> </div> <p><a href="a01371.html">List of all members.</a></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">override <a class="el" href="a00386.html">PdfObject</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00418.html#a1863a88366a4706ac00204a4c68d119f">Accept</a> (<a class="el" href="a00373.html">IVisitor</a> visitor, object data)</td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Accepts a visit. <a href="#a1863a88366a4706ac00204a4c68d119f"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00418.html#aa04e756efde57f8f15b65370040ff018">Add</a> (int key, <a class="el" href="a00417.html">XRefEntry</a> value)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00418.html#aed8b9b8af6c0a5f113a01eccf7aaef7f">Clear</a> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual PdfObject&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00386.html#a1d0c7b55bab1220eda5b89d5c5dd2f51">Clone</a> (<a class="el" href="a00358.html">File</a> context)</td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a deep copy of this object within the specified file context. <a href="#a1d0c7b55bab1220eda5b89d5c5dd2f51"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">object&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00386.html#ae28fa829a386255bff45147676dabe30">Clone</a> ()</td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a shallow copy of this object. <a href="#ae28fa829a386255bff45147676dabe30"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00418.html#aae28930b3df8b6c24f9e67d4452887a4">ContainsKey</a> (int key)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00418.html#ab9324cd856cc6e429a4f1e238c6958a1">CopyTo</a> (KeyValuePair&lt; int, <a class="el" href="a00417.html">XRefEntry</a> &gt;[] entries, int index)</td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00007.html">IBuffer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00392.html#af364cc60d02531d1c0da670c4a86b916">GetBody</a> (bool decode)</td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the stream body. <a href="#af364cc60d02531d1c0da670c4a86b916"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00418.html#a77a429b9660f2943a861b0c75c7675cb">Remove</a> (KeyValuePair&lt; int, <a class="el" href="a00417.html">XRefEntry</a> &gt; entry)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00418.html#a59ff0d6fc76f8a7a5530e1ab43294199">Remove</a> (int key)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">PdfDataObject&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00386.html#a42d27f87b554d969b3620c8184a58ec7">Resolve</a> ()</td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Ensures this object to be resolved into its corresponding data object. <a href="#a42d27f87b554d969b3620c8184a58ec7"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00392.html#a36edd3537e855cdeec17f76b4593dd01">SetDataFile</a> (<a class="el" href="a00199.html">FileSpecification</a> value, bool preserve)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">override PdfObject&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00392.html#a33a582a6df040214c482d11f16916a03">Swap</a> (PdfObject other)</td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Swaps contents between this object and the other one. <a href="#a33a582a6df040214c482d11f16916a03"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00418.html#a41d1069931d7143f11175feebed9493d">TryGetValue</a> (int key, out <a class="el" href="a00417.html">XRefEntry</a> value)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">PdfDirectObject&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00386.html#a1b81d1e224526c19339396ad2060e089">Unresolve</a> ()</td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Ensures this object to be unresolved into its corresponding indirect reference, if available. <a href="#a1b81d1e224526c19339396ad2060e089"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">override void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00418.html#a54166c32d6da0343f5b12282ba1f7b4c">WriteTo</a> (<a class="el" href="a00009.html">IOutputStream</a> stream, <a class="el" href="a00358.html">File</a> context)</td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Serializes this object to the specified stream. <a href="#a54166c32d6da0343f5b12282ba1f7b4c"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00418.html#a5e12532fabab3c3f1ea6091122e177ce">XRefStream</a> (<a class="el" href="a00380.html">PdfDictionary</a> header, <a class="el" href="a00007.html">IBuffer</a> body)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00418.html#a9f38512ee22f96c14a52953f16460c65">XRefStream</a> (<a class="el" href="a00358.html">File</a> file)</td></tr> <tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static PdfObject&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00386.html#aa9121402d1003efb9d9a263acd32adb6">Clone</a> (PdfObject @object, <a class="el" href="a00358.html">File</a> context)</td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the clone of the specified object, registered inside the specified file context. <a href="#aa9121402d1003efb9d9a263acd32adb6"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static PdfDataObject&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00386.html#a24645cbd32431645f170a057fa7c1f8c">Resolve</a> (PdfObject @object)</td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Ensures an indirect reference to be resolved into its corresponding data object. <a href="#a24645cbd32431645f170a057fa7c1f8c"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static PdfDirectObject&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00386.html#ace4690eb90847c90f37278c463faa411">Unresolve</a> (PdfDataObject @object)</td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Ensures a data object to be unresolved into its corresponding indirect reference, if available. <a href="#ace4690eb90847c90f37278c463faa411"></a><br/></td></tr> <tr><td colspan="2"><h2>Protected Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">internal void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00386.html#a4061ce1c4a08e5e0947db533187818dc">Update</a> ()</td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Updates the state of this object. <a href="#a4061ce1c4a08e5e0947db533187818dc"></a><br/></td></tr> <tr><td colspan="2"><h2>Properties</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00007.html">IBuffer</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00392.html#ace98c5f82a168837d4c49fe199725426">Body</a><code> [get]</code></td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the decoded stream body. <a href="#ace98c5f82a168837d4c49fe199725426"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual PdfIndirectObject&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00386.html#a87ab0b36be8e482ce10054286faafd25">Container</a><code> [get]</code></td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the indirect object containing this object. <a href="#a87ab0b36be8e482ce10054286faafd25"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00418.html#a211413df208093d8f033d0ce912668ff">Count</a><code> [get]</code></td></tr> <tr><td class="memItemLeft" align="right" valign="top">PdfIndirectObject&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00386.html#ac4fc22265d2d8d4d690399185d25ff26">DataContainer</a><code> [get]</code></td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the indirect object containing the data associated to this object. <a href="#ac4fc22265d2d8d4d690399185d25ff26"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00199.html">FileSpecification</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00392.html#a1f8b8e38a621e3dca6fa1553655ee81b">DataFile</a><code> [get, set]</code></td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets/Sets the file containing the object data. <a href="#a1f8b8e38a621e3dca6fa1553655ee81b"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="a00358.html">File</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00386.html#a9fa62c6fa736359792e9d7b2a74f2595">File</a><code> [get]</code></td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the file containing this object. <a href="#a9fa62c6fa736359792e9d7b2a74f2595"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">PdfDirectObject&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00392.html#ad9ca9102264a634cd17b12c92aa30a47">Filter</a><code> [get, set]</code></td></tr> <tr><td class="memItemLeft" align="right" valign="top">PdfDictionary&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00392.html#ab0619cb3962eca358ac508e419465f7c">Header</a><code> [get]</code></td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the stream header. <a href="#ab0619cb3962eca358ac508e419465f7c"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual PdfIndirectObject&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00386.html#a9d30b5d58ad2517f891dd2380925b1fd">IndirectObject</a><code> [get]</code></td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the indirect object corresponding to this object. <a href="#a9d30b5d58ad2517f891dd2380925b1fd"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00418.html#a7ae698554dcaafdbc8032b289bf58ad4">IsReadOnly</a><code> [get]</code></td></tr> <tr><td class="memItemLeft" align="right" valign="top">ICollection&lt; int &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00418.html#a9ac87348facdedc7364f2a6198253f1e">Keys</a><code> [get]</code></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00418.html#a28ff2ef23a12d1e5f286bf3d74211332">LinkedStreamOffset</a><code> [get]</code></td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the byte offset from the beginning of the file to the beginning of the previous cross-reference stream. <a href="#a28ff2ef23a12d1e5f286bf3d74211332"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">PdfDirectObject&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00392.html#a9139a2b231fe826aa93a9c6931663e79">Parameters</a><code> [get, set]</code></td></tr> <tr><td class="memItemLeft" align="right" valign="top">override PdfObject&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00392.html#aa0623917e78e04b754bbb6e4f5d8f6c9">Parent</a><code> [get, set]</code></td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets/Sets the parent of this object. <a href="#aa0623917e78e04b754bbb6e4f5d8f6c9"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">virtual PdfReference&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00386.html#ad1ebaf04d535b56f4bd4fc2b08ba5a95">Reference</a><code> [get]</code></td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets the indirect reference of this object. <a href="#ad1ebaf04d535b56f4bd4fc2b08ba5a95"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00417.html">XRefEntry</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00418.html#a959f71db9238653b843fa550cac4bea5">this</a> [int key]<code> [get, set]</code></td></tr> <tr><td class="memItemLeft" align="right" valign="top">override bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00392.html#a70eb9a271596fc9e66c73f02ec08e7d8">Updateable</a><code> [get, set]</code></td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets/Sets whether the detection of object state changes is enabled. <a href="#a70eb9a271596fc9e66c73f02ec08e7d8"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">override bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00392.html#a64f6decaeb8cea41d8555e12fc32d508">Updated</a><code> [get, set]</code></td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets/Sets whether the initial state of this object has been modified. <a href="#a64f6decaeb8cea41d8555e12fc32d508"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">ICollection&lt; <a class="el" href="a00417.html">XRefEntry</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00418.html#a4a9fc92ec8c7d11fdfef1063e7b34de4">Values</a><code> [get]</code></td></tr> <tr><td class="memItemLeft" align="right" valign="top">internal override bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00392.html#a8752a28b7657cead5b8fb1ba98cbe94a">Virtual</a><code> [get, set]</code></td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Gets/Sets whether this object acts like a null-object placeholder. <a href="#a8752a28b7657cead5b8fb1ba98cbe94a"></a><br/></td></tr> </table> <hr/><a name="_details"></a><h2></h2> <p>Cross-reference stream containing cross-reference information [<a class="el" href="a00399.html" title="Indicates the PDF compatibility level of the annotated element.">PDF</a>:1.6:3.4.7]. </p> <p>It is alternative to the classic cross-reference table. </p> <hr/><h2>Constructor &amp; Destructor Documentation</h2> <a class="anchor" id="a9f38512ee22f96c14a52953f16460c65"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::XRefStream" ref="a9f38512ee22f96c14a52953f16460c65" args="(File file)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">org.pdfclown.tokens.XRefStream.XRefStream </td> <td>(</td> <td class="paramtype"><a class="el" href="a00358.html">File</a>&nbsp;</td> <td class="paramname"> <em>file</em></td> <td>&nbsp;)&nbsp;</td> <td></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="a5e12532fabab3c3f1ea6091122e177ce"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::XRefStream" ref="a5e12532fabab3c3f1ea6091122e177ce" args="(PdfDictionary header, IBuffer body)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">org.pdfclown.tokens.XRefStream.XRefStream </td> <td>(</td> <td class="paramtype"><a class="el" href="a00380.html">PdfDictionary</a>&nbsp;</td> <td class="paramname"> <em>header</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="a00007.html">IBuffer</a>&nbsp;</td> <td class="paramname"> <em>body</em></td><td>&nbsp;</td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="a1863a88366a4706ac00204a4c68d119f"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::Accept" ref="a1863a88366a4706ac00204a4c68d119f" args="(IVisitor visitor, object data)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">override <a class="el" href="a00386.html">PdfObject</a> org.pdfclown.tokens.XRefStream.Accept </td> <td>(</td> <td class="paramtype"><a class="el" href="a00373.html">IVisitor</a>&nbsp;</td> <td class="paramname"> <em>visitor</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">object&nbsp;</td> <td class="paramname"> <em>data</em></td><td>&nbsp;</td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Accepts a visit. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>visitor</em>&nbsp;</td><td>Visiting object.</td></tr> <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>Supplemental data.</td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>Result object.</dd></dl> <p>Reimplemented from <a class="el" href="a00392.html#ad7725af5b25c184ceb39af6cbd6987df">org.pdfclown.objects.PdfStream</a>.</p> <p>References <a class="el" href="a00373.html#adeb86617e6aa6ef0eca0821a4ae6b980">org.pdfclown.objects.IVisitor.Visit()</a>.</p> </div> </div> <a class="anchor" id="aa04e756efde57f8f15b65370040ff018"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::Add" ref="aa04e756efde57f8f15b65370040ff018" args="(int key, XRefEntry value)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void org.pdfclown.tokens.XRefStream.Add </td> <td>(</td> <td class="paramtype">int&nbsp;</td> <td class="paramname"> <em>key</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="a00417.html">XRefEntry</a>&nbsp;</td> <td class="paramname"> <em>value</em></td><td>&nbsp;</td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="aed8b9b8af6c0a5f113a01eccf7aaef7f"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::Clear" ref="aed8b9b8af6c0a5f113a01eccf7aaef7f" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void org.pdfclown.tokens.XRefStream.Clear </td> <td>(</td> <td class="paramname"></td> <td>&nbsp;)&nbsp;</td> <td></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="a1d0c7b55bab1220eda5b89d5c5dd2f51"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::Clone" ref="a1d0c7b55bab1220eda5b89d5c5dd2f51" args="(File context)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual PdfObject org.pdfclown.objects.PdfObject.Clone </td> <td>(</td> <td class="paramtype"><a class="el" href="a00358.html">File</a>&nbsp;</td> <td class="paramname"> <em>context</em></td> <td>&nbsp;)&nbsp;</td> <td><code> [virtual, inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Creates a deep copy of this object within the specified file context. </p> <p>Reimplemented in <a class="el" href="a00391.html#a5278cf084e6cead5ab7ffd53ceef77df">org.pdfclown.objects.PdfSimpleObject&lt; TValue &gt;</a>.</p> <p>References <a class="el" href="a00549_source.html#l00179">org.pdfclown.files.File.Cloner</a>.</p> </div> </div> <a class="anchor" id="ae28fa829a386255bff45147676dabe30"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::Clone" ref="ae28fa829a386255bff45147676dabe30" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">object org.pdfclown.objects.PdfObject.Clone </td> <td>(</td> <td class="paramname"></td> <td>&nbsp;)&nbsp;</td> <td><code> [inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Creates a shallow copy of this object. </p> <p>References <a class="el" href="a00743_source.html#l00161">org.pdfclown.objects.PdfObject.Parent</a>.</p> </div> </div> <a class="anchor" id="aa9121402d1003efb9d9a263acd32adb6"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::Clone" ref="aa9121402d1003efb9d9a263acd32adb6" args="(PdfObject @object, File context)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static PdfObject org.pdfclown.objects.PdfObject.Clone </td> <td>(</td> <td class="paramtype"><a class="el" href="a00386.html">PdfObject</a> @&nbsp;</td> <td class="paramname"> <em>object</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="a00358.html">File</a>&nbsp;</td> <td class="paramname"> <em>context</em></td><td>&nbsp;</td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [static, inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Gets the clone of the specified object, registered inside the specified file context. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>object</em>&nbsp;</td><td>Object to clone into the specified file context.</td></tr> <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>File context of the cloning.</td></tr> </table> </dd> </dl> <p>Referenced by <a class="el" href="a00744_source.html#l00088">org.pdfclown.objects.PdfObjectWrapper&lt; PdfTextString &gt;.Clone()</a>, and <a class="el" href="a00493_source.html#l00295">org.pdfclown.objects.Cloner.Visit()</a>.</p> </div> </div> <a class="anchor" id="aae28930b3df8b6c24f9e67d4452887a4"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::ContainsKey" ref="aae28930b3df8b6c24f9e67d4452887a4" args="(int key)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool org.pdfclown.tokens.XRefStream.ContainsKey </td> <td>(</td> <td class="paramtype">int&nbsp;</td> <td class="paramname"> <em>key</em></td> <td>&nbsp;)&nbsp;</td> <td></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="ab9324cd856cc6e429a4f1e238c6958a1"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::CopyTo" ref="ab9324cd856cc6e429a4f1e238c6958a1" args="(KeyValuePair&lt; int, XRefEntry &gt;[] entries, int index)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void org.pdfclown.tokens.XRefStream.CopyTo </td> <td>(</td> <td class="paramtype">KeyValuePair&lt; int, <a class="el" href="a00417.html">XRefEntry</a> &gt;[]&nbsp;</td> <td class="paramname"> <em>entries</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int&nbsp;</td> <td class="paramname"> <em>index</em></td><td>&nbsp;</td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="af364cc60d02531d1c0da670c4a86b916"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::GetBody" ref="af364cc60d02531d1c0da670c4a86b916" args="(bool decode)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="a00007.html">IBuffer</a> org.pdfclown.objects.PdfStream.GetBody </td> <td>(</td> <td class="paramtype">bool&nbsp;</td> <td class="paramname"> <em>decode</em></td> <td>&nbsp;)&nbsp;</td> <td><code> [inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Gets the stream body. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>decode</em>&nbsp;</td><td>Defines whether the body has to be decoded.</td></tr> </table> </dd> </dl> <p>References <a class="el" href="a00553_source.html#l00152">org.pdfclown.documents.files.FileSpecification.GetInputStream()</a>, and <a class="el" href="a00736_source.html#l00259">org.pdfclown.objects.PdfDictionary.Updateable</a>.</p> </div> </div> <a class="anchor" id="a77a429b9660f2943a861b0c75c7675cb"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::Remove" ref="a77a429b9660f2943a861b0c75c7675cb" args="(KeyValuePair&lt; int, XRefEntry &gt; entry)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool org.pdfclown.tokens.XRefStream.Remove </td> <td>(</td> <td class="paramtype">KeyValuePair&lt; int, <a class="el" href="a00417.html">XRefEntry</a> &gt;&nbsp;</td> <td class="paramname"> <em>entry</em></td> <td>&nbsp;)&nbsp;</td> <td></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="a59ff0d6fc76f8a7a5530e1ab43294199"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::Remove" ref="a59ff0d6fc76f8a7a5530e1ab43294199" args="(int key)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool org.pdfclown.tokens.XRefStream.Remove </td> <td>(</td> <td class="paramtype">int&nbsp;</td> <td class="paramname"> <em>key</em></td> <td>&nbsp;)&nbsp;</td> <td></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="a42d27f87b554d969b3620c8184a58ec7"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::Resolve" ref="a42d27f87b554d969b3620c8184a58ec7" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">PdfDataObject org.pdfclown.objects.PdfObject.Resolve </td> <td>(</td> <td class="paramname"></td> <td>&nbsp;)&nbsp;</td> <td><code> [inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Ensures this object to be resolved into its corresponding data object. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="a00386.html#a1b81d1e224526c19339396ad2060e089" title="Ensures this object to be unresolved into its corresponding indirect reference, if...">Unresolve()</a></dd></dl> <p>References <a class="el" href="a00746_source.html#l00180">org.pdfclown.objects.PdfReference.DataObject</a>.</p> </div> </div> <a class="anchor" id="a24645cbd32431645f170a057fa7c1f8c"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::Resolve" ref="a24645cbd32431645f170a057fa7c1f8c" args="(PdfObject @object)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static PdfDataObject org.pdfclown.objects.PdfObject.Resolve </td> <td>(</td> <td class="paramtype"><a class="el" href="a00386.html">PdfObject</a> @&nbsp;</td> <td class="paramname"> <em>object</em></td> <td>&nbsp;)&nbsp;</td> <td><code> [static, inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Ensures an indirect reference to be resolved into its corresponding data object. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>object</em>&nbsp;</td><td>Object to resolve.</td></tr> </table> </dd> </dl> <p>Referenced by <a class="el" href="a00846_source.html#l00474">org.pdfclown.objects.Tree&lt; TKey, TValue &gt;.Remove()</a>, <a class="el" href="a00721_source.html#l00390">org.pdfclown.documents.Pages.Remove()</a>, <a class="el" href="a00712_source.html#l00514">org.pdfclown.documents.Page.ToXObject()</a>, <a class="el" href="a00869_source.html#l00054">org.pdfclown.documents.contents.xObjects.XObject.Wrap()</a>, <a class="el" href="a00772_source.html#l00210">org.pdfclown.documents.multimedia.Rendition.Wrap()</a>, <a class="el" href="a00760_source.html#l00052">org.pdfclown.documents.contents.PropertyList.Wrap()</a>, <a class="el" href="a00728_source.html#l00058">org.pdfclown.documents.contents.colorSpaces.Pattern.Wrap()</a>, <a class="el" href="a00652_source.html#l00148">org.pdfclown.documents.multimedia.MediaOffset.Wrap()</a>, <a class="el" href="a00649_source.html#l00050">org.pdfclown.documents.multimedia.MediaClip.Wrap()</a>, <a class="el" href="a00624_source.html#l00059">org.pdfclown.documents.interchange.access.LanguageIdentifier.Wrap()</a>, <a class="el" href="a00591_source.html#l00059">org.pdfclown.documents.contents.layers.LayerNode.Wrap()</a>, <a class="el" href="a00561_source.html#l00066">org.pdfclown.documents.functions.Function.Wrap()</a>, <a class="el" href="a00553_source.html#l00099">org.pdfclown.documents.files.FileSpecification.Wrap()</a>, <a class="el" href="a00512_source.html#l00157">org.pdfclown.documents.interaction.navigation.document.Destination.Wrap()</a>, <a class="el" href="a00498_source.html#l00050">org.pdfclown.documents.contents.colorSpaces.ColorSpace.Wrap()</a>, <a class="el" href="a00448_source.html#l00106">org.pdfclown.documents.interaction.annotations.Annotation.Wrap()</a>, and <a class="el" href="a00446_source.html#l00050">org.pdfclown.documents.interaction.actions.Action.Wrap()</a>.</p> </div> </div> <a class="anchor" id="a36edd3537e855cdeec17f76b4593dd01"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::SetDataFile" ref="a36edd3537e855cdeec17f76b4593dd01" args="(FileSpecification value, bool preserve)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void org.pdfclown.objects.PdfStream.SetDataFile </td> <td>(</td> <td class="paramtype"><a class="el" href="a00199.html">FileSpecification</a>&nbsp;</td> <td class="paramname"> <em>value</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool&nbsp;</td> <td class="paramname"> <em>preserve</em></td><td>&nbsp;</td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>preserve</em>&nbsp;</td><td>Indicates whether the data from the old data source substitutes the new one. This way data can be imported to/exported from local or preserved in case of external file location changed.</td></tr> </table> </dd> </dl> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="a00392.html#a1f8b8e38a621e3dca6fa1553655ee81b" title="Gets/Sets the file containing the object data.">DataFile</a></dd></dl> <p>References <a class="el" href="a00744_source.html#l00170">org.pdfclown.objects.PdfObjectWrapper.BaseObject</a>.</p> </div> </div> <a class="anchor" id="a33a582a6df040214c482d11f16916a03"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::Swap" ref="a33a582a6df040214c482d11f16916a03" args="(PdfObject other)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">override PdfObject org.pdfclown.objects.PdfStream.Swap </td> <td>(</td> <td class="paramtype"><a class="el" href="a00386.html">PdfObject</a>&nbsp;</td> <td class="paramname"> <em>other</em></td> <td>&nbsp;)&nbsp;</td> <td><code> [virtual, inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Swaps contents between this object and the other one. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>other</em>&nbsp;</td><td>Object whose contents have to be swapped with this one's.</td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>This object.</dd></dl> <p>Implements <a class="el" href="a00386.html#aeee7782b997ca6cc3c06ac9901b33f9a">org.pdfclown.objects.PdfObject</a>.</p> <p>References <a class="el" href="a00743_source.html#l00248">org.pdfclown.objects.PdfObject.Update()</a>.</p> </div> </div> <a class="anchor" id="a41d1069931d7143f11175feebed9493d"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::TryGetValue" ref="a41d1069931d7143f11175feebed9493d" args="(int key, out XRefEntry value)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool org.pdfclown.tokens.XRefStream.TryGetValue </td> <td>(</td> <td class="paramtype">int&nbsp;</td> <td class="paramname"> <em>key</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">out <a class="el" href="a00417.html">XRefEntry</a>&nbsp;</td> <td class="paramname"> <em>value</em></td><td>&nbsp;</td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="a1b81d1e224526c19339396ad2060e089"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::Unresolve" ref="a1b81d1e224526c19339396ad2060e089" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">PdfDirectObject org.pdfclown.objects.PdfObject.Unresolve </td> <td>(</td> <td class="paramname"></td> <td>&nbsp;)&nbsp;</td> <td><code> [inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Ensures this object to be unresolved into its corresponding indirect reference, if available. </p> <dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="a00390.html" title="PDF indirect reference object [PDF:1.6:3.2.9].">PdfReference</a>, if available; <div class="fragment"><pre class="fragment"><span class="keyword">this</span> </pre></div>, otherwise.</dd></dl> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="a00386.html#a42d27f87b554d969b3620c8184a58ec7" title="Ensures this object to be resolved into its corresponding data object.">Resolve()</a></dd></dl> </div> </div> <a class="anchor" id="ace4690eb90847c90f37278c463faa411"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::Unresolve" ref="ace4690eb90847c90f37278c463faa411" args="(PdfDataObject @object)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static PdfDirectObject org.pdfclown.objects.PdfObject.Unresolve </td> <td>(</td> <td class="paramtype"><a class="el" href="a00378.html">PdfDataObject</a> @&nbsp;</td> <td class="paramname"> <em>object</em></td> <td>&nbsp;)&nbsp;</td> <td><code> [static, inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Ensures a data object to be unresolved into its corresponding indirect reference, if available. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>object</em>&nbsp;</td><td>Object to unresolve.</td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd><a class="el" href="a00390.html" title="PDF indirect reference object [PDF:1.6:3.2.9].">PdfReference</a>, if available; <div class="fragment"><pre class="fragment"><span class="keywordtype">object</span> </pre></div>, otherwise.</dd></dl> </div> </div> <a class="anchor" id="a4061ce1c4a08e5e0947db533187818dc"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::Update" ref="a4061ce1c4a08e5e0947db533187818dc" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">internal void org.pdfclown.objects.PdfObject.Update </td> <td>(</td> <td class="paramname"></td> <td>&nbsp;)&nbsp;</td> <td><code> [protected, inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Updates the state of this object. </p> <p>Referenced by <a class="el" href="a00748_source.html#l00341">org.pdfclown.objects.PdfStream.Swap()</a>, <a class="el" href="a00736_source.html#l00221">org.pdfclown.objects.PdfDictionary.Swap()</a>, and <a class="el" href="a00732_source.html#l00203">org.pdfclown.objects.PdfArray.Swap()</a>.</p> </div> </div> <a class="anchor" id="a54166c32d6da0343f5b12282ba1f7b4c"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::WriteTo" ref="a54166c32d6da0343f5b12282ba1f7b4c" args="(IOutputStream stream, File context)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">override void org.pdfclown.tokens.XRefStream.WriteTo </td> <td>(</td> <td class="paramtype"><a class="el" href="a00009.html">IOutputStream</a>&nbsp;</td> <td class="paramname"> <em>stream</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="a00358.html">File</a>&nbsp;</td> <td class="paramname"> <em>context</em></td><td>&nbsp;</td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Serializes this object to the specified stream. </p> <dl><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>stream</em>&nbsp;</td><td>Target stream.</td></tr> <tr><td valign="top"></td><td valign="top"><em>context</em>&nbsp;</td><td>File context.</td></tr> </table> </dd> </dl> <p>Reimplemented from <a class="el" href="a00392.html#a07288c02ce3e65f13c7e7a136c65a608">org.pdfclown.objects.PdfStream</a>.</p> </div> </div> <hr/><h2>Property Documentation</h2> <a class="anchor" id="ace98c5f82a168837d4c49fe199725426"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::Body" ref="ace98c5f82a168837d4c49fe199725426" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="a00007.html">IBuffer</a> org.pdfclown.objects.PdfStream.Body<code> [get, inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Gets the decoded stream body. </p> <p>Referenced by <a class="el" href="a00508_source.html#l00335">org.pdfclown.documents.contents.Contents.Flush()</a>, <a class="el" href="a00495_source.html#l00079">org.pdfclown.documents.contents.fonts.CMap.Get()</a>, <a class="el" href="a00850_source.html#l00073">org.pdfclown.documents.contents.fonts.Type1Font.GetNativeEncoding()</a>, <a class="el" href="a00556_source.html#l00640">org.pdfclown.documents.contents.fonts.Font.Load()</a>, and <a class="el" href="a00847_source.html#l00055">org.pdfclown.documents.contents.fonts.TrueTypeFont.LoadEncoding()</a>.</p> </div> </div> <a class="anchor" id="a87ab0b36be8e482ce10054286faafd25"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::Container" ref="a87ab0b36be8e482ce10054286faafd25" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual PdfIndirectObject org.pdfclown.objects.PdfObject.Container<code> [get, inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Gets the indirect object containing this object. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="a00386.html#ac4fc22265d2d8d4d690399185d25ff26" title="Gets the indirect object containing the data associated to this object.">DataContainer</a>, <a class="el" href="a00386.html#a9d30b5d58ad2517f891dd2380925b1fd" title="Gets the indirect object corresponding to this object.">IndirectObject</a></dd></dl> <p>Reimplemented in <a class="el" href="a00382.html#aa5c14e52c8d3c67fa87156ecb5295a9d">org.pdfclown.objects.PdfIndirectObject</a>.</p> <p>Referenced by <a class="el" href="a00503_source.html#l00054">org.pdfclown.tokens.CompressedWriter.WriteIncremental()</a>.</p> </div> </div> <a class="anchor" id="a211413df208093d8f033d0ce912668ff"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::Count" ref="a211413df208093d8f033d0ce912668ff" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int org.pdfclown.tokens.XRefStream.Count<code> [get]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="ac4fc22265d2d8d4d690399185d25ff26"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::DataContainer" ref="ac4fc22265d2d8d4d690399185d25ff26" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">PdfIndirectObject org.pdfclown.objects.PdfObject.DataContainer<code> [get, inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Gets the indirect object containing the data associated to this object. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="a00386.html#a87ab0b36be8e482ce10054286faafd25" title="Gets the indirect object containing this object.">Container</a>, <a class="el" href="a00386.html#a9d30b5d58ad2517f891dd2380925b1fd" title="Gets the indirect object corresponding to this object.">IndirectObject</a></dd></dl> </div> </div> <a class="anchor" id="a1f8b8e38a621e3dca6fa1553655ee81b"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::DataFile" ref="a1f8b8e38a621e3dca6fa1553655ee81b" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="a00199.html">FileSpecification</a> org.pdfclown.objects.PdfStream.DataFile<code> [get, set, inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Gets/Sets the file containing the object data. </p> <p>Implements <a class="el" href="a00201.html#a189b6716c6a04b81ae3c8f3b222efb86">org.pdfclown.documents.files.IFileResource</a>.</p> </div> </div> <a class="anchor" id="a9fa62c6fa736359792e9d7b2a74f2595"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::File" ref="a9fa62c6fa736359792e9d7b2a74f2595" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual <a class="el" href="a00358.html">File</a> org.pdfclown.objects.PdfObject.File<code> [get, inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Gets the file containing this object. </p> <p>Reimplemented in <a class="el" href="a00382.html#a979973a49e4c6d5e4da203c5aa03de5c">org.pdfclown.objects.PdfIndirectObject</a>.</p> <p>Referenced by <a class="el" href="a00493_source.html#l00350">org.pdfclown.objects.Cloner.Visit()</a>.</p> </div> </div> <a class="anchor" id="ad9ca9102264a634cd17b12c92aa30a47"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::Filter" ref="ad9ca9102264a634cd17b12c92aa30a47" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">PdfDirectObject org.pdfclown.objects.PdfStream.Filter<code> [get, set, inherited]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="ab0619cb3962eca358ac508e419465f7c"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::Header" ref="ab0619cb3962eca358ac508e419465f7c" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">PdfDictionary org.pdfclown.objects.PdfStream.Header<code> [get, inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Gets the stream header. </p> <p>Referenced by <a class="el" href="a00850_source.html#l00073">org.pdfclown.documents.contents.fonts.Type1Font.GetNativeEncoding()</a>, <a class="el" href="a00594_source.html#l00056">org.pdfclown.documents.contents.xObjects.ImageXObject.ImageXObject()</a>, <a class="el" href="a00847_source.html#l00055">org.pdfclown.documents.contents.fonts.TrueTypeFont.LoadEncoding()</a>, and <a class="el" href="a00869_source.html#l00086">org.pdfclown.documents.contents.xObjects.XObject.XObject()</a>.</p> </div> </div> <a class="anchor" id="a9d30b5d58ad2517f891dd2380925b1fd"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::IndirectObject" ref="a9d30b5d58ad2517f891dd2380925b1fd" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual PdfIndirectObject org.pdfclown.objects.PdfObject.IndirectObject<code> [get, inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Gets the indirect object corresponding to this object. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="a00386.html#a87ab0b36be8e482ce10054286faafd25" title="Gets the indirect object containing this object.">Container</a>, <a class="el" href="a00386.html#ac4fc22265d2d8d4d690399185d25ff26" title="Gets the indirect object containing the data associated to this object.">DataContainer</a></dd></dl> <p>Reimplemented in <a class="el" href="a00382.html#a37c5f31f871cf8ea38de4c4144ed196b">org.pdfclown.objects.PdfIndirectObject</a>, and <a class="el" href="a00390.html#a72bfd3920825c2bed6e67c2af125a7c4">org.pdfclown.objects.PdfReference</a>.</p> </div> </div> <a class="anchor" id="a7ae698554dcaafdbc8032b289bf58ad4"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::IsReadOnly" ref="a7ae698554dcaafdbc8032b289bf58ad4" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool org.pdfclown.tokens.XRefStream.IsReadOnly<code> [get]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="a9ac87348facdedc7364f2a6198253f1e"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::Keys" ref="a9ac87348facdedc7364f2a6198253f1e" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">ICollection&lt;int&gt; org.pdfclown.tokens.XRefStream.Keys<code> [get]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="a28ff2ef23a12d1e5f286bf3d74211332"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::LinkedStreamOffset" ref="a28ff2ef23a12d1e5f286bf3d74211332" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int org.pdfclown.tokens.XRefStream.LinkedStreamOffset<code> [get]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Gets the byte offset from the beginning of the file to the beginning of the previous cross-reference stream. </p> <dl class="return"><dt><b>Returns:</b></dt><dd>-1 in case no linked stream exists.</dd></dl> </div> </div> <a class="anchor" id="a9139a2b231fe826aa93a9c6931663e79"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::Parameters" ref="a9139a2b231fe826aa93a9c6931663e79" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">PdfDirectObject org.pdfclown.objects.PdfStream.Parameters<code> [get, set, inherited]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="aa0623917e78e04b754bbb6e4f5d8f6c9"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::Parent" ref="aa0623917e78e04b754bbb6e4f5d8f6c9" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">override PdfObject org.pdfclown.objects.PdfStream.Parent<code> [get, set, inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Gets/Sets the parent of this object. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="a00386.html#a87ab0b36be8e482ce10054286faafd25" title="Gets the indirect object containing this object.">Container</a></dd></dl> <p>Reimplemented from <a class="el" href="a00386.html#ad937f09c0c05c70ce4c5f44b314c1984">org.pdfclown.objects.PdfObject</a>.</p> </div> </div> <a class="anchor" id="ad1ebaf04d535b56f4bd4fc2b08ba5a95"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::Reference" ref="ad1ebaf04d535b56f4bd4fc2b08ba5a95" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual PdfReference org.pdfclown.objects.PdfObject.Reference<code> [get, inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Gets the indirect reference of this object. </p> <p>Reimplemented in <a class="el" href="a00382.html#a50f739079a98d221516ddd3908029ce8">org.pdfclown.objects.PdfIndirectObject</a>, and <a class="el" href="a00390.html#ac94ba7b5f006e077b5a2ac28c2b2eb97">org.pdfclown.objects.PdfReference</a>.</p> <p>Referenced by <a class="el" href="a00740_source.html#l00103">org.pdfclown.objects.PdfIndirectObject.Compress()</a>, <a class="el" href="a00846_source.html#l00474">org.pdfclown.objects.Tree&lt; TKey, TValue &gt;.Remove()</a>, and <a class="el" href="a00493_source.html#l00350">org.pdfclown.objects.Cloner.Visit()</a>.</p> </div> </div> <a class="anchor" id="a959f71db9238653b843fa550cac4bea5"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::this" ref="a959f71db9238653b843fa550cac4bea5" args="[int key]" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="a00417.html">XRefEntry</a> org.pdfclown.tokens.XRefStream.this[int key]<code> [get, set]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="a70eb9a271596fc9e66c73f02ec08e7d8"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::Updateable" ref="a70eb9a271596fc9e66c73f02ec08e7d8" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">override bool org.pdfclown.objects.PdfStream.Updateable<code> [get, set, inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Gets/Sets whether the detection of object state changes is enabled. </p> <p>Reimplemented from <a class="el" href="a00386.html#a5c856362cb22ede70a487df1fc083a38">org.pdfclown.objects.PdfObject</a>.</p> </div> </div> <a class="anchor" id="a64f6decaeb8cea41d8555e12fc32d508"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::Updated" ref="a64f6decaeb8cea41d8555e12fc32d508" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">override bool org.pdfclown.objects.PdfStream.Updated<code> [get, set, inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Gets/Sets whether the initial state of this object has been modified. </p> <p>Reimplemented from <a class="el" href="a00386.html#a9ff84e92fe8413e7a98e23e7dfff3f31">org.pdfclown.objects.PdfObject</a>.</p> </div> </div> <a class="anchor" id="a4a9fc92ec8c7d11fdfef1063e7b34de4"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::Values" ref="a4a9fc92ec8c7d11fdfef1063e7b34de4" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">ICollection&lt;<a class="el" href="a00417.html">XRefEntry</a>&gt; org.pdfclown.tokens.XRefStream.Values<code> [get]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="a8752a28b7657cead5b8fb1ba98cbe94a"></a><!-- doxytag: member="org::pdfclown::tokens::XRefStream::Virtual" ref="a8752a28b7657cead5b8fb1ba98cbe94a" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">internal override bool org.pdfclown.objects.PdfStream.Virtual<code> [get, set, protected, inherited]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Gets/Sets whether this object acts like a null-object placeholder. </p> <p>Reimplemented from <a class="el" href="a00386.html#ae42a3f1fa748c51bc6ecb4ea77d46fbf">org.pdfclown.objects.PdfObject</a>.</p> </div> </div> </div> <hr class="footer"/><p>Copyright 2006-2013 Stefano Chizzolini. For more information, please visit <a href="http://www.pdfclown.org">PDF Clown home page</a>.</p><address style="text-align: right;"><small>Generated on Sat Feb 9 21:08:40 2013 for PDF Clown 0.1.2 by&nbsp; <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address> </body> </html>
56.78932
1,850
0.666199
4b3e03dd9fd72941bee2e30af4b3fca990bf4c6e
1,073
html
HTML
angular/src/app/components/nav/nav.component.html
MrCerealKiller/agros_gui
83406c7b2f0c331f0513df853e7b78e3a45c4625
[ "MIT" ]
6
2019-07-30T01:40:45.000Z
2021-08-03T14:45:36.000Z
angular/src/app/components/nav/nav.component.html
MrCerealKiller/agros_gui
83406c7b2f0c331f0513df853e7b78e3a45c4625
[ "MIT" ]
6
2019-06-05T07:03:20.000Z
2022-02-17T21:44:04.000Z
angular/src/app/components/nav/nav.component.html
MrCerealKiller/agros_gui
83406c7b2f0c331f0513df853e7b78e3a45c4625
[ "MIT" ]
2
2020-11-20T07:17:16.000Z
2021-05-28T13:15:23.000Z
<!-- Navbar --> <nav class="px-4 navbar navbar-expand-lg navbar-light bg-light sticky-top"> <a class="navbar-brand" href="/"> <img src="/assets/brandmark_name.png" height="40" width="160" class="d-inline-block align-top" alt=""> </a> <form class="navbar-form mx-auto form-inline mx-1" (submit)=connect() style="padding-left:0px;padding-right:0px;"> <div class="form-inline"> <div class="input-group"> <div class="input-group-prepend"> <span class="input-group-text">IP</span> </div> <input type="text" class="form-control" id="ip-field" placeholder="localhost" value="localhost" style="width:140px;" [(ngModel)]="ip" name="ip"> </div> </div> <button type="submit" class="btn btn-dark mx-2" id="connect-btn">Connect</button> </form> <span id="notif-bar" class="mx-2"> <fa name="globe" size="lg" class="mx-2"></fa> <fa name="signal" size="lg" class="mx-2"></fa> <fa name="battery" size="lg" class="mx-2"></fa> </span> <a class="nav-link ml-auto text-dark" [routerLink]="['/settings']">Settings</a> </nav>
39.740741
150
0.629077
ffdc3dcf0b7cb234dad3eb45d0973457bc49a133
4,100
html
HTML
src/options.html
rinepoyo/youtube-moderator-watcher
db3574cc2e28c7fb1058071bf40da273c8c4463e
[ "MIT" ]
null
null
null
src/options.html
rinepoyo/youtube-moderator-watcher
db3574cc2e28c7fb1058071bf40da273c8c4463e
[ "MIT" ]
null
null
null
src/options.html
rinepoyo/youtube-moderator-watcher
db3574cc2e28c7fb1058071bf40da273c8c4463e
[ "MIT" ]
null
null
null
<!DOCTYPE html> <html lang="ja"> <head> <meta charset="utf-8"> <link rel="stylesheet" href="options.css"> <link rel="stylesheet" href="lib/materialize.min.css"> </head> <body> <div class="container"> <div class="row"> <form class="col s12"> <div class="row"> <div class="input-field col s12"> <div class="card"> <div class="card-action"> <span id="fix_title" class="card-title">チャット固定設定</span> <p> <label> <input id="fix_verified" type="checkbox" class="filled-in" /> <span id="fix_verified_label">確認済みユーザのモデレータ、チャンネル所有者を固定する</span> </label> </p> <p> <label> <input id="fix_unverified" type="checkbox" class="filled-in" /> <span id="fix_unverified_label">確認済みユーザ以外のモデレータを固定する</span> </label> </p> <p> <textarea id="names" class="materialize-textarea"></textarea> <label id="names_label" for="names">固定するユーザ名を指定(一名毎に改行)</label> </p> <p> <textarea id="ignore_names" class="materialize-textarea"></textarea> <label id="ignore_names_label" for="ignore_names">対象外にするユーザ名を指定する(一名毎に改行)</label> </p> <p> <input id="fix_time" value="" type="number" min="0" max="999" placeholder="" class="validate" required> <label id="fix_time_label" class="active" for="fix_time">発言から固定解除までの時間(0~999秒、0=永続)</label> </p> </div> </div> <div class="card"> <div class="card-action"> <span id="ngwords_title" class="card-title">NGワード設定</span> <p> <textarea id="ngwords" class="materialize-textarea"></textarea> <label id="ngwords_label" for="ngwords">一単語毎に改行</label> </p> <p> <label> <input id="ngwords_regexp" type="checkbox" class="filled-in" /> <span id="ngwords_regexp_label">正規表現を有効にする</span> </label> </p> <p> <label> <input id="hidden_message" type="checkbox" class="filled-in" /> <span id="hidden_message_label">チャットの文章だけを隠す(マウスオーバーで原文を表示)</span> </label> </p> </div> </div> <div class="fixed-action-btn"> <button id="save_btn" class="btn waves-effect waves-light" type="submit">保存</button> </div> </div> </div> </form> </div> </div> <script type="text/javascript" src="lib/materialize.min.js"></script> <script type="text/javascript" src="storage.js"></script> <script type="text/javascript" src="options.js"></script> </body> </html>
49.39759
117
0.362683
9698b6761dda54bee44fd47386ebe878c74c69e5
204
cpp
C++
src/codec_image_transport/src/manifest.cpp
new2me321/tello_ws
4bece3c027cbdbac036a202891380c9937f3320a
[ "Apache-2.0" ]
null
null
null
src/codec_image_transport/src/manifest.cpp
new2me321/tello_ws
4bece3c027cbdbac036a202891380c9937f3320a
[ "Apache-2.0" ]
null
null
null
src/codec_image_transport/src/manifest.cpp
new2me321/tello_ws
4bece3c027cbdbac036a202891380c9937f3320a
[ "Apache-2.0" ]
null
null
null
#include <decoding_image_transport/decoding_subscribers.hpp> #include <pluginlib/class_list_macros.h> PLUGINLIB_EXPORT_CLASS(decoding_image_transport::H264Subscriber, image_transport::SubscriberPlugin);
40.8
100
0.877451
48839428acbedd6ca081d4c2c8528cfd513731aa
1,114
kt
Kotlin
app/src/main/java/com/qm/cleanmodule/ui/fragment/home/HomeRepository.kt
Qenawi/youtube
1ed75a280f652d8cc63f625da2b30649317308ac
[ "MIT" ]
null
null
null
app/src/main/java/com/qm/cleanmodule/ui/fragment/home/HomeRepository.kt
Qenawi/youtube
1ed75a280f652d8cc63f625da2b30649317308ac
[ "MIT" ]
null
null
null
app/src/main/java/com/qm/cleanmodule/ui/fragment/home/HomeRepository.kt
Qenawi/youtube
1ed75a280f652d8cc63f625da2b30649317308ac
[ "MIT" ]
null
null
null
package com.qm.cleanmodule.ui.fragment.home import androidx.lifecycle.LiveDataReactiveStreams import androidx.lifecycle.MediatorLiveData import com.google.gson.annotations.SerializedName import com.qm.cleanmodule.base.network.HandleResponseData import com.qm.cleanmodule.base.network.IsRepo import com.qm.cleanmodule.base.network.response.NetworkResponse import com.qm.cleanmodule.data.model.SongStreamResponseModel import com.qm.cleanmodule.data.remote.ApiService import com.qm.cleanmodule.data.remote.ErrorResponse import io.reactivex.rxjava3.annotations.NonNull import io.reactivex.rxjava3.core.Flowable import io.reactivex.rxjava3.schedulers.Schedulers import kotlinx.android.parcel.Parcelize import retrofit2.Response import javax.inject.Inject //MARK:- HomeRepository @Docs class HomeRepository @Inject constructor(private val apiService: ApiService) : IsRepo { suspend fun getSongStreamUrl(request:HomeRequest):SongStreamResponseModel { return apiService.getVideoStream(request.unEncodedVideoUrl) } data class HomeRequest(@SerializedName("test") val unEncodedVideoUrl: String?) }
35.935484
87
0.839318
7b202a8c9fb3509a45a82c2a97f6d0e2af0cb903
883
sql
SQL
migrations/020.create-recipes_ingredients.sql
Modern-Knowledge/serious-game-backend
b1c55d7951c0b416401076dc87843a24a096f971
[ "MIT" ]
null
null
null
migrations/020.create-recipes_ingredients.sql
Modern-Knowledge/serious-game-backend
b1c55d7951c0b416401076dc87843a24a096f971
[ "MIT" ]
null
null
null
migrations/020.create-recipes_ingredients.sql
Modern-Knowledge/serious-game-backend
b1c55d7951c0b416401076dc87843a24a096f971
[ "MIT" ]
null
null
null
CREATE TABLE IF NOT EXISTS `recipes_ingredients` ( `recipe_id` INT(11) NOT NULL, `ingredient_id` INT(11) NOT NULL, `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `modified_at` TIMESTAMP NULL, PRIMARY KEY (`recipe_id`, `ingredient_id`), INDEX `fk_recipes_has_ingredients_ingredients1_idx` (`ingredient_id` ASC), INDEX `fk_recipes_has_ingredients_recipes1_idx` (`recipe_id` ASC), CONSTRAINT `fk_recipes_has_ingredients_ingredients1` FOREIGN KEY (`ingredient_id`) REFERENCES `ingredients` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_recipes_has_ingredients_recipes1` FOREIGN KEY (`recipe_id`) REFERENCES `recipes` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE = InnoDB DEFAULT CHARACTER SET = latin1;
40.136364
78
0.670442
943ec3f5cca818ba7e545474798368bce897b2e5
2,342
cc
C++
chrome/browser/media_galleries/fileapi/picasa/pmp_table_reader.cc
devasia1000/chromium
919a8a666862fb866a6bb7aa7f3ae8c0442b4828
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
2
2019-02-03T05:19:48.000Z
2021-11-15T15:07:21.000Z
chrome/browser/media_galleries/fileapi/picasa/pmp_table_reader.cc
devasia1000/chromium
919a8a666862fb866a6bb7aa7f3ae8c0442b4828
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
chrome/browser/media_galleries/fileapi/picasa/pmp_table_reader.cc
devasia1000/chromium
919a8a666862fb866a6bb7aa7f3ae8c0442b4828
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/media_galleries/fileapi/picasa/pmp_table_reader.h" #include <algorithm> #include "base/file_util.h" #include "base/logging.h" #include "base/memory/scoped_ptr.h" #include "base/threading/thread_restrictions.h" #include "base/utf_string_conversions.h" #include "chrome/browser/media_galleries/fileapi/picasa/pmp_column_reader.h" namespace picasa { namespace { COMPILE_ASSERT(sizeof(double) == 8, double_must_be_8_bytes_long); } // namespace PmpTableReader::PmpTableReader(const std::string& table_name, const base::FilePath& directory_path) : initialized_(false), table_name_(table_name), directory_path_(directory_path), max_row_count_(0) { base::ThreadRestrictions::AssertIOAllowed(); if (!file_util::DirectoryExists(directory_path_)) return; std::string indicator_file_name = table_name_ + "_0"; base::FilePath indicator_file = directory_path_.Append( base::FilePath::FromUTF8Unsafe(indicator_file_name)); // Look for the indicator_file file, indicating table existence. initialized_ = file_util::PathExists(indicator_file) && !file_util::DirectoryExists(indicator_file); } PmpTableReader::~PmpTableReader() {} const PmpColumnReader* PmpTableReader::AddColumn( const std::string& column_name, const PmpFieldType expected_type) { if (!initialized_) return NULL; std::string filename = table_name_ + "_" + column_name + "." + kPmpExtension; base::FilePath column_file_path = directory_path_.Append( base::FilePath::FromUTF8Unsafe(filename)); scoped_ptr<PmpColumnReader> column_reader(new PmpColumnReader()); uint32 row_count; if (!column_reader->Init(column_file_path, expected_type, &row_count)) return NULL; column_readers_.push_back(column_reader.release()); column_map_[column_name] = column_readers_.back(); max_row_count_ = std::max(max_row_count_, row_count); return column_readers_.back(); } uint32 PmpTableReader::RowCount() const { return max_row_count_; } std::map<std::string, const PmpColumnReader*> PmpTableReader::Columns() const { return column_map_; } } // namespace picasa
29.64557
79
0.743382
e982538c38711f1278ddf5b77920223b78debfa1
3,996
rs
Rust
src/materialized/src/http.rs
benLogN/materialize
944d0e7c3b3268c5232d3b060be986cbd09c6afd
[ "MIT" ]
1
2021-06-10T18:35:27.000Z
2021-06-10T18:35:27.000Z
src/materialized/src/http.rs
benLogN/materialize
944d0e7c3b3268c5232d3b060be986cbd09c6afd
[ "MIT" ]
null
null
null
src/materialized/src/http.rs
benLogN/materialize
944d0e7c3b3268c5232d3b060be986cbd09c6afd
[ "MIT" ]
null
null
null
// Copyright Materialize, Inc. All rights reserved. // // Use of this software is governed by the Business Source License // included in the LICENSE file. // // As of the Change Date specified in that file, in accordance with // the Business Source License, use of this software will be governed // by the Apache License, Version 2.0. //! Embedded HTTP server. //! //! materialized embeds an HTTP server for introspection into the running //! process. At the moment, its primary exports are Prometheus metrics, heap //! profiles, and catalog dumps. use std::pin::Pin; use std::time::Instant; use futures::future::{FutureExt, TryFutureExt}; use hyper::{service, Method}; use openssl::ssl::{Ssl, SslContext}; use tokio::io::{AsyncRead, AsyncWrite}; use tokio_openssl::SslStream; use ore::netio::SniffedStream; mod catalog; mod memory; mod metrics; mod prof; mod root; mod sql; mod util; const METHODS: &[&[u8]] = &[ b"OPTIONS", b"GET", b"HEAD", b"POST", b"PUT", b"DELETE", b"TRACE", b"CONNECT", ]; const TLS_HANDSHAKE_START: u8 = 22; fn sniff_tls(buf: &[u8]) -> bool { !buf.is_empty() && buf[0] == TLS_HANDSHAKE_START } pub struct Server { tls: Option<SslContext>, coord_client: coord::Client, /// When this server started start_time: Instant, } impl Server { pub fn new( tls: Option<SslContext>, coord_client: coord::Client, start_time: Instant, worker_count: usize, ) -> Server { // just set this so it shows up in metrics metrics::WORKER_COUNT .with_label_values(&[&worker_count.to_string()]) .set(1); Server { tls, coord_client, start_time, } } pub fn match_handshake(&self, buf: &[u8]) -> bool { if self.tls.is_some() && sniff_tls(buf) { return true; } let buf = if let Some(pos) = buf.iter().position(|&b| b == b' ') { &buf[..pos] } else { &buf[..] }; METHODS.contains(&buf) } pub async fn handle_connection<A>(&self, conn: SniffedStream<A>) -> Result<(), anyhow::Error> where A: AsyncRead + AsyncWrite + Unpin + Send + Sync + 'static, { match (&self.tls, sniff_tls(&conn.sniff_buffer())) { (Some(tls), true) => { let mut ssl_stream = SslStream::new(Ssl::new(tls)?, conn)?; Pin::new(&mut ssl_stream).accept().await?; self.handle_connection_inner(ssl_stream).await } _ => self.handle_connection_inner(conn).await, } } async fn handle_connection_inner<A>(&self, conn: A) -> Result<(), anyhow::Error> where A: AsyncRead + AsyncWrite + Unpin + 'static, { let svc = service::service_fn(move |req| match (req.method(), req.uri().path()) { (&Method::GET, "/") => self.handle_home(req).boxed(), (&Method::GET, "/metrics") => self.handle_prometheus(req).boxed(), (&Method::GET, "/status") => self.handle_status(req).boxed(), (&Method::GET, "/prof") => self.handle_prof(req).boxed(), (&Method::GET, "/memory") => self.handle_memory(req).boxed(), (&Method::POST, "/prof") => self.handle_prof(req).boxed(), (&Method::POST, "/sql") => self.handle_sql(req).boxed(), (&Method::GET, "/internal/catalog") => self.handle_internal_catalog(req).boxed(), _ => self.handle_static(req).boxed(), }); let http = hyper::server::conn::Http::new(); http.serve_connection(conn, svc).err_into().await } // Handler functions are attached by various submodules. They all have a // signature of the following form: // // fn handle_foo(req) -> impl Future<Output = anyhow::Result<Result<Body>>> // // If you add a new handler, please add it to the most appropriate // submodule, or create a new submodule if necessary. Don't add it here! }
32.487805
97
0.594094
0a50e8c0a5e6e49291842317c00dc170f7c849fe
42,046
sql
SQL
common/config/dump.sql
YegorSS/nedesign
47fb130874043fd07fd095eb8c81096890d46a97
[ "BSD-3-Clause" ]
null
null
null
common/config/dump.sql
YegorSS/nedesign
47fb130874043fd07fd095eb8c81096890d46a97
[ "BSD-3-Clause" ]
null
null
null
common/config/dump.sql
YegorSS/nedesign
47fb130874043fd07fd095eb8c81096890d46a97
[ "BSD-3-Clause" ]
null
null
null
-- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Хост: localhost -- Время создания: Сен 25 2015 г., 09:39 -- Версия сервера: 5.5.44-0ubuntu0.14.04.1 -- Версия PHP: 5.5.9-1ubuntu4.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- База данных: `admin_first` -- -- -------------------------------------------------------- -- -- Структура таблицы `auth_assignment` -- CREATE TABLE IF NOT EXISTS `auth_assignment` ( `item_name` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `user_id` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `created_at` int(11) DEFAULT NULL, PRIMARY KEY (`item_name`,`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Дамп данных таблицы `auth_assignment` -- INSERT INTO `auth_assignment` (`item_name`, `user_id`, `created_at`) VALUES ('admin', '1', 1442834468), ('user', '2', 1442832998), ('user', '3', 1442833319), ('user', '4', 1442834468), ('user', '5', 1442906552); -- -------------------------------------------------------- -- -- Структура таблицы `auth_item` -- CREATE TABLE IF NOT EXISTS `auth_item` ( `name` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `type` int(11) NOT NULL, `description` text COLLATE utf8_unicode_ci, `rule_name` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL, `data` text COLLATE utf8_unicode_ci, `created_at` int(11) DEFAULT NULL, `updated_at` int(11) DEFAULT NULL, PRIMARY KEY (`name`), KEY `rule_name` (`rule_name`), KEY `idx-auth_item-type` (`type`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -- Дамп данных таблицы `auth_item` -- INSERT INTO `auth_item` (`name`, `type`, `description`, `rule_name`, `data`, `created_at`, `updated_at`) VALUES ('admin', 1, 'Администратор', NULL, NULL, 1442560348, 1442560348), ('manager', 1, 'Менеджер', NULL, NULL, 1442560348, 1442560348), ('user', 1, 'Пользователь', NULL, NULL, 1442560348, 1442560348); -- -------------------------------------------------------- -- -- Структура таблицы `auth_item_child` -- CREATE TABLE IF NOT EXISTS `auth_item_child` ( `parent` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `child` varchar(64) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`parent`,`child`), KEY `child` (`child`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Структура таблицы `auth_rule` -- CREATE TABLE IF NOT EXISTS `auth_rule` ( `name` varchar(64) COLLATE utf8_unicode_ci NOT NULL, `data` text COLLATE utf8_unicode_ci, `created_at` int(11) DEFAULT NULL, `updated_at` int(11) DEFAULT NULL, PRIMARY KEY (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- -------------------------------------------------------- -- -- Структура таблицы `carusel` -- CREATE TABLE IF NOT EXISTS `carusel` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(255) DEFAULT NULL, `image` varchar(255) DEFAULT NULL, `active` tinyint(1) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ; -- -- Дамп данных таблицы `carusel` -- INSERT INTO `carusel` (`id`, `title`, `image`, `active`) VALUES (1, 'Визитки', '1.jpg', 1), (2, 'dwded', '3.jpg', 1); -- -------------------------------------------------------- -- -- Структура таблицы `car_orders` -- CREATE TABLE IF NOT EXISTS `car_orders` ( `id` int(11) NOT NULL AUTO_INCREMENT, `text` text, `image` varchar(255) DEFAULT NULL, `sort` int(11) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ; -- -- Дамп данных таблицы `car_orders` -- INSERT INTO `car_orders` (`id`, `text`, `image`, `sort`) VALUES (1, 'Вы можете позвонить нам, приехать в офис, отправить письмо по e-mail или запросить консультацию прямо с этого сайта.', 'order_1.png', 1), (2, 'Для просчета необходима следующая информация:<br>\r\n 1. Тираж (кол-во изделий)<br>\r\n 2. Материал на котором будет печать<br>\r\n 3. Кол-во цветов<br>\r\n 4. Тиснение или другой вид обработки после печати', 'order_2.png', 2), (3, 'Для печать нам необходим макет, если у Вас его нет, мы можем предложить наши услуги по его изготовлению', 'order_3.png', 3), (4, 'Если сроки изготовления и цена Вас устроили, делаете предоплату и мы приступаем к работе', 'order_4.png', 4), (5, 'Как только мы получаем подтверждение оплаты, уточняем сроки и сразу приступаем к работе.', 'order_5.png', 5); -- -------------------------------------------------------- -- -- Структура таблицы `categories` -- CREATE TABLE IF NOT EXISTS `categories` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(255) NOT NULL, `header_meny` varchar(255) NOT NULL, `h_1` varchar(255) NOT NULL, `h_2` varchar(255) DEFAULT NULL, `text` text, `keywords` varchar(255) DEFAULT NULL, `description` varchar(255) DEFAULT NULL, `alias` varchar(255) DEFAULT NULL, `parent_id` int(11) DEFAULT NULL, `active` tinyint(1) DEFAULT NULL, `type` varchar(255) DEFAULT NULL, `rate` int(11) NOT NULL DEFAULT '5', `voites` int(11) NOT NULL DEFAULT '1', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ; -- -- Дамп данных таблицы `categories` -- INSERT INTO `categories` (`id`, `title`, `header_meny`, `h_1`, `h_2`, `text`, `keywords`, `description`, `alias`, `parent_id`, `active`, `type`, `rate`, `voites`) VALUES (1, 'Полиграфическая продукция', 'Полиграфия', 'Полиграфическая продукция', 'Наша продукция', 'Полиграфическая продукция Полиграфическая продукция Полиграфическая продукция', 'Полиграфическая продукция Полиграфическая продукция Полиграфическая продукция', 'Полиграфическая продукция Полиграфическая продукция Полиграфическая продукция', 'poligraficheskie-uslugi', 0, 1, 'post', 10, 2), (2, 'Дизайн', 'Дизайн', 'Новости дизайна', 'О дизайне', 'Полиграфическая продукция Полиграфическая продукция Полиграфическая продукция', 'Полиграфическая продукция Полиграфическая продукция Полиграфическая продукция', 'Полиграфическая продукция Полиграфическая продукция Полиграфическая продукция', 'design', 0, 1, 'news', 31, 7); -- -------------------------------------------------------- -- -- Структура таблицы `collback` -- CREATE TABLE IF NOT EXISTS `collback` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) DEFAULT NULL, `tel` varchar(255) DEFAULT NULL, `post` varchar(255) DEFAULT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `processed` tinyint(1) DEFAULT '1', `time` varchar(255) DEFAULT NULL, `user_id` int(11) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=13 ; -- -- Дамп данных таблицы `collback` -- INSERT INTO `collback` (`id`, `name`, `tel`, `post`, `created`, `processed`, `time`, `user_id`) VALUES (12, 'Admin Adminоvich', '(068) 363-64-76', 'http://localhost/newdesign/yii-application/frontend/web/news/vip-vizitki-pechat-nachinaetsa', '2015-09-22 12:15:06', 1, '', 1); -- -------------------------------------------------------- -- -- Структура таблицы `colors` -- CREATE TABLE IF NOT EXISTS `colors` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(255) NOT NULL, `size_id` int(11) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ; -- -- Дамп данных таблицы `colors` -- INSERT INTO `colors` (`id`, `title`, `size_id`) VALUES (1, 'белый', 1), (2, 'красный', 1), (3, 'синий', 1), (4, 'белый', 2); -- -------------------------------------------------------- -- -- Структура таблицы `feedback` -- CREATE TABLE IF NOT EXISTS `feedback` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) DEFAULT NULL, `company` varchar(255) DEFAULT NULL, `email` varchar(255) DEFAULT NULL, `tel` varchar(255) DEFAULT NULL, `coment` text, `post` varchar(255) DEFAULT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `processed` tinyint(1) DEFAULT '1', `user_id` int(11) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=10 ; -- -- Дамп данных таблицы `feedback` -- INSERT INTO `feedback` (`id`, `name`, `company`, `email`, `tel`, `coment`, `post`, `created`, `processed`, `user_id`) VALUES (9, 'Admin Adminоvich', '1design', 'yegor@1design.org', '(068) 363-64-76', '11111111111', 'http://localhost/newdesign/yii-application/frontend/web/news/vip-vizitki-pechat-nachinaetsa', '2015-09-22 12:16:53', 1, 1); -- -------------------------------------------------------- -- -- Структура таблицы `kurs` -- CREATE TABLE IF NOT EXISTS `kurs` ( `id` int(11) NOT NULL AUTO_INCREMENT, `materials` decimal(8,2) DEFAULT NULL, `works` decimal(8,2) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; -- -- Дамп данных таблицы `kurs` -- INSERT INTO `kurs` (`id`, `materials`, `works`) VALUES (1, 22.57, 1.00); -- -------------------------------------------------------- -- -- Структура таблицы `materials` -- CREATE TABLE IF NOT EXISTS `materials` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(255) NOT NULL, `price` decimal(8,2) DEFAULT NULL, `workprice` decimal(8,2) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ; -- -- Дамп данных таблицы `materials` -- INSERT INTO `materials` (`id`, `title`, `price`, `workprice`) VALUES (1, 'Клише', 100.33, 16.99), (2, 'lalala', 300.99, 130.55); -- -------------------------------------------------------- -- -- Структура таблицы `matrelations` -- CREATE TABLE IF NOT EXISTS `matrelations` ( `id` int(11) NOT NULL AUTO_INCREMENT, `product_id` int(11) DEFAULT NULL, `material_id` int(11) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=12 ; -- -- Дамп данных таблицы `matrelations` -- INSERT INTO `matrelations` (`id`, `product_id`, `material_id`) VALUES (1, 1, 1), (11, 1, 2); -- -------------------------------------------------------- -- -- Структура таблицы `migration` -- CREATE TABLE IF NOT EXISTS `migration` ( `version` varchar(180) NOT NULL, `apply_time` int(11) DEFAULT NULL, PRIMARY KEY (`version`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Дамп данных таблицы `migration` -- INSERT INTO `migration` (`version`, `apply_time`) VALUES ('m000000_000000_base', 1437990310), ('m130524_201442_init', 1442832924), ('m140506_102106_rbac_init', 1442558484), ('m150523_122643_create_products_table', 1437990312), ('m150523_122838_create_variants_table', 1437990312), ('m150523_123032_create_size_table', 1437990312), ('m150523_123234_create_colors_table', 1437990313), ('m150523_123530_create_prices_table', 1437990313), ('m150523_123559_create_services_table', 1437990313), ('m150615_133338_create_categories_table', 1437990313), ('m150616_063048_create_posts_table', 1438091088), ('m150619_145032_create_collback_table', 1442840713), ('m150623_140159_create_postimage_table', 1440484270), ('m150626_105329_create_carusel_table', 1437990315), ('m150626_132034_create_feedback_table', 1442840713), ('m150630_112042_create_relations_table', 1437990315), ('m150724_065957_create_news_table', 1437990315), ('m150727_061358_create_pages_table', 1437990316), ('m150811_084915_create_materials_table', 1439554936), ('m150811_090116_create_matrelations_table', 1439364989), ('m150825_084848_create_kurs_table', 1440492757), ('m150826_074001_create_car_orders_table', 1440749042), ('m150828_080514_create_orders_table', 1442840713); -- -------------------------------------------------------- -- -- Структура таблицы `news` -- CREATE TABLE IF NOT EXISTS `news` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(255) NOT NULL, `h_1` varchar(255) NOT NULL, `h_2` varchar(255) DEFAULT NULL, `keywords` varchar(255) DEFAULT NULL, `description` varchar(255) DEFAULT NULL, `text` text, `alias` varchar(255) NOT NULL, `category_id` int(11) DEFAULT NULL, `rate` int(11) NOT NULL DEFAULT '5', `voites` int(11) NOT NULL DEFAULT '1', `active` tinyint(1) DEFAULT NULL, `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ; -- -- Дамп данных таблицы `news` -- INSERT INTO `news` (`id`, `title`, `h_1`, `h_2`, `keywords`, `description`, `text`, `alias`, `category_id`, `rate`, `voites`, `active`, `created`) VALUES (1, 'Имидж начинается с VIP визитки', 'Имидж начинается с VIP визитки', '', 'пакеты с логотипом,печать на пакетах,печать на пакетах киев,пакеты с логотипом киев,пакеты полиэтиленовые киев,изготовление пакетов с логотипом,печать пакетов,пакеты с печатью,пакет с логотипом,заказать пакеты с логотипом,фирменные пакеты,пакеты полиэтиле', 'Имидж начинается с VIP визитки', '<p><img alt="" src="http://first.rybalka.me/uploads/ckeditor/1443172805_1design-vizitki-tisnenie-thumb-thumb.jpg" style="float:left; height:129px; margin-left:5px; margin-right:5px; width:180px" />Имиджевые, дизайнерские и информационные характеристики, которыми наделяют современные VIP визитки, являются основными моментами, представляющими успешного человека и создающими все предпосылки для продолжения деловых и личностных контактов. Правильно созданный дизайн визитки ставит ее в один ряд с имиджевыми подарками. Настоящие дизайнерские визитки VIP обладают свойством привлекать внимание и усиливать воздействие текста на собеседника.</p>\r\n\r\n<p>Пластиковые визитки &ndash; признак солидности и стиля</p>\r\n\r\n<p>Бурное развитие полиграфии позволяет предложить пользователям современные пластиковые визитки, которые отражают деловые качества владельца &ndash; умение самосовершенствоваться и справляться с возникающими проблемами.</p>\r\n\r\n<p>Применяя дизайнерские визитки из пластика, их владелец получает следующие преимущества:</p>\r\n\r\n<ul>\r\n <li>\r\n <ul>\r\n <li>вручая подобные VIP визитки можно быть уверенным, что они привлекут внимание собеседников;</li>\r\n <li>практичный и стильный дизайн визитки из пластика длительное время сохраняет привлекательный вид;</li>\r\n </ul>\r\n </li>\r\n</ul>\r\n\r\n<p>подобные эксклюзивные визитки &ndash; несомненное свидетельство надежности и солидности бизнеса, который соответствует понятию VIP.</p>\r\n\r\n<p>А зачем они нужны - VIP визитки?</p>\r\n\r\n<p>Эксклюзивные визитки, предлагаемые своим клиентам ООО &laquo;1Дизайн&trade;&raquo;, способны привлечь внимание предполагаемого партнера по бизнесу либо клиента. Возьмем, к примеру, ресторанный бизнес. По традиции, принятой в Италии, ресторатор просто обязан подойти к посетителям, пообщаться с ними, чтобы узнать, что им нравиться. Вручив, при первом знакомстве, свои визитки, VIP персонам предназначенные, шеф-повар может быть уверен, что его кухню посетители не забудут.</p>\r\n\r\n<p>Творчески создавая дизайн визитки, можно предложить сотруднику банка, к примеру, сделать дизайнерские визитки в форме сложенной пополам денежной купюры. Любой человек возьмет подобное полиграфическое изделие, а развернув &ndash; прочтет и запомнит изложенную информацию.</p>\r\n\r\n<p>А если вы работаете с кожаной продукцией - VIP визитки должны быть напечатаны на коже, тем более, что возможности современной полиграфии позволяют создать настоящие произведения искусства (шелкография и лазерная гравировка).</p>\r\n\r\n<p>Пластиковые визитки от &laquo;1Дизайн&trade;&raquo; - для бизнесменов и школьников</p>\r\n\r\n<p>ООО &laquo;1Дизайн&trade;&raquo; изготавливает пластиковые визитки из качественного ПВХ, по размерам и форме, согласованной с заказчиком. Такие эксклюзивные визитки с округлыми краями &ndash; можно вручить и на 20-м Международном туристическом салоне UITM 2013, проведение которого намечено на 23 &ndash; 25 октября этого года. Тем более, что национальные тур операторы многих стран уже забронировали себе стенды (Кипр, Болгария, Египет, Турция, Таиланд).</p>\r\n\r\n<p>Гастрономический туризм &ndash; одно из направлений, в котором работают туроператоры, подразумевает большую культурную программу и возможность дегустировать местную кухню. А это, в свою очередь, приведет к новым знакомствам, появлению новых бизнес контактов, для которых и необходимы VIP визитки.</p>\r\n\r\n<p>Не следует забывать, что не за горами начало нового учебного года. Пластиковые визитки с указанием названия учебного заведения и телефонов родителей, вложенные в специальный кармашек школьной сумки, позволят быть уверенным за своего ребенка. Почему именно пластиковые визитки? Ежедневная проверка, на месте ли данный источник информации, приведет к истиранию традиционных визитных карточек. Пластиковые визитки &ndash; будут длительное время сохранять свой внешний вид.</p>\r\n\r\n<p>Дизайн визитки от &laquo;1Дизайн&trade;&raquo; раскрывает весь ее потенциал</p>\r\n\r\n<p>Чем же выделяется успешный человек на общем фоне? Понимая, что человек сам создает себя, свое имя, свой успех, успешный человек не отдается на волю течения, дожидаясь, когда же о нем и его бизнесе узнают. Он сам идет на контакт, заводит нужные знакомства. И в этом ему помогают VIP визитки от &laquo;1Дизайн&trade;&raquo;.</p>\r\n\r\n<p>Творчески разработанный дизайн визитки, выполненный нашими сотрудниками, позволит максимально использовать потенциальные возможности визитки VIP &ndash; будь то пластиковые визитки либо эксклюзивные визитки не ординарных форм и нетрадиционных материалов.</p>\r\n\r\n<p>И business card, и эпатажные визитки для представителей творческих профессий, и стильные, производящие впечатление VIP визитки &ndash; дизайн визитки и ее изготовление не займет много времени, при обращении в ООО &laquo;1Дизайн&trade;&raquo;.</p>\r\n', 'vip-vizitki-pechat-nachinaetsa', 2, 17, 4, 1, '2015-09-25 06:19:43'); -- -------------------------------------------------------- -- -- Структура таблицы `orders` -- CREATE TABLE IF NOT EXISTS `orders` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) DEFAULT NULL, `telephone` varchar(255) DEFAULT NULL, `mail` varchar(255) DEFAULT NULL, `details` text, `active` tinyint(1) DEFAULT '1', `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `user_id` int(11) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=13 ; -- -- Дамп данных таблицы `orders` -- INSERT INTO `orders` (`id`, `name`, `telephone`, `mail`, `details`, `active`, `created`, `user_id`) VALUES (12, 'Admin Adminоvich', '(068) 363-64-76', 'yegor@1design.org', '{"product":"Пакеты","variant":"Банан","size":"30х40","color":"белый","colorQuantity1":"1","colorQuantity2":"0","quantity":50,"serv":[],"dopserv":[],"price":1397}', 1, '2015-09-22 12:17:04', 1); -- -------------------------------------------------------- -- -- Структура таблицы `pages` -- CREATE TABLE IF NOT EXISTS `pages` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(255) NOT NULL, `header_meny` varchar(255) NOT NULL, `h_1` varchar(255) NOT NULL, `h_2` varchar(255) DEFAULT NULL, `keywords` varchar(255) DEFAULT NULL, `description` varchar(255) DEFAULT NULL, `alias` varchar(255) NOT NULL, `text` text, `rate` int(11) NOT NULL DEFAULT '5', `voites` int(11) NOT NULL DEFAULT '1', `active` tinyint(1) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ; -- -- Дамп данных таблицы `pages` -- INSERT INTO `pages` (`id`, `title`, `header_meny`, `h_1`, `h_2`, `keywords`, `description`, `alias`, `text`, `rate`, `voites`, `active`) VALUES (1, 'Полиграфия Киев Дизайн студия Полиграфические услуги ООО 1Дизайн®', 'Главная', 'ПОЛИГРАФИЯ В КИЕВЕ ОТ 1DESIGN®', 'Полиграфия – невозможное делает возможным', 'полиграфия, полиграфия киев, дизайн студия, полиграфия в киеве, печать полиграфия, полиграфия печать, полиграфия украина, полиграфия в украине, 1design', 'Полиграфия Киев. Дизайн студия. 1Design® Полиграфические услуги от типографии ООО 1Дизайн®', 'index', '', 38, 9, 1), (2, 'Контакты', 'Контакты', 'Контакты', '', 'полиграфия, полиграфия киев, дизайн студия, полиграфия в киеве, печать полиграфия, полиграфия печать, полиграфия украина, полиграфия в украине, 1design', 'Полиграфия Киев. Дизайн студия. 1Design® Полиграфические услуги от типографии ООО 1Дизайн®', 'contact', '', 23, 5, 1), (3, 'Полиграфия Киев Дизайн студия Полиграфические услуги ООО 1Дизайн®', 'О компании', 'Дизайн студия 1Design®', '', 'полиграфия, полиграфия киев, дизайн студия, полиграфия в киеве, печать полиграфия, полиграфия печать, полиграфия украина, полиграфия в украине, 1design', 'Полиграфия Киев. Дизайн студия. 1Design® Полиграфические услуги от типографии ООО 1Дизайн®', 'about', '<p>Студия дизайна - ООО &laquo;1Дизайн&reg;&raquo; это организованная в феврале 2008 года команда опытных специалистов, которые обеспечивают быстрое и качественное&nbsp;<a href="http://localhost/newdesign/yii-application/frontend/web/" style="box-sizing: border-box; color: black; text-decoration: none; outline: none; background-color: transparent;" title="полиграфическая продукция">изготовление полиграфической продукции</a>, услуг дизайна, а так же создание и продвижение сайтов любой структуры и сложности.</p>\r\n\r\n<p>Обращаясь в ООО &laquo;1Дизайн&reg;&raquo;, Вы получаете:</p>\r\n\r\n<ul>\r\n <li>высокое качество полиграфической продукции</li>\r\n <li>современный дизайн</li>\r\n <li>доступные цены</li>\r\n <li>все выполняется на собственном оборудовании</li>\r\n</ul>\r\n\r\n<p>Профессиональные дизайнеры веб-студии ООО &laquo;1Дизайн&reg;&raquo; позаботятся, чтобы разработка сайта отвечала всем необходимым критериям, согласно целевой направленности интернет-ресурса. Качественная раскрутка (продвижение) сайта предусматривает все нюансы и тонкости, которые, так или иначе, отражаются на общей работоспособности сайта.</p>\r\n\r\n<p>Мы можем предложить создание сайта с самого начала, непосредственно в той конфигурации, которая вам необходима. Если вам требуется сайт - визитка или вы предполагаете заказать разработку интернет магазина, веб-студия ООО &laquo;1Дизайн&reg;&raquo; справиться с поставленной задачей любой сложности в самые короткие сроки. Большой опыт и высокий профессионализм наших сотрудников позволяет нам выполнить заказ в точном соответствии с пожеланиями клиента.</p>\r\n\r\n<p>Приняв решение&nbsp;<a href="http://www.1design.net/" style="box-sizing: border-box; color: black; text-decoration: none; outline: none; background-color: transparent;" title="заказать разработку сайта">заказать разработку сайта</a>&nbsp;следует обратиться к помощи профессионалов, которые смогут предложить весь необходимый спектр услуг в комплексе, что поможет существенно сэкономить массу времени и средств. Кроме того, вы гарантированно получите качественный функциональный продукт, который будет отвечать всем предусмотренным в договоре пунктам.</p>\r\n\r\n<p>Качественная разработка и&nbsp;<a href="http://www.1design.net/" style="box-sizing: border-box; color: black; text-decoration: none; outline: none; background-color: transparent;" title="создание сайтов">создание сайтов</a>&nbsp;нашей веб-студией, это прежде всего предусмотрительная разработка логотипа и стиля, логичный и эффектный, а кроме того оригинальный и запоминающийся дизайн сайта, с удобной навигацией по ресурсу и разумной компоновкой его страниц.</p>\r\n\r\n<p>Также, профессиональная web-студия ООО &laquo;<a href="http://www.1design.net/" style="box-sizing: border-box; color: black; text-decoration: none; outline: none; background-color: transparent;">1Дизайн</a>&reg;&raquo; предлагает свои услуги и тем, кто уже имеет свой сайт. Если вам требуется продвижение сайта, наши веб-мастера и оптимизаторы с радостью это выполнят, согласно всем Вашим пожеланиям. Мы можем осуществить качественное наполнения сайта контентом, в который также будут входить seo-оптимизированные тексты, содержащие ключи под основные тематические запросы, согласно направленности сайта. Мы обеспечим вам быстрое продвижение сайта в топ, выводя его на лидирующие позиции в своей сфере. Веб-студия ООО &laquo;1Дизайн&reg;&raquo; предлагает продвижение сайтов как региональное, так и по СНГ. При необходимости, будет проведена раскрутка сайта по СНГ, все зависит от вашего желания и территориальности рынка сбыта, который обслуживает ваша компания. Обеспечивая продвижение сайтов в топ, производится регистрация web-сайтов в каталогах, что позволяет не только занять лидирующие позиции относительно конкурентов, но также надежно их закрепить за собой.</p>\r\n\r\n<p>Качественная ручная и автоматическая регистрация сайтов в каталогах, это далеко не единственный метод, который обеспечивает&nbsp;<a href="http://www.1design.net/prodvizhenie-saita" style="box-sizing: border-box; color: black; text-decoration: none; outline: none; background-color: transparent;" title="продвижение сайта">продвижение сайта</a>&nbsp;по ТИЦ. Веб-студия ООО &laquo;1Дизайн&reg;&raquo; предлагает вам продвижение сайта с помощью статей, что является самым новым и весьма эффективным методом раскрутки из всех известных.</p>\r\n\r\n<p>Мастера веб-студии ООО &laquo;1Дизайн&reg;&raquo; всегда пользуются новинками технологий, которые способствуют улучшенному продвижению сайтов в топ 10. Не тратте время и деньги на аматоров, предоставьте это профессионалам, которые Вас не подведут.</p>\r\n', 45, 9, 1); -- -------------------------------------------------------- -- -- Структура таблицы `postimage` -- CREATE TABLE IF NOT EXISTS `postimage` ( `id` int(11) NOT NULL AUTO_INCREMENT, `image` varchar(255) DEFAULT NULL, `post_id` int(11) DEFAULT NULL, `title` varchar(255) DEFAULT NULL, `alt` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=49 ; -- -------------------------------------------------------- -- -- Структура таблицы `posts` -- CREATE TABLE IF NOT EXISTS `posts` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(255) NOT NULL, `header_meny` varchar(255) NOT NULL, `h_1` varchar(255) NOT NULL, `h_2` varchar(255) NOT NULL, `keywords` varchar(255) DEFAULT NULL, `description` varchar(255) DEFAULT NULL, `alias` varchar(255) NOT NULL, `text` text, `price` text, `minorder` int(11) DEFAULT NULL, `category_id` int(11) DEFAULT NULL, `mainimage` varchar(255) DEFAULT NULL, `rate` int(11) NOT NULL DEFAULT '5', `voites` int(11) NOT NULL DEFAULT '1', `product_id` int(11) DEFAULT NULL, `active` tinyint(1) DEFAULT NULL, `tegs` varchar(255) DEFAULT NULL, `altmainimage` varchar(255) NOT NULL, `titlemainimage` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ; -- -- Дамп данных таблицы `posts` -- INSERT INTO `posts` (`id`, `title`, `header_meny`, `h_1`, `h_2`, `keywords`, `description`, `alias`, `text`, `price`, `minorder`, `category_id`, `mainimage`, `rate`, `voites`, `product_id`, `active`, `tegs`, `altmainimage`, `titlemainimage`) VALUES (1, 'Печать на пакетах Киев Пакеты с логотипом Фирменные кульки с логотипом', 'Пакеты, кульки', 'Печать на пакетах логотипа киев кульки с логотипом', 'Пакеты с логотипом кулек с логотипом печать на кульках', 'пакеты с логотипом,печать на пакетах,печать на пакетах киев,пакеты с логотипом киев,пакеты полиэтиленовые киев,изготовление пакетов с логотипом,печать пакетов,пакеты с печатью,пакет с логотипом,заказать пакеты с логотипом,фирменные пакеты,пакеты полиэтиле', 'Пакеты с логотипом от 1Design®. Печать на пакетах из полиэтилена, печать логотипа на полиэтиленовых кульках 20х30 30х40 40х50 60х60 см, разные цвета. Печать кульков малыми партиями', 'pakety-kulki', '<p style="text-align:justify"><img alt="" src="http://localhost/newdesign/yii-application/frontend/web/uploads/ckeditor/1439974895_1design-vizitka-obiemnaya-kraska-thumb.jpg" style="float:left; height:120px; margin-left:10px; margin-right:10px; width:180px" />Сегодня, когда уникальная&nbsp;<a href="https://www.1design.org/" style="box-sizing: border-box; color: black; text-decoration: none; background: 0px 0px;" title="полиграфическая продукция">полиграфическая продукция</a>&nbsp;стала общедоступным товаром,<strong>изготовление плакатов, печать плакатов и постеров</strong>&nbsp;является одним из наиболее простых и эффективных способов рекламы. Яркий и красочный&nbsp;<em>плакат</em>, созданный в соответствии с вашими пожеланиями, станет прекрасной платформой для размещения информации с целью привлечения новых клиентов.</p>\r\n\r\n<p>Печать плакатов, постеров и афиш &ndash; лучший инструмент для развития компании</p>\r\n\r\n<p style="text-align:justify">Что делает&nbsp;<em>плакаты</em>&nbsp;уникальным инструментом рекламных компаний? Оптимальное сочетание цены и качества, поскольку этот вид полиграфической продукции обеспечивает достаточную видимость анонсируемого материала.&nbsp;<strong>Плакат или постер</strong>, размещенный в людных местах, может гарантировать вам большой приток клиентов в считанные часы. Не верите? Зря! Ведь на маленькие объявления спешащие клиенты не обратят внимание, листовку выбросят, не посмотрев. Единственное, что еще продолжает обеспечивать наращивание потребительской базы, так это масштабная наружная реклама, которая стоит немалых денег. Если вы не располагаете большими финансовыми средствами, возьмите на вооружение&nbsp;<strong>печать плакатов</strong>&nbsp;&ndash; она наверняка оправдает себя.</p>\r\n\r\n<p>Цветная печать плакатов и афиш для праздника</p>\r\n\r\n<p style="text-align:justify">Думать, что плакаты можно использовать только в производственных целях &ndash; большое заблуждение. Ведь в&nbsp;<a href="https://www.1design.org/" style="box-sizing: border-box; color: black; text-decoration: none; background: 0px 0px;" title="типография">типография</a>&nbsp;за считанные часы неприметный лист бумаги может превратиться в настоящее произведение искусства, которое станет прекрасным сюрпризом для родных и близких. Пейзажи мест, где вы побывали или хотите побывать, коллажи семейных фото или смешные изображения &ndash; все это за минимальную цену может оказаться на стене вашей спальни или офиса. Цветная&nbsp;<em><a href="https://www.1design.org/" style="box-sizing: border-box; color: black; text-decoration: none; background: 0px 0px;" title="печать">печать</a>&nbsp;плакатов</em>&nbsp;или постеров поможет оживить даже самое унылое помещение, придать ему оригинальности и красочности. (<a href="https://www.1design.org/" style="box-sizing: border-box; color: black; text-decoration: none; background: 0px 0px;" title="полиграфия">полиграфия</a>)</p>\r\n\r\n<p>Изготовление рекламных плакатов: что и как</p>\r\n\r\n<p style="text-align:justify">Само собой разумеется, что порядок и форма размещения рекламной информации на плакате зависит исключительно от желания заказчика. Но если речь идет о полиграфической продукции рекламного характера, то лучше не забывать определенные каноны создания плакатов, которые обеспечат вам эффективность работы полиграфических единиц. Помните: шрифт должен быть достаточно крупным и хорошо читаемым, а цветовая гамма &ndash; приятной для глаза, поскольку изготовление рекламных плакатов в первую очередь основывается на возможности чтения &laquo;на ходу&raquo;.</p>\r\n\r\n<p style="text-align:justify">Спешите&nbsp;<strong><em>заказать плакаты, афиши и постеры</em></strong>, чтобы самостоятельно убедиться в эффективности их функционирования на рекламном рынке!</p>\r\n', '', 100, 1, 'Pretty-Green-1.png', 10, 2, 1, 1, '', 'lalala', 'bebebe'), (2, 'Печать плаката А3, постеров киев изготовление афиш', 'Афиши, Плакаты', 'Печать плаката А3, постеров киев изготовление афиш', 'Заказать рекламный плакат киев изготовление плакатов А3 А4', 'Печать плаката А3, постеров киев изготовление афиш', 'Печать плаката А3, постеров киев изготовление афиш', 'afishi-plakaty', '<p style="text-align:justify"><img alt="" src="http://first.rybalka.me/uploads/ckeditor/1443173073_plakaty-1design-afisha-thumb.jpg" style="float:left; height:130px; margin-left:5px; margin-right:5px; width:130px" />Сегодня, когда уникальная&nbsp;<a href="https://www.1design.org/" style="box-sizing: border-box; color: black; text-decoration: none; background: 0px 0px;" title="полиграфическая продукция">полиграфическая продукция</a>&nbsp;стала общедоступным товаром,<strong>изготовление плакатов, печать плакатов и постеров</strong>&nbsp;является одним из наиболее простых и эффективных способов рекламы. Яркий и красочный&nbsp;<em>плакат</em>, созданный в соответствии с вашими пожеланиями, станет прекрасной платформой для размещения информации с целью привлечения новых клиентов.</p>\r\n\r\n<p>Печать плакатов, постеров и афиш &ndash; лучший инструмент для развития компании</p>\r\n\r\n<p style="text-align:justify">Что делает&nbsp;<em>плакаты</em>&nbsp;уникальным инструментом рекламных компаний? Оптимальное сочетание цены и качества, поскольку этот вид полиграфической продукции обеспечивает достаточную видимость анонсируемого материала.&nbsp;<strong>Плакат или постер</strong>, размещенный в людных местах, может гарантировать вам большой приток клиентов в считанные часы. Не верите? Зря! Ведь на маленькие объявления спешащие клиенты не обратят внимание, листовку выбросят, не посмотрев. Единственное, что еще продолжает обеспечивать наращивание потребительской базы, так это масштабная наружная реклама, которая стоит немалых денег. Если вы не располагаете большими финансовыми средствами, возьмите на вооружение&nbsp;<strong>печать плакатов</strong>&nbsp;&ndash; она наверняка оправдает себя.</p>\r\n\r\n<p>Цветная печать плакатов и афиш для праздника</p>\r\n\r\n<p style="text-align:justify">Думать, что плакаты можно использовать только в производственных целях &ndash; большое заблуждение. Ведь в&nbsp;<a href="https://www.1design.org/" style="box-sizing: border-box; color: black; text-decoration: none; background: 0px 0px;" title="типография">типография</a>&nbsp;за считанные часы неприметный лист бумаги может превратиться в настоящее произведение искусства, которое станет прекрасным сюрпризом для родных и близких. Пейзажи мест, где вы побывали или хотите побывать, коллажи семейных фото или смешные изображения &ndash; все это за минимальную цену может оказаться на стене вашей спальни или офиса. Цветная&nbsp;<em><a href="https://www.1design.org/" style="box-sizing: border-box; color: black; text-decoration: none; background: 0px 0px;" title="печать">печать</a>&nbsp;плакатов</em>&nbsp;или постеров поможет оживить даже самое унылое помещение, придать ему оригинальности и красочности. (<a href="https://www.1design.org/" style="box-sizing: border-box; color: black; text-decoration: none; background: 0px 0px;" title="полиграфия">полиграфия</a>)</p>\r\n\r\n<p>Изготовление рекламных плакатов: что и как</p>\r\n\r\n<p style="text-align:justify">Само собой разумеется, что порядок и форма размещения рекламной информации на плакате зависит исключительно от желания заказчика. Но если речь идет о полиграфической продукции рекламного характера, то лучше не забывать определенные каноны создания плакатов, которые обеспечат вам эффективность работы полиграфических единиц. Помните: шрифт должен быть достаточно крупным и хорошо читаемым, а цветовая гамма &ndash; приятной для глаза, поскольку изготовление рекламных плакатов в первую очередь основывается на возможности чтения &laquo;на ходу&raquo;.</p>\r\n\r\n<p style="text-align:justify">Спешите&nbsp;<strong><em>заказать плакаты, афиши и постеры</em></strong>, чтобы самостоятельно убедиться в эффективности их функционирования на рекламном рынке!</p>\r\n', '', 100, 1, 'SA-1-300x300.png', 26, 6, 1, 1, 'печать плаката,изготовление плакатов,печать плакатов постеров,заказать плакат,напечатать плакат,изготовление плакатов киев,изготовление афиш,заказать рекламный плакат,печать плаката а3,печать плакатов на а4,изготовление плакатов баннеров,печать плаката на', 'постеров киев изготовление афиш', 'постеров киев изготовление афиш'); -- -------------------------------------------------------- -- -- Структура таблицы `prices` -- CREATE TABLE IF NOT EXISTS `prices` ( `id` int(11) NOT NULL AUTO_INCREMENT, `price` decimal(8,2) DEFAULT NULL, `color_id` int(11) DEFAULT NULL, `size_id` int(11) DEFAULT NULL, `service_id` int(11) DEFAULT NULL, `product_id` int(11) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=11 ; -- -- Дамп данных таблицы `prices` -- INSERT INTO `prices` (`id`, `price`, `color_id`, `size_id`, `service_id`, `product_id`) VALUES (1, 75.99, NULL, NULL, 1, 0), (2, 230.33, NULL, 1, 2, 1), (3, 0.99, NULL, 1, 3, 1), (4, 0.99, 1, 1, NULL, NULL), (5, 0.66, 2, 1, NULL, NULL), (6, 0.99, 3, 1, NULL, NULL), (7, 300.55, NULL, 2, 2, 1), (8, 0.95, NULL, 2, 3, 1), (9, 0.47, 4, 2, NULL, NULL), (10, 1561.99, NULL, NULL, 4, 1); -- -------------------------------------------------------- -- -- Структура таблицы `products` -- CREATE TABLE IF NOT EXISTS `products` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(255) NOT NULL, `formula` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ; -- -- Дамп данных таблицы `products` -- INSERT INTO `products` (`id`, `title`, `formula`) VALUES (1, 'Пакеты', 'quantity * (colorQuantity * (priceWork * worksKurs) + (colorPrice * materialsKurs)) + (firstPrice * worksKurs) + (dopservice * worksKurs) + (dopmat * materialsKurs) + (dopwork * worksKurs)'); -- -------------------------------------------------------- -- -- Структура таблицы `relations` -- CREATE TABLE IF NOT EXISTS `relations` ( `id` int(11) NOT NULL AUTO_INCREMENT, `product_id` int(11) DEFAULT NULL, `service_id` int(11) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ; -- -- Дамп данных таблицы `relations` -- INSERT INTO `relations` (`id`, `product_id`, `service_id`) VALUES (1, 1, 1), (2, 1, 2), (3, 1, 3), (4, 1, 4); -- -------------------------------------------------------- -- -- Структура таблицы `services` -- CREATE TABLE IF NOT EXISTS `services` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(255) NOT NULL, `unit` int(11) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ; -- -- Дамп данных таблицы `services` -- INSERT INTO `services` (`id`, `title`, `unit`) VALUES (1, 'Доставка', NULL), (2, 'Первый прогон', NULL), (3, 'Печатные работы', NULL), (4, 'scsc', 1); -- -------------------------------------------------------- -- -- Структура таблицы `size` -- CREATE TABLE IF NOT EXISTS `size` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(255) NOT NULL, `description` varchar(255) DEFAULT NULL, `variant_id` int(11) DEFAULT NULL, `product_id` int(11) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ; -- -- Дамп данных таблицы `size` -- INSERT INTO `size` (`id`, `title`, `description`, `variant_id`, `product_id`) VALUES (1, '30х40', NULL, 1, 1), (2, '40х50', NULL, 2, 1); -- -------------------------------------------------------- -- -- Структура таблицы `user` -- CREATE TABLE IF NOT EXISTS `user` ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `auth_key` varchar(32) COLLATE utf8_unicode_ci NOT NULL, `password_hash` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `password_reset_token` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `fio` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `company` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `telephone` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `status` smallint(6) NOT NULL DEFAULT '10', `created_at` int(11) NOT NULL, `updated_at` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=6 ; -- -- Дамп данных таблицы `user` -- INSERT INTO `user` (`id`, `username`, `auth_key`, `password_hash`, `password_reset_token`, `email`, `fio`, `company`, `telephone`, `status`, `created_at`, `updated_at`) VALUES (1, 'admin', 'uh006zruZj8FZNicGDvZJfp2vYbG5Y4z', '$2y$13$8WXGcUa2RHbCdD80RlpWSeAm0cNi8Gw9ho3DR4tpG01U7l/9VPN..', '', 'yegor@1design.org', 'Admin Adminоvich', '1design', '(068) 363-64-76', 10, 1432381596, 1442842329); -- -------------------------------------------------------- -- -- Структура таблицы `variants` -- CREATE TABLE IF NOT EXISTS `variants` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(255) NOT NULL, `product_id` int(11) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ; -- -- Дамп данных таблицы `variants` -- INSERT INTO `variants` (`id`, `title`, `product_id`) VALUES (1, 'Банан', 1), (2, 'Петля', 1); -- -- Ограничения внешнего ключа сохраненных таблиц -- -- -- Ограничения внешнего ключа таблицы `auth_assignment` -- ALTER TABLE `auth_assignment` ADD CONSTRAINT `auth_assignment_ibfk_1` FOREIGN KEY (`item_name`) REFERENCES `auth_item` (`name`) ON DELETE CASCADE ON UPDATE CASCADE; -- -- Ограничения внешнего ключа таблицы `auth_item` -- ALTER TABLE `auth_item` ADD CONSTRAINT `auth_item_ibfk_1` FOREIGN KEY (`rule_name`) REFERENCES `auth_rule` (`name`) ON DELETE SET NULL ON UPDATE CASCADE; -- -- Ограничения внешнего ключа таблицы `auth_item_child` -- ALTER TABLE `auth_item_child` ADD CONSTRAINT `auth_item_child_ibfk_1` FOREIGN KEY (`parent`) REFERENCES `auth_item` (`name`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `auth_item_child_ibfk_2` FOREIGN KEY (`child`) REFERENCES `auth_item` (`name`) ON DELETE CASCADE ON UPDATE CASCADE; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
60.41092
5,287
0.720901
b40fdd656aad5d5bfe7795e1a34f65446e3cfd89
2,035
swift
Swift
cocktailMaker/Model/CocktailResults.swift
clc80/clc_80-yahoo.com
80392360c3869e160a4cbac4adfbe6d27c1bd5d8
[ "MIT" ]
1
2020-12-05T21:53:45.000Z
2020-12-05T21:53:45.000Z
cocktailMaker/Model/CocktailResults.swift
clc80/clc_80-yahoo.com
80392360c3869e160a4cbac4adfbe6d27c1bd5d8
[ "MIT" ]
null
null
null
cocktailMaker/Model/CocktailResults.swift
clc80/clc_80-yahoo.com
80392360c3869e160a4cbac4adfbe6d27c1bd5d8
[ "MIT" ]
1
2020-11-22T06:38:09.000Z
2020-11-22T06:38:09.000Z
// // CocktailResults.swift // cocktailMaker // // Created by Claudia Contreras on 3/25/20. // Copyright © 2020 thecoderpilot. All rights reserved. // import Foundation struct CocktailResults: Codable { let drinkName: String let imageString: String let ingredient1: String? let ingredient2: String? let ingredient3: String? let ingredient4: String? let ingredient5: String? let ingredient6: String? let ingredient7: String? let ingredient8: String? let ingredient9: String? let ingredient10: String? let measurement1: String? let measurement2: String? let measurement3: String? let measurement4: String? let measurement5: String? let measurement6: String? let measurement7: String? let measurement8: String? let measurement9: String? let measurement10: String? let instructions: String enum CodingKeys: String, CodingKey { case drinkName = "strDrink" case imageString = "strDrinkThumb" case ingredient1 = "strIngredient1" case ingredient2 = "strIngredient2" case ingredient3 = "strIngredient3" case ingredient4 = "strIngredient4" case ingredient5 = "strIngredient5" case ingredient6 = "strIngredient6" case ingredient7 = "strIngredient7" case ingredient8 = "strIngredient8" case ingredient9 = "strIngredient9" case ingredient10 = "strIngredient10" case measurement1 = "strMeasure1" case measurement2 = "strMeasure2" case measurement3 = "strMeasure3" case measurement4 = "strMeasure4" case measurement5 = "strMeasure5" case measurement6 = "strMeasure6" case measurement7 = "strMeasure7" case measurement8 = "strMeasure8" case measurement9 = "strMeasure9" case measurement10 = "strMeasure10" case instructions = "strInstructions" } } struct DrinksResults: Codable { let drinks: [CocktailResults] }
28.263889
56
0.661425
877c73442b3e712483bcf94d2052aeefc91639c4
456
html
HTML
postfix/help/opt_relocated_maps.nl.html
GalaxyGFX/webmin
134311032e3e69a6f7386648733a3a65c9a3ba1d
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1,863
2015-01-04T21:45:45.000Z
2022-03-30T09:10:50.000Z
postfix/help/opt_relocated_maps.nl.html
GalaxyGFX/webmin
134311032e3e69a6f7386648733a3a65c9a3ba1d
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1,233
2015-01-03T12:45:51.000Z
2022-03-31T02:39:58.000Z
postfix/help/opt_relocated_maps.nl.html
GalaxyGFX/webmin
134311032e3e69a6f7386648733a3a65c9a3ba1d
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
546
2015-01-05T13:07:28.000Z
2022-03-25T21:47:51.000Z
<header>&quot;Gebruiker is verplaatst naar de nieuwe locatie&quot; tabellen</header> <center><tt>relocated_maps</tt></center> <hr> Deze parameter specificeert de optionele tabellen met contact informatie van gebruikers, hosts of domeinen die niet langer bestaan. Bekijk de <a href=relocated>Verplaatste Mapping</a> voor details. <p> Standaard is deze optie uitgeschakeld. <p> Verstandige mogelijke waarde: <tt>hash:/etc/postfix/relocated</tt> <hr>
24
84
0.776316
af40c186fa956e02fd53ceb4b8bc41f0d09a5cb6
619
swift
Swift
Day 14/Optional chaining.playground/Contents.swift
PetroOnishchuk/100-Days-Of-SwiftUI
21d16e893bedc3b1bfa87bd61d54e10b0eaea0ef
[ "MIT" ]
55
2020-01-13T13:34:06.000Z
2022-03-14T22:01:33.000Z
Day 14/Optional chaining.playground/Contents.swift
PetroOnishchuk/100-Days-Of-SwiftUI
21d16e893bedc3b1bfa87bd61d54e10b0eaea0ef
[ "MIT" ]
1
2020-04-09T12:24:04.000Z
2020-04-09T12:25:33.000Z
Day 14/Optional chaining.playground/Contents.swift
PetroOnishchuk/100-Days-Of-SwiftUI
21d16e893bedc3b1bfa87bd61d54e10b0eaea0ef
[ "MIT" ]
7
2020-06-29T11:07:45.000Z
2022-03-18T17:14:24.000Z
import UIKit // Optional chaining func albumReleased(year: Int) -> String? { switch year { case 2006: return "Taylor Swift" case 2008: return "Fearless" case 2010: return "Speak Now" case 2012: return "Red" case 2014: return "1989" default: return nil } } let album = albumReleased(year: 2006) print("The album is \(album)") let str = "Hello world" print(str.uppercased()) let album2 = albumReleased(year: 2006)?.uppercased() print("The album is \(album2)") // The nil coalescing operator let album3 = albumReleased(year: 2006) ?? "unknown" print("The album is \(album3)")
17.194444
52
0.667205
90ad0bad03dd29d5860d4c5c328b1ce5090025fc
12,304
py
Python
PipePyper/PipePyper.py
HongYuzhuang/PipePyper
4da40855b88ce8b8e3b6f97ea639f2e26cf97b50
[ "MIT" ]
null
null
null
PipePyper/PipePyper.py
HongYuzhuang/PipePyper
4da40855b88ce8b8e3b6f97ea639f2e26cf97b50
[ "MIT" ]
null
null
null
PipePyper/PipePyper.py
HongYuzhuang/PipePyper
4da40855b88ce8b8e3b6f97ea639f2e26cf97b50
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on 2019-04-04 15:19:40.729834 @author: 洪宇庄 """ import sys import time import random from functools import partial,reduce from .mytools import parseDate,timeAJ,logger,chainElements import multiprocessing from multiprocessing import Process,Queue,Manager class endSignal(Exception): """ 管道数据结束信号 """ def __str__(self): return 'endSig' class filteredData(Exception): """ 管道数据流过滤 在传入函数内引用 """ pass class pipe(object): def __init__(self,t_func,c_data,cache_size=0,timeout=None,try_Count=10,extract_rate=1): """ timeout ,管道等待超时时长 ot_q ,输出队列 ip_q ,输入队列 s ,source t ,target ps ,process ID try_Count,输出拥塞时重试次数 notice ,是否通知下游任务结束 """ self.t_func=t_func self.name = str(int(random.random()*100)) self.add_logger = 'logger' in t_func.__code__.co_varnames self.c_data=c_data self.timeout=timeout self.ot_q=Queue(cache_size) self.ip_q=Queue(cache_size) self.s=None self.t=None self.ps=None self.logger=None self.warn_queue=None self.try_Count=try_Count self.extract_rate=extract_rate def end(self): return True def pipeLoop(self): """ 循环体 -阻塞等待上游管道结果 -##新增预警:拥塞重传时 若存在 主控器,向主控器报告重传次数 -接受endSignal 结束循环 """ # print('{} started'.format(self)) if self.ps ==None: raise Exception('no actived pipe') self.end_flag=False while(not( self.end_flag and self.ip_q.empty()) ): data=self.ip_q.get(timeout=self.timeout) # self.logger.log('{},{} get : {}'.format(self.__class__,self,data)) if data.__class__ not in ( endSignal,filteredData): if self.extract_rate<1: if random.random()>self.extract_rate: continue if self.add_logger: r=self.t_func(data,**self.c_data,logger=self.logger) else: r=self.t_func(data,**self.c_data) count=0 while(count<self.try_Count): try: self.ot_q.put(r,timeout=self.timeout) # self.logger.log('{},{} put : {}'.format(self.__class__,self,r)) break except Exception: count+=1 if count > (self.try_Count//2): if self.warn_queue !=None: self.warn_queue.put(count) time.sleep((self.timeout*count//10+1)**2) if count==self.try_Count: self.ip_q.put(data) elif data.__class__==filteredData: continue elif data.__class__ == endSignal: self.end_flag =self.end() # self.logger.log('{} ended ,end_flag : {} '.format(self,self.end_flag)) self.ot_q.put(endSignal()) self.ip_q.put(endSignal()) # self.logger.log('{} closed'.format(self)) def __lt__(self,iterable): """ 从管道输入数组 """ if getattr(iterable,'__iter__',None)!=None: for i in iterable: # self.logger.log('input {} into :{} ,'.format(i,self.name)) self.ip_q.put(i) else: raise Exception('insert iterable plz') def __le__(self,iterable): """ 从管道输入数组 追加结束符 """ if self.ps ==None: raise Exception('no actived pipe') iterable>self self.ip_q.put(endSignal()) def __lshift__(self,other): """ 重载 << 运算符,连接前序管道 或者缓冲队列 self<< other """ if isinstance(other,pipe): self.s=other other.t=self self.ip_q=other.ot_q return other elif other.__class__==multiprocessing.queues.Queue: self.ip_q=other return self else: raise Exception('Not Correct PipeLine Format') def __rshift__(self,other): """ 重载 >> 运算符,连接后序管道 或者缓冲队列 self>>other """ if isinstance(other,pipe) : self.t=other other.s=self other.ip_q=self.ot_q return other elif other.__class__==multiprocessing.queues.Queue: self.ot_q=other return self else: raise Exception('Not Correct PipeLine Format') def collect(self,format=list): """ 收集计算结果; log_fin 为真将关闭日志流 """ if self.ps ==None: raise Exception('no actived pipe') if self.t ==None: if format==list: R=[] insert_func=R.append r=None while(r.__class__!=endSignal): try: r=self.ot_q.get(timeout=self.timeout) if r.__class__!=endSignal: insert_func.__call__(r) except Exception: break return R else: return self.t.collect(format) def g_collect(self): ''' 收集计算结果,以生成器方式收集: ''' if self.ps ==None: raise Exception('no actived pipe') if self.t ==None: r=None while(r.__class__!=endSignal): try: r=self.ot_q.get(timeout=self.timeout) if r.__class__!=endSignal: yield r except Exception: break else: return self.t.g_collect(format) def start(self): """ 启动函数,可重载 """ self.ps=Process(target=self.pipeLoop,daemon=True) self.ps.start() def run(self,solo=False): """ 链式启动/ 单管道启动 """ self.start() if not solo: if self.t!=None: if self.t.ps ==None: self.t.run() if self.s!=None: if self.s.ps ==None: self.s.run() return self.ps def __add__(self,other): """ 连接logger """ if isinstance(other,logger): self.logger=other return self else: raise Exception('required a logger') def wait(self,timeout=None): if self.ps ==None: raise Exception('no actived pipe') self.ps.join(timeout) def init(cl,t_func,c_data,cache_size=1000,timeout=None,try_Count=10,extract_rate=1): return cl(t_func,c_data,cache_size,timeout,try_Count,extract_rate) class cumPipe(pipe): def __init__(self,*args,**wargs): super(self.__class__,self).__init__(*args,**wargs) self.cum={} def end(self): self.ip_q.put(endSignal()) self.ot_q.put(endSignal()) raise Exception('closs pipe') def pipeLoop(self): """ 循环体 -阻塞等待上游管道结果 -##新增预警:拥塞重传时 若存在 主控器,向主控器报告重传次数 -接受endSignal 结束循环 """ if self.ps ==None: raise Exception('no actived pipe') while(True): data=self.ip_q.get() # if data==None: # continue if data.__class__ not in (endSignal,filteredData): if self.extract_rate<1: if random.random()>self.extract_rate: continue self.t_func(data,**self.c_data,logger=self.logger,cum=self.cum) elif data.__class__==filteredData: continue elif data.__class__==endSignal: # self.ot_q.put(self.cum,timeout=self.timeout) try: self.end() except Exception: break class PipeSet(pipe): """ 管道子类 :管道组 -- 替换单个管道使用 """ def __init__(self,t_func,c_data,p_num,cache_size=1000000,timeout=None,try_Count=10,extract_rate=1,static_val=1000,static=False,cum=False): """ --调用父类构造函数 --pipes : 初始化一组管道 # """ # print(static) self.extract_rate=extract_rate super(self.__class__,self).__init__(t_func,c_data,cache_size=cache_size,timeout=timeout,try_Count=try_Count,extract_rate=self.extract_rate) self.genPipe=partial(pipe.init,cl=(cumPipe if cum else pipe),t_func=t_func,c_data=c_data,cache_size=cache_size,timeout=timeout,try_Count=try_Count,extract_rate=extract_rate) self.static_val=static_val self.p_num=p_num self.pipes=[self.genPipe() for i in range(p_num)] # print((cumPipe if cum else pipe)) self.adapter=adapter(self,static) self.ot_q=self.adapter.ot_q # def bind(self): for p in self.pipes: self.bind_one(p) def bind_one(self,p): """ 绑定输入输出 绑定logger """ p<<self.ip_q p>>self.adapter.ip_q if self.logger: p+self.logger self.adapter+self.logger return p def start(self): self.bind() self.ps=[i.run() for i in self.pipes] self.adapter.run() class adapter(pipe): def lineFunc(self,ip,logger=None): r=ip if self.static: self.processed_num+=1 if self.processed_num%self.static_val==0: ot=self.lt self.lt=time.time() if logger: logger.log( "pv : {}/s" .format(self.static_val/(self.lt-ot))) return r def __init__(self,pipeset,static=True): super(self.__class__,self).__init__(t_func=self.lineFunc,c_data={},cache_size=0,timeout=None) self.pipeset=pipeset self.check_count=0 self.processed_num=0 self.p_num=pipeset.p_num self.ip_q=pipeset.ot_q self.pv_ip_q=pipeset.ip_q self.static_val=self.pipeset.static_val self.lt=time.time() self.static=static def end(self): self.check_count+=1 if self.logger!=None: self.logger.log(' {}/{}'.format(self.check_count,self.p_num)) if self.check_count>=self.p_num: return True else: return False def mem_db(): return Manager().dict() class multiFunc_wrapper(object): def wrapper(self,*args,name=None,logger=None,**kwargs): res=self.func(*args,**kwargs) return res def __call__(self,func): self.func=func return self.wrapper from itertools import groupby class simple_logger(logger): def __init__(self,*args,**kwargs): pass def log(self,msg): print(msg) def sort_and_groupby(I,key): return groupby(sorted(I,key=key),key=key) def ft_timer(logger,val): def kwrapper(func): def warpper(*args,**wargs): time_s=time.time() r=func(*args,**wargs) time_e=time.time() df = time_e-time_s if df>val: logger.log('costs :{} '.format(df)) return r return warpper return kwrapper def shards(ITER,shard_size): tmp_pack = [] for I in ITER: if len(tmp_pack)<shard_size: tmp_pack.append(I) else: yield tmp_pack tmp_pack=[] if tmp_pack: yield tmp_pack class reversePipe(object): def __init__(self,pipe,lg=None): self.pipe=pipe self.func=None self.tlg= ft_timer(simple_logger(),0.01) self.lg = lg if lg else simple_logger() def sort_and_groupby(self,key): return reversePipe(sort_and_groupby(iter(self),key=key),self.lg) def shardby(self,size): return reversePipe(shards(iter(self),shard_size= size),self.lg ) def show(self): def s(data): print(data) return data return self.map(s) def zip(self,Iter): return reversePipe(zip(iter(self),Iter),self.lg) def enumerate(self): return reversePipe(enumerate(iter(self),self.lg)) def tm_map(self,func): return reversePipe(map(lambda x:self.tlg(func)(x),iter(self)),self.lg) def map(self,func): return reversePipe(map(lambda x:func(x),iter(self)),self.lg) def mp_map(self,func,num=10,c_data ={},cum=False,**kwargs): ''' 多进程 ''' # print(kwargs) self.func=func ps = PipeSet(self.func,c_data,num,timeout=None,cum=cum,**kwargs)+(self.lg if self.lg else simple_logger()) # ps.run() return mp_reverse_pipe(ps,self,self.lg) def filter(self,func): return reversePipe(filter(lambda x:func(x),iter(self)),self.lg) def reduce(self,func,init=None): if init: res= reduce(func,iter(self),init) else: res= reduce(func,iter(self)) if getattr(res,'__iter__',None)==None: res= [res] # else: return reversePipe(res,self.lg) def __iter__(self): # print(self.pipe) return self.pipe.__iter__() # else: # return self.pipe def collect(self): return list(self) def chainElements(self,p_level): return reversePipe(chainElements(iter(self),p_level) ,self.lg) def sort(self,key,reverse=True): return reversePipe(sorted(iter(self),key=key,reverse=reverse),self.lg) def activate(self): pass class mp_reverse_pipe(reversePipe): def __init__(self,ps,src=None,lg=None): self.pipe=ps self.src=src self.lg= lg if lg else simple_logger() def activate(self): self.pipe.run(solo=True) # time.sleep(1) if isinstance(self.src,reversePipe): self.src.activate() if self.src.__class__!=mp_reverse_pipe : self.src.pipe >= self.pipe # else: # print(self) # print(self.src) def mp_map(self,func,num,c_data={},cum=False,**kwargs): ''' 多进程 ''' # print(kwargs) self.func=func ps = PipeSet(self.func,c_data,num,timeout=None,cum=cum,**kwargs)+(self.lg if self.lg else simple_logger()) # ps.run() self.pipe>>ps # print('connect!') return mp_reverse_pipe(ps,self,self.lg) def __iter__(self): # print(self.pipe) print('fully connected') self.activate() return self.pipe.g_collect() if __name__=="__main__": # log=logger().start() Test={} cp=cumPipe(test,{'cum':Test}) cp.run() range(10)>=cp r=cp.collect() print(r)
23.525813
176
0.648244
9e80c7100ef750945ba7d9168a27ac7d69dbebb9
2,599
rs
Rust
src/keys/x25519.rs
fossabot/crypto.rs
58b4fd50b32e6e2f929530d03fbb1b5f6d4d87e3
[ "Apache-2.0" ]
null
null
null
src/keys/x25519.rs
fossabot/crypto.rs
58b4fd50b32e6e2f929530d03fbb1b5f6d4d87e3
[ "Apache-2.0" ]
null
null
null
src/keys/x25519.rs
fossabot/crypto.rs
58b4fd50b32e6e2f929530d03fbb1b5f6d4d87e3
[ "Apache-2.0" ]
null
null
null
// Copyright 2021 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 // https://tools.ietf.org/html/rfc7748 // https://cr.yp.to/ecdh/curve25519-20060209.pdf // nomenclature compromise: // RFC7748 Bernstein's 2006 paper // scalar/u secret/public // X25519 Curve25519 use core::convert::TryInto; pub const PUBLIC_KEY_LEN: usize = 32; pub const SECRET_KEY_LEN: usize = 32; /// An X25519 Shared Secret - the result of a Diffie-Hellman key exchange. /// /// Each party computes this from an (ephemeral) [`SecretKey`] and their counterparty's [`PublicKey`]. pub type SharedSecret = x25519_dalek::SharedSecret; /// An X25519 Public Key pub struct PublicKey(x25519_dalek::PublicKey); impl PublicKey { /// Load a [`PublicKey`] from a slice of bytes. pub fn from_bytes(bytes: &[u8]) -> crate::Result<Self> { let array: [u8; PUBLIC_KEY_LEN] = bytes.try_into().map_err(|_| crate::Error::ConvertError { from: "bytes", to: "X25519 Public Key", })?; Ok(Self(array.into())) } /// Returns the [`PublicKey`] as an array of bytes. pub fn to_bytes(&self) -> [u8; PUBLIC_KEY_LEN] { self.0.to_bytes() } /// Returns the [`PublicKey`] as a slice of bytes. pub fn as_bytes(&self) -> &[u8] { self.0.as_bytes() } } /// An X25519 Secret Key pub struct SecretKey(x25519_dalek::StaticSecret); impl SecretKey { /// Generate a new random [`SecretKey`]. #[cfg(feature = "random")] #[cfg_attr(docsrs, doc(cfg(feature = "random")))] pub fn generate() -> crate::Result<Self> { let mut bytes: [u8; SECRET_KEY_LEN] = [0; SECRET_KEY_LEN]; crate::utils::rand::fill(&mut bytes[..])?; Self::from_bytes(&bytes[..]) } /// Load a [`SecretKey`] from a slice of bytes. pub fn from_bytes(bytes: &[u8]) -> crate::Result<Self> { let array: [u8; SECRET_KEY_LEN] = bytes.try_into().map_err(|_| crate::Error::ConvertError { from: "bytes", to: "X25519 Secret Key", })?; Ok(Self(array.into())) } /// Returns the [`SecretKey`] as an array of bytes. pub fn to_bytes(&self) -> [u8; SECRET_KEY_LEN] { self.0.to_bytes() } /// Returns the [`PublicKey`] which corresponds to this [`SecretKey`]. pub fn public_key(&self) -> PublicKey { PublicKey((&self.0).into()) } /// Computes the Diffie-Hellman [`SharedSecret`] from the [`SecretKey`] and the given [`PublicKey`]. pub fn diffie_hellman(&self, public: &PublicKey) -> SharedSecret { self.0.diffie_hellman(&public.0) } }
29.873563
104
0.619469
8791d9ab2bf4d9f1c11497719fc233b77c410c7b
86,232
html
HTML
mutation_results-DEFAULTS/empire-db/empire-db-org.apache.empire.db.DBCommandTest/202008121241/org.apache.empire.db.expr.column/DBAliasExpr.java.html
dormaayan/mutation-analysis
cf57477e45a4e51a528eae0de9facd181577f087
[ "MIT" ]
null
null
null
mutation_results-DEFAULTS/empire-db/empire-db-org.apache.empire.db.DBCommandTest/202008121241/org.apache.empire.db.expr.column/DBAliasExpr.java.html
dormaayan/mutation-analysis
cf57477e45a4e51a528eae0de9facd181577f087
[ "MIT" ]
null
null
null
mutation_results-DEFAULTS/empire-db/empire-db-org.apache.empire.db.DBCommandTest/202008121241/org.apache.empire.db.expr.column/DBAliasExpr.java.html
dormaayan/mutation-analysis
cf57477e45a4e51a528eae0de9facd181577f087
[ "MIT" ]
null
null
null
<!DOCTYPE html> <html> <head> <link rel="stylesheet" type="text/css" href="../style.css"> </head> <body> <h1>DBAliasExpr.java</h1> <table class="src"> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_1'/> 1 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_1'></a> <span> </span> </span> </td> <td class=''><pre><span class=''>/*</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_2'/> 2 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_2'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * Licensed to the Apache Software Foundation (ASF) under one</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_3'/> 3 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_3'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * or more contributor license agreements. See the NOTICE file</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_4'/> 4 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_4'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * distributed with this work for additional information</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_5'/> 5 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_5'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * regarding copyright ownership. The ASF licenses this file</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_6'/> 6 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_6'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * to you under the Apache License, Version 2.0 (the</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_7'/> 7 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_7'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * &#34;License&#34;); you may not use this file except in compliance</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_8'/> 8 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_8'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * with the License. You may obtain a copy of the License at</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_9'/> 9 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_9'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> *</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_10'/> 10 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_10'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * http://www.apache.org/licenses/LICENSE-2.0</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_11'/> 11 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_11'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> *</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_12'/> 12 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_12'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * Unless required by applicable law or agreed to in writing,</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_13'/> 13 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_13'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * software distributed under the License is distributed on an</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_14'/> 14 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_14'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * &#34;AS IS&#34; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_15'/> 15 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_15'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * KIND, either express or implied. See the License for the</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_16'/> 16 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_16'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * specific language governing permissions and limitations</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_17'/> 17 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_17'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * under the License.</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_18'/> 18 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_18'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> */</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_19'/> 19 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_19'></a> <span> </span> </span> </td> <td class=''><pre><span class=''>package org.apache.empire.db.expr.column;</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_20'/> 20 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_20'></a> <span> </span> </span> </td> <td class=''><pre><span class=''></span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_21'/> 21 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_21'></a> <span> </span> </span> </td> <td class=''><pre><span class=''>// Java</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_22'/> 22 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_22'></a> <span> </span> </span> </td> <td class=''><pre><span class=''>import org.apache.empire.commons.StringUtils;</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_23'/> 23 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_23'></a> <span> </span> </span> </td> <td class=''><pre><span class=''>import org.apache.empire.data.DataType;</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_24'/> 24 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_24'></a> <span> </span> </span> </td> <td class=''><pre><span class=''>import org.apache.empire.db.DBColumn;</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_25'/> 25 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_25'></a> <span> </span> </span> </td> <td class=''><pre><span class=''>import org.apache.empire.db.DBColumnExpr;</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_26'/> 26 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_26'></a> <span> </span> </span> </td> <td class=''><pre><span class=''>import org.apache.empire.db.DBDatabase;</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_27'/> 27 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_27'></a> <span> </span> </span> </td> <td class=''><pre><span class=''>import org.apache.empire.db.DBDatabaseDriver;</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_28'/> 28 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_28'></a> <span> </span> </span> </td> <td class=''><pre><span class=''>import org.w3c.dom.Element;</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_29'/> 29 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_29'></a> <span> </span> </span> </td> <td class=''><pre><span class=''></span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_30'/> 30 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_30'></a> <span> </span> </span> </td> <td class=''><pre><span class=''>import java.util.Set;</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_31'/> 31 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_31'></a> <span> </span> </span> </td> <td class=''><pre><span class=''></span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_32'/> 32 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_32'></a> <span> </span> </span> </td> <td class=''><pre><span class=''>// XML</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_33'/> 33 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_33'></a> <span> </span> </span> </td> <td class=''><pre><span class=''></span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_34'/> 34 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_34'></a> <span> </span> </span> </td> <td class=''><pre><span class=''></span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_35'/> 35 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_35'></a> <span> </span> </span> </td> <td class=''><pre><span class=''>/**</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_36'/> 36 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_36'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * This class allows column renaming in SQL.</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_37'/> 37 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_37'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * &#60;P&#62;</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_38'/> 38 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_38'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * There is no need to explicitly create instances of this class.&#60;BR&#62;</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_39'/> 39 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_39'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * Instead use {@link DBColumnExpr#as(String) }</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_40'/> 40 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_40'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * &#60;P&#62;</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_41'/> 41 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_41'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> */</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_42'/> 42 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_42'></a> <span> </span> </span> </td> <td class=''><pre><span class=''>public class DBAliasExpr extends DBColumnExpr</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_43'/> 43 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_43'></a> <span> </span> </span> </td> <td class=''><pre><span class=''>{</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_44'/> 44 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_44'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> private final static long serialVersionUID = 1L;</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_45'/> 45 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_45'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> </span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_46'/> 46 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_46'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> private final DBColumnExpr expr;</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_47'/> 47 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_47'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> private final String alias;</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_48'/> 48 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_48'></a> <span> </span> </span> </td> <td class=''><pre><span class=''></span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_49'/> 49 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_49'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> /**</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_50'/> 50 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_50'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * Constructs a DBAliasExpr object combine the DBColumnExpr object with the alias name.</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_51'/> 51 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_51'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> *</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_52'/> 52 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_52'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * @param expr an DBColumnExpr object, one column</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_53'/> 53 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_53'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * @param alias the alias name of the column</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_54'/> 54 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_54'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> */</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_55'/> 55 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_55'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> public DBAliasExpr(DBColumnExpr expr, String alias)</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_56'/> 56 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_56'></a> <span> </span> </span> </td> <td class='uncovered'><pre><span class=''> {</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_57'/> 57 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_57'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> // Check whether already a AliasExpr</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_58'/> 58 </td> <td class='survived'> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_58'>1</a> <span> 1. &#60;init&#62; : negated conditional &rarr; NO_COVERAGE<br/> </span> </span> </td> <td class='uncovered'><pre><span class='survived'> if (expr.getClass().equals(getClass()))</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_59'/> 59 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_59'></a> <span> </span> </span> </td> <td class='uncovered'><pre><span class=''> this.expr = ((DBAliasExpr) expr).expr;</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_60'/> 60 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_60'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> else</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_61'/> 61 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_61'></a> <span> </span> </span> </td> <td class='uncovered'><pre><span class=''> this.expr = expr;</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_62'/> 62 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_62'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> // Set alias name</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_63'/> 63 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_63'></a> <span> </span> </span> </td> <td class='uncovered'><pre><span class=''> this.alias = alias; // .toUpperCase() Why?;</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_64'/> 64 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_64'></a> <span> </span> </span> </td> <td class='uncovered'><pre><span class=''> }</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_65'/> 65 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_65'></a> <span> </span> </span> </td> <td class=''><pre><span class=''></span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_66'/> 66 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_66'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> /**</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_67'/> 67 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_67'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * Returns the current DBDatabase object.</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_68'/> 68 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_68'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> *</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_69'/> 69 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_69'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * @return the current DBDatabase object</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_70'/> 70 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_70'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> */</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_71'/> 71 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_71'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> @Override</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_72'/> 72 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_72'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> public DBDatabase getDatabase()</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_73'/> 73 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_73'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> {</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_74'/> 74 </td> <td class='survived'> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_74'>1</a> <span> 1. getDatabase : replaced return value with null for org/apache/empire/db/expr/column/DBAliasExpr::getDatabase &rarr; NO_COVERAGE<br/> </span> </span> </td> <td class='uncovered'><pre><span class='survived'> return expr.getDatabase();</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_75'/> 75 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_75'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> }</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_76'/> 76 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_76'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> </span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_77'/> 77 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_77'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> /**</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_78'/> 78 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_78'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * Returns the data type of the DBColumnExpr object.</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_79'/> 79 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_79'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> *</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_80'/> 80 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_80'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * @return the data type</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_81'/> 81 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_81'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> */</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_82'/> 82 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_82'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> @Override</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_83'/> 83 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_83'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> public DataType getDataType()</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_84'/> 84 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_84'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> {</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_85'/> 85 </td> <td class='survived'> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_85'>1</a> <span> 1. getDataType : replaced return value with null for org/apache/empire/db/expr/column/DBAliasExpr::getDataType &rarr; NO_COVERAGE<br/> </span> </span> </td> <td class='uncovered'><pre><span class='survived'> return expr.getDataType();</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_86'/> 86 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_86'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> }</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_87'/> 87 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_87'></a> <span> </span> </span> </td> <td class=''><pre><span class=''></span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_88'/> 88 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_88'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> /**</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_89'/> 89 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_89'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * This helper function returns the alias name.</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_90'/> 90 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_90'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> *</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_91'/> 91 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_91'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * @return the alias name</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_92'/> 92 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_92'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> */</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_93'/> 93 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_93'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> @Override</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_94'/> 94 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_94'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> public String getName()</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_95'/> 95 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_95'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> {</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_96'/> 96 </td> <td class='survived'> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_96'>1</a> <span> 1. getName : replaced return value with &#34;&#34; for org/apache/empire/db/expr/column/DBAliasExpr::getName &rarr; NO_COVERAGE<br/> </span> </span> </td> <td class='uncovered'><pre><span class='survived'> return alias;</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_97'/> 97 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_97'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> }</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_98'/> 98 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_98'></a> <span> </span> </span> </td> <td class=''><pre><span class=''></span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_99'/> 99 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_99'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> /**</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_100'/> 100 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_100'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * This helper function returns the underlying column expression.</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_101'/> 101 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_101'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> *</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_102'/> 102 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_102'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * @return the underlying column expression</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_103'/> 103 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_103'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> */</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_104'/> 104 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_104'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> public DBColumnExpr getExpr()</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_105'/> 105 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_105'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> {</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_106'/> 106 </td> <td class='survived'> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_106'>1</a> <span> 1. getExpr : replaced return value with null for org/apache/empire/db/expr/column/DBAliasExpr::getExpr &rarr; NO_COVERAGE<br/> </span> </span> </td> <td class='uncovered'><pre><span class='survived'> return expr;</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_107'/> 107 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_107'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> }</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_108'/> 108 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_108'></a> <span> </span> </span> </td> <td class=''><pre><span class=''></span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_109'/> 109 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_109'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> /**</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_110'/> 110 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_110'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * This function set the alias name to the XML tag.</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_111'/> 111 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_111'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> *</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_112'/> 112 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_112'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * @return the XML tag (with the alias name)</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_113'/> 113 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_113'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> */</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_114'/> 114 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_114'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> @Override</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_115'/> 115 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_115'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> public Element addXml(Element parent, long flags)</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_116'/> 116 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_116'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> { // Set name to Alias</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_117'/> 117 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_117'></a> <span> </span> </span> </td> <td class='uncovered'><pre><span class=''> Element field = expr.addXml(parent, flags);</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_118'/> 118 </td> <td class='survived'> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_118'>1</a> <span> 1. addXml : negated conditional &rarr; NO_COVERAGE<br/> </span> </span> </td> <td class='uncovered'><pre><span class='survived'> if (field != null)</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_119'/> 119 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_119'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> { // Set Name</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_120'/> 120 </td> <td class='survived'> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_120'>1</a> <span> 1. addXml : negated conditional &rarr; NO_COVERAGE<br/> </span> </span> </td> <td class='uncovered'><pre><span class='survived'> if (field.hasAttribute(&#34;name&#34;))</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_121'/> 121 </td> <td class='survived'> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_121'>1</a> <span> 1. addXml : removed call to org/w3c/dom/Element::setAttribute &rarr; NO_COVERAGE<br/> </span> </span> </td> <td class='uncovered'><pre><span class='survived'> field.setAttribute(&#34;source&#34;, StringUtils.toString(field.getAttribute(&#34;name&#34;)));</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_122'/> 122 </td> <td class='survived'> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_122'>1</a> <span> 1. addXml : removed call to org/w3c/dom/Element::setAttribute &rarr; NO_COVERAGE<br/> </span> </span> </td> <td class='uncovered'><pre><span class='survived'> field.setAttribute(&#34;name&#34;, alias);</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_123'/> 123 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_123'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> }</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_124'/> 124 </td> <td class='survived'> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_124'>1</a> <span> 1. addXml : replaced return value with null for org/apache/empire/db/expr/column/DBAliasExpr::addXml &rarr; NO_COVERAGE<br/> </span> </span> </td> <td class='uncovered'><pre><span class='survived'> return field;</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_125'/> 125 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_125'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> }</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_126'/> 126 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_126'></a> <span> </span> </span> </td> <td class=''><pre><span class=''></span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_127'/> 127 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_127'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> /**</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_128'/> 128 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_128'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * Returns the DBColunm object.</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_129'/> 129 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_129'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> *</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_130'/> 130 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_130'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * @return the DBColunm object</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_131'/> 131 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_131'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> */</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_132'/> 132 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_132'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> @Override</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_133'/> 133 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_133'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> public DBColumn getUpdateColumn()</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_134'/> 134 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_134'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> {</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_135'/> 135 </td> <td class='survived'> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_135'>1</a> <span> 1. getUpdateColumn : replaced return value with null for org/apache/empire/db/expr/column/DBAliasExpr::getUpdateColumn &rarr; NO_COVERAGE<br/> </span> </span> </td> <td class='uncovered'><pre><span class='survived'> return expr.getUpdateColumn();</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_136'/> 136 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_136'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> }</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_137'/> 137 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_137'></a> <span> </span> </span> </td> <td class=''><pre><span class=''></span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_138'/> 138 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_138'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> /**</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_139'/> 139 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_139'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * Forward to expression</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_140'/> 140 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_140'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> *</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_141'/> 141 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_141'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * @return false</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_142'/> 142 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_142'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> */</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_143'/> 143 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_143'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> @Override</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_144'/> 144 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_144'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> public boolean isAggregate()</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_145'/> 145 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_145'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> {</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_146'/> 146 </td> <td class='survived'> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_146'>2</a> <span> 1. isAggregate : replaced boolean return with false for org/apache/empire/db/expr/column/DBAliasExpr::isAggregate &rarr; NO_COVERAGE<br/> 2. isAggregate : replaced boolean return with true for org/apache/empire/db/expr/column/DBAliasExpr::isAggregate &rarr; NO_COVERAGE<br/> </span> </span> </td> <td class='uncovered'><pre><span class='survived'> return expr.isAggregate();</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_147'/> 147 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_147'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> }</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_148'/> 148 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_148'></a> <span> </span> </span> </td> <td class=''><pre><span class=''></span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_149'/> 149 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_149'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> /**</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_150'/> 150 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_150'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * @see org.apache.empire.db.DBExpr#addReferencedColumns(Set)</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_151'/> 151 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_151'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> */</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_152'/> 152 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_152'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> @Override</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_153'/> 153 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_153'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> public void addReferencedColumns(Set&#60;DBColumn&#62; list)</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_154'/> 154 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_154'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> {</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_155'/> 155 </td> <td class='survived'> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_155'>1</a> <span> 1. addReferencedColumns : removed call to org/apache/empire/db/DBColumnExpr::addReferencedColumns &rarr; NO_COVERAGE<br/> </span> </span> </td> <td class='uncovered'><pre><span class='survived'> expr.addReferencedColumns(list);</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_156'/> 156 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_156'></a> <span> </span> </span> </td> <td class='uncovered'><pre><span class=''> }</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_157'/> 157 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_157'></a> <span> </span> </span> </td> <td class=''><pre><span class=''></span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_158'/> 158 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_158'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> /**</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_159'/> 159 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_159'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * Creates the SQL-Command adds the alias name to the SQL-Command.</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_160'/> 160 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_160'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> *</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_161'/> 161 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_161'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * @param buf the SQL statment</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_162'/> 162 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_162'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * @param context the current SQL-Command context</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_163'/> 163 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_163'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> */</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_164'/> 164 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_164'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> @Override</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_165'/> 165 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_165'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> public void addSQL(StringBuilder buf, long context)</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_166'/> 166 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_166'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> { // Append alias</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_167'/> 167 </td> <td class='survived'> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_167'>2</a> <span> 1. addSQL : Replaced bitwise AND with OR &rarr; NO_COVERAGE<br/> 2. addSQL : negated conditional &rarr; NO_COVERAGE<br/> </span> </span> </td> <td class='uncovered'><pre><span class='survived'> if((context &#38; CTX_ALIAS)!=0)</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_168'/> 168 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_168'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> { // Add the column expression</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_169'/> 169 </td> <td class='survived'> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_169'>1</a> <span> 1. addSQL : removed call to org/apache/empire/db/DBColumnExpr::addSQL &rarr; NO_COVERAGE<br/> </span> </span> </td> <td class='uncovered'><pre><span class='survived'> expr.addSQL(buf, context);</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_170'/> 170 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_170'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> // Rename</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_171'/> 171 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_171'></a> <span> </span> </span> </td> <td class='uncovered'><pre><span class=''> DBDatabaseDriver driver = getDatabase().getDriver();</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_172'/> 172 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_172'></a> <span> </span> </span> </td> <td class='uncovered'><pre><span class=''> String asExpr = driver.getSQLPhrase(DBDatabaseDriver.SQL_RENAME_COLUMN);</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_173'/> 173 </td> <td class='survived'> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_173'>1</a> <span> 1. addSQL : negated conditional &rarr; NO_COVERAGE<br/> </span> </span> </td> <td class='uncovered'><pre><span class='survived'> if (asExpr!=null)</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_174'/> 174 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_174'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> {</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_175'/> 175 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_175'></a> <span> </span> </span> </td> <td class='uncovered'><pre><span class=''> buf.append(asExpr);</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_176'/> 176 </td> <td class='survived'> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_176'>1</a> <span> 1. addSQL : removed call to org/apache/empire/db/DBDatabaseDriver::appendElementName &rarr; NO_COVERAGE<br/> </span> </span> </td> <td class='uncovered'><pre><span class='survived'> driver.appendElementName(buf, alias);</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_177'/> 177 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_177'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> }</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_178'/> 178 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_178'></a> <span> </span> </span> </td> <td class='uncovered'><pre><span class=''> } </span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_179'/> 179 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_179'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> else</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_180'/> 180 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_180'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> {</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_181'/> 181 </td> <td class='survived'> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_181'>1</a> <span> 1. addSQL : removed call to org/apache/empire/db/DBColumnExpr::addSQL &rarr; NO_COVERAGE<br/> </span> </span> </td> <td class='uncovered'><pre><span class='survived'> expr.addSQL(buf, context);</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_182'/> 182 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_182'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> }</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_183'/> 183 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_183'></a> <span> </span> </span> </td> <td class='uncovered'><pre><span class=''> }</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_184'/> 184 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_184'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> </span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_185'/> 185 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_185'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> /**</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_186'/> 186 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_186'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * Overrides the equals method</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_187'/> 187 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_187'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * </span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_188'/> 188 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_188'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * @return true if alias name and expression match</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_189'/> 189 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_189'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> */</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_190'/> 190 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_190'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> @Override</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_191'/> 191 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_191'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> public boolean equals(Object other)</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_192'/> 192 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_192'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> {</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_193'/> 193 </td> <td class='survived'> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_193'>1</a> <span> 1. equals : negated conditional &rarr; NO_COVERAGE<br/> </span> </span> </td> <td class='uncovered'><pre><span class='survived'> if (super.equals(other))</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_194'/> 194 </td> <td class='survived'> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_194'>1</a> <span> 1. equals : replaced boolean return with false for org/apache/empire/db/expr/column/DBAliasExpr::equals &rarr; NO_COVERAGE<br/> </span> </span> </td> <td class='uncovered'><pre><span class='survived'> return true;</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_195'/> 195 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_195'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> // Check for another Alias Expression</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_196'/> 196 </td> <td class='survived'> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_196'>1</a> <span> 1. equals : negated conditional &rarr; NO_COVERAGE<br/> </span> </span> </td> <td class='uncovered'><pre><span class='survived'> if (other instanceof DBAliasExpr)</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_197'/> 197 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_197'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> { // Compare with another alias expression</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_198'/> 198 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_198'></a> <span> </span> </span> </td> <td class='uncovered'><pre><span class=''> DBAliasExpr otherExpr = ((DBAliasExpr)other);</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_199'/> 199 </td> <td class='survived'> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_199'>2</a> <span> 1. equals : replaced boolean return with true for org/apache/empire/db/expr/column/DBAliasExpr::equals &rarr; NO_COVERAGE<br/> 2. equals : negated conditional &rarr; NO_COVERAGE<br/> </span> </span> </td> <td class='uncovered'><pre><span class='survived'> return this.alias.equalsIgnoreCase(otherExpr.getName()) &#38;&#38;</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_200'/> 200 </td> <td class='survived'> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_200'>1</a> <span> 1. equals : negated conditional &rarr; NO_COVERAGE<br/> </span> </span> </td> <td class='uncovered'><pre><span class='survived'> this.expr.equals(otherExpr.getExpr());</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_201'/> 201 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_201'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> }</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_202'/> 202 </td> <td class='survived'> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_202'>1</a> <span> 1. equals : replaced boolean return with true for org/apache/empire/db/expr/column/DBAliasExpr::equals &rarr; NO_COVERAGE<br/> </span> </span> </td> <td class='uncovered'><pre><span class='survived'> return false;</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_203'/> 203 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_203'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> }</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_204'/> 204 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_204'></a> <span> </span> </span> </td> <td class=''><pre><span class=''></span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_205'/> 205 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_205'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> /**</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_206'/> 206 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_206'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * Overrides the toString method.</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_207'/> 207 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_207'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> *</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_208'/> 208 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_208'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> * @return the alias name</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_209'/> 209 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_209'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> */</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_210'/> 210 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_210'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> @Override</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_211'/> 211 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_211'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> public String toString()</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_212'/> 212 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_212'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> {</span></pre></td></tr> <tr> <td class='uncovered'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_213'/> 213 </td> <td class='survived'> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_213'>1</a> <span> 1. toString : replaced return value with &#34;&#34; for org/apache/empire/db/expr/column/DBAliasExpr::toString &rarr; NO_COVERAGE<br/> </span> </span> </td> <td class='uncovered'><pre><span class='survived'> return alias;</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_214'/> 214 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_214'></a> <span> </span> </span> </td> <td class=''><pre><span class=''> }</span></pre></td></tr> <tr> <td class='na'> <a name='org.pitest.mutationtest.report.html.SourceFile@c9a71ac_215'/> 215 </td> <td class=''> <span class='pop'> <a href='#grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_215'></a> <span> </span> </span> </td> <td class=''><pre><span class=''>}</span></pre></td></tr> <tr><td></td><td></td><td><h2>Mutations</h2></td></tr> <tr> <td><a href='#org.pitest.mutationtest.report.html.SourceFile@c9a71ac_58'>58</a></td> <td></td> <td> <a name='grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_58'/> <p class='NO_COVERAGE'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>&#60;init&#62;<br/><b>Killed by : </b>none</span></span> negated conditional &rarr; NO_COVERAGE</p> </td> </tr> <tr> <td><a href='#org.pitest.mutationtest.report.html.SourceFile@c9a71ac_74'>74</a></td> <td></td> <td> <a name='grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_74'/> <p class='NO_COVERAGE'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>getDatabase<br/><b>Killed by : </b>none</span></span> replaced return value with null for org/apache/empire/db/expr/column/DBAliasExpr::getDatabase &rarr; NO_COVERAGE</p> </td> </tr> <tr> <td><a href='#org.pitest.mutationtest.report.html.SourceFile@c9a71ac_85'>85</a></td> <td></td> <td> <a name='grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_85'/> <p class='NO_COVERAGE'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>getDataType<br/><b>Killed by : </b>none</span></span> replaced return value with null for org/apache/empire/db/expr/column/DBAliasExpr::getDataType &rarr; NO_COVERAGE</p> </td> </tr> <tr> <td><a href='#org.pitest.mutationtest.report.html.SourceFile@c9a71ac_96'>96</a></td> <td></td> <td> <a name='grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_96'/> <p class='NO_COVERAGE'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>getName<br/><b>Killed by : </b>none</span></span> replaced return value with &#34;&#34; for org/apache/empire/db/expr/column/DBAliasExpr::getName &rarr; NO_COVERAGE</p> </td> </tr> <tr> <td><a href='#org.pitest.mutationtest.report.html.SourceFile@c9a71ac_106'>106</a></td> <td></td> <td> <a name='grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_106'/> <p class='NO_COVERAGE'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>getExpr<br/><b>Killed by : </b>none</span></span> replaced return value with null for org/apache/empire/db/expr/column/DBAliasExpr::getExpr &rarr; NO_COVERAGE</p> </td> </tr> <tr> <td><a href='#org.pitest.mutationtest.report.html.SourceFile@c9a71ac_118'>118</a></td> <td></td> <td> <a name='grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_118'/> <p class='NO_COVERAGE'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>addXml<br/><b>Killed by : </b>none</span></span> negated conditional &rarr; NO_COVERAGE</p> </td> </tr> <tr> <td><a href='#org.pitest.mutationtest.report.html.SourceFile@c9a71ac_120'>120</a></td> <td></td> <td> <a name='grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_120'/> <p class='NO_COVERAGE'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>addXml<br/><b>Killed by : </b>none</span></span> negated conditional &rarr; NO_COVERAGE</p> </td> </tr> <tr> <td><a href='#org.pitest.mutationtest.report.html.SourceFile@c9a71ac_121'>121</a></td> <td></td> <td> <a name='grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_121'/> <p class='NO_COVERAGE'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>addXml<br/><b>Killed by : </b>none</span></span> removed call to org/w3c/dom/Element::setAttribute &rarr; NO_COVERAGE</p> </td> </tr> <tr> <td><a href='#org.pitest.mutationtest.report.html.SourceFile@c9a71ac_122'>122</a></td> <td></td> <td> <a name='grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_122'/> <p class='NO_COVERAGE'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>addXml<br/><b>Killed by : </b>none</span></span> removed call to org/w3c/dom/Element::setAttribute &rarr; NO_COVERAGE</p> </td> </tr> <tr> <td><a href='#org.pitest.mutationtest.report.html.SourceFile@c9a71ac_124'>124</a></td> <td></td> <td> <a name='grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_124'/> <p class='NO_COVERAGE'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>addXml<br/><b>Killed by : </b>none</span></span> replaced return value with null for org/apache/empire/db/expr/column/DBAliasExpr::addXml &rarr; NO_COVERAGE</p> </td> </tr> <tr> <td><a href='#org.pitest.mutationtest.report.html.SourceFile@c9a71ac_135'>135</a></td> <td></td> <td> <a name='grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_135'/> <p class='NO_COVERAGE'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>getUpdateColumn<br/><b>Killed by : </b>none</span></span> replaced return value with null for org/apache/empire/db/expr/column/DBAliasExpr::getUpdateColumn &rarr; NO_COVERAGE</p> </td> </tr> <tr> <td><a href='#org.pitest.mutationtest.report.html.SourceFile@c9a71ac_146'>146</a></td> <td></td> <td> <a name='grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_146'/> <p class='NO_COVERAGE'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>isAggregate<br/><b>Killed by : </b>none</span></span> replaced boolean return with false for org/apache/empire/db/expr/column/DBAliasExpr::isAggregate &rarr; NO_COVERAGE</p> <p class='NO_COVERAGE'><span class='pop'>2.<span><b>2</b><br/><b>Location : </b>isAggregate<br/><b>Killed by : </b>none</span></span> replaced boolean return with true for org/apache/empire/db/expr/column/DBAliasExpr::isAggregate &rarr; NO_COVERAGE</p> </td> </tr> <tr> <td><a href='#org.pitest.mutationtest.report.html.SourceFile@c9a71ac_155'>155</a></td> <td></td> <td> <a name='grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_155'/> <p class='NO_COVERAGE'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>addReferencedColumns<br/><b>Killed by : </b>none</span></span> removed call to org/apache/empire/db/DBColumnExpr::addReferencedColumns &rarr; NO_COVERAGE</p> </td> </tr> <tr> <td><a href='#org.pitest.mutationtest.report.html.SourceFile@c9a71ac_167'>167</a></td> <td></td> <td> <a name='grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_167'/> <p class='NO_COVERAGE'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>addSQL<br/><b>Killed by : </b>none</span></span> Replaced bitwise AND with OR &rarr; NO_COVERAGE</p> <p class='NO_COVERAGE'><span class='pop'>2.<span><b>2</b><br/><b>Location : </b>addSQL<br/><b>Killed by : </b>none</span></span> negated conditional &rarr; NO_COVERAGE</p> </td> </tr> <tr> <td><a href='#org.pitest.mutationtest.report.html.SourceFile@c9a71ac_169'>169</a></td> <td></td> <td> <a name='grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_169'/> <p class='NO_COVERAGE'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>addSQL<br/><b>Killed by : </b>none</span></span> removed call to org/apache/empire/db/DBColumnExpr::addSQL &rarr; NO_COVERAGE</p> </td> </tr> <tr> <td><a href='#org.pitest.mutationtest.report.html.SourceFile@c9a71ac_173'>173</a></td> <td></td> <td> <a name='grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_173'/> <p class='NO_COVERAGE'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>addSQL<br/><b>Killed by : </b>none</span></span> negated conditional &rarr; NO_COVERAGE</p> </td> </tr> <tr> <td><a href='#org.pitest.mutationtest.report.html.SourceFile@c9a71ac_176'>176</a></td> <td></td> <td> <a name='grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_176'/> <p class='NO_COVERAGE'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>addSQL<br/><b>Killed by : </b>none</span></span> removed call to org/apache/empire/db/DBDatabaseDriver::appendElementName &rarr; NO_COVERAGE</p> </td> </tr> <tr> <td><a href='#org.pitest.mutationtest.report.html.SourceFile@c9a71ac_181'>181</a></td> <td></td> <td> <a name='grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_181'/> <p class='NO_COVERAGE'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>addSQL<br/><b>Killed by : </b>none</span></span> removed call to org/apache/empire/db/DBColumnExpr::addSQL &rarr; NO_COVERAGE</p> </td> </tr> <tr> <td><a href='#org.pitest.mutationtest.report.html.SourceFile@c9a71ac_193'>193</a></td> <td></td> <td> <a name='grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_193'/> <p class='NO_COVERAGE'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>equals<br/><b>Killed by : </b>none</span></span> negated conditional &rarr; NO_COVERAGE</p> </td> </tr> <tr> <td><a href='#org.pitest.mutationtest.report.html.SourceFile@c9a71ac_194'>194</a></td> <td></td> <td> <a name='grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_194'/> <p class='NO_COVERAGE'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>equals<br/><b>Killed by : </b>none</span></span> replaced boolean return with false for org/apache/empire/db/expr/column/DBAliasExpr::equals &rarr; NO_COVERAGE</p> </td> </tr> <tr> <td><a href='#org.pitest.mutationtest.report.html.SourceFile@c9a71ac_196'>196</a></td> <td></td> <td> <a name='grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_196'/> <p class='NO_COVERAGE'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>equals<br/><b>Killed by : </b>none</span></span> negated conditional &rarr; NO_COVERAGE</p> </td> </tr> <tr> <td><a href='#org.pitest.mutationtest.report.html.SourceFile@c9a71ac_199'>199</a></td> <td></td> <td> <a name='grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_199'/> <p class='NO_COVERAGE'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>equals<br/><b>Killed by : </b>none</span></span> replaced boolean return with true for org/apache/empire/db/expr/column/DBAliasExpr::equals &rarr; NO_COVERAGE</p> <p class='NO_COVERAGE'><span class='pop'>2.<span><b>2</b><br/><b>Location : </b>equals<br/><b>Killed by : </b>none</span></span> negated conditional &rarr; NO_COVERAGE</p> </td> </tr> <tr> <td><a href='#org.pitest.mutationtest.report.html.SourceFile@c9a71ac_200'>200</a></td> <td></td> <td> <a name='grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_200'/> <p class='NO_COVERAGE'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>equals<br/><b>Killed by : </b>none</span></span> negated conditional &rarr; NO_COVERAGE</p> </td> </tr> <tr> <td><a href='#org.pitest.mutationtest.report.html.SourceFile@c9a71ac_202'>202</a></td> <td></td> <td> <a name='grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_202'/> <p class='NO_COVERAGE'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>equals<br/><b>Killed by : </b>none</span></span> replaced boolean return with true for org/apache/empire/db/expr/column/DBAliasExpr::equals &rarr; NO_COVERAGE</p> </td> </tr> <tr> <td><a href='#org.pitest.mutationtest.report.html.SourceFile@c9a71ac_213'>213</a></td> <td></td> <td> <a name='grouporg.pitest.mutationtest.report.html.SourceFile@c9a71ac_213'/> <p class='NO_COVERAGE'><span class='pop'>1.<span><b>1</b><br/><b>Location : </b>toString<br/><b>Killed by : </b>none</span></span> replaced return value with &#34;&#34; for org/apache/empire/db/expr/column/DBAliasExpr::toString &rarr; NO_COVERAGE</p> </td> </tr> </table> <h2>Active mutators</h2> <ul> <li class='mutator'>BOOLEAN_FALSE_RETURN</li> <li class='mutator'>BOOLEAN_TRUE_RETURN</li> <li class='mutator'>CONDITIONALS_BOUNDARY_MUTATOR</li> <li class='mutator'>EMPTY_RETURN_VALUES</li> <li class='mutator'>INCREMENTS_MUTATOR</li> <li class='mutator'>INVERT_NEGS_MUTATOR</li> <li class='mutator'>MATH_MUTATOR</li> <li class='mutator'>NEGATE_CONDITIONALS_MUTATOR</li> <li class='mutator'>NULL_RETURN_VALUES</li> <li class='mutator'>PRIMITIVE_RETURN_VALS_MUTATOR</li> <li class='mutator'>VOID_METHOD_CALL_MUTATOR</li> </ul> <h2>Tests examined</h2> <ul> </ul> <br/> Report generated by <a href='http://pitest.org'>PIT</a> 1.5.2 </body> </html>
24.120839
507
0.6648
2da95b725a07b7eb835799dd74690ff87dde62d7
664
html
HTML
WebGUI/templates/about.html
soum-io/hackillinois2018
231787c6ac08b80e88ead96894a33fadfabaeae7
[ "Unlicense" ]
1
2019-10-29T07:16:18.000Z
2019-10-29T07:16:18.000Z
WebGUI/templates/about.html
soum-io/hackillinois2018
231787c6ac08b80e88ead96894a33fadfabaeae7
[ "Unlicense" ]
null
null
null
WebGUI/templates/about.html
soum-io/hackillinois2018
231787c6ac08b80e88ead96894a33fadfabaeae7
[ "Unlicense" ]
null
null
null
{% extends "layout.html" %} {% block content %} <main class="about-section"> <div class="container"> <div class="topnav" id="myTopnav"> <a href="{{ url_for('login') }}">Login</a> <a href="{{ url_for('signup') }}">Sign up</a> <a class="active" href="{{ url_for('about') }}">About</a> </div> <h2>About My Site</h2> <p>People say that a picture says a thousand words. So instead of writing a bio why not let these pictures do the matchmaking for you. Just upload some pictures that represent your life and this app might just help you find your soulmate. </p> </div> </main> {% endblock %}
34.947368
140
0.599398
32cea0b548408d43aa0b12e57c701ed07dd26c89
2,055
ps1
PowerShell
Examples/Example31-NestedTabs/Example31-Tabbing.ps1
RussPitcher/PSWriteHTML
3b4b60a7bf2814cbc4dc6265a569de164ef055a9
[ "MIT" ]
508
2018-12-18T15:53:09.000Z
2022-03-31T00:55:53.000Z
Examples/Example31-NestedTabs/Example31-Tabbing.ps1
RussPitcher/PSWriteHTML
3b4b60a7bf2814cbc4dc6265a569de164ef055a9
[ "MIT" ]
230
2018-12-17T16:50:38.000Z
2022-03-04T18:30:02.000Z
Examples/Example31-NestedTabs/Example31-Tabbing.ps1
RussPitcher/PSWriteHTML
3b4b60a7bf2814cbc4dc6265a569de164ef055a9
[ "MIT" ]
100
2018-12-17T10:37:51.000Z
2022-03-24T16:44:45.000Z
Import-Module .\PSWriteHTML.psd1 -Force $Forest = Get-ADForest New-HTML -TitleText 'My Title' -FilePath $PSScriptRoot\Example31-Tabbing.html -ShowHTML { New-HTMLTabStyle -SelectorColor Grey foreach ($Domain in $Forest.Domains) { $Objects = @( Get-ADComputer -Server $Domain -Filter * -Properties OperatingSystem, OperatingSystemVersion, PasswordLastSet | Select-Object -Property DNSHostName, Name, Enabled, OperatingSystem, OperatingSystemVersion, PasswordLastSet Get-ADUser -Server $Domain -Filter * -Properties SamAccountName, Name, Title, Surname, PasswordNeverExpires, WhenCreated, WhenChanged | Select-Object UserPrincipalName, SamAccountName, Name, Title, Surname, PasswordNeverExpires, WhenCreated, WhenChanged #-First 17 ) $DataTableIDUsers = Get-Random -Minimum 100000 -Maximum 2000000 $DataTableIDComputers = Get-Random -Minimum 100000 -Maximum 2000000 New-HTMLTab -TabName "Domain $Domain" -IconSolid dice { New-HTMLSection -HeaderText 'Active Directory Computers & Diagram' -HeaderBackGroundColor Grey { New-HTMLPanel { New-HTMLTable -DataTable $Objects -DataTableID $DataTableIDComputers } New-HTMLPanel { New-HTMLDiagram { New-DiagramNode -Label 'Domain' -To 'AD Computers', 'AD Users' -IconBrands delicious -IconColor Red New-DiagramNode -Label 'AD Computers' -IconBrands apple -IconColor Black New-DiagramNode -Label 'AD Users' -IconBrands instagram -IconColor Yellow New-DiagramEvent -ID $DataTableIDUsers -ColumnID 1 New-DiagramEvent -ID $DataTableIDComputers -ColumnID 1 foreach ($_ in $Objects) { New-DiagramNode -Label $_.Name -IconSolid server -To 'AD Computers' -IconColor Green } } } } } } } -Online
58.714286
276
0.627737
ba81f771bba0cf7352dcc4ff33b18ba20c3cae06
1,755
kt
Kotlin
src/main/kotlin/de/tweerlei/plumber/worker/jdbc/JdbcTemplateFactory.kt
tweerlei/plumber
35611a1c4ce10cf28aa19fba7e8ee0cb076b4c9e
[ "Apache-2.0" ]
null
null
null
src/main/kotlin/de/tweerlei/plumber/worker/jdbc/JdbcTemplateFactory.kt
tweerlei/plumber
35611a1c4ce10cf28aa19fba7e8ee0cb076b4c9e
[ "Apache-2.0" ]
null
null
null
src/main/kotlin/de/tweerlei/plumber/worker/jdbc/JdbcTemplateFactory.kt
tweerlei/plumber
35611a1c4ce10cf28aa19fba7e8ee0cb076b4c9e
[ "Apache-2.0" ]
null
null
null
/* * Copyright 2022 tweerlei Wruck + Buchmeier GbR - http://www.tweerlei.de/ * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package de.tweerlei.plumber.worker.jdbc import com.zaxxer.hikari.HikariDataSource import org.springframework.boot.context.properties.ConfigurationProperties import org.springframework.boot.jdbc.DataSourceBuilder import org.springframework.jdbc.core.JdbcTemplate import org.springframework.stereotype.Service import javax.sql.DataSource @Service @ConfigurationProperties(prefix = "plumber.jdbc") class JdbcTemplateFactory { lateinit var datasource: Map<String, String> fun createJdbcTemplate(poolSize: Int) = buildDataSource(HikariDataSource::class.java) .apply { maximumPoolSize = poolSize }.let { JdbcTemplate(it) } @Suppress("UNCHECKED_CAST") private fun <T: DataSource> buildDataSource(type: Class<T>) = DataSourceBuilder.create() .apply { type(type) driverClassName(datasource["driverClassName"]) url(datasource["url"]) username(datasource["username"]) password(datasource["password"]) }.build() as T }
35.1
75
0.690598
f9c78ebc51130d53d84bef152cbfb3ea35eb5dad
2,875
sql
SQL
sql/delete_pk_test.sql
pjungwir/time_for_keys
d63e5d2884bb91151bcd28cf36c57c199086544b
[ "MIT" ]
12
2018-07-10T09:57:11.000Z
2022-02-05T13:49:31.000Z
sql/delete_pk_test.sql
pjungwir/time_for_keys
d63e5d2884bb91151bcd28cf36c57c199086544b
[ "MIT" ]
null
null
null
sql/delete_pk_test.sql
pjungwir/time_for_keys
d63e5d2884bb91151bcd28cf36c57c199086544b
[ "MIT" ]
null
null
null
INSERT INTO houses VALUES (1, 150000, tstzrange('2015-01-01', '2016-01-01')), (1, 200000, tstzrange('2016-01-01', '2017-01-01')), (2, 300000, tstzrange('2015-01-01', '2016-01-01')), (3, 100000, tstzrange('2014-01-01', '2015-01-01')), (3, 200000, tstzrange('2015-01-01', null)) ; -- ON DELETE RESTRICT SELECT create_temporal_foreign_key('room_has_a_house', 'rooms', 'house_id', 'valid_at', 'houses', 'id', 'valid_at'); -- You can delete a pk with no references DELETE FROM houses WHERE id = 2; -- You can delete a finite pk range with no references INSERT INTO rooms VALUES (1, 1, tstzrange('2016-06-01', '2017-01-01')); DELETE FROM houses WHERE id = 1 and valid_at @> '2015-06-01'::timestamptz; INSERT INTO houses VALUES (1, 200000, tstzrange('2015-01-01', '2016-01-01')); DELETE FROM rooms; -- You can't delete a finite pk range that is partly covered INSERT INTO rooms VALUES (1, 1, tstzrange('2016-01-01', '2016-06-01')); DELETE FROM houses WHERE id = 1 and valid_at @> '2016-06-01'::timestamptz; DELETE FROM rooms; -- You can't delete a finite pk range that is exactly covered INSERT INTO rooms VALUES (1, 1, tstzrange('2016-01-01', '2017-01-01')); DELETE FROM houses WHERE id = 1 and valid_at @> '2016-06-01'::timestamptz; DELETE FROM rooms; -- You can't delete a finite pk range that is more than covered INSERT INTO rooms VALUES (1, 1, tstzrange('2015-06-01', '2017-01-01')); DELETE FROM houses WHERE id = 1 and valid_at @> '2016-06-01'::timestamptz; DELETE FROM rooms; -- You can delete an infinite pk range with no references INSERT INTO rooms VALUES (1, 3, tstzrange('2014-06-01', '2015-01-01')); DELETE FROM houses WHERE id = 3 and valid_at @> '2016-01-01'::timestamptz; INSERT INTO houses VALUES (3, 200000, tstzrange('2015-01-01', null)); DELETE FROM rooms; -- You can't delete an infinite pk range that is partly covered INSERT INTO rooms VALUES (1, 3, tstzrange('2016-01-01', '2017-01-01')); DELETE FROM houses WHERE id = 3 and valid_at @> '2016-01-01'::timestamptz; DELETE FROM rooms; -- You can't delete an infinite pk range that is exactly covered INSERT INTO rooms VALUES (1, 3, tstzrange('2015-01-01', null)); DELETE FROM houses WHERE id = 3 and valid_at @> '2016-01-01'::timestamptz; DELETE FROM rooms; -- You can't delete an infinite pk range that is more than covered INSERT INTO rooms VALUES (1, 3, tstzrange('2014-06-01', null)); DELETE FROM houses WHERE id = 3 and valid_at @> '2016-01-01'::timestamptz; DELETE FROM rooms; -- ON DELETE NOACTION -- (same behavior as RESTRICT, but different entry function so it should have separate tests) -- TODO: Write some tests against normal FKs just to see NOACTION vs RESTRICT -- ON DELETE CASCADE -- TODO -- ON DELETE SET NULL -- TODO -- ON DELETE SET DEFAULT -- TODO DELETE FROM rooms; DELETE FROM houses; SELECT drop_temporal_foreign_key('room_has_a_house', 'rooms', 'houses');
38.333333
116
0.711304