hexsha
stringlengths
40
40
size
int64
5
1.05M
ext
stringclasses
98 values
lang
stringclasses
21 values
max_stars_repo_path
stringlengths
3
945
max_stars_repo_name
stringlengths
4
118
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
945
max_issues_repo_name
stringlengths
4
118
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
134k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
945
max_forks_repo_name
stringlengths
4
135
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
5
1.05M
avg_line_length
float64
1
1.03M
max_line_length
int64
2
1.03M
alphanum_fraction
float64
0
1
1598dd9266925a8b361fd4591414f9cbbf281804
352
rb
Ruby
spec/spec_helper.rb
frankywahl/error_notifier
bd5674aa4a3c81e7c4a115f05d895060d283812c
[ "MIT" ]
1
2016-05-17T18:42:36.000Z
2016-05-17T18:42:36.000Z
spec/spec_helper.rb
frankywahl/error_notifier
bd5674aa4a3c81e7c4a115f05d895060d283812c
[ "MIT" ]
null
null
null
spec/spec_helper.rb
frankywahl/error_notifier
bd5674aa4a3c81e7c4a115f05d895060d283812c
[ "MIT" ]
null
null
null
# frozen_string_literal: true Dir["#{File.expand_path('support', __dir__)}/**/*.rb"].sort.each { |f| require f } require "pry" $LOAD_PATH.unshift File.expand_path("../lib", __dir__) require "error_notifier" RSpec.configure do |c| c.before(:each) do notifiers = ErrorNotifier.instance_variable_get("@notifiers") notifiers&.clear end end
22
82
0.710227
5483b895bfe2e057cd8415cb68ca724304a2887c
1,412
swift
Swift
SwiftyDispatch/QueueType.swift
jhurray/SwiftyDispatch
c40ffe15334072222dc095a2368f8bd2437fc1be
[ "MIT" ]
null
null
null
SwiftyDispatch/QueueType.swift
jhurray/SwiftyDispatch
c40ffe15334072222dc095a2368f8bd2437fc1be
[ "MIT" ]
null
null
null
SwiftyDispatch/QueueType.swift
jhurray/SwiftyDispatch
c40ffe15334072222dc095a2368f8bd2437fc1be
[ "MIT" ]
null
null
null
// // QueueType.swift // SwiftyDispatch // // Created by Jeff Hurray on 5/2/16. // Copyright © 2016 jhurray. All rights reserved. // import Foundation public enum QueuePriority { case High case Default case Low case Background internal func priority() -> dispatch_queue_priority_t { switch self { case .High: return DISPATCH_QUEUE_PRIORITY_HIGH case .Default: return DISPATCH_QUEUE_PRIORITY_DEFAULT case .Low: return DISPATCH_QUEUE_PRIORITY_LOW case .Background: return DISPATCH_QUEUE_PRIORITY_BACKGROUND } } } public enum ExecutionStyle { case Serial case Concurrent } public enum QueueType { case Main case Global(priority: QueuePriority) case Custom(name: String, style: ExecutionStyle) internal func queue() -> dispatch_queue_t { switch self { case .Main: return dispatch_get_main_queue() case .Global(let priority): return dispatch_get_global_queue(priority.priority(), 0) case .Custom(let name, let style): switch style { case .Serial: return dispatch_queue_create(name, DISPATCH_QUEUE_SERIAL) case .Concurrent: return dispatch_queue_create(name, DISPATCH_QUEUE_CONCURRENT) } } } }
23.932203
77
0.616147
3dfc3956e82c584377e210c11f4371bbfa7276f9
1,763
kt
Kotlin
app/src/main/java/com/mykuyademo/HomePresenter.kt
xuanqh/mykuyademo
4a19a88c44cdd65920ed41831d7bf115e6294cfc
[ "MIT" ]
null
null
null
app/src/main/java/com/mykuyademo/HomePresenter.kt
xuanqh/mykuyademo
4a19a88c44cdd65920ed41831d7bf115e6294cfc
[ "MIT" ]
null
null
null
app/src/main/java/com/mykuyademo/HomePresenter.kt
xuanqh/mykuyademo
4a19a88c44cdd65920ed41831d7bf115e6294cfc
[ "MIT" ]
null
null
null
package com.mykuyademo import android.content.Context import android.view.View import android.widget.ImageView import androidx.lifecycle.ViewModel import androidx.navigation.findNavController import com.mykuyademo.network.RetrofitService import com.mykuyademo.utils.ProgressDialogUtils import kotlinx.coroutines.* class HomePresenter: ViewModel(){ val productAdapter= ProductAdapter() val newsAdapter= NewsAdapter() fun initData(context: Context){ ProgressDialogUtils.instance?.showProgressDialog(context) val servicesApi= RetrofitService.newInstance().servicesApi CoroutineScope(Dispatchers.IO).launch { try { val resultProduct = servicesApi.getProductListAsync( ) val resultNews = servicesApi.getNews( ) withContext(Dispatchers.Main) { ProgressDialogUtils.instance?.closeProgressDialog() productAdapter.updateData(resultProduct) newsAdapter.updateData(resultNews) } } catch (e: Exception) { e.printStackTrace() withContext(Dispatchers.Main) { //handle error in here ProgressDialogUtils.instance?.closeProgressDialog() } } } } fun openExpend(view: View){ productAdapter.updateExpandList() if(productAdapter.isExpandList){ (view as ImageView).setImageResource(R.drawable.ic_up) }else{ (view as ImageView).setImageResource(R.drawable.ic_down) } } fun openMap(view: View){ view.findNavController().navigate(R.id.action_homeFragment_to_mapFragment) } }
33.264151
82
0.634714
cf8468d65d45d78aeb2713ae9dd98623d3362871
2,417
css
CSS
css/styles.css
dennisnyamweya/delani-studio
64930d330f0b50ecda03de03a28338d1410f83b4
[ "Unlicense" ]
null
null
null
css/styles.css
dennisnyamweya/delani-studio
64930d330f0b50ecda03de03a28338d1410f83b4
[ "Unlicense" ]
null
null
null
css/styles.css
dennisnyamweya/delani-studio
64930d330f0b50ecda03de03a28338d1410f83b4
[ "Unlicense" ]
null
null
null
/***********************Home****************/ .hero-txt{ position: absolute; text-align: center; top: 180px; left: 370px; color: white; } .hero-img{ background-image: url('https://i.imgur.com/ZO5IISI.jpg'); background-position: center; height:800px; background-size:cover; background-repeat: no-repeat; position: relative; } .hero-img p{ font-family: 'Noto Sans HK', sans-serif; } /**********************About us**************/ .about,.dos{ text-align: center; } .serv-img{ background-image: url('https://i.imgur.com/OQS2EfI.jpg'); height: 50vh; background-repeat: no-repeat; padding-top: 100px; } .about p{ font-family: 'Noto Sans HK', sans-serif; } .serv-txt{ text-align: center; color: white; } .dos{ padding-top: 50px; } body{ margin: 0; border: none; } /*********************Contact*****************/ .contact{ text-align: center; } #name,#email{ width: 500px; background: transparent; } .contact-img{ background-image: url('https://i.imgur.com/GCZYYig.jpg'); background-position: center; height:500px; background-size:cover; background-repeat: no-repeat; position: relative; } /*************What we do***************/ #message{ width: 1200px; padding-bottom: 300px; background: transparent; } #submit{ width: 200px; border: none; background: yellow; } .dev-showing,.prod-showing,.des-showing{ display: none; } /*************Portfolio***************/ h1{ font-family: 'Noto Sans HK', sans-serif; } .contact-txt h1{ color: white; } #message,#email,#name{ color: white; font-family: 'Noto Sans HK', sans-serif; } .portfolio{ text-align: center; padding: 85px; justify-content: space-around; } /*****************Services*********************/ .services p{ font-family: 'Noto Sans HK', sans-serif; } /*****************portfolio*************/ .img-title { position: absolute; top: 0; margin: 0; height: 100%; width: 95%; text-align: center; padding-left: 5px; top: -25%; display: none; } .img-title p { position: absolute; color: white; top: 30%; font-weight:bold; width: 97%; text-align: center; border: 5px solid white; height: 90%; padding: 30px; padding-top: 45px; font-size: 20px; } /************************Social icons*************/ .social-icons p{ font-family: 'Noto Sans HK', sans-serif; }
19.18254
59
0.565163
5ad4cebf5fb6eeeca915afb060a3c1c349eaf463
3,090
swift
Swift
SwiftUI-AdaptiveCardUI/Sources/AdaptiveCardUI/UI/ColumnSet/ColumnView.swift
luannguyen252/my-swift-journey
788d66f256358dc5aefa2f3093ef74fd572e83b3
[ "MIT" ]
14
2020-12-09T08:53:39.000Z
2021-12-07T09:15:44.000Z
SwiftUI-AdaptiveCardUI/Sources/AdaptiveCardUI/UI/ColumnSet/ColumnView.swift
luannguyen252/my-swift-journey
788d66f256358dc5aefa2f3093ef74fd572e83b3
[ "MIT" ]
null
null
null
SwiftUI-AdaptiveCardUI/Sources/AdaptiveCardUI/UI/ColumnSet/ColumnView.swift
luannguyen252/my-swift-journey
788d66f256358dc5aefa2f3093ef74fd572e83b3
[ "MIT" ]
8
2020-12-10T05:59:26.000Z
2022-01-03T07:49:21.000Z
#if canImport(SwiftUI) import SwiftUI @available(macOS 11.0, iOS 14.0, tvOS 14.0, watchOS 7.0, *) struct ColumnView: View { @Environment(\.spacingConfiguration) private var spacingConfiguration @Environment(\.containerStyleConfiguration) private var containerStyleConfiguration @Environment(\.containerStyle) private var parentContainerStyle private let column: Column private let minWidth: CGFloat? private let height: CGFloat? init(column: Column, minWidth: CGFloat?, height: CGFloat?) { self.column = column self.minWidth = minWidth self.height = height } var body: some View { CardElementList(column.items, padding: padding) // Make sure auto width columns are fixed to its ideal width .fixedSize(horizontal: column.width == .auto, vertical: false) .collectSize(tag: column.id) .frame( width: column.pixelWidth, // for pixel width columns, use the specified width height: height, // height is determined by the parent view alignment: Alignment(column.verticalContentAlignment) ) // Stretch columns use the parent computed minWidth and .infinity maxWidth .frame(minWidth: minWidth, maxWidth: column.maxWidth) .layoutPriority(column.layoutPriority) .containerStyle(column.style) .backgroundImage(column.backgroundImage) .background(backgroundColor) .selectAction(column.selectAction) } } @available(macOS 11.0, iOS 14.0, tvOS 14.0, watchOS 7.0, *) private extension ColumnView { var padding: CGFloat { if column.backgroundImage != nil { return spacingConfiguration.padding } else { switch (column.style, parentContainerStyle) { case (.none, _), (ContainerStyle.default, ContainerStyle.default): return 0 case (.some, _): return spacingConfiguration.padding } } } var backgroundColor: Color? { column.style.flatMap { containerStyleConfiguration[$0].backgroundColor } } } private extension Column { var maxWidth: CGFloat? { switch width { case .stretch, .weight: return .infinity default: return nil } } var pixelWidth: CGFloat? { guard case let .pixels(value) = width else { return nil } return CGFloat(value) } var layoutPriority: Double { switch width { case .pixels: return 2 case .auto: return 1 case .stretch, .weight: return 0 } } } #endif
33.225806
97
0.540129
04ad02234eb0d139466708fcce5bd3276c0d15f7
1,189
dart
Dart
lib/src/android/com/baidu/mapapi/animation/Animation/RepeatMode.g.dart
yohom/bmap_map_fluttify
5cf8728b1eccd948d3487aace85d5f2349828285
[ "Apache-2.0" ]
null
null
null
lib/src/android/com/baidu/mapapi/animation/Animation/RepeatMode.g.dart
yohom/bmap_map_fluttify
5cf8728b1eccd948d3487aace85d5f2349828285
[ "Apache-2.0" ]
null
null
null
lib/src/android/com/baidu/mapapi/animation/Animation/RepeatMode.g.dart
yohom/bmap_map_fluttify
5cf8728b1eccd948d3487aace85d5f2349828285
[ "Apache-2.0" ]
null
null
null
// ignore_for_file: non_constant_identifier_names, camel_case_types, missing_return, unused_import, unused_local_variable, dead_code, unnecessary_cast ////////////////////////////////////////////////////////// // GENERATED BY FLUTTIFY. DO NOT EDIT IT. ////////////////////////////////////////////////////////// enum com_baidu_mapapi_animation_Animation_RepeatMode { RESTART /* null */, REVERSE /* null */ } extension com_baidu_mapapi_animation_Animation_RepeatModeToX on com_baidu_mapapi_animation_Animation_RepeatMode { int toValue() { switch (this) { case com_baidu_mapapi_animation_Animation_RepeatMode.RESTART: return com_baidu_mapapi_animation_Animation_RepeatMode.RESTART.index + 0; case com_baidu_mapapi_animation_Animation_RepeatMode.REVERSE: return com_baidu_mapapi_animation_Animation_RepeatMode.REVERSE.index + 0; default: return 0; } } } extension com_baidu_mapapi_animation_Animation_RepeatModeFromX on int { com_baidu_mapapi_animation_Animation_RepeatMode tocom_baidu_mapapi_animation_Animation_RepeatMode() { switch (this) { default: return com_baidu_mapapi_animation_Animation_RepeatMode.values[this + 0]; } } }
42.464286
150
0.730866
afd369cb85ba0c4626958e136b69485ea7d8ed5d
200
rb
Ruby
config/routes.rb
Tanattha/sweetie-backend
db17d9626e304f00578bd059e11237418deda825
[ "MIT" ]
null
null
null
config/routes.rb
Tanattha/sweetie-backend
db17d9626e304f00578bd059e11237418deda825
[ "MIT" ]
null
null
null
config/routes.rb
Tanattha/sweetie-backend
db17d9626e304f00578bd059e11237418deda825
[ "MIT" ]
null
null
null
Rails.application.routes.draw do resources :cart_products resources :products resources :reviews resources :carts resources :categories resources :users root to: 'users#home' end
14.285714
32
0.74
5df9eaaa34ef131fd1e3ba41d1942b14076f4b21
2,423
h
C
ImageDealer.h
RedMakeUp/ImageHistogramEqualization
a773edd5ccab5bb27a950c7b936b9230a5477408
[ "Apache-2.0" ]
null
null
null
ImageDealer.h
RedMakeUp/ImageHistogramEqualization
a773edd5ccab5bb27a950c7b936b9230a5477408
[ "Apache-2.0" ]
null
null
null
ImageDealer.h
RedMakeUp/ImageHistogramEqualization
a773edd5ccab5bb27a950c7b936b9230a5477408
[ "Apache-2.0" ]
null
null
null
#ifndef IMAGEDEALER_H #define IMAGEDEALER_H #include <memory> #include <vector> struct RawImage{ std::vector<unsigned char> data; int width = 0; int height = 0; int numChannels = 0; void Ready(const RawImage& other, bool needResize = true){ width = other.width; height = other.height; numChannels = other.numChannels; data.clear(); if(needResize) data.resize(other.data.size()); } void SetGray(int i, int j, int gray){ data[j * width + i] = static_cast<unsigned char>(gray); } int GetGray(int i, int j) const{ return static_cast<int>(data[j * width + i]); } }; class ImageDealer{ public: // Grayscale an image. // Assume that the memory is row-major and channels(if exists) in each pixel are ordered as following: // red, green, blue, alpha // The gray's calculation equation is // gray = 0.2989 * red + 0.5870 * green + 0.1140 * blue static std::shared_ptr<RawImage> GrayScale(const std::shared_ptr<RawImage> image); // Calculate occurrence of each gray level, namely histogram of the image static void CalcHistogram(const std::vector<unsigned char>& grayImage, std::vector<int>& histogram); // Equalize histogram of the gray image static std::shared_ptr<RawImage> Equalize(const std::shared_ptr<RawImage> grayImage, int numLevels = 256); // Flip an image. Set @verticalFlip to true for vertically flip, false for horizontally flip static std::shared_ptr<RawImage> Mirror(const std::shared_ptr<RawImage> image, bool verticalFlip = true); // Weight all pixels under @filter to the center pixel. The shape of @filter must be @filterShape * @filterShape. // If set @divideBySum to true, @filter will be normalized before being applied static std::shared_ptr<RawImage> WeightedFilter(const std::shared_ptr<RawImage> image, std::vector<float> filter, int filterShape, bool divideBySum = true); // Set the median of all pixels under @filter to the center pixel static std::shared_ptr<RawImage> MedianFilter(const std::shared_ptr<RawImage> image, int filterShape); // Set the max value of all pixels under @filter to the center pixel static std::shared_ptr<RawImage> MaxFilter(const std::shared_ptr<RawImage> image, int filterShape); static std::shared_ptr<RawImage> LoadRawImage(const char* fileName); }; #endif // IMAGEDEALER_H
38.460317
160
0.697482
b2f8b3e8d1857a6e5f87e42cb97fafb1e51c9432
1,126
py
Python
dynamicform/widgets.py
cdgagne/django-dynamicform
f60c549d01c6c091addaf0b4121367d7a1d917f0
[ "MIT" ]
null
null
null
dynamicform/widgets.py
cdgagne/django-dynamicform
f60c549d01c6c091addaf0b4121367d7a1d917f0
[ "MIT" ]
null
null
null
dynamicform/widgets.py
cdgagne/django-dynamicform
f60c549d01c6c091addaf0b4121367d7a1d917f0
[ "MIT" ]
null
null
null
from django import forms from django.forms.utils import flatatt from django.utils import formats from django.utils.encoding import force_text from django.utils.html import format_html class AjaxValidatingTextInput(forms.TextInput): def __init__(self, *args, **kwargs): super(AjaxValidatingTextInput, self).__init__(*args, **kwargs) self.attrs = {'class': 'ajax-validate'} def render(self, name, value, attrs=None): if value is None: value = '' final_attrs = self.build_attrs(attrs, type=self.input_type, name=name) if value != '': # Only add the 'value' attribute if a value is non-empty. final_attrs['value'] = force_text(self._format_value(value)) input_html = format_html('<input{} />', flatatt(final_attrs)) error_div_attrs = { 'id': 'form_error_%s' % final_attrs['id'] } error_div = '<div><span class="error-container label label-danger"{}></span></div>' error_div_html = format_html(error_div, flatatt(error_div_attrs)) return '%s%s' % (input_html, error_div_html)
41.703704
91
0.652753
abf44a9a6fad3b2ab2794acdf891ffce5087c1c3
258
swift
Swift
MotionLearn/BlockVC.swift
kapulkin/VKHackMotionLearning
52f30a8fedeb6be4888efb999abe207f7bf5a8c9
[ "MIT" ]
null
null
null
MotionLearn/BlockVC.swift
kapulkin/VKHackMotionLearning
52f30a8fedeb6be4888efb999abe207f7bf5a8c9
[ "MIT" ]
null
null
null
MotionLearn/BlockVC.swift
kapulkin/VKHackMotionLearning
52f30a8fedeb6be4888efb999abe207f7bf5a8c9
[ "MIT" ]
null
null
null
// // BlockVC.swift // MotionLearn // // Created by David Ozmanyan on 10/02/2020. // Copyright © 2020 VK. All rights reserved. // import UIKit class BlockVC: UIViewController { override func viewDidLoad() { super.viewDidLoad() } }
15.176471
45
0.639535
71286871eecf28a58fc1ce444b4fa34b06ff5ca6
1,061
tsx
TypeScript
components/layout/base-layout/index.tsx
Meruem117/next-quiz
69293dc03578f88d06c632cf9837da2705c900c6
[ "MIT" ]
1
2022-01-13T12:12:14.000Z
2022-01-13T12:12:14.000Z
components/layout/base-layout/index.tsx
Meruem117/next-quiz
69293dc03578f88d06c632cf9837da2705c900c6
[ "MIT" ]
null
null
null
components/layout/base-layout/index.tsx
Meruem117/next-quiz
69293dc03578f88d06c632cf9837da2705c900c6
[ "MIT" ]
null
null
null
import React, { Fragment } from 'react' import Head from 'next/head' import { Layout, BackTop } from 'antd' import BaseMenu from './base-menu' import UserAvatar from '@/components/user/user-avatar' const BaseLayout: React.FC = (props) => { return ( <Fragment> <Head> <title>Quiz</title> <meta name="description" content="A quiz system based on next." /> </Head> <Layout className="layout h-screen w-full"> <Layout.Header className="flex space-x-4 pt-1.5 bg-white"> <div className="text-4xl font-semibold cursor-default text-AiDeep">Quiz</div> <BaseMenu /> <UserAvatar /> </Layout.Header> <Layout.Content className="bg-gray-100 p-5"> <div className="h-full w-full p-3">{props.children}</div> </Layout.Content> <Layout.Footer className="fixed bottom-0 w-full text-center text-base bg-gray-200"> Quiz ©2022 Created by Meruem </Layout.Footer> </Layout> <BackTop /> </Fragment> ) } export default BaseLayout
32.151515
91
0.617342
9bcc195bc8b11bf97cd3e115675c1eeb87dd05b8
589
swift
Swift
Source/D_Line/D_Line.swift
m760622/DuckUI
aa91126135eaba2ac04bc8f8805cf7fdd33224fe
[ "MIT" ]
29
2019-06-06T17:38:24.000Z
2021-12-16T21:07:21.000Z
Source/D_Line/D_Line.swift
m760622/DuckUI
aa91126135eaba2ac04bc8f8805cf7fdd33224fe
[ "MIT" ]
1
2019-08-14T19:08:44.000Z
2019-08-14T19:08:44.000Z
Source/D_Line/D_Line.swift
rebeloper/DuckUI
2d70fda0e674c926044f2866340a91c9211121fd
[ "MIT" ]
7
2019-07-04T15:16:59.000Z
2021-08-23T18:51:12.000Z
// // D_Line.swift // DuckUI // // Created by Alex Nagy on 17/06/2019. // import UIKit open class D_Line: UIView { public init(_ type: D_LineType = .vertical, thikness: CGFloat = 1.0, color: UIColor = UIColor.lightGray) { super.init(frame: .zero) self.backgroundColor = color switch type { case .vertical: setWidth(thikness) case .horizontal: setHeight(thikness) } } required public init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } }
20.310345
110
0.582343
cb7c0718dbddfb346780fea72dd57aafd5316f49
395
kt
Kotlin
app/src/main/java/com/srg/pruebamarvel/common/util/StateData.kt
sebrodgar/prueba-tecnica-marvel
bfec1d716283ee8a7d638391be6272509f2064f0
[ "Apache-2.0" ]
null
null
null
app/src/main/java/com/srg/pruebamarvel/common/util/StateData.kt
sebrodgar/prueba-tecnica-marvel
bfec1d716283ee8a7d638391be6272509f2064f0
[ "Apache-2.0" ]
null
null
null
app/src/main/java/com/srg/pruebamarvel/common/util/StateData.kt
sebrodgar/prueba-tecnica-marvel
bfec1d716283ee8a7d638391be6272509f2064f0
[ "Apache-2.0" ]
null
null
null
package com.srg.pruebamarvel.common.util import com.srg.pruebamarvel.presentation.common.errors.DialogErrorViewEntity /** * Created by sebrodgar on 04/03/2021. */ sealed class StateData<T> { data class Loading<T>(var loading: Boolean) : StateData<T>() data class Content<T>(var content: T) : StateData<T>() data class Error<T>(var error: DialogErrorViewEntity) : StateData<T>() }
32.916667
76
0.731646
2721f358de9ae28a8983138d7c1a34b8597d8e38
1,911
h
C
include/qingstor/service_with_c_style/types/CORSRuleType.h
jimhuaang/sdk-cpp-test
a136d893c672ddeaece3a87555a6ef7de1876d17
[ "Apache-1.1" ]
4
2018-01-25T06:10:29.000Z
2019-12-01T14:17:43.000Z
include/qingstor/service_with_c_style/types/CORSRuleType.h
jimhuaang/sdk-cpp-test
a136d893c672ddeaece3a87555a6ef7de1876d17
[ "Apache-1.1" ]
1
2021-01-21T07:17:57.000Z
2021-01-21T07:17:57.000Z
include/qingstor/service_with_c_style/types/CORSRuleType.h
jimhuaang/sdk-cpp-test
a136d893c672ddeaece3a87555a6ef7de1876d17
[ "Apache-1.1" ]
5
2018-02-23T06:29:54.000Z
2019-08-30T05:36:45.000Z
// +------------------------------------------------------------------------- // | Copyright (C) 2016 Yunify, Inc. // +------------------------------------------------------------------------- // | Licensed under the Apache License, Version 2.0 (the "License"); // | you may not use this work except in compliance with the License. // | You may obtain a copy of the License in the LICENSE file, or 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. // +------------------------------------------------------------------------- #pragma once #include "../QsList.h" // Headers of CustomizedType. #ifdef __cplusplus extern "C" { #endif typedef struct { //Allowed headers qs_list_t *allowed_headers; //Allowed methods qs_list_t *allowed_methods; // Required //Allowed origin char *allowed_origin; // Required //Expose headers qs_list_t *expose_headers; //Max age seconds int *max_age_seconds; int setting_flag; } qs_cors_rule_t; typedef struct { qs_list_t node; qs_cors_rule_t *content; } qs_cors_rule_item_t; typedef struct { qs_list_t node; char *content; } qs_cors_rule_allowed_headers_item_t; typedef struct { qs_list_t node; char *content; } qs_cors_rule_allowed_methods_item_t; typedef struct { qs_list_t node; char *content; } qs_cors_rule_expose_headers_item_t; // cors_rule init function. QS_SDK_API void init_cors_rule(qs_cors_rule_t * input); // cors_rule release function. QS_SDK_API void release_cors_rule(qs_cors_rule_t * output); #ifdef __cplusplus }; #endif
22.482353
77
0.632653
5b2be92e903885899c5a3f6bc091021666c84d55
1,641
sql
SQL
AssetMigration.sql
mlizbeth/Kace-Queries
3093f1c52768bf86e802785e54f995daa04ec5c5
[ "MIT" ]
2
2021-05-19T02:44:26.000Z
2021-06-25T19:16:18.000Z
AssetMigration.sql
mlizbeth/Kace-Queries
3093f1c52768bf86e802785e54f995daa04ec5c5
[ "MIT" ]
null
null
null
AssetMigration.sql
mlizbeth/Kace-Queries
3093f1c52768bf86e802785e54f995daa04ec5c5
[ "MIT" ]
null
null
null
SELECT DISTINCT FIELD_41 AS ASSET_STATUS, USER.USER_NAME AS ASSIGNED_TO, USER.EMAIL AS EMAIL_ADDRESS, ASSET_DATA_VIEW_Location.NAME AS LOCATION, FIELD_19 AS NAME, ASSET_DATA_VIEW_Department.NAME AS DEPT, FIELD_39 AS ROOM_NUMBER, FIELD_22 AS ASSIGNMENT_TYPE, FIELD_31 AS FUNDS_USED, FIELD_27 AS DATE_PURCHASED, FIELD_34 AS REPLACEMENT_DATE, FIELD_26 AS DATE_ASSIGNED, FIELD_30 AS CLASSIFICATION, FIELD_42 AS STOCK_TYPE, FIELD_33 AS PO_NUMBER, CASE WHEN ASSET.ASSET_STATUS_ID = 0 THEN "N/A" WHEN ASSET.ASSET_STATUS_ID = 492 THEN "EXPIRED" WHEN ASSET.ASSET_STATUS_ID = 493 THEN "ACTIVE" WHEN ASSET.ASSET_STATUS_ID = 494 THEN "DISPOSED" WHEN ASSET.ASSET_STATUS_ID = 495 THEN "IN STOCK" WHEN ASSET.ASSET_STATUS_ID = 496 THEN "MISSING" WHEN ASSET.ASSET_STATUS_ID = 497 THEN "RESERVED" WHEN ASSET.ASSET_STATUS_ID = 498 THEN "REPAIRED" WHEN ASSET.ASSET_STATUS_ID = 499 THEN "STOLEN" WHEN ASSET.ASSET_STATUS_ID = 500 THEN "RETIRED" END AS "ASSET_STATUS" FROM ASSET_DATA_5 JOIN ASSET ON ASSET.NAME = FIELD_19 JOIN USER ON USER.ID = ASSET.OWNER_ID JOIN ASSET_DATA_VIEW_Location ON ASSET_DATA_VIEW_Location.ASSET_ID = ASSET.LOCATION_ID JOIN ASSET_ASSOCIATION_VIEW ON ASSET_ASSOCIATION_VIEW.ASSET_ID = ASSET.ID JOIN ASSET_DATA_VIEW_Department ON ASSET_DATA_VIEW_Department.ASSET_ID = ASSET_ASSOCIATION_VIEW.ASSOCIATED_ASSET_ID WHERE FIELD_41 != 'Sold' AND FIELD_41 != 'Disposed' AND FIELD_41 != 'Stolen' AND FIELD_41 != 'Marked for Disposal' AND FIELD_41 != 'Marked for Return' AND ASSET.ASSET_STATUS_ID != 494 AND FIELD_19 NOT LIKE 'VM%';
32.82
117
0.759902
3b81d78094f74e4e6a135055fb617ae48ab0c0fa
2,757
h
C
cc3200/qstrdefsport.h
methoxid/micropystat
4235b15dd6e14f0b49668d3331be7ac157f57feb
[ "MIT" ]
null
null
null
cc3200/qstrdefsport.h
methoxid/micropystat
4235b15dd6e14f0b49668d3331be7ac157f57feb
[ "MIT" ]
null
null
null
cc3200/qstrdefsport.h
methoxid/micropystat
4235b15dd6e14f0b49668d3331be7ac157f57feb
[ "MIT" ]
null
null
null
// qstrs specific to this port Q(__name__) Q(help) Q(pyb) Q(info) Q(reset) Q(main) Q(sync) Q(gc) Q(rng) Q(delay) Q(time) Q(open) Q(on) Q(off) Q(toggle) Q(write) Q(read) Q(readall) Q(readline) Q(input) Q(os) Q(freq) Q(repl_info) Q(disable_irq) Q(enable_irq) Q(millis) Q(micros) Q(elapsed_millis) Q(elapsed_micros) Q(udelay) Q(flush) Q(FileIO) Q(mkdisk) Q(enable) Q(disable) // Entries for sys.path Q(/SFLASH) Q(/SFLASH/LIB) Q(/SD) Q(/SD/LIB) // for module weak links Q(re) Q(json) Q(heapq) // for os module Q(uos) Q(os) Q(/) Q(SFLASH) Q(SD) Q(chdir) Q(getcwd) Q(listdir) Q(mkdir) Q(remove) Q(rmdir) Q(unlink) Q(sep) Q(stat) Q(urandom) // for file class Q(seek) Q(tell) // for Pin class Q(Pin) Q(init) Q(value) Q(low) Q(high) Q(name) Q(port) Q(pin) Q(cpu) Q(mode) Q(pull) Q(index) Q(strength) Q(af) Q(intenable) Q(intdisable) Q(intmode) Q(swint) Q(IN) Q(OUT) Q(STD) Q(STD_PU) Q(STD_PD) Q(OD) Q(OD_PU) Q(OD_PD) Q(INT_RISING) Q(INT_FALLING) Q(INT_RISING_FALLING) Q(INT_LOW_LEVEL) Q(INT_HIGH_LEVEL) Q(S2MA) Q(S4MA) Q(S6MA) // for UART class Q(UART) Q(baudrate) Q(bits) Q(stop) Q(parity) Q(init) Q(deinit) Q(all) Q(writechar) Q(readchar) Q(readinto) Q(read_buf_len) Q(timeout) Q(timeout_char) Q(repl_uart) Q(flow) Q(FLOW_NONE) Q(FLOW_TX) Q(FLOW_RX) Q(FLOW_TXRX) // for I2C class Q(I2C) Q(mode) Q(addr) Q(baudrate) Q(data) Q(memaddr) Q(addr_size) Q(timeout) Q(init) Q(deinit) Q(is_ready) Q(scan) Q(send) Q(recv) Q(mem_read) Q(mem_write) Q(MASTER) // for ADC class Q(ADC) Q(read) // for SD class Q(SD) // for RTC class Q(RTC) Q(datetime) // for time class Q(utime) Q(localtime) Q(mktime) Q(sleep) Q(time) // for select class Q(select) Q(uselect) Q(register) Q(unregister) Q(modify) Q(poll) // for socket class Q(socket) Q(usocket) Q(getaddrinfo) Q(family) Q(type) Q(send) Q(sendto) Q(recv) Q(recvfrom) Q(listen) Q(accept) Q(bind) Q(settimeout) Q(setblocking) Q(setsockopt) Q(close) Q(protocol) Q(AF_INET) Q(AF_INET6) Q(SOCK_STREAM) Q(SOCK_DGRAM) Q(SOCK_RAW) Q(IPPROTO_TCP) Q(IPPROTO_UDP) Q(IPPROTO_RAW) // for network class Q(network) Q(route) Q(start_server) Q(stop_server) Q(server_enabled) Q(server_login) // for WLAN class Q(WLAN) Q(key) Q(security) Q(ssid) Q(bssid) Q(scan) Q(connect) Q(isconnected) Q(disconnect) Q(channel) Q(ifconfig) Q(urn) Q(STA) Q(AP) Q(P2P) Q(OPEN) Q(WEP) Q(WPA_WPA2) Q(WPA_ENT) Q(WPS_PBC) Q(WPS_PIN) // for WDT class Q(WDT) Q(kick) // for HeartBeat class Q(HeartBeat) // for callback class Q(init) Q(enable) Q(disable) Q(callback) Q(handler) Q(intmode) Q(value) Q(priority) Q(wake) // for Sleep class Q(Sleep) Q(idle) Q(suspend) Q(hibernate) Q(reset_cause) Q(wake_reason) Q(ACTIVE) Q(SUSPENDED) Q(HIBERNATING) Q(PWR_ON_RESET) Q(HARD_RESET) Q(WDT_RESET) Q(HIB_RESET) Q(SOFT_RESET) Q(WLAN_WAKE) Q(PIN_WAKE) Q(RTC_WAKE)
10.325843
30
0.698585
f064b7732b5a8664b19003aebca8c3258eb13822
409
js
JavaScript
baekjoon/hash-easy/10546-runner.js
honux77/algorithm
2ed8cef1fbee7ad96d8f2ae583666d52bd8892ee
[ "MIT" ]
2
2019-02-08T01:23:07.000Z
2020-11-19T12:23:52.000Z
baekjoon/hash-easy/10546-runner.js
honux77/algorithm
2ed8cef1fbee7ad96d8f2ae583666d52bd8892ee
[ "MIT" ]
null
null
null
baekjoon/hash-easy/10546-runner.js
honux77/algorithm
2ed8cef1fbee7ad96d8f2ae583666d52bd8892ee
[ "MIT" ]
null
null
null
const lines = require('fs').readFileSync('/dev/stdin').toString().split('\n'); const [ns, ...names] = lines; const n = Number(ns); d = {}; for (let i = 0; i < n; i++) { const name = names[i]; if (name in d) { d[name]++; } else { d[name] = 1; } } for (let i = n; i < 2 * n - 1; i++) { const name = names[i]; d[name]--; if (d[name] == 0) { delete d[name]; } } console.log(Object.keys(d)[0]);
15.730769
78
0.511002
51664e762ed89bd388aa64095f22cd645465299c
189
kt
Kotlin
src/main/kotlin/dev/domnikl/schema_registry_gitops/Compatibility.kt
martinberanek/schema-registry-gitops
b41a2bd1d3be820464a318cf797d1a7b5f385daa
[ "Apache-2.0" ]
25
2020-12-31T07:06:54.000Z
2022-03-27T04:08:42.000Z
src/main/kotlin/dev/domnikl/schema_registry_gitops/Compatibility.kt
martinberanek/schema-registry-gitops
b41a2bd1d3be820464a318cf797d1a7b5f385daa
[ "Apache-2.0" ]
11
2021-01-15T08:11:46.000Z
2022-03-31T09:46:08.000Z
src/main/kotlin/dev/domnikl/schema_registry_gitops/Compatibility.kt
martinberanek/schema-registry-gitops
b41a2bd1d3be820464a318cf797d1a7b5f385daa
[ "Apache-2.0" ]
2
2021-12-17T07:35:53.000Z
2022-02-28T10:37:33.000Z
package dev.domnikl.schema_registry_gitops enum class Compatibility { NONE, BACKWARD, FORWARD, FULL, BACKWARD_TRANSITIVE, FORWARD_TRANSITIVE, FULL_TRANSITIVE }
15.75
42
0.719577
5411a8a15497cf2f66e928100ec03404191cf555
7,298
go
Go
src/server/api/v2/rest/restutil/restutil.go
mmattbtw/ServerGo
c94d90079da9a8e1966e74acc0f7cff6806b1360
[ "MIT" ]
1
2022-01-31T00:31:05.000Z
2022-01-31T00:31:05.000Z
src/server/api/v2/rest/restutil/restutil.go
mmattbtw/ServerGo
c94d90079da9a8e1966e74acc0f7cff6806b1360
[ "MIT" ]
null
null
null
src/server/api/v2/rest/restutil/restutil.go
mmattbtw/ServerGo
c94d90079da9a8e1966e74acc0f7cff6806b1360
[ "MIT" ]
null
null
null
package restutil import ( "encoding/json" "fmt" "strings" "github.com/SevenTV/ServerGo/src/mongo/datastructure" "github.com/SevenTV/ServerGo/src/utils" "github.com/gofiber/fiber/v2" "go.mongodb.org/mongo-driver/bson/primitive" ) type ErrorResponse struct { Status int `json:"status"` Message string `json:"message"` Reason string `json:"reason"` } func (e *ErrorResponse) Send(c *fiber.Ctx, placeholders ...string) error { if len(placeholders) > 0 { e.Message = fmt.Sprintf(e.Message, strings.Join(placeholders, ", ")) e.Reason = strings.Join(placeholders, ", ") } b, _ := json.Marshal(e) return c.Status(e.Status).Send(b) } func createErrorResponse(status int, message string) *ErrorResponse { return &ErrorResponse{ status, message, "", } } var ( ErrUnknownEmote = func() *ErrorResponse { return createErrorResponse(404, "Unknown Emote") } ErrUnknownUser = func() *ErrorResponse { return createErrorResponse(404, "Unknown User") } MalformedObjectId = func() *ErrorResponse { return createErrorResponse(400, "Malformed Object ID") } ErrInternalServer = func() *ErrorResponse { return createErrorResponse(500, "Internal Server Error (%s)") } ErrBadRequest = func() *ErrorResponse { return createErrorResponse(400, "Bad Request (%s)") } ErrLoginRequired = func() *ErrorResponse { return createErrorResponse(403, "Authentication Required") } ErrAccessDenied = func() *ErrorResponse { return createErrorResponse(403, "Insufficient Privilege") } ErrMissingQueryParams = func() *ErrorResponse { return createErrorResponse(400, "Missing Query Params (%s)") } ) func CreateEmoteResponse(emote *datastructure.Emote, owner *datastructure.User) EmoteResponse { // Generate URLs urls := make([][]string, 4) for i := 1; i <= 4; i++ { a := make([]string, 2) a[0] = fmt.Sprintf("%d", i) a[1] = utils.GetCdnURL(emote.ID.Hex(), int8(i)) urls[i-1] = a } // Generate simple visibility value simpleVis := emote.GetSimpleVisibility() // Create the final response response := EmoteResponse{ ID: emote.ID.Hex(), Name: emote.Name, Owner: CreateUserResponse(datastructure.DeletedUser), Visibility: emote.Visibility, VisibilitySimple: &simpleVis, Mime: emote.Mime, Status: emote.Status, Tags: utils.Ternary(emote.Tags != nil, emote.Tags, []string{}).([]string), Width: emote.Width, Height: emote.Height, URLs: urls, } if owner != nil { response.Owner = CreateUserResponse(owner) } return response } type EmoteResponse struct { ID string `json:"id"` Name string `json:"name"` Owner *UserResponse `json:"owner"` Visibility int32 `json:"visibility"` VisibilitySimple *[]string `json:"visibility_simple"` Mime string `json:"mime"` Status int32 `json:"status"` Tags []string `json:"tags"` Width [4]int16 `json:"width"` Height [4]int16 `json:"height"` URLs [][]string `json:"urls"` } func CreateUserResponse(user *datastructure.User, opt ...UserResponseOptions) *UserResponse { var options UserResponseOptions if len(opt) > 0 { options = opt[0] } response := UserResponse{ ID: user.ID.Hex(), Login: user.Login, DisplayName: user.DisplayName, Role: datastructure.GetRole(user.RoleID), EmoteAliases: utils.Ternary(options.IncludeAliases, user.EmoteAlias, map[string]string{}).(map[string]string), ProfilePictureID: user.ProfilePictureID, } return &response } type UserResponseOptions struct { IncludeAliases bool } type UserResponse struct { ID string `json:"id"` TwitchID string `json:"twitch_id"` Login string `json:"login"` DisplayName string `json:"display_name"` Role datastructure.Role `json:"role"` EmoteAliases map[string]string `json:"emote_aliases,omitempty"` ProfilePictureID string `json:"profile_picture_id,omitempty"` } func CreateBadgeResponse(badge *datastructure.Cosmetic, users []*datastructure.User, idType string) *BadgeCosmeticResponse { // Get user list userIDs := selectUserIDType(users, idType) // Generate URLs urls := make([][]string, 3) for i := 1; i <= 3; i++ { a := make([]string, 2) a[0] = fmt.Sprintf("%d", i) a[1] = utils.GetBadgeCdnURL(badge.ID.Hex(), int8(i)) urls[i-1] = a } data := badge.ReadBadge() if data == nil { return &BadgeCosmeticResponse{ ID: primitive.NilObjectID.Hex(), Name: "Error", Tooltip: "Error", } } response := &BadgeCosmeticResponse{ ID: badge.ID.Hex(), Name: badge.Name, Tooltip: data.Tooltip, Users: userIDs, URLs: urls, Misc: data.Misc, } return response } func CreatePaintResponse(paint *datastructure.Cosmetic, users []*datastructure.User, idType string) *PaintCosmeticResponse { // Get user list userIDs := selectUserIDType(users, idType) data := paint.ReadPaint() if data == nil { return &PaintCosmeticResponse{ ID: paint.ID.Hex(), Name: "Error", } } return &PaintCosmeticResponse{ ID: paint.ID.Hex(), Name: paint.Name, Users: userIDs, Color: data.Color, Function: string(data.Function), Stops: data.Stops, Repeat: data.Repeat, Angle: data.Angle, Shape: data.Shape, ImageURL: data.ImageURL, DropShadow: data.DropShadow, DropShadows: data.DropShadows, Animation: data.Animation, } } func selectUserIDType(users []*datastructure.User, t string) []string { userIDs := make([]string, len(users)) for i, u := range users { switch t { case "object_id": userIDs[i] = u.ID.Hex() case "twitch_id": userIDs[i] = u.TwitchID case "login": userIDs[i] = u.Login } } return userIDs } type BadgeCosmeticResponse struct { ID string `json:"id"` Name string `json:"name"` Tooltip string `json:"tooltip"` URLs [][]string `json:"urls"` Users []string `json:"users"` Misc bool `json:"misc,omitempty"` } type PaintCosmeticResponse struct { ID string `json:"id"` Name string `json:"name"` Users []string `json:"users"` Function string `json:"function"` Color *int32 `json:"color"` Stops []datastructure.CosmeticPaintGradientStop `json:"stops"` Repeat bool `json:"repeat"` Angle int32 `json:"angle"` Shape string `json:"shape,omitempty"` ImageURL string `json:"image_url,omitempty"` DropShadow datastructure.CosmeticPaintDropShadow `json:"drop_shadow,omitempty"` DropShadows []datastructure.CosmeticPaintDropShadow `json:"drop_shadows,omitempty"` Animation datastructure.CosmeticPaintAnimation `json:"animation,omitempty"` }
31.456897
124
0.614004
85d7dd454b62ec3d23fb5ab2d557daab94391530
3,169
js
JavaScript
src/icons/PhAirplay.js
phosphor-icons/phosphr-webcomponents
d763567e8c6aa177fa5929f528bcb11e46952a15
[ "MIT" ]
3
2020-11-28T21:09:22.000Z
2021-03-23T03:55:46.000Z
src/icons/PhAirplay.js
phosphor-icons/phosphr-webcomponents
d763567e8c6aa177fa5929f528bcb11e46952a15
[ "MIT" ]
1
2021-02-11T21:43:15.000Z
2021-08-29T16:40:10.000Z
src/icons/PhAirplay.js
phosphor-icons/phosphr-webcomponents
d763567e8c6aa177fa5929f528bcb11e46952a15
[ "MIT" ]
1
2021-01-10T19:32:19.000Z
2021-01-10T19:32:19.000Z
/* GENERATED FILE */ import { html, svg, define } from "hybrids"; const PhAirplay = { color: "currentColor", size: "1em", weight: "regular", mirrored: false, render: ({ color, size, weight, mirrored }) => html` <svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" fill="${color}" viewBox="0 0 256 256" transform=${mirrored ? "scale(-1, 1)" : null} > ${weight === "bold" && svg`<polygon points="128.002 160 176 216 80 216 128.002 160" fill="none" stroke="${color}" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"/> <path d="M48,192a16,16,0,0,1-16-16V64A16,16,0,0,1,48,48H208a16,16,0,0,1,16,16V176a16,16,0,0,1-16,16" fill="none" stroke="${color}" stroke-linecap="round" stroke-linejoin="round" stroke-width="24"/>`} ${weight === "duotone" && svg`<path d="M208,48H48A16.00016,16.00016,0,0,0,32,64V176a16.00016,16.00016,0,0,0,16,16h52.57227l27.43017-32,27.42725,32H208a16.00016,16.00016,0,0,0,16-16V64A16.00016,16.00016,0,0,0,208,48Z" opacity="0.2"/> <polygon points="128.002 160 176 216 80 216 128.002 160" fill="none" stroke="${color}" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/> <path d="M64,192H48a16,16,0,0,1-16-16V64A16,16,0,0,1,48,48H208a16,16,0,0,1,16,16V176a16,16,0,0,1-16,16H192" fill="none" stroke="${color}" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>`} ${weight === "fill" && svg`<g> <path d="M134.07666,154.794a8.0003,8.0003,0,0,0-12.14844-.00049l-48.00293,56A8,8,0,0,0,79.99951,224h96a8.00032,8.00032,0,0,0,6.07422-13.20605Z"/> <path d="M208.00244,40H47.99951a24.0275,24.0275,0,0,0-24,24V176a24.0275,24.0275,0,0,0,24,24h14.104l47.67919-55.62231a24.00045,24.00045,0,0,1,36.44239.0039L193.895,200h14.10742a24.0275,24.0275,0,0,0,24-24V64A24.0275,24.0275,0,0,0,208.00244,40Z"/> </g>`} ${weight === "light" && svg`<polygon points="128.002 160 176 216 80 216 128.002 160" fill="none" stroke="${color}" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"/> <path d="M64,192H48a16,16,0,0,1-16-16V64A16,16,0,0,1,48,48H208a16,16,0,0,1,16,16V176a16,16,0,0,1-16,16H192" fill="none" stroke="${color}" stroke-linecap="round" stroke-linejoin="round" stroke-width="12"/>`} ${weight === "thin" && svg`<polygon points="128.002 160 176 216 80 216 128.002 160" fill="none" stroke="${color}" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/> <path d="M64,192H48a16,16,0,0,1-16-16V64A16,16,0,0,1,48,48H208a16,16,0,0,1,16,16V176a16,16,0,0,1-16,16H192" fill="none" stroke="${color}" stroke-linecap="round" stroke-linejoin="round" stroke-width="8"/>`} ${weight === "regular" && svg`<polygon points="128.002 160 176 216 80 216 128.002 160" fill="none" stroke="${color}" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/> <path d="M64,192H48a16,16,0,0,1-16-16V64A16,16,0,0,1,48,48H208a16,16,0,0,1,16,16V176a16,16,0,0,1-16,16H192" fill="none" stroke="${color}" stroke-linecap="round" stroke-linejoin="round" stroke-width="16"/>`} </svg> `, }; define("ph-airplay", PhAirplay); export default PhAirplay;
70.422222
249
0.660145
8c74a4fdf2755a816c7015457ac20dfc165bcfe6
2,546
asm
Assembly
boot.asm
shadwork/Bootloader-RegDump
6383a58b93b291aaa631866121af217a3a70db20
[ "Apache-2.0" ]
null
null
null
boot.asm
shadwork/Bootloader-RegDump
6383a58b93b291aaa631866121af217a3a70db20
[ "Apache-2.0" ]
null
null
null
boot.asm
shadwork/Bootloader-RegDump
6383a58b93b291aaa631866121af217a3a70db20
[ "Apache-2.0" ]
null
null
null
; 1 for bootsector and 0 for testing as DOS com file BOOTSEC = 0 ; diskette image size, support 320,360,1200 and 720,1440 BOOTSIZE = 320 if BOOTSEC=0 BOOTSIZE=0 end if use16 if BOOTSEC org 07C00h else org 100h end if jmp START nop START: cli push sp push ss push es push ds push cs call SET_MODE mov di, text_inf call PRINT_STR call PRINT_ENDL pop ax mov di, text_cs call SHOW_REG call PRINT_ENDL pop ax mov di, text_ds call SHOW_REG call PRINT_ENDL pop ax mov di, text_es call SHOW_REG call PRINT_ENDL pop ax mov di, text_ss call SHOW_REG call PRINT_ENDL pop ax mov di, text_sp call SHOW_REG sti if BOOTSEC DEADEND: jmp DEADEND else mov ax,4C00h int 21h end if include 'text.asm' text_inf db 'Register map on start','$' text_sp db 'sp: ','$' text_ss db 'ss: ','$' text_es db 'es: ','$' text_ds db 'ds: ','$' text_cs db 'ds: ','$' end_line db 13,10,'$' buffer_print db '0x' buffer_word db ' ',' ',' ',' ','$' if BOOTSEC ;boot sector must ends with 0x55AAh signature rb 7C00h+512-2-$ db 0x55,0xAA end if ; boot disk image size (8*40*2-1)*512 (SectorPerTrack*Track*Side-1)*SectorSize if BOOTSIZE=0 else if BOOTSIZE=320 db (8*40*2-1)*512 dup 0 else if BOOTSIZE=360 db (9*40*2-1)*512 dup 0 else if BOOTSIZE=1200 db (15*80*2-1)*512 dup 0 else if BOOTSIZE=720 db (9*80*2-1)*512 dup 0 else if BOOTSIZE=1440 db (18*80*2-1)*512 dup 0 end if
27.673913
84
0.380597
7c1eb2f4f3b13b68b6eb10fe2d0d04c03a0e98f3
86
sql
SQL
framework/Targets/horde_3_3_12/application/scripts/upgrades/2009-02-13_horde_sessionhandler_lastmodified_index.sql
UncleWillis/BugBox
25682f25fc3222db383649a4924bcd65f2ddcb34
[ "BSD-3-Clause" ]
1
2019-01-25T21:32:42.000Z
2019-01-25T21:32:42.000Z
framework/Targets/horde_3_3_12/application/scripts/upgrades/2009-02-13_horde_sessionhandler_lastmodified_index.sql
UMD-SEAM/bugbox
1753477cbca12fe43446d8ded320f77894671dfe
[ "BSD-3-Clause" ]
null
null
null
framework/Targets/horde_3_3_12/application/scripts/upgrades/2009-02-13_horde_sessionhandler_lastmodified_index.sql
UMD-SEAM/bugbox
1753477cbca12fe43446d8ded320f77894671dfe
[ "BSD-3-Clause" ]
1
2018-04-17T06:04:09.000Z
2018-04-17T06:04:09.000Z
CREATE INDEX session_lastmodified_idx ON horde_sessionhandler (session_lastmodified);
43
85
0.895349
7bad0c3b9aaf5e13d841a55554d8f6f904d4fb9f
2,879
sql
SQL
kvm.sql
mkaustubh/TravelManagementSystem
5105bd72b17f95b36a481718d883a896f256bf94
[ "Unlicense" ]
1
2021-05-05T16:24:15.000Z
2021-05-05T16:24:15.000Z
kvm.sql
mkaustubh/TravelManagementSystem
5105bd72b17f95b36a481718d883a896f256bf94
[ "Unlicense" ]
null
null
null
kvm.sql
mkaustubh/TravelManagementSystem
5105bd72b17f95b36a481718d883a896f256bf94
[ "Unlicense" ]
2
2021-05-05T14:13:57.000Z
2021-07-04T16:01:56.000Z
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Dec 04, 2020 at 03:47 AM -- Server version: 5.7.31 -- PHP Version: 7.3.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `kvm` -- -- -------------------------------------------------------- -- -- Table structure for table `admin` -- DROP TABLE IF EXISTS `admin`; CREATE TABLE IF NOT EXISTS `admin` ( `name` varchar(50) NOT NULL DEFAULT 'admin', `pass` varchar(50) NOT NULL DEFAULT 'admin' ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `admin` -- INSERT INTO `admin` (`name`, `pass`) VALUES ('admin', 'admin'); -- -------------------------------------------------------- -- -- Table structure for table `customer` -- DROP TABLE IF EXISTS `customer`; CREATE TABLE IF NOT EXISTS `customer` ( `name` varchar(50) NOT NULL, `email` varchar(50) NOT NULL, `phone` bigint(50) NOT NULL, `pass` varchar(50) NOT NULL, `book` varchar(255) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `customer` -- INSERT INTO `customer` (`name`, `email`, `phone`, `pass`, `book`) VALUES ('Kaustubh Mishra', '8956.kaustubh.secomb@gmail.com', 7796850929, '1618518141', 'kaustubh mishra1618518141.txt'), ('aakash', 'aakash@gmail.com', 83217720982, 'aakash', 'aakashaakash.txt'); -- -------------------------------------------------------- -- -- Table structure for table `inventory` -- DROP TABLE IF EXISTS `inventory`; CREATE TABLE IF NOT EXISTS `inventory` ( `name` varchar(50) NOT NULL, `email` varchar(50) NOT NULL, `phone` bigint(10) NOT NULL, `pass` varchar(50) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `inventory` -- INSERT INTO `inventory` (`name`, `email`, `phone`, `pass`) VALUES ('mitesh jaiman', 'jaimanparivar@gmail.com', 1234567890, 'mitsu'); -- -------------------------------------------------------- -- -- Table structure for table `supply` -- DROP TABLE IF EXISTS `supply`; CREATE TABLE IF NOT EXISTS `supply` ( `departure` varchar(10) NOT NULL, `destination` varchar(10) NOT NULL, `price` int(10) NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- -- Dumping data for table `supply` -- INSERT INTO `supply` (`departure`, `destination`, `price`) VALUES ('London', 'Georgia', 25000), ('Geogia', 'Italy', 10000), ('Paris', 'Georgia', 25000); COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
25.254386
113
0.635637
93daa5ca93588f6628bf0d4615a235bd5a6252d4
232
rs
Rust
src/test/incremental/issue-79890-imported-crates-changed.rs
mbc-git/rust
2c7bc5e33c25e29058cbafefe680da8d5e9220e9
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
66,762
2015-01-01T08:32:03.000Z
2022-03-31T23:26:40.000Z
src/test/incremental/issue-79890-imported-crates-changed.rs
maxrovskyi/rust
51558ccb8e7cea87c6d1c494abad5451e5759979
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
76,993
2015-01-01T00:06:33.000Z
2022-03-31T23:59:15.000Z
src/test/incremental/issue-79890-imported-crates-changed.rs
maxrovskyi/rust
51558ccb8e7cea87c6d1c494abad5451e5759979
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
11,787
2015-01-01T00:01:19.000Z
2022-03-31T19:03:42.000Z
// aux-build:issue-79890.rs // revisions:rpass1 rpass2 rpass3 // compile-flags:--extern issue_79890 --test // edition:2018 // Tests that we don't ICE when the set of imported crates changes #[cfg(rpass2)] use issue_79890::MyTrait;
29
66
0.741379
00f3fd2f41f6aad78c07b049aa09ec5ea44b2be4
1,320
lua
Lua
settlements_mer/init.lua
MoNTE48/settlements
e406791aed7e454aedc85d69c641920d1e14f144
[ "MIT" ]
2
2020-11-28T23:19:12.000Z
2021-07-25T00:06:23.000Z
settlements_mer/init.lua
MoNTE48/settlements
e406791aed7e454aedc85d69c641920d1e14f144
[ "MIT" ]
null
null
null
settlements_mer/init.lua
MoNTE48/settlements
e406791aed7e454aedc85d69c641920d1e14f144
[ "MIT" ]
null
null
null
local modpath = minetest.get_modpath(minetest.get_current_modname()) -- internationalization boilerplate local S, NS = dofile(modpath.."/intllib.lua") local schem_path = modpath.."/schematics/" local coralpalace = { name = "coralpalace", schematic = dofile(schem_path.."coral_palace.lua"), buffer = 2, max_num = 0.1, platform_clear_above = false, } local mer_settlements = { surface_materials = { "default:sand", "default:dirt", }, platform_shallow = "default:sand", platform_deep = "default:stone", platform_air = "default:water_source", building_count_min = 3, building_count_max = 12, altitude_min = -50, altitude_max = -10, replacements = { ["default:coral_orange"] = { "default:coral_orange", "default:coral_brown", }, }, central_schematics = { coralpalace, }, schematics = { coralpalace, { name = "coralhut", schematic = dofile(schem_path.."coral_hut.lua"), buffer = 1, max_num = 1, platform_clear_above = false, }, }, generate_name = function(pos) if minetest.get_modpath("namegen") then return namegen.generate("mer_settlements") end return S("Mer camp") end, } if minetest.get_modpath("namegen") then namegen.parse_lines(io.lines(modpath.."/namegen_mer.cfg")) end settlements.register_settlement("mer", mer_settlements)
19.411765
68
0.697727
a728dd54c3aa2bd44202d831a4d1c786f96e10b6
717
sql
SQL
analysis/mag/journals/DH/journals.sql
dhjournals/code
8e85744325f2938786b88a3143a8ed7ae39f1992
[ "CC-BY-3.0" ]
1
2022-02-04T16:21:45.000Z
2022-02-04T16:21:45.000Z
analysis/mag/journals/DH/journals.sql
dhjournals/code
8e85744325f2938786b88a3143a8ed7ae39f1992
[ "CC-BY-3.0" ]
null
null
null
analysis/mag/journals/DH/journals.sql
dhjournals/code
8e85744325f2938786b88a3143a8ed7ae39f1992
[ "CC-BY-3.0" ]
null
null
null
-- Get all DH pubs drop table if exists dh_pubs_intermediate; create temp table dh_pubs_intermediate as select distinct c.paper_id, a.level, a.id, c.year from dh_journals a join journals b on a.issn_e = b.issn join pubs c on b.journal_id = c.journal_id union select distinct c.paper_id, a.level, a.id, c.year from dh_journals a join journals b on a.issn_p = b.issn join pubs c on b.journal_id = c.journal_id; drop table if exists pubs_per_year; create temp table pubs_per_year as select a.id, a.year, count(*) as pubs from dh_pubs_intermediate a group by a.id, a.year; select a.id, b.title, a.year, a.pubs, b.level from pubs_per_year a join dh_journals b on a.id = b.id where level <= 2 order by a.id, a.year asc;
27.576923
49
0.758717
3edb7899c3f6116cfaaf2bc2dce0eddd9de24c82
4,018
h
C
larq_compute_engine/tflite/kernels/bconv2d_output_transform_utils.h
leonoverweel/compute-engine
cf1af7236b33179d9a014dcaf65271921aad864d
[ "Apache-2.0" ]
null
null
null
larq_compute_engine/tflite/kernels/bconv2d_output_transform_utils.h
leonoverweel/compute-engine
cf1af7236b33179d9a014dcaf65271921aad864d
[ "Apache-2.0" ]
null
null
null
larq_compute_engine/tflite/kernels/bconv2d_output_transform_utils.h
leonoverweel/compute-engine
cf1af7236b33179d9a014dcaf65271921aad864d
[ "Apache-2.0" ]
null
null
null
#ifndef LARQ_COMPUTE_ENGINE_TFLITE_KERNELS_BCONV2D_OUTPUT_TRANSFORM_SETUP #define LARQ_COMPUTE_ENGINE_TFLITE_KERNELS_BCONV2D_OUTPUT_TRANSFORM_SETUP #include "bconv2d_params.h" #include "larq_compute_engine/core/bconv2d_output_transform.h" #include "tensorflow/lite/kernels/internal/tensor.h" #include "tensorflow/lite/kernels/kernel_util.h" using namespace tflite; namespace compute_engine { namespace tflite { namespace bconv2d { using compute_engine::core::OutputTransform; using compute_engine::core::OutputTransformBase; // Fill the parts of the OutputTransform struct that are common to each // destination type void GetBaseParams(TfLiteContext* context, TfLiteNode* node, TfLiteBConv2DParams* params, OutputTransformBase<std::int32_t>& output_transform) { auto input_shape = GetTensorShape(GetInput(context, node, 0)); auto filter_shape = GetTensorShape(GetInput(context, node, 1)); output_transform.backtransform_add = filter_shape.Dims(1) * filter_shape.Dims(2) * params->channels_in; output_transform.clamp_min = params->output_activation_min; output_transform.clamp_max = params->output_activation_max; } // Fill the OutputTransform values for float outputs void GetOutputTransform( TfLiteContext* context, TfLiteNode* node, TfLiteBConv2DParams* params, OutputTransform<std::int32_t, float>& output_transform) { GetBaseParams(context, node, params, output_transform); const auto* post_activation_multiplier = GetInput(context, node, 2); const auto* post_activation_bias = GetInput(context, node, 3); TF_LITE_ASSERT_EQ(post_activation_multiplier->type, kTfLiteFloat32); TF_LITE_ASSERT_EQ(post_activation_bias->type, kTfLiteFloat32); output_transform.post_activation_multiplier = GetTensorData<float>(post_activation_multiplier); output_transform.post_activation_bias = GetTensorData<float>(post_activation_bias); } // Fill the OutputTransform values for bitpacked int32 outputs void GetOutputTransform( TfLiteContext* context, TfLiteNode* node, TfLiteBConv2DParams* params, OutputTransform<std::int32_t, std::int32_t>& output_transform) { GetBaseParams(context, node, params, output_transform); const auto* post_activation_multiplier = GetInput(context, node, 2); const auto* post_activation_bias = GetInput(context, node, 3); if (post_activation_multiplier->type == kTfLiteFloat32 && post_activation_bias->type == kTfLiteFloat32) { output_transform.post_activation_multiplier = GetTensorData<float>(post_activation_multiplier); output_transform.post_activation_bias = GetTensorData<float>(post_activation_bias); } else { // When the post data was stored in int8, then SetupQuantization will have // converted it to float output_transform.post_activation_multiplier = params->scaled_post_activation_multiplier.data(); output_transform.post_activation_bias = params->scaled_post_activation_bias.data(); } } // Fill the OutputTransform values for int8 outputs void GetOutputTransform( TfLiteContext* context, TfLiteNode* node, TfLiteBConv2DParams* params, OutputTransform<std::int32_t, std::int8_t>& output_transform) { GetBaseParams(context, node, params, output_transform); #ifdef LCE_RUN_OUTPUT_TRANSFORM_IN_FLOAT output_transform.effective_post_activation_multiplier = params->scaled_post_activation_multiplier.data(); output_transform.effective_post_activation_bias = params->scaled_post_activation_bias.data(); output_transform.output_zero_point = GetOutput(context, node, 0)->params.zero_point; #else output_transform.output_multiplier = params->output_multiplier.data(); output_transform.output_shift = params->output_shift.data(); output_transform.output_effective_zero_point = params->output_zero_point.data(); #endif } } // namespace bconv2d } // namespace tflite } // namespace compute_engine #endif // LARQ_COMPUTE_ENGINE_TFLITE_KERNELS_BCONV2D_OUTPUT_TRANSFORM_SETUP
42.744681
78
0.788203
16e5a5a1c64fd71a55d16e6551377cdf832152a5
1,406
ts
TypeScript
server/tests/src/controllers/index.controller.spec.ts
MrARC/Mango
9d0449e3f01abf53c495eee144f5e244eb9eb877
[ "MIT" ]
6
2018-12-07T15:30:33.000Z
2020-01-06T21:41:18.000Z
server/tests/src/controllers/index.controller.spec.ts
mxarc/Mango
9d0449e3f01abf53c495eee144f5e244eb9eb877
[ "MIT" ]
1
2019-12-27T18:23:16.000Z
2019-12-27T18:23:16.000Z
server/tests/src/controllers/index.controller.spec.ts
MrARC/Mango
9d0449e3f01abf53c495eee144f5e244eb9eb877
[ "MIT" ]
3
2019-01-14T00:16:47.000Z
2019-05-19T16:32:30.000Z
import * as request from 'supertest'; import * as setup from '../setup'; import { App } from '../../../src/app'; // const app = new App().getAppInstance(); describe('Index API Routes', () => { // ------------------------------------------------------------------------- // Setup up // ------------------------------------------------------------------------- beforeAll(async () => { }); // ------------------------------------------------------------------------- // Tear down // ------------------------------------------------------------------------- afterAll(async () => { }); test('It should sum 4', async () => { const sum = 2 + 2; return expect(sum).toBe(4); }); // ------------------------------------------------------------------------- // Test cases // ------------------------------------------------------------------------- // test('It should response the GET method', async () => { // const response = await request(app).get('/api/v1/'); // return expect(response.status).toBe(200); // }); // test('It should return a body with format', async () => { // const response = await request(app).get('/api/v1/'); // return expect(response.body).toEqual({ // data: 'Welcome to our API endpoint', // statusCode: 200, // }); // }); });
32.697674
80
0.335704
7b1d4ff637812d0b71c46fee2070c427d2242948
438
dart
Dart
taste_cloud_functions/functions/lib/types/user_owned.dart
tasteapp/taste_public
b2d884b405224dd1e74b4462fac2c1f59c1f6ca2
[ "MIT" ]
null
null
null
taste_cloud_functions/functions/lib/types/user_owned.dart
tasteapp/taste_public
b2d884b405224dd1e74b4462fac2c1f59c1f6ca2
[ "MIT" ]
null
null
null
taste_cloud_functions/functions/lib/types/user_owned.dart
tasteapp/taste_public
b2d884b405224dd1e74b4462fac2c1f59c1f6ca2
[ "MIT" ]
1
2021-02-06T07:44:39.000Z
2021-02-06T07:44:39.000Z
import 'package:taste_cloud_functions/taste_functions.dart'; mixin UserOwned implements SnapshotHolder { Future<TasteUser> get user async => TasteUsers.make(await getRef(userReference), transaction); DocumentReference get userReference { final reference = data.getReference('user'); if (reference == null) { throw Exception('Document does not have user: $path ${data.toMap()}'); } return reference; } }
31.285714
76
0.716895
e8f4043d5536bdca2c37406c6cd15241be633a78
21,362
py
Python
tests/test_managedblockchain/test_managedblockchain_proposalvotes.py
junelife/moto
e61d794cbc9c18b06c11014da666e25f3fce637b
[ "Apache-2.0" ]
1
2021-12-12T04:23:06.000Z
2021-12-12T04:23:06.000Z
tests/test_managedblockchain/test_managedblockchain_proposalvotes.py
junelife/moto
e61d794cbc9c18b06c11014da666e25f3fce637b
[ "Apache-2.0" ]
2
2018-08-07T10:47:18.000Z
2018-08-08T15:13:04.000Z
tests/test_managedblockchain/test_managedblockchain_proposalvotes.py
junelife/moto
e61d794cbc9c18b06c11014da666e25f3fce637b
[ "Apache-2.0" ]
null
null
null
from __future__ import unicode_literals import os import boto3 import sure # noqa from freezegun import freeze_time from unittest import SkipTest from moto import mock_managedblockchain, settings from . import helpers @mock_managedblockchain def test_vote_on_proposal_one_member_total_yes(): conn = boto3.client("managedblockchain", region_name="us-east-1") # Create network response = conn.create_network( Name="testnetwork1", Framework="HYPERLEDGER_FABRIC", FrameworkVersion="1.2", FrameworkConfiguration=helpers.default_frameworkconfiguration, VotingPolicy=helpers.default_votingpolicy, MemberConfiguration=helpers.default_memberconfiguration, ) network_id = response["NetworkId"] member_id = response["MemberId"] # Create proposal response = conn.create_proposal( NetworkId=network_id, MemberId=member_id, Actions=helpers.default_policy_actions, ) proposal_id = response["ProposalId"] # Get proposal details response = conn.get_proposal(NetworkId=network_id, ProposalId=proposal_id) response["Proposal"]["NetworkId"].should.equal(network_id) response["Proposal"]["Status"].should.equal("IN_PROGRESS") # Vote yes response = conn.vote_on_proposal( NetworkId=network_id, ProposalId=proposal_id, VoterMemberId=member_id, Vote="YES", ) # List proposal votes response = conn.list_proposal_votes(NetworkId=network_id, ProposalId=proposal_id) response["ProposalVotes"][0]["MemberId"].should.equal(member_id) # Get proposal details - should be APPROVED response = conn.get_proposal(NetworkId=network_id, ProposalId=proposal_id) response["Proposal"]["Status"].should.equal("APPROVED") response["Proposal"]["YesVoteCount"].should.equal(1) response["Proposal"]["NoVoteCount"].should.equal(0) response["Proposal"]["OutstandingVoteCount"].should.equal(0) @mock_managedblockchain def test_vote_on_proposal_one_member_total_no(): conn = boto3.client("managedblockchain", region_name="us-east-1") # Create network response = conn.create_network( Name="testnetwork1", Framework="HYPERLEDGER_FABRIC", FrameworkVersion="1.2", FrameworkConfiguration=helpers.default_frameworkconfiguration, VotingPolicy=helpers.default_votingpolicy, MemberConfiguration=helpers.default_memberconfiguration, ) network_id = response["NetworkId"] member_id = response["MemberId"] # Create proposal response = conn.create_proposal( NetworkId=network_id, MemberId=member_id, Actions=helpers.default_policy_actions, ) proposal_id = response["ProposalId"] # Get proposal details response = conn.get_proposal(NetworkId=network_id, ProposalId=proposal_id) response["Proposal"]["NetworkId"].should.equal(network_id) response["Proposal"]["Status"].should.equal("IN_PROGRESS") # Vote no response = conn.vote_on_proposal( NetworkId=network_id, ProposalId=proposal_id, VoterMemberId=member_id, Vote="NO", ) # List proposal votes response = conn.list_proposal_votes(NetworkId=network_id, ProposalId=proposal_id) response["ProposalVotes"][0]["MemberId"].should.equal(member_id) # Get proposal details - should be REJECTED response = conn.get_proposal(NetworkId=network_id, ProposalId=proposal_id) response["Proposal"]["Status"].should.equal("REJECTED") response["Proposal"]["YesVoteCount"].should.equal(0) response["Proposal"]["NoVoteCount"].should.equal(1) response["Proposal"]["OutstandingVoteCount"].should.equal(0) @mock_managedblockchain def test_vote_on_proposal_yes_greater_than(): conn = boto3.client("managedblockchain", region_name="us-east-1") votingpolicy = { "ApprovalThresholdPolicy": { "ThresholdPercentage": 50, "ProposalDurationInHours": 24, "ThresholdComparator": "GREATER_THAN", } } # Create network response = conn.create_network( Name="testnetwork1", Framework="HYPERLEDGER_FABRIC", FrameworkVersion="1.2", FrameworkConfiguration=helpers.default_frameworkconfiguration, VotingPolicy=votingpolicy, MemberConfiguration=helpers.default_memberconfiguration, ) network_id = response["NetworkId"] member_id = response["MemberId"] response = conn.create_proposal( NetworkId=network_id, MemberId=member_id, Actions=helpers.default_policy_actions, ) proposal_id = response["ProposalId"] # Vote yes response = conn.vote_on_proposal( NetworkId=network_id, ProposalId=proposal_id, VoterMemberId=member_id, Vote="YES", ) # Get the invitation response = conn.list_invitations() invitation_id = response["Invitations"][0]["InvitationId"] # Create the member response = conn.create_member( InvitationId=invitation_id, NetworkId=network_id, MemberConfiguration=helpers.create_member_configuration( "testmember2", "admin", "Admin12345", False, "Test Member 2" ), ) member_id2 = response["MemberId"] # Create another proposal response = conn.create_proposal( NetworkId=network_id, MemberId=member_id, Actions=helpers.default_policy_actions, ) proposal_id = response["ProposalId"] # Vote yes with member 1 response = conn.vote_on_proposal( NetworkId=network_id, ProposalId=proposal_id, VoterMemberId=member_id, Vote="YES", ) # Get proposal details response = conn.get_proposal(NetworkId=network_id, ProposalId=proposal_id) response["Proposal"]["NetworkId"].should.equal(network_id) response["Proposal"]["Status"].should.equal("IN_PROGRESS") # Vote no with member 2 response = conn.vote_on_proposal( NetworkId=network_id, ProposalId=proposal_id, VoterMemberId=member_id2, Vote="NO", ) # Get proposal details response = conn.get_proposal(NetworkId=network_id, ProposalId=proposal_id) response["Proposal"]["Status"].should.equal("REJECTED") @mock_managedblockchain def test_vote_on_proposal_no_greater_than(): conn = boto3.client("managedblockchain", region_name="us-east-1") votingpolicy = { "ApprovalThresholdPolicy": { "ThresholdPercentage": 50, "ProposalDurationInHours": 24, "ThresholdComparator": "GREATER_THAN", } } # Create network response = conn.create_network( Name="testnetwork1", Framework="HYPERLEDGER_FABRIC", FrameworkVersion="1.2", FrameworkConfiguration=helpers.default_frameworkconfiguration, VotingPolicy=votingpolicy, MemberConfiguration=helpers.default_memberconfiguration, ) network_id = response["NetworkId"] member_id = response["MemberId"] response = conn.create_proposal( NetworkId=network_id, MemberId=member_id, Actions=helpers.default_policy_actions, ) proposal_id = response["ProposalId"] # Vote yes response = conn.vote_on_proposal( NetworkId=network_id, ProposalId=proposal_id, VoterMemberId=member_id, Vote="YES", ) # Get the invitation response = conn.list_invitations() invitation_id = response["Invitations"][0]["InvitationId"] # Create the member response = conn.create_member( InvitationId=invitation_id, NetworkId=network_id, MemberConfiguration=helpers.create_member_configuration( "testmember2", "admin", "Admin12345", False, "Test Member 2" ), ) member_id2 = response["MemberId"] # Create another proposal response = conn.create_proposal( NetworkId=network_id, MemberId=member_id, Actions=helpers.default_policy_actions, ) proposal_id = response["ProposalId"] # Vote no with member 1 response = conn.vote_on_proposal( NetworkId=network_id, ProposalId=proposal_id, VoterMemberId=member_id, Vote="NO", ) # Vote no with member 2 response = conn.vote_on_proposal( NetworkId=network_id, ProposalId=proposal_id, VoterMemberId=member_id2, Vote="NO", ) # Get proposal details response = conn.get_proposal(NetworkId=network_id, ProposalId=proposal_id) response["Proposal"]["NetworkId"].should.equal(network_id) response["Proposal"]["Status"].should.equal("REJECTED") @mock_managedblockchain def test_vote_on_proposal_expiredproposal(): if os.environ.get("TEST_SERVER_MODE", "false").lower() == "true": raise SkipTest("Cant manipulate time in server mode") votingpolicy = { "ApprovalThresholdPolicy": { "ThresholdPercentage": 50, "ProposalDurationInHours": 1, "ThresholdComparator": "GREATER_THAN_OR_EQUAL_TO", } } conn = boto3.client("managedblockchain", region_name="us-east-1") with freeze_time("2015-01-01 12:00:00"): # Create network - need a good network response = conn.create_network( Name="testnetwork1", Framework="HYPERLEDGER_FABRIC", FrameworkVersion="1.2", FrameworkConfiguration=helpers.default_frameworkconfiguration, VotingPolicy=votingpolicy, MemberConfiguration=helpers.default_memberconfiguration, ) network_id = response["NetworkId"] member_id = response["MemberId"] response = conn.create_proposal( NetworkId=network_id, MemberId=member_id, Actions=helpers.default_policy_actions, ) proposal_id = response["ProposalId"] with freeze_time("2015-02-01 12:00:00"): # Vote yes - should set status to expired response = conn.vote_on_proposal.when.called_with( NetworkId=network_id, ProposalId=proposal_id, VoterMemberId=member_id, Vote="YES", ).should.throw( Exception, "Proposal {0} is expired and you cannot vote on it.".format(proposal_id), ) # Get proposal details - should be EXPIRED response = conn.get_proposal(NetworkId=network_id, ProposalId=proposal_id) response["Proposal"]["Status"].should.equal("EXPIRED") @mock_managedblockchain def test_vote_on_proposal_status_check(): conn = boto3.client("managedblockchain", region_name="us-east-1") # Create network response = conn.create_network( Name="testnetwork1", Framework="HYPERLEDGER_FABRIC", FrameworkVersion="1.2", FrameworkConfiguration=helpers.default_frameworkconfiguration, VotingPolicy=helpers.default_votingpolicy, MemberConfiguration=helpers.default_memberconfiguration, ) network_id = response["NetworkId"] member_id = response["MemberId"] # Create 2 more members for counter in range(2, 4): response = conn.create_proposal( NetworkId=network_id, MemberId=member_id, Actions=helpers.default_policy_actions, ) proposal_id = response["ProposalId"] # Vote yes response = conn.vote_on_proposal( NetworkId=network_id, ProposalId=proposal_id, VoterMemberId=member_id, Vote="YES", ) memberidlist = [None, None, None] memberidlist[0] = member_id for counter in range(2, 4): # Get the invitation response = conn.list_invitations() invitation_id = helpers.select_invitation_id_for_network( response["Invitations"], network_id, "PENDING" )[0] # Create the member response = conn.create_member( InvitationId=invitation_id, NetworkId=network_id, MemberConfiguration=helpers.create_member_configuration( "testmember" + str(counter), "admin", "Admin12345", False, "Test Member " + str(counter), ), ) member_id = response["MemberId"] memberidlist[counter - 1] = member_id # Should be no more pending invitations response = conn.list_invitations() pendinginvs = helpers.select_invitation_id_for_network( response["Invitations"], network_id, "PENDING" ) pendinginvs.should.have.length_of(0) # Create another proposal response = conn.create_proposal( NetworkId=network_id, MemberId=member_id, Actions=helpers.default_policy_actions, ) proposal_id = response["ProposalId"] # Vote yes with member 1 response = conn.vote_on_proposal( NetworkId=network_id, ProposalId=proposal_id, VoterMemberId=memberidlist[0], Vote="YES", ) # Vote yes with member 2 response = conn.vote_on_proposal( NetworkId=network_id, ProposalId=proposal_id, VoterMemberId=memberidlist[1], Vote="YES", ) # Get proposal details - now approved (2 yes, 1 outstanding) response = conn.get_proposal(NetworkId=network_id, ProposalId=proposal_id) response["Proposal"]["NetworkId"].should.equal(network_id) response["Proposal"]["Status"].should.equal("APPROVED") # Should be one pending invitation response = conn.list_invitations() pendinginvs = helpers.select_invitation_id_for_network( response["Invitations"], network_id, "PENDING" ) pendinginvs.should.have.length_of(1) # Vote with member 3 - should throw an exception and not create a new invitation response = conn.vote_on_proposal.when.called_with( NetworkId=network_id, ProposalId=proposal_id, VoterMemberId=memberidlist[2], Vote="YES", ).should.throw(Exception, "and you cannot vote on it") # Should still be one pending invitation response = conn.list_invitations() pendinginvs = helpers.select_invitation_id_for_network( response["Invitations"], network_id, "PENDING" ) pendinginvs.should.have.length_of(1) @mock_managedblockchain def test_vote_on_proposal_badnetwork(): conn = boto3.client("managedblockchain", region_name="us-east-1") response = conn.vote_on_proposal.when.called_with( NetworkId="n-ABCDEFGHIJKLMNOP0123456789", ProposalId="p-ABCDEFGHIJKLMNOP0123456789", VoterMemberId="m-ABCDEFGHIJKLMNOP0123456789", Vote="YES", ).should.throw(Exception, "Network n-ABCDEFGHIJKLMNOP0123456789 not found") @mock_managedblockchain def test_vote_on_proposal_badproposal(): conn = boto3.client("managedblockchain", region_name="us-east-1") # Create network - need a good network response = conn.create_network( Name="testnetwork1", Framework="HYPERLEDGER_FABRIC", FrameworkVersion="1.2", FrameworkConfiguration=helpers.default_frameworkconfiguration, VotingPolicy=helpers.default_votingpolicy, MemberConfiguration=helpers.default_memberconfiguration, ) network_id = response["NetworkId"] response = conn.vote_on_proposal.when.called_with( NetworkId=network_id, ProposalId="p-ABCDEFGHIJKLMNOP0123456789", VoterMemberId="m-ABCDEFGHIJKLMNOP0123456789", Vote="YES", ).should.throw(Exception, "Proposal p-ABCDEFGHIJKLMNOP0123456789 not found") @mock_managedblockchain def test_vote_on_proposal_badmember(): conn = boto3.client("managedblockchain", region_name="us-east-1") # Create network - need a good network response = conn.create_network( Name="testnetwork1", Framework="HYPERLEDGER_FABRIC", FrameworkVersion="1.2", FrameworkConfiguration=helpers.default_frameworkconfiguration, VotingPolicy=helpers.default_votingpolicy, MemberConfiguration=helpers.default_memberconfiguration, ) network_id = response["NetworkId"] member_id = response["MemberId"] response = conn.create_proposal( NetworkId=network_id, MemberId=member_id, Actions=helpers.default_policy_actions, ) proposal_id = response["ProposalId"] response = conn.vote_on_proposal.when.called_with( NetworkId=network_id, ProposalId=proposal_id, VoterMemberId="m-ABCDEFGHIJKLMNOP0123456789", Vote="YES", ).should.throw(Exception, "Member m-ABCDEFGHIJKLMNOP0123456789 not found") @mock_managedblockchain def test_vote_on_proposal_badvote(): conn = boto3.client("managedblockchain", region_name="us-east-1") # Create network - need a good network response = conn.create_network( Name="testnetwork1", Framework="HYPERLEDGER_FABRIC", FrameworkVersion="1.2", FrameworkConfiguration=helpers.default_frameworkconfiguration, VotingPolicy=helpers.default_votingpolicy, MemberConfiguration=helpers.default_memberconfiguration, ) network_id = response["NetworkId"] member_id = response["MemberId"] response = conn.create_proposal( NetworkId=network_id, MemberId=member_id, Actions=helpers.default_policy_actions, ) proposal_id = response["ProposalId"] response = conn.vote_on_proposal.when.called_with( NetworkId=network_id, ProposalId=proposal_id, VoterMemberId=member_id, Vote="FOO", ).should.throw(Exception, "Invalid request body") @mock_managedblockchain def test_vote_on_proposal_alreadyvoted(): conn = boto3.client("managedblockchain", region_name="us-east-1") votingpolicy = { "ApprovalThresholdPolicy": { "ThresholdPercentage": 50, "ProposalDurationInHours": 24, "ThresholdComparator": "GREATER_THAN", } } # Create network - need a good network response = conn.create_network( Name="testnetwork1", Framework="HYPERLEDGER_FABRIC", FrameworkVersion="1.2", FrameworkConfiguration=helpers.default_frameworkconfiguration, VotingPolicy=votingpolicy, MemberConfiguration=helpers.default_memberconfiguration, ) network_id = response["NetworkId"] member_id = response["MemberId"] response = conn.create_proposal( NetworkId=network_id, MemberId=member_id, Actions=helpers.default_policy_actions, ) proposal_id = response["ProposalId"] # Vote yes response = conn.vote_on_proposal( NetworkId=network_id, ProposalId=proposal_id, VoterMemberId=member_id, Vote="YES", ) # Get the invitation response = conn.list_invitations() invitation_id = response["Invitations"][0]["InvitationId"] # Create the member response = conn.create_member( InvitationId=invitation_id, NetworkId=network_id, MemberConfiguration=helpers.create_member_configuration( "testmember2", "admin", "Admin12345", False, "Test Member 2" ), ) # Create another proposal response = conn.create_proposal( NetworkId=network_id, MemberId=member_id, Actions=helpers.default_policy_actions, ) proposal_id = response["ProposalId"] # Get proposal details response = conn.get_proposal(NetworkId=network_id, ProposalId=proposal_id) response["Proposal"]["NetworkId"].should.equal(network_id) response["Proposal"]["Status"].should.equal("IN_PROGRESS") # Vote yes with member 1 response = conn.vote_on_proposal( NetworkId=network_id, ProposalId=proposal_id, VoterMemberId=member_id, Vote="YES", ) # Vote yes with member 1 again response = conn.vote_on_proposal.when.called_with( NetworkId=network_id, ProposalId=proposal_id, VoterMemberId=member_id, Vote="YES", ).should.throw( Exception, "Member {0} has already voted on proposal {1}.".format(member_id, proposal_id), ) @mock_managedblockchain def test_list_proposal_votes_badnetwork(): conn = boto3.client("managedblockchain", region_name="us-east-1") response = conn.list_proposal_votes.when.called_with( NetworkId="n-ABCDEFGHIJKLMNOP0123456789", ProposalId="p-ABCDEFGHIJKLMNOP0123456789", ).should.throw(Exception, "Network n-ABCDEFGHIJKLMNOP0123456789 not found") @mock_managedblockchain def test_list_proposal_votes_badproposal(): conn = boto3.client("managedblockchain", region_name="us-east-1") # Create network response = conn.create_network( Name="testnetwork1", Framework="HYPERLEDGER_FABRIC", FrameworkVersion="1.2", FrameworkConfiguration=helpers.default_frameworkconfiguration, VotingPolicy=helpers.default_votingpolicy, MemberConfiguration=helpers.default_memberconfiguration, ) network_id = response["NetworkId"] member_id = response["MemberId"] response = conn.list_proposal_votes.when.called_with( NetworkId=network_id, ProposalId="p-ABCDEFGHIJKLMNOP0123456789", ).should.throw(Exception, "Proposal p-ABCDEFGHIJKLMNOP0123456789 not found")
31.836066
87
0.679805
6b58f694ef116a74ccf47cfd7d850421c966442c
8,058
swift
Swift
Sources/TYInterfaceKit/Elements/Slider/SliderElement.swift
alexxjk/TYInterfaceKit
278dab15b277334f2b4ec4566e4135ae61abda40
[ "MIT" ]
null
null
null
Sources/TYInterfaceKit/Elements/Slider/SliderElement.swift
alexxjk/TYInterfaceKit
278dab15b277334f2b4ec4566e4135ae61abda40
[ "MIT" ]
null
null
null
Sources/TYInterfaceKit/Elements/Slider/SliderElement.swift
alexxjk/TYInterfaceKit
278dab15b277334f2b4ec4566e4135ae61abda40
[ "MIT" ]
null
null
null
// // File.swift // // // Created by Alexander Martirosov on 5/2/20. // import UIKit public protocol SliderElement: Element { var props: SliderElementProps? { get set } var doOnValueChanged: ((_ value: Float) -> Void)? { get } var doOnValueChanging: ((_ value: Float) -> Void)? { get } var doOnInteractionStarted: (() -> Void)? { get } } public class SliderElementDefault: ElementView, SliderElement { private var backgroundColorOnAppearing: UIColor? private var isInInteractionState = false private var totalProgress: ProgressElement! private var currentProgress: ProgressElement! private let progressBarPadding: Float = 12 private var thumb: Thumb! private var thumpLeft: Pin! var thumbImage: UIImage? var progressColor: UIColor? var wrappedInContainer: Bool = true public var doOnValueChanged: ((_ value: Float) -> Void)? public var doOnValueChanging: ((_ value: Float) -> Void)? public var doOnInteractionStarted: (() -> Void)? var doOnInteractionEnded: (() -> Void)? public var props: SliderElementProps? { didSet { guard props != oldValue else { return } updateThumb() } } public required init(configurator: ElementViewConfigurator) { super.init(configurator: configurator) preservesSuperviewLayoutMargins = true corners = CornerRadius(value: 4, topRight: true, bottomRight: false, bottomLeft: false, topLeft: true) } required public init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } override public func setup() { super.setup() setupElements() } override public func doOnAppeared() { super.doOnAppeared() updateThumb() thumpLeft = thumb.pin(for: .centerLeading) } override public func layoutSubviews() { super.layoutSubviews() updateThumb() } private func updateThumb(){ guard let props = props else { return } let newOffset = offset(fromValue: props.value) totalProgress.update(pin: .leading()) totalProgress.update(pin: .trailing()) thumb.update(pin: Pin(toElement: totalProgress, type: .centerLeading, offset: newOffset)) } private func offset(fromValue value: Float) -> Float { let offset = (totalProgress.width - 2 * progressBarPadding) * value + progressBarPadding return offset } private func setupElements() { totalProgress = addElement { ProgressElement.Maker() .pin(at: .top(offset: wrappedInContainer ? 30 : Thumb.radius - ProgressElement.height / 2.0)) } currentProgress = addElement { ProgressElement.Maker() .progressColor(progressColor) .filled(true) .pin(at: .leading(toElement: totalProgress)) .pin(at: Pin(toElement: totalProgress, type: .centerVerticaly)) } thumb = addElement { Thumb.Maker() .background(progressColor ?? .clear) .image(thumbImage) .pin(at: Pin(toElement: totalProgress, type: .centerVerticaly)) } thumpLeft = thumb.update(pin: Pin( toElement: totalProgress, type: .centerLeading, offset: offset(fromValue: props?.value ?? 0) )) thumb.addGestureRecognizer(UIPanGestureRecognizer(target: self, action: #selector(handleThumbPan(_:)))) currentProgress.update(pin: Pin(toElement: thumb, type: .trailing)) } @objc private func handleThumbPan(_ gestureRecognizer : UIPanGestureRecognizer) { let translation = gestureRecognizer.translation(in: self) switch gestureRecognizer.state { case .began: thumpLeft = thumb.pin(for: .centerLeading) isInInteractionState = true doOnInteractionStarted?() case .changed: let offset = max( progressBarPadding, min(thumpLeft.offset + Float(translation.x), totalProgress.width - progressBarPadding) ) let value = (offset - progressBarPadding) / (totalProgress.width - 2 * progressBarPadding) props = SliderElementProps(value: value) doOnValueChanging?(value) case .ended: isInInteractionState = false let value = (currentProgress.width - Thumb.radius - progressBarPadding) / (totalProgress.width - 2 * progressBarPadding) doOnValueChanged?(value) thumpLeft = thumb.pin(for: .centerLeading) doOnInteractionEnded?() case .cancelled: isInInteractionState = false thumpLeft = thumb.pin(for: .centerLeading) doOnInteractionEnded?() default: break } } class ProgressElement: ElementView { static var height: Float = 6 required init(configurator: ElementViewConfigurator) { super.init(configurator: configurator) corners = CornerRadius(value: 3) } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } class Maker: ElementMaker<ProgressElement> { private var filled: Bool = false private var progressColor: UIColor? func filled(_ filled: Bool) -> Self { self.filled = filled return self } func progressColor(_ progressColor: UIColor?) -> Self { self.progressColor = progressColor return self } override func make() -> SliderElementDefault.ProgressElement { let element = super.make() element.backgroundColor = filled ? (progressColor ?? .clear) : UIColor(hex: 0xF7DAE8) return element } override init() { super.init() _ = height(ProgressElement.height) } } } class Thumb: ImageElementImpl { private let heightConstant: Float = Thumb.radius * 2.0 required init(configurator: ElementViewConfigurator) { super.init(configurator: configurator) height = heightConstant width = heightConstant contentMode = .center corners = CornerRadius(value: heightConstant / 2.0) } required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } static var radius: Float = 15 class Maker: ImageElementMaker<Thumb> { } override func point(inside point: CGPoint, with event: UIEvent?) -> Bool { let minSize: CGFloat = 44 if bounds.width >= minSize && bounds.height >= minSize { return super.point(inside: point, with: event) } let verticalInsets = (minSize - bounds.height) / 2.0 let horizontalInsets = (minSize - bounds.width) / 2.0 let largerArea = CGRect( x: bounds.origin.x - horizontalInsets, y: bounds.origin.y - verticalInsets, width: bounds.width + 2.0 * horizontalInsets, height: bounds.height + 2.0 * verticalInsets ) return largerArea.contains(point) } } } public struct SliderElementProps: Equatable { public let value: Float public init(value: Float) { self.value = value } }
31.354086
111
0.566021
4d84180762b79aeacf30f6fe5451f2074412cc64
532
html
HTML
TodoMEAN/public/templates/todos.add.ng.html
bozhink/Todo
e470843153a4571f38393ad221919af83637a7d3
[ "Apache-2.0" ]
null
null
null
TodoMEAN/public/templates/todos.add.ng.html
bozhink/Todo
e470843153a4571f38393ad221919af83637a7d3
[ "Apache-2.0" ]
null
null
null
TodoMEAN/public/templates/todos.add.ng.html
bozhink/Todo
e470843153a4571f38393ad221919af83637a7d3
[ "Apache-2.0" ]
null
null
null
<fieldset ng-init="init()"> <legend>Add new Todo</legend> <div class="form-group"> <label for="tb-todo-text">Text:</label> <input type="text" class="form-control" id="tb-todo-text" ng-model="text" /> </div> <div class="form-group"> <label for="tb-todo-category">Category:</label> <input type="text" id="tb-todo-category" class="form-control" ng-model="category" /> </div> <button class="form-control btn btn-primary" id="btn-todo-add" ng-click="add()">Add</button> </fieldset>
44.333333
96
0.616541
b41786383d93ba6c635e558fb7ef15ff04296861
719
swift
Swift
BeeFun/BeeFun/Model/Network/ObjErropReponse.swift
silvrwolfboy/BeeFun-Pro
7e279381a2af0ffc0f15e45e97d156e72409b28f
[ "BSD-4-Clause" ]
153
2016-03-24T05:38:24.000Z
2017-03-28T10:47:09.000Z
BeeFun/BeeFun/Model/Network/ObjErropReponse.swift
silvrwolfboy/BeeFun-Pro
7e279381a2af0ffc0f15e45e97d156e72409b28f
[ "BSD-4-Clause" ]
2
2017-04-07T04:36:35.000Z
2017-04-11T02:11:22.000Z
BeeFun/BeeFun/Model/Network/ObjErropReponse.swift
wenghengcong/Coderpursue
7e279381a2af0ffc0f15e45e97d156e72409b28f
[ "BSD-4-Clause" ]
24
2016-01-21T13:44:00.000Z
2017-02-12T01:58:17.000Z
// // ObjErropReponse.swift // BeeFun // // Created by WengHengcong on 3/8/16. // Copyright © 2016 JungleSong. All rights reserved. // import UIKit import ObjectMapper /* { "message": "Validation Failed", "errors": [ { "resource": "Search", "field": "q", "code": "missing" } ], "documentation_url": "https://developer.github.com/v3/search" } */ class ObjErropReponse: NSObject, Mappable { var message: String? var errors: [ObjError]? var documentationUrl: String? required init?(map: Map) { } func mapping(map: Map) { // super.mapping(map) message <- map["message"] errors <- map["errors"] documentationUrl <- map["documentation_url"] } }
15.977778
61
0.614743
16d9f2d8112ea53847dc39b217f24e50b2ee4cf3
604
sql
SQL
sql/_23_apricot_qa/_03_i18n/tr_TR/_10_cast_op/cases/011.sql
Zhaojia2019/cubrid-testcases
475a828e4d7cf74aaf2611fcf791a6028ddd107d
[ "BSD-3-Clause" ]
9
2016-03-24T09:51:52.000Z
2022-03-23T10:49:47.000Z
sql/_23_apricot_qa/_03_i18n/tr_TR/_10_cast_op/cases/011.sql
Zhaojia2019/cubrid-testcases
475a828e4d7cf74aaf2611fcf791a6028ddd107d
[ "BSD-3-Clause" ]
173
2016-04-13T01:16:54.000Z
2022-03-16T07:50:58.000Z
sql/_23_apricot_qa/_03_i18n/tr_TR/_10_cast_op/cases/011.sql
Zhaojia2019/cubrid-testcases
475a828e4d7cf74aaf2611fcf791a6028ddd107d
[ "BSD-3-Clause" ]
38
2016-03-24T17:10:31.000Z
2021-10-30T22:55:45.000Z
--+ holdcas on; set names utf8; set system parameters 'intl_number_lang = tr_TR'; set system parameters 'intl_date_lang = tr_TR'; create table t1 (i int unique, b1 blob, c1 clob); --test insert into t1 values (1,bit_to_blob(X'C4E3BAC3'),char_to_clob('tr_Çç_Ğğ_İı_Öö_Şş_Üü你好')); --test insert into t1 values (2,bit_to_blob(X'E4B8A5'),char_to_clob('test你好Çç_Ğğ_İı_Öö_Şş_Üü')); --test select i, blob_to_bit(b1), clob_to_char(c1) from t1 order by 1; drop table t1; set system parameters 'intl_date_lang = en_US'; set system parameters 'intl_number_lang = en_US'; set names iso88591; commit; --+ holdcas off;
33.555556
90
0.761589
fb39c9bd1590a4e87376c1f88075024f16c1d0b9
2,356
h
C
include/BOptrMultiParticleChangeCrossSection.h
sheze/AlphaNeutronSim
3b09f8cf20540b27ab567256512c634538674499
[ "MIT" ]
null
null
null
include/BOptrMultiParticleChangeCrossSection.h
sheze/AlphaNeutronSim
3b09f8cf20540b27ab567256512c634538674499
[ "MIT" ]
null
null
null
include/BOptrMultiParticleChangeCrossSection.h
sheze/AlphaNeutronSim
3b09f8cf20540b27ab567256512c634538674499
[ "MIT" ]
null
null
null
#pragma once #include "G4VBiasingOperator.hh" #include <map> class BOptrChangeCrossSection; class G4ParticleDefinition; class BOptrMultiParticleChangeCrossSection : public G4VBiasingOperator { public: BOptrMultiParticleChangeCrossSection(); virtual ~BOptrMultiParticleChangeCrossSection(); void AddParticle(std::string particleName); // It is called at the time a tracking of a particle starts void StartTracking(const G4Track* aTrack); // For print std::map<const G4ParticleDefinition*, BOptrChangeCrossSection*> GetOperation() { return fBOptrForParticle; } private: virtual G4VBiasingOperation* ProposeOccurenceBiasingOperation(const G4Track* aTrack, const G4BiasingProcessInterface* callingProcess); // Methods not used but must be implemented virtual G4VBiasingOperation* ProposeFinalStateBiasingOperation(const G4Track*, const G4BiasingProcessInterface*) { return 0; } virtual G4VBiasingOperation* ProposeNonPhysicsBiasingOperation(const G4Track*, const G4BiasingProcessInterface*) { return 0; } using G4VBiasingOperator::OperationApplied; // This method is called to inform the operator that a proposed operation has been applied // In the present case, it means that a physical interaction occured // (Interaction at PostStepDoIt level) : virtual void OperationApplied(const G4BiasingProcessInterface* callingProcess, G4BiasingAppliedCase biasingCase, G4VBiasingOperation* occurenceOperationApplied, G4double weightForOccurenceInteraction, G4VBiasingOperation* finalStateOperationApplied, const G4VParticleChange* particleChangeProduced); std::map<const G4ParticleDefinition*, BOptrChangeCrossSection*> fBOptrForParticle; std::vector<const G4ParticleDefinition*> fParticlesToBias; BOptrChangeCrossSection* fCurrentOperator; // Count numer of biased interactions for current track int fnInteractions; };
40.62069
98
0.649406
f720508fde8f3279e71600f9555980fc38df1855
937
h
C
TransitionDemo/Modal/HXModalOverlayAnimationController.h
rockerhx/TransitionDemo
1fa2267ba7abfe12ae9210ffa9fbbac90caa9c97
[ "MIT" ]
null
null
null
TransitionDemo/Modal/HXModalOverlayAnimationController.h
rockerhx/TransitionDemo
1fa2267ba7abfe12ae9210ffa9fbbac90caa9c97
[ "MIT" ]
null
null
null
TransitionDemo/Modal/HXModalOverlayAnimationController.h
rockerhx/TransitionDemo
1fa2267ba7abfe12ae9210ffa9fbbac90caa9c97
[ "MIT" ]
null
null
null
// // HXModalOverlayAnimationController.h // Piano // // Created by miaios on 16/5/30. // Copyright © 2016年 Mia Music. All rights reserved. // #import <UIKit/UIKit.h> static NSTimeInterval HXModalTransitionDuration = 0.4f; typedef NS_ENUM(NSUInteger, HXModalDirection) { HXModalDirectionDefault = 0, HXModalDirectionTop = 1, HXModalDirectionBottom = HXModalDirectionDefault, HXModalDirectionLeft = 2, HXModalDirectionRight = 3, }; @interface HXModalOverlayAnimationController : NSObject <UIViewControllerAnimatedTransitioning> @property (nonatomic, assign, readonly) HXModalDirection direction; @property (nonatomic, assign, readonly) NSTimeInterval transitionDuration; + (instancetype)instance; + (instancetype)instanceWithDirection:(HXModalDirection)direction; + (instancetype)instanceWithDirection:(HXModalDirection)direction transitionDuration:(NSTimeInterval)transitionDuration; @end
27.558824
120
0.781217
75fcffbefe3633da6b32573520886ec07f739c08
14,402
php
PHP
Application/Runtime/Cache/Admin/6fedbbe541e195344bf1450076482852.php
181675232/thb
366394e3f1bb5edc9da01f0d24316b8b7d241ea6
[ "BSD-2-Clause" ]
null
null
null
Application/Runtime/Cache/Admin/6fedbbe541e195344bf1450076482852.php
181675232/thb
366394e3f1bb5edc9da01f0d24316b8b7d241ea6
[ "BSD-2-Clause" ]
null
null
null
Application/Runtime/Cache/Admin/6fedbbe541e195344bf1450076482852.php
181675232/thb
366394e3f1bb5edc9da01f0d24316b8b7d241ea6
[ "BSD-2-Clause" ]
null
null
null
<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>后台管理系统</title> <link href="/Public/admin/base.css" rel="stylesheet" type="text/css" /> <link href="/Public/admin/layout.css" rel="stylesheet" type="text/css" /> <link href="/Public/admin/admin.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="/Public/js/jquery-1.10.2.min.js"></script> <link rel="Bookmark" href="favicon.ico" > <link rel="Shortcut Icon" href="favicon.ico" /> <script type="text/javascript"> //页面加载完成时 $(function () { //检测IE if ('undefined' == typeof(document.body.style.maxHeight)){ window.location.href = 'ie6update.html'; } loadMenuTree(true); //加载管理首页左边导航菜单 }); //页面尺寸改变时 $(window).resize(function () { navresize(); }); //加载管理首页左边导航菜单 function loadMenuTree(_islink) { //判断是否跳转链接 var islink = false; if (arguments.length == 1 && _islink) { islink = true; } //发送AJAX请求 $.ajax({ type: "post", url: "/Admin/Nav/nav", dataType: "html", success: function (data, textStatus) { //将得到的数据插件到页面中 $("#sidebar-nav .list-box").html(data); $("#pop-menu .list-box").html(data); //初始化导航菜单 initMenuTree(islink); initPopMenuTree(); //设置左边导航滚动条 $("#sidebar-nav").niceScroll({ touchbehavior: false, cursorcolor: "#7C7C7C", cursoropacitymax: 0.6, cursorwidth: 5 }); $("#pop-menu .list-box").niceScroll({ touchbehavior: false, cursorcolor: "#7C7C7C", cursoropacitymax: 0.6, cursorwidth: 5 }); $("#pop-menu .list-box").getNiceScroll().hide(); //设置主导航菜单显示和隐藏 navresize(); } }); } //初始化导航菜单 function initMenuTree(islink) { //先清空NAV菜单内容 $("#nav").html(''); $("#sidebar-nav .list-box .list-group").each(function (i) { //添加菜单导航 var navHtml = $('<li><i class="icon-' + i + '"></i><span>' + $(this).attr("name") + '</span></li>').appendTo($("#nav")); //默认选中第一项 if (i == 0) { $(this).show(); navHtml.addClass("selected"); } //为菜单添加事件 navHtml.click(function () { $("#nav li").removeClass("selected"); $(this).addClass("selected"); $("#sidebar-nav .list-box .list-group").hide(); $("#sidebar-nav .list-box .list-group").eq($("#nav li").index($(this))).show(); }); //为H2添加事件 $(this).children("h2").click(function () { if ($(this).next("ul").css('display') != 'none') { return false; } $(this).siblings("ul").slideUp(300); $(this).next("ul").slideDown(300); //展开第一个菜单 if ($(this).next("ul").children("li").first().children("ul").length > 0) { //$(this).next("ul").children("li").first().children("a").children(".expandable").last().removeClass("close"); //$(this).next("ul").children("li").first().children("a").children(".expandable").last().addClass("open"); //$(this).next("ul").children("li").first().children("ul").first().show(); } }); //首先隐藏所有的UL $(this).find("ul").hide(); //绑定树菜单事件.开始 $(this).find("ul").each(function (j) { //遍历所有的UL //遍历UL第一层LI $(this).children("li").each(function () { liObj = $(this); //插入选中的三角 var spanObj = liObj.children("a").children("span"); $('<div class="arrow"></div>').insertBefore(spanObj); //插入到span前面 //判断是否有子菜单和设置距左距离 var parentExpandableLen = liObj.parent().parent().children("a").children(".expandable").length; //父节点的左距离 if (liObj.children("ul").length > 0) { //如果有下级菜单 //删除链接,防止跳转 liObj.children("a").removeAttr("href"); //更改样式 liObj.children("a").addClass("pack"); //设置左距离 var lastExpandableObj; for (var n = 0; n <= parentExpandableLen; n++) { //注意<= lastExpandableObj = $('<div class="expandable"></div>').insertBefore(spanObj); //插入到span前面 } //设置最后一个为闭合+号 lastExpandableObj.addClass("close"); //创建和设置文件夹图标 $('<div class="folder close"></div>').insertBefore(spanObj); //插入到span前面 //隐藏下级的UL liObj.children("ul").hide(); //绑定单击事件 liObj.children("a").click(function () { //搜索所有同级LI且有子菜单的左距离图标为+号及隐藏子菜单 $(this).parent().siblings().each(function () { //alert($(this).html()); if ($(this).children("ul").length > 0) { //设置自身的左距离图标为+号 $(this).children("a").children(".expandable").last().removeClass("open"); $(this).children("a").children(".expandable").last().addClass("close"); //隐藏自身子菜单 $(this).children("ul").slideUp(300); } }); //设置自身的左距离图标为-号 $(this).children(".expandable").last().removeClass("close"); $(this).children(".expandable").last().addClass("open"); //显示自身父节点的UL子菜单 $(this).parent().children("ul").slideDown(300); }); } else { //设置左距离 for (var n = 0; n < parentExpandableLen; n++) { $('<div class="expandable"></div>').insertBefore(spanObj); //插入到span前面 } //创建和设置文件夹图标 $('<div class="folder open"></div>').insertBefore(spanObj); //插入到span前面 //绑定单击事件 liObj.children("a").click(function () { //删除所有的选中样式 $("#sidebar-nav .list-box .list-group ul li a").removeClass("selected"); //自身添加样式 $(this).addClass("selected"); //保存到cookie addCookie("dt_manage_navigation_cookie", $(this).attr("navid"), 240); }); } }); //显示第一个UL if (j == 0) { $(this).show(); //展开第一个菜单 if ($(this).children("li").first().children("ul").length > 0) { $(this).children("li").first().children("a").children(".expandable").last().removeClass("close"); $(this).children("li").first().children("a").children(".expandable").last().addClass("open"); $(this).children("li").first().children("ul").show(); } } }); //绑定树菜单事件.结束 }); //定位或跳转到相应的菜单 linkMenuTree(islink); } //定位或跳转到相应的菜单 function linkMenuTree(islink, navid) { //读取Cookie,如果存在该ID则定位到对应的导航 var cookieObj; var argument = arguments.length; if (argument == 2) { cookieObj = $("#sidebar-nav").find('a[navid="' + navid + '"]'); } else { cookieObj = $("#sidebar-nav").find('a[navid="' + getCookie("dt_manage_navigation_cookie") + '"]'); } if (cookieObj.length > 0) { //显示所在的导航和组 var indexNum = $("#sidebar-nav .list-box .list-group").index(cookieObj.parents(".list-group")); $("#nav li").removeClass("selected"); $("#nav li").eq(indexNum).addClass("selected"); cookieObj.parents(".list-group").siblings().hide(); cookieObj.parents(".list-group").show(); //遍历所有的LI父节点 cookieObj.parents("li").each(function () { //搜索所有同级LI且有子菜单的左距离图标为+号及隐藏子菜单 $(this).siblings().each(function () { if ($(this).children("ul").length > 0) { //设置自身的左距离图标为+号 $(this).children("a").children(".expandable").last().removeClass("open"); $(this).children("a").children(".expandable").last().addClass("close"); //隐藏自身子菜单 $(this).children("ul").hide(); } }); //设置自身的左距离图标为-号 if ($(this).children("ul").length > 0) { $(this).children("a").children(".expandable").last().removeClass("close"); $(this).children("a").children(".expandable").last().addClass("open"); } //显示自身的UL $(this).children("ul").show(); }); //显示最后一个父节点UL,隐藏兄弟UL cookieObj.parents("ul").eq(-1).show(); cookieObj.parents("ul").eq(-1).siblings("ul").hide(); //删除所有的选中样式 $("#sidebar-nav .list-box .list-group ul li a").removeClass("selected"); //自身添加样式 cookieObj.addClass("selected"); //检查是否需要保存到cookie if (argument == 2) { addCookie("dt_manage_navigation_cookie", navid, 240); } //检查是否需要跳转链接 if (islink == true) { frames["mainframe"].location.href = cookieObj.attr("href"); } } else if (argument == 2) { //删除所有的选中样式 $("#sidebar-nav .list-box .list-group ul li a").removeClass("selected"); //保存到cookie addCookie("dt_manage_navigation_cookie", "", 240); } } //初始化快捷导航菜单 function initPopMenuTree() { var divWidth = $("#pop-menu .list-box .list-group").length * $("#pop-menu .list-box .list-group").outerWidth(); var divHeight = $(window).height() * 0.6; //如果计算的宽度大于浏览器当前窗口可视宽度 if (divWidth > ($(window).width() - 60)) { divWidth = $(window).width() - 60; } //计算实际的高度 var groupHeight = 0; $("#pop-menu .list-box .list-group").each(function () { if ($(this).height() > groupHeight) { groupHeight = $(this).height(); } }); if (divHeight > groupHeight) { divHeight = groupHeight; } $("#pop-menu .list-box .list-group").height(groupHeight); $("#pop-menu .pop-box").width(divWidth); $("#pop-menu .pop-box").height(divHeight); //遍历及加载事件 $("#pop-menu .pop-box .list-box li").each(function () { var linkObj = $(this).children("a"); linkObj.removeAttr("href"); if ($(this).children("ul").length > 0) { //如果无下级菜单 linkObj.addClass("nolink"); }else{ linkObj.addClass("link"); linkObj.click(function () { linkMenuTree(true, linkObj.attr("navid")); //加载函数 }); } }); } //快捷菜单的显示与隐藏 function triggerMenu(isShow) { if (isShow) { $("#pop-menu .list-box").getNiceScroll().show(); $("#pop-menu").css("visibility", "visible"); } else { $("#pop-menu .list-box").getNiceScroll().hide(); $("#pop-menu").css("visibility", "hidden"); } } //导航菜单显示和隐藏 function navresize() { var docWidth = $(document).width(); if (docWidth < 1004) { $(".nav li span").hide(); } else { $(".nav li span").show(); } } </script> </head> <body class="indexbody"> <form id="form1"> <!--全局菜单--> <a class="btn-paograms" onclick="triggerMenu(true);"></a> <div id="pop-menu" class="pop-menu"> <div class="pop-box"> <h1 class="title"><i></i>导航菜单</h1> <i class="close" onclick="triggerMenu(false);">关闭</i> <div class="list-box"></div> </div> <i class="arrow">箭头</i> </div> <!--/全局菜单--> <div class="header"> <div class="header-box"> <h1 class="logo"></h1> <ul id="nav" class="nav"></ul> <div class="nav-right"> <div class="icon-info"> <span> 您好,<?php echo (session('username')); ?><br /> <?php echo ($usergroup["name"]); ?> </span> </div> <div class="icon-option"> <i></i> <div class="drop-box"> <div class="arrow"></div> <ul class="drop-item"> <!--<li><a target="_blank" href="../">预览网站</a></li>--> <li><a href="/Admin/Index/center" target="mainframe">管理中心</a></li> <li><a href="/Admin/Admin/editpass" target="mainframe">修改密码</a></li> <li><a href="/Admin/Public/logout">注销登录</a></li> </ul> </div> </div> </div> </div> </div> <div class="main-sidebar"> <div id="sidebar-nav" class="sidebar-nav"> <div class="list-box"></div> </div> </div> <div class="main-container"> <iframe id="mainframe" name="mainframe" frameborder="0" src="/Admin/Index/center"></iframe> </div> </form> </body> </html>
42.483776
165
0.446744
1769e0c3a17a1d74ffcc49ded990efcf77f14062
5,385
html
HTML
app/templates/text_submit.html
SalesAppi/JPSSM
af41cfed1a30851b65e5efcc509773c65ead5508
[ "MIT" ]
1
2022-03-01T08:15:28.000Z
2022-03-01T08:15:28.000Z
app/templates/text_submit.html
SalesAppi/JPSSM
af41cfed1a30851b65e5efcc509773c65ead5508
[ "MIT" ]
null
null
null
app/templates/text_submit.html
SalesAppi/JPSSM
af41cfed1a30851b65e5efcc509773c65ead5508
[ "MIT" ]
1
2020-12-14T05:00:28.000Z
2020-12-14T05:00:28.000Z
<!DOCTYPE html> <html> <head> <!-- Favicon --> <!--link rel="shortcut icon" href="{{url_for('static', filename='images/favicon.ico')}}"--> <!-- JQuery --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <!-- Bootstrap --> <link rel="stylesheet" type="text/css" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"> <script type = "text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script> <script type = "text/javascript" src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script> <script type = "text/javascript" src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.bundle.min.js"></script> <!-- Datatable --> <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.20/css/jquery.dataTables.min.css"> <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/responsive/2.2.3/css/responsive.dataTables.min.css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.11.2/moment.min.js"></script> <script type = "text/javascript" src="https://cdn.datatables.net/1.10.20/js/jquery.dataTables.min.js"></script> <script type = "text/javascript" src="https://cdn.datatables.net/responsive/2.2.3/js/dataTables.responsive.min.js"></script> <script type = "text/javascript" src="https://cdn.datatables.net/plug-ins/1.10.15/dataRender/datetime.js"></script> <meta charset="UTF-8"> </head> <STYLE type="text/css"> h2 { text-align: center} </STYLE> <body> <h2>Text analysis</h2> <p>Paste the text you want to analyze inside the form below and hit 'Submit text' button. You may paste a long text (we tested it up to 20.0000 words, roughly 150.000 characters). Note that the model has been developed on bodies of the JPSSM articles. Hence, avoid pasting a text with a list of references.</p> <div class="card"> <div class="card-body"> <form method="post"> <textarea class="form-control" rows="5" name="user_txt"></textarea> <button class="btn btn-success mt-2">Submit text</button> </form> <div class="mt-4"> {% if request.method == 'POST'%} <table id="results" class="display table nowrap responsive" style="width: 100%"> <thead> <tr> {% for header in result.keys() %} <th> {{header}}</th> {% endfor %} </tr> </thead> <tbody> <tr> {% for i in dane %} <td> {{ i }} </td> {% endfor %} </tr> </tbody> </table> <p>Note: weights below .07 should be considered not significant.</p> <p>Tables below are showing top 10 references from 3 topics with the highest match.</p> </div> <!-- Insert table 1 with topic results --> <div class="mt-8"> <table id="topics" class="display table nowrap responsive" style="width: 100%"> <thead> <tr> {% for head in to_display_dict.keys() %} <th> {{head}}</th> {% endfor %} </tr> </thead> <tbody> {% for row in result_records %} <tr> {% for cell in row %} <td>{{ cell }}</td> {% endfor %} </tr> {% endfor %} </tbody> </table> </div> <div> <table id="topics1" class="display table nowrap responsive" style="width: 100%"> <thead> <tr> {% for head in to_display_dict2.keys() %} <th> {{head}}</th> {% endfor %} </tr> </thead> <tbody> {% for row in result_records2 %} <tr> {% for cell in row %} <td>{{ cell }}</td> {% endfor %} </tr> {% endfor %} </tbody> </table> </div> <div> <table id="topics2" class="display table nowrap responsive" style="width: 100%"> <thead> <tr> {% for head in to_display_dict3.keys() %} <th> {{head}}</th> {% endfor %} </tr> </thead> <tbody> {% for row in result_records3 %} <tr> {% for cell in row %} <td>{{ cell }}</td> {% endfor %} </tr> {% endfor %} </tbody> </table>> </div> {% endif %} </div> </div> </div> </body> <script type="text/javascript"> $('#topics').DataTable(); $('#topics1').DataTable(); $('#topics2').DataTable(); </script> </html>
39.888889
314
0.470195
47f597b2cd59f51af234b50e33ddfbab79b39800
738
css
CSS
styles/globals.css
rolandsfr/velomod
0bae4d1dfff7085357361413cd885321a0c94fce
[ "MIT" ]
null
null
null
styles/globals.css
rolandsfr/velomod
0bae4d1dfff7085357361413cd885321a0c94fce
[ "MIT" ]
null
null
null
styles/globals.css
rolandsfr/velomod
0bae4d1dfff7085357361413cd885321a0c94fce
[ "MIT" ]
null
null
null
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;500;700&display=swap"); @font-face { font-family: Neutral; src: url("../styles/fonts/NeutralFace.otf"); font-weight: normal; } @font-face { font-family: Neutral; src: url("../styles/fonts/NeutralFace-Bold.otf"); font-weight: bold; } * { font-family: "Open Sans"; } html { font-size: 10px; } html, body { padding: 0; margin: 0; font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; width: 100%; overflow-x: hidden; } li, p, a, span { font-size: 1.6rem; } a { color: inherit; text-decoration: none; } * { box-sizing: border-box; }
15.375
96
0.653117
3bf7d5c80045cd813e7318eb4b8805da48c6e4b2
17,825
c
C
assignment/Assignment3/src/cfork.c
ritesh99rakesh/Operating-Systems
c3c0e1a8d7f7d2e6ed914e49cb50c2ea51718a55
[ "MIT" ]
1
2021-08-28T13:14:41.000Z
2021-08-28T13:14:41.000Z
assignment/Assignment3/src/cfork.c
ritesh99rakesh/Operating-Systems
c3c0e1a8d7f7d2e6ed914e49cb50c2ea51718a55
[ "MIT" ]
null
null
null
assignment/Assignment3/src/cfork.c
ritesh99rakesh/Operating-Systems
c3c0e1a8d7f7d2e6ed914e49cb50c2ea51718a55
[ "MIT" ]
null
null
null
//#include <cfork.h> //#include <page.h> //#include <mmap.h> // //void vm_area_init(struct vm_area *vm_area, struct vm_area *vm_area_next, u64 start, u64 end, int prot); // ///* You need to implement cfork_copy_mm which will be called from do_cfork in entry.c. Don't remove copy_os_pts()*/ //void cfork_copy_mm(struct exec_context *child, struct exec_context *parent) { // // struct mm_segment *code_seg; // void *os_addr; // u64 var_addr; // child->pgd = os_pfn_alloc(OS_PT_REG); // os_addr = osmap(child->pgd); // bzero((char *) os_addr, PAGE_SIZE); // code_seg = &parent->mms[MM_SEG_CODE]; //CODE segment // for (var_addr = code_seg->start; var_addr < code_seg->next_free; var_addr += PAGE_SIZE) { // u64 *parent_pte = get_user_pte(parent, var_addr, 0); // if (parent_pte) { // u64 pfn = install_ptable((u64) os_addr, code_seg, var_addr, (*parent_pte & FLAG_MASK) >> PAGE_SHIFT); // struct pfn_info *p = get_pfn_info(pfn); // increment_pfn_info_refcount(p); // } // } // code_seg = &parent->mms[MM_SEG_RODATA]; //RODATA segment // for (var_addr = code_seg->start; var_addr < code_seg->next_free; var_addr += PAGE_SIZE) { // u64 *parent_pte = get_user_pte(parent, var_addr, 0); // if (parent_pte) { // u64 pfn = install_ptable((u64) os_addr, code_seg, var_addr, (*parent_pte & FLAG_MASK) >> PAGE_SHIFT); // struct pfn_info *p = get_pfn_info(pfn); // increment_pfn_info_refcount(p); // } // } // code_seg = &parent->mms[MM_SEG_DATA]; //DATA segment // for (var_addr = code_seg->start; var_addr < code_seg->next_free; var_addr += PAGE_SIZE) { // u64 *parent_pte = get_user_pte(parent, var_addr, 0); // if (parent_pte) { // *parent_pte ^= PROT_WRITE; // code_seg->access_flags = PROT_READ; // u64 pfn = install_ptable((u64) os_addr, code_seg, var_addr, (*parent_pte & FLAG_MASK) >> PAGE_SHIFT); // struct pfn_info *p = get_pfn_info(pfn); // increment_pfn_info_refcount(p); // code_seg->access_flags = PROT_WRITE | PROT_READ; // } // } // code_seg = &parent->mms[MM_SEG_STACK]; //STACK segment // for (var_addr = code_seg->end - PAGE_SIZE; var_addr >= code_seg->next_free; var_addr -= PAGE_SIZE) { // u64 *parent_pte = get_user_pte(parent, var_addr, 0); // if (parent_pte) { // u64 pfn = install_ptable((u64) os_addr, code_seg, var_addr, 0); //Returns the blank page // pfn = (u64) osmap(pfn); // memcpy((char *) pfn, (char *) (*parent_pte & FLAG_MASK), PAGE_SIZE); // } // } // struct vm_area *head_vm_area = parent->vm_area; // struct vm_area *prev = NULL; // while (head_vm_area) { // u64 start = head_vm_area->vm_start, end = head_vm_area->vm_end, length = (end - start) / PAGE_SIZE; // struct vm_area *next_vm_area = alloc_vm_area(); // if (prev) prev->vm_next = next_vm_area; // else { // prev = next_vm_area; // child->vm_area = prev; // } // vm_area_init(next_vm_area, NULL, head_vm_area->vm_start, head_vm_area->vm_end, head_vm_area->access_flags); // for (int i = 0; i < length; i++) { // u64 addr = start + i * PAGE_SIZE; // u64 *parent_pte = get_user_pte(parent, addr, 0); // u32 access_flags = PROT_READ; // if (parent_pte) { // if (*parent_pte & PROT_WRITE) *parent_pte ^= PROT_WRITE; // u64 pfn = map_physical_page((u64) os_addr, addr, access_flags, (*parent_pte & FLAG_MASK) >> PAGE_SHIFT); // increment_pfn_info_refcount(get_pfn_info(pfn)); // } // } // prev = next_vm_area; // head_vm_area = head_vm_area->vm_next; // } // copy_os_pts(parent->pgd, child->pgd); //} // ///* You need to implement cfork_copy_mm which will be called from do_vfork in entry.c.*/ //void vfork_copy_mm(struct exec_context *child, struct exec_context *parent) { // // struct mm_segment *code_seg; // void *os_addr; // u64 var_addr; // child->pgd = os_pfn_alloc(OS_PT_REG); // os_addr = osmap(child->pgd); // bzero((char *) os_addr, PAGE_SIZE); // code_seg = &parent->mms[MM_SEG_CODE]; // for (var_addr = code_seg->start; var_addr < code_seg->next_free; var_addr += PAGE_SIZE) { // u64 *parent_pte = get_user_pte(parent, var_addr, 0); // if (parent_pte) { // install_ptable((u64) os_addr, code_seg, var_addr, (*parent_pte & FLAG_MASK) >> PAGE_SHIFT); // } // } // code_seg = &parent->mms[MM_SEG_RODATA]; // for (var_addr = code_seg->start; var_addr < code_seg->next_free; var_addr += PAGE_SIZE) { // u64 *parent_pte = get_user_pte(parent, var_addr, 0); // if (parent_pte) // install_ptable((u64) os_addr, code_seg, var_addr, (*parent_pte & FLAG_MASK) >> PAGE_SHIFT); // } // code_seg = &parent->mms[MM_SEG_DATA]; // for (var_addr = code_seg->start; var_addr < code_seg->next_free; var_addr += PAGE_SIZE) { // u64 *parent_pte = get_user_pte(parent, var_addr, 0); // if (parent_pte) { // install_ptable((u64) os_addr, code_seg, var_addr, (*parent_pte & FLAG_MASK) >> PAGE_SHIFT); // } // } // code_seg = &parent->mms[MM_SEG_STACK]; // for (var_addr = code_seg->end - PAGE_SIZE; var_addr >= code_seg->next_free; var_addr -= PAGE_SIZE) { // u64 *parent_pte = get_user_pte(parent, var_addr, 0); // if (parent_pte) { // u64 pfn = install_ptable((u64) os_addr, code_seg, var_addr, 0); //Returns the blank page // pfn = (u64) osmap(pfn); // memcpy((char *) pfn, (char *) (*parent_pte & FLAG_MASK), PAGE_SIZE); // } // } // struct vm_area *head_vm_area = parent->vm_area; // u64 start, end, length, addr; // while (head_vm_area) { // start = head_vm_area->vm_start; // end = head_vm_area->vm_end; // length = (end - start) / PAGE_SIZE; // for (int i = 0; i < length; i++) { // addr = start + i * PAGE_SIZE; // u64 *parent_pte = get_user_pte(parent, addr, 0); // if (parent_pte) { // map_physical_page((u64) os_addr, addr, head_vm_area->access_flags, // (*parent_pte & FLAG_MASK) >> PAGE_SHIFT); // } // } // head_vm_area = head_vm_area->vm_next; // } // parent->state = WAITING; // copy_os_pts(parent->pgd, child->pgd); //} // ///*You need to implement handle_cow_fault which will be called from do_page_fault //incase of a copy-on-write fault // //* For valid acess. Map the physical page // * Return 1 // * // * For invalid access, // * Return -1. //*/ // //int handle_cow_fault(struct exec_context *current, u64 cr2) { // void *os_addr; // os_addr = osmap(current->pgd); // struct mm_segment *code_seg; // code_seg = &current->mms[MM_SEG_DATA]; // u64 start = code_seg->start, end = code_seg->end, *pte = get_user_pte(current, cr2, 0), pfn = // (*pte & FLAG_MASK) >> PAGE_SHIFT; // struct pfn_info *p = get_pfn_info(pfn); // u64 ref_count = get_pfn_info_refcount(p); // // if (cr2 >= start && cr2 < end) { // if (ref_count > 1) { // u64 pfn1 = install_ptable((u64) os_addr, code_seg, cr2, 0); //Returns the blank page // decrement_pfn_info_refcount(p); // pfn1 = (u64) osmap(pfn1); // memcpy((char *) pfn1, (char *) (*pte & FLAG_MASK), PAGE_SIZE); // return 1; // } else { // if (PROT_WRITE & code_seg->access_flags) { // *pte = *pte | PROT_WRITE; // return 1; // } else { // return -1; // } // } // } // struct vm_area *head_vm_area = current->vm_area; // int flag = 0; // while (head_vm_area) { // if (head_vm_area->vm_end > cr2 && head_vm_area->vm_start <= cr2) { // if (head_vm_area->access_flags & PROT_WRITE) { // if (ref_count > 1) { // u64 pfn1 = map_physical_page((u64) os_addr, cr2, PROT_WRITE, 0); // decrement_pfn_info_refcount(p); // pfn1 = (u64) osmap(pfn1); // memcpy((char *) pfn1, (char *) (*pte & FLAG_MASK), PAGE_SIZE); // return 1; // } else { // *pte = *pte | PROT_WRITE; // return 1; // } // } else { // return -1; // } // } // head_vm_area = head_vm_area->vm_next; // } // return -1; //} // ///* You need to handle any specific exit case for vfork here, called from do_exit*/ //void vfork_exit_handle(struct exec_context *ctx) { // u64 parent_pid = ctx->ppid; // if (parent_pid) { // struct exec_context *parent_ctx = get_ctx_by_pid(parent_pid); // if (parent_ctx->state == WAITING) parent_ctx->state = READY; // } //} // //void vm_area_init(struct vm_area *vm_area, struct vm_area *vm_area_next, u64 start, u64 end, int prot) { // vm_area->vm_start = start; // vm_area->vm_end = end; // vm_area->access_flags = prot; // vm_area->vm_next = vm_area_next; //} // Aman Tiwari , Roll No - 160094 #include <cfork.h> #include <page.h> #include <mmap.h> /* You need to implement cfork_copy_mm which will be called from do_cfork in entry.c. Don't remove copy_os_pts()*/ void cfork_copy_mm(struct exec_context *child, struct exec_context *parent ){ void *os_addr; u64 vaddr; struct mm_segment *seg; child->pgd = os_pfn_alloc(OS_PT_REG); os_addr = osmap(child->pgd); bzero((char *)os_addr, PAGE_SIZE); //CODE segment seg = &parent->mms[MM_SEG_CODE]; for(vaddr = seg->start; vaddr < seg->next_free; vaddr += PAGE_SIZE){ u64 *parent_pte = get_user_pte(parent, vaddr, 0); if(parent_pte){ u64 pfn = install_ptable((u64) os_addr, seg, vaddr, (*parent_pte & FLAG_MASK) >> PAGE_SHIFT); struct pfn_info *p = get_pfn_info(pfn); increment_pfn_info_refcount(p); } } //RODATA segment seg = &parent->mms[MM_SEG_RODATA]; for(vaddr = seg->start; vaddr < seg->next_free; vaddr += PAGE_SIZE){ u64 *parent_pte = get_user_pte(parent, vaddr, 0); if(parent_pte){ u64 pfn = install_ptable((u64)os_addr, seg, vaddr, (*parent_pte & FLAG_MASK) >> PAGE_SHIFT); struct pfn_info *p = get_pfn_info(pfn); increment_pfn_info_refcount(p); } } //DATA segment seg = &parent->mms[MM_SEG_DATA]; for(vaddr = seg->start; vaddr < seg->next_free; vaddr += PAGE_SIZE){ u64 *parent_pte = get_user_pte(parent, vaddr, 0); if(parent_pte){ *parent_pte ^= PROT_WRITE; seg->access_flags = PROT_READ; u64 pfn = install_ptable((u64)os_addr, seg, vaddr, (*parent_pte & FLAG_MASK) >> PAGE_SHIFT); struct pfn_info *p = get_pfn_info(pfn); increment_pfn_info_refcount(p); seg->access_flags = PROT_WRITE | PROT_READ; } } //STACK segment seg = &parent->mms[MM_SEG_STACK]; for(vaddr = seg->end - PAGE_SIZE; vaddr >= seg->next_free; vaddr -= PAGE_SIZE){ u64 *parent_pte = get_user_pte(parent, vaddr, 0); if(parent_pte){ u64 pfn = install_ptable((u64)os_addr, seg, vaddr, 0); //Returns the blank page pfn = (u64)osmap(pfn); memcpy((char *)pfn, (char *)(*parent_pte & FLAG_MASK), PAGE_SIZE); } } struct vm_area *vm_area_head = parent->vm_area; struct vm_area *prev = NULL; while(vm_area_head != NULL){ u64 start = vm_area_head->vm_start; u64 end = vm_area_head->vm_end; u64 length = (end - start)/PAGE_SIZE; struct vm_area *new_vm_area = alloc_vm_area(); if(prev == NULL){ prev = new_vm_area; child->vm_area = prev; } else { prev->vm_next = new_vm_area; } new_vm_area->vm_start = vm_area_head->vm_start; new_vm_area->vm_end = vm_area_head->vm_end; new_vm_area->vm_next = NULL; new_vm_area->access_flags = vm_area_head->access_flags; for(int i=0;i<length;i++){ u64 addr = start + i * PAGE_SIZE; u64 *parent_pte = get_user_pte(parent, addr, 0); u32 access_flags = PROT_READ; if(parent_pte){ if(*parent_pte & PROT_WRITE)*parent_pte ^= PROT_WRITE; u64 pfn = map_physical_page((u64)os_addr, addr, access_flags, (*parent_pte & FLAG_MASK) >> PAGE_SHIFT); struct pfn_info *p = get_pfn_info(pfn); increment_pfn_info_refcount(p); } } prev = new_vm_area; vm_area_head = vm_area_head->vm_next; } copy_os_pts(parent->pgd, child->pgd); return; } /* You need to implement cfork_copy_mm which will be called from do_vfork in entry.c.*/ void vfork_copy_mm(struct exec_context *child, struct exec_context *parent ){ void *os_addr; u64 vaddr; struct mm_segment *seg; child->pgd = os_pfn_alloc(OS_PT_REG); os_addr = osmap(child->pgd); bzero((char *)os_addr, PAGE_SIZE); //CODE segment seg = &parent->mms[MM_SEG_CODE]; for(vaddr = seg->start; vaddr < seg->next_free; vaddr += PAGE_SIZE){ u64 *parent_pte = get_user_pte(parent, vaddr, 0); if(parent_pte){ install_ptable((u64) os_addr, seg, vaddr, (*parent_pte & FLAG_MASK) >> PAGE_SHIFT); } } //RODATA segment seg = &parent->mms[MM_SEG_RODATA]; for(vaddr = seg->start; vaddr < seg->next_free; vaddr += PAGE_SIZE){ u64 *parent_pte = get_user_pte(parent, vaddr, 0); if(parent_pte) install_ptable((u64)os_addr, seg, vaddr, (*parent_pte & FLAG_MASK) >> PAGE_SHIFT); } //DATA segment seg = &parent->mms[MM_SEG_DATA]; for(vaddr = seg->start; vaddr < seg->next_free; vaddr += PAGE_SIZE){ u64 *parent_pte = get_user_pte(parent, vaddr, 0); if(parent_pte){ install_ptable((u64)os_addr, seg, vaddr, (*parent_pte & FLAG_MASK) >> PAGE_SHIFT); } } //STACK segment seg = &parent->mms[MM_SEG_STACK]; for(vaddr = seg->end - PAGE_SIZE; vaddr >= seg->next_free; vaddr -= PAGE_SIZE){ u64 *parent_pte = get_user_pte(parent, vaddr, 0); if(parent_pte){ u64 pfn = install_ptable((u64)os_addr, seg, vaddr, 0); //Returns the blank page pfn = (u64)osmap(pfn); memcpy((char *)pfn, (char *)(*parent_pte & FLAG_MASK), PAGE_SIZE); } } struct vm_area *vm_area_head = parent->vm_area; while(vm_area_head != NULL){ u64 start = vm_area_head->vm_start; u64 end = vm_area_head->vm_end; u64 length = (end - start)/PAGE_SIZE; for(int i=0;i<length;i++){ u64 addr = start + i * PAGE_SIZE; u64 *parent_pte = get_user_pte(parent, addr, 0); if(parent_pte){ map_physical_page((u64)os_addr, addr, vm_area_head->access_flags, (*parent_pte & FLAG_MASK) >> PAGE_SHIFT); } } vm_area_head = vm_area_head->vm_next; } parent->state = WAITING; copy_os_pts(parent->pgd, child->pgd); return; } /*You need to implement handle_cow_fault which will be called from do_page_fault incase of a copy-on-write fault * For valid acess. Map the physical page * Return 1 * * For invalid access, * Return -1. */ int handle_cow_fault(struct exec_context *current, u64 cr2){ void *os_addr; os_addr = osmap(current->pgd); struct mm_segment *seg; seg = &current->mms[MM_SEG_DATA]; u64 start = seg->start; u64 end = seg->end; u64 *pte = get_user_pte(current, cr2, 0); u64 pfn = (*pte & FLAG_MASK) >> PAGE_SHIFT; struct pfn_info *p = get_pfn_info(pfn); u64 ref_count = get_pfn_info_refcount(p); if(cr2 >= start && cr2 < end){ if(ref_count > 1){ u64 pfn1 = install_ptable((u64)os_addr, seg, cr2, 0); //Returns the blank page decrement_pfn_info_refcount(p); pfn1 = (u64)osmap(pfn1); memcpy((char *)pfn1, (char *)(*pte & FLAG_MASK), PAGE_SIZE); return 1; } else { if(seg->access_flags & PROT_WRITE){ *pte = *pte | PROT_WRITE; return 1; } else { return -1; } } } struct vm_area *vm_area_head = current->vm_area; int flag = 0; while(vm_area_head != NULL){ if(vm_area_head->vm_start <= cr2 && vm_area_head->vm_end > cr2){ flag = 1; break; } vm_area_head = vm_area_head->vm_next; } if(flag){ if(vm_area_head->access_flags & PROT_WRITE){ if(ref_count > 1){ u64 pfn1 = map_physical_page((u64)os_addr, cr2, PROT_WRITE, 0); decrement_pfn_info_refcount(p); pfn1 = (u64)osmap(pfn1); memcpy((char *)pfn1, (char *)(*pte & FLAG_MASK), PAGE_SIZE); return 1; } else { *pte = *pte | PROT_WRITE; return 1; } } else { return -1; } } else { return -1; } } /* You need to handle any specific exit case for vfork here, called from do_exit*/ void vfork_exit_handle(struct exec_context *ctx){ u64 parent_pid = ctx->ppid; if(parent_pid){ struct exec_context *parent_ctx = get_ctx_by_pid(parent_pid); if(parent_ctx->state == WAITING) parent_ctx->state = READY; } return; }
37.135417
123
0.579691
4906781740f98be4911b2335a3c4e24bb2089146
2,959
py
Python
memory/test/test_memory.py
MaxGreil/hail
4e0605b6bfd24a885a8194e8c0984b20994d3407
[ "MIT" ]
789
2016-09-05T04:14:25.000Z
2022-03-30T09:51:54.000Z
memory/test/test_memory.py
MaxGreil/hail
4e0605b6bfd24a885a8194e8c0984b20994d3407
[ "MIT" ]
5,724
2016-08-29T18:58:40.000Z
2022-03-31T23:49:42.000Z
memory/test/test_memory.py
MaxGreil/hail
4e0605b6bfd24a885a8194e8c0984b20994d3407
[ "MIT" ]
233
2016-08-31T20:42:38.000Z
2022-02-17T16:42:39.000Z
import unittest import uuid from memory.client import MemoryClient from hailtop.aiocloud.aiogoogle import GoogleStorageAsyncFS from hailtop.config import get_user_config from hailtop.utils import async_to_blocking from gear.cloud_config import get_gcp_config PROJECT = get_gcp_config().project class BlockingMemoryClient: def __init__(self, gcs_project=None, fs=None, deploy_config=None, session=None, headers=None, _token=None): self._client = MemoryClient(gcs_project, fs, deploy_config, session, headers, _token) async_to_blocking(self._client.async_init()) def _get_file_if_exists(self, filename): return async_to_blocking(self._client._get_file_if_exists(filename)) def read_file(self, filename): return async_to_blocking(self._client.read_file(filename)) def write_file(self, filename, data): return async_to_blocking(self._client.write_file(filename, data)) def close(self): return async_to_blocking(self._client.close()) class Tests(unittest.TestCase): def setUp(self): bucket_name = get_user_config().get('batch', 'bucket') token = uuid.uuid4() self.test_path = f'gs://{bucket_name}/memory-tests/{token}' self.fs = GoogleStorageAsyncFS(project=PROJECT) self.client = BlockingMemoryClient(fs=self.fs) self.temp_files = set() def tearDown(self): async_to_blocking(self.fs.rmtree(None, self.test_path)) self.client.close() async def add_temp_file_from_string(self, name: str, str_value: bytes): handle = f'{self.test_path}/{name}' async with await self.fs.create(handle) as f: await f.write(str_value) return handle def test_non_existent(self): for _ in range(3): self.assertIsNone(self.client._get_file_if_exists(f'{self.test_path}/nonexistent')) def test_small_write_around(self): async def read(url): async with await self.fs.open(url) as f: return await f.read() cases = [('empty_file', b''), ('null', b'\0'), ('small', b'hello world')] for file, data in cases: handle = async_to_blocking(self.add_temp_file_from_string(file, data)) expected = async_to_blocking(read(handle)) self.assertEqual(expected, data) i = 0 cached = self.client._get_file_if_exists(handle) while cached is None and i < 10: cached = self.client._get_file_if_exists(handle) i += 1 self.assertEqual(cached, expected) def test_small_write_through(self): cases = [('empty_file2', b''), ('null2', b'\0'), ('small2', b'hello world')] for file, data in cases: filename = f'{self.test_path}/{file}' self.client.write_file(filename, data) cached = self.client._get_file_if_exists(filename) self.assertEqual(cached, data)
36.085366
111
0.663738
dfa230fc21d71c0b00d5bd9ccf31bf9b9d593570
476
ts
TypeScript
x-pack/plugins/security_solution/common/detection_engine/schemas/request/get_migration_status_schema.ts
AlexanderWert/kibana
ae64fc259222f1147c1500104d7dcb4cfa263b63
[ "Apache-2.0" ]
null
null
null
x-pack/plugins/security_solution/common/detection_engine/schemas/request/get_migration_status_schema.ts
AlexanderWert/kibana
ae64fc259222f1147c1500104d7dcb4cfa263b63
[ "Apache-2.0" ]
null
null
null
x-pack/plugins/security_solution/common/detection_engine/schemas/request/get_migration_status_schema.ts
AlexanderWert/kibana
ae64fc259222f1147c1500104d7dcb4cfa263b63
[ "Apache-2.0" ]
null
null
null
/* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ import * as t from 'io-ts'; import { from } from '../common/schemas'; export const getMigrationStatusSchema = t.exact( t.type({ from, }) ); export type GetMigrationStatusSchema = t.TypeOf<typeof getMigrationStatusSchema>;
26.444444
81
0.735294
2676b71aad114744ae5d571405ef077f7363628b
940
java
Java
qirk-parent/qirk-main-parent/qirk-services/src/test/java/org/wrkr/clb/test/util/JsonStatusCodeMatcher.java
nydevel/qirk
8538826c6aec6bf9de9e59b9d5bd1849e2588c6a
[ "MIT" ]
11
2020-11-04T05:58:23.000Z
2021-12-17T09:50:05.000Z
qirk-parent/qirk-main-parent/qirk-services/src/test/java/org/wrkr/clb/test/util/JsonStatusCodeMatcher.java
nydevel/qirk
8538826c6aec6bf9de9e59b9d5bd1849e2588c6a
[ "MIT" ]
null
null
null
qirk-parent/qirk-main-parent/qirk-services/src/test/java/org/wrkr/clb/test/util/JsonStatusCodeMatcher.java
nydevel/qirk
8538826c6aec6bf9de9e59b9d5bd1849e2588c6a
[ "MIT" ]
7
2020-11-04T15:28:02.000Z
2022-03-01T11:31:29.000Z
package org.wrkr.clb.test.util; import org.hamcrest.Description; import org.hamcrest.TypeSafeMatcher; import org.wrkr.clb.services.util.exception.ApplicationException; public class JsonStatusCodeMatcher extends TypeSafeMatcher<ApplicationException> { private final String expectedCode; private String foundCode; private JsonStatusCodeMatcher(String expectedCode) { this.expectedCode = expectedCode; } public static JsonStatusCodeMatcher hasCode(String code) { return new JsonStatusCodeMatcher(code); } @Override protected boolean matchesSafely(final ApplicationException exception) { foundCode = exception.getJsonStatusCode(); return foundCode.equalsIgnoreCase(expectedCode); } @Override public void describeTo(Description description) { description.appendValue(foundCode).appendText(" was not found instead of ").appendValue(expectedCode); } }
30.322581
110
0.754255
b2aaa5ad70f95ad0773458aaf8fd01ae2b36ac2a
486
kt
Kotlin
presentation/src/commonMain/kotlin/com/chrynan/video/presentation/mapper/video/VideoHeaderMapper.kt
chRyNaN/Video
63456dcfdd57dbee9ff02b2155b7e1ec5761db81
[ "Apache-2.0" ]
7
2019-03-07T09:52:33.000Z
2022-03-05T00:28:31.000Z
presentation/src/commonMain/kotlin/com/chrynan/video/presentation/mapper/video/VideoHeaderMapper.kt
chRyNaN/Video
63456dcfdd57dbee9ff02b2155b7e1ec5761db81
[ "Apache-2.0" ]
null
null
null
presentation/src/commonMain/kotlin/com/chrynan/video/presentation/mapper/video/VideoHeaderMapper.kt
chRyNaN/Video
63456dcfdd57dbee9ff02b2155b7e1ec5761db81
[ "Apache-2.0" ]
1
2020-07-28T23:07:19.000Z
2020-07-28T23:07:19.000Z
package com.chrynan.video.presentation.mapper.video import com.chrynan.inject.Inject import com.chrynan.video.presentation.core.Mapper import com.chrynan.video.presentation.viewmodel.VideoInfoHeaderViewModel class VideoHeaderMapper @Inject constructor( private val actionsMapper: VideoActionsMapper, private val providerMapper: VideoProviderMapper ) : Mapper<String, VideoInfoHeaderViewModel> { override suspend fun map(model: String): VideoInfoHeaderViewModel = TODO() }
37.384615
78
0.825103
ca040d4858e929050e84f5efd018de8a16191ef4
111
java
Java
core/sorcer-dl/src/main/java/sorcer/service/modeling/slot.java
s20834/SORCER-multiFi
faf50fdcc11b7a6d410a22f22b1a2faae820766d
[ "Apache-2.0" ]
3
2020-05-05T03:51:01.000Z
2021-03-19T19:43:02.000Z
core/sorcer-dl/src/main/java/sorcer/service/modeling/slot.java
s20834/SORCER-multiFi
faf50fdcc11b7a6d410a22f22b1a2faae820766d
[ "Apache-2.0" ]
5
2020-07-08T15:46:17.000Z
2022-01-29T17:24:51.000Z
core/sorcer-dl/src/main/java/sorcer/service/modeling/slot.java
s20834/SORCER-multiFi
faf50fdcc11b7a6d410a22f22b1a2faae820766d
[ "Apache-2.0" ]
34
2020-01-21T17:00:31.000Z
2022-01-27T22:13:43.000Z
package sorcer.service.modeling; import sorcer.service.Service; public interface slot<V> extends Service { }
15.857143
42
0.792793
38534017ddfc6a2fb4e8ff3eaedbd81ea512aa06
75
sql
SQL
prisma/migrations/20210131153502_set_messages_sent_at_field_as_optional/migration.sql
LesterCerioli/Umbriel
9e6195e51a4333f5cfed3bf1442d3c8586329393
[ "MIT" ]
433
2021-01-16T17:45:10.000Z
2022-03-30T18:42:01.000Z
prisma/migrations/20210131153502_set_messages_sent_at_field_as_optional/migration.sql
LesterCerioli/Umbriel
9e6195e51a4333f5cfed3bf1442d3c8586329393
[ "MIT" ]
71
2021-01-21T13:04:38.000Z
2022-01-22T02:54:25.000Z
prisma/migrations/20210131153502_set_messages_sent_at_field_as_optional/migration.sql
LesterCerioli/Umbriel
9e6195e51a4333f5cfed3bf1442d3c8586329393
[ "MIT" ]
61
2021-02-07T19:52:03.000Z
2022-03-30T18:45:35.000Z
-- AlterTable ALTER TABLE "messages" ALTER COLUMN "sent_at" DROP NOT NULL;
25
60
0.76
871f45abefe4f204ad446d4fe3c41540de033533
7,947
rs
Rust
tests/transposition_test.rs
Vultrao/transposer
033949c7dd67f1bcc6ad82e6348c127787cd19e3
[ "CC0-1.0" ]
null
null
null
tests/transposition_test.rs
Vultrao/transposer
033949c7dd67f1bcc6ad82e6348c127787cd19e3
[ "CC0-1.0" ]
null
null
null
tests/transposition_test.rs
Vultrao/transposer
033949c7dd67f1bcc6ad82e6348c127787cd19e3
[ "CC0-1.0" ]
null
null
null
#[cfg(test)] mod tests { use transposer::transposition as t; //============================================================================== // Just a remainder that the circle is correct // Notr eally useful but hey, what are you gonna do ? #[test] fn test_transposition_circle() { let tcirc = t::chord_checker::compute_transposition_circle(); assert_eq!( tcirc.len(), 12 ); assert_eq!( tcirc[0].len(), 2 ); assert_eq!( tcirc[0][0], "C" ); assert_eq!( tcirc[0][1], "B#" ); assert_eq!( tcirc[1].len(), 2 ); assert_eq!( tcirc[1][0], "C#" ); assert_eq!( tcirc[1][1], "Db" ); assert_eq!( tcirc[2].len(), 1 ); assert_eq!( tcirc[2][0], "D" ); assert_eq!( tcirc[3].len(), 2 ); assert_eq!( tcirc[3][0], "Eb" ); assert_eq!( tcirc[3][1], "D#" ); assert_eq!( tcirc[4].len(), 2 ); assert_eq!( tcirc[4][0], "E" ); assert_eq!( tcirc[4][1], "Fb" ); assert_eq!( tcirc[5].len(), 2 ); assert_eq!( tcirc[5][0], "F" ); assert_eq!( tcirc[5][1], "E#" ); assert_eq!( tcirc[6].len(), 2 ); assert_eq!( tcirc[6][0], "F#" ); assert_eq!( tcirc[6][1], "Gb" ); assert_eq!( tcirc[7].len(), 1 ); assert_eq!( tcirc[7][0], "G" ); assert_eq!( tcirc[8].len(), 2 ); assert_eq!( tcirc[8][0], "G#" ); assert_eq!( tcirc[8][1], "Ab" ); assert_eq!( tcirc[9].len(), 1 ); assert_eq!( tcirc[9][0], "A" ); assert_eq!( tcirc[10].len(), 2 ); assert_eq!( tcirc[10][0], "Bb" ); assert_eq!( tcirc[10][1], "A#" ); assert_eq!( tcirc[11].len(), 2 ); assert_eq!( tcirc[11][0], "B" ); assert_eq!( tcirc[11][1], "Cb" ); } #[test] fn test_split_chord() { assert_eq!( t::chord_checker::split_chord( &"A".to_string() ), ( "A".to_string(), "".to_string() ) ); assert_eq!( t::chord_checker::split_chord( &"G#m/Fb".to_string() ), ( "G#".to_string(), "m/Fb".to_string() ) ); } #[test] #[should_panic] fn test_split_chord_panic() { t::chord_checker::split_chord( &"IbM".to_string() ); } #[test] fn test_get_trim_note_from_chord() { assert_eq!( t::chord_checker::get_note_from_chord(&"D".to_string()), "D".to_string() ); assert_eq!( t::chord_checker::get_note_from_chord(&"F#m".to_string()), "F#".to_string() ); assert_eq!( t::chord_checker::get_note_from_chord(&"Gbsus4".to_string()), "Gb".to_string() ); assert_eq!( t::chord_checker::trim_note_from_chord(&"D".to_string()), "".to_string() ); assert_eq!( t::chord_checker::trim_note_from_chord(&"F#m".to_string()), "m".to_string() ); assert_eq!( t::chord_checker::trim_note_from_chord(&"Gbsus4".to_string()), "sus4".to_string() ); } #[test] #[should_panic] fn test_get_note_from_chord_panic() { t::chord_checker::get_note_from_chord(&"K".to_string()); } #[test] #[should_panic] fn test_trim_note_from_chord_panic() { t::chord_checker::trim_note_from_chord(&"K".to_string()); } #[test] fn test_has_compound_chord() { assert!( t::chord_checker::has_compound_chord(&"A/G".to_string()) ); assert!( t::chord_checker::has_compound_chord(&"Bmsus4/C#".to_string()) ); assert!( !t::chord_checker::has_compound_chord(&"GM7".to_string()) ); } #[test] fn test_split_compound_chord() { assert_eq!( t::chord_checker::split_compound_chord( &"Ab/G".to_string() ), ( "Ab".to_string(), "G".to_string() ) ); assert_eq!( t::chord_checker::split_compound_chord( &"Am7/F#".to_string() ), ( "Am7".to_string(), "F#".to_string() ) ); } #[test] #[should_panic] fn test_split_compound_chord_panic() { t::chord_checker::split_compound_chord( &"AMsus4".to_string() ); } #[test] fn test_get_trim_compound_chord() { assert_eq!( t::chord_checker::get_compound_chord( &"Ab/G".to_string() ), "G".to_string() ); assert_eq!( t::chord_checker::get_compound_chord( &"Am7/F#".to_string() ), "F#".to_string() ); assert_eq!( t::chord_checker::trim_compound_chord( &"Ab/G".to_string() ), "Ab".to_string() ); assert_eq!( t::chord_checker::trim_compound_chord( &"Am7/F#".to_string() ), "Am7".to_string() ); } #[test] #[should_panic] fn test_get_compound_chord_panic() { t::chord_checker::get_compound_chord( &"AMsus4".to_string() ); } #[test] #[should_panic] fn test_trim_compound_chord_panic() { t::chord_checker::trim_compound_chord( &"AMsus4".to_string() ); } #[test] fn test_is_chord() { assert!( t::chord_checker::is_chord(&"E".to_string()) ); assert!( t::chord_checker::is_chord(&"E#msus4".to_string()) ); assert!( t::chord_checker::is_chord(&"GbM7add5/Eb".to_string()) ); assert!( ! t::chord_checker::is_chord(&"K".to_string()) ); assert!( ! t::chord_checker::is_chord(&"A#u".to_string()) ); assert!( ! t::chord_checker::is_chord(&"A#m/pp".to_string()) ); assert!( ! t::chord_checker::is_chord(&"EbM/G#m".to_string()) ); } //============================================================================== #[test] fn test_check_false_positive() { assert!( t::false_positive_chord::check_false_positive(&"A house in a tree".to_string()) ); assert!( t::false_positive_chord::check_false_positive(&"A little house, CM7/F# Bsus4/F tata".to_string()) ); assert!( ! t::false_positive_chord::check_false_positive(&"A B# Cb".to_string()) ); assert!( ! t::false_positive_chord::check_false_positive(&"Am house in a tree".to_string()) ); assert!( ! t::false_positive_chord::check_false_positive(&"Yes! A house in a tree".to_string()) ); } #[test] fn test_process_restore_implaced_line() { let mut res1 = "A house in a tree".to_string(); let mut res2 = "A little house, CM7/F# Bsus4/F tata".to_string(); let mut res3 = "A B# Cb".to_string(); t::false_positive_chord::process_implaced_line(&mut res1); t::false_positive_chord::process_implaced_line(&mut res2); t::false_positive_chord::process_implaced_line(&mut res3); assert_eq!( res1, ">>>FPC<<< house in a tree".to_string() ); assert_eq!( res2, ">>>FPC<<< little house, CM7/F# Bsus4/F tata".to_string() ); assert_eq!( res3, ">>>FPC<<< B# Cb".to_string() ); t::false_positive_chord::restore_implaced_line(&mut res1); t::false_positive_chord::restore_implaced_line(&mut res2); t::false_positive_chord::restore_implaced_line(&mut res3); assert_eq!( res1, "A house in a tree".to_string() ); assert_eq!( res2, "A little house, CM7/F# Bsus4/F tata".to_string() ); assert_eq!( res3, "A B# Cb".to_string() ); } //============================================================================== #[test] fn test_transpose_chord() { assert_eq!( t::chord_transposer::transpose_chord( &"B#".to_string(), 0 ), "B#".to_string() ); assert_eq!( t::chord_transposer::transpose_chord( &"Bm".to_string(), 1 ), "Cm".to_string() ); assert_eq!( t::chord_transposer::transpose_chord( &"Am7".to_string(), 11 ), "G#m7".to_string() ); assert_eq!( t::chord_transposer::transpose_chord( &"CM7/F#".to_string(), 5 ), "FM7/B".to_string() ); assert_eq!( t::chord_transposer::transpose_chord( &"C".to_string(), 50 ), "D".to_string() ); } #[test] fn test_transpose_line() { assert_eq!( t::chord_transposer::transpose_line( &"A little house, CM7/F# Bsus4/F tata".to_string(), 5 ), "A little house, FM7/B Esus4/Bb tata".to_string() ); } //============================================================================== }
43.190217
127
0.558701
39e5e9ad86c95b8c78c98748a6e81f48d1460fc9
8,036
java
Java
src/main/java/com/android/tools/r8/shaking/ProguardConfigurationUtils.java
raviagarwal7/r8
19e4328952e0c03d6661a6d6c465565b8dacc30a
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/main/java/com/android/tools/r8/shaking/ProguardConfigurationUtils.java
raviagarwal7/r8
19e4328952e0c03d6661a6d6c465565b8dacc30a
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/main/java/com/android/tools/r8/shaking/ProguardConfigurationUtils.java
raviagarwal7/r8
19e4328952e0c03d6661a6d6c465565b8dacc30a
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
// Copyright (c) 2017, the R8 project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. package com.android.tools.r8.shaking; import com.android.tools.r8.graph.DexClass; import com.android.tools.r8.graph.DexEncodedMethod; import com.android.tools.r8.graph.DexItemFactory; import com.android.tools.r8.origin.Origin; import com.android.tools.r8.shaking.ProguardConfigurationParser.IdentifierPatternWithWildcards; import com.android.tools.r8.utils.AndroidApiLevel; import com.android.tools.r8.utils.LongInterval; import com.google.common.collect.ImmutableList; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; public class ProguardConfigurationUtils { private static Origin proguardCompatOrigin = new Origin(Origin.root()) { @Override public String part() { return "<PROGUARD_COMPATIBILITY_RULE>"; } }; private static Origin synthesizedRecompilationOrigin = new Origin(Origin.root()) { @Override public String part() { return "<SYNTHESIZED_RECOMPILATION_RULE>"; } }; public static ProguardKeepRule buildDefaultInitializerKeepRule(DexClass clazz) { ProguardKeepRule.Builder builder = ProguardKeepRule.builder(); builder.setOrigin(proguardCompatOrigin); builder.setType(ProguardKeepRuleType.KEEP); builder.getModifiersBuilder().setAllowsObfuscation(true); builder.getModifiersBuilder().setAllowsOptimization(true); builder.getClassAccessFlags().setVisibility(clazz.accessFlags); builder.setClassType(ProguardClassType.CLASS); builder.setClassNames( ProguardClassNameList.singletonList(ProguardTypeMatcher.create(clazz.type))); if (clazz.hasDefaultInitializer()) { ProguardMemberRule.Builder memberRuleBuilder = ProguardMemberRule.builder(); memberRuleBuilder.setRuleType(ProguardMemberType.INIT); memberRuleBuilder.setName(IdentifierPatternWithWildcards.withoutWildcards("<init>")); memberRuleBuilder.setArguments(ImmutableList.of()); builder.getMemberRules().add(memberRuleBuilder.build()); } return builder.build(); } public static ProguardKeepRule buildMethodKeepRule(DexClass clazz, DexEncodedMethod method) { // TODO(b/122295241): These generated rules should be linked into the graph, eg, the method // using identified reflection should be the source keeping the target alive. assert clazz.type == method.method.holder; ProguardKeepRule.Builder builder = ProguardKeepRule.builder(); builder.setOrigin(proguardCompatOrigin); builder.setType(ProguardKeepRuleType.KEEP_CLASS_MEMBERS); builder.getModifiersBuilder().setAllowsObfuscation(true); builder.getModifiersBuilder().setAllowsOptimization(true); builder.getClassAccessFlags().setVisibility(clazz.accessFlags); if (clazz.isInterface()) { builder.setClassType(ProguardClassType.INTERFACE); } else { builder.setClassType(ProguardClassType.CLASS); } builder.setClassNames( ProguardClassNameList.singletonList(ProguardTypeMatcher.create(clazz.type))); ProguardMemberRule.Builder memberRuleBuilder = ProguardMemberRule.builder(); memberRuleBuilder.setRuleType(ProguardMemberType.METHOD); memberRuleBuilder.getAccessFlags().setFlags(method.accessFlags); memberRuleBuilder.setName( IdentifierPatternWithWildcards.withoutWildcards(method.method.name.toString())); memberRuleBuilder.setTypeMatcher(ProguardTypeMatcher.create(method.method.proto.returnType)); List<ProguardTypeMatcher> arguments = Arrays.stream(method.method.proto.parameters.values) .map(ProguardTypeMatcher::create) .collect(Collectors.toList()); memberRuleBuilder.setArguments(arguments); builder.getMemberRules().add(memberRuleBuilder.build()); return builder.build(); } public static ProguardAssumeValuesRule buildAssumeValuesForApiLevel( DexItemFactory factory, AndroidApiLevel apiLevel) { Origin synthesizedFromApiLevel = new Origin(Origin.root()) { @Override public String part() { return "<SYNTHESIZED_FROM_API_LEVEL_" + apiLevel.getLevel() + ">"; } }; ProguardAccessFlags publicStaticFinalFlags = new ProguardAccessFlags(); publicStaticFinalFlags.setPublic(); publicStaticFinalFlags.setStatic(); publicStaticFinalFlags.setFinal(); return ProguardAssumeValuesRule .builder() .setOrigin(synthesizedFromApiLevel) .setClassType(ProguardClassType.CLASS) .setClassNames( ProguardClassNameList.singletonList( ProguardTypeMatcher.create(factory.createType("Landroid/os/Build$VERSION;")))) .setMemberRules(ImmutableList.of( ProguardMemberRule.builder() .setAccessFlags(publicStaticFinalFlags) .setRuleType(ProguardMemberType.FIELD) .setTypeMatcher(ProguardTypeMatcher.create(factory.intType)) .setName(IdentifierPatternWithWildcards.withoutWildcards("SDK_INT")) .setReturnValue( new ProguardMemberRuleReturnValue( new LongInterval(apiLevel.getLevel(), Integer.MAX_VALUE))) .build() )) .build(); } /** * Check if an explicit rule matching the field * public static final int android.os.Build$VERSION.SDK_INT * is present. */ public static boolean hasExplicitAssumeValuesRuleForMinSdk( DexItemFactory factory, List<ProguardConfigurationRule> rules) { for (ProguardConfigurationRule rule : rules) { if (!(rule instanceof ProguardAssumeValuesRule)) { continue; } if (rule.getClassType() != ProguardClassType.CLASS) { continue; } if (rule.hasInheritanceClassName() && !rule.getInheritanceClassName().matches(factory.objectType)) { continue; } if (!rule.getClassNames().matches(factory.createType("Landroid/os/Build$VERSION;"))) { continue; } for (ProguardMemberRule memberRule : rule.getMemberRules()) { if (memberRule.getRuleType() == ProguardMemberType.ALL || memberRule.getRuleType() == ProguardMemberType.ALL_FIELDS) { return true; } if (memberRule.getRuleType() != ProguardMemberType.FIELD) { continue; } if (memberRule.getAccessFlags().isProtected() || memberRule.getAccessFlags().isPrivate() || memberRule.getAccessFlags().isAbstract() || memberRule.getAccessFlags().isTransient() || memberRule.getAccessFlags().isVolatile()) { continue; } if (memberRule.getNegatedAccessFlags().isPublic() || memberRule.getNegatedAccessFlags().isStatic() || memberRule.getNegatedAccessFlags().isFinal()) { continue; } if (!memberRule.getType().matches(factory.intType)) { continue; } if (!memberRule.getName().matches("SDK_INT")) { continue; } return true; } } return false; } public static void synthesizeKeepRulesForRecompilation( ProguardConfigurationRule rule, List<ProguardConfigurationRule> synthesizedKeepRules) { if (rule.hasInheritanceClassName()) { ProguardTypeMatcher inheritanceClassName = rule.getInheritanceClassName(); synthesizedKeepRules.add( ProguardKeepRule.builder() .setOrigin(synthesizedRecompilationOrigin) .setType(ProguardKeepRuleType.KEEP) .setClassType( rule.getInheritanceIsExtends() ? ProguardClassType.CLASS : ProguardClassType.INTERFACE) .setClassNames(ProguardClassNameList.singletonList(inheritanceClassName)) .build()); } } }
41.42268
97
0.69674
9bc0f0a21225b035f191d4b486a77ea0428291d8
4,330
js
JavaScript
src/components/Transactions/ListView.js
srikanthnallamothu2/state-street-react-challenge
cfd02647c3c51bea5dc3bc2246892f9a4ab85c56
[ "MIT" ]
null
null
null
src/components/Transactions/ListView.js
srikanthnallamothu2/state-street-react-challenge
cfd02647c3c51bea5dc3bc2246892f9a4ab85c56
[ "MIT" ]
null
null
null
src/components/Transactions/ListView.js
srikanthnallamothu2/state-street-react-challenge
cfd02647c3c51bea5dc3bc2246892f9a4ab85c56
[ "MIT" ]
null
null
null
import { useEffect } from 'react'; import { Link } from 'react-router-dom'; import { getTransactions, filterTransactions } from '../../utils'; import { getAppContext } from '../AppContext'; import { nameFilters, typeFilters } from '../constants'; /** * View shows all teh transactions with filters. * @returns React component */ const ListView = () => { const [state, dispatch] = getAppContext(); const { transactions, filterByNames, filterByTypes } = state; const nameFilterUpdated = event => { if(event.target.checked) { dispatch({type: 'setNameFilter', nameFilters: [...filterByNames, ...[event.target.name]]}) } else { const updated = filterByNames.filter(filter => filter !== event.target.name); dispatch({type: 'setNameFilter', nameFilters: updated }) } }; const typeFilterUpdated = event => { if(event.target.checked) { dispatch({type: 'setTypeFilter', typeFilters: [...filterByTypes, ...[event.target.name]]}) } else { const updated = filterByTypes.filter(filter => filter !== event.target.name); dispatch({type: 'setTypeFilter', typeFilters: updated }) } }; useEffect(() => { const filteredResult = filterTransactions(filterByNames, filterByTypes); dispatch({type: 'setTransactions', data: filteredResult}); }, [filterByNames, filterByTypes, dispatch]); useEffect(() => { if(transactions.length === 0) { const result = getTransactions(); dispatch({type: 'setTransactions', data: result}); } }, [transactions, dispatch]); return <> <header> <h2>My Transactions </h2></header> <div className="transactions-view"> <div className="filter-view"> <h3>Filters</h3> <section> <h4>Account Name</h4> { nameFilters.map(filter => <div key={filter}> <label><input id={filter} type="checkbox" aria-label={filter} name={filter} checked={filterByNames.includes(filter)} onChange={nameFilterUpdated} /> {filter} </label> </div> ) } </section> <section> <h4>Transaction Type</h4> { typeFilters.map(filter => <div key={filter.value}> <label> <input id={filter.value} type="checkbox" aria-label={filter.value} name={filter.value} checked={filterByTypes.includes(filter.value)} onChange={typeFilterUpdated} /> {filter.label} </label> </div> ) } </section> </div> <div className="table-view"> <table> <thead> <tr> <th>ACCOUNT NO.</th> <th>ACCOUNT NAME</th> <th>CURRENCY</th> <th>AMOUNT</th> <th>TRANSACTION TYPE</th> </tr> </thead> <tbody> { transactions.map(transaction => <tr key={transaction.account}> <td><Link to={{pathname: `/${transaction.account}/details`}}>{transaction.account}</Link></td> <td>{transaction.accountName}</td> <td>{transaction.currencyCode}</td> <td>{transaction.amount}</td> <td>{transaction.transactionType}</td> </tr> ) } </tbody> </table> </div> </div> </> }; export default ListView;
40.46729
201
0.439723
8f3d8b2f42c4e64d8e9cc8fb01396af8bb34fd32
1,533
kt
Kotlin
android-debuggers/src/com/android/tools/idea/sqlite/fileType/SqliteFileHandler.kt
qq1056779951/android
b9677e7537be580437756b17bfca83a907f18598
[ "Apache-2.0" ]
831
2016-06-09T06:55:34.000Z
2022-03-30T11:17:10.000Z
android-debuggers/src/com/android/tools/idea/sqlite/fileType/SqliteFileHandler.kt
qq1056779951/android
b9677e7537be580437756b17bfca83a907f18598
[ "Apache-2.0" ]
19
2017-10-27T00:36:35.000Z
2021-02-04T13:59:45.000Z
android-debuggers/src/com/android/tools/idea/sqlite/fileType/SqliteFileHandler.kt
qq1056779951/android
b9677e7537be580437756b17bfca83a907f18598
[ "Apache-2.0" ]
210
2016-07-05T12:22:36.000Z
2022-03-19T09:07:15.000Z
/* * Copyright (C) 2019 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.tools.idea.sqlite.fileType import com.android.annotations.NonNull import com.android.annotations.concurrency.WorkerThread import com.android.tools.idea.deviceExplorer.FileHandler import com.android.tools.idea.sqlite.fileType.SqliteFileType import com.intellij.openapi.vfs.VirtualFile /** * Picks additional files to download when opening a SQLite database. * Room uses write-ahead-log by default on API 16+. Therefore for databases created by Room downloading the .db file is not enough, * we also need to download the .db-shm and .db-wal. */ class SqliteFileHandler : FileHandler { @WorkerThread @NonNull override fun getAdditionalDevicePaths(@NonNull deviceFilePath: String, @NonNull localFile: VirtualFile): List<String> { return if (localFile.fileType == SqliteFileType) { listOf("$deviceFilePath-shm", "$deviceFilePath-wal") } else { emptyList() } } }
40.342105
131
0.756034
fff15604574149bf85c2fb22f0182ddd939539c7
17,816
html
HTML
root/index.html
GringoXY/curb-covid
76866b3136e8bb1587f08d4905e9dcfa60870e84
[ "MIT" ]
2
2020-10-12T17:56:19.000Z
2020-10-12T18:53:14.000Z
root/index.html
GringoXY/curb-covid
76866b3136e8bb1587f08d4905e9dcfa60870e84
[ "MIT" ]
null
null
null
root/index.html
GringoXY/curb-covid
76866b3136e8bb1587f08d4905e9dcfa60870e84
[ "MIT" ]
1
2020-11-23T20:34:19.000Z
2020-11-23T20:34:19.000Z
<!doctype html><html lang="en" dir="ltr"><head><meta charset="UTF-8"><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"><meta http-equiv="X-UA-Compatible" content="ie=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="author" content="Przemysław Sipa & Przemysław Kowalski"><meta name="description" content="Displaying global map of COVID-19 infections/deceases, news about COVID-19, overrall information about SARS-CoV-2 & form which checks probability of you having a infection."><title>Curb Covid | all about COVID-19</title><link rel="shortcut icon" href="images/0e794ee912fd90bcecaf8f2dd07feda8.ico" type="image/x-icon"><link href="index.css" rel="stylesheet"></head><body><header class="l-header"><div class="c-logo"><a class="c-logo__link" href="./index.html" title="Go to the home page"> <?xml version="1.0" encoding="utf-8"?> <svg class="c-logo__svg" version="1.1" id="logo" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 150 175" xml:space="preserve"><text class="c-logo__text c-logo__text--big" transform="matrix(1.0278 0 0 1 -5.5156 166.123)">C</text><g><circle style="fill:#f4b2b0;" cx="66.7" cy="78" r="3.2"/><circle style="fill:#f4b2b0;" cx="86.2" cy="86.6" r="5.4"/><circle style="fill:#f4b2b0;" cx="72.1" cy="99.6" r="6.5"/><circle style="fill:#f4b2b0;" cx="91.5" cy="102.8" r="3.2"/><circle style="fill:#f4b2b0;" cx="94.8" cy="76.9" r="3.2"/><g><path style="fill:#ef233c;" d="M119.6,80.2L119.6,80.2c-3.2,0-5.4,1.1-7.5,3.2c-1.1,1.1-2.2,2.2-3.2,2.2 c-1.1-4.3-2.2-7.5-4.3-10.8l2.2-2.2c1.1-1.1,1.1-1.1,2.2-1.1c2.2,0,3.2-1.1,4.3-2.2l1.1-1.1v-1.1l0,0c0-3.2-1.1-5.4-3.2-7.5 c-2.2-2.2-4.3-3.2-7.5-3.2l0,0h-1.1v1.1c-1.1,1.1-2.2,3.2-2.2,4.3s0,2.2-1.1,2.2l-2.2,2.2c-3.2-2.2-6.5-4.3-10.8-4.3 c0-1.1,1.1-2.2,2.2-3.2c2.2-1.1,3.2-3.2,3.2-5.4v-1.1c0,0,0-1.1-1.1-1.1c-2.2-2.2-5.4-3.2-8.6-3.2h-2.2c-3.2,0-6.5,1.1-9.7,3.2 c0,0,0,0,0,1.1v1.1c0,2.2,1.1,5.4,3.2,6.5c1.1,1.1,2.2,2.2,2.2,3.2c-4.3,1.1-7.5,2.2-10.8,4.3l-2.2-2.2c-1.1-1.1-1.1-2.2-1.1-2.2 c0-2.2-1.1-4.3-2.2-5.4l-1.1-1.1H57l0,0c-3.2,0-5.4,1.1-7.5,3.2c-2.2,2.2-3.2,4.3-3.2,7.5l0,0v1.1l1.1,1.1 c1.1,1.1,3.2,2.2,5.4,2.2c1.1,0,2.2,0,2.2,1.1l2.2,2.2c-2.2,3.2-4.3,6.5-4.3,10.8c-1.1,0-2.2-1.1-3.2-2.2 c-2.2-2.2-4.3-3.2-6.5-3.2h-1.1c0,0-1.1,0-1.1,1.1c-2.2,2.2-3.2,5.4-3.2,8.6V91c0,4.3,1.1,7.5,3.2,10.8c0,0,0,0,1.1,0H43 c2.2,0,5.4-1.1,6.5-3.2c1.1-1.1,2.2-2.2,3.2-2.2c1.1,4.3,2.2,7.5,4.3,10.8l-2.2,2.2c-1.1,1.1-2.2,1.1-2.2,1.1 c-2.2,0-4.3,1.1-5.4,2.2l-1.1,1.1v1.1l0,0c0,3.2,1.1,5.4,3.2,7.5c2.2,2.2,4.3,3.2,7.5,3.2l0,0h1.1l1.1-1.1 c1.1-1.1,2.2-3.2,2.2-4.3s0-2.2,1.1-2.2l2.2-2.2c3.2,2.2,6.5,4.3,10.8,4.3c0,1.1-1.1,2.2-2.2,3.2c-2.2,1.1-3.2,3.2-3.2,5.4v1.1 c0,0,0,1.1,1.1,1.1c2.2,2.2,5.4,3.2,8.6,3.2h1.1c3.2,0,6.5-1.1,9.7-3.2l1.1-1.1v-1.1c0-2.2-1.1-5.4-3.2-6.5 c-1.1-1.1-2.2-2.2-2.2-3.2c4.3-1.1,7.5-2.2,10.8-4.3l2.2,2.2c1.1,1.1,1.1,1.1,1.1,2.2c0,2.2,1.1,3.2,2.2,4.3l1.1,1.1h1.1l0,0 c3.2,0,5.4-1.1,7.5-3.2s3.2-4.3,3.2-7.5l0,0v-1.1h-1.1c-1.1-1.1-3.2-2.2-4.3-2.2s-2.2,0-2.2-1.1l-2.2-2.2 c2.2-3.2,4.3-6.5,4.3-10.8c1.1,0,2.2,1.1,3.2,2.2c1.1,2.2,3.2,3.2,5.4,3.2h1.1c0,0,1.1,0,1.1-1.1c2.2-2.2,3.2-5.4,3.2-8.6v-2.2 C123.9,86.6,122.8,83.4,119.6,80.2C120.7,80.2,120.7,80.2,119.6,80.2z M120.7,92c0,3.2-1.1,5.4-2.2,7.5c-2.2,0-3.2-1.1-4.3-2.2 c-1.1-2.2-4.3-3.2-6.5-3.2s-5.4,1.1-7.5,2.2l-1.1,1.1l1.1,2.2l2.2-1.1c1.1-1.1,3.2-1.1,4.3-1.1c-1.1,3.2-2.2,7.5-4.3,9.7 c0,1.1,0,1.1,0,2.2l3.2,3.2c1.1,1.1,3.2,2.2,4.3,2.2c1.1,0,2.2,0,2.2,1.1l1.1,1.1c0,2.2-1.1,4.3-2.2,5.4s-4.3,1.1-6.5,1.1 l-1.1-1.1c-1.1-1.1-1.1-1.1-1.1-2.2c0-2.2-1.1-3.2-2.2-4.3l-2.2-3.2c0,0-1.1-1.1-2.2,0c-3.2,2.2-6.5,4.3-9.7,4.3 c0-1.1,1.1-3.2,1.1-4.3l1.1-1.1l-2.2-1.1l-1.1,1.1c-1.1,2.2-2.2,4.3-2.2,7.5c0,2.2,1.1,5.4,3.2,6.5c1.1,1.1,2.2,2.2,2.2,4.3 c-2.2,1.1-5.4,2.2-7.5,2.2h-1.1c-3.2,0-5.4-1.1-7.5-2.2c0-2.2,1.1-3.2,2.2-4.3c2.2-1.1,3.2-4.3,3.2-6.5s-1.1-5.4-2.2-7.5v-2.2 l-3.2,2.2l1.1,1.1c1.1,1.1,1.1,3.2,1.1,4.3c-3.2-1.1-7.5-2.2-9.7-4.3c-1.1,0-1.1,0-2.2,0l-3.2,3.2c-1.1,1.1-2.2,3.2-2.2,4.3 c0,1.1,0,2.2-1.1,2.2l1.1,1.1c-2.2,0-4.3-1.1-5.4-2.2c-1.1-1.1-3.2-4.3-3.2-6.5l1.1-1.1c1.1-1.1,1.1-1.1,2.2-1.1 c2.2,0,3.2-1.1,4.3-2.2l3.2-2.2c0,0,1.1-1.1,0-2.2c-2.2-2.2-3.2-5.4-4.3-9.7c1.1,0,3.2,1.1,4.3,1.1l1.1,1.1l1.1-2.2h-1.1 C58,94,55.9,94,53.7,94c-3.2,0-5.4,1.1-6.5,3.2c-1.1,1.1-3.2,2.2-4.3,2.2c-2.2-2.2-2.2-5.4-2.2-7.5v-2.2c0-3.2,1.1-5.4,2.2-7.5 c2.2,0,3.2,1.1,4.3,2.2c1.1,2.2,3.2,3.2,6.5,3.2c2.2,0,5.4-1.1,7.5-2.2l1.1-1.1l-2.2-2.2L59,83.2c-1.1,1.1-3.2,2.2-4.3,2.2 C56,81.2,57,78,59.2,74.8c0-1.1,0-1.1,0-2.2L57,70.4c-1.1-1.1-3.2-2.2-4.3-2.2s-2.2,0-2.2-1.1h-2.2c0-2.2,1.1-4.3,2.2-5.4 s4.3-3.2,6.5-3.2l1.1,1.1c1.1,1.1,1.1,1.1,1.1,2.2c0,2.2,1.1,3.2,2.2,4.3l2.2,3.2c0,0,1.1,1.1,2.2,0c3.2-2.2,6.5-4.3,9.7-4.3 c0,1.1-1.1,3.2-1.1,4.3l-2.2,1.1l2.2,1.1l1.1-1.1c1.1-2.2,2.2-4.3,2.2-7.5c0-2.2-1.1-5.4-3.2-6.5c-1.1,0-2.2-2.2-2.2-3.2 c2.2-1.1,5.4-2.2,7.5-2.2h1.1c3.2,0,5.4,1.1,7.5,2.2c0,2.2-1.1,3.2-2.2,4.3C84,58.6,83,61.8,83,64s1.1,5.4,2.2,7.5l1.1,1.1 l2.2-1.1v-2.2c-1.1-1.1-1.1-3.2-1.1-4.3c3.2,1.1,7.5,2.2,9.7,4.3c1.1,0,1.1,0,2.2,0l3.2-3.2c1.1-1.1,2.2-3.2,2.2-4.3 s0-2.2,1.1-2.2l-1.1-1.1c2.2,0,4.3,1.1,5.4,2.2c2.2,2.2,3.2,4.3,3.2,6.5l-1.1,1.1c-1.1,1.1-1.1,1.1-2.2,1.1 c-2.2,0-3.2,1.1-4.3,2.2l-3.2,2.2c0,0-1.1,1.1,0,2.2c2.2,3.2,4.3,6.5,4.3,9.7c-1.1,0-3.2-1.1-4.3-1.1l-1.1-1.1l-1.1,2.2l1.1,1.1 c2.2,1.1,4.3,2.2,7.5,2.2c2.2,0,5.4-1.1,6.5-3.2c1.1-1.1,2.2-2.2,4.3-2.2c1.1,2.2,2.2,5.4,2.2,7.5L120.7,92L120.7,92z"/><path style="fill:#ef233c;" d="M71.1,78c0-2.2-2.2-4.3-4.3-4.3c-2.2,0-4.3,2.2-4.3,4.3c0,2.2,2.2,4.3,4.3,4.3 C68.9,82.3,71.1,81.2,71.1,78z M65.7,78c0-1.1,1.1-1.1,1.1-1.1c1.1,0,1.1,1.1,1.1,1.1s0,2.2-1.1,2.2S65.7,79.1,65.7,78z"/><path style="fill:#ef233c;" d="M93.7,86.6c0-4.3-3.2-6.5-6.5-6.5s-7.5,3.2-7.5,6.5s3.2,6.5,6.5,6.5S93.7,90.9,93.7,86.6z M81.8,86.6c0-2.2,2.2-4.3,4.3-4.3s4.3,2.2,4.3,4.3c0,2.2-2.2,4.3-4.3,4.3S81.8,88.8,81.8,86.6z"/><path style="fill:#ef233c;" d="M72.1,90.9c-4.3,0-7.5,3.2-7.5,8.6c0,4.3,3.2,8.6,8.6,8.6c4.3,0,8.6-3.2,8.6-8.6 C80.8,94.2,77.5,90.9,72.1,90.9z M72.1,105c-3.2,0-5.4-2.2-5.4-5.4s2.2-5.4,5.4-5.4s5.4,2.2,5.4,5.4S75.4,105,72.1,105z"/><path style="fill:#ef233c;" d="M91.5,97.4c-2.2,0-5.4,2.2-5.4,5.4s2.2,5.4,5.4,5.4c2.2,0,5.4-2.2,5.4-5.4S93.7,97.4,91.5,97.4z M91.5,105c-1.1,0-2.2-1.1-2.2-2.2s1.1-2.2,2.2-2.2s2.2,1.1,2.2,2.2S92.6,105,91.5,105z"/><path style="fill:#ef233c;" d="M94.8,72.6c-2.2,0-4.3,2.2-4.3,4.3s2.2,4.3,4.3,4.3c2.2,0,4.3-2.2,4.3-4.3 C99.1,74.8,96.9,72.6,94.8,72.6z M94.8,78c-1.1,0-1.1-1.1-1.1-1.1l1.1-1.1l1.1,1.1C95.9,76.9,95.9,78,94.8,78z"/></g></g></svg><div class="c-logo__text c-logo__text--small"><span class="c-logo__span">URB</span> <span class="c-logo__span">OVID</span></div></a></div><div class="c-settings"><button class="c-settings__btn c-settings__btn--is-contrast-on" type="button" title="Turn on/off contrast"><svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="adjust" class="c-settings__svg c-settings__svg--is-contrast-on" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M8 256c0 136.966 111.033 248 248 248s248-111.034 248-248S392.966 8 256 8 8 119.033 8 256zm248 184V72c101.705 0 184 82.311 184 184 0 101.705-82.311 184-184 184z"></path></svg></button> <button class="c-settings__btn c-settings__btn--font-increase" type="button" title="Increase font size">A</button> <button class="c-settings__btn c-settings__btn--font-decrease" type="button" title="Decrease font size">A</button></div><nav class="c-nav"><button class="c-nav__btn" type="button"><span class="c-nav__hamburger"></span></button><ul class="c-nav__list--fill-window"><li class="c-nav__item"><a href="./index.html" class="c-nav__link">Home</a></li><li class="c-nav__item"><a href="./covid-test.html" class="c-nav__link">COVID-19 test</a></li><li class="c-nav__item"><a href="./covid-world.html" class="c-nav__link">COVID-19 World</a></li><li class="c-nav__item"><a href="./covid-poland.html" class="c-nav__link">COVID-19 Poland</a></li><li class="c-nav__item"><a href="./about-us.html" class="c-nav__link">About us</a></li></ul><ul class="c-nav__list"><li class="c-nav__item"><a href="./index.html" class="c-nav__link">Home</a></li><li class="c-nav__item"><a href="./covid-test.html" class="c-nav__link">COVID-19 test</a></li><li class="c-nav__item"><a href="./covid-world.html" class="c-nav__link">COVID-19 World</a></li><li class="c-nav__item"><a href="./covid-poland.html" class="c-nav__link">COVID-19 Poland</a></li><li class="c-nav__item"><a href="./about-us.html" class="c-nav__link">About us</a></li></ul></nav></header><main class="l-main"><div class="c-bar-left"><div class="c-headings"><h1 class="c-headings__heading">Get the latest information and notifications about COVID-19</h1><h2 class="c-headings__heading">Follow COVID-19 number of infections in the World or test your health</h2></div><div class="c-links"><a href="./covid-world.html" class="c-links__link c-links__link--blue c-links__link--yellow"><svg class="c-links__svg c-links__svg--blue" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="globe" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path fill="currentColor" d="M336.5 160C322 70.7 287.8 8 248 8s-74 62.7-88.5 152h177zM152 256c0 22.2 1.2 43.5 3.3 64h185.3c2.1-20.5 3.3-41.8 3.3-64s-1.2-43.5-3.3-64H155.3c-2.1 20.5-3.3 41.8-3.3 64zm324.7-96c-28.6-67.9-86.5-120.4-158-141.6 24.4 33.8 41.2 84.7 50 141.6h108zM177.2 18.4C105.8 39.6 47.8 92.1 19.3 160h108c8.7-56.9 25.5-107.8 49.9-141.6zM487.4 192H372.7c2.1 21 3.3 42.5 3.3 64s-1.2 43-3.3 64h114.6c5.5-20.5 8.6-41.8 8.6-64s-3.1-43.5-8.5-64zM120 256c0-21.5 1.2-43 3.3-64H8.6C3.2 212.5 0 233.8 0 256s3.2 43.5 8.6 64h114.6c-2-21-3.2-42.5-3.2-64zm39.5 96c14.5 89.3 48.7 152 88.5 152s74-62.7 88.5-152h-177zm159.3 141.6c71.4-21.2 129.4-73.7 158-141.6h-108c-8.8 56.9-25.6 107.8-50 141.6zM19.3 352c28.6 67.9 86.5 120.4 158 141.6-24.4-33.8-41.2-84.7-50-141.6h-108z"></path></svg> <span class="c-links__text">Move to global map</span> </a><a href="./covid-test.html" class="c-links__link c-links__link--white"><svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="notes-medical" class="c-links__svg c-links__svg--blue" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="currentColor" d="M336 64h-80c0-35.3-28.7-64-64-64s-64 28.7-64 64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM192 40c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm96 304c0 4.4-3.6 8-8 8h-56v56c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8v-56h-56c-4.4 0-8-3.6-8-8v-48c0-4.4 3.6-8 8-8h56v-56c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v56h56c4.4 0 8 3.6 8 8v48zm0-192c0 4.4-3.6 8-8 8H104c-4.4 0-8-3.6-8-8v-16c0-4.4 3.6-8 8-8h176c4.4 0 8 3.6 8 8v16z"></path></svg> <span class="c-links__text">Take a COVID-19 test</span></a></div></div><div class="c-bar-right"><img class="c-bar-right__svg" src="images/e75f991987b128c866f400213f75c959.svg" type="image/svg+xml" alt="COVID-19"> <img class="c-bar-right__svg" src="images/e75f991987b128c866f400213f75c959.svg" type="image/svg+xml" alt="COVID-19"> <img class="c-bar-right__svg" src="images/e75f991987b128c866f400213f75c959.svg" type="image/svg+xml" alt="COVID-19"> <img class="c-bar-right__svg" src="images/e75f991987b128c866f400213f75c959.svg" type="image/svg+xml" alt="COVID-19"> <img class="c-bar-right__svg" src="images/e75f991987b128c866f400213f75c959.svg" type="image/svg+xml" alt="COVID-19"> <img class="c-bar-right__svg" src="images/e75f991987b128c866f400213f75c959.svg" type="image/svg+xml" alt="COVID-19"> <img class="c-bar-right__svg" src="images/e75f991987b128c866f400213f75c959.svg" type="image/svg+xml" alt="COVID-19"> <img class="c-bar-right__svg" src="images/e75f991987b128c866f400213f75c959.svg" type="image/svg+xml" alt="COVID-19"> <img class="c-bar-right__svg" src="images/e75f991987b128c866f400213f75c959.svg" type="image/svg+xml" alt="COVID-19"> <img class="c-bar-right__svg" src="images/e75f991987b128c866f400213f75c959.svg" type="image/svg+xml" alt="COVID-19"></div></main><article class="l-article"><section class="c-section"><h3 class="c-heading">What is COVID-19?</h3><p class="c-paragraph">Coronavirus disease (COVID-19) is an infectious disease caused by a newly discovered coronavirus. Most people infected with the COVID-19 virus will experience mild to moderate respiratory illness and recover without requiring special treatment. Older people, and those with underlying medical problems like cardiovascular disease, diabetes, chronic respiratory disease, and cancer are more likely to develop serious illness. The best way to prevent and slow down transmission is to be well informed about the COVID-19 virus, the disease it causes and how it spreads. Protect yourself and others from infection by washing your hands or using an alcohol based rub frequently and not touching your face. The COVID-19 virus spreads primarily through droplets of saliva or discharge from the nose when an infected person coughs or sneezes, so it’s important that you also practice respiratory etiquette.</p></section><section class="c-section"><h3 class="c-heading">To prevent infection and to slow transmission of COVID-19, do the following:</h3><ul class="c-guide-list"><li class="c-guide-list__item">Wash your hands regularly with soap and water, or clean them with alcohol-based hand rub.</li><li class="c-guide-list__item">Maintain at least 1 metre distance between you and people coughing or sneezing.</li><li class="c-guide-list__item">Avoid touching your face.</li><li class="c-guide-list__item">Cover your mouth and nose when coughing or sneezing.</li><li class="c-guide-list__item">Stay home if you feel unwell.</li><li class="c-guide-list__item">Refrain from smoking and other activities that weaken the lungs.</li><li class="c-guide-list__item">Practice physical distancing by avoiding unnecessary travel and staying away from large groups of people.</li></ul></section><section class="c-section"><h3 class="c-heading">Symptoms and sings</h3><p class="c-paragraph">Symptoms of COVID-19 are variable, but usually include fever and a cough. People with the same infection may have different symptoms, and their symptoms may change over time. For example, one person may have a high fever, a cough, and fatigue, and another person may have a low fever at the start of the disease and develop difficulty breathing a week later. All of the symptoms of COVID-19 are non-specific, which means that they are also seen in some other diseases.</p><p class="c-paragraph">Symptoms of COVID-19 can be relatively non-specific; the two most common symptoms are fever (88 percent) and dry cough (68 percent). Among those who develop symptoms, approximately one in five may become more seriously ill and have difficulty breathing. Emergency symptoms include difficulty breathing, persistent chest pain or pressure, sudden confusion, difficulty waking, and bluish face or lips; immediate medical attention is advised if these symptoms are present. Further development of the disease can lead to complications including pneumonia, acute respiratory distress syndrome, sepsis, septic shock, and kidney failure.</p></section></article><footer class="l-footer"><a class="c-media-link" href="https://github.com/GringoXY/curb-covid" target="_blank" title="Link to webapp repository"><svg aria-hidden="true" focusable="false" data-prefix="fab" data-icon="github" class="c-media-link__svg" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 496 512"><path fill="currentColor" d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"></path></svg></a><div class="c-author"><span class="c-author__fullname">Przemysław Sipa</span> <span class="c-author__fullname">Przemysław Kowalski</span></div><div class="c-copyright-claim"><a class="c-copyright-claim__link" href="https://github.com/GringoXY/curb-covid/blob/main/LICENSE" target="_blank">MIT license</a> <span class="c-copyright-claim__mark">&copy;</span> <span class="c-copyright-claim__year">2020</span></div></footer><script src="index.js"></script></body></html>
456.820513
10,931
0.654356
767b7ad80f1ac8a4de7e95f601897a023489bace
22,998
tab
SQL
cluster_assignment/RBBH/RBBH_gene_to_cluster_assignment.tab
peterthorpe5/genomes_tree_phyto_pathogens
6f5fa79e37bbe699f2096c2b5b841b11122386d7
[ "MIT" ]
null
null
null
cluster_assignment/RBBH/RBBH_gene_to_cluster_assignment.tab
peterthorpe5/genomes_tree_phyto_pathogens
6f5fa79e37bbe699f2096c2b5b841b11122386d7
[ "MIT" ]
null
null
null
cluster_assignment/RBBH/RBBH_gene_to_cluster_assignment.tab
peterthorpe5/genomes_tree_phyto_pathogens
6f5fa79e37bbe699f2096c2b5b841b11122386d7
[ "MIT" ]
null
null
null
busco PHYBOEH_010932-T1 35 busco PHYGONAP_011657-T1 35 busco PHYSUEDO_006562-T1 35 RXLR PHYSUEDO_001911-T1 53 RXLR PHYGONAP_007810-T1 90 RXLR PHYSUEDO_001444-T1 90 busco PHYBOEH_001952-T1 104 busco PHYGONAP_004428-T1 104 busco PHYSUEDO_004020-T1 104 busco PHYGONAP_013669-T1 111 busco PHYBOEH_009023-T1 151 busco PHYGONAP_006155-T1 151 busco PHYSUEDO_008903-T1 151 busco PHYBOEH_005464-T1 154 busco PHYSUEDO_009875-T1 154 busco PHYBOEH_006900-T1 157 busco PHYGONAP_020430-T1 157 busco PHYSUEDO_012880-T1 157 RXLR PHYBOEH_010091-T1 168 RXLR PHYSUEDO_005384-T1 168 busco PHYBOEH_000643-T1 171 busco PHYSUEDO_003859-T1 171 busco PHYBOEH_005368-T1 176 busco PHYGONAP_017358-T1 176 busco PHYSUEDO_003169-T1 176 busco PHYBOEH_005214-T1 203 busco PHYGONAP_017220-T1 203 busco PHYSUEDO_000253-T1 203 busco PHYBOEH_004300-T1 223 busco PHYGONAP_014775-T1 223 busco PHYSUEDO_011197-T1 223 busco PHYBOEH_005881-T1 240 busco PHYGONAP_006716-T1 240 busco PHYSUEDO_008067-T1 240 RXLR PHYBOEH_003532-T1 250 busco PHYGONAP_001255-T1 255 busco PHYSUEDO_013511-T1 255 RXLR PHYGONAP_017922-T1 273 busco PHYBOEH_011184-T1 274 busco PHYGONAP_001058-T1 274 busco PHYSUEDO_014304-T1 274 busco PHYBOEH_011949-T1 286 busco PHYGONAP_012211-T1 286 busco PHYSUEDO_014382-T1 286 busco PHYBOEH_005038-T1 293 busco PHYGONAP_005552-T1 293 busco PHYSUEDO_006787-T1 293 busco PHYBOEH_005039-T1 294 busco PHYGONAP_005551-T1 294 busco PHYSUEDO_006788-T1 294 busco PHYBOEH_003067-T1 315 busco PHYSUEDO_005002-T1 315 busco PHYGONAP_006849-T1 315 busco PHYBOEH_001784-T1 320 busco PHYGONAP_005569-T1 320 busco PHYSUEDO_012036-T1 320 busco PHYBOEH_006695-T1 371 busco PHYGONAP_016006-T1 371 busco PHYSUEDO_010105-T1 371 busco PHYBOEH_010271-T1 381 busco PHYGONAP_023133-T1 381 busco PHYSUEDO_007522-T1 381 busco PHYBOEH_010255-T1 382 busco PHYGONAP_020245-T1 382 busco PHYSUEDO_007537-T1 382 busco PHYBOEH_006650-T1 402 busco PHYGONAP_013707-T1 402 busco PHYSUEDO_012382-T1 402 busco PHYBOEH_001188-T1 405 busco PHYGONAP_009058-T1 405 busco PHYSUEDO_001044-T1 405 busco PHYBOEH_005395-T1 408 busco PHYGONAP_000657-T1 408 busco PHYSUEDO_006221-T1 408 busco PHYBOEH_000182-T1 434 busco PHYGONAP_006965-T1 434 busco PHYSUEDO_012508-T1 434 busco PHYBOEH_000277-T1 469 busco PHYGONAP_014359-T1 469 busco PHYSUEDO_003632-T1 469 busco PHYBOEH_005889-T1 517 busco PHYGONAP_010674-T1 517 busco PHYSUEDO_009155-T1 517 busco PHYBOEH_005953-T1 527 busco PHYGONAP_010005-T1 527 busco PHYSUEDO_003822-T1 527 busco PHYBOEH_007449-T1 534 busco PHYGONAP_021795-T1 534 busco PHYSUEDO_001598-T1 534 busco PHYBOEH_003571-T1 553 busco PHYGONAP_015905-T1 553 busco PHYSUEDO_009180-T1 553 busco PHYBOEH_003985-T1 575 RXLR PHYGONAP_014041-T1 575 busco PHYGONAP_014041-T1 575 busco PHYSUEDO_013061-T1 575 busco PHYBOEH_008454-T1 587 busco PHYSUEDO_012045-T1 587 busco PHYBOEH_007554-T1 600 busco PHYGONAP_017330-T1 600 busco PHYSUEDO_008696-T1 600 busco PHYBOEH_002676-T1 611 busco PHYGONAP_000933-T1 611 busco PHYSUEDO_014474-T1 611 busco PHYGONAP_021210-T1 615 busco PHYSUEDO_008145-T1 615 busco PHYBOEH_011826-T1 637 busco PHYGONAP_018346-T1 637 busco PHYSUEDO_002360-T1 637 RXLR PHYBOEH_006401-T1 660 RXLR PHYGONAP_016501-T1 660 RXLR PHYSUEDO_007402-T1 660 busco PHYBOEH_000863-T1 695 busco PHYGONAP_015403-T1 695 busco PHYSUEDO_001159-T1 695 busco PHYBOEH_007314-T1 722 busco PHYGONAP_012716-T1 722 busco PHYSUEDO_006294-T1 722 busco PHYBOEH_004567-T1 735 busco PHYGONAP_023087-T1 735 busco PHYSUEDO_011553-T1 735 busco PHYBOEH_007968-T1 751 busco PHYGONAP_005790-T1 751 busco PHYSUEDO_006168-T1 751 RXLR PHYGONAP_006772-T1 778 RXLR PHYSUEDO_015323-T1 778 busco PHYBOEH_011618-T1 796 busco PHYGONAP_009471-T1 796 busco PHYSUEDO_005347-T1 796 busco PHYBOEH_011557-T1 810 busco PHYGONAP_020211-T1 810 busco PHYSUEDO_010031-T1 810 busco PHYBOEH_011564-T1 811 busco PHYGONAP_019492-T1 811 busco PHYSUEDO_010022-T1 811 busco PHYBOEH_009128-T1 819 busco PHYGONAP_008507-T1 819 busco PHYSUEDO_000135-T1 819 busco PHYBOEH_009136-T1 820 busco PHYGONAP_003764-T1 820 busco PHYSUEDO_000125-T1 820 busco PHYBOEH_005156-T1 857 busco PHYGONAP_023748-T1 857 busco PHYSUEDO_013895-T1 857 busco PHYBOEH_011546-T1 860 busco PHYSUEDO_008269-T1 860 busco PHYBOEH_003961-T1 889 busco PHYGONAP_018737-T1 889 busco PHYSUEDO_008464-T1 889 RXLR PHYBOEH_003264-T1 890 busco PHYBOEH_007866-T1 896 busco PHYGONAP_012538-T1 896 busco PHYSUEDO_014231-T1 896 RXLR PHYGONAP_021162-T1 908 busco PHYBOEH_005143-T1 918 busco PHYGONAP_021917-T1 918 busco PHYSUEDO_014254-T1 918 busco PHYBOEH_007471-T1 937 busco PHYGONAP_021192-T1 937 busco PHYSUEDO_009108-T1 937 busco PHYBOEH_005460-T1 954 busco PHYGONAP_003936-T1 954 busco PHYSUEDO_009871-T1 954 RXLR PHYSUEDO_012406-T1 967 busco PHYBOEH_009168-T1 1028 busco PHYGONAP_007736-T1 1028 busco PHYSUEDO_013375-T1 1028 busco PHYBOEH_002933-T1 1045 busco PHYGONAP_014443-T1 1045 busco PHYSUEDO_013628-T1 1045 busco PHYBOEH_009032-T1 1056 busco PHYGONAP_010278-T1 1056 busco PHYSUEDO_008914-T1 1056 RXLR PHYBOEH_008098-T1 1071 busco PHYBOEH_009406-T1 1127 busco PHYGONAP_015704-T1 1127 busco PHYSUEDO_002518-T1 1127 busco PHYSUEDO_014336-T1 1159 busco PHYBOEH_009098-T1 1173 busco PHYGONAP_023695-T1 1173 busco PHYSUEDO_006712-T1 1173 busco PHYBOEH_000349-T1 1185 busco PHYGONAP_000284-T1 1185 busco PHYSUEDO_014862-T1 1185 busco PHYBOEH_004915-T1 1238 busco PHYSUEDO_007884-T1 1238 busco PHYBOEH_006964-T1 1248 busco PHYGONAP_018944-T1 1248 busco PHYSUEDO_002703-T1 1248 busco PHYBOEH_008090-T1 1270 busco PHYGONAP_013809-T1 1270 busco PHYSUEDO_000604-T1 1270 busco PHYGONAP_019190-T1 1273 busco PHYSUEDO_015515-T1 1273 busco PHYBOEH_003085-T1 1296 busco PHYGONAP_016589-T1 1296 busco PHYSUEDO_013816-T1 1296 busco PHYBOEH_006809-T1 1307 busco PHYSUEDO_006939-T1 1307 RXLR PHYSUEDO_000643-T1 1320 busco PHYBOEH_008833-T1 1323 busco PHYGONAP_017310-T1 1323 busco PHYSUEDO_006968-T1 1323 RXLR PHYBOEH_010248-T1 1339 RXLR PHYSUEDO_011136-T1 1339 busco PHYBOEH_007062-T1 1359 busco PHYGONAP_019123-T1 1359 busco PHYSUEDO_008868-T1 1359 busco PHYBOEH_002282-T1 1393 busco PHYGONAP_023788-T1 1393 busco PHYSUEDO_001260-T1 1393 busco PHYBOEH_004029-T1 1414 busco PHYSUEDO_002890-T1 1414 busco PHYBOEH_000466-T1 1425 busco PHYGONAP_022474-T1 1425 RXLR PHYGONAP_003774-T1 1451 busco PHYBOEH_009922-T1 1473 busco PHYGONAP_008710-T1 1473 busco PHYSUEDO_002113-T1 1473 busco PHYBOEH_001908-T1 1477 busco PHYSUEDO_002925-T1 1477 busco PHYBOEH_000663-T1 1516 busco PHYGONAP_015362-T1 1516 busco PHYBOEH_000664-T1 1517 busco PHYGONAP_015361-T1 1517 busco PHYSUEDO_008714-T1 1517 RXLR PHYSUEDO_008389-T1 1539 RXLR PHYSUEDO_008394-T1 1542 busco PHYGONAP_014722-T1 1572 busco PHYSUEDO_015598-T1 1572 RXLR PHYSUEDO_013305-T1 1573 RXLR PHYBOEH_006144-T1 1626 busco PHYBOEH_010641-T1 1645 busco PHYGONAP_009500-T1 1645 busco PHYSUEDO_014747-T1 1645 busco PHYBOEH_004270-T1 1663 busco PHYGONAP_016919-T1 1663 busco PHYSUEDO_006205-T1 1663 busco PHYBOEH_010004-T1 1664 busco PHYGONAP_013800-T1 1664 busco PHYSUEDO_004046-T1 1664 RXLR PHYBOEH_008761-T1 1685 busco PHYSUEDO_004847-T1 1687 busco PHYBOEH_009776-T1 1687 busco PHYGONAP_017711-T1 1687 busco PHYBOEH_005297-T1 1714 busco PHYGONAP_016288-T1 1714 busco PHYSUEDO_013564-T1 1714 RXLR PHYBOEH_000088-T1 1748 RXLR PHYGONAP_006844-T1 1748 RXLR PHYSUEDO_005273-T1 1748 busco PHYBOEH_003378-T1 1790 busco PHYSUEDO_004083-T1 1790 busco PHYGONAP_012327-T1 1790 busco PHYGONAP_019944-T1 1790 RXLR PHYSUEDO_003920-T1 1793 busco PHYBOEH_001990-T1 1796 busco PHYGONAP_004841-T1 1796 busco PHYSUEDO_005575-T1 1796 busco PHYBOEH_011674-T1 1827 busco PHYGONAP_005055-T1 1827 busco PHYSUEDO_009665-T1 1827 RXLR PHYBOEH_006351-T1 1833 RXLR PHYGONAP_003673-T1 1833 busco PHYBOEH_006347-T1 1835 busco PHYGONAP_010761-T1 1835 busco PHYSUEDO_002458-T1 1835 busco PHYBOEH_011970-T1 1841 busco PHYGONAP_022667-T1 1841 busco PHYSUEDO_004547-T1 1841 busco PHYBOEH_006988-T1 1871 busco PHYGONAP_009493-T1 1871 busco PHYSUEDO_012625-T1 1871 busco PHYBOEH_002599-T1 1878 busco PHYGONAP_000684-T1 1878 busco PHYSUEDO_000870-T1 1878 busco PHYBOEH_007303-T1 1899 busco PHYSUEDO_006307-T1 1899 busco PHYBOEH_007299-T1 1900 busco PHYSUEDO_011625-T1 1900 busco PHYGONAP_004075-T1 1917 busco PHYSUEDO_008237-T1 1917 busco PHYBOEH_004574-T1 1918 busco PHYGONAP_023095-T1 1918 busco PHYSUEDO_003013-T1 1918 busco PHYBOEH_002402-T1 1972 busco PHYGONAP_008882-T1 1972 busco PHYSUEDO_007350-T1 1972 busco PHYBOEH_005022-T1 2012 busco PHYGONAP_010255-T1 2012 busco PHYSUEDO_013771-T1 2012 busco PHYBOEH_010346-T1 2027 busco PHYGONAP_019980-T1 2027 busco PHYSUEDO_003086-T1 2027 busco PHYBOEH_007102-T1 2057 busco PHYGONAP_010248-T1 2057 busco PHYSUEDO_000061-T1 2057 RXLR PHYGONAP_019444-T1 2058 busco PHYBOEH_004090-T1 2062 busco PHYGONAP_023964-T1 2062 busco PHYSUEDO_005306-T1 2062 busco PHYBOEH_000603-T1 2080 busco PHYGONAP_000707-T1 2080 busco PHYSUEDO_010072-T1 2080 RXLR PHYGONAP_003921-T1 2088 RXLR PHYBOEH_006479-T1 2106 busco PHYBOEH_011204-T1 2156 busco PHYSUEDO_014283-T1 2156 RXLR PHYBOEH_003006-T1 2160 RXLR PHYGONAP_005964-T1 2160 RXLR PHYSUEDO_005832-T1 2160 busco PHYBOEH_002410-T1 2161 busco PHYGONAP_003617-T1 2161 busco PHYSUEDO_007359-T1 2161 RXLR PHYBOEH_011386-T1 2170 RXLR PHYGONAP_014650-T1 2170 busco PHYBOEH_004142-T1 2186 busco PHYGONAP_014510-T1 2186 busco PHYSUEDO_006532-T1 2186 RXLR PHYGONAP_017060-T1 2194 busco PHYBOEH_007442-T1 2241 busco PHYGONAP_013653-T1 2241 busco PHYBOEH_009057-T1 2291 busco PHYGONAP_014459-T1 2291 busco PHYSUEDO_012247-T1 2291 busco PHYBOEH_004323-T1 2294 busco PHYSUEDO_011220-T1 2294 busco PHYBOEH_004317-T1 2296 busco PHYGONAP_020068-T1 2296 busco PHYSUEDO_011215-T1 2296 busco PHYBOEH_008886-T1 2307 busco PHYGONAP_020413-T1 2307 busco PHYSUEDO_011379-T1 2307 busco PHYGONAP_015726-T1 2321 busco PHYSUEDO_004623-T1 2321 RXLR PHYGONAP_021653-T1 2348 RXLR PHYBOEH_000552-T1 2348 busco PHYGONAP_007003-T1 2351 busco PHYSUEDO_015478-T1 2351 busco PHYBOEH_011154-T1 2383 busco PHYGONAP_011074-T1 2383 busco PHYSUEDO_006448-T1 2383 busco PHYBOEH_006429-T1 2405 busco PHYSUEDO_012901-T1 2405 busco PHYBOEH_006027-T1 2437 busco PHYGONAP_019275-T1 2437 busco PHYSUEDO_000540-T1 2437 busco PHYGONAP_016573-T1 2456 busco PHYSUEDO_010995-T1 2456 busco PHYBOEH_003703-T1 2458 busco PHYGONAP_011211-T1 2458 busco PHYSUEDO_005755-T1 2458 busco PHYSUEDO_002550-T1 2506 busco PHYBOEH_004226-T1 2542 busco PHYGONAP_009430-T1 2542 busco PHYSUEDO_009462-T1 2542 busco PHYBOEH_004311-T1 2567 busco PHYSUEDO_002378-T1 2567 busco PHYBOEH_004043-T1 2583 busco PHYSUEDO_014705-T1 2583 RXLR PHYBOEH_010586-T1 2600 RXLR PHYGONAP_007288-T1 2600 RXLR PHYSUEDO_003557-T1 2600 busco PHYBOEH_010509-T1 2606 busco PHYGONAP_004037-T1 2606 busco PHYSUEDO_010644-T1 2606 RXLR PHYBOEH_003148-T1 2625 busco PHYBOEH_000190-T1 2633 RXLR PHYSUEDO_012516-T1 2633 busco PHYSUEDO_012516-T1 2633 busco PHYSUEDO_008403-T1 2647 busco PHYBOEH_000273-T1 2673 busco PHYSUEDO_003641-T1 2673 RXLR PHYBOEH_010864-T1 2679 RXLR PHYGONAP_014218-T1 2679 RXLR PHYSUEDO_001902-T1 2679 busco PHYGONAP_013769-T1 2685 busco PHYBOEH_006767-T1 2686 busco PHYSUEDO_013380-T1 2686 RXLR PHYGONAP_022538-T1 2711 busco PHYBOEH_003795-T1 2743 RXLR PHYBOEH_006539-T1 2768 busco PHYSUEDO_009749-T1 2770 busco PHYBOEH_005971-T1 2773 busco PHYGONAP_013075-T1 2773 busco PHYSUEDO_003800-T1 2773 busco PHYBOEH_003103-T1 2781 busco PHYGONAP_019475-T1 2781 busco PHYSUEDO_010337-T1 2781 busco PHYBOEH_004969-T1 2810 busco PHYSUEDO_004317-T1 2810 busco PHYGONAP_010420-T1 2835 busco PHYSUEDO_007317-T1 2835 busco PHYBOEH_000009-T1 2894 busco PHYSUEDO_011922-T1 2894 busco PHYBOEH_005117-T1 3003 busco PHYSUEDO_009704-T1 3003 busco PHYBOEH_005106-T1 3006 busco PHYSUEDO_009689-T1 3006 busco PHYBOEH_008727-T1 3049 busco PHYGONAP_013005-T1 3049 busco PHYSUEDO_004120-T1 3049 RXLR PHYSUEDO_000844-T1 3062 RXLR PHYSUEDO_000353-T1 3067 busco PHYBOEH_007278-T1 3079 busco PHYGONAP_016683-T1 3079 busco PHYSUEDO_005826-T1 3079 RXLR PHYSUEDO_003026-T1 3090 busco PHYBOEH_004522-T1 3162 busco PHYGONAP_023043-T1 3162 busco PHYSUEDO_007657-T1 3162 busco PHYBOEH_011616-T1 3175 busco PHYGONAP_014764-T1 3175 busco PHYSUEDO_005349-T1 3175 busco PHYBOEH_002797-T1 3184 busco PHYGONAP_018055-T1 3184 busco PHYSUEDO_003130-T1 3184 busco PHYBOEH_001035-T1 3233 busco PHYGONAP_000986-T1 3233 busco PHYSUEDO_012741-T1 3233 busco PHYBOEH_002092-T1 3234 busco PHYGONAP_016642-T1 3234 busco PHYSUEDO_004875-T1 3234 busco PHYBOEH_005161-T1 3257 busco PHYSUEDO_013899-T1 3257 busco PHYBOEH_005358-T1 3272 busco PHYGONAP_005097-T1 3272 busco PHYSUEDO_015413-T1 3272 busco PHYBOEH_005937-T1 3305 busco PHYGONAP_006544-T1 3305 busco PHYSUEDO_014024-T1 3305 busco PHYBOEH_008955-T1 3337 busco PHYGONAP_020980-T1 3337 busco PHYSUEDO_003923-T1 3337 RXLR PHYBOEH_002819-T1 3339 busco PHYBOEH_001882-T1 3463 busco PHYGONAP_017573-T1 3463 busco PHYSUEDO_013411-T1 3463 busco PHYSUEDO_015480-T1 3471 busco PHYBOEH_001802-T1 3490 busco PHYGONAP_011615-T1 3490 busco PHYSUEDO_006463-T1 3490 busco PHYBOEH_002162-T1 3530 busco PHYGONAP_002008-T1 3530 busco PHYSUEDO_008596-T1 3530 busco PHYGONAP_009596-T1 3552 busco PHYSUEDO_000567-T1 3552 busco PHYBOEH_008668-T1 3558 busco PHYGONAP_013524-T1 3558 busco PHYSUEDO_002320-T1 3558 busco PHYBOEH_010317-T1 3565 busco PHYGONAP_015005-T1 3565 busco PHYSUEDO_011013-T1 3565 busco PHYBOEH_010297-T1 3568 busco PHYSUEDO_007494-T1 3568 busco PHYBOEH_010842-T1 3599 RXLR PHYGONAP_004974-T1 3665 RXLR PHYBOEH_000282-T1 3665 busco PHYBOEH_006680-T1 3667 busco PHYSUEDO_006417-T1 3667 RXLR PHYGONAP_016775-T1 3673 busco PHYBOEH_010787-T1 3684 busco PHYSUEDO_002175-T1 3684 RXLR PHYSUEDO_007755-T1 3687 busco PHYBOEH_001606-T1 3707 busco PHYSUEDO_000372-T1 3707 RXLR PHYBOEH_008811-T1 3713 busco PHYBOEH_003772-T1 3723 busco PHYSUEDO_004651-T1 3723 busco PHYBOEH_008422-T1 3730 busco PHYGONAP_018929-T1 3812 busco PHYSUEDO_007247-T1 3812 busco PHYBOEH_008541-T1 3835 busco PHYGONAP_001856-T1 3835 busco PHYSUEDO_000636-T1 3835 busco PHYGONAP_012763-T1 3885 busco PHYSUEDO_014572-T1 3885 busco PHYBOEH_005734-T1 3897 busco PHYGONAP_010401-T1 3897 busco PHYSUEDO_004420-T1 3897 busco PHYBOEH_000790-T1 3923 busco PHYGONAP_017851-T1 3923 busco PHYSUEDO_002997-T1 3923 busco PHYBOEH_009376-T1 3971 busco PHYSUEDO_009591-T1 3971 busco PHYBOEH_010358-T1 3998 busco PHYGONAP_002070-T1 3998 busco PHYSUEDO_003077-T1 3998 busco PHYBOEH_001011-T1 4021 busco PHYGONAP_015220-T1 4021 busco PHYSUEDO_001227-T1 4021 busco PHYBOEH_011904-T1 4039 busco PHYSUEDO_013979-T1 4039 RXLR PHYGONAP_002895-T1 4040 busco PHYBOEH_010108-T1 4052 busco PHYSUEDO_013215-T1 4052 busco PHYBOEH_000196-T1 4058 busco PHYGONAP_005590-T1 4058 busco PHYSUEDO_012523-T1 4058 busco PHYBOEH_005284-T1 4071 busco PHYGONAP_022449-T1 4071 busco PHYSUEDO_010002-T1 4071 RXLR PHYBOEH_009124-T1 4074 busco PHYBOEH_009124-T1 4074 busco PHYGONAP_008503-T1 4074 busco PHYSUEDO_000141-T1 4074 RXLR PHYBOEH_004099-T1 4075 RXLR PHYGONAP_017876-T1 4075 RXLR PHYSUEDO_005297-T1 4075 busco PHYSUEDO_015014-T1 4098 busco PHYBOEH_011828-T1 4113 busco PHYGONAP_023391-T1 4113 busco PHYSUEDO_014404-T1 4113 busco PHYBOEH_004766-T1 4126 busco PHYGONAP_001306-T1 4126 busco PHYSUEDO_007084-T1 4126 RXLR PHYSUEDO_011272-T1 4140 RXLR PHYBOEH_011365-T1 4165 busco PHYSUEDO_003924-T1 4172 RXLR PHYGONAP_020045-T1 4182 busco PHYBOEH_007628-T1 4191 busco PHYGONAP_013119-T1 4191 busco PHYSUEDO_003829-T1 4191 busco PHYBOEH_004327-T1 4196 busco PHYSUEDO_011226-T1 4196 busco PHYBOEH_006897-T1 4214 RXLR PHYSUEDO_000968-T1 4217 busco PHYGONAP_001045-T1 4283 busco PHYSUEDO_014293-T1 4283 busco PHYBOEH_011194-T1 4283 busco PHYBOEH_009330-T1 4345 busco PHYGONAP_002314-T1 4345 busco PHYSUEDO_010445-T1 4345 RXLR PHYBOEH_008010-T1 4402 RXLR PHYSUEDO_010849-T1 4457 RXLR PHYSUEDO_010339-T1 4487 RXLR PHYBOEH_010428-T1 4506 RXLR PHYSUEDO_002332-T1 4506 busco PHYBOEH_003986-T1 4513 busco PHYGONAP_014042-T1 4513 busco PHYSUEDO_013062-T1 4513 busco PHYBOEH_002386-T1 4548 busco PHYSUEDO_007332-T1 4548 RXLR PHYBOEH_002994-T1 4615 busco PHYSUEDO_014186-T1 4618 busco PHYBOEH_005185-T1 4618 busco PHYGONAP_019037-T1 4618 busco PHYBOEH_009904-T1 4679 busco PHYGONAP_010484-T1 4679 busco PHYSUEDO_002927-T1 4679 RXLR PHYGONAP_012556-T1 4716 RXLR PHYSUEDO_003349-T1 4716 RXLR PHYBOEH_003716-T1 4716 busco PHYBOEH_010352-T1 4723 busco PHYGONAP_023936-T1 4723 busco PHYGONAP_013558-T1 4736 RXLR PHYSUEDO_013773-T1 4736 busco PHYSUEDO_013773-T1 4736 busco PHYBOEH_009941-T1 4743 busco PHYGONAP_005266-T1 4743 busco PHYSUEDO_000244-T1 4743 busco PHYBOEH_006677-T1 4780 busco PHYGONAP_013366-T1 4780 busco PHYSUEDO_001915-T1 4780 RXLR PHYSUEDO_000627-T1 4798 busco PHYBOEH_010247-T1 4804 busco PHYSUEDO_011135-T1 4804 busco PHYBOEH_001519-T1 4837 busco PHYSUEDO_000782-T1 4837 busco PHYBOEH_007867-T1 4838 busco PHYSUEDO_014230-T1 4838 busco PHYBOEH_011515-T1 4860 busco PHYGONAP_014339-T1 4860 busco PHYSUEDO_004341-T1 4860 RXLR PHYBOEH_001864-T1 4881 RXLR PHYSUEDO_011348-T1 4920 RXLR PHYSUEDO_009383-T1 4937 RXLR PHYGONAP_019265-T1 4971 RXLR PHYGONAP_003079-T1 5029 RXLR PHYSUEDO_010988-T1 5029 busco PHYBOEH_007679-T1 5080 busco PHYGONAP_001771-T1 5080 busco PHYSUEDO_002380-T1 5080 busco PHYBOEH_011280-T1 5108 busco PHYGONAP_019390-T1 5108 busco PHYBOEH_011519-T1 5244 busco PHYSUEDO_004946-T1 5244 busco PHYBOEH_011684-T1 5313 busco PHYGONAP_008965-T1 5313 busco PHYBOEH_004005-T1 5324 busco PHYGONAP_013166-T1 5324 busco PHYSUEDO_004509-T1 5324 busco PHYBOEH_005451-T1 5373 busco PHYGONAP_009258-T1 5373 busco PHYSUEDO_006110-T1 5373 RXLR PHYSUEDO_010174-T1 5379 RXLR PHYSUEDO_000847-T1 5450 RXLR PHYGONAP_006679-T1 5450 busco PHYBOEH_009796-T1 5472 busco PHYSUEDO_003246-T1 5472 busco PHYBOEH_004387-T1 5485 busco PHYSUEDO_003331-T1 5485 RXLR PHYGONAP_005897-T1 5506 busco PHYBOEH_010062-T1 5514 busco PHYGONAP_007815-T1 5514 busco PHYSUEDO_001439-T1 5514 busco PHYBOEH_002501-T1 5570 busco PHYGONAP_023250-T1 5570 busco PHYSUEDO_001582-T1 5570 busco PHYBOEH_009103-T1 5580 busco PHYGONAP_004019-T1 5580 busco PHYSUEDO_002533-T1 5580 busco PHYBOEH_007627-T1 5604 busco PHYGONAP_013120-T1 5604 RXLR PHYGONAP_006708-T1 5656 RXLR PHYGONAP_000338-T1 5666 RXLR PHYSUEDO_007260-T1 5666 busco PHYGONAP_007346-T1 5700 busco PHYSUEDO_006193-T1 5700 busco PHYBOEH_009050-T1 5700 RXLR PHYSUEDO_000720-T1 5713 RXLR PHYSUEDO_010989-T1 5824 RXLR PHYGONAP_003078-T1 5824 busco PHYBOEH_009204-T1 5857 busco PHYGONAP_011982-T1 5857 RXLR PHYSUEDO_001122-T1 6016 RXLR PHYGONAP_021211-T1 6139 RXLR PHYGONAP_022242-T1 6175 RXLR PHYGONAP_004639-T1 6184 RXLR PHYBOEH_004001-T1 6212 RXLR PHYGONAP_006169-T1 6212 RXLR PHYSUEDO_004505-T1 6212 RXLR PHYSUEDO_011795-T1 6292 busco PHYGONAP_019886-T1 6293 busco PHYSUEDO_011092-T1 6293 RXLR PHYGONAP_022329-T1 6317 busco PHYGONAP_008569-T1 6346 busco PHYBOEH_009149-T1 6346 RXLR PHYGONAP_008657-T1 6354 RXLR PHYSUEDO_013865-T1 6372 RXLR PHYBOEH_000880-T1 6410 busco PHYBOEH_001338-T1 6463 busco PHYGONAP_018801-T1 6463 busco PHYSUEDO_006097-T1 6463 RXLR PHYBOEH_011056-T1 6476 busco PHYBOEH_010918-T1 6498 busco PHYSUEDO_013315-T1 6498 busco PHYGONAP_000027-T1 6732 busco PHYSUEDO_014837-T1 6732 RXLR PHYGONAP_009402-T1 6751 RXLR PHYSUEDO_005954-T1 6751 RXLR PHYGONAP_022744-T1 6768 RXLR PHYGONAP_009057-T1 6780 RXLR PHYSUEDO_001878-T1 6815 RXLR PHYBOEH_011123-T1 6818 RXLR PHYSUEDO_002098-T1 6849 RXLR PHYSUEDO_012726-T1 6859 RXLR PHYGONAP_019151-T1 6860 RXLR PHYSUEDO_004656-T1 6898 busco PHYBOEH_009409-T1 6980 busco PHYSUEDO_001700-T1 6980 RXLR PHYSUEDO_004532-T1 7076 RXLR PHYSUEDO_001174-T1 7098 busco PHYBOEH_004453-T1 7121 busco PHYSUEDO_006300-T1 7121 busco PHYBOEH_007926-T1 7152 busco PHYGONAP_003903-T1 7152 busco PHYSUEDO_006125-T1 7152 busco PHYGONAP_019631-T1 7244 busco PHYSUEDO_006831-T1 7244 busco PHYGONAP_021790-T1 7272 RXLR PHYSUEDO_003802-T1 7358 RXLR PHYGONAP_011559-T1 7479 busco PHYGONAP_010276-T1 7492 RXLR PHYGONAP_012236-T1 7556 RXLR PHYBOEH_006427-T1 7557 RXLR PHYGONAP_017561-T1 7659 RXLR PHYSUEDO_001251-T1 7659 RXLR PHYBOEH_002276-T1 7659 busco PHYBOEH_000284-T1 7719 busco PHYGONAP_014361-T1 7719 busco PHYSUEDO_003626-T1 7719 RXLR PHYGONAP_016029-T1 7756 RXLR PHYSUEDO_010338-T1 7788 RXLR PHYSUEDO_003531-T1 7791 RXLR PHYSUEDO_003535-T1 7794 RXLR PHYSUEDO_009216-T1 7811 RXLR PHYSUEDO_015056-T1 7937 RXLR PHYSUEDO_011580-T1 7971 RXLR PHYSUEDO_006998-T1 8045 busco PHYSUEDO_008912-T1 8103 RXLR PHYSUEDO_012783-T1 8124 busco PHYBOEH_005598-T1 8167 busco PHYSUEDO_015384-T1 8167 RXLR PHYSUEDO_013574-T1 8205 RXLR PHYSUEDO_008583-T1 8243 RXLR PHYSUEDO_011216-T1 8313 RXLR PHYBOEH_003514-T1 8328 RXLR PHYSUEDO_005906-T1 8372 busco PHYBOEH_010945-T1 8436 busco PHYGONAP_004586-T1 8436 busco PHYSUEDO_000409-T1 8436 RXLR PHYSUEDO_003185-T1 8442 RXLR PHYSUEDO_000585-T1 8741 busco PHYBOEH_001180-T1 8785 busco PHYSUEDO_008081-T1 8785 RXLR PHYGONAP_002376-T1 8847 busco PHYBOEH_007472-T1 8881 busco PHYGONAP_021193-T1 8881 busco PHYSUEDO_009107-T1 8881 RXLR PHYBOEH_007728-T1 8922 RXLR PHYSUEDO_005562-T1 8922 RXLR PHYSUEDO_008179-T1 9264 busco PHYBOEH_008715-T1 9404 busco PHYGONAP_011005-T1 9404 busco PHYSUEDO_000814-T1 9404 busco PHYBOEH_006049-T1 9460 busco PHYGONAP_004992-T1 9460 busco PHYSUEDO_008804-T1 9460 busco PHYGONAP_018120-T1 9461 busco PHYBOEH_001671-T1 9500 busco PHYGONAP_016996-T1 9500 busco PHYSUEDO_008773-T1 9500 busco PHYSUEDO_002223-T1 9547 busco PHYGONAP_016383-T1 9547 RXLR PHYGONAP_013483-T1 9692 RXLR PHYGONAP_006980-T1 9707 RXLR PHYSUEDO_006362-T1 9707 RXLR PHYGONAP_010744-T1 9811 RXLR PHYSUEDO_009139-T1 10053 busco PHYGONAP_009269-T1 10122 busco PHYSUEDO_008165-T1 10122 RXLR PHYSUEDO_006770-T1 10154 busco PHYBOEH_003016-T1 10166 busco PHYGONAP_005950-T1 10166 busco PHYSUEDO_005843-T1 10166 RXLR PHYSUEDO_014390-T1 10229 RXLR PHYSUEDO_002791-T1 10402 RXLR PHYSUEDO_011133-T1 10421 busco PHYBOEH_003395-T1 10562 busco PHYGONAP_014624-T1 10562 busco PHYSUEDO_001103-T1 10562 RXLR PHYSUEDO_000183-T1 10678 busco PHYGONAP_015419-T1 10737 busco PHYSUEDO_002547-T1 10737 RXLR PHYSUEDO_007318-T1 10746 RXLR PHYGONAP_001848-T1 11030 RXLR PHYGONAP_001242-T1 11078 RXLR PHYSUEDO_007604-T1 11216 busco PHYBOEH_002031-T1 11337 busco PHYSUEDO_011140-T1 11443 busco PHYBOEH_006349-T1 11498 busco PHYGONAP_001597-T1 11506 RXLR PHYSUEDO_012450-T1 12659 RXLR PHYSUEDO_002082-T1 13525 busco PHYBOEH_008543-T1 13666 busco PHYGONAP_002407-T1 13666 busco PHYSUEDO_009981-T1 13666 RXLR PHYSUEDO_000156-T1 13689 RXLR PHYGONAP_021047-T1 14052 RXLR PHYSUEDO_002037-T1 14052 busco PHYSUEDO_003229-T1 16265 RXLR PHYSUEDO_009413-T1 19141 busco PHYBOEH_007236-T1 19513 busco PHYSUEDO_007709-T1 19513 RXLR PHYSUEDO_014298-T1 20491 RXLR PHYGONAP_001052-T1 20491 RXLR PHYBOEH_001451-T1 20507 RXLR PHYSUEDO_010991-T1 20507 RXLR PHYSUEDO_006359-T1 20862 RXLR PHYGONAP_014144-T1 21082 RXLR PHYBOEH_008482-T1 22634 RXLR PHYBOEH_011558-T1 22659 RXLR PHYBOEH_007729-T1 23275 RXLR PHYBOEH_011097-T1 23528 RXLR PHYBOEH_007772-T1 23651 RXLR PHYBOEH_003403-T1 23653 busco PHYBOEH_004723-T1 23890 RXLR PHYBOEH_010540-T1 23970 RXLR PHYBOEH_001182-T1 24115 busco PHYSUEDO_000107-T1 24326 RXLR PHYGONAP_015504-T1 24823 RXLR PHYSUEDO_010612-T1 26242 RXLR PHYBOEH_003377-T1 26286 RXLR PHYGONAP_006880-T1 26293
29.259542
30
0.863466
b88c6e94e32104523699dbd95ae0a97b3ccf89ad
5,973
html
HTML
_includes/CFPLA.html
ipcaI2019/ipcai2019.github.io
c337f12c522f8876be045772794bcec9bab75d37
[ "Apache-2.0" ]
null
null
null
_includes/CFPLA.html
ipcaI2019/ipcai2019.github.io
c337f12c522f8876be045772794bcec9bab75d37
[ "Apache-2.0" ]
null
null
null
_includes/CFPLA.html
ipcaI2019/ipcai2019.github.io
c337f12c522f8876be045772794bcec9bab75d37
[ "Apache-2.0" ]
2
2021-06-10T10:39:15.000Z
2021-06-15T13:08:13.000Z
<section class="bg-primary" id="CFPLA"> <div class="container"> <div class="row"> <div class="col-lg-12 text-center"> <h2 class="section-heading">Call For Paper - Long Abstract</h2> <hr class="light"> <p class="text-faded"> The 10th International Conference on Information Processing in Computer Assisted Interventions (IPCAI) </p> <hr> <p class="text-faded"> IPCAI 2019 will be hosted in conjunction with <a class="page-scroll" href="https://www.cars2019.org" style="color: rgb(0,255,0)" target="_blank">CARS 2019</a> in <a class="page-scroll" href="#venue" style="color: rgb(0,255,0)">Rennes, France</a>, June 18-19, 2019. </p> </div> </div> </div> <div class="container"> <div class="row"> <div class="col-lg-12"> <p>Important Dates:</p> <h3><ul> <li>Long Abstract submission: January 11, 2019, 11:59pm PST</li> <li>Author notification: February 1, 2019</li> </ul> </h3> </div> </div> </div> <br><br> <div class="container"> <div class="row"> <div class="col-lg-12"> <p>IPCAI is a premiere international forum for technical innovations, system development and clinical studies in computer assisted interventions (CAI).</p> <h3><ul> <li>Surgical data science</li> <li>Interventional imaging</li> <li>Systems and software</li> <li>Evaluation and Validation</li> <li>Augmented reality for medical applications</li> <li>Surgical planning and simulation</li> <li>Tracking and Navigation</li> <li>Interventional robotics</li> <li>Surgical skill analysis and workflow</li> <li>Advanced intra-operative visualization and user interfaces</li> </ul></h3> <h3><b>NEW FOR 2019</b></h3> <p> For the first time, IPCAI will provide an opportunity for the CAI community to showcase scientific breakthroughs and novel ideas. Authors will be able to submit Long Abstracts to be presented as 5-minute short orals and poster presentations at IPCAI. The focus of these Long Abstracts will be on: </p> <h3><ul> <li>Exciting new breakthroughs relevant to IPCAI, or</li> <li>Novel ideas with preliminary but limited experimental validations, or</li> <li>Recently published or submitted journal contributions with exciting new breakthroughs, as to give authors the opportunity to present their work and obtain feedback from IPCAI community.</li> </ul></h3> <p> The Long Abstract will be peer-reviewed and the final accepted Long Abstract will be published on-line only on the day of the conference (June 18, 2019) and thereafter. Author(s) of original work may elect to submit accepted Long Abstracts to IJCARS for consideration as a short-communication article (an additional review process will be required and process through IJCARS directly). </p> <p> The Long Abstract is to be submitted via a separate Microsoft CMT, available at <a href="https://cmt3.research.microsoft.com/IPCAILA2019" style="color: rgb(0,255,0)" target="_blank" >HERE</a> </p> <p> The deadline for Long Abstracts is January 11, 2019 at 11:59pm PST. </p> <p> Long Abstract Format:</p> <h3><ul> <li>LNCS format, latex template at <a href="ftp://ftp.springernature.com/cs-proceeding/llncs/llncs2e.zip" style="color: rgb(0,255,0)">Springer’s website</a></li> <li>Accepted file format: PDF only</li> <li>2-4 pages with figures, tables, and bibliography (4 pages maximum)</li> <li>Do not modify the LNCS template in anyway (no changes in margin, line spacing, etc.). Any alteration to LNCS template format will result in automatic rejection</li> <li>The Long Abstract text is to be structured exactly as the following:</li> <ul> <li>Full title of the paper</li> <li>Full list of the authors and affiliations</li> <li>Purpose</li> <li>Methods</li> <li>Results</li> <li>Conclusion</li> <li>Bibliography</li> <li>Figures/Tables must be referenced in the text</li> <li>Figures/Tables captions must be provided</li> <li>No “short abstract” is needed</li> </ul> <li>Each Long Abstract can be accompanied with a single <b>(1)</b> supplemental video. The supplemental video must be compressed and uploaded in <b>.ZIP</b> file format.</li> <li>On the Microsoft CMT submission system ONLY, submit a 2000-character abstract detailing the nature of the work and why it should be considered for the Long Abstract category. This is for review purpose and is not to be included in the long abstract text.</li> </ul></h3> </div> </div> </div> </section>
60.94898
406
0.534572
045607acef9c06f21cb5e6a592aee507cd80fd31
7,741
java
Java
simulation-construction-set-tools/src/main/java/us/ihmc/simulationConstructionSetTools/util/environments/environmentRobots/ContactableStaticCylinderRobot.java
ihmcrobotics/ihmc-open-robotics-software
129b261de850e85e1dc78a12e9c075f53c6019a0
[ "Apache-2.0" ]
170
2016-02-01T18:58:50.000Z
2022-03-17T05:28:01.000Z
simulation-construction-set-tools/src/main/java/us/ihmc/simulationConstructionSetTools/util/environments/environmentRobots/ContactableStaticCylinderRobot.java
ihmcrobotics/ihmc-open-robotics-software
129b261de850e85e1dc78a12e9c075f53c6019a0
[ "Apache-2.0" ]
162
2016-01-29T17:04:29.000Z
2022-02-10T16:25:37.000Z
simulation-construction-set-tools/src/main/java/us/ihmc/simulationConstructionSetTools/util/environments/environmentRobots/ContactableStaticCylinderRobot.java
ihmcrobotics/ihmc-open-robotics-software
129b261de850e85e1dc78a12e9c075f53c6019a0
[ "Apache-2.0" ]
83
2016-01-28T22:49:01.000Z
2022-03-28T03:11:24.000Z
package us.ihmc.simulationConstructionSetTools.util.environments.environmentRobots; import java.awt.Color; import java.util.ArrayList; import us.ihmc.euclid.matrix.RotationMatrix; import us.ihmc.euclid.referenceFrame.FrameCylinder3D; import us.ihmc.euclid.referenceFrame.FramePoint3D; import us.ihmc.euclid.referenceFrame.ReferenceFrame; import us.ihmc.euclid.transform.RigidBodyTransform; import us.ihmc.euclid.tuple3D.Point3D; import us.ihmc.euclid.tuple3D.Vector3D; import us.ihmc.euclid.tuple3D.interfaces.Point3DReadOnly; import us.ihmc.euclid.tuple4D.interfaces.QuaternionReadOnly; import us.ihmc.graphicsDescription.Graphics3DObject; import us.ihmc.graphicsDescription.appearance.AppearanceDefinition; import us.ihmc.graphicsDescription.appearance.YoAppearanceRGBColor; import us.ihmc.graphicsDescription.input.SelectedListener; import us.ihmc.graphicsDescription.instructions.CylinderGraphics3DInstruction; import us.ihmc.graphicsDescription.structure.Graphics3DNode; import us.ihmc.graphicsDescription.yoGraphics.YoGraphicVector; import us.ihmc.graphicsDescription.yoGraphics.YoGraphicsListRegistry; import us.ihmc.robotics.referenceFrames.TransformReferenceFrame; import us.ihmc.simulationConstructionSetTools.util.environments.SelectableObject; import us.ihmc.simulationConstructionSetTools.util.environments.SelectableObjectListener; import us.ihmc.simulationconstructionset.GroundContactPoint; import us.ihmc.simulationconstructionset.GroundContactPointGroup; import us.ihmc.simulationconstructionset.Link; import us.ihmc.simulationconstructionset.RigidJoint; import us.ihmc.tools.inputDevices.keyboard.Key; import us.ihmc.tools.inputDevices.keyboard.ModifierKeyInterface; public class ContactableStaticCylinderRobot extends ContactableStaticRobot implements SelectableObject, SelectedListener { private static final double DEFAULT_MASS = 1000000.0; private final FrameCylinder3D cylinder; private final RigidBodyTransform cylinderCenterTransformToWorld = new RigidBodyTransform(); private final RigidJoint nullJoint; private final Link cylinderLink; private final Graphics3DObject linkGraphics; private static final Color defaultColor = Color.BLACK; private static final Color selectedColor = Color.CYAN; private final double selectTransparency = 0.0; private final double unselectTransparency = 0.0; private CylinderGraphics3DInstruction cylinderGraphic; private final ArrayList<SelectableObjectListener> selectedListeners = new ArrayList<SelectableObjectListener>(); public ContactableStaticCylinderRobot(String name, RigidBodyTransform cylinderTransform, double cylinderHeight, double cylinderRadius, AppearanceDefinition appearance) { super(name); cylinder = new FrameCylinder3D(ReferenceFrame.getWorldFrame(), cylinderHeight, cylinderRadius); cylinder.applyTransform(cylinderTransform); RotationMatrix rotation = new RotationMatrix(); Vector3D offset = new Vector3D(); offset.set(cylinderTransform.getTranslation()); rotation.set(cylinderTransform.getRotation()); FramePoint3D cylinderCenter = new FramePoint3D(new TransformReferenceFrame("cylinderCenter", ReferenceFrame.getWorldFrame(), cylinderTransform), 0.0, 0.0, cylinderHeight / 2.0 ); cylinderCenter.changeFrame(ReferenceFrame.getWorldFrame()); cylinderCenterTransformToWorld.set(rotation, new Vector3D(cylinderCenter)); Vector3D axis = new Vector3D(0.0, 0.0, 1.0); RigidBodyTransform rotationTransform = new RigidBodyTransform(); rotationTransform.getRotation().set(rotation); rotationTransform.transform(axis); nullJoint = new RigidJoint(name + "NullJoint", offset, this); cylinderLink = new Link(name + "Link"); cylinderLink.setMassAndRadiiOfGyration(DEFAULT_MASS, 1.0, 1.0, 1.0); cylinderLink.setComOffset(new Vector3D()); linkGraphics = new Graphics3DObject(); linkGraphics.rotate(rotation); cylinderLink.setLinkGraphics(linkGraphics); nullJoint.setLink(cylinderLink); this.addRootJoint(nullJoint); createCylinderGraphics(cylinder, appearance); unSelect(true); linkGraphics.registerSelectedListener(this); } private void createCylinderGraphics(FrameCylinder3D cylinder, AppearanceDefinition appearance) { cylinderGraphic = linkGraphics.addCylinder(cylinder.getLength(), cylinder.getRadius(), appearance); } public Link getCylinderLink() { return cylinderLink; } public void addYoGraphicForceVectorsToGroundContactPoints(double forceVectorScale, AppearanceDefinition appearance, YoGraphicsListRegistry yoGraphicsListRegistry) { addYoGraphicForceVectorsToGroundContactPoints(1, forceVectorScale, appearance, yoGraphicsListRegistry); } public void addYoGraphicForceVectorsToGroundContactPoints(int groupIdentifier, double forceVectorScale, AppearanceDefinition appearance, YoGraphicsListRegistry yoGraphicsListRegistry) { if (yoGraphicsListRegistry == null) return; GroundContactPointGroup groundContactPointGroup = nullJoint.getGroundContactPointGroup(groupIdentifier); System.out.println("GroundContactPointGroup" + groundContactPointGroup.getGroundContactPoints()); ArrayList<GroundContactPoint> groundContactPoints = groundContactPointGroup.getGroundContactPoints(); for (GroundContactPoint groundContactPoint : groundContactPoints) { YoGraphicVector yoGraphicVector = new YoGraphicVector(groundContactPoint.getName(), groundContactPoint.getYoPosition(), groundContactPoint.getYoForce(), forceVectorScale, appearance); yoGraphicsListRegistry.registerYoGraphic("ContactableToroidRobot", yoGraphicVector); } } @Override public RigidJoint getNullJoint() { return nullJoint; } @Override public void getBodyTransformToWorld(RigidBodyTransform transformToWorld) { transformToWorld.set(cylinderCenterTransformToWorld); } @Override public synchronized boolean isPointOnOrInside(Point3D pointInWorldToCheck) { return cylinder.isPointInside(pointInWorldToCheck); } @Override public boolean isClose(Point3D pointInWorldToCheck) { return isPointOnOrInside(pointInWorldToCheck); } @Override public synchronized void closestIntersectionAndNormalAt(Point3D intersectionToPack, Vector3D normalToPack, Point3D pointInWorldToCheck) { cylinder.evaluatePoint3DCollision(pointInWorldToCheck, intersectionToPack, normalToPack); } @Override public void selected(Graphics3DNode graphics3dNode, ModifierKeyInterface modifierKeyInterface, Point3DReadOnly location, Point3DReadOnly cameraLocation, QuaternionReadOnly cameraRotation) { if (!modifierKeyInterface.isKeyPressed(Key.N)) return; select(); } @Override public void select() { unSelect(false); cylinderGraphic.setAppearance(new YoAppearanceRGBColor(selectedColor, selectTransparency)); notifySelectedListenersThisWasSelected(this); } @Override public void unSelect(boolean reset) { cylinderGraphic.setAppearance(new YoAppearanceRGBColor(defaultColor, unselectTransparency)); } @Override public void addSelectedListeners(SelectableObjectListener selectedListener) { this.selectedListeners.add(selectedListener); } private void notifySelectedListenersThisWasSelected(Object selectedInformation) { for (SelectableObjectListener listener : selectedListeners) { listener.wasSelected(this, selectedInformation); } } }
39.09596
192
0.780132
d2a8bd5b09a73858abc9e3abd8cbf2cd715e3e1c
691
php
PHP
src/SI/CoreBundle/Repository/InvoicesRepository.php
sidibea/sanya
1acf4b63670657d3a20189eb14081834e7c44f69
[ "MIT" ]
null
null
null
src/SI/CoreBundle/Repository/InvoicesRepository.php
sidibea/sanya
1acf4b63670657d3a20189eb14081834e7c44f69
[ "MIT" ]
null
null
null
src/SI/CoreBundle/Repository/InvoicesRepository.php
sidibea/sanya
1acf4b63670657d3a20189eb14081834e7c44f69
[ "MIT" ]
null
null
null
<?php namespace SI\CoreBundle\Repository; use Doctrine\ORM\EntityRepository; /** * InvoicesRepository * * This class was generated by the Doctrine ORM. Add your own custom * repository methods below. */ class InvoicesRepository extends EntityRepository { public function getTotalInvoice(){ $queryBuilder = $this ->createQueryBuilder('i') ; // On récupère la Query à partir du QueryBuilder $query = $queryBuilder->getQuery(); // On récupère les résultats à partir de la Query $results = $query->getResult(); //var_dump($results); exit; // On retourne ces résultats return $results; } }
20.323529
68
0.6411
7f4d21989a71a06b29353ad70dce175406f95ead
4,152
swift
Swift
SbankenClientTests/SbankenClientAccessTokenTests.swift
eirikeikaas/sbankenclient-ios
a36fbcd4db7fb4143080a110d2c9f3281490ed8a
[ "MIT" ]
21
2018-01-24T18:37:22.000Z
2020-07-28T08:33:33.000Z
SbankenClientTests/SbankenClientAccessTokenTests.swift
eirikeikaas/sbankenclient-ios
a36fbcd4db7fb4143080a110d2c9f3281490ed8a
[ "MIT" ]
7
2018-03-31T21:10:19.000Z
2020-03-03T10:35:48.000Z
SbankenClientTests/SbankenClientAccessTokenTests.swift
eirikeikaas/sbankenclient-ios
a36fbcd4db7fb4143080a110d2c9f3281490ed8a
[ "MIT" ]
7
2018-02-13T00:57:53.000Z
2021-08-03T18:57:27.000Z
// // SbankenClientTests.swift // SbankenClientTests // // Created by Terje Tjervaag on 07/10/2017. // Copyright © 2017 SBanken. All rights reserved. // import XCTest @testable import SbankenClient class SbankenClientAccessTokenTests: XCTestCase { var mockUrlSession = MockURLSession() var tokenManager = AccessTokenManager() var defaultUserId = "12345" var defaultAccountNumber = "97100000000" var defaultAccessToken = "TOKEN" var client: SbankenClient? var goodAccessTokenData = """ { "access_token": "TOKEN", "expires_in": 12345, "token_type": "TYPE" } """.data(using: .utf8) var badAccessTokenData = """ [tralala """.data(using: .utf8) var goodAccountData = """ { "availableItems": 1, "items": [{ "accountId": "00000000-0000-0000-0000-000000000000", "accountNumber": "12345678901", "ownerCustomerId": "12345", "name": "Generell konto", "accountType": "Konto", "available": 100.0, "balance": 1200.0, "creditLimit": 500.0 }] } """.data(using: .utf8) override func setUp() { super.setUp() client = SbankenClient(clientId: "CLIENT", secret: "SECRET") client?.urlSession = mockUrlSession as SURLSessionProtocol client?.tokenManager = tokenManager mockUrlSession.lastRequest = nil } override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. super.tearDown() } func testSetupSbankenClient() { let newClient = SbankenClient(clientId: "CLIENT", secret: "SECRET") XCTAssertEqual(newClient.clientId, "CLIENT") XCTAssertEqual(newClient.secret, "SECRET") } func testAccountsGetsTokenFromManager() { _ = client?.accounts(userId: defaultUserId, success: { _ in }, failure: { _, _ in }) let request = mockUrlSession.lastRequest XCTAssertEqual(request?.url?.path, "/identityserver/connect/token") XCTAssertEqual(request?.httpMethod, "POST") } func testTokenRequestReturnsErrorForBadData() { mockUrlSession.tokenResponseData = badAccessTokenData let errorExpectation = expectation(description: "Error occurred") _ = client?.accounts(userId: defaultUserId, success: { _ in }, failure: { _, _ in XCTAssert(true, "Error occurred") errorExpectation.fulfill() }) waitForExpectations(timeout: 10) } func testNilTokenForAccountsReturnsError() { client?.tokenManager.token = AccessToken("TOKEN", expiresIn: -1000, tokenType: "TYPE") var error = false _ = client?.accounts(userId: defaultUserId, success: { _ in }, failure: { _, _ in error = true }) XCTAssertTrue(error) } func testNilTokenForTransactionsReturnsError() { client?.tokenManager.token = AccessToken("TOKEN", expiresIn: -1000, tokenType: "TYPE") var error = false _ = client?.transactions(userId: defaultUserId, accountId: "0001", startDate: Date(), endDate: Date(), index: 0, length: 10, success: { _ in }, failure: { _ in error = true }) XCTAssertTrue(error) } func testTokenRequestReturnsSuccessForGoodData() { mockUrlSession.tokenResponseData = goodAccessTokenData mockUrlSession.responseData = goodAccountData var error = false _ = client?.accounts(userId: defaultUserId, success: { _ in error = false }, failure: { _, _ in error = true }) XCTAssertFalse(error) } }
32.692913
111
0.559971
0523325d637d55ea8664c385c6b8f61a90aeebe8
935
rb
Ruby
app/models/channel/gupshup.rb
WeUnlearn/chatwoot
c4b236a13410d4c6ae701d0e1b5b26596753d22a
[ "MIT" ]
null
null
null
app/models/channel/gupshup.rb
WeUnlearn/chatwoot
c4b236a13410d4c6ae701d0e1b5b26596753d22a
[ "MIT" ]
null
null
null
app/models/channel/gupshup.rb
WeUnlearn/chatwoot
c4b236a13410d4c6ae701d0e1b5b26596753d22a
[ "MIT" ]
1
2022-03-18T18:47:02.000Z
2022-03-18T18:47:02.000Z
# == Schema Information # # Table name: channel_gupshup # # id :bigint not null, primary key # apikey :string not null # app :string not null # phone_number :string not null # created_at :datetime not null # updated_at :datetime not null # account_id :integer not null # # Indexes # # index_channel_gupshup_on_account_id (account_id) # index_channel_gupshup_on_phone_number (phone_number) # class Channel::Gupshup < ApplicationRecord self.table_name = 'channel_gupshup' validates :account_id, presence: true validates :app, presence: true validates :apikey, presence: true validates :phone_number, uniqueness: { scope: :account_id }, presence: true belongs_to :account has_one :inbox, as: :channel, dependent: :destroy def name 'Gupshup' end def has_24_hour_messaging_window? true end end
23.375
77
0.660963
afba8e9344132c24c2bb5cc3e4929a7e5eb5c259
11,017
rb
Ruby
eml2mbox.rb
esjeon/graveyard
50403303ed8b7a9193c16f3481a9a4c06dd588f5
[ "MIT" ]
3
2015-02-22T10:41:53.000Z
2021-09-10T13:52:23.000Z
eml2mbox.rb
esjeon/graveyard
50403303ed8b7a9193c16f3481a9a4c06dd588f5
[ "MIT" ]
null
null
null
eml2mbox.rb
esjeon/graveyard
50403303ed8b7a9193c16f3481a9a4c06dd588f5
[ "MIT" ]
null
null
null
#!/usr/bin/ruby #============================================================================================# # eml2mbox.rb v0.08 # # Last updated: Jan 23, 2004 # # # # Converts a bunch of eml files into one mbox file. # # # # Usage: [ruby] eml2mbx.rb [-c] [-l] [-s] [-yz] [emlpath [trgtmbx]] # # Switches: # # -c Remove CRs (^M) appearing at end of lines (Unix) # # -l Remove LFs appearing at beggining of lines (old Mac) - not tested # # -s Don't use standard mbox postmark formatting (for From_ line) # # This will force the use of original From and Date found in mail headers. # # Not recommended, unless you really have problems importing emls. # # -yz Use this to force the order of the year and timezone in date in the From_ # # line from the default [timezone][year] to [year][timezone]. # # emlpath - Path of dir with eml files. Defaults to the current dir if not specified # # trgtmbx - Name of the target mbox file. Defaults to "archive.mbox" in 'emlpath' # # # # Ruby homepage: http://www.ruby-lang.org/en/ # # Unix mailbox format: http://www.broobles.com/eml2mbox/mbox.html # # This script : http://www.broobles.com/eml2mbox # # # #============================================================================================# # Licence: # # # # This script is free software; you can redistribute it and/or modify it under the terms of # # the GNU Lesser General Public License as published by the Free Software Foundation; # # either version 2.1 of the License, or (at your option) any later version. # # # # You should have received a copy of the GNU Lesser General Public License along with this # # script; if not, please visit http://www.gnu.org/copyleft/gpl.html for more information. # #============================================================================================# require 'date/format' require 'time' #=======================================================# # Class that encapsulates the processing file in memory # #=======================================================# class FileInMemory ZoneOffset = { # Standard zones by RFC 2822 'UTC' => '0000', 'UT' => '0000', 'GMT' => '0000', 'EST' => '-0500', 'EDT' => '-0400', 'CST' => '-0600', 'CDT' => '-0500', 'MST' => '-0700', 'MDT' => '-0600', 'PST' => '-0800', 'PDT' => '-0700', } def initialize() @lines = Array.new @counter = 1 # keep the 0 position for the From_ line @from = nil # from part of the From_ line @date = nil # date part of the From_ line end def addLine(line) # If the line is a 'false' From line, add a '>' to its beggining line = line.sub(/From/, '>From') if line =~ /^From/ and @from!=nil # If the line is the first valid From line, save it (without the line break) if line =~ /^From:\s.*@/ and @from==nil @from = line.sub(/From:/,'From') @from = @from.chop # Remove line break(s) @from = standardizeFrom(@from) unless $switches["noStandardFromLine"] end # Get the date if $switches["noStandardFromLine"] # Don't parse the content of the Date header @date = line.sub(/Date:\s/,'') if line =~ /^Date:\s/ and @date==nil else if line =~ /^Date:\s/ and @date==nil # Parse content of the Date header and convert to the mbox standard for the From_ line @date = line.sub(/Date:\s/,'') year, month, day, hour, minute, second, timezone, wday = Date._parse(@date).values_at(:year, :mon, :mday, :hour, :min, :sec, :zone, :wday) # Need to convert the timezone from a string to a 4 digit offset unless timezone =~ /[+|-]\d*/ timezone=ZoneOffset[timezone] end time = Time.gm(year,month,day,hour,minute,second) @date = formMboxDate(time,timezone) end end # Now add the line to the array line = fixLineEndings(line) @lines[@counter]=line @counter+=1 end # Forms the first line (from + date) and returns all the lines # Returns all the lines in the file def getProcessedLines() if @from != nil # Add from and date to the first line if @date==nil puts "WARN: Failed to extract date. Will use current time in the From_ line" @date=formMboxDate(Time.now,nil) end @lines[0] = @from + " " + @date @lines[0] = fixLineEndings(@lines[0]) @lines[@counter] = "" return @lines end # else don't return anything end # Fixes CR/LFs def fixLineEndings(line) line = removeCR(line) if $switches["removeCRs"]; line = removeLF(line) if $switches["removeLFs"]; return line end # emls usually have CR+LF (DOS) line endings, Unix uses LF as a line break, # so there's a hanging CR at the end of the line when viewed on Unix. # This method will remove the next to the last character from a line def removeCR(line) line = line[0..-3]+line[-1..-1] if line[-2]==0xD return line end # Similar to the above. This one is for Macs that use CR as a line break. # So, remove the last char def removeLF(line) line = line[0..-2] if line[-1]==0xA return line end end #================# # Helper methods # #================# # Converts: 'From "some one <aa@aa.aa>" <aa@aa.aa>' -> 'From aa@aa.aa' def standardizeFrom(fromLine) # Get indexes of last "<" and ">" in line openIndex = fromLine.rindex('<') closeIndex = fromLine.rindex('>') if openIndex!=nil and closeIndex!=nil fromLine = fromLine[0..4]+fromLine[openIndex+1..closeIndex-1] end # else leave as it is - it is either already well formed or is invalid return fromLine end # Returns a mbox postmark formatted date. # If timezone is unknown, it is skipped. # mbox date format used is described here: # http://www.broobles.com/eml2mbox/mbox.html def formMboxDate(time,timezone) if timezone==nil return time.strftime("%a %b %d %H:%M:%S %Y") else if $switches["zoneYearOrder"] return time.strftime("%a %b %d %H:%M:%S "+timezone.to_s+" %Y") else return time.strftime("%a %b %d %H:%M:%S %Y "+timezone.to_s) end end end # Extracts all switches from the command line and returns # a hashmap with valid switch names as keys and booleans as values # Moves real params to the beggining of the ARGV array def extractSwitches() switches = Hash.new(false) # All switches (values) default to false i=0 while (ARGV[i]=~ /^-/) # while arguments are switches if ARGV[i]=="-c" switches["removeCRs"] = true puts "\nWill fix lines ending with a CR" elsif ARGV[i]=="-l" switches["removeLFs"] = true puts "\nWill fix lines beggining with a LF" elsif ARGV[i]=="-s" switches["noStandardFromLine"] = true puts "\nWill use From and Date from mail headers in From_ line" elsif ARGV[i]=="-yz" switches["zoneYearOrder"] = true puts "\nTimezone will be placed before the year in From_ line" else puts "\nUnknown switch: "+ARGV[i]+". Ignoring." end i = i+1 end # Move real arguments to the beggining of the array ARGV[0] = ARGV[i] ARGV[1] = ARGV[i+1] return switches end #===============# # Main # #===============# $switches = extractSwitches() # Extract specified directory with emls and the target archive (if any) emlDir = "." # default if not specified emlDir = ARGV[0] if ARGV[0]!=nil mboxArchive = emlDir+"/archive.mbox" # default if not specified mboxArchive = ARGV[1] if ARGV[1] != nil # Show specified settings puts "\nSpecified dir : "+emlDir puts "Specified file: "+mboxArchive+"\n" # Check that the dir exists if FileTest.directory?(emlDir) Dir.chdir(emlDir) else puts "\n["+emlDir+"] is not a directory (might not exist). Please specify a valid dir" exit(0) end # Check if destination file exists. If yes allow user to select an option. canceled = false if FileTest.exist?(mboxArchive) print "\nFile ["+mboxArchive+"] exists! Please select: [A]ppend [O]verwrite [C]ancel (default) " sel = STDIN.gets.chomp if sel == 'A' or sel == 'a' aFile = File.new(mboxArchive, "a"); elsif sel == 'O' or sel == 'o' aFile = File.new(mboxArchive, "w"); else canceled = true end else # File doesn't exist, open for writing aFile = File.new(mboxArchive, "w"); end if not canceled puts files = Dir["*.eml"] if files.size == 0 puts "No *.eml files in this directory. mbox file not created." aFile.close File.delete(mboxArchive) exit(0) end # For each .eml file in the specified directory do the following files.each() do |x| puts "Processing file: "+x thisFile = FileInMemory.new() File.open(x).each {|item| thisFile.addLine(item) } lines = thisFile.getProcessedLines if lines == nil puts "WARN: File ["+x+"] doesn't seem to have a regular From: line. Not included in mbox" else lines.each {|line| aFile.puts line} end end aFile.close end
41.573585
154
0.494145
032f35136a07a2588d9063b65fee882d2cd01742
88
sql
SQL
migrations/sqls/20200317221153-createCustomerOrderTransactionTable/sqlite-down.sql
pzubar/learn-sql-fundamentals
d30d07e2f5d2031d33a99255acd565810703a2c7
[ "BSD-3-Clause" ]
null
null
null
migrations/sqls/20200317221153-createCustomerOrderTransactionTable/sqlite-down.sql
pzubar/learn-sql-fundamentals
d30d07e2f5d2031d33a99255acd565810703a2c7
[ "BSD-3-Clause" ]
5
2020-03-01T15:57:15.000Z
2022-01-22T10:05:30.000Z
migrations/sqls/20200317221153-createCustomerOrderTransactionTable/sqlite-down.sql
pzubar/learn-sql-fundamentals
d30d07e2f5d2031d33a99255acd565810703a2c7
[ "BSD-3-Clause" ]
null
null
null
-- Put your SQLite "down" migration here DROP TABLE IF EXISTS CustomerOrderTransaction;
29.333333
46
0.806818
919252f1e26fd8f55c8f31b2e78b479f6a249849
2,781
html
HTML
ui/templates/result.html
jrambla/beacon-2.x
f6c8bbecd183471d62c01e040d6e0b3c9ef8f448
[ "Apache-2.0" ]
null
null
null
ui/templates/result.html
jrambla/beacon-2.x
f6c8bbecd183471d62c01e040d6e0b3c9ef8f448
[ "Apache-2.0" ]
null
null
null
ui/templates/result.html
jrambla/beacon-2.x
f6c8bbecd183471d62c01e040d6e0b3c9ef8f448
[ "Apache-2.0" ]
null
null
null
{% for ds in beacon_response.datasetAlleleResponses %} <section class="datasets-response exists-{{ ds.exists|yesno:'Y,N' }}"> <h3>{{ ds.datasetId }}</h3> <ul> {% if ds.sampleCount %} <li> <span class="variable">Sample count:</span> <span class="number">{{ ds.sampleCount }}</span></li> {% else %} <li> <span class="variable">Sample count:</span> <span class="number">0</span></li> {% endif %} {% if ds.variantCount %} <li> <span class="variable">Variant count:</span> <span class="number">{{ ds.variantCount }}</span></li> {% else %} <li> <span class="variable">Variant count:</span> <span class="number">0</span></li> {% endif %} <!-- for testing --> <!-- <li class="handover">Handover: <div class="handover-note"> <a href="" title="handover"> <i class="fas fa-link"></i> </a> <p>Hey! This is a handover note.</p> <p>Hey! This is a handover note. A handover note that is extra large. I mean, it is very long. I don't even know if this will ever happen but whatevs, I got to try it anyway. So yeah, that would do it.</p> </div> </li> --> {% if ds.datasetHandover %} {% with ds.datasetHandover as handoverList %} {% for handover in handoverList %} <li class="handover">Handover: <div class="handover-note"> <a href="{{ handover.url|safe }}" target="_blank"> <i class="fas fa-link"></i> </a> <p>{% if handover.note %} {{ handover.note|safe }}" {% else %} Click and visit the handover link. {% endif %}</p> </div> </li> {% endfor %} {% endwith %} {% else %} <li class="handover">Handover: <div class="handover-note"> <a href="" title="handover"> <i class="fas fa-link"></i> </a> <p>Oops! Handover not found.</p> </div> </li> {% endif %} </ul> </section> {% empty %} <section class="beacon-response exists-{{ beacon_response.exists|yesno:'Y,N' }}"> <h3>Exists: <span>{{ beacon_response.exists }}</span></h3> {% if beacon_response.beaconHandover %} <p>Handovers:</p> <ul> {% for handover in beacon_response.beaconHandover %} <li> <a href="{{ handover.url|safe }}"{% if handover.note %} title="{{ handover.note|safe }}"{% endif %}> {{ handover.handoverType.label }} </a> </li> {% endfor %} </ul> {% endif %} </section> {% endfor %}
35.202532
215
0.490111
2dacbe9dff2725fd417ae354f33facff93cd0349
1,104
html
HTML
templates/createNewPlaylist.html
rlisowski10/Databasify
e7ec254cd47d624d5c2b07a7e74fd0158fb936c8
[ "MIT" ]
null
null
null
templates/createNewPlaylist.html
rlisowski10/Databasify
e7ec254cd47d624d5c2b07a7e74fd0158fb936c8
[ "MIT" ]
null
null
null
templates/createNewPlaylist.html
rlisowski10/Databasify
e7ec254cd47d624d5c2b07a7e74fd0158fb936c8
[ "MIT" ]
null
null
null
{% extends "layout.html" %} {% block content %} <!-- Page Content --> <div class="container-fluid"> <h1>Create a new playlist</h1> <form action="{{url_for('newPlaylist')}}" method = 'POST'> <div class="form-row"> <div class="col-md-4 mb-3"> <label for="validationDefault01">New playlist name</label> <input type="text" name="name" class="form-control" id="validationDefault01" placeholder="Enter playlist name here" required> </div> </div> <div class="form-group"> <label for="validationDefault02">Select User</label> <select name="user_email" class="form-control" id="validationDefault02" required> {% for user in users %} <option>{{user.email}}</option> {% endfor %} </select> </div> <button class="btn btn-primary" type="submit" value="Create">Create</button> </form> </div> <!-- /#page-content-wrapper --> {% endblock content %}
44.16
141
0.521739
6cc70dbd404b85c3cbbe76846e18d81e54956c47
833
go
Go
pkg/options/provision.gen.go
tnissen375/corteza-server
83720d11ff2a94f52813a2fefcd8d20473a89e78
[ "Apache-2.0" ]
409
2019-06-01T07:12:13.000Z
2022-03-31T14:41:13.000Z
pkg/options/provision.gen.go
tnissen375/corteza-server
83720d11ff2a94f52813a2fefcd8d20473a89e78
[ "Apache-2.0" ]
243
2019-06-19T11:46:44.000Z
2022-03-21T17:12:30.000Z
pkg/options/provision.gen.go
tnissen375/corteza-server
83720d11ff2a94f52813a2fefcd8d20473a89e78
[ "Apache-2.0" ]
121
2019-06-01T07:12:21.000Z
2022-03-29T15:16:54.000Z
package options // This file is auto-generated. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // // Definitions file that controls how this file is generated: // pkg/options/provision.yaml type ( ProvisionOpt struct { Always bool `env:"PROVISION_ALWAYS"` Path string `env:"PROVISION_PATH"` } ) // Provision initializes and returns a ProvisionOpt with default values func Provision() (o *ProvisionOpt) { o = &ProvisionOpt{ Always: true, Path: "provision/*", } fill(o) // Function that allows access to custom logic inside the parent function. // The custom logic in the other file should be like: // func (o *Provision) Defaults() {...} func(o interface{}) { if def, ok := o.(interface{ Defaults() }); ok { def.Defaults() } }(o) return }
21.921053
75
0.686675
2695b562fceb62d3b5ef810b2f24534ecbb76bae
1,323
java
Java
src/etla/mod/sms/db/SSmsConsts.java
alphalapz/etl
87fea0d57023ae0cee22bcdb1ef5087659bd019c
[ "MIT" ]
null
null
null
src/etla/mod/sms/db/SSmsConsts.java
alphalapz/etl
87fea0d57023ae0cee22bcdb1ef5087659bd019c
[ "MIT" ]
null
null
null
src/etla/mod/sms/db/SSmsConsts.java
alphalapz/etl
87fea0d57023ae0cee22bcdb1ef5087659bd019c
[ "MIT" ]
null
null
null
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package etla.mod.sms.db; /** * * @author Alfredo Perez */ public abstract class SSmsConsts { /** Document class number: income. */ public static final int DOC_CLASS_INC_NUM = 1; /** Document class number: expenses. */ public static final int DOC_CLASS_EXP_NUM = 2; /** Document type number: invoice. */ public static final int DOC_TYPE_INV_NUM = 3; /** Document type number: credit note. */ public static final int DOC_TYPE_CN_NUM = 5; /** DOCUMENT STATUS = NEW*/ public static final int ST_DPS_NEW = 1; /** DOCUMENT STATUS = EMITED*/ public static final int ST_DPS_EMITTED = 2; /** DOCUMENT STATUS = CANCELED*/ public static final int ST_DPS_CANCELED = 3; /** IMPORT TYPE DOCUMENT*/ public static final int IMPORT_TYPE_DOC = 1; /** IMPORT TYPE TICKET*/ public static final int IMPORT_TYPE_TIC = 2; /** IMPORT TYPE ITEM*/ public static final int IMPORT_TYPE_ITEM = 3; public static final boolean IS_NEW_REGISTRY = true; public static final int REGISTRY_CLOSE = 1; public static final int REGISTRY_OPEN = 2; }
30.767442
79
0.670446
38bd6081434b2afb1172e6ad63668dae545c7b7a
1,433
h
C
kubernetes/model/io_k8s_api_core_v1_limit_range_item.h
zouxiaoliang/nerv-kubernetes-client-c
07528948c643270fd757d38edc68da8c9628ee7a
[ "Apache-2.0" ]
null
null
null
kubernetes/model/io_k8s_api_core_v1_limit_range_item.h
zouxiaoliang/nerv-kubernetes-client-c
07528948c643270fd757d38edc68da8c9628ee7a
[ "Apache-2.0" ]
null
null
null
kubernetes/model/io_k8s_api_core_v1_limit_range_item.h
zouxiaoliang/nerv-kubernetes-client-c
07528948c643270fd757d38edc68da8c9628ee7a
[ "Apache-2.0" ]
null
null
null
/* * io_k8s_api_core_v1_limit_range_item.h * * LimitRangeItem defines a min/max usage limit for any resource that matches on kind. */ #ifndef _io_k8s_api_core_v1_limit_range_item_H_ #define _io_k8s_api_core_v1_limit_range_item_H_ #include <string.h> #include "../external/cJSON.h" #include "../include/list.h" #include "../include/keyValuePair.h" #include "../include/binary.h" typedef struct io_k8s_api_core_v1_limit_range_item_t io_k8s_api_core_v1_limit_range_item_t; typedef struct io_k8s_api_core_v1_limit_range_item_t { list_t* _default; //map list_t* default_request; //map list_t* max; //map list_t* max_limit_request_ratio; //map list_t* min; //map char *type; // string } io_k8s_api_core_v1_limit_range_item_t; io_k8s_api_core_v1_limit_range_item_t *io_k8s_api_core_v1_limit_range_item_create( list_t* _default, list_t* default_request, list_t* max, list_t* max_limit_request_ratio, list_t* min, char *type ); void io_k8s_api_core_v1_limit_range_item_free(io_k8s_api_core_v1_limit_range_item_t *io_k8s_api_core_v1_limit_range_item); io_k8s_api_core_v1_limit_range_item_t *io_k8s_api_core_v1_limit_range_item_parseFromJSON(cJSON *io_k8s_api_core_v1_limit_range_itemJSON); cJSON *io_k8s_api_core_v1_limit_range_item_convertToJSON(io_k8s_api_core_v1_limit_range_item_t *io_k8s_api_core_v1_limit_range_item); #endif /* _io_k8s_api_core_v1_limit_range_item_H_ */
29.854167
137
0.814375
22f0f6321adf43cf96c14e5efa21e69613ef2311
2,194
c
C
common/sleep.c
c0ze/tsl
8b16872a4c41286c96fa623526d7940c687cf44f
[ "BSD-3-Clause" ]
null
null
null
common/sleep.c
c0ze/tsl
8b16872a4c41286c96fa623526d7940c687cf44f
[ "BSD-3-Clause" ]
null
null
null
common/sleep.c
c0ze/tsl
8b16872a4c41286c96fa623526d7940c687cf44f
[ "BSD-3-Clause" ]
null
null
null
#include <stdlib.h> #include "sleep.h" #include "stuff.h" #include "effect.h" #include "message.h" #include "fov.h" #include "player.h" #include "game.h" #include "ui.h" /* Makes CREATURE fall asleep (if TIRED) or wake up (not TIRED). */ void creature_sleep(creature_t * creature, const blean_t tired) { effect_t * eff; if (creature == NULL) return; eff = get_effect_by_id(creature, effect_sleep); if (attr_current(creature, attr_p_sleep)) { effect_expire(eff); return; } /* A message is displayed only if the creature has been detected and is within sight of the player. */ /* But I am LE TIRED */ if (tired) { prolong_effect(creature, effect_sleep, SLEEP_DURATION); /* If there was no previous effect... */ if (eff == NULL) { if (is_player(creature)) { queue_msg("You fall asleep!"); build_fov(creature); draw_level(); display_stats(creature); msgflush_wait(); clear_msgbar(); } else if (can_see(game->player, creature->y, creature->x) && creature->detected) { /*draw_level();*/ msg_one(creature, "falls asleep."); } } } else if (eff) { effect_expire(eff); if (is_player(creature)) { queue_msg("You wake up!"); build_fov(creature); draw_level(); display_stats(creature); msgflush_wait(); clear_msgbar(); } else if (can_see(game->player, creature->y, creature->x) && creature->detected) { /*draw_level();*/ msg_one(creature, "wakes up."); } } return; } /* creature_sleep */ /* Forces CREATURE to sleep. SOURCE will be identified if it was clear it was the cause. */ void tranquilize(creature_t * creature, item_t * source) { blean_t was_awake; if (creature == NULL) return; if (attr_current(creature, attr_p_sleep)) return; was_awake = is_awake(creature); creature_sleep(creature, true); /* If it was awake, but it isn't now and we could see what happened. */ if (was_awake && is_awake(creature) == false && can_see_creature(game->player, creature)) { identify(source); } return; } /* tranquilize */
18.913793
73
0.619417
74dccd31dc89cae1a518128fc5aacf3ebbbc2fee
788
js
JavaScript
src/main.js
Inateno/GGJ19
dd8bc00556540b000ffb05b5198a5d4bb9e0ca45
[ "MIT" ]
1
2019-01-29T10:19:04.000Z
2019-01-29T10:19:04.000Z
src/main.js
Inateno/GGJ19
dd8bc00556540b000ffb05b5198a5d4bb9e0ca45
[ "MIT" ]
null
null
null
src/main.js
Inateno/GGJ19
dd8bc00556540b000ffb05b5198a5d4bb9e0ca45
[ "MIT" ]
null
null
null
import DE from '@dreamirl/dreamengine'; import Game from 'Game'; import inputs from 'inputs'; import audios from 'audios'; import dictionary from 'dictionary'; import images from 'images'; import achievements from 'achievements'; console.log( "game main file loaded DREAM_ENGINE is:" , DE ); //DE.config.DEBUG = true; //DE.config.DEBUG_LEVEL = 5; DE.init( { 'onReady' : Game.init, 'onLoad' : Game.onload, 'inputs' : inputs, 'audios' : audios, 'dictionary' : dictionary, 'images' : images, 'achievements' : achievements, 'about': { 'gameName': "Engine Dev Game 1", "namespace": "noting", 'author': "Inateno", 'gameVersion': "0.1" }, 'saveModel': { "nShoots": 0 }, 'saveIgnoreVersion': true } );
30.307692
113
0.612944
bc561972a8f68cd047acfc7299ccd4048c8ea007
831
sql
SQL
src/test/resources/sql/insert/7291872e.sql
Shuttl-Tech/antlr_psql
fcf83192300abe723f3fd3709aff5b0c8118ad12
[ "MIT" ]
66
2018-06-15T11:34:03.000Z
2022-03-16T09:24:49.000Z
src/test/resources/sql/insert/7291872e.sql
Shuttl-Tech/antlr_psql
fcf83192300abe723f3fd3709aff5b0c8118ad12
[ "MIT" ]
13
2019-03-19T11:56:28.000Z
2020-08-05T04:20:50.000Z
src/test/resources/sql/insert/7291872e.sql
Shuttl-Tech/antlr_psql
fcf83192300abe723f3fd3709aff5b0c8118ad12
[ "MIT" ]
28
2019-01-05T19:59:02.000Z
2022-03-24T11:55:50.000Z
-- file:numeric_big.sql ln:252 expect:true INSERT INTO num_exp_add VALUES (5,4,'5329378275943662669459614.81475694159581596077242547133292502869630735172901157043010370467618244548786897684821457816189831652076071977025794948484549600736179389638319303817478693948215387894509009504287664213474693208847025374388286162907794727810231557001266897729978691844410171412189947386181530441402903608214502713480332746271552746231631136145916685939539173054989927058122097304419584979598595477177513004218594211597809300517607260841648610322863666300637648662611916496850248528515936635845594390453288113296413254893687029540384176335735114863908372780241463999450547422213639667099644505472777149095004849805371205203850993689064483178204550825728947252440604703474049780550458442808479096492346910001692358508618202898514895453589357')
277
787
0.973526
90e306f1cd276d3cb0e5818bcc62c573101b8357
9,807
py
Python
tutorial/week7/main/mc/parser/.antlr/MCParser.py
khoidohpc/ppl-course
3bcff3eeeeebc24f0fc9e3f844779f439aa97544
[ "MIT" ]
2
2020-10-21T13:04:18.000Z
2022-01-12T11:06:31.000Z
Assignment4/init/src/main/mp/parser/.antlr/MCParser.py
jimodayne/ppl_hcmut_assignment
7a06d61e4cda8c76f62a1da5b93ef66d98198b80
[ "MIT" ]
null
null
null
Assignment4/init/src/main/mp/parser/.antlr/MCParser.py
jimodayne/ppl_hcmut_assignment
7a06d61e4cda8c76f62a1da5b93ef66d98198b80
[ "MIT" ]
1
2019-12-03T05:33:13.000Z
2019-12-03T05:33:13.000Z
# Generated from /Users/nhphung/Documents/fromSamsungLaptop/Monhoc/KS-NNLT/Materials/Assignments/MC/MC1-Python/Assignment2/upload/src/main/mc/parser/MC.g4 by ANTLR 4.7.1 # encoding: utf-8 from antlr4 import * from io import StringIO from typing.io import TextIO import sys def serializedATN(): with StringIO() as buf: buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\20") buf.write("(\4\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\3\2\3\2\3\2") buf.write("\3\2\3\2\3\2\5\2\23\n\2\3\2\3\2\3\2\3\3\3\3\3\4\3\4\3") buf.write("\4\3\5\3\5\5\5\37\n\5\3\6\3\6\3\6\5\6$\n\6\3\6\3\6\3\6") buf.write("\2\2\7\2\4\6\b\n\2\3\3\2\4\5\2%\2\f\3\2\2\2\4\27\3\2\2") buf.write("\2\6\31\3\2\2\2\b\36\3\2\2\2\n \3\2\2\2\f\r\5\4\3\2\r") buf.write("\16\7\3\2\2\16\17\7\b\2\2\17\20\7\t\2\2\20\22\7\n\2\2") buf.write("\21\23\5\6\4\2\22\21\3\2\2\2\22\23\3\2\2\2\23\24\3\2\2") buf.write("\2\24\25\7\13\2\2\25\26\7\2\2\3\26\3\3\2\2\2\27\30\t\2") buf.write("\2\2\30\5\3\2\2\2\31\32\5\n\6\2\32\33\7\f\2\2\33\7\3\2") buf.write("\2\2\34\37\5\n\6\2\35\37\7\7\2\2\36\34\3\2\2\2\36\35\3") buf.write("\2\2\2\37\t\3\2\2\2 !\7\6\2\2!#\7\b\2\2\"$\5\b\5\2#\"") buf.write("\3\2\2\2#$\3\2\2\2$%\3\2\2\2%&\7\t\2\2&\13\3\2\2\2\5\22") buf.write("\36#") return buf.getvalue() class MCParser ( Parser ): grammarFileName = "MC.g4" atn = ATNDeserializer().deserialize(serializedATN()) decisionsToDFA = [ DFA(ds, i) for i, ds in enumerate(atn.decisionToState) ] sharedContextCache = PredictionContextCache() literalNames = [ "<INVALID>", "'main'", "'int'", "'void'", "<INVALID>", "<INVALID>", "'('", "')'", "'{'", "'}'", "';'" ] symbolicNames = [ "<INVALID>", "<INVALID>", "INTTYPE", "VOIDTYPE", "ID", "INTLIT", "LB", "RB", "LP", "RP", "SEMI", "WS", "ERROR_CHAR", "UNCLOSE_STRING", "ILLEGAL_ESCAPE" ] RULE_program = 0 RULE_mctype = 1 RULE_body = 2 RULE_exp = 3 RULE_funcall = 4 ruleNames = [ "program", "mctype", "body", "exp", "funcall" ] EOF = Token.EOF T__0=1 INTTYPE=2 VOIDTYPE=3 ID=4 INTLIT=5 LB=6 RB=7 LP=8 RP=9 SEMI=10 WS=11 ERROR_CHAR=12 UNCLOSE_STRING=13 ILLEGAL_ESCAPE=14 def __init__(self, input:TokenStream, output:TextIO = sys.stdout): super().__init__(input, output) self.checkVersion("4.7.1") self._interp = ParserATNSimulator(self, self.atn, self.decisionsToDFA, self.sharedContextCache) self._predicates = None class ProgramContext(ParserRuleContext): def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) self.parser = parser def mctype(self): return self.getTypedRuleContext(MCParser.MctypeContext,0) def LB(self): return self.getToken(MCParser.LB, 0) def RB(self): return self.getToken(MCParser.RB, 0) def LP(self): return self.getToken(MCParser.LP, 0) def RP(self): return self.getToken(MCParser.RP, 0) def EOF(self): return self.getToken(MCParser.EOF, 0) def body(self): return self.getTypedRuleContext(MCParser.BodyContext,0) def getRuleIndex(self): return MCParser.RULE_program def program(self): localctx = MCParser.ProgramContext(self, self._ctx, self.state) self.enterRule(localctx, 0, self.RULE_program) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) self.state = 10 self.mctype() self.state = 11 self.match(MCParser.T__0) self.state = 12 self.match(MCParser.LB) self.state = 13 self.match(MCParser.RB) self.state = 14 self.match(MCParser.LP) self.state = 16 self._errHandler.sync(self) _la = self._input.LA(1) if _la==MCParser.ID: self.state = 15 self.body() self.state = 18 self.match(MCParser.RP) self.state = 19 self.match(MCParser.EOF) except RecognitionException as re: localctx.exception = re self._errHandler.reportError(self, re) self._errHandler.recover(self, re) finally: self.exitRule() return localctx class MctypeContext(ParserRuleContext): def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) self.parser = parser def INTTYPE(self): return self.getToken(MCParser.INTTYPE, 0) def VOIDTYPE(self): return self.getToken(MCParser.VOIDTYPE, 0) def getRuleIndex(self): return MCParser.RULE_mctype def mctype(self): localctx = MCParser.MctypeContext(self, self._ctx, self.state) self.enterRule(localctx, 2, self.RULE_mctype) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) self.state = 21 _la = self._input.LA(1) if not(_la==MCParser.INTTYPE or _la==MCParser.VOIDTYPE): self._errHandler.recoverInline(self) else: self._errHandler.reportMatch(self) self.consume() except RecognitionException as re: localctx.exception = re self._errHandler.reportError(self, re) self._errHandler.recover(self, re) finally: self.exitRule() return localctx class BodyContext(ParserRuleContext): def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) self.parser = parser def funcall(self): return self.getTypedRuleContext(MCParser.FuncallContext,0) def SEMI(self): return self.getToken(MCParser.SEMI, 0) def getRuleIndex(self): return MCParser.RULE_body def body(self): localctx = MCParser.BodyContext(self, self._ctx, self.state) self.enterRule(localctx, 4, self.RULE_body) try: self.enterOuterAlt(localctx, 1) self.state = 23 self.funcall() self.state = 24 self.match(MCParser.SEMI) except RecognitionException as re: localctx.exception = re self._errHandler.reportError(self, re) self._errHandler.recover(self, re) finally: self.exitRule() return localctx class ExpContext(ParserRuleContext): def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) self.parser = parser def funcall(self): return self.getTypedRuleContext(MCParser.FuncallContext,0) def INTLIT(self): return self.getToken(MCParser.INTLIT, 0) def getRuleIndex(self): return MCParser.RULE_exp def exp(self): localctx = MCParser.ExpContext(self, self._ctx, self.state) self.enterRule(localctx, 6, self.RULE_exp) try: self.state = 28 self._errHandler.sync(self) token = self._input.LA(1) if token in [MCParser.ID]: self.enterOuterAlt(localctx, 1) self.state = 26 self.funcall() pass elif token in [MCParser.INTLIT]: self.enterOuterAlt(localctx, 2) self.state = 27 self.match(MCParser.INTLIT) pass else: raise NoViableAltException(self) except RecognitionException as re: localctx.exception = re self._errHandler.reportError(self, re) self._errHandler.recover(self, re) finally: self.exitRule() return localctx class FuncallContext(ParserRuleContext): def __init__(self, parser, parent:ParserRuleContext=None, invokingState:int=-1): super().__init__(parent, invokingState) self.parser = parser def ID(self): return self.getToken(MCParser.ID, 0) def LB(self): return self.getToken(MCParser.LB, 0) def RB(self): return self.getToken(MCParser.RB, 0) def exp(self): return self.getTypedRuleContext(MCParser.ExpContext,0) def getRuleIndex(self): return MCParser.RULE_funcall def funcall(self): localctx = MCParser.FuncallContext(self, self._ctx, self.state) self.enterRule(localctx, 8, self.RULE_funcall) self._la = 0 # Token type try: self.enterOuterAlt(localctx, 1) self.state = 30 self.match(MCParser.ID) self.state = 31 self.match(MCParser.LB) self.state = 33 self._errHandler.sync(self) _la = self._input.LA(1) if _la==MCParser.ID or _la==MCParser.INTLIT: self.state = 32 self.exp() self.state = 35 self.match(MCParser.RB) except RecognitionException as re: localctx.exception = re self._errHandler.reportError(self, re) self._errHandler.recover(self, re) finally: self.exitRule() return localctx
29.628399
169
0.564699
c2aa6ed53ac460951ee36f60326b7402ba6fc605
695
go
Go
model/dt/AlibabaDtTmllcarPricevalidateResponse.go
phpyandong/opentaobao
a7e3cc3ec7eeb492b20a6b8023798d5592d15fe5
[ "Apache-2.0" ]
1
2021-06-29T08:56:24.000Z
2021-06-29T08:56:24.000Z
model/dt/AlibabaDtTmllcarPricevalidateResponse.go
phpyandong/opentaobao
a7e3cc3ec7eeb492b20a6b8023798d5592d15fe5
[ "Apache-2.0" ]
null
null
null
model/dt/AlibabaDtTmllcarPricevalidateResponse.go
phpyandong/opentaobao
a7e3cc3ec7eeb492b20a6b8023798d5592d15fe5
[ "Apache-2.0" ]
null
null
null
package dt import ( "encoding/xml" "github.com/bububa/opentaobao/model" ) /* 线索报价价格校验 APIResponse alibaba.dt.tmllcar.pricevalidate 根据选定的车型和城市,校验汽车价格是否通过 入参:车型ID,城市名称,价格 输出:N 校验失败,校验成功不返回值 */ type AlibabaDtTmllcarPricevalidateAPIResponse struct { model.CommonResponse AlibabaDtTmllcarPricevalidateResponse } type AlibabaDtTmllcarPricevalidateResponse struct { XMLName xml.Name `xml:"alibaba_dt_tmllcar_pricevalidate_response"` RequestId string `json:"request_id,omitempty" xml:"request_id,omitempty"` // 平台颁发的每次请求访问的唯一标识 // result Result *AlibabaDtTmllcarPricevalidateResults `json:"result,omitempty" xml:"result,omitempty"` }
21.71875
114
0.752518
9ae306edbdbffb6ffa69c52decc9ab0d599bc514
410
dart
Dart
test/inline_object16_test.dart
tuyen-vuduc/mattermost-dart-openapi
20f7b7d3535dd399da7a97ca6c5ad915f1c31dda
[ "MIT" ]
null
null
null
test/inline_object16_test.dart
tuyen-vuduc/mattermost-dart-openapi
20f7b7d3535dd399da7a97ca6c5ad915f1c31dda
[ "MIT" ]
null
null
null
test/inline_object16_test.dart
tuyen-vuduc/mattermost-dart-openapi
20f7b7d3535dd399da7a97ca6c5ad915f1c31dda
[ "MIT" ]
null
null
null
import 'package:test/test.dart'; import 'package:mattermost_dart/mattermost_dart.dart'; // tests for InlineObject16 void main() { final instance = InlineObject16Builder(); // TODO add properties to the builder and call build() group(InlineObject16, () { // The token given to validate the email // String token test('to test the property `token`', () async { // TODO }); }); }
22.777778
56
0.665854
c86191cfbae018286c7142e2a00b9cf878725766
320
sql
SQL
scripts-db/script_insert_productos.sql
fran-bravo/php-practica
f964922155f7406c36e5b6c6975de2d45950ef46
[ "MIT" ]
null
null
null
scripts-db/script_insert_productos.sql
fran-bravo/php-practica
f964922155f7406c36e5b6c6975de2d45950ef46
[ "MIT" ]
4
2016-01-02T16:16:02.000Z
2016-01-04T02:34:05.000Z
scripts-db/script_insert_productos.sql
fran-bravo/php-practica
f964922155f7406c36e5b6c6975de2d45950ef46
[ "MIT" ]
null
null
null
INSERT INTO `producto` (`nombre`, `precio`, `stock`, `id_categoria`) VALUES ('Leche', 10.5, 100, 1), ('Queso Porsalut', 24.3, 53, 1), ('Zucaritas', 31.99, 136, 5), ('Pollo Los Hermanos', 67.30, 40, 4), ('Arroz Gallo', 14.69, 68, 3), ('Mortadella', 22.79, 60, 2), ('Nuka Cola', 16.99, 200, 6), ('Six Up', 14.99, 150, 6);
32
75
0.584375
953c1cfddc4ba73fd3089c055365579f684b132c
6,789
swift
Swift
coolPlaces/coolPlaces/MapViewController.swift
zvet80/coolPlaces
bbf5936979737de1d10fc42fa768cb2496bbc35e
[ "MIT" ]
null
null
null
coolPlaces/coolPlaces/MapViewController.swift
zvet80/coolPlaces
bbf5936979737de1d10fc42fa768cb2496bbc35e
[ "MIT" ]
null
null
null
coolPlaces/coolPlaces/MapViewController.swift
zvet80/coolPlaces
bbf5936979737de1d10fc42fa768cb2496bbc35e
[ "MIT" ]
null
null
null
// // MapViewController.swift // coolPlaces // // Created by z on 2/6/16. // Copyright © 2016 z. All rights reserved. // import UIKit import MapKit import CoreLocation class MapViewController: UIViewController, MKMapViewDelegate, CLLocationManagerDelegate, UIGestureRecognizerDelegate{ let AnnotationViewReuseIdentifier = "place" @IBOutlet weak var mapView: MKMapView! let annotation = MKPointAnnotation() var locationManager = CLLocationManager() var userLocationParse = PFGeoPoint(latitude: 0, longitude: 0); var lastRotation = CGFloat() let pinchRec = UIPinchGestureRecognizer() let rotateRec = UIRotationGestureRecognizer() override func viewDidLoad() { super.viewDidLoad() self.locationManager.delegate = self self.locationManager.desiredAccuracy = kCLLocationAccuracyHundredMeters self.locationManager.requestWhenInUseAuthorization() self.locationManager.startUpdatingLocation() self.mapView.showsUserLocation = true displayMarkers() self.mapView.userInteractionEnabled = true self.mapView.multipleTouchEnabled = true } func displayMarkers() -> Void { let annotationQuery = PFQuery(className: Place.parseClassName()) annotationQuery.whereKey("location", nearGeoPoint: userLocationParse) annotationQuery.limit = 30 //let nearPlaces = annotationQuery.findObjects() annotationQuery.findObjectsInBackgroundWithBlock { (places, error) -> Void in if error == nil{ let nearPlaces = places! as [PFObject] for place in nearPlaces{ let placeAnnotation = MKPointAnnotation() let point = place["location"] as! PFGeoPoint let pointName = place["placeName"] as! String let annotationLocation = CLLocationCoordinate2DMake(point.latitude, point.longitude) placeAnnotation.coordinate = annotationLocation placeAnnotation.title = pointName self.mapView.addAnnotation(placeAnnotation) } }else { print("Error:" + (error?.localizedDescription)!) } } } func locationManager(manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { let location = locations.last let center = CLLocationCoordinate2D(latitude: (location?.coordinate.latitude)!, longitude: (location?.coordinate.longitude)!) let region = MKCoordinateRegion(center: center, span: MKCoordinateSpan(latitudeDelta:3,longitudeDelta: 3)) self.mapView.setRegion(region, animated: true) //self.locationManager.stopUpdatingLocation() let myLat = location!.coordinate.latitude let myLong = location!.coordinate.longitude userLocationParse=PFGeoPoint(latitude: myLat, longitude: myLong) let myAnnotation = MKPointAnnotation() myAnnotation.coordinate = CLLocationCoordinate2D(latitude: myLat, longitude: myLong) myAnnotation.title = "You are here!" mapView.addAnnotation(myAnnotation) } func locationManager(manager: CLLocationManager, didFailWithError error: NSError) { print("Error swift:" + error.localizedDescription) } func clearAnnotations(){ if mapView?.annotations != nil { mapView.removeAnnotations(mapView.annotations as [MKAnnotation]) } } func handlePoints(annotationstoShow:[MKAnnotation]){ mapView.addAnnotations(annotationstoShow) mapView.showAnnotations(annotationstoShow, animated: true) } func mapView(mapView:MKMapView,didSelectAnnotationView view:MKAnnotationView){ } func mapView(mapView:MKMapView, viewForAnnotation:MKAnnotation) -> MKAnnotationView?{ var view = mapView.dequeueReusableAnnotationViewWithIdentifier(AnnotationViewReuseIdentifier) if view == nil{ view = MKPinAnnotationView(annotation: annotation, reuseIdentifier: AnnotationViewReuseIdentifier) view!.canShowCallout = true } else { view!.annotation = annotation } //view!.rightCalloutAccessoryView = UIButton.buttonWithType(UIButtonType.DetailDisclosure) as UIButton return view } func mapView(mapView: MKMapView, annotationView view: MKAnnotationView, calloutAccessoryControlTapped control: UIControl) { performSegueWithIdentifier("showDetail", sender: view) } override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { if segue.identifier == "showdetail"{ if let place = (sender as? MKAnnotationView)?.annotation as? Place{ if let ivc = segue.destinationViewController as? DetailsViewController{ ivc.textViewTitle?.text = place.placeName } } } } @IBAction func changeMapType(sender: UISegmentedControl) { switch sender.selectedSegmentIndex { case 0: self.mapView.mapType = MKMapType.Standard case 1: self.mapView.mapType = MKMapType.Satellite case 2: self.mapView.mapType = MKMapType.Hybrid default: self.mapView.mapType = MKMapType.Standard } } @IBAction func pinch(sender: UIPinchGestureRecognizer) { if let view = sender.view{ view.transform = CGAffineTransformScale(view.transform, sender.scale, sender.scale) sender.scale = 1 } } @IBAction func rotate(sender: UIRotationGestureRecognizer) { // CGFloat angle = sender.rotation // if let view = sender.view{ // view.transform = CGAffineTransformRotate(view.transform, sender.rotation) // sender.rotation = 0 // } var lastRotation = CGFloat() self.view.bringSubviewToFront(self.mapView) if(sender.state == UIGestureRecognizerState.Ended){ lastRotation = 0.0 } let rotation = 0.0 - (lastRotation - sender.rotation) let currentTrans = sender.view?.transform let newTrans = CGAffineTransformRotate(currentTrans!, rotation) sender.view?.transform = newTrans lastRotation = sender.rotation } func gestureRecognizer(gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWithGestureRecognizer otherGestureRecognizer: UIGestureRecognizer) -> Bool { return true } }
37.716667
172
0.644867
d72aa673eb73e80a7723694cb0e551e67c36a644
947
asm
Assembly
readwrite.asm
SvenMichaelKlose/libultimem
6fbbff4b6abfa8da0c4177793d2df0caa44dc229
[ "MIT" ]
null
null
null
readwrite.asm
SvenMichaelKlose/libultimem
6fbbff4b6abfa8da0c4177793d2df0caa44dc229
[ "MIT" ]
null
null
null
readwrite.asm
SvenMichaelKlose/libultimem
6fbbff4b6abfa8da0c4177793d2df0caa44dc229
[ "MIT" ]
null
null
null
.export ultimem_read_byte .export ultimem_write_byte .importzp s, d, c, tmp .import ultimem_offset2bank .code ; Fetch byte from Flash memory at 24-bit offset in 0,X. .proc ultimem_read_byte tya pha lda $9ff2 pha lda #%01111101 sta $9ff2 lda $9ff8 pha lda $9ff9 pha ldy #8 jsr ultimem_offset2bank lda s+1 ora #$20 sta s+1 ldy #0 lda (s),y sta tmp pla sta $9ff9 pla sta $9ff8 pla sta $9ff2 pla tay lda tmp rts .endproc ; Write byte to RAM at 24-bit offset in 0,X. .proc ultimem_write_byte sta tmp tya pha lda $9ff2 pha lda #%01111111 sta $9ff2 lda $9ff8 pha lda $9ff9 pha ldy #8 jsr ultimem_offset2bank lda s+1 ora #$20 sta s+1 ldy #0 lda tmp sta (s),y pla sta $9ff9 pla sta $9ff8 pla sta $9ff2 pla tay rts .endproc
12.298701
55
0.558606
f762b5ddaf5301b08b0a27ec8cf3227bfb03cb4d
530
pkb
SQL
lib/templates/db/process_plg.pkb
Dani3lSun/apex-plugin-dev-enhancer
91216298d0dbca9ed8bcc8b9242140950dbcc183
[ "MIT" ]
7
2018-01-06T03:23:15.000Z
2021-12-08T23:52:04.000Z
lib/templates/db/process_plg.pkb
stefandobre/apex-plugin-dev-enhancer
91216298d0dbca9ed8bcc8b9242140950dbcc183
[ "MIT" ]
1
2021-05-06T20:52:29.000Z
2021-05-06T20:52:29.000Z
lib/templates/db/process_plg.pkb
stefandobre/apex-plugin-dev-enhancer
91216298d0dbca9ed8bcc8b9242140950dbcc183
[ "MIT" ]
2
2020-03-07T09:27:30.000Z
2020-03-07T09:32:10.000Z
CREATE OR REPLACE PACKAGE BODY #plg_short_name#_plg_pkg IS -- -- Plug-in Execution Function -- #param p_process -- #param p_plugin -- #return apex_plugin.t_process_exec_result FUNCTION exec_#plg_short_name#(p_process IN apex_plugin.t_process, p_plugin IN apex_plugin.t_plugin) RETURN apex_plugin.t_process_exec_result IS l_result apex_plugin.t_process_exec_result; BEGIN RETURN l_result; END exec_#plg_short_name#; -- END #plg_short_name#_plg_pkg; /
31.176471
69
0.7
7fd4cb58e4a3631ede8b768d19f1a6e4ea75f681
25,364
go
Go
main.go
salrashid123/gsuites_gcp_graphdb
6fb6d1b2d3822e2a1c2f08f84831388a3bbc4ab4
[ "Apache-2.0" ]
8
2018-08-27T01:54:22.000Z
2021-01-16T00:47:30.000Z
main.go
salrashid123/gsuites_gcp_graphdb
6fb6d1b2d3822e2a1c2f08f84831388a3bbc4ab4
[ "Apache-2.0" ]
null
null
null
main.go
salrashid123/gsuites_gcp_graphdb
6fb6d1b2d3822e2a1c2f08f84831388a3bbc4ab4
[ "Apache-2.0" ]
2
2020-06-02T17:44:41.000Z
2022-03-03T14:36:32.000Z
// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package main /* Sample application to load gsuites users, groups and GCP projects, iam permissions into a janusgraph database NOTE: this product is NOT supported by Google and has not been tested at scale. */ import ( "flag" "fmt" "io/ioutil" "os" "strings" "sync" "time" "cloud.google.com/go/storage" "github.com/golang/glog" "golang.org/x/net/context" "golang.org/x/oauth2" "golang.org/x/oauth2/google" "golang.org/x/time/rate" admin "google.golang.org/api/admin/directory/v1" "google.golang.org/api/cloudresourcemanager/v1" "google.golang.org/api/iam/v1" "google.golang.org/api/iterator" "google.golang.org/api/option" ) var ( wg sync.WaitGroup wg2 sync.WaitGroup cmutex = &sync.Mutex{} component = flag.String("component", "all", "component to load: choices, all|projectIAM|users|serviceaccounts|roles|groups") serviceAccountFile = flag.String("serviceAccountFile", "svc_account.json", "Servie Account JSON file with IAM permissions to the org") subject = flag.String("subject", "admin@esodemoapp2.com", "Admin user to for the organization") organization = flag.String("organization", "", "OrganizationID") cx = flag.String("cx", "", "Customer ID number for the Gsuites domain") delay = flag.Int("delay", 100, "delay in ms for each goroutine") includePermissions = flag.Bool("includePermissions", false, "Include Permissions in Graph") adminService *admin.Service iamService *iam.Service crmService *cloudresourcemanager.Service projects = make([]*cloudresourcemanager.Project, 0) permissions = &Permissions{} roles = &Roles{} limiter *rate.Limiter ors *iam.RolesService projectsConfig = "projects.groovy" pmutex = &sync.Mutex{} pfile *os.File usersConfig = "users.groovy" umutex = &sync.Mutex{} ufile *os.File iamConfig = "iam.groovy" imutex = &sync.Mutex{} ifile *os.File serviceAccountConfig = "serviceaccounts.groovy" smutex = &sync.Mutex{} sfile *os.File rolesConfig = "roles.groovy" rmutex = &sync.Mutex{} rfile *os.File groupsConfig = "groups.groovy" gmutex = &sync.Mutex{} gfile *os.File gcsConfig = "gcs.groovy" gcsmutex = &sync.Mutex{} gcsfile *os.File ) const ( maxRequestsPerSecond float64 = 4 // "golang.org/x/time/rate" limiter to throttle operations burst int = 4 ) type Roles struct { Roles []Role `json:"roles"` } type Role struct { Name string `json:"name"` Role iam.Role `json:"role"` IncludedPermissions []string `json:"included_permissions"` } type Permissions struct { Permissions []Permission `json:"permissions"` } type Permission struct { //Permission iam.Permission // there's no direct way to query a given permission detail! Name string `json:"name"` Roles []string `json:"roles"` } func applyGroovy(cmd string, srcFile string) { switch srcFile { case projectsConfig: pmutex.Lock() _, err := pfile.WriteString(cmd) err = pfile.Sync() if err != nil { glog.Fatal(err) } pmutex.Unlock() case usersConfig: umutex.Lock() _, err := ufile.WriteString(cmd) err = ufile.Sync() if err != nil { glog.Fatal(err) } umutex.Unlock() case iamConfig: imutex.Lock() _, err := ifile.WriteString(cmd) err = ifile.Sync() if err != nil { glog.Fatal(err) } imutex.Unlock() case serviceAccountConfig: smutex.Lock() _, err := sfile.WriteString(cmd) err = sfile.Sync() if err != nil { glog.Fatal(err) } smutex.Unlock() case rolesConfig: rmutex.Lock() _, err := rfile.WriteString(cmd) err = rfile.Sync() if err != nil { glog.Fatal(err) } rmutex.Unlock() case groupsConfig: gmutex.Lock() _, err := gfile.WriteString(cmd) err = gfile.Sync() if err != nil { glog.Fatal(err) } gmutex.Unlock() case gcsConfig: gcsmutex.Lock() _, err := gcsfile.WriteString(cmd) err = gcsfile.Sync() if err != nil { glog.Fatal(err) } gcsmutex.Unlock() } glog.V(10).Infoln(cmd) } func getUsers(ctx context.Context) { defer wg.Done() glog.V(2).Infoln(">>>>>>>>>>> Getting Users") pageToken := "" for { q := adminService.Users.List().Customer(*cx) if pageToken != "" { q = q.PageToken(pageToken) } r, err := q.Do() if err != nil { glog.Fatal(err) } for _, u := range r.Users { glog.V(4).Infoln(" Adding User: ", u.PrimaryEmail) entry := ` if (g.V().hasLabel('user').has('email','%s').hasNext() == false) { g.addV('user').property(label, 'user').property('email', '%s').property('isExternal', false).id().next() } ` entry = fmt.Sprintf(entry, u.PrimaryEmail, u.PrimaryEmail) applyGroovy(entry, usersConfig) } pageToken = r.NextPageToken time.Sleep(time.Duration(*delay) * time.Millisecond) if pageToken == "" { break } } } func getGroups(ctx context.Context) { defer wg.Done() glog.V(2).Infoln(">>>>>>>>>>> Getting Groups") // loop over groups twice first time to get group names // then group members (we do this to properly sequence the graphcreation/groovy file) pageToken := "" for { q := adminService.Groups.List().Customer(*cx) if pageToken != "" { q = q.PageToken(pageToken) } r, err := q.Do() if err != nil { glog.Fatal(err) } for _, g := range r.Groups { glog.V(4).Infoln(" Adding Group: ", g.Email) entry := ` if (g.V().hasLabel('group').has('email','%s').hasNext() == false) { g.addV('group').property(label, 'group').property('email', '%s').property('isExternal', false).id().next() } ` entry = fmt.Sprintf(entry, g.Email, g.Email) applyGroovy(entry, groupsConfig) } pageToken = r.NextPageToken if pageToken == "" { break } } pageToken = "" for { q := adminService.Groups.List().Customer(*cx) if pageToken != "" { q = q.PageToken(pageToken) } r, err := q.Do() if err != nil { glog.Fatal(err) } for _, g := range r.Groups { time.Sleep(time.Duration(*delay) * time.Millisecond) wg2.Add(1) go getGroupMembers(ctx, g.Email) } pageToken = r.NextPageToken if pageToken == "" { break } } wg2.Wait() } func getGroupMembers(ctx context.Context, memberKey string) { defer wg2.Done() glog.V(2).Infoln(">>>>>>>>>>> Getting GroupMembers for Gropup ", memberKey) pageToken := "" for { q := adminService.Members.List(memberKey) if pageToken != "" { q = q.PageToken(pageToken) } r, err := q.Do() if err != nil { if err.Error() == "googleapi: Error 403: Not Authorized to access this resource/api, forbidden" { // ok, so we've got a group we can't expand on...this means we don't own it... // this is important and we should error log this pretty clearly glog.Infof("Group %s cannot be expanded for members; Possibly a group outside of the Gsuites domain", memberKey) return } glog.Fatal(err) } for _, m := range r.Members { glog.V(4).Infof(" Adding Member to Group %v : %v", memberKey, m.Email) if m.Type == "CUSTOMER" { entry := ` if (g.V().hasLabel('group').has('email','%s').hasNext() == false) { g1 = g.V().hasLabel('group').has('email', '%s').next() e1 = g.V().addE('in').to(g1).property('weight', 1).next() } ` entry = fmt.Sprintf(entry, memberKey, memberKey) applyGroovy(entry, groupsConfig) } if m.Type == "USER" { entry := ` if (g.V().hasLabel('user').has('email', '%s').hasNext() == false) { g.addV('user').property(label, 'user').property('email', '%s').next() } u1 = g.V().hasLabel('user').has('email', '%s' ).next() g1 = g.V().hasLabel('group').has('email', '%s').next() if ( g.V(u1).outE('in').where(inV().hasId( g1.id() )).hasNext() == false) { e1 = g.V(u1).addE('in').to(g1).property('weight', 1).next() } ` entry = fmt.Sprintf(entry, m.Email, m.Email, m.Email, memberKey) applyGroovy(entry, groupsConfig) } if m.Type == "GROUP" { wg2.Add(1) entry := ` if (g.V().hasLabel('group').has('email', '%s' ).hasNext() == false) { g.V().hasLabel('group').has('email', '%s' ).next() } g1 = g.V().hasLabel('group').has('email', '%s' ).next() g2 = g.V().hasLabel('group').has('email', '%s').next() if ( g.V(g1).outE('in').where(inV().hasId( g2.id() )).hasNext() == false) { e1 = g.V(g1).addE('in').to(g2).property('weight', 1).next() } ` entry = fmt.Sprintf(entry, m.Email, m.Email, m.Email, memberKey) applyGroovy(entry, groupsConfig) time.Sleep(time.Duration(*delay) * time.Millisecond) go getGroupMembers(ctx, m.Email) } } pageToken = r.NextPageToken if pageToken == "" { break } } } func getProjectServiceAccounts(ctx context.Context) { defer wg.Done() glog.V(2).Infoln(">>>>>>>>>>> Getting ProjectServiceAccounts") for _, p := range projects { req := iamService.Projects.ServiceAccounts.List("projects/" + p.ProjectId) if err := req.Pages(ctx, func(page *iam.ListServiceAccountsResponse) error { for _, sa := range page.Accounts { glog.V(4).Infof(" Adding ServiceAccount: %v", sa.Email) entry := ` if (g.V().hasLabel('serviceAccount').has('email','%s').hasNext() == false) { g.addV('serviceAccount').property(label, 'serviceAccount').property('email', '%s').id().next() } ` entry = fmt.Sprintf(entry, sa.Email, sa.Email) applyGroovy(entry, serviceAccountConfig) time.Sleep(time.Duration(*delay) * time.Millisecond) } return nil }); err != nil { glog.Fatal(err) } } } func getGCS(ctx context.Context) { defer wg.Done() glog.V(2).Infoln(">>>>>>>>>>> Getting GCS") data, err := ioutil.ReadFile(*serviceAccountFile) if err != nil { glog.Fatal(err) } client, err := storage.NewClient(ctx, option.WithCredentialsJSON(data)) if err != nil { glog.Fatalf("Failed to create client: %v", err) } for _, p := range projects { wg.Add(1) time.Sleep(time.Duration(*delay) * time.Millisecond) go func(ctx context.Context, projectId string) { defer wg.Done() it := client.Buckets(ctx, projectId) for { b, err := it.Next() if err == iterator.Done { break } if err != nil { glog.Fatalf("Unable to iterate bucket %s", b.Name) } glog.V(4).Infof(" Adding Bucket %v from Project %v", b.Name, projectId) entry := ` if (g.V().hasLabel('bucket').has('name','%s').has('projectid','%s').hasNext() == false) { g.addV('bucket').property(label, 'bucket').property('name', '%s').property('projectid','%s').id().next() } r1 = g.V().hasLabel('bucket').has('name','%s').has('projectid','%s').next() if ( g.V().hasLabel('project').has('projectid', '%s').hasNext() == false) { g.addV('project').property(label, 'project').property('projectid', '%s').id().next() } p1 = g.V().hasLabel('project').has('projectid', '%s').next() if (g.V(r1).outE('in').where(inV().hasId( p1.id() )).hasNext() == false) { e1 = g.V(r1).addE('in').to(p1).property('weight', 1).next() } ` entry = fmt.Sprintf(entry, b.Name, projectId, b.Name, projectId, b.Name, projectId, projectId, projectId, projectId) policy, err := client.Bucket(b.Name).IAM().Policy(ctx) if err != nil { glog.Infof("Unable to iterate bucket policy %s", b.Name) } else { for _, role := range policy.Roles() { //glog.Infof(" Role %q", role) glog.V(4).Infof(" Adding Role %v to Bucket %v", role, b.Name) roleentry := ` if (g.V().hasLabel('role').has('name','%s').hasNext() == false) { v = graph.addVertex('role') v.property('name', '%s') } r1 = g.V().hasLabel('role').has('name', '%s').next() if ( g.V().hasLabel('bucket').has('name', '%s').hasNext() == false) { g.addV('bucket').property(label, 'bucket').property('name', '%s').property('projectid',%s).id().next() } p1 = g.V().hasLabel('bucket').has('name', '%s').next() if (g.V(r1).outE('in').where(inV().hasId( p1.id() )).hasNext() == false) { e1 = g.V(r1).addE('in').to(p1).property('weight', 1).next() } ` roleentry = fmt.Sprintf(roleentry, role, role, role, b.Name, b.Name, projectId, b.Name) memberentry := `` for _, member := range policy.Members(role) { if len(strings.Split(member, ":")) != 2 { if member == "allUsers" || member == "allAuthenticatedUsers" { glog.V(4).Infof(" Adding %s to Bucket Role %v on Bucket %v", member, role, b.Name) memberType := "group" email := member memberentry = memberentry + ` if (g.V().hasLabel('%s').has('email', '%s').hasNext() == false) { g.addV('%s').property(label, '%s').property('email', '%s').id().next() } i1 = g.V().hasLabel('%s').has('email', '%s').next() r1 = g.V().hasLabel('role').has('name', '%s').next() if (g.V(i1).outE('in').where(inV().hasId(r1.id())).hasNext() == false) { e1 = g.V(i1).addE('in').to(r1).property('weight', 1).next() } ` memberentry = fmt.Sprintf(memberentry, memberType, email, memberType, memberType, email, memberType, email, role) break } else { glog.Error(" Unknown memberType %v\n", member) break } } memberType := strings.Split(member, ":")[0] email := strings.Split(member, ":")[1] glog.V(4).Infof(" Adding Member %v to Bucket Role %v on Bucket %v", email, role, b.Name) memberentry = memberentry + ` if (g.V().hasLabel('%s').has('email', '%s').hasNext() == false) { g.addV('%s').property(label, '%s').property('email', '%s').id().next() } i1 = g.V().hasLabel('%s').has('email', '%s').next() if (g.V().hasLabel('role').has('name','%s').hasNext() == false) { v = graph.addVertex('role') } r1 = g.V().hasLabel('role').has('name', '%s').next() if (g.V(i1).outE('in').where(inV().hasId(r1.id())).hasNext() == false) { e1 = g.V(i1).addE('in').to(r1).property('weight', 1).next() } ` memberentry = fmt.Sprintf(memberentry, memberType, email, memberType, memberType, email, memberType, email, role, role) } entry = entry + roleentry + memberentry applyGroovy(entry, gcsConfig) } } } }(ctx, p.ProjectId) } } func getIamPolicy(ctx context.Context, projectID string) { defer wg.Done() glog.V(2).Infof(">>>>>>>>>>> Getting IAMPolicy for Project %v", projectID) rb := &cloudresourcemanager.GetIamPolicyRequest{} resp, err := crmService.Projects.GetIamPolicy(projectID, rb).Context(ctx).Do() if err != nil { glog.Fatal(err) } // rs := iam.NewRolesService(iamService) for _, b := range resp.Bindings { glog.V(4).Infof(" Adding Binding %v to from Project %v", b.Role, projectID) entry := ` if (g.V().hasLabel('role').has('name', '%s').hasNext() == false) { v = graph.addVertex('role') v.property('name', '%s') } r1 = g.V().hasLabel('role').has('name', '%s').next() if ( g.V().hasLabel('project').has('projectid', '%s').hasNext() == false) { g.addV('project').property(label, 'project').property('projectid', '%s').id().next() } p1 = g.V().hasLabel('project').has('projectid', '%s').next() if (g.V(r1).outE('in').where(inV().hasId( p1.id() )).hasNext() == false) { e1 = g.V(r1).addE('in').to(p1).property('weight', 1).next() } ` entry = fmt.Sprintf(entry, b.Role, b.Role, b.Role, projectID, projectID, projectID) applyGroovy(entry, iamConfig) for _, m := range b.Members { memberType := strings.Split(m, ":")[0] email := strings.Split(m, ":")[1] glog.V(4).Infof(" Adding Member %v to Role %v on Project %v", email, b.Role, projectID) if memberType == "user" { entry := ` if (g.V().hasLabel('user').has('email', '%s').hasNext() == false) { g.addV('user').property(label, 'user').property('email', '%s').id().next() } i1 = g.V().hasLabel('user').has('email', '%s').next() r1 = g.V().hasLabel('role').has('name', '%s').next() if (g.V(i1).outE('in').where(inV().hasId(r1.id())).hasNext() == false) { e1 = g.V(i1).addE('in').to(r1).property('weight', 1).next() } ` entry = fmt.Sprintf(entry, email, email, email, b.Role) applyGroovy(entry, iamConfig) } if memberType == "serviceAccount" { entry := ` if (g.V().hasLabel('serviceAccount').has('serviceAccount', '%s').hasNext() == false) { g.addV('serviceAccount').property(label, 'serviceAccount').property('email', '%s').id().next() } i1 = g.V().hasLabel('serviceAccount').has('email', '%s').next() r1 = g.V().hasLabel('role').has('name', '%s').next() if (g.V(i1).outE('in').where(inV().hasId(r1.id())).hasNext() == false) { e1 = g.V(i1).addE('in').to(r1).property('weight', 1).next() } ` entry = fmt.Sprintf(entry, email, email, email, b.Role) applyGroovy(entry, iamConfig) } if memberType == "group" { entry := ` if (g.V().hasLabel('group').has('email', '%s').hasNext() == false) { g.addV('group').property(label, 'group').property('email', '%s').id().next() } i1 = g.V().hasLabel('group').has('email', '%s').next() r1 = g.V().hasLabel('role').has('name', '%s').next() if (g.V(i1).outE('in').where(inV().hasId(r1.id())).hasNext() == false) { e1 = g.V(i1).addE('in').to(r1).property('weight', 1).next() } ` entry = fmt.Sprintf(entry, email, email, email, b.Role) applyGroovy(entry, iamConfig) } } } } func getIAM(ctx context.Context) { defer wg.Done() // oreq, err := crmService.Organizations.Get(fmt.Sprintf("organizations/%s", *organization)).Do() // if err != nil { // glog.Fatal(err) // } // glog.V(2).Infof(" Organization Name %s", oreq.Name) // *organization = oreq.Name parent := fmt.Sprintf(fmt.Sprintf("organizations/%s", *organization)) err := generateMap(ctx, parent) if err != nil { glog.Fatal(err) } for _, p := range projects { parent := fmt.Sprintf("projects/%s", p.ProjectId) err = generateMap(ctx, parent) if err != nil { glog.Fatal(err) } } parent = "" err = generateMap(ctx, parent) if err != nil { glog.Fatal(err) } for _, r := range roles.Roles { entry := ` if (g.V().hasLabel('role').has('name', '%s').hasNext() == false) { g.addV('role').property(label, 'role').property('name', '%s').id().next() } ` entry = fmt.Sprintf(entry, r.Name, r.Name) applyGroovy(entry, rolesConfig) } if *includePermissions { for _, p := range permissions.Permissions { pp := ` i1 = g.V().hasLabel('permission').has('name', '%s').next() ` pp = fmt.Sprintf(pp, p.Name) rentry := "" for _, r := range p.Roles { rentry = rentry + ` if (g.V().hasLabel('role').has('name', '%s').hasNext() == false) { g.addV('role').property(label, 'role').property('name', '%s').id().next() } r1 = g.V().hasLabel('role').has('name', '%s').next() e1 = g.V(i1).addE('in').to(r1).property('weight', 1).next() ` rentry = fmt.Sprintf(rentry, r, r, r) } entry := ` if (g.V().hasLabel('permission').has('permission', '%s').hasNext() == false) { g.addV('permission').property(label, 'permission').property('name', '%s').id().next() } %s %s ` entry = fmt.Sprintf(entry, p.Name, p.Name, pp, rentry) applyGroovy(entry, rolesConfig) } } // glog.V(2).Infof("Getting Default Roles/Permissions") // parent = "" // err = generateMap(ctx, parent) // if err != nil { // glog.Fatal(err) // } glog.V(2).Infof(">>>>>>>>>>> Getting ProjectIAM") for _, p := range projects { entry := ` if (g.V().hasLabel('project').has('projectId', '%s').hasNext() == false) { g.addV('project').property(label, 'project').property('projectId', '%s').id().next() } ` entry = fmt.Sprintf(entry, p.ProjectId, p.ProjectId) applyGroovy(entry, projectsConfig) // only active projects appear to allow retrieval of IAM policies if p.LifecycleState == "ACTIVE" { time.Sleep(time.Duration(*delay) * time.Millisecond) wg.Add(1) go getIamPolicy(ctx, p.ProjectId) } } } // TODO: only get projects in the selected organization // the following get allprojects the service account has access to... func getProjects(ctx context.Context) { glog.V(2).Infof(">>>>>>>>>>> Getting Projects") req := crmService.Projects.List() if err := req.Pages(ctx, func(page *cloudresourcemanager.ListProjectsResponse) error { for _, p := range page.Projects { if p.LifecycleState == "ACTIVE" { projects = append(projects, p) } } return nil }); err != nil { glog.Fatal(err) } } func main() { ctx := context.Background() flag.Parse() limiter = rate.NewLimiter(rate.Limit(maxRequestsPerSecond), burst) if *organization == "" || *cx == "" { glog.Fatal("--organization and --cx must be specified") } data, err := ioutil.ReadFile(*serviceAccountFile) if err != nil { glog.Fatal(err) } adminconf, err := google.JWTConfigFromJSON(data, admin.AdminDirectoryUserReadonlyScope, admin.AdminDirectoryGroupReadonlyScope, ) adminconf.Subject = *subject adminService, err = admin.New(adminconf.Client(ctx)) if err != nil { glog.Fatal(err) } iamconf, err := google.JWTConfigFromJSON(data, iam.CloudPlatformScope) if err != nil { glog.Fatal(err) } iamclient := iamconf.Client(oauth2.NoContext) iamService, err = iam.New(iamclient) if err != nil { glog.Fatal(err) } ors = iam.NewRolesService(iamService) crmconf, err := google.JWTConfigFromJSON(data, cloudresourcemanager.CloudPlatformReadOnlyScope) if err != nil { glog.Fatal(err) } crmclient := crmconf.Client(oauth2.NoContext) crmService, err = cloudresourcemanager.New(crmclient) if err != nil { glog.Fatal(err) } getProjects(ctx) switch *component { case "IAM": pfile, _ = os.Create(projectsConfig) ifile, _ = os.Create(iamConfig) rfile, _ = os.Create(rolesConfig) defer pfile.Close() defer ifile.Close() defer rfile.Close() wg.Add(1) go getIAM(ctx) case "users": ufile, _ = os.Create(usersConfig) defer ufile.Close() wg.Add(1) go getUsers(ctx) case "groups": gfile, _ = os.Create(groupsConfig) defer gfile.Close() wg.Add(1) go getGroups(ctx) case "serviceaccounts": sfile, _ = os.Create(serviceAccountConfig) defer sfile.Close() go getProjectServiceAccounts(ctx) case "gcs": gcsfile, _ = os.Create(gcsConfig) defer gcsfile.Close() wg.Add(1) go getGCS(ctx) default: pfile, _ = os.Create(projectsConfig) ufile, _ = os.Create(usersConfig) sfile, _ = os.Create(serviceAccountConfig) ifile, _ = os.Create(iamConfig) rfile, _ = os.Create(rolesConfig) gfile, _ = os.Create(groupsConfig) gcsfile, _ = os.Create(gcsConfig) defer pfile.Close() defer ufile.Close() defer sfile.Close() defer ifile.Close() defer rfile.Close() defer gfile.Close() defer gcsfile.Close() wg.Add(5) go getUsers(ctx) go getGroups(ctx) go getProjectServiceAccounts(ctx) go getIAM(ctx) go getGCS(ctx) } wg.Wait() } func generateMap(ctx context.Context, parent string) error { var wg sync.WaitGroup oireq := ors.List().Parent(parent) if err := oireq.Pages(ctx, func(page *iam.ListRolesResponse) error { for _, sa := range page.Roles { wg.Add(1) go func(ctx context.Context, wg *sync.WaitGroup, sa *iam.Role) { glog.V(20).Infof("%s\n", sa.Name) defer wg.Done() var err error if err := limiter.Wait(ctx); err != nil { glog.Fatal(err) } if ctx.Err() != nil { glog.Fatal(err) } rc, err := ors.Get(sa.Name).Do() if err != nil { glog.Fatal(err) } cr := &Role{ Name: sa.Name, Role: *sa, IncludedPermissions: rc.IncludedPermissions, } cmutex.Lock() _, ok := findRoles(roles.Roles, sa.Name) if !ok { glog.V(2).Infof(" Iterating Role %s", sa.Name) roles.Roles = append(roles.Roles, *cr) } cmutex.Unlock() for _, perm := range rc.IncludedPermissions { glog.V(2).Infof(" Appending Permission %s to Role %s", perm, sa.Name) i, ok := findPermission(permissions.Permissions, perm) if !ok { pmutex.Lock() permissions.Permissions = append(permissions.Permissions, Permission{ Name: perm, Roles: []string{sa.Name}, }) pmutex.Unlock() } else { pmutex.Lock() p := permissions.Permissions[i] _, ok := find(p.Roles, sa.Name) if !ok { p.Roles = append(p.Roles, sa.Name) permissions.Permissions[i] = p } pmutex.Unlock() } } }(ctx, &wg, sa) } return nil }); err != nil { return err } wg.Wait() return nil } func find(slice []string, val string) (int, bool) { for i, item := range slice { if item == val { return i, true } } return -1, false } func findRoles(slice []Role, val string) (int, bool) { for i, item := range slice { if item.Name == val { return i, true } } return -1, false } func findPermission(slice []Permission, val string) (int, bool) { for i, item := range slice { if item.Name == val { return i, true } } return -1, false }
27.127273
135
0.6154
f0b4fa8615a3b3270472d95f895872b73ca350e3
261
sql
SQL
setup/pgsql/seen.sql
acrelle/infobot-src
8faccc7f9948da342e9e163373b6f733b577f73a
[ "Artistic-1.0-Perl" ]
null
null
null
setup/pgsql/seen.sql
acrelle/infobot-src
8faccc7f9948da342e9e163373b6f733b577f73a
[ "Artistic-1.0-Perl" ]
null
null
null
setup/pgsql/seen.sql
acrelle/infobot-src
8faccc7f9948da342e9e163373b6f733b577f73a
[ "Artistic-1.0-Perl" ]
null
null
null
CREATE TABLE seen ( nick character varying(20) NOT NULL, "time" numeric NOT NULL, channel character varying(30) NOT NULL, host character varying(80) NOT NULL, message text NOT NULL, CONSTRAINT seen_pkey PRIMARY KEY (nick) ) WITHOUT OIDS;
29
43
0.708812
2f32297f1c64b60887394a59dc9496455ffb1b12
4,660
php
PHP
app/Admin/Controllers/Task/EmployerManagerController.php
lgxj/SuperCooperationAPI
499c3b218aab9643cd8669806bcb81e1e689161d
[ "Apache-2.0" ]
17
2020-07-16T01:23:13.000Z
2022-03-17T08:50:49.000Z
app/Admin/Controllers/Task/EmployerManagerController.php
jingmian/SuperCooperationAPI
857f519d41ab6ba564dc57ae01450f58e47a1cf2
[ "Apache-2.0" ]
2
2021-04-30T12:50:33.000Z
2021-10-05T21:28:10.000Z
app/Admin/Controllers/Task/EmployerManagerController.php
jingmian/SuperCooperationAPI
857f519d41ab6ba564dc57ae01450f58e47a1cf2
[ "Apache-2.0" ]
6
2020-09-25T07:08:24.000Z
2022-01-24T12:03:02.000Z
<?php namespace App\Admin\Controllers\Task; use App\Admin\Controllers\ScController; use App\Bridges\Trade\Admin\EmployerManagerBridge; use App\Bridges\Trade\CommentBridge; use App\Bridges\Trade\CompensateBridge; use App\Bridges\Trade\DetailTaskOrderBridge; use App\Bridges\Trade\PayTaskOrderBridge; use App\Consts\MessageConst; use App\Consts\Trade\OrderConst; use App\Services\Trade\Fund\CompensateService; use App\Services\Trade\Order\Admin\EmployerManagerService; use App\Services\Trade\Order\CommentService; use App\Services\Trade\Order\Employer\DetailTaskOrderService; use App\Services\Trade\Pay\PayTaskOrderService; use Illuminate\Http\Request; class EmployerManagerController extends ScController { /** * @var EmployerManagerService */ protected $managerService; public function __construct(EmployerManagerBridge $service) { $this->managerService = $service; } public function search(Request $request){ $filter = $request->input('filter'); $filter = json_decode($filter, true); $pageSize = $request->input('limit'); $result = $this->managerService->search($filter,$pageSize); return success(formatPaginate($result)); } public function detail(Request $request) { $orderNo = $request->get('order_no',''); if(empty($orderNo)){ return fail([],'任务不能为空'); } $withText = $request->get('with_text',true); $withService = $request->get('with_service',true); $withOrderAddress = $request->get('with_order_address',true); $priceChangeType = $request->get('price_change_type',''); $withUser = $request->get('with_user',true); $detailTaskOrderService = $this->getDetailTaskOrderService(); $taskOrder = $detailTaskOrderService->getOrder($orderNo,$priceChangeType,$withText,$withService,$withOrderAddress,$withUser); // 帮手 $taskOrder['helper'] = $detailTaskOrderService->getReceiver($orderNo, true) ?: null; $taskOrder['helper_comments'] = null; $taskOrder['employer_comments'] = null; $taskOrder['defer'] = []; $taskOrder['quoted_list'] = []; // 帮手评价雇主 if(isset($taskOrder['order_state']) && $taskOrder['order_state'] == OrderConst::EMPLOYER_STATE_COMPLETE){ $list = $this->getCommentService()->getOrderComment($orderNo,MessageConst::TYPE_COMMENT_TASK_EMPLOYER); $taskOrder['helper_comments'] = $list[0] ?? null; } // 雇主评价帮手 if(isset($taskOrder['order_state']) && $taskOrder['order_state'] == OrderConst::EMPLOYER_STATE_COMPLETE){ $list = $this->getCommentService()->getOrderComment($orderNo,MessageConst::TYPE_COMMENT_TASK_HELPER); $taskOrder['employer_comments'] = $list[0] ?? null; } // 申请延期交付信息 if(isset($taskOrder['order_state']) && $taskOrder['order_state'] == OrderConst::EMPLOYER_STATE_RECEIVE){ $defer = $detailTaskOrderService->getOrderDefersByOrderNo($orderNo,$taskOrder['helper_user_id']); $defer = $defer ? $defer->toArray() : []; if($defer){ $taskOrder['defer']['defer_minutes'] = $defer['defer_minutes']; $taskOrder['defer']['status'] = $defer['status']; $taskOrder['defer']['created_at'] = $defer['created_at']; $taskOrder['defer']['status_str'] = OrderConst::getHelperReferStatus($defer['status']); } } // 竞价任务,查询报价列表 if ($taskOrder['order_type'] == OrderConst::TYPE_COMPETITION) { $taskOrder['quoted_list'] = $detailTaskOrderService->getOrderQuotedList($orderNo); } // 获取任务时间线 $taskOrder['time_lines'] = $detailTaskOrderService->getOrderTimeLines($orderNo, $taskOrder); // 支付流水 $taskOrder['pay_logs'] = $this->getPayTaskOrderService()->getPayLogByBizNo($orderNo); return success($taskOrder); } /** * @return DetailTaskOrderService */ protected function getDetailTaskOrderService() { return new DetailTaskOrderBridge(new DetailTaskOrderService()); } /** * @return CompensateService */ protected function getCompensateService() { return new CompensateBridge(new CompensateService()); } /** * @return CommentService */ protected function getCommentService(){ return new CommentBridge(new CommentService()); } /** * @return PayTaskOrderService */ protected function getPayTaskOrderService() { return new PayTaskOrderBridge(new PayTaskOrderService()); } }
35.30303
133
0.648283
963aeb915c6a5c6842fecb2f371562525ec6a465
2,474
php
PHP
src/Zimbra/Mail/Tests/Request/ListDocumentRevisionsTest.php
RamdanK/zimbra-api
d7386a09e9c23f1ae845f433955b4cbd5b4c0d3a
[ "BSD-3-Clause" ]
67
2015-01-15T01:53:33.000Z
2022-03-29T08:46:31.000Z
src/Zimbra/Mail/Tests/Request/ListDocumentRevisionsTest.php
RamdanK/zimbra-api
d7386a09e9c23f1ae845f433955b4cbd5b4c0d3a
[ "BSD-3-Clause" ]
45
2015-03-08T08:40:27.000Z
2022-03-19T14:47:54.000Z
src/Zimbra/Mail/Tests/Request/ListDocumentRevisionsTest.php
RamdanK/zimbra-api
d7386a09e9c23f1ae845f433955b4cbd5b4c0d3a
[ "BSD-3-Clause" ]
51
2015-03-18T08:28:36.000Z
2022-03-28T21:26:13.000Z
<?php namespace Zimbra\Admin\Tests\Request; use Zimbra\Mail\Tests\ZimbraMailApiTestCase; use Zimbra\Mail\Request\ListDocumentRevisions; use Zimbra\Mail\Struct\ListDocumentRevisionsSpec; /** * Testcase class for ListDocumentRevisions. */ class ListDocumentRevisionsTest extends ZimbraMailApiTestCase { public function testListDocumentRevisionsRequest() { $id = $this->faker->uuid; $ver = mt_rand(1, 10); $count = mt_rand(1, 10); $doc = new ListDocumentRevisionsSpec( $id, $ver, $count ); $req = new ListDocumentRevisions( $doc ); $this->assertSame($doc, $req->getDoc()); $req = new ListDocumentRevisions( new ListDocumentRevisionsSpec('', 0, 0) ); $req->setDoc($doc); $this->assertSame($doc, $req->getDoc()); $xml = '<?xml version="1.0"?>'."\n" .'<ListDocumentRevisionsRequest>' .'<doc id="' . $id . '" ver="' . $ver . '" count="' . $count . '" />' .'</ListDocumentRevisionsRequest>'; $this->assertXmlStringEqualsXmlString($xml, (string) $req); $array = array( 'ListDocumentRevisionsRequest' => array( '_jsns' => 'urn:zimbraMail', 'doc' => array( 'id' => $id, 'ver' => $ver, 'count' => $count, ), ) ); $this->assertEquals($array, $req->toArray()); } public function testListDocumentRevisionsApi() { $id = $this->faker->uuid; $ver = mt_rand(1, 10); $count = mt_rand(1, 10); $doc = new ListDocumentRevisionsSpec( $id, $ver, $count ); $this->api->listDocumentRevisions( $doc ); $client = $this->api->getClient(); $req = $client->lastRequest(); $xml = '<?xml version="1.0"?>'."\n" .'<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:urn="urn:zimbra" xmlns:urn1="urn:zimbraMail">' .'<env:Body>' .'<urn1:ListDocumentRevisionsRequest>' .'<urn1:doc id="' . $id . '" ver="' . $ver . '" count="' . $count . '" />' .'</urn1:ListDocumentRevisionsRequest>' .'</env:Body>' .'</env:Envelope>'; $this->assertXmlStringEqualsXmlString($xml, (string) $req); } }
31.717949
132
0.509701
80bc63e9c5768208fecee0e3fafef1a714d6d3d5
2,741
sql
SQL
sql_scripts/tables.sql
Twyer/discogs-parser
6db64d357cdc896da9c4fc16efdaab59732b0000
[ "BSD-3-Clause" ]
4
2020-01-06T20:12:13.000Z
2021-09-20T18:48:45.000Z
sql_scripts/tables.sql
Twyer/discogs-parser
6db64d357cdc896da9c4fc16efdaab59732b0000
[ "BSD-3-Clause" ]
null
null
null
sql_scripts/tables.sql
Twyer/discogs-parser
6db64d357cdc896da9c4fc16efdaab59732b0000
[ "BSD-3-Clause" ]
1
2020-01-10T03:10:42.000Z
2020-01-10T03:10:42.000Z
CREATE TABLE artists ( artist_id VARCHAR(10), name VARCHAR(1024), real_name VARCHAR(1024), profile TEXT, data_quality VARCHAR(20), name_variations VARCHAR(1024)[], urls VARCHAR(1024)[] ); CREATE TABLE artist_aliases ( artist_id VARCHAR(10), alias_id VARCHAR(10), name VARCHAR(1024) ); CREATE TABLE artist_members ( artist_id VARCHAR(10), member_id VARCHAR(10), name VARCHAR(1024) ); CREATE TABLE images ( artist_id VARCHAR(10), label_id VARCHAR(10), master_id VARCHAR(10), release_id VARCHAR(10), height VARCHAR(10), width VARCHAR(10), type VARCHAR(10), uri VARCHAR(1024), uri_150 VARCHAR(1024) ); CREATE TABLE labels ( label_id VARCHAR(10), name VARCHAR(1024), contact_info TEXT, profile TEXT, data_quality VARCHAR(20), urls VARCHAR(1024)[] ); CREATE TABLE label_labels ( label_id VARCHAR(10), sub_label_id VARCHAR(10), name VARCHAR(1024), parent VARCHAR(5) ); CREATE TABLE masters ( master_id VARCHAR(10), main_release VARCHAR(10), genres VARCHAR(1024)[], styles VARCHAR(1024)[], year VARCHAR(4), title VARCHAR(1024), data_quality VARCHAR(20) ); CREATE TABLE videos ( master_id VARCHAR(10), release_id VARCHAR(10), duration VARCHAR(10), embed VARCHAR(5), src VARCHAR(1024), title VARCHAR(1024), description TEXT ); CREATE TABLE releases ( release_id VARCHAR(10), status VARCHAR(20), title VARCHAR(100), genres VARCHAR(1024)[], styles VARCHAR(1024)[], country VARCHAR(50), released VARCHAR(10), notes TEXT, data_quality VARCHAR(20), master_id VARCHAR(10), main_release VARCHAR(10) ); CREATE TABLE release_artists ( master_id VARCHAR(10), release_id VARCHAR(10), release_artist_id VARCHAR(10), name VARCHAR(1024), extra VARCHAR(5), joiner TEXT, anv TEXT, role TEXT, tracks TEXT ); CREATE TABLE release_labels ( release_id VARCHAR(10), release_label_id VARCHAR(10), name VARCHAR(1024), category VARCHAR(100) ); CREATE TABLE release_identifiers ( release_id VARCHAR(10), description TEXT, type TEXT, value TEXT ); CREATE TABLE release_formats ( release_id VARCHAR(10), name VARCHAR(1024), quantity VARCHAR(10), text TEXT, descriptions TEXT[] ); CREATE TABLE release_companies ( release_id VARCHAR(10), release_company_id VARCHAR(10), name VARCHAR(1024), category VARCHAR(100), entity_type VARCHAR(1024), entity_type_name VARCHAR(1024), resource_url VARCHAR(1024) ); CREATE TABLE release_tracks ( release_id VARCHAR(10), position VARCHAR(10), title VARCHAR(100), duration VARCHAR(10) );
20.154412
36
0.671653
04dd389ea57b4ac94d1594d4142c0e26318eaaec
1,720
swift
Swift
projects/006_NSOperationInPractice/006_DemoStarter/TiltShift/TiltShift/DataLoadOperation.swift
sammyd/Multithreading-VideoSeries
0ad84ff7e31164b1a7c59a3e2e56d61de9d341cd
[ "MIT" ]
1
2016-05-02T15:20:25.000Z
2016-05-02T15:20:25.000Z
projects/006_NSOperationInPractice/006_DemoStarter/TiltShift/TiltShift/DataLoadOperation.swift
sammyd/Multithreading-VideoSeries
0ad84ff7e31164b1a7c59a3e2e56d61de9d341cd
[ "MIT" ]
null
null
null
projects/006_NSOperationInPractice/006_DemoStarter/TiltShift/TiltShift/DataLoadOperation.swift
sammyd/Multithreading-VideoSeries
0ad84ff7e31164b1a7c59a3e2e56d61de9d341cd
[ "MIT" ]
null
null
null
/* * Copyright (c) 2015 Razeware LLC * * 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. */ import Foundation class DataLoadOperation: ConcurrentOperation { private let url: NSURL private let completion: ((NSData?) -> ())? private var loadedData: NSData? init(url: NSURL, completion: ((NSData?) -> ())? = nil) { self.url = url self.completion = completion super.init() } override func main() { NetworkSimulator.asyncLoadDataAtURL(url) { data in self.loadedData = data self.completion?(data) self.state = .Finished } } } extension DataLoadOperation: ImageDecompressionOperationDataProvider { var compressedData: NSData? { return loadedData } }
34.4
79
0.737209
53d82f6d74ae7b044e136a79639c0093220ef78c
1,433
java
Java
src/game/Round.java
AppSecAI-TEST/2048_M-A-Star
0fa5cf25200c0daecdb35e1dc747e3219edf3428
[ "Apache-2.0" ]
13
2015-06-19T14:07:05.000Z
2021-11-27T07:46:31.000Z
src/game/Round.java
AppSecAI-TEST/2048_M-A-Star
0fa5cf25200c0daecdb35e1dc747e3219edf3428
[ "Apache-2.0" ]
1
2016-10-30T17:39:28.000Z
2016-10-30T20:50:13.000Z
src/game/Round.java
AppSecAI-TEST/2048_M-A-Star
0fa5cf25200c0daecdb35e1dc747e3219edf3428
[ "Apache-2.0" ]
10
2015-03-15T04:54:32.000Z
2019-05-11T09:21:04.000Z
package game; /** * @author Felix Neutatz * * CC BY 4.0 * http://creativecommons.org/licenses/by/4.0/ * * Copyright (c) 2014 Felix Neutatz */ public class Round { private PlayingField pf; //current state of the playing field private double probability; //how high is the probability to go there //private String move; //what was done to get to this state - just for debugging reasons private int move; public Round(PlayingField pf, double probability, String move) { this.pf = pf; this.probability = probability; setMoveByString(move); } public void setMoveByString(String direction){ direction.toLowerCase(); switch(direction.charAt(0)){ case 'u': move=1; break; case 'd': move=2; break; case 'l': move=3; break; case 'r': move=4; break; case '2': move=-2; break; case '4': move=-4; break; } } public PlayingField getPf() { return pf; } public void setPf(PlayingField pf) { this.pf = pf; } public double getProbability() { return probability; } public void setProbability(double probability) { this.probability = probability; } public String getMove() { switch(move){ case 1: return "up"; case 2: return "down"; case 3: return "left"; case 4: return "right"; } return ""; } public void setMove(int move) { this.move = move; } }
18.139241
90
0.61619
72c4aec7a6ae412fff306e8f7010c07cec089bbb
802
asm
Assembly
oeis/193/A193647.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/193/A193647.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/193/A193647.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A193647: Number of arrays of -7..7 integers x(1..n) with every x(i) in a subsequence of length 1 or 2 with sum zero ; Submitted by Jamie Morken(s3) ; 1,15,43,267,1065,5377,23801,113191,517371,2416835,11155313,51830017,239940625,1112996767,5157111051,23910123931,110818577241,513715752705,2381164556233,11037736722167,51163163871835,237160332965907,1099316369116001,5095719897694721,23620396557747361,109488748256947375,507517975104557803,2352521325850231467,10904747101212103945,50547268087731543297,234304022715858565401,1086080009585707754311,5034355559849449836731,23335975257443251290595,108170297242665608376273,501406653134499682076417 lpb $0 sub $0,1 mul $1,10 add $1,$3 add $2,2 add $2,$3 mov $3,$4 mov $4,$2 add $2,$1 mov $1,$4 add $3,$4 lpe mov $0,$4 mul $0,7 add $0,1
40.1
493
0.794264
40bde7392a9834c5cd762054a16c38bd04f31bb0
16,544
htm
HTML
Date A Live/ArusuInstall.htm
AutumnSun1996/GameTools
05ed69c09e69e284092cfaffd9eb6313f654c729
[ "BSD-3-Clause" ]
null
null
null
Date A Live/ArusuInstall.htm
AutumnSun1996/GameTools
05ed69c09e69e284092cfaffd9eb6313f654c729
[ "BSD-3-Clause" ]
null
null
null
Date A Live/ArusuInstall.htm
AutumnSun1996/GameTools
05ed69c09e69e284092cfaffd9eb6313f654c729
[ "BSD-3-Clause" ]
null
null
null
<!DOCTYPE html> <html lang="ch"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>《约会大作战:或守install》白金攻略</title> <style> img { max-width: 100%; margin: auto; clear: both; display: block; } img.icon { display: inline; width: 54px; height: 54px; } table { margin: auto; min-width: 70%; } td { text-align: center; background-color: darkolivegreen; height: 26px; } .Trophy, .Note { color: red; font-weight: bold; } mark.Save { background-color: yellowgreen; } mark.Load { background-color: darkgrey; } p { margin-left: 2em; } </style> <!--suppress JSDuplicatedDeclaration --> <script> var isMobile = /Android|BlackBerry|IEMobile|iPhone|iPad|iPod/i.test(navigator.userAgent); console.log(navigator.userAgent + ":" + isMobile); if (!isMobile) { document.write("<style>body{background-color: #333; color: wheat;padding-left: 3em; padding-right: 3em;}</style>"); } function toggleIntro() { var show = document.getElementById("CheckIntro").checked; var items = document.getElementsByClassName("Intro"); for (var i = 0; i < items.length; i++) { if (show) { items.item(i).style.display = ''; } else { items.item(i).style.display = 'none'; } } // updateStorage(); } function toggleTarget() { var items = document.getElementsByName('target'); var value = ''; for (var i = 0; i < items.length; i++) { if (items.item(i).checked) { value = items.item(i).value; } } console.log(value); var routes = document.getElementsByClassName('MainRoute'); for (var i = 0; i < routes.length; i++) { console.log(routes.item(i), routes.item(i).classList.contains(value)); if (routes.item(i).classList.contains(value)) { routes.item(i).style.display = ''; } else { routes.item(i).style.display = 'none'; } } // updateStorage(); } function loadStorage() { var checked = JSON.parse(localStorage.getItem("ArusuInstall")) || []; // alert("loadStorage" + checked); var items = document.getElementsByTagName("input"); for (var i = 0; i < checked.length; i++) { items.item(i).checked = checked[i] || false; } } function updateStorage() { var checked = []; var items = document.getElementsByTagName("input"); for (var i = 0; i < items.length; i++) { checked.push(items.item(i).checked); } // alert("updateStorage" + items + "" + checked); localStorage.setItem("ArusuInstall", JSON.stringify(checked)); } function initRoutes() { var routes = document.getElementsByClassName('MainRoute'); var choice = document.getElementById("Choices"); for (var i = 0; i < routes.length; i++) { console.log(routes.item(i).classList.item(1)); var input = ' <label for="Check_N_">_N_</label>\n' + '<input id="Check_N_" type="radio" name="target" value="_N_" onchange="toggleTarget()"_C_>&emsp;'; input = input.replace(/_N_/g, routes.item(i).classList.item(1)).replace(/_C_/g, i == 0 ? ' checked' : ''); choice.innerHTML += input; } document.addEventListener('change', updateStorage); } </script> </head> <body> <h1>《约会大作战:或守install》白金攻略</h1> <label for="CheckIntro">介绍</label> <input id="CheckIntro" type="checkbox" onchange="toggleIntro()"><br> <div class="Intro"> <p>作者:巴士速攻-无限欲(小钰)<br></p> <p><a href="http://bbs.tgbus.com/thread-5492412-1-1.html">来源:bbs.tgbus.com</a></p> <p align="center"><img src="./files/f651e17b40299a49e734cf948630_87de8a40ad74d9151a2aeec944fcb255abc4a26ec17a7d40.jpg"></p> <table> <tbody> <tr> <td> <p> 游戏名称: </p> </td> <td colspan="5"> <p>约会大作战:或守install</p> </td> </tr> <tr> <td> <p> 游戏原名: </p> </td> <td colspan="5"><p>デート.ア.ライブ 或守インストール</p></td> </tr> <tr> <td> <p> 对应平台: </p> </td> <td> <p>PS3</p> </td> <td> <p> 游戏类型: </p> </td> <td> <p>AVG</p> </td> <td> <p> 游戏版本: </p> </td> <td> <p>日版</p> </td> </tr> <tr> <td> <p> 发售日期: </p> </td> <td> <p>2014.06.26</p> </td> <td> <p> 年龄限制: </p> </td> <td> <p>CERO D</p> </td> <td> <p> 游戏人数: </p> </td> <td> <p>1人</p> </td> </tr> <tr> <td> <p> 发行厂商: </p> </td> <td colspan="3"> <p>COMPILE HEART</p> </td> <td> <p> 对应周边: </p> </td> <td> <p>无</p> </td> </tr> </tbody> </table> <p>以前一代有玩,这次新加了人物毫不犹豫的买了,一路玩下来果然……比起一代简直是福利满满,而且没有一代那么多阴暗的badend,这次可以说主要是以各种福利为主了,约炮迷不可错过的一作,而且另外重点就是,白金简单。</p> <p>白金难度:☆</p> <p>白金时间:全skip 2.5~3.5小时;看剧情 15~25小时</p> <p>白金准备:</p> <p>1 本作不需要留太多存档,因为有quick save/load,但有全选择肢的奖杯,于是需要在自由时间主角选项那里全部选一遍,这个通过QUICK可以轻松实现。</p> <p>2 请按照攻略文的攻略顺序展开。</p> <img src="./files/103458tqqjhservcreeqhq.png.thumb.jpg"> <p>括号内为quick选项,先存档选一次后再选主要选项走剧情即可(为收集全选择肢)</p> </div> <div id="Choices"></div> <div class="MainRoute 十香"> <h3>夜刀神 十香</h3> <mark class="Save">存档01</mark> <p>十香とデートする</p> <p>※黙っている</p> <h4>1st day</h4> <p>神社:日下部</p> <p>駅前:亜衣</p> <p>来禅高校⇒廊下:十香</p> <p>帮助十香/十香を助ける <br> (静观其变/手を出さずに見ている)</p> <p>和折纸对话/折紙と話す</p> <h4>2nd day</h4> <p>天宮タワー:日下部</p> <p>駅前:亜衣</p> <p>商店街:十香</p> <p>日式茶具?/ティーセット <br> (成套茶具?/茶飲み道具)<br> (宠物用喂食器/ペット用給餌器)</p> <p>十香を手伝う</p> <h4>3rd day</h4> <p>就在这个班上/このクラスにすればいい</p> <p>借助十香的力量/十香の力を借りる</p> <p>高台:日下部</p> <p>来禅高校⇒踊り場:亜衣</p> <p>保健室:十香</p> <p>瘙痒地狱/くすぐり地獄 <br> (出谜题/クイズを出す) <br> (闻食物的香味/食べ物のにおいをかがせる)</p> <h4>4th day</h4> <p>和十香一起唱歌/十香と一緒に歌う</p> <p>天宮タワー:日下部</p> <p>来禅高校⇒屋上:亜衣</p> <p>保健室:十香</p> <p>胸围・腰围・臀围/バスト・ウエスト・ヒップのこと<br> (体力・智力・敏捷/体力・知力・素早さのこと)<br> (普通・大・特大/並・大盛・特盛のこと)</p> <p>偷偷的到上风处/それとなく風上に立つ <br> (站着吧/じっとしておく)</p> <p>热血激唱!魂之动漫歌曲/熱唱系!魂のアニメソング<br> (开朗阳光☆的偶像歌曲/きゃぴきゃぴ☆のアイドルソング)<br> (日本之心!演歌/日本の心だ!演歌)</p> <mark class="Save">存档02</mark> <p>去帮她/助けてあげる</p> <p>自己靠近/自分から近づく</p> <p>十香END</p> <mark class="Load">读取存档02</mark> <p>就这样看着/そのまま見ている</p> <p>等待十香的话/十香の言葉を待つ</p> <p>十香END(normal)</p> <img src="./files/103509xlzd41a1l4xxzx00.png.thumb.jpg"> </div> <div class="MainRoute 折纸"> <h3>鳶一 折紙</h3> <mark class="Load">读取存档01</mark> <p>折紙とデートする</p> <p>※黙っている</p> <h4>1st day</h4> <p>来禅高校⇒踊り場:美紀恵</p> <p>教室:珠江</p> <p>保健室:折紙</p> <p>老师不在吗?/先生はいないのか?<br> (啊,久等了/やあ、待たせたね)<br> (不、不许动,举起手来!/う、動くな、手を上げろ!)</p> <p>和十香对话/十香と話す</p> <h4>2nd day</h4> <p>来禅高校⇒学校前:美紀恵</p> <p>踊り場:珠江</p> <p>教室:折紙</p> <p>和十香一起约会的梦/十香とデートする夢<br> (和琴里一起洗澡的梦/琴里とお風呂に入る夢)<br> (和殿町一起踏进了禁断之园的梦/殿町との禁断の園に踏み込む夢)</p> <p>折紙を手伝う</p> <h4>3rd day</h4> <p>就在这个班上/このクラスにすればいい</p> <p>折紙に助けを求める</p> <p>来禅高校⇒校舎裏:美紀恵</p> <p>学校前:珠江</p> <p>街へ⇒商店街:折紙</p> <p>笑顔が大事(ポーズが大事)(反骨精神が大事)</p> <h4>4th day</h4> <p>折紙と一緒に歌う</p> <p>来禅高校⇒廊下:美紀恵</p> <p>街へ⇒高台:珠江</p> <p>神社:折紙</p> <p>お参りをする(やっぱり止める)</p> <p>何か世間話をする(気を紛らわすため、ひとりでゲームをする)</p> <p>もう少しこのままでいる(手を引き抜く)</p> <p>今着ている服を直接嗅いだらどうだ?(やっぱり止めておこう)</p> <p>そっと折紙の机に袋を返す(においを嗅いでみる)<br> (いっそ着てみる)</p> <p>すぐに中に踏み込む(しばらくその場にいる)</p> <mark class="Save">存档03</mark> <p>折紙に許しを請う</p> <p>お腹が空いた(そういえば、何か忘れているような……)</p> <p>折紙END</p> <mark class="Load">读取存档03</mark> <p>大声で助けを呼ぶ</p> <p>部屋を片付けたい</p> <p>折紙END(normal)</p> </div> <div class="MainRoute 四糸乃"> <h3>四糸乃</h3> <mark class="Load">读取存档01</mark> <p>次へ⇒ダッシュで帰宅する</p> <p>※黙っている</p> <h4>1st day</h4> <p>来禅高校⇒校舎裏:殿町</p> <p>物理準備室:令音</p> <p>街へ⇒住宅街:四糸乃</p> <p>对了,让她给我鼓劲加油吧/そうだ、応援してもらおう<br> (故意做出白痴的举动,引出她的斥责/わざとアホな行動をして、お叱りの言葉を!)</p> <p>和狂三对话/狂三と話す</p> <h4>2nd day</h4> <p>来禅高校⇒保健室:殿町</p> <p>物理準備室:令音</p> <p>街へ⇒五河家:四糸乃</p> <p>帮她清洗/洗ってあげる<br> (让她自己洗/自分でやってもらう)</p> <p>四糸乃を手伝う</p> <h4>3rd day</h4> <p>就在这个班上/このクラスにすればいい</p> <p>请四糸乃帮忙/四糸乃に協力してもらう</p> <p>来禅高校⇒教室:殿町</p> <p>物理準備室:令音</p> <p>街へ⇒駅前:四糸乃</p> <p>泳衣很适合你哟/その新しい水着似合ってるぞ(今天不是学校泳装啊/今日はスク水じゃないんだな)</p> <h4>4th day</h4> <p>和四糸乃一起唱歌/四糸乃と一緒に歌う</p> <p>来禅高校⇒校舎裏:殿町</p> <p>物理準備室:令音</p> <p>街へ⇒五河家:四糸乃</p> <p>用包容的说辞/包容力をアピールする(用强硬的说辞/力強さをアピールする)</p> <p>没关系/大丈夫だ(确实啊/邪魔だ)</p> <mark class="Save">存档04</mark> <p>说不定就是这样/そうかもしれない</p> <p>更喜欢现在的四糸乃/今の四糸乃が好きだ</p> <p>四糸乃END</p> <mark class="Load">读取存档04</mark> <p>不是这样的/そういう意味じゃない</p> <p>不如说孩子气的四糸乃更好/むしろ子供っぽいのがいいんだ</p> <p>四糸乃END(normal)</p> <img src="./files/103507dk1wk3djzmshl60e.png.thumb.jpg"> </div> <div class="MainRoute 狂三"> <h3>時崎 狂三</h3> <mark class="Load">读取存档01</mark> <p>下一页/次へ⇒直接跑出去/闇雲に走りだす</p> <p>※黙っている</p> <h4>1st day</h4> <p>天宮タワー:神無月</p> <p>商店街:真那</p> <p>公園:狂三</p> <p>萌え萌え☆だんすパフェを注文(横取り客に文句を言う)<br> (禁断の究極技を繰り出す)</p> <p>和四糸乃对话/四糸乃と話す</p> <h4>2nd day</h4> <p>高台:神無月</p> <p>神社:真那</p> <p>来禅高校⇒屋上:狂三</p> <p>狂三に会いたくて(ひとりになりたくて)</p> <p>次へ⇒狂三を手伝う</p> <h4>3rd day</h4> <p>就在这个班上/このクラスにすればいい</p> <p>狂三に相談する</p> <p>神社:神無月</p> <p>天宮タワー:真那</p> <p>住宅街:狂三</p> <p>狂三に中身を聞いてみる(こっそり中を見る)</p> <h4>4th day</h4> <p>狂三と一緒に歌う</p> <p>公園:神無月</p> <p>商店街:真那</p> <p>来禅高校⇒学校前:狂三</p> <p>いやらしい話(勉強の話)(食べ物の話)</p> <p>素直に謝る(静かに様子をうかがう)</p> <p>どうせなら紐もはずしてと頼む(言われるがままサンオイルを塗る)</p> <mark class="Save">存档05</mark> <p>お願いします</p> <p>狂三、助けてくれ!</p> <p>狂三END</p> <mark class="Load">读取存档05</mark> <p>からかうなよ!</p> <p>もう駄目だ……諦めよう</p> <p>狂三END(normal)</p> <img src="./files/103459vfmbo6n7rmj1jr7b.png.thumb.jpg"> </div> <div class="MainRoute 琴里"> <h3>五河 琴里</h3> <mark class="Load">读取存档01</mark> <p>次へ⇒琴里に助けを求める</p> <p>※黙っている</p> <h4>1st day</h4> <p>高台:琴里</p> <p>琴里に注意を促す(いや、ここは俺が様子を見ていよう)</p> <p>下一页⇒和八舞姐妹对话/次へ⇒八舞姉妹と話す</p> <h4>2nd day</h4> <p>住宅街:琴里</p> <p>琴里の手伝いをしよう(ちょっといたずらしちゃおうかな)</p> <p>琴里を手伝う</p> <h4>3rd day</h4> <p>隣のクラスがいいんじゃないか?</p> <p>琴里に協力してもらう</p> <p>来禅高校⇒廊下:琴里</p> <p>思わず甘えたくなる(少しいじめてみたくなった)</p> <h4>4th day</h4> <p>次へ⇒琴里と一緒に歌う</p> <p>住宅街:琴里</p> <p>本を買いに行っていました、と正直に答える<br> (盛り場で遊んできた、と嘘をつく)<br> (婦警さんみたいな可愛い娘を探してたんだよ!) </p> <p>優しくアドバイスする(焚きつけてやる)</p> <p>からかってみる(このまま仕事を続ける)</p> <p>南の島でバカンス(温泉でしっぽり)(ガチ冬山登山)</p> <mark class="Save">存档06</mark> <p>起こさないようにじっとしていよう</p> <p>琴里END</p> <mark class="Load">读取存档06</mark> <p>ちょ、ちょっとぐらいさわってもいいかな?</p> <p>琴里END(normal)</p> </div> <div class="MainRoute 八舞姐妹"> <h3>八舞耶惧矢、八舞夕弦</h3> <mark class="Load">读取存档01</mark> <p>八舞姉妹とデートする</p> <p>※黙っている</p> <h4>1st day</h4> <p>来禅高校⇒学校前:耶惧矢&夕弦</p> <p>耶惧矢、君に決めた!(夕弦、お前しかいない!)</p> <p>次へ⇒琴里と話す(美九と話す)</p> <h4>2nd day</h4> <p>来禅高校⇒校舎裏:耶惧矢&夕弦</p> <p>疲れた振りをしてマッサージをお願いする<br> (買い物に行ってきてもらおう)</p> <p>次へ⇒八舞姉妹を手伝う</p> <h4>3rd day</h4> <p>隣のクラスがいいんじゃないか?</p> <p>八舞姉妹に協力してもらう</p> <p>公園:耶惧矢&夕弦</p> <p>もう少しだけ付き合ってあげる(遊びをやめて家に帰るよう説得する)</p> <h4>4th day</h4> <p>次へ⇒八舞姉妹と一緒に歌う</p> <p>駅前:耶惧矢&夕弦</p> <p>どちらかを選ぶことなんてできない!<br> (耶惧矢を愛してる)(夕弦を愛してる)</p> <p>楽しいよ、それは間違いない(正直言うとよくわからない)</p> <mark class="Save">存档07</mark> <p>耶惧矢と一緒に過ごしたい</p> <p>また二人で遊ぼうか</p> <p>耶惧矢END</p> <mark class="Load">读取存档07</mark> <p>夕弦と一緒に過ごしたい</p> <p>また、夕弦と一緒に</p> <p>夕弦END</p> <mark class="Load">读取存档07</mark> <p>耶惧矢と一緒に過ごしたい</p> <p>今度は夕弦も一緒に……</p> <p>耶惧矢END(normal)</p> <mark class="Load">读取存档07</mark> <p>夕弦と一緒に過ごしたい</p> <p>今度は耶惧矢も一緒に三人で</p> <p>夕弦END(normal)</p> </div> <div class="MainRoute 美九"> <h3>誘宵美九</h3> <mark class="Load">读取存档01</mark> <p>美九とデートする</p> <p>※黙っている</p> <h4>1st day</h4> <p>五河家:美九</p> <p>YES(NO)</p> <p>下一页⇒和八舞姉妹对话/次へ⇒八舞姉妹と話す</p> <h4>2nd day</h4> <p>来禅高校⇒廊下:美九</p> <p>先輩とペアで(自由形で)(背泳ぎで)</p> <p>次へ⇒美九を手伝う</p> <h4>3rd day</h4> <p>隣のクラスがいいんじゃないか?</p> <p>美九に協力してもらう</p> <p>五河家:美九</p> <p>押してみる(押さない)</p> <h4>4th day</h4> <p>次へ⇒美九と一緒に歌う</p> <p>来禅高校⇒教室:美九</p> <p>付き合っている(違う)</p> <p>そうだよ(そりゃ、ちょっとはかわいいと思ってるけどさ)</p> <p>もうちょっと見ていてもいいかな?<br> (早く着替えよう、な?)(ちょっと太ったんじゃないか?)</p> <p>まだ早くないか?(まだ覚悟ができないから)</p> <p>マッサージと見せかけて、全身をくすぐる<br> (狙うは、足だ。足を揉みほぐすぞ)(肩の周りをまんべんなく触る)</p> <mark class="Save">存档08</mark> <p>でも、楽しいよ</p> <p>美九END</p> <mark class="Load">读取存档08</mark> <p>こっちこそ、ごめん</p> <p>美九END(nromal)</p> <img src="./files/103501v5wafrbrvvizfrvi.png.thumb.jpg"> </div> <div class="MainRoute 或守鞠亜"> <h3>或守鞠亜</h3> <p>攻略以上八人后从头开始</p> <p>プロローグをスキップする</p> <p>※頷く</p> <h4>1st day</h4> <p>素直に謝る(言い訳をする)</p> <h4>2nd day</h4> <p>手をつないで歩く(腕を組んで歩く)</p> <h4>3rd day</h4> <p>ほっぺたをつついてみる(揺すって起こしてみる)</p> <p>しっとりおしたバラードを選ぶ(明るいポップスにしよう)</p> <h4>4th day</h4> <p>鞠亜の方へ行ってみる四糸乃の方へ行ってみる)</p> <p>(あえて中央に寄る)</p> <h4>5th day</h4> <p>何かあったのか?(よし、行くぞ!)</p> <p>キスしない(キスする)</p> <p>やっぱりキスしない(キスする)</p> <p>キスをするしかない(キスする)</p> <p>鞠亜END</p> <p><img src="./files/17S7f1168.png">鞠亜リアライズ</p> <p>完成全部真结局后获得</p> </div> <div class="MainRoute 全结局收集"> <!--<p>完成全部普通结局和一个bad end后获得</p>--> <p>从头开始</p> <p>プロローグをスキップする</p> <p>※黙っている</p> <h4>1st day</h4> <p>住宅街:四糸乃</p> <p>わざとアホな行動をして、お叱りの言葉を!</p> <p>和美九对话/美九と話す</p> <h4>2nd day</h4> <p>住宅街:琴里</p> <p>ちょっといたずらしちゃおうかな</p> <p>十香を手伝う</p> <h4>3rd day</h4> <p>隣のクラスがいいんじゃないか?</p> <p>八舞姉妹に協力してもらう</p> <p>商店街:折紙</p> <p>反骨精神が大事</p> <h4>4th day</h4> <p>狂三と一緒に歌う</p> <p>駅前:八舞姉妹</p> <p>どちらかを選ぶことなんてできない!</p> <p>BADEND</p> </div> <div class="MainRoute 全选项收集"> <p>全选择肢收集 看过全部结局后只剩最开始的一个选项了</p> <mark class="Load">读取存档01</mark> <p>次へ⇒次へ⇒タマちゃんに助けを求める</p> <p>回收后结束</p> <mark class="Load">读取存档01</mark> <p>次へ⇒次へ⇒真那に助けを求める</p> <p>回收后结束</p> <mark class="Load">读取存档01</mark> <p>次へ⇒次へ⇒亜衣麻衣美衣とハッスルする</p> <p>回收后结束</p> <mark class="Load">读取存档01</mark> <p>次へ⇒次へ⇒俺には殿町しかいない。心の友よ</p> <p>回收后结束</p> <p>这游戏从我个人而言是十分推荐的,比起一代良心了不是一点点。 虽然主线剧情还是略显薄弱, 但这游戏,压根就不是玩主线的嘛。 就冲着CH社在限界凸记和海王星等游戏上面的名号,这也是一款应景的绅士作品。</p> <img src="./files/103503muv5gufmvglmda45.png.thumb.jpg"> </div> <script> initRoutes(); loadStorage(); toggleIntro(); toggleTarget(); </script> </body> </html>
27.076923
127
0.498489
fb5423f36b7e43b7ade662a02d0a44689954197d
3,499
java
Java
bootique-di/src/test/java/io/bootique/di/OverrideBindingIT.java
bootique/bootique-di
1b4ae0292af0e1fd0d9b8ab6e3fe9933437ee9c2
[ "Apache-2.0" ]
7
2018-04-02T14:53:45.000Z
2022-01-14T16:34:32.000Z
bootique-di/src/test/java/io/bootique/di/OverrideBindingIT.java
bootique/bootique-di
1b4ae0292af0e1fd0d9b8ab6e3fe9933437ee9c2
[ "Apache-2.0" ]
34
2018-04-01T11:33:51.000Z
2021-10-15T07:33:45.000Z
bootique-di/src/test/java/io/bootique/di/OverrideBindingIT.java
bootique/bootique-di
1b4ae0292af0e1fd0d9b8ab6e3fe9933437ee9c2
[ "Apache-2.0" ]
4
2018-04-02T13:27:21.000Z
2020-03-04T08:59:13.000Z
/* * Licensed to ObjectStyle LLC under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ObjectStyle LLC licenses * this file to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package io.bootique.di; import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.assertInstanceOf; import static org.junit.jupiter.api.Assertions.assertThrows; public class OverrideBindingIT { @Test public void testRebind_OverridesDisabled() { assertThrows(DIRuntimeException.class, () -> DIBootstrap.injectorBuilder( binder -> binder.bind(Foo.class).to(FooImpl1.class), binder -> binder.bind(Foo.class).to(FooImpl2.class) ).declaredOverridesOnly().build()); } @Test public void testRebind_OverridesEnabled() { Injector injector = DIBootstrap.injectorBuilder( binder -> binder.bind(Foo.class).to(FooImpl1.class), binder -> binder.bind(Foo.class).to(FooImpl2.class) ).build(); Foo foo = injector.getInstance(Foo.class); assertInstanceOf(FooImpl2.class, foo); } @Test public void testOverride_OverridesDisabled() { Injector injector = DIBootstrap.injectorBuilder( binder -> binder.bind(Foo.class).to(FooImpl1.class), binder -> binder.override(Foo.class).to(FooImpl2.class) ).declaredOverridesOnly().build(); Foo foo = injector.getInstance(Foo.class); assertInstanceOf(FooImpl2.class, foo); } @Test public void testDoubleOverride_OverridesDisabled() { Injector injector = DIBootstrap.injectorBuilder( binder -> binder.bind(Foo.class).to(FooImpl1.class), binder -> binder.override(Foo.class).to(FooImpl2.class), binder -> binder.override(Foo.class).to(FooImpl3.class) ).declaredOverridesOnly().build(); Foo foo = injector.getInstance(Foo.class); assertInstanceOf(FooImpl3.class, foo); } @Test public void testOverride_OverridesEnabled() { Injector injector = DIBootstrap.injectorBuilder( binder -> binder.bind(Foo.class).to(FooImpl1.class), binder -> binder.override(Foo.class).to(FooImpl2.class) ).declaredOverridesOnly().build(); Foo foo = injector.getInstance(Foo.class); assertInstanceOf(FooImpl2.class, foo); } @Test public void testOverride_NoBinding() { assertThrows(DIRuntimeException.class, () -> DIBootstrap .injectorBuilder(binder -> binder.override(Foo.class).to(FooImpl2.class)) .declaredOverridesOnly().build()); } interface Foo { } private static class FooImpl1 implements Foo { } private static class FooImpl2 implements Foo { } private static class FooImpl3 implements Foo { } }
34.303922
89
0.66962
53cbf2de4c9076dfd3255933264620cd547b4f3a
3,375
java
Java
validator/src/main/java/com/wildbeeslabs/sensiblemetrics/diffy/validator/digits/impl/ISBN10DigitValidator.java
AlexRogalskiy/Comparalyzer
42a03c14d639663387e7b796dca41cb1300ad36b
[ "MIT" ]
1
2019-02-27T00:28:14.000Z
2019-02-27T00:28:14.000Z
validator/src/main/java/com/wildbeeslabs/sensiblemetrics/diffy/validator/digits/impl/ISBN10DigitValidator.java
AlexRogalskiy/Comparalyzer
42a03c14d639663387e7b796dca41cb1300ad36b
[ "MIT" ]
8
2019-11-13T09:02:17.000Z
2021-12-09T20:49:03.000Z
validator/src/main/java/com/wildbeeslabs/sensiblemetrics/diffy/validator/digits/impl/ISBN10DigitValidator.java
AlexRogalskiy/Diffy
42a03c14d639663387e7b796dca41cb1300ad36b
[ "MIT" ]
1
2019-02-01T08:48:24.000Z
2019-02-01T08:48:24.000Z
/* * The MIT License * * Copyright 2019 WildBees Labs, Inc. * * 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. */ package com.wildbeeslabs.sensiblemetrics.diffy.validator.digits.impl; import com.wildbeeslabs.sensiblemetrics.diffy.processor.digits.impl.ISBN10DigitProcessor; import com.wildbeeslabs.sensiblemetrics.diffy.validator.digits.iface.DigitValidator; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; /** * Modulus 11 <b>ISBN-10</b> Check Digit calculation/validation. * <p> * ISBN-10 Numbers are a numeric code except for the last (check) digit * which can have a value of "X". * <p> * Check digit calculation is based on <i>modulus 11</i> with digits being weighted * based by their position, from right to left with the first digit being weighted * 1, the second 2 and so on. If the check digit is calculated as "10" it is converted * to "X". * <p> * <b>N.B.</b> From 1st January 2007 the book industry will start to use a new 13 digit * ISBN number (rather than this 10 digit ISBN number) which uses the EAN-13 / UPC * (see {@link EAN13DigitValidator}) standard. * <p> * For further information see: * <ul> * <li><a href="http://en.wikipedia.org/wiki/ISBN">Wikipedia - International * Standard Book Number (ISBN)</a>.</li> * <li><a href="http://www.isbn.org/standards/home/isbn/transition.asp">ISBN-13 * Transition details</a>.</li> * </ul> * * @version $Revision: 1739356 $ * @since Validator 1.4 */ /** * Isbn10 {@link BaseDigitValidator} implementation */ @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) public final class ISBN10DigitValidator extends BaseDigitValidator { /** * Default explicit serialVersionUID for interoperability */ private static final long serialVersionUID = -4526411926089151556L; /** * Singleton ISBN-10 Check Digit instance */ private static final DigitValidator ISBN10_CHECK_DIGIT = new ISBN10DigitValidator(); /** * Construct a modulus 11 Check Digit routine for ISBN-10. */ public ISBN10DigitValidator() { super(new ISBN10DigitProcessor()); } /** * Returns {@link DigitValidator} instance * * @return {@link DigitValidator} instance */ public static DigitValidator getInstance() { return ISBN10_CHECK_DIGIT; } }
36.290323
89
0.724741
f0bee314a89c25ea49abe2d71f7dd14bd59259db
427
swift
Swift
Swift/Projects/Cache/MYPCache/MYPCacheTests/Student.swift
sky15179/Language
85e84b3e99c47a01c51e44f1f191c306b4328c82
[ "MIT" ]
null
null
null
Swift/Projects/Cache/MYPCache/MYPCacheTests/Student.swift
sky15179/Language
85e84b3e99c47a01c51e44f1f191c306b4328c82
[ "MIT" ]
null
null
null
Swift/Projects/Cache/MYPCache/MYPCacheTests/Student.swift
sky15179/Language
85e84b3e99c47a01c51e44f1f191c306b4328c82
[ "MIT" ]
null
null
null
// // Student.swift // MYPCacheTests // // Created by 王智刚 on 2017/11/1. // Copyright © 2017年 王智刚. All rights reserved. // import Foundation struct Student: Codable, Equatable { let name: String let age: Int enum CodingKeys: String, CodingKey { case name = "myp_name" case age } } func == (lhs: Student, rhs: Student) -> Bool { return lhs.name == rhs.name && rhs.age == lhs.age }
17.791667
53
0.606557
64d3570d1e05bd015650531dd2a2bd3f69a1ecbb
48,370
java
Java
msgcntr/messageforums-component-impl/src/java/org/sakaiproject/component/app/messageforums/PermissionManagerImpl.java
hsteller/sakai
2d120173a606ec2afbb9724530d38d3c45b1a24c
[ "ECL-2.0" ]
null
null
null
msgcntr/messageforums-component-impl/src/java/org/sakaiproject/component/app/messageforums/PermissionManagerImpl.java
hsteller/sakai
2d120173a606ec2afbb9724530d38d3c45b1a24c
[ "ECL-2.0" ]
null
null
null
msgcntr/messageforums-component-impl/src/java/org/sakaiproject/component/app/messageforums/PermissionManagerImpl.java
hsteller/sakai
2d120173a606ec2afbb9724530d38d3c45b1a24c
[ "ECL-2.0" ]
null
null
null
/********************************************************************************** * $URL: https://source.sakaiproject.org/svn/msgcntr/trunk/messageforums-component-impl/src/java/org/sakaiproject/component/app/messageforums/PermissionManagerImpl.java $ * $Id: PermissionManagerImpl.java 9227 2006-05-15 15:02:42Z cwen@iupui.edu $ *********************************************************************************** * * Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008 The Sakai Foundation * * Licensed under the Educational Community 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.opensource.org/licenses/ECL-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * **********************************************************************************/ package org.sakaiproject.component.app.messageforums; import lombok.extern.slf4j.Slf4j; import org.hibernate.Query; import org.hibernate.type.BooleanType; import org.hibernate.type.StringType; import org.springframework.orm.hibernate5.HibernateCallback; import org.springframework.orm.hibernate5.support.HibernateDaoSupport; import org.sakaiproject.api.app.messageforums.Area; import org.sakaiproject.api.app.messageforums.AreaControlPermission; import org.sakaiproject.api.app.messageforums.AreaManager; import org.sakaiproject.api.app.messageforums.BaseForum; import org.sakaiproject.api.app.messageforums.ControlPermissions; import org.sakaiproject.api.app.messageforums.DefaultPermissionsManager; import org.sakaiproject.api.app.messageforums.DiscussionForumService; import org.sakaiproject.api.app.messageforums.ForumControlPermission; import org.sakaiproject.api.app.messageforums.MessageForumsTypeManager; import org.sakaiproject.api.app.messageforums.MessagePermissions; import org.sakaiproject.api.app.messageforums.PermissionManager; import org.sakaiproject.api.app.messageforums.Topic; import org.sakaiproject.api.app.messageforums.TopicControlPermission; import org.sakaiproject.component.app.messageforums.dao.hibernate.AreaControlPermissionImpl; import org.sakaiproject.component.app.messageforums.dao.hibernate.ControlPermissionsImpl; import org.sakaiproject.component.app.messageforums.dao.hibernate.ForumControlPermissionImpl; import org.sakaiproject.component.app.messageforums.dao.hibernate.MessagePermissionsImpl; import org.sakaiproject.component.app.messageforums.dao.hibernate.TopicControlPermissionImpl; import org.sakaiproject.event.api.EventTrackingService; import org.sakaiproject.id.api.IdManager; import org.sakaiproject.tool.api.Placement; import org.sakaiproject.tool.api.SessionManager; import org.sakaiproject.tool.api.ToolManager; @Slf4j public class PermissionManagerImpl extends HibernateDaoSupport implements PermissionManager { private static final String QUERY_CP_BY_ROLE = "findAreaControlPermissionByRole"; private static final String QUERY_CP_BY_FORUM = "findForumControlPermissionByRole"; private static final String QUERY_CP_BY_TOPIC = "findTopicControlPermissionByRole"; private static final String QUERY_MP_BY_ROLE = "findAreaMessagePermissionByRole"; private static final String QUERY_MP_BY_FORUM = "findForumMessagePermissionByRole"; private static final String QUERY_MP_BY_TOPIC = "findTopicMessagePermissionByRole"; private IdManager idManager; private SessionManager sessionManager; private MessageForumsTypeManager typeManager; private AreaManager areaManager; private EventTrackingService eventTrackingService; private DefaultPermissionsManager defaultPermissionsManager; private ToolManager toolManager; public void init() { log.info("init()"); ; } public EventTrackingService getEventTrackingService() { return eventTrackingService; } public void setEventTrackingService(EventTrackingService eventTrackingService) { this.eventTrackingService = eventTrackingService; } public AreaManager getAreaManager() { return areaManager; } public void setAreaManager(AreaManager areaManager) { this.areaManager = areaManager; } public void setToolManager(ToolManager toolManager) { this.toolManager = toolManager; } public MessageForumsTypeManager getTypeManager() { return typeManager; } public void setTypeManager(MessageForumsTypeManager typeManager) { this.typeManager = typeManager; } public void setSessionManager(SessionManager sessionManager) { this.sessionManager = sessionManager; } public IdManager getIdManager() { return idManager; } public SessionManager getSessionManager() { return sessionManager; } public void setIdManager(IdManager idManager) { this.idManager = idManager; } /** * @param defaultPermissionsManager The defaultPermissionsManager to set. */ public void setDefaultPermissionsManager( DefaultPermissionsManager defaultPermissionManager) { this.defaultPermissionsManager = defaultPermissionManager; } public AreaControlPermission getAreaControlPermissionForRole(String role, String typeId) { ControlPermissions permissions = getAreaControlPermissionByRoleAndType(role, typeId, false); AreaControlPermission cp = new AreaControlPermissionImpl(); if (permissions == null) { // cp.setChangeSettings(Boolean.FALSE); // cp.setMovePostings(Boolean.FALSE); // cp.setNewForum(Boolean.FALSE); // cp.setNewResponse(Boolean.FALSE); // cp.setNewTopic(Boolean.FALSE); // cp.setResponseToResponse(Boolean.FALSE); // cp.setPostToGradebook(Boolean.FALSE); return getDefaultAreaControlPermissionForRole(role, typeId); } else { cp.setPostToGradebook(permissions.getPostToGradebook()); cp.setChangeSettings(permissions.getChangeSettings()); cp.setMovePostings(permissions.getMovePostings()); cp.setNewForum(permissions.getNewForum()); cp.setNewResponse(permissions.getNewResponse()); cp.setNewTopic(permissions.getNewTopic()); cp.setResponseToResponse(permissions.getResponseToResponse()); } cp.setRole(role); return cp; } public AreaControlPermission getDefaultAreaControlPermissionForRole(String role, String typeId) { // ControlPermissions permissions = getAreaControlPermissionByRoleAndType(role, typeId, true); AreaControlPermission cp = new AreaControlPermissionImpl(); // if (permissions == null) { // cp.setChangeSettings(Boolean.FALSE); // cp.setMovePostings(Boolean.FALSE); // cp.setNewForum(Boolean.FALSE); // cp.setNewResponse(Boolean.FALSE); // cp.setNewTopic(Boolean.FALSE); // cp.setResponseToResponse(Boolean.FALSE); // cp.setPostToGradebook(Boolean.FALSE); // } else { // cp.setChangeSettings(permissions.getChangeSettings()); // cp.setMovePostings(permissions.getMovePostings()); // cp.setNewForum(permissions.getNewForum()); // cp.setNewResponse(permissions.getNewResponse()); // cp.setNewTopic(permissions.getNewTopic()); // cp.setResponseToResponse(permissions.getResponseToResponse()); // cp.setPostToGradebook(permissions.getPostToGradebook()); // } cp.setChangeSettings(Boolean.valueOf(defaultPermissionsManager.isChangeSettings(role))); cp.setMovePostings(Boolean.valueOf(defaultPermissionsManager.isMovePostings(role))); cp.setNewForum(Boolean.valueOf(defaultPermissionsManager.isNewForum(role))); cp.setNewResponse(Boolean.valueOf(defaultPermissionsManager.isNewResponse(role))); cp.setNewTopic(Boolean.valueOf(defaultPermissionsManager.isNewTopic(role))); cp.setResponseToResponse(Boolean.valueOf(defaultPermissionsManager.isResponseToResponse(role))); cp.setPostToGradebook(Boolean.valueOf(defaultPermissionsManager.isPostToGradebook(role))); cp.setRole(role); return cp; } public AreaControlPermission createAreaControlPermissionForRole(String role, String typeId) { AreaControlPermission permission = new AreaControlPermissionImpl(); AreaControlPermission acp = getDefaultAreaControlPermissionForRole(role, typeId); permission.setChangeSettings(acp.getChangeSettings()); permission.setMovePostings(acp.getMovePostings()); permission.setNewForum(acp.getNewForum()); permission.setNewResponse(acp.getNewResponse()); permission.setNewTopic(acp.getNewTopic()); permission.setResponseToResponse(acp.getResponseToResponse()); permission.setPostToGradebook(acp.getPostToGradebook()); permission.setRole(role); return permission; } public void saveAreaControlPermissionForRole(Area area, AreaControlPermission permission, String typeId) { ControlPermissions permissions = getAreaControlPermissionByRoleAndType(permission.getRole(), typeId, false); if (permissions == null) { permissions = new ControlPermissionsImpl(); } boolean isNew = permissions.getId() == null; permissions.setArea(area); permissions.setDefaultValue(Boolean.FALSE); permissions.setChangeSettings(permission.getChangeSettings()); permissions.setMovePostings(permission.getMovePostings()); permissions.setNewForum(permission.getNewForum()); permissions.setNewResponse(permission.getNewResponse()); permissions.setNewTopic(permission.getNewTopic()); permissions.setResponseToResponse(permission.getResponseToResponse()); permissions.setPostToGradebook(permission.getPostToGradebook()); permissions.setRole(permission.getRole()); getHibernateTemplate().saveOrUpdate(permissions); // Commented out when splitting events between Messages tool and Forums tool // if (isNew) { // eventTrackingService.post(eventTrackingService.newEvent(DiscussionForumService.EVENT_RESOURCE_ADD, getEventMessage(area, permissions), false)); // } else { // eventTrackingService.post(eventTrackingService.newEvent(DiscussionForumService.EVENT_RESOURCE_WRITE, getEventMessage(area, permissions), false)); // } } public void saveDefaultAreaControlPermissionForRole(Area area, AreaControlPermission permission, String typeId) { ControlPermissions permissions = getAreaControlPermissionByRoleAndType(permission.getRole(), typeId, true); if (permissions == null) { permissions = new ControlPermissionsImpl(); } boolean isNew = permissions.getId() == null; permissions.setArea(area); permissions.setDefaultValue(Boolean.TRUE); permissions.setChangeSettings(permission.getChangeSettings()); permissions.setMovePostings(permission.getMovePostings()); permissions.setNewForum(permission.getNewForum()); permissions.setNewResponse(permission.getNewResponse()); permissions.setNewTopic(permission.getNewTopic()); permissions.setResponseToResponse(permission.getResponseToResponse()); permissions.setPostToGradebook(permission.getPostToGradebook()); permissions.setRole(permission.getRole()); getHibernateTemplate().saveOrUpdate(permissions); // Commented out when splitting events between Messages tool and Forums tool // if (isNew) { // eventTrackingService.post(eventTrackingService.newEvent(DiscussionForumService.EVENT_RESOURCE_ADD, getEventMessage(area, permissions), false)); // } else { // eventTrackingService.post(eventTrackingService.newEvent(DiscussionForumService.EVENT_RESOURCE_WRITE, getEventMessage(area, permissions), false)); // } } public ForumControlPermission getForumControlPermissionForRole(BaseForum forum, String role, String typeId) { ControlPermissions permissions = forum == null || forum.getId() == null ? null : getControlPermissionByKeyValue(role, "forumId", forum.getId().toString(), false); ForumControlPermission cp = new ForumControlPermissionImpl(); if (permissions == null) { return null; } else { cp.setChangeSettings(permissions.getChangeSettings()); cp.setMovePostings(permissions.getMovePostings()); cp.setNewResponse(permissions.getNewResponse()); cp.setNewTopic(permissions.getNewTopic()); cp.setPostToGradebook(permissions.getPostToGradebook()); cp.setResponseToResponse(permissions.getResponseToResponse()); } cp.setRole(role); return cp; } public ForumControlPermission getDefaultForumControlPermissionForRole(BaseForum forum, String role, String typeId) { ControlPermissions permissions = forum == null || forum.getId() == null ? null : getControlPermissionByKeyValue(role, "forumId", forum.getId().toString(), true); ForumControlPermission cp = new ForumControlPermissionImpl(); if (permissions == null) { return null; } else { cp.setPostToGradebook(permissions.getPostToGradebook()); cp.setChangeSettings(permissions.getChangeSettings()); cp.setMovePostings(permissions.getMovePostings()); cp.setNewResponse(permissions.getNewResponse()); cp.setNewTopic(permissions.getNewTopic()); cp.setResponseToResponse(permissions.getResponseToResponse()); } cp.setRole(role); return cp; } public ForumControlPermission createForumControlPermissionForRole(String role, String typeId) { ForumControlPermission permission = new ForumControlPermissionImpl(); AreaControlPermission acp = getAreaControlPermissionForRole(role, typeId); permission.setChangeSettings(acp.getChangeSettings()); permission.setMovePostings(acp.getMovePostings()); permission.setNewResponse(acp.getNewResponse()); permission.setNewTopic(acp.getNewTopic()); permission.setResponseToResponse(acp.getResponseToResponse()); permission.setPostToGradebook(acp.getPostToGradebook()); permission.setRole(role); return permission; } public void saveForumControlPermissionForRole(BaseForum forum, ForumControlPermission permission) { ControlPermissions permissions = forum == null || forum.getId() == null ? null : getControlPermissionByKeyValue(permission.getRole(), "forumId", forum.getId().toString(), false); if (permissions == null) { permissions = new ControlPermissionsImpl(); } boolean isNew = permissions.getId() == null; permissions.setForum(forum); permissions.setDefaultValue(Boolean.FALSE); permissions.setChangeSettings(permission.getChangeSettings()); permissions.setMovePostings(permission.getMovePostings()); permissions.setNewForum(Boolean.FALSE); permissions.setNewResponse(permission.getNewResponse()); permissions.setPostToGradebook(permission.getPostToGradebook()); permissions.setNewTopic(permission.getNewTopic()); permissions.setResponseToResponse(permission.getResponseToResponse()); permissions.setRole(permission.getRole()); getHibernateTemplate().saveOrUpdate(permissions); if (eventTrackingService == null) // SAK-12988 throw new RuntimeException("eventTrackingService is null!"); if (isNew) { eventTrackingService.post(eventTrackingService.newEvent(DiscussionForumService.EVENT_FORUMS_FORUM_ADD, getEventMessage(forum, permissions), false)); } else { eventTrackingService.post(eventTrackingService.newEvent(DiscussionForumService.EVENT_FORUMS_FORUM_REVISE, getEventMessage(forum, permissions), false)); } } public void saveDefaultForumControlPermissionForRole(BaseForum forum, ForumControlPermission permission) { ControlPermissions permissions = forum == null || forum.getId() == null ? null : getControlPermissionByKeyValue(permission.getRole(), "forumId", forum.getId().toString(), false); if (permissions == null) { permissions = new ControlPermissionsImpl(); } boolean isNew = permissions.getId() == null; permissions.setForum(forum); permissions.setDefaultValue(Boolean.TRUE); permissions.setChangeSettings(permission.getChangeSettings()); permissions.setMovePostings(permission.getMovePostings()); permissions.setNewForum(Boolean.FALSE); permissions.setNewResponse(permission.getNewResponse()); permissions.setPostToGradebook(permission.getPostToGradebook()); permissions.setNewTopic(permission.getNewTopic()); permissions.setResponseToResponse(permission.getResponseToResponse()); permissions.setRole(permission.getRole()); getHibernateTemplate().saveOrUpdate(permissions); if (eventTrackingService == null) // SAK-12988 throw new RuntimeException("eventTrackingService is null!"); if (isNew) { eventTrackingService.post(eventTrackingService.newEvent(DiscussionForumService.EVENT_FORUMS_FORUM_ADD, getEventMessage(forum, permissions), false)); } else { eventTrackingService.post(eventTrackingService.newEvent(DiscussionForumService.EVENT_FORUMS_FORUM_REVISE, getEventMessage(forum, permissions), false)); } } public TopicControlPermission getTopicControlPermissionForRole(Topic topic, String role, String typeId) { ControlPermissions permissions = topic == null || topic.getId() == null ? null : getControlPermissionByKeyValue(role, "topicId", topic.getId().toString(), false); TopicControlPermission cp = new TopicControlPermissionImpl(); if (permissions == null) { return null; } else { cp.setChangeSettings(permissions.getChangeSettings()); cp.setMovePostings(permissions.getMovePostings()); cp.setNewResponse(permissions.getNewResponse()); cp.setResponseToResponse(permissions.getResponseToResponse()); cp.setPostToGradebook(permissions.getPostToGradebook()); } cp.setRole(role); return cp; } public TopicControlPermission getDefaultTopicControlPermissionForRole(Topic topic, String role, String typeId) { ControlPermissions permissions = topic == null || topic.getId() == null ? null : getControlPermissionByKeyValue(role, "topicId", topic.getId().toString(), true); TopicControlPermission cp = new TopicControlPermissionImpl(); if (permissions == null) { return null; } else { cp.setPostToGradebook(permissions.getPostToGradebook()); cp.setChangeSettings(permissions.getChangeSettings()); cp.setMovePostings(permissions.getMovePostings()); cp.setNewResponse(permissions.getNewResponse()); cp.setResponseToResponse(permissions.getResponseToResponse()); } cp.setRole(role); return cp; } public TopicControlPermission createTopicControlPermissionForRole(BaseForum forum, String role, String typeId) { TopicControlPermission permission = new TopicControlPermissionImpl(); ForumControlPermission fcp = getForumControlPermissionForRole(forum, role, typeId); permission.setChangeSettings(fcp.getChangeSettings()); permission.setMovePostings(fcp.getMovePostings()); permission.setNewResponse(fcp.getNewResponse()); permission.setResponseToResponse(fcp.getResponseToResponse()); permission.setPostToGradebook(fcp.getPostToGradebook()); permission.setRole(role); return permission; } public void saveTopicControlPermissionForRole(Topic topic, TopicControlPermission permission) { ControlPermissions permissions = topic == null || topic.getId() == null ? null : getControlPermissionByKeyValue(permission.getRole(), "topicId", topic.getId().toString(), false); if (permissions == null) { permissions = new ControlPermissionsImpl(); } boolean isNew = permissions.getId() == null; permissions.setTopic(topic); permissions.setDefaultValue(Boolean.FALSE); permissions.setChangeSettings(permission.getChangeSettings()); permissions.setMovePostings(permission.getMovePostings()); permissions.setNewForum(Boolean.FALSE); permissions.setNewResponse(permission.getNewResponse()); permissions.setNewTopic(Boolean.FALSE); permissions.setPostToGradebook(permission.getPostToGradebook()); permissions.setResponseToResponse(permission.getResponseToResponse()); permissions.setRole(permission.getRole()); getHibernateTemplate().saveOrUpdate(permissions); if (eventTrackingService == null) // SAK-12988 throw new RuntimeException("eventTrackingService is null!"); if (isNew) { eventTrackingService.post(eventTrackingService.newEvent(DiscussionForumService.EVENT_FORUMS_TOPIC_ADD, getEventMessage(topic, permissions), false)); } else { eventTrackingService.post(eventTrackingService.newEvent(DiscussionForumService.EVENT_FORUMS_TOPIC_REVISE, getEventMessage(topic, permissions), false)); } } public void saveDefaultTopicControlPermissionForRole(Topic topic, TopicControlPermission permission) { ControlPermissions permissions = topic == null || topic.getId() == null ? null : getControlPermissionByKeyValue(permission.getRole(), "topicId", topic.getId().toString(), false); if (permissions == null) { permissions = new ControlPermissionsImpl(); } boolean isNew = permissions.getId() == null; permissions.setTopic(topic); permissions.setDefaultValue(Boolean.TRUE); permissions.setChangeSettings(permission.getChangeSettings()); permissions.setMovePostings(permission.getMovePostings()); permissions.setNewForum(Boolean.FALSE); permissions.setNewResponse(permission.getNewResponse()); permissions.setNewTopic(Boolean.FALSE); permissions.setResponseToResponse(permission.getResponseToResponse()); permissions.setPostToGradebook(permission.getPostToGradebook()); permissions.setRole(permission.getRole()); getHibernateTemplate().saveOrUpdate(permissions); if (eventTrackingService == null) // SAK-12988 throw new RuntimeException("eventTrackingService is null!"); if (isNew) { eventTrackingService.post(eventTrackingService.newEvent(DiscussionForumService.EVENT_FORUMS_TOPIC_ADD, getEventMessage(topic, permissions), false)); } else { eventTrackingService.post(eventTrackingService.newEvent(DiscussionForumService.EVENT_FORUMS_TOPIC_REVISE, getEventMessage(topic, permissions), false)); } } public ControlPermissions getAreaControlPermissionByRoleAndType(final String roleId, final String typeId, final boolean defaultValue) { log.debug("getAreaControlPermissionByRole executing for current user: " + getCurrentUser()); final Area area = areaManager.getAreaByContextIdAndTypeId(typeId); if (area == null) { return null; } HibernateCallback<ControlPermissions> hcb = session -> { Query q = session.getNamedQuery(QUERY_CP_BY_ROLE); q.setParameter("roleId", roleId, StringType.INSTANCE); q.setParameter("areaId", area.getId().toString(), StringType.INSTANCE); q.setParameter("defaultValue", defaultValue, BooleanType.INSTANCE); return (ControlPermissions) q.uniqueResult(); }; return getHibernateTemplate().execute(hcb); } private ControlPermissions getControlPermissionByKeyValue(final String roleId, final String key, final String value, final boolean defaultValue) { log.debug("getAreaControlPermissionByRole executing for current user: " + getCurrentUser()); HibernateCallback<ControlPermissions> hcb = session -> { String queryString = "forumId".equals(key) ? QUERY_CP_BY_FORUM : QUERY_CP_BY_TOPIC; Query q = session.getNamedQuery(queryString); q.setParameter("roleId", roleId, StringType.INSTANCE); q.setParameter(key, value, StringType.INSTANCE); q.setParameter("defaultValue", defaultValue, BooleanType.INSTANCE); return (ControlPermissions) q.uniqueResult(); }; return getHibernateTemplate().execute(hcb); } private MessagePermissions getMessagePermissionByKeyValue(final String roleId, final String key, final String value, final boolean defaultValue) { log.debug("getAreaMessagePermissionByRole executing for current user: " + getCurrentUser()); HibernateCallback<MessagePermissions> hcb = session -> { String queryString = "forumId".equals(key) ? QUERY_MP_BY_FORUM : QUERY_MP_BY_TOPIC; Query q = session.getNamedQuery(queryString); q.setParameter("roleId", roleId, StringType.INSTANCE); q.setParameter(key, value, StringType.INSTANCE); q.setParameter("defaultValue", defaultValue, BooleanType.INSTANCE); return (MessagePermissions) q.uniqueResult(); }; return getHibernateTemplate().execute(hcb); } /** * Get the area message permission for a given role. This provides the permissions * that the role currently has. */ public MessagePermissions getAreaMessagePermissionForRole(String role, String typeId) { MessagePermissions permissions = getAreaMessagePermissionByRoleAndType(role, typeId, false); MessagePermissions mp = new MessagePermissionsImpl(); if (permissions == null) { // mp.setDeleteAny(Boolean.FALSE); // mp.setDeleteOwn(Boolean.FALSE); // mp.setRead(Boolean.FALSE); // mp.setReadDrafts(Boolean.FALSE); // mp.setReviseAny(Boolean.FALSE); // mp.setReviseOwn(Boolean.FALSE); // mp.setMarkAsRead(Boolean.FALSE); return getDefaultAreaMessagePermissionForRole(role, typeId); } else { mp.setDeleteAny(permissions.getDeleteAny()); mp.setDeleteOwn(permissions.getDeleteOwn()); mp.setRead(permissions.getRead()); mp.setReadDrafts(permissions.getReadDrafts()); mp.setReviseAny(permissions.getReviseAny()); mp.setReviseOwn(permissions.getReviseOwn()); mp.setMarkAsRead(permissions.getMarkAsRead()); } mp.setRole(role); return mp; } /** * Get the default area message permission for a given role. This provides the * permissions that the role currently has. */ public MessagePermissions getDefaultAreaMessagePermissionForRole(String role, String typeId) { // MessagePermissions permissions = getAreaMessagePermissionByRoleAndType(role, typeId, true); MessagePermissions mp = new MessagePermissionsImpl(); // if (permissions == null) { // mp.setDeleteAny(Boolean.FALSE); // mp.setDeleteOwn(Boolean.FALSE); // mp.setRead(Boolean.FALSE); // mp.setReadDrafts(Boolean.FALSE); // mp.setReviseAny(Boolean.FALSE); // mp.setReviseOwn(Boolean.FALSE); // mp.setMarkAsRead(Boolean.FALSE); // } else { // mp.setDeleteAny(permissions.getDeleteAny()); // mp.setDeleteOwn(permissions.getDeleteOwn()); // mp.setRead(permissions.getRead()); // mp.setReadDrafts(permissions.getReadDrafts()); // mp.setReviseAny(permissions.getReviseAny()); // mp.setReviseOwn(permissions.getReviseOwn()); // mp.setMarkAsRead(permissions.getMarkAsRead()); // } mp.setRole(role); mp.setDeleteAny(Boolean.valueOf(defaultPermissionsManager.isDeleteAny(role))); mp.setDeleteOwn(Boolean.valueOf(defaultPermissionsManager.isDeleteOwn(role))); mp.setRead(Boolean.valueOf(defaultPermissionsManager.isRead(role))); mp.setReadDrafts(Boolean.valueOf(false)); mp.setReviseAny(Boolean.valueOf(defaultPermissionsManager.isReviseAny(role))); mp.setReviseOwn(Boolean.valueOf(defaultPermissionsManager.isReviseOwn(role))); mp.setMarkAsRead(Boolean.valueOf(defaultPermissionsManager.isMarkAsRead(role))); return mp; } /** * Create an empty area message permission with system properties * populated (ie: uuid). */ public MessagePermissions createAreaMessagePermissionForRole(String role, String typeId) { MessagePermissions permissions = new MessagePermissionsImpl(); MessagePermissions mp = getDefaultAreaMessagePermissionForRole(role, typeId); if (mp != null) { permissions.setDefaultValue(mp.getDefaultValue()); permissions.setDeleteAny(mp.getDeleteAny()); permissions.setDeleteOwn(mp.getDeleteOwn()); permissions.setRead(mp.getRead()); permissions.setReadDrafts(mp.getReadDrafts()); permissions.setReviseAny(mp.getReviseAny()); permissions.setReviseOwn(mp.getReviseOwn()); permissions.setMarkAsRead(mp.getMarkAsRead()); permissions.setRole(role); } return permissions; } /** * Save an area message permission. This is backed in the database by a single * message permission (used for areas, forums, and topics). */ public void saveAreaMessagePermissionForRole(Area area, MessagePermissions permission, String typeId) { MessagePermissions permissions = getAreaMessagePermissionByRoleAndType(permission.getRole(), typeId, false); if (permissions == null) { permissions = new MessagePermissionsImpl(); } boolean isNew = permissions.getId() == null; permissions.setArea(area); permissions.setDefaultValue(Boolean.FALSE); permissions.setDeleteAny(permission.getDeleteAny()); permissions.setDeleteOwn(permission.getDeleteOwn()); permissions.setRead(permission.getRead()); permissions.setReadDrafts(permission.getReadDrafts()); permissions.setReviseAny(permission.getReviseAny()); permissions.setReviseOwn(permission.getReviseOwn()); permissions.setRole(permission.getRole()); permissions.setMarkAsRead(permission.getMarkAsRead()); getHibernateTemplate().saveOrUpdate(permissions); // Commented out when splitting events between Messages tool and Forums tool // if (isNew) { // eventTrackingService.post(eventTrackingService.newEvent(DiscussionForumService.EVENT_RESOURCE_ADD, getEventMessage(area, permissions), false)); // } else { // eventTrackingService.post(eventTrackingService.newEvent(DiscussionForumService.EVENT_RESOURCE_WRITE, getEventMessage(area, permissions), false)); // } } /** * Save a default area message permission. This is backed in the database by a * single message permission (used for areas, forums, and topics). */ public void saveDefaultAreaMessagePermissionForRole(Area area, MessagePermissions permission, String typeId) { MessagePermissions permissions = getAreaMessagePermissionByRoleAndType(permission.getRole(), typeId, true); if (permissions == null) { permissions = new MessagePermissionsImpl(); } boolean isNew = permissions.getId() == null; permissions.setArea(area); permissions.setDefaultValue(Boolean.TRUE); permissions.setDeleteAny(permission.getDeleteAny()); permissions.setDeleteOwn(permission.getDeleteOwn()); permissions.setRead(permission.getRead()); permissions.setReadDrafts(permission.getReadDrafts()); permissions.setReviseAny(permission.getReviseAny()); permissions.setReviseOwn(permission.getReviseOwn()); permissions.setMarkAsRead(permission.getMarkAsRead()); permissions.setRole(permission.getRole()); getHibernateTemplate().saveOrUpdate(permissions); // Commented out when splitting events between Messages tool and Forums tool // if (isNew) { // eventTrackingService.post(eventTrackingService.newEvent(DiscussionForumService.EVENT_RESOURCE_ADD, getEventMessage(area, permissions), false)); // } else { // eventTrackingService.post(eventTrackingService.newEvent(DiscussionForumService.EVENT_RESOURCE_WRITE, getEventMessage(area, permissions), false)); // } } /** * Get the forum message permission for a given role. This provides the permissions * that the role currently has. */ public MessagePermissions getForumMessagePermissionForRole(BaseForum forum, String role, String typeId) { MessagePermissions permissions = forum == null || forum.getId() == null ? null : getMessagePermissionByKeyValue(role, "forumId", forum.getId().toString(), false); MessagePermissions mp = new MessagePermissionsImpl(); if (permissions == null) { return null; } else { mp.setDeleteAny(permissions.getDeleteAny()); mp.setDeleteOwn(permissions.getDeleteOwn()); mp.setRead(permissions.getRead()); mp.setReadDrafts(permissions.getReadDrafts()); mp.setReviseAny(permissions.getReviseAny()); mp.setReviseOwn(permissions.getReviseOwn()); mp.setMarkAsRead(permissions.getMarkAsRead()); } mp.setRole(role); return mp; } /** * Get the default forum message permission for a given role. This provides the * permissions that the role currently has. */ public MessagePermissions getDefaultForumMessagePermissionForRole(BaseForum forum, String role, String typeId) { MessagePermissions permissions = forum == null || forum.getId() == null ? null : getMessagePermissionByKeyValue(role, "forumId", forum.getId().toString(), true); MessagePermissions mp = new MessagePermissionsImpl(); if (permissions == null) { return null; } else { mp.setDeleteAny(permissions.getDeleteAny()); mp.setDeleteOwn(permissions.getDeleteOwn()); mp.setRead(permissions.getRead()); mp.setReadDrafts(permissions.getReadDrafts()); mp.setReviseAny(permissions.getReviseAny()); mp.setReviseOwn(permissions.getReviseOwn()); mp.setMarkAsRead(permissions.getMarkAsRead()); } mp.setRole(role); return mp; } /** * Create an empty forum message permission with system properties * populated (ie: uuid). */ public MessagePermissions createForumMessagePermissionForRole(String role, String typeId) { MessagePermissions permissions = new MessagePermissionsImpl(); MessagePermissions mp = getAreaMessagePermissionForRole(role, typeId); if (mp != null) { permissions.setDefaultValue(mp.getDefaultValue()); permissions.setDeleteAny(mp.getDeleteAny()); permissions.setDeleteOwn(mp.getDeleteOwn()); permissions.setRead(mp.getRead()); permissions.setReadDrafts(mp.getReadDrafts()); permissions.setReviseAny(mp.getReviseAny()); permissions.setReviseOwn(mp.getReviseOwn()); permissions.setMarkAsRead(mp.getMarkAsRead()); permissions.setRole(role); } return permissions; } /** * Save an forum message permission. This is backed in the database by a single * message permission (used for topics, forums, and topics). */ public void saveForumMessagePermissionForRole(BaseForum forum, MessagePermissions permission) { MessagePermissions permissions = forum == null || forum.getId() == null ? null : getMessagePermissionByKeyValue(permission.getRole(), "forumId", forum.getId().toString(), false); if (permissions == null) { permissions = new MessagePermissionsImpl(); } boolean isNew = permissions.getId() == null; permissions.setForum(forum); permissions.setDefaultValue(Boolean.FALSE); permissions.setDeleteAny(permission.getDeleteAny()); permissions.setDeleteOwn(permission.getDeleteOwn()); permissions.setRead(permission.getRead()); permissions.setReadDrafts(permission.getReadDrafts()); permissions.setReviseAny(permission.getReviseAny()); permissions.setReviseOwn(permission.getReviseOwn()); permissions.setMarkAsRead(permission.getMarkAsRead()); permissions.setRole(permission.getRole()); getHibernateTemplate().saveOrUpdate(permissions); if (eventTrackingService == null) // SAK-12988 throw new RuntimeException("eventTrackingService is null!"); if (isNew) { eventTrackingService.post(eventTrackingService.newEvent(DiscussionForumService.EVENT_FORUMS_FORUM_ADD, getEventMessage(forum, permissions), false)); } else { eventTrackingService.post(eventTrackingService.newEvent(DiscussionForumService.EVENT_FORUMS_FORUM_REVISE, getEventMessage(forum, permissions), false)); } } /** * Save a default forum message permission. This is backed in the database by a * single message permission (used for topics, forums, and topics). */ public void saveDefaultForumMessagePermissionForRole(BaseForum forum, MessagePermissions permission) { MessagePermissions permissions = forum == null || forum.getId() == null ? null : getMessagePermissionByKeyValue(permission.getRole(), "forumId", forum.getId().toString(), true); if (permissions == null) { permissions = new MessagePermissionsImpl(); } boolean isNew = permissions.getId() == null; permissions.setForum(forum); permissions.setDefaultValue(Boolean.TRUE); permissions.setDeleteAny(permission.getDeleteAny()); permissions.setDeleteOwn(permission.getDeleteOwn()); permissions.setRead(permission.getRead()); permissions.setReadDrafts(permission.getReadDrafts()); permissions.setReviseAny(permission.getReviseAny()); permissions.setReviseOwn(permission.getReviseOwn()); permissions.setMarkAsRead(permission.getMarkAsRead()); permissions.setRole(permission.getRole()); getHibernateTemplate().saveOrUpdate(permissions); if (eventTrackingService == null) // SAK-12988 throw new RuntimeException("eventTrackingService is null!"); if (isNew) { eventTrackingService.post(eventTrackingService.newEvent(DiscussionForumService.EVENT_FORUMS_FORUM_ADD, getEventMessage(forum, permissions), false)); } else { eventTrackingService.post(eventTrackingService.newEvent(DiscussionForumService.EVENT_FORUMS_FORUM_REVISE, getEventMessage(forum, permissions), false)); } } /** * Get the topic message permission for a given role. This provides the permissions * that the role currently has. */ public MessagePermissions getTopicMessagePermissionForRole(Topic topic, String role, String typeId) { MessagePermissions permissions = topic == null || topic.getId() == null ? null : getMessagePermissionByKeyValue(role, "topicId", topic.getId().toString(), false); MessagePermissions mp = new MessagePermissionsImpl(); if (permissions == null) { return null; } else { mp.setDeleteAny(permissions.getDeleteAny()); mp.setDeleteOwn(permissions.getDeleteOwn()); mp.setRead(permissions.getRead()); mp.setReadDrafts(permissions.getReadDrafts()); mp.setReviseAny(permissions.getReviseAny()); mp.setReviseOwn(permissions.getReviseOwn()); mp.setMarkAsRead(permissions.getMarkAsRead()); } mp.setRole(role); return mp; } /** * Get the default topic message permission for a given role. This provides the * permissions that the role currently has. */ public MessagePermissions getDefaultTopicMessagePermissionForRole(Topic topic, String role, String typeId) { MessagePermissions permissions = topic == null || topic.getId() == null ? null : getMessagePermissionByKeyValue(role, "topicId", topic.getId().toString(), true); MessagePermissions mp = new MessagePermissionsImpl(); if (permissions == null) { return null; } else { mp.setDeleteAny(permissions.getDeleteAny()); mp.setDeleteOwn(permissions.getDeleteOwn()); mp.setRead(permissions.getRead()); mp.setReadDrafts(permissions.getReadDrafts()); mp.setReviseAny(permissions.getReviseAny()); mp.setReviseOwn(permissions.getReviseOwn()); mp.setMarkAsRead(permissions.getMarkAsRead()); } mp.setRole(role); return mp; } /** * Create an empty topic message permission with system properties * populated (ie: uuid). */ public MessagePermissions createTopicMessagePermissionForRole(BaseForum forum, String role, String typeId) { MessagePermissions permissions = new MessagePermissionsImpl(); MessagePermissions mp = getForumMessagePermissionForRole(forum, role, typeId); if (mp != null) { permissions.setDefaultValue(mp.getDefaultValue()); permissions.setDeleteAny(mp.getDeleteAny()); permissions.setDeleteOwn(mp.getDeleteOwn()); permissions.setRead(mp.getRead()); permissions.setReadDrafts(mp.getReadDrafts()); permissions.setReviseAny(mp.getReviseAny()); permissions.setReviseOwn(mp.getReviseOwn()); permissions.setMarkAsRead(mp.getMarkAsRead()); permissions.setRole(role); } return permissions; } /** * Save an topic message permission. This is backed in the database by a single * message permission (used for areas, forums, and topics). */ public void saveTopicMessagePermissionForRole(Topic topic, MessagePermissions permission) { MessagePermissions permissions = topic == null || topic.getId() == null ? null : getMessagePermissionByKeyValue(permission.getRole(), "topicId", topic.getId().toString(), false); if (permissions == null) { permissions = new MessagePermissionsImpl(); } boolean isNew = permissions.getId() == null; permissions.setTopic(topic); permissions.setDefaultValue(Boolean.FALSE); permissions.setDeleteAny(permission.getDeleteAny()); permissions.setDeleteOwn(permission.getDeleteOwn()); permissions.setRead(permission.getRead()); permissions.setReadDrafts(permission.getReadDrafts()); permissions.setReviseAny(permission.getReviseAny()); permissions.setReviseOwn(permission.getReviseOwn()); permissions.setMarkAsRead(permission.getMarkAsRead()); permissions.setRole(permission.getRole()); getHibernateTemplate().saveOrUpdate(permissions); if (eventTrackingService == null) // SAK-12988 throw new RuntimeException("eventTrackingService is null!"); if (isNew) { eventTrackingService.post(eventTrackingService.newEvent(DiscussionForumService.EVENT_FORUMS_TOPIC_ADD, getEventMessage(topic, permissions), false)); } else { eventTrackingService.post(eventTrackingService.newEvent(DiscussionForumService.EVENT_FORUMS_TOPIC_REVISE, getEventMessage(topic, permissions), false)); } } /** * Save a default topic message permission. This is backed in the database by a * single message permission (used for areas, forums, and topics). */ public void saveDefaultTopicMessagePermissionForRole(Topic topic, MessagePermissions permission) { MessagePermissions permissions = topic == null || topic.getId() == null ? null : getMessagePermissionByKeyValue(permission.getRole(), "topicId", topic.getId().toString(), true); if (permissions == null) { permissions = new MessagePermissionsImpl(); } boolean isNew = permissions.getId() == null; permissions.setTopic(topic); permissions.setDefaultValue(Boolean.TRUE); permissions.setDeleteAny(permission.getDeleteAny()); permissions.setDeleteOwn(permission.getDeleteOwn()); permissions.setRead(permissions.getRead()); permissions.setReadDrafts(permission.getReadDrafts()); permissions.setReviseAny(permission.getReviseAny()); permissions.setReviseOwn(permission.getReviseOwn()); permissions.setMarkAsRead(permission.getMarkAsRead()); permissions.setRole(permission.getRole()); getHibernateTemplate().saveOrUpdate(permissions); if (eventTrackingService == null) // SAK-12988 throw new RuntimeException("eventTrackingService is null!"); if (isNew) { eventTrackingService.post(eventTrackingService.newEvent(DiscussionForumService.EVENT_FORUMS_TOPIC_ADD, getEventMessage(topic, permissions), false)); } else { eventTrackingService.post(eventTrackingService.newEvent(DiscussionForumService.EVENT_FORUMS_TOPIC_REVISE, getEventMessage(topic, permissions), false)); } } public MessagePermissions getAreaMessagePermissionByRoleAndType(final String roleId, final String typeId, final boolean defaultValue) { log.debug("getAreaMessagePermissionByRole executing for current user: " + getCurrentUser()); final Area area = areaManager.getAreaByContextIdAndTypeId(typeId); if (area == null) { return null; } HibernateCallback<MessagePermissions> hcb = session -> { Query q = session.getNamedQuery(QUERY_MP_BY_ROLE); q.setParameter("roleId", roleId, StringType.INSTANCE); q.setParameter("areaId", area.getId().toString(), StringType.INSTANCE); q.setParameter("defaultValue", Boolean.valueOf(defaultValue), BooleanType.INSTANCE); return (MessagePermissions) q.uniqueResult(); }; return getHibernateTemplate().execute(hcb); } // helpers private String getCurrentUser() { if (TestUtil.isRunningTests()) { return "test-user"; } return sessionManager.getCurrentSessionUserId(); } private String getEventMessage(Object parent, Object child) { return "/MessageCenter/site/" + getContextId() + "/" + parent.toString() + "/" + child.toString() + "/" + getCurrentUser(); //return "MessageCenter::" + getCurrentUser() + "::" + parent.toString() + "::" + child.toString(); } private String getContextId() { if (TestUtil.isRunningTests()) { return "test-context"; } final Placement placement = toolManager.getCurrentPlacement(); final String presentSiteId = placement.getContext(); return presentSiteId; } }
49.917441
187
0.691296
e6a170b7117ab8e0f912fe968c308638f3d02af8
706
sql
SQL
resources/[systems]/customization/sql/outfits.sql
Jameslroll/FiveM-Framework
4532e9dd6af1f4d2d371bc03ab862cf8aee2ade7
[ "MIT" ]
null
null
null
resources/[systems]/customization/sql/outfits.sql
Jameslroll/FiveM-Framework
4532e9dd6af1f4d2d371bc03ab862cf8aee2ade7
[ "MIT" ]
null
null
null
resources/[systems]/customization/sql/outfits.sql
Jameslroll/FiveM-Framework
4532e9dd6af1f4d2d371bc03ab862cf8aee2ade7
[ "MIT" ]
1
2022-03-31T17:22:28.000Z
2022-03-31T17:22:28.000Z
CREATE TABLE IF NOT EXISTS `outfits` ( `character_id` INT(10) UNSIGNED NOT NULL, `name` TINYTEXT NOT NULL COLLATE 'utf8mb4_general_ci', `appearance` TEXT NOT NULL COLLATE 'utf8mb4_general_ci', `time_stamp` TIMESTAMP NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(), PRIMARY KEY (`character_id`, `name`(100)) USING BTREE, UNIQUE INDEX `outfits_unique_key` (`character_id`, `name`(100)) USING BTREE, INDEX `outfits_character_id` (`character_id`) USING BTREE, INDEX `outfits_name` (`name`(100)) USING BTREE, CONSTRAINT `outfits_character_id` FOREIGN KEY (`character_id`) REFERENCES `characters` (`id`) ON UPDATE RESTRICT ON DELETE CASCADE ) COLLATE='utf8mb4_general_ci' ENGINE=InnoDB ;
47.066667
131
0.769122
c542a83b0b4143076b10bd33bf67a7e9c1bdc91b
787
sql
SQL
LG - 5 - CreateInsertSmallLogTable.sql
skreebydba/TransactionLogIntro
b2ad2a018d66d3ed84c93c94fbc455946622c171
[ "MIT" ]
null
null
null
LG - 5 - CreateInsertSmallLogTable.sql
skreebydba/TransactionLogIntro
b2ad2a018d66d3ed84c93c94fbc455946622c171
[ "MIT" ]
null
null
null
LG - 5 - CreateInsertSmallLogTable.sql
skreebydba/TransactionLogIntro
b2ad2a018d66d3ed84c93c94fbc455946622c171
[ "MIT" ]
null
null
null
USE SmallLog; -- ============================================= -- Create basic stored procedure template -- ============================================= -- Drop stored procedure if it already exists IF EXISTS ( SELECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE SPECIFIC_SCHEMA = N'dbo' AND SPECIFIC_NAME = N'InsertSmallLogTable' ) DROP PROCEDURE dbo.InsertSmallLogTable GO CREATE PROCEDURE dbo.InsertSmallLogTable @NumberOfRows INT = 100000 AS SET NOCOUNT ON; DECLARE @loopcount INT; SELECT @loopcount = 1; WHILE @loopcount <= @NumberOfRows BEGIN INSERT INTO SmallLog.dbo.TestTable (FirstName ,LastName ,Comments) VALUES ('Steve' ,'Jones' ,REPLICATE('This is a comment', 58)); SELECT @loopcount += 1; END GO
18.738095
49
0.606099
843ffa069587a033d2360ffef2c9d2fed57b0768
7,182
html
HTML
index.html
DevEpsilon/VladZ
0399a476a2953892dc9a30ebe43cdd0e4d89c46b
[ "MIT" ]
null
null
null
index.html
DevEpsilon/VladZ
0399a476a2953892dc9a30ebe43cdd0e4d89c46b
[ "MIT" ]
null
null
null
index.html
DevEpsilon/VladZ
0399a476a2953892dc9a30ebe43cdd0e4d89c46b
[ "MIT" ]
null
null
null
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="style.css"> <title>Vlad Zhelezniak - Welcome!</title> <link rel="shortcut icon" type="image/jpg" href="https://cdn.discordapp.com/attachments/710365124266950717/881743128464355328/android-chrome-512x512-removebg-preview.png"/> </head> <body> <!-- Header --> <section id="header"> <div class="header container"> <div class="nav-bar"> <div class="brand"> <a href="#hero"> <h1><span>V</span>lad <span>Z</span>helezniak</h1> </a> </div> <div class="nav-list"> <div class="hamburger"> <div class="bar"></div> </div> <ul> <li><a href="#hero" data-after="Home">Home</a></li> <li><a href="#about" data-after="About">About</a></li> <li><a href="#projects" data-after="Projects">Projects</a></li> <li><a href="#contact" data-after="Contact">Contact</a></li> </ul> </div> </div> </div> </section> <!-- End Header --> <!-- Hero Section --> <section id="hero"> <div class="hero container"> <div> <h1>Hi there, <span></span></h1> <h1>I don't think we've met.<span></span></h1> <h1> I'm Vlad.<span></span></h1> <a href="#projects" type="button" class="cta">Portfolio</a> </div> </div> </section> <!-- End Hero Section --> <!-- About Section --> <section id="about"> <div class="about container"> <div class="col-left"> <div class="about-img"> <img src="./img/img-2.png" alt="img"> </div> </div> <div class="col-right"> <h1 class="section-title">About <span>me</span></h1> <h2>Cybersecurity + Computer Science & Business Marketing</h2> <p>As a young child, I have always been intrigued by technology. I would always tinker around playing with components and trying to figure out how things worked. As I grew throughout the years, I followed those interests, expanding my ever-growing education. With that, let me show you what I can do. </p> <a href="VladZResume.pdf" class="cta">Download Resume</a> </div> </div> </section> <!-- End About Section --> <!-- Projects Section --> <section id="projects"> <div class="projects container"> <div class="projects-header"> <h1 class="section-title">Recent <span>Projects</span></h1> </div> <div class="all-projects"> <div class="project-item"> <div class="project-info"> <h1>LinksByte</h1> <h2>A Suspicious Link Detection Bot</h2> <p>Implemented Sandboxie and Python to create previews of weblinks before they are visited, precluding users from unintentional malicious downloads and personal data gathering. The application reduced user confrontation with phishing websites and fake application downloads. Implemented LinksByte to Discord, a instant messaging and digital distribution platform. </p> </div> <div class="project-img"> <img src="./img/LinksByte.png" alt="img"> </div> </div> <div class="project-item"> <div class="project-info"> <h1>iExplore Malware</h1> <h2>Malicious Application Process Exploration</h2> <p>Developed a new methodology for detecting malicious processes running within a portable executable file through the use of Process Explorer and Python; this new approach prevented DLL hijacking attacks and malicious file injections.</p> </div> <div class="project-img"> <img src="./img/iExplore.png" alt="img"> </div> </div> <div class="project-item"> <div class="project-info"> <h1>DecryptPETYA</h1> <h2>PETYA Ransomware Encryption Vulnerabilities</h2> <p>Engineered an alternative means to decrypt data that had been encrypted through the PETYA ransomware attack by finding a vulnerability in PETYA’s known-plaintext attack within a cipher stream.</p> </div> <div class="project-img"> <img src="./img/DecryptPETYA.png" alt="img"> </div> </div> <div class="project-item"> <div class="project-info"> <h1>BruteDNS</h1> <h2>Misconfigured DNS Scanner</h2> <p>BruteDNS was designed as a team to find and detect misconfigured DNS servers, alerting the user of the application of a cyberattack. Using multiple sequences and common penetration-testing services like NMAP & BlackBox, BruteDNS forced DNS zone transfers, gathering private network information. </p> </div> <div class="project-img"> <img src="./img/BruteDNS.png" alt="img"> </div> </div> </div> </div> </div> </div> </section> <!-- End Projects Section --> <!-- Contact Section --> <section id="contact"> <div class="contact container"> <div> <h1 class="section-title">Contact <span>info</span></h1> </div> <div class="contact-items"> <div class="contact-item"> <div class="icon"><img src="https://cdn3.iconfinder.com/data/icons/rcons-social/32/phone_telephone_call-512.png" /></div> <div class="contact-info"> <h1>Phone</h1> <p><a style="color:black;" href="tel:+12533067755">+1 (253) 306-7755</a></p> </div> </div> <div class="contact-item"> <div class="icon"><img src="https://cdn3.iconfinder.com/data/icons/rcons-social/32/gmail_mail-512.png" /></div> <div class="contact-info"> <h1>Email</h1> <p><a style="color:black;" href="mailto:vladislavzhelezniak@gmail.com"><small>vladislavzhelezniak@gmail.com</small></a></p> </div> </div> <div class="contact-item"> <div class="icon"><img src="https://cdn3.iconfinder.com/data/icons/rcons-social/32/linkedin-512.png" /></div> <div class="contact-info"> <h1>Linkedin</h1> <p> <a style="color:black;" href="https://www.linkedin.com/in/vladzhel/">linkedin.com/in/vladzhel/</a> </p> </div> </div> </div> </div> </section> <!-- End Contact Section --> <!-- Footer --> <section id="footer"> <div class="footer container"> <div class="brand"> <h1><span>V</span>lad <span>Z</span>helezniak</h1> </div> <h2>Learning Never Ends</h2> <div class="social-icon"> </div> <p>Copyright © 2021 Vlad Zhelezniak. All rights reserved</p> </div> </section> <!-- End Footer --> <script src="./app.js"></script> </body> </html>
39.245902
288
0.561125
53b1bc8edbc9f3fc7acf5a9be8d4b77aff24c6c9
492
java
Java
src/main/java/com/crio/jobportal/dto/GetJobDto.java
mjh-ph7/job-portal-backend
4569e0b38b02e016290b251ed47231a0556b33a7
[ "Apache-2.0" ]
null
null
null
src/main/java/com/crio/jobportal/dto/GetJobDto.java
mjh-ph7/job-portal-backend
4569e0b38b02e016290b251ed47231a0556b33a7
[ "Apache-2.0" ]
null
null
null
src/main/java/com/crio/jobportal/dto/GetJobDto.java
mjh-ph7/job-portal-backend
4569e0b38b02e016290b251ed47231a0556b33a7
[ "Apache-2.0" ]
null
null
null
package com.crio.jobportal.dto; import java.util.List; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; @Data @AllArgsConstructor @NoArgsConstructor @Builder public class GetJobDto { private String companyName; private String jobTitle; private String description; private List<String> skillKeyWords; private String location; private String listDate; private String applicantSize; private int keyWordsMatched; }
19.68
37
0.804878
73edec58dbd8c4105399b9e49d1c792f5b001dd6
989
dart
Dart
lib/src/presentation/widgets/stadium_indicator.dart
mouEsam/api_bloc_base
734a7e9bcd24baf676dcc2d46cd208237da49902
[ "MIT" ]
1
2022-03-06T07:59:44.000Z
2022-03-06T07:59:44.000Z
lib/src/presentation/widgets/stadium_indicator.dart
mouEsam/api_bloc_base
734a7e9bcd24baf676dcc2d46cd208237da49902
[ "MIT" ]
null
null
null
lib/src/presentation/widgets/stadium_indicator.dart
mouEsam/api_bloc_base
734a7e9bcd24baf676dcc2d46cd208237da49902
[ "MIT" ]
null
null
null
import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; class StadiumIndicator extends Decoration { final Color color; StadiumIndicator(this.color); @override BoxPainter createBoxPainter([VoidCallback? onChanged]) { return _StadiumIndicatorPainter(this, onChanged); } } class _StadiumIndicatorPainter extends BoxPainter { final StadiumIndicator decoration; _StadiumIndicatorPainter(this.decoration, VoidCallback? onChanged) : super(onChanged); @override void paint(Canvas canvas, Offset offset, ImageConfiguration configuration) { assert(configuration.size != null); final Rect rect = offset & configuration.size!; final Radius radius = Radius.circular(rect.shortestSide / 2); final RRect rRect = RRect.fromRectAndRadius(rect, radius); final Paint paint = Paint(); paint.color = decoration.color; paint.style = PaintingStyle.fill; paint.strokeWidth = 10.0; canvas.drawRRect(rRect, paint); } }
28.257143
78
0.743175
f0155bbf61f6676b677021f56054f7ab212c782f
2,187
js
JavaScript
puppy/client/static/sample/js/PuppyVMCode.js
lVlEK0/puppy
0f6f6b34af8130fac9979880e00744bc0dd76e78
[ "MIT" ]
null
null
null
puppy/client/static/sample/js/PuppyVMCode.js
lVlEK0/puppy
0f6f6b34af8130fac9979880e00744bc0dd76e78
[ "MIT" ]
null
null
null
puppy/client/static/sample/js/PuppyVMCode.js
lVlEK0/puppy
0f6f6b34af8130fac9979880e00744bc0dd76e78
[ "MIT" ]
null
null
null
window['PuppyVMCode'] = { world: { 'width': 1000, 'height': 1000, 'xGravity': 0.0, 'yGravity': 0.05, 'mouse': true, 'ticker': { 'x': 10, 'y': 10 }, }, bodies: [ { 'shape': "circle", 'concept': ['ボール', '円'], 'name': 'ボール', 'width': 100, 'height': 50, 'position': { 'x': 500, 'y': 500 }, 'angle': 0.2 * Math.PI, 'render': { 'fillStyle': 'rgba(11,11,11,0.1)', 'strokeStyle': 'blue', 'lineWidth': 10 }, 'velocity': { x: 1, y: -300 }, 'value': "さかね", 'isSensor': false, }, { 'shape': "rectangle", 'concept': ['X', '壁', '長方形'], 'isStatic': true, 'chamfer': true, 'name': 'X', 'width': 600, 'height': 50, 'slop': 0.1, 'position': { 'x': 500, 'y': 800, }, }, { 'shape': "polygon", 'concept': ['多角形', '正方形'], 'isStatic': false, 'chamfer': true, 'sides': 6, 'name': '多角形', 'width': 100, 'height': 100, 'position': { 'x': 400, 'y': 500, }, }, ], main: function* (Matter,puppy){ yield console.log("Hi!!!"); for (const name of ["A", "B", "C", "D", "E"]) { yield puppy.vars[name] = puppy.newMatter({shape: 'circle'}); } yield puppy.vars["ボール"].value = "のぶちゃん"; const ball_clicked = () => {puppy.print("Clicked!")}; yield puppy.vars["ボール"].clicked = ball_clicked; const ball_collision = (me, you) => { puppy.print(you.name) }; yield puppy.vars["ボール"].collisionStart = ball_collision; yield puppy.print("Hello"); yield puppy.print("Comment"); puppy.vars['x'] = 1 const score = (cnt) => 'Score: ' + cnt; yield puppy.vars['score'] = puppy.newMatter({shape: 'label', value: score(puppy.vars['x']), position: { x: 60, y: 30 } }) yield puppy.vars['score'].value = score(++puppy.vars['x']) yield puppy.vars['score'].value = score(++puppy.vars['x']) yield puppy.vars['score'].value = score(++puppy.vars['x']) yield puppy.vars['score'].value = score(++puppy.vars['x']) yield puppy.newMatter({shape: 'polygon'}) }, errors: [ ] }
27.683544
125
0.487883
4c29cadfc92abba390df8853b1368fca134a2abe
1,550
php
PHP
tests/Translator/Extractor/JsExtractorTest.php
Incenteev/translation-checker-bundle
60cfd7edc5632128ec69c4a443634dc49a439882
[ "MIT" ]
10
2017-08-14T20:51:10.000Z
2021-10-18T18:50:54.000Z
tests/Translator/Extractor/JsExtractorTest.php
Incenteev/IncenteevTranslationCheckerBundle
60cfd7edc5632128ec69c4a443634dc49a439882
[ "MIT" ]
6
2015-05-14T20:58:32.000Z
2017-06-15T17:02:20.000Z
tests/Translator/Extractor/JsExtractorTest.php
Incenteev/IncenteevTranslationCheckerBundle
60cfd7edc5632128ec69c4a443634dc49a439882
[ "MIT" ]
3
2015-06-08T09:16:34.000Z
2017-06-06T10:11:20.000Z
<?php namespace Incenteev\TranslationCheckerBundle\Tests\Translator\Extractor; use Incenteev\TranslationCheckerBundle\Translator\Extractor\JsExtractor; use PHPUnit\Framework\TestCase; use Symfony\Component\Translation\MessageCatalogue; class JsExtractorTest extends TestCase { /** * @dataProvider providePaths */ public function testExtraction($path) { $extractor = new JsExtractor(array($path), 'js'); $catalogue = new MessageCatalogue('en'); $extractor->extract($catalogue); $expected = array( 'js' => array( 'test.single_quote', 'test.double_quote', 'choose.single_quote', 'choose.double_quote', 'test.single_quote_with_spaces', 'test.double_quote_with_spaces', 'choose.single_quote_with_spaces', 'choose.double_quote_with_spaces', 'test.with_domain', // Extracting explicit domain is not supported yet. We extract them in the default domain. // dynamic_key. is not exported as it is not the full key but only the first part of a dynamically-built key ) ); $this->assertEqualsCanonicalizing($expected, $catalogue->all());// Order of translations is not relevant for the testing } public static function providePaths() { return array( 'directory' => array(__DIR__.'/fixtures'), 'file' => array(__DIR__.'/fixtures/test.js'), ); } }
32.978723
128
0.619355
6ef04d53d7ed1219b2ac6e0a3da3469e1357e507
2,031
kt
Kotlin
src/main/kotlin/com/archesky/auth/library/security/SecurityConfig.kt
Rich43/pynguins-auth-library
b0c154cf1bea7a44c4c7bdff2aae93a703a11240
[ "BSD-2-Clause" ]
null
null
null
src/main/kotlin/com/archesky/auth/library/security/SecurityConfig.kt
Rich43/pynguins-auth-library
b0c154cf1bea7a44c4c7bdff2aae93a703a11240
[ "BSD-2-Clause" ]
null
null
null
src/main/kotlin/com/archesky/auth/library/security/SecurityConfig.kt
Rich43/pynguins-auth-library
b0c154cf1bea7a44c4c7bdff2aae93a703a11240
[ "BSD-2-Clause" ]
null
null
null
package com.archesky.auth.library.security import com.archesky.auth.library.service.CustomUserDetailsService import org.springframework.context.annotation.Bean import org.springframework.context.annotation.Configuration import org.springframework.security.authentication.AuthenticationManager import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity import org.springframework.security.config.annotation.web.builders.HttpSecurity import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter import org.springframework.security.config.http.SessionCreationPolicy import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter @Configuration @EnableWebSecurity @EnableGlobalMethodSecurity(prePostEnabled = true) open class SecurityConfig( private val jwtTokenFilter: JwtTokenFilter, private val userDetailsService: CustomUserDetailsService ) : WebSecurityConfigurerAdapter() { @Bean @Throws(Exception::class) override fun authenticationManagerBean(): AuthenticationManager { return super.authenticationManagerBean() } @Throws(Exception::class) override fun configure(http: HttpSecurity) { http .csrf().disable() .exceptionHandling().and() .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS).and() .authorizeRequests() .antMatchers("/**").permitAll() .anyRequest().authenticated() http.addFilterBefore(jwtTokenFilter, UsernamePasswordAuthenticationFilter::class.java) } @Throws(Exception::class) public override fun configure(auth: AuthenticationManagerBuilder) { auth.userDetailsService(userDetailsService) } }
45.133333
106
0.785327
0b24417f2ee0b6b95e1c21f1f50ee2435fb6de2e
1,210
py
Python
audiomate/processing/pipeline/onset.py
CostanzoPablo/audiomate
080402eadaa81f77f64c8680510a2de64bc18e74
[ "MIT" ]
133
2018-05-18T13:54:10.000Z
2022-02-15T02:14:20.000Z
audiomate/processing/pipeline/onset.py
CostanzoPablo/audiomate
080402eadaa81f77f64c8680510a2de64bc18e74
[ "MIT" ]
68
2018-06-03T16:42:09.000Z
2021-01-29T10:58:30.000Z
audiomate/processing/pipeline/onset.py
CostanzoPablo/audiomate
080402eadaa81f77f64c8680510a2de64bc18e74
[ "MIT" ]
37
2018-11-02T02:40:29.000Z
2021-11-30T07:44:50.000Z
import librosa import numpy as np from . import base from . import spectral class OnsetStrength(base.Computation): """ Compute a spectral flux onset strength envelope. Based on http://librosa.github.io/librosa/generated/librosa.onset.onset_strength.html Args: n_mels (int): Number of mel bands to generate. """ def __init__(self, n_mels=128, parent=None, name=None): super(OnsetStrength, self).__init__(left_context=1, right_context=0, parent=parent, name=name) self.n_mels = n_mels def compute(self, chunk, sampling_rate, corpus=None, utterance=None): # Compute mel-spetrogram power_spec = np.abs(spectral.stft_from_frames(chunk.data.T)) ** 2 mel = np.abs(librosa.feature.melspectrogram(S=power_spec, n_mels=self.n_mels, sr=sampling_rate)) mel_power = librosa.power_to_db(mel) # Compute onset strengths oenv = librosa.onset.onset_strength(S=mel_power, center=False) # Switch dimensions and add dimension to have frames oenv = oenv.T.reshape(oenv.shape[0], -1) # Remove context oenv = oenv[chunk.left_context:oenv.shape[0] - chunk.right_context] return oenv
31.025641
104
0.686777
ab9a5b7368a7439b1459036fbdf4eb838c2b0e1f
3,367
asm
Assembly
programs/oeis/191/A191901.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/191/A191901.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/191/A191901.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A191901: Number of compositions of odd natural numbers into 6 parts <= n. ; 0,32,364,2048,7812,23328,58824,131072,265720,500000,885780,1492992,2413404,3764768,5695312,8388608,12068784,17006112,23522940,32000000,42883060,56689952,74017944,95551488,122070312,154457888,193710244,240945152,297411660,364500000,443751840,536870912,645733984,772402208,919132812,1088391168,1282863204,1505468192,1759371880,2048000000,2375052120,2744515872,3160681524,3628156928,4151882812,4737148448,5389607664,6115295232,6920643600,7812500000,8798143900,9885304832,11082180564,12397455648,13840320312,15420489728,17148223624,19034346272,21090266820,23328000000,25760187180,28400117792,31261751104,34359738368,37709445312,41326975008,45229191084,49433741312,53959081540,58824500000,64050141960,69657034752,75667113144,82103245088,88989257812,96349964288,104211190044,112599800352,121543727760,131072000000,141214768240,152003335712,163470186684,175649015808,188574757812,202283617568,216813100504,232202043392,248490645480,265720500000,283934626020,303177500672,323495091724,344934890528,367545945312,391378894848,416486002464,442921190432,470740074700,500000000000,530760075300,563081209632,597026148264,632659509248,670047820312,709259556128,750365175924,793437161472,838550055420,885780500000,935207276080,986911342592,1040975876304,1097486311968,1156530382812,1218198161408,1282582100884,1349777076512,1419880427640,1492992000000,1569214188360,1648651979552,1731412995844,1817607538688,1907348632812,2000752070688,2097936457344,2199023255552,2304136831360,2413404500000,2526956572140,2644926400512,2767450426884,2894668229408,3026722570312,3163759443968,3305928125304,3453381218592,3606274706580,3764768000000,3929023987420,4099209085472,4275493289424,4458050224128,4647057195312,4842695241248,5045149184764,5254607685632,5471263293300,5695312500000,5926955794200,6166397714432,6413846903464,6669516162848,6933622507812,7206387222528,7488035915724,7778798576672,8078909631520,8388608000000,8708137152480,9037745167392,9377684789004,9728213485568,10089593507812,10462091947808,10845980798184,11241537011712,11649042561240,12068784500000,12501055022260,12946151524352,13404376666044,13876038432288,14361450195312,14860930777088,15374804512144,15903401310752,16447056722460,17006112000000,17580914163540,18171816065312,18779176454584,19403360043008,20044737570312,20703685870368,21380587937604,22075832993792,22789816555180,23522940500000,24275613136320,25048249270272,25841270274624,26655104157728,27490185632812,28346956187648,29225864154564,30127364780832,31051920299400,32000000000000,32972080300600,33968644819232,34990184446164,36037197416448,37110189382812,38209673488928,39336170443024,40490208591872,41672323995120,42883060500000,44122969816380,45392611592192,46692553489204,48023371259168,49385648820312,50779978334208,52206960282984,53667203546912,55161325482340,56689952000000,58253717643660,59853265669152,61489248123744,63162325925888,64873168945312,66622456083488,68410875354444,70239123965952,72107908401060,74017944500000,75969957542440,77964682330112,80002863269784,82085254456608,84212619757812,86385732896768,88605377537404,90872347368992,93187446191280,95551488000000,97965297072720,100429708055072,102945566047324,105513726691328,108135056257812,110810431734048,113540740911864,116326882476032,119169766093000,122070312500000 mov $1,$0 add $1,1 pow $1,6 div $1,2
420.875
3,252
0.914167
77621549a5406f2e3ff3bf6757152c0a895c3ced
63,075
html
HTML
Step2-Indexing/man_html/man1/x86_64-linux-gnu-objcopy.1.html
loic-carbonne/Man-fulltext-search
423fc9f76211d00e45b2fef82162d7d6c184f2c3
[ "Apache-2.0" ]
null
null
null
Step2-Indexing/man_html/man1/x86_64-linux-gnu-objcopy.1.html
loic-carbonne/Man-fulltext-search
423fc9f76211d00e45b2fef82162d7d6c184f2c3
[ "Apache-2.0" ]
null
null
null
Step2-Indexing/man_html/man1/x86_64-linux-gnu-objcopy.1.html
loic-carbonne/Man-fulltext-search
423fc9f76211d00e45b2fef82162d7d6c184f2c3
[ "Apache-2.0" ]
null
null
null
<p class="level0"> <p class="level0"> <p class="level0"><pre class="level0"> </pre> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0">'br} <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0">'br} <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0">{\ <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"> <p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2> <p class="level0">objcopy - copy and translate object files <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2> <p class="level0"> <p class="level0">objcopy [<span Class="bold">-F</span> <span Class="emphasis">bfdname</span>|<span Class="bold">--target=</span><span Class="emphasis">bfdname</span>] &nbsp; [<span Class="bold">-I</span> <span Class="emphasis">bfdname</span>|<span Class="bold">--input-target=</span><span Class="emphasis">bfdname</span>] &nbsp; [<span Class="bold">-O</span> <span Class="emphasis">bfdname</span>|<span Class="bold">--output-target=</span><span Class="emphasis">bfdname</span>] &nbsp; [<span Class="bold">-B</span> <span Class="emphasis">bfdarch</span>|<span Class="bold">--binary-architecture=</span><span Class="emphasis">bfdarch</span>] &nbsp; [<span Class="bold">-S</span>|<span Class="bold">--strip-all</span>] &nbsp; [<span Class="bold">-g</span>|<span Class="bold">--strip-debug</span>] &nbsp; [<span Class="bold">-K</span> <span Class="emphasis">symbolname</span>|<span Class="bold">--keep-symbol=</span><span Class="emphasis">symbolname</span>] &nbsp; [<span Class="bold">-N</span> <span Class="emphasis">symbolname</span>|<span Class="bold">--strip-symbol=</span><span Class="emphasis">symbolname</span>] &nbsp; [<span Class="bold">--strip-unneeded-symbol=</span><span Class="emphasis">symbolname</span>] &nbsp; [<span Class="bold">-G</span> <span Class="emphasis">symbolname</span>|<span Class="bold">--keep-global-symbol=</span><span Class="emphasis">symbolname</span>] &nbsp; [<span Class="bold">--localize-hidden</span>] &nbsp; [<span Class="bold">-L</span> <span Class="emphasis">symbolname</span>|<span Class="bold">--localize-symbol=</span><span Class="emphasis">symbolname</span>] &nbsp; [<span Class="bold">--globalize-symbol=</span><span Class="emphasis">symbolname</span>] &nbsp; [<span Class="bold">-W</span> <span Class="emphasis">symbolname</span>|<span Class="bold">--weaken-symbol=</span><span Class="emphasis">symbolname</span>] &nbsp; [<span Class="bold">-w</span>|<span Class="bold">--wildcard</span>] &nbsp; [<span Class="bold">-x</span>|<span Class="bold">--discard-all</span>] &nbsp; [<span Class="bold">-X</span>|<span Class="bold">--discard-locals</span>] &nbsp; [<span Class="bold">-b</span> <span Class="emphasis">byte</span>|<span Class="bold">--byte=</span><span Class="emphasis">byte</span>] &nbsp; [<span Class="bold">-i</span> [<span Class="emphasis">breadth</span>]|<span Class="bold">--interleave</span>[=<span Class="emphasis">breadth</span>]] &nbsp; [<span Class="bold">--interleave-width=</span><span Class="emphasis">width</span>] &nbsp; [<span Class="bold">-j</span> <span Class="emphasis">sectionpattern</span>|<span Class="bold">--only-section=</span><span Class="emphasis">sectionpattern</span>] &nbsp; [<span Class="bold">-R</span> <span Class="emphasis">sectionpattern</span>|<span Class="bold">--remove-section=</span><span Class="emphasis">sectionpattern</span>] &nbsp; [<span Class="bold">-p</span>|<span Class="bold">--preserve-dates</span>] &nbsp; [<span Class="bold">-D</span>|<span Class="bold">--enable-deterministic-archives</span>] &nbsp; [<span Class="bold">-U</span>|<span Class="bold">--disable-deterministic-archives</span>] &nbsp; [<span Class="bold">--debugging</span>] &nbsp; [<span Class="bold">--gap-fill=</span><span Class="emphasis">val</span>] &nbsp; [<span Class="bold">--pad-to=</span><span Class="emphasis">address</span>] &nbsp; [<span Class="bold">--set-start=</span><span Class="emphasis">val</span>] &nbsp; [<span Class="bold">--adjust-start=</span><span Class="emphasis">incr</span>] &nbsp; [<span Class="bold">--change-addresses=</span><span Class="emphasis">incr</span>] &nbsp; [<span Class="bold">--change-section-address</span> <span Class="emphasis">sectionpattern</span>{=,+,-}<span Class="emphasis">val</span>] &nbsp; [<span Class="bold">--change-section-lma</span> <span Class="emphasis">sectionpattern</span>{=,+,-}<span Class="emphasis">val</span>] &nbsp; [<span Class="bold">--change-section-vma</span> <span Class="emphasis">sectionpattern</span>{=,+,-}<span Class="emphasis">val</span>] &nbsp; [<span Class="bold">--change-warnings</span>] [<span Class="bold">--no-change-warnings</span>] &nbsp; [<span Class="bold">--set-section-flags</span> <span Class="emphasis">sectionpattern</span>=<span Class="emphasis">flags</span>] &nbsp; [<span Class="bold">--add-section</span> <span Class="emphasis">sectionname</span>=<span Class="emphasis">filename</span>] &nbsp; [<span Class="bold">--dump-section</span> <span Class="emphasis">sectionname</span>=<span Class="emphasis">filename</span>] &nbsp; [<span Class="bold">--rename-section</span> <span Class="emphasis">oldname</span>=<span Class="emphasis">newname</span>[,<span Class="emphasis">flags</span>]] &nbsp; [<span Class="bold">--long-section-names</span> {enable,disable,keep}] &nbsp; [<span Class="bold">--change-leading-char</span>] [<span Class="bold">--remove-leading-char</span>] &nbsp; [<span Class="bold">--reverse-bytes=</span><span Class="emphasis">num</span>] &nbsp; [<span Class="bold">--srec-len=</span><span Class="emphasis">ival</span>] [<span Class="bold">--srec-forceS3</span>] &nbsp; [<span Class="bold">--redefine-sym</span> <span Class="emphasis">old</span>=<span Class="emphasis">new</span>] &nbsp; [<span Class="bold">--redefine-syms=</span><span Class="emphasis">filename</span>] &nbsp; [<span Class="bold">--weaken</span>] &nbsp; [<span Class="bold">--keep-symbols=</span><span Class="emphasis">filename</span>] &nbsp; [<span Class="bold">--strip-symbols=</span><span Class="emphasis">filename</span>] &nbsp; [<span Class="bold">--strip-unneeded-symbols=</span><span Class="emphasis">filename</span>] &nbsp; [<span Class="bold">--keep-global-symbols=</span><span Class="emphasis">filename</span>] &nbsp; [<span Class="bold">--localize-symbols=</span><span Class="emphasis">filename</span>] &nbsp; [<span Class="bold">--globalize-symbols=</span><span Class="emphasis">filename</span>] &nbsp; [<span Class="bold">--weaken-symbols=</span><span Class="emphasis">filename</span>] &nbsp; [<span Class="bold">--alt-machine-code=</span><span Class="emphasis">index</span>] &nbsp; [<span Class="bold">--prefix-symbols=</span><span Class="emphasis">string</span>] &nbsp; [<span Class="bold">--prefix-sections=</span><span Class="emphasis">string</span>] &nbsp; [<span Class="bold">--prefix-alloc-sections=</span><span Class="emphasis">string</span>] &nbsp; [<span Class="bold">--add-gnu-debuglink=</span><span Class="emphasis">path-to-file</span>] &nbsp; [<span Class="bold">--keep-file-symbols</span>] &nbsp; [<span Class="bold">--only-keep-debug</span>] &nbsp; [<span Class="bold">--strip-dwo</span>] &nbsp; [<span Class="bold">--extract-dwo</span>] &nbsp; [<span Class="bold">--extract-symbol</span>] &nbsp; [<span Class="bold">--writable-text</span>] &nbsp; [<span Class="bold">--readonly-text</span>] &nbsp; [<span Class="bold">--pure</span>] &nbsp; [<span Class="bold">--impure</span>] &nbsp; [<span Class="bold">--file-alignment=</span><span Class="emphasis">num</span>] &nbsp; [<span Class="bold">--heap=</span><span Class="emphasis">size</span>] &nbsp; [<span Class="bold">--image-base=</span><span Class="emphasis">address</span>] &nbsp; [<span Class="bold">--section-alignment=</span><span Class="emphasis">num</span>] &nbsp; [<span Class="bold">--stack=</span><span Class="emphasis">size</span>] &nbsp; [<span Class="bold">--subsystem=</span><span Class="emphasis">which</span>:<span Class="emphasis">major</span>.<span Class="emphasis">minor</span>] &nbsp; [<span Class="bold">--compress-debug-sections</span>] &nbsp; [<span Class="bold">--decompress-debug-sections</span>] &nbsp; [<span Class="bold">--dwarf-depth=</span><span Class="emphasis">n</span>] &nbsp; [<span Class="bold">--dwarf-start=</span><span Class="emphasis">n</span>] &nbsp; [<span Class="bold">-v</span>|<span Class="bold">--verbose</span>] &nbsp; [<span Class="bold">-V</span>|<span Class="bold">--version</span>] &nbsp; [<span Class="bold">--help</span>] [<span Class="bold">--info</span>] &nbsp; <span Class="emphasis">infile</span> [<span Class="emphasis">outfile</span>] <a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2> <p class="level0"> <p class="level0">The s-1GNU s0<span Class="bold">objcopy</span> utility copies the contents of an object file to another. <span Class="bold">objcopy</span> uses the s-1GNU BFDs0 Library to read and write the object files. It can write the destination object file in a format different from that of the source object file. The exact behavior of <span Class="bold">objcopy</span> is controlled by command-line options. Note that <span Class="bold">objcopy</span> should be able to copy a fully linked file between any two formats. However, copying a relocatable object file between any two formats may not work as expected. <p class="level0"><span Class="bold">objcopy</span> creates temporary files to do its translations and deletes them afterward. <span Class="bold">objcopy</span> uses s-1BFDs0 to do all its translation work; it has access to all the formats described in s-1BFDs0 and thus is able to recognize most formats without being told explicitly. <p class="level0"><span Class="bold">objcopy</span> can be used to generate S-records by using an output target of <span Class="bold">srec</span> (e.g., use <span Class="bold">-O srec</span>). <p class="level0"><span Class="bold">objcopy</span> can be used to generate a raw binary file by using an output target of <span Class="bold">binary</span> (e.g., use <span Class="bold">-O binary</span>). When <span Class="bold">objcopy</span> generates a raw binary file, it will essentially produce a memory dump of the contents of the input object file. All symbols and relocation information will be discarded. The memory dump will start at the load address of the lowest section copied into the output file. <p class="level0">When generating an S-record or a raw binary file, it may be helpful to use <span Class="bold">-S</span> to remove sections containing debugging information. In some cases <span Class="bold">-R</span> will be useful to remove sections which contain information that is not needed by the binary file. <p class="level0">Note---<span Class="bold">objcopy</span> is not able to change the endianness of its input files. If the input format has an endianness (some formats do not), <span Class="bold">objcopy</span> can only copy the inputs into file formats that have the same endianness or which have no endianness (e.g., <span Class="bold">srec</span>). (However, see the <span Class="bold">--reverse-bytes</span> option.) <a name="OPTIONS"></a><h2 class="nroffsh">OPTIONS</h2> <p class="level0"> <p class="level0"> <p class="level0"><a name="fIinfilefR"></a><span class="nroffip">\fIinfile\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1"> <p class="level0"><a name="fIoutfilefR"></a><span class="nroffip">\fIoutfile\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1">The input and output files, respectively. If you do not specify <span Class="emphasis">outfile</span>, <span Class="bold">objcopy</span> creates a temporary file and destructively renames the result with the name of <span Class="emphasis">infile</span>. <p class="level0"><a name="fB-IfR"></a><span class="nroffip">\fB-I\fR \fIbfdname\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1"> <p class="level0"><a name="fB--input-targetfRfIbfdnamefR"></a><span class="nroffip">\fB--input-target=\fR\fIbfdname\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1">Consider the source file's object format to be <span Class="emphasis">bfdname</span>, rather than attempting to deduce it. <p class="level0"><a name="fB-OfR"></a><span class="nroffip">\fB-O\fR \fIbfdname\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1"> <p class="level0"><a name="fB--output-targetfRfIbfdnamefR"></a><span class="nroffip">\fB--output-target=\fR\fIbfdname\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1">Write the output file using the object format <span Class="emphasis">bfdname</span>. <p class="level0"><a name="fB-FfR"></a><span class="nroffip">\fB-F\fR \fIbfdname\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1"> <p class="level0"><a name="fB--targetfRfIbfdnamefR"></a><span class="nroffip">\fB--target=\fR\fIbfdname\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1">Use <span Class="emphasis">bfdname</span> as the object format for both the input and the output file; i.e., simply transfer data from source to destination with no translation. <p class="level0"><a name="fB-BfR"></a><span class="nroffip">\fB-B\fR \fIbfdarch\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1"> <p class="level0"><a name="fB--binary-architecturefRfIbfdarchfR"></a><span class="nroffip">\fB--binary-architecture=\fR\fIbfdarch\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1">Useful when transforming a architecture-less input file into an object file. In this case the output architecture can be set to <span Class="emphasis">bfdarch</span>. This option will be ignored if the input file has a known <span Class="emphasis">bfdarch</span>. You can access this binary data inside a program by referencing the special symbols that are created by the conversion process. These symbols are called _binary_<span Class="emphasis">objfile</span>_start, _binary_<span Class="emphasis">objfile</span>_end and _binary_<span Class="emphasis">objfile</span>_size. e.g. you can transform a picture file into an object file and then access it in your code using these symbols. <p class="level0"><a name="fB-jfR"></a><span class="nroffip">\fB-j\fR \fIsectionpattern\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1"> <p class="level0"><a name="fB--only-sectionfRfIsectionpatternfR"></a><span class="nroffip">\fB--only-section=\fR\fIsectionpattern\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1">Copy only the indicated sections from the input file to the output file. This option may be given more than once. Note that using this option inappropriately may make the output file unusable. Wildcard characters are accepted in <span Class="emphasis">sectionpattern</span>. <p class="level0"><a name="fB-RfR"></a><span class="nroffip">\fB-R\fR \fIsectionpattern\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1"> <p class="level0"><a name="fB--remove-sectionfRfIsectionpatternfR"></a><span class="nroffip">\fB--remove-section=\fR\fIsectionpattern\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1">Remove any section matching <span Class="emphasis">sectionpattern</span> from the output file. This option may be given more than once. Note that using this option inappropriately may make the output file unusable. Wildcard characters are accepted in <span Class="emphasis">sectionpattern</span>. Using both the <span Class="bold">-j</span> and <span Class="bold">-R</span> options together results in undefined behaviour. <p class="level0"><a name="fB-SfR"></a><span class="nroffip">\fB-S\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1"> <p class="level0"><a name="fB--strip-allfR"></a><span class="nroffip">\fB--strip-all\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1">Do not copy relocation and symbol information from the source file. <p class="level0"><a name="fB-gfR"></a><span class="nroffip">\fB-g\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1"> <p class="level0"><a name="fB--strip-debugfR"></a><span class="nroffip">\fB--strip-debug\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1">Do not copy debugging symbols or sections from the source file. <p class="level0"><a name="fB--strip-unneededfR"></a><span class="nroffip">\fB--strip-unneeded\fR 4</span> <p class="level1"> <p class="level1">Strip all symbols that are not needed for relocation processing. <p class="level0"><a name="fB-KfR"></a><span class="nroffip">\fB-K\fR \fIsymbolname\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1"> <p class="level0"><a name="fB--keep-symbolfRfIsymbolnamefR"></a><span class="nroffip">\fB--keep-symbol=\fR\fIsymbolname\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1">When stripping symbols, keep symbol <span Class="emphasis">symbolname</span> even if it would normally be stripped. This option may be given more than once. <p class="level0"><a name="fB-NfR"></a><span class="nroffip">\fB-N\fR \fIsymbolname\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1"> <p class="level0"><a name="fB--strip-symbolfRfIsymbolnamefR"></a><span class="nroffip">\fB--strip-symbol=\fR\fIsymbolname\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1">Do not copy symbol <span Class="emphasis">symbolname</span> from the source file. This option may be given more than once. <p class="level0"><a name="fB--strip-unneeded-symbolfRfIsymbolnamefR"></a><span class="nroffip">\fB--strip-unneeded-symbol=\fR\fIsymbolname\fR 4</span> <p class="level1"> <p class="level1">Do not copy symbol <span Class="emphasis">symbolname</span> from the source file unless it is needed by a relocation. This option may be given more than once. <p class="level0"><a name="fB-GfR"></a><span class="nroffip">\fB-G\fR \fIsymbolname\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1"> <p class="level0"><a name="fB--keep-global-symbolfRfIsymbolnamefR"></a><span class="nroffip">\fB--keep-global-symbol=\fR\fIsymbolname\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1">Keep only symbol <span Class="emphasis">symbolname</span> global. Make all other symbols local to the file, so that they are not visible externally. This option may be given more than once. <p class="level0"><a name="fB--localize-hiddenfR"></a><span class="nroffip">\fB--localize-hidden\fR 4</span> <p class="level1"> <p class="level1">In an s-1ELFs0 object, mark all symbols that have hidden or internal visibility as local. This option applies on top of symbol-specific localization options such as <span Class="bold">-L</span>. <p class="level0"><a name="fB-LfR"></a><span class="nroffip">\fB-L\fR \fIsymbolname\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1"> <p class="level0"><a name="fB--localize-symbolfRfIsymbolnamefR"></a><span class="nroffip">\fB--localize-symbol=\fR\fIsymbolname\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1">Make symbol <span Class="emphasis">symbolname</span> local to the file, so that it is not visible externally. This option may be given more than once. <p class="level0"><a name="fB-WfR"></a><span class="nroffip">\fB-W\fR \fIsymbolname\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1"> <p class="level0"><a name="fB--weaken-symbolfRfIsymbolnamefR"></a><span class="nroffip">\fB--weaken-symbol=\fR\fIsymbolname\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1">Make symbol <span Class="emphasis">symbolname</span> weak. This option may be given more than once. <p class="level0"><a name="fB--globalize-symbolfRfIsymbolnamefR"></a><span class="nroffip">\fB--globalize-symbol=\fR\fIsymbolname\fR 4</span> <p class="level1"> <p class="level1">Give symbol <span Class="emphasis">symbolname</span> global scoping so that it is visible outside of the file in which it is defined. This option may be given more than once. <p class="level0"><a name="fB-wfR"></a><span class="nroffip">\fB-w\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1"> <p class="level0"><a name="fB--wildcardfR"></a><span class="nroffip">\fB--wildcard\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1">Permit regular expressions in <span Class="emphasis">symbolname</span>s used in other command line options. The question mark (?), asterisk (*), backslash (e) and square brackets ([]) operators can be used anywhere in the symbol name. If the first character of the symbol name is the exclamation point (!) then the sense of the switch is reversed for that symbol. For example: <p class="level1"> <p class="level1">&nbsp; -w -W !foo -W fo* <p class="level1"> <p class="level1">would cause objcopy to weaken all symbols that start with *(L"fo*(R" except for the symbol *(L"foo*(R". <p class="level0"><a name="fB-xfR"></a><span class="nroffip">\fB-x\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1"> <p class="level0"><a name="fB--discard-allfR"></a><span class="nroffip">\fB--discard-all\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1">Do not copy non-global symbols from the source file. <p class="level0"><a name="fB-XfR"></a><span class="nroffip">\fB-X\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1"> <p class="level0"><a name="fB--discard-localsfR"></a><span class="nroffip">\fB--discard-locals\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1">Do not copy compiler-generated local symbols. (These usually start with <span Class="bold">L</span> or <span Class="bold">.</span>.) <p class="level0"><a name="fB-bfR"></a><span class="nroffip">\fB-b\fR \fIbyte\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1"> <p class="level0"><a name="fB--bytefRfIbytefR"></a><span class="nroffip">\fB--byte=\fR\fIbyte\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1">If interleaving has been enabled via the <span Class="bold">--interleave</span> option then start the range of bytes to keep at the <span Class="emphasis">byte</span>th byte. <span Class="emphasis">byte</span> can be in the range from 0 to <span Class="emphasis">breadth</span>-1, where <span Class="emphasis">breadth</span> is the value given by the <span Class="bold">--interleave</span> option. <p class="level0"><a name="fB-i"></a><span class="nroffip">\fB-i [\fR\fIbreadth\fR\fB]\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1"> <p class="level0"><a name="fB--interleavefRfIbreadthfRfBfR"></a><span class="nroffip">\fB--interleave[=\fR\fIbreadth\fR\fB]\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1">Only copy a range out of every <span Class="emphasis">breadth</span> bytes. (Header data is not affected). Select which byte in the range begins the copy with the <span Class="bold">--byte</span> option. Select the width of the range with the <span Class="bold">--interleave-width</span> option. <p class="level1">This option is useful for creating files to program s-1ROM. s0 It is typically used with an f(CW*(C`srec*(C'</span> output target. Note that <span Class="bold">objcopy</span> will complain if you do not specify the <span Class="bold">--byte</span> option as well. <p class="level1">The default interleave breadth is 4, so with <span Class="bold">--byte</span> set to 0, <span Class="bold">objcopy</span> would copy the first byte out of every four bytes from the input to the output. <p class="level0"><a name="fB--interleave-widthfRfIwidthfR"></a><span class="nroffip">\fB--interleave-width=\fR\fIwidth\fR 4</span> <p class="level1"> <p class="level1">When used with the <span Class="bold">--interleave</span> option, copy <span Class="emphasis">width</span> bytes at a time. The start of the range of bytes to be copied is set by the <span Class="bold">--byte</span> option, and the extent of the range is set with the <span Class="bold">--interleave</span> option. <p class="level1">The default value for this option is 1. The value of <span Class="emphasis">width</span> plus the <span Class="emphasis">byte</span> value set by the <span Class="bold">--byte</span> option must not exceed the interleave breadth set by the <span Class="bold">--interleave</span> option. <p class="level1">This option can be used to create images for two 16-bit flashes interleaved in a 32-bit bus by passing <span Class="bold">-b 0 -i 4 --interleave-width=2</span> and <span Class="bold">-b 2 -i 4 --interleave-width=2</span> to two <span Class="bold">objcopy</span> commands. If the input was '12345678' then the outputs would be '1256' and '3478' respectively. <p class="level0"><a name="fB-pfR"></a><span class="nroffip">\fB-p\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1"> <p class="level0"><a name="fB--preserve-datesfR"></a><span class="nroffip">\fB--preserve-dates\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1">Set the access and modification dates of the output file to be the same as those of the input file. <p class="level0"><a name="fB-DfR"></a><span class="nroffip">\fB-D\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1"> <p class="level0"><a name="fB--enable-deterministic-archivesfR"></a><span class="nroffip">\fB--enable-deterministic-archives\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1">Operate in <span Class="emphasis">deterministic</span> mode. When copying archive members and writing the archive index, use zero for UIDs, GIDs, timestamps, and use consistent file modes for all files. <p class="level1">If <span Class="emphasis">binutils</span> was configured with <span Class="bold">--enable-deterministic-archives</span>, then this mode is on by default. It can be disabled with the <span Class="bold">-U</span> option, below. <p class="level0"><a name="fB-UfR"></a><span class="nroffip">\fB-U\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1"> <p class="level0"><a name="fB--disable-deterministic-archivesfR"></a><span class="nroffip">\fB--disable-deterministic-archives\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1">Do <span Class="emphasis">not</span> operate in <span Class="emphasis">deterministic</span> mode. This is the inverse of the <span Class="bold">-D</span> option, above: when copying archive members and writing the archive index, use their actual s-1UID, GID,s0 timestamp, and file mode values. <p class="level1">This is the default unless <span Class="emphasis">binutils</span> was configured with <span Class="bold">--enable-deterministic-archives</span>. <p class="level0"><a name="fB--debuggingfR"></a><span class="nroffip">\fB--debugging\fR 4</span> <p class="level1"> <p class="level1">Convert debugging information, if possible. This is not the default because only certain debugging formats are supported, and the conversion process can be time consuming. <p class="level0"><a name="fB--gap-fillfR"></a><span class="nroffip">\fB--gap-fill\fR \fIval\fR 4</span> <p class="level1"> <p class="level1">Fill gaps between sections with <span Class="emphasis">val</span>. This operation applies to the <span Class="emphasis">load address</span> (s-1LMAs0) of the sections. It is done by increasing the size of the section with the lower address, and filling in the extra space created with <span Class="emphasis">val</span>. <p class="level0"><a name="fB--pad-tofR"></a><span class="nroffip">\fB--pad-to\fR \fIaddress\fR 4</span> <p class="level1"> <p class="level1">Pad the output file up to the load address <span Class="emphasis">address</span>. This is done by increasing the size of the last section. The extra space is filled in with the value specified by <span Class="bold">--gap-fill</span> (default zero). <p class="level0"><a name="fB--set-startfR"></a><span class="nroffip">\fB--set-start\fR \fIval\fR 4</span> <p class="level1"> <p class="level1">Set the start address of the new file to <span Class="emphasis">val</span>. Not all object file formats support setting the start address. <p class="level0"><a name="fB--change-startfR"></a><span class="nroffip">\fB--change-start\fR \fIincr\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1"> <p class="level0"><a name="fB--adjust-startfR"></a><span class="nroffip">\fB--adjust-start\fR \fIincr\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1">Change the start address by adding <span Class="emphasis">incr</span>. Not all object file formats support setting the start address. <p class="level0"><a name="fB--change-addressesfR"></a><span class="nroffip">\fB--change-addresses\fR \fIincr\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1"> <p class="level0"><a name="fB--adjust-vmafR"></a><span class="nroffip">\fB--adjust-vma\fR \fIincr\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1">Change the s-1VMAs0 and s-1LMAs0 addresses of all sections, as well as the start address, by adding <span Class="emphasis">incr</span>. Some object file formats do not permit section addresses to be changed arbitrarily. Note that this does not relocate the sections; if the program expects sections to be loaded at a certain address, and this option is used to change the sections such that they are loaded at a different address, the program may fail. <p class="level0"><a name="fB--change-section-addressfR"></a><span class="nroffip">\fB--change-section-address\fR \fIsectionpattern\fR\fB{=,+,-}\fR\fIval\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1"> <p class="level0"><a name="fB--adjust-section-vmafR"></a><span class="nroffip">\fB--adjust-section-vma\fR \fIsectionpattern\fR\fB{=,+,-}\fR\fIval\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1">Set or change both the s-1VMAs0 address and the s-1LMAs0 address of any section matching <span Class="emphasis">sectionpattern</span>. If <span Class="bold">=</span> is used, the section address is set to <span Class="emphasis">val</span>. Otherwise, <span Class="emphasis">val</span> is added to or subtracted from the section address. See the comments under <span Class="bold">--change-addresses</span>, above. If <span Class="emphasis">sectionpattern</span> does not match any sections in the input file, a warning will be issued, unless <span Class="bold">--no-change-warnings</span> is used. <p class="level0"><a name="fB--change-section-lmafR"></a><span class="nroffip">\fB--change-section-lma\fR \fIsectionpattern\fR\fB{=,+,-}\fR\fIval\fR 4</span> <p class="level1"> <p class="level1">Set or change the s-1LMAs0 address of any sections matching <span Class="emphasis">sectionpattern</span>. The s-1LMAs0 address is the address where the section will be loaded into memory at program load time. Normally this is the same as the s-1VMAs0 address, which is the address of the section at program run time, but on some systems, especially those where a program is held in s-1ROM,s0 the two can be different. If <span Class="bold">=</span> is used, the section address is set to <span Class="emphasis">val</span>. Otherwise, <span Class="emphasis">val</span> is added to or subtracted from the section address. See the comments under <span Class="bold">--change-addresses</span>, above. If <span Class="emphasis">sectionpattern</span> does not match any sections in the input file, a warning will be issued, unless <span Class="bold">--no-change-warnings</span> is used. <p class="level0"><a name="fB--change-section-vmafR"></a><span class="nroffip">\fB--change-section-vma\fR \fIsectionpattern\fR\fB{=,+,-}\fR\fIval\fR 4</span> <p class="level1"> <p class="level1">Set or change the s-1VMAs0 address of any section matching <span Class="emphasis">sectionpattern</span>. The s-1VMAs0 address is the address where the section will be located once the program has started executing. Normally this is the same as the s-1LMAs0 address, which is the address where the section will be loaded into memory, but on some systems, especially those where a program is held in s-1ROM,s0 the two can be different. If <span Class="bold">=</span> is used, the section address is set to <span Class="emphasis">val</span>. Otherwise, <span Class="emphasis">val</span> is added to or subtracted from the section address. See the comments under <span Class="bold">--change-addresses</span>, above. If <span Class="emphasis">sectionpattern</span> does not match any sections in the input file, a warning will be issued, unless <span Class="bold">--no-change-warnings</span> is used. <p class="level0"><a name="fB--change-warningsfR"></a><span class="nroffip">\fB--change-warnings\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1"> <p class="level0"><a name="fB--adjust-warningsfR"></a><span class="nroffip">\fB--adjust-warnings\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1">If <span Class="bold">--change-section-address</span> or <span Class="bold">--change-section-lma</span> or <span Class="bold">--change-section-vma</span> is used, and the section pattern does not match any sections, issue a warning. This is the default. <p class="level0"><a name="fB--no-change-warningsfR"></a><span class="nroffip">\fB--no-change-warnings\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1"> <p class="level0"><a name="fB--no-adjust-warningsfR"></a><span class="nroffip">\fB--no-adjust-warnings\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1">Do not issue a warning if <span Class="bold">--change-section-address</span> or <span Class="bold">--adjust-section-lma</span> or <span Class="bold">--adjust-section-vma</span> is used, even if the section pattern does not match any sections. <p class="level0"><a name="fB--set-section-flagsfR"></a><span class="nroffip">\fB--set-section-flags\fR \fIsectionpattern\fR\fB=\fR\fIflags\fR 4</span> <p class="level1"> <p class="level1">Set the flags for any sections matching <span Class="emphasis">sectionpattern</span>. The <span Class="emphasis">flags</span> argument is a comma separated string of flag names. The recognized names are <span Class="bold">alloc</span>, <span Class="bold">contents</span>, <span Class="bold">load</span>, <span Class="bold">noload</span>, <span Class="bold">readonly</span>, <span Class="bold">code</span>, <span Class="bold">data</span>, <span Class="bold">rom</span>, <span Class="bold">share</span>, and <span Class="bold">debug</span>. You can set the <span Class="bold">contents</span> flag for a section which does not have contents, but it is not meaningful to clear the <span Class="bold">contents</span> flag of a section which does have contents*(--just remove the section instead. Not all flags are meaningful for all object file formats. <p class="level0"><a name="fB--add-sectionfR"></a><span class="nroffip">\fB--add-section\fR \fIsectionname\fR\fB=\fR\fIfilename\fR 4</span> <p class="level1"> <p class="level1">Add a new section named <span Class="emphasis">sectionname</span> while copying the file. The contents of the new section are taken from the file <span Class="emphasis">filename</span>. The size of the section will be the size of the file. This option only works on file formats which can support sections with arbitrary names. Note - it may be necessary to use the <span Class="bold">--set-section-flags</span> option to set the attributes of the newly created section. <p class="level0"><a name="fB--dump-sectionfR"></a><span class="nroffip">\fB--dump-section\fR \fIsectionname\fR\fB=\fR\fIfilename\fR 4</span> <p class="level1"> <p class="level1">Place the contents of section named <span Class="emphasis">sectionname</span> into the file <span Class="emphasis">filename</span>, overwriting any contents that may have been there previously. This option is the inverse of <span Class="bold">--add-section</span>. This option is similar to the <span Class="bold">--only-section</span> option except that it does not create a formatted file, it just dumps the contents as raw binary data, without applying any relocations. The option can be specified more than once. <p class="level0"><a name="fB--rename-sectionfR"></a><span class="nroffip">\fB--rename-section\fR \fIoldname\fR\fB=\fR\fInewname\fR\fB[,\fR\fIflags\fR\fB]\fR 4</span> <p class="level1"> <p class="level1">Rename a section from <span Class="emphasis">oldname</span> to <span Class="emphasis">newname</span>, optionally changing the section's flags to <span Class="emphasis">flags</span> in the process. This has the advantage over usng a linker script to perform the rename in that the output stays as an object file and does not become a linked executable. <p class="level1">This option is particularly helpful when the input format is binary, since this will always create a section called .data. If for example, you wanted instead to create a section called .rodata containing binary data you could use the following command line to achieve it: <p class="level1"> <p class="level1">&nbsp; objcopy -I binary -O &lt;output_format&gt; -B &lt;architecture&gt; e &nbsp; --rename-section .data=.rodata,alloc,load,readonly,data,contents e &nbsp; &lt;input_binary_file&gt; &lt;output_object_file&gt; <p class="level1"> <p class="level0"><a name="fB--long-section-names"></a><span class="nroffip">\fB--long-section-names {enable,disable,keep}\fR 4</span> <p class="level1"> <p class="level1">Controls the handling of long section names when processing f(CW*(C`COFF*(C'</span> and f(CW*(C`PE-COFF*(C'</span> object formats. The default behaviour, <span Class="bold">keep</span>, is to preserve long section names if any are present in the input file. The <span Class="bold">enable</span> and <span Class="bold">disable</span> options forcibly enable or disable the use of long section names in the output object; when <span Class="bold">disable</span> is in effect, any long section names in the input object will be truncated. The <span Class="bold">enable</span> option will only emit long section names if any are present in the inputs; this is mostly the same as <span Class="bold">keep</span>, but it is left undefined whether the <span Class="bold">enable</span> option might force the creation of an empty string table in the output file. <p class="level0"><a name="fB--change-leading-charfR"></a><span class="nroffip">\fB--change-leading-char\fR 4</span> <p class="level1"> <p class="level1">Some object file formats use special characters at the start of symbols. The most common such character is underscore, which compilers often add before every symbol. This option tells <span Class="bold">objcopy</span> to change the leading character of every symbol when it converts between object file formats. If the object file formats use the same leading character, this option has no effect. Otherwise, it will add a character, or remove a character, or change a character, as appropriate. <p class="level0"><a name="fB--remove-leading-charfR"></a><span class="nroffip">\fB--remove-leading-char\fR 4</span> <p class="level1"> <p class="level1">If the first character of a global symbol is a special symbol leading character used by the object file format, remove the character. The most common symbol leading character is underscore. This option will remove a leading underscore from all global symbols. This can be useful if you want to link together objects of different file formats with different conventions for symbol names. This is different from <span Class="bold">--change-leading-char</span> because it always changes the symbol name when appropriate, regardless of the object file format of the output file. <p class="level0"><a name="fB--reverse-bytesfRfInumfR"></a><span class="nroffip">\fB--reverse-bytes=\fR\fInum\fR 4</span> <p class="level1"> <p class="level1">Reverse the bytes in a section with output contents. A section length must be evenly divisible by the value given in order for the swap to be able to take place. Reversing takes place before the interleaving is performed. <p class="level1">This option is used typically in generating s-1ROMs0 images for problematic target systems. For example, on some target boards, the 32-bit words fetched from 8-bit ROMs are re-assembled in little-endian byte order regardless of the s-1CPUs0 byte order. Depending on the programming model, the endianness of the s-1ROMs0 may need to be modified. <p class="level1">Consider a simple file with a section containing the following eight bytes: f(CW12345678</span>. <p class="level1">Using <span Class="bold">--reverse-bytes=2</span> for the above example, the bytes in the output file would be ordered f(CW21436587</span>. <p class="level1">Using <span Class="bold">--reverse-bytes=4</span> for the above example, the bytes in the output file would be ordered f(CW43218765</span>. <p class="level1">By using <span Class="bold">--reverse-bytes=2</span> for the above example, followed by <span Class="bold">--reverse-bytes=4</span> on the output file, the bytes in the second output file would be ordered f(CW34127856</span>. <p class="level0"><a name="fB--srec-lenfRfIivalfR"></a><span class="nroffip">\fB--srec-len=\fR\fIival\fR 4</span> <p class="level1"> <p class="level1">Meaningful only for srec output. Set the maximum length of the Srecords being produced to <span Class="emphasis">ival</span>. This length covers both address, data and crc fields. <p class="level0"><a name="fB--srec-forceS3fR"></a><span class="nroffip">\fB--srec-forceS3\fR 4</span> <p class="level1"> <p class="level1">Meaningful only for srec output. Avoid generation of S1/S2 records, creating S3-only record format. <p class="level0"><a name="fB--redefine-symfR"></a><span class="nroffip">\fB--redefine-sym\fR \fIold\fR\fB=\fR\fInew\fR 4</span> <p class="level1"> <p class="level1">Change the name of a symbol <span Class="emphasis">old</span>, to <span Class="emphasis">new</span>. This can be useful when one is trying link two things together for which you have no source, and there are name collisions. <p class="level0"><a name="fB--redefine-symsfRfIfilenamefR"></a><span class="nroffip">\fB--redefine-syms=\fR\fIfilename\fR 4</span> <p class="level1"> <p class="level1">Apply <span Class="bold">--redefine-sym</span> to each symbol pair "<span Class="emphasis">old</span> <span Class="emphasis">new</span>" listed in the file <span Class="emphasis">filename</span>. <span Class="emphasis">filename</span> is simply a flat file, with one symbol pair per line. Line comments may be introduced by the hash character. This option may be given more than once. <p class="level0"><a name="fB--weakenfR"></a><span class="nroffip">\fB--weaken\fR 4</span> <p class="level1"> <p class="level1">Change all global symbols in the file to be weak. This can be useful when building an object which will be linked against other objects using the <span Class="bold">-R</span> option to the linker. This option is only effective when using an object file format which supports weak symbols. <p class="level0"><a name="fB--keep-symbolsfRfIfilenamefR"></a><span class="nroffip">\fB--keep-symbols=\fR\fIfilename\fR 4</span> <p class="level1"> <p class="level1">Apply <span Class="bold">--keep-symbol</span> option to each symbol listed in the file <span Class="emphasis">filename</span>. <span Class="emphasis">filename</span> is simply a flat file, with one symbol name per line. Line comments may be introduced by the hash character. This option may be given more than once. <p class="level0"><a name="fB--strip-symbolsfRfIfilenamefR"></a><span class="nroffip">\fB--strip-symbols=\fR\fIfilename\fR 4</span> <p class="level1"> <p class="level1">Apply <span Class="bold">--strip-symbol</span> option to each symbol listed in the file <span Class="emphasis">filename</span>. <span Class="emphasis">filename</span> is simply a flat file, with one symbol name per line. Line comments may be introduced by the hash character. This option may be given more than once. <p class="level0"><a name="fB--strip-unneeded-symbolsfRfIfilenamefR"></a><span class="nroffip">\fB--strip-unneeded-symbols=\fR\fIfilename\fR 4</span> <p class="level1"> <p class="level1">Apply <span Class="bold">--strip-unneeded-symbol</span> option to each symbol listed in the file <span Class="emphasis">filename</span>. <span Class="emphasis">filename</span> is simply a flat file, with one symbol name per line. Line comments may be introduced by the hash character. This option may be given more than once. <p class="level0"><a name="fB--keep-global-symbolsfRfIfilenamefR"></a><span class="nroffip">\fB--keep-global-symbols=\fR\fIfilename\fR 4</span> <p class="level1"> <p class="level1">Apply <span Class="bold">--keep-global-symbol</span> option to each symbol listed in the file <span Class="emphasis">filename</span>. <span Class="emphasis">filename</span> is simply a flat file, with one symbol name per line. Line comments may be introduced by the hash character. This option may be given more than once. <p class="level0"><a name="fB--localize-symbolsfRfIfilenamefR"></a><span class="nroffip">\fB--localize-symbols=\fR\fIfilename\fR 4</span> <p class="level1"> <p class="level1">Apply <span Class="bold">--localize-symbol</span> option to each symbol listed in the file <span Class="emphasis">filename</span>. <span Class="emphasis">filename</span> is simply a flat file, with one symbol name per line. Line comments may be introduced by the hash character. This option may be given more than once. <p class="level0"><a name="fB--globalize-symbolsfRfIfilenamefR"></a><span class="nroffip">\fB--globalize-symbols=\fR\fIfilename\fR 4</span> <p class="level1"> <p class="level1">Apply <span Class="bold">--globalize-symbol</span> option to each symbol listed in the file <span Class="emphasis">filename</span>. <span Class="emphasis">filename</span> is simply a flat file, with one symbol name per line. Line comments may be introduced by the hash character. This option may be given more than once. <p class="level0"><a name="fB--weaken-symbolsfRfIfilenamefR"></a><span class="nroffip">\fB--weaken-symbols=\fR\fIfilename\fR 4</span> <p class="level1"> <p class="level1">Apply <span Class="bold">--weaken-symbol</span> option to each symbol listed in the file <span Class="emphasis">filename</span>. <span Class="emphasis">filename</span> is simply a flat file, with one symbol name per line. Line comments may be introduced by the hash character. This option may be given more than once. <p class="level0"><a name="fB--alt-machine-codefRfIindexfR"></a><span class="nroffip">\fB--alt-machine-code=\fR\fIindex\fR 4</span> <p class="level1"> <p class="level1">If the output architecture has alternate machine codes, use the <span Class="emphasis">index</span>th code instead of the default one. This is useful in case a machine is assigned an official code and the tool-chain adopts the new code, but other applications still depend on the original code being used. For s-1ELFs0 based architectures if the <span Class="emphasis">index</span> alternative does not exist then the value is treated as an absolute number to be stored in the e_machine field of the s-1ELFs0 header. <p class="level0"><a name="fB--writable-textfR"></a><span class="nroffip">\fB--writable-text\fR 4</span> <p class="level1"> <p class="level1">Mark the output text as writable. This option isn't meaningful for all object file formats. <p class="level0"><a name="fB--readonly-textfR"></a><span class="nroffip">\fB--readonly-text\fR 4</span> <p class="level1"> <p class="level1">Make the output text write protected. This option isn't meaningful for all object file formats. <p class="level0"><a name="fB--purefR"></a><span class="nroffip">\fB--pure\fR 4</span> <p class="level1"> <p class="level1">Mark the output file as demand paged. This option isn't meaningful for all object file formats. <p class="level0"><a name="fB--impurefR"></a><span class="nroffip">\fB--impure\fR 4</span> <p class="level1"> <p class="level1">Mark the output file as impure. This option isn't meaningful for all object file formats. <p class="level0"><a name="fB--prefix-symbolsfRfIstringfR"></a><span class="nroffip">\fB--prefix-symbols=\fR\fIstring\fR 4</span> <p class="level1"> <p class="level1">Prefix all symbols in the output file with <span Class="emphasis">string</span>. <p class="level0"><a name="fB--prefix-sectionsfRfIstringfR"></a><span class="nroffip">\fB--prefix-sections=\fR\fIstring\fR 4</span> <p class="level1"> <p class="level1">Prefix all section names in the output file with <span Class="emphasis">string</span>. <p class="level0"><a name="fB--prefix-alloc-sectionsfRfIstringfR"></a><span class="nroffip">\fB--prefix-alloc-sections=\fR\fIstring\fR 4</span> <p class="level1"> <p class="level1">Prefix all the names of all allocated sections in the output file with <span Class="emphasis">string</span>. <p class="level0"><a name="fB--add-gnu-debuglinkfRfIpath-to-filefR"></a><span class="nroffip">\fB--add-gnu-debuglink=\fR\fIpath-to-file\fR 4</span> <p class="level1"> <p class="level1">Creates a .gnu_debuglink section which contains a reference to <span Class="emphasis">path-to-file</span> and adds it to the output file. <p class="level0"><a name="fB--keep-file-symbolsfR"></a><span class="nroffip">\fB--keep-file-symbols\fR 4</span> <p class="level1"> <p class="level1">When stripping a file, perhaps with <span Class="bold">--strip-debug</span> or <span Class="bold">--strip-unneeded</span>, retain any symbols specifying source file names, which would otherwise get stripped. <p class="level0"><a name="fB--only-keep-debugfR"></a><span class="nroffip">\fB--only-keep-debug\fR 4</span> <p class="level1"> <p class="level1">Strip a file, removing contents of any sections that would not be stripped by <span Class="bold">--strip-debug</span> and leaving the debugging sections intact. In s-1ELFs0 files, this preserves all note sections in the output. <p class="level1">The intention is that this option will be used in conjunction with <span Class="bold">--add-gnu-debuglink</span> to create a two part executable. One a stripped binary which will occupy less space in s-1RAMs0 and in a distribution and the second a debugging information file which is only needed if debugging abilities are required. The suggested procedure to create these files is as follows: <p class="level2"> <p class="level1"><a name="1Link"></a><span class="nroffip">1.&lt;Link the executable as normal. Assuming that is is called&gt; 4</span> <p class="level2"> <p class="level2">f(CW*(C`foo*(C'</span> then... <p class="level2"> <p class="level2"> <p class="level2">create a file containing the debugging info. <p class="level2"> <p class="level2"> <p class="level2">stripped executable. <p class="level2"> <p class="level2"> <p class="level2">to add a link to the debugging info into the stripped executable. <p class="level1"> <p class="level2"> <p class="level2">Note---the choice of f(CW*(C`.dbg*(C'</span> as an extension for the debug info file is arbitrary. Also the f(CW*(C`--only-keep-debug*(C'</span> step is optional. You could instead do this: <p class="level1"><a name="1Link"></a><span class="nroffip">1.&lt;Link the executable as normal.&gt; 4</span> <p class="level2"> <p class="level2"> <p class="level2"> <p class="level2"> <p class="level2"> <p class="level2"> <p class="level2"> <p class="level2"> <p class="level2"> <p class="level2"> <p class="level2"> <p class="level2"> <p class="level1"> <p class="level2"> <p class="level2"> <p class="level2">i.e., the file pointed to by the <span Class="bold">--add-gnu-debuglink</span> can be the full executable. It does not have to be a file created by the <span Class="bold">--only-keep-debug</span> switch. <p class="level2">Note---this switch is only intended for use on fully linked files. It does not make sense to use it on object files where the debugging information may be incomplete. Besides the gnu_debuglink feature currently only supports the presence of one filename containing debugging information, not multiple filenames on a one-per-object-file basis. <p class="level1"> <p class="level0"><a name="fB--strip-dwofR"></a><span class="nroffip">\fB--strip-dwo\fR 4</span> <p class="level1"> <p class="level1">Remove the contents of all s-1DWARF s0.dwo sections, leaving the remaining debugging sections and all symbols intact. This option is intended for use by the compiler as part of the <span Class="bold">-gsplit-dwarf</span> option, which splits debug information between the .o file and a separate .dwo file. The compiler generates all debug information in the same file, then uses the <span Class="bold">--extract-dwo</span> option to copy the .dwo sections to the .dwo file, then the <span Class="bold">--strip-dwo</span> option to remove those sections from the original .o file. <p class="level0"><a name="fB--extract-dwofR"></a><span class="nroffip">\fB--extract-dwo\fR 4</span> <p class="level1"> <p class="level1">Extract the contents of all s-1DWARF s0.dwo sections. See the <span Class="bold">--strip-dwo</span> option for more information. <p class="level0"><a name="fB--file-alignmentfR"></a><span class="nroffip">\fB--file-alignment\fR \fInum\fR 4</span> <p class="level1"> <p class="level1">Specify the file alignment. Sections in the file will always begin at file offsets which are multiples of this number. This defaults to 512. [This option is specific to s-1PEs0 targets.] <p class="level0"><a name="fB--heapfR"></a><span class="nroffip">\fB--heap\fR \fIreserve\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1"> <p class="level0"><a name="fB--heapfR"></a><span class="nroffip">\fB--heap\fR \fIreserve\fR\fB,\fR\fIcommit\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1">Specify the number of bytes of memory to reserve (and optionally commit) to be used as heap for this program. [This option is specific to s-1PEs0 targets.] <p class="level0"><a name="fB--image-basefR"></a><span class="nroffip">\fB--image-base\fR \fIvalue\fR 4</span> <p class="level1"> <p class="level1">Use <span Class="emphasis">value</span> as the base address of your program or dll. This is the lowest memory location that will be used when your program or dll is loaded. To reduce the need to relocate and improve performance of your dlls, each should have a unique base address and not overlap any other dlls. The default is 0x400000 for executables, and 0x10000000 for dlls. [This option is specific to s-1PEs0 targets.] <p class="level0"><a name="fB--section-alignmentfR"></a><span class="nroffip">\fB--section-alignment\fR \fInum\fR 4</span> <p class="level1"> <p class="level1">Sets the section alignment. Sections in memory will always begin at addresses which are a multiple of this number. Defaults to 0x1000. [This option is specific to s-1PEs0 targets.] <p class="level0"><a name="fB--stackfR"></a><span class="nroffip">\fB--stack\fR \fIreserve\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1"> <p class="level0"><a name="fB--stackfR"></a><span class="nroffip">\fB--stack\fR \fIreserve\fR\fB,\fR\fIcommit\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1">Specify the number of bytes of memory to reserve (and optionally commit) to be used as stack for this program. [This option is specific to s-1PEs0 targets.] <p class="level0"><a name="fB--subsystemfR"></a><span class="nroffip">\fB--subsystem\fR \fIwhich\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1"> <p class="level0"><a name="fB--subsystemfR"></a><span class="nroffip">\fB--subsystem\fR \fIwhich\fR\fB:\fR\fImajor\fR 4</span> <p class="level1"> <p class="level1"> <p class="level0"><a name="fB--subsystemfR"></a><span class="nroffip">\fB--subsystem\fR \fIwhich\fR\fB:\fR\fImajor\fR\fB.\fR\fIminor\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1">Specifies the subsystem under which your program will execute. The legal values for <span Class="emphasis">which</span> are f(CW*(C`native*(C'</span>, f(CW*(C`windows*(C'</span>, f(CW*(C`console*(C'</span>, f(CW*(C`posix*(C'</span>, f(CW*(C`efi-app*(C'</span>, f(CW*(C`efi-bsd*(C'</span>, f(CW*(C`efi-rtd*(C'</span>, f(CW*(C`sal-rtd*(C'</span>, and f(CW*(C`xbox*(C'</span>. You may optionally set the subsystem version also. Numeric values are also accepted for <span Class="emphasis">which</span>. [This option is specific to s-1PEs0 targets.] <p class="level0"><a name="fB--extract-symbolfR"></a><span class="nroffip">\fB--extract-symbol\fR 4</span> <p class="level1"> <p class="level1">Keep the file's section flags and symbols but remove all section data. Specifically, the option: <p class="level2"> <p class="level1"><a name="removes"></a><span class="nroffip">*&lt;removes the contents of all sections;&gt; 4</span> <p class="level2"> <p class="level2"> <p class="level2"> <p class="level1"><a name="sets"></a><span class="nroffip">*&lt;sets the size of every section to zero; and&gt; 4</span> <p class="level2"> <p class="level2"> <p class="level1"><a name="sets"></a><span class="nroffip">*&lt;sets the file's start address to zero.&gt; 4</span> <p class="level2"> <p class="level2"> <p class="level1"> <p class="level2"> <p class="level2"> <p class="level2">This option is used to build a <span Class="emphasis">.sym</span> file for a VxWorks kernel. It can also be a useful way of reducing the size of a <span Class="bold">--just-symbols</span> linker input file. <p class="level1"> <p class="level0"><a name="fB--compress-debug-sectionsfR"></a><span class="nroffip">\fB--compress-debug-sections\fR 4</span> <p class="level1"> <p class="level1">Compress s-1DWARFs0 debug sections using zlib. <p class="level0"><a name="fB--decompress-debug-sectionsfR"></a><span class="nroffip">\fB--decompress-debug-sections\fR 4</span> <p class="level1"> <p class="level1">Decompress s-1DWARFs0 debug sections using zlib. <p class="level0"><a name="fB-VfR"></a><span class="nroffip">\fB-V\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1"> <p class="level0"><a name="fB--versionfR"></a><span class="nroffip">\fB--version\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1">Show the version number of <span Class="bold">objcopy</span>. <p class="level0"><a name="fB-vfR"></a><span class="nroffip">\fB-v\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1"> <p class="level0"><a name="fB--verbosefR"></a><span class="nroffip">\fB--verbose\fR 4</span> <p class="level1"> <p class="level1"> <p class="level1">Verbose output: list all object files modified. In the case of archives, <span Class="bold">objcopy -V</span> lists all members of the archive. <p class="level0"><a name="fB--helpfR"></a><span class="nroffip">\fB--help\fR 4</span> <p class="level1"> <p class="level1">Show a summary of the options to <span Class="bold">objcopy</span>. <p class="level0"><a name="fB--infofR"></a><span class="nroffip">\fB--info\fR 4</span> <p class="level1"> <p class="level1">Display a list showing all architectures and object formats available. <p class="level0"><a name="fBfRfIfilefR"></a><span class="nroffip">\fB@\fR\fIfile\fR 4</span> <p class="level1"> <p class="level1">Read command-line options from <span Class="emphasis">file</span>. The options read are inserted in place of the original @<span Class="emphasis">file</span> option. If <span Class="emphasis">file</span> does not exist, or cannot be read, then the option will be treated literally, and not removed. <p class="level1">Options in <span Class="emphasis">file</span> are separated by whitespace. A whitespace character may be included in an option by surrounding the entire option in either single or double quotes. Any character (including a backslash) may be included by prefixing the character to be included with a backslash. The <span Class="emphasis">file</span> may itself contain additional @<span Class="emphasis">file</span> options; any such options will be processed recursively. <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2> <p class="level0"> <p class="level0"><span Class="emphasis">ld</span>|(1), <span Class="emphasis">objdump</span>|(1), and the Info entries for <span Class="emphasis">binutils</span>. <a name="COPYRIGHT"></a><h2 class="nroffsh">COPYRIGHT</h2> <p class="level0"> <p class="level0">Copyright (c) 1991-2014 Free Software Foundation, Inc. <p class="level0">Permission is granted to copy, distribute and/or modify this document under the terms of the s-1GNUs0 Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled *(L"s-1GNUs0 Free Documentation License*(R".
103.741776
8,562
0.709647
7aee5f4f722a50001a2708fd78d1193ec77a7cbb
382
sql
SQL
sql/asm_extent_distribution.sql
fatdba/oracle-script-lib
efa9f5623bc3f27cea37a815f5bc3766d21b1b19
[ "MIT" ]
null
null
null
sql/asm_extent_distribution.sql
fatdba/oracle-script-lib
efa9f5623bc3f27cea37a815f5bc3766d21b1b19
[ "MIT" ]
null
null
null
sql/asm_extent_distribution.sql
fatdba/oracle-script-lib
efa9f5623bc3f27cea37a815f5bc3766d21b1b19
[ "MIT" ]
2
2022-01-16T20:34:08.000Z
2022-02-10T16:45:46.000Z
-- asm_extent_distribution.sql -- need to add parameter inputs col phys_extent format 999999 col virt_extent format 999999 col disk_num format 9999 col au_num format 999999 select PXN_KFFXP phys_extent, XNUM_KFFXP virt_extent, DISK_KFFXP disk_num, AU_KFFXP au_num from X$KFFXP where NUMBER_KFFXP=256 -- ASM file 256 AND GROUP_KFFXP=2 -- diskgroup number 2 order by 1 /
18.190476
44
0.790576
b85d8066a7d97bc78aad53a13d4cf246dc919ca7
667
rs
Rust
s25/src/utils.rs
3c1u/s25
2123fe9c8553b40272617412d2e4263a513c2d7f
[ "MIT" ]
null
null
null
s25/src/utils.rs
3c1u/s25
2123fe9c8553b40272617412d2e4263a513c2d7f
[ "MIT" ]
142
2020-06-01T17:16:01.000Z
2022-03-16T05:08:26.000Z
s25/src/utils.rs
3c1u/s25
2123fe9c8553b40272617412d2e4263a513c2d7f
[ "MIT" ]
null
null
null
pub(crate) mod io { pub fn push_i16(v: &mut Vec<u8>, a: i16) { let a = a.to_le_bytes(); v.push(a[0]); v.push(a[1]); } pub fn push_i32(v: &mut Vec<u8>, a: i32) { let a = a.to_le_bytes(); v.push(a[0]); v.push(a[1]); v.push(a[2]); v.push(a[3]); } } pub fn rgba_to_bgra(rgba: &[u8]) -> Vec<u8> { assert!(rgba.len() & 0x03 == 0); let mut bgra = vec![0; rgba.len()]; for i in 0..(rgba.len() >> 2) { let i = i << 2; bgra[i] = rgba[i + 2]; bgra[i + 1] = rgba[i + 1]; bgra[i + 2] = rgba[i + 0]; bgra[i + 3] = rgba[i + 3]; } bgra }
20.84375
46
0.416792