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
sequencelengths
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
sequencelengths
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
sequencelengths
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
1f3a4e5489baa922900a73ea97722c38dd99a027
404
cs
C#
src/core/Akka/Configuration/Hocon/HoconConfigurationElement.cs
vasily-kirichenko/akka.net
8b907f94b90dd946f07ce35c9ffef25c68a81efe
[ "Apache-2.0" ]
null
null
null
src/core/Akka/Configuration/Hocon/HoconConfigurationElement.cs
vasily-kirichenko/akka.net
8b907f94b90dd946f07ce35c9ffef25c68a81efe
[ "Apache-2.0" ]
null
null
null
src/core/Akka/Configuration/Hocon/HoconConfigurationElement.cs
vasily-kirichenko/akka.net
8b907f94b90dd946f07ce35c9ffef25c68a81efe
[ "Apache-2.0" ]
null
null
null
using System.Configuration; namespace Akka.Configuration.Hocon { public class HoconConfigurationElement : CDataConfigurationElement { [ConfigurationProperty(ContentPropertyName, IsRequired = true, IsKey = true)] public string Content { get { return (string)base[ContentPropertyName]; } set { base[ContentPropertyName] = value; } } } }
28.857143
85
0.660891
c9a7a5a50f7e0cb4a1eb27e04d8d4805934a358f
715
ts
TypeScript
packages/decorators/src/stereotype/DecoratorParameters.ts
rraziel/es-injection
8b1e4133cd6f883d26d0e4262d31d6e2430d60eb
[ "MIT" ]
1
2019-04-28T11:19:51.000Z
2019-04-28T11:19:51.000Z
packages/decorators/src/stereotype/DecoratorParameters.ts
rraziel/injectable
8b1e4133cd6f883d26d0e4262d31d6e2430d60eb
[ "MIT" ]
88
2017-12-03T16:58:37.000Z
2020-06-02T18:15:39.000Z
packages/decorators/src/stereotype/DecoratorParameters.ts
rraziel/injectable
8b1e4133cd6f883d26d0e4262d31d6e2430d60eb
[ "MIT" ]
null
null
null
import {StereotypeDefinition} from './StereotypeDefinition'; /** * Decorator parameters */ class DecoratorParameters<T> { propertyKey: string|symbol; descriptor: TypedPropertyDescriptor<T>; stereotype: string; componentName?: string; definition?: StereotypeDefinition; /** * Class constructor * @param propertyKey Property key * @param descriptor Descriptor * @param stereotype Stereotype */ constructor(propertyKey: string|symbol, descriptor: TypedPropertyDescriptor<T>, stereotype: string) { this.propertyKey = propertyKey; this.descriptor = descriptor; this.stereotype = stereotype; } } export { DecoratorParameters };
23.833333
105
0.688112
2c88171d88209dc08eb247431d28689775412b3b
2,769
py
Python
data_utils/read_raw.py
ktxlh/HMGNN
66299909ca02f8e61f09304d2a064fd4fc983a78
[ "MIT" ]
null
null
null
data_utils/read_raw.py
ktxlh/HMGNN
66299909ca02f8e61f09304d2a064fd4fc983a78
[ "MIT" ]
null
null
null
data_utils/read_raw.py
ktxlh/HMGNN
66299909ca02f8e61f09304d2a064fd4fc983a78
[ "MIT" ]
null
null
null
""" From my Transformer's data.py """ import pandas as pd import json import random from os import listdir from os.path import isfile, join, isdir from tqdm import tqdm REAL, FAKE = 1, 0 SEED = 123 random.seed(SEED) def read_politifact_input(dataset='politifact'): in_dir = f'/rwproject/kdd-db/20-rayw1/FakeNewsNet/code/fakenewsnet_dataset/{dataset}' rumorities = {'real': REAL, 'fake': FAKE} inpt = [] for rumority, label in rumorities.items(): for news_id in tqdm(listdir(join(in_dir, rumority)), desc=f'{dataset}-{rumority}'): content_fn = join(in_dir, rumority, news_id, 'news content.json') if not isfile(content_fn): continue with open(content_fn, 'r') as f: content = json.load(f) has_image = int(len(content["top_img"]) > 0) num_images = len(content["images"]) num_exclam = (content["title"] + content["text"]).count("!") tp = join(in_dir, rumority, news_id, 'tweets') num_tweets = len(listdir(tp)) if isdir(tp) else 0 rp = join(in_dir, rumority, news_id, 'retweets') num_retweets = len(listdir(rp)) if isdir(rp) else 0 other_features = [has_image, num_images, num_exclam, num_tweets, num_retweets] inpt.append([news_id, content['title'] + " " + content["text"], label, other_features]) return inpt def read_pheme_input(in_dir = '/rwproject/kdd-db/20-rayw1/pheme-figshare'): rumorities = {'non-rumours': REAL, 'rumours': FAKE} inpt = [] for event_raw in listdir(in_dir): if event_raw[-16:] != '-all-rnr-threads': continue # {event}-all-rnr-threads event = event_raw[:-16] for rumority, label in rumorities.items(): for news_id in tqdm(listdir(join(in_dir, event_raw, rumority)), desc=f'pheme-{event}-{rumority}'): if news_id == '.DS_Store': continue tweets_dir = join(in_dir, event_raw, rumority, news_id, 'source-tweets') for tweets_fn in listdir(tweets_dir): if tweets_fn == '.DS_Store': continue with open(join(tweets_dir, tweets_fn), 'r') as f: tweet = json.load(f) other_features = [ tweet["favorite_count"], tweet["retweet_count"], tweet['user']['followers_count'], tweet['user']['statuses_count'], tweet['user']['friends_count'], tweet['user']['favourites_count'], len(tweet['user']['description'].split(' ')) if tweet['user']['description'] else 0, ] inpt.append([tweet["id_str"], tweet['text'], label, other_features]) return inpt
47.741379
127
0.587938
d5c79e390468aa5cd68e7d96f26c043735e53ad5
656
go
Go
pkg/model/repository.go
vastness-io/coordinator
9533ee3dcd3772127c0ff925884f621ed292cebf
[ "Apache-2.0" ]
3
2018-05-03T19:39:56.000Z
2018-09-02T10:54:40.000Z
pkg/model/repository.go
vastness-io/coordinator
9533ee3dcd3772127c0ff925884f621ed292cebf
[ "Apache-2.0" ]
21
2018-03-16T12:38:46.000Z
2018-07-23T13:18:50.000Z
pkg/model/repository.go
vastness-io/coordinator
9533ee3dcd3772127c0ff925884f621ed292cebf
[ "Apache-2.0" ]
1
2018-04-26T21:28:42.000Z
2018-04-26T21:28:42.000Z
package model import "github.com/jinzhu/gorm" type Repository struct { Name string `gorm:"primary_key"` Owner string `gorm:"primary_key"` Type string `gorm:"primary_key"` Branches []*Branch `gorm:"foreignkey:RepositoryName,RepositoryOwner,RepositoryType"` RepositoryName string `gorm:"-"` RepositoryOwner string `gorm:"-"` RepositoryType string `gorm:"-"` ProjectID int64 } func (r *Repository) BeforeCreate(scope *gorm.Scope) error { scope.SetColumn("NAME", r.RepositoryName) scope.SetColumn("OWNER", r.RepositoryOwner) scope.SetColumn("TYPE", r.RepositoryType) return nil }
29.818182
92
0.681402
74699020966b3745a3f6c63fa42abd11e21582ab
241
css
CSS
app/css/sections.css
sophiathekitty/NullHubMVC-Base
4027fbf1373aa919d74aaf97c4295c3481724e16
[ "MIT" ]
1
2021-08-31T08:03:42.000Z
2021-08-31T08:03:42.000Z
app/css/sections.css
sophiathekitty/NullHubMVC-Base
4027fbf1373aa919d74aaf97c4295c3481724e16
[ "MIT" ]
18
2022-01-08T07:55:31.000Z
2022-02-21T01:53:56.000Z
app/css/sections.css
sophiathekitty/NullHub
e2af55764ffb321e6d55f0403185e57526c9c620
[ "MIT" ]
null
null
null
main section#weather.main, main section#floors.main, main .main { display: none; } main[view="rooms"] section#floors.main { display: flex; } main[view="weather"] section#weather.main { display: flex; flex-direction: column; }
20.083333
43
0.688797
88c51868b721b036445dd8bc791e5cf887d70988
372
cs
C#
DLC.Scientific/DLC.Scientific.Acquisition/Tools/ItineraryGenerator/Properties/AssemblyInfo.cs
slorion/multiagent-system-example
b3997ba475006e3d5cabf189790fa172a7b18d46
[ "MIT" ]
2
2018-11-17T20:58:26.000Z
2021-02-28T19:22:48.000Z
DLC.Scientific/DLC.Scientific.Acquisition/Tools/ItineraryGenerator/Properties/AssemblyInfo.cs
slorion/multiagent-system-example
b3997ba475006e3d5cabf189790fa172a7b18d46
[ "MIT" ]
null
null
null
DLC.Scientific/DLC.Scientific.Acquisition/Tools/ItineraryGenerator/Properties/AssemblyInfo.cs
slorion/multiagent-system-example
b3997ba475006e3d5cabf189790fa172a7b18d46
[ "MIT" ]
null
null
null
using System.Reflection; using System.Runtime.InteropServices; [assembly: AssemblyTitle("DLC.Scientific.Acquisition.Tools.ItineraryGenerator")] [assembly: AssemblyDescription("DLC.Scientific.Acquisition.Tools.ItineraryGenerator")] [assembly: AssemblyProduct("DLC.Scientific.Acquisition.Tools.ItineraryGenerator")] [assembly: Guid("35697cad-aa0a-4665-a15c-7a8ac9e20a52")]
46.5
86
0.833333
5a9cadc25e26ad4c5f2fe82b5fade45ebd8fd941
1,931
swift
Swift
Tests/FoundationDBBindingTestTests/TestHelpers.swift
davelester/fdb-swift-bindings
ab024652a15480771baa2e1b2b841252ac7ae1e2
[ "Apache-2.0" ]
null
null
null
Tests/FoundationDBBindingTestTests/TestHelpers.swift
davelester/fdb-swift-bindings
ab024652a15480771baa2e1b2b841252ac7ae1e2
[ "Apache-2.0" ]
null
null
null
Tests/FoundationDBBindingTestTests/TestHelpers.swift
davelester/fdb-swift-bindings
ab024652a15480771baa2e1b2b841252ac7ae1e2
[ "Apache-2.0" ]
null
null
null
/* * TestHelpers.swift * * This source file is part of the FoundationDB open source project * * Copyright 2016-2018 Apple Inc. and the FoundationDB project authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import Foundation import FoundationDB import XCTest import NIO extension String.UTF8View { var data: Data { return Data(bytes: Array(self)) } } extension XCTestCase { public func configure() { } public func runLoop(_ loop: EmbeddedEventLoop, block: @escaping () -> Void) { loop.execute(block) loop.run() } } #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) #else extension XCTestCase { fileprivate func recordFailure(withDescription description: String, inFile file: String, atLine line: Int, expected: Bool) { self.recordFailure(withDescription: description, inFile: file, atLine: line, expected: expected) } } #endif extension EventLoopFuture { /** This method catches errors from this future by recording them on a test case. - parameter testCase: The test case that is running. - parameter file: The file that the errors should appear on. - parameter line: The line that the errors should appear on. */ public func `catch`(_ testCase: XCTestCase, file: String = #file, line: Int = #line) { _ = self.map { _ in Void() } .mapIfError { testCase.recordFailure(withDescription: "\($0)", inFile: file, atLine: line, expected: true) } } }
27.985507
125
0.717245
2189551ffcecd7562849e5b1bc959ce0263c73c0
1,856
js
JavaScript
test/test-func/15-func-no-replication-to-self.js
happner/happn-cluster
67b5103c1047ec4e13d066d9901e4c7f945a4dc9
[ "MIT" ]
null
null
null
test/test-func/15-func-no-replication-to-self.js
happner/happn-cluster
67b5103c1047ec4e13d066d9901e4c7f945a4dc9
[ "MIT" ]
51
2016-09-24T12:38:19.000Z
2021-08-12T13:33:18.000Z
test/test-func/15-func-no-replication-to-self.js
happner/happn-cluster
67b5103c1047ec4e13d066d9901e4c7f945a4dc9
[ "MIT" ]
null
null
null
var path = require("path"); var filename = path.basename(__filename); var expect = require("expect.js"); var Promise = require("bluebird"); var HappnClient = require("happn-3").client; var hooks = require("../lib/hooks"); var testSequence = parseInt(filename.split("-")[0]); var clusterSize = 1; var happnSecure = true; var proxySecure = true; describe(filename, function() { this.timeout(30000); before(function() { this.logLevel = process.env.LOG_LEVEL; process.env.LOG_LEVEL = "off"; }); hooks.startCluster({ testSequence: testSequence, size: clusterSize, happnSecure: happnSecure, proxySecure: proxySecure }); var port; before(function() { var address = this.servers[0].services.proxy.__proxyServer._server.address(); port = address.port; }); it("does not replicate to self in infinite loop", function(done) { var client, count = 0; HappnClient.create({ config: { url: "https://127.0.0.1:" + port, username: "_ADMIN", password: "secret" } }) .then(function(_client) { client = _client; }) .then(function() { return new Promise(function(resolve, reject) { client.on( "/test/path", function() { count++; }, function(e) { if (e) return reject(e); resolve(); } ); }); }) .then(function() { return client.set("/test/path", { some: "data" }); }) .then(function() { return Promise.delay(100); }) .then(function() { expect(count).to.be(1); }) .then(function() { done(); }) .catch(done); }); hooks.stopCluster(); after(function() { process.env.LOG_LEVEL = this.logLevel; }); });
22.095238
81
0.546336
4ea77d269be021ec93338c902395a3fb71387641
3,235
lua
Lua
hyperbid sample/main.lua
agramonte/com.cabagomez-plugin.hyperbid
06a7533061d58b3992d0e7a431943e21474f63a2
[ "MIT" ]
1
2022-01-30T10:18:22.000Z
2022-01-30T10:18:22.000Z
hyperbid sample/main.lua
agramonte/com.cabagomez-plugin.hyperbid
06a7533061d58b3992d0e7a431943e21474f63a2
[ "MIT" ]
null
null
null
hyperbid sample/main.lua
agramonte/com.cabagomez-plugin.hyperbid
06a7533061d58b3992d0e7a431943e21474f63a2
[ "MIT" ]
1
2022-01-13T07:54:49.000Z
2022-01-13T07:54:49.000Z
----------------------------------------------------------------------------------------- -- -- main.lua -- ----------------------------------------------------------------------------------------- local hyperbid = require( "plugin.hyperbid" ) local json = require( "json" ) local listerner = function(event) print("+++++hyperbid:",json.prettify(event)) if event.phase == "init" then hyperbid.load("interstitial", { placementId = "<interplacementId>" }) hyperbid.load("rewardedVideo", { placementId = "<rewardplacementId>" }) hyperbid.load("banner", { placementId = "<bannerplacementId>"} ) elseif event.phase == "loaded" then elseif event.phase == "reward" then elseif event.phase == "closed" then end end local onShowBannerPressed = function(event) if hyperbid.isAvailable( "banner" ) then hyperbid.show("banner") end end local onShowInterPressed = function(event) if hyperbid.isAvailable( "interstitial" ) then hyperbid.show("interstitial") end end local onShowRewardedPressed = function(event) if hyperbid.isAvailable( "rewardedVideo" ) then hyperbid.show("rewardedVideo") end end local onHideBannerPressed = function(event) hyperbid.hide("banner") end hyperbid.init( listerner, { hyperBidAppID = "<appId>", hyperBidAppKey = "<appKey>", hasUserConsent = true, -- GDPR consent. ccpaDoNotSell = false, coppaUnderAge = false, gdprUnderAge = false, userId = "123456", -- Optional. Useful for server to server rewards channel = "Google", -- Optional. I usually provide the store. showDebugLog = false } ) -- Banner show local bannerShowBttn = display.newRect( 100, 120, 100, 20 ) bannerShowBttn:addEventListener("touch", onShowBannerPressed) local bannerTxtBttn = display.newText({text="show banner", x=bannerShowBttn.x, y=bannerShowBttn.y, width = bannerShowBttn.width, height = bannerShowBttn.height, font=native.systemFont, fontSize=15, align = "center"}) bannerTxtBttn:setFillColor(0) -- Banner Hide local bannerHideBttn = display.newRect( 100, 150, 100, 20 ) bannerHideBttn:addEventListener("touch", onHideBannerPressed) local bannerHidTxtBttn = display.newText({text="hide banner", x=bannerShowBttn.x, y=bannerHideBttn.y, width = bannerShowBttn.width, height = bannerShowBttn.height, font=native.systemFont, fontSize=15, align = "center"}) bannerHidTxtBttn:setFillColor(0) -- Inter local interShowBttn = display.newRect( 100, 180, 100, 20 ) interShowBttn:addEventListener("touch", onShowInterPressed) local interTxtBttn = display.newText({text="show inter", x=bannerShowBttn.x, y=interShowBttn.y, width = bannerShowBttn.width, height = bannerShowBttn.height, font=native.systemFont, fontSize=15, align = "center"}) interTxtBttn:setFillColor(0) -- Rwd local rwdShowBttn = display.newRect( 100, 210, 100, 20 ) interShowBttn:addEventListener("touch", onShowRewardedPressed) local rwdTxtBttn = display.newText({text="show reward", x=bannerShowBttn.x, y=rwdShowBttn.y, width = bannerShowBttn.width, height = bannerShowBttn.height, font=native.systemFont, fontSize=15, align = "center"}) rwdTxtBttn:setFillColor(0)
32.35
219
0.671716
7529f939f58c29f6378320e36d0fb988d185815c
2,047
css
CSS
gwall/static/index.css
Floozutter/graffiti-wall
50fce471ab256cd1e6604d8a53a3a6b748340866
[ "Unlicense" ]
null
null
null
gwall/static/index.css
Floozutter/graffiti-wall
50fce471ab256cd1e6604d8a53a3a6b748340866
[ "Unlicense" ]
null
null
null
gwall/static/index.css
Floozutter/graffiti-wall
50fce471ab256cd1e6604d8a53a3a6b748340866
[ "Unlicense" ]
null
null
null
/* Stolen from Nicky Case! <3 */ * { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } body { width: 100%; /*height: 100vh; display: grid; place-items: center;*/ height: 100%; overflow: hidden; margin:0; background: #111; font-size: 20px; font-family: Helvetica, Arial, sans-serif; font-weight: 100; line-height: 1.3em; } #game_container{ /* position: relative; display: inline-block; width: 1000px; height: 600px; background: #000; overflow: hidden;*/ position: absolute; top:0; left:0; bottom:0; right:0; margin: auto; width: 1000px; height: 600px; background: #000; overflow: hidden; } /****************************************************************************************************** CORNER TEXT ******************************************************************************************************/ .corner-text{ width: 220px; color: #eee; font-family: Helvetica, Arial, sans-serif; font-weight: 500; font-size: 18px; line-height: 1.3em; position: absolute; } .corner-text a{ color: #eee; } .corner-text a:hover{ color: #fff; } #topleft{ top:10px; left:10px; text-align: left; } #bottomleft{ bottom:10px; left:10px; text-align: left; } #topright{ top:10px; right:10px; text-align: right; } #bottomright{ bottom:10px; right:10px; text-align: right; } .no_deco{ text-decoration: none; } #sharing_title, #sharing_desc{ display: none; } #share{ overflow: hidden; text-align: right; padding: 5px 0; } #share div{ display: inline-block; overflow: hidden; width:30px; height:30px; background: url(../sprites/about/share.png); background-size: 300%; position: relative; cursor: pointer; opacity: 0.7; } #share div:hover{ opacity: 1; top:-2px; } #share #share_fb{ background-position: 0px; } #share #share_tw{ background-position: -30px; } #share #share_em{ background-position: -60px; } @media screen and (max-width: 800px) { .corner-text { display: none; } } .hide-if-cuss-free{ display: none; }
15.507576
103
0.600391
918128e6d71b5d324612da8b0dc98ebb0a448b64
1,950
swift
Swift
MarsWeatherApp/Presentation/MainViewModel.swift
beetsolutions/code-challenge-frontend-ios
69636c9f1403cf73026bc530b95a8f06100c5034
[ "MIT" ]
null
null
null
MarsWeatherApp/Presentation/MainViewModel.swift
beetsolutions/code-challenge-frontend-ios
69636c9f1403cf73026bc530b95a8f06100c5034
[ "MIT" ]
null
null
null
MarsWeatherApp/Presentation/MainViewModel.swift
beetsolutions/code-challenge-frontend-ios
69636c9f1403cf73026bc530b95a8f06100c5034
[ "MIT" ]
null
null
null
// // MainViewModel.swift // MarsWeatherApp // // Created by Etukeni E. Ndecha O. on 2021-02-07. // Copyright © 2021 Etukeni E. Ndecha O. All rights reserved. // import Foundation import Combine class MainViewModel: ObservableObject { private let url = "https://api.nasa.gov/insight_weather/?api_key=GFhPC48DbHZzKDwgBawNHZxLNRxyeT5z9m6GqHV8&feedtype=json&ver=1.0" private var task: AnyCancellable? @Published var weatherInformation: [WeatherInformation] = [] @Published var loading: Bool = true private let mapper = WeatherInformationMapper() func getWeatherInformation() { task = URLSession.shared.dataTaskPublisher(for: URL(string: url)!) .tryMap { data, response in var res : [WeatherInformation] = [] do { if let dataResponse = try JSONSerialization.jsonObject(with: data, options: []) as? Dictionary<String, Any> { let keys = self.mapper.getSolKeys(with: dataResponse["sol_keys"] as? Array<String>) let weatherInformationData = self.mapper.map(with: dataResponse, keys: keys) res.append(contentsOf: weatherInformationData) print(weatherInformationData) } } catch { print("json failed") } return res } .replaceError(with: []) .eraseToAnyPublisher() .receive(on: RunLoop.main) .sink(receiveCompletion: { completion in switch completion { case .finished: self.loading = false break case .failure(let error): print(error.localizedDescription) } }, receiveValue: { data in self.weatherInformation.append(contentsOf: data) }) } }
34.210526
132
0.56359
1acd85d30c9c96663483c8180fef0e5758e6e84c
2,509
py
Python
v3/detection/tests.py
gvanhorn38/inception
1da2d77c9f14cf26b25b77f7eae15234b68b7e8f
[ "MIT" ]
4
2016-09-30T21:34:14.000Z
2020-06-06T04:28:38.000Z
v3/detection/tests.py
gvanhorn38/inception
1da2d77c9f14cf26b25b77f7eae15234b68b7e8f
[ "MIT" ]
null
null
null
v3/detection/tests.py
gvanhorn38/inception
1da2d77c9f14cf26b25b77f7eae15234b68b7e8f
[ "MIT" ]
null
null
null
import numpy as np import train batch_size = 1 num_predictions = 5 max_num_gt_bboxes = 2 locations = np.zeros([batch_size * num_predictions, 4]) confidences = np.zeros([batch_size * num_predictions]) gt_bboxes = np.zeros([batch_size, max_num_gt_bboxes, 4]) num_gt_bboxes = np.zeros([batch_size]).astype(int) locations[0] = np.array([0.1, 0.1, 0.3, 0.3]) locations[1] = np.array([0.2, 0.3, 0.4, 0.4]) locations[2] = np.array([0.5, 0.4, 0.6, 0.6]) locations[3] = np.array([0.7, 0.8, 0.9, 0.9]) locations[4] = np.array([0.8, 0.3, 0.95, 0.5]) confidences[0] = .7 confidences[1] = .8 confidences[2] = .6 confidences[3] = .3 confidences[4] = .7 gt_bboxes[0][0] = np.array([0.25, 0.25, 0.35, 0.35]) gt_bboxes[0][1] = np.array([0.77, 0.33, 0.9, 0.53]) num_gt_bboxes[0] = 2 partitions, stacked_gt_bboxes = train.compute_assignments(locations, confidences, gt_bboxes, num_gt_bboxes, batch_size) ############################## batch_size = 2 num_predictions = 5 max_num_gt_bboxes = 1 locations = np.zeros([batch_size * num_predictions, 4]) confidences = np.zeros([batch_size * num_predictions]) gt_bboxes = np.zeros([batch_size, max_num_gt_bboxes, 4]) num_gt_bboxes = np.zeros([batch_size]).astype(int) locations[0] = np.array([0.1, 0.1, 0.3, 0.3]) locations[1] = np.array([0.2, 0.3, 0.4, 0.4]) locations[2] = np.array([0.5, 0.4, 0.6, 0.6]) locations[3] = np.array([0.7, 0.8, 0.9, 0.9]) locations[4] = np.array([0.8, 0.3, 0.95, 0.5]) locations[5] = np.array([0.1, 0.1, 0.3, 0.3]) locations[6] = np.array([0.2, 0.3, 0.4, 0.4]) locations[7] = np.array([0.5, 0.4, 0.6, 0.6]) locations[8] = np.array([0.7, 0.8, 0.9, 0.9]) locations[9] = np.array([0.8, 0.3, 0.95, 0.5]) confidences[0] = .7 confidences[1] = .8 confidences[2] = .6 confidences[3] = .3 confidences[4] = .7 confidences[5] = .7 confidences[6] = .8 confidences[7] = .6 confidences[8] = .3 confidences[9] = .7 gt_bboxes[0][0] = np.array([0.25, 0.25, 0.35, 0.35]) gt_bboxes[1][0] = np.array([0.77, 0.33, 0.9, 0.53]) num_gt_bboxes[0] = 1 num_gt_bboxes[1] = 1 partitions, stacked_gt_bboxes = train.compute_assignments(locations, confidences, gt_bboxes, num_gt_bboxes, batch_size) [21792, 4] [21792] [32, 1, 4] [32] c = np.array([0.1, 0.1, 0.1, 0.1, 0.1]) x = np.array( [[1, 0], [0, 0], [0, 0], [0, 0], [0, 1]] ) t = 0 for i in range(5): t += (1 - np.sum(x[i])) * np.log(1 - c[i]) t *= -1 print t r = 0 for i in range(5): for j in range(2): r += x[i][j] * np.log(1. - c[i]) - (1. / 2.) * np.log(1 - c[i]) print r
25.343434
119
0.61379
58732e196ad83062e361567edb980f737842d35a
133,530
css
CSS
web-app/css/screen.css
oakinwusi/memms
edb33044a2a5aebf6f540f106d03e7e2c611a2ad
[ "BSD-3-Clause" ]
null
null
null
web-app/css/screen.css
oakinwusi/memms
edb33044a2a5aebf6f540f106d03e7e2c611a2ad
[ "BSD-3-Clause" ]
null
null
null
web-app/css/screen.css
oakinwusi/memms
edb33044a2a5aebf6f540f106d03e7e2c611a2ad
[ "BSD-3-Clause" ]
null
null
null
/* line 17, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font: inherit; font-size: 100%; vertical-align: baseline; } /* line 22, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ html { line-height: 1; } /* line 24, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ ol, ul { list-style: none; } /* line 26, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ table { border-collapse: collapse; border-spacing: 0; } /* line 28, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ caption, th, td { text-align: left; font-weight: normal; vertical-align: middle; } /* line 30, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ q, blockquote { quotes: none; } /* line 103, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ q:before, q:after, blockquote:before, blockquote:after { content: ""; content: none; } /* line 32, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ a img { border: none; } /* line 116, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/reset/_utilities.scss */ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary { display: block; } /* line 1, ../../src/stylesheets/partials/_shared.sass */ body { background: url("../images/bg-body.png"); font-family: Arial, Helvetica, sans-serif; } /* line 5, ../../src/stylesheets/partials/_shared.sass */ h1, h2, h3, h4, .section-title { font-family: "Droid Sans", Arial, Helvetica, sans-serif; font-weight: bold; } /* line 9, ../../src/stylesheets/partials/_shared.sass */ a { color: #258cd5; font-size: 12px; } /* line 12, ../../src/stylesheets/partials/_shared.sass */ a:hover, a:focus { color: #22597f; } /* line 14, ../../src/stylesheets/partials/_shared.sass */ a.no-link { color: #0059a2; text-decoration: none; } /* line 18, ../../src/stylesheets/partials/_shared.sass */ .main { clear: both; color: #666666; font-size: 12px; padding: 15px; *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .main:after { content: ""; display: table; clear: both; } /* line 24, ../../src/stylesheets/partials/_shared.sass */ .main.table { padding: 0; } /* line 28, ../../src/stylesheets/partials/_shared.sass */ .form-heading { color: #258cd5; font-size: 24px; margin-bottom: 10px; padding-left: 10px; } /* line 34, ../../src/stylesheets/partials/_shared.sass */ .section-title { background: #e9f4fc; color: #258cd5; display: inline-block; font-weight: bold; left: -15px; line-height: 1.5; margin: 0 0 10px 0; max-width: 850px; padding: 7px 20px 7px 22px; position: relative; -moz-border-radius-topright: 100px; -webkit-border-top-right-radius: 100px; border-top-right-radius: 100px; -moz-border-radius-bottomright: 100px; -webkit-border-bottom-right-radius: 100px; border-bottom-right-radius: 100px; -webkit-box-shadow: #e0ebf3 -2px -2px 2px 0 inset; -moz-box-shadow: #e0ebf3 -2px -2px 2px 0 inset; box-shadow: #e0ebf3 -2px -2px 2px 0 inset; text-shadow: white, 0, 1px, 0; } /* line 49, ../../src/stylesheets/partials/_shared.sass */ .section-title span { background: #258cd5; color: white; display: block; font-weight: bold; height: 18px; left: -10px; padding: 3px; position: absolute; text-align: center; top: 4px; width: 18px; -webkit-border-radius: 50px; -moz-border-radius: 50px; -ms-border-radius: 50px; -o-border-radius: 50px; border-radius: 50px; text-shadow: #439e07, 0, 1px, 0; } /* line 64, ../../src/stylesheets/partials/_shared.sass */ .section-title.alt { left: 0; } /* line 67, ../../src/stylesheets/partials/_shared.sass */ #questions .incomplete h4 span, #questions .invalid h4 span, #questions span.question-default { background: #258cd5; color: #e9f4fc; text-shadow: #036ab3, 0, 1px, 0; } /* line 72, ../../src/stylesheets/partials/_shared.sass */ .follow { background: url("../images/icons/follow.png") no-repeat right center !important; padding-right: 20px !important; } /* line 76, ../../src/stylesheets/partials/_shared.sass */ .hidden { display: none; } /* line 79, ../../src/stylesheets/partials/_shared.sass */ .push-10 { margin-bottom: 10px; } /* line 81, ../../src/stylesheets/partials/_shared.sass */ .push-top-10 { margin-top: 10px; } /* line 83, ../../src/stylesheets/partials/_shared.sass */ .push-15 { margin-bottom: 15px; } /* line 85, ../../src/stylesheets/partials/_shared.sass */ .push-20 { margin-bottom: 20px !important; } /* line 88, ../../src/stylesheets/partials/_shared.sass */ .third { float: left; width: 33%; } /* line 91, ../../src/stylesheets/partials/_shared.sass */ .fourth { float: left; width: 25%; } /* line 95, ../../src/stylesheets/partials/_shared.sass */ ul.horizontal { *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ ul.horizontal:after { content: ""; display: table; clear: both; } /* line 97, ../../src/stylesheets/partials/_shared.sass */ ul.horizontal li { display: inline; margin-right: 5px; } /* line 100, ../../src/stylesheets/partials/_shared.sass */ ul.horizontal li.last { margin-right: 0; } /* line 103, ../../src/stylesheets/partials/_shared.sass */ .italic { font-style: italic; } /* line 106, ../../src/stylesheets/partials/_shared.sass */ .edit-link { background: url("../images/icons/mini_edit.png") no-repeat; display: inline-block; height: 14px; margin-left: 3px; opacity: 0.3; text-indent: -9999px; width: 12px; } /* line 114, ../../src/stylesheets/partials/_shared.sass */ .edit-link:hover { opacity: 0.6; } /* line 117, ../../src/stylesheets/partials/_shared.sass */ .delete-link { background: url("../images/icons/mini_delete.png") no-repeat; display: inline-block; height: 14px; margin-left: 3px; opacity: 0.3; text-indent: -9999px; width: 12px; } /* line 125, ../../src/stylesheets/partials/_shared.sass */ .delete-link:hover { opacity: 0.6; } /* line 128, ../../src/stylesheets/partials/_shared.sass */ .entity-form-container h5 { color: #888888; font-size: 16px; font-weight: bold; margin-top: 20px; } /* line 134, ../../src/stylesheets/partials/_shared.sass */ .login-heading { color: #258cd5; font-size: 18px; font-weight: bold; padding: 30px 15px 10px; text-align: center; text-transform: uppercase; *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .login-heading:after { content: ""; display: table; clear: both; } /* line 143, ../../src/stylesheets/partials/_shared.sass */ .nice-button { border: 1px solid rgba(0, 0, 0, 0.1); font: 13px arial !important; padding: 12px 18px 10px 40px; text-decoration: none; -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: #d8e3eb 1px 1px 3px inset; -moz-box-shadow: #d8e3eb 1px 1px 3px inset; box-shadow: #d8e3eb 1px 1px 3px inset; text-shadow: white 0 1px 0; } /* line 152, ../../src/stylesheets/partials/_shared.sass */ .nice-button.program { background: url("../images/icons/star.png") no-repeat 14px 50% #fcfcfc; } /* line 154, ../../src/stylesheets/partials/_shared.sass */ .nice-button.program:hover, .nice-button.program:focus { background: url("../images/icons/star_hover.png") no-repeat 14px 50%; } /* line 156, ../../src/stylesheets/partials/_shared.sass */ .nice-button.survey { background: url("../images/icons/survey.png") no-repeat 14px 50% #fcfcfc; } /* line 158, ../../src/stylesheets/partials/_shared.sass */ .nice-button.survey:hover, .nice-button.survey:focus { background: url("../images/icons/survey_hover.png") no-repeat 14px 50% #fcfcfc; } /* line 160, ../../src/stylesheets/partials/_shared.sass */ .nice-button.location { background: url("../images/icons/marker.png") no-repeat 14px 50% #fcfcfc; } /* line 162, ../../src/stylesheets/partials/_shared.sass */ .nice-button.location:hover, .nice-button.location:focus { background: url("../images/icons/marker_hover.png") no-repeat 14px 50% #fcfcfc; } /* line 164, ../../src/stylesheets/partials/_shared.sass */ .nice-button.time { background: url("../images/icons/calendar.png") no-repeat 14px 50% #fcfcfc; } /* line 166, ../../src/stylesheets/partials/_shared.sass */ .nice-button.time:hover, .nice-button.time:focus { background: url("../images/icons/calendar_hover.png") no-repeat 14px 50% #fcfcfc; } /* line 168, ../../src/stylesheets/partials/_shared.sass */ .nice-button.datalocation { background: url("../images/icons/datalocation.png") no-repeat 14px 50% #fcfcfc; } /* line 170, ../../src/stylesheets/partials/_shared.sass */ .nice-button.datalocation:hover, .nice-button.datalocation:focus { background: url("../images/icons/datalocation_hover.png") no-repeat 14px 50% #fcfcfc; } /* line 173, ../../src/stylesheets/partials/_shared.sass */ .nice-button2 { text-decoration: none; background: #e9f4fc; border: 1px solid #bed3e3; display: inline-block; margin-bottom: 3px; padding: 4px 4px; text-align: center; width: 42%; -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; } /* line 183, ../../src/stylesheets/partials/_shared.sass */ .nice-button2:hover, .nice-button2:focus { border-color: #238eda; } /* line 186, ../../src/stylesheets/partials/_shared.sass */ .with-highlight { margin-right: 10px; } /* line 188, ../../src/stylesheets/partials/_shared.sass */ .with-highlight:hover, .with-highlight:focus, .with-highlight.dropdown-selected { background-color: #258cd5 !important; color: white; position: relative; text-decoration: none; z-index: 5; -webkit-box-shadow: #036ab3 0 2px 9px 0 inset; -moz-box-shadow: #036ab3 0 2px 9px 0 inset; box-shadow: #036ab3 0 2px 9px 0 inset; text-shadow: #0059a2 0 1px 0; -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; -webkit-transition: all 0.3s; -moz-transition: all 0.3s; -o-transition: all 0.3s; transition: all 0.3s; } /* line 199, ../../src/stylesheets/partials/_shared.sass */ .dropdown { position: relative; } /* line 202, ../../src/stylesheets/partials/_shared.sass */ .dropdown .dropdown-list { padding-bottom: 6px; background: #cfe4f4; border: 1px solid #adc2d2; display: none; min-width: 200px; opacity: 0.95; position: absolute; z-index: 10; -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; -webkit-box-shadow: #cccccc 2px 2px 3px, #bed3e3 0 0 8px 3px inset; -moz-box-shadow: #cccccc 2px 2px 3px, #bed3e3 0 0 8px 3px inset; box-shadow: #cccccc 2px 2px 3px, #bed3e3 0 0 8px 3px inset; } /* line 215, ../../src/stylesheets/partials/_shared.sass */ .dropdown .dropdown-list li { margin-left: 10px; padding-top: 8px; padding-bottom: 8px; border-bottom: 1px dotted #b6cbdb; display: block; white-space: nowrap; } /* line 223, ../../src/stylesheets/partials/_shared.sass */ .dropdown .dropdown-list li:last-child { border: none; padding-bottom: 0px; } /* line 227, ../../src/stylesheets/partials/_shared.sass */ .dropdown .dropdown-list li a { color: #258cd5; font-size: 11px; font-weight: bold; text-decoration: none; text-shadow: white 0 1px 0; } /* line 234, ../../src/stylesheets/partials/_shared.sass */ .dropdown .dropdown-list li a:hover { color: #1f7cbd; } /* line 237, ../../src/stylesheets/partials/_shared.sass */ .clear-left { clear: left; } /* line 1, ../../src/stylesheets/partials/_layout.sass */ .wrapper, .clearfix, .half, .full, .row { position: relative; *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .wrapper:after, .clearfix:after, .half:after, .full:after, .row:after { content: ""; display: table; clear: both; } /* line 5, ../../src/stylesheets/partials/_layout.sass */ .wrapper { margin: 0 auto; position: relative; width: 1000px; } /* line 10, ../../src/stylesheets/partials/_layout.sass */ .left { display: inline; float: left; } /* line 14, ../../src/stylesheets/partials/_layout.sass */ .right { display: inline; float: right; } /* line 18, ../../src/stylesheets/partials/_layout.sass */ .inline { display: inline; } /* line 21, ../../src/stylesheets/partials/_layout.sass */ #content { background: url("../images/bg-body.png") repeat-x top center; } /* line 24, ../../src/stylesheets/partials/_layout.sass */ #content .main { background: white; border: 1px solid rgba(0, 0, 0, 0.1); } /* line 28, ../../src/stylesheets/partials/_layout.sass */ .clearfix { clear: both; } /* line 31, ../../src/stylesheets/partials/_layout.sass */ .full { width: 100%; } /* line 34, ../../src/stylesheets/partials/_layout.sass */ .half { float: left; width: 50%; } /* line 38, ../../src/stylesheets/partials/_layout.sass */ .build-info { opacity: 0.3; font-size: 11px; text-align: center; } /* line 1, ../../src/stylesheets/partials/_header.sass */ #header { background: url("../images/bg-header.png") repeat-x center; height: 90px; position: relative; *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ #header:after { content: ""; display: table; clear: both; } /* line 7, ../../src/stylesheets/partials/_header.sass */ #header h2 { color: white; font-family: Arial, sans-serif; font-size: 15px; line-height: 1.4; position: absolute; right: 0; text-align: right; top: 45px; width: 550px; text-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px; } /* line 18, ../../src/stylesheets/partials/_header.sass */ #header h2 span { color: #e9f4fc; display: block; font-size: 11px; letter-spacing: 0.3px; text-transform: uppercase; } /* line 24, ../../src/stylesheets/partials/_header.sass */ #header h2 img { display: inline-block; margin-left: 8px; margin-top: -2px; } /* line 29, ../../src/stylesheets/partials/_header.sass */ #logo { color: white; font: bold 42px arial, sans-serif; padding-top: 36px; text-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px; } /* line 35, ../../src/stylesheets/partials/_header.sass */ #logo a { font: inherit; color: inherit; text-decoration: none; } /* line 39, ../../src/stylesheets/partials/_header.sass */ #logo a:hover, #logo a:focus { color: #0059a2; text-shadow: rgba(255, 255, 255, 0.2) 0 1px 1px; } /* line 44, ../../src/stylesheets/partials/_header.sass */ .heading1-bar { *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .heading1-bar:after { content: ""; display: table; clear: both; } /* line 46, ../../src/stylesheets/partials/_header.sass */ .heading1-bar h1 { color: #258cd5; float: left; font: bold 24px "Droid Sans", Arial, sans-serif; padding: 23px 10px 15px 0; text-transform: uppercase; } /* line 52, ../../src/stylesheets/partials/_header.sass */ .heading1-bar .right { padding: 20px 0 15px; } /* line 3, ../../src/stylesheets/partials/_nav.sass */ #switcher, #top_nav { position: absolute; top: 0; *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ #switcher:after, #top_nav:after { content: ""; display: table; clear: both; } /* line 8, ../../src/stylesheets/partials/_nav.sass */ #switcher li, #top_nav li { display: inline; float: left; margin-left: 3px; } /* line 13, ../../src/stylesheets/partials/_nav.sass */ #switcher a, #top_nav a { color: white; display: inline-block; font-size: 9px; padding: 7px 6px 5px; text-transform: uppercase; -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; } /* line 20, ../../src/stylesheets/partials/_nav.sass */ #switcher a:hover, #switcher a:focus, #switcher a.no-link, #top_nav a:hover, #top_nav a:focus, #top_nav a.no-link { background: #e9f4fc; color: #036ab3; } /* line 25, ../../src/stylesheets/partials/_nav.sass */ #switcher { left: 0; } /* line 27, ../../src/stylesheets/partials/_nav.sass */ #top_nav { right: 0; } /* line 32, ../../src/stylesheets/partials/_nav.sass */ #navigation { background: url("../images/bg-nav.png") repeat-x; height: 42px; position: relative; z-index: 50; } /* line 38, ../../src/stylesheets/partials/_nav.sass */ #main-menu { float: left; *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ #main-menu:after { content: ""; display: table; clear: both; } /* line 41, ../../src/stylesheets/partials/_nav.sass */ #main-menu > li { display: inline; float: left; height: 42px; position: relative; } /* line 46, ../../src/stylesheets/partials/_nav.sass */ #main-menu > li:last-child { border-right: 1px solid #1f7cbd; } /* line 49, ../../src/stylesheets/partials/_nav.sass */ #main-menu > li:hover .submenu, #main-menu > li:focus .submenu { display: block; } /* line 51, ../../src/stylesheets/partials/_nav.sass */ #main-menu > li:hover > a, #main-menu > li:focus > a { background: rgba(0, 0, 0, 0.08); -webkit-box-shadow: #1279c2 0 -2px 6px 4px inset; -moz-box-shadow: #1279c2 0 -2px 6px 4px inset; box-shadow: #1279c2 0 -2px 6px 4px inset; } /* line 55, ../../src/stylesheets/partials/_nav.sass */ #main-menu > li > a { border-left: 1px solid #1f7cbd; color: white; display: inline-block; font-size: 12px; font-weight: bold; padding: 15px 22px; text-decoration: none; text-shadow: rgba(0, 0, 0, 0.3) 0 1px 0; } /* line 64, ../../src/stylesheets/partials/_nav.sass */ #main-menu > li > a:hover, #main-menu > li > a:focus, #main-menu > li > a.active { background: rgba(0, 0, 0, 0.08); -webkit-box-shadow: #1279c2 0 -2px 6px 4px inset; -moz-box-shadow: #1279c2 0 -2px 6px 4px inset; box-shadow: #1279c2 0 -2px 6px 4px inset; } /* line 67, ../../src/stylesheets/partials/_nav.sass */ #main-menu > li > a:active { -webkit-box-shadow: #0063ac 0 -2px 8px 6px inset; -moz-box-shadow: #0063ac 0 -2px 8px 6px inset; box-shadow: #0063ac 0 -2px 8px 6px inset; } /* line 72, ../../src/stylesheets/partials/_nav.sass */ .submenu { display: none; position: absolute; top: 42px; left: 0; min-width: 100%; } /* line 78, ../../src/stylesheets/partials/_nav.sass */ .submenu .sub-submenu { display: none; } /* line 80, ../../src/stylesheets/partials/_nav.sass */ .submenu li { display: block; height: 26px; float: none; } /* line 84, ../../src/stylesheets/partials/_nav.sass */ .submenu a { background: #1077c0; border-bottom: 1px solid rgba(0, 0, 0, 0.07); color: white; display: block; font-size: 11px; padding: 7px 15px; white-space: nowrap; text-decoration: none; text-shadow: rgba(0, 0, 0, 0.2) 0 1px 0; } /* line 94, ../../src/stylesheets/partials/_nav.sass */ .submenu a:hover, .submenu a:focus { background: #076eb7; } /* line 96, ../../src/stylesheets/partials/_nav.sass */ .submenu > li:hover > .sub-submenu { position: relative; left: 158px; top: -68px; display: block; } /* line 103, ../../src/stylesheets/partials/_nav.sass */ #logout { position: absolute; right: 0; top: 100px; z-index: 50; } /* line 109, ../../src/stylesheets/partials/_nav.sass */ #logout li { display: inline; float: left; margin-left: 7px; } /* line 114, ../../src/stylesheets/partials/_nav.sass */ #logout a { background: #1f7cbd; color: #e9f4fc; display: block; font-size: 11px; padding: 6px 12px; text-decoration: none; -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: #0059a2 0 -2px 9px 1px inset; -moz-box-shadow: #0059a2 0 -2px 9px 1px inset; box-shadow: #0059a2 0 -2px 9px 1px inset; text-shadow: #0059a2 0 1px 0; } /* line 124, ../../src/stylesheets/partials/_nav.sass */ #logout a:hover, #logout a:focus { color: white; -webkit-box-shadow: #0059a2 0 -2px 9px 4px inset; -moz-box-shadow: #0059a2 0 -2px 9px 4px inset; box-shadow: #0059a2 0 -2px 9px 4px inset; } /* line 127, ../../src/stylesheets/partials/_nav.sass */ #logout a:active { -webkit-box-shadow: #0059a2 0 2px 9px 4px inset; -moz-box-shadow: #0059a2 0 2px 9px 4px inset; box-shadow: #0059a2 0 2px 9px 4px inset; } /* line 129, ../../src/stylesheets/partials/_nav.sass */ #logout a.redmine { color: white; opacity: 0.7; } /* line 132, ../../src/stylesheets/partials/_nav.sass */ #logout a.redmine:hover, #logout a.redmine:focus { opacity: 1; } /* line 138, ../../src/stylesheets/partials/_nav.sass */ #tab-nav { background: #eeeeee; border-bottom: 1px solid #e3e3e3; margin: -15px -15px 15px; background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #fafafa), color-stop(100%, #f1f1f1)); background: -webkit-linear-gradient(#fafafa, #f1f1f1); background: -moz-linear-gradient(#fafafa, #f1f1f1); background: -o-linear-gradient(#fafafa, #f1f1f1); background: linear-gradient(#fafafa, #f1f1f1); *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ #tab-nav:after { content: ""; display: table; clear: both; } /* line 144, ../../src/stylesheets/partials/_nav.sass */ #tab-nav li { margin-right: 0; } /* line 146, ../../src/stylesheets/partials/_nav.sass */ #tab-nav a { border-right: 1px solid #e3e3e3; color: #666666; display: block; padding: 14px 20px; text-decoration: none; text-shadow: white 0 1px 0; } /* line 153, ../../src/stylesheets/partials/_nav.sass */ #tab-nav a:hover, #tab-nav a:focus, #tab-nav a.selected { background: white; color: #258cd5; background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #ffffff)); background: -webkit-linear-gradient(#ffffff, #ffffff); background: -moz-linear-gradient(#ffffff, #ffffff); background: -o-linear-gradient(#ffffff, #ffffff); background: linear-gradient(#ffffff, #ffffff); -webkit-transition: all 0.5s; -moz-transition: all 0.5s; -o-transition: all 0.5s; transition: all 0.5s; } /* line 159, ../../src/stylesheets/partials/_nav.sass */ #tab-nav a.selected { border-bottom: 1px solid white; margin-bottom: -1px; } /* line 165, ../../src/stylesheets/partials/_nav.sass */ .new-entity-dropdown { float: left; position: relative; } /* line 168, ../../src/stylesheets/partials/_nav.sass */ .new-entity-dropdown .new-entity-sub-menu { border: 1px solid rgba(0, 0, 0, 0.1); display: none; position: absolute; top: 24px; width: 96%; -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; } /* line 175, ../../src/stylesheets/partials/_nav.sass */ .new-entity-dropdown .new-entity-sub-menu a { background: #f9f9f9; display: block; font-size: 11px; padding: 5px 10px; } /* line 182, ../../src/stylesheets/partials/_nav.sass */ .new-entity-dropdown:hover > li > a, .new-entity-dropdown:focus > li > a { background: #439e07; border: 1px solid #328d00; color: white; background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #65c029), color-stop(100%, #54af18)); background: -webkit-linear-gradient(#65c029, #54af18); background: -moz-linear-gradient(#65c029, #54af18); background: -o-linear-gradient(#65c029, #54af18); background: linear-gradient(#65c029, #54af18); text-shadow: rgba(0, 0, 0, 0.2) 0 1px 1px; } /* line 188, ../../src/stylesheets/partials/_nav.sass */ .new-entity-dropdown:hover .new-entity-sub-menu, .new-entity-dropdown:focus .new-entity-sub-menu { display: block; } /* line 1, ../../src/stylesheets/partials/_footer.sass */ #footer { color: #888888; font-size: 11px; line-height: 1.5; padding: 20px 0 40px; text-align: center; text-shadow: white, 0, 1px, 0; } /* line 8, ../../src/stylesheets/partials/_footer.sass */ #footer a { font-size: 11px; } /* line 1, ../../src/stylesheets/partials/_spinner.sass */ .spinner { position: fixed; text-align: center; overflow: auto; width: 100%; height: 100%; opacity: 0.4; background-color: grey; z-index: 20; } /* line 11, ../../src/stylesheets/partials/_spinner.sass */ .spinner img { position: relative; top: 50%; } /* line 1, ../../src/stylesheets/partials/_tables.sass */ .table-wrap { overflow-x: auto; } /* line 4, ../../src/stylesheets/partials/_tables.sass */ .listing { clear: both; color: #444444; font-size: 12px; width: 100%; } /* line 9, ../../src/stylesheets/partials/_tables.sass */ .listing thead { background: #e9f4fc; -webkit-box-shadow: #d8e3eb 0 1px 4px inset; -moz-box-shadow: #d8e3eb 0 1px 4px inset; box-shadow: #d8e3eb 0 1px 4px inset; } /* line 12, ../../src/stylesheets/partials/_tables.sass */ .listing tbody { border: 1px solid #258cd5; } /* line 14, ../../src/stylesheets/partials/_tables.sass */ .listing th, .listing td { padding: 7px 12px; } /* line 16, ../../src/stylesheets/partials/_tables.sass */ .listing th { color: #258cd5; font-size: 11px; } /* line 19, ../../src/stylesheets/partials/_tables.sass */ .listing th.label { white-space: nowrap; } /* line 21, ../../src/stylesheets/partials/_tables.sass */ .listing th.label a { font-size: 11px; } /* line 23, ../../src/stylesheets/partials/_tables.sass */ .listing tr.left th { text-align: left; } /* line 26, ../../src/stylesheets/partials/_tables.sass */ .listing a, .listing th, .listing td { line-height: 1.4; } /* line 29, ../../src/stylesheets/partials/_tables.sass */ .listing td { border-top: 1px solid #e9f4fc; color: #444444; font-size: 11px; vertical-align: top; } /* line 34, ../../src/stylesheets/partials/_tables.sass */ .listing td.header { color: #888888; font-weight: bold; } /* line 39, ../../src/stylesheets/partials/_tables.sass */ .listing tbody tr:hover, .listing tbody tr:focus { background: #effaff; } /* line 42, ../../src/stylesheets/partials/_tables.sass */ .listing td:first-child, .listing th:first-child { border-left: 1px solid #e9f4fc; } /* line 45, ../../src/stylesheets/partials/_tables.sass */ .listing td:last-child, .listing th:last-child { border-right: 1px solid #e9f4fc; } /* line 48, ../../src/stylesheets/partials/_tables.sass */ .listing tr:last-child td { border-bottom: 1px solid #e9f4fc; } /* line 51, ../../src/stylesheets/partials/_tables.sass */ .listing.login { border: 1px solid #dddddd; margin: 0 auto; width: 240px; -webkit-box-shadow: #eeeeee 0 0 5px; -moz-box-shadow: #eeeeee 0 0 5px; box-shadow: #eeeeee 0 0 5px; -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; } /* line 57, ../../src/stylesheets/partials/_tables.sass */ .listing.login tbody { border: none; } /* line 59, ../../src/stylesheets/partials/_tables.sass */ .listing.login tr:first-child td { padding-top: 15px; } /* line 61, ../../src/stylesheets/partials/_tables.sass */ .listing.login tr:last-child td { border: none; padding-top: 10px; padding-bottom: 20px; } /* line 65, ../../src/stylesheets/partials/_tables.sass */ .listing.login td { border: none; padding: 0 0 5px; text-align: center; } /* line 71, ../../src/stylesheets/partials/_tables.sass */ .listing.login a { font-size: 11px; } /* line 75, ../../src/stylesheets/partials/_tables.sass */ .nested { font-size: 11px; } /* line 78, ../../src/stylesheets/partials/_tables.sass */ .nested thead { background: #e9f4fc; border: 1px solid #d8e3eb; border-bottom: none; color: #258cd5; -webkit-box-shadow: #d8e3eb 0 1px 4px inset; -moz-box-shadow: #d8e3eb 0 1px 4px inset; box-shadow: #d8e3eb 0 1px 4px inset; } /* line 85, ../../src/stylesheets/partials/_tables.sass */ .nested > tbody { border: 1px solid #258cd5; } /* line 88, ../../src/stylesheets/partials/_tables.sass */ .nested td, .nested th { padding: 7px; text-align: right; width: 200px; } /* line 92, ../../src/stylesheets/partials/_tables.sass */ .nested td:first-child, .nested th:first-child { text-align: left; width: 370px; } /* line 95, ../../src/stylesheets/partials/_tables.sass */ .nested td:first-child > span, .nested th:first-child > span { display: inline-block; padding-left: 20px; } /* line 99, ../../src/stylesheets/partials/_tables.sass */ .nested td.bucket, .nested th.bucket { padding: 0; } /* line 103, ../../src/stylesheets/partials/_tables.sass */ .nested .sub_tree .sub_tree tr td { border-bottom: 1px solid #eeeeee; } /* line 105, ../../src/stylesheets/partials/_tables.sass */ .nested .sub_tree .sub_tree tr:first-child td { border-top: 1px solid #eeeeee; } /* line 107, ../../src/stylesheets/partials/_tables.sass */ .nested .sub_tree .sub_tree tr:hover, .nested .sub_tree .sub_tree tr:focus { background: #f9f9f9; } /* line 110, ../../src/stylesheets/partials/_tables.sass */ .nested .tree_sign_plus { background: #f9f9f9; cursor: pointer; } /* line 113, ../../src/stylesheets/partials/_tables.sass */ .nested .tree_sign_plus td:first-child span { background: url("../images/icons/toggle_plus_large.png") no-repeat 5px center; } /* line 116, ../../src/stylesheets/partials/_tables.sass */ .nested .tree_sign_minus { background: #f9f9f9; cursor: pointer; } /* line 119, ../../src/stylesheets/partials/_tables.sass */ .nested .tree_sign_minus td:first-child span { background: url("../images/icons/toggle_minus_large.png") no-repeat 5px center; } /* line 122, ../../src/stylesheets/partials/_tables.sass */ .explanation-heading { background: #e9f4fc; font-size: 11px; font-style: italic; margin-top: 5px; padding: 7px 13px; } /* line 129, ../../src/stylesheets/partials/_tables.sass */ .explanation-row { border: none; } /* line 133, ../../src/stylesheets/partials/_tables.sass */ .explanation-cell { padding: 7px 0; } /* line 135, ../../src/stylesheets/partials/_tables.sass */ .explanation-cell table { margin-bottom: 10px; } /* line 138, ../../src/stylesheets/partials/_tables.sass */ .shorten { max-width: 100px; overflow: hidden; } /* line 142, ../../src/stylesheets/partials/_tables.sass */ .add-row, .element-list-add { background: url("../images/icons/toggle_plus.png") no-repeat 10px center #e9f4fc; border: 1px solid #c7d2da; display: inline-block; font-size: 12px; font-weight: bold; margin-top: 10px; padding: 8px 20px 7px 35px; text-decoration: none; -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: #eeeeee 0 2px 1px; -moz-box-shadow: #eeeeee 0 2px 1px; box-shadow: #eeeeee 0 2px 1px; text-shadow: white 0 1px 0; } /* line 154, ../../src/stylesheets/partials/_tables.sass */ .add-row:hover, .add-row:focus, .element-list-add:hover, .element-list-add:focus { background: url("../images/icons/toggle_plus.png") no-repeat 10px center #65c029; border: 1px solid #3c9700; color: white; -webkit-box-shadow: #cccccc 0 2px 1px; -moz-box-shadow: #cccccc 0 2px 1px; box-shadow: #cccccc 0 2px 1px; text-shadow: #328d00 0 1px 0; } /* line 160, ../../src/stylesheets/partials/_tables.sass */ .add-row:active, .element-list-add:active { position: relative; top: 1px; -webkit-box-shadow: #cccccc 0 1px 1px; -moz-box-shadow: #cccccc 0 1px 1px; box-shadow: #cccccc 0 1px 1px; } /* line 165, ../../src/stylesheets/partials/_tables.sass */ .sub_tree { display: none; } /* line 167, ../../src/stylesheets/partials/_tables.sass */ .spinner-container { position: absolute; width: 100%; height: 100%; opacity: 0.5; z-index: 20; } /* line 173, ../../src/stylesheets/partials/_tables.sass */ .spinner-container .ajax-big-spinner { position: relative; margin: 40px 40px 40px 460px; z-index: 20; } /* line 1, ../../src/stylesheets/partials/_forms.sass */ .form-section { border-bottom: 1px solid #eeeeee; *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .form-section:after { content: ""; display: table; clear: both; } /* line 4, ../../src/stylesheets/partials/_forms.sass */ .form-section .form-content { float: left; width: 60%; } /* line 7, ../../src/stylesheets/partials/_forms.sass */ .form-section .form-aside { background: url("../images/bg-body.png"); border: 1px solid #f6f6f6; float: right; margin-top: 15px; margin-bottom: 15px; padding: 10px 2% 20px 3%; width: 33%; } /* line 15, ../../src/stylesheets/partials/_forms.sass */ .form-section .form-aside .pulled { margin-top: -6px; } /* line 17, ../../src/stylesheets/partials/_forms.sass */ .form-section h6 { color: #888888; font-size: 12px; font-weight: bold; margin: 1em 0 0.4em; } /* line 22, ../../src/stylesheets/partials/_forms.sass */ .form-section h5 { font-size: 12px; margin-bottom: 1em; text-transform: uppercase; } /* line 26, ../../src/stylesheets/partials/_forms.sass */ .form-section li { *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .form-section li:after { content: ""; display: table; clear: both; } /* line 28, ../../src/stylesheets/partials/_forms.sass */ .form-section span { display: inline-block; font-size: 11px; line-height: 1.5; } /* line 32, ../../src/stylesheets/partials/_forms.sass */ .form-section span.label { color: #666666; float: left; width: 25%; } /* line 36, ../../src/stylesheets/partials/_forms.sass */ .form-section span.text { color: #258cd5; float: right; width: 75%; } /* line 41, ../../src/stylesheets/partials/_forms.sass */ .week-days ul { float: right; } /* line 43, ../../src/stylesheets/partials/_forms.sass */ .week-days ul li { display: inline; } /* line 45, ../../src/stylesheets/partials/_forms.sass */ .week-days ul li span { font-weight: bold; } /* line 48, ../../src/stylesheets/partials/_forms.sass */ .question-checkbox li { clear: both; padding: 5px 10px; } /* line 51, ../../src/stylesheets/partials/_forms.sass */ .question-checkbox input[type=checkbox] { margin: 0 5px 0 0; } /* line 54, ../../src/stylesheets/partials/_forms.sass */ .form-actions { border-top: 2px solid #e9f4fc; margin-top: 15px; *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .form-actions:after { content: ""; display: table; clear: both; } /* line 58, ../../src/stylesheets/partials/_forms.sass */ .form-actions li { display: inline; float: left; padding: 10px 0 10px 10px; } /* line 63, ../../src/stylesheets/partials/_forms.sass */ .go-back { color: #d30000; display: block; font-size: 11px; opacity: 0.6; padding: 11px 0 0; } /* line 69, ../../src/stylesheets/partials/_forms.sass */ .go-back:hover, .go-back:focus { opacity: 1; } /* line 71, ../../src/stylesheets/partials/_forms.sass */ .form-aside-hidden { display: none; } /* line 73, ../../src/stylesheets/partials/_forms.sass */ .facility-type { background: #f6fdeb; border: 1px solid #e5ecda; margin: 15px; padding: 11px 15px; width: 940px; -webkit-border-radius: 5px; -moz-border-radius: 5px; -ms-border-radius: 5px; -o-border-radius: 5px; border-radius: 5px; *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .facility-type:after { content: ""; display: table; clear: both; } /* line 81, ../../src/stylesheets/partials/_forms.sass */ .facility-type.no-margin { margin: 0 0 15px; } /* line 83, ../../src/stylesheets/partials/_forms.sass */ .facility-type h4 { color: #888888; float: left; font-size: 12px; padding: 3px 5px 0 0; } /* line 88, ../../src/stylesheets/partials/_forms.sass */ .facility-type #facility-type-filter { color: #258cd5; font-size: 11px; } /* line 91, ../../src/stylesheets/partials/_forms.sass */ .dragging { border: 1px solid #333333; } /* line 93, ../../src/stylesheets/partials/_forms.sass */ .buttons { border-top: 1px solid #eeeeee; padding: 15px 7px; } /* line 98, ../../src/stylesheets/partials/_forms.sass */ button, input[type=submit], .next, .btn { background: #65c029; border: 1px solid #439e07; color: #e9f4fc; cursor: pointer !important; display: inline-block; font: bold 14px/1 Arial, sans-serif; padding: 6px 40px; text-decoration: none; -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #6ec932), color-stop(100%, #5cb720)); background: -webkit-linear-gradient(#6ec932, #5cb720); background: -moz-linear-gradient(#6ec932, #5cb720); background: -o-linear-gradient(#6ec932, #5cb720); background: linear-gradient(#6ec932, #5cb720); text-shadow: #328d00 0 1px 0; } /* line 110, ../../src/stylesheets/partials/_forms.sass */ button:hover, button:focus, input[type=submit]:hover, input[type=submit]:focus, .next:hover, .next:focus, .btn:hover, .btn:focus { background: #439e07; border: 1px solid #328d00; color: white; background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #65c029), color-stop(100%, #54af18)); background: -webkit-linear-gradient(#65c029, #54af18); background: -moz-linear-gradient(#65c029, #54af18); background: -o-linear-gradient(#65c029, #54af18); background: linear-gradient(#65c029, #54af18); } /* line 115, ../../src/stylesheets/partials/_forms.sass */ button:active, input[type=submit]:active, .next:active, .btn:active { background: #54af18; -webkit-box-shadow: rgba(0, 0, 0, 0.3) 0px 1px 3px inset; -moz-box-shadow: rgba(0, 0, 0, 0.3) 0px 1px 3px inset; box-shadow: rgba(0, 0, 0, 0.3) 0px 1px 3px inset; } /* line 118, ../../src/stylesheets/partials/_forms.sass */ button#cancel-button, input[type=submit]#cancel-button, .next#cancel-button, .btn#cancel-button { background: none; border: none; color: #d30000; font-size: 11px; padding: 7px 10px; text-decoration: underline; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #ffffff)); background: -webkit-linear-gradient(#ffffff, #ffffff); background: -moz-linear-gradient(#ffffff, #ffffff); background: -o-linear-gradient(#ffffff, #ffffff); background: linear-gradient(#ffffff, #ffffff); text-shadow: white 0 0 0; } /* line 128, ../../src/stylesheets/partials/_forms.sass */ button.medium, input[type=submit].medium, .next.medium, .btn.medium { font-size: 11px; padding: 5px 15px; text-shadow: rgba(0, 0, 0, 0.2) 0 1px 0; } /* line 132, ../../src/stylesheets/partials/_forms.sass */ button.small, input[type=submit].small, .next.small, .btn.small { font-size: 11px; padding: 3px 10px; text-shadow: rgba(0, 0, 0, 0.2) 0 1px 0; } /* line 136, ../../src/stylesheets/partials/_forms.sass */ button.gray, input[type=submit].gray, .next.gray, .btn.gray { background: #d9d9d9; border: 1px solid #dddddd; color: #666666; -webkit-box-shadow: white 0px 3px 1px; -moz-box-shadow: white 0px 3px 1px; box-shadow: white 0px 3px 1px; background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #eeeeee), color-stop(100%, #e9e9e9)); background: -webkit-linear-gradient(#eeeeee, #e9e9e9); background: -moz-linear-gradient(#eeeeee, #e9e9e9); background: -o-linear-gradient(#eeeeee, #e9e9e9); background: linear-gradient(#eeeeee, #e9e9e9); text-shadow: white 0 1px 0; } /* line 143, ../../src/stylesheets/partials/_forms.sass */ button.gray:hover, button.gray:focus, input[type=submit].gray:hover, input[type=submit].gray:focus, .next.gray:hover, .next.gray:focus, .btn.gray:hover, .btn.gray:focus { background: #439e07; border: 1px solid #328d00; color: white; background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #65c029), color-stop(100%, #54af18)); background: -webkit-linear-gradient(#65c029, #54af18); background: -moz-linear-gradient(#65c029, #54af18); background: -o-linear-gradient(#65c029, #54af18); background: linear-gradient(#65c029, #54af18); text-shadow: #328d00 0 1px 0; } /* line 149, ../../src/stylesheets/partials/_forms.sass */ button.gray:active, input[type=submit].gray:active, .next.gray:active, .btn.gray:active { background: #54af18; -webkit-box-shadow: rgba(0, 0, 0, 0.3) 0px 1px 3px inset; -moz-box-shadow: rgba(0, 0, 0, 0.3) 0px 1px 3px inset; box-shadow: rgba(0, 0, 0, 0.3) 0px 1px 3px inset; } /* line 152, ../../src/stylesheets/partials/_forms.sass */ button.import, input[type=submit].import, .next.import, .btn.import { margin-right: 5px; } /* line 154, ../../src/stylesheets/partials/_forms.sass */ button.push-r, input[type=submit].push-r, .next.push-r, .btn.push-r { margin-right: 5px; } /* line 156, ../../src/stylesheets/partials/_forms.sass */ button.push-r-15, input[type=submit].push-r-15, .next.push-r-15, .btn.push-r-15 { margin-right: 15px; } /* line 159, ../../src/stylesheets/partials/_forms.sass */ .edit-button, .delete-button { display: inline-block; height: 12px; opacity: 0.3; text-indent: -9999em; width: 12px; } /* line 165, ../../src/stylesheets/partials/_forms.sass */ .edit-button:hover, .edit-button:focus, .delete-button:hover, .delete-button:focus { opacity: 1; } /* line 168, ../../src/stylesheets/partials/_forms.sass */ .edit-button { background: url("../images/icons/mini_edit.png") no-repeat center; } /* line 170, ../../src/stylesheets/partials/_forms.sass */ .delete-button { background: url("../images/icons/mini_delete.png") no-repeat center; } /* line 173, ../../src/stylesheets/partials/_forms.sass */ select { background: #f6f6f6; border: 1px solid #b6c1c9; color: #444444; font: normal 12px Arial, sans-serif; padding: 2px; min-width: 140px; -webkit-box-shadow: #d8e3eb 1px 1px 3px 0 inset; -moz-box-shadow: #d8e3eb 1px 1px 3px 0 inset; box-shadow: #d8e3eb 1px 1px 3px 0 inset; } /* line 181, ../../src/stylesheets/partials/_forms.sass */ select:hover, select:focus { background: #ecf7ff; border-color: #258cd5; } /* line 185, ../../src/stylesheets/partials/_forms.sass */ .focus-field { border: solid 1px #258cd5; background: #effaff; color: #333333; font: normal 12px Arial, sans-serif; padding: 3px; } /* line 192, ../../src/stylesheets/partials/_forms.sass */ .idle-field { background: #f9f9f9; border: 1px solid #b6c1c9; color: #444444; font: normal 12px Arial, sans-serif; padding: 3px; -webkit-box-shadow: #d8e3eb 1px 1px 3px 0 inset; -moz-box-shadow: #d8e3eb 1px 1px 3px 0 inset; box-shadow: #d8e3eb 1px 1px 3px 0 inset; } /* line 199, ../../src/stylesheets/partials/_forms.sass */ .idle-field:hover, .idle-field:focus { background: #ecf7ff; border-color: #258cd5; } /* line 202, ../../src/stylesheets/partials/_forms.sass */ .in-input { margin-top: 8px; } /* line 205, ../../src/stylesheets/partials/_forms.sass */ .completed-field { background: #ededed; color: #333333; border: solid 1px #65c029; } /* line 210, ../../src/stylesheets/partials/_forms.sass */ .ajax-search-field { width: 340px; } /* line 213, ../../src/stylesheets/partials/_forms.sass */ .login-field { background: #e9f4fc; border: 1px solid #b6c1c9; color: #444444; font: normal 18px "Lucida Grande", Arial, sans-serif; padding: 4px; text-align: center; width: 154px; -webkit-box-shadow: #d8e3eb 1px 1px 3px 0 inset; -moz-box-shadow: #d8e3eb 1px 1px 3px 0 inset; box-shadow: #d8e3eb 1px 1px 3px 0 inset; } /* line 222, ../../src/stylesheets/partials/_forms.sass */ .login-field:hover, .login-field:focus { background: #ecf7ff; border-color: #258cd5; } /* line 227, ../../src/stylesheets/partials/_forms.sass */ textarea.login-field { width: 400px; height: 50px; text-align: left; } /* line 233, ../../src/stylesheets/partials/_forms.sass */ .login-label { color: #258cd5; font-family: "Lucida Grande", Arial, sans-serif; font-size: 11px; margin: 0 auto; padding: 3px; text-align: center; width: 154px; } /* line 242, ../../src/stylesheets/partials/_forms.sass */ ul.filtered { border: 1px solid lightgrey; padding: 4px; height: 270px; overflow: auto; } /* line 248, ../../src/stylesheets/partials/_forms.sass */ ul.filtered li { display: block; white-space: nowrap; } /* line 252, ../../src/stylesheets/partials/_forms.sass */ ul.filtered li span { color: grey; } /* line 255, ../../src/stylesheets/partials/_forms.sass */ ul.filtered li:hover { background-color: yellow; } /* line 259, ../../src/stylesheets/partials/_forms.sass */ .element-list .element-map-header, .element-list .element-map-body { display: block; } /* line 262, ../../src/stylesheets/partials/_forms.sass */ .element-list .element-map-header .element-map-header, .element-list .element-map-body .element-map-header { font-size: 11px; } /* line 264, ../../src/stylesheets/partials/_forms.sass */ .element-list .element-map-header input, .element-list .element-map-body input { width: 121px; } /* line 266, ../../src/stylesheets/partials/_forms.sass */ .element-list .element-map-header select, .element-list .element-map-body select { width: 129px; } /* line 269, ../../src/stylesheets/partials/_forms.sass */ .element-list li { position: relative; } /* line 272, ../../src/stylesheets/partials/_forms.sass */ .element-list h5 { color: #258cd5; font-size: 14px; } /* line 276, ../../src/stylesheets/partials/_forms.sass */ .element-map-level-2 { float: left; padding-top: 5px; position: relative; } /* line 280, ../../src/stylesheets/partials/_forms.sass */ .element-map-level-2 > li { margin-bottom: 5px; } /* line 283, ../../src/stylesheets/partials/_forms.sass */ .element-list-row { background: #fafafa; border: 1px solid #cfe4f4; padding: 15px; position: relative; } /* line 289, ../../src/stylesheets/partials/_forms.sass */ ul.element-map { *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ ul.element-map:after { content: ""; display: table; clear: both; } /* line 291, ../../src/stylesheets/partials/_forms.sass */ ul.element-map li { *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ ul.element-map li:after { content: ""; display: table; clear: both; } /* line 294, ../../src/stylesheets/partials/_forms.sass */ ul.element-map ul.element-map li { display: inline; float: left; } /* line 298, ../../src/stylesheets/partials/_forms.sass */ ul.element-map label { font-size: 10px; margin-bottom: 3px; } /* line 302, ../../src/stylesheets/partials/_forms.sass */ .form-heading-list { padding-left: 20px; } /* line 304, ../../src/stylesheets/partials/_forms.sass */ .form-heading-list li { background: url("../images/select.png") no-repeat left center; color: #258cd5; padding-left: 10px; } /* line 309, ../../src/stylesheets/partials/_forms.sass */ .inline-list li { display: inline; float: left; } /* line 312, ../../src/stylesheets/partials/_forms.sass */ .error-warning { display: block; color: #258cd5; float: left; } /* line 317, ../../src/stylesheets/partials/_forms.sass */ .form-box { border: 1px solid #dddddd; margin: 0 auto; width: 250px; -webkit-box-shadow: #eeeeee 0 0 5px; -moz-box-shadow: #eeeeee 0 0 5px; box-shadow: #eeeeee 0 0 5px; -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; } /* line 324, ../../src/stylesheets/partials/_forms.sass */ .form-box table.listing tbody { border: none; } /* line 326, ../../src/stylesheets/partials/_forms.sass */ .form-box table.listing tr:last-child td { border: none; padding-top: 10px; padding-bottom: 10px; } /* line 330, ../../src/stylesheets/partials/_forms.sass */ .form-box table.listing tr:first-child td { border: none; } /* line 332, ../../src/stylesheets/partials/_forms.sass */ .form-box table.listing td { border: none; padding: 12px 0 5px 0; text-align: center; } /* line 337, ../../src/stylesheets/partials/_forms.sass */ .form-box a { font-size: 11px; } /* line 339, ../../src/stylesheets/partials/_forms.sass */ .form-box.wide { background: #e8f3fb; width: 350px; } /* line 342, ../../src/stylesheets/partials/_forms.sass */ .form-box.register { padding: 0 10px; width: 460px; } /* line 346, ../../src/stylesheets/partials/_forms.sass */ .nice-form { padding-top: 10px; } /* line 349, ../../src/stylesheets/partials/_forms.sass */ .nice-form input, .nice-form select { font-family: "Lucida Grande", Arial, sans-serif; width: 250px; background: #e9f4fc; border: 1px solid #b6c1c9; color: #444444; font-size: 14px; padding: 4px; margin-bottom: 0px; -webkit-box-shadow: #d8e3eb 1px 1px 3px 0 inset; -moz-box-shadow: #d8e3eb 1px 1px 3px 0 inset; box-shadow: #d8e3eb 1px 1px 3px 0 inset; } /* line 359, ../../src/stylesheets/partials/_forms.sass */ .nice-form input:hover, .nice-form input:focus, .nice-form select:hover, .nice-form select:focus { background: #ecf7ff; border-color: #258cd5; } /* line 363, ../../src/stylesheets/partials/_forms.sass */ .nice-form select { width: 200px; } /* line 366, ../../src/stylesheets/partials/_forms.sass */ .nice-form label, .nice-form span, .nice-form a, .nice-form div:not(.error-list) { font-family: "Lucida Grande", Arial, sans-serif; color: #258cd5; font-size: 11px; margin: 0 auto; padding: 3px; } /* line 373, ../../src/stylesheets/partials/_forms.sass */ .nice-form td { vertical-align: middle; } /* line 376, ../../src/stylesheets/partials/_forms.sass */ .nice-form tr { height: 42px; } /* line 380, ../../src/stylesheets/partials/_forms.sass */ .login-form button { margin-bottom: 5px; } /* line 382, ../../src/stylesheets/partials/_forms.sass */ .login-form td:first-child { text-align: center; } /* line 384, ../../src/stylesheets/partials/_forms.sass */ .login-form input { width: 200px; text-align: center; } /* line 387, ../../src/stylesheets/partials/_forms.sass */ .login-form input[type=checkbox] { width: 14px; } /* line 389, ../../src/stylesheets/partials/_forms.sass */ .login-form a { display: block; } /* line 391, ../../src/stylesheets/partials/_forms.sass */ .login-form button { margin: 0 auto; } /* line 393, ../../src/stylesheets/partials/_forms.sass */ .login-form .error-list { position: relative; left: 20px; } /* line 397, ../../src/stylesheets/partials/_forms.sass */ .login-form .listing tbody tr:hover, .login-form .listing tbody tr:focus { background: none; } /* line 400, ../../src/stylesheets/partials/_forms.sass */ .todo { padding: 7px; } /* line 402, ../../src/stylesheets/partials/_forms.sass */ .todo a { background: rgba(255, 255, 255, 0.8); border: 1px solid rgba(0, 0, 0, 0.12); display: block; font-size: 12px; margin: 3px; padding: 8px 10px; text-decoration: none; -webkit-border-radius: 2px; -moz-border-radius: 2px; -ms-border-radius: 2px; -o-border-radius: 2px; border-radius: 2px; } /* line 411, ../../src/stylesheets/partials/_forms.sass */ .todo a:hover, .todo a:focus { background: url("../images/follow2.png") no-repeat 305px center white; border: 1px solid rgba(0, 0, 0, 0.35); color: #222222; -webkit-box-shadow: rgba(0, 0, 0, 0.08) 1px 1px 4px inset; -moz-box-shadow: rgba(0, 0, 0, 0.08) 1px 1px 4px inset; box-shadow: rgba(0, 0, 0, 0.08) 1px 1px 4px inset; } /* line 417, ../../src/stylesheets/partials/_forms.sass */ .items { border-collapse: separate; margin-bottom: 15px; width: 100%; } /* line 421, ../../src/stylesheets/partials/_forms.sass */ .items th, .items td { line-height: 1.3; padding: 10px; } /* line 424, ../../src/stylesheets/partials/_forms.sass */ .items th, .items td, .items a { font-size: 11px; } /* line 426, ../../src/stylesheets/partials/_forms.sass */ .items th { border-top: 1px solid #258cd5; background: #e9f4fc; color: #258cd5; font-weight: bold; } /* line 431, ../../src/stylesheets/partials/_forms.sass */ .items td { border-top: 1px solid rgba(0, 0, 0, 0.08); padding: 5px 10px; position: relative; } /* line 435, ../../src/stylesheets/partials/_forms.sass */ .items td:first-child { padding-left: 15px; } /* line 437, ../../src/stylesheets/partials/_forms.sass */ .items td:last-child { padding-right: 15px; } /* line 441, ../../src/stylesheets/partials/_forms.sass */ .items tr.even td { background: rgba(0, 0, 0, 0.015); } /* line 444, ../../src/stylesheets/partials/_forms.sass */ .items tr:hover td, .items tr:focus td { background: rgba(0, 0, 0, 0.015); } /* line 446, ../../src/stylesheets/partials/_forms.sass */ .items tr:hover .edit-button, .items tr:hover .delete-button, .items tr:focus .edit-button, .items tr:focus .delete-button { opacity: 0.7; } /* line 448, ../../src/stylesheets/partials/_forms.sass */ .items tr:first-child th { border-bottom: 1px solid rgba(0, 0, 0, 0.15); } /* line 450, ../../src/stylesheets/partials/_forms.sass */ .items tr:first-child td { border-top: 0; } /* line 452, ../../src/stylesheets/partials/_forms.sass */ .items tr:last-child td { border-bottom: 1px solid rgba(0, 0, 0, 0.08); } /* line 455, ../../src/stylesheets/partials/_forms.sass */ .items.spaced td { padding: 10px; } /* line 457, ../../src/stylesheets/partials/_forms.sass */ .items.spaced td:first-child { padding-left: 15px; } /* line 459, ../../src/stylesheets/partials/_forms.sass */ .items.spaced td:last-child { padding-right: 15px; } /* line 462, ../../src/stylesheets/partials/_forms.sass */ .items th.sortable a { background-position: right; background-repeat: no-repeat; padding-right: 1.1em; } /* line 467, ../../src/stylesheets/partials/_forms.sass */ .items th.asc a { background-image: url(../images/skin/sorted_asc.gif); } /* line 470, ../../src/stylesheets/partials/_forms.sass */ .items th.desc a { background-image: url(../images/skin/sorted_desc.gif); } /* line 473, ../../src/stylesheets/partials/_forms.sass */ .items + div { padding: 10px; text-align: center; } /* line 478, ../../src/stylesheets/partials/_forms.sass */ .items.ralign td, .items.ralign th { text-align: right; } /* line 482, ../../src/stylesheets/partials/_forms.sass */ .sub-items th, .sub-items td { padding: 6px !important; line-height: 1 !important; } /* line 486, ../../src/stylesheets/partials/_forms.sass */ .sub-list h3 { font-weight: bold; font-size: 12px; } /* line 491, ../../src/stylesheets/partials/_forms.sass */ .simple-list fieldset { display: block; padding: 10px 0; } /* line 494, ../../src/stylesheets/partials/_forms.sass */ .simple-list legend { font-size: 14px; font-weight: bold; } /* line 497, ../../src/stylesheets/partials/_forms.sass */ .simple-list label { color: #258cd5; display: inline-block; font-size: 11px; line-height: 1.4; margin-left: 7px; padding-top: 5px; vertical-align: top; width: 100px; } /* line 506, ../../src/stylesheets/partials/_forms.sass */ .simple-list label.top { padding-top: 0; } /* line 508, ../../src/stylesheets/partials/_forms.sass */ .simple-list .row { margin-bottom: 7px; vertical-align: middle; } /* line 512, ../../src/stylesheets/partials/_forms.sass */ .simple-list .rows-wrapper .row { float: left; } /* line 514, ../../src/stylesheets/partials/_forms.sass */ .simple-list .rows-wrapper input[type=text] { margin: 0; width: 230px; } /* line 517, ../../src/stylesheets/partials/_forms.sass */ .simple-list .rows-wrapper select[name=currency] { height: 23px; margin-left: 3px; min-width: 50px; width: 90px; } /* line 522, ../../src/stylesheets/partials/_forms.sass */ .simple-list .rows-wrapper label[for=currency] { display: none; } /* line 525, ../../src/stylesheets/partials/_forms.sass */ .simple-list .date select { min-width: 50px; } /* line 527, ../../src/stylesheets/partials/_forms.sass */ .simple-list .date-picker, .simple-list .time-picker, .simple-list .date-time-picker { width: 132px !important; } /* line 529, ../../src/stylesheets/partials/_forms.sass */ .simple-list input[type=text], .simple-list textarea { width: 320px; } /* line 532, ../../src/stylesheets/partials/_forms.sass */ .paginateButtons { padding: 0 15px 15px; *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .paginateButtons:after { content: ""; display: table; clear: both; } /* line 535, ../../src/stylesheets/partials/_forms.sass */ .paginateButtons a { background: #e9f4fc; color: #258cd5; } /* line 538, ../../src/stylesheets/partials/_forms.sass */ .paginateButtons a:hover, .paginateButtons a:focus { border: 1px solid #47aef7; } /* line 540, ../../src/stylesheets/partials/_forms.sass */ .paginateButtons a, .paginateButtons span { border: 1px solid rgba(0, 0, 0, 0.07); display: block; float: left; margin-right: 3px; padding: 7px 10px; text-decoration: none; } /* line 548, ../../src/stylesheets/partials/_forms.sass */ .paginateButtons span { background: #258cd5; color: white; } /* line 552, ../../src/stylesheets/partials/_forms.sass */ .foldable-container { border-top: 1px dotted #b6cbdb; margin-top: 6px; } /* line 557, ../../src/stylesheets/partials/_forms.sass */ .foldable.opened:not(.current) { padding-bottom: 0px !important; } /* line 560, ../../src/stylesheets/partials/_forms.sass */ .foldable a.foldable-toggle { display: block; cursor: pointer; height: 14px; margin-top: -3px; width: 20px; float: left; text-indent: -9999px; background-image: url("../images/icons/toggle_plus.png"); } /* line 569, ../../src/stylesheets/partials/_forms.sass */ .foldable a.foldable-toggle.toggled { background-image: url("../images/icons/toggle_minus.png"); } /* line 571, ../../src/stylesheets/partials/_forms.sass */ .filter-bar { color: #888888; font-size: 11px; margin-top: 15px; padding: 15px 15px 40px; } /* line 577, ../../src/stylesheets/partials/_forms.sass */ .filters { border: 1px solid rgba(0, 0, 0, 0.1); padding: 0; margin-bottom: 15px; } /* line 581, ../../src/stylesheets/partials/_forms.sass */ .filters h2 { font: bold 12px Arial, sans-serif; padding: 10px 15px; } /* line 585, ../../src/stylesheets/partials/_forms.sass */ .filters h2 a { font: normal 11px Arial, sans-serif; margin-top: 1px; opacity: 0.7; text-decoration: none; -webkit-transition: all 0.4s; -moz-transition: all 0.4s; -o-transition: all 0.4s; transition: all 0.4s; } /* line 591, ../../src/stylesheets/partials/_forms.sass */ .filters h2 a:hover, .filters h2 a:focus { color: #147bc4; opacity: 1; text-decoration: underline; } /* line 595, ../../src/stylesheets/partials/_forms.sass */ .filters ul.filters-list { padding: 10px 0 0; *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .filters ul.filters-list:after { content: ""; display: table; clear: both; } /* line 598, ../../src/stylesheets/partials/_forms.sass */ .filters ul.filters-list > li { display: inline; float: left; margin-left: 5%; margin-bottom: 8px; width: 94%; } /* line 608, ../../src/stylesheets/partials/_forms.sass */ .filters ul.filters-list .date select { min-width: 31%; width: 31%; } /* line 611, ../../src/stylesheets/partials/_forms.sass */ .filters label { display: block; font-size: 11px; margin-bottom: 2px; } /* line 615, ../../src/stylesheets/partials/_forms.sass */ .filters select { background: #faffff; border: 1px solid #47aef7; color: #258cd5; font-size: 11px; font-weight: bold; height: 24px; padding: 3px; width: 300px; -webkit-border-radius: 2px; -moz-border-radius: 2px; -ms-border-radius: 2px; -o-border-radius: 2px; border-radius: 2px; } /* line 625, ../../src/stylesheets/partials/_forms.sass */ .filters button { margin: 5px 15px 15px; } /* line 627, ../../src/stylesheets/partials/_forms.sass */ .filters .date-picker { width: 137px; } /* line 630, ../../src/stylesheets/partials/_forms.sass */ .filters.projection { padding: 10px; } /* line 632, ../../src/stylesheets/partials/_forms.sass */ .filters.projection .question-help { background-color: white; border: none; display: inline; margin: 0; padding: 12px 45px; position: relative; } /* line 640, ../../src/stylesheets/partials/_forms.sass */ .general-search-form { border-top: 1px solid #eeeeee; display: block; } /* line 644, ../../src/stylesheets/partials/_forms.sass */ .filters-box { border-top: 1px solid #eeeeee; display: none; } /* line 648, ../../src/stylesheets/partials/_forms.sass */ form.search-form { color: #258cd5; display: inline-block; font-size: 12px; } /* line 652, ../../src/stylesheets/partials/_forms.sass */ form.search-form input, form.search-form button { float: left; } /* line 654, ../../src/stylesheets/partials/_forms.sass */ form.search-form input { background: #f9f9f9; border: 1px solid #b6c1c9; color: #444444; font: normal 12px Arial, sans-serif; margin: 0; padding: 3px 5px 4px; -webkit-box-shadow: #d8e3eb 1px 1px 3px 0 inset; -moz-box-shadow: #d8e3eb 1px 1px 3px 0 inset; box-shadow: #d8e3eb 1px 1px 3px 0 inset; } /* line 662, ../../src/stylesheets/partials/_forms.sass */ form.search-form input:hover, form.search-form input:focus { background: #ecf7ff; border-color: #258cd5; } /* line 665, ../../src/stylesheets/partials/_forms.sass */ form.search-form button { height: 23px; margin: 0 0 0 -1px; -moz-border-radius-topleft: 0; -webkit-border-top-left-radius: 0; border-top-left-radius: 0; -moz-border-radius-bottomleft: 0; -webkit-border-bottom-left-radius: 0; border-bottom-left-radius: 0; } /* line 670, ../../src/stylesheets/partials/_forms.sass */ .search-term { width: 305px !important; height: 20px !important; } /* line 674, ../../src/stylesheets/partials/_forms.sass */ .filter-results { color: #aaaaaa; font: bold 14px Arial, sans-serif; padding: 5px 0; text-transform: uppercase; } /* line 680, ../../src/stylesheets/partials/_forms.sass */ .applied-filters-list > li { margin: 10px 25px 15px; *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .applied-filters-list > li:after { content: ""; display: table; clear: both; } /* line 683, ../../src/stylesheets/partials/_forms.sass */ .applied-filters-list > li h3 { color: #258cd5; margin-bottom: 9px; } /* line 686, ../../src/stylesheets/partials/_forms.sass */ .applied-filters-list > li li { background: #f1f7fc; border: 1px solid rgba(0, 0, 0, 0.1); display: inline-block; float: left; font-size: 11px; margin: 0 5px 5px 0; padding: 3px 7px; -webkit-border-radius: 2px; -moz-border-radius: 2px; -ms-border-radius: 2px; -o-border-radius: 2px; border-radius: 2px; } /* line 696, ../../src/stylesheets/partials/_forms.sass */ .form-languages a { font-size: 10px; margin-left: 5px; text-transform: uppercase; } /* line 701, ../../src/stylesheets/partials/_forms.sass */ .checkbox { position: relative; *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .checkbox:after { content: ""; display: table; clear: both; } /* line 704, ../../src/stylesheets/partials/_forms.sass */ .checkbox .ajax-spinner, .checkbox .list-check-box { position: absolute; } /* line 706, ../../src/stylesheets/partials/_forms.sass */ .checkbox .ajax-spinner { top: -7px; } /* line 708, ../../src/stylesheets/partials/_forms.sass */ .checkbox .list-check-box { margin: 0; top: -5px; } /* line 711, ../../src/stylesheets/partials/_forms.sass */ .checkbox .ajax-error { color: #d30000; display: inline-block; left: -50%; position: absolute; top: 12px; white-space: nowrap; } /* line 718, ../../src/stylesheets/partials/_forms.sass */ .process-list-action, .process-list-material, .process-list-prevention { border: 1px solid #47aef7; max-height: 188px; overflow-y: scroll; } /* line 722, ../../src/stylesheets/partials/_forms.sass */ .draggable, .droppable { min-height: 50px !important; } /* line 725, ../../src/stylesheets/partials/_forms.sass */ .hide-list { display: none; } /* line 728, ../../src/stylesheets/partials/_forms.sass */ .process { margin-bottom: 15px; } /* line 730, ../../src/stylesheets/partials/_forms.sass */ .process fieldset { display: inline; padding: 3px 0 10px; width: 330px; } /* line 734, ../../src/stylesheets/partials/_forms.sass */ .process fieldset ul { margin-bottom: 10px; } /* line 736, ../../src/stylesheets/partials/_forms.sass */ .process fieldset li { border-bottom: 1px solid #eeeeee; line-height: 1.4; padding: 5px; position: relative; } /* line 741, ../../src/stylesheets/partials/_forms.sass */ .process fieldset li:last-child { border-bottom: 0; } /* line 743, ../../src/stylesheets/partials/_forms.sass */ .process fieldset li .ajax-spinner { position: absolute; right: 28px; top: 6px; } /* line 747, ../../src/stylesheets/partials/_forms.sass */ .process input[type=text] { width: 264px; } /* line 749, ../../src/stylesheets/partials/_forms.sass */ .process .ajax-error { color: #d30000; font-size: 12px; padding: 0 0 0 3px; } /* line 753, ../../src/stylesheets/partials/_forms.sass */ .process .ajax-error.alt { display: block; } /* line 755, ../../src/stylesheets/partials/_forms.sass */ .process a.delete-row { float: none; position: absolute; right: 4px; top: 4px; } /* line 761, ../../src/stylesheets/partials/_forms.sass */ a.delete-row { background: #d30000; color: white; display: block; float: right; font-size: 10px; font-weight: bold; height: 18px; position: relative; z-index: 1000; line-height: 18px; margin-left: 5px; opacity: 0.2; text-align: center; text-decoration: none; width: 18px; -webkit-border-radius: 50%; -moz-border-radius: 50%; -ms-border-radius: 50%; -o-border-radius: 50%; border-radius: 50%; } /* line 778, ../../src/stylesheets/partials/_forms.sass */ a.delete-row:hover, a.delete-row:focus { opacity: 1; } /* line 782, ../../src/stylesheets/partials/_forms.sass */ .filters .ui-datepicker-trigger { position: absolute; right: 13px; top: 17px; } /* line 786, ../../src/stylesheets/partials/_forms.sass */ .ui-datepicker-trigger { position: relative; right: 20px; top: 4px; } /* line 790, ../../src/stylesheets/partials/_forms.sass */ .ui-datepicker-title, .ui-datepicker-calendar { font-size: 12px !important; } /* line 794, ../../src/stylesheets/partials/_forms.sass */ .period-month-year { display: inline-block; width: 20%; } /* line 797, ../../src/stylesheets/partials/_forms.sass */ .period-month-year input[type=text] { float: left; width: 55px; } /* line 800, ../../src/stylesheets/partials/_forms.sass */ .period-month-year label { width: auto; } /* line 802, ../../src/stylesheets/partials/_forms.sass */ .time-date { display: inline-block; width: 33%; } /* line 805, ../../src/stylesheets/partials/_forms.sass */ .time-date label { width: auto; } /* line 808, ../../src/stylesheets/partials/_forms.sass */ .week-days-options { display: inline-block; width: auto; } /* line 812, ../../src/stylesheets/partials/_forms.sass */ .small-text-field { width: 133px !important; } /* line 815, ../../src/stylesheets/partials/_forms.sass */ .rows-wrapper .row { float: none !important; display: inline-block !important; } /* line 1, ../../src/stylesheets/partials/_flashes.sass */ .flash-message { background: #f6fdeb; border-bottom: #d8e3eb 1px solid; text-align: center; background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #f6fdeb), color-stop(100%, #edf4e2)); background: -webkit-linear-gradient(#f6fdeb, #edf4e2); background: -moz-linear-gradient(#f6fdeb, #edf4e2); background: -o-linear-gradient(#f6fdeb, #edf4e2); background: linear-gradient(#f6fdeb, #edf4e2); } /* line 6, ../../src/stylesheets/partials/_flashes.sass */ .flash-message p { color: #217c00; font-size: 12px; font-weight: bold; padding: 10px 0; text-shadow: rgba(255, 255, 255, 0.2) 0 1px 0; } /* line 13, ../../src/stylesheets/partials/_flashes.sass */ .nav-help { background: url("../images/icons/point.png") no-repeat 0 0; margin: 10px 15px; padding: 10px 10px 10px 42px; } /* line 18, ../../src/stylesheets/partials/_flashes.sass */ .success-box { background-color: #f6fdeb; border: 1px solid #e5ecda; margin-bottom: 10px; padding: 10px; -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; *zoom: 1; text-shadow: white, 0, 1px, 0; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .success-box:after { content: ""; display: table; clear: both; } /* line 27, ../../src/stylesheets/partials/_flashes.sass */ .success-box .success { float: left; width: 70%; } /* line 30, ../../src/stylesheets/partials/_flashes.sass */ .success-box form { float: right; } /* line 33, ../../src/stylesheets/partials/_flashes.sass */ .success { background: url("../images/icons/check.png") no-repeat 0 0; padding: 10px 10px 10px 42px; } /* line 37, ../../src/stylesheets/partials/_flashes.sass */ .question-container { margin-bottom: 20px; *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .question-container:after { content: ""; display: table; clear: both; } /* line 41, ../../src/stylesheets/partials/_flashes.sass */ .question-help-container { position: relative; } /* line 44, ../../src/stylesheets/partials/_flashes.sass */ .question-help { background: url("../images/icons/info.png") no-repeat 11px center #f6fdeb; border: 1px solid #e5ecda; font-size: 11px; line-height: 1.5; margin-bottom: 10px; padding: 15px 45px; position: relative; -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; text-shadow: white, 0, 1px, 0; } /* line 55, ../../src/stylesheets/partials/_flashes.sass */ .show-question-help { display: none; } /* line 57, ../../src/stylesheets/partials/_flashes.sass */ .show-question-help a { font-size: 11px; opacity: 0.6; text-shadow: white 0 1px 0; } /* line 61, ../../src/stylesheets/partials/_flashes.sass */ .show-question-help a:hover, .show-question-help a:focus { color: #258cd5; opacity: 1; } /* line 64, ../../src/stylesheets/partials/_flashes.sass */ .show-question-help.moved { float: right; margin-top: -42px; position: relative; z-index: 11; } /* line 70, ../../src/stylesheets/partials/_flashes.sass */ .hide-question-help { background: url("../images/icons/icon_close_flash.png") no-repeat center; cursor: pointer; height: 12px; left: 97%; opacity: 0.3; position: absolute; text-indent: -6666px; top: 40%; width: 12px; } /* line 80, ../../src/stylesheets/partials/_flashes.sass */ .hide-question-help:hover, .hide-question-help:focus { opacity: 1; } /* line 84, ../../src/stylesheets/partials/_flashes.sass */ #incomplete-sections-container > div { background: url("../images/icons/fail.png") no-repeat 11px center #f4e9e9; border: 1px solid #e3d8d8; margin-bottom: 10px; padding: 10px 10px 10px 52px; -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; *zoom: 1; text-shadow: white, 0, 1px, 0; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ #incomplete-sections-container > div:after { content: ""; display: table; clear: both; } /* line 92, ../../src/stylesheets/partials/_flashes.sass */ #incomplete-sections-container li { padding: 6px 0 0 10px; } /* line 96, ../../src/stylesheets/partials/_flashes.sass */ #invalid-questions-container > div { background: url("../images/icons/warning.png") no-repeat 11px center #e9f4fc; border: 1px solid #e5ecda; padding: 10px 10px 10px 52px; -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; *zoom: 1; text-shadow: white, 0, 1px, 0; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ #invalid-questions-container > div:after { content: ""; display: table; clear: both; } /* line 103, ../../src/stylesheets/partials/_flashes.sass */ #invalid-questions-container h5 { font-style: italic; padding: 10px 0 5px 8px; } /* line 108, ../../src/stylesheets/partials/_flashes.sass */ .message.login { background: #e9f4fc; border: 1px solid #d8e3eb; color: #d30000; font-size: 11px; margin: 15px auto 0; padding: 10px; text-align: center; width: 400px; -webkit-border-radius: 5px; -moz-border-radius: 5px; -ms-border-radius: 5px; -o-border-radius: 5px; border-radius: 5px; text-shadow: white, 0, 1px, 0; } /* line 120, ../../src/stylesheets/partials/_flashes.sass */ .item-status { position: absolute; right: 0px; } /* line 124, ../../src/stylesheets/partials/_flashes.sass */ .item-status span { display: block; width: 16px; height: 12px; } /* line 129, ../../src/stylesheets/partials/_flashes.sass */ .item-status span.hidden { display: none; } /* line 134, ../../src/stylesheets/partials/_flashes.sass */ .item-status .section-status-complete, .item-status .objective-status-complete { background: url("../images/icons/status_complete.png") center no-repeat; } /* line 136, ../../src/stylesheets/partials/_flashes.sass */ .item-status .section-status-invalid, .item-status .objective-status-invalid { background: url("../images/icons/status_invalid.png") center no-repeat; } /* line 138, ../../src/stylesheets/partials/_flashes.sass */ .item-status .section-status-closed, .item-status .objective-status-closed { background: url("../images/icons/status_closed.png") center no-repeat; } /* line 142, ../../src/stylesheets/partials/_flashes.sass */ .element.errors { position: relative; } /* line 145, ../../src/stylesheets/partials/_flashes.sass */ .error-list { opacity: 0.65; padding-left: 140px; *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .error-list:after { content: ""; display: table; clear: both; } /* line 149, ../../src/stylesheets/partials/_flashes.sass */ .error-list li { background: #d30000; color: white; float: left; font-size: 11px; font-weight: bold; padding: 5px 10px; -webkit-box-shadow: #aaaaaa 1px 1px 3px; -moz-box-shadow: #aaaaaa 1px 1px 3px; box-shadow: #aaaaaa 1px 1px 3px; text-shadow: #8f0000 0 1px 0; } /* line 158, ../../src/stylesheets/partials/_flashes.sass */ .error-list li:last-child { -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; border-bottom-left-radius: 5px; -moz-border-radius-bottomright: 5px; -webkit-border-bottom-right-radius: 5px; border-bottom-right-radius: 5px; -moz-border-radius-topright: 5px; -webkit-border-top-right-radius: 5px; border-top-right-radius: 5px; } /* line 161, ../../src/stylesheets/partials/_flashes.sass */ .error-list li a { color: white; font-size: 11px; } /* line 165, ../../src/stylesheets/partials/_flashes.sass */ .adv-form .error-list { position: absolute; top: 21px; left: 0; z-index: 20; } /* line 175, ../../src/stylesheets/partials/_flashes.sass */ .ajax-in-process input, .ajax-in-process input:hover, .ajax-in-process input:focus { background: url("../images/icons/in_progress.gif") no-repeat 95% center; } /* line 177, ../../src/stylesheets/partials/_flashes.sass */ .ajax-in-process select, .ajax-in-process select:hover, .ajax-in-process select:focus { background: url("../images/icons/in_progress.gif") no-repeat 90% center; } /* line 181, ../../src/stylesheets/partials/_flashes.sass */ .ajax-error input, .ajax-error input:hover, .ajax-error input:focus { background: url("../images/icons/input_error.png") no-repeat 95% center; } /* line 183, ../../src/stylesheets/partials/_flashes.sass */ .ajax-error select, .ajax-error select:hover, .ajax-error select:focus { background: url("../images/icons/input_error.png") no-repeat 90% center; } /* line 186, ../../src/stylesheets/partials/_flashes.sass */ .ajax-disabled, .skipped { cursor: wait; opacity: 0.5; } /* line 191, ../../src/stylesheets/partials/_flashes.sass */ .message { background: #65c029; border: 1px solid #54af18; color: white; font-size: 11px; font-weight: bold; margin: 0 275px; opacity: 0.8; padding: 5px 10px; position: absolute; text-align: center; top: 0; width: 430px; -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; -webkit-box-shadow: #cccccc 0 1px 3px; -moz-box-shadow: #cccccc 0 1px 3px; box-shadow: #cccccc 0 1px 3px; text-shadow: #439e07 0 1px 0; } /* line 207, ../../src/stylesheets/partials/_flashes.sass */ .message.error { background: #d30000; border: 1px solid #c20000; text-shadow: #b10000 0 1px 0; } /* line 211, ../../src/stylesheets/partials/_flashes.sass */ .message:hover { opacity: 1; } /* line 215, ../../src/stylesheets/partials/_flashes.sass */ .register td { vertical-align: top; } /* line 217, ../../src/stylesheets/partials/_flashes.sass */ .register .error-list { left: 10px; padding-left: 0; } /* line 2, ../../src/stylesheets/partials/_nicetable.sass */ table.nice-table .cell.value { opacity: 0.2; } /* line 5, ../../src/stylesheets/partials/_nicetable.sass */ table.nice-table .highlighted.cell { opacity: 1; } /* line 8, ../../src/stylesheets/partials/_nicetable.sass */ table.nice-table .selected.cell { opacity: 1; } /* line 11, ../../src/stylesheets/partials/_nicetable.sass */ table.nice-table .highlighted.label, table.nice-table .selected.label { font-weight: bold; } /* line 14, ../../src/stylesheets/partials/_nicetable.sass */ table.nice-table .cell.me-selected { font-weight: bold; } /* line 17, ../../src/stylesheets/partials/_nicetable.sass */ table.nice-table .cell { cursor: default; } /* line 3, ../../src/stylesheets/partials/_dashboard.sass */ #dashboard #top { width: 822px; float: left; } /* line 8, ../../src/stylesheets/partials/_dashboard.sass */ #dashboard #bottom #left { width: 144px; float: left; } /* line 12, ../../src/stylesheets/partials/_dashboard.sass */ #dashboard #bottom #left div { float: left; width: 116px; margin-right: 10px; } /* line 17, ../../src/stylesheets/partials/_dashboard.sass */ #dashboard #bottom #left div li { display: block; } /* line 21, ../../src/stylesheets/partials/_dashboard.sass */ #dashboard #center { width: 822px; float: left; } /* line 25, ../../src/stylesheets/partials/_dashboard.sass */ #dashboard #center #values { width: 100%; float: left; overflow-x: scroll; } /* line 32, ../../src/stylesheets/partials/_dashboard.sass */ #dashboard #center #values > table > thead > tr > th, #dashboard #center #values > table > thead > tr > td, #dashboard #center #values > table > tbody > tr > th, #dashboard #center #values > table > tbody > tr > td { margin: 0; padding: 0; } /* line 36, ../../src/stylesheets/partials/_dashboard.sass */ #dashboard #center #values > table .explanation-cell { display: none; width: 98%; float: left; margin-right: 10px; } /* line 42, ../../src/stylesheets/partials/_dashboard.sass */ #dashboard #center .header .row .cell { height: inherit; } /* line 45, ../../src/stylesheets/partials/_dashboard.sass */ #dashboard #center tbody tr.row { white-space: nowrap; } /* line 48, ../../src/stylesheets/partials/_dashboard.sass */ #dashboard #center .cell { display: inline-block; width: 73.333px; float: left; } /* line 53, ../../src/stylesheets/partials/_dashboard.sass */ #dashboard #center .cell div { display: block; height: 2em; margin-top: 2px; margin-bottom: 2px; margin-right: 4px; } /* line 61, ../../src/stylesheets/partials/_dashboard.sass */ #dashboard #center .cell.value { cursor: pointer; text-align: center; } /* line 66, ../../src/stylesheets/partials/_dashboard.sass */ #dashboard #center .value span, #dashboard #center .label.left span { top: 25%; position: relative; } /* line 70, ../../src/stylesheets/partials/_dashboard.sass */ #dashboard #center .label.top { text-align: center; } /* line 72, ../../src/stylesheets/partials/_dashboard.sass */ #dashboard #center .label.top div { height: auto; } /* line 75, ../../src/stylesheets/partials/_dashboard.sass */ #dashboard #center .label.left { width: 140px; } /* line 78, ../../src/stylesheets/partials/_dashboard.sass */ #dashboard .explanation { width: 100%; padding: 4px; } /* line 82, ../../src/stylesheets/partials/_dashboard.sass */ #dashboard .explanation .highlighted div, #dashboard .explanation .selected div, #dashboard .explanation .highlighted, #dashboard .explanation .selected { background-color: yellow; font-weight: bold; } /* line 86, ../../src/stylesheets/partials/_dashboard.sass */ #dashboard .explanation .info { margin-right: 18px; } /* line 89, ../../src/stylesheets/partials/_dashboard.sass */ #dashboard .explanation .average span.value { float: left; color: red; padding-bottom: 4px; margin-right: 4px; } /* line 96, ../../src/stylesheets/partials/_dashboard.sass */ #dashboard .explanation div > ul li { width: 160px; margin-right: 8px; white-space: normal; } /* line 101, ../../src/stylesheets/partials/_dashboard.sass */ #dashboard .explanation .span table { margin-bottom: 0px; } /* line 103, ../../src/stylesheets/partials/_dashboard.sass */ #dashboard .explanation .span table th, #dashboard .explanation .span table td { margin-right: 4px; padding: 0px 4px 0px 0px; } /* line 107, ../../src/stylesheets/partials/_dashboard.sass */ #dashboard .explanation .span table thead { font-weight: bold; } /* line 110, ../../src/stylesheets/partials/_dashboard.sass */ #dashboard .explanation .span table tbody { white-space: normal; } /* line 113, ../../src/stylesheets/partials/_dashboard.sass */ #dashboard .explanation .span table tbody td, #dashboard .explanation .span table thead th { text-align: right; } /* line 117, ../../src/stylesheets/partials/_dashboard.sass */ #dashboard .explanation .element:hover { cursor: pointer; } /* line 120, ../../src/stylesheets/partials/_dashboard.sass */ #dashboard .explanation .span { width: 100%; margin-top: 8px; margin-bottom: 4px; } /* line 125, ../../src/stylesheets/partials/_dashboard.sass */ #dashboard .explanation .span div { margin-bottom: 4px; } /* line 1, ../../src/stylesheets/partials/_maps.sass */ #maps #map_canvas { height: 640px; } /* line 1, ../../src/stylesheets/partials/_tipsy.sass */ .tipsy { padding: 5px; font-size: 11px; font-weight: bold; line-height: 1.4; opacity: 1; position: absolute; z-index: 100000; letter-spacing: 0.05; } /* line 11, ../../src/stylesheets/partials/_tipsy.sass */ .tipsy-inner { padding: 5px 10px; background: #111111; border: 1px solid black; max-width: 400px; color: white; text-align: left; -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: #dddddd 0 0 5px; -moz-box-shadow: #dddddd 0 0 5px; box-shadow: #dddddd 0 0 5px; text-shadow: black 0 1px 0; } /* line 22, ../../src/stylesheets/partials/_tipsy.sass */ .tipsy-arrow { position: absolute; background: url("../images/tipsy.gif") no-repeat top left; width: 9px; height: 5px; } /* line 28, ../../src/stylesheets/partials/_tipsy.sass */ .tipsy-n .tipsy-arrow { top: 0; left: 50%; margin-left: -4px; } /* line 33, ../../src/stylesheets/partials/_tipsy.sass */ .tipsy-nw .tipsy-arrow { top: 0; left: 10px; } /* line 37, ../../src/stylesheets/partials/_tipsy.sass */ .tipsy-ne .tipsy-arrow { top: 0; right: 10px; } /* line 41, ../../src/stylesheets/partials/_tipsy.sass */ .tipsy-south .tipsy-arrow { bottom: 0; left: 50%; margin-left: -4px; background-position: bottom; } /* line 47, ../../src/stylesheets/partials/_tipsy.sass */ .tipsy-sw .tipsy-arrow { bottom: 0; left: 10px; background-position: bottom left; } /* line 52, ../../src/stylesheets/partials/_tipsy.sass */ .tipsy-se .tipsy-arrow { bottom: 0; right: 10px; background-position: bottom left; } /* line 57, ../../src/stylesheets/partials/_tipsy.sass */ .tipsy-e .tipsy-arrow { top: 50%; margin-top: -4px; right: 0; width: 5px; height: 9px; background-position: top right; } /* line 65, ../../src/stylesheets/partials/_tipsy.sass */ .tipsy-w .tipsy-arrow { top: 50%; margin-top: -4px; left: 0; width: 5px; height: 9px; } /* line 1, ../../src/stylesheets/partials/_cluetip.sass */ .cluetip-default #cluetip-outer { background: #258cd5; } /* line 4, ../../src/stylesheets/partials/_cluetip.sass */ .cluetip-default h3#cluetip-title { background: #258cd5; float: right; margin-top: 6px; margin-bottom: 0; opacity: 0.5; padding: 5px; position: relative; z-index: 10; } /* line 13, ../../src/stylesheets/partials/_cluetip.sass */ .cluetip-default h3#cluetip-title:hover, .cluetip-default h3#cluetip-title:focus { opacity: 1; } /* line 16, ../../src/stylesheets/partials/_cluetip.sass */ .cluetip-default div#cluetip-close { margin-bottom: 0; } /* line 18, ../../src/stylesheets/partials/_cluetip.sass */ .cluetip-default div#cluetip-close a { color: white; } /* line 21, ../../src/stylesheets/partials/_cluetip.sass */ .clue-right-default .cluetip-arrows { background-image: url("../images/darrowleft.png"); } /* line 24, ../../src/stylesheets/partials/_cluetip.sass */ .cluetip-default #cluetip-inner { color: white; font-size: 12px; line-height: 1.6; padding: 10px 15px 0; position: relative; } /* line 30, ../../src/stylesheets/partials/_cluetip.sass */ .cluetip-default #cluetip-inner a { background: #369de6; background: rgba(255, 255, 255, 0.2); border-top: 1px solid #036ab3; border-top: 1px solid rgba(0, 0, 0, 0.2); color: white; color: rgba(255, 255, 255, 0.8); display: block; font-weight: bold; margin: 6px -15px 0; padding: 4px 10px; text-align: center; text-decoration: none; } /* line 43, ../../src/stylesheets/partials/_cluetip.sass */ .cluetip-default #cluetip-inner a:hover, .cluetip-default #cluetip-inner a:focus { background: #65c029; border: 1px solid #54af18; color: white; } /* line 47, ../../src/stylesheets/partials/_cluetip.sass */ .cluetip-default #cluetip-inner span { color: white; font-weight: bold; } /* line 6, ../../src/stylesheets/partials/_report.sass */ #report #values { overflow: auto; } /* line 8, ../../src/stylesheets/partials/_report.sass */ #report .parent-row { background-color: #258cd5; color: white; } /* line 13, ../../src/stylesheets/partials/_report.sass */ #report .box-report-value { background-color: white; border: 1px solid #d8e3eb; text-align: right; } /* line 20, ../../src/stylesheets/partials/_report.sass */ #report .box-report-organisation { background-color: #e9f4fc; border: 1px solid #d8e3eb; color: #258cd5; text-align: left; } /* line 27, ../../src/stylesheets/partials/_report.sass */ #report .object-name-box { background: #f6fdeb; border: 1px solid #d8e3eb; color: #258cd5; width: 70px; font-weight: bold; } /* line 33, ../../src/stylesheets/partials/_report.sass */ #report .object-name-box div { margin-bottom: 5px; } /* line 35, ../../src/stylesheets/partials/_report.sass */ #report .object-name-box span a { font-size: 10px; font-weight: normal; } /* line 39, ../../src/stylesheets/partials/_report.sass */ #report .title-th { width: 10px; color: #258cd5; background: #e9f4fc; border: 1px solid #d8e3eb; border-width: 1px 1px 1px 0px; vertical-align: bottom; } /* line 46, ../../src/stylesheets/partials/_report.sass */ #report .title-th a { font-size: 10px; font-weight: normal; } /* line 51, ../../src/stylesheets/partials/_report.sass */ #report .add-link:hover, #report .add-link:focus, #report .edit-link:hover, #report .edit-link:focus { color: #65c029; } /* line 55, ../../src/stylesheets/partials/_report.sass */ #report .delete-link:hover, #report .delete-link:focus { color: #d30000; } /* line 61, ../../src/stylesheets/partials/_report.sass */ .paginate { margin: 14px 14px 25px; *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .paginate:after { content: ""; display: table; clear: both; } /* line 64, ../../src/stylesheets/partials/_report.sass */ .paginate li { display: inline; float: left; } /* line 67, ../../src/stylesheets/partials/_report.sass */ .paginate a { background: #e9f4fc; border: 1px solid rgba(0, 0, 0, 0.1); display: block; margin-right: 4px; padding: 6px 9px; text-decoration: none; } /* line 74, ../../src/stylesheets/partials/_report.sass */ .paginate a:hover, .paginate a:focus { background: #f6fdeb; border: 1px solid #258cd5; } /* line 77, ../../src/stylesheets/partials/_report.sass */ .paginate a.active { background: #258cd5; color: white; } /* line 84, ../../src/stylesheets/partials/_report.sass */ .v-tabs { position: relative; *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .v-tabs:after { content: ""; display: table; clear: both; } /* line 87, ../../src/stylesheets/partials/_report.sass */ .v-tabs .tipsy-inner { font-weight: regular; } /* line 89, ../../src/stylesheets/partials/_report.sass */ .v-tabs a { cursor: pointer; text-decoration: none; } /* line 93, ../../src/stylesheets/partials/_report.sass */ .v-tabs .custom { position: absolute; right: 0; } /* line 97, ../../src/stylesheets/partials/_report.sass */ .v-tabs-nav { width: 100%; } /* line 99, ../../src/stylesheets/partials/_report.sass */ .v-tabs-nav li { display: inline; float: left; } /* line 102, ../../src/stylesheets/partials/_report.sass */ .v-tabs-nav a { color: #888888; display: block; font-size: 13px; padding: 14px 18px; text-decoration: none; text-shadow: white 0 1px 0; -webkit-transition: color 0.2s; -moz-transition: color 0.2s; -o-transition: color 0.2s; transition: color 0.2s; } /* line 110, ../../src/stylesheets/partials/_report.sass */ .v-tabs-nav a:hover, .v-tabs-nav a:focus { color: #258cd5; } /* line 112, ../../src/stylesheets/partials/_report.sass */ .v-tabs-nav a.active { background: white; border: 1px solid rgba(0, 0, 0, 0.1); border-bottom: none; bottom: -1px; color: #258cd5; font-weight: bold; position: relative; } /* line 121, ../../src/stylesheets/partials/_report.sass */ .v-tabs-subnav-wrapper { float: left; } /* line 123, ../../src/stylesheets/partials/_report.sass */ .v-tabs-subnav-wrapper.slide-wrapper { overflow: hidden; width: 80%; } /* line 127, ../../src/stylesheets/partials/_report.sass */ .v-tabs-box { line-height: 1.4; *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .v-tabs-box:after { content: ""; display: table; clear: both; } /* line 130, ../../src/stylesheets/partials/_report.sass */ .v-tabs-box > * { float: left; } /* line 133, ../../src/stylesheets/partials/_report.sass */ .v-tabs-subnav { padding-left: 5px; position: relative; *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .v-tabs-subnav:after { content: ""; display: table; clear: both; } /* line 138, ../../src/stylesheets/partials/_report.sass */ .v-tabs-subnav ul { padding-left: 30px; } /* line 140, ../../src/stylesheets/partials/_report.sass */ .v-tabs-subnav li { display: inline; float: left; max-width: 150px; position: relative; } /* line 145, ../../src/stylesheets/partials/_report.sass */ .v-tabs-subnav p { float: left; max-width: 150px; position: relative; } /* line 149, ../../src/stylesheets/partials/_report.sass */ .v-tabs-subnav a { bottom: -1px; color: #bbbbbb; display: inline-block; padding: 15px 0 15px 15px; position: relative; text-decoration: none; -webkit-transition: color 0.2s; -moz-transition: color 0.2s; -o-transition: color 0.2s; transition: color 0.2s; } /* line 157, ../../src/stylesheets/partials/_report.sass */ .v-tabs-subnav a.active { background: url("../images/bump.png") no-repeat bottom center; color: #258cd5; } /* line 160, ../../src/stylesheets/partials/_report.sass */ .v-tabs-subnav a:hover, .v-tabs-subnav a:focus { color: #258cd5; } /* line 165, ../../src/stylesheets/partials/_report.sass */ .v-tabs-subnav .right { float: right !important; margin-right: 14px; margin-top: -3px; } /* line 169, ../../src/stylesheets/partials/_report.sass */ .v-tabs-subnav .right a { font-size: 14px; font-weight: bold; } /* line 172, ../../src/stylesheets/partials/_report.sass */ .v-tabs-subnav.slide { margin-left: 0; padding-left: 0; } /* line 179, ../../src/stylesheets/partials/_report.sass */ .v-tabs-subnav-scroll-right, .v-tabs-subnav-scroll-left { background: white; display: block; margin-top: 12px; padding: 0; width: 10px; z-index: 1000; text-indent: -9999em; } /* line 188, ../../src/stylesheets/partials/_report.sass */ .v-tabs-subnav-scroll-right { background: url("../images/arrow-right.png") no-repeat center; } /* line 191, ../../src/stylesheets/partials/_report.sass */ .v-tabs-subnav-scroll-left { background: url("../images/arrow-left.png") no-repeat center; } /* line 197, ../../src/stylesheets/partials/_report.sass */ .v-tabs-dynav-wrap { position: relative; *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .v-tabs-dynav-wrap:after { content: ""; display: table; clear: both; } /* line 200, ../../src/stylesheets/partials/_report.sass */ .v-tabs-dynav-wrap > * { float: right; } /* line 202, ../../src/stylesheets/partials/_report.sass */ .v-tabs-dynav-wrap a { background-color: none; color: #bbbbbb; display: block; max-width: 167px; padding: 15px 10px; position: relative; text-decoration: none; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; -webkit-transition: color 0.2s; -moz-transition: color 0.2s; -o-transition: color 0.2s; transition: color 0.2s; } /* line 215, ../../src/stylesheets/partials/_report.sass */ .v-tabs-dynav-wrap a.active { color: #258cd5; } /* line 217, ../../src/stylesheets/partials/_report.sass */ .v-tabs-dynav-wrap a:hover, .v-tabs-dynav-wrap a:focus { color: #258cd5; background: rgba(0, 0, 0, 0.02); } /* line 221, ../../src/stylesheets/partials/_report.sass */ .v-tabs-dynav-wrap a.v-tabs-dynav-scroll-right, .v-tabs-dynav-wrap a.v-tabs-dynav-scroll-left { background: white; display: inline; height: 46px; opacity: 0.6; padding: 0; position: relative; text-indent: -9999em; width: 39px; z-index: 1000; -webkit-transition: all 0.4s; -moz-transition: all 0.4s; -o-transition: all 0.4s; transition: all 0.4s; } /* line 232, ../../src/stylesheets/partials/_report.sass */ .v-tabs-dynav-wrap a.v-tabs-dynav-scroll-right:hover, .v-tabs-dynav-wrap a.v-tabs-dynav-scroll-right:focus, .v-tabs-dynav-wrap a.v-tabs-dynav-scroll-left:hover, .v-tabs-dynav-wrap a.v-tabs-dynav-scroll-left:focus { opacity: 1; } /* line 235, ../../src/stylesheets/partials/_report.sass */ .v-tabs-dynav-wrap a.v-tabs-dynav-scroll-right { background: url("../images/arrow-right.png") no-repeat center; } /* line 237, ../../src/stylesheets/partials/_report.sass */ .v-tabs-dynav-wrap a.v-tabs-dynav-scroll-right:hover, .v-tabs-dynav-wrap a.v-tabs-dynav-scroll-right:focus { background-image: url("../images/arrow-right-hover.png"); } /* line 240, ../../src/stylesheets/partials/_report.sass */ .v-tabs-dynav-wrap a.v-tabs-dynav-scroll-left { background: url("../images/arrow-left.png") no-repeat center; } /* line 242, ../../src/stylesheets/partials/_report.sass */ .v-tabs-dynav-wrap a.v-tabs-dynav-scroll-left:hover, .v-tabs-dynav-wrap a.v-tabs-dynav-scroll-left:focus { background-image: url("../images/arrow-left-hover.png"); } /* line 245, ../../src/stylesheets/partials/_report.sass */ .v-tabs-dynav { height: 46px; line-height: 1.4; overflow: hidden; position: relative; width: 920px; } /* line 251, ../../src/stylesheets/partials/_report.sass */ .v-tabs-dynav ul { height: 46px; position: absolute; min-width: 1200px; } /* line 255, ../../src/stylesheets/partials/_report.sass */ .v-tabs-dynav li { border-right: 1px solid rgba(0, 0, 0, 0.05); display: inline-block; float: left; position: relative; width: 183px; } /* line 261, ../../src/stylesheets/partials/_report.sass */ .v-tabs-dynav li:nth-child(7n+5) { border-right: none; } /* line 264, ../../src/stylesheets/partials/_report.sass */ .v-tabs-dynav li:hover a, .v-tabs-dynav li:focus a { background: rgba(0, 0, 0, 0.05); color: #258cd5; } /* line 267, ../../src/stylesheets/partials/_report.sass */ .v-tabs-dynav li:hover .delete-node, .v-tabs-dynav li:focus .delete-node { background: url("../images/delete-box.png") no-repeat center transparent !important; } /* line 271, ../../src/stylesheets/partials/_report.sass */ .delete-node { background: url("../images/delete-box.png") no-repeat center; cursor: pointer; display: inline-block; height: 12px; line-height: 13px; margin-left: 0 !important; padding: 0 !important; position: absolute !important; right: 3px; text-indent: -9999em; top: 3px; width: 12px; opacity: 0.25; z-index: 1; -webkit-transition: all, 0.4s; -moz-transition: all, 0.4s; -o-transition: all, 0.4s; transition: all, 0.4s; } /* line 288, ../../src/stylesheets/partials/_report.sass */ .delete-node:hover, .delete-node:focus { background: url("../images/delete-box.png") no-repeat center transparent !important; opacity: 1; } /* line 295, ../../src/stylesheets/partials/_report.sass */ .shown-report { border-top: 1px solid #258cd5; } /* line 298, ../../src/stylesheets/partials/_report.sass */ .v-tabs-content { background: white; border: 1px solid rgba(0, 0, 0, 0.1); color: #666666; font-size: 12px; width: 998px; } /* line 304, ../../src/stylesheets/partials/_report.sass */ .v-tabs-content .filters { border: none !important; margin-bottom: 0; } /* line 307, ../../src/stylesheets/partials/_report.sass */ .v-tabs-content .filters-box { padding: 10px 0; } /* line 309, ../../src/stylesheets/partials/_report.sass */ .v-tabs-content > #showhide { cursor: pointer; font-size: 11px; margin-right: 14px; opacity: 0.5; } /* line 314, ../../src/stylesheets/partials/_report.sass */ .v-tabs-content > #showhide:hover, .v-tabs-content > #showhide:focus { opacity: 1; } /* line 316, ../../src/stylesheets/partials/_report.sass */ .v-tabs-content .filters-close { float: right; margin: 10px 20px 0 0; opacity: 0.4; } /* line 320, ../../src/stylesheets/partials/_report.sass */ .v-tabs-content .filters-close:hover, .v-tabs-content .filters-close:focus { opacity: 1; } /* line 323, ../../src/stylesheets/partials/_report.sass */ .v-tabs-row p { *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .v-tabs-row p:after { content: ""; display: table; clear: both; } /* line 326, ../../src/stylesheets/partials/_report.sass */ .v-tabs-filters { border-bottom: 1px solid #258cd5; padding: 10px 0 10px 15px; *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .v-tabs-filters:after { content: ""; display: table; clear: both; } /* line 330, ../../src/stylesheets/partials/_report.sass */ .v-tabs-filters li { display: inline; float: left; font-size: 12px; margin-right: 20px; } /* line 336, ../../src/stylesheets/partials/_report.sass */ .v-tabs-summary { border: 10px solid #f1f7fc; padding: 0 0 9px; text-align: center; -webkit-box-shadow: #a5b0b8 0 0 1px 0 inset; -moz-box-shadow: #a5b0b8 0 0 1px 0 inset; box-shadow: #a5b0b8 0 0 1px 0 inset; *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .v-tabs-summary:after { content: ""; display: table; clear: both; } /* line 342, ../../src/stylesheets/partials/_report.sass */ .v-tabs-summary h2 { background: white; bottom: -10px; color: #999999; display: inline-block; font: bold 12px/1 "Droid Sans", sans-serif; margin: 9px auto 0; padding: 3px 10px; position: relative; text-align: center; text-transform: uppercase; z-index: 1; } /* line 354, ../../src/stylesheets/partials/_report.sass */ .v-tabs-summary hr { background: #eaeaea; border: none; height: 1px; margin: 0 50px 3px; } /* line 359, ../../src/stylesheets/partials/_report.sass */ .v-tabs-summary ul { text-align: center; } /* line 361, ../../src/stylesheets/partials/_report.sass */ .v-tabs-summary li { display: inline-block; font-family: "Droid Sans", sans-serif; padding: 15px 20px 25px; } /* line 365, ../../src/stylesheets/partials/_report.sass */ .v-tabs-summary a { display: block; font: bold 36px/1.2 "Droid Sans", sans-serif; text-decoration: none; } /* line 369, ../../src/stylesheets/partials/_report.sass */ .v-tabs-summary span { color: #999999; display: block; font-size: 12px; font-weight: normal; } /* line 375, ../../src/stylesheets/partials/_report.sass */ .v-tabs-criteria { background: #f1f7fc; border: none; padding: 25px 0 0; *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .v-tabs-criteria:after { content: ""; display: table; clear: both; } /* line 380, ../../src/stylesheets/partials/_report.sass */ .v-tabs-criteria .tooltip { color: #258cd5; text-decoration: underline; } /* line 383, ../../src/stylesheets/partials/_report.sass */ .v-tabs-criteria h1 { float: left; font-size: 30px; padding: 5px 25px 20px; } /* line 388, ../../src/stylesheets/partials/_report.sass */ .v-tabs-criteria ul { float: left; padding: 0px 10px 20px; } /* line 392, ../../src/stylesheets/partials/_report.sass */ .v-tabs-criteria li { border-right: 1px solid #e5e5e5; display: inline-block; float: left; line-height: 1.5; padding: 0 25px; text-align: left; text-shadow: white 0 1px 0; } /* line 400, ../../src/stylesheets/partials/_report.sass */ .v-tabs-criteria li:first-child { padding-left: 15px; } /* line 402, ../../src/stylesheets/partials/_report.sass */ .v-tabs-criteria li:last-child { border: none; } /* line 404, ../../src/stylesheets/partials/_report.sass */ .v-tabs-criteria a { color: #555555; cursor: default; text-decoration: none; } /* line 408, ../../src/stylesheets/partials/_report.sass */ .v-tabs-criteria span { color: #999999; display: block; font-style: italic; } /* line 412, ../../src/stylesheets/partials/_report.sass */ .v-tabs-criteria #showhide { cursor: pointer; font-size: 13px; font-weight: bold; } /* line 417, ../../src/stylesheets/partials/_report.sass */ .v-tabs-list { width: 100%; *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .v-tabs-list:after { content: ""; display: table; clear: both; } /* line 420, ../../src/stylesheets/partials/_report.sass */ .v-tabs-list li { border-top: 1px solid rgba(0, 0, 0, 0.1); padding: 0 0 0 10px; vertical-align: middle; *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .v-tabs-list li:after { content: ""; display: table; clear: both; } /* line 425, ../../src/stylesheets/partials/_report.sass */ .v-tabs-list li.selected { padding: 0; } /* line 427, ../../src/stylesheets/partials/_report.sass */ .v-tabs-list li.selected p { background: rgba(0, 0, 0, 0.02); border-bottom: 1px solid rgba(0, 0, 0, 0.15); color: #258cd5; margin-bottom: 5px; padding: 5px 10px; } /* line 433, ../../src/stylesheets/partials/_report.sass */ .v-tabs-list li.selected .v-tabs-switch img { -webkit-transform: rotate(90deg); -moz-transform: rotate(90deg); -ms-transform: rotate(90deg); -o-transform: rotate(90deg); transform: rotate(90deg); } /* line 436, ../../src/stylesheets/partials/_report.sass */ .v-tabs-list > li:hover, .v-tabs-list > li:focus, .v-tabs-list > li.selected { border: 1px solid #cccccc; margin: 0 -1px -1px; position: relative; z-index: 5; -webkit-box-shadow: rgba(0, 0, 0, 0.1) 0 0 5px; -moz-box-shadow: rgba(0, 0, 0, 0.1) 0 0 5px; box-shadow: rgba(0, 0, 0, 0.1) 0 0 5px; } /* line 442, ../../src/stylesheets/partials/_report.sass */ .v-tabs-list > li:first-child { border-top: none; } /* line 444, ../../src/stylesheets/partials/_report.sass */ .v-tabs-list.border { border-top: 1px solid #cccccc; } /* line 447, ../../src/stylesheets/partials/_report.sass */ .v-tabs-nested { border-top: 1px solid rgba(0, 0, 0, 0.1); margin: 0px 30px 15px; } /* line 450, ../../src/stylesheets/partials/_report.sass */ .v-tabs-nested li { padding: 0; } /* line 452, ../../src/stylesheets/partials/_report.sass */ .v-tabs-nested li:first-child { border-top: 0; } /* line 454, ../../src/stylesheets/partials/_report.sass */ .v-tabs-nested li:hover, .v-tabs-nested li:focus { background: rgba(0, 0, 0, 0.03); } /* line 456, ../../src/stylesheets/partials/_report.sass */ .v-tabs-nested .v-tabs-name { padding-top: 10px; padding-left: 10px; width: 660px; } /* line 461, ../../src/stylesheets/partials/_report.sass */ .v-tabs-nested-nav { margin: 20px 10px 10px 30px; *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .v-tabs-nested-nav:after { content: ""; display: table; clear: both; } /* line 464, ../../src/stylesheets/partials/_report.sass */ .v-tabs-nested-nav li { border: none; border-right: 1px solid #cccccc; display: inline; float: left; padding: 0 10px; *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .v-tabs-nested-nav li:after { content: ""; display: table; clear: both; } /* line 471, ../../src/stylesheets/partials/_report.sass */ .v-tabs-nested-nav li a { color: #aaaaaa; display: block; font-size: 11px; padding: 0; text-decoration: none; } /* line 477, ../../src/stylesheets/partials/_report.sass */ .v-tabs-nested-nav li a:hover, .v-tabs-nested-nav li a:focus { color: #258cd5; } /* line 479, ../../src/stylesheets/partials/_report.sass */ .v-tabs-nested-nav li a.active { color: #258cd5; font-weight: bold; } /* line 482, ../../src/stylesheets/partials/_report.sass */ .v-tabs-nested-nav li:last-child { border-right: none; } /* line 485, ../../src/stylesheets/partials/_report.sass */ .v-tabs-switch, .v-tabs-name, .v-tabs-formula, .v-tabs-value { float: left; } /* line 487, ../../src/stylesheets/partials/_report.sass */ .v-tabs-switch { margin: 1px 10px 0 10px; } /* line 489, ../../src/stylesheets/partials/_report.sass */ .v-tabs-name { padding: 12px 0 8px; width: 689px; } /* line 492, ../../src/stylesheets/partials/_report.sass */ .v-tabs-formula { background: #65c029; height: 12px; margin: 10px 20px; overflow: hidden; text-indent: -9999em; width: 12px; -webkit-border-radius: 6px; -moz-border-radius: 6px; -ms-border-radius: 6px; -o-border-radius: 6px; border-radius: 6px; } /* line 501, ../../src/stylesheets/partials/_report.sass */ .v-tabs-value { border-left: 1px solid rgba(0, 0, 0, 0.2); font-size: 15px; font-weight: bold; padding: 10px 0 8px 20px; width: 180px; } /* line 508, ../../src/stylesheets/partials/_report.sass */ .v-tabs-fold-container { display: none; } /* line 511, ../../src/stylesheets/partials/_report.sass */ div.comparison, div.geo_trend, div.info_by, div.preventive, div.equipment, div.spare_parts, div.monitoring { display: none; } /* line 523, ../../src/stylesheets/partials/_report.sass */ path { stroke: gray; fill: #f9f4e8; } /* line 526, ../../src/stylesheets/partials/_report.sass */ path:nth-child(n+5) { fill: sandybrown; } /* line 532, ../../src/stylesheets/partials/_report.sass */ #dialog-form { display: none; } /* line 536, ../../src/stylesheets/partials/_report.sass */ .dialog-form { *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .dialog-form:after { content: ""; display: table; clear: both; } /* line 539, ../../src/stylesheets/partials/_report.sass */ .dialog-form .date-picker { background: url("../images/icon_calendar.png") no-repeat 94% 50%; border: 1px solid #aaaaaa; font-size: 12px; height: auto; width: 100px; } /* line 545, ../../src/stylesheets/partials/_report.sass */ .dialog-form .dash { display: inline-block; float: left; margin: 4px 8px 0; color: #666666; } /* line 551, ../../src/stylesheets/partials/_report.sass */ .dialog-form.step-4 input[type=text] { height: auto; } /* line 554, ../../src/stylesheets/partials/_report.sass */ .ui-dialog { background: white !important; border: 1px solid rgba(0, 0, 0, 0.2); outline: none; padding: 0; position: absolute; top: 24% !important; width: 640px !important; z-index: 51; -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: rgba(0, 0, 0, 0.1) 0 0 5px, rgba(0, 0, 0, 0.15) 0 0 200px; -moz-box-shadow: rgba(0, 0, 0, 0.1) 0 0 5px, rgba(0, 0, 0, 0.15) 0 0 200px; box-shadow: rgba(0, 0, 0, 0.1) 0 0 5px, rgba(0, 0, 0, 0.15) 0 0 200px; } /* line 566, ../../src/stylesheets/partials/_report.sass */ .ui-dialog .ui-resizable-handle { display: none; } /* line 569, ../../src/stylesheets/partials/_report.sass */ .ui-dialog .ui-button-icon-only .ui-button-text, .ui-dialog .ui-button-icons-only .ui-button-text { text-indent: 0; } /* line 572, ../../src/stylesheets/partials/_report.sass */ .ui-dialog .row + .row { margin-top: 10px; } /* line 575, ../../src/stylesheets/partials/_report.sass */ .ui-dialog h2 { border-bottom: 1px solid #dddddd; color: #258cd5; font-size: 22px; margin: 10px 0 0; padding-bottom: 10px; } /* line 581, ../../src/stylesheets/partials/_report.sass */ .ui-dialog h2 span { color: #aaaaaa; font-size: 15px; font-weight: normal; margin-top: 3px; text-transform: uppercase; } /* line 587, ../../src/stylesheets/partials/_report.sass */ .ui-dialog h2 b { color: #666666; font-weight: bold; } /* line 590, ../../src/stylesheets/partials/_report.sass */ .ui-dialog p { background: #fcfcfc; border-bottom: 1px solid #e9e9e9; color: #888888; font-size: 11px; padding: 8px; } /* line 597, ../../src/stylesheets/partials/_report.sass */ .ui-dialog p b { color: #666666; font-weight: bold; } /* line 601, ../../src/stylesheets/partials/_report.sass */ .ui-dialog form fieldset { clear: both; margin-top: 25px; *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .ui-dialog form fieldset:after { content: ""; display: table; clear: both; } /* line 605, ../../src/stylesheets/partials/_report.sass */ .ui-dialog form fieldset li { border-bottom: 1px solid whitesmoke; margin-bottom: 5px; padding-bottom: 5px; *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .ui-dialog form fieldset li:after { content: ""; display: table; clear: both; } /* line 611, ../../src/stylesheets/partials/_report.sass */ .ui-dialog form fieldset li.modular input[type=text] { border: 1px solid #aaaaaa; font-size: 12px; height: auto; width: 100px; } /* line 616, ../../src/stylesheets/partials/_report.sass */ .ui-dialog form fieldset li.modular select { font-size: 12px; height: 27px; margin-left: 20px; padding: 4px 7px; width: 100px; } /* line 623, ../../src/stylesheets/partials/_report.sass */ .ui-dialog input, .ui-dialog select, .ui-dialog textarea { font-size: 12px !important; } /* line 626, ../../src/stylesheets/partials/_report.sass */ .ui-dialog label { color: #258cd5; display: inline-block; float: left; font-size: 11px; height: 11px; padding: 7px; width: 145px; } /* line 635, ../../src/stylesheets/partials/_report.sass */ .ui-dialog label + input[type=checkbox] { margin-left: 0; } /* line 637, ../../src/stylesheets/partials/_report.sass */ .ui-dialog .no-margin { margin-left: 0 !important; } /* line 640, ../../src/stylesheets/partials/_report.sass */ .ui-dialog input, .ui-dialog select, .ui-dialog textarea { display: inline-block; float: left; padding: 5px 7px; } /* line 644, ../../src/stylesheets/partials/_report.sass */ .ui-dialog input, .ui-dialog textarea { width: 380px; } /* line 646, ../../src/stylesheets/partials/_report.sass */ .ui-dialog input, .ui-dialog select { height: 28px; } /* line 649, ../../src/stylesheets/partials/_report.sass */ .ui-dialog .chzn-search input { float: none; height: auto; } /* line 653, ../../src/stylesheets/partials/_report.sass */ .ui-dialog select { color: #258cd5; font-size: 12px; width: 420px; -webkit-border-radius: 0; -moz-border-radius: 0; -ms-border-radius: 0; -o-border-radius: 0; border-radius: 0; } /* line 658, ../../src/stylesheets/partials/_report.sass */ .ui-dialog select:hover, .ui-dialog select:focus, .ui-dialog select:active { outline: none; } /* line 660, ../../src/stylesheets/partials/_report.sass */ .ui-dialog select + input[type=checkbox] { margin-bottom: 5px; } /* line 662, ../../src/stylesheets/partials/_report.sass */ .ui-dialog input[type=checkbox] { height: auto; margin-top: 6px; margin-left: 158px; width: auto; } /* line 667, ../../src/stylesheets/partials/_report.sass */ .ui-dialog input[type=checkbox] + span, .ui-dialog .word { color: #666666; margin-left: 3px; display: inline-block; font-size: 11px; margin-left: 3px; margin-top: 7px; } /* line 674, ../../src/stylesheets/partials/_report.sass */ .ui-dialog input[type=checkbox] + span.push, .ui-dialog .word.push { margin-left: 10px; margin-right: 10px; } /* line 677, ../../src/stylesheets/partials/_report.sass */ .ui-dialog .ui-widget-next { color: white; margin-top: 15px; } /* line 680, ../../src/stylesheets/partials/_report.sass */ .ui-dialog .ui-widget-previous { margin-top: 18px; } /* line 682, ../../src/stylesheets/partials/_report.sass */ .ui-dialog .ui-dialog-content { background: none; padding: 0 20px 20px !important; } /* line 685, ../../src/stylesheets/partials/_report.sass */ .ui-dialog .twocol-checkboxes { *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .ui-dialog .twocol-checkboxes:after { content: ""; display: table; clear: both; } /* line 687, ../../src/stylesheets/partials/_report.sass */ .ui-dialog .twocol-checkboxes li { display: inline; float: left; width: 50%; } /* line 692, ../../src/stylesheets/partials/_report.sass */ .ui-dialog .onecol-checkboxes input[type=checkbox], .ui-dialog .twocol-checkboxes input[type=checkbox], .ui-dialog .checkbox-list input[type=checkbox] { margin-left: 0; } /* line 694, ../../src/stylesheets/partials/_report.sass */ .ui-dialog .onecol-checkboxes input[type=checkbox] + label, .ui-dialog .twocol-checkboxes input[type=checkbox] + label, .ui-dialog .checkbox-list input[type=checkbox] + label { color: #666666; font-size: 11px; } /* line 697, ../../src/stylesheets/partials/_report.sass */ .ui-dialog .onecol-checkboxes { width: 50%; *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .ui-dialog .onecol-checkboxes:after { content: ""; display: table; clear: both; } /* line 700, ../../src/stylesheets/partials/_report.sass */ .ui-dialog .checkbox-list { *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .ui-dialog .checkbox-list:after { content: ""; display: table; clear: both; } /* line 702, ../../src/stylesheets/partials/_report.sass */ .ui-dialog .checkbox-list li { border-bottom: none; display: inline; float: left; margin-bottom: 0; padding-bottom: 0; width: 50%; } /* line 709, ../../src/stylesheets/partials/_report.sass */ .ui-dialog .checkbox-list li input[type=checkbox] { margin-left: 0; } /* line 711, ../../src/stylesheets/partials/_report.sass */ .ui-dialog label + .checkbox-list { padding-left: 160px; } /* line 713, ../../src/stylesheets/partials/_report.sass */ .ui-dialog .ui-dialog-titlebar { background: none !important; border: none !important; height: 30px; padding: 15px; position: relative; } /* line 719, ../../src/stylesheets/partials/_report.sass */ .ui-dialog .ui-dialog-titlebar-close { background: url("../images/icon_close.png") no-repeat !important; border: none !important; height: 18px; margin: 0 !important; opacity: 0.2; padding: 0 !important; right: 10px !important; text-indent: -9999em !important; top: 10px !important; width: 18px; -webkit-transition: all, 0.4s; -moz-transition: all, 0.4s; -o-transition: all, 0.4s; transition: all, 0.4s; } /* line 731, ../../src/stylesheets/partials/_report.sass */ .ui-dialog .ui-dialog-titlebar-close span { display: none !important; } /* line 733, ../../src/stylesheets/partials/_report.sass */ .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { opacity: 1; } /* line 735, ../../src/stylesheets/partials/_report.sass */ .ui-dialog .ui-dialog-titlebar-close.ui-state-hover { border: none !important; margin: 0 !important; padding: 0 !important; } /* line 740, ../../src/stylesheets/partials/_report.sass */ .ui-widget-overlay { background: rgba(0, 0, 0, 0.15); position: absolute; top: 0; z-index: 51 !important; } /* line 746, ../../src/stylesheets/partials/_report.sass */ .search-choice-close { background: url("../js/jquery/chosen/chosen-sprite.png") -49px -8px no-repeat !important; top: 5px !important; } /* line 3, ../../src/stylesheets/partials/_graphs.sass */ .horizontal-bar { background: #258cd5; height: 20px; opacity: 0.7; position: relative; width: 0; z-index: 5; background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #369de6), color-stop(100%, #147bc4)); background: -webkit-linear-gradient(#369de6, #147bc4); background: -moz-linear-gradient(#369de6, #147bc4); background: -o-linear-gradient(#369de6, #147bc4); background: linear-gradient(#369de6, #147bc4); -webkit-transition: all 2s ease; -moz-transition: all 2s ease; -o-transition: all 2s ease; transition: all 2s ease; } /* line 12, ../../src/stylesheets/partials/_graphs.sass */ .horizontal-bar:hover, .horizontal-bar:focus { opacity: 1; } /* line 15, ../../src/stylesheets/partials/_graphs.sass */ .horizontal-bar-avg { background: #258cd5; height: 12px; margin-top: -5px; opacity: 0.2; position: relative; width: 0; z-index: 5; background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #258cd5), color-stop(100%, #036ab3)); background: -webkit-linear-gradient(#258cd5, #036ab3); background: -moz-linear-gradient(#258cd5, #036ab3); background: -o-linear-gradient(#258cd5, #036ab3); background: linear-gradient(#258cd5, #036ab3); -webkit-transition: all 2s ease; -moz-transition: all 2s ease; -o-transition: all 2s ease; transition: all 2s ease; } /* line 25, ../../src/stylesheets/partials/_graphs.sass */ .horizontal-bar-avg:hover, .horizontal-bar-avg:focus { opacity: 1; } /* line 28, ../../src/stylesheets/partials/_graphs.sass */ .horizontal-bar-full { width: 71%; -webkit-transition: all 2s ease; -moz-transition: all 2s ease; -o-transition: all 2s ease; transition: all 2s ease; } /* line 32, ../../src/stylesheets/partials/_graphs.sass */ .selector { font-size: 11px; } /* line 34, ../../src/stylesheets/partials/_graphs.sass */ .selector select { background: white; border: 1px solid #47aef7; color: #258cd5; font-size: 11px; font-weight: bold; margin-top: 8px; opacity: 0.9; padding: 3px; -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: #e9f4fc 0 2px 0px; -moz-box-shadow: #e9f4fc 0 2px 0px; box-shadow: #e9f4fc 0 2px 0px; } /* line 45, ../../src/stylesheets/partials/_graphs.sass */ .selector select:hover, .selector select:focus { border: 1px solid #369de6; opacity: 1; } /* line 49, ../../src/stylesheets/partials/_graphs.sass */ .vertical-graph { float: left; width: 85%; } /* line 53, ../../src/stylesheets/partials/_graphs.sass */ .vertical-graph tr:first-child { background: #effaff; border-left: 1px solid #258cd5; border-bottom: 1px solid #258cd5; -webkit-box-shadow: #e9e9e9 0 -4px 6px inset; -moz-box-shadow: #e9e9e9 0 -4px 6px inset; box-shadow: #e9e9e9 0 -4px 6px inset; } /* line 58, ../../src/stylesheets/partials/_graphs.sass */ .vertical-graph tr:first-child td { height: 200px; } /* line 61, ../../src/stylesheets/partials/_graphs.sass */ .vertical-graph td { padding-top: 5px; text-align: center; vertical-align: bottom; } /* line 66, ../../src/stylesheets/partials/_graphs.sass */ .vertical-graph td div { display: inline-block; margin-bottom: -2px; width: 20px; } /* line 71, ../../src/stylesheets/partials/_graphs.sass */ .chart_legend { float: right; } /* line 73, ../../src/stylesheets/partials/_graphs.sass */ .chart_legend li { margin: 10px; } /* line 75, ../../src/stylesheets/partials/_graphs.sass */ .chart_legend li span { display: block; float: left; height: 10px; margin-right: 5px; width: 10px; } /* line 82, ../../src/stylesheets/partials/_graphs.sass */ .chart { display: inline-block; float: left; font-size: 10px; padding-right: 4px; text-align: right; width: 20px; } /* line 90, ../../src/stylesheets/partials/_graphs.sass */ .chart li:nth-child(2) { margin-top: 85px; } /* line 92, ../../src/stylesheets/partials/_graphs.sass */ .chart li:last-child { margin-top: 85px; } /* line 95, ../../src/stylesheets/partials/_graphs.sass */ .bar1 { background: #258cd5; } /* line 97, ../../src/stylesheets/partials/_graphs.sass */ .bar2 { background: #d30000; } /* line 99, ../../src/stylesheets/partials/_graphs.sass */ .bar3 { background: #65c029; } /* line 102, ../../src/stylesheets/partials/_graphs.sass */ .horizontal-graph-wrap { position: relative; } /* line 105, ../../src/stylesheets/partials/_graphs.sass */ .horizontal-graph-average { bottom: 1px; height: 233px; position: absolute; right: 0; width: 625px; } /* line 112, ../../src/stylesheets/partials/_graphs.sass */ .horizontal-graph-tip { background: #258cd5; color: white; font-size: 10px; font-weight: bold; height: 10px; left: 63%; margin: 10px 0 0 -7px; opacity: 0.6; padding: 3px; position: absolute; text-align: center; width: 10px; -webkit-border-radius: 10px; -moz-border-radius: 10px; -ms-border-radius: 10px; -o-border-radius: 10px; border-radius: 10px; -webkit-box-shadow: white 0 1px 0; -moz-box-shadow: white 0 1px 0; box-shadow: white 0 1px 0; } /* line 127, ../../src/stylesheets/partials/_graphs.sass */ .horizontal-graph-tip:hover, .horizontal-graph-tip:focus { opacity: 1; } /* line 130, ../../src/stylesheets/partials/_graphs.sass */ .horizontal-graph-marker { background: #fcfcfc; border-right: 1px solid #87e24b; bottom: 0; height: 200px; position: relative; top: 33px; width: 63%; -webkit-box-shadow: #eeeeee -2px 0 10px inset; -moz-box-shadow: #eeeeee -2px 0 10px inset; box-shadow: #eeeeee -2px 0 10px inset; } /* line 2, ../../src/stylesheets/partials/_comments.sass */ .comment-section label { color: #258cd5; display: inline-block; font-size: 11px; margin-left: 7px; padding-top: 5px; vertical-align: top; width: 100px; } /* line 10, ../../src/stylesheets/partials/_comments.sass */ .comment-section textarea { height: auto; width: 70%; } /* line 13, ../../src/stylesheets/partials/_comments.sass */ .comment-section button { margin: 5px 0 0 110px; } /* line 15, ../../src/stylesheets/partials/_comments.sass */ .comment-section .ajax-error { color: #d30000; display: inline; padding: 0 5px; } /* line 19, ../../src/stylesheets/partials/_comments.sass */ .comment-section .ajax-spinner { background: white; position: absolute; right: 6px; top: 11px; z-index: 10; } /* line 26, ../../src/stylesheets/partials/_comments.sass */ .comment-button { margin-bottom: 20px; position: relative; } /* line 31, ../../src/stylesheets/partials/_comments.sass */ .comment-list li { border-top: 1px solid #eeeeee; line-height: 1.5; padding: 10px 5px; position: relative; *zoom: 1; } /* line 38, ../../../../../.rvm/gems/jruby-1.7.5/gems/compass-0.12.2/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ .comment-list li:after { content: ""; display: table; clear: both; } /* line 37, ../../src/stylesheets/partials/_comments.sass */ .comment-list .delete-comment-option { float: right; } /* line 39, ../../src/stylesheets/partials/_comments.sass */ .comment-list .comment-written-by { color: #258cd5; display: block; font-size: 12px; font-weight: bold; } /* line 44, ../../src/stylesheets/partials/_comments.sass */ .comment-list .comment-written-on { color: #999999; display: block; font-size: 11px; } /* line 49, ../../src/stylesheets/partials/_comments.sass */ .comment-list .comment-meta { float: left; width: 135px; } /* line 52, ../../src/stylesheets/partials/_comments.sass */ .comment-list .comment-content { float: left; width: 700px; } /* line 1, ../../src/stylesheets/partials/_calendar.sass */ #calendar { font-size: 12px; padding: 20px !important; } /* line 5, ../../src/stylesheets/partials/_calendar.sass */ #calendar th.fc-widget-header { padding: 7px !important; } /* line 8, ../../src/stylesheets/partials/_calendar.sass */ #calendar .fc-grid .fc-day-number { padding: 5px; } /* line 11, ../../src/stylesheets/partials/_calendar.sass */ #calendar .fc-event { margin-bottom: 2px; } /* line 14, ../../src/stylesheets/partials/_calendar.sass */ #calendar .fc-event .fc-event-inner { line-height: 1.3; padding: 3px 0; } /* line 18, ../../src/stylesheets/partials/_calendar.sass */ #calendar .fc-event-skin { -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; } /* line 21, ../../src/stylesheets/partials/_calendar.sass */ #calendar .fc-event-time, #calendar .fc-event-title { float: left; } /* line 24, ../../src/stylesheets/partials/_calendar.sass */ #calendar .fc-event-time { padding-left: 3px; width: 22%; } /* line 28, ../../src/stylesheets/partials/_calendar.sass */ #calendar .fc-event-title { width: 70%; } /* line 31, ../../src/stylesheets/partials/_calendar.sass */ #calendar .fc-header-title { width: 70%; } /* line 33, ../../src/stylesheets/partials/_calendar.sass */ #calendar .fc-header-title h2 { font-size: 15px; font-weight: bold; padding-top: 5px; } /* line 1, ../../src/stylesheets/partials/_nav-table.sass */ .nav-table-wrap { position: relative; } /* line 4, ../../src/stylesheets/partials/_nav-table.sass */ .nav-table-wrap .category { bottom: 10px; color: rgba(0, 0, 0, 0.25); font-size: 11px; left: 20px; position: absolute; text-transform: uppercase; -webkit-transform: rotate(-90deg); -moz-transform: rotate(-90deg); -ms-transform: rotate(-90deg); -o-transform: rotate(-90deg); transform: rotate(-90deg); text-shadow: white 0 1px 1px; -webkit-transform-origin: bottom left; -moz-transform-origin: bottom left; -ms-transform-origin: bottom left; -o-transform-origin: bottom left; transform-origin: bottom left; } /* line 15, ../../src/stylesheets/partials/_nav-table.sass */ .nav-table { font-size: 11px; width: 970px; } /* line 18, ../../src/stylesheets/partials/_nav-table.sass */ .nav-table thead { background: #e9f4fc; border: 1px solid #d8e3eb; border-bottom: 1px solid #258cd5; color: #258cd5; -webkit-box-shadow: #d8e3eb 0 1px 4px inset; -moz-box-shadow: #d8e3eb 0 1px 4px inset; box-shadow: #d8e3eb 0 1px 4px inset; text-shadow: white 0 1px 0; } /* line 26, ../../src/stylesheets/partials/_nav-table.sass */ .nav-table tbody { border: 1px solid #d8e3eb; border-top: 1px solid #258cd5; border-right: none; } /* line 30, ../../src/stylesheets/partials/_nav-table.sass */ .nav-table tbody tr:nth-child(2) td { padding-top: 12px; } /* line 32, ../../src/stylesheets/partials/_nav-table.sass */ .nav-table tbody tr:last-child td { padding-bottom: 12px; } /* line 35, ../../src/stylesheets/partials/_nav-table.sass */ .nav-table th { padding: 10px; } /* line 38, ../../src/stylesheets/partials/_nav-table.sass */ .nav-table td { padding: 3px 15px; } /* line 40, ../../src/stylesheets/partials/_nav-table.sass */ .nav-table td:nth-child(2) { background: #e9f4fc; border-left: 1px solid #d8e3eb; border-right: 1px solid #258cd5; color: #258cd5; font-weight: bold; text-align: right; } /* line 48, ../../src/stylesheets/partials/_nav-table.sass */ .nav-table td a { font-size: 11px; } /* line 52, ../../src/stylesheets/partials/_nav-table.sass */ .nav-table th:first-child, .nav-table td:first-child { text-align: right; } /* line 54, ../../src/stylesheets/partials/_nav-table.sass */ .nav-table th:nth-child(2), .nav-table td:nth-child(2) { width: 25px; } /* line 58, ../../src/stylesheets/partials/_nav-table.sass */ .nav-table tr.parent td, .nav-table tr.parent th { background: #e9f4fc; border-bottom: 1px solid #8fbde0; padding: 15px !important; } /* line 62, ../../src/stylesheets/partials/_nav-table.sass */ .nav-table tr.parent td, .nav-table tr.parent th, .nav-table tr.parent a { font-size: 14px; font-weight: bold; } /* line 67, ../../src/stylesheets/partials/_nav-table.sass */ .nav-table tr.program > td { border: none; padding: 0 !important; } /* line 70, ../../src/stylesheets/partials/_nav-table.sass */ .nav-table tr.program > td div { position: relative; } /* line 72, ../../src/stylesheets/partials/_nav-table.sass */ .nav-table tr.program table { width: 100%; } /* line 74, ../../src/stylesheets/partials/_nav-table.sass */ .nav-table tr.program tbody { border-top: none; border-right: none; border-left: none; } /* line 78, ../../src/stylesheets/partials/_nav-table.sass */ .nav-table tr.program tbody td { background: #f6fdeb; } /* line 80, ../../src/stylesheets/partials/_nav-table.sass */ .nav-table tr.program tbody td:nth-child(2) { width: 28px; } /* line 84, ../../src/stylesheets/partials/_nav-table.sass */ .nav-table.number td, .nav-table.number th { padding: 7px 15px; } /* line 86, ../../src/stylesheets/partials/_nav-table.sass */ .nav-table.number td:first-child, .nav-table.number th:first-child { width: 200px; } /* line 88, ../../src/stylesheets/partials/_nav-table.sass */ .nav-table.number td:nth-child(n+3), .nav-table.number th:nth-child(n+3) { text-align: right; } /* line 90, ../../src/stylesheets/partials/_nav-table.sass */ .nav-table.number td:last-child, .nav-table.number th:last-child { border-right: 1px solid #d8e3eb; } /* line 93, ../../src/stylesheets/partials/_nav-table.sass */ .nav-table.number .program tbody td:last-child { border-right: none; } /* line 98, ../../src/stylesheets/partials/_nav-table.sass */ .nav-table.graph td:first-child, .nav-table.graph th:first-child { width: 199px; } /* line 100, ../../src/stylesheets/partials/_nav-table.sass */ .nav-table.graph td:last-child, .nav-table.graph th:last-child { -webkit-box-shadow: #e3eef6 3px 0 0 inset; -moz-box-shadow: #e3eef6 3px 0 0 inset; box-shadow: #e3eef6 3px 0 0 inset; border-right: 1px solid #d8e3eb; padding-left: 0 !important; width: 604px; } /* line 107, ../../src/stylesheets/partials/_nav-table.sass */ .nav-table.graph .program tbody tr:first-child td { padding-top: 15px; } /* line 109, ../../src/stylesheets/partials/_nav-table.sass */ .nav-table.graph .program tbody td:last-child { width: 604px; border-right: none; } /* line 112, ../../src/stylesheets/partials/_nav-table.sass */ .nav-table.graph .program tbody td { padding-top: 3px; } /* line 115, ../../src/stylesheets/partials/_nav-table.sass */ .map-wrap { border: 1px solid #e9f4fc; margin-bottom: 1px; position: relative; width: 968px; } /* line 121, ../../src/stylesheets/partials/_nav-table.sass */ .switch { background: white; border: 1px solid #47aef7; color: #258cd5; font-size: 11px; font-weight: bold; margin: 8px 0 0 10px; opacity: 0.9; padding: 5px 12px; text-decoration: none; -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: #e9f4fc 0 2px 0px; -moz-box-shadow: #e9f4fc 0 2px 0px; box-shadow: #e9f4fc 0 2px 0px; } /* line 133, ../../src/stylesheets/partials/_nav-table.sass */ .switch:hover, .switch:focus { border: 1px solid #258cd5; opacity: 1; } /* line 137, ../../src/stylesheets/partials/_nav-table.sass */ .nodata { background: #f6fdeb; border: 1px solid #888888; color: #222222; font-size: 12px; height: 40px; left: 50%; line-height: 40px; margin: -20px 0 0 -150px; filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=95); opacity: 0.95; padding: 5px 12px; position: absolute; text-align: center; top: 50%; z-index: 20; width: 300px; text-decoration: none; -webkit-border-radius: 3px; -moz-border-radius: 3px; -ms-border-radius: 3px; -o-border-radius: 3px; border-radius: 3px; -webkit-box-shadow: rgba(0, 0, 0, 0.2) 0 0 3px; -moz-box-shadow: rgba(0, 0, 0, 0.2) 0 0 3px; box-shadow: rgba(0, 0, 0, 0.2) 0 0 3px; } /* line 156, ../../src/stylesheets/partials/_nav-table.sass */ .nodata:hover, .nodata:focus { border: 1px solid #258cd5; opacity: 1; }
75.016854
699
0.68968
842a7d5690d06418434b18fba8aef07b910bc124
5,634
lua
Lua
cg.lua
nicholas-leonard/optim
5906efd4b601e63d5bc6e33be8d4621354111471
[ "BSD-3-Clause" ]
199
2015-01-21T19:27:56.000Z
2021-10-02T16:50:30.000Z
cg.lua
nicholas-leonard/optim
5906efd4b601e63d5bc6e33be8d4621354111471
[ "BSD-3-Clause" ]
108
2015-01-07T20:57:28.000Z
2019-07-27T00:49:49.000Z
cg.lua
nicholas-leonard/optim
5906efd4b601e63d5bc6e33be8d4621354111471
[ "BSD-3-Clause" ]
207
2015-01-05T18:26:57.000Z
2022-03-23T16:29:58.000Z
--[[ This cg implementation is a rewrite of minimize.m written by Carl E. Rasmussen. It is supposed to produce exactly same results (give or take numerical accuracy due to some changed order of operations). You can compare the result on rosenbrock with minimize.m. http://www.gatsby.ucl.ac.uk/~edward/code/minimize/example.html [x fx c] = minimize([0 0]', 'rosenbrock', -25) Note that we limit the number of function evaluations only, it seems much more important in practical use. ARGS: - `opfunc` : a function that takes a single input, the point of evaluation. - `x` : the initial point - `state` : a table of parameters and temporary allocations. - `state.maxEval` : max number of function evaluations - `state.maxIter` : max number of iterations - `state.df[0,1,2,3]` : if you pass torch.Tensor they will be used for temp storage - `state.[s,x0]` : if you pass torch.Tensor they will be used for temp storage RETURN: - `x*` : the new x vector, at the optimal point - `f` : a table of all function values where `f[1]` is the value of the function before any optimization and `f[#f]` is the final fully optimized value, at x* (Koray Kavukcuoglu, 2012) --]] function optim.cg(opfunc, x, config, state) -- parameters local config = config or {} local state = state or config local rho = config.rho or 0.01 local sig = config.sig or 0.5 local int = config.int or 0.1 local ext = config.ext or 3.0 local maxIter = config.maxIter or 20 local ratio = config.ratio or 100 local maxEval = config.maxEval or maxIter*1.25 local red = 1 local verbose = config.verbose or 0 local i = 0 local ls_failed = 0 local fx = {} -- we need three points for the interpolation/extrapolation stuff local z1,z2,z3 = 0,0,0 local d1,d2,d3 = 0,0,0 local f1,f2,f3 = 0,0,0 local df1 = state.df1 or x.new() local df2 = state.df2 or x.new() local df3 = state.df3 or x.new() local tdf df1:resizeAs(x) df2:resizeAs(x) df3:resizeAs(x) -- search direction local s = state.s or x.new() s:resizeAs(x) -- we need a temp storage for X local x0 = state.x0 or x.new() local f0 = 0 local df0 = state.df0 or x.new() x0:resizeAs(x) df0:resizeAs(x) -- evaluate at initial point f1,tdf = opfunc(x) fx[#fx+1] = f1 df1:copy(tdf) i=i+1 -- initial search direction s:copy(df1):mul(-1) d1 = -s:dot(s ) -- slope z1 = red/(1-d1) -- initial step while i < math.abs(maxEval) do x0:copy(x) f0 = f1 df0:copy(df1) x:add(z1,s) f2,tdf = opfunc(x) df2:copy(tdf) i=i+1 d2 = df2:dot(s) f3,d3,z3 = f1,d1,-z1 -- init point 3 equal to point 1 local m = math.min(maxIter,maxEval-i) local success = 0 local limit = -1 while true do while (f2 > f1+z1*rho*d1 or d2 > -sig*d1) and m > 0 do limit = z1 if f2 > f1 then z2 = z3 - (0.5*d3*z3*z3)/(d3*z3+f2-f3) else local A = 6*(f2-f3)/z3+3*(d2+d3) local B = 3*(f3-f2)-z3*(d3+2*d2) z2 = (math.sqrt(B*B-A*d2*z3*z3)-B)/A end if z2 ~= z2 or z2 == math.huge or z2 == -math.huge then z2 = z3/2; end z2 = math.max(math.min(z2, int*z3),(1-int)*z3); z1 = z1 + z2; x:add(z2,s) f2,tdf = opfunc(x) df2:copy(tdf) i=i+1 m = m - 1 d2 = df2:dot(s) z3 = z3-z2; end if f2 > f1+z1*rho*d1 or d2 > -sig*d1 then break elseif d2 > sig*d1 then success = 1; break; elseif m == 0 then break; end local A = 6*(f2-f3)/z3+3*(d2+d3); local B = 3*(f3-f2)-z3*(d3+2*d2); z2 = -d2*z3*z3/(B+math.sqrt(B*B-A*d2*z3*z3)) if z2 ~= z2 or z2 == math.huge or z2 == -math.huge or z2 < 0 then if limit < -0.5 then z2 = z1 * (ext -1) else z2 = (limit-z1)/2 end elseif (limit > -0.5) and (z2+z1) > limit then z2 = (limit-z1)/2 elseif limit < -0.5 and (z2+z1) > z1*ext then z2 = z1*(ext-1) elseif z2 < -z3*int then z2 = -z3*int elseif limit > -0.5 and z2 < (limit-z1)*(1-int) then z2 = (limit-z1)*(1-int) end f3=f2; d3=d2; z3=-z2; z1 = z1+z2; x:add(z2,s) f2,tdf = opfunc(x) df2:copy(tdf) i=i+1 m = m - 1 d2 = df2:dot(s) end if success == 1 then f1 = f2 fx[#fx+1] = f1; local ss = (df2:dot(df2)-df2:dot(df1)) / df1:dot(df1) s:mul(ss) s:add(-1,df2) local tmp = df1:clone() df1:copy(df2) df2:copy(tmp) d2 = df1:dot(s) if d2> 0 then s:copy(df1) s:mul(-1) d2 = -s:dot(s) end z1 = z1 * math.min(ratio, d1/(d2-1e-320)) d1 = d2 ls_failed = 0 else x:copy(x0) f1 = f0 df1:copy(df0) if ls_failed or i>maxEval then break end local tmp = df1:clone() df1:copy(df2) df2:copy(tmp) s:copy(df1) s:mul(-1) d1 = -s:dot(s) z1 = 1/(1-d1) ls_failed = 1 end end state.df0 = df0 state.df1 = df1 state.df2 = df2 state.df3 = df3 state.x0 = x0 state.s = s return x,fx,i end
26.956938
83
0.518814
05526a5315e77ecd0b4884d8adae1d42b993c57e
177
rb
Ruby
config/initializers/refile.rb
MichaelSp/SocialProjectsHub
879f07344c482c57145ad37dd092d47b8f9650f5
[ "MIT" ]
3
2015-11-18T08:00:40.000Z
2016-03-19T16:33:06.000Z
config/initializers/refile.rb
MichaelSp/SocialProjectsHub
879f07344c482c57145ad37dd092d47b8f9650f5
[ "MIT" ]
13
2015-10-29T11:47:19.000Z
2020-05-22T15:13:32.000Z
config/initializers/refile.rb
MichaelSp/SocialProjectsHub
879f07344c482c57145ad37dd092d47b8f9650f5
[ "MIT" ]
2
2015-11-04T18:15:24.000Z
2016-01-05T11:51:44.000Z
Refile.store ||= Refile::Backend::FileSystem.new(Rails.root.join("uploads/store").to_s) Refile.cache ||= Refile::Backend::FileSystem.new(Rails.root.join("uploads/cache").to_s)
44.25
87
0.745763
f64dec40bd138e76dd99b023fda095d959fab0c3
149
cpp
C++
libng/core/src/libng_core/ui/platform/mac/MacWindow.cpp
gapry/libng
8fbf927e5bb73f105bddbb618430d3e1bf2cf877
[ "MIT" ]
null
null
null
libng/core/src/libng_core/ui/platform/mac/MacWindow.cpp
gapry/libng
8fbf927e5bb73f105bddbb618430d3e1bf2cf877
[ "MIT" ]
null
null
null
libng/core/src/libng_core/ui/platform/mac/MacWindow.cpp
gapry/libng
8fbf927e5bb73f105bddbb618430d3e1bf2cf877
[ "MIT" ]
null
null
null
#include <libng_core/ui/platform/mac/MacWindow.hpp> namespace libng { MacWindow::MacWindow() { } MacWindow::~MacWindow() { } } // namespace libng
13.545455
51
0.711409
a35e95bab630d80e2140691acbd4f179b784d5c7
8,463
java
Java
kason-graph/src/main/java/org/janusgraph/datacreate/GraphIndexUtils.java
kython-seu/kason-janus
88760780fb4b98fc2510e88dfdd542be0ad1c8d7
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
kason-graph/src/main/java/org/janusgraph/datacreate/GraphIndexUtils.java
kython-seu/kason-janus
88760780fb4b98fc2510e88dfdd542be0ad1c8d7
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
kason-graph/src/main/java/org/janusgraph/datacreate/GraphIndexUtils.java
kython-seu/kason-janus
88760780fb4b98fc2510e88dfdd542be0ad1c8d7
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
package org.janusgraph.datacreate; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource; import org.apache.tinkerpop.gremlin.structure.T; import org.apache.tinkerpop.gremlin.structure.Transaction; import org.apache.tinkerpop.gremlin.structure.Vertex; import org.janusgraph.core.*; import org.janusgraph.core.schema.JanusGraphIndex; import org.janusgraph.core.schema.JanusGraphManagement; import org.janusgraph.core.schema.SchemaAction; import org.janusgraph.core.schema.SchemaStatus; import org.janusgraph.diskstorage.BackendException; import org.janusgraph.diskstorage.keycolumnvalue.scan.ScanMetrics; import org.janusgraph.graphdb.database.management.ManagementSystem; import org.janusgraph.hadoop.MapReduceIndexManagement; import java.util.Random; import java.util.concurrent.ExecutionException; public class GraphIndexUtils { private JanusGraph graph = GraphSingle.getGraphSingleInstance().getGraph(); public static void main(String[] args) { GraphIndexUtils graphIndexUtils = new GraphIndexUtils(); //new GraphIndexUtils().init(); //new GraphIndexUtils().deleteCompositeIndex(); //new GraphIndexUtils().insert(); //graphIndexUtils.queryVertex(); //重建索引数据 graphIndexUtils.reindex(); } public void getId() { PropertyKey rowKey = graph.getPropertyKey("rowKey"); System.out.println(rowKey.longId()); } public void deleteCompositeIndex(){ JanusGraphManagement m = graph.openManagement(); JanusGraphIndex nameIndex = m.getGraphIndex("secrowKey"); if(nameIndex.isCompositeIndex()){ System.out.println(" it is composite index "); } try { m.updateIndex(nameIndex, SchemaAction.DISABLE_INDEX).get(); } catch (InterruptedException e) { e.printStackTrace(); } catch (ExecutionException e) { e.printStackTrace(); } m.commit(); graph.tx().commit(); try { ManagementSystem.awaitGraphIndexStatus(graph, "secrowKey").status(SchemaStatus.DISABLED).call(); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println("put index to disable"); // Delete the index using JanusGraphManagement m = graph.openManagement(); nameIndex = m.getGraphIndex("secrowKey"); JanusGraphManagement.IndexJobFuture future = m.updateIndex(nameIndex, SchemaAction.REMOVE_INDEX); m.commit(); graph.tx().commit(); try { future.get(); } catch (InterruptedException e) { e.printStackTrace(); } catch (ExecutionException e) { e.printStackTrace(); } System.out.println("delete composite index finished"); graph.close(); } public void init(){ graph.tx().rollback(); JanusGraphManagement mgmt = graph.openManagement(); VertexLabel person = mgmt.makeVertexLabel("person").make(); EdgeLabel father = mgmt.makeEdgeLabel("fiend").make(); //PropertyKey rowKey = mgmt.makePropertyKey("rowKey").dataType(String.class).cardinality(Cardinality.SINGLE).make(); PropertyKey age = mgmt.makePropertyKey("age").dataType(Integer.class).cardinality(Cardinality.SINGLE).make(); PropertyKey name = mgmt.makePropertyKey("name").dataType(String.class).cardinality(Cardinality.SINGLE).make(); //mgmt.buildIndex("rowKey", Vertex.class).addKey(rowKey).buildMixedIndex("search"); //mgmt.buildIndex("secrowKey", Vertex.class).addKey(rowKey).buildCompositeIndex(); /*PropertyKey age = mgmt.makePropertyKey("age").dataType(Integer.class).cardinality(Cardinality.SINGLE).make(); mgmt.buildIndex("age", Vertex.class).addKey(age).buildMixedIndex("search"); PropertyKey name = mgmt.makePropertyKey("name").dataType(String.class).cardinality(Cardinality.SINGLE).make(); mgmt.buildIndex("name", Vertex.class).addKey(name).buildMixedIndex("search");*/ mgmt.commit(); //add data /*JanusGraphTransaction tx = graph.newTransaction(); JanusGraphVertex fv = tx.addVertex(T.label, "person", "name", "frank smith", "age", 55, "rowKey", "1"); JanusGraphVertex dv = tx.addVertex(T.label, "person", "name", "lucy smith", "age", 26, "rowKey", "2"); JanusGraphEdge father1 = dv.addEdge("father", fv); tx.commit(); tx.close();*/ graph.tx().commit(); graph.close(); } public void addHBaseIndex(){ graph.tx().rollback(); JanusGraphManagement mgmt = graph.openManagement(); //PropertyKey rowKey = graph.getPropertyKey("rowKey"); PropertyKey rowKey = mgmt.makePropertyKey("rowKey").dataType(Integer.class).cardinality(Cardinality.SINGLE).make(); mgmt.buildIndex("secrowKey", Vertex.class).addKey(rowKey).buildCompositeIndex(); mgmt.commit(); graph.tx().commit(); graph.close(); } /** * reindex * 首先只针对单个属性建立索引 */ public void reindex() { graph.tx().rollback(); JanusGraphManagement mgmt = graph.openManagement(); //PropertyKey rowKey = graph.getPropertyKey("rowKey"); PropertyKey rowKey = mgmt.getPropertyKey("name"); mgmt.buildIndex("iname", Vertex.class).addKey(rowKey).buildMixedIndex("search"); mgmt.commit(); graph.tx().commit(); graph.tx().rollback(); // Block until the SchemaStatus transitions from INSTALLED to REGISTERED try { ManagementSystem.awaitGraphIndexStatus(graph, "iname").call(); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println("Block until the SchemaStatus transitions from INSTALLED to REGISTERED"); mgmt = graph.openManagement(); MapReduceIndexManagement mr = new MapReduceIndexManagement(graph); try { mr.updateIndex(mgmt.getGraphIndex("iname"), SchemaAction.REINDEX).get(); } catch (InterruptedException e) { e.printStackTrace(); } catch (ExecutionException e) { e.printStackTrace(); } catch (BackendException e) { e.printStackTrace(); } mgmt.commit(); System.out.println("execute reindex with mapreduce"); //Enable the index mgmt = graph.openManagement(); try { mgmt.updateIndex(mgmt.getGraphIndex("iname"), SchemaAction.ENABLE_INDEX).get(); } catch (InterruptedException e) { e.printStackTrace(); } catch (ExecutionException e) { e.printStackTrace(); } mgmt.commit(); // Block until the SchemaStatus is ENABLED mgmt = graph.openManagement(); try { ManagementSystem.awaitGraphIndexStatus(graph, "iname").status(SchemaStatus.ENABLED).call(); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println("index update to enable finish"); mgmt.commit(); graph.close(); } /** * insert data */ public void insert() { for (int i = 0; i < 100; i++){ //JanusGraphManagement janusGraphManagement = graph.openManagement(); Transaction tx = graph.tx(); for(int j = 0; j < 100; j++){ JanusGraphVertex p1 = graph.addVertex("person"); p1.property("name", "lily " + System.currentTimeMillis()); p1.property("age", new Random().nextInt(20) + 20); JanusGraphVertex p2 = graph.addVertex("person"); p2.property("name", "smith " + System.currentTimeMillis()); p2.property("age", new Random().nextInt(20) + 20); p1.addEdge("friend", p2); } tx.commit(); } graph.close(); } /** * QUERY * 如果不建立索引将会报如下异常 * Query requires iterating over all vertices [(age = 25)]. For better performance, use indexes */ public void queryVertex(){ GraphTraversalSource g = graph.traversal(); GraphTraversal<Vertex, Vertex> age = g.V().has("age", 25); while (age.hasNext()){ System.out.println(age.next()); } graph.close(); } }
36.636364
124
0.630037
a38ecc7f6fee8a8e68564d8d45443e465fa85fc0
2,307
ts
TypeScript
src/modules/users/services/AuthenticateUserService.test.ts
GabrielCordeiroDev/valorize-api
25c785b9dd4bfb1ac4285f499a118a6e6bf5ebaa
[ "MIT" ]
null
null
null
src/modules/users/services/AuthenticateUserService.test.ts
GabrielCordeiroDev/valorize-api
25c785b9dd4bfb1ac4285f499a118a6e6bf5ebaa
[ "MIT" ]
null
null
null
src/modules/users/services/AuthenticateUserService.test.ts
GabrielCordeiroDev/valorize-api
25c785b9dd4bfb1ac4285f499a118a6e6bf5ebaa
[ "MIT" ]
null
null
null
import { AppError } from '@shared/errors/AppError' import { FakeHashPasswordProvider } from '../providers/HashPasswordProvider/fakes/FakeHashPasswordProvider' import { FakeRefreshTokenProvider } from '../providers/RefreshTokenProvider/fakes/FakeRefreshTokenProvider' import { FakeTokenProvider } from '../providers/TokenProvider/fakes/FakeTokenProvider' import { FakeRefreshTokenRepository } from '../repositories/fakes/FakeRefreshTokenRepository' import { FakeUsersRepository } from '../repositories/fakes/FakeUsersRepository' import { AuthenticateUserService } from './AuthenticateUserService' let fakeUsersRepository: FakeUsersRepository let authenticateUserService: AuthenticateUserService describe('Authenticate User', () => { beforeAll(() => { fakeUsersRepository = new FakeUsersRepository() const fakeRefreshTokenRepository = new FakeRefreshTokenRepository() const fakeRefreshTokenProvider = new FakeRefreshTokenProvider( fakeRefreshTokenRepository ) const fakeTokenProvider = new FakeTokenProvider() const fakeHashPasswordProvider = new FakeHashPasswordProvider() authenticateUserService = new AuthenticateUserService( fakeUsersRepository, fakeRefreshTokenRepository, fakeRefreshTokenProvider, fakeTokenProvider, fakeHashPasswordProvider ) }) it('should be able to authenticate', async () => { const user = await fakeUsersRepository.create({ name: 'Test Name', email: '[email protected]', password: 'secret' }) await fakeUsersRepository.save(user) const response = await authenticateUserService.execute({ email: '[email protected]', password: 'secret' }) expect(response).toHaveProperty('token') expect(response).toHaveProperty('refreshToken') }) it('Should not be able to authenticate with a non-existent user', async () => { await expect( authenticateUserService.execute({ email: '[email protected]', password: 'secret' }) ).rejects.toBeInstanceOf(AppError) }) it('Should not be able to authenticate with wrong password', async () => { await expect( authenticateUserService.execute({ email: '[email protected]', password: 'wrong-password' }) ).rejects.toBeInstanceOf(AppError) }) })
34.954545
107
0.726918
25ca4c2fe90d9942fe2e7050870aa0a8312b9c37
4,169
cs
C#
src/files/banHwid.Designer.cs
hammyster/manage-edge
7a69d906c18198fab028a3c36fbb2c66d0c9a121
[ "MIT" ]
null
null
null
src/files/banHwid.Designer.cs
hammyster/manage-edge
7a69d906c18198fab028a3c36fbb2c66d0c9a121
[ "MIT" ]
null
null
null
src/files/banHwid.Designer.cs
hammyster/manage-edge
7a69d906c18198fab028a3c36fbb2c66d0c9a121
[ "MIT" ]
null
null
null
namespace ManageEdge { partial class banHwid { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(banHwid)); this.hwidText = new System.Windows.Forms.Label(); this.hwidBox = new System.Windows.Forms.TextBox(); this.getHwidBtn = new System.Windows.Forms.Button(); this.button1 = new System.Windows.Forms.Button(); this.SuspendLayout(); // // hwidText // this.hwidText.AutoSize = true; this.hwidText.Location = new System.Drawing.Point(179, 18); this.hwidText.Name = "hwidText"; this.hwidText.Size = new System.Drawing.Size(33, 13); this.hwidText.TabIndex = 0; this.hwidText.Text = "Login"; // // hwidBox // this.hwidBox.Location = new System.Drawing.Point(12, 34); this.hwidBox.Name = "hwidBox"; this.hwidBox.Size = new System.Drawing.Size(392, 20); this.hwidBox.TabIndex = 1; // // getHwidBtn // this.getHwidBtn.Location = new System.Drawing.Point(159, 60); this.getHwidBtn.Name = "getHwidBtn"; this.getHwidBtn.Size = new System.Drawing.Size(75, 23); this.getHwidBtn.TabIndex = 2; this.getHwidBtn.Text = "Procurar"; this.getHwidBtn.UseVisualStyleBackColor = true; this.getHwidBtn.Click += new System.EventHandler(this.banHwidBtn_Click); // // button1 // this.button1.Location = new System.Drawing.Point(159, 60); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(75, 23); this.button1.TabIndex = 3; this.button1.Text = "Banir HWID"; this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(this.button1_Click); // // banHwid // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(416, 97); this.Controls.Add(this.button1); this.Controls.Add(this.getHwidBtn); this.Controls.Add(this.hwidBox); this.Controls.Add(this.hwidText); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "banHwid"; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "banHWID"; this.Load += new System.EventHandler(this.banHWID_Load); this.ResumeLayout(false); this.PerformLayout(); } #endregion private System.Windows.Forms.Label hwidText; private System.Windows.Forms.TextBox hwidBox; private System.Windows.Forms.Button getHwidBtn; private System.Windows.Forms.Button button1; } }
40.475728
139
0.573999
7996bcf6c41b9257d92809ade31ab9554a64df84
4,188
php
PHP
src/Oro/Bundle/ApiBundle/Tests/Unit/Processor/StepExecutorTest.php
elliott-cs/platform
1ccd57d0b7e996321d6085d6c708e1106ef7f595
[ "MIT" ]
173
2017-07-25T13:37:58.000Z
2022-02-17T18:24:37.000Z
src/Oro/Bundle/ApiBundle/Tests/Unit/Processor/StepExecutorTest.php
elliott-cs/platform
1ccd57d0b7e996321d6085d6c708e1106ef7f595
[ "MIT" ]
401
2017-07-24T23:04:42.000Z
2022-03-31T06:39:45.000Z
src/Oro/Bundle/ApiBundle/Tests/Unit/Processor/StepExecutorTest.php
elliott-cs/platform
1ccd57d0b7e996321d6085d6c708e1106ef7f595
[ "MIT" ]
171
2017-07-27T03:47:23.000Z
2022-03-30T21:31:56.000Z
<?php namespace Oro\Bundle\ApiBundle\Tests\Unit\Processor; use Oro\Bundle\ApiBundle\Model\Error; use Oro\Bundle\ApiBundle\Processor\ByStepNormalizeResultActionProcessor; use Oro\Bundle\ApiBundle\Processor\ByStepNormalizeResultContext; use Oro\Bundle\ApiBundle\Processor\StepExecutor; class StepExecutorTest extends \PHPUnit\Framework\TestCase { /** @var \PHPUnit\Framework\MockObject\MockObject */ private $processor; /** @var StepExecutor */ private $stepExecutor; protected function setUp(): void { $this->processor = $this->createMock(ByStepNormalizeResultActionProcessor::class); $this->stepExecutor = new StepExecutor($this->processor); } public function testExecuteStepNoResetErrors() { $stepName = 'testStep'; $context = new ByStepNormalizeResultContext(); $context->addError(Error::create('some error')); $this->processor->expects(self::once()) ->method('process') ->with(self::identicalTo($context)) ->willReturnCallback(function (ByStepNormalizeResultContext $context) use ($stepName) { self::assertEquals($stepName, $context->getFirstGroup()); self::assertEquals($stepName, $context->getLastGroup()); self::assertTrue($context->hasErrors()); }); $this->stepExecutor->executeStep($stepName, $context, false); self::assertTrue($context->hasErrors()); } public function testExecuteStepWithResetErrors() { $stepName = 'testStep'; $context = new ByStepNormalizeResultContext(); $context->addError(Error::create('some error')); $this->processor->expects(self::once()) ->method('process') ->with(self::identicalTo($context)) ->willReturnCallback(function (ByStepNormalizeResultContext $context) use ($stepName) { self::assertEquals($stepName, $context->getFirstGroup()); self::assertEquals($stepName, $context->getLastGroup()); self::assertFalse($context->hasErrors()); }); $this->stepExecutor->executeStep($stepName, $context); self::assertTrue($context->hasErrors()); } public function testExecuteStepWithResetErrorsAndNewErrorsOccurred() { $stepName = 'testStep'; $context = new ByStepNormalizeResultContext(); $context->addError(Error::create('some error1')); $this->processor->expects(self::once()) ->method('process') ->with(self::identicalTo($context)) ->willReturnCallback(function (ByStepNormalizeResultContext $context) use ($stepName) { self::assertEquals($stepName, $context->getFirstGroup()); self::assertEquals($stepName, $context->getLastGroup()); self::assertFalse($context->hasErrors()); $context->addError(Error::create('some error2')); }); $this->stepExecutor->executeStep($stepName, $context); $errors = $context->getErrors(); self::assertCount(2, $errors); self::assertEquals('some error1', $errors[0]->getTitle()); self::assertEquals('some error2', $errors[1]->getTitle()); } public function testExecuteStepWithResetErrorsAndNoExistingErrorsButNewErrorsOccurred() { $stepName = 'testStep'; $context = new ByStepNormalizeResultContext(); $this->processor->expects(self::once()) ->method('process') ->with(self::identicalTo($context)) ->willReturnCallback(function (ByStepNormalizeResultContext $context) use ($stepName) { self::assertEquals($stepName, $context->getFirstGroup()); self::assertEquals($stepName, $context->getLastGroup()); self::assertFalse($context->hasErrors()); $context->addError(Error::create('some error')); }); $this->stepExecutor->executeStep($stepName, $context); $errors = $context->getErrors(); self::assertCount(1, $errors); self::assertEquals('some error', $errors[0]->getTitle()); } }
39.140187
99
0.625597
390621ebc78ba4f076ac27aa00c30c215d472b83
747
py
Python
src/ipynbviewer/ipynbview.py
PaulEcoffet/ipynbviewer
1866add8b4476f3f893e3c0db34468066b149a0d
[ "MIT" ]
2
2021-05-19T10:14:41.000Z
2022-03-20T23:59:25.000Z
src/ipynbviewer/ipynbview.py
PaulEcoffet/ipynbviewer
1866add8b4476f3f893e3c0db34468066b149a0d
[ "MIT" ]
1
2021-02-10T16:34:31.000Z
2021-02-10T16:34:31.000Z
src/ipynbviewer/ipynbview.py
PaulEcoffet/ipynbviewer
1866add8b4476f3f893e3c0db34468066b149a0d
[ "MIT" ]
null
null
null
import json import argparse from .cell_readers import cell_readers def read_ipynb(ipynb_dict: dict)-> str: """ Reads a whole notebook and output it in a human readable format :param ipynb_dict: :return: the human readable string """ outstr = [] try: cells = ipynb_dict["cells"] except KeyError: raise ValueError("Not an ipython notebook") for cell in cells: outstr.append(cell_readers[cell["cell_type"]](cell)) return ("\n\n" + "-" * 80 + "\n\n").join(outstr) def main(): agp = argparse.ArgumentParser() agp.add_argument("file", type=argparse.FileType("r")) args = agp.parse_args() print(read_ipynb(json.load(args.file))) if __name__ == "__main__": main()
23.34375
67
0.64257
7ad7a77fd7812ebb5ab387c267c90634b32a6a4a
7,499
cs
C#
src/MvcContrib.TestHelper/MvcContrib.TestHelper/Extensions/RouteTestingExtensions.cs
ignatandrei/MvcContrib
9a7c690bdbb5d8f0da298ca8bb78d0866ad2eaea
[ "Apache-2.0" ]
null
null
null
src/MvcContrib.TestHelper/MvcContrib.TestHelper/Extensions/RouteTestingExtensions.cs
ignatandrei/MvcContrib
9a7c690bdbb5d8f0da298ca8bb78d0866ad2eaea
[ "Apache-2.0" ]
null
null
null
src/MvcContrib.TestHelper/MvcContrib.TestHelper/Extensions/RouteTestingExtensions.cs
ignatandrei/MvcContrib
9a7c690bdbb5d8f0da298ca8bb78d0866ad2eaea
[ "Apache-2.0" ]
null
null
null
using System; using System.Linq.Expressions; using System.Web; using System.Web.Mvc; using System.Web.Routing; using Rhino.Mocks; namespace MvcContrib.TestHelper { /// <summary> /// Used to simplify testing routes. /// </summary> public static class RouteTestingExtensions { private static HttpContextBase FakeHttpContext(string url) { var request = MockRepository.GenerateStub<HttpRequestBase>(); request.Stub(x => x.AppRelativeCurrentExecutionFilePath).Return(url).Repeat.Any(); request.Stub(x => x.PathInfo).Return(string.Empty).Repeat.Any(); var context = MockRepository.GenerateStub<HttpContextBase>(); context.Stub(x => x.Request).Return(request).Repeat.Any(); return context; } /// <summary> /// A way to start the fluent interface and and which method to use /// since you have a method constraint in the route. /// </summary> /// <param name="url"></param> /// <param name="httpMethod"></param> /// <returns></returns> public static RouteData WithMethod(this string url, string httpMethod) { return Route(url, httpMethod); } public static RouteData WithMethod(this string url, HttpVerbs verb) { return WithMethod(url, verb.ToString("g")); } /// <summary> /// Find the route for a URL and an Http Method /// because you have a method contraint on the route /// </summary> /// <param name="url"></param> /// <param name="httpMethod"></param> /// <returns></returns> public static RouteData Route(string url, string httpMethod) { var context = FakeHttpContext(url, httpMethod); return RouteTable.Routes.GetRouteData(context); } private static HttpContextBase FakeHttpContext(string url, string method) { var context = FakeHttpContext(url); context.Request.Stub(x => x.HttpMethod).Return(method).Repeat.Any(); return context; } /// <summary> /// Returns the corresponding route for the URL. Returns null if no route was found. /// </summary> /// <param name="url">The app relative url to test.</param> /// <returns>A matching <see cref="RouteData" />, or null.</returns> public static RouteData Route(this string url) { var context = FakeHttpContext(url); return RouteTable.Routes.GetRouteData(context); } /// <summary> /// Asserts that the route matches the expression specified. Checks controller, action, and any method arguments /// into the action as route values. /// </summary> /// <typeparam name="TController">The controller.</typeparam> /// <param name="routeData">The routeData to check</param> /// <param name="action">The action to call on TController.</param> public static RouteData ShouldMapTo<TController>(this RouteData routeData, Expression<Func<TController, ActionResult>> action) where TController : Controller { routeData.ShouldNotBeNull("The URL did not match any route"); //check controller routeData.ShouldMapTo<TController>(); //check action var methodCall = (MethodCallExpression) action.Body; string actualAction = routeData.Values.GetValue("action").ToString(); string expectedAction = methodCall.Method.Name; actualAction.AssertSameStringAs(expectedAction); //check parameters for (int i = 0; i < methodCall.Arguments.Count; i++) { string name = methodCall.Method.GetParameters()[i].Name; object value = null; switch ( methodCall.Arguments[ i ].NodeType ) { case ExpressionType.Constant: value = ( (ConstantExpression)methodCall.Arguments[ i ] ).Value; break; case ExpressionType.New: case ExpressionType.MemberAccess: case ExpressionType.Convert: value = Expression.Lambda(methodCall.Arguments[ i ]).Compile().DynamicInvoke(); break; } value = (value == null ? value : value.ToString()); routeData.Values.GetValue(name).ShouldEqual(value,"Value for parameter did not match"); } return routeData; } /// <summary> /// Converts the URL to matching RouteData and verifies that it will match a route with the values specified by the expression. /// </summary> /// <typeparam name="TController">The type of controller</typeparam> /// <param name="relativeUrl">The ~/ based url</param> /// <param name="action">The expression that defines what action gets called (and with which parameters)</param> /// <returns></returns> public static RouteData ShouldMapTo<TController>(this string relativeUrl, Expression<Func<TController, ActionResult>> action) where TController : Controller { return relativeUrl.Route().ShouldMapTo(action); } /// <summary> /// Verifies the <see cref="RouteData">routeData</see> maps to the controller type specified. /// </summary> /// <typeparam name="TController"></typeparam> /// <param name="routeData"></param> /// <returns></returns> public static RouteData ShouldMapTo<TController>(this RouteData routeData) where TController : Controller { //strip out the word 'Controller' from the type string expected = typeof(TController).Name.Replace("Controller", ""); //get the key (case insensitive) string actual = routeData.Values.GetValue("controller").ToString(); actual.AssertSameStringAs(expected); return routeData; } /// <summary> /// Verifies the <see cref="RouteData">routeData</see> will instruct the routing engine to ignore the route. /// </summary> /// <param name="relativeUrl"></param> /// <returns></returns> public static RouteData ShouldBeIgnored(this string relativeUrl) { RouteData routeData = relativeUrl.Route(); routeData.RouteHandler.ShouldBe<StopRoutingHandler>("Expected StopRoutingHandler, but wasn't"); return routeData; } /// <summary> /// Gets a value from the <see cref="RouteValueDictionary" /> by key. Does a /// case-insensitive search on the keys. /// </summary> /// <param name="routeValues"></param> /// <param name="key"></param> /// <returns></returns> public static object GetValue(this RouteValueDictionary routeValues, string key) { foreach(var routeValueKey in routeValues.Keys) { if(string.Equals(routeValueKey, key, StringComparison.InvariantCultureIgnoreCase)) { if (routeValues[routeValueKey] == null) return null; return routeValues[routeValueKey].ToString(); } } return null; } } }
39.888298
164
0.589279
b454f4d464d0cfcd4ce498e110a671586cf69656
10,133
dart
Dart
lib/controllers/database_controller.dart
oguzkaba/onesystem-demo
d21027b3ca517ecaa54ecf3f156fbffb113528d6
[ "MIT" ]
1
2021-10-04T06:28:21.000Z
2021-10-04T06:28:21.000Z
lib/controllers/database_controller.dart
oguzkaba/onesystem-demo
d21027b3ca517ecaa54ecf3f156fbffb113528d6
[ "MIT" ]
null
null
null
lib/controllers/database_controller.dart
oguzkaba/onesystem-demo
d21027b3ca517ecaa54ecf3f156fbffb113528d6
[ "MIT" ]
null
null
null
import 'package:flutter/material.dart'; import 'package:get/get.dart'; // ignore: unused_import import 'package:mysql1/mysql1.dart'; import 'package:onesystem/models/mysqlConn_model.dart'; import 'package:onesystem/models/signin_model.dart'; class DatabaseController extends GetxController { //OBS GetStateManagement variables final _result = 0.obs; int get sonuc => _result.value; final _islogin = false.obs; bool get islogin => _islogin.value; final List<SigninModel> _listForSign = <SigninModel>[].obs; List<SigninModel> get listForSign => _listForSign; List<dynamic> _listForSpool = <dynamic>[].obs; List<dynamic> get listForSpool => _listForSpool; final List<dynamic> _listForWeld = <dynamic>[].obs; List<dynamic> get listForWeld => _listForWeld; final List<dynamic> _listForWeldCopy = <dynamic>[].obs; List<dynamic> get listForWeldCopy => _listForWeldCopy; final List<dynamic> _listForWeldCopy1 = <dynamic>[].obs; List<dynamic> get listForWeldCopy1 => _listForWeldCopy1; final List<dynamic> _listForFile = <dynamic>[].obs; List<dynamic> get listForFile => _listForFile; final List<dynamic> _listForFileSpool = <dynamic>[].obs; List<dynamic> get listForFileSpool => _listForFileSpool; final List<dynamic> _listForFields = <dynamic>[].obs; List<dynamic> get listForFields => _listForFields; final List<dynamic> _listForNote = <dynamic>[].obs; List<dynamic> get listForNote => _listForNote; final List<dynamic> _listForNoteByUser = <dynamic>[].obs; List<dynamic> get listForNoteByUser => _listForNoteByUser; //#region DATABASE-LOGIN KONTROL METHOD Future<List<SigninModel>> loginQuery( {@required String name, @required String pass, @required String query}) async { try { print('bağlanmayı deniyorum...'); var connect = await MysqlConn().getConnection(); //#region SORGU OLUSTUR var result = await connect.query(query, [name, pass]); //#endregion _listForSign.clear(); //#region SONUC BOSMU KONTROL if (result.isNotEmpty) { //#region SONUCU LISTEYE AKTAR for (var item in result) { _listForSign.add( SigninModel(item[0], item[1], item[2], item[6], item[3], item[4]), ); } //#endregion _islogin.value = true; } else { _islogin.value = false; } //#endregion await connect.close(); return listForSign; } catch (e) { print(e.toString()); return null; } } //#endregion //#region DATABASE-GETSpool KONTROL METHOD Future<List<dynamic>> getSpool( {@required String fno, @required String query}) async { try { var connect = await MysqlConn().getConnection(); //#region SORGU OLUSTUR var result = await connect.query(query, [fno]); //#endregion _listForSpool.clear(); _result.value = result.length; //#region KOLON ISIMLERINI AL List<dynamic> getfields() { _listForFields.clear(); for (int z = 0; z < 23; z++) { _listForFields.add(result.fields[z].name); } return listForFields; } //#endregion getfields(); result.forEach((v) => _listForSpool.add(v)); // // print('Fields : ' + listForFields.length.toString()); // // print('Dataop daki listemiz2 : ' + listem2.length.toString()); await connect.close(); return listForSpool; } catch (e) { return null; } } //#endregion //#region DATABASE-GETWeld KONTROL METHOD Future<List<dynamic>> getWeld( {@required String fno, @required String sno, @required String query}) async { try { var connect = await MysqlConn().getConnection(); //#region SORGU OLUSTUR var result = await connect.query(query, [fno, sno]); //#endregion _listForWeld.clear(); _result.value = result.length; //#region KOLON ISIMLERINI AL List<dynamic> getfields() { _listForFields.clear(); for (int z = 0; z < 38; z++) { _listForFields.add(result.fields[z].name); } return listForFields; } //#endregion getfields(); result.forEach((v) => _listForWeld.add(v)); await connect.close(); return listForWeld; } catch (e) { return null; } } //#endregion //#region DATABASE-GETUserNote KONTROL METHOD Future<List<dynamic>> getUserNote( {@required String fsno, @required String query}) async { try { var connect = await MysqlConn().getConnection(); //#region SORGU OLUSTUR var result = await connect.query(query, [fsno]); //#endregion _listForNote.clear(); _result.value = result.length; result.forEach((v) => _listForNote.add(v)); await connect.close(); return listForNote; } catch (e) { return null; } } //#endregion //#region DATABASE-GETWeldCopy-Copy1 KONTROL METHOD Future<List<dynamic>> getWeldCopy( {@required String fno, @required String selectWF, @required String sno, @required String query}) async { try { var connect = await MysqlConn().getConnection(); //#region SORGU OLUSTUR var result = await connect.query(query, [fno, sno]); //#endregion _result.value = result.length; //#region KOLON ISIMLERINI AL List<dynamic> getfields() { _listForFields.clear(); for (int z = 0; z < 38; z++) { _listForFields.add(result.fields[z].name); } return listForFields; } //#endregion getfields(); if (selectWF == 'weld') { _listForWeldCopy.clear(); result.forEach((v) => _listForWeldCopy.add(v)); await connect.close(); return listForWeldCopy; } else { _listForWeldCopy1.clear(); result.forEach((v) => _listForWeldCopy1.add(v)); await connect.close(); return listForWeldCopy1; } } catch (e) { return null; } } //#endregion //#region DATABASE-GETFileNO KONTROL METHOD Future<List<dynamic>> getFileNO({@required String query}) async { try { var connect = await MysqlConn().getConnection(); //#region SORGU OLUSTUR var result = await connect.query(query); //#endregion _listForFile.clear(); _result.value = result.length; result.forEach((v) => _listForFile.add(v[1].toString())); await connect.close(); return listForFile; } catch (e) { return null; } } //#endregion //#region DATABASE-GETFileNOandSpool KONTROL METHOD Future<List<dynamic>> getFileNoSpool({@required String query}) async { try { var connect = await MysqlConn().getConnection(); //#region SORGU OLUSTUR var result = await connect.query(query, ['Fabrication']); //#endregion _listForFileSpool.clear(); _result.value = result.length; result.forEach((v) => _listForFileSpool.add(v)); await connect.close(); return listForFileSpool; } catch (e) { return null; } } //#endregion //#region DATABASE-GETUserNote KONTROL METHOD Future<List<dynamic>> getNoteByUser( {@required String id, @required String query}) async { try { var connect = await MysqlConn().getConnection(); //#region SORGU OLUSTUR var result = await connect.query(query, [id]); //#endregion _listForNoteByUser.clear(); _result.value = result.length; result.forEach((v) => _listForNoteByUser.add(v)); await connect.close(); return listForNoteByUser; } catch (e) { return null; } } //#endregion //#region DATABASE-ADDUserNote KONTROL METHOD Future<List<dynamic>> addNoteUser( {@required String note, @required visibility, @required active, @required uid, @required String fsno, @required String query}) async { try { var connect = await MysqlConn().getConnection(); //#region SORGU OLUSTUR await connect.query(query, [note, visibility, active, uid, fsno]); //#endregion await connect.close(); return listForNoteByUser; } catch (e) { return null; } } //#endregion // SELECT `COLUMN_NAME` // FROM `INFORMATION_SCHEMA`.`COLUMNS` // WHERE `TABLE_SCHEMA`='yourdatabasename' // AND `TABLE_NAME`='yourtablename'; // Future<bool> veriEkle( // {@required String name, String password, String role}) async { // try { // final baglan = await MySqlConnection.connect( // ConnectionSettings( // host: _host, // port: _port, // user: _user, // password: _password, // db: _db), // ); // // ekleme kodları sonra eklerse true döndür // await baglan.query( // "insert into $_db.$_tablename (name,password,role) values (?,?,?)", // [name, password, role]); // await baglan.close(); // return true; // } catch (e) { // return false; // } // } // Future<bool> veriGuncelle( // {@required int id, String ders, String ogretmen, String donem}) async { // try { // final baglan = await MySqlConnection.connect( // ConnectionSettings( // host: _host, // port: _port, // user: _user, // password: _password, // db: _db), // ); // // güncelledikte sonra true döndür // await baglan.query( // "update deneme.dersler set ders=? , ogretmen=? , donem = ? where id = ?", // [ders, ogretmen, donem, id]); // await baglan.close(); // return true; // } catch (e) { // return false; // } // } // Future<bool> veriSil({@required int id}) async { // try { // final baglan = await MySqlConnection.connect( // ConnectionSettings( // host: _host, // port: _port, // user: _user, // password: _password, // db: _db), // ); // // sildikten sonra true döndür // await baglan.query('delete from deneme.dersler where id=?', [id]); // await baglan.close(); // return true; // } catch (e) { // return false; // } // } }
26.806878
86
0.610086
f4b73f6b4790fa9a26c2cfbf352321583efa3682
2,255
tsx
TypeScript
src/components/commons/PostCard.tsx
potato4d/caramelize
237c975509a4dd3d788918c719dcce9e60990e5e
[ "MIT" ]
1
2020-02-22T13:42:30.000Z
2020-02-22T13:42:30.000Z
src/components/commons/PostCard.tsx
potato4d/caramelize
237c975509a4dd3d788918c719dcce9e60990e5e
[ "MIT" ]
null
null
null
src/components/commons/PostCard.tsx
potato4d/caramelize
237c975509a4dd3d788918c719dcce9e60990e5e
[ "MIT" ]
null
null
null
import Vue, { VNode } from "vue" import * as tsx from "vue-tsx-support" import { Post } from "~/types/struct" import { FeatherClockIcon, FeatherEditIcon, } from "~/components/commons/FeatherIcons" import { formatString } from "~/constants" import moment from "moment" import "moment-timezone" export const PostCard = tsx.component({ name: "PostCard", props: { post: { type: Object as () => Post, required: true, }, }, render(): VNode { return ( <div class="md:max-w-full md:flex py-4"> <nuxt-link to={`/posts/${this.post.title}`} tag="div" class="h-48 md:h-auto md:w-1/4 flex-none bg-cover text-center bg-gray-700 rounded-t lg:rounded-t-none lg:rounded-l bg-cover bg-center" style={{ backgroundImage: this.post.image ? `url("${this.post.image}")` : "", }} /> <div class="bg-gray-800 p-4 flex flex-col justify-between leading-normal rounded-b lg:rounded-b-none lg:rounded-r md:w-3/4"> <div class="mb-4"> <div class="pb-2"> {this.post.tags.map((tag, tagK) => ( <nuxt-link to={`/tags/${tag}`} tag="a" key={tagK} class="inline-block bg-gray-700 p-3 py-1 text-xs font-semibold mr-2 rounded" > #{tag} </nuxt-link> ))} </div> <div class="font-bold text-xl mb-2 break-words"> <nuxt-link to={`/posts/${this.post.title}`} tag="a"> {this.post.title} </nuxt-link> </div> <p class="pb-2 align-middle"> <span class="pr-2"> <FeatherEditIcon /> </span> {moment(this.post.createdAt) .tz("Asia/Tokyo") .format(formatString)} <span class="px-2"> <FeatherClockIcon /> </span> {moment(this.post.updatedAt) .tz("Asia/Tokyo") .format(formatString)} </p> <p class="break-words">{this.post.description}…</p> </div> </div> </div> ) }, })
31.760563
144
0.48204
20a861ae7ad714e8a8d3e060a162dba343661ce5
244
py
Python
ex04.py
ScottDig/Practice-Python-Exercises
3d89a61888c780b6df30e4f294a4468937612954
[ "MIT" ]
null
null
null
ex04.py
ScottDig/Practice-Python-Exercises
3d89a61888c780b6df30e4f294a4468937612954
[ "MIT" ]
null
null
null
ex04.py
ScottDig/Practice-Python-Exercises
3d89a61888c780b6df30e4f294a4468937612954
[ "MIT" ]
null
null
null
def divisors(integer): integer = abs(integer) divisor = [] for candidate in range(integer//2): if integer % (candidate+1) == 0: divisor.append(candidate+1) return divisor alist = divisors(10) print(alist)
18.769231
40
0.614754
ef30f0eb8bc9146de87e6daeb25858435abd1a09
1,620
h
C
include/Parser.h
katm10/HalideCodegen
b80856b56d0fc91cc16a047636aca1ce29763175
[ "MIT" ]
null
null
null
include/Parser.h
katm10/HalideCodegen
b80856b56d0fc91cc16a047636aca1ce29763175
[ "MIT" ]
null
null
null
include/Parser.h
katm10/HalideCodegen
b80856b56d0fc91cc16a047636aca1ce29763175
[ "MIT" ]
null
null
null
#ifndef TRS_CODEGEN_PARSER_H #define TRS_CODEGEN_PARSER_H #include <string> #include "ast/Types.h" #include "Rule.h" // Helper routines for writing a parser and routines for parsing // Halide rewrite rules. // Print an error and the remaining chars to be parsed, then abort. void report_error(const char **cursor, const char *debug_info); // Move the input cursor past any whitespace, but not beyond the end // pointer. void consume_whitespace(const char **cursor, const char *end); // If the input cursor starts with the expected string, update it to // point to the end of the string and return true. Otherwise, return // false and don't modify the input cursor. bool consume(const char **cursor, const char *end, const char *expected); // Calls consume and asserts that it succeeded. void expect(const char **cursor, const char *end, const char *pattern); // Returns if the input cursor starts with the expected string. // Will not move the cursor regardless of the result. bool check(const char **cursor, const char *end, const char *pattern); // Consume and return a legal Halide identifier. std::string consume_token(const char **cursor, const char *end); // Consume and return a legal Halide variable identifier. std::string consume_name(const char **cursor, const char *end); // Consume and return an operator token. std::string consume_op(const char **cursor, const char *end); // Consume and return a constant integer. int64_t consume_int(const char **cursor, const char *end); // Parse a list of Halide rewrite rules. std::vector<Rule *> parse_rules_from_file(const std::string &filename); #endif
36
73
0.755556
a45dad890673ecb5aa7174608c928f6fa68e7afa
1,646
php
PHP
app/Views/user_bidang/user_b.php
bangameck/dishub
efc7a3bb6613cf56822105407ba0d18a5c159923
[ "MIT" ]
null
null
null
app/Views/user_bidang/user_b.php
bangameck/dishub
efc7a3bb6613cf56822105407ba0d18a5c159923
[ "MIT" ]
null
null
null
app/Views/user_bidang/user_b.php
bangameck/dishub
efc7a3bb6613cf56822105407ba0d18a5c159923
[ "MIT" ]
null
null
null
<!-- template --> <?= $this->extend('_template/template'); ?> <!-- isi konten --> <?= $this->section('content'); ?> <div class="page-content"> <div class="col-lg-12 grid-margin stretch-card"> <div class="card"> <div class="card-body"> <form class="cmxform" method="post" action="<?= base_url(); ?>/bb_u/detail" enctype="multipart/form-data"> <?= csrf_field(); ?> <div class="form-group row"> <div class="col-lg-12"> <div class="form-group"> <label class="col-form-label">Nama Anggota</label> <select class="js-example-basic-single w-100 <?= ($validation->hasError('username')) ? 'is-invalid' : ''; ?>" name="username" required> <option value="">Pilih Nama</option> <?php foreach ($user as $u) : ?> <option value="<?= $u['username']; ?>"><?= $u['nama']; ?></option> <?php endforeach ?> </select> <div class="invalid-feedback"> <?= $validation->getError('level'); ?> </div> </div> </div> </div> <button type="submit" class="col-lg-12 btn btn-primary"> Selanjutnya </button> <form> </div> </div> </div> <?= $this->endSection(); ?>
47.028571
167
0.391859
80a68dbdf0d9409b5007470d6b8ebba91e9c9297
185
kt
Kotlin
kjob-core/src/main/kotlin/kjob/core/repository/LockRepository.kt
DrewCarlson/kjob
ddd11756e8ede802c16bbaf56f562e8f9735b8d4
[ "Apache-2.0" ]
1
2022-03-16T07:39:03.000Z
2022-03-16T07:39:03.000Z
kjob-core/src/main/kotlin/kjob/core/repository/LockRepository.kt
DrewCarlson/kjob
ddd11756e8ede802c16bbaf56f562e8f9735b8d4
[ "Apache-2.0" ]
1
2022-03-13T20:14:06.000Z
2022-03-13T20:14:06.000Z
kjob-core/src/main/kotlin/kjob/core/repository/LockRepository.kt
DrewCarlson/kjob
ddd11756e8ede802c16bbaf56f562e8f9735b8d4
[ "Apache-2.0" ]
null
null
null
package kjob.core.repository import kjob.core.job.Lock import java.util.* interface LockRepository { suspend fun ping(id: UUID): Lock suspend fun exists(id: UUID): Boolean }
16.818182
41
0.735135
cf251eeed49007463762a44aad231c171f5e9b1c
3,956
php
PHP
tests/Wookieb/ZorroDataSchema/Tests/Schema/Builder/Implementation/ImplementationTest.php
wookieb/zorro-data-schema
f41a93a11dc6983b93d9516f21279804029bec89
[ "MIT" ]
1
2015-08-19T23:23:12.000Z
2015-08-19T23:23:12.000Z
tests/Wookieb/ZorroDataSchema/Tests/Schema/Builder/Implementation/ImplementationTest.php
wookieb/zorro-data-schema
f41a93a11dc6983b93d9516f21279804029bec89
[ "MIT" ]
null
null
null
tests/Wookieb/ZorroDataSchema/Tests/Schema/Builder/Implementation/ImplementationTest.php
wookieb/zorro-data-schema
f41a93a11dc6983b93d9516f21279804029bec89
[ "MIT" ]
null
null
null
<?php namespace Wookieb\ZorroDataSchema\Tests\Schema\Builder\Implementation; use Wookieb\ZorroDataSchema\Schema\Builder\ClassMap\ClassMap; use Wookieb\ZorroDataSchema\Schema\Builder\ClassMap\ClassMapInterface; use Wookieb\ZorroDataSchema\Schema\Builder\Implementation\ClassTypeImplementation; use Wookieb\ZorroDataSchema\Schema\Builder\Implementation\GlobalClassTypeImplementation; use Wookieb\ZorroDataSchema\Schema\Builder\Implementation\Implementation; use Wookieb\ZorroDataSchema\Schema\Builder\Implementation\Style\CamelCaseStyle; use Wookieb\ZorroDataSchema\Tests\ZorroUnit; class ImplementationTest extends ZorroUnit { /** * @var Implementation */ protected $object; /** * @var ClassMapInterface */ private $classMap; /** * @var GlobalClassTypeImplementation */ private $globalClassOptions; protected function setUp() { $this->classMap = new ClassMap(); $this->globalClassOptions = new GlobalClassTypeImplementation(); $this->globalClassOptions->setAccessorsEnabled(false); $this->object = new Implementation($this->classMap, $this->globalClassOptions); } public function testRegisterClassTypeImplementation() { $implementation = new ClassTypeImplementation('helicopter'); $implementation->setClassName('ConcreteXylophone'); $this->assertMethodChaining($this->object->registerClassTypeImplementation($implementation), 'registerClassTypeImplementation'); $this->assertSame($implementation, $this->object->getClassTypeImplementation('helicopter')); } /** * @depends testRegisterClassTypeImplementation */ public function testLookingForClassNameForImplementationThatDoesNotContainClassName() { $this->classMap->registerClass('helicopter', 'ConcreteXylophone'); $implementation = new ClassTypeImplementation('helicopter'); $this->object->registerClassTypeImplementation($implementation); $this->assertSame('ConcreteXylophone', $this->object->getClassTypeImplementation('helicopter')->getClassName()); } public function testDefaultClassImplementationIsCreatedWhenThereIsNoDefinedClassTypeImplementation() { $implementation = new ClassTypeImplementation('helicopter'); $implementation->setClassName('ConcreteXylophone'); $implementation->setAccessorsEnabled(false); $this->classMap->registerClass('helicopter', 'ConcreteXylophone'); $result = $this->object->getClassTypeImplementation('helicopter'); $this->assertEquals($implementation, $result); } /** * @depends testDefaultClassImplementationIsCreatedWhenThereIsNoDefinedClassTypeImplementation */ public function testDefaultClassImplementationIsCreatedBasedOnGlobalClassTypeImplementation() { $this->globalClassOptions->setAccessorsEnabled(true) ->setAccessorsStyle(new CamelCaseStyle()); $this->classMap->registerClass('helicopter', 'ConcreteXylophone'); $implementation = new ClassTypeImplementation('helicopter'); $implementation->setClassName('ConcreteXylophone') ->setAccessorsEnabled(true) ->setAccessorsStyle(new CamelCaseStyle()); $this->assertEquals($implementation, $this->object->getClassTypeImplementation('helicopter')); } public function testSetGetClassMap() { $classMap = new ClassMap(); $this->assertMethodChaining($this->object->setClassMap($classMap), 'setClassMap'); $this->assertSame($classMap, $this->object->getClassMap()); } public function testSetGetGlobalClassTypeImplementation() { $global = new GlobalClassTypeImplementation(); $this->assertMethodChaining($this->object->setGlobalClassTypeImplementation($global), 'setGlobalClassTypeImplementation'); $this->assertSame($global, $this->object->getGlobalClassImplementation()); } }
39.168317
136
0.731041
ef69c392112d1daa7920f16a5a42b1cee2043f35
1,176
c
C
d/islands/serakii/rooms/village/meditation.c
SwusInABox/SunderingShadows
07dfe6ee378ca3266fc26fdc39ff2f29223ae002
[ "MIT" ]
9
2021-07-05T15:24:54.000Z
2022-02-25T19:44:15.000Z
d/islands/serakii/rooms/village/meditation.c
SwusInABox/SunderingShadows
07dfe6ee378ca3266fc26fdc39ff2f29223ae002
[ "MIT" ]
4
2021-03-15T18:56:39.000Z
2021-08-17T17:08:22.000Z
d/islands/serakii/rooms/village/meditation.c
SwusInABox/SunderingShadows
07dfe6ee378ca3266fc26fdc39ff2f29223ae002
[ "MIT" ]
10
2021-03-13T00:18:03.000Z
2022-03-29T15:02:42.000Z
// Serakii meditation room - LoKi 2022 #include <std.h> #include "../../serakii.h" inherit CROOM; void create(){ ::create(); set_property("indoors",1); set_name("meditation room"); set_short("%^C041%^meditation Room%^CRST%^"); set_long("%^C042%^This nearly empty room has multiple thick pillows around the room. The pillows form a circle around a simple pillar in the middle of the room, designed hold items such as focus points, incense, and other spiritual devices. This is a place for individuals to sit in their own presence, focusing on their inner focus and allowing for them to achieve introspection.%^CRST%^\n"); set_items(([ ({"pillows"}) : "%^C060%^These pillows are simple but comfortable pillows.%^CRST%^\n", ({"pillar"}) : "%^C102%^A simple stone pillar in the middle of the room.%^CRST%^\n", ({"incense"}) : "%^C142%^The incense has a few different smells to it, though, all simple and common in nature.%^CRST%^\n", ])); set_smell("default","%^C064%^You smell incense.%^CRST%^"); set_listen("default","%^C138%^You hear training around you.%^CRST%^"); set_exits(([ "up" : TOWN"dojo", ])); }
36.75
393
0.661565
387e94c23f1882e4cad9f972538479d5a9aa1a81
145
php
PHP
lib/RabbitMq/DequeuerAwareInterface.php
ProklUng/bitrix.rabbitmq.module
6bc63367287b14ca501ec4fdfc8c238e88826546
[ "MIT" ]
2
2021-07-13T08:22:49.000Z
2022-01-24T08:10:37.000Z
lib/RabbitMq/DequeuerAwareInterface.php
ProklUng/bitrix.rabbitmq.module
6bc63367287b14ca501ec4fdfc8c238e88826546
[ "MIT" ]
null
null
null
lib/RabbitMq/DequeuerAwareInterface.php
ProklUng/bitrix.rabbitmq.module
6bc63367287b14ca501ec4fdfc8c238e88826546
[ "MIT" ]
null
null
null
<?php namespace Proklung\RabbitMq\RabbitMq; interface DequeuerAwareInterface { public function setDequeuer(DequeuerInterface $dequeuer); }
16.111111
61
0.806897
38a2da20480f3d4ade346149daf15c32f0259108
643
php
PHP
database/seeds/DatabaseSeeder.php
seonghyeongseok/FLH
680d18bda7376284cc69846b6cd6c306814b3203
[ "MIT" ]
null
null
null
database/seeds/DatabaseSeeder.php
seonghyeongseok/FLH
680d18bda7376284cc69846b6cd6c306814b3203
[ "MIT" ]
null
null
null
database/seeds/DatabaseSeeder.php
seonghyeongseok/FLH
680d18bda7376284cc69846b6cd6c306814b3203
[ "MIT" ]
null
null
null
<?php use Illuminate\Database\Seeder; class DatabaseSeeder extends Seeder { /** * Run the database seeds. * Writer : Sung GyeongIm */ public function run() { // Student 정보 $this->call(StudentsTableSeeder::class); // file route 정보 $this->call(FileRoutesTableSeeder::class); // files 정보 $this->call(FilesTableSeeder::class); // boards 정보 $this->call(BoardsTableSeeder::class); // board checked student number 정보 $this->call(BoardCheckTableSeeder::class); // calendar 정보 $this->call(CalendarTableSeeder::class); } }
22.964286
50
0.589425
8da5bf3af192530d8f6f0f3287f9c4da6a77d308
205
js
JavaScript
icons/VideoLibrarySharp.js
suhasv1995/md-react-icons
e4ff823d4a49ff72b3014b3d8b37062b1976af06
[ "MIT" ]
null
null
null
icons/VideoLibrarySharp.js
suhasv1995/md-react-icons
e4ff823d4a49ff72b3014b3d8b37062b1976af06
[ "MIT" ]
2
2020-07-17T05:30:01.000Z
2021-05-09T02:11:02.000Z
icons/VideoLibrarySharp.js
suhasv1995/md-react-icons
e4ff823d4a49ff72b3014b3d8b37062b1976af06
[ "MIT" ]
null
null
null
import React from 'react'; import createSvg from './utils/createSvg'; export default createSvg(<path d="M4 6H2v16h16v-2H4V6zm18-4H6v16h16V2zM12 14.5v-9l6 4.5-6 4.5z" />, 'VideoLibrarySharp', '0 0 24 24');
51.25
134
0.741463
54feb2846e027a898c36ae7e61e7df6a2d135285
224
css
CSS
examples/extension/src/example/style.css
waynecz/OpenTranslate
f4243236b8a68132abf201adc5cde72e60872aeb
[ "MIT" ]
56
2015-10-31T09:07:41.000Z
2022-03-15T13:18:16.000Z
examples/extension/src/example/style.css
waynecz/OpenTranslate
f4243236b8a68132abf201adc5cde72e60872aeb
[ "MIT" ]
29
2015-10-21T15:58:28.000Z
2020-04-23T07:33:31.000Z
examples/extension/src/example/style.css
waynecz/OpenTranslate
f4243236b8a68132abf201adc5cde72e60872aeb
[ "MIT" ]
11
2019-09-30T00:08:18.000Z
2022-02-21T06:09:45.000Z
html, body { margin: 0; padding: 0; } @media (min-width: 769px) { html, body { overflow: hidden; } .root-columns { height: 100vh; } .root-columns .column:last-child { overflow-y: scroll; } }
10.666667
36
0.5625
6603ff7fccb20d8aaab151e581ac7fb145e00178
5,056
py
Python
live_class/live_class.py
skushagra/SQL
f510e4eaa1bedb919eae1509bc6335301460821e
[ "MIT" ]
null
null
null
live_class/live_class.py
skushagra/SQL
f510e4eaa1bedb919eae1509bc6335301460821e
[ "MIT" ]
null
null
null
live_class/live_class.py
skushagra/SQL
f510e4eaa1bedb919eae1509bc6335301460821e
[ "MIT" ]
null
null
null
import datetime import random from tabulate import tabulate as tba from mysql.connector.utils import intstore import mysql.connector from sys import exit from sendmail import sendmail, sendpass mydb = mysql.connector.connect( host="localhost", user="root", password="root" ) c = mydb.cursor() c.execute('use sql_projects') c.execute('select email from admin where app="live_class" or app="live class"') data = c.fetchall() data = data[0][0] pastoch = randint(111111,999999) sendpass(data, pastoch) pas = input('OTP : ') if pas != pastoch: print('Incorrect Password.') exit() print('\nWelcome to Live Class Management.\nKushagraS Version[0.1] \n(c) KushagraS. All Rights Reserved.\n') while True: print('Select an appropriate command : \n\t1. Create new class\n\t2. Retrive old class data.\n\t3. Stop attendance for a class\n') ch = input('Your choice : ') if ch=='1': print('Creating new class : \n') class_name = input('\tClass name : ') date = str(datetime.date.today()) description = input('\tDescribe the class : ') instructor = input('\tInstructor : ') start = input('\tStart time (in 24 hour format) : ') end = input('\tEnd time (in 24 hour format) : ') duration = float(end)-float(start) otp = random.randint(111111, 999999) uar = '' MAX_LIMIT = 122 for _ in range(10): random_integer = random.randint(97, MAX_LIMIT) # Keep appending random characters using chr(x) uar += (chr(random_integer)) print('\nNew Class Information\n') lsa = list() lsa.append(class_name) lsa.append(date) lsa.append(description) lsa.append(instructor) lsa.append(start) lsa.append(end) lsa.append(otp) lsa.append(duration*100) lsa.append(uar) ls = list() ls.append(lsa) print(tba(ls, headers=["Class Name", "Date", "Description", "Isntructor", "Start Time", "End Time", "OTP", "Duration(min)", "Unique Attendance Register"]), '\n\n') lsa.remove(duration*100) print('\nShare the OTP and Unique Attendance Register to mark attendance.\n') cmd = 'INSERT INTO live_class(class_name, class_date, description, instructor, start_time, end_time, otp, uar) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)' c.execute(cmd, lsa) mydb.commit() print('Class created successfully.') c.execute('select class_id from live_class where class_date="'+date+'" and otp='+str(otp)) id = c.fetchall() id = id[0][0] cmd = 'CREATE TABLE '+uar+'(email varchar(50) not null, join_time varchar(20) not null, leave_time varchar(20) not null, poa varchar(1) not null ,PRIMARY KEY ( email ));' c.execute(cmd) print('\nAttendance table',uar,'created successfully.\n') print('Student email will be added to table : '+uar+'\n') mydb.commit() if ch=='2': c.execute('select * from live_class;') data = c.fetchall() print(tba(data, headers=["Class Name", "Date", "Description", "Isntructor", "Start Time", "End Time", "OTP", "Class ID", "Unique Attendance Register"])) print('\n\n') cho = input('Enter class ID : ') cmd = 'select uar from live_class where class_id='+cho c.execute(cmd) data = c.fetchall() if data ==[] or data=='': print('Class not found.') else: data = data[0][0] cmd = 'select * from '+data c.execute(cmd) data = c.fetchall() if data == [] or data == '': print('No attendance has been marked for this class.\n') else: print('\n'+tba(data, headers=["Email", "Join Time", "Leave Time", "P || A"])) if ch=='3': c.execute('select * from live_class;') data = c.fetchall() print(tba(data, headers=["Class Name", "Date", "Description", "Isntructor", "Start Time", "End Time", "OTP", "Duration(min)", "Unique Attendance Register"])) print('\n\n') cho = input('Enter class ID : ') notp = random.randint(111111,999999) cmd = 'update live_class set OTP='+str(notp)+' where class_id='+cho c.execute(cmd) mydb.commit() print('OTP has been changend. Attendance will not not be marked using old OTP.\n') if ch=='exit': mydb.commit() mydb.close() exit() if ch=='sql -p -f': print('\nKushagraS Live Class Full Power SQL Command Line\n(c) KushagraS. All Rights Reserved.\nChanges will not be comitted until you exit.\n\n') while True: cmd = input('kssql>') if cmd=='exit': mydb.commit() break c.execute(cmd) data = c.fetchall() print(tba(data))
38.30303
179
0.567049
a38a4603f48e15d512f09360c9519ffbc14d1100
12,708
ts
TypeScript
CFM5.3_4/ts/1000m/SNFA-OVFZ-STHN-Owens_Lake_deep_fault-CFM5_1000m.ts
SCECcode/CFM
243d2a73f87df7d8fea4ba81026233c76f65300a
[ "BSD-3-Clause" ]
null
null
null
CFM5.3_4/ts/1000m/SNFA-OVFZ-STHN-Owens_Lake_deep_fault-CFM5_1000m.ts
SCECcode/CFM
243d2a73f87df7d8fea4ba81026233c76f65300a
[ "BSD-3-Clause" ]
null
null
null
CFM5.3_4/ts/1000m/SNFA-OVFZ-STHN-Owens_Lake_deep_fault-CFM5_1000m.ts
SCECcode/CFM
243d2a73f87df7d8fea4ba81026233c76f65300a
[ "BSD-3-Clause" ]
null
null
null
GOCAD TSurf 1 HEADER { name:SNFA-OVFZ-STHN-Owens_Lake_deep_fault-CFM5_1000m *visible:true *solid*color:0.240940 0.304279 0.405441 1 } GOCAD_ORIGINAL_COORDINATE_SYSTEM NAME Default AXIS_NAME "X" "Y" "Z" AXIS_UNIT "m" "m" "m" ZPOSITIVE Elevation END_ORIGINAL_COORDINATE_SYSTEM TFACE VRTX 1 409817.53906 4037359.40625 -5921.27734 VRTX 2 409226.62500 4037917.43750 -5715.76367 VRTX 3 409359.77344 4037366.87500 -5193.79395 VRTX 4 409527.96875 4038130.52344 -6486.36914 VRTX 5 410279.86719 4037514.56250 -6864.62646 VRTX 6 409867.73438 4038370.87500 -7350.30908 VRTX 7 410634.19531 4037758.00391 -7751.50635 VRTX 8 410208.04688 4038611.58203 -8213.93164 VRTX 9 410974.47656 4037998.76562 -8615.31543 VRTX 10 410546.53906 4038850.96094 -9078.64062 VRTX 11 411313.52344 4038238.57422 -9480.12500 VRTX 12 410884.47656 4039090.02734 -9943.65137 VRTX 13 411648.12500 4038478.89844 -10339.68945 VRTX 14 411221.88281 4039328.66016 -10808.99023 VRTX 15 411904.00781 4038770.55078 -11149.37500 VRTX 16 412371.20312 4037936.75391 -10763.32715 VRTX 17 412418.24219 4038542.21094 -11667.45605 VRTX 18 413011.27344 4037753.53906 -11551.23047 VRTX 19 412913.07031 4037206.08203 -10634.08398 VRTX 20 413568.03125 4037044.51562 -11473.27246 VRTX 21 413560.28125 4036408.37500 -10582.89941 VRTX 22 414233.75781 4036257.52734 -11473.14355 VRTX 23 414514.91406 4035506.30859 -10899.45703 VRTX 24 415147.35156 4035331.38281 -11703.06250 VRTX 25 415310.73438 4034572.37500 -10928.07129 VRTX 26 415926.65625 4034455.68359 -11794.22852 VRTX 27 416051.06250 4033724.17578 -10994.14551 VRTX 28 415457.46875 4033816.91406 -10144.82812 VRTX 29 416316.42188 4032826.06250 -10216.79102 VRTX 30 415571.61719 4033163.32422 -9448.47461 VRTX 31 416040.50000 4032324.06250 -9089.12402 VRTX 32 415229.67188 4032903.02344 -8541.83887 VRTX 33 415695.32031 4032016.92969 -8117.69824 VRTX 34 414791.99219 4032567.96484 -7392.18115 VRTX 35 414546.34375 4033410.55859 -8129.43750 VRTX 36 413971.27344 4033468.59375 -7287.51025 VRTX 37 413985.38281 4034207.58203 -8300.13574 VRTX 38 414740.60938 4033974.63672 -9196.44531 VRTX 39 414658.27344 4034742.23438 -10090.48828 VRTX 40 413894.48438 4035018.89844 -9235.46875 VRTX 41 413341.91406 4035028.70312 -8371.64941 VRTX 42 413344.23438 4034255.42969 -7346.57275 VRTX 43 413278.20312 4033633.59766 -6410.03369 VRTX 44 413960.78125 4032858.98047 -6449.85791 VRTX 45 414592.63281 4032102.27344 -6447.74414 VRTX 46 415402.58594 4031704.04297 -7223.23584 VRTX 47 416197.50781 4031113.16406 -7731.23584 VRTX 48 415877.85156 4030800.78906 -6796.72363 VRTX 49 415198.60938 4031320.11719 -6376.09912 VRTX 50 414587.95312 4031452.76953 -5569.84082 VRTX 51 413918.35938 4032249.99219 -5563.67725 VRTX 52 413279.17969 4033000.34766 -5553.65186 VRTX 53 412650.65625 4033736.90625 -5555.41064 VRTX 54 412652.91406 4033104.92969 -4702.91162 VRTX 55 413281.22656 4032367.73047 -4701.22412 VRTX 56 413910.01562 4031621.57812 -4704.97949 VRTX 57 414579.78125 4030853.03516 -4748.20166 VRTX 58 415406.26562 4030539.32812 -5671.76758 VRTX 59 416302.69531 4029979.56641 -6397.35938 VRTX 60 416655.83594 4030240.24609 -7328.32129 VRTX 61 416958.89844 4030524.46484 -8206.20215 VRTX 62 416501.57812 4031403.11328 -8619.86230 VRTX 63 416765.36719 4031755.03906 -9526.66895 VRTX 64 417066.03906 4031985.55859 -10338.20312 VRTX 65 417263.48438 4032326.41406 -11129.78711 VRTX 66 416730.31250 4033047.65234 -11210.73340 VRTX 67 417309.57031 4032966.07031 -12075.13867 VRTX 68 417845.31250 4032546.11328 -12409.30859 VRTX 69 417693.54688 4033130.09766 -12947.68164 VRTX 70 417136.05469 4033742.49219 -12838.68652 VRTX 71 416602.35938 4033732.17969 -11925.62207 VRTX 72 416500.17969 4034430.40234 -12716.06543 VRTX 73 415857.07031 4035116.76953 -12593.55273 VRTX 74 415252.46875 4035755.56250 -12467.38770 VRTX 75 415214.43750 4035803.68750 -12470.89648 VRTX 76 414648.81250 4036404.32812 -12363.70605 VRTX 77 414168.89062 4036957.07422 -12336.37207 VRTX 78 413650.87500 4037602.62500 -12382.37695 VRTX 79 413064.80469 4038336.00391 -12434.71191 VRTX 80 412480.87500 4039071.07031 -12487.25879 VRTX 81 412020.50781 4039319.53516 -12080.53027 VRTX 82 411559.64062 4039567.57812 -11674.11523 VRTX 83 411896.53125 4039805.81250 -12539.76465 VRTX 84 415214.43750 4035803.71875 -12470.92773 VRTX 85 415214.43750 4035803.75000 -12470.95898 VRTX 86 415214.50000 4035803.62500 -12470.97266 VRTX 87 415214.37500 4035803.81250 -12470.94727 VRTX 88 418132.55469 4032647.39844 -13033.58398 VRTX 89 418457.92969 4032225.65234 -13010.22266 VRTX 90 418312.87500 4032016.31641 -12481.04492 VRTX 91 418768.32031 4031771.60156 -12920.71973 VRTX 92 418807.28125 4031182.33594 -12188.70703 VRTX 93 417964.20312 4031935.55078 -11783.05566 VRTX 94 418565.39844 4030865.84375 -11350.95215 VRTX 95 417851.24219 4031405.94531 -10876.67969 VRTX 96 418310.20312 4030503.10547 -10433.51367 VRTX 97 419057.19531 4029913.17969 -10903.10547 VRTX 98 418758.20312 4029632.66406 -10022.70410 VRTX 99 418010.70312 4030220.75781 -9553.30957 VRTX 100 417557.92188 4031093.91797 -9963.67188 VRTX 101 417260.83594 4030808.18359 -9084.79199 VRTX 102 417709.10938 4029937.83984 -8674.41211 VRTX 103 417407.07812 4029654.44531 -7795.89014 VRTX 104 417103.81250 4029369.98047 -6918.31934 VRTX 105 417854.17188 4028784.32812 -7386.08252 VRTX 106 418156.58594 4029068.09375 -8264.27246 VRTX 107 418457.81250 4029350.78125 -9143.21582 VRTX 108 417551.74219 4028500.55859 -6507.90137 VRTX 109 416801.66406 4029086.45312 -6039.85254 VRTX 110 417248.96094 4028216.49609 -5629.93604 VRTX 111 416497.61719 4028801.15625 -5162.27588 VRTX 112 416944.40625 4027930.69922 -4753.14893 VRTX 113 416265.97656 4028473.30469 -4352.04688 VRTX 114 415757.17188 4029344.01172 -4663.41357 VRTX 115 415761.15625 4028675.87500 -3790.07935 VRTX 116 415134.09375 4029496.54297 -3850.13232 VRTX 117 415190.88281 4030100.82812 -4739.22754 VRTX 118 414520.65625 4030245.80859 -3850.38477 VRTX 119 413902.25781 4030992.66016 -3850.30127 VRTX 120 413282.23438 4031733.51172 -3850.59595 VRTX 121 412655.60156 4032472.71484 -3850.67700 VRTX 122 412026.96875 4033210.40234 -3852.35352 VRTX 123 412023.97656 4033841.25781 -4705.38184 VRTX 124 411401.72656 4033944.53516 -3852.29492 VRTX 125 411404.61719 4033313.54297 -3000.00000 VRTX 126 412030.51562 4032577.19141 -3000.00000 VRTX 127 412656.14844 4031840.61328 -3000.00000 VRTX 128 413277.85938 4031100.72656 -3000.00000 VRTX 129 413897.26562 4030358.90234 -3000.00000 VRTX 130 414510.88281 4029612.28906 -3000.00000 VRTX 131 415121.39062 4028863.12891 -3000.00000 VRTX 132 415729.32812 4028111.88281 -3000.00000 VRTX 133 416185.41406 4027878.46094 -3438.11792 VRTX 134 416639.92969 4027644.98047 -3876.30469 VRTX 135 416334.62500 4027358.50000 -3000.00000 VRTX 136 410779.85156 4034050.85547 -3000.00000 VRTX 137 410777.49219 4034680.51562 -3853.28467 VRTX 138 411397.63281 4034585.13281 -4718.38232 VRTX 139 410767.39844 4035332.23047 -4722.23242 VRTX 140 410171.28125 4035392.17969 -3838.95654 VRTX 141 410097.72656 4036087.30078 -4660.58545 VRTX 142 409482.47656 4036196.43359 -3811.21802 VRTX 143 409420.51562 4036825.91797 -4562.07373 VRTX 144 409926.57031 4036778.55078 -5314.81201 VRTX 145 410646.14844 4036108.84766 -5572.99414 VRTX 146 410533.25781 4036752.76172 -6247.63770 VRTX 147 411038.13281 4036897.46484 -7239.05078 VRTX 148 411333.64844 4036058.57812 -6592.41895 VRTX 149 411805.05469 4036297.96875 -7650.42383 VRTX 150 411403.57812 4037146.85938 -8151.37256 VRTX 151 412204.06250 4036538.22266 -8599.06348 VRTX 152 411784.85938 4037364.02344 -9049.13379 VRTX 153 412688.03125 4036768.93750 -9673.72070 VRTX 154 412107.78125 4037616.69531 -9908.23828 VRTX 155 413376.09375 4035964.30859 -9679.24902 VRTX 156 413991.03906 4035565.79688 -10127.85840 VRTX 157 412976.02344 4035906.11719 -8967.24316 VRTX 158 412607.25781 4035664.87109 -8066.36523 VRTX 159 412785.47656 4034922.62109 -7356.56201 VRTX 160 412654.02344 4034368.63672 -6408.71729 VRTX 161 412024.39844 4034472.86328 -5558.67480 VRTX 162 412029.98438 4035107.64453 -6418.12646 VRTX 163 411343.07031 4035331.13672 -5638.15576 VRTX 164 412110.02344 4035563.13281 -7150.04053 VRTX 165 409537.15625 4035531.25000 -3000.00000 VRTX 166 410157.48438 4034790.19531 -3000.00000 VRTX 167 416005.53906 4029688.92969 -5520.42383 VRTX 168 419355.83594 4030193.37500 -11783.72852 VRTX 169 419653.15625 4030472.37500 -12665.17773 VRTX 170 419165.96875 4031188.40234 -12805.93555 TRGL 92 170 91 TRGL 92 169 170 TRGL 169 92 168 TRGL 94 168 92 TRGL 168 94 97 TRGL 100 96 95 TRGL 93 90 68 TRGL 93 68 65 TRGL 64 95 65 TRGL 64 100 95 TRGL 64 63 100 TRGL 62 61 101 TRGL 111 109 167 TRGL 58 167 59 TRGL 58 117 167 TRGL 137 166 136 TRGL 137 140 166 TRGL 165 140 142 TRGL 144 3 143 TRGL 1 2 3 TRGL 1 4 2 TRGL 24 73 74 TRGL 5 4 1 TRGL 122 123 124 TRGL 7 6 5 TRGL 9 10 8 TRGL 11 10 9 TRGL 11 12 10 TRGL 13 14 12 TRGL 13 12 11 TRGL 16 15 13 TRGL 61 103 102 TRGL 19 18 16 TRGL 71 70 72 TRGL 19 20 18 TRGL 21 22 20 TRGL 23 22 21 TRGL 7 8 6 TRGL 23 24 22 TRGL 115 132 133 TRGL 141 143 142 TRGL 146 5 1 TRGL 25 26 24 TRGL 30 29 28 TRGL 100 99 96 TRGL 115 133 113 TRGL 148 146 145 TRGL 25 27 26 TRGL 59 167 109 TRGL 28 27 25 TRGL 102 101 61 TRGL 152 154 11 TRGL 30 31 29 TRGL 32 33 31 TRGL 35 34 32 TRGL 65 95 93 TRGL 46 48 47 TRGL 52 55 51 TRGL 53 123 54 TRGL 20 77 78 TRGL 13 15 14 TRGL 145 141 139 TRGL 35 38 37 TRGL 87 75 84 TRGL 16 17 15 TRGL 162 148 163 TRGL 32 30 38 TRGL 32 31 30 TRGL 34 45 46 TRGL 140 165 166 TRGL 38 30 28 TRGL 120 127 128 TRGL 38 28 39 TRGL 38 39 40 TRGL 151 150 149 TRGL 37 38 40 TRGL 42 37 41 TRGL 123 122 54 TRGL 37 42 36 TRGL 42 159 160 TRGL 36 43 44 TRGL 35 36 34 TRGL 36 44 34 TRGL 34 46 33 TRGL 46 47 33 TRGL 46 49 48 TRGL 74 85 84 TRGL 54 122 121 TRGL 93 92 90 TRGL 45 34 44 TRGL 90 91 89 TRGL 121 122 126 TRGL 45 50 49 TRGL 24 26 73 TRGL 108 105 104 TRGL 56 120 119 TRGL 44 52 51 TRGL 44 43 52 TRGL 52 43 53 TRGL 60 103 61 TRGL 52 54 55 TRGL 50 51 56 TRGL 16 18 17 TRGL 163 139 138 TRGL 9 8 7 TRGL 50 56 57 TRGL 50 57 58 TRGL 122 125 126 TRGL 21 20 19 TRGL 49 50 58 TRGL 108 109 110 TRGL 49 58 48 TRGL 48 59 60 TRGL 47 48 60 TRGL 90 89 68 TRGL 57 118 117 TRGL 121 127 120 TRGL 161 138 123 TRGL 62 33 47 TRGL 47 60 61 TRGL 96 99 98 TRGL 114 111 167 TRGL 147 7 5 TRGL 31 62 63 TRGL 96 94 95 TRGL 5 6 4 TRGL 45 51 50 TRGL 65 29 64 TRGL 65 66 29 TRGL 65 67 66 TRGL 59 109 104 TRGL 67 65 68 TRGL 82 15 81 TRGL 62 101 63 TRGL 67 69 70 TRGL 71 67 70 TRGL 101 99 100 TRGL 103 60 104 TRGL 57 119 118 TRGL 67 71 66 TRGL 27 66 71 TRGL 29 66 27 TRGL 90 92 91 TRGL 27 71 26 TRGL 119 128 129 TRGL 26 72 73 TRGL 53 161 123 TRGL 36 42 43 TRGL 24 74 75 TRGL 24 75 76 TRGL 22 76 77 TRGL 115 131 132 TRGL 145 144 141 TRGL 163 148 145 TRGL 22 77 20 TRGL 18 20 78 TRGL 18 78 79 TRGL 31 63 29 TRGL 17 18 79 TRGL 31 33 62 TRGL 17 81 15 TRGL 15 82 14 TRGL 117 118 116 TRGL 81 83 82 TRGL 156 39 23 TRGL 80 83 81 TRGL 160 53 43 TRGL 74 84 75 TRGL 102 107 99 TRGL 17 80 81 TRGL 146 144 145 TRGL 56 51 55 TRGL 87 84 85 TRGL 114 116 115 TRGL 161 163 138 TRGL 68 88 69 TRGL 157 153 151 TRGL 24 76 22 TRGL 88 68 89 TRGL 93 94 92 TRGL 35 32 38 TRGL 96 97 94 TRGL 35 37 36 TRGL 96 98 97 TRGL 150 152 9 TRGL 101 102 99 TRGL 28 29 27 TRGL 103 104 105 TRGL 149 147 148 TRGL 41 40 157 TRGL 102 103 106 TRGL 124 137 136 TRGL 149 150 147 TRGL 102 106 107 TRGL 98 99 107 TRGL 154 13 11 TRGL 152 151 153 TRGL 109 108 104 TRGL 55 121 120 TRGL 24 23 25 TRGL 111 113 112 TRGL 32 34 33 TRGL 114 113 111 TRGL 95 94 93 TRGL 117 116 114 TRGL 56 119 57 TRGL 56 55 120 TRGL 48 58 59 TRGL 55 54 121 TRGL 122 124 125 TRGL 121 126 127 TRGL 41 157 158 TRGL 74 86 85 TRGL 119 120 128 TRGL 118 129 130 TRGL 116 118 130 TRGL 116 130 131 TRGL 115 116 131 TRGL 134 113 133 TRGL 113 134 112 TRGL 103 105 106 TRGL 139 140 137 TRGL 135 134 133 TRGL 135 133 132 TRGL 124 136 125 TRGL 58 57 117 TRGL 138 137 124 TRGL 139 137 138 TRGL 118 119 129 TRGL 140 139 141 TRGL 141 144 143 TRGL 164 158 149 TRGL 141 142 140 TRGL 146 1 144 TRGL 146 147 5 TRGL 86 74 73 TRGL 148 147 146 TRGL 151 152 150 TRGL 111 110 109 TRGL 46 45 49 TRGL 152 153 154 TRGL 40 39 156 TRGL 164 159 158 TRGL 62 47 61 TRGL 150 9 7 TRGL 111 112 110 TRGL 147 150 7 TRGL 154 16 13 TRGL 19 16 154 TRGL 25 23 39 TRGL 153 19 154 TRGL 26 71 72 TRGL 19 153 21 TRGL 155 21 153 TRGL 155 156 21 TRGL 40 156 155 TRGL 52 53 54 TRGL 114 115 113 TRGL 156 23 21 TRGL 25 39 28 TRGL 59 104 60 TRGL 155 157 40 TRGL 158 157 151 TRGL 64 29 63 TRGL 163 145 139 TRGL 155 153 157 TRGL 101 100 63 TRGL 152 11 9 TRGL 41 158 159 TRGL 67 68 69 TRGL 42 41 159 TRGL 164 148 162 TRGL 42 160 43 TRGL 160 161 53 TRGL 162 161 160 TRGL 162 163 161 TRGL 164 149 148 TRGL 114 167 117 TRGL 144 1 3 TRGL 162 159 164 TRGL 17 79 80 TRGL 37 40 41 TRGL 162 160 159 TRGL 158 151 149 TRGL 44 51 45 TRGL 138 124 123 END
26.980892
52
0.785253
b2abdd10328ff9bf6acf19398845f19ba53a6835
233
css
CSS
galeria/css/style.css
valdirsillva/portifolio
45ec1349543d67693409f5a1945cc5705b34e7e6
[ "MIT" ]
null
null
null
galeria/css/style.css
valdirsillva/portifolio
45ec1349543d67693409f5a1945cc5705b34e7e6
[ "MIT" ]
null
null
null
galeria/css/style.css
valdirsillva/portifolio
45ec1349543d67693409f5a1945cc5705b34e7e6
[ "MIT" ]
null
null
null
body { overflow-x: hidden; } .galery-ci { transition: 1s; /* padding: 15px; */ /*width: 200px;*/ } img { padding: 10px; border-radius: 20px; } .galery-ci img:hover { filter: grayscale(100%); transform: scale(1.1); }
12.944444
26
0.600858
dba5b3464d49d47812ef57f394bef71f58cb498a
38
ps1
PowerShell
destreamer.ps1
frank9615/destreamer
571941cd1467c484153002b7c779db02a8b0f9a8
[ "MIT" ]
17
2020-05-12T07:35:34.000Z
2021-09-19T16:30:02.000Z
destreamer.ps1
frank9615/destreamer
571941cd1467c484153002b7c779db02a8b0f9a8
[ "MIT" ]
null
null
null
destreamer.ps1
frank9615/destreamer
571941cd1467c484153002b7c779db02a8b0f9a8
[ "MIT" ]
6
2020-04-29T12:44:30.000Z
2020-07-11T14:42:36.000Z
node.exe build\src\destreamer.js $args
38
38
0.815789
cc26c7857ca7fd0f52af28a7f4b7e65ae9ac0054
263
rb
Ruby
lib/procon_bypass_man/support/safe_timeout.rb
splaspla-hacker/procon_bypass_man
473c03847eb4ea33a08f897cfbe933fd78a674eb
[ "MIT" ]
6
2022-01-05T11:01:53.000Z
2022-02-18T03:54:46.000Z
lib/procon_bypass_man/support/safe_timeout.rb
splaspla-hacker/procon_bypass_man
473c03847eb4ea33a08f897cfbe933fd78a674eb
[ "MIT" ]
20
2021-11-28T11:18:44.000Z
2022-03-04T11:40:38.000Z
lib/procon_bypass_man/support/safe_timeout.rb
splaspla-hacker/procon_bypass_man
473c03847eb4ea33a08f897cfbe933fd78a674eb
[ "MIT" ]
null
null
null
module ProconBypassMan class SafeTimeout class Timeout < StandardError; end # 5秒後がタイムアウト def initialize(timeout: Time.now + 5) @timeout = timeout end def throw_if_timeout! raise Timeout if @timeout < Time.now end end end
17.533333
42
0.669202
5714b692a2597f1f675caa51bbd42725f0ebb534
310
js
JavaScript
Recursion/task5.js
yani-valeva/it-talents
e79d5d01b13d353c10fdc9262d295cd3045629bb
[ "MIT" ]
null
null
null
Recursion/task5.js
yani-valeva/it-talents
e79d5d01b13d353c10fdc9262d295cd3045629bb
[ "MIT" ]
null
null
null
Recursion/task5.js
yani-valeva/it-talents
e79d5d01b13d353c10fdc9262d295cd3045629bb
[ "MIT" ]
null
null
null
function getReversedNum(num) { if (num % 1 !== 0 || num <= 0) { return ''; } return '' + (num % 10) + getReversedNum(Math.floor(num / 10)); } let currentNum = 12321; let result = Number(getReversedNum(currentNum)); console.log(result); console.log((currentNum === result) ? 'yes' : 'no');
25.833333
66
0.596774
1b81ce4538e0fd0222161743015c9843e0995f76
1,745
dart
Dart
lib/pages/dashboard/widget/profile_card_widget.dart
AmitabhWork/FlutterDashboard
d5455b805b9d5a0be807b879aef4209dc39be637
[ "Apache-2.0" ]
null
null
null
lib/pages/dashboard/widget/profile_card_widget.dart
AmitabhWork/FlutterDashboard
d5455b805b9d5a0be807b879aef4209dc39be637
[ "Apache-2.0" ]
null
null
null
lib/pages/dashboard/widget/profile_card_widget.dart
AmitabhWork/FlutterDashboard
d5455b805b9d5a0be807b879aef4209dc39be637
[ "Apache-2.0" ]
null
null
null
import 'package:flutter/material.dart'; import 'package:flutter_hr_management/common/app_colors.dart'; class ProfileCardWidget extends StatelessWidget { @override Widget build(BuildContext context) { return Container( decoration: BoxDecoration( color: AppColor.white, borderRadius: BorderRadius.circular(10), ), padding: EdgeInsets.all(10), child: Column( children: [ Row( children: [ ClipRRect( borderRadius: BorderRadius.circular(1000), child: Image.asset( "assets/user1.jpg", height: 60, width: 60, ), ), SizedBox(width: 10), Column( children: [ Text( "Pooja Sharma", style: TextStyle(fontWeight: FontWeight.bold), ), Text("HR Manager"), ], ) ], ), Divider( thickness: 0.5, color: Colors.grey, ), profileListTile("Joined Date", "18-Apr-2021"), profileListTile("Projects", "32 Active"), profileListTile("Accomplishment", "125"), ], ), ); } Widget profileListTile(text, value) { return Container( margin: EdgeInsets.symmetric(vertical: 8), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text(text), Text( value, style: TextStyle(fontWeight: FontWeight.bold, color: AppColor.black), ), ], ), ); } }
26.439394
78
0.480229
a121e1507f7b22e6808840726d7635f2e550d514
1,164
ts
TypeScript
src/lib/directives/format-date/format-date.directive.ts
wlacu/ngx-cc
3be1ce9c7406fdc34a9d777af428be3e627f73d9
[ "MIT" ]
null
null
null
src/lib/directives/format-date/format-date.directive.ts
wlacu/ngx-cc
3be1ce9c7406fdc34a9d777af428be3e627f73d9
[ "MIT" ]
null
null
null
src/lib/directives/format-date/format-date.directive.ts
wlacu/ngx-cc
3be1ce9c7406fdc34a9d777af428be3e627f73d9
[ "MIT" ]
4
2019-05-08T20:10:16.000Z
2022-02-18T11:16:49.000Z
import { Directive, HostListener } from '@angular/core'; import { NgControl } from '@angular/forms'; @Directive({ selector: '[ngxFormatDate]' }) export class FormatDateDirective { /** * isUpdated - check if input is udpated or not */ isUpdated = false; constructor(private control: NgControl) { } @HostListener('input', ['$event']) formatDate(event: KeyboardEvent) { const eventValue = (event.target as HTMLInputElement).value; const value = parseInt(eventValue, 10); if (!eventValue) { this.isUpdated = false; this.control.control.setValue(eventValue); return; } if (!this.isUpdated && value >= 10 && value <= 12) { this.control.control.setValue(`${value} / `); this.isUpdated = true; } else if (!this.isUpdated && value >= 2 && value <= 9) { this.control.control.setValue(`0${value} / `); this.isUpdated = true; } else if ( !this.isUpdated && eventValue.length === 2 && (value < 12 && value > 0)) { this.control.control.setValue(`${eventValue} / `); this.isUpdated = true; } else { this.control.control.setValue(eventValue); } } }
28.390244
71
0.61512
9070de360d7afa1433b88b10f5898d5d195e00fe
1,509
rs
Rust
src/models/event_message.rs
zshift/warframestat-rs
cdb226587de21d1c6145658710ce29058ab64e5b
[ "MIT" ]
null
null
null
src/models/event_message.rs
zshift/warframestat-rs
cdb226587de21d1c6145658710ce29058ab64e5b
[ "MIT" ]
null
null
null
src/models/event_message.rs
zshift/warframestat-rs
cdb226587de21d1c6145658710ce29058ab64e5b
[ "MIT" ]
null
null
null
/* * WarframeStat.us API * * Simple API for data from the game Warframe. [Parser Docs](https://wfcd.github.io/warframe-worldstate-parser/) [Items Types](https://github.com/WFCD/warframe-items/blob/master/index.d.ts) * * The version of the OpenAPI document: living * Contact: [email protected] * Generated by: https://openapi-generator.tech */ #[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] pub struct EventMessage { /// Who commissioned this reward #[serde(rename = "sender", skip_serializing_if = "Option::is_none")] pub sender: Option<String>, /// Title of the in-game mail received for completing the step. #[serde(rename = "subject", skip_serializing_if = "Option::is_none")] pub subject: Option<String>, /// Body of the in-game mail received for completing the step. #[serde(rename = "message", skip_serializing_if = "Option::is_none")] pub message: Option<String>, /// Path to sender icon string. #[serde(rename = "senderIcon", skip_serializing_if = "Option::is_none")] pub sender_icon: Option<String>, /// Attachments to the message. Unknown usage. #[serde(rename = "attachments", skip_serializing_if = "Option::is_none")] pub attachments: Option<Vec<String>>, } impl EventMessage { pub fn new() -> EventMessage { EventMessage { sender: None, subject: None, message: None, sender_icon: None, attachments: None, } } }
32.804348
190
0.66004
e7181db9fa6b069512706e5f5e24f91737ccefbd
2,368
php
PHP
app/sys/todo/view/assignto.html.php
leowh/colla
1ae8ac00cb4b0c8769948ff948ebfd376328921a
[ "Apache-2.0" ]
null
null
null
app/sys/todo/view/assignto.html.php
leowh/colla
1ae8ac00cb4b0c8769948ff948ebfd376328921a
[ "Apache-2.0" ]
null
null
null
app/sys/todo/view/assignto.html.php
leowh/colla
1ae8ac00cb4b0c8769948ff948ebfd376328921a
[ "Apache-2.0" ]
null
null
null
<?php /** * The assignTo view file of todo module of RanZhi. * * @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com) * @license ZPL (http://zpl.pub/page/zplv12.html) * @author chujilu <[email protected]> * @package todo * @version $Id$ * @link http://www.ranzhico.com */ ?> <?php include '../../../sys/common/view/header.modal.html.php';?> <?php include '../../../sys/common/view/chosen.html.php';?> <?php include '../../../sys/common/view/datepicker.html.php';?> <form method='post' id='ajaxForm' action='<?php echo $this->createLink('todo', 'assignTo', "todoID=$todo->id")?>'> <table class='table table-form'> <tr> <th class='w-80px text-right'><?php echo $lang->todo->assignedTo;?></th> <td class='w-200px'><?php echo html::select('assignedTo', $users, $todo->assignedTo, "class='form-control chosen'");?></td> <td class='w-200px'></td> <td></td> </tr> <tr> <th><?php echo $lang->todo->beginAndEnd?></th> <td> <div class='input-group'> <?php $disabled = $todo->date == '00000000' ? "disabled='disabled'" : ''?> <?php echo html::input('date', $todo->date, "class='form-control form-date' $disabled");?> <span class='input-group-addon'><input type='checkbox' <?php echo $todo->date == '00000000' ? 'checked' : ''?> id='switchDate' onclick='switchDateTodo(this);'> <?php echo $lang->todo->periods['future'];?></span> </div> </td> <td> <div class='input-group'> <?php echo html::select('begin', $times, $todo->begin, 'onchange=selectNext(); class="form-control" style="width: 50%"') . html::select('end', $times, $todo->end, 'class="form-control" style="width: 50%"');?> </div> </td> <td> <input type='checkbox' id='dateSwitcher' onclick='switchDateFeature(this);' <?php if($todo->begin == 2400) echo 'checked';?> > <?php echo $lang->todo->lblDisableDate;?> </td> </tr> <tr> <th></th> <td colspan='3' class=''><?php echo html::submitButton();?></td> </tr> </table> </form> <script language='Javascript'> $(document).ready(function(){switchDateFeature(document.getElementById('dateSwitcher'))}); </script> <?php include '../../../sys/common/view/footer.modal.html.php';?>
45.538462
223
0.590794
23ac1d5001bd421989e82452b73ac75072f6038b
1,115
js
JavaScript
node_modules/angular2-notification-bar/release/src/notification-bar.module.js
Divs123/MyRepo
afb4ba5c808d95da43eede61532356185cba0f8a
[ "MIT" ]
null
null
null
node_modules/angular2-notification-bar/release/src/notification-bar.module.js
Divs123/MyRepo
afb4ba5c808d95da43eede61532356185cba0f8a
[ "MIT" ]
null
null
null
node_modules/angular2-notification-bar/release/src/notification-bar.module.js
Divs123/MyRepo
afb4ba5c808d95da43eede61532356185cba0f8a
[ "MIT" ]
null
null
null
import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { NotificationBarService } from './notification-bar.service'; import { NotificationBarComponent, MESSAGES_CONFIG } from './notification-bar.component'; export var NotificationBarModule = (function () { function NotificationBarModule() { } NotificationBarModule.forRoot = function (config) { return { ngModule: NotificationBarModule, providers: [ { provide: MESSAGES_CONFIG, useValue: config } ] }; }; NotificationBarModule.decorators = [ { type: NgModule, args: [{ imports: [ CommonModule ], declarations: [NotificationBarComponent], providers: [NotificationBarService], exports: [NotificationBarComponent] },] }, ]; /** @nocollapse */ NotificationBarModule.ctorParameters = []; return NotificationBarModule; }()); //# sourceMappingURL=notification-bar.module.js.map
37.166667
89
0.590135
e23a554f5e83319778d34517cfa6357b63d29706
5,927
py
Python
algos/deterministic/JP_coloring.py
HekpoMaH/algorithmic-concepts-reasoning
17c87faad2fbe8481455de34a145a4753a2fe4d0
[ "Apache-2.0" ]
16
2021-07-15T21:23:38.000Z
2022-02-08T11:19:58.000Z
algos/deterministic/JP_coloring.py
HekpoMaH/algorithmic-concepts-reasoning
17c87faad2fbe8481455de34a145a4753a2fe4d0
[ "Apache-2.0" ]
null
null
null
algos/deterministic/JP_coloring.py
HekpoMaH/algorithmic-concepts-reasoning
17c87faad2fbe8481455de34a145a4753a2fe4d0
[ "Apache-2.0" ]
1
2021-07-22T09:32:30.000Z
2021-07-22T09:32:30.000Z
import torch import torch_geometric from torch_geometric.data import Data import torch_scatter import seaborn as sns import networkx as nx import matplotlib import matplotlib.pyplot as plt from algos.layers.encoders import integer2bit from algos.hyperparameters import get_hyperparameters _POS = None def _draw_pt_graph(G, priority, colors=None): G = torch_geometric.utils.to_networkx(G) palette = [sns.color_palette("Paired").as_hex()[i] for i in [0, 1, 2, 3, 4, 5]] cmap = matplotlib.colors.ListedColormap(palette) global _POS pos = nx.spring_layout(G, k=.15, iterations=10) if _POS is None else _POS if _POS is None: _POS = dict(pos.items()) num_nodes = len(G.nodes) plt.figure(figsize=(15, 15)) nx.draw_networkx_nodes(G, pos, node_list=G.nodes(), node_color=colors, cmap=cmap, node_size=1200, alpha=0.9, with_labels=True, ) nx.draw_networkx_edges(G, pos) nx.draw_networkx_labels(G, pos, dict(zip(range(num_nodes), zip(range(num_nodes), priority.tolist()))), font_size=8) plt.axis('off') plt.draw() def jones_plassmann(G, num_colors=5): ''' The below algorithm is based on: M.T.Jones and, P.E.Plassmann, A Parallel Graph Coloring Heuristic, SIAM, Journal of Scienti c Computing 14 (1993) 654 The algorithm takes a graph (a networkx class), randomly assigns a priority to each node and colours according to the above paper. In a nutshell: - assume there is a colour order, (e.g. color 1 < color 2 < ... < color |C|, where |C|=number of colours) - every node checks if it is uncoloured and has the highest priority - if it has these two properties then it colours itself in the lowest colour (according to the ordering) not seen in the neighbourhood. - the only differences to J.P. algorithm is that we assume a fixed number of colours (e.g. 5) as NN are known not to be able to 'count' (ref needed) and we resample the priorities whenever there is a clash (two nodes with the same priority) or we need more colours than needed ''' # we have |C|+1 output classes, 1 for uncolored node and |C|=5 for each colour # Concept encoding # f0 = colored or not # f1 = largest uncolored in neighb. or not (i.e. has highest priority in neighb.) # f2-f6 = colors seen around 1 to 5 # f7-f11 = has been colored in 1 to 5 # E.g. for having colour 3 on the next iteration an ideal explanation is: # (f0 & f9) | (~f0 & f1 & f2 & f3 & ~f4) num_nodes = len(G.nodes) priority = list({'x': x} for x in torch.randint(0, 255, (num_nodes,)).tolist()) priority = dict(zip(range(num_nodes), priority)) nx.set_node_attributes(G, priority) G = torch_geometric.utils.from_networkx(G) colored = torch.zeros(num_nodes, dtype=torch.long) all_inp, all_target_col, all_target_concepts, all_term = [], [], [], [] all_target_concepts_fin = [] n1, n2 = G.edge_index.tolist() inp_priority = integer2bit(G.x) last_concepts_real = None for _ in range(num_nodes+1): c1h = torch.nn.functional.one_hot(colored, num_classes=num_colors+1) all_inp.append(torch.cat((c1h, inp_priority), dim=-1).clone()) concepts = torch.zeros((num_nodes, get_hyperparameters()['dim_concept_parallel_coloring']), dtype=torch.int) concepts[colored != 0, 0] = 1 priority = G.x.clone() priority[colored != 0] = -1 edge_priority = priority[n2] received_priority = torch.full((num_nodes,), -1) torch_scatter.scatter(edge_priority.long(), torch.tensor(n1, dtype=torch.long), reduce='max', out=received_priority) if ((received_priority == priority) & (priority != -1)).any(): print("REDO: clashing priorities") return None to_be_colored = (colored == 0) & (received_priority < priority) concepts[to_be_colored, 1] = 1 colors_around = torch.zeros(num_nodes, num_colors, dtype=torch.bool) for i in range(num_colors): colors_sent = colored[n2] == i+1 rec_color_i = torch.full((num_nodes,), -1) torch_scatter.scatter(colors_sent.long(), torch.tensor(n1, dtype=torch.long), reduce='max', out=rec_color_i) colors_around[rec_color_i != -1, i] = rec_color_i[rec_color_i != -1].bool() colors_to_receive = colors_around.int().min(dim=-1).indices+1 if colors_around.all(dim=-1).any(): print("REDO: colors not enough") return None colored = torch.where(to_be_colored, colors_to_receive, colored) concepts[:, 2:7] = colors_around concepts_fin = concepts.min(dim=0).values.unsqueeze(0) all_target_concepts.append(concepts.clone()) all_target_concepts_fin.append(concepts_fin.clone()) all_target_col.append(colored.clone()) all_term.append((colored == 0).any().unsqueeze(-1)) if not (colored == 0).any() and last_concepts_real is None: last_concepts_real = concepts.clone() all_target_concepts_fin = [all_target_concepts_fin[i + 1] for i in range(0, len(all_target_concepts_fin)-1)] + [all_target_concepts_fin[-1]] data = Data(torch.stack(all_inp, dim=1), edge_index=torch.tensor(G.edge_index), y=torch.stack(all_target_col, dim=1), concepts=torch.stack(all_target_concepts, dim=1), last_concepts_real=last_concepts_real, concepts_fin=torch.stack(all_target_concepts_fin, dim=1), priorities=inp_priority, termination=torch.stack(all_term, dim=1)) return data
44.901515
125
0.634554
b00b8a141a8d8ee61fe250f486961401a05c069d
4,276
py
Python
korbinian/prot_list/uniprot_retrieve.py
teese/korbinian
3715b40830957f04c4f44b01025449bc6b6a936e
[ "MIT" ]
3
2018-03-08T12:03:50.000Z
2018-04-09T12:44:39.000Z
korbinian/prot_list/uniprot_retrieve.py
teese/korbinian
3715b40830957f04c4f44b01025449bc6b6a936e
[ "MIT" ]
2
2018-06-06T09:51:11.000Z
2018-08-06T15:56:41.000Z
korbinian/prot_list/uniprot_retrieve.py
teese/korbinian
3715b40830957f04c4f44b01025449bc6b6a936e
[ "MIT" ]
null
null
null
import os from Bio import SeqIO import pandas as pd import sys # import debugging tools from korbinian.utils import pr, pc, pn, aaa def parse_large_flatfile_with_list_uniprot_accessions(s, input_accession_list, uniprot_dir, logging, selected_uniprot_records_flatfile): """Retrieves UniProt flatfiles from a large flatfile (e.g. All UniProt), based on a list of accession numbers. Parameters ---------- input_accession_list : list List of accessions. uniprot_dir : str Path to UniProt folder, where selected_uniprot_records_flatfile will be saved list_number : int List number used to determine the output filename. logging : logging.Logger Logger for printing to console and logfile. selected_uniprot_records_flatfile : str Path to UniProt flatfile containing selected records for analysis. In this case, the output file. """ """ Retrieves UniProt flatfiles from a large flatfile (e.g. All UniProt), based on a list of accession numbers """ logging.info('~~~~~~~~~~~~ starting A01_parse_large_flatfile_with_list_uniprot_accessions ~~~~~~~~~~~~') # parse_large_flatfile_with_list_uniprot_accessions(list_of_uniprot_accessions, uniprot_flatfile_all_single_pass, selected_uniprot_records_flatfile) # def parse_large_flatfile_with_list_uniprot_accessions(input_accession_list, input_uniprot_flatfile, output_uniprot_flatfile): # define path to large uniprot flatfile containing the protein records to be extracted input_uniprot_flatfile = os.path.join(uniprot_dir, "List%02d_large_uniprot_flatfile.txt" % s["list_number"]) output_uniprot_flatfile = selected_uniprot_records_flatfile # from Bio import SeqIO # create a list of all the uniprot accessions of the proteins to be selected from the larger uniprot file accession_list = [line.strip() for line in open(input_accession_list, "r")] uniprot_index_handle = SeqIO.index(input_uniprot_flatfile, "swiss") with open(output_uniprot_flatfile, "wb") as output: for acc in accession_list: try: # add the selected records to the file, but adds a new line after each line! Doesn't affect later conversion to SeqRecord object output.write(uniprot_index_handle.get_raw(acc)) except KeyError: logging.info("No SwissProt record found in %s for %s." % (input_uniprot_flatfile, acc)) def retrieve_uniprot_data_for_acc_list_in_xlsx_file(excelfile_with_uniprot_accessions, input_uniprot_flatfile, selected_uniprot_records_flatfile, logging): """ From a list of uniprot accessions in excel, select out desired records from a large UniProt flatfile. Parameters ---------- excelfile_with_uniprot_accessions : str Path to excel input file. logging : logging.Logger Logger for printing to console and logfile. selected_uniprot_records_flatfile : str Path to output UniProt flatfile containing selected records for analysis. """ logging.info('~~~~~~~~~~~~ starting retrieve_uniprot_data_for_acc_list_in_xlsx_file ~~~~~~~~~~~~') # take list of acc, search in default uniprot flatfile. If missing, download from uniprot server. df_uniprot_accessions = pd.read_excel(excelfile_with_uniprot_accessions, sheetname='uniprot_numbers') # remove proteins that are marked as 'not included in analysis' df_uniprot_accessions = df_uniprot_accessions[df_uniprot_accessions['include_in_analysis'] == True] # accession_list = [line.strip() for line in open(input_accession_list, "r")] uniprot_index_handle = SeqIO.index(input_uniprot_flatfile, "swiss") with open(selected_uniprot_records_flatfile, "wb") as output: for uniprot_accession in df_uniprot_accessions['uniprot_acc']: try: # this adds the selected records to the file, but adds a new line after each line! # Doesn't affect conversion to SeqRecord object) assert isinstance(uniprot_index_handle, object) output.write(uniprot_index_handle.get_raw(uniprot_accession)) except KeyError: sys.stdout.write("No SwissProt record found in %s for %s." % (input_uniprot_flatfile, uniprot_accession))
57.783784
155
0.735033
ea558017988cb42ea54605bd1279ac43c1ef12f3
5,713
lua
Lua
App/Base/EventDay/init.lua
qwreey75/qwreey.roblox.plugins
7b6552a065a033f375b85cb11eb273ca86fb8a49
[ "MIT" ]
5
2021-02-08T12:10:36.000Z
2021-02-08T12:10:42.000Z
App/Base/EventDay/init.lua
qwreey75/qwreey.roblox.Plugins
7b6552a065a033f375b85cb11eb273ca86fb8a49
[ "MIT" ]
1
2021-03-14T14:05:19.000Z
2021-03-20T04:01:28.000Z
App/Base/EventDay/init.lua
qwreey75/qwreey.roblox.plugins
7b6552a065a033f375b85cb11eb273ca86fb8a49
[ "MIT" ]
null
null
null
local module = {} local function CheckBetween(Num,x,y) if Num == x or Num == y then return true end local min = math.min(x,y) local max = math.max(x,y) if Num >= min and Num <= max then return true end return false end local FireworkColors = { Color3.fromRGB(255,0,0); Color3.fromRGB(0,255,0); Color3.fromRGB(0,0,255); Color3.fromRGB(255,255,0); Color3.fromRGB(0,255,255); Color3.fromRGB(255,0,255); Color3.fromRGB(255,255,255); } local function UIFireworks(Parent,ScalePosX,AdvancedTween,ParticleHandle) local ExploTo = math.random(12,16) local Color = FireworkColors[math.random(1,#FireworkColors)] local OffsetPosY = math.random(100,200) local OffsetPosX = math.random(-75,75) local FlyStart = UDim2.new(ScalePosX,OffsetPosX,1,-1) local FlyEnd = UDim2.new(ScalePosX,0,1,-OffsetPosY) local FlyAng = math.deg(math.atan2(OffsetPosY,OffsetPosX)) local FlyPoint = script.FireworkFly:Clone() FlyPoint.Rotation = FlyAng FlyPoint.Position = FlyStart FlyPoint.Parent = Parent FlyPoint.ImageColor3 = Color FlyPoint.Point.ImageColor3 = Color -- 날라가기 AdvancedTween:RunTween(FlyPoint,{ Time = 0.6; Easing = AdvancedTween.EasingFunctions.Exp4; Direction = AdvancedTween.EasingDirection.Out; },{ Position = FlyEnd; },function() -- 여러 조각으로 부서트리기 for i = 1,ExploTo do -- 발사 local FireworkFire = script.FireworkFire:Clone() FireworkFire.ImageColor3 = Color FireworkFire.Position = FlyEnd FireworkFire.Parent = Parent -- 날라가는 각도 지정 local FireAng = math.random(0,360) FireworkFire.Rotation = FireAng + 270 -- 물리 연산 local Physics = ParticleHandle:Craft_2DParticleEmitter({ OnUDim = true; Inertia = 0.01; Gravity = 0.09; Vector = ParticleHandle:GetVecByYLine(FireAng,3.7); Position = Vector2.new(0,-38); Function = function(Pos,Vec) FireworkFire.Position = UDim2.new( ScalePosX, Pos.X, 1, -OffsetPosY + Pos.Y ) FireworkFire.Rotation = math.deg(math.atan2(Vec.Y,Vec.X)) + 180 end; }) -- 소멸 delay(0.25,function() AdvancedTween:RunTween(FireworkFire,{ Time = 0.25; Easing = AdvancedTween.EasingFunctions.Linear; Direction = AdvancedTween.EasingDirection.Out; },{ ImageTransparency = 1; },function() Physics:Destroy() FireworkFire:Destroy() end) end) end -- 폭죽 헤드 없에기 AdvancedTween:RunTweens({FlyPoint,FlyPoint.Point},{ Time = 0.2; Easing = AdvancedTween.EasingFunctions.Linear; Direction = AdvancedTween.EasingDirection.Out; },{ ImageTransparency = 1; },function() FlyPoint:Destroy() end) end) end local Events = { { Name = "Christmas"; Check = function(Lang,Date) if Date.month ~= 12 then return false elseif not CheckBetween(Date.day,25,26) then return false end return true end; RunEvent = function(ui,Modules) local ParticleHandle = Modules.ParticleHandle local MaterialUI = Modules.MaterialUI local AdvancedTween = Modules.AdvancedTween local snows = { "http://www.roblox.com/asset/?id=6130714772"; "http://www.roblox.com/asset/?id=6130714752"; "http://www.roblox.com/asset/?id=6130714736"; "http://www.roblox.com/asset/?id=6130714725"; } local Focused = false local Running = false ui.WindowFocused:Connect(function() Focused = true if Running then return end while true do if not Focused then break end local PosX = math.random(0,100)/100 local this = MaterialUI.Create("ImageLabel",{ AnchorPoint = Vector2.new(0,.51); Position = UDim2.new(PosX,0,0,0); Size = UDim2.fromOffset(25,25); BackgroundTransparency = 1; Image = snows[math.random(1,#snows)]; ZIndex = 2147483647; Parent = ui; ImageTransparency = 0.7; }) local Physics = ParticleHandle:Craft_2DParticleEmitter({ OnUDim = true; Inertia = 1; Gravity = 0; Vector = ParticleHandle:GetVecByYLine(180,3.2); Position = Vector2.new(0,0); Function = function(Pos) this.Position = UDim2.new(PosX,0,0,Pos.Y) end; }) delay(3,function() if this then Physics:Destroy() this:Destroy() end end) wait(0.2) end Running = false end) ui.WindowFocusReleased:Connect(function() Focused = false end) end; }; { Name = "Korea-NewYear"; Check = function(Lang,Date) if Lang ~= "ko-kr" then return false elseif Date.month ~= 2 then return false elseif not CheckBetween(Date.day,10,15) then return false end return true end; RunEvent = function(ui,Modules) local ParticleHandle = Modules.ParticleHandle local MaterialUI = Modules.MaterialUI local AdvancedTween = Modules.AdvancedTween local Focused = false local Running = false ui.WindowFocused:Connect(function() Focused = true if Running then return end for i = 1,10 do if not Focused then break end UIFireworks(ui,math.random(10,90)/100,AdvancedTween,ParticleHandle) wait(0.5) end Running = false end) ui.WindowFocusReleased:Connect(function() Focused = false end) end; }; } function module:Setup(ui,MaterialUI,AdvancedTween) local LangName = game:GetService("LocalizationService").SystemLocaleId local Date = os.date("*t",os.time()) for _,Event in pairs(Events) do if Event.Check(LangName,Date) then local ParticleHandle = require(script.UIParticleEmitter) Event.RunEvent(ui,{ MaterialUI = MaterialUI; ParticleHandle = ParticleHandle; AdvancedTween = AdvancedTween; }) break end end end return module
23.607438
73
0.663224
078f347079bd5532c7d442ed175310f2622379f5
8,057
hpp
C++
CvGameCoreDLL/Boost-1.32.0/include/boost/mpl/set/aux_/preprocessed/plain/set40.hpp
Imperator-Knoedel/Sunset
19c95f4844586b96341f3474b58e0dacaae485b9
[ "MIT" ]
1
2019-08-05T18:36:14.000Z
2019-08-05T18:36:14.000Z
CvGameCoreDLL/Boost-1.32.0/include/boost/mpl/set/aux_/preprocessed/plain/set40.hpp
Imperator-Knoedel/Sunset
19c95f4844586b96341f3474b58e0dacaae485b9
[ "MIT" ]
null
null
null
CvGameCoreDLL/Boost-1.32.0/include/boost/mpl/set/aux_/preprocessed/plain/set40.hpp
Imperator-Knoedel/Sunset
19c95f4844586b96341f3474b58e0dacaae485b9
[ "MIT" ]
null
null
null
// Copyright Aleksey Gurtovoy 2000-2004 // Copyright David Abrahams 2003-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Preprocessed version of "boost/mpl/set/set40.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30 > struct set31 : s_item< T30 , set30< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29 > > { typedef set31 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31 > struct set32 : s_item< T31 , set31< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30 > > { typedef set32 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32 > struct set33 : s_item< T32 , set32< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31 > > { typedef set33 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33 > struct set34 : s_item< T33 , set33< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32 > > { typedef set34 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 > struct set35 : s_item< T34 , set34< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33 > > { typedef set35 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35 > struct set36 : s_item< T35 , set35< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34 > > { typedef set36 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36 > struct set37 : s_item< T36 , set36< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35 > > { typedef set37 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37 > struct set38 : s_item< T37 , set37< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36 > > { typedef set38 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38 > struct set39 : s_item< T38 , set38< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37 > > { typedef set39 type; }; template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 , typename T10, typename T11, typename T12, typename T13, typename T14 , typename T15, typename T16, typename T17, typename T18, typename T19 , typename T20, typename T21, typename T22, typename T23, typename T24 , typename T25, typename T26, typename T27, typename T28, typename T29 , typename T30, typename T31, typename T32, typename T33, typename T34 , typename T35, typename T36, typename T37, typename T38, typename T39 > struct set40 : s_item< T39 , set39< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24,T25,T26,T27,T28,T29,T30,T31,T32,T33,T34,T35,T36,T37,T38 > > { typedef set40 type; }; }}
40.084577
164
0.682512
2fe408f5037fc3a7255b1b32266159ee20a4cdbd
113
py
Python
DeepAlignmentNetwork/menpofit/aps/__init__.py
chiawei-liu/DeepAlignmentNetwork
52621cd2f697abe372b88c9ea0ee08f0d93b43d8
[ "MIT" ]
220
2019-09-01T01:52:04.000Z
2022-03-28T12:52:07.000Z
DeepAlignmentNetwork/menpofit/aps/__init__.py
chiawei-liu/DeepAlignmentNetwork
52621cd2f697abe372b88c9ea0ee08f0d93b43d8
[ "MIT" ]
80
2015-01-05T16:17:39.000Z
2020-11-22T13:42:00.000Z
DeepAlignmentNetwork/menpofit/aps/__init__.py
chiawei-liu/DeepAlignmentNetwork
52621cd2f697abe372b88c9ea0ee08f0d93b43d8
[ "MIT" ]
64
2015-02-02T15:11:38.000Z
2022-02-28T06:19:31.000Z
from .base import GenerativeAPS from .fitter import GaussNewtonAPSFitter from .algorithm import Inverse, Forward
28.25
40
0.849558
510631d594416f71b3af739e374e0918b53bb158
1,492
swift
Swift
Pod-Chat-iOS-SDK/Chat/Models/PrimaryModels/BotInfoVO.swift
hamed8080/Fanap-Chat-SDK
07b05f9b9a42cc88a4d9e71cd0aa94f360df4ba2
[ "MIT" ]
1
2019-12-29T13:50:47.000Z
2019-12-29T13:50:47.000Z
Pod-Chat-iOS-SDK/Chat/Models/PrimaryModels/BotInfoVO.swift
hamed8080/Fanap-Chat-SDK
07b05f9b9a42cc88a4d9e71cd0aa94f360df4ba2
[ "MIT" ]
null
null
null
Pod-Chat-iOS-SDK/Chat/Models/PrimaryModels/BotInfoVO.swift
hamed8080/Fanap-Chat-SDK
07b05f9b9a42cc88a4d9e71cd0aa94f360df4ba2
[ "MIT" ]
2
2021-03-27T11:40:28.000Z
2021-04-07T08:19:13.000Z
// // BotInfoVO.swift // FanapPodChatSDK // // Created by MahyarZhiani on 2/5/1399 AP. // Copyright © 1399 Mahyar Zhiani. All rights reserved. // import SwiftyJSON open class BotInfoVO { public var botName: String? public var botUserId: Int? // id of user equivalent to bot public var commandList: [String] = [] // all commands that have been defined to this bot public init(messageContent: JSON) { self.botName = messageContent["name"].string self.botUserId = messageContent["botUserId"].int if let commandsJSON = messageContent["commandList"].arrayObject as? [String] { self.commandList = commandsJSON } } public init(botName: String?, botUserId: Int?, commands: [String]?) { self.botName = botName self.botUserId = botUserId if let theCommands = commands { self.commandList = theCommands } } public init(theBotInfoVO: BotInfoVO) { self.botName = theBotInfoVO.botName self.botUserId = theBotInfoVO.botUserId self.commandList = theBotInfoVO.commandList } public func formatToJSON() -> JSON { let result: JSON = ["botName": botName ?? NSNull(), "botUserId": botUserId ?? NSNull(), "commandList": commandList] return result } }
29.84
98
0.567024
0dc039f639d9dcccb4e59cce72ce54086ccb8c54
90
cs
C#
Source/PackagingTool/Properties/AssemblyInfo.cs
Dushess/OpenCAGE
b6ca02128608506575c7c6685d257f09710d55f6
[ "MIT" ]
24
2017-11-28T10:40:38.000Z
2020-03-01T04:35:43.000Z
Source/PackagingTool/Properties/AssemblyInfo.cs
Dushess/OpenCAGE
b6ca02128608506575c7c6685d257f09710d55f6
[ "MIT" ]
null
null
null
Source/PackagingTool/Properties/AssemblyInfo.cs
Dushess/OpenCAGE
b6ca02128608506575c7c6685d257f09710d55f6
[ "MIT" ]
2
2018-04-15T19:36:04.000Z
2020-03-01T04:35:46.000Z
// THIS IS LEGACY FOR OLDER OPENCAGE VERSIONS [assembly: AssemblyFileVersion("9.9.9.9")]
30
46
0.744444
2fd6324d0f091b31d84d2f540ed44c97d23a000a
3,509
py
Python
common/bin/namespace_manager.py
frankovacevich/aleph
9b01dcabf3c074e8617e50fffd35c9ee1960eab6
[ "MIT" ]
null
null
null
common/bin/namespace_manager.py
frankovacevich/aleph
9b01dcabf3c074e8617e50fffd35c9ee1960eab6
[ "MIT" ]
null
null
null
common/bin/namespace_manager.py
frankovacevich/aleph
9b01dcabf3c074e8617e50fffd35c9ee1960eab6
[ "MIT" ]
null
null
null
""" Namespace Manager ----------------- The namespace manager is the interface between data and the databases. Use the namespace manager to save data to the database and perform simple queries. The namespace manager can handle many DBMS. See the db_connections folder to see the files that connect different types of databases. Modify the namespace manager to use the database system you want. By default, the namespace manager uses an SQLite connection. """ import traceback import json import datetime import os from dateutil.tz import tzutc, tzlocal from dateutil import parser from .logger import Log from .root_folder import aleph_root_folder from .db_connections import functions as fn from .db_connections.sqlite import SqliteConnection class NamespaceManager: def __init__(self): self.conn = SqliteConnection(os.path.join(aleph_root_folder, "local", "backup", "msql.db")) self.log = Log("namespace_manager.log") # ========================================================================== # Connect and close # ========================================================================== def connect(self): self.conn.connect() def close(self): self.conn.close() # ========================================================================== # Operations (save, get, delete) # ========================================================================== def save_data(self, key, data): data = fn.__format_data_for_saving__(data) self.conn.save_data(key, data) def get_data(self, key, field="*", since=365, until=0, count=100000): since = fn.__parse_date__(since) until = fn.__parse_date__(until, True) return self.conn.get_data(key, field, since, until, count) def get_data_by_id(self, key, id_): return self.conn.get_data_by_id(key, id_) def delete_data(self, key, since, until): since = fn.__parse_date__(since) until = fn.__parse_date__(until, True) return self.conn.delete_data(key, since, until) def delete_data_by_id(self, key, id_): return self.conn.delete_data_by_id(key, id_) # ========================================================================== # Get keys and fields. Get and set metadata # ========================================================================== def get_keys(self): return self.conn.get_keys() def get_fields(self, key): return self.conn.get_fields(key) def set_metadata(self, key, field, alias, description=""): if field in ["t", "id", "id_", "t_"]: raise Exception("Invalid field") self.conn.set_metadata(key, field, str(alias), str(description)) def get_metadata(self, key): return self.conn.get_metadata(key) # ========================================================================== # Remove and rename keys and fields # ========================================================================== def remove_key(self, key): self.conn.remove_key(key) def remove_field(self, key, field): if field in ["t", "id", "id_", "t_"]: raise Exception("Invalid field") self.conn.remove_field(key, field) def rename_key(self, key, new_key): self.conn.rename_key(key, new_key) def rename_field(self, key, field, new_field): if field in ["t", "id", "id_", "t_"]: raise Exception("Invalid field") self.conn.rename_field(key, field, new_field)
34.742574
99
0.556854
d4e7e9941781eb6cb81f8a66e46d2237d5df8ca4
21,995
ts
TypeScript
types/es-abstract/scripts/intrinsics-data.ts
jayden-chan/DefinitelyTyped
444d0c1530f686080c1ad3364a49a8d84a461d6d
[ "MIT" ]
8
2020-10-27T16:56:23.000Z
2021-11-12T11:29:00.000Z
types/es-abstract/scripts/intrinsics-data.ts
jayden-chan/DefinitelyTyped
444d0c1530f686080c1ad3364a49a8d84a461d6d
[ "MIT" ]
null
null
null
types/es-abstract/scripts/intrinsics-data.ts
jayden-chan/DefinitelyTyped
444d0c1530f686080c1ad3364a49a8d84a461d6d
[ "MIT" ]
1
2021-09-13T08:39:04.000Z
2021-09-13T08:39:04.000Z
const hasSymbols = true; const { getPrototypeOf: getProto, getOwnPropertyDescriptor: $gOPD, setPrototypeOf: setProto } = Reflect as { getPrototypeOf(target: object): object | null; getOwnPropertyDescriptor<T extends object, P extends PropertyKey>( target: T, propertyKey: P, ): (P extends keyof T ? TypedPropertyDescriptor<T[P]> : PropertyDescriptor) | undefined; setPrototypeOf(target: object, proto: object | null): boolean; }; // tslint:disable: only-arrow-functions space-before-function-paren const ThrowTypeError = (function () { return $gOPD(arguments, 'callee')!.get; })(); // tslint:disable: no-async-without-await const generator = function* () {}; const asyncFn = async function () {}; const asyncGen = async function* () {}; // tslint:enable const generatorFunction = generator ? /** @type {GeneratorFunctionConstructor} */ generator.constructor : undefined; const generatorFunctionPrototype = generatorFunction ? generatorFunction.prototype : undefined; const generatorPrototype = generatorFunctionPrototype ? generatorFunctionPrototype.prototype : undefined; const asyncFunction = asyncFn ? /** @type {FunctionConstructor} */ asyncFn.constructor : undefined; const asyncGenFunction = asyncGen ? /** @type {AsyncGeneratorFunctionConstructor} */ asyncGen.constructor : undefined; const asyncGenFunctionPrototype = asyncGenFunction ? asyncGenFunction.prototype : undefined; const asyncGenPrototype = asyncGenFunctionPrototype ? asyncGenFunctionPrototype.prototype : undefined; // tslint:disable-next-line: ban-types const TypedArray = typeof Uint8Array === 'undefined' ? undefined : (getProto(Uint8Array) as Function); const $ObjectPrototype = Object.prototype; const $ArrayIteratorPrototype = hasSymbols ? (getProto([][Symbol.iterator]()) as IterableIterator<any>) : undefined; export interface BaseIntrinsic { getterType?: string; get?: string; overrides?: { [property: string]: string | Override | null }; } export interface Override extends BaseIntrinsic { type?: string; } export interface Intrinsic extends Override { type: string; } // prettier-ignore export const BASE_INTRINSICS: { [intrinsic: string]: unknown } = { '%Array%': Array, '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, '%ArrayBufferPrototype%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer.prototype, '%ArrayIteratorPrototype%': $ArrayIteratorPrototype, '%ArrayPrototype%': Array.prototype, '%ArrayProto_entries%': Array.prototype.entries, '%ArrayProto_forEach%': Array.prototype.forEach, '%ArrayProto_keys%': Array.prototype.keys, '%ArrayProto_values%': Array.prototype.values, '%AsyncFromSyncIteratorPrototype%': undefined, '%AsyncFunction%': asyncFunction, '%AsyncFunctionPrototype%': asyncFunction ? asyncFunction.prototype : undefined, '%AsyncGenerator%': asyncGenFunctionPrototype, '%AsyncGeneratorFunction%': asyncGenFunction, '%AsyncGeneratorPrototype%': asyncGenPrototype, '%AsyncIteratorPrototype%': asyncGenPrototype ? getProto(asyncGenPrototype) : undefined, '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, '%Boolean%': Boolean, '%BooleanPrototype%': Boolean.prototype, '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, '%DataViewPrototype%': typeof DataView === 'undefined' ? undefined : DataView.prototype, '%Date%': Date, '%DatePrototype%': Date.prototype, '%decodeURI%': decodeURI, '%decodeURIComponent%': decodeURIComponent, '%encodeURI%': encodeURI, '%encodeURIComponent%': encodeURIComponent, '%Error%': Error, '%ErrorPrototype%': Error.prototype, '%eval%': eval, // eslint-disable-line no-eval '%EvalError%': EvalError, '%EvalErrorPrototype%': EvalError.prototype, '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, '%Float32ArrayPrototype%': typeof Float32Array === 'undefined' ? undefined : Float32Array.prototype, '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, '%Float64ArrayPrototype%': typeof Float64Array === 'undefined' ? undefined : Float64Array.prototype, '%Function%': Function, '%FunctionPrototype%': Function.prototype, '%Generator%': generatorFunctionPrototype, '%GeneratorFunction%': generatorFunction, '%GeneratorPrototype%': generatorPrototype, '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, '%Int8ArrayPrototype%': typeof Int8Array === 'undefined' ? undefined : Int8Array.prototype, '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, '%Int16ArrayPrototype%': typeof Int16Array === 'undefined' ? undefined : Int8Array.prototype, '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, '%Int32ArrayPrototype%': typeof Int32Array === 'undefined' ? undefined : Int32Array.prototype, '%isFinite%': isFinite, '%isNaN%': isNaN, '%IteratorPrototype%': hasSymbols ? getProto($ArrayIteratorPrototype!) : undefined, '%JSON%': typeof JSON === 'object' ? JSON : undefined, '%JSONParse%': typeof JSON === 'object' ? JSON.parse : undefined, '%Map%': typeof Map === 'undefined' ? undefined : Map, '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]())!, '%MapPrototype%': typeof Map === 'undefined' ? undefined : Map.prototype, '%Math%': Math, '%Number%': Number, '%NumberPrototype%': Number.prototype, '%Object%': Object, '%ObjectPrototype%': $ObjectPrototype, '%ObjProto_toString%': $ObjectPrototype.toString, '%ObjProto_valueOf%': $ObjectPrototype.valueOf, '%parseFloat%': parseFloat, '%parseInt%': parseInt, '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, '%PromisePrototype%': typeof Promise === 'undefined' ? undefined : Promise.prototype, '%PromiseProto_then%': typeof Promise === 'undefined' ? undefined : Promise.prototype.then, '%Promise_all%': typeof Promise === 'undefined' ? undefined : Promise.all, '%Promise_reject%': typeof Promise === 'undefined' ? undefined : Promise.reject, '%Promise_resolve%': typeof Promise === 'undefined' ? undefined : Promise.resolve, '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, '%RangeError%': RangeError, '%RangeErrorPrototype%': RangeError.prototype, '%ReferenceError%': ReferenceError, '%ReferenceErrorPrototype%': ReferenceError.prototype, '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, '%RegExp%': RegExp, '%RegExpPrototype%': RegExp.prototype, '%Set%': typeof Set === 'undefined' ? undefined : Set, '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()), '%SetPrototype%': typeof Set === 'undefined' ? undefined : Set.prototype, '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, '%SharedArrayBufferPrototype%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer.prototype, '%String%': String, '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined, '%StringPrototype%': String.prototype, '%Symbol%': hasSymbols ? Symbol : undefined, '%SymbolPrototype%': hasSymbols ? Symbol.prototype : undefined, '%SyntaxError%': SyntaxError, '%SyntaxErrorPrototype%': SyntaxError.prototype, '%ThrowTypeError%': ThrowTypeError, '%TypedArray%': TypedArray, '%TypedArrayPrototype%': TypedArray ? TypedArray.prototype : undefined, '%TypeError%': TypeError, '%TypeErrorPrototype%': TypeError.prototype, '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, '%Uint8ArrayPrototype%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array.prototype, '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, '%Uint8ClampedArrayPrototype%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray.prototype, '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, '%Uint16ArrayPrototype%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array.prototype, '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, '%Uint32ArrayPrototype%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array.prototype, '%URIError%': URIError, '%URIErrorPrototype%': URIError.prototype, '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, '%WeakMapPrototype%': typeof WeakMap === 'undefined' ? undefined : WeakMap.prototype, '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet, '%WeakSetPrototype%': typeof WeakSet === 'undefined' ? undefined : WeakSet.prototype, }; setProto(BASE_INTRINSICS, null); // prettier-ignore export const LEGACY_ALIASES: { [intrinsic: string]: string[] } = { '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], '%ArrayPrototype%': ['Array', 'prototype'], '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], '%ArrayProto_values%': ['Array', 'prototype', 'values'], '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], '%BooleanPrototype%': ['Boolean', 'prototype'], '%DataViewPrototype%': ['DataView', 'prototype'], '%DatePrototype%': ['Date', 'prototype'], '%ErrorPrototype%': ['Error', 'prototype'], '%EvalErrorPrototype%': ['EvalError', 'prototype'], '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], '%FunctionPrototype%': ['Function', 'prototype'], '%Generator%': ['GeneratorFunction', 'prototype'], '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], '%JSONParse%': ['JSON', 'parse'], '%JSONStringify%': ['JSON', 'stringify'], '%MapPrototype%': ['Map', 'prototype'], '%NumberPrototype%': ['Number', 'prototype'], '%ObjectPrototype%': ['Object', 'prototype'], '%ObjProto_toString%': ['Object', 'prototype', 'toString'], '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], '%PromisePrototype%': ['Promise', 'prototype'], '%PromiseProto_then%': ['Promise', 'prototype', 'then'], '%Promise_all%': ['Promise', 'all'], '%Promise_reject%': ['Promise', 'reject'], '%Promise_resolve%': ['Promise', 'resolve'], '%RangeErrorPrototype%': ['RangeError', 'prototype'], '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], '%RegExpPrototype%': ['RegExp', 'prototype'], '%SetPrototype%': ['Set', 'prototype'], '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], '%StringPrototype%': ['String', 'prototype'], '%SymbolPrototype%': ['Symbol', 'prototype'], '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], '%TypedArrayPrototype%': ['TypedArray', 'prototype'], '%TypeErrorPrototype%': ['TypeError', 'prototype'], '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], '%URIErrorPrototype%': ['URIError', 'prototype'], '%WeakMapPrototype%': ['WeakMap', 'prototype'], '%WeakSetPrototype%': ['WeakSet', 'prototype'] }; setProto(LEGACY_ALIASES, null); export const BASE_INTRINSIC_DATA: { [intrinsic: string]: string | Intrinsic } = { Array: { type: 'ArrayConstructor', get: 'typeof Array' }, ArrayBuffer: { type: 'ArrayBufferConstructor', get: 'typeof ArrayBuffer', overrides: { prototype: { type: 'ArrayBuffer', get: 'typeof ArrayBuffer.prototype' }, }, }, ArrayIteratorPrototype: 'IterableIterator<any>', AsyncFromSyncIteratorPrototype: { type: 'AsyncGenerator<any>', overrides: { next: "AsyncGenerator<any>['next']", return: "AsyncGenerator<any>['return']", throw: "AsyncGenerator<any>['throw']", }, }, AsyncFunction: { type: 'FunctionConstructor', get: 'typeof Function' }, AsyncGeneratorFunction: { type: 'AsyncGeneratorFunctionConstructor', overrides: { prototype: { type: 'AsyncGeneratorFunction', overrides: { prototype: 'AsyncGenerator<any>', }, }, }, }, AsyncIteratorPrototype: 'AsyncIterable<any>', Atomics: { type: 'Atomics', get: 'typeof Atomics' }, BigInt: { type: 'BigIntConstructor', get: 'typeof BigInt' }, BigInt64Array: { type: 'BigInt64ArrayConstructor', get: 'typeof BigInt64Array', overrides: { prototype: { type: 'BigInt64Array', get: 'typeof BigInt64Array.prototype' } }, }, BigUint64Array: { type: 'BigUint64ArrayConstructor', get: 'typeof BigUint64Array', overrides: { prototype: { type: 'BigUint64Array', get: 'typeof BigUint64Array.prototype' } }, }, Boolean: { type: 'BooleanConstructor', get: 'typeof Boolean' }, DataView: { type: 'DataViewConstructor', get: 'typeof DataView', overrides: { prototype: { type: 'DataView', get: 'typeof DataView.prototype' }, }, }, Date: { type: 'DateConstructor', get: 'typeof Date', overrides: { prototype: { type: 'Date', get: 'typeof Date.prototype', overrides: { getYear: null, setYear: null, toGMTString: null, }, }, }, }, decodeURI: 'typeof decodeURI', decodeURIComponent: 'typeof decodeURIComponent', encodeURI: 'typeof encodeURI', encodeURIComponent: 'typeof encodeURIComponent', Error: { type: 'ErrorConstructor', get: 'typeof Error', overrides: { captureStackTrace: null, prepareStackTrace: null, stackTraceLimit: null, prototype: { type: 'Error', get: 'typeof Error.prototype' }, }, }, eval: 'typeof eval', EvalError: { type: 'EvalErrorConstructor', get: 'typeof EvalError', overrides: { prototype: { type: 'EvalError', get: 'typeof EvalError.prototype' }, }, }, Float32Array: { type: 'Float32ArrayConstructor', get: 'typeof Float32Array', overrides: { prototype: { type: 'Float32Array', get: 'typeof Float32Array.prototype' }, }, }, Float64Array: { type: 'Float64ArrayConstructor', get: 'typeof Float64Array', overrides: { prototype: { type: 'Float64Array', get: 'typeof Float64Array.prototype' }, }, }, Function: { type: 'FunctionConstructor', get: 'typeof Function', overrides: { prototype: { type: 'typeof Function.prototype', overrides: { arguments: null, callee: null, caller: null, }, }, }, }, GeneratorFunction: { type: 'GeneratorFunctionConstructor', overrides: { prototype: { type: 'GeneratorFunction', overrides: { prototype: 'Generator<any>', }, }, }, }, Int8Array: { type: 'Int8ArrayConstructor', get: 'typeof Int8Array', overrides: { prototype: { type: 'Int8Array', get: 'typeof Int8Array.prototype' }, }, }, Int16Array: { type: 'Int16ArrayConstructor', get: 'typeof Int16Array', overrides: { prototype: { type: 'Int16Array', get: 'typeof Int16Array.prototype' }, }, }, Int32Array: { type: 'Int32ArrayConstructor', get: 'typeof Int32Array', overrides: { prototype: { type: 'Int32Array', get: 'typeof Int32Array.prototype' }, }, }, isFinite: 'typeof isFinite', isNaN: 'typeof isNaN', IteratorPrototype: 'Iterable<any>', JSON: { type: 'JSON', get: 'typeof JSON' }, Map: { type: 'MapConstructor', get: 'typeof Map', overrides: { prototype: { type: 'typeof Map.prototype', getterType: 'Map<any, any>' }, }, }, MapIteratorPrototype: 'IterableIterator<any>', Math: { type: 'Math', get: 'typeof Math' }, Number: { type: 'NumberConstructor', get: 'typeof Number' }, Object: { type: 'ObjectConstructor', get: 'typeof Object', overrides: { prototype: { type: 'typeof Object.prototype', overrides: { ['__proto__']: null, __defineGetter__: null, __defineSetter__: null, __lookupGetter__: null, __lookupSetter__: null, }, }, }, }, parseFloat: 'typeof parseFloat', parseInt: 'typeof parseInt', Promise: { type: 'PromiseConstructor', get: 'typeof Promise', overrides: { // TODO: Delete in v1.17: allSettled: null, }, }, Proxy: { type: 'ProxyConstructor', get: 'typeof Proxy' }, RangeError: { type: 'RangeErrorConstructor', get: 'typeof RangeError', overrides: { prototype: { type: 'RangeError', get: 'typeof RangeError.prototype' }, }, }, ReferenceError: { type: 'ReferenceErrorConstructor', get: 'typeof ReferenceError', overrides: { prototype: { type: 'ReferenceError', get: 'typeof ReferenceError.prototype' }, }, }, Reflect: 'typeof Reflect', RegExp: { type: 'RegExpConstructor', get: 'typeof RegExp', overrides: { input: null, lastMatch: null, lastParen: null, leftContext: null, rightContext: null, prototype: { type: 'RegExp', get: 'typeof RegExp.prototype' }, }, }, Set: { type: 'SetConstructor', get: 'typeof Set', overrides: { prototype: { type: 'typeof Set.prototype', getterType: 'Set<any>' }, }, }, SetIteratorPrototype: 'IterableIterator<any>', SharedArrayBuffer: { type: 'SharedArrayBufferConstructor', get: 'typeof SharedArrayBuffer', overrides: { prototype: { type: 'SharedArrayBuffer', get: 'typeof SharedArrayBuffer.prototype' }, }, }, String: { type: 'StringConstructor', get: 'typeof String', overrides: { prototype: { type: 'typeof String.prototype', overrides: { // TODO: Delete in v1.17: matchAll: null, }, }, }, }, StringIteratorPrototype: 'IterableIterator<string>', Symbol: { type: 'SymbolConstructor', get: 'typeof Symbol', overrides: { prototype: { type: 'typeof Symbol.prototype', getterType: 'symbol | Symbol' }, // TODO: Delete in v1.17: matchAll: null, }, }, SyntaxError: { type: 'SyntaxErrorConstructor', get: 'typeof SyntaxError', overrides: { prototype: { type: 'SyntaxError', get: 'typeof SyntaxError.prototype' }, }, }, ThrowTypeError: '() => never', TypedArray: { type: 'TypedArrayConstructor', overrides: { prototype: { type: 'TypedArrayPrototype', getterType: 'TypedArray', }, }, }, TypeError: { type: 'TypeErrorConstructor', get: 'typeof TypeError', overrides: { prototype: { type: 'TypeError', get: 'typeof TypeError.prototype' }, }, }, Uint8Array: { type: 'Uint8ArrayConstructor', get: 'typeof Uint8Array', overrides: { prototype: { type: 'Uint8Array', get: 'typeof Uint8Array.prototype' }, }, }, Uint8ClampedArray: { type: 'Uint8ClampedArrayConstructor', get: 'typeof Uint8ClampedArray', overrides: { prototype: { type: 'Uint8ClampedArray', get: 'typeof Uint8ClampedArray.prototype' }, }, }, Uint16Array: { type: 'Uint16ArrayConstructor', get: 'typeof Uint16Array', overrides: { prototype: { type: 'Uint16Array', get: 'typeof Uint16Array.prototype' }, }, }, Uint32Array: { type: 'Uint32ArrayConstructor', get: 'typeof Uint32Array', overrides: { prototype: { type: 'Uint32Array', get: 'typeof Uint32Array.prototype' }, }, }, URIError: { type: 'URIErrorConstructor', get: 'typeof URIError', overrides: { prototype: { type: 'URIError', get: 'typeof URIError.prototype' }, }, }, WeakMap: { type: 'WeakMapConstructor', get: 'typeof WeakMap' }, WeakSet: { type: 'WeakSetConstructor', get: 'typeof WeakSet' }, }; setProto(BASE_INTRINSIC_DATA, null);
40.80705
126
0.612639
b5761015924db834648a2ce9d6a4e89aa076131d
288
js
JavaScript
components/parameter-sentence/index.js
MitchelMyersFl/styled-ui
5c29324a89b70233b06fd76413a6087517b5444f
[ "MIT" ]
null
null
null
components/parameter-sentence/index.js
MitchelMyersFl/styled-ui
5c29324a89b70233b06fd76413a6087517b5444f
[ "MIT" ]
null
null
null
components/parameter-sentence/index.js
MitchelMyersFl/styled-ui
5c29324a89b70233b06fd76413a6087517b5444f
[ "MIT" ]
null
null
null
import { ParameterSentence } from './parameter-sentence'; import { ParameterSelect } from './parameter-select'; import { ParameterInputBox } from './parameter-input'; ParameterSentence.Select = ParameterSelect; ParameterSentence.Input = ParameterInputBox; export { ParameterSentence };
32
57
0.78125
b73b91877c6c37a97da62a77dd2023b25fd36147
1,310
cpp
C++
week 4/Linked List/10. Minimum Platforms .cpp
arpit456jain/gfg-11-Weeks-Workshop-on-DSA-in-CPP
ed7fd8bc0a581f54ba3a3588dd01013776c4ece6
[ "MIT" ]
6
2021-08-06T14:36:41.000Z
2022-03-22T11:22:07.000Z
week 4/Linked List/10. Minimum Platforms .cpp
arpit456jain/11-Weeks-Workshop-on-DSA-in-CPP
ed7fd8bc0a581f54ba3a3588dd01013776c4ece6
[ "MIT" ]
1
2021-08-09T05:09:48.000Z
2021-08-09T05:09:48.000Z
week 4/Linked List/10. Minimum Platforms .cpp
arpit456jain/11-Weeks-Workshop-on-DSA-in-CPP
ed7fd8bc0a581f54ba3a3588dd01013776c4ece6
[ "MIT" ]
1
2021-08-09T14:25:17.000Z
2021-08-09T14:25:17.000Z
// { Driver Code Starts // Program to find minimum number of platforms // required on a railway station #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: //Function to find the minimum number of platforms required at the //railway station such that no train waits. int findPlatform(int arr[], int dep[], int n) { // Your code here sort(arr,arr+n); sort(dep,dep+n); int i=1; // we are considring the 1 train is arived int j=0; // its not dept int max_plat = 1; int plat = 1; while(i<n && j<n) { if(arr[i]<=dep[j]) { plat++; i++; } else if(arr[i]>dep[j]) { plat--; j++; } max_plat = max(max_plat,plat); } return max_plat; } }; // { Driver Code Starts. // Driver code int main() { int t; cin>>t; while(t--) { int n; cin>>n; int arr[n]; int dep[n]; for(int i=0;i<n;i++) cin>>arr[i]; for(int j=0;j<n;j++){ cin>>dep[j]; } Solution ob; cout <<ob.findPlatform(arr, dep, n)<<endl; } return 0; } // } Driver Code Ends
19.264706
70
0.468702
850e2997138ab171cf6ded1d539d8f29a392b26b
5,122
cs
C#
MerchantConsole/MenuHandler.cs
vorwaldb/InGameMerchant
35a4b7deb4d099e3d17314d25e692c6a383e2108
[ "CC0-1.0" ]
null
null
null
MerchantConsole/MenuHandler.cs
vorwaldb/InGameMerchant
35a4b7deb4d099e3d17314d25e692c6a383e2108
[ "CC0-1.0" ]
null
null
null
MerchantConsole/MenuHandler.cs
vorwaldb/InGameMerchant
35a4b7deb4d099e3d17314d25e692c6a383e2108
[ "CC0-1.0" ]
null
null
null
using System; using System.Collections.Generic; using System.Text; namespace MerchantConsole { /// <summary> /// Class for handling interactions with the menu /// </summary> public class MenuHandler { /// <summary> /// Gets the merchant action the user chooses to engage in /// </summary> /// <param name="currentGold"></param> public MerchantAction GetMerchantAction(int currentGold) { const int buyAction = (int)MerchantAction.Buy; const int sellAction = (int)MerchantAction.Sell; const int exitAction = (int)MerchantAction.Exit; var selectionText = $"{Environment.NewLine}{buyAction} - Buy{Environment.NewLine}{sellAction} - Sell{Environment.NewLine}{exitAction} - Exit"; var menuText = $"Welcome to the Travelling Merchant! Have we got good deals for you!{Environment.NewLine}What would you like to do?"; menuText += selectionText; var goldText = $"{Environment.NewLine}Current Gold: {currentGold}{Environment.NewLine}"; var builder = new StringBuilder(); var dashes = builder.Append('-', goldText.Trim().Length + 2).ToString(); Console.WriteLine($"{dashes}{goldText}{dashes}"); Console.WriteLine(menuText); Console.WriteLine(); var enteredText = Console.ReadLine()?.Trim(); while (!IsValidMenuSelection(enteredText, 1, 3)) { Console.WriteLine("Please attempt your selection again."); Console.WriteLine(selectionText); enteredText = Console.ReadLine()?.Trim(); } // ReSharper disable once AssignNullToNotNullAttribute var menuActionString = int.Parse(enteredText); return (MerchantAction) menuActionString; } /// <summary> /// For the passed in item list, returns the MenuResult containing the item the user wishes to sell /// </summary> /// <param name="itemsToSell"></param> public MenuResult GetItemToSell(List<Item> itemsToSell) { return GetMenuReturnItemForAction(MerchantAction.Sell, itemsToSell); } /// <summary> /// For the passed in item list, returns the MenuResult containing the item the user wishes to buy /// </summary> /// <param name="itemsToBuy"></param> /// <returns></returns> public MenuResult GetItemToBuy(List<Item> itemsToBuy) { return GetMenuReturnItemForAction(MerchantAction.Buy, itemsToBuy); } private MenuResult GetMenuReturnItemForAction(MerchantAction actionToPerform, List<Item> menuItems) { var maxItemNumber = menuItems.Count; var backMenu = maxItemNumber + 1; var textOption = actionToPerform == MerchantAction.Buy ? "buy" : "sell"; var displayText = $"Please choose an item to {textOption}:"; var itemDictionary = new Dictionary<int, Item>(); for (var num = 0; num < maxItemNumber; num++) { var item = menuItems[num]; var itemNumber = num + 1; itemDictionary.Add(itemNumber, item); var itemAmount = actionToPerform == MerchantAction.Buy ? item.Price : item.GetTradeInValue(); displayText += $"{Environment.NewLine}{itemNumber} - {item.Name} - Price: {itemAmount}"; } displayText += $"{Environment.NewLine}{backMenu} - Back{Environment.NewLine}"; Console.WriteLine(displayText); var answer = Console.ReadLine(); while (!IsValidMenuSelection(answer, 1, backMenu)) { Console.WriteLine("That is not a valid item choice. Please try again."); Console.WriteLine(displayText); answer = Console.ReadLine(); } // ReSharper disable once AssignNullToNotNullAttribute var selectedAnswer = int.Parse(answer); if (selectedAnswer == backMenu) return new MenuResult{ChosenItem = null, IsExitingMenu = true}; var pickedItem = itemDictionary[selectedAnswer]; return new MenuResult {ChosenItem = pickedItem, IsExitingMenu = false}; } private bool IsValidMenuSelection(string enteredText, int minChoice, int maxChoice) { var numberList = new List<int>(); for(var num = minChoice; num <= maxChoice; num++) { numberList.Add(num); } if(int.TryParse(enteredText, out var number)) { if (numberList.Contains(number)) return true; Console.WriteLine("Error: Invalid Menu Selection"); } else { Console.WriteLine("Error: Invalid Input"); } return false; } } }
38.223881
154
0.572823
f6313322b0b4bc5f88ab1c363dd727cbfc6bd9c6
10,729
cpp
C++
src/gridding/gridding.cpp
nio1814/3Dcones
704b78a0d73b25ab59269e60babbd13876f8563e
[ "BSD-3-Clause" ]
4
2019-09-10T13:46:41.000Z
2022-03-21T20:19:23.000Z
src/gridding/gridding.cpp
nio1814/3Dcones
704b78a0d73b25ab59269e60babbd13876f8563e
[ "BSD-3-Clause" ]
1
2017-05-17T07:05:00.000Z
2017-05-17T07:05:38.000Z
src/gridding/gridding.cpp
nio1814/3Dcones
704b78a0d73b25ab59269e60babbd13876f8563e
[ "BSD-3-Clause" ]
2
2020-04-12T09:39:29.000Z
2022-03-21T20:19:25.000Z
/*************************************************************************** Copyright (c) 2014 The Board of Trustees of the Leland Stanford Junior University. All rights reserved. Contact: Okai Addy <[email protected]> This source code is under a BSD 3-Clause License. See LICENSE for more information. To distribute this file, substitute the full license for the above reference. **************************************************************************/ #include "gridding.h" extern "C" { #include "trajectory.h" #include "numericalrecipes.h" #include "arrayops.h" } #include <cmath> #include <algorithm> Gridding::Gridding(const Trajectory *trajectory, float oversamplingRatio, int kernelWidth) : m_trajectory(trajectory), m_oversamplingFactor(oversamplingRatio), m_kernelWidth(kernelWidth) { float beta = M_PI*sqrt(powf(m_kernelWidth/m_oversamplingFactor,2)*powf(m_oversamplingFactor-0.5,2)-0.8); int numKernelPoints = 30*m_kernelWidth; float scale = 1/besseli(0, beta); float kernelSum = 0; for(int n=0; n<=numKernelPoints; n++) { float x = 2*n/(float)numKernelPoints; float value = besseli(0, beta*sqrt(1-pow(2*x/m_kernelWidth,2)))*scale; kernelSum += 2*value; m_kernelLookupTable.push_back(value); } kernelSum -= m_kernelLookupTable[0]; kernelSum /= .5*numKernelPoints*sqrt(m_oversamplingFactor); scalefloats(m_kernelLookupTable.data(), m_kernelLookupTable.size()-1, 1/kernelSum); m_deapodization.clear(); scale = -1/(2*beta)*(exp(-beta)-exp(beta)); float minSpatialResolution = INFINITY; for(int d=0; d<numDimensions(); d++) minSpatialResolution = std::min(minSpatialResolution, m_trajectory->spatialResolution[d]); m_coordinateScale = .5*minSpatialResolution/5; for(int d=0; d<numDimensions(); d++) { int dimension = static_cast<int>(std::roundf(m_oversamplingFactor*m_trajectory->imageDimensions[d])); dimension += dimension%2; m_gridDimensions.push_back(dimension); m_normalizedToGridScale.push_back(m_trajectory->spatialResolution[d]/minSpatialResolution*m_gridDimensions[d]); } m_deapodization.resize(numDimensions()); for(int d=0; d<m_trajectory->numDimensions; d++) { for(int n=0; n<m_gridDimensions[d]; n++) { float arg = M_PI*m_kernelWidth*(-m_gridDimensions[d]/2.0f + n)/m_gridDimensions[d]; arg *= arg; arg -= beta*beta; float value; if(arg<0) value = -1.0f/(2.0f*sqrtf(-arg))*(expf(-sqrtf(-arg))-expf(sqrtf(-arg))); else value = sinf(sqrtf(arg))/sqrtf(arg); value = scale/value; m_deapodization[d].push_back(value); } } } std::vector<int> Gridding::imageDimensions() { std::vector<int> imageDims; for(int d=0; d<m_trajectory->numDimensions; d++) imageDims.push_back(m_trajectory->imageDimensions[d]); return imageDims; } void Gridding::nearestGriddedPoint(const std::vector<float> &ungriddedPoint, std::vector<float> &griddedPoint) { for(int d=0; d<numDimensions(); d++) griddedPoint[d] = roundf(m_normalizedToGridScale[d]*ungriddedPoint[d])/m_normalizedToGridScale[d]; } float Gridding::lookupKernelValue(float x) { float kernelIndexDecimal = fabsf((x)/(float)m_kernelWidth/2*m_kernelLookupTable.size()); int kernelIndex = (int)kernelIndexDecimal; float secondPointFraction = kernelIndexDecimal - kernelIndex; return m_kernelLookupTable[kernelIndex]*(1-secondPointFraction) + m_kernelLookupTable[kernelIndex+1]*secondPointFraction; } std::vector<std::vector<float> > Gridding::kernelNeighborhood(const std::vector<float> &ungriddedPoint, const std::vector<float> &griddedPoint) { int lookupPoints = m_kernelLookupTable.size()-1; std::vector<std::vector<float> > kernelValues(numDimensions()); for(int d=0; d<numDimensions(); d++) { float offset = (griddedPoint[d]-ungriddedPoint[d])*m_normalizedToGridScale[d]-1; offset += ungriddedPoint[d]>=griddedPoint[d] ? 1 : 0; for(int n=0; n<m_kernelWidth; n++) { int m = n-m_kernelWidth/2+1; float kernelOffset = m+offset; float kernelIndexDecimal = fabsf(kernelOffset/(float)m_kernelWidth*2*(lookupPoints-1)); int kernelIndex = (int)kernelIndexDecimal; float secondPointFraction = kernelIndexDecimal - kernelIndex; kernelValues[d].push_back(m_kernelLookupTable[kernelIndex]*(1-secondPointFraction) + m_kernelLookupTable[kernelIndex+1]*secondPointFraction); } } return kernelValues; } size_t multiToSingleIndex(const std::vector<int> &indices, const std::vector<int>& size) { long index = indices[0]; long lowerDimensionSize = size[0]; for(size_t n=1; n<indices.size(); n++) { index += indices[n]*lowerDimensionSize; lowerDimensionSize *= size[n]; } return index; } void singleToMultiIndex(long index, const std::vector<int>& size, std::vector<int>& indices) { int lowerDimensions = 1; for(size_t n=0; n<size.size(); n++) { indices[n] = (index/lowerDimensions)%size[n]; lowerDimensions *= size[n]; } } MRdata *Gridding::grid(MRdata &inputData, Direction direction) { std::vector<float> ungriddedPoint(3); std::vector<float> griddedPoint(3); int dimensionStart[3] = {0,0,0}; int dimensionEnd[3] = {1,1,1}; int offset[3] = {0,0,0}; MRdata* ungriddedData; MRdata* griddedData; if(direction==FORWARD) { ungriddedData = &inputData; griddedData = new MRdata(m_gridDimensions, numDimensions()); } else { std::vector<int> trajectorySize(2); trajectorySize[0] = m_trajectory->numReadoutPoints; trajectorySize[1] = m_trajectory->numReadouts; ungriddedData = new MRdata(trajectorySize, numDimensions()); griddedData = &inputData; } std::vector<int> gridDimensions3 = m_gridDimensions; if(numDimensions()==2) gridDimensions3.push_back(1); std::vector<float> one; one.push_back(1); for(size_t n=0; n<ungriddedData->points(); n++) { complexFloat ungriddedDataValue; if(direction==FORWARD) ungriddedDataValue = ungriddedData->signalValue(n); else ungriddedDataValue = 0; int readoutPoint = n%m_trajectory->numReadoutPoints; int readout = n/m_trajectory->numReadoutPoints; float densityCompensation; trajectoryCoordinates(readoutPoint, readout, m_trajectory, ungriddedPoint.data(), &densityCompensation); scalefloats(ungriddedPoint.data(), numDimensions(), m_coordinateScale); ungriddedDataValue *= densityCompensation; nearestGriddedPoint(ungriddedPoint, griddedPoint); for(int d=0; d<numDimensions(); d++) { const int gridPointCenter = static_cast<int>(std::round((griddedPoint[d]+.5)*m_normalizedToGridScale[d])); int start = gridPointCenter-m_kernelWidth/2; start += ungriddedPoint[d]>=griddedPoint[d] ? 1 : 0; dimensionStart[d] = std::max(0, start); offset[d] = dimensionStart[d]-start; dimensionEnd[d] = std::min(start+m_kernelWidth, m_gridDimensions[d]); } std::vector<std::vector<float> > kernelValues = kernelNeighborhood(ungriddedPoint, griddedPoint); std::vector<int> gridIndex(3); for(int d=numDimensions(); d<3; d++) kernelValues.push_back(one); for(int gz=dimensionStart[2]; gz<dimensionEnd[2]; gz++) { gridIndex[2] = gz; float kernelZ = kernelValues[2][gz-dimensionStart[2]+offset[2]]; for(int gy=dimensionStart[1]; gy<dimensionEnd[1]; gy++) { gridIndex[1] = gy; float kernelY = kernelValues[1][gy-dimensionStart[1]+offset[1]]; for(int gx=dimensionStart[0]; gx<dimensionEnd[0]; gx++) { gridIndex[0] = gx; float kernelX = kernelValues[0][gx-dimensionStart[0]+offset[0]]; long griddedDataIndex = multiToSingleIndex(gridIndex, gridDimensions3); if(direction==FORWARD) griddedData->addSignalValue(griddedDataIndex, kernelX*kernelY*kernelZ*ungriddedDataValue); else ungriddedDataValue += kernelX*kernelY*kernelZ*griddedData->signalValue(griddedDataIndex); } } } if(direction==INVERSE) ungriddedData->setSignalValue(n, ungriddedDataValue); } if(direction==FORWARD) return griddedData; else return ungriddedData; } MRdata *Gridding::conjugatePhaseForward(const MRdata &ungriddedData) { std::vector<int> imageDimensions(m_trajectory->imageDimensions, &m_trajectory->imageDimensions[m_trajectory->numDimensions]); MRdata* griddedData = new MRdata(imageDimensions, numDimensions()); float imageScale = 1.0f/std::sqrt(griddedData->points()); std::vector<int> imageCenter; std::vector<float> axisScale; for(int d=0; d<numDimensions(); d++) { axisScale.push_back(m_normalizedToGridScale[d]/m_gridDimensions[d]*m_coordinateScale); imageCenter.push_back(imageDimensions[d]/2); } float k[3]; std::vector<int> r(3); for(size_t u=0; u<ungriddedData.points(); u++) { int readoutPoint = u%m_trajectory->numReadoutPoints; int readout = u/m_trajectory->numReadoutPoints; float densityCompensation; trajectoryCoordinates(readoutPoint, readout, m_trajectory, k, &densityCompensation); complexFloat ungriddedValue = densityCompensation*ungriddedData.signalValue(u); for(size_t g=0; g<griddedData->points(); g++) { singleToMultiIndex(g, imageDimensions, r); float exponentArgument = 0; for(int d=0; d<numDimensions(); d++) { int p = r[d]-imageCenter[d]; exponentArgument += k[d]*p*axisScale[d]; } exponentArgument *= static_cast<float>(2.0f * M_PI); complexFloat griddedValue = complexFloat(std::cos(exponentArgument), std::sin(exponentArgument))*ungriddedValue*imageScale; griddedData->addSignalValue(g, griddedValue); } } return griddedData; } void Gridding::deapodize(MRdata &oversampledImage) { complexFloat* signal = oversampledImage.signalPointer(); std::vector<int> gridIndex(numDimensions()); for(size_t n=0; n<oversampledImage.points(); n++) { singleToMultiIndex(n, m_gridDimensions, gridIndex); for(int d=0; d<numDimensions(); d++) signal[n] *= m_deapodization[d][gridIndex[d]]; } } std::vector<MRdata *> Gridding::kSpaceToImage(MRdata &ungriddedData, bool returnGriddedKspace) { std::vector<MRdata*> output; MRdata* griddedKspace = grid(ungriddedData, FORWARD); MRdata* image; if(returnGriddedKspace) { output.push_back(griddedKspace); image = new MRdata(griddedKspace); } else { image = griddedKspace; } image->writeToOctave("temp"); image->fftShift(); image->fft(FFTW_BACKWARD); image->fftShift(); deapodize(*image); image->crop(imageDimensions()); output.push_back(image); return output; } MRdata *Gridding::imageToKspace(const MRdata &image) { MRdata griddedKspace = image; griddedKspace.pad(m_gridDimensions); deapodize(griddedKspace); griddedKspace.fftShift(); griddedKspace.fft(FFTW_FORWARD); griddedKspace.fftShift(); MRdata* ungriddedKspace = grid(griddedKspace, INVERSE); return ungriddedKspace; } int Gridding::numDimensions() { return m_trajectory->numDimensions; } std::vector<int> Gridding::gridDimensions() { return m_gridDimensions; }
30.654286
144
0.721596
0d794bda5a83f1bbe451045c898da3ec8c1f6860
968
cs
C#
MethodsExercise/05.AddAndSubtract/Program.cs
desata/csharp
1de2abdef8da24e872a3768dd4a62d13965cacd5
[ "MIT" ]
null
null
null
MethodsExercise/05.AddAndSubtract/Program.cs
desata/csharp
1de2abdef8da24e872a3768dd4a62d13965cacd5
[ "MIT" ]
null
null
null
MethodsExercise/05.AddAndSubtract/Program.cs
desata/csharp
1de2abdef8da24e872a3768dd4a62d13965cacd5
[ "MIT" ]
null
null
null
using System; namespace _05.AddAndSubtract { internal class Program { static void Main(string[] args) { //You will receive 3 integers. //Create a method that returns the sum of the first two integers and another method that subtracts the third integer from the result of the sum method. int integerOne = int.Parse(Console.ReadLine()); int integerTwo = int.Parse(Console.ReadLine()); int integerTree = int.Parse(Console.ReadLine()); int result = PrintResult(integerOne, integerTwo, integerTree); Console.WriteLine(result); } static int PrintResult(int integerOne, int integerTwo, int integerTree) { int sum = integerOne + integerTwo; return Substraction(sum, integerTree); } static int Substraction(int sum, int integerTree) { return sum - integerTree; } } }
30.25
163
0.606405
38cae55031adb49c7f5369071952fa5330993026
187
php
PHP
app/Http/Controllers/AdminController.php
nextandback/Routes
16e31a87cdee37dd7d6dc8444a1722b859498e99
[ "MIT" ]
null
null
null
app/Http/Controllers/AdminController.php
nextandback/Routes
16e31a87cdee37dd7d6dc8444a1722b859498e99
[ "MIT" ]
2
2022-02-19T05:15:48.000Z
2022-02-27T08:33:18.000Z
app/Http/Controllers/AdminController.php
nextandback/Routes
16e31a87cdee37dd7d6dc8444a1722b859498e99
[ "MIT" ]
null
null
null
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; class AdminController extends Controller { public function goster(){ echo "Controller çalıştı."; } }
14.384615
40
0.705882
afb995f300deb8b3e54463bdce286af70cb164e6
698
lua
Lua
lua/general/misc.lua
MrWelsch/nvim
0a7adf4762643d3d7054552b2bc33afbab5d0c89
[ "MIT" ]
1
2021-12-26T11:36:06.000Z
2021-12-26T11:36:06.000Z
lua/general/misc.lua
MrWelsch/nvim
0a7adf4762643d3d7054552b2bc33afbab5d0c89
[ "MIT" ]
null
null
null
lua/general/misc.lua
MrWelsch/nvim
0a7adf4762643d3d7054552b2bc33afbab5d0c89
[ "MIT" ]
null
null
null
Misc = {} --> BORDERS -- DEFINE BORDER ARRAYS local borders = { { "╒", "═", "╕", "│", "╛", "═", "╘", "│" }, { "╔", "═" ,"╗", "║", "╝", "═", "╚", "║" }, { "╭", "─", "╮", "│", "╯", "─", "╰", "│" }, } local borders_telescope = { { "═", "│", "═", "│", "╒", "╕", "╛", "╘" }, { "═", "║", "═", "║", "╔", "╗", "╝", "╚" }, { "─", "│", "─", "│", "╭", "╮", "╯", "╰" }, } local borders_result = { { "═", " ", " ", " ", "╘", "╛", " ", " " }, { "═", " ", " ", " ", "╚", "╝", " ", " " }, { "─", " ", " ", " ", "╰", "╯", " ", " " }, } -- SET BORDERS TO ARRAY ENTRY Misc.border = borders[2] Misc.border_telescope = borders_telescope[2] Misc.border_result = borders_result[2] return Misc
24.928571
47
0.289398
269445f6538a0e24c2985af9915dec8eb401f1df
996
rs
Rust
meilidb-http/src/main.rs
bidoubiwa/MeiliDB
b46889b5f0f2f8b91438a08a358ba8f05fc09fc1
[ "MIT" ]
null
null
null
meilidb-http/src/main.rs
bidoubiwa/MeiliDB
b46889b5f0f2f8b91438a08a358ba8f05fc09fc1
[ "MIT" ]
null
null
null
meilidb-http/src/main.rs
bidoubiwa/MeiliDB
b46889b5f0f2f8b91438a08a358ba8f05fc09fc1
[ "MIT" ]
1
2019-11-07T16:51:03.000Z
2019-11-07T16:51:03.000Z
use http::header::HeaderValue; use log::info; use main_error::MainError; use tide::middleware::{CorsMiddleware, CorsOrigin}; use tide_log::RequestLogger; use meilidb_http::data::Data; use meilidb_http::option::Opt; use meilidb_http::routes; #[cfg(not(target_os = "macos"))] #[global_allocator] static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc; pub fn main() -> Result<(), MainError> { env_logger::init(); let opt = Opt::new(); let data = Data::new(opt.clone()); let mut app = tide::App::with_state(data); app.middleware( CorsMiddleware::new() .allow_origin(CorsOrigin::from("*")) .allow_methods(HeaderValue::from_static("GET, POST, OPTIONS")), ); app.middleware(RequestLogger::new()); app.middleware(tide_compression::Compression::new()); app.middleware(tide_compression::Decompression::new()); routes::load_routes(&mut app); info!("Server HTTP enabled"); app.run(opt.http_addr)?; Ok(()) }
25.538462
75
0.666667
551b4ecb78c3821a046f6cbb716d6af8116afa2e
50,355
swift
Swift
Tests/ProcedureKitTests/ConditionTests.swift
evilutioner/ProcedureKit
bd716cd285c98ab97a0e01168dd054920399b0bd
[ "MIT" ]
1
2019-08-05T12:44:34.000Z
2019-08-05T12:44:34.000Z
Tests/ProcedureKitTests/ConditionTests.swift
evilutioner/ProcedureKit
bd716cd285c98ab97a0e01168dd054920399b0bd
[ "MIT" ]
null
null
null
Tests/ProcedureKitTests/ConditionTests.swift
evilutioner/ProcedureKit
bd716cd285c98ab97a0e01168dd054920399b0bd
[ "MIT" ]
1
2019-08-05T12:44:36.000Z
2019-08-05T12:44:36.000Z
// // ProcedureKit // // Copyright © 2015-2018 ProcedureKit. All rights reserved. // import XCTest @testable import TestingProcedureKit @testable import ProcedureKit class ConditionTests: ProcedureKitTestCase { // MARK: - Condition Properties func test__condition__produce_dependency() { let condition = TrueCondition() let dependency = TestProcedure() condition.produceDependency(dependency) XCTAssertEqual(condition.producedDependencies.count, 1) XCTAssertEqual(condition.producedDependencies.first, dependency) XCTAssertEqual(condition.dependencies.count, 0) } func test__condition__add_dependency() { let condition = TrueCondition() let dependency = TestProcedure() condition.addDependency(dependency) XCTAssertEqual(condition.dependencies.count, 1) XCTAssertEqual(condition.dependencies.first, dependency) XCTAssertEqual(condition.producedDependencies.count, 0) } func test__condition__remove_dependency() { let condition = TrueCondition() let dependency = TestProcedure() let producedDependency = TestProcedure() condition.addDependency(dependency) condition.produceDependency(producedDependency) XCTAssertEqual(condition.dependencies.count, 1) XCTAssertEqual(condition.dependencies.first, dependency) XCTAssertEqual(condition.producedDependencies.count, 1) XCTAssertEqual(condition.producedDependencies.first, producedDependency) condition.removeDependency(producedDependency) XCTAssertEqual(condition.producedDependencies.count, 0, "Produced dependency not removed.") condition.removeDependency(dependency) XCTAssertEqual(condition.producedDependencies.count, 0, "Dependency not removed.") } func test__condition__name() { let condition = TrueCondition() let testName = "Test Name" condition.name = testName XCTAssertEqual(condition.name, testName) } func test__condition__mutually_exclusive_categories() { let condition = TrueCondition() XCTAssertTrue(condition.mutuallyExclusiveCategories.isEmpty) let category1 = "Test Category" let category2 = "Test Category B" condition.addToAttachedProcedure(mutuallyExclusiveCategory: category1) XCTAssertEqual(condition.mutuallyExclusiveCategories, Set([category1])) condition.addToAttachedProcedure(mutuallyExclusiveCategory: category2) XCTAssertEqual(condition.mutuallyExclusiveCategories, Set([category1, category2])) } func test__condition__equality() { let condition1 = TrueCondition() let condition1alias = condition1 let condition2 = TrueCondition() XCTAssertEqual(condition1, condition1) XCTAssertEqual(condition1, condition1alias) XCTAssertNotEqual(condition1, condition2) XCTAssertNotEqual(condition1alias, condition2) } // MARK: - Condition Unit Tests func test__true_condition_is_satisfied() { let condition = TrueCondition() condition.evaluate(procedure: procedure) { result in guard case .success(true) = result else { XCTFail("TrueCondition did not evaluate as satisfied."); return } } } func test__false_condition_is_failed() { let condition = FalseCondition() condition.evaluate(procedure: procedure) { result in guard case let .failure(error) = result else { XCTFail("FalseCondition did not evaluate as failed."); return } XCTAssertTrue(error is ProcedureKitError.FalseCondition) } } // MARK: - Single Attachment func test__single_condition_which_is_satisfied() { procedure.addCondition(TrueCondition()) wait(for: procedure) PKAssertProcedureFinished(procedure) } func test__single_condition_which_is_failed() { procedure.addCondition(FalseCondition()) wait(for: procedure) PKAssertProcedureCancelledWithError(procedure, ProcedureKitError.FalseCondition()) } // MARK: - Multiple Attachment func test__multiple_conditions_where_all_are_satisfied() { procedure.addCondition(TrueCondition()) procedure.addCondition(TrueCondition()) procedure.addCondition(TrueCondition()) wait(for: procedure) PKAssertProcedureFinished(procedure) } func test__multiple_conditions_where_all_fail() { procedure.addCondition(FalseCondition()) procedure.addCondition(FalseCondition()) procedure.addCondition(FalseCondition()) wait(for: procedure) PKAssertProcedureCancelledWithError(procedure, ProcedureKitError.FalseCondition()) } func test__multiple_conditions_where_one_succeeds() { procedure.addCondition(TrueCondition()) procedure.addCondition(FalseCondition()) procedure.addCondition(FalseCondition()) wait(for: procedure) PKAssertProcedureCancelledWithError(procedure, ProcedureKitError.FalseCondition()) } func test__multiple_conditions_where_one_fails() { procedure.addCondition(TrueCondition()) procedure.addCondition(TrueCondition()) procedure.addCondition(FalseCondition()) wait(for: procedure) PKAssertProcedureCancelledWithError(procedure, ProcedureKitError.FalseCondition()) } // MARK: - Shortcut Processing func test__long_running_condition_with_dependency_is_cancelled_if_a_result_is_determined_by_another_condition() { // Two conditions: // - One that is dependent on a long-running produced operation // - And a second that immediately returns false // // The Procedure should fail with the immediate failure of the second // Condition, and not wait for the first Condition (and its // long-running produced dependency) to also complete. // // Additionally, the long-running dependency should be cancelled // once the overall condition evaluation result is known. let longRunningCondition = TestCondition() { return .success(true) } let didStartLongRunningDependencyGroup = DispatchGroup() didStartLongRunningDependencyGroup.enter() let longRunningDependency = AsyncBlockProcedure { completion in didStartLongRunningDependencyGroup.leave() // never finishes by itself } longRunningDependency.addDidCancelBlockObserver { _, _ in // finishes when cancelled longRunningDependency.finish() } let dispatchGroup = DispatchGroup() dispatchGroup.enter() longRunningDependency.addDidFinishBlockObserver { _, _ in dispatchGroup.leave() } longRunningCondition.produceDependency(longRunningDependency) let failSecondCondition = AsyncTestCondition { completion in // To ensure order of operations, finish this condition async once the // longRunningCondition's long-running dependency has started. // // Otherwise, there is no guarantee that the `longRunningCondition` will // be processed (and produce its dependencies) prior to being shortcut // by the result of this condition. didStartLongRunningDependencyGroup.notify(queue: DispatchQueue.global()) { completion(.failure(ProcedureKitError.FalseCondition())) } } procedure.addCondition(longRunningCondition) procedure.addCondition(failSecondCondition) wait(for: procedure, withTimeout: 2) // ensure that the longRunningDependency is fairly quickly cancelled and finished guard longRunningDependency.isEnqueued else { XCTFail("The long-running dependency was not enqueued. This is unexpected, since the evaluation order should be guaranteed by the test.") return } // wait for the long-running dependency to be cancelled and finish weak var expLongRunningProducedDependencyCancelled = expectation(description: "did cancel and finish long-running produced dependency") dispatchGroup.notify(queue: DispatchQueue.main) { expLongRunningProducedDependencyCancelled?.fulfill() } waitForExpectations(timeout: 2) PKAssertProcedureCancelled(longRunningDependency) } // MARK: - Condition Dependency Requirement func test__condition_dependency_requirement_none_still_evaluates_when_dependency_fails() { XCTAssertEqual(Condition.DependencyRequirements.none, []) let failingDependency = TestProcedure(error: TestError()) conditionDependencyRequirementTest( requirements: .none, conditionProducedDependency: failingDependency) { result in XCTAssertTrue(result.didEvaluateCondition, "Condition was not evaluated.") PKAssertProcedureFinished(result.procedure) } } func test__condition_dependency_requirement_noFailed_skips_evaluate_when_dependency_fails() { let failingDependency = TestProcedure(error: TestError()) conditionDependencyRequirementTest( requirements: .noFailed, conditionProducedDependency: failingDependency) { result in XCTAssertFalse(result.didEvaluateCondition, "Condition evaluate was called, despite dependency requirement and failed dependency.") PKAssertProcedureCancelledWithError(result.procedure, ProcedureKitError.ConditionDependenciesFailed(condition: result.condition)) } } func test__condition_dependency_requirement_noFailed_ignores_dependency_cancelled_without_errors() { let cancelledDependency = TestProcedure() cancelledDependency.cancel() conditionDependencyRequirementTest( requirements: .noFailed, conditionProducedDependency: cancelledDependency) { result in XCTAssertTrue(result.didEvaluateCondition) PKAssertProcedureFinished(result.procedure) } } func test__condition_dependency_requirement_noFailed_skips_evaluate_when_dependency_iscancelled_with_errors() { let cancelledDependency = TestProcedure() cancelledDependency.cancel(with: TestError()) conditionDependencyRequirementTest( requirements: .noFailed, conditionProducedDependency: cancelledDependency) { result in XCTAssertFalse(result.didEvaluateCondition) PKAssertProcedureCancelledWithError(result.procedure, ProcedureKitError.ConditionDependenciesFailed(condition: result.condition)) } } func test__condition_dependency_requirement_noCancelled_skips_evaluate_when_dependency_is_cancelled() { let cancelledDependency = TestProcedure(error: TestError()) cancelledDependency.cancel() conditionDependencyRequirementTest( requirements: .noCancelled, conditionProducedDependency: cancelledDependency) { result in XCTAssertFalse(result.didEvaluateCondition, "Condition evaluate was called, despite dependency requirement and cancelled dependency.") PKAssertProcedureCancelledWithError(result.procedure, ProcedureKitError.ConditionDependenciesCancelled(condition: result.condition)) } } func test__condition_dependency_requirement_noCancelled_ignores_non_cancelled_failures() { let failedDependency = TestProcedure(error: TestError()) // failed, not cancelled conditionDependencyRequirementTest( requirements: .noCancelled, conditionProducedDependency: failedDependency) { result in XCTAssertTrue(result.didEvaluateCondition) PKAssertProcedureFinished(result.procedure) } } func test__condition_dependency_requirement_noFailed_with_ignoreCancellations() { // cancelled failing dependency should be ignored - and evaluate should be called let cancelledDependency = TestProcedure() cancelledDependency.cancel(with: TestError()) conditionDependencyRequirementTest( requirements: [.noFailed, .ignoreFailedIfCancelled], conditionProducedDependency: cancelledDependency) { result in XCTAssertTrue(result.didEvaluateCondition) PKAssertProcedureFinished(result.procedure) } // whereas a non-cancelled failing dependency should still cause an immediate failure let failingDependency = TestProcedure(error: TestError()) conditionDependencyRequirementTest( requirements: [.noFailed, .ignoreFailedIfCancelled], conditionProducedDependency: failingDependency) { result in XCTAssertFalse(result.didEvaluateCondition) PKAssertProcedureCancelledWithError(result.procedure, ProcedureKitError.ConditionDependenciesFailed(condition: result.condition)) } } private struct ConditionDependencyRequirementTestResult { let procedure: Procedure let didEvaluateCondition: Bool let condition: Condition } private func conditionDependencyRequirementTest( requirements: Condition.DependencyRequirements, conditionProducedDependency dependency: Procedure, withAdditionalConditions additionalConditions: [Condition] = [], completion: (ConditionDependencyRequirementTestResult) -> Void) { conditionDependencyRequirementTest(requirements: requirements, conditionProducedDependencies: [dependency], withAdditionalConditions: additionalConditions, completion: completion) } private func conditionDependencyRequirementTest( requirements: Condition.DependencyRequirements, conditionProducedDependencies dependencies: [Procedure], withAdditionalConditions additionalConditions: [Condition] = [], completion: (ConditionDependencyRequirementTestResult) -> Void) { let procedure = TestProcedure() let didEvaluateConditionGroup = DispatchGroup() didEvaluateConditionGroup.enter() let condition = TestCondition { didEvaluateConditionGroup.leave() return .success(true) } dependencies.forEach(condition.produceDependency) condition.dependencyRequirements = requirements procedure.addCondition(condition) additionalConditions.forEach(procedure.addCondition) wait(for: procedure) let didEvaluateCondition = didEvaluateConditionGroup.wait(timeout: .now()) == .success // clean-up if !didEvaluateCondition { didEvaluateConditionGroup.leave() } completion(ConditionDependencyRequirementTestResult(procedure: procedure, didEvaluateCondition: didEvaluateCondition, condition: condition)) } // MARK: - Conditions with Dependencies func test__dependencies_execute_before_condition_dependencies() { let dependency1 = TestProcedure(name: "Dependency 1") let dependency2 = TestProcedure(name: "Dependency 2") procedure.addDependencies(dependency1, dependency2) let conditionDependency1 = BlockOperation { XCTAssertTrue(dependency1.isFinished) XCTAssertTrue(dependency2.isFinished) } conditionDependency1.name = "Condition 1 Dependency" let condition1 = TrueCondition(name: "Condition 1") condition1.produceDependency(conditionDependency1) let conditionDependency2 = BlockOperation { XCTAssertTrue(dependency1.isFinished) XCTAssertTrue(dependency2.isFinished) } conditionDependency2.name = "Condition 2 Dependency" let condition2 = TrueCondition(name: "Condition 2") condition2.produceDependency(conditionDependency2) procedure.addCondition(condition1) procedure.addCondition(condition2) run(operations: dependency1, dependency2) wait(for: procedure) PKAssertProcedureFinished(dependency1) PKAssertProcedureFinished(dependency2) PKAssertProcedureFinished(procedure) } func test__procedure_dependencies_only_contain_direct_dependencies() { let dependency1 = TestProcedure() let dependency2 = TestProcedure() let condition1 = TrueCondition(name: "Condition 1") condition1.produceDependency(TestProcedure()) let condition2 = TrueCondition(name: "Condition 2") condition2.produceDependency(TestProcedure()) procedure.addDependency(dependency1) procedure.addDependency(dependency2) procedure.addCondition(condition1) procedure.addCondition(condition2) run(operations: dependency1, dependency2) wait(for: procedure) XCTAssertEqual(procedure.dependencies.count, 2) } func test__target_and_condition_have_same_dependency() { let dependency = TestProcedure() let condition = TrueCondition(name: "Condition") condition.addDependency(dependency) procedure.addCondition(condition) procedure.addDependency(dependency) wait(for: dependency, procedure) PKAssertProcedureFinished(dependency) PKAssertProcedureFinished(procedure) } func test__procedure_is_direct_dependency_and_indirect_of_different_procedures() { // See OPR-386 let dependency = TestProcedure(name: "Dependency") let condition1 = TrueCondition(name: "Condition 1") condition1.addDependency(dependency) let procedure1 = TestProcedure(name: "Procedure 1") procedure1.addCondition(condition1) procedure1.addDependency(dependency) let condition2 = TrueCondition(name: "Condition 2") condition2.addDependency(dependency) let procedure2 = TestProcedure(name: "Procedure 2") procedure2.addCondition(condition2) procedure2.addDependency(procedure1) wait(for: procedure1, dependency, procedure2) PKAssertProcedureFinished(dependency) PKAssertProcedureFinished(procedure1) PKAssertProcedureFinished(procedure2) } func test__dependency_added_by_queue_delegate_will_add_also_affects_evaluating_conditions() { // A dependency that is added in a ProcedureQueue delegate's willAddProcedure method // should also properly delay the evaluation of Conditions. class CustomQueueDelegate: ProcedureQueueDelegate { typealias DidAddProcedureBlock = (Procedure) -> Void private let dependenciesToAddInWillAdd: [Operation] private let didAddProcedureBlock: DidAddProcedureBlock init(dependenciesToAddInWillAdd: [Operation], didAddProcedureBlock: @escaping DidAddProcedureBlock) { self.dependenciesToAddInWillAdd = dependenciesToAddInWillAdd self.didAddProcedureBlock = didAddProcedureBlock } func procedureQueue(_ queue: ProcedureQueue, willAddProcedure procedure: Procedure, context: Any?) -> ProcedureFuture? { let promise = ProcedurePromise() DispatchQueue.global().asyncAfter(deadline: .now() + 0.2) { [dependenciesToAddInWillAdd] in defer { promise.complete() } guard !dependenciesToAddInWillAdd.contains(procedure) else { return } procedure.addDependencies(dependenciesToAddInWillAdd) } return promise.future } func procedureQueue(_ queue: ProcedureQueue, didAddProcedure procedure: Procedure, context: Any?) { didAddProcedureBlock(procedure) } } let procedureDidFinishGroup = DispatchGroup() let conditionEvaluatedGroup = DispatchGroup() weak var expDependencyDidStart = expectation(description: "Did Start Dependency") let dependency = AsyncBlockProcedure { completion in DispatchQueue.main.async { expDependencyDidStart?.fulfill() } // does not finish - the test handles that later for timing reasons } let procedure = TestProcedure() procedureDidFinishGroup.enter() procedure.addDidFinishBlockObserver { _, _ in procedureDidFinishGroup.leave() } conditionEvaluatedGroup.enter() procedure.addCondition(TestCondition(evaluate: { // signal when evaluated conditionEvaluatedGroup.leave() return .success(true) })) weak var expDidAddProcedure = expectation(description: "Did Add Procedure to queue") let customDelegate = CustomQueueDelegate(dependenciesToAddInWillAdd: [dependency]) { addedProcedure in // did add Procedure to queue guard addedProcedure === procedure else { return } DispatchQueue.main.async { expDidAddProcedure?.fulfill() } } queue.delegate = customDelegate queue.addOperations(procedure, dependency) // wait until the procedure has been added to the queue // and the dependency has been started waitForExpectations(timeout: 2) // sleep for 0.05 seconds to give a chance for the Condition to be improperly evaluated usleep(50000) // verify that the procedure *and the Condition* are not ready to execute, // nor executing, nor finished // (they should both be waiting on the dependency added in the ProcedureQueue // delegate's willAddProcedure handler, which won't finish until it's triggered) XCTAssertProcedureIsWaiting(procedure, withDependency: dependency) XCTAssertEqual(conditionEvaluatedGroup.wait(timeout: .now()), .timedOut, "The Condition has already evaluated, and did not wait on the dependency.") // finish the dependency dependency.finish() // wait for the procedure to finish weak var expProcedureDidFinish = expectation(description: "test procedure Did Finish") procedureDidFinishGroup.notify(queue: DispatchQueue.main) { expProcedureDidFinish?.fulfill() } waitForExpectations(timeout: 1) XCTAssertEqual(conditionEvaluatedGroup.wait(timeout: .now()), .success, "The Condition was never evaluated.") } func test__dependency_added_before_another_dependency_finishes_also_affects_conditions() { // A dependency that is added in (for example) an existing dependency's willFinish // observer should also properly delay the evaluation of Conditions. let procedure = TestProcedure() let procedureDidFinishGroup = DispatchGroup() let conditionEvaluatedGroup = DispatchGroup() weak var expDependencyDidStart = expectation(description: "Did Start additionalDependency") let dependency = TestProcedure() let additionalDependency = AsyncBlockProcedure { completion in DispatchQueue.main.async { expDependencyDidStart?.fulfill() } // does not finish } dependency.addWillFinishBlockObserver { _, _, _ in // add another dependency, before the first dependency finishes procedure.addDependency(additionalDependency) } weak var expDependencyDidFinish = expectation(description: "First dependency did finish") dependency.addDidFinishBlockObserver { _, _ in DispatchQueue.main.async { expDependencyDidFinish?.fulfill() } } procedureDidFinishGroup.enter() procedure.addDidFinishBlockObserver { _, _ in procedureDidFinishGroup.leave() } conditionEvaluatedGroup.enter() procedure.addCondition(TestCondition(evaluate: { // signal when evaluated conditionEvaluatedGroup.leave() return .success(true) })) procedure.addDependency(dependency) queue.addOperations(procedure, dependency, additionalDependency) // wait until the first dependency has finished, // and the additionalDependency has started waitForExpectations(timeout: 2) // sleep for 0.05 seconds to give a chance for the Condition to be improperly evaluated usleep(50000) // verify that the procedure *and the Condition* are not ready to execute, // nor executing, nor finished // (they should both be waiting on the dependency added in the ProcedureQueue // delegate's willAddProcedure handler, which won't finish until it's triggered) XCTAssertProcedureIsWaiting(procedure, withDependency: dependency) XCTAssertEqual(conditionEvaluatedGroup.wait(timeout: .now()), .timedOut, "The Condition has already evaluated, and did not wait on the dependency.") // finish the additional dependency additionalDependency.finish() // wait for the procedure to finish weak var expProcedureDidFinish = expectation(description: "test procedure Did Finish") procedureDidFinishGroup.notify(queue: DispatchQueue.main) { expProcedureDidFinish?.fulfill() } waitForExpectations(timeout: 1) XCTAssertEqual(conditionEvaluatedGroup.wait(timeout: .now()), .success, "The Condition was never evaluated.") } // Verifies that a Procedure (and its condition evaluator) have a dependency and are waiting private func XCTAssertProcedureIsWaiting<T: Procedure>(_ exp: @autoclosure () throws -> T, withDependency dependency: Operation, _ message: @autoclosure () -> String = "", file: StaticString = #file, line: UInt = #line) { __XCTEvaluateAssertion(testCase: self, message, file: file, line: line) { let procedure = try exp() guard procedure.isEnqueued else { return .expectedFailure("\(procedure.procedureName) has not been added to a queue yet.") } guard procedure.dependencies.contains(dependency) else { return .expectedFailure("\(procedure.procedureName) does not have dependency: \(dependency)") } guard !procedure.isReady else { return .expectedFailure("\(procedure.procedureName) is ready") } guard !procedure.isExecuting else { return .expectedFailure("\(procedure.procedureName) is executing") } guard !procedure.isFinished else { return .expectedFailure("\(procedure.procedureName) is finished") } if !procedure.conditions.isEmpty { guard let conditionEvaluator = procedure.evaluateConditionsProcedure else { return .expectedFailure("Unable to obtain condition evaluator from the Procedure.") } guard conditionEvaluator.dependencies.contains(dependency) else { return .expectedFailure("\(procedure.procedureName)'s condition evaluator does not have dependency: \(dependency)") } guard !conditionEvaluator.isReady else { return .expectedFailure("\(procedure.procedureName)'s condition evaluator is ready") } guard !conditionEvaluator.isExecuting else { return .expectedFailure("\(procedure.procedureName)'s condition evaluator is executing") } guard !conditionEvaluator.isFinished else { return .expectedFailure("\(procedure.procedureName)'s condition evaluator is finished") } } return .success } } // MARK: - Ignored Conditions func test__ignored_failing_condition_does_not_result_in_failure() { let procedure1 = TestProcedure(name: "Procedure 1") procedure1.addCondition(IgnoredCondition(FalseCondition())) let procedure2 = TestProcedure(name: "Procedure 2") procedure2.addCondition(FalseCondition()) wait(for: procedure1, procedure2) PKAssertProcedureCancelled(procedure1) PKAssertProcedureCancelledWithError(procedure2, ProcedureKitError.FalseCondition()) } func test__ignored_satisfied_condition_does_not_result_in_failure() { let procedure1 = TestProcedure(name: "Procedure 1") procedure1.addCondition(IgnoredCondition(TrueCondition())) let procedure2 = TestProcedure(name: "Procedure 2") procedure2.addCondition(TrueCondition()) wait(for: procedure1, procedure2) PKAssertProcedureFinished(procedure1) PKAssertProcedureFinished(procedure2) } func test__ignored_ignored_condition_does_not_result_in_failure() { procedure.addCondition(IgnoredCondition(IgnoredCondition(FalseCondition()))) wait(for: procedure) PKAssertProcedureCancelled(procedure) } func test__ignored_failing_condition_plus_successful_condition_succeeds() { // A Procedure with one or more ignored conditions and at least one // successful condition should be allowed to proceed with execution. let procedure1 = TestProcedure(name: "Procedure 1") procedure1.addCondition(IgnoredCondition(FalseCondition())) procedure1.addCondition(TrueCondition()) wait(for: procedure1) PKAssertProcedureFinished(procedure1) } // MARK: - Compound Conditions func test__compound_condition_produced_dependencies() { let conditions: [Condition] = (0..<3).map { let condition = TrueCondition(name: "Condition \($0)") condition.produceDependency(TestProcedure()) return condition } let compoundCondition = CompoundCondition(andPredicateWith: conditions) let nestedProducedDependencies = conditions.producedDependencies XCTAssertEqual(nestedProducedDependencies.count, 3) XCTAssertEqual(compoundCondition.producedDependencies.count, 0) let producedDependency = TestProcedure() compoundCondition.produceDependency(producedDependency) XCTAssertTrue(Array(compoundCondition.producedDependencies) == [producedDependency]) } func test__compound_condition_added_dependencies() { let conditions: [Condition] = (0..<3).map { let condition = TrueCondition(name: "Condition \($0)") condition.addDependency(TestProcedure()) return condition } let compoundCondition = CompoundCondition(andPredicateWith: conditions) let nestedDependencies = conditions.dependencies XCTAssertEqual(nestedDependencies.count, 3) XCTAssertEqual(compoundCondition.dependencies.count, 0) let dependency = TestProcedure() compoundCondition.addDependency(dependency) XCTAssertTrue(Array(compoundCondition.dependencies) == [dependency]) } func test__compound_condition_mutually_exclusive_categories() { // give all the conditions the same category let conditions: [Condition] = (0..<3).map { let condition = TrueCondition(name: "Condition \($0)") condition.addToAttachedProcedure(mutuallyExclusiveCategory: "test") return condition } let compoundCondition = CompoundCondition(andPredicateWith: conditions) XCTAssertEqual(compoundCondition.mutuallyExclusiveCategories, ["test"]) // give all the conditions different categories let conditions2: [Condition] = (0..<3).map { let condition = TrueCondition(name: "Condition \($0)") condition.addToAttachedProcedure(mutuallyExclusiveCategory: "test\($0)") return condition } let compoundCondition2 = CompoundCondition(andPredicateWith: conditions2) XCTAssertEqual(compoundCondition2.mutuallyExclusiveCategories, ["test0", "test1", "test2"]) } func test__compound_condition_and_predicate_filters_duplicates() { let evaluationCount = Protector<Int>(0) let condition1 = TestCondition() { evaluationCount.advance(by: 1); return .success(true) } let compoundCondition = CompoundCondition(andPredicateWith: condition1, condition1, condition1) procedure.addCondition(compoundCondition) wait(for: procedure) XCTAssertEqual(evaluationCount.access, 1) } func test__compound_condition_or_predicate_filters_duplicates() { let evaluationCount = Protector<Int>(0) let condition1 = TestCondition() { evaluationCount.advance(by: 1); return .success(false) } let compoundCondition = CompoundCondition(orPredicateWith: condition1, condition1, condition1) procedure.addCondition(compoundCondition) wait(for: procedure) XCTAssertEqual(evaluationCount.access, 1) } // MARK: - Compound Conditions - && func test__and_condition__with_no_conditions_cancels_without_errors() { procedure.addCondition(AndCondition([])) wait(for: procedure) PKAssertProcedureCancelled(procedure) } func test__and_condition__with_single_successful_condition__succeeds() { procedure.addCondition(AndCondition([TrueCondition()])) wait(for: procedure) PKAssertProcedureFinished(procedure) } func test__and_condition__with_single_failing_condition__fails() { procedure.addCondition(AndCondition([FalseCondition()])) wait(for: procedure) PKAssertProcedureCancelledWithError(procedure, ProcedureKitError.FalseCondition()) } func test__and_condition__with_single_ignored_condition__does_not_fail() { procedure.addCondition(AndCondition([IgnoredCondition(FalseCondition())])) wait(for: procedure) PKAssertProcedureCancelled(procedure) } func test__and_condition__with_two_successful_conditions__succeeds() { procedure.addCondition(AndCondition([TrueCondition(), TrueCondition()])) wait(for: procedure) PKAssertProcedureFinished(procedure) } func test__and_condition__with_successful_and_failing_conditions__fails() { procedure.addCondition(AndCondition([TrueCondition(), FalseCondition()])) wait(for: procedure) PKAssertProcedureCancelledWithError(procedure, ProcedureKitError.FalseCondition()) } func test__and_condition__with_failing_and_successful_conditions__fails() { procedure.addCondition(AndCondition([FalseCondition(), TrueCondition()])) wait(for: procedure) PKAssertProcedureCancelledWithError(procedure, ProcedureKitError.FalseCondition()) } func test__and_condition__with_successful_and_ignored_condition__does_not_fail() { procedure.addCondition(AndCondition([IgnoredCondition(FalseCondition()), TrueCondition()])) wait(for: procedure) PKAssertProcedureFinished(procedure) } func test__and_condition__with_failing_and_ignored_condition__fails() { procedure.addCondition(AndCondition([IgnoredCondition(FalseCondition()), FalseCondition()])) wait(for: procedure) PKAssertProcedureCancelledWithError(procedure, ProcedureKitError.FalseCondition()) } func test__and_condition__with_two_ignored_conditions__does_not_fail() { procedure.addCondition(AndCondition([IgnoredCondition(FalseCondition()), IgnoredCondition(FalseCondition())])) wait(for: procedure) PKAssertProcedureCancelled(procedure) } func test__nested_successful_and_conditions() { procedure.addCondition(AndCondition([AndCondition([TrueCondition(), TrueCondition()]), AndCondition([TrueCondition(), TrueCondition()])])) wait(for: procedure) PKAssertProcedureFinished(procedure) } func test__nested_failing_and_conditions() { procedure.addCondition(AndCondition([AndCondition([FalseCondition(), FalseCondition()]), AndCondition([FalseCondition(), FalseCondition()])])) wait(for: procedure) PKAssertProcedureCancelledWithError(procedure, ProcedureKitError.FalseCondition()) } func test__ignored_and_condition_does_not_fail() { procedure.addCondition(IgnoredCondition(AndCondition([TrueCondition(), FalseCondition()]))) wait(for: procedure) PKAssertProcedureCancelled(procedure) } // MARK: - Compound Conditions - || func test__or_condition__with_no_conditions_cancels_without_errors() { procedure.addCondition(OrCondition([])) wait(for: procedure) PKAssertProcedureCancelled(procedure) } func test__or_condition__with_single_successful_condition__succeeds() { procedure.addCondition(OrCondition([TrueCondition()])) wait(for: procedure) PKAssertProcedureFinished(procedure) } func test__or_condition__with_single_failing_condition__fails() { procedure.addCondition(OrCondition([FalseCondition()])) wait(for: procedure) PKAssertProcedureCancelledWithError(procedure, ProcedureKitError.FalseCondition()) } func test__or_condition__with_single_ignored_condition__does_not_fail() { procedure.addCondition(OrCondition([IgnoredCondition(FalseCondition())])) wait(for: procedure) PKAssertProcedureCancelled(procedure) } func test__or_condition__with_two_successful_conditions__succeeds() { procedure.addCondition(OrCondition([TrueCondition(), TrueCondition()])) wait(for: procedure) PKAssertProcedureFinished(procedure) } func test__or_condition__with_successful_and_failing_conditions__succeeds() { procedure.addCondition(OrCondition([TrueCondition(), FalseCondition()])) wait(for: procedure) PKAssertProcedureFinished(procedure) } func test__or_condition__with_failing_and_successful_conditions__succeeds() { procedure.addCondition(OrCondition([FalseCondition(), TrueCondition()])) wait(for: procedure) PKAssertProcedureFinished(procedure) } func test__or_condition__with_successful_and_ignored_condition__succeeds() { procedure.addCondition(OrCondition([IgnoredCondition(FalseCondition()), TrueCondition()])) wait(for: procedure) PKAssertProcedureFinished(procedure) } func test__or_condition__with_failing_and_ignored_condition__fails() { procedure.addCondition(OrCondition([IgnoredCondition(FalseCondition()), FalseCondition()])) wait(for: procedure) PKAssertProcedureCancelledWithError(procedure, ProcedureKitError.FalseCondition()) } func test__or_condition__with_two_ignored_conditions__does_not_fail() { procedure.addCondition(OrCondition([IgnoredCondition(FalseCondition()), IgnoredCondition(FalseCondition())])) wait(for: procedure) PKAssertProcedureCancelled(procedure) } func test__nested_successful_or_conditions() { procedure.addCondition(OrCondition([OrCondition([TrueCondition(), TrueCondition()]), OrCondition([TrueCondition(), TrueCondition()])])) wait(for: procedure) PKAssertProcedureFinished(procedure) } func test__nested_failing_or_conditions() { procedure.addCondition(OrCondition([OrCondition([FalseCondition(), FalseCondition()]), OrCondition([FalseCondition(), FalseCondition()])])) wait(for: procedure) PKAssertProcedureCancelled(procedure, withErrors: true) } func test__ignored_or_condition_does_not_fail() { procedure.addCondition(IgnoredCondition(OrCondition([FalseCondition()]))) wait(for: procedure) PKAssertProcedureCancelled(procedure) } // MARK: - Concurrency func test__procedure_cancelled_while_conditions_are_being_evaluated_finishes_before_blocked_condition() { class CustomTestCondition: AsyncTestCondition { typealias DeinitBlockType = () -> Void var deinitBlock: DeinitBlockType? = nil deinit { deinitBlock?() } } // to allow the Procedures to deallocate as soon as they are done // the QueueTestDelegate must be removed (as it holds references) queue.delegate = nil [true, false].forEach { waitOnEvaluatorReference in var procedure: TestProcedure? = TestProcedure() let procedureDidFinishGroup = DispatchGroup() let customQueue = DispatchQueue(label: "test") let conditionGroup = DispatchGroup() conditionGroup.enter() var condition: CustomTestCondition? = CustomTestCondition { completion in // only succeed once the group has been completed conditionGroup.notify(queue: customQueue) { completion(.success(true)) } } let conditionWillDeinitGroup = DispatchGroup() conditionWillDeinitGroup.enter() condition!.deinitBlock = { conditionWillDeinitGroup.leave() } procedureDidFinishGroup.enter() procedure!.addDidFinishBlockObserver { _, _ in procedureDidFinishGroup.leave() } procedure!.addCondition(condition!) // remove local reference to the Condition condition = nil // then start the procedure run(operation: procedure!) var evaluateConditionsOperation: Procedure.EvaluateConditions? = nil // obtain a reference to the EvaluateConditions operation if waitOnEvaluatorReference { guard let evaluator = procedure!.evaluateConditionsProcedure else { XCTFail("Unexpectedly no EvaluateConditions procedure") return } evaluateConditionsOperation = evaluator } // the Procedure should not finish, as it should be waiting on the Condition to evaluate XCTAssertEqual(procedureDidFinishGroup.wait(timeout: .now() + 0.2), .timedOut) // cancel the Procedure, which should allow it to rapidly finish // (despite the Condition *still* not being completed) procedure!.cancel() weak var expProcedureDidFinish = expectation(description: "procedure did finish") procedureDidFinishGroup.notify(queue: DispatchQueue.main) { expProcedureDidFinish?.fulfill() } waitForExpectations(timeout: 2) PKAssertProcedureCancelled(procedure!) // remove local reference to the Procedure procedure = nil // signal for the condition to finally complete conditionGroup.leave() if waitOnEvaluatorReference { // wait for the Condition evaluation to complete evaluateConditionsOperation!.waitUntilFinished() // verify that the Condition Evaluator was cancelled XCTAssertTrue(evaluateConditionsOperation!.isCancelled) } else { // wait for the Condition to begin to deinit weak var expConditionWillDeinit = expectation(description: "condition will deinit") conditionWillDeinitGroup.notify(queue: DispatchQueue.main) { expConditionWillDeinit?.fulfill() } waitForExpectations(timeout: 1) // then wait for an additional short delay to give the condition // evaluator operation a chance to deinit weak var expDelayPassed = expectation(description: "delay passed") DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { expDelayPassed?.fulfill() } waitForExpectations(timeout: 1) // nothing should have caused a crash XCTAssertTrue(true) } } } func test__procedure_cancelled_while_conditions_are_being_evaluated_cancels_condition_produced_dependencies() { let procedure = TestProcedure() // The following order of operations is enforced below: // 1. dependentCondition's `conditionProducedDependency` is produced by the dependentCondition, // and is executed (but does not finish) // AND // `normalDependency` is executed (but does not finish) // 2. then, `cancelsProcedureCondition` cancels the procedure (while conditions are // being evaluated, and while the condition-produced `conditionProducedDependency` and // the (non-condition-produced) `normalDependency` are executing) // The expected result is: // - `conditionProducedDependency` is cancelled (by the Procedure's cancellation propagating // through the active Condition Evaluation to cancel any active condition-produced // dependencies) // - `normalDependency` is not cancelled let testDependencyExecutedGroup = DispatchGroup() // signaled once testDependency has executed testDependencyExecutedGroup.enter() let conditionProducedDependency = AsyncResultProcedure<Bool> { _ in testDependencyExecutedGroup.leave() // do not finish } conditionProducedDependency.addDidCancelBlockObserver { conditionProducedDependency, _ in // only finish once cancelled conditionProducedDependency.finish(withResult: .success(true)) } testDependencyExecutedGroup.enter() let normalDependency = AsyncBlockProcedure { _ in testDependencyExecutedGroup.leave() // do not finish } let normalDependencyDidFinishGroup = DispatchGroup() normalDependencyDidFinishGroup.enter() normalDependency.addDidFinishBlockObserver { _, _ in normalDependencyDidFinishGroup.leave() } let cancelsProcedureCondition = AsyncTestCondition { completion in // do not do this - this is just to ensure that the procedure cancels in the middle of // condition evaluation for this test // // wait for the dependencies of the other condition to be executed before // cancelling the procedure and completing this condition testDependencyExecutedGroup.notify(queue: DispatchQueue.global()) { procedure.cancel() completion(.success(true)) } } let dependentCondition = TrueCondition() dependentCondition.produceDependency(conditionProducedDependency) dependentCondition.addDependency(normalDependency) procedure.addCondition(AndCondition(TrueCondition(), dependentCondition, cancelsProcedureCondition)) // wait on the conditionProducedDependency to finish - but since it is scheduled // (and produced) by the dependentCondition, simply add a completion block addCompletionBlockTo(procedure: conditionProducedDependency) // normalDependency is not expected to finish (nor cancel), so run it and check // finish status later (do not wait on it) run(operation: normalDependency) wait(for: procedure) PKAssertProcedureCancelled(procedure) // the condition-produced dependency should have been cancelled PKAssertProcedureCancelled(conditionProducedDependency) XCTAssertTrue(conditionProducedDependency.output.value?.value ?? false) // whereas the non-condition-produced dependency should *not* be cancelled, nor finished XCTAssertEqual(normalDependencyDidFinishGroup.wait(timeout: .now() + 0.1), .timedOut, "The normal condition dependency finished. It should not be cancelled, nor finished.") XCTAssertFalse(normalDependency.isCancelled) // clean-up: finish the normalDependency normalDependency.finish() } // MARK: - Execution Timing func test__conditions_are_not_evaluated_while_associated_procedurequeue_is_suspended() { queue.isSuspended = true let conditionWasEvaluatedGroup = DispatchGroup() conditionWasEvaluatedGroup.enter() let testCondition = TestCondition { conditionWasEvaluatedGroup.leave() return .success(true) } procedure.addCondition(testCondition) addCompletionBlockTo(procedure: procedure) queue.addOperation(procedure) XCTAssertTrue(conditionWasEvaluatedGroup.wait(timeout: .now() + 1.0) == .timedOut, "The condition was evaluated, despite the ProcedureQueue being suspended.") queue.isSuspended = false waitForExpectations(timeout: 3) // wait for the Procedure to finish PKAssertProcedureFinished(procedure) XCTAssertTrue(conditionWasEvaluatedGroup.wait(timeout: .now()) == .success, "The condition was never evaluated.") } func test__conditions_on_added_children_are_not_evaluated_before_parent_group_executes() { let conditionWasEvaluatedGroup = DispatchGroup() conditionWasEvaluatedGroup.enter() let testCondition = TestCondition { conditionWasEvaluatedGroup.leave() return .success(true) } procedure.addCondition(testCondition) let group = GroupProcedure(operations: []) group.addChild(procedure) // deliberately use add(child:) to test the non-initializer path XCTAssertTrue(conditionWasEvaluatedGroup.wait(timeout: .now() + 1.0) == .timedOut, "The condition was evaluated, despite the ProcedureQueue being suspended.") wait(for: group) PKAssertProcedureFinished(group) PKAssertProcedureFinished(procedure) XCTAssertTrue(conditionWasEvaluatedGroup.wait(timeout: .now()) == .success, "The condition was never evaluated.") } }
43.334768
225
0.689385
33d0ef12e4692305d3646b34e64baa9733634b1d
3,954
php
PHP
src/Filament/Resources/LetterResource.php
lara-zeus/wind
d9c7c3f03664f8509d7de4d561a3019ffda0d1d3
[ "MIT" ]
2
2022-01-02T15:32:24.000Z
2022-01-08T20:08:27.000Z
src/Filament/Resources/LetterResource.php
lara-zeus/wind
d9c7c3f03664f8509d7de4d561a3019ffda0d1d3
[ "MIT" ]
null
null
null
src/Filament/Resources/LetterResource.php
lara-zeus/wind
d9c7c3f03664f8509d7de4d561a3019ffda0d1d3
[ "MIT" ]
2
2022-03-03T23:54:58.000Z
2022-03-28T19:33:47.000Z
<?php namespace LaraZeus\Wind\Filament\Resources; use Filament\Forms\Components\Select; use Filament\Forms\Components\Textarea; use Filament\Forms\Components\TextInput; use Filament\Resources\Form; use Filament\Resources\Resource; use Filament\Resources\Table; use Filament\Tables\Columns\TextColumn; use Filament\Tables\Columns\ViewColumn; use LaraZeus\Wind\Filament\Resources\LetterResource\Pages; use LaraZeus\Wind\Models\Department; use LaraZeus\Wind\Models\Letter; class LetterResource extends Resource { protected static ?string $model = Letter::class; protected static ?string $navigationIcon = 'heroicon-o-inbox'; protected static ?int $navigationSort = 2; protected static function getNavigationBadge(): ?string { return static::getModel()::where('status', config('zeus-wind.default_status'))->count(); } public static function form(Form $form): Form { return $form ->schema([ TextInput::make('name') ->label(__('name')) ->required() ->disabled() ->maxLength(255), TextInput::make('email') ->label(__('email')) ->email() ->required() ->disabled() ->maxLength(255), Select::make('department_id') ->label(__('department')) ->options(Department::all()->pluck('name', 'id')) ->required() ->visible(fn (): bool => config('zeus-wind.enableDepartments')), TextInput::make('status') ->label(__('status')) ->required() ->maxLength(255), TextInput::make('title') ->label(__('title')) ->required() ->disabled() ->maxLength(255) ->columnSpan(['sm' => 2]), Textarea::make('message') ->label(__('message')) ->disabled() ->maxLength(65535) ->columnSpan(['sm' => 2]), TextInput::make('reply_title') ->label(__('reply_title')) ->required() ->maxLength(255) ->columnSpan(['sm' => 2]), Textarea::make('reply_message') ->label(__('reply_message')) ->required() ->maxLength(65535) ->columnSpan(['sm' => 2]), ]); } public static function table(Table $table): Table { return $table ->columns([ ViewColumn::make('from')->view('zeus-wind::filament.message-from')->sortable(['name'])->label(__('from')), TextColumn::make('title')->sortable()->label(__('title')), TextColumn::make('department.name')->sortable()->visible(fn (): bool => config('zeus-wind.enableDepartments'))->label(__('department')), TextColumn::make('status')->sortable()->label(__('status')) ->formatStateUsing(fn (string $state): string => __("status_{$state}")), ]) ->defaultSort('id', 'desc'); } public static function getPages(): array { return [ 'index' => Pages\ListLetters::route('/'), 'edit' => Pages\EditLetter::route('/{record}/edit'), ]; } public static function getLabel(): string { return __('Letter'); } public static function getPluralLabel(): string { return __('Letters'); } protected static function getNavigationLabel(): string { return __('Letters'); } protected static function getNavigationGroup(): ?string { return __('Wind'); } }
33.226891
152
0.504805
7d8ffd56d9373dd7a164883580e94a7922ab6ffb
6,571
rs
Rust
quill/common/src/events/health.rs
kirawi/feather
bb4baa51f5097b2e73e759a7c42cf62fb0555b06
[ "Apache-2.0" ]
null
null
null
quill/common/src/events/health.rs
kirawi/feather
bb4baa51f5097b2e73e759a7c42cf62fb0555b06
[ "Apache-2.0" ]
null
null
null
quill/common/src/events/health.rs
kirawi/feather
bb4baa51f5097b2e73e759a7c42cf62fb0555b06
[ "Apache-2.0" ]
null
null
null
//! Taken from Spigot's documentation, EntityRegainHealthEvent<https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/entity/EntityRegainHealthEvent.html> and EntityDamageEvent<https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/event/entity/EntityDamageEvent.html> use serde::{Deserialize, Serialize}; /// Raw events for mutating health. #[derive(Debug, Serialize, Deserialize, Clone)] pub enum EntityHealthEvent { Damage(u32), Regen(u32), } /// Damage Events pub mod entity_damage_event_kind { use super::{Deserialize, Serialize}; /// Damage caused by being in the area when a block explodes. /// /// Damage: Variable #[derive(Debug, Serialize, Deserialize, Clone)] pub struct BlockExplosion(u32); /// Damage caused when an entity contacts a block such as a Cactus. /// /// Damage: 1 #[derive(Debug, Serialize, Deserialize, Clone)] pub struct Contact; /// Damage caused when an entity is colliding with too many entities due to the `maxEntityCramming` game rule. /// /// Damage: 6 #[derive(Debug, Serialize, Deserialize, Clone)] pub struct Cramming; /// Damage caused by a dragon breathing fire. /// /// Damage: Variable #[derive(Debug, Serialize, Deserialize, Clone)] pub struct DragonBreath(u32); /// Damage caused by running out of air while in water. /// /// Damage: 2 #[derive(Debug, Serialize, Deserialize, Clone)] pub struct Drowning; /// Damage caused when an entity that should be in water is not. /// /// Damage: 1 #[derive(Debug, Serialize, Deserialize, Clone)] pub struct DryOut; /// Damage caused when an entity attacks another entity. /// /// Damage: Variable #[derive(Debug, Serialize, Deserialize, Clone)] pub struct EntityAttack(u32); /// Damage caused by being in the area when an entity, such as a Creeper, explodes. /// /// Damage: Variable #[derive(Debug, Serialize, Deserialize, Clone)] pub struct EntityExplosion(u32); /// Damage caused when an entity attacks another entity in a sweep attack. /// /// Damage: Variable #[derive(Debug, Serialize, Deserialize, Clone)] pub struct EntitySweepAttack(u32); /// Damage caused when an entity falls a distance greater than 3 blocks. /// /// Damage: fall_height - 3 #[derive(Debug, Serialize, Deserialize, Clone)] pub struct Fall(u32); /// Damage caused by being hit by a falling block which deals damage. /// /// Damage: Variable #[derive(Debug, Serialize, Deserialize, Clone)] pub struct FallingBlock(u32); /// Damage caused by direct exposure to fire. /// /// Damage: 1 #[derive(Debug, Serialize, Deserialize, Clone)] pub struct Fire; /// Damage caused due to burns caused by fire. /// /// Damage: 1 #[derive(Debug, Serialize, Deserialize, Clone)] pub struct FireTick; /// Damage caused when an entity runs into a wall. /// /// Damage: Variable #[derive(Debug, Serialize, Deserialize, Clone)] pub struct FlyIntoWall(u32); /// Damage caused when an entity steps on a magma block. /// /// Damage: 1 #[derive(Debug, Serialize, Deserialize, Clone)] pub struct HotFloor; /// Damage caused by direct exposure to lava. /// /// Damage: 4 #[derive(Debug, Serialize, Deserialize, Clone)] pub struct Lava; /// Damage caused by being struck by lightning. /// /// Damage: 5 #[derive(Debug, Serialize, Deserialize, Clone)] pub struct Lightning; /// Damage caused by being hit by a damage potion or spell. /// /// Damage: Variable #[derive(Debug, Serialize, Deserialize, Clone)] pub struct Magic(u32); /// Damage caused due to a snowman melting. /// /// Damage: 1 #[derive(Debug, Serialize, Deserialize, Clone)] pub struct Melting; /// Damage caused due to an ongoing poison effect. /// /// Damage: 1 #[derive(Debug, Serialize, Deserialize, Clone)] pub struct Poison; /// Damage caused when attacked by a projectile. /// /// Damage: Variable #[derive(Debug, Serialize, Deserialize, Clone)] pub struct Projectile(u32); /// Damage caused by starving due to having an empty hunger bar. /// /// Damage: 1 #[derive(Debug, Serialize, Deserialize, Clone)] pub struct Starvation; /// Damage caused by being put in a block. /// /// Damage: 1 #[derive(Debug, Serialize, Deserialize, Clone)] pub struct Suffocation; /// Damage caused in retaliation to another attack by the Thorns enchantment. /// /// Damage: 1-4 #[derive(Debug, Serialize, Deserialize, Clone)] pub struct Thorns; /// Damage caused by falling into the void. /// /// Damage: 4 for players #[derive(Debug, Serialize, Deserialize, Clone)] pub struct Void; /// Damage caused by Wither potion effect. /// /// Damage: Variable #[derive(Debug, Serialize, Deserialize, Clone)] pub struct Wither(u32); } /// Regeneration Events pub mod entity_regen_event_kind { use super::{Deserialize, Serialize}; /// Health regeneration from eating consumables. #[derive(Debug, Serialize, Deserialize, Clone)] pub struct Eating; /// Ender Dragon health regeneration from ender crystals. #[derive(Debug, Serialize, Deserialize, Clone)] pub struct EnderCrystal; /// Potions or spells. #[derive(Debug, Serialize, Deserialize, Clone)] pub struct Magic; /// Healed over time by potions or spells. #[derive(Debug, Serialize, Deserialize, Clone)] pub struct MagicRegen; /// Health regeneration due to Peaceful mode (difficulty=0). #[derive(Debug, Serialize, Deserialize, Clone)] pub struct Regen; /// Health regeneration due to their hunger being satisfied. #[derive(Debug, Serialize, Deserialize, Clone)] pub struct Satiated; /// Wither passive health regeneration. #[derive(Debug, Serialize, Deserialize, Clone)] pub struct Wither; /// Wither health regeneration when spawning. #[derive(Debug, Serialize, Deserialize, Clone)] pub struct WitherSpawn; } pub mod entity_special_event_kind { use super::{Deserialize, Serialize}; /// Special event for respawning. #[derive(Debug, Serialize, Deserialize, Clone)] pub struct EntityResurrectionEvent; /// Caused by committing suicide using the command, `/kill`. #[derive(Debug, Serialize, Deserialize, Clone)] pub struct EntitySuicideEvent; }
29.733032
268
0.658956
15f31db8e038f20c2f53e6ca1fdddbb281e786b7
1,528
sql
SQL
13. Database Programmability - Lab/DBProgrammability.sql
VeselinBPavlov/database-basics-ms-sql
860a83370b1fb2a1a955a723524457f8d03ba1f3
[ "MIT" ]
2
2019-04-14T21:04:28.000Z
2019-12-11T23:12:30.000Z
13. Database Programmability - Lab/DBProgrammability.sql
VeselinBPavlov/database-basics-ms-sql
860a83370b1fb2a1a955a723524457f8d03ba1f3
[ "MIT" ]
null
null
null
13. Database Programmability - Lab/DBProgrammability.sql
VeselinBPavlov/database-basics-ms-sql
860a83370b1fb2a1a955a723524457f8d03ba1f3
[ "MIT" ]
null
null
null
-- Queries for SoftUni Database USE SoftUni GO -- 1. Count Employees by Town CREATE OR ALTER FUNCTION ufn_CountEmployeesByTown(@TownName VARCHAR) RETURNS INT BEGIN DECLARE @Count INT; SET @Count = (SELECT COUNT(e.EmployeeID) FROM Employees AS e INNER JOIN Addresses AS a ON a.AddressID = e.AddressID INNER JOIN Towns AS t ON t.TownID = a.TownID WHERE t.Name = @TownName) RETURN @Count END GO -- 2. Employees Promotion CREATE OR ALTER PROCEDURE usp_RaiseSalaries(@DepartmentName VARCHAR) AS BEGIN UPDATE Employees SET Salary *= 1.05 WHERE DepartmentID = (SELECT DepartmentID FROM Departments WHERE [Name] = @DepartmentName) END GO -- 3. Employees Promotion By ID CREATE OR ALTER PROCEDURE usp_RaiseSalaryById(@Id INT) AS BEGIN DECLARE @EmployeeId INT = (SELECT EmployeeID FROM Employees WHERE EmployeeID = @Id) IF (@EmployeeId IS NOT NULL) BEGIN UPDATE Employees SET Salary *= 1.05 WHERE EmployeeID = @EmployeeId END END GO -- 4. Triggered CREATE TABLE DeletedEmployees ( [EmployeeId] INT PRIMARY KEY, [FirstName] NVARCHAR(50), [LastName] NVARCHAR(50), [MiddleName] NVARCHAR(50), [JobTitle] NVARCHAR(50), [DepartmentId] INT, [Salary] DECIMAL(15, 2) ) GO CREATE TRIGGER t_DeletedEmployees ON Employees AFTER DELETE AS INSERT INTO DeletedEmployees ([EmployeeId], [FirstName], [LastName], [MiddleName], [JobTitle], [DepartmentId], [Salary]) SELECT [EmployeeId], [FirstName], [LastName], [MiddleName], [JobTitle], [DepartmentId], [Salary] FROM deleted GO
22.80597
96
0.731021
75304c1f9d34c5d35392de85608634b9f8c7c6c4
2,956
css
CSS
src/app/themes/default-theme/components/main.css
abdullahva/abdullahva.github.io
7b5420af524471a65e943717669d5ecfe1fe8e89
[ "Apache-2.0" ]
null
null
null
src/app/themes/default-theme/components/main.css
abdullahva/abdullahva.github.io
7b5420af524471a65e943717669d5ecfe1fe8e89
[ "Apache-2.0" ]
null
null
null
src/app/themes/default-theme/components/main.css
abdullahva/abdullahva.github.io
7b5420af524471a65e943717669d5ecfe1fe8e89
[ "Apache-2.0" ]
null
null
null
/* Copyright (c) 2015 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ /** @define Main */ .Main { background-color: var(--secondary-background-color); @nest &-content { @apply(--paper-font-body1); color: var(--primary-text-color); @media (--md-viewport) { @apply(--paper-font-body2); padding: 48px 64px; } @nest & b{ color: currentColor; } @nest & a { color: var(--accent-color); font-weight: 500; text-decoration: none; } } @nest &-header { box-shadow: 0 0 4px rgba(0, 0, 0, 0.14), 0 4px 8px rgba(0, 0, 0, 0.28); color: var(--text-primary-color); /* postcss-bem-linter: ignore */ --paper-toolbar-content: { padding: 0; }; } @nest &-headerButton { /* postcss-bem-linter: ignore */ --paper-icon-button-ink-color: var(--text-dark-primary-color); } @nest &-headerTopBar { @apply(--layout-horizontal); @apply(--layout-center); background-color: var(--dark-primary-color); bottom: 0; color: var(--text-dark-primary-color); left: 0; padding: 0 16px; position: absolute; right: 0; top: 0; } @nest &-headerMiddleBar { @apply(--layout-horizontal); @apply(--layout-end); height: 100%; margin-left: 54px; @media (--md-viewport) { margin-left: 64px; } } @nest &-headerBottomBar { @apply(--layout-horizontal); @apply(--layout-center); margin-left: 54px; /* Required for main area's paper-scroll-header-panel custom condensing transformation */ transform-origin: left center; @media (--md-viewport) { margin-left: 64px; } } @nest &-headerTitle { @apply(--paper-font-headline); margin: 0; /* Required for main area's paper-scroll-header-panel custom condensing transformation */ transform-origin: left center; @media (--md-viewport) { @apply(--paper-font-display1); } } @nest &-headerSubTitle { @apply(--paper-font-subhead); /* Required for main area's paper-scroll-header-panel custom condensing transformation */ transform-origin: left center; } @nest & paper-collapse-item { margin: 5px; --paper-collapse-item-header : { border: 1px solid #CCC; padding-left: 15px; background-color: var(--accent-color); color: #FFF; } --paper-collapse-item-content : { border: 1px solid #CCC; border-top: none; padding: 15px; } @nest & p { white-space: normal; } } }
23.275591
100
0.619756
be83d8221f8993e37e211fcc6febbfa5a2270611
375
tsx
TypeScript
src/components/LanguageDisplay/Flag.tsx
tgnemecek/core-website
c9c9e575b95cf2ead04a4bb72c9b26546f6816ab
[ "MIT" ]
null
null
null
src/components/LanguageDisplay/Flag.tsx
tgnemecek/core-website
c9c9e575b95cf2ead04a4bb72c9b26546f6816ab
[ "MIT" ]
8
2021-03-21T07:11:28.000Z
2022-01-22T18:41:50.000Z
src/components/LanguageDisplay/Flag.tsx
tgnemecek/core-website
c9c9e575b95cf2ead04a4bb72c9b26546f6816ab
[ "MIT" ]
null
null
null
import React from "react"; import { Language } from "types"; import flagLibrary from "./flagLibrary"; import { JSXFlagProps } from "./types"; type FlagProps = JSXFlagProps & { code: Language; }; const Flag: React.FC<FlagProps> = ({ code, ...props }) => { const Component = flagLibrary[code]; return <Component {...props} />; }; export default Flag;
22.058824
60
0.637333
1296f59234f69a8990761ae21670b033788c911e
2,520
cs
C#
WarTLS/Classes/GameRoom/Mission.cs
DeadZoneLuna/WarTLS-3.6
cc057fcb18f51f53491d2509e807bda53109de6a
[ "Unlicense" ]
11
2018-12-05T13:40:06.000Z
2022-02-01T23:26:14.000Z
WarTLS/Classes/GameRoom/Mission.cs
CuBnIcK/WarTLS-3.6
df9fb307f136581a0b4a5211faaef4ff6492cc5f
[ "Unlicense" ]
2
2018-12-15T22:44:10.000Z
2019-08-11T11:05:42.000Z
WarTLS/Classes/GameRoom/Mission.cs
CuBnIcK/WarTLS-3.6
df9fb307f136581a0b4a5211faaef4ff6492cc5f
[ "Unlicense" ]
9
2018-12-05T13:53:40.000Z
2021-12-10T23:46:18.000Z
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Xml; using System.Xml.Linq; namespace WARTLS.CLASSES.GAMEROOM.CORE { class Mission { internal long UserId = 0; internal int Revision = 2; internal XmlDocument Map; internal XmlNode PvEInfo; internal XElement Serialize(bool IncludeData = false) { if (PvEInfo != null) { XElement gameroomElement1 = XDocument.Parse(PvEInfo.OuterXml).Root; if (IncludeData) gameroomElement1.Add(new XAttribute("data", Convert.ToBase64String(Encoding.UTF8.GetBytes(Map.InnerXml)))); return gameroomElement1; } XElement gameroomElement = new XElement("mission"); try { gameroomElement.Add(new XAttribute("mission_key", Map.FirstChild.Attributes["uid"].InnerText)); gameroomElement.Add(new XAttribute("no_teams", Map.FirstChild.Attributes["game_mode"].InnerText == "ffa" ? 1:0)); gameroomElement.Add(new XAttribute("mode", Map.FirstChild.Attributes["game_mode"].InnerText)); gameroomElement.Add(new XAttribute("mode_name", Map.FirstChild["UI"]["GameMode"].Attributes["text"].InnerText)); //gameroomElement.Add(new XAttribute("mode_icon", Map.FirstChild["UI"]["GameMode"].Attributes["icon"].InnerText)); gameroomElement.Add(new XAttribute("image", Map.FirstChild["UI"]["Description"].Attributes["icon"].InnerText)); gameroomElement.Add(new XAttribute("description", Map.FirstChild["UI"]["Description"].Attributes["text"].InnerText)); gameroomElement.Add(new XAttribute("name", Map.FirstChild.Attributes["name"].InnerText)); gameroomElement.Add(new XAttribute("difficulty", "normal")); gameroomElement.Add(new XAttribute("type", "")); gameroomElement.Add(new XAttribute("setting", Map.FirstChild["Basemap"].Attributes["name"].InnerText)); gameroomElement.Add(new XAttribute("time_of_day", Map.FirstChild.Attributes["time_of_day"].InnerText)); gameroomElement.Add(new XAttribute("revision", Revision)); if(IncludeData) gameroomElement.Add(new XAttribute("data", Convert.ToBase64String(Encoding.UTF8.GetBytes(Map.InnerXml)))); } catch { } return gameroomElement; } } }
47.54717
129
0.64127
a3660970086a5c39e2f32e016ed4247503236403
185
ts
TypeScript
src/address/dto/create-address.dto.ts
riquena969/hcode-projeto
830a28d875ce1d5dd840237ca77321efdfa53ded
[ "MIT" ]
null
null
null
src/address/dto/create-address.dto.ts
riquena969/hcode-projeto
830a28d875ce1d5dd840237ca77321efdfa53ded
[ "MIT" ]
null
null
null
src/address/dto/create-address.dto.ts
riquena969/hcode-projeto
830a28d875ce1d5dd840237ca77321efdfa53ded
[ "MIT" ]
null
null
null
export class CreateAddressDto { street: string; number?: string; complement?: string; district: string; city: string; state: string; country: string; zipcode: string; }
16.818182
31
0.691892
54318901585bf988524f59e11111c741bce5e2c1
563
css
CSS
css/run.css
lizard43/placer
ee2eb4d43c5a06e74c18fc551fd4df4d6d941de6
[ "MIT" ]
1
2018-10-07T15:55:51.000Z
2018-10-07T15:55:51.000Z
css/run.css
lizard43/placer
ee2eb4d43c5a06e74c18fc551fd4df4d6d941de6
[ "MIT" ]
null
null
null
css/run.css
lizard43/placer
ee2eb4d43c5a06e74c18fc551fd4df4d6d941de6
[ "MIT" ]
null
null
null
body { width: 98%; } .scrollit { /* overflow:scroll; */ height: 85%; } #score_table { table-layout: fixed; width: 100%; } #score_table td { width: 25%; } .buttonteam { width:100%; } .placer { border-style: solid; border-width: 1px; border-color:black; text-align: center; } .scoreteam { color: black; font-weight: bolder; } .float-left { float: left; } .float-right { float: right; } .footer p { text-align: center; } .footer { margin-top: 100px; width: 100%; text-align: center; font-size: 0.8em; bottom: 0; }
10.622642
24
0.600355
7ae1185bd93cce81bdea93a690dd34ce02e97273
1,236
cs
C#
Apartmant/UserInterface/Dialog/InputDialog.cs
isman-usoh/apament-management-system
bb46285f847415747c4bcad6d38a296b7ce4332d
[ "MIT" ]
null
null
null
Apartmant/UserInterface/Dialog/InputDialog.cs
isman-usoh/apament-management-system
bb46285f847415747c4bcad6d38a296b7ce4332d
[ "MIT" ]
null
null
null
Apartmant/UserInterface/Dialog/InputDialog.cs
isman-usoh/apament-management-system
bb46285f847415747c4bcad6d38a296b7ce4332d
[ "MIT" ]
null
null
null
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace Apartment.UI.Dialog { public partial class InputDialog : Form { string input_text; public string ResultText { get { return input_text; } private set { input_text = value; } } public InputDialog(string title, string textbox_string) { InitializeComponent(); this.Text = title; this.txtInput.Text = textbox_string; } public InputDialog() { InitializeComponent(); } private void btnOk_Click(object sender, EventArgs e) { ResultText = txtInput.Text.Trim(); } private void txtInput_TextChanged(object sender, EventArgs e) { if (txtInput.Text.Trim().Length > 0) { btnOk.Enabled = true; } else { btnOk.Enabled = false; } } private void InputDialog_Load(object sender, EventArgs e) { } } }
21.684211
69
0.543689
daa74de61db20e692bd7a910fa512803dd49ca43
7,996
php
PHP
app/Http/Schedules/NotificationScheduler.php
Shahrampeyvandi/charsoo_pannel
8f2ce9cc3aa71f32d72656b09eed699bfc03980c
[ "MIT" ]
null
null
null
app/Http/Schedules/NotificationScheduler.php
Shahrampeyvandi/charsoo_pannel
8f2ce9cc3aa71f32d72656b09eed699bfc03980c
[ "MIT" ]
null
null
null
app/Http/Schedules/NotificationScheduler.php
Shahrampeyvandi/charsoo_pannel
8f2ce9cc3aa71f32d72656b09eed699bfc03980c
[ "MIT" ]
null
null
null
<?php namespace App\Http\Schedules; use App\Models\Notifications\Notifications; use App\Models\Personals\Personal; use App\Models\Cunsomers\Cunsomer; use App\Models\Notifications\PannelNotifications; use App\Models\User; use App\Models\Services\Service; use Spatie\Permission\Models\Role; class NotificationScheduler { public function __invoke() { echo date('Y-m-d H:00:00')."asdas".PHP_EOL; $notifications=Notifications::where('sent',0)->where('send',date('Y-m-d H:00:00'))->get(); if(count($notifications)){ foreach($notifications as $notification){ if($notification->sent == 0){ //$notification = Notifications::find($notification->id); $notification->sent=1; $notification->send = date('Y-m-d H:i:s'); $array = unserialize( $notification->list ); if($notification->to == 'مشتری ها'){ foreach($array as $key=>$fard){ if($fard == 0){ $members = Cunsomer::all(); }else{ $members[] = Cunsomer::find($fard); } } foreach($members as $member){ if($notification->how == 'پیامک'){ $this->sendsms($member->customer_mobile,$notification->text,$notification->smstemplate); }else if($notification->how == 'نوتیفیکیشن'){ $this->sendnotification($member->firebase_token/$notification->title,$notification->text); }else{ $this->sendsms($member->customer_mobile,$notification->text,$notification->smstemplate); $this->sendnotification($member->firebase_token,$notification->title,$notification->text); } } }else if($notification->to == 'خدمت رسان ها'){ foreach($array as $key=>$fard){ if($fard == 0){ if($notification->broker){ foreach (Service::where('service_role', $role->name)->get() as $key => $service) { foreach ($service->personal as $key => $personal) { $personalslist[] = $personal; } } $ids=[]; foreach($personalslist as $key=>$personal){ $id=$personal->id; $repe=false; for($x = 0; $x < count($ids); $x++){ if($ids[$x]==$id){ $repe=true; break; } } if($repe){ $members[]=$personal; } $ids[]=$id; } }else{ $members = Personal::all(); } }else{ $members[] = Personal::find($fard); } } foreach($members as $member){ if($notification->how == 'پیامک'){ $this->sendsms($member->personal_mobile,$notification->text,$notification->smstemplate); }else if($notification->how == 'نوتیفیکیشن'){ $this->sendnotification($member->firebase_token,$notification->title,$notification->text); }else{ $this->sendsms($member->personal_mobile,$notification->text,$notification->smstemplate); $this->sendnotification($member->firebase_token,$notification->title,$notification->text); } } }else{ foreach ($array as $key => $fard) { if ($fard == 0) { $members = User::all(); } else { $members[] = User::find($fard); } } foreach ($members as $member) { if ($notification->how == 'پیامک') { $this->sendsms($member->user_mobile, $notification->text, $notification->smstemplate); } else { echo date('Y-m-d H:00:00')."sendnotification".PHP_EOL; $pannelnotification=new PannelNotifications; $pannelnotification->title=$notification->title; $pannelnotification->text=$notification->text; $pannelnotification->users_id=$member->id; $pannelnotification->notifications_id=$notification->id; $pannelnotification->save(); } } } $notification->update(); } } } } public function sendsms($phone , $text,$template){ echo date('Y-m-d H:00:00')."sms".PHP_EOL; $apikey = '5079544B44782F41475237506D6A4C46713837717571386D6D784636486C666D'; $receptor = $phone; $token = $text; $template = $template; $api = new \Kavenegar\KavenegarApi($apikey); try { $api->VerifyLookup($receptor, $token, null, null, $template); } catch (\Kavenegar\Exceptions\ApiException $e) { //return response()->json(['message' => 'مشکل پنل پیامکی پیش آمده است =>' . $e->errorMessage()], 400); return response()->json(['code'=> $token ,'error' => 'مشکل پنل پیامکی پیش آمده است =>' . $e->errorMessage() ],500); } catch (\Kavenegar\Exceptions\HttpException $e) { return response()->json(['code'=> $token,'error' => 'مشکل اتصال پیش امده است =>' . $e->errorMessage()],500); } return response()->json(['code' => $token], 200); // return response()->json(['data'=> ['code' => $token] ],200); } public function sendnotification($firebasetoken ,$title, $text){ echo date('Y-m-d H:00:00')."sendnotification".PHP_EOL; $fcmUrl = 'https://fcm.googleapis.com/fcm/send'; $notification = [ 'title' => $text, 'sound' => true, ]; $extraNotificationData = ["message" => $title, "moredata" => $title]; $fcmNotification = [ //'registration_ids' => $tokenList, //multple token array 'to' => $firebasetoken, //single token 'notification' => $notification, 'data' => $extraNotificationData ]; $serverkey = env('FIREBASE_LEGACY_SERVER_KEY'); $headers = [ 'Authorization: key=' . $serverkey, 'Content-Type: application/json' ]; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $fcmUrl); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($fcmNotification)); $result = curl_exec($ch); curl_close($ch); //dd($ch); return true; } }
27.572414
120
0.440845
7eadddca6d5d0e14f7f14c0cb1fbf21fecdf2850
369
swift
Swift
Shared/Services/DigitColor.swift
iTh1nk/billbook-swift
bc2101ee6868be0a89cedad3b5adcd46aa6618ad
[ "MIT" ]
1
2021-09-29T21:11:14.000Z
2021-09-29T21:11:14.000Z
Shared/Services/DigitColor.swift
iTh1nk/billbook-swift
bc2101ee6868be0a89cedad3b5adcd46aa6618ad
[ "MIT" ]
null
null
null
Shared/Services/DigitColor.swift
iTh1nk/billbook-swift
bc2101ee6868be0a89cedad3b5adcd46aa6618ad
[ "MIT" ]
null
null
null
// // DigitColor.swift // Billbook-Swift // // Created by Chao Feng on 1/3/21. // import Foundation class DigitColor: ObservableObject { func digitColor(digitString: String) -> Bool { guard let digit = Float(digitString) else { print("Color Convert Fail!"); return false } if digit >= 0 { return true } else { return false } } }
17.571429
92
0.626016
f21588f682ae09660e179411f3a5eb30b6347d67
1,026
sql
SQL
copyToS3/transformationSQL/drug-exposure.sql
ryanmhood/AWS-MIMIC-IIItoOMOP-1
a2343dacd3753c3b01eaf969784b1e6337cf3b71
[ "Apache-2.0" ]
11
2018-05-29T11:34:19.000Z
2020-04-04T06:40:03.000Z
copyToS3/transformationSQL/drug-exposure.sql
lonmiller/AWS-MIMIC-IIItoOMOP
a2343dacd3753c3b01eaf969784b1e6337cf3b71
[ "Apache-2.0" ]
3
2018-04-17T14:07:17.000Z
2018-12-26T20:16:17.000Z
copyToS3/transformationSQL/drug-exposure.sql
lonmiller/AWS-MIMIC-IIItoOMOP
a2343dacd3753c3b01eaf969784b1e6337cf3b71
[ "Apache-2.0" ]
8
2018-02-27T05:57:24.000Z
2020-05-14T18:38:34.000Z
select cv.SUBJECT_ID as person_id , 0 as drug_concept_id , date_format(cv.CHARTTIME, 'yyyyMMdd') as drug_exposure_start_date , 0 as drug_type_concept_id , cv.AMOUNT as effective_drug_dose , cv.CGID as provider_id , cv.ICUSTAY_ID as visit_occurrence_id , regexp_replace(items.LABEL, ',', ';') as drug_source_value , 0 as drug_source_concept_id , cv.ORIGINALROUTE as route , cv.AMOUNTUOM as doseuom from mimic3_inputevents_cv cv inner join mimic3_d_items items on cv.ITEMID = items.ITEMID union all select mv.SUBJECT_ID as person_id , 0 as drug_concept_id , date_format(mv.STARTTIME, 'yyyyMMdd') as drug_exposure_start_date , 0 as drug_type_concept_id , mv.AMOUNT as effective_drug_dose , mv.STORETIME as provider_id , mv.ICUSTAY_ID as visit_occurrence_id , regexp_replace(items.LABEL, ',', ';') as drug_source_value , 0 as drug_source_concept_id , null as route , mv.AMOUNTUOM as doseuom from mimic3_inputevents_mv mv inner join mimic3_d_items items on mv.ITEMID = items.ITEMID
35.37931
69
0.768031
02577a3ccd5b3b87a03ef2e25ff95188fcceeb1c
1,190
dart
Dart
lib/src/app/pages/achievements/achievements_presenter.dart
One-Week-Apps/SalsaCoach
90c64416ffbd23827154df44ad6a1115c016549c
[ "MIT" ]
null
null
null
lib/src/app/pages/achievements/achievements_presenter.dart
One-Week-Apps/SalsaCoach
90c64416ffbd23827154df44ad6a1115c016549c
[ "MIT" ]
null
null
null
lib/src/app/pages/achievements/achievements_presenter.dart
One-Week-Apps/SalsaCoach
90c64416ffbd23827154df44ad6a1115c016549c
[ "MIT" ]
null
null
null
import 'package:flutter_clean_architecture/flutter_clean_architecture.dart'; import 'package:salsa_coach/src/domain/usecases/achievements_usecase.dart'; class AchievementsPresenter extends Presenter { Function getAllAchievementsOnNext; final AchievementsUseCase getAchievementsUseCase; AchievementsPresenter() : getAchievementsUseCase = AchievementsUseCase(); void getAllAchievements(AchievementsRequestType type, String id) { getAchievementsUseCase.execute(_GetAllAchievementsUseCaseObserver(this), AchievementsUseCaseParams(type, id)); } @override void dispose() { getAchievementsUseCase.dispose(); } } class _GetAllAchievementsUseCaseObserver extends Observer<AchievementsUseCaseResponse> { final AchievementsPresenter presenter; _GetAllAchievementsUseCaseObserver(this.presenter); @override void onComplete() { print("onComplete"); } @override void onError(e) { print("onError" + e.toString()); } @override void onNext(response) { print("onNext" + response.achievements.toString()); assert(presenter.getAllAchievementsOnNext != null); presenter.getAllAchievementsOnNext(response.achievements); } }
26.444444
76
0.77395
bf7823b80cbb3ac48541abba899caa96368a0a4c
5,931
swift
Swift
thenTests/ObservingPromiseTests.swift
Kleemann/then
90b246a3853fdbc117b76c2dd4439c4422514c00
[ "MIT" ]
null
null
null
thenTests/ObservingPromiseTests.swift
Kleemann/then
90b246a3853fdbc117b76c2dd4439c4422514c00
[ "MIT" ]
null
null
null
thenTests/ObservingPromiseTests.swift
Kleemann/then
90b246a3853fdbc117b76c2dd4439c4422514c00
[ "MIT" ]
null
null
null
// // ObservingPromiseTests.swift // thenTests // // Created by Mads Kleemann on 10/02/2019. // Copyright © 2019 s4cha. All rights reserved. // import XCTest @testable import then class ObservingPromiseTests: XCTestCase { override func setUp() { super.setUp() } override func tearDown() { super.tearDown() } struct ObservingPromiseTestError: Error {} func testObservingPromiseKeepsBlocksIsSetToTrue() { let p = ObservingPromise<Int>() XCTAssertEqual(p.keepBlocks, true) } func testObservingPromiseCanSucceedMultipleTimes() { let e1 = expectation(description: "") let e2 = expectation(description: "") let p = ObservingPromise<Int>() waitTime(0.1) { p.fulfill(1) } waitTime(0.2) { p.fulfill(2) } var numberOfTimesThenWasCalled = 0 p.then { i in numberOfTimesThenWasCalled += 1 if i == 1 { e1.fulfill() } else if i == 2 { e2.fulfill() } } waitForExpectations(timeout: 0.3) { (error) in XCTAssertEqual(numberOfTimesThenWasCalled, 2) } } func testObservingPromiseCanSucceedAndFail() { let e1 = expectation(description: "") let e2 = expectation(description: "") let p = ObservingPromise<Int>() waitTime(0.1) { p.fulfill(1) } waitTime(0.2) { p.fulfill(2) } var numberOfCallsToThen = 0 p.then { i in numberOfCallsToThen += 1 if i == 1 { e1.fulfill() } else if i == 2 { e2.fulfill() } } waitForExpectations(timeout: 0.4) { (error) in XCTAssertEqual(p.keepBlocks, true) XCTAssertEqual(numberOfCallsToThen, 2) } } func testObservingPromiseCanSucceedAndFailAndSucceed() { let e1 = expectation(description: "") let e2 = expectation(description: "") let e3 = expectation(description: "") let p = ObservingPromise<Int>() waitTime(0.1) { p.fulfill(1) } waitTime(0.2) { p.reject(ObservingPromiseTestError()) } waitTime(0.3) { p.fulfill(2) } var numberOfCallsToThen = 0 var numberOfCallsToOnError = 0 p.then { i in numberOfCallsToThen += 1 if i == 1 { e1.fulfill() } else if i == 2 { e3.fulfill() } }.onError { (error) in numberOfCallsToOnError += 1 guard error as? ObservingPromiseTestError != nil else { XCTFail("testRecoverCanThrowANewError failed") return } e2.fulfill() } waitForExpectations(timeout: 0.4) { (error) in XCTAssertEqual(p.keepBlocks, true) XCTAssertEqual(numberOfCallsToThen, 2) XCTAssertEqual(numberOfCallsToOnError, 1) } } func testObservingPromiseCanFailAndSucceed() { let e1 = expectation(description: "") let e2 = expectation(description: "") let p = ObservingPromise<Int>() waitTime(0.1) { p.reject(ObservingPromiseTestError()) } waitTime(0.2) { p.fulfill(1) } var numberOfCallsToThen = 0 var numberOfCallsToOnError = 0 p.then { _ in numberOfCallsToThen += 1 e1.fulfill() }.onError { (_) in numberOfCallsToOnError += 1 e2.fulfill() } waitForExpectations(timeout: 0.3) { (error) in XCTAssertEqual(p.keepBlocks, true) XCTAssertEqual(numberOfCallsToThen, 1) XCTAssertEqual(numberOfCallsToOnError, 1) } } func testObservingPromiseSucceedsOnMainThreadMultipleTimes() { let e1 = expectation(description: "") let e2 = expectation(description: "") let p = ObservingPromise<Int>() waitTime(0.1) { p.fulfill(1) } waitTime(0.2) { p.fulfill(2) } var numberOfCallsToThen = 0 p.resolveOn(.main) .then { result in guard Thread.isMainThread else { XCTFail("Promise not resolved on main thread") return } numberOfCallsToThen += 1 if result == 1 { e1.fulfill() } else if result == 2 { e2.fulfill() } } waitForExpectations(timeout: 0.3, handler: { (error) in XCTAssertEqual(numberOfCallsToThen, 2) }) } func testObservingPromiseCanFailAndSucceedWithVoid() { let e1 = expectation(description: "") let e2 = expectation(description: "") let p = ObservingPromise<Void>() waitTime(0.1) { p.reject(ObservingPromiseTestError()) } waitTime(0.2) { p.fulfill(()) } var numberOfCallsToThen = 0 var numberOfCallsToOnError = 0 p.then { _ in numberOfCallsToThen += 1 e1.fulfill() }.onError { (_) in numberOfCallsToOnError += 1 e2.fulfill() } waitForExpectations(timeout: 0.3) { (error) in XCTAssertEqual(p.keepBlocks, true) XCTAssertEqual(numberOfCallsToThen, 1) XCTAssertEqual(numberOfCallsToOnError, 1) } } }
26.477679
67
0.49941
6ddbd3fba022fd562326bccef4cb8a61ca755893
505
dart
Dart
test/match_videos_test.dart
tweirtx/tba-api-client-dart
c875e72216aa73685982badf69f4648a18f71dc7
[ "MIT" ]
1
2021-02-08T19:27:27.000Z
2021-02-08T19:27:27.000Z
test/match_videos_test.dart
jr1221/tba-api-client-dart
79af3730d60b8e6182e13e411c109f11f3917e37
[ "MIT" ]
null
null
null
test/match_videos_test.dart
jr1221/tba-api-client-dart
79af3730d60b8e6182e13e411c109f11f3917e37
[ "MIT" ]
1
2021-02-09T14:40:41.000Z
2021-02-09T14:40:41.000Z
import 'package:tba_api_client/api.dart'; import 'package:test/test.dart'; // tests for MatchVideos void main() { var instance = new MatchVideos(); group('test MatchVideos', () { // Can be one of 'youtube' or 'tba' // String type (default value: null) test('to test the property `type`', () async { // TODO }); // Unique key representing this video // String key (default value: null) test('to test the property `key`', () async { // TODO }); }); }
20.2
50
0.59604
7978c489d5fb90d23b04d22f3f83c43d353500a3
1,151
cpp
C++
src/xml/UISettings.cpp
tianpi/thekla
3cee9fc26752f712f003745785abd67236ba8102
[ "MIT" ]
null
null
null
src/xml/UISettings.cpp
tianpi/thekla
3cee9fc26752f712f003745785abd67236ba8102
[ "MIT" ]
null
null
null
src/xml/UISettings.cpp
tianpi/thekla
3cee9fc26752f712f003745785abd67236ba8102
[ "MIT" ]
null
null
null
#include "UISettings.h" #include "XmlDatabaseDocument.h" //-------------------------------------------------------------------------------- UISettings::UISettings() : XmlElement(false) { xmlData_->setConfigFlag(XmlElementData::USE_THEKLA, false); xmlData_->setConfigFlag(XmlElementData::GENERATE_QTAPP_CODE, false); setServerHost("localhost"); setServerPort(20000); setServerCallbackPort(20001); setUIDataXPathPrefix(XmlDatabaseDocument::DEFAULT_UI_DATA_XPATH_PREFIX); } //-------------------------------------------------------------------------------- UISettings::UISettings(const UISettings & copy) : XmlElement(copy) { } //-------------------------------------------------------------------------------- void UISettings::init(const QDomElement & domElem) { // NOTE (reimplemented from XmlElement): keep default settings by merging modified // attributes with default values. BUT: Do NOT clear any attribute that is not // contained in the given DOM element. Instead keep the default value. XmlElementData data(domElem); xmlData_->setTagName(data.getTagName()); xmlData_->merge(data); }
33.852941
86
0.584709
de616975bef625bdb839cb63b89a41999a3a5bcc
831
swift
Swift
TensorFlow/coreml/ios/app/CoreMLImageClassification/Support/UIImage+Extension.swift
skafos/example-ml-apps
1f764870ce2cc43ef28f844fa18cde18f4f75fbd
[ "Apache-2.0" ]
2
2019-08-01T18:40:34.000Z
2019-08-02T01:31:08.000Z
TensorFlow/coreml/ios/app/CoreMLImageClassification/Support/UIImage+Extension.swift
skafos/example-ml-apps
1f764870ce2cc43ef28f844fa18cde18f4f75fbd
[ "Apache-2.0" ]
1
2020-03-17T08:37:51.000Z
2020-03-17T12:49:56.000Z
TensorFlow/coreml/ios/app/CoreMLImageClassification/Support/UIImage+Extension.swift
skafos/example-ml-apps
1f764870ce2cc43ef28f844fa18cde18f4f75fbd
[ "Apache-2.0" ]
null
null
null
// // UIImage+Extension.swift // CoreMLImageClassification // // Created by Skafos.ai on 07/31/19. // Copyright © 2019 Skafos, LLC. All rights reserved. // import UIKit import VideoToolbox extension UIImage { func imageWithSize(scaledToSize newSize: CGSize) -> UIImage { let horizontalRatio = newSize.width / self.size.width let verticalRatio = newSize.height / self.size.height let ratio = max(horizontalRatio, verticalRatio) let newSize = CGSize(width: self.size.width * ratio, height: self.size.height * ratio) UIGraphicsBeginImageContextWithOptions(newSize, false, 0.0) self.draw(in: CGRect(x: 0, y: 0, width: newSize.width, height: newSize.height)) let newImage: UIImage = UIGraphicsGetImageFromCurrentImageContext()! UIGraphicsEndImageContext() return newImage } }
28.655172
90
0.720818
437e5859addddd00a80c4ae9e906ddc506478906
298
tsx
TypeScript
src/components/atoms/graphqlError/index.tsx
utpandey/gatsby-sanity-disney-clone
04cd3bffb55e6c3be5a7943a201a596a951703f8
[ "Apache-2.0" ]
null
null
null
src/components/atoms/graphqlError/index.tsx
utpandey/gatsby-sanity-disney-clone
04cd3bffb55e6c3be5a7943a201a596a951703f8
[ "Apache-2.0" ]
null
null
null
src/components/atoms/graphqlError/index.tsx
utpandey/gatsby-sanity-disney-clone
04cd3bffb55e6c3be5a7943a201a596a951703f8
[ "Apache-2.0" ]
null
null
null
import React from "react" interface IProps { errors: any } const GraphQLErrorList: React.FC<IProps> = ({ errors }) => ( <div> <h1>GraphQL Error</h1> {errors.map((error: any) => ( <pre key={error.message}>{error.message}</pre> ))} </div> ) export default GraphQLErrorList
17.529412
60
0.620805
75553f12364fcac7b0d50118d7540b7a870c3770
4,482
go
Go
pkg/operator/client/client.go
haotaogeng/fabedge
029ef6f41254ac131f468f5968f167c1e123e3ae
[ "Apache-2.0" ]
380
2021-07-16T04:53:57.000Z
2022-03-31T12:54:34.000Z
pkg/operator/client/client.go
haotaogeng/fabedge
029ef6f41254ac131f468f5968f167c1e123e3ae
[ "Apache-2.0" ]
12
2021-08-04T02:04:44.000Z
2022-02-18T10:28:26.000Z
pkg/operator/client/client.go
haotaogeng/fabedge
029ef6f41254ac131f468f5968f167c1e123e3ae
[ "Apache-2.0" ]
48
2021-07-16T06:23:27.000Z
2022-03-22T12:04:53.000Z
package client import ( "bytes" "crypto/tls" "crypto/x509" "encoding/json" "io" "io/ioutil" "net/http" "net/url" "time" apis "github.com/fabedge/fabedge/pkg/apis/v1alpha1" "github.com/fabedge/fabedge/pkg/operator/apiserver" certutil "github.com/fabedge/fabedge/pkg/util/cert" ) const defaultTimeout = 5 * time.Second type Interface interface { GetEndpointsAndCommunities() (apiserver.EndpointsAndCommunity, error) UpdateEndpoints(endpoints []apis.Endpoint) error SignCert(csr []byte) (Certificate, error) } type client struct { clusterName string baseURL *url.URL client *http.Client } type Certificate struct { Raw *x509.Certificate DER []byte PEM []byte } func NewClient(apiServerAddr string, clusterName string, transport http.RoundTripper) (Interface, error) { baseURL, err := url.Parse(apiServerAddr) if err != nil { return nil, err } return &client{ baseURL: baseURL, clusterName: clusterName, client: &http.Client{ Timeout: defaultTimeout, Transport: transport, }, }, nil } func (c *client) SignCert(csr []byte) (cert Certificate, err error) { req, err := http.NewRequest(http.MethodPost, join(c.baseURL, apiserver.URLSignCERT), csrBody(csr)) if err != nil { return cert, err } req.Header.Set("Content-Type", "text/plain") req.Header.Set(apiserver.HeaderClusterName, c.clusterName) resp, err := c.client.Do(req) if err != nil { return cert, err } return readCertFromResponse(resp) } func (c *client) UpdateEndpoints(endpoints []apis.Endpoint) error { data, err := json.Marshal(endpoints) if err != nil { return err } req, err := http.NewRequest(http.MethodPut, join(c.baseURL, apiserver.URLUpdateEndpoints), bytes.NewReader(data)) if err != nil { return err } req.Header.Set("Content-Type", "application/json") req.Header.Set(apiserver.HeaderClusterName, c.clusterName) resp, err := c.client.Do(req) if err != nil { return err } _, err = handleResponse(resp) return err } func (c *client) GetEndpointsAndCommunities() (ea apiserver.EndpointsAndCommunity, err error) { req, err := http.NewRequest(http.MethodGet, join(c.baseURL, apiserver.URLGetEndpointsAndCommunities), nil) if err != nil { return ea, err } req.Header.Set(apiserver.HeaderClusterName, c.clusterName) resp, err := c.client.Do(req) if err != nil { return ea, err } data, err := handleResponse(resp) err = json.Unmarshal(data, &ea) return ea, err } func GetCertificate(apiServerAddr string) (cert Certificate, err error) { baseURL, err := url.Parse(apiServerAddr) if err != nil { return cert, err } cli := &http.Client{ Timeout: defaultTimeout, Transport: &http.Transport{ TLSClientConfig: &tls.Config{ InsecureSkipVerify: true, }, }, } resp, err := cli.Get(join(baseURL, apiserver.URLGetCA)) if err != nil { return cert, err } return readCertFromResponse(resp) } func SignCertByToken(apiServerAddr string, token string, csr []byte, certPool *x509.CertPool) (cert Certificate, err error) { baseURL, err := url.Parse(apiServerAddr) if err != nil { return cert, err } cli := &http.Client{ Timeout: defaultTimeout, Transport: &http.Transport{ TLSClientConfig: &tls.Config{ RootCAs: certPool, }, }, } req, err := http.NewRequest(http.MethodPost, join(baseURL, apiserver.URLSignCERT), csrBody(csr)) if err != nil { return cert, err } req.Header.Set(apiserver.HeaderAuthorization, "bearer "+token) req.Header.Set("Content-Type", "text/html") resp, err := cli.Do(req) if err != nil { return cert, err } return readCertFromResponse(resp) } func join(baseURL *url.URL, ref string) string { u, _ := baseURL.Parse(ref) return u.String() } func readCertFromResponse(resp *http.Response) (cert Certificate, err error) { cert.PEM, err = handleResponse(resp) if err != nil { return } cert.DER, err = certutil.DecodePEM(cert.PEM) if err != nil { return } cert.Raw, err = x509.ParseCertificate(cert.DER) return cert, err } func handleResponse(resp *http.Response) (content []byte, err error) { defer resp.Body.Close() if resp.StatusCode >= 400 { content, err = ioutil.ReadAll(resp.Body) if err != nil { return } return nil, &HttpError{ Response: resp, Message: string(content), } } if resp.StatusCode == http.StatusNoContent { return nil, nil } return ioutil.ReadAll(resp.Body) } func csrBody(csr []byte) io.Reader { return bytes.NewReader(certutil.EncodeCertRequestPEM(csr)) }
21.342857
125
0.700357
02b5850e430e2d3c09f72cdc2c8bcfdfb9811231
200
sh
Shell
paper_plots/simulations/generate_plot_RData.sh
WannabeSmith/drconfseq
d7dff001bc15b68458f8f4b01663b47d30b2c3ee
[ "MIT" ]
7
2021-04-17T03:48:07.000Z
2021-05-07T12:51:42.000Z
paper_plots/simulations/generate_plot_RData.sh
WannabeSmith/sequential.causal
d7dff001bc15b68458f8f4b01663b47d30b2c3ee
[ "MIT" ]
null
null
null
paper_plots/simulations/generate_plot_RData.sh
WannabeSmith/sequential.causal
d7dff001bc15b68458f8f4b01663b47d30b2c3ee
[ "MIT" ]
null
null
null
#!/bin/zsh for folder in */; do cd $folder for R_file in *.R; do echo "############### Generating RData from $R_file ###############" Rscript $R_file done cd .. done
16.666667
76
0.465
ef27a64d061689c0aaa23f8307e0a2603145aeca
6,419
h
C
tia/include/tencentcloud/tia/v20180226/model/QueryLogsRequest.h
li5ch/tencentcloud-sdk-cpp
12ebfd75a399ee2791f6ac1220a79ce8a9faf7c4
[ "Apache-2.0" ]
43
2019-08-14T08:14:12.000Z
2022-03-30T12:35:09.000Z
tia/include/tencentcloud/tia/v20180226/model/QueryLogsRequest.h
li5ch/tencentcloud-sdk-cpp
12ebfd75a399ee2791f6ac1220a79ce8a9faf7c4
[ "Apache-2.0" ]
12
2019-07-15T10:44:59.000Z
2021-11-02T12:35:00.000Z
tia/include/tencentcloud/tia/v20180226/model/QueryLogsRequest.h
li5ch/tencentcloud-sdk-cpp
12ebfd75a399ee2791f6ac1220a79ce8a9faf7c4
[ "Apache-2.0" ]
28
2019-07-12T09:06:22.000Z
2022-03-30T08:04:18.000Z
/* * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef TENCENTCLOUD_TIA_V20180226_MODEL_QUERYLOGSREQUEST_H_ #define TENCENTCLOUD_TIA_V20180226_MODEL_QUERYLOGSREQUEST_H_ #include <string> #include <vector> #include <map> #include <tencentcloud/core/AbstractModel.h> namespace TencentCloud { namespace Tia { namespace V20180226 { namespace Model { /** * QueryLogs请求参数结构体 */ class QueryLogsRequest : public AbstractModel { public: QueryLogsRequest(); ~QueryLogsRequest() = default; std::string ToJsonString() const; /** * 获取任务的名称 * @return JobName 任务的名称 */ std::string GetJobName() const; /** * 设置任务的名称 * @param JobName 任务的名称 */ void SetJobName(const std::string& _jobName); /** * 判断参数 JobName 是否已赋值 * @return JobName 是否已赋值 */ bool JobNameHasBeenSet() const; /** * 获取任务所在集群的名称 * @return Cluster 任务所在集群的名称 */ std::string GetCluster() const; /** * 设置任务所在集群的名称 * @param Cluster 任务所在集群的名称 */ void SetCluster(const std::string& _cluster); /** * 判断参数 Cluster 是否已赋值 * @return Cluster 是否已赋值 */ bool ClusterHasBeenSet() const; /** * 获取查询日志的开始时间,格式:2019-01-01 00:00:00 * @return StartTime 查询日志的开始时间,格式:2019-01-01 00:00:00 */ std::string GetStartTime() const; /** * 设置查询日志的开始时间,格式:2019-01-01 00:00:00 * @param StartTime 查询日志的开始时间,格式:2019-01-01 00:00:00 */ void SetStartTime(const std::string& _startTime); /** * 判断参数 StartTime 是否已赋值 * @return StartTime 是否已赋值 */ bool StartTimeHasBeenSet() const; /** * 获取查询日志的结束时间,格式:2019-01-01 00:00:00 * @return EndTime 查询日志的结束时间,格式:2019-01-01 00:00:00 */ std::string GetEndTime() const; /** * 设置查询日志的结束时间,格式:2019-01-01 00:00:00 * @param EndTime 查询日志的结束时间,格式:2019-01-01 00:00:00 */ void SetEndTime(const std::string& _endTime); /** * 判断参数 EndTime 是否已赋值 * @return EndTime 是否已赋值 */ bool EndTimeHasBeenSet() const; /** * 获取单次要返回的日志条数上限 * @return Limit 单次要返回的日志条数上限 */ uint64_t GetLimit() const; /** * 设置单次要返回的日志条数上限 * @param Limit 单次要返回的日志条数上限 */ void SetLimit(const uint64_t& _limit); /** * 判断参数 Limit 是否已赋值 * @return Limit 是否已赋值 */ bool LimitHasBeenSet() const; /** * 获取加载更多日志时使用,透传上次返回的 Context 值,获取后续的日志内容;使用 Context 翻页最多能获取 10000 条日志 * @return Context 加载更多日志时使用,透传上次返回的 Context 值,获取后续的日志内容;使用 Context 翻页最多能获取 10000 条日志 */ std::string GetContext() const; /** * 设置加载更多日志时使用,透传上次返回的 Context 值,获取后续的日志内容;使用 Context 翻页最多能获取 10000 条日志 * @param Context 加载更多日志时使用,透传上次返回的 Context 值,获取后续的日志内容;使用 Context 翻页最多能获取 10000 条日志 */ void SetContext(const std::string& _context); /** * 判断参数 Context 是否已赋值 * @return Context 是否已赋值 */ bool ContextHasBeenSet() const; private: /** * 任务的名称 */ std::string m_jobName; bool m_jobNameHasBeenSet; /** * 任务所在集群的名称 */ std::string m_cluster; bool m_clusterHasBeenSet; /** * 查询日志的开始时间,格式:2019-01-01 00:00:00 */ std::string m_startTime; bool m_startTimeHasBeenSet; /** * 查询日志的结束时间,格式:2019-01-01 00:00:00 */ std::string m_endTime; bool m_endTimeHasBeenSet; /** * 单次要返回的日志条数上限 */ uint64_t m_limit; bool m_limitHasBeenSet; /** * 加载更多日志时使用,透传上次返回的 Context 值,获取后续的日志内容;使用 Context 翻页最多能获取 10000 条日志 */ std::string m_context; bool m_contextHasBeenSet; }; } } } } #endif // !TENCENTCLOUD_TIA_V20180226_MODEL_QUERYLOGSREQUEST_H_
32.419192
105
0.424677
6a501c43dc87c26dd1e0478f7d91a4e57e06b1ae
602
swift
Swift
11_3rdparty/demo/Cryptomarket/Cryptomarket/Model/Market Summary/MarketSummary.swift
alexdobry/FSIOS_SS18
cc2b2f12cda63e6a9dad5c8e4178238fc1dfe6db
[ "MIT" ]
null
null
null
11_3rdparty/demo/Cryptomarket/Cryptomarket/Model/Market Summary/MarketSummary.swift
alexdobry/FSIOS_SS18
cc2b2f12cda63e6a9dad5c8e4178238fc1dfe6db
[ "MIT" ]
null
null
null
11_3rdparty/demo/Cryptomarket/Cryptomarket/Model/Market Summary/MarketSummary.swift
alexdobry/FSIOS_SS18
cc2b2f12cda63e6a9dad5c8e4178238fc1dfe6db
[ "MIT" ]
null
null
null
// // MarketSummary.swift // Cryptomarket // // Created by Alex on 05.01.18. // Copyright © 2018 Alexander Dobrynin. All rights reserved. // import Foundation struct MarketSummary: Codable { let name: String let timestamp: Date let high: Double let last: Double let low: Double enum CodingKeys: String, CodingKey { case name = "MarketName" case timestamp = "TimeStamp" case high = "High" case last = "Last" case low = "Low" } } struct MarketSummaryResult: Codable { let result: [MarketSummary] let success: Bool }
19.419355
61
0.627907
f4344879d2e42b93521019674b2267f92ce40011
888
ts
TypeScript
src/products/products.controller.ts
AlexGert42/nest
e9d441504404c239e4ccccd95d358370b628e0f4
[ "MIT" ]
null
null
null
src/products/products.controller.ts
AlexGert42/nest
e9d441504404c239e4ccccd95d358370b628e0f4
[ "MIT" ]
null
null
null
src/products/products.controller.ts
AlexGert42/nest
e9d441504404c239e4ccccd95d358370b628e0f4
[ "MIT" ]
null
null
null
import { Body, Controller, Delete, Get, Param, Post, Put } from "@nestjs/common"; import { CreateProductDto } from "./dto/create-product.dto"; import { UpdateProductDto } from "./dto/update-product.dto"; import { ProductsServese } from "./products.servese"; @Controller("products") export class ProductsController { constructor(private readonly productsService: ProductsServese) { } @Get() getAll() { return this.productsService.getAll(); } @Get(":id") getOne(@Param("id") id: string) { return `response ${id}`; } @Post() create(@Body() body: CreateProductDto) { return this.productsService.create(body); } @Delete(":id") remove(@Param("id") id: string) { return this.productsService.remove(id) } @Put(":id") update(@Body() prod: UpdateProductDto, @Param("id") id: string) { return this.productsService.update(id, prod) } }
22.2
81
0.664414
ff524813fa74f4a322a5c71b4043f60a52d84272
139
sql
SQL
customization/stronger_mobs.sql
Vladislav-Zolotaryov/L2J_Levelless_Custom
fb9fd3d22209679258cddc60cec104d740f13b8c
[ "MIT" ]
null
null
null
customization/stronger_mobs.sql
Vladislav-Zolotaryov/L2J_Levelless_Custom
fb9fd3d22209679258cddc60cec104d740f13b8c
[ "MIT" ]
null
null
null
customization/stronger_mobs.sql
Vladislav-Zolotaryov/L2J_Levelless_Custom
fb9fd3d22209679258cddc60cec104d740f13b8c
[ "MIT" ]
null
null
null
update npc set hp = (hp * 1.20), mp = (mp * 1.20), patk = (patk * 1.20), pdef = (pdef * 1.20), matk = (matk * 1.20), mdef = (mdef * 1.20);
69.5
138
0.503597
746e41373258c311cfd1363547f2338201ef0bb8
4,011
sql
SQL
master_worker/deployment/digigob/digigob/eGoveris-product/tech-docs/flyway/sql/CONSOLIDADO/santiago-qa-egov-dockerizado/V0.6__qa-edt-egov-docker_adminsade_permisos2017-10-02 10-15-53.sql
GrupoWeb/k8s_srv_mineco
8be27c3d88d52a155a7a577a9a98af8baa68e89d
[ "MIT" ]
null
null
null
master_worker/deployment/digigob/digigob/eGoveris-product/tech-docs/flyway/sql/CONSOLIDADO/santiago-qa-egov-dockerizado/V0.6__qa-edt-egov-docker_adminsade_permisos2017-10-02 10-15-53.sql
GrupoWeb/k8s_srv_mineco
8be27c3d88d52a155a7a577a9a98af8baa68e89d
[ "MIT" ]
null
null
null
master_worker/deployment/digigob/digigob/eGoveris-product/tech-docs/flyway/sql/CONSOLIDADO/santiago-qa-egov-dockerizado/V0.6__qa-edt-egov-docker_adminsade_permisos2017-10-02 10-15-53.sql
GrupoWeb/k8s_srv_mineco
8be27c3d88d52a155a7a577a9a98af8baa68e89d
[ "MIT" ]
null
null
null
USE qa_edt_egov_docker; insert into `adminsade_permisos`(`ID`,`PERMISO`,`ROL`,`DESCRIPCION`,`SISTEMA`) values (724,'admin.ffcc',null,'Permite el acceso al administrador de Formularios Controlados ','FFDD'); insert into `adminsade_permisos`(`ID`,`PERMISO`,`ROL`,`DESCRIPCION`,`SISTEMA`) values (490,'ou=te.adm.tipooper,ou=grupos,dc=egoveris,dc=com',null,'Acceso a la funcionalidad de Administración de Tipo de Operaciones','TE'); insert into `adminsade_permisos`(`ID`,`PERMISO`,`ROL`,`DESCRIPCION`,`SISTEMA`) values (1172,'ou=DEO.TAREAS.MISTAREAS,ou=grupos,dc=egoveris,dc=com','','Acceso Tareas DEO','DEO'); insert into `adminsade_permisos`(`ID`,`PERMISO`,`ROL`,`DESCRIPCION`,`SISTEMA`) values (489,'ou=te.adm.tramites,ou=grupos,dc=egoveris,dc=com',null,'Acceso a la funcionalidad de Administración de Tipo de Trámites','TE'); insert into `adminsade_permisos`(`ID`,`PERMISO`,`ROL`,`DESCRIPCION`,`SISTEMA`) values (482,'ou=te.operaciones,ou=grupos,dc=egoveris,dc=com',null,'Acceso a la funcionalidad de Operaciones','TE'); insert into `adminsade_permisos`(`ID`,`PERMISO`,`ROL`,`DESCRIPCION`,`SISTEMA`) values (483,'ou=te.tareas.mistareas,ou=grupos,dc=egoveris,dc=com',null,'Acceso a la funcionalidad de Mis Tareas','TE'); insert into `adminsade_permisos`(`ID`,`PERMISO`,`ROL`,`DESCRIPCION`,`SISTEMA`) values (484,'ou=te.tareas.buzongrupal,ou=grupos,dc=egoveris,dc=com',null,'Acceso a la funcionalidad de Buzón Grupal','TE'); insert into `adminsade_permisos`(`ID`,`PERMISO`,`ROL`,`DESCRIPCION`,`SISTEMA`) values (485,'ou=te.tareas.supervisados,ou=grupos,dc=egoveris,dc=com',null,'Acceso a la funcionalidad de Supervisados','TE'); insert into `adminsade_permisos`(`ID`,`PERMISO`,`ROL`,`DESCRIPCION`,`SISTEMA`) values (486,'ou=te.consultas,ou=grupos,dc=egoveris,dc=com',null,'Acceso a la funcionalidad de Consultas','TE'); insert into `adminsade_permisos`(`ID`,`PERMISO`,`ROL`,`DESCRIPCION`,`SISTEMA`) values (487,'ou=te.rehabilitar,ou=grupos,dc=egoveris,dc=com',null,'Acceso a la funcionalidad de Rehabilitar Expedientes','TE'); insert into `adminsade_permisos`(`ID`,`PERMISO`,`ROL`,`DESCRIPCION`,`SISTEMA`) values (1173,'ou=DEO.TAREAS.SUPERVISADAS,ou=grupos,dc=egoveris,dc=com','','Acceso Tareas Supervisadas DEO','DEO'); insert into `adminsade_permisos`(`ID`,`PERMISO`,`ROL`,`DESCRIPCION`,`SISTEMA`) values (1171,'ou=edt,ou=grupos,dc=gob,dc=ar',null,'Permiso a EDT','EDT'); insert into `adminsade_permisos`(`ID`,`PERMISO`,`ROL`,`DESCRIPCION`,`SISTEMA`) values (1174,'ou=DEO.CONSULTAS,ou=grupos,dc=egoveris,dc=com','','Acceso a consultas DEO','DEO'); insert into `adminsade_permisos`(`ID`,`PERMISO`,`ROL`,`DESCRIPCION`,`SISTEMA`) values (1175,'ou=DEO.MIS.PLANTILLAS,ou=grupos,dc=egoveris,dc=com','','Acceso a plantillas DEO','DEO'); insert into `adminsade_permisos`(`ID`,`PERMISO`,`ROL`,`DESCRIPCION`,`SISTEMA`) values (1176,'ou=wd.stateflow,ou=grupos,dc=egoveris,dc=com','','Acceso al diseñador de estados','WD'); insert into `adminsade_permisos`(`ID`,`PERMISO`,`ROL`,`DESCRIPCION`,`SISTEMA`) values (1177,'ou=WD.TASKFLOW,ou=grupos,dc=egoveris,dc=com','','Acceso al diseñador de tareas','WD'); insert into `adminsade_permisos`(`ID`,`PERMISO`,`ROL`,`DESCRIPCION`,`SISTEMA`) values (1178,'ou=deo.admin.documentos,ou=grupos,dc=egoveris,dc=com',null,'Acceso Adm Documentos','DEO'); insert into `adminsade_permisos`(`ID`,`PERMISO`,`ROL`,`DESCRIPCION`,`SISTEMA`) values (1179,'ffdd',null,'Acceso a Formularios Dinamicos','FFDD'); insert into `adminsade_permisos`(`ID`,`PERMISO`,`ROL`,`DESCRIPCION`,`SISTEMA`) values (1180,'ou=te.herramientas,ou=grupos,dc=egoveris,dc=com',null,'Acceso a la funcionalidad Herramientas','TE'); insert into `adminsade_permisos`(`ID`,`PERMISO`,`ROL`,`DESCRIPCION`,`SISTEMA`) values (1181,'ou=te.operaciones,ou=te.tareas.mistareas,ou=te.tareas.buzongrupal,dc=gob,dc=ar',null,'Administrador de reglas y tareas','TE'); insert into `adminsade_permisos`(`ID`,`PERMISO`,`ROL`,`DESCRIPCION`,`SISTEMA`) values (586,'ou=admin.central,ou=grupos,dc=gob,dc=ar','','Administrador central','EGOVERIS');
167.125
221
0.74196
772084fd2beb187e6975d878682f2b1fc08d50f9
240
lua
Lua
dumb/computer/birth_child.lua
jafacakes2011/computercraft-scripts
36f321d78b4d0243909f2068c54f3664bc1a6adf
[ "MIT" ]
null
null
null
dumb/computer/birth_child.lua
jafacakes2011/computercraft-scripts
36f321d78b4d0243909f2068c54f3664bc1a6adf
[ "MIT" ]
null
null
null
dumb/computer/birth_child.lua
jafacakes2011/computercraft-scripts
36f321d78b4d0243909f2068c54f3664bc1a6adf
[ "MIT" ]
null
null
null
while true do local success, data = turtle.inspect() if not success then turtle.select(1) turtle.place() local placed_turtle = peripheral.wrap("front") placed_turtle.turnOn() break end end
24
54
0.6125
e467956aadf940665743e28eba2cbb1af8da3b5a
490
cpp
C++
tests/2016/04.cpp
voivoid/advent-of-code
efc02f558ad7718d02dfc205fadeba6b857ce4ae
[ "MIT" ]
6
2019-03-01T14:15:38.000Z
2021-12-10T21:39:23.000Z
tests/2016/04.cpp
voivoid/advent-of-code
efc02f558ad7718d02dfc205fadeba6b857ce4ae
[ "MIT" ]
3
2018-10-22T09:42:26.000Z
2018-10-22T11:45:06.000Z
tests/2016/04.cpp
voivoid/advent-of-code
efc02f558ad7718d02dfc205fadeba6b857ce4ae
[ "MIT" ]
null
null
null
#include "boost/test/unit_test.hpp" #include "aoc_fixture.h" #include "AoC/2016/problem_04.h" using namespace AoC_2016::problem_04; BOOST_FIXTURE_TEST_CASE( problem2016_04_1, AocFixture ) { BOOST_CHECK_EQUAL( 1514, run( &solve_1, R"(aaaaa-bbb-z-y-x-123[abxyz] a-b-c-d-e-f-g-h-987[abcde] not-a-real-room-404[oarel] totally-real-room-200[decoy])" ) ); }
30.625
79
0.536735
dde5d1509230984bd96c51204b1fe5d4c64e147e
3,952
java
Java
src/main/java/invtweaks/integration/ItemListSorter.java
Neerwan/inventory-tweaks
bd1e422138ac732c9a22e226712250e0778d61ca
[ "MIT" ]
null
null
null
src/main/java/invtweaks/integration/ItemListSorter.java
Neerwan/inventory-tweaks
bd1e422138ac732c9a22e226712250e0778d61ca
[ "MIT" ]
null
null
null
src/main/java/invtweaks/integration/ItemListSorter.java
Neerwan/inventory-tweaks
bd1e422138ac732c9a22e226712250e0778d61ca
[ "MIT" ]
1
2019-07-16T12:16:23.000Z
2019-07-16T12:16:23.000Z
package invtweaks.integration; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.Comparator; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.SidedProxy; import org.jetbrains.annotations.NotNull; import invtweaks.InvTweaks; import invtweaks.forge.CommonProxy; import invtweaks.forge.InvTweaksMod;; public class ItemListSorter { @Mod.Instance public static InvTweaksMod instance; @SidedProxy(clientSide = "invtweaks.forge.ClientProxy", serverSide = "invtweaks.forge.CommonProxy") public static CommonProxy proxy; public static class ItemListComparator implements Comparator<ItemStack> { @Override public int compare(ItemStack o1, ItemStack o2) { if (o1 == null && o2 == null) return 0; else if (o1 == null) return 1; else if (o2 == null) return -1; return InvTweaks.getInstance().compareItems(o1, o2, true); } } public static class ItemListComparator2 implements Comparator<ItemStack> { @Override public int compare(ItemStack o1, ItemStack o2) { if (o1 == null && o2 == null) return 0; else if (o1 == null) return 1; else if (o2 == null) return -1; return InvTweaks.getInstance().compareItems(o1, o2, false); } } public static void LinkJEITComparator() { if (Loader.isModLoaded("jei")) { try { Class<?> ingredientListElementComparator = Class.forName("mezz.jei.ingredients.IngredientListElementComparator"); Class<?> clientConfig = Class.forName("mezz.jei.config.Config"); if (ingredientListElementComparator != null && clientConfig != null) { Class[] cArg = new Class[2]; cArg[0] = String.class; cArg[1] = Comparator.class; Method addItemStackComparison = ingredientListElementComparator.getMethod("addItemStackComparison", cArg); Method updateSortOrder = clientConfig.getMethod("updateSortOrder"); if (addItemStackComparison != null && updateSortOrder != null) { Object[] oArg = new Object[2]; //The tree-only sorting. oArg[0] = "invtweakstree"; oArg[1] = new ItemListComparator(); addItemStackComparison.invoke(null, oArg); //The aggressive sorting. oArg[0] = "invtweaksall"; oArg[1] = new ItemListComparator2(); addItemStackComparison.invoke(null, oArg); updateSortOrder.invoke(null); } } } catch (@NotNull ClassNotFoundException | NoSuchMethodException | SecurityException | InvocationTargetException | IllegalAccessException ignored) { return; } } } public static void ReloadItemList() { if (Loader.isModLoaded("jei")) { try { Class<?> ProxyCommonClient = Class.forName("mezz.jei.startup.ProxyCommonClient"); if (ProxyCommonClient != null) { Method reloadItemList = ProxyCommonClient.getMethod("reloadItemList"); if (reloadItemList != null) { reloadItemList.invoke(null); } } } catch (@NotNull ClassNotFoundException | NoSuchMethodException | SecurityException | InvocationTargetException | IllegalAccessException ignored) { return; } } } }
38.368932
160
0.572874
da37bfa6a9279362c11f40dba35e23f849a3e18a
6,499
sql
SQL
dao-jpa-ojpa-derby/target/partial.oracle.sql
thilini89/wso2-ode
a15cc4a125f83a70427d93bfc2e2320eb47321ba
[ "Apache-2.0" ]
null
null
null
dao-jpa-ojpa-derby/target/partial.oracle.sql
thilini89/wso2-ode
a15cc4a125f83a70427d93bfc2e2320eb47321ba
[ "Apache-2.0" ]
null
null
null
dao-jpa-ojpa-derby/target/partial.oracle.sql
thilini89/wso2-ode
a15cc4a125f83a70427d93bfc2e2320eb47321ba
[ "Apache-2.0" ]
null
null
null
CREATE TABLE ODE_ACTIVITY_RECOVERY (ID NUMBER NOT NULL, ACTIONS VARCHAR2(255), ACTIVITY_ID NUMBER, CHANNEL VARCHAR2(255), DATE_TIME TIMESTAMP, DETAILS CLOB, INSTANCE_ID NUMBER, REASON VARCHAR2(255), RETRIES NUMBER, PRIMARY KEY (ID)); CREATE TABLE ODE_CORRELATION_SET (CORRELATION_SET_ID NUMBER NOT NULL, CORRELATION_KEY VARCHAR2(255), NAME VARCHAR2(255), SCOPE_ID NUMBER, PRIMARY KEY (CORRELATION_SET_ID)); CREATE TABLE ODE_CORRELATOR (CORRELATOR_ID NUMBER NOT NULL, CORRELATOR_KEY VARCHAR2(255), PROC_ID NUMBER, PRIMARY KEY (CORRELATOR_ID)); CREATE TABLE ODE_CORSET_PROP (ID NUMBER NOT NULL, CORRSET_ID NUMBER, PROP_KEY VARCHAR2(255), PROP_VALUE VARCHAR2(255), PRIMARY KEY (ID)); CREATE TABLE ODE_EVENT (EVENT_ID NUMBER NOT NULL, DETAIL VARCHAR2(255), DATA BLOB, SCOPE_ID NUMBER, TSTAMP TIMESTAMP, TYPE VARCHAR2(255), INSTANCE_ID NUMBER, PROCESS_ID NUMBER, PRIMARY KEY (EVENT_ID)); CREATE TABLE ODE_FAULT (FAULT_ID NUMBER NOT NULL, ACTIVITY_ID NUMBER, DATA CLOB, MESSAGE VARCHAR2(4000), LINE_NUMBER NUMBER, NAME VARCHAR2(255), PRIMARY KEY (FAULT_ID)); CREATE TABLE ODE_MESSAGE (MESSAGE_ID NUMBER NOT NULL, DATA CLOB, HEADER CLOB, TYPE VARCHAR2(255), MESSAGE_EXCHANGE_ID VARCHAR2(255), PRIMARY KEY (MESSAGE_ID)); CREATE TABLE ODE_MESSAGE_EXCHANGE (MESSAGE_EXCHANGE_ID VARCHAR2(255) NOT NULL, CALLEE VARCHAR2(255), CHANNEL VARCHAR2(255), CORRELATION_ID VARCHAR2(255), CORRELATION_KEYS VARCHAR2(255), CORRELATION_STATUS VARCHAR2(255), CREATE_TIME TIMESTAMP, DIRECTION NUMBER, EPR CLOB, FAULT VARCHAR2(255), FAULT_EXPLANATION VARCHAR2(255), OPERATION VARCHAR2(255), PARTNER_LINK_MODEL_ID NUMBER, PATTERN VARCHAR2(255), PIPED_ID VARCHAR2(255), PORT_TYPE VARCHAR2(255), PROPAGATE_TRANS NUMBER, STATUS VARCHAR2(255), SUBSCRIBER_COUNT NUMBER, CORR_ID NUMBER, PARTNER_LINK_ID NUMBER, PROCESS_ID NUMBER, PROCESS_INSTANCE_ID NUMBER, REQUEST_MESSAGE_ID NUMBER, RESPONSE_MESSAGE_ID NUMBER, PRIMARY KEY (MESSAGE_EXCHANGE_ID)); CREATE TABLE ODE_MESSAGE_ROUTE (MESSAGE_ROUTE_ID NUMBER NOT NULL, CORRELATION_KEY VARCHAR2(255), GROUP_ID VARCHAR2(255), ROUTE_INDEX NUMBER, PROCESS_INSTANCE_ID NUMBER, ROUTE_POLICY VARCHAR2(16), CORR_ID NUMBER, PRIMARY KEY (MESSAGE_ROUTE_ID)); CREATE TABLE ODE_MEX_PROP (ID NUMBER NOT NULL, MEX_ID VARCHAR2(255), PROP_KEY VARCHAR2(255), PROP_VALUE VARCHAR2(2000), PRIMARY KEY (ID)); CREATE TABLE ODE_PARTNER_LINK (PARTNER_LINK_ID NUMBER NOT NULL, MY_EPR CLOB, MY_ROLE_NAME VARCHAR2(255), MY_ROLE_SERVICE_NAME VARCHAR2(255), MY_SESSION_ID VARCHAR2(255), PARTNER_EPR CLOB, PARTNER_LINK_MODEL_ID NUMBER, PARTNER_LINK_NAME VARCHAR2(255), PARTNER_ROLE_NAME VARCHAR2(255), PARTNER_SESSION_ID VARCHAR2(255), SCOPE_ID NUMBER, PRIMARY KEY (PARTNER_LINK_ID)); CREATE TABLE ODE_PROCESS (ID NUMBER NOT NULL, GUID VARCHAR2(255), PROCESS_ID VARCHAR2(255), PROCESS_TYPE VARCHAR2(255), VERSION NUMBER, PRIMARY KEY (ID)); CREATE TABLE ODE_PROCESS_INSTANCE (ID NUMBER NOT NULL, DATE_CREATED TIMESTAMP, EXECUTION_STATE BLOB, FAULT_ID NUMBER, LAST_ACTIVE_TIME TIMESTAMP, LAST_RECOVERY_DATE TIMESTAMP, PREVIOUS_STATE NUMBER, SEQUENCE NUMBER, INSTANCE_STATE NUMBER, INSTANTIATING_CORRELATOR_ID NUMBER, PROCESS_ID NUMBER, ROOT_SCOPE_ID NUMBER, PRIMARY KEY (ID)); CREATE TABLE ODE_SCOPE (SCOPE_ID NUMBER NOT NULL, MODEL_ID NUMBER, SCOPE_NAME VARCHAR2(255), SCOPE_STATE VARCHAR2(255), PROCESS_INSTANCE_ID NUMBER, PARENT_SCOPE_ID NUMBER, PRIMARY KEY (SCOPE_ID)); CREATE TABLE ODE_XML_DATA (XML_DATA_ID NUMBER NOT NULL, DATA CLOB, IS_SIMPLE_TYPE NUMBER, NAME VARCHAR2(255), SCOPE_ID NUMBER, PRIMARY KEY (XML_DATA_ID)); CREATE TABLE ODE_XML_DATA_PROP (ID NUMBER NOT NULL, XML_DATA_ID NUMBER, PROP_KEY VARCHAR2(255), PROP_VALUE VARCHAR2(255), PRIMARY KEY (ID)); CREATE TABLE OPENJPA_SEQUENCE_TABLE (ID NUMBER NOT NULL, SEQUENCE_VALUE NUMBER, PRIMARY KEY (ID)); CREATE TABLE STORE_DU (NAME VARCHAR2(255) NOT NULL, DEPLOYDT TIMESTAMP, DEPLOYER VARCHAR2(255), DIR VARCHAR2(255), PRIMARY KEY (NAME)); CREATE TABLE STORE_PROCESS (PID VARCHAR2(255) NOT NULL, STATE VARCHAR2(255), TYPE VARCHAR2(255), VERSION NUMBER, DU VARCHAR2(255), PRIMARY KEY (PID)); CREATE TABLE STORE_PROCESS_PROP (id NUMBER NOT NULL, PROP_KEY VARCHAR2(255), PROP_VAL VARCHAR2(255), PRIMARY KEY (id)); CREATE TABLE STORE_PROC_TO_PROP (PROCESSCONFDAOIMPL_PID VARCHAR2(255), ELEMENT_ID NUMBER); CREATE TABLE STORE_VERSIONS (id NUMBER NOT NULL, VERSION NUMBER, PRIMARY KEY (id)); CREATE TABLE TASK_ATTACHMENT (ATTACHMENT_ID NUMBER NOT NULL, MESSAGE_EXCHANGE_ID VARCHAR2(255), PRIMARY KEY (ATTACHMENT_ID)); CREATE INDEX I_D_CTVRY__INSTANCE ON ODE_ACTIVITY_RECOVERY (INSTANCE_ID); CREATE INDEX I_D_CR_ST__SCOPE ON ODE_CORRELATION_SET (SCOPE_ID); CREATE INDEX I_D_CRLTR__PROCESS ON ODE_CORRELATOR (PROC_ID); CREATE INDEX I_D_CRPRP__CORRSET ON ODE_CORSET_PROP (CORRSET_ID); CREATE INDEX I_OD_VENT__INSTANCE ON ODE_EVENT (INSTANCE_ID); CREATE INDEX I_OD_VENT__PROCESS ON ODE_EVENT (PROCESS_ID); CREATE INDEX I_OD_MSSG__MESSAGEEXCHANGE ON ODE_MESSAGE (MESSAGE_EXCHANGE_ID); CREATE INDEX I_D_MSHNG__CORRELATOR ON ODE_MESSAGE_EXCHANGE (CORR_ID); CREATE INDEX I_D_MSHNG__PARTNERLINK ON ODE_MESSAGE_EXCHANGE (PARTNER_LINK_ID); CREATE INDEX I_D_MSHNG__PROCESS ON ODE_MESSAGE_EXCHANGE (PROCESS_ID); CREATE INDEX I_D_MSHNG__PROCESSINST ON ODE_MESSAGE_EXCHANGE (PROCESS_INSTANCE_ID); CREATE INDEX I_D_MSHNG__REQUEST ON ODE_MESSAGE_EXCHANGE (REQUEST_MESSAGE_ID); CREATE INDEX I_D_MSHNG__RESPONSE ON ODE_MESSAGE_EXCHANGE (RESPONSE_MESSAGE_ID); CREATE INDEX I_D_MS_RT__CORRELATOR ON ODE_MESSAGE_ROUTE (CORR_ID); CREATE INDEX I_D_MS_RT__PROCESSINST ON ODE_MESSAGE_ROUTE (PROCESS_INSTANCE_ID); CREATE INDEX I_D_MXPRP__MEX ON ODE_MEX_PROP (MEX_ID); CREATE INDEX I_D_PRLNK__SCOPE ON ODE_PARTNER_LINK (SCOPE_ID); CREATE INDEX I_D_PRTNC__FAULT ON ODE_PROCESS_INSTANCE (FAULT_ID); CREATE INDEX I_D_PRTNC__INSTANTIATINGCORR ON ODE_PROCESS_INSTANCE (INSTANTIATING_CORRELATOR_ID); CREATE INDEX I_D_PRTNC__PROCESS ON ODE_PROCESS_INSTANCE (PROCESS_ID); CREATE INDEX I_D_PRTNC__ROOTSCOPE ON ODE_PROCESS_INSTANCE (ROOT_SCOPE_ID); CREATE INDEX I_OD_SCOP__PARENTSCOPE ON ODE_SCOPE (PARENT_SCOPE_ID); CREATE INDEX I_OD_SCOP__PROCESSINSTANCE ON ODE_SCOPE (PROCESS_INSTANCE_ID); CREATE INDEX I_D_XM_DT__SCOPE ON ODE_XML_DATA (SCOPE_ID); CREATE INDEX I_D_XMPRP__XMLDATA ON ODE_XML_DATA_PROP (XML_DATA_ID); CREATE INDEX I_STR_CSS__DU ON STORE_PROCESS (DU); CREATE INDEX I_STR_PRP_ELEMENT ON STORE_PROC_TO_PROP (ELEMENT_ID); CREATE INDEX I_STR_PRP_PROCESSCONFDAOIMPL_P ON STORE_PROC_TO_PROP (PROCESSCONFDAOIMPL_PID); CREATE INDEX I_TSK_MNT_MEXDAO ON TASK_ATTACHMENT (MESSAGE_EXCHANGE_ID);
122.622642
700
0.833513
ef3fa6da4d9a100ed4d08db9fdcb133fb862b707
13,154
h
C
src/include/access/ustore/knl_upage.h
Yanci0/openGauss-server
b2ff10be1367c77f2fda396d6c12ffa3c25874c7
[ "MulanPSL-1.0" ]
360
2020-06-30T14:47:34.000Z
2022-03-31T15:21:53.000Z
src/include/access/ustore/knl_upage.h
Yanci0/openGauss-server
b2ff10be1367c77f2fda396d6c12ffa3c25874c7
[ "MulanPSL-1.0" ]
4
2020-06-30T15:09:16.000Z
2020-07-14T06:20:03.000Z
src/include/access/ustore/knl_upage.h
futurewei-cloud/chogori-opengauss
f43410e1643c887819e718d9baceb9e853ad9574
[ "MulanPSL-1.0" ]
133
2020-06-30T14:47:36.000Z
2022-03-25T15:29:00.000Z
/* ------------------------------------------------------------------------- * * knl_upage.h * the page format of inplace update engine. * * Portions Copyright (c) 2020 Huawei Technologies Co.,Ltd. * Portions Copyright (c) 1996-2012, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * * IDENTIFICATION * src/include/access/ustore/knl_upage.h * ------------------------------------------------------------------------- */ #ifndef KNL_UPAGE_H #define KNL_UPAGE_H #include "storage/buf/bufpage.h" #include "access/ustore/knl_utype.h" #include "access/ustore/knl_utuple.h" #include "utils/rel.h" #define TD_SLOT_INCREMENT_SIZE 2 #define TD_THRESHOLD_FOR_PAGE_SWITCH 32 #define UHEAP_HAS_FREE_LINES 0x0001 /* are there any unused line pointers? */ #define UHEAP_PAGE_FULL 0x0002 /* not enough free space for new \ * tuple? */ #define UHP_ALL_VISIBLE 0x0004 /* all tuples on page are visible to \ * everyone */ #define UHEAP_VALID_FLAG_BITS 0xFFFF /* OR of all valid flag bits */ #define UPageHasFreeLinePointers(_page) (((UHeapPageHeaderData *)(_page))->pd_flags & UHEAP_HAS_FREE_LINES) #define UPageSetHasFreeLinePointers(_page) (((UHeapPageHeaderData *)(_page))->pd_flags |= UHEAP_HAS_FREE_LINES) #define UPageClearHasFreeLinePointers(_page) (((UHeapPageHeaderData *)(_page))->pd_flags &= ~UHEAP_HAS_FREE_LINES) #define UPageIsFull(_page) (((UHeapPageHeaderData *)(_page))->pd_flags & UHEAP_PAGE_FULL) #define UPageSetFull(_page) (((UHeapPageHeaderData *)(_page))->pd_flags |= UHEAP_PAGE_FULL) #define UPageClearFull(_page) (((UHeapPageHeaderData *)(_page))->pd_flags &= ~UHEAP_PAGE_FULL) #define SizeOfUHeapPageHeaderData (sizeof(UHeapPageHeaderData)) #define SizeOfUHeapTDData(_uphdr) ((_uphdr)->td_count * sizeof(TD)) #define UPageGetRowPtrOffset(_page) (SizeOfUHeapPageHeaderData + SizeOfUHeapTDData((UHeapPageHeaderData *)_page)) #define UPageGetRowPtr(_upage, _offsetNumber) \ ((RowPtr *)(((char *)_upage) + SizeOfUHeapPageHeaderData + SizeOfUHeapTDData((UHeapPageHeaderData *)_upage) + \ ((_offsetNumber - 1) * sizeof(RowPtr)))) #define SetNormalRowPointer(_rowptr, _off, _size) \ ((_rowptr)->flags = RP_NORMAL, (_rowptr)->offset = (_off), (_rowptr)->len = (_size)) #define UPageGetRowData(_upage, _rowptr) \ (AssertMacro(PageIsValid(_upage)), AssertMacro(RowPtrHasStorage(_rowptr)), \ (Item)(((char *)(_upage)) + RowPtrGetOffset(_rowptr))) #define PageGetTDPointer(_page) ((char *)((char *)(_page) + SizeOfUHeapPageHeaderData)) #define GetTDCount(_uphdr) ((_uphdr)->td_count) #define UPageGetTDSlotCount(_page) ((UHeapPageHeaderData *)(_page))->td_count #define UPageIsPrunable(_page) \ (TransactionIdIsValid(((UHeapPageHeaderData *)(_page))->pd_prune_xid) && \ !TransactionIdIsInProgress(((UHeapPageHeaderData *)(_page))->pd_prune_xid)) #define UPageIsPrunableWithXminHorizon(_page, _oldestxmin) \ (AssertMacro(TransactionIdIsNormal(_oldestxmin)), \ TransactionIdIsValid(((UHeapPageHeaderData *)(_page))->pd_prune_xid) && \ TransactionIdPrecedes(((UHeapPageHeaderData *)(_page))->pd_prune_xid, _oldestxmin)) #define UPageSetPrunable(_page, _xid) \ do { \ Assert(TransactionIdIsNormal(_xid)); \ if (!TransactionIdIsValid(((UHeapPageHeaderData *)(_page))->pd_prune_xid) || \ TransactionIdPrecedes(_xid, ((UHeapPageHeaderData *)(_page))->pd_prune_xid)) \ ((UHeapPageHeaderData *)(_page))->pd_prune_xid = (_xid); \ } while (0) #define UPageClearPrunable(_page) (((UHeapPageHeaderData *)(_page))->pd_prune_xid = InvalidTransactionId) /* * RowPtr "flags" has these possible states. An UNUSED row pointer is available * for immediate re-use, the other states are not. */ #define RP_UNUSED 0 /* unused (should always have len=0) */ #define RP_NORMAL 1 /* used (should always have len>0) */ #define RP_REDIRECT 2 /* HOT redirect (should have len=0) */ #define RP_DEAD 3 /* dead, may or may not have storage */ /* * Flags used in UHeap. These flags are used in a row pointer of a deleted * row that has no actual storage. These help in fetching the tuple from * undo when required. */ #define ROWPTR_DELETED 0x0001 /* Row is deleted */ #define ROWPTR_XACT_INVALID 0x0002 /* TD slot on tuple got reused */ #define ROWPTR_XACT_PENDING 0x0003 /* transaction that has marked item as \ * unused is pending */ #define VISIBILTY_MASK 0x007F /* 7 bits (1..7) for visibility mask */ #define XACT_SLOT 0x7F80 /* 8 bits (8..15) of offset for transaction \ * slot */ #define XACT_SLOT_MASK 0x0007 /* 7 - mask to retrieve transaction slot */ /* * RowPtrIsUsed * True iff row pointer is in use. */ #define RowPtrIsUsed(_rowptr) ((_rowptr)->flags != RP_UNUSED) #define RowPtrHasStorage(_rowptr) ((_rowptr)->len > 0) #define RowPtrIsNormal(_rowptr) ((_rowptr)->flags == RP_NORMAL) #define RowPtrGetLen(_rowptr) ((_rowptr)->len) #define RowPtrGetOffset(_rowptr) ((_rowptr)->offset) /* * RowPtrSetUnused * Set the row pointer to be UNUSED, with no storage. * Beware of multiple evaluations of itemId! */ #define RowPtrSetUnused(_rowptr) ((_rowptr)->flags = RP_UNUSED, (_rowptr)->offset = 0, (_rowptr)->len = 0) #define RowPtrSetDead(rowptr) ((rowptr)->flags = RP_DEAD, (rowptr)->offset = 0, (rowptr)->len = 0) #define RowPtrSetDeleted(_itemId, _td_slot, _vis_info) \ ((_itemId)->flags = RP_REDIRECT, (_itemId)->offset = ((_itemId)->offset & ~VISIBILTY_MASK) | (_vis_info), \ (_itemId)->offset = ((_itemId)->offset & ~XACT_SLOT) | (_td_slot) << XACT_SLOT_MASK, (_itemId)->len = 0) /* * ItemIdChangeLen * Change the length of itemid. */ #define RowPtrChangeLen(_rowptr, _length) (_rowptr)->len = (_length) /* * RowPtrIsDead * True iff row pointer is in state DEAD. */ #define RowPtrIsDead(_rowptr) ((_rowptr)->flags == RP_DEAD) /* * RowPtrIsDeleted * True iff row pointer is in state REDIRECT. */ #define RowPtrIsDeleted(_rowptr) ((_rowptr)->flags == RP_REDIRECT) /* * RowPtrGetVisibilityInfo * In a REDIRECT pointer, offset field contains the visibility information in * least significant 7 bits. */ #define RowPtrGetVisibilityInfo(_rowptr) ((_rowptr)->offset & VISIBILTY_MASK) #define RowPtrHasPendingXact(_rowptr) (((_rowptr)->offset & VISIBILTY_MASK) & ROWPTR_XACT_PENDING) #define RowPtrSetInvalidXact(_rowptr) ((_rowptr)->offset = ((_rowptr)->offset & ~VISIBILTY_MASK) | ROWPTR_XACT_INVALID) #define RowPtrResetInvalidXact(_rowptr) \ ((_rowptr)->offset = ((_rowptr)->offset & ~VISIBILTY_MASK) & ~(ROWPTR_XACT_INVALID)) /* * RowPtrGetTDSlot * In a REDIRECT pointer, offset contains the TD slot information in * most significant 8 bits. */ #define RowPtrGetTDSlot(_rowptr) (((_rowptr)->offset & XACT_SLOT) >> XACT_SLOT_MASK) /* * MaxUHeapTupFixedSize - Fixed size for tuple, this is computed based * on data alignment. */ #define MaxUHeapTupFixedSize (SizeOfUHeapDiskTupleData + sizeof(ItemIdData)) /* MaxUHeapPageFixedSpace - Maximum fixed size for page */ #define MaxUHeapPageFixedSpace(relation) \ (BLCKSZ - SizeOfUHeapPageHeaderData - (RelationGetInitTd(relation) * sizeof(TD)) - UHEAP_SPECIAL_SIZE) #define MaxPossibleUHeapPageFixedSpace (BLCKSZ - SizeOfUHeapPageHeaderData - UHEAP_SPECIAL_SIZE) #define MaxUHeapToastPageFixedSpace \ (BLCKSZ - SizeOfUHeapPageHeaderData - (UHEAP_DEFAULT_TOAST_TD_COUNT * sizeof(TD)) - UHEAP_SPECIAL_SIZE) /* * MaxUHeapTuplesPerPage is an upper bound on the number of tuples that can * fit on one uheap page. */ #define MaxUHeapTuplesPerPage(relation) ((int)((MaxUHeapPageFixedSpace(relation)) / (MaxUHeapTupFixedSize))) #define MaxPossibleUHeapTuplesPerPage ((int)((MaxPossibleUHeapPageFixedSpace) / (MaxUHeapTupFixedSize))) #define CalculatedMaxUHeapTuplesPerPage(tdSlots) \ ((int)((BLCKSZ - SizeOfUHeapPageHeaderData - (tdSlots * sizeof(TD)) - UHEAP_SPECIAL_SIZE) \ / (MaxUHeapTupFixedSize))) #define UPageGetPruneXID(_page) ((UHeapPageHeaderData)(_page))->pd_prune_xid const uint8 UHEAP_DEFAULT_TOAST_TD_COUNT = 4; const uint8 UHEAP_MAX_ATTR_PAD = 3; /* * the disk page format of inplace table * * +---------------------+----------------------------+ * | UHeapPageHeaderData | TD1 TD2 TD3 ...TDN | * +-----------+----+---------------------------------+ * | RowPtr1 RowPtr2 RowPtr3... RowPtrN | * +-----------+--------------------------------------+ * | ^ pd_lower | * | | * | v pd_upper | * +-------------+------------------------------------+ * | | rowN ... | * +-------------+------------------+-----------------+ * | ... row3 row2 row1 | "special space" | * +--------------------------------+-----------------+ * ^ special */ typedef struct RowPtr { unsigned offset : 15, /* offset to row (from start of page) */ flags : 2, /* state of row pointer */ len : 15; /* byte length of row */ } RowPtr; typedef enum UPageType { UPAGE_HEAP = 0, UPAGE_INDEX, UPAGE_TOAST } UPageType; typedef struct UHeapPageHeaderData { PageXLogRecPtr pd_lsn; uint16 pd_checksum; uint16 pd_flags; /* Various page attribute flags e.g. free rowptrs */ uint16 pd_lower; /* Start of the free space between row pointers and row data */ uint16 pd_upper; uint16 pd_special; /* Pointer to AM-specific per-page data */ uint16 pd_pagesize_version; /* Page version identifier */ uint16 potential_freespace; /* Potential space from deleted and updated tuples */ uint16 td_count; /* Number of TD entries on the page */ TransactionId pd_prune_xid; /* oldest prunable XID, or zero if none */ TransactionId pd_xid_base; TransactionId pd_multi_base; uint32 reserved; } UHeapPageHeaderData; typedef struct UHeapPageTDData { TD td_info[1]; } UHeapPageTDData; inline bool UPageIsEmpty(UHeapPageHeaderData *phdr, uint16 relTdCount) { uint16 td_count = phdr->td_count; Assert(td_count >= relTdCount); uint16 start = (uint16)SizeOfUHeapPageHeaderData + (td_count * sizeof(TD)); return phdr->pd_lower <= start; } /* * Given a page, it stores contiguous ranges of free offsets that can be * used/reused in the same page. This is used in UHeapMultiInsert to decide * the number of undo records needs to be prepared before entering into critical * section. */ typedef struct UHeapFreeOffsetRanges { OffsetNumber startOffset[MaxOffsetNumber]; OffsetNumber endOffset[MaxOffsetNumber]; int nranges; } UHeapFreeOffsetRanges; typedef struct UHeapBufferPage { Buffer buffer; Page page; } UHeapBufferPage; template<UPageType pagetype> void UPageInit(Page page, Size pageSize, Size specialSize, uint8 tdSlots = UHEAP_DEFAULT_TD); template<> void UPageInit<UPageType::UPAGE_HEAP>(Page page, Size page_size, Size special_size, uint8 tdSlots); template<> void UPageInit<UPageType::UPAGE_TOAST>(Page page, Size page_size, Size special_size, uint8 tdSlots); OffsetNumber UPageAddItem(Relation relation, UHeapBufferPage *bufpage, Item item, Size size, OffsetNumber offsetNumber, bool overwrite); UHeapTuple UHeapGetTuple(Relation relation, Buffer buffer, OffsetNumber offnum, UHeapTuple freebuf = NULL); UHeapTuple UHeapGetTuplePartial(Relation relation, Buffer buffer, OffsetNumber offnum, AttrNumber lastVar = -1, bool *boolArr = NULL); Size PageGetUHeapFreeSpace(Page page); Size PageGetExactUHeapFreeSpace(Page page); extern UHeapFreeOffsetRanges *UHeapGetUsableOffsetRanges(Buffer buffer, UHeapTuple *tuples, int ntuples, Size saveFreeSpace); void UHeapRecordPotentialFreeSpace(Relation rel, Buffer buffer, int delta); /* * UPageGetMaxOffsetNumber * Returns the maximum offset number used by the given page. * Since offset numbers are 1-based, this is also the number * of items on the page. * * NOTE: if the page is not initialized (pd_lower == 0), we must * return zero to ensure sane behavior. */ inline OffsetNumber UHeapPageGetMaxOffsetNumber(char *upage) { OffsetNumber maxoff = InvalidOffsetNumber; UHeapPageHeaderData *upghdr = (UHeapPageHeaderData *)upage; if (upghdr->pd_lower <= SizeOfUHeapPageHeaderData) maxoff = 0; else maxoff = (upghdr->pd_lower - (SizeOfUHeapPageHeaderData + SizeOfUHeapTDData(upghdr))) / sizeof(RowPtr); return maxoff; } #endif
40.978193
119
0.657747
6b2b3ba092c3e58f6f58fa2e2837a154ce59019e
1,704
js
JavaScript
src/components/pages/DataViz/DetailsInfo.js
joowoonk/Labs25-Bridges_to_Prosperity-TeamB-fe
f26598e96013ed1eed12585d075b3b393217bbed
[ "MIT" ]
1
2020-08-10T19:59:02.000Z
2020-08-10T19:59:02.000Z
src/components/pages/DataViz/DetailsInfo.js
joowoonk/Labs25-Bridges_to_Prosperity-TeamB-fe
f26598e96013ed1eed12585d075b3b393217bbed
[ "MIT" ]
36
2020-08-10T19:44:34.000Z
2020-09-23T21:27:40.000Z
src/components/pages/DataViz/DetailsInfo.js
joowoonk/Labs25-Bridges_to_Prosperity-TeamB-fe
f26598e96013ed1eed12585d075b3b393217bbed
[ "MIT" ]
2
2020-10-01T00:16:24.000Z
2021-04-07T22:55:54.000Z
import React, { useContext } from 'react'; import { BridgesContext } from '../../../state/bridgesContext'; import Draggable from 'react-draggable'; const DetailsInfo = () => { const { detailsData, setDetailsData } = useContext(BridgesContext); return ( <Draggable> <div className="detailsContainer"> <div className="closeButton" onKeyDown={e => { console.log(e); }} onClick={() => setDetailsData(null)} > <i className="fas fa-times"></i> </div> <div className="detailsInfo"> <h2> <strong>{detailsData.bridge_site_name}</strong> </h2> <div className="bridge-image"> {detailsData.bridge_image ? ( <div className="bridge-image"> <img alt="bridge_image" src={`${detailsData.bridge_image}`} /> </div> ) : ( <div className="bridge-image"> <img alt="bridge_image_needed" src={require('../../../styles/imgs/bridgeIconGreenBig.png')} /> Bridge image is unavailiable </div> )} </div> {/* <p>Bridge Site Name: {detailsData.bridge_site_name}</p> */} <div> <p>Project Stage: {detailsData.project_stage}</p> <p>Province: {detailsData.province}</p> <p>District: {detailsData.district}</p> <p>Bridge Type: {detailsData.bridge_type}</p> <p>Project Sub Stage: {detailsData.sub_stage}</p> </div> </div> </div> </Draggable> ); }; export default DetailsInfo;
30.981818
78
0.509977
4f539b1dad1e87ec8abbd079d78977e03bfc5e2e
2,527
dart
Dart
flutter/sample/lib/app_analytics.dart
xclud/docker-images-flutter
5505e86dea66711be80d4a248854257ace5fa7aa
[ "MIT" ]
1
2021-12-04T22:04:27.000Z
2021-12-04T22:04:27.000Z
flutter/sample/lib/app_analytics.dart
xclud/docker-images-flutter
5505e86dea66711be80d4a248854257ace5fa7aa
[ "MIT" ]
null
null
null
flutter/sample/lib/app_analytics.dart
xclud/docker-images-flutter
5505e86dea66711be80d4a248854257ace5fa7aa
[ "MIT" ]
null
null
null
import 'package:flutter/material.dart'; void sendNetworkLogEvent({@required String name, @required int statusCode}) { // firebase.observer.analytics // .logEvent(name: name, parameters: {'statusCode': statusCode}); } void logAppOpen() { // firebase.analytics.logAppOpen(); } void logSignUp({@required String signUpMethod}) { // firebase.analytics.logSignUp(signUpMethod: signUpMethod); } void logShare( {@required String contentType, @required itemId, @required method}) { // firebase.analytics // .logShare(contentType: contentType, itemId: itemId, method: method); } void logAddPass({@required String phoneNumber}) { // firebase.analytics // .logEvent(name: 'add_pass', parameters: {'phoneNumber': phoneNumber}); } void logRemovePass({@required String phoneNumber}) { // firebase.analytics // .logEvent(name: 'remove_pass', parameters: {'phoneNumber': phoneNumber}); } void logChangePass({@required String phoneNumber}) { // firebase.analytics // .logEvent(name: 'change_pass', parameters: {'phoneNumber': phoneNumber}); } void logPassType({@required String phoneNumber, @required String type}) { // firebase.analytics.logEvent( // name: 'pass_type', // parameters: {'phoneNumber': phoneNumber, 'type': type}); } void logLock({@required String phoneNumber}) { // firebase.analytics // .logEvent(name: 'lock', parameters: {'phoneNumber': phoneNumber}); } void logUnlock({@required String phoneNumber}) { // firebase.analytics // .logEvent(name: 'unlock', parameters: {'phoneNumber': phoneNumber}); } void logForgetPass({@required String phoneNumber}) { // firebase.analytics // .logEvent(name: 'forget_pass', parameters: {'phoneNumber': phoneNumber}); } void logLogin({@required String phoneNumber}) { // firebase.analytics // .logEvent(name: 'login', parameters: {'phoneNumber': phoneNumber}); } void logLogout({@required String phoneNumber}) { // firebase.analytics // .logEvent(name: 'logout', parameters: {'phoneNumber': phoneNumber}); } void setUserProperty({@required String name, @required String value}) { // firebase.analytics.setUserProperty(name: name, value: value); } void setAgeUserProperty({@required String value}) { setUserProperty(name: 'sun_age', value: value); } void setProvinceUserProperty({@required String value}) { setUserProperty(name: 'sun_province', value: value); } void setCityUserProperty({@required String value}) { setUserProperty(name: 'sun_city', value: value); }
30.445783
82
0.704393
25a18ecae97d3840c60996b9479525f12618a79e
1,362
cs
C#
UnityProject/Exit With/Assets/ExitWith/Scripts/PlayerState.cs
sumogri/ExitWith
d1ca7540cd8eed61231e12ad27d97fae54cab3da
[ "Apache-2.0", "MIT" ]
null
null
null
UnityProject/Exit With/Assets/ExitWith/Scripts/PlayerState.cs
sumogri/ExitWith
d1ca7540cd8eed61231e12ad27d97fae54cab3da
[ "Apache-2.0", "MIT" ]
null
null
null
UnityProject/Exit With/Assets/ExitWith/Scripts/PlayerState.cs
sumogri/ExitWith
d1ca7540cd8eed61231e12ad27d97fae54cab3da
[ "Apache-2.0", "MIT" ]
null
null
null
using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UniRx; public static class PlayerState { public static ReactiveProperty<int> HP { get; private set; } = new ReactiveProperty<int>(3); public static int Place { get { return placeId; } set { onPlaceChangeSubject.OnNext(value); placeId = value; } } private static int placeId = 0; public static IObservable<int> OnPlaceChange => onPlaceChangeSubject; private static BehaviorSubject<int> onPlaceChangeSubject = new BehaviorSubject<int>(19); public static ReactiveCollection<int> Items { get; private set; } = new ReactiveCollection<int>(); public static ReactiveProperty<bool> IsCharming { get; private set; } = new ReactiveProperty<bool>(true); public static ReactiveProperty<int> TimeStep { get; private set; } = new ReactiveProperty<int>(0); public static bool IsEnd { get; set; } = false; public static bool IsTrueEnd { get; set; } = false; public static void InitState() { HP = new ReactiveProperty<int>(3); onPlaceChangeSubject = new BehaviorSubject<int>(19); Items = new ReactiveCollection<int>(); IsCharming = new ReactiveProperty<bool>(true); TimeStep = new ReactiveProperty<int>(); IsEnd = false; } }
37.833333
109
0.67768
ed3bb5f11f4faf356810b32f0f096cfa8011a4ed
15,817
h
C
src/Services.h
ESPdude/HomeSpan
9a4ff40e9f8376655e5c4db1ff16482bfb5a4709
[ "MIT" ]
null
null
null
src/Services.h
ESPdude/HomeSpan
9a4ff40e9f8376655e5c4db1ff16482bfb5a4709
[ "MIT" ]
null
null
null
src/Services.h
ESPdude/HomeSpan
9a4ff40e9f8376655e5c4db1ff16482bfb5a4709
[ "MIT" ]
null
null
null
/********************************************************************************* * MIT License * * Copyright (c) 2020-2021 Gregg E. Berman * * https://github.com/HomeSpan/HomeSpan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. * ********************************************************************************/ /////////////////////////////////// // SPAN SERVICES (HAP Chapter 8) // /////////////////////////////////// // Macros to define vectors of required and optional characteristics for each Span Service structure #define REQ(name) req.push_back(&homeSpan.chr.name) #define OPT(name) opt.push_back(&homeSpan.chr.name) namespace Service { struct AccessoryInformation : SpanService { AccessoryInformation() : SpanService{"3E","AccessoryInformation"}{ REQ(FirmwareRevision); REQ(Identify); REQ(Manufacturer); REQ(Model); REQ(Name); REQ(SerialNumber); OPT(HardwareRevision); }}; struct AirPurifier : SpanService { AirPurifier() : SpanService{"BB","AirPurifier"}{ REQ(Active); REQ(CurrentAirPurifierState); REQ(TargetAirPurifierState); OPT(Name); OPT(RotationSpeed); OPT(SwingMode); OPT(LockPhysicalControls); }}; struct AirQualitySensor : SpanService { AirQualitySensor() : SpanService{"8D","AirQualitySensor"}{ REQ(AirQuality); OPT(Name); OPT(OzoneDensity); OPT(NitrogenDioxideDensity); OPT(SulphurDioxideDensity); OPT(PM25Density); OPT(PM10Density); OPT(VOCDensity); OPT(StatusActive); OPT(StatusFault); OPT(StatusTampered); OPT(StatusLowBattery); }}; struct BatteryService : SpanService { BatteryService() : SpanService{"96","BatteryService"}{ REQ(BatteryLevel); REQ(ChargingState); REQ(StatusLowBattery); OPT(Name); }}; struct CarbonDioxideSensor : SpanService { CarbonDioxideSensor() : SpanService{"97","CarbonDioxideSensor"}{ REQ(CarbonDioxideDetected); OPT(Name); OPT(StatusActive); OPT(StatusFault); OPT(StatusTampered); OPT(StatusLowBattery); OPT(CarbonDioxideLevel); OPT(CarbonDioxidePeakLevel); }}; struct CarbonMonoxideSensor : SpanService { CarbonMonoxideSensor() : SpanService{"7F","CarbonMonoxideSensor"}{ REQ(CarbonMonoxideDetected); OPT(Name); OPT(StatusActive); OPT(StatusFault); OPT(StatusTampered); OPT(StatusLowBattery); OPT(CarbonMonoxideLevel); OPT(CarbonMonoxidePeakLevel); }}; struct ContactSensor : SpanService { ContactSensor() : SpanService{"80","ContactSensor"}{ REQ(ContactSensorState); OPT(Name); OPT(StatusActive); OPT(StatusFault); OPT(StatusTampered); OPT(StatusLowBattery); }}; struct Door : SpanService { Door() : SpanService{"81","Door"}{ REQ(CurrentPosition); REQ(TargetPosition); REQ(PositionState); OPT(Name); OPT(HoldPosition); OPT(ObstructionDetected); }}; struct Doorbell : SpanService { Doorbell() : SpanService{"121","Doorbell"}{ REQ(ProgrammableSwitchEvent); OPT(Name); OPT(Volume); OPT(Brightness); }}; struct Fan : SpanService { Fan() : SpanService{"B7","Fan"}{ REQ(Active); OPT(Name); OPT(CurrentFanState); OPT(TargetFanState); OPT(RotationDirection); OPT(RotationSpeed); OPT(SwingMode); OPT(LockPhysicalControls); }}; struct Faucet : SpanService { Faucet() : SpanService{"D7","Faucet"}{ REQ(Active); OPT(StatusFault); OPT(Name); }}; struct FilterMaintenance : SpanService { FilterMaintenance() : SpanService{"BA","FilterMaintenance"}{ REQ(FilterChangeIndication); OPT(Name); OPT(FilterLifeLevel); OPT(ResetFilterIndication); }}; struct GarageDoorOpener : SpanService { GarageDoorOpener() : SpanService{"41","GarageDoorOpener"}{ REQ(CurrentDoorState); REQ(TargetDoorState); REQ(ObstructionDetected); OPT(LockCurrentState); OPT(LockTargetState); OPT(Name); }}; struct HAPProtocolInformation : SpanService { HAPProtocolInformation() : SpanService{"A2","HAPProtocolInformation"}{ REQ(Version); }}; struct HeaterCooler : SpanService { HeaterCooler() : SpanService{"BC","HeaterCooler"}{ REQ(Active); REQ(CurrentTemperature); REQ(CurrentHeaterCoolerState); REQ(TargetHeaterCoolerState); OPT(Name); OPT(RotationSpeed); OPT(TemperatureDisplayUnits); OPT(SwingMode); OPT(CoolingThresholdTemperature); OPT(HeatingThresholdTemperature); OPT(LockPhysicalControls); }}; struct HumidifierDehumidifier : SpanService { HumidifierDehumidifier() : SpanService{"BD","HumidifierDehumidifier"}{ REQ(Active); REQ(CurrentRelativeHumidity); REQ(CurrentHumidifierDehumidifierState); REQ(TargetHumidifierDehumidifierState); OPT(Name); OPT(RelativeHumidityDehumidifierThreshold); OPT(RelativeHumidityHumidifierThreshold); OPT(RotationSpeed); OPT(SwingMode); OPT(WaterLevel); OPT(LockPhysicalControls); }}; struct HumiditySensor : SpanService { HumiditySensor() : SpanService{"82","HumiditySensor"}{ REQ(CurrentRelativeHumidity); OPT(Name); OPT(StatusActive); OPT(StatusFault); OPT(StatusTampered); OPT(StatusLowBattery); }}; struct IrrigationSystem : SpanService { IrrigationSystem() : SpanService{"CF","IrrigationSystem"}{ REQ(Active); REQ(ProgramMode); REQ(InUse); OPT(RemainingDuration); OPT(Name); OPT(StatusFault); }}; struct LeakSensor : SpanService { LeakSensor() : SpanService{"83","LeakSensor"}{ REQ(LeakDetected); OPT(Name); OPT(StatusActive); OPT(StatusFault); OPT(StatusTampered); OPT(StatusLowBattery); }}; struct LightBulb : SpanService { LightBulb() : SpanService{"43","LightBulb"}{ REQ(On); OPT(Brightness); OPT(Hue); OPT(Name); OPT(Saturation); OPT(ColorTemperature); }}; struct LightSensor : SpanService { LightSensor() : SpanService{"84","LightSensor"}{ REQ(CurrentAmbientLightLevel); OPT(Name); OPT(StatusActive); OPT(StatusFault); OPT(StatusTampered); OPT(StatusLowBattery); }}; struct LockMechanism : SpanService { LockMechanism() : SpanService{"45","LockMechanism"}{ REQ(LockCurrentState); REQ(LockTargetState); OPT(Name); }}; struct Microphone : SpanService { Microphone() : SpanService{"112","Microphone"}{ REQ(Mute); OPT(Name); OPT(Volume); }}; struct MotionSensor : SpanService { MotionSensor() : SpanService{"85","MotionSensor"}{ REQ(MotionDetected); OPT(Name); OPT(StatusActive); OPT(StatusFault); OPT(StatusTampered); OPT(StatusLowBattery); }}; struct OccupancySensor : SpanService { OccupancySensor() : SpanService{"86","OccupancySensor"}{ REQ(OccupancyDetected); OPT(Name); OPT(StatusActive); OPT(StatusFault); OPT(StatusTampered); OPT(StatusLowBattery); }}; struct Outlet : SpanService { Outlet() : SpanService{"47","Outlet"}{ REQ(On); REQ(OutletInUse); OPT(Name); }}; struct SecuritySystem : SpanService { SecuritySystem() : SpanService{"7E","SecuritySystem"}{ REQ(SecuritySystemCurrentState); REQ(SecuritySystemTargetState); OPT(Name); OPT(SecuritySystemAlarmType); OPT(StatusFault); OPT(StatusTampered); }}; struct ServiceLabel : SpanService { ServiceLabel() : SpanService{"CC","ServiceLabel"}{ REQ(ServiceLabelNamespace); }}; struct Slat : SpanService { Slat() : SpanService{"B9","Slat"}{ REQ(CurrentSlatState); REQ(SlatType); OPT(Name); OPT(SwingMode); OPT(CurrentTiltAngle); OPT(TargetTiltAngle); }}; struct SmokeSensor : SpanService { SmokeSensor() : SpanService{"87","SmokeSensor"}{ REQ(SmokeDetected); OPT(Name); OPT(StatusActive); OPT(StatusFault); OPT(StatusTampered); OPT(StatusLowBattery); }}; struct Speaker : SpanService { Speaker() : SpanService{"113","Speaker"}{ REQ(Mute); OPT(Name); OPT(Volume); }}; struct StatelessProgrammableSwitch : SpanService { StatelessProgrammableSwitch() : SpanService{"89","StatelessProgrammableSwitch"}{ REQ(ProgrammableSwitchEvent); OPT(Name); OPT(ServiceLabelIndex); }}; struct Switch : SpanService { Switch() : SpanService{"49","Switch"}{ REQ(On); OPT(Name); }}; struct TemperatureSensor : SpanService { TemperatureSensor() : SpanService{"8A","TemperatureSensor"}{ REQ(CurrentTemperature); OPT(Name); OPT(StatusActive); OPT(StatusFault); OPT(StatusTampered); OPT(StatusLowBattery); }}; struct Thermostat : SpanService { Thermostat() : SpanService{"4A","Thermostat"}{ REQ(CurrentHeatingCoolingState); REQ(TargetHeatingCoolingState); REQ(CurrentTemperature); REQ(TargetTemperature); REQ(TemperatureDisplayUnits); OPT(CoolingThresholdTemperature); OPT(CurrentRelativeHumidity); OPT(HeatingThresholdTemperature); OPT(Name); OPT(TargetRelativeHumidity); }}; struct Valve : SpanService { Valve() : SpanService{"D0","Valve"}{ REQ(Active); REQ(InUse); REQ(ValveType); OPT(SetDuration); OPT(RemainingDuration); OPT(IsConfigured); OPT(ServiceLabelIndex); OPT(StatusFault); OPT(Name); }}; struct Window : SpanService { Window() : SpanService{"8B","Window"}{ REQ(CurrentPosition); REQ(TargetPosition); REQ(PositionState); OPT(Name); OPT(HoldPosition); OPT(ObstructionDetected); }}; struct WindowCovering : SpanService { WindowCovering() : SpanService{"8C","WindowCovering"}{ REQ(TargetPosition); REQ(CurrentPosition); OPT(PositionState); OPT(Name); OPT(HoldPosition); OPT(CurrentHorizontalTiltAngle); OPT(TargetHorizontalTiltAngle); OPT(CurrentVerticalTiltAngle); OPT(TargetVerticalTiltAngle); OPT(ObstructionDetected); }}; } ////////////////////////////////////////// // SPAN CHARACTERISTICS (HAP Chapter 9) // ////////////////////////////////////////// // Macro to define Span Characteristic structures based on name of HAP Characteristic (see HAPConstants.h), its type (e.g. int, double) and its default value #define CREATE_CHAR(CHR,TYPE,DEFVAL) struct CHR : SpanCharacteristic { CHR(TYPE value=DEFVAL) : SpanCharacteristic{homeSpan.chr.CHR.id, homeSpan.chr.CHR.perms,(TYPE)value, homeSpan.chr.CHR.name}{} } namespace Characteristic { CREATE_CHAR(Active,uint8_t,0); CREATE_CHAR(AirQuality,uint8_t,0); CREATE_CHAR(BatteryLevel,uint8_t,0); CREATE_CHAR(Brightness,int,0); CREATE_CHAR(CarbonMonoxideLevel,double,0); CREATE_CHAR(CarbonMonoxidePeakLevel,double,0); CREATE_CHAR(CarbonMonoxideDetected,uint8_t,0); CREATE_CHAR(CarbonDioxideLevel,double,0); CREATE_CHAR(CarbonDioxidePeakLevel,double,0); CREATE_CHAR(CarbonDioxideDetected,uint8_t,0); CREATE_CHAR(ChargingState,uint8_t,0); CREATE_CHAR(CoolingThresholdTemperature,double,10); CREATE_CHAR(ColorTemperature,uint32_t,50); CREATE_CHAR(ContactSensorState,uint8_t,1); CREATE_CHAR(CurrentAmbientLightLevel,double,1); CREATE_CHAR(CurrentHorizontalTiltAngle,int,0); CREATE_CHAR(CurrentAirPurifierState,uint8_t,1); CREATE_CHAR(CurrentSlatState,uint8_t,0); CREATE_CHAR(CurrentPosition,uint8_t,0); CREATE_CHAR(CurrentVerticalTiltAngle,int,0); CREATE_CHAR(CurrentHumidifierDehumidifierState,uint8_t,1); CREATE_CHAR(CurrentDoorState,uint8_t,1); CREATE_CHAR(CurrentFanState,uint8_t,1); CREATE_CHAR(CurrentHeatingCoolingState,uint8_t,0); CREATE_CHAR(CurrentHeaterCoolerState,uint8_t,1); CREATE_CHAR(CurrentRelativeHumidity,double,0); CREATE_CHAR(CurrentTemperature,double,0); CREATE_CHAR(CurrentTiltAngle,int,0); CREATE_CHAR(FilterLifeLevel,double,0); CREATE_CHAR(FilterChangeIndication,uint8_t,0); CREATE_CHAR(FirmwareRevision,const char *,"1.0.0"); CREATE_CHAR(HardwareRevision,const char *,"1.0.0"); CREATE_CHAR(HeatingThresholdTemperature,double,16); CREATE_CHAR(HoldPosition,boolean,false); CREATE_CHAR(Hue,double,0); CREATE_CHAR(Identify,boolean,false); CREATE_CHAR(InUse,uint8_t,0); CREATE_CHAR(IsConfigured,uint8_t,0); CREATE_CHAR(LeakDetected,uint8_t,0); CREATE_CHAR(LockCurrentState,uint8_t,0); CREATE_CHAR(LockPhysicalControls,uint8_t,0); CREATE_CHAR(LockTargetState,uint8_t,0); CREATE_CHAR(Manufacturer,const char *,"HomeSpan"); CREATE_CHAR(Model,const char *,"HomeSpan-ESP32"); CREATE_CHAR(MotionDetected,boolean,false); CREATE_CHAR(Mute,boolean,false); CREATE_CHAR(Name,const char *,"unnamed"); CREATE_CHAR(NitrogenDioxideDensity,double,0); CREATE_CHAR(ObstructionDetected,boolean,false); CREATE_CHAR(PM25Density,double,0); CREATE_CHAR(OccupancyDetected,uint8_t,0); CREATE_CHAR(OutletInUse,boolean,false); CREATE_CHAR(On,boolean,false); CREATE_CHAR(OzoneDensity,double,0); CREATE_CHAR(PM10Density,double,0); CREATE_CHAR(PositionState,uint8_t,2); CREATE_CHAR(ProgramMode,uint8_t,0); CREATE_CHAR(ProgrammableSwitchEvent,uint8_t,0); CREATE_CHAR(RelativeHumidityDehumidifierThreshold,double,50); CREATE_CHAR(RelativeHumidityHumidifierThreshold,double,50); CREATE_CHAR(RemainingDuration,uint32_t,60); CREATE_CHAR(ResetFilterIndication,uint8_t,0); CREATE_CHAR(RotationDirection,int,0); CREATE_CHAR(RotationSpeed,double,0); CREATE_CHAR(Saturation,double,0); CREATE_CHAR(SecuritySystemAlarmType,uint8_t,0); CREATE_CHAR(SecuritySystemCurrentState,uint8_t,3); CREATE_CHAR(SecuritySystemTargetState,uint8_t,3); CREATE_CHAR(SerialNumber,const char *,"HS-12345"); CREATE_CHAR(ServiceLabelIndex,uint8_t,1); CREATE_CHAR(ServiceLabelNamespace,uint8_t,1); CREATE_CHAR(SlatType,uint8_t,0); CREATE_CHAR(SmokeDetected,uint8_t,0); CREATE_CHAR(StatusActive,boolean,true); CREATE_CHAR(StatusFault,uint8_t,0); CREATE_CHAR(StatusJammed,uint8_t,0); CREATE_CHAR(StatusLowBattery,uint8_t,0); CREATE_CHAR(StatusTampered,uint8_t,0); CREATE_CHAR(SulphurDioxideDensity,double,0); CREATE_CHAR(SwingMode,uint8_t,0); CREATE_CHAR(TargetAirPurifierState,uint8_t,1); CREATE_CHAR(TargetFanState,uint8_t,1); CREATE_CHAR(TargetTiltAngle,int,0); CREATE_CHAR(SetDuration,uint32_t,60); CREATE_CHAR(TargetHorizontalTiltAngle,int,0); CREATE_CHAR(TargetHumidifierDehumidifierState,uint8_t,0); CREATE_CHAR(TargetPosition,uint8_t,0); CREATE_CHAR(TargetDoorState,uint8_t,1); CREATE_CHAR(TargetHeatingCoolingState,uint8_t,0); CREATE_CHAR(TargetRelativeHumidity,double,0); CREATE_CHAR(TargetTemperature,double,16); CREATE_CHAR(TemperatureDisplayUnits,uint8_t,0); CREATE_CHAR(TargetVerticalTiltAngle,int,0); CREATE_CHAR(ValveType,uint8_t,0); CREATE_CHAR(Version,const char *,"1.0.0"); CREATE_CHAR(VOCDensity,double,0); CREATE_CHAR(Volume,uint8_t,0); CREATE_CHAR(WaterLevel,double,0); }
32.279592
198
0.706329
12765627a581f05f66638f83792c2d75b2e5b79d
2,702
cs
C#
src/Hybrid.AspNetCore/AspNetCorePack.cs
ArcherTrister/ESoftor
8826524b9f167de02e263c63ae1c846235847cf3
[ "Apache-2.0" ]
null
null
null
src/Hybrid.AspNetCore/AspNetCorePack.cs
ArcherTrister/ESoftor
8826524b9f167de02e263c63ae1c846235847cf3
[ "Apache-2.0" ]
null
null
null
src/Hybrid.AspNetCore/AspNetCorePack.cs
ArcherTrister/ESoftor
8826524b9f167de02e263c63ae1c846235847cf3
[ "Apache-2.0" ]
null
null
null
// ----------------------------------------------------------------------- // <copyright file="AspNetCorePack.cs" company="Hybrid开源团队"> // Copyright (c) 2014-2018 Hybrid. All rights reserved. // </copyright> // <site>https://www.lxking.cn</site> // <last-editor>ArcherTrister</last-editor> // <last-date>2018-06-23 15:22</last-date> // ----------------------------------------------------------------------- using Hybrid.AspNetCore.Http; using Hybrid.AspNetCore.Mvc; using Hybrid.Core.Packs; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; using System.ComponentModel; using System.Security.Principal; namespace Hybrid.AspNetCore { /// <summary> /// AspNetCore模块 /// </summary> [Description("AspNetCore模块")] public class AspNetCorePack : HybridPack { /// <summary> /// 获取 模块级别 /// </summary> public override PackLevel Level => PackLevel.Core; /// <summary> /// 获取 模块启动顺序,模块启动的顺序先按级别启动,级别内部再按此顺序启动 /// </summary> public override int Order => 2; /// <summary> /// 将模块服务添加到依赖注入服务容器中 /// </summary> /// <param name="services">依赖注入服务容器</param> /// <returns></returns> public override IServiceCollection AddServices(IServiceCollection services) { //services.TryAddSingleton<IHybridDefaultUIAttributeTypeFinder, HybridDefaultUIAttributeTypeFinder>(); services.AddHttpContextAccessor(); services.TryAddSingleton<IHostHttpCrypto, HostHttpCrypto>(); //注入当前用户,替换Thread.CurrentPrincipal的作用 services.AddTransient<IPrincipal>(provider => { IHttpContextAccessor accessor = provider.GetService<IHttpContextAccessor>(); return accessor?.HttpContext?.User; }); return services; } ///// <summary> ///// 将模块服务添加到依赖注入服务容器中【自动模式】 ///// </summary> ///// <param name="services">依赖注入服务容器</param> ///// <returns></returns> //public override IServiceCollection AddAutoServices(IServiceCollection services) //{ // services.AddHttpContextAccessor(); // services.TryAddSingleton<IHostHttpCrypto, HostHttpCrypto>(); // //注入当前用户,替换Thread.CurrentPrincipal的作用 // services.AddTransient<IPrincipal>(provider => // { // IHttpContextAccessor accessor = provider.GetService<IHttpContextAccessor>(); // return accessor?.HttpContext?.User; // }); // return services; //} } }
33.775
114
0.584012
dfbbee6e0f4a08a0e9bf88e1aa8bce87280ec9c0
940
cs
C#
sdk/keyvault/samples/keyvaultproxy/tests/LiveFactAttribute.cs
gjy5885/azure-sdk-for-net
5491b723c94176509a91c340485f10009189ac72
[ "MIT" ]
3,268
2015-01-08T04:21:52.000Z
2022-03-31T11:10:48.000Z
sdk/keyvault/samples/keyvaultproxy/tests/LiveFactAttribute.cs
gjy5885/azure-sdk-for-net
5491b723c94176509a91c340485f10009189ac72
[ "MIT" ]
18,748
2015-01-06T00:12:22.000Z
2022-03-31T23:55:50.000Z
sdk/keyvault/samples/keyvaultproxy/tests/LiveFactAttribute.cs
gjy5885/azure-sdk-for-net
5491b723c94176509a91c340485f10009189ac72
[ "MIT" ]
4,179
2015-01-07T20:13:22.000Z
2022-03-31T09:09:02.000Z
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using Xunit; using Xunit.Sdk; namespace AzureSamples.Security.KeyVault.Proxy { /// <summary> /// Test attribute to run tests synchronously or asynchronously in conjunction with a <see cref="SecretsFixture"/>. /// </summary> [XunitTestCaseDiscoverer("AzureSamples.Security.KeyVault.Proxy.LiveFactDiscoverer", "AzureSamples.Security.KeyVault.Proxy.Tests")] public class LiveFactAttribute : FactAttribute { /// <summary> /// Gets or sets whether to run only synchronously, asynchronously, or both. /// </summary> public Synchronicity Synchronicity { get; set; } } /// <summary> /// Options to run methods synchronously, asynchronously, or both (default). /// </summary> public enum Synchronicity { Both, Synchronous, Asynchronous, } }
30.322581
134
0.670213
816fdda72202496b1b706f63510e4c682120d1b7
2,417
php
PHP
routes/web.php
B-Cisek/Lokaty
b46d72bcdd0cc3702584ae2cf432cdb775e927a1
[ "MIT" ]
null
null
null
routes/web.php
B-Cisek/Lokaty
b46d72bcdd0cc3702584ae2cf432cdb775e927a1
[ "MIT" ]
null
null
null
routes/web.php
B-Cisek/Lokaty
b46d72bcdd0cc3702584ae2cf432cdb775e927a1
[ "MIT" ]
null
null
null
<?php use Illuminate\Support\Facades\Route; use App\Http\Controllers\DashboardController; use App\Http\Controllers\Auth\RegisterController; use App\Http\Controllers\Auth\LoginController; use App\Http\Controllers\Auth\LogoutController; use App\Http\Controllers\LokatyController; use App\Http\Controllers\KalkulatorController; use App\Http\Controllers\LokataController; use App\Http\Controllers\SrodkiController; use App\Http\Controllers\NowaLokataController; use App\Http\Controllers\DashboardAdminController; /* |-------------------------------------------------------------------------- | Web Routes |-------------------------------------------------------------------------- | | Here is where you can register web routes for your application. These | routes are loaded by the RouteServiceProvider within a group which | contains the "web" middleware group. Now create something great! | */ Route::get('/dashboard', [DashboardController::class, 'index']) ->name('dashboard'); Route::get('/dashboard/admin', [DashboardAdminController::class, 'index']) ->name('dashboard.admin'); Route::get('/', function(){ return view('home'); })->name('home'); Route::get('/test', function(){ return view('test'); })->name('test'); Route::get('/lokaty', [LokatyController::class, 'index'])->name('lokaty'); Route::get('/lokaty/nowa', [LokataController::class, 'index']); Route::post('/lokaty/nowa', [LokataController::class, 'store'])->name('nowa'); Route::get('/kalkulator', [KalkulatorController::class, 'index'])->name('kalkulator'); Route::post('/kalkulator/wynik', [KalkulatorController::class, 'store'])->name('kalkulator.store'); Route::post('/logout', [LogoutController::class, 'store'])->name('logout'); Route::get('/login', [LoginController::class, 'index'])->name('login'); Route::post('/login', [LoginController::class, 'store']); Route::get('/register', [RegisterController::class, 'index'])->name('register'); Route::post('/register', [RegisterController::class, 'store']); Route::get('/srodki', [SrodkiController::class, 'index'])->name('srodki'); Route::post('/srodki', [SrodkiController::class, 'update'])->name('srodki.dodaj'); Route::get('/dashboard/{id}', [LokataController::class, 'destroy'])->name('lokata.destroy'); Route::prefix('admin')->name('admin.')->middleware('admin') ->group(function(){ Route::resource('/lokaty', NowaLokataController::class); });
32.662162
99
0.667356