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
9c0f542f9e148d682b5a79f9b52af289f069f0fd
232
ts
TypeScript
src/modules/user/dtos/createUser.dto.ts
bschulte/nestjs-boilerplate-mongo
1892ec5189b234652ac282219fbdb4bd1d3c72ef
[ "MIT" ]
3
2020-10-12T15:11:47.000Z
2021-04-14T08:46:38.000Z
src/modules/user/dtos/createUser.dto.ts
bschulte/nestjs-boilerplate-mongo
1892ec5189b234652ac282219fbdb4bd1d3c72ef
[ "MIT" ]
5
2020-09-07T08:43:33.000Z
2021-09-21T03:42:52.000Z
src/modules/user/dtos/createUser.dto.ts
bschulte/nestjs-boilerplate-mongo
1892ec5189b234652ac282219fbdb4bd1d3c72ef
[ "MIT" ]
2
2020-08-31T13:57:28.000Z
2021-04-01T13:56:53.000Z
import { IsEmail, IsString } from 'class-validator'; import { ArgsType, Field } from 'type-graphql'; @ArgsType() export class CreateUserDto { @Field() @IsEmail() email: string; @Field() @IsString() password: string; }
16.571429
52
0.668103
61256e555a175e86b5db65662936ef1aabc900c8
533
css
CSS
assets/stylesheets/windows.css
HoogleyBoogley/TranOS
db2c249fe1619261becbe2e93965646fab9dc067
[ "MIT" ]
1
2018-01-20T08:04:52.000Z
2018-01-20T08:04:52.000Z
assets/stylesheets/windows.css
HoogleyBoogley/TranOS
db2c249fe1619261becbe2e93965646fab9dc067
[ "MIT" ]
null
null
null
assets/stylesheets/windows.css
HoogleyBoogley/TranOS
db2c249fe1619261becbe2e93965646fab9dc067
[ "MIT" ]
null
null
null
.windowTopBar { background-color: #ededed; height: 25px; } .windowTopBarIcon { padding-left: 10px; padding-right: 10px; height: 100%; background-color: #e74c3c; float: right; } .windowTopBarIconImg { filter: invert(1); } .window { height: 100vh; width: calc(100vw - 80px); background-color: white; margin-top: 0; font-family: 'Roboto', sans-serif !important; z-index: 100; } .windowTopBarTitle { line-height: 25px; padding-left: 20px; color: #828282; } .windowBody { padding-left: 20px; padding-right: 20px; }
14.805556
46
0.690432
9dbbe548ede0e4981876bf6b7a817a7134f81659
855
lua
Lua
nvim/lua/core/options.lua
allancsilva/Neovim
f0502e3d9821112769d3bd2a7c9917614ae2c51f
[ "MIT" ]
null
null
null
nvim/lua/core/options.lua
allancsilva/Neovim
f0502e3d9821112769d3bd2a7c9917614ae2c51f
[ "MIT" ]
null
null
null
nvim/lua/core/options.lua
allancsilva/Neovim
f0502e3d9821112769d3bd2a7c9917614ae2c51f
[ "MIT" ]
null
null
null
-- Abreviaçoes local g = vim.g local cmd = vim.cmd local opt = vim.opt -- Leader g.mapleader = ',' opt.title = true opt.signcolumn = "yes" opt.splitbelow = true opt.splitright = true opt.termguicolors = true opt.fillchars = { vert = ' ' } opt.showtabline = 2 opt.scrolloff = 5 opt.mouse = 'a' opt.undolevels = 1000 opt.shortmess:append "sI" opt.showmode = true opt.hidden = true opt.wrapscan = true opt.backup = true opt.writebackup = false opt.showcmd = true opt.showmatch = true opt.ignorecase = true opt.hlsearch = true opt.smartcase = true opt.errorbells = false opt.joinspaces = false opt.lazyredraw = true opt.encoding = 'UTF-8' opt.fileformat = 'unix' opt.softtabstop = 2 opt.expandtab = true opt.shiftwidth = 2 opt.number = true opt.colorcolumn = "+1" opt.signcolumn = 'yes' opt.relativenumber = true opt.foldenable = false opt.cursorline = true
19.883721
30
0.725146
90f9bbdb2a6c77c7d79c00c30a7eea4fb7ab3f39
6,092
py
Python
moten/tests/test_totalenergy.py
gallantlab/pymoten
6fd403f079319b6b96d64aaf38a161d8cda0a69d
[ "BSD-2-Clause" ]
19
2020-08-24T08:14:57.000Z
2022-03-13T04:43:49.000Z
moten/tests/test_totalenergy.py
gallantlab/pymoten
6fd403f079319b6b96d64aaf38a161d8cda0a69d
[ "BSD-2-Clause" ]
8
2020-05-11T08:55:12.000Z
2022-03-13T01:25:02.000Z
moten/tests/test_totalenergy.py
gallantlab/pymoten
6fd403f079319b6b96d64aaf38a161d8cda0a69d
[ "BSD-2-Clause" ]
3
2021-01-21T09:54:57.000Z
2021-09-26T01:28:05.000Z
''' ''' import time import numpy as np from scipy import linalg from importlib import reload from moten import (pyramids, extras, utils, core, io, ) reload(io) ############################## # video info ############################## video_file = 'http://anwarnunez.github.io/downloads/avsnr150s24fps_tiny.mp4' nimages = 333 small_size = (36, 64) # downsampled size (vdim, hdim) 16:9 aspect ratio ############################## # in-memory ############################## print('Direct computation') frame_generator = io.generate_frames_from_greyvideo(video_file, size=small_size, nimages=nimages) frames = np.asarray([t for t in frame_generator], dtype=np.float64) frames = frames.reshape(frames.shape[0], -1) frames_diff = utils.pointwise_square(frames[1:] - frames[:-1]) xtx_direct = frames_diff.T @ frames_diff # svd decomposotion on full dataset Ufull, Sfull, Vtfull = linalg.svd(frames_diff, full_matrices=False) USfull = np.dot(Ufull, np.diag(Sfull)) # (ntimepoints, npcs) Vfull = Vtfull.T # (npixels, npcs) npcs = Vfull.shape[1] # decomposition on dataset covariance Lfull, Qfull = linalg.eigh(xtx_direct) Qfull = Qfull[:, ::-1][:,:npcs] # eigenvecs (n, npcs) Pfull = np.dot(frames_diff, Qfull) # projection ############################## # batched frames ############################## def test_batched(): frame_diff_generator = io.generate_frame_difference_from_greyvideo(video_file, size=small_size, nimages=nimages) nframes, xtx = extras.pixbypix_covariance_from_frames_generator(frame_diff_generator, batch_size=1000, dtype=np.float64) np.testing.assert_array_almost_equal(xtx, xtx_direct) # compute pcs ############################## def test_svd_projections(): # they are flipped relative to each other np.testing.assert_array_almost_equal(np.abs(Qfull), np.abs(Vfull)) ############################## # using class ############################## import moten.core totalmoten = moten.extras.StimulusTotalMotionEnergy(video_file, size=small_size, nimages=nimages, dtype=np.float64) def test_totalmoten_spatial_pcs(): totalmoten.compute_pixel_by_pixel_covariance() # check spatial PCs totalmoten.compute_spatial_pcs(npcs=npcs) np.testing.assert_array_almost_equal(np.abs(Qfull), np.abs(totalmoten.decomposition_spatial_pcs)) def test_totalmoten_temporal_projection(): # projection proj = np.dot(frames_diff, totalmoten.decomposition_spatial_pcs) np.testing.assert_array_almost_equal(np.abs(Pfull), np.abs(proj)) np.testing.assert_array_almost_equal(np.abs(USfull), np.abs(proj)) def test_totalmoten_temporal_pcs(): # check temporal PCs totalmoten.compute_temporal_pcs(skip_first=True) # ntimepoints x npcs temporal_pcs = np.asarray(totalmoten.decomposition_temporal_pcs).squeeze() # same as projecting all frames at once proj = np.dot(frames_diff, totalmoten.decomposition_spatial_pcs) np.testing.assert_array_almost_equal(np.abs(proj), np.abs(temporal_pcs)) # same as SVD on original data np.testing.assert_array_almost_equal(np.abs(USfull), np.abs(temporal_pcs)) ############################## # batched testing ############################## def test_implementation(): if 0: batch_size = 100 idxframe = 0 first_frame = frame_diff_generator.__next__() vdim, hdim = first_frame.shape npixels = vdim*hdim framediff_buffer = np.zeros((batch_size, npixels), dtype=np.float64) XTX = np.zeros((npixels, npixels), dtype=np.float64) import time start_time = time.time() RUN = True while RUN: framediff_buffer *= 0.0 # clear buffer try: for batch_frame_idx in range(batch_size): framediff_buffer[batch_frame_idx] = frame_diff_generator.__next__().reshape(1, -1) except StopIteration: print('Finished buffer') RUN = False finally: idxframe += batch_size XTX = framediff_buffer.T @ framediff_buffer print(time.time() - start_time) from scipy import linalg L, Q = linalg.eigh(XTX) # flip to descending order V = Q[:,::-1] L = L[::-1] ############################## # slow, light memory ############################## def test_slow_covar(): frame_generator = io.generate_frames_from_greyvideo(video_file, size=small_size, nimages=nimages) previous_frame = frame_generator.__next__() previous_frame = previous_frame.reshape(1, -1).astype(np.float64) npixels = previous_frame.shape[1] # XTX = previous_frame.T @ previous_frame # DO NOT INCLUDE FIRST FRAME XTX = np.zeros((npixels, npixels), dtype=np.float64) start_time = time.time() for idx, current_frame in enumerate(frame_generator): current_frame = np.asarray(current_frame.reshape(1, -1), dtype=np.float64) frame_diff = utils.pointwise_square(current_frame - previous_frame) XTX += frame_diff.T @ frame_diff previous_frame = current_frame print(time.time() - start_time) # both are equal np.testing.assert_array_almost_equal(XTX, xtx_direct)
34.224719
102
0.558601
71806046d4cb802501f27c9ffc4d0a7784b05957
242
ts
TypeScript
src/utils/require-indirection.ts
theKashey/eslint-plugin-relations
5c0ec505fe2667194897d341aa6b8f4d64030d32
[ "MIT" ]
18
2021-12-13T06:53:12.000Z
2021-12-31T18:14:02.000Z
src/utils/require-indirection.ts
theKashey/eslint-plugin-relations
5c0ec505fe2667194897d341aa6b8f4d64030d32
[ "MIT" ]
1
2022-03-14T09:21:30.000Z
2022-03-14T09:21:30.000Z
src/utils/require-indirection.ts
theKashey/eslint-plugin-relations
5c0ec505fe2667194897d341aa6b8f4d64030d32
[ "MIT" ]
null
null
null
export const requireConfigurationFile = (filename: string) => { try { // check file existence. Return empty array if file does not exists require.resolve(filename); } catch (e) { return []; } return require(filename); };
22
71
0.661157
7fa33e2ceacf45e873652ab3acb9552758affd4a
2,526
rs
Rust
testing/jormungandr-integration-tests/src/common/load/bootstrap/scenario/mod.rs
eugene-babichenko/jormungandr
75151bdcb77567597e2161dac17656b2a8fcd962
[ "Apache-2.0", "MIT" ]
null
null
null
testing/jormungandr-integration-tests/src/common/load/bootstrap/scenario/mod.rs
eugene-babichenko/jormungandr
75151bdcb77567597e2161dac17656b2a8fcd962
[ "Apache-2.0", "MIT" ]
null
null
null
testing/jormungandr-integration-tests/src/common/load/bootstrap/scenario/mod.rs
eugene-babichenko/jormungandr
75151bdcb77567597e2161dac17656b2a8fcd962
[ "Apache-2.0", "MIT" ]
null
null
null
mod duration; mod iteration; use assert_fs::fixture::PathChild; pub use duration::DurationBasedClientLoad; pub use iteration::IterationBasedClientLoad; use crate::common::jormungandr::{ConfigurationBuilder, JormungandrProcess, Starter, StartupError}; use std::path::PathBuf; use indicatif::{ProgressBar, ProgressStyle}; use std::{fs, result::Result}; use super::ClientLoadConfig; use assert_fs::TempDir; use jormungandr_testing_utils::testing::file; pub fn copy_initial_storage_if_used( config: &ClientLoadConfig, storage_folder: &str, temp_dir: &TempDir, ) { if let Some(storage) = &config.initial_storage { let client_storage: PathBuf = temp_dir.child(storage_folder.to_string()).path().into(); if client_storage.exists() { fs::remove_dir_all(&client_storage).expect("cannot remove existing client storage"); } fs::create_dir(&client_storage).expect("cannot create client storage"); file::copy_folder(storage, &client_storage, true); } } pub fn start_node( client_config: &ClientLoadConfig, storage_folder_name: &str, temp_dir: &TempDir, ) -> Result<JormungandrProcess, StartupError> { copy_initial_storage_if_used(client_config, &storage_folder_name, temp_dir); let config = ConfigurationBuilder::new() .with_trusted_peers(vec![client_config.trusted_peer()]) .with_block_hash(client_config.block0_hash.to_string()) .with_storage(&temp_dir.child(storage_folder_name.to_string())) .build(temp_dir); Starter::new().config(config).passive().start_async() } pub struct ScenarioProgressBar { progress_bar: ProgressBar, } impl ScenarioProgressBar { pub fn new(progress_bar: ProgressBar, prefix: &str) -> Self { let spinner_style = ProgressStyle::default_spinner() .tick_chars("⠁⠂⠄⡀⢀⠠⠐⠈ ") .template("{prefix:.bold.dim} {spinner} {wide_msg}"); progress_bar.set_style(spinner_style); progress_bar.set_prefix(prefix); progress_bar.set_message("initializing..."); Self { progress_bar } } pub fn set_progress(&self, progress: &str) { self.progress_bar .set_message(&format!("bootstrapping... {}", progress)); } pub fn set_error_lines(&self, iter: Vec<String>) { for line in iter { self.progress_bar.set_message(&format!("Error: {}", line)); } } pub fn set_finished(&self) { self.progress_bar.set_message("bootstrapped succesfully."); } }
31.974684
98
0.685273
46c2d83f8fc5d302aca9ce6f607b3915f5e895e4
618
css
CSS
public/styles.css
humaine-anac/competition-ui
5dad5cf0fe184f6d045faa0f5be0a6ef041d70e3
[ "MIT" ]
null
null
null
public/styles.css
humaine-anac/competition-ui
5dad5cf0fe184f6d045faa0f5be0a6ef041d70e3
[ "MIT" ]
5
2020-04-02T21:16:54.000Z
2020-07-31T22:07:04.000Z
public/styles.css
humaine-anac/competition-ui
5dad5cf0fe184f6d045faa0f5be0a6ef041d70e3
[ "MIT" ]
null
null
null
html { height: 100%; width: 100%; line-height: 1.15; /* 1 */ -webkit-text-size-adjust: 100%; /* 2 */ background-color: slategray; overflow: hidden; } body { height: 100%; width: 100%; margin: 10px 2%; background-color: slategray; } #root { height: 100%; width: 100%; background-color: slategray; } input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; } input { font-family: inherit; font-size: 100%; width: 20%; line-height: 1.15; margin: 0; } input[type=number] { width: 50px; }
15.45
43
0.584142
d743e7246717fb221f3b3ed6242b76dbb47061d5
11,155
swift
Swift
PocketForecast/UserInterface/RootViewController.swift
MaoningGuo/URA
04be2c48b6d9a7d792eda231ce9f714f051ad7c7
[ "Apache-2.0" ]
null
null
null
PocketForecast/UserInterface/RootViewController.swift
MaoningGuo/URA
04be2c48b6d9a7d792eda231ce9f714f051ad7c7
[ "Apache-2.0" ]
null
null
null
PocketForecast/UserInterface/RootViewController.swift
MaoningGuo/URA
04be2c48b6d9a7d792eda231ce9f714f051ad7c7
[ "Apache-2.0" ]
null
null
null
//////////////////////////////////////////////////////////////////////////////// // // TYPHOON FRAMEWORK // Copyright 2013, Typhoon Framework Contributors // All Rights Reserved. // // NOTICE: The authors permit you to use, modify, and distribute this file // in accordance with the terms of the license agreement accompanying it. // //////////////////////////////////////////////////////////////////////////////// import Foundation private enum SideViewState { case Hidden case Showing } public class RootViewController : UIViewController, PaperFoldViewDelegate { let SIDE_CONTROLLER_WIDTH : CGFloat = 245.0 let lockQueue = dispatch_queue_create("pf.root.lockQueue", nil) private var navigator : UINavigationController! private var mainContentViewContainer : UIView! private var sideViewState : SideViewState! private var assembly : ApplicationAssembly! private var paperFoldView : PaperFoldView { get { return self.view as! PaperFoldView } set { self.view = newValue } } private var citiesListController : UIViewController? private var addCitiesController : UIViewController? private var parameterViewController : UIViewController? //------------------------------------------------------------------------------------------- // MARK: - Initialization & Destruction //------------------------------------------------------------------------------------------- public init(mainContentViewController : UIViewController, assembly : ApplicationAssembly) { super.init(nibName : nil, bundle : nil) self.assembly = assembly self.sideViewState = SideViewState.Hidden self.pushViewController(mainContentViewController, replaceRoot: true) } public required init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } //------------------------------------------------------------------------------------------- // MARK: - Public Methods //------------------------------------------------------------------------------------------- public func pushViewController(controller : UIViewController) { self.pushViewController(controller, replaceRoot: false) } public func pushViewController(controller : UIViewController, replaceRoot : Bool) { dispatch_sync(lockQueue) { if (self.navigator == nil) { self.makeNavigationControllerWithRoot(controller) } else if (replaceRoot) { self.navigator.setViewControllers([controller], animated: true) } else { self.navigator.pushViewController(controller, animated: true) } } } public func popViewControllerAnimated(animated : Bool) { let lockQueue = dispatch_queue_create("pf.root.lockQueue", nil) dispatch_sync(lockQueue) { self.navigator.popViewControllerAnimated(animated) return } } public func showCitiesListController() { if (self.sideViewState != SideViewState.Showing) { self.sideViewState = SideViewState.Showing self.citiesListController = UINavigationController(rootViewController: self.assembly.citiesListController() as! UIViewController) self.citiesListController!.view.frame = CGRectMake(0, 0, SIDE_CONTROLLER_WIDTH, self.mainContentViewContainer.frame.size.height) self.paperFoldView.delegate = self self.paperFoldView.setLeftFoldContentView(citiesListController!.view, foldCount: 5, pullFactor: 0.9) self.paperFoldView.setPaperFoldState(PaperFoldStateLeftUnfolded) self.mainContentViewContainer.setNeedsDisplay() } } public func dismissCitiesListController() { if (self.sideViewState != SideViewState.Hidden) { self.sideViewState = SideViewState.Hidden self.paperFoldView.setPaperFoldState(PaperFoldStateDefault) self.navigator!.topViewController!.viewWillAppear(true) } } public func showParameterListController() { if (self.parameterViewController == nil) { self.navigator.topViewController!.view.userInteractionEnabled = false self.parameterViewController = UINavigationController(rootViewController: self.assembly.addParameterViewController() as! UIViewController) self.parameterViewController!.view.frame = CGRectMake(0, self.view.frame.origin.y + self.view.frame.size.height, SIDE_CONTROLLER_WIDTH, self.view.frame.size.height) self.view.addSubview(self.parameterViewController!.view) UIView.transitionWithView(self.view, duration: 0.25, options: UIViewAnimationOptions.CurveEaseInOut, animations: { self.parameterViewController!.view.frame = CGRectMake(0, 0, self.SIDE_CONTROLLER_WIDTH, self.view.frame.size.height) }, completion: nil) } } public func dismissParameterListController() { if (self.parameterViewController != nil) { self.parameterViewController?.viewWillAppear(true) UIView.transitionWithView(self.view, duration: 0.25, options: UIViewAnimationOptions.CurveEaseInOut, animations: { self.parameterViewController!.view.frame = CGRectMake(0, self.view.frame.size.height, self.SIDE_CONTROLLER_WIDTH, self.view.frame.size.height) }, completion: { (completed) in self.parameterViewController!.view.removeFromSuperview() self.parameterViewController = nil self.citiesListController?.viewDidAppear(true) self.navigator.topViewController!.view.userInteractionEnabled = true let rootViewController = self.assembly.rootViewController() as! RootViewController // rootViewController.showAddCitiesController() }) } } public func toggleSideViewController() { if (self.sideViewState == SideViewState.Hidden) { self.showCitiesListController() } else if (self.sideViewState == SideViewState.Showing) { self.dismissCitiesListController() } } public func showAddCitiesController() { if (self.addCitiesController == nil) { self.navigator.topViewController!.view.userInteractionEnabled = false self.addCitiesController = UINavigationController(rootViewController: self.assembly.addCityViewController() as! UIViewController) self.addCitiesController!.view.frame = CGRectMake(0, self.view.frame.origin.y + self.view.frame.size.height, SIDE_CONTROLLER_WIDTH, self.view.frame.size.height) self.view.addSubview(self.addCitiesController!.view) UIView.transitionWithView(self.view, duration: 0.25, options: UIViewAnimationOptions.CurveEaseInOut, animations: { self.addCitiesController!.view.frame = CGRectMake(0, 0, self.SIDE_CONTROLLER_WIDTH, self.view.frame.size.height) }, completion: nil) } } public func dismissAddCitiesController() { if (self.addCitiesController != nil) { self.citiesListController?.viewWillAppear(true) UIView.transitionWithView(self.view, duration: 0.25, options: UIViewAnimationOptions.CurveEaseInOut, animations: { self.addCitiesController!.view.frame = CGRectMake(0, self.view.frame.size.height, self.SIDE_CONTROLLER_WIDTH, self.view.frame.size.height) }, completion: { (completed) in self.addCitiesController!.view.removeFromSuperview() self.addCitiesController = nil self.citiesListController?.viewDidAppear(true) self.navigator.topViewController!.view.userInteractionEnabled = true }) } } //------------------------------------------------------------------------------------------- // MARK: - PaperFoldViewDelegate //------------------------------------------------------------------------------------------- public func paperFoldView(paperFoldView: AnyObject!, didFoldAutomatically automated: Bool, toState paperFoldState: PaperFoldState) { if paperFoldState.rawValue == 0 { self.navigator.topViewController!.viewDidAppear(true) let dummyView = UIView(frame: CGRectMake(1,1,1,1)) self.paperFoldView.setLeftFoldContentView(dummyView, foldCount: 0, pullFactor: 0) self.citiesListController = nil } } //------------------------------------------------------------------------------------------- // MARK: - Overridden Methods //------------------------------------------------------------------------------------------- public override func loadView() { let screen = UIScreen.mainScreen().bounds self.paperFoldView = PaperFoldView(frame: CGRectMake(0, 0, screen.size.width, screen.size.height)) self.paperFoldView.timerStepDuration = 0.02 self.view.autoresizingMask = [UIViewAutoresizing.FlexibleHeight, UIViewAutoresizing.FlexibleWidth] self.mainContentViewContainer = UIView(frame: self.paperFoldView.bounds) self.mainContentViewContainer.backgroundColor = UIColor.blackColor() self.paperFoldView.setCenterContentView(self.mainContentViewContainer) } public override func viewWillLayoutSubviews() { self.mainContentViewContainer.frame = self.view.bounds } public override func shouldAutorotate() -> Bool { return self.navigator!.topViewController!.shouldAutorotate() } public override func willRotateToInterfaceOrientation(orientation: UIInterfaceOrientation, duration: NSTimeInterval) { self.navigator!.topViewController!.willRotateToInterfaceOrientation(orientation, duration: duration) } public override func didRotateFromInterfaceOrientation(orientation: UIInterfaceOrientation) { self.navigator!.topViewController!.didRotateFromInterfaceOrientation(orientation) } //------------------------------------------------------------------------------------------- // MARK: - Private Methods //------------------------------------------------------------------------------------------- private func makeNavigationControllerWithRoot(root : UIViewController) { self.navigator = UINavigationController(rootViewController: root) self.navigator.view.frame = self.view.bounds mainContentViewContainer.addSubview(self.navigator.view) } }
43.745098
176
0.591663
7bdee0c2e987d11c1b751f089de1c69245a84bbf
5,198
kt
Kotlin
app/src/test/kotlin/fr/free/nrw/commons/utils/StringSortingUtilsTest.kt
ben-mathu/apps-android-commons
325a09d93a5bd38d86e7004ab402a327c84c9472
[ "Apache-2.0" ]
null
null
null
app/src/test/kotlin/fr/free/nrw/commons/utils/StringSortingUtilsTest.kt
ben-mathu/apps-android-commons
325a09d93a5bd38d86e7004ab402a327c84c9472
[ "Apache-2.0" ]
null
null
null
app/src/test/kotlin/fr/free/nrw/commons/utils/StringSortingUtilsTest.kt
ben-mathu/apps-android-commons
325a09d93a5bd38d86e7004ab402a327c84c9472
[ "Apache-2.0" ]
null
null
null
package fr.free.nrw.commons.utils import fr.free.nrw.commons.category.CategoryItem import fr.free.nrw.commons.utils.StringSortingUtils.sortBySimilarity import org.junit.Assert.assertEquals import org.junit.Test import java.util.Collections.sort class StringSortingUtilsTest { @Test fun testSortingNumbersBySimilarity() { val actualList = listOf( CategoryItem("1234567", "", "", false), CategoryItem("4567", "", "", false), CategoryItem("12345", "", "", false), CategoryItem("123", "", "", false), CategoryItem("1234", "", "", false)) val expectedList = listOf( CategoryItem("1234", "", "", false), CategoryItem("12345", "", "", false), CategoryItem("123", "", "", false), CategoryItem("1234567", "", "", false), CategoryItem("4567", "", "", false)) sort(actualList, sortBySimilarity("1234")) assertEquals(expectedList, actualList) } @Test fun testSortingTextBySimilarity() { val actualList = listOf( CategoryItem("The quick brown fox", "", "", false), CategoryItem("quick brown fox", "", "", false), CategoryItem("The", "", "", false), CategoryItem("The quick ", "", "", false), CategoryItem("The fox", "", "", false), CategoryItem("brown fox", "", "", false), CategoryItem("fox", "", "", false) ) val expectedList = listOf( CategoryItem("The", "", "", false), CategoryItem("The fox", "", "", false), CategoryItem("The quick ", "", "", false), CategoryItem("The quick brown fox", "", "", false), CategoryItem("quick brown fox", "", "", false), CategoryItem("brown fox", "", "", false), CategoryItem("fox", "", "", false) ) sort(actualList, sortBySimilarity("The")) assertEquals(expectedList, actualList) } @Test fun testSortingSymbolsBySimilarity() { val actualList = listOf( CategoryItem("$$$$$", "", "", false), CategoryItem("****", "", "", false), CategoryItem("**$*", "", "", false), CategoryItem("*$*$", "", "", false), CategoryItem(".*$", "", "", false) ) val expectedList = listOf( CategoryItem("**$*", "", "", false), CategoryItem("*$*$", "", "", false), CategoryItem(".*$", "", "", false), CategoryItem("****", "", "", false), CategoryItem("$$$$$", "", "", false) ) sort(actualList, sortBySimilarity("**$")) assertEquals(expectedList, actualList) } @Test fun testSortingMixedStringsBySimilarity() { // Sample from Category:2018 Android phones val actualList = listOf( CategoryItem("ASUS ZenFone 5 (2018)", "", "", false), CategoryItem("Google Pixel 3", "", "", false), CategoryItem("HTC U12", "", "", false), CategoryItem("Huawei P20", "", "", false), CategoryItem("LG G7 ThinQ", "", "", false), CategoryItem("Samsung Galaxy A8 (2018)", "", "", false), CategoryItem("Samsung Galaxy S9", "", "", false), // One with more complicated symbols CategoryItem("MadeUpPhone 2018.$£#你好", "", "", false) ) val expectedList = listOf( CategoryItem("Samsung Galaxy S9", "", "", false), CategoryItem("ASUS ZenFone 5 (2018)", "", "", false), CategoryItem("Samsung Galaxy A8 (2018)", "", "", false), CategoryItem("Google Pixel 3", "", "", false), CategoryItem("HTC U12", "", "", false), CategoryItem("Huawei P20", "", "", false), CategoryItem("LG G7 ThinQ", "", "", false), CategoryItem("MadeUpPhone 2018.$£#你好", "", "", false) ) sort(actualList, sortBySimilarity("S9")) assertEquals(expectedList, actualList) } @Test fun testSortingWithEmptyStrings() { val actualList = listOf( CategoryItem("brown fox", "", "", false), CategoryItem("", "", "", false), CategoryItem("quick brown fox", "", "", false), CategoryItem("the", "", "", false), CategoryItem("", "", "", false), CategoryItem("the fox", "", "", false), CategoryItem("fox", "", "", false), CategoryItem("", "", "", false), CategoryItem("", "", "", false) ) val expectedList = listOf( CategoryItem("the fox", "", "", false), CategoryItem("brown fox", "", "", false), CategoryItem("the", "", "", false), CategoryItem("fox", "", "", false), CategoryItem("quick brown fox", "", "", false), CategoryItem("", "", "", false), CategoryItem("", "", "", false), CategoryItem("", "", "", false), CategoryItem("", "", "", false) ) sort(actualList, sortBySimilarity("the fox")) assertEquals(expectedList, actualList) } }
37.666667
68
0.501731
e73cee37a22a4769e68e16bd582ea666193e2be1
843
js
JavaScript
plugins/custom-header.js
nem035/advanced-ember-examples
c17b8762248ec2c45f88de6006aeb99e71bd19d9
[ "MIT" ]
1
2016-12-20T15:49:51.000Z
2016-12-20T15:49:51.000Z
plugins/custom-header.js
nem035/advanced-ember-examples
c17b8762248ec2c45f88de6006aeb99e71bd19d9
[ "MIT" ]
null
null
null
plugins/custom-header.js
nem035/advanced-ember-examples
c17b8762248ec2c45f88de6006aeb99e71bd19d9
[ "MIT" ]
null
null
null
// Filter is a base class for all broccoli plugins var Filter = require('broccoli-filter'); function CustomHeaderPlugin(inputNode) { Filter.call(this, inputNode); } CustomHeaderPlugin.prototype = Object.create(Filter.prototype); function header(path) { return '/** \n * ' + path + ' \n * \n * author SomeCoolDude ' + '\n * generated at: ' + new Date().toISOString() + '\n */\n'; }; // given the contents of a file as a string, returns a new string CustomHeaderPlugin.prototype.processString = function (fileContentsString, relativePath) { return header(relativePath) + fileContentsString; } // types (extensions) of files on which plugin will act on CustomHeaderPlugin.prototype.extensions = ['js']; // single type for the output file CustomHeaderPlugin.prototype.targetExtensions = 'js'; module.exports = CustomHeaderPlugin;
31.222222
90
0.730724
861cafc73a4a970f7073c031348298a716f8f54d
5,271
go
Go
ncpdp/ncpdp.go
taterbase/health
9c2323db38029bdc3edc3f1c058217277a565aaa
[ "MIT" ]
53
2015-03-17T19:31:30.000Z
2022-03-20T07:27:33.000Z
ncpdp/ncpdp.go
taterbase/health
9c2323db38029bdc3edc3f1c058217277a565aaa
[ "MIT" ]
7
2015-01-14T16:47:44.000Z
2018-11-21T10:31:31.000Z
ncpdp/ncpdp.go
taterbase/health
9c2323db38029bdc3edc3f1c058217277a565aaa
[ "MIT" ]
20
2015-01-10T15:28:26.000Z
2020-07-30T04:31:35.000Z
package ncpdp import ( "errors" //"log" "github.com/kdar/health/edifact" //"time" ) // base struct of all messages. // required by EDIFACT and NCPDP script type RXH struct { // UIB // SyntaxIdentifier string // SyntaxVersionNumber string // TransactionControlReference string // SenderIds []string // ReceiverIds []string //una UIB edifact.Values UIH edifact.Values //RXHREQ or RXHRES UIT edifact.Values UIZ edifact.Values } // creates a new RXH func newRXH() *RXH { return &RXH{} } // func (r RXH) copy(rxh *RXH) { // r.UIB = rxh.UIB // r.UIH = rxh.UIH // r.UIT = rxh.UIT // r.UIZ = rxh.UIZ // } // base struct for RXHRES and RXHREQ type RXHREX struct { *RXH PVD edifact.Values PTT edifact.Values COO edifact.Values *Patient } // creates a new RXHREX func newRXHREX() *RXHREX { return &RXHREX{ RXH: newRXH(), Patient: newPatient(), } } // Segment: RES type Response struct { // A = Approved // D = Denied // C = Approved with changes // N = Denied, new prescription to // follow. Note: Value “N” is used in // REFRES transactions only. ResponseType string // 010 M // AQ= More History // Available. There may // be less then 50 drugs // in this response due to // payer processing. CodeListQualifier string // 020 C // transaction key ReferenceNumber string // 030 C // free text. could be an error Text string // 040 C } // creates a new Response func newResponse() *Response { return &Response{} } // fills in the values for Response based on the // parameter passed func (r *Response) fill(values edifact.Values) { r.ResponseType = getString(values, 1) r.CodeListQualifier = getString(values, 2) r.ReferenceNumber = getString(values, 3) r.Text = getString(values, 4) } // Response describing a patient’s medication history. Response to RXHREQ. type RXHRES struct { *RXHREX Response *Response RequestingPhysician *Provider Drugs []*Drug } // creates a new RXHRES func newRXHRES() *RXHRES { return &RXHRES{ RXHREX: newRXHREX(), Response: newResponse(), } } // Segment: STS type Status struct { StatusTypeCode string // 010 M CodeListQualifier string // 020 C Text string // 030 C } // creates a new status func newStatus() *Status { return &Status{} } // fills in the values for Status func (s *Status) fill(values edifact.Values) { s.StatusTypeCode = getString(values, 1) s.CodeListQualifier = getString(values, 2) s.Text = getString(values, 3) } // Message type: ERROR type ERROR struct { *RXH Status *Status } // creates a new error func newError() *ERROR { return &ERROR{RXH: newRXH(), Status: newStatus()} } // unmarshals the values based on the function. // e.g. if function is RXHRES, values is unmarshaled // as such. func unmarshal(values edifact.Values, msgType string) (interface{}, error) { // base types var rxh *RXH // return types var error_ *ERROR var rxhres *RXHRES var ret interface{} switch msgType { case "RXHRES": rxhres = newRXHRES() rxh = rxhres.RXH ret = rxhres case "ERROR": error_ := newError() rxh = error_.RXH ret = error_ } seenDrug := false for _, value := range values { if vals, ok := value.(edifact.Values); ok { if name, ok := vals[0].(string); ok { switch name { case "UIB": rxh.UIB = vals case "UIH": rxh.UIH = vals case "RES": rxhres.Response.fill(vals) case "PTT": patient := newPatient() patient.fill(vals) rxhres.RXHREX.Patient = patient case "COO": rxhres.RXHREX.COO = vals case "DRU": seenDrug = true drug := newDrug() drug.fill(vals) rxhres.Drugs = append(rxhres.Drugs, drug) case "PVD": provider := newProvider() provider.fill(vals) if seenDrug { typ, ok := vals[1].(string) if ok { if typ == "PC" { // prescriber rxhres.Drugs[len(rxhres.Drugs)-1].Prescriber = provider } else if typ == "P2" { // pharmacy rxhres.Drugs[len(rxhres.Drugs)-1].Pharmacy = provider } } } else { rxhres.RequestingPhysician = provider } case "STS": error_.Status.fill(vals) case "UIT": rxh.UIT = vals case "UIZ": rxh.UIZ = vals } } } } return ret, nil } // unmarshals NCPDP script from edifact values func UnmarshalValues(values edifact.Values) (interface{}, error) { // try to determine what kind of message we're dealing // with and unmarshal it for _, value := range values { if vals, ok := value.(edifact.Values); ok { if name, ok := vals[0].(string); ok { switch name { case "UIH": if subvals, ok := vals[1].(edifact.Values); ok && len(subvals) > 3 { switch getString(subvals, 3) { case "RXHRES": return unmarshal(values, "RXHRES") case "ERROR": return unmarshal(values, "ERROR") } } case "RES": return unmarshal(values, "RXHRES") } } } } return nil, errors.New("Could not determine message type") } // unmarshals NCPDP script from a byte slice func Unmarshal(data []byte) (interface{}, error) { values, err := edifact.Unmarshal(data) if err != nil { return nil, err } return UnmarshalValues(values) }
20.589844
76
0.634225
88a1b412e787c8c48ac39a2a53a19b4cfc47a35b
683
kt
Kotlin
cqrs/src/main/kotlin/io/kommons/designpatterns/cqrs/domain/model/LongEntity.kt
debop/kotlin-design-patterns
c00bcc0542985bbcfc4652d0045f31e5c1304a70
[ "Apache-2.0" ]
40
2020-01-22T04:44:46.000Z
2021-12-31T18:17:09.000Z
cqrs/src/main/kotlin/io/kommons/designpatterns/cqrs/domain/model/LongEntity.kt
debop/kotlin-design-patterns
c00bcc0542985bbcfc4652d0045f31e5c1304a70
[ "Apache-2.0" ]
null
null
null
cqrs/src/main/kotlin/io/kommons/designpatterns/cqrs/domain/model/LongEntity.kt
debop/kotlin-design-patterns
c00bcc0542985bbcfc4652d0045f31e5c1304a70
[ "Apache-2.0" ]
10
2020-01-22T04:44:47.000Z
2022-03-30T13:05:09.000Z
package io.kommons.designpatterns.cqrs.domain.model import io.kommons.AbstractValueObject import io.kommons.ToStringBuilder import javax.persistence.GeneratedValue import javax.persistence.GenerationType import javax.persistence.Id import javax.persistence.MappedSuperclass @MappedSuperclass abstract class LongEntity: AbstractValueObject() { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) var id: Long? = null override fun equalProperties(other: Any): Boolean { return other is LongEntity && id == other.id } override fun buildStringHelper(): ToStringBuilder { return super.buildStringHelper() .add("id", id) } }
27.32
55
0.74817
bc5b9dd76e9886fddd7c76dcaa11b79e24433517
14,167
swift
Swift
ZWFilterMenuView/Classes/ZWFilterMenuView.swift
zhangwei2318/ZWFilterMenuView
6888185f41debb9e2bee7db8f3fa22ad0cd1f832
[ "MIT" ]
1
2021-12-13T03:17:59.000Z
2021-12-13T03:17:59.000Z
ZWFilterMenuView/Classes/ZWFilterMenuView.swift
zhangwei2318/ZWFilterMenuView
6888185f41debb9e2bee7db8f3fa22ad0cd1f832
[ "MIT" ]
null
null
null
ZWFilterMenuView/Classes/ZWFilterMenuView.swift
zhangwei2318/ZWFilterMenuView
6888185f41debb9e2bee7db8f3fa22ad0cd1f832
[ "MIT" ]
null
null
null
// // YXFirstClassScreeningView.swift // YXTeacher // // Created by 张伟 on 2021/11/18. // Copyright © 2021 YJJ-CHY. All rights reserved. // import UIKit import SnapKit public class ZWBaseView: UIView { public override init(frame: CGRect) { super .init(frame: frame) configueLayout() } required public init?(coder aDecoder: NSCoder) { fatalError("init(coder:) has not been implemented") } func configueLayout(){} } public class ZWFilterMenuView: ZWBaseView, UIGestureRecognizerDelegate { // bar点击事件 public var barAction: ((_ index: Int, _ show: Bool) -> Void)? // cell点击事件 public var cellAction: ((_ barIndex: Int, _ index: Int) -> Void)? // 记录bar点击的下标 var barIndex: Int = 0 // MenuBar内边距 public var contentInset: UIEdgeInsets = .zero { didSet { menuBarV.contentInset = contentInset } } // MenuBar背景色 public var menuBarBackgroundColor: UIColor = .white { didSet { menuBarV.menuBarBackgroundColor = menuBarBackgroundColor } } // 背景颜色 与 alphaBackgroundColorArray 二选一 public var alphaBackgroundColor: UIColor = .black // 背景颜色数组 数据数与titleArray或 titleViewArray一致 否则越界崩溃 public var alphaBackgroundColorArray: Array<UIColor?>? // title文字 public var titleArray: Array<String>? { didSet { menuBarV.titleArray = titleArray } } // title任意控件 public var titleViewArray: Array<UIView>? { didSet { menuBarV.titleViewArray = titleViewArray } } // 筛选条件数据 public var filterStrArray: Array<Array<String>?>? { didSet { tableView.reloadData() } } // title未选中文字颜色 public var titleNormalColor: UIColor? = UIColor.init(red: 51/255.0, green: 51/255.0, blue: 51/255.0, alpha: 1) { didSet { menuBarV.titleNormalColor = titleNormalColor } } // title选中文字颜色 public var titleSelectColor: UIColor = UIColor.init(red: 116/255.0, green: 155/255.0, blue: 250/255.0, alpha: 1) // 记录筛选条件点击下标 private var showIndex: Int? // 记录是否已经展开筛选条件 private var showState: Bool? // 记录是否显示选中状态 private var selectState: Bool? // 展开后Frame public var openFrame: CGRect? // 最大展示行数, 默认6 public var maxCellLine: Int = 6 // 行高, 默认44 public var cellHeight: CGFloat = 44.0 // 点击背景是否可以收起, 默认可以 public var isBackGroundTapDismiss: Bool = true override func configueLayout() { backgroundColor = alphaBackgroundColor.withAlphaComponent(0) addSubview(menuBarV) menuBarV.snp.makeConstraints { (make) in make.top.left.right.equalToSuperview() make.height.equalTo(self.frame.height) } addSubview(tableView) tableView.frame = CGRect.init(x: 0, y: self.frame.height, width: self.frame.width, height: 0) addSubview(lineV) lineV.snp.makeConstraints { (make) in make.top.equalTo(menuBarV.snp_bottom).offset(0) make.left.right.equalToSuperview() make.height.equalTo(0.5) } let tapGes = UITapGestureRecognizer(target: self, action: #selector(tapGesAction(_:))) tapGes.numberOfTapsRequired = 1 tapGes.delegate = self self.addGestureRecognizer(tapGes) } // 方法 @objc func tapGesAction(_ tapGes : UITapGestureRecognizer){ if isBackGroundTapDismiss == true { dismiss() } } public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool { if touch.view?.isDescendant(of: self.tableView) == true { return false } return true } // 展示带数据的样式 public func show(index: Int) { showState = true frame = openFrame ?? CGRect.init(x: self.frame.origin.x, y: self.frame.origin.y, width: UIScreen.main.bounds.size.width, height: UIScreen.main.bounds.size.height - self.frame.origin.y) UIView.animate(withDuration: 0.25) {[weak self] in self?.backgroundColor = self?.alphaBackgroundColor == .clear ? .clear : self?.alphaBackgroundColor.withAlphaComponent(0.3) self?.screeningViewFrameChange(index: index) } completion: { finish in } } func screeningViewFrameChange(index: Int) { let array = filterStrArray?[index] let count = array?.count ?? 0 let height = count > maxCellLine ? (CGFloat(maxCellLine) * cellHeight): (CGFloat(count) * cellHeight) tableView.isHidden = array == nil ? true : false tableView.frame = CGRect.init(x: 0, y: menuBarV.frame.height , width: frame.width, height: height) } // 动画消失 public func dismiss() { showState = false UIView.animate(withDuration: 0.25) {[weak self] in self?.backgroundColor = .black.withAlphaComponent(0) self?.tableView.frame = CGRect.init(x: 0, y: self?.menuBarV.frame.height ?? 0, width: self?.frame.width ?? 0, height: 0) } completion: {[weak self] finish in self?.frame = CGRect.init(x: self?.openFrame?.origin.x ?? (self?.frame.origin.x ?? 0), y: self?.openFrame?.origin.y ?? (self?.frame.origin.y ?? 0), width: self?.menuBarV.frame.width ?? UIScreen.main.bounds.size.width, height: self?.menuBarV.frame.height ?? 44) } } private lazy var menuBarV:ZWFilterMenuBarView = { let view = ZWFilterMenuBarView.init() view.action = {[weak self] index in // 背景颜色数组越界处理 if self?.alphaBackgroundColorArray != nil, index < (self?.alphaBackgroundColorArray?.count ?? 0) { self?.alphaBackgroundColor = self?.alphaBackgroundColorArray?[index] ?? .black } if self?.showIndex != index { self?.show(index: index) self?.showIndex = index self?.tableView.reloadData() self?.menuBarV.selectColor(color: self?.titleSelectColor, index: index) } else { if self?.showState == true { self?.dismiss() self?.showIndex = index self?.menuBarV.selectColor(color: self?.titleNormalColor, index: index) }else { self?.show(index: index) self?.showIndex = index self?.tableView.reloadData() self?.menuBarV.selectColor(color: self?.titleSelectColor, index: index) } } guard let action = self?.barAction else { return } action(index, self?.showState ?? false) } return view }() private lazy var tableView:UITableView = { let tableV = UITableView.init() tableV.delegate = self tableV.dataSource = self return tableV }() private lazy var lineV:UIView = { let view = UIView.init() view.backgroundColor = UIColor.init(red: 210/255.0, green: 210/255.0, blue: 210/255.0, alpha: 1) return view }() } extension ZWFilterMenuView: UITableViewDelegate, UITableViewDataSource { public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return filterStrArray?[showIndex ?? 0]?.count ?? 0 } public func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { return cellHeight } public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { // let cell = tableView.dequeueReusableCell(withIdentifier: "cell")! let cell = UITableViewCell.init() let str = filterStrArray?[showIndex ?? 0]?[indexPath.row] cell.textLabel?.text = str cell.textLabel?.font = UIFont.systemFont(ofSize: 15) cell.textLabel?.textColor = UIColor.init(red: 51/255.0, green: 51/255.0, blue: 51/255.0, alpha: 1) return cell } public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { let str = filterStrArray?[showIndex ?? 0]?[indexPath.row] titleArray?[showIndex ?? 0] = str ?? "" dismiss() menuBarV.selectColor(color: titleNormalColor, index: showIndex ?? 0) guard let cellAction = cellAction else { return } cellAction(showIndex ?? 0, indexPath.row) } } class ZWFilterMenuBarView: ZWBaseView { var action: ((_ index: Int) -> Void)? var contentInset: UIEdgeInsets = .zero { didSet { menuBarV.snp.updateConstraints { make in make.left.equalTo(contentInset.left) make.right.equalTo(-contentInset.right) make.top.equalTo(contentInset.top) make.bottom.equalTo(-contentInset.bottom) } } } var menuBarBackgroundColor: UIColor = .white { didSet { backgroundColor = menuBarBackgroundColor menuBarV.backgroundColor = menuBarBackgroundColor } } var titleNormalColor: UIColor? { didSet { menuBarV.subviews.forEach { view in let item = view as? ZWFilterMenuBarItemView item?.titleNormalColor = titleNormalColor ?? UIColor.init(red: 51/255.0, green: 51/255.0, blue: 51/255.0, alpha: 1) } } } var titleArray: Array<String>? { didSet { menuBarV.subviews.forEach({ $0.removeFromSuperview() }) for i in 0..<(titleArray?.count ?? 0) { let item = ZWFilterMenuBarItemView.init() item.action = { [weak self] in guard let action = self?.action else { return } action(i) } item.title = titleArray?[i] item.titleNormalColor = titleNormalColor ?? UIColor.init(red: 51/255.0, green: 51/255.0, blue: 51/255.0, alpha: 1) menuBarV.addArrangedSubview(item) } } } var titleViewArray: Array<UIView>? { didSet { for i in 0..<(titleViewArray?.count ?? 0) { let item = ZWFilterMenuBarItemView.init() item.action = { [weak self] in guard let action = self?.action else { return } action(i) } let view = titleViewArray?[i] item.subView = view menuBarV.addArrangedSubview(item) } } } override func configueLayout() { backgroundColor = menuBarBackgroundColor addSubview(menuBarV) menuBarV.snp.makeConstraints { (make) in make.top.bottom.left.right.equalToSuperview() } } func selectColor(color: UIColor?, index: Int) { for i in 0..<menuBarV.subviews.count { let item = menuBarV.subviews[i] as? ZWFilterMenuBarItemView if i == index { item?.titleSelectColor = color ?? UIColor.init(red: 116/255.0, green: 155/255.0, blue: 250/255.0, alpha: 1) }else { item?.titleNormalColor = titleNormalColor ?? UIColor.init(red: 51/255.0, green: 51/255.0, blue: 51/255.0, alpha: 1) } } } private lazy var menuBarV: UIStackView = { let view = UIStackView.init() view.distribution = .fillEqually view.axis = .horizontal return view }() } class ZWFilterMenuBarItemView: ZWBaseView { var action: (() -> Void)? // title未选中文字颜色 var titleNormalColor: UIColor? { didSet { titleL.textColor = titleNormalColor } } // title选中文字颜色 var titleSelectColor: UIColor? { didSet { titleL.textColor = titleSelectColor } } var subView: UIView? { didSet { subviews.forEach({ $0.removeFromSuperview() }) subView?.isUserInteractionEnabled = false addSubview(subView ?? UIView.init()) subView?.snp.makeConstraints { (make) in make.top.bottom.left.right.equalToSuperview() } } } var title: String? { didSet { titleL.text = title } } override func configueLayout() { addSubview(titleL) titleL.snp.makeConstraints { (make) in make.top.bottom.equalToSuperview() make.centerX.equalToSuperview().offset(-6) } addSubview(imgV) imgV.snp.makeConstraints { (make) in make.left.equalTo(titleL.snp_right).offset(4) make.centerY.equalToSuperview() make.width.height.equalTo(16) } let tapGes = UITapGestureRecognizer(target: self, action: #selector(tapGesAction(_:))) tapGes.numberOfTapsRequired = 1 self.addGestureRecognizer(tapGes) } @objc func tapGesAction(_ tapGes : UITapGestureRecognizer){ guard let action = action else { return } action() } private lazy var titleL:UILabel = { let label = UILabel.init() label.font = UIFont.systemFont(ofSize: 15) label.textAlignment = .center return label }() private lazy var imgV:UIImageView = { let imgV = UIImageView.init() let frameworkBundle = Bundle.init(for: ZWFilterMenuBarItemView.self) let bundleURL = frameworkBundle.resourceURL?.appendingPathComponent("ZWFilterMenuView.bundle") let resourceBundle = Bundle.init(url: bundleURL!) let image = UIImage(named: "zw_triangle_image", in: resourceBundle, compatibleWith: nil) imgV.image = image return imgV }() }
33.412736
272
0.578104
b044aad53655d020144d6e8aa85544461a9fe5e8
1,158
kt
Kotlin
src/main/kotlin/com/deflatedpickle/oreinfunnyplaces/util/RegistryUtil.kt
DeflatedPickles-Idea-Repositories/Ore-In-Funny-Places
76ec524242dac41bcd572adc52e853b907a713f6
[ "MIT" ]
null
null
null
src/main/kotlin/com/deflatedpickle/oreinfunnyplaces/util/RegistryUtil.kt
DeflatedPickles-Idea-Repositories/Ore-In-Funny-Places
76ec524242dac41bcd572adc52e853b907a713f6
[ "MIT" ]
null
null
null
src/main/kotlin/com/deflatedpickle/oreinfunnyplaces/util/RegistryUtil.kt
DeflatedPickles-Idea-Repositories/Ore-In-Funny-Places
76ec524242dac41bcd572adc52e853b907a713f6
[ "MIT" ]
null
null
null
package com.deflatedpickle.oreinfunnyplaces.util import com.deflatedpickle.oreinfunnyplaces.OreInFunnyPlaces import com.deflatedpickle.oreinfunnyplaces.common.block.BlockOre import com.deflatedpickle.oreinfunnyplaces.common.item.ItemOre import net.minecraft.item.ItemBlock import net.minecraft.item.ItemStack import net.minecraftforge.fml.common.registry.ForgeRegistries import net.minecraftforge.fml.common.registry.GameRegistry import net.minecraftforge.oredict.OreDictionary object RegistryUtil { fun registerOre(origin: ItemBlock, oreType: OreType) { val drop = origin.block.getItemDropped(origin.block.defaultState, null, 0) val block = BlockOre(drop, oreType) val item = ItemOre(drop, oreType, block) block.drop = drop ForgeRegistries.BLOCKS.register(block) ForgeRegistries.ITEMS.register(item) OreInFunnyPlaces.proxy.registerModel(item, block) OreInFunnyPlaces.oreList.add(item) OreDictionary.registerOre("block.$oreType.$this", item) OreDictionary.registerOre("item.$oreType.$this", item) GameRegistry.addSmelting(block, ItemStack(item), 0.5f) } }
37.354839
82
0.765112
6a00ebef8a8720661bcd8248f66a02a82ce2e9d8
150
kt
Kotlin
Bridge/src/main/kotlin/window/AbstractWindowImpl.kt
AaronChuang/Kotlin-DesignPatternExample
9e31b8065a7b98e30d93033fae92d0381c17ef34
[ "MIT" ]
null
null
null
Bridge/src/main/kotlin/window/AbstractWindowImpl.kt
AaronChuang/Kotlin-DesignPatternExample
9e31b8065a7b98e30d93033fae92d0381c17ef34
[ "MIT" ]
null
null
null
Bridge/src/main/kotlin/window/AbstractWindowImpl.kt
AaronChuang/Kotlin-DesignPatternExample
9e31b8065a7b98e30d93033fae92d0381c17ef34
[ "MIT" ]
null
null
null
package window // 定義類別之共用介面 abstract class AbstractWindowImpl { abstract fun devDrawText(text:String) abstract fun devDrawLine(line:String) }
21.428571
41
0.78
687fb3e40f937515c8f4c65f6d9ffc244cffab90
2,091
kt
Kotlin
src/main/kotlin/PropertiesEditController.kt
andrewd207/tiopf_mapper
912255f37fccb31c9eb621899621e1e75dc7c946
[ "BSD-2-Clause" ]
null
null
null
src/main/kotlin/PropertiesEditController.kt
andrewd207/tiopf_mapper
912255f37fccb31c9eb621899621e1e75dc7c946
[ "BSD-2-Clause" ]
null
null
null
src/main/kotlin/PropertiesEditController.kt
andrewd207/tiopf_mapper
912255f37fccb31c9eb621899621e1e75dc7c946
[ "BSD-2-Clause" ]
null
null
null
import javaFXMediators.CustomFXTableView import javafx.event.EventHandler import javafx.fxml.FXML import javafx.scene.Node import javafx.scene.control.ContextMenu import javafx.scene.control.MenuItem import tiOPF.Mapper.Project import tiOPF.Mapper.Project.Unit.ClassItem.Prop import tiOPF.ObjectList class PropertiesEditController(private val properties: ObjectList<Prop>, resource: String): BasePaneController(properties, resource) { @FXML lateinit var propertiesTable: CustomFXTableView override fun finishLoad(project: Project): Node { val result = super.finishLoad(project) addMediator(propertiesTable, properties, arrayOf( "name(100,\"Name\")", "type(100,\"Type\")", "virtual(100,\"Virtual\",|)" )) val addItem = MenuItem("Add Property") val delItem = MenuItem("Delete Property") delItem.isDisable = true propertiesTable.selectionModel.selectedItemProperty().addListener { _, _, newValue -> delItem.isDisable = newValue == null if (newValue != null) { val name = newValue.text delItem.text = "Delete Property \"$name\"" } else delItem.text = "Delete Property" } propertiesTable.contextMenu = ContextMenu(addItem, delItem) propertiesTable.contextMenu.onAction = EventHandler { event -> when (event.target) { addItem -> { val prop = properties.addUniqueItem("Property_New", "name", :: Prop) // some defaults prop.type = "String" } delItem -> { val tableItem = propertiesTable.selectionModel.selectedItem if (tableItem != null) { val item = tableItem.itemMediator.model if (item != null && item is Prop) properties.remove(item) } } } } return result } }
34.85
134
0.575323
0ef3b6493e7eb7ae25f6eb03bae1dde3f6a61e71
164
ts
TypeScript
src/overview/index.ts
tarsmachine/Memex
e22d0f2eaeb789436071bbaf70e14658b49b0915
[ "MIT" ]
3,534
2017-11-08T15:59:37.000Z
2022-03-29T08:45:24.000Z
src/overview/index.ts
tarsmachine/Memex
e22d0f2eaeb789436071bbaf70e14658b49b0915
[ "MIT" ]
867
2017-11-07T10:37:25.000Z
2022-03-26T05:57:20.000Z
src/overview/index.ts
tarsmachine/Memex
e22d0f2eaeb789436071bbaf70e14658b49b0915
[ "MIT" ]
331
2017-11-08T14:42:15.000Z
2022-02-22T15:57:23.000Z
import * as epics from './epics' import enhancer from './enhancer' import Overview from './components/Overview' export { epics, enhancer } export default Overview
23.428571
44
0.756098
997cee0d630c752972e10642d06d248503dd38ff
2,782
h
C
kernel/user/libc.h
emil64/kernel
3ecebcf24bb9a363b01cc4b605f69b2c887906a2
[ "CC0-1.0" ]
null
null
null
kernel/user/libc.h
emil64/kernel
3ecebcf24bb9a363b01cc4b605f69b2c887906a2
[ "CC0-1.0" ]
null
null
null
kernel/user/libc.h
emil64/kernel
3ecebcf24bb9a363b01cc4b605f69b2c887906a2
[ "CC0-1.0" ]
null
null
null
/* Copyright (C) 2017 Daniel Page <csdsp@bristol.ac.uk> * * Use of this source code is restricted per the CC BY-NC-ND license, a copy of * which can be found via http://creativecommons.org (and should be included as * LICENSE.txt within the associated archive or repository). */ #ifndef __LIBC_H #define __LIBC_H #include <stdbool.h> #include <stddef.h> #include <stdint.h> // Define a type that that captures a Process IDentifier (PID). typedef int pid_t; /* The definitions below capture symbolic constants within these classes: * * 1. system call identifiers (i.e., the constant used by a system call * to specify which action the kernel should take), * 2. signal identifiers (as used by the kill system call), * 3. status codes for exit, * 4. standard file descriptors (e.g., for read and write system calls), * 5. platform-specific constants, which may need calibration (wrt. the * underlying hardware QEMU is executed on). * * They don't *precisely* match the standard C library, but are intended * to act as a limited model of similar concepts. */ #define SYS_YIELD ( 0x00 ) #define SYS_WRITE ( 0x01 ) #define SYS_READ ( 0x02 ) #define SYS_FORK ( 0x03 ) #define SYS_EXIT ( 0x04 ) #define SYS_EXEC ( 0x05 ) #define SYS_KILL ( 0x06 ) #define SYS_NICE ( 0x07 ) #define SYS_PIPE ( 0x08 ) #define SYS_CLOSEPIPE ( 0x09 ) #define SYS_READ_NONBLOCKING (0x0a) #define SIG_TERM ( 0x00 ) #define SIG_QUIT ( 0x01 ) #define EXIT_SUCCESS ( 0 ) #define EXIT_FAILURE ( 1 ) #define STDIN_FILENO ( 0 ) #define STDOUT_FILENO ( 1 ) #define STDERR_FILENO ( 2 ) // convert ASCII string x into integer r extern int atoi( char* x ); // convert integer x into ASCII string r extern void itoa( char* r, int x ); // cooperatively yield control of processor, i.e., invoke the scheduler extern void yield(); // write n bytes from x to the file descriptor fd; return bytes written extern int write( int fd, const void* x, size_t n ); // read n bytes into x from the file descriptor fd; return bytes read extern int read( int fd, void* x, size_t n ); // perform fork, returning 0 iff. child or > 0 iff. parent process extern int fork(); // perform exit, i.e., terminate process with status x extern void exit( int x ); // perform exec, i.e., start executing program at address x extern void exec( const void* x ); // for process identified by pid, send signal of x extern int kill( pid_t pid, int x ); // for process identified by pid, set priority to x extern void nice( pid_t pid, int x ); //for creating a pipe extern int pipe( const int *fds); //for closing a pipe extern void close( int id ); extern void sleep( int t); extern int read_nb( int fd, void* x, size_t n); #endif
30.911111
79
0.695183
729d12db5366ffcc89530c2518454cdf9e325907
5,510
rs
Rust
rust/diesel/src/order.rs
svranesevic/orm-examples
2e280b206f761582efa10066cfec3596d9a0234a
[ "Apache-2.0" ]
17
2020-01-22T01:35:28.000Z
2022-02-08T21:10:17.000Z
rust/diesel/src/order.rs
svranesevic/orm-examples
2e280b206f761582efa10066cfec3596d9a0234a
[ "Apache-2.0" ]
28
2019-03-26T21:53:08.000Z
2019-08-16T20:21:32.000Z
rust/diesel/src/order.rs
svranesevic/orm-examples
2e280b206f761582efa10066cfec3596d9a0234a
[ "Apache-2.0" ]
15
2019-03-15T22:42:13.000Z
2019-07-30T09:45:52.000Z
use bigdecimal::BigDecimal; use diesel; use diesel::pg::PgConnection; use diesel::prelude::*; use num_traits::identities::Zero; use serde::{Deserialize, Serialize}; use std::ops::{Add, Mul}; use crate::product::Product; use crate::schema::order_lines; use crate::schema::orders; #[derive(AsChangeset, Serialize, Deserialize, Queryable, Insertable, Identifiable)] #[primary_key(order_id)] #[serde(rename_all = "camelCase")] pub struct Order { pub order_id: i32, pub order_total: BigDecimal, pub user_id: i32, } #[table_name = "orders"] #[derive(AsChangeset, Serialize, Deserialize, Queryable, Insertable)] #[serde(rename_all = "camelCase")] struct NewOrder { pub order_total: BigDecimal, pub user_id: i32, } #[table_name = "order_lines"] #[derive(AsChangeset, Serialize, Deserialize, Queryable, Insertable)] #[serde(rename_all = "camelCase")] pub struct NewOrderLine { pub order_id: i32, pub product_id: i32, pub units: i16, } #[derive(Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct NewUserOrder { pub user_id: i32, pub products: Vec<ProductOrder>, } #[derive(Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct ProductOrder { pub product_id: i32, pub units: i16, } impl Order { pub fn create(order: NewUserOrder, connection: &PgConnection) -> Result<Order, String> { let (row, product_units) = Self::create_new_order(&order, connection)?; connection .build_transaction() .serializable() .read_write() .run(|| { let inserted_order: Order = diesel::insert_into(orders::table) .values(&row) .get_result(connection)?; let order_lines = Self::create_order_lines(&inserted_order, product_units); diesel::insert_into(order_lines::table) .values(order_lines) .execute(connection) .map(|_| inserted_order) }) .map_err(|err| err.to_string()) } pub fn read_all(connection: &PgConnection) -> Result<Vec<Order>, String> { orders::table .order(orders::order_id) .load::<Order>(connection) .map_err(|err| err.to_string()) } pub fn read(id: i32, connection: &PgConnection) -> Result<Option<Order>, String> { match orders::table.find(id).first(connection) { Ok(order) => Ok(Some(order)), Err(diesel::result::Error::NotFound) => Ok(None), Err(err) => Err(err.to_string()), } } pub fn update( id: i32, order: NewUserOrder, connection: &PgConnection, ) -> Result<Option<NewUserOrder>, String> { let (new_order, product_units) = Self::create_new_order(&order, connection)?; let row = Order { order_id: id, user_id: new_order.user_id, order_total: new_order.order_total, }; let update_result = connection .build_transaction() .serializable() .read_write() .run(|| { let inserted_order: Order = diesel::update(&row) .set(&row) .get_result(connection)?; let order_lines = Self::create_order_lines(&inserted_order, product_units); diesel::insert_into(order_lines::table) .values(order_lines) .execute(connection) }); match update_result { Err(diesel::result::Error::NotFound) | Ok(0) => Ok(None), Err(err) => Err(err.to_string()), Ok(_) => Ok(Some(order)), } } fn create_new_order( order: &NewUserOrder, connection: &PgConnection, ) -> Result<(NewOrder, Vec<(Product, i16)>), String> { let product_units: Vec<(Product, i16)> = order .products .iter() .map( |product_ref| match Product::read(product_ref.product_id, connection)? { None => Err(format!( "Product with id {} does not exist", product_ref.product_id )), Some(product) => Ok((product, product_ref.units)), }, ) .collect::<Result<Vec<_>, _>>()?; let order_total = product_units .iter() .fold(BigDecimal::from(0.0), |acc, (product, qty)| { acc.add(BigDecimal::from(*qty).mul(&product.price)) }); if order_total.is_zero() { return Err("Order contains no products".to_owned()); } let new_order = NewOrder { user_id: order.user_id, order_total, }; Ok((new_order, product_units)) } fn create_order_lines(order: &Order, product_units: Vec<(Product, i16)>) -> Vec<NewOrderLine> { product_units .iter() .map(|(product, units)| NewOrderLine { order_id: order.order_id, product_id: product.product_id, units: *units, }) .collect() } pub fn delete(id: i32, connection: &PgConnection) -> Result<bool, String> { diesel::delete(orders::table.find(id)) .execute(connection) .map(|aff_rows| aff_rows > 0) .map_err(|err| err.to_string()) } }
30.611111
99
0.556624
48c2ee47e9395a16ebe8c6cec9d14f431a0523bb
1,092
c
C
Userland/libc/string.c
kcortes95/TPArqui
5c12ef2b856b16bdae36f0f0465b73c79d5dd60a
[ "BSD-3-Clause" ]
null
null
null
Userland/libc/string.c
kcortes95/TPArqui
5c12ef2b856b16bdae36f0f0465b73c79d5dd60a
[ "BSD-3-Clause" ]
null
null
null
Userland/libc/string.c
kcortes95/TPArqui
5c12ef2b856b16bdae36f0f0465b73c79d5dd60a
[ "BSD-3-Clause" ]
null
null
null
#include <libc.h> #include <string.h> /* mostly taken from K&R */ int strlen(char * s) { int res = 0; while (*s++) res++; return res; } /* reverse: reverse string s in place */ void reverse(char s[]) { int i, j; char c; for (i = 0, j = strlen(s)-1; i<j; i++, j--) { c = s[i]; s[i] = s[j]; s[j] = c; } } /* itoa: convert n to characters in s */ void itoa(int n, char s[]) { int i, sign; if ((sign = n) < 0) /* record sign */ n = -n; /* make n positive */ i = 0; do { /* generate digits in reverse order */ s[i++] = n % 10 + '0'; /* get next digit */ } while ((n /= 10) > 0); /* delete it */ if (sign < 0) s[i++] = '-'; s[i] = '\0'; reverse(s); } //Returns 1 if s1 is substring of s2, else it returns 0 int substr(char * s1, char *s2) { int i = 0, is_substr = 1; while (is_substr && s1[i] != '\0') { if (s1[i] != s2[i]) { is_substr = 0; } i++; } return is_substr; } int strcmp(char * s1, char * s2) { int ret = 0; while(ret == 0 && (*s1 != '\0' || *s2 != '\0')) { ret = *s1 - *s2; s1++; s2++; } return ret; }
17.333333
55
0.483516
4fc5b20b0a8e225dd2c9b98aaa8cefc634196e20
3,022
sql
SQL
reservasi.sql
BadjinkLuncat/futsal-bdg
f3493a0d5df854fa8d1617c430d1ce6b5b4d842f
[ "MIT" ]
null
null
null
reservasi.sql
BadjinkLuncat/futsal-bdg
f3493a0d5df854fa8d1617c430d1ce6b5b4d842f
[ "MIT" ]
null
null
null
reservasi.sql
BadjinkLuncat/futsal-bdg
f3493a0d5df854fa8d1617c430d1ce6b5b4d842f
[ "MIT" ]
null
null
null
-- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2 -- http://www.phpmyadmin.net -- -- Host: localhost:8080 -- Generation Time: Jul 30, 2017 at 10:52 PM -- Server version: 5.7.19-0ubuntu0.16.04.1 -- PHP Version: 7.0.18-0ubuntu0.16.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `reservasi_lapang` -- -- -------------------------------------------------------- -- -- Table structure for table `reservasi` -- CREATE TABLE `reservasi` ( `id` int(11) UNSIGNED NOT NULL, `kode_reservasi` varchar(16) NOT NULL, `id_user` mediumint(8) UNSIGNED NOT NULL, `nama_user` varchar(50) DEFAULT NULL, `email` text, `no_hp` varchar(13) DEFAULT NULL, `id_detail_lapang` int(11) UNSIGNED NOT NULL, `status` int(1) DEFAULT NULL, `tanggal_reservasi` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `durasi` int(11) NOT NULL DEFAULT '1', `tanggal` datetime NOT NULL DEFAULT '2017-07-27 00:43:05', `tanggal_update` datetime DEFAULT '2017-07-27 00:43:05' ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- -- Dumping data for table `reservasi` -- INSERT INTO `reservasi` (`id`, `kode_reservasi`, `id_user`, `nama_user`, `email`, `no_hp`, `id_detail_lapang`, `status`, `tanggal_reservasi`, `durasi`, `tanggal`, `tanggal_update`) VALUES (1, 'BO20170727170221', 3, 'Ajid', NULL, NULL, 1, 3, '2017-07-27 09:00:00', 1, '2017-07-27 00:43:05', '2017-07-30 16:21:07'), (4, 'BO20170730151216', 9, 'ace', 'ac@gmail.com', '0222', 1, 3, '2017-07-30 15:12:16', 1, '2017-07-30 15:39:46', '2017-07-30 16:26:27'), (5, 'BO20170730154603', 10, 'Asdam', 'dx.excel@gmail.com', '0225858', 1, 1, '2017-07-30 19:00:00', 1, '2017-07-30 15:46:35', '2017-07-30 18:35:53'), (6, 'BO20170730222619', 11, '12345678', 'ab@cdh.com', '12345678', 8, 3, '2017-07-30 15:00:00', 1, '2017-07-30 22:30:20', '2017-07-30 22:46:26'); -- -- Indexes for dumped tables -- -- -- Indexes for table `reservasi` -- ALTER TABLE `reservasi` ADD PRIMARY KEY (`id`), ADD KEY `id_user` (`id_user`), ADD KEY `id_detail_lapang` (`id_detail_lapang`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `reservasi` -- ALTER TABLE `reservasi` MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7; -- -- Constraints for dumped tables -- -- -- Constraints for table `reservasi` -- ALTER TABLE `reservasi` ADD CONSTRAINT `reservasi_ibfk_1` FOREIGN KEY (`id_user`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `reservasi_ibfk_2` FOREIGN KEY (`id_detail_lapang`) REFERENCES `detail_lapang` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
33.955056
187
0.684646
2202d700e216e677ac29fb01cfe271d21a7de06e
4,196
kt
Kotlin
src/main/kotlin/edu/kit/compiler/backend/codegen/ReplacementSystem.kt
compilerpraktikum/compiler
adac6790a5c43a7748d82c8be2284b871c898aea
[ "MIT" ]
3
2021-12-14T13:55:12.000Z
2022-01-07T15:36:00.000Z
src/main/kotlin/edu/kit/compiler/backend/codegen/ReplacementSystem.kt
compilerpraktikum/compiler
adac6790a5c43a7748d82c8be2284b871c898aea
[ "MIT" ]
47
2021-10-29T20:52:22.000Z
2022-02-07T15:29:13.000Z
src/main/kotlin/edu/kit/compiler/backend/codegen/ReplacementSystem.kt
compilerpraktikum/compiler
adac6790a5c43a7748d82c8be2284b871c898aea
[ "MIT" ]
null
null
null
package edu.kit.compiler.backend.codegen import edu.kit.compiler.Compiler import edu.kit.compiler.backend.molkir.Instruction import edu.kit.compiler.backend.molkir.Register import edu.kit.compiler.backend.molkir.Width import edu.kit.compiler.utils.Logger import edu.kit.compiler.utils.ReplacementBuilderScope import edu.kit.compiler.utils.Rule import edu.kit.compiler.utils.RuleBuilderScope data class Replacement( val node: CodeGenIR, val instructions: LazyInstructionList, val cost: Int, ) class ReplacementScope( private val registerTable: VirtualRegisterTable, private val currentNode: CodeGenIR, private val ruleName: String, ) : ReplacementBuilderScope { fun newRegister(width: Width): Register = registerTable.newRegister(width) fun debugComment() = Instruction.comment("${currentNode.display()} (Rule: $ruleName)") } typealias ReplacementRule = Rule<CodeGenIR, Replacement, ReplacementScope> typealias ReplacementRuleBuilderScope = RuleBuilderScope<CodeGenIR, Replacement, ReplacementScope> class LazyInstructionList private constructor(private val instructions: () -> MutableList<Instruction>) { constructor() : this({ mutableListOf() }) fun append(instruction: Instruction) = LazyInstructionList { instructions().apply { add(instruction) } } fun append(instructions: Array<out Instruction>) = LazyInstructionList { instructions().apply { addAll(instructions) } } fun append(instructions: List<Instruction>) = LazyInstructionList { instructions().apply { addAll(instructions) } } @JvmName("appendAll") fun append(vararg instructions: Instruction?) = append(instructions.filterNotNull()) fun append(list: LazyInstructionList) = append(list.buildList()) fun append(block: AppenderScope.() -> Unit) = append( AppenderScope().apply(block).list ) class AppenderScope { val list = mutableListOf<Instruction>() operator fun Instruction.unaryPlus() { list.add(this) } } private fun buildList() = instructions() fun build(): List<Instruction> = buildList() } operator fun LazyInstructionList.plus(other: LazyInstructionList) = append(other) fun instructionListOf(vararg instructions: Instruction) = LazyInstructionList().append(instructions) class InstructionSelector( optimizationLevel: Compiler.OptimizationLevel ) { private val rules = createReplacementRulesFor(optimizationLevel) fun transform(root: CodeGenIR, registerTable: VirtualRegisterTable): List<Instruction> { Logger.trace { " Transforming ${root.display()}" } root.walkDepthFirst { node -> Logger.trace { " Calculating replacement for ${node.display()}" } /* * The code below assumes that all rules matching the node have the same result type (most likely register). * In this case, we can simply select the rule with the minimal cost and use this as the replacement. * Otherwise, we would need to store the best replacement for each possible result type. */ val possibleReplacements = rules.mapNotNull { rule -> with(ReplacementScope(registerTable, node, rule.name)) { rule.match(node)?.let { it to rule.name } } } if (possibleReplacements.isEmpty()) { node.replacement = null } else { val minCost = possibleReplacements.minOf { it.first.cost } val optimalReplacements = possibleReplacements.filter { it.first.cost == minCost } check(optimalReplacements.size <= 1) { "more than one replacement possible for node ${node.display()}:\n${optimalReplacements.joinToString(separator = "\n") { " - ${it.second}" }}" } node.replacement = optimalReplacements.firstOrNull()?.first } Logger.trace { " -> ${node.replacement?.let { "${it.node::class.simpleName} (Cost: ${it.cost})" }}" } } return root.replacement?.instructions?.build() ?: error("no matching replacement found for root node ${root.display()}") } }
39.961905
199
0.681363
595294cf31bf18e59f57e7060b3dc57c794e35a0
240
h
C
xinu/cross_compiler/arm-none-eabi/include/machine/param.h
rrjha/dosp
21f3624abfec815434007f76504488896a091f6d
[ "BSD-3-Clause" ]
81
2015-01-02T23:53:38.000Z
2021-12-26T23:04:47.000Z
xinu/cross_compiler/arm-none-eabi/include/machine/param.h
rrjha/dosp
21f3624abfec815434007f76504488896a091f6d
[ "BSD-3-Clause" ]
79
2015-11-19T09:23:08.000Z
2022-01-12T14:15:16.000Z
xinu/cross_compiler/arm-none-eabi/include/machine/param.h
rrjha/dosp
21f3624abfec815434007f76504488896a091f6d
[ "BSD-3-Clause" ]
38
2015-11-17T10:12:23.000Z
2022-03-25T07:57:24.000Z
/* ARM configuration file; HZ is 100 rather than the default 60 */ #ifndef _MACHINE_PARAM_H # define _MACHINE_PARAM_H # define HZ (100) #ifdef __ARMEB__ #define BYTE_ORDER BIG_ENDIAN #else #define BYTE_ORDER LITTLE_ENDIAN #endif #endif
16
66
0.779167
5d7b7e06277fa9b4015da042cb0468b182291088
19,105
go
Go
src/chromiumos/tast/local/bundles/cros/benchmark/gfxbench_public_android_app.go
nya3jp/tast-tests
c00618ff7c926c345d621101d7cc23f6989f684b
[ "BSD-3-Clause" ]
4
2019-03-15T20:38:25.000Z
2021-06-07T08:20:46.000Z
src/chromiumos/tast/local/bundles/cros/benchmark/gfxbench_public_android_app.go
nya3jp/tast-tests
c00618ff7c926c345d621101d7cc23f6989f684b
[ "BSD-3-Clause" ]
null
null
null
src/chromiumos/tast/local/bundles/cros/benchmark/gfxbench_public_android_app.go
nya3jp/tast-tests
c00618ff7c926c345d621101d7cc23f6989f684b
[ "BSD-3-Clause" ]
1
2019-03-15T20:38:28.000Z
2019-03-15T20:38:28.000Z
// Copyright 2021 The Chromium OS Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package benchmark import ( "context" "path/filepath" "regexp" "strconv" "strings" "time" "chromiumos/tast/common/perf" "chromiumos/tast/ctxutil" "chromiumos/tast/errors" "chromiumos/tast/local/android/ui" "chromiumos/tast/local/apps" "chromiumos/tast/local/arc" "chromiumos/tast/local/arc/playstore" "chromiumos/tast/local/bundles/cros/benchmark/setup" "chromiumos/tast/local/chrome" "chromiumos/tast/local/chrome/ash" "chromiumos/tast/local/chrome/uiauto/faillog" "chromiumos/tast/local/coords" "chromiumos/tast/local/screenshot" "chromiumos/tast/testing" "chromiumos/tast/testing/hwdep" ) const ( benchmarkSyncTime = 30 * time.Minute benchmarkTestingTime = 60 * time.Minute buttonClass = "android.widget.Button" gfxbenchPkgName = "com.glbenchmark.glbenchmark27" gfxActivityName = "net.kishonti.app.MainActivity" startBenchmark = "com.glbenchmark.glbenchmark27:id/main_circleControl" ) func init() { testing.AddTest(&testing.Test{ Func: GFXBenchPublicAndroidApp, Desc: "Execute GFXBench public Android App to do benchmark testing and retrieve the results", Contacts: []string{"phuang@cienet.com", "xliu@cienet.com"}, // Purposely leave the empty Attr here. Public benchmark tests are not included in crosbolt group for now. Attr: []string{}, SoftwareDeps: []string{"chrome", "arc"}, HardwareDeps: hwdep.D( hwdep.InternalDisplay(), // Since the public benchmark will publish data online, run it only on certain approved models. setup.PublicBenchmarkAllowed(), ), Timeout: benchmarkTestingTime, Fixture: setup.BenchmarkARCFixture, }) } func GFXBenchPublicAndroidApp(ctx context.Context, s *testing.State) { cr := s.FixtValue().(*arc.PreData).Chrome ar := s.FixtValue().(*arc.PreData).ARC device, err := ar.NewUIDevice(ctx) if err != nil { s.Fatal("Failed to setup ARC device: ", err) } tconn, err := cr.TestAPIConn(ctx) if err != nil { s.Fatal("Failed to connect to test API connection: ", err) } cleanupCtx := ctx ctx, cancel := ctxutil.Shorten(ctx, 10*time.Second) defer cancel() defer func(ctx context.Context) { device.Close(ctx) faillog.DumpUITreeWithScreenshotOnError(ctx, s.OutDir(), s.HasError, cr, "gfx_benchmark_ui_tree") ar.DumpUIHierarchyOnError(ctx, s.OutDir(), s.HasError) if w, err := ash.GetARCAppWindowInfo(ctx, tconn, gfxbenchPkgName); err == nil { w.CloseWindow(ctx, tconn) } }(cleanupCtx) s.Log("Installing app from play store") if err := playstore.InstallApp(ctx, ar, device, gfxbenchPkgName, -1); err != nil { s.Fatalf("Failed to install %s: %v", gfxbenchPkgName, err) } if err := apps.Close(ctx, tconn, apps.PlayStore.ID); err != nil { s.Fatal("Failed to close Play Store: ", err) } boundsInPx, err := openGfxbench(ctx, tconn, device, ar) if err != nil { s.Fatal("Failed to launch GFXBench: ", err) } s.Log("Ready to start benchmark") if err := startGfxbench(ctx, device, boundsInPx); err != nil { s.Fatal("Failed to start the GFXBench test: ", err) } testing.ContextLog(ctx, "GFXBenchmark is running") if err := waitForResult(ctx, device); err != nil { s.Fatal("Failed to wait for GFXBench test result: ", err) } // Take result screenshot which can be checked manually if needed. if err := screenshot.CaptureChrome(ctx, cr, filepath.Join(s.OutDir(), "gfx_benchmark_result.png")); err != nil { s.Error("Failed to take screenshot: ", err) } normalTierFPS, offscreenFPS, err := parseBenchmarkResult(ctx, device) if err != nil { s.Fatal("Failed to parse GFXBench test result: ", err) } pv := perf.NewValues() pv.Set(perf.Metric{ Name: "Benchmark.GfxBench.AztecRuinsOpenGLNormal", Unit: "FPS", Direction: perf.BiggerIsBetter, }, normalTierFPS) pv.Set(perf.Metric{ Name: "Benchmark.GfxBench.AztecRuinsOpenGLNormalOffscreen", Unit: "FPS", Direction: perf.BiggerIsBetter, }, offscreenFPS) if err := pv.Save(s.OutDir()); err != nil { s.Error("Failed to store performance values: ", err) } } // openGfxbench launches GFXBench app and does data sync with GFXBench server. // coords.Rect needs to be returned because sometimes it doesn't work when clicking start button // by UiObject.click() due to NAF Android UI elements. func openGfxbench(ctx context.Context, tconn *chrome.TestConn, device *ui.Device, ar *arc.ARC) (coords.Rect, error) { testing.ContextLog(ctx, "Opening GFXBench APP") act, err := arc.NewActivity(ar, gfxbenchPkgName, gfxActivityName) defer act.Close() if err != nil { return coords.Rect{}, errors.Wrap(err, "failed to create new activity") } if err = act.Start(ctx, tconn); err != nil { return coords.Rect{}, errors.Wrap(err, "failed to start app") } if err := ash.WaitForVisible(ctx, tconn, gfxbenchPkgName); err != nil { return coords.Rect{}, errors.Wrap(err, "failed to wait for the GFXBench APP window") } if err := setup.DismissMobilePrompt(ctx, tconn); err != nil { return coords.Rect{}, errors.Wrap(err, "failed to dismiss 'designed for mobile' prompt") } // Set ARC window to be resizable so it can be maximized. if err := setup.SetResizable(ctx, tconn); err != nil { return coords.Rect{}, errors.Wrap(err, "failed to set ARC window to be resizable") } activityBoundsInPx, err := act.WindowBounds(ctx) if err != nil { return coords.Rect{}, errors.Wrap(err, "failed to get the window bound of the GFXBench APP") } windowState, err := act.GetWindowState(ctx) if err != nil { return coords.Rect{}, errors.Wrap(err, "failed to get GFXBench APP's window state") } // UI elements sometimes could not be found on normal window state. // Set window state to maximized to ensure the UI actions works well. if windowState != arc.WindowStateMaximized { testing.ContextLogf(ctx, "Change window state from %s to maximized", windowState) if err := act.SetWindowState(ctx, tconn, arc.WindowStateMaximized); err != nil { return coords.Rect{}, errors.Wrap(err, "failed to set GFXBench APP to be maximized") } if err := ash.WaitForARCAppWindowState(ctx, tconn, gfxbenchPkgName, ash.WindowStateMaximized); err != nil { return coords.Rect{}, errors.Wrap(err, "failed to wait for GFXBench APP to be maximized") } } // Click the "Accept" button if it shows up. acceptButton := device.Object(ui.Text("Accept")) if err := acceptButton.WaitForExists(ctx, 30*time.Second); err != nil { testing.ContextLog(ctx, "License page was not found but try to continue: ", err) } else { testing.ContextLog(ctx, "On license page") if err := acceptButton.Click(ctx); err != nil { return coords.Rect{}, errors.Wrap(err, "failed to click Accept button") } } // Click the "OK" button to connect GFXBench server. info := device.Object(ui.Text("The benchmark only stores and displays results if you have an active internet connection.")) if err := info.WaitForExists(ctx, 10*time.Second); err != nil { testing.ContextLog(ctx, "Information page was not found but try to continue: ", err) } else { testing.ContextLog(ctx, "On information page") okButton := device.Object(ui.Text("OK"), ui.ClassName(buttonClass)) if err := okButton.Click(ctx); err != nil { return coords.Rect{}, errors.Wrap(err, "failed to click OK button") } } // At this time, the APP should be connecting the server, or downloading data. Handle // the retry in a go routine. ch := make(chan bool) go func() { for { select { case <-ch: return case <-time.After(10 * time.Second): retryButton := device.Object(ui.Text("Retry"), ui.ClassName(buttonClass)) if err := retryButton.Exists(ctx); err == nil { testing.ContextLog(ctx, "Click retry button to continue the test") if err := retryButton.Click(ctx); err != nil { // Continue and re-try next time. testing.ContextLog(ctx, "Failed to click retry button: ", err) } } } } }() defer close(ch) startTime := time.Now() // GFXBench synchronization start time. checkTime := startTime // Last result checking time. // Wait for "start all" button to show up. if err := testing.Poll(ctx, func(ctx context.Context) error { // Find and click the "OK" button to synchronize the application data from server. okButton := device.Object(ui.Text("OK"), ui.ClassName(buttonClass)) if err := okButton.WaitForExists(ctx, 1*time.Second); err == nil { testing.ContextLog(ctx, "On download page") if err := okButton.Click(ctx); err != nil { return testing.PollBreak(errors.Wrap(err, "failed to click OK button to download")) } } // In some situations APP will jump to results tab instead of home tab. // Clicks home tab and then looks for benchmark start icon. tabs := device.Object(ui.ID("com.glbenchmark.glbenchmark27:id/tabbar_back"), ui.Index(3)) if err := tabs.GetObject(ctx); err != nil { return errors.Wrap(err, "failed to call GetObject()") } startButton := device.Object(ui.ID(startBenchmark)) if err := startButton.WaitForExists(ctx, 3*time.Second); err != nil { homeViewTab := device.Object(ui.ClassName("android.view.View"), ui.Index(0)) // Log and continue if home tab clicking fails. if err := tabs.GetChild(ctx, homeViewTab); err != nil { testing.ContextLog(ctx, "Failed to find home tab inside tabs element: ", err) } else { if err := homeViewTab.WaitForExists(ctx, 5*time.Second); err == nil { if err := homeViewTab.Click(ctx); err != nil { testing.ContextLog(ctx, "Failed to click home tab: ", err) } } } nt := time.Now() // Log every minute. if nt.Sub(checkTime) > time.Minute { checkTime = nt testing.ContextLog(ctx, "Start benchmark button was not found - synchronization is still running. Elapsed time: ", nt.Sub(startTime)) } return errors.Wrap(err, "failed to wait for data download") } return nil }, &testing.PollOptions{Timeout: benchmarkSyncTime, Interval: time.Second}); err != nil { return coords.Rect{}, errors.Wrap(err, "failed to run GFXBench") } return activityBoundsInPx, nil } func startGfxbench(ctx context.Context, device *ui.Device, boundsInPx coords.Rect) error { startBenchmarkButton := device.Object(ui.ID(startBenchmark)) testing.ContextLog(ctx, "Click the start button") // Because the start button is rendered by customized code in GFXBench (NAF Android UI), // retry with UIObject.click and UIDevice.click to increase the success rate of the clicking. // Return with errors directly when start button is not found or fails to be clicked. return testing.Poll(ctx, func(ctx context.Context) error { if err := startBenchmarkButton.WaitForExists(ctx, 3*time.Second); err != nil { return errors.Wrap(err, "failed to find the start button") } if err := startBenchmarkButton.Click(ctx); err != nil { return errors.Wrap(err, "failed to click the start button") } if err := startBenchmarkButton.WaitUntilGone(ctx, 3*time.Second); err != nil { testing.ContextLog(ctx, "Start button was clicked but no response") // Try to click on the center point of bounds of GFXBench app // if there's no response from UI after the start button was clicked. if err := device.Click(ctx, boundsInPx.Width/2, boundsInPx.Height/2); err != nil { return errors.Wrap(err, "failed to click start button") } if err := startBenchmarkButton.WaitUntilGone(ctx, 3*time.Second); err != nil { return errors.Wrap(err, "there's no response from UI after the start button was clicked") } } return nil }, &testing.PollOptions{Timeout: 2 * time.Minute, Interval: 3 * time.Second}) } func waitForResult(ctx context.Context, device *ui.Device) error { startTime := time.Now() // GFXBench test start time. checkTime := startTime // Last result checking time. // Wait for the GFXBench to produce test result. return testing.Poll(ctx, func(ctx context.Context) error { // Due to network errors, app might prompt a dialog to continue test. okButton := device.Object(ui.Text("OK"), ui.ClassName(buttonClass)) if err := okButton.Exists(ctx); err == nil { testing.ContextLog(ctx, "Found ok button to click") if err := okButton.Click(ctx); err != nil { return testing.PollBreak(errors.Wrap(err, "failed to click ok button when benchmark running")) } } resultLabel := device.Object(ui.TextContains("Best results")) if err := resultLabel.WaitForExists(ctx, time.Second); err != nil { nt := time.Now() // Log every minute. if nt.Sub(checkTime) > time.Minute { checkTime = nt testing.ContextLog(ctx, "Result label not found - GFXBench test is still running. Elapsed time: ", nt.Sub(startTime)) } return errors.Wrap(err, "benchmark Result label not found") } return nil }, &testing.PollOptions{Timeout: benchmarkTestingTime, Interval: time.Second}) } // parseBenchmarkResultItem parses a particular result UI item. func parseBenchmarkResultItem(ctx context.Context, device *ui.Device, item *ui.Object, logMessage string) (val string, err error) { const ( wrapperObjectID = "com.glbenchmark.glbenchmark27:id/updated_result_item_score_wrapper" // Second cell in item body, this contains result FPS. resultObjectID = "com.glbenchmark.glbenchmark27:id/updated_result_item_subresult" // This is FPS label and the result we wanted. fpsRegexpPattern = `([0-9]*[.])?[0-9]+` ) wrapper := device.Object(ui.ID(wrapperObjectID)) result := device.Object(ui.ID(resultObjectID)) if err := item.GetChild(ctx, wrapper); err != nil { return "", errors.Wrap(err, "failed to find score wrapper element") } if err := wrapper.GetChild(ctx, result); err != nil { return "", errors.Wrap(err, "failed to find score result element") } // Get results for AztecRuinsOpenGLNormal(Aztec Ruins OpenGL (normal tier)) and AztecRuinsOpenGLNormalOffscreen(1080p Aztec Ruins OpenGL (normal tier) Offscreen). testing.ContextLogf(ctx, "Get %s FPS", logMessage) text, err := result.GetText(ctx) if err != nil { return "", errors.Wrapf(err, "cannot find %s result", logMessage) } testing.ContextLogf(ctx, "Found %s text label: %s", logMessage, text) val = regexp.MustCompile(fpsRegexpPattern).FindString(text) return val, nil } // parseBenchmarkResult parses the benchmark result by analyzing the UI items. func parseBenchmarkResult(ctx context.Context, device *ui.Device) (float64, float64, error) { const ( resultListObjectID = "com.glbenchmark.glbenchmark27:id/results_testList" // This is a list that shows all benchmark results. layoutObjectClassname = "android.widget.LinearLayout" // This is a row inside list. itemObjectID = "com.glbenchmark.glbenchmark27:id/updated_result_item_body" // This is an item body inside a row. relativeLayoutObjectClassname = "android.widget.RelativeLayout" // First cell in item body, this is used to get label text to get index of row we needed. linearLayoutObjectClassname = "android.widget.LinearLayout" // A linear layout to wrap label texts. textObjectObjectID = "com.glbenchmark.glbenchmark27:id/updated_result_item_name" // A Label indicates what result is this. We use this label to match finding. ) var normalTier, offscreen string // The two FPS scores. resultList := device.Object(ui.ID(resultListObjectID)) if err := resultList.GetObject(ctx); err != nil { return 0.0, 0.0, errors.Wrap(err, "failed to locate GFXBench result list UI node") } resultCount, err := resultList.GetChildCount(ctx) if err != nil { return 0.0, 0.0, errors.Wrap(err, "failed to get child count of result list") } // Loops through result list to find Normal Tier and Offscreen FPS. // Loop terminates if (1) no further row can be found, or (2) the two interested results have been found. for i := 1; i <= resultCount; i++ { // List Row. listRow := device.Object(ui.ClassName(layoutObjectClassname), ui.Index(i)) if err := resultList.GetChild(ctx, listRow); err != nil { testing.ContextLogf(ctx, "Failed to find result row %d inside result list: %v", i, err) continue } // Item wrapped by row. item := device.Object(ui.ID(itemObjectID)) // First cell. relativeLayout := device.Object(ui.ClassName(relativeLayoutObjectClassname)) // Linear layout inside first cell. linearLayout := device.Object(ui.ClassName(linearLayoutObjectClassname), ui.Index(1)) // Label indicates benchmark type. text := device.Object(ui.ID(textObjectObjectID)) if err := listRow.GetChild(ctx, item); err != nil { testing.ContextLog(ctx, "Failed to find item body in row element: ", err) continue } if err := item.GetChild(ctx, relativeLayout); err != nil { testing.ContextLog(ctx, "Failed to find first cell element: ", err) continue } if err := relativeLayout.GetChild(ctx, linearLayout); err != nil { testing.ContextLog(ctx, "Failed to find linear layout in cell element: ", err) continue } if err := linearLayout.GetChild(ctx, text); err != nil { testing.ContextLog(ctx, "Failed to find label text element: ", err) continue } // Get benchmark type text. val, err := text.GetText(ctx) if err != nil { testing.ContextLog(ctx, "Faild to get label text: ", err) continue } testing.ContextLogf(ctx, "Result for %s is found", val) if val == "Aztec Ruins OpenGL (Normal Tier)" { // Match Normal Tier. testing.ContextLog(ctx, "Get result for: ", val) logMessage := "AztecRuinsOpenGLNormal(Aztec Ruins OpenGL (normal tier))" normalTier, err = parseBenchmarkResultItem(ctx, device, item, logMessage) if err != nil { return 0.0, 0.0, errors.Wrap(err, "failed to get benchmark Aztec Ruins OpenGL (Normal Tier) result") } } else if strings.Contains(val, "Aztec Ruins OpenGL (Normal Tier) Offscreen") { // Match Offscreens. testing.ContextLog(ctx, "Get result for: ", val) logMessage := "AztecRuinsOpenGLNormalOffscreen(1080p Aztec Ruins OpenGL (normal tier) Offscreen)" offscreen, err = parseBenchmarkResultItem(ctx, device, item, logMessage) if err != nil { return 0.0, 0.0, errors.Wrap(err, "failed to get Aztec Ruins OpenGL (Normal Tier) Offscreen result") } } // Both of the two results have been found. if normalTier != "" && offscreen != "" { break } } var notFound string if normalTier == "" { notFound += " [Aztec Ruins OpenGL (Normal Tier)]" } if offscreen == "" { notFound += " [Aztec Ruins OpenGL (Normal Tier) Offscreen]" } if notFound != "" { return 0.0, 0.0, errors.Errorf("failed to find test score for %s", notFound) } normalTierFPS, err := strconv.ParseFloat(normalTier, 64) if err != nil { return 0.0, 0.0, errors.Wrap(err, "failed to convert AztecRuinsOpenGLNormal FPS") } offscreenFPS, err := strconv.ParseFloat(offscreen, 64) if err != nil { return 0.0, 0.0, errors.Wrap(err, "failed to convert AztecRuinsOpenGLNormalOffscreen FPS") } return normalTierFPS, offscreenFPS, nil }
40.82265
183
0.701282
85a11b64b9828922ea63877cee30f4fc5f9f2470
6,874
js
JavaScript
screens/WeeklyDelivery.js
ajou-nomad/nomad-frontend
cb887d5071b2afdc3b65ddebafbd06fa9b75920c
[ "MIT" ]
null
null
null
screens/WeeklyDelivery.js
ajou-nomad/nomad-frontend
cb887d5071b2afdc3b65ddebafbd06fa9b75920c
[ "MIT" ]
null
null
null
screens/WeeklyDelivery.js
ajou-nomad/nomad-frontend
cb887d5071b2afdc3b65ddebafbd06fa9b75920c
[ "MIT" ]
1
2021-06-19T13:22:05.000Z
2021-06-19T13:22:05.000Z
/* eslint-disable prettier/prettier */ /* eslint-disable react-native/no-inline-styles */ import React, { useState, useEffect } from 'react'; import { View, Text, Image, TouchableOpacity, StyleSheet, ActivityIndicator, } from 'react-native'; import {icons, COLORS, SIZES, FONTS, FONTS2} from '../constants'; import GoogleMap from '../components/map/GoogleMap'; import NewGroupButton from '../components/map/NewGroupButton'; import GpsButton from '../components/map/GpsButton'; import { currentLocation, getWeeklyGroupData, getData } from '../utils/helper'; import PlusButton from '../components/map/PlusButton'; import axiosApiInstance from '../utils/axios'; const ItemsForCreateGroupDetailDayPicker = () => { const todayFullDate = new Date(); todayFullDate.setDate(todayFullDate.getDate() + 1); todayFullDate.setHours(todayFullDate.getHours() + 1); if (todayFullDate.getDay() === 0) { todayFullDate.setDate(todayFullDate.getDate() + 1); } else if (todayFullDate.getDay() === 6) { todayFullDate.setDate(todayFullDate.getDate() + 2); } const todayDay = todayFullDate.getDay(); const dayArrayKor = ['월', '화', '수', '목', '금']; const dateDifference = [0, 1, 2, 3, 4]; const lastIndex = dateDifference.length - 1; let todayDayIndex = (todayDay % 6) - 1; if (todayDayIndex < 0) { todayDayIndex = 0; } for (let i = 0; i < todayDayIndex; i++) { dateDifference[lastIndex - i] += 2; } const dayArrayKorFixed = [...dayArrayKor.slice(todayDayIndex), ...dayArrayKor.slice(0, todayDayIndex)] return [dayArrayKorFixed, dateDifference] }; const WeeklyDelivery = ({ route, navigation }) => { const [location, setLocation] = useState(); const [responseWeeklyData,setResponseWeeklyData] = useState([]); const [responseStoreData,setResponseStoreData] = useState([]); const setCurrentLocation = (result) => { setLocation(result); }; const getAxiosData = async () => { // await getWeeklyGroupData().then((response) => { // // console.log(JSON.stringify(response, null, 4)); // setResponseWeeklyData(response) // }); // await getData('storeData').then( (response) => // setResponseStoreData(response) // ); await axiosApiInstance.get('/weeklyGroupList') .then((res) => { if (res.data.groupData.length !== 0) { let groupData = res.data.groupData.map((group) => { // 해당 group안에 storeData insert let storeData = res.data.storeData.filter((store) => store.storeId === group.storeId); group.store = storeData[0]; return group; }); // console.log("여기는 weeklyDelivery"+JSON.stringify(groupData,null,4)); setResponseWeeklyData(groupData); } else { console.log('get weeklyGroupData가 아직 없습니다.'); setResponseWeeklyData([]); } // console.log('체크:: ', JSON.stringify(res.data, null, 4)); }).catch( e => { console.log('에러:: ', e); }); await axiosApiInstance.get('storeList').then((response) => { // console.log(JSON.stringify(response.data.data, null, 4)); // console.log(JSON.stringify(response.data.data, null, 4)); setResponseStoreData(response.data.data); }); }; useEffect(() => { // 해당 화면 올때마다 최신 데이터 불러오기 const unsubscribe = navigation.addListener('focus', async () => { getAxiosData().then((data) => { console.log('axiosData들은 받아왔고'); }); }); if (route.params?.post) { console.log('검색한 위치 저장 완료'); setLocation(route.params.post); } else { currentLocation().then((result)=> { console.log('현재위치 저장 완료'); setCurrentLocation(result); }).catch( e => console.log(e) ); } return unsubscribe; }, [route.params?.post]); // 검색 창 헤더 const renderDestinationHeader = () => { return ( <TouchableOpacity style={styles.destinationHeader} onPress={() => navigation.navigate('SearchPlace', {prevScreen: 'WeeklyDelivery'})} > <View style={styles.destinationHeaderView}> <View style={{position: 'absolute', left: 15}}> <Image source={icons.google_marker} style={{ width: 25, height: 25, marginRight: SIZES.padding, }} /> </View> <View style={{ flex: 1, alignItems: 'center', marginHorizontal: 30, }}> <Text numberOfLines={1} style={{...FONTS2.body4}}>{location.address}</Text> </View> {/* <View style={{position: 'absolute', right: 10}}> <Image source={icons.mic} style={{ width: 20, height: 20, marginRight: SIZES.padding, }} /> </View> */} </View> </TouchableOpacity> ); }; const [dayArrayKorFixed, dateDifference] = ItemsForCreateGroupDetailDayPicker() return ( <View style={{ flex: 1 }}> { location ? ( <View style={{flex: 1}}> <GoogleMap initLocation={location} back="WeeklyDelivery" groupData={responseWeeklyData} storeData={responseStoreData} /> { renderDestinationHeader() } <PlusButton style={{ bottom: SIZES.height * 0.08, right: SIZES.width * 0.08 }} setLocation={setCurrentLocation} initLocation={location} deliDate={null} storeData={responseStoreData} datePicker={[dayArrayKorFixed,dateDifference]} /> <NewGroupButton storeData={responseStoreData} initLocation={location} deliDate={null} datePicker={[dayArrayKorFixed,dateDifference]} /> </View> ) : ( <View style={{ flex: 1, justifyContent: 'center' }}> <ActivityIndicator size="large" color={COLORS.primary} /> </View> )} </View> ); }; const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: COLORS.lightGray4, }, shadow: { shadowColor: '#000', shadowOffset: { width: 0, height: 3, }, shadowOpacity: 0.1, shadowRadius: 3, elevation: 1, }, destinationHeader: { position: 'absolute', top: 20, left: 0, right: 0, height: 50, alignItems: 'center', flex: 1, }, destinationHeaderView: { flexDirection: 'row', justifyContent: 'center', alignItems: 'center', width: SIZES.width * 0.85, paddingVertical: SIZES.padding, paddingHorizontal: SIZES.padding * 2, borderRadius: SIZES.radius, backgroundColor: COLORS.white, elevation: 5, }, }); export default WeeklyDelivery;
29.004219
145
0.580884
90d9f70cb591ec552b0cc367503bc3b7d940b765
1,778
py
Python
bluebutton/parsers/ccda.py
r4dat/bluebutton_priv
4acf99605239b79e187009b7de3ecf43b796d6c4
[ "Apache-2.0" ]
8
2015-04-06T15:01:01.000Z
2018-12-05T22:49:09.000Z
bluebutton/parsers/ccda.py
r4dat/bluebutton_priv
4acf99605239b79e187009b7de3ecf43b796d6c4
[ "Apache-2.0" ]
2
2015-09-09T13:38:46.000Z
2015-11-21T10:59:47.000Z
bluebutton/parsers/ccda.py
r4dat/bluebutton_priv
4acf99605239b79e187009b7de3ecf43b796d6c4
[ "Apache-2.0" ]
10
2015-06-18T18:43:33.000Z
2020-06-26T03:25:18.000Z
############################################################################### # Copyright 2015 University of Florida. All rights reserved. # This file is part of the BlueButton.py project. # Use of this source code is governed by the license found in the LICENSE file. ############################################################################### from ._ccda.allergies import allergies from ._ccda.care_plan import care_plan from ._ccda.demographics import demographics from ._ccda.document import document from ._ccda.encounters import encounters from ._ccda.free_text import free_text from ._ccda.functional_statuses import functional_statuses from ._ccda.immunizations import immunizations from ._ccda.instructions import instructions from ._ccda.medications import medications from ._ccda.problems import problems from ._ccda.procedures import procedures from ._ccda.results import results from ._ccda.smoking_status import smoking_status from ._ccda.vitals import vitals from ..core import wrappers def run(ccda): data = wrappers.ObjectWrapper() data.document = document(ccda) data.allergies = allergies(ccda) data.care_plan = care_plan(ccda) data.chief_complaint = free_text(ccda, 'chief_complaint') data.demographics = demographics(ccda) data.encounters = encounters(ccda) data.functional_statuses = functional_statuses(ccda) data.immunizations = immunizations(ccda).administered data.immunization_declines = immunizations(ccda).declined data.instructions = instructions(ccda) data.results = results(ccda) data.medications = medications(ccda) data.problems = problems(ccda) data.procedures = procedures(ccda) data.smoking_status = smoking_status(ccda) data.vitals = vitals(ccda) return data
39.511111
79
0.715411
0cf0a226855cb91425b2c33151d95bfc025b95b0
624
py
Python
tests/retrieve/test_segment.py
openghg/openghg
9a05dd6fe3cee6123898b8f390cfaded08dbb408
[ "Apache-2.0" ]
5
2021-03-02T09:04:07.000Z
2022-01-25T09:58:16.000Z
tests/retrieve/test_segment.py
openghg/openghg
9a05dd6fe3cee6123898b8f390cfaded08dbb408
[ "Apache-2.0" ]
229
2020-09-30T15:08:39.000Z
2022-03-31T14:23:55.000Z
tests/retrieve/test_segment.py
openghg/openghg
9a05dd6fe3cee6123898b8f390cfaded08dbb408
[ "Apache-2.0" ]
null
null
null
# import os # import uuid # import numpy as np # import pandas as pd # import pytest # mocked_uuid = "00000000-0000-1111-00000-000000000000" # @pytest.fixture(scope="session") # def data(): # filename = "bsd.picarro.1minute.248m.dat" # dir_path = os.path.dirname(__file__) # test_data = "../data/proc_test_data/CRDS" # filepath = os.path.join(dir_path, test_data, filename) # return pd.read_csv(filepath, header=None, skiprows=1, sep=r"\s+") # @pytest.fixture # def mock_uuid(monkeypatch): # def mock_uuid(): # return mocked_uuid # monkeypatch.setattr(uuid, "uuid4", mock_uuid)
21.517241
71
0.674679
4c37a6a3cf1be36fe9ae2fc450308b53002c71d6
701
php
PHP
backend/controllers/CustomerInvitationActivityResultController.php
XluNl/mhsh
954de212a9e0be3bf8fec1698e00d267572f7a7d
[ "BSD-3-Clause" ]
null
null
null
backend/controllers/CustomerInvitationActivityResultController.php
XluNl/mhsh
954de212a9e0be3bf8fec1698e00d267572f7a7d
[ "BSD-3-Clause" ]
null
null
null
backend/controllers/CustomerInvitationActivityResultController.php
XluNl/mhsh
954de212a9e0be3bf8fec1698e00d267572f7a7d
[ "BSD-3-Clause" ]
null
null
null
<?php namespace backend\controllers; use backend\models\BackendCommon; use backend\models\searches\CustomerInvitationActivityResultSearch; use yii; /** * CustomerInvitationActivityResult controller */ class CustomerInvitationActivityResultController extends BaseController { public function actionIndex(){ $searchModel = new CustomerInvitationActivityResultSearch(); BackendCommon::addCompanyIdToParams('CustomerInvitationActivityResultSearch'); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', [ 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, ]); } }
29.208333
86
0.720399
f1f6abf36c1dbecccef156de4b1c478005a6e97b
339
kt
Kotlin
src/main/kotlin/recharts/cartesian/brush/InternalBrushProps.kt
gm666q/kotlin-recharts
b0efa4c2644d1d6b20bd834a49c745301690440d
[ "Apache-2.0" ]
null
null
null
src/main/kotlin/recharts/cartesian/brush/InternalBrushProps.kt
gm666q/kotlin-recharts
b0efa4c2644d1d6b20bd834a49c745301690440d
[ "Apache-2.0" ]
null
null
null
src/main/kotlin/recharts/cartesian/brush/InternalBrushProps.kt
gm666q/kotlin-recharts
b0efa4c2644d1d6b20bd834a49c745301690440d
[ "Apache-2.0" ]
null
null
null
package recharts.cartesian.brush import recharts.kotlin.RechartsProps import recharts.kotlin.properties.NumberOrStringOrNullProp external interface InternalBrushProps : RechartsProps { var data: Array<Any>? var width: Number? var x: Number? var y: Number? } var InternalBrushProps.updateId by NumberOrStringOrNullProp()
24.214286
61
0.79056
9d93a77f966622f4fbd0d6b0647407de235f1119
2,500
swift
Swift
NewsAppTests/FeedViewModelTests.swift
sishuiOS/NewsFeed
e2716da38d5721f2c70c58f1e1717d14127f50cd
[ "MIT" ]
null
null
null
NewsAppTests/FeedViewModelTests.swift
sishuiOS/NewsFeed
e2716da38d5721f2c70c58f1e1717d14127f50cd
[ "MIT" ]
null
null
null
NewsAppTests/FeedViewModelTests.swift
sishuiOS/NewsFeed
e2716da38d5721f2c70c58f1e1717d14127f50cd
[ "MIT" ]
null
null
null
// // FeedViewModelTests.swift // NewsAppTests // // import XCTest @testable import NewsApp class FeedViewModelTests: XCTestCase { func test_refresh_OnSuccessfulResponse() { let (sut, client) = makeSUT() let expectation = expectation(description: "wait for load") sut.refresh() let (article, data) = makeArticle() sut.onFeedLoad = { result in XCTAssertEqual(result, article) } client.complete(with: 200, and: data) expectation.fulfill() wait(for: [expectation], timeout: 1.0) } func test_refresh_OnSuccessfulEmptyResponse() { let (sut, client) = makeSUT() let expectation = expectation(description: "wait for load") sut.refresh() sut.onFeedLoad = { result in XCTAssertEqual(result, []) } let dataString = """ {"status" : "status","totalResults": 20 , "articles": []} """ client.complete(with: 200, and: dataString.data(using: .utf8)!) expectation.fulfill() wait(for: [expectation], timeout: 1.0) } private func makeSUT() -> (FeedViewModel, HTTPClientSpy) { let httpSpy = HTTPClientSpy() let remoteFeedLoader = RemoteFeedLoader(client: httpSpy, url: anyURL()) let viewModel = FeedViewModel(feedLoader: remoteFeedLoader, imageLoader: RemoteFeedImageDataLoader(client: httpSpy)) return(viewModel, httpSpy) } private func makeArticle() -> ([Article], Data) { let article = Article(source: Source(id: "id", name: "name"), author: "author", title: "title", articleDescription: "description", url: "url", urlToImage: "url", publishedAt: "date", content: "content") let dataString = """ {"status" : "status","totalResults": 20 , "articles": [{"source": {"id": "\(article.source.id ?? "")"), "name": "\(article.source.name)")}, "title":"\(article.title)", "author": "\(article.author ?? "")", "description":"\(article.articleDescription ?? "")", "url": "\(article.url)","urlToImage": "\(article.urlToImage ?? "")", "publishedAt":"\(article.publishedAt)","content": "\(article.content ?? "")"}]} """ return ([article], dataString.data(using: .utf8)!) } func anyURL() -> URL { return URL(string: "http://any-url.com")! } }
36.764706
433
0.5628
e941525efe2ffdc56394b19f28a464e2220eee1a
89
rs
Rust
listings/ch03-common-programming-concepts/no-listing-29-if-not-equal-0/src/main.rs
awesome-doge/book-tw
a6c3759cb74fb4d46c08bcba22271816f9bb1515
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
113
2020-09-21T13:27:10.000Z
2022-03-26T08:50:32.000Z
listings/ch03-common-programming-concepts/no-listing-29-if-not-equal-0/src/main.rs
awesome-doge/book-tw
a6c3759cb74fb4d46c08bcba22271816f9bb1515
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
32
2020-09-11T01:27:52.000Z
2022-03-30T10:24:52.000Z
listings/ch03-common-programming-concepts/no-listing-29-if-not-equal-0/src/main.rs
awesome-doge/book-tw
a6c3759cb74fb4d46c08bcba22271816f9bb1515
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
40
2020-09-10T17:50:04.000Z
2022-03-25T04:08:02.000Z
fn main() { let number = 3; if number != 0 { println!("數字不為零"); } }
11.125
26
0.41573
418f375e1dea2a32287575ca739e86750db37c8e
2,683
c
C
C/stack_and_queue.c
Resolution-1/Python-tryout
44cdd124e1b8865d907f57e0ca75bf620f7167b8
[ "MIT" ]
21
2020-10-01T16:19:16.000Z
2021-11-08T13:01:47.000Z
C/stack_and_queue.c
Resolution-1/Python-tryout
44cdd124e1b8865d907f57e0ca75bf620f7167b8
[ "MIT" ]
13
2020-10-01T13:10:25.000Z
2021-10-01T06:27:44.000Z
C/stack_and_queue.c
Resolution-1/Python-tryout
44cdd124e1b8865d907f57e0ca75bf620f7167b8
[ "MIT" ]
77
2020-10-01T11:28:37.000Z
2021-10-16T09:27:37.000Z
#include<stdio.h> #include<malloc.h> struct node { int info; struct node *link; }*top,*front,*rear; void push(int data) { struct node *temp; temp=malloc(sizeof(struct node)); temp->info=data; temp->link=NULL; if(top==NULL) top=temp; else { temp->link=top; top=temp; } } void display() { struct node *q; q=top; if(top==NULL) printf("All elements deleted!!\n"); else { printf("The stack is:\t"); while(q!=NULL) { printf("%d\t",q->info); q=q->link; } printf("\n"); } } void pop() { int item; if(top==NULL) printf("UNDERFLOW\n"); else { item=top->info; top=top->link; printf("Poped item is:%d\n",item); display(); } } void enqueue(int data) { struct node *temp; temp=malloc(sizeof(struct node)); temp->info=data; temp->link=NULL; if(front==NULL) { front=temp; rear=temp; } else { rear->link=temp; rear=temp; } } void display_q() { struct node *q; q=front; if(front==NULL) printf("All elements deleted!!\n"); else { printf("\nThe queue is:\t"); while(q!=NULL) { printf("%d\t",q->info); q=q->link; } } } void dequeue() { if(front==NULL) printf("Underflow\n"); else { struct node *temp; temp=front; printf("Deleted item is:%d\n",front->info); front=front->link; free(temp); display_q(); } } void main() { int d,c; int k; int a=1; top=NULL; front=NULL; rear=NULL; printf("1.STACK\n2.QUEUE\n"); printf("Enter choice:\t"); scanf("%d",&k); while(a==1) { while(k==1) { printf("STACK\n"); printf("11) PUSH\n"); printf("12) POP\n"); printf("13) DISPLAY\n"); printf("Enter the subchoice:\t"); scanf("%d",&c); switch(c) { case 11:printf("Enter data:"); scanf("%d",&d); push(d); display(); break; case 12:pop(); break; case 13:display(); break; default:printf("Invalid option\n"); } printf("press 1 for stack, 2 for queue \n"); scanf("%d",&k); } while(k==2) { printf("QUEUE\n"); printf("21)ENQUEUE\n"); printf("22)DEQUEUE\n"); printf("23)DISPLAY\n"); printf("Enter the subchoice:\t"); scanf("%d",&c); switch(c) { case 21:printf("Enter data:"); scanf("%d",&d); enqueue(d); display_q(); break; case 22:dequeue(); break; case 23:display_q(); break; } printf("\npress 1 for stack, 2 for queue \n"); scanf("%d",&k); } } }
16.460123
49
0.500559
1eea12fad755b6e326502f36df320c9793e67db7
810
sql
SQL
bootstrap/database/views/view_jobs_list.sql
Boulevard-Software/nerd
6a9f7db74a90ccba1885ceba83adcd7180c91213
[ "MIT" ]
1
2020-03-17T11:42:16.000Z
2020-03-17T11:42:16.000Z
bootstrap/database/views/view_jobs_list.sql
Boulevard-Software/nerd
6a9f7db74a90ccba1885ceba83adcd7180c91213
[ "MIT" ]
null
null
null
bootstrap/database/views/view_jobs_list.sql
Boulevard-Software/nerd
6a9f7db74a90ccba1885ceba83adcd7180c91213
[ "MIT" ]
null
null
null
-- View: public.view_jobs_list -- DROP VIEW public.view_jobs_list; CREATE OR REPLACE VIEW public.view_jobs_list AS SELECT j.id, j.owner_id, j.type_id, j.title, j.description, j.started, j.ended, j.locate, j.status, j.created_at, j.updated_at, l2.url AS public_url, l2.id AS link_id, ( SELECT COALESCE(sum(l_1.labels), 0::bigint) AS sum FROM training l_1 WHERE l_1.job_id = j.id) AS labels, ( SELECT count(l3.id) AS count FROM training l3 WHERE l3.job_id = j.id) AS link_count FROM jobs j LEFT JOIN ( SELECT DISTINCT max(training.id) AS id, training.job_id FROM training GROUP BY training.job_id) l ON j.id = l.job_id LEFT JOIN training l2 ON l.id = l2.id
24.545455
56
0.609877
ea867fe869769f87841d43142b848103d4629a25
2,368
kt
Kotlin
compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/style/TextGeometricTransform.kt
bubenheimer/androidx
c68d3e0609bb6899a6ef9b49ad6715465f682b24
[ "Apache-2.0" ]
3,799
2020-07-23T21:58:59.000Z
2022-03-31T17:07:19.000Z
compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/style/TextGeometricTransform.kt
bubenheimer/androidx
c68d3e0609bb6899a6ef9b49ad6715465f682b24
[ "Apache-2.0" ]
152
2020-07-24T00:19:02.000Z
2022-03-31T00:57:54.000Z
compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/style/TextGeometricTransform.kt
bubenheimer/androidx
c68d3e0609bb6899a6ef9b49ad6715465f682b24
[ "Apache-2.0" ]
582
2020-07-24T00:16:54.000Z
2022-03-30T23:32:45.000Z
/* * Copyright 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 androidx.compose.ui.text.style import androidx.compose.runtime.Immutable import androidx.compose.runtime.Stable import androidx.compose.ui.util.lerp /** * Define a geometric transformation on text. * * @param scaleX The scale of the text on the horizontal direction. The default value is 1.0f, i.e * no scaling. * @param skewX The shear of the text on the horizontal direction. A pixel at (x, y), where y is * the distance above baseline, will be transformed to (x + y * skewX, y). The default value is * 0.0f i.e. no skewing. */ @Immutable class TextGeometricTransform( val scaleX: Float = 1.0f, val skewX: Float = 0f ) { companion object { @Stable internal val None = TextGeometricTransform(1.0f, 0.0f) } fun copy( scaleX: Float = this.scaleX, skewX: Float = this.skewX ): TextGeometricTransform { return TextGeometricTransform(scaleX, skewX) } override operator fun equals(other: Any?): Boolean { if (this === other) return true if (other !is TextGeometricTransform) return false if (scaleX != other.scaleX) return false if (skewX != other.skewX) return false return true } override fun hashCode(): Int { var result = scaleX.hashCode() result = 31 * result + skewX.hashCode() return result } override fun toString(): String { return "TextGeometricTransform(scaleX=$scaleX, skewX=$skewX)" } } fun lerp( start: TextGeometricTransform, stop: TextGeometricTransform, fraction: Float ): TextGeometricTransform { return TextGeometricTransform( lerp(start.scaleX, stop.scaleX, fraction), lerp(start.skewX, stop.skewX, fraction) ) }
30.358974
98
0.683277
2652afd9ae4f712b8135bd6dfe25dd7ba0a15b3e
1,770
java
Java
src/main/java/com/devops/thatguy/model/Order.java
dawoodchouhan/thatguysingleproject
ea1d667d2c3276b18593d05d124d1182e0556496
[ "RSA-MD" ]
null
null
null
src/main/java/com/devops/thatguy/model/Order.java
dawoodchouhan/thatguysingleproject
ea1d667d2c3276b18593d05d124d1182e0556496
[ "RSA-MD" ]
null
null
null
src/main/java/com/devops/thatguy/model/Order.java
dawoodchouhan/thatguysingleproject
ea1d667d2c3276b18593d05d124d1182e0556496
[ "RSA-MD" ]
null
null
null
package com.devops.thatguy.model; import java.io.Serializable; import java.util.List; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import org.springframework.stereotype.Component; @Component public class Order implements Serializable{ private static final long serialVersionUID = 1L; private String userId ; @Id @GeneratedValue(strategy=GenerationType.AUTO) private int orderId ; private Long totalRs ; /*private String payMethod ;*/ private ShippingAddress shippingAddress ; private BillingAddress billingAddress ; private List<Cart> cartList ; private CardDetails cardDetails ; public CardDetails getCardDetails() { return cardDetails; } public void setCardDetails(CardDetails cardDetails) { this.cardDetails = cardDetails; } public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } public Long getTotalRs() { return totalRs; } public void setTotalRs(Long totalRs2) { this.totalRs = totalRs2; } public ShippingAddress getShippingAddress() { return shippingAddress; } public void setShippingAddress(ShippingAddress shippingAddress) { this.shippingAddress = shippingAddress; } public BillingAddress getBillingAddress() { return billingAddress; } public void setBillingAddress(BillingAddress billingAddress) { this.billingAddress = billingAddress; } public List<Cart> getCartList() { return cartList; } public void setCartList(List<Cart> cartList) { this.cartList = cartList; } public int getOrderId() { return orderId; } public void setOrderId(int orderId) { this.orderId = orderId; } }
22.692308
67
0.731073
ca735b4d49259906560dcd413ad68d15b7a9294a
1,143
kt
Kotlin
workflows/src/main/kotlin/com/r3/refapp/flows/reports/GetTransactionByIdFlow.kt
taylorharvey-r3/bank-in-a-box
3c334c5055dad2eb78233a1a4a9fb6543cd27afc
[ "Apache-2.0" ]
10
2021-01-16T16:43:27.000Z
2022-02-16T01:19:24.000Z
workflows/src/main/kotlin/com/r3/refapp/flows/reports/GetTransactionByIdFlow.kt
taylorharvey-r3/bank-in-a-box
3c334c5055dad2eb78233a1a4a9fb6543cd27afc
[ "Apache-2.0" ]
4
2020-12-26T03:30:07.000Z
2021-09-01T06:29:51.000Z
workflows/src/main/kotlin/com/r3/refapp/flows/reports/GetTransactionByIdFlow.kt
taylorharvey-r3/bank-in-a-box
3c334c5055dad2eb78233a1a4a9fb6543cd27afc
[ "Apache-2.0" ]
5
2020-12-17T10:21:42.000Z
2022-03-27T05:56:19.000Z
package com.r3.refapp.flows.reports import co.paralleluniverse.fibers.Suspendable import com.r3.refapp.exceptions.RefappException import com.r3.refapp.repositories.TransactionLogRepository import com.r3.refapp.schemas.TransactionLogSchemaV1 import net.corda.core.flows.FlowLogic import net.corda.core.flows.InitiatingFlow import net.corda.core.flows.StartableByRPC /** * Public API flow used for reporting and views. Flow retrieves [TransactionLogSchemaV1.TransactionLog] for given * [txId]. * @param txId Id of the transaction log * @return Returns [FlowLogic<TransactionLogSchemaV1.TransactionLog>] object for given [txId] * @throws [IllegalArgumentException] if [TransactionLogSchemaV1.TransactionLog] with given [txId] cannot be found */ @StartableByRPC @InitiatingFlow class GetTransactionByIdFlow(val txId: String) : FlowLogic<TransactionLogSchemaV1.TransactionLog>() { @Suspendable override fun call(): TransactionLogSchemaV1.TransactionLog { val transactionLogRepository = serviceHub.cordaService(TransactionLogRepository::class.java) return transactionLogRepository.getTransactionLogById(txId) } }
42.333333
114
0.811899
40b302d5756b2c3409d6bffad0e046d7621e0c1c
7,856
py
Python
api/views/faces.py
heholek/librephotos
4f41a61d9685a3165c857b695a2440895d8746dd
[ "MIT" ]
null
null
null
api/views/faces.py
heholek/librephotos
4f41a61d9685a3165c857b695a2440895d8746dd
[ "MIT" ]
3
2020-12-05T12:57:15.000Z
2020-12-05T13:26:08.000Z
api/views/faces.py
heholek/librephotos
4f41a61d9685a3165c857b695a2440895d8746dd
[ "MIT" ]
null
null
null
import uuid import six from django.core.cache import cache from django.db.models import Q from rest_framework import viewsets from rest_framework.response import Response from rest_framework.views import APIView from rest_framework_extensions.cache.decorators import cache_response from api.directory_watcher import scan_faces from api.drf_optimize import OptimizeRelatedModelViewSetMetaclass from api.face_classify import train_faces from api.models import Face from api.models.person import get_or_create_person from api.serializers.serializers import FaceListSerializer, FaceSerializer from api.util import logger from api.views.caching import ( CACHE_TTL, CustomListKeyConstructor, CustomObjectKeyConstructor, ) from api.views.pagination import HugeResultsSetPagination, StandardResultsSetPagination class ScanFacesView(APIView): def get(self, request, format=None): try: job_id = uuid.uuid4() scan_faces.delay(request.user, job_id) return Response({"status": True, "job_id": job_id}) except BaseException: logger.exception("An Error occured") return Response({"status": False}) class TrainFaceView(APIView): def get(self, request, format=None): try: job_id = uuid.uuid4() train_faces.delay(request.user, job_id) return Response({"status": True, "job_id": job_id}) except BaseException: logger.exception() return Response({"status": False}) @six.add_metaclass(OptimizeRelatedModelViewSetMetaclass) class FaceListViewSet(viewsets.ModelViewSet): serializer_class = FaceListSerializer pagination_class = StandardResultsSetPagination @cache_response(CACHE_TTL, key_func=CustomObjectKeyConstructor()) def retrieve(self, *args, **kwargs): return super(FaceListViewSet, self).retrieve(*args, **kwargs) @cache_response(CACHE_TTL, key_func=CustomListKeyConstructor()) def list(self, *args, **kwargs): return super(FaceListViewSet, self).list(*args, **kwargs) @six.add_metaclass(OptimizeRelatedModelViewSetMetaclass) class FaceInferredListViewSet(viewsets.ModelViewSet): serializer_class = FaceListSerializer pagination_class = HugeResultsSetPagination def get_queryset(self): # Todo: optimze query by only prefetching relevant models & fields queryset = ( Face.objects.filter( Q(photo__hidden=False) & Q(photo__owner=self.request.user) & Q(person_label_is_inferred=True) ) .select_related("person") .order_by("id") ) return queryset @cache_response(CACHE_TTL, key_func=CustomObjectKeyConstructor()) def retrieve(self, *args, **kwargs): return super(FaceInferredListViewSet, self).retrieve(*args, **kwargs) @cache_response(CACHE_TTL, key_func=CustomListKeyConstructor()) def list(self, *args, **kwargs): return super(FaceInferredListViewSet, self).list(*args, **kwargs) @six.add_metaclass(OptimizeRelatedModelViewSetMetaclass) class FaceLabeledListViewSet(viewsets.ModelViewSet): serializer_class = FaceListSerializer pagination_class = HugeResultsSetPagination def get_queryset(self): # Todo: optimze query by only prefetching relevant models & fields queryset = ( Face.objects.filter( Q(photo__hidden=False) & Q(photo__owner=self.request.user), Q(person_label_is_inferred=False) | Q(person__name="unknown"), ) .select_related("person") .order_by("id") ) return queryset @cache_response(CACHE_TTL, key_func=CustomObjectKeyConstructor()) def retrieve(self, *args, **kwargs): return super(FaceLabeledListViewSet, self).retrieve(*args, **kwargs) @cache_response(CACHE_TTL, key_func=CustomListKeyConstructor()) def list(self, *args, **kwargs): return super(FaceLabeledListViewSet, self).list(*args, **kwargs) @six.add_metaclass(OptimizeRelatedModelViewSetMetaclass) class FaceViewSet(viewsets.ModelViewSet): queryset = ( Face.objects.filter(Q(photo__hidden=False)) .prefetch_related("person") .order_by("id") ) serializer_class = FaceSerializer pagination_class = StandardResultsSetPagination @cache_response(CACHE_TTL, key_func=CustomObjectKeyConstructor()) def retrieve(self, *args, **kwargs): return super(FaceViewSet, self).retrieve(*args, **kwargs) @cache_response(CACHE_TTL, key_func=CustomListKeyConstructor()) def list(self, *args, **kwargs): return super(FaceViewSet, self).list(*args, **kwargs) @six.add_metaclass(OptimizeRelatedModelViewSetMetaclass) class FaceInferredViewSet(viewsets.ModelViewSet): serializer_class = FaceSerializer pagination_class = HugeResultsSetPagination def get_queryset(self): return Face.objects.filter( Q(photo__hidden=False) & Q(photo__owner=self.request.user) & Q(person_label_is_inferred=True) ).order_by("id") @cache_response(CACHE_TTL, key_func=CustomObjectKeyConstructor()) def retrieve(self, *args, **kwargs): return super(FaceInferredViewSet, self).retrieve(*args, **kwargs) @cache_response(CACHE_TTL, key_func=CustomListKeyConstructor()) def list(self, *args, **kwargs): return super(FaceInferredViewSet, self).list(*args, **kwargs) @six.add_metaclass(OptimizeRelatedModelViewSetMetaclass) class FaceLabeledViewSet(viewsets.ModelViewSet): serializer_class = FaceSerializer pagination_class = HugeResultsSetPagination def get_queryset(self): return Face.objects.filter( Q(photo__hidden=False) & Q(photo__owner=self.request.user) & Q(person_label_is_inferred=False) ).order_by("id") @cache_response(CACHE_TTL, key_func=CustomObjectKeyConstructor()) def retrieve(self, *args, **kwargs): return super(FaceLabeledViewSet, self).retrieve(*args, **kwargs) @cache_response(CACHE_TTL, key_func=CustomListKeyConstructor()) def list(self, *args, **kwargs): return super(FaceLabeledViewSet, self).list(*args, **kwargs) class SetFacePersonLabel(APIView): def post(self, request, format=None): data = dict(request.data) person = get_or_create_person(name=data["person_name"]) faces = Face.objects.in_bulk(data["face_ids"]) updated = [] not_updated = [] for face in faces.values(): if face.photo.owner == request.user: face.person = person face.person_label_is_inferred = False face.person_label_probability = 1.0 face.save() updated.append(FaceListSerializer(face).data) else: not_updated.append(FaceListSerializer(face).data) cache.clear() return Response( { "status": True, "results": updated, "updated": updated, "not_updated": not_updated, } ) class DeleteFaces(APIView): def post(self, request, format=None): data = dict(request.data) faces = Face.objects.in_bulk(data["face_ids"]) deleted = [] not_deleted = [] for face in faces.values(): if face.photo.owner == request.user: deleted.append(face.id) face.delete() else: not_deleted.append(face.id) cache.clear() return Response( { "status": True, "results": deleted, "not_deleted": not_deleted, "deleted": deleted, } )
34.761062
87
0.666752
b18b6a1c1fe8570b7a33f67e370c7d042d9da30b
10,208
css
CSS
zenario_custom/templates/grid_templates/skins/blackdog/editable_css/2.zenario_user_forms.css
sitedata/Zenario
5c7f977ee1157a472b50292abbadaeb6b71b75a8
[ "BSD-3-Clause" ]
null
null
null
zenario_custom/templates/grid_templates/skins/blackdog/editable_css/2.zenario_user_forms.css
sitedata/Zenario
5c7f977ee1157a472b50292abbadaeb6b71b75a8
[ "BSD-3-Clause" ]
1
2021-07-24T21:29:03.000Z
2021-07-24T21:29:03.000Z
zenario_custom/templates/grid_templates/skins/blackdog/editable_css/2.zenario_user_forms.css
sitedata/Zenario
5c7f977ee1157a472b50292abbadaeb6b71b75a8
[ "BSD-3-Clause" ]
null
null
null
.zenario_user_forms .form_field { padding:10px 0; } .zenario_user_forms .form_field .field_title { padding:0 0 8px 8px; } .zenario_user_forms .form_field.mandatory .field_title:after { content:" *"; } .zenario_user_forms .form_field.has_error input[type='text'], .zenario_user_forms .form_field.has_error input[type='password'], .zenario_user_forms .form_field.has_error input[type='email'], .zenario_user_forms .form_field.has_error input[type='search'], .zenario_user_forms .form_field.has_error textarea, .zenario_user_forms .form_field.has_error select { border-color:#AF0615; } .zenario_user_forms .form_field.field_date { overflow:hidden; } .zenario_user_forms .form_field input[type='text'].hasDatepicker { max-width:200px; background:url('../images/icon-calendar-grey.png') no-repeat right center; } .zenario_user_forms .form_field.field_date input[type="button"].clear_date { min-width:0; width:20px; height:20px; line-height:12px; padding:0 0 4px; -webkit-border-radius:50%; -moz-border-radius:50%; border-radius:50%; margin-left:4px; } .zenario_user_forms .form_field.field_radios .values_wrap { padding-left:10px; } .zenario_user_forms .form_field.field_radios .values_wrap .field_radio input[type='radio'] { margin-right:4px; } .zenario_user_forms .form_field.field_checkbox { overflow:hidden; } .zenario_user_forms .form_field.field_checkbox input { float:left; margin-top:4px; } .zenario_user_forms .form_field.field_checkbox .field_title { display:inline-block; float:left; width:calc(100% - 30px); } .zenario_user_forms .form_field.field_checkbox .note_to_user { clear:both; float:none; font-size:0.857em; font-style:italic; margin-left:20px; } .zenario_user_forms .form_field.field_checkbox .note_to_user a { text-decoration:underline; } /* User forms, default styles ------------------------------------------------------------------------------------------------- */ .zenario_user_forms.zenario_user_forms__default_style .form_wrapper { max-width:740px; margin:auto; overflow:hidden; } .zenario_user_forms.zenario_user_forms__default_style .form_wrapper h2 { text-align:center; font-size:2em; } .zenario_user_forms.zenario_user_forms__default_style .form_buttons { overflow:hidden; margin-top:20px; text-align:center; } .zenario_user_forms.zenario_user_forms__default_style .form_buttons .next, .zenario_user_forms.zenario_user_forms__default_style fieldset .form_buttons .next.submit { float:right; } .zenario_user_forms.zenario_user_forms__default_style .form_buttons .previous { float:left; } .zenario_user_forms.zenario_user_forms__default_style .form_buttons .next.submit { float:none; } /* User forms, Grouping_Contact ------------------------------------------------------------------------------------------------- */ .Grouping_Contact .zenario_user_forms .form_wrapper { margin-left:30px; } /* User forms, popup ------------------------------------------------------------------------------------------------- */ .zenario_user_forms.form_popup { width:300px !important; position:fixed; z-index:100; bottom:0; right:50px; display:none; min-height:32px; } .zenario_user_forms.form_popup .form_wrapper { position:absolute; bottom:0; right:0; width:300px; height:38px; } .zenario_user_forms.form_popup, .zenario_user_forms.form_popup .form_wrapper, .zenario_user_forms.form_popup .form_wrapper > h2, .zenario_user_forms.form_popup .success > h2 { -webkit-border-top-left-radius: 4px; -webkit-border-top-right-radius: 4px; -moz-border-radius-topleft: 4px; -moz-border-radius-topright: 4px; border-top-left-radius: 4px; } .zenario_user_forms.form_popup .form_wrapper > h2, .zenario_user_forms.form_popup .success > h2 { height:18px; padding:10px; margin:0; font-size:16px; line-height:15px; background:#ec5c30; color:#FFF; font-family:'robotolight',Arial, Helvetica, sans-serif; text-align:left; cursor:pointer; } .zenario_user_forms.form_popup .form_wrapper > h2:before, .zenario_user_forms.form_popup .success > h2:before { font-family: 'FontAwesome'; content: "\f0e0"; position:relative; left:0; top:0; padding-right:12px; } .zenario_user_forms.form_popup .form_wrapper > h2 { background-image:url('../images/background-contact.png'); background-position:right top; background-repeat:no-repeat; } .zenario_user_forms.form_popup .user_form { height:500px; padding:10px 20px 20px; -webkit-box-shadow:0 12px 25px 8px rgba(0,0,0,0.17); -moz-box-shadow:0 12px 25px 8px rgba(0,0,0,0.17); box-shadow:0 12px 25px 8px rgba(0,0,0,0.17); position:relative; } .zenario_user_forms.form_popup .user_form .form_error { color:red; font-size:0.938em; } .zenario_user_forms.form_popup .user_form .form_field { padding-top:10px; } .zenario_user_forms.form_popup .user_form .form_field.field_section_description { padding-top:0; } .zenario_user_forms.form_popup .user_form .form_field.field_section_description .description p { margin-bottom:0; } .zenario_user_forms.form_popup .user_form .form_field .field_title, .zenario_user_forms.form_popup.hide .close { display:none; } .zenario_user_forms.form_popup .user_form .form_field.field_checkbox .field_title { display:block; } .zenario_user_forms.form_popup.show .close { position:absolute; top:500px; right:-25px; padding-top:0; width:25px; height:28px; display:block; -webkit-border-top-right-radius: 4px; -webkit-border-bottom-right-radius: 4px; -moz-border-radius-topright: 4px; -moz-border-radius-bottomright: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; cursor:pointer; text-indent:-999; font-size:0; line-height:0; } .zenario_user_forms.form_popup.show .close:before { font-family: 'FontAwesome'; content: "\f00d"; font-size:18px; padding-left:5px; text-indent:initial; font-size:18px; line-height:24px; } .zenario_user_forms.form_popup .user_form input[type="text"], .zenario_user_forms.form_popup .user_form input[type="email"], .zenario_user_forms.form_popup .user_form textarea { width:calc(100% - 20px); color:#808285; } .zenario_user_forms.form_popup .user_form input[type="text"], .zenario_user_forms.form_popup .user_form input[type="email"] { height:34px; line-height:34px; padding-top:0; padding-bottom:0; } .zenario_user_forms.form_popup .user_form textarea { height:100px; } .zenario_user_forms.form_popup .user_form .form_field.has_error input[type="text"], .zenario_user_forms.form_popup .user_form .form_field.has_error input[type="email"], .zenario_user_forms.form_popup .user_form .form_field.has_error textarea { -moz-box-shadow: 0 0 0 2px red; -webkit-box-shadow: 0 0 0 2px red; box-shadow: 0 0 0 2px red; background:#fff url('../images/icon-error-space.png') no-repeat right 8px; } .zenario_user_forms.form_popup .user_form .form_field.has_error input[type="text"]:focus, .zenario_user_forms.form_popup .user_form .form_field.has_error input[type="email"]:focus, .zenario_user_forms.form_popup .user_form .form_field.has_error textarea:focus { border-color:#B4B4B4; background:#fff; } .zenario_user_forms.form_popup .user_form .form_field.has_error .form_error { display:none; } .zenario_user_forms.form_popup .user_form .form_buttons { text-align:center; } .zenario_user_forms.form_popup .user_form .form_buttons input[type="button"] { width:100%; height:50px; margin-top:10px; font-size:15px; padding:0 0 3px; } .zenario_user_forms.form_popup.hide .form_wrapper { -webkit-transition: all 0.8s ease-in; -moz-transition: all 0.8s ease-in; -o-transition: all 0.8s ease-in; transition: all 0.8s ease-in; } .zenario_user_forms.form_popup.show .form_wrapper { bottom:500px; -webkit-transition: all 0.8s ease-in; -moz-transition: all 0.8s ease-in; -o-transition: all 0.8s ease-in; transition: all 0.8s ease-in; } .zenario_user_forms.form_popup .success p { padding:20px; text-align:center; } .zenario_user_forms.form_popup .success { opacity:1; width:280px; height:500px; padding:40px 10px 0; font-size:16px; line-height:24px; margin-bottom:0; -webkit-border-radius:0; -moz-border-radius:0; border-radius:0; -webkit-border-top-left-radius: 4px; -webkit-border-top-right-radius: 4px; -moz-border-radius-topleft: 4px; -moz-border-radius-topright: 4px; border-top-left-radius: 4px; -webkit-box-shadow:0 12px 25px 8px rgba(0,0,0,0.17); -moz-box-shadow:0 12px 25px 8px rgba(0,0,0,0.17); box-shadow:0 12px 25px 8px rgba(0,0,0,0.17); -webkit-transition: all 0.4s ease-in; -moz-transition: all 0.4s ease-in; -o-transition: all 0.4s ease-in; transition: all 0.4s ease-in; } .zenario_user_forms.form_popup.hide .success { opacity:0; -webkit-transition: all 0.4s ease-in; -moz-transition: all 0.4s ease-in; -o-transition: all 0.4s ease-in; transition: all 0.4s ease-in; } .zenario_user_forms.form_popup .user_form, .zenario_user_forms.form_popup.show .close, .zenario_user_forms.form_popup .success { background:#FFF; } .zenario_user_forms.form_popup .user_form, .zenario_user_forms.form_popup.show .close, .zenario_user_forms.form_popup.show .close:before, .zenario_user_forms.form_popup .success, .zenario_user_forms.form_popup .success p { color:#000; } .zenario_user_forms.form_popup .user_form .field_section_description.bottom_text { text-align:center; font-size:14px; line-height:18px; } .zenario_user_forms.form_popup .user_form .field_section_description.bottom_text .field_title { display:block; color:#f6c7d4; font-weight:700; } .zenario_user_forms.form_popup .user_form .field_section_description.bottom_text p { margin-bottom:0; font-weight:500; } .zenario_user_forms.form_popup.hide .success { display:none; } .Grid_Footer .zenario_user_forms.form_popup .form_field.field_checkbox { padding-top:0; } .Grid_Footer .zenario_user_forms.form_popup .form_field.field_checkbox * { color:#333 !important; } .zenario_user_forms.form_popup .form_field.field_checkbox .field_title { padding-bottom:2px; } .zenario_user_forms.form_popup .form_field.field_checkbox .field_title, .zenario_user_forms.form_popup .form_field.field_checkbox .note_to_user { font-size:0.8em; line-height:1.2em; }
25.456359
100
0.742359
26a7b3b3e37e04c5114917bd8fdf6bbed17b19c7
349
swift
Swift
Tools/msgs/sensor_msgs/ChannelFloat32Message.swift
agcoesbenr/RBSManager
7e356f93c01983156f30f30eba6104a7b807756f
[ "MIT" ]
57
2018-01-13T08:42:12.000Z
2021-11-14T14:21:30.000Z
Tools/msgs/sensor_msgs/ChannelFloat32Message.swift
agcoesbenr/RBSManager
7e356f93c01983156f30f30eba6104a7b807756f
[ "MIT" ]
14
2018-08-24T23:05:49.000Z
2022-01-13T08:32:59.000Z
Tools/msgs/sensor_msgs/ChannelFloat32Message.swift
agcoesbenr/RBSManager
7e356f93c01983156f30f30eba6104a7b807756f
[ "MIT" ]
18
2018-02-07T11:19:15.000Z
2021-11-19T07:53:25.000Z
// // ChannelFloat32Message.swift // // Created by wesgoodhoofd on 2019-01-22. // import UIKit import ObjectMapper public class ChannelFloat32Message: RBSMessage { public var name: string public var values: float32[] = [float32[]]() public override func mapping(map: Map) { name <- map["name"] values <- map["values"] } }
17.45
48
0.667622
3fa9906e66fd61fd8f525fd1b3df68b6f78f2c9b
1,069
c
C
test/valid/combine_3.c
austinpgraham/crust
3445a260e635b020dd090da31ff72e9d212eabb5
[ "Apache-2.0" ]
174
2019-04-03T00:28:50.000Z
2021-08-15T06:30:19.000Z
test/valid/combine_3.c
hoangpq/crust
7da5688d9d5c5e44809b22911e5ba22fcca7cba1
[ "Apache-2.0" ]
28
2019-04-02T09:48:21.000Z
2020-05-29T18:56:14.000Z
test/valid/combine_3.c
hoangpq/crust
7da5688d9d5c5e44809b22911e5ba22fcca7cba1
[ "Apache-2.0" ]
20
2019-04-05T14:56:12.000Z
2020-10-14T17:54:15.000Z
int fib(int a) {if (a == 0 || a == 1) {return a;} else {return fib(a - 1) + fib(a - 2);}} int max(int a, int b) {return a > b ? a : b;} int min(int a, int b) {return a < b ? a : b;} int sum(int a, int b) {return a + b;} int mul(int a, int b) {return a * b;} int div(int a, int b) {return a / b;} int EXIT_SUCCESS = 0; int EXIT_FAILURE = 1; int arr[30]; int main() { int a = 2; int b = 3; int n = 10; for (int i = 0; i < 30; i = i + 1) { if (i == 0 || i == 1) arr[i] = i; else arr[i] = arr[i-1] + arr[i-2]; } for (int i = 0; i < 30; i = i + 1) { if (arr[i] != fib(i)) return EXIT_FAILURE; } if (fib(n) != 55) return EXIT_FAILURE; if (min(a, b) != 2) return EXIT_FAILURE; if (max(a, b) != 3) return EXIT_FAILURE; if (sum(a, b) != 5) return EXIT_FAILURE; if (mul(a, b) != 6) return EXIT_FAILURE; if (div(a, b) != 0) return EXIT_FAILURE; return EXIT_SUCCESS; }
26.073171
90
0.448082
43be304557c5e62e77e4fd4d31f1501941fda630
2,315
swift
Swift
Shared/Views/Dialogs/NewConnectionDialog.swift
moosefactory/MidiCenterApp
f9b1dc425f7d93f53644ea234488d397314f001f
[ "MIT" ]
2
2021-01-26T08:14:19.000Z
2022-03-10T07:03:08.000Z
Shared/Views/Dialogs/NewConnectionDialog.swift
moosefactory/MidiCenterApp
f9b1dc425f7d93f53644ea234488d397314f001f
[ "MIT" ]
null
null
null
Shared/Views/Dialogs/NewConnectionDialog.swift
moosefactory/MidiCenterApp
f9b1dc425f7d93f53644ea234488d397314f001f
[ "MIT" ]
null
null
null
// // Dialog.swift // MidiCenterApp // // Created by Tristan Leblanc on 05/01/2021. // import SwiftUI import SwiftMidiCenter struct NewConnectionDialog: View { @Environment(\.presentationMode) var presentationMode /// Edited value, passed from outside @Binding var value: NewConnectionInfo? /// Prompt message var prompt: String = "" /// The value currently edited @State var editedValue: NewConnectionInfo var portTypes = ConnectionType.allStrings @State private var selectedPortType = 0 /// Init the Dialog view /// Passed @binding value is duplicated to @state value while editing init(prompt: String, value: Binding<NewConnectionInfo?>) { _value = value self.prompt = prompt _editedValue = State<NewConnectionInfo>(initialValue: value.wrappedValue ?? NewConnectionInfo(name: "main")) } var body: some View { VStack { Text(prompt).padding() Form { Section { TextField("", text: $editedValue.name) .frame(width: 200, alignment: .center) } Section { ChannelFilterView(channels: $editedValue.channels) } Section { Picker(selection: $editedValue.connectionTypeIndex, label: Text("Strength")) { ForEach(0 ..< portTypes.count) { Text(self.portTypes[$0]) } } } } HStack { Button("OK") { self.value = editedValue self.presentationMode.wrappedValue.dismiss() } Button("Dismiss") { self.presentationMode.wrappedValue.dismiss() } }.padding() } .padding() } } #if DEBUG struct Dialog_Previews: PreviewProvider { static var previews: some View { var info = NewConnectionInfo(name: "Test") NewConnectionDialog(prompt: "Name", value: Binding<NewConnectionInfo?>.init(get: { info }, set: {info = $0 ?? NewConnectionInfo(name: "Test")})) } } #endif
27.891566
152
0.528294
63af5f5f694c993860740eb75292b81e0da9c1b8
1,115
swift
Swift
Sources/App/Routes/Routes.swift
samazon/vapor-postgresql-relationships
adb6e4f50dfede30be86266ca7b28eee2c604356
[ "MIT" ]
null
null
null
Sources/App/Routes/Routes.swift
samazon/vapor-postgresql-relationships
adb6e4f50dfede30be86266ca7b28eee2c604356
[ "MIT" ]
null
null
null
Sources/App/Routes/Routes.swift
samazon/vapor-postgresql-relationships
adb6e4f50dfede30be86266ca7b28eee2c604356
[ "MIT" ]
null
null
null
import Vapor extension Droplet { func setupRoutes() throws { // get("hello") { req in // var json = JSON() // try json.set("hello", "world") // return json // } // get("plaintext") { req in // return "Hello, world!" // } // // response to requests to /info domain // // with a description of the request // get("info") { req in // return req.description // } get("description") { req in return req.description } try resource("posts", PostController.self) // resource("lessons", LessonController.self) let lessonController = LessonController() resource("lessons", lessonController) lessonController.addRoutes(self) let teacherController = TeacherController() resource("teachers", teacherController) teacherController.addRoutes(self) let studentController = StudentController() resource("students", studentController) studentController.addRouters(self) } }
28.589744
60
0.564126
40b2d4e39ba52424791c6f5a189db1d84b17ed0a
1,483
py
Python
tools.py
instance01/py-S-MCTS
cad67da8bb515126311040674d5e6da77f47c90f
[ "MIT" ]
null
null
null
tools.py
instance01/py-S-MCTS
cad67da8bb515126311040674d5e6da77f47c90f
[ "MIT" ]
null
null
null
tools.py
instance01/py-S-MCTS
cad67da8bb515126311040674d5e6da77f47c90f
[ "MIT" ]
null
null
null
def print_tree(mcts_obj, root_node): fifo = [] for child_node in root_node.children: q = 0 if mcts_obj.visits[child_node] > 0: q = mcts_obj.Q[child_node] / mcts_obj.visits[child_node] print( child_node, mcts_obj.Q[child_node], mcts_obj.visits[child_node], q ) fifo.append(child_node) print("-") while fifo: root_node = fifo.pop() print("(", root_node, ")") for child_node in root_node.children: q = 0 if mcts_obj.visits[child_node] > 0: q = mcts_obj.Q[child_node] / mcts_obj.visits[child_node] print( child_node, mcts_obj.Q[child_node], mcts_obj.visits[child_node], q ) fifo.append(child_node) if root_node.children: print(" ") def gen_tree_graph(root_node, G): fifo = [] root_id = str(root_node) G.add_node(root_id) for child_node in root_node.children: child_id = str(child_node) G.add_node(child_id) G.add_edge(root_id, child_id) fifo.append(child_node) while fifo: root_node = fifo.pop() root_id = str(root_node) for child_node in root_node.children: child_id = str(child_node) G.add_node(child_id) G.add_edge(root_id, child_id) fifo.append(child_node)
29.66
72
0.544842
e624578a144c9968c536c36c42ff697056326554
132
go
Go
tests/exec/results0.go
angelo-ortiz/Go-compiler
75781f0167493cc4e083fc6bd14387d76ff318e7
[ "MIT" ]
null
null
null
tests/exec/results0.go
angelo-ortiz/Go-compiler
75781f0167493cc4e083fc6bd14387d76ff318e7
[ "MIT" ]
null
null
null
tests/exec/results0.go
angelo-ortiz/Go-compiler
75781f0167493cc4e083fc6bd14387d76ff318e7
[ "MIT" ]
null
null
null
package main import "fmt" func foo(x int) (int, int) { return x, x+1 } func main() { x, y := foo(20) fmt.Print(x+y+1, "\n"); }
11
28
0.55303
7ad677623fbb19ebf637b74a555a032d2ac2c182
199
rb
Ruby
.delivery/build_cookbook/metadata.rb
julienhuon/chef-kubelet
e8ecd7e9932163f1ec7e2fab3236435521ddf174
[ "Apache-2.0" ]
null
null
null
.delivery/build_cookbook/metadata.rb
julienhuon/chef-kubelet
e8ecd7e9932163f1ec7e2fab3236435521ddf174
[ "Apache-2.0" ]
null
null
null
.delivery/build_cookbook/metadata.rb
julienhuon/chef-kubelet
e8ecd7e9932163f1ec7e2fab3236435521ddf174
[ "Apache-2.0" ]
null
null
null
name 'build_cookbook' maintainer 'Julien Huon' maintainer_email 'julien@huon.email' license 'apachev2' version '0.1.0' chef_version '>= 12.14' if respond_to?(:chef_version) depends 'delivery-truck'
22.111111
53
0.773869
dce0c25e2efd947768660b9f4d46f3d3903d8e4a
100
sql
SQL
migrations/0008_add-org-id-to-team-table.up.sql
CarlosSalda/taskcafe
0d00fc75183022b5397cc373a1b71edb56057b2b
[ "MIT" ]
2,064
2020-08-07T01:13:13.000Z
2022-03-31T20:23:40.000Z
migrations/0008_add-org-id-to-team-table.up.sql
CarlosSalda/taskcafe
0d00fc75183022b5397cc373a1b71edb56057b2b
[ "MIT" ]
84
2020-08-07T01:22:17.000Z
2022-03-28T07:48:08.000Z
migrations/0008_add-org-id-to-team-table.up.sql
CarlosSalda/taskcafe
0d00fc75183022b5397cc373a1b71edb56057b2b
[ "MIT" ]
195
2020-08-07T08:44:53.000Z
2022-03-26T06:09:42.000Z
ALTER TABLE team ADD COLUMN organization_id uuid NOT NULL REFERENCES organization(organization_id);
50
99
0.86
9decde67d2cc1443f09824b1a75738c121f4580d
5,175
asm
Assembly
Transynther/x86/_processed/AVXALIGN/_st_zr_un_4k_/i9-9900K_12_0xa0.log_21829_471.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
9
2020-08-13T19:41:58.000Z
2022-03-30T12:22:51.000Z
Transynther/x86/_processed/AVXALIGN/_st_zr_un_4k_/i9-9900K_12_0xa0.log_21829_471.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
1
2021-04-29T06:29:35.000Z
2021-05-13T21:02:30.000Z
Transynther/x86/_processed/AVXALIGN/_st_zr_un_4k_/i9-9900K_12_0xa0.log_21829_471.asm
ljhsiun2/medusa
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
[ "MIT" ]
3
2020-07-14T17:07:07.000Z
2022-03-21T01:12:22.000Z
.global s_prepare_buffers s_prepare_buffers: push %r11 push %r13 push %r9 push %rbx push %rcx push %rdi push %rsi lea addresses_UC_ht+0x1c7fe, %r9 nop nop nop nop nop xor %rdi, %rdi mov $0x6162636465666768, %rcx movq %rcx, %xmm7 movups %xmm7, (%r9) and %rdi, %rdi lea addresses_normal_ht+0x385e, %r9 nop cmp %rsi, %rsi mov (%r9), %r11 nop inc %rcx lea addresses_A_ht+0x14dae, %rsi lea addresses_UC_ht+0x102fe, %rdi sub %r13, %r13 mov $54, %rcx rep movsl nop nop nop dec %r11 lea addresses_A_ht+0x18f6, %r11 nop nop nop nop nop xor $21753, %rbx mov $0x6162636465666768, %rcx movq %rcx, %xmm1 movups %xmm1, (%r11) nop xor $535, %rbx pop %rsi pop %rdi pop %rcx pop %rbx pop %r9 pop %r13 pop %r11 ret .global s_faulty_load s_faulty_load: push %r10 push %r11 push %r14 push %r15 push %r8 push %rax push %rsi // Store lea addresses_RW+0x1a7fe, %r11 nop nop nop nop and $29104, %r8 movw $0x5152, (%r11) nop nop nop nop nop dec %rax // Faulty Load lea addresses_PSE+0x87fe, %r10 cmp %r14, %r14 movntdqa (%r10), %xmm0 vpextrq $0, %xmm0, %rsi lea oracles, %rax and $0xff, %rsi shlq $12, %rsi mov (%rax,%rsi,1), %rsi pop %rsi pop %rax pop %r8 pop %r15 pop %r14 pop %r11 pop %r10 ret /* <gen_faulty_load> [REF] {'src': {'NT': False, 'same': False, 'congruent': 0, 'type': 'addresses_PSE', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 11, 'type': 'addresses_RW', 'AVXalign': False, 'size': 2}} [Faulty Load] {'src': {'NT': True, 'same': True, 'congruent': 0, 'type': 'addresses_PSE', 'AVXalign': False, 'size': 16}, 'OP': 'LOAD'} <gen_prepare_buffer> {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 8, 'type': 'addresses_UC_ht', 'AVXalign': False, 'size': 16}} {'src': {'NT': True, 'same': False, 'congruent': 5, 'type': 'addresses_normal_ht', 'AVXalign': True, 'size': 8}, 'OP': 'LOAD'} {'src': {'same': False, 'congruent': 4, 'type': 'addresses_A_ht'}, 'OP': 'REPM', 'dst': {'same': True, 'congruent': 8, 'type': 'addresses_UC_ht'}} {'OP': 'STOR', 'dst': {'NT': False, 'same': False, 'congruent': 2, 'type': 'addresses_A_ht', 'AVXalign': False, 'size': 16}} {'52': 21590, '5f': 112, '00': 127} 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 00 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 5f 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 5f 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 52 */
45
2,999
0.659324
f790fec446fd6e3900157886dba2f91c0b8fa81c
9,364
h
C
a3d/src/container/a3dPool.h
ProjectAsura/asura-SDK
e823129856185b023b164415b7aec2de0ba9c338
[ "MIT" ]
42
2016-11-11T13:27:48.000Z
2021-07-27T17:53:43.000Z
a3d/src/container/a3dPool.h
ProjectAsura/asura-SDK
e823129856185b023b164415b7aec2de0ba9c338
[ "MIT" ]
null
null
null
a3d/src/container/a3dPool.h
ProjectAsura/asura-SDK
e823129856185b023b164415b7aec2de0ba9c338
[ "MIT" ]
2
2017-03-26T08:25:29.000Z
2018-10-24T06:10:29.000Z
//------------------------------------------------------------------------------------------------- // File : a3dPool.h // Desc : Item Pool. // Copyright(c) Project Asura. All right reserved. //------------------------------------------------------------------------------------------------- #pragma once //------------------------------------------------------------------------------------------------- // Includes //------------------------------------------------------------------------------------------------- #include <cstdint> #include <mutex> #include <cstdlib> #include <functional> namespace a3d { /////////////////////////////////////////////////////////////////////////////////////////////////// // Pool class /////////////////////////////////////////////////////////////////////////////////////////////////// template<typename T> class Pool { //============================================================================================= // list of friend classes and methods. //============================================================================================= /* NOTHING */ public: //============================================================================================= // public variablse. //============================================================================================= //--------------------------------------------------------------------------------------------- //! @brief コンストラクタです. //--------------------------------------------------------------------------------------------- Pool() : m_pBuffer (nullptr) , m_pActive (nullptr) , m_pFree (nullptr) , m_Capacity(0) , m_Count (0) { /* DO_NOTHING */ } //--------------------------------------------------------------------------------------------- //! @brief デストラクタです. //--------------------------------------------------------------------------------------------- ~Pool() { Term(); } //--------------------------------------------------------------------------------------------- //! @brief 初期化処理を行います. //! //! @param[in] count 確保するアイテム数です. //! @retval true 初期化に成功. //! @retval false 初期化に失敗. //--------------------------------------------------------------------------------------------- bool Init(uint32_t count) { std::lock_guard<std::mutex> guard(m_Mutex); m_pBuffer = static_cast<uint8_t*>(malloc(sizeof(Item) * (count + 2))); if ( m_pBuffer == nullptr ) { return false; } m_Capacity = count; // インデックスを振る. for(auto i=2u, j=0u; i<m_Capacity + 2; ++i, ++j) { auto item = GetItem(i); item->m_Index = j; } m_pActive = GetItem(0); m_pActive->m_pPrev = m_pActive->m_pNext = m_pActive; m_pActive->m_Index = uint32_t(-1); m_pFree = GetItem(1); m_pFree->m_Index = uint32_t(-2); for(auto i=1u; i<m_Capacity + 2; ++i) { GetItem(i)->m_pPrev = nullptr; GetItem(i)->m_pNext = GetItem( i + 1 ); } GetItem( m_Capacity + 1 )->m_pPrev = m_pFree; m_Count = 0; return true; } //--------------------------------------------------------------------------------------------- //! @brief 終了処理を行います. //--------------------------------------------------------------------------------------------- void Term() { std::lock_guard<std::mutex> guard(m_Mutex); if ( m_pBuffer ) { free(m_pBuffer); m_pBuffer = nullptr; } m_pActive = nullptr; m_pFree = nullptr; m_Capacity = 0; m_Count = 0; } //--------------------------------------------------------------------------------------------- //! @brief アイテムを確保します. //! //! @param[in] func ユーザによる初期化処理です. //! @return 確保したアイテムへのポインタ. 確保に失敗した場合は nullptr が返却されます. //--------------------------------------------------------------------------------------------- T* Alloc(std::function<void(uint32_t, T*)> func = nullptr) { std::lock_guard<std::mutex> guard(m_Mutex); if ( m_pFree->m_pNext == m_pFree || m_Count + 1 > m_Capacity ) { return nullptr; } auto item = m_pFree->m_pNext; m_pFree->m_pNext = item->m_pNext; item->m_pPrev = m_pActive->m_pPrev; item->m_pNext = m_pActive; item->m_pPrev->m_pNext = item->m_pNext->m_pPrev = item; m_Count++; // メモリ割り当て. auto val = new ((void*)item) T(); // 初期化の必要があれば呼び出す. if (func != nullptr) { func(item->m_Index, val); } return val; } //--------------------------------------------------------------------------------------------- //! @brief アイテムを解放します. //! //! @param[in] pValue 解放するアイテムへのポインタ. //--------------------------------------------------------------------------------------------- void Free(T* pValue) { if (pValue == nullptr) { return; } std::lock_guard<std::mutex> guard(m_Mutex); auto item = reinterpret_cast<Item*>(pValue); item->m_pPrev->m_pNext = item->m_pNext; item->m_pNext->m_pPrev = item->m_pPrev; item->m_pPrev = nullptr; item->m_pNext = m_pFree->m_pNext; m_pFree->m_pNext = item; m_Count--; } //-------------------------------------------------------------------------------------------- //! @brief 総アイテム数を取得します. //! //! @return 総アイテム数を返却します. //-------------------------------------------------------------------------------------------- uint32_t GetSize() const { return m_Capacity; } //-------------------------------------------------------------------------------------------- //! @brief 使用中のアイテム数を取得します. //! //! @return 使用中のアイテム数を返却します. //-------------------------------------------------------------------------------------------- uint32_t GetUsedCount() const { return m_Count; } //-------------------------------------------------------------------------------------------- //! @brief 利用可能なアイテム数を取得します. //! //! @return 利用可能なアイテム数を返却します. //-------------------------------------------------------------------------------------------- uint32_t GetAvailableCount() const { return m_Capacity - m_Count; } private: /////////////////////////////////////////////////////////////////////////////////////////////// // Item structure /////////////////////////////////////////////////////////////////////////////////////////////// struct Item { T m_Value; //!< 値です. uint32_t m_Index; //!< インデックスです. Item* m_pNext; //!< 次のアイテムへのポインタ. Item* m_pPrev; //!< 前のアイテムへのポインタ. Item() : m_Value() , m_Index(0) , m_pNext(nullptr) , m_pPrev(nullptr) { /* DO_NOTHING */ } ~Item() { /* DO_NOTHING */ } }; //============================================================================================= // private variables. //============================================================================================= uint8_t* m_pBuffer; //!< バッファです. Item* m_pActive; //!< アクティブアイテムの先頭です. Item* m_pFree; //!< フリーアイテムの先頭です. uint32_t m_Capacity; //!< 総アイテム数です. uint32_t m_Count; //!< 確保したアイテム数です. std::mutex m_Mutex; //!< ミューテックスです. //============================================================================================= // private methods. //============================================================================================= //--------------------------------------------------------------------------------------------- //! @brief アイテムを取得します. //! //! @param[in] index 取得するアイテムのインデックス. //! @return アイテムへのポインタを返却します. //--------------------------------------------------------------------------------------------- Item* GetItem( uint32_t index ) { A3D_ASSERT( 0 <= index && index <= m_Capacity + 2 ); return reinterpret_cast<Item*>( m_pBuffer + sizeof(Item) * index ); } //--------------------------------------------------------------------------------------------- //! @brief アイテムにメモリを割り当てます. //! //! @param[in] index 取得するアイテムのインデックス. //! @return アイテムへのポインタを返却します. //--------------------------------------------------------------------------------------------- Item* AssignItem( uint32_t index ) { A3D_ASSERT( 0 <= index && index <= m_Capacity + 2 ); auto buf = (m_pBuffer + sizeof(Item) * index); return new (buf) Item; } Pool (const Pool&) = delete; void operator = (const Pool&) = delete; }; } // namespace a3d
36.015385
101
0.291756
4c18f2b7ba0ba34feaaf04498d24f7baae64b931
2,532
php
PHP
app/Views/Template/base.php
Aamir-Sohail/joblister_code
26311b0bcdbd26aca2c55d984f8bec04cde3582b
[ "MIT" ]
null
null
null
app/Views/Template/base.php
Aamir-Sohail/joblister_code
26311b0bcdbd26aca2c55d984f8bec04cde3582b
[ "MIT" ]
null
null
null
app/Views/Template/base.php
Aamir-Sohail/joblister_code
26311b0bcdbd26aca2c55d984f8bec04cde3582b
[ "MIT" ]
null
null
null
<?php use App\Controllers\Home; ?> <!doctype html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <!-- Bootstrap CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> <title>JobLister</title> <link rel="stylesheet" href="https://bootswatch.com/4/flatly/bootstrap.min.css"> <link rel="stylesheet" href="<?php echo base_url('css/styles.css'); ?>"> <!-- <link rel="stylesheet" href="css/styles.css"> --> <title> <?= $this->renderSection('title') ?></title> </head> <!-- The Body Where we Do function --> <!-- Header --> <header> <div class="container"> <div class="header clearfix"> <nav> <ul class="nav nav-pills float-right"> <form> <input type="text" class="nav-link" autocomplete="off" placeholder="Search Here" name="search"> </form > <li class="nav-item"> <a class="nav-link" href="<?= base_url('home')?>">Home</a> </li> <li class="nav-item"> <a class="nav-link" href="<?= base_url('create')?>">Create Listing</a> </li> </ul> </nav> <h3 class="text-muted"><?php echo 'Joblister'; ?></h3> </div> </div> </header> <!-- Main --> <div class="container"> <div class="row"> <?= $this->renderSection('content') ?> </div> </div> <!-- Footer --> <footer class="footer"> <p>&copy; JobLister 2021</p> </footer> <!-- Optional JavaScript --> <!-- jQuery first, then Popper.js, then Bootstrap JS --> <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script> </body> </html>
38.953846
212
0.60466
905da7814fb141239bba1210d487a0c75ff90817
4,916
py
Python
models/counters/SANet.py
MagazzuGaetano/Crowd-Counting-DEMO
a765072d2ce924a8ef756941f10e1013fc8a9f71
[ "MIT" ]
1
2022-03-25T14:47:56.000Z
2022-03-25T14:47:56.000Z
models/counters/SANet.py
MagazzuGaetano/Crowd-Counting-DEMO
a765072d2ce924a8ef756941f10e1013fc8a9f71
[ "MIT" ]
null
null
null
models/counters/SANet.py
MagazzuGaetano/Crowd-Counting-DEMO
a765072d2ce924a8ef756941f10e1013fc8a9f71
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F from misc.utils import initialize_weights class BasicConv(nn.Module): def __init__(self, in_channels, out_channels, use_bn=False, **kwargs): super(BasicConv, self).__init__() self.use_bn = use_bn self.conv = nn.Conv2d(in_channels, out_channels, bias=not self.use_bn, **kwargs) self.bn = nn.InstanceNorm2d(out_channels, affine=True) if self.use_bn else None def forward(self, x): x = self.conv(x) if self.use_bn: x = self.bn(x) return F.relu(x, inplace=True) class BasicDeconv(nn.Module): def __init__(self, in_channels, out_channels, kernel_size, stride=1, use_bn=False): super(BasicDeconv, self).__init__() self.use_bn = use_bn self.tconv = nn.ConvTranspose2d(in_channels, out_channels, kernel_size, stride=stride, bias=not self.use_bn) self.bn = nn.InstanceNorm2d(out_channels, affine=True) if self.use_bn else None def forward(self, x): # pdb.set_trace() x = self.tconv(x) if self.use_bn: x = self.bn(x) return F.relu(x, inplace=True) class SAModule_Head(nn.Module): def __init__(self, in_channels, out_channels, use_bn): super(SAModule_Head, self).__init__() branch_out = out_channels // 4 self.branch1x1 = BasicConv(in_channels, branch_out, use_bn=use_bn, kernel_size=1) self.branch3x3 = BasicConv(in_channels, branch_out, use_bn=use_bn, kernel_size=3, padding=1) self.branch5x5 = BasicConv(in_channels, branch_out, use_bn=use_bn, kernel_size=5, padding=2) self.branch7x7 = BasicConv(in_channels, branch_out, use_bn=use_bn, kernel_size=7, padding=3) def forward(self, x): branch1x1 = self.branch1x1(x) branch3x3 = self.branch3x3(x) branch5x5 = self.branch5x5(x) branch7x7 = self.branch7x7(x) out = torch.cat([branch1x1, branch3x3, branch5x5, branch7x7], 1) return out class SAModule(nn.Module): def __init__(self, in_channels, out_channels, use_bn): super(SAModule, self).__init__() branch_out = out_channels // 4 self.branch1x1 = BasicConv(in_channels, branch_out, use_bn=use_bn, kernel_size=1) self.branch3x3 = nn.Sequential( BasicConv(in_channels, 2*branch_out, use_bn=use_bn, kernel_size=1), BasicConv(2*branch_out, branch_out, use_bn=use_bn, kernel_size=3, padding=1), ) self.branch5x5 = nn.Sequential( BasicConv(in_channels, 2*branch_out, use_bn=use_bn, kernel_size=1), BasicConv(2*branch_out, branch_out, use_bn=use_bn, kernel_size=5, padding=2), ) self.branch7x7 = nn.Sequential( BasicConv(in_channels, 2*branch_out, use_bn=use_bn, kernel_size=1), BasicConv(2*branch_out, branch_out, use_bn=use_bn, kernel_size=7, padding=3), ) def forward(self, x): branch1x1 = self.branch1x1(x) branch3x3 = self.branch3x3(x) branch5x5 = self.branch5x5(x) branch7x7 = self.branch7x7(x) out = torch.cat([branch1x1, branch3x3, branch5x5, branch7x7], 1) return out class SANet(nn.Module): def __init__(self, gray_input=False, use_bn=True): super(SANet, self).__init__() if gray_input: in_channels = 1 else: in_channels = 3 self.encoder = nn.Sequential( SAModule_Head(in_channels, 64, use_bn), nn.MaxPool2d(2, 2), SAModule(64, 128, use_bn), nn.MaxPool2d(2, 2), SAModule(128, 128, use_bn), nn.MaxPool2d(2, 2), SAModule(128, 128, use_bn), ) self.decoder = nn.Sequential( BasicConv(128, 64, use_bn=use_bn, kernel_size=9, padding=4), BasicDeconv(64, 64, 2, stride=2, use_bn=use_bn), BasicConv(64, 32, use_bn=use_bn, kernel_size=7, padding=3), BasicDeconv(32, 32, 2, stride=2, use_bn=use_bn), BasicConv(32, 16, use_bn=use_bn, kernel_size=5, padding=2), BasicDeconv(16, 16, 2, stride=2, use_bn=use_bn), BasicConv(16, 16, use_bn=use_bn, kernel_size=3, padding=1), BasicConv(16, 1, use_bn=False, kernel_size=1), ) initialize_weights(self.modules()) def forward(self, x): features = self.encoder(x) out = self.decoder(features) return out
39.328
116
0.576485
485a7a06b0e003ca530835f24419db77aed8f16c
506
swift
Swift
NekoJealousy/Adaptive/ForceTouch.swift
stzn/NekoJealousy
5a418a4723ac4dc65a436b405daf0c06546bec1d
[ "Apache-2.0" ]
null
null
null
NekoJealousy/Adaptive/ForceTouch.swift
stzn/NekoJealousy
5a418a4723ac4dc65a436b405daf0c06546bec1d
[ "Apache-2.0" ]
null
null
null
NekoJealousy/Adaptive/ForceTouch.swift
stzn/NekoJealousy
5a418a4723ac4dc65a436b405daf0c06546bec1d
[ "Apache-2.0" ]
null
null
null
// // ForceTouch.swift // NekoJealousy // // Created by stakata on 2018/05/11. // Copyright © 2018年 sztk. All rights reserved. // import UIKit enum ForceTouch: AdaptiveAttribute { case unavailable case available func generateTraitCollection() -> UITraitCollection { switch self { case .unavailable: return UITraitCollection(forceTouchCapability: .unavailable) case .available: return UITraitCollection(forceTouchCapability: .available) } } }
22
87
0.683794
58f855aef440dbf739f09ca5ce763393cee6e348
5,581
rs
Rust
src/sys/pkg/lib/blobfs/src/lib.rs
EnderNightLord-ChromeBook/zircon-rpi
b09b1eb3aa7a127c65568229fe10edd251869283
[ "BSD-2-Clause" ]
null
null
null
src/sys/pkg/lib/blobfs/src/lib.rs
EnderNightLord-ChromeBook/zircon-rpi
b09b1eb3aa7a127c65568229fe10edd251869283
[ "BSD-2-Clause" ]
null
null
null
src/sys/pkg/lib/blobfs/src/lib.rs
EnderNightLord-ChromeBook/zircon-rpi
b09b1eb3aa7a127c65568229fe10edd251869283
[ "BSD-2-Clause" ]
null
null
null
// Copyright 2021 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #![deny(missing_docs)] //! Typesafe wrappers around the /blob filesystem. use { fidl_fuchsia_io::{DirectoryMarker, DirectoryProxy, DirectoryRequestStream}, fuchsia_hash::{Hash, ParseHashError}, fuchsia_zircon::Status, std::collections::HashSet, thiserror::Error, }; /// Blobfs client errors. #[derive(Debug, Error)] #[allow(missing_docs)] pub enum BlobfsError { #[error("while opening blobfs dir")] OpenDir(#[from] io_util::node::OpenError), #[error("while listing blobfs dir")] ReadDir(#[source] files_async::Error), #[error("while deleting blob")] Unlink(#[source] Status), #[error("while parsing blob merkle hash")] ParseHash(#[from] ParseHashError), #[error("FIDL error")] Fidl(#[from] fidl::Error), } /// Blobfs client #[derive(Debug, Clone)] pub struct Client { proxy: DirectoryProxy, } impl Client { /// Returns an client connected to blobfs from the current component's namespace. pub fn open_from_namespace() -> Result<Self, BlobfsError> { let proxy = io_util::directory::open_in_namespace( "/blob", fidl_fuchsia_io::OPEN_RIGHT_READABLE | fidl_fuchsia_io::OPEN_RIGHT_WRITABLE, )?; Ok(Client { proxy }) } /// Returns an client connected to blobfs from the given blobfs root dir. pub fn new(proxy: DirectoryProxy) -> Self { Client { proxy } } /// Creates a new client backed by the returned request stream. This constructor should not be /// used outside of tests. /// /// # Panics /// /// Panics on error pub fn new_test() -> (Self, DirectoryRequestStream) { let (proxy, stream) = fidl::endpoints::create_proxy_and_stream::<DirectoryMarker>().unwrap(); (Self { proxy }, stream) } /// Returns the list of known blobs in blobfs. pub async fn list_known_blobs(&self) -> Result<HashSet<Hash>, BlobfsError> { let entries = files_async::readdir(&self.proxy).await.map_err(BlobfsError::ReadDir)?; entries .into_iter() .filter(|entry| entry.kind == files_async::DirentKind::File) .map(|entry| entry.name.parse().map_err(BlobfsError::ParseHash)) .collect() } /// Delete the blob with the given merkle hash. pub async fn delete_blob(&self, blob: &Hash) -> Result<(), BlobfsError> { let status = self.proxy.unlink(&blob.to_string()).await?; Status::ok(status).map_err(BlobfsError::Unlink) } } #[cfg(test)] mod tests { use { super::*, blobfs_ramdisk::BlobfsRamdisk, fidl_fuchsia_io::DirectoryRequest, fuchsia_async as fasync, fuchsia_merkle::MerkleTree, futures::stream::TryStreamExt, maplit::hashset, matches::assert_matches, }; #[fasync::run_singlethreaded(test)] async fn list_known_blobs_empty() { let blobfs = BlobfsRamdisk::start().unwrap(); let client = Client::new(blobfs.root_dir_proxy().unwrap()); assert_eq!(client.list_known_blobs().await.unwrap(), HashSet::new()); blobfs.stop().await.unwrap(); } #[fasync::run_singlethreaded(test)] async fn list_known_blobs() { let blobfs = BlobfsRamdisk::builder() .with_blob(&b"blob 1"[..]) .with_blob(&b"blob 2"[..]) .start() .unwrap(); let client = Client::new(blobfs.root_dir_proxy().unwrap()); let expected = blobfs.list_blobs().unwrap().into_iter().collect(); assert_eq!(client.list_known_blobs().await.unwrap(), expected); blobfs.stop().await.unwrap(); } #[fasync::run_singlethreaded(test)] async fn delete_blob_and_then_list() { let blobfs = BlobfsRamdisk::builder() .with_blob(&b"blob 1"[..]) .with_blob(&b"blob 2"[..]) .start() .unwrap(); let client = Client::new(blobfs.root_dir_proxy().unwrap()); let merkle = MerkleTree::from_reader(&b"blob 1"[..]).unwrap().root(); assert_matches!(client.delete_blob(&merkle).await, Ok(())); let expected = hashset! {MerkleTree::from_reader(&b"blob 2"[..]).unwrap().root()}; assert_eq!(client.list_known_blobs().await.unwrap(), expected); blobfs.stop().await.unwrap(); } #[fasync::run_singlethreaded(test)] async fn delete_non_existing_blob() { let blobfs = BlobfsRamdisk::start().unwrap(); let client = Client::new(blobfs.root_dir_proxy().unwrap()); let blob_merkle = Hash::from([1; 32]); assert_matches!( client.delete_blob(&blob_merkle).await, Err(BlobfsError::Unlink(Status::NOT_FOUND)) ); blobfs.stop().await.unwrap(); } #[fasync::run_singlethreaded(test)] async fn delete_blob_mock() { let (client, mut stream) = Client::new_test(); let blob_merkle = Hash::from([1; 32]); fasync::Task::spawn(async move { match stream.try_next().await.unwrap().unwrap() { DirectoryRequest::Unlink { path, responder } => { assert_eq!(path, blob_merkle.to_string()); responder.send(Status::OK.into_raw()).unwrap(); } other => panic!("unexpected request: {:?}", other), } }) .detach(); assert_matches!(client.delete_blob(&blob_merkle).await, Ok(())); } }
33.220238
98
0.612256
2a15518fbd66c41256a99e702c919c0feda94a7d
92,131
html
HTML
raw/isa104/104_16-2A-N.html
kiang/salary
ae064dca78d38256ae850c15c9cd4b9ab48be8bc
[ "MIT" ]
25
2016-02-24T23:28:25.000Z
2022-01-09T01:22:46.000Z
raw/isa104/104_16-2A-N.html
kiang/salary
ae064dca78d38256ae850c15c9cd4b9ab48be8bc
[ "MIT" ]
4
2016-07-14T04:27:03.000Z
2022-02-09T16:56:57.000Z
raw/isa104/104_16-2A-N.html
kiang/salary
ae064dca78d38256ae850c15c9cd4b9ab48be8bc
[ "MIT" ]
16
2016-07-14T04:00:56.000Z
2022-03-22T11:00:18.000Z
<html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <style type="text/css"> a {text-decoration: none} </style> </head> <body text="#000000" link="#000000" alink="#000000" vlink="#000000"> <table width="100%" cellpadding="0" cellspacing="0" border="0"> <tr><td width="50%">&nbsp;</td><td align="center"> <a name="JR_PAGE_ANCHOR_0_1"></a> <table style="width: 1190px; border-collapse: collapse; empty-cells: show" cellpadding="0" cellspacing="0" border="0" bgcolor="white"> <tr> <td style="width: 20px; height: 1px;"></td> <td style="width: 73px; height: 1px;"></td> <td style="width: 87px; height: 1px;"></td> <td style="width: 110px; height: 1px;"></td> <td style="width: 110px; height: 1px;"></td> <td style="width: 110px; height: 1px;"></td> <td style="width: 110px; height: 1px;"></td> <td style="width: 110px; height: 1px;"></td> <td style="width: 110px; height: 1px;"></td> <td style="width: 110px; height: 1px;"></td> <td style="width: 110px; height: 1px;"></td> <td style="width: 110px; height: 1px;"></td> <td style="width: 20px; height: 1px;"></td> </tr> <tr valign="top"> <td colspan="13" style="width: 1190px; height: 20px;"></td> </tr> <tr valign="top"> <td colspan="10" style="width: 950px; height: 20px;"></td> <td colspan="2" style="width: 220px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 16px;">單位:金額(千元)</span></p></td> <td style="width: 20px; height: 20px;"></td> </tr> <tr valign="top"> <td style="width: 20px; height: 20px;"></td> <td colspan="9" style="width: 930px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 16px;">表16-2A(104年度)綜稅各類所得金額各級距申報統計表</span></p></td> <td colspan="2" style="width: 220px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 16px;">列印日期:106年04月15日</span></p></td> <td style="width: 20px; height: 20px;"></td> </tr> <tr valign="top"> <td style="width: 20px; height: 20px;"></td> <td colspan="2" style=" vertical-align: middle;width: 160px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">縣市別:彰 化 縣</span></p></td> <td colspan="10" style="width: 1010px; height: 20px;"></td> </tr> <tr valign="top"> <td colspan="13" style="width: 1190px; height: 1px;"></td> </tr> <tr valign="top"> <td style="width: 20px; height: 20px;"></td> <td rowspan="2" style=" vertical-align: middle;border-top-style: solid; border-top-width: 1px; border-top-color: #000000; border-left-style: solid; border-left-width: 1px; border-left-color: #000000; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 73px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">級距:萬元</span></p></td> <td rowspan="2" style=" vertical-align: middle;border-top-style: solid; border-top-width: 1px; border-top-color: #000000; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 87px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">納稅單位</span></p></td> <td colspan="9" style=" vertical-align: middle;border-top-style: solid; border-top-width: 1px; border-top-color: #000000; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 990px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">各類所得金額</span></p></td> <td style="width: 20px; height: 20px;"></td> </tr> <tr valign="top"> <td style="width: 20px; height: 25px;"></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">合  計</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">營利所得</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">執行業務所得</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">薪資所得</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">利息所得</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">租賃及權利金</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">財產交易所得</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">機會中獎所得</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">股利所得</span></p></td> <td style="width: 20px; height: 25px;"></td> </tr> <tr valign="top"> <td style="width: 20px; height: 20px;"></td> <td style=" vertical-align: middle;border-left-style: solid; border-left-width: 1px; border-left-color: #000000; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 73px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">NET= 0</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 87px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">142565</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">52919157</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">370627</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">498653</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">42397290</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">3366358</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">657614</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">53593</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">49914</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">3180666</span></p></td> <td style="width: 20px; height: 20px;"></td> </tr> <tr valign="top"> <td style="width: 20px; height: 20px;"></td> <td style=" vertical-align: middle;border-left-style: solid; border-left-width: 1px; border-left-color: #000000; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 73px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">0 - 52</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 87px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">120339</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">86795970</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">355007</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">861031</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">71156047</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">4080612</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">960579</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">81154</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">89526</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">6340534</span></p></td> <td style="width: 20px; height: 20px;"></td> </tr> <tr valign="top"> <td style="width: 20px; height: 20px;"></td> <td style=" vertical-align: middle;border-left-style: solid; border-left-width: 1px; border-left-color: #000000; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 73px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">52 - 117</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 87px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">27497</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">40954791</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">130212</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">512640</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">30607529</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">1733195</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">640306</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">61547</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">47837</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">5161893</span></p></td> <td style="width: 20px; height: 20px;"></td> </tr> <tr valign="top"> <td style="width: 20px; height: 20px;"></td> <td style=" vertical-align: middle;border-left-style: solid; border-left-width: 1px; border-left-color: #000000; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 73px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">117 - 235</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 87px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">10210</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">25186480</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">72166</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">324482</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">16899694</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">985508</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">484877</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">50874</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">29232</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">4815916</span></p></td> <td style="width: 20px; height: 20px;"></td> </tr> <tr valign="top"> <td style="width: 20px; height: 20px;"></td> <td style=" vertical-align: middle;border-left-style: solid; border-left-width: 1px; border-left-color: #000000; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 73px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">235 - 440</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 87px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">2698</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">10893968</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">51534</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">87819</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">5572543</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">397573</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">312186</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">31481</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">11780</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">3688001</span></p></td> <td style="width: 20px; height: 20px;"></td> </tr> <tr valign="top"> <td style="width: 20px; height: 20px;"></td> <td style=" vertical-align: middle;border-left-style: solid; border-left-width: 1px; border-left-color: #000000; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 73px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">440 - 500</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 87px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">215</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">1230612</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">4040</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">4545</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">494415</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">44309</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">41480</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">6987</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">520</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">550420</span></p></td> <td style="width: 20px; height: 20px;"></td> </tr> <tr valign="top"> <td style="width: 20px; height: 20px;"></td> <td style=" vertical-align: middle;border-left-style: solid; border-left-width: 1px; border-left-color: #000000; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 73px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">500 - 1000</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 87px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">509</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">3908475</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">17372</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">15508</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">1363794</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">115059</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">83729</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">6897</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">3536</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">1969067</span></p></td> <td style="width: 20px; height: 20px;"></td> </tr> <tr valign="top"> <td style="width: 20px; height: 20px;"></td> <td style=" vertical-align: middle;border-left-style: solid; border-left-width: 1px; border-left-color: #000000; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 73px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">1000 以上</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 87px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">232</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">11986239</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">263202</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">24709</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">1229459</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">98336</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">116312</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">3982</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">232</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">9907387</span></p></td> <td style="width: 20px; height: 20px;"></td> </tr> <tr valign="top"> <td style="width: 20px; height: 20px;"></td> <td style=" vertical-align: middle;border-left-style: solid; border-left-width: 1px; border-left-color: #000000; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 73px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">合 &nbsp; &nbsp; 計</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 87px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">304265</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">233875692</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">1264161</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">2329389</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">169720771</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">10820952</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">3297082</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">296515</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">232577</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">35613885</span></p></td> <td style="width: 20px; height: 20px;"></td> </tr> <tr valign="top"> <td colspan="13" style="width: 1190px; height: 376px;"></td> </tr> <tr valign="top"> <td style="width: 20px; height: 140px;"></td> <td colspan="11" style="width: 1150px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">一、說明:(一)各欄項之金額係取千元後四捨五入。<br/>     (二)合計欄為綜合所得總額,金額為各欄位實際值加總後再取千元四捨五入後得之。<br/>     (三)各類所得為歸戶之各類所得。<br/>     (四)歸戶大於申報為歸戶綜合所得總額大於申報綜合所得總額之數值。<br/>     (五)薪資淨所得為薪資所得減去薪資特別扣除額之餘額。<br/>     (六)按薪資淨所得計算之綜合所得為綜合所得總額減去薪資特別扣除額之餘額。<br/>     (七)稿費收入為未減去十八萬之稿費免稅之稿費總收入。<br/>二、本統計之所得為課稅資料,未納入「政府移轉支出」各戶所得、免稅所得、分離課稅所得等資料,不宜逕作為衡量所得差距之參據,相關所得資料應以行政院主計總處公布之資料<br/>  為準。</span></p></td> <td style="width: 20px; height: 140px;"></td> </tr> <tr valign="top"> <td colspan="13" style="width: 1190px; height: 20px;"></td> </tr> </table> <br/> <br/> <a name="JR_PAGE_ANCHOR_1_1"></a> <table style="width: 1190px; border-collapse: collapse; empty-cells: show" cellpadding="0" cellspacing="0" border="0" bgcolor="white"> <tr> <td style="width: 20px; height: 1px;"></td> <td style="width: 73px; height: 1px;"></td> <td style="width: 110px; height: 1px;"></td> <td style="width: 110px; height: 1px;"></td> <td style="width: 110px; height: 1px;"></td> <td style="width: 110px; height: 1px;"></td> <td style="width: 110px; height: 1px;"></td> <td style="width: 197px; height: 1px;"></td> <td style="width: 110px; height: 1px;"></td> <td style="width: 220px; height: 1px;"></td> <td style="width: 20px; height: 1px;"></td> </tr> <tr valign="top"> <td colspan="11" style="width: 1190px; height: 20px;"></td> </tr> <tr valign="top"> <td colspan="9" style="width: 950px; height: 20px;"></td> <td style="width: 220px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 16px;">單位:金額(千元)</span></p></td> <td style="width: 20px; height: 20px;"></td> </tr> <tr valign="top"> <td style="width: 20px; height: 20px;"></td> <td colspan="8" style="width: 930px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 16px;">表16-2A(104年度)綜稅各類所得金額各級距申報統計表</span></p></td> <td style="width: 220px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 16px;">列印日期:106年04月15日</span></p></td> <td style="width: 20px; height: 20px;"></td> </tr> <tr valign="top"> <td style="width: 20px; height: 20px;"></td> <td colspan="2" style=" vertical-align: middle;width: 183px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">縣市別:彰 化 縣</span></p></td> <td colspan="8" style="width: 987px; height: 20px;"></td> </tr> <tr valign="top"> <td colspan="11" style="width: 1190px; height: 1px;"></td> </tr> <tr valign="top"> <td style="width: 20px; height: 20px;"></td> <td rowspan="2" style=" vertical-align: middle;border-top-style: solid; border-top-width: 1px; border-top-color: #000000; border-left-style: solid; border-left-width: 1px; border-left-color: #000000; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 73px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">級距:萬元</span></p></td> <td colspan="4" style=" vertical-align: middle;border-top-style: solid; border-top-width: 1px; border-top-color: #000000; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 440px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">各類所得金額</span></p></td> <td rowspan="2" style=" vertical-align: middle;border-top-style: solid; border-top-width: 1px; border-top-color: #000000; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">薪資淨所得</span></p></td> <td rowspan="2" style=" vertical-align: middle;border-top-style: solid; border-top-width: 1px; border-top-color: #000000; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 197px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">按薪資淨所得計算之綜合所得</span></p></td> <td rowspan="2" style=" vertical-align: middle;border-top-style: solid; border-top-width: 1px; border-top-color: #000000; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">稿費收入</span></p></td> <td colspan="2" style="width: 240px; height: 20px;"></td> </tr> <tr valign="top"> <td style="width: 20px; height: 25px;"></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">退職所得</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">其他所得</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">稿費所得</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">申報大於歸戶</span></p></td> <td colspan="2" style="width: 240px; height: 25px;"></td> </tr> <tr valign="top"> <td style="width: 20px; height: 20px;"></td> <td style=" vertical-align: middle;border-left-style: solid; border-left-width: 1px; border-left-color: #000000; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 73px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">NET= 0</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">6461</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">271877</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">2400</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">2063705</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">24412763</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 197px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">34951121</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">27319</span></p></td> <td colspan="2" style="width: 240px; height: 20px;"></td> </tr> <tr valign="top"> <td style="width: 20px; height: 20px;"></td> <td style=" vertical-align: middle;border-left-style: solid; border-left-width: 1px; border-left-color: #000000; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 73px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">0 - 52</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">27326</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">592267</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">7370</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">2244514</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">53383304</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 197px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">69046663</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">40979</span></p></td> <td colspan="2" style="width: 240px; height: 20px;"></td> </tr> <tr valign="top"> <td style="width: 20px; height: 20px;"></td> <td style=" vertical-align: middle;border-left-style: solid; border-left-width: 1px; border-left-color: #000000; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 73px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">52 - 117</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">13920</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">303627</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">7498</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">1734586</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">25799271</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 197px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">36144771</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">32566</span></p></td> <td colspan="2" style="width: 240px; height: 20px;"></td> </tr> <tr valign="top"> <td style="width: 20px; height: 20px;"></td> <td style=" vertical-align: middle;border-left-style: solid; border-left-width: 1px; border-left-color: #000000; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 73px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">117 - 235</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">16624</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">208985</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">6903</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">1291218</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">14888924</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 197px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">23176437</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">30166</span></p></td> <td colspan="2" style="width: 240px; height: 20px;"></td> </tr> <tr valign="top"> <td style="width: 20px; height: 20px;"></td> <td style=" vertical-align: middle;border-left-style: solid; border-left-width: 1px; border-left-color: #000000; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 73px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">235 - 440</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">22099</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">108298</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">670</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">609982</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">5078480</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 197px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">10400105</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">10682</span></p></td> <td colspan="2" style="width: 240px; height: 20px;"></td> </tr> <tr valign="top"> <td style="width: 20px; height: 20px;"></td> <td style=" vertical-align: middle;border-left-style: solid; border-left-width: 1px; border-left-color: #000000; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 73px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">440 - 500</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">84</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">16338</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">0</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">67473</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">455385</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 197px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">1191582</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">655</span></p></td> <td colspan="2" style="width: 240px; height: 20px;"></td> </tr> <tr valign="top"> <td style="width: 20px; height: 20px;"></td> <td style=" vertical-align: middle;border-left-style: solid; border-left-width: 1px; border-left-color: #000000; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 73px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">500 - 1000</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">2797</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">72575</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">210</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">257932</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">1271261</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 197px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">3815917</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">2870</span></p></td> <td colspan="2" style="width: 240px; height: 20px;"></td> </tr> <tr valign="top"> <td style="width: 20px; height: 20px;"></td> <td style=" vertical-align: middle;border-left-style: solid; border-left-width: 1px; border-left-color: #000000; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 73px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">1000 以上</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">0</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">34788</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">0</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">307830</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">1179248</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 197px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">11945028</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">582</span></p></td> <td colspan="2" style="width: 240px; height: 20px;"></td> </tr> <tr valign="top"> <td style="width: 20px; height: 20px;"></td> <td style=" vertical-align: middle;border-left-style: solid; border-left-width: 1px; border-left-color: #000000; border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: center;width: 73px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">合 &nbsp; &nbsp; 計</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">89311</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">1608756</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">25052</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">8577240</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">126468637</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 197px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">190671625</span></p></td> <td style=" vertical-align: middle;border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #000000; border-right-style: solid; border-right-width: 1px; border-right-color: #000000; text-align: right;width: 110px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">145818</span></p></td> <td colspan="2" style="width: 240px; height: 20px;"></td> </tr> <tr valign="top"> <td colspan="11" style="width: 1190px; height: 376px;"></td> </tr> <tr valign="top"> <td style="width: 20px; height: 140px;"></td> <td colspan="9" style="width: 1150px; word-wrap: break-word; "><p style="overflow: hidden; line-height: 1.0; text-indent: 0px; "><span style="font-family: ARStdSong; color: #000000; font-size: 14px;">一、說明:(一)各欄項之金額係取千元後四捨五入。<br/>     (二)合計欄為綜合所得總額,金額為各欄位實際值加總後再取千元四捨五入後得之。<br/>     (三)各類所得為歸戶之各類所得。<br/>     (四)歸戶大於申報為歸戶綜合所得總額大於申報綜合所得總額之數值。<br/>     (五)薪資淨所得為薪資所得減去薪資特別扣除額之餘額。<br/>     (六)按薪資淨所得計算之綜合所得為綜合所得總額減去薪資特別扣除額之餘額。<br/>     (七)稿費收入為未減去十八萬之稿費免稅之稿費總收入。<br/>二、本統計之所得為課稅資料,未納入「政府移轉支出」各戶所得、免稅所得、分離課稅所得等資料,不宜逕作為衡量所得差距之參據,相關所得資料應以行政院主計總處公布之資料<br/>  為準。</span></p></td> <td style="width: 20px; height: 140px;"></td> </tr> <tr valign="top"> <td colspan="11" style="width: 1190px; height: 20px;"></td> </tr> </table> </td><td width="50%">&nbsp;</td></tr> </table> </body> </html>
229.753117
582
0.713799
8588c31a98884bd2d32d5dde236f691088ceac8f
112
js
JavaScript
examples/AppManager/t00.js
iwillwen/mindb
ad6842602b9422d0bf10766cc6c180fb08c0fa9f
[ "MIT" ]
235
2015-01-07T03:15:02.000Z
2022-03-08T15:30:04.000Z
examples/AppManager/t00.js
iwillwen/mindb
ad6842602b9422d0bf10766cc6c180fb08c0fa9f
[ "MIT" ]
8
2015-02-21T17:41:12.000Z
2020-08-03T05:29:50.000Z
examples/AppManager/t00.js
iwillwen/mindb
ad6842602b9422d0bf10766cc6c180fb08c0fa9f
[ "MIT" ]
26
2015-02-10T08:34:49.000Z
2019-09-25T02:02:14.000Z
(function(undefined) { var AppManagerCore = { addNewApp: function(url, name, callback) { } }; })();
16
46
0.589286
90532c5eede80735b5266726ae4b0a5d619c4e40
605
kt
Kotlin
src/main/java/com/dzen/campfire/api/models/QuestInfo.kt
ZeonXX/CampfireAPI
8d689f3238dec5bfb31bae571cb3b731cacb2697
[ "Apache-2.0" ]
3
2021-09-23T16:05:37.000Z
2021-12-30T05:06:27.000Z
src/main/java/com/dzen/campfire/api/models/QuestInfo.kt
ZeonXX/CampfireAPI
8d689f3238dec5bfb31bae571cb3b731cacb2697
[ "Apache-2.0" ]
null
null
null
src/main/java/com/dzen/campfire/api/models/QuestInfo.kt
ZeonXX/CampfireAPI
8d689f3238dec5bfb31bae571cb3b731cacb2697
[ "Apache-2.0" ]
2
2021-12-03T18:10:07.000Z
2021-12-31T13:25:17.000Z
package com.dzen.campfire.api.models class QuestInfo { var index: Long var targets: Array<Int> var story: Boolean constructor(index: Long, story:Boolean, vararg targets: Int){ this.index = index this.story = story this.targets = targets.toTypedArray() } fun questIsFinished(accountLvl: Long, value: Long): Boolean { return value >= getTarget(accountLvl) } fun getTarget(accountLvl: Long): Int { val lvl = (accountLvl / 100 - 1).toInt() return if (targets.size > lvl) targets[lvl] else targets[targets.size - 1] } }
24.2
82
0.633058
72956a21f1423e3e385a56d5ced87c9c0206eb02
184
kt
Kotlin
app/src/main/java/ar/com/p39/localshare/sharer/views/ShareView.kt
Gazer/localshare
77f7d3010de6888b15257d28064008a000daf36d
[ "Apache-2.0" ]
null
null
null
app/src/main/java/ar/com/p39/localshare/sharer/views/ShareView.kt
Gazer/localshare
77f7d3010de6888b15257d28064008a000daf36d
[ "Apache-2.0" ]
null
null
null
app/src/main/java/ar/com/p39/localshare/sharer/views/ShareView.kt
Gazer/localshare
77f7d3010de6888b15257d28064008a000daf36d
[ "Apache-2.0" ]
null
null
null
package ar.com.p39.localshare.sharer.views import android.net.Uri interface ShareView { fun showWifiError() fun showUriData(uri: Uri) fun showUriData(uris: List<Uri>) }
16.727273
42
0.728261
0e1d27d826501d49c92b665f6ce2c65d8947eceb
168
kt
Kotlin
SalahTimeCalculator/src/main/java/app/muazzin/salah/times/Salah.kt
MuazzinApp/SalahTime
91a76a67a6a41254972189afe94404a87586e9e5
[ "Apache-2.0" ]
null
null
null
SalahTimeCalculator/src/main/java/app/muazzin/salah/times/Salah.kt
MuazzinApp/SalahTime
91a76a67a6a41254972189afe94404a87586e9e5
[ "Apache-2.0" ]
null
null
null
SalahTimeCalculator/src/main/java/app/muazzin/salah/times/Salah.kt
MuazzinApp/SalahTime
91a76a67a6a41254972189afe94404a87586e9e5
[ "Apache-2.0" ]
null
null
null
package app.muazzin.salah.times enum class Salah { FAJR, SHUROQ, DHUHR, ASR, MAGRIB, ISHA, QIYAM, JUMA, EIDULFITR, EIDULADHA }
11.2
31
0.571429
8423287ff87ec407058acb7a82464c9f6bcb9963
2,894
kt
Kotlin
app/src/main/java/segura/countries/app/ui/MainActivity.kt
YonatanSegura97/Countries-App
b551ce5a00b69b42fdb28810fc2a34ad79314ac3
[ "Apache-2.0" ]
1
2020-10-05T16:26:24.000Z
2020-10-05T16:26:24.000Z
app/src/main/java/segura/countries/app/ui/MainActivity.kt
angelhr28/Countries-App
b551ce5a00b69b42fdb28810fc2a34ad79314ac3
[ "Apache-2.0" ]
null
null
null
app/src/main/java/segura/countries/app/ui/MainActivity.kt
angelhr28/Countries-App
b551ce5a00b69b42fdb28810fc2a34ad79314ac3
[ "Apache-2.0" ]
2
2020-03-18T18:51:28.000Z
2020-10-05T16:26:27.000Z
package segura.countries.app.ui import android.animation.Animator import android.animation.AnimatorListenerAdapter import android.os.Bundle import android.view.View import android.widget.Toast import androidx.appcompat.app.AppCompatActivity import androidx.lifecycle.Observer import androidx.recyclerview.widget.LinearLayoutManager import kotlinx.android.synthetic.main.activity_main.* import org.koin.android.viewmodel.ext.android.viewModel import segura.countries.app.R import segura.countries.app.common.setDarkOrDayMode import segura.countries.app.model.Country import segura.countries.app.model.networkHandler.Resource class MainActivity : AppCompatActivity(), CountryAdapter.OnCountryClickListener { companion object { private const val TAG = "MainActivityDebug" } private val countriesViewModel: CountriesViewModel by viewModel() lateinit var countryAdapter: CountryAdapter private var shortAnimationDuration = 0 override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setDarkOrDayMode() setContentView(R.layout.activity_main) setupRecycler() countriesViewModel.countriesList.observe(this, countriesObserver) } private val countriesObserver = Observer<Resource<List<Country>>> { response -> when (response.status) { Resource.Status.ERROR -> { hideLoading() } Resource.Status.SUCCESS -> { countryAdapter.swapData(response.data as MutableList<Country>) hideLoading() } Resource.Status.LOADING -> { showLoading() } } } private fun setupRecycler() { countryAdapter = CountryAdapter(this) rvCountries.apply { setHasFixedSize(true) layoutManager = LinearLayoutManager( context, LinearLayoutManager.VERTICAL, false ) adapter = countryAdapter } } private fun showLoading() { } private fun hideLoading() { showViewWithCrossFade() } override fun onCountryClickListener(position: Int, item: Country) { Toast.makeText(this, item.nativeName, Toast.LENGTH_SHORT).show() } private fun showViewWithCrossFade() { rvCountries.apply { alpha = 0f visibility = View.VISIBLE animate().alpha(1f) .setDuration(shortAnimationDuration.toLong()) .setListener(null) } loadingProgressBar.animate().alpha(0f) .setDuration(shortAnimationDuration.toLong()) .setListener(object : AnimatorListenerAdapter() { override fun onAnimationEnd(animation: Animator?) { loadingProgressBar.visibility = View.GONE } }) } }
30.145833
83
0.657222
126d2d628c79712e8e2985ad3837b53700e1b53f
3,271
h
C
test-vm/test_vm.h
plvhx/dummy-vm
e422e44001cbc358c9a36667cdb7f860c4963973
[ "WTFPL" ]
2
2020-12-06T04:48:52.000Z
2020-12-11T04:51:35.000Z
test-vm/test_vm.h
plvhx/dummy-vm
e422e44001cbc358c9a36667cdb7f860c4963973
[ "WTFPL" ]
null
null
null
test-vm/test_vm.h
plvhx/dummy-vm
e422e44001cbc358c9a36667cdb7f860c4963973
[ "WTFPL" ]
null
null
null
#ifndef __TEST_VM_H__ #define __TEST_VM_H__ #ifdef __cplusplus extern "C" { #endif void test_movb_imm8_to_r0(void); void test_movb_imm8_to_r1(void); void test_movb_imm8_to_r2(void); void test_movb_imm8_to_r3(void); void test_movb_r0_to_r0(void); void test_movb_r1_to_r0(void); void test_movb_r2_to_r0(void); void test_movb_r3_to_r0(void); void test_movb_r0_to_r1(void); void test_movb_r1_to_r1(void); void test_movb_r2_to_r1(void); void test_movb_r3_to_r1(void); void test_movb_r0_to_r2(void); void test_movb_r1_to_r2(void); void test_movb_r2_to_r2(void); void test_movb_r3_to_r2(void); void test_movb_r0_to_r3(void); void test_movb_r1_to_r3(void); void test_movb_r2_to_r3(void); void test_movb_r3_to_r3(void); void test_addb_imm8_imm8_to_r0(void); void test_addb_imm8_imm8_to_r1(void); void test_addb_imm8_imm8_to_r2(void); void test_addb_imm8_imm8_to_r3(void); void test_subb_imm8_imm8_to_r0(void); void test_subb_imm8_imm8_to_r1(void); void test_subb_imm8_imm8_to_r2(void); void test_subb_imm8_imm8_to_r3(void); void test_mulb_imm8_imm8_to_r0(void); void test_mulb_imm8_imm8_to_r1(void); void test_mulb_imm8_imm8_to_r2(void); void test_mulb_imm8_imm8_to_r3(void); void test_divb_imm8_imm8_to_r0(void); void test_divb_imm8_imm8_to_r1(void); void test_divb_imm8_imm8_to_r2(void); void test_divb_imm8_imm8_to_r3(void); void test_addb_imm8_r0_to_r0(void); void test_addb_imm8_r0_to_r1(void); void test_addb_imm8_r0_to_r2(void); void test_addb_imm8_r0_to_r3(void); void test_subb_imm8_r0_to_r0(void); void test_subb_imm8_r0_to_r1(void); void test_subb_imm8_r0_to_r2(void); void test_subb_imm8_r0_to_r3(void); void test_mulb_imm8_r0_to_r0(void); void test_mulb_imm8_r0_to_r1(void); void test_mulb_imm8_r0_to_r2(void); void test_mulb_imm8_r0_to_r3(void); void test_divb_imm8_r0_to_r0(void); void test_divb_imm8_r0_to_r1(void); void test_divb_imm8_r0_to_r2(void); void test_divb_imm8_r0_to_r3(void); void test_addb_imm8_r1_to_r0(void); void test_addb_imm8_r1_to_r1(void); void test_addb_imm8_r1_to_r2(void); void test_addb_imm8_r1_to_r3(void); void test_subb_imm8_r1_to_r0(void); void test_subb_imm8_r1_to_r1(void); void test_subb_imm8_r1_to_r2(void); void test_subb_imm8_r1_to_r3(void); void test_mulb_imm8_r1_to_r0(void); void test_mulb_imm8_r1_to_r1(void); void test_mulb_imm8_r1_to_r2(void); void test_mulb_imm8_r1_to_r3(void); void test_divb_imm8_r1_to_r0(void); void test_divb_imm8_r1_to_r1(void); void test_divb_imm8_r1_to_r2(void); void test_divb_imm8_r1_to_r3(void); void test_addb_imm8_r2_to_r0(void); void test_addb_imm8_r2_to_r1(void); void test_addb_imm8_r2_to_r2(void); void test_addb_imm8_r2_to_r3(void); void test_subb_imm8_r2_to_r0(void); void test_subb_imm8_r2_to_r1(void); void test_subb_imm8_r2_to_r2(void); void test_subb_imm8_r2_to_r3(void); void test_mulb_imm8_r2_to_r0(void); void test_mulb_imm8_r2_to_r1(void); void test_mulb_imm8_r2_to_r2(void); void test_mulb_imm8_r2_to_r3(void); void test_divb_imm8_r2_to_r0(void); void test_divb_imm8_r2_to_r1(void); void test_divb_imm8_r2_to_r2(void); void test_divb_imm8_r2_to_r3(void); void test_addb_imm8_r3_to_r0(void); void test_addb_imm8_r3_to_r1(void); void test_addb_imm8_r3_to_r2(void); void test_addb_imm8_r3_to_r3(void); #ifdef __cplusplus } #endif #endif /* __TEST_VM_H__ */
26.593496
37
0.847753
1c54864f3ad135c1490aa62c034bd3e23419add2
646
kt
Kotlin
server-app/core/src/main/kotlin/com/github/akraskovski/fes/core/domain/config/AuthServerProperties.kt
akraskovski/freight-exchange-system
b4d99ea9aa462110c024eaafb804030bd5186ea8
[ "Apache-2.0" ]
2
2018-10-28T19:29:36.000Z
2022-02-16T23:25:38.000Z
server-app/core/src/main/kotlin/com/github/akraskovski/fes/core/domain/config/AuthServerProperties.kt
akraskovski/freight-exchange-system
b4d99ea9aa462110c024eaafb804030bd5186ea8
[ "Apache-2.0" ]
null
null
null
server-app/core/src/main/kotlin/com/github/akraskovski/fes/core/domain/config/AuthServerProperties.kt
akraskovski/freight-exchange-system
b4d99ea9aa462110c024eaafb804030bd5186ea8
[ "Apache-2.0" ]
1
2019-03-24T18:29:06.000Z
2019-03-24T18:29:06.000Z
package com.github.akraskovski.fes.web.config import org.springframework.boot.context.properties.ConfigurationProperties import org.springframework.context.annotation.Configuration /** * Auth Server configuration properties container. */ @Configuration @ConfigurationProperties(prefix = "auth.server") class AuthServerProperties { var connection: Connection? = null var admin: Admin? = null class Connection { lateinit var url: String lateinit var clientId: String lateinit var clientSecret: String } class Admin { lateinit var email: String lateinit var password: String } }
24.846154
74
0.727554
c60cb0498be2dc9e1c42173dc7bc60ba6e7632ec
2,640
sql
SQL
db/api.sql
CMSgov/bcda-app
c41875680494e3894dbc65006d10e92c940fedae
[ "CC0-1.0" ]
26
2019-02-01T18:21:15.000Z
2021-09-17T23:59:14.000Z
db/api.sql
CMSgov/bcda-app
c41875680494e3894dbc65006d10e92c940fedae
[ "CC0-1.0" ]
251
2018-07-27T15:36:25.000Z
2022-02-24T20:08:35.000Z
db/api.sql
CMSgov/bcda-app
c41875680494e3894dbc65006d10e92c940fedae
[ "CC0-1.0" ]
15
2018-07-23T22:30:36.000Z
2022-03-03T00:18:44.000Z
create table acos ( uuid uuid not null primary key, cms_id character varying(8) unique null, name text not null, created_at timestamp with time zone not null default now(), updated_at timestamp with time zone not null default now(), client_id text null, alpha_secret text null, public_key text null ); create table jobs ( id serial not null primary key, aco_id uuid not null references acos, request_url text not null, status text not null, created_at timestamp with time zone not null default now() ); create table cclf_files ( id serial primary key, cclf_num integer not null, name varchar not null, aco_cms_id character varying(8), "timestamp" timestamp with time zone not null, performance_year integer not null, import_status varchar, created_at timestamp with time zone not null default now(), updated_at timestamp with time zone not null default now(), deleted_at timestamp with time zone ); create table cclf_beneficiaries ( id serial primary key, file_id integer not null, hicn varchar(11) not null, mbi char(11) not null, blue_button_id text, created_at timestamp with time zone not null default now(), updated_at timestamp with time zone not null default now(), deleted_at timestamp with time zone ); create table cclf_beneficiary_xrefs ( id serial primary key, file_id integer not null, xref_indicator varchar, current_num varchar, prev_num varchar, prevs_efct_dt varchar, prevs_obslt_dt varchar, created_at timestamp with time zone not null default now(), updated_at timestamp with time zone not null default now(), deleted_at timestamp with time zone ); create table suppression_files ( id serial primary key, name varchar not null, "timestamp" timestamp with time zone not null, import_status varchar, created_at timestamp with time zone not null default now(), updated_at timestamp with time zone not null default now(), deleted_at timestamp with time zone ); create table suppressions ( id serial primary key, file_id integer not null, mbi varchar(11) not null, source_code varchar(5), effective_date timestamp with time zone, preference_indicator char(1), samhsa_source_code varchar(5), samhsa_effective_date timestamp with time zone, samhsa_preference_indicator char(1), aco_cms_id character varying(8), beneficiary_link_key integer, created_at timestamp with time zone not null default now(), updated_at timestamp with time zone not null default now(), deleted_at timestamp with time zone );
31.807229
63
0.738258
65164ebc73c88c773a56c1c8312715ea40cc9b6c
626
py
Python
Data-Structure/Basic-Struct/Stack-Queues/Evaluation-of-Expressions/Eval.py
tz70s/lesson
a647105682bb0d1420c450d0cd7c56fe1de6e21b
[ "Apache-2.0" ]
1
2015-08-27T17:27:43.000Z
2015-08-27T17:27:43.000Z
Data-Structure/Basic-Struct/Stack-Queues/Evaluation-of-Expressions/Eval.py
tz70s/lesson
a647105682bb0d1420c450d0cd7c56fe1de6e21b
[ "Apache-2.0" ]
null
null
null
Data-Structure/Basic-Struct/Stack-Queues/Evaluation-of-Expressions/Eval.py
tz70s/lesson
a647105682bb0d1420c450d0cd7c56fe1de6e21b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import stack import queue opset = {'*','+','(',")"} def readinfix(): fh = open("infix.txt") li = [] li += fh.read() print (li) return li def eval(): evlist = readinfix() postlist = [] st = stack.Stack() for op in evlist: if op in opset: st.push(op) else: postlist.append(op) print (op) if st.isEmpty(): continue elif not st.isEmpty(): postlist.append(st.pop()) print (st.pop()) print (postlist) if __name__ == "__main__": eval()
17.885714
41
0.469649
b15ff69a10e5fa119a7ce12b336cbda996a3dbc2
1,212
kt
Kotlin
data/src/test/kotlin/utils/TestUserGenerator.kt
Bik-Krlvn/Spiice-ui-challenge
f64214c986ac8d228e5bc627ee847c0a74bd197f
[ "MIT" ]
7
2020-04-05T21:58:11.000Z
2020-08-15T12:00:37.000Z
data/src/test/kotlin/utils/TestUserGenerator.kt
alvinmarshall/Spiice-ui-challenge
f64214c986ac8d228e5bc627ee847c0a74bd197f
[ "MIT" ]
null
null
null
data/src/test/kotlin/utils/TestUserGenerator.kt
alvinmarshall/Spiice-ui-challenge
f64214c986ac8d228e5bc627ee847c0a74bd197f
[ "MIT" ]
1
2020-04-06T18:10:05.000Z
2020-04-06T18:10:05.000Z
package utils import com.cheise_proj.data.model.PortfolioData import com.cheise_proj.data.model.ProfileData import com.cheise_proj.data.model.ReviewsData import com.cheise_proj.data.model.UserData object TestUserGenerator { fun getUser(): UserData { return UserData( email = "test email", avatarUrl = "http://testavatar", name = "test user name", userId = "test uid", accessToken = "test access token", refreshToken = "test refresh token" ) } fun getProfile(): ProfileData { return ProfileData( jobTitle = "test job title", description = "test description", user = getUser(), reviews = arrayListOf( ReviewsData( content = "test content", timestamp = "2020-03-31T15:45:28.627Z", rating = 4f, sender = getUser(), id = "test uid" ) ), portfolio = arrayListOf( PortfolioData( screenShotUrl = "http://testscreenshot" ) ) ) } }
29.560976
59
0.505776
558b58e136f40ea293d509c5ca7746ba51448c6f
210
html
HTML
venvs/sitio_web/templates/index.html
mmaguero/MII-SSBW16-17
25b6c340c63a2fbe8342b48ec7f730b68c58d1bc
[ "MIT" ]
1
2017-04-22T11:02:38.000Z
2017-04-22T11:02:38.000Z
venvs/sitio_web/templates/index.html
mmaguero/MII-SSBW16-17
25b6c340c63a2fbe8342b48ec7f730b68c58d1bc
[ "MIT" ]
4
2017-06-17T16:10:45.000Z
2022-02-13T20:23:04.000Z
venvs/sitio_web/templates/index.html
mmaguero/MII-SSBW16-17
25b6c340c63a2fbe8342b48ec7f730b68c58d1bc
[ "MIT" ]
null
null
null
{% extends "base.html" %} {% block contenido %} <div class="jumbotron"> <h1>Restaurants</h1> <p class="lead">Very simple CRUD with Bootstrap, Django & MongoDB for Restaurants...</p> </div> {% endblock %}
21
90
0.652381
b87ee1af3817c1599af5cf0ab6874b3eed72d837
105
kt
Kotlin
app/src/main/java/com/rphmelo/cnjokes/common/base/BaseInteractorContract.kt
Rphmelo/chuck-norris-jokes
c8d7c97219de738fe6966ad8a0e7ff221d48b3d5
[ "MIT" ]
null
null
null
app/src/main/java/com/rphmelo/cnjokes/common/base/BaseInteractorContract.kt
Rphmelo/chuck-norris-jokes
c8d7c97219de738fe6966ad8a0e7ff221d48b3d5
[ "MIT" ]
null
null
null
app/src/main/java/com/rphmelo/cnjokes/common/base/BaseInteractorContract.kt
Rphmelo/chuck-norris-jokes
c8d7c97219de738fe6966ad8a0e7ff221d48b3d5
[ "MIT" ]
null
null
null
package com.rphmelo.cnjokes.common.base interface BaseInteractorContract { fun disposeObservable() }
21
39
0.809524
f84177e97ff37393e221b121c14d05b9ceb92054
187
sql
SQL
src/main/resources/db/schema.sql
michael-7845/mybootlab
d34805fe2db084304e91d90fec026a5a7f650b79
[ "Apache-2.0" ]
null
null
null
src/main/resources/db/schema.sql
michael-7845/mybootlab
d34805fe2db084304e91d90fec026a5a7f650b79
[ "Apache-2.0" ]
null
null
null
src/main/resources/db/schema.sql
michael-7845/mybootlab
d34805fe2db084304e91d90fec026a5a7f650b79
[ "Apache-2.0" ]
null
null
null
DROP TABLE IF EXISTS `CUSTOMER`; CREATE TABLE `CUSTOMER` ( `id` bigint(20) NOT NULL PRIMARY KEY AUTO_INCREMENT, `first_name` varchar(30) NOT NULL, `last_name` varchar(30) NOT NULL );
23.375
53
0.727273
2fcf04b426e881a2f79d4fb5a2f76087495d7efd
489
kt
Kotlin
app/src/main/java/com/anibalbastias/android/pulentapp/data/dataStoreFactory/search/model/SearchMusicData.kt
anibalbastiass/android.pulent.test
574ec990a2ed0d68499199289d454d122e939a06
[ "MIT" ]
1
2019-11-27T18:32:22.000Z
2019-11-27T18:32:22.000Z
app/src/main/java/com/anibalbastias/android/pulentapp/data/dataStoreFactory/search/model/SearchMusicData.kt
anibalbastiass/android.pulent.test
574ec990a2ed0d68499199289d454d122e939a06
[ "MIT" ]
4
2019-09-05T12:04:06.000Z
2019-09-09T03:20:45.000Z
app/src/main/java/com/anibalbastias/android/pulentapp/data/dataStoreFactory/search/model/SearchMusicData.kt
anibalbastiass/android.pulent.test
574ec990a2ed0d68499199289d454d122e939a06
[ "MIT" ]
1
2019-12-13T13:21:30.000Z
2019-12-13T13:21:30.000Z
package com.anibalbastias.android.pulentapp.data.dataStoreFactory.search.model import com.anibalbastias.android.pulentapp.data.dataStoreFactory.common.TypeData import com.anibalbastias.android.pulentapp.data.dataStoreFactory.common.WrapperData import com.google.gson.annotations.SerializedName data class SearchMusicData( @field:SerializedName("resultCount") val resultCount: Int? = null, @field:SerializedName("results") val results: ArrayList<WrapperData?>? = null ) : TypeData()
34.928571
83
0.826176
cb175cca68b9a7c31a668bd1fa627ea6fd30df63
11,154
c
C
libs/epaper/src/epaper.c
peimis/mos-epaper
3f4bf835a80d584ed732642ce51bcc5b1baa51fa
[ "Apache-2.0" ]
null
null
null
libs/epaper/src/epaper.c
peimis/mos-epaper
3f4bf835a80d584ed732642ce51bcc5b1baa51fa
[ "Apache-2.0" ]
null
null
null
libs/epaper/src/epaper.c
peimis/mos-epaper
3f4bf835a80d584ed732642ce51bcc5b1baa51fa
[ "Apache-2.0" ]
null
null
null
#include "mgos.h" #include "mgos_config.h" #include "mgos_spi.h" #include "epaper.h" static int _width=0; static int _height=0; static int _cs_pin=0; static int _dc_pin=0; static int _busy_pin=0; static int _reset_pin=0; static bool _isdirty = true; static enum epaper_update_type_t _lut = FULL_UPDATE; static struct mgos_spi *epaper_spi; static struct mgos_spi_txn epaper_txn; #if defined(USE_GLOBAL_SPI) && (USE_GLOBAL_SPI == 0) static struct mgos_config_spi epaper_bus_cfg; #endif typedef struct { uint8_t data[30]; } lut_data_t; lut_data_t lut[2] = { { .data = { 0x02, 0x02, 0x01, 0x11, 0x12, 0x12, 0x22, 0x22, 0x66, 0x69, 0x69, 0x59, 0x58, 0x99, 0x99, 0x88, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xB4, 0x13, 0x51, 0x35, 0x51, 0x51, 0x19, 0x01, 0x00 } }, { .data = { 0x10, 0x18, 0x18, 0x08, 0x18, 0x18, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x13, 0x14, 0x44, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } } }; // -------------------------------------------------------------------------------------- // static int mgos_epd_send_command(const uint8_t cmd_byte); static int mgos_epd_send_data(const uint8_t data_byte); static int mgos_epd_send_data_n(const uint8_t * const data, const int len); static void ep_delay(const int ms) { mgos_msleep(ms); } // -------------------------------------------------------------------------------------- // /** * @brief: A primitive function to Reset the ePaper */ int mgos_epd_reset(void) { mgos_gpio_write(_dc_pin, 0); mgos_gpio_write(_reset_pin, 0); //module reset ep_delay(200); mgos_gpio_write(_reset_pin, 1); ep_delay(200); return 0; } /** * @brief: Wait until the busy_pin goes LOW */ void mgos_epd_wait_idle(void) { int busy, count=0; while (0 != (busy = mgos_gpio_read(_busy_pin))) { ep_delay(50); LOG(LL_ERROR, ("Still BUSY .. %d", ++count)); } // LOG(LL_INFO, ("Busy inactive")); } void mgos_epd_sleep(void) { mgos_epd_send_command(DEEP_SLEEP_MODE); mgos_epd_wait_idle(); } /** * @brief: Push an image buffer to the frame memory. * this won't update the display. * */ void mgos_epd_pushFrameBuffer(const uint8_t* framebuffer, const int start_x, const int start_y, const int image_width, const int image_height) { int x_end, y_end; /* x point must be the multiple of 8 or the last 3 bits will be ignored */ int adj_image_width = image_width & 0xF8; int adj_x = start_x & 0xF8; int bufferlen; if ( (framebuffer == NULL) || (adj_x < 0) || (image_width < 0) || (start_y < 0) || (image_height < 0) ) { return; } if (adj_x + adj_image_width >= _width) { x_end = _width - 1; } else { x_end = adj_x + adj_image_width - 1; } if (start_y + image_height >= _height) { y_end = _height - 1; } else { y_end = start_y + image_height - 1; } mgos_epd_set_memory_area(adj_x, start_y, x_end, y_end); mgos_epd_set_memory_pointer(adj_x, start_y); mgos_epd_send_command(WRITE_RAM); /* send the image data */ bufferlen = (y_end - start_y + 1) * ((x_end - adj_x + 1) / 8); mgos_epd_send_data_n(framebuffer , bufferlen); } void mgos_epd_pushFrameBufferRel(const uint8_t* framebuffer, const int start_x, const int start_y, const int image_width, const int image_height) { int x_end, y_end; /* x point must be the multiple of 8 or the last 3 bits will be ignored */ int adj_image_width = image_width & 0xF8; int adj_x = start_x & 0xF8; int bufferlen; if ( (framebuffer == NULL) || (adj_x < 0) || (image_width < 0) || (start_y < 0) || (image_height < 0) ) { return; } if (adj_x + adj_image_width >= _width) { x_end = _width - 1; } else { x_end = adj_x + adj_image_width - 1; } if (start_y + image_height >= _height) { y_end = _height - 1; } else { y_end = start_y + image_height - 1; } mgos_epd_send_command(WRITE_RAM); /* send the image data */ bufferlen = (y_end - start_y + 1) * ((x_end - adj_x + 1) / 8); mgos_epd_send_data_n(framebuffer , bufferlen); } /** * @brief: clear the frame memory with the specified color. * this won't update the display. */ void mgos_epd_clear_frame_memory(const uint8_t color) { int i; mgos_epd_set_memory_area(0, 0, _width - 1, _height - 1); mgos_epd_set_memory_pointer(0, 0); mgos_epd_send_command(WRITE_RAM); // send the color data #if 0 for (i=0; i < ((_width / 8) * _height); i++) { mgos_epd_send_data(color); } #else uint8_t *tmp_buffer = (uint8_t *)calloc(1, _height); memset(tmp_buffer, color, _height); for (i=0; i < (_width / 8); i++) { mgos_epd_send_data_n(tmp_buffer, _height); } free(tmp_buffer); #endif mgos_epd_wait_idle(); } /** * @brief: update the display * there are 2 memory areas embedded in the e-paper display * but once this function is called, * the the next action of SetFrameMemory or ClearFrame will * set the other memory area. */ void mgos_epd_display_frame(void) { mgos_epd_send_command(DISPLAY_UPDATE_CONTROL_2); mgos_epd_send_data(0xC4); mgos_epd_send_command(MASTER_ACTIVATION); mgos_epd_send_command(TERMINATE_FRAME_READ_WRITE); mgos_epd_wait_idle(); } /** * @brief: private function to specify the memory area for data R/W */ void mgos_epd_set_memory_area(const int x_start, const int y_start, const int x_end, const int y_end) { mgos_epd_send_command(SET_RAM_X_ADDRESS_START_END_POSITION); /* x point must be the multiple of 8 or the last 3 bits will be ignored */ mgos_epd_send_data((x_start >> 3) & 0xFF); mgos_epd_send_data((x_end >> 3) & 0xFF); mgos_epd_send_command(SET_RAM_Y_ADDRESS_START_END_POSITION); mgos_epd_send_data(y_start & 0xFF); mgos_epd_send_data((y_start >> 8) & 0xFF); mgos_epd_send_data(y_end & 0xFF); mgos_epd_send_data((y_end >> 8) & 0xFF); } /** * @brief: private function to specify the start point for data R/W */ void mgos_epd_set_memory_pointer(const int x, const int y) { mgos_epd_send_command(SET_RAM_X_ADDRESS_COUNTER); /* x point must be the multiple of 8 or the last 3 bits will be ignored */ mgos_epd_send_data((x >> 3) & 0xFF); mgos_epd_send_command(SET_RAM_Y_ADDRESS_COUNTER); mgos_epd_send_data(y & 0xFF); mgos_epd_send_data((y >> 8) & 0xFF); mgos_epd_wait_idle(); } /** * @brief: set the look-up table register */ void mgos_epd_set_lut(enum epaper_update_type_t lut_type) { uint8_t *p; _lut = lut_type; if (lut_type > PARTIAL_UPDATE) { LOG(LL_ERROR, ("Invalid LUT type %d", lut_type)); return; } p=(uint8_t *)&lut[lut_type]; mgos_epd_send_command(WRITE_LUT_REGISTER); /* the length of look-up table is 30 bytes */ mgos_epd_send_data_n(p, sizeof(lut_data_t)); } /** * @brief: Initialize the display */ bool mgos_epd_display_init(enum epaper_update_type_t type) { int paper_height = mgos_sys_config_get_epaper_size_y(); LOG(LL_INFO, ("Init ePaper display ..")); _lut = type; mgos_epd_reset(); mgos_epd_send_command(DRIVER_OUTPUT_CONTROL); mgos_epd_send_data((paper_height - 1) & 0xFF); mgos_epd_send_data(((paper_height - 1) >> 8) & 0xFF); mgos_epd_send_data(0x00); // GD = 0; SM = 0; TB = 0; mgos_epd_send_command(BOOSTER_SOFT_START_CONTROL); mgos_epd_send_data(0xD7); mgos_epd_send_data(0xD6); mgos_epd_send_data(0x9D); mgos_epd_send_command(WRITE_VCOM_REGISTER); mgos_epd_send_data(0xA8); // VCOM 7C mgos_epd_send_command(SET_DUMMY_LINE_PERIOD); mgos_epd_send_data(0x1A); // 4 dummy lines per gate mgos_epd_send_command(SET_GATE_TIME); mgos_epd_send_data(0x08); // 2us per line mgos_epd_send_command(DATA_ENTRY_MODE_SETTING); mgos_epd_send_data(0x03); // X increment; Y increment mgos_epd_set_lut( type ); return 0; } /** * @brief: A primitive function to push data to Mongoose-SPI */ static int mgos_epd_write_spi(const uint8_t * const data, const int len) { /* Half-duplex, command/response transaction setup */ /* Transmit 1 byte from tx_data. */ epaper_txn.fd.len = len; epaper_txn.fd.tx_data = data; epaper_txn.fd.rx_data = NULL; if (!mgos_spi_run_txn(epaper_spi, true /* full_duplex */, &epaper_txn)) { LOG(LL_ERROR, ("SPI transaction failed")); return -1; } return 0; } /** * @brief: A primitive to send a commend to ePaper */ static int mgos_epd_send_command(const uint8_t cmd_byte) { const uint8_t data = cmd_byte; mgos_gpio_write( _dc_pin, 0); return mgos_epd_write_spi(&data, 1); } /** * @brief: A primitive to send a single byte of data to ePaper */ static int mgos_epd_send_data(const uint8_t data_byte) { const uint8_t data = data_byte; mgos_gpio_write( _dc_pin, 1); return mgos_epd_write_spi(&data, 1); } /** * @brief: A primitive function to push data to Mongoose-SPI */ static int mgos_epd_send_data_n(const uint8_t * const data, const int len) { mgos_gpio_write( _dc_pin, 1); epaper_txn.fd.len = len; epaper_txn.fd.tx_data = data; epaper_txn.fd.rx_data = NULL; if (!mgos_spi_run_txn(epaper_spi, true /* full_duplex */, &epaper_txn)) { LOG(LL_ERROR, ("SPI transaction failed")); return -1; } return 0; } void mgos_epdUpdateNeeded(void) { _isdirty = true; } void mgos_epdUpdate(void) { if (_isdirty) { mgos_epd_display_frame(); _isdirty = false; } } /** * Mongoose init */ bool mgos_epaper_init(void) { LOG(LL_INFO, ("Set SPI ..")); /* Global SPI instance is configured by the `spi` config section. */ /* Alternatively, you can set up the bus manually. */ #if defined(USE_GLOBAL_SPI) && (USE_GLOBAL_SPI == 0) struct mgos_config_spi ep_bus_cfg = { .unit_no = 2, .miso_gpio = mgos_sys_config_get_spi_miso_gpio(), .mosi_gpio = mgos_sys_config_get_spi_mosi_gpio(), .sclk_gpio = mgos_sys_config_get_spi_sclk_gpio(), .cs0_gpio = mgos_sys_config_get_epaper_cs_pin(), .debug = true, }; #endif LOG(LL_INFO, ("OK.")); _width = mgos_sys_config_get_epaper_size_x(); _height = mgos_sys_config_get_epaper_size_y(); _dc_pin = mgos_sys_config_get_epaper_dc_pin(); mgos_gpio_write(_dc_pin, 1); mgos_gpio_set_mode(_dc_pin, MGOS_GPIO_MODE_OUTPUT); _cs_pin = mgos_sys_config_get_epaper_cs_pin(); /* mgos_gpio_write(_cs_pin, 1); mgos_gpio_set_mode(_cs_pin, MGOS_GPIO_MODE_OUTPUT); */ _reset_pin = mgos_sys_config_get_epaper_reset_pin(); mgos_gpio_write(_cs_pin, 1); mgos_gpio_set_mode(_reset_pin, MGOS_GPIO_MODE_OUTPUT); _busy_pin = mgos_sys_config_get_epaper_busy_pin(); mgos_gpio_set_pull(_busy_pin, MGOS_GPIO_PULL_UP); mgos_gpio_set_mode(_busy_pin, MGOS_GPIO_MODE_INPUT); LOG(LL_INFO, ("cs=%d d/c=%d busy=%d reset=%d", _cs_pin, _dc_pin, _busy_pin, _reset_pin)); #if defined(USE_GLOBAL_SPI) && (USE_GLOBAL_SPI == 0) epaper_spi = mgos_spi_create(&ep_bus_cfg); epaper_bus_cfg = ep_bus_cfg; #else epaper_spi = mgos_spi_get_global(); #endif if (epaper_spi == NULL) { LOG(LL_ERROR, ("SPI is not configured, make sure spi.enable is true")); return 0; } struct mgos_spi_txn txn = { .cs = 0, /* Use CS0 line as configured by cs0_gpio */ .mode = 0, .freq = 500000, }; epaper_txn = txn; if (0 != mgos_epd_display_init( FULL_UPDATE )) { LOG(LL_ERROR, ("Could not initialize ePaper display")); } return true; }
24.407002
145
0.692039
0ce0840b66e590ef2a41c729b631412a225153c7
12,383
py
Python
test/unit/agent/common/util/text.py
dp92987/nginx-amplify-agent
1b2eed6eab52a82f35974928d75044451b4bedaf
[ "BSD-2-Clause" ]
308
2015-11-17T13:15:33.000Z
2022-03-24T12:03:40.000Z
test/unit/agent/common/util/text.py
dp92987/nginx-amplify-agent
1b2eed6eab52a82f35974928d75044451b4bedaf
[ "BSD-2-Clause" ]
211
2015-11-16T15:27:41.000Z
2022-03-28T16:20:15.000Z
test/unit/agent/common/util/text.py
dp92987/nginx-amplify-agent
1b2eed6eab52a82f35974928d75044451b4bedaf
[ "BSD-2-Clause" ]
80
2015-11-16T18:20:30.000Z
2022-03-02T12:47:56.000Z
# -*- coding: utf-8 -*- from hamcrest import * from test.base import BaseTestCase from amplify.agent.common.util.text import ( decompose_format, parse_line, parse_line_split ) __author__ = "Grant Hulegaard" __copyright__ = "Copyright (C) Nginx, Inc. All rights reserved." __license__ = "" __maintainer__ = "Grant Hulegaard" __email__ = "grant.hulegaard@nginx.com" COMBINED_FORMAT = '$remote_addr - $remote_user [$time_local] "$request" ' + \ '$status $body_bytes_sent "$http_referer" "$http_user_agent"' class UtilTextTestCase(BaseTestCase): def test_decompose_format_regular(self): keys, trie, non_key_patterns, first_value_is_key = decompose_format( COMBINED_FORMAT, full=True ) assert_that(keys, not_none()) assert_that(trie, not_none()) assert_that(non_key_patterns, not_none()) assert_that(first_value_is_key, equal_to(True)) assert_that(keys, equal_to([ 'remote_addr', 'remote_user', 'time_local', 'request', 'status', 'body_bytes_sent', 'http_referer', 'http_user_agent' ])) assert_that(non_key_patterns, equal_to([ ' - ', ' [', '] "', '" ', ' ', ' "', '" "', '"' ])) def test_decompose_format_different(self): log_format = '$remote_addr - $remote_user [$time_local] ' + \ '"$request" $status $body_bytes_sent "$http_referer" ' + \ '"$http_user_agent" rt=$request_time ' + \ 'ut="$upstream_response_time" cs=$upstream_cache_status' keys, trie, non_key_patterns, first_value_is_key = decompose_format(log_format, full=True) assert_that(keys, not_none()) assert_that(trie, not_none()) assert_that(non_key_patterns, not_none()) assert_that(first_value_is_key, equal_to(True)) assert_that(keys, equal_to([ 'remote_addr', 'remote_user', 'time_local', 'request', 'status', 'body_bytes_sent', 'http_referer', 'http_user_agent', 'request_time', 'upstream_response_time', 'upstream_cache_status' ])) assert_that(non_key_patterns, equal_to([ ' - ', ' [', '] "', '" ', ' ', ' "', '" "', '" rt=', ' ut="', '" cs=' ])) def test_parse_line(self): keys, trie = decompose_format(COMBINED_FORMAT) line = '127.0.0.1 - - [02/Jul/2015:14:49:48 +0000] "GET /basic_status HTTP/1.1" 200 110 "-" ' + \ '"python-requests/2.2.1 CPython/2.7.6 Linux/3.13.0-48-generic"' results = parse_line(line, keys=keys, trie=trie) assert_that(results, not_none()) for key in keys: assert_that(results, has_item(key)) assert_that(results[key], not_none()) # check the last value to make sure complete parse assert_that(results['http_user_agent'], equal_to( 'python-requests/2.2.1 CPython/2.7.6 Linux/3.13.0-48-generic' )) def test_parse_line_split(self): keys, _, non_key_patterns, first_value_is_key = decompose_format(COMBINED_FORMAT, full=True) line = '127.0.0.1 - - [02/Jul/2015:14:49:48 +0000] "GET /basic_status HTTP/1.1" 200 110 "-" ' + \ '"python-requests/2.2.1 CPython/2.7.6 Linux/3.13.0-48-generic"' results = parse_line_split( line, keys=keys, non_key_patterns=non_key_patterns, first_value_is_key=first_value_is_key ) assert_that(results, not_none()) for key in keys: assert_that(results, has_item(key)) assert_that(results[key], not_none()) # check the last value to make sure complete parse assert_that(results['http_user_agent'], equal_to( 'python-requests/2.2.1 CPython/2.7.6 Linux/3.13.0-48-generic' )) def test_parse_line_non_standard_http_method(self): keys, trie = decompose_format(COMBINED_FORMAT) line = '127.0.0.1 - - [02/Jul/2015:14:49:48 +0000] "PROPFIND /basic_status HTTP/1.1" 200 110 "-" ' + \ '"python-requests/2.2.1 CPython/2.7.6 Linux/3.13.0-48-generic"' results = parse_line(line, keys=keys, trie=trie) assert_that(results, not_none()) for key in keys: assert_that(results, has_item(key)) assert_that(results[key], not_none()) # check the last value to make sure complete parse assert_that(results['http_user_agent'], equal_to( 'python-requests/2.2.1 CPython/2.7.6 Linux/3.13.0-48-generic' )) def test_parse_line_split_non_standard_http_method(self): keys, _, non_key_patterns, first_value_is_key = decompose_format( COMBINED_FORMAT, full=True ) line = '127.0.0.1 - - [02/Jul/2015:14:49:48 +0000] "PROPFIND /basic_status HTTP/1.1" 200 110 "-" ' + \ '"python-requests/2.2.1 CPython/2.7.6 Linux/3.13.0-48-generic"' results = parse_line_split( line, keys=keys, non_key_patterns=non_key_patterns, first_value_is_key=first_value_is_key ) assert_that(results, not_none()) for key in keys: assert_that(results, has_item(key)) assert_that(results[key], not_none()) # check the last value to make sure complete parse assert_that(results['http_user_agent'], equal_to( 'python-requests/2.2.1 CPython/2.7.6 Linux/3.13.0-48-generic' )) def test_parse_line_upstream_log_format(self): log_format = '$remote_addr - $remote_user [$time_local] ' + \ '"$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" ' + \ 'rt=$request_time ut="$upstream_response_time" cs=$upstream_cache_status' keys, trie = decompose_format(log_format) line = \ '1.2.3.4 - - [22/Jan/2010:19:34:21 +0300] "GET /foo/ HTTP/1.1" 200 11078 ' + \ '"http://www.rambler.ru/" "Mozilla/5.0 (Windows; U; Windows NT 5.1" rt=0.010 ut="2.001, 0.345" cs=MISS' results = parse_line(line, keys=keys, trie=trie) assert_that(results, not_none()) for key in keys: assert_that(results, has_item(key)) assert_that(results[key], not_none()) # check the last value to make sure complete parse assert_that(results['upstream_cache_status'], equal_to('MISS')) # check some complicated values assert_that(results['request_time'], equal_to('0.010')) assert_that(results['upstream_response_time'], equal_to('2.001, 0.345')) def test_parse_line_split_upstream_log_format(self): log_format = '$remote_addr - $remote_user [$time_local] ' + \ '"$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" ' + \ 'rt=$request_time ut="$upstream_response_time" cs=$upstream_cache_status' keys, _, non_key_patterns, first_value_is_key = decompose_format(log_format, full=True) line = \ '1.2.3.4 - - [22/Jan/2010:19:34:21 +0300] "GET /foo/ HTTP/1.1" 200 11078 ' + \ '"http://www.rambler.ru/" "Mozilla/5.0 (Windows; U; Windows NT 5.1" rt=0.010 ut="2.001, 0.345" cs=MISS' results = parse_line_split( line, keys=keys, non_key_patterns=non_key_patterns, first_value_is_key=first_value_is_key ) assert_that(results, not_none()) for key in keys: assert_that(results, has_item(key)) assert_that(results[key], not_none()) # check the last value to make sure complete parse assert_that(results['upstream_cache_status'], equal_to('MISS')) # check some complicated values assert_that(results['request_time'], equal_to('0.010')) assert_that(results['upstream_response_time'], equal_to('2.001, 0.345')) def test_parse_line_upstream_log_format_empty_upstreams(self): log_format = '$remote_addr - $remote_user [$time_local] ' + \ '"$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" ' + \ 'rt=$request_time cs=$upstream_cache_status ut="$upstream_response_time"' keys, trie = decompose_format(log_format) line = \ '1.2.3.4 - - [22/Jan/2010:19:34:21 +0300] "GET /foo/ HTTP/1.1" 200 11078 ' + \ '"http://www.rambler.ru/" "Mozilla/5.0 (Windows; U; Windows NT 5.1" rt=0.010 cs=- ut="-"' results = parse_line(line, keys=keys, trie=trie) assert_that(results, not_none()) for key in keys: assert_that(results, has_item(key)) assert_that(results[key], not_none()) # check the last value to make sure complete parse assert_that(results['upstream_response_time'], equal_to('-')) assert_that(results['upstream_cache_status'], equal_to('-')) def test_parse_line_split_upstream_log_format_empty_upstreams(self): log_format = '$remote_addr - $remote_user [$time_local] ' + \ '"$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" ' + \ 'rt=$request_time cs=$upstream_cache_status ut="$upstream_response_time"' keys, _, non_key_patterns, first_value_is_key = decompose_format( log_format, full=True ) line = \ '1.2.3.4 - - [22/Jan/2010:19:34:21 +0300] "GET /foo/ HTTP/1.1" 200 11078 ' + \ '"http://www.rambler.ru/" "Mozilla/5.0 (Windows; U; Windows NT 5.1" rt=0.010 cs=- ut="-"' results = parse_line_split( line, keys=keys, non_key_patterns=non_key_patterns, first_value_is_key=first_value_is_key ) assert_that(results, not_none()) for key in keys: assert_that(results, has_item(key)) assert_that(results[key], not_none()) # check the last value to make sure complete parse assert_that(results['upstream_response_time'], equal_to('-')) assert_that(results['upstream_cache_status'], equal_to('-')) def test_parse_line_upstream_log_format_part_empty_upstreams(self): log_format = '$remote_addr - $remote_user [$time_local] ' + \ '"$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" ' + \ 'rt=$request_time ut="$upstream_response_time" cs=$upstream_cache_status' keys, trie = decompose_format(log_format) line = \ '1.2.3.4 - - [22/Jan/2010:19:34:21 +0300] "GET /foo/ HTTP/1.1" 200 11078 ' + \ '"http://www.rambler.ru/" "Mozilla/5.0 (Windows; U; Windows NT 5.1" rt=0.010 ut="-" cs=MISS' results = parse_line(line, keys=keys, trie=trie) assert_that(results, not_none()) for key in keys: assert_that(results, has_item(key)) assert_that(results[key], not_none()) # check the last value to make sure complete parse assert_that(results['upstream_cache_status'], equal_to('MISS')) def test_parse_line_split_upstream_log_format_part_empty_upstreams(self): log_format = '$remote_addr - $remote_user [$time_local] ' + \ '"$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" ' + \ 'rt=$request_time ut="$upstream_response_time" cs=$upstream_cache_status' keys, _, non_key_patterns, first_value_is_key = decompose_format(log_format, full=True) line = \ '1.2.3.4 - - [22/Jan/2010:19:34:21 +0300] "GET /foo/ HTTP/1.1" 200 11078 ' + \ '"http://www.rambler.ru/" "Mozilla/5.0 (Windows; U; Windows NT 5.1" rt=0.010 ut="-" cs=MISS' results = parse_line_split( line, keys=keys, non_key_patterns=non_key_patterns, first_value_is_key=first_value_is_key ) assert_that(results, not_none()) for key in keys: assert_that(results, has_item(key)) assert_that(results[key], not_none()) # check the last value to make sure complete parse assert_that(results['upstream_cache_status'], equal_to('MISS'))
42.407534
115
0.605023
c7e73ecc2291a381480196b2be659243f496c21a
1,005
py
Python
flappy/filters/dropshadowfilter.py
meadiode/flappy
8d713f1db8d36bea61a73666ee353edd2ed40906
[ "MIT" ]
1
2020-09-16T15:18:39.000Z
2020-09-16T15:18:39.000Z
flappy/filters/dropshadowfilter.py
wannaphong/flappy
bc4630ca9120463c57c1d756c39c60a6dc509940
[ "MIT" ]
1
2020-11-17T00:58:59.000Z
2020-11-17T00:58:59.000Z
flappy/filters/dropshadowfilter.py
wannaphong/flappy
bc4630ca9120463c57c1d756c39c60a6dc509940
[ "MIT" ]
null
null
null
# encoding: utf-8 class DropShadowFilter(object): def __init__(self, distance=4.0, angle=45.0, color=0, alpha=1.0, blurX=4.0, blurY=4.0, strength=1.0, quality=1, inner=False, knockout=False, hideObject=False): self._type = 'DropShadowFilter' self.distance = distance self.angle = angle self.color = color self.alpha = alpha self.blurX = blurX self.blurY = blurY self.strength = strength self.quality = quality self.inner = inner self.knockout = knockout self.hideObject = hideObject def clone(self): return DropShadowFilter(self.distance, self.angle, self.color, self.alpha, self.blurX, self.blurY, self.strength, self.quality, self.inner, self.knockout, self.hideObject)
37.222222
72
0.512438
fd7462a58a72df9ce02e98d70db18893a6afb582
1,138
h
C
src/sdk/hl2_csgo/game/client/swarm/vgui/briefingframe.h
newcommerdontblame/ionlib
47ca829009e1529f62b2134aa6c0df8673864cf3
[ "MIT" ]
51
2016-03-18T01:48:07.000Z
2022-03-21T20:02:02.000Z
src/game/client/swarm/vgui/briefingframe.h
senny970/AlienSwarm
c5a2d3fa853c726d040032ff2c7b90c8ed8d5d84
[ "Unlicense" ]
null
null
null
src/game/client/swarm/vgui/briefingframe.h
senny970/AlienSwarm
c5a2d3fa853c726d040032ff2c7b90c8ed8d5d84
[ "Unlicense" ]
26
2016-03-17T21:20:37.000Z
2022-03-24T10:21:30.000Z
#ifndef _INCLUDED_BRIEFING_FRAME_H #define _INCLUDED_BRIEFING_FRAME_H #ifdef _WIN32 #pragma once #endif #include <vgui_controls/Frame.h> class BriefingImagePanel; class CNB_Mission_Panel; class CNB_Main_Panel; // fullscreen frame used to show the briefing class BriefingFrame : public vgui::Frame { DECLARE_CLASS_SIMPLE( BriefingFrame, vgui::Frame ); BriefingFrame(Panel *parent, const char *panelName, bool showTaskbarIcon = true); virtual ~BriefingFrame(); virtual void PerformLayout(); virtual void OnClose(); BriefingImagePanel* m_pBackdrop; // new briefing elements CNB_Main_Panel *m_pMainPanel; CNB_Mission_Panel* m_pMissionPanel; }; // a simple black panel that fades in while the server is launching the mission (spawning marines, equipping them, etc) class BriefingPreLaunchPanel : public vgui::Panel { DECLARE_CLASS_SIMPLE( BriefingPreLaunchPanel, vgui::Panel ); public: BriefingPreLaunchPanel(Panel *parent, const char *panelName); virtual void PerformLayout(); virtual void OnThink(); virtual void ApplySchemeSettings(vgui::IScheme *pScheme); float m_fFadeAlpha; }; #endif // _INCLUDED_BRIEFING_FRAME_H
26.465116
119
0.796134
a1b4f5bdf68c91f8b92f46f23afef9dfb43a895b
2,069
h
C
src/shaders/glsl/natural-mystic-rain.h
YamaR1n/natural-mystic-shaders
3c268817c5bd0a8339b6d257e5fc8ff6c1597d8d
[ "CC0-1.0" ]
28
2018-12-22T13:06:15.000Z
2022-03-18T14:47:28.000Z
src/shaders/glsl/natural-mystic-rain.h
YamaR1n/natural-mystic-shaders
3c268817c5bd0a8339b6d257e5fc8ff6c1597d8d
[ "CC0-1.0" ]
91
2018-12-20T06:42:12.000Z
2022-02-22T07:29:01.000Z
src/shaders/glsl/natural-mystic-rain.h
YamaR1n/natural-mystic-shaders
3c268817c5bd0a8339b6d257e5fc8ff6c1597d8d
[ "CC0-1.0" ]
6
2019-01-08T15:54:30.000Z
2021-09-11T12:12:52.000Z
// -*- glsl -*- #if !defined(NATURAL_MYSTIC_RAIN_H_INCLUDED) #define NATURAL_MYSTIC_RAIN_H_INCLUDED 1 #include "natural-mystic-noise.h" #include "natural-mystic-precision.h" /* See https://seblagarde.wordpress.com/2012/12/10/observe-rainy-world/ */ /* Compute the wetness of the terrain based on the clear weather level * [0,1] and terrain-dependent sunlight level [0,1]. */ float wetness(float clearWeather, float sunLevel) { const float shadowFactor = 0.01; // [0, 1] const float shadowBorder = 0.80; // [0, 1] const float shadowBlur = 0.06; // The higher the more blur. return (1.0 - clearWeather) * smoothstep(shadowBorder - shadowBlur, shadowBorder + shadowBlur, sunLevel); } /* Compute light reflected by water ripples on the ground. */ vec3 ripples(vec3 incomingLight, prec_hm vec3 worldPos, float cameraDist, prec_hm float time, prec_hm vec3 normal) { /* The visual effect of ripples is so subtle, and it won't be * visible on far terrain. We can skip the costly noise generation * unless worldPos isn't close to the camera. */ const float distThreshold = 0.1; const float distFadeStart = distThreshold * 0.8; if (cameraDist < distThreshold) { /* Water ripples should only be apparent on the ground, i.e. where the * normal matches to (0, 1, 0). */ float cosTheta = max(0.0, normal.y); // Equivalent to max(0.0, dot(normal, vec3(0, 1, 0))); const prec_hm vec3 resolution = vec3(vec2(0.16), 0.5); const float amount = 0.1; prec_hm vec3 st = vec3(worldPos.xz, time) / resolution; float ripples = simplexNoise(st); /* Shift the range of ripples. */ ripples = (ripples + 0.8) * 0.5; /* Threshold and scale of ripples. */ ripples = smoothstep(0.3, 1.0, ripples); return incomingLight * mix(0.2, 1.0, cosTheta) * ripples * amount * (1.0 - smoothstep(distFadeStart, distThreshold, cameraDist)); } else { return vec3(0); } } #endif /* defined(NATURAL_MYSTIC_RAIN_H_INCLUDED) */
36.298246
116
0.658772
a3bb912fdcd05a5bbd3d0de4c73d93e3a975c908
4,259
lua
Lua
compiled/lua/type_ternary_2nd_falsy.lua
smarek/ci_targets
c5edee7b0901fd8e7f75f85245ea4209b38e0cb3
[ "MIT" ]
4
2017-04-08T12:55:11.000Z
2020-12-05T21:09:31.000Z
compiled/lua/type_ternary_2nd_falsy.lua
smarek/ci_targets
c5edee7b0901fd8e7f75f85245ea4209b38e0cb3
[ "MIT" ]
7
2018-04-23T01:30:33.000Z
2020-10-30T23:56:14.000Z
compiled/lua/type_ternary_2nd_falsy.lua
smarek/ci_targets
c5edee7b0901fd8e7f75f85245ea4209b38e0cb3
[ "MIT" ]
6
2017-04-08T11:41:14.000Z
2020-10-30T22:47:31.000Z
-- This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild -- -- This file is compatible with Lua 5.3 local class = require("class") require("kaitaistruct") local utils = require("utils") TypeTernary2ndFalsy = class.class(KaitaiStruct) function TypeTernary2ndFalsy:_init(io, parent, root) KaitaiStruct._init(self, io) self._parent = parent self._root = root or self self:_read() end function TypeTernary2ndFalsy:_read() self.int_truthy = self._io:read_u1() self.ut = TypeTernary2ndFalsy.Foo(self._io, self, self._root) self.int_array = {} for i = 0, 2 - 1 do self.int_array[i + 1] = self._io:read_u1() end self.int_array_empty = {} for i = 0, 0 - 1 do self.int_array_empty[i + 1] = self._io:read_u1() end end TypeTernary2ndFalsy.property.null_ut = {} function TypeTernary2ndFalsy.property.null_ut:get() if self._m_null_ut ~= nil then return self._m_null_ut end if false then self._m_null_ut = self.ut end return self._m_null_ut end TypeTernary2ndFalsy.property.v_float_zero = {} function TypeTernary2ndFalsy.property.v_float_zero:get() if self._m_v_float_zero ~= nil then return self._m_v_float_zero end self._m_v_float_zero = utils.box_unwrap((self.t) and utils.box_wrap(0.0) or (3.14)) return self._m_v_float_zero end TypeTernary2ndFalsy.property.t = {} function TypeTernary2ndFalsy.property.t:get() if self._m_t ~= nil then return self._m_t end self._m_t = true return self._m_t end TypeTernary2ndFalsy.property.v_int_neg_zero = {} function TypeTernary2ndFalsy.property.v_int_neg_zero:get() if self._m_v_int_neg_zero ~= nil then return self._m_v_int_neg_zero end self._m_v_int_neg_zero = utils.box_unwrap((self.t) and utils.box_wrap(-0) or (-20)) return self._m_v_int_neg_zero end TypeTernary2ndFalsy.property.v_int_zero = {} function TypeTernary2ndFalsy.property.v_int_zero:get() if self._m_v_int_zero ~= nil then return self._m_v_int_zero end self._m_v_int_zero = utils.box_unwrap((self.t) and utils.box_wrap(0) or (10)) return self._m_v_int_zero end TypeTernary2ndFalsy.property.v_false = {} function TypeTernary2ndFalsy.property.v_false:get() if self._m_v_false ~= nil then return self._m_v_false end self._m_v_false = utils.box_unwrap((self.t) and utils.box_wrap(false) or (true)) return self._m_v_false end TypeTernary2ndFalsy.property.v_str_empty = {} function TypeTernary2ndFalsy.property.v_str_empty:get() if self._m_v_str_empty ~= nil then return self._m_v_str_empty end self._m_v_str_empty = utils.box_unwrap((self.t) and utils.box_wrap("") or ("kaitai")) return self._m_v_str_empty end TypeTernary2ndFalsy.property.v_int_array_empty = {} function TypeTernary2ndFalsy.property.v_int_array_empty:get() if self._m_v_int_array_empty ~= nil then return self._m_v_int_array_empty end self._m_v_int_array_empty = utils.box_unwrap((self.t) and utils.box_wrap(self.int_array_empty) or (self.int_array)) return self._m_v_int_array_empty end TypeTernary2ndFalsy.property.v_null_ut = {} function TypeTernary2ndFalsy.property.v_null_ut:get() if self._m_v_null_ut ~= nil then return self._m_v_null_ut end self._m_v_null_ut = utils.box_unwrap((self.t) and utils.box_wrap(self.null_ut) or (self.ut)) return self._m_v_null_ut end TypeTernary2ndFalsy.property.v_float_neg_zero = {} function TypeTernary2ndFalsy.property.v_float_neg_zero:get() if self._m_v_float_neg_zero ~= nil then return self._m_v_float_neg_zero end self._m_v_float_neg_zero = utils.box_unwrap((self.t) and utils.box_wrap(-0.0) or (-2.72)) return self._m_v_float_neg_zero end TypeTernary2ndFalsy.property.v_str_w_zero = {} function TypeTernary2ndFalsy.property.v_str_w_zero:get() if self._m_v_str_w_zero ~= nil then return self._m_v_str_w_zero end self._m_v_str_w_zero = utils.box_unwrap((self.t) and utils.box_wrap("0") or ("30")) return self._m_v_str_w_zero end TypeTernary2ndFalsy.Foo = class.class(KaitaiStruct) function TypeTernary2ndFalsy.Foo:_init(io, parent, root) KaitaiStruct._init(self, io) self._parent = parent self._root = root or self self:_read() end function TypeTernary2ndFalsy.Foo:_read() self.m = self._io:read_u1() end
26.955696
117
0.760977
40eabd06ebe71949fbf69067accae64bd5807c56
8,982
py
Python
tests/st/mindelec/geometry/test_geometry_base.py
mindspore-ai/mindscience
b5269245915695de2d99fb290fef662c241db189
[ "Apache-2.0" ]
3
2021-11-10T06:17:50.000Z
2022-03-21T14:25:30.000Z
tests/st/mindelec/geometry/test_geometry_base.py
mindspore-ai/mindscience
b5269245915695de2d99fb290fef662c241db189
[ "Apache-2.0" ]
null
null
null
tests/st/mindelec/geometry/test_geometry_base.py
mindspore-ai/mindscience
b5269245915695de2d99fb290fef662c241db189
[ "Apache-2.0" ]
1
2021-12-05T11:41:29.000Z
2021-12-05T11:41:29.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # 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. # ============================================================================ """test geometry module: base classes""" import pytest import numpy as np from easydict import EasyDict as edict from mindelec.geometry import Geometry, PartSamplingConfig, SamplingConfig, create_config_from_edict def check_create_config_from_edict(): try: sampling_config = ["geom", "IC", "BC"] config = create_config_from_edict(sampling_config) print("check config: {}".format(config)) except TypeError: print("get sampling config type error") def check_part_sampling_config(size, random_sampling, sampler, random_merge, with_normal): try: config = PartSamplingConfig(size, random_sampling, sampler, random_merge, with_normal) print("check config: {}".format(config.__dict__)) except TypeError: print("get TypeError") temp_config = edict({ 'domain': edict({ 'random_sampling': True, 'size': 100, }), 'BC': edict({ 'random_sampling': True, 'size': 100, 'sampler': 'uniform', 'random_merge': True, }), }) def check_sampling_config_case1(): """check_sampling_config_case1""" with pytest.raises(TypeError): SamplingConfig("test") with pytest.raises(KeyError): SamplingConfig({"test": "test"}) with pytest.raises(TypeError): SamplingConfig({"domain": "test"}) with pytest.raises(TypeError): part_sampling_config_dict = {"domain": PartSamplingConfig("test", False, True)} SamplingConfig(part_sampling_config_dict) part_sampling_config_dict = {"domain": PartSamplingConfig([100, 100], False, "uniform", True, True), "BC": PartSamplingConfig(100, True, "uniform", True, True)} sampling_config_tmp = SamplingConfig(part_sampling_config_dict) for attr, config in sampling_config_tmp.__dict__.items(): if config is not None: print("check sampling config: {}: {}".format(attr, config.__dict__)) def check_sampling_config_case2(config_in): """check_sampling_config_case2""" sampling_config_tmp = create_config_from_edict(config_in) for attr, config in sampling_config_tmp.__dict__.items(): if config is not None: print("check sampling config: {}: {}".format(attr, config.__dict__)) def check_sampling_config_case3(config_in): """check_sampling_config_case3""" config_in.ttime = config_in.domain sampling_config_tmp = create_config_from_edict(config_in) for attr, config in sampling_config_tmp.__dict__.items(): if config is not None: print("check sampling config: {}: {}".format(attr, config.__dict__)) def check_geometry_case1(): """check_geometry_case1""" with pytest.raises(ValueError): Geometry("geom", 2, 0.0, 1.0) with pytest.raises(TypeError): Geometry("geom", 2, [0, 0], [1, 1], sampling_config="test") geom = Geometry("geom", 1, 0.0, 1.0) with pytest.raises(TypeError): geom.set_sampling_config('test') with pytest.raises(NotImplementedError): geom.sampling() for attr, config in geom.__dict__.items(): if config is not None: print("check sampling config: {}: {}".format(attr, config)) try: geom = Geometry("geom", 1, 1.0, 0.0) for attr, config in geom.__dict__.items(): if config is not None: print("check sampling config: {}: {}".format(attr, config)) except ValueError: print("get ValueError") sampling_config2 = create_config_from_edict(temp_config) def check_geometry_case2(sampling_config_tmp): """check_geometry_case2""" geom = Geometry("geom", 1, 0.0, 1.0, sampling_config=sampling_config_tmp) geom.set_name("geom_name") for attr, config in geom.__dict__.items(): if config is not None: print("check sampling config: {}: {}".format(attr, config)) def check_geometry_case3(config_in): """check_geometry_case3""" geom = Geometry("geom", 1, 0.0, 1.0) for attr, configs in geom.__dict__.items(): if configs is not None: print("check sampling config: {}: {}".format(attr, configs)) geom.set_name("geom_name") geom.set_sampling_config(create_config_from_edict(config_in)) for attr, config in geom.__dict__.items(): if attr == "sampling_config" and config is not None: print("check sampling config after set: {}: {}".format(attr, config.__dict__)) for attrs, configs in config.__dict__.items(): if configs is not None: print("check sampling config: {}: {}".format(attrs, configs.__dict__)) else: if config is not None: print("check sampling config after set: {}: {}".format(attr, config)) def check_geometry_case4(): """check_geometry_case4""" try: geom = Geometry(10, 1, 1.0, 0.0) for attr, config in geom.__dict__.items(): if config is not None: print("check sampling config: {}: {}".format(attr, config)) except TypeError: print("get geom name type error") geom = Geometry("geom", 1, 0.0, 1.0) try: geom.set_name("geom_name") except TypeError: print("get set geom name type error") geom.set_name("geom_name") try: geom = Geometry("geom", 1.0, 1.0, 2.0) for attr, config in geom.__dict__.items(): if config is not None: print("check sampling config: {}: {}".format(attr, config)) except TypeError: print("get geom dim type error") try: geom = Geometry("geom", 1, 1.0, 0.0) except ValueError: print("get geom coord value error") try: geom = Geometry("geom", 1, {"min": 0.0}, {"max": 1.0}) except TypeError: print("get geom coord type error") try: geom = Geometry("geom", 1, 0.0, 1.0, dtype=np.uint32) except TypeError: print("get geom data type error") @pytest.mark.level0 @pytest.mark.platform_arm_ascend_training @pytest.mark.platform_x86_ascend_training @pytest.mark.env_onecard def test_check_part_sampling_config(): """test_check_part_sampling_config""" check_part_sampling_config(100, True, "uniform", True, True) check_part_sampling_config(100, False, "sobol", True, True) check_part_sampling_config([100, 100], False, "sobol", True, True) check_part_sampling_config([100, 100], True, "uniform", True, True) check_part_sampling_config(100, False, "lhs", True, True) check_part_sampling_config(100, False, "halton", True, True) check_create_config_from_edict() @pytest.mark.level0 @pytest.mark.platform_arm_ascend_training @pytest.mark.platform_x86_ascend_training @pytest.mark.env_onecard def test_check_sampling_config_case1(): """test_check_sampling_config_case1""" check_sampling_config_case1() @pytest.mark.level0 @pytest.mark.platform_arm_ascend_training @pytest.mark.platform_x86_ascend_training @pytest.mark.env_onecard def test_check_sampling_config_case2(): """test_check_sampling_config_case2""" check_sampling_config_case2(temp_config) @pytest.mark.level0 @pytest.mark.platform_arm_ascend_training @pytest.mark.platform_x86_ascend_training @pytest.mark.env_onecard def test_check_sampling_config_case3(): """test_check_sampling_config_case3""" check_sampling_config_case3(temp_config) @pytest.mark.level0 @pytest.mark.platform_arm_ascend_training @pytest.mark.platform_x86_ascend_training @pytest.mark.env_onecard def test_check_geometry_case1(): """test_check_geometry_case1""" check_geometry_case1() @pytest.mark.level0 @pytest.mark.platform_arm_ascend_training @pytest.mark.platform_x86_ascend_training @pytest.mark.env_onecard def test_check_geometry_case2(): """test_check_geometry_case2""" check_geometry_case2(sampling_config2) @pytest.mark.level0 @pytest.mark.platform_arm_ascend_training @pytest.mark.platform_x86_ascend_training @pytest.mark.env_onecard def test_check_geometry_case3(): """test_check_geometry_case3""" check_geometry_case3(temp_config) @pytest.mark.level0 @pytest.mark.platform_arm_ascend_training @pytest.mark.platform_x86_ascend_training @pytest.mark.env_onecard def test_check_geometry_case4(): """test_check_geometry_case4""" check_geometry_case4()
33.89434
104
0.684591
4ce00d3c66f566be5426a1037fc008ad2f3dea75
869
asm
Assembly
libsrc/gfx/narrow/drawto_callee.asm
ahjelm/z88dk
c4de367f39a76b41f6390ceeab77737e148178fa
[ "ClArtistic" ]
640
2017-01-14T23:33:45.000Z
2022-03-30T11:28:42.000Z
libsrc/gfx/narrow/drawto_callee.asm
C-Chads/z88dk
a4141a8e51205c6414b4ae3263b633c4265778e6
[ "ClArtistic" ]
1,600
2017-01-15T16:12:02.000Z
2022-03-31T12:11:12.000Z
libsrc/gfx/narrow/drawto_callee.asm
C-Chads/z88dk
a4141a8e51205c6414b4ae3263b633c4265778e6
[ "ClArtistic" ]
215
2017-01-17T10:43:03.000Z
2022-03-23T17:25:02.000Z
; ----- void __CALLEE__ drawto(int x2, int y2) IF !__CPU_INTEL__ & !__CPU_GBZ80__ SECTION code_graphics PUBLIC drawto_callee PUBLIC _drawto_callee PUBLIC asm_drawto EXTERN swapgfxbk EXTERN __graphics_end EXTERN Line EXTERN plotpixel EXTERN __gfx_coords INCLUDE "graphics/grafix.inc" .drawto_callee ._drawto_callee pop af ; ret addr pop de ; y2 pop hl ld d,l ; x2 push af ; ret addr .asm_drawto ld hl,(__gfx_coords) push ix IF NEED_swapgfxbk = 1 call swapgfxbk ENDIF push hl push de call plotpixel pop de pop hl ld ix,plotpixel call Line IF NEED_swapgfxbk jp __graphics_end ELSE IF !__CPU_INTEL__ & !__CPU_GBZ80__ pop ix ENDIF ret ENDIF ENDIF
16.711538
46
0.592635
c44fef3226067a5c8e68971f3c87a141b20dede2
6,988
c
C
release/src/linux/linux/drivers/char/misc.c
enfoTek/tomato.linksys.e2000.nvram-mod
2ce3a5217def49d6df7348522e2bfda702b56029
[ "FSFAP" ]
80
2015-01-02T10:14:04.000Z
2021-06-07T06:29:49.000Z
release/src/linux/linux/drivers/char/misc.c
unforgiven512/tomato
96f09fab4929c6ddde5c9113f1b2476ad37133c4
[ "FSFAP" ]
9
2015-05-14T11:03:12.000Z
2018-01-04T07:12:58.000Z
release/src/linux/linux/drivers/char/misc.c
unforgiven512/tomato
96f09fab4929c6ddde5c9113f1b2476ad37133c4
[ "FSFAP" ]
69
2015-01-02T10:45:56.000Z
2021-09-06T07:52:13.000Z
/* * linux/drivers/char/misc.c * * Generic misc open routine by Johan Myreen * * Based on code from Linus * * Teemu Rantanen's Microsoft Busmouse support and Derrick Cole's * changes incorporated into 0.97pl4 * by Peter Cervasio (pete%q106fm.uucp@wupost.wustl.edu) (08SEP92) * See busmouse.c for particulars. * * Made things a lot mode modular - easy to compile in just one or two * of the misc drivers, as they are now completely independent. Linus. * * Support for loadable modules. 8-Sep-95 Philip Blundell <pjb27@cam.ac.uk> * * Fixed a failing symbol register to free the device registration * Alan Cox <alan@lxorguk.ukuu.org.uk> 21-Jan-96 * * Dynamic minors and /proc/mice by Alessandro Rubini. 26-Mar-96 * * Renamed to misc and miscdevice to be more accurate. Alan Cox 26-Mar-96 * * Handling of mouse minor numbers for kerneld: * Idea by Jacques Gelinas <jack@solucorp.qc.ca>, * adapted by Bjorn Ekwall <bj0rn@blox.se> * corrected by Alan Cox <alan@lxorguk.ukuu.org.uk> * * Changes for kmod (from kerneld): * Cyrus Durgin <cider@speakeasy.org> * * Added devfs support. Richard Gooch <rgooch@atnf.csiro.au> 10-Jan-1998 */ #include <linux/module.h> #include <linux/config.h> #include <linux/fs.h> #include <linux/errno.h> #include <linux/miscdevice.h> #include <linux/kernel.h> #include <linux/major.h> #include <linux/slab.h> #include <linux/proc_fs.h> #include <linux/devfs_fs_kernel.h> #include <linux/stat.h> #include <linux/init.h> #include <linux/tty.h> #include <linux/selection.h> #include <linux/kmod.h> #include "busmouse.h" /* * Head entry for the doubly linked miscdevice list */ static struct miscdevice misc_list = { 0, "head", NULL, &misc_list, &misc_list }; static DECLARE_MUTEX(misc_sem); /* * Assigned numbers, used for dynamic minors */ #define DYNAMIC_MINORS 64 /* like dynamic majors */ static unsigned char misc_minors[DYNAMIC_MINORS / 8]; extern int psaux_init(void); extern void gfx_register(void); extern void streamable_init(void); extern int rtc_DP8570A_init(void); extern int rtc_MK48T08_init(void); extern int ds1286_init(void); extern int pmu_device_init(void); extern int tosh_init(void); extern int i8k_init(void); extern int lcd_init(void); static int misc_read_proc(char *buf, char **start, off_t offset, int len, int *eof, void *private) { struct miscdevice *p; int written; written=0; for (p = misc_list.next; p != &misc_list && written < len; p = p->next) { written += sprintf(buf+written, "%3i %s\n",p->minor, p->name ?: ""); if (written < offset) { offset -= written; written = 0; } } *start = buf + offset; written -= offset; if(written > len) { *eof = 0; return len; } *eof = 1; return (written<0) ? 0 : written; } static int misc_open(struct inode * inode, struct file * file) { int minor = MINOR(inode->i_rdev); struct miscdevice *c; int err = -ENODEV; struct file_operations *old_fops, *new_fops = NULL; down(&misc_sem); c = misc_list.next; while ((c != &misc_list) && (c->minor != minor)) c = c->next; if (c != &misc_list) new_fops = fops_get(c->fops); if (!new_fops) { char modname[20]; up(&misc_sem); sprintf(modname, "char-major-%d-%d", MISC_MAJOR, minor); request_module(modname); down(&misc_sem); c = misc_list.next; while ((c != &misc_list) && (c->minor != minor)) c = c->next; if (c == &misc_list || (new_fops = fops_get(c->fops)) == NULL) goto fail; } err = 0; old_fops = file->f_op; file->f_op = new_fops; if (file->f_op->open) { err=file->f_op->open(inode,file); if (err) { fops_put(file->f_op); file->f_op = fops_get(old_fops); } } fops_put(old_fops); fail: up(&misc_sem); return err; } static struct file_operations misc_fops = { owner: THIS_MODULE, open: misc_open, }; /** * misc_register - register a miscellaneous device * @misc: device structure * * Register a miscellaneous device with the kernel. If the minor * number is set to %MISC_DYNAMIC_MINOR a minor number is assigned * and placed in the minor field of the structure. For other cases * the minor number requested is used. * * The structure passed is linked into the kernel and may not be * destroyed until it has been unregistered. * * A zero is returned on success and a negative errno code for * failure. */ int misc_register(struct miscdevice * misc) { static devfs_handle_t devfs_handle, dir; struct miscdevice *c; if (misc->next || misc->prev) return -EBUSY; down(&misc_sem); c = misc_list.next; while ((c != &misc_list) && (c->minor != misc->minor)) c = c->next; if (c != &misc_list) { up(&misc_sem); return -EBUSY; } if (misc->minor == MISC_DYNAMIC_MINOR) { int i = DYNAMIC_MINORS; while (--i >= 0) if ( (misc_minors[i>>3] & (1 << (i&7))) == 0) break; if (i<0) { up(&misc_sem); return -EBUSY; } misc->minor = i; } if (misc->minor < DYNAMIC_MINORS) misc_minors[misc->minor >> 3] |= 1 << (misc->minor & 7); if (!devfs_handle) devfs_handle = devfs_mk_dir (NULL, "misc", NULL); dir = strchr (misc->name, '/') ? NULL : devfs_handle; misc->devfs_handle = devfs_register (dir, misc->name, DEVFS_FL_NONE, MISC_MAJOR, misc->minor, S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP, misc->fops, NULL); /* * Add it to the front, so that later devices can "override" * earlier defaults */ misc->prev = &misc_list; misc->next = misc_list.next; misc->prev->next = misc; misc->next->prev = misc; up(&misc_sem); return 0; } /** * misc_deregister - unregister a miscellaneous device * @misc: device to unregister * * Unregister a miscellaneous device that was previously * successfully registered with misc_register(). Success * is indicated by a zero return, a negative errno code * indicates an error. */ int misc_deregister(struct miscdevice * misc) { int i = misc->minor; if (!misc->next || !misc->prev) return -EINVAL; down(&misc_sem); misc->prev->next = misc->next; misc->next->prev = misc->prev; misc->next = NULL; misc->prev = NULL; devfs_unregister (misc->devfs_handle); if (i < DYNAMIC_MINORS && i>0) { misc_minors[i>>3] &= ~(1 << (misc->minor & 7)); } up(&misc_sem); return 0; } EXPORT_SYMBOL(misc_register); EXPORT_SYMBOL(misc_deregister); int __init misc_init(void) { create_proc_read_entry("misc", 0, 0, misc_read_proc, NULL); #ifdef CONFIG_MVME16x rtc_MK48T08_init(); #endif #ifdef CONFIG_BVME6000 rtc_DP8570A_init(); #endif #ifdef CONFIG_SGI_DS1286 ds1286_init(); #endif #ifdef CONFIG_PMAC_PBOOK pmu_device_init(); #endif #ifdef CONFIG_SGI_NEWPORT_GFX gfx_register (); #endif #ifdef CONFIG_SGI_IP22 streamable_init (); #endif #ifdef CONFIG_SGI_NEWPORT_GFX gfx_register (); #endif #ifdef CONFIG_TOSHIBA tosh_init(); #endif #ifdef CONFIG_COBALT_LCD lcd_init(); #endif #ifdef CONFIG_I8K i8k_init(); #endif if (devfs_register_chrdev(MISC_MAJOR,"misc",&misc_fops)) { printk("unable to get major %d for misc devices\n", MISC_MAJOR); return -EIO; } return 0; }
23.849829
81
0.684888
1ea107e5483b9bb2cc0eaf467260ba9623573d09
1,009
lua
Lua
lua/onenord/colors/onenordlight.lua
steef435/onenord.nvim
1590c4338fced87b46e403484f3bc4bbe6280022
[ "MIT" ]
187
2021-10-30T16:35:30.000Z
2022-03-25T22:31:16.000Z
lua/onenord/colors/onenordlight.lua
steef435/onenord.nvim
1590c4338fced87b46e403484f3bc4bbe6280022
[ "MIT" ]
28
2021-10-30T21:54:43.000Z
2022-01-06T18:46:48.000Z
lua/onenord/colors/onenordlight.lua
steef435/onenord.nvim
1590c4338fced87b46e403484f3bc4bbe6280022
[ "MIT" ]
17
2021-10-30T23:10:47.000Z
2022-03-22T08:34:39.000Z
local colors = { fg = "#2E3440", fg_light = "#4C566A", bg = "#F7F8FA", gray = "#838FA6", light_gray = "#646A76", cyan = "#3EA1AD", blue = "#3879C5", dark_blue = "#1B40A6", green = "#48A53D", light_green = "#5F9E9D", dark_red = "#C53B40", red = "#CB4F53", light_red = "#D16366", pink = "#E85B7A", dark_pink = "#E44675", orange = "#EE5E25", yellow = "#BA793E", purple = "#9F4ACA", light_purple = "#9665AF", none = "NONE", } -- more semantically meaningful colors colors.error = colors.dark_red colors.warn = colors.orange colors.info = colors.green colors.hint = colors.purple colors.diff_add = colors.green colors.diff_add_bg = "#C3E6BE" colors.diff_change = colors.dark_blue colors.diff_change_bg = "#DDE6EE" colors.diff_remove = colors.red colors.diff_remove_bg = "#F9D8D6" colors.diff_text_bg = "#C9D7E5" colors.active = "#EFF0F2" colors.float = "#EDEEF0" colors.highlight = "#EAEBED" colors.highlight_dark = "#DFE1E4" colors.selection = "#DCDEE1" return colors
21.934783
38
0.667988
c6b1d5596722b61f5a2bc28e45822b1cf9d4c5fa
432
asm
Assembly
oeis/037/A037606.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/037/A037606.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/037/A037606.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A037606: Base 6 digits are, in order, the first n terms of the periodic sequence with initial period 1,2,3. ; Submitted by Jon Maiga ; 1,8,51,307,1844,11067,66403,398420,2390523,14343139,86058836,516353019,3098118115,18588708692,111532252155,669193512931,4015161077588,24090966465531,144545798793187,867274792759124,5203648756554747 lpb $0 sub $0,1 add $2,1 add $1,$2 mul $1,6 mod $2,3 lpe add $1,$2 mov $0,$1 add $0,1
28.8
199
0.75463
0cadb7e95c4071f67c85455076d7e09c38533f05
7,394
swift
Swift
KeyCloner/ViewController.swift
JackErb/MultiToon-Controller
04250a33df1ebd20a05d6f7ce836b2480455f1ee
[ "MIT" ]
1
2017-06-30T20:24:58.000Z
2017-06-30T20:24:58.000Z
KeyCloner/ViewController.swift
JackErb/MultiToon-Controller
04250a33df1ebd20a05d6f7ce836b2480455f1ee
[ "MIT" ]
null
null
null
KeyCloner/ViewController.swift
JackErb/MultiToon-Controller
04250a33df1ebd20a05d6f7ce836b2480455f1ee
[ "MIT" ]
1
2018-08-15T06:15:57.000Z
2018-08-15T06:15:57.000Z
// // ViewController.swift // KeyCloner // // Created by Jack Erb on 7/20/16. // Copyright © 2016 Jack Erb. All rights reserved. // import Cocoa class ViewController: NSViewController { static var sharedController: ViewController! // Allow ViewController to be a first responder (i.e. respond to key/mouse events) override var acceptsFirstResponder: Bool { return true } var keySendMode = KeySendMode.mirror // Information of the applications this program will be sending info to. // Used for Mirror-Mode. var ttApplications = [ApplicationInfo]() { didSet { tableView.reloadData() } } // These two variable are used for Multi-Mode. var toontownApplication1: ApplicationInfo? { didSet { tableView.reloadData() } } var toontownApplication2: ApplicationInfo? { didSet { tableView.reloadData() } } // Is searching for applications var sendKeyStrokes = false { willSet { playAndStopButton.state = newValue ? 1 : 0 guard let keyEventDelegate = keyEventDelegate as? KeyEventSender else { return } for key in keyEventDelegate.keyboard.keys { keyEventDelegate.postKeyEvent(withKeyCode: key.keyCode, isDown: newValue, sender: self, postNoMatterWhat: true) keyEventDelegate.keyboard.handleKeyEvent(key.keyCode, isDown: true) } } } @IBOutlet weak var progressIndicator: NSProgressIndicator! @IBOutlet weak var playAndStopButton: NSButton! @IBOutlet weak var tableView: NSTableView! var keyEventDelegate: KeyEventDelegate? override func viewDidLoad() { // Finish singleton model. Part of a hacky piece of code to make this class the first responder. See AppDelegate. ViewController.sharedController = self keyEventDelegate = KeyEventSender() // AXIsProcessTrusted must be true to monitor key strokes while in the background. if !AXIsProcessTrusted() { let options = [kAXTrustedCheckOptionPrompt.takeUnretainedValue() as NSString: true] // Sends user to System Preferences -> Accessibility to give this program permission AXIsProcessTrustedWithOptions(options as CFDictionary?) } if !AXIsProcessTrusted() { // TO DO: Alert user in some way that program will be limited in functionality. } // Global monitor for event KeyDown. This triggers if a key is pushed down while in the background. NSEvent.addGlobalMonitorForEvents(matching: .keyDown, handler: self.keyDown(with:)) // Global monitor for event KeyUp. This triggers if a key is released while in the background. NSEvent.addGlobalMonitorForEvents(matching: .keyUp, handler: self.keyUp(with:)) // Global monitor for event FlagsChanged. This triggers if a key is released while in the background. NSEvent.addGlobalMonitorForEvents(matching: .flagsChanged, handler: self.flagsChanged(with:)) tableView.delegate = self tableView.dataSource = self tableView.target = self tableView.doubleAction = #selector(ViewController.tableViewDoubleClick(_:)) tableView.resignFirstResponder() } func animateProgressIndicator(_ bool: Bool) { if bool { progressIndicator.isHidden = false progressIndicator.startAnimation(nil) } else { progressIndicator.isHidden = true progressIndicator.stopAnimation(nil) } } override func keyDown(with event: NSEvent) { keyEventDelegate?.keyDown(event, sender: self) } override func keyUp(with event: NSEvent) { keyEventDelegate?.keyUp(event, sender: self) } override func flagsChanged(with event: NSEvent) { keyEventDelegate?.flagsChanged(event, sender: self) } // Refresh toontown application list @IBAction func refreshButtonAction(_ sender: NSButton) { searchForToontownApplications(sender: self) } // Either stop or start key event sending @IBAction func playAndStopButtonAction(_ sender: NSButton) { sendKeyStrokes = sender.state == 1 ? true : false } @IBAction func targetButtonAction(_ sender: AnyObject) { // Remove self as observer in case the user has already pressed this button. // This is just so the event isn't being observed twice. NSWorkspace.shared().notificationCenter.removeObserver(self) NSWorkspace.shared().notificationCenter.addObserver(self, selector: #selector(self.frontmostApplicationDidChange(_:)), name: NSNotification.Name.NSWorkspaceDidActivateApplication, object: nil) animateProgressIndicator(true) } @IBAction func keySendModeToggleButton(_ sender: AnyObject) { switch keySendMode { case .multi: keySendMode = .mirror tableView.reloadData() case .mirror: keySendMode = .multi searchForToontownApplications(sender: self) tableView.reloadData() } } func frontmostApplicationDidChange(_ notification: Notification) { let psn = getProcessSerialNumberOfFrontmostApplication() ttApplications.append(ApplicationInfo(application: NSWorkspace.shared().frontmostApplication!, psn: psn)) NSWorkspace.shared().notificationCenter.removeObserver(self) animateProgressIndicator(false) } } extension ViewController: NSTableViewDataSource { func numberOfRows(in tableView: NSTableView) -> Int { return keySendMode == .mirror ? ttApplications.count : 2 } } extension ViewController: NSTableViewDelegate { func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView? { if let cell = tableView.make(withIdentifier: "ApplicationsCell", owner: nil) as? NSTableCellView { if keySendMode == .mirror { cell.textField?.stringValue = ttApplications[row].application.localizedName ?? "Unnamed" cell.imageView?.image = ttApplications[row].activated ? NSImage(named: "thumbs-up") : NSImage(named: "thumbs-down") } else { var app: ApplicationInfo? = nil if row == 0 { app = toontownApplication1 } else if row == 1 { app = toontownApplication2 } cell.textField?.stringValue = app?.application.localizedName ?? "Not found" cell.imageView?.image = app?.activated ?? false ? NSImage(named: "thumbs-up") : NSImage(named: "thumbs-down") } return cell } return nil } // Not part of the protocol but used to deal with `NSTableView` events func tableViewDoubleClick(_ sender: AnyObject) { if keySendMode == .multi { return } guard tableView.selectedRow >= 0 else { return } ttApplications[tableView.selectedRow].activated = !ttApplications[tableView.selectedRow].activated } }
36.423645
200
0.639167
3c7ff5dc98474597ae095617fbf1ae29b3d71d12
259
rs
Rust
src/auth.rs
gdvalle/webchannel
cbaba7aba42da64eae74dbfab3638df0713f63d6
[ "MIT" ]
2
2021-12-18T11:28:39.000Z
2021-12-18T14:18:38.000Z
src/auth.rs
gdvalle/webchannel
cbaba7aba42da64eae74dbfab3638df0713f63d6
[ "MIT" ]
null
null
null
src/auth.rs
gdvalle/webchannel
cbaba7aba42da64eae74dbfab3638df0713f63d6
[ "MIT" ]
null
null
null
use serde::{Deserialize, Serialize}; use thiserror::Error; #[derive(Serialize, Deserialize, Debug, Clone)] pub struct Claims { pub cid: String, } #[derive(Error, Debug)] pub enum AuthError { #[error("invalid credentials")] InvalidCredentials, }
18.5
47
0.698842
72ea28f1bb76f07d1c16e48c06ba58b86ebcfc1e
496
html
HTML
06_webhybridapp/MovieApp/src/app/list/list.page.html
timofurrer/hslu-mobpro
dae693b36a31509aea270b43c10cf58380ccc424
[ "MIT" ]
null
null
null
06_webhybridapp/MovieApp/src/app/list/list.page.html
timofurrer/hslu-mobpro
dae693b36a31509aea270b43c10cf58380ccc424
[ "MIT" ]
null
null
null
06_webhybridapp/MovieApp/src/app/list/list.page.html
timofurrer/hslu-mobpro
dae693b36a31509aea270b43c10cf58380ccc424
[ "MIT" ]
null
null
null
<ion-header> <ion-toolbar> <ion-buttons slot="start"> <ion-menu-button></ion-menu-button> </ion-buttons> <ion-title> List </ion-title> </ion-toolbar> </ion-header> <ion-content> <ion-list> <ion-item *ngFor="let movie of movies" (click)="selectedMovie(movie)"> <ion-icon name="film" slot="start"></ion-icon> {{movie.Title}} <div class="item-note" slot="end"> {{movie.Year}} </div> </ion-item> </ion-list> </ion-content>
21.565217
74
0.566532
a681199589ab78d87a0506739b0ecd6ce73de6bb
812
kt
Kotlin
desktop/views/src/main/kotlin/com/soyle/stories/di/characterarc/CharacterListModule.kt
Soyle-Productions/soyle-stories
1a110536865250dcd8d29270d003315062f2b032
[ "Apache-2.0" ]
7
2021-08-10T18:20:25.000Z
2022-03-31T07:23:18.000Z
desktop/views/src/main/kotlin/com/soyle/stories/di/characterarc/CharacterListModule.kt
Soyle-Productions/soyle-stories
1a110536865250dcd8d29270d003315062f2b032
[ "Apache-2.0" ]
37
2021-08-04T22:51:02.000Z
2022-02-10T21:29:55.000Z
desktop/views/src/main/kotlin/com/soyle/stories/di/characterarc/CharacterListModule.kt
Soyle-Productions/soyle-stories
1a110536865250dcd8d29270d003315062f2b032
[ "Apache-2.0" ]
null
null
null
package com.soyle.stories.di.characterarc import com.soyle.stories.character.buildNewCharacter.CreatedCharacterNotifier import com.soyle.stories.character.characterList.LiveCharacterList import com.soyle.stories.character.removeCharacterFromStory.RemovedCharacterNotifier import com.soyle.stories.character.renameCharacter.CharacterRenamedNotifier import com.soyle.stories.di.get import com.soyle.stories.di.scoped import com.soyle.stories.project.ProjectScope internal object CharacterListModule { init { scoped<ProjectScope> { provide { LiveCharacterList( get<CreatedCharacterNotifier>(), get<RemovedCharacterNotifier>(), get<CharacterRenamedNotifier>() ) } } } }
29
84
0.700739
5e0a46d2917b9689d35411b517a83c62a3252350
113
sql
SQL
backend/de.metas.acct.base/src/main/sql/postgresql/system/43-de.metas.acct/5550750_cli_dont_use_currency_balancing.sql
dram/metasfresh
a1b881a5b7df8b108d4c4ac03082b72c323873eb
[ "RSA-MD" ]
1,144
2016-02-14T10:29:35.000Z
2022-03-30T09:50:41.000Z
backend/de.metas.acct.base/src/main/sql/postgresql/system/43-de.metas.acct/5550750_cli_dont_use_currency_balancing.sql
vestigegroup/metasfresh
4b2d48c091fb2a73e6f186260a06c715f5e2fe96
[ "RSA-MD" ]
8,283
2016-04-28T17:41:34.000Z
2022-03-30T13:30:12.000Z
backend/de.metas.acct.base/src/main/sql/postgresql/system/43-de.metas.acct/5550750_cli_dont_use_currency_balancing.sql
vestigegroup/metasfresh
4b2d48c091fb2a73e6f186260a06c715f5e2fe96
[ "RSA-MD" ]
441
2016-04-29T08:06:07.000Z
2022-03-28T06:09:56.000Z
update c_acctschema_gl set usecurrencybalancing='N', updated=now(), updatedby=99 where usecurrencybalancing='Y';
56.5
112
0.814159
2dc300eb972748c077a59a28fe2112574a6fbbb0
842
html
HTML
templates/login.html
cari1928/PATM_CINE_SMARTY
5ecdd27727693415fe17f6a37f0e954d01116412
[ "MIT" ]
null
null
null
templates/login.html
cari1928/PATM_CINE_SMARTY
5ecdd27727693415fe17f6a37f0e954d01116412
[ "MIT" ]
null
null
null
templates/login.html
cari1928/PATM_CINE_SMARTY
5ecdd27727693415fe17f6a37f0e954d01116412
[ "MIT" ]
1
2018-11-02T01:39:14.000Z
2018-11-02T01:39:14.000Z
{include file="header.html"} <div class="wrapper"> <form class="form-signin" action="login.php?accion=login" method="post"> <h2 class="form-signin-heading">Please login</h2> <div class="form-group"> <input type="text" class="form-control" name="username" placeholder="Email Address" required="" autofocus="" /> </div> <div class="form-group"> <input type="password" class="form-control" name="pass" placeholder="Password" required=""/> </div> <div class="form-group"> <button class="btn btn-lg btn-primary btn-block" type="submit">Login</button> </div> <div class="form-group" align="right"> <label><a href="#" class="btn btn-link">Sign In</a></label> </div> </form> </div> {include file="footer.html"}
32.384615
121
0.58076
86ac9a4ff04e2c5571109459754916ece3b2ae54
131
go
Go
main.go
Fabiox2011/jinx
085cdbfaa7c5181f061d0e6fe9cde384c6543931
[ "Apache-2.0" ]
null
null
null
main.go
Fabiox2011/jinx
085cdbfaa7c5181f061d0e6fe9cde384c6543931
[ "Apache-2.0" ]
null
null
null
main.go
Fabiox2011/jinx
085cdbfaa7c5181f061d0e6fe9cde384c6543931
[ "Apache-2.0" ]
null
null
null
package main import ( "fmt" "os" ) func main() { fmt.Println("Main starting.") fmt.Println("Main finished.") os.Exit(0) }
8.733333
30
0.618321
5f33dbbd34474d6297075e2a3e8f60652198cac7
2,057
swift
Swift
DereGuide/Model/Favorite/FavoriteCard.swift
tsekityam/DereGuide
8d5cef3b1c4b297034edfcdf48cb25494ed16575
[ "MIT" ]
42
2017-08-30T12:19:25.000Z
2022-02-23T03:37:52.000Z
DereGuide/Model/Favorite/FavoriteCard.swift
tsekityam/DereGuide
8d5cef3b1c4b297034edfcdf48cb25494ed16575
[ "MIT" ]
17
2017-11-18T11:59:48.000Z
2020-04-27T05:41:25.000Z
DereGuide/Model/Favorite/FavoriteCard.swift
tsekityam/DereGuide
8d5cef3b1c4b297034edfcdf48cb25494ed16575
[ "MIT" ]
6
2018-01-06T09:39:23.000Z
2020-10-11T23:43:02.000Z
// // FavoriteCard.swift // DereGuide // // Created by zzk on 2017/7/26. // Copyright © 2017 zzk. All rights reserved. // import Foundation import CoreData import CloudKit public class FavoriteCard: NSManagedObject { @nonobjc public class func fetchRequest() -> NSFetchRequest<FavoriteCard> { return NSFetchRequest<FavoriteCard>(entityName: "FavoriteCard") } @NSManaged public var cardID: Int32 @NSManaged public var createdAt: Date @NSManaged fileprivate var primitiveCreatedAt: Date public override func awakeFromInsert() { super.awakeFromInsert() primitiveCreatedAt = Date() } @discardableResult static func insert(into moc: NSManagedObjectContext, cardID: Int) -> FavoriteCard { let favoriteCard: FavoriteCard = moc.insertObject() favoriteCard.cardID = Int32(cardID) return favoriteCard } } extension FavoriteCard: Managed { public static var entityName: String { return "FavoriteCard" } public static var defaultSortDescriptors: [NSSortDescriptor] { return [NSSortDescriptor(key: #keyPath(FavoriteCard.cardID), ascending: false)] } public static var defaultPredicate: NSPredicate { return notMarkedForDeletionPredicate } } extension FavoriteCard: IDSearchable { var searchedID: Int { return Int(cardID) } } extension FavoriteCard: DelayedDeletable { @NSManaged public var markedForDeletionDate: Date? } extension FavoriteCard: RemoteDeletable { @NSManaged public var markedForRemoteDeletion: Bool @NSManaged public var remoteIdentifier: String? } extension FavoriteCard: UserOwnable { @NSManaged public var creatorID: String? } extension FavoriteCard: RemoteUploadable { public func toCKRecord() -> CKRecord { let record = CKRecord(recordType: RemoteFavoriteCard.recordType) record["cardID"] = cardID as CKRecordValue record["localCreatedAt"] = createdAt as NSDate return record } }
25.085366
87
0.695673
dc09e6cfa5eebe2a970cd143544704b3431139f3
958
py
Python
test/test_exporter.py
MattCzyr/EvacSim
d2fd191e8fb93d210b031794c274c54ebe3a1fe4
[ "MIT" ]
1
2019-11-03T16:58:28.000Z
2019-11-03T16:58:28.000Z
test/test_exporter.py
MattCzyr/EvacuationPlanner
d2fd191e8fb93d210b031794c274c54ebe3a1fe4
[ "MIT" ]
12
2021-03-23T04:02:04.000Z
2021-04-30T22:55:54.000Z
test/test_exporter.py
MattCzyr/EvacuationPlanner
d2fd191e8fb93d210b031794c274c54ebe3a1fe4
[ "MIT" ]
null
null
null
import unittest import os import evacsim.node import evacsim.edge import evacsim.disaster import evacsim.exporter class TestExporter(unittest.TestCase): """Tests functionality in the exporter module. There isn't much to be tested here, so it simply tests that a KML file with the proper name is created when the export_kml function is called.""" def test_export_kml(self): """Tests the export_kml function""" nodes = {'Troy': evacsim.node.Node('Troy', 42.727453, -73.691764, 50000, 80000), 'Watervliet': evacsim.node.Node('Watervliet', 42.730389, -73.701504, 10000, 15000)} edges = [evacsim.edge.Edge(nodes['Troy'], nodes['Watervliet'], 25, 0, 1000)] disaster = evacsim.disaster.Disaster('Alfred') routes = [] exp = evacsim.exporter.Exporter(nodes, edges, disaster, routes, 'test.kml') exp.export_kml() self.assertTrue(os.path.exists('test.kml')) os.remove('test.kml')
43.545455
172
0.68476
9cd156b9f50162eff32b628b8cad2401b5a081e7
1,453
css
CSS
themes/hugo-theme-w3css-basic/static/vendor/w3css/4/color_of_the_year/w3-theme-color-of-year-2018-harbor-mist.css
arvindvenkatadri/ProjectWorkflow
c27ec7e520154234ad3b289c90a1d8cf46a98c9f
[ "MIT" ]
52
2018-01-20T17:00:20.000Z
2021-09-01T04:35:12.000Z
themes/hugo-theme-w3css-basic/static/vendor/w3css/4/color_of_the_year/w3-theme-color-of-year-2018-harbor-mist.css
arvindvenkatadri/ProjectWorkflow
c27ec7e520154234ad3b289c90a1d8cf46a98c9f
[ "MIT" ]
28
2018-01-17T23:21:55.000Z
2020-04-01T07:37:28.000Z
themes/hugo-theme-w3css-basic/static/vendor/w3css/4/color_of_the_year/w3-theme-color-of-year-2018-harbor-mist.css
arvindvenkatadri/ProjectWorkflow
c27ec7e520154234ad3b289c90a1d8cf46a98c9f
[ "MIT" ]
32
2018-01-20T17:30:32.000Z
2022-03-27T05:14:19.000Z
/* https://www.w3schools.com/w3css/w3css_color_generator.asp */ /* 2018 Harbor Mist #B4B7BA */ .w3-theme-l5 {color:#000 !important; background-color:#fbfbfb !important} .w3-theme-l4 {color:#000 !important; background-color:#f0f1f1 !important} .w3-theme-l3 {color:#000 !important; background-color:#e1e2e4 !important} .w3-theme-l2 {color:#000 !important; background-color:#d2d4d6 !important} .w3-theme-l1 {color:#000 !important; background-color:#c4c6c8 !important} .w3-theme-d1 {color:#fff !important; background-color:#a2a5a9 !important} .w3-theme-d2 {color:#fff !important; background-color:#8f9397 !important} .w3-theme-d3 {color:#fff !important; background-color:#7b8186 !important} .w3-theme-d4 {color:#fff !important; background-color:#6a6e73 !important} .w3-theme-d5 {color:#fff !important; background-color:#585c5f !important} .w3-theme-light {color:#000 !important; background-color:#fbfbfb !important} .w3-theme-dark {color:#fff !important; background-color:#585c5f !important} .w3-theme-action {color:#fff !important; background-color:#585c5f !important} .w3-theme {color:#000 !important; background-color:#b4b7ba !important} .w3-text-theme {color:#b4b7ba !important} .w3-border-theme {border-color:#b4b7ba !important} .w3-hover-theme:hover {color:#000 !important; background-color:#b4b7ba !important} .w3-hover-text-theme:hover {color:#b4b7ba !important} .w3-hover-border-theme:hover {border-color:#b4b7ba !important}
55.884615
82
0.746043
6c45117ee7fd3c065f33123eba6d4649e9d590e1
1,607
go
Go
pkg/gifs/gifs.go
DylanMeador/hermes
4015d7bffa19376e4dbd719756749466104fee6f
[ "Apache-2.0" ]
1
2020-07-02T00:28:40.000Z
2020-07-02T00:28:40.000Z
pkg/gifs/gifs.go
DylanMeador/hermes
4015d7bffa19376e4dbd719756749466104fee6f
[ "Apache-2.0" ]
null
null
null
pkg/gifs/gifs.go
DylanMeador/hermes
4015d7bffa19376e4dbd719756749466104fee6f
[ "Apache-2.0" ]
null
null
null
package gifs const ( BUG = "https://tenor.com/view/spongebob-squarepants-spongebob-patrick-star-we-have-a-bug-panic-gif-4771359" COWBELL = "https://tenor.com/view/league-of-lengends-cow-noise-bell-gif-8133323" TYLER1_DAB = "https://tenor.com/view/tyler1-dab-special-t1-lol-gif-13702867" ITS_A_TRAP = "https://tenor.com/view/trap-run-away-go-fooled-trifling-gif-5250313" MAGIC1 = "https://tenor.com/view/magic-shia-labeouf-snl-skit-fingers-gif-4860090" MAGIC2 = "https://tenor.com/view/imagination-spongebob-squarepants-dreams-magic-gif-12725683" MAGIC3 = "https://tenor.com/view/magic-office-gif-5194301" MAGIC4 = "https://tenor.com/view/gone-magic-magictrick-joker-dark-knight-gif-4780803" BAD_JOKE = "https://tenor.com/view/the-dark-knight-joker-heath-ledger-and-ithought-my-jokes-were-bad-bad-jokes-gif-3961540" JOKER_BRAVO = "https://tenor.com/view/bravo-joker-clap-gif-10990607" JOKER_SAD = "https://tenor.com/view/movie-mental-illness-sad-happy-warner-brothers-gif-13856369" DM1 = "https://tenor.com/view/roller-skater-slide-in-dms-slide-in-the-dms-sliding-in-dms-roller-skating-funny-gif-15770791" DM2 = "https://tenor.com/view/wacky-man-sliding-slide-in-dms-gif-8178841" DM3 = "https://tenor.com/view/slide-in-dms-slide-in-dms-gif-5848157" DM4 = "https://tenor.com/view/defectivetrash-slide-dms-slide-into-dem-dms-eyyy-gif-13293420" SPOILER = "https://tenor.com/view/spoilers-got-asoiaf-gif-5434824" ) var ( ALL_MAGIC = []string{MAGIC1, MAGIC2, MAGIC3, MAGIC4} ALL_DM = []string{DM1, DM2, DM3, DM4} )
61.807692
132
0.717486
72b3d9b655f106b342cf8e2fa29e8938382ecbea
437
rs
Rust
sgx/urts-sys/src/lib.rs
MixinNetwork/mobilecoin
5ffd861904185edbc0d17ab6b37bcd8983d7b15b
[ "Apache-2.0" ]
null
null
null
sgx/urts-sys/src/lib.rs
MixinNetwork/mobilecoin
5ffd861904185edbc0d17ab6b37bcd8983d7b15b
[ "Apache-2.0" ]
null
null
null
sgx/urts-sys/src/lib.rs
MixinNetwork/mobilecoin
5ffd861904185edbc0d17ab6b37bcd8983d7b15b
[ "Apache-2.0" ]
1
2022-03-26T09:02:39.000Z
2022-03-26T09:02:39.000Z
// Copyright (c) 2018-2020 MobileCoin Inc. //! Intel SGX URTS FFI #![allow(non_upper_case_globals)] #![allow(non_camel_case_types)] #![allow(non_snake_case)] #![allow(clippy::missing_safety_doc)] #![allow(clippy::useless_transmute)] use mc_sgx_core_types_sys::{ sgx_config_id_t, sgx_config_svn_t, sgx_enclave_id_t, sgx_misc_attribute_t, sgx_status_t, sgx_target_info_t, }; include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
25.705882
92
0.748284
71f69c0a120db88c46ca42d12cd33ebcb5ca0f98
1,738
ts
TypeScript
tests/table/apis/table.service.test.properties.ts
ScriptBox21/Azurite
d8e0b4a993e77f608800b411a40e0cc4b36c1b80
[ "MIT" ]
1,145
2018-03-20T06:35:54.000Z
2022-03-29T04:48:04.000Z
tests/table/apis/table.service.test.properties.ts
ScriptBox21/Azurite
d8e0b4a993e77f608800b411a40e0cc4b36c1b80
[ "MIT" ]
1,062
2018-03-22T09:25:31.000Z
2022-03-30T13:42:24.000Z
tests/table/apis/table.service.test.properties.ts
ScriptBox21/Azurite
d8e0b4a993e77f608800b411a40e0cc4b36c1b80
[ "MIT" ]
251
2018-03-22T09:14:40.000Z
2022-02-22T02:24:54.000Z
import * as Azure from "azure-storage"; export function getServicePropertiesForTest() : Azure.common.models.ServicePropertiesResult.ServiceProperties{ return { Cors: { CorsRule: [ { AllowedOrigins: [ "http://www.contoso.com", "http://www.fabrikam.com" ], AllowedMethods: [ "GET", "HEAD", "POST", "OPTIONS", "MERGE", "PUT" ], MaxAgeInSeconds: 100, ExposedHeaders: [ "x-ms-meta-*" ], AllowedHeaders: [ "x-ms-meta-abc", "x-ms-meta-data*", "x-ms-meta-target*" ] }, { AllowedOrigins: [ "*" ], AllowedMethods: [ "GET" ], MaxAgeInSeconds: 2, ExposedHeaders: [ "*" ], AllowedHeaders: [ "*" ] }, { AllowedOrigins: [ "http://www.abc23.com", "https://www.fabrikam.com/*" ], AllowedMethods: [ "GET", "PUT" ], MaxAgeInSeconds: 2000, ExposedHeaders: [ "x-ms-meta-abc", "x-ms-meta-data*", "x-ms-meta-target*" ], AllowedHeaders: [ "x-ms-meta-12345675754564*" ] } ] } } }
25.188406
105
0.325662
b1b3e841ba62b632653025b5d516cd17f4aa0432
350
h
C
TVOnline/TVOnline/Home/Recommend/View/UNRecommendHeaderView.h
hetefe/OnlineTV
949ed8aeefe99c37eafea2d3d06301443dc6afc3
[ "Apache-2.0" ]
null
null
null
TVOnline/TVOnline/Home/Recommend/View/UNRecommendHeaderView.h
hetefe/OnlineTV
949ed8aeefe99c37eafea2d3d06301443dc6afc3
[ "Apache-2.0" ]
null
null
null
TVOnline/TVOnline/Home/Recommend/View/UNRecommendHeaderView.h
hetefe/OnlineTV
949ed8aeefe99c37eafea2d3d06301443dc6afc3
[ "Apache-2.0" ]
null
null
null
// // UNRecommendHeaderView.h // TVOnline // // Created by universe on 2016/12/28. // Copyright © 2016年 universe. All rights reserved. // #import <UIKit/UIKit.h> @interface UNRecommendHeaderView : UICollectionReusableView @property (weak, nonatomic) IBOutlet UILabel *titleLable; @property (weak, nonatomic) IBOutlet UIButton *lookBtn; @end
19.444444
59
0.742857
416a4db1821b93876ea0f13e5416d3f3a0a16c0a
395
h
C
ios/RNPusherLocalTokenProvider.h
cn-software-ltd/react-native-pusher-push-notifications
829c21a85441b3b54dd39986c4b2848842e0d8d8
[ "MIT" ]
90
2017-07-02T19:20:31.000Z
2022-01-26T22:52:04.000Z
ios/RNPusherLocalTokenProvider.h
cn-software-ltd/react-native-pusher-push-notifications
829c21a85441b3b54dd39986c4b2848842e0d8d8
[ "MIT" ]
78
2017-02-15T04:54:08.000Z
2022-03-31T08:59:07.000Z
ios/RNPusherLocalTokenProvider.h
cn-software-ltd/react-native-pusher-push-notifications
829c21a85441b3b54dd39986c4b2848842e0d8d8
[ "MIT" ]
67
2017-02-13T23:49:05.000Z
2022-03-27T12:09:43.000Z
// // RNPusherLocalTokenProvider.h // RNPusherPushNotifications // // Created by Gianni Settino on 6/25/19. // #import <Foundation/Foundation.h> @import PushNotifications; NS_ASSUME_NONNULL_BEGIN @interface RNPusherLocalTokenProvider : NSObject <TokenProvider> @property (nonatomic, strong) NSString *_token; - (instancetype)initWithToken:(NSString *)token; @end NS_ASSUME_NONNULL_END
17.954545
64
0.782278
ffcaea1f72f820623c9d3de96fb6aea39ec19efc
1,123
swift
Swift
practice/Initialization.swift
huipengo/design-pattern
f2cb8e0de554c0c4d86910a45b197dfcc6936d22
[ "MIT" ]
1
2020-07-04T09:41:53.000Z
2020-07-04T09:41:53.000Z
practice/Initialization.swift
huipengo/design-pattern
f2cb8e0de554c0c4d86910a45b197dfcc6936d22
[ "MIT" ]
null
null
null
practice/Initialization.swift
huipengo/design-pattern
f2cb8e0de554c0c4d86910a45b197dfcc6936d22
[ "MIT" ]
null
null
null
// // Initialization.swift // practice // // Created by huipeng on 2020/6/23. // Copyright © 2020 only.io. All rights reserved. // import Foundation //class Person { // required init() { } // init(age: Int) { } //} // //class Student: Person { // required init() { // super.init() // } //} //class Person { // var age: Int { // willSet { // print("willSet", newValue) // } // didSet { // print("didSet", oldValue, age) // } // } // // init() { // self.age = 0 // } //} // //class Student: Person { // override init() { // super.init() // self.age = 1 // } //} // //var student = Student() //willSet 1 //didSet 0 1 //class Person { // var name: String // init?(name: String) { // if name.isEmpty { // return nil // } // self.name = name // } // deinit { // print("Person 对象销毁了") // } //} // //var num = Int("123") //// @inlinable public init?(_ description: String) // //enum Answer: Int { // case wrong, right //} //var answer = Answer(rawValue: 1)
16.275362
51
0.478183
f156912c85a99a0d2222718b05bc99b0995f33d2
2,643
asm
Assembly
programs/oeis/000/A000971.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/000/A000971.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
programs/oeis/000/A000971.asm
karttu/loda
9c3b0fc57b810302220c044a9d17db733c76a598
[ "Apache-2.0" ]
null
null
null
; A000971: Fermat coefficients. ; 1,9,42,132,334,728,1428,2584,4389,7084,10963,16380,23751,33563,46376,62832,83657,109668,141778,181001,228459,285384,353127,433160,527085,636636,763686,910252,1078500,1270752,1489488,1737355,2017169,2331924,2684794,3079140,3518515,4006669,4547556,5145336,5804384,6529292,7324878,8196188,9148503,10187344,11318477,12547920,13881945,15327087,16890146,18578196,20398587,22358952,24467212,26731581,29160573,31763004,34548001,37525004,40703775,44094400,47707296,51553216,55643254,59988852,64601802,69494255,74678723,80168088,85975604,92114904,98600005,105445313,112665630,120276156,128292498,136730672,145607112,154938672,164742633,175036708,185839047,197168244,209043339,221483827,234509660,248141256,262399501,277305756,292881862,309150145,326133423,343855008,362338715,381608864,401690289,422608340,444388890,467058340,490643624,515172216,540672132,567171939,594700757,623288268,652964718,683760924,715708279,748838757,783184920,818779920,855657508,893852036,933398466,974332372,1016689947,1060508008,1105824001,1152676008,1201102749,1251143591,1302838550,1356228300,1411354175,1468258176,1526982976,1587571925,1650069057,1714519092,1780967445,1849460228,1920044259,1992767064,2067676884,2144822680,2224254138,2306021676,2390176446,2476770343,2565856007,2657486832,2751716968,2848601328,2948195593,3050556217,3155740434,3263806260,3374812502,3488818760,3605885436,3726073736,3849445677,3976064092,4105992635,4239295788,4376038863,4516288011,4660110224,4807573344,4958746065,5113697940,5272499386,5435221689,5601937011,5772718392,5947639759,6126775928,6310202613,6497996428,6690234894,6886996444,7088360428,7294407120,7505217720,7720874363,7941460121,8167059012,8397756002,8633637012,8874788923,9121299581,9373257804,9630753384,9893877096,10162720700,10437376950,10717939596,11004503391,11297164096,11596018485,11901164352,12212700513,12530726815,12855344138,13186654404,13524760579,13869766680,14221777780,14580900013,14947240581,15320907756,15702010889,16090660412,16486967847,16891045808,17303008008,17722969264,18151045502,18587353764,19032012210,19485140127,19946857931,20417287176,20896550556,21384771912,21882076237,22388589681,22904439558,23429754348,23964663706,24509298464,25063790640,25628273440,26202881265,26787749716,27383015599,27988816932,28605292947,29232584099,29870832068,30520179768,31180771349,31852752204,32536268974,33231469553,33938503095,34657520016,35388672003,36132112016,36887994297,37656474372,38437709058,39231856468,40039076016,40859528424,41693375724,42540781267,43401909725,44276927100 mov $1,5 mov $2,2 mov $3,$0 add $3,3 mul $3,2 bin $3,5 add $2,$3 div $2,6 add $1,$2 sub $1,5
188.785714
2,516
0.885358
413d6ec6787436aff14f14d9bfb1ffb6d3216ea3
2,611
h
C
STEER/STEERBase/AliDetectorPID.h
AllaMaevskaya/AliRoot
c53712645bf1c7d5f565b0d3228e3a6b9b09011a
[ "BSD-3-Clause" ]
52
2016-12-11T13:04:01.000Z
2022-03-11T11:49:35.000Z
STEER/STEERBase/AliDetectorPID.h
AllaMaevskaya/AliRoot
c53712645bf1c7d5f565b0d3228e3a6b9b09011a
[ "BSD-3-Clause" ]
1,388
2016-11-01T10:27:36.000Z
2022-03-30T15:26:09.000Z
STEER/STEERBase/AliDetectorPID.h
AllaMaevskaya/AliRoot
c53712645bf1c7d5f565b0d3228e3a6b9b09011a
[ "BSD-3-Clause" ]
275
2016-06-21T20:24:05.000Z
2022-03-31T13:06:19.000Z
#ifndef ALI_DETECTOR_PID_H #define ALI_DETECTOR_PID_H /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ //---------------------------------------------------------------// // Class to store raw probabilities and nsigmas // // of all detectors // // // // // // Origin: Jens Wiechula, Uni Tuebingen, jens.wiechula@cern.ch // //---------------------------------------------------------------// #include <TObject.h> #include <TClonesArray.h> #include "AliPID.h" #include "AliPIDResponse.h" class AliDetectorPID : public TObject { public: AliDetectorPID(); AliDetectorPID(const AliDetectorPID &pid); virtual ~AliDetectorPID(); AliDetectorPID& operator= (const AliDetectorPID &pid); void SetRawProbability(AliPIDResponse::EDetector det, const Double_t prob[], Int_t nspecies, AliPIDResponse::EDetPidStatus status); void SetNumberOfSigmas(AliPIDResponse::EDetector det, const Double_t nsig[], Int_t nspecies, AliPIDResponse::EDetPidStatus status=AliPIDResponse::kDetPidOk); AliPIDResponse::EDetPidStatus GetRawProbability(AliPIDResponse::EDetector det, Double_t prob[], Int_t nspecies) const; AliPIDResponse::EDetPidStatus GetNumberOfSigmas(AliPIDResponse::EDetector det, Double_t nsig[], Int_t nspecies) const; Double_t GetRawProbability(AliPIDResponse::EDetector det, AliPID::EParticleType type) const; Double_t GetNumberOfSigmas(AliPIDResponse::EDetector det, AliPID::EParticleType type) const; AliPIDResponse::EDetPidStatus GetRawProbability(AliPIDResponse::EDetector det, AliPID::EParticleType type, Double_t &prob) const; AliPIDResponse::EDetPidStatus GetNumberOfSigmas(AliPIDResponse::EDetector det, AliPID::EParticleType type, Double_t &nsig) const; Bool_t HasRawProbability(AliPIDResponse::EDetector det) const { return fArrRawProbabilities.UncheckedAt((Int_t)det)!=0x0; } Bool_t HasNumberOfSigmas (AliPIDResponse::EDetector det) const { return fArrNsigmas.UncheckedAt((Int_t)det)!=0x0; } AliPIDResponse::EDetPidStatus GetPIDStatus(AliPIDResponse::EDetector det) const; private: TClonesArray fArrNsigmas; // array to store nsigma values of all detectors TClonesArray fArrRawProbabilities; // array to strore raw probabilities of all detectors ClassDef(AliDetectorPID,1); //Store raw probabilities and nsigmas for all detectors }; #endif
50.211538
159
0.675986
c7a8c9a7f16a2747106cdbf06d1d9d177f8f40ff
72
sql
SQL
src/main/resources/db/migration/V1_7__add_public_key_to_pending_authorisations.sql
cryptofiat/account-identity
bd787626fc72e7ae0e42ad23af851441f00971eb
[ "MIT" ]
3
2016-10-07T11:38:45.000Z
2021-11-11T23:53:53.000Z
src/main/resources/db/migration/V1_7__add_public_key_to_pending_authorisations.sql
cryptofiat/account-identity
bd787626fc72e7ae0e42ad23af851441f00971eb
[ "MIT" ]
16
2016-10-02T04:54:51.000Z
2017-09-09T09:10:25.000Z
src/main/resources/db/migration/V1_7__add_public_key_to_pending_authorisations.sql
kryptoeuro/accountmapper
bd787626fc72e7ae0e42ad23af851441f00971eb
[ "MIT" ]
3
2016-10-07T11:43:08.000Z
2021-11-11T23:53:56.000Z
ALTER TABLE pending_authorisation ADD public_key VARCHAR(130) NOT NULL;
36
71
0.847222
de1367ec80f17f4ac06827145a8b515a42ba0e4d
143
rs
Rust
src/test/run-pass/issues/issue-42007.rs
komaeda/rust
b2c6b8c29f13f8d1f242da89e587960b95337819
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
10
2019-04-27T00:58:42.000Z
2021-11-14T17:09:19.000Z
src/test/run-pass/issues/issue-42007.rs
komaeda/rust
b2c6b8c29f13f8d1f242da89e587960b95337819
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
25
2018-10-18T13:45:54.000Z
2019-03-23T19:38:49.000Z
src/test/run-pass/issues/issue-42007.rs
komaeda/rust
b2c6b8c29f13f8d1f242da89e587960b95337819
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
1
2021-06-03T03:50:59.000Z
2021-06-03T03:50:59.000Z
// run-pass #![allow(dead_code)] // aux-build:issue_42007_s.rs extern crate issue_42007_s; enum I { E(issue_42007_s::E), } fn main() {}
11.916667
29
0.657343
a1e50efcb26ec8fc86cc569e68820664a9b25718
1,753
h
C
MATLAB/source/cuda/smi_cuda_gaussMLEv2/GPUgaussLib.h
LidkeLab/smite
295e7528fd362a25eac99a3043688d173419f327
[ "MIT" ]
1
2022-03-25T20:14:45.000Z
2022-03-25T20:14:45.000Z
MATLAB/source/cuda/smi_cuda_gaussMLEv2/GPUgaussLib.h
LidkeLab/smite
295e7528fd362a25eac99a3043688d173419f327
[ "MIT" ]
null
null
null
MATLAB/source/cuda/smi_cuda_gaussMLEv2/GPUgaussLib.h
LidkeLab/smite
295e7528fd362a25eac99a3043688d173419f327
[ "MIT" ]
null
null
null
/*! * \file GPUgaussLib.h * \author Keith Lidke * \date January 10, 2010 * \brief Prototypes for all the Cuda helper functions. */ // This code provides a set of functions that can be called from inside // NVIDIA CUDA Kernels. #ifndef GPUGAUSSLIB_H #define GPUGAUSSLIB_H __device__ char d_assert[1024]; __device__ float kernel_IntGauss1D(const int ii, const float x, const float sigma); __device__ float kernel_alpha(const float z, const float Ax, const float Bx, const float d); __device__ float kernel_dalphadz(const float z, const float Ax, const float Bx, const float d); __device__ float kernel_d2alphadz2(const float z, const float Ax, const float Bx, const float d); __device__ void kernel_DerivativeIntGauss1D(const int ii, const float x, const float sigma, const float N, const float PSFy, float *dudt, float *d2udt2); __device__ void kernel_DerivativeIntGauss1DSigma(const int ii, const float x, const float Sx, const float N, const float PSFy, float *dudt, float *d2udt2); __device__ void kernel_DerivativeIntGauss2DSigma(const int ii, const int jj, const float x, const float y, const float S, const float N, const float PSFx, const float PSFy, float *dudt, float *d2udt2); __device__ void kernel_DerivativeIntGauss2Dz(const int ii, const int jj, const float *theta, const float PSFSigma_x, const float PSFSigma_y, const float Ax, const float Ay, const float Bx, const float By, const float gamma, const float d, float *pPSFx, float *pPSFy, float *dudt, float *d2udt2); __device__ void kernel_CenterofMass2D(const int sz, const float *data, float *x, float *y); __device__ void kernel_GaussFMaxMin2D(const int sz, const float sigma, const float * data, float *MaxN, float *MinBG); #endif
43.825
124
0.757558
53adacfef83eab7925089602526faebb5c81dde3
6,940
java
Java
bundles/activity/impl/src/main/java/org/sakaiproject/nakamura/activity/routing/ContactsActivityRouter.java
jfederico/nakamura
2001c7cddc7d0ab53a2d09b5b6a0b4db38ac33f1
[ "Apache-2.0" ]
1
2016-12-11T12:03:13.000Z
2016-12-11T12:03:13.000Z
bundles/activity/impl/src/main/java/org/sakaiproject/nakamura/activity/routing/ContactsActivityRouter.java
jfederico/nakamura
2001c7cddc7d0ab53a2d09b5b6a0b4db38ac33f1
[ "Apache-2.0" ]
null
null
null
bundles/activity/impl/src/main/java/org/sakaiproject/nakamura/activity/routing/ContactsActivityRouter.java
jfederico/nakamura
2001c7cddc7d0ab53a2d09b5b6a0b4db38ac33f1
[ "Apache-2.0" ]
null
null
null
/** * Licensed to the Sakai Foundation (SF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The SF 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 org.sakaiproject.nakamura.activity.routing; import org.apache.felix.scr.annotations.Component; import org.apache.felix.scr.annotations.Reference; import org.apache.felix.scr.annotations.Service; import org.apache.sling.jcr.base.util.AccessControlUtil; import org.sakaiproject.nakamura.api.activity.AbstractActivityRoute; import org.sakaiproject.nakamura.api.activity.ActivityConstants; import org.sakaiproject.nakamura.api.activity.ActivityRoute; import org.sakaiproject.nakamura.api.activity.ActivityRouter; import org.sakaiproject.nakamura.api.activity.ActivityUtils; import org.sakaiproject.nakamura.api.connections.ConnectionManager; import org.sakaiproject.nakamura.api.connections.ConnectionState; import org.sakaiproject.nakamura.api.lite.StorageClientException; import org.sakaiproject.nakamura.api.lite.StorageClientUtils; import org.sakaiproject.nakamura.api.lite.accesscontrol.AccessDeniedException; import org.sakaiproject.nakamura.api.lite.accesscontrol.Permissions; import org.sakaiproject.nakamura.api.lite.accesscontrol.Security; import org.sakaiproject.nakamura.api.lite.authorizable.Authorizable; import org.sakaiproject.nakamura.api.lite.authorizable.AuthorizableManager; import org.sakaiproject.nakamura.api.lite.content.Content; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.List; import javax.jcr.Node; import javax.jcr.RepositoryException; import javax.jcr.Session; import javax.jcr.SimpleCredentials; import javax.jcr.security.AccessControlManager; import javax.jcr.security.Privilege; /** * This router will deliver an activity to the feed of all the contacts of the actor. It * will only deliver if the contact has READ access on the node where the activity was * performed on. */ @Component(immediate = true, enabled = true) @Service(value = ActivityRouter.class) public class ContactsActivityRouter implements ActivityRouter { @Reference protected ConnectionManager connectionManager; private static final Logger LOGGER = LoggerFactory .getLogger(ContactsActivityRouter.class); /** * {@inheritDoc} * * @see org.sakaiproject.nakamura.api.activity.ActivityRouter#getPriority() */ public int getPriority() { // The priority for this router isn't really important.. return 0; } /** * {@inheritDoc} * * @see org.sakaiproject.nakamura.api.activity.ActivityRouter#route(javax.jcr.Node, * java.util.List) */ public void route(Node activity, List<ActivityRoute> routes) { try { Session adminSession = activity.getSession(); String activityFeedPath = null; String actor = activity.getProperty(ActivityConstants.PARAM_ACTOR_ID) .getString(); List<String> connections = connectionManager.getConnectedUsers(StorageClientUtils.adaptToSession(adminSession), actor, ConnectionState.ACCEPTED); if (connections != null && connections.size() > 0) { String activityPath = activity.getPath(); AccessControlManager adminACM = AccessControlUtil .getAccessControlManager(adminSession); Privilege readPriv = adminACM.privilegeFromName("jcr:read"); Privilege[] privs = new Privilege[] { readPriv }; for (String connection : connections) { // Check if this connection has READ access on the path. boolean allowCopy = true; Session userSession = null; try { final SimpleCredentials credentials = new SimpleCredentials( connection, "foo".toCharArray()); userSession = adminSession.impersonate(credentials); AccessControlManager userACM = AccessControlUtil .getAccessControlManager(userSession); allowCopy = userACM.hasPrivileges(activityPath, privs); } finally { // We no longer need this session anymore, release it. userSession.logout(); } if (allowCopy) { // Get the activity feed for this contact and deliver it. activityFeedPath = ActivityUtils.getUserFeed(connection); ActivityRoute route = new AbstractActivityRoute(activityFeedPath) { }; routes.add(route); } } } } catch (RepositoryException e) { LOGGER.error( "Exception when trying to deliver an activity to contacts feed.", e); } } public void route(Content activity, List<ActivityRoute> routes, org.sakaiproject.nakamura.api.lite.Session adminSession) { try { String activityFeedPath = null; String actor = (String) activity.getProperty(ActivityConstants.PARAM_ACTOR_ID); List<String> connections = connectionManager.getConnectedUsers(adminSession, actor, ConnectionState.ACCEPTED); org.sakaiproject.nakamura.api.lite.accesscontrol.AccessControlManager accessControlManager = adminSession.getAccessControlManager(); AuthorizableManager authorizableManager = adminSession.getAuthorizableManager(); if (connections != null && connections.size() > 0) { String activityPath = activity.getPath(); for (String connection : connections) { // Check if this connection has READ access on the path. try { Authorizable authorizable = authorizableManager.findAuthorizable(connection); boolean allowCopy = accessControlManager.can(authorizable, Security.ZONE_CONTENT, activityPath, Permissions.CAN_READ); if (allowCopy) { // Get the activity feed for this contact and deliver it. activityFeedPath = ActivityUtils.getUserFeed(connection); ActivityRoute route = new AbstractActivityRoute(activityFeedPath) { }; routes.add(route); } } catch ( StorageClientException e) { LOGGER.error(e.getMessage(),e); } catch (AccessDeniedException e) { LOGGER.error(e.getMessage(),e); } } } } catch (StorageClientException e) { LOGGER.error( "Exception when trying to deliver an activity to contacts feed.", e); } } }
42.060606
138
0.71513