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
29e4c775ce1631f78ac5ec1e426a1a53ff260a5b
1,520
rs
Rust
2019/day-6/day6/src/main.rs
Petrosz007/advent-of-code
f779bc8810dad22aacbbee3951dafa7507af7bd6
[ "MIT" ]
null
null
null
2019/day-6/day6/src/main.rs
Petrosz007/advent-of-code
f779bc8810dad22aacbbee3951dafa7507af7bd6
[ "MIT" ]
null
null
null
2019/day-6/day6/src/main.rs
Petrosz007/advent-of-code
f779bc8810dad22aacbbee3951dafa7507af7bd6
[ "MIT" ]
null
null
null
use std::collections::HashMap; fn part1_bfs<'a>(u: &'a str, graph: &HashMap<&'a str, Vec<&'a str>>, visited: &mut HashMap<&'a str, bool>, dist: u32) -> u32 { if visited[u] { return 0; } visited.insert(u, true); let mut sum = dist; for v in graph.get(u).unwrap() { sum += part1_bfs(v, &graph, visited, dist + 1); } sum } fn part2_bfs<'a>(u: &'a str, graph: &HashMap<&'a str, Vec<&'a str>>, visited: &mut HashMap<&'a str, bool>, dist: u32) -> u32 { visited.insert(u, true); let mut san_dist = 0; for v in graph.get(u).unwrap() { if v == &"SAN" { return dist; } if !visited[v] { san_dist += part2_bfs(v, &graph, visited, dist + 1); } } san_dist } fn main() { let contents = std::fs::read_to_string("input.txt") .expect("Error opening file!"); let mut graph: HashMap<&str, Vec<&str>> = HashMap::new(); let mut visited: HashMap<&str, bool > = HashMap::new(); for edge in contents.lines() { let uv: Vec<&str> = edge.split(")").collect(); graph.entry(uv[0]).or_insert(Vec::new()).push(uv[1]); graph.entry(uv[1]).or_insert(Vec::new()).push(uv[0]); visited.insert(uv[0], false); visited.insert(uv[1], false); } println!("Part 1: {}", part1_bfs("COM", &graph, &mut visited, 0)); for v in visited.values_mut() { *v = false; } println!("Part 2: {}", part2_bfs("YOU", &graph, &mut visited, 0) - 1); }
26.206897
126
0.532895
eb638843e993dbd50caffebb58afd5342bff21d7
58,973
css
CSS
src/assets/fonts/iconfont/iconfont.css
SJYsun/fcsample
146bfba1564f083c89d2b244af0f6025c8d91952
[ "MIT" ]
1
2018-04-25T08:06:14.000Z
2018-04-25T08:06:14.000Z
src/assets/fonts/iconfont/iconfont.css
zhaopeiyan/Easyfcexample
9c26f62adf59522cc6d893532cf0458412d551dd
[ "MIT" ]
null
null
null
src/assets/fonts/iconfont/iconfont.css
zhaopeiyan/Easyfcexample
9c26f62adf59522cc6d893532cf0458412d551dd
[ "MIT" ]
null
null
null
@font-face {font-family: "iconfont"; src: url('iconfont.eot?t=1524889468689'); /* IE9*/ src: url('iconfont.eot?t=1524889468689#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('data:application/x-font-woff;charset=utf-8;base64,d09GRgABAAAAAIwgAAsAAAAA4KgAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADMAAABCsP6z7U9TLzIAAAE8AAAARAAAAFZYPEt6Y21hcAAAAYAAAA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h6d/z5InhaAaKZPekrHRV5PMT/SyI3q281plx4wIVhPbhvKcPikf2hLlSqMk5MEoH07RNk5eFW2at5VIPwlnTMacKf35595QjXN11siR29v7D9x390kAAA==') format('woff'), url('iconfont.ttf?t=1524889468689') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/ url('iconfont.svg?t=1524889468689#iconfont') format('svg'); /* iOS 4.1- */ } .iconfont { font-family:"iconfont" !important; font-size:16px; font-style:normal; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .fc-icon-leave:before { content: "\e619"; } .fc-icon-get:before { content: "\e632"; } .fc-icon-update:before { content: "\e657"; } .fc-icon-icitem:before { content: "\e6ab"; } .fc-icon-definition:before { content: "\e660"; } .fc-icon-icbackout:before { content: "\e762"; } .fc-icon-shounawenjian:before { content: "\e704"; } .fc-icon-interest:before { content: "\e96a"; } .fc-icon-fall:before { content: "\e668"; } .fc-icon-shut:before { content: "\e65b"; } .fc-icon-request:before { content: "\e65d"; } .fc-icon-iccancel:before { content: "\e66f"; } .fc-icon-icsplit:before { content: "\e6e4"; } .fc-icon-note:before { content: "\e6ea"; } .fc-icon-bgefficiency:before { content: "\e792"; } .fc-icon-refresh:before { content: "\e60b"; } .fc-icon-verification:before { content: "\e641"; } .fc-icon-reset:before { content: "\e60d"; } .fc-icon-bgsystem:before { content: "\e67f"; } .fc-icon-unit:before { content: "\e64d"; } .fc-icon-collect:before { content: "\e726"; } .fc-icon-drive:before { content: "\e727"; } .fc-icon-bgcustom:before { content: "\e680"; } .fc-icon-icreport:before { content: "\e685"; } .fc-icon-caozuorizhi:before { content: "\e662"; } .fc-icon-dictionaries:before { content: "\e692"; } .fc-icon-produce:before { content: "\e640"; } .fc-icon-dict:before { content: "\e63f"; } .fc-icon-corresponding:before { content: "\e643"; } .fc-icon-product:before { content: "\e783"; } .fc-icon-submit:before { content: "\e6a0"; } .fc-icon-bgtheme:before { content: "\e6a3"; } .fc-icon-one:before { content: "\e605"; } .fc-icon-right:before { content: "\e67d"; } .fc-icon-left:before { content: "\e67e"; } .fc-icon-state:before { content: "\e654"; } .fc-icon-iccomposite:before { content: "\e69e"; } .fc-icon-attributes:before { content: "\e728"; } .fc-icon-sc:before { content: "\e7ae"; } .fc-icon-property:before { content: "\e818"; } .fc-icon-contract:before { content: "\e600"; } .fc-icon-foundation:before { content: "\e627"; } .fc-icon-pixel:before { content: "\e658"; } .fc-icon-icaccrual:before { content: "\e686"; } .fc-icon-bgmaintain:before { content: "\e681"; } .fc-icon-backtrack:before { content: "\e630"; } .fc-icon-icrecord:before { content: "\e687"; } .fc-icon-dictionary:before { content: "\e694"; } .fc-icon-parameter:before { content: "\e6b4"; } .fc-icon-detail:before { content: "\e631"; } .fc-icon-detailed:before { content: "\e647"; } .fc-icon-record:before { content: "\e650"; } .fc-icon-send:before { content: "\e655"; } .fc-icon-icsubmit:before { content: "\e688"; } .fc-icon-advanced:before { content: "\e665"; } .fc-icon-visit:before { content: "\e667"; } .fc-icon-bglist:before { content: "\e682"; } .fc-icon-file:before { content: "\e666"; } .fc-icon-icmerge:before { content: "\e689"; } .fc-icon-iccount:before { content: "\e68b"; } .fc-icon-encounter:before { content: "\e6ae"; } .fc-icon-wiki:before { content: "\e672"; } .fc-icon-port:before { content: "\e68a"; } .fc-icon-check:before { content: "\e652"; } .fc-icon-category:before { content: "\e65c"; } .fc-icon-audit:before { content: "\e62e"; } .fc-icon-basic:before { content: "\e6ef"; } .fc-icon-bgsearch:before { content: "\e683"; } .fc-icon-icproject:before { content: "\e68c"; } .fc-icon-repository:before { content: "\e70e"; } .fc-icon-theme:before { content: "\e946"; } .fc-icon-change:before { content: "\e64a"; } .fc-icon-present:before { content: "\e66b"; } .fc-icon-zuo:before { content: "\e64b"; } .fc-icon-list:before { content: "\e69c"; } .fc-icon-start:before { content: "\e6a2"; } .fc-icon-revocation:before { content: "\e6a7"; } .fc-icon-endorse:before { content: "\e61c"; } .fc-icon-cookies:before { content: "\e693"; } .fc-icon-home:before { content: "\e684"; } .fc-icon-statement:before { content: "\e61f"; } .fc-icon-loading:before { content: "\e66e"; } .fc-icon-add:before { content: "\e623"; } .fc-icon-report:before { content: "\e642"; } .fc-icon-delete:before { content: "\e602"; } .fc-icon-log:before { content: "\e644"; } .fc-icon-icsecede:before { content: "\e68d"; } .fc-icon-dispatch:before { content: "\e611"; } .fc-icon-dialogue:before { content: "\e65a"; } .fc-icon-layout:before { content: "\e6c7"; } .fc-icon-register:before { content: "\e6d6"; } .fc-icon-icelect:before { content: "\e6c5"; } .fc-icon-tool:before { content: "\e626"; } .fc-icon-toolbar:before { content: "\e615"; } .fc-icon-metadata:before { content: "\e639"; } .fc-icon-icaffix:before { content: "\e68e"; } .fc-icon-basics:before { content: "\e670"; } .fc-icon-sms:before { content: "\e69d"; } .fc-icon-chart:before { content: "\e625"; } .fc-icon-bgadjust:before { content: "\e697"; } .fc-icon-analyze:before { content: "\e616"; } .fc-icon-total:before { content: "\e624"; } .fc-icon-software:before { content: "\e646"; } .fc-icon-query:before { content: "\e60f"; } .fc-icon-icstatistics:before { content: "\e698"; } .fc-icon-verify:before { content: "\e637"; } .fc-icon-invoice:before { content: "\e634"; } .fc-icon-everyday:before { content: "\e7b5"; } .fc-icon-icmonitoring:before { content: "\e7c4"; } .fc-icon-unfold:before { content: "\e71f"; } .fc-icon-pack:before { content: "\e720"; } .fc-icon-save:before { content: "\e62c"; } .fc-icon-make:before { content: "\e659"; } .fc-icon-liquidate:before { content: "\e638"; } .fc-icon-area:before { content: "\e62a"; } .fc-icon-document:before { content: "\e628"; } .fc-icon-information:before { content: "\e606"; } .fc-icon-developer:before { content: "\e70f"; } .fc-icon-bgdimensionality:before { content: "\e6af"; } .fc-icon-lock:before { content: "\e677"; } .fc-icon-name:before { content: "\e679"; } .fc-icon-cipher:before { content: "\e676"; } .fc-icon-bginformation:before { content: "\e6b0"; } .fc-icon-return:before { content: "\e64c"; } .fc-icon-grouping:before { content: "\e617"; } .fc-icon-connector:before { content: "\e60a"; } .fc-icon-block:before { content: "\e633"; } .fc-icon-limits:before { content: "\e610"; } .fc-icon-copy:before { content: "\e62d"; } .fc-icon-newly:before { content: "\e674"; } .fc-icon-help:before { content: "\e63a"; } .fc-icon-icdeprecition:before { content: "\e699"; } .fc-icon-icrepeal:before { content: "\e69a"; } .fc-icon-even:before { content: "\e67b"; } .fc-icon-picture:before { content: "\e645"; } .fc-icon-multiSelect:before { content: "\e690"; } .fc-icon-Stick:before { content: "\e691"; } .fc-icon-shrink:before { content: "\e695"; } .fc-icon-magnify:before { content: "\e696"; } .fc-icon-data:before { content: "\e61e"; } .fc-icon-allocation:before { content: "\e635"; } .fc-icon-iccheck:before { content: "\e6e8"; } .fc-icon-construction:before { content: "\e67c"; } .fc-icon-close:before { content: "\e7b7"; } .fc-icon-preview:before { content: "\e7b9"; } .fc-icon-menu:before { content: "\e61b"; } .fc-icon-temporary:before { content: "\e8c8"; } .fc-icon-bgscreen:before { content: "\e8d7"; } .fc-icon-wrong:before { content: "\e8e8"; } .fc-icon-addition:before { content: "\e68f"; } .fc-icon-bgrailway:before { content: "\e6d2"; } .fc-icon-creators:before { content: "\e675"; } .fc-icon-bgbeonduty:before { content: "\e6b1"; } .fc-icon-icstate:before { content: "\e69b"; } .fc-icon-order:before { content: "\e64e"; } .fc-icon-amend:before { content: "\e608"; } .fc-icon-bgunit:before { content: "\e6b2"; } .fc-icon-bgperiod:before { content: "\e6b3"; } .fc-icon-endorsed:before { content: "\e6e2"; } .fc-icon-examine:before { content: "\e6f4"; } .fc-icon-letter:before { content: "\e73a"; } .fc-icon-cache:before { content: "\e73c"; } .fc-icon-function:before { content: "\e629"; } .fc-icon-method:before { content: "\e603"; } .fc-icon-listmodule:before { content: "\e62f"; } .fc-icon-icinquire:before { content: "\e745"; } .fc-icon-celerity:before { content: "\e612"; } .fc-icon-carry:before { content: "\e656"; } .fc-icon-answer:before { content: "\e618"; } .fc-icon-navigation:before { content: "\e66c"; } .fc-icon-modal:before { content: "\e678"; } .fc-icon-bgsubject:before { content: "\e6b5"; } .fc-icon-serve:before { content: "\e61d"; } .fc-icon-demand:before { content: "\e636"; } .fc-icon-new:before { content: "\e620"; } .fc-icon-bgauthorized:before { content: "\e6b6"; } .fc-icon-notice:before { content: "\e67a"; } .fc-icon-service:before { content: "\e622"; } .fc-icon-creditor:before { content: "\e621"; } .fc-icon-lead:before { content: "\e63b"; } .fc-icon-derive:before { content: "\e63e"; } .fc-icon-icalter:before { content: "\e69f"; } .fc-icon-date:before { content: "\e6e3"; } .fc-icon-logout:before { content: "\e66d"; } .fc-icon-withdraw:before { content: "\e669"; } .fc-icon-icannul:before { content: "\e6a1"; } .fc-icon-shenhetongguo:before { content: "\e613"; } .fc-icon-assess:before { content: "\e63c"; } .fc-icon-personnel:before { content: "\e62b"; } .fc-icon-bgclassify:before { content: "\e6b7"; } .fc-icon-account:before { content: "\e754"; } .fc-icon-uploading:before { content: "\e788"; } .fc-icon-refer:before { content: "\e673"; } .fc-icon-vertical:before { content: "\e604"; } .fc-icon-level:before { content: "\e607"; } .fc-icon-users:before { content: "\e614"; } .fc-icon-jurisdiction:before { content: "\e61a"; } .fc-icon-chat:before { content: "\e661"; } .fc-icon-icputin:before { content: "\e6fb"; } .fc-icon-gather:before { content: "\e648"; } .fc-icon-introductions:before { content: "\e63d"; } .fc-icon-relation:before { content: "\e60c"; } .fc-icon-pulldown:before { content: "\e6d9"; } .fc-icon-module:before { content: "\e609"; } .fc-icon-icbackroll:before { content: "\e6a4"; } .fc-icon-icmessage:before { content: "\e6a5"; } .fc-icon-icdetail:before { content: "\e6a6"; } .fc-icon-icoperation:before { content: "\e6a8"; } .fc-icon-inquire:before { content: "\e60e"; } .fc-icon-iccompany:before { content: "\e6a9"; } .fc-icon-risk:before { content: "\e601"; } .fc-icon-nhs:before { content: "\e64f"; } .fc-icon-icdeprec:before { content: "\e6aa"; } .fc-icon-clear:before { content: "\e649"; } .fc-icon-icparticulars:before { content: "\e6ac"; } .fc-icon-dd:before { content: "\e651"; } .fc-icon-system:before { content: "\e653"; } .fc-icon-hold:before { content: "\e65f"; } .fc-icon-keep:before { content: "\e65e"; } .fc-icon-sql:before { content: "\e663"; } .fc-icon-role:before { content: "\e671"; } .fc-icon-icInterest:before { content: "\e6ad"; } .fc-icon-good:before { content: "\e664"; } .fc-icon-gejo:before { content: "\e66a"; }
126.551502
47,907
0.904923
c47621d6b4f0c61a6c33fc2c834f9f42419536c9
5,217
cpp
C++
OGDF/src/ogdf/fileformats/xml/Lexer.cpp
shahnidhi/MetaCarvel
f3bea5fdbbecec4c9becc6bbdc9585a939eb5481
[ "MIT" ]
13
2017-12-21T03:35:41.000Z
2022-01-31T13:45:25.000Z
OGDF/src/ogdf/fileformats/xml/Lexer.cpp
shahnidhi/MetaCarvel
f3bea5fdbbecec4c9becc6bbdc9585a939eb5481
[ "MIT" ]
7
2017-09-13T01:31:24.000Z
2021-12-14T00:31:50.000Z
OGDF/src/ogdf/fileformats/xml/Lexer.cpp
shahnidhi/MetaCarvel
f3bea5fdbbecec4c9becc6bbdc9585a939eb5481
[ "MIT" ]
15
2017-09-07T18:28:55.000Z
2022-01-18T14:17:43.000Z
/** \file * \brief Implementation of simple XML lexer. * * \author Łukasz Hanuszczak * * \par License: * This file is part of the Open Graph Drawing Framework (OGDF). * * \par * Copyright (C)<br> * See README.txt in the root directory of the OGDF installation for details. * * \par * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * Version 2 or 3 as published by the Free Software Foundation; * see the file LICENSE.txt included in the packaging of this file * for details. * * \par * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * \par * You should have received a copy of the GNU General Public * License along with this program; if not, write to the Free * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. * * \see http://www.gnu.org/copyleft/gpl.html ***************************************************************/ #include <ogdf/fileformats/xml/Lexer.h> namespace ogdf { namespace xml { Lexer::Lexer() : m_input(nullptr) { } Lexer::Lexer(std::istream &is) { setInput(is); } void Lexer::setInput(std::istream &is) { m_input = &is; // Input changes, so we need to reset our position... m_row = 1; m_column = 0; // ... and reset the buffer. m_buffer_begin = 0; m_buffer_size = 0; } xml::token Lexer::nextToken() { while (skipWhitespace() || skipComments()) { } if (buffer_empty()) { buffer_put(m_input->get()); } switch (buffer_peek()) { case '<': m_token = token::chevron_left; buffer_pop(); break; case '>': m_token = token::chevron_right; buffer_pop(); break; case '?': m_token = token::questionMark; buffer_pop(); break; case '=': m_token = token::assignment; buffer_pop(); break; case '/': m_token = token::slash; buffer_pop(); break; case '"': case '\'': consumeString(); break; case EOF: /* * TODO: Replace EOF with std::char_traits<char>::eof() once VS * will learn what "constexpr" is. */ m_token = token::eof; buffer_pop(); break; default: consumeIdentifier(); break; } return m_token; } bool Lexer::skipWhitespace() { bool consumed = false; for (;;) { if (buffer_empty()) { buffer_put(m_input->get()); } char current = buffer_peek(); // TODO: Replace it with std::isspace in the future. if (!isspace(current)) { break; } buffer_pop(); consumed = true; } return consumed; } bool Lexer::skipComments() { // We need to ensure that we have enough characters in the buffer. switch (buffer_size()) { case 0: buffer_put(m_input->get()); case 1: buffer_put(m_input->get()); case 2: buffer_put(m_input->get()); case 3: buffer_put(m_input->get()); } // We have a comment iff it begins with '<!--' sequence. if (!(buffer_at(0) == '<' && buffer_at(1) == '!' && buffer_at(2) == '-' && buffer_at(3) == '-')) { return false; } buffer_pop(); buffer_pop(); buffer_pop(); buffer_pop(); for (;;) { // TODO: Handle unclosed comments. // As above, we enusre that we have enough characters available. switch (buffer_size()) { case 0: buffer_put(m_input->get()); case 1: buffer_put(m_input->get()); case 2: buffer_put(m_input->get()); } // The comment ends only with the '-->' sequence. if (buffer_at(0) == '-' && buffer_at(1) == '-' && buffer_at(2) == '>') { buffer_pop(); buffer_pop(); buffer_pop(); break; } buffer_pop(); } return true; } void Lexer::consumeText() { m_value = ""; for (;;) { while (skipComments()) { } if (buffer_empty()) { buffer_put(m_input->get()); } char current = buffer_peek(); // TODO: Escape '&lt;' and '&gt;' as '<' and '>'; if (current == '<' || current == '>' || current == std::char_traits<char>::eof()) { break; } m_value.push_back(buffer_pop()); } } void Lexer::consumeString() { m_value = ""; char delim = buffer_pop(); for (;;) { if (buffer_empty()) { buffer_put(m_input->get()); } char current = buffer_peek(); if (current == delim) { buffer_pop(); break; } if (current == std::char_traits<char>::eof()) { break; } m_value.push_back(buffer_pop()); } m_token = token::string; } void Lexer::consumeIdentifier() { m_value = ""; for (;;) { if (buffer_empty()) { buffer_put(m_input->get()); } char current = buffer_peek(); /* * The XML spec allows much narrower set of valid identifiers, but * I see not charm in accepting some of the malformed identifiers * since the parser is not very strict about standard too. */ // TODO: Replace it with std::isspace in the future. if (isspace(current) || current == '<' || current == '>' || current == '=' || current == '/' || current == '?' || current == '"' || current == '\'' || current == std::char_traits<char>::eof()) { break; } m_value.push_back(buffer_pop()); } m_token = token::identifier; } } }
17.989655
77
0.608396
6a7101835665310526da2caa394a2afb4600ea5c
357
swift
Swift
swift/Fch_Contact/Fch_Contact/AppClasses/Model/DeptModel.swift
february29/Learning
e909fd0a10b1a6d2ba6847e5821233548a778508
[ "MIT" ]
null
null
null
swift/Fch_Contact/Fch_Contact/AppClasses/Model/DeptModel.swift
february29/Learning
e909fd0a10b1a6d2ba6847e5821233548a778508
[ "MIT" ]
4
2021-03-09T04:53:30.000Z
2022-02-26T11:14:26.000Z
swift/Fch_Contact/Fch_Contact/AppClasses/Model/DeptModel.swift
february29/Learning
e909fd0a10b1a6d2ba6847e5821233548a778508
[ "MIT" ]
null
null
null
// // DeptModel.swift // Fch_Contact // // Created by bai on 2017/12/1. // Copyright © 2017年 北京仙指信息技术有限公司. All rights reserved. // import UIKit import HandyJSON class DeptModel:HandyJSON { required init() { } var id : Int! var book_id : Int! var name : String! var sort : Int! var deleted : Int! }
13.730769
56
0.579832
2f0ba6debc9b284d1bc658077558a1eeacf535ad
6,073
js
JavaScript
pages/edit-product.js
Spop08/shopify-metafields-app
9bcecce311727f1818678955b4efa0d41dd79c6a
[ "MIT" ]
44
2020-04-24T12:38:57.000Z
2022-01-27T07:10:48.000Z
pages/edit-product.js
Spop08/shopify-metafields-app
9bcecce311727f1818678955b4efa0d41dd79c6a
[ "MIT" ]
null
null
null
pages/edit-product.js
Spop08/shopify-metafields-app
9bcecce311727f1818678955b4efa0d41dd79c6a
[ "MIT" ]
3
2020-09-28T17:13:48.000Z
2022-02-08T23:36:28.000Z
import React from "react"; import { Card, List, Page, Thumbnail, TextField, Layout, Button, Heading, Subheading, ButtonGroup, Icon, AppProvider, ContextualSaveBar, Frame } from "@shopify/polaris"; import { DeleteMinor } from "@shopify/polaris-icons"; import { Redirect } from "@shopify/app-bridge/actions"; import { Context } from "@shopify/app-bridge-react"; import gql from "graphql-tag"; import store from "store-js"; import MetafieldCard from "../components/MetafieldCard"; import Cookies from "js-cookie"; const ACCESSTOKEN = Cookies.get("ACCESSTOKEN"); class EditProduct extends React.Component { static contextType = Context; state = { id: "", price: "", title: "", image: "", metafields: [], newcount: 0 }; async componentDidMount() { const item = store.get("item"); const image = item.images.edges[0] ? item.images.edges[0].node.originalSrc : ""; const price = item.variants.edges[0].node.price; const title = item.title; const id = item.id; console.log("TITLE", title); const response = await this.GetMetaFields(title); var metafields = []; response.forEach(item => { metafields.push(item.node); }); console.log("METAFIELDS", metafields); this.setState({ price, image, title, id, metafields }); } UpdateMetaFields = async (id, metafields) => { const UPDATE_METAFIELDS = JSON.stringify({ query: `mutation($input: ProductInput!) { productUpdate(input:$input) { userErrors { field message } } }`, variables: { input: { id: id, metafields: metafields } } }); const response = await this.Fetch_GraphQL(UPDATE_METAFIELDS); return response; }; GetMetaFields = async title => { const GET_METAFIELDS = JSON.stringify({ query: `{ productByHandle(handle: "${title}") { metafields(first: 10) { edges { node { key value valueType namespace id } } } } }` }); const response = await this.Fetch_GraphQL(GET_METAFIELDS); return response.data.productByHandle.metafields.edges; }; Fetch_GraphQL = async fields => { const response = await fetch( `https://cors-anywhere.herokuapp.com/https://granitedevstore2.myshopify.com/admin/api/2019-07/graphql.json`, { method: "POST", headers: { "Content-Type": "application/json", "X-Shopify-Access-Token": ACCESSTOKEN }, body: fields } ); const responseJson = await response.json(); return responseJson; }; valueChange = (id, value) => { var metafields = [...this.state.metafields]; const index = metafields.findIndex(item => item.id === id); metafields[index].value = value; this.setState({ metafields }); }; valuetypeChange = (id, value) => { var metafields = [...this.state.metafields]; const index = metafields.findIndex(item => item.id === id); metafields[index].valueType = value; this.setState({ metafields }); }; keyChange = (id, value) => { var metafields = [...this.state.metafields]; const index = metafields.findIndex(item => item.id === id); metafields[index].key = value; this.setState({ metafields }); }; namespaceChange = (id, value) => { var metafields = [...this.state.metafields]; const index = metafields.findIndex(item => item.id === id); metafields[index].namespace = value; this.setState({ metafields }); }; handleCreate = async () => { var metafields = [...this.state.metafields]; const newcount = this.state.newcount; metafields.push({ key: "", value: "", valueType: "", namespace: "", id: newcount, enabled: true }); this.setState({ metafields, newcount: newcount + 1 }); }; handleSave = async () => { console.log("Save clicked"); const { metafields, id } = this.state; var up_metafields = []; metafields.map(item => { item.enabled === undefined ? up_metafields.push({ id: item.id, value: item.value }) : up_metafields.push({ key: item.key, value: item.value, valueType: item.valueType, namespace: item.namespace }); }); console.log("AR_METAFIELS", up_metafields); const response = await this.UpdateMetaFields(id, up_metafields); console.log("SET RESPONSE", response); this.redirectToProduct(); }; redirectToProduct = () => { const app = this.context; const redirect = Redirect.create(app); redirect.dispatch(Redirect.Action.APP, "/index"); }; render() { console.log(this.state); const { title, image, metafields } = this.state; const card_section = metafields.map((item, index) => { return ( <MetafieldCard item={item} index={index} key={item.id} valueChange={this.valueChange} valuetypeChange={this.valuetypeChange} keyChange={this.keyChange} namespaceChange={this.namespaceChange} /> ); }); return ( <Page breadcrumbs={[ { content: "Products", onAction: this.redirectToProduct } ]} title={title} thumbnail={<Thumbnail source={image} />} primaryAction={[ { content: "Save", id: "btn-save", onAction: this.handleSave }, { content: "Cancel", id: "btn-cancel", onAction: this.redirectToProduct } ]} > <Card>{card_section}</Card> <div className="right-align"> <ButtonGroup> <Button primary onClick={this.handleSave}> Save </Button> <Button onClick={this.redirectToProduct}>Cancel</Button> <Button onClick={this.handleCreate}>Create metafield</Button> </ButtonGroup> </div> </Page> ); } } export default EditProduct;
25.733051
114
0.586366
da11edd32372f8cc5f38d1c762daa5bf8aa89a15
1,917
php
PHP
ignition_application/views/admin/blog/list.php
rewphus/tidbitsdev
cbe806516c83cd0d4ba601425fc13601d5c44a86
[ "MIT" ]
20
2015-01-07T03:23:02.000Z
2020-06-02T20:38:49.000Z
ignition_application/views/admin/blog/list.php
rewphus/tidbitsdev
cbe806516c83cd0d4ba601425fc13601d5c44a86
[ "MIT" ]
57
2015-01-01T13:10:50.000Z
2017-07-23T17:26:09.000Z
ignition_application/views/admin/blog/list.php
rewphus/tidbitsdev
cbe806516c83cd0d4ba601425fc13601d5c44a86
[ "MIT" ]
7
2015-09-21T19:41:51.000Z
2020-01-19T22:48:29.000Z
<ul class="breadcrumb"> <li itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb"><span itemprop="title"><a href="/">Home</a></span></li> <li itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb"><span itemprop="title"><a href="/admin">Admin</a></span></li> <li itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb" class="active"><span itemprop="title"><?php echo $pagetitle ?></span></li> </ul> <h2><?php echo $pagetitle ?></h2> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title"><b>New Post</b></h3> </div> <div class="panel-body"> <p class="pull-left">Start a new blog post.</p> <a class="btn btn-default btn-primary pull-right" href="/admin/blog/new" role="button">New Post</a> </div> </div> <?php foreach($posts as $post) { ?> <div class="panel panel-<?php echo $post->Published ? 'primary' : 'warning' ?>"> <div class="panel-heading"> <h3 class="panel-title"> <?php echo "<b>" . $post->Title . "</b>"; if(!$post->Published) echo " (DRAFT)"; ?> </h3> </div> <div class="panel-body"> <div class="pull-left"> <p><?php echo $post->Deck ?></p> <p><?php echo date_format(date_create($post->Date . " " . $post->Time), 'jS F, Y g:ia') ?></p> </div> <a class="btn btn-default pull-right" href="/admin/blog/edit/post/<?php echo $post->PostID ?>" role="button">Edit Post</a> </div> </div> <?php } ?> <ul class="pager"> <?php $previousPage = $page - 1; $nextPage = $page + 1; if($previousPage > 0) { echo "<li class='pull-left'><a href='/admin/blog/edit/" . $previousPage . "'>Previous</a></li>"; } echo "<li class='pull-right'><a href='/admin/blog/edit/" . $nextPage . "'>Next</a></li>"; ?> </ul>
35.5
153
0.56025
c48efe9fe55ce710f8798cae5f040f4587aa5cf1
6,387
hh
C++
src/grid.hh
lanl/libparty
ae0ee61e23f4335a820d0aee04be58944450d251
[ "Apache-2.0" ]
2
2020-03-19T08:28:37.000Z
2020-06-29T08:05:12.000Z
src/grid.hh
lanl/libparty
ae0ee61e23f4335a820d0aee04be58944450d251
[ "Apache-2.0" ]
null
null
null
src/grid.hh
lanl/libparty
ae0ee61e23f4335a820d0aee04be58944450d251
[ "Apache-2.0" ]
3
2017-06-21T20:49:57.000Z
2020-03-19T08:28:38.000Z
/* * Copyright 2014. Los Alamos National Security, LLC. This material was produced * under U.S. Government contract DE-AC52-06NA25396 for Los Alamos National * Laboratory (LANL), which is operated by Los Alamos National Security, LLC * for the U.S. Department of Energy. The U.S. Government has rights to use, * reproduce, and distribute this software. NEITHER THE GOVERNMENT NOR * LOS ALAMOS NATIONAL SECURITY, LLC MAKES ANY WARRANTY, EXPRESS OR IMPLIED, * OR ASSUMES ANY LIABILITY FOR THE USE OF THIS SOFTWARE. If software is * modified to produce derivative works, such modified software should be * clearly marked, so as not to confuse it with the version available from LANL. * * 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. * * Additionally, redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of the Los Alamos National Security, LLC, Los Alamos * National Laboratory, LANL, the U.S. Government, nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * LibParty, Version 1.x, Copyright number C114122, LA-CC-14-086 * * Authors: * Matthew Kinsey, kinsey@lanl.gov * Verinder Rana, vrana@lanl.gov * Bob Robey, XCP-2, LANL, brobey@lanl.gov * Jeremy Sauer, EES-16, LANL, jsauer@lanl.gov * Jon Reisner, XCP-4 LANL, reisner@lanl.gov */ #ifndef GRID_HH #define GRID_HH #include <iostream> class grid { public: double xmin, ymin, zmin; // double xmax, ymax, zmax; int nx, ny, nz; double xstride, ystride, zstride; // void interp(double * x, double * y, double * z, double * val, int size, double * ret); // int ind1d(int i, int j, int k); //}; int ind1d(int i, int j, int k, bool fort_order = false) { // int nx, ny; // nx = (int)(( xmax - xmin ) / xstride) + 1; // ny = (int)(( ymax - ymin ) / ystride) + 1; // nz = (int)(( zmax - zmin ) / zstride); // if(fort_order) return k + nz*j + nz*ny*i; return i + nx*j + nx*ny*k; } void interp3d(double * x, double * y, double * z, double * val, int size, double * ret, bool fort_order = false) { // int i[size], j[size], k[size]; // double x0[size], y0[size], z0[size]; // double xd[size], yd[size], zd[size]; // double c00[size], c10[size], c01[size], c11[size], c0[size], c1[size]; // for(int i = 0; i < nx; ++i) std::cout << va #pragma ivdep #pragma omp parallel for for(int n = 0; n < size; ++n) { int i = (int)(( x[n] - xmin ) / xstride); int j = (int)(( y[n] - ymin ) / ystride); int k = (int)(( z[n] - zmin ) / zstride); double x0 = (i) * xstride + xmin; double y0 = (j) * ystride + ymin; double z0 = (k) * zstride + zmin; double xd = ( x[n] - x0 ) / xstride; double yd = ( y[n] - y0 ) / ystride; double zd = ( z[n] - z0 ) / zstride; double c00 = val[ind1d(i,j,k,fort_order)] * ( 1. - xd ) + val[ind1d(i+1,j,k,fort_order)] * xd; double c10 = val[ind1d(i,j+1,k,fort_order)] * ( 1. - xd ) + val[ind1d(i+1,j+1,k,fort_order)] * xd; double c01 = val[ind1d(i,j,k+1,fort_order)] * ( 1. - xd ) + val[ind1d(i+1,j,k+1,fort_order)] * xd; double c11 = val[ind1d(i,j+1,k+1,fort_order)] * ( 1. - xd ) + val[ind1d(i+1,j+1,k+1,fort_order)] * xd; double c0 = c00 * ( 1. - yd ) + c10 * yd; double c1 = c01 * ( 1. - yd ) + c11 * yd; ret[n] = c0 * ( 1. - zd ) + c1 * zd; } } void interp2d(double * x, double * y, double * val, int size, double * ret, bool fort_order = false) { // int i[size], j[size]; // double x0[size], y0[size]; // double xd[size], yd[size]; // double c0[size], c1[size]; #pragma ivdep #pragma omp parallel for for(int n = 0; n < size; ++n) { int i = (int)(( x[n] - xmin ) / xstride); int j = (int)(( y[n] - ymin ) / ystride); double x0 = i * xstride + xmin; double y0 = j * ystride + ymin; double xd = ( x[n] - x0 ) / xstride; double yd = ( y[n] - y0 ) / ystride; double c0 = val[ind1d(i,j,0,fort_order)] * (1. - xd) + val[ind1d(i+1,j,0,fort_order)] * xd; double c1 = val[ind1d(i,j+1,0,fort_order)] * (1. - xd) + val[ind1d(i+1,j+1,0,fort_order)] * xd; ret[n] = c0 * (1. - yd) + c1 * yd; } // std::cout << ret[0] << std::endl; } }; /* i[:] = (int)(( x[0:size] - xmin ) / xstride); j[:] = (int)(( y[0:size] - ymin ) / ystride); k[:] = (int)(( z[0:size] - zmin ) / zstride); x0[:] = i[:] * xstride + xmin; y0[:] = j[:] * ystride + ymin; z0[:] = k[:] * zstride + zmin; xd[:] = ( x[0:size] - x0[:] ) / xstride; yd[:] = ( y[0:size] - y0[:] ) / ystride; zd[:] = ( z[0:size] - z0[:] ) / zstride; c00[:] = val[ind1d(i[:],j[:],k[:])] * ( 1. - xd[:] ) + val[ind1d(i[:]+1,j[:],k[:])] * xd[:]; c10[:] = val[ind1d(i[:],j[:]+1,k[:])] * ( 1. - xd[:] ) + val[ind1d(i[:]+1,j[:]+1,k[:])] * xd[:]; c01[:] = val[ind1d(i[:],j[:],k[:]+1)] * ( 1. - xd[:] ) + val[ind1d(i[:]+1,j[:],k[:]+1)] * xd[:]; c11[:] = val[ind1d(i[:],j[:]+1,k[:]+1)] * ( 1. - xd[:] ) + val[ind1d(i[:]+1,j[:]+1,k[:]+1)] * xd[:]; c0[:] = c00[:] * ( 1. - yd[:] ) + c10[:] * yd[:]; c1[:] = c01[:] * ( 1. - yd[:] ) + c11[:] * yd[:]; ret[0:size] = c0[:] * ( 1. - zd[:] ) + c1[:] * zd[:]; }*/ #endif
38.945122
114
0.567716
20a9de2b7e432d7723ae2900ca820b3d07d3057f
192
py
Python
windse/TurbineManager.py
malihass/WindSE
ea6763847a5988c54a74db16126f90b3975c79c3
[ "Apache-2.0" ]
null
null
null
windse/TurbineManager.py
malihass/WindSE
ea6763847a5988c54a74db16126f90b3975c79c3
[ "Apache-2.0" ]
null
null
null
windse/TurbineManager.py
malihass/WindSE
ea6763847a5988c54a74db16126f90b3975c79c3
[ "Apache-2.0" ]
null
null
null
class GenericTurbine(object): def __init__(self, loc, RD, W): self.loc = loc # Location in Space self.RD = RD # Rotor Diameter self.W = W # Width of influence
38.4
43
0.59375
07484ed383311f6949f8f1a525575c70b233b35c
671
css
CSS
decks/8008.css
cccswann/gotype-app
396cd818e25faec6e9f9fa31ab0df5162f676416
[ "MIT" ]
null
null
null
decks/8008.css
cccswann/gotype-app
396cd818e25faec6e9f9fa31ab0df5162f676416
[ "MIT" ]
null
null
null
decks/8008.css
cccswann/gotype-app
396cd818e25faec6e9f9fa31ab0df5162f676416
[ "MIT" ]
null
null
null
/* Colors inspired by GMK 8008 by Dixie Mech https://dixiemech.com/gmk8008 Dark Blue: #3c4756 Light Blue: #a2aebd Pink: #f44c7f */ body { background: #3c4756; } #header { color: #f44c7f; } #left-wing { color: #f44c7f; } #right-wing { color: #f44c7f; } #typing-area, #theme-area{ background: #a2aebd; } #text-display { color: #3c4756; } #input-field { background: #adbac9; color: #3c4756; } #input-field.wrong { background: rgba(198, 38, 46, 0.3); } #redo-button { background: #f44c7f; color: #3c4756; } #footer { color: #f44c7f; } .highlight { color: #f44c7f; } .correct { color: #6f7b8a; } .wrong { color: #c6262e; }
10.822581
41
0.615499
9cdf033366045345845dc3b31d45041d7aaa6db1
108
psm1
PowerShell
Powershell Module/Devolutions.Server/Private/Types/enums/SessionRecordingTarget.generated.psm1
Devolutions/devolutions-server-rest-service
3fb263f17c91d0980493ea1551fa2ffd69b9c16c
[ "Apache-2.0" ]
5
2020-11-26T20:44:57.000Z
2022-01-25T16:51:27.000Z
Powershell Module/Devolutions.Server/Private/Types/enums/SessionRecordingTarget.generated.psm1
Devolutions/devolutions-server-rest-service
3fb263f17c91d0980493ea1551fa2ffd69b9c16c
[ "Apache-2.0" ]
11
2021-03-24T20:54:48.000Z
2021-09-23T12:59:08.000Z
Powershell Module/Devolutions.Server/Private/Types/enums/SessionRecordingTarget.generated.psm1
Devolutions/devolutions-server-rest-service
3fb263f17c91d0980493ea1551fa2ffd69b9c16c
[ "Apache-2.0" ]
3
2021-07-16T14:06:46.000Z
2021-12-09T09:05:34.000Z
enum SessionRecordingTarget { Default = 0 Local = 1 Remote = 2 Inherited = 3 Root = 4 }
12
27
0.574074
df459bd0e95e28c1271d862c416564bae52a86b5
7,879
lua
Lua
addons/xyz_prison/lua/xyz_prison/core/sv_core.lua
JacubRSTNC/PoliceRP-OpenSource
adcf19f765331521b6934ecb1c180a978ba7f44d
[ "MIT" ]
17
2021-08-17T16:05:20.000Z
2022-03-17T09:55:24.000Z
addons/xyz_prison/lua/xyz_prison/core/sv_core.lua
JacubRSTNC/PoliceRP-OpenSource
adcf19f765331521b6934ecb1c180a978ba7f44d
[ "MIT" ]
null
null
null
addons/xyz_prison/lua/xyz_prison/core/sv_core.lua
JacubRSTNC/PoliceRP-OpenSource
adcf19f765331521b6934ecb1c180a978ba7f44d
[ "MIT" ]
4
2021-08-19T11:41:36.000Z
2022-03-20T08:56:28.000Z
function PrisonSystem.Arrest(ply, time) -- Just demote the president if (ply:Team() == TEAM_PRESIDENT) or (ply:Team() == TEAM_VICE_PRESIDENT) then ply:changeTeam(TEAM_CITIZEN, true, true) xLogs.Log(xLogs.Core.Player(ply).." has been demoted to citizen as they were arrested as a (Vice) President.", "Prison") XYZShit.Msg("Prisoner", PrisonSystem.Config.Color, "The (Vice) President has been arrested and as a result: was demoted!") return end -- Can't arrest government, silly if XYZShit.IsGovernment(ply:Team(), true) then return end if PrisonSystem.Arrested[ply:SteamID64()] then PrisonSystem.Arrested[ply:SteamID64()].length = PrisonSystem.Arrested[ply:SteamID64()].length + PrisonSystem.Config.EscapeTimeout ply:Spawn() -- Let's see if this fixes issues ply:changeTeam(PrisonSystem.Config.Prisoner, true, true) ply:SetTeam(PrisonSystem.Config.Prisoner) local arrestData = PrisonSystem.Arrested[ply:SteamID64()] local timeLeft = (arrestData.length - (os.time() - arrestData.start)) + PrisonSystem.Config.EscapeTimeout net.Start("PrisonSystem:Sentence") net.WriteEntity(ply) net.WriteUInt(timeLeft, 10) net.Broadcast() timer.Adjust("PrisonSystem:Jailed:"..ply:SteamID64(), timeLeft) xLogs.Log(xLogs.Core.Player(ply).." has been re-arrested for "..PrisonSystem.Config.EscapeTimeout.." more seconds due to jail break.", "Prison") return end PrisonSystem.Arrested[ply:SteamID64()] = { start = os.time(), length = time } ply:changeTeam(PrisonSystem.Config.Prisoner, true, true) ply:SetTeam(PrisonSystem.Config.Prisoner) timer.Simple(1, function() ply:setDarkRPVar("job", team.GetName(PrisonSystem.Config.Prisoner)) end) ply:unWarrant() ply:unWanted() net.Start("PrisonSystem:Sentence") net.WriteEntity(ply) net.WriteUInt(time, 10) net.Broadcast() timer.Create("PrisonSystem:Jailed:"..ply:SteamID64(), time, 1, function() if not IsValid(ply) then return end PrisonSystem.UnArrest(ply) end) Quest.Core.ProgressQuest(ply, "jail_break", 1) xLogs.Log(xLogs.Core.Player(ply).." has been arrested for "..time.." seconds.", "Prison") end function PrisonSystem.UnArrest(ply) if ply:XYZIsArrested() then return end ply:XYZUnarrest(ply) ply:changeTeam(TEAM_CITIZEN, true, true) ply:SetTeam(TEAM_CITIZEN) ply:unWarrant() ply:unWanted() ply:Spawn() PrisonSystem.Arrested[ply:SteamID64()] = nil timer.Remove("PrisonSystem:Jailed:"..ply:SteamID64()) net.Start("PrisonSystem:Sentence:Destroy") net.WriteEntity(ply) net.Broadcast() xLogs.Log(xLogs.Core.Player(ply).." has been unarrested.", "Prison") end function PrisonSystem.RegisterJob(job, startJob, endJob) print("Registering job", job) PrisonSystem.Jobs[job] = {} PrisonSystem.Jobs[job].name = job PrisonSystem.Jobs[job].startJob = startJob PrisonSystem.Jobs[job].endJob = endJob end -- We have to run this server side so we can load the files to send to the client. function PrisonSystem.FindJobs() print("Running job finder") for _, File in SortedPairs(file.Find("xyz_prison/core/jobs/*.lua", "LUA"), true) do print(" ", "Found:", File) if SERVER then AddCSLuaFile("xyz_prison/core/jobs/" .. File) include("xyz_prison/core/jobs/" .. File) else include("xyz_prison/core/jobs/" .. File) end end end PrisonSystem.FindJobs() hook.Add("XYZHandcuffsUncuffed", "PrisonSystem:ReleaseOnUncuff", function(arrester, ply) if not PrisonSystem.Arrested[ply:SteamID64()] then return end if timer.Exists("PrisonSystem:Jailed:"..ply:SteamID64()) then return end if arrester == ply then return end PrisonSystem.UnArrest(ply) end) net.Receive("PrisonSystem:StartJob", function(_, ply) if XYZShit.CoolDown.Check("PrisonSystem:StartJob", 2, ply) then return end if not (ply:Team() == PrisonSystem.Config.Prisoner) then return end -- Check distance local ent = net.ReadEntity() if ent:GetPos():Distance(ply:GetPos()) > 500 then return end local jobName = net.ReadString() local job = PrisonSystem.Jobs[jobName] -- Not a valid job if not job then return end -- Already that job if PrisonSystem.ActiveJobs[ply:SteamID64()] and (PrisonSystem.ActiveJobs[ply:SteamID64()].name == job.name) then return end -- Clear old job if PrisonSystem.ActiveJobs[ply:SteamID64()] then PrisonSystem.ActiveJobs[ply:SteamID64()].endJob(ply) end PrisonSystem.ActiveJobs[ply:SteamID64()] = job -- Start the job job.startJob(ply) XYZShit.Msg("Prisoner", PrisonSystem.Config.Color, "You have started the job: "..PrisonSystem.Config.Jobs[job.name], ply) xLogs.Log(xLogs.Core.Player(ply).." has started the job: "..xLogs.Core.Color(PrisonSystem.Config.Jobs[job.name], Color(0, 0, 200)), "Prison") end) hook.Add("OnPlayerChangedTeam", "PrisonSystem:ChangeTeam", function(ply, old, new) -- They weren't a prisoner if not (old == PrisonSystem.Config.Prisoner) then return end if PrisonSystem.ActiveJobs[ply:SteamID64()] then PrisonSystem.ActiveJobs[ply:SteamID64()].endJob(ply) end PrisonSystem.ActiveJobs[ply:SteamID64()] = nil timer.Remove("PrisonSystem:Jailed:"..ply:SteamID64()) PrisonSystem.Arrested[ply:SteamID64()] = nil net.Start("PrisonSystem:Sentence:Destroy") net.WriteEntity(ply) net.Broadcast() end) hook.Add("PlayerDisconnected", "PrisonSystem:PlayerLeave", function(ply) -- They weren't a prisoner if not (ply:Team() == PrisonSystem.Config.Prisoner) then return end if PrisonSystem.ActiveJobs[ply:SteamID64()] then PrisonSystem.ActiveJobs[ply:SteamID64()].endJob(ply) end PrisonSystem.ActiveJobs[ply:SteamID64()] = nil timer.Remove("PrisonSystem:Jailed:"..ply:SteamID64()) PrisonSystem.Arrested[ply:SteamID64()] = nil end) hook.Add("playerCanChangeTeam", "PrisonSystem:BlockJobChange", function(ply, team, forced) if forced then return end if not (ply:Team() == PrisonSystem.Config.Prisoner) then return end XYZShit.Msg("Prisoner", PrisonSystem.Config.Color, "You cannot change job while in jail...", ply) return false end) hook.Add("PlayerSelectSpawn", "PrisonSystem:SpawnInJail", function(ply) -- They weren't a prisoner if not (ply:Team() == PrisonSystem.Config.Prisoner) then return end return NULL, table.Random(PrisonSystem.Config.JailPositions) end) hook.Add("PlayerSpawn", "PrisonSystem:ResetWeps", function(ply) if not (ply:Team() == PrisonSystem.Config.Prisoner) then return end timer.Simple(1, function() ply:StripWeapons() ply:Give("weapon_physcannon") ply:Give("weapon_fists") end) end) -- block stuff while in jail hook.Add("Inventory.CanDrop", "PrisonSystem:BlockInv", function(ply) if not (ply:Team() == PrisonSystem.Config.Prisoner) then return end return false end) hook.Add("Inventory.CanDestroy", "PrisonSystem:BlockInv", function(ply) if not (ply:Team() == PrisonSystem.Config.Prisoner) then return end return false end) hook.Add("Inventory.CanPickup", "PrisonSystem:BlockInv", function(ply) if not (ply:Team() == PrisonSystem.Config.Prisoner) then return end return false end) hook.Add("Inventory.CanHolster", "PrisonSystem:BlockInv", function(ply) if not (ply:Team() == PrisonSystem.Config.Prisoner) then return end return false end) hook.Add("Inventory.CanEquip", "PrisonSystem:BlockInv", function(ply) if not (ply:Team() == PrisonSystem.Config.Prisoner) then return end return false end) hook.Add("PlayerSpawnProp", "PrisonSystem:Block", function(ply) if not (ply:Team() == PrisonSystem.Config.Prisoner) then return end return false end) hook.Add("canBuyCustomEntity", "PrisonSystem:Block", function(ply) if not (ply:Team() == PrisonSystem.Config.Prisoner) then return end return false end) hook.Add("canBuyAmmo", "PrisonSystem:Block", function(ply) if not (ply:Team() == PrisonSystem.Config.Prisoner) then return end return false end) hook.Add("canDropWeapon", "PrisonSystem:Block", function(ply) if not (ply:Team() == PrisonSystem.Config.Prisoner) then return end return false end)
31.770161
146
0.741845
6d131d64b7f5a45ab6e6bcd2a7b4bd9023d018b8
1,011
tsx
TypeScript
src/Alert.tsx
hiloki/ubie-icons
2fee6e727155217069755c4769b65ca14662195e
[ "MIT" ]
null
null
null
src/Alert.tsx
hiloki/ubie-icons
2fee6e727155217069755c4769b65ca14662195e
[ "MIT" ]
null
null
null
src/Alert.tsx
hiloki/ubie-icons
2fee6e727155217069755c4769b65ca14662195e
[ "MIT" ]
null
null
null
import * as React from "react"; function SvgAlert(props: React.SVGProps<SVGSVGElement>) { return ( <svg width="1em" height="1em" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" {...props} > <path fillRule="evenodd" clipRule="evenodd" d="M12 2C12.3544 2 12.6823 2.18754 12.8619 2.49298L22.8619 19.493C23.0438 19.8022 23.0461 20.1851 22.868 20.4965C22.69 20.8079 22.3587 21 22 21H2C1.64128 21 1.31005 20.8079 1.13195 20.4965C0.953855 20.1851 0.956189 19.8022 1.13807 19.493L11.1381 2.49298C11.3177 2.18754 11.6456 2 12 2ZM20.2516 19L12 4.97231L3.74842 19H20.2516ZM13 13C13 13.5523 12.5523 14 12 14C11.4477 14 11 13.5523 11 13V10C11 9.44772 11.4477 9 12 9C12.5523 9 13 9.44772 13 10V13ZM12 18C12.6904 18 13.25 17.4404 13.25 16.75C13.25 16.0596 12.6904 15.5 12 15.5C11.3096 15.5 10.75 16.0596 10.75 16.75C10.75 17.4404 11.3096 18 12 18Z" fill="currentColor" /> </svg> ); } export default SvgAlert;
42.125
607
0.666667
2caa27e09bb42e231e5fe7cc6cdaf049ec13eb34
2,378
py
Python
modules/collection.py
Arpan-206/Web3-CLI
ede5d109f4744346f2c9170b45660cb54489a52b
[ "MIT" ]
4
2022-01-25T07:24:43.000Z
2022-01-26T04:40:32.000Z
modules/collection.py
Arpan-206/Web3-CLI
ede5d109f4744346f2c9170b45660cb54489a52b
[ "MIT" ]
null
null
null
modules/collection.py
Arpan-206/Web3-CLI
ede5d109f4744346f2c9170b45660cb54489a52b
[ "MIT" ]
null
null
null
import sys # Importing the required modules from PyInquirer import Separator, prompt from termcolor import colored def nft_collection(nft_module): """ This is the main function of the NFT collection module. It will prompt you to select the action that you want to do on the NFT collection module. Then it will call the corresponding function and that function takes on. """ # This is the list of the actions that you can do on the NFT collection module. actions = prompt([ { 'type': 'list', 'name': 'action', 'message': 'What do you want to do?', 'choices': [ Separator('-- Actions --'), { 'name': 'Mint an NFT', 'value': 'mint', 'short': 'Mint' }, { 'name': 'Transfer an NFT', 'value': 'transfer', 'short': 'Transfer' }, { 'name': 'View an NFT', 'value': 'view', 'short': 'View' }, { 'name': 'View all NFTs of a specific owner', 'value': 'view_by_owner', 'short': 'View By Owner' }, { 'name': 'Burn an NFT', 'value': 'burn', 'short': 'Burn' } ] } ]) # Calling the corresponding function based on the action that you selected. if actions['action'] == 'mint': from .nft_collection.mint import mint_prompt mint_prompt(nft_module=nft_module) elif actions['action'] == 'transfer': from .nft_collection.transfer import transfer_prompt transfer_prompt(nft_module=nft_module) elif actions['action'] == 'view': from .nft_collection.view import view view(nft_module=nft_module) elif actions['action'] == 'burn': from .nft_collection.burn import burn burn(nft_module=nft_module) elif actions['action'] == 'view_by_owner': from .nft_collection.view_by_owner import view_by_owner view_by_owner(nft_module=nft_module) else: print(colored('No Action Selected', 'red')) sys.exit(1)
32.135135
223
0.50799
a362fe549eb8c6f2435b199eb21b021d1796991e
5,196
c
C
src/libc/sys/syscall.c
monwarez/libc6-shim
80620419334df3bc6b58bdc854ccd4a14157eec4
[ "MIT" ]
17
2018-11-16T20:59:16.000Z
2020-09-26T06:48:19.000Z
src/libc/sys/syscall.c
monwarez/libc6-shim
80620419334df3bc6b58bdc854ccd4a14157eec4
[ "MIT" ]
2
2020-11-15T00:13:05.000Z
2020-12-11T23:17:40.000Z
src/libc/sys/syscall.c
monwarez/libc6-shim
80620419334df3bc6b58bdc854ccd4a14157eec4
[ "MIT" ]
1
2022-01-07T11:05:04.000Z
2022-01-07T11:05:04.000Z
#include <assert.h> #include <errno.h> #include <pthread_np.h> #include <stdarg.h> #include <stdio.h> #include <time.h> #include <unistd.h> #include <sys/types.h> #include <sys/mman.h> #include <sys/thr.h> #include "../time.h" #include "../../shim.h" #ifdef __i386__ #define LINUX_WRITE 4 #define LINUX_OPEN 5 #define LINUX_GETPID 20 #define LINUX_GETTID 224 #define LINUX_FUTEX 240 #define LINUX_CLOCK_GETTIME 265 #define LINUX_TGKILL 270 #define LINUX_GET_ROBUST_LIST 312 #define LINUX_PIPE2 331 #define LINUX_GETRANDOM 355 #define LINUX_MEMFD_CREATE 356 #endif #ifdef __x86_64__ #define LINUX_WRITE 1 #define LINUX_OPEN 2 #define LINUX_MMAP 9 #define LINUX_GETPID 39 #define LINUX_GETTID 186 #define LINUX_FUTEX 202 #define LINUX_CLOCK_GETTIME 228 #define LINUX_TGKILL 234 #define LINUX_GET_ROBUST_LIST 274 #define LINUX_PIPE2 293 #define LINUX_GETRANDOM 318 #define LINUX_MEMFD_CREATE 319 #endif void* shim_mmap_impl(void*, size_t, int, int, int, linux_off_t); int shim_open_impl(const char*, int, va_list); long shim_syscall_impl(long number, va_list args) { if (number == LINUX_WRITE) { int fd = va_arg(args, int); void* buf = va_arg(args, void*); size_t nbytes = va_arg(args, size_t); LOG("%s: write(%d, %p, %zu)", __func__, fd, buf, nbytes); int n = write(fd, buf, nbytes); LOG("%s: write -> %d", __func__, n); return n; } if (number == LINUX_OPEN) { char* path = va_arg(args, void*); int flags = va_arg(args, int); LOG("%s: open(\"%s\", 0x%x, ...)", __func__, path, flags); int fd = shim_open_impl(path, flags, args); LOG("%s: open -> %d", __func__, fd); return fd; } #ifdef __x86_64__ if (number == LINUX_MMAP) { void* addr = va_arg(args, void*); size_t len = va_arg(args, size_t); int prot = va_arg(args, int); int flags = va_arg(args, int); int fd = va_arg(args, int); linux_off_t pgoffset = va_arg(args, linux_off_t); LOG("%s: mmap(%p, %zu, %d, %d, %d, %ld)", __func__, addr, len, prot, flags, fd, pgoffset); void* p = shim_mmap_impl(addr, len, prot, flags, fd, pgoffset); LOG("%s: mmap -> %p", __func__, p); return (uintptr_t)p; } #endif if (number == LINUX_GETPID) { LOG("%s: getpid()", __func__); pid_t pid = getpid(); LOG("%s: getpid -> %d", __func__, pid); return pid; } if (number == LINUX_GETTID) { LOG("%s: gettid()", __func__); int tid = pthread_getthreadid_np(); LOG("%s: gettid -> %d", __func__, tid); return tid; } if (number == LINUX_FUTEX) { errno = native_to_linux_errno(ENOSYS); return -1; } if (number == LINUX_CLOCK_GETTIME) { linux_clockid_t clock_id = va_arg(args, linux_clockid_t); linux_timespec* tp = va_arg(args, linux_timespec*); LOG("%s: clock_gettime(%d, %p)", __func__, clock_id, tp); int err = shim_clock_gettime_impl(clock_id, tp); LOG("%s: clock_gettime -> %d", __func__, err); return err; } if (number == LINUX_TGKILL) { pid_t tgid = va_arg(args, pid_t); pid_t tid = va_arg(args, pid_t); int sig = va_arg(args, int); LOG("%s: tgkill(%d, %d, %d)", __func__, tgid, tid, sig); assert(tgid == getpid()); assert(sig == 0); int err = thr_kill(tid, sig); LOG("%s: tgkill -> %d", __func__, err); return err; } if (number == LINUX_GET_ROBUST_LIST) { typedef void robust_list_head; int get_robust_list(int, robust_list_head**, size_t*); int pid = va_arg(args, int); robust_list_head** list_head = va_arg(args, robust_list_head**); size_t* struct_len = va_arg(args, size_t*); #if DEBUG LOG("%s: get_robust_list(%d, %p, %p)\n", __func__, pid, list_head, struct_len); #else fprintf(stderr, "%s [get_robust_list]: nothing to see here, move along\n", __func__); #endif int err = get_robust_list(pid, list_head, struct_len); LOG("%s: get_robust_list -> %d", __func__, err); return err; } if (number == LINUX_PIPE2) { int shim_pipe2_impl(int[2], int); int* fds = va_arg(args, int*); int flags = va_arg(args, int); LOG("%s: pipe2(%p, %d)", __func__, fds, flags); int err = shim_pipe2_impl(fds, flags); LOG("%s: pipe2 -> %d ({%d, %d})", __func__, err, fds[0], fds[1]); return err; } if (number == LINUX_GETRANDOM) { errno = native_to_linux_errno(ENOSYS); return -1; } if (number == LINUX_MEMFD_CREATE) { #if __FreeBSD_version >= 1300139 char* name = va_arg(args, char*); int flags = va_arg(args, int); LOG("%s: memfd_create(\"%s\", 0x%x)", __func__, name, flags); assert((flags & (MFD_CLOEXEC | MFD_ALLOW_SEALING)) == flags); int err = memfd_create(name, flags); LOG("%s: memfd_create -> %d", __func__, err); return err; #else errno = native_to_linux_errno(ENOSYS); return -1; #endif } UNIMPLEMENTED_ARGS("%ld, ...", number); } SHIM_WRAP(syscall);
24.167442
94
0.5995
2780a24c11f549a49ca989dc9a8d2e458b641030
3,317
rb
Ruby
test/unit/etsy/model_test.rb
envylabs/etsy
1c49575bcbcbddb77106d0cd201dfe367f389aac
[ "MIT" ]
1
2019-12-23T08:57:41.000Z
2019-12-23T08:57:41.000Z
test/unit/etsy/model_test.rb
envylabs/etsy
1c49575bcbcbddb77106d0cd201dfe367f389aac
[ "MIT" ]
null
null
null
test/unit/etsy/model_test.rb
envylabs/etsy
1c49575bcbcbddb77106d0cd201dfe367f389aac
[ "MIT" ]
1
2022-03-14T10:14:05.000Z
2022-03-14T10:14:05.000Z
require File.expand_path('../../../test_helper', __FILE__) module Etsy class TestModel include Etsy::Model end class ModelTest < Test::Unit::TestCase def mock_empty_request(options = {}) body = options.delete(:body) { '{}' } Request.expects(:new).with('', options).returns(stub(:get => stub(:body => body, :code => 200))) end context 'An instance of a Model' do should 'perform no requests if :limit is 0' do Request.expects(:new).never TestModel.get_all('', :limit => 0) end should 'perform only one request if :limit is less than 100' do mock_empty_request(:limit => 10, :offset => 0).once TestModel.get_all('', :limit => 10) end should 'perform only one request if :limit is equal to 100' do mock_empty_request(:limit => 100, :offset => 0).once TestModel.get_all('', :limit => 100) end should 'perform multiple requests if :limit is greater than 100' do mock_empty_request(:limit => 100, :offset => 0).once mock_empty_request(:limit => 50, :offset => 100).once TestModel.get_all('', :limit => 150) end should 'perform only one request if :limit is :all and count is less than 100' do mock_empty_request(:limit => 100, :offset => 0, :body => '{"count": 10}').once TestModel.get_all('', :limit => :all) end should 'perform only one request if :limit is :all and count is equal to 100' do mock_empty_request(:limit => 100, :offset => 0, :body => '{"count": 100}').once TestModel.get_all('', :limit => :all) end should 'perform only one request if :limit is :all and :offset is greater than count' do mock_empty_request(:limit => 100, :offset => 40, :body => '{"count": 25}').once TestModel.get_all('', :limit => :all, :offset => 40) end should 'perform multiple requests if :limit is :all and count is greater than 100' do body = '{"count": 210}' mock_empty_request(:limit => 100, :offset => 0, :body => body).once mock_empty_request(:limit => 100, :offset => 100, :body => body).once mock_empty_request(:limit => 10, :offset => 200, :body => body).once TestModel.get_all('', :limit => :all) end context 'performing a DELETE' do should 'construct a new Request object' do path, options = '/path', {} request_stub = stub(:delete => '') Request.expects(:new).with(path, options).returns(request_stub) TestModel.delete(path, options) end should 'delegate delete call to Request object' do path, options = '/path', {} delete_response = 'delete response' request_mock = mock { |m| m.expects(:delete).returns(delete_response) } Request.stubs(:new).returns(request_mock) TestModel.delete(path, options) end should 'construct a response object' do path, options = '/path', {} delete_response = 'delete response' request_stub = stub(:delete => delete_response) Request.stubs(:new).returns(request_stub) Response.expects(:new).with(delete_response) TestModel.delete(path, options) end end end end end
35.287234
102
0.599337
cd3f926fb74bfa0aa413ab4966b3b9dc2431808d
542
cs
C#
Kahla.CLI/Program.cs
AiursoftWeb/Kahla
533bb5da4d00c23d3b0b4a77276c38cffa154f7c
[ "MIT" ]
78
2018-10-13T23:17:33.000Z
2022-03-01T18:37:44.000Z
Kahla.CLI/Program.cs
AiursoftWeb/Kahla
533bb5da4d00c23d3b0b4a77276c38cffa154f7c
[ "MIT" ]
76
2018-10-13T16:50:39.000Z
2021-02-06T11:13:10.000Z
Kahla.CLI/Program.cs
AiursoftWeb/Kahla
533bb5da4d00c23d3b0b4a77276c38cffa154f7c
[ "MIT" ]
31
2018-12-03T11:50:22.000Z
2022-03-22T13:50:42.000Z
using Kahla.SDK.Abstract; using System.Linq; using System.Threading.Tasks; namespace Kahla.CLI { public class EmptyBot : BotBase { } public class Program { public async static Task Main(string[] args) { await CreateBotBuilder() .Build<EmptyBot>() .Run( enableCommander: true, autoReconnectMax: 10); } public static BotBuilder CreateBotBuilder() { return new BotBuilder(); } } }
20.846154
52
0.531365
798424e39fdb6355b37ba16d9f4b0c8a72267df1
1,262
lua
Lua
lib/kong/plugins/gluu-oauth-auth/access.lua
sanyamason/gluu-gateway
abe98ecf4dc251cde698dd51dd157394431e66bb
[ "Apache-2.0" ]
31
2018-01-04T08:55:46.000Z
2021-09-06T14:33:24.000Z
lib/kong/plugins/gluu-oauth-auth/access.lua
sanyamason/gluu-gateway
abe98ecf4dc251cde698dd51dd157394431e66bb
[ "Apache-2.0" ]
365
2017-11-30T16:19:19.000Z
2021-04-23T18:51:19.000Z
lib/kong/plugins/gluu-oauth-auth/access.lua
sanyamason/gluu-gateway
abe98ecf4dc251cde698dd51dd157394431e66bb
[ "Apache-2.0" ]
20
2018-01-12T11:23:05.000Z
2022-01-28T00:20:16.000Z
local oxd = require "gluu.oxdweb" local kong_auth_pep_common = require "gluu.kong-common" -- @return introspect_response, status, err -- upon success returns only introspect_response, -- otherwise return nil, status, err local function introspect_token(self, conf, token) local ptoken = kong_auth_pep_common.get_protection_token(conf) local response = oxd.introspect_access_token(conf.oxd_url, { oxd_id = conf.oxd_id, access_token = token, }, ptoken) local status = response.status if status == 403 then kong.log.err("Invalid access token provided in Authorization header"); return nil, 502, "An unexpected error ocurred" end if status ~= 200 then kong.log.err("introspect-access-token error, status: ", status) return nil, 502, "An unexpected error ocurred" end local body = response.body if not body.active then -- TODO should we cache negative resposes? https://github.com/GluuFederation/gluu-gateway/issues/213 return nil, 401, "Invalid access token provided in Authorization header" end return body end return function(self, conf) kong_auth_pep_common.access_auth_handler(self, conf, introspect_token) end
31.55
108
0.698098
3f2e352246d91295077940bdeacc53a3aa9e6d4d
156
rb
Ruby
config/initializers/zip.rb
openSNP/snpr
f995d368163d3ad3df5b0e20289a8ea30b953a00
[ "MIT" ]
97
2016-02-12T15:53:25.000Z
2022-03-27T01:32:02.000Z
config/initializers/zip.rb
openSNP/snpr
f995d368163d3ad3df5b0e20289a8ea30b953a00
[ "MIT" ]
211
2016-02-08T11:44:28.000Z
2022-03-14T15:34:50.000Z
config/initializers/zip.rb
openSNP/snpr
f995d368163d3ad3df5b0e20289a8ea30b953a00
[ "MIT" ]
44
2016-02-09T07:58:07.000Z
2022-02-06T23:59:01.000Z
# frozen_string_literal: true require "zip" Zip.setup do |z| z.write_zip64_support = true z.unicode_names = true z.continue_on_exists_proc = true end
19.5
34
0.762821
06bd5fb5e042b34db0bedaedb5a30395ea6ad209
1,245
py
Python
imagechops/imagechops-logic.py
martinmcbride/python-imaging-book-examples
37e4ccf9b7b2fc3ff75b1fdb9f772de452a843b2
[ "MIT" ]
1
2021-08-22T17:09:44.000Z
2021-08-22T17:09:44.000Z
imagechops/imagechops-logic.py
sthagen/python-imaging-book-examples
2a079c5271f9849bc90a33bed6f3288142035ea7
[ "MIT" ]
null
null
null
imagechops/imagechops-logic.py
sthagen/python-imaging-book-examples
2a079c5271f9849bc90a33bed6f3288142035ea7
[ "MIT" ]
1
2021-08-22T17:09:48.000Z
2021-08-22T17:09:48.000Z
# Author: Martin McBride # Created: 2021-08-08 # Copyright (C) 2021, Martin McBride # License: MIT # Combine images using logical operators # Logical operations only work with 1-bit images. In these examples we convert # black and white images to 1 bit images from PIL import Image, ImageDraw, ImageFont, ImageChops # Open images as 1 bit mask1 = Image.open('circle1.png').convert('1') mask2 = Image.open('circle2.png').convert('1') composite_image = ImageChops.logical_or(mask1, mask2) # Place the images in a grid, with captions output_image = Image.new('RGB', (1280, 320), 'white') draw = ImageDraw.Draw(output_image) font = ImageFont.truetype("Arial.ttf", 20) x, y = 0, 0 draw.text((x+10, y+285), "Mask 1", font=font, fill=0) output_image.paste(mask1, (x, y)) x, y = 430, 0 draw.text((x+10, y+285), "Mask 2", font=font, fill=0) output_image.paste(mask2, (x, y)) x, y = 860, 0 draw.text((x+10, y+285), "OR", font=font, fill=0) output_image.paste(composite_image, (x, y)) output_image.save('imagechops-logical-or.png') composite_image = ImageChops.logical_and(mask1, mask2) composite_image.save('imagechops-logical-and.png') composite_image = ImageChops.logical_xor(mask1, mask2) composite_image.save('imagechops-logical-xor.png')
29.642857
78
0.727711
5813ea397322e78c08687d53dd26b0fede8800be
29
css
CSS
docs/_theme/djangodocs/static/default.css
sergei-maertens/django-systemjs
efd4a3862a39d9771609a25a5556f36023cf6e5c
[ "MIT" ]
49
2015-07-07T13:58:59.000Z
2019-07-23T21:06:21.000Z
docs/_theme/djangodocs/static/default.css
sergei-maertens/django-systemjs
efd4a3862a39d9771609a25a5556f36023cf6e5c
[ "MIT" ]
31
2015-07-12T10:06:45.000Z
2016-12-14T11:39:17.000Z
docs/_theme/djangodocs/static/default.css
sergei-maertens/django-systemjs
efd4a3862a39d9771609a25a5556f36023cf6e5c
[ "MIT" ]
5
2015-07-12T09:19:29.000Z
2020-03-03T07:55:50.000Z
@import url(djangodocs.css);
14.5
28
0.758621
b864aa48e7bf0cd71ef8ccee1f4da43d42f37d30
8,022
dart
Dart
lib/routes/login.dart
dhzdhd/flixcard
e629b0060b6e213228dd7a7a77c1aca1bd586e3e
[ "MIT" ]
null
null
null
lib/routes/login.dart
dhzdhd/flixcard
e629b0060b6e213228dd7a7a77c1aca1bd586e3e
[ "MIT" ]
null
null
null
lib/routes/login.dart
dhzdhd/flixcard
e629b0060b6e213228dd7a7a77c1aca1bd586e3e
[ "MIT" ]
null
null
null
import 'package:black_tortoise/backend/auth.dart'; import 'package:black_tortoise/models/login.dart'; import 'package:black_tortoise/models/theme.dart'; import 'package:black_tortoise/widgets/login_field.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:provider/provider.dart'; class SignUpRoute extends StatelessWidget { @override Widget build(BuildContext context) { return Consumer<ThemeModel>(builder: (context, model, child) { return Scaffold( backgroundColor: model.primaryColor, // ! Check if sized correctly in 5.5" devices // resizeToAvoidBottomInset: false, body: SafeArea(child: SignUpBody()), ); }); } } class SignUpBody extends StatefulWidget { @override State<StatefulWidget> createState() => _SignUpBodyState(); } class _SignUpBodyState extends State<SignUpBody> { final _formKey = GlobalKey<FormState>(); SnackBar errorSnackBar(String text) { return SnackBar( duration: Duration(milliseconds: 800), content: Text( text, style: TextStyle(color: Colors.white, fontSize: 15), textAlign: TextAlign.center, ), ); } @override Widget build(BuildContext context) { return Consumer2<LoginModel, ThemeModel>( builder: (context, loginModel, themeModel, child) { return Padding( padding: EdgeInsets.zero, child: Column( children: [ Flexible( flex: 1, child: Align( alignment: Alignment.centerLeft, child: Padding( padding: EdgeInsets.only(left: 20, top: 10), child: Text( loginModel.isLogin ? 'Log in' : 'Sign Up', style: TextStyle(fontSize: 40, fontWeight: FontWeight.w600), ), ), ), ), Flexible( flex: 2, child: Form( key: _formKey, child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ Padding( padding: EdgeInsets.only( top: 7.0, left: 10.0, right: 10.0), child: LoginFormFieldWidget( controller: loginModel.emailController, validator: (var value) { if (value!.isEmpty) { return "Please enter your Email ID"; } else if (!(value.contains(RegExp(r'@|.com')))) { return "Email ID is not valid"; } return null; }, label: 'Email', model: themeModel, )), Padding( padding: EdgeInsets.only(top: 14.0, left: 10.0, right: 10.0), child: LoginFormFieldWidget( controller: loginModel.usernameController, validator: (String? value) { if (value!.isEmpty) { return "Please enter your username"; } return null; }, label: 'Username', model: themeModel, ), ), Padding( padding: EdgeInsets.only(top: 14.0, left: 10.0, right: 10.0), child: LoginFormFieldWidget( obscure: true, controller: loginModel.passwordController, validator: (String? value) { if (value!.isEmpty) { return "Please enter your password"; } return null; }, label: 'Password', model: themeModel, ), ), ], ), ), ), Flexible( flex: 1, child: Column( children: [ Padding( padding: const EdgeInsets.all(10), child: InkWell( borderRadius: BorderRadius.circular(15), child: Ink( // width: 200, height: 60, decoration: BoxDecoration( borderRadius: BorderRadius.circular(15), gradient: accentGradient, ), child: Center( child: Text( loginModel.isLogin ? "Log in" : "Sign Up", style: TextStyle( fontSize: 16.0, color: Colors.white, ), ), ), ), onTap: () async { if (_formKey.currentState!.validate()) { if (loginModel.isLogin) { if (await Auth.signIn( loginModel.emailController.text, loginModel.passwordController.text, )) { Navigator.popAndPushNamed(context, '/home'); } else { ScaffoldMessenger.of(context).showSnackBar( errorSnackBar('Incorrect details entered.'), ); } } else { if (await Auth.signUp( loginModel.emailController.text, loginModel.passwordController.text)) { Navigator.popAndPushNamed(context, '/home'); } else { ScaffoldMessenger.of(context).showSnackBar( errorSnackBar( 'Unable to sign up. Please try again.', ), ); } } } Navigator.popAndPushNamed(context, '/home'); }, ), ), Padding( padding: const EdgeInsets.only(top: 10.0), child: GestureDetector( child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ Text( loginModel.isLogin ? 'Don\'t have an account? Sign Up' : 'Have an account? Log in', ), Icon(Icons.keyboard_arrow_right) ], ), onTap: () => loginModel.switchPage(), ), ) ], ), ), ], ), ); }, ); } }
39.131707
80
0.373722
4cee6132a118117d6e52ff3408677c769a660ba8
448
py
Python
authors/apps/authentication/tests/test_settings.py
andela/-ah-backend-thor
fe8d49531ccb1adebfea8b0f30ff0ebd172c31ba
[ "BSD-3-Clause" ]
1
2018-11-08T16:47:03.000Z
2018-11-08T16:47:03.000Z
authors/apps/authentication/tests/test_settings.py
andela/-ah-backend-thor
fe8d49531ccb1adebfea8b0f30ff0ebd172c31ba
[ "BSD-3-Clause" ]
72
2018-10-23T12:34:14.000Z
2021-06-01T22:50:57.000Z
authors/apps/authentication/tests/test_settings.py
andela/-ah-backend-thor
fe8d49531ccb1adebfea8b0f30ff0ebd172c31ba
[ "BSD-3-Clause" ]
1
2018-10-23T16:18:01.000Z
2018-10-23T16:18:01.000Z
from ....settings import DATABASES, TEST_RUNNER from django.test import TestCase class TestSettingsAndCore(TestCase): def test_database(self): checklist = ['ENGINE', 'NAME', 'USER', 'PASSWORD', 'HOST', 'PORT'] self.assertTrue('default' in DATABASES) self.assertIn([x for x in checklist][0], DATABASES['default']) def test_test_runner(self): self.assertTrue('django_nose.NoseTestSuiteRunner', TEST_RUNNER)
34.461538
74
0.696429
b08ccb7149e5ed62c7c5be424e3ff24a7953a08c
10,368
py
Python
train.py
theresearchai/vehicle_routing_rl
b3e0fc349d1a175c0c07011a55b2bfe1d52e591f
[ "MIT" ]
2
2021-01-20T18:46:10.000Z
2021-11-10T10:07:32.000Z
train.py
theresearchai/vehicle_routing_rl
b3e0fc349d1a175c0c07011a55b2bfe1d52e591f
[ "MIT" ]
null
null
null
train.py
theresearchai/vehicle_routing_rl
b3e0fc349d1a175c0c07011a55b2bfe1d52e591f
[ "MIT" ]
2
2021-10-05T09:37:16.000Z
2021-10-07T18:55:32.000Z
## File for training and evaluation of model import os import time from tqdm import tqdm import torch import math import numpy as np from torch.utils.data import DataLoader from torch.nn import DataParallel from nets.attention_model import set_decode_type from utils.log_utils import log_values from utils import move_to # Load model based on the architecture of machine def get_inner_model(model): return model.module if isinstance(model, DataParallel) else model # Validating the model based on validation dataset and reporting average distance def validate(model, dataset, opts): # Validate print('Validating...') cost = rollout(model, dataset, opts) avg_cost = cost.mean() print('Validation overall avg_cost: {} +- {}'.format( avg_cost, torch.std(cost) / math.sqrt(len(cost)))) return avg_cost def rollout(model, dataset, opts): # Put in greedy evaluation mode! set_decode_type(model, "greedy") model.eval() def eval_model_bat(bat): with torch.no_grad(): cost, _ = model(move_to(bat, opts.device)) return cost.data.cpu() return torch.cat([ eval_model_bat(bat) for bat in tqdm(DataLoader(dataset, batch_size=opts.eval_batch_size), disable=opts.no_progress_bar) ], 0) def clip_grad_norms(param_groups, max_norm=math.inf): """ Clips the norms for all param groups to max_norm and returns gradient norms before clipping :param optimizer: Adams Optimizer with variable learning rate :param max_norm: The maximum value of gradient, given by opts.max_grad_norm :param gradient_norms_log: :return: grad_norms, clipped_grad_norms: list with (clipped) gradient norms per group """ grad_norms = [ torch.nn.utils.clip_grad_norm_( group['params'], max_norm if max_norm > 0 else math.inf, # Inf so no clipping but still call to calc norm_type=2 ) for group in param_groups ] grad_norms_clipped = [min(g_norm, max_norm) for g_norm in grad_norms] if max_norm > 0 else grad_norms return grad_norms, grad_norms_clipped def train_epoch(model, optimizer, baseline, lr_scheduler, epoch, val_dataset, problem, tb_logger, opts, old_log_likelihood = None): """ Training of model for given number of epochs :param model: Attention model selected in run.py :param optimizer: Adams Optimizer with variable learning rate :param baseline: Baseline or Critic chosen to perform experiment :param lr_scheduler: Change the learning rate after each epoch :param epoch: Number of training epochs for each experiment :param val_dataset: Validation dataset used to validate the model after every epoch :param problem: Problem to solve (CVRP) :param tb_logger: Logger to save important value after every few steps :param opts: Configuration established in the run command or by default values :param old_log_likelihood: Policy for previous iterations :return: Likelihood values(Policy) of the current epoch """ print("Start train epoch {}, lr={} for run {}".format(epoch, optimizer.param_groups[0]['lr'], opts.run_name)) # Calculate number of times we train a model on problem instance in each epoch [Parameter Used: opts.epoch_size, opts.batch_size] step = epoch * (opts.epoch_size // opts.batch_size) start_time = time.time() # Connecting model to tensorboard if not opts.no_tensorboard: tb_logger.log_value('learnrate_pg0', optimizer.param_groups[0]['lr'], step) # Generate new training data for each epoch, each trains on a different problem instance for 'step' times training_dataset = baseline.wrap_dataset(problem.make_dataset( size=opts.graph_size, num_samples=opts.epoch_size, distribution=opts.data_distribution)) training_dataloader = DataLoader(training_dataset, batch_size=opts.batch_size, num_workers=1) # Put model in train mode! model.train() # Training happens in sampling mode to allow the model to explore different paths """ Different Sampling modes :sample: Use multinomial distribution to sample node :greedy: Use max probability to sample node """ set_decode_type(model, "sampling") collect_old_log_likelihoods = [] # Run a particular dataset 'step' times in each epochs for batch_id, batch in enumerate(tqdm(training_dataloader, disable=opts.no_progress_bar)): # Run each step in an epoch old_log_like = train_batch( model, optimizer, baseline, epoch, batch_id, step, batch, tb_logger, opts, old_log_likelihood ) collect_old_log_likelihoods.append(old_log_like) step += 1 # print(collect_old_log_likelihoods[-1], len(collect_old_log_likelihoods)) epoch_duration = time.time() - start_time print("Finished epoch {}, took {} s".format(epoch, time.strftime('%H:%M:%S', time.gmtime(epoch_duration)))) # Save model after every epoch, allows to load model again if it fails at any given epoch if (opts.checkpoint_epochs != 0 and epoch % opts.checkpoint_epochs == 0) or epoch == opts.n_epochs - 1: print('Saving model and state...') torch.save( { 'model': get_inner_model(model).state_dict(), 'optimizer': optimizer.state_dict(), 'rng_state': torch.get_rng_state(), 'cuda_rng_state': torch.cuda.get_rng_state_all(), 'baseline': baseline.state_dict() }, os.path.join(opts.save_dir, 'epoch-{}.pt'.format(epoch)) ) # Validate the model after completion of epoch on validation datasets avg_reward = validate(model, val_dataset, opts) if not opts.no_tensorboard: tb_logger.log_value('val_avg_reward', avg_reward, step) # Update the baseline with the newly trained model (only for baseline = rollout) baseline.epoch_callback(model, epoch) # lr_scheduler should be called at end of epoch lr_scheduler.step() # Select the final policy on a given dataset last_iter_log_prob = move_to(collect_old_log_likelihoods[-1], opts.device) return last_iter_log_prob def train_batch( model, optimizer, baseline, epoch, batch_id, step, batch, tb_logger, opts, old_log_likelihood = None ): """ Training of model for each step in epoch :param model: Attention model selected in run.py :param optimizer: Adams Optimizer with variable learning rate :param baseline: Baseline or Critic chosen to perform experiment :param epoch: Number of training epochs for each experiment :param step: Number of times we train a model on problem instance in each epoch :param batch_id: Batch id of each batch :param batch: Problem instances in a given batch (default 512) :param tb_logger: Logger to save important value after every few steps :param opts: Configuration established in the run command or by default values :param old_log_likelihood: Policy for previous iterations :return: Likelihood values(Policy) of the current step """ # Seperate the inputvalue of batch size and any inital value of cost x, bl_val = baseline.unwrap_batch(batch) # Move the variable to device based on whether GPU is available or not [Parameter used: opts.device] x = move_to(x, opts.device) bl_val = move_to(bl_val, opts.device) if bl_val is not None else None # Evaluate model, get costs and log likelihood cost, log_likelihood = model(x) # For the first epoch we do not have any old policy, therefore we use the average value of current likelihood as subsitute shapeOfLikelihood = log_likelihood.shape if old_log_likelihood == None: # Getting the mean value of likelihood for a given batch mean_likelihood = log_likelihood.mean().item() old_log_likelihood = np.full(shapeOfLikelihood[0], mean_likelihood) old_log_likelihood = torch.as_tensor(old_log_likelihood) old_log_likelihood = move_to(old_log_likelihood, opts.device) log_likelihood = move_to(log_likelihood, opts.device) # Evaluate baseline/critic, get baseline/critic loss if any bl_val, bl_loss = baseline.eval(x, cost) if bl_val is None else (bl_val, 0) # Reshape critic output to for faster operations bl_val_1 = torch.reshape(bl_val, (-1,)) # Calculate Advantage function, this enable algorithm to compare action loss with critic or baseline loss advantage = cost - bl_val # Clipping values for PPO loss (default 0.2, selected in paper) clip_param = 0.2 # Define the PPO loss function # Note: Dividing likelihoods can lead to unexpected behavior, therefore we subtract log likelihoods and then exponentiate them ratio = log_likelihood - old_log_likelihood ratio = torch.exp(ratio) surr1 = ratio # Clipping the gradients surr2 = torch.clamp(ratio, 1.0 - clip_param, 1.0 + clip_param) # Selecting the minimum values between original and clipped gradients actor_loss = torch.min(surr1, surr2) # Combining all the values # Note: We add an extra 0.5xbl_loss to allow the LSTM model to update its parameters using backpropogation loss = 0.5 * bl_loss + (-(bl_val_1 - cost) * actor_loss).mean() #Added negative sign # Perform backward pass and optimization step optimizer.zero_grad() loss.backward() # Clip gradient norms and get (clipped) gradient norms for logging grad_norms = clip_grad_norms(optimizer.param_groups, opts.max_grad_norm) optimizer.step() # Logging values after every few steps [parameter used: opts.log_step] if step % int(opts.log_step) == 0: log_values(cost, grad_norms, epoch, batch_id, step, log_likelihood, loss, bl_loss, tb_logger, opts) # Retunr Likelihood values after each step return log_likelihood
40.980237
140
0.67988
cda40d1241374f8c94176e9fafd35ab250d46050
1,467
cs
C#
LemonTS/Assets/LemonTS/Scripts/TsMgr.cs
onelei/LemonTS
a0646d7ada5a7c963567a7b6498517684cde7ab1
[ "MIT" ]
1
2021-01-16T20:49:15.000Z
2021-01-16T20:49:15.000Z
LemonTS/Assets/LemonTS/Scripts/TsMgr.cs
onelei/LemonTS
a0646d7ada5a7c963567a7b6498517684cde7ab1
[ "MIT" ]
null
null
null
LemonTS/Assets/LemonTS/Scripts/TsMgr.cs
onelei/LemonTS
a0646d7ada5a7c963567a7b6498517684cde7ab1
[ "MIT" ]
null
null
null
using System.Collections; using System.Collections.Generic; using UnityEngine; using Puerts; using System; using System.IO; namespace LemonTS { public class TsMgr : MonoBehaviour { public static string TsInitFilePath = "TsInit.js"; public static JsEnv jsEnv; public static TsLoader loader = new TsLoader(); public delegate void ts_func_object(object args); public static void Init() { //jsEnv.Eval("require('QuickStart')"); loader = new TsLoader(Application.dataPath + "/TsProject/"); jsEnv = new JsEnv(loader); ExecuteFile(TsInitFilePath); } public static void ExecuteFile(string filename) { if (loader.FileExists(filename)) { string debugPath; var context = loader.ReadFile(filename, out debugPath); Eval(context, debugPath); } else { throw new InvalidProgramException("can not find " + filename); } } public static void Eval(string chunk, string chunkName = "chunk") { jsEnv.Eval(chunk, chunkName); } public static void EvalAction(string func_name, object value) { var func = jsEnv.Eval<ts_func_object>(func_name); if (func != null) { func(value); } } } }
26.196429
78
0.549421
b06857ea3c82de6ae01203385006db54afdcc9a6
3,008
py
Python
tomt/data/imdb.py
samarthbhargav/tomt-data
1132222c4a93ce0330faf0df918575e3cc037c9b
[ "MIT" ]
null
null
null
tomt/data/imdb.py
samarthbhargav/tomt-data
1132222c4a93ce0330faf0df918575e3cc037c9b
[ "MIT" ]
null
null
null
tomt/data/imdb.py
samarthbhargav/tomt-data
1132222c4a93ce0330faf0df918575e3cc037c9b
[ "MIT" ]
null
null
null
import re import os import pickle as pkl from urllib.parse import urlparse import imdb imdb_id_re = re.compile("^tt[0-9]+") def extract_imdb_ids(urls): ids = set() for url in urls: url = urlparse(url) for p in url.path.split("/"): match = imdb_id_re.match(p) if match: ids.add(ImdbID(match.string)) return ids class IMDBApi: def __init__(self, imdb_cache_location): os.makedirs(imdb_cache_location, exist_ok=True) self.imdb_cache_location = imdb_cache_location self.ia = imdb.IMDb() def get_plot(self, movie): plots = movie.data.get("plot", []) if len(plots) == 0: return None return "\n\n".join(plots) def get_movie(self, imdb_id): # returns either: None, "<reason for failure>" # or (list of (title, links), "") if isinstance(imdb_id, ImdbID): imdb_id = imdb_id.id else: raise ValueError(f"Invalid type: {type(imdb_id)}") file_loc = os.path.join(self.imdb_cache_location, imdb_id) if os.path.exists(file_loc): with open(file_loc, "rb") as reader: movie = pkl.load(reader) else: movie = self.ia.get_movie(imdb_id[2:]) with open(file_loc, "wb") as writer: pkl.dump(movie, writer) return movie def resolve_redirects(self, imdb_ids): resolved = set() for imdb_id in imdb_ids: mov = self.get_movie(imdb_id) # if we query with one (deprecated/duplicate) ID # and it redirects it to the latest ID # mov.movieID -> query ID # mov.data["imdbID"] -> new ID resolved.add(ImdbID(mov.data["imdbID"])) return resolved class ImdbID: IMDB_RE = re.compile("^[a-z]{2}[0-9]+", flags=re.IGNORECASE) def __init__(self, imdb_id): if isinstance(imdb_id, int): self.id = f"tt{imdb_id}" elif isinstance(imdb_id, str) and self.IMDB_RE.fullmatch(imdb_id): self.id = imdb_id.lower() elif isinstance(imdb_id, str) and re.fullmatch("^[0-9]+", imdb_id): self.id = f"tt{imdb_id}" elif isinstance(imdb_id, ImdbID): self.id = imdb_id.id else: raise ValueError(f"Invalid IMDB id {imdb_id}") def __eq__(self, obj): if isinstance(obj, int) or isinstance(obj, str): obj = ImdbID(obj) elif isinstance(obj, ImdbID): pass elif obj is None: return False else: raise ValueError(f"Unsupported comparision {self}<>{obj}") return self.id == obj.id def __ne__(self, obj): return not self == obj def __str__(self): return self.id def __repr__(self): return f"ImdbID({self.id})" def __hash__(self): return hash(self.id) def startswith(self, sub): return self.id.startswith(sub)
28.377358
75
0.569814
fb5c1ffe28916c9635b357518b79671574e9f75a
527
swift
Swift
Sources/UIImageColors/Deprecated.swift
nighthawk/UIImageColors
1d5b75ef02b13fafa0425125019f8368224e9960
[ "MIT" ]
10
2021-11-05T14:23:50.000Z
2022-03-08T04:15:03.000Z
Sources/UIImageColors/Deprecated.swift
nighthawk/UIImageColors
1d5b75ef02b13fafa0425125019f8368224e9960
[ "MIT" ]
null
null
null
Sources/UIImageColors/Deprecated.swift
nighthawk/UIImageColors
1d5b75ef02b13fafa0425125019f8368224e9960
[ "MIT" ]
2
2021-11-11T12:31:08.000Z
2021-12-11T06:39:15.000Z
// // Deprecated.swift // UIImageColors // // Created by Felix Herrmann on 05.10.21. // #if canImport(UIKit) import UIKit @available(*, deprecated, renamed: "UIImage.Colors") public typealias UIImageColors = UIImage.Colors #endif #if canImport(AppKit) && !targetEnvironment(macCatalyst) import AppKit @available(*, deprecated, renamed: "NSImage.Colors") public typealias UIImageColors = NSImage.Colors #endif @available(*, deprecated, renamed: "ScaleQuality") public typealias UIImageColorsQuality = ScaleQuality
17.566667
56
0.753321
457c568091d3e59679151054417b66eb0a5bd907
2,010
py
Python
tests/test_endpoints.py
orlandodiaz/insta_api
5dc5914a751fd7c2b1fcfe50fea792112d6d50d5
[ "MIT" ]
11
2018-10-10T19:18:27.000Z
2021-05-29T17:15:42.000Z
tests/test_endpoints.py
orlandodiaz/insta_api
5dc5914a751fd7c2b1fcfe50fea792112d6d50d5
[ "MIT" ]
3
2020-02-21T14:10:59.000Z
2022-01-25T00:36:33.000Z
tests/test_endpoints.py
orlandodiaz/insta_api
5dc5914a751fd7c2b1fcfe50fea792112d6d50d5
[ "MIT" ]
5
2019-04-03T09:46:38.000Z
2022-01-24T23:52:26.000Z
import pytest from insta_api.insta_api import InstaAPI from insta_api.endpoints import * @pytest.fixture(scope="module") def insta(): insta = InstaAPI(use_cookies=False) yield insta insta._close_session() class TestEndpoints: """ These tests make sure that the API endpoints are still reachable and not moved""" def test_base_endpoint(self, insta): resp = insta.ses.head(base_endpoint) assert resp.status_code != 404 def test_login_endpoint(self, insta): resp = insta.ses.head(base_endpoint + login_endpoint) assert resp.status_code != 404 def test_upload_photo_endpoint(self, insta): resp = insta.ses.head(base_endpoint + post_photo_endpoint1) assert resp.status_code != 404 def test_exploretag_endpoint(self, insta): resp = insta.ses.head(base_endpoint + explore_tag.format(hashtag="test")) assert resp.status_code != 404 def test_like_endpoint(self, insta): resp = insta.ses.head(base_endpoint + like_endpoint.format(media_id='_')) assert resp.status_code != 404 def test_follow_endpoint(self, insta): resp = insta.ses.head(base_endpoint + follow_endpoint.format(user_id="0")) assert resp.status_code != 404 def test_unfollow_endpoint(self, insta): resp = insta.ses.head(base_endpoint + unfollow_endpoint.format(user_id="0")) assert resp.status_code != 404 def test_graphql_endpoint(self, insta): resp = insta.ses.head(base_endpoint + graphql_endpoint) assert resp.status_code != 404 def test_logout_endpoint(self, insta): resp = insta.ses.head(base_endpoint + logout_endpoint) assert resp.status_code != 404 def test_hashtag_suggestions_endpoint(self, insta): resp = insta.ses.head(base_endpoint + search_hashtag_endpoint) assert resp.status_code != 404
32.95082
89
0.658706
c9c3270e7c59c10cf535c54357c4213b61f1efba
808
ts
TypeScript
test-project/src/generated/__type__/parent/tests/JsonStringEnumMixedTest.ts
jsoncodegen/generator-typescript
ca3525d9f4a727268222e5031d93538a76755611
[ "MIT" ]
null
null
null
test-project/src/generated/__type__/parent/tests/JsonStringEnumMixedTest.ts
jsoncodegen/generator-typescript
ca3525d9f4a727268222e5031d93538a76755611
[ "MIT" ]
null
null
null
test-project/src/generated/__type__/parent/tests/JsonStringEnumMixedTest.ts
jsoncodegen/generator-typescript
ca3525d9f4a727268222e5031d93538a76755611
[ "MIT" ]
null
null
null
import { JsonStringEnum as __type___JsonStringEnum } from "../../JsonStringEnum" import { JsonStringEnum as __type___parent_JsonStringEnum } from "../JsonStringEnum" import { JsonStringEnum as __type___parent_sibling_JsonStringEnum } from "../sibling/JsonStringEnum" import { JsonStringEnum as __type___parent_tests_JsonStringEnum } from "./JsonStringEnum" import { JsonStringEnum as __type___parent_tests_child_JsonStringEnum } from "./child/JsonStringEnum" /** * This tests string enum fields. */ export interface JsonStringEnumMixedTest { readonly child: __type___parent_tests_child_JsonStringEnum readonly local: __type___parent_tests_JsonStringEnum readonly parent: __type___parent_JsonStringEnum readonly root: __type___JsonStringEnum readonly sibling: __type___parent_sibling_JsonStringEnum }
47.529412
101
0.841584
e75857b4090a89aa13063f2cc700ae79944d73db
773
php
PHP
mysite/code/Blocks/SectionLinkBlock.php
ByronMorley/silverstripe_master_template
84d721de82fd2039d0e48b346e34e54bda683175
[ "MIT" ]
null
null
null
mysite/code/Blocks/SectionLinkBlock.php
ByronMorley/silverstripe_master_template
84d721de82fd2039d0e48b346e34e54bda683175
[ "MIT" ]
null
null
null
mysite/code/Blocks/SectionLinkBlock.php
ByronMorley/silverstripe_master_template
84d721de82fd2039d0e48b346e34e54bda683175
[ "MIT" ]
null
null
null
<?php class SectionLinkBlock extends Section { private static $db = array( 'href' => 'VarChar(250)', 'name' => 'VarChar(100)', 'prompt' => 'VarChar(100)', 'internal' => 'Boolean' ); public function getCMSFields() { $fields = parent::getCMSFields(); $fieldList = array( TextField::create( 'href','Link'), TextField::create('name', 'Name'), TextField::create('prompt', 'Prompt'), CheckboxField::create('internal', 'Internal link') ); $fields->addFieldsToTab("Root.Main", $fieldList); return $fields; } public function populateDefaults() { $this->prompt = "Cysallt"; parent::populateDefaults(); } }
21.472222
62
0.531695
3fa333972915dfc76fd2662171a9a7c90fb1ba06
1,204
php
PHP
src/SaleDocument/Unlock.php
bigyouth/cegid-y2-sdk
ab202c4b6b7c6b6860e8e4807fc4d887b8284741
[ "MIT" ]
7
2019-09-01T14:46:00.000Z
2022-02-07T14:18:22.000Z
src/SaleDocument/Unlock.php
bigyouth/cegid-y2-sdk
ab202c4b6b7c6b6860e8e4807fc4d887b8284741
[ "MIT" ]
null
null
null
src/SaleDocument/Unlock.php
bigyouth/cegid-y2-sdk
ab202c4b6b7c6b6860e8e4807fc4d887b8284741
[ "MIT" ]
2
2019-11-26T10:37:12.000Z
2021-02-26T11:12:07.000Z
<?php namespace Y2\SaleDocument; class Unlock { /** * @var Unlock_Request $unlockRequest */ protected $unlockRequest = null; /** * @var RetailContext $clientContext */ protected $clientContext = null; /** * @param Unlock_Request $unlockRequest * @param RetailContext $clientContext */ public function __construct($unlockRequest, $clientContext) { $this->unlockRequest = $unlockRequest; $this->clientContext = $clientContext; } /** * @return Unlock_Request */ public function getUnlockRequest() { return $this->unlockRequest; } /** * @param Unlock_Request $unlockRequest * @return Unlock */ public function setUnlockRequest($unlockRequest) { $this->unlockRequest = $unlockRequest; return $this; } /** * @return RetailContext */ public function getClientContext() { return $this->clientContext; } /** * @param RetailContext $clientContext * @return Unlock */ public function setClientContext($clientContext) { $this->clientContext = $clientContext; return $this; } }
18.523077
63
0.598007
d41b631ad4d189bc0de4732b170534ae3e1a49b3
878
asm
Assembly
programs/oeis/108/A108954.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
1
2021-03-15T11:38:20.000Z
2021-03-15T11:38:20.000Z
programs/oeis/108/A108954.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
programs/oeis/108/A108954.asm
jmorken/loda
99c09d2641e858b074f6344a352d13bc55601571
[ "Apache-2.0" ]
null
null
null
; A108954: a(n) = pi(2*n) - pi(n). Number of primes in the interval (n,2n]. ; 1,1,1,2,1,2,2,2,3,4,3,4,3,3,4,5,4,4,4,4,5,6,5,6,6,6,7,7,6,7,7,7,7,8,8,9,9,9,9,10,9,10,9,9,10,10,9,9,10,10,11,12,11,12,13,13,14,14,13,13,12,12,12,13,13,14,13,13,14,15,14,14,13,13,14,15,15,15,15,15,15,16,15,16,16,16,17,17,16,17,18,18,18,18,18,19,19,19,20,21,20,20,19,19,19,20,19,19,18,18,18,19,18,19,20,20,21,21,21,22,23,23,23,23,23,24,23,23,24,24,23,24,24,24,25,26,25,25,25,25,26,27,27,27,27,27,28,28,27,27,26,26,26,27,27,28,28,28,29,29,29,29,28,28,28,29,28,28,29,29,29,29,28,29,30,30,31,31,30,31,30,30,30,31,31,31,32,32,32,33,32,33,32,32,33,33,32,32,32,32,33,33,33,33,34,34,34,34,34,35,35,35,35,35,35,36,37,37,37,38,38,39,38,38,39,39,38,38,38,38,39,40,39,40,40,40,40,40,39,40,39,39,39,40,40,41,41,41,41,42 mov $2,$0 mul $2,2 mov $0,$2 add $0,1 cal $0,55718 ; Erroneous version of A056171. mov $1,$0
87.8
707
0.638952
20cd5fadeffe69f875b8a42d9cf0e70933e93780
972
cs
C#
MainFunctionality/SOLID/StrategyPattern/Program.cs
tanyta78/CSharpOOPAdv
d98d959ecc15e247e6a37b9c1a911ecc288f9e30
[ "MIT" ]
null
null
null
MainFunctionality/SOLID/StrategyPattern/Program.cs
tanyta78/CSharpOOPAdv
d98d959ecc15e247e6a37b9c1a911ecc288f9e30
[ "MIT" ]
null
null
null
MainFunctionality/SOLID/StrategyPattern/Program.cs
tanyta78/CSharpOOPAdv
d98d959ecc15e247e6a37b9c1a911ecc288f9e30
[ "MIT" ]
null
null
null
namespace StrategyPattern { public class Program { static void Main() { /* public class Client { public IStrategy Strategy { get; set; } public void CallAlgorithm() { Console.WriteLine(Strategy.Algorithm()); } } public interface IStrategy { string Algorithm(); } public class ConcreteStrategyA : IStrategy { public string Algorithm() { return "Concrete Strategy A"; } } public class ConcreteStrategyB : IStrategy { public string Algorithm() { return "Concrete Strategy B"; } } */ } } }
23.142857
62
0.369342
173990946378b9b2068084f03768bb9ba46ea5c5
6,538
hpp
C++
libs/full/agas_base/include/hpx/agas_base/server/symbol_namespace.hpp
bhumitattarde/hpx
5b34d8d77b1664fa552445d44cd98e51dc69a74a
[ "BSL-1.0" ]
1
2022-02-08T05:55:09.000Z
2022-02-08T05:55:09.000Z
libs/full/agas_base/include/hpx/agas_base/server/symbol_namespace.hpp
deepaksuresh1411/hpx
aa18024d35fe9884a977d4b6076c764dbb8b26d1
[ "BSL-1.0" ]
null
null
null
libs/full/agas_base/include/hpx/agas_base/server/symbol_namespace.hpp
deepaksuresh1411/hpx
aa18024d35fe9884a977d4b6076c764dbb8b26d1
[ "BSL-1.0" ]
null
null
null
// Copyright (c) 2011 Bryce Adelstein-Lelbach // Copyright (c) 2012-2021 Hartmut Kaiser // Copyright (c) 2016 Thomas Heller // // SPDX-License-Identifier: BSL-1.0 // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #pragma once #include <hpx/config.hpp> #include <hpx/actions/transfer_action.hpp> #include <hpx/actions_base/component_action.hpp> #include <hpx/agas_base/agas_fwd.hpp> #include <hpx/async_distributed/base_lco_with_value.hpp> #include <hpx/async_distributed/transfer_continuation_action.hpp> #include <hpx/components_base/component_type.hpp> #include <hpx/components_base/server/fixed_component_base.hpp> #include <hpx/functional/function.hpp> #include <hpx/modules/errors.hpp> #include <hpx/naming_base/id_type.hpp> #include <hpx/synchronization/spinlock.hpp> #include <atomic> #include <cstdint> #include <map> #include <memory> #include <string> #include <utility> #include <vector> #include <hpx/config/warnings_prefix.hpp> namespace hpx { namespace agas { HPX_EXPORT naming::gid_type bootstrap_symbol_namespace_gid(); HPX_EXPORT hpx::id_type bootstrap_symbol_namespace_id(); }} // namespace hpx::agas namespace hpx { namespace agas { namespace server { // Base name used to register the component static constexpr char const* const symbol_namespace_service_name = "symbol/"; struct HPX_EXPORT symbol_namespace : components::fixed_component_base<symbol_namespace> { using mutex_type = hpx::spinlock; using base_type = components::fixed_component_base<symbol_namespace>; using iterate_names_return_type = std::map<std::string, naming::gid_type>; using gid_table_type = std::map<std::string, std::shared_ptr<naming::gid_type>>; using on_event_data_map_type = std::multimap<std::string, hpx::id_type>; private: mutex_type mutex_; gid_table_type gids_; std::string instance_name_; on_event_data_map_type on_event_data_; public: // data structure holding all counters for the omponent_namespace component struct counter_data { public: HPX_NON_COPYABLE(counter_data); public: typedef hpx::spinlock mutex_type; struct api_counter_data { api_counter_data() : count_(0) , time_(0) , enabled_(false) { } std::atomic<std::int64_t> count_; std::atomic<std::int64_t> time_; bool enabled_; }; counter_data() = default; public: // access current counter values std::int64_t get_bind_count(bool); std::int64_t get_resolve_count(bool); std::int64_t get_unbind_count(bool); std::int64_t get_iterate_names_count(bool); std::int64_t get_on_event_count(bool); std::int64_t get_overall_count(bool); std::int64_t get_bind_time(bool); std::int64_t get_resolve_time(bool); std::int64_t get_unbind_time(bool); std::int64_t get_iterate_names_time(bool); std::int64_t get_on_event_time(bool); std::int64_t get_overall_time(bool); // increment counter values void increment_bind_count(); void increment_resolve_count(); void increment_unbind_count(); void increment_iterate_names_count(); void increment_on_event_count(); void enable_all(); api_counter_data bind_; // symbol_ns_bind api_counter_data resolve_; // symbol_ns_resolve api_counter_data unbind_; // symbol_ns_unbind api_counter_data iterate_names_; // symbol_ns_iterate_names api_counter_data on_event_; // symbol_ns_on_event }; counter_data counter_data_; public: symbol_namespace() : base_type(agas::symbol_ns_msb, agas::symbol_ns_lsb) { } void finalize(); // register all performance counter types exposed by this component static void register_counter_types(error_code& ec = throws); static void register_global_counter_types(error_code& ec = throws); void register_server_instance(char const* servicename, std::uint32_t locality_id = naming::invalid_locality_id, error_code& ec = throws); void unregister_server_instance(error_code& ec = throws); bool bind(std::string key, naming::gid_type gid); naming::gid_type resolve(std::string const& key); naming::gid_type unbind(std::string const& key); iterate_names_return_type iterate(std::string const& pattern); bool on_event(std::string const& name, bool call_for_past_events, hpx::id_type lco); HPX_DEFINE_COMPONENT_ACTION(symbol_namespace, bind) HPX_DEFINE_COMPONENT_ACTION(symbol_namespace, resolve) HPX_DEFINE_COMPONENT_ACTION(symbol_namespace, unbind) HPX_DEFINE_COMPONENT_ACTION(symbol_namespace, iterate) HPX_DEFINE_COMPONENT_ACTION(symbol_namespace, on_event) }; }}} // namespace hpx::agas::server HPX_ACTION_USES_MEDIUM_STACK(hpx::agas::server::symbol_namespace::bind_action) HPX_REGISTER_ACTION_DECLARATION( hpx::agas::server::symbol_namespace::bind_action, symbol_namespace_bind_action) HPX_ACTION_USES_MEDIUM_STACK( hpx::agas::server::symbol_namespace::resolve_action) HPX_REGISTER_ACTION_DECLARATION( hpx::agas::server::symbol_namespace::resolve_action, symbol_namespace_resolve_action) HPX_ACTION_USES_MEDIUM_STACK(hpx::agas::server::symbol_namespace::unbind_action) HPX_REGISTER_ACTION_DECLARATION( hpx::agas::server::symbol_namespace::unbind_action, symbol_namespace_unbind_action) HPX_ACTION_USES_MEDIUM_STACK( hpx::agas::server::symbol_namespace::iterate_action) HPX_REGISTER_ACTION_DECLARATION( hpx::agas::server::symbol_namespace::iterate_action, symbol_namespace_iterate_action) HPX_ACTION_USES_MEDIUM_STACK( hpx::agas::server::symbol_namespace::on_event_action) HPX_REGISTER_ACTION_DECLARATION( hpx::agas::server::symbol_namespace::on_event_action, symbol_namespace_on_event_action) #include <hpx/config/warnings_suffix.hpp>
33.187817
83
0.683236
819f5b82fc08a73b87375e0607e113dea6c8b357
740
php
PHP
plugins/AdminMenuEditorPro.php
arjendejong12/composer-wp-pro-plugins
fa6515ac6cff32f288a6a55176230c5320f8a9b2
[ "MIT" ]
null
null
null
plugins/AdminMenuEditorPro.php
arjendejong12/composer-wp-pro-plugins
fa6515ac6cff32f288a6a55176230c5320f8a9b2
[ "MIT" ]
null
null
null
plugins/AdminMenuEditorPro.php
arjendejong12/composer-wp-pro-plugins
fa6515ac6cff32f288a6a55176230c5320f8a9b2
[ "MIT" ]
null
null
null
<?php /** * Admin Menu Editor Pro Plugin. * * @package arjendejong12\Composer\WPProPlugins\Plugins */ namespace arjendejong12\Composer\WPProPlugins\Plugins; /** * AdminMenuEditorPro class. */ class AdminMenuEditorPro { /** * The version number of the plugin to download. * * @var string Version number. */ protected $version = ''; /** * AdminMenuEditorPro constructor. * * @param string $version */ public function __construct( $version = '' ) { $this->version = $version; } /** * Get the download URL for this plugin. * * @return string */ public function getDownloadUrl() { return 'https://adminmenueditor.com/?get_product=admin-menu-editor-pro&license_key=' . getenv( 'AME_PRO_KEY' ); } }
18.04878
113
0.671622
06cf33ab66415b57a802f9563c68de6fd0aadbd3
1,162
py
Python
singlet/io/csv/__init__.py
iosonofabio/singlet
66d3b13581f571450c9551e99d86845cce992d32
[ "MIT" ]
11
2017-09-12T02:45:33.000Z
2021-05-18T13:04:12.000Z
singlet/io/csv/__init__.py
Takshan/singlet
66d3b13581f571450c9551e99d86845cce992d32
[ "MIT" ]
6
2017-10-03T22:14:42.000Z
2019-02-02T05:12:20.000Z
singlet/io/csv/__init__.py
Takshan/singlet
66d3b13581f571450c9551e99d86845cce992d32
[ "MIT" ]
4
2018-02-15T12:00:04.000Z
2021-03-25T12:26:04.000Z
# vim: fdm=indent # author: Fabio Zanini # date: 02/08/17 # content: Support module for filenames related to CSV/TSV files. # Modules import numpy as np from singlet.config import config csv_formats = ['csv', 'tsv', 'csv.gz', 'tsv.gz'] # Parser def parse_samplesheet(path, fmt): import pandas as pd if fmt in ('tsv', 'tsv.gz'): sep = '\t' elif fmt in ('csv', 'csv.gz'): sep = ',' else: raise ValueError('Format not understood') table = pd.read_csv(path, sep=sep, index_col=False) return table def parse_featuresheet(path, fmt): import pandas as pd if fmt in ('tsv', 'tsv.gz'): sep = '\t' elif fmt in ('csv', 'csv.gz'): sep = ',' else: raise ValueError('Format not understood') table = pd.read_csv(path, sep=sep, index_col=False) return table def parse_counts_table(path, fmt): import pandas as pd if fmt in ('tsv', 'tsv.gz'): sep = '\t' elif fmt in ('csv', 'csv.gz'): sep = ',' else: raise ValueError('Format not understood') table = pd.read_csv(path, sep=sep, index_col=False) return table
21.518519
68
0.591222
8ba83e34e6d3a54a64b2f94081d4d24084da849b
772
rb
Ruby
spec/word_integration_spec.rb
cleriphil/dictionary
40df51a887a23d7ac256df60e73096f9ad948536
[ "MIT" ]
null
null
null
spec/word_integration_spec.rb
cleriphil/dictionary
40df51a887a23d7ac256df60e73096f9ad948536
[ "MIT" ]
null
null
null
spec/word_integration_spec.rb
cleriphil/dictionary
40df51a887a23d7ac256df60e73096f9ad948536
[ "MIT" ]
null
null
null
require('capybara/rspec') require('./app') Capybara.app = Sinatra::Application set(:show_expectations, false) describe('the path of the Word class', {:type => :feature}) do it('processes the user input returns a list of words in the homepage') do visit('/') fill_in('word', :with => 'paint') click_button('Add Word') expect(page).to have_content('Your word has been added!') click_link('Back Home') click_link('paint') expect(page).to have_content('Definitions for paint') fill_in('part_of_speech', :with => 'noun') fill_in('meaning', :with => 'a liquid substance') click_button('Add Definition') expect(page).to have_content('Your definition has been added') click_link('Back Home') expect(page).to have_content('Your Dictionary') end end
32.166667
75
0.708549
bacb5938952c163eefdad96eeb83138eba0a9528
420
go
Go
types/sendmail.go
Virus-V/ican
c38a801a975a6dde817c0fa256605877ba9801f2
[ "MIT" ]
null
null
null
types/sendmail.go
Virus-V/ican
c38a801a975a6dde817c0fa256605877ba9801f2
[ "MIT" ]
null
null
null
types/sendmail.go
Virus-V/ican
c38a801a975a6dde817c0fa256605877ba9801f2
[ "MIT" ]
null
null
null
package types import ( "github.com/google/uuid" ) // 发送邮件模块 // SrvSendMailUUID 发送邮件服务 var SrvSendMailUUID = uuid.UUID{0xa, 0x6f, 0x7d, 0xe5, 0x1, 0xf, 0x45, 0xf6, 0x8b, 0xa2, 0x40, 0xf2, 0x95, 0x67, 0x55, 0x80} // MailAddr 邮件地址属性 type MailAddr struct { Addr string // 邮件地址 Name string // 收件人姓名 } // SendMailService 发送邮件接口 type SendMailService interface { SendTo(MailAddr, string, string) error // 发送给某人,主题,内容 }
19.090909
124
0.716667
01e3827e26e27a7b379c3ad309626a09172afab5
805
lua
Lua
data/scripts/actions/other/costume_bag.lua
Waclaw-I/BagnoOTS
dbeb04322698ecdb795eba196872815b36ca134f
[ "MIT" ]
null
null
null
data/scripts/actions/other/costume_bag.lua
Waclaw-I/BagnoOTS
dbeb04322698ecdb795eba196872815b36ca134f
[ "MIT" ]
null
null
null
data/scripts/actions/other/costume_bag.lua
Waclaw-I/BagnoOTS
dbeb04322698ecdb795eba196872815b36ca134f
[ "MIT" ]
null
null
null
local setting = { -- Common [653] = { "orc warrior", "pirate cutthroat", "dworc voodoomaster", "dwarf guard", "minotaur mage" }, -- Uncommon [654] = { "quara hydromancer", "diabolic imp", "banshee", "frost giant", "lich" }, -- Deluxe [655] = { "serpent spawn", "demon", "juggernaut", "behemoth", "ashmunrah" }, } local costumeBag = Action() function costumeBag.onUse(player, item, fromPosition, target, toPosition, isHotkey) local creatures = setting[item.itemid] if not creatures then return true end player:setMonsterOutfit(creatures[math.random(#creatures)], 5 * 60 * 10 * 1000) item:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED) item:remove() return true end for index, value in pairs(setting) do costumeBag:id(index) end costumeBag:register()
17.5
83
0.678261
c9d4507ff19bc5310fd0c70906d8df9a35589744
649
ts
TypeScript
src/types/Subscription.ts
tanem/hackernews-node
ddf7a372901425861f9988912add00bfc57c7560
[ "MIT" ]
1
2021-12-07T16:39:57.000Z
2021-12-07T16:39:57.000Z
src/types/Subscription.ts
tanem/hackernews-node
c825523b5b2280b5ee22aa002d6400f57dedc552
[ "MIT" ]
29
2020-08-01T02:23:04.000Z
2022-02-26T04:58:21.000Z
src/types/Subscription.ts
tanem/hackernews-node
ddf7a372901425861f9988912add00bfc57c7560
[ "MIT" ]
null
null
null
import { subscriptionType } from '@nexus/schema' import { Link } from './Link' import { Vote } from './Vote' export const Subscription = subscriptionType({ definition(t) { t.field('newLink', { type: Link, nullable: true, resolve(payload) { return payload }, subscribe(root, args, context) { return context.pubsub.asyncIterator('NEW_LINK') }, }) t.field('newVote', { type: Vote, nullable: true, resolve(payload) { return payload }, subscribe(root, args, context) { return context.pubsub.asyncIterator('NEW_VOTE') }, }) }, })
22.37931
55
0.571649
3f8d079d227dca4835d15c539bcb72c11a89e746
1,673
php
PHP
database/seeds/RolesSeeder.php
bachtiarfr/ta-hrms
21327fc08e7261506d18d11e758436af843498c1
[ "MIT" ]
null
null
null
database/seeds/RolesSeeder.php
bachtiarfr/ta-hrms
21327fc08e7261506d18d11e758436af843498c1
[ "MIT" ]
null
null
null
database/seeds/RolesSeeder.php
bachtiarfr/ta-hrms
21327fc08e7261506d18d11e758436af843498c1
[ "MIT" ]
null
null
null
<?php use Illuminate\Database\Seeder; class RolesSeeder extends Seeder { /** * Run the database seeds. * * @return void */ public function run() { \DB::table('roles')->insert([ [ 'name' => 'Admin | HR', 'description' => 'Has all the rights', 'created_at' => \Carbon\Carbon::now(), 'updated_at' => \Carbon\Carbon::now(), ], [ 'name' => 'Project Manager', 'description' => 'Project Manager', 'created_at' => \Carbon\Carbon::now(), 'updated_at' => \Carbon\Carbon::now(), ], [ 'name' => 'Software Developer | Front End', 'description' => 'Front End Developer', 'created_at' => \Carbon\Carbon::now(), 'updated_at' => \Carbon\Carbon::now(), ], [ 'name' => 'Software Developer | Back End', 'description' => 'Back End Developer', 'created_at' => \Carbon\Carbon::now(), 'updated_at' => \Carbon\Carbon::now(), ], [ 'name' => 'Designer', 'description' => 'Designer', 'created_at' => \Carbon\Carbon::now(), 'updated_at' => \Carbon\Carbon::now(), ], [ 'name' => 'Data Entry', 'description' => 'Back End Developer', 'created_at' => \Carbon\Carbon::now(), 'updated_at' => \Carbon\Carbon::now(), ], ]); } }
30.981481
59
0.410042
db6d4ee8dfe66097d6150f89299fad5d4cb1a685
2,564
php
PHP
routes/api.php
rakhacimano/api_laundry
9cc42bb4cb6540b6831fa2736452c944103a5486
[ "MIT" ]
null
null
null
routes/api.php
rakhacimano/api_laundry
9cc42bb4cb6540b6831fa2736452c944103a5486
[ "MIT" ]
null
null
null
routes/api.php
rakhacimano/api_laundry
9cc42bb4cb6540b6831fa2736452c944103a5486
[ "MIT" ]
null
null
null
<?php use App\Http\Controllers\MemberController; use App\Http\Controllers\OutletController; use App\Http\Controllers\PaketController; use App\Http\Controllers\UserController; use App\Http\Controllers\TransaksiController; use Illuminate\Http\Request; use Illuminate\Support\Facades\Route; Route::middleware('auth:sanctum')->get('/user', function (Request $request) { return $request->user(); }); // User Routers Route::post('user/register', [UserController::class, 'register']); Route::post('user/login', [UserController::class, 'login']); Route::put('user/{id}', [UserController::class, 'update']); Route::delete('user/{id}', [UserController::class, 'delete']); Route::get('user/login/check', [UserController::class, 'loginCheck']); Route::post('user/logout', [UserController::class, 'logout']); Route::get('user', [UserController::class, 'getAll']); Route::get('user/{id}', [UserController::class, 'getById']); // Displayable Routes Without Authentication Route::post('transaksi/report', [TransaksiController::class, 'report']); Route::get('paket', [PaketController::class, 'getAll']); Route::get('paket/{id_paket}', [PaketController::class, 'getById']); Route::get('member', [MemberController::class, 'getAll']); Route::get('member/{id_member}', [MemberController::class, 'getById']); Route::get('outlet', [OutletController::class, 'getAll']); Route::get('outlet/{id_outlet}', [OutletController::class, 'getById']); // Member Routers Route::group(['middleware' => ['jwt.verify:admin,kasir']], function () { // Transaksi Routers Route::post('transaksi', [TransaksiController::class, 'insert']); Route::put('transaksi/status', [TransaksiController::class, 'update_status']); Route::put('transaksi/bayar', [TransaksiController::class, 'update_bayar']); // Member Routers Route::post('member', [MemberController::class, 'insert']); Route::put('member/{id_member}', [MemberController::class, 'update']); Route::delete('member/{id_member}', [MemberController::class, 'delete']); }); // Outlet Routers Route::group(['middleware' => ['jwt.verify:admin']], function () { Route::post('outlet', [OutletController::class, 'insert']); Route::put('outlet/{id_outlet}', [OutletController::class, 'update']); Route::delete('outlet/{id_outlet}', [OutletController::class, 'delete']); // Paket Routers Route::post('paket', [PaketController::class, 'insert']); Route::put('paket/{id_paket}', [PaketController::class, 'update']); Route::delete('paket/{id_paket}', [PaketController::class, 'delete']); });
40.698413
82
0.695008
4f08eb11cb5d3999f3e9b9bd80012503e4718810
19,430
sql
SQL
bs.sql
KevindelCid/sbs
aec6fd8396f8352c2b07d54b2b0ac942798f11f6
[ "MIT" ]
null
null
null
bs.sql
KevindelCid/sbs
aec6fd8396f8352c2b07d54b2b0ac942798f11f6
[ "MIT" ]
null
null
null
bs.sql
KevindelCid/sbs
aec6fd8396f8352c2b07d54b2b0ac942798f11f6
[ "MIT" ]
null
null
null
-- MySQL dump 10.13 Distrib 8.0.20, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: bs -- ------------------------------------------------------ -- Server version 5.7.24 /*!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 */; /*!50503 SET NAMES utf8 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- -- Table structure for table `boms` -- DROP TABLE IF EXISTS `boms`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `boms` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `codigo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `nombres` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `apellidos` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `sexo` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `fecha_nacimiento` timestamp NOT NULL, `correo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `dpi` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `telefono1` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `telefono2` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `foto` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `boms_codigo_unique` (`codigo`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `boms` -- LOCK TABLES `boms` WRITE; /*!40000 ALTER TABLE `boms` DISABLE KEYS */; /*!40000 ALTER TABLE `boms` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `failed_jobs` -- DROP TABLE IF EXISTS `failed_jobs`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `failed_jobs` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `connection` text COLLATE utf8mb4_unicode_ci NOT NULL, `queue` text COLLATE utf8mb4_unicode_ci NOT NULL, `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL, `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL, `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `failed_jobs` -- LOCK TABLES `failed_jobs` WRITE; /*!40000 ALTER TABLE `failed_jobs` DISABLE KEYS */; /*!40000 ALTER TABLE `failed_jobs` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `migrations` -- DROP TABLE IF EXISTS `migrations`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `migrations` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `batch` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `migrations` -- LOCK TABLES `migrations` WRITE; /*!40000 ALTER TABLE `migrations` DISABLE KEYS */; INSERT INTO `migrations` VALUES (1,'2014_10_12_000000_create_users_table',1),(2,'2014_10_12_100000_create_password_resets_table',1),(3,'2019_08_19_000000_create_failed_jobs_table',1),(4,'2019_12_14_000001_create_personal_access_tokens_table',1),(5,'2021_10_02_065408_create_bom',1),(6,'2021_10_02_200111_create_permission_tables',1); /*!40000 ALTER TABLE `migrations` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `model_has_permissions` -- DROP TABLE IF EXISTS `model_has_permissions`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `model_has_permissions` ( `permission_id` bigint(20) unsigned NOT NULL, `model_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `model_id` bigint(20) unsigned NOT NULL, PRIMARY KEY (`permission_id`,`model_id`,`model_type`), KEY `model_has_permissions_model_id_model_type_index` (`model_id`,`model_type`), CONSTRAINT `model_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `model_has_permissions` -- LOCK TABLES `model_has_permissions` WRITE; /*!40000 ALTER TABLE `model_has_permissions` DISABLE KEYS */; /*!40000 ALTER TABLE `model_has_permissions` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `model_has_roles` -- DROP TABLE IF EXISTS `model_has_roles`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `model_has_roles` ( `role_id` bigint(20) unsigned NOT NULL, `model_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `model_id` bigint(20) unsigned NOT NULL, PRIMARY KEY (`role_id`,`model_id`,`model_type`), KEY `model_has_roles_model_id_model_type_index` (`model_id`,`model_type`), CONSTRAINT `model_has_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `model_has_roles` -- LOCK TABLES `model_has_roles` WRITE; /*!40000 ALTER TABLE `model_has_roles` DISABLE KEYS */; INSERT INTO `model_has_roles` VALUES (1,'App\\Models\\User',1),(2,'App\\Models\\User',2),(2,'App\\Models\\User',3),(2,'App\\Models\\User',4),(2,'App\\Models\\User',5),(2,'App\\Models\\User',6),(1,'App\\Models\\User',7),(2,'App\\Models\\User',8),(1,'App\\Models\\User',9),(1,'App\\Models\\User',10),(2,'App\\Models\\User',11),(2,'App\\Models\\User',12),(2,'App\\Models\\User',13),(1,'App\\Models\\User',14),(1,'App\\Models\\User',15),(1,'App\\Models\\User',16),(1,'App\\Models\\User',17),(1,'App\\Models\\User',18),(2,'App\\Models\\User',19); /*!40000 ALTER TABLE `model_has_roles` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `password_resets` -- DROP TABLE IF EXISTS `password_resets`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `password_resets` ( `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, KEY `password_resets_email_index` (`email`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `password_resets` -- LOCK TABLES `password_resets` WRITE; /*!40000 ALTER TABLE `password_resets` DISABLE KEYS */; /*!40000 ALTER TABLE `password_resets` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `permissions` -- DROP TABLE IF EXISTS `permissions`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `permissions` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `guard_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `permissions_name_guard_name_unique` (`name`,`guard_name`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `permissions` -- LOCK TABLES `permissions` WRITE; /*!40000 ALTER TABLE `permissions` DISABLE KEYS */; INSERT INTO `permissions` VALUES (1,'register','web','2021-10-08 10:08:13','2021-10-08 10:08:13'); /*!40000 ALTER TABLE `permissions` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `personal_access_tokens` -- DROP TABLE IF EXISTS `personal_access_tokens`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `personal_access_tokens` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `tokenable_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `tokenable_id` bigint(20) unsigned NOT NULL, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `token` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL, `abilities` text COLLATE utf8mb4_unicode_ci, `last_used_at` timestamp NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `personal_access_tokens_token_unique` (`token`), KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `personal_access_tokens` -- LOCK TABLES `personal_access_tokens` WRITE; /*!40000 ALTER TABLE `personal_access_tokens` DISABLE KEYS */; /*!40000 ALTER TABLE `personal_access_tokens` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `role_has_permissions` -- DROP TABLE IF EXISTS `role_has_permissions`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `role_has_permissions` ( `permission_id` bigint(20) unsigned NOT NULL, `role_id` bigint(20) unsigned NOT NULL, PRIMARY KEY (`permission_id`,`role_id`), KEY `role_has_permissions_role_id_foreign` (`role_id`), CONSTRAINT `role_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE, CONSTRAINT `role_has_permissions_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `role_has_permissions` -- LOCK TABLES `role_has_permissions` WRITE; /*!40000 ALTER TABLE `role_has_permissions` DISABLE KEYS */; INSERT INTO `role_has_permissions` VALUES (1,1); /*!40000 ALTER TABLE `role_has_permissions` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `roles` -- DROP TABLE IF EXISTS `roles`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `roles` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `guard_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `roles_name_guard_name_unique` (`name`,`guard_name`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `roles` -- LOCK TABLES `roles` WRITE; /*!40000 ALTER TABLE `roles` DISABLE KEYS */; INSERT INTO `roles` VALUES (1,'admin','web','2021-10-08 10:08:12','2021-10-08 10:08:12'),(2,'bombero','web','2021-10-08 10:08:12','2021-10-08 10:08:12'); /*!40000 ALTER TABLE `roles` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `users` -- DROP TABLE IF EXISTS `users`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `users` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `codigo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `user_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `last_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `sex` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `born_date` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `dpi` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `tel1` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `tel2` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `foto` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '1', `email_verified_at` timestamp NULL DEFAULT NULL, `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `users_user_name_unique` (`user_name`), UNIQUE KEY `users_email_unique` (`email`), UNIQUE KEY `users_codigo_unique` (`codigo`) ) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `users` -- LOCK TABLES `users` WRITE; /*!40000 ALTER TABLE `users` DISABLE KEYS */; INSERT INTO `users` VALUES (1,'COD-17-5936','admin','daniel','del Cid','1','1998-05-21','kevindelcid731@gmail.com','3371876730920','41124830','45446387','default.png','1',NULL,'$2y$10$gg/rFE8sB.a7Ulg4ujGEkeRdaf6rGOokHzjETK9eKdcJpzeKSqHUe',NULL,'2021-10-08 10:08:14','2021-10-10 00:12:39'),(2,'COD-2','bombero','Arturo','Gonzales','1','1998-05-21','arturitog@gmail.com','337187673','41124430','45446347','default.png','1',NULL,'$2y$10$zWz6/FG2v9zfidtb3cGTWebDyk8JFIqIw30qZHclpChhlDBzfYoLS',NULL,'2021-10-08 10:08:14','2021-10-08 10:08:14'),(3,'COD-001-admin','Kevin Daniel','Kevin Daniel','del Cid Flores UMG','1','1998-05-21','danieldelcidf@gmail.com','11344123','1231','2233','storage/app/public/uploads/16336663911-profile.png','1',NULL,'$2y$10$tgStaANdiO10dWxN/3DSueWUq/CjouQomezWjIbgT1CulnBc9IP7.',NULL,'2021-10-08 10:13:11','2021-10-09 12:13:00'),(4,NULL,'Qred','Kevin','del Cid','1','1998-05-21','kevindd731@gmail.com','42312334','41124830','12323','storage/app/public/uploads/16336674731-profile.png','1',NULL,'$2y$10$p3BqS719O.BMc.njWh7EKuGQGS7tOOeHNc0I8oBIY1PlElg/1WeHC',NULL,'2021-10-08 10:31:13','2021-10-09 12:23:45'),(5,NULL,'hbjn','bhnm','bhnm','1','2021-09-27','kevindewe31@gmail.com','786','7','789','storage/app/public/uploads/16336676124-profile.png','1',NULL,'$2y$10$ECKzL3ShEU0GYuvW0QkKveQptrQypU7KM.5b9tjOAOhDiQwKcC0Si',NULL,'2021-10-08 10:33:32','2021-10-08 10:33:32'),(6,'COD-17-59361','Kevin','Kevin','del Cid','1','2021-09-27','kevindlcid731@gmail.com','32311','432','123','storage/app/public/uploads/16337116422-profile.png','1',NULL,'$2y$10$JQwYyyOPb9kM2RKhtqN3K.YUNRqcGFw/XYVboPpBpXNH9p6spFBD.',NULL,'2021-10-08 22:47:22','2021-10-09 12:10:29'),(7,'b','jn','bjn','b','1','2021-09-27','kdcfalijab@gmail.com','789','8990','7890','storage/app/public/uploads/16337119846-profile.png','1',NULL,'$2y$10$lPJpWfRDLfRLf/Vv5JzYsOJUYqKQSb42SyElExH1tI3OqRKBik8Dq',NULL,'2021-10-08 22:53:05','2021-10-08 22:53:05'),(8,'nm','dds','walij','uhnkm','1','2021-10-05','kdcfwlijab@gmail.com','890','789','78','storage/app/public/uploads/16337133546-profile.png','1',NULL,'$2y$10$0Zwr8Dvmrm2Vbm0ZKFE9QO6Af2x9dFxkBLp/fCUpFvhobAy1i9s82',NULL,'2021-10-08 23:15:54','2021-10-08 23:15:54'),(9,'hiii','jj','hj','bnm','1','2021-09-27','vindelcid731@gmail.com','890','89','7890','storage/app/public/uploads/16337138616-profile.png','1',NULL,'$2y$10$evITKWpLKtBICNVR8o9pD.ugiRmylchj.EhG8YxtsaIaLSpVG1xGe',NULL,'2021-10-08 23:24:21','2021-10-08 23:24:21'),(10,'bbbbbbb','re','re','re','1','2021-09-29','kevdelci731@gmail.com','544','54','5454','storage/app/public/uploads/16337140036-profile.png','1',NULL,'$2y$10$tUKolKV8V13t1sADxEvap.zeDlIMfIYvLX5u/OLYe.MbdX7omjHPK',NULL,'2021-10-08 23:26:43','2021-10-08 23:26:43'),(11,'jjnbn','bnm','bnn','bnm','1','2021-09-30','hhhsds@gmail.co','789','789','7890','storage/app/public/uploads/16337141096-profile.png','1',NULL,'$2y$10$KaWVt7tFAV1LgBNn4/Wd1eXIveNDbZlcRLNgHwkY4nrr7vcn4Orsa',NULL,'2021-10-08 23:28:29','2021-10-08 23:28:29'),(12,'wewe','dsadsdaas','we','ew','1','2021-09-28','kdcfwalijab@gmail.comew','3424','423','423','storage/app/public/uploads/16337143166-profile.png','1',NULL,'$2y$10$asqTd/bkPNF0ckTUBO/VuO55ZCjLkM69n8H0ODlMyOoGTG4orhLwC',NULL,'2021-10-08 23:31:56','2021-10-08 23:31:56'),(13,'ewewe','ewe','ew','ewe','1','2021-09-28','kevindelcid731@gmail.comewewew','4343','4343','4343','storage/app/public/uploads/16337144166-profile.png','1',NULL,'$2y$10$KUIDKolgXuJ/rro14xzj1emyCjDJZSLhdOKXLk4zFVi97ckCihaou',NULL,'2021-10-08 23:33:36','2021-10-08 23:33:36'),(14,'aaas','sdsdaaaa','as','sa','1','2000-07-06','kevindelcid731@gmail.comusda','342','423424','43243','storage/app/public/uploads/16337145516-profile.png','1',NULL,'$2y$10$gvV1637MPRSJRBrI3IejBOkMVOl6j37ScewKOdaWMcy.PuvEulnii',NULL,'2021-10-08 23:35:51','2021-10-08 23:35:51'),(15,'ffssssssssssss','erewwwwwwwww','re','er','1','2021-09-27','kevindjjjjjelcid731@gmail.com','890','890','890','storage/app/public/uploads/16337153356-profile.png','1',NULL,'$2y$10$X8X3iAAbPXyKRvnbyh6GXuxM21GypMeEYzKkFxAwLYqq.QPLS5kEG',NULL,'2021-10-08 23:48:55','2021-10-08 23:48:55'),(16,'g','g','Kevin Del Cidg','w','1','2021-09-30','kevindelcid731@gmail.comg','3223','324','234','storage/app/public/uploads/16337154396-profile.png','1',NULL,'$2y$10$xRo8WE/GQL8fDonmPCmfI.6QnaFPR.44HLfZj1hnHZBMayeJHGkoe',NULL,'2021-10-08 23:50:40','2021-10-08 23:50:40'),(17,'gc','gf','Kevin Daniel','del Cid Flores','1','2021-09-30','kevindelcid731@gmail.ckomg','3223','324','234','storage/app/public/uploads/16337155236-profile.png','1',NULL,'$2y$10$ox4UFIfg2aqXZ8a5Ff.2cuFBo8hpWNYd1P1KscTORk7wjBa0ohwVy',NULL,'2021-10-08 23:52:03','2021-10-16 10:28:07'),(18,'cod-22','coso69','Kevin Del Cid','ddsd','2','2021-09-27','kevindelcid731@gmail.comfwd','534231','3322423','45234324','storage/app/public/uploads/16337609452-profile.png','1',NULL,'$2y$10$6em/MhQFwxbIsAgMbdoTGe9vHgVfks9BXafWddgcam.OG4Ik0uLhi',NULL,'2021-10-09 12:29:06','2021-10-09 12:33:24'),(19,'cod-0023','admin22','Kevin','Flores','1','2021-09-27','kevindelcid731@gmail.comfavcx','54233','452312','1231','storage/app/public/uploads/16338053861-profile.png','1',NULL,'$2y$10$WjvBMnBvPPDGXW2D.cvT3e/ctfgtU/88v0pMkfu8k3qNm/yrLIyzO',NULL,'2021-10-10 00:49:46','2021-10-10 01:01:11'); /*!40000 ALTER TABLE `users` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!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 */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -- Dump completed on 2021-10-20 21:50:37
55.198864
5,231
0.739887
99e83388eedb58d2e5a17a475b3f41bb871d7f29
1,588
rs
Rust
src/device/testdma.rs
shift-crops/x64emu
18f661a9a64bfbfce76c15dc7039abee73e4e128
[ "MIT" ]
null
null
null
src/device/testdma.rs
shift-crops/x64emu
18f661a9a64bfbfce76c15dc7039abee73e4e128
[ "MIT" ]
null
null
null
src/device/testdma.rs
shift-crops/x64emu
18f661a9a64bfbfce76c15dc7039abee73e4e128
[ "MIT" ]
null
null
null
use core::convert::TryInto; use std::rc::Rc; use std::cell::RefCell; use std::sync::{Arc, RwLock}; use crate::hardware::memory; pub struct TestDMA { irq: super::IReq, mem: Arc<RwLock<memory::Memory>>, raw: [u8; 0x10], } impl TestDMA { pub fn new(irq: super::IReq, mem: Arc<RwLock<memory::Memory>>) -> (DMACtrl, DMAAddr) { let dma = Rc::new(RefCell::new(Self { irq, mem, raw: [0; 0x10], })); (DMACtrl(dma.clone()), DMAAddr(dma.clone())) } fn get_src(&self) -> u64 { u64::from_le_bytes(self.raw[0..8].try_into().unwrap()) } fn get_dst(&self) -> u64 { u64::from_le_bytes(self.raw[8..16].try_into().unwrap()) } } pub struct DMACtrl(Rc<RefCell<TestDMA>>); impl super::PortIO for DMACtrl { fn in8(&self, _addr: u16) -> u8 { 0 } fn out8(&mut self, addr: u16, val: u8) -> () { if addr > 0x10 { return; } let size = val as usize; let mut tmp = vec![0; size]; let dma = self.0.borrow_mut(); dma.mem.read().unwrap().read_data(tmp.as_mut_ptr() as *mut _, dma.get_src() as usize, size).unwrap(); dma.mem.write().unwrap().write_data(dma.get_dst() as usize, tmp.as_ptr() as *const _, size).unwrap(); dma.irq.send_irq(); } } pub struct DMAAddr(Rc<RefCell<TestDMA>>); impl super::MemoryIO for DMAAddr { fn read8(&self, ofs: u64) -> u8 { self.0.borrow().raw[ofs as usize] } fn write8(&mut self, ofs: u64, val: u8) -> () { self.0.borrow_mut().raw[ofs as usize] = val; } }
25.612903
109
0.558564
f46c72ba6935b783ab6cc5de04b744496326e953
1,616
ts
TypeScript
src/tools/logger.ts
mortenbroesby/screeps-typescript
ed26ecf51ce7a182993403977ab476541cc07670
[ "Unlicense" ]
3
2021-03-01T10:13:15.000Z
2021-03-07T22:19:23.000Z
src/tools/logger.ts
mortenbroesby/screeps-typescript
ed26ecf51ce7a182993403977ab476541cc07670
[ "Unlicense" ]
null
null
null
src/tools/logger.ts
mortenbroesby/screeps-typescript
ed26ecf51ce7a182993403977ab476541cc07670
[ "Unlicense" ]
1
2021-03-06T22:30:06.000Z
2021-03-06T22:30:06.000Z
import { LogLevel } from "../enums"; import { convertToString } from "./utils"; class Logger { private _logLevel: LogLevel = LogLevel.DEBUG; public get logLevel(): LogLevel { return this._logLevel; } public set logLevel(level: LogLevel) { this._logLevel = level; } private _log({ message, args, logLevel, color = "#ffffff" }: { message: string; args: unknown[]; logLevel: LogLevel; color?: string; }) { const hasProperLogLevel = logLevel <= this._logLevel; if (!hasProperLogLevel) return; let displayedMessage = `[${LogLevel[logLevel].toLowerCase()}]`; displayedMessage += ` ${message}`; displayedMessage += convertToString(args); console.log(`<span style='color:${color}'>${displayedMessage}</span>`); } public global(message: string, ...args: unknown[]) { this._log({ message, args, logLevel: LogLevel.GLOBAL }); } public debug(message: string, ...args: unknown[]) { this._log({ message, args, logLevel: LogLevel.DEBUG, color: "#e3e3e3" }); } public info(message: string, ...args: unknown[]) { this._log({ message, args, logLevel: LogLevel.INFO }); } public warn(message: string, ...args: unknown[]) { this._log({ message, args, logLevel: LogLevel.WARN, color: "#f4c542" }); } public error(message: string, ...args: unknown[]) { this._log({ message, args, logLevel: LogLevel.ERROR, color: "#e50000" }); } public alert(message: string, ...args: unknown[]) { this._log({ message, args, logLevel: LogLevel.ALERT, color: "#ff00d0" }); } } export const logger = new Logger();
26.064516
77
0.633663
755004d488fa4ee9f40437f493f02b877e24c010
49,745
css
CSS
public/css/app.css
heartone/realtime-chat
ac9d3366c69380b7a789e9b3299e05ff5b003e55
[ "MIT" ]
1
2022-03-20T14:55:48.000Z
2022-03-20T14:55:48.000Z
public/css/app.css
heartone/realtime-chat
ac9d3366c69380b7a789e9b3299e05ff5b003e55
[ "MIT" ]
null
null
null
public/css/app.css
heartone/realtime-chat
ac9d3366c69380b7a789e9b3299e05ff5b003e55
[ "MIT" ]
null
null
null
/*! tailwindcss v3.0.23 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}html{-webkit-text-size-adjust:100%;font-family:Nunito,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-size:100%;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]{display:none}[multiple],[type=date],[type=datetime-local],[type=email],[type=month],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=time],[type=url],[type=week],select,textarea{--tw-shadow:0 0 #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-radius:0;border-width:1px;font-size:1rem;line-height:1.5rem;padding:.5rem .75rem}[multiple]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=email]:focus,[type=month]:focus,[type=number]:focus,[type=password]:focus,[type=search]:focus,[type=tel]:focus,[type=text]:focus,[type=time]:focus,[type=url]:focus,[type=week]:focus,select:focus,textarea:focus{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);border-color:#2563eb;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid transparent;outline-offset:2px}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-bottom:0;padding-top:0}select{-webkit-print-color-adjust:exact;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;color-adjust:exact;padding-right:2.5rem}[multiple]{-webkit-print-color-adjust:unset;background-image:none;background-position:0 0;background-repeat:unset;background-size:initial;color-adjust:unset;padding-right:.75rem}[type=checkbox],[type=radio]{-webkit-print-color-adjust:exact;--tw-shadow:0 0 #0000;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;background-origin:border-box;border-color:#6b7280;border-width:1px;color:#2563eb;color-adjust:exact;display:inline-block;flex-shrink:0;height:1rem;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:middle;width:1rem}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid transparent;outline-offset:2px}[type=checkbox]:checked,[type=radio]:checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:transparent}[type=checkbox]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0z'/%3E%3C/svg%3E")}[type=radio]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 16 16' fill='%23fff' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E")}[type=checkbox]:checked:focus,[type=checkbox]:checked:hover,[type=radio]:checked:focus,[type=radio]:checked:hover{background-color:currentColor;border-color:transparent}[type=checkbox]:indeterminate{background-color:currentColor;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3E%3C/svg%3E");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:transparent}[type=checkbox]:indeterminate:focus,[type=checkbox]:indeterminate:hover{background-color:currentColor;border-color:transparent}[type=file]{background:unset;border-color:inherit;border-radius:0;border-width:0;font-size:unset;line-height:inherit;padding:0}[type=file]:focus{outline:1px auto -webkit-focus-ring-color}*,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:-webkit-sticky;position:sticky}.inset-0{bottom:0;left:0;right:0;top:0}.top-0{top:0}.right-0{right:0}.left-0{left:0}.bottom-0{bottom:0}.z-0{z-index:0}.z-40{z-index:40}.z-50{z-index:50}.z-10{z-index:10}.m-auto{margin:auto}.mx-auto{margin-left:auto;margin-right:auto}.mx-3{margin-right:.75rem}.ml-3,.mx-3{margin-left:.75rem}.-ml-px{margin-left:-1px}.ml-1{margin-left:.25rem}.mt-2{margin-top:.5rem}.mr-2{margin-right:.5rem}.ml-2{margin-left:.5rem}.mt-4{margin-top:1rem}.ml-4{margin-left:1rem}.mt-8{margin-top:2rem}.ml-12{margin-left:3rem}.-mt-px{margin-top:-1px}.mb-6{margin-bottom:1.5rem}.mt-3{margin-top:.75rem}.-mr-0\.5{margin-right:-.125rem}.-mr-0{margin-right:0}.-mr-2{margin-right:-.5rem}.mt-6{margin-top:1.5rem}.mb-4{margin-bottom:1rem}.mt-1{margin-top:.25rem}.mb-1{margin-bottom:.25rem}.mr-1{margin-right:.25rem}.mr-4{margin-right:1rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.h-5{height:1.25rem}.h-8{height:2rem}.h-16{height:4rem}.h-9{height:2.25rem}.h-4{height:1rem}.h-6{height:1.5rem}.h-20{height:5rem}.h-12{height:3rem}.h-2{height:.5rem}.h-10{height:2.5rem}.min-h-screen{min-height:100vh}.w-5{width:1.25rem}.w-8{width:2rem}.w-auto{width:auto}.w-48{width:12rem}.w-full{width:100%}.w-4{width:1rem}.w-6{width:1.5rem}.w-20{width:5rem}.w-2{width:.5rem}.w-10{width:2.5rem}.max-w-xl{max-width:36rem}.max-w-6xl{max-width:72rem}.max-w-7xl{max-width:80rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.origin-top-left{transform-origin:top left}.origin-top-right{transform-origin:top right}.origin-top{transform-origin:top}.translate-y-4{--tw-translate-y:1rem}.translate-y-0,.translate-y-4{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y:0px}.scale-95{--tw-scale-x:.95;--tw-scale-y:.95}.scale-100,.scale-95{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x:1;--tw-scale-y:1}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@-webkit-keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}.animate-ping{-webkit-animation:ping 1s cubic-bezier(0,0,.2,1) infinite;animation:ping 1s cubic-bezier(0,0,.2,1) infinite}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(2rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(2rem*var(--tw-space-x-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis}.truncate,.whitespace-nowrap{white-space:nowrap}.rounded-md{border-radius:.375rem}.rounded-lg{border-radius:.5rem}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-l-md{border-bottom-left-radius:.375rem;border-top-left-radius:.375rem}.rounded-r-md{border-bottom-right-radius:.375rem;border-top-right-radius:.375rem}.border{border-width:1px}.border-0{border-width:0}.border-t{border-top-width:1px}.border-r{border-right-width:1px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-l-4{border-left-width:4px}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity))}.border-gray-400{--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-indigo-400{--tw-border-opacity:1;border-color:rgb(129 140 248/var(--tw-border-opacity))}.border-gray-100{--tw-border-opacity:1;border-color:rgb(243 244 246/var(--tw-border-opacity))}.border-gray-700{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity:1;background-color:rgb(156 163 175/var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.bg-gray-500{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity))}.bg-indigo-50{--tw-bg-opacity:1;background-color:rgb(238 242 255/var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.bg-orange-500{--tw-bg-opacity:1;background-color:rgb(249 115 22/var(--tw-bg-opacity))}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity))}.bg-indigo-500{--tw-bg-opacity:1;background-color:rgb(99 102 241/var(--tw-bg-opacity))}.bg-purple-500{--tw-bg-opacity:1;background-color:rgb(168 85 247/var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity:0.5}.bg-none{background-image:none}.fill-current{fill:currentColor}.p-6{padding:1.5rem}.p-3{padding:.75rem}.p-2{padding:.5rem}.p-1{padding:.25rem}.p-4{padding:1rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.py-4{padding-bottom:1rem;padding-top:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-6{padding-bottom:1.5rem;padding-top:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-3{padding-left:.75rem;padding-right:.75rem}.py-12{padding-bottom:3rem;padding-top:3rem}.pt-8{padding-top:2rem}.pt-1{padding-top:.25rem}.pl-3{padding-left:.75rem}.pr-4{padding-right:1rem}.pt-2{padding-top:.5rem}.pb-3{padding-bottom:.75rem}.pt-4{padding-top:1rem}.pb-1{padding-bottom:.25rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-sans{font-family:Nunito,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.text-sm{font-size:.875rem;line-height:1.25rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.text-base{font-size:1rem;line-height:1.5rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.font-bold{font-weight:700}.uppercase{text-transform:uppercase}.leading-5{line-height:1.25rem}.leading-7{line-height:1.75rem}.leading-4{line-height:1rem}.leading-tight{line-height:1.25}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity))}.text-gray-300{--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-indigo-600{--tw-text-opacity:1;color:rgb(79 70 229/var(--tw-text-opacity))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity))}.text-indigo-700{--tw-text-opacity:1;color:rgb(67 56 202/var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity))}.text-gray-100{--tw-text-opacity:1;color:rgb(243 244 246/var(--tw-text-opacity))}.underline{-webkit-text-decoration-line:underline;text-decoration-line:underline}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-75{opacity:.75}.opacity-25{opacity:.25}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-lg,.shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.ring-1{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-gray-300{--tw-ring-opacity:1;--tw-ring-color:rgb(209 213 219/var(--tw-ring-opacity))}.ring-black{--tw-ring-opacity:1;--tw-ring-color:rgb(0 0 0/var(--tw-ring-opacity))}.ring-opacity-5{--tw-ring-opacity:0.05}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-150,.transition-all{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-75{transition-duration:75ms}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.animation-delay-100{-webkit-animation-delay:.1s;animation-delay:.1s}.animation-delay-200{-webkit-animation-delay:.2s;animation-delay:.2s}@font-face{font-family:octicons-link;src:url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAZwABAAAAAACFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEU0lHAAAGaAAAAAgAAAAIAAAAAUdTVUIAAAZcAAAACgAAAAoAAQAAT1MvMgAAAyQAAABJAAAAYFYEU3RjbWFwAAADcAAAAEUAAACAAJThvmN2dCAAAATkAAAABAAAAAQAAAAAZnBnbQAAA7gAAACyAAABCUM+8IhnYXNwAAAGTAAAABAAAAAQABoAI2dseWYAAAFsAAABPAAAAZwcEq9taGVhZAAAAsgAAAA0AAAANgh4a91oaGVhAAADCAAAABoAAAAkCA8DRGhtdHgAAAL8AAAADAAAAAwGAACfbG9jYQAAAsAAAAAIAAAACABiATBtYXhwAAACqAAAABgAAAAgAA8ASm5hbWUAAAToAAABQgAAAlXu73sOcG9zdAAABiwAAAAeAAAAME3QpOBwcmVwAAAEbAAAAHYAAAB/aFGpk3jaTY6xa8JAGMW/O62BDi0tJLYQincXEypYIiGJjSgHniQ6umTsUEyLm5BV6NDBP8Tpts6F0v+k/0an2i+itHDw3v2+9+DBKTzsJNnWJNTgHEy4BgG3EMI9DCEDOGEXzDADU5hBKMIgNPZqoD3SilVaXZCER3/I7AtxEJLtzzuZfI+VVkprxTlXShWKb3TBecG11rwoNlmmn1P2WYcJczl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Ph1c0e2Xu3jEvWG7UdPDLZ4N92nOm+EBXuAbHmIMSRMs+4aUEd4Nd3CHD8NdvOLTsA2GL8M9PODbcL+hD7C1xoaHeLJSEao0FEW14ckxC+TU8TxvsY6X0eLPmRhry2WVioLpkrbp84LLQPGI7c6sOiUzpWIWS5GzlSgUzzLBSikOPFTOXqly7rqx0Z1Q5BAIoZBSFihQYQOOBEdkCOgXTOHA07HAGjGWiIjaPZNW13/+lm6S9FT7rLHFJ6fQbkATOG1j2OFMucKJJsxIVfQORl+9Jyda6Sl1dUYhSCm1dyClfoeDve4qMYdLEbfqHf3O/AdDumsjAAB42mNgYoAAZQYjBmyAGYQZmdhL8zLdDEydARfoAqIAAAABAAMABwAKABMAB///AA8AAQAAAAAAAAAAAAAAAAABAAAAAA==) format("woff")}.markdown-body .octicon{fill:currentColor;display:inline-block;vertical-align:text-bottom}.markdown-body .anchor{float:left;line-height:1;margin-left:-20px;padding-right:4px}.markdown-body .anchor:focus{outline:none}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{color:#1b1f23;vertical-align:middle;visibility:hidden}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{visibility:visible}.markdown-body{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;word-wrap:break-word;color:#24292e;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;font-size:16px;line-height:1.5}.markdown-body .pl-c{color:#6a737d}.markdown-body .pl-c1,.markdown-body .pl-s .pl-v{color:#005cc5}.markdown-body .pl-e,.markdown-body .pl-en{color:#6f42c1}.markdown-body .pl-s .pl-s1,.markdown-body .pl-smi{color:#24292e}.markdown-body .pl-ent{color:#22863a}.markdown-body .pl-k{color:#d73a49}.markdown-body .pl-pds,.markdown-body .pl-s,.markdown-body .pl-s .pl-pse .pl-s1,.markdown-body .pl-sr,.markdown-body .pl-sr .pl-cce,.markdown-body .pl-sr .pl-sra,.markdown-body .pl-sr .pl-sre{color:#032f62}.markdown-body .pl-smw,.markdown-body .pl-v{color:#e36209}.markdown-body .pl-bu{color:#b31d28}.markdown-body .pl-ii{background-color:#b31d28;color:#fafbfc}.markdown-body .pl-c2{background-color:#d73a49;color:#fafbfc}.markdown-body .pl-c2:before{content:"^M"}.markdown-body .pl-sr .pl-cce{color:#22863a;font-weight:700}.markdown-body .pl-ml{color:#735c0f}.markdown-body .pl-mh,.markdown-body .pl-mh .pl-en,.markdown-body .pl-ms{color:#005cc5;font-weight:700}.markdown-body .pl-mi{color:#24292e;font-style:italic}.markdown-body .pl-mb{color:#24292e;font-weight:700}.markdown-body .pl-md{background-color:#ffeef0;color:#b31d28}.markdown-body .pl-mi1{background-color:#f0fff4;color:#22863a}.markdown-body .pl-mc{background-color:#ffebda;color:#e36209}.markdown-body .pl-mi2{background-color:#005cc5;color:#f6f8fa}.markdown-body .pl-mdr{color:#6f42c1;font-weight:700}.markdown-body .pl-ba{color:#586069}.markdown-body .pl-sg{color:#959da5}.markdown-body .pl-corl{color:#032f62;text-decoration:underline}.markdown-body details{display:block}.markdown-body summary{display:list-item}.markdown-body a{background-color:transparent}.markdown-body a:active,.markdown-body a:hover{outline-width:0}.markdown-body strong{font-weight:inherit;font-weight:bolder}.markdown-body h1{margin:.67em 0}.markdown-body img{border-style:none}.markdown-body code,.markdown-body kbd,.markdown-body pre{font-family:monospace,monospace;font-size:1em}.markdown-body hr{box-sizing:content-box;overflow:visible}.markdown-body input{font:inherit;margin:0;overflow:visible}.markdown-body [type=checkbox]{box-sizing:border-box;padding:0}.markdown-body *{box-sizing:border-box}.markdown-body input{font-family:inherit;font-size:inherit;line-height:inherit}.markdown-body a{color:#0366d6;text-decoration:none}.markdown-body a:hover{text-decoration:underline}.markdown-body strong{font-weight:600}.markdown-body hr{background:transparent;border-bottom:1px solid #dfe2e5;height:0;margin:15px 0;overflow:hidden}.markdown-body hr:after,.markdown-body hr:before{content:"";display:table}.markdown-body hr:after{clear:both}.markdown-body table{border-collapse:collapse;border-spacing:0}.markdown-body td,.markdown-body th{padding:0}.markdown-body details summary{cursor:pointer}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-bottom:0;margin-top:0}.markdown-body h1{font-size:32px}.markdown-body h1,.markdown-body h2{font-weight:600}.markdown-body h2{font-size:24px}.markdown-body h3{font-size:20px}.markdown-body h3,.markdown-body h4{font-weight:600}.markdown-body h4{font-size:16px}.markdown-body h5{font-size:14px}.markdown-body h5,.markdown-body h6{font-weight:600}.markdown-body h6{font-size:12px}.markdown-body p{margin-bottom:10px;margin-top:0}.markdown-body blockquote{margin:0}.markdown-body ol,.markdown-body ul{margin-bottom:0;margin-top:0;padding-left:0}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ol ol ol,.markdown-body ol ul ol,.markdown-body ul ol ol,.markdown-body ul ul ol{list-style-type:lower-alpha}.markdown-body dd{margin-left:0}.markdown-body code,.markdown-body pre{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;font-size:12px}.markdown-body pre{margin-bottom:0;margin-top:0}.markdown-body input::-webkit-inner-spin-button,.markdown-body input::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}.markdown-body .border{border:1px solid #e1e4e8!important}.markdown-body .border-0{border:0!important}.markdown-body .border-bottom{border-bottom:1px solid #e1e4e8!important}.markdown-body .rounded-1{border-radius:3px!important}.markdown-body .bg-white{background-color:#fff!important}.markdown-body .bg-gray-light{background-color:#fafbfc!important}.markdown-body .text-gray-light{color:#6a737d!important}.markdown-body .mb-0{margin-bottom:0!important}.markdown-body .my-2{margin-bottom:8px!important;margin-top:8px!important}.markdown-body .py-0{padding-bottom:0!important;padding-top:0!important}.markdown-body .py-2{padding-bottom:8px!important;padding-top:8px!important}.markdown-body .pl-3,.markdown-body .px-3{padding-left:16px!important}.markdown-body .px-3{padding-right:16px!important}.markdown-body .f6{font-size:12px!important}.markdown-body .lh-condensed{line-height:1.25!important}.markdown-body .text-bold{font-weight:600!important}.markdown-body:after,.markdown-body:before{content:"";display:table}.markdown-body:after{clear:both}.markdown-body>:first-child{margin-top:0!important}.markdown-body>:last-child{margin-bottom:0!important}.markdown-body a:not([href]){color:inherit;text-decoration:none}.markdown-body blockquote,.markdown-body dl,.markdown-body ol,.markdown-body p,.markdown-body pre,.markdown-body table,.markdown-body ul{margin-bottom:16px;margin-top:0}.markdown-body hr{background-color:#e1e4e8;border:0;height:.25em;margin:24px 0;padding:0}.markdown-body blockquote{border-left:.25em solid #dfe2e5;color:#6a737d;padding:0 1em}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body kbd{border:1px solid #c6cbd1;border-bottom-color:#959da5;box-shadow:inset 0 -1px 0 #959da5;font-size:11px}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{font-weight:600;line-height:1.25;margin-bottom:16px;margin-top:24px}.markdown-body h1{font-size:2em}.markdown-body h1,.markdown-body h2{padding-bottom:.3em}.markdown-body h2{font-size:1.5em}.markdown-body h3{font-size:1.25em}.markdown-body h4{font-size:1em}.markdown-body h5{font-size:.875em}.markdown-body h6{color:#6a737d;font-size:.85em}.markdown-body ol,.markdown-body ul{padding-left:2em}.markdown-body ol ol,.markdown-body ol ul,.markdown-body ul ol,.markdown-body ul ul{margin-bottom:0;margin-top:0}.markdown-body li{word-wrap:break-all}.markdown-body li>p{margin-top:16px}.markdown-body li+li{margin-top:.25em}.markdown-body dl{padding:0}.markdown-body dl dt{font-size:1em;font-style:italic;font-weight:600;margin-top:16px;padding:0}.markdown-body dl dd{margin-bottom:16px;padding:0 16px}.markdown-body table{display:block;overflow:auto;width:100%}.markdown-body table th{font-weight:600}.markdown-body table td,.markdown-body table th{border:1px solid #dfe2e5;padding:6px 13px}.markdown-body table tr{background-color:#fff;border-top:1px solid #c6cbd1}.markdown-body table tr:nth-child(2n){background-color:#f6f8fa}.markdown-body img{background-color:#fff;box-sizing:content-box;max-width:360px}.markdown-body img[align=right]{padding-left:20px}.markdown-body img[align=left]{padding-right:20px}.markdown-body code{background-color:rgba(27,31,35,.05);border-radius:3px;font-size:85%;margin:0;padding:.2em .4em}.markdown-body pre{word-wrap:normal}.markdown-body pre>code{background:transparent;border:0;font-size:100%;margin:0;padding:0;white-space:pre;word-break:normal}.markdown-body .highlight{margin-bottom:16px}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body .highlight pre,.markdown-body pre{background-color:#f6f8fa;border-radius:3px;font-size:85%;line-height:1.45;overflow:auto;padding:16px}.markdown-body pre code{word-wrap:normal;background-color:transparent;border:0;display:inline;margin:0;max-width:auto;overflow:visible;padding:0}.markdown-body .commit-tease-sha{color:#444d56;display:inline-block;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;font-size:90%}.markdown-body .blob-wrapper{border-bottom-left-radius:3px;border-bottom-right-radius:3px;overflow-x:auto;overflow-y:hidden}.markdown-body .blob-wrapper-embedded{max-height:240px;overflow-y:auto}.markdown-body .blob-num{color:rgba(27,31,35,.3);cursor:pointer;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;font-size:12px;line-height:20px;min-width:50px;padding-left:10px;padding-right:10px;text-align:right;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none;vertical-align:top;white-space:nowrap;width:1%}.markdown-body .blob-num:hover{color:rgba(27,31,35,.6)}.markdown-body .blob-num:before{content:attr(data-line-number)}.markdown-body .blob-code{line-height:20px;padding-left:10px;padding-right:10px;position:relative;vertical-align:top}.markdown-body .blob-code-inner{word-wrap:normal;color:#24292e;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;font-size:12px;overflow:visible;white-space:pre}.markdown-body .pl-token.active,.markdown-body .pl-token:hover{background:#ffea7f;cursor:pointer}.markdown-body kbd{background-color:#fafbfc;border:1px solid #d1d5da;border-bottom-color:#c6cbd1;border-radius:3px;box-shadow:inset 0 -1px 0 #c6cbd1;color:#444d56;display:inline-block;font:11px SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;line-height:10px;padding:3px 5px;vertical-align:middle}.markdown-body :checked+.radio-label{border-color:#0366d6;position:relative;z-index:1}.markdown-body .tab-size[data-tab-size="1"]{-moz-tab-size:1;-o-tab-size:1;tab-size:1}.markdown-body .tab-size[data-tab-size="2"]{-moz-tab-size:2;-o-tab-size:2;tab-size:2}.markdown-body .tab-size[data-tab-size="3"]{-moz-tab-size:3;-o-tab-size:3;tab-size:3}.markdown-body .tab-size[data-tab-size="4"]{-moz-tab-size:4;-o-tab-size:4;tab-size:4}.markdown-body .tab-size[data-tab-size="5"]{-moz-tab-size:5;-o-tab-size:5;tab-size:5}.markdown-body .tab-size[data-tab-size="6"]{-moz-tab-size:6;-o-tab-size:6;tab-size:6}.markdown-body .tab-size[data-tab-size="7"]{-moz-tab-size:7;-o-tab-size:7;tab-size:7}.markdown-body .tab-size[data-tab-size="8"]{-moz-tab-size:8;-o-tab-size:8;tab-size:8}.markdown-body .tab-size[data-tab-size="9"]{-moz-tab-size:9;-o-tab-size:9;tab-size:9}.markdown-body .tab-size[data-tab-size="10"]{-moz-tab-size:10;-o-tab-size:10;tab-size:10}.markdown-body .tab-size[data-tab-size="11"]{-moz-tab-size:11;-o-tab-size:11;tab-size:11}.markdown-body .tab-size[data-tab-size="12"]{-moz-tab-size:12;-o-tab-size:12;tab-size:12}.markdown-body .task-list-item{list-style-type:none}.markdown-body .task-list-item+.task-list-item{margin-top:3px}.markdown-body .task-list-item input{margin:0 .2em .25em -1.6em;vertical-align:middle}.markdown-body hr{border-bottom-color:#eee}.markdown-body .pl-0{padding-left:0!important}.markdown-body .pl-1{padding-left:4px!important}.markdown-body .pl-2{padding-left:8px!important}.markdown-body .pl-3{padding-left:16px!important}.markdown-body .pl-4{padding-left:24px!important}.markdown-body .pl-5{padding-left:32px!important}.markdown-body .pl-6{padding-left:40px!important}.markdown-body .pl-7{padding-left:48px!important}.markdown-body .pl-8{padding-left:64px!important}.markdown-body .pl-9{padding-left:80px!important}.markdown-body .pl-10{padding-left:96px!important}.markdown-body .pl-11{padding-left:112px!important}.markdown-body .pl-12{padding-left:128px!important}.link{color:rgb(59 130 246/var(--tw-text-opacity))}.link,.link:hover{--tw-text-opacity:1}.link:hover{color:rgb(202 138 4/var(--tw-text-opacity))}.link:focus{--tw-text-opacity:1;color:rgb(234 179 8/var(--tw-text-opacity))}.form-control{--tw-border-opacity:1;--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);border-color:rgb(209 213 219/var(--tw-border-opacity));border-radius:.375rem;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.form-control:focus{--tw-border-opacity:1;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-color:rgb(199 210 254/var(--tw-ring-opacity));--tw-ring-opacity:0.5;border-color:rgb(165 180 252/var(--tw-border-opacity));box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.form-control:disabled{--tw-bg-opacity:0.5}.btn{align-items:center;border-radius:.375rem;display:inline-flex;font-size:.75rem;font-weight:600;letter-spacing:.1em;line-height:1rem;padding:.5rem 1rem;text-transform:uppercase;transition-duration:.15s;transition-property:color,background-color,border-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.markdown-body .btn{padding-bottom:8px;padding-top:8px}.btn-dark{--tw-bg-opacity:1;--tw-text-opacity:1;align-items:center;background-color:rgb(31 41 55/var(--tw-bg-opacity));border-radius:.375rem;color:rgb(255 255 255/var(--tw-text-opacity));display:inline-flex;font-size:.75rem;font-weight:600;letter-spacing:.1em;line-height:1rem;padding:.5rem 1rem;text-transform:uppercase;transition-duration:.15s;transition-property:color,background-color,border-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.markdown-body .btn-dark{padding-bottom:8px;padding-top:8px}.btn-dark:hover{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.btn-dark:focus{--tw-border-opacity:1;border-color:rgb(107 114 128/var(--tw-border-opacity))}.btn-dark:active{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.btn-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));border-width:1px}.markdown-body .btn-white{background-color:#fff;border:1px solid #e1e4e8}.btn-white{align-items:center;border-radius:.375rem;display:inline-flex;font-size:.75rem;font-weight:600;letter-spacing:.1em;line-height:1rem;padding:.5rem 1rem;text-transform:uppercase;transition-duration:.15s;transition-property:color,background-color,border-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.markdown-body .btn-white{padding-bottom:8px;padding-top:8px}.btn-white:focus{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity))}.btn-white:active{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.btn-danger{--tw-bg-opacity:1;--tw-text-opacity:1;align-items:center;background-color:rgb(185 28 28/var(--tw-bg-opacity));border-radius:.375rem;color:rgb(255 255 255/var(--tw-text-opacity));display:inline-flex;font-size:.75rem;font-weight:600;letter-spacing:.1em;line-height:1rem;padding:.5rem 1rem;text-transform:uppercase;transition-duration:.15s;transition-property:color,background-color,border-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.markdown-body .btn-danger{padding-bottom:8px;padding-top:8px}.btn-danger:hover{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity))}.btn-danger:focus{--tw-border-opacity:1;border-color:rgb(153 27 27/var(--tw-border-opacity))}.btn-danger:active{--tw-bg-opacity:1;background-color:rgb(153 27 27/var(--tw-bg-opacity))}.btn-primary{--tw-bg-opacity:1;--tw-text-opacity:1;align-items:center;background-color:rgb(29 78 216/var(--tw-bg-opacity));border-radius:.375rem;color:rgb(255 255 255/var(--tw-text-opacity));display:inline-flex;font-size:.75rem;font-weight:600;letter-spacing:.1em;line-height:1rem;padding:.5rem 1rem;text-transform:uppercase;transition-duration:.15s;transition-property:color,background-color,border-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.markdown-body .btn-primary{padding-bottom:8px;padding-top:8px}.btn-primary:hover{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity))}.btn-primary:focus{--tw-border-opacity:1;border-color:rgb(30 64 175/var(--tw-border-opacity))}.btn-primary:active{--tw-bg-opacity:1;background-color:rgb(30 64 175/var(--tw-bg-opacity))}.btn-success{--tw-bg-opacity:1;--tw-text-opacity:1;align-items:center;background-color:rgb(21 128 61/var(--tw-bg-opacity));border-radius:.375rem;color:rgb(255 255 255/var(--tw-text-opacity));display:inline-flex;font-size:.75rem;font-weight:600;letter-spacing:.1em;line-height:1rem;padding:.5rem 1rem;text-transform:uppercase;transition-duration:.15s;transition-property:color,background-color,border-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-text-decoration-color,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.markdown-body .btn-success{padding-bottom:8px;padding-top:8px}.btn-success:hover{--tw-bg-opacity:1;background-color:rgb(22 163 74/var(--tw-bg-opacity))}.btn-success:focus{--tw-border-opacity:1;border-color:rgb(22 101 52/var(--tw-border-opacity))}.btn-success:active{--tw-bg-opacity:1;background-color:rgb(22 101 52/var(--tw-bg-opacity))}.markdown-body blockquote,.markdown-body dl,.markdown-body ol,.markdown-body p,.markdown-body pre,.markdown-body table,.markdown-body ul{margin-bottom:.8rem}.markdown-body{word-break:break-word}.markdown-body p{font-size:.95rem;line-height:1.6;white-space:pre-wrap}.markdown-body ul{list-style-type:disc}.markdown-body ol{list-style-type:decimal}.markdown-body pre code{line-height:1.6}.hover\:border-gray-300:hover{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.hover\:bg-gray-700:hover{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity))}.hover\:bg-gray-100:hover{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.hover\:bg-gray-200:hover{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity))}.hover\:bg-gray-50:hover{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.hover\:bg-black:hover{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity))}.hover\:text-gray-500:hover{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.hover\:text-gray-400:hover{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}.hover\:text-gray-700:hover{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.hover\:text-gray-800:hover{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.hover\:text-gray-900:hover{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity))}.hover\:text-yellow-100:hover{--tw-text-opacity:1;color:rgb(254 249 195/var(--tw-text-opacity))}.hover\:text-blue-300:hover{--tw-text-opacity:1;color:rgb(147 197 253/var(--tw-text-opacity))}.hover\:text-yellow-200:hover{--tw-text-opacity:1;color:rgb(254 240 138/var(--tw-text-opacity))}.hover\:text-orange-500:hover{--tw-text-opacity:1;color:rgb(249 115 22/var(--tw-text-opacity))}.focus\:z-10:focus{z-index:10}.focus\:border-blue-300:focus{--tw-border-opacity:1;border-color:rgb(147 197 253/var(--tw-border-opacity))}.focus\:border-gray-900:focus{--tw-border-opacity:1;border-color:rgb(17 24 39/var(--tw-border-opacity))}.focus\:border-indigo-300:focus{--tw-border-opacity:1;border-color:rgb(165 180 252/var(--tw-border-opacity))}.focus\:border-indigo-700:focus{--tw-border-opacity:1;border-color:rgb(67 56 202/var(--tw-border-opacity))}.focus\:border-gray-300:focus{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity))}.focus\:bg-gray-100:focus{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.focus\:bg-indigo-100:focus{--tw-bg-opacity:1;background-color:rgb(224 231 255/var(--tw-bg-opacity))}.focus\:bg-gray-50:focus{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity))}.focus\:text-gray-700:focus{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.focus\:text-indigo-800:focus{--tw-text-opacity:1;color:rgb(55 48 163/var(--tw-text-opacity))}.focus\:text-gray-800:focus{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity))}.focus\:text-gray-500:focus{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.focus\:text-yellow-300:focus{--tw-text-opacity:1;color:rgb(253 224 71/var(--tw-text-opacity))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-indigo-200:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(199 210 254/var(--tw-ring-opacity))}.focus\:ring-opacity-50:focus{--tw-ring-opacity:0.5}.active\:bg-gray-100:active{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity))}.active\:bg-gray-900:active{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.active\:text-gray-700:active{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity))}.active\:text-gray-500:active{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}@media (prefers-color-scheme:dark){.dark\:border-gray-700{--tw-border-opacity:1;border-color:rgb(55 65 81/var(--tw-border-opacity))}.dark\:bg-gray-900{--tw-bg-opacity:1;background-color:rgb(17 24 39/var(--tw-bg-opacity))}.dark\:bg-gray-800{--tw-bg-opacity:1;background-color:rgb(31 41 55/var(--tw-bg-opacity))}.dark\:text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity))}.dark\:text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.dark\:text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity))}}@media (min-width:640px){.sm\:mx-auto{margin-left:auto;margin-right:auto}.sm\:-my-px{margin-bottom:-1px;margin-top:-1px}.sm\:ml-0{margin-left:0}.sm\:ml-10{margin-left:2.5rem}.sm\:ml-6{margin-left:1.5rem}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:h-20{height:5rem}.sm\:w-full{width:100%}.sm\:max-w-sm{max-width:24rem}.sm\:max-w-md{max-width:28rem}.sm\:max-w-lg{max-width:32rem}.sm\:max-w-xl{max-width:36rem}.sm\:max-w-2xl{max-width:42rem}.sm\:flex-1{flex:1 1 0%}.sm\:translate-y-0{--tw-translate-y:0px}.sm\:scale-95,.sm\:translate-y-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:scale-95{--tw-scale-x:.95;--tw-scale-y:.95}.sm\:scale-100{--tw-scale-x:1;--tw-scale-y:1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.sm\:items-center{align-items:center}.sm\:justify-start{justify-content:flex-start}.sm\:justify-center{justify-content:center}.sm\:justify-between{justify-content:space-between}.sm\:rounded-lg{border-radius:.5rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:px-0{padding-left:0;padding-right:0}.sm\:pt-0{padding-top:0}.sm\:text-left{text-align:left}.sm\:text-right{text-align:right}}@media (min-width:768px){.md\:hidden{display:none}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:border-t-0{border-top-width:0}.md\:border-l{border-left-width:1px}.md\:py-3{padding-bottom:.75rem;padding-top:.75rem}.md\:px-4{padding-left:1rem;padding-right:1rem}}@media (min-width:1024px){.lg\:px-8{padding-left:2rem;padding-right:2rem}}
24,872.5
49,744
0.77457
b075175b37f8235c7162dc7fe7128daf416761f4
1,302
py
Python
summer/utils.py
monash-emu/summer
e401fa986543ddade0082d271f9261d640b22bec
[ "BSD-2-Clause-FreeBSD" ]
4
2021-11-05T02:47:34.000Z
2022-01-31T11:25:11.000Z
summer/utils.py
monash-emu/summer
e401fa986543ddade0082d271f9261d640b22bec
[ "BSD-2-Clause-FreeBSD" ]
3
2021-04-28T22:29:32.000Z
2021-08-30T12:13:01.000Z
summer/utils.py
monash-emu/summer
e401fa986543ddade0082d271f9261d640b22bec
[ "BSD-2-Clause-FreeBSD" ]
1
2021-04-29T05:52:34.000Z
2021-04-29T05:52:34.000Z
""" General utility functions used accross submodules """ import pandas as pd from datetime import timedelta, datetime from typing import Iterable def get_scenario_start_index(base_times, start_time): """ Returns the index of the closest time step that is at, or before the scenario start time. """ assert ( base_times[0] <= start_time ), f"Scenario start time {start_time} is before baseline has started" indices_after_start_index = [idx for idx, time in enumerate(base_times) if time > start_time] if not indices_after_start_index: raise ValueError(f"Scenario start time {start_time} is set after the baseline time range") index_after_start_index = min(indices_after_start_index) start_index = max([0, index_after_start_index - 1]) return start_index def ref_times_to_dti(ref_date: datetime, times: Iterable) -> pd.DatetimeIndex: """Return a DatetimeIndex whose values after ref_date offset by times Args: ref_date (datetime): The reference date ('epoch') from which offsets are computed times (Iterable): Offsets to ref_date (int or float) Returns: (pd.DatetimeIndex): Index suitable for constructing Series or DataFrame """ return pd.DatetimeIndex([ref_date + timedelta(t) for t in times])
36.166667
98
0.728111
8e99cc7648b90db4a8dc51f9fd7e72a62ec101c3
19,529
js
JavaScript
ciat-bim-cesium/src/main/resources/static/bim/lib/CesiumPlugins/draw-ex/plotUtil.js
zjtyxy/bimServer
7b8d199c9ca5c1627397b937ed7334c6468b8c4f
[ "MIT" ]
1
2022-02-28T02:04:47.000Z
2022-02-28T02:04:47.000Z
ciat-bim-cesium/src/main/resources/static/bim/lib/CesiumPlugins/draw-ex/plotUtil.js
zjtyxy/bimServer
7b8d199c9ca5c1627397b937ed7334c6468b8c4f
[ "MIT" ]
null
null
null
ciat-bim-cesium/src/main/resources/static/bim/lib/CesiumPlugins/draw-ex/plotUtil.js
zjtyxy/bimServer
7b8d199c9ca5c1627397b937ed7334c6468b8c4f
[ "MIT" ]
null
null
null
!function (o) { var C = {}; C.Constants = { TWO_PI: 2 * Math.PI, HALF_PI: Math.PI / 2, FITTING_COUNT: 100, ZERO_TOLERANCE: 1e-4 }, C.PlotUtils = {}, C.PlotUtils.distance = function (t, i) { return Math.sqrt(Math.pow(t[0] - i[0], 2) + Math.pow(t[1] - i[1], 2)) }, C.PlotUtils.wholeDistance = function (t) { for (var i = 0, o = 0; o < t.length - 1; o++) i += C.PlotUtils.distance(t[o], t[o + 1]); return i }, C.PlotUtils.getBaseLength = function (t) { return Math.pow(C.PlotUtils.wholeDistance(t), .99) }, C.PlotUtils.mid = function (t, i) { return [(t[0] + i[0]) / 2, (t[1] + i[1]) / 2] }, C.PlotUtils.getCircleCenterOfThreePoints = function (t, i, o) { var n = [(t[0] + i[0]) / 2, (t[1] + i[1]) / 2], s = [n[0] - t[1] + i[1], n[1] + t[0] - i[0]], l = [(t[0] + o[0]) / 2, (t[1] + o[1]) / 2], e = [l[0] - t[1] + o[1], l[1] + t[0] - o[0]]; return C.PlotUtils.getIntersectPoint(n, s, l, e) }, C.PlotUtils.getIntersectPoint = function (t, i, o, n) { if (t[1] == i[1]) { var s = (n[0] - o[0]) / (n[1] - o[1]), l = s * (t[1] - o[1]) + o[0], e = t[1]; return [l, e] } if (o[1] != n[1]) return r = (i[0] - t[0]) / (i[1] - t[1]), s = (n[0] - o[0]) / (n[1] - o[1]), [l = r * (e = (r * t[1] - t[0] - s * o[1] + o[0]) / (r - s)) - r * t[1] + t[0], e]; var r = (i[0] - t[0]) / (i[1] - t[1]); return [l = r * (o[1] - t[1]) + t[0], e = o[1]] }, C.PlotUtils.getAzimuth = function (t, i) { var o, n = Math.asin(Math.abs(i[1] - t[1]) / C.PlotUtils.distance(t, i)); return i[1] >= t[1] && i[0] >= t[0] ? o = n + Math.PI : i[1] >= t[1] && i[0] < t[0] ? o = C.Constants.TWO_PI - n : i[1] < t[1] && i[0] < t[0] ? o = n : i[1] < t[1] && i[0] >= t[0] && (o = Math.PI - n), o }, C.PlotUtils.getAngleOfThreePoints = function (t, i, o) { var n = C.PlotUtils.getAzimuth(i, t) - C.PlotUtils.getAzimuth(i, o); return n < 0 ? n + C.Constants.TWO_PI : n }, C.PlotUtils.isClockWise = function (t, i, o) { return (o[1] - t[1]) * (i[0] - t[0]) > (i[1] - t[1]) * (o[0] - t[0]) }, C.PlotUtils.getPointOnLine = function (t, i, o) { return [i[0] + t * (o[0] - i[0]), i[1] + t * (o[1] - i[1])] }, C.PlotUtils.getCubicValue = function (t, i, o, n, s) { var l = 1 - (t = Math.max(Math.min(t, 1), 0)), e = t * t, r = e * t, a = l * l, h = a * l; return [h * i[0] + 3 * a * t * o[0] + 3 * l * e * n[0] + r * s[0], h * i[1] + 3 * a * t * o[1] + 3 * l * e * n[1] + r * s[1]] }, C.PlotUtils.getThirdPoint = function (t, i, o, n, s) { var l = C.PlotUtils.getAzimuth(t, i), e = s ? l + o : l - o, r = n * Math.cos(e), a = n * Math.sin(e); return [i[0] + r, i[1] + a] }, C.PlotUtils.getArcPoints = function (t, i, o, n) { var s, l, e = [], r = n - o; r = r < 0 ? r + C.Constants.TWO_PI : r; for (var a = 0; a <= C.Constants.FITTING_COUNT; a++) { var h = o + r * a / C.Constants.FITTING_COUNT; s = t[0] + i * Math.cos(h), l = t[1] + i * Math.sin(h), e.push([s, l]) } return e }, C.PlotUtils.getBisectorNormals = function (t, i, o, n) { var s = C.PlotUtils.getNormal(i, o, n), l = Math.sqrt(s[0] * s[0] + s[1] * s[1]), e = s[0] / l, r = s[1] / l, a = C.PlotUtils.distance(i, o), h = C.PlotUtils.distance(o, n); if (l > C.Constants.ZERO_TOLERANCE) if (C.PlotUtils.isClockWise(i, o, n)) { var P = t * a, c = o[0] - P * r, g = o[1] + P * e, u = [c, g]; P = t * h; var d = [c = o[0] + P * r, g = o[1] - P * e] } else P = t * a, u = [c = o[0] + P * r, g = o[1] - P * e], P = t * h, d = [c = o[0] - P * r, g = o[1] + P * e]; else u = [c = o[0] + t * (i[0] - o[0]), g = o[1] + t * (i[1] - o[1])], d = [c = o[0] + t * (n[0] - o[0]), g = o[1] + t * (n[1] - o[1])]; return [u, d] }, C.PlotUtils.getNormal = function (t, i, o) { var n = t[0] - i[0], s = t[1] - i[1], l = Math.sqrt(n * n + s * s); n /= l, s /= l; var e = o[0] - i[0], r = o[1] - i[1], a = Math.sqrt(e * e + r * r); return [n + (e /= a), s + (r /= a)] }, C.PlotUtils.getCurvePoints = function (t, i) { for (var o = [C.PlotUtils.getLeftMostControlPoint(i)], n = 0; n < i.length - 2; n++) { var s = i[n], l = i[n + 1], e = i[n + 2], r = C.PlotUtils.getBisectorNormals(t, s, l, e); o = o.concat(r) } var a = C.PlotUtils.getRightMostControlPoint(i); o.push(a); var h = []; for (n = 0; n < i.length - 1; n++) { s = i[n], l = i[n + 1], h.push(s); for (t = 0; t < C.Constants.FITTING_COUNT; t++) { var P = C.PlotUtils.getCubicValue(t / C.Constants.FITTING_COUNT, s, o[2 * n], o[2 * n + 1], l); h.push(P) } h.push(l) } return h }, C.PlotUtils.getLeftMostControlPoint = function (i) { var o = i[0], n = i[1], s = i[2], l = C.PlotUtils.getBisectorNormals(0, o, n, s)[0], e = C.PlotUtils.getNormal(o, n, s); if (Math.sqrt(e[0] * e[0] + e[1] * e[1]) > C.Constants.ZERO_TOLERANCE) var r = C.PlotUtils.mid(o, n), a = o[0] - r[0], h = o[1] - r[1], P = 2 / C.PlotUtils.distance(o, n), c = -P * h, g = P * a, u = c * c - g * g, d = 2 * c * g, U = g * g - c * c, F = l[0] - r[0], f = l[1] - r[1], m = r[0] + u * F + d * f, p = r[1] + d * F + U * f; else m = o[0] + t * (n[0] - o[0]), p = o[1] + t * (n[1] - o[1]); return [m, p] }, C.PlotUtils.getRightMostControlPoint = function (i) { var o = i.length, n = i[o - 3], s = i[o - 2], l = i[o - 1], e = C.PlotUtils.getBisectorNormals(0, n, s, l)[1], r = C.PlotUtils.getNormal(n, s, l); if (Math.sqrt(r[0] * r[0] + r[1] * r[1]) > C.Constants.ZERO_TOLERANCE) var a = C.PlotUtils.mid(s, l), h = l[0] - a[0], P = l[1] - a[1], c = 2 / C.PlotUtils.distance(s, l), g = -c * P, u = c * h, d = g * g - u * u, U = 2 * g * u, F = u * u - g * g, f = e[0] - a[0], m = e[1] - a[1], p = a[0] + d * f + U * m, T = a[1] + U * f + F * m; else p = l[0] + t * (s[0] - l[0]), T = l[1] + t * (s[1] - l[1]); return [p, T] }, C.PlotUtils.getBezierPoints = function (t) { if (t.length <= 2) return t; for (var i = [], o = t.length - 1, n = 0; n <= 1; n += .01) { for (var s = y = 0, l = 0; l <= o; l++) { var e = C.PlotUtils.getBinomialFactor(o, l), r = Math.pow(n, l), a = Math.pow(1 - n, o - l); s += e * r * a * t[l][0], y += e * r * a * t[l][1] } i.push([s, y]) } return i.push(t[o]), i }, C.PlotUtils.getBinomialFactor = function (t, i) { return C.PlotUtils.getFactorial(t) / (C.PlotUtils.getFactorial(i) * C.PlotUtils.getFactorial(t - i)) }, C.PlotUtils.getFactorial = function (t) { if (t <= 1) return 1; if (2 == t) return 2; if (3 == t) return 6; if (4 == t) return 24; if (5 == t) return 120; for (var i = 1, o = 1; o <= t; o++) i *= o; return i }, C.PlotUtils.getQBSplinePoints = function (t) { if (t.length <= 2) return t; var i = [], o = t.length - 2 - 1; i.push(t[0]); for (var n = 0; n <= o; n++) for (var s = 0; s <= 1; s += .05) { for (var l = y = 0, e = 0; e <= 2; e++) { var r = C.PlotUtils.getQuadricBSplineFactor(e, s); l += r * t[n + e][0], y += r * t[n + e][1] } i.push([l, y]) } return i.push(t[t.length - 1]), i }, C.PlotUtils.getQuadricBSplineFactor = function (t, i) { return 0 == t ? Math.pow(i - 1, 2) / 2 : 1 == t ? (-2 * Math.pow(i, 2) + 2 * i + 1) / 2 : 2 == t ? Math.pow(i, 2) / 2 : 0 }; var f = "doublearrow", m = .25, T = .3, A = .85, v = .15, I = { headHeightFactor: .18, headWidthFactor: .3, neckHeightFactor: .85, neckWidthFactor: .15, tailWidthFactor: .1, headTailFactor: .8, swallowTailFactor: 1 }, M = { tailWidthFactor: .15, neckWidthFactor: .2, headWidthFactor: .25, headAngle: Math.PI / 8.5, neckAngle: Math.PI / 13 }, w = {algorithm: {}}; w.algorithm.doubleArrow = function (t) { this.connPoint = null; var i = {controlPoint: this.tempPoint4 = null, polygonalPoint: null}; if (!((r = (this.points = t).length) < 2)) { if (2 == r) return t; var o, n, s = this.points[0], l = this.points[1], e = this.points[2], r = t.length; this.tempPoint4 = 3 == r ? w.algorithm.getTempPoint4(s, l, e) : this.points[3], this.connPoint = 3 == r || 4 == r ? C.PlotUtils.mid(s, l) : this.points[4], n = C.PlotUtils.isClockWise(s, l, e) ? (o = w.algorithm.getArrowPoints(s, this.connPoint, this.tempPoint4, !1), w.algorithm.getArrowPoints(this.connPoint, l, e, !0)) : (o = w.algorithm.getArrowPoints(l, this.connPoint, e, !1), w.algorithm.getArrowPoints(this.connPoint, s, this.tempPoint4, !0)); var a = o.length, h = (a - 5) / 2, P = o.slice(0, h), c = o.slice(h, 5 + h), g = o.slice(5 + h, a), u = n.slice(0, h), d = n.slice(h, 5 + h), U = n.slice(5 + h, a); u = C.PlotUtils.getBezierPoints(u); var F = C.PlotUtils.getBezierPoints(U.concat(P.slice(1))); g = C.PlotUtils.getBezierPoints(g); var f = u.concat(d, F, c, g), m = w.algorithm.array2Dto1D(f); i.controlPoint = [s, l, e, this.tempPoint4, this.connPoint], i.polygonalPoint = Cesium.Cartesian3.fromDegreesArray(m) } return i }, w.algorithm.getTempPoint4 = function (t, i, o) { var n, s, l, e = C.PlotUtils.mid(t, i), r = C.PlotUtils.distance(e, o), a = C.PlotUtils.getAngleOfThreePoints(t, e, o); return a < C.Constants.HALF_PI ? (n = r * Math.sin(a), s = r * Math.cos(a), l = C.PlotUtils.getThirdPoint(t, e, C.Constants.HALF_PI, n, !1), C.PlotUtils.getThirdPoint(e, l, C.Constants.HALF_PI, s, !0)) : a >= C.Constants.HALF_PI && a < Math.PI ? (n = r * Math.sin(Math.PI - a), s = r * Math.cos(Math.PI - a), l = C.PlotUtils.getThirdPoint(t, e, C.Constants.HALF_PI, n, !1), C.PlotUtils.getThirdPoint(e, l, C.Constants.HALF_PI, s, !1)) : a >= Math.PI && a < 1.5 * Math.PI ? (n = r * Math.sin(a - Math.PI), s = r * Math.cos(a - Math.PI), l = C.PlotUtils.getThirdPoint(t, e, C.Constants.HALF_PI, n, !0), C.PlotUtils.getThirdPoint(e, l, C.Constants.HALF_PI, s, !0)) : (n = r * Math.sin(2 * Math.PI - a), s = r * Math.cos(2 * Math.PI - a), l = C.PlotUtils.getThirdPoint(t, e, C.Constants.HALF_PI, n, !0), C.PlotUtils.getThirdPoint(e, l, C.Constants.HALF_PI, s, !1)) }, w.algorithm.threeArrow = function (t) { this.connPoint = null, this.tempPoint4 = null; var i = {controlPoint: this.tempPoint5 = null, polygonalPoint: null}; if (2 <= (o = (this.points = t).length)) { if (2 == o) return t; var o, n, s, l = this.points[0], e = this.points[1], r = this.points[2]; 3 == (o = t.length) ? (this.tempPoint4 = w.algorithm.getTempPoint4(l, e, r), this.tempPoint5 = C.PlotUtils.mid(r, this.tempPoint4)) : (this.tempPoint4 = this.points[3], this.tempPoint5 = this.points[4]), this.connPoint = o < 6 ? C.PlotUtils.mid(l, e) : this.points[5], s = C.PlotUtils.isClockWise(l, e, r) ? (n = w.algorithm.getArrowPoints(l, this.connPoint, this.tempPoint4, !1), w.algorithm.getArrowPoints(this.connPoint, e, r, !0)) : (n = w.algorithm.getArrowPoints(e, this.connPoint, r, !1), w.algorithm.getArrowPoints(this.connPoint, l, this.tempPoint4, !0)); var a = n.length, h = (a - 5) / 2, P = n.slice(0, h), c = n.slice(h, 5 + h), g = n.slice(5 + h, a), u = s.slice(0, h), d = s.slice(h, 5 + h), U = s.slice(5 + h, a); u = C.PlotUtils.getBezierPoints(u); var F = C.PlotUtils.getBezierPoints(U.concat(P.slice(1))); g = C.PlotUtils.getBezierPoints(g); var f = u.concat(d, F, c, g), m = w.algorithm.array2Dto1D(f); i.controlPoint = [l, e, r, this.tempPoint4, this.tempPoint5, this.connPoint], i.polygonalPoint = Cesium.Cartesian3.fromDegreesArray(m) } return i }, w.algorithm.array2Dto1D = function (t) { var i = []; return t.forEach(function (t) { i.push(t[0]), i.push(t[1]) }), i }, w.algorithm.getArrowPoints = function (t, i, o, n) { this.type = f, this.headHeightFactor = m, this.headWidthFactor = T, this.neckHeightFactor = A, this.neckWidthFactor = v; var s = C.PlotUtils.mid(t, i), l = C.PlotUtils.distance(s, o), e = C.PlotUtils.getThirdPoint(o, s, 0, .3 * l, !0), r = C.PlotUtils.getThirdPoint(o, s, 0, .5 * l, !0), a = [s, e = C.PlotUtils.getThirdPoint(s, e, C.Constants.HALF_PI, l / 5, n), r = C.PlotUtils.getThirdPoint(s, r, C.Constants.HALF_PI, l / 4, n), o], h = w.algorithm.getArrowHeadPoints(a, this.headHeightFactor, this.headWidthFactor, this.neckHeightFactor, this.neckWidthFactor), P = h[0], c = h[4], g = C.PlotUtils.distance(t, i) / C.PlotUtils.getBaseLength(a) / 2, u = w.algorithm.getArrowBodyPoints(a, P, c, g), d = u.length, U = u.slice(0, d / 2), F = u.slice(d / 2, d); return U.push(P), F.push(c), (U = U.reverse()).push(i), (F = F.reverse()).push(t), U.reverse().concat(h, F) }, w.algorithm.getArrowHeadPoints = function (t, i, o) { this.type = f, this.headHeightFactor = m, this.headWidthFactor = T, this.neckHeightFactor = A, this.neckWidthFactor = v; var n = C.PlotUtils.getBaseLength(t) * this.headHeightFactor, s = t[t.length - 1], l = (C.PlotUtils.distance(i, o), n * this.headWidthFactor), e = n * this.neckWidthFactor, r = n * this.neckHeightFactor, a = C.PlotUtils.getThirdPoint(t[t.length - 2], s, 0, n, !0), h = C.PlotUtils.getThirdPoint(t[t.length - 2], s, 0, r, !0), P = C.PlotUtils.getThirdPoint(s, a, C.Constants.HALF_PI, l, !1), c = C.PlotUtils.getThirdPoint(s, a, C.Constants.HALF_PI, l, !0); return [C.PlotUtils.getThirdPoint(s, h, C.Constants.HALF_PI, e, !1), P, s, c, C.PlotUtils.getThirdPoint(s, h, C.Constants.HALF_PI, e, !0)] }, w.algorithm.getArrowBodyPoints = function (t, i, o, n) { for (var s = C.PlotUtils.wholeDistance(t), l = C.PlotUtils.getBaseLength(t) * n, e = (l - C.PlotUtils.distance(i, o)) / 2, r = 0, a = [], h = [], P = 1; P < t.length - 1; P++) { var c = C.PlotUtils.getAngleOfThreePoints(t[P - 1], t[P], t[P + 1]) / 2, g = (l / 2 - (r += C.PlotUtils.distance(t[P - 1], t[P])) / s * e) / Math.sin(c), u = C.PlotUtils.getThirdPoint(t[P - 1], t[P], Math.PI - c, g, !0), d = C.PlotUtils.getThirdPoint(t[P - 1], t[P], c, g, !1); a.push(u), h.push(d) } return a.concat(h) }, w.algorithm.tailedAttackArrow = function (t) { t = w.algorithm.dereplication(t), this.tailWidthFactor = I.tailWidthFactor, this.swallowTailFactor = I.swallowTailFactor, this.swallowTailPnt = I.swallowTailPnt; var i = {controlPoint: null, polygonalPoint: null}; if (!((d = (i.controlPoint = t).length) < 2)) { if (2 == t.length) return i.polygonalPoint = t, i; var o = t, n = o[0], s = o[1]; C.PlotUtils.isClockWise(o[0], o[1], o[2]) && (n = o[1], s = o[0]); var l = [C.PlotUtils.mid(n, s)].concat(o.slice(2)), e = w.algorithm.getAttackArrowHeadPoints(l, n, s, I), r = e[0], a = e[4], h = C.PlotUtils.distance(n, s), P = C.PlotUtils.getBaseLength(l), c = P * this.tailWidthFactor * this.swallowTailFactor; this.swallowTailPnt = C.PlotUtils.getThirdPoint(l[1], l[0], 0, c, !0); var g = h / P, u = w.algorithm.getAttackArrowBodyPoints(l, r, a, g), d = u.length, U = [n].concat(u.slice(0, d / 2)); U.push(r); var F, f = [s].concat(u.slice(d / 2, d)); f.push(a), U = C.PlotUtils.getQBSplinePoints(U), f = C.PlotUtils.getQBSplinePoints(f), F = w.algorithm.array2Dto1D(U.concat(e, f.reverse(), [this.swallowTailPnt, U[0]])), i.polygonalPoint = Cesium.Cartesian3.fromDegreesArray(F) } return i }, w.algorithm.getAttackArrowHeadPoints = function (t, i, o, n) { this.headHeightFactor = n.headHeightFactor, this.headTailFactor = n.headTailFactor, this.headWidthFactor = n.headWidthFactor, this.neckWidthFactor = n.neckWidthFactor, this.neckHeightFactor = n.neckHeightFactor; var s = C.PlotUtils.getBaseLength(t), l = s * this.headHeightFactor, e = t[t.length - 1]; s = C.PlotUtils.distance(e, t[t.length - 2]); var r = C.PlotUtils.distance(i, o); l > r * this.headTailFactor && (l = r * this.headTailFactor); var a = l * this.headWidthFactor, h = l * this.neckWidthFactor, P = (l = s < l ? s : l) * this.neckHeightFactor, c = C.PlotUtils.getThirdPoint(t[t.length - 2], e, 0, l, !0), g = C.PlotUtils.getThirdPoint(t[t.length - 2], e, 0, P, !0), u = C.PlotUtils.getThirdPoint(e, c, C.Constants.HALF_PI, a, !1), d = C.PlotUtils.getThirdPoint(e, c, C.Constants.HALF_PI, a, !0); return [C.PlotUtils.getThirdPoint(e, g, C.Constants.HALF_PI, h, !1), u, e, d, C.PlotUtils.getThirdPoint(e, g, C.Constants.HALF_PI, h, !0)] }, w.algorithm.getAttackArrowBodyPoints = function (t, i, o, n) { for (var s = C.PlotUtils.wholeDistance(t), l = C.PlotUtils.getBaseLength(t) * n, e = (l - C.PlotUtils.distance(i, o)) / 2, r = 0, a = [], h = [], P = 1; P < t.length - 1; P++) { var c = C.PlotUtils.getAngleOfThreePoints(t[P - 1], t[P], t[P + 1]) / 2, g = (l / 2 - (r += C.PlotUtils.distance(t[P - 1], t[P])) / s * e) / Math.sin(c), u = C.PlotUtils.getThirdPoint(t[P - 1], t[P], Math.PI - c, g, !0), d = C.PlotUtils.getThirdPoint(t[P - 1], t[P], c, g, !1); a.push(u), h.push(d) } return a.concat(h) }, w.algorithm.dereplication = function (t) { var i = t[t.length - 1], o = !1, n = []; return n = t.filter(function (t) { if (t[0] != i[0] && t[1] != i[1]) return t; o = !0 }), o && n.push(i), n }, w.algorithm.fineArrow = function (t, o) { if (!(t.length < 2 || o.length < 2)) { var P = 3 == t.length ? t[2] : 0, U = 3 == o.length ? o[2] : 0, F = M.tailWidthFactor, f = M.neckWidthFactor, m = M.headWidthFactor, T = M.headAngle, A = M.neckAngle, v = []; return v[0] = t, v[1] = o, e = v[0], r = v[1], n = C.PlotUtils.getBaseLength(v), g = n * F, i = n * f, s = n * m, a = C.PlotUtils.getThirdPoint(r, e, C.Constants.HALF_PI, g, !0), l = C.PlotUtils.getThirdPoint(r, e, C.Constants.HALF_PI, g, !1), u = C.PlotUtils.getThirdPoint(e, r, T, s, !1), c = C.PlotUtils.getThirdPoint(e, r, T, s, !0), p = C.PlotUtils.getThirdPoint(e, r, A, i, !1), h = C.PlotUtils.getThirdPoint(e, r, A, i, !0), d = [], d.push(a[0], a[1], P, p[0], p[1], U, u[0], u[1], U, r[0], r[1], U, c[0], c[1], U, h[0], h[1], U, l[0], l[1], P, e[0], e[1], P), Cesium.Cartesian3.fromDegreesArrayHeights(d) } }, o.plotUtil = w.algorithm }(window);
71.534799
868
0.50786
97973ee277ed96ab5bfb81ffe1e5fd5bec45fd27
237
rb
Ruby
problem-solving/lib/simple_math.rb
Heybluguy/ruby-lab
b9ad8fbf31e1cb84240eb297660c74e35a5ecaba
[ "MIT", "Unlicense" ]
null
null
null
problem-solving/lib/simple_math.rb
Heybluguy/ruby-lab
b9ad8fbf31e1cb84240eb297660c74e35a5ecaba
[ "MIT", "Unlicense" ]
null
null
null
problem-solving/lib/simple_math.rb
Heybluguy/ruby-lab
b9ad8fbf31e1cb84240eb297660c74e35a5ecaba
[ "MIT", "Unlicense" ]
null
null
null
class SimpleMath def add(first, second) first + second end def subtract(first, second) first - second end def multiply(first, second) first * second end def divide(first, second) first / second end end
13.166667
29
0.654008
a14383f29a882d34b8e3604cb38a2dc48749a6e3
2,407
ts
TypeScript
ruleta_backend/src/routes/jugadores.controllers.ts
josecarvajalhernandez/ruleta
6391fc3d0b758205479e2f150c6421435b9bf663
[ "MIT" ]
null
null
null
ruleta_backend/src/routes/jugadores.controllers.ts
josecarvajalhernandez/ruleta
6391fc3d0b758205479e2f150c6421435b9bf663
[ "MIT" ]
null
null
null
ruleta_backend/src/routes/jugadores.controllers.ts
josecarvajalhernandez/ruleta
6391fc3d0b758205479e2f150c6421435b9bf663
[ "MIT" ]
null
null
null
import { RequestHandler } from "express"; import Jugador from './Jugador'; export const createJugador: RequestHandler = async (req, res) => { const jugadorFound = await Jugador.findOne({nombre: req.body.nombre}) if(jugadorFound){ return res.status(301).json({message: 'jugador ya existe'}); } const jugador = new Jugador (req.body); const savedJugador = await jugador.save(); res.json(savedJugador); } export const getJugadores: RequestHandler = async(req, res) => { try{ const jugadores = await Jugador.find() return res.json(jugadores); } catch (error){ //return res.json(error); res.json(error); } const jugadores = await Jugador.find(); return res.json(jugadores); } export const getDefault: RequestHandler = async(req, res) => { try{ // const jugadores = await Jugador.find() const jugadores = ['algo','otro','probando','alfin esto pinta bien'] console.log(jugadores); return res.json(jugadores); } catch (error){ //return res.json(error); res.json(error); } const jugadores = await Jugador.find(); return res.json(jugadores); } const intervaloEjecutarRuleta = 180000; setInterval(async()=>{ console.log('esto será la funcion core desde el ctrl:' + Date()); const listaJugadores = await Jugador.find(); listaJugadores.forEach( async function(data, index) { // await Jugador.findOneAndUpdate({nombre:data.nombre},{saldo:12210}); }); }, intervaloEjecutarRuleta); export const getJugador: RequestHandler = async(req, res) => { //const jugadorFound = await Jugador.findById(req.params.id) const jugadorFound = await Jugador.findOne({_id:req.params.id}) if(!jugadorFound){ return res.status(200).json; } return res.json(jugadorFound); } export const deleteJugador: RequestHandler = async(req, res) => { const jugadorFound = await Jugador.findByIdAndDelete(req.params.id); if(!jugadorFound){ return res.status(204).json(); } return res.json(jugadorFound); } export const updateJugador: RequestHandler = async(req, res) => { const jugadorUpdated = await Jugador.findByIdAndUpdate(req.params.id, req.body,{ new:true }); if(!jugadorUpdated){ return res.status(204).json(); } return res.json(jugadorUpdated); }
29
97
0.649356
25df12008605e6945ff69cae926c798f5fb8dfec
337
cs
C#
ExampleProject.Core/Models/Music.cs
gokdag/ExampleProject
98691b1c80222013f532312cae6c549e728c06c5
[ "MIT" ]
null
null
null
ExampleProject.Core/Models/Music.cs
gokdag/ExampleProject
98691b1c80222013f532312cae6c549e728c06c5
[ "MIT" ]
null
null
null
ExampleProject.Core/Models/Music.cs
gokdag/ExampleProject
98691b1c80222013f532312cae6c549e728c06c5
[ "MIT" ]
null
null
null
using ExampleProject.Core.Models; using System; using System.Collections.Generic; using System.Text; namespace MusicMarket.Core.Models { public class Music { public int Id { get; set; } public string Name { get; set; } public int ArtistId { get; set; } public Artist Artist { get; set; } } }
22.466667
42
0.64095
4cfd4249a9667f1f9b04788764ccb3843f5ef80d
864
py
Python
algorithm/config.py
magictomagic/diplomaProject
db1447874424ae02d2cddf0d602aa2a70047fb84
[ "MIT" ]
null
null
null
algorithm/config.py
magictomagic/diplomaProject
db1447874424ae02d2cddf0d602aa2a70047fb84
[ "MIT" ]
null
null
null
algorithm/config.py
magictomagic/diplomaProject
db1447874424ae02d2cddf0d602aa2a70047fb84
[ "MIT" ]
null
null
null
import redis train_db = "comments_zh" # comments_zh tmp1 predict_db = "tmp1" threshold_role = 6 threshold_dr = 8 threshold_ner = 4 part_cluster = None role_cluster = None dr_cluster = None rs_cluster = None heatage_cluster = None # Config your filter strategy # 铁定水军:11889 part_delete = {12741: 6, 24964: 6, 12217: 5, 11904: 5, 12420: 5, 11889: 6} role_delete = {5738: 6, 5746: 3, 5735: 5, 5686: 2, 5737: 4, 5597: 5} dr_delete = {781: 5, 1275: 5, 1276: 4, 1123: 2, 1147: 3, 1004: 6} rs_delete = {} # 感觉不出了,经过三重过滤,到这里基本没废话了 train_part = True train_role = True train_dr = True train_rs = True keys = ['comment_text', 'be_contents', 'like_count', 'reply_count', 'be_co_retweet', 'be_co_comments','be_co_like'] pool = redis.ConnectionPool(host='localhost', port=6379, decode_responses=True) r = redis.Redis(host='localhost', port=6379, decode_responses=True)
27
115
0.71875
f40b26d0566364fe4d8d0c091b67ddfaece05425
2,387
cs
C#
src/Samples/Modules/Modular.WebHost/Application.cs
Yoshi325/spark
da58c19574c88cca9685ce7c25f58d876a21cfe3
[ "Apache-2.0" ]
99
2015-01-02T14:15:29.000Z
2021-09-11T16:28:02.000Z
src/Samples/Modules/Modular.WebHost/Application.cs
dtabuenc/spark
5488c035f5690a80cf5c167e85efee73855b3855
[ "Apache-2.0" ]
13
2015-02-02T23:00:34.000Z
2021-08-24T15:12:13.000Z
src/Samples/Modules/Modular.WebHost/Application.cs
dtabuenc/spark
5488c035f5690a80cf5c167e85efee73855b3855
[ "Apache-2.0" ]
44
2015-02-02T22:56:44.000Z
2021-11-12T21:09:27.000Z
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using System.Web.Routing; using Castle.Facilities.Logging; using Castle.MicroKernel; using Castle.MicroKernel.Registration; using Castle.Windsor; using Spark.Modules; using Spark.Web.Mvc; namespace Modular.WebHost { public class Application { public void RegisterFacilities(IWindsorContainer container) { container.AddFacility("logging", new LoggingFacility(LoggerImplementation.Trace)); } public void RegisterComponents(IWindsorContainer container) { container .Register(Component .For<IControllerFactory>() .ImplementedBy<ModularControllerFactory>() .LifeStyle.Singleton) .Register(Component .For<IWebPackageManager>() .ImplementedBy<WebPackageManager>() .LifeStyle.Transient) .Register(AllTypes .Of<IController>() .FromAssembly(typeof(Application).Assembly) .Configure(component => component .Named(component.ServiceType.Name.ToLowerInvariant()) .LifeStyle.Transient)); } public void RegisterViewEngine(ICollection<IViewEngine> engines) { SparkEngineStarter.RegisterViewEngine(engines); } public void RegisterPackages(IWindsorContainer container, ICollection<RouteBase> routes, ICollection<IViewEngine> engines) { var manager = container.Resolve<IWebPackageManager>(); manager.LocatePackages(); manager.RegisterPackages(routes, engines); container.Release(manager); } public void RegisterRoutes(ICollection<RouteBase> routes) { routes.Add(new Route("{controller}/{action}", new RouteValueDictionary(new { controller = "home", action = "index" }), new MvcRouteHandler())); } } }
36.723077
131
0.541265
b0361c18aa588ddb28bdd809f68046f13c198e67
1,789
py
Python
rbacProject/apps/system/migrations/0001_initial.py
xeroCBW/testmodel
6000d79f91d11bcf6ba76befb3a94a007231ecdc
[ "MIT" ]
null
null
null
rbacProject/apps/system/migrations/0001_initial.py
xeroCBW/testmodel
6000d79f91d11bcf6ba76befb3a94a007231ecdc
[ "MIT" ]
54
2020-06-24T07:12:19.000Z
2022-03-12T00:43:57.000Z
rbacProject/apps/system/migrations/0001_initial.py
xeroCBW/testmodel
6000d79f91d11bcf6ba76befb3a94a007231ecdc
[ "MIT" ]
null
null
null
# Generated by Django 2.1.5 on 2020-06-17 09:21 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='EmailSetup', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('emailHost', models.CharField(max_length=30, verbose_name='SMTP服务器')), ('emailPort', models.IntegerField(verbose_name='SMTP端口')), ('emailUser', models.EmailField(max_length=100, verbose_name='邮箱帐号')), ('emailPassword', models.CharField(max_length=30, verbose_name='邮箱密码')), ], options={ 'verbose_name': '发件邮箱设置', 'verbose_name_plural': '发件邮箱设置', }, ), migrations.CreateModel( name='SystemSetup', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('loginTitle', models.CharField(blank=True, max_length=20, null=True, verbose_name='登录标题')), ('mainTitle', models.CharField(blank=True, max_length=20, null=True, verbose_name='系统标题')), ('headTitle', models.CharField(blank=True, max_length=20, null=True, verbose_name='浏览器标题')), ('copyright', models.CharField(blank=True, max_length=100, null=True, verbose_name='底部版权信息')), ('url', models.CharField(blank=True, max_length=50, null=True, verbose_name='系统URL地址')), ], options={ 'verbose_name': '系统设置', 'verbose_name_plural': '系统设置', }, ), ]
40.659091
114
0.571269
e5612b498db322e6e168cbee4ea72be601093738
177
go
Go
test/e2e/doc.go
gralfca/kubed
768ccf4878a385b0519af900f1234d5b9b961fe6
[ "Apache-2.0" ]
null
null
null
test/e2e/doc.go
gralfca/kubed
768ccf4878a385b0519af900f1234d5b9b961fe6
[ "Apache-2.0" ]
null
null
null
test/e2e/doc.go
gralfca/kubed
768ccf4878a385b0519af900f1234d5b9b961fe6
[ "Apache-2.0" ]
1
2018-12-14T13:37:50.000Z
2018-12-14T13:37:50.000Z
package e2e // This file is for avoiding this error: // go build github.com/appscode/kubed/test/e2e: no non-test Go files in /home/ac/go/src/github.com/appscode/kubed/test/e2e
35.4
122
0.757062
2563b425c8fa3335dd1676f20e6122bab8f39b41
2,396
cs
C#
Assets/Akasha/Scripts/Interfaces/IMainMenuUIController.cs
BigETI/Akasha
fa6fe2507fbb3f66f95bfd190ec74f57ac1f17a9
[ "MIT" ]
2
2020-07-28T03:17:08.000Z
2022-03-13T03:52:05.000Z
Assets/Akasha/Scripts/Interfaces/IMainMenuUIController.cs
BigETI/Akasha
fa6fe2507fbb3f66f95bfd190ec74f57ac1f17a9
[ "MIT" ]
1
2020-08-05T20:12:53.000Z
2020-08-06T10:48:07.000Z
Assets/Akasha/Scripts/Interfaces/IMainMenuUIController.cs
BigETI/Akasha
fa6fe2507fbb3f66f95bfd190ec74f57ac1f17a9
[ "MIT" ]
null
null
null
using TMPro; /// <summary> /// Akasha namespace /// </summary> namespace Akasha { /// <summary> /// Main menu UI controller interface /// </summary> public interface IMainMenuUIController : IBehaviour { /// <summary> /// World name input field /// </summary> TMP_InputField WorldNameInputField { get; set; } /// <summary> /// World description input field /// </summary> TMP_InputField WorldDescriptionInputField { get; set; } /// <summary> /// Main menu state /// </summary> EMainMenuState MainMenuState { get; set; } /// <summary> /// On menus hidden /// </summary> event MenusHiddenDelegate OnMenusHidden; /// <summary> /// On main menu shown /// </summary> event MainMenuShownDelegate OnMainMenuShown; /// <summary> /// On main menu shown /// </summary> event CreateWorldMenuShownDelegate OnCreateWorldMenuShown; /// <summary> /// On load worlds menu shown /// </summary> event LoadWorldsMenuShownDelegate OnLoadWorldsMenuShown; /// <summary> /// On options menu shown /// </summary> event OptionsMenuShownDelegate OnOptionsMenuShown; /// <summary> /// Credits menu shown /// </summary> event CreditsMenuShownDelegate OnCreditsMenuShown; /// <summary> /// Hide menus /// </summary> void HideMenus(); /// <summary> /// Show main menu /// </summary> void ShowMainMenu(); /// <summary> /// Show create world menu /// </summary> void ShowCreateWorldMenu(); /// <summary> /// Show load worlds menu /// </summary> void ShowLoadWorldsMenu(); /// <summary> /// Show options menu /// </summary> void ShowOptionsMenu(); /// <summary> /// Show credits menu /// </summary> void ShowCreditsMenu(); /// <summary> /// Create new world /// </summary> void CreateNewWorld(); /// <summary> /// Back /// </summary> void Back(); /// <summary> /// Exit game /// </summary> void ExitGame(); } }
23.038462
66
0.50626
63c81839af8d691601b60f2e536f9177c5c9d3a6
248
sql
SQL
key/backend/schema.sql
ryneci/keyBoarder
97bdf63d237a19f17aaca4559b0709b5abf717a8
[ "MIT" ]
null
null
null
key/backend/schema.sql
ryneci/keyBoarder
97bdf63d237a19f17aaca4559b0709b5abf717a8
[ "MIT" ]
null
null
null
key/backend/schema.sql
ryneci/keyBoarder
97bdf63d237a19f17aaca4559b0709b5abf717a8
[ "MIT" ]
null
null
null
CREATE TABLE Preset ( presetid int NOT NULL AUTO_INCREMENT, presetName varchar(50) NOT NULL, waveshape varchar(10) NOT NULL, timedelay varchar(10) NOT NULL, dist int NOT NULL, oversample varchar(10) NOT NULL, PRIMARY KEY (presetid) );
27.555556
39
0.737903
e701e4a8e838ae1987394b936eaea233be78ecba
1,043
php
PHP
lib/utils/mysqlCliWrapper.class.php
agallou/mageia-app-db
450dbe0d0213d8cba72fc931681e55f0be5409f8
[ "MIT" ]
4
2015-05-15T16:27:45.000Z
2019-06-29T23:50:27.000Z
lib/utils/mysqlCliWrapper.class.php
agallou/mageia-app-db
450dbe0d0213d8cba72fc931681e55f0be5409f8
[ "MIT" ]
10
2015-09-07T10:39:45.000Z
2018-06-21T12:58:00.000Z
lib/utils/mysqlCliWrapper.class.php
agallou/mageia-app-db
450dbe0d0213d8cba72fc931681e55f0be5409f8
[ "MIT" ]
4
2016-08-16T14:53:16.000Z
2020-11-07T17:45:27.000Z
<?php class mysqlCliWrapper { protected $dbInfos = null; protected $fs = null; public function __construct(dbInfos $dbInfos, sfFilesystem $filesystem) { $this->dbInfos = $dbInfos; $this->filesystem = $filesystem; } public function getFilesystem() { return $this->filesystem; } public function getDbInfos() { return $this->dbInfos; } protected function getArgs() { if (null !== $this->getDbInfos()->getPassword()) { $password = '-p' . $this->getDbInfos()->getPassword(); } else { $password = ''; } return sprintf(' -h %s -u%s %s %s', $this->getDbInfos()->getHost(), $this->getDbInfos()->getUser(), $password, $this->getDbInfos()->getName()); } public function executeFile($filePath) { $this->getFilesystem()->execute(sprintf('mysql %s < %s', $this->getArgs(), $filePath)); } public function execute($sql, $options = '') { $this->getFilesystem()->execute(sprintf('mysql %s %s -e "%s"', $this->getArgs(), $options, $sql)); } }
22.191489
147
0.596357
44965725247c09b82d7215c3404efc79076877db
877
lua
Lua
Slipe/Core/Lua/Compiled/Client/Source/SlipeClient/Browsers/Events/OnPopupEventArgs.lua
DezZolation/trains
0ed198bf6f314860b13e045f06714c644de55686
[ "Apache-2.0" ]
1
2020-08-29T20:34:10.000Z
2020-08-29T20:34:10.000Z
Slipe/Core/Lua/Compiled/Client/Source/SlipeClient/Browsers/Events/OnPopupEventArgs.lua
DezZolation/trains
0ed198bf6f314860b13e045f06714c644de55686
[ "Apache-2.0" ]
null
null
null
Slipe/Core/Lua/Compiled/Client/Source/SlipeClient/Browsers/Events/OnPopupEventArgs.lua
DezZolation/trains
0ed198bf6f314860b13e045f06714c644de55686
[ "Apache-2.0" ]
null
null
null
-- Generated by CSharp.lua Compiler local System = System System.namespace("Slipe.Client.Browsers.Events", function (namespace) namespace.class("OnPopupEventArgs", function (namespace) local __ctor__ __ctor__ = function (this, target, opener, isPopup) this.Url = System.cast(System.String, target) this.Opener = System.cast(System.String, opener) this.IsPopup = isPopup end return { IsPopup = false, __ctor__ = __ctor__, __metadata__ = function (out) return { properties = { { "IsPopup", 0x6, System.Boolean }, { "Opener", 0x6, System.String }, { "Url", 0x6, System.String } }, methods = { { ".ctor", 0x304, nil, System.Object, System.Object, System.Boolean } }, class = { 0x6 } } end } end) end)
29.233333
81
0.573546
444ee450018e970552baf85bff6060524f44ecaa
8,190
py
Python
nnef_tools/optimization/tensorflow/tf_data_format_optimizer.py
jnorwood/NNEF-Tools
5eb3755b5322040d42893e41b15093337abe04ce
[ "Apache-2.0" ]
null
null
null
nnef_tools/optimization/tensorflow/tf_data_format_optimizer.py
jnorwood/NNEF-Tools
5eb3755b5322040d42893e41b15093337abe04ce
[ "Apache-2.0" ]
null
null
null
nnef_tools/optimization/tensorflow/tf_data_format_optimizer.py
jnorwood/NNEF-Tools
5eb3755b5322040d42893e41b15093337abe04ce
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2017 The Khronos Group Inc. # # 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. from __future__ import division, print_function, absolute_import import typing from nnef_tools.conversion.conversion_info import ConversionInfo from nnef_tools.io.tensorflow.tf_graph import TFGraph, TFOperation, TFTensor from nnef_tools.optimization.data_format_optimizer import * class TFDataFormatOptimizationDriver(DataFormatOptimizationDriver): @property def graph_type(self): return TFGraph @property def tensor_type(self): return TFTensor @property def op_type(self): return TFOperation @property def conv_grad_filter_op_names(self): return ["tf.nn.conv2d_backprop_filter", "tf.nn.conv3d_backprop_filter_v2", "tf.nn.depthwise_conv2d_native_backprop_filter"] @property def squeeze_op_name(self): return "tf.squeeze" @property def unsqueeze_op_name(self): return "tf.expand_dims" @property def transpose_op_name(self): return "tf.transpose" @property def reshape_op_name(self): return "tf.reshape" @property def copy_op_name(self): return "tf.identity" def get_axes_from_squeeze(self, squeeze): assert isinstance(squeeze.attribs["axis"], list) return squeeze.attribs["axis"] def set_axes_on_squeeze(self, squeeze, axes): squeeze.attribs["axis"] = axes def get_axes_from_unsqueeze(self, unsqueeze): assert isinstance(unsqueeze.attribs["axis"], int) return [unsqueeze.attribs["axis"]] def get_axes_from_transpose(self, transpose): assert isinstance(transpose.attribs["perm"], list) return transpose.attribs["perm"] def set_axes_on_transpose(self, transpose, axes): transpose.attribs["perm"] = axes def get_shape_from_reshape(self, reshape): assert isinstance(reshape.attribs["shape"], list) return reshape.attribs["shape"] def create_tensor(self, graph, name, shape, dtype): return TFTensor(graph=graph, name=name, shape=shape, dtype=dtype) def create_transpose_op(self, graph, input, output, axes): return TFOperation(graph=graph, name="tf.transpose", inputs=input, attribs=dict(perm=axes), outputs=output) def create_copy_op(self, graph, input, output): return TFOperation(graph=graph, name="tf.identity", inputs=input, outputs=output) def generate_missing_names(self, graph): graph.generate_missing_names() def get_input_of_transform(self, transform): return transform.input def transpose_operation_default(transposer, graph, op, perm): # type: (Transposer, TFGraph, TFOperation, typing.List[int])->None if "begin" in op.attribs: op.attribs["begin"] = transposer.apply_permutation(op.attribs["begin"], perm) if "size" in op.attribs: op.attribs["size"] = transposer.apply_permutation(op.attribs["size"], perm) if "paddings" in op.attribs: op.attribs["paddings"] = transposer.apply_permutation(op.attribs["paddings"], perm) if "axis" in op.attribs: if isinstance(op.attribs["axis"], (list, tuple)): op.attribs["axis"] = transposer.apply_permutation_to_axes(op.attribs["axis"], perm) else: op.attribs["axis"] = transposer.apply_permutation_to_axis(op.attribs["axis"], perm) if "axes" in op.attribs: op.attribs["axes"] = transposer.apply_permutation_to_axes(op.attribs["axes"], perm) def _get_default_transposable_ops(): unary_ops = ['tf.identity', 'tf.negative', 'tf.reciprocal', 'tf.exp', 'tf.log', 'tf.abs', 'tf.sign', 'tf.logical_not', 'tf.floor', 'tf.ceil', 'tf.round', 'tf.square', 'tf.sqrt', 'tf.rsqrt'] binary_ops = ['tf.add', 'tf.subtract', 'tf.multiply', 'tf.divide', 'tf.pow', 'tf.less', 'tf.greater', 'tf.less_equal', 'tf.greater_equal', 'tf.equal', 'tf.not_equal', 'tf.logical_and', 'tf.logical_or', 'tf.minimum', 'tf.maximum'] activation_ops = ['tf.nn.sigmoid', 'tf.nn.relu', 'tf.nn.relu6', 'tf.nn.leaky_relu', 'tf.nn.elu', 'tf.nn.tanh', 'tf.nn.softplus', 'tf.nn.softsign'] reduce_ops = ['tf.reduce_sum', 'tf.reduce_mean', 'tf.reduce_max', 'tf.reduce_min', 'tf.reduce_any', 'tf.reduce_all'] skippable_norm_ops = ['tf.nn.l2_normalize'] skippable_other_ops = ['tf.where', 'tf.concat', 'tf.stack', 'tf.unstack', 'tf.add_n', 'tf.nn.moments', 'tf.pad', '_tf.mirror_pad_grad', 'tf.clip_by_value', 'tf.split', 'tf.nn.softmax', "tf.slice"] op_names = (unary_ops + binary_ops + activation_ops + reduce_ops + skippable_norm_ops + skippable_other_ops) ops = [TransposableOperation(name=name, dg_transpose=transpose_operation_default) for name in op_names] return ops _DefaultTransposableOps = _get_default_transposable_ops() # type: typing.List[TransposableOperation] def optimize(g, # type: TFGraph remove_unneeded_copies=False, # type: bool remove_inverse_transposes=False, # type: bool merge_transforms_into_variables=False, # type: bool merge_transforms_into_constants=False, # type: bool custom_transposable_ops=None, # type: typing.Optional[typing.List[TransposableOperation]] io_transform=None, # type:typing.Optional[TrafoOrTrafoDictType] verbose=False, # type: bool rename_tensors=False, # type: bool ): transposable_ops = _DefaultTransposableOps + (custom_transposable_ops if custom_transposable_ops else []) return optimize_impl(g=g, driver=TFDataFormatOptimizationDriver(), remove_unneeded_copies=remove_unneeded_copies, remove_inverse_transposes=remove_inverse_transposes, merge_transforms_into_variables=merge_transforms_into_variables, merge_transforms_into_constants=merge_transforms_into_constants, transposable_ops=transposable_ops, io_transform=io_transform, verbose=verbose, rename_tensors=rename_tensors) class Optimizer(object): def __init__(self, io_transform=None, # type:typing.Optional[TrafoOrTrafoDictType] custom_transposable_ops=None, # type: typing.Optional[typing.List[TransposableOperation]] merge_transforms_into_variables=False, # type: bool ): # type: (...)->None self._io_transform = io_transform self._custom_transposable_ops = custom_transposable_ops self._merge_transforms_into_variables = merge_transforms_into_variables def __call__(self, g): # type: (TFGraph)->ConversionInfo transposable_ops = (_DefaultTransposableOps + (self._custom_transposable_ops if self._custom_transposable_ops else [])) return optimize_impl(g=g, driver=TFDataFormatOptimizationDriver(), remove_unneeded_copies=True, remove_inverse_transposes=True, merge_transforms_into_variables=self._merge_transforms_into_variables, merge_transforms_into_constants=True, transposable_ops=transposable_ops, io_transform=self._io_transform, verbose=False, rename_tensors=True)
42
120
0.656777
f43c98d8f887d709c1e5709d3293d6f1793afde6
1,430
cs
C#
ProcInsp/Dtos/MachineInfo.cs
CUSTIS-public/ProcInsp
6a3d114003bda6d9673d46dde0baa6508f9126d4
[ "MIT" ]
16
2021-01-27T22:37:44.000Z
2022-03-30T11:15:53.000Z
ProcInsp/Dtos/MachineInfo.cs
CUSTIS-public/ProcInsp
6a3d114003bda6d9673d46dde0baa6508f9126d4
[ "MIT" ]
2
2021-01-25T13:22:37.000Z
2021-01-26T14:25:20.000Z
ProcInsp/Dtos/MachineInfo.cs
CUSTIS-public/ProcInsp
6a3d114003bda6d9673d46dde0baa6508f9126d4
[ "MIT" ]
2
2021-02-20T08:27:13.000Z
2022-01-14T15:25:34.000Z
using System; using System.Diagnostics; using System.Linq; using System.Management; namespace ProcInsp.Dtos { public class MachineInfo { public string Name { get; set; } public int CpuUsage { get; set; } public double? RamUsage { get; set; } /// <summary>Initializes a new instance of the <see cref="T:System.Object" /> class.</summary> public MachineInfo() { Name = Environment.MachineName; var cpuCounter = new PerformanceCounter("Processor", "% Processor Time", "_Total", Environment.MachineName); cpuCounter.NextValue(); System.Threading.Thread.Sleep(500); //This avoid that answer always 0 CpuUsage = (int) cpuCounter.NextValue(); var wmiObject = new ManagementObjectSearcher("select * from Win32_OperatingSystem"); var memoryValues = wmiObject.Get().Cast<ManagementObject>().Select(mo => new { FreePhysicalMemory = Double.Parse(mo["FreePhysicalMemory"].ToString()), TotalVisibleMemorySize = Double.Parse(mo["TotalVisibleMemorySize"].ToString()) }).FirstOrDefault(); if (memoryValues != null) { RamUsage = ((memoryValues.TotalVisibleMemorySize - memoryValues.FreePhysicalMemory) / memoryValues.TotalVisibleMemorySize) * 100; } } } }
37.631579
146
0.60979
ff4381182c94b90ec2e42ebb7162bf61ad4cdd86
34,946
py
Python
manila/share/drivers/ibm/gpfs.py
nidhimittalhada/access_group_repo
62f3365bc5fb728fcca692a9b3977690fabcd78f
[ "Apache-2.0" ]
1
2019-05-06T10:33:38.000Z
2019-05-06T10:33:38.000Z
manila/share/drivers/ibm/gpfs.py
nidhimittalhada/access_group_repo
62f3365bc5fb728fcca692a9b3977690fabcd78f
[ "Apache-2.0" ]
5
2015-08-13T15:17:28.000Z
2016-08-02T02:55:01.000Z
manila/share/drivers/ibm/gpfs.py
nidhimittalhada/access_group_repo
62f3365bc5fb728fcca692a9b3977690fabcd78f
[ "Apache-2.0" ]
3
2019-05-03T12:32:47.000Z
2021-01-30T20:26:19.000Z
# Copyright 2014 IBM Corp. # # 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. """ GPFS Driver for shares. Config Requirements: GPFS file system must have quotas enabled (`mmchfs -Q yes`). Notes: GPFS independent fileset is used for each share. TODO(nileshb): add support for share server creation/deletion/handling. Limitation: While using remote GPFS node, with Ganesha NFS, 'gpfs_ssh_private_key' for remote login to the GPFS node must be specified and there must be a passwordless authentication already setup between the Manila share service and the remote GPFS node. """ import abc import copy import math import os import re import socket from oslo_config import cfg from oslo_log import log from oslo_utils import excutils from oslo_utils import importutils from oslo_utils import strutils from oslo_utils import units import six from manila import exception from manila.i18n import _, _LE, _LI from manila.share import driver from manila.share.drivers.ibm import ganesha_utils from manila import utils LOG = log.getLogger(__name__) # matches multiple comma separated avpairs on a line. values with an embedded # comma must be wrapped in quotation marks AVPATTERN = re.compile(r'\s*(?P<attr>\w+)\s*=\s*(?P<val>' '(["][a-zA-Z0-9_, ]+["])|(\w+))\s*[,]?') ERR_FILE_NOT_FOUND = 2 gpfs_share_opts = [ cfg.StrOpt('gpfs_share_export_ip', help='IP to be added to GPFS export string.'), cfg.StrOpt('gpfs_mount_point_base', default='$state_path/mnt', help='Base folder where exported shares are located.'), cfg.StrOpt('gpfs_nfs_server_type', default='KNFS', help=('NFS Server type. Valid choices are "KNFS" (kernel NFS) ' 'or "GNFS" (Ganesha NFS).')), cfg.ListOpt('gpfs_nfs_server_list', help=('A list of the fully qualified NFS server names that ' 'make up the OpenStack Manila configuration.')), cfg.PortOpt('gpfs_ssh_port', default=22, help='GPFS server SSH port.'), cfg.StrOpt('gpfs_ssh_login', help='GPFS server SSH login name.'), cfg.StrOpt('gpfs_ssh_password', secret=True, help='GPFS server SSH login password. ' 'The password is not needed, if \'gpfs_ssh_private_key\' ' 'is configured.'), cfg.StrOpt('gpfs_ssh_private_key', help='Path to GPFS server SSH private key for login.'), cfg.ListOpt('gpfs_share_helpers', default=[ 'KNFS=manila.share.drivers.ibm.gpfs.KNFSHelper', 'GNFS=manila.share.drivers.ibm.gpfs.GNFSHelper', ], help='Specify list of share export helpers.'), cfg.StrOpt('knfs_export_options', default=('rw,sync,no_root_squash,insecure,no_wdelay,' 'no_subtree_check'), help=('Options to use when exporting a share using kernel ' 'NFS server. Note that these defaults can be overridden ' 'when a share is created by passing metadata with key ' 'name export_options.')), ] CONF = cfg.CONF CONF.register_opts(gpfs_share_opts) class GPFSShareDriver(driver.ExecuteMixin, driver.GaneshaMixin, driver.ShareDriver): """GPFS Share Driver. Executes commands relating to Shares. Supports creation of shares on a GPFS cluster. API version history: 1.0 - Initial version. 1.1 - Added extend_share functionality """ def __init__(self, *args, **kwargs): """Do initialization.""" super(GPFSShareDriver, self).__init__(False, *args, **kwargs) self._helpers = {} self.configuration.append_config_values(gpfs_share_opts) self.backend_name = self.configuration.safe_get( 'share_backend_name') or "IBM Storage System" self.sshpool = None self.ssh_connections = {} self._gpfs_execute = None def do_setup(self, context): """Any initialization the share driver does while starting.""" super(GPFSShareDriver, self).do_setup(context) host = self.configuration.gpfs_share_export_ip localserver_iplist = socket.gethostbyname_ex(socket.gethostname())[2] if host in localserver_iplist: # run locally self._gpfs_execute = self._gpfs_local_execute else: self._gpfs_execute = self._gpfs_remote_execute self._setup_helpers() def _gpfs_local_execute(self, *cmd, **kwargs): if 'run_as_root' not in kwargs: kwargs.update({'run_as_root': True}) return utils.execute(*cmd, **kwargs) def _gpfs_remote_execute(self, *cmd, **kwargs): host = self.configuration.gpfs_share_export_ip check_exit_code = kwargs.pop('check_exit_code', True) return self._run_ssh(host, cmd, check_exit_code) def _run_ssh(self, host, cmd_list, ignore_exit_code=None, check_exit_code=True): command = ' '.join(six.moves.shlex_quote(cmd_arg) for cmd_arg in cmd_list) if not self.sshpool: gpfs_ssh_login = self.configuration.gpfs_ssh_login password = self.configuration.gpfs_ssh_password privatekey = self.configuration.gpfs_ssh_private_key gpfs_ssh_port = self.configuration.gpfs_ssh_port ssh_conn_timeout = self.configuration.ssh_conn_timeout min_size = self.configuration.ssh_min_pool_conn max_size = self.configuration.ssh_max_pool_conn self.sshpool = utils.SSHPool(host, gpfs_ssh_port, ssh_conn_timeout, gpfs_ssh_login, password=password, privatekey=privatekey, min_size=min_size, max_size=max_size) try: with self.sshpool.item() as ssh: return self._gpfs_ssh_execute( ssh, command, check_exit_code=check_exit_code) except Exception as e: with excutils.save_and_reraise_exception(): msg = (_('Error running SSH command: %(cmd)s. ' 'Error: %(excmsg)s.') % {'cmd': command, 'excmsg': e}) LOG.error(msg) raise exception.GPFSException(msg) def _gpfs_ssh_execute(self, ssh, cmd, ignore_exit_code=None, check_exit_code=True): sanitized_cmd = strutils.mask_password(cmd) LOG.debug('Running cmd (SSH): %s', sanitized_cmd) stdin_stream, stdout_stream, stderr_stream = ssh.exec_command(cmd) channel = stdout_stream.channel stdout = stdout_stream.read() sanitized_stdout = strutils.mask_password(stdout) stderr = stderr_stream.read() sanitized_stderr = strutils.mask_password(stderr) stdin_stream.close() exit_status = channel.recv_exit_status() # exit_status == -1 if no exit code was returned if exit_status != -1: LOG.debug('Result was %s' % exit_status) if ((check_exit_code and exit_status != 0) and (ignore_exit_code is None or exit_status not in ignore_exit_code)): raise exception.ProcessExecutionError(exit_code=exit_status, stdout=sanitized_stdout, stderr=sanitized_stderr, cmd=sanitized_cmd) return (sanitized_stdout, sanitized_stderr) def _check_gpfs_state(self): try: out, __ = self._gpfs_execute('mmgetstate', '-Y') except exception.ProcessExecutionError as e: msg = (_('Failed to check GPFS state. Error: %(excmsg)s.') % {'excmsg': e}) LOG.error(msg) raise exception.GPFSException(msg) lines = out.splitlines() try: state_token = lines[0].split(':').index('state') gpfs_state = lines[1].split(':')[state_token] except (IndexError, ValueError) as e: msg = (_('Failed to check GPFS state. Error: %(excmsg)s.') % {'excmsg': e}) LOG.error(msg) raise exception.GPFSException(msg) if gpfs_state != 'active': return False return True def _is_dir(self, path): try: output, __ = self._gpfs_execute('stat', '--format=%F', path, run_as_root=False) except exception.ProcessExecutionError as e: msg = (_('%(path)s is not a directory. Error: %(excmsg)s') % {'path': path, 'excmsg': e}) LOG.error(msg) raise exception.GPFSException(msg) return output.strip() == 'directory' def _is_gpfs_path(self, directory): try: self._gpfs_execute('mmlsattr', directory) except exception.ProcessExecutionError as e: msg = (_('%(dir)s is not on GPFS filesystem. Error: %(excmsg)s.') % {'dir': directory, 'excmsg': e}) LOG.error(msg) raise exception.GPFSException(msg) return True def _setup_helpers(self): """Initializes protocol-specific NAS drivers.""" self._helpers = {} for helper_str in self.configuration.gpfs_share_helpers: share_proto, _, import_str = helper_str.partition('=') helper = importutils.import_class(import_str) self._helpers[share_proto.upper()] = helper(self._gpfs_execute, self.configuration) def _local_path(self, sharename): """Get local path for a share or share snapshot by name.""" return os.path.join(self.configuration.gpfs_mount_point_base, sharename) def _get_gpfs_device(self): fspath = self.configuration.gpfs_mount_point_base try: (out, __) = self._gpfs_execute('df', fspath) except exception.ProcessExecutionError as e: msg = (_('Failed to get GPFS device for %(fspath)s.' 'Error: %(excmsg)s') % {'fspath': fspath, 'excmsg': e}) LOG.error(msg) raise exception.GPFSException(msg) lines = out.splitlines() fs = lines[1].split()[0] return fs def _create_share(self, shareobj): """Create a linked fileset file in GPFS. Note: GPFS file system must have quotas enabled (mmchfs -Q yes). """ sharename = shareobj['name'] sizestr = '%sG' % shareobj['size'] sharepath = self._local_path(sharename) fsdev = self._get_gpfs_device() # create fileset for the share, link it to root path and set max size try: self._gpfs_execute('mmcrfileset', fsdev, sharename, '--inode-space', 'new') except exception.ProcessExecutionError as e: msg = (_('Failed to create fileset on %(fsdev)s for ' 'the share %(sharename)s. Error: %(excmsg)s.') % {'fsdev': fsdev, 'sharename': sharename, 'excmsg': e}) LOG.error(msg) raise exception.GPFSException(msg) try: self._gpfs_execute('mmlinkfileset', fsdev, sharename, '-J', sharepath) except exception.ProcessExecutionError as e: msg = (_('Failed to link fileset for the share %(sharename)s. ' 'Error: %(excmsg)s.') % {'sharename': sharename, 'excmsg': e}) LOG.error(msg) raise exception.GPFSException(msg) try: self._gpfs_execute('mmsetquota', '-j', sharename, '-h', sizestr, fsdev) except exception.ProcessExecutionError as e: msg = (_('Failed to set quota for the share %(sharename)s. ' 'Error: %(excmsg)s.') % {'sharename': sharename, 'excmsg': e}) LOG.error(msg) raise exception.GPFSException(msg) try: self._gpfs_execute('chmod', '777', sharepath) except exception.ProcessExecutionError as e: msg = (_('Failed to set permissions for share %(sharename)s. ' 'Error: %(excmsg)s.') % {'sharename': sharename, 'excmsg': e}) LOG.error(msg) raise exception.GPFSException(msg) def _delete_share(self, shareobj): """Remove container by removing GPFS fileset.""" sharename = shareobj['name'] fsdev = self._get_gpfs_device() # ignore error, when the fileset does not exist # it may happen, when the share creation failed, the share is in # 'error' state, and the fileset was never created # we want to ignore that error condition while deleting the fileset, # i.e. 'Fileset name share-xyz not found', with error code '2' # and mark the deletion successful # ignore_exit_code = [ERR_FILE_NOT_FOUND] # unlink and delete the share's fileset try: self._gpfs_execute('mmunlinkfileset', fsdev, sharename, '-f') except exception.ProcessExecutionError as e: msg = (_('Failed unlink fileset for share %(sharename)s. ' 'Error: %(excmsg)s.') % {'sharename': sharename, 'excmsg': e}) LOG.error(msg) raise exception.GPFSException(msg) try: self._gpfs_execute('mmdelfileset', fsdev, sharename, '-f') except exception.ProcessExecutionError as e: msg = (_('Failed delete fileset for share %(sharename)s. ' 'Error: %(excmsg)s.') % {'sharename': sharename, 'excmsg': e}) LOG.error(msg) raise exception.GPFSException(msg) def _get_available_capacity(self, path): """Calculate available space on path.""" try: out, __ = self._gpfs_execute('df', '-P', '-B', '1', path) except exception.ProcessExecutionError as e: msg = (_('Failed to check available capacity for %(path)s.' 'Error: %(excmsg)s.') % {'path': path, 'excmsg': e}) LOG.error(msg) raise exception.GPFSException(msg) out = out.splitlines()[1] size = int(out.split()[1]) available = int(out.split()[3]) return available, size def _create_share_snapshot(self, snapshot): """Create a snapshot of the share.""" sharename = snapshot['share_name'] snapshotname = snapshot['name'] fsdev = self._get_gpfs_device() LOG.debug("sharename = %s, snapshotname = %s, fsdev = %s", (sharename, snapshotname, fsdev)) try: self._gpfs_execute('mmcrsnapshot', fsdev, snapshot['name'], '-j', sharename) except exception.ProcessExecutionError as e: msg = (_('Failed to create snapshot %(snapshot)s. ' 'Error: %(excmsg)s.') % {'snapshot': snapshot['name'], 'excmsg': e}) LOG.error(msg) raise exception.GPFSException(msg) def _delete_share_snapshot(self, snapshot): """Delete a snapshot of the share.""" sharename = snapshot['share_name'] fsdev = self._get_gpfs_device() try: self._gpfs_execute('mmdelsnapshot', fsdev, snapshot['name'], '-j', sharename) except exception.ProcessExecutionError as e: msg = (_('Failed to delete snapshot %(snapshot)s. ' 'Error: %(excmsg)s.') % {'snapshot': snapshot['name'], 'excmsg': e}) LOG.error(msg) raise exception.GPFSException(msg) def _create_share_from_snapshot(self, share, snapshot, share_path): """Create share from a share snapshot.""" self._create_share(share) snapshot_path = self._get_snapshot_path(snapshot) snapshot_path = snapshot_path + "/" try: self._gpfs_execute('rsync', '-rp', snapshot_path, share_path) except exception.ProcessExecutionError as e: msg = (_('Failed to create share %(share)s from ' 'snapshot %(snapshot)s. Error: %(excmsg)s.') % {'share': share['name'], 'snapshot': snapshot['name'], 'excmsg': e}) LOG.error(msg) raise exception.GPFSException(msg) def _extend_share(self, shareobj, new_size): sharename = shareobj['name'] sizestr = '%sG' % new_size fsdev = self._get_gpfs_device() try: self._gpfs_execute('mmsetquota', '-j', sharename, '-h', sizestr, fsdev) except exception.ProcessExecutionError as e: msg = (_('Failed to set quota for the share %(sharename)s. ' 'Error: %(excmsg)s.') % {'sharename': sharename, 'excmsg': e}) LOG.error(msg) raise exception.GPFSException(msg) def get_network_allocations_number(self): return 0 def create_share(self, ctx, share, share_server=None): """Create GPFS directory that will be represented as share.""" self._create_share(share) share_path = self._get_share_path(share) location = self._get_helper(share).create_export(share_path) return location def create_share_from_snapshot(self, ctx, share, snapshot, share_server=None): """Is called to create share from a snapshot.""" share_path = self._get_share_path(share) self._create_share_from_snapshot(share, snapshot, share_path) location = self._get_helper(share).create_export(share_path) return location def create_snapshot(self, context, snapshot, share_server=None): """Creates a snapshot.""" self._create_share_snapshot(snapshot) def delete_share(self, ctx, share, share_server=None): """Remove and cleanup share storage.""" location = self._get_share_path(share) self._get_helper(share).remove_export(location, share) self._delete_share(share) def delete_snapshot(self, context, snapshot, share_server=None): """Deletes a snapshot.""" self._delete_share_snapshot(snapshot) def extend_share(self, share, new_size, share_server=None): """Extends the quota on the share fileset.""" self._extend_share(share, new_size) def ensure_share(self, ctx, share, share_server=None): """Ensure that storage are mounted and exported.""" def allow_access(self, ctx, share, access, share_server=None): """Allow access to the share.""" location = self._get_share_path(share) self._get_helper(share).allow_access(location, share, access['access_type'], access['access_to']) def deny_access(self, ctx, share, access, share_server=None): """Deny access to the share.""" location = self._get_share_path(share) self._get_helper(share).deny_access(location, share, access['access_type'], access['access_to']) def check_for_setup_error(self): """Returns an error if prerequisites aren't met.""" if not self._check_gpfs_state(): msg = (_('GPFS is not active.')) LOG.error(msg) raise exception.GPFSException(msg) if not self.configuration.gpfs_share_export_ip: msg = (_('gpfs_share_export_ip must be specified.')) LOG.error(msg) raise exception.InvalidParameterValue(err=msg) gpfs_base_dir = self.configuration.gpfs_mount_point_base if not gpfs_base_dir.startswith('/'): msg = (_('%s must be an absolute path.') % gpfs_base_dir) LOG.error(msg) raise exception.GPFSException(msg) if not self._is_dir(gpfs_base_dir): msg = (_('%s is not a directory.') % gpfs_base_dir) LOG.error(msg) raise exception.GPFSException(msg) if not self._is_gpfs_path(gpfs_base_dir): msg = (_('%s is not on GPFS. Perhaps GPFS not mounted.') % gpfs_base_dir) LOG.error(msg) raise exception.GPFSException(msg) if self.configuration.gpfs_nfs_server_type not in ['KNFS', 'GNFS']: msg = (_('Invalid gpfs_nfs_server_type value: %s. ' 'Valid values are: "KNFS", "GNFS".') % self.configuration.gpfs_nfs_server_type) LOG.error(msg) raise exception.InvalidParameterValue(err=msg) if self.configuration.gpfs_nfs_server_list is None: msg = (_('Missing value for gpfs_nfs_server_list.')) LOG.error(msg) raise exception.InvalidParameterValue(err=msg) def _update_share_stats(self): """Retrieve stats info from share volume group.""" data = dict( share_backend_name=self.backend_name, vendor_name='IBM', storage_protocol='NFS', reserved_percentage=self.configuration.reserved_share_percentage) free, capacity = self._get_available_capacity( self.configuration.gpfs_mount_point_base) data['total_capacity_gb'] = math.ceil(capacity / units.Gi) data['free_capacity_gb'] = math.ceil(free / units.Gi) super(GPFSShareDriver, self)._update_share_stats(data) def _get_helper(self, share): if share['share_proto'] == 'NFS': return self._helpers[self.configuration.gpfs_nfs_server_type] else: msg = (_('Share protocol %s not supported by GPFS driver.') % share['share_proto']) LOG.error(msg) raise exception.InvalidShare(reason=msg) def _get_share_path(self, share): """Returns share path on storage provider.""" return os.path.join(self.configuration.gpfs_mount_point_base, share['name']) def _get_snapshot_path(self, snapshot): """Returns share path on storage provider.""" snapshot_dir = ".snapshots" return os.path.join(self.configuration.gpfs_mount_point_base, snapshot["share_name"], snapshot_dir, snapshot["name"]) @six.add_metaclass(abc.ABCMeta) class NASHelperBase(object): """Interface to work with share.""" def __init__(self, execute, config_object): self.configuration = config_object self._execute = execute def create_export(self, local_path): """Construct location of new export.""" return ':'.join([self.configuration.gpfs_share_export_ip, local_path]) @abc.abstractmethod def remove_export(self, local_path, share): """Remove export.""" @abc.abstractmethod def allow_access(self, local_path, share, access_type, access): """Allow access to the host.""" @abc.abstractmethod def deny_access(self, local_path, share, access_type, access, force=False): """Deny access to the host.""" class KNFSHelper(NASHelperBase): """Wrapper for Kernel NFS Commands.""" def __init__(self, execute, config_object): super(KNFSHelper, self).__init__(execute, config_object) self._execute = execute try: self._execute('exportfs', check_exit_code=True, run_as_root=True) except exception.ProcessExecutionError as e: msg = (_('NFS server not found. Error: %s.') % e) LOG.error(msg) raise exception.GPFSException(msg) def _publish_access(self, *cmd): for server in self.configuration.gpfs_nfs_server_list: localserver_iplist = socket.gethostbyname_ex( socket.gethostname())[2] run_local = True if server not in localserver_iplist: sshlogin = self.configuration.gpfs_ssh_login remote_login = sshlogin + '@' + server cmd = ['ssh', remote_login] + list(cmd) run_local = False try: utils.execute(*cmd, run_as_root=run_local, check_exit_code=True) except exception.ProcessExecutionError: raise def _get_export_options(self, share): """Set various export attributes for share.""" metadata = share.get('share_metadata') options = None if metadata: for item in metadata: if item['key'] == 'export_options': options = item['value'] else: msg = (_('Unknown metadata key %s.') % item['key']) LOG.error(msg) raise exception.InvalidInput(reason=msg) if not options: options = self.configuration.knfs_export_options return options def remove_export(self, local_path, share): """Remove export.""" def allow_access(self, local_path, share, access_type, access): """Allow access to one or more vm instances.""" if access_type != 'ip': raise exception.InvalidShareAccess('Only ip access type ' 'supported.') # check if present in export try: out, __ = self._execute('exportfs', run_as_root=True) except exception.ProcessExecutionError as e: msg = (_('Failed to check exports on the systems. ' ' Error: %s.') % e) LOG.error(msg) raise exception.GPFSException(msg) out = re.search(re.escape(local_path) + '[\s\n]*' + re.escape(access), out) if out is not None: raise exception.ShareAccessExists(access_type=access_type, access=access) export_opts = self._get_export_options(share) cmd = ['exportfs', '-o', export_opts, ':'.join([access, local_path])] try: self._publish_access(*cmd) except exception.ProcessExecutionError as e: msg = (_('Failed to allow access for share %(sharename)s. ' 'Error: %(excmsg)s.') % {'sharename': share['name'], 'excmsg': e}) LOG.error(msg) raise exception.GPFSException(msg) def deny_access(self, local_path, share, access_type, access, force=False): """Remove access for one or more vm instances.""" cmd = ['exportfs', '-u', ':'.join([access, local_path])] try: self._publish_access(*cmd) except exception.ProcessExecutionError as e: msg = (_('Failed to deny access for share %(sharename)s. ' 'Error: %(excmsg)s.') % {'sharename': share['name'], 'excmsg': e}) LOG.error(msg) raise exception.GPFSException(msg) class GNFSHelper(NASHelperBase): """Wrapper for Ganesha NFS Commands.""" def __init__(self, execute, config_object): super(GNFSHelper, self).__init__(execute, config_object) self.default_export_options = dict() for m in AVPATTERN.finditer( self.configuration.ganesha_nfs_export_options ): self.default_export_options[m.group('attr')] = m.group('val') def _get_export_options(self, share): """Set various export attributes for share.""" # load default options first - any options passed as share metadata # will take precedence options = copy.copy(self.default_export_options) metadata = share.get('share_metadata') for item in metadata: attr = item['key'] if attr in ganesha_utils.valid_flags(): options[attr] = item['value'] else: LOG.error(_LE('Invalid metadata %(attr)s for share ' '%(share)s.'), {'attr': attr, 'share': share['name']}) return options @utils.synchronized("ganesha-process-req", external=True) def _ganesha_process_request(self, req_type, local_path, share, access_type=None, access=None, force=False): cfgpath = self.configuration.ganesha_config_path gservice = self.configuration.ganesha_service_name gservers = self.configuration.gpfs_nfs_server_list sshlogin = self.configuration.gpfs_ssh_login sshkey = self.configuration.gpfs_ssh_private_key pre_lines, exports = ganesha_utils.parse_ganesha_config(cfgpath) reload_needed = True if (req_type == "allow_access"): export_opts = self._get_export_options(share) # add the new share if it's not already defined if not ganesha_utils.export_exists(exports, local_path): # Add a brand new export definition new_id = ganesha_utils.get_next_id(exports) export = ganesha_utils.get_export_template() export['fsal'] = '"GPFS"' export['export_id'] = new_id export['tag'] = '"fs%s"' % new_id export['path'] = '"%s"' % local_path export['pseudo'] = '"%s"' % local_path export['rw_access'] = ( '"%s"' % ganesha_utils.format_access_list(access) ) for key in export_opts: export[key] = export_opts[key] exports[new_id] = export LOG.info(_LI('Add %(share)s with access from %(access)s'), {'share': share['name'], 'access': access}) else: # Update existing access with new/extended access information export = ganesha_utils.get_export_by_path(exports, local_path) initial_access = export['rw_access'].strip('"') merged_access = ','.join([access, initial_access]) updated_access = ganesha_utils.format_access_list( merged_access ) if initial_access != updated_access: LOG.info(_LI('Update %(share)s with access from ' '%(access)s'), {'share': share['name'], 'access': access}) export['rw_access'] = '"%s"' % updated_access else: LOG.info(_LI('Do not update %(share)s, access from ' '%(access)s already defined'), {'share': share['name'], 'access': access}) reload_needed = False elif (req_type == "deny_access"): export = ganesha_utils.get_export_by_path(exports, local_path) initial_access = export['rw_access'].strip('"') updated_access = ganesha_utils.format_access_list( initial_access, deny_access=access ) if initial_access != updated_access: LOG.info(_LI('Update %(share)s removing access from ' '%(access)s'), {'share': share['name'], 'access': access}) export['rw_access'] = '"%s"' % updated_access else: LOG.info(_LI('Do not update %(share)s, access from %(access)s ' 'already removed'), {'share': share['name'], 'access': access}) reload_needed = False elif (req_type == "remove_export"): export = ganesha_utils.get_export_by_path(exports, local_path) if export: exports.pop(export['export_id']) LOG.info(_LI('Remove export for %s'), share['name']) else: LOG.info(_LI('Export for %s is not defined in Ganesha ' 'config.'), share['name']) reload_needed = False if reload_needed: # publish config to all servers and reload or restart ganesha_utils.publish_ganesha_config(gservers, sshlogin, sshkey, cfgpath, pre_lines, exports) ganesha_utils.reload_ganesha_config(gservers, sshlogin, gservice) def remove_export(self, local_path, share): """Remove export.""" self._ganesha_process_request("remove_export", local_path, share) def allow_access(self, local_path, share, access_type, access): """Allow access to the host.""" # TODO(nileshb): add support for read only, metadata, and other # access types if access_type != 'ip': raise exception.InvalidShareAccess('Only ip access type ' 'supported.') self._ganesha_process_request("allow_access", local_path, share, access_type, access) def deny_access(self, local_path, share, access_type, access, force=False): """Deny access to the host.""" self._ganesha_process_request("deny_access", local_path, share, access_type, access, force)
40.872515
79
0.570194
55b46c37e5b1adc32fc2786f6bd297cbfc7a2f35
8,111
dart
Dart
lib/ui/main_pages.dart
fuadhs88/komikcast-app
c898967a59a283393d4fe7ed511195140e9aaa42
[ "MIT" ]
13
2020-08-18T13:26:50.000Z
2021-12-22T06:22:37.000Z
lib/ui/main_pages.dart
fuadhs88/komikcast-app
c898967a59a283393d4fe7ed511195140e9aaa42
[ "MIT" ]
1
2020-10-30T09:52:41.000Z
2020-11-01T15:58:53.000Z
lib/ui/main_pages.dart
fuadhs88/komikcast-app
c898967a59a283393d4fe7ed511195140e9aaa42
[ "MIT" ]
6
2020-08-25T14:56:36.000Z
2021-12-22T06:22:41.000Z
import 'package:bottom_navy_bar/bottom_navy_bar.dart'; import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:flutter_email_sender/flutter_email_sender.dart'; import 'package:flutter_modular/flutter_modular.dart'; import 'package:flutter_web_browser/flutter_web_browser.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:komikcast/bloc/theme_bloc.dart'; import 'package:komikcast/components/appbar/download_appbar.dart'; import 'package:komikcast/components/appbar/favorite_appbar.dart'; import 'package:komikcast/components/appbar/home_appbar.dart'; import 'package:komikcast/components/appbar/search_appbar.dart'; import 'package:komikcast/data/pro_data.dart'; import 'package:komikcast/env.dart'; import 'package:komikcast/models/email_feedback.dart'; import 'package:komikcast/ui/tab_pages/download_screen.dart'; import 'package:komikcast/ui/tab_pages/favorite_screen.dart'; import 'package:komikcast/ui/tab_pages/home_screen.dart'; import 'package:komikcast/ui/tab_pages/search_screen.dart'; import 'package:share/share.dart'; import 'package:url_launcher/url_launcher.dart'; class MainPage extends StatefulWidget { @override _MainPageState createState() => _MainPageState(); } class _MainPageState extends State<MainPage> { final _pages = [ HomeTabPage(), SearchTabPage(), FavoriteTabPage(), DownloadTabPage(), ]; final _appBars = [ HomeAppBar(), SearchingAppBar(), FavoriteAppBar(), DownloadAppBar(), ]; int _selectedIndex = 0; PageController _pageController; @override void initState() { _pageController = PageController(initialPage: _selectedIndex); super.initState(); } void changePage(index) => setState(() { _selectedIndex = index; _pageController.animateToPage(index, duration: Duration(milliseconds: 300), curve: Curves.ease); }); void sendFeedback() async { await FlutterEmailSender.send(emailModel); Modular.to.pop(context); } void likeFanpage() { FlutterWebBrowser.openWebPage( url: Env.fanpage, androidToolbarColor: Theme.of(context).primaryColor); Modular.to.pop(context); } void shareFriend() { Share.share( Env.appName + ' - Tempatnya Baca Komik Online Bahasa Indonesia ${Env.webpage}', subject: 'Download Aplikasi ' + Env.appName + ' Gratis'); Modular.to.pop(context); } void navigateToSetting() { Modular.to.pop(context); Modular.to.pushNamed('/setting'); } void navigateToQna() { Modular.to.pop(context); Modular.to.pushNamed('/qna'); } void openWebVersion() async { if (await canLaunch(Env.webpage)) { await launch(Env.webpage); } else { throw 'Could not launch ' + Env.webpage; } } @override Widget build(BuildContext context) { return Scaffold( appBar: _appBars[_selectedIndex], drawer: Drawer( child: Column( // padding: EdgeInsets.zero, mainAxisSize: MainAxisSize.max, children: [ DrawerHeader( child: CachedNetworkImage( imageUrl: Env.navigationDrawerImageUrl, ), decoration: BoxDecoration( color: Env.primaryColor, ), ), ListTile( leading: FaIcon( FontAwesomeIcons.commentAlt, color: Env.primaryColor, ), title: Text('Masukan'), onTap: sendFeedback, ), ListTile( leading: FaIcon( FontAwesomeIcons.facebook, color: Env.primaryColor, ), title: Text('Sukai kami'), onTap: likeFanpage, ), ListTile( leading: FaIcon( FontAwesomeIcons.share, color: Env.primaryColor, ), title: Text('Beri tahu teman anda'), onTap: shareFriend, ), ListTile( leading: FaIcon( FontAwesomeIcons.cog, color: Env.primaryColor, ), title: Text('Pengaturan'), onTap: navigateToSetting, ), ListTile( leading: FaIcon( FontAwesomeIcons.solidQuestionCircle, color: Env.primaryColor, ), title: Text('Tanya Jawab'), onTap: navigateToQna, ), Expanded( child: Align( alignment: Alignment.bottomCenter, child: Container( decoration: BoxDecoration( border: Border( top: BorderSide( width: 1, color: Theme.of(context) .textSelectionHandleColor .withOpacity(.08)), ), ), child: Container( width: double.infinity, height: 54.6, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ IconButton( icon: FaIcon( Theme.of(context).brightness == Brightness.dark ? FontAwesomeIcons.solidSun : FontAwesomeIcons.sun, color: Theme.of(context) .textSelectionHandleColor .withOpacity( Theme.of(context).brightness == Brightness.dark ? 1 : .4, ), ), onPressed: () { if (ProData().isPro() == true) { Modular.get<ThemeBloc>().add( Theme.of(context).brightness == Brightness.dark ? ThemeMode.light : ThemeMode.dark); } else { Modular.to.pushNamed('/pro'); } }, ), IconButton( icon: FaIcon(FontAwesomeIcons.chrome, color: Theme.of(context) .textSelectionHandleColor .withOpacity(.4)), onPressed: openWebVersion, ), ], ), ), ), ), ), ], ), ), body: PageView( children: _pages, controller: _pageController, physics: NeverScrollableScrollPhysics(), ), bottomNavigationBar: BottomNavyBar( selectedIndex: _selectedIndex, showElevation: true, onItemSelected: changePage, items: [ BottomNavyBarItem( icon: Icon(Icons.home), title: Text('Home'), activeColor: Env.primaryColor, ), BottomNavyBarItem( icon: Icon(Icons.search), title: Text('Search'), activeColor: Env.primaryColor, ), BottomNavyBarItem( icon: Icon(Icons.favorite), title: Text('Favorite'), activeColor: Env.primaryColor, ), BottomNavyBarItem( icon: Icon(Icons.file_download), title: Text('Downloads'), activeColor: Env.primaryColor, ), ], ), ); } }
32.705645
79
0.50561
2c3df7950f4f587a8f9d7c36ab871f9210188f40
1,641
py
Python
examples/example_input.py
jfilipedias/InquirerPy
9f67125f808cbe6a73ab3cb652f35faba3f3443e
[ "MIT" ]
null
null
null
examples/example_input.py
jfilipedias/InquirerPy
9f67125f808cbe6a73ab3cb652f35faba3f3443e
[ "MIT" ]
null
null
null
examples/example_input.py
jfilipedias/InquirerPy
9f67125f808cbe6a73ab3cb652f35faba3f3443e
[ "MIT" ]
null
null
null
from InquirerPy import inquirer, prompt from InquirerPy.validator import NumberValidator def classic(): """Classic syntax example.""" questions = [ {"type": "input", "message": "Enter your name:"}, { "type": "input", "message": "Which company would you like to apply:", "completer": { "Google": None, "Facebook": None, "Amazon": None, "Netflix": None, "Apple": None, "Microsoft": None, }, "multicolumn_complete": True, }, { "type": "input", "message": "What's your salary expectation(k):", "transformer": lambda result: "%sk" % result, "filter": lambda result: int(result) * 1000, "validate": NumberValidator(), }, ] result = prompt(questions) def alternate(): """Alternate syntax example.""" name = inquirer.text(message="Enter your name:").execute() company = inquirer.text( message="Which company would you like to apply:", completer={ "Google": None, "Facebook": None, "Amazon": None, "Netflix": None, "Apple": None, "Microsoft": None, }, multicolumn_complete=True, ).execute() salary = inquirer.text( message="What's your salary expectation(k):", transformer=lambda result: "%sk" % result, filter=lambda result: int(result) * 1000, validate=NumberValidator(), ).execute() # alternate() classic()
27.35
64
0.511274
853834b60c197cba4919094f38d9b46e1d30cf77
2,296
cs
C#
UpLauncher Public/utils/utils.cs
RaphaelGoulmot/Uplauncher-Public
413e41d51f72a347b212bcb5f8a522b24a3c5408
[ "Apache-2.0" ]
null
null
null
UpLauncher Public/utils/utils.cs
RaphaelGoulmot/Uplauncher-Public
413e41d51f72a347b212bcb5f8a522b24a3c5408
[ "Apache-2.0" ]
null
null
null
UpLauncher Public/utils/utils.cs
RaphaelGoulmot/Uplauncher-Public
413e41d51f72a347b212bcb5f8a522b24a3c5408
[ "Apache-2.0" ]
null
null
null
using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace UpLauncher_Public.utils { public class utils { public static void set_text(Control ctrl, string text) { try { if (ctrl.InvokeRequired) { ctrl.BeginInvoke((MethodInvoker)delegate () { ctrl.Text = text; }); } else { ctrl.Text = text; } }catch (Exception e) { } } public static void set_location(Control ctrl, Point p) { try { if (ctrl.InvokeRequired) { ctrl.BeginInvoke((MethodInvoker)delegate () { ctrl.Location = p; }); } else { ctrl.Location = p; } }catch (Exception e) { } } public static void set_width(Control ctrl, int w) { try { if (ctrl.InvokeRequired) { ctrl.BeginInvoke((MethodInvoker)delegate () { ctrl.Size = new Size(w, ctrl.Size.Height); }); } else { ctrl.Size = new Size(w, ctrl.Size.Height); } } catch (Exception e) { } } public static void set_enabled(Control ctrl, bool w) { if (ctrl.InvokeRequired) { ctrl.BeginInvoke((MethodInvoker)delegate () { ctrl.Enabled = w; }); } else { ctrl.Enabled = w; } } public static void set_visible(Control ctrl, bool w) { if (ctrl.InvokeRequired) { ctrl.BeginInvoke((MethodInvoker)delegate () { ctrl.Visible = w; }); } else { ctrl.Visible = w; } } public static void center_text(Control obj, int center) { set_location(obj, new Point(center / 2 - obj.Size.Width / 2, obj.Location.Y)); } } }
26.090909
112
0.440767
e7172c5f4061d98e82a8e3f220cb6be5b46a5f8f
559
php
PHP
resources/views/convocatorias/MEDICO_GENERAL.blade.php
Socrates5068/cdes2
367650ec8570060eead1ad0336641721818bed87
[ "MIT" ]
null
null
null
resources/views/convocatorias/MEDICO_GENERAL.blade.php
Socrates5068/cdes2
367650ec8570060eead1ad0336641721818bed87
[ "MIT" ]
null
null
null
resources/views/convocatorias/MEDICO_GENERAL.blade.php
Socrates5068/cdes2
367650ec8570060eead1ad0336641721818bed87
[ "MIT" ]
null
null
null
@extends('layout') @section('meta-title') Inicio | Servicio Departamental de Salud Potosí @endsection @section('listardenunciar') <div class="col-12"> <div class="center-block"> <iframe style="center" width="1300" height="800" src="https://sedespotosi.com/convocatorias/MEDICO_GENERAL.PDF" frameborder="0"></iframe> {{-- <iframe style="center" width="1300" height="800" src="https://docs.google.com/viewer?url=https://sedespotosi.com/PDF/requisitos_sssro.pdf&embedded=true" frameborder="0"></iframe> --}} </div> </div> @endsection
46.583333
197
0.697674
4b36247c8813b04b33a622511f617e995f35c1a0
2,887
kt
Kotlin
baselibrary/src/main/java/com/lq/baselibrary/view/dialog/loadingview/style/FoldingCube.kt
yuqianglianshou/BestProject
7f648b8a213143ac05fed4a67b42961802331aab
[ "Apache-2.0" ]
null
null
null
baselibrary/src/main/java/com/lq/baselibrary/view/dialog/loadingview/style/FoldingCube.kt
yuqianglianshou/BestProject
7f648b8a213143ac05fed4a67b42961802331aab
[ "Apache-2.0" ]
null
null
null
baselibrary/src/main/java/com/lq/baselibrary/view/dialog/loadingview/style/FoldingCube.kt
yuqianglianshou/BestProject
7f648b8a213143ac05fed4a67b42961802331aab
[ "Apache-2.0" ]
null
null
null
package com.lq.baselibrary.view.dialog.loadingview.style import android.animation.ValueAnimator import android.graphics.Canvas import android.graphics.Rect import android.view.animation.LinearInterpolator import com.lq.baselibrary.view.dialog.loadingview.animation.SpriteAnimatorBuilder import com.lq.baselibrary.view.dialog.loadingview.sprite.RectSprite import com.lq.baselibrary.view.dialog.loadingview.sprite.Sprite import com.lq.baselibrary.view.dialog.loadingview.sprite.SpriteContainer /** * @author tamsiree */ class FoldingCube : SpriteContainer() { private val wrapContent = false override fun onCreateChild(): Array<Sprite?>? { val cubes = arrayOfNulls<Sprite>(4) for (i in cubes.indices) { cubes[i] = Cube() cubes[i]?.setAnimationDelay(300 * i - 1200) } return cubes } override fun onBoundsChange(bounds: Rect) { var bounds = bounds super.onBoundsChange(bounds) bounds = clipSquare(bounds) var size = Math.min(bounds.width(), bounds.height()) if (wrapContent) { size = Math.sqrt( (size * size) / 2.toDouble()).toInt() val oW = (bounds.width() - size) / 2 val oH = (bounds.height() - size) / 2 bounds = Rect( bounds.left + oW, bounds.top + oH, bounds.right - oW, bounds.bottom - oH ) } val px = bounds.left + size / 2 + 1 val py = bounds.top + size / 2 + 1 for (i in 0 until childCount) { val sprite = getChildAt(i) sprite!!.setDrawBounds0( bounds.left, bounds.top, px, py ) sprite.pivotX = sprite.drawBounds.right.toFloat() sprite.pivotY = sprite.drawBounds.bottom.toFloat() } } override fun drawChild(canvas: Canvas) { val bounds = clipSquare(bounds) for (i in 0 until childCount) { val count = canvas.save() canvas.rotate(45 + i * 90.toFloat(), bounds.centerX().toFloat(), bounds.centerY().toFloat()) val sprite = getChildAt(i) sprite!!.draw(canvas) canvas.restoreToCount(count) } } class Cube : RectSprite() { override fun onCreateAnimation(): ValueAnimator? { val fractions = floatArrayOf(0f, 0.1f, 0.25f, 0.75f, 0.9f, 1f) return SpriteAnimatorBuilder(this).alpha(fractions, 0, 0, 255, 255, 0, 0).rotateX(fractions, -180, -180, 0, 0, 0, 0).rotateY(fractions, 0, 0, 0, 0, 180, 180).duration(2400).interpolator(LinearInterpolator()) .build() } init { alpha = 0 rotateX = -180 } } }
34.783133
219
0.562175
7987ed07e7f7d97264be5fcfa23d6f25098fa0e7
32,228
php
PHP
app/Http/Controllers/TeacherCreditScoreController.php
Bimbimmmm/eGuru
3c6045b650569465fa7373e313941fa9a9a87e8a
[ "MIT" ]
null
null
null
app/Http/Controllers/TeacherCreditScoreController.php
Bimbimmmm/eGuru
3c6045b650569465fa7373e313941fa9a9a87e8a
[ "MIT" ]
null
null
null
app/Http/Controllers/TeacherCreditScoreController.php
Bimbimmmm/eGuru
3c6045b650569465fa7373e313941fa9a9a87e8a
[ "MIT" ]
null
null
null
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Models\AssesmentCredit; use App\Models\AssesmentCreditScore; use App\Models\AssesmentCreditScoreRejected; use App\Models\ReferenceAssesmentCreditScoreActivity; use App\Models\ReferenceEducationCreditScore; use App\Models\PerformanceTarget; use App\Models\PerformanceTargetScore; use App\Models\ReferenceActivityCreditScore; use App\Models\PersonalData; use Validator; use Alert; class TeacherCreditScoreController extends Controller { /** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $user_id = auth()->user()->id; $datas=AssesmentCredit::where(['user_id' => $user_id, 'is_deleted' => FALSE])->get(); return view('teacher/creditscore/index', compact('datas')); } /** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create() { $user_id = auth()->user()->id; $performances=PerformanceTarget::where([ 'user_id' => $user_id, 'is_official_approve' => TRUE, 'is_correction' => FALSE, 'is_deleted' => FALSE ])->get(); $refeducations=ReferenceEducationCreditScore::all(); return view('teacher/creditscore/create', compact('performances', 'refeducations')); } /** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(Request $request){ $rules = [ 'performance_target_id' => 'required', 'reference_education_credit_score_id' => 'required', 'old_work_year' => 'required', 'new_work_year' => 'required', 'last_assessment_credit_score' => 'required', 'file' => 'required', 'file.*' => 'mimes:pdf|max:2048' ]; $messages = [ 'performance_target_id.required' => 'SKP Tahun Berjalan Wajib Dipilih', 'reference_education_credit_score_id.required' => 'Jenis Pendidikan wajib diisi', 'old_work_year.required' => 'Masa Kerja Golongan Lama Wajib Diisi', 'new_work_year.required' => 'Masa Kerja Golongan Baru Wajib Diisi', 'last_assessment_credit_score.required' => 'Jumlah Angka Kredit Tahun Lalu Wajib Diisi', 'file.required' => 'File PAK Tahun Lalu Wajib Diupload', 'file.mimes' => 'File wajib berekstensi .pdf' ]; $validator = Validator::make($request->all(), $rules, $messages); if($validator->fails()){ return redirect()->back()->withErrors($validator)->withInput($request->all); } $check=AssesmentCredit::where(['performance_target_id' => $request->performance_target_id, 'is_deleted' => FALSE])->count(); if($check > 0){ Alert::error('Gagal', 'SKP Tahun Berjalan Sudah Pernah Dibuatkan PAK!'); return redirect()->route('teachercs'); }else{ $original_name = $request->file->getClientOriginalName(); $file = 'file_pak_tahun_lalu_' . time() . '_' . $original_name; $request->file->move(public_path('storage/creditscore'), $file); $user_id = auth()->user()->id; $data = new AssesmentCredit; $data->performance_target_id = $request->performance_target_id; $data->user_id = $user_id; $data->old_work_year = $request->old_work_year; $data->new_work_year = $request->new_work_year; $data->reference_education_credit_score_id = $request->reference_education_credit_score_id; $data->last_assessment_credit_score = $request->last_assessment_credit_score; $data->file = $file; $data->is_ready = FALSE; $data->is_finished = FALSE; $data->is_official_approve = FALSE; $data->is_deleted = FALSE; $save = $data->save(); $get_performance_target_scores=PerformanceTargetScore::where('performance_target_id', $request->performance_target_id)->get(); $get_elements_1=ReferenceActivityCreditScore::where('activity_item', 'Mengikuti pendidikan dan memperoleh gelar/ijazah/akta')->get(); $get_elements_2=ReferenceActivityCreditScore::where('activity_item', 'Mengikuti pelatihan prajabatan')->get(); $get_elements_3=ReferenceActivityCreditScore::where('activity_item', 'Melaksanakan proses pembelajaran')->get(); $get_elements_4=ReferenceActivityCreditScore::where('activity_item', 'Melaksanakan proses bimbingan')->get(); $get_elements_5=ReferenceActivityCreditScore::where('activity_item', 'Melaksanakan tugas lain yang relevan dengan fungsi sekolah')->get(); $get_elements_6=ReferenceActivityCreditScore::where('activity_item', 'Melaksanakan pengembangan diri')->get(); $get_elements_7=ReferenceActivityCreditScore::where('activity_item', 'Melaksanakan publikasi ilmiah')->get(); $get_elements_8=ReferenceActivityCreditScore::where('activity_item', 'Melaksanakan karya inovatif')->get(); $get_elements_9=ReferenceActivityCreditScore::where('activity_item', 'Memperoleh gelar/ijazah yang tidak sesuai dengan bidang yang diampuhnya')->get(); $get_elements_10=ReferenceActivityCreditScore::where('activity_item', 'Melaksanakan kegiatan yang mendukung tugas guru')->get(); $get_elements_11=ReferenceActivityCreditScore::where('activity_item', 'Perolehan penghargaan/tanda jasa Satya Lancana Karya Satya')->get(); $get_assesment_credit=AssesmentCredit::where(['performance_target_id' => $request->performance_target_id, 'user_id' => $user_id])->first(); $element_1=ReferenceAssesmentCreditScoreActivity::where('activity_item', 'Mengikuti pendidikan dan memperoleh gelar/ijazah/akta')->first(); $element_2=ReferenceAssesmentCreditScoreActivity::where('activity_item', 'Mengikuti pelatihan prajabatan')->first(); $element_3=ReferenceAssesmentCreditScoreActivity::where('activity_item', 'Melaksanakan proses pembelajaran')->first(); $element_4=ReferenceAssesmentCreditScoreActivity::where('activity_item', 'Melaksanakan proses bimbingan')->first(); $element_5=ReferenceAssesmentCreditScoreActivity::where('activity_item', 'Melaksanakan tugas lain yang relevan dengan fungsi sekolah')->first(); $element_6=ReferenceAssesmentCreditScoreActivity::where('activity_item', 'Melaksanakan pengembangan diri')->first(); $element_7=ReferenceAssesmentCreditScoreActivity::where('activity_item', 'Melaksanakan publikasi ilmiah')->first(); $element_8=ReferenceAssesmentCreditScoreActivity::where('activity_item', 'Melaksanakan karya inovatif')->first(); $element_9=ReferenceAssesmentCreditScoreActivity::where('activity_item', 'Memperoleh gelar/ijazah yang tidak sesuai dengan bidang yang diampuhnya')->first(); $element_10=ReferenceAssesmentCreditScoreActivity::where('activity_item', 'Melaksanakan kegiatan yang mendukung tugas guru')->first(); $element_11=ReferenceAssesmentCreditScoreActivity::where('activity_item', 'Perolehan penghargaan/tanda jasa Satya Lancana Karya Satya')->first(); //Masukkan Nilai Unsur 1 Ke database assesment_credit_score $refeducation=ReferenceEducationCreditScore::where('id', $request->reference_education_credit_score_id)->first(); $data_element_1 = new AssesmentCreditScore; $data_element_1->assesment_credit_id = $get_assesment_credit->id; $data_element_1->reference_assesment_credit_score_activity_id = $element_1->id; if($refeducation->is_adjustment == TRUE){ $old=$refeducation->credit_score - 50.00; $data_element_1->old_credit_score = $old; $data_element_1->new_user_credit_score = 50.00; $data_element_1->total_user_credit_score = $refeducation->credit_score; }else{ $data_element_1->old_credit_score = $refeducation->credit_score; $data_element_1->new_user_credit_score = 0; $data_element_1->total_user_credit_score = $refeducation->credit_score; $data_element_1->new_evaluator_credit_score = 0; $data_element_1->total_evaluator_credit_score = $refeducation->credit_score; } $save_elemet_1 = $data_element_1->save(); //Masukkan Nilai Unsur 2 Ke database assesment_credit_score foreach ($get_elements_2 as $get_element_2) { foreach ($get_performance_target_scores as $get_performance_target_score) { if($get_element_2->id == $get_performance_target_score->reference_activity_credit_score_id){ $data_element_2 = new AssesmentCreditScore; $data_element_2->assesment_credit_id = $get_assesment_credit->id; $data_element_2->reference_assesment_credit_score_activity_id = $element_2->id; $data_element_2->new_user_credit_score = $get_performance_target_score->realization_credit_score; $save_elemet_2 = $data_element_2->save(); } } } //Masukkan Nilai Unsur 3 Ke database assesment_credit_score foreach ($get_elements_3 as $get_element_3) { foreach ($get_performance_target_scores as $get_performance_target_score) { if($get_element_3->id == $get_performance_target_score->reference_activity_credit_score_id){ $data_element_3 = new AssesmentCreditScore; $data_element_3->assesment_credit_id = $get_assesment_credit->id; $data_element_3->reference_assesment_credit_score_activity_id = $element_3->id; $data_element_3->new_user_credit_score = $get_performance_target_score->realization_credit_score; $save_elemet_3 = $data_element_3->save(); } } } //Masukkan Nilai Unsur 4 Ke database assesment_credit_score foreach ($get_elements_4 as $get_element_4) { foreach ($get_performance_target_scores as $get_performance_target_score) { if($get_element_4->id == $get_performance_target_score->reference_activity_credit_score_id){ $data_element_4 = new AssesmentCreditScore; $data_element_4->assesment_credit_id = $get_assesment_credit->id; $data_element_4->reference_assesment_credit_score_activity_id = $element_4->id; $data_element_4->new_user_credit_score = $get_performance_target_score->realization_credit_score; $save_elemet_4 = $data_element_4->save(); } } } //Masukkan Nilai Unsur 5 Ke database assesment_credit_score $user_credit_score5=0; $element5=0; foreach ($get_elements_5 as $get_element_5) { foreach ($get_performance_target_scores as $get_performance_target_score) { if($get_element_5->id == $get_performance_target_score->reference_activity_credit_score_id){ $element5=$element_5->id; $user_credit_score5=$user_credit_score5+$get_performance_target_score->realization_credit_score; } } } if($element5 != 0){ $data_element_5 = new AssesmentCreditScore; $data_element_5->assesment_credit_id = $get_assesment_credit->id; $data_element_5->reference_assesment_credit_score_activity_id = $element5; $data_element_5->new_user_credit_score = $user_credit_score5; $save_elemet_5 = $data_element_5->save(); } //Masukkan Nilai Unsur 6 Ke database assesment_credit_score $user_credit_score6=0; $element6=0; foreach ($get_elements_6 as $get_element_6) { foreach ($get_performance_target_scores as $get_performance_target_score) { if($get_element_6->id == $get_performance_target_score->reference_activity_credit_score_id){ $element6=$element_6->id; $user_credit_score6=$user_credit_score6+$get_performance_target_score->realization_credit_score; } } } if($element6 != 0){ $data_element_6 = new AssesmentCreditScore; $data_element_6->assesment_credit_id = $get_assesment_credit->id; $data_element_6->reference_assesment_credit_score_activity_id = $element6; $data_element_6->new_user_credit_score = $user_credit_score6; $save_elemet_6 = $data_element_6->save(); } //Masukkan Nilai Unsur 7 Ke database assesment_credit_score $user_credit_score7=0; $element7=0; foreach ($get_elements_7 as $get_element_7) { foreach ($get_performance_target_scores as $get_performance_target_score) { if($get_element_7->id == $get_performance_target_score->reference_activity_credit_score_id){ $element7=$element_7->id; $user_credit_score7=$user_credit_score7+$get_performance_target_score->realization_credit_score; } } } if($element7 != 0){ $data_element_7 = new AssesmentCreditScore; $data_element_7->assesment_credit_id = $get_assesment_credit->id; $data_element_7->reference_assesment_credit_score_activity_id = $element7; $data_element_7->new_user_credit_score = $user_credit_score7; $save_elemet_7 = $data_element_7->save(); } //Masukkan Nilai Unsur 8 Ke database assesment_credit_score $user_credit_score8=0; $element8=0; foreach ($get_elements_8 as $get_element_8) { foreach ($get_performance_target_scores as $get_performance_target_score) { if($get_element_8->id == $get_performance_target_score->reference_activity_credit_score_id){ $element8=$element_8->id; $user_credit_score8=$user_credit_score8+$get_performance_target_score->realization_credit_score; } } } if($element8 != 0){ $data_element_8 = new AssesmentCreditScore; $data_element_8->assesment_credit_id = $get_assesment_credit->id; $data_element_8->reference_assesment_credit_score_activity_id = $element8; $data_element_8->new_user_credit_score = $user_credit_score8; $save_elemet_8 = $data_element_8->save(); } //Masukkan Nilai Unsur 9 Ke database assesment_credit_score $user_credit_score9=0; $element9=0; foreach ($get_elements_9 as $get_element_9) { foreach ($get_performance_target_scores as $get_performance_target_score) { if($get_element_9->id == $get_performance_target_score->reference_activity_credit_score_id){ $element9=$element_9->id; $user_credit_score9=$user_credit_score9+$get_performance_target_score->realization_credit_score; } } } if($element9 != 0){ $data_element_9 = new AssesmentCreditScore; $data_element_9->assesment_credit_id = $get_assesment_credit->id; $data_element_9->reference_assesment_credit_score_activity_id = $element9; $data_element_9->new_user_credit_score = $user_credit_score9; $save_elemet_9 = $data_element_9->save(); } //Masukkan Nilai Unsur 10 Ke database assesment_credit_score $user_credit_score10=0; $element10=0; foreach ($get_elements_10 as $get_element_10) { foreach ($get_performance_target_scores as $get_performance_target_score) { if($get_element_10->id == $get_performance_target_score->reference_activity_credit_score_id){ $element10=$element_10->id; $user_credit_score10=$user_credit_score10+$get_performance_target_score->realization_credit_score; } } } if($element10 != 0){ $data_element_10 = new AssesmentCreditScore; $data_element_10->assesment_credit_id = $get_assesment_credit->id; $data_element_10->reference_assesment_credit_score_activity_id = $element10; $data_element_10->new_user_credit_score = $user_credit_score10; $save_elemet_10 = $data_element_10->save(); } //Masukkan Nilai Unsur 11 Ke database assesment_credit_score $user_credit_score11=0; $element11=0; foreach ($get_elements_11 as $get_element_11) { foreach ($get_performance_target_scores as $get_performance_target_score) { if($get_element_11->id == $get_performance_target_score->reference_activity_credit_score_id){ $element11=$element_11->id; $user_credit_score11=$user_credit_score11+$get_performance_target_score->realization_credit_score; } } } if($element11 != 0){ $data_element_11 = new AssesmentCreditScore; $data_element_11->assesment_credit_id = $get_assesment_credit->id; $data_element_11->reference_assesment_credit_score_activity_id = $element11; $data_element_11->new_user_credit_score = $user_credit_score11; $save_elemet_11 = $data_element_11->save(); } Alert::success('Berhasil', 'Pembuatan PAK Berhasil Dibuat'); return redirect()->route('teachercs'); } } /** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { $assesment=AssesmentCredit::where('id', $id)->first(); $datas=AssesmentCreditScore::where('assesment_credit_id' , $id)->orderBy('reference_assesment_credit_score_activity_id', 'asc')->get(); return view('teacher/creditscore/show', compact('assesment', 'datas')); } /** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id, $idc) { $check=AssesmentCredit::where(['id'=> $idc, 'is_ready' => TRUE])->count(); $data=AssesmentCreditScore::where('id' , $id)->first(); if($check > 0){ Alert::error('Gagal', 'Pengajuan PAK Sudah Dikunci!'); return redirect()->back(); }else{ return view('teacher/creditscore/edit', compact('data', 'idc')); } } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(Request $request, $id, $idc) { $data = AssesmentCreditScore::findOrFail($id); $total_user_credit_score=$data->new_user_credit_score+$request->old_credit_score; $data->update([ 'old_credit_score' => $request->old_credit_score, 'total_user_credit_score' => $total_user_credit_score ]); if($data){ Alert::success('Berhasil', 'Nilai Angka Kredit Lama Berhasil Ditambahkan'); return redirect()->route('teachercsshow', $idc); } else { Alert::error('Gagal', 'Gagal Menambahkan Angka Kredit Lama! Silahkan ulangi beberapa saat lagi'); return redirect()->back(); } } public function createold($id) { $check=AssesmentCredit::where(['id'=> $id, 'is_ready' => TRUE])->count(); $activities=ReferenceAssesmentCreditScoreActivity::all(); if($check > 0){ Alert::error('Gagal', 'Pengajuan PAK Sudah Dikunci!'); return redirect()->back(); }else{ return view('teacher/creditscore/oldactivity', compact('activities', 'id')); } } public function storeold(Request $request, $id) { $rules = [ 'reference_assesment_credit_score_activity_id' => 'required', 'last_assessment_credit_score' => 'required' ]; $messages = [ 'reference_assesment_credit_score_activity_id.required' => 'Kegiatan Wajib Dipilih', 'last_assessment_credit_score.required' => 'Angka Kredit wajib diisi' ]; $validator = Validator::make($request->all(), $rules, $messages); if($validator->fails()){ return redirect()->back()->withErrors($validator)->withInput($request->all); } $check=AssesmentCreditScore::where([ 'assesment_credit_id' => $id, 'reference_assesment_credit_score_activity_id' => $request->reference_assesment_credit_score_activity_id ])->count(); if($check > 0){ Alert::error('Gagal', 'Kegiatan Sudah Ada!'); return redirect()->back(); }else{ $data = new AssesmentCreditScore; $data->assesment_credit_id = $id; $data->reference_assesment_credit_score_activity_id = $request->reference_assesment_credit_score_activity_id; $data->old_credit_score = $request->last_assessment_credit_score; $data->new_user_credit_score = 0; $data->total_user_credit_score = $request->last_assessment_credit_score; $save = $data->save(); Alert::success('Berhasil', 'Kegiatan PAK Lama Ditambahkan'); return redirect()->route('teachercsshow', $id); } } /** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function lock($id) { $data = AssesmentCredit::findOrFail($id); $data->update([ 'is_ready' => TRUE ]); if($data){ Alert::success('Berhasil', 'Pengajuan PAK Berhasil Dikunci'); return redirect()->route('teachercs'); } else { Alert::error('Gagal', 'Gagal Mengunci Pengajuan PAK! Silahkan ulangi beberapa saat lagi'); return redirect()->back(); } } public function pdf($id){ $user = auth()->user()->registration_number; $get_assesment_credit_data=AssesmentCredit::where('id', $id)->first(); $personal_data=PersonalData::where('registration_number', $user)->first(); $element_1=ReferenceAssesmentCreditScoreActivity::where('activity_item', 'Mengikuti pendidikan dan memperoleh gelar/ijazah/akta')->first(); $element_2=ReferenceAssesmentCreditScoreActivity::where('activity_item', 'Mengikuti pelatihan prajabatan')->first(); $element_3=ReferenceAssesmentCreditScoreActivity::where('activity_item', 'Melaksanakan proses pembelajaran')->first(); $element_4=ReferenceAssesmentCreditScoreActivity::where('activity_item', 'Melaksanakan proses bimbingan')->first(); $element_5=ReferenceAssesmentCreditScoreActivity::where('activity_item', 'Melaksanakan tugas lain yang relevan dengan fungsi sekolah')->first(); $element_6=ReferenceAssesmentCreditScoreActivity::where('activity_item', 'Melaksanakan pengembangan diri')->first(); $element_7=ReferenceAssesmentCreditScoreActivity::where('activity_item', 'Melaksanakan publikasi ilmiah')->first(); $element_8=ReferenceAssesmentCreditScoreActivity::where('activity_item', 'Melaksanakan karya inovatif')->first(); $element_9=ReferenceAssesmentCreditScoreActivity::where('activity_item', 'Memperoleh gelar/ijazah yang tidak sesuai dengan bidang yang diampuhnya')->first(); $element_10=ReferenceAssesmentCreditScoreActivity::where('activity_item', 'Melaksanakan kegiatan yang mendukung tugas guru')->first(); $element_11=ReferenceAssesmentCreditScoreActivity::where('activity_item', 'Perolehan penghargaan/tanda jasa Satya Lancana Karya Satya')->first(); $get_element_1=AssesmentCreditScore::where(['assesment_credit_id' => $id , 'reference_assesment_credit_score_activity_id' => $element_1->id])->first(); $get_element_2=AssesmentCreditScore::where(['assesment_credit_id' => $id , 'reference_assesment_credit_score_activity_id' => $element_2->id])->first(); $get_element_3=AssesmentCreditScore::where(['assesment_credit_id' => $id , 'reference_assesment_credit_score_activity_id' => $element_3->id])->first(); $get_element_4=AssesmentCreditScore::where(['assesment_credit_id' => $id , 'reference_assesment_credit_score_activity_id' => $element_4->id])->first(); $get_element_5=AssesmentCreditScore::where(['assesment_credit_id' => $id , 'reference_assesment_credit_score_activity_id' => $element_5->id])->first(); $get_element_6=AssesmentCreditScore::where(['assesment_credit_id' => $id , 'reference_assesment_credit_score_activity_id' => $element_6->id])->first(); $get_element_7=AssesmentCreditScore::where(['assesment_credit_id' => $id , 'reference_assesment_credit_score_activity_id' => $element_7->id])->first(); $get_element_8=AssesmentCreditScore::where(['assesment_credit_id' => $id , 'reference_assesment_credit_score_activity_id' => $element_8->id])->first(); $get_element_9=AssesmentCreditScore::where(['assesment_credit_id' => $id , 'reference_assesment_credit_score_activity_id' => $element_9->id])->first(); $get_element_10=AssesmentCreditScore::where(['assesment_credit_id' => $id , 'reference_assesment_credit_score_activity_id' => $element_10->id])->first(); $get_element_11=AssesmentCreditScore::where(['assesment_credit_id' => $id , 'reference_assesment_credit_score_activity_id' => $element_11->id])->first(); if($get_element_1 != null){ $count1=$get_element_1->new_evaluator_credit_score; $old_count1=$get_element_1->old_credit_score; $total_ecs1=$get_element_1->total_evaluator_credit_score; $arr_count1=[$count1,$old_count1,$total_ecs1]; }else{ $count1=0; $old_count1=0; $total_ecs1=0; $arr_count1=[$count1,$old_count1,$total_ecs1]; } if($get_element_2 != null){ $count2=$get_element_2->new_evaluator_credit_score; $old_count2=$get_element_2->old_credit_score; $total_ecs2=$get_element_2->total_evaluator_credit_score; $arr_count2=[$count2,$old_count2,$total_ecs2]; }else{ $count2=0; $old_count2=0; $total_ecs2=0; $arr_count2=[$count2,$old_count2,$total_ecs2]; } if($get_element_3 != null){ $count3=$get_element_3->new_evaluator_credit_score; $old_count3=$get_element_3->old_credit_score; $total_ecs3=$get_element_3->total_evaluator_credit_score; $arr_count3=[$count3,$old_count3,$total_ecs3]; }else{ $count3=0; $old_count3=0; $total_ecs3=0; $arr_count3=[$count3,$old_count3,$total_ecs3]; } if($get_element_4 != null){ $count4=$get_element_4->new_evaluator_credit_score; $old_count4=$get_element_4->old_credit_score; $total_ecs4=$get_element_4->total_evaluator_credit_score; $arr_count4=[$count4,$old_count4,$total_ecs4]; }else{ $count4=0; $old_count4=0; $total_ecs4=0; $arr_count4=[$count4,$old_count4,$total_ecs4]; } if($get_element_5 != null){ $count5=$get_element_5->new_evaluator_credit_score; $old_count5=$get_element_5->old_credit_score; $total_ecs5=$get_element_5->total_evaluator_credit_score; $arr_count5=[$count5,$old_count5,$total_ecs5]; }else{ $count5=0; $old_count5=0; $total_ecs5=0; $arr_count5=[$count5,$old_count5,$total_ecs5]; } if($get_element_6 != null){ $count6=$get_element_6->new_evaluator_credit_score; $old_count6=$get_element_6->old_credit_score; $total_ecs6=$get_element_6->total_evaluator_credit_score; $arr_count6=[$count6,$old_count6,$total_ecs6]; }else{ $count6=0; $old_count6=0; $total_ecs6=0; $arr_count6=[$count6,$old_count6,$total_ecs6]; } if($get_element_7 != null){ $count7=$get_element_7->new_evaluator_credit_score; $old_count7=$get_element_7->old_credit_score; $total_ecs7=$get_element_7->total_evaluator_credit_score; $arr_count7=[$count7,$old_count7,$total_ecs7]; }else{ $count7=0; $old_count7=0; $total_ecs7=0; $arr_count7=[$count7,$old_count7,$total_ecs7]; } if($get_element_8 != null){ $count8=$get_element_8->new_evaluator_credit_score; $old_count8=$get_element_8->old_credit_score; $total_ecs8=$get_element_8->total_evaluator_credit_score; $arr_count8=[$count8,$old_count8,$total_ecs8]; }else{ $count8=0; $old_count8=0; $total_ecs8=0; $arr_count8=[$count8,$old_count8,$total_ecs8]; } if($get_element_9 != null){ $count9=$get_element_9->new_evaluator_credit_score; $old_count9=$get_element_9->old_credit_score; $total_ecs9=$get_element_9->total_evaluator_credit_score; $arr_count9=[$count9,$old_count9,$total_ecs9]; }else{ $count9=0; $old_count9=0; $total_ecs9=0; $arr_count9=[$count9,$old_count9,$total_ecs9]; } if($get_element_10 != null){ $count10=$get_element_10->new_evaluator_credit_score; $old_count10=$get_element_10->old_credit_score; $total_ecs10=$get_element_10->total_evaluator_credit_score; $arr_count10=[$count10,$old_count10,$total_ecs10]; }else{ $count10=0; $old_count10=0; $total_ecs10=0; $arr_count10=[$count10,$old_count10,$total_ecs10]; } if($get_element_11 != null){ $count11=$get_element_11->new_evaluator_credit_score; $old_count11=$get_element_11->old_credit_score; $total_ecs11=$get_element_11->total_evaluator_credit_score; $arr_count11=[$count11,$old_count11,$total_ecs11]; }else{ $count11=0; $old_count11=0; $total_ecs11=0; $arr_count11=[$count11,$old_count11,$total_ecs11]; } (float)$count_new_main_element=$count1+$count2+$count3+$count4+$count5+$count6+$count7+$count8; (float)$count_old_main_element=$old_count1+$old_count2+$old_count3+$old_count4+$old_count5+$old_count6+$old_count7+$old_count8; (float)$total_main_element=$total_ecs1+$total_ecs2+$total_ecs3+$total_ecs4+$total_ecs5+$total_ecs6+$total_ecs7+$total_ecs8; $arr_main=[$count_old_main_element,$count_new_main_element,$total_main_element]; (float)$count_new_second_element=$count9+$count10+$count11; (float)$count_old_second_element=$old_count9+$old_count10+$old_count11; (float)$total_second_element=$total_ecs9+$total_ecs10+$total_ecs11; $arr_second=[$count_old_second_element,$count_new_second_element,$total_second_element]; (float)$count_old_all=$count_old_main_element+$count_old_second_element; (float)$count_new_all=$count_new_main_element+$count_new_second_element; (float)$count_total_all=$total_main_element+$total_second_element; $arr_all=[$count_old_all, $count_new_all, $count_total_all]; $assesorqrcode="Nama Lengkap : Jafar Sidik, SE. | NIP : NIP. 19620815 198602 1 005 | Pembina Utama Muda | Kepala Dinas"; $get_rejected_datas=AssesmentCreditScoreRejected::where('assesment_credit_id', $id)->get(); return view('teacher/creditscore/pdf', compact('get_assesment_credit_data', 'arr_count1','arr_count2','arr_count3','arr_count4','arr_count5','arr_count6', 'arr_count7','arr_count8','arr_count9','arr_count10','arr_count11', 'arr_main', 'arr_second', 'arr_all', 'assesorqrcode', 'get_rejected_datas')); } }
50.913112
166
0.65983
4f59e42c3db29f1518f639d7eaf8977c6cecd27e
56
sql
SQL
ee7/jms/jms-xa/src/main/resources/META-INF/load.sql
Thihup/jakartaee-samples
3a688522c4bed35db1e92eca3aa2f4d118413050
[ "MIT" ]
2,150
2015-01-01T20:41:01.000Z
2022-03-27T19:44:00.000Z
ee7/jms/jms-xa/src/main/resources/META-INF/load.sql
Thihup/jakartaee-samples
3a688522c4bed35db1e92eca3aa2f4d118413050
[ "MIT" ]
106
2015-01-05T12:37:30.000Z
2022-01-21T23:22:50.000Z
ee7/jms/jms-xa/src/main/resources/META-INF/load.sql
Thihup/jakartaee-samples
3a688522c4bed35db1e92eca3aa2f4d118413050
[ "MIT" ]
1,669
2015-01-03T13:13:24.000Z
2022-03-22T12:21:50.000Z
INSERT INTO T_USERS("EMAIL") VALUES ('jack@itcrowd.pl')
28
55
0.732143
43aebf06907e41f2c12ecc043cd962c2f7cb5f65
796
ts
TypeScript
src/socketio/ns-booking/ns-booking.service.ts
heremamit/socketio
49966bae28b89ecd9d0a2ed5339b5375853fab61
[ "MIT" ]
null
null
null
src/socketio/ns-booking/ns-booking.service.ts
heremamit/socketio
49966bae28b89ecd9d0a2ed5339b5375853fab61
[ "MIT" ]
null
null
null
src/socketio/ns-booking/ns-booking.service.ts
heremamit/socketio
49966bae28b89ecd9d0a2ed5339b5375853fab61
[ "MIT" ]
null
null
null
import { Injectable } from '@nestjs/common'; import { OnGatewayConnection, SubscribeMessage, WebSocketGateway, WebSocketServer, } from '@nestjs/websockets'; import { Server, Socket } from 'socket.io'; import { NameSpaces } from '../name-space/ns-list'; @Injectable() @WebSocketGateway({ namespace: 'booking' }) export class NsBookingService implements OnGatewayConnection { @WebSocketServer() server: Server; handleConnection(client: any, ...args: any[]) { console.log('handleConnection'); this.server.emit('nsRoomLoad', { room: new NameSpaces().roomsForNameSpace('booking'), }); } @SubscribeMessage('createRoom') createRoom(socket: Socket, name: string) { socket.join(name); socket.to('123').emit('roomSend', { data: 'text' }); return name; } }
29.481481
62
0.690955
02ba104c1168ba8820fcfeb2afa53da656a9db43
2,194
cpp
C++
Code/GUI/ProgressBar.cpp
BomjSoft/BCL
f6863035d987b3fad184db8533d395d73beaf601
[ "MIT" ]
null
null
null
Code/GUI/ProgressBar.cpp
BomjSoft/BCL
f6863035d987b3fad184db8533d395d73beaf601
[ "MIT" ]
null
null
null
Code/GUI/ProgressBar.cpp
BomjSoft/BCL
f6863035d987b3fad184db8533d395d73beaf601
[ "MIT" ]
null
null
null
//--------------------------------------------------------------------------- #include "ProgressBar.h" //--------------------------------------------------------------------------- namespace bcl { //--------------------------------------------------------------------------- CProgressBar::CProgressBar() : CComponent() { minValue = 0; maxValue = 100; } //--------------------------------------------------------------------------- CProgressBar::~CProgressBar() { } //--------------------------------------------------------------------------- void CProgressBar::CreateObject(HWND Parent, DWORD Id) { InitExtComponent(ICC_PROGRESS_CLASS); hwnd = CreateWindowEx(0, PROGRESS_CLASS, caption, WS_CHILD | (visible?WS_VISIBLE:0) | PBS_SMOOTH, left, top, width, height, Parent, HMENU(Id), GetModuleHandle(nullptr), nullptr); created = true; SendMessage(hwnd, PBM_SETRANGE, TRUE, MAKELPARAM(minValue, maxValue)); if (!enable) { SetEnable(false); } } //--------------------------------------------------------------------------- LRESULT CProgressBar::Message(UINT Type) { return 0; } //--------------------------------------------------------------------------- void CProgressBar::SetRange(int Min, int Max) { minValue = Min; maxValue = Max; if (created) { SendMessage(hwnd, PBM_SETRANGE, TRUE, MAKELPARAM(minValue, maxValue)); } } //--------------------------------------------------------------------------- void CProgressBar::SetPosition(int Value) { SendMessage(hwnd, PBM_SETPOS, Value, 0); } //--------------------------------------------------------------------------- void CProgressBar::SetStep(int Value) { SendMessage(hwnd, PBM_SETSTEP, Value, 0); } //--------------------------------------------------------------------------- void CProgressBar::Update(int StepCount) { SendMessage(hwnd, PBM_DELTAPOS, StepCount, 0); } //--------------------------------------------------------------------------- void CProgressBar::Update() { SendMessage(hwnd, PBM_STEPIT, 0, 0); } //--------------------------------------------------------------------------- }
30.472222
182
0.377393
e278679def31bb516c38783c82e22315560571a2
2,358
js
JavaScript
src/libs/scene-manager.js
xuanye/pitaya
605c4a5a515bb4099b83f12100807bfa44195297
[ "MIT" ]
null
null
null
src/libs/scene-manager.js
xuanye/pitaya
605c4a5a515bb4099b83f12100807bfa44195297
[ "MIT" ]
null
null
null
src/libs/scene-manager.js
xuanye/pitaya
605c4a5a515bb4099b83f12100807bfa44195297
[ "MIT" ]
null
null
null
import Scene from './scene'; /** * 场景管理器 */ export default class SceneManager { constructor(game) { this._scenes = {}; //场景的类 this._scenesInstances = {}; //场景的实例 this._active = { //活跃的信息 name: null, update: null, scene: null, }; this._game = game; } /** * 注册场景 * @param {String} name 场景名称 * @param {Scene} scene 场景对象 */ add(name, scene) { if (this._scenes[name]) { console.warn(`${name} scene has registered, please rename it`); } this._scenes[name] = scene; } onResize(options) { if (this._active) { if (this._active.scene) { if (this._active.scene.onResize && typeof this._active.scene.onResize == 'function') { this._active.scene.onResize.call(this._active.scene, options); } } } } update(delta) { if (this._active.scene && !this._active.scene.isPaused() && this._active.scene.update) { this._active.scene.update(delta); } } /** * 开始场景 * @param {String} name 场景的名称 * @param {*} args 场景init的参数 */ start(name, args) { setTimeout(() => { if (this._active.scene && this._active.scene.parent) { if (this._active.scene.pause && typeof this._active.scene.pause == 'function') { this._active.scene.pause(); } } const ActiveScene = this._scenes[name]; if (!ActiveScene) throw new Error(`${name} scene is not exist`); let instance = this._scenesInstances[name]; if (!instance) { instance = new ActiveScene(this._game); this._scenesInstances[name] = instance; if (instance.create && typeof instance.create == 'function') { instance.create.apply(instance); } this._game.renderScene(instance); } if (instance.resume && typeof instance.resume == 'function') { instance.resume.apply(instance, args); } //this._game.ticker.add(update); this._active.name = name; this._active.scene = instance; }); } }
28.756098
102
0.498728
24b5154218e65b2be3e7f5b9f58272884fccbb20
742
php
PHP
tests/Omnipay/Common/GatewayFactoryTest.php
mbeech/omnipay
1753433a54672ffd6f9c92222c861abffec88a65
[ "MIT" ]
null
null
null
tests/Omnipay/Common/GatewayFactoryTest.php
mbeech/omnipay
1753433a54672ffd6f9c92222c861abffec88a65
[ "MIT" ]
null
null
null
tests/Omnipay/Common/GatewayFactoryTest.php
mbeech/omnipay
1753433a54672ffd6f9c92222c861abffec88a65
[ "MIT" ]
null
null
null
<?php namespace Omnipay\Common; use Omnipay\TestCase; class GatewayFactoryTest extends TestCase { public function testCreate() { $gateway = GatewayFactory::create('Stripe'); $this->assertInstanceOf('\\Omnipay\\Stripe\\Gateway', $gateway); } /** * @expectedException \Omnipay\Common\Exception\RuntimeException * @expectedExceptionMessage Class '\Omnipay\Invalid\Gateway' not found */ public function testCreateInvalid() { $gateway = GatewayFactory::create('Invalid'); } public function testFind() { $gateways = GatewayFactory::find(); $this->assertContains('PayPal_Express', $gateways); $this->assertContains('Stripe', $gateways); } }
23.935484
75
0.650943
5ad231701174d2d67bbec7a1d0ec562059268ebc
1,408
cs
C#
Nucleus/Nucleus/Base/CollectionCopyAttribute.cs
escooo/Nucleus
38f0aa73ad1d3c00f6e6b87004a97a021bbae11e
[ "MIT" ]
15
2017-07-02T00:30:37.000Z
2022-03-15T12:19:54.000Z
Nucleus/Nucleus/Base/CollectionCopyAttribute.cs
escooo/Nucleus
38f0aa73ad1d3c00f6e6b87004a97a021bbae11e
[ "MIT" ]
5
2018-02-23T10:58:31.000Z
2021-05-09T22:32:20.000Z
Nucleus/Nucleus/Base/CollectionCopyAttribute.cs
escooo/Nucleus
38f0aa73ad1d3c00f6e6b87004a97a021bbae11e
[ "MIT" ]
4
2019-05-12T20:58:26.000Z
2020-06-23T12:49:49.000Z
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Nucleus.Base { /// <summary> /// Attribute applied to collection types and fields to determine the correct procedure for dealing /// with them when automatically copying their values and their contents to another object. /// By default, fields are 'shallow-copied' - i.e. values and references are copied. /// It is only necessary to apply this attribute to fields where this behaviour should /// be changed. Attributes applied to types define the default behaviour of that type, /// but field-level attributes will override this where present. /// </summary> public class CollectionCopyAttribute : CopyAttribute { /// <summary> /// The behaviour of the items contained within the annotated field during a copy operation. /// By default, properties have their values 'shallow-copied', but may /// instead be prevented from being copied or be duplicated instead, /// provided the property type is duplicatable. /// </summary> public CopyBehaviour ItemsBehaviour { get; set; } = CopyBehaviour.COPY; public CollectionCopyAttribute(CopyBehaviour behaviour, CopyBehaviour itemsBehaviour) : base(behaviour) { ItemsBehaviour = itemsBehaviour; } } }
42.666667
111
0.701705
dc7ff01d21939304fa62a8f0ad0bd1bc719ba2fb
2,605
rb
Ruby
spec/features/cart_path_spec.rb
langlk/ecommerce-refactor
34b7c53f9d7a7d2e05683a22ec191499069b46e7
[ "MIT" ]
null
null
null
spec/features/cart_path_spec.rb
langlk/ecommerce-refactor
34b7c53f9d7a7d2e05683a22ec191499069b46e7
[ "MIT" ]
null
null
null
spec/features/cart_path_spec.rb
langlk/ecommerce-refactor
34b7c53f9d7a7d2e05683a22ec191499069b46e7
[ "MIT" ]
null
null
null
require "rails_helper" describe "the cart management path" do before do @user = FactoryBot.create(:user) visit '/sign_in' fill_in "Email", with: @user.email fill_in "Password", with: @user.password click_on "sign_in_button" end it "allows a user to add items to their cart" do product = FactoryBot.create(:product) visit product_path(product) click_button "add_to_cart" expect(page).to have_content("Cart | Total Items: 1") end it "notifies a user if an item cannot be added to their cart" do product = FactoryBot.create(:product) visit product_path(product) fill_in "order_item_quantity", with: 0 click_button "add_to_cart" expect(page).to have_content("Something went wrong") end it "allows a user to remove items from their cart" do product = FactoryBot.create(:product) visit product_path(product) click_button "add_to_cart" expect(page).to have_content("Cart | Total Items: 1") visit cart_path click_on "Remove" expect(page).to have_no_content(product.name) expect(page).to have_content("Cart | Total Items: 0") end it "allows an authenticated user to finalize their cart order" do product = FactoryBot.create(:product) visit product_path(product) click_button "add_to_cart" expect(page).to have_content("Cart | Total Items: 1") visit cart_path click_on "Finalize Order" expect(@user.orders.last.status).to eq(2) end it "does not allow an unauthenticated user to finalize a cart" do product = FactoryBot.create(:product) visit product_path(product) click_button "add_to_cart" click_on "Sign out" visit finalize_path expect(page).to have_content("You need to sign up or sign in to complete your order.") expect(Order.first.status).to eq(nil) end it "displays an authenticated user's order history on their cart page" do product = FactoryBot.create(:product) visit product_path(product) click_button "add_to_cart" expect(page).to have_content("Cart | Total Items: 1") visit cart_path click_on "Finalize Order" expect(page).to have_content("Order History") expect(page).to have_content(product.name) end it "does not display order history for unauthenticated users" do product = FactoryBot.create(:product) visit product_path(product) click_button "add_to_cart" expect(page).to have_content("Cart | Total Items: 1") visit cart_path click_on "Finalize Order" click_on "Sign out" visit cart_path expect(page).to have_no_content("Order History") end end
32.160494
90
0.71286
f617dbf2f2a635fcb5e8a5a3993d00b80ded8790
13,969
cpp
C++
sources/cpp/wasmint/main.cpp
xunilrj/sandbox
f92c12f83433cac01a885585e41c02bb5826a01f
[ "Apache-2.0" ]
7
2017-04-01T17:18:35.000Z
2022-01-12T05:23:23.000Z
sources/cpp/wasmint/main.cpp
xunilrj/sandbox
f92c12f83433cac01a885585e41c02bb5826a01f
[ "Apache-2.0" ]
6
2020-05-24T13:36:50.000Z
2022-02-15T06:44:20.000Z
sources/cpp/wasmint/main.cpp
xunilrj/sandbox
f92c12f83433cac01a885585e41c02bb5826a01f
[ "Apache-2.0" ]
2
2018-09-20T01:07:39.000Z
2019-02-22T14:55:38.000Z
#define CATCH_CONFIG_MAIN #include "../catch/catch.hpp" #include <Windows.h> #include <string> #include <stack> #include <unordered_map> template <typename T> T &read(uint8_t *&p) { auto *ptr = (T *)p; p += sizeof(T); return *ptr; } uint32_t readULEB128(uint8_t *&p) { uint32_t result = 0; uint32_t shift = 0; while (true) { uint8_t byte = (*p); ++p; result |= (byte & 0b01111111) << shift; if ((byte & 0b10000000) == 0) break; shift += 7; } return result; } int32_t readLEB128(uint8_t *&p) { size_t size = 32; int32_t result = 0; int32_t shift = 0; uint8_t byte; do { byte = (*p); ++p; result |= (byte & 0b01111111) << shift; shift += 7; } while ((byte & 0b10000000) != 0); if ((shift < size) && (byte & 0b10000000)) result |= (~0 << shift); return result; } std::string readString(uint8_t *&p) { auto nameSize = readULEB128(p); auto str = std::string((char *)p, nameSize); p += nameSize; return str; } float readFloat(uint8_t *&p) { auto v = *(float *)p; p += 4; return v; } template <typename T> std::vector<T> readVector(uint8_t *&p) { auto v = std::vector<T>{}; auto vectorSize = readULEB128(p); while (vectorSize > 0) { auto item = T::read(p); v.push_back(item); --vectorSize; } return v; } uint8_t readOPCode(uint8_t *&p) { auto opcode = *p; ++p; return opcode; } namespace wasm { struct TypeSection { uint8_t id; uint32_t size; }; struct Export { static Export read(uint8_t *&p) { auto name = ::readString(p); auto type = ::read<uint8_t>(p); auto idx = ::read<uint8_t>(p); return {name, type, idx}; } std::string name; uint8_t type; uint8_t idx; }; struct ExportSection { static ExportSection read(uint8_t *&p) { auto size = readULEB128(p); auto exports = readVector<wasm::Export>(p); auto temp = ExportSection{size, exports}; temp.buildIndex(); return temp; } uint32_t size; std::vector<Export> exports; ExportSection() { } ExportSection(uint32_t size, const std::vector<Export> &exports) : size{size}, exports{exports} { } const Export *operator[](const std::string &name) const { auto it = byName.find(name); if (it != byName.end()) return it->second; else return nullptr; } private: std::unordered_map<std::string, Export *> byName; void buildIndex() { byName.clear(); for (auto &&exp : exports) { byName.emplace(exp.name, &exp); } } }; struct CodeLocal { static CodeLocal read(uint8_t *&p) { auto n = readULEB128(p); auto type = readLEB128(p); return {n, type}; } uint32_t n; int32_t type; }; struct Code { static Code read(uint8_t *&p) { auto size = readULEB128(p); auto end = p + size; auto locals = readVector<wasm::CodeLocal>(p); auto temp = Code{size, locals, p}; p = end; return temp; } uint32_t size; std::vector<CodeLocal> locals; uint8_t *start; }; struct CodeSection { static CodeSection read(uint8_t *&p) { auto size = ::readULEB128(p); auto codes = ::readVector<wasm::Code>(p); return {size, codes}; } uint32_t size; std::vector<Code> codes; }; struct Import { static Import read(uint8_t *&p) { auto mod = ::readString(p); auto name = ::readString(p); auto type = ::read<uint8_t>(p); auto param1 = ::readULEB128(p); return {mod, name, type, param1}; } std::string mod; std::string name; uint8_t type; uint32_t param1; }; struct ImportSection { static ImportSection read(uint8_t *&p) { auto size = ::readULEB128(p); auto imports = ::readVector<wasm::Import>(p); return {size, imports}; } uint32_t size; std::vector<Import> imports; }; struct Func { static Func read(uint8_t *&p) { auto typeidx = ::readULEB128(p); return {typeidx}; } uint32_t typeidx; }; struct FuncSection { static FuncSection read(uint8_t *&p) { auto size = ::readULEB128(p); auto funcs = ::readVector<wasm::Func>(p); return {size, funcs}; } uint32_t size; std::vector<Func> funcs; }; struct FuncRecord { static FuncRecord import(Import *imp) { return {true, imp, 0}; } static FuncRecord code(uint32_t idx, Code code) { return {false, nullptr, idx}; } bool imported; Import *imp; uint32_t codeidx; }; struct FunctionRegister { std::vector<FuncRecord> funcs; }; namespace execution { struct value { union { int32_t i32; int64_t i64; uint32_t u32; uint64_t u64; float f32; double f64; }; value(int32_t v) : i32{v} {} value(float v) : f32{v} {} }; struct callframe { FunctionRegister *funcs; uint8_t *IP; }; enum class step_result_type { normal, end, call_imported }; struct step_result_call_imported { FuncRecord *f; }; struct step_result { step_result_type type; union { step_result_call_imported call_imported; }; step_result() {} step_result(step_result_type type) : type{type} { } step_result(step_result_call_imported imp) : type{step_result_type::call_imported}, call_imported{imp} { } }; struct thread { std::stack<callframe> callstack; std::stack<value> valuestack; thread(FunctionRegister *mod, uint8_t *ip) { if (ip != nullptr) callstack.push({mod, ip}); } step_result step() { if (callstack.size() == 0) return {step_result_type::end}; auto &callframe = callstack.top(); uint8_t *&IP = callframe.IP; //https://developercommunity.visualstudio.com/idea/965226/supoport-the-labels-as-values-in-cc-compiler-to-he.html //https://gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html //https://eli.thegreenplace.net/2012/07/12/computed-goto-for-efficient-dispatch-tables static void *dispatch_table[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, &&call}; auto opcode = readOPCode(IP); // 0x10 x:funcidx => call x if (opcode == 0x10) { call: auto operand = readULEB128(IP); auto &f = callframe.funcs->funcs[operand]; if (f.imported) { return {step_result_call_imported{&f}}; } //TODO find this function } else if (opcode == 0x41) { auto operand = readLEB128(IP); valuestack.push(operand); } else if (opcode == 0x43) { auto operand = readFloat(IP); valuestack.push(operand); } else if (opcode == 0x0b) { callstack.pop(); //end return {step_result_type::end}; } return {step_result_type::normal}; } step_result stepUntilImport() { step_result r; do { r = step(); } while (r.type != step_result_type::call_imported); return r; } }; } // namespace execution struct ModuleHeader { char magic[4]; uint32_t version; }; struct Module { ModuleHeader header; ExportSection exportSection; CodeSection codeSection; ImportSection importSection; FuncSection funcSection; FunctionRegister funcRegister; static Module from(uint8_t *&p) { auto mod = wasm::Module{}; mod.header = read<wasm::ModuleHeader>(p); return mod; } void readAllSections(uint8_t *&p, uint32_t size) { auto lastSection = 0; while (size > 0) { auto [section, read] = readSection(p); size -= read; if (read == 0) break; lastSection = section; auto nextSection = *p; if ((nextSection < 0) && (nextSection >= 11)) break; } //assert(size == 0); //file bigger than necessary. Why? setupFuncRegister(); } std::tuple<int8_t, uint32_t> readSection(uint8_t *&p) { auto sectionType = read<uint8_t>(p); switch (sectionType) { case 2: { importSection = wasm::ImportSection::read(p); return {sectionType, importSection.size}; } case 3: { funcSection = wasm::FuncSection::read(p); return {sectionType, funcSection.size}; } case 7: { exportSection = wasm::ExportSection::read(p); return {sectionType, exportSection.size}; } case 10: { codeSection = wasm::CodeSection::read(p); return {sectionType, codeSection.size}; } default: { auto size = readULEB128(p); p += size; return {sectionType, size}; } } return {-1, 0}; } void setupFuncRegister() { for (auto &&x : importSection.imports) { funcRegister.funcs.emplace_back(FuncRecord::import(&x)); } for (auto i = 0; i < codeSection.codes.size(); ++i) { auto &x = codeSection.codes[i]; funcRegister.funcs.emplace_back(FuncRecord::code(i, x)); } } execution::thread spawn(const std::string &name) { auto *exp = exportSection[name]; if (exp == nullptr) return {&funcRegister, nullptr}; auto codeidx = funcRegister.funcs[exp->idx].codeidx; auto code = codeSection.codes[codeidx]; return execution::thread{&funcRegister, code.start}; } }; } // namespace wasm TEST_CASE("Fake.Test.Will Pass", "[ok]") { // //auto fileName = TEXT("D:/github/sandbox/sources/cpp/wasmint/example1.wasm"); // auto fileName = TEXT("D:/github/sandbox/sources/cpp/wasmint/script.c.wasm"); // SYSTEM_INFO SysInfo; // GetSystemInfo(&SysInfo); // DWORD dwSysGran = SysInfo.dwAllocationGranularity; // DWORD FILE_MAP_START = 0; // DWORD BUFFSIZE = 1024; // DWORD dwFileMapStart = (FILE_MAP_START / dwSysGran) * dwSysGran; // DWORD dwFileMapSize = FILE_MAP_START + BUFFSIZE; // DWORD dwMapViewSize = (FILE_MAP_START % dwSysGran) + BUFFSIZE; // HANDLE hFile = CreateFile(fileName, // GENERIC_READ | GENERIC_WRITE, // 0, // NULL, // OPEN_EXISTING, // FILE_ATTRIBUTE_NORMAL, // NULL); // REQUIRE(hFile != INVALID_HANDLE_VALUE); // DWORD dwFileSize = GetFileSize(hFile, nullptr); // HANDLE hMapFile = CreateFileMapping(hFile, // NULL, // PAGE_READWRITE, // 0, // dwFileMapSize, // NULL); // REQUIRE(hMapFile != NULL); // auto *lpMapAddress = (uint8_t *)MapViewOfFile(hMapFile, // FILE_MAP_ALL_ACCESS, // 0, // dwFileMapStart, // dwMapViewSize); // REQUIRE(lpMapAddress != NULL); // auto mod = wasm::Module::from(lpMapAddress); // auto t = mod.spawn("helloWorld1"); // auto r = t.stepUntilImport(); }
23.919521
129
0.455222
57a9e3bb938ea31a0793effddde568abe3df1685
3,806
dart
Dart
semana16/dia1/reconocimiento_imagenes/lib/barcode_reader.dart
EffrenAnthony/CodiGoFlutterStart
fdd29d9f2ae334f6ccd1f19a7bc1e50d6bb1e34b
[ "MIT" ]
1
2020-09-27T04:21:04.000Z
2020-09-27T04:21:04.000Z
semana16/dia1/reconocimiento_imagenes/lib/barcode_reader.dart
EffrenAnthony/CodiGoFlutterStart
fdd29d9f2ae334f6ccd1f19a7bc1e50d6bb1e34b
[ "MIT" ]
null
null
null
semana16/dia1/reconocimiento_imagenes/lib/barcode_reader.dart
EffrenAnthony/CodiGoFlutterStart
fdd29d9f2ae334f6ccd1f19a7bc1e50d6bb1e34b
[ "MIT" ]
1
2020-09-22T05:48:26.000Z
2020-09-22T05:48:26.000Z
import 'dart:io'; import 'package:firebase_ml_vision/firebase_ml_vision.dart'; import 'package:flutter/material.dart'; import 'package:url_launcher/url_launcher.dart'; class BarcodeReader extends StatefulWidget { File file; BarcodeReader(this.file); @override _BarcodeReaderState createState() => _BarcodeReaderState(); } class _BarcodeReaderState extends State<BarcodeReader> { List<Barcode> codigos; void escanearQR() async { FirebaseVisionImage visionImage = FirebaseVisionImage.fromFile(widget.file); BarcodeDetector imageLabeler = FirebaseVision.instance.barcodeDetector(); List<Barcode> detectedLabels = await imageLabeler.detectInImage(visionImage); setState(() { codigos = detectedLabels; }); } @override void initState() { // TODO: implement initState super.initState(); escanearQR(); } @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text("Lector de QR"), ), body: Column( children: [ Expanded(child: Image.file(widget.file)), Expanded( child: ListView.builder( itemCount: codigos.length, itemBuilder: (context, index) { print(codigos[index].valueType); switch (codigos[index].valueType) { case BarcodeValueType.contactInfo: return ListTile( title: Text(codigos[index].contactInfo.name.formattedName), subtitle: Text(codigos[index] .contactInfo .phones .first .number .toString()), ); break; case BarcodeValueType.unknown: // TODO: Handle this case. break; case BarcodeValueType.email: return ListTile( title: Text(codigos[index].email.address), subtitle: Text(codigos[index].email.subject), ); break; case BarcodeValueType.isbn: // TODO: Handle this case. break; case BarcodeValueType.phone: return ListTile( title: Text(codigos[index].phone.number), trailing: IconButton( icon: Icon(Icons.phone), onPressed: () { launch("sms:" + codigos[index].phone.number); }), ); break; case BarcodeValueType.product: // TODO: Handle this case. break; case BarcodeValueType.sms: // TODO: Handle this case. break; case BarcodeValueType.text: return ListTile( title: Text(codigos[index].rawValue), ); break; case BarcodeValueType.url: // TODO: Handle this case. break; case BarcodeValueType.wifi: // TODO: Handle this case. break; case BarcodeValueType.geographicCoordinates: // TODO: Handle this case. break; case BarcodeValueType.calendarEvent: // TODO: Handle this case. break; case BarcodeValueType.driverLicense: // TODO: Handle this case. break; } return ListTile(); }, )), ], ), ); } }
31.983193
80
0.49238
233df43ffc5edcdf12cd4db63546b53f23fdf814
713
css
CSS
view/css/yla-tooltip.css
wykhuh/shiori
0296782dbb0002a2289ed215992f38f5bd767bb8
[ "MIT" ]
1
2019-05-18T16:36:41.000Z
2019-05-18T16:36:41.000Z
view/css/yla-tooltip.css
wykhuh/shiori
0296782dbb0002a2289ed215992f38f5bd767bb8
[ "MIT" ]
null
null
null
view/css/yla-tooltip.css
wykhuh/shiori
0296782dbb0002a2289ed215992f38f5bd767bb8
[ "MIT" ]
1
2019-05-15T08:20:13.000Z
2019-05-15T08:20:13.000Z
.yla-tooltip{font-size:14px;color:#FFF;background-color:#232323;padding:8px;border-radius:4px;position:relative;z-index:1000}.yla-tooltip::after{content:'';display:block;position:absolute;border:8px solid transparent}.yla-tooltip.left{margin-left:-14px}.yla-tooltip.left::after{top:50%;right:-16px;margin-top:-8px;border-left-color:#232323}.yla-tooltip.top{margin-top:-14px}.yla-tooltip.top::after{left:50%;bottom:-16px;margin-left:-8px;border-top-color:#232323}.yla-tooltip.right{margin-left:14px}.yla-tooltip.right::after{top:50%;left:-16px;margin-top:-8px;border-right-color:#232323}.yla-tooltip.bottom{margin-top:14px}.yla-tooltip.bottom::after{left:50%;top:-16px;margin-left:-8px;border-bottom-color:#232323}
713
713
0.784011
2557c674b0c190747af4f1a1154f858180d937ef
2,587
cs
C#
PX.HMRC/Messages.cs
Acumatica/MTDCompliance
bf2599059ff5d827fcd8fd1b7ac7693c2761cd0f
[ "MIT" ]
null
null
null
PX.HMRC/Messages.cs
Acumatica/MTDCompliance
bf2599059ff5d827fcd8fd1b7ac7693c2761cd0f
[ "MIT" ]
null
null
null
PX.HMRC/Messages.cs
Acumatica/MTDCompliance
bf2599059ff5d827fcd8fd1b7ac7693c2761cd0f
[ "MIT" ]
1
2020-02-24T23:06:55.000Z
2020-02-24T23:06:55.000Z
using PX.Common; namespace PX.HMRC { [PXLocalizable(Messages.Prefix)] public static class Messages { public const string Prefix = "HMRC Error"; public const string Fulfilled = "Fulfilled"; public const string Open = "Open"; public const string VatReturnWillBeSentToHMRC = "The VAT return will be sent to HMRC. Is the VAT return finalized?"; public const string PleaseAuthorize = "Please authorize."; public const string FromDate = "From Date"; public const string ToDate = "To Date"; public const string DueDate = "Due Date"; public const string SubmitVATReturn = "Submit VAT Return"; public const string RetrieveVATreturn = "Retrieve VAT return"; public const string SubmittedVATReturn = "Submitted VAT Return"; public const string SignInHMRC = "Sign In HMRC"; public const string PeriodCode = "Period code"; public const string ReceivedDate = "Received Date"; public const string Status = "Status"; public const string Description = "Description"; public const string Amount = "Amount"; public const string TaxBoxCode = "Tax Box Code"; public const string TaxBoxNumber = "Tax Box Number"; public const string VATreturnIsAccepted = "The VAT return is accepted."; public const string vatDueSales = "VAT due on sales and other outputs"; public const string vatDueAcquisitions = "VAT due on acquisitions from other EC Member States."; public const string totalVatDue = "Total VAT due"; public const string vatReclaimedCurrPeriod = "VAT reclaimed on purchases and other inputs"; public const string netVatDue = "The difference between Box 3 and Box 4"; public const string totalValueSalesExVAT = "Total value of sales and all other outputs excluding any VAT"; public const string totalValuePurchasesExVAT = "Total value of purchases and all other inputs excluding any VAT"; public const string totalValueGoodsSuppliedExVAT = "Total value of all supplies of goods and related costs, excluding any VAT, to other EC member states."; public const string totalAcquisitionsExVAT = "Total value of acquisitions of goods and related costs excluding any VAT, from other EC member states."; public const string ImpossibleToRefreshToken = "Impossible to refresh a token"; public const string RefreshTokenIsInvalid = "Refresh Token is invalid"; public const string RefreshTokenIsMissing = "Refresh Token is missing"; } }
52.795918
163
0.705064
0db8473bf2103d107b5902399f408cd1c480814f
371
cs
C#
src/EasyGet/Feed.cs
pepelev/EasyGet
a35880a36399373fd4a1e57f29207b65cc86b38d
[ "MIT" ]
null
null
null
src/EasyGet/Feed.cs
pepelev/EasyGet
a35880a36399373fd4a1e57f29207b65cc86b38d
[ "MIT" ]
null
null
null
src/EasyGet/Feed.cs
pepelev/EasyGet
a35880a36399373fd4a1e57f29207b65cc86b38d
[ "MIT" ]
null
null
null
using System.Collections.Generic; using System.Threading.Tasks; namespace EasyGet { public abstract class Feed { public abstract Task<IReadOnlyList<Version>> VersionsAsync(Id packageId); public abstract Task<Manifest> ManifestAsync(Reference reference); public abstract Task<Package> PackageAsync(Reference reference); } }
30.916667
82
0.719677
c393198e72599850923204816ccc912d13bd3613
2,145
cs
C#
app/Application/DomainEventHandlers/SchemeEventHandlers/SchemeUnpublishedEventHandler.Spec.cs
Midnight-Lizard/Schemes-Processor
d6ac119a6cacfe9348d8c5b8cc8c9c0fccb1f235
[ "MIT" ]
null
null
null
app/Application/DomainEventHandlers/SchemeEventHandlers/SchemeUnpublishedEventHandler.Spec.cs
Midnight-Lizard/Schemes-Processor
d6ac119a6cacfe9348d8c5b8cc8c9c0fccb1f235
[ "MIT" ]
1
2018-11-30T09:32:33.000Z
2018-11-30T09:32:33.000Z
app/Application/DomainEventHandlers/SchemeEventHandlers/SchemeUnpublishedEventHandler.Spec.cs
Midnight-Lizard/Schemes-Processor
d6ac119a6cacfe9348d8c5b8cc8c9c0fccb1f235
[ "MIT" ]
null
null
null
using FluentAssertions; using MediatR; using MidnightLizard.Commons.Domain.Interfaces; using MidnightLizard.Commons.Domain.Messaging; using MidnightLizard.Commons.Domain.Model; using MidnightLizard.Commons.Domain.Results; using MidnightLizard.Schemes.Domain.PublicSchemeAggregate; using MidnightLizard.Schemes.Domain.PublicSchemeAggregate.Events; using MidnightLizard.Testing.Utilities; using NSubstitute; using System; using System.Collections.Generic; using System.Linq; using System.Threading; using System.Threading.Tasks; using ITransEvent = MidnightLizard.Commons.Domain.Messaging.ITransportMessage<MidnightLizard.Commons.Domain.Messaging.BaseMessage>; using TransEvent = MidnightLizard.Commons.Domain.Messaging.TransportMessage<MidnightLizard.Schemes.Domain.PublicSchemeAggregate.Events.SchemeUnpublishedEvent, MidnightLizard.Schemes.Domain.PublicSchemeAggregate.PublicSchemeId>; namespace MidnightLizard.Schemes.Processor.Application.DomainEventHandlers.SchemeEventHandlers { public class SchemeUnpublishedEventHandlerSpec : SchemeUnpublishedEventHandler { private int handle_CallCount; private IMediator mediator; private readonly ITransEvent testTransEvent = new TransEvent(new SchemeUnpublishedEvent(null), Guid.NewGuid(), new UserId("test-user-id"), DateTime.UtcNow, DateTime.UtcNow); public SchemeUnpublishedEventHandlerSpec() : base(Substitute.For<IDomainEventStore<PublicSchemeId>>()) { this.mediator = StartupStub.Resolve<IMediator, IRequestHandler<TransportMessage<SchemeUnpublishedEvent, PublicSchemeId>, DomainResult>> ((x) => this); } public override Task<DomainResult> Handle(TransEvent @event, CancellationToken cancellationToken) { this.handle_CallCount++; return Task.FromResult(DomainResult.Ok); } [It(nameof(MediatR))] public async Task Should_handle_Event() { this.handle_CallCount = 0; var result = await this.mediator.Send(this.testTransEvent); this.handle_CallCount.Should().Be(1); } } }
42.058824
227
0.756643
0d30f749259e03a829a1f107951ebcce8eb8e917
2,157
rb
Ruby
core/rails/db/migrate/20170615091500_fix_busted_unique.rb
mugithi/rebar
cdbf6ed84973207d65c77526867f55e2ad4797c9
[ "Apache-2.0" ]
103
2016-09-29T17:29:40.000Z
2022-03-13T23:16:08.000Z
core/rails/db/migrate/20170615091500_fix_busted_unique.rb
mugithi/rebar
cdbf6ed84973207d65c77526867f55e2ad4797c9
[ "Apache-2.0" ]
48
2016-09-15T22:19:59.000Z
2018-03-06T14:06:20.000Z
core/rails/db/migrate/20170615091500_fix_busted_unique.rb
mugithi/rebar
cdbf6ed84973207d65c77526867f55e2ad4797c9
[ "Apache-2.0" ]
25
2016-09-14T18:43:26.000Z
2020-07-25T20:01:56.000Z
# Copyright 2017, RackN # # 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. # class FixBustedUnique < ActiveRecord::Migration def self.up # Don't bother fixing up uuids, but take a stab at everything else. # Kill any duplicates that may have snuck in EventSink.all.pluck(:endpoint).uniq.each do |ep| sinks = EventSink.where(endpoint: ep).order("id DESC").pluck(:id) next if sinks.length == 1 selectors = EventSelector.where(event_sink_id: sinks) sink = sinks.shift selectors.update_all(sink_id: sink) EventSink.where(id: sinks).delete_all end Capability.all.pluck(:name).uniq.each do |name| caps = Capability.where(name: name).order("id DESC").pluck(:id) next if caps.length == 1 utcs = UserTenantCapability.where(capability_id: caps) cap = caps.to_a.shift utcs.update_all(capability_id: cap) Capability.where(id: caps).delete_all end Profile.all.pluck(:name).uniq.each do |name| profiles = Profile.where(name: name).order("id DESC").pluck(:id) next if profiles.length == 1 profiles.shift Profile.where(id: profiles).delete_all end add_index :event_sinks, :uuid, unique: true add_index :event_sinks, :endpoint, unique: true add_index :event_selectors, :uuid, unique: true add_index :tenants, :uuid, unique: true add_index :tenants, :name, unique: true add_index :capabilities, :uuid, unique: true add_index :capabilities, :name, unique: true add_index :user_tenant_capabilities, :uuid, unique: true add_index :profiles, :uuid, unique: true add_index :profiles, :name, unique: true end end
37.189655
74
0.70561
92e7826d875e01456ae294117cefdc87598b6744
207
rb
Ruby
gem/lib/hokaido.rb
ursmhbry/hokaido
817f65dc9a95e6e0c83a1a8c4a0e277ff069b4f7
[ "MIT" ]
26
2015-07-07T04:25:29.000Z
2019-09-03T13:31:12.000Z
gem/lib/hokaido.rb
ursmhbry/hokaido
817f65dc9a95e6e0c83a1a8c4a0e277ff069b4f7
[ "MIT" ]
6
2015-10-31T07:04:58.000Z
2017-02-02T04:50:33.000Z
gem/lib/hokaido.rb
ursmhbry/hokaido
817f65dc9a95e6e0c83a1a8c4a0e277ff069b4f7
[ "MIT" ]
4
2015-10-31T06:57:54.000Z
2016-02-08T03:18:47.000Z
require 'hokaido/version' module Hokaido autoload :Broadcast, 'hokaido/broadcast' autoload :CLI, 'hokaido/cli' autoload :Server, 'hokaido/server' autoload :Watcher, 'hokaido/watcher' end
23
42
0.710145
08fc1cb195d1fb5877ee7756ac6a1d13acc0c517
6,679
swift
Swift
OysterKit/OysterKit/Framework/Base/Token.swift
elpsk/Swift-Koan
15cad0963f7011bd3644300daeadbf93e2fba683
[ "MIT" ]
3
2016-05-31T14:07:44.000Z
2017-04-22T11:57:46.000Z
OysterKit/OysterKit/Framework/Base/Token.swift
elpsk/Swift-Koan
15cad0963f7011bd3644300daeadbf93e2fba683
[ "MIT" ]
null
null
null
OysterKit/OysterKit/Framework/Base/Token.swift
elpsk/Swift-Koan
15cad0963f7011bd3644300daeadbf93e2fba683
[ "MIT" ]
null
null
null
/* Copyright (c) 2014, RED When Excited All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ import Foundation public class Token : CustomStringConvertible{ public let name:String public var characters:String = "" public var originalStringIndex:Int? public var originalStringLine:Int? init(name:String){ self.name = name } public init(name:String, withCharacters:String){ self.name = name self.characters = withCharacters } public init(name:String, withCharacters:String, index:Int){ self.name = name self.characters = withCharacters self.originalStringIndex = index } public var description : String { if (originalStringIndex != nil) { return "\(name) '\(characters)' at \(originalStringIndex)" } else { return "\(name) '\(characters)'" } } public class func createToken(state:TokenizationState,capturedCharacters:String,startIndex:Int)->Token{ let token = Token(name:"Token",withCharacters:capturedCharacters) token.originalStringIndex = startIndex return token } public class EndOfTransmissionToken : Token { init(){ super.init(name: "End of Transmission",withCharacters: "") } } public class ErrorToken: Token{ let problem : String init(forString:String, problemDescription:String){ problem = problemDescription super.init(name: "Error", withCharacters: forString) } init(forCharacter:UnicodeScalar,problemDescription:String){ problem = problemDescription super.init(name: "Error", withCharacters: "\(forCharacter)") } public override var description:String { return super.description+" - "+problem } } } class WhiteSpaceToken : Token{ init(characters:String, startingAt:Int){ super.init(name: "whitespace", withCharacters: characters) originalStringIndex = startingAt } override class func createToken(state:TokenizationState,capturedCharacters:String,startIndex:Int)->Token{ return WhiteSpaceToken(characters:capturedCharacters, startingAt: startIndex) } override var description:String { return self.name } } class NumberToken : Token{ var numericValue:Double init(value:Double,characters:String){ numericValue = value super.init(name: "number", withCharacters: characters) } init(value:Int,characters:String){ numericValue = Double(value) super.init(name: "number", withCharacters: characters) } convenience init(usingString:String){ if let intValue = Int(usingString) { self.init(value:intValue,characters: usingString) } else { let string:NSString = usingString self.init(value: string.doubleValue,characters:usingString) } } convenience init(usingToken:Token){ switch usingToken.name{ case "integer": if let intValue = Int(usingToken.characters) { self.init(value:intValue,characters:usingToken.characters) } else { self.init(value:Double.NaN,characters:usingToken.characters) } case "float": let string : NSString = usingToken.characters self.init(value: string.doubleValue, characters: usingToken.characters) default: self.init(value:Double.NaN,characters:usingToken.characters) } } override var description:String { return "number = \(numericValue)" } override class func createToken(state:TokenizationState,capturedCharacters:String,startIndex:Int)->Token{ let token = NumberToken(usingString:capturedCharacters) token.originalStringIndex = startIndex return token } } class OperatorToken : Token{ func presidence()->Int{ switch characters{ case "^": return 4 case "*","/": return 3 case "+","-": return 2 default: return 0 } } init(characters: String) { super.init(name: "operator", withCharacters: characters) } func applyTo(left:NumberToken,right:NumberToken)->NumberToken{ switch characters{ case "+": return NumberToken(value: left.numericValue+right.numericValue, characters: left.characters+characters+right.characters) case "-": return NumberToken(value: left.numericValue-right.numericValue, characters: left.characters+characters+right.characters) case "*": return NumberToken(value: left.numericValue*right.numericValue, characters: left.characters+characters+right.characters) case "/": return NumberToken(value: left.numericValue/right.numericValue, characters: left.characters+characters+right.characters) default: return NumberToken(value: Double.NaN, characters: left.characters+characters+right.characters) } } override class func createToken(state:TokenizationState,capturedCharacters:String,startIndex:Int)->Token{ let token = OperatorToken(characters:capturedCharacters) token.originalStringIndex = startIndex return token } }
33.903553
132
0.667615
d6391e9544e0e44dec450a528c1df82f6e86d398
374
cs
C#
NBitcoin.Zcash/ZcashConsensusFactory.cs
LykkeCity/NBitcoin.Zcash
7e039534a59d573845ced5ccac2d10fe0c0de056
[ "MIT" ]
4
2018-02-06T13:47:23.000Z
2018-08-09T15:58:34.000Z
NBitcoin.Zcash/ZcashConsensusFactory.cs
LykkeCity/NBitcoin.Zcash
7e039534a59d573845ced5ccac2d10fe0c0de056
[ "MIT" ]
3
2018-05-07T21:26:00.000Z
2018-09-18T12:28:18.000Z
NBitcoin.Zcash/ZcashConsensusFactory.cs
LykkeCity/NBitcoin.Zcash
7e039534a59d573845ced5ccac2d10fe0c0de056
[ "MIT" ]
4
2018-11-19T08:11:29.000Z
2020-07-01T13:45:17.000Z
namespace NBitcoin.Zcash { public class ZcashConsensusFactory : ConsensusFactory { private ZcashConsensusFactory() { } public static ZcashConsensusFactory Instance { get; } = new ZcashConsensusFactory(); public override Transaction CreateTransaction() { return new ZcashTransaction(); } } }
22
92
0.622995
435b6a50288201bb31c94291f63fe0b71f57c9d5
1,850
ts
TypeScript
src/app/catalogue/model/publish/order.ts
hrabhijith/frontend-service
11058df1d504d9b741d670169544854fe81c98c1
[ "Apache-2.0" ]
9
2017-06-01T11:57:53.000Z
2020-07-03T08:47:46.000Z
src/app/catalogue/model/publish/order.ts
ROBxTASK/frontend-service
5ce13949138bc48b60c9ccf56a224ece9e954cff
[ "Apache-2.0" ]
103
2017-06-27T09:26:38.000Z
2020-04-08T09:49:31.000Z
src/app/catalogue/model/publish/order.ts
ROBxTASK/frontend-service
5ce13949138bc48b60c9ccf56a224ece9e954cff
[ "Apache-2.0" ]
9
2019-03-11T07:57:51.000Z
2021-08-23T17:50:09.000Z
/* * Copyright 2020 * SRDC - Software Research & Development Consultancy; Ankara; Turkey In collaboration with * SRFG - Salzburg Research Forschungsgesellschaft mbH; Salzburg; Austria Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ import { OrderLine } from "./order-line"; import { CustomerParty } from "./customer-party"; import { SupplierParty } from "./supplier-party"; import { Address } from "./address"; import { Period } from "./period"; import { Contract } from "./contract"; import { MonetaryTotal } from "./monetary-total"; import { DocumentReference } from './document-reference'; export class Order { constructor( public id: string = null, public note: string[] = [''], public requestedDeliveryPeriod: Period = new Period(), // DO NOT USE, this is not saved in the back end... // use order.orderLine[0].lineItem.deliveryTerms.deliveryLocation.address instead. public deliveryAddress: Address = new Address(), public contract: Contract[] = null, public buyerCustomerParty: CustomerParty = null, public sellerSupplierParty: SupplierParty = null, public anticipatedMonetaryTotal: MonetaryTotal = new MonetaryTotal(), public orderLine: OrderLine[] = null, public additionalDocumentReference: DocumentReference[] = [] ) { } }
45.121951
90
0.705946
ebb95ca7d8e0a12158cd8815d3d9ca41323af301
4,658
css
CSS
assets/mobirise/css/mbr-additional.css
rajnandanweb/banking-and-loan-system
30567456053b594db31918f34a323c27523ab179
[ "MIT" ]
null
null
null
assets/mobirise/css/mbr-additional.css
rajnandanweb/banking-and-loan-system
30567456053b594db31918f34a323c27523ab179
[ "MIT" ]
null
null
null
assets/mobirise/css/mbr-additional.css
rajnandanweb/banking-and-loan-system
30567456053b594db31918f34a323c27523ab179
[ "MIT" ]
1
2021-11-13T15:04:53.000Z
2021-11-13T15:04:53.000Z
@import url(https://fonts.googleapis.com/css?family=Montserrat:400,700); @import url(https://fonts.googleapis.com/css?family=Oswald:400,300,700); @import url(https://fonts.googleapis.com/css?family=Bitter:400,700); @import url(https://fonts.googleapis.com/css?family=Ubuntu:400,300,700); #dropdown-menu-2btn-0 .hide-buttons [data-button] { display: none !important; } #dropdown-menu-2btn-0 .nav .link, #dropdown-menu-2btn-0 .dropdown-item { font-size: 1.2em; color: #ffffff; font-family: 'Montserrat', sans-serif; } #dropdown-menu-2btn-0 .navbar, #dropdown-menu-2btn-0 .dropdown-menu { background: #28324e; } #dropdown-menu-2btn-0 .dropdown-menu .dropdown-toggle[aria-expanded="true"], #dropdown-menu-2btn-0 .dropdown-menu a:hover, #dropdown-menu-2btn-0 .dropdown-menu a:focus { background: #212941; } #dropdown-menu-2btn-0 .navbar-toggler { color: #ffffff; } #header3-4 H3 { text-align: center; color: #28324e; font-family: 'Oswald', sans-serif; } #features1-6 P { text-align: center; color: #000000; } #features1-6 .mbr-section__col .mbr-header__text { color: #28324e; font-size: 20px; } #msg-box3-a .mbr-header .mbr-header__text { text-align: center; } #msg-box3-a .mbr-header .mbr-header__subtext { text-align: center; } #msg-box3-a .mbr-header .mbr-header__text SPAN { font-family: 'Bitter', serif; color: #ffffff; } #msg-box3-a .mbr-article P { color: #ffffff; } #contacts1-b P { color: #ffffff; font-size: 15px; } #footer1-c P { color: #ffffff; } #dropdown-menu-2btn-d .hide-buttons [data-button] { display: none !important; } #dropdown-menu-2btn-d .nav .link, #dropdown-menu-2btn-d .dropdown-item { font-size: 1.2em; color: #ffffff; font-family: 'Oswald', sans-serif; } #dropdown-menu-2btn-d .navbar, #dropdown-menu-2btn-d .dropdown-menu { background: #28324e; } #dropdown-menu-2btn-d .dropdown-menu .dropdown-toggle[aria-expanded="true"], #dropdown-menu-2btn-d .dropdown-menu a:hover, #dropdown-menu-2btn-d .dropdown-menu a:focus { background: #212941; } #dropdown-menu-2btn-d .navbar-toggler { color: #ffffff; } #msg-box4-k .mbr-header__text { color: #28324e; } #msg-box4-k .mbr-header__subtext { color: #ffffff; } #msg-box4-k .mbr-article { color: #ffffff; } #msg-box4-k .mbr-article P { color: #28324e; } #msg-box4-k .mbr-article LI { color: #28324e; } #msg-box4-m .mbr-header__text { color: #28324e; font-family: 'Oswald', sans-serif; } #msg-box4-m .mbr-header__subtext { color: #ffffff; } #msg-box4-m .mbr-article { color: #ffffff; } #msg-box4-m .mbr-article P { color: #28324e; } #msg-box4-m .mbr-article LI { color: #28324e; } #contacts1-i P { color: #ffffff; font-size: 15px; } #footer1-j P { color: #ffffff; } #dropdown-menu-2btn-n .hide-buttons [data-button] { display: none !important; } #dropdown-menu-2btn-n .nav .link, #dropdown-menu-2btn-n .dropdown-item { font-size: 1.2em; color: #ffffff; font-family: 'Montserrat', sans-serif; } #dropdown-menu-2btn-n .navbar, #dropdown-menu-2btn-n .dropdown-menu { background: #28324e; } #dropdown-menu-2btn-n .dropdown-menu .dropdown-toggle[aria-expanded="true"], #dropdown-menu-2btn-n .dropdown-menu a:hover, #dropdown-menu-2btn-n .dropdown-menu a:focus { background: #212941; } #dropdown-menu-2btn-n .navbar-toggler { color: #ffffff; } #content1-t LI { color: #28324e; } #content1-t P { color: #28324e; } #msg-box1-w .mbr-header .mbr-header__text { color: #fff; font-size: 20px; font-family: 'Bitter', serif; } #msg-box1-w .mbr-article { color: #fff; } #msg-box1-w .btn { font-family: 'Ubuntu', sans-serif; } #contacts1-r P { color: #ffffff; font-size: 15px; } #footer1-s P { color: #ffffff; } #dropdown-menu-2btn-x .hide-buttons [data-button] { display: none !important; } #dropdown-menu-2btn-x .nav .link, #dropdown-menu-2btn-x .dropdown-item { font-size: 1.2em; color: #ffffff; font-family: 'Montserrat', sans-serif; } #dropdown-menu-2btn-x .navbar, #dropdown-menu-2btn-x .dropdown-menu { background: #28324e; } #dropdown-menu-2btn-x .dropdown-menu .dropdown-toggle[aria-expanded="true"], #dropdown-menu-2btn-x .dropdown-menu a:hover, #dropdown-menu-2btn-x .dropdown-menu a:focus { background: #212941; } #dropdown-menu-2btn-x .navbar-toggler { color: #ffffff; } #content1-z LI { color: #28324e; } #content1-z P { color: #28324e; } #msg-box1-10 .mbr-header .mbr-header__text { color: #fff; font-size: 20px; font-family: 'Bitter', serif; } #msg-box1-10 .mbr-article { color: #fff; } #msg-box1-10 .btn { font-family: 'Ubuntu', sans-serif; } #contacts1-11 P { color: #ffffff; font-size: 15px; } #footer1-12 P { color: #ffffff; }
21.269406
76
0.679691
e55b3cd2f6825fac74eb24ad8c1113b0dbfe1cdf
15,648
go
Go
doc.go
helmutkemper/iotmaker.docker.builder
aea5ca8ef0c3d651125d2705f39f49c3a143e14b
[ "Apache-2.0" ]
null
null
null
doc.go
helmutkemper/iotmaker.docker.builder
aea5ca8ef0c3d651125d2705f39f49c3a143e14b
[ "Apache-2.0" ]
null
null
null
doc.go
helmutkemper/iotmaker.docker.builder
aea5ca8ef0c3d651125d2705f39f49c3a143e14b
[ "Apache-2.0" ]
null
null
null
// Package iotmakerdockerbuilder // // English: // // Golang and Docker in a simple way // // Documentation in progress // // This package facilitates the use of docker containers by golang code, enabling the creation of unit tests involving // containers in linear and chaos scenarios, enabling the development of microservices and failure simulation. // // Português: Golang e Docker de forma simples. // // Este pacote facilita o uso de containers docker por código golang, possibilitando a criação de testes unitários // envolvendo containers em cenários linear e de caos possibilitando o desenvolvimento de microsserviços e simulação de // falha. // // Transforme teste unitário em cenário de caos // // A criação de microsserviços requerem uma nova abordagem de testes, onde nem sempre, os testes unitários são fáceis de // fazer. // // Imagine um microsserviço simples, uma simples comunicação gRPC entre duas instâncias do mesmo serviço. // // Como fazer um simples teste para saber se eles se conectam? // // Este módulo tem a finalidade de resolver este problema, adicionando ao código golang de teste a capacidade de criar // vários elementos docker de forma muito rápida no meio dos testes unitários. // // Imagine poder criar uma rede docker, apontar para uma pasta contendo o projeto e subir quantos containers quiser, com a // capacidade de gerar relatórios e simular falhas de comunicação aleatórias com algumas poucas linhas de código. // // Criando uma rede docker // // A rede é opcional e permite controlar melhor o endereço IP de cada instância do serviço em teste, além de permitir // isolar a comunicação entre eles. // // Exemplo de código para criação de rede // // package code // import ( // dockerBuilder "github.com/helmutkemper/iotmaker.docker.builder" // dockerNetwork "github.com/helmutkemper/iotmaker.docker.builder.network" // "log" // "testing" // ) // // func TestCode(t *testing.T) { // var err error // var netDocker = dockerNetwork.ContainerBuilderNetwork{} // err = netDocker.Init() // if err != nil { // log.Printf("error: %v", err) // t.Fail() // } // // // create a network named cache_delete_after_test, subnet 10.0.0.0/16 e gatway 10.0.0.1 // err = netDocker.NetworkCreate("cache_delete_after_test", "10.0.0.0/16", "10.0.0.1") // if err != nil { // log.Printf("error: %v", err) // t.Fail() // } // } // // Uma vez criada a rede, cada instância do serviço adicionada ao docker ganhará um endereço IP seguindo a ordem de criação // da instância. // // Por exemplo, a primeira instância criada irá para o endereço `10.0.0.2` e a seguinte irá para o endereço `10.0.0.3`, e // assim por diante. // // Uma vez criada a rede, basta usar o comando `container.SetNetworkDocker(&netDocker)` e a mesma será ligada a nova rede // de forma transperente. // // Caso queira trocar o IP de uma instância, para simular uma troca de IP aleatória, basta rodar o comando // `container.NetworkChangeIp()` e a instância terá o seu IP trocado para o próximo IP da lista. // // Subindo um container baseado em uma imagem pública // // Imagine que o seu projeto necessita de um container `nats:latest` para rodar, logo temos o código golang: // // package code // import ( // dockerBuilder "github.com/helmutkemper/iotmaker.docker.builder" // dockerNetwork "github.com/helmutkemper/iotmaker.docker.builder.network" // "log" // "testing" // ) // // func TestCode(t *testing.T) { // var err error // var netDocker = dockerNetwork.ContainerBuilderNetwork{} // err = netDocker.Init() // if err != nil { // log.Printf("error: %v", err) // t.Fail() // } // // // Create a network named cache_delete_after_test, subnet 10.0.0.0/16 e gatway 10.0.0.1 // // Use the term "delete" to enable the function "dockerBuilder.SaGarbageCollector()", which will search for and remove // // all docker elements with the term "delete" contained in the name. For example, network, image, container and // // volumes. // err = netDocker.NetworkCreate("cache_delete_after_test", "10.0.0.0/16", "10.0.0.1") // if err != nil { // log.Printf("error: %v", err) // t.Fail() // } // // // Create a container // var container = dockerBuilder.ContainerBuilder{} // // Set image name for docker pull // container.SetImageName("nats:latest") // // Expose nats port [optional] // container.AddPortToExpose("4222") // // Link container and network [optional] (next ip address is 10.0.0.2) // container.SetNetworkDocker(&netDocker) // // Set a container name. // // Use the term "delete" to enable the function "dockerBuilder.SaGarbageCollector()", which will search for and remove // // all docker elements with the term "delete" contained in the name. For example, network, image, container and // // volumes. // container.SetContainerName("container_delete_nats_after_test") // // Set a waits for the text to appear in the standard container output to proceed [optional] // container.SetWaitStringWithTimeout("Listening for route connections on 0.0.0.0:6222", 10*time.Second) // // Inialize the container object // err = container.Init() // if err != nil { // log.Printf("error: %v", err) // t.Fail() // } // // Image nats:latest pull command // err = container.ImagePull() // if err != nil { // log.Printf("error: %v", err) // t.Fail() // } // // Container build and start from image nats:latest // // Waits for the text "Listening for route connections on 0.0.0.0:6222" to appear in the standard container // // output to proceed // err = container.ContainerBuildFromImage() // if err != nil { // log.Printf("error: %v", err) // t.Fail() // } // } // // Como padrão, todos os parâmetros são adicionados primeiro e em seguida o objeto é inicializado, com o comando // `container.Init()`. // // Como este exemplo usa uma imagem pública, o primeiro comando é o comando `container.ImagePull()`, para que a imagem // definida em `container.SetImageName("nats:latest")` seja baixada. // // Logo em seguida, o comando `container.ContainerBuildFromImage()` gera um container de nome // `container.SetContainerName("container_delete_nats_after_test")` e deixa o código parado até a saída padrão do container // exibir o texto [opcional] `container.SetWaitStringWithTimeout("Listening for route connections on 0.0.0.0:6222", 10*time.Second)`. // // Subindo um container baseado em uma pasta local com acesso a repositório privado // // Esta configuração permite transformar uma pasta local em uma imagem, de forma simples, mesmo se o projeto necessitar acessar // um repositório git privado, protegido com chave `ssh` // // package code // // import ( // dockerBuilder "github.com/helmutkemper/iotmaker.docker.builder" // dockerNetwork "github.com/helmutkemper/iotmaker.docker.builder.network" // "log" // "testing" // ) // // func TestCode(t *testing.T) { // var err error // var netDocker = dockerNetwork.ContainerBuilderNetwork{} // err = netDocker.Init() // if err != nil { // log.Printf("error: %v", err) // t.Fail() // } // // // Create a network named cache_delete_after_test, subnet 10.0.0.0/16 e gatway 10.0.0.1 // // Use the term "delete" to enable the function "dockerBuilder.SaGarbageCollector()", which will search for and remove // // all docker elements with the term "delete" contained in the name. For example, network, image, container and // // volumes. // err = netDocker.NetworkCreate("cache_delete_after_test", "10.0.0.0/16", "10.0.0.1") // if err != nil { // log.Printf("error: %v", err) // t.Fail() // } // // // Create a container // container = dockerBuilder.ContainerBuilder{} // // Adds an expiration date, in order to prevent the creation of the same image multiple times in a row during the // // same test [optional] // container.SetImageExpirationTime(5 * time.Minute) // // Link container and network [optional] (next ip address is 10.0.0.2) // container.SetNetworkDocker(netDocker) // // Print the container's standard output to golang's standard output // container.SetPrintBuildOnStrOut() // // Enables the use of the "cache:latest" image [optional]. // // To prevent an image from downloading the same dependency multiple times for each test, you can create an image // // named "cache:latest" and use this image as the basis for the test images. // container.SetCacheEnable(true) // // Determines the name of the image to be created during the test. // // Use the term "delete" to enable the function "dockerBuilder.SaGarbageCollector()", which will search for and remove // // all docker elements with the term "delete" contained in the name. For example, network, image, container and // // volumes. // container.SetImageName("data_rand_pod_image:latest") // // Determina o nome do container. Lembre-se que ele deve ser único. // // Use the term "delete" to enable the function "dockerBuilder.SaGarbageCollector()", which will search for and remove // // all docker elements with the term "delete" contained in the name. For example, network, image, container and // // volumes. // container.SetContainerName("delete_data_rand_pod_container") // // Determines the path of the folder where your project is located. // container.SetBuildFolderPath("./project_folder") // // Enables the creation of the "Dockerfile-oitmaker" file automatically, as long as the "main.go" and "go.mod" files // // are in the project root. // container.MakeDefaultDockerfileForMe() // // Defines a list of private repositories used in the project. Separate values by a comma. // container.SetGitPathPrivateRepository("github.com/helmutkemper") // // Copy the "~/.ssh/id_rsa.pub" and "~/.ssh/known_hosts" credentials into the container. // // The automatic creation of the container is done in two steps and the credentials are erased when the first image // // is erased. // err = container.SetPrivateRepositoryAutoConfig() // if err != nil { // log.Printf("error: %v", err) // t.Fail() // } // // Set a waits for the text to appear in the standard container output to proceed [optional] // container.SetWaitStringWithTimeout("data rand container started", 10*time.Second) // // It links a folder/file contained on the computer where the test runs and a folder/file contained in the container // // [optional] // err = container.AddFileOrFolderToLinkBetweenConputerHostAndContainer("./memory/container", "/containerMemory") // if err != nil { // log.Printf("error: %v", err) // t.Fail() // } // // It links a folder/file contained on the computer where the test runs and a folder/file contained in the container // // [optional] // err = container.AddFileOrFolderToLinkBetweenConputerHostAndContainer("./memory/config", "/config") // if err != nil { // log.Printf("error: %v", err) // t.Fail() // } // // Inialize the container object // err = container.Init() // if err != nil { // log.Printf("error: %v", err) // t.Fail() // } // // Generates an image from a project folder // _, err = container.ImageBuildFromFolder() // if err != nil { // log.Printf("error: %v", err) // t.Fail() // } // // Container build and start from image nats:latest // // Waits for the text "data rand container started" to appear in the standard container // // output to proceed // err = container.ContainerBuildFromImage() // if err != nil { // log.Printf("error: %v", err) // t.Fail() // } // } // // Os comandos básicos para a criação de imagem são `container.SetBuildFolderPath("./project_folder")`, para definir a // pasta local, onde o projeto se encontra, e `container.ImageBuildFromFolder()`, encarregado de transformar o conteúdo da // pasta em imagem. // // Caso haja a necessidade de compartilhar conteúdo local com o container, o comando // `container.AddFileOrFolderToLinkBetweenConputerHostAndContainer("./memory/config", "/config")` fará a ligação entre // pastas e arquivos no computador local com o container. // // Criando uma imagem de cache // // Em muitos casos de teste, criar uma imagem de cache ajuda a baixar menos dependência na hora de criar as imagens e deixa // o teste mais rápido. // // A forma de fazer isto é bem simples, basta criar uma imagem de nome `cache:latest`. // // package code // // import ( // dockerBuilder "github.com/helmutkemper/iotmaker.docker.builder" // "log" // "testing" // ) // // func TestCache(t *testing.T) { // var err error // // // Create a container // container = dockerBuilder.ContainerBuilder{} // // Adds an expiration date, in order to prevent the creation of the same image multiple times in a row during the // // same test [optional] // container.SetImageExpirationTime(365 * 24 * time.Hour) // // Print the container's standard output to golang's standard output // container.SetPrintBuildOnStrOut() // // Determines the name of the image to be created during the test. // // Use the term "delete" to enable the function "dockerBuilder.SaGarbageCollector()", which will search for and remove // // all docker elements with the term "delete" contained in the name. For example, network, image, container and // // volumes. // container.SetImageName("cache:latest") // // Determines the path of the folder where your project is located. // container.SetBuildFolderPath("./cache_folder") // // Inialize the container object // err = container.Init() // if err != nil { // log.Printf("error: %v", err) // t.Fail() // } // // Generates an image from a project folder // _, err = container.ImageBuildFromFolder() // if err != nil { // log.Printf("error: %v", err) // t.Fail() // } // } // // A criação da cache é usada em paralelo com os comandos `container.SetCacheEnable(true)` e // `container.MakeDefaultDockerfileForMe()`, onde eles vão usar como base a imagem `cache:latest` e a imagem de cache será // criada em cima da imagem `golang:1.17-alpine`. // // Caso você não tenha prática em criar imagens, use o exemplo abaixo, onde `RUN go get ...` são as dependências usadas por // você. // // FROM golang:1.17-alpine as builder // RUN mkdir -p /root/.ssh/ && \ // apk update && \ // apk add openssh && \ // apk add --no-cache build-base && \ // apk add --no-cache alpine-sdk && \ // rm -rf /var/cache/apk/* // ARG CGO_ENABLED=0 // // RUN go get ... // RUN go get ... // RUN go get ... // RUN go get ... // RUN go get ... // // Usando repositórios privados // // Caso seus projetos necessitem usar repositórios privados, o comando `container.MakeDefaultDockerfileForMe()` sempre faz // a criação da imagem em duas etapas e as credencias de segurança ficam na primeira etapa, descartada ao final do processo, // evitando uma cópia das suas credencias de segurança em uma imagem pública. // // O comando `container.SetPrivateRepositoryAutoConfig()` copia as suas credenciais de segurança padrão `~/.ssh/id_rsa.pub`, // `~/.ssh/known_hosts` e `~/.gitconfig` // // Em seguida, devemos informar os repositórios privados com o comando // `container.SetGitPathPrivateRepository("github.com/user1,github.com/user2")`. // // Caso você tenha problema em baixar repositórios privados, adicione o cógido abaixo ao arquivo `~/.gitconfig` // // [core] // autocrlf = input // [url "ssh://git@github.com/"] // insteadOf = https://github.com/ // [url "git://"] // insteadOf = https:// // // Para quem não tem prática em processo de build em duas etapas, na primeira etapa é criada uma imagem grande com todas // as depend6encias e programas necessários para o processode construção do código. Porém, ao final do processo, apenas o // binário gerado na primeira etapa é copiado para uma imagem nova, o que deixa a imagem final pequena. package iotmakerdockerbuilder
42.871233
133
0.707119
170f823226ed98712a3d5bebd417725cc57dc087
853
kt
Kotlin
shared/src/commonMain/kotlin/com/mzukic/superhero/shared/data/network/api/SuperHeroApi.kt
mzukic3/SuperHero
53d8fe1a802c80e34ee5c12090d49750a1ed7c55
[ "Apache-2.0" ]
2
2020-09-15T08:46:03.000Z
2020-10-07T15:34:59.000Z
shared/src/commonMain/kotlin/com/mzukic/superhero/shared/data/network/api/SuperHeroApi.kt
mzukic3/SuperHero
53d8fe1a802c80e34ee5c12090d49750a1ed7c55
[ "Apache-2.0" ]
null
null
null
shared/src/commonMain/kotlin/com/mzukic/superhero/shared/data/network/api/SuperHeroApi.kt
mzukic3/SuperHero
53d8fe1a802c80e34ee5c12090d49750a1ed7c55
[ "Apache-2.0" ]
1
2020-12-23T17:37:34.000Z
2020-12-23T17:37:34.000Z
package com.mzukic.superhero.shared.data.network.api import com.mzukic.superhero.shared.data.network.response.SuperHeroSearchResponse import io.ktor.client.* import io.ktor.client.features.* import io.ktor.client.features.json.* import io.ktor.client.features.json.serializer.* import io.ktor.client.request.* class Test() class SuperHeroApi(val test: Test) { private val client by lazy { HttpClient { install(JsonFeature) { serializer = KotlinxSerializer() } } } suspend fun searchHeroes(name: String): SuperHeroSearchResponse { val test = client.get<SuperHeroSearchResponse> { url("$baseUrl/search/$name") } return test } companion object { private const val baseUrl = "https://superheroapi.com/api/1311410919190147/" } }
27.516129
84
0.66823
bef1a6ad600894f6bf75ce7cca4754eed31ff9a9
127
ts
TypeScript
react/outline/quote.ts
la-moore/scarlab-icons
97b1083f9eb0c3e89ee05bb00ebc06e30c90d563
[ "MIT" ]
3
2022-02-11T06:49:31.000Z
2022-03-30T06:49:18.000Z
react/solid/quote.ts
la-moore/scarlab-icons
97b1083f9eb0c3e89ee05bb00ebc06e30c90d563
[ "MIT" ]
null
null
null
react/solid/quote.ts
la-moore/scarlab-icons
97b1083f9eb0c3e89ee05bb00ebc06e30c90d563
[ "MIT" ]
null
null
null
import * as React from 'react'; declare function Quote(props: React.ComponentProps<'svg'>): JSX.Element; export default Quote;
31.75
72
0.76378
b090a7773f564d4aeacf610afa06708779f8943a
11,902
py
Python
bulls_and_cows.py
gloriajzhou/bulls_and_cows
73f8e6b7ec1fc9512d083b5b34b7a082df9b1796
[ "MIT" ]
null
null
null
bulls_and_cows.py
gloriajzhou/bulls_and_cows
73f8e6b7ec1fc9512d083b5b34b7a082df9b1796
[ "MIT" ]
null
null
null
bulls_and_cows.py
gloriajzhou/bulls_and_cows
73f8e6b7ec1fc9512d083b5b34b7a082df9b1796
[ "MIT" ]
null
null
null
# Bulls and Cows (4-digit numerical version) # Generate a random four-digit code import random print("Can you break the four-digit code?") print("First, let's go over some terminology.") print("One 'hit' means there is one number in the code you guessed that is both correct and in the correct position.") print("One 'duck' means there is one number in the code you guessed that is correct but in the wrong position.") code_gen = str(random.randint(1000, 9999)) first_val = code_gen[0] second_val = code_gen[1] third_val = code_gen[2] fourth_val = code_gen[3] player_status = "Y" guess_count = 0 while player_status == "Y" or player_status == "y": print("Please enter your guess as a four-digit integer.") code_guess = str(input()) val_one = code_guess[0] val_two = code_guess[1] val_three = code_guess[2] val_four = code_guess[3] guess_count = guess_count + 1 if code_guess == code_gen: print("Congratulations! You have cracked the code.") player_status = "N" guess_count_string = str(guess_count) print("You used a total of " + guess_count_string + " guesses.") elif (first_val == val_one and second_val == val_two and third_val == val_three) or (first_val == val_one and second_val == val_two and fourth_val == val_four) or (first_val == val_one and third_val == val_three and fourth_val == val_four) or (second_val == val_two and third_val == val_three and fourth_val == val_four): print("There are 3 hits, 0 ducks.") print("Would you like to continue guessing? [Y or N]") player_status = input() elif (first_val == val_one and second_val == val_two and third_val == val_four and fourth_val == val_three) or (first_val == val_one and second_val == val_four and third_val == val_three and fourth_val == val_two) or (first_val == val_four and second_val == val_two and third_val == val_three and fourth_val == val_one) or (first_val == val_two and second_val == val_one and third_val == val_three and fourth_val == val_four) or (first_val == val_three and second_val == val_two and third_val == val_one and fourth_val == val_four) or (first_val == val_one and second_val == val_three and third_val == val_two and fourth_val == val_four): print("There are 2 hits, 2 ducks.") print("Would you like to continue guessing? [Y or N]") player_status = input() elif (first_val == val_one and second_val == val_two and (third_val == val_four or fourth_val == val_three)) or (first_val == val_one and third_val == val_three and (second_val == val_four or fourth_val == val_two)) or (first_val == val_one and fourth_val == val_four and (second_val == val_three or third_val == val_two)) or (second_val == val_two and third_val == val_three and (first_val == val_four or fourth_val == val_one)) or (second_val == val_two and fourth_val == val_four and (first_val == val_three or third_val == val_one)) or (third_val == val_three and fourth_val == val_four and (first_val == val_two or second_val == val_one)): print("There are 2 hits, 1 duck.") print("Would you like to continue guessing? [Y or N]") player_status = input() elif (first_val == val_one and (second_val == val_two or third_val == val_three or fourth_val == val_four)) or (second_val == val_two and (third_val == val_three or fourth_val == val_four)) or (third_val == val_three and fourth_val == val_four): print("There are 2 hits, 0 ducks.") print("Would you like to continue guessing? [Y or N]") player_status = input() elif (first_val == val_one and second_val == val_three and third_val == val_four and fourth_val == val_two) or (first_val == val_one and second_val == val_four and third_val == val_two and fourth_val == val_three) or (second_val == val_two and first_val == val_three and third_val == val_four and fourth_val == val_one) or (second_val == val_two and first_val == val_four and third_val == val_one and fourth_val == val_three) or (third_val == val_three and first_val == val_two and second_val == val_four and fourth_val == val_one) or (third_val == val_three and first_val == val_four and second_val == val_one and fourth_val == val_two) or (fourth_val == val_four and first_val == val_two and second_val == val_three and third_val == val_one) or (fourth_val == val_four and first_val == val_three and second_val == val_one and third_val == val_two): print("There is 1 hit, 3 ducks.") print("Would you like to continue guessing? [Y or N]") player_status = input() elif (first_val == val_one and third_val == val_two and (second_val == val_three or second_val == val_four)) or (first_val == val_one and second_val == val_three and third_val == val_four) or (first_val == val_one and third_val == val_four and (fourth_val == val_two or fourth_val == val_three)) or (first_val == val_one and fourth_val == val_three and third_val == val_two) or (first_val == val_one and second_val == val_four and (fourth_val == val_two or fourth_val == val_three)) or (first_val == val_one and second_val == val_three and fourth_val == val_two) or (second_val == val_two and first_val == val_three and (third_val == val_one or third_val == val_four)) or (second_val == val_two and first_val == val_four and third_val == val_one) or (second_val == val_two and first_val == val_four and (fourth_val == val_one or fourth_val == val_three)) or (second_val == val_two and first_val == val_three and fourth_val == val_one) or (second_val == val_two and third_val == val_four and (fourth_val == val_one or fourth_val == val_three)) or (second_val == val_two and third_val == val_one and fourth_val == val_three) or (third_val == val_three and second_val == val_four and (fourth_val == val_one or fourth_val == val_two)) or (third_val == val_three and second_val == val_one and fourth_val == val_two) or (third_val == val_three and first_val == val_four and (fourth_val == val_one or fourth_val == val_two)) or (third_val == val_three and first_val == val_two and fourth_val == val_one) or (third_val == val_three and first_val == val_two and (second_val == val_one or second_val == val_four)) or (third_val == val_three and first_val == val_four and second_val == val_one) or (fourth_val == val_four and first_val == val_two and (second_val == val_one or second_val == val_three)) or (fourth_val == val_four and first_val == val_three and second_val == val_one) or (fourth_val == val_four and first_val == val_three and (third_val == val_one or third_val == val_two)) or (fourth_val == val_four and first_val == val_two and third_val == val_one) or (fourth_val == val_four and second_val == val_three and (third_val == val_one or third_val == val_two)) or (fourth_val == val_four and second_val == val_one and third_val == val_two): print("There is 1 hit, 2 ducks.") print("Would you like to continue guessing? [Y or N]") player_status = input() elif (first_val == val_one and ((second_val == val_three or second_val == val_four) or (third_val == val_two or third_val == val_four) or (fourth_val == val_two or fourth_val == val_three))) or (second_val == val_two and ((first_val == val_three or first_val == val_four) or (third_val == val_one or third_val == val_four) or (fourth_val == val_one or fourth_val == val_three))) or (third_val == val_three and ((first_val == val_two or first_val == val_four) or (second_val == val_one or second_val == val_four) or (fourth_val == val_one or fourth_val == val_two))) or (fourth_val == val_four and ((first_val == val_two or first_val == val_three) or (second_val == val_one or second_val == val_three) or (third_val == val_one or third_val == val_two))): print("There is 1 hit, 1 duck.") print("Would you like to continue guessing? [Y or N]") player_status = input() elif first_val == val_one or second_val == val_two or third_val == val_three or fourth_val == val_four: print("There is 1 hit, 0 ducks.") print("Would you like to continue guessing? [Y or N]") player_status = input() elif (first_val == val_two and (second_val == val_one or second_val == val_three or second_val == val_four) and (third_val == val_one or third_val == val_four) and (fourth_val == val_one or fourth_val == val_three)) or (first_val == val_three and (second_val == val_one or second_val == val_four) and (third_val == val_one or third_val == val_four) and fourth_val == val_two) or (first_val == val_four and (second_val == val_one or second_val == val_three) and third_val == val_two and (fourth_val == val_one or fourth_val == val_three)): print("There are 0 hits, 4 ducks.") print("Would you like to continue guessing? [Y or N]") player_status = input() elif (first_val == val_two and (second_val == val_three or second_val == val_four) and (third_val == val_one or fourth_val == val_one or fourth_val == val_three or third_val == val_four)) or (first_val == val_three and (second_val == val_one or fourth_val == val_one or second_val == val_four or fourth_val == val_two) and (third_val == val_two or third_val == val_four)) or (first_val == val_four and (fourth_val == val_two or fourth_val == val_three) and (second_val == val_one or third_val == val_one or second_val == val_three or third_val == val_two)) or ((second_val == val_three or second_val == val_four or second_val == val_one) and (third_val == val_four or third_val == val_two or third_val == val_one) and (fourth_val == val_two or fourth_val == val_three or fourth_val == val_one)): print("There are 0 hits, 3 ducks.") print("Would you like to continue guessing? [Y or N]") player_status = input() elif (first_val == val_two and (second_val == val_one or second_val == val_three or second_val == val_four or third_val == val_one or third_val == val_four or fourth_val == val_one or fourth_val == val_three)) or (first_val == val_three and (second_val == val_one or second_val == val_four or third_val == val_one or third_val == val_two or third_val == val_four or fourth_val == val_one or fourth_val == val_two)) or (first_val == val_four and (second_val == val_one or second_val == val_three or third_val == val_one or third_val == val_two or fourth_val == val_one or fourth_val == val_two or fourth_val == val_three)) or (second_val == val_three and (third_val == val_one or third_val == val_two or third_val == val_four or fourth_val == val_one or fourth_val == val_two)) or (second_val == val_one and (third_val == val_two or third_val == val_four or fourth_val == val_two or fourth_val == val_three)) or (second_val == val_four and (third_val == val_one or third_val == val_two or fourth_val == val_one or fourth_val == val_two or fourth_val == val_three)) or (third_val == val_four and (fourth_val == val_one or fourth_val == val_two or fourth_val == val_three)) or (third_val == val_one and (fourth_val == val_two or fourth_val == val_three)) or (third_val == val_two and (fourth_val == val_one or fourth_val == val_three)): print("There are 0 hits, 2 ducks.") print("Would you like to continue guessing? [Y or N]") player_status = input() elif first_val == val_two or first_val == val_three or first_val == val_four or second_val == val_one or second_val == val_three or second_val == val_four or third_val == val_one or third_val == val_two or third_val == val_four or fourth_val == val_one or fourth_val == val_two or fourth_val == val_three: print("There are 0 hits, 1 duck.") print("Would you like to continue guessing? [Y or N]") player_status = input() else: print("There are 0 hits, 0 ducks.") print("Would you like to continue guessing? [Y or N]") player_status = input() if not (player_status == "Y" or player_status == "y"): print("The correct code was " + str(code_gen) + ". Thank you for playing.")
136.804598
2,247
0.710217
76dbbc8301629dd75bc5df943291e9a4c32b36a3
1,330
swift
Swift
ConcurrencyLab/ConcurrencyLab/UI/CountryDetailVC.swift
CasandraGrullon/Pursuit-Core-iOS-Concurrency-Lab
1ecbc37add5bb4e3c06d26dc402f375f7301ab1d
[ "MIT" ]
null
null
null
ConcurrencyLab/ConcurrencyLab/UI/CountryDetailVC.swift
CasandraGrullon/Pursuit-Core-iOS-Concurrency-Lab
1ecbc37add5bb4e3c06d26dc402f375f7301ab1d
[ "MIT" ]
null
null
null
ConcurrencyLab/ConcurrencyLab/UI/CountryDetailVC.swift
CasandraGrullon/Pursuit-Core-iOS-Concurrency-Lab
1ecbc37add5bb4e3c06d26dc402f375f7301ab1d
[ "MIT" ]
null
null
null
// // CountryDetailVC.swift // ConcurrencyLab // // Created by casandra grullon on 12/6/19. // Copyright © 2019 casandra grullon. All rights reserved. // import UIKit class CountryDetailVC: UIViewController { @IBOutlet weak var flagImage: UIImageView! @IBOutlet weak var countryNameLabel: UILabel! @IBOutlet weak var capitalLabel: UILabel! @IBOutlet weak var populationLabel: UILabel! var country: Country? override func viewDidLoad() { super.viewDidLoad() updateUI() } func updateUI(){ guard let details = country else { return } countryNameLabel.text = details.name capitalLabel.text = "capital: \(details.capital)" populationLabel.text = "population: \(details.population)" ImageAPIClient.getPic(for: "https://www.countryflags.io/\(details.alpha2Code)/flat/64.png") { [unowned self] (result) in switch result{ case .failure(let appError): print("appError: \(appError)") case .success(let image): DispatchQueue.main.async { self.flagImage.image = UIImage(data: image) } } } } }
27.142857
128
0.558647
488d36cc84cbd7dc6b00c83bf5234a9dce4a9f3a
6,234
sql
SQL
app/database/dump/seven_ora.sql
srph/dream-rose
5162119a51cf9d0eac3ac92f561fc7a092c6d99d
[ "zlib-acknowledgement" ]
2
2018-03-25T23:24:23.000Z
2018-05-02T17:54:07.000Z
app/database/dump/seven_ora.sql
srph/dream-rose
5162119a51cf9d0eac3ac92f561fc7a092c6d99d
[ "zlib-acknowledgement" ]
null
null
null
app/database/dump/seven_ora.sql
srph/dream-rose
5162119a51cf9d0eac3ac92f561fc7a092c6d99d
[ "zlib-acknowledgement" ]
null
null
null
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50617 Source Host : localhost:3306 Source Database : seven_ora Target Server Type : MYSQL Target Server Version : 50617 File Encoding : 65001 Date: 2014-04-15 20:04:57 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for ch_pw -- ---------------------------- DROP TABLE IF EXISTS `ch_pw`; CREATE TABLE `ch_pw` ( `account` varchar(50) DEFAULT NULL, `oldpass` varchar(50) DEFAULT NULL, `oldhash` varchar(50) DEFAULT NULL, `newpass` varchar(50) DEFAULT NULL, `newhash` varchar(50) DEFAULT NULL, `oldhost` varchar(50) DEFAULT NULL, `newhost` varchar(50) DEFAULT NULL, `regDate` datetime DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Table structure for donationlog -- ---------------------------- DROP TABLE IF EXISTS `donationlog`; CREATE TABLE `donationlog` ( `txtAccount` varchar(30) DEFAULT NULL, `txtItemData` varchar(2000) DEFAULT NULL, `Amount` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Table structure for donation_history -- ---------------------------- DROP TABLE IF EXISTS `donation_history`; CREATE TABLE `donation_history` ( `aid` int(11) NOT NULL, `AccountName` varchar(60) DEFAULT NULL, `CharacterName` varchar(60) DEFAULT NULL, `Amount` int(11) DEFAULT NULL, `txtItemDeposited` varchar(150) DEFAULT NULL, `binItemDeposited` longblob, `dateReg` datetime DEFAULT NULL, `subAmount` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Table structure for reboot_log -- ---------------------------- DROP TABLE IF EXISTS `reboot_log`; CREATE TABLE `reboot_log` ( `AID` int(11) NOT NULL, `dateReg` datetime NOT NULL, `RemoteHost` varchar(200) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Table structure for restart_flag -- ---------------------------- DROP TABLE IF EXISTS `restart_flag`; CREATE TABLE `restart_flag` ( `ARC_LS` int(11) DEFAULT NULL, `ARC_WS` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Table structure for statistic -- ---------------------------- DROP TABLE IF EXISTS `statistic`; CREATE TABLE `statistic` ( `txtChannel` varchar(50) NOT NULL, `intCount` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Table structure for statuschecker -- ---------------------------- DROP TABLE IF EXISTS `statuschecker`; CREATE TABLE `statuschecker` ( `ProcessName` varchar(50) DEFAULT NULL, `Status` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Table structure for tasklist -- ---------------------------- DROP TABLE IF EXISTS `tasklist`; CREATE TABLE `tasklist` ( `ProcessList` varchar(800) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Table structure for testingtesting -- ---------------------------- DROP TABLE IF EXISTS `testingtesting`; CREATE TABLE `testingtesting` ( `line` varchar(2000) DEFAULT NULL, `line2` varchar(2000) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Table structure for topclans -- ---------------------------- DROP TABLE IF EXISTS `topclans`; CREATE TABLE `topclans` ( `txtNAME` char(20) NOT NULL, `intPOINT` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Table structure for topusers -- ---------------------------- DROP TABLE IF EXISTS `topusers`; CREATE TABLE `topusers` ( `txtNAME` varchar(30) DEFAULT NULL, `btLEVEL` smallint(6) DEFAULT NULL, `intJOB` smallint(6) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Table structure for trylimits -- ---------------------------- DROP TABLE IF EXISTS `trylimits`; CREATE TABLE `trylimits` ( `IP` varchar(50) DEFAULT NULL, `Tries` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Table structure for userinfo -- ---------------------------- DROP TABLE IF EXISTS `userinfo`; CREATE TABLE `userinfo` ( `Account` varchar(50) NOT NULL, `Address` varchar(50) DEFAULT NULL, `AID` int(11) DEFAULT NULL, `AllowBeta` int(11) DEFAULT NULL, `AscPassWord` varchar(50) DEFAULT NULL, `Birthday` datetime DEFAULT NULL, `BlockEnd` datetime DEFAULT NULL, `BlockEnd_Web` datetime DEFAULT NULL, `BlockStart` datetime DEFAULT NULL, `BlockStart_Web` datetime DEFAULT NULL, `City` varchar(50) DEFAULT NULL, `Email` varchar(50) DEFAULT NULL, `FirstName` varchar(50) DEFAULT NULL, `Gen` varchar(50) DEFAULT NULL, `Gender` varchar(50) DEFAULT NULL, `Jumin` varchar(50) DEFAULT NULL, `LastConnect` varchar(50) DEFAULT NULL, `LastName` varchar(50) DEFAULT NULL, `MailIsConfirm` bit(1) DEFAULT NULL, `MailOpt` bit(1) DEFAULT NULL, `MD5PassWord` varchar(50) DEFAULT NULL, `MiddleName` varchar(50) DEFAULT NULL, `MortherLName` varchar(50) DEFAULT NULL, `Nation` varchar(50) DEFAULT NULL, `NickName` varchar(50) DEFAULT NULL, `RegDate` datetime DEFAULT NULL, `Right` int(11) DEFAULT NULL, `States` varchar(50) DEFAULT NULL, `Tel` varchar(50) DEFAULT NULL, `ZipCode` varchar(50) DEFAULT NULL, `realname` varchar(50) DEFAULT NULL, `USER_CP` varchar(50) DEFAULT NULL, `name` varchar(50) DEFAULT NULL, `memberinfo` int(11) NOT NULL, `Mod` varchar(50) DEFAULT NULL, `hint` varchar(50) DEFAULT NULL, `answer` varchar(50) DEFAULT NULL, `job` varchar(50) DEFAULT NULL, `BlockReason` varchar(100) DEFAULT NULL, `birthyear` datetime DEFAULT NULL, `MotherLName` varchar(50) DEFAULT NULL, `BlockGM` varchar(30) DEFAULT NULL, PRIMARY KEY (`Account`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Table structure for user_mail_check -- ---------------------------- DROP TABLE IF EXISTS `user_mail_check`; CREATE TABLE `user_mail_check` ( `ch_aid` int(11) DEFAULT NULL, `ch_account` varchar(50) NOT NULL, `ch_pw` varchar(50) DEFAULT NULL, PRIMARY KEY (`ch_account`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
31.17
47
0.627045
5dae0f10370c9c8626c1d63c15a43820ef313c15
403
cpp
C++
hackerrank/algorithms/2-implementation/020.cpp
him1411/algorithmic-coding-and-data-structures
685aa95539692daca68ce79c20467c335aa9bb7f
[ "MIT" ]
null
null
null
hackerrank/algorithms/2-implementation/020.cpp
him1411/algorithmic-coding-and-data-structures
685aa95539692daca68ce79c20467c335aa9bb7f
[ "MIT" ]
null
null
null
hackerrank/algorithms/2-implementation/020.cpp
him1411/algorithmic-coding-and-data-structures
685aa95539692daca68ce79c20467c335aa9bb7f
[ "MIT" ]
2
2018-10-04T19:01:52.000Z
2018-10-05T08:49:57.000Z
#include <bits/stdc++.h> using namespace std; int main() { vector<int> a(26); for(int i = 0; i < 26; i++) { cin >> a[i]; } string word; cin >> word; int k = word.length (); vector<int> b(k); int max =0; for (int i = 0; i < k; ++i) { if (a[(int)word[i]-97]>max) { max= a[(int)word[i]-97]; } } cout<<(max*k); return 0; }
15.5
32
0.431762
2f55952a6832f933e46d93bf1c08d997c277dbe7
794
js
JavaScript
module-4/arraySum.js
zentestuken/js-webinar
225d69766733fdc6d9812a012a5527b2290ff47c
[ "MIT" ]
null
null
null
module-4/arraySum.js
zentestuken/js-webinar
225d69766733fdc6d9812a012a5527b2290ff47c
[ "MIT" ]
null
null
null
module-4/arraySum.js
zentestuken/js-webinar
225d69766733fdc6d9812a012a5527b2290ff47c
[ "MIT" ]
null
null
null
/** * It receives an array of strings, integers and * array like itself. * Return the summary of all integers in it on * any level. * * @param {Array} elements * @returns {number} summary of all integers or 0 in other cases */ function arraySum(elements) { if (!Array.isArray(elements) || elements.length < 2) return 0; let resultArray = [0]; function getIntegers(arr) { resultArray = resultArray.concat(arr.filter((elem) => { return (typeof elem === 'number' && elem % 1 === 0); })); for (const elem of arr) { if (Array.isArray(elem)) { getIntegers(elem); } } } getIntegers(elements); return resultArray.reduce((accum, elem) => accum + elem, 0); } module.exports = arraySum;
28.357143
66
0.588161
38542772d016ea7b807f1fca41ae5bac110dbb50
2,901
php
PHP
lib/class.datasource.MultilingualNavigation.php
Solutions-Nitriques/page_lhandles
acef6189cf68eadbbcd0788398cc2a6244ec00bf
[ "MIT" ]
null
null
null
lib/class.datasource.MultilingualNavigation.php
Solutions-Nitriques/page_lhandles
acef6189cf68eadbbcd0788398cc2a6244ec00bf
[ "MIT" ]
null
null
null
lib/class.datasource.MultilingualNavigation.php
Solutions-Nitriques/page_lhandles
acef6189cf68eadbbcd0788398cc2a6244ec00bf
[ "MIT" ]
null
null
null
<?php require_once(TOOLKIT . '/class.datasource.php'); require_once(TOOLKIT . '/data-sources/class.datasource.navigation.php'); Class MultilingualNavigationDatasource extends NavigationDatasource { public function __buildPageXML($page, $page_types, $qf) { $lang_code = FLang::getLangCode(); $oPage = new XMLElement('page'); $oPage->setAttribute('handle', $page['handle']); $oPage->setAttribute('id', $page['id']); $oPage->appendChild(new XMLElement( 'item', General::sanitize($page['plh_t-'.$lang_code]), array( 'lang' => $lang_code, 'handle' => $page['plh_h-'.$lang_code], ) )); if(in_array($page['id'], array_keys($page_types))) { $xTypes = new XMLElement('types'); foreach($page_types[$page['id']] as $type) { $xTypes->appendChild(new XMLElement('type', $type)); } $oPage->appendChild($xTypes); } if($page['children'] != '0') { if($children = PageManager::fetch(false, array($qf.'id, handle, title'), array(sprintf('`parent` = %d', $page['id'])))) { foreach($children as $c) $oPage->appendChild($this->__buildPageXML($c, $page_types, $qf)); } } return $oPage; } public function execute(&$param_pool) { $result = new XMLElement($this->dsParamROOTELEMENT); $type_sql = $parent_sql = null; if(trim($this->dsParamFILTERS['type']) != '') { $type_sql = $this->__processNavigationTypeFilter($this->dsParamFILTERS['type'], $this->__determineFilterType($this->dsParamFILTERS['type'])); } if(trim($this->dsParamFILTERS['parent']) != '') { $parent_sql = $this->__processNavigationParentFilter($this->dsParamFILTERS['parent']); } $query_fields = ""; $qf = ""; foreach( FLang::getLangs() as $lc ){ $qf .= "`plh_t-{$lc}`,"; $qf .= "`plh_h-{$lc}`,"; } // Build the Query appending the Parent and/or Type WHERE clauses $query = sprintf(" SELECT DISTINCT {$qf}p.id, p.title, p.handle, (SELECT COUNT(id) FROM `tbl_pages` WHERE parent = p.id) AS children FROM `tbl_pages` AS p LEFT JOIN `tbl_pages_types` AS pt ON (p.id = pt.page_id) WHERE 1 = 1 %s %s ORDER BY p.`sortorder` ASC ", // Add Parent SQL !is_null($parent_sql) ? $parent_sql : " AND p.parent IS NULL ", // Add Types SQL !is_null($type_sql) ? $type_sql : "" ); $pages = Symphony::Database()->fetch($query); if((!is_array($pages) || empty($pages))){ if($this->dsParamREDIRECTONEMPTY == 'yes'){ throw new FrontendPageNotFoundException; } $result->appendChild($this->__noRecordsFound()); } else { // Build an array of all the types so that the page's don't have to do // individual lookups. $page_types = PageManager::fetchAllPagesPageTypes(); foreach($pages as $page) { $result->appendChild($this->__buildPageXML($page, $page_types, $qf)); } } return $result; } }
29.01
145
0.620476
de13cec4f9f552710761e59aa17baccbacdd2d56
1,583
dart
Dart
satsang_attendance/lib/main.dart
aakashbaranwal/flutter-authentication
7c20d423264e8986544bfa440cdcb827e6fc18ba
[ "MIT" ]
null
null
null
satsang_attendance/lib/main.dart
aakashbaranwal/flutter-authentication
7c20d423264e8986544bfa440cdcb827e6fc18ba
[ "MIT" ]
null
null
null
satsang_attendance/lib/main.dart
aakashbaranwal/flutter-authentication
7c20d423264e8986544bfa440cdcb827e6fc18ba
[ "MIT" ]
null
null
null
import 'package:flutter/material.dart'; import 'package:satsang_attendance/account_setup_details.dart'; import 'package:satsang_attendance/profile.dart'; import 'package:satsang_attendance/profile_view.dart'; import 'login.dart'; import 'sign_up.dart'; import 'home_page.dart'; import 'services/auth_service.dart'; import 'views/sign_up_view.dart'; void main() => runApp(satsangi_attendance()); class satsangi_attendance extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, home: Login(), routes: <String, WidgetBuilder> { '/landingpage': (BuildContext context)=> new satsangi_attendance(), // this is for the login page in the app '/signup': (BuildContext context)=> new Signup(), // this is for the sign up page in the app '/homepage': (BuildContext context)=> new HomePage(), // this is for the home page in the app which comes after signing in '/profile': (BuildContext context)=> new Profile(), // this is for the profile page in the app '/account': (BuildContext context)=> new Account_setup_page(), // this is for the account creation page in the app '/profile_view': (BuildContext context)=> new ProfileView(), // this is for the account creation page in the app // one very important thing is that the above routes are not made in any normal class but are valid when it is a stateful or a stateless widget }, ); } }
46.558824
151
0.6753
732c81bb82e7c451d7240e34cee8f6f28257167b
10,898
asm
Assembly
ge/kernel/1pump/arch/x86/pumpcore/appmx/sw.asm
octetd/gramado
a29f13d1f49639ed984b47fcc11834176cd9ccf4
[ "BSD-2-Clause" ]
4
2020-12-18T01:32:16.000Z
2020-12-18T14:09:05.000Z
ge/kernel/1pump/arch/x86/pumpcore/appmx/sw.asm
moneytech/gramado
6cef2167281f4d9e93aa1c84135cc918ecb8a008
[ "BSD-2-Clause" ]
null
null
null
ge/kernel/1pump/arch/x86/pumpcore/appmx/sw.asm
moneytech/gramado
6cef2167281f4d9e93aa1c84135cc918ecb8a008
[ "BSD-2-Clause" ]
1
2020-12-18T14:10:37.000Z
2020-12-18T14:10:37.000Z
; ; File: x86/sw.inc ; ; Descri��o: ; Interrup��es de software. ; * As primeiras s�o em ordem num�rica. ; * As outras s�o gen�ricas ou especiais. ; * As interrup��es de software come�am na 48! v�o at� 255. ; ; History: ; 2015 - Created by Fred Nora. ; 2016 - Review. ; ;; #todo: deletar. extern _new_task_scheduler global _int48 _int48: cli ; sti iretd ;; global _int49 _int49: cli ; sti iretd ;; global _int50 _int50: cli ; sti iretd ;; global _int51 _int51: cli ; sti iretd ;; global _int52 _int52: cli ; sti iretd ;; global _int53 _int53: cli ; sti iretd ;; global _int54 _int54: cli ; sti iretd ; ; ?? Continua ... ; ;------------------------ ; _int100: ; Interrup��o de sistema. ; (opcional, segunda op��o). ; global _int100 _int100: cli ; Nothing. sti iretd ;;===================================== ;; _int133: ;; ;; New interrupt. ;; Interrupt 133. ;; #todo ;; extern _gde_133 global _int133 _int133: cli ; ;stack pop dword [_contextEIP] ; eip (DOUBLE). pop dword [_contextCS] ; cs (DOUBLE). pop dword [_contextEFLAGS] ; eflags (DOUBLE). pop dword [_contextESP] ; esp - user mode (DOUBLE). pop dword [_contextSS] ; ss - user mode (DOUBLE). ; ;registers mov dword [_contextEDX], edx ; edx. mov dword [_contextECX], ecx ; ecx. mov dword [_contextEBX], ebx ; ebx. mov dword [_contextEAX], eax ; eax. ; ;registers mov dword [_contextEBP], ebp ; ebp. mov dword [_contextEDI], edi ; edi. mov dword [_contextESI], esi ; esi. ; ;segments xor eax, eax mov ax, gs mov word [_contextGS], ax mov ax, fs mov word [_contextFS], ax mov ax, es mov word [_contextES], ax mov ax, ds mov word [_contextDS], ax xor eax, eax mov ax, word 0x10 mov ds, ax mov es, ax mov fs, ax ;* mov gs, ax ;* mov ss, ax mov eax, 0x003FFFF0 mov esp, eax ;; ;; Call. ;; ;Argumentos. push dword [_contextEDX] ;edx ; arg4. push dword [_contextECX] ;ecx ; arg3. push dword [_contextEBX] ;ebx ; arg2. push dword [_contextEAX] ;eax ; arg1 = {N�mero do servi�o}. ;; Chamando o handler exclusivo para a fun��o fork(). ;; Est� em: execve/sci/gde/gde_serv.c call _gde_133 mov dword [__int133Ret], eax pop eax pop eax pop eax pop eax ;; ;; Flush TLB. ;; ;Flush TLB. jmp dummy_flush2 dummy_flush2: ;TLB. mov EAX, CR3 nop nop nop nop nop mov CR3, EAX ; ;segments xor eax, eax mov ax, word [_contextDS] mov ds, ax mov ax, word [_contextES] mov es, ax mov ax, word [_contextFS] mov fs, ax mov ax, word [_contextGS] mov gs, ax ; ;registers mov esi, dword [_contextESI] ;esi. mov edi, dword [_contextEDI] ;edi. mov ebp, dword [_contextEBP] ;ebp. ; mov eax, dword [_contextEAX] ;eax. mov ebx, dword [_contextEBX] ;ebx. mov ecx, dword [_contextECX] ;ecx. mov edx, dword [_contextEDX] ;edx. ;; Stack push dword [_contextSS] ;ss - user mode. push dword [_contextESP] ;esp - user mode. push dword [_contextEFLAGS] ;eflags. push dword [_contextCS] ;cs. push dword [_contextEIP] ;eip. ;; Return. mov eax, dword [__int133Ret] ;mov eax, dword [_contextEAX] ;eax. (Acumulador). sti iretd ;Vari�vel interna usada na fun��o acima. __int133Ret: dd 0 ;;============================================ ;====================================== ; ; Isso eh uma segunda opcao de interrupcao de sistema. ; A intencao aqui eh entrarmos no kernel usando os registradores ; de segmento do kernel e depois configurarmos novamente os ; registradores de segmento do processo, sem trocarmos de processo ; ;; #todo ;; Created, but not tested yet. ;; We need to create the handler yet. global _new_system_interrupt _new_system_interrupt: cli ;; == Save context ==================== ;; Stack frame. (all double) pop dword [_contextEIP] ; eip pop dword [_contextCS] ; cs pop dword [_contextEFLAGS] ; eflags pop dword [_contextESP] ; esp pop dword [_contextSS] ; ss mov dword [_contextEDX], edx mov dword [_contextECX], ecx mov dword [_contextEBX], ebx mov dword [_contextEAX], eax mov dword [_contextEBP], ebp mov dword [_contextEDI], edi mov dword [_contextESI], esi ; Segments xor eax, eax mov ax, gs mov word [_contextGS], ax mov ax, fs mov word [_contextFS], ax mov ax, es mov word [_contextES], ax mov ax, ds mov word [_contextDS], ax ;; #todo ;; Media, float pointers, debug. ;; #important: ;; We are using the kernel segment registers. ;; Kernel data segments and stack. xor eax, eax mov ax, word 0x10 mov ds, ax mov es, ax mov fs, ax mov gs, ax mov ss, ax mov eax, 0x003FFFF0 mov esp, eax ; #todo ; We need to create and import this function. ;call _NewServiceHandler ;Flush TLB. jmp new_dummy_flush ;; NOP new_dummy_flush: mov EAX, CR3 IODELAY nop nop nop nop nop mov CR3, EAX ;; == Restore context ==================== ; Segments (It belongs to the process) xor eax, eax mov ax, word [_contextDS] mov ds, ax mov ax, word [_contextES] mov es, ax mov ax, word [_contextFS] mov fs, ax mov ax, word [_contextGS] mov gs, ax mov esi, dword [_contextESI] mov edi, dword [_contextEDI] mov ebp, dword [_contextEBP] mov eax, dword [_contextEAX] mov ebx, dword [_contextEBX] mov ecx, dword [_contextECX] mov edx, dword [_contextEDX] ;; Stack frame. (all double) push dword [_contextSS] ; ss push dword [_contextESP] ; esp push dword [_contextEFLAGS] ; eflags push dword [_contextCS] ; cs push dword [_contextEIP] ; eip ;; No EOI. ; Acumulator. mov eax, dword [_contextEAX] sti iretd ;====================================== ; _int128: 0x80 ; ; System interrupt ; ; eax = ;arg1 (numero) ; ebx = ;arg2 (arg2) ; ecx = ;arg3 (arg3) ; edx = ;arg4 (arg4) ; ... ; ; #todo: ; Pelo jeito eh natural entrar com muito mais argumentos, ; passados pelos registradores ebp, esi, edi. ; See: sci/sci.c ;++ extern _sci global _int128 _int128: cli pushad push ds push es push fs push gs ;; #bugbug ;; We are not changing the segment registers. ;; This way the kernel is able to access all the user data. ;; Normally it is preserved only the register 'fs' to access ;; the user data. ;; This way, probably we are not able to get the data ;; inside the base kernel. It's because the data will point to another ;; place, probably inside the application. ;; Are we switching the page directory ??? ;; #test ;; Kernel data segments ;; se fizer isso vai dar problema. ;; e se nao fizer teremos problemas para ler as coisas dentro do kernel. ;; #todo: ;; Sera preciso um gerenciamento melhor dos registradores de segmento ;; para podermos pegar informaçao tanto no kernel quanto no aplicativo. ;xor eax, eax ;mov ax, word 0x10 ;mov ds, ax ;mov es, ax ;mov fs, ax ;mov gs, ax ;;--------------- push dword edx ; arg4 push dword ecx ; arg3 push dword ebx ; arg2 push dword eax ; arg1 {Service number}. call _sci mov dword [.int128Ret], eax pop eax pop ebx pop ecx pop edx ;;--------------- pop gs pop fs pop es pop ds ;; No EOI! popad mov eax, dword [.int128Ret] sti iretd .int128Ret: dd 0 ;-- ;;========================== ;; _int129: ;; ;; Isso � chamado pelo processo INIT do Gramado Core. ;; Uma interrup��o para habilitar as interrup��es mascar�veis. ;; quem usar� isso ser� a thread prim�ria do processo init. ;; apenas uma vez. global _int129 _int129: pop dword [.frameEIP] pop dword [.frameCS] pop dword [.frameEFLAGS] mov dword [.frameEFLAGS], 0x3200 push dword [.frameEFLAGS] push dword [.frameCS] push dword [.frameEIP] iretd .frameEIP: dd 0 .frameCS: dd 0 .frameEFLAGS: dd 0 ; Change procedure. global _int201 _int201: cli sti iretd ;--------------------- ; _int213: ; Executa nova tarefa. ; global _int213 _int213: cli sti iretd ;------------------------------------------------------ ; _int216: ; Chamada r�pida e direta para cria��o de janela. ; Obs: Isso ainda � um experimento. ; IN: ; eax ;; x ; ebx ;; y ; ecx ;; width ; edx ;; height ; esi ;; name ; edi ;; type ; ebp ;; (Nothing). ; ;++ ;; #todo ;; Not used ?? ;; Delete! extern _CreateWindow global _int216 _int216: cli ;salva. pushad ; ; Salvando os registradores com par�metros. ; mov dword [.arg5], eax ;; x mov dword [.arg6], ebx ;; y mov dword [.arg7], ecx ;; width mov dword [.arg8], edx ;; height mov dword [.arg4], esi ;; name mov dword [.arg1], edi ;; type ;;mov dword [.res], ebp ;; (nothing) ;; ;; Colocando na pilha. ;; ;Argumentos. push dword [.arg12] ; color (unsigned long) push dword [.arg11] ; arg11 reservado push dword [.arg10] ; onde ?? (unsigned long) push dword [.arg9] ; parent window (struct window_d *) push dword [.arg8] ; height push dword [.arg7] ; width push dword [.arg6] ; y push dword [.arg5] ; x push dword [.arg4] ;arg4 = Window Name. (char*) push dword [.arg3] ;arg3 = view. (unsigned long) push dword [.arg2] ;arg2 = Status. (unsigned long) push dword [.arg1] ;arg1 = Type. (unsigned long) call _CreateWindow mov dword [.int216Ret], eax ;Argumentos. pop eax pop eax pop eax pop eax pop eax pop eax pop eax pop eax pop eax pop eax pop eax pop eax ;recupera. popad mov eax, dword [.int216Ret] sti iretd .int216Ret: dd 0 .arg12: dd 0 ;;color .arg11: dd 0 .arg10: dd 0 .arg9: dd 0 .arg8: dd 0 .arg7: dd 0 .arg6: dd 0 .arg5: dd 0 .arg4: dd 0 .arg3: dd 0 .arg2: dd 0 .arg1: dd 0 ;;type .res: dd 0 ;;reserved. ;-- ;----------------------------------------------- ; Handler's gen�ricos para interrup��es negligenciadas. ; ;; #importante ;; Usamos eoi apenas para as irqs ignore_int: system_interrupt: unhandled_int: cli sti iretd ; ; End. ;
17.162205
76
0.561571
e7521a56091e72a3b49e26da7626e29891be0c2a
2,724
php
PHP
app/Http/Controllers/Api/AuthController.php
NortonPerson/KTPM_OpenSource_Core
c7cce337878da8ea47966d9a430329b918256c8c
[ "MIT" ]
null
null
null
app/Http/Controllers/Api/AuthController.php
NortonPerson/KTPM_OpenSource_Core
c7cce337878da8ea47966d9a430329b918256c8c
[ "MIT" ]
null
null
null
app/Http/Controllers/Api/AuthController.php
NortonPerson/KTPM_OpenSource_Core
c7cce337878da8ea47966d9a430329b918256c8c
[ "MIT" ]
null
null
null
<?php namespace App\Http\Controllers\Api; use App\Http\Requests\Api\LoginRequest; use App\User; use Carbon\Carbon; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Hash; use Tymon\JWTAuth\Facades\JWTAuth; use Tymon\JWTAuth\Facades\JWTFactory; use Validator; class AuthController extends Controller { public function __construct() { //$this->checkToken(); } /** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function login(Request $request) { $validator = Validator::make($request->all(), [ "email" => "required|email", "password" => "required", ], $this->message()); if ($validator->fails()) { return $this->api_response_error(['validator' => $validator->errors()]); } $data = $request->only(['email', 'password']); if ($token = JWTAuth::attempt($data)) { return $this->api_response([ 'token' => $token ]); } return $this->api_response_error(['message' => ['Tài khoản hoặc mật khẩu không chính xác!']]); } public function register(Request $request) { $validator = Validator::make($request->all(), [ "first_name" => "required", "last_name" => "required", "email" => 'required | unique:users,email', "password" => "required | between:6,20", "repassword" => "required | same:password", "sex" => "required", "phone" => "required | between:11,20", "birthday" => "required", "description" => "required", "address" => "required", "company" => "required", "relationships" => "required", "phone_parent" => "required | between:11,20 " ], $this->message()); if ($validator->fails()) { return $this->api_response_error(['validator' => $validator->errors()]); } //$data = $request->all(); $data = $request->only(['first_name', 'last_name', 'email', 'password', 'repassword', 'sex', 'phone', 'birthday', 'description', 'address', 'company', 'relationships', 'phone_parent']); $data['password'] = Hash::make($data['password']); if ($validator->fails()) { return $this->api_response_error(['validator' => $validator->errors()]); } if (User::create($data)) { return $this->api_response([ 'message' => 'Thêm thành công' ]); } return $this->api_response_error([ 'message' => 'Thêm thất bại' ]); } }
30.606742
193
0.540015
5d6fe65c08f398e3f90cb09b236e570fdce17ca2
6,612
cpp
C++
Graph/10numberOfOpsToMakeNetworkConnected.cpp
Coderangshu/450DSA
fff6cee65f75e5a0bb61d5fd8d000317a7736ca3
[ "MIT" ]
1
2021-01-18T14:51:20.000Z
2021-01-18T14:51:20.000Z
Graph/10numberOfOpsToMakeNetworkConnected.cpp
Coderangshu/450DSA
fff6cee65f75e5a0bb61d5fd8d000317a7736ca3
[ "MIT" ]
null
null
null
Graph/10numberOfOpsToMakeNetworkConnected.cpp
Coderangshu/450DSA
fff6cee65f75e5a0bb61d5fd8d000317a7736ca3
[ "MIT" ]
null
null
null
class Solution { public: // Method 1: Using adjacency matrix and DFS/BFS to traverse for each nodes // By traversing each nodes we find the components of a graph // then check if atleast component-1 redundant edges are present or not // if present we return ans as component-1 as that many edges are // required to create MST of all components map<int,vector<int>> makeAdj(int n,vector<vector<int>> connections){ map<int,vector<int>> adjList; for(auto v:connections){ int node1 = v[0], node2 = v[1]; adjList[node1].push_back(node2); adjList[node2].push_back(node1); } return adjList; } int DFS(map<int,vector<int>> adjList, int u, vector<bool> &visited){ int ans = 0; if(visited[u]) return ans; else{ ans++; visited[u] = true; for(auto e:adjList[u]){ if(!visited[e]) ans += DFS(adjList,e,visited); } } return ans; } int makeConnected1(int n, vector<vector<int>>& connections) { // total edges present in graph int E = connections.size(); // if edges are less than n-1(i.e. no. of nodes-1) then no Minimum // spanning tree(MST) is possible if(E<n-1) return -1; // Make adjacency list of graph map<int,vector<int>> adjList = makeAdj(n,connections); vector<bool> visited(n,false); // components are the individual elements present in a graph // components include standalone nodes, connected graph, group // of connected graphs // Example given graph below: // 0-------1 3 // \ / 5 // \ / \ // \ / 4 \ // 2 6 // This graph has 4 components, (0,1,2),(3),(4),(5,6) int components = 0; for(int i=0;i<n;i++){ // If not visited node appears means it is a new component if(!visited[i]){ components++; // DFS will mark the rest nodes of the current component // (if present) as visited // Here DFS returns the no. of nodes in each component DFS(adjList,i,visited); } } // Redundant edges are the edges that which even if remove won't // break the connetivity of nodes // For example in above graph any of (0,1) or (0,2) or (1,2) edge can // be removed without breaking the connectivity of the nodes // Also removing any of the above edges makes that component a MST // n-1 => minimum no.of edges to make MST of all nodes // components-1 => minimum no. of edges to make MST of all components // thus (n-1)-(components-1) gives the possible MSTs in graph without // adding extra edges(i.e. the minimum no. of edges in graph to maintain // the connectivity of nodes as present) // In above graph this value is 3 means that (0,1,2) and (5,6) maintains // connectivity as same with 3 edges // Thus we get total redundant nodes as total nodes - ((n-1)-(components-1)) int redundantEdges = E-((n-1)-(components-1)); // If redundant nodes are less then total components no connection possible if(redundantEdges<components-1) return -1; return (components-1); } // Method 2: Using Union Find Algorithm // In this method firstly all nodes are standalone then using parent vector // we start connecting the nodes to their parents and thus to their ultimate // parents, this way we can find the nodes joined to each other and the nodes // that are standalone // Keeps track of immediate parent of each node // i.e. for connected nodes they will have same parent(may not be immediate), // for standalone they will have themselves as the parent vector<int> parent; // Finds parent of given node recursively in parent vector as parent stores // the immediated parent of each node so recursion is used to find the ultimate // parent int find(int v){ if(parent[v]!=v) return find(parent[v]); else return v; } int makeConnected(int n, vector<vector<int>>& connections) { // total edges present in graph int E = connections.size(); // if edges are less than n-1(i.e. no. of nodes-1) then no Minimum // spanning tree(MST) is possible if(E<n-1) return -1; // Initially we consider every node is standalone for(int i=0;i<n;i++) parent.push_back(i); for(auto connection:connections){ int node1 = connection[0], node2 = connection[1]; // Ultimate parent of both node is found int p1 = find(node1), p2 = find(node2); // If ultimate parent isn't same then, ultimate parent of // node1 is assigned as ultimate parent of node2 // This is naive union set finding // this procedure takes linear time to find the disjoint // sets, using rank decreases T(n) to logarithmic scale // and using rank along with path compression reduces T(n) // to constant if(p1!=p2) parent[p2] = parent[p1]; } int component = 0; // Counting the components, nodes with same parent belong to same component // thus when node's parent found as same node denotes its a new component's // parent, else when not equal means node has some other parent for(int i=0;i<n;i++) if(parent[i]==i) component++; // Uncomment to see immediate parent of each node // for(int i=0;i<n;i++) cout<<i<<" "<<parent[i]<<endl; return component-1; } // For input: // 12 // [[1,5],[1,7],[1,2],[1,4],[3,7],[4,7],[3,5],[0,6],[0,1],[0,4],[2,6],[0,3],[0,2]] // The parent-node relation comes out to be: // 0 // / \ // 3 6 // / // 1 // / / \ \ // 5 7 2 4 // Thus the standalone nodes are 8,9,10,11 // Thus total components are 5 };
37.355932
86
0.540532
4ef4d8b1a1af8be443fee78f25a6ba05823fccf0
3,226
cpp
C++
cpp/varint/leveldb/varint.cpp
yyyshi/asshole_algorithm
270460f2afcdb7a00a08979053e8cfb80ef93b5b
[ "Apache-2.0" ]
null
null
null
cpp/varint/leveldb/varint.cpp
yyyshi/asshole_algorithm
270460f2afcdb7a00a08979053e8cfb80ef93b5b
[ "Apache-2.0" ]
null
null
null
cpp/varint/leveldb/varint.cpp
yyyshi/asshole_algorithm
270460f2afcdb7a00a08979053e8cfb80ef93b5b
[ "Apache-2.0" ]
null
null
null
// encode char* EncodeVarint32(char* dst, uint32_t v) { // Operate on characters as unsigneds uint8_t* ptr = reinterpret_cast<uint8_t*>(dst); static const int B = 128; if (v < (1 << 7)) { *(ptr++) = v; } else if (v < (1 << 14)) { *(ptr++) = v | B; *(ptr++) = v >> 7; } else if (v < (1 << 21)) { *(ptr++) = v | B; *(ptr++) = (v >> 7) | B; *(ptr++) = v >> 14; } else if (v < (1 << 28)) { *(ptr++) = v | B; *(ptr++) = (v >> 7) | B; *(ptr++) = (v >> 14) | B; *(ptr++) = v >> 21; } else { *(ptr++) = v | B; *(ptr++) = (v >> 7) | B; *(ptr++) = (v >> 14) | B; *(ptr++) = (v >> 21) | B; *(ptr++) = v >> 28; } return reinterpret_cast<char*>(ptr); } char* EncodeVarint64(char* dst, uint64_t v) { static const int B = 128; uint8_t* ptr = reinterpret_cast<uint8_t*>(dst); while (v >= B) { *(ptr++) = v | B; v >>= 7; } *(ptr++) = static_cast<uint8_t>(v); return reinterpret_cast<char*>(ptr); } <!解码就是编码的逆过程,这里涉及到对Slice数据的解析 重点关注“GetVarint32Ptr()”,“GetVarint32PtrFallback()” > bool GetVarint32(Slice* input, uint32_t* value) { const char* p = input->data(); const char* limit = p + input->size(); const char* q = GetVarint32Ptr(p, limit, value); if (q == nullptr) { return false; } else { *input = Slice(q, limit - q); return true; } } inline const char* GetVarint32Ptr(const char* p, const char* limit, uint32_t* value) { if (p < limit) { uint32_t result = *(reinterpret_cast<const uint8_t*>(p)); if ((result & 128) == 0) { <!128就是一个八位,最高位为1,其余位为0, 与128相与为0表示待解码的result<=127,所以长度就是一个字节 直接赋值给*Value即可。 > *value = result; return p + 1; } } return GetVarint32PtrFallback(p, limit, value); } const char* GetVarint32PtrFallback(const char* p, const char* limit, uint32_t* value) { <!对于超过一个字节的长度编码,解码的过程就是按小端顺序, 每7位取出,然后移位来组装最后的实际长度,组装结束的表示就是MSB位为0> uint32_t result = 0; for (uint32_t shift = 0; shift <= 28 && p < limit; shift += 7) { uint32_t byte = *(reinterpret_cast<const uint8_t*>(p)); p++; if (byte & 128) { // More bytes are present result |= ((byte & 127) << shift); } else { result |= (byte << shift); *value = result; return reinterpret_cast<const char*>(p); } } return nullptr; } <!Varint64位的流程可Varint32原理一样> bool GetVarint64(Slice* input, uint64_t* value) { const char* p = input->data(); const char* limit = p + input->size(); const char* q = GetVarint64Ptr(p, limit, value); if (q == nullptr) { return false; } else { *input = Slice(q, limit - q); return true; } } const char* GetVarint64Ptr(const char* p, const char* limit, uint64_t* value) { uint64_t result = 0; for (uint32_t shift = 0; shift <= 63 && p < limit; shift += 7) { uint64_t byte = *(reinterpret_cast<const uint8_t*>(p)); p++; if (byte & 128) { // More bytes are present result |= ((byte & 127) << shift); } else { result |= (byte << shift); *value = result; return reinterpret_cast<const char*>(p); } } return nullptr; }
26.442623
79
0.534408