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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f07ce1b8a4c32b3f71f81c30f9b025fe3c4bd93e | 978 | swift | Swift | TestPreview/TestPreview/AppDelegate.swift | WeonpyoHong/Fastflix_iOS | baff5031cbe3bc93c67e5265af8a8259efc546cd | [
"MIT"
] | null | null | null | TestPreview/TestPreview/AppDelegate.swift | WeonpyoHong/Fastflix_iOS | baff5031cbe3bc93c67e5265af8a8259efc546cd | [
"MIT"
] | 1 | 2019-07-30T07:02:28.000Z | 2019-07-30T07:03:07.000Z | TestPreview/TestPreview/AppDelegate.swift | WeonpyoHong/Fastflix_iOS | baff5031cbe3bc93c67e5265af8a8259efc546cd | [
"MIT"
] | 3 | 2019-07-30T06:36:26.000Z | 2019-07-30T06:44:56.000Z | //
// AppDelegate.swift
// TestPreview
//
// Created by hyeoktae kwon on 2019/08/15.
// Copyright © 2019 hyeoktae kwon. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
let vc = BaseVC()
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
window = UIWindow(frame: UIScreen.main.bounds)
window?.rootViewController = vc
window?.backgroundColor = .white
window?.makeKeyAndVisible()
return true
}
func applicationWillResignActive(_ application: UIApplication) {}
func applicationDidEnterBackground(_ application: UIApplication) {}
func applicationWillEnterForeground(_ application: UIApplication) {}
func applicationDidBecomeActive(_ application: UIApplication) {}
func applicationWillTerminate(_ application: UIApplication) {}
}
| 25.076923 | 143 | 0.741309 |
2f30aca39b1195fb4529fd50b620b2c3d5c06697 | 3,555 | java | Java | src/test/java/pwe/planner/logic/parser/RequirementMoveCommandParserTest.java | WendyBaiYunwei/main | be630d64f149bbbf9235c143a96bf51dcb3ea57a | [
"MIT"
] | null | null | null | src/test/java/pwe/planner/logic/parser/RequirementMoveCommandParserTest.java | WendyBaiYunwei/main | be630d64f149bbbf9235c143a96bf51dcb3ea57a | [
"MIT"
] | 211 | 2019-03-02T16:29:31.000Z | 2019-04-15T15:24:47.000Z | src/test/java/pwe/planner/logic/parser/RequirementMoveCommandParserTest.java | WendyBaiYunwei/main | be630d64f149bbbf9235c143a96bf51dcb3ea57a | [
"MIT"
] | 11 | 2019-01-31T15:00:36.000Z | 2019-02-27T01:14:29.000Z | package pwe.planner.logic.parser;
import static pwe.planner.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;
import static pwe.planner.logic.commands.CommandTestUtil.PREAMBLE_NON_EMPTY;
import static pwe.planner.logic.commands.CommandTestUtil.PREAMBLE_WHITESPACE;
import static pwe.planner.logic.parser.CliSyntax.PREFIX_CODE;
import static pwe.planner.logic.parser.CliSyntax.PREFIX_NAME;
import static pwe.planner.logic.parser.CommandParserTestUtil.assertParseFailure;
import static pwe.planner.logic.parser.CommandParserTestUtil.assertParseSuccess;
import java.util.Set;
import org.junit.Test;
import pwe.planner.logic.commands.RequirementMoveCommand;
import pwe.planner.model.module.Code;
import pwe.planner.model.module.Name;
public class RequirementMoveCommandParserTest {
private RequirementMoveCommandParser parser = new RequirementMoveCommandParser();
@Test
public void parse_nullValue_failure() {
//empty input
assertParseFailure(parser, "", RequirementMoveCommand.MESSAGE_USAGE);
}
@Test
public void parse_invalidValue_failure() {
// invalid format
assertParseFailure(parser, " INVALID INPUT", String.format(MESSAGE_INVALID_COMMAND_FORMAT,
RequirementMoveCommand.MESSAGE_USAGE));
// invalid name format
assertParseFailure(parser, " " + PREFIX_NAME + " " + PREFIX_CODE + "CS1010 ",
Name.MESSAGE_CONSTRAINTS);
// invalid name format
assertParseFailure(parser, " " + PREFIX_CODE + "CS1010 " + " " + PREFIX_NAME ,
Name.MESSAGE_CONSTRAINTS);
// invalid code format
assertParseFailure(parser, " " + PREFIX_NAME + "Computing Foundation " + PREFIX_CODE + "1231",
Code.MESSAGE_CONSTRAINTS);
// invalid code format
assertParseFailure(parser, " " + PREFIX_CODE + "1231 " + PREFIX_NAME + "Computing Foundation ",
Code.MESSAGE_CONSTRAINTS);
// invalid name and code format
assertParseFailure(parser, " " + PREFIX_NAME + " " + PREFIX_CODE + "1231",
Name.MESSAGE_CONSTRAINTS);
// invalid name and code format
assertParseFailure(parser, " " + PREFIX_CODE + "1231 " + PREFIX_NAME + " ",
Name.MESSAGE_CONSTRAINTS);
// non-empty preamble
assertParseFailure(parser, PREAMBLE_NON_EMPTY + " " + PREFIX_NAME + "Computing Foundation "
+ PREFIX_CODE + "CS1231", String.format(MESSAGE_INVALID_COMMAND_FORMAT,
RequirementMoveCommand.MESSAGE_USAGE));
}
@Test
public void parse_validArgs_returnsRequirementRemoveCommand() {
Set<Code> validCodeSet = Set.of(new Code("CS1010"));
RequirementMoveCommand expectedRequirementMoveCommand =
new RequirementMoveCommand(new Name("Computing Foundation"), validCodeSet);
//valid command
assertParseSuccess(parser, " " + PREFIX_NAME + "Computing Foundation " + PREFIX_CODE + "CS1010 ",
expectedRequirementMoveCommand);
// whitespace only preamble
assertParseSuccess(parser, PREAMBLE_WHITESPACE + " " + PREFIX_NAME + "Computing Foundation "
+ PREFIX_CODE + "CS1010 ", expectedRequirementMoveCommand);
// multiple requirement categories specified - last requirement category accepted
assertParseSuccess(parser, " " + PREFIX_NAME + "Mathematics " + PREFIX_NAME
+ "Computing Foundation " + PREFIX_CODE + "CS1010", expectedRequirementMoveCommand);
}
}
| 41.337209 | 105 | 0.691702 |
20ec835d6f0471c8ea2e25a2f961ded80a6cc6d3 | 595 | sql | SQL | casa-das-malhas/src/entrega_xml_12_6/3.insert.sql | UFSCar-CS/databases-2013-1 | 636d6d78db8f4c3c96d9911685a12940aea5a085 | [
"MIT"
] | null | null | null | casa-das-malhas/src/entrega_xml_12_6/3.insert.sql | UFSCar-CS/databases-2013-1 | 636d6d78db8f4c3c96d9911685a12940aea5a085 | [
"MIT"
] | null | null | null | casa-das-malhas/src/entrega_xml_12_6/3.insert.sql | UFSCar-CS/databases-2013-1 | 636d6d78db8f4c3c96d9911685a12940aea5a085 | [
"MIT"
] | null | null | null | CONNECT TO casaxml;
-- INICIO DO BLOCO DE INSERCOES DE DADOS
--1 Insercao sobre tabela tipo_funcionario
IMPORT FROM 'E:/xml/xml_dels/tipo_funcionario.del' OF DEL XML
FROM 'E:/xml/xml_insertions'
INSERT INTO tipo_funcionario;
--2 Insercao sobre tabela funcionario
IMPORT FROM 'E:/xml/xml_dels/funcionario.del' OF DEL XML
FROM 'E:/xml/xml_insertions'
INSERT INTO funcionario;
--3 Insercao sobre tabela pagamento_funcionario
IMPORT FROM 'E:/xml/xml_dels/pagamento_funcionario.del' OF DEL XML
FROM 'E:/xml/xml_insertions'
INSERT INTO pagamento_funcionario;
-- FIM DO BLOCO DE INSERCOES DE DADOS | 29.75 | 66 | 0.796639 |
f0885c78b76f1e546162fb2cd640bb0cb5681413 | 813 | swift | Swift | Sources/diary-core/Modifiers/Filters/When.swift | spydercapriani/diary-log | 42a264ee60c754a772a317721c55e15ded5d28e2 | [
"MIT"
] | null | null | null | Sources/diary-core/Modifiers/Filters/When.swift | spydercapriani/diary-log | 42a264ee60c754a772a317721c55e15ded5d28e2 | [
"MIT"
] | null | null | null | Sources/diary-core/Modifiers/Filters/When.swift | spydercapriani/diary-log | 42a264ee60c754a772a317721c55e15ded5d28e2 | [
"MIT"
] | null | null | null | //
// When.swift
//
//
// Created by Danny Gilbert on 1/19/22.
//
public struct When<M: Modifier, T> {
public let modifier: M
public let transformer: Transformer
public init(
_ modifier: M,
_ transformer: Transformer
) {
self.modifier = modifier
self.transformer = transformer
}
}
// MARK: - Modifier
public extension Modifier {
func when<T>(
_ transform: @escaping BasicTransformer<Output, T>
) -> When<Self, T> {
.init(self, .init(transform))
}
func when<T>(
_ transformer: When<Self, T>.Transformer
) -> When<Self, T> {
.init(self, transformer)
}
func when<T>(
_ keyPath: KeyPath<Entry, T>
) -> When<Self, T> {
.init(self, .init(keyPath))
}
}
| 18.906977 | 58 | 0.544895 |
c06faa4da054d657c14935d649ce617be8233ce1 | 2,564 | htm | HTML | src/pages/lib/EditorPage/EditorPage.htm | genievot/oscript-editor | c7f6d023271fb462b972c9c153fc733349b99e8b | [
"MIT"
] | null | null | null | src/pages/lib/EditorPage/EditorPage.htm | genievot/oscript-editor | c7f6d023271fb462b972c9c153fc733349b99e8b | [
"MIT"
] | null | null | null | src/pages/lib/EditorPage/EditorPage.htm | genievot/oscript-editor | c7f6d023271fb462b972c9c153fc733349b99e8b | [
"MIT"
] | null | null | null | <div class="root-editor-page">
<div class="editor-controls">
<div class="editor-header">
<span>Oscript Editor</span>
<div v-if="badge" class="editor-header-badge">{{badge}}</div>
</div>
<div class="editor-controls-checkbox">
Wrap lines:
<input type="checkbox" :checked="wrapLines" @change="handleWrapLinesCheckbox">
</div>
<div class="editor-controls-select">
Theme:
<select @change="handleThemeSelect" :value="theme">
<option>dark</option>
<option>white</option>
</select>
</div>
<div class="editor-controls-select">
<agent-controls class="agent-actions"
:isSelectedAgentUser="isSelectedAgentUser"
:selectedLabel="selectedAgent.label"
@rename="handleAgentActionRename"
@delete="handleAgentActionDelete"
@new="handleAgentActionNew"
@share="handleAgentActionShare"
></agent-controls>
AAs:
<select @change="handleTemplateSelect" :value="selectedAgent.id">
<optgroup v-if="userAgents.length" label="Autonomous Agents:">
<option v-for="agent in userAgents" :value="agent.id">{{ agent.label }}</option>
</optgroup>
<optgroup label="Templates:">
<option v-for="agent in templates" :value="agent.id">{{ agent.label }}</option>
</optgroup>
</select>
</div>
</div>
<div class="editor-container" :class="`theme-${theme}`">
<monaco-editor
:options="editorOptions"
ref="editor"
class="editor"
v-model="code"
:language="language"
:theme="theme"
/>
</div>
<transition name="collapse">
<div
v-if="resultPaneOpened"
class="result-pane-container"
:class="`theme-${theme}`"
>
<monaco-editor
:options="resultPaneEditorOptions"
ref="resultPaneEditor"
class="result-pane"
v-model="resultMessage"
language="result-highlighter"
:theme="theme"
/>
</div>
</transition>
<a class="documentation-link"
target="_blank"
href="https://developer.obyte.org/autonomous-agents"
title="Autonomous Agents Documentation"
>Autonomous Agents Documentation</a>
<div class="actions-row">
<div class="actions-row-action" @click="validate">Validate</div>
<div class="actions-row-action" @click="deploy">Deploy</div>
</div>
<div class="socials-row">
<div class="social">
<a href="https://obyte.org/" title="Official Website" target="_blank">
<img src="static/images/icons/obyte.png">
</a>
</div>
<div class="social">
<a href="https://github.com/byteball/oscript-editor" title="GitHub Repository" target="_blank">
<img src="static/images/icons/github.png">
</a>
</div>
</div>
</div>
| 29.813953 | 98 | 0.667707 |
43eefe3b5e7bfb604125e2544ef6889b5e8f1254 | 1,449 | go | Go | app/job/main/figure/service/reply.go | 78182648/blibli-go | 7c717cc07073ff3397397fd3c01aa93234b142e3 | [
"MIT"
] | 22 | 2019-04-27T06:44:41.000Z | 2022-02-04T16:54:14.000Z | app/job/main/figure/service/reply.go | YouthAge/blibli-go | 7c717cc07073ff3397397fd3c01aa93234b142e3 | [
"MIT"
] | null | null | null | app/job/main/figure/service/reply.go | YouthAge/blibli-go | 7c717cc07073ff3397397fd3c01aa93234b142e3 | [
"MIT"
] | 34 | 2019-05-07T08:22:27.000Z | 2022-03-25T08:14:56.000Z | package service
import (
"context"
"time"
"go-common/app/job/main/figure/model"
)
// PutReplyInfo handle user reply info chenage message
func (s *Service) PutReplyInfo(c context.Context, info *model.ReplyEvent) (err error) {
switch info.Action {
case model.EventAdd:
// only handle normal state reply
if info.Reply.State == 0 {
s.figureDao.PutReplyAct(c, info.Mid, model.ACColumnReplyAct, int64(1))
}
case model.EventLike:
s.figureDao.PutReplyAct(c, info.Reply.Mid, model.ACColumnReplyLiked, int64(1))
case model.EventLikeCancel:
s.figureDao.PutReplyAct(c, info.Reply.Mid, model.ACColumnReplyLiked, int64(-1))
case model.EventHate:
s.figureDao.PutReplyAct(c, info.Reply.Mid, model.ACColumnReplyHate, int64(1))
case model.EventHateCancel:
s.figureDao.PutReplyAct(c, info.Reply.Mid, model.ACColumnReplyHate, int64(-1))
case model.EventReportDel:
s.figureDao.PutReplyAct(c, info.Report.Mid, model.ACColumnReplyReoprtPassed, int64(1))
s.figureDao.PutReplyAct(c, info.Reply.Mid, model.ACColumnPublishReplyDeleted, int64(-1))
s.figureDao.SetWaiteUserCache(c, info.Report.Mid, s.figureDao.Version(time.Now()))
case model.EventReportRecover:
s.figureDao.PutReplyAct(c, info.Report.Mid, model.ACColumnReplyReoprtPassed, int64(-1))
s.figureDao.PutReplyAct(c, info.Reply.Mid, model.ACColumnPublishReplyDeleted, int64(1))
s.figureDao.SetWaiteUserCache(c, info.Report.Mid, s.figureDao.Version(time.Now()))
}
return
}
| 39.162162 | 90 | 0.765355 |
1e096cd829e4afee1d899b0908d3e7d63fa369f9 | 627 | css | CSS | W12/css/leftPanel.css | LaFrimousse/VITAProject | 8f3330ddc561ddbe44f1657bfbf8145862e693c1 | [
"MIT"
] | null | null | null | W12/css/leftPanel.css | LaFrimousse/VITAProject | 8f3330ddc561ddbe44f1657bfbf8145862e693c1 | [
"MIT"
] | null | null | null | W12/css/leftPanel.css | LaFrimousse/VITAProject | 8f3330ddc561ddbe44f1657bfbf8145862e693c1 | [
"MIT"
] | null | null | null | .leftPanel{
background-color: #4286f4;
min-width: 100px;
flex: 1;
display: flex;
flex-direction: column;
}
.twoPicturesWrappers {
background-color: gray;
flex: 1;
display: flex;
justify-content: space-around;
align-items: center;
}
.twoPicturesWrappers img{
display: block;
max-width: 45%;
background-color: red;
}
.leftPanel .probaTitle{
text-align: center;
font-size: large;
font-weight: bold;
margin-bottom: 5px;
}
.probabilitiesDisplayer{
flex: 1;
background: white;
min-width: 100px;
min-height: 100px;
}
.probabilitiesDisplayer p{
margin-left: 5px;
margin-right: 5px;
}
| 15.292683 | 32 | 0.685805 |
4c3d44968e255879cfee2413c6fa8dac9c95ddca | 737 | ps1 | PowerShell | configs/SampleConfigWithScriptResource.ps1 | kbaker827/DSCEA | ae4d33b213f34e19415ecd129964657116c80e9c | [
"MIT"
] | 144 | 2017-03-21T22:07:28.000Z | 2019-05-06T06:43:03.000Z | configs/SampleConfigWithScriptResource.ps1 | jaikarn/DSCEA | ae4d33b213f34e19415ecd129964657116c80e9c | [
"MIT"
] | 47 | 2017-03-09T15:49:34.000Z | 2019-05-05T20:32:29.000Z | configs/SampleConfigWithScriptResource.ps1 | jaikarn/DSCEA | ae4d33b213f34e19415ecd129964657116c80e9c | [
"MIT"
] | 39 | 2017-03-10T04:06:49.000Z | 2019-03-19T14:08:36.000Z | configuration ScriptResourceSample {
Import-DscResource -ModuleName PSDesiredStateConfiguration
Node 'localhost' {
#Disables RDP
Script 'ScriptResourceOne' {
GetScript = {
@{
Results = (Get-NetFirewallRule -DisplayGroup 'Remote Desktop').Enabled
} #Returns a HashTable @{}
}
TestScript = {
((Get-NetFirewallRule -DisplayGroup 'Remote Desktop').Enabled).Contains('False') #Returns True or False
}
SetScript = {
Set-NetFirewallRule -DisplayGroup 'Remote Desktop' -Enabled True #Makes it so!
}
}
}
}
ScriptResourceSample -OutputPath .\ | 33.5 | 119 | 0.556309 |
e89eb9690881be55d1f03c2fcf30ebf80906f6b9 | 464 | cpp | C++ | acwing/improved/chapter_1_dynamic_programing/triangle/acw_1015/PickPeanut.cpp | Sherlockouo/algorithm_enhancement | da98b6b268a572d421606bb6c1efcd1123f13d3c | [
"MIT"
] | null | null | null | acwing/improved/chapter_1_dynamic_programing/triangle/acw_1015/PickPeanut.cpp | Sherlockouo/algorithm_enhancement | da98b6b268a572d421606bb6c1efcd1123f13d3c | [
"MIT"
] | null | null | null | acwing/improved/chapter_1_dynamic_programing/triangle/acw_1015/PickPeanut.cpp | Sherlockouo/algorithm_enhancement | da98b6b268a572d421606bb6c1efcd1123f13d3c | [
"MIT"
] | null | null | null | #include <iostream>
#include <algorithm>
using namespace std;
const int N = 110;
int t,r,c,g[N][N],dp[N][N];
int main(){
scanf("%d",&t);
while(t--){
// 读入行数,列数
scanf("%d%d",&r,&c);
// 读入地图
for(int i = 1; i <= r; i++){
for(int j = 1; j <= c; j++){
scanf("%d",&g[i][j]);
}
}
for(int i = 1; i <= r; i++){
for(int j = 1; j <= c; j++){
dp[i][j] = max(dp[i-1][j],dp[i][j-1])+g[i][j];
}
}
printf("%d\n",dp[r][c]);
}
return 0;
}
| 16 | 50 | 0.439655 |
1b790218cbd66bf1f42f3158f3b76787846c7db0 | 863 | kt | Kotlin | src/main/kotlin/malomarket/product/ProductService.kt | malomarket/malo-backend | f9e22b703bd19c2e9109afa33e5ed633e9b3e969 | [
"MIT"
] | null | null | null | src/main/kotlin/malomarket/product/ProductService.kt | malomarket/malo-backend | f9e22b703bd19c2e9109afa33e5ed633e9b3e969 | [
"MIT"
] | null | null | null | src/main/kotlin/malomarket/product/ProductService.kt | malomarket/malo-backend | f9e22b703bd19c2e9109afa33e5ed633e9b3e969 | [
"MIT"
] | null | null | null | package malomarket.product
import malomarket.exception.NotFoundException
import org.springframework.dao.EmptyResultDataAccessException
import org.springframework.stereotype.Service
@Service
class ProductService(private val productRepository: ProductRepository) {
fun getAllProducts() = productRepository.findAll()
fun createNewProduct(product: Product): Product {
val maxProductNumber = productRepository.findMaxProductNumber()
product.productNumber = maxProductNumber + 1
return productRepository.save(product)
}
fun getByProductNumber(productNumber: Long): Product {
try {
return productRepository.findByProductNumber(productNumber)
} catch (e: EmptyResultDataAccessException) {
throw NotFoundException("Product with number $productNumber was not found.", e)
}
}
} | 34.52 | 91 | 0.747393 |
ff8140266218783a9bec2032e1132806bfe81426 | 221 | kt | Kotlin | modules/bson/tests-jvm/utility/DummyBsonCodecProvider.kt | fluidsonic/raptor | d0e65f7b98c126f6105d712fa76cdb51f253c44b | [
"Apache-2.0"
] | 2 | 2020-08-08T02:55:53.000Z | 2020-12-23T18:47:03.000Z | modules/bson/tests-jvm/utility/DummyBsonCodecProvider.kt | fluidsonic/raptor | d0e65f7b98c126f6105d712fa76cdb51f253c44b | [
"Apache-2.0"
] | null | null | null | modules/bson/tests-jvm/utility/DummyBsonCodecProvider.kt | fluidsonic/raptor | d0e65f7b98c126f6105d712fa76cdb51f253c44b | [
"Apache-2.0"
] | 1 | 2020-12-23T18:47:05.000Z | 2020-12-23T18:47:05.000Z | package tests
import org.bson.codecs.*
import org.bson.codecs.configuration.*
object DummyBsonCodecProvider : CodecProvider {
override fun <T : Any> get(clazz: Class<T>, registry: CodecRegistry): Codec<T> = TODO()
}
| 20.090909 | 88 | 0.742081 |
4a74349adfca2b47696c803a3c55875ae85f085e | 41,741 | html | HTML | doc/doxygen/html/d1/d84/multisigaddressentry_8cpp_source.html | Palem1988/ion_old | 2c2b532abf61e2a06231c1d3b4d9b2bd0cdb469a | [
"MIT"
] | 2 | 2017-01-16T13:42:19.000Z | 2017-01-16T17:14:59.000Z | doc/doxygen/html/d1/d84/multisigaddressentry_8cpp_source.html | Palem1988/ion_old | 2c2b532abf61e2a06231c1d3b4d9b2bd0cdb469a | [
"MIT"
] | 18 | 2017-01-19T09:19:48.000Z | 2017-01-27T01:59:30.000Z | doc/doxygen/html/d1/d84/multisigaddressentry_8cpp_source.html | Palem1988/ion_old | 2c2b532abf61e2a06231c1d3b4d9b2bd0cdb469a | [
"MIT"
] | 10 | 2017-01-17T19:54:55.000Z | 2017-02-11T19:26:43.000Z | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>🗺️Ion Core Wallet CE ©️ 👒: src/qt/multisigaddressentry.cpp Source File</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="../../ion_logo_doxygen.png"/></td>
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">🗺️Ion Core Wallet CE ©️ 👒
 <span id="projectnumber">2.1.6.0</span>
</div>
<div id="projectbrief">(🐼🐼CEVAP🐼🐼 DevWiki 👯Community Edition👯)</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('../../',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="../../dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="../../dir_f0c29a9f5764d78706f34c972e8114d8.html">qt</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">multisigaddressentry.cpp</div> </div>
</div><!--header-->
<div class="contents">
<a href="../../d1/d84/multisigaddressentry_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="preprocessor">#include <QApplication></span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="preprocessor">#include <QClipboard></span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="preprocessor">#include <string></span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="preprocessor">#include <vector></span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> </div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="preprocessor">#include "<a class="code" href="../../d5/d95/addressbookpage_8h.html">addressbookpage.h</a>"</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="preprocessor">#include "<a class="code" href="../../d3/dab/addresstablemodel_8h.html">addresstablemodel.h</a>"</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="preprocessor">#include "<a class="code" href="../../d8/d53/base58_8h.html">base58.h</a>"</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="preprocessor">#include "<a class="code" href="../../d6/d23/guiutil_8h.html">guiutil.h</a>"</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="preprocessor">#include "<a class="code" href="../../de/de5/key_8h.html">key.h</a>"</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="preprocessor">#include "<a class="code" href="../../d6/d22/multisigaddressentry_8h.html">multisigaddressentry.h</a>"</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="preprocessor">#include "ui_multisigaddressentry.h"</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="preprocessor">#include "<a class="code" href="../../d6/d2d/walletmodel_8h.html">walletmodel.h</a>"</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> </div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> </div><div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="../../da/d39/class_multisig_address_entry.html#a0e72b6fd53c15d4a40f3f4cd50c2de2b"> 16</a></span> <a class="code" href="../../da/d39/class_multisig_address_entry.html#a0e72b6fd53c15d4a40f3f4cd50c2de2b">MultisigAddressEntry::MultisigAddressEntry</a>(QWidget *parent) : QFrame(parent), ui(new <a class="code" href="../../dc/df0/namespace_ui.html">Ui</a>::<a class="code" href="../../da/d39/class_multisig_address_entry.html">MultisigAddressEntry</a>), model(0)</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> {</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>  <a class="code" href="../../da/d39/class_multisig_address_entry.html#ad61ba25707a03b291f79b8d72ced5572">ui</a>->setupUi(<span class="keyword">this</span>);</div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>  <a class="code" href="../../d1/d87/namespace_g_u_i_util.html#a4a230e717c130875bb07f2ef63bbb95c">GUIUtil::setupAddressWidget</a>(<a class="code" href="../../da/d39/class_multisig_address_entry.html#ad61ba25707a03b291f79b8d72ced5572">ui</a>->address, <span class="keyword">this</span>);</div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> }</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> </div><div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="../../da/d39/class_multisig_address_entry.html#a7295034dd8091350713b58dd35ca664f"> 22</a></span> <a class="code" href="../../da/d39/class_multisig_address_entry.html#a7295034dd8091350713b58dd35ca664f">MultisigAddressEntry::~MultisigAddressEntry</a>()</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> {</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  <span class="keyword">delete</span> <a class="code" href="../../da/d39/class_multisig_address_entry.html#ad61ba25707a03b291f79b8d72ced5572">ui</a>;</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> }</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> </div><div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="../../da/d39/class_multisig_address_entry.html#ab1d0ae8a8d3f9d1678ae621f9ccbeb6c"> 27</a></span> <span class="keywordtype">void</span> <a class="code" href="../../da/d39/class_multisig_address_entry.html#ab1d0ae8a8d3f9d1678ae621f9ccbeb6c">MultisigAddressEntry::setModel</a>(<a class="code" href="../../d4/d27/class_wallet_model.html">WalletModel</a> *<a class="code" href="../../da/d39/class_multisig_address_entry.html#a696dd8fff276ea50f7b57622fe8753e5">model</a>)</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> {</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  this->model = <a class="code" href="../../da/d39/class_multisig_address_entry.html#a696dd8fff276ea50f7b57622fe8753e5">model</a>;</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  <a class="code" href="../../da/d39/class_multisig_address_entry.html#a8325b202ad0045c1d1a37a8f73d6963d">clear</a>();</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> }</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> </div><div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="../../da/d39/class_multisig_address_entry.html#a8325b202ad0045c1d1a37a8f73d6963d"> 33</a></span> <span class="keywordtype">void</span> <a class="code" href="../../da/d39/class_multisig_address_entry.html#a8325b202ad0045c1d1a37a8f73d6963d">MultisigAddressEntry::clear</a>()</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> {</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  <a class="code" href="../../da/d39/class_multisig_address_entry.html#ad61ba25707a03b291f79b8d72ced5572">ui</a>->pubkey->clear();</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  <a class="code" href="../../da/d39/class_multisig_address_entry.html#ad61ba25707a03b291f79b8d72ced5572">ui</a>->address->clear();</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  <a class="code" href="../../da/d39/class_multisig_address_entry.html#ad61ba25707a03b291f79b8d72ced5572">ui</a>->label->clear();</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  <a class="code" href="../../da/d39/class_multisig_address_entry.html#ad61ba25707a03b291f79b8d72ced5572">ui</a>->pubkey->setFocus();</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> }</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> </div><div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="../../da/d39/class_multisig_address_entry.html#aef99e66336822174b6d232d5043e933f"> 41</a></span> <span class="keywordtype">bool</span> <a class="code" href="../../da/d39/class_multisig_address_entry.html#aef99e66336822174b6d232d5043e933f">MultisigAddressEntry::validate</a>()</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> {</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  <span class="keywordflow">return</span> !<a class="code" href="../../da/d39/class_multisig_address_entry.html#ad61ba25707a03b291f79b8d72ced5572">ui</a>->pubkey->text().isEmpty();</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span> }</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> </div><div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="../../da/d39/class_multisig_address_entry.html#acc3b892bc16139d8d1e72aa9957f7d52"> 46</a></span> QString <a class="code" href="../../da/d39/class_multisig_address_entry.html#acc3b892bc16139d8d1e72aa9957f7d52">MultisigAddressEntry::getPubkey</a>()</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> {</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <span class="keywordflow">return</span> <a class="code" href="../../da/d39/class_multisig_address_entry.html#ad61ba25707a03b291f79b8d72ced5572">ui</a>->pubkey->text();</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> }</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span> </div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="../../da/d39/class_multisig_address_entry.html#a79381bb67358d5844120953a5889ec22"> 51</a></span> <span class="keywordtype">void</span> <a class="code" href="../../da/d39/class_multisig_address_entry.html#a79381bb67358d5844120953a5889ec22">MultisigAddressEntry::setRemoveEnabled</a>(<span class="keywordtype">bool</span> enabled)</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span> {</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <a class="code" href="../../da/d39/class_multisig_address_entry.html#ad61ba25707a03b291f79b8d72ced5572">ui</a>->deleteButton->setEnabled(enabled);</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> }</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span> </div><div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="../../da/d39/class_multisig_address_entry.html#aa2e51b99443b1e37725f7d1fd7b69ff4"> 56</a></span> <span class="keywordtype">void</span> <a class="code" href="../../da/d39/class_multisig_address_entry.html#aa2e51b99443b1e37725f7d1fd7b69ff4">MultisigAddressEntry::on_pasteButton_clicked</a>()</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span> {</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <a class="code" href="../../da/d39/class_multisig_address_entry.html#ad61ba25707a03b291f79b8d72ced5572">ui</a>->address->setText(QApplication::clipboard()->text());</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span> }</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span> </div><div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="../../da/d39/class_multisig_address_entry.html#a0f4988f12e0204810cad732e0e3a2ff7"> 61</a></span> <span class="keywordtype">void</span> <a class="code" href="../../da/d39/class_multisig_address_entry.html#a0f4988f12e0204810cad732e0e3a2ff7">MultisigAddressEntry::on_deleteButton_clicked</a>()</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span> {</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  emit <a class="code" href="../../da/d39/class_multisig_address_entry.html#abf6baee387881cc197585485d430410e">removeEntry</a>(<span class="keyword">this</span>);</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span> }</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span> </div><div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="../../da/d39/class_multisig_address_entry.html#a6077acfd02d628465478c463c3024e6e"> 66</a></span> <span class="keywordtype">void</span> <a class="code" href="../../da/d39/class_multisig_address_entry.html#a6077acfd02d628465478c463c3024e6e">MultisigAddressEntry::on_addressBookButton_clicked</a>()</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span> {</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <span class="keywordflow">if</span>(!<a class="code" href="../../da/d39/class_multisig_address_entry.html#a696dd8fff276ea50f7b57622fe8753e5">model</a>)</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  <span class="keywordflow">return</span>;</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span> </div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  <a class="code" href="../../d3/d4a/class_address_book_page.html">AddressBookPage</a> dlg(<a class="code" href="../../d3/d4a/class_address_book_page.html#a0a8f8e590dc6f18e829fde039f984464a3591dbaa5496b5791059d7df5d293a1c">AddressBookPage::ForSending</a>, <a class="code" href="../../d3/d4a/class_address_book_page.html#a7ef3cf6c3e4613894af313a05335dbe3ac0029a5d46e35919fb2df9c4f370e8a9">AddressBookPage::ReceivingTab</a>, <span class="keyword">this</span>);</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  dlg.<a class="code" href="../../d3/d4a/class_address_book_page.html#a1282cda9cb0300ee04c472ec4c9949f3">setModel</a>(<a class="code" href="../../da/d39/class_multisig_address_entry.html#a696dd8fff276ea50f7b57622fe8753e5">model</a>-><a class="code" href="../../d4/d27/class_wallet_model.html#a89ed202e2dbc04aaa70d72872b95b351">getAddressTableModel</a>());</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  <span class="keywordflow">if</span>(dlg.exec())</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  {</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <a class="code" href="../../da/d39/class_multisig_address_entry.html#ad61ba25707a03b291f79b8d72ced5572">ui</a>->address->setText(dlg.<a class="code" href="../../d3/d4a/class_address_book_page.html#a4f6d802c63539ac335b138cca0b913d2">getReturnValue</a>());</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  }</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span> }</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span> </div><div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="../../da/d39/class_multisig_address_entry.html#addaaabad7c692f4be0255d3969ccb6c0"> 79</a></span> <span class="keywordtype">void</span> <a class="code" href="../../da/d39/class_multisig_address_entry.html#addaaabad7c692f4be0255d3969ccb6c0">MultisigAddressEntry::on_pubkey_textChanged</a>(<span class="keyword">const</span> QString &pubkey)</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span> {</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  <span class="comment">// Compute address from public key</span></div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  std::vector<unsigned char> vchPubKey(<a class="code" href="../../df/d2d/util_8cpp.html#abea395175fbc4a788ed0f0a41710b8a7">ParseHex</a>(pubkey.toStdString().c_str()));</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <a class="code" href="../../da/d4e/class_c_pub_key.html">CPubKey</a> pkey(vchPubKey);</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <a class="code" href="../../dd/d88/class_c_key_i_d.html">CKeyID</a> keyID = pkey.<a class="code" href="../../da/d4e/class_c_pub_key.html#a2675f7e6f72eff68e7a5227289feb021">GetID</a>();</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  <a class="code" href="../../d1/de4/class_c_ion_address.html">CIonAddress</a> address(keyID);</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <a class="code" href="../../da/d39/class_multisig_address_entry.html#ad61ba25707a03b291f79b8d72ced5572">ui</a>->address->setText(address.<a class="code" href="../../d2/d08/class_c_base58_data.html#a7dc91af403ca02694b3247b15604e220">ToString</a>().c_str());</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span> </div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <span class="keywordflow">if</span>(!<a class="code" href="../../da/d39/class_multisig_address_entry.html#a696dd8fff276ea50f7b57622fe8753e5">model</a>)</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  <span class="keywordflow">return</span>;</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span> </div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <span class="comment">// Get label of address</span></div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  QString associatedLabel = <a class="code" href="../../da/d39/class_multisig_address_entry.html#a696dd8fff276ea50f7b57622fe8753e5">model</a>-><a class="code" href="../../d4/d27/class_wallet_model.html#a89ed202e2dbc04aaa70d72872b95b351">getAddressTableModel</a>()-><a class="code" href="../../d9/ded/class_address_table_model.html#afcdbfc17ac480f5a57382cbcf096ccb3">labelForAddress</a>(address.<a class="code" href="../../d2/d08/class_c_base58_data.html#a7dc91af403ca02694b3247b15604e220">ToString</a>().c_str());</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <span class="keywordflow">if</span>(!associatedLabel.isEmpty())</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <a class="code" href="../../da/d39/class_multisig_address_entry.html#ad61ba25707a03b291f79b8d72ced5572">ui</a>->label->setText(associatedLabel);</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <a class="code" href="../../da/d39/class_multisig_address_entry.html#ad61ba25707a03b291f79b8d72ced5572">ui</a>->label->setText(QString());</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span> }</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span> </div><div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="../../da/d39/class_multisig_address_entry.html#a0a0e76713ced1bab5e59dd81546a7de8"> 99</a></span> <span class="keywordtype">void</span> <a class="code" href="../../da/d39/class_multisig_address_entry.html#a0a0e76713ced1bab5e59dd81546a7de8">MultisigAddressEntry::on_address_textChanged</a>(<span class="keyword">const</span> QString &address)</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span> {</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <span class="keywordflow">if</span>(!<a class="code" href="../../da/d39/class_multisig_address_entry.html#a696dd8fff276ea50f7b57622fe8753e5">model</a>)</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  <span class="keywordflow">return</span>;</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span> </div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <span class="comment">// Get public key of address</span></div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  <a class="code" href="../../d1/de4/class_c_ion_address.html">CIonAddress</a> addr(address.toStdString().c_str());</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  <a class="code" href="../../dd/d88/class_c_key_i_d.html">CKeyID</a> keyID;</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  <span class="keywordflow">if</span>(addr.GetKeyID(keyID))</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  {</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <a class="code" href="../../da/d4e/class_c_pub_key.html">CPubKey</a> vchPubKey;</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  <a class="code" href="../../da/d39/class_multisig_address_entry.html#a696dd8fff276ea50f7b57622fe8753e5">model</a>-><a class="code" href="../../d4/d27/class_wallet_model.html#abe0b4462654768f301d1f758f7907ca2">getPubKey</a>(keyID, vchPubKey);</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  std::string pubkey = <a class="code" href="../../d8/d3c/util_8h.html#ace13a819ca4e98c22847d26b3b357e75">HexStr</a>(vchPubKey.<a class="code" href="../../da/d4e/class_c_pub_key.html#a0901f7361c4e539dd6d35c79d0db3f89">Raw</a>());</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  <span class="keywordflow">if</span>(!pubkey.empty())</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  <a class="code" href="../../da/d39/class_multisig_address_entry.html#ad61ba25707a03b291f79b8d72ced5572">ui</a>->pubkey->setText(pubkey.c_str());</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  }</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span> </div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <span class="comment">// Get label of address</span></div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  QString associatedLabel = <a class="code" href="../../da/d39/class_multisig_address_entry.html#a696dd8fff276ea50f7b57622fe8753e5">model</a>-><a class="code" href="../../d4/d27/class_wallet_model.html#a89ed202e2dbc04aaa70d72872b95b351">getAddressTableModel</a>()-><a class="code" href="../../d9/ded/class_address_table_model.html#afcdbfc17ac480f5a57382cbcf096ccb3">labelForAddress</a>(address);</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <span class="keywordflow">if</span>(!associatedLabel.isEmpty())</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  <a class="code" href="../../da/d39/class_multisig_address_entry.html#ad61ba25707a03b291f79b8d72ced5572">ui</a>->label->setText(associatedLabel);</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span> }</div><div class="ttc" id="class_multisig_address_entry_html_a0e72b6fd53c15d4a40f3f4cd50c2de2b"><div class="ttname"><a href="../../da/d39/class_multisig_address_entry.html#a0e72b6fd53c15d4a40f3f4cd50c2de2b">MultisigAddressEntry::MultisigAddressEntry</a></div><div class="ttdeci">MultisigAddressEntry(QWidget *parent=0)</div><div class="ttdef"><b>Definition:</b> <a href="../../d1/d84/multisigaddressentry_8cpp_source.html#l00016">multisigaddressentry.cpp:16</a></div></div>
<div class="ttc" id="multisigaddressentry_8h_html"><div class="ttname"><a href="../../d6/d22/multisigaddressentry_8h.html">multisigaddressentry.h</a></div></div>
<div class="ttc" id="class_multisig_address_entry_html_a0a0e76713ced1bab5e59dd81546a7de8"><div class="ttname"><a href="../../da/d39/class_multisig_address_entry.html#a0a0e76713ced1bab5e59dd81546a7de8">MultisigAddressEntry::on_address_textChanged</a></div><div class="ttdeci">void on_address_textChanged(const QString &address)</div><div class="ttdef"><b>Definition:</b> <a href="../../d1/d84/multisigaddressentry_8cpp_source.html#l00099">multisigaddressentry.cpp:99</a></div></div>
<div class="ttc" id="walletmodel_8h_html"><div class="ttname"><a href="../../d6/d2d/walletmodel_8h.html">walletmodel.h</a></div></div>
<div class="ttc" id="class_address_book_page_html_a1282cda9cb0300ee04c472ec4c9949f3"><div class="ttname"><a href="../../d3/d4a/class_address_book_page.html#a1282cda9cb0300ee04c472ec4c9949f3">AddressBookPage::setModel</a></div><div class="ttdeci">void setModel(AddressTableModel *model)</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/dde/addressbookpage_8cpp_source.html#l00111">addressbookpage.cpp:111</a></div></div>
<div class="ttc" id="namespace_ui_html"><div class="ttname"><a href="../../dc/df0/namespace_ui.html">Ui</a></div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d8d/aboutdialog_8h_source.html#l00006">aboutdialog.h:6</a></div></div>
<div class="ttc" id="class_multisig_address_entry_html_aef99e66336822174b6d232d5043e933f"><div class="ttname"><a href="../../da/d39/class_multisig_address_entry.html#aef99e66336822174b6d232d5043e933f">MultisigAddressEntry::validate</a></div><div class="ttdeci">bool validate()</div><div class="ttdef"><b>Definition:</b> <a href="../../d1/d84/multisigaddressentry_8cpp_source.html#l00041">multisigaddressentry.cpp:41</a></div></div>
<div class="ttc" id="class_wallet_model_html_a89ed202e2dbc04aaa70d72872b95b351"><div class="ttname"><a href="../../d4/d27/class_wallet_model.html#a89ed202e2dbc04aaa70d72872b95b351">WalletModel::getAddressTableModel</a></div><div class="ttdeci">AddressTableModel * getAddressTableModel()</div><div class="ttdef"><b>Definition:</b> <a href="../../d8/d9b/walletmodel_8cpp_source.html#l00555">walletmodel.cpp:555</a></div></div>
<div class="ttc" id="class_multisig_address_entry_html_addaaabad7c692f4be0255d3969ccb6c0"><div class="ttname"><a href="../../da/d39/class_multisig_address_entry.html#addaaabad7c692f4be0255d3969ccb6c0">MultisigAddressEntry::on_pubkey_textChanged</a></div><div class="ttdeci">void on_pubkey_textChanged(const QString &pubkey)</div><div class="ttdef"><b>Definition:</b> <a href="../../d1/d84/multisigaddressentry_8cpp_source.html#l00079">multisigaddressentry.cpp:79</a></div></div>
<div class="ttc" id="namespace_g_u_i_util_html_a4a230e717c130875bb07f2ef63bbb95c"><div class="ttname"><a href="../../d1/d87/namespace_g_u_i_util.html#a4a230e717c130875bb07f2ef63bbb95c">GUIUtil::setupAddressWidget</a></div><div class="ttdeci">void setupAddressWidget(QLineEdit *widget, QWidget *parent)</div><div class="ttdef"><b>Definition:</b> <a href="../../db/d35/guiutil_8cpp_source.html#l00093">guiutil.cpp:93</a></div></div>
<div class="ttc" id="class_c_pub_key_html_a2675f7e6f72eff68e7a5227289feb021"><div class="ttname"><a href="../../da/d4e/class_c_pub_key.html#a2675f7e6f72eff68e7a5227289feb021">CPubKey::GetID</a></div><div class="ttdeci">CKeyID GetID() const</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/daf/pubkey_8h_source.html#l00132">pubkey.h:132</a></div></div>
<div class="ttc" id="class_multisig_address_entry_html_a6077acfd02d628465478c463c3024e6e"><div class="ttname"><a href="../../da/d39/class_multisig_address_entry.html#a6077acfd02d628465478c463c3024e6e">MultisigAddressEntry::on_addressBookButton_clicked</a></div><div class="ttdeci">void on_addressBookButton_clicked()</div><div class="ttdef"><b>Definition:</b> <a href="../../d1/d84/multisigaddressentry_8cpp_source.html#l00066">multisigaddressentry.cpp:66</a></div></div>
<div class="ttc" id="class_multisig_address_entry_html_acc3b892bc16139d8d1e72aa9957f7d52"><div class="ttname"><a href="../../da/d39/class_multisig_address_entry.html#acc3b892bc16139d8d1e72aa9957f7d52">MultisigAddressEntry::getPubkey</a></div><div class="ttdeci">QString getPubkey()</div><div class="ttdef"><b>Definition:</b> <a href="../../d1/d84/multisigaddressentry_8cpp_source.html#l00046">multisigaddressentry.cpp:46</a></div></div>
<div class="ttc" id="class_c_base58_data_html_a7dc91af403ca02694b3247b15604e220"><div class="ttname"><a href="../../d2/d08/class_c_base58_data.html#a7dc91af403ca02694b3247b15604e220">CBase58Data::ToString</a></div><div class="ttdeci">std::string ToString() const</div><div class="ttdef"><b>Definition:</b> <a href="../../db/d9c/base58_8cpp_source.html#l00181">base58.cpp:181</a></div></div>
<div class="ttc" id="class_address_book_page_html_a0a8f8e590dc6f18e829fde039f984464a3591dbaa5496b5791059d7df5d293a1c"><div class="ttname"><a href="../../d3/d4a/class_address_book_page.html#a0a8f8e590dc6f18e829fde039f984464a3591dbaa5496b5791059d7df5d293a1c">AddressBookPage::ForSending</a></div><div class="ttdoc">Open address book to pick address for sending. </div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d95/addressbookpage_8h_source.html#l00033">addressbookpage.h:33</a></div></div>
<div class="ttc" id="class_multisig_address_entry_html_a0f4988f12e0204810cad732e0e3a2ff7"><div class="ttname"><a href="../../da/d39/class_multisig_address_entry.html#a0f4988f12e0204810cad732e0e3a2ff7">MultisigAddressEntry::on_deleteButton_clicked</a></div><div class="ttdeci">void on_deleteButton_clicked()</div><div class="ttdef"><b>Definition:</b> <a href="../../d1/d84/multisigaddressentry_8cpp_source.html#l00061">multisigaddressentry.cpp:61</a></div></div>
<div class="ttc" id="base58_8h_html"><div class="ttname"><a href="../../d8/d53/base58_8h.html">base58.h</a></div></div>
<div class="ttc" id="class_wallet_model_html_abe0b4462654768f301d1f758f7907ca2"><div class="ttname"><a href="../../d4/d27/class_wallet_model.html#abe0b4462654768f301d1f758f7907ca2">WalletModel::getPubKey</a></div><div class="ttdeci">bool getPubKey(const CKeyID &address, CPubKey &vchPubKeyOut) const</div><div class="ttdef"><b>Definition:</b> <a href="../../d8/d9b/walletmodel_8cpp_source.html#l00789">walletmodel.cpp:789</a></div></div>
<div class="ttc" id="guiutil_8h_html"><div class="ttname"><a href="../../d6/d23/guiutil_8h.html">guiutil.h</a></div></div>
<div class="ttc" id="class_multisig_address_entry_html_a7295034dd8091350713b58dd35ca664f"><div class="ttname"><a href="../../da/d39/class_multisig_address_entry.html#a7295034dd8091350713b58dd35ca664f">MultisigAddressEntry::~MultisigAddressEntry</a></div><div class="ttdeci">~MultisigAddressEntry()</div><div class="ttdef"><b>Definition:</b> <a href="../../d1/d84/multisigaddressentry_8cpp_source.html#l00022">multisigaddressentry.cpp:22</a></div></div>
<div class="ttc" id="class_c_pub_key_html"><div class="ttname"><a href="../../da/d4e/class_c_pub_key.html">CPubKey</a></div><div class="ttdoc">An encapsulated public key. </div><div class="ttdef"><b>Definition:</b> <a href="../../d4/daf/pubkey_8h_source.html#l00043">pubkey.h:43</a></div></div>
<div class="ttc" id="class_address_table_model_html_afcdbfc17ac480f5a57382cbcf096ccb3"><div class="ttname"><a href="../../d9/ded/class_address_table_model.html#afcdbfc17ac480f5a57382cbcf096ccb3">AddressTableModel::labelForAddress</a></div><div class="ttdeci">QString labelForAddress(const QString &address) const</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d2a/addresstablemodel_8cpp_source.html#l00469">addresstablemodel.cpp:469</a></div></div>
<div class="ttc" id="class_multisig_address_entry_html_abf6baee387881cc197585485d430410e"><div class="ttname"><a href="../../da/d39/class_multisig_address_entry.html#abf6baee387881cc197585485d430410e">MultisigAddressEntry::removeEntry</a></div><div class="ttdeci">void removeEntry(MultisigAddressEntry *entry)</div></div>
<div class="ttc" id="class_c_ion_address_html"><div class="ttname"><a href="../../d1/de4/class_c_ion_address.html">CIonAddress</a></div><div class="ttdoc">base58-encoded Ion addresses. </div><div class="ttdef"><b>Definition:</b> <a href="../../d8/d53/base58_8h_source.html#l00101">base58.h:101</a></div></div>
<div class="ttc" id="class_address_book_page_html"><div class="ttname"><a href="../../d3/d4a/class_address_book_page.html">AddressBookPage</a></div><div class="ttdoc">Widget that shows a list of sending or receiving addresses. </div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d95/addressbookpage_8h_source.html#l00022">addressbookpage.h:22</a></div></div>
<div class="ttc" id="addressbookpage_8h_html"><div class="ttname"><a href="../../d5/d95/addressbookpage_8h.html">addressbookpage.h</a></div></div>
<div class="ttc" id="class_c_pub_key_html_a0901f7361c4e539dd6d35c79d0db3f89"><div class="ttname"><a href="../../da/d4e/class_c_pub_key.html#a0901f7361c4e539dd6d35c79d0db3f89">CPubKey::Raw</a></div><div class="ttdeci">std::vector< unsigned char > Raw() const</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/daf/pubkey_8h_source.html#l00175">pubkey.h:175</a></div></div>
<div class="ttc" id="class_address_book_page_html_a7ef3cf6c3e4613894af313a05335dbe3ac0029a5d46e35919fb2df9c4f370e8a9"><div class="ttname"><a href="../../d3/d4a/class_address_book_page.html#a7ef3cf6c3e4613894af313a05335dbe3ac0029a5d46e35919fb2df9c4f370e8a9">AddressBookPage::ReceivingTab</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d95/addressbookpage_8h_source.html#l00029">addressbookpage.h:29</a></div></div>
<div class="ttc" id="class_multisig_address_entry_html_a79381bb67358d5844120953a5889ec22"><div class="ttname"><a href="../../da/d39/class_multisig_address_entry.html#a79381bb67358d5844120953a5889ec22">MultisigAddressEntry::setRemoveEnabled</a></div><div class="ttdeci">void setRemoveEnabled(bool enabled)</div><div class="ttdef"><b>Definition:</b> <a href="../../d1/d84/multisigaddressentry_8cpp_source.html#l00051">multisigaddressentry.cpp:51</a></div></div>
<div class="ttc" id="class_wallet_model_html"><div class="ttname"><a href="../../d4/d27/class_wallet_model.html">WalletModel</a></div><div class="ttdoc">Interface to Ion wallet from Qt view code. </div><div class="ttdef"><b>Definition:</b> <a href="../../d6/d2d/walletmodel_8h_source.html#l00091">walletmodel.h:91</a></div></div>
<div class="ttc" id="class_multisig_address_entry_html_a696dd8fff276ea50f7b57622fe8753e5"><div class="ttname"><a href="../../da/d39/class_multisig_address_entry.html#a696dd8fff276ea50f7b57622fe8753e5">MultisigAddressEntry::model</a></div><div class="ttdeci">WalletModel * model</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/d22/multisigaddressentry_8h_source.html#l00034">multisigaddressentry.h:34</a></div></div>
<div class="ttc" id="class_c_key_i_d_html"><div class="ttname"><a href="../../dd/d88/class_c_key_i_d.html">CKeyID</a></div><div class="ttdoc">secp256k1: const unsigned int PRIVATE_KEY_SIZE = 279; const unsigned int PUBLIC_KEY_SIZE = 65; const ...</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/daf/pubkey_8h_source.html#l00027">pubkey.h:27</a></div></div>
<div class="ttc" id="addresstablemodel_8h_html"><div class="ttname"><a href="../../d3/dab/addresstablemodel_8h.html">addresstablemodel.h</a></div></div>
<div class="ttc" id="class_multisig_address_entry_html_a8325b202ad0045c1d1a37a8f73d6963d"><div class="ttname"><a href="../../da/d39/class_multisig_address_entry.html#a8325b202ad0045c1d1a37a8f73d6963d">MultisigAddressEntry::clear</a></div><div class="ttdeci">void clear()</div><div class="ttdef"><b>Definition:</b> <a href="../../d1/d84/multisigaddressentry_8cpp_source.html#l00033">multisigaddressentry.cpp:33</a></div></div>
<div class="ttc" id="class_multisig_address_entry_html_ab1d0ae8a8d3f9d1678ae621f9ccbeb6c"><div class="ttname"><a href="../../da/d39/class_multisig_address_entry.html#ab1d0ae8a8d3f9d1678ae621f9ccbeb6c">MultisigAddressEntry::setModel</a></div><div class="ttdeci">void setModel(WalletModel *model)</div><div class="ttdef"><b>Definition:</b> <a href="../../d1/d84/multisigaddressentry_8cpp_source.html#l00027">multisigaddressentry.cpp:27</a></div></div>
<div class="ttc" id="key_8h_html"><div class="ttname"><a href="../../de/de5/key_8h.html">key.h</a></div></div>
<div class="ttc" id="util_8h_html_ace13a819ca4e98c22847d26b3b357e75"><div class="ttname"><a href="../../d8/d3c/util_8h.html#ace13a819ca4e98c22847d26b3b357e75">HexStr</a></div><div class="ttdeci">std::string HexStr(const T itbegin, const T itend, bool fSpaces=false)</div><div class="ttdef"><b>Definition:</b> <a href="../../d8/d3c/util_8h_source.html#l00343">util.h:343</a></div></div>
<div class="ttc" id="class_multisig_address_entry_html"><div class="ttname"><a href="../../da/d39/class_multisig_address_entry.html">MultisigAddressEntry</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d6/d22/multisigaddressentry_8h_source.html#l00014">multisigaddressentry.h:14</a></div></div>
<div class="ttc" id="util_8cpp_html_abea395175fbc4a788ed0f0a41710b8a7"><div class="ttname"><a href="../../df/d2d/util_8cpp.html#abea395175fbc4a788ed0f0a41710b8a7">ParseHex</a></div><div class="ttdeci">vector< unsigned char > ParseHex(const char *psz)</div><div class="ttdef"><b>Definition:</b> <a href="../../df/d2d/util_8cpp_source.html#l00456">util.cpp:456</a></div></div>
<div class="ttc" id="class_multisig_address_entry_html_aa2e51b99443b1e37725f7d1fd7b69ff4"><div class="ttname"><a href="../../da/d39/class_multisig_address_entry.html#aa2e51b99443b1e37725f7d1fd7b69ff4">MultisigAddressEntry::on_pasteButton_clicked</a></div><div class="ttdeci">void on_pasteButton_clicked()</div><div class="ttdef"><b>Definition:</b> <a href="../../d1/d84/multisigaddressentry_8cpp_source.html#l00056">multisigaddressentry.cpp:56</a></div></div>
<div class="ttc" id="class_address_book_page_html_a4f6d802c63539ac335b138cca0b913d2"><div class="ttname"><a href="../../d3/d4a/class_address_book_page.html#a4f6d802c63539ac335b138cca0b913d2">AddressBookPage::getReturnValue</a></div><div class="ttdeci">const QString & getReturnValue() const</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d95/addressbookpage_8h_source.html#l00042">addressbookpage.h:42</a></div></div>
<div class="ttc" id="class_multisig_address_entry_html_ad61ba25707a03b291f79b8d72ced5572"><div class="ttname"><a href="../../da/d39/class_multisig_address_entry.html#ad61ba25707a03b291f79b8d72ced5572">MultisigAddressEntry::ui</a></div><div class="ttdeci">Ui::MultisigAddressEntry * ui</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/d22/multisigaddressentry_8h_source.html#l00033">multisigaddressentry.h:33</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Jun 25 2017 19:20:51 for 🗺️Ion Core Wallet CE ©️ 👒 by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
| 339.357724 | 23,609 | 0.715028 |
2d745a7a1de85421b83385808bde82eef8e3c459 | 4,039 | asm | Assembly | 2. Big Number Multiplicative/2. Big Number Multiplicative/Source.asm | ShinoharaYuuyoru/Assembly-Language-Project | 968d1650f361493677cccbd2925ae8c24858b092 | [
"MIT"
] | null | null | null | 2. Big Number Multiplicative/2. Big Number Multiplicative/Source.asm | ShinoharaYuuyoru/Assembly-Language-Project | 968d1650f361493677cccbd2925ae8c24858b092 | [
"MIT"
] | null | null | null | 2. Big Number Multiplicative/2. Big Number Multiplicative/Source.asm | ShinoharaYuuyoru/Assembly-Language-Project | 968d1650f361493677cccbd2925ae8c24858b092 | [
"MIT"
] | 1 | 2019-06-20T06:48:59.000Z | 2019-06-20T06:48:59.000Z | .386
.model flat, stdcall
;include msvcrt.inc
includelib msvcrt.lib
scanf PROTO C :dword, :vararg
printf PROTO C :dword, :vararg
.data
szFmt db '%s', 0
szOut db '%s', 0ah, 0
FirNumM db 'Please input the first number:'
FirNum db 255 dup(0)
FirNumC db 0
FirNumP dd 0
SecNumM db 'Please input the Second number:'
SecNum db 255 dup(0)
SecNumC db 0
SecNumP dd 0
Result db 65535 dup(0)
ResultC dd 0
CutIn dd 0
OutputP dd 65534
OutCha db '%c', 0
OutEnt db 0ah, 0
.code
Check PROC
;First String Change
mov AL, [FirNum] ;EAX is Chara
mov EBX, offset FirNum ;EBX is Addr
mov CL, 0 ;Counter
.while AL != 0
sub AL, 48 ;-48
mov [EBX], AL ;Save
inc EBX ;Point to Next
mov AL, [EBX] ;Read next Num
inc CL ;Counter++
.endw
dec EBX
mov FirNumP, EBX
mov FirNumC, CL
;Second String Change
mov AL, [SecNum] ;EAX is Chara
mov EBX, offset SecNum ;EBX is Addr
mov CL, 0 ;Counter
.while AL != 0
sub AL, 48 ;-48
mov [EBX], AL ;Save
inc EBX ;Point to Next
mov AL, [EBX] ;Read next Num
inc CL ;Counter++
.endw
dec EBX
mov SecNumP, EBX
mov SecNumC, CL
ret
Check ENDP
Calculate PROC
mov ECX, offset SecNum
mov EDX, SecNumP
.while EDX >= ECX
mov BL, [EDX] ;BL is the multiplicative number.
push ECX
push EDX
mov ECX, offset FirNum
mov EDX, FirNumP
.while EDX >= ECX ;ECX EDX in use
push EBX
mov AL, [EDX] ;AX in use.
mul BL
cbw ;Convert Byte to Word
mov BL, 10
div BL ;The result number is in AL, and the ADD Number to next is in AH
push EDX
push ECX
mov ECX, offset Result ;ECX is the base addr of Result
mov EDX, CutIn
inc EDX
mov CutIn, EDX
dec EDX
add ECX, EDX ;ECX is now timing addr of Result
push EDX
push EBX
mov BL, [ECX] ;BL is the one of the Number of Result
push EAX
push ECX
mov AL, AH
add BL, AL ;Add this time'm result number and Result Number
.while 1 ;Confirm the next ADD Number and add them, and record final number.
.if BL > 9
sub BL, 10
mov [ECX], BL
inc ECX
mov BL, [ECX]
inc BL
.else
mov [ECX], BL
.break
.endif
.endw
pop ECX
pop EAX
inc ECX ;Point to next Result Number
mov BL, [ECX] ;Add Result Number and this time's add number.
push EAX
push ECX
add BL, AL
.while 1 ;Confirm the next ADD Number and add them, and record final number.
.if BL > 9
sub BL, 10
mov [ECX], BL
inc ECX
mov BL, [ECX]
inc BL
.else
mov [ECX], BL
.break
.endif
.endw
pop ECX
pop EAX
pop EBX
pop EDX
pop ECX
pop EDX
dec EDX
pop EBX
.endw
mov EDX, ResultC
inc EDX
mov CutIn, EDX ;Set next position of Result Number, and ready to use in next ADD
mov ResultC, EDX ;Counter++
pop EDX
pop ECX
dec EDX
.endw
ret
Calculate ENDP
Output PROC
mov EAX, offset Result
mov EBX, OutputP
add EAX, EBX
mov CL, [EAX]
mov EBX, offset Result ;Get Position of the first number of Result Number
.while CL == 0
dec EAX
mov CL, [EAX]
.if EAX < EBX
mov EAX, EBX
.break
.endif
.endw
mov EDX, offset Result
.while EAX >= EDX ;print
mov BL, [EAX]
add BL, 48
mov [EAX], BL
push EAX
push EBX
push ECX
push EDX
invoke printf, addr OutCha, BL
pop EDX
pop ECX
pop EBX
pop EAX
dec EAX
.endw
invoke printf, addr OutEnt
ret
Output ENDP
start PROC
invoke printf, addr szOut, addr FirNumM
invoke scanf, addr szFmt, addr FirNum
;invoke printf, addr szOut, addr FirNum
invoke printf, addr szOut, addr SecNumM
invoke scanf, addr szFmt, addr SecNum
;invoke printf, addr szOut, addr SecNum
invoke Check
invoke Calculate
invoke Output
ret
start ENDP
end start | 18.962441 | 88 | 0.592473 |
7cebe37f9eac619d60614781a00aa8b353749c80 | 1,650 | asm | Assembly | nv_c64_util_macs.asm | nealvis/nv_c64_util | 29727af8d7b77445cff4ce9c66162ce28a0f54a0 | [
"MIT"
] | null | null | null | nv_c64_util_macs.asm | nealvis/nv_c64_util | 29727af8d7b77445cff4ce9c66162ce28a0f54a0 | [
"MIT"
] | null | null | null | nv_c64_util_macs.asm | nealvis/nv_c64_util | 29727af8d7b77445cff4ce9c66162ce28a0f54a0 | [
"MIT"
] | null | null | null | //////////////////////////////////////////////////////////////////////////////
//nv_c64_util_macs.asm
// Copyright(c) 2021 Neal Smith.
// License: MIT. See LICENSE file in root directory.
//////////////////////////////////////////////////////////////////////////////
// includes all the non code generating files of nv_c64_utils.
// this is only things like macros and const definitions, no
// data or actual code.
#importonce
// verify that the nv_c64_util_data.asm file is imported some where
// because the _macs.asm files will depend on this.
#if !NV_C64_UTIL_DATA
.error "Error - nv_c64_util_macs.asm: NV_C64_UTIL_DATA not defined. Import nv_c64_util_data.asm"
#endif
// the #if above doesn't seem to always work so..
// if data hasn't been imported yet, import it into default location
#importif !NV_C64_UTIL_DATA "nv_c64_util_default_data.asm"
// Import all the _macs.asm files here. They will not generate any
// code or data just by importing them, but will make the macros
// available to use
#import "nv_processor_status_macs.asm"
#import "nv_branch16_macs.asm"
#import "nv_branch8_macs.asm"
#import "nv_color_macs.asm"
#import "nv_debug_macs.asm"
#import "nv_joystick_macs.asm"
#import "nv_math8_macs.asm"
#import "nv_math16_macs.asm"
#import "nv_pointer_macs.asm"
#import "nv_screen_macs.asm"
#import "nv_sprite_extra_macs.asm"
#import "nv_sprite_macs.asm"
#import "nv_sprite_raw_macs.asm"
#import "nv_sprite_raw_collisions_macs.asm"
#import "nv_keyboard_macs.asm"
#import "nv_rand_macs.asm"
#import "nv_state_saver_macs.asm"
#import "nv_screen_rect_macs.asm"
#import "nv_stream_processor_macs.asm"
#import "nv_keyboard_const.asm"
| 36.666667 | 97 | 0.711515 |
92b5f76cb32c81412cf378ac5631a784da97b06b | 4,873 | h | C | src/simulation/collision_detection/broad/BoundingVolumeHierarchy.h | danielroth1/CAE | 7eaa096e45fd32f55bd6de94c30dcf706c6f2093 | [
"MIT"
] | 5 | 2019-04-20T17:48:10.000Z | 2022-01-06T01:39:33.000Z | src/simulation/collision_detection/broad/BoundingVolumeHierarchy.h | danielroth1/CAE | 7eaa096e45fd32f55bd6de94c30dcf706c6f2093 | [
"MIT"
] | null | null | null | src/simulation/collision_detection/broad/BoundingVolumeHierarchy.h | danielroth1/CAE | 7eaa096e45fd32f55bd6de94c30dcf706c6f2093 | [
"MIT"
] | 2 | 2020-08-04T20:21:00.000Z | 2022-03-16T15:01:04.000Z | #ifndef BOUNDINGVOLUMEHIERARCHY_H
#define BOUNDINGVOLUMEHIERARCHY_H
#include "BoundingVolume.h"
#include "BVChildrenData.h"
#include "BVLeafData.h"
#include "BVHCore.h"
#include <boost/functional/hash.hpp>
#include <data_structures/OptimizedStack.h>
#include <data_structures/tree/Tree.h>
#include <memory>
#include <unordered_set>
class Collider;
class CollisionObject;
class MeshInterpolatorFEM;
class AbstractPolygon;
class Polygon2DAccessor;
class SimulationObject;
class BoundingVolumeHierarchy : public Tree<BVChildrenData*, BVLeafData*>
{
public:
typedef std::tuple<SimulationObject*, ID, SimulationObject*, ID> CollisionTuple;
typedef std::unordered_set<CollisionTuple, boost::hash<CollisionTuple>> CollisionTupleSet;
BoundingVolumeHierarchy(SimulationObject* so,
AbstractPolygon* mPolygon,
const std::shared_ptr<MeshInterpolatorFEM>& interpolator,
const std::vector<std::shared_ptr<CollisionObject>>& collisionObjects,
BoundingVolume::Type bvType,
double collisionMargin);
virtual void initialize() = 0;
// Updates the bounding volume hierarchy.
virtual void udpate() = 0;
// Updates the polygon and the mesh interpolator if its there. Does not
// notify the polygons listeners and only updates the positions and
// face normals because those are needed for collision detection.
void updateGeometries();
// Prints the tree to the console.
// For each node the number of leaf nodes are printed as well.
// \return the number of children.
void print();
int calculateNumberOfNodes();
// Cheacks if bounding volumes of this hierarcy collide with
// bounding volumes of the given hierarchy.
// If there are collisions, collider.collides(CollisionObject* co, CollisionObject* co)
// is called.
virtual bool collides(
BoundingVolumeHierarchy* hierarchy,
Collider& collider,
int runId,
const CollisionTupleSet& ignoreFeatures);
// Iterative check for collisions.
bool collidesIterative(
BoundingVolumeHierarchy* hierarchy,
int runId,
const CollisionTupleSet& ignoreFeatures);
// Recursive check for collisions.
//
// Dispatches node2, calling either
// collides(BVHNode*, BVHChildrenNode*) or
// collides(BVHNode*, BVHLeafNode*)
bool collides(BVHNode* node1, BVHNode* node2)
{
if (node1->isLeaf() && node2->isLeaf())
{
return collides(static_cast<BVHLeafNode*>(node1), static_cast<BVHLeafNode*>(node2));
}
else if (!node1->isLeaf() && node2->isLeaf())
{
return collides(static_cast<BVHChildrenNode*>(node1), static_cast<BVHLeafNode*>(node2));
}
else if (node1->isLeaf() && !node2->isLeaf())
{
return collides(static_cast<BVHChildrenNode*>(node2), static_cast<BVHLeafNode*>(node1));
}
else
{
return collides(static_cast<BVHChildrenNode*>(node1), static_cast<BVHChildrenNode*>(node2));
}
}
// Dispatches node, calling either
// collides(BVHChildrenNode*, LeafNode*) or
// collides(BVHLeafNode*, LeafNode*)
bool collides(BVHNode* node, BVHLeafNode* leafNode);
// Implements part B
bool collides(BVHNode* node, BVHChildrenNode* childrenNode);
// Implements part A
bool collides(BVHChildrenNode* childrenNode, BVHLeafNode* leafNode);
// Implements part C
bool collides(BVHLeafNode* leafNode1, BVHLeafNode* leafNode2);
BoundingVolume::Type getBoundingVolumeType() const;
void setCollisionMargin(double collisionMargin);
double getCollisionMargin() const;
AbstractPolygon* getPolygon() const;
SimulationObject* getSimulationObject() const;
MeshInterpolatorFEM* getInterpolator() const;
protected:
AbstractPolygon* mPolygon;
SimulationObject* mSimulationObject;
std::shared_ptr<MeshInterpolatorFEM> mInterpolator;
std::vector<std::shared_ptr<CollisionObject>> mCollisionObjects;
double mCollisionMargin;
private:
struct StackElement
{
StackElement()
: node1(nullptr)
, node2(nullptr)
{
}
StackElement(BVHNode* _node1, BVHNode* _node2)
: node1(_node1)
, node2(_node2)
{
}
BVHNode* node1;
BVHNode* node2;
};
// only valid for the duration of a call of
// collides(BoundingVolumeHierarchy* hierarchy, Collider& collider)
Collider* mCollider;
BoundingVolume::Type mBvType;
OptimizedStack<StackElement> mStack; // For iterative collision call.
std::shared_ptr<Polygon2DAccessor> mAccessor;
};
#endif // BOUNDINGVOLUMEHIERARCHY_H
| 30.267081 | 104 | 0.670224 |
5001cf4bab18485e9951af1f81208a8c301493f1 | 273 | lua | Lua | modules/constants.lua | rogez/missiles-encounters | fe4a82d6d69d45ef28b80461fae4e56793ef4ee3 | [
"MIT"
] | null | null | null | modules/constants.lua | rogez/missiles-encounters | fe4a82d6d69d45ef28b80461fae4e56793ef4ee3 | [
"MIT"
] | null | null | null | modules/constants.lua | rogez/missiles-encounters | fe4a82d6d69d45ef28b80461fae4e56793ef4ee3 | [
"MIT"
] | null | null | null | GAME_VERSION = "1.0.5"
COPY_YEARS = "2017-2019"
-- ETATS DU JEU
START_LOAD = 1
START = 2
MAIN_MENU_LOAD = 11
MAIN_MENU = 12
STAGE_LOAD = 21
STAGE = 22
PAUSE_LOAD = 51
PAUSE = 52
GAME_OVER_LOAD = 91
GAME_OVER = 92
| 18.2 | 24 | 0.556777 |
cf2d01762c6c35552af5041f00375fdb48201b9c | 5,934 | css | CSS | web/fonts/flaticon.css | MarwenXCode/Sante | 8ef245333397a97cf6274513de92c7a989748e64 | [
"MIT"
] | null | null | null | web/fonts/flaticon.css | MarwenXCode/Sante | 8ef245333397a97cf6274513de92c7a989748e64 | [
"MIT"
] | null | null | null | web/fonts/flaticon.css | MarwenXCode/Sante | 8ef245333397a97cf6274513de92c7a989748e64 | [
"MIT"
] | null | null | null | /*
Flaticon icon font: Flaticon
Creation date: 22/06/2016 15:20
*/
@font-face {
font-family: "Flaticon";
src: url("Flaticon.eot");
src: url("Flaticond41d.eot?#iefix") format("embedded-opentype"),
url("Flaticon.woff") format("woff"),
url("Flaticon.ttf") format("truetype"),
url("Flaticon.svg#Flaticon") format("svg");
font-weight: normal;
font-style: normal;
}
@media screen and (-webkit-min-device-pixel-ratio:0) {
@font-face {
font-family: "Flaticon";
src: url("Flaticon.svg#Flaticon") format("svg");
}
}
[class^="flaticon-"]:before, [class*=" flaticon-"]:before,
[class^="flaticon-"]:after, [class*=" flaticon-"]:after {
font-family: Flaticon;
font-size: 20px;
font-style: normal;
margin-left: 20px;
}
.flaticon-back-side-of-legs:before { content: "\f100"; }
.flaticon-basophil:before { content: "\f101"; }
.flaticon-big-cellule:before { content: "\f102"; }
.flaticon-big-lips:before { content: "\f103"; }
.flaticon-big-moustache:before { content: "\f104"; }
.flaticon-big-nose:before { content: "\f105"; }
.flaticon-bladder:before { content: "\f106"; }
.flaticon-blood-supply-system:before { content: "\f107"; }
.flaticon-blood-transfusion:before { content: "\f108"; }
.flaticon-blood-vessel:before { content: "\f109"; }
.flaticon-bones-joint:before { content: "\f10a"; }
.flaticon-broken-bone:before { content: "\f10b"; }
.flaticon-bronchioles:before { content: "\f10c"; }
.flaticon-cellulite:before { content: "\f10d"; }
.flaticon-cone-cell:before { content: "\f10e"; }
.flaticon-digestive-system:before { content: "\f10f"; }
.flaticon-dishes-stack:before { content: "\f110"; }
.flaticon-dna-sequence:before { content: "\f111"; }
.flaticon-eyeball-structure:before { content: "\f112"; }
.flaticon-female-hair:before { content: "\f113"; }
.flaticon-female-pubis:before { content: "\f114"; }
.flaticon-female-trunk:before { content: "\f115"; }
.flaticon-fertilization:before { content: "\f116"; }
.flaticon-foot-bones:before { content: "\f117"; }
.flaticon-gallbladder:before { content: "\f118"; }
.flaticon-hand-bones:before { content: "\f119"; }
.flaticon-hand-palm:before { content: "\f11a"; }
.flaticon-hip-bone:before { content: "\f11b"; }
.flaticon-human-abdomen:before { content: "\f11c"; }
.flaticon-human-ankle:before { content: "\f11d"; }
.flaticon-human-artery:before { content: "\f11e"; }
.flaticon-human-body-side:before { content: "\f11f"; }
.flaticon-human-bone:before { content: "\f120"; }
.flaticon-human-brain:before { content: "\f121"; }
.flaticon-human-breast:before { content: "\f122"; }
.flaticon-human-buttocks:before { content: "\f123"; }
.flaticon-human-cerebellum:before { content: "\f124"; }
.flaticon-human-ear:before { content: "\f125"; }
.flaticon-human-eye:before { content: "\f126"; }
.flaticon-human-eyebrow:before { content: "\f127"; }
.flaticon-human-fetus:before { content: "\f128"; }
.flaticon-human-finger:before { content: "\f129"; }
.flaticon-human-fingerprint:before { content: "\f12a"; }
.flaticon-human-foot:before { content: "\f12b"; }
.flaticon-human-head:before { content: "\f12c"; }
.flaticon-human-heart:before { content: "\f12d"; }
.flaticon-human-hip:before { content: "\f12e"; }
.flaticon-human-lips:before { content: "\f12f"; }
.flaticon-human-liver:before { content: "\f130"; }
.flaticon-human-lungs:before { content: "\f131"; }
.flaticon-human-muscle:before { content: "\f132"; }
.flaticon-human-neck:before { content: "\f133"; }
.flaticon-human-nostril:before { content: "\f134"; }
.flaticon-human-ribs:before { content: "\f135"; }
.flaticon-human-skin:before { content: "\f136"; }
.flaticon-human-skull:before { content: "\f137"; }
.flaticon-human-spine:before { content: "\f138"; }
.flaticon-human-spleen:before { content: "\f139"; }
.flaticon-human-teeth:before { content: "\f13a"; }
.flaticon-human-toe:before { content: "\f13b"; }
.flaticon-human-trachea:before { content: "\f13c"; }
.flaticon-human-uterus:before { content: "\f13d"; }
.flaticon-immune-system:before { content: "\f13e"; }
.flaticon-large-intestine:before { content: "\f13f"; }
.flaticon-long-nail:before { content: "\f140"; }
.flaticon-lymphonodus:before { content: "\f141"; }
.flaticon-masculine-chromosomes:before { content: "\f142"; }
.flaticon-men-back:before { content: "\f143"; }
.flaticon-men-beard:before { content: "\f144"; }
.flaticon-men-chest:before { content: "\f145"; }
.flaticon-men-elbow:before { content: "\f146"; }
.flaticon-men-hair:before { content: "\f147"; }
.flaticon-men-hand:before { content: "\f148"; }
.flaticon-men-knee:before { content: "\f149"; }
.flaticon-men-leg:before { content: "\f14a"; }
.flaticon-men-shoulder:before { content: "\f14b"; }
.flaticon-mouth-open:before { content: "\f14c"; }
.flaticon-mucous-membrane:before { content: "\f14d"; }
.flaticon-muscle-fiber:before { content: "\f14e"; }
.flaticon-neuron:before { content: "\f14f"; }
.flaticon-nose-side-view:before { content: "\f150"; }
.flaticon-pancreas:before { content: "\f151"; }
.flaticon-platelets:before { content: "\f152"; }
.flaticon-respiratory-system:before { content: "\f153"; }
.flaticon-rod-cell:before { content: "\f154"; }
.flaticon-skin-cells:before { content: "\f155"; }
.flaticon-skull-side-view:before { content: "\f156"; }
.flaticon-small-intestine:before { content: "\f157"; }
.flaticon-spine-bone:before { content: "\f158"; }
.flaticon-stomach-with-liquids:before { content: "\f159"; }
.flaticon-three-bacteria:before { content: "\f15a"; }
.flaticon-thyroid:before { content: "\f15b"; }
.flaticon-tongue-and-mouth:before { content: "\f15c"; }
.flaticon-tonsil:before { content: "\f15d"; }
.flaticon-tooth-and-gums:before { content: "\f15e"; }
.flaticon-two-kidneys:before { content: "\f15f"; }
.flaticon-two-spermatozoon:before { content: "\f160"; }
.flaticon-white-blood-cell:before { content: "\f161"; }
.flaticon-woman-pregnant:before { content: "\f162"; }
.flaticon-women-eyelashes:before { content: "\f163"; } | 45.29771 | 66 | 0.682508 |
eba463a2a4c567523f44a54f5da53dd8ced78eb7 | 8,511 | swift | Swift | RChat-iOS/Misc/PresenceManager.swift | dhmspector/rchat | 57bfa5d59f74bb29638087a5d50a3fff817e6b2a | [
"Apache-2.0"
] | 19 | 2017-03-16T13:30:27.000Z | 2020-06-03T17:01:11.000Z | RChat-iOS/Misc/PresenceManager.swift | dhmspector/rchat | 57bfa5d59f74bb29638087a5d50a3fff817e6b2a | [
"Apache-2.0"
] | 1 | 2022-03-13T20:13:07.000Z | 2022-03-13T20:13:07.000Z | RChat-iOS/Misc/PresenceManager.swift | isabella232/roc-ios | 57bfa5d59f74bb29638087a5d50a3fff817e6b2a | [
"Apache-2.0"
] | 5 | 2017-12-05T07:38:43.000Z | 2022-03-13T20:11:44.000Z | ////////////////////////////////////////////////////////////////////////////
//
// Copyright 2016 Realm 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.
//
////////////////////////////////////////////////////////////////////////////
// This is a little ugly,but CLLocationManager needs both permissions to run (i.e. get the user's locaton),
// and updates its data asynchronously which makes it very unpredictable to use from a lot of classes.
//
// In general this app only needs approximate locations and only needs them to either update map objects
// or update location objects which drive the overall app's presence reporting mechanism.
//
// Rather than pass around a reference to the CLLocation manager and have to keep resetting it's delegate, this tiny
// singleton is provided whose sole job is to listen for postition change notications and make the last-known location
// available.
import Foundation
import UIKit
import CoreLocation
import RealmSwift
enum PresenceManagerStatus{
case notauthorized // the user hasn't allowed us to access their location
case uninitialized // user has authed, but locationmanager has yet to return 1st position
case running // we're running, will update location as necessary
case paused // for some reason cllocation has paused locaton updates (usally poor GPS signal)
case stopped // cllocation manager updates have been stopped
}
@objc class PresenceManager: NSObject, CLLocationManagerDelegate {
static let sharedInstance = PresenceManager()
var locationManager: CLLocationManager?
var currentState:PresenceManagerStatus = .uninitialized
var lastLocation: CLLocationCoordinate2D?
var lastLocationName = "" // every time we get a coordinate, reverse it to a human readable name
var lastUpdatedAt: Date?
var continuousUpdateMode = true
var updateInterval = 30 // how often we should call the delegate registered with us
var identity: String?
var tokensToSkipOnUpdate = [NotificationToken]()
override init() {
super.init()
DispatchQueue.main.async {
self.locationManager = CLLocationManager()
self.locationManager!.delegate = self
self.start(realmIdentity: nil)
}
}
// MARK: RLMLittleLocationManager Methods
// allows a caller to try to start receiving updates - only used if the user enables AllowLocation{Always|WhenInUse}
func start(realmIdentity: String?) {
let authorizationStatus = CLLocationManager.authorizationStatus()
// so this is a little belt and suspenders work here - CLLocationManager takes time
// to warm up and get locations, so we start this mamager as soon as the app starts,
// however the user might not yet be logged in. So, if we're not passed the current user's
// ID here. we see if it was set by some other controller that uses us.
if realmIdentity != nil && self.identity == nil {
self.identity = realmIdentity!
print("PresenceManager: Setting identity to \(String(describing: self.identity))")
} else {
print("PresenceManager: Starting - but identity was nil")
}
if authorizationStatus == .authorizedAlways || authorizationStatus == .authorizedWhenInUse {
locationManager?.desiredAccuracy = kCLLocationAccuracyHundredMeters
locationManager!.startUpdatingLocation()
} else {
print("continuous mode on, but not CLLocation authorization")
}
self.currentState = .running
}
// if for some odd reason you need to stop the service -- should never really be needed
// I.e., if the user goes into prefs and turns off the location permission, location updates are
// turned off automatically.)
func stop() {
if continuousUpdateMode == true {
locationManager!.stopUpdatingLocation()
}
currentState = .stopped
}
func lastKnownLocation() -> (lastLocation: CLLocationCoordinate2D?, near: String?, at: Date? ) {
// this is the default in case CLLocationManager isn't running or not allowed
if currentState == .uninitialized || currentState == .notauthorized {
return (nil, nil, nil)
}
return (lastLocation, lastLocationName, lastUpdatedAt)
}
func state() -> PresenceManagerStatus {
return self.currentState
}
// MARK: CLLocationManagerDelegate Delegates
func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) {
lastLocation = locations.last?.coordinate
lastUpdatedAt = Date()
if self.identity != nil {
// self.updatePresenceForIdentity(identity: self.identity)
} else {
print("PresenceManager: tried to update presence, but identity was nil")
}
}
internal func locationManagerDidResumeLocationUpdates(_ manager: CLLocationManager) {
lastLocation!.latitude = (manager.location?.coordinate.latitude)!
lastLocation!.longitude = (manager.location?.coordinate.longitude)!
currentState = .running
}
func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) {
print("PresenceManager: location failed with error: \(error.localizedDescription)")
}
internal func locationManagerDidPauseLocationUpdates(_ manager: CLLocationManager) {
currentState = .paused
print("PresenceManager: location updates paused at \(NSDate())")
}
@nonobjc internal func locationManager(manager: CLLocationManager, didChangeAuthorizationStatus status: CLAuthorizationStatus) {
switch status {
case .notDetermined:
currentState = .notauthorized
print ("PresenceManager: didChangeAuthorizationStatus to \(status)")
case .restricted:
print ("PresenceManager: didChangeAuthorizationStatus to \(status)")
case .denied:
print ("PresenceManager: didChangeAuthorizationStatus to \(status)")
currentState = .notauthorized
stop()
case .authorizedAlways,
.authorizedWhenInUse:
print ("PresenceManager: didChangeAuthorizationStatus to \(status)")
currentState = .running
start(realmIdentity: nil)
}
}
func reverseGeocodeForLocation(location: CLLocation) -> String {
var rv = ""
CLGeocoder().reverseGeocodeLocation(location, completionHandler: {(placemarks, error) -> Void in
if error != nil {
print("PresenceManager: Reverse geocoder failed with error - " + error!.localizedDescription)
return
}
/* - CLPlacemark field names:
name // eg. Apple Inc.
thoroughfare // street name, eg. Infinite Loop
subThoroughfare // eg. 1
locality // city, eg. Cupertino
subLocality // neighborhood, common name, eg. Mission District
administrativeArea // state, eg. CA
subAdministrativeArea // county, eg. Santa Clara
postalCode // zip code, eg. 95014
ISOcountryCode // eg. US
country // eg. United States
inlandWater // eg. Lake Tahoe
ocean // eg. Pacific Ocean
*/
if (placemarks?.count)! > 0 {
let pm = placemarks?[0]
rv = "\(String(describing: pm?.locality!)), \(String(describing: pm?.administrativeArea!)) "
}
})
return rv
}
}
| 40.722488 | 132 | 0.628481 |
664da870c38ce98728d76b2ba4a1e2715ab16fd5 | 1,065 | cpp | C++ | mission150/[TwoPointers]81. Search in Rotated Sorted Array II.cpp | alchemz/mission-peace | 59a44b1e7a8fdfdf1f6743c0e6965b49e5291326 | [
"MIT"
] | null | null | null | mission150/[TwoPointers]81. Search in Rotated Sorted Array II.cpp | alchemz/mission-peace | 59a44b1e7a8fdfdf1f6743c0e6965b49e5291326 | [
"MIT"
] | null | null | null | mission150/[TwoPointers]81. Search in Rotated Sorted Array II.cpp | alchemz/mission-peace | 59a44b1e7a8fdfdf1f6743c0e6965b49e5291326 | [
"MIT"
] | null | null | null | //当有重复数字,会存在A[mid] = A[end]的情况
//A[mid] = A[end] != target时:搜寻A[start : end-1], end--
/*
1. 先判断左边还是右边是sorted, [mid]<[right]右边,[mid]>[right]左边
2. 在sorted区间,用binary search方法找mid
*/
class Solution {
public:
bool search(vector<int>& nums, int target) {
int n=nums.size();
int left=0, right=n-1;
while(left<=right){
int mid = left+(right-left)/2;
if(nums[mid]==target) return true;
if(nums[mid]<nums[right])
{//right sorted
if(nums[mid]< target && nums[right]>=target){ //mid小了
left=mid+1;
}
else{
right=mid-1;
}
}
else if(nums[mid]>nums[right])
{//left sorted
if(nums[mid]> target && nums[left]<=target){
right=mid-1;
}else{
left=mid+1;
}
}
else{
right--;
}
}
return false;
}
}; | 28.026316 | 69 | 0.413146 |
d9c1874204ba6ae1a68beadcd08f3f30edc89691 | 1,011 | lua | Lua | prototypes/replications/aai-industry.lua | darkshadow1809/Dark-Tech | a85ea35ef87852bafdf9e4e1a39896b378ca8007 | [
"Unlicense"
] | 1 | 2020-05-29T14:23:21.000Z | 2020-05-29T14:23:21.000Z | prototypes/replications/aai-industry.lua | darkshadow1809/Dark-Tech | a85ea35ef87852bafdf9e4e1a39896b378ca8007 | [
"Unlicense"
] | null | null | null | prototypes/replications/aai-industry.lua | darkshadow1809/Dark-Tech | a85ea35ef87852bafdf9e4e1a39896b378ca8007 | [
"Unlicense"
] | 1 | 2019-03-27T01:21:21.000Z | 2019-03-27T01:21:21.000Z | --AII Industry
--New components
repltech_recipe("motor", "device2")
repltech_recipe("electric-motor", "device3")
--New usable things
repltech_recipe("concrete-wall", "chemical")
if data.raw.item["vehicle-fuel"] then
repltech_item("vehicle-fuel", "chemical", {{target = "solid-fuel", type = "item", multiplier = 3/8}, 10/27}, {{target = "solid-fuel", type = "item"}, {target = "fuel-processing", type = "tech"}}, {tier = 4})
end
--Small electric poles
replvar("raw-wood", {target = "wood", type = "item", multiplier = 2})
local wood_prereq = repl_table["small-electric-pole"].prerequisites
wood_prereq[#wood_prereq + 1] = {target = "wood", type = "item"}
repladd_recipe("small-electric-pole", "small-iron-electric-pole")
--Lower tier machines
repltech_recipe("stone-furnace", "device2")
repltech_recipe("steel-furnace", "device3")
repltech_recipe("burner-inserter", "device3")
repltech_recipe("burner-mining-drill", "device3")
repltech_recipe("burner-assembling-machine", "device3")
| 40.44 | 209 | 0.701286 |
25a722c81fa9a62a528e97f098afd7122a7c6bbe | 1,694 | swift | Swift | HiPlace/Utils/HelperViews/TextAreaView.swift | huaweicodelabs/microblog-ref-app | a48791d2faf2286bd5030f4b6d6e61c92f383784 | [
"Apache-2.0"
] | 1 | 2022-02-02T19:34:54.000Z | 2022-02-02T19:34:54.000Z | HiPlace/Utils/HelperViews/TextAreaView.swift | huaweicodelabs/microblog-ref-app | a48791d2faf2286bd5030f4b6d6e61c92f383784 | [
"Apache-2.0"
] | null | null | null | HiPlace/Utils/HelperViews/TextAreaView.swift | huaweicodelabs/microblog-ref-app | a48791d2faf2286bd5030f4b6d6e61c92f383784 | [
"Apache-2.0"
] | null | null | null | /*
**********************************************************************************
| |
| Copyright 2021. Huawei Technologies Co., Ltd. All rights reserved. |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| |
**********************************************************************************
*/
import SwiftUI
struct TextAreaView: View {
let placeholder: String
@Binding var text: String
init(placeholder:String, text: Binding<String>) {
self.placeholder = placeholder
self._text = text
UITextView.appearance().backgroundColor = .clear
}
var body: some View {
ZStack(alignment: .topLeading) {
if text.isEmpty {
Text(placeholder)
.foregroundColor(Color(.placeholderText))
.padding(.horizontal, 8)
.padding(.vertical, 12)
}
TextEditor(text: $text)
.padding(4)
}
.font(.body)
}
}
struct TextAreaView_Previews: PreviewProvider {
static var previews: some View {
TextAreaView(placeholder: "placeholder", text: .constant(""))
}
}
| 30.25 | 82 | 0.558442 |
741068168ca3102ab40562098a11e73a184f8ccc | 12,723 | h | C | dcerpc/idl_compiler/fe_pvt.h | kbore/pbis-open | a05eb9309269b6402b4d6659bc45961986ea5eab | [
"Apache-2.0"
] | 372 | 2016-10-28T10:50:35.000Z | 2022-03-18T19:54:37.000Z | dcerpc/idl_compiler/fe_pvt.h | kbore/pbis-open | a05eb9309269b6402b4d6659bc45961986ea5eab | [
"Apache-2.0"
] | 317 | 2016-11-02T17:41:48.000Z | 2021-11-08T20:28:19.000Z | dcerpc/idl_compiler/fe_pvt.h | kenferrara/pbis-open | 690c325d947b2bf6fb3032f9d660e41b94aea4be | [
"Apache-2.0"
] | 107 | 2016-11-03T19:25:16.000Z | 2022-03-20T21:15:22.000Z | /*
*
* (c) Copyright 1989 OPEN SOFTWARE FOUNDATION, INC.
* (c) Copyright 1989 HEWLETT-PACKARD COMPANY
* (c) Copyright 1989 DIGITAL EQUIPMENT CORPORATION
* To anyone who acknowledges that this file is provided "AS IS"
* without any express or implied warranty:
* permission to use, copy, modify, and distribute this
* file for any purpose is hereby granted without fee, provided that
* the above copyright notices and this notice appears in all source
* code copies, and that none of the names of Open Software
* Foundation, Inc., Hewlett-Packard Company, or Digital Equipment
* Corporation be used in advertising or publicity pertaining to
* distribution of the software without specific, written prior
* permission. Neither Open Software Foundation, Inc., Hewlett-
* Packard Company, nor Digital Equipment Corporation makes any
* representations about the suitability of this software for any
* purpose.
*
*/
/*
**
** NAME:
**
** fe_pvt.h
**
** FACILITY:
**
** Interface Definition Language (IDL) Compiler
**
** ABSTRACT:
**
** Header file containing defining front-end private data structures
** for data that is kept in the fe_info_t field of the AST nodes.
**
** VERSION: DCE 1.0
**
*/
#ifndef fe_pvth_incl
#define fe_pvth_incl
#include <nametbl.h>
/*
* The frontend structure describes information private to
* the frontend portion of the compiler.
*/
typedef enum
{
fe_bitset_info,
fe_const_info,
fe_source_only,
fe_tag_fwd_ref,
fe_clone_info,
fe_if_info,
fe_ptr_info
} fe_type_k_t;
typedef enum /* Integer constant kinds */
{
fe_int_const_k,
fe_bitset_const_k,
fe_enum_const_k
} fe_const_k_t;
typedef enum /* AST node kinds */
{
fe_interface_n_k,
fe_type_p_n_k,
fe_import_n_k,
fe_export_n_k,
fe_cpp_quote_n_k,
fe_constant_n_k,
fe_type_n_k,
fe_rep_as_n_k,
fe_array_n_k,
fe_array_index_n_k,
fe_bitset_n_k,
fe_disc_union_n_k,
fe_arm_n_k,
fe_case_label_n_k,
fe_enumeration_n_k,
fe_pipe_n_k,
fe_pointer_n_k,
fe_structure_n_k,
fe_field_n_k,
fe_field_attr_n_k,
fe_field_ref_n_k,
fe_parameter_n_k,
fe_operation_n_k,
fe_include_n_k,
fe_exception_n_k,
fe_cs_char_n_k,
fe_expression_n_k
} fe_node_k_t;
/*
* Bit names contained in fe_info flags word
*/
#define FE_SELF_POINTING 0x00000001 /* True if this type node */
/* is on the sp_types list. */
/* Needed because non self- */
/* pointing types can be on */
/* the list also */
#define FE_POINTED_AT 0x00000002 /* True if this type node */
/* is on the pa_types list */
#define FE_HAS_PTR_ARRAY 0x00000004 /* True if type contains a */
/* [ptr] array used as other*/
/* than a top-level param */
#define FE_INCOMPLETE 0x00000008 /* True if this */
/* struct/union is not yet */
/* complete due to a */
/* forward reference */
#define FE_HAS_UNIQUE_PTR 0x00000010 /* True if this type or any */
/* types it pts to have any */
/* [unique] ptrs */
#define FE_HAS_PTR 0x00000020 /* True if this type or any */
/* contained types are ptrs */
#define FE_HAS_CFMT_ARR 0x00000040 /* True if this param */
/* contains a non-top-level */
/* conformant array that is */
/* not under a full pointer */
#define FE_PROP_TYPE_DONE 0x00000080 /* True if this item has */
/* had type propagation */
/* completed */
#define FE_HAS_REF_PTR 0x00000100 /* True if this type or any */
/* types it pts to have any */
/* [ref] ptrs */
#define FE_PROP_IN_PARAM_DONE 0x00000200 /* True if this item has */
/* had [in] param */
/* propagation completed */
#define FE_HAS_REP_AS 0x00000400 /* True if this item has */
/* or contains a type with */
/* [represent_as] on it */
#define FE_OOL 0x00000800 /* True if this item has */
/* been put on the ool list */
#define FE_HAS_VAL_FLOAT 0x00001000 /* True if operation has */
/* float passed by value */
#define FE_HAS_V1_ATTR 0x00002000 /* True if type has or cts. */
/* a V1-specific attribute */
#define FE_HAS_V2_ATTR 0x00004000 /* True if type has or cts. */
/* a V2-specific attribute */
#define FE_PROP_OUT_PARAM_DONE 0x00008000 /* True if this item has */
/* had [out] param */
/* propagation completed */
#define FE_HAS_FULL_PTR 0x00010000 /* True if this type or any */
/* types it pts to have any */
/* [ref] ptrs */
#define FE_HAS_XMIT_AS 0x00020000 /* True if this item has */
/* or contains a type with */
/* [transmit_as] on it */
#define FE_HAS_CHAR 0x00040000 /* True if this item is or */
/* contains a char type */
#define FE_HAS_FLOAT 0x00080000 /* True if this item is or */
/* contains a floating type */
#define FE_HAS_INT 0x00100000 /* True if this item is or */
/* contains an integer type */
#define FE_MAYBE_WIRE_ALIGNED 0x00200000 /* True if this item's memory */
/* alignment might match NDR */
#define FE_HAS_IN_FULL_PTR 0x00400000 /* True if this operation has */
/* any [ptr] pointers in [in] */
/* or [in,out] parameters */
#define FE_USED_AS_CS_FLD_ATTR 0x00800000 /* True if this instance is */
/* used as the target of a */
/* [size_is] or [length_is] */
/* for array of [cs_char] type*/
#define FE_HAS_NF_CS_ARRAY 0x01000000 /* On a type, True if the type*/
/* contains a non-fixed array */
/* of [cs_char] type */
#define FE_FIRST_IN_NF_CS_ARR 0x01000000 /* On a param, True if it is */
/* the first [in] param in an */
/* operation containing non- */
/* fixed array of [cs_char] */
#define FE_CT_CS_CHAR 0x02000000 /* On a type, True if the type*/
/* contains, not merely is, a */
/* [cs_char] type */
#define FE_LAST_IN_NF_CS_ARR 0x02000000 /* On a param, True if it is */
/* the last [in] param in an */
/* operation containing non- */
/* fixed array of [cs_char] */
#define FE_USED_IN_TRANSMITTED 0x04000000 /* On a type, True if it is */
/* used within a transmitted */
/* type specified in a */
/* [transmit_as] attribute */
#define FE_FIRST_OUT_NF_CS_ARR 0x04000000 /* On a param, True if it is */
/* the first [out] param in an*/
/* operation containing non- */
/* fixed array of [cs_char] */
#define FE_LAST_OUT_NF_CS_ARR 0x08000000 /* On a param, True if it is */
/* the last [out] param in an */
/* operation containing non- */
/* fixed array of [cs_char] */
#define FE_USED_AS_REG_FLD_ATTR 0x10000000 /* True if this instance is */
/* used as the target of a */
/* field attribute for array */
/* of non-[cs_char] type */
/*
* Macros to set, clear, and test fe_info flags word
*/
#define FE_SET(word,bit) ((word) |= (bit))
#define FE_TEST(word,bit) (((word) & (bit)) != 0)
#define FE_CLEAR(word,bit) ((word) &= ~(bit))
/*
* Info in the AST used only by the frontend.
*/
typedef struct fe_info_t
{
struct fe_info_t *next;
struct fe_info_t *last;
fe_node_k_t node_kind; /* AST node kind */
STRTAB_str_t file;
int source_line;
STRTAB_str_t acf_file; /* ACF file for this node or NIL */
int acf_source_line; /* ACF line number or 0 if none */
fe_type_k_t fe_type_id;
union
{
int cardinal; /* For bitsets and enumerations */
fe_const_k_t const_kind; /* fe_type_id == fe_const_info */
struct AST_type_p_n_t *clone; /* fe_type_id == fe_clone_info */
int if_flags; /* fe_type_id == fe_if_info */
struct AST_type_n_t *pointer_type; /* fe_type_id == fe_ptr_info */
} type_specific;
struct AST_type_n_t *tag_ptr; /* Type node for the tag from which */
/* this type was derived. */
NAMETABLE_id_t tag_name; /* Tag name from which this type is */
/* derived. */
unsigned long int gen_index; /* Index used in gen'd names */
short int pointer_count; /* The number of pointers on a */
/* array bound reference. */
unsigned short int ref_count; /* Reference count. On a parameter, */
/* used to count occurences of 'used*/
/* as field attribute reference for */
/* an array of [cs_char] */
unsigned short int ref_count_a; /* Reference count. On a parameter, */
/* used to count occurences of 'used*/
/* as [in] [size_is] reference for */
/* an [out]-only conformant array */
/* of [cs_char]' */
unsigned long int flags; /* A bitvector of flags */
struct AST_type_n_t *original; /* Type node for a type with */
/* DEF_AS_TAG set */
} fe_info_t;
#endif
| 45.117021 | 80 | 0.445728 |
0bba1e28f68dedeccae5371afea0ac4ab68e2473 | 68,549 | py | Python | tests/examples/minlplib/waterno2_03.py | ouyang-w-19/decogo | 52546480e49776251d4d27856e18a46f40c824a1 | [
"MIT"
] | 2 | 2021-07-03T13:19:10.000Z | 2022-02-06T10:48:13.000Z | tests/examples/minlplib/waterno2_03.py | ouyang-w-19/decogo | 52546480e49776251d4d27856e18a46f40c824a1 | [
"MIT"
] | 1 | 2021-07-04T14:52:14.000Z | 2021-07-15T10:17:11.000Z | tests/examples/minlplib/waterno2_03.py | ouyang-w-19/decogo | 52546480e49776251d4d27856e18a46f40c824a1 | [
"MIT"
] | null | null | null | # MINLP written by GAMS Convert at 04/21/18 13:55:18
#
# Equation counts
# Total E G L N X C B
# 617 367 103 147 0 0 0 0
#
# Variable counts
# x b i s1s s2s sc si
# Total cont binary integer sos1 sos2 scont sint
# 499 472 27 0 0 0 0 0
# FX 6 6 0 0 0 0 0 0
#
# Nonzero counts
# Total const NL DLL
# 1636 1333 303 0
#
# Reformulation has removed 1 variable and 1 equation
from pyomo.environ import *
model = m = ConcreteModel()
m.b2 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b3 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b4 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b5 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b6 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b7 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b8 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b9 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b10 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b11 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b12 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b13 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b14 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b15 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b16 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b17 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b18 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b19 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b20 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b21 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b22 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b23 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b24 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b25 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b26 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b27 = Var(within=Binary,bounds=(0,1),initialize=0)
m.b28 = Var(within=Binary,bounds=(0,1),initialize=0)
m.x29 = Var(within=Reals,bounds=(-1000,1000),initialize=0)
m.x30 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x31 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x32 = Var(within=Reals,bounds=(-1000,1000),initialize=0)
m.x33 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x34 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x35 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x36 = Var(within=Reals,bounds=(-1000,1000),initialize=0)
m.x37 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x38 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x39 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x40 = Var(within=Reals,bounds=(-1000,1000),initialize=0)
m.x41 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x42 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x43 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x44 = Var(within=Reals,bounds=(-1000,1000),initialize=0)
m.x45 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x46 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x47 = Var(within=Reals,bounds=(-1000,1000),initialize=0)
m.x48 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x49 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x50 = Var(within=Reals,bounds=(-1000,1000),initialize=0)
m.x51 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x52 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x53 = Var(within=Reals,bounds=(-1000,1000),initialize=0)
m.x54 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x55 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x56 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x57 = Var(within=Reals,bounds=(-1000,1000),initialize=0)
m.x58 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x59 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x60 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x61 = Var(within=Reals,bounds=(-1000,1000),initialize=0)
m.x62 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x63 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x64 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x65 = Var(within=Reals,bounds=(-1000,1000),initialize=0)
m.x66 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x67 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x68 = Var(within=Reals,bounds=(-1000,1000),initialize=0)
m.x69 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x70 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x71 = Var(within=Reals,bounds=(-1000,1000),initialize=0)
m.x72 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x73 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x74 = Var(within=Reals,bounds=(-1000,1000),initialize=0)
m.x75 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x76 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x77 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x78 = Var(within=Reals,bounds=(-1000,1000),initialize=0)
m.x79 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x80 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x81 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x82 = Var(within=Reals,bounds=(-1000,1000),initialize=0)
m.x83 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x84 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x85 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x86 = Var(within=Reals,bounds=(-1000,1000),initialize=0)
m.x87 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x88 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x89 = Var(within=Reals,bounds=(-1000,1000),initialize=0)
m.x90 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x91 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x92 = Var(within=Reals,bounds=(-1000,1000),initialize=0)
m.x93 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x94 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x95 = Var(within=Reals,bounds=(0,5),initialize=0)
m.x96 = Var(within=Reals,bounds=(0,5),initialize=0)
m.x97 = Var(within=Reals,bounds=(0,5),initialize=0)
m.x98 = Var(within=Reals,bounds=(0,5),initialize=0)
m.x99 = Var(within=Reals,bounds=(0,2.4),initialize=0)
m.x100 = Var(within=Reals,bounds=(0,5),initialize=0)
m.x101 = Var(within=Reals,bounds=(0,2.4),initialize=0)
m.x102 = Var(within=Reals,bounds=(0,5),initialize=0)
m.x103 = Var(within=Reals,bounds=(0,2.4),initialize=0)
m.x104 = Var(within=Reals,bounds=(0,5),initialize=0)
m.x105 = Var(within=Reals,bounds=(0,2.4),initialize=0)
m.x106 = Var(within=Reals,bounds=(0,5),initialize=0)
m.x107 = Var(within=Reals,bounds=(0,2.4),initialize=0)
m.x108 = Var(within=Reals,bounds=(0,5),initialize=0)
m.x109 = Var(within=Reals,bounds=(0,2.4),initialize=0)
m.x110 = Var(within=Reals,bounds=(0,5),initialize=0)
m.x111 = Var(within=Reals,bounds=(0,5),initialize=0)
m.x112 = Var(within=Reals,bounds=(0,5),initialize=0)
m.x113 = Var(within=Reals,bounds=(0,5),initialize=0)
m.x114 = Var(within=Reals,bounds=(0,1.16),initialize=0)
m.x115 = Var(within=Reals,bounds=(0,5),initialize=0)
m.x116 = Var(within=Reals,bounds=(0,1.16),initialize=0)
m.x117 = Var(within=Reals,bounds=(0,5),initialize=0)
m.x118 = Var(within=Reals,bounds=(0,1.16),initialize=0)
m.x119 = Var(within=Reals,bounds=(0,5),initialize=0)
m.x120 = Var(within=Reals,bounds=(0,5),initialize=0)
m.x121 = Var(within=Reals,bounds=(0,5),initialize=0)
m.x122 = Var(within=Reals,bounds=(3.5,3.5),initialize=3.5)
m.x123 = Var(within=Reals,bounds=(2,5),initialize=2)
m.x124 = Var(within=Reals,bounds=(2,5),initialize=2)
m.x125 = Var(within=Reals,bounds=(2,5),initialize=2)
m.x126 = Var(within=Reals,bounds=(2,5),initialize=2)
m.x127 = Var(within=Reals,bounds=(2,5),initialize=2)
m.x128 = Var(within=Reals,bounds=(4.1,4.1),initialize=4.1)
m.x129 = Var(within=Reals,bounds=(2.5,5),initialize=2.5)
m.x130 = Var(within=Reals,bounds=(2.5,5),initialize=2.5)
m.x131 = Var(within=Reals,bounds=(2.5,5),initialize=2.5)
m.x132 = Var(within=Reals,bounds=(2.5,5),initialize=2.5)
m.x133 = Var(within=Reals,bounds=(2.5,5),initialize=2.5)
m.x134 = Var(within=Reals,bounds=(4,4),initialize=4)
m.x135 = Var(within=Reals,bounds=(2,6),initialize=2)
m.x136 = Var(within=Reals,bounds=(2,6),initialize=2)
m.x137 = Var(within=Reals,bounds=(2,6),initialize=2)
m.x138 = Var(within=Reals,bounds=(2,6),initialize=2)
m.x139 = Var(within=Reals,bounds=(2,6),initialize=2)
m.x140 = Var(within=Reals,bounds=(0,0.8),initialize=0)
m.x141 = Var(within=Reals,bounds=(-1000,1000),initialize=0)
m.x142 = Var(within=Reals,bounds=(0,0.8),initialize=0)
m.x143 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x144 = Var(within=Reals,bounds=(0,0.8),initialize=0)
m.x145 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x146 = Var(within=Reals,bounds=(0,0.8),initialize=0)
m.x147 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x148 = Var(within=Reals,bounds=(0,0.8),initialize=0)
m.x149 = Var(within=Reals,bounds=(-1000,1000),initialize=0)
m.x150 = Var(within=Reals,bounds=(0,0.8),initialize=0)
m.x151 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x152 = Var(within=Reals,bounds=(0,0.8),initialize=0)
m.x153 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x154 = Var(within=Reals,bounds=(0,0.8),initialize=0)
m.x155 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x156 = Var(within=Reals,bounds=(0,0.8),initialize=0)
m.x157 = Var(within=Reals,bounds=(-1000,1000),initialize=0)
m.x158 = Var(within=Reals,bounds=(0,0.5),initialize=0)
m.x159 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x160 = Var(within=Reals,bounds=(0,0.5),initialize=0)
m.x161 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x162 = Var(within=Reals,bounds=(0,0.5),initialize=0)
m.x163 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x164 = Var(within=Reals,bounds=(0,0.5),initialize=0)
m.x165 = Var(within=Reals,bounds=(-1000,1000),initialize=0)
m.x166 = Var(within=Reals,bounds=(0,0.5),initialize=0)
m.x167 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x168 = Var(within=Reals,bounds=(0,0.5),initialize=0)
m.x169 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x170 = Var(within=Reals,bounds=(0,0.7),initialize=0)
m.x171 = Var(within=Reals,bounds=(-1000,1000),initialize=0)
m.x172 = Var(within=Reals,bounds=(0,0.7),initialize=0)
m.x173 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x174 = Var(within=Reals,bounds=(0,0.7),initialize=0)
m.x175 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x176 = Var(within=Reals,bounds=(0,0.7),initialize=0)
m.x177 = Var(within=Reals,bounds=(-1000,1000),initialize=0)
m.x178 = Var(within=Reals,bounds=(0,0.7),initialize=0)
m.x179 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x180 = Var(within=Reals,bounds=(0,0.7),initialize=0)
m.x181 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x182 = Var(within=Reals,bounds=(0,0.58),initialize=0)
m.x183 = Var(within=Reals,bounds=(-1000,1000),initialize=0)
m.x184 = Var(within=Reals,bounds=(0,0.58),initialize=0)
m.x185 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x186 = Var(within=Reals,bounds=(0,0.58),initialize=0)
m.x187 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x188 = Var(within=Reals,bounds=(0,0.58),initialize=0)
m.x189 = Var(within=Reals,bounds=(-1000,1000),initialize=0)
m.x190 = Var(within=Reals,bounds=(0,0.58),initialize=0)
m.x191 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x192 = Var(within=Reals,bounds=(0,0.58),initialize=0)
m.x193 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x194 = Var(within=Reals,bounds=(62,65),initialize=62)
m.x195 = Var(within=Reals,bounds=(62,65),initialize=62)
m.x196 = Var(within=Reals,bounds=(62,65),initialize=62)
m.x197 = Var(within=Reals,bounds=(92.5,95),initialize=92.5)
m.x198 = Var(within=Reals,bounds=(92.5,95),initialize=92.5)
m.x199 = Var(within=Reals,bounds=(92.5,95),initialize=92.5)
m.x200 = Var(within=Reals,bounds=(105,109),initialize=105)
m.x201 = Var(within=Reals,bounds=(105,109),initialize=105)
m.x202 = Var(within=Reals,bounds=(105,109),initialize=105)
m.x203 = Var(within=Reals,bounds=(0,1000),initialize=0)
m.x204 = Var(within=Reals,bounds=(-125,125),initialize=0)
m.x205 = Var(within=Reals,bounds=(0,1000),initialize=0)
m.x206 = Var(within=Reals,bounds=(-125,125),initialize=0)
m.x207 = Var(within=Reals,bounds=(0,1000),initialize=0)
m.x208 = Var(within=Reals,bounds=(-125,125),initialize=0)
m.x209 = Var(within=Reals,bounds=(0,1000),initialize=0)
m.x210 = Var(within=Reals,bounds=(0,1000),initialize=0)
m.x211 = Var(within=Reals,bounds=(-100,100),initialize=0)
m.x212 = Var(within=Reals,bounds=(0,1000),initialize=0)
m.x213 = Var(within=Reals,bounds=(0,1000),initialize=0)
m.x214 = Var(within=Reals,bounds=(-100,100),initialize=0)
m.x215 = Var(within=Reals,bounds=(0,1000),initialize=0)
m.x216 = Var(within=Reals,bounds=(0,1000),initialize=0)
m.x217 = Var(within=Reals,bounds=(-100,100),initialize=0)
m.x218 = Var(within=Reals,bounds=(0,1000),initialize=0)
m.x219 = Var(within=Reals,bounds=(-125,125),initialize=0)
m.x220 = Var(within=Reals,bounds=(0,1000),initialize=0)
m.x221 = Var(within=Reals,bounds=(-125,125),initialize=0)
m.x222 = Var(within=Reals,bounds=(0,1000),initialize=0)
m.x223 = Var(within=Reals,bounds=(-125,125),initialize=0)
m.x224 = Var(within=Reals,bounds=(49,49),initialize=49)
m.x225 = Var(within=Reals,bounds=(-49,1000),initialize=0)
m.x226 = Var(within=Reals,bounds=(49,49),initialize=49)
m.x227 = Var(within=Reals,bounds=(-49,1000),initialize=0)
m.x228 = Var(within=Reals,bounds=(49,49),initialize=49)
m.x229 = Var(within=Reals,bounds=(-49,1000),initialize=0)
m.x230 = Var(within=Reals,bounds=(-65,1000),initialize=0)
m.x231 = Var(within=Reals,bounds=(-65,1000),initialize=0)
m.x232 = Var(within=Reals,bounds=(-65,1000),initialize=0)
m.x233 = Var(within=Reals,bounds=(-95,1000),initialize=0)
m.x234 = Var(within=Reals,bounds=(-95,1000),initialize=0)
m.x235 = Var(within=Reals,bounds=(-95,1000),initialize=0)
m.x236 = Var(within=Reals,bounds=(0.2,0.8),initialize=0.2)
m.x237 = Var(within=Reals,bounds=(0.2,0.8),initialize=0.2)
m.x238 = Var(within=Reals,bounds=(0.2,0.8),initialize=0.2)
m.x239 = Var(within=Reals,bounds=(0.2,0.8),initialize=0.2)
m.x240 = Var(within=Reals,bounds=(0.2,0.8),initialize=0.2)
m.x241 = Var(within=Reals,bounds=(0.2,0.8),initialize=0.2)
m.x242 = Var(within=Reals,bounds=(0.2,0.8),initialize=0.2)
m.x243 = Var(within=Reals,bounds=(0.2,0.8),initialize=0.2)
m.x244 = Var(within=Reals,bounds=(0.2,0.8),initialize=0.2)
m.x245 = Var(within=Reals,bounds=(0.25,0.5),initialize=0.25)
m.x246 = Var(within=Reals,bounds=(0.25,0.5),initialize=0.25)
m.x247 = Var(within=Reals,bounds=(0.25,0.5),initialize=0.25)
m.x248 = Var(within=Reals,bounds=(0.25,0.5),initialize=0.25)
m.x249 = Var(within=Reals,bounds=(0.25,0.5),initialize=0.25)
m.x250 = Var(within=Reals,bounds=(0.25,0.5),initialize=0.25)
m.x251 = Var(within=Reals,bounds=(0.4,0.7),initialize=0.4)
m.x252 = Var(within=Reals,bounds=(0.4,0.7),initialize=0.4)
m.x253 = Var(within=Reals,bounds=(0.4,0.7),initialize=0.4)
m.x254 = Var(within=Reals,bounds=(0.4,0.7),initialize=0.4)
m.x255 = Var(within=Reals,bounds=(0.4,0.7),initialize=0.4)
m.x256 = Var(within=Reals,bounds=(0.4,0.7),initialize=0.4)
m.x257 = Var(within=Reals,bounds=(0.24,0.58),initialize=0.24)
m.x258 = Var(within=Reals,bounds=(0.24,0.58),initialize=0.24)
m.x259 = Var(within=Reals,bounds=(0.24,0.58),initialize=0.24)
m.x260 = Var(within=Reals,bounds=(0.24,0.58),initialize=0.24)
m.x261 = Var(within=Reals,bounds=(0.24,0.58),initialize=0.24)
m.x262 = Var(within=Reals,bounds=(0.24,0.58),initialize=0.24)
m.x263 = Var(within=Reals,bounds=(0.6,1),initialize=0.6)
m.x264 = Var(within=Reals,bounds=(0.6,1),initialize=0.6)
m.x265 = Var(within=Reals,bounds=(0.6,1),initialize=0.6)
m.x266 = Var(within=Reals,bounds=(0.8,1),initialize=0.8)
m.x267 = Var(within=Reals,bounds=(0.8,1),initialize=0.8)
m.x268 = Var(within=Reals,bounds=(0.8,1),initialize=0.8)
m.x269 = Var(within=Reals,bounds=(0.85,1),initialize=0.85)
m.x270 = Var(within=Reals,bounds=(0.85,1),initialize=0.85)
m.x271 = Var(within=Reals,bounds=(0.85,1),initialize=0.85)
m.x272 = Var(within=Reals,bounds=(0.7,1),initialize=0.7)
m.x273 = Var(within=Reals,bounds=(0.7,1),initialize=0.7)
m.x274 = Var(within=Reals,bounds=(0.7,1),initialize=0.7)
m.x275 = Var(within=Reals,bounds=(100,1000),initialize=100)
m.x276 = Var(within=Reals,bounds=(100,1000),initialize=100)
m.x277 = Var(within=Reals,bounds=(100,1000),initialize=100)
m.x278 = Var(within=Reals,bounds=(0,54.1717996137183),initialize=0)
m.x279 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x280 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x281 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x282 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x283 = Var(within=Reals,bounds=(0,54.1717996137183),initialize=0)
m.x284 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x285 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x286 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x287 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x288 = Var(within=Reals,bounds=(0,54.1717996137183),initialize=0)
m.x289 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x290 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x291 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x292 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x293 = Var(within=Reals,bounds=(0,54.1717996137183),initialize=0)
m.x294 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x295 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x296 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x297 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x298 = Var(within=Reals,bounds=(0,54.1717996137183),initialize=0)
m.x299 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x300 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x301 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x302 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x303 = Var(within=Reals,bounds=(0,54.1717996137183),initialize=0)
m.x304 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x305 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x306 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x307 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x308 = Var(within=Reals,bounds=(0,54.1717996137183),initialize=0)
m.x309 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x310 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x311 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x312 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x313 = Var(within=Reals,bounds=(0,54.1717996137183),initialize=0)
m.x314 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x315 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x316 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x317 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x318 = Var(within=Reals,bounds=(0,54.1717996137183),initialize=0)
m.x319 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x320 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x321 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x322 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x323 = Var(within=Reals,bounds=(0,93.045051789432),initialize=0)
m.x324 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x325 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x326 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x327 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x328 = Var(within=Reals,bounds=(0,93.045051789432),initialize=0)
m.x329 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x330 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x331 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x332 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x333 = Var(within=Reals,bounds=(0,93.045051789432),initialize=0)
m.x334 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x335 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x336 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x337 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x338 = Var(within=Reals,bounds=(0,93.045051789432),initialize=0)
m.x339 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x340 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x341 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x342 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x343 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x344 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x345 = Var(within=Reals,bounds=(0,93.045051789432),initialize=0)
m.x346 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x347 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x348 = Var(within=Reals,bounds=(0,93.045051789432),initialize=0)
m.x349 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x350 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x351 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x352 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x353 = Var(within=Reals,bounds=(0,112.384987749469),initialize=0)
m.x354 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x355 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x356 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x357 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x358 = Var(within=Reals,bounds=(0,112.384987749469),initialize=0)
m.x359 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x360 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x361 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x362 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x363 = Var(within=Reals,bounds=(0,112.384987749469),initialize=0)
m.x364 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x365 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x366 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x367 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x368 = Var(within=Reals,bounds=(0,112.384987749469),initialize=0)
m.x369 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x370 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x371 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x372 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x373 = Var(within=Reals,bounds=(0,112.384987749469),initialize=0)
m.x374 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x375 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x376 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x377 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x378 = Var(within=Reals,bounds=(0,112.384987749469),initialize=0)
m.x379 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x380 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x381 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x382 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x383 = Var(within=Reals,bounds=(0,42.066542469172),initialize=0)
m.x384 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x385 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x386 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x387 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x388 = Var(within=Reals,bounds=(0,42.066542469172),initialize=0)
m.x389 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x390 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x391 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x392 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x393 = Var(within=Reals,bounds=(0,42.066542469172),initialize=0)
m.x394 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x395 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x396 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x397 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x398 = Var(within=Reals,bounds=(0,42.066542469172),initialize=0)
m.x399 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x400 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x401 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x402 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x403 = Var(within=Reals,bounds=(0,42.066542469172),initialize=0)
m.x404 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x405 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x406 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x407 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x408 = Var(within=Reals,bounds=(0,42.066542469172),initialize=0)
m.x409 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x410 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x411 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x412 = Var(within=Reals,bounds=(None,None),initialize=0)
m.x413 = Var(within=Reals,bounds=(0,25),initialize=0)
m.x414 = Var(within=Reals,bounds=(0,25),initialize=0)
m.x415 = Var(within=Reals,bounds=(0,25),initialize=0)
m.x416 = Var(within=Reals,bounds=(0,25),initialize=0)
m.x417 = Var(within=Reals,bounds=(0,25),initialize=0)
m.x418 = Var(within=Reals,bounds=(0,25),initialize=0)
m.x419 = Var(within=Reals,bounds=(0,25),initialize=0)
m.x420 = Var(within=Reals,bounds=(0,25),initialize=0)
m.x421 = Var(within=Reals,bounds=(0,25),initialize=0)
m.x422 = Var(within=Reals,bounds=(0,0.64),initialize=0)
m.x423 = Var(within=Reals,bounds=(0,0.512),initialize=0)
m.x424 = Var(within=Reals,bounds=(0,0.64),initialize=0)
m.x425 = Var(within=Reals,bounds=(0,0.512),initialize=0)
m.x426 = Var(within=Reals,bounds=(0,0.64),initialize=0)
m.x427 = Var(within=Reals,bounds=(0,0.512),initialize=0)
m.x428 = Var(within=Reals,bounds=(0,0.64),initialize=0)
m.x429 = Var(within=Reals,bounds=(0,0.512),initialize=0)
m.x430 = Var(within=Reals,bounds=(0,0.64),initialize=0)
m.x431 = Var(within=Reals,bounds=(0,0.512),initialize=0)
m.x432 = Var(within=Reals,bounds=(0,0.64),initialize=0)
m.x433 = Var(within=Reals,bounds=(0,0.512),initialize=0)
m.x434 = Var(within=Reals,bounds=(0,0.64),initialize=0)
m.x435 = Var(within=Reals,bounds=(0,0.512),initialize=0)
m.x436 = Var(within=Reals,bounds=(0,0.64),initialize=0)
m.x437 = Var(within=Reals,bounds=(0,0.512),initialize=0)
m.x438 = Var(within=Reals,bounds=(0,0.64),initialize=0)
m.x439 = Var(within=Reals,bounds=(0,0.512),initialize=0)
m.x440 = Var(within=Reals,bounds=(0,0.25),initialize=0)
m.x441 = Var(within=Reals,bounds=(0,0.125),initialize=0)
m.x442 = Var(within=Reals,bounds=(0,0.25),initialize=0)
m.x443 = Var(within=Reals,bounds=(0,0.125),initialize=0)
m.x444 = Var(within=Reals,bounds=(0,0.25),initialize=0)
m.x445 = Var(within=Reals,bounds=(0,0.125),initialize=0)
m.x446 = Var(within=Reals,bounds=(0,0.25),initialize=0)
m.x447 = Var(within=Reals,bounds=(0,0.125),initialize=0)
m.x448 = Var(within=Reals,bounds=(0,0.25),initialize=0)
m.x449 = Var(within=Reals,bounds=(0,0.125),initialize=0)
m.x450 = Var(within=Reals,bounds=(0,0.25),initialize=0)
m.x451 = Var(within=Reals,bounds=(0,0.125),initialize=0)
m.x452 = Var(within=Reals,bounds=(0,0.49),initialize=0)
m.x453 = Var(within=Reals,bounds=(0,0.343),initialize=0)
m.x454 = Var(within=Reals,bounds=(0,0.49),initialize=0)
m.x455 = Var(within=Reals,bounds=(0,0.343),initialize=0)
m.x456 = Var(within=Reals,bounds=(0,0.49),initialize=0)
m.x457 = Var(within=Reals,bounds=(0,0.343),initialize=0)
m.x458 = Var(within=Reals,bounds=(0,0.49),initialize=0)
m.x459 = Var(within=Reals,bounds=(0,0.343),initialize=0)
m.x460 = Var(within=Reals,bounds=(0,0.49),initialize=0)
m.x461 = Var(within=Reals,bounds=(0,0.343),initialize=0)
m.x462 = Var(within=Reals,bounds=(0,0.49),initialize=0)
m.x463 = Var(within=Reals,bounds=(0,0.343),initialize=0)
m.x464 = Var(within=Reals,bounds=(0,0.3364),initialize=0)
m.x465 = Var(within=Reals,bounds=(0,0.195112),initialize=0)
m.x466 = Var(within=Reals,bounds=(0,0.3364),initialize=0)
m.x467 = Var(within=Reals,bounds=(0,0.195112),initialize=0)
m.x468 = Var(within=Reals,bounds=(0,0.3364),initialize=0)
m.x469 = Var(within=Reals,bounds=(0,0.195112),initialize=0)
m.x470 = Var(within=Reals,bounds=(0,0.3364),initialize=0)
m.x471 = Var(within=Reals,bounds=(0,0.195112),initialize=0)
m.x472 = Var(within=Reals,bounds=(0,0.3364),initialize=0)
m.x473 = Var(within=Reals,bounds=(0,0.195112),initialize=0)
m.x474 = Var(within=Reals,bounds=(0,0.3364),initialize=0)
m.x475 = Var(within=Reals,bounds=(0,0.195112),initialize=0)
m.x476 = Var(within=Reals,bounds=(0.36,1),initialize=0.36)
m.x477 = Var(within=Reals,bounds=(0.216,1),initialize=0.216)
m.x478 = Var(within=Reals,bounds=(0.36,1),initialize=0.36)
m.x479 = Var(within=Reals,bounds=(0.216,1),initialize=0.216)
m.x480 = Var(within=Reals,bounds=(0.36,1),initialize=0.36)
m.x481 = Var(within=Reals,bounds=(0.216,1),initialize=0.216)
m.x482 = Var(within=Reals,bounds=(0.64,1),initialize=0.64)
m.x483 = Var(within=Reals,bounds=(0.512,1),initialize=0.512)
m.x484 = Var(within=Reals,bounds=(0.64,1),initialize=0.64)
m.x485 = Var(within=Reals,bounds=(0.512,1),initialize=0.512)
m.x486 = Var(within=Reals,bounds=(0.64,1),initialize=0.64)
m.x487 = Var(within=Reals,bounds=(0.512,1),initialize=0.512)
m.x488 = Var(within=Reals,bounds=(0.7225,1),initialize=0.7225)
m.x489 = Var(within=Reals,bounds=(0.614125,1),initialize=0.614125)
m.x490 = Var(within=Reals,bounds=(0.7225,1),initialize=0.7225)
m.x491 = Var(within=Reals,bounds=(0.614125,1),initialize=0.614125)
m.x492 = Var(within=Reals,bounds=(0.7225,1),initialize=0.7225)
m.x493 = Var(within=Reals,bounds=(0.614125,1),initialize=0.614125)
m.x494 = Var(within=Reals,bounds=(0.49,1),initialize=0.49)
m.x495 = Var(within=Reals,bounds=(0.343,1),initialize=0.343)
m.x496 = Var(within=Reals,bounds=(0.49,1),initialize=0.49)
m.x497 = Var(within=Reals,bounds=(0.343,1),initialize=0.343)
m.x498 = Var(within=Reals,bounds=(0.49,1),initialize=0.49)
m.x499 = Var(within=Reals,bounds=(0.343,1),initialize=0.343)
m.obj = Objective(expr= m.x278 + m.x283 + m.x288 + m.x293 + m.x298 + m.x303 + m.x308 + m.x313 + m.x318 + m.x323
+ m.x328 + m.x333 + m.x338 + m.x345 + m.x348 + m.x353 + m.x358 + m.x363 + m.x368 + m.x373
+ m.x378 + m.x383 + m.x388 + m.x393 + m.x398 + m.x403 + m.x408, sense=minimize)
m.c2 = Constraint(expr= m.x141 + 27.42831624*m.x143 + 37.5407324*m.x145 - 57.2814121*m.x147 == 0)
m.c3 = Constraint(expr= m.x149 + 27.42831624*m.x151 - 57.2814121*m.x153 + 37.5407324*m.x155 == 0)
m.c4 = Constraint(expr= m.x157 + 27.42831624*m.x159 - 57.2814121*m.x161 + 37.5407324*m.x163 == 0)
m.c5 = Constraint(expr= - 57.2814121*m.x147 + m.x165 + 27.42831624*m.x167 + 37.5407324*m.x169 == 0)
m.c6 = Constraint(expr= - 57.2814121*m.x153 + m.x171 + 37.5407324*m.x173 + 27.42831624*m.x175 == 0)
m.c7 = Constraint(expr= - 57.2814121*m.x161 + m.x177 + 37.5407324*m.x179 + 27.42831624*m.x181 == 0)
m.c8 = Constraint(expr= - 57.2814121*m.x147 + m.x183 + 37.5407324*m.x185 + 27.42831624*m.x187 == 0)
m.c9 = Constraint(expr= - 57.2814121*m.x153 + m.x189 + 27.42831624*m.x191 + 37.5407324*m.x193 == 0)
m.c10 = Constraint(expr= m.x29 + 27.42831624*m.x30 + 37.5407324*m.x31 - 57.2814121*m.x161 == 0)
m.c11 = Constraint(expr= m.x32 - 76.45219958*m.x33 + 43.14087708*m.x34 + 50.37356589*m.x35 == 0)
m.c12 = Constraint(expr= m.x36 + 50.37356589*m.x37 - 76.45219958*m.x38 + 43.14087708*m.x39 == 0)
m.c13 = Constraint(expr= m.x40 + 43.14087708*m.x41 + 50.37356589*m.x42 - 76.45219958*m.x43 == 0)
m.c14 = Constraint(expr= - 76.45219958*m.x33 + m.x44 + 43.14087708*m.x45 + 50.37356589*m.x46 == 0)
m.c15 = Constraint(expr= - 76.45219958*m.x38 + m.x47 + 50.37356589*m.x48 + 43.14087708*m.x49 == 0)
m.c16 = Constraint(expr= - 76.45219958*m.x43 + m.x50 + 43.14087708*m.x51 + 50.37356589*m.x52 == 0)
m.c17 = Constraint(expr= m.x53 + 58.31011875*m.x54 - 69.39622571*m.x55 - 25.39911174*m.x56 == 0)
m.c18 = Constraint(expr= m.x57 - 25.39911174*m.x58 + 58.31011875*m.x59 - 69.39622571*m.x60 == 0)
m.c19 = Constraint(expr= m.x61 - 69.39622571*m.x62 + 58.31011875*m.x63 - 25.39911174*m.x64 == 0)
m.c20 = Constraint(expr= - 69.39622571*m.x55 + m.x65 + 58.31011875*m.x66 - 25.39911174*m.x67 == 0)
m.c21 = Constraint(expr= - 69.39622571*m.x60 + m.x68 - 25.39911174*m.x69 + 58.31011875*m.x70 == 0)
m.c22 = Constraint(expr= - 69.39622571*m.x62 + m.x71 + 58.31011875*m.x72 - 25.39911174*m.x73 == 0)
m.c23 = Constraint(expr= m.x74 - 2.03724124*m.x75 + 63.61644904*m.x76 - 34.92732674*m.x77 == 0)
m.c24 = Constraint(expr= m.x78 - 2.03724124*m.x79 - 34.92732674*m.x80 + 63.61644904*m.x81 == 0)
m.c25 = Constraint(expr= m.x82 - 2.03724124*m.x83 - 34.92732674*m.x84 + 63.61644904*m.x85 == 0)
m.c26 = Constraint(expr= - 34.92732674*m.x77 + m.x86 + 63.61644904*m.x87 - 2.03724124*m.x88 == 0)
m.c27 = Constraint(expr= - 34.92732674*m.x80 + m.x89 + 63.61644904*m.x90 - 2.03724124*m.x91 == 0)
m.c28 = Constraint(expr= - 34.92732674*m.x84 + m.x92 - 2.03724124*m.x93 + 63.61644904*m.x94 == 0)
m.c29 = Constraint(expr= m.x95 + m.x96 + m.x97 >= 0.875)
m.c30 = Constraint(expr= - m.x98 + m.x99 == 0)
m.c31 = Constraint(expr= - m.x100 + m.x101 == 0)
m.c32 = Constraint(expr= - m.x102 + m.x103 == 0)
m.c33 = Constraint(expr= - m.x104 + m.x105 == 0)
m.c34 = Constraint(expr= - m.x106 + m.x107 == 0)
m.c35 = Constraint(expr= - m.x108 + m.x109 == 0)
m.c36 = Constraint(expr= m.x104 - m.x110 == 0)
m.c37 = Constraint(expr= m.x106 - m.x111 == 0)
m.c38 = Constraint(expr= m.x108 - m.x112 == 0)
m.c39 = Constraint(expr= - m.x113 + m.x114 == 0)
m.c40 = Constraint(expr= - m.x115 + m.x116 == 0)
m.c41 = Constraint(expr= - m.x117 + m.x118 == 0)
m.c42 = Constraint(expr= m.x119 == 0.296666667)
m.c43 = Constraint(expr= m.x120 == 0.294444444)
m.c44 = Constraint(expr= m.x121 == 0.283888889)
m.c45 = Constraint(expr= m.x95 - m.x99 == 0)
m.c46 = Constraint(expr= m.x96 - m.x101 == 0)
m.c47 = Constraint(expr= m.x97 - m.x103 == 0)
m.c48 = Constraint(expr= 3600*m.x98 - 3600*m.x105 + 1800*m.x122 - 1800*m.x123 == 0)
m.c49 = Constraint(expr= 3600*m.x100 - 3600*m.x107 + 1800*m.x124 - 1800*m.x125 == 0)
m.c50 = Constraint(expr= 3600*m.x102 - 3600*m.x109 + 1800*m.x126 - 1800*m.x127 == 0)
m.c51 = Constraint(expr= 3600*m.x110 - 3600*m.x114 + 720*m.x128 - 720*m.x129 == 0)
m.c52 = Constraint(expr= 3600*m.x111 - 3600*m.x116 + 720*m.x130 - 720*m.x131 == 0)
m.c53 = Constraint(expr= 3600*m.x112 - 3600*m.x118 + 720*m.x132 - 720*m.x133 == 0)
m.c54 = Constraint(expr= 3600*m.x113 - 3600*m.x119 + 1600*m.x134 - 1600*m.x135 == 0)
m.c55 = Constraint(expr= 3600*m.x115 - 3600*m.x120 + 1600*m.x136 - 1600*m.x137 == 0)
m.c56 = Constraint(expr= 3600*m.x117 - 3600*m.x121 + 1600*m.x138 - 1600*m.x139 == 0)
m.c57 = Constraint(expr= - m.x123 + m.x124 == 0)
m.c58 = Constraint(expr= - m.x125 + m.x126 == 0)
m.c59 = Constraint(expr= - m.x129 + m.x130 == 0)
m.c60 = Constraint(expr= - m.x131 + m.x132 == 0)
m.c61 = Constraint(expr= - m.x135 + m.x136 == 0)
m.c62 = Constraint(expr= - m.x137 + m.x138 == 0)
m.c63 = Constraint(expr= - 0.2*m.b2 + m.x140 >= 0)
m.c64 = Constraint(expr= - 0.2*m.b3 + m.x142 >= 0)
m.c65 = Constraint(expr= - 0.2*m.b4 + m.x144 >= 0)
m.c66 = Constraint(expr= - 0.2*m.b5 + m.x146 >= 0)
m.c67 = Constraint(expr= - 0.2*m.b6 + m.x148 >= 0)
m.c68 = Constraint(expr= - 0.2*m.b7 + m.x150 >= 0)
m.c69 = Constraint(expr= - 0.2*m.b8 + m.x152 >= 0)
m.c70 = Constraint(expr= - 0.2*m.b9 + m.x154 >= 0)
m.c71 = Constraint(expr= - 0.2*m.b10 + m.x156 >= 0)
m.c72 = Constraint(expr= - 0.25*m.b11 + m.x158 >= 0)
m.c73 = Constraint(expr= - 0.25*m.b12 + m.x160 >= 0)
m.c74 = Constraint(expr= - 0.25*m.b13 + m.x162 >= 0)
m.c75 = Constraint(expr= - 0.25*m.b14 + m.x164 >= 0)
m.c76 = Constraint(expr= - 0.25*m.b15 + m.x166 >= 0)
m.c77 = Constraint(expr= - 0.25*m.b16 + m.x168 >= 0)
m.c78 = Constraint(expr= - 0.4*m.b17 + m.x170 >= 0)
m.c79 = Constraint(expr= - 0.4*m.b18 + m.x172 >= 0)
m.c80 = Constraint(expr= - 0.4*m.b19 + m.x174 >= 0)
m.c81 = Constraint(expr= - 0.4*m.b20 + m.x176 >= 0)
m.c82 = Constraint(expr= - 0.4*m.b21 + m.x178 >= 0)
m.c83 = Constraint(expr= - 0.4*m.b22 + m.x180 >= 0)
m.c84 = Constraint(expr= - 0.24*m.b23 + m.x182 >= 0)
m.c85 = Constraint(expr= - 0.24*m.b24 + m.x184 >= 0)
m.c86 = Constraint(expr= - 0.24*m.b25 + m.x186 >= 0)
m.c87 = Constraint(expr= - 0.24*m.b26 + m.x188 >= 0)
m.c88 = Constraint(expr= - 0.24*m.b27 + m.x190 >= 0)
m.c89 = Constraint(expr= - 0.24*m.b28 + m.x192 >= 0)
m.c90 = Constraint(expr= - 0.8*m.b2 + m.x140 <= 0)
m.c91 = Constraint(expr= - 0.8*m.b3 + m.x142 <= 0)
m.c92 = Constraint(expr= - 0.8*m.b4 + m.x144 <= 0)
m.c93 = Constraint(expr= - 0.8*m.b5 + m.x146 <= 0)
m.c94 = Constraint(expr= - 0.8*m.b6 + m.x148 <= 0)
m.c95 = Constraint(expr= - 0.8*m.b7 + m.x150 <= 0)
m.c96 = Constraint(expr= - 0.8*m.b8 + m.x152 <= 0)
m.c97 = Constraint(expr= - 0.8*m.b9 + m.x154 <= 0)
m.c98 = Constraint(expr= - 0.8*m.b10 + m.x156 <= 0)
m.c99 = Constraint(expr= - 0.5*m.b11 + m.x158 <= 0)
m.c100 = Constraint(expr= - 0.5*m.b12 + m.x160 <= 0)
m.c101 = Constraint(expr= - 0.5*m.b13 + m.x162 <= 0)
m.c102 = Constraint(expr= - 0.5*m.b14 + m.x164 <= 0)
m.c103 = Constraint(expr= - 0.5*m.b15 + m.x166 <= 0)
m.c104 = Constraint(expr= - 0.5*m.b16 + m.x168 <= 0)
m.c105 = Constraint(expr= - 0.7*m.b17 + m.x170 <= 0)
m.c106 = Constraint(expr= - 0.7*m.b18 + m.x172 <= 0)
m.c107 = Constraint(expr= - 0.7*m.b19 + m.x174 <= 0)
m.c108 = Constraint(expr= - 0.7*m.b20 + m.x176 <= 0)
m.c109 = Constraint(expr= - 0.7*m.b21 + m.x178 <= 0)
m.c110 = Constraint(expr= - 0.7*m.b22 + m.x180 <= 0)
m.c111 = Constraint(expr= - 0.58*m.b23 + m.x182 <= 0)
m.c112 = Constraint(expr= - 0.58*m.b24 + m.x184 <= 0)
m.c113 = Constraint(expr= - 0.58*m.b25 + m.x186 <= 0)
m.c114 = Constraint(expr= - 0.58*m.b26 + m.x188 <= 0)
m.c115 = Constraint(expr= - 0.58*m.b27 + m.x190 <= 0)
m.c116 = Constraint(expr= - 0.58*m.b28 + m.x192 <= 0)
m.c117 = Constraint(expr= - m.x122 + m.x194 == 60)
m.c118 = Constraint(expr= - m.x124 + m.x195 == 60)
m.c119 = Constraint(expr= - m.x126 + m.x196 == 60)
m.c120 = Constraint(expr= - m.x128 + m.x197 == 90)
m.c121 = Constraint(expr= - m.x130 + m.x198 == 90)
m.c122 = Constraint(expr= - m.x132 + m.x199 == 90)
m.c123 = Constraint(expr= - m.x134 + m.x200 == 103)
m.c124 = Constraint(expr= - m.x136 + m.x201 == 103)
m.c125 = Constraint(expr= - m.x138 + m.x202 == 103)
m.c126 = Constraint(expr= - m.x194 + m.x203 - m.x204 == 0)
m.c127 = Constraint(expr= - m.x195 + m.x205 - m.x206 == 0)
m.c128 = Constraint(expr= - m.x196 + m.x207 - m.x208 == 0)
m.c129 = Constraint(expr= m.x209 - m.x210 - m.x211 == 0)
m.c130 = Constraint(expr= m.x212 - m.x213 - m.x214 == 0)
m.c131 = Constraint(expr= m.x215 - m.x216 - m.x217 == 0)
m.c132 = Constraint(expr= - m.x200 + m.x218 - m.x219 == 0)
m.c133 = Constraint(expr= - m.x201 + m.x220 - m.x221 == 0)
m.c134 = Constraint(expr= - m.x202 + m.x222 - m.x223 == 0)
m.c135 = Constraint(expr= m.x203 - m.x224 - m.x225 == 0)
m.c136 = Constraint(expr= m.x205 - m.x226 - m.x227 == 0)
m.c137 = Constraint(expr= m.x207 - m.x228 - m.x229 == 0)
m.c138 = Constraint(expr= - m.x194 + m.x209 - m.x230 == 0)
m.c139 = Constraint(expr= - m.x195 + m.x212 - m.x231 == 0)
m.c140 = Constraint(expr= - m.x196 + m.x215 - m.x232 == 0)
m.c141 = Constraint(expr= - m.x197 + m.x218 - m.x233 == 0)
m.c142 = Constraint(expr= - m.x198 + m.x220 - m.x234 == 0)
m.c143 = Constraint(expr= - m.x199 + m.x222 - m.x235 == 0)
m.c144 = Constraint(expr= 0.2*m.b2 - m.x140 + m.x236 <= 0.2)
m.c145 = Constraint(expr= 0.2*m.b3 - m.x142 + m.x237 <= 0.2)
m.c146 = Constraint(expr= 0.2*m.b4 - m.x144 + m.x238 <= 0.2)
m.c147 = Constraint(expr= 0.2*m.b5 - m.x146 + m.x239 <= 0.2)
m.c148 = Constraint(expr= 0.2*m.b6 - m.x148 + m.x240 <= 0.2)
m.c149 = Constraint(expr= 0.2*m.b7 - m.x150 + m.x241 <= 0.2)
m.c150 = Constraint(expr= 0.2*m.b8 - m.x152 + m.x242 <= 0.2)
m.c151 = Constraint(expr= 0.2*m.b9 - m.x154 + m.x243 <= 0.2)
m.c152 = Constraint(expr= 0.2*m.b10 - m.x156 + m.x244 <= 0.2)
m.c153 = Constraint(expr= 0.25*m.b11 - m.x158 + m.x245 <= 0.25)
m.c154 = Constraint(expr= 0.25*m.b12 - m.x160 + m.x246 <= 0.25)
m.c155 = Constraint(expr= 0.25*m.b13 - m.x162 + m.x247 <= 0.25)
m.c156 = Constraint(expr= 0.25*m.b14 - m.x164 + m.x248 <= 0.25)
m.c157 = Constraint(expr= 0.25*m.b15 - m.x166 + m.x249 <= 0.25)
m.c158 = Constraint(expr= 0.25*m.b16 - m.x168 + m.x250 <= 0.25)
m.c159 = Constraint(expr= 0.4*m.b17 - m.x170 + m.x251 <= 0.4)
m.c160 = Constraint(expr= 0.4*m.b18 - m.x172 + m.x252 <= 0.4)
m.c161 = Constraint(expr= 0.4*m.b19 - m.x174 + m.x253 <= 0.4)
m.c162 = Constraint(expr= 0.4*m.b20 - m.x176 + m.x254 <= 0.4)
m.c163 = Constraint(expr= 0.4*m.b21 - m.x178 + m.x255 <= 0.4)
m.c164 = Constraint(expr= 0.4*m.b22 - m.x180 + m.x256 <= 0.4)
m.c165 = Constraint(expr= 0.24*m.b23 - m.x182 + m.x257 <= 0.24)
m.c166 = Constraint(expr= 0.24*m.b24 - m.x184 + m.x258 <= 0.24)
m.c167 = Constraint(expr= 0.24*m.b25 - m.x186 + m.x259 <= 0.24)
m.c168 = Constraint(expr= 0.24*m.b26 - m.x188 + m.x260 <= 0.24)
m.c169 = Constraint(expr= 0.24*m.b27 - m.x190 + m.x261 <= 0.24)
m.c170 = Constraint(expr= 0.24*m.b28 - m.x192 + m.x262 <= 0.24)
m.c171 = Constraint(expr= - m.x140 + m.x236 >= 0)
m.c172 = Constraint(expr= - m.x142 + m.x237 >= 0)
m.c173 = Constraint(expr= - m.x144 + m.x238 >= 0)
m.c174 = Constraint(expr= - m.x146 + m.x239 >= 0)
m.c175 = Constraint(expr= - m.x148 + m.x240 >= 0)
m.c176 = Constraint(expr= - m.x150 + m.x241 >= 0)
m.c177 = Constraint(expr= - m.x152 + m.x242 >= 0)
m.c178 = Constraint(expr= - m.x154 + m.x243 >= 0)
m.c179 = Constraint(expr= - m.x156 + m.x244 >= 0)
m.c180 = Constraint(expr= - m.x158 + m.x245 >= 0)
m.c181 = Constraint(expr= - m.x160 + m.x246 >= 0)
m.c182 = Constraint(expr= - m.x162 + m.x247 >= 0)
m.c183 = Constraint(expr= - m.x164 + m.x248 >= 0)
m.c184 = Constraint(expr= - m.x166 + m.x249 >= 0)
m.c185 = Constraint(expr= - m.x168 + m.x250 >= 0)
m.c186 = Constraint(expr= - m.x170 + m.x251 >= 0)
m.c187 = Constraint(expr= - m.x172 + m.x252 >= 0)
m.c188 = Constraint(expr= - m.x174 + m.x253 >= 0)
m.c189 = Constraint(expr= - m.x176 + m.x254 >= 0)
m.c190 = Constraint(expr= - m.x178 + m.x255 >= 0)
m.c191 = Constraint(expr= - m.x180 + m.x256 >= 0)
m.c192 = Constraint(expr= - m.x182 + m.x257 >= 0)
m.c193 = Constraint(expr= - m.x184 + m.x258 >= 0)
m.c194 = Constraint(expr= - m.x186 + m.x259 >= 0)
m.c195 = Constraint(expr= - m.x188 + m.x260 >= 0)
m.c196 = Constraint(expr= - m.x190 + m.x261 >= 0)
m.c197 = Constraint(expr= - m.x192 + m.x262 >= 0)
m.c198 = Constraint(expr= - 0.6*m.b2 + m.x236 <= 0.2)
m.c199 = Constraint(expr= - 0.6*m.b3 + m.x237 <= 0.2)
m.c200 = Constraint(expr= - 0.6*m.b4 + m.x238 <= 0.2)
m.c201 = Constraint(expr= - 0.6*m.b5 + m.x239 <= 0.2)
m.c202 = Constraint(expr= - 0.6*m.b6 + m.x240 <= 0.2)
m.c203 = Constraint(expr= - 0.6*m.b7 + m.x241 <= 0.2)
m.c204 = Constraint(expr= - 0.6*m.b8 + m.x242 <= 0.2)
m.c205 = Constraint(expr= - 0.6*m.b9 + m.x243 <= 0.2)
m.c206 = Constraint(expr= - 0.6*m.b10 + m.x244 <= 0.2)
m.c207 = Constraint(expr= - 0.25*m.b11 + m.x245 <= 0.25)
m.c208 = Constraint(expr= - 0.25*m.b12 + m.x246 <= 0.25)
m.c209 = Constraint(expr= - 0.25*m.b13 + m.x247 <= 0.25)
m.c210 = Constraint(expr= - 0.25*m.b14 + m.x248 <= 0.25)
m.c211 = Constraint(expr= - 0.25*m.b15 + m.x249 <= 0.25)
m.c212 = Constraint(expr= - 0.25*m.b16 + m.x250 <= 0.25)
m.c213 = Constraint(expr= - 0.3*m.b17 + m.x251 <= 0.4)
m.c214 = Constraint(expr= - 0.3*m.b18 + m.x252 <= 0.4)
m.c215 = Constraint(expr= - 0.3*m.b19 + m.x253 <= 0.4)
m.c216 = Constraint(expr= - 0.3*m.b20 + m.x254 <= 0.4)
m.c217 = Constraint(expr= - 0.3*m.b21 + m.x255 <= 0.4)
m.c218 = Constraint(expr= - 0.3*m.b22 + m.x256 <= 0.4)
m.c219 = Constraint(expr= - 0.34*m.b23 + m.x257 <= 0.24)
m.c220 = Constraint(expr= - 0.34*m.b24 + m.x258 <= 0.24)
m.c221 = Constraint(expr= - 0.34*m.b25 + m.x259 <= 0.24)
m.c222 = Constraint(expr= - 0.34*m.b26 + m.x260 <= 0.24)
m.c223 = Constraint(expr= - 0.34*m.b27 + m.x261 <= 0.24)
m.c224 = Constraint(expr= - 0.34*m.b28 + m.x262 <= 0.24)
m.c225 = Constraint(expr= - 0.4*m.b2 + m.x263 <= 0.6)
m.c226 = Constraint(expr= - 0.4*m.b3 + m.x264 <= 0.6)
m.c227 = Constraint(expr= - 0.4*m.b4 + m.x265 <= 0.6)
m.c228 = Constraint(expr= - 0.2*m.b11 + m.x266 <= 0.8)
m.c229 = Constraint(expr= - 0.2*m.b12 + m.x267 <= 0.8)
m.c230 = Constraint(expr= - 0.2*m.b13 + m.x268 <= 0.8)
m.c231 = Constraint(expr= - 0.15*m.b17 + m.x269 <= 0.85)
m.c232 = Constraint(expr= - 0.15*m.b18 + m.x270 <= 0.85)
m.c233 = Constraint(expr= - 0.15*m.b19 + m.x271 <= 0.85)
m.c234 = Constraint(expr= - 0.3*m.b23 + m.x272 <= 0.7)
m.c235 = Constraint(expr= - 0.3*m.b24 + m.x273 <= 0.7)
m.c236 = Constraint(expr= - 0.3*m.b25 + m.x274 <= 0.7)
m.c237 = Constraint(expr= m.b2 - m.b5 >= 0)
m.c238 = Constraint(expr= m.b3 - m.b6 >= 0)
m.c239 = Constraint(expr= m.b4 - m.b7 >= 0)
m.c240 = Constraint(expr= m.b5 - m.b8 >= 0)
m.c241 = Constraint(expr= m.b6 - m.b9 >= 0)
m.c242 = Constraint(expr= m.b7 - m.b10 >= 0)
m.c243 = Constraint(expr= m.b11 - m.b14 >= 0)
m.c244 = Constraint(expr= m.b12 - m.b15 >= 0)
m.c245 = Constraint(expr= m.b13 - m.b16 >= 0)
m.c246 = Constraint(expr= m.b17 - m.b20 >= 0)
m.c247 = Constraint(expr= m.b18 - m.b21 >= 0)
m.c248 = Constraint(expr= m.b19 - m.b22 >= 0)
m.c249 = Constraint(expr= m.b23 - m.b26 >= 0)
m.c250 = Constraint(expr= m.b24 - m.b27 >= 0)
m.c251 = Constraint(expr= m.b25 - m.b28 >= 0)
m.c252 = Constraint(expr= m.x99 - m.x140 - m.x146 - m.x152 == 0)
m.c253 = Constraint(expr= m.x101 - m.x142 - m.x148 - m.x154 == 0)
m.c254 = Constraint(expr= m.x103 - m.x144 - m.x150 - m.x156 == 0)
m.c255 = Constraint(expr= m.x105 - m.x158 - m.x164 - m.x170 - m.x176 == 0)
m.c256 = Constraint(expr= m.x107 - m.x160 - m.x166 - m.x172 - m.x178 == 0)
m.c257 = Constraint(expr= m.x109 - m.x162 - m.x168 - m.x174 - m.x180 == 0)
m.c258 = Constraint(expr= m.x114 - m.x182 - m.x188 == 0)
m.c259 = Constraint(expr= m.x116 - m.x184 - m.x190 == 0)
m.c260 = Constraint(expr= m.x118 - m.x186 - m.x192 == 0)
m.c261 = Constraint(expr= - 2000*m.b2 + m.x141 - m.x225 >= -2000)
m.c262 = Constraint(expr= - 2000*m.b3 + m.x149 - m.x227 >= -2000)
m.c263 = Constraint(expr= - 2000*m.b4 + m.x157 - m.x229 >= -2000)
m.c264 = Constraint(expr= - 2000*m.b5 + m.x165 - m.x225 >= -2000)
m.c265 = Constraint(expr= - 2000*m.b6 + m.x171 - m.x227 >= -2000)
m.c266 = Constraint(expr= - 2000*m.b7 + m.x177 - m.x229 >= -2000)
m.c267 = Constraint(expr= - 2000*m.b8 + m.x183 - m.x225 >= -2000)
m.c268 = Constraint(expr= - 2000*m.b9 + m.x189 - m.x227 >= -2000)
m.c269 = Constraint(expr= - 2000*m.b10 + m.x29 - m.x229 >= -2000)
m.c270 = Constraint(expr= - 2000*m.b11 + m.x32 - m.x230 >= -2000)
m.c271 = Constraint(expr= - 2000*m.b12 + m.x36 - m.x231 >= -2000)
m.c272 = Constraint(expr= - 2000*m.b13 + m.x40 - m.x232 >= -2000)
m.c273 = Constraint(expr= - 2000*m.b14 + m.x44 - m.x230 >= -2000)
m.c274 = Constraint(expr= - 2000*m.b15 + m.x47 - m.x231 >= -2000)
m.c275 = Constraint(expr= - 2000*m.b16 + m.x50 - m.x232 >= -2000)
m.c276 = Constraint(expr= - 2000*m.b17 + m.x53 - m.x230 >= -2000)
m.c277 = Constraint(expr= - 2000*m.b18 + m.x57 - m.x231 >= -2000)
m.c278 = Constraint(expr= - 2000*m.b19 + m.x61 - m.x232 >= -2000)
m.c279 = Constraint(expr= - 2000*m.b20 + m.x65 - m.x230 >= -2000)
m.c280 = Constraint(expr= - 2000*m.b21 + m.x68 - m.x231 >= -2000)
m.c281 = Constraint(expr= - 2000*m.b22 + m.x71 - m.x232 >= -2000)
m.c282 = Constraint(expr= - 2000*m.b23 + m.x74 - m.x233 >= -2000)
m.c283 = Constraint(expr= - 2000*m.b24 + m.x78 - m.x234 >= -2000)
m.c284 = Constraint(expr= - 2000*m.b25 + m.x82 - m.x235 >= -2000)
m.c285 = Constraint(expr= - 2000*m.b26 + m.x86 - m.x233 >= -2000)
m.c286 = Constraint(expr= - 2000*m.b27 + m.x89 - m.x234 >= -2000)
m.c287 = Constraint(expr= - 2000*m.b28 + m.x92 - m.x235 >= -2000)
m.c288 = Constraint(expr= 1049*m.b2 + m.x141 - m.x225 <= 1049)
m.c289 = Constraint(expr= 1049*m.b3 + m.x149 - m.x227 <= 1049)
m.c290 = Constraint(expr= 1049*m.b4 + m.x157 - m.x229 <= 1049)
m.c291 = Constraint(expr= 1049*m.b5 + m.x165 - m.x225 <= 1049)
m.c292 = Constraint(expr= 1049*m.b6 + m.x171 - m.x227 <= 1049)
m.c293 = Constraint(expr= 1049*m.b7 + m.x177 - m.x229 <= 1049)
m.c294 = Constraint(expr= 1049*m.b8 + m.x183 - m.x225 <= 1049)
m.c295 = Constraint(expr= 1049*m.b9 + m.x189 - m.x227 <= 1049)
m.c296 = Constraint(expr= 1049*m.b10 + m.x29 - m.x229 <= 1049)
m.c297 = Constraint(expr= 1065*m.b11 + m.x32 - m.x230 <= 1065)
m.c298 = Constraint(expr= 1065*m.b12 + m.x36 - m.x231 <= 1065)
m.c299 = Constraint(expr= 1065*m.b13 + m.x40 - m.x232 <= 1065)
m.c300 = Constraint(expr= 1065*m.b14 + m.x44 - m.x230 <= 1065)
m.c301 = Constraint(expr= 1065*m.b15 + m.x47 - m.x231 <= 1065)
m.c302 = Constraint(expr= 1065*m.b16 + m.x50 - m.x232 <= 1065)
m.c303 = Constraint(expr= 1065*m.b17 + m.x53 - m.x230 <= 1065)
m.c304 = Constraint(expr= 1065*m.b18 + m.x57 - m.x231 <= 1065)
m.c305 = Constraint(expr= 1065*m.b19 + m.x61 - m.x232 <= 1065)
m.c306 = Constraint(expr= 1065*m.b20 + m.x65 - m.x230 <= 1065)
m.c307 = Constraint(expr= 1065*m.b21 + m.x68 - m.x231 <= 1065)
m.c308 = Constraint(expr= 1065*m.b22 + m.x71 - m.x232 <= 1065)
m.c309 = Constraint(expr= 1095*m.b23 + m.x74 - m.x233 <= 1095)
m.c310 = Constraint(expr= 1095*m.b24 + m.x78 - m.x234 <= 1095)
m.c311 = Constraint(expr= 1095*m.b25 + m.x82 - m.x235 <= 1095)
m.c312 = Constraint(expr= 1095*m.b26 + m.x86 - m.x233 <= 1095)
m.c313 = Constraint(expr= 1095*m.b27 + m.x89 - m.x234 <= 1095)
m.c314 = Constraint(expr= 1095*m.b28 + m.x92 - m.x235 <= 1095)
m.c315 = Constraint(expr= - m.x197 + m.x210 >= 0)
m.c316 = Constraint(expr= - m.x198 + m.x213 >= 0)
m.c317 = Constraint(expr= - m.x199 + m.x216 >= 0)
m.c318 = Constraint(expr= m.x200 - m.x275 >= 0)
m.c319 = Constraint(expr= m.x201 - m.x276 >= 0)
m.c320 = Constraint(expr= m.x202 - m.x277 >= 0)
m.c321 = Constraint(expr= - 0.309838295393634*m.x278 + 13.94696158*m.x279 + 24.46510819*m.x280 - 7.28623839*m.x281
- 23.57687014*m.x282 <= 0)
m.c322 = Constraint(expr= - 0.309838295393634*m.x283 + 13.94696158*m.x284 + 24.46510819*m.x285 - 7.28623839*m.x286
- 23.57687014*m.x287 <= 0)
m.c323 = Constraint(expr= - 0.309838295393634*m.x288 + 13.94696158*m.x289 + 24.46510819*m.x290 - 7.28623839*m.x291
- 23.57687014*m.x292 <= 0)
m.c324 = Constraint(expr= - 0.309838295393634*m.x293 + 13.94696158*m.x294 + 24.46510819*m.x295 - 7.28623839*m.x296
- 23.57687014*m.x297 <= 0)
m.c325 = Constraint(expr= - 0.309838295393634*m.x298 + 13.94696158*m.x299 + 24.46510819*m.x300 - 7.28623839*m.x301
- 23.57687014*m.x302 <= 0)
m.c326 = Constraint(expr= - 0.309838295393634*m.x303 + 13.94696158*m.x304 + 24.46510819*m.x305 - 7.28623839*m.x306
- 23.57687014*m.x307 <= 0)
m.c327 = Constraint(expr= - 0.309838295393634*m.x308 + 13.94696158*m.x309 + 24.46510819*m.x310 - 7.28623839*m.x311
- 23.57687014*m.x312 <= 0)
m.c328 = Constraint(expr= - 0.309838295393634*m.x313 + 13.94696158*m.x314 + 24.46510819*m.x315 - 7.28623839*m.x316
- 23.57687014*m.x317 <= 0)
m.c329 = Constraint(expr= - 0.309838295393634*m.x318 + 13.94696158*m.x319 + 24.46510819*m.x320 - 7.28623839*m.x321
- 23.57687014*m.x322 <= 0)
m.c330 = Constraint(expr= - 0.309838295393634*m.x323 + 29.29404529*m.x324 - 108.39408287*m.x325 + 442.21990639*m.x326
- 454.58448169*m.x327 <= 0)
m.c331 = Constraint(expr= - 0.309838295393634*m.x328 + 29.29404529*m.x329 - 108.39408287*m.x330 + 442.21990639*m.x331
- 454.58448169*m.x332 <= 0)
m.c332 = Constraint(expr= - 0.309838295393634*m.x333 + 29.29404529*m.x334 - 108.39408287*m.x335 + 442.21990639*m.x336
- 454.58448169*m.x337 <= 0)
m.c333 = Constraint(expr= - 0.309838295393634*m.x338 + 29.29404529*m.x339 - 108.39408287*m.x340 + 442.21990639*m.x341
- 454.58448169*m.x342 <= 0)
m.c334 = Constraint(expr= 442.21990639*m.x343 - 454.58448169*m.x344 - 0.309838295393634*m.x345 + 29.29404529*m.x346
- 108.39408287*m.x347 <= 0)
m.c335 = Constraint(expr= - 0.309838295393634*m.x348 + 29.29404529*m.x349 - 108.39408287*m.x350 + 442.21990639*m.x351
- 454.58448169*m.x352 <= 0)
m.c336 = Constraint(expr= - 0.309838295393634*m.x353 + 25.92674585*m.x354 + 18.13482123*m.x355 + 22.12766012*m.x356
- 42.68950769*m.x357 <= 0)
m.c337 = Constraint(expr= - 0.309838295393634*m.x358 + 25.92674585*m.x359 + 18.13482123*m.x360 + 22.12766012*m.x361
- 42.68950769*m.x362 <= 0)
m.c338 = Constraint(expr= - 0.309838295393634*m.x363 + 25.92674585*m.x364 + 18.13482123*m.x365 + 22.12766012*m.x366
- 42.68950769*m.x367 <= 0)
m.c339 = Constraint(expr= - 0.309838295393634*m.x368 + 25.92674585*m.x369 + 18.13482123*m.x370 + 22.12766012*m.x371
- 42.68950769*m.x372 <= 0)
m.c340 = Constraint(expr= - 0.309838295393634*m.x373 + 25.92674585*m.x374 + 18.13482123*m.x375 + 22.12766012*m.x376
- 42.68950769*m.x377 <= 0)
m.c341 = Constraint(expr= - 0.309838295393634*m.x378 + 25.92674585*m.x379 + 18.13482123*m.x380 + 22.12766012*m.x381
- 42.68950769*m.x382 <= 0)
m.c342 = Constraint(expr= - 0.309838295393634*m.x383 + 17.4714791*m.x384 - 39.98407808*m.x385 + 134.55943082*m.x386
- 135.88441782*m.x387 <= 0)
m.c343 = Constraint(expr= - 0.309838295393634*m.x388 + 17.4714791*m.x389 - 39.98407808*m.x390 + 134.55943082*m.x391
- 135.88441782*m.x392 <= 0)
m.c344 = Constraint(expr= - 0.309838295393634*m.x393 + 17.4714791*m.x394 - 39.98407808*m.x395 + 134.55943082*m.x396
- 135.88441782*m.x397 <= 0)
m.c345 = Constraint(expr= - 0.309838295393634*m.x398 + 17.4714791*m.x399 - 39.98407808*m.x400 + 134.55943082*m.x401
- 135.88441782*m.x402 <= 0)
m.c346 = Constraint(expr= - 0.309838295393634*m.x403 + 17.4714791*m.x404 - 39.98407808*m.x405 + 134.55943082*m.x406
- 135.88441782*m.x407 <= 0)
m.c347 = Constraint(expr= - 0.309838295393634*m.x408 + 17.4714791*m.x409 - 39.98407808*m.x410 + 134.55943082*m.x411
- 135.88441782*m.x412 <= 0)
m.c348 = Constraint(expr=m.x98**2 - m.x413 == 0)
m.c349 = Constraint(expr= m.x204 - 5*m.x413 == 0)
m.c350 = Constraint(expr=m.x100**2 - m.x414 == 0)
m.c351 = Constraint(expr= m.x206 - 5*m.x414 == 0)
m.c352 = Constraint(expr=m.x102**2 - m.x415 == 0)
m.c353 = Constraint(expr= m.x208 - 5*m.x415 == 0)
m.c354 = Constraint(expr=m.x104**2 - m.x416 == 0)
m.c355 = Constraint(expr= m.x211 - 4*m.x416 == 0)
m.c356 = Constraint(expr=m.x106**2 - m.x417 == 0)
m.c357 = Constraint(expr= m.x214 - 4*m.x417 == 0)
m.c358 = Constraint(expr=m.x108**2 - m.x418 == 0)
m.c359 = Constraint(expr= m.x217 - 4*m.x418 == 0)
m.c360 = Constraint(expr=m.x113**2 - m.x419 == 0)
m.c361 = Constraint(expr= m.x219 - 5*m.x419 == 0)
m.c362 = Constraint(expr=m.x115**2 - m.x420 == 0)
m.c363 = Constraint(expr= m.x221 - 5*m.x420 == 0)
m.c364 = Constraint(expr=m.x117**2 - m.x421 == 0)
m.c365 = Constraint(expr= m.x223 - 5*m.x421 == 0)
m.c366 = Constraint(expr=m.x140**2 - m.x422 == 0)
m.c367 = Constraint(expr= m.x143 - m.x422 == 0)
m.c368 = Constraint(expr=m.x140**3 - m.x423 == 0)
m.c369 = Constraint(expr= m.x282 - m.x423 == 0)
m.c370 = Constraint(expr=m.x142**2 - m.x424 == 0)
m.c371 = Constraint(expr= m.x151 - m.x424 == 0)
m.c372 = Constraint(expr=m.x142**3 - m.x425 == 0)
m.c373 = Constraint(expr= m.x287 - m.x425 == 0)
m.c374 = Constraint(expr=m.x144**2 - m.x426 == 0)
m.c375 = Constraint(expr= m.x159 - m.x426 == 0)
m.c376 = Constraint(expr=m.x144**3 - m.x427 == 0)
m.c377 = Constraint(expr= m.x292 - m.x427 == 0)
m.c378 = Constraint(expr=m.x146**2 - m.x428 == 0)
m.c379 = Constraint(expr= m.x167 - m.x428 == 0)
m.c380 = Constraint(expr=m.x146**3 - m.x429 == 0)
m.c381 = Constraint(expr= m.x297 - m.x429 == 0)
m.c382 = Constraint(expr=m.x148**2 - m.x430 == 0)
m.c383 = Constraint(expr= m.x175 - m.x430 == 0)
m.c384 = Constraint(expr=m.x148**3 - m.x431 == 0)
m.c385 = Constraint(expr= m.x302 - m.x431 == 0)
m.c386 = Constraint(expr=m.x150**2 - m.x432 == 0)
m.c387 = Constraint(expr= m.x181 - m.x432 == 0)
m.c388 = Constraint(expr=m.x150**3 - m.x433 == 0)
m.c389 = Constraint(expr= m.x307 - m.x433 == 0)
m.c390 = Constraint(expr=m.x152**2 - m.x434 == 0)
m.c391 = Constraint(expr= m.x187 - m.x434 == 0)
m.c392 = Constraint(expr=m.x152**3 - m.x435 == 0)
m.c393 = Constraint(expr= m.x312 - m.x435 == 0)
m.c394 = Constraint(expr=m.x154**2 - m.x436 == 0)
m.c395 = Constraint(expr= m.x191 - m.x436 == 0)
m.c396 = Constraint(expr=m.x154**3 - m.x437 == 0)
m.c397 = Constraint(expr= m.x317 - m.x437 == 0)
m.c398 = Constraint(expr=m.x156**2 - m.x438 == 0)
m.c399 = Constraint(expr= m.x30 - m.x438 == 0)
m.c400 = Constraint(expr=m.x156**3 - m.x439 == 0)
m.c401 = Constraint(expr= m.x322 - m.x439 == 0)
m.c402 = Constraint(expr=m.x158**2 - m.x440 == 0)
m.c403 = Constraint(expr= m.x35 - m.x440 == 0)
m.c404 = Constraint(expr=m.x158**3 - m.x441 == 0)
m.c405 = Constraint(expr= m.x327 - m.x441 == 0)
m.c406 = Constraint(expr=m.x160**2 - m.x442 == 0)
m.c407 = Constraint(expr= m.x37 - m.x442 == 0)
m.c408 = Constraint(expr=m.x160**3 - m.x443 == 0)
m.c409 = Constraint(expr= m.x332 - m.x443 == 0)
m.c410 = Constraint(expr=m.x162**2 - m.x444 == 0)
m.c411 = Constraint(expr= m.x42 - m.x444 == 0)
m.c412 = Constraint(expr=m.x162**3 - m.x445 == 0)
m.c413 = Constraint(expr= m.x337 - m.x445 == 0)
m.c414 = Constraint(expr=m.x164**2 - m.x446 == 0)
m.c415 = Constraint(expr= m.x46 - m.x446 == 0)
m.c416 = Constraint(expr=m.x164**3 - m.x447 == 0)
m.c417 = Constraint(expr= m.x342 - m.x447 == 0)
m.c418 = Constraint(expr=m.x166**2 - m.x448 == 0)
m.c419 = Constraint(expr= m.x48 - m.x448 == 0)
m.c420 = Constraint(expr=m.x166**3 - m.x449 == 0)
m.c421 = Constraint(expr= m.x344 - m.x449 == 0)
m.c422 = Constraint(expr=m.x168**2 - m.x450 == 0)
m.c423 = Constraint(expr= m.x52 - m.x450 == 0)
m.c424 = Constraint(expr=m.x168**3 - m.x451 == 0)
m.c425 = Constraint(expr= m.x352 - m.x451 == 0)
m.c426 = Constraint(expr=m.x170**2 - m.x452 == 0)
m.c427 = Constraint(expr= m.x56 - m.x452 == 0)
m.c428 = Constraint(expr=m.x170**3 - m.x453 == 0)
m.c429 = Constraint(expr= m.x357 - m.x453 == 0)
m.c430 = Constraint(expr=m.x172**2 - m.x454 == 0)
m.c431 = Constraint(expr= m.x58 - m.x454 == 0)
m.c432 = Constraint(expr=m.x172**3 - m.x455 == 0)
m.c433 = Constraint(expr= m.x362 - m.x455 == 0)
m.c434 = Constraint(expr=m.x174**2 - m.x456 == 0)
m.c435 = Constraint(expr= m.x64 - m.x456 == 0)
m.c436 = Constraint(expr=m.x174**3 - m.x457 == 0)
m.c437 = Constraint(expr= m.x367 - m.x457 == 0)
m.c438 = Constraint(expr=m.x176**2 - m.x458 == 0)
m.c439 = Constraint(expr= m.x67 - m.x458 == 0)
m.c440 = Constraint(expr=m.x176**3 - m.x459 == 0)
m.c441 = Constraint(expr= m.x372 - m.x459 == 0)
m.c442 = Constraint(expr=m.x178**2 - m.x460 == 0)
m.c443 = Constraint(expr= m.x69 - m.x460 == 0)
m.c444 = Constraint(expr=m.x178**3 - m.x461 == 0)
m.c445 = Constraint(expr= m.x377 - m.x461 == 0)
m.c446 = Constraint(expr=m.x180**2 - m.x462 == 0)
m.c447 = Constraint(expr= m.x73 - m.x462 == 0)
m.c448 = Constraint(expr=m.x180**3 - m.x463 == 0)
m.c449 = Constraint(expr= m.x382 - m.x463 == 0)
m.c450 = Constraint(expr=m.x182**2 - m.x464 == 0)
m.c451 = Constraint(expr= m.x76 - m.x464 == 0)
m.c452 = Constraint(expr=m.x182**3 - m.x465 == 0)
m.c453 = Constraint(expr= m.x387 - m.x465 == 0)
m.c454 = Constraint(expr=m.x184**2 - m.x466 == 0)
m.c455 = Constraint(expr= m.x81 - m.x466 == 0)
m.c456 = Constraint(expr=m.x184**3 - m.x467 == 0)
m.c457 = Constraint(expr= m.x392 - m.x467 == 0)
m.c458 = Constraint(expr=m.x186**2 - m.x468 == 0)
m.c459 = Constraint(expr= m.x85 - m.x468 == 0)
m.c460 = Constraint(expr=m.x186**3 - m.x469 == 0)
m.c461 = Constraint(expr= m.x397 - m.x469 == 0)
m.c462 = Constraint(expr=m.x188**2 - m.x470 == 0)
m.c463 = Constraint(expr= m.x87 - m.x470 == 0)
m.c464 = Constraint(expr=m.x188**3 - m.x471 == 0)
m.c465 = Constraint(expr= m.x402 - m.x471 == 0)
m.c466 = Constraint(expr=m.x190**2 - m.x472 == 0)
m.c467 = Constraint(expr= m.x90 - m.x472 == 0)
m.c468 = Constraint(expr=m.x190**3 - m.x473 == 0)
m.c469 = Constraint(expr= m.x407 - m.x473 == 0)
m.c470 = Constraint(expr=m.x192**2 - m.x474 == 0)
m.c471 = Constraint(expr= m.x94 - m.x474 == 0)
m.c472 = Constraint(expr=m.x192**3 - m.x475 == 0)
m.c473 = Constraint(expr= m.x412 - m.x475 == 0)
m.c474 = Constraint(expr=m.x140*m.x263 - m.x145 == 0)
m.c475 = Constraint(expr=m.x263*m.x422 - m.x281 == 0)
m.c476 = Constraint(expr=m.x146*m.x263 - m.x169 == 0)
m.c477 = Constraint(expr=m.x263*m.x428 - m.x296 == 0)
m.c478 = Constraint(expr=m.x152*m.x263 - m.x185 == 0)
m.c479 = Constraint(expr=m.x263*m.x434 - m.x311 == 0)
m.c480 = Constraint(expr=m.x263**2 - m.x476 == 0)
m.c481 = Constraint(expr= m.x147 - m.x476 == 0)
m.c482 = Constraint(expr=m.x140*m.x476 - m.x280 == 0)
m.c483 = Constraint(expr=m.x146*m.x476 - m.x295 == 0)
m.c484 = Constraint(expr=m.x152*m.x476 - m.x310 == 0)
m.c485 = Constraint(expr=m.x263**3 - m.x477 == 0)
m.c486 = Constraint(expr=m.b2*m.x477 - m.x279 == 0)
m.c487 = Constraint(expr=m.b5*m.x477 - m.x294 == 0)
m.c488 = Constraint(expr=m.b8*m.x477 - m.x309 == 0)
m.c489 = Constraint(expr=m.x142*m.x264 - m.x155 == 0)
m.c490 = Constraint(expr=m.x264*m.x424 - m.x286 == 0)
m.c491 = Constraint(expr=m.x148*m.x264 - m.x173 == 0)
m.c492 = Constraint(expr=m.x264*m.x430 - m.x301 == 0)
m.c493 = Constraint(expr=m.x154*m.x264 - m.x193 == 0)
m.c494 = Constraint(expr=m.x264*m.x436 - m.x316 == 0)
m.c495 = Constraint(expr=m.x264**2 - m.x478 == 0)
m.c496 = Constraint(expr= m.x153 - m.x478 == 0)
m.c497 = Constraint(expr=m.x142*m.x478 - m.x285 == 0)
m.c498 = Constraint(expr=m.x148*m.x478 - m.x300 == 0)
m.c499 = Constraint(expr=m.x154*m.x478 - m.x315 == 0)
m.c500 = Constraint(expr=m.x264**3 - m.x479 == 0)
m.c501 = Constraint(expr=m.b3*m.x479 - m.x284 == 0)
m.c502 = Constraint(expr=m.b6*m.x479 - m.x299 == 0)
m.c503 = Constraint(expr=m.b9*m.x479 - m.x314 == 0)
m.c504 = Constraint(expr=m.x144*m.x265 - m.x163 == 0)
m.c505 = Constraint(expr=m.x265*m.x426 - m.x291 == 0)
m.c506 = Constraint(expr=m.x150*m.x265 - m.x179 == 0)
m.c507 = Constraint(expr=m.x265*m.x432 - m.x306 == 0)
m.c508 = Constraint(expr=m.x156*m.x265 - m.x31 == 0)
m.c509 = Constraint(expr=m.x265*m.x438 - m.x321 == 0)
m.c510 = Constraint(expr=m.x265**2 - m.x480 == 0)
m.c511 = Constraint(expr= m.x161 - m.x480 == 0)
m.c512 = Constraint(expr=m.x144*m.x480 - m.x290 == 0)
m.c513 = Constraint(expr=m.x150*m.x480 - m.x305 == 0)
m.c514 = Constraint(expr=m.x156*m.x480 - m.x320 == 0)
m.c515 = Constraint(expr=m.x265**3 - m.x481 == 0)
m.c516 = Constraint(expr=m.b4*m.x481 - m.x289 == 0)
m.c517 = Constraint(expr=m.b7*m.x481 - m.x304 == 0)
m.c518 = Constraint(expr=m.b10*m.x481 - m.x319 == 0)
m.c519 = Constraint(expr=m.x158*m.x266 - m.x34 == 0)
m.c520 = Constraint(expr=m.x266*m.x440 - m.x326 == 0)
m.c521 = Constraint(expr=m.x164*m.x266 - m.x45 == 0)
m.c522 = Constraint(expr=m.x266*m.x446 - m.x341 == 0)
m.c523 = Constraint(expr=m.x266**2 - m.x482 == 0)
m.c524 = Constraint(expr= m.x33 - m.x482 == 0)
m.c525 = Constraint(expr=m.x158*m.x482 - m.x325 == 0)
m.c526 = Constraint(expr=m.x164*m.x482 - m.x340 == 0)
m.c527 = Constraint(expr=m.x266**3 - m.x483 == 0)
m.c528 = Constraint(expr=m.b11*m.x483 - m.x324 == 0)
m.c529 = Constraint(expr=m.b14*m.x483 - m.x339 == 0)
m.c530 = Constraint(expr=m.x160*m.x267 - m.x39 == 0)
m.c531 = Constraint(expr=m.x267*m.x442 - m.x331 == 0)
m.c532 = Constraint(expr=m.x166*m.x267 - m.x49 == 0)
m.c533 = Constraint(expr=m.x267*m.x448 - m.x343 == 0)
m.c534 = Constraint(expr=m.x267**2 - m.x484 == 0)
m.c535 = Constraint(expr= m.x38 - m.x484 == 0)
m.c536 = Constraint(expr=m.x160*m.x484 - m.x330 == 0)
m.c537 = Constraint(expr=m.x166*m.x484 - m.x347 == 0)
m.c538 = Constraint(expr=m.x267**3 - m.x485 == 0)
m.c539 = Constraint(expr=m.b12*m.x485 - m.x329 == 0)
m.c540 = Constraint(expr=m.b15*m.x485 - m.x346 == 0)
m.c541 = Constraint(expr=m.x162*m.x268 - m.x41 == 0)
m.c542 = Constraint(expr=m.x268*m.x444 - m.x336 == 0)
m.c543 = Constraint(expr=m.x168*m.x268 - m.x51 == 0)
m.c544 = Constraint(expr=m.x268*m.x450 - m.x351 == 0)
m.c545 = Constraint(expr=m.x268**2 - m.x486 == 0)
m.c546 = Constraint(expr= m.x43 - m.x486 == 0)
m.c547 = Constraint(expr=m.x162*m.x486 - m.x335 == 0)
m.c548 = Constraint(expr=m.x168*m.x486 - m.x350 == 0)
m.c549 = Constraint(expr=m.x268**3 - m.x487 == 0)
m.c550 = Constraint(expr=m.b13*m.x487 - m.x334 == 0)
m.c551 = Constraint(expr=m.b16*m.x487 - m.x349 == 0)
m.c552 = Constraint(expr=m.x170*m.x269 - m.x54 == 0)
m.c553 = Constraint(expr=m.x269*m.x452 - m.x356 == 0)
m.c554 = Constraint(expr=m.x176*m.x269 - m.x66 == 0)
m.c555 = Constraint(expr=m.x269*m.x458 - m.x371 == 0)
m.c556 = Constraint(expr=m.x269**2 - m.x488 == 0)
m.c557 = Constraint(expr= m.x55 - m.x488 == 0)
m.c558 = Constraint(expr=m.x170*m.x488 - m.x355 == 0)
m.c559 = Constraint(expr=m.x176*m.x488 - m.x370 == 0)
m.c560 = Constraint(expr=m.x269**3 - m.x489 == 0)
m.c561 = Constraint(expr=m.b17*m.x489 - m.x354 == 0)
m.c562 = Constraint(expr=m.b20*m.x489 - m.x369 == 0)
m.c563 = Constraint(expr=m.x172*m.x270 - m.x59 == 0)
m.c564 = Constraint(expr=m.x270*m.x454 - m.x361 == 0)
m.c565 = Constraint(expr=m.x178*m.x270 - m.x70 == 0)
m.c566 = Constraint(expr=m.x270*m.x460 - m.x376 == 0)
m.c567 = Constraint(expr=m.x270**2 - m.x490 == 0)
m.c568 = Constraint(expr= m.x60 - m.x490 == 0)
m.c569 = Constraint(expr=m.x172*m.x490 - m.x360 == 0)
m.c570 = Constraint(expr=m.x178*m.x490 - m.x375 == 0)
m.c571 = Constraint(expr=m.x270**3 - m.x491 == 0)
m.c572 = Constraint(expr=m.b18*m.x491 - m.x359 == 0)
m.c573 = Constraint(expr=m.b21*m.x491 - m.x374 == 0)
m.c574 = Constraint(expr=m.x174*m.x271 - m.x63 == 0)
m.c575 = Constraint(expr=m.x271*m.x456 - m.x366 == 0)
m.c576 = Constraint(expr=m.x180*m.x271 - m.x72 == 0)
m.c577 = Constraint(expr=m.x271*m.x462 - m.x381 == 0)
m.c578 = Constraint(expr=m.x271**2 - m.x492 == 0)
m.c579 = Constraint(expr= m.x62 - m.x492 == 0)
m.c580 = Constraint(expr=m.x174*m.x492 - m.x365 == 0)
m.c581 = Constraint(expr=m.x180*m.x492 - m.x380 == 0)
m.c582 = Constraint(expr=m.x271**3 - m.x493 == 0)
m.c583 = Constraint(expr=m.b19*m.x493 - m.x364 == 0)
m.c584 = Constraint(expr=m.b22*m.x493 - m.x379 == 0)
m.c585 = Constraint(expr=m.x182*m.x272 - m.x75 == 0)
m.c586 = Constraint(expr=m.x272*m.x464 - m.x386 == 0)
m.c587 = Constraint(expr=m.x188*m.x272 - m.x88 == 0)
m.c588 = Constraint(expr=m.x272*m.x470 - m.x401 == 0)
m.c589 = Constraint(expr=m.x272**2 - m.x494 == 0)
m.c590 = Constraint(expr= m.x77 - m.x494 == 0)
m.c591 = Constraint(expr=m.x182*m.x494 - m.x385 == 0)
m.c592 = Constraint(expr=m.x188*m.x494 - m.x400 == 0)
m.c593 = Constraint(expr=m.x272**3 - m.x495 == 0)
m.c594 = Constraint(expr=m.b23*m.x495 - m.x384 == 0)
m.c595 = Constraint(expr=m.b26*m.x495 - m.x399 == 0)
m.c596 = Constraint(expr=m.x184*m.x273 - m.x79 == 0)
m.c597 = Constraint(expr=m.x273*m.x466 - m.x391 == 0)
m.c598 = Constraint(expr=m.x190*m.x273 - m.x91 == 0)
m.c599 = Constraint(expr=m.x273*m.x472 - m.x406 == 0)
m.c600 = Constraint(expr=m.x273**2 - m.x496 == 0)
m.c601 = Constraint(expr= m.x80 - m.x496 == 0)
m.c602 = Constraint(expr=m.x184*m.x496 - m.x390 == 0)
m.c603 = Constraint(expr=m.x190*m.x496 - m.x405 == 0)
m.c604 = Constraint(expr=m.x273**3 - m.x497 == 0)
m.c605 = Constraint(expr=m.b24*m.x497 - m.x389 == 0)
m.c606 = Constraint(expr=m.b27*m.x497 - m.x404 == 0)
m.c607 = Constraint(expr=m.x186*m.x274 - m.x83 == 0)
m.c608 = Constraint(expr=m.x274*m.x468 - m.x396 == 0)
m.c609 = Constraint(expr=m.x192*m.x274 - m.x93 == 0)
m.c610 = Constraint(expr=m.x274*m.x474 - m.x411 == 0)
m.c611 = Constraint(expr=m.x274**2 - m.x498 == 0)
m.c612 = Constraint(expr= m.x84 - m.x498 == 0)
m.c613 = Constraint(expr=m.x186*m.x498 - m.x395 == 0)
m.c614 = Constraint(expr=m.x192*m.x498 - m.x410 == 0)
m.c615 = Constraint(expr=m.x274**3 - m.x499 == 0)
m.c616 = Constraint(expr=m.b25*m.x499 - m.x394 == 0)
m.c617 = Constraint(expr=m.b28*m.x499 - m.x409 == 0)
| 38.381299 | 117 | 0.65222 |
4f1962a17cac6f1062784a436f0dc596698d5497 | 10,068 | lua | Lua | garrysmod/gamemodes/darkrp/plugins/monolet/entities/entities/monolith/cl_init.lua | Kek1ch/Kek1ch | fa545ac1c261c20639ba7a7119ccd7aa4aaacbdc | [
"Apache-2.0"
] | 7 | 2019-06-15T09:10:59.000Z | 2021-11-21T18:15:03.000Z | garrysmod/gamemodes/darkrp/plugins/monolet/entities/entities/monolith/cl_init.lua | Kek1ch/Kek1ch | fa545ac1c261c20639ba7a7119ccd7aa4aaacbdc | [
"Apache-2.0"
] | null | null | null | garrysmod/gamemodes/darkrp/plugins/monolet/entities/entities/monolith/cl_init.lua | Kek1ch/Kek1ch | fa545ac1c261c20639ba7a7119ccd7aa4aaacbdc | [
"Apache-2.0"
] | 6 | 2019-06-15T08:33:15.000Z | 2020-10-25T07:50:32.000Z | include('shared.lua')
function ENT:Initialize()
local trace = {}
trace.start = self.Entity:GetPos()
trace.endpos = trace.start + Vector( 0, 0, -500 )
trace.filter = self.Entity
local tr = util.TraceLine( trace )
self.Normal = tr.HitNormal
self.Timer = 0
self.BurnTime = 0
self.Size = 150
self.Emitter = ParticleEmitter( self.Entity:GetPos() )
end
function ENT:Think()
local dist = LocalPlayer():GetPos():Distance(self:GetPos())
if(dist < 6000) then
if self.Timer < CurTime() then
self.Emitter = ParticleEmitter( self:GetPos() )
if math.random(1,1) > 0.1 then
local particle = self.Emitter:Add( "effects/yellowflare", self:GetPos() + VectorRand() * 30 )
particle:SetVelocity( self.Normal * 300 + VectorRand() * 70 + Vector(0,0,360) )
particle:SetLifeTime( 0 )
particle:SetDieTime( math.Rand( 1, 1.2 ) )
particle:SetStartAlpha( 255 )
particle:SetEndAlpha( 255 )
particle:SetStartSize( math.random( 20, 30 ) )
particle:SetEndSize( 0 )
particle:SetColor( 0, 222, 225 )
particle:SetAirResistance( 100 )
particle:SetGravity( Vector( 100, 100, 100 ) )
end
particle = self.Emitter:Add( "effects/yellowflare", self:GetPos() + VectorRand() * 120 )
particle:SetVelocity( self.Normal * 400 + VectorRand() * 120 + Vector(0,0,90) )
particle:SetLifeTime( 0 )
particle:SetDieTime( math.Rand( 1.0, 1.5 ) )
particle:SetStartAlpha( 255 )
particle:SetEndAlpha( 100 )
particle:SetStartSize( math.random( 10, 15 ) )
particle:SetEndSize( 0 )
particle:SetColor( 0, 222, 225 )
particle:SetAirResistance( 1000 )
particle:SetGravity( Vector( 0, 0, 100 ) )
particle = self.Emitter:Add( "effects/yellowflare", self:GetPos() + VectorRand() * 160 )
particle:SetVelocity( self.Normal * 120 + VectorRand() * 180 + Vector(0,0,40) )
particle:SetLifeTime( 0 )
particle:SetDieTime( math.Rand( 2.5, 2.5 ) )
particle:SetStartAlpha( 200 )
particle:SetEndAlpha( 100 )
particle:SetStartSize( math.random( 10, 15 ) )
particle:SetEndSize( 0 )
particle:SetRoll( math.Rand( -360, 360 ) )
particle:SetRollDelta( math.Rand( -5, 5 ) )
particle:SetColor( 0, 222, 225 )
particle:SetAirResistance( 20 )
particle:SetGravity( Vector( 0, 0, 100 ) )
particle = self.Emitter:Add( "effects/yellowflare", self:GetPos() + VectorRand() * 160 )
particle:SetVelocity( self.Normal * 120 + VectorRand() * 180 + Vector(0,0,40) )
particle:SetLifeTime( 0 )
particle:SetDieTime( math.Rand( 2.5, 2.5 ) )
particle:SetStartAlpha( 200 )
particle:SetEndAlpha( 100 )
particle:SetStartSize( math.random( 10, 15 ) )
particle:SetEndSize( 0 )
particle:SetRoll( math.Rand( -360, 360 ) )
particle:SetRollDelta( math.Rand( -5, 5 ) )
particle:SetColor( 0, 222, 225 )
particle:SetAirResistance( 20 )
particle:SetGravity( Vector( 0, 0, 100 ) )
particle = self.Emitter:Add( "effects/yellowflare", self:GetPos() + VectorRand() * 160 )
particle:SetVelocity( self.Normal * 120 + VectorRand() * 180 + Vector(0,0,40) )
particle:SetLifeTime( 0 )
particle:SetDieTime( math.Rand( 2.5, 2.5 ) )
particle:SetStartAlpha( 200 )
particle:SetEndAlpha( 100 )
particle:SetStartSize( math.random( 10, 15 ) )
particle:SetEndSize( 0 )
particle:SetRoll( math.Rand( -360, 360 ) )
particle:SetRollDelta( math.Rand( -5, 5 ) )
particle:SetColor( 0, 222, 225 )
particle:SetAirResistance( 20 )
particle:SetGravity( Vector( 0, 0, 100 ) )
particle = self.Emitter:Add( "effects/yellowflare", self:GetPos() + VectorRand() * 160 )
particle:SetVelocity( self.Normal * 120 + VectorRand() * 180 + Vector(0,0,40) )
particle:SetLifeTime( 0 )
particle:SetDieTime( math.Rand( 2.5, 2.5 ) )
particle:SetStartAlpha( 200 )
particle:SetEndAlpha( 100 )
particle:SetStartSize( math.random( 20, 50 ) )
particle:SetEndSize( 0 )
particle:SetRoll( math.Rand( -360, 360 ) )
particle:SetRollDelta( math.Rand( -5, 5 ) )
particle:SetColor( 0, 222, 225 )
particle:SetAirResistance( 20 )
particle:SetGravity( Vector( 0, 0, 100 ) )
particle = self.Emitter:Add( "effects/yellowflare", self:GetPos() + VectorRand() * 160 )
particle:SetVelocity( self.Normal * 120 + VectorRand() * 180 + Vector(0,0,40) )
particle:SetLifeTime( 0 )
particle:SetDieTime( math.Rand( 2.5, 2.5 ) )
particle:SetStartAlpha( 200 )
particle:SetEndAlpha( 100 )
particle:SetStartSize( math.random( 10, 15 ) )
particle:SetEndSize( 0 )
particle:SetRoll( math.Rand( -360, 360 ) )
particle:SetRollDelta( math.Rand( -5, 5 ) )
particle:SetColor( 0, 222, 225 )
particle:SetAirResistance( 20 )
particle:SetGravity( Vector( 0, 0, 100 ) )
particle = self.Emitter:Add( "effects/combinemuzzle2", self:GetPos() + VectorRand() * 160 )
particle:SetVelocity( self.Normal * 120 + VectorRand() * 180 + Vector(0,0,40) )
particle:SetLifeTime( 0 )
particle:SetDieTime( math.Rand( 2.5, 2.5 ) )
particle:SetStartAlpha( 200 )
particle:SetEndAlpha( 100 )
particle:SetStartSize( math.random( 10, 15 ) )
particle:SetEndSize( 0 )
particle:SetRoll( math.Rand( -360, 360 ) )
particle:SetRollDelta( math.Rand( -5, 5 ) )
particle:SetColor( 0, 222, 225 )
particle:SetAirResistance( 20 )
particle:SetGravity( Vector( 0, 0, 100 ) )
particle = self.Emitter:Add( "effects/ar2_altfire1", self:GetPos() + VectorRand() * 160 )
particle:SetVelocity( self.Normal * 120 + VectorRand() * 180 + Vector(0,0,40) )
particle:SetLifeTime( 0 )
particle:SetDieTime( math.Rand( 2.5, 2.5 ) )
particle:SetStartAlpha( 200 )
particle:SetEndAlpha( 100 )
particle:SetStartSize( math.random( 10, 15 ) )
particle:SetEndSize( 0 )
particle:SetRoll( math.Rand( -360, 360 ) )
particle:SetRollDelta( math.Rand( -5, 5 ) )
particle:SetColor( 0, 222, 225 )
particle:SetAirResistance( 20 )
particle:SetGravity( Vector( 0, 0, 100 ) )
particle = self.Emitter:Add( "effects/strider_muzzle", self:GetPos() + VectorRand() * 160 )
particle:SetVelocity( self.Normal * 120 + VectorRand() * 180 + Vector(0,0,40) )
particle:SetLifeTime( 0 )
particle:SetDieTime( math.Rand( 2.5, 2.5 ) )
particle:SetStartAlpha( 200 )
particle:SetEndAlpha( 100 )
particle:SetStartSize( math.random( 10, 15 ) )
particle:SetEndSize( 0 )
particle:SetRoll( math.Rand( -360, 360 ) )
particle:SetRollDelta( math.Rand( -5, 5 ) )
particle:SetColor( 0, 222, 225 )
particle:SetAirResistance( 20 )
particle:SetGravity( Vector( 0, 0, 100 ) )
particle = self.Emitter:Add( "effects/rollerglow", self:GetPos() + VectorRand() * 160 )
particle:SetVelocity( self.Normal * 120 + VectorRand() * 180 + Vector(0,0,40) )
particle:SetLifeTime( 0 )
particle:SetDieTime( math.Rand( 2.5, 2.5 ) )
particle:SetStartAlpha( 200 )
particle:SetEndAlpha( 100 )
particle:SetStartSize( math.random( 10, 15 ) )
particle:SetEndSize( 0 )
particle:SetRoll( math.Rand( -360, 360 ) )
particle:SetRollDelta( math.Rand( -5, 5 ) )
particle:SetColor( 0, 222, 225 )
particle:SetAirResistance( 20 )
particle:SetGravity( Vector( 0, 0, 100 ) )
particle = self.Emitter:Add( "effects/stunstick", self:GetPos() + VectorRand() * 160 )
particle:SetVelocity( self.Normal * 120 + VectorRand() * 180 + Vector(0,0,40) )
particle:SetLifeTime( 0 )
particle:SetDieTime( math.Rand( 2.5, 2.5 ) )
particle:SetStartAlpha( 200 )
particle:SetEndAlpha( 100 )
particle:SetStartSize( math.random( 10, 15 ) )
particle:SetEndSize( 0 )
particle:SetRoll( math.Rand( -360, 360 ) )
particle:SetRollDelta( math.Rand( -5, 5 ) )
particle:SetColor( 0, 222, 225 )
particle:SetAirResistance( 20 )
particle:SetGravity( Vector( 0, 0, 100 ) )
particle = self.Emitter:Add( "effects/gunshipmuzzle", self:GetPos() + VectorRand() * 160 )
particle:SetVelocity( self.Normal * 120 + VectorRand() * 180 + Vector(0,0,40) )
particle:SetLifeTime( 0 )
particle:SetDieTime( math.Rand( 2.5, 2.5 ) )
particle:SetStartAlpha( 200 )
particle:SetEndAlpha( 100 )
particle:SetStartSize( math.random( 10, 15 ) )
particle:SetEndSize( 0 )
particle:SetRoll( math.Rand( -360, 360 ) )
particle:SetRollDelta( math.Rand( -5, 5 ) )
particle:SetColor( 0, 222, 225 )
particle:SetAirResistance( 20 )
particle:SetGravity( Vector( 0, 0, 100 ) )
self.FireLight1 = DynamicLight(self:EntIndex())
if ( self.FireLight1 ) then
self.FireLight1.Pos = self:GetPos()
self.FireLight1.r = 0
self.FireLight1.g = 222
self.FireLight1.b = 225
self.FireLight1.Brightness = 6
self.FireLight1.Size = 1000
self.FireLight1.Decay = 10
self.FireLight1.DieTime = CurTime() + 1
end
self.Timer = CurTime() + 0.5
end
if self:GetNWBool( "Burn" ) == true then
local particle = self.Emitter:Add( "effects/muzzleflash"..math.random(1,4), self.Entity:GetPos() + self.Normal * -5 )
particle:SetVelocity( self.Normal * 150 + VectorRand() * 30 )
particle:SetLifeTime( 0 )
particle:SetDieTime( math.Rand( 0.5, 1.0 ) )
particle:SetStartAlpha( 255 )
particle:SetEndAlpha( 0 )
particle:SetStartSize( math.random( 60, 80 ) )
particle:SetEndSize( math.random( 90, 100 ) )
particle:SetColor( 209, 21, 46 )
particle:SetRoll( math.Rand( -360, 360 ) )
particle:SetRollDelta( math.Rand( -5, 5 ) )
particle:SetAirResistance( 0 )
particle:SetGravity( Vector( 0, 0, 50 ) )
end
end
end
function ENT:IsTranslucent()
return false
end
| 27.812155 | 121 | 0.626937 |
c20fed00970005a1ba0d5d3a4622b1a824e81ad5 | 681 | go | Go | test/foo/foo.go | n3wscott/boa | 535a33e30a0724161d454e40ce1fb5baafcbdf84 | [
"Apache-2.0"
] | 1 | 2021-01-13T23:43:10.000Z | 2021-01-13T23:43:10.000Z | pkg/foo/foo.go | n3wscott/cli-base | 40d38c556506220a7763ddf9ee5847361483fc52 | [
"Apache-2.0"
] | null | null | null | pkg/foo/foo.go | n3wscott/cli-base | 40d38c556506220a7763ddf9ee5847361483fc52 | [
"Apache-2.0"
] | null | null | null | package foo
import (
"context"
"encoding/json"
"fmt"
"github.com/fatih/color"
"github.com/gosuri/uitable"
)
type Foo struct {
List bool
Output string
}
func (f *Foo) Do(ctx context.Context) error {
if f.List {
return f.DoList(ctx)
}
return nil
}
func (f *Foo) DoList(ctx context.Context) error {
foos := []string{"foo1", "foo2", "foo3"}
switch f.Output {
case "json":
b, err := json.Marshal(foos)
if err != nil {
return err
}
fmt.Println(string(b))
default:
tbl := uitable.New()
tbl.Separator = " "
tbl.AddRow("Index", "Value")
for k, v := range foos {
tbl.AddRow(k, v)
}
_, _ = fmt.Fprintln(color.Output, tbl)
}
return nil
}
| 14.489362 | 49 | 0.61674 |
8572ba9487c16450f7c151c4ec6150a86df3f4a3 | 30,215 | js | JavaScript | out/_next/static/chunks/b67bbb58858709413da2ad1fb5651769f5ebb953.bb51459500e8663c6e6e.js | amertoumi/it-next-front | 113e67d408a3a5ffda3968a5bf7cb94da5558f5f | [
"MIT"
] | null | null | null | out/_next/static/chunks/b67bbb58858709413da2ad1fb5651769f5ebb953.bb51459500e8663c6e6e.js | amertoumi/it-next-front | 113e67d408a3a5ffda3968a5bf7cb94da5558f5f | [
"MIT"
] | null | null | null | out/_next/static/chunks/b67bbb58858709413da2ad1fb5651769f5ebb953.bb51459500e8663c6e6e.js | amertoumi/it-next-front | 113e67d408a3a5ffda3968a5bf7cb94da5558f5f | [
"MIT"
] | null | null | null | (window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[11],{"4WCC":function(e,t,n){"use strict";var r={};e.exports={getItem:function(e){return e in r?r[e]:null},setItem:function(e,t){return r[e]=t,!0},removeItem:function(e){return!!(e in r)&&delete r[e]},clear:function(){return r={},!0}}},"89Ax":function(e,t,n){"use strict";n.d(t,"b",(function(){return w})),n.d(t,"a",(function(){return N}));var r=n("o0o1"),a=n.n(r),i=n("HaE+"),o=n("rePB"),s=n("nKUr"),c=n("q1tI"),l=n.n(c);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){Object(o.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p=n("bBbg"),h=n("vDqi"),b=n.n(h),f=n("TdDX"),j=n.n(f),g=n("EjJx"),m=n("20a2"),O=n.n(m);function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){Object(o.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var y=function(e,t,n){var r=l.a.createContext();return{Context:r,Provider:function(a){var i=a.children,o=Object(c.useReducer)(e,n),l=o[0],d=o[1],p={};for(var h in t)p[h]=t[h](d);return Object(s.jsx)(r.Provider,{value:u({state:l},p),children:i})}}}((function(e,t){switch(t.type){case"ADD_ERROR":return x(x({},e),{},{errorMessage:t.payload});case"SIGNUP":return x(x({},e),{},{errorMessage:"",token:t.payload.token});case"SIGNIN":return x(x({},e),{},{errorMessage:"",token:t.payload});case"CLEAR_ERROR_MESSAGE":return x(x({},e),{},{errorMessage:""});case"IS_AUTH":case"SIGNOUT":return{token:null,errorMessage:"",currentUser:0};case"USER":return x(x({},e),{},{currentUser:t.payload});default:return e}}),{signin:function(e){return function(){var t=Object(i.a)(a.a.mark((function t(n){var r,i,o,s,c,l,d,u;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=p.p+p.g,t.prev=1,t.next=4,b.a.post(r,n);case 4:return i=t.sent,t.next=7,j.a.set("token",i.data.token);case 7:return t.next=9,j.a.get("token");case 9:return o=t.sent,t.next=12,Object(g.a)(o);case 12:return s=t.sent,c=s.id,j.a.set("currentUser",c),e({type:"SIGNIN",payload:i.data.token}),l=Object(g.a)(o),d=l.roles,u=Object(g.a)(o),1==u.isActive?"ROLE_ADMIN"===d[0]?O.a.push("/admin/dashboard"):"ROLE_RECR"===d[0]?O.a.push("/recruiter/profil"):"ROLE_USER"===d[0]?O.a.push("/user/profil"):O.a.push("/home"):O.a.push("/inscription_client"),t.abrupt("return",!0);case 22:t.prev=22,t.t0=t.catch(1),console.log("failed"),e({type:"ADD_ERROR",payload:"adresse e-mail ou mot de passe n'est pas valide"});case 26:case"end":return t.stop()}}),t,null,[[1,22]])})));return function(e){return t.apply(this,arguments)}}()},signout:function(e){return Object(i.a)(a.a.mark((function t(){return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,j.a.remove("token");case 2:j.a.remove("currentUser"),delete b.a.defaults.headers.Authorization,e({type:"SIGNOUT"}),O.a.push("/home");case 6:case"end":return t.stop()}}),t)})))},is_Authenticated:function(e){var t=j.a.get("token");t&&(1e3*Object(g.a)(t).exp>(new Date).getTime()?function(){var e=j.a.get("token");b.a.defaults.headers.Authorization="Bearer "+e}():O.a.push("/home"))},clearErrorMessage:function(e){return function(){e({type:"CLEAR_ERROR_MESSAGE"})}},tryLocalSignin:function(e){return Object(i.a)(a.a.mark((function t(){var n;return a.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,j.a.get("token");case 2:(n=t.sent)&&e({type:"SIGNIN",payload:n});case 4:case"end":return t.stop()}}),t)})))}},{token:null,errorMessage:"",currentUser:null}),w=y.Provider,N=y.Context},EjJx:function(e,t,n){"use strict";function r(e){this.message=e}r.prototype=new Error,r.prototype.name="InvalidCharacterError";var a="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new r("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,a,i=0,o=0,s="";a=t.charAt(o++);~a&&(n=i%4?64*n+a:a,i++%4)?s+=String.fromCharCode(255&n>>(-2*i&6)):0)a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a);return s};function i(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(a(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return a(t)}}function o(e){this.message=e}o.prototype=new Error,o.prototype.name="InvalidTokenError",t.a=function(e,t){if("string"!=typeof e)throw new o("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(i(e.split(".")[n]))}catch(e){throw new o("Invalid token specified: "+e.message)}}},"HaE+":function(e,t,n){"use strict";function r(e,t,n,r,a,i,o){try{var s=e[i](o),c=s.value}catch(l){return void n(l)}s.done?t(c):Promise.resolve(c).then(r,a)}function a(e){return function(){var t=this,n=arguments;return new Promise((function(a,i){var o=e.apply(t,n);function s(e){r(o,a,i,s,c,"next",e)}function c(e){r(o,a,i,s,c,"throw",e)}s(void 0)}))}}n.d(t,"a",(function(){return a}))},L3zb:function(e,t,n){"use strict";var r=n("wx14"),a=n("zLVn"),i=n("JX7q"),o=n("dI71"),s=n("q1tI"),c=n.n(s),l=n("17x9"),d=n.n(l),u=n("TSYQ"),p=n.n(u),h=n("33Jr"),b={children:d.a.node,type:d.a.string,size:d.a.oneOfType([d.a.number,d.a.string]),bsSize:d.a.string,valid:d.a.bool,invalid:d.a.bool,tag:h.m,innerRef:d.a.oneOfType([d.a.object,d.a.func,d.a.string]),plaintext:d.a.bool,addon:d.a.bool,className:d.a.string,cssModule:d.a.object},f=function(e){function t(t){var n;return(n=e.call(this,t)||this).getRef=n.getRef.bind(Object(i.a)(n)),n.focus=n.focus.bind(Object(i.a)(n)),n}Object(o.a)(t,e);var n=t.prototype;return n.getRef=function(e){this.props.innerRef&&this.props.innerRef(e),this.ref=e},n.focus=function(){this.ref&&this.ref.focus()},n.render=function(){var e=this.props,t=e.className,n=e.cssModule,i=e.type,o=e.bsSize,s=e.valid,l=e.invalid,d=e.tag,u=e.addon,b=e.plaintext,f=e.innerRef,j=Object(a.a)(e,["className","cssModule","type","bsSize","valid","invalid","tag","addon","plaintext","innerRef"]),g=["radio","checkbox"].indexOf(i)>-1,m=new RegExp("\\D","g"),O=d||("select"===i||"textarea"===i?i:"input"),v="form-control";b?(v+="-plaintext",O=d||"input"):"file"===i?v+="-file":"range"===i?v+="-range":g&&(v=u?null:"form-check-input"),j.size&&m.test(j.size)&&(Object(h.p)('Please use the prop "bsSize" instead of the "size" to bootstrap\'s input sizing.'),o=j.size,delete j.size);var x=Object(h.j)(p()(t,l&&"is-invalid",s&&"is-valid",!!o&&"form-control-"+o,v),n);return("input"===O||d&&"function"===typeof d)&&(j.type=i),j.children&&!b&&"select"!==i&&"string"===typeof O&&"select"!==O&&(Object(h.p)('Input with a type of "'+i+'" cannot have children. Please use "value"/"defaultValue" instead.'),delete j.children),c.a.createElement(O,Object(r.a)({},j,{ref:f,className:x,"aria-invalid":l}))},t}(c.a.Component);f.propTypes=b,f.defaultProps={type:"text"},t.a=f},"ODp+":function(e,t,n){"use strict";(function(t){var r=n("Yk0y"),a={};function i(e){e||(e=t.event);var n=a[e.key];n&&n.forEach((function(t){t(r(e.newValue),r(e.oldValue),e.url||e.uri)}))}e.exports={on:function(e,n){a[e]?a[e].push(n):a[e]=[n],t.addEventListener?t.addEventListener("storage",i,!1):t.attachEvent?t.attachEvent("onstorage",i):t.onstorage=i},off:function(e,t){var n=a[e];n.length>1?n.splice(n.indexOf(t),1):a[e]=[]}}}).call(this,n("ntbh"))},RG8o:function(e,t,n){"use strict";n.r(t);var r=n("nKUr"),a=n("ODXe"),i=n("q1tI"),o=n.n(i),s=n("YFqc"),c=n.n(s),l=n("20a2"),d=n("F66N"),u=n("arvA"),p=n("374E"),h=n("tiWs"),b=n("1Yj4"),f=n("9a8N"),j=n("lVUX"),g=n("Z7gm"),m=n("X68C"),O=n("kvuc"),v=n("UU0N"),x=n("nsn4"),y=n("ok1R"),w=n("rhny"),N=n("uBiN"),k=n("q7Gj"),C=n("L3zb"),E=n("re1l"),R=n("Z+s4");function D(e){var t=Object(l.useRouter)(),i=o.a.useState(!1),s=Object(a.a)(i,2),D=s[0],S=s[1],M=function(e){return t.route.indexOf(e)>-1},P=function(){S(!D)},I=function(){S(!1)},T=e.routes,A=e.logo,L=Object(r.jsx)(p.a,{href:"#pablo",className:"pt-0",children:Object(r.jsx)("img",{alt:A.imgAlt,className:"navbar-brand-img",src:A.imgSrc})});return Object(r.jsx)(h.a,{className:"navbar-vertical fixed-left navbar-light ",expand:"md",id:"sidenav-main",children:Object(r.jsxs)(b.a,{fluid:!0,children:[Object(r.jsx)("button",{className:"navbar-toggler",type:"button",onClick:P,children:Object(r.jsx)("span",{className:"navbar-toggler-icon"})}),A&&A.innerLink?Object(r.jsx)(c.a,{href:A.innerLink,children:Object(r.jsx)("span",{children:L})}):null,A&&A.outterLink?Object(r.jsx)("a",{href:A.innerLink,target:"_blank",children:L}):null,Object(r.jsxs)(f.a,{className:"align-items-center d-md-none",children:[Object(r.jsxs)(j.a,{nav:!0,children:[Object(r.jsx)(g.a,{nav:!0,className:"nav-link-icon",children:Object(r.jsx)("i",{className:"ni ni-bell-55"})}),Object(r.jsxs)(m.a,{"aria-labelledby":"navbar-default_dropdown_1",className:"dropdown-menu-arrow",right:!0,children:[Object(r.jsx)(O.a,{children:"Action"}),Object(r.jsx)(O.a,{children:"Another action"}),Object(r.jsx)(O.a,{divider:!0}),Object(r.jsx)(O.a,{children:"Something else here"})]})]}),Object(r.jsxs)(j.a,{nav:!0,children:[Object(r.jsx)(g.a,{nav:!0,children:Object(r.jsx)(v.a,{className:"align-items-center",children:Object(r.jsx)("span",{className:"avatar avatar-sm rounded-circle",children:Object(r.jsx)("img",{alt:"...",src:n("mzax")})})})}),Object(r.jsxs)(m.a,{className:"dropdown-menu-arrow",right:!0,children:[Object(r.jsx)(O.a,{className:"noti-title",header:!0,tag:"div",children:Object(r.jsx)("h6",{className:"text-overflow m-0",children:"Welcome!"})}),Object(r.jsx)(c.a,{href:"/admin/profile",children:Object(r.jsxs)(O.a,{children:[Object(r.jsx)("i",{className:"ni ni-single-02"}),Object(r.jsx)("span",{children:"My profile"})]})}),Object(r.jsx)(c.a,{href:"/admin/profile",children:Object(r.jsxs)(O.a,{children:[Object(r.jsx)("i",{className:"ni ni-settings-gear-65"}),Object(r.jsx)("span",{children:"Settings"})]})}),Object(r.jsx)(c.a,{href:"/admin/profile",children:Object(r.jsxs)(O.a,{children:[Object(r.jsx)("i",{className:"ni ni-calendar-grid-58"}),Object(r.jsx)("span",{children:"Activity"})]})}),Object(r.jsx)(c.a,{href:"/admin/profile",children:Object(r.jsxs)(O.a,{children:[Object(r.jsx)("i",{className:"ni ni-support-16"}),Object(r.jsx)("span",{children:"Support"})]})}),Object(r.jsx)(O.a,{divider:!0}),Object(r.jsxs)(O.a,{href:"#pablo",onClick:function(e){return e.preventDefault()},children:[Object(r.jsx)("i",{className:"ni ni-user-run"}),Object(r.jsx)("span",{children:"Logout"})]})]})]})]}),Object(r.jsxs)(x.a,{navbar:!0,isOpen:D,children:[Object(r.jsx)("div",{className:"navbar-collapse-header d-md-none",children:Object(r.jsxs)(y.a,{children:[A?Object(r.jsx)(w.a,{className:"collapse-brand",xs:"6",children:A.innerLink?Object(r.jsx)(c.a,{href:A.innerLink,children:Object(r.jsx)("img",{alt:A.imgAlt,src:A.imgSrc})}):Object(r.jsx)("a",{href:A.outterLink,children:Object(r.jsx)("img",{alt:A.imgAlt,src:A.imgSrc})})}):null,Object(r.jsx)(w.a,{className:"collapse-close",xs:"6",children:Object(r.jsxs)("button",{className:"navbar-toggler",type:"button",onClick:P,children:[Object(r.jsx)("span",{}),Object(r.jsx)("span",{})]})})]})}),Object(r.jsx)(N.a,{className:"mt-4 mb-3 d-md-none",children:Object(r.jsxs)(k.a,{className:"input-group-rounded input-group-merge",children:[Object(r.jsx)(C.a,{"aria-label":"Search",className:"form-control-rounded form-control-prepended",placeholder:"Search",type:"search"}),Object(r.jsx)(E.a,{addonType:"prepend",children:Object(r.jsx)(R.a,{children:Object(r.jsx)("span",{className:"fa fa-search"})})})]})}),Object(r.jsx)(f.a,{navbar:!0,children:function(e){return e.map((function(e,t){return Object(r.jsx)(d.a,{active:M(e.layout+e.path),children:Object(r.jsx)(c.a,{href:e.layout+e.path,children:Object(r.jsxs)(u.a,{href:"#pablo",active:M(e.layout+e.path),onClick:I,children:[Object(r.jsx)("i",{className:e.icon}),e.name]})})},t)}))}(T)})]})]})})}D.defaultProps={routes:[{}]},t.default=D},TdDX:function(e,t,n){"use strict";(function(t){var r=n("4WCC"),a=n("Yk0y"),i=n("ODp+"),o="localStorage"in t&&t.localStorage?t.localStorage:r;function s(e,t){return 1===arguments.length?c(e):l(e,t)}function c(e){const t=o.getItem(e);return a(t)}function l(e,t){try{return o.setItem(e,JSON.stringify(t)),!0}catch(n){return!1}}s.set=l,s.get=c,s.remove=function(e){return o.removeItem(e)},s.clear=function(){return o.clear()},s.backend=function(e){return e&&(o=e),o},s.on=i.on,s.off=i.off,e.exports=s}).call(this,n("ntbh"))},UU0N:function(e,t,n){"use strict";var r=n("wx14"),a=n("zLVn"),i=n("q1tI"),o=n.n(i),s=n("17x9"),c=n.n(s),l=n("TSYQ"),d=n.n(l),u=n("33Jr"),p={body:c.a.bool,bottom:c.a.bool,children:c.a.node,className:c.a.string,cssModule:c.a.object,heading:c.a.bool,left:c.a.bool,list:c.a.bool,middle:c.a.bool,object:c.a.bool,right:c.a.bool,tag:u.m,top:c.a.bool},h=function(e){var t,n=e.body,i=e.bottom,s=e.className,c=e.cssModule,l=e.heading,p=e.left,h=e.list,b=e.middle,f=e.object,j=e.right,g=e.tag,m=e.top,O=Object(a.a)(e,["body","bottom","className","cssModule","heading","left","list","middle","object","right","tag","top"]);t=l?"h4":O.href?"a":O.src||f?"img":h?"ul":"div";var v=g||t,x=Object(u.j)(d()(s,{"media-body":n,"media-heading":l,"media-left":p,"media-right":j,"media-top":m,"media-bottom":i,"media-middle":b,"media-object":f,"media-list":h,media:!n&&!l&&!p&&!j&&!m&&!i&&!b&&!f&&!h}),c);return o.a.createElement(v,Object(r.a)({},O,{className:x}))};h.propTypes=p,t.a=h},X68C:function(e,t,n){"use strict";var r=n("wx14"),a=n("rePB"),i=n("zLVn"),o=n("dI71"),s=n("q1tI"),c=n.n(s),l=n("17x9"),d=n.n(l),u=n("i8i4"),p=n.n(u),h=n("TSYQ"),b=n.n(h),f=n("9P9J"),j=n("sD3Y"),g=n("33Jr");function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){Object(a.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v={tag:g.m,children:d.a.node.isRequired,right:d.a.bool,flip:d.a.bool,modifiers:d.a.object,className:d.a.string,cssModule:d.a.object,persist:d.a.bool,positionFixed:d.a.bool,container:g.n},x={flip:{enabled:!1}},y={up:"top",left:"left",right:"right",down:"bottom"},w=function(e){function t(){return e.apply(this,arguments)||this}return Object(o.a)(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.className,a=t.cssModule,o=t.right,s=t.tag,l=t.flip,d=t.modifiers,u=t.persist,h=t.positionFixed,j=t.container,m=Object(i.a)(t,["className","cssModule","right","tag","flip","modifiers","persist","positionFixed","container"]),v=Object(g.j)(b()(n,"dropdown-menu",{"dropdown-menu-right":o,show:this.context.isOpen}),a),w=s;if(u||this.context.isOpen&&!this.context.inNavbar){var N=(y[this.context.direction]||"bottom")+"-"+(o?"end":"start"),k=l?d:O(O({},d),x),C=!!h,E=c.a.createElement(f.a,{placement:N,modifiers:k,positionFixed:C},(function(t){var n=t.ref,a=t.style,i=t.placement,o=O(O({},e.props.style),a);return c.a.createElement(w,Object(r.a)({tabIndex:"-1",role:"menu",ref:function(t){n(t);var r=e.context.onMenuRef;r&&r(t)}},m,{style:o,"aria-hidden":!e.context.isOpen,className:v,"x-placement":i}))}));return j?p.a.createPortal(E,Object(g.g)(j)):E}return c.a.createElement(w,Object(r.a)({tabIndex:"-1",role:"menu"},m,{"aria-hidden":!this.context.isOpen,className:v,"x-placement":m.placement}))},t}(c.a.Component);w.propTypes=v,w.defaultProps={tag:"div",flip:!0},w.contextType=j.a,t.a=w},Yk0y:function(e,t,n){"use strict";e.exports=function(e){const t=function(e){try{return JSON.parse(e)}catch(t){return e}}(e);return void 0===t?null:t}},Z7gm:function(e,t,n){"use strict";var r=n("wx14"),a=n("zLVn"),i=n("JX7q"),o=n("dI71"),s=n("q1tI"),c=n.n(s),l=n("17x9"),d=n.n(l),u=n("TSYQ"),p=n.n(u),h=n("rJga"),b=n("sD3Y"),f=n("33Jr"),j=n("sOKU"),g={caret:d.a.bool,color:d.a.string,children:d.a.node,className:d.a.string,cssModule:d.a.object,disabled:d.a.bool,onClick:d.a.func,"aria-haspopup":d.a.bool,split:d.a.bool,tag:f.m,nav:d.a.bool},m=function(e){function t(t){var n;return(n=e.call(this,t)||this).onClick=n.onClick.bind(Object(i.a)(n)),n}Object(o.a)(t,e);var n=t.prototype;return n.onClick=function(e){this.props.disabled||this.context.disabled?e.preventDefault():(this.props.nav&&!this.props.tag&&e.preventDefault(),this.props.onClick&&this.props.onClick(e),this.context.toggle(e))},n.render=function(){var e,t=this,n=this.props,i=n.className,o=n.color,s=n.cssModule,l=n.caret,d=n.split,u=n.nav,b=n.tag,g=n.innerRef,m=Object(a.a)(n,["className","color","cssModule","caret","split","nav","tag","innerRef"]),O=m["aria-label"]||"Toggle Dropdown",v=Object(f.j)(p()(i,{"dropdown-toggle":l||d,"dropdown-toggle-split":d,"nav-link":u}),s),x="undefined"!==typeof m.children?m.children:c.a.createElement("span",{className:"sr-only"},O);return u&&!b?(e="a",m.href="#"):b?e=b:(e=j.a,m.color=o,m.cssModule=s),this.context.inNavbar?c.a.createElement(e,Object(r.a)({},m,{className:v,onClick:this.onClick,"aria-expanded":this.context.isOpen,children:x})):c.a.createElement(h.a,{innerRef:g},(function(n){var a,i=n.ref;return c.a.createElement(e,Object(r.a)({},m,((a={})["string"===typeof e?"ref":"innerRef"]=i,a),{className:v,onClick:t.onClick,"aria-expanded":t.context.isOpen,children:x}))}))},t}(c.a.Component);m.propTypes=g,m.defaultProps={"aria-haspopup":!0,color:"secondary"},m.contextType=b.a,t.a=m},j7Dh:function(e,t){e.exports="/_next/static/images/team-4-800x800-230071328b705f8686cabd26a85ed6a5.jpg"},jnuQ:function(e,t,n){"use strict";n.r(t);var r=n("nKUr"),a=n("q1tI"),i=n("YFqc"),o=n.n(i),s=n("89Ax"),c=n("tiWs"),l=n("1Yj4"),d=n("9a8N"),u=n("lVUX"),p=n("Z7gm"),h=n("UU0N"),b=n("X68C"),f=n("kvuc"),j=n("sOKU");t.default=function(e){e.brandText;var t=Object(a.useContext)(s.a).signout;return Object(r.jsx)(r.Fragment,{children:Object(r.jsx)(c.a,{className:"navbar-top navbar-dark",expand:"md",id:"navbar-main",children:Object(r.jsxs)(l.a,{fluid:!0,children:[Object(r.jsx)(o.a,{href:"/home",children:Object(r.jsx)("a",{className:"h4 mb-0 text-white text-uppercase d-none d-lg-inline-block"})}),Object(r.jsx)(d.a,{className:"align-items-center d-none d-md-flex",navbar:!0,children:Object(r.jsxs)(u.a,{nav:!0,children:[Object(r.jsx)(p.a,{className:"pr-0",nav:!0,children:Object(r.jsxs)(h.a,{className:"align-items-center",children:[Object(r.jsx)("span",{className:"avatar avatar-sm rounded-circle",children:Object(r.jsx)("img",{alt:"...",src:n("j7Dh")})}),Object(r.jsx)(h.a,{className:"ml-2 d-none d-lg-block",children:Object(r.jsx)("span",{className:"mb-0 text-sm font-weight-bold",children:"Jessica Jones"})})]})}),Object(r.jsxs)(b.a,{className:"dropdown-menu-arrow",right:!0,children:[Object(r.jsx)(f.a,{className:"noti-title",header:!0,tag:"div",children:Object(r.jsx)("h6",{className:"text-overflow m-0",children:"Welcome!"})}),Object(r.jsx)(o.a,{href:"/admin/profile",children:Object(r.jsxs)(f.a,{children:[Object(r.jsx)("i",{className:"ni ni-single-02"}),Object(r.jsx)("span",{children:"My profile"})]})}),Object(r.jsx)(o.a,{href:"/admin/profile",children:Object(r.jsxs)(f.a,{children:[Object(r.jsx)("i",{className:"ni ni-settings-gear-65"}),Object(r.jsx)("span",{children:"Settings"})]})}),Object(r.jsx)(o.a,{href:"/admin/profile",children:Object(r.jsxs)(f.a,{children:[Object(r.jsx)("i",{className:"ni ni-calendar-grid-58"}),Object(r.jsx)("span",{children:"Activity"})]})}),Object(r.jsx)(o.a,{href:"/admin/profile",children:Object(r.jsxs)(f.a,{children:[Object(r.jsx)("i",{className:"ni ni-support-16"}),Object(r.jsx)("span",{children:"Support"})]})}),Object(r.jsx)(f.a,{divider:!0}),Object(r.jsxs)(f.a,{href:"#pablo",onClick:function(e){return e.preventDefault()},children:[Object(r.jsx)("i",{className:"ni ni-user-run"}),Object(r.jsx)("span",{children:Object(r.jsx)(j.a,{onClick:function(){return t()},children:"Logout"})})]})]})]})})]})})})}},kvuc:function(e,t,n){"use strict";var r=n("wx14"),a=n("zLVn"),i=n("JX7q"),o=n("dI71"),s=n("q1tI"),c=n.n(s),l=n("17x9"),d=n.n(l),u=n("TSYQ"),p=n.n(u),h=n("sD3Y"),b=n("33Jr"),f={children:d.a.node,active:d.a.bool,disabled:d.a.bool,divider:d.a.bool,tag:b.m,header:d.a.bool,onClick:d.a.func,className:d.a.string,cssModule:d.a.object,toggle:d.a.bool,text:d.a.bool},j=function(e){function t(t){var n;return(n=e.call(this,t)||this).onClick=n.onClick.bind(Object(i.a)(n)),n.getTabIndex=n.getTabIndex.bind(Object(i.a)(n)),n}Object(o.a)(t,e);var n=t.prototype;return n.onClick=function(e){var t=this.props,n=t.disabled,r=t.header,a=t.divider,i=t.text;n||r||a||i?e.preventDefault():(this.props.onClick&&this.props.onClick(e),this.props.toggle&&this.context.toggle(e))},n.getTabIndex=function(){var e=this.props,t=e.disabled,n=e.header,r=e.divider,a=e.text;return t||n||r||a?"-1":"0"},n.render=function(){var e=this.getTabIndex(),t=e>-1?"menuitem":void 0,n=Object(b.k)(this.props,["toggle"]),i=n.className,o=n.cssModule,s=n.divider,l=n.tag,d=n.header,u=n.active,h=n.text,f=Object(a.a)(n,["className","cssModule","divider","tag","header","active","text"]),j=Object(b.j)(p()(i,{disabled:f.disabled,"dropdown-item":!s&&!d&&!h,active:u,"dropdown-header":d,"dropdown-divider":s,"dropdown-item-text":h}),o);return"button"===l&&(d?l="h6":s?l="div":f.href?l="a":h&&(l="span")),c.a.createElement(l,Object(r.a)({type:"button"===l&&(f.onClick||this.props.toggle)?"button":void 0},f,{tabIndex:e,role:t,className:j,onClick:this.onClick}))},t}(c.a.Component);j.propTypes=f,j.defaultProps={tag:"button",toggle:!0},j.contextType=h.a,t.a=j},lVUX:function(e,t,n){"use strict";n.d(t,"a",(function(){return w}));var r=n("rePB"),a=n("wx14"),i=n("JX7q"),o=n("dI71"),s=n("q1tI"),c=n.n(s),l=n("17x9"),d=n.n(l),u=n("zLVn"),p=n("KFoM"),h=n("TSYQ"),b=n.n(h),f=n("sD3Y"),j=n("33Jr"),g={a11y:d.a.bool,disabled:d.a.bool,direction:d.a.oneOf(["up","down","left","right"]),group:d.a.bool,isOpen:d.a.bool,nav:d.a.bool,active:d.a.bool,addonType:d.a.oneOfType([d.a.bool,d.a.oneOf(["prepend","append"])]),size:d.a.string,tag:j.m,toggle:d.a.func,children:d.a.node,className:d.a.string,cssModule:d.a.object,inNavbar:d.a.bool,setActiveFromChild:d.a.bool},m=[j.i.space,j.i.enter,j.i.up,j.i.down,j.i.end,j.i.home],O=function(e){function t(t){var n;return(n=e.call(this,t)||this).addEvents=n.addEvents.bind(Object(i.a)(n)),n.handleDocumentClick=n.handleDocumentClick.bind(Object(i.a)(n)),n.handleKeyDown=n.handleKeyDown.bind(Object(i.a)(n)),n.removeEvents=n.removeEvents.bind(Object(i.a)(n)),n.toggle=n.toggle.bind(Object(i.a)(n)),n.handleMenuRef=n.handleMenuRef.bind(Object(i.a)(n)),n.containerRef=c.a.createRef(),n.menuRef=c.a.createRef(),n}Object(o.a)(t,e);var n=t.prototype;return n.handleMenuRef=function(e){this.menuRef.current=e},n.getContextValue=function(){return{toggle:this.toggle,isOpen:this.props.isOpen,direction:"down"===this.props.direction&&this.props.dropup?"up":this.props.direction,inNavbar:this.props.inNavbar,disabled:this.props.disabled,onMenuRef:this.handleMenuRef}},n.componentDidMount=function(){this.handleProps()},n.componentDidUpdate=function(e){this.props.isOpen!==e.isOpen&&this.handleProps()},n.componentWillUnmount=function(){this.removeEvents()},n.getContainer=function(){return this.containerRef.current},n.getMenu=function(){return this.menuRef.current},n.getMenuCtrl=function(){return this._$menuCtrl||(this._$menuCtrl=this.getContainer().querySelector("[aria-expanded]")),this._$menuCtrl},n.getMenuItems=function(){var e=this.getMenu()||this.getContainer();return[].slice.call(e.querySelectorAll('[role="menuitem"]'))},n.addEvents=function(){var e=this;["click","touchstart","keyup"].forEach((function(t){return document.addEventListener(t,e.handleDocumentClick,!0)}))},n.removeEvents=function(){var e=this;["click","touchstart","keyup"].forEach((function(t){return document.removeEventListener(t,e.handleDocumentClick,!0)}))},n.handleDocumentClick=function(e){if(!e||3!==e.which&&("keyup"!==e.type||e.which===j.i.tab)){var t=this.getContainer(),n=this.getMenu(),r=t.contains(e.target)&&t!==e.target,a=n&&n.contains(e.target)&&n!==e.target;(!r&&!a||"keyup"===e.type&&e.which!==j.i.tab)&&this.toggle(e)}},n.handleKeyDown=function(e){var t=this,n="menuitem"===e.target.getAttribute("role"),r=this.getMenuCtrl()===e.target,a=j.i.tab===e.which;if(!(/input|textarea/i.test(e.target.tagName)||a&&!this.props.a11y||a&&!n&&!r)&&((-1!==m.indexOf(e.which)||e.which>=48&&e.which<=90)&&e.preventDefault(),!this.props.disabled&&(r&&([j.i.space,j.i.enter,j.i.up,j.i.down].indexOf(e.which)>-1?(this.props.isOpen||this.toggle(e),setTimeout((function(){return t.getMenuItems()[0].focus()}))):this.props.isOpen&&a?(e.preventDefault(),this.getMenuItems()[0].focus()):this.props.isOpen&&e.which===j.i.esc&&this.toggle(e)),this.props.isOpen&&"menuitem"===e.target.getAttribute("role"))))if([j.i.tab,j.i.esc].indexOf(e.which)>-1)this.toggle(e),this.getMenuCtrl().focus();else if([j.i.space,j.i.enter].indexOf(e.which)>-1)e.target.click(),this.getMenuCtrl().focus();else if([j.i.down,j.i.up].indexOf(e.which)>-1||[j.i.n,j.i.p].indexOf(e.which)>-1&&e.ctrlKey){var i=this.getMenuItems(),o=i.indexOf(e.target);j.i.up===e.which||j.i.p===e.which&&e.ctrlKey?o=0!==o?o-1:i.length-1:(j.i.down===e.which||j.i.n===e.which&&e.ctrlKey)&&(o=o===i.length-1?0:o+1),i[o].focus()}else if(j.i.end===e.which){var s=this.getMenuItems();s[s.length-1].focus()}else if(j.i.home===e.which){this.getMenuItems()[0].focus()}else if(e.which>=48&&e.which<=90)for(var c=this.getMenuItems(),l=String.fromCharCode(e.which).toLowerCase(),d=0;d<c.length;d+=1){if((c[d].textContent&&c[d].textContent[0].toLowerCase())===l){c[d].focus();break}}},n.handleProps=function(){this.props.isOpen?this.addEvents():this.removeEvents()},n.toggle=function(e){return this.props.disabled?e&&e.preventDefault():this.props.toggle(e)},n.render=function(){var e,t,n=Object(j.k)(this.props,["toggle","disabled","inNavbar","a11y"]),r=n.className,i=n.cssModule,o=n.direction,s=n.isOpen,l=n.group,d=n.size,h=n.nav,g=n.setActiveFromChild,m=n.active,O=n.addonType,v=n.tag,x=Object(u.a)(n,["className","cssModule","direction","isOpen","group","size","nav","setActiveFromChild","active","addonType","tag"]),y=v||(h?"li":"div"),w=!1;g&&c.a.Children.map(this.props.children[1].props.children,(function(e){e&&e.props.active&&(w=!0)}));var N=Object(j.j)(b()(r,"down"!==o&&"drop"+o,!(!h||!m)&&"active",!(!g||!w)&&"active",((e={})["input-group-"+O]=O,e["btn-group"]=l,e["btn-group-"+d]=!!d,e.dropdown=!l&&!O,e.show=s,e["nav-item"]=h,e)),i);return c.a.createElement(f.a.Provider,{value:this.getContextValue()},c.a.createElement(p.c,null,c.a.createElement(y,Object(a.a)({},x,((t={})["string"===typeof y?"ref":"innerRef"]=this.containerRef,t),{onKeyDown:this.handleKeyDown,className:N}))))},t}(c.a.Component);O.propTypes=g,O.defaultProps={a11y:!0,isOpen:!1,direction:"down",nav:!1,active:!1,addonType:!1,inNavbar:!1,setActiveFromChild:!1};var v=O;function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var y=["defaultOpen"],w=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={isOpen:t.defaultOpen||!1},n.toggle=n.toggle.bind(Object(i.a)(n)),n}Object(o.a)(t,e);var n=t.prototype;return n.toggle=function(e){this.setState({isOpen:!this.state.isOpen}),this.props.onToggle&&this.props.onToggle(e,!this.state.isOpen)},n.render=function(){return c.a.createElement(v,Object(a.a)({isOpen:this.state.isOpen,toggle:this.toggle},Object(j.k)(this.props,y)))},t}(s.Component);w.propTypes=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){Object(r.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({defaultOpen:d.a.bool,onToggle:d.a.func},v.propTypes)},mzax:function(e,t){e.exports="/_next/static/images/team-1-800x800-53033970a416368da35794389680266f.jpg"},sD3Y:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n("q1tI"),a=n.n(r).a.createContext({})},uBiN:function(e,t,n){"use strict";var r=n("wx14"),a=n("zLVn"),i=n("JX7q"),o=n("dI71"),s=n("q1tI"),c=n.n(s),l=n("17x9"),d=n.n(l),u=n("TSYQ"),p=n.n(u),h=n("33Jr"),b={children:d.a.node,inline:d.a.bool,tag:h.m,innerRef:d.a.oneOfType([d.a.object,d.a.func,d.a.string]),className:d.a.string,cssModule:d.a.object},f=function(e){function t(t){var n;return(n=e.call(this,t)||this).getRef=n.getRef.bind(Object(i.a)(n)),n.submit=n.submit.bind(Object(i.a)(n)),n}Object(o.a)(t,e);var n=t.prototype;return n.getRef=function(e){this.props.innerRef&&this.props.innerRef(e),this.ref=e},n.submit=function(){this.ref&&this.ref.submit()},n.render=function(){var e=this.props,t=e.className,n=e.cssModule,i=e.inline,o=e.tag,s=e.innerRef,l=Object(a.a)(e,["className","cssModule","inline","tag","innerRef"]),d=Object(h.j)(p()(t,!!i&&"form-inline"),n);return c.a.createElement(o,Object(r.a)({},l,{ref:s,className:d}))},t}(s.Component);f.propTypes=b,f.defaultProps={tag:"form"},t.a=f}}]); | 30,215 | 30,215 | 0.688532 |
ffd86ba17be77378db21d9bac3702429be34a086 | 12,039 | html | HTML | doc/index-files/index-12.html | michele-paparella/Thunder | ed465b9506c693cafbd5ccabd552e62bb00e344f | [
"Apache-2.0"
] | 2 | 2015-07-15T16:44:38.000Z | 2018-01-07T07:40:38.000Z | doc/index-files/index-12.html | michele-paparella/Thunder | ed465b9506c693cafbd5ccabd552e62bb00e344f | [
"Apache-2.0"
] | 3 | 2015-06-29T06:45:26.000Z | 2015-07-21T20:01:21.000Z | doc/index-files/index-12.html | michele-paparella/Thunder | ed465b9506c693cafbd5ccabd552e62bb00e344f | [
"Apache-2.0"
] | null | null | null | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="it">
<head>
<!-- Generated by javadoc (version 1.7.0_10) on Sun Dec 27 18:39:49 CET 2015 -->
<title>P-Index</title>
<meta name="date" content="2015-12-27">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="P-Index";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../overview-summary.html">Overview</a></li>
<li>Package</li>
<li>Class</li>
<li><a href="../overview-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li class="navBarCell1Rev">Index</li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="index-11.html">Prev Letter</a></li>
<li><a href="index-13.html">Next Letter</a></li>
</ul>
<ul class="navList">
<li><a href="../index.html?index-filesindex-12.html" target="_top">Frames</a></li>
<li><a href="index-12.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="contentContainer"><a href="index-1.html">A</a> <a href="index-2.html">B</a> <a href="index-3.html">C</a> <a href="index-4.html">D</a> <a href="index-5.html">G</a> <a href="index-6.html">H</a> <a href="index-7.html">I</a> <a href="index-8.html">L</a> <a href="index-9.html">M</a> <a href="index-10.html">N</a> <a href="index-11.html">O</a> <a href="index-12.html">P</a> <a href="index-13.html">R</a> <a href="index-14.html">S</a> <a href="index-15.html">W</a> <a name="_P_">
<!-- -->
</a>
<h2 class="title">P</h2>
<dl>
<dt><span class="strong"><a href="../com/thunder/network/NetworkCommand.html#performFallback()">performFallback()</a></span> - Method in class com.thunder.network.<a href="../com/thunder/network/NetworkCommand.html" title="class in com.thunder.network">NetworkCommand</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../com/thunder/network/NsLookupCommand.html#performFallback()">performFallback()</a></span> - Method in class com.thunder.network.<a href="../com/thunder/network/NsLookupCommand.html" title="class in com.thunder.network">NsLookupCommand</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../com/thunder/network/NetworkManager.html#ping(java.lang.String, int, com.thunder.network.OnPartialResultListener)">ping(String, int, OnPartialResultListener)</a></span> - Static method in class com.thunder.network.<a href="../com/thunder/network/NetworkManager.html" title="class in com.thunder.network">NetworkManager</a></dt>
<dd>
<div class="block">ping command</div>
</dd>
<dt><a href="../com/thunder/network/PingCommand.html" title="class in com.thunder.network"><span class="strong">PingCommand</span></a> - Class in <a href="../com/thunder/network/package-summary.html">com.thunder.network</a></dt>
<dd>
<div class="block">ping command implementation</div>
</dd>
<dt><span class="strong"><a href="../com/thunder/network/PingCommand.html#PingCommand(int)">PingCommand(int)</a></span> - Constructor for class com.thunder.network.<a href="../com/thunder/network/PingCommand.html" title="class in com.thunder.network">PingCommand</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../com/thunder/network/NetworkManager.html#printActiveConnectionType(Context)">printActiveConnectionType(Context)</a></span> - Static method in class com.thunder.network.<a href="../com/thunder/network/NetworkManager.html" title="class in com.thunder.network">NetworkManager</a></dt>
<dd> </dd>
<dt><a href="../com/thunder/iap/model/PurchasedItem.html" title="class in com.thunder.iap.model"><span class="strong">PurchasedItem</span></a> - Class in <a href="../com/thunder/iap/model/package-summary.html">com.thunder.iap.model</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../com/thunder/iap/model/PurchasedItem.html#PurchasedItem(java.lang.String, java.lang.String, java.lang.String)">PurchasedItem(String, String, String)</a></span> - Constructor for class com.thunder.iap.model.<a href="../com/thunder/iap/model/PurchasedItem.html" title="class in com.thunder.iap.model">PurchasedItem</a></dt>
<dd> </dd>
<dt><a href="../com/thunder/iap/listener/PurchasedItemsListener.html" title="interface in com.thunder.iap.listener"><span class="strong">PurchasedItemsListener</span></a> - Interface in <a href="../com/thunder/iap/listener/package-summary.html">com.thunder.iap.listener</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../com/thunder/prefs/SharedPrefsManager.html#putBooleanAsync(java.lang.String, boolean)">putBooleanAsync(String, boolean)</a></span> - Method in class com.thunder.prefs.<a href="../com/thunder/prefs/SharedPrefsManager.html" title="class in com.thunder.prefs">SharedPrefsManager</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../com/thunder/prefs/SharedPrefsManager.html#putBooleanSync(java.lang.String, boolean)">putBooleanSync(String, boolean)</a></span> - Method in class com.thunder.prefs.<a href="../com/thunder/prefs/SharedPrefsManager.html" title="class in com.thunder.prefs">SharedPrefsManager</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../com/thunder/prefs/SharedPrefsManager.html#putFloatAsync(java.lang.String, float)">putFloatAsync(String, float)</a></span> - Method in class com.thunder.prefs.<a href="../com/thunder/prefs/SharedPrefsManager.html" title="class in com.thunder.prefs">SharedPrefsManager</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../com/thunder/prefs/SharedPrefsManager.html#putFloatSync(java.lang.String, float)">putFloatSync(String, float)</a></span> - Method in class com.thunder.prefs.<a href="../com/thunder/prefs/SharedPrefsManager.html" title="class in com.thunder.prefs">SharedPrefsManager</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../com/thunder/prefs/SharedPrefsManager.html#putIntAsync(java.lang.String, int)">putIntAsync(String, int)</a></span> - Method in class com.thunder.prefs.<a href="../com/thunder/prefs/SharedPrefsManager.html" title="class in com.thunder.prefs">SharedPrefsManager</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../com/thunder/prefs/SharedPrefsManager.html#putIntSync(java.lang.String, int)">putIntSync(String, int)</a></span> - Method in class com.thunder.prefs.<a href="../com/thunder/prefs/SharedPrefsManager.html" title="class in com.thunder.prefs">SharedPrefsManager</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../com/thunder/prefs/SharedPrefsManager.html#putLongAsync(java.lang.String, long)">putLongAsync(String, long)</a></span> - Method in class com.thunder.prefs.<a href="../com/thunder/prefs/SharedPrefsManager.html" title="class in com.thunder.prefs">SharedPrefsManager</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../com/thunder/prefs/SharedPrefsManager.html#putLongSync(java.lang.String, long)">putLongSync(String, long)</a></span> - Method in class com.thunder.prefs.<a href="../com/thunder/prefs/SharedPrefsManager.html" title="class in com.thunder.prefs">SharedPrefsManager</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../com/thunder/prefs/SharedPrefsManager.html#putStringAsync(java.lang.String, java.lang.String)">putStringAsync(String, String)</a></span> - Method in class com.thunder.prefs.<a href="../com/thunder/prefs/SharedPrefsManager.html" title="class in com.thunder.prefs">SharedPrefsManager</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../com/thunder/prefs/SharedPrefsManager.html#putStringSetAsync(java.lang.String, java.util.Set)">putStringSetAsync(String, Set<String>)</a></span> - Method in class com.thunder.prefs.<a href="../com/thunder/prefs/SharedPrefsManager.html" title="class in com.thunder.prefs">SharedPrefsManager</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../com/thunder/prefs/SharedPrefsManager.html#putStringSetSync(java.lang.String, java.util.Set)">putStringSetSync(String, Set<String>)</a></span> - Method in class com.thunder.prefs.<a href="../com/thunder/prefs/SharedPrefsManager.html" title="class in com.thunder.prefs">SharedPrefsManager</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../com/thunder/prefs/SharedPrefsManager.html#putStringSync(java.lang.String, java.lang.String)">putStringSync(String, String)</a></span> - Method in class com.thunder.prefs.<a href="../com/thunder/prefs/SharedPrefsManager.html" title="class in com.thunder.prefs">SharedPrefsManager</a></dt>
<dd> </dd>
<dt><span class="strong"><a href="../com/thunder/prefs/SharedPrefsManager.html#putValuesAsync(java.util.Map)">putValuesAsync(Map<String, Object>)</a></span> - Method in class com.thunder.prefs.<a href="../com/thunder/prefs/SharedPrefsManager.html" title="class in com.thunder.prefs">SharedPrefsManager</a></dt>
<dd>
<div class="block">async method</div>
</dd>
<dt><span class="strong"><a href="../com/thunder/prefs/SharedPrefsManager.html#putValuesSync(java.util.Map)">putValuesSync(Map<String, Object>)</a></span> - Method in class com.thunder.prefs.<a href="../com/thunder/prefs/SharedPrefsManager.html" title="class in com.thunder.prefs">SharedPrefsManager</a></dt>
<dd>
<div class="block">sync method</div>
</dd>
</dl>
<a href="index-1.html">A</a> <a href="index-2.html">B</a> <a href="index-3.html">C</a> <a href="index-4.html">D</a> <a href="index-5.html">G</a> <a href="index-6.html">H</a> <a href="index-7.html">I</a> <a href="index-8.html">L</a> <a href="index-9.html">M</a> <a href="index-10.html">N</a> <a href="index-11.html">O</a> <a href="index-12.html">P</a> <a href="index-13.html">R</a> <a href="index-14.html">S</a> <a href="index-15.html">W</a> </div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../overview-summary.html">Overview</a></li>
<li>Package</li>
<li>Class</li>
<li><a href="../overview-tree.html">Tree</a></li>
<li><a href="../deprecated-list.html">Deprecated</a></li>
<li class="navBarCell1Rev">Index</li>
<li><a href="../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="index-11.html">Prev Letter</a></li>
<li><a href="index-13.html">Next Letter</a></li>
</ul>
<ul class="navList">
<li><a href="../index.html?index-filesindex-12.html" target="_top">Frames</a></li>
<li><a href="index-12.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
| 70.403509 | 560 | 0.698314 |
67cf318066e0f46c8f451bc0df70101f6c35b720 | 52 | sql | SQL | server/src/main/resources/db/h2/migration/V7__add_client_expiration_column.sql | bit-twidd1er/keywhiz | 44d1602cbabe199d4f2e665b101499977a17bce6 | [
"Apache-2.0"
] | null | null | null | server/src/main/resources/db/h2/migration/V7__add_client_expiration_column.sql | bit-twidd1er/keywhiz | 44d1602cbabe199d4f2e665b101499977a17bce6 | [
"Apache-2.0"
] | null | null | null | server/src/main/resources/db/h2/migration/V7__add_client_expiration_column.sql | bit-twidd1er/keywhiz | 44d1602cbabe199d4f2e665b101499977a17bce6 | [
"Apache-2.0"
] | null | null | null | ALTER TABLE clients ADD COLUMN expiration timestamp; | 52 | 52 | 0.865385 |
8e9e882b46f7b0860a07f471cb1b2c26cad16a86 | 1,445 | swift | Swift | Adam_20211220_SwiftUIStudy/Classes/FirstPage/FirstPageTCell.swift | HYAdonisCoding/Adam_20211220_SwiftUIStudy | c05d70cc36748b152c4b2bd85b915d41c67c0ace | [
"BSD-3-Clause"
] | 1 | 2021-12-21T03:20:51.000Z | 2021-12-21T03:20:51.000Z | Adam_20211220_SwiftUIStudy/Classes/FirstPage/FirstPageTCell.swift | HYAdonisCoding/Adam_20211220_SwiftUIStudy | c05d70cc36748b152c4b2bd85b915d41c67c0ace | [
"BSD-3-Clause"
] | null | null | null | Adam_20211220_SwiftUIStudy/Classes/FirstPage/FirstPageTCell.swift | HYAdonisCoding/Adam_20211220_SwiftUIStudy | c05d70cc36748b152c4b2bd85b915d41c67c0ace | [
"BSD-3-Clause"
] | null | null | null | //
// FirstPageTCell.swift
// Adam_20211220_SwiftUIStudy
//
// Created by Adam on 2021/12/22.
//
import SwiftUI
var colors = [Color.red, Color.orange, Color.yellow, Color.green, Color.blue, Color.purple]
func randomColor() -> Color {
colors[Int.random(in: 0..<colors.count)]
}
struct FirstPageTCell: View {
@Environment(\.managedObjectContext) var context
init(_ pushViewClass: Any, _ title: String, _ subTitle: String = "") {
self.pushViewClass = pushViewClass
self.title = title
self.subTitle = subTitle
}
var pushViewClass: Any
var title: String
var subTitle: String
var body: some View {
NavigationLink(
destination: AnyView(_fromValue: pushViewClass)?.environment(\.managedObjectContext, self.context)
) {
VStack(alignment: .leading, spacing: 5) {
Text(title)
.font(.headline)
.foregroundColor(randomColor())
if (subTitle).isEmpty == false {
Text(subTitle)
.font(.system(size: 12))
.foregroundColor(randomColor())
}
}
}
}
}
struct FirstPageTCell_Previews: PreviewProvider {
static var previews: some View {
FirstPageTCell(AddAddressView(), "Test Title")
}
}
| 26.272727 | 110 | 0.551557 |
d264c1edeb1704366e08815f7455980cf54460e6 | 2,719 | php | PHP | app/views/administrator/admin_key/editAdmin_key.php | HoppinTurtle/Dropinn_6.7 | ad3dd906f5455fd28d78e415feaf263faef28756 | [
"MIT"
] | null | null | null | app/views/administrator/admin_key/editAdmin_key.php | HoppinTurtle/Dropinn_6.7 | ad3dd906f5455fd28d78e415feaf263faef28756 | [
"MIT"
] | null | null | null | app/views/administrator/admin_key/editAdmin_key.php | HoppinTurtle/Dropinn_6.7 | ad3dd906f5455fd28d78e415feaf263faef28756 | [
"MIT"
] | 3 | 2018-12-15T08:40:39.000Z | 2021-08-08T05:01:06.000Z | <script type="text/javascript" src="<?php echo base_url()?>css/tiny_mce/tiny_mce.js" ></script>
<script type="text/javascript">
tinyMCE.init({
mode : "textareas",
theme : "advanced",
editor_deselector : "mceNoEditor",
plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave",
// Theme options
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,formatselect,fontselect",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true
});
</script>
<div class="Edit_Page">
<?php
//Show Flash Message
if($msg = $this->session->flashdata('flash_message'))
{
echo $msg;
}
?>
<?php
//Content of a group
if(isset($Admin_key) and $Admin_key->num_rows()>0)
{
$Admin_key = $Admin_key->row();
?>
<div class="container-fluid top-sp body-color">
<div class="">
<div class="col-xs-12 col-md-12 col-sm-12">
<h1 class="page-header"><?php echo translate_admin('Edit Page'); ?></h1></div>
<form method="post" action="<?php echo admin_url('admin_key/editAdmin_key')?>/<?php echo $Admin_key->id; ?>">
<div class="col-xs-12 col-md-12 col-sm-12">
<table class="table" cellpadding="2" cellspacing="0">
<tr>
<td><?php echo translate_admin('Page_key'); ?><span style="color: red;">*</span></td>
<td>
<input class="" type="text" name="Admin_key" value="<?php echo $Admin_key->page_key; ?>"><p><?php echo form_error('Admin_key'); ?></p>
</td>
</tr>
<td><?php echo translate_admin('Status').'?'; ?></td>
<td>
<select name="is_footer" id="is_footer" >
<option value="0"> Active </option>
<option value="1"> In Active </option>
</select>
</td>
</tr>
<tr>
<td colspan="2" style="text-align: center;">
<input type="hidden" name="page_operation" value="edit" />
<input type="hidden" name="id" value="<?php echo $Admin_key->id; ?>"/>
<input type="submit" class="clsSubmitBt1" value="<?php echo translate_admin('Submit'); ?>" name="editAdmin_key"/></td>
</tr>
</table>
</form>
<?php
}
?>
</div>
<script language="Javascript">
jQuery("#is_footer").val('<?php echo $Admin_key->status; ?>');
</script> | 37.246575 | 283 | 0.617139 |
bc8371d8f4462893db9ce2d3eb233bb93ca36978 | 323 | lua | Lua | rtklua/Accepted/NPCs/trap/tiger_spawn/warp_trap_shiver.lua | The-Kingdom-of-The-Winds/RTK-Server | b306c3411af42ea54c6ecaa785cea9ab4e97ff28 | [
"Xnet",
"X11"
] | 1 | 2021-03-08T06:33:34.000Z | 2021-03-08T06:33:34.000Z | rtklua/Accepted/NPCs/trap/tiger_spawn/warp_trap_shiver.lua | The-Kingdom-of-The-Winds/RTK-Server | b306c3411af42ea54c6ecaa785cea9ab4e97ff28 | [
"Xnet",
"X11"
] | null | null | null | rtklua/Accepted/NPCs/trap/tiger_spawn/warp_trap_shiver.lua | The-Kingdom-of-The-Winds/RTK-Server | b306c3411af42ea54c6ecaa785cea9ab4e97ff28 | [
"Xnet",
"X11"
] | 3 | 2020-11-19T22:01:46.000Z | 2021-03-16T21:05:37.000Z | WarpTrapShiverNpc = {
click = function(block, npc)
if block.blType == BL_MOB then
return
end
if block.blType == BL_PC and block.state == 1 then
return
end
block:sendMinitext('You feel a sudden shiver.')
removeTrapItem(npc)
npc:delete()
end,
endAction = function(npc, owner)
removeTrap(npc)
end
}
| 17.944444 | 52 | 0.687307 |
81113a9231449ac2212c1f7cc004f985d8c71295 | 993 | go | Go | pkg/mocks/validator.go | aholovko/sidetree-core-go | 682fcf6e8012e0df48fd215ae9f0adc2cbb61848 | [
"Apache-2.0"
] | 23 | 2019-05-23T14:48:43.000Z | 2021-09-12T17:18:40.000Z | pkg/mocks/validator.go | aholovko/sidetree-core-go | 682fcf6e8012e0df48fd215ae9f0adc2cbb61848 | [
"Apache-2.0"
] | 635 | 2019-05-14T18:59:06.000Z | 2022-03-10T16:04:44.000Z | pkg/mocks/validator.go | aholovko/sidetree-core-go | 682fcf6e8012e0df48fd215ae9f0adc2cbb61848 | [
"Apache-2.0"
] | 17 | 2019-05-14T18:53:07.000Z | 2022-02-03T15:49:09.000Z | /*
Copyright SecureKey Technologies Inc. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package mocks
// MockDocumentValidator is responsible for validating operations, original document and transforming to external document.
type MockDocumentValidator struct {
IsValidPayloadErr error
IsValidOriginalDocumentErr error
}
// New creates a new mock document validator.
func New() *MockDocumentValidator {
return &MockDocumentValidator{}
}
// IsValidPayload mocks check that the given payload is a valid Sidetree specific payload
// that can be accepted by the Sidetree update operations.
func (m *MockDocumentValidator) IsValidPayload(payload []byte) error {
return m.IsValidPayloadErr
}
// IsValidOriginalDocument mocks check that the given payload is a valid Sidetree specific document that can be accepted by the Sidetree create operation.
func (m *MockDocumentValidator) IsValidOriginalDocument(payload []byte) error {
return m.IsValidOriginalDocumentErr
}
| 33.1 | 155 | 0.803625 |
e92406ce362263a1f9134fb33b02cd9d87b0d5d6 | 76 | go | Go | src/app/libp2p_helper/src/tools.go | phreelyfe/mina | 34328cd4e9b6ac699c3330003e40976a1059ed90 | [
"Apache-2.0"
] | 929 | 2020-10-02T07:23:16.000Z | 2022-03-31T15:02:09.000Z | src/app/libp2p_helper/src/tools.go | kunxian-xia/coda | 93295e8b4db5f4f2d192a26f90146bf322808ef8 | [
"Apache-2.0"
] | 3,154 | 2020-09-29T15:47:44.000Z | 2022-03-31T16:22:28.000Z | src/app/libp2p_helper/src/tools.go | kunxian-xia/coda | 93295e8b4db5f4f2d192a26f90146bf322808ef8 | [
"Apache-2.0"
] | 216 | 2020-09-29T19:47:41.000Z | 2022-03-27T08:44:29.000Z | // +build tools
package tools
import (
_ "github.com/campoy/jsonenums"
)
| 9.5 | 32 | 0.697368 |
c51e377752248ad46308e0164a923b794839e476 | 101 | cpp | C++ | Plugins/SPlanner/Source/SPlanner/Private/SPlanner/Base/Action/SP_Action.cpp | mrouffet/SPlanner | a2a72b979e33d276a119fffc6728ad5524891171 | [
"MIT"
] | 2 | 2020-03-25T12:13:23.000Z | 2021-06-15T15:00:42.000Z | Plugins/SPlanner/Source/SPlanner/Private/SPlanner/Base/Action/SP_Action.cpp | mrouffet/SPlanner | a2a72b979e33d276a119fffc6728ad5524891171 | [
"MIT"
] | null | null | null | Plugins/SPlanner/Source/SPlanner/Private/SPlanner/Base/Action/SP_Action.cpp | mrouffet/SPlanner | a2a72b979e33d276a119fffc6728ad5524891171 | [
"MIT"
] | null | null | null | // Copyright 2020 Maxime ROUFFET. All Rights Reserved.
#include <SPlanner/Base/Action/SP_Action.h>
| 20.2 | 54 | 0.772277 |
730aeaba36449ee98e385a756954885950f47dcf | 21 | sql | SQL | pkg/store/postgres/migrations/20191229110336_job-spec.down.sql | JesterOrNot/werft | 4ec7cbcc42e2f0e4d517e1e547b5f8c08a2c46e8 | [
"MIT"
] | 122 | 2020-01-27T10:33:37.000Z | 2022-03-27T00:08:43.000Z | pkg/store/postgres/migrations/20191229110336_job-spec.down.sql | JesterOrNot/werft | 4ec7cbcc42e2f0e4d517e1e547b5f8c08a2c46e8 | [
"MIT"
] | 51 | 2020-01-28T09:57:08.000Z | 2022-03-26T19:43:39.000Z | pkg/store/postgres/migrations/20191229110336_job-spec.down.sql | JesterOrNot/werft | 4ec7cbcc42e2f0e4d517e1e547b5f8c08a2c46e8 | [
"MIT"
] | 25 | 2020-01-27T13:22:58.000Z | 2022-03-26T15:54:28.000Z |
DROP TABLE job_spec; | 10.5 | 20 | 0.809524 |
27dd57fb2e0452bda198298108721200aa8c1304 | 2,664 | dart | Dart | src/lib/app/phrases_group_editor_vm.dart | kugjo/va | 66b4b25d276a3276f61a512ffa213c88978e1d92 | [
"MIT"
] | 9 | 2020-04-30T15:58:20.000Z | 2021-03-26T14:31:19.000Z | src/lib/app/phrases_group_editor_vm.dart | kugjo/va | 66b4b25d276a3276f61a512ffa213c88978e1d92 | [
"MIT"
] | 1 | 2020-05-03T21:04:11.000Z | 2020-05-12T19:05:15.000Z | src/lib/app/phrases_group_editor_vm.dart | kugjo/va | 66b4b25d276a3276f61a512ffa213c88978e1d92 | [
"MIT"
] | 2 | 2020-04-30T16:10:09.000Z | 2020-04-30T16:28:29.000Z | import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:vocabulary_advancer/app/common/form_validation.dart';
import 'package:vocabulary_advancer/core/model.dart';
import 'package:vocabulary_advancer/shared/svc.dart';
class PhraseGroupEditorModel {
int? groupId;
String initialGroupName = '';
String currentGroupName = '';
bool get isNewGroup => groupId == null;
PhraseGroupEditorModel(this.groupId);
PhraseGroupEditorModel.from(
PhraseGroupEditorModel model, {
String? initialGroupName,
String? currentGroupName,
}) {
groupId = model.groupId;
this.initialGroupName = initialGroupName ?? model.initialGroupName;
this.currentGroupName = currentGroupName ?? model.currentGroupName;
}
}
class PhraseGroupEditorPageResult {
PhraseGroupEditorPageResult.deleted(this.group)
: isDeleted = true,
isAdded = false,
isUpdated = false;
PhraseGroupEditorPageResult.added(this.group)
: isDeleted = false,
isAdded = true,
isUpdated = false;
PhraseGroupEditorPageResult.updated(this.group)
: isDeleted = false,
isAdded = false,
isUpdated = true;
final bool isDeleted;
final bool isAdded;
final bool isUpdated;
final PhraseGroup? group;
}
class PhraseGroupEditorViewModel extends Cubit<PhraseGroupEditorModel> with FormValidation {
PhraseGroupEditorViewModel(int? groupId) : super(PhraseGroupEditorModel(groupId));
void init() {
final item = svc.repPhraseGroup.findSingle(state.groupId);
emit(PhraseGroupEditorModel.from(state, initialGroupName: item?.name));
}
String? validatorForName(String? name, String messageWhenEmpty, String messageWhenAlreadyExists) {
final empty = validationMessageWhenEmpty(value: name, messageWhenEmpty: () => messageWhenEmpty);
if (empty != null) return empty;
if (svc.repPhraseGroup.findSingleBy(name) != null) {
return messageWhenAlreadyExists;
}
return null;
}
void updateName(String value) {
state.currentGroupName = value;
validateInlineIfNeeded();
}
void deleteAndClose() {
if (state.isNewGroup) return;
final group = svc.repPhraseGroup.delete(state.groupId!);
svc.route.popWithResult(PhraseGroupEditorPageResult.deleted(group));
}
void tryApplyAndClose() {
if (validate()) {
final group = state.isNewGroup
? svc.repPhraseGroup.create(state.currentGroupName)
: svc.repPhraseGroup.rename(state.groupId!, state.currentGroupName);
svc.route.popWithResult(state.isNewGroup
? PhraseGroupEditorPageResult.added(group)
: PhraseGroupEditorPageResult.updated(group));
}
}
}
| 30.272727 | 100 | 0.723724 |
1db5c25ef9f65414a14dc1277aa6a6c406fb55fb | 1,956 | kt | Kotlin | data/src/main/java/com/keelim/cnubus/data/model/search/AddressInfo.kt | keelim/project_cnuBus | d31544f306555394999035f17e00e9ff313215cb | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | data/src/main/java/com/keelim/cnubus/data/model/search/AddressInfo.kt | keelim/project_cnuBus | d31544f306555394999035f17e00e9ff313215cb | [
"ECL-2.0",
"Apache-2.0"
] | 104 | 2019-12-12T11:26:11.000Z | 2022-03-30T17:15:51.000Z | data/src/main/java/com/keelim/cnubus/data/model/search/AddressInfo.kt | keelim/project_cnuBus | d31544f306555394999035f17e00e9ff313215cb | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | /*
* Designed and developed by 2021 keelim (Jaehyun Kim)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.keelim.cnubus.data.model.search
import com.google.gson.annotations.Expose
import com.google.gson.annotations.SerializedName
data class AddressInfo(
@SerializedName("fullAddress")
@Expose
val fullAddress: String?,
@SerializedName("addressType")
@Expose
val addressType: String?,
@SerializedName("city_do")
@Expose
val cityDo: String?,
@SerializedName("gu_gun")
@Expose
val guGun: String?,
@SerializedName("eup_myun")
@Expose
val eupMyun: String?,
@SerializedName("adminDong")
@Expose
val adminDong: String?,
@SerializedName("adminDongCode")
@Expose
val adminDongCode: String?,
@SerializedName("legalDong")
@Expose
val legalDong: String?,
@SerializedName("legalDongCode")
@Expose
val legalDongCode: String?,
@SerializedName("ri")
@Expose
val ri: String?,
@SerializedName("bunji")
@Expose
val bunji: String?,
@SerializedName("roadName")
@Expose
val roadName: String?,
@SerializedName("buildingIndex")
@Expose
val buildingIndex: String?,
@SerializedName("buildingName")
@Expose
val buildingName: String?,
@SerializedName("mappingDistance")
@Expose
val mappingDistance: String?,
@SerializedName("roadCode")
@Expose
val roadCode: String?
)
| 27.549296 | 75 | 0.693252 |
beac60a5cde1cbc575e9107bc65870855945ce45 | 1,930 | swift | Swift | rounded-navigationbar/rounded-navigationbar/ViewController.swift | iosdevted/ios-project | 5afad2cbc43d38d5ab7bde14f6fc767cdef7385f | [
"MIT"
] | 1 | 2021-12-24T22:09:11.000Z | 2021-12-24T22:09:11.000Z | rounded-navigationbar/rounded-navigationbar/ViewController.swift | iosdevted/ios-project | 5afad2cbc43d38d5ab7bde14f6fc767cdef7385f | [
"MIT"
] | null | null | null | rounded-navigationbar/rounded-navigationbar/ViewController.swift | iosdevted/ios-project | 5afad2cbc43d38d5ab7bde14f6fc767cdef7385f | [
"MIT"
] | 1 | 2021-03-28T11:37:57.000Z | 2021-03-28T11:37:57.000Z | //
// ViewController.swift
// rounded-navigationbar
//
// Created by Ted on 2021/03/06.
//
import UIKit
protocol RoundedCornerNavigationBar {
func addRoundedCorner(OnNavigationBar navigationBar: UINavigationBar, cornerRadius: CGFloat)
}
class ViewController: UIViewController, RoundedCornerNavigationBar {
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .white
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
setupNavBar()
}
private func setupNavBar(){
title = "Navigation Bar"
navigationController?.navigationBar.prefersLargeTitles = true
addRoundedCorner(OnNavigationBar: navigationController!.navigationBar, cornerRadius: 20)
}
}
extension RoundedCornerNavigationBar where Self: UIViewController{
func addRoundedCorner(OnNavigationBar navigationBar: UINavigationBar, cornerRadius: CGFloat){
//navigationBar.isTranslucent = false
//navigationBar.setBackgroundImage(UIImage(), for: .default)
navigationBar.backgroundColor = .white
let customView = UIView(frame: CGRect(x: 0, y: navigationBar.bounds.maxY, width: navigationBar.bounds.width, height: cornerRadius))
customView.backgroundColor = .clear
navigationBar.insertSubview(customView, at: 1)
let shapeLayer = CAShapeLayer()
shapeLayer.path = UIBezierPath(roundedRect: customView.bounds, byRoundingCorners: [.bottomLeft,.bottomRight], cornerRadii: CGSize(width: cornerRadius, height: cornerRadius)).cgPath
shapeLayer.shadowColor = UIColor.lightGray.cgColor
shapeLayer.shadowOffset = CGSize(width: 0, height: 4.0)
shapeLayer.shadowOpacity = 0.8
shapeLayer.shadowRadius = 2
shapeLayer.fillColor = UIColor.white.cgColor
customView.layer.insertSublayer(shapeLayer, at: 0)
}
}
| 35.740741 | 188 | 0.712953 |
c5498fb2b0c31a886a02a9495c1d85f69a7d5283 | 1,002 | cpp | C++ | src/tests/npcr/npcr.cpp | mpreis/Seth | 9114ace368f6ac9284dab390fa8720cc76156996 | [
"BSD-2-Clause"
] | 4 | 2017-05-07T04:36:45.000Z | 2020-02-12T22:44:59.000Z | src/tests/npcr/npcr.cpp | mpreis/Seth | 9114ace368f6ac9284dab390fa8720cc76156996 | [
"BSD-2-Clause"
] | null | null | null | src/tests/npcr/npcr.cpp | mpreis/Seth | 9114ace368f6ac9284dab390fa8720cc76156996 | [
"BSD-2-Clause"
] | null | null | null | // Copyright (c) 2016, the Seth Project Authors. All rights reserved.
// Please see the AUTHORS file for details. Use of this source code is
// governed by a BSD license that can be found in the LICENSE file.
#include "./npcr.h"
#include "../../libraries/CImg.h"
double
run_test_npcr(struct img_info_t *img_info) {
cimg_library::CImg<unsigned int> image1(img_info->origin.c_str());
cimg_library::CImg<unsigned int> image2(img_info->encrypted.c_str());
double number_of_pixels = image1.width() * image1.height();
double npcr = 0;
// just compare images with the same size, stop if not
if (image1.width() != image2.width()
|| image1.height() != image2.height())
return -1.0;
// calculate npcr = (1/number_of_pixel) * sum(D(i,j) * 100
// D(i,j) = 1 , if image1(i,j) != image2(i,j)
// D(i,j) = 0 , if image1(i,j) == image2(i,j)
cimg_forXY(image1, x, y) {
if (image1(x, y, 0, 0) != image2(x, y, 0, 0))
npcr++;
}
return (npcr * 100) / number_of_pixels;
}
| 33.4 | 71 | 0.646707 |
5d172740ea0977d01fd8658e96dc78d1043fe494 | 249 | kts | Kotlin | apps/toi-fritatt-kandidatsok/build.gradle.kts | navikt/rekrutteringsbistand-microservices | 6de5dc87193c46168aefd24c0b6c217f80a8d0b9 | [
"MIT"
] | null | null | null | apps/toi-fritatt-kandidatsok/build.gradle.kts | navikt/rekrutteringsbistand-microservices | 6de5dc87193c46168aefd24c0b6c217f80a8d0b9 | [
"MIT"
] | 1 | 2021-12-20T07:58:59.000Z | 2021-12-20T07:58:59.000Z | apps/toi-fritatt-kandidatsok/build.gradle.kts | navikt/toi-rapids-and-rivers | dc306887e918d80a94c044b683b9953265127ab7 | [
"MIT"
] | null | null | null | plugins {
id("toi.rapids-and-rivers")
}
dependencies {
implementation("no.nav.arbeid.cv.avro:cv-event:29")
implementation("io.confluent:kafka-avro-serializer:7.0.0")
implementation("org.codehaus.jackson:jackson-mapper-asl:1.9.13")
} | 27.666667 | 68 | 0.714859 |
c11bfee080f8658417cedf561640927944864a61 | 518 | sql | SQL | FoodDataSQL/src/main/resources/sql/admin/uncategorised_foods.sql | cheburan/api-server | f211dd6f9cb3507fd6ffdbfa29a5dbffb57c1ba1 | [
"Apache-2.0"
] | 3 | 2018-07-20T14:37:07.000Z | 2021-06-09T10:10:04.000Z | FoodDataSQL/src/main/resources/sql/admin/uncategorised_foods.sql | abs-hm-intake24/api-server | 7f2b5c9bd7806c92d73c0ac65c76bb08af22d56c | [
"BSD-3-Clause",
"MIT"
] | 5 | 2020-03-06T01:30:28.000Z | 2021-12-08T07:49:49.000Z | FoodDataSQL/src/main/resources/sql/admin/uncategorised_foods.sql | abs-hm-intake24/api-server | 7f2b5c9bd7806c92d73c0ac65c76bb08af22d56c | [
"BSD-3-Clause",
"MIT"
] | 3 | 2020-03-06T01:24:44.000Z | 2021-02-24T00:26:11.000Z | WITH v AS(
SELECT (SELECT id FROM locales WHERE id={locale_id}) AS locale_id
), t(code, description) AS(
SELECT code, description FROM foods WHERE NOT EXISTS(SELECT 1 FROM foods_categories WHERE food_code=foods.code)
)
SELECT v.locale_id, code, description, local_description
FROM v CROSS JOIN t
LEFT JOIN foods_local ON foods_local.food_code=t.code AND foods_local.locale_id=v.locale_id
UNION ALL
SELECT v.locale_id, NULL, NULL, NULL FROM v WHERE NOT EXISTS(SELECT 1 FROM t)
ORDER BY local_description
| 43.166667 | 113 | 0.779923 |
bc8eb5c520200bad5b05d33b683e8767eeb19f42 | 1,057 | lua | Lua | scripts/nativefiledialog.lua | jazzbre/nativefiledialog-beef | 019f2af6511622e11e0fef2b5891f1fdf6eda30b | [
"MIT"
] | null | null | null | scripts/nativefiledialog.lua | jazzbre/nativefiledialog-beef | 019f2af6511622e11e0fef2b5891f1fdf6eda30b | [
"MIT"
] | null | null | null | scripts/nativefiledialog.lua | jazzbre/nativefiledialog-beef | 019f2af6511622e11e0fef2b5891f1fdf6eda30b | [
"MIT"
] | null | null | null | project "nativefiledialog"
kind "StaticLib"
windowstargetplatformversion("10.0")
includedirs {
path.join(SOURCE_DIR, "nativefiledialog/src/include"),
path.join(SOURCE_DIR, "nativefiledialog/src")
}
files {
path.join(SOURCE_DIR, "nativefiledialog/src/nfd_common.c"),
}
configuration { "VS20*" }
files {
path.join(SOURCE_DIR, "nativefiledialog/src/nfd_win.cpp"),
}
configuration { "xcode* or osx*" }
files {
path.join(SOURCE_DIR, "nativefiledialog/src/nfd_cocoa.m"),
}
configuration { "linux*" }
includedirs {
path.join(SOURCE_DIR, "/usr/include/gtk-3.0"),
path.join(SOURCE_DIR, "/usr/include/glib-2.0"),
path.join(SOURCE_DIR, "/usr/include/pango-1.0"),
path.join(SOURCE_DIR, "/usr/include/harfbuzz"),
path.join(SOURCE_DIR, "/usr/include/cairo"),
path.join(SOURCE_DIR, "/usr/include/gdk-pixbuf-2.0"),
path.join(SOURCE_DIR, "/usr/include/atk-1.0"),
path.join(SOURCE_DIR, "/usr/lib/x86_64-linux-gnu/glib-2.0/include"),
}
files {
path.join(SOURCE_DIR, "nativefiledialog/src/nfd_gtk.c"),
}
configuration {}
| 26.425 | 70 | 0.701987 |
fb38d4a22be5374d0550b1c6c0619d40f33c446c | 706 | java | Java | basicmatchshopping/src/main/java/com/example/basicmatchshopping/controller/CategoryController.java | berkay22demirel/basicmatchshopping | 77dbd1e88045b58991bcfd36f28104bd698ad660 | [
"Apache-2.0"
] | null | null | null | basicmatchshopping/src/main/java/com/example/basicmatchshopping/controller/CategoryController.java | berkay22demirel/basicmatchshopping | 77dbd1e88045b58991bcfd36f28104bd698ad660 | [
"Apache-2.0"
] | null | null | null | basicmatchshopping/src/main/java/com/example/basicmatchshopping/controller/CategoryController.java | berkay22demirel/basicmatchshopping | 77dbd1e88045b58991bcfd36f28104bd698ad660 | [
"Apache-2.0"
] | null | null | null | package com.example.basicmatchshopping.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.example.basicmatchshopping.service.CategoryService;
@RestController
@RequestMapping("/category")
public class CategoryController {
@Autowired
private CategoryService categoryService;
@RequestMapping(value = "/getall")
public ResponseEntity<Object> getAll() throws Exception {
return new ResponseEntity<>(categoryService.getAll(), HttpStatus.OK);
}
}
| 29.416667 | 71 | 0.828612 |
1305954d6076f54c5234020dc83d271dc0046c79 | 326 | h | C | src/wrapped/generated/wrappedwaylandclientdefs.h | ye-yeshun/box86 | 35f133cacd726aac85bcd7befc6ac21ae3a1f53d | [
"MIT"
] | 2,059 | 2019-03-03T22:16:11.000Z | 2022-03-31T21:53:33.000Z | src/wrapped/generated/wrappedwaylandclientdefs.h | ye-yeshun/box86 | 35f133cacd726aac85bcd7befc6ac21ae3a1f53d | [
"MIT"
] | 428 | 2019-03-04T15:19:01.000Z | 2022-03-31T23:46:30.000Z | src/wrapped/generated/wrappedwaylandclientdefs.h | ye-yeshun/box86 | 35f133cacd726aac85bcd7befc6ac21ae3a1f53d | [
"MIT"
] | 207 | 2019-03-14T18:19:18.000Z | 2022-03-30T08:52:41.000Z | /*******************************************************************
* File automatically generated by rebuild_wrappers.py (v2.0.0.10) *
*******************************************************************/
#ifndef __wrappedwaylandclientDEFS_H_
#define __wrappedwaylandclientDEFS_H_
#endif // __wrappedwaylandclientDEFS_H_
| 36.222222 | 69 | 0.478528 |
b902704ceb0df029b3bc09b3a362244451bdd28d | 9,782 | dart | Dart | lib/log/log.dart | ellemenno/rougish | 7a6c286aa4d1e69943973d1e3e8ed12d4d6471af | [
"MIT"
] | null | null | null | lib/log/log.dart | ellemenno/rougish | 7a6c286aa4d1e69943973d1e3e8ed12d4d6471af | [
"MIT"
] | null | null | null | lib/log/log.dart | ellemenno/rougish | 7a6c286aa4d1e69943973d1e3e8ed12d4d6471af | [
"MIT"
] | null | null | null | /// a simple logging utility.
library log;
import 'dart:io';
/// Enumerates the verbosity levels of the logging system, from `none` (least verbose) to `debug` (most verbose).
///
/// The order of increasing verbosity is: `none` < `fatal` < `error` < `warn` < `info` < `debug`.
/// - `none` indicates no logging should occur.
/// - `fatal` allows only messages related to application crashes.
/// - `error` adds messages related to unexpected results that _will_ break expected behavior.
/// - `warn` adds messages related to unexpected results that will _not_ break expected behavior.
/// - `info` adds messages that track happy path execution.
/// - `debug` adds messages that track program state.
enum LogLevel {
/// indicates no logging should occur.
none,
/// allows only messages related to application crashes.
fatal,
/// adds messages related to unexpected results that _will_ break expected behavior.
error,
/// adds messages related to unexpected results that will _not_ break expected behavior.
warn,
/// adds messages that track happy path execution.
info,
/// adds messages that track program state details.
debug,
}
/// Defines the generic recording function provided by [Log].
abstract class Printer {
/// Records a formatted log message onto some destination.
///
/// Message formatting is handled by [Log.formatter].
void print(String message);
}
/// Provides a buffered file recording function for use by [Log].
class BufferedFilePrinter extends Printer {
final File _logFile;
final StringBuffer _buffer = StringBuffer();
/// Returns the length (number of characters) of the content that has been accumulated so far.
int get bufferLength => _buffer.length;
/// Records a formatted log message as a line entry in the log buffer. Use [flush] to print to file.
///
/// Message formatting is handled by [Log.formatter].
@override
void print(String message) {
_buffer.write("${message}\n");
}
/// Clears the contents of the buffer. Note that [flush] also clears afer write.
void clear() {
if (_buffer.length > 0) {
_buffer.clear();
}
}
/// Writes the contents of the buffer to the file specified in the constructor, and clears the buffer.
void flush() {
if (_buffer.length > 0) {
_logFile.writeAsStringSync(_buffer.toString(), mode: FileMode.append);
_buffer.clear();
}
}
BufferedFilePrinter(String fileName) : _logFile = File(fileName) {
_logFile.writeAsStringSync('');
}
}
/// Provides a terminal recording function for use by [Log].
class StderrPrinter extends Printer {
/// Records a formatted log message as a line entry to the dart:io stderr stream of the terminal.
///
/// Message formatting is handled by [Log.formatter].
@override
void print(String message) {
stderr.write("${message}\n");
}
}
/// Provides a message formatting function for use by [Log].
///
/// Formatted messages are sent to [Log.printer] for output.
class Formatter {
final StringBuffer _buffer = StringBuffer();
/// Generates a formatted log message by combining [time], [level],
/// a message owner [label], and the [message] itself.
///
/// This implementation's output format is: `hh:mm:ss.sss [LEVEL] label: message`
String format(DateTime time, LogLevel level, String label, String message) {
_buffer.clear();
_buffer.write(time.hour.toString().padLeft(2, '0'));
_buffer.write(':');
_buffer.write(time.minute.toString().padLeft(2, '0'));
_buffer.write(':');
_buffer.write(time.second.toString().padLeft(2, '0'));
_buffer.write('.');
_buffer.write(time.millisecond.toString().padLeft(3, '0'));
_buffer.write(' [');
_buffer.write(level.name.toUpperCase().padLeft(5, ' '));
_buffer.write('] ');
_buffer.write(label);
_buffer.write(': ');
_buffer.write(message);
return _buffer.toString();
}
}
/// Provides methods for emitting and printing formatted log messages at various verbosity levels.
///
/// Messages that exceed the current verbosity threshold stored in [Log.level] will be ignored.
/// The default level is `info` (allowing `info`, `warn`, `error`, and `fatal` messages, but
/// not `debug`).
///
/// A default [Formatter] is provided. Custom formatters can be used by setting
/// the value of [Log.formatter] to a [Formatter]-compliant instance.
///
/// A default [Printer] is provided to log to the terminal: [StderrPrinter]. Custom printers
/// can be used by setting the value of [Log.printer] to a [Printer]-compliant instance.
///
/// Logging functions expect a label to indicate the owner of the message, and a string or
/// string-generating object (like a function) that can be evaluated to get the message string.
/// By capturing message formation in a closure, any costs associated with constructing the
/// message are avoided for logging calls above the current verbosity threshold ([Log.level]).
class Log {
/// The current threshold for log messages.
///
/// Only messages at the same or lower logging levels will be logged.
///
/// The default level is `info` (allowing `info`, `warn`, `error`, and `fatal` messages, but
/// not `debug`).
static LogLevel level = LogLevel.info;
/// The current message formatter in use.
///
/// Formatters transform the raw message into what will actually be printed.
///
/// A default formatter is provided (see [Formatter], but may be overridden with a custom one
/// by setting the value of this field.
static Formatter formatter = Formatter();
/// The current printer in use.
///
/// Printers record the formatted message onto some destination (e.g. terminal, file, etc).
///
/// A default printer is provided {see [StderrPrinter], but may be overridden with a custom one
/// by setting the value of this field.
static Printer printer = StderrPrinter();
/// Sets [Log.printer] to a [BufferedFilePrinter] instance that logs to a memory buffer until [BufferedFilePrinter.flush] triggers writing to the filename given in [logFile].
static void toBufferedFile({String logFile = 'log.txt'}) {
printer = BufferedFilePrinter(logFile);
}
/// Submit a message at `debug` level verbosity (the highest verbosity level).
///
/// Debug messages help isolate problems in running systems, by showing what is being
/// executed and the execution context.
///
/// Debug messages should provide context to make spotting abnormal values or conditions easier.
/// The system is generally not run with debug logging enabled, except when troubleshooting.
///
/// [label] is the name of the message owner, and [messageGenerator] is a string, function,
/// or object that can be evaluated to get the message string
static void debug(String label, Object? messageGenerator) {
if (level.index >= LogLevel.debug.index) {
_processMessage(LogLevel.debug, label, messageGenerator);
}
}
/// Submit a message at `info` level verbosity.
///
/// Info messages announce—at a high level—what the running system is doing.
/// The system should be able to run at full speed with info level logging enabled.
///
/// Info messages should paint a clear picture of normal system operation.
///
/// [label] is the name of the message owner, and [messageGenerator] is a string, function,
/// or object that can be evaluated to get the message string
static void info(String label, Object? messageGenerator) {
if (level.index >= LogLevel.info.index) {
_processMessage(LogLevel.info, label, messageGenerator);
}
}
/// Submit a message at `warn` level verbosity.
///
/// Warn messages signal that something unexpected has occurred; the system
/// is still operating as expected, but some investigation may be warranted.
///
/// Warn messages should be clear about what expectation was invalidated.
///
/// [label] is the name of the message owner, and [messageGenerator] is a string, function,
/// or object that can be evaluated to get the message string
static void warn(String label, Object? messageGenerator) {
if (level.index >= LogLevel.warn.index) {
_processMessage(LogLevel.warn, label, messageGenerator);
}
}
/// Submit a message at `error` level verbosity.
///
/// Error messages record that something has gone wrong; the system is unable
/// to recover, and an operator needs to investigate and fix something.
///
/// Error messages should be clear about what went wrong and how it can be triaged or fixed.
///
/// [label] is the name of the message owner, and [messageGenerator] is a string, function,
/// or object that can be evaluated to get the message string
static void error(String label, Object? messageGenerator) {
if (level.index >= LogLevel.error.index) {
_processMessage(LogLevel.error, label, messageGenerator);
}
}
/// Submit a message at `fatal` level verbosity.
///
/// Fatal messages document a failure that prevents the system from starting,
/// and indicate the system is completely unusable.
///
/// Fatal messages should be clear about what assertion was violated.
///
/// [label] is the name of the message owner, and [messageGenerator] is a string, function,
/// or object that can be evaluated to get the message string
static void fatal(String label, Object? messageGenerator) {
if (level.index >= LogLevel.fatal.index) {
_processMessage(LogLevel.fatal, label, messageGenerator);
}
}
static void _processMessage(LogLevel level, String label, Object? messageGenerator) {
if (messageGenerator is Function) {
messageGenerator = messageGenerator();
}
printer.print(formatter.format(DateTime.now(), level, label, '${messageGenerator}'));
}
}
| 39.128 | 176 | 0.70231 |
d2c293bde636e97d8fa6d12152a797adc478490a | 936 | ps1 | PowerShell | old_packages/wizzi-ittf-sources/scripts/psipse/v5-documentation.generate.ps1 | wizzifactory/wizzi-history | b86497f357f3b0ecc2f1bcacef85fe68d5b9781f | [
"MIT"
] | null | null | null | old_packages/wizzi-ittf-sources/scripts/psipse/v5-documentation.generate.ps1 | wizzifactory/wizzi-history | b86497f357f3b0ecc2f1bcacef85fe68d5b9781f | [
"MIT"
] | null | null | null | old_packages/wizzi-ittf-sources/scripts/psipse/v5-documentation.generate.ps1 | wizzifactory/wizzi-history | b86497f357f3b0ecc2f1bcacef85fe68d5b9781f | [
"MIT"
] | null | null | null | clear
cd c:\my\wizzi\v5\apps\wizzi-documentation\src
node generate
if (-not $?)
{
throw 'error executing wizzi job'
}
if ( 1 )
{
robocopy c:\my\wizzi\v5\apps\wizzi-documentation\dist c:\my\wizzi\v6\test\wizzi-documentation /MIR /XD .git, node_modules
}
if ( 1 )
{
cd c:\my\wizzi\v6\test\wizzi-documentation\jobs
node site
}
if ( 0 )
{
cd c:\my\wizzi\v6\test\wizzi-documentation\jobs
node index
node concepts
node starters
node project
}
if ( 0 )
{
cd c:\my\wizzi\v6\test\wizzi-documentation\jobs
node docs
}
if ( 0 )
{
cd c:\my\wizzi\v6\test\wizzi-documentation\jobs
node api_preprocess
node api
}
if ( 0 )
{
cd c:\my\wizzi\v6\test\wizzi-documentation\jobs
node code_intro
}
if ( 0 )
{
cd c:\my\wizzi\v6\test\wizzi-documentation\jobs
node code_preprocess
node code
}
<#
cd c:\my\wizzi\v6\test\wizzi-documentation\jobs
node index
node package
#> | 15.096774 | 125 | 0.657051 |
71a40d8802ac8527e688cb566f17f976bac5d4b5 | 587 | ts | TypeScript | app/config.ts | META-1-Official/litewallet-native | 802d5155fbd866fa049a03244e1a54c62e923bf7 | [
"MIT"
] | null | null | null | app/config.ts | META-1-Official/litewallet-native | 802d5155fbd866fa049a03244e1a54c62e923bf7 | [
"MIT"
] | null | null | null | app/config.ts | META-1-Official/litewallet-native | 802d5155fbd866fa049a03244e1a54c62e923bf7 | [
"MIT"
] | null | null | null | import { NETWORK } from '@env';
export default {
META1_CONNECTION_URL:
NETWORK === 'TESTNET' ? 'wss://maia.dev.meta1.io/ws' : 'wss://maia.meta1.io/ws',
faucetAddress:
NETWORK === 'TESTNET'
? 'https://faucet.dev.meta1.io/faucet'
: 'https://faucet.meta1.io/faucet',
litewalletApiHost:
NETWORK === 'TESTNET'
? 'https://litewallet.dev.cryptomailsvc.io'
: 'https://litewallet.cryptomailsvc.io',
GatewayUrl:
NETWORK === 'TESTNET'
? 'https://gateway.dev.meta1.io/api/wallet/init'
: 'https://gateway.api.meta1.io/api/wallet/init',
};
| 30.894737 | 84 | 0.626917 |
c8858e95681690890624bd0e26dabf72bfc23a04 | 216 | sql | SQL | api/db/migrations/20210715161023_add_user/migration.sql | mct-dev/need-a-fourth | 9e169c55b4808658f80b1d1f88c2f573099f5259 | [
"MIT"
] | null | null | null | api/db/migrations/20210715161023_add_user/migration.sql | mct-dev/need-a-fourth | 9e169c55b4808658f80b1d1f88c2f573099f5259 | [
"MIT"
] | null | null | null | api/db/migrations/20210715161023_add_user/migration.sql | mct-dev/need-a-fourth | 9e169c55b4808658f80b1d1f88c2f573099f5259 | [
"MIT"
] | null | null | null | -- CreateTable
CREATE TABLE "User" (
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"email" TEXT NOT NULL,
"hashedPassword" TEXT NOT NULL,
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
);
| 27 | 59 | 0.712963 |
5ff0c6787151f3f7cd206deb78f2e2bbd8f435e8 | 1,355 | sql | SQL | SQL/Working_Create_User_Login.sql | ColbyLithyouvong/PortfolioReferences | 59def33676a5bc9696e270cf9135b4b08908f943 | [
"MIT"
] | null | null | null | SQL/Working_Create_User_Login.sql | ColbyLithyouvong/PortfolioReferences | 59def33676a5bc9696e270cf9135b4b08908f943 | [
"MIT"
] | null | null | null | SQL/Working_Create_User_Login.sql | ColbyLithyouvong/PortfolioReferences | 59def33676a5bc9696e270cf9135b4b08908f943 | [
"MIT"
] | null | null | null | -- Step 1 Using a password generator,
-- Generate a password that is at least 16 characters excluding any ambiguous Charcters
-- https://passwordsgenerator.net/
-- Step 2 Use the convention:
-- {appname_1word_lowercase}_{env}_{purpose}_{CRUD}
-- Create a username
-- step 3 exec on master
-- https://docs.microsoft.com/en-us/sql/t-sql/statements/create-login-transact-sql?view=sql-server-ver15#after-creating-a-login
--Create Login [some_username_with_company_convention] with password = 'some_random_password_from_generator';
--Create User [some.user@domain.com] From External Provider
-- Step 4 exec on master and db
-- https://docs.microsoft.com/en-us/sql/t-sql/statements/create-user-transact-sql?view=sql-server-ver15
--Create User [some_username_with_company_convention] from login [some_username_with_company_convention];
-- step 5 exec on db
-- https://docs.microsoft.com/en-us/sql/t-sql/statements/grant-transact-sql?view=sql-server-ver15
-- https://docs.microsoft.com/en-us/sql/t-sql/statements/grant-object-permissions-transact-sql?view=sql-server-ver15
--Grant Select, Execute, insert, update, alter ON Database::[my_database] To [some_username_with_company_convention];
--Grant Select, Execute, insert, update, alter ON Database::[my_database] To [some.user@domain.com];
-- step 6 record password in centralized administrative location
| 54.2 | 127 | 0.78524 |
d26a7acb9705dca235d3a66f8b9944042f8d3c88 | 8,124 | php | PHP | app/Http/Controllers/LocationsController.php | LizzieChibvuri/Locations | 17b4f6eaa6ae8034afdd0b635c8f497139da57c0 | [
"MIT"
] | null | null | null | app/Http/Controllers/LocationsController.php | LizzieChibvuri/Locations | 17b4f6eaa6ae8034afdd0b635c8f497139da57c0 | [
"MIT"
] | null | null | null | app/Http/Controllers/LocationsController.php | LizzieChibvuri/Locations | 17b4f6eaa6ae8034afdd0b635c8f497139da57c0 | [
"MIT"
] | null | null | null | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use DB;
use Session;
use App\Location;
use App\Photo;
use JD\Cloudder\Facades\Cloudder;
class LocationsController extends Controller
{
//
/**
* Create a new controller instance.
except is to specify routes that are not authenticated
*
* @return void
*/
public function __construct()
{
// $this->middleware('auth',['except'=>['index','show']]);
}
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$data=Location::orderby('name','asc')->get();
//pass locations data to view
return view('locations.index',['data'=>$data]);
}
public function getlocationphotos($id)
{
$data=Photo::where('location_id',$id)->get();
//pass locations data to view
return view('photos.index',['data'=>$data]);
}
public function getlocationphotodetails($id)
{
$data=Photo::find($id);
//pass locations data to view
return view('photos.details',['data'=>$data]);
}
public function getsearch()
{
//pass locations data to view
return view('locations.search');
}
//search for specific location using cordinates of place name
public function search(Request $request)
{
$this->validate($request,[
'location'=>'required'
]);
//constructing foursquare url
$url="https://api.foursquare.com/v2/venues/explore?";
$url.="client_id=".config('apis.fsclientid','');
$url.="&client_secret=".config('apis.fsclientsecret','');
$url.="&v=".date("Ymd");
$url.="&near=".$request->input('location');
$url.="&venuePhotos=1";
try
{
$response=file_get_contents($url);
$data = json_decode($response, TRUE);
if(!empty($data))
{
$locationid=$data['response']['geocode']['longId'];
//check if location is in DB if not ,save location
if(!empty($locationid))
{
$location=Location::where('locationid',$locationid)->get()->first();
if(empty($location))
{
$locationData=new Location;
$photoData=new Photo;
$name=$data['response']['geocode']['displayString'];
$locationData->locationid=$locationid;
$locationData->name=$name;
//save to Db
try
{
DB::beginTransaction();
//query 1
$locationData->save();
//query 2
$photoData->location_id=$locationData->id;
$photos_array=[];
foreach($data['response']['groups'][0]['items'] as $venuedata)
{
if(!empty($venuedata['venue']['photos']['groups']))
{
//photofields
$photoid=$venuedata['venue']['photos']['groups'][0]['items'][0]['id'];
$prefix=$venuedata['venue']['photos']['groups'][0]['items'][0]['prefix'];
$suffix=$venuedata['venue']['photos']['groups'][0]['items'][0]['suffix'];
$venueid=$venuedata['venue']['id'];
$name=$venuedata['venue']['name'];
//$state=$venuedata['venue']['location']['state'];
$country=$venuedata['venue']['location']['country'];
$category=$venuedata['venue']['categories'][0]['name'];
$coordinates=$venuedata['venue']['location']['lat'].','.$venuedata['venue']['location']['lng'];
$photoData->photoid=$photoid;
$photoData->prefix=$prefix;
$photoData->suffix=$suffix;
$photoData->venueid=$venueid;
$photoData->name=$name;
//$photoData->state=$state;
$photoData->country=$country;
$photoData->category=$category;
$photoData->coordinates=$coordinates;
//add to array
$photos_array[]=$photoData->attributesToArray();
$dbdata=Photo::where('photoid',$photoid)->get();
//upload image to cloudinary if photo not in DB already
if(empty($dbdata))
{
try
{
$imagename=$prefix.'width250'.$suffix;
Cloudder::upload($imagename, null);
Session::flash('msg','Photo Uploaded successfully!');
}
catch(Exception $e)
{
Session::flash('msg','photo not uploaded!');
}
}
}
}
Photo::insert($photos_array);
DB::commit();
Session::flash('msg','Location saved to database!');
}
catch(\Exception $e)
{
Session::flash('msg',$e->getMessage());
DB::rollback();
}
}
}
else
{
Session::flash('msg','location field empty!');
}
}
//save photos
//upload photos to flickr
}
catch(Exception $ex)
{
//store status message
Session::flash('msg','Sorry location information could not be retrieve,try a different location!');
return view('locations.index');
}
return view('locations.search',['data'=>$data]);
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
//load create form
return view('locations.create');
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
//validate location data
$this->validate($request,[
]);
//get location data
$locationData= new location;
//$locationData=$request->all();
//insert location dta
//location::create($locationData);
$locationData->save();
//store status message
Session::flash('success_msg','location added successfully');
return redirect()->route('locations.index');
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
//fetch location data
$location=location::find($id);
//pass data to details view
return view('locations.details',['location'=>$location]);
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
//get location data
$location=location::find($id);
//load data in view
return view('locations.edit',['location'=>$location]);
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
//delete location dta
$locationData=location::find($id);
$locationData->delete();
//store status message
Session::flash('success_msg','location deleted successfully');
return redirect()->route('locations.index');
}
}
| 25.54717 | 110 | 0.501846 |
1f08bcc7389dc8ee94743a944f54a6d0773dd220 | 1,937 | cpp | C++ | Source/UxThemeEx/SymbolContext.cpp | mgnslndh/PresentationTheme.Aero | dff6026cc7989e836b073001e95faa47e8e96b65 | [
"MIT"
] | 2 | 2020-10-19T12:20:50.000Z | 2020-12-05T08:10:08.000Z | Visual Styles/PresentationTheme.Aero/Source/UxThemeEx/SymbolContext.cpp | alexdesign001/UX | 1709446a82a8f2c01c0e6d95a29ac512439df1b2 | [
"MS-PL"
] | null | null | null | Visual Styles/PresentationTheme.Aero/Source/UxThemeEx/SymbolContext.cpp | alexdesign001/UX | 1709446a82a8f2c01c0e6d95a29ac512439df1b2 | [
"MS-PL"
] | null | null | null | #include "SymbolContext.h"
#include "Utils.h"
#include <string>
#include <vector>
namespace uxtheme
{
namespace
{
struct SymbolInfoPackage : SYMBOL_INFO_PACKAGE
{
SymbolInfoPackage()
{
si.SizeOfStruct = sizeof(SYMBOL_INFO);
si.MaxNameLen = sizeof(name);
}
};
} // namespace
HRESULT SymbolContext::Initialize()
{
if (!SymInitialize(GetCurrentProcess(), nullptr, FALSE) != FALSE)
return GetLastErrorAsHResult();
initialized = true;
DWORD options = SymGetOptions();
options |= SYMOPT_DEBUG;
SymSetOptions(options);
return S_OK;
}
HRESULT SymbolContext::Cleanup()
{
if (initialized && !SymCleanup(GetCurrentProcess()))
return GetLastErrorAsHResult();
initialized = false;
return S_OK;
}
SymbolContext::~SymbolContext()
{
(void)Cleanup();
}
HRESULT SymbolContext::LoadModule(HMODULE module)
{
std::wstring path;
ENSURE_HR(GetModuleFileNameW(module, path));
DWORD64 const baseAddr =
SymLoadModuleExW(GetCurrentProcess(), nullptr, path.data(), nullptr,
reinterpret_cast<uintptr_t>(module), 0, nullptr, 0);
if (!baseAddr)
return GetLastErrorAsHResult();
return S_OK;
}
HRESULT SymbolContext::UnloadModule(HMODULE module)
{
if (!SymUnloadModule64(GetCurrentProcess(),
reinterpret_cast<uintptr_t>(module)))
return GetLastErrorAsHResult();
return S_OK;
}
HRESULT SymbolContext::GetSymbolAddress(HMODULE module, char const* symbolName,
uintptr_t& address)
{
if (!initialized)
return E_UNEXPECTED;
SymbolInfoPackage info;
if (!SymFromName(GetCurrentProcess(), symbolName, &info.si))
return GetLastErrorAsHResult();
if (info.si.ModBase != reinterpret_cast<uintptr_t>(module))
return E_FAIL;
address = info.si.Address;
return S_OK;
}
} // namespace uxtheme
| 21.522222 | 79 | 0.658751 |
4a28079f498ca7a6f75b266a030347ae475cfb48 | 1,900 | swift | Swift | CovidWatch/AppDelegate+BackgroundTasks.swift | Dithn/covidwatch-ios-en | a761aeecd103034f762844ed1d9436861a180786 | [
"Apache-2.0"
] | null | null | null | CovidWatch/AppDelegate+BackgroundTasks.swift | Dithn/covidwatch-ios-en | a761aeecd103034f762844ed1d9436861a180786 | [
"Apache-2.0"
] | null | null | null | CovidWatch/AppDelegate+BackgroundTasks.swift | Dithn/covidwatch-ios-en | a761aeecd103034f762844ed1d9436861a180786 | [
"Apache-2.0"
] | null | null | null | //
// Created by Zsombor Szabo on 29/03/2020.
//
import Foundation
import BackgroundTasks
import os.log
import ExposureNotification
import UIKit
extension String {
public static let exposureNotificationBackgroundTaskIdentifier = "org.covidwatch.ios.exposure-notification"
}
extension TimeInterval {
public static let minimumBackgroundFetchTimeInterval: TimeInterval = 60*60*6
}
@available(iOS 13.0, *)
extension AppDelegate {
func setupBackgroundTask() {
BGTaskScheduler.shared.register(forTaskWithIdentifier: .exposureNotificationBackgroundTaskIdentifier, using: .main) { task in
// Notify the user if bluetooth is off
ExposureManager.shared.showBluetoothOffUserNotificationIfNeeded()
// Perform the exposure detection
let progress = ExposureManager.shared.detectExposures { success in
task.setTaskCompleted(success: success)
}
// Handle running out of time
task.expirationHandler = {
progress.cancel()
LocalStore.shared.exposureDetectionErrorLocalizedDescription = NSLocalizedString("BACKGROUND_TIMEOUT", comment: "Error")
}
// Schedule the next background task
self.scheduleBackgroundTaskIfNeeded()
}
scheduleBackgroundTaskIfNeeded()
}
func scheduleBackgroundTaskIfNeeded() {
guard ENManager.authorizationStatus == .authorized else { return }
let taskRequest = BGProcessingTaskRequest(identifier: .exposureNotificationBackgroundTaskIdentifier)
taskRequest.requiresNetworkConnectivity = true
do {
try BGTaskScheduler.shared.submit(taskRequest)
} catch {
print("Unable to schedule background task: \(error)")
}
}
}
| 31.147541 | 136 | 0.657895 |
98a1037c1f88d224fbe0ef34a6601248f6a8c571 | 58,709 | htm | HTML | MemoryLifter/Development/CurrentHelp/es/html/Teachers.htm | hmehr/OSS | f06a87bb16a843e1db4180a6dc264d1ebc385d76 | [
"MIT"
] | 1 | 2018-09-11T18:26:57.000Z | 2018-09-11T18:26:57.000Z | MemoryLifter/Development/CurrentHelp/es/html/Teachers.htm | hmehr/OSS | f06a87bb16a843e1db4180a6dc264d1ebc385d76 | [
"MIT"
] | null | null | null | MemoryLifter/Development/CurrentHelp/es/html/Teachers.htm | hmehr/OSS | f06a87bb16a843e1db4180a6dc264d1ebc385d76 | [
"MIT"
] | 1 | 2018-09-11T18:26:58.000Z | 2018-09-11T18:26:58.000Z | <!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">
<html>
<!--(==============================================================)--> <!--(Document created with RoboEditor. )============================--> <!--(==============================================================)-->
<head>
<title>Profesores</title>
<!--(Meta)==========================================================-->
<meta http-equiv=content-type content="text/html; charset=windows-1252">
<meta name=generator content="RoboHELP by eHelp Corporation - www.ehelp.com">
<meta name=generator-major-version content=0.1>
<meta name=generator-minor-version content=1>
<meta name=filetype content=kadov>
<meta name=filetype-version content=1>
<meta name=page-count content=1>
<meta name=layout-height content=1057>
<meta name=layout-width content=954>
<!--(Links)=========================================================-->
<link rel="StyleSheet" href="..\ML_Help.css">
</head>
<!--(Body)==========================================================-->
<body>
<h2 class=Topic>Profesores</h2>
<p>En función del tipo de profesor que elija en la ficha <b>Profesores <span
style="font-weight: normal;">del cuadro de diálogo </span></b><span style="font-weight: bold;">Opciones de aprendizaje</span>, cambiará la configuración del resto de fichas:</p>
<p> </p>
<!--(Table)=========================================================-->
<table x-use-null-cells
style="x-cell-content-align: top;
border-spacing: 0px;
border-spacing: 0px;"
cellspacing=0>
<col style="width: 79px;">
<col style="width: 135px;">
<col style="width: 82px;">
<col style="width: 95px;">
<col style="width: 87px;">
<col style="width: 79px;">
<tr style="x-cell-content-align: top; height: 49px;"
valign=top>
<td style="width: 79px;
background-color: #800000;
padding-right: 10px;
padding-left: 10px;
border-top-width: 1px;
border-top-color: #000000;
border-top-style: Solid;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
border-left-style: Solid;
border-left-color: #000000;
border-left-width: 1px;
x-cell-content-align: center;"
valign=middle
bgcolor=#800000
width=79px>
<p style="font-weight: bold; color: #ffffff;">Ficha</td>
<td colspan=1
rowspan=1
style="width: 135px;
background-color: #800000;
border-top-style: Solid;
border-top-color: #000000;
border-top-width: 1px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;
x-cell-content-align: center;"
valign=middle
bgcolor=#800000
width=135px>
<p style="color: #ffffff;
font-weight: bold;
text-align: center;"
align=center> </td>
<td style="width: 82px;
background-color: #800000;
border-top-style: Solid;
border-top-color: #000000;
border-top-width: 1px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;
x-cell-content-align: center;"
valign=middle
bgcolor=#800000
width=82px>
<p style="color: #ffffff;
font-weight: bold;
text-align: center;"
align=center>Valor por defecto</td>
<td style="width: 95px;
background-color: #800000;
border-top-style: Solid;
border-top-color: #000000;
border-top-width: 1px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;
x-cell-content-align: center;"
valign=middle
bgcolor=#800000
width=95px>
<p style="color: #ffffff;
font-weight: bold;
text-align: center;"
align=center>Estricto</td>
<td style="width: 87px;
background-color: #800000;
border-top-style: Solid;
border-top-color: #000000;
border-top-width: 1px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;
x-cell-content-align: center;"
valign=middle
bgcolor=#800000
width=87px>
<p style="color: #ffffff;
font-weight: bold;
text-align: center;"
align=center>Flexible</td>
<td style="width: 79px;
background-color: #800000;
border-top-style: Solid;
border-top-color: #000000;
border-top-width: 1px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;
x-cell-content-align: center;"
valign=middle
bgcolor=#800000
width=79px>
<p style="color: #ffffff;
font-weight: bold;
text-align: center;"
align=center>Alumno esporádico</td></tr>
<tr style="x-cell-content-align: top; height: 19px;"
valign=top>
<td rowspan=10
colspan=1
style="width: 79px;
background-color: #c0c0c0;
padding-right: 10px;
padding-left: 10px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
border-left-width: 1px;
border-left-color: #000000;
border-left-style: Solid;"
bgcolor=#C0C0C0
width=79px>
<p style="font-weight: bold;">Modo de aprendizaje</td>
<td colspan=1
rowspan=1
style="width: 135px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=135px>
<p style="font-weight: bold; font-style: normal;">Dirección</td>
<td style="width: 82px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=82px>
<p style="text-align: center;"
align=center>P => R</td>
<td style="width: 95px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=95px>
<p style="text-align: center;"
align=center>Mixto</td>
<td style="width: 87px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=87px>
<p style="text-align: center;"
align=center>R => P</td>
<td style="width: 79px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=79px>
<p style="text-align: center;"
align=center>Mixto</td></tr>
<tr style="x-cell-content-align: top; height: 35px;"
valign=top>
<td_null>
<td colspan=1
rowspan=1
style="width: 135px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=135px>
<p style="font-weight: bold; font-style: normal;">Permitir elementos de distracción aleatorios</td>
<td colspan=1
rowspan=1
style="width: 82px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=82px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td>
<td colspan=1
rowspan=1
style="width: 95px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=95px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td>
<td colspan=1
rowspan=1
style="width: 87px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=87px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td>
<td colspan=1
rowspan=1
style="width: 79px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=79px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td></tr>
<tr style="x-cell-content-align: top; height: 35px;"
valign=top>
<td_null>
<td colspan=1
rowspan=1
style="width: 135px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=135px>
<p style="font-weight: bold; font-style: normal;">Permitir varias respuestas correctas</td>
<td colspan=1
rowspan=1
style="width: 82px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=82px>
<p style="font-weight: bold;
text-align: center;
background-color: #c0c0c0;"
align=center> </td>
<td colspan=1
rowspan=1
style="width: 95px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=95px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td>
<td colspan=1
rowspan=1
style="width: 87px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=87px>
<p style="font-weight: bold; text-align: center;"
align=center> </td>
<td colspan=1
rowspan=1
style="width: 79px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=79px>
<p style="font-weight: bold; text-align: center;"
align=center> </td></tr>
<tr style="x-cell-content-align: top; height: 19px;"
valign=top>
<td_null>
<td colspan=1
rowspan=1
style="width: 135px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=135px>
<p style="font-weight: bold; font-style: normal;">Número de opciones:</td>
<td colspan=1
rowspan=1
style="width: 82px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=82px>
<p style="font-weight: bold; text-align: center;"
align=center>3</td>
<td colspan=1
rowspan=1
style="width: 95px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=95px>
<p style="font-weight: bold; text-align: center;"
align=center>5</td>
<td colspan=1
rowspan=1
style="width: 87px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=87px>
<p style="font-weight: bold; text-align: center;"
align=center>3</td>
<td colspan=1
rowspan=1
style="width: 79px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=79px>
<p style="font-weight: bold; text-align: center;"
align=center>3</td></tr>
<tr style="x-cell-content-align: top; height: 35px;"
valign=top>
<td_null>
<td colspan=1
rowspan=1
style="width: 135px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=135px>
<p style="font-weight: bold; font-style: normal;">N.º máximo de respuestas correctas</td>
<td colspan=1
rowspan=1
style="width: 82px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=82px>
<p style="font-weight: bold; text-align: center;"
align=center>1</td>
<td colspan=1
rowspan=1
style="width: 95px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=95px>
<p style="font-weight: bold; text-align: center;"
align=center>2</td>
<td colspan=1
rowspan=1
style="width: 87px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=87px>
<p style="font-weight: bold; text-align: center;"
align=center>1</td>
<td colspan=1
rowspan=1
style="width: 79px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=79px>
<p style="font-weight: bold; text-align: center;"
align=center>1</td></tr>
<tr style="x-cell-content-align: top; height: 19px;"
valign=top>
<td_null>
<td colspan=1
rowspan=1
style="width: 135px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=135px>
<p style="font-weight: bold; font-style: normal;">Estándar</td>
<td colspan=1
rowspan=1
style="width: 82px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=82px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td>
<td colspan=1
rowspan=1
style="width: 95px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=95px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td>
<td colspan=1
rowspan=1
style="width: 87px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=87px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td>
<td colspan=1
rowspan=1
style="width: 79px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=79px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td></tr>
<tr style="x-cell-content-align: top; height: 19px;"
valign=top>
<td_null>
<td colspan=1
rowspan=1
style="width: 135px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=135px>
<p style="font-weight: bold; font-style: normal;">Selección múltiple</td>
<td colspan=1
rowspan=1
style="width: 82px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=82px>
<p style="font-weight: bold; text-align: center;"
align=center> </td>
<td colspan=1
rowspan=1
style="width: 95px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=95px>
<p style="font-weight: bold; text-align: center;"
align=center> </td>
<td colspan=1
rowspan=1
style="width: 87px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=87px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td>
<td colspan=1
rowspan=1
style="width: 79px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=79px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td></tr>
<tr style="x-cell-content-align: top; height: 19px;"
valign=top>
<td_null>
<td colspan=1
rowspan=1
style="width: 135px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=135px>
<p style="font-weight: bold; font-style: normal;">Frases</td>
<td colspan=1
rowspan=1
style="width: 82px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=82px>
<p style="font-weight: bold; text-align: center;"
align=center> </td>
<td colspan=1
rowspan=1
style="width: 95px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=95px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td>
<td colspan=1
rowspan=1
style="width: 87px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=87px>
<p style="font-weight: bold; text-align: center;"
align=center> </td>
<td colspan=1
rowspan=1
style="width: 79px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=79px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td></tr>
<tr style="x-cell-content-align: top; height: 35px;"
valign=top>
<td_null>
<td colspan=1
rowspan=1
style="width: 135px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=135px>
<p style="font-weight: bold; font-style: normal;">Comprensión de idioma hablado</td>
<td colspan=1
rowspan=1
style="width: 82px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=82px>
<p style="font-weight: bold; text-align: center;"
align=center> </td>
<td colspan=1
rowspan=1
style="width: 95px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=95px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td>
<td colspan=1
rowspan=1
style="width: 87px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=87px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td>
<td colspan=1
rowspan=1
style="width: 79px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=79px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td></tr>
<tr style="x-cell-content-align: top; height: 19px;"
valign=top>
<td_null>
<td colspan=1
rowspan=1
style="width: 135px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=135px>
<p style="font-weight: bold; font-style: normal;">Reconocimiento de imagen</td>
<td colspan=1
rowspan=1
style="width: 82px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=82px>
<p> </td>
<td colspan=1
rowspan=1
style="width: 95px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=95px>
<p> </td>
<td colspan=1
rowspan=1
style="width: 87px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=87px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td>
<td colspan=1
rowspan=1
style="width: 79px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=79px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td></tr>
<tr style="x-cell-content-align: top; height: 19px;"
valign=top>
<td style="width: 79px;
background-color: #c0c0c0;
padding-right: 10px;
padding-left: 10px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
border-left-width: 1px;
border-left-color: #000000;
border-left-style: Solid;"
bgcolor=#C0C0C0
width=79px>
<p style="font-weight: bold;">Sinónimos</td>
<td colspan=1
rowspan=1
style="width: 135px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=135px>
<p style="font-weight: bold; font-style: normal;">Promocionar cuando</td>
<td style="width: 82px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=82px>
<p style="text-align: center;"
align=center>una conocida</td>
<td style="width: 95px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=95px>
<p style="text-align: center;"
align=center>100% conocidas</td>
<td style="width: 87px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=87px>
<p style="text-align: center;"
align=center>una conocida</td>
<td style="width: 79px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=79px>
<p style="text-align: center;"
align=center>una conocida</td></tr>
<tr style="x-cell-content-align: top; height: 35px;"
valign=top>
<td colspan=1
rowspan=5
style="width: 79px;
background-color: #c0c0c0;
padding-right: 10px;
padding-left: 10px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
border-left-width: 1px;
border-left-color: #000000;
border-left-style: Solid;"
bgcolor=#C0C0C0
width=79px>
<p style="font-weight: bold;">Escritura</td>
<td colspan=1
rowspan=1
style="width: 135px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=135px>
<p style="font-weight: bold; font-style: normal;">Errores tipográficos</td>
<td colspan=1
rowspan=1
style="width: 82px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=82px>
<p style="text-align: center;"
align=center> </td>
<td colspan=1
rowspan=1
style="width: 95px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=95px>
<p style="text-align: center;"
align=center>Promocionar sólo si no hay ninguno</td>
<td colspan=1
rowspan=1
style="width: 87px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=87px>
<p style="text-align: center;"
align=center> </td>
<td colspan=1
rowspan=1
style="width: 79px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=79px>
<p style="text-align: center;"
align=center> </td></tr>
<tr style="x-cell-content-align: top; height: 19px;"
valign=top>
<td_null>
<td colspan=1
rowspan=1
style="width: 135px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=135px>
<p style="font-weight: bold; font-style: normal;">Corregir sobre la marcha</td>
<td colspan=1
rowspan=1
style="width: 82px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=82px>
<p style="font-weight: bold; text-align: center;"
align=center> </td>
<td colspan=1
rowspan=1
style="width: 95px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=95px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td>
<td colspan=1
rowspan=1
style="width: 87px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=87px>
<p style="font-weight: bold; text-align: center;"
align=center> </td>
<td colspan=1
rowspan=1
style="width: 79px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=79px>
<p style="font-weight: bold; text-align: center;"
align=center> </td></tr>
<tr style="x-cell-content-align: top; height: 19px;"
valign=top>
<td_null>
<td colspan=1
rowspan=1
style="width: 135px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=135px>
<p style="font-weight: bold; font-style: normal;">Distinción mayúsculas/minúsculas</td>
<td colspan=1
rowspan=1
style="width: 82px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=82px>
<p style="font-weight: bold; text-align: center;"
align=center> </td>
<td colspan=1
rowspan=1
style="width: 95px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=95px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td>
<td colspan=1
rowspan=1
style="width: 87px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=87px>
<p style="font-weight: bold; text-align: center;"
align=center> </td>
<td colspan=1
rowspan=1
style="width: 79px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=79px>
<p style="font-weight: bold; text-align: center;"
align=center> </td></tr>
<tr style="x-cell-content-align: top; height: 19px;"
valign=top>
<td_null>
<td colspan=1
rowspan=1
style="width: 135px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=135px>
<p style="font-weight: bold; font-style: normal;">Autoevaluación</td>
<td colspan=1
rowspan=1
style="width: 82px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=82px>
<p style="font-weight: bold; text-align: center;"
align=center> </td>
<td colspan=1
rowspan=1
style="width: 95px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=95px>
<p style="font-weight: bold; text-align: center;"
align=center> </td>
<td colspan=1
rowspan=1
style="width: 87px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=87px>
<p style="font-weight: bold; text-align: center;"
align=center> </td>
<td colspan=1
rowspan=1
style="width: 79px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=79px>
<p style="font-weight: bold; text-align: center;"
align=center> </td></tr>
<tr style="x-cell-content-align: top; height: 19px;"
valign=top>
<td_null>
<td colspan=1
rowspan=1
style="width: 135px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=135px>
<p style="font-weight: bold; font-style: normal;">Omitir caracteres</td>
<td colspan=1
rowspan=1
style="width: 82px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=82px>
<p style="font-weight: bold; text-align: center;"
align=center>.!?;,</td>
<td colspan=1
rowspan=1
style="width: 95px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=95px>
<p style="font-weight: bold; text-align: center;"
align=center> </td>
<td colspan=1
rowspan=1
style="width: 87px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=87px>
<p style="font-weight: bold; text-align: center;"
align=center><span style="font-weight: bold;">.!?;,</span></td>
<td colspan=1
rowspan=1
style="width: 79px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=79px>
<p style="font-weight: bold; text-align: center;"
align=center> </td></tr>
<tr style="x-cell-content-align: top; height: 35px;"
valign=top>
<td style="width: 79px;
background-color: #c0c0c0;
padding-right: 10px;
padding-left: 10px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
border-left-width: 1px;
border-left-color: #000000;
border-left-style: Solid;"
bgcolor=#C0C0C0
width=79px>
<p style="font-weight: bold;">Ocultar/Salir del planificador</td>
<td colspan=1
rowspan=1
style="width: 135px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=135px>
<p style="font-weight: bold; font-style: normal;"> </td>
<td style="width: 82px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=82px>
<p> </td>
<td style="width: 95px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=95px>
<p> </td>
<td style="width: 87px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=87px>
<p> </td>
<td style="width: 79px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=79px>
<p> </td></tr>
<tr style="x-cell-content-align: top; height: 19px;"
valign=top>
<td colspan=1
rowspan=9
style="width: 79px;
background-color: #c0c0c0;
padding-right: 10px;
padding-left: 10px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
border-left-style: Solid;
border-left-color: #000000;
border-left-width: 1px;"
bgcolor=#C0C0C0
width=79px>
<p style="font-weight: bold;"><span style="font-weight: bold;">Generalidades</span></td>
<td colspan=1
rowspan=1
style="width: 135px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=135px>
<p style="font-weight: bold; font-style: normal;">Temporizador de cuenta atrás</td>
<td colspan=1
rowspan=1
style="width: 82px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=82px>
<p style="font-weight: bold; text-align: center;"
align=center> </td>
<td colspan=1
rowspan=1
style="width: 95px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=95px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td>
<td colspan=1
rowspan=1
style="width: 87px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=87px>
<p style="font-weight: bold; text-align: center;"
align=center> </td>
<td colspan=1
rowspan=1
style="width: 79px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=79px>
<p style="font-weight: bold; text-align: center;"
align=center> </td></tr>
<tr style="x-cell-content-align: top; height: 19px;"
valign=top>
<td_null>
<td colspan=1
rowspan=1
style="width: 135px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=135px>
<p style="font-weight: bold; font-style: normal;">Mostrar estadísticas</td>
<td colspan=1
rowspan=1
style="width: 82px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=82px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td>
<td colspan=1
rowspan=1
style="width: 95px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=95px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td>
<td colspan=1
rowspan=1
style="width: 87px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=87px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td>
<td colspan=1
rowspan=1
style="width: 79px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=79px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td></tr>
<tr style="x-cell-content-align: top; height: 19px;"
valign=top>
<td_null>
<td colspan=1
rowspan=1
style="width: 135px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=135px>
<p style="font-weight: bold; font-style: normal;">Mostrar imágenes</td>
<td colspan=1
rowspan=1
style="width: 82px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=82px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td>
<td colspan=1
rowspan=1
style="width: 95px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=95px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td>
<td colspan=1
rowspan=1
style="width: 87px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=87px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td>
<td colspan=1
rowspan=1
style="width: 79px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=79px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td></tr>
<tr style="x-cell-content-align: top; height: 19px;"
valign=top>
<td_null>
<td colspan=1
rowspan=1
style="width: 135px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=135px>
<p style="font-weight: bold; font-style: normal;">Reproducir automáticamente archivos multimedia</td>
<td colspan=1
rowspan=1
style="width: 82px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=82px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td>
<td colspan=1
rowspan=1
style="width: 95px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=95px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td>
<td colspan=1
rowspan=1
style="width: 87px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=87px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td>
<td colspan=1
rowspan=1
style="width: 79px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=79px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td></tr>
<tr style="x-cell-content-align: top; height: 51px;"
valign=top>
<td_null>
<td colspan=1
rowspan=1
style="width: 135px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=135px>
<p style="font-weight: bold; font-style: normal;">Permitir sólo una instancia de MemoryLifter</td>
<td colspan=1
rowspan=1
style="width: 82px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=82px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td>
<td colspan=1
rowspan=1
style="width: 95px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=95px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td>
<td colspan=1
rowspan=1
style="width: 87px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=87px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td>
<td colspan=1
rowspan=1
style="width: 79px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=79px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td></tr>
<tr style="x-cell-content-align: top; height: 35px;"
valign=top>
<td_null>
<td colspan=1
rowspan=1
style="width: 135px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=135px>
<p style="font-weight: bold; font-style: normal;">Reproducir sonido de comentario</td>
<td colspan=1
rowspan=1
style="width: 82px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=82px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td>
<td colspan=1
rowspan=1
style="width: 95px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=95px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td>
<td colspan=1
rowspan=1
style="width: 87px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=87px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td>
<td colspan=1
rowspan=1
style="width: 79px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=79px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td></tr>
<tr style="x-cell-content-align: top; height: 35px;"
valign=top>
<td_null>
<td colspan=1
rowspan=1
style="width: 135px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=135px>
<p style="font-weight: bold; font-style: normal;">Omitir visualización de respuestas correctas</td>
<td colspan=1
rowspan=1
style="width: 82px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=82px>
<p style="font-weight: bold; text-align: center;"
align=center> </td>
<td colspan=1
rowspan=1
style="width: 95px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=95px>
<p style="font-weight: bold; text-align: center;"
align=center> </td>
<td colspan=1
rowspan=1
style="width: 87px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=87px>
<p style="font-weight: bold; text-align: center;"
align=center> </td>
<td colspan=1
rowspan=1
style="width: 79px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;"
width=79px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td></tr>
<tr style="x-cell-content-align: top; height: 19px;"
valign=top>
<td_null>
<td colspan=1
rowspan=1
style="width: 135px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=135px>
<p style="font-weight: bold; font-style: normal;">Grupo aleatorio</td>
<td colspan=1
rowspan=1
style="width: 82px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=82px>
<p style="font-weight: bold; text-align: center;"
align=center> </td>
<td colspan=1
rowspan=1
style="width: 95px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=95px>
<p style="font-weight: bold; text-align: center;"
align=center> </td>
<td colspan=1
rowspan=1
style="width: 87px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=87px>
<p style="font-weight: bold; text-align: center;"
align=center> </td>
<td colspan=1
rowspan=1
style="width: 79px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=79px>
<p style="font-weight: bold; text-align: center;"
align=center> </td></tr>
<tr style="x-cell-content-align: top; height: 19px;"
valign=top>
<td_null>
<td colspan=1
rowspan=1
style="width: 135px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=135px>
<p style="font-weight: bold; font-style: normal;">Confirmar degradación</td>
<td style="width: 82px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=82px>
<p style="font-weight: bold; text-align: center;"
align=center> </td>
<td style="width: 95px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;"
width=95px>
<p style="font-weight: bold; text-align: center;"
align=center>x</td>
<td style="width: 87px;
border-right-width: 1px;
border-right-color: #000000;
border-right-style: Solid;
border-bottom-style: Solid;
border-bottom-color: #000000;
border-bottom-width: 1px;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=87px>
<p style="font-weight: bold; text-align: center;"
align=center> </td>
<td style="width: 79px;
border-right-style: Solid;
border-right-color: #000000;
border-right-width: 1px;
border-bottom-width: 1px;
border-bottom-color: #000000;
border-bottom-style: Solid;
padding-right: 10px;
padding-left: 10px;
background-color: #c0c0c0;"
bgcolor=#C0C0C0
width=79px>
<p style="font-weight: bold; text-align: center;"
align=center> </td></tr>
</table>
<p> </p>
<p class=SubTopic1> </p>
<p class=SubTopic1><b>Temas relacionados</b> </p>
<ul>
<li class=kadov-p
class=kadov-p><a href="memo1d9v.htm">Opciones de aprendizaje</a> </li>
</ul>
</body>
</html>
| 26.291536 | 215 | 0.683813 |
0d30ebbc8d7b4d375494fff968dc75106a3f5718 | 391 | swift | Swift | Source/Networking/HTTPRequest.swift | n-thumann/ipatool | 5f1fb02a122370f9e2813e4ac8e3a8cc01fd3299 | [
"MIT"
] | 1,915 | 2021-05-22T20:14:35.000Z | 2022-03-31T17:40:48.000Z | Source/Networking/HTTPRequest.swift | n-thumann/ipatool | 5f1fb02a122370f9e2813e4ac8e3a8cc01fd3299 | [
"MIT"
] | 44 | 2021-05-23T15:19:29.000Z | 2022-03-26T23:42:03.000Z | Source/Networking/HTTPRequest.swift | n-thumann/ipatool | 5f1fb02a122370f9e2813e4ac8e3a8cc01fd3299 | [
"MIT"
] | 180 | 2021-05-22T22:15:05.000Z | 2022-03-31T09:45:25.000Z | //
// HTTPRequest.swift
// IPATool
//
// Created by Majd Alfhaily on 22.05.21.
//
import Foundation
protocol HTTPRequest {
var method: HTTPMethod { get }
var endpoint: HTTPEndpoint { get }
var headers: [String: String] { get }
var payload: HTTPPayload? { get }
}
extension HTTPRequest {
var headers: [String: String] { [:] }
var payload: HTTPPayload? { nil }
}
| 18.619048 | 41 | 0.639386 |
bbd82641b9dfed8818ffc625b5249f6459ecf211 | 5,142 | ps1 | PowerShell | PowerShell/Functions/Write-PlasterParameter.ps1 | thedavecarroll/Workshop | 368c5db66a295a1ad45afa6c8d0aa7ed30a3028e | [
"MIT"
] | 1 | 2020-10-28T22:55:39.000Z | 2020-10-28T22:55:39.000Z | PowerShell/Functions/Write-PlasterParameter.ps1 | thedavecarroll/Workshop | 368c5db66a295a1ad45afa6c8d0aa7ed30a3028e | [
"MIT"
] | null | null | null | PowerShell/Functions/Write-PlasterParameter.ps1 | thedavecarroll/Workshop | 368c5db66a295a1ad45afa6c8d0aa7ed30a3028e | [
"MIT"
] | null | null | null | # borrowed with care from https://github.com/zloeber/Powershell/blob/master/Plaster/WritePlasterParameter.ps1
<#
.SYNOPSIS
A simple helper function to create a parameter xml block for plaster
.DESCRIPTION
A simple helper function to create a parameter xml block for plaster. This function
is best used with an array of hashtables for rapid creation of a Plaster parameter
block.
.PARAMETER ParameterName
The plaster element name
.PARAMETER ParameterType
The type of plater parameter. Can be either text, choice, multichoice, user-fullname, or user-email
.PARAMETER ParameterPrompt
The prompt to be displayed
.PARAMETER Default
The default setting for this parameter
.PARAMETER Store
Specifies the store type of the value. Can be text or encrypted. If not defined then the default is text.
.PARAMETER Choices
An array of hashtables with each hash being a choice containing the lable, help, and value for the choice.
.PARAMETER Obj
Hashtable object containing all the parameters required for this function.
.EXAMPLE
$choice1 = @{
label = '&yes'
help = 'Process this'
value = 'true'
}
$choice2 = @{
label = '&no'
help = 'Do NOT Process this'
value = 'false'
}
Write-PlasterParameter -ParameterName 'Editor' -ParameterType 'choice' -ParameterPrompt 'Choose your editor' -Default '0' -Store 'text' -Choices @($choice1,$choice2)
.EXAMPLE
$MyParams = @(
@{
ParameterName = "NugetAPIKey"
ParameterType = "text"
ParameterPrompt = "Enter a PowerShell Gallery (aka Nuget) API key. Without this you will not be able to upload your module to the Gallery"
Default = ' '
},
@{
ParameterName = "OptionAnalyzeCode"
ParameterType = "choice"
ParameterPrompt = "Use PSScriptAnalyzer in the module build process (Recommended for Gallery uploading)?"
Default = "0"
Store = "text"
Choices = @(
@{
Label = "&Yes"
Help = "Enable script analysis"
Value = "True"
},
@{
Label = "&No"
Help = "Disable script analysis"
Value = "False"
}
)
}) | Write-PlasterParameter
#>
function Write-PlasterParameter {
[CmdletBinding()]
[OutputType([System.String])]
param (
[Parameter(ParameterSetName = "default", Mandatory = $true, Position = 0)]
[Alias('Name')]
[string]$ParameterName,
[Parameter(ParameterSetName = "default", Position = 1)]
[ValidateSet('text', 'choice', 'multichoice', 'user-fullname', 'user-email')]
[Alias('Type')]
[string]$ParameterType = 'text',
[Parameter(ParameterSetName = "default", Mandatory = $true, Position = 2)]
[Alias('Prompt')]
[ValidateNotNullOrEmpty()]
[string]$ParameterPrompt,
[Parameter(ParameterSetName = "default", Position = 3)]
[Alias('Default')]
[string]$ParameterDefault,
[Parameter(ParameterSetName = "default", Position = 4)]
[ValidateSet('text', 'encrypted')]
[AllowNull()]
[string]$Store,
[Parameter(ParameterSetName = "default", Position = 5)]
[Hashtable[]]$Choices,
[Parameter(ParameterSetName = "pipeline", ValueFromPipeLine = $true, Position = 0)]
[Hashtable]$Obj
)
process {
# If a hash is passed then recall this function with the hash splatted instead.
if ($null -ne $Obj) {
return Write-PlasterParameter @Obj
}
# Create a new XML File with config root node
$oXMLRoot = New-Object System.XML.XMLDocument
if (($Type -eq 'choice') -and ($Choices.Count -le 1)) {
throw 'You cannot setup a parameter of type "choice" without supplying an array of applicable choices to select from...'
}
# New Node
$oXMLParameter = $oXMLRoot.CreateElement("parameter")
# Append as child to an existing node
$Null = $oXMLRoot.appendChild($oXMLParameter)
# Add a Attributes
$oXMLParameter.SetAttribute("name", $ParameterName)
$oXMLParameter.SetAttribute("type", $ParameterType)
$oXMLParameter.SetAttribute("prompt", $ParameterPrompt)
if (-not [string]::IsNullOrEmpty($ParameterDefault)) {
$oXMLParameter.SetAttribute("default", $ParameterDefault)
}
if (-not [string]::IsNullOrEmpty($Store)) {
$oXMLParameter.SetAttribute("store", $Store)
}
if ($ParameterType -match 'choice|multichoice') {
if ($Choices.count -lt 1) {
Write-Warning 'The parameter type was choice/multichoice but there are less than 2 choices. Returning nothing.'
return
}
foreach ($Choice in $Choices) {
[System.XML.XMLElement]$oXMLChoice = $oXMLRoot.CreateElement("choice")
$oXMLChoice.SetAttribute("label", $Choice['Label'])
$oXMLChoice.SetAttribute("help", $Choice['help'])
$oXMLChoice.SetAttribute("value", $Choice['value'])
$null = $oXMLRoot['parameter'].appendChild($oXMLChoice)
}
}
$oXMLRoot.InnerXML
}
} | 35.708333 | 165 | 0.636717 |
96e2873469162e0641c27bebb48f8efad6d3f442 | 6,327 | cpp | C++ | src/display/background_color.cpp | lii-enac/djnn-cpp | f27c5ba3186186ee22c93ae91c16063556e929b6 | [
"BSD-2-Clause"
] | 4 | 2018-09-11T14:27:57.000Z | 2019-12-16T21:06:26.000Z | src/display/background_color.cpp | lii-enac/djnn-cpp | f27c5ba3186186ee22c93ae91c16063556e929b6 | [
"BSD-2-Clause"
] | null | null | null | src/display/background_color.cpp | lii-enac/djnn-cpp | f27c5ba3186186ee22c93ae91c16063556e929b6 | [
"BSD-2-Clause"
] | 2 | 2018-06-11T14:15:30.000Z | 2019-01-09T12:23:35.000Z | #include "background_color.h"
#include "core/core-dev.h" // graph add/remove edge
#include "core/utils/utils-dev.h" // coupling add/remove edge
#include "core/tree/int_property.h"
#include "window.h"
namespace djnn {
BackgroundColor::BackgroundColor (ParentProcess* parent, const string& name, int r, int g, int b) :
FatProcess (name),
raw_props{.r=r, .g=g, .b=b},
_cr (nullptr), _cg (nullptr), _cb (nullptr), _cv (nullptr), _c_rv (nullptr), _c_gv (nullptr), _c_bv (nullptr), _c_vrgb (nullptr),
_toValue (this, "toValue"),
_toRGB (this, "toRGB"),
_is_updating (false)
{
raw_props.value = ((r & 0xff) << 16) + ((g & 0xff) << 8) + (b & 0xff);
finalize_construction (parent, name);
}
BackgroundColor::BackgroundColor (ParentProcess* parent, const string& name, int v) :
FatProcess (name),
_cr (nullptr), _cg (nullptr), _cb (nullptr), _cv (nullptr), _c_rv (nullptr), _c_gv (nullptr), _c_bv (nullptr), _c_vrgb (nullptr),
_toValue (this, "toValue"),
_toRGB (this, "toRGB"),
_is_updating (false)
{
raw_props.r = (v >> 16) & 0xFF;
raw_props.g = (v >> 8) & 0xFF;
raw_props.b = v & 0xFF;
raw_props.value = v;
finalize_construction (parent, name);
}
BackgroundColor::~BackgroundColor ()
{
delete _cr;
delete _cg;
delete _cb;
delete _cv;
if (_c_rv) {
delete _c_rv;
}
if (_c_gv) {
delete _c_gv;
}
if (_c_bv) {
delete _c_bv;
}
delete _c_vrgb;
if (children_size () > 0) {
symtable_t::iterator it;
it = find_child_iterator ("r");
if (it != children_end ())
delete it->second;
it = find_child_iterator ("g");
if (it != children_end ())
delete it->second;
it = find_child_iterator ("b");
if (it != children_end ())
delete it->second;
it = find_child_iterator ("value");
if (it != children_end ())
delete it->second;
}
}
void
BackgroundColor::update_rvb_from_hex () {
if (_is_updating)
return;
_is_updating = true;
int r_res = (raw_props.value >> 16) & 0xFF;
if (_cr)
r ()->set_value (r_res, true);
else
raw_props.r = r_res;
int g_res = (raw_props.value >> 8) & 0xFF;
if (_cg)
g()->set_value (g_res, true);
else
raw_props.g = g_res;
int b_res = raw_props.value & 0xFF;
if (_cb)
b()->set_value(b_res, true);
else
raw_props.b = b_res;
_is_updating = false;
}
void
BackgroundColor::update_hex_from_rvb () {
if (_is_updating)
return;
_is_updating = true;
int v = ((raw_props.r & 0xff) << 16) + ((raw_props.g & 0xff) << 8) + (raw_props.b & 0xff);
if (_cv)
value()->set_value (v, true);
else
raw_props.value = v;
_is_updating = false;
}
void
BackgroundColor::create_Gobj_update_coupling (CoreProcess **prop, CouplingWithData **cprop)
{
FatProcess *update = nullptr;
//if (find_layer ()) update = find_layer()->damaged ();
//else
if (get_frame ()) update = get_frame ()->damaged ();
*cprop = new CouplingWithData (*prop, ACTIVATION, update, ACTIVATION);
if (somehow_activating ()) {
(*cprop)->enable ();
}
else
(*cprop)->disable ();
}
FatProcess*
BackgroundColor::create_GObj_prop (IntPropertyProxy **prop, CouplingWithData **cprop, int *rawp, const string& name, int notify_mask)
{
*prop = new IntPropertyProxy (this, name, *rawp, notify_mask);
create_Gobj_update_coupling(reinterpret_cast<CoreProcess**>(prop), cprop);
return *prop;
}
FatChildProcess*
BackgroundColor::find_child_impl (const string& name)
{
auto * res = FatProcess::find_child_impl(name);
if(res) return res;
CouplingWithData ** coupling = nullptr;
int* rawp_Int = nullptr;
int notify_mask = notify_none;
IntPropertyProxy* prop = nullptr; // do not cache
if(name=="r") {
coupling=&_cr;
rawp_Int=&raw_props.r;
notify_mask = notify_damaged_style;
res = create_GObj_prop(&prop, coupling, rawp_Int, name, notify_mask);
_c_rv = new CouplingWithData (res, ACTIVATION, &_toValue, ACTIVATION);
if (!somehow_activating())
_c_rv->disable ();
} else
if(name=="g") {
coupling=&_cg;
rawp_Int=&raw_props.g;
notify_mask = notify_damaged_style;
res = create_GObj_prop(&prop, coupling, rawp_Int, name, notify_mask);
_c_gv = new CouplingWithData (res, ACTIVATION, &_toValue, ACTIVATION);
if (!somehow_activating())
_c_gv->disable ();
} else
if(name=="b") {
coupling=&_cb;
rawp_Int=&raw_props.b;
notify_mask = notify_damaged_style;
res = create_GObj_prop(&prop, coupling, rawp_Int, name, notify_mask);
_c_bv = new CouplingWithData (res, ACTIVATION, &_toValue, ACTIVATION);
if (!somehow_activating())
_c_bv->disable ();
} else
if(name=="value") {
coupling=&_cv;
rawp_Int=&raw_props.value;
notify_mask = notify_damaged_style;
res = create_GObj_prop(&prop, coupling, rawp_Int, name, notify_mask);
//_c_vrgb = new CouplingWithData (res, ACTIVATION, &_toRGB, ACTIVATION, nullptr, true);
_c_vrgb = new CouplingWithData (res, ACTIVATION, &_toRGB, ACTIVATION, true);
if (!somehow_activating())
_c_vrgb->disable ();
} else
return nullptr;
return res;
}
void
BackgroundColor::get_properties_values (double& r, double& g, double& b)
{
r = raw_props.r;
g = raw_props.g;
b = raw_props.b;
}
void
BackgroundColor::impl_activate ()
{
//FatProcess::impl_activate ();
//auto _frame = get_frame ();
auto * damaged = get_frame ()->damaged ();
enable (_cr, damaged);
enable (_cg, damaged);
enable (_cb, damaged);
enable (_cv, damaged);
if (_c_rv) _c_rv->enable ();
if (_c_gv) _c_gv->enable ();
if (_c_bv) _c_bv->enable ();
if (_c_vrgb) _c_vrgb->enable ();
}
void
BackgroundColor::impl_deactivate ()
{
disable (_cr);
disable (_cg);
disable (_cb);
disable (_cv);
if (_c_rv) _c_rv->disable ();
if (_c_gv) _c_gv->disable ();
if (_c_bv) _c_bv->disable ();
if (_c_vrgb) _c_vrgb->disable ();
//FatProcess::impl_deactivate ();
}
}
| 27.995575 | 135 | 0.608977 |
f0693b36a74b3acf0a861ff3c1c73f7355633501 | 3,449 | py | Python | auth-backend.py | alexanderbittner/spotify-tracks | 9095d0224f7e313d164a5da24add2b806afc1b31 | [
"MIT"
] | null | null | null | auth-backend.py | alexanderbittner/spotify-tracks | 9095d0224f7e313d164a5da24add2b806afc1b31 | [
"MIT"
] | null | null | null | auth-backend.py | alexanderbittner/spotify-tracks | 9095d0224f7e313d164a5da24add2b806afc1b31 | [
"MIT"
] | null | null | null | import json
from flask import Flask, request, redirect, g, render_template
import requests
from urllib.parse import quote
# Adapted from https://github.com/drshrey/spotify-flask-auth-example
# Authentication Steps, paramaters, and responses are defined at https://developer.spotify.com/web-api/authorization-guide/
app = Flask(__name__)
# Client & Token Files
CLIENT_ID_FILE = 'auth/client-id'
CLIENT_SECRET_FILE = 'auth/client-secret'
TOKEN_FILE = 'auth/token'
REFRESH_FILE = 'auth/refresh-token'
# Spotify URLS
SPOTIFY_AUTH_URL = "https://accounts.spotify.com/authorize"
SPOTIFY_TOKEN_URL = "https://accounts.spotify.com/api/token"
SPOTIFY_API_BASE_URL = "https://api.spotify.com"
API_VERSION = "v1"
SPOTIFY_API_URL = "{}/{}".format(SPOTIFY_API_BASE_URL, API_VERSION)
# Server-side Parameters
CLIENT_SIDE_URL = "http://127.0.0.1"
PORT = 876
REDIRECT_URI = "{}:{}/callback/q".format(CLIENT_SIDE_URL, PORT)
SCOPE = "user-read-playback-state user-modify-playback-state"
STATE = ""
SHOW_DIALOG_bool = True
SHOW_DIALOG_str = str(SHOW_DIALOG_bool).lower()
# Client Keys
with open(CLIENT_ID_FILE, 'r') as id:
CLIENT_ID = id.read()
with open(CLIENT_SECRET_FILE, 'r') as secret:
CLIENT_SECRET = secret.read()
auth_query_parameters = {
"response_type": "code",
"redirect_uri": REDIRECT_URI,
"scope": SCOPE,
"client_id": CLIENT_ID
}
@app.route("/")
def index():
# Auth Step 1: Authorization
url_args = "&".join(["{}={}".format(key, quote(val)) for key, val in auth_query_parameters.items()])
auth_url = "{}/?{}".format(SPOTIFY_AUTH_URL, url_args)
return redirect(auth_url)
@app.route("/callback/q")
def callback():
# Auth Step 4: Requests refresh and access tokens
auth_token = request.args['code']
code_payload = {
"grant_type": "authorization_code",
"code": str(auth_token),
"redirect_uri": REDIRECT_URI,
'client_id': CLIENT_ID,
'client_secret': CLIENT_SECRET,
}
post_request = requests.post(SPOTIFY_TOKEN_URL, data=code_payload)
# Auth Step 5: Tokens are Returned to Application
response_data = json.loads(post_request.text)
access_token = response_data["access_token"]
refresh_token = response_data["refresh_token"]
#token_type = response_data["token_type"]
#expires_in = response_data["expires_in"]
# Auth Step 6: write token to file
with open(TOKEN_FILE, 'w') as file:
file.write(access_token)
with open(REFRESH_FILE, 'w') as file:
file.write(refresh_token)
display_arr = 'success!'
return render_template("index.html", sorted_array=display_arr)
@app.route("/refresh")
def refresh():
with open(REFRESH_FILE, 'r') as f:
refresh_token = f.read()
# Auth Step R: Requests refreshed access token
code_payload = {
"grant_type": "refresh_token",
"refresh_token": refresh_token,
'client_id': CLIENT_ID,
'client_secret': CLIENT_SECRET,
}
post_request = requests.post(SPOTIFY_TOKEN_URL, data=code_payload)
# Auth Step R1: Tokens are Returned to Application
response_data = json.loads(post_request.text)
access_token = response_data["access_token"]
# write token to file
with open(TOKEN_FILE, 'w') as file:
file.write(access_token)
display_arr = 'success!'
return render_template("index.html", sorted_array=display_arr)
if __name__ == "__main__":
app.run(debug=True, port=PORT) | 31.354545 | 123 | 0.701653 |
c7b2a00a9714d9571afec44f69cdc0a4b5ca191b | 276 | asm | Assembly | game/include/rand.asm | wkcn/OSLabs | 9f88f02dbeee8930e3dadac8b51e54dcaad5175f | [
"MIT"
] | 73 | 2017-10-02T01:24:19.000Z | 2021-12-17T08:50:03.000Z | game/include/rand.asm | wkcn/OSLabs | 9f88f02dbeee8930e3dadac8b51e54dcaad5175f | [
"MIT"
] | 4 | 2018-03-21T02:24:19.000Z | 2020-02-15T04:19:34.000Z | game/include/rand.asm | wkcn/OSLabs | 9f88f02dbeee8930e3dadac8b51e54dcaad5175f | [
"MIT"
] | 14 | 2016-12-22T23:24:48.000Z | 2021-10-13T08:27:42.000Z | rand:
;return ax
push dx
mov ax, word [cs:RAND_SEED]
mov dx, 109
mul dx
add ax, 71
mov word[cs:RAND_SEED], ax
pop dx
ret
srand:
push dx
push cx
push ax
mov ax, 0x0200
int 0x1a
add cx, dx
mov word[cs:RAND_SEED], cx
pop ax
pop cx
pop dx
ret
RAND_SEED dw 0
| 10.615385 | 28 | 0.666667 |
6d5d06e2b83833c91d4e25df786f00106df02b0c | 12,641 | sql | SQL | backend/Car-Rental-System-Test/nmt_fleet_manager_backup.sql | diego-cc/car-rental-system-dotnetcore | 8c3084e1e648534766ff6996f95fe097f5b1eb77 | [
"MIT"
] | 11 | 2020-08-01T20:28:13.000Z | 2022-02-01T07:09:32.000Z | backend/Car-Rental-System-Test/nmt_fleet_manager_backup.sql | diego-cc/car-rental-system-dotnetcore | 8c3084e1e648534766ff6996f95fe097f5b1eb77 | [
"MIT"
] | null | null | null | backend/Car-Rental-System-Test/nmt_fleet_manager_backup.sql | diego-cc/car-rental-system-dotnetcore | 8c3084e1e648534766ff6996f95fe097f5b1eb77 | [
"MIT"
] | null | null | null | -- MySQL dump 10.13 Distrib 5.7.24, for Win64 (x86_64)
--
-- Host: localhost Database: nmt_fleet_manager
-- ------------------------------------------------------
-- 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 */;
/*!40101 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 */;
--
-- Current Database: `nmt_fleet_manager`
--
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `nmt_fleet_manager` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
USE `nmt_fleet_manager`;
--
-- Table structure for table `bookings`
--
DROP TABLE IF EXISTS `bookings`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `bookings` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`uuid` char(36) NOT NULL,
`vehicle_id` bigint(20) unsigned NOT NULL,
`vehicle_uuid` char(36) NOT NULL,
`started_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`ended_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`start_odometer` decimal(10,2) unsigned NOT NULL DEFAULT '0.00',
`type` enum('D','K') NOT NULL DEFAULT 'D',
`cost` decimal(10,2) unsigned DEFAULT '0.00',
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `id` (`id`,`uuid`),
KEY `vehicle_id` (`vehicle_id`,`vehicle_uuid`),
CONSTRAINT `bookings_ibfk_1` FOREIGN KEY (`vehicle_id`, `vehicle_uuid`) REFERENCES `vehicles` (`id`, `uuid`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `bookings`
--
LOCK TABLES `bookings` WRITE;
/*!40000 ALTER TABLE `bookings` DISABLE KEYS */;
INSERT INTO `bookings` VALUES (1,'3e933953-5b14-40b9-b04c-00c968d49d39',1,'23c07876-a967-4cf0-bf22-0fdeaf7beb06','2019-11-28 00:00:00','2019-11-29 00:00:00',900.00,'D',100.00,'2019-12-12 02:10:50',NULL),(2,'a6bd0071-77cd-46a1-a338-8c897e4108b0',2,'37b80138-56e3-4834-9870-5c618e648d0c','2019-11-28 00:00:00','2019-11-30 00:00:00',500.00,'K',0.00,'2019-12-12 02:10:50',NULL),(3,'963bc486-cc1a-4463-8cfb-98b0782f115a',3,'3fc41603-8b8a-4207-bba4-a49095f36692','2019-11-28 00:00:00','2019-12-04 00:00:00',10000.00,'D',600.00,'2019-12-12 02:10:50',NULL),(4,'71e8702f-d387-4722-80b2-f5486ef7793e',4,'6cf6b703-c154-4e34-a79f-de9be3d10d88','2019-12-05 00:00:00','2019-12-07 00:00:00',15000.00,'K',0.00,'2019-12-12 02:10:50',NULL),(5,'0113f97c-eee1-46dd-a779-04f268db536a',5,'6f818b4c-da01-491b-aed9-5c51771051a5','2019-12-13 00:00:00','2019-12-20 00:00:00',20000.00,'D',700.00,'2019-12-12 02:10:50',NULL);
/*!40000 ALTER TABLE `bookings` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `fuel_purchases`
--
DROP TABLE IF EXISTS `fuel_purchases`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `fuel_purchases` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`uuid` char(36) NOT NULL,
`booking_id` bigint(20) unsigned NOT NULL,
`booking_uuid` char(36) NOT NULL,
`vehicle_id` bigint(20) unsigned NOT NULL,
`vehicle_uuid` char(36) NOT NULL,
`fuel_quantity` decimal(5,2) unsigned NOT NULL DEFAULT '0.00',
`fuel_price` decimal(5,2) unsigned NOT NULL,
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `id` (`id`,`uuid`),
KEY `vehicle_id` (`vehicle_id`,`vehicle_uuid`),
KEY `booking_id` (`booking_id`,`booking_uuid`),
CONSTRAINT `fuel_purchases_ibfk_1` FOREIGN KEY (`vehicle_id`, `vehicle_uuid`) REFERENCES `vehicles` (`id`, `uuid`) ON DELETE CASCADE,
CONSTRAINT `fuel_purchases_ibfk_2` FOREIGN KEY (`booking_id`, `booking_uuid`) REFERENCES `bookings` (`id`, `uuid`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `fuel_purchases`
--
LOCK TABLES `fuel_purchases` WRITE;
/*!40000 ALTER TABLE `fuel_purchases` DISABLE KEYS */;
INSERT INTO `fuel_purchases` VALUES (1,'faf91e4f-a948-41e2-b524-e267f4e8d75d',1,'3e933953-5b14-40b9-b04c-00c968d49d39',1,'23c07876-a967-4cf0-bf22-0fdeaf7beb06',60.00,1.20,'2019-12-12 02:11:24',NULL),(2,'55853368-d34e-45cf-a03b-4529281d3a10',2,'a6bd0071-77cd-46a1-a338-8c897e4108b0',2,'37b80138-56e3-4834-9870-5c618e648d0c',10.00,1.30,'2019-12-12 02:11:24',NULL),(3,'b62ac6b8-ad5d-4f96-825d-6658471b26d1',4,'71e8702f-d387-4722-80b2-f5486ef7793e',4,'6cf6b703-c154-4e34-a79f-de9be3d10d88',30.00,1.40,'2019-12-12 02:11:24',NULL),(4,'39f06ed5-a685-4619-b20b-aeefc49e4ee7',5,'0113f97c-eee1-46dd-a779-04f268db536a',5,'6f818b4c-da01-491b-aed9-5c51771051a5',5.00,1.20,'2019-12-12 02:11:24',NULL);
/*!40000 ALTER TABLE `fuel_purchases` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `journeys`
--
DROP TABLE IF EXISTS `journeys`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `journeys` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`uuid` char(36) NOT NULL,
`booking_id` bigint(20) unsigned NOT NULL,
`booking_uuid` char(36) NOT NULL,
`vehicle_id` bigint(20) unsigned NOT NULL,
`vehicle_uuid` char(36) NOT NULL,
`started_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`ended_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`journey_from` varchar(128) DEFAULT 'Unknown',
`journey_to` varchar(128) DEFAULT 'Unknown',
`start_odometer` decimal(10,2) unsigned NOT NULL DEFAULT '0.00',
`end_odometer` decimal(10,2) unsigned NOT NULL DEFAULT '0.00',
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `id` (`id`,`uuid`),
KEY `vehicle_id` (`vehicle_id`,`vehicle_uuid`),
KEY `booking_id` (`booking_id`,`booking_uuid`),
CONSTRAINT `journeys_ibfk_1` FOREIGN KEY (`vehicle_id`, `vehicle_uuid`) REFERENCES `vehicles` (`id`, `uuid`) ON DELETE CASCADE,
CONSTRAINT `journeys_ibfk_2` FOREIGN KEY (`booking_id`, `booking_uuid`) REFERENCES `bookings` (`id`, `uuid`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `journeys`
--
LOCK TABLES `journeys` WRITE;
/*!40000 ALTER TABLE `journeys` DISABLE KEYS */;
INSERT INTO `journeys` VALUES (1,'83d2722f-baf5-4632-85a1-4cb1c02185ee',1,'3e933953-5b14-40b9-b04c-00c968d49d39',1,'23c07876-a967-4cf0-bf22-0fdeaf7beb06','2019-11-28 00:00:00','2019-11-29 00:00:00','Perth','Geraldton',900.00,1315.00,'2019-12-12 02:11:12','2019-12-12 02:11:12'),(2,'ff55c6c4-7988-4197-9779-c8702520745a',2,'a6bd0071-77cd-46a1-a338-8c897e4108b0',2,'37b80138-56e3-4834-9870-5c618e648d0c','2019-11-29 00:00:00','2019-11-30 00:00:00','Perth','Subiaco',500.00,504.00,'2019-12-12 02:11:12','2019-12-12 02:11:12'),(3,'2e0dfc1f-5042-4be1-9241-7febfea5dc89',3,'963bc486-cc1a-4463-8cfb-98b0782f115a',3,'3fc41603-8b8a-4207-bba4-a49095f36692','2019-11-28 00:00:00','2019-11-29 00:00:00','Perth','Margaret River',10000.00,10270.00,'2019-12-12 02:11:12','2019-12-12 02:11:12'),(4,'c27dea31-25aa-4efe-8411-327e9b934144',4,'71e8702f-d387-4722-80b2-f5486ef7793e',4,'6cf6b703-c154-4e34-a79f-de9be3d10d88','2019-12-05 00:00:00','2019-12-06 00:00:00','Perth','Lancelin',15000.00,15122.00,'2019-12-12 02:11:12','2019-12-12 02:11:12'),(5,'9521972a-e38d-4830-a43a-77b1868c634b',5,'0113f97c-eee1-46dd-a779-04f268db536a',5,'6f818b4c-da01-491b-aed9-5c51771051a5','2019-12-13 00:00:00','2019-12-13 00:00:00','Perth','Joondalup',20000.00,20025.00,'2019-12-12 02:11:12','2019-12-12 02:11:12');
/*!40000 ALTER TABLE `journeys` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `services`
--
DROP TABLE IF EXISTS `services`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `services` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`uuid` char(36) NOT NULL,
`vehicle_id` bigint(20) unsigned NOT NULL,
`vehicle_uuid` char(36) NOT NULL,
`odometer` decimal(10,2) unsigned NOT NULL DEFAULT '0.00',
`serviced_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `id` (`id`,`uuid`),
KEY `vehicle_id` (`vehicle_id`,`vehicle_uuid`),
CONSTRAINT `services_ibfk_1` FOREIGN KEY (`vehicle_id`, `vehicle_uuid`) REFERENCES `vehicles` (`id`, `uuid`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `services`
--
LOCK TABLES `services` WRITE;
/*!40000 ALTER TABLE `services` DISABLE KEYS */;
INSERT INTO `services` VALUES (1,'67f7fcc5-e591-401c-ba5c-7eb49409fc2e',1,'23c07876-a967-4cf0-bf22-0fdeaf7beb06',1400.00,'2019-12-04 00:00:00','2019-12-12 02:11:37',NULL),(2,'a9d9f0af-95d2-47fd-9450-a8a8c5b6fb2e',2,'37b80138-56e3-4834-9870-5c618e648d0c',600.00,'2019-12-02 00:00:00','2019-12-12 02:11:37',NULL),(3,'d4307f3a-6637-45d3-8fc6-38844da4fc96',3,'3fc41603-8b8a-4207-bba4-a49095f36692',10300.00,'2019-12-06 00:00:00','2019-12-12 02:11:37',NULL),(4,'cae0f850-f55f-4d1b-a6d3-96bcce4fa7ec',4,'6cf6b703-c154-4e34-a79f-de9be3d10d88',15200.00,'2019-12-12 00:00:00','2019-12-12 02:11:37',NULL),(5,'f4a0a09c-315f-4c51-aba1-feee8f2e81cf',5,'6f818b4c-da01-491b-aed9-5c51771051a5',20100.00,'2019-12-21 00:00:00','2019-12-12 02:11:37',NULL);
/*!40000 ALTER TABLE `services` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `vehicles`
--
DROP TABLE IF EXISTS `vehicles`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `vehicles` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`uuid` char(36) NOT NULL,
`manufacturer` varchar(64) NOT NULL DEFAULT 'Unknown',
`model` varchar(128) NOT NULL,
`year` int(4) unsigned zerofill NOT NULL DEFAULT '0001',
`odometer` decimal(10,2) unsigned NOT NULL DEFAULT '0.00',
`registration` varchar(16) NOT NULL,
`fuel_type` varchar(8) NOT NULL DEFAULT 'Unknown',
`tank_size` decimal(5,2) unsigned NOT NULL,
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `id` (`id`,`uuid`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `vehicles`
--
LOCK TABLES `vehicles` WRITE;
/*!40000 ALTER TABLE `vehicles` DISABLE KEYS */;
INSERT INTO `vehicles` VALUES (1,'23c07876-a967-4cf0-bf22-0fdeaf7beb06','Bugatti','Veyron 16.4 Super Sport',2011,1500.00,'1VEYRON','Unknown',100.00,'2019-12-12 02:10:39','2019-12-12 21:02:58'),(2,'37b80138-56e3-4834-9870-5c618e648d0c','Ford','Ranger XL',2015,800.00,'1GVL526','Unknown',80.00,'2019-12-12 02:10:39','2019-12-12 21:05:06'),(3,'3fc41603-8b8a-4207-bba4-a49095f36692','Tesla','Roadster',2008,11000.00,'8HDZ576','Unknown',0.00,'2019-12-12 02:10:39','2019-12-12 21:05:41'),(4,'6cf6b703-c154-4e34-a79f-de9be3d10d88','Land Rover','Defender',2015,15500.00,'BCZ5810','Unknown',60.00,'2019-12-12 02:10:39','2019-12-12 21:06:12'),(5,'6f818b4c-da01-491b-aed9-5c51771051a5','Holden','Commodore LT ',2018,20200.00,'1GXI000','Unknown',61.00,'2019-12-12 02:10:39','2019-12-12 21:06:58'),(7,'9e28c497-251f-4328-9c97-3e1faa6d2c5f','Ford','Focus',2001,9000.00,'FOCUS20','Unknown',60.00,'2019-12-16 18:45:57',NULL);
/*!40000 ALTER TABLE `vehicles` 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 2019-12-20 1:09:37
| 58.253456 | 1,280 | 0.72431 |
fe45f280e0246943a358b36fedf70a70ea2ee2bc | 1,514 | dart | Dart | BNB/lib/infrastructures/grpc/generated/team.pbjson.dart | longsirhero/BNB | 709120b19319535d9eadd241d49f8d39e9e5889e | [
"Apache-2.0"
] | null | null | null | BNB/lib/infrastructures/grpc/generated/team.pbjson.dart | longsirhero/BNB | 709120b19319535d9eadd241d49f8d39e9e5889e | [
"Apache-2.0"
] | null | null | null | BNB/lib/infrastructures/grpc/generated/team.pbjson.dart | longsirhero/BNB | 709120b19319535d9eadd241d49f8d39e9e5889e | [
"Apache-2.0"
] | null | null | null | ///
// Generated code. Do not modify.
// source: team.proto
///
// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
const TeamInfoRequest$json = const {
'1': 'TeamInfoRequest',
};
const TeamInfoResponse$json = const {
'1': 'TeamInfoResponse',
'2': const [
const {'1': 'level', '3': 1, '4': 1, '5': 13, '10': 'level'},
const {'1': 'tbAmassFreeze', '3': 2, '4': 1, '5': 1, '10': 'tbAmassFreeze'},
const {'1': 'nbAmassFreeze', '3': 3, '4': 1, '5': 1, '10': 'nbAmassFreeze'},
const {'1': 'basicMemberTotal', '3': 4, '4': 1, '5': 13, '10': 'basicMemberTotal'},
const {'1': 'middleMemberTotal', '3': 5, '4': 1, '5': 13, '10': 'middleMemberTotal'},
const {'1': 'highMemberTotal', '3': 6, '4': 1, '5': 13, '10': 'highMemberTotal'},
const {'1': 'inviteMemberTotal', '3': 7, '4': 1, '5': 13, '10': 'inviteMemberTotal'},
],
};
const TeamIncomeRequest$json = const {
'1': 'TeamIncomeRequest',
};
const TeamIncomeResponse$json = const {
'1': 'TeamIncomeResponse',
'2': const [
const {'1': 'bnbTotal', '3': 1, '4': 1, '5': 1, '10': 'bnbTotal'},
const {'1': 'flyBnbTotal', '3': 2, '4': 1, '5': 1, '10': 'flyBnbTotal'},
const {'1': 'flyBnbFreeze', '3': 3, '4': 1, '5': 1, '10': 'flyBnbFreeze'},
const {'1': 'flyBnbLevel1', '3': 4, '4': 1, '5': 1, '10': 'flyBnbLevel1'},
const {'1': 'flyBnbLevel2', '3': 5, '4': 1, '5': 1, '10': 'flyBnbLevel2'},
const {'1': 'flyBnbLevel3', '3': 6, '4': 1, '5': 1, '10': 'flyBnbLevel3'},
],
};
| 37.85 | 89 | 0.547556 |
f772fd8f87614a3c4be5fd0af3f616971f443bcb | 2,204 | h | C | bcm-secimage/crypto.h | hixio-mh/citadel_sdk_2.1.1 | bd15f6ae6c4b39c069d5beefa30c820e351d3b52 | [
"Apache-2.0"
] | null | null | null | bcm-secimage/crypto.h | hixio-mh/citadel_sdk_2.1.1 | bd15f6ae6c4b39c069d5beefa30c820e351d3b52 | [
"Apache-2.0"
] | null | null | null | bcm-secimage/crypto.h | hixio-mh/citadel_sdk_2.1.1 | bd15f6ae6c4b39c069d5beefa30c820e351d3b52 | [
"Apache-2.0"
] | null | null | null | /******************************************************************************
* Copyright 2005
* Broadcom Corporation
* 16215 Alton Parkway
* PO Box 57013
* Irvine CA 92619-7013
*****************************************************************************/
/*
* Broadcom Corporation 5890 Boot Image Creation
* File: crypto.c
*/
#ifndef _CRYPTO_H_
#define _CRYPTO_H_
#include <openssl/bn.h>
#include <openssl/bio.h>
#include <openssl/evp.h>
#include <openssl/dh.h>
#include <openssl/dsa.h>
#include <openssl/x509.h>
#include <openssl/pem.h>
#include <openssl/hmac.h>
#include <openssl/rand.h>
#include <openssl/err.h>
#include <openssl/ec.h>
/* DSA flag options */
#define DUMP_PUBLIC 0x00000001
#define DUMP_PRIVATE 0x00000002
#define DUMP_PARAMETERS 0x00000004
#define DUMP_ALL 0x00000007
/* Function Prototypes */
DSA *GetDefaultDSAParameters(void);
DH *GetDefaultDHParameters(void);
BIGNUM *GetPeerDHPublicKey(char *filename);
long base64_decode(char *in, long inlen, char *out);
int DsaSign(uint8_t *data, uint32_t len, uint8_t *sig, DSA *dsa_key);
DSA *GetDSAPrivateKeyFromFile(char *filename);
DSA *GetDSAPublicKeyFromFile(char *filename);
void PrintDSAKey (DSA *dsa_key, unsigned int flag);
int RsaSign(uint8_t *data, uint32_t len, uint8_t *sig, RSA *rsa_key, uint32_t dauth, int verbose);
RSA *GetRSAPrivateKeyFromFile(char *filename, int verbose);
RSA *GetRSAPublicKeyFromFile(char *filename, int verbose);
void PrintRSAKey (RSA *rsa_key, unsigned int flag);
void PrintDHKey (DH *dh_key, unsigned int flag);
void PrintDSASig (DSA_SIG *dsa_sig, unsigned int flag);
int PutDHParameterToFile(DH *dh_key, char *filename);
int CheckDHParam(char *filename);
int Sha256Hash (uint8_t *data, uint32_t len, uint8_t *hash, int verbose);
EC_KEY *GetECPrivateKeyFromFile(char *filename, int verbose);
EC_KEY *GetECPublicKeyFromFile(char *filename, int verbose);
void PrintECKey (EC_KEY* ec_key);
int ECDSASign(uint8_t *data, uint32_t len, uint8_t *sig, EC_KEY *ec_key, int verbose);
int EC_Size(EC_KEY* ek);
int EC_KEY2bin(EC_KEY* ek, unsigned char *to);
int AppendECDSASignature(uint8_t *data, uint32_t length, char *filename, int verbose, char *key);
#endif /* _CRYPTO_H_ */
| 35.548387 | 102 | 0.706897 |
8ab1c31e3933d86acf5ca4d168239839b0286313 | 2,817 | asm | Assembly | 配套代码/L018/L018/3.asm | zmrbak/ReverseAnalysis | 994fdc61c8af2eecc2a065a6f5ee0aacf371e836 | [
"MIT"
] | 35 | 2019-11-19T03:12:09.000Z | 2022-02-18T08:38:53.000Z | 配套代码/L018/L018/3.asm | zmrbak/ReverseAnalysis | 994fdc61c8af2eecc2a065a6f5ee0aacf371e836 | [
"MIT"
] | null | null | null | 配套代码/L018/L018/3.asm | zmrbak/ReverseAnalysis | 994fdc61c8af2eecc2a065a6f5ee0aacf371e836 | [
"MIT"
] | 22 | 2019-08-03T17:07:17.000Z | 2022-02-18T08:38:55.000Z | ; Listing generated by Microsoft (R) Optimizing Compiler Version 19.24.28117.0
TITLE C:\Users\libit\source\repos\L018\L018\L018.cpp
.686P
.XMM
include listing.inc
.model flat
INCLUDELIB LIBCMT
INCLUDELIB OLDNAMES
CONST SEGMENT
$SG5554 DB '0000000000000000', 0aH, 00H
ORG $+2
$SG5556 DB '1111111111111111', 0aH, 00H
ORG $+2
$SG5557 DB '2222222222222222', 0aH, 00H
CONST ENDS
PUBLIC ___local_stdio_printf_options
PUBLIC __vfprintf_l
PUBLIC _printf
PUBLIC _main
PUBLIC ?_OptionsStorage@?1??__local_stdio_printf_options@@9@4_KA ; `__local_stdio_printf_options'::`2'::_OptionsStorage
EXTRN ___acrt_iob_func:PROC
EXTRN ___stdio_common_vfprintf:PROC
; COMDAT ?_OptionsStorage@?1??__local_stdio_printf_options@@9@4_KA
_BSS SEGMENT
?_OptionsStorage@?1??__local_stdio_printf_options@@9@4_KA DQ 01H DUP (?) ; `__local_stdio_printf_options'::`2'::_OptionsStorage
_BSS ENDS
; Function compile flags: /Ogtpy
_TEXT SEGMENT
_main PROC
; File C:\Users\libit\source\repos\L018\L018\L018.cpp
; Line 8
push OFFSET $SG5554
call _printf
$exit$5:
; Line 12
push OFFSET $SG5557
call _printf
add esp, 8
; Line 13
xor eax, eax
ret 0
_main ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; COMDAT _printf
_TEXT SEGMENT
__Format$ = 8 ; size = 4
_printf PROC ; COMDAT
; File C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\stdio.h
; Line 954
push esi
; Line 958
mov esi, DWORD PTR __Format$[esp]
push 1
call ___acrt_iob_func
add esp, 4
; Line 643
lea ecx, DWORD PTR __Format$[esp+4]
push ecx
push 0
push esi
push eax
call ___local_stdio_printf_options
push DWORD PTR [eax+4]
push DWORD PTR [eax]
call ___stdio_common_vfprintf
add esp, 24 ; 00000018H
; Line 960
pop esi
; Line 961
ret 0
_printf ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; COMDAT __vfprintf_l
_TEXT SEGMENT
__Stream$ = 8 ; size = 4
__Format$ = 12 ; size = 4
__Locale$ = 16 ; size = 4
__ArgList$ = 20 ; size = 4
__vfprintf_l PROC ; COMDAT
; File C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\stdio.h
; Line 643
push DWORD PTR __ArgList$[esp-4]
push DWORD PTR __Locale$[esp]
push DWORD PTR __Format$[esp+4]
push DWORD PTR __Stream$[esp+8]
call ___local_stdio_printf_options
push DWORD PTR [eax+4]
push DWORD PTR [eax]
call ___stdio_common_vfprintf
add esp, 24 ; 00000018H
; Line 644
ret 0
__vfprintf_l ENDP
_TEXT ENDS
; Function compile flags: /Ogtpy
; COMDAT ___local_stdio_printf_options
_TEXT SEGMENT
___local_stdio_printf_options PROC ; COMDAT
; File C:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt\corecrt_stdio_config.h
; Line 88
mov eax, OFFSET ?_OptionsStorage@?1??__local_stdio_printf_options@@9@4_KA ; `__local_stdio_printf_options'::`2'::_OptionsStorage
; Line 89
ret 0
___local_stdio_printf_options ENDP
_TEXT ENDS
END
| 25.151786 | 129 | 0.754704 |
fbd0a63efd8ca6cc7bce493841222f926e0aa812 | 5,000 | java | Java | src/main/java/de/budschie/bmorph/gui/NewMorphGui.java | 0xicl33n/BudschieMorphMod | 32442b870b72eb62b8105bb254aba4c7da3dbc08 | [
"MIT"
] | null | null | null | src/main/java/de/budschie/bmorph/gui/NewMorphGui.java | 0xicl33n/BudschieMorphMod | 32442b870b72eb62b8105bb254aba4c7da3dbc08 | [
"MIT"
] | null | null | null | src/main/java/de/budschie/bmorph/gui/NewMorphGui.java | 0xicl33n/BudschieMorphMod | 32442b870b72eb62b8105bb254aba4c7da3dbc08 | [
"MIT"
] | null | null | null | package de.budschie.bmorph.gui;
import java.util.ArrayList;
import java.util.Optional;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.systems.RenderSystem;
import de.budschie.bmorph.capabilities.IMorphCapability;
import de.budschie.bmorph.capabilities.MorphCapabilityAttacher;
import de.budschie.bmorph.main.References;
import de.budschie.bmorph.morph.MorphItem;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.AbstractGui;
import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.vector.Quaternion;
import net.minecraftforge.common.util.LazyOptional;
public class NewMorphGui
{
public static ArrayList<MorphWidget> morphWidgets = new ArrayList<>();
private static int scroll = 0;
public static void showGui()
{
LazyOptional<IMorphCapability> cap = Minecraft.getInstance().player.getCapability(MorphCapabilityAttacher.MORPH_CAP);
if(cap.isPresent())
{
IMorphCapability resolved = cap.resolve().get();
ArrayList<MorphItem> morphList = resolved.getMorphList().getMorphArrayList();
morphWidgets.add(new MorphWidget(null));
for(MorphItem item : morphList)
{
morphWidgets.add(new MorphWidget(item));
}
}
}
public static void hideGui()
{
morphWidgets = new ArrayList<>();
}
public static void render(MatrixStack matrixStack)
{
scroll = Math.max(Math.min(scroll, morphWidgets.size() - 1), 0);
int startY = Minecraft.getInstance().getMainWindow().getScaledHeight() / 2 - MorphWidget.getHeight() / 2
- scroll * MorphWidget.getHeight();
int advanceY = 0;
int rendered = 0;
for (int i = 0; i < morphWidgets.size(); i++)
{
if((startY + advanceY + MorphWidget.getHeight()) > 0 && (startY + advanceY) < Minecraft.getInstance().getMainWindow().getScaledHeight())
{
rendered++;
MorphWidget widget = morphWidgets.get(i);
matrixStack.push();
matrixStack.translate(6, startY + advanceY, 0);
widget.render(matrixStack, i == scroll);
// Minecraft.getInstance().fontRenderer.drawText(matrixStack, new StringTextComponent("Index " + i), 0, 0,
// 0xffffff);
matrixStack.pop();
}
advanceY += MorphWidget.getHeight();
}
}
public static void scroll(int amount)
{
scroll += amount;
}
public static void setScroll(int scroll)
{
NewMorphGui.scroll = scroll;
}
public static int getScroll()
{
return scroll;
}
public static ArrayList<MorphWidget> getMorphWidgets()
{
return morphWidgets;
}
// This class represents one morph entry on the side of the screen
public static class MorphWidget
{
public static final int WIDGET_WIDTH = 48;
public static final int WIDGET_HEIGHT = 64;
public static final double SCALE_FACTOR = 1.3;
public static final float ENTITY_SCALE_FACTOR = 30;
public static final Quaternion ENTITY_ROTATION = new Quaternion(10, 45, 0, true);
private static final ResourceLocation MORPH_WINDOW_NORMAL = new ResourceLocation(References.MODID, "textures/gui/morph_window_normal.png");
private static final ResourceLocation MORPH_WINDOW_SELECTED = new ResourceLocation(References.MODID, "textures/gui/morph_window_selected.png");
private static final ResourceLocation DEMORPH = new ResourceLocation(References.MODID, "textures/gui/demorph.png");
Optional<Entity> morphEntity = Optional.empty();
MorphItem morphItem;
public MorphWidget(MorphItem morphItem)
{
this.morphItem = morphItem;
}
public void render(MatrixStack stack, boolean isSelected)
{
RenderSystem.enableBlend();
Minecraft.getInstance().getTextureManager().bindTexture(isSelected ? MORPH_WINDOW_SELECTED : MORPH_WINDOW_NORMAL);
AbstractGui.blit(stack, 0, 0, 0, 0, getWidth(), getHeight(), getWidth(), getHeight());
// Draw entity logic
if(morphItem == null)
{
Minecraft.getInstance().getTextureManager().bindTexture(DEMORPH);
AbstractGui.blit(stack, 0, 0, 0, 0, getWidth(), getHeight(), getWidth(), getHeight());
}
else
{
if(!morphEntity.isPresent())
morphEntity = Optional.of(morphItem.createEntity(Minecraft.getInstance().world));
IRenderTypeBuffer.Impl buffer = Minecraft.getInstance().getRenderTypeBuffers().getBufferSource();
AxisAlignedBB aabb = morphEntity.get().getBoundingBox();
stack.push();
stack.translate(30, 70, 50);
stack.scale(ENTITY_SCALE_FACTOR, -ENTITY_SCALE_FACTOR, ENTITY_SCALE_FACTOR);
stack.rotate(ENTITY_ROTATION);
Minecraft.getInstance().getRenderManager().renderEntityStatic(morphEntity.get(), 0, 0, 0, 0, 0, stack, buffer, 15728880);
buffer.finish();
stack.pop();
}
}
public static int getHeight()
{
return (int) (WIDGET_HEIGHT * SCALE_FACTOR);
}
public static int getWidth()
{
return (int) (WIDGET_WIDTH * SCALE_FACTOR);
}
}
}
| 29.761905 | 145 | 0.7208 |
b2c664ce7bd387984bca2a25d6741d8d39b481e1 | 2,624 | py | Python | django/contrib/sessions/tests.py | rawwell/django | 6b3264671ead4604f26cbd2b71e8d6a02945bf0c | [
"BSD-3-Clause"
] | 1 | 2016-05-08T12:24:22.000Z | 2016-05-08T12:24:22.000Z | django/contrib/sessions/tests.py | rawwell/django | 6b3264671ead4604f26cbd2b71e8d6a02945bf0c | [
"BSD-3-Clause"
] | null | null | null | django/contrib/sessions/tests.py | rawwell/django | 6b3264671ead4604f26cbd2b71e8d6a02945bf0c | [
"BSD-3-Clause"
] | 1 | 2015-11-19T14:45:16.000Z | 2015-11-19T14:45:16.000Z | r"""
>>> from django.conf import settings
>>> from django.contrib.sessions.backends.db import SessionStore as DatabaseSession
>>> from django.contrib.sessions.backends.cache import SessionStore as CacheSession
>>> from django.contrib.sessions.backends.file import SessionStore as FileSession
>>> from django.contrib.sessions.backends.base import SessionBase
>>> db_session = DatabaseSession()
>>> db_session.modified
False
>>> db_session['cat'] = "dog"
>>> db_session.modified
True
>>> db_session.pop('cat')
'dog'
>>> db_session.pop('some key', 'does not exist')
'does not exist'
>>> db_session.save()
>>> db_session.exists(db_session.session_key)
True
>>> db_session.delete(db_session.session_key)
>>> db_session.exists(db_session.session_key)
False
>>> file_session = FileSession()
>>> file_session.modified
False
>>> file_session['cat'] = "dog"
>>> file_session.modified
True
>>> file_session.pop('cat')
'dog'
>>> file_session.pop('some key', 'does not exist')
'does not exist'
>>> file_session.save()
>>> file_session.exists(file_session.session_key)
True
>>> file_session.delete(file_session.session_key)
>>> file_session.exists(file_session.session_key)
False
# Make sure the file backend checks for a good storage dir
>>> settings.SESSION_FILE_PATH = "/if/this/directory/exists/you/have/a/weird/computer"
>>> FileSession()
Traceback (innermost last):
...
ImproperlyConfigured: The session storage path '/if/this/directory/exists/you/have/a/weird/computer' doesn't exist. Please set your SESSION_FILE_PATH setting to an existing directory in which Django can store session data.
>>> cache_session = CacheSession()
>>> cache_session.modified
False
>>> cache_session['cat'] = "dog"
>>> cache_session.modified
True
>>> cache_session.pop('cat')
'dog'
>>> cache_session.pop('some key', 'does not exist')
'does not exist'
>>> cache_session.save()
>>> cache_session.delete(cache_session.session_key)
>>> cache_session.exists(cache_session.session_key)
False
>>> s = SessionBase()
>>> s._session['some key'] = 'exists' # Pre-populate the session with some data
>>> s.accessed = False # Reset to pretend this wasn't accessed previously
>>> s.accessed, s.modified
(False, False)
>>> s.pop('non existant key', 'does not exist')
'does not exist'
>>> s.accessed, s.modified
(True, False)
>>> s.setdefault('foo', 'bar')
'bar'
>>> s.setdefault('foo', 'baz')
'bar'
>>> s.accessed = False # Reset the accessed flag
>>> s.pop('some key')
'exists'
>>> s.accessed, s.modified
(True, True)
>>> s.pop('some key', 'does not exist')
'does not exist'
"""
if __name__ == '__main__':
import doctest
doctest.testmod()
| 27.333333 | 222 | 0.722942 |
750f697a37e463822b2a7bdce2520b7ab0c6eefe | 1,282 | dart | Dart | lib/models/certification.dart | dilanlongla/JobberApp | 136277cc5ddfcf607d7b23e7f38390b44585f1af | [
"MIT"
] | 1 | 2020-09-04T13:09:58.000Z | 2020-09-04T13:09:58.000Z | lib/models/certification.dart | dilanlongla/JobberApp | 136277cc5ddfcf607d7b23e7f38390b44585f1af | [
"MIT"
] | null | null | null | lib/models/certification.dart | dilanlongla/JobberApp | 136277cc5ddfcf607d7b23e7f38390b44585f1af | [
"MIT"
] | null | null | null | import 'package:jobber/models/jobseeker.dart';
class Certification {
int _id;
String _name;
String _organisation;
DateTime _issueDate;
DateTime _expiryDate;
String _credentialId;
String _credentialUrl;
Jobseeker _jobseeker;
Certification(this._id);
Certification.name(
this._id,
this._name,
this._organisation,
this._issueDate,
this._expiryDate,
this._credentialId,
this._credentialUrl,
this._jobseeker);
Jobseeker get jobseeker => _jobseeker;
set jobseeker(Jobseeker value) {
_jobseeker = value;
}
String get credentialUrl => _credentialUrl;
set credentialUrl(String value) {
_credentialUrl = value;
}
String get credentialId => _credentialId;
set credentialId(String value) {
_credentialId = value;
}
DateTime get expiryDate => _expiryDate;
set expiryDate(DateTime value) {
_expiryDate = value;
}
DateTime get issueDate => _issueDate;
set issueDate(DateTime value) {
_issueDate = value;
}
String get organisation => _organisation;
set organisation(String value) {
_organisation = value;
}
String get name => _name;
set name(String value) {
_name = value;
}
int get id => _id;
set id(int value) {
_id = value;
}
}
| 17.561644 | 46 | 0.676287 |
5a0ed7be375cb0da939b6e6999d134f5ac63b496 | 6,774 | rs | Rust | src/example_api/mod.rs | dendrite2go/dendrite-eks-example | 2f9e344bf310800b59e2915f8ba78078f60062d2 | [
"MIT"
] | 2 | 2021-01-18T17:34:43.000Z | 2021-04-12T04:29:18.000Z | src/example_api/mod.rs | dendrite2go/dendrite-eks-example | 2f9e344bf310800b59e2915f8ba78078f60062d2 | [
"MIT"
] | 2 | 2021-01-20T06:13:03.000Z | 2021-02-19T07:26:40.000Z | src/example_api/mod.rs | dendrite2go/dendrite-eks-example | 2f9e344bf310800b59e2915f8ba78078f60062d2 | [
"MIT"
] | 1 | 2021-10-05T13:06:37.000Z | 2021-10-05T13:06:37.000Z | use crate::proto_example::greeter_service_server::GreeterService;
use crate::proto_example::{
Acknowledgement, Empty, GreetCommand, GreetedEvent, Greeting, RecordCommand, SearchQuery,
SearchResponse, StopCommand,
};
use anyhow::{Error, Result};
use bytes::Bytes;
use dendrite::axon_utils::{
init_command_sender, query_events, AxonServerHandle, CommandSink, QuerySink,
};
use dendrite::intellij_work_around::Debuggable;
use futures_core::stream::Stream;
use log::debug;
use prost::Message;
use std::fmt::Debug;
use std::pin::Pin;
use tokio::sync::mpsc;
use tonic::{Request, Response, Status};
/// Carries an `AxonServerHandle` and implements the `prost` generated `GreeterService`.
///
/// The implementation uses implementations of `CommandSink` and `QuerySink` to send commands and queries to AxonServer.
#[derive(Debug)]
pub struct GreeterServer {
pub axon_server_handle: AxonServerHandle,
}
#[tonic::async_trait]
impl GreeterService for GreeterServer {
async fn greet(&self, request: Request<Greeting>) -> Result<Response<Acknowledgement>, Status> {
let inner_request = request.into_inner();
debug!(
"Got a greet request: {:?}",
Debuggable::from(&inner_request)
);
let result_message = inner_request.message.clone();
let command = GreetCommand {
aggregate_identifier: "xxx".to_string(),
message: Some(inner_request),
};
if let Some(serialized) = self
.axon_server_handle
.send_command("GreetCommand", &command)
.await
.map_err(to_status)?
{
let reply_from_command_handler =
Message::decode(Bytes::from(serialized.data)).map_err(decode_error_to_status)?;
debug!(
"Reply from command handler: {:?}",
Debuggable::from(&reply_from_command_handler)
);
return Ok(Response::new(reply_from_command_handler));
}
let default_reply = Acknowledgement {
message: format!("Hello {}!", result_message).into(),
};
Ok(Response::new(default_reply))
}
async fn record(&self, request: Request<Empty>) -> Result<Response<Empty>, Status> {
debug!(
"Got a record request: {:?}",
Debuggable::from(&request.into_inner())
);
let command = RecordCommand {
aggregate_identifier: "xxx".to_string(),
};
self.axon_server_handle
.send_command("RecordCommand", &command)
.await
.map_err(to_status)?;
let reply = Empty {};
Ok(Response::new(reply))
}
async fn stop(&self, request: Request<Empty>) -> Result<Response<Empty>, Status> {
debug!(
"Got a stop request: {:?}",
Debuggable::from(&request.into_inner())
);
let command = StopCommand {
aggregate_identifier: "xxx".to_string(),
};
self.axon_server_handle
.send_command("StopCommand", &command)
.await
.map_err(to_status)?;
let reply = Empty {};
Ok(Response::new(reply))
}
type GreetingsStream =
Pin<Box<dyn Stream<Item = Result<Greeting, Status>> + Send + Sync + 'static>>;
async fn greetings(
&self,
_request: Request<Empty>,
) -> Result<Response<Self::GreetingsStream>, Status> {
let events = query_events(&self.axon_server_handle, "xxx")
.await
.map_err(to_status)?;
let (tx, mut rx): (
mpsc::Sender<Result<Greeting>>,
mpsc::Receiver<Result<Greeting>>,
) = mpsc::channel(4);
tokio::spawn(async move {
for event in &events[..] {
let event = event.clone();
if let Some(payload) = event.payload {
if payload.r#type == "GreetedEvent" {
let greeted_event_message = GreetedEvent::decode(Bytes::from(payload.data))
.ok()
.map(|e| e.message);
if let Some(greeting) = greeted_event_message.flatten() {
debug!("Greeting: {:?}", greeting);
tx.send(Ok(greeting)).await.ok();
}
}
}
}
let greeting = Greeting {
message: "End of stream -oo-".to_string(),
};
debug!("End of stream: {:?}", Debuggable::from(&greeting));
tx.send(Ok(greeting)).await.ok();
});
let output = async_stream::try_stream! {
while let Some(Ok(value)) = rx.recv().await {
yield value as Greeting;
}
};
Ok(Response::new(Box::pin(output) as Self::GreetingsStream))
}
type SearchStream =
Pin<Box<dyn Stream<Item = Result<Greeting, Status>> + Send + Sync + 'static>>;
async fn search(
&self,
request: Request<SearchQuery>,
) -> Result<Response<Self::SearchStream>, Status> {
let (tx, mut rx): (
mpsc::Sender<Result<Greeting>>,
mpsc::Receiver<Result<Greeting>>,
) = mpsc::channel(4);
let query = request.into_inner();
let query_response = self
.axon_server_handle
.send_query("SearchQuery", &query)
.await
.map_err(to_status)?;
tokio::spawn(async move {
for serialized_object in query_response {
if let Ok(search_response) =
SearchResponse::decode(Bytes::from(serialized_object.data))
{
debug!("Search response: {:?}", search_response);
for greeting in search_response.greetings {
debug!("Greeting: {:?}", greeting);
tx.send(Ok(greeting)).await.ok();
}
}
debug!("Next!");
}
debug!("Done!")
});
let output = async_stream::try_stream! {
while let Some(Ok(value)) = rx.recv().await {
yield value as Greeting;
}
};
Ok(Response::new(Box::pin(output) as Self::SearchStream))
}
}
/// Initialises a `GreeterServer`.
pub async fn init() -> Result<GreeterServer> {
init_command_sender()
.await
.map(|command_sink| GreeterServer {
axon_server_handle: command_sink,
})
}
fn to_status(e: Error) -> Status {
Status::unknown(e.to_string())
}
fn decode_error_to_status(e: prost::DecodeError) -> Status {
Status::unknown(e.to_string())
}
| 32.104265 | 120 | 0.55034 |
afca1d3405714736177c28436ae40ed150641d58 | 370 | html | HTML | search-engine-evaluation/Cranfield_DATASET/DOCUMENTS/______1306.html | NefeliTav/Search-Engine-Evaluation | bdc8ceb316448ad334410e5f8ef227f355ef4e3b | [
"Apache-2.0"
] | null | null | null | search-engine-evaluation/Cranfield_DATASET/DOCUMENTS/______1306.html | NefeliTav/Search-Engine-Evaluation | bdc8ceb316448ad334410e5f8ef227f355ef4e3b | [
"Apache-2.0"
] | null | null | null | search-engine-evaluation/Cranfield_DATASET/DOCUMENTS/______1306.html | NefeliTav/Search-Engine-Evaluation | bdc8ceb316448ad334410e5f8ef227f355ef4e3b | [
"Apache-2.0"
] | null | null | null | <head>
<title>experiments on circular cones at yaw in supersonic
flow .</title>
</head>
<body>
pressure measurements made in the fort halstead
supersonic tunnel on two circular cones, of semiapex angles 15 and
coefficients are compared with corresponding values calculated
by theoretical methods, and the relative merits of these methods
are then discussed .
</body>
| 28.461538 | 66 | 0.797297 |
7ea59b29c153a77e4d2e486c1cec803c6ea1a269 | 601 | dart | Dart | core/lib/src/models/data/data_reference.g.dart | hpi-studyu/studyu | 92fa1903ddb782d60f4d4e93f13be79e3095e8eb | [
"MIT"
] | 10 | 2021-01-05T14:57:09.000Z | 2021-11-09T14:35:47.000Z | core/lib/src/models/data/data_reference.g.dart | hpi-studyu/studyu | 92fa1903ddb782d60f4d4e93f13be79e3095e8eb | [
"MIT"
] | 5 | 2021-03-13T18:26:27.000Z | 2021-07-13T18:23:12.000Z | core/lib/src/models/data/data_reference.g.dart | hpi-studyu/studyu | 92fa1903ddb782d60f4d4e93f13be79e3095e8eb | [
"MIT"
] | 2 | 2021-03-10T13:54:39.000Z | 2021-06-20T14:18:25.000Z | // GENERATED CODE - DO NOT MODIFY BY HAND
part of 'data_reference.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
DataReference<T> _$DataReferenceFromJson<T>(Map<String, dynamic> json) =>
DataReference<T>(
json['task'] as String,
json['property'] as String,
);
Map<String, dynamic> _$DataReferenceToJson<T>(DataReference<T> instance) =>
<String, dynamic>{
'task': instance.task,
'property': instance.property,
};
| 30.05 | 77 | 0.49584 |
fa200a7c026f710a9bb1e8e7a2e280f093da295f | 8,656 | swift | Swift | Quickly/ViewControllers/QCompositionViewController.swift | nastenkomisha/quickly | 3448bdfc847bbc21ded6f6ab54391da931c7c3a8 | [
"MIT"
] | 8 | 2017-09-19T14:18:53.000Z | 2020-08-31T10:54:12.000Z | Quickly/ViewControllers/QCompositionViewController.swift | nastenkomisha/quickly | 3448bdfc847bbc21ded6f6ab54391da931c7c3a8 | [
"MIT"
] | null | null | null | Quickly/ViewControllers/QCompositionViewController.swift | nastenkomisha/quickly | 3448bdfc847bbc21ded6f6ab54391da931c7c3a8 | [
"MIT"
] | 7 | 2017-09-19T13:53:45.000Z | 2022-01-14T06:19:28.000Z | //
// Quickly
//
open class QCompositionViewController< Composition: IQComposition > : QViewController, IQInputContentViewController, IQStackContentViewController, IQPageContentViewController, IQGroupContentViewController, IQModalContentViewController, IQDialogContentViewController, IQHamburgerContentViewController, IQJalousieContentViewController, IQLoadingViewDelegate {
public var backgroundView: UIView? {
willSet {
guard let backgroundView = self.backgroundView else { return }
backgroundView.removeFromSuperview()
}
didSet {
guard let backgroundView = self.backgroundView else { return }
backgroundView.translatesAutoresizingMaskIntoConstraints = false
self.view.insertSubview(backgroundView, at: 0)
self._updateConstraints(self.view, backgroundView: backgroundView)
}
}
public private(set) lazy var composition: Composition = {
let composition = Composition(frame: self.view.bounds, owner: self)
composition.contentView.translatesAutoresizingMaskIntoConstraints = false
if let backgroundView = self.backgroundView {
self.view.insertSubview(composition.contentView, aboveSubview: backgroundView)
} else {
self.view.addSubview(composition.contentView)
}
self._updateConstraints(self.view, contentView: composition.contentView)
return composition
}()
public var loadingView: QLoadingViewType? {
willSet {
guard let loadingView = self.loadingView else { return }
loadingView.removeFromSuperview()
loadingView.delegate = nil
}
didSet {
guard let loadingView = self.loadingView else { return }
loadingView.translatesAutoresizingMaskIntoConstraints = false
loadingView.delegate = self
}
}
private var _backgroundConstraints: [NSLayoutConstraint] = [] {
willSet { self.view.removeConstraints(self._backgroundConstraints) }
didSet { self.view.addConstraints(self._backgroundConstraints) }
}
private var _contentConstraints: [NSLayoutConstraint] = [] {
willSet { self.view.removeConstraints(self._contentConstraints) }
didSet { self.view.addConstraints(self._contentConstraints) }
}
private var _loadingConstraints: [NSLayoutConstraint] = [] {
willSet { self.view.removeConstraints(self._loadingConstraints) }
didSet { self.view.addConstraints(self._loadingConstraints) }
}
open override func didChangeContentEdgeInsets() {
super.didChangeContentEdgeInsets()
if self.isLoaded == true {
self._updateConstraints(self.view, contentView: self.composition.contentView)
}
}
open func isLoading() -> Bool {
guard let loadingView = self.loadingView else { return false }
return loadingView.isAnimating()
}
open func startLoading() {
guard let loadingView = self.loadingView else { return }
loadingView.start()
}
open func stopLoading() {
guard let loadingView = self.loadingView else { return }
loadingView.stop()
}
// MARK: IQContentViewController
public var contentOffset: CGPoint {
get { return CGPoint.zero }
}
public var contentSize: CGSize {
get {
guard self.isLoaded == true else { return CGSize.zero }
return self.view.bounds.size
}
}
open func notifyBeginUpdateContent() {
if let viewController = self.contentOwnerViewController {
viewController.beginUpdateContent()
}
}
open func notifyUpdateContent() {
if let viewController = self.contentOwnerViewController {
viewController.updateContent()
}
}
open func notifyFinishUpdateContent(velocity: CGPoint) -> CGPoint? {
if let viewController = self.contentOwnerViewController {
return viewController.finishUpdateContent(velocity: velocity)
}
return nil
}
open func notifyEndUpdateContent() {
if let viewController = self.contentOwnerViewController {
viewController.endUpdateContent()
}
}
// MARK: IQModalContentViewController
open func modalShouldInteractive() -> Bool {
return true
}
// MARK: IQDialogContentViewController
open func dialogDidPressedOutside() {
}
// MARK: IQHamburgerContentViewController
open func hamburgerShouldInteractive() -> Bool {
return true
}
// MARK: IQJalousieContentViewController
open func jalousieShouldInteractive() -> Bool {
return true
}
// MARK: IQLoadingViewDelegate
open func willShow(loadingView: QLoadingViewType) {
self.view.addSubview(loadingView)
self._updateConstraints(self.view, loadingView: loadingView)
}
open func didHide(loadingView: QLoadingViewType) {
loadingView.removeFromSuperview()
}
}
// MARK: Private
private extension QCompositionViewController {
func _updateConstraints(_ view: UIView, backgroundView: UIView) {
self._backgroundConstraints = [
backgroundView.topLayout == view.topLayout,
backgroundView.leadingLayout == view.leadingLayout,
backgroundView.trailingLayout == view.trailingLayout,
backgroundView.bottomLayout == view.bottomLayout
]
}
func _updateConstraints(_ view: UIView, contentView: UIView) {
let edgeInsets = self.inheritedEdgeInsets
self._contentConstraints = [
contentView.topLayout == view.topLayout.offset(edgeInsets.top),
contentView.leadingLayout == view.leadingLayout.offset(edgeInsets.left),
contentView.trailingLayout == view.trailingLayout.offset(-edgeInsets.right),
contentView.bottomLayout == view.bottomLayout.offset(-edgeInsets.bottom)
]
}
func _updateConstraints(_ view: UIView, loadingView: QLoadingViewType) {
self._loadingConstraints = [
loadingView.topLayout == view.topLayout,
loadingView.leadingLayout == view.leadingLayout,
loadingView.trailingLayout == view.trailingLayout,
loadingView.bottomLayout == view.bottomLayout
]
}
}
// MARK: IQContainerSpec
extension QCompositionViewController : IQContainerSpec {
open var containerSize: CGSize {
get { return self.view.bounds.size }
}
open var containerLeftInset: CGFloat {
get { return self.inheritedEdgeInsets.left }
}
open var containerRightInset: CGFloat {
get { return self.inheritedEdgeInsets.right }
}
}
// MARK: IQTextFieldObserver
extension QCompositionViewController : IQTextFieldObserver {
open func beginEditing(textField: QTextField) {
}
open func editing(textField: QTextField) {
}
open func endEditing(textField: QTextField) {
}
open func pressed(textField: QTextField, action: QFieldAction) {
}
open func pressedClear(textField: QTextField) {
}
open func pressedReturn(textField: QTextField) {
}
open func select(textField: QTextField, suggestion: String) {
}
}
// MARK: IQMultiTextFieldObserver
extension QCompositionViewController : IQMultiTextFieldObserver {
open func beginEditing(multiTextField: QMultiTextField) {
}
open func editing(multiTextField: QMultiTextField) {
}
open func endEditing(multiTextField: QMultiTextField) {
}
open func pressed(multiTextField: QMultiTextField, action: QFieldAction) {
}
open func changed(multiTextField: QMultiTextField, height: CGFloat) {
}
}
// MARK: IQListFieldObserver
extension QCompositionViewController : IQListFieldObserver {
open func beginEditing(listField: QListField) {
}
open func select(listField: QListField, row: QListFieldPickerRow) {
}
open func endEditing(listField: QListField) {
}
open func pressed(listField: QListField, action: QFieldAction) {
}
}
// MARK: IQDateFieldObserver
extension QCompositionViewController : IQDateFieldObserver {
open func beginEditing(dateField: QDateField) {
}
open func select(dateField: QDateField, date: Date) {
}
open func endEditing(dateField: QDateField) {
}
open func pressed(dateField: QDateField, action: QFieldAction) {
}
}
| 30.265734 | 357 | 0.666128 |
dfc0e46aebd13c416e4561353e6df7a7a51f2677 | 473 | swift | Swift | mpush_client/mpush_client/lib/message/AckMessage.swift | mpusher/push-client-swift | 48572733360e4a4e42a982e50dc8dd2b10fd2556 | [
"Apache-2.0"
] | 37 | 2016-08-27T15:19:57.000Z | 2022-01-17T09:31:19.000Z | mpush_client/mpush_client/lib/message/AckMessage.swift | jiangping123456/mpush-client-swift | 48572733360e4a4e42a982e50dc8dd2b10fd2556 | [
"Apache-2.0"
] | null | null | null | mpush_client/mpush_client/lib/message/AckMessage.swift | jiangping123456/mpush-client-swift | 48572733360e4a4e42a982e50dc8dd2b10fd2556 | [
"Apache-2.0"
] | 91 | 2016-08-26T16:01:03.000Z | 2022-01-19T16:57:04.000Z | //
// AckMessage.swift
// mpush_client
//
// Created by ohun on 16/9/7.
// Copyright © 2016年 mpusher. All rights reserved.
//
import Foundation
final class AckMessage: ByteBufMessage, CustomDebugStringConvertible {
init(sessionId: Int32, conn: Connection) {
super.init(packet: Packet(cmd: Command.ack,sessionId: sessionId), conn: conn)
}
var debugDescription: String {
return "AckMessage={sessionId:\(packet.sessionId)}"
}
}
| 22.52381 | 85 | 0.674419 |
866815f4128a6b3e963abecc7829d327212d7802 | 12,982 | go | Go | finders_test.go | Agecanonix/delphix-go-sdk | 5977ba537c2d0e5090082695541701eda8191623 | [
"Apache-2.0"
] | 1 | 2019-07-01T17:32:53.000Z | 2019-07-01T17:32:53.000Z | finders_test.go | Agecanonix/delphix-go-sdk | 5977ba537c2d0e5090082695541701eda8191623 | [
"Apache-2.0"
] | null | null | null | finders_test.go | Agecanonix/delphix-go-sdk | 5977ba537c2d0e5090082695541701eda8191623 | [
"Apache-2.0"
] | 2 | 2019-08-29T20:05:32.000Z | 2020-01-09T06:32:30.000Z | package delphix
import (
"fmt"
"log"
"reflect"
"testing"
)
func TestFindSourceByName(t *testing.T) {
sourceName := "Employee DB - Oracle"
testDelphixAdminClient.LoadAndValidate()
r, err := testDelphixAdminClient.FindSourceByName(sourceName)
if err != nil {
t.Fatalf("Wamp, Wamp: %s\n", err)
}
if r == nil {
log.Fatalf("Source %s not found\n", sourceName)
}
fmt.Printf("Source %s: %s\n", sourceName, r)
}
func TestFindDatabaseByRef(t *testing.T) {
dbRef := "ORACLE_DB_CONTAINER-34"
testDelphixAdminClient.LoadAndValidate()
r, err := testDelphixAdminClient.FindDatabaseByReference(dbRef)
if err != nil {
t.Errorf("Wamp, Wamp: %s\n", err)
}
if r == nil {
log.Fatalf("Database %s not found\n", dbRef)
}
fmt.Printf("Database %s: %s\n", dbRef, r)
}
func TestFindDatabaseByName(t *testing.T) {
dbName := "Employee DB - Oracle"
testDelphixAdminClient.LoadAndValidate()
r, err := testDelphixAdminClient.FindDatabaseByName(dbName)
if err != nil {
t.Errorf("Wamp, Wamp: %s\n", err)
}
if r == nil {
log.Fatalf("Database %s not found\n", dbName)
}
fmt.Printf("Database %s: %s\n", dbName, r)
}
func TestFindGroupByName(t *testing.T) {
groupName := "1 - Dev Copies"
testDelphixAdminClient.LoadAndValidate()
r, err := testDelphixAdminClient.FindGroupByName(groupName)
if err != nil {
t.Errorf("Wamp, Wamp: %s\n", err)
}
if r == nil {
log.Fatalf("Group %s not found\n", groupName)
}
fmt.Printf("Group %s: %s\n", groupName, r)
}
func TestFindDatabaseByNameAndFindRepoByEnvironmentRefAndOracleHome(t *testing.T) {
environmentName := "OELTARGET"
oracleHome := "/u01/app/oracle/product/11.2.0.4/db_1"
testDelphixAdminClient.LoadAndValidate()
environmentRef, err := testDelphixAdminClient.FindEnvironmentByName(environmentName)
if err != nil {
t.Errorf("Wamp, Wamp: %s\n", err)
}
if environmentRef == nil {
log.Fatalf("Environment %s not found\n", environmentName)
}
r, err := testDelphixAdminClient.FindRepoReferenceByEnvironmentRefAndOracleHome(environmentRef.(string), oracleHome)
if err != nil {
t.Errorf("Wamp, Wamp: %s\n", err)
}
if r == "" {
log.Fatalf("Repo %s not found\n", oracleHome)
}
fmt.Printf("Repo %s%s: %s\n", environmentName, oracleHome, r)
}
// func TestFindEnvironmentByName(t *testing.T) {
// environmentName := "LINUXTARGET"
// testDelphixAdminClient.LoadAndValidate()
// r, err := testDelphixAdminClient.FindEnvironmentByName(environmentName)
// if err != nil {
// t.Errorf("Wamp, Wamp: %s\n", err)
// }
// if r == nil {
// log.Fatalf("Environment %s not found\n", environmentName)
// }
// _, reference, err := GrabObjectNameAndReference(r) //r.(map[string]interface{})["reference"].(string)
// if err != nil {
// t.Errorf("Wamp, Wamp: %s\n", err)
// }
// if reference == "" {
// t.Errorf("Reference was empty")
// }
// fmt.Printf("Environment %s: %s\n", environmentName, r)
// }
func TestFindEnvironmentByReference(t *testing.T) {
// environmentName := "LINUXSOURCE"
testDelphixAdminClient.LoadAndValidate()
// r, err := testDelphixAdminClient.FindEnvironmentByName(environmentName)
// if err != nil {
// t.Errorf("Wamp, Wamp: %s\n", err)
// }
// if r == nil {
// log.Fatalf("Environment %s not found\n", environmentName)
// }
// _, reference, err := GrabObjectNameAndReference(r) //r.(map[string]interface{})["reference"].(string)
// if err != nil {
// t.Errorf("Wamp, Wamp: %s\n", err)
// }
// if reference == "" {
// t.Errorf("Reference was empty")
// }
reference := "UNIX_HOST_ENVIRONMENT-4"
r, err := testDelphixAdminClient.FindEnvironmentByReference(reference)
if err != nil {
if err.Error() != "exception.executor.object.missing" {
log.Fatalf("Wamp, Wamp: %s\n", err)
}
}
if r == nil {
log.Fatalf("Environment %s not found\n", reference)
}
_, reference, err = GrabObjectNameAndReference(r)
if err != nil {
t.Errorf("Wamp, Wamp: %s\n", err)
}
fmt.Printf("Environment %s: %s\n", "test", reference)
}
func TestClient_FindSourceConfigByNameAndRepoReference(t *testing.T) {
type fields struct {
url string
username string
password string
}
type args struct {
n string
r string
}
tests := []struct {
name string
fields fields
args args
want interface{}
wantErr bool
}{
// TODO: Add test cases.
{
name: "test1",
fields: fields{
url: testAccDelphixAdminClient.url + "/resources/json/delphix",
username: testAccDelphixAdminClient.username,
password: testAccDelphixAdminClient.password,
},
want: "ORACLE_SINGLE_CONFIG-4",
wantErr: false,
args: args{
n: "orcl",
r: "ORACLE_INSTALL-36",
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
c := &Client{
url: tt.fields.url,
username: tt.fields.username,
password: tt.fields.password,
}
err := c.LoadAndValidate()
if err != nil {
t.Errorf("Cannot get session: %v", err)
return
}
got, err := c.FindSourceConfigReferenceByNameAndRepoReference(tt.args.n, tt.args.r)
if (err != nil) != tt.wantErr {
t.Errorf("Client.FindSourceConfigByNameAndRepoReference() error = %v, wantErr %v", err, tt.wantErr)
return
}
if !reflect.DeepEqual(got, tt.want) {
t.Errorf("Client.FindSourceConfigByNameAndRepoReference() = %v, want %v", got, tt.want)
}
})
}
}
func TestClient_FindEnvironmentUserByNameAndEnvironmentReference(t *testing.T) {
type fields struct {
url string
username string
password string
}
type args struct {
n string
r string
}
tests := []struct {
name string
fields fields
args args
want interface{}
wantErr bool
}{
// TODO: Add test cases.
{
name: "test1",
fields: fields{
url: testAccDelphixAdminClient.url + "/resources/json/delphix",
username: testAccDelphixAdminClient.username,
password: testAccDelphixAdminClient.password,
},
want: "A User Reference",
wantErr: false,
args: args{
n: "delphix",
r: "UNIX_HOST_ENVIRONMENT-51",
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
c := &Client{
url: tt.fields.url,
username: tt.fields.username,
password: tt.fields.password,
}
err := c.LoadAndValidate()
if err != nil {
t.Errorf("Cannot get session: %v", err)
return
}
got, err := c.FindEnvironmentUserRefByNameAndEnvironmentReference(tt.args.n, tt.args.r)
if (err != nil) != tt.wantErr {
t.Errorf("Client.FindEnvironmentUserByNameAndEnvironmentReference() error = %v, wantErr %v", err, tt.wantErr)
return
}
if got == "" {
t.Errorf("Client.FindEnvironmentUserByNameAndEnvironmentReference() = %v, want %v", got, tt.want)
} else {
fmt.Printf("Client.FindEnvironmentUserByNameAndEnvironmentReference() = %v, want %v", got, tt.want)
}
})
}
}
func TestReturnSshPublicKey(t *testing.T) {
err := testSysadminClient.LoadAndValidate()
k, err := testDelphixAdminClient.ReturnSshPublicKey()
if err != nil {
t.Fatalf("Wamp, Wamp: %s\n", err)
}
if k == "" {
log.Fatalf("publicSshKey not found\n")
}
fmt.Printf("publicSshKey: %s\n", k)
}
func TestClient_FindEnvironmentByName(t *testing.T) {
type fields struct {
url string
username string
password string
}
type args struct {
n string
}
tests := []struct {
name string
fields fields
args args
want interface{}
wantErr bool
}{
// TODO: Add test cases.
{
name: "test1",
fields: fields{
url: testAccDelphixAdminClient.url + "/resources/json/delphix",
username: testAccDelphixAdminClient.username,
password: testAccDelphixAdminClient.password,
},
want: "LINUXTARGET",
wantErr: false,
args: args{
n: "LINUXTARGET",
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
c := &Client{
url: tt.fields.url,
username: tt.fields.username,
password: tt.fields.password,
}
err := c.LoadAndValidate()
if err != nil {
t.Errorf("Cannot get session: %v", err)
return
}
got, err := c.FindEnvironmentByName(tt.args.n)
if (err != nil) != tt.wantErr {
t.Errorf("Client.FindEnvironmentByName() error = %v, wantErr %v", err, tt.wantErr)
return
}
if !reflect.DeepEqual(got.(map[string]interface{})["name"], tt.want) {
t.Errorf("Client.FindEnvironmentByName() = %v, want %v", got.(map[string]interface{})["name"], tt.want)
}
})
}
}
func TestClient_FindUserByName(t *testing.T) {
type fields struct {
url string
username string
password string
}
type args struct {
n string
}
tests := []struct {
name string
fields fields
args args
want interface{}
wantErr bool
}{
{
name: "test1",
fields: fields{
url: testAccDelphixAdminClient.url + "/resources/json/delphix",
username: testAccDelphixAdminClient.username,
password: testAccDelphixAdminClient.password,
},
want: "sysadmin",
wantErr: false,
args: args{
n: "sysadmin",
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
c := &Client{
url: tt.fields.url,
username: tt.fields.username,
password: tt.fields.password,
}
err := c.LoadAndValidate()
if err != nil {
t.Errorf("Cannot get session: %v", err)
return
}
got, err := c.FindUserByName(tt.args.n)
if (err != nil) != tt.wantErr {
t.Errorf("Client.FindUserByName() error = %v, wantErr %v", err, tt.wantErr)
return
}
if !reflect.DeepEqual(got.(map[string]interface{})["name"], tt.want) {
t.Errorf("Client.FindUserByName() = %v, want %v", got.(map[string]interface{})["name"], tt.want)
}
})
}
}
func TestClient_FindEnvironmentByReference(t *testing.T) {
type fields struct {
url string
username string
password string
}
type args struct {
r string
}
tests := []struct {
name string
fields fields
args args
want interface{}
wantErr bool
}{
{
name: "test1",
fields: fields{
url: testAccDelphixAdminClient.url + "/resources/json/delphix",
username: testAccDelphixAdminClient.username,
password: testAccDelphixAdminClient.password,
},
want: "UNIX_HOST_ENVIRONMENT-1",
wantErr: false,
args: args{
r: "UNIX_HOST_ENVIRONMENT-1",
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
c := &Client{
url: tt.fields.url,
username: tt.fields.username,
password: tt.fields.password,
}
err := c.LoadAndValidate()
if err != nil {
t.Errorf("Cannot get session: %v", err)
return
}
got, err := c.FindEnvironmentByReference(tt.args.r)
if (err != nil) != tt.wantErr {
t.Errorf("Client.FindEnvironmentByReference() error = %v, wantErr %v", err, tt.wantErr)
return
}
if !reflect.DeepEqual(got.(map[string]interface{})["reference"], tt.want) {
t.Errorf("Client.FindEnvironmentByReference() = %v, want %v", got.(map[string]interface{})["reference"], tt.want)
}
})
}
}
func TestClient_SourceEnvironmentList(t *testing.T) {
type fields struct {
url string
username string
password string
}
tests := []struct {
name string
fields fields
want interface{}
wantErr bool
}{
{
name: "test1",
fields: fields{
url: testAccDelphixAdminClient.url + "/resources/json/delphix",
username: testAccDelphixAdminClient.username,
password: testAccDelphixAdminClient.password,
},
wantErr: false,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
c := &Client{
url: tt.fields.url,
username: tt.fields.username,
password: tt.fields.password,
}
err := c.LoadAndValidate()
if err != nil {
t.Errorf("Cannot get session: %v", err)
return
}
got, err := c.SourceEnvironmentList("")
if (err != nil) != tt.wantErr {
t.Errorf("Client.SourceEnvironmentList() error = %v, wantErr %v", err, tt.wantErr)
return
}
fmt.Printf("GOT: %v", got)
})
}
}
func TestClient_SourceEnvironmentListTest(t *testing.T) {
type fields struct {
url string
username string
password string
}
tests := []struct {
name string
fields fields
want interface{}
wantErr bool
}{
{
name: "test1",
fields: fields{
url: testAccDelphixAdminClient.url + "/resources/json/delphix",
username: testAccDelphixAdminClient.username,
password: testAccDelphixAdminClient.password,
},
wantErr: false,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
c := &Client{
url: tt.fields.url,
username: tt.fields.username,
password: tt.fields.password,
}
err := c.LoadAndValidate()
if err != nil {
t.Errorf("Cannot get session: %v", err)
return
}
got, err := c.SourceEnvironmentListTest("")
if (err != nil) != tt.wantErr {
t.Errorf("Client.SourceEnvironmentListTest() error = %v, wantErr %v", err, tt.wantErr)
return
}
fmt.Printf("GOT: %v", got)
})
}
}
| 25.207767 | 117 | 0.643815 |
3bce3071ae94febaf76f71bb43abe3e1c3eda0ed | 20,127 | html | HTML | hapi-fhir-codegen/src/test/resources/stu-3.0.0/profiles/qi-core3-profile/pages/quick/pages/ReferralRequest.html | hapifhir/hapi-profile-code-generator | 7c2a9baca625ce67b846d95e152417e28e348612 | [
"Apache-2.0"
] | null | null | null | hapi-fhir-codegen/src/test/resources/stu-3.0.0/profiles/qi-core3-profile/pages/quick/pages/ReferralRequest.html | hapifhir/hapi-profile-code-generator | 7c2a9baca625ce67b846d95e152417e28e348612 | [
"Apache-2.0"
] | null | null | null | hapi-fhir-codegen/src/test/resources/stu-3.0.0/profiles/qi-core3-profile/pages/quick/pages/ReferralRequest.html | hapifhir/hapi-profile-code-generator | 7c2a9baca625ce67b846d95e152417e28e348612 | [
"Apache-2.0"
] | null | null | null | <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE HTML>
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
<head>
<title>ReferralRequest</title>
<meta http-equiv='X-UA-Compatible' content='IE=9' />
<link rel='icon' type='image/ico' href='../resources/favicon.ico' />
<link rel='stylesheet' type='text/css' href='../stylesheet.css' title='Style' />
<link rel='stylesheet' type='text/css' href='../font-awesome/css/font-awesome.min.css' />
</head>
<body>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class='topNav'>
<a name='navbar_top'>
<!-- -->
</a>
<ul class='navList' title='Navigation'>
<li>
<a href='../overview-summary.html'>Overview</a>
</li>
<li class='navBarCell1Rev'>Class</li>
<li>
<a href='../index-files.html'>Index</a>
</li>
</ul>
<div class='aboutLanguage'>QUICK</div>
</div>
<div class='subNav'>
<ul class='navList'>
<li>
<a target='_top' href='../index.html?pages/ReferralRequest.html'>FRAMES</a>
<a target='_top' href='ReferralRequest.html'>NO FRAMES</a>
</li>
</ul>
<div><!-- --></div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class='header'>
<h2 title='Class ReferralRequest' class='title'>ReferralRequest</h2>
</div>
<div class='contentContainer'>
<div class='summary'>
<ul class='blockList'>
<li class='blockList'>
<ul class='blockList'>
<li class='blockList'>
<!-- =========== FIELD SUMMARY =========== -->
<a name='field_summary'><!-- --></a>
<p style="margin: 10px">Key: <i class="fa fa-check fa-fw"></i> = Must support, <i
class="fa fa-star fa-fw"></i> = QICore-defined extension, <i class="fa fa-exclamation fa-fw"></i> = Is-Modifier</p>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0"
summary="Field Summary table, listing fields, and an explanation">
<tr>
<th class="colFirst" scope="col"><i class="fa fa-fw"></i><i class="fa fa-fw"></i><i class="fa fa-fw"></i> Field</th>
<th class="colLast" scope="col" style="border-right-width: 0px">Card.</th>
<th class="colLast" scope="col">Type and Description
<span style="float: right"><a title="Legend for this format" href="../help.html"><img alt="doco" border="0" src="../../assets/images/help16.png"/></a></span></th>
</tr>
<tr class='altColor'>
<td class='colFirst'><i class="fa fa-check fa-fw" title="Must Support"></i><i class="fa fa-fw"></i><i class="fa fa-fw"></i>
<strong>
<a name='authoredOn'>authoredOn</a>
</strong>
</td>
<td class='colMid'>
<code>0..1</code>
</td>
<td class='colLast'>
<code>DateTime</code>
<blockquote>
<div class='block'>Date/DateTime of creation for draft requests and date of activation for active requests.</div>
</blockquote>
</td>
</tr>
<tr class='rowColor'>
<td class='colFirst'><i class="fa fa-fw"></i><i class="fa fa-fw"></i><i class="fa fa-fw"></i>
<strong>
<a name='basedOn'>basedOn</a>
</strong>
</td>
<td class='colMid'>
<code>0..*</code>
</td>
<td class='colLast'>
<code>List<<a href='ReferralRequest.html'>ReferralRequest</a> | <a href='CarePlan.html'>CarePlan</a> | <a href='ProcedureRequest.html'>ProcedureRequest</a>></code>
<blockquote>
<div class='block'>Indicates any plans, proposals or orders that this request is intended to satisfy - in whole or in part.</div>
</blockquote>
</td>
</tr>
<tr class='altColor'>
<td class='colFirst'><i class="fa fa-fw"></i><i class="fa fa-fw"></i><i class="fa fa-exclamation fa-fw" title="Is-Modifier"></i>
<strong>
<a name='intent'>intent</a>
</strong>
</td>
<td class='colMid'>
<code>1..1</code>
</td>
<td class='colLast'>
<code>code</code>
<blockquote>
<div class='block'>Distinguishes the "level" of authorization/demand implicit in this request.
<p>Binding: <a title="Codes indicating the degree of authority/intentionality associated with a request" href="http://hl7.org/fhir/ValueSet/request-intent">RequestIntent</a> (Required)</p></div>
</blockquote>
</td>
</tr>
<tr class='rowColor'>
<td class='colFirst'><i class="fa fa-check fa-fw" title="Must Support"></i><i class="fa fa-fw"></i><i class="fa fa-fw"></i>
<strong>
<a name='context'>context</a>
</strong>
</td>
<td class='colMid'>
<code>0..1</code>
</td>
<td class='colLast'>
<code><a href='Encounter.html'>Encounter</a> | <a href='EpisodeOfCare.html'>EpisodeOfCare</a></code>
<blockquote>
<div class='block'>The encounter at which the request for referral or transfer of care is initiated.</div>
</blockquote>
</td>
</tr>
<tr class='altColor'>
<td class='colFirst'><i class="fa fa-fw"></i><i class="fa fa-fw"></i><i class="fa fa-fw"></i>
<strong>
<a name='description'>description</a>
</strong>
</td>
<td class='colMid'>
<code>0..1</code>
</td>
<td class='colLast'>
<code>String</code>
<blockquote>
<div class='block'>The reason element gives a short description of why the referral is being made, the description expands on this to support a more complete clinical summary.</div>
</blockquote>
</td>
</tr>
<tr class='rowColor'>
<td class='colFirst'><i class="fa fa-check fa-fw" title="Must Support"></i><i class="fa fa-fw"></i><i class="fa fa-fw"></i>
<strong>
<a name='occurrence_x_'>occurrence[x]</a>
</strong>
</td>
<td class='colMid'>
<code>0..1</code>
</td>
<td class='colLast'>
<code>DateTime | interval<DateTime></code>
<blockquote>
<div class='block'>The period of time within which the services identified in the referral/transfer of care is specified or required to occur.</div>
</blockquote>
</td>
</tr>
<tr class='altColor'>
<td class='colFirst'><i class="fa fa-fw"></i><i class="fa fa-fw"></i><i class="fa fa-fw"></i>
<strong>
<a name='identifier'>identifier</a>
</strong>
</td>
<td class='colMid'>
<code>0..*</code>
</td>
<td class='colLast'>
<code>List<<a href='Identifier.html'>Identifier</a>></code>
<blockquote>
<div class='block'>Business identifier that uniquely identifies the referral/care transfer request instance.</div>
</blockquote>
</td>
</tr>
<tr class='rowColor'>
<td class='colFirst'><i class="fa fa-fw"></i><i class="fa fa-fw"></i><i class="fa fa-fw"></i>
<strong>
<a name='groupIdentifier'>groupIdentifier</a>
</strong>
</td>
<td class='colMid'>
<code>0..1</code>
</td>
<td class='colLast'>
<code><a href='Identifier.html'>Identifier</a></code>
<blockquote>
<div class='block'>The business identifier of the logical "grouping" request/order that this referral is a part of.</div>
</blockquote>
</td>
</tr>
<tr class='altColor'>
<td class='colFirst'><i class="fa fa-check fa-fw" title="Must Support"></i><i class="fa fa-fw"></i><i class="fa fa-fw"></i>
<strong>
<a name='subject'>subject</a>
</strong>
</td>
<td class='colMid'>
<code>1..1</code>
</td>
<td class='colLast'>
<code><a href='Patient.html'>Patient</a> | <a href='Group.html'>Group</a></code>
<blockquote>
<div class='block'>The patient who is the subject of a referral or transfer of care request.</div>
</blockquote>
</td>
</tr>
<tr class='rowColor'>
<td class='colFirst'><i class="fa fa-check fa-fw" title="Must Support"></i><i class="fa fa-fw"></i><i class="fa fa-fw"></i>
<strong>
<a name='priority'>priority</a>
</strong>
</td>
<td class='colMid'>
<code>0..1</code>
</td>
<td class='colLast'>
<code>Concept</code>
<blockquote>
<div class='block'>An indication of the urgency of referral (or where applicable the type of transfer of care) request.
<p>Binding: <a title="The clinical priority of a diagnostic order." href="http://hl7.org/fhir/ValueSet/request-priority">RequestPriority</a> (Required)</p></div>
</blockquote>
</td>
</tr>
<tr class='altColor'>
<td class='colFirst'><i class="fa fa-check fa-fw" title="Must Support"></i><i class="fa fa-fw"></i><i class="fa fa-fw"></i>
<strong>
<a name='reasonCode'>reasonCode</a>
</strong>
</td>
<td class='colMid'>
<code>0..*</code>
</td>
<td class='colLast'>
<code>List<Concept></code>
<blockquote>
<div class='block'>Description of clinical condition indicating why referral/transfer of care is requested. For example: Pathological Anomalies, Disabled (physical or mental), Behavioral Management.
<p>Binding: <a title="This value set includes all the 'Clinical finding' [SNOMED CT](http://snomed.info/sct) codes - concepts where concept is-a 404684003 (Clinical finding (finding))." href="http://hl7.org/fhir/ValueSet/clinical-findings">SNOMED CT Clinical Findings</a> (Example)</p></div>
</blockquote>
</td>
</tr>
<tr class='rowColor'>
<td class='colFirst'><i class="fa fa-check fa-fw" title="Must Support"></i><i class="fa fa-fw"></i><i class="fa fa-fw"></i>
<strong>
<a name='recipient'>recipient</a>
</strong>
</td>
<td class='colMid'>
<code>0..*</code>
</td>
<td class='colLast'>
<code>List<<a href='Practitioner.html'>Practitioner</a> | <a href='Organization.html'>Organization</a>></code>
<blockquote>
<div class='block'>The healthcare provider(s) or provider organization(s) who/which is to receive the referral/transfer of care request.</div>
</blockquote>
</td>
</tr>
<tr class='altColor'>
<td class='colFirst'><i class="fa fa-fw"></i><i class="fa fa-star fa-fw" title="QICore Extension"></i><i class="fa fa-fw"></i>
<strong>
<a name='refusalReason'>refusalReason</a>
</strong>
</td>
<td class='colMid'>
<code>0..1</code>
</td>
<td class='colLast'>
<code>Concept</code>
<blockquote>
<div class='block'>The reason the referral request was refused. Only applicable when status = refused.
<p>Binding: <a href="http://hl7.org/fhir/qicore/ValueSet/qicore-referralrequest-reason-rejected">value set</a> (Example)</p></div>
</blockquote>
</td>
</tr>
<tr class='rowColor'>
<td class='colFirst'><i class="fa fa-check fa-fw" title="Must Support"></i><i class="fa fa-fw"></i><i class="fa fa-fw"></i>
<strong>
<a name='requester'>requester</a>
</strong>
</td>
<td class='colMid'>
<code>0..1</code>
</td>
<td class='colLast'>
<code><a href='ReferralRequest.Requester.html'>Requester</a></code>
<blockquote>
<div class='block'>The individual who initiated the request and has responsibility for its activation.</div>
</blockquote>
</td>
</tr>
<tr class='altColor'>
<td class='colFirst'><i class="fa fa-check fa-fw" title="Must Support"></i><i class="fa fa-fw"></i><i class="fa fa-fw"></i>
<strong>
<a name='serviceRequested'>serviceRequested</a>
</strong>
</td>
<td class='colMid'>
<code>0..*</code>
</td>
<td class='colLast'>
<code>List<Concept></code>
<blockquote>
<div class='block'>The service(s) that is/are requested to be provided to the patient. For example: cardiac pacemaker insertion.
<p>Binding: <a title="Codes indicating the types of services that might be requested as part of a referral." href="http://hl7.org/fhir/ValueSet/c80-practice-codes">Practice Setting Code Value Set</a> (Example)</p></div>
</blockquote>
</td>
</tr>
<tr class='rowColor'>
<td class='colFirst'><i class="fa fa-check fa-fw" title="Must Support"></i><i class="fa fa-fw"></i><i class="fa fa-fw"></i>
<strong>
<a name='specialty'>specialty</a>
</strong>
</td>
<td class='colMid'>
<code>0..1</code>
</td>
<td class='colLast'>
<code>Concept</code>
<blockquote>
<div class='block'>Indication of the clinical domain or discipline to which the referral or transfer of care request is sent. For example: Cardiology Gastroenterology Diabetology.
<p>Binding: <a title="Codes indicating the types of capability the referred to service provider must have." href="http://hl7.org/fhir/ValueSet/practitioner-specialty">PractitionerSpecialty</a> (Example)</p></div>
</blockquote>
</td>
</tr>
<tr class='altColor'>
<td class='colFirst'><i class="fa fa-check fa-fw" title="Must Support"></i><i class="fa fa-fw"></i><i class="fa fa-exclamation fa-fw" title="Is-Modifier"></i>
<strong>
<a name='status'>status</a>
</strong>
</td>
<td class='colMid'>
<code>1..1</code>
</td>
<td class='colLast'>
<code>code</code>
<blockquote>
<div class='block'>The status of the authorization/intention reflected by the referral request record.
<p>Binding: <a title="Codes identifying the stage lifecycle stage of a request" href="http://hl7.org/fhir/ValueSet/request-status">RequestStatus</a> (Required)</p></div>
</blockquote>
</td>
</tr>
<tr class='rowColor'>
<td class='colFirst'><i class="fa fa-fw"></i><i class="fa fa-fw"></i><i class="fa fa-fw"></i>
<strong>
<a name='supportingInformation'>supportingInformation</a>
</strong>
</td>
<td class='colMid'>
<code>0..*</code>
</td>
<td class='colLast'>
<code>List<<a href='Resource.html'>Resource</a>></code>
<blockquote>
<div class='block'>Any additional (administrative, financial or clinical) information required to support request for referral or transfer of care. For example: Presenting problems/chief complaints Medical History Family History Alerts Allergy/Intolerance and Adverse Reactions Medications Observations/Assessments (may include cognitive and fundtional assessments) Diagnostic Reports Care Plan.</div>
</blockquote>
</td>
</tr>
<tr class='altColor'>
<td class='colFirst'><i class="fa fa-check fa-fw" title="Must Support"></i><i class="fa fa-fw"></i><i class="fa fa-fw"></i>
<strong>
<a name='type'>type</a>
</strong>
</td>
<td class='colMid'>
<code>0..1</code>
</td>
<td class='colLast'>
<code>Concept</code>
<blockquote>
<div class='block'>An indication of the type of referral (or where applicable the type of transfer of care) request.
<p>Binding: <a title="This value set includes all SNOMED CT Patient Referral." href="http://hl7.org/fhir/ValueSet/referral-type">SNOMED CT Patient Referral</a> (Example)</p></div>
</blockquote>
</td>
</tr></table>
<p style="margin: 10px">Key: <i class="fa fa-check fa-fw"></i> = Must support, <i
class="fa fa-star fa-fw"></i> = QICore-defined extension, <i class="fa fa-exclamation fa-fw"></i> = Is-Modifier</p>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav">
<span class="legalCopy"><small><font size="-1">
© HL7.org 2011+. QUICK Generated on Fri, Aug 05, 2016 9:03AM.
</font>
</small></span>
</div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
| 51.344388 | 424 | 0.4724 |
55c735b43b317d5b065a5b5a734978452bda5155 | 1,095 | dart | Dart | lib/implementations/union_5_impl.dart | fluttercommunity/dart_sealed_unions | c867c68b4422372d69c0d2f1252c69cff4fb081a | [
"Apache-2.0"
] | 59 | 2018-08-24T21:13:11.000Z | 2022-03-11T20:04:24.000Z | lib/implementations/union_5_impl.dart | fluttercommunity/dart_sealed_unions | c867c68b4422372d69c0d2f1252c69cff4fb081a | [
"Apache-2.0"
] | 8 | 2018-08-17T08:11:13.000Z | 2021-08-15T21:21:34.000Z | lib/implementations/union_5_impl.dart | fluttercommunity/dart_sealed_unions | c867c68b4422372d69c0d2f1252c69cff4fb081a | [
"Apache-2.0"
] | 8 | 2018-08-17T08:29:04.000Z | 2021-03-05T19:21:49.000Z | import 'package:sealed_unions/union_5.dart';
class Union5Impl<A, B, C, D, E> implements Union5<A, B, C, D, E> {
final Union5<A, B, C, D, E> _union;
Union5Impl(Union5<A, B, C, D, E> union) : _union = union;
@override
void continued(
Function(A) continuationFirst,
Function(B) continuationSecond,
Function(C) continuationThird,
Function(D) continuationFourth,
Function(E) continuationFifth,
) {
_union.continued(
continuationFirst,
continuationSecond,
continuationThird,
continuationFourth,
continuationFifth,
);
}
@override
R join<R>(
R Function(A) mapFirst,
R Function(B) mapSecond,
R Function(C) mapThird,
R Function(D) mapFourth,
R Function(E) mapFifth,
) {
return _union.join(
mapFirst,
mapSecond,
mapThird,
mapFourth,
mapFifth,
);
}
@override
bool operator ==(Object other) =>
identical(this, other) || other is Union5Impl && runtimeType == other.runtimeType && _union == other._union;
@override
int get hashCode => _union.hashCode;
}
| 22.346939 | 114 | 0.641096 |
446fb4be8adba3eace204567004923517c90d3a0 | 794 | dart | Dart | lib/SpecificQuestionAnswerList.dart | MeiXuan123/DengueSafe-App | f137c6b6bef9065e1b347565da33f7ad99e033e0 | [
"Apache-2.0"
] | null | null | null | lib/SpecificQuestionAnswerList.dart | MeiXuan123/DengueSafe-App | f137c6b6bef9065e1b347565da33f7ad99e033e0 | [
"Apache-2.0"
] | null | null | null | lib/SpecificQuestionAnswerList.dart | MeiXuan123/DengueSafe-App | f137c6b6bef9065e1b347565da33f7ad99e033e0 | [
"Apache-2.0"
] | null | null | null | /**
* This class creates a list of Specific Frequently Asked Questions and Answers
*
* @author: Aratrika Pal
*
*
*/
import 'QuestionsAnswers.dart';
class SpecificQuestionAnswerList {
List<QuestionsAnswers> qA;
SpecificQuestionAnswerList() {
qA = [
QuestionsAnswers("Who are Admin Users ?",
"NTU Staff, Fullerton Staff or staff from Jurong Hospital"),
QuestionsAnswers(
"Where can I see Campus cases?", "Visit Hotspot Map Page."),
QuestionsAnswers("Can I see cases all over Singapore?",
"Yes, click on SG Stats on the Home Page"),
QuestionsAnswers("Can I report any issues?",
"This feature will be available in a future upgrade"),
];
}
List getList() {
return qA;
}
}
| 26.466667 | 80 | 0.624685 |
1bf25078345248472e5275c3eb4fadd1a9cb3aba | 2,316 | py | Python | tests/test_aai_vf_module.py | krasm/python-onapsdk | 87cd3017fc542a8afd3be51fbd89934ed87ed3a7 | [
"Apache-2.0"
] | null | null | null | tests/test_aai_vf_module.py | krasm/python-onapsdk | 87cd3017fc542a8afd3be51fbd89934ed87ed3a7 | [
"Apache-2.0"
] | null | null | null | tests/test_aai_vf_module.py | krasm/python-onapsdk | 87cd3017fc542a8afd3be51fbd89934ed87ed3a7 | [
"Apache-2.0"
] | null | null | null | from unittest import mock
import pytest
from onapsdk.aai.business import VfModuleInstance
from onapsdk.so.deletion import VfModuleDeletionRequest
from onapsdk.exceptions import ResourceNotFound
def test_vf_module():
vnf_instance = mock.MagicMock()
vnf_instance.url = "test_url"
vf_module_instance = VfModuleInstance(vnf_instance=vnf_instance,
vf_module_id="test_vf_module_id",
is_base_vf_module=True,
automated_assignment=False)
assert vf_module_instance.url == (f"{vf_module_instance.vnf_instance.url}/vf-modules/"
f"vf-module/{vf_module_instance.vf_module_id}")
@mock.patch.object(VfModuleDeletionRequest, "send_request")
def test_vf_module_deletion(mock_deletion_request):
vf_module_instance = VfModuleInstance(vnf_instance=mock.MagicMock(),
vf_module_id="test_vf_module_id",
is_base_vf_module=True,
automated_assignment=False)
vf_module_instance.delete()
mock_deletion_request.assert_called_once_with(vf_module_instance, True)
def test_vnf_vf_module():
"""Test VfModudleInstance's vf_module property"""
vnf_instance = mock.MagicMock()
vnf_instance.vnf = mock.MagicMock()
vf_module = mock.MagicMock()
vf_module.model_version_id = "test_model_version_id"
vf_module_instance = VfModuleInstance(vnf_instance=vnf_instance,
model_version_id="test_model_version_id",
vf_module_id="test_vf_module_id",
is_base_vf_module=True,
automated_assignment=False)
vnf_instance.vnf.vf_modules = []
with pytest.raises(ResourceNotFound) as exc:
vf_module_instance.vf_module
assert exc.type == ResourceNotFound
assert vf_module_instance._vf_module is None
vnf_instance.vnf.vf_modules = [vf_module]
assert vf_module == vf_module_instance.vf_module
assert vf_module_instance._vf_module is not None
assert vf_module_instance.vf_module == vf_module_instance._vf_module
| 39.931034 | 90 | 0.642487 |
35463e0a686f7478bf56a0caf2dc4171ccb121bf | 1,882 | swift | Swift | Instaclone/User.swift | jungy24/Instaclone | b685d7912bfecfeecb36f827071dd7cb8b3db922 | [
"Apache-2.0"
] | null | null | null | Instaclone/User.swift | jungy24/Instaclone | b685d7912bfecfeecb36f827071dd7cb8b3db922 | [
"Apache-2.0"
] | 1 | 2017-03-21T21:33:56.000Z | 2017-03-21T21:33:56.000Z | Instaclone/User.swift | jungy24/Instaclone | b685d7912bfecfeecb36f827071dd7cb8b3db922 | [
"Apache-2.0"
] | null | null | null | //
// User.swift
// Instaclone
//
// Created by Jungyoon Yu on 3/21/17.
// Copyright © 2017 Jungyoon Yu. All rights reserved.
//
import UIKit
import Parse
class User: NSObject
{
var userName: String?
var password: String?
static let userDidLogoutNotification = "UserDidLogout"
init(userName: String, password: String)
{
self.userName = userName
self.password = password
}
static var _currentUser: User?
class var currentUser: User?
{
get
{
if (_currentUser == nil)
{
let defaults = UserDefaults.standard
let userName = defaults.object(forKey: "currentUserName") as? String
let userPass = defaults.object(forKey: "currentUserPass") as? String
if let userName = userName
{
if let userPass = userPass
{
_currentUser = User(userName: userName, password: userPass)
}
}
}
return _currentUser
}
set(user)
{
_currentUser = user
let defaults = UserDefaults.standard
if let user = user
{
print(user.userName)
print(user.password)
defaults.set(user.userName!, forKey: "currentUserName")
defaults.set(user.password!, forKey: "currentUserPass")
}
else
{
defaults.removeObject(forKey: "currentUserName")
defaults.removeObject(forKey: "currentUserPass")
}
defaults.synchronize()
}
}
}
| 24.763158 | 84 | 0.470776 |
3bd8efae916b6a950c53223b1d33ff6557e57213 | 292 | html | HTML | website/bussen/templates/bussen/bussen_base.html | KiOui/bussen | 8d7d222ebd6eef9a008258456987ccc0490e4d67 | [
"MIT"
] | null | null | null | website/bussen/templates/bussen/bussen_base.html | KiOui/bussen | 8d7d222ebd6eef9a008258456987ccc0490e4d67 | [
"MIT"
] | null | null | null | website/bussen/templates/bussen/bussen_base.html | KiOui/bussen | 8d7d222ebd6eef9a008258456987ccc0490e4d67 | [
"MIT"
] | null | null | null | {% extends 'games/base.html' %}
{% load static room %}
{% block page %}
<link rel="stylesheet" href="{% static 'bussen/css/room-slider.css' %}"/>
<div class="room-slide-container">
{% render_room game.room %}
</div>
{% block game %}
{% endblock %}
{% endblock %} | 24.333333 | 77 | 0.565068 |
84140e755d262dd5d33104b57b102f594545f560 | 3,550 | dart | Dart | lib/screens/splash_screen/splash_screen.dart | Nakarmi23/Home-Inspection | 55b86031ff0d1c475e04320eb41a40734ca6b15e | [
"MIT"
] | null | null | null | lib/screens/splash_screen/splash_screen.dart | Nakarmi23/Home-Inspection | 55b86031ff0d1c475e04320eb41a40734ca6b15e | [
"MIT"
] | null | null | null | lib/screens/splash_screen/splash_screen.dart | Nakarmi23/Home-Inspection | 55b86031ff0d1c475e04320eb41a40734ca6b15e | [
"MIT"
] | null | null | null | import 'package:flutter/material.dart';
import 'package:flutter_cubit/flutter_cubit.dart';
import 'package:house_review/cubit/inspection_cause_cubit/inspection_cause_cubit.dart';
import 'package:house_review/cubit/inspection_file_info_cubit/inspection_file_info_cubit.dart';
import 'package:house_review/cubit/room_purpose_cubit/room_purpose_cubit.dart';
import 'package:house_review/cubit/strucutural_system_cubit/structural_system_cubit.dart';
class SplashScreen extends StatefulWidget {
const SplashScreen({Key key}) : super(key: key);
@override
_SplashScreenState createState() => _SplashScreenState();
}
class _SplashScreenState extends State<SplashScreen> {
double loadingProgress = 0;
void changeLoadingProgress() {
setState(() {
loadingProgress = loadingProgress + (1 / 4);
});
}
@override
Widget build(BuildContext context) {
return MultiCubitListener(
listeners: [
CubitListener<InspectionCauseCubit, InspectionCauseState>(
listener: (context, state) {
if (state is InspectionCauseSuccess) changeLoadingProgress();
},
),
CubitListener<RoomPurposeCubit, RoomPurposeState>(
listener: (context, state) {
if (state is RoomPurposeState) changeLoadingProgress();
},
),
CubitListener<StructuralSystemCubit, StructuralSystemState>(
listener: (context, state) {
if (state is StructuralSystemSuccess) changeLoadingProgress();
},
),
CubitListener<InspectionFileInfoCubit, InspectionFileInfoState>(
listener: (context, state) {
if (state is InspectionFileInfoSuccess) changeLoadingProgress();
},
)
],
child: Scaffold(
body: Stack(
overflow: Overflow.clip,
alignment: Alignment.bottomCenter,
children: <Widget>[
Center(
child: SizedBox.fromSize(
child: Image.asset(
'assets/logo.png',
fit: BoxFit.contain,
),
size: Size.fromHeight(140),
),
),
Positioned(
bottom: 16.0 * 8,
width: MediaQuery.of(context).size.width - (16.0 * 6),
child: Column(
children: <Widget>[
TweenAnimationBuilder(
tween: Tween<double>(begin: 0, end: loadingProgress),
duration: Duration(
milliseconds: 250,
),
onEnd: () {
if (loadingProgress == 1)
Navigator.of(context).pushReplacementNamed('/home');
},
builder: (context, value, child) {
return LinearProgressIndicator(
value: value,
backgroundColor: Colors.grey.shade300,
);
},
),
Padding(
padding: const EdgeInsets.only(top: 16.0),
child: Text(
'Loading...',
style: Theme.of(context).textTheme.subtitle1.copyWith(
color: Colors.grey.shade600,
fontWeight: FontWeight.bold,
),
),
)
],
),
),
],
),
),
);
}
}
| 34.466019 | 95 | 0.529577 |
ddb09d4ea092df9791f51ba5d4bf4dc168bfe143 | 1,135 | php | PHP | admin/index.php | sachingadagi/Udaan2016 | 4291f73096c1a01366f749f05baddf1c5b80ccb2 | [
"MIT"
] | 1 | 2021-01-13T15:35:10.000Z | 2021-01-13T15:35:10.000Z | admin/index.php | sachingadagi/Udaan2016 | 4291f73096c1a01366f749f05baddf1c5b80ccb2 | [
"MIT"
] | null | null | null | admin/index.php | sachingadagi/Udaan2016 | 4291f73096c1a01366f749f05baddf1c5b80ccb2 | [
"MIT"
] | 2 | 2015-12-12T03:31:02.000Z | 2015-12-13T18:25:57.000Z | <?php
/**
* Created by PhpStorm.
* User: tuxer
* Date: 12/2/2015
* Time: 11:07 PM
*/
/** test php file */
session_start();
if((isset($_SESSION['is_logged_in']) && $_SESSION['is_logged_in'] == true))
{
header("location:events.php");
}
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
require_once "$root/Udaan2016/fms/utilities/Database.class.php";
require_once "$root/Udaan2016/fms/models/Event.class.php";
use Udaan\Database;
$dbhandler = Database::connect();
# connect to the database
try {
}
catch(PDOException $pdoe)
{
echo $pdoe->getMessage();
}
?>
<html>
<head>
<title>UDAAN-A BIOSCOPE 2016</title>
<link type="text/css" rel="stylesheet" href="css/login.css"/>
</head>
<body>
<form id="login" action="auth.php" method="POST">
<h1>Log In</h1>
<fieldset id="inputs">
<input id="username" type="text" placeholder="Username" name="username" autofocus required>
<input id="password" type="password" placeholder="Password" name="password" required>
</fieldset>
<fieldset id="actions">
<input type="submit" id="submit" value="Log in">
</fieldset>
</form>
</body>
</html> | 20.267857 | 97 | 0.654626 |
0486dfca2ca0f4e2be7a0cc90f21705b0e7236be | 100 | java | Java | TravelApplication/app/src/main/java/com/example/travelapplication/model/DeepClone.java | LTYZHYH/Graduation-Project | 471e781f04433220cfe28db92c5ece476a74e51d | [
"Apache-2.0"
] | 10 | 2020-08-08T02:03:25.000Z | 2022-03-21T09:22:01.000Z | TravelApplication/app/src/main/java/com/example/travelapplication/model/DeepClone.java | LTYZHYH/Graduation-Project | 471e781f04433220cfe28db92c5ece476a74e51d | [
"Apache-2.0"
] | 2 | 2021-04-07T13:02:37.000Z | 2022-03-21T03:54:25.000Z | TravelApplication/app/src/main/java/com/example/travelapplication/model/DeepClone.java | LTYZHYH/Graduation-Project | 471e781f04433220cfe28db92c5ece476a74e51d | [
"Apache-2.0"
] | 2 | 2022-01-21T14:55:42.000Z | 2022-03-13T13:17:17.000Z | package com.example.travelapplication.model;
public interface DeepClone {
Object deepCopy();
}
| 16.666667 | 44 | 0.77 |
d3df58676a5d1fd325e065570eb067b87f5de33d | 7,113 | swift | Swift | novawallet/Common/View/TriangularedView/TriangularedButton+Inspectable.swift | nova-wallet/nova-ios-app | 3649b1463bf2cf7a0b7e2a8156921e747332ef50 | [
"Apache-2.0"
] | 10 | 2021-10-14T17:27:11.000Z | 2022-03-25T23:37:36.000Z | novawallet/Common/View/TriangularedView/TriangularedButton+Inspectable.swift | nova-wallet/nova-ios-app | 3649b1463bf2cf7a0b7e2a8156921e747332ef50 | [
"Apache-2.0"
] | null | null | null | novawallet/Common/View/TriangularedView/TriangularedButton+Inspectable.swift | nova-wallet/nova-ios-app | 3649b1463bf2cf7a0b7e2a8156921e747332ef50 | [
"Apache-2.0"
] | null | null | null | import Foundation
import SoraUI
/// Extension of the TriangularedButton to support design through Interface Builder
extension TriangularedButton {
@IBInspectable
private var _fillColor: UIColor {
get {
triangularedView!.fillColor
}
set(newValue) {
triangularedView!.fillColor = newValue
}
}
@IBInspectable
private var _highlightedFillColor: UIColor {
get {
triangularedView!.highlightedFillColor
}
set(newValue) {
triangularedView!.highlightedFillColor = newValue
}
}
@IBInspectable
private var _strokeColor: UIColor {
get {
triangularedView!.strokeColor
}
set(newValue) {
triangularedView!.strokeColor = newValue
}
}
@IBInspectable
private var _highlightedStrokeColor: UIColor {
get {
triangularedView!.highlightedStrokeColor
}
set(newValue) {
triangularedView!.highlightedStrokeColor = newValue
}
}
@IBInspectable
private var _strokeWidth: CGFloat {
get {
triangularedView!.strokeWidth
}
set(newValue) {
triangularedView!.strokeWidth = newValue
}
}
@IBInspectable
private var _layoutType: UInt8 {
get {
imageWithTitleView!.layoutType.rawValue
}
set(newValue) {
if let layoutType = ImageWithTitleView.LayoutType(rawValue: newValue) {
imageWithTitleView!.layoutType = layoutType
}
}
}
@IBInspectable
private var _title: String? {
get {
imageWithTitleView!.title
}
set(newValue) {
imageWithTitleView!.title = newValue
invalidateLayout()
}
}
@IBInspectable
private var _titleColor: UIColor? {
get {
imageWithTitleView!.titleColor
}
set(newValue) {
imageWithTitleView!.titleColor = newValue
invalidateLayout()
}
}
@IBInspectable
private var _highlightedTitleColor: UIColor? {
get {
imageWithTitleView!.highlightedTitleColor
}
set(newValue) {
imageWithTitleView!.highlightedTitleColor = newValue
invalidateLayout()
}
}
@IBInspectable
private var _iconImage: UIImage? {
get {
imageWithTitleView!.iconImage
}
set(newValue) {
imageWithTitleView!.iconImage = newValue
invalidateLayout()
}
}
@IBInspectable
private var _highlightedIconImage: UIImage? {
get {
imageWithTitleView!.highlightedIconImage
}
set(newValue) {
imageWithTitleView!.highlightedIconImage = newValue
invalidateLayout()
}
}
@IBInspectable
private var _iconTintColor: UIColor? {
get {
imageWithTitleView!.iconTintColor
}
set(newValue) {
imageWithTitleView!.iconTintColor = newValue
}
}
@IBInspectable
private var _titleFontName: String? {
get {
imageWithTitleView!.titleFont?.fontName
}
set(newValue) {
guard let fontName = newValue else {
imageWithTitleView?.titleFont = nil
return
}
guard let pointSize = imageWithTitleView!.titleFont?.pointSize else {
imageWithTitleView!.titleFont = UIFont(name: fontName, size: UIFont.buttonFontSize)
return
}
imageWithTitleView!.titleFont = UIFont(name: fontName, size: pointSize)
invalidateLayout()
}
}
@IBInspectable
private var _titleFontSize: CGFloat {
get {
if let pointSize = imageWithTitleView!.titleFont?.pointSize {
return pointSize
} else {
return 0.0
}
}
set(newValue) {
guard let fontName = imageWithTitleView!.titleFont?.fontName else {
imageWithTitleView!.titleFont = UIFont.systemFont(ofSize: newValue)
return
}
imageWithTitleView!.titleFont = UIFont(name: fontName, size: newValue)
invalidateLayout()
}
}
@IBInspectable
private var _shadowColor: UIColor {
get {
triangularedView!.shadowColor
}
set(newValue) {
triangularedView!.shadowColor = newValue
invalidateLayout()
}
}
@IBInspectable
private var _shadowOffset: CGSize {
get {
triangularedView!.shadowOffset
}
set(newValue) {
triangularedView!.shadowOffset = newValue
}
}
@IBInspectable
private var _shadowRadius: CGFloat {
get {
triangularedView!.shadowRadius
}
set(newValue) {
triangularedView!.shadowRadius = newValue
}
}
@IBInspectable
private var _shadowOpacity: Float {
get {
triangularedView!.shadowOpacity
}
set(newValue) {
triangularedView!.shadowOpacity = newValue
}
}
@IBInspectable
private var _sideLength: CGFloat {
get {
triangularedView!.sideLength
}
set(newValue) {
triangularedView!.sideLength = newValue
}
}
@IBInspectable
private var _spacingBetweenItems: CGFloat {
get {
imageWithTitleView!.spacingBetweenLabelAndIcon
}
set(newValue) {
imageWithTitleView!.spacingBetweenLabelAndIcon = newValue
invalidateLayout()
}
}
@IBInspectable
private var _contentOpacityWhenHighlighted: CGFloat {
get {
contentOpacityWhenHighlighted
}
set(newValue) {
contentOpacityWhenHighlighted = newValue
}
}
@IBInspectable
private var _contentOpacityWhenDisabled: CGFloat {
get {
contentOpacityWhenDisabled
}
set(newValue) {
contentOpacityWhenDisabled = newValue
}
}
@IBInspectable
private var _changesContentOpacityWhenHighlighted: Bool {
get {
changesContentOpacityWhenHighlighted
}
set(newValue) {
changesContentOpacityWhenHighlighted = newValue
}
}
@IBInspectable
private var _displacementBetweenLabelAndIcon: CGFloat {
get {
imageWithTitleView!.displacementBetweenLabelAndIcon
}
set(newValue) {
imageWithTitleView!.displacementBetweenLabelAndIcon = newValue
}
}
@IBInspectable
private var _cornerCut: UInt {
get {
triangularedView!.cornerCut.rawValue
}
set {
triangularedView!.cornerCut = UIRectCorner(rawValue: newValue)
}
}
}
| 22.72524 | 99 | 0.564881 |
ddd53d8d596b017d5bd1f668dcbab88db8faea80 | 3,880 | php | PHP | application/tests/controllers/Welcome_test.php | fandhiakhmad/FunctionPoint | 75a642ef1b06d08841b118d89dbe6b1d3d18fb16 | [
"MIT"
] | null | null | null | application/tests/controllers/Welcome_test.php | fandhiakhmad/FunctionPoint | 75a642ef1b06d08841b118d89dbe6b1d3d18fb16 | [
"MIT"
] | null | null | null | application/tests/controllers/Welcome_test.php | fandhiakhmad/FunctionPoint | 75a642ef1b06d08841b118d89dbe6b1d3d18fb16 | [
"MIT"
] | null | null | null | <?php
/**
* Part of ci-phpunit-test
*
* @author Kenji Suzuki <https://github.com/kenjis>
* @license MIT License
* @copyright 2015 Kenji Suzuki
* @link https://github.com/kenjis/ci-phpunit-test
*/
class Welcome_test extends TestCase
{
public function setUp(){
$this->resetInstance();
}
public function test_method_404()
{
$this->request('GET', 'welcome/method_not_exist');
$this->assertResponseCode(404);
}
public function test_APPPATH()
{
$actual = realpath(APPPATH);
$expected = realpath(__DIR__ . '/../..');
$this->assertEquals(
$expected,
$actual,
'Your APPPATH seems to be wrong. Check your $application_folder in tests/Bootstrap.php'
);
}
// UT00
public function test_login_page()
{
$output = $this->request('GET', 'login');
$this->assertContains('<button type="submit" class="btn btn-primary">Login</button>', $output);
}
// UT01
public function test_login()
{
$username = 'projectmanager';
$password = '12345';
$name = 'Project Manager';
$id = 2;
// login process
$out = $this->request('POST','login/auth', [
'username' => $username,
'password' => $password,
]);
$this->assertRedirect('homepage');
}
// UT01
public function test_login_fail_0()
{
$out = $this->request('POST','login/auth', [
'username' => 'projectmanager',
'password' => '123'
]);
$this->assertRedirect('login/auth_false');
}
// UT01
public function test_login_fail_1()
{
$out = $this->request('POST','login/auth');
$this->assertRedirect('login/auth_false');
}
// UT02
// public function test_logout_0()
// {
// $username = 'projectmanager';
// $password = '12345';
// $name = 'Project Manager';
// $id = 2;
// // login process
// // $this->request('POST','login/auth', [
// // 'username' => $username,
// // 'password' => $password,
// // ]);
// $_SESSION['username'] = $username;
// $_SESSION['id_user'] = $id;
// $_SESSION['name'] = $name;
// $this->assertTrue(isset($_SESSION['username']));
// $this->request('GET', 'login/logout');
// $this->assertRedirect('login');
// $this->assertFalse(isset($_SESSION['username']));
// }
// UT02
// public function test_logout_1()
// {
// $this->request('GET', 'login/logout');
// $this->assertRedirect('login');
// }
// UT03
public function test_index_notlogin()
{
$out = $this->request('GET', '/');
$this->assertRedirect('login');
}
// UT03
public function test_index()
{
$username = 'projectmanager';
$password = '12345';
$name = 'Project Manager';
$id = 2;
$out = $this->request('POST','login/auth', [
'username' => $username,
'password' => $password,
]);
$out = $this->request('GET', '/');
$expect = '<h3>Selamat Datang, '.$name.'</h3>';
$this->assertContains($expect, $out);
}
// UT04
public function test_form_client_notlogin()
{
$out = $this->request('GET', '/estimasi_fp/form_client');
$this->assertRedirect('login');
}
// UT04
public function test_add_cfp_notlogin()
{
$out = $this->request('GET', '/estimasi_fp/add_cfp');
$this->assertRedirect('login');
}
// UT04
public function test_edit_cfp_notlogin()
{
$out = $this->request('GET', '/estimasi_fp/form_edit_cfp');
$this->assertRedirect('login');
}
// UT04
public function test_update_client_notlogin()
{
$out = $this->request('GET', '/estimasi_fp/update_client');
$this->assertRedirect('login');
}
// UT04
public function test_form_client_withid()
{
$username = 'projectmanager';
$password = '12345';
$name = 'Project Manager';
$id_aplikasi = 50;
$out = $this->request('POST','login/auth', [
'username' => $username,
'password' => $password,
]);
$_SESSION['id_aplikasi'] = $id_aplikasi;
$out = $this->request('GET', '/estimasi_fp/form_client');
$this->assertRedirect('/estimasi_fp/form_edit_client/'.$id_aplikasi);
}
}
| 21.675978 | 97 | 0.619845 |
5ab716ea20976d7413b8214e70d13cf5c7968f04 | 639 | sql | SQL | Sources/PLMPackDB/dbo/Tables/UserGroupMemberships.sql | minrogi/PLMPack | 7e9fffd7fa21deabb9dc0b9d72d9269864350054 | [
"MIT"
] | 1 | 2018-09-05T12:58:27.000Z | 2018-09-05T12:58:27.000Z | Sources/PLMPackDB/dbo/Tables/UserGroupMemberships.sql | minrogi/PLMPack | 7e9fffd7fa21deabb9dc0b9d72d9269864350054 | [
"MIT"
] | null | null | null | Sources/PLMPackDB/dbo/Tables/UserGroupMemberships.sql | minrogi/PLMPack | 7e9fffd7fa21deabb9dc0b9d72d9269864350054 | [
"MIT"
] | 2 | 2021-03-10T08:33:22.000Z | 2021-03-16T07:24:00.000Z | CREATE TABLE [dbo].[UserGroupMemberships] (
[UserId] NVARCHAR (128) NOT NULL,
[GroupId] NVARCHAR (128) NOT NULL,
CONSTRAINT [PK_dbo.UserGroupMemberships] PRIMARY KEY CLUSTERED ([UserId] ASC, [GroupId] ASC),
CONSTRAINT [FK_dbo.UserGroupMemberships_dbo.AspNetUsers_UserId] FOREIGN KEY ([UserId]) REFERENCES [dbo].[AspNetUsers] ([Id]) ON DELETE CASCADE,
CONSTRAINT [FK_dbo.UserGroupMemberships_dbo.Groups_GroupId] FOREIGN KEY ([GroupId]) REFERENCES [dbo].[Groups] ([Id]) ON DELETE CASCADE
);
GO
CREATE UNIQUE NONCLUSTERED INDEX [UserGroupMemberships]
ON [dbo].[UserGroupMemberships]([UserId] ASC, [GroupId] ASC);
| 45.642857 | 147 | 0.741784 |
701a915c4420212be2a0f98849ed718f99e0f82c | 804 | go | Go | src/machine/machine_nrf51.go | kyegupov/tinygo | ac5cf4e930b9a32fc2030dba47d6b157416df3c0 | [
"BSD-3-Clause"
] | null | null | null | src/machine/machine_nrf51.go | kyegupov/tinygo | ac5cf4e930b9a32fc2030dba47d6b157416df3c0 | [
"BSD-3-Clause"
] | null | null | null | src/machine/machine_nrf51.go | kyegupov/tinygo | ac5cf4e930b9a32fc2030dba47d6b157416df3c0 | [
"BSD-3-Clause"
] | null | null | null | // +build nrf51
package machine
import (
"device/nrf"
)
// Get peripheral and pin number for this GPIO pin.
func (p GPIO) getPortPin() (*nrf.GPIO_Type, uint8) {
return nrf.GPIO, p.Pin
}
func (uart UART) setPins(tx, rx uint32) {
nrf.UART0.PSELTXD = nrf.RegValue(tx)
nrf.UART0.PSELRXD = nrf.RegValue(rx)
}
//go:export UART0_IRQHandler
func handleUART0() {
UART0.handleInterrupt()
}
func (i2c I2C) setPins(scl, sda uint8) {
i2c.Bus.PSELSCL = nrf.RegValue(scl)
i2c.Bus.PSELSDA = nrf.RegValue(sda)
}
// SPI
func (spi SPI) setPins(sck, mosi, miso uint8) {
if sck == 0 {
sck = SPI0_SCK_PIN
}
if mosi == 0 {
mosi = SPI0_MOSI_PIN
}
if miso == 0 {
miso = SPI0_MISO_PIN
}
spi.Bus.PSELSCK = nrf.RegValue(sck)
spi.Bus.PSELMOSI = nrf.RegValue(mosi)
spi.Bus.PSELMISO = nrf.RegValue(miso)
}
| 18.272727 | 52 | 0.680348 |
816653c24b0024867518cde719fd88f921b1b430 | 274 | go | Go | designPatterns/07-adapter_pattern/adapter_pattern.go | yueekee/Sediment-golang | 7f41063514ad3e59a6b7d9d8b835325498a94270 | [
"MIT"
] | null | null | null | designPatterns/07-adapter_pattern/adapter_pattern.go | yueekee/Sediment-golang | 7f41063514ad3e59a6b7d9d8b835325498a94270 | [
"MIT"
] | null | null | null | designPatterns/07-adapter_pattern/adapter_pattern.go | yueekee/Sediment-golang | 7f41063514ad3e59a6b7d9d8b835325498a94270 | [
"MIT"
] | null | null | null | package kafka
type Records struct {
Items []string
}
type Consumer interface {
Poll() Records
}
type MockConsumer struct {}
func (m *MockConsumer) Poll() *Records {
records := &Records{}
records.Items = append(records.Items, "i am mock consumer.")
return records
}
| 15.222222 | 61 | 0.708029 |
438f56dcb85254675e2833e1870d5dabf400a4a4 | 1,025 | kt | Kotlin | Comunicame/app/src/main/java/phi/saac/comunicame/MainActivity.kt | fllaryora/saac-mobile | 21ccb7d42a75e9e7b4d3aa28dbe2ae0a6b0ee986 | [
"CC0-1.0"
] | null | null | null | Comunicame/app/src/main/java/phi/saac/comunicame/MainActivity.kt | fllaryora/saac-mobile | 21ccb7d42a75e9e7b4d3aa28dbe2ae0a6b0ee986 | [
"CC0-1.0"
] | null | null | null | Comunicame/app/src/main/java/phi/saac/comunicame/MainActivity.kt | fllaryora/saac-mobile | 21ccb7d42a75e9e7b4d3aa28dbe2ae0a6b0ee986 | [
"CC0-1.0"
] | null | null | null | package phi.saac.comunicame
import androidx.navigation.findNavController
import android.os.Bundle
import android.view.Menu
import androidx.appcompat.app.AppCompatActivity
import phi.saac.comunicame.databinding.ActivityMainBinding
class MainActivity : AppCompatActivity() {
private lateinit var binding: ActivityMainBinding
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
binding = ActivityMainBinding.inflate(layoutInflater)
setContentView(binding.root)
// val navController = findNavController(R.id.nav_host_fragment_content_main)
}
override fun onCreateOptionsMenu(menu: Menu): Boolean {
// Inflate the menu; this adds items to the action bar if it is present.
//menuInflater.inflate(R.menu.main, menu)
return true
}
override fun onSupportNavigateUp(): Boolean {
val navController = findNavController(R.id.nav_host_fragment_content_main)
return super.onSupportNavigateUp()
}
} | 32.03125 | 84 | 0.748293 |
8128591104e223ab06a152617b25ef3ce968ef97 | 1,352 | go | Go | main.go | pard68/bandaid | fb4c98656e5d0f0c5c9e9292c6fd0d41bc90a271 | [
"MIT"
] | null | null | null | main.go | pard68/bandaid | fb4c98656e5d0f0c5c9e9292c6fd0d41bc90a271 | [
"MIT"
] | null | null | null | main.go | pard68/bandaid | fb4c98656e5d0f0c5c9e9292c6fd0d41bc90a271 | [
"MIT"
] | null | null | null | package main
import (
"flag"
"fmt"
"github.com/prometheus/common/expfmt"
"io"
//"io/ioutil"
"log"
"net/http"
"time"
)
func getMetrics(url string) io.Reader {
timeout := time.Duration(60 * time.Second)
client := &http.Client{
Timeout: timeout,
}
req, newReqErr := http.NewRequest("GET", url, nil)
if newReqErr != nil {
log.Fatal("http.NewRequest error:", newReqErr)
}
res, getErr := client.Do(req)
if getErr != nil {
log.Fatal("client.Do error:", getErr)
}
//body, readErr := ioutil.ReadAll(res.Body)
//if readErr != nil {
// log.Fatal("ioutil.ReadAll error:", readErr)
//}
//fmt.Println(string(body))
return res.Body
}
func retriveAddr() (string, string) {
proto := flag.String("proto", "http", "specify protocol used for scrape")
host := flag.String("host", "localhost", "specify the host to scrape")
port := flag.String("port", "9100", "specify the port to scrape")
metric := flag.String("metric", "", "specify the metric to return")
flag.Parse()
addr := fmt.Sprintf("%s://%s:%s/metrics", *proto, *host, *port)
return addr, *metric
}
func main() {
addr, metric := retriveAddr()
rawMetrics := getMetrics(addr)
parser := expfmt.TextParser{}
metrics, err := parser.TextToMetricFamilies(rawMetrics)
if err != nil {
log.Fatal("parser.TextToMetricFamilies error:", err)
}
fmt.Println(metrics[metric])
}
| 22.915254 | 74 | 0.663462 |
c0f2c0d48cf943a4c82c6132a40aa802964f0a47 | 1,087 | swift | Swift | Sources/Vapor/View/ViewRenderer.swift | vadymmarkov/vapor | c4c2b5c6cc7c0d2c7cb5715ca10329dc4a6abf48 | [
"MIT"
] | 1 | 2016-06-27T00:38:24.000Z | 2016-06-27T00:38:24.000Z | Sources/Vapor/View/ViewRenderer.swift | KBvsMJ/vaporswift | 206ed3b4464e253df7f41716b87c6d3081b98c37 | [
"MIT"
] | null | null | null | Sources/Vapor/View/ViewRenderer.swift | KBvsMJ/vaporswift | 206ed3b4464e253df7f41716b87c6d3081b98c37 | [
"MIT"
] | 1 | 2019-08-08T12:06:13.000Z | 2019-08-08T12:06:13.000Z | /**
View renderers power the Droplet's
`.view` property.
View renderers are responsible for loading
the files paths given and caching if needed.
View renderers are also responsible for
accepting a Node for templated responses.
*/
public protocol ViewRenderer {
/**
Create a re-usable view renderer
with caching that will be based
from the supplied directory.
*/
init(viewsDir: String)
/**
Creates a view at the supplied path
using a Node that is made optional
by various protocol extensions.
*/
func make(_ path: String, _ context: Node) throws -> View
}
extension ViewRenderer {
public func make(_ path: String) throws -> View {
return try make(path, Node.null)
}
public func make(_ path: String, _ context: NodeRepresentable) throws -> View {
return try make(path, try context.makeNode())
}
public func make(_ path: String, _ context: [String: NodeRepresentable]) throws -> View {
return try make(path, try context.makeNode())
}
}
| 27.175 | 93 | 0.649494 |
5d93633f496408d3996b9d70900a7cc0cb848b07 | 2,491 | dart | Dart | test/widget_from_html_test.dart | foxanna/flutter_widget_from_html | ffe99cdef695d5ece05b890a95c0280fc9269bf1 | [
"BSD-2-Clause"
] | null | null | null | test/widget_from_html_test.dart | foxanna/flutter_widget_from_html | ffe99cdef695d5ece05b890a95c0280fc9269bf1 | [
"BSD-2-Clause"
] | null | null | null | test/widget_from_html_test.dart | foxanna/flutter_widget_from_html | ffe99cdef695d5ece05b890a95c0280fc9269bf1 | [
"BSD-2-Clause"
] | 1 | 2020-04-10T21:12:08.000Z | 2020-04-10T21:12:08.000Z | import 'package:flutter/widgets.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_widget_from_html/flutter_widget_from_html.dart';
import '_.dart';
void main() {
testWidgets('renders text with padding', (WidgetTester tester) async {
final html = 'Hello world';
final explained = await explain(tester, html);
expect(explained, equals('[Padding:(5,10,5,10),child=[Text:Hello world]]'));
});
testWidgets('renders rich text with padding', (WidgetTester tester) async {
final html = 'Hi <b>there</b>!';
final explained = await explain(tester, html);
expect(explained,
equals('[Padding:(5,10,5,10),child=[RichText:(:Hi (+b:there)(:!))]]'));
});
group('IMG tag', () {
final configImg = Config(
baseUrl: Uri.parse('http://base.com/path'),
imagePadding: const EdgeInsets.all(0),
);
testWidgets('renders with padding', (WidgetTester tester) async {
final html = '<img src="http://domain.com/image.png" />';
final explained = await explain(tester, html);
expect(
explained,
equals(
'[Padding:(5,0,5,0),child=[CachedNetworkImage:http://domain.com/image.png]]'));
});
testWidgets('renders full url', (WidgetTester tester) async {
final html = '<img src="http://domain.com/image.png" />';
final explained = await explain(tester, html, config: configImg);
expect(
explained,
equals('[CachedNetworkImage:http://domain.com/image.png]'),
);
});
testWidgets('renders protocol relative url', (WidgetTester tester) async {
final html = '<img src="//protocol.relative" />';
final explained = await explain(tester, html, config: configImg);
expect(
explained,
equals('[CachedNetworkImage:http://protocol.relative]'),
);
});
testWidgets('renders root relative url', (WidgetTester tester) async {
final html = '<img src="/root.relative" />';
final explained = await explain(tester, html, config: configImg);
expect(
explained,
equals('[CachedNetworkImage:http://base.com/root.relative]'),
);
});
testWidgets('renders relative url', (WidgetTester tester) async {
final html = '<img src="relative" />';
final explained = await explain(tester, html, config: configImg);
expect(
explained,
equals('[CachedNetworkImage:http://base.com/path/relative]'),
);
});
});
}
| 34.123288 | 93 | 0.626656 |
c0476f2872372c0fc47acfa22ad9411ea24ad03b | 687 | swift | Swift | WhoSings/Utilities/Utils+Rx.swift | jrBordet/WhoSings | b46b37ca8922b28d400d256c6f032695293e5638 | [
"MIT"
] | null | null | null | WhoSings/Utilities/Utils+Rx.swift | jrBordet/WhoSings | b46b37ca8922b28d400d256c6f032695293e5638 | [
"MIT"
] | null | null | null | WhoSings/Utilities/Utils+Rx.swift | jrBordet/WhoSings | b46b37ca8922b28d400d256c6f032695293e5638 | [
"MIT"
] | null | null | null | //
// Utils+Rx.swift
// ViaggioTreno
//
// Created by Jean Raphael Bordet on 22/12/2020.
//
import Foundation
import RxSwift
import RxComposableArchitecture
extension Observable where Element: OptionalType {
func ignoreNil() -> Observable<Element.Wrapped> {
flatMap { value -> Observable<Element.Wrapped> in
guard let value = value.value else {
return Observable<Element.Wrapped>.empty()
}
return Observable<Element.Wrapped>.just(value)
}
}
}
public protocol OptionalType {
associatedtype Wrapped
var value: Wrapped? { get }
}
extension Optional: OptionalType {
/// Cast `Optional<Wrapped>` to `Wrapped?`
public var value: Wrapped? {
return self
}
}
| 19.628571 | 51 | 0.714702 |
bcae4d1f855a3060136648549063a7740c587328 | 713 | js | JavaScript | src/components/layout/MainApp.js | ikenjoku/spacex-trivia | 0144566b1d50385fe0b78fb38a3c300e029e3848 | [
"MIT"
] | null | null | null | src/components/layout/MainApp.js | ikenjoku/spacex-trivia | 0144566b1d50385fe0b78fb38a3c300e029e3848 | [
"MIT"
] | null | null | null | src/components/layout/MainApp.js | ikenjoku/spacex-trivia | 0144566b1d50385fe0b78fb38a3c300e029e3848 | [
"MIT"
] | null | null | null | import React, { lazy, Suspense } from 'react'
import { Switch, Route, Redirect } from 'react-router-dom'
import { AppLoader } from '../common'
import NotFound from './NotFound'
const History = lazy(() => import('../history'))
const Launch = lazy(() => import('../launch'))
const MainApp = () => {
return (
<Suspense fallback={<AppLoader/>}>
<Switch>
<Route exact path='/'>
<Redirect to='/history' />
</Route>
<Route exact path='/history'>
<History />
</Route>
<Route path='/launches'>
<Launch />
</Route>
<Route>
<NotFound />
</Route>
</Switch>
</Suspense>
)
}
export default MainApp | 24.586207 | 58 | 0.532959 |
bc8d3bff5ad3a8e60491e7e4864e961fff46cba2 | 7,246 | swift | Swift | Source/UIScrollView+XYEmptyData.swift | tuxi/XYEmptyDataView | 5377cf8490f3b7a295d2ecc053dd1552a116dcb4 | [
"MIT"
] | 6 | 2019-09-15T01:25:08.000Z | 2021-09-29T09:13:01.000Z | Source/UIScrollView+XYEmptyData.swift | tuxi/XYEmptyDataView | 5377cf8490f3b7a295d2ecc053dd1552a116dcb4 | [
"MIT"
] | 1 | 2018-03-05T10:06:17.000Z | 2018-03-10T05:11:48.000Z | Source/UIScrollView+XYEmptyData.swift | tuxi/XYEmptyDataView | 5377cf8490f3b7a295d2ecc053dd1552a116dcb4 | [
"MIT"
] | 2 | 2018-01-21T00:28:57.000Z | 2018-01-21T00:37:00.000Z | //
// UIScrollView+XYEmptyData.swift
// XYEmptyDataView
//
// Created by xiaoyuan on 2021/7/30.
// Copyright © 2021 alpface. All rights reserved.
//
import UIKit
private var isRegisterEmptyDataViewKey = "com.alpface.XYEmptyData.registerEemptyDataView"
/// 为 `UICollectionView` 和 `UITableView` 空数据扩展的delegate
public protocol XYEmptyDataDelegateAuto {
/// 当不符合显示时,是否强制显示
func shouldForceDisplay(forState state: XYEmptyDataState, inEmptyData emptyData: XYEmptyData) -> Bool
/// 应该显示或隐藏,默认不需要实现,由dataSource 计算,适用于
func shouldDisplay(forState state: XYEmptyDataState, inEmptyData emptyData: XYEmptyData) -> Bool
}
extension UIScrollView {
/// 刷新空视图, 当执行`tableView`的`readData`、`endUpdates`或者`CollectionView`的`readData`时会调用此方法,外面无需主动调用
fileprivate func reloadEmptyDataView() {
guard let state = self.emptyData?.state else {
self.emptyData?.hide()
return
}
var shouldDisplay = shouldDisplayEmptyDataView
if let delegate = self.emptyData?.delegate as? XYEmptyDataDelegateAuto {
if !shouldDisplay {
shouldDisplay = delegate.shouldForceDisplay(forState: state, inEmptyData: self.emptyData!)
}
}
if shouldDisplay {
self.emptyData?.show(with: state)
}
else {
self.emptyData?.hide()
}
}
fileprivate var isRegisterEmptyDataView: Bool {
set {
objc_setAssociatedObject(self, &isRegisterEmptyDataViewKey, newValue, .OBJC_ASSOCIATION_ASSIGN)
}
get {
return objc_getAssociatedObject(self, &isRegisterEmptyDataViewKey) as? Bool ?? false
}
}
override func notifyEmptyDataDidChanged() {
if let tableView = self as? UITableView {
tableView.registerEmptyDataView()
}
if let collectionView = self as? UICollectionView {
collectionView.registerEmptyDataView()
}
emptyData?.config.sizeObserver = SizeObserver(target: self, eventHandler: { [weak self] keyPath in
self?.reloadEmptyDataView()
})
}
}
/// 扩展显示空数据的条件
private extension UIScrollView {
/// 是否应该显示
var shouldDisplayEmptyDataView: Bool {
var shouldDisplay = emptyData != nil && !frame.size.equalTo(.zero)
if !shouldDisplay {
return shouldDisplay
}
if let delegate = self.emptyData?.delegate as? XYEmptyDataDelegateAuto {
shouldDisplay = delegate.shouldDisplay(forState: self.emptyData!.state!, inEmptyData: self.emptyData!)
}
if !shouldDisplay {
return shouldDisplay
}
return itemCount <= 0
}
var itemCount: Int {
var itemCount = 0
let selectorName = "dataSource"
if self.responds(to: NSSelectorFromString(selectorName)) == false {
return itemCount
}
// UITableView
if let tableView = self as? UITableView {
guard let dataSource = tableView.dataSource else {
return itemCount
}
var sections = 1
let selName1 = "numberOfSectionsInTableView:"
if dataSource.responds(to: NSSelectorFromString(selName1)) {
sections = dataSource.numberOfSections!(in: tableView)
}
let selName2 = "tableView:numberOfRowsInSection:"
if dataSource.responds(to: NSSelectorFromString(selName2)) {
if sections > 0 {
for section in 0...(sections - 1) {
itemCount += dataSource.tableView(tableView, numberOfRowsInSection: section)
}
}
}
}
// UICollectionView
if let collectionView = self as? UICollectionView {
guard let dataSource = collectionView.dataSource else {
return itemCount
}
var sections = 1
let selName1 = "numberOfSectionsInCollectionView:"
if dataSource.responds(to: NSSelectorFromString(selName1)) {
sections = dataSource.numberOfSections!(in: collectionView)
}
let selName2 = "collectionView:numberOfItemsInSection:"
if dataSource.responds(to: NSSelectorFromString(selName2)) {
if sections > 0 {
for section in 0...(sections - 1) {
itemCount += dataSource.collectionView(collectionView, numberOfItemsInSection: section)
}
}
}
}
return itemCount
}
}
extension UITableView {
fileprivate func registerEmptyDataView() {
if self.isRegisterEmptyDataView {
return
}
guard self.emptyData != nil else {
return
}
isRegisterEmptyDataView = true
self.setupEmptyDataView()
// 对reloadData方法的实现进行处理, 为加载reloadData时注入额外的实现
try! Swizzler.swizzle(selector: #selector(reloadData),
newSelector: #selector(swizzleReloadData),
aClass: UITableView.self)
try! Swizzler.swizzle(selector: #selector(endUpdates),
newSelector: #selector(swizzleEndUpdates),
aClass: UITableView.self)
}
@objc private func swizzleReloadData() {
// swizzleReloadData()
let origin = try! Swizzler.Func(aClass: UITableView.self,
selector: #selector(reloadData))
origin.callFunction(withInstance: self)
reloadEmptyDataView()
}
@objc private func swizzleEndUpdates() {
// swizzleEndUpdates()
try! Swizzler.Func(aClass: UITableView.self,
selector: #selector(endUpdates))
.callFunction(withInstance: self)
reloadEmptyDataView()
}
}
extension UICollectionView {
fileprivate func registerEmptyDataView() {
if self.isRegisterEmptyDataView {
return
}
guard self.emptyData != nil else {
return
}
isRegisterEmptyDataView = true
self.setupEmptyDataView()
// 对reloadData方法的实现进行处理, 为加载reloadData时注入额外的实现
try! Swizzler.swizzle(selector: #selector(reloadData),
newSelector: #selector(swizzleReloadData),
aClass: UICollectionView.self)
}
@objc private func swizzleReloadData() {
// swizzleReloadData()
try! Swizzler.Func(aClass: UICollectionView.self,
selector: #selector(reloadData))
.callFunction(withInstance: self)
reloadEmptyDataView()
}
}
extension XYEmptyDataDelegateAuto {
public func shouldForceDisplay(forState state: XYEmptyDataState, inEmptyData emptyData: XYEmptyData) -> Bool {
return false
}
public func shouldDisplay(forState state: XYEmptyDataState, inEmptyData emptyData: XYEmptyData) -> Bool {
return true
}
}
| 34.018779 | 114 | 0.589153 |
8506671a82a6f2d03af3287fa233beb697193ac6 | 73,654 | dart | Dart | example/states.dart | RenSan/flutter_country_state | efa041cdeaed74970a968a35b8a3e29866e6309a | [
"MIT"
] | null | null | null | example/states.dart | RenSan/flutter_country_state | efa041cdeaed74970a968a35b8a3e29866e6309a | [
"MIT"
] | null | null | null | example/states.dart | RenSan/flutter_country_state | efa041cdeaed74970a968a35b8a3e29866e6309a | [
"MIT"
] | null | null | null | class Afghanistan{
static List<String> States = <String>[
'Kabul' , 'Kandahar', 'Herat', 'Mazar-i-Sharif', 'Kunduz', 'Jalalabad', ' Lashkar Gah ', 'Taluqan' , 'Puli Khumri', 'Khost' , 'Ghazni', 'Sheberghan' , 'Sari Pul', 'Farah',
];
}
class Albania{
static List<String> States = <String>[
'Berat' , 'Dibër', 'Durrës', 'Elbasan', 'Fier', 'Gjirokastër', ' Korçë ', 'Kukës' , 'Lezhë', 'Shkodër ' , 'Tiranë', 'Vlorë'
];
}
class Algeria{
static List<String> States = <String>[
'Algiers' , 'Oran', 'Constantine', 'Annaba', 'Blida', ' Batna', 'Djelfa ', 'Sétif' , 'Sidi Bel Abbès', 'Biskra ' , 'Tébessa', 'El Oued',
'Skikda','Tiaret','Béjaïa','Tlemcen','Ouargla','Béchar','Mostaganem','Bordj Bou Arréridj','Chlef',' Souk Ahras', 'Médéa','El Eulma','Touggourt',
'Ghardaïa','Saïda','Laghouat','M Sila', 'Jijel','Relizane','Guelma','Aïn Béïda','Khenchela','Bousaada',' Mascara',' Tindouf','Tizi Ouzou',
];
}
class Andorra{
static List<String> States = <String>[
'Sant Julia de Loria' , 'Ordino', 'La Massana', 'Encamp', 'Canillo', ' Andorra la Vella', ' Escaldes-Engordany '
];
}
class Angola{
static List<String> States = <String>[
'Bengo' , 'Benguela', 'Bié', 'Cabinda', 'Cuando Cubango', 'Cuanza Norte', 'Cuanza Sul',
' Cunene',' Huambo','Huíla', 'Luanda','Lunda Norte','Lunda Sul','Malanje','Moxico','Namibe',
'Uíge','Zaire',
];
}
class Anguilla{
static List<String> States = <String>[
'Blowing Point' , 'Sandy Ground', 'Sandy Hill', 'The Valley', ' East End', 'North Hill', 'West End',
'South Hill','The Quarter','North Side', 'Island Harbour','George Hill','Stoney Ground','The Farrington',
];
}
class Antarctica{
static List<String> States = <String>[
'Blowing Point' , ' Sandy Ground', 'Sandy Hill', 'The Valley', ' East End', 'North Hill', 'West End',
'South Hill','The Quarter','North Side', 'Island Harbour','George Hill','Stoney Ground','The Farrington',
];
}
class Antigua{
static List<String> States = <String>[
' Havlo' , ' Victoria', 'North Antarctica', 'Byrdland', ' Newbin', ' Atchabinic',
];
}
class Argentina{
static List<String> States = <String>[
' Catamarca' , ' Chaco ', ' Chubut', 'Ciudad De Buenos Aires', ' Cordoba', ' Corrientes', 'Entre Rios',
'Formosa','Jujuy ','La Pampa', 'La Rioja','Mendoza','Misiones ','Neuquen',
'Rio Negro','Salta ','San Juan ', 'San Luis','Santa Cruz ','Santa Fe ','Santiago Del Estero',
'Tierra Del Fuego','Tucuman',
];
}
class Armenia{
static List<String> States = <String>[
' Aragatsotn' , ' Ararat ', 'Erevan', 'Gegharkunik', ' Lori', ' Shirak','Tavush','Vayots Dzor',
];
}
class Australia{
static List<String> States = <String>[
'New South Wales', 'Queensland', 'South Australia', 'Tasmania',
'Victoria', 'Western Australia', 'Australian Capital Territory', 'Northern Territory',
];
}
class Austria{
static List<String> States = <String>[
'Burgenland',
'Kärnten ',
'Niederösterreich',
'Oberösterreich',
'Salzburg',
'Steiermar',
'Tirol ',
'Vorarlberg ',
'Wien',
];
}
class Azerbaijan{
static List<String> States = <String>[
'Ali Bayramli ',
'Astara',
'Baki ',
'Gadaba',
'Ganca ',
'Goranbo',
'Goycay ',
'Naxcivan',
'Oguz',
'Qabal',
'Saki ',
'Sumqayit',
'Tovuz',
'Xocali ',
' Yevlax ',
' Zengilan',
];
}
class Bahamas{
static List<String> States = <String>[
'New Providence ',
'Freeport ',
'Marsh Harbour',
'High Rock ',
'Fresh Creek ',
'Long Island ',
'Harbour Island ',
'Rock Sound ',
'Bimini ',
'San Salvador and Rum Cay ',
'Acklins and Crooked Islands',
'Green Turtle Cay ',
'Inagua ',
'Nichollstown and Berry Islands ',
'Mayaguana ',
'Ragged Island ',
'Cat Island',
'Governors Harbour',
'Exuma ',
'Sandy Point',
' Kemps Bay',
];
}
class Bahrain{
static List<String> States = <String>[
'Al Manamah ',
'Sitrah ',
'Al Mintaqah al Gharbiyah ',
'Al Mintaqah al Wusta ',
'Al Mintaqah ash Shamaliyah ',
'Al Muharraq ',
'Al Asimah',
'Ash Shamaliyah ',
'Jidd Hafs ',
'Madinat ',
'Madinat Hamad ',
'Mintaqat Juzur Hawar ',
'Ar Rifa ',
'Al Hadd',
];
}
class Bangladesh{
static List<String> States = <String>[
'Barisal ',
'Chittagong ',
'Dhaka ',
'Khulna ',
'Rajshahi ',
'Sylhet',
];
}
class Barbados{
static List<String> States = <String>[
'Saint Michael',
];
}
class Belarus{
static List<String> States = <String>[
'Brest ',
'Homyel',
'Hrodna ',
'Mahilyow ',
'Minsk ',
'Vitsyebsk',
];
}
class Belgium{
static List<String> States = <String>[
'Antwerp ',
'Arlon',
'Brugge ',
'Brussels ',
'Charleroi ',
'East Flanders ',
'Hainaut ',
'Liege ',
'Limburg ',
'Namur',
];
}
class Belize{
static List<String> States = <String>[
'Belize ',
'Cayo ',
'Corozal',
'Orange Walk',
'Stann Creek ',
'Toledo',
];
}
class Benin{
static List<String> States = <String>[
'Alibori ',
'Atakora ',
'Atlantique ',
'Borgou ',
'Donga ',
'Mono ',
'Oueme ',
'Zou',
];
}
class Bermuda{
static List<String> States = <String>[
'Saint George ',
'Hamilton ',
'Pembroke ',
'Saint Georges ',
'Sandys ',
'Smithʼs ',
'Southampton ',
'Devonshire ',
'Warwick ',
'Paget',
];
}
class Bhutan{
static List<String> States = <String>[
'Bumthang',
'Trongsa',
'Punakha',
'Thimphu',
'Paro',
'Wangdue',
'Chukha',
'Samtse',
'Tserang',
'Zhemgang',
'Haa',
'Gasa',
'Mongar',
'Trashigang',
'Lhuntse',
'Tashi Yangtse',
'Pemagatshel',
'Samdrup Jongkhar',
'Lhuntse',
];
}
class Bolivia{
static List<String> States = <String>[
'Chuquisaca',
'Cochabamba',
'El Beni',
'La Paz ',
'Oruro',
'Pando',
'Potosi',
'Santa Cruz ',
'Tarija',
];
}
class Bosnia{
static List<String> States = <String>[
'Herzegovina Neretva ',
'Sarajevo',
'Serbian Republic ',
'Tuzl',
'Zenica Doboj',
];
}
class Botswana{
static List<String> States = <String>[
'Central ',
'Ghanzi ',
'Kgalagadi ',
'Kgatlen',
'Kwenen',
'North West ',
'South East',
'Southern',
];
}
class Brunei{
static List<String> States = <String>[
'Brunei And Muara',
];
}
class Bulgaria{
static List<String> States = <String>[
'Burgas ',
'Dobrich ',
'Grad Sofiya ',
'Haskovo',
'Kyustendil',
'Lovech ',
'Montana ',
'Pernik ',
'Pleven ',
'Plovdiv',
'Razgrad ',
'Ruse ',
'Shumen ',
'Sliven ',
'Stara Zagora',
'Varna ',
'Veliko Tarnovo ',
'Vratsa ',
];
}
class BurkinaFaso{
static List<String> States = <String>[
'Ban',
'Bazega ',
'Bougouriba ',
'Boulgou ',
'Boulkiemde ',
'Ganzourgou ',
'Gnagna',
'Gourma',
'Houet',
'Kadiogo ',
'Kenedougou ',
'Komoe ',
'Kossi',
'Kouritenga ',
'Mou Houn',
'Nahouri ',
'Namentenga ',
'Oubritenga ',
'Oudalan ',
'Passore ',
'Poni ',
'Sanguie ',
'Sanmatenga ',
'Seno',
'Sissili ',
'Soum ',
'Sourou',
'Tapoa ',
'Yagha',
'Yatenga',
'Ziro',
'Zoundweogo',
];
}
class Burundi{
static List<String> States = <String>[
'Bubanza ',
'Bujumbura Mairie',
'Bururi ',
'Cankuzo ',
'Karuzi ',
'Kayanza',
'Kirund',
'Makamba ',
'Muramvya ',
'Muyinga ',
'Ngozi ',
'Rutana',
'Ruyigi',
];
}
class Brazil{
static List<String> States = <String>[
"Acre", "Alagoas", "Amazonas", "Amapá", "Bahia",
"Ceará", "Distrito Federal", "Espírito Santo", "Goiás",
"Maranhão", "Minas Gerais", "Mato Grosso do Sul",
"Mato Grosso", "Pará", "Paraíba", "Pernambuco", "Piauí",
"Paraná", "Rio de Janeiro", "Rio Grande do Norte",
"Rondônia", "Roraima",
"Rio Grande do Sul", "Santa Catarina", "Sergipe",
"São Paulo", "Tocantins",
];
}
class Cambodia{
static List<String> States = <String>[
'Banteay Meanchey ',
'Batdambang ',
'Kampong Cham ',
'Kampong Chhnang ',
'Kampong Sp',
'Kampong Thum ',
'Kampot ',
'Kaoh Kong ',
' Kracheh ',
'Mondol Kiri ',
'Phnom Penh ',
' Pouthisat ',
'Preah Vihea',
'Prey Veng ',
'Rotanokiri ',
'Siemreab ',
' Stng Treng ',
'Svay Rieng',
'Takev',
];
}
class Cameroon{
static List<String> States = <String>[
'Adamaoua ',
'Centre ',
'Est ',
'Extreme Nord ',
'Littoral ',
'Nord ',
'Nord Ouest ',
'Ouest ',
'Sud ',
'Sud Ouest',
];
}
class CapeVerde{
static List<String> States = <String>[
'São Domingos ',
'Brava ',
'Maio ',
'Mosteiros ',
'Paul ',
'Praia ',
'Ribeira Grande ',
'Sal ',
'Santa Catarina ',
'Santa Cruz ',
'São Filipe ',
'São Miguel ',
'Sao Nicolau ',
'São Vicente ',
'Boa Vista ',
'Tarrafal',
];
}
class Canada{
static List<String> States = <String>[
'Alberta',
'British Columbia',
'Manitoba',
'New Brunswick',
'Newfoundland and Labrador',
'Nova Scotia',
'Ontario',
'Prince Edward Island',
'Quebec',
'Saskatchewan',
];
}
class CaymanIslands{
static List<String> States = <String>[
'Creek',
'Eastern',
'Midland',
'Spot Bay',
'Stake Bay',
'West End',
];
}
class CentralAfrica{
static List<String> States = <String>[
' Bamingui Bangoran ',
'Bangui ',
'Basse Kotto ',
'Haut Mbomou ',
'Haute Kotto',
'Kemo ',
'Lobaye ',
'Mambere Kadei',
'Mbomou ',
'Nana Grebizi ',
'Nana Mambere ',
'Ouaka ',
'Ouham ',
'Ouham Pende ',
'Sangha Mbaere ',
'Vakaga',
];
}
class Chad{
static List<String> States = <String>[
'Batha ',
'Bet',
'Guera',
'Hadjer Lamis ',
'Kanem ',
'Lac ',
'Logone Oriental',
'Mandoul ',
'Mayo Kebbi Est ',
'Ouaddai ',
'Salamat ',
'Tandjile ',
'Wadi Fira ',
];
}
class Chile{
static List<String> States = <String>[
'Aisen Del General Carlos Ibanez Del Campo ',
'Antofagasta ',
'Arica Y Parinacota ',
'Atacama',
'Bio Bio ',
'Coquimbo ',
'La Araucania ',
'Libertador General Bernardo O higgins ',
'Los Lagos ',
'Los Rios',
'Magallanes Y Antartica Chilena ',
'Maule ',
'Region Metropolitana De Santiago ',
'Santa Cruz ',
'Tarapaca ',
'Valparaiso'
];
}
class China{
static List<String> States = <String>[
'Anhui ',
'Beijin',
'Chongqing',
'Fujian',
'Gansu ',
'Guangdong ',
'Guangxi ',
'Guizhou',
'Hainan',
'Hebei ',
'Heilongjiang ',
'Henan',
'Hubei ',
'Hunan ',
'Jiangsu ',
'Jiangxi ',
'Jilin ',
'Liaoning ',
'Nei Mongol ',
'Ningxia Hui',
'Shaanxi',
'Shandong ',
'Shanghai',
'Shanxi ',
'Sichuan ',
'Tianjin',
'Xinjiang Uygur',
'Xizang',
'Yunnan ',
'Zhejiang ',
];
}
class Colombia{
static List<String> States = <String>[
'Amazonas ',
'Antioquia ',
'Arauca ',
'Atlantico ',
'Bogota ',
'Bolivar ',
'Boyaca ',
'Caldas ',
'Caqueta ',
'Casanare',
'Cauca ',
'Cesar ',
'Choco ',
'Cordoba ',
'Cundinamarca ',
'Guainia ',
'Huila ',
'La Guajira',
'Magdalena ',
'Meta ',
'Narino ',
'Norte De Santander ',
'Putumayo ',
'Quindio ',
'Risaralda',
'Santander ',
'Sucre ',
'Tolima ',
'Valle Del Cauca ',
'Vichada',
'Vaupes ',
];
}
class Comoros{
static List<String> States = <String>[
'Moheli',' Grande Comore','Ndzuwani',
];
}
class Congo{
static List<String> States = <String>[
'Kinshasa Kinshasa',
'Kongo Central Matadi ',
'Kwango Kenge',
'Kwilu Kikwit',
'Mai-Ndombe Inongo ',
'Kasaï Luebo ',
'Kasaï-Central Kananga ',
'Kasaï-Oriental Mbuji-Mayi ',
'Lomami Kabinda ',
' Sankuru Lusambo ',
'Maniema Kindu ',
' South Kivu Bukavu',
' North Kivu Goma',
' Ituri Bunia ',
' Haut-Uele Isiro ',
' Tshopo Kisangani ',
'Bas-Uele Buta ',
'Nord-Ubangi Gbadolite',
'Mongala Lisala',
'Sud-Ubangi Gemena',
'Équateur Mbandaka ',
'Tshuapa Boende ',
'Tanganyika Kalemie',
'Haut-Lomami Kamina',
'Lualaba Kolwezi',
'Haut-Katanga Lubumbashi',
];
}
class CostaRica{
static List<String> States = <String>[
'Alajuela ',
'Cartago',
'Guanacaste ',
'Heredia ',
'Limon ',
'Puntarena',
'San Jose',
];
}
class Cote{
static List<String> States = <String>[
'Agneby ',
'Bafing ',
'Bas Sassandra ',
'Denguele ',
'Dix Huit Montagnes ',
'Fromager ',
'Haut Sassandra ',
'Lacs ',
'Lagunes ',
'Marahoue ',
'Moyen Cavally',
'Moyen Comoe ',
'N zi Comoe ',
'Savanes ',
'Sud Bandama ',
'Sud Comoe',
'Vallee Du Bandama ',
'Worodougou ',
'Zanzan ',
];
}
class Croatia{
static List<String> States = <String>[
'Brodsko Posavska ',
'Dubrovacko Neretvanska ',
'Grad Zagreb ',
'Istarska ',
'Karlovacka ',
'Osjecko Baranjska',
'Primorsko Goranska ',
'Sibensko Kninska',
'Splitsko Dalmatinska ',
'Zadarska ',
];
}
class Cuba{
static List<String> States = <String>[
'Pinar del Río',
'Artemisa',
'La Habana',
'Mayabeque',
'Matanzas',
'Cienfuegos',
'Villa Clara',
'Sancti Spíritus',
'Ciego de Ávila',
'Camagüey',
'Las Tunas',
'Granma',
'Holguín',
'Santiago de Cuba',
'Guantánamo',
'Isla de la Juventud',
];
}
class Cyprus{
static List<String> States = <String>[
'Larnaca','Limassol ','Paphos ','Famagusta','Kyrenia',
];
}
class CzechRepublic{
static List<String> States = <String>[
'Hlavni mesto Praha ',
'Moravskoslezsky kraj ',
'Jihomoravsky kraj ',
'Ustecky kraj ',
'Stredocesky kraj ',
'Jihocesky kraj ',
'Zlinsky kraj ',
'Olomoucky kraj ',
'Plzensky kraj ',
'Vysočina ',
'Pardubicky kraj ',
'Karlovarsky kraj ',
'Kralovehradecky kraj ',
'Liberecky kraj ',
];
}
class Denmark{
static List<String> States = <String>[
'Hovedstaden ',
'Midtjylland ',
'Nordjylland ',
'Sjalland',
'Syddanmark ',
];
}
class Djibouti{
static List<String> States = <String>[
'Ali Sabieh ',
'Dikhil ',
'Djibouti ',
'Obock ',
'Tadjourah',
];
}
class Dominica{
static List<String> States = <String>[
'Saint George ',
'Saint Patrick ',
'Saint Andrew ',
'Saint David ',
'Saint John ',
'Saint Paul ',
'Saint Peter ',
'Saint Joseph ',
'Saint Luke ',
'Saint Mark ',
];
}
class DominicanRepublic{
static List<String> States = <String>[
'Azua',
'Bahoruco ',
'Barahon',
'Daja',
'Distrito Nacional ',
'Duarte ',
'El Seybo ',
'Elias Pin',
'Espaillat ',
'Hato Mayor ',
'Hermanas',
'Independencia ',
'La Altagracia ',
'La Romana ',
'La Vega',
'Maria Trinidad Sanchez ',
'Monsenor Nouel ',
'Monte Cristi ',
'Monte Plata ',
'Pedernales ',
'Peravi',
'Puerto Plata',
'Samana',
'San Cristobal',
'San Juan ',
'San Pedro De Macoris',
'Sanchez Ramirez',
'Santiago ',
'Santiago Rodriguez ',
'Valverde ',
];
}
class Ecuador{
static List<String> States = <String>[
'Azuay',
'Bolivar',
'Canar ',
'Carchia',
'Chimborazo',
'Cotopaxi ',
'El Oro ',
'Esmeraldas',
'Galapagos ',
'Guayas ',
'Imbabura',
'Loja ',
'Los Rios',
'Manabi ',
'Morona Santiago ',
'Napo ',
'Pastaza ',
'Pichinch',
'Tungurahua ',
'Zamora Chinchipe ',
];
}
class Egypt{
static List<String> States = <String>[
'Ad Daqahliyah',
'Al Bahr Al Ahmar ',
'Al Buhayrah ',
'Al Fayyum ',
'Al Gharbiyah ',
'Al Iskandariyah ',
'Al Ismailiyah',
'Al Jizah ',
'Al Minufiyah ',
'Al Minya ',
'Al Qahirah ',
'Al Qalyubiyah ',
'Al Wadi At Jadid',
'As Suways ',
'Ash Sharqiyah',
'Aswan ',
'Asyut ',
'Bani Suwayf ',
'Bur Said',
'Dumyat ',
'Janub Sina',
'Kafr Ash Shayk',
'Matruh',
'Qina',
'Shamal Sina' ',Suhaj ',
];
}
class ElSalvador{
static List<String> States = <String>[
'Ahuachapan ',
'Cabanas ',
'Chalatenango ',
'Cuscatlan',
'La Libertad ',
'La Paz',
'La Union ',
'Morazan ',
'San Miguel ',
'San Salvador ',
'San Vicente ',
'Santa Ana',
'Sonsonate',
'Usulutan',
];
}
class EquatorialGuinea{
static List<String> States = <String>[
'Annobón San Antonio de Palé',
'Bioko Norte Rebol',
'Bioko Sur Luba',
'Centro Sur Evinayong ',
'Kié-Ntem Ebebiyín ',
'Litoral Bata ',
'Wele-Nzas Mongomo ',
'Djibloho Ciudad de la Paz',
];
}
class Eritrea{
static List<String> States = <String>[
'Anseba ',
'Debub ',
'Debubawi Keyih Bahri ',
'Gash Barka ',
'Maekel ',
'Semenawi Keyih Bahri ',
];
}
class Estonia{
static List<String> States = <String>[
'Harju ',
'Ida Viru ',
'Laane',
'Parnu ',
'Tartu ',
'Viljandi ',
];
}
class Ethiopia{
static List<String> States = <String>[
'Harju',
'Ida Viru ',
'Laane',
'Parnu',
'Tartu ',
'Viljandi',
];
}
class Faroe{
static List<String> States = <String>[
'Faroe Islands',
];
}
class France{
static List<String> States = <String>[
'Alsace',
'Amapa',
'Aquitaine ',
'Auvergne',
'Basse Normandie ',
'Bourgogne',
'Bretagne ',
'Centre',
'Champagne Ardenne',
'Corse',
'Franche Comt',
'Guadeloupe',
'Guinaa ',
'Haute Normandie',
'Ile De France',
'La Reunion ',
'Languedoc Roussillon',
'Limousin',
'Lorraine',
'Martinique',
'Midi Pyrenees',
'Moyotte ',
'Nord Pas De Calais',
'Pays De La Loire ',
'Picardie',
'Poitou Charentes',
'Provence Alpes Cote D azur',
'Rhone Alpes',
];
}
class FrenchGuiana{
static List<String> States = <String>[
'French Guiana',
];
}
class FrenchPolynesia{
static List<String> States = <String>[
'French Polynesia',
];
}
class FrenchSouthern{
static List<String> States = <String>[
'French Southern Territories',
];
}
class Gabon{
static List<String> States = <String>[
'Estuaire',
'Haut Ogooue ',
'Moyen Ogooue ',
'Ngounie ',
'Nyanga ',
'Ogooue Ivindo',
'Ogooue Lolo',
'Ogooue Maritime ',
'Wouleu Ntem',
];
}
class Gambia{
static List<String> States = <String>[
'Western',
'Lower River',
'Banjul',
'Upper River',
'Central River',
'North Bank',
];
}
class Germany{
static List<String> States = <String>[
'Berlin',
'Bayern (Bavaria)',
'Niedersachsen (Lower Saxony)',
'Baden-Württemberg',
'Rheinland-Pfalz (Rhineland-Palatinate)',
'Sachsen (Saxony)',
'Thüringen (Thuringia)',
'Hessen',
'Nordrhein-Westfalen (North Rhine-Westphalia)',
'Sachsen-Anhalt (Saxony-Anhalt)',
'Brandenburg',
'Mecklenburg-Vorpommern',
'Hamburg',
'Schleswig-Holstein',
'Saarland',
'Bremen',
];
}
class Ghana{
static List<String> States = <String>[
' Accra',
'Ashanti ',
'Brong Ahafo ',
'Central ',
'Eastern ',
'Greater Accra',
'Northern',
'Upper East',
'Upper West ',
'Volta',
'Western ',
];
}
class Gibraltar{
static List<String> States = <String>[
'Gibraltar',
];
}
class Greece{
static List<String> States = <String>[
'Anatoliki Makedonia Kai Thraki ',
'Attiki ',
'Dytiki Ellada',
'Ionioi Nisoi',
'Ipeiros ',
'Kentriki Makedonia ',
'Kriti ',
'Notio Aigaio ',
'Peloponnisos ',
'Sterea Ellada ',
'Thessalia ',
'Voreio Aigaio ',
];
}
class GreenLand{
static List<String> States = <String>[
'Kommune Kujalleq ',
'Kommuneqarfik Sermersooq ',
'Nationalparken ',
'Qaasuitsup Kommunia ',
'Qeqqata Kommunia ',
];
}
class Fiji{
static List<String> States = <String>[
'Ba',
'Bua',
'Cakaudrove',
'Kadavu',
'Lau',
'Lomaiviti',
'Macuata',
'Nadroga-Navosa',
'Naitasiri',
'Namosi',
'Ra',
'Rewa',
'Serua',
'Tailevu',
];
}
class Finland{
static List<String> States = <String>[
'Central Finland ',
'Eastern Finland ',
'Eastern Uusimaa ',
'Finland Proper',
'Lapland ',
'North Karelia ',
'Northern Ostrobothnia ',
'Paijanne Tavastia ',
'Pirkanmaa',
'Satakunta ',
'South Karelia',
'Southern Finland ',
'Southern Savonia ',
'Tavastia Proper ',
'Western Finland ',
];
}
class India{
static List<String> States = <String>[
'Andhra Pradesh',
'Arunachal Pradesh',
'Assam',
'Bihar',
'Chhattisgarh',
'Goa',
'Gujarat',
'Haryana',
'Himachal Pradesh',
'Jammu and Kashmir',
'Jharkhand',
'Karnataka',
'Kerala',
'Madhya Pradesh',
'Maharashtra',
'Manipur',
'Meghalaya',
'Mizoram',
'Nagaland',
'Odisha',
'Punjab',
'Rajasthan',
'Sikkim',
'Tamil Nadu',
'Telangana',
'Tripura',
'Uttarakhand',
'Uttar Pradesh',
'West Bengal',
'Andaman and Nicobar Islands',
'Chandigarh',
'Dadra and Nagar Haveli',
'Daman and Diu',
'Delhi',
'Lakshadweep',
'Puducherry',
];
}
class Grenada{
static List<String> States = <String>[
'Saint John ',
'Saint Andrew ',
'Saint Mark ',
'Saint Patrick ',
'Saint David ',
'Saint George ',
];
}
class Guadeloupe{
static List<String> States = <String>[
'Guadeloupe',
];
}
class Guam{
static List<String> States = <String>[
'Piti Municipality',
'Santa Rita Municipality',
'Sinajana Municipality',
'Talofofo Municipality',
'Tamuning-Tumon-Harmon Municipality ',
'Umatac Municipalit',
'Yigo Municipality ',
'Yona Municipality',
'Merizo Municipality',
'Mangilao Municipality ',
'Agana Heights Municipality',
'Chalan Pago-Ordot Municipality',
'Asan-Maina Municipality',
'Agat Municipality',
'Dededo Municipality ',
'Barrigada Municipality',
'Hagatna Municipality',
'Inarajan Municipality',
'Mongmong-Toto-Maite Municipality',
];
}
class Guatemala{
static List<String> States = <String>[
'Alta Verapaz',
'Baja Verapaz ',
'Chimaltenango',
'Chiquimula ',
'El Pro',
'Escuintla ',
'Guatemala ',
'Huehuetenango ',
'Izabal ',
'Jalapa ',
'Jutiapa ',
'Pete',
'Quezaltenango ',
'Quiche',
'Retalhuleu ',
'Sacatepequez',
'San Marcos ',
'Santa Rosa',
'Solola ',
'Suchitepequez ',
'Totonicapan ',
'Zacapa ',
];
}
class Guernsey{
static List<String> States = <String>[
'Saint Pierre du Bois',
'Torteva',
'Saint Saviour',
'Forest',
'Saint Martin',
'Saint Andrew',
'Saint Peter Port ',
'Castel',
'Vale',
'Saint Sampson',
'Alderney',
];
}
class Guinea{
static List<String> States = <String>[
'Boke ',
'Conakry ',
'Faranah ',
'Kankan',
'Kindia ',
'Labe ',
'Mamou',
'Nzerekore ',
];
}
class GuineaBissau{
static List<String> States = <String>[
'Bissau ',
'Oio ',
'Cacheu ',
'Bafatá ',
'Gabú ',
'Bolama ',
'Tombali ',
'Quinara ',
' Biombo ',
];
}
class Honduras{
static List<String> States = <String>[
'Atlantida',
'Choluteca ',
'Colon',
'Comayagua ',
'Copan ',
'Cortes ',
'El Paraiso ',
'Francisco Morazan',
'Gracias A Dios ',
'Intibuca ',
'Islas De La Bahia ',
'La Paz ',
'Lempira ',
'Ocotepeque ',
'Olancho ',
'Santa Barbara ',
'Valle',
'Yoro ',
];
}
class Hong{
static List<String> States = <String>[
'Islands',
'Kwai Tsing',
'North',
'Sai Kung',
'Sha Tin',
'Tai Po',
'Tsuen Wan',
'Tuen Mun',
'Yuen Long',
'Kowloon City',
'Kwun Tong',
'Sham Shui Po',
'Wong Tai Sin',
'Yau Tsim Mong',
'Central & Western',
'Eastern',
'Southern',
'Wan Chai',
];
}
class Hungary{
static List<String> States = <String>[
'Bacs Kiskun ',
'Baranya',
'Bekes ',
'Borsod Abauj Zemplen ',
'Budapest ',
'Csongrad ',
'Fejer ',
'Gyor Moson Sopron ',
'Hajdu Bihar ',
'Heves ',
'Jasz Nagykun Szolnok ',
'Komarom Esztergom ',
'Nograd ',
'Pest ',
'Somogy ',
'Szabolcs Szatmar Bereg ',
'Tolna ',
'Vas ',
'Veszprem ',
'Zala ',
];
}
class Guyana{
static List<String> States = <String>[
'Barima Waini ',
'Cuyuni Mazaruni ',
'East Berbice Corentyne ',
'Essequibo Islands West Demerara ',
'Mahaica Berbice ',
'Pomeroon Supenaam ',
'Upper Demerara Berbice ',
'Upper Takutu Upper Essequibo ',
];
}
class Haiti{
static List<String> States = <String>[
'Centre',
'Grand anse ',
'L artibonite ',
'Nord',
'Nord Est ',
'Nord Ouest ',
'Ouest',
'Sud ',
'Sud Est ',
];
}
class Herzegovina{
static List<String> States = <String>[
' Bosnia and Herzegovina ',
'Republika Srpska ',
];
}
class Iceland{
static List<String> States = <String>[
'Akrahreppur ',
'Akureyri ',
'Austur Herao',
'Biskupstungnahreppur ',
'Suournes ',
'Sveitarfelagio Hornafjorour',
'Vestfiroir ',
'Vesturland ',
];
}
class Indonesia{
static List<String> States = <String>[
'Aceh',
'Bali ',
'Bangka Belitung ',
'Banten ',
'Bengkulu ',
'Gorontalo',
'Irian Jaya Barat ',
'Jakarta Raya',
'Jambi ',
'Jawa Barat ',
'Jawa Tengah ',
'Jawa Timur ',
'Kalimantan Barat',
'Kalimantan Selatan ',
'Kalimantan Tengah ',
'Kalimantan Timur',
'Kepulauan Ria',
'Lampung ',
'Maluku ',
'Maluku Utara',
'Nusa Tenggara Barat ',
'Nusa Tenggara Timur',
'Papua',
'Ria',
'Sulawesi Barat ',
'Sulawesi Selatan',
'Sulawesi Tengah ',
'Sulawesi Tenggara ',
'Sulawesi Utara',
'Sumatera Barat ',
'Sumatera Selatan ',
'Sumatera Utara',
'Yogyakarta',
];
}
class Iran{
static List<String> States = <String>[
'Alborz ',
'Ardabil ',
'Bushehr ',
'Chaharmahal and Bakhtiari ',
'East Azerbaijan ',
'Isfahan ',
'Fars ',
'Gilan ',
'Golestan ',
'Hamadan ',
'Hormozgan ',
'Ilam ',
'Kerman ',
'Kermanshah ',
'Khuzestan ',
'Kohgiluyeh and Boyer-Ahmad ',
'Kurdistan ',
'Lorestan ',
'Markazi ',
'Mazandaran ',
'North Khorasan ',
'Qazvin ',
'Qom ',
'Razavi Khorasan ',
'Semnan ',
'Sistan and Baluchestan ',
'South Khorasan ',
'Tehran ',
'West Azerbaijan ',
'Yazd ',
'Zanjan ',
];
}
class Iraq{
static List<String> States = <String>[
'Al Anbar ',
'Al Basrah ',
'Al Muthannia',
'Al Qadisiyah',
'An Najaf ',
'Arbil',
'As Sulaymaniyah ',
'At Ta mi Babi',
'Baghdad',
'Dhi Qar ',
'Dihok ',
'Diyala ',
'Karbala' ',Maysan ',
'Ninawa ',
'Sala Ad Din ',
'Wasit ',
];
}
class Ireland{
static List<String> States = <String>[
"Clare",
"Cork",
"Dublin",
"Donegal",
"Galway",
"Kilkenny",
"Kerry",
"Longford",
"Louth",
"Limerick",
"Monaghan",
"Roscommon",
"Sligo",
];
}
class Isle{
static List<String> States = <String>[
'ndreas ',
'rbory ',
'allaug',
'radda',
'ride',
'astletown ',
'ouglas 2',
'erm',
'urby',
'axey ',
'Lezayre ',
'Lona',
'Malew ',
'Marown ',
'Maugho',
'Michael ',
'Onchan ',
'Patrick ',
'Peel ',
'Port Erin ',
'Port St Mary ',
'Ramsey ',
'Rushen ',
'Sant0',
];
}
class Israel{
static List<String> States = <String>[
'Hadarom',
'Haifa',
'Hamerkaz ',
'Hazafon',
'Jerusalem ',
'Tel Aviv ',
];
}
class Italy{
static List<String> States = <String>[
"Agrigento",
"Alessandria",
"Ancona",
"Aosta",
"Ascoli Piceno",
"L'Aquila",
"Arezzo",
"Asti",
"Avellino",
"Bari",
"Bergamo",
"Biella",
"Belluno",
"Benevento",
"Bologna",
"Brindisi",
"Brescia",
"Barletta-Andria-Trani",
"Bolzano",
"Cagliari",
"Campobasso",
"Caserta",
"Chieti",
"Carbonia-Iglesias",
"Caltanissetta",
"Cuneo",
"Como",
"Cremona",
"Cosenza",
"Catania",
"Catanzaro",
"Enna",
"Forlì-Cesena",
"Ferrara",
"Foggia",
"Florence",
"Fermo",
"Frosinone",
"Genoa",
"Gorizia",
"Grosseto",
"Imperia",
"Isernia",
"Crotone",
"Lecco",
"Lecce",
"Livorno",
"Lodi",
"Latina",
"Lucca",
"Monza and Brianza",
"Macerata",
"Messina",
"Milan",
"Mantua",
"Modena",
"Massa and Carrara",
"Matera",
"Naples",
"Novara",
"Nuoro",
"Ogliastra",
"Oristano",
"Olbia-Tempio",
"Palermo",
"Piacenza",
"Padua",
"Pescara",
"Perugia",
"Pisa",
"Pordenone",
"Prato",
"Parma",
"Pistoia",
"Pesaro and Urbino",
"Pavia",
"Potenza",
"Ravenna",
"Reggio Calabria",
"Reggio Emilia",
"Ragusa",
"Rieti",
"Rome",
"Rimini",
"Rovigo",
"Salerno",
"Siena",
"Sondrio",
"La Spezia",
"Syracuse",
"Sassari",
"Savona",
"Taranto",
"Teramo",
"Trento",
"Turin",
"Trapani",
"Terni",
"Trieste",
"Treviso",
"Udine",
"Varese",
"Verbano-Cusio-Ossola",
"Vercelli",
"Venice",
"Vicenza",
"Verona",
"Medio Campidano",
"Viterbo",
"Vibo Valentia",
];
}
class Jamaica{
static List<String> States = <String>[
'Westmoreland ',
'Trelawny',
'Saint Thomas',
'Saint Mary ',
'Saint James ',
'Saint Elizabeth ',
'Saint Catherine ',
'Parish of Saint Ann ',
'Saint Andrew ',
'Portland',
'Manchester ',
'Kingston',
'Parish of Hanover',
'Clarendon ',
];
}
class Japan{
static List<String> States = <String>[
'Tōkyō ',
'Kanagawa ',
'Ōsaka ',
'Aichi ',
'Chiba ',
'Hyōgo ',
'Saitama ',
'Hokkaidō ',
'Fukuoka ',
'Shizuoka ',
'Hiroshima ',
'Kyōto ',
'Ibaraki ',
'Miyagi ',
'Niigata ',
'Tochigi ',
'Nagano ',
'Okayama ',
'Gumma ',
'Mie ',
'Fukushima ',
'Gifu ',
'Yamaguchi ',
'Kagoshima ',
'Kumamoto ',
'Ehime ',
'Nagasaki ',
'Okinawa ',
'Aomori ',
'Nara ',
'Yamagata ',
'Ishikawa ',
'Ōita ',
'Iwate ',
'Shiga ',
'Toyama ',
'Miyazaki ',
'Akita ',
'Wakayama ',
'Fukui ',
'Kagawa ',
'Tokushima ',
'Saga ',
'Kōchi ',
'Shimane ',
'Yamanashi ',
'Tottori ',
];
}
class Jordan{
static List<String> States = <String>[
'Amman ',
'Aqaba ',
'Balqa ',
'Irbid ',
'Karak',
'Maan ',
'Mafraq ',
'Tafilah ',
'Zarqa',
];
}
class Kazakhstan{
static List<String> States = <String>[
'Almaty ',
'Aqmola',
'Aqtobe',
'Atyrau',
'East Kazakhstan ',
'Mangghystau',
'North Kazakhstan',
'Pavlodar',
'Qaraghandy ',
'Qostanay',
'Qyzylorda',
'South Kazakhstan',
'West Kazakhstan',
'Zhambyl',
];
}
class Kenya{
static List<String> States = <String>[
'Central',
'Coast ',
'Eastern ',
'Nairobi ',
'North Eastern',
'Nyanza ',
'Rift Valley ',
'Western',
];
}
class southKorea{
static List<String> States = <String>[
'Busan ',
'Chungcheongbuk Do ',
'Daegu',
'Daejeon',
'Gangwon Do ',
'Gwangju ',
'Gyeonggi Do ',
'Gyeongsangnam Do',
'Inch on Gwangyoksi ,Jeju ',
'Jeollabuk Do ',
'Kwangju Gwangyoksi',
'Seoul',
'Taegu Gwangyoksi ',
'Ulsan ',
];
}
class northKorea{
static List<String> States = <String>[
'Chagang',
'North Hamgyong',
'South Hamgyong',
'North Hwanghae ',
'South Hwangha',
'Kangwon',
'North Pyongan',
'South Pyongan',
'Ryanggang',
];
}
class Kuwait{
static List<String> States = <String>[
'Al Ahmadi',
'Al Jahrah',
'Al Kuwayt ',
'Hawalli ',
];
}
class Kyrgyzstan{
static List<String> States = <String>[
'Bishkek ',
'Jalal Abad ',
'Naryn ',
'Osh ',
'Talas ',
'Ysyk Kol ',
];
}
class Mexico{
static List<String> States = <String>[
"Aguascalientes",
"Baja California",
"Baja California Sur",
"Chihuahua",
"Colima",
"Campeche",
"Coahuila",
"Chiapas",
"Federal District",
"Durango",
"Guerrero",
"Guanajuato",
"Hidalgo",
"Jalisco",
"México State",
"Michoacán",
"Morelos",
"Nayarit",
"Nuevo León",
"Oaxaca",
"Puebla",
"Querétaro",
"Quintana Roo",
"Sinaloa",
"San Luis Potosí",
"Sonora",
"Tabasco",
"Tlaxcala",
"Tamaulipas",
"Veracruz",
"Yucatán",
"Zacatecas",
];
}
class Nigeria{
static List<String> NigeriaStates = <String>[
'Abia','Abuja', 'Adamawa' ,'AkwaIbom ' ,'Anambra',
'Bauchi', 'Bayelsa', 'Benue', 'Brono' ,'Cross River ',
'Delta' , 'Edo' 'Ebonyi' , 'Ekiti', 'Enugu', 'Gombe' , 'Imo',
'Jigawa', 'Kaduna' , 'Kano' , 'Katsina' , 'Kebbi' , 'Kogi',
'Kwara' , 'Lagos' , 'Niger' , 'Ogun' , 'Ondo' , 'Osun', 'Oyo',
'Nassarawa' , 'Plateau', 'Rivers' , 'Sokoto'
,'Taraba' , 'Yobe' , 'Zamfara'
];
}
class Laos{
static List<String> States = <String>[
'Attapu',
'Bokeo',
'Champasak ',
'Houaphan ',
'Khammouan ',
'Louang Namtha ',
'Louangphrabang ',
'Phongsali ',
'Sarava',
'Savannakhet',
'Vientiane',
'Xaignabouri',
'Xiangkhoang ',
];
}
class Latvia{
static List<String> States = <String>[
'Daugavpils ',
'Jelgava ',
'Latgale',
'Liepaja ',
'Riga ',
'Ventspils ',
];
}
class Lebanon{
static List<String> States = <String>[
'An Nabatiyah ',
'Beirut ',
'Mount Lebanon ',
'North Lebanon',
'South Lebanon ',
];
}
class Lesotho{
static List<String> States = <String>[
'Berea ',
'Leribe ',
'Mafeteng ',
'Maseru ',
'Mohale s Hoek ',
'Mokhotlong ',
'Quthing ',
];
}
class Liberia{
static List<String> States = <String>[
'Bong ',
'Grand Bassa ',
'Grand Cape Mount ',
'Grandgedeh ',
'Grandkru ',
'Lofa ',
'Margibi ',
'Maryland ',
'Montserrado ',
'Nimba ',
'River Cess ',
'Sinoe ',
];
}
class Liechtenstein{
static List<String> States = <String>[
'Schaan ',
'Vaduz ',
'Triesen ',
'Balzers ',
'Eschen ',
'Mauren ',
'Triesenberg ',
'Ruggell ',
'Gamprin ',
'Schellenberg ',
'Planken ',
];
}
class Lithuania{
static List<String> States = <String>[
'Vilniaus Apskritis ',
'Kauno Apskritis ',
'Panevėžio Apskritis ',
'Klaipėdos Apskritis ',
'Šiaulių Apskritis ',
'Telšių Apskritis ',
'Alytaus Apskritis ',
'Marijampolės Apskritis ',
'Tauragės Apskritis ',
'Utenos Apskritis ',
];
}
class Luxembourg{
static List<String> States = <String>[
'Diekirch','Grevenmacher','Luxembourg',
];
}
class Macao{
static List<String> States = <String>[
'Ilhas','Macau',
];
}
class Macedonia{
static List<String> States = <String>[
'Karpoš',
'Kumanovo ',
'Bitola ',
'Prilep ',
'Tetovo ',
'Veles ',
'Ohrid ',
'Gostivar ',
'Štip ',
'Strumica ',
'Kavadarci ',
'Struga ',
'Kočani ',
'Kičevo ',
'Lipkovo ',
'Želino ',
'Saraj ',
'Radoviš ',
'Tearce ',
'Zrnovci ',
'Kriva Palanka ',
'Gevgelija ',
'Negotino ',
'Sveti Nikole ',
'Studeničani ',
'Debar ',
'Negotino-Polosko ',
'Delčevo ',
'Resen ',
'Ilinden ',
'Brvenica ',
'Kamenjane ',
'Bogovinje ',
'Berovo ',
'Aračinovo ',
'Probištip ',
'Cegrane ',
'Bosilovo ',
'Vasilevo ',
'Zajas ',
'Valandovo ',
'Novo Selo ',
'Dolneni ',
'Oslomej ',
'Kratovo ',
'Dolna Banjica ',
'Sopište ',
'Rostusa ',
'Labunista ',
'Vrapčište ',
'Čučer-Sandevo ',
'Velesta ',
'Bogdanci ',
'Delogozdi ',
'Petrovec ',
'Sipkovica ',
'Dzepciste ',
'Makedonska Kamenica ',
'Jegunovce ',
'Demir Hisar ',
'Murtino ',
'Krivogaštani ',
'Makedonski Brod ',
'Oblesevo ',
'Bistrica ',
'Plasnica ',
'Demir Kapija ',
'Mogila ',
'Kuklis ',
'Orizari ',
'Staro Nagoričane ',
'Rosoman ',
'Rankovce ',
'Zelenikovo ',
'Karbinci ',
'Podares ',
'Gradsko ',
'Vratnica ',
'Srbinovo ',
'Konče ',
'Star Dojran ',
'Zletovo ',
'Drugovo ',
'Čaška ',
'Lozovo ',
'Belcista ',
'Topolcani ',
'Miravci ',
'Meseista ',
'Vevčani',
'Kukurecani ',
'Češinovo ',
'Novaci ',
'Zitose ',
'Sopotnica ',
'Dobrusevo ',
'Blatec ',
'Klecevce ',
'Samokov ',
'Lukovo ',
'Capari ',
'Kosel ',
'Vraneštica ',
'Bogomila ',
'Orasac ',
'Mavrovi Anovi ',
'Bac ',
'Vitoliste ',
'Konopiste ',
'Staravina ',
'Čair ',
'Šuto Orizari ',
'Centar ',
'Centar Župa ',
'Vrutok ',
'Kisela Voda ',
'Izvor ',
'Gazi Baba ',
'Kruševo ',
'Kondovo ',
'Pehčevo ',
'Vinica ',
];
}
class Madagascar{
static List<String> States = <String>[
'Antananarivo ',
'Antsiranana ',
'Fianarantsoa ',
'Mahajanga ',
'Toamasina ',
'Toliary ',
];
}
class Malawi{
static List<String> States = <String>[
'Blantyre ',
'Chiradzulu ',
'Chitipa ',
'Dedza ',
'Lilongwe ',
'Machinga ',
'Mangochi ',
'Mchinji ',
'Mulanje',
'Mwanza ',
'Mzimba ',
'Nkhata Bay ',
'Nkhotakota ',
'Nsanje ',
'Ntcheu ',
'Salima ',
'Zomba',
];
}
class Malaysia{
static List<String> States = <String>[
'Johor',
'Kedah',
'Kelantan',
'Perak',
'Selangor',
'Malacca',
'Negeri Sembilan',
'Pahang',
'Perlis',
'Penang',
' Labuan',
'Malaysia',
'Sabah',
'Sarawak',
'Terengganu',
];
}
class Maldives{
static List<String> States = <String>[
'Maale ',
'Seenu ',
'Faafu ',
'Gaafu Alifu ',
'Gaafu Dhaalu ',
'Gnaviyani ',
'Haa Alifu ',
'Haa Dhaalu ',
'Kaafu ',
'Laamu ',
'Lhaviyani ',
'Meemu ',
'Noonu ',
'Raa ',
'Shaviyani ',
'Thaa ',
'Baa ',
'Vaavu ',
'Dhaalu ',
];
}
class Mali{
static List<String> States = <String>[
'Bamako ',
'Gao ',
'Kayes ',
'Kidal',
'Mopti ',
'Segou ',
'Sikasso ',
'Timbuktu ',
];
}
class Malta{
static List<String> States = <String>[
'Malta',
];
}
class Martinique{
static List<String> States = <String>[
'Martinique',
];
}
class Mauritania{
static List<String> States = <String>[
'Adrar ',
'Assaba ',
'Brakn',
'Dakhlet Nouadhibou ',
'Guidimaka ',
'Hodh Ech Chargui ',
'Hodh El Gharbi ',
'Inchiri ',
'Nouakchott ',
'Tagant',
'Tiris Zemmour ',
'Trarza ',
];
}
class Mauritius{
static List<String> States = <String>[
'Plaines Wilhems ',
'Port Louis ',
'Flacq ',
'Rivière du Rempart ',
'Pamplemousses ',
'Grand Port ',
'Moka ',
'Savanne ',
'Black River ',
'Rodrigues ',
'Agalega Islands ',
];
}
class Mayotte{
static List<String> States = <String>[
'Acoua',
'Bandraboua ',
'Bandrele',
'Boueni',
'Chiconi',
'Chirongui',
'Dembeni ',
'Dzaoudzi ',
'Kani-Keli',
'Koungou ',
'Mamoudzou ',
'Mtsamboro',
'M Tsangamouji Ouangani',
'Pamandzi',
'Sada ',
'Tsingoni ',
];
}
class Micronesia{
static List<String> States = <String>[
'Yap',' Chuuk','Pohnpei','Kosrae',
];
}
class Miquelon{
static List<String> States = <String>[
'Miquelon-Langlade', 'Saint-Pierre',
];
}
class Moldova{
static List<String> States = <String>[
'Balti ',
'Bender ',
'Cahul ',
'Chisinau ',
'Transnistria',
];
}
class Monaco{
static List<String> States = <String>[
'La Condamine','Monaco','Monte-Carlo',
];
}
class Mongolia{
static List<String> States = <String>[
'Arhangay ',
'Bayan Olgiy ',
'Bayanhongor ',
'Bulgan ',
'Dornod ',
'Dornogovi ',
'Dundgovi ',
'Dzavhan',
'Govi Altay',
'Hentiy ',
'Hovd ',
'Hovsgol',
'Omnogovi ',
'Orhon',
'Ovorhangay ',
'Selenge ',
'Suhbaatar ',
'Tov ',
'Ulaanbaatar',
'Uvs',
];
}
class Montenegro{
static List<String> States = <String>[
'Cetinje',
'Danilovgrad',
'Nikšić',
'Podgorica',
'Tuzi',
'Bar',
'Budva',
'Herceg Novi',
'Kotor',
'Tivat',
'Ulcinj',
'Andrijevica ',
'Berane ',
'Bijelo Polje',
'Gusinje ',
'Kolašin',
'Mojkovac',
'Petnjica',
'Plav ',
'Plužine ',
'Pljevlja',
'Rožaje ',
'Šavnik ',
'Žabljak ',
];
}
class Montserrat{
static List<String> States = <String>[
'Saint Anthony','Saint Georges','Saint Peter',
];
}
class Morocco{
static List<String> States = <String>[
'Chaouia-Ouardigha ',
'Doukkala-Abda ',
'Fès-Boulemane ',
'Gharb-Chrarda-Beni Hssen ',
'Grand Casablanca ',
'Guelmim-Es Smara ',
'Laayoune Boujdour Sakia El Hamra ',
'Marrakech-Tensift-Al Haouz ',
'Meknès-Tafilalet ',
'Oriental ',
'Oued El Dahab',
'Rabat-Salé-Zemmour-Zaër ',
'Tadla-Azilal ',
'Tanger-Tétouan ',
'Taza-Al Hoceima-Taounate ',
];
}
class Mozambique{
static List<String> States = <String>[
'Cabo Delgado',
'Gaza ',
'Inhambane ',
'Manica ',
'Maputo ',
'Nampula ',
'Nassa ',
'Sofala',
'Tete ',
'Zambezia ',
];
}
class Namibia{
static List<String> States = <String>[
'Caprivi',
'Erongo ',
'Hardap ',
'Karas ',
'Kavango ',
'Khomas',
'Kunene',
'Ohangwena ',
'Omaheke',
'Oshana ',
'Oshikoto ',
'Otjozondjupa ',
];
}
class Nauru{
static List<String> States = <String>[
'Aiwo ',
'Anabar ',
'Anetan ',
'Anibare ',
'Baiti ',
'Boe ',
'Buada ',
'Denigomodu ',
'Ewa ',
'Ijuw ',
'Meneng ',
'Nibok ',
'Uaboe ',
'Yaren ',
];
}
class Nepal{
static List<String> States = <String>[
'Achham',
'Banke',
'Bhaktapur',
'Bhojpur ',
'Dhawalagiri ',
'Gorkha ',
'Janakpur ',
'Karnali ',
'Lumbini ',
'Mahakali ',
'Mechi ',
'Narayani',
'Rapti ',
'Sagarmatha',
];
}
class Netherlands{
static List<String> States = <String>[
'Drenthe ',
'Friesland ',
'Friesland',
'Gelderland ',
'Groningen ',
'Limburg ',
'North Brabant ',
'North Holland ',
'South Holland',
'Overijssel ',
'Utrecht ',
'Zeeland ',
];
}
class NetherlandsAntilles{
static List<String> States = <String>[
'Curaçao','Bonaire',' Aruba','Sint Maarten','Sint Eustatius','Saba',' Netherlands Antilles',
];
}
class Nevis{
static List<String> States = <String>[
'Saint George Basseterre ',
'Saint John Figtree ',
'Saint John Capisterr,e '
'Saint Anne Sandy Point ',
'Saint Thomas Middle Island ',
'Saint Mary Cayon ',
'Christ Church Nichola Town ',
'Saint Peter Basseterre ',
'Saint James Windward ',
'Saint George Gingerlan,d '
'Saint Thomas Lowland ',
'Saint Paul Capisterre, '
'Saint Paul Charlestown ',
'Trinity Palmetto Point ',
];
}
class NewCaledonia{
static List<String> States = <String>[
'South Province','North Province','Loyalty Islands Province',
];
}
class Zealand{
static List<String> States = <String>[
'Auckland ',
'Bay Of Plenty ',
'Canterbury ',
'Gisborne ',
'Manawatu Wanganui ',
'Marlborough ',
'Nelson ',
'Northland ',
'Otago ',
'Southland ',
'Taranaki',
'West Coast ',
];
}
class Nicaragua{
static List<String> States = <String>[
'Atlantico Norte ',
'Atlantico Sur ',
'Boaco ',
'Carazo ',
'Chinandega ',
'Chontales ',
'Esteli ',
'Granada ',
'Jinotega ',
'Leon ',
'Madriz ',
'Managua ',
'Masaya ',
'Matagalpa ',
'Nicaragua',
'Nueva Segovia ',
];
}
class Niger{
static List<String> States = <String>[
'Agadez',
'Diffa ',
'Dosso ',
'Maradi ',
'Niamey ',
'Tahoua ',
'Zinder',
];
}
class Myanmar{
static List<String> States = <String>[
'Kachin State ',
'Kayah State ',
'Kayin State ',
'Chin State ',
'Mon State ',
'Rakhine State ',
'Shan State ',
];
}
class NorthernMariana{
static List<String> States = <String>[
'Farallon de Pajaros (Urracas)',
'Maug Islands',
'Asuncion',
'Agrihan (Agrigan)',
'Pagan',
' Alamagan',
' Guguan',
'Zealandia Ban',
'Sarigan',
'Anatahan',
'Farallon de Medinilla',
'Saipan',
'Tinian',
'Aguijan',
'Rota',
];
}
class Norway{
static List<String> States = <String>[
'Akershus '
'Astfold '
'Aust Agder '
'Buskerud '
'Finnmark '
'Hedmark '
'Hordaland '
'More Og Romsdal '
'Nord Trondelag '
'Nordland '
'Oppland'
'Oslo '
'Rogaland '
'Sogn Og Fjordane '
'Sor Trondelag '
'Telemark '
'Troms '
'Vest Agder '
'Vestfold '
];
}
class Oman{
static List<String> States = <String>[
'Ad Dakhiliyah',
'Ad Dhahirah',
'Al Batinah North',
'Al Batinah South',
'Al Buraimi',
'Al Wusta',
'Ash Sharqiyah North',
'Ash Sharqiyah South',
'Dhofar',
'Muscat',
'Musandam',
];
}
class Pakistan{
static List<String> States = <String>[
'Azad Jammu and Kashmir',
'Balochistan',
'Gilgit-Baltistan ',
'Islamabad Capital Territory ',
'Khyber Pakhtunkhwa',
'Punjab ',
'Sindh',
];
}
class Palau{
static List<String> States = <String>[
'Kayangel State',
'Babeldaob',
'Aimeliik',
'Airai State',
'Melekeok',
'Ngaraard ',
'Ngarchelong',
'Ngardmau State',
'Ngeremlengui',
'Ngatpang ',
'Ngiwal ',
'Angaur ',
'Koror ',
'Peleliu ',
'Southwest Islands',
'Hatohobei',
'Sonsorol',
];
}
class Palestinian{
static List<String> States = <String>[
'Jenin',
'Tuba',
'Tulkarm ',
'Nablus',
'Qalqiliya ',
'Salfi',
'Ramallah & Al-Bireh ',
'Jericho & Al Aghwar',
'Jerusalem',
'Bethlehem',
'Hebron',
'North Gaza',
' Gaza',
'Deir Al-Balah',
'Khan Yunis',
'Rafah',
];
}
class Panama{
static List<String> States = <String>[
'Bocas Del Toro',
'Chiriqui ',
'Cocle ',
'Colon',
'Darien ',
'Herrera ',
'Kuna Yala ',
'Los Santos ',
'Panama ',
'Veraguas ',
];
}
class Papua{
static List<String> States = <String>[
'Central ',
'Chimbu ',
'East New Britain ',
'East Sepik',
'Eastern Highlands ',
'Enga ',
'Gulf ',
'Madang',
'Manus ',
'Milne Bay ',
'Morobe ',
'New Ireland ',
'North Solomons ',
'Northern ',
'Sandaun ',
'Southern Highlands ',
'West New Britain',
'Western Highlands',
];
}
class Paraguay{
static List<String> States = <String>[
'Alto Paraguay ',
'Alto Parana ',
'Amambay ',
'Asuncion ',
'Boqueron ',
'Caaguazu',
'Caazapa ',
'Canindeyu ',
'Concepcion ',
'Cordillera ',
'Guaira',
'Itapua ',
'Misiones ',
'Neembucu ',
'Paraguari ',
'Presidente Hayes ',
'San Pedro ',
];
}
class Peru{
static List<String> States = <String>[
'Amazonas ',
'Ancash ',
'Apurimac ',
'Arequipa ',
'Ayacucho',
'Cajamarca ',
'Callao ',
'Cusco ',
'Huancavelica ',
'Huanuco ',
'Ica ',
'Junin ',
'La Libertad ',
'Lambayeque ',
'Lima ',
'Loreto (',
'Madre De Dios ',
'Moquegua ',
'Pasco ',
'Piura',
'San Martin',
'Tacna ',
'Tumbes ',
'Ucayali ',
];
}
class Philippines{
static List<String> States = <String>[
'Agusan Del Norte ',
'Albay ',
'Batangas',
'Benguet ',
'Cagayan ',
'Camarines Sur ',
'Capiz ',
'Cebu ',
'Davao Del Norte ',
'Davao Del Sur ',
'Dinagat Islands ',
'Ilocos Norte',
'Ilocos Sur ',
'Iloilo ',
'Laguna ',
'Lanao Del Norte ',
'Leyte',
'Metropolitan Manila',
'Misamis Occidental ',
'Misamis Oriental ',
'Negros Occidental ',
'Nueva Ecija ',
'Palawan',
'Pampanga ',
'Pangasinan ',
'Samar ',
'Shariff Kabunsuan ',
'South Cotabato ',
'Tarlac ',
'Zambales ',
'Zamboanga Del Sur ',
];
}
class Pitcairn{
static List<String> States = <String>[
'Pitcairn',
];
}
class Poland{
static List<String> States = <String>[
'Greater Poland'
'Kuyavian Pomeranian '
'Lesser Poland '
'Lodz '
'Lower Silesian '
'Lublin '
'Lubusz '
'Masovian '
'Opole '
'Podlachian'
'Pomeranian '
'Silesian '
'Subcarpathian '
'Swietokrzyski'
'Warmian Masurian '
'West Pomeranian '
];
}
class Portugal{
static List<String> States = <String>[
'Aveiro ',
'Azores ',
'Beja',
'Braga ',
'Braganca ',
'Castelo Branco ',
'Coimbra',
'Evora ',
'Faro ',
'Guarda ',
'Leiria ',
'Lisboa ',
'Madeira ',
'Portalegre ',
'Porto ',
'Santarem ',
'Viana Do Castelo ',
'Vila Real',
'Viseu ',
];
}
class Principe{
static List<String> States = <String>[
'Príncipe','São Tomé',
];
}
class Rico {
static List<String> States = <String>[
'Aguirre ',
'Boquerón ',
'Cambalache',
'Carite',
'Ceiba ',
'Cerrillos',
'Guajataca ',
'Guánica Guánica',
'Los Tres',
'Maricao',
'Monte Choca',
'Piñones',
'Pueblo',
'Rio Abajo',
'San Patricio',
'Susúa',
'Toro Negro',
'Urbano del Nuevo Milenio',
'Vega',
];
}
class Qatar{
static List<String> States = <String>[
'Ad Dawḩah ',
'Al Khawr ',
'Al Jumaliyah ',
'Ar Rayyān ',
'Madinat ach Shama ',
'Umm Sa id ',
'Umm Şalāl ',
'Al Wakrah ',
'Al Wakrah Municipality ',
];
}
class Romania{
static List<String> States = <String>[
'Alba ',
'Arad ',
'Arges ',
'Bacau ',
'Bihor ',
'Bistrita Nasaud ',
'Botosani ',
'Braila ',
'Brasov',
'Bucharest',
'Buzau ',
'Calarasi ',
'Caras Severin',
'Cluj',
'Constanta ',
'Covasna ',
'Dambovita',
'Dolj',
'Galati ',
'Giurgiu',
'Gorj ',
'Harghita ',
'Hunedoara ',
'Ialomita ',
'Iasi ',
'Maramures ',
'Mehedinti',
'Mures ',
'Neamt ',
'Olt ',
'Prahov',
'Salaj',
'Satu Mare ',
'Sibiu ',
'Suceava ',
'Teleorman ',
'Timis ',
'Valcea ',
'Vaslui ',
'Vrance',
];
}
class Russia{
static List<String> States = <String>[
'Adyge',
'Aga Burya',
'Altay',
'Amur',
'Arkhangel sk',
'Astrakhan',
'Bashkortosta',
'Belgor',
'Bryan',
'Burya',
'Chechny',
'Chelyabinsk',
'Chita',
'Chukchi Autonomous Okrug ',
'Chuvas',
'City Of St. Petersbur',
'Dagesta',
'Even',
'Gorno Alta',
'Ingus',
'Irkutsk',
'Ivanov',
'Kabardin Balk',
'Kaliningr',
'Kalmy',
'Kalug',
'Kamchatk',
'Karachay Cherkess',
'Karelia',
'Kemerovo ',
'Khabarovsk ',
'Khakas',
'Khanty Mansiy ',
'Kirov',
'Komi',
'Komi Permyak',
'Koryak',
'Kostroma',
'Krasnodar ',
'Krasnoyarsk ',
'Kurgan',
'Kurs',
'Leningrad',
'Lipetsk',
'Maga Buryatdan',
'Mariy El',
'Mordovia',
'Moskovsskaya',
'Moskva',
'Murmansk ',
'Nenets',
'Nizhegorod',
'North Ossetia',
'Novgorod',
'Novosibirsk ',
'Omsk',
'Orel',
'Orenburg',
'Penza',
'Per',''
'Primorye' ,
'Pskov',
'Rostov ',
'Ryazan',
'Sakha (yakutia) ',
'Sakhalin ',
'Samara',
'Saratov',
'Smolensk',''
'Stavropol'',Sverdlovsk ',
'Tambov',
'Tatarstan',
'Taymyr ',
'Tomsk',
'Tula',
'Tuva',
'Tver',''
'Tyumen'',Udmurt',''
'Ul yanovsk',
'Ust Orda Buryat',
'Vladimir',
'Volgograd',
'Vologda',
'Voronezh',
'Yamal Nenets',''
'Yaroslavl'',Yevre',
];
}
class Rwanda{
static List<String> States = <String>[
'Eastern ',
'Kigali City ',
'Northern ',
'Southern',
'Western ',
];
}
class Helena{
static List<String> States = <String>[
'Ascension ',
'Saint Helena ',
'Tristan da Cunha ',
];
}
class Kitts{
static List<String> States = <String>[
'Saint George Basseterre ',
'Saint John Figtree ',
'Saint John Capisterre ',
'Saint Anne Sandy Point ',
'Saint Thomas Middle Island ',
'Saint Mary Cayon ',
'Christ Church Nichola Town ',
'Saint Peter Basseterre ',
'Saint James Windward ',
'Saint George Gingerland ',
'Saint Thomas Lowland ',
'Saint Paul Capisterre ',
'Saint Paul Charlestown ',
'Trinity Palmetto Point ',
];
}
class Lucia{
static List<String> States = <String>[
'Castries ',
'Vieux-Fort ',
'Micoud ',
'Gros-Islet ',
'Dennery ',
'Soufrière ',
'Laborie ',
'Anse-la-Raye ',
'Choiseul ',
'Dauphin ',
'Praslin ',
];
}
class Pierre{
static List<String> States = <String>[
'Miquelon-Langlade','Saint-Pierre',
];
}
class Turkey{
static List<String> States = <String>[
'Adana '
'Adiyaman '
'Afyon '
'Agri '
'Amasya '
'Ankara '
'Antalya '
'Artvin '
'Aydin'
'Balikesir'
'Batman '
'Bilecik'
'Bingol '
'Bitlis '
'Bolu '
'Burdur '
'Bursa'
'Canakkale'
'Cankiri '
'Corum'
'Denizli '
'Diyarbakir '
'Edirne '
'Elazig '
'Erzincan '
'Erzurum '
'Eskisehir'
'Gaziantep'
'Giresun '
'Gumushane '
'Hakkari'
'Hatay '
'Isparta '
'Istanbul '
'Izmir '
'K. Maras '
'Karaman '
'Kars '
'Kastamonu '
'Kayseri '
'Kinkkale '
'Kirklareli '
'Kirsehir'
'Kocaeli '
'Konya '
'Kutahya '
'Malatya '
'Manisa '
'Mardin '
'Mersin '
'Mugla '
'Mus '
'Nevsehir '
'Nigde '
'Ordu'
'Rize '
'Sakarya '
'Samsun '
'Sanliurfa '
'Siirt '
'Sinop'
'Sivas '
'Tekirdag '
'Tokat '
'Trabzon '
'Tunceli'
'Usak'
'Van '
'Yozgat '
'Zinguldak'
];
}
class Samoa{
static List<String> States = <String>[
'Aiga-i-le-Tai ',
'Atua ',
'Fa ',
'Gaga ',
'Gagaifomauga ',
'Palauli ',
'Satupa ',
'Tuamasaga ',
'Va ',
'Vaisigano ',
];
}
class SanMarino{
static List<String> States = <String>[
'Serravalle ',
'San Marino ',
'Acquaviva ',
'Chiesanuova ',
'Domagnano ',
'Faetano ',
'Fiorentino ',
'Borgo Maggiore ',
];
}
class Sao{
static List<String> States = <String>[
'Água Grande','Cantagalo',' Caué','Lembá',' Lobata','Mé-Zóchi','Autonomous Region of Príncipe',
];
}
class Saudi{
static List<String> States = <String>[
'Al Hudud Ash Shamaliyah ',
'Al Jawf ',
'Al Madinah',
'Al Quassim ',
'Ar Riyad ',
'Ash Sharqiyah',
'Asir ',''
'Ha il ',
'Jizan',
'Makkah ',
'Najran',
'Tabuk',
];
}
class Senegal{
static List<String> States = <String>[
'Dakar ',
'Diourbel ',
'Fatick',
'Kaolack ',
'Kolda ',
'Louga ',
'Matam ',
'Tambacounda ',
'Thies',
'Ziguinchor ',
];
}
class Serbia{
static List<String> States = <String>[
'Grad Beograd ',
'Juzno Backi',
'Moravicki ',
'Nisavski',
'Severno B,acki '
'Srednje Banatsk,i'
'Sumadijski ',
];
}
class Seychelles{
static List<String> States = <String>[
'Beau Vallon ',
'Anse Boileau ',
'Anse Etoile ',
'Anse Louis ',
'Anse Royale ',
'Baie Lazare ',
'Baie Sainte Anne ',
'Bel Air ',
'Bel Ombre ',
'Cascade ',
'Glacis ',''
'Grand Anse ',
'La Digue ',
'La Riviere Anglaise ',
'Mont Buxton ',
'Mont Fleuri ',
'Plaisance ',
'Pointe La Rue ',
'Port Glaud ',
'Saint Louis ',
'Anse aux Pins ',
'Takamaka ',
];
}
class Sieere{
static List<String> States = <String>[
'Kailahun',
'Kenema',
'Kono',
'Bombali',
'Kambia',
'Koinadugu',
'Port Loko',
'Tonkolili',
' Bo',
'Bonthe',
'Moyamba',
'Pujehun',
''
'Western Area Rural ',
'Western Area Urban (Freetown) ',
];
}
class Singapore{
static List<String> States = <String>[
'Central Region','East Region','North Region','North-East Region',
];
}
class Slovakia{
static List<String> States = <String>[
'Banskobystricky ',
'Bratislavsky ',
'Kosicky ',
'Presov ',
'Trnavsky ',
'Zilinsky ',
];
}
class SouthAfrica{
static List<String> States = <String>[
'Eastern Cape ',
'Gauteng',
'Kwazulu Natal',
'Limpopo',
'Mpumalanga',
'North West',
'Northern Cape ',
'Orange Free State',
'Western Cape ',
];
}
class Slovenia{
static List<String> States = <String>[
'Slovenia',
];
}
class SolomonIslands{
static List<String> States = <String>[
'Choiseul ','Guadalcanal','Temotu ',
];
}
class Somalia{
static List<String> States = <String>[
'Bakool',
'Banaadir',
'Bari',
'Bay',
'Galguduu',
'Gedo',
'Hiiraan',
'Jubbada Dhexe',
'Jubbada Hoose ',
'Mudu',
'Nugaal',
'Shabeellaha Dhexe',
'Shabeellaha Hoose',
];
}
class Spain{
static List<String> States = <String>[
'Álava',' Albacete','Alicante','Almería','Asturias',' Ávila','Badajoz','Balearic Islands',
'Barcelona','Biscay;','Burgos','Cáceres',' Cádiz','Cantabria','Castellón;',
'Ciudad Real','Córdoba','Cuenca',' Gipuzkoa','Girona',' Granada','Guadalajara',
'Huelva','Huesca',' Jaén','La Rioja','Las Palmas',' León',' Lleida','Lugo',
'Madrid',' Málaga',' Murcia','Navarre','Ourense ','Palencia','Pontevedra',
' Salamanca','Santa Cruz de Tenerife','Segovia',' Seville',' Soria','Tarragona',
'Teruel','Toledo','Valencia;','Valladolid','Zamora',' Zaragoza',
];
}
class SriLanka{
static List<String> States = <String>[
'Anuradhapura '
'Badulla'
'Batticaloa '
'Colombo '
'Galle '
'Jaffna '
'Kandy '
'Kilinochchi '
'Matara'
'Puttalam '
'Ratnapura '
'Trincomalee '
];
}
class Sudan{
static List<String> States = <String>[
'Khartoum',
'North Kordofan',
'Northern',
'Kassala',
'Blue Nile',
'North Darfur',
'South Darfur',
'South Kordofan',
'Al Jazirah',
'White Nile',
'River Nile',
'Red Sea',
'Al Qadarif',
'Sennar',
'West Darfur',
'Central Darfur',
'East Darfur',
'West Kordofan',
];
}
class Suriname{
static List<String> States = <String>[
];
}
class Swaziland{
static List<String> States = <String>[
'Hhohho',
'Lubombo ',
'Manzini',
'Shiselweni ',
];
}
class Sweden{
static List<String> States = <String>[
'Ångermanland'
'Blekinge'
'Bohuslän'
'Dalarna'
'Dalsland'
'Gotland'
'Gästrikland'
'Halland'
'Hälsingland'
'Härjedalen'
'Jämtland'
'Lappland'
'Medelpad'
'Norrbotten'
'Närke'
'Öland'
'Östergötland'
'Skåne'
'Småland'
'Södermanland'
'Uppland'
'Värmland'
'Västmanland'
'Västerbotten'
'Västergötland'
];
}
class Switzerland{
static List<String> States = <String>[
'Aarga',
'Appenzell Ausserrhoden ',
'Appenzell Innerrhoden',
'Basel Landschaft ',
'Basel Stadt ',
'Ber',
'Fribourg ',
'Geneve ',
'Glarus ',
'Graubunden ',
'Jura ',
'Lucerne ',
'Neuchatel ',
'Nidwalden ',
'Obwalden ',
'Sankt Gallen ',
'Schaffhausen ',
'Schwyz ',
'Solothurn',
'Thurgau ',
'Ticino ',
'Uri ',
'Valais ',
'Vaud ',
'Zug ',
'Zurich',
];
}
class Syria{
static List<String> States = <String>[
'Aleppo (halab) ',
'Ar Raqqah',
'As Suwayda'' ,Damascus',
'Dara ',
'Dayr Az Zawr',
'Golan ',
'Hamah',
'Hasaka (al Haksa) ',
'Homs (hims) ',
'Idlib ',
'Lattakia (al Ladhiqiyah',
'Tartus ',
];
}
class USA{
static List<String> States = <String>[
'Indiana ',
'Utah ',
'Oklahoma ',
'Arizona ',
'Missouri ',
'Tennessee ',
'West Virginia ',
'Virginia ',
'South Carolina ',
'Kentucky ',
'Colorado ',
'Mississippi ',
'Nebraska ',
'Arkansas ',
'Alabama',
'California',
'Idaho',
'Minnesota',
'Georgia (U.S. state)',
'Wyoming',
'South Dakota',
'Louisiana',
'Ohio',
'New Mexico',
'Montana',
'Nevada',
'North Dakota',
'Wisconsin',
'Oregon',
'Texas',
'Alaska',
'New Jersey',
'Iowa',
'Kansas',
'North Carolina',
'Massachusetts',
'Florida, Un',
'Illinois',
'Hawaii',
'Connecticut',
'Vermont',
'Delaware',
];
}
class Tawian{
static List<String> States = <String>[
'Changhua ',
'Chiayi',
'Chiayi City ',
'Hsinchu city',
'Hsinchu City',
'Hualien ',
'Kaohsiung City ',
'Keelung City ',
'Nantou ',
'New Taipei City',
'Penghu ',
'Pingtung ',
'Taichung City',
'Tainan City ',
'Taipei City ',
'Taitung',
'Taoyuan',
'Yilan',
'Yunlin',
];
}
class Tobago{
static List<String> States = <String>[
'San Fernando',
'Caroni',
'Saint George',
'Arima',
'Saint Patrick',
'Saint Andrew',
'Victoria',
'Tobago',
'Nariva',
'Saint David',
'Port-of-Spain',
'Mayaro',
];
}
class Togo{
static List<String> States = <String>[
'Centrale ',
'Kara ',
'Maritime ',
'Plateaux ',
'Savanes ',
];
}
class Vincent{
static List<String> States = <String>[
'Parish of Saint Patrick','Parish of Saint George','Parish of Saint David',
' Parish of Saint Andrew','Grenadines','Parish of Charlotte',
];
}
class Tajikistan{
static List<String> States = <String>[
'Gorno Badakhshan',
'Khatlon ',
'Leninabad ',
'Tadzhikistan Territories ',
];
}
class Tanzania{
static List<String> States = <String>[
'Arusha ',
'Dar Es Salaam ',
'Dodoma',
'Iringa ',
'Kagera ',
'Kaskazini Pemb',
'Kaskazini Unguja ',
'Kigoma ',
'Kilimanjaro ',
'Kusini Pemba ',
'Lindi ',
'Mara ',
'Mbeya ',
'Morogoro ',
'Mtwara ',
'Mwanza ',
'Pwani',
'Rukwa ',
'Ruvuma',
'Shinyanga ',
'Singida ',
'Tabora ',
'Tanga',
'Zanzibar West ',
];
}
class Tokelau{
static List<String> States = <String>[
'Atafu','Nukunonu','Fakaofo',
];
}
class Tonga{
static List<String> States = <String>[
'Vava','Tongatapu','Ha',
];
}
class Trinidad{
static List<String> States = <String>[
'San Juan–Laventille','Borough of Arima','Couva-Tabaquite-Talparo','Tobago',
'Tunapuna–Piarco','Penal–Debe','Siparia''Port of Spain','Rio Claro–Mayaro','Diego Martin region',
'Siparia region','Princes Town region','Mayaro-Rio Claro',' City of San Fernando',
'Penal–Debe','Sangre Grande region','Borough of Chaguanas','Sangre Grande region',
];
}
class Thailand{
static List<String> States = <String>[
'Ang Thong ',
'Bangkok Metropolis ',
'Buri Ram',
'Chachoengsao ',
'Chai Nat ',
'Chaiyaphum',
'Chanthaburi ',
'Chiang Mai',
'Chiang Rai ',
'Chon Buri ',
'Chumphon ',
'Kalasin ',
'Kamphaeng Phet ',
'Kanchanaburi ',
'Khon Kaen ',
'Krabi ',
'Lampang ',
'Lamphun ',
'Loei ',
'Lop Buri ',
'Mae Hong Son ',
'Maha Sarakham ',
'Nakhon Nayok ',
'Nakhon Pathom ',
'Nakhon Phano',
'Nakhon Ratchasima ',
'Nakhon Sawan ',
'Nakhon Si Thammarat ',
'Nan ',
'Narathiwat ',
'Nong Khai',
'Nonthaburi ',
'Pathum Thani ',
'Pattani ',
'Phangnga ',
'Phatthalung',
'Phayao ',
'Phetchabun ',
'Phetchaburi',
'Phichit ',
'Phitsanulok',
'Phra Nakhon Si Ayutthaya ',
'Phrae ',
'Phuket',
'Prachin Buri',
'Prachuap Khiri Khan ',
'Ranong ',
'Ratchaburi ',
'Rayong ',
'Roi E',
'Sa Kaeo ',
'Sakon Nakhon ',
'Samut Prakan ',
'Samut Sa',
'Samut Songkhram ',
'Saraburi ',
'Satun ',
'Si Sa Ket ',
'Sing Bur',
'Songkhla ',
'Songkhla (songkhla Lake) ',
'Sukhothai',
'Suphan Buri ',
'Surat Than',
'Surin ',
'Tak ',
'Trang ',
'Trat ',
'Ubon Ratchathani ',
'Udon Thani',
'Uthai Thani',
'Uttaradit ',
'Yala ',
'Yasothon ',
];
}
class Tunisia{
static List<String> States = <String>[
'Beja ',
'Bizerte ',
'Gabes ',
'Gafsa ',
'Jendouba ',
'Kairouan ',
'Kasserine',
'Kebili ',
'Le Kef ',
'Mahdia ',
'Manubah ',
'Medenin',
'Monastir ',
'Nabeul',
'Sfax ',
'Sidi Bou Zid ',
'Silian',
'Sousse ',
'Tataouine ',
'Tozeur ',
'Tunis',
'Zaghouan ',
];
}
class Turkeys{
static List<String> States = <String>[
'Adana ',
'Adiyaman ',
'Afyon ',
'Agri ',
'Amasya ',
'Ankara ',
'Antalya ',
'Artvin ',
'Aydin',
'Balikesir',
'Batman ',
'Bilecik',
'Bingol ',
'Bitlis ',
'Bolu ',
'Burdur ',
'Bursa',
'Canakkale',
'Cankiri ',
'Corum',
'Denizli ',
'Diyarbakir ',
'Edirne ',
'Elazig ',
'Erzincan ',
'Erzurum ',
'Eskisehir',
'Gaziantep',
'Giresun ',
'Gumushane ',
'Hakkari',
'Hatay ',
'Isparta ',
'Istanbul ',
'Izmir ',
'K. Maras ',
'Karaman ',
'Kars ',
'Kastamonu '
'Kayseri '
'Kinkkale '
'Kirklareli '
'Kirsehir'
'Kocaeli '
'Konya '
'Kutahya '
'Malatya '
'Manisa '
'Mardin '
'Mersin '
'Mugla '
'Mus '
'Nevsehir '
'Nigde '
'Ordu'
'Rize '
'Sakarya '
'Samsun '
'Sanliurfa '
'Siirt '
'Sinop'
'Sivas '
'Tekirdag '
'Tokat '
'Trabzon '
'Tunceli'
'Usak'
'Van '
'Yozgat '
'Zinguldak '
];
}
class Turkmenistan{
static List<String> States = <String>[
'Ashgabat','Ahal Region','Balkan Region ','Daşoguz Region','Lebap Region ','Mary Region'
];
}
class Turks{
static List<String> States = <String>[
'Grand Turk',' Salt Cay',
];
}
class Tuvalu{
static List<String> States = <String>[
'Funafuti','Nanumea','Nui','Nukufetau','Nukulaelae','Vaitupu','Nanumanga','Niulakita',
'Niutao','Tuvalu',
];
}
class Uganda{
static List<String> States = <String>[
'Adjumani ',
'Arua Municipality ',
'Aswa ',
' Bamunanika',
' Budadiri',
'Bungokho ',
'Busia ',
'Busujju ',
'Iganga ',
'Jinja',
'Kaabong ',
'Kabale ',
'Kabarole ',
'Kaberamaido ',
'Kalangala ',
'Kampala ',
'Kamuli ',
'Kasese ',
'Kashari ',
'Kayunga ',
'Kibale ',
'Kiboga ',
'Kisoro ',
'Kitgum ',
'Kumi ',
'Lira ',
'Masaka ',
'Masindi ',
'Moroto ',
'Moyo ',
'Mpigi ',
'Mubende ',
'Nakasongola ',
'Nebbi ',
'Ntungamo ',
'Pallisa',
'Soroti',
'Tororo',
'Usuk ',
'Wakiso ',
];
}
class Ukraine{
static List<String> States = <String>[
'Čėrkasy',
'Cherkasy',
'SeparateSet',
'Čėrnihiv',
'Čėrnivcy',
'Charkiv',
'Chėrson',
'Chmel nyckyj',
'Dnipropėtrovsk',
'Donėc k',
'Ivano-Frankivs k',
'Kirovohrad',
'Krym',
'Kyïv',
'Kyïv',
'Luhans k',
'L viv',
'Mykolaïv',
'Odėsa',
'Poltava',
'Rivnė RIV Prov',
'Sumy',
'Tėrnopil',
'Vinnycja',
'Volyn',
'Zakarpattja',
'Zaporižžija',
'Žytomyr',
];
}
class Uk{
static List<String> States = <String>[
'Aberdeen ',
'Bath And North East Somerset',
'Belfast ',
'Bournemouth ',
'Brighton And Hove ',
'Bristol ',
'Cambridgeshire',
'Cardiff',
'Cheshire ',
'Cornwall ',
'Cumbria ',
'Derry ',
'Devon ',
'Dumfries And Galloway ',
'Dundee ',
'Dungannon ',
'Edinburgh ',
'Glasgow ',
'Highland ',
'Inverclyde ',
'Kent',
'Kingston Upon Hull',
'Lancashire ',
'Leicester ',
'London',
'Luton ',
'Manchester ',
'Merseyside ',
'Moray ',
'Norfolk',
'North Yorkshire ',
'Nottingham ',
'Omagh ',
'Oxfordshire ',
'Perthshire And Kinross ',
'Peterborough ',
'Plymouth ',
'Portsmouth ',
'South Ayrshir',
'South Yorkshire ',
'Southampton ',
'Southend On Sea',
'Stockton On Tees ',
'Stoke On Trent ',
'Suffolk',
'Swansea',
'Tyne And Wear ',
'West Midlands ',
'West Yorkshire ',
'Westminster ',
'York ',
];
}
class Uruguay{
static List<String> States = <String>[
'Artigas ',
'Canelones ',
'Cerro Largo ',
'Colonia ',
'Durazno ',
'Flores ',
'Florida ',
'Lavalleja ',
'Maldonado ',
'Montevideo ',
'Paysandu',
'Rio Negro ',
'Rivera ',
'Rocha',
'Salto',
'San Jose',
'Soriano ',
'Tacuarembo ',
'Treinta Y Tres ',
];
}
class Uzbekistan{
static List<String> States = <String>[
'Andijon ',
'Bukhoro ',
'Ferghana ',
'Jizzakh ',
'Karakalpakstan',
'Kashkadarya ',
'Khorezm ',
'Namangan ',
'Navoi ',
'Samarkand ',
'Sirdaryo ',
'Surkhandarya ',
'Tashkent ',
];
}
class Vanuatu{
static List<String> States = <String>[
' Tafea','Shefa','Malampa','Sanma,'
];
}
class Venezuela{
static List<String> States = <String>[
'Amazonas ',
'Anzoategui ',
'Apure ',
'Aragua',
'Barinas',
'Bolivar ',
'Carabobo ',
'Cojedes ',
'Distrito Capital ',
'Falcon ',
'Guarico ',
'Lara ',
'Merida ',
'Miranda ',
'Monagas ',
'Nueva Esparta',
'Portuguesa ',
'Sucre ',
'Tachira ',
'Trujillo',
'Vargas',
'Yaracuy ',
'Zulia ',
];
}
class Vietnam{
static List<String> States = <String>[
'An Giang ',
'Ba Riavung Tau ',
'Bac Kan',
'Bc Giang ',
'Bc Lieu ',
'Ben Tr',
'Binh Duong ',
'Binh Ninh ',
'Binh Phuoc ',
'Binh Thua',
'Ca Mau ',
'Can Tho ',
'Cao Bang ',
'Da Nang ',
'Dak Lak ',
'Dien Bien ',
'Dong Thap ',
'Gia Lai ',
'Ha Giang ',
'Ha Tay ',
'Ha Tinh',
'Hai Duong ',
'Ho Chi Minh City ',
'Hoa Binh ',
'Khanh Hoa ',
'Kien Giang ',
'Kon Tum ',
'Lam Ng ',
'Lang Son',
'Lao Cai ',
'Long An',
'Nam Dinh ',
'Ng Nai ',
'Nghe An',
'Ninh Binh ',
'Ninh Thuan ',
'Phu Tho ',
'Phu Yen ',
'Quang Binh ',
'Quang Ngai ',
'Quang Ninh',
'Quang Tri',
'Soc Trang ',
'Son La ',
'Tay Ninh ',
'Thai Binh ',
'Thai Nguyen ',
'Thanh Hoa',
'Thua Thien�hu ',
'Tin Giang ',
'Tra Vinh ',
'Tuyen Quang',
'Vinh Lon',
'Yen Bai ',
];
}
class Wallis{
static List<String> States = <String>[
'Hihifo','Hahake','Mua',' Alo','Sigave',
];
}
class Yemen{
static List<String> States = <String>[
'Adan',
'Al Bayda'',Al Hudaydah ',
'Al Mahrah',
'Amanat Al Asimah',
'Dhama',
'Hadramawt ',
'Hajjah ',
'Ibb ',
'Lahij ',''
'Ma rib ',
'Sadah ',
'Shabwah ',
'Taizz ',
];
}
class Zambia{
static List<String> States = <String>[
'Central ',
'Copperbelt ',
'Eastern ',
'Luapula ',
'Lusaka ',
'North Western',
'Northern',
'Southern ',
'Western ',
];
}
class Zimbabwe{
static List<String> States = <String>[
'Bulawayo ',
'Harare ',
'Manicaland',
'Mashonaland Central ',
'Mashonaland West ',
'Masvingo ',
'Masvingo',
'Matabeleland North',
'Matabeleland South',
'Midlands ',
];
}
class Arab{
static List<String> States = <String>[
'Abu Dhabi',
'Dubay ',
'Fujayrah ',
'Ras Al Khaymah ',
'Sharjah ',
'Umm Al Qaywayn ',
];
}
| 18.376747 | 175 | 0.524792 |
505d260c276a6876965c1acfcb41c774bf4574a7 | 5,723 | go | Go | egroot/src/fmt/printer.go | prattmic/emgo | 98787abe427967ebaa1f7468aaf1a3dbe852b542 | [
"BSD-3-Clause"
] | null | null | null | egroot/src/fmt/printer.go | prattmic/emgo | 98787abe427967ebaa1f7468aaf1a3dbe852b542 | [
"BSD-3-Clause"
] | null | null | null | egroot/src/fmt/printer.go | prattmic/emgo | 98787abe427967ebaa1f7468aaf1a3dbe852b542 | [
"BSD-3-Clause"
] | null | null | null | package fmt
import (
"io"
"reflect"
"strconv"
"strings"
)
type wpf struct {
width int16
prec int16
flags string
}
func (wpf *wpf) parse(flags string) {
if len(flags) == 0 {
wpf.width = -2
wpf.prec = -2
wpf.flags = ""
return
}
i := 0
for ; i < len(flags); i++ {
c := flags[i]
if c >= '1' && c <= '9' || c == '.' {
break
}
}
wpf.flags = flags[:i]
if i == len(flags) {
return
}
flags = flags[i:]
for i = 0; i < len(flags); i++ {
if flags[i] == '.' {
break
}
}
if i > 0 {
width, _ := strconv.ParseStringUint32(flags[:i], 10)
wpf.width = int16(width)
}
if i >= len(flags)-1 {
return
}
prec, _ := strconv.ParseStringUint32(flags[i+1:], 10)
wpf.prec = int16(prec)
return
}
func (wpf *wpf) Width() (int, bool) {
set := (wpf.width != -2)
if set {
return int(wpf.width), set
}
return 0, set
}
func (wpf *wpf) Precision() (int, bool) {
set := (wpf.prec != -2)
if set {
return int(wpf.prec), set
}
return 6, set
}
func (wpf *wpf) Flag(c int) bool {
return strings.IndexByte(wpf.flags, byte(c)) != -1
}
type writer struct {
w io.Writer
err error
n int
}
func (w *writer) Write(b []byte) (int, error) {
if w.err != nil {
return 0, w.err
}
var n int
n, w.err = w.w.Write(b)
w.n += n
return n, w.err
}
func (w *writer) WriteString(s string) (int, error) {
if w.err != nil {
return 0, w.err
}
var n int
// io.WriteString uses WriteString method if w.w implements it.
n, w.err = io.WriteString(w.w, s)
w.n += n
return n, w.err
}
func (w *writer) WriteByte(b byte) error {
w.Write([]byte{b})
return w.err
}
// printer implements State interface.
// Value of type printer is small enough to be be assigned to interface type.
type printer struct {
*writer
wpf
}
func (p *printer) Ferr(verb byte, info string, a interface{}) {
if a == nil {
a = ""
}
p.WriteString("%!")
if verb != 0 {
p.WriteByte(verb)
}
p.WriteByte('(')
p.WriteString(info)
p.parse("")
p.format('v', a)
p.WriteByte(')')
}
func (p *printer) badVerb(verb byte, v reflect.Value) {
p.WriteString("%!")
p.WriteByte(verb)
p.WriteByte('(')
p.WriteString(v.Type().String())
p.WriteByte('=')
p.formatValue('v', v)
p.WriteByte(')')
}
func (p *printer) format(verb byte, i interface{}) {
if verb != 'T' && verb != 'p' {
if f, ok := i.(Formatter); ok {
f.Format(p, rune(verb))
return
}
}
switch verb {
case 'T':
i = reflect.TypeOf(i).String()
case 'v', 's', 'q': // Do not follow original rule in case of x and X.
switch f := i.(type) {
case error:
i = f.Error()
case Stringer:
i = f.String()
}
}
if i == nil {
i = "<nil>"
}
p.formatValue(verb, reflect.ValueOf(i))
}
func (p *printer) tryFormatAsInterface(verb byte, v reflect.Value) {
if i := v.Interface(); i != nil || !v.IsValid() {
p.format(verb, i)
} else {
p.formatValue(verb, v)
}
}
func (p *printer) formatValue(verb byte, v reflect.Value) {
width, _ := p.Width()
if p.Flag('-') {
width = -width
}
pad := ' '
if p.Flag('0') {
pad = '0'
}
k := v.Kind()
switch {
case k == reflect.Array || k == reflect.Slice:
if verb == 's' && k == reflect.Slice {
if b, ok := v.Interface().([]byte); ok {
strconv.WriteBytes(p, b, width, pad)
break
}
}
p.WriteByte('[')
n := v.Len()
for i := 0; i < n; i++ {
if i > 0 {
p.WriteByte(' ')
}
p.tryFormatAsInterface(verb, v.Index(i))
}
p.WriteByte(']')
case k == reflect.Invalid:
p.WriteString("<invalid>")
case k == reflect.Bool:
strconv.WriteBool(p, v.Bool(), 't', width, pad)
case k <= reflect.Uintptr:
p.formatIntVal(v, width, verb, pad)
case k <= reflect.Float64:
p.formatFloatVal(v, width, verb, pad)
case k <= reflect.Complex128:
c := v.Complex()
p.WriteByte('(')
p.formatFloatVal(reflect.ValueOf(real(c)), width, verb, pad)
if imag(c) >= 0 {
p.WriteByte('+')
}
p.formatFloatVal(reflect.ValueOf(imag(c)), width, verb, pad)
p.WriteString("i)")
case k <= reflect.Func || k == reflect.Ptr || k == reflect.UnsafePointer:
ptr := v.Pointer()
if verb != 'v' {
p.formatIntVal(reflect.ValueOf(ptr), width, verb, pad)
break
}
if ptr == 0 {
p.WriteString("<nil>")
} else {
p.WriteString("0x")
strconv.WriteUintptr(p, ptr, 16, 0, pad)
}
case k == reflect.String:
strconv.WriteString(p, v.String(), width, pad)
case k == reflect.Struct:
p.WriteByte('{')
p.WriteString("TODO")
p.WriteByte('}')
default:
p.WriteString("<!not supported>")
}
}
func (p *printer) formatIntVal(v reflect.Value, width int, verb byte, pad rune) {
k := v.Kind()
base := 10
switch verb {
case 'v', 'd':
base = 10
case 'x':
base = 16
case 'X':
base = -16
case 'b':
base = 2
case 'o':
base = 8
case 'c':
if k <= reflect.Int64 {
p.WriteByte(byte(v.Int()))
} else {
p.WriteByte(byte(v.Uint()))
}
return
default:
p.badVerb(verb, v)
}
switch {
case k == reflect.Int:
strconv.WriteInt(p, int(v.Int()), base, width, pad)
case k <= reflect.Int32:
strconv.WriteInt32(p, int32(v.Int()), base, width, pad)
case k == reflect.Int64:
strconv.WriteInt64(p, v.Int(), base, width, pad)
case k == reflect.Uint:
strconv.WriteUint(p, uint(v.Uint()), base, width, pad)
case k <= reflect.Uint32:
strconv.WriteUint32(p, uint32(v.Uint()), base, width, pad)
case k == reflect.Uint64:
strconv.WriteUint64(p, v.Uint(), base, width, pad)
default:
strconv.WriteUintptr(p, uintptr(v.Uint()), base, width, pad)
}
}
func (p *printer) formatFloatVal(v reflect.Value, width int, verb byte, pad rune) {
bits := 32
if v.Kind() == reflect.Float64 {
bits = 64
}
prec, _ := p.Precision()
fmt := int(verb)
if fmt == 'v' {
fmt = 'g'
}
strconv.WriteFloat(p, v.Float(), fmt, prec, bits, width, pad)
}
| 19.802768 | 83 | 0.590599 |
40308b8144eaa3de8ebff0ffca8cdce19e9ebc66 | 12,882 | py | Python | salt/modules/mac_softwareupdate.py | alexjennings/salt | 921cfe1fe40f37471ebb58fa6577d72b0d6b77d1 | [
"Apache-2.0"
] | 2 | 2015-09-21T14:13:30.000Z | 2016-02-12T11:33:46.000Z | salt/modules/mac_softwareupdate.py | alexjennings/salt | 921cfe1fe40f37471ebb58fa6577d72b0d6b77d1 | [
"Apache-2.0"
] | 1 | 2019-09-06T13:57:28.000Z | 2019-09-06T13:57:28.000Z | salt/modules/mac_softwareupdate.py | alexjennings/salt | 921cfe1fe40f37471ebb58fa6577d72b0d6b77d1 | [
"Apache-2.0"
] | 2 | 2017-01-05T16:14:59.000Z | 2019-01-31T23:15:25.000Z | # -*- coding: utf-8 -*-
'''
Support for the softwareupdate command on MacOS.
'''
from __future__ import absolute_import
# Import python libs
import re
import os
# import salt libs
import salt.utils
import salt.utils.mac_utils
from salt.exceptions import CommandExecutionError, SaltInvocationError
__virtualname__ = 'softwareupdate'
def __virtual__():
'''
Only for MacOS
'''
if not salt.utils.is_darwin():
return (False, 'The softwareupdate module could not be loaded: '
'module only works on MacOS systems.')
return __virtualname__
def _get_available(recommended=False, restart=False):
'''
Utility function to get all available update packages.
Sample return date:
{ 'updatename': '1.2.3-45', ... }
'''
cmd = ['softwareupdate', '--list']
out = salt.utils.mac_utils.execute_return_result(cmd)
# rexp parses lines that look like the following:
# * Safari6.1.2MountainLion-6.1.2
# Safari (6.1.2), 51679K [recommended]
# - iCal-1.0.2
# iCal, 1.0.2, 6520K
rexp = re.compile('(?m)^ [*|-] '
r'([^ ].*)[\r\n].*\(([^\)]+)')
if salt.utils.is_true(recommended):
# rexp parses lines that look like the following:
# * Safari6.1.2MountainLion-6.1.2
# Safari (6.1.2), 51679K [recommended]
rexp = re.compile('(?m)^ [*] '
r'([^ ].*)[\r\n].*\(([^\)]+)')
keys = ['name', 'version']
_get = lambda l, k: l[keys.index(k)]
updates = rexp.findall(out)
ret = {}
for line in updates:
name = _get(line, 'name')
version_num = _get(line, 'version')
ret[name] = version_num
if not salt.utils.is_true(restart):
return ret
# rexp parses lines that look like the following:
# * Safari6.1.2MountainLion-6.1.2
# Safari (6.1.2), 51679K [recommended] [restart]
rexp1 = re.compile('(?m)^ [*|-] '
r'([^ ].*)[\r\n].*restart*')
restart_updates = rexp1.findall(out)
ret_restart = {}
for update in ret:
if update in restart_updates:
ret_restart[update] = ret[update]
return ret_restart
def list_available(recommended=False, restart=False):
'''
List all available updates.
:param bool recommended: Show only recommended updates.
:param bool restart: Show only updates that require a restart.
:return: Returns a dictionary containing the updates
:rtype: dict
CLI Example:
.. code-block:: bash
salt '*' softwareupdate.list_available
'''
return _get_available(recommended, restart)
def ignore(name):
'''
Ignore a specific program update. When an update is ignored the '-' and
version number at the end will be omitted, so "SecUpd2014-001-1.0" becomes
"SecUpd2014-001". It will be removed automatically if present. An update
is successfully ignored when it no longer shows up after list_updates.
:param name: The name of the update to add to the ignore list.
:ptype: str
:return: True if successful, False if not
:rtype: bool
CLI Example:
.. code-block:: bash
salt '*' softwareupdate.ignore <update-name>
'''
# remove everything after and including the '-' in the updates name.
to_ignore = name.rsplit('-', 1)[0]
cmd = ['softwareupdate', '--ignore', to_ignore]
salt.utils.mac_utils.execute_return_success(cmd)
return to_ignore in list_ignored()
def list_ignored():
'''
List all updates that have been ignored. Ignored updates are shown
without the '-' and version number at the end, this is how the
softwareupdate command works.
:return: The list of ignored updates
:rtype: list
CLI Example:
.. code-block:: bash
salt '*' softwareupdate.list_ignored
'''
cmd = ['softwareupdate', '--list', '--ignore']
out = salt.utils.mac_utils.execute_return_result(cmd)
# rep parses lines that look like the following:
# "Safari6.1.2MountainLion-6.1.2",
# or:
# Safari6.1.2MountainLion-6.1.2
rexp = re.compile('(?m)^ ["]?'
r'([^,|\s].*[^"|\n|,])[,|"]?')
return rexp.findall(out)
def reset_ignored():
'''
Make sure the ignored updates are not ignored anymore,
returns a list of the updates that are no longer ignored.
:return: True if the list was reset, Otherwise False
:rtype: bool
CLI Example:
.. code-block:: bash
salt '*' softwareupdate.reset_ignored
'''
cmd = ['softwareupdate', '--reset-ignored']
salt.utils.mac_utils.execute_return_success(cmd)
return list_ignored() == []
def schedule_enabled():
'''
Check the status of automatic update scheduling.
:return: True if scheduling is enabled, False if disabled
- ``True``: Automatic checking is on,
- ``False``: Automatic checking is off,
:rtype: bool
CLI Example:
.. code-block:: bash
salt '*' softwareupdate.schedule_enabled
'''
cmd = ['softwareupdate', '--schedule']
ret = salt.utils.mac_utils.execute_return_result(cmd)
enabled = ret.split()[-1]
return salt.utils.mac_utils.validate_enabled(enabled) == 'on'
def schedule_enable(enable):
'''
Enable/disable automatic update scheduling.
:param enable: True/On/Yes/1 to turn on automatic updates. False/No/Off/0 to
turn off automatic updates. If this value is empty, the current status will
be returned.
:type: bool str
:return: True if scheduling is enabled, False if disabled
:rtype: bool
CLI Example:
.. code-block:: bash
salt '*' softwareupdate.schedule_enable on|off
'''
status = salt.utils.mac_utils.validate_enabled(enable)
cmd = ['softwareupdate',
'--schedule',
salt.utils.mac_utils.validate_enabled(status)]
salt.utils.mac_utils.execute_return_success(cmd)
return salt.utils.mac_utils.validate_enabled(schedule_enabled()) == status
def update_all(recommended=False, restart=True):
'''
Install all available updates. Returns a dictionary containing the name
of the update and the status of its installation.
:param bool recommended: If set to True, only install the recommended
updates. If set to False (default) all updates are installed.
:param bool restart: Set this to False if you do not want to install updates
that require a restart. Default is True
:return: A dictionary containing the updates that were installed and the
status of its installation. If no updates were installed an empty dictionary
is returned.
:rtype: dict
- ``True``: The update was installed.
- ``False``: The update was not installed.
CLI Example:
.. code-block:: bash
salt '*' softwareupdate.update_all
'''
to_update = _get_available(recommended, restart)
if not to_update:
return {}
for _update in to_update:
cmd = ['softwareupdate', '--install', _update]
salt.utils.mac_utils.execute_return_success(cmd)
ret = {}
updates_left = _get_available()
for _update in to_update:
ret[_update] = True if _update not in updates_left else False
return ret
def update(name):
'''
Install a named update.
:param str name: The name of the of the update to install.
:return: True if successfully updated, otherwise False
:rtype: bool
CLI Example:
.. code-block:: bash
salt '*' softwareupdate.update <update-name>
'''
if not update_available(name):
raise SaltInvocationError('Update not available: {0}'.format(name))
cmd = ['softwareupdate', '--install', name]
salt.utils.mac_utils.execute_return_success(cmd)
return not update_available(name)
def update_available(name):
'''
Check whether or not an update is available with a given name.
:param str name: The name of the update to look for
:return: True if available, False if not
:rtype: bool
CLI Example:
.. code-block:: bash
salt '*' softwareupdate.update_available <update-name>
salt '*' softwareupdate.update_available "<update with whitespace>"
'''
return name in _get_available()
def list_downloads():
'''
Return a list of all updates that have been downloaded locally.
:return: A list of updates that have been downloaded
:rtype: list
CLI Example:
.. code-block:: bash
salt '*' softwareupdate.list_downloads
'''
outfiles = []
for root, subFolder, files in os.walk('/Library/Updates'):
for f in files:
outfiles.append(os.path.join(root, f))
dist_files = []
for f in outfiles:
if f.endswith('.dist'):
dist_files.append(f)
ret = []
for update in _get_available():
for f in dist_files:
with salt.utils.fopen(f) as fhr:
if update.rsplit('-', 1)[0] in fhr.read():
ret.append(update)
return ret
def download(name):
'''
Download a named update so that it can be installed later with the
``update`` or ``update_all`` functions
:param str name: The update to download.
:return: True if successful, otherwise False
:rtype: bool
CLI Example:
.. code-block:: bash
salt '*' softwareupdate.download <update name>
'''
if not update_available(name):
raise SaltInvocationError('Update not available: {0}'.format(name))
if name in list_downloads():
return True
cmd = ['softwareupdate', '--download', name]
salt.utils.mac_utils.execute_return_success(cmd)
return name in list_downloads()
def download_all(recommended=False, restart=True):
'''
Download all available updates so that they can be installed later with the
``update`` or ``update_all`` functions. It returns a list of updates that
are now downloaded.
:param bool recommended: If set to True, only install the recommended
updates. If set to False (default) all updates are installed.
:param bool restart: Set this to False if you do not want to install updates
that require a restart. Default is True
:return: A list containing all downloaded updates on the system.
:rtype: list
CLI Example:
.. code-block:: bash
salt '*' softwareupdate.download_all
'''
to_download = _get_available(recommended, restart)
for name in to_download:
download(name)
return list_downloads()
def get_catalog():
'''
.. versionadded:: 2016.3.0
Get the current catalog being used for update lookups. Will return a url if
a custom catalog has been specified. Otherwise the word 'Default' will be
returned
:return: The catalog being used for update lookups
:rtype: str
CLI Example:
.. code-block:: bash
salt '*' softwareupdates.get_catalog
'''
cmd = ['defaults',
'read',
'/Library/Preferences/com.apple.SoftwareUpdate.plist']
out = salt.utils.mac_utils.execute_return_result(cmd)
if 'AppleCatalogURL' in out:
cmd.append('AppleCatalogURL')
out = salt.utils.mac_utils.execute_return_result(cmd)
return out
elif 'CatalogURL' in out:
cmd.append('CatalogURL')
out = salt.utils.mac_utils.execute_return_result(cmd)
return out
else:
return 'Default'
def set_catalog(url):
'''
.. versionadded:: 2016.3.0
Set the Software Update Catalog to the URL specified
:param str url: The url to the update catalog
:return: True if successful, False if not
:rtype: bool
CLI Example:
.. code-block:: bash
salt '*' softwareupdates.set_catalog http://swupd.local:8888/index.sucatalog
'''
# This command always returns an error code, though it completes
# successfully. Success will be determined by making sure get_catalog
# returns the passed url
cmd = ['softwareupdate', '--set-catalog', url]
try:
salt.utils.mac_utils.execute_return_success(cmd)
except CommandExecutionError as exc:
pass
return get_catalog() == url
def reset_catalog():
'''
.. versionadded:: 2016.3.0
Reset the Software Update Catalog to the default.
:return: True if successful, False if not
:rtype: bool
CLI Example:
.. code-block:: bash
salt '*' softwareupdates.reset_catalog
'''
# This command always returns an error code, though it completes
# successfully. Success will be determined by making sure get_catalog
# returns 'Default'
cmd = ['softwareupdate', '--clear-catalog']
try:
salt.utils.mac_utils.execute_return_success(cmd)
except CommandExecutionError as exc:
pass
return get_catalog() == 'Default'
| 25.919517 | 84 | 0.641593 |
f0f8692d8d14da9c899412b4ecda15239c4aff9d | 3,276 | lua | Lua | lualib/rfold/rfPostgresql.lua | rob-miller/rFold | 9cd8fd854b2f311e7bbd6bf6bd0b24529a94cd1c | [
"PostgreSQL",
"Apache-2.0"
] | 6 | 2016-06-10T20:58:06.000Z | 2021-03-21T19:23:27.000Z | lualib/rfold/rfPostgresql.lua | rob-miller/rFold | 9cd8fd854b2f311e7bbd6bf6bd0b24529a94cd1c | [
"PostgreSQL",
"Apache-2.0"
] | null | null | null | lualib/rfold/rfPostgresql.lua | rob-miller/rFold | 9cd8fd854b2f311e7bbd6bf6bd0b24529a94cd1c | [
"PostgreSQL",
"Apache-2.0"
] | null | null | null | --[[
rfPostgresql.lua
Copyright 2016 Robert T. Miller
Licensed under the Apache License, Version 2.0 (the "License");
you may not use these files 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.
]]
--- Postgresql database access functions:
luasql = require "luasql.postgres"
local rfpg = {}
-- modify this line to change database access parameters:
rfpg.db, rfpg.user, rfpg.pass, rfpg.host = 'rFold','postgres','postgres','localhost'
rfpg.dbg=nil
function rfpg.Q(sql)
if (rfpg.dbg) then print(sql) end
return assert(rfpg.con:execute(sql),sql):fetch({})
end
function rfpg.Qa(sql)
if (rfpg.dbg) then print(sql) end
return assert(rfpg.con:execute(sql)):fetch({},'a')
end
function rfpg.Qcur(sql)
if (rfpg.dbg) then print(sql) end
return assert(rfpg.con:execute(sql))
end
--[[
local iterate = function(cur)
return function() return cur:fetch({},'a') end
end
local cur = rfpg.Qcur("select target_id, text from pdbenviron.annotation where text like 'c2cStructMap:%'")
for smRow in iterate(cur) do
]]
function rfpg.as2tx (astr) -- postgresql array str to table
print('rfpg.as2t enter: ', astr)
astr = string.match(astr,'{(.+)}')
--print('rfpg.as2t remove brackets: ', astr)
local rslt = {}
for t in string.gmatch(astr,"[^,]+") do
print ('t= ' .. t )
rslt[#rslt +1] = t
end
--print('rfpg.as2t output: ', (rslt))
return rslt
end
function rfpg.as2t (astr) -- postgresql array str to table
local rslt = {}
for t in string.gmatch(string.match(astr,'{(.+)}'),"[^,]+") do rslt[#rslt +1] = t end
return rslt
end
function rfpg.as2tn (astr) -- postgresql array str to table of numbers
local rslt = {}
for t in string.gmatch(string.match(astr,'{(.+)}'),"[^,]+") do rslt[#rslt +1] = tonumber(t) end
--[[
io.write('rfpg.as2tn: [' .. #rslt ..'] { ')
for t=1,#rslt do
io.write( rslt[t] .. ' ')
end
print('}')
]]
return rslt
end
function rfpg.pgArrayOfStrings(...) -- return variable number of strings as postgres array syntax
local rstr = '{'
local start=1
for i,v in ipairs({...}) do
rstr = rstr .. (start and '"' or ',"') .. v .. '"'
start = nil
end
return rstr ..'}'
end
---------------------------------
function getHostName()
local f = io.popen ("/bin/hostname")
local hostname = f:read("*a") or ""
f:close()
hostname =string.gsub(hostname, "\n$", "")
return hostname
end
if ('xubuntu' == getHostName()) then
rfpg.host='nova'
end
function rfpg.dbReconnect(autocommit)
rfpg.pg = luasql.postgres()
rfpg.con = assert(rfpg.pg:connect(rfpg.db,rfpg.user,rfpg.pass,rfpg.host))
if autocommit then
rfpg.con:setautocommit(true)
else
rfpg.con:setautocommit(false)
end
end
function rfpg.dbClose()
if rfpg.con then rfpg.con:close() end
end
rfpg.dbReconnect()
return rfpg
| 24.266667 | 107 | 0.64591 |
f97c061539cc1fd5b77a239be07bc52993029349 | 611 | asm | Assembly | oeis/027/A027788.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/027/A027788.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/027/A027788.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A027788: a(n) = 15*(n+1)*C(n+2,15)/2.
; 105,1800,16320,104040,523260,2209320,8139600,26860680,80901810,225544440,588376800,1448655000,3389852700,7582037400,16287339600,33738060600,67621543875,131530532400,248917996800,459351961200,828225505800,1461574422000,2528333935200,4293282020400,7165139588100,11765913428880,19029682468800,30341771491920,47732786859240,74146496500560,113806250442720,172711831683600,259307625069405,385374177968760,567209052930240,827179868856600,1195753211782500,1714128387917400,2437635622858800,3440095242910200
mov $1,$0
add $0,15
bin $0,$1
add $1,14
mul $0,$1
div $0,2
mul $0,15
| 55.545455 | 500 | 0.844517 |
9430d8134f8366833caabcfe04ed5cd8419ccc30 | 281 | rs | Rust | test/1.1.0/doc/doc_trpl_deref-coercions_md_0002.rs | brson/ctrs | cd0a46bf647f439067f45238f59a445181c8cb6d | [
"DOC"
] | 4 | 2015-09-17T21:14:42.000Z | 2015-11-26T14:58:21.000Z | test/1.1.0/doc/doc_trpl_deref-coercions_md_0002.rs | brson/ctrs | cd0a46bf647f439067f45238f59a445181c8cb6d | [
"DOC"
] | 2 | 2015-10-20T09:36:04.000Z | 2016-07-22T18:19:45.000Z | test/1.1.0/doc/doc_trpl_deref-coercions_md_0002.rs | brson/ctrs | cd0a46bf647f439067f45238f59a445181c8cb6d | [
"DOC"
] | null | null | null | fn main() {
use std::rc::Rc;
fn foo(s: &str) {
// borrow a string for a second
}
// String implements Deref<Target=str>
let owned = "Hello".to_string();
let counted = Rc::new(owned);
// therefore, this works:
foo(&counted);
}
| 18.733333 | 42 | 0.52669 |
2a1d6551da4048ed16462f51901e67e93fd93e1e | 263 | java | Java | src/torresHanoi/Apl.java | IvanSanchez16/workspace-TAdP | f2d5566b80e0fce6c448b6652bed00eb117168e6 | [
"MIT"
] | null | null | null | src/torresHanoi/Apl.java | IvanSanchez16/workspace-TAdP | f2d5566b80e0fce6c448b6652bed00eb117168e6 | [
"MIT"
] | null | null | null | src/torresHanoi/Apl.java | IvanSanchez16/workspace-TAdP | f2d5566b80e0fce6c448b6652bed00eb117168e6 | [
"MIT"
] | null | null | null | package torresHanoi;
public class Apl {
public static void main(String[] args) {
Vista v=new Vista();
Modelo m=new Modelo();
Controlador c=new Controlador(v,m);
v.setEscuchador(c);
m.CrearJuego(3);
v.AsignaArreglo(m.ADiscos);
}
}
| 17.533333 | 42 | 0.642586 |
f1c78b63a4d209a2250311fa0074552f212e8a0c | 190 | rb | Ruby | attributes/default.rb | jmassardo/windows_license | 4b169c4478c336428669f1f74448ed2f0f3b4663 | [
"Apache-2.0"
] | null | null | null | attributes/default.rb | jmassardo/windows_license | 4b169c4478c336428669f1f74448ed2f0f3b4663 | [
"Apache-2.0"
] | null | null | null | attributes/default.rb | jmassardo/windows_license | 4b169c4478c336428669f1f74448ed2f0f3b4663 | [
"Apache-2.0"
] | null | null | null | default['windows_license']['product_key'] = nil
default['windows_license']['skms_server'] = nil
default['windows_license']['skms_port'] = 1688
default['windows_license']['skms_domain'] = nil | 47.5 | 47 | 0.752632 |