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
d77f3e8e48235e4fc42ea6db04cf21100ecf869b
982
asm
Assembly
maps/DiglettsCave.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
28
2019-11-08T07:19:00.000Z
2021-12-20T10:17:54.000Z
maps/DiglettsCave.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
13
2020-01-11T17:00:40.000Z
2021-09-14T01:27:38.000Z
maps/DiglettsCave.asm
Dev727/ancientplatinum
8b212a1728cc32a95743e1538b9eaa0827d013a7
[ "blessing" ]
22
2020-05-28T17:31:38.000Z
2022-03-07T20:49:35.000Z
object_const_def ; object_event constants const DIGLETTSCAVE_POKEFAN_M DiglettsCave_MapScripts: db 0 ; scene scripts db 0 ; callbacks DiglettsCavePokefanMScript: jumptextfaceplayer DiglettsCavePokefanMText DiglettsCaveHiddenMaxRevive: hiddenitem MAX_REVIVE, EVENT_DIGLETTS_CAVE_HIDDEN_MAX_REVIVE DiglettsCavePokefanMText: text "A bunch of DIGLETT" line "popped out of the" para "ground! That was" line "shocking." done DiglettsCave_MapEvents: db 0, 0 ; filler db 6 ; warp events warp_event 3, 33, VERMILION_CITY, 10 warp_event 5, 31, DIGLETTS_CAVE, 5 warp_event 15, 5, ROUTE_2, 5 warp_event 17, 3, DIGLETTS_CAVE, 6 warp_event 17, 33, DIGLETTS_CAVE, 2 warp_event 3, 3, DIGLETTS_CAVE, 4 db 0 ; coord events db 1 ; bg events bg_event 6, 11, BGEVENT_ITEM, DiglettsCaveHiddenMaxRevive db 1 ; object events object_event 3, 31, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DiglettsCavePokefanMScript, -1
23.95122
139
0.775967
166b6e12f27de43351b7452827dcb4154312ffe0
3,075
ps1
PowerShell
scripts/CodePackageToDockerPackage/CreateDockerPackage.ps1
rwike77/service-fabric-scripts-and-templates
7681106da4b8fcd8f5e46bad178a84541bee955e
[ "MIT" ]
null
null
null
scripts/CodePackageToDockerPackage/CreateDockerPackage.ps1
rwike77/service-fabric-scripts-and-templates
7681106da4b8fcd8f5e46bad178a84541bee955e
[ "MIT" ]
null
null
null
scripts/CodePackageToDockerPackage/CreateDockerPackage.ps1
rwike77/service-fabric-scripts-and-templates
7681106da4b8fcd8f5e46bad178a84541bee955e
[ "MIT" ]
null
null
null
param ( [Parameter(Mandatory=$true, ParameterSetName = "Exe")] [Parameter(Mandatory=$true, ParameterSetName = "Dll")] [string] $CodePackageDirectoryPath, [Parameter(Mandatory=$true, ParameterSetName = "Exe")] [Parameter(Mandatory=$true, ParameterSetName = "Dll")] [string] $DockerPackageOutputDirectoryPath, [Parameter(Mandatory=$false, ParameterSetName = "Exe")] [string] $ApplicationExeName, [Parameter(Mandatory=$false, ParameterSetName = "Dll")] [string] $DotnetCoreDllName ) if(!(Test-Path -Path $CodePackageDirectoryPath)) { Write-Error "CodePackageDirectoryPath does not exist." exit 1 } if(!(Test-Path -Path $DockerPackageOutputDirectoryPath)) { Write-Host $DockerPackageOutputDirectoryPath "does not exist. Creating directory.." New-Item -ItemType directory $DockerPackageOutputDirectoryPath | Out-Null Write-Host "Created " $DockerPackageOutputDirectoryPath } $DockerPublishPath = Join-Path $DockerPackageOutputDirectoryPath -ChildPath "publish" if(!(Test-Path -Path $DockerPublishPath)) { New-Item -ItemType directory $DockerPublishPath | Out-Null Write-Host "Created " $DockerPublishPath } Write-Host "Copying all files from " $CodePackageDirectoryPath " to " $DockerPublishPath $SourceCopyPath = Join-Path $CodePackageDirectoryPath -ChildPath "*" Copy-Item -Path $SourceCopyPath -Destination $DockerPublishPath -Recurse -Force Write-Host "Files successfully copied." Remove-Item $CodePackageDirectoryPath -Recurse -Force Write-Host "Removed " $CodePackageDirectoryPath $ServiceFabricDataInterfacesPath = Join-Path $DockerPublishPath -ChildPath "Microsoft.ServiceFabric.Data.Interfaces.dll" if(Test-Path -Path $ServiceFabricDataInterfacesPath) { Remove-Item $ServiceFabricDataInterfacesPath -Force Write-Host "Microsoft.ServiceFabric.Data.Interfaces.dll removed." } Get-ChildItem $DockerPublishPath | Where-Object{$_.Name -Match "System.Fabric.*.dll"} | Remove-Item -Force Write-Host "Removed System.Fabric.*.dll" $initScriptPath = Join-Path $DockerPublishPath -ChildPath "init.bat" if ($ApplicationExeName) { $initScriptContents = [System.IO.Path]::GetFileNameWithoutExtension($ApplicationExeName) + ".exe" } elseif ($DotnetCoreDllName) { $initScriptContents = "dotnet " + [System.IO.Path]::GetFileNameWithoutExtension($DotnetCoreDllName) + ".dll" } else { $warning = "Modify init.bat inside " + $DockerPublishPath + " to include the name of your startup executable." Write-Warning $warning } Write-Host "Creating init.bat for docker package" New-Item -ItemType file $initScriptPath -Value $initScriptContents -Force | Out-Null $dockerfilePath = Join-Path $DockerPackageOutputDirectoryPath -ChildPath "Dockerfile" $dockerfileContents = "FROM microsoft/service-fabric-reliableservices-windowsservercore:latest ADD publish/ / CMD C:\init.bat" Write-Host "Creating Dockerfile" New-Item -ItemType file $dockerfilePath -Value $dockerfileContents -Force | Out-Null Write-Host "Docker package successfully created at " $DockerPackageOutputDirectoryPath
37.048193
120
0.767154
392d594d9e24a21a98e412a6abdefb914cfb8526
187
dart
Dart
node/tablestore_node/lib/src/import.dart
tekartik/aliyun.dart
cf810c5db36e0e33b319b5abc9cb9f94549544fc
[ "BSD-2-Clause" ]
null
null
null
node/tablestore_node/lib/src/import.dart
tekartik/aliyun.dart
cf810c5db36e0e33b319b5abc9cb9f94549544fc
[ "BSD-2-Clause" ]
null
null
null
node/tablestore_node/lib/src/import.dart
tekartik/aliyun.dart
cf810c5db36e0e33b319b5abc9cb9f94549544fc
[ "BSD-2-Clause" ]
null
null
null
export 'package:tekartik_aliyun_tablestore/src/mixin/ts_tablestore_mixin.dart'; export 'package:tekartik_common_utils/common_utils_import.dart'; export 'package:tekartik_http/http.dart';
46.75
79
0.860963
c5c31c58088532fd2158e70040978e5ee8e05b08
745
cpp
C++
src/CreditCard.cpp
tyoungjr/Catch2Practice
6c602b0b57edaf2299043b4ef3c11d9507ce167b
[ "MIT" ]
null
null
null
src/CreditCard.cpp
tyoungjr/Catch2Practice
6c602b0b57edaf2299043b4ef3c11d9507ce167b
[ "MIT" ]
null
null
null
src/CreditCard.cpp
tyoungjr/Catch2Practice
6c602b0b57edaf2299043b4ef3c11d9507ce167b
[ "MIT" ]
null
null
null
// // Created by tyoun on 10/24/2021. // #include "CreditCard.h" CreditCard::CreditCard(const std::string &no, const std::string &nm, int lim, double bal): number(no), name(nm), limit(lim), balance(bal){ } bool CreditCard::chargeIt(double price) { if(price + balance > double(limit)) return false; balance += price; return true; } void CreditCard::makePayment(double payment) { balance -= payment; } std::ostream& operator << (std::ostream& out, const CreditCard& c) { out << "Number = " << c.getNumber() << "\n" << "Name = " << c.getName() << "\n" << "Balance = " << c.getBalance() << "\n" << "Limit = " << c.getLimit() << "\n"; return out; }
26.607143
90
0.546309
ca13fb8023513de4c485099acac9f2ac85f834c5
924
java
Java
src/main/java/com/pushtechnology/load/client/action/LimitedAction.java
adam-push/load-test-client
2d5ba7c30407f802043ee754b37e60825af18024
[ "Apache-2.0" ]
null
null
null
src/main/java/com/pushtechnology/load/client/action/LimitedAction.java
adam-push/load-test-client
2d5ba7c30407f802043ee754b37e60825af18024
[ "Apache-2.0" ]
null
null
null
src/main/java/com/pushtechnology/load/client/action/LimitedAction.java
adam-push/load-test-client
2d5ba7c30407f802043ee754b37e60825af18024
[ "Apache-2.0" ]
null
null
null
/* * Push Technology Ltd. ("Push") CONFIDENTIAL * Unpublished Copyright © 2017 Push Technology Ltd., All Rights Reserved. */ package com.pushtechnology.load.client.action; import java.util.concurrent.CountDownLatch; /** * Wraps an existing Action to provide the ability to terminate it once it has * been run a predetermined number of times. * * @author adam */ public class LimitedAction implements Runnable { private final Action action; private final CountDownLatch latch; public LimitedAction(Action action, int limit) { this.action = action; this.latch = new CountDownLatch(limit); } public void await() throws InterruptedException { latch.await(); } @Override public void run() { synchronized (latch) { if (latch.getCount() > 0) { latch.countDown(); action.run(); } } } }
23.692308
78
0.634199
180c1c20443386c1f7f93839eb4e35f6b19625f7
6,911
sql
SQL
pos.sql
nipunann1991/pharmacy_system
9f2064811838a45b0035ddee574f0845dc41635c
[ "MIT" ]
null
null
null
pos.sql
nipunann1991/pharmacy_system
9f2064811838a45b0035ddee574f0845dc41635c
[ "MIT" ]
null
null
null
pos.sql
nipunann1991/pharmacy_system
9f2064811838a45b0035ddee574f0845dc41635c
[ "MIT" ]
null
null
null
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Sep 24, 2017 at 07:37 PM -- Server version: 10.1.19-MariaDB -- PHP Version: 5.6.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `pos` -- -- -------------------------------------------------------- -- -- Table structure for table `categories` -- CREATE TABLE `categories` ( `id` int(11) NOT NULL, `cat_name` varchar(30) NOT NULL, `cat_desc` varchar(100) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `categories` -- INSERT INTO `categories` (`id`, `cat_name`, `cat_desc`) VALUES (1, 'Biscuit', 'All Kinds of Biscuits'), (2, 'Noodles', 'All Kinds of Noodles Packets'); -- -------------------------------------------------------- -- -- Table structure for table `company` -- CREATE TABLE `company` ( `id` int(11) NOT NULL, `name` varchar(100) NOT NULL, `address` varchar(200) NOT NULL, `tel` varchar(11) NOT NULL, `email` varchar(100) NOT NULL, `note` varchar(500) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `company` -- INSERT INTO `company` (`id`, `name`, `address`, `tel`, `email`, `note`) VALUES (1, 'Zigma Web', '275/A Colombo Road, \nGampaha', '0332228887', 'nipunann0710@gmail.com', 'sdfsf'); -- -------------------------------------------------------- -- -- Table structure for table `item` -- CREATE TABLE `item` ( `item_id` int(11) NOT NULL, `item_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_sinhala_ci NOT NULL, `item_display_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_sinhala_ci NOT NULL, `cat_id` int(11) NOT NULL, `image_url` varchar(120) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `item` -- INSERT INTO `item` (`item_id`, `item_name`, `item_display_name`, `cat_id`, `image_url`) VALUES (1, 'Munchee Milk Short Cake 85g1', 'Munchee Milk Short Cake 85g', 1, 'assets/upload/milk.jpg'), (2, 'PRIMA SPECIAL NOODLES 430G', 'PRIMA SPECIAL NOODLES 430G', 2, 'assets/upload/images1.jpg'), (3, 'software', 'software', 1, 'assets/upload/8.png'); -- -------------------------------------------------------- -- -- Table structure for table `item_stock` -- CREATE TABLE `item_stock` ( `stock_id` int(11) NOT NULL, `barcode` varchar(50) NOT NULL, `item_id` int(11) NOT NULL, `manufacture_id` varchar(50) NOT NULL, `sup_id` int(11) NOT NULL, `buy_price` float NOT NULL, `sell_price` float NOT NULL, `quantity` int(11) NOT NULL, `reorder_level` int(11) NOT NULL, `curr_quantity` int(11) NOT NULL, `discount` int(11) NOT NULL, `discount_type` int(11) NOT NULL, `net_amount` float NOT NULL, `price_changable` int(11) NOT NULL DEFAULT '0', `calc_item` int(11) NOT NULL DEFAULT '0', `purchase_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `archived` int(1) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `item_stock` -- INSERT INTO `item_stock` (`stock_id`, `barcode`, `item_id`, `manufacture_id`, `sup_id`, `buy_price`, `sell_price`, `quantity`, `reorder_level`, `curr_quantity`, `discount`, `discount_type`, `net_amount`, `price_changable`, `calc_item`, `purchase_date`, `archived`) VALUES (14, 'PM9546', 2, 'PM9', 100, 185, 200, 50, 1, 50, 1, 2, 198, 1, 1, '2017-09-10 18:28:15', 0), (19, '10657373737009', 1, '0', 100, 45, 55, 100, 20, 100, 0, 1, 55, 0, 0, '2017-09-18 17:30:21', 0), (20, '7754487530847195', 3, '1000', 100, 30, 30, 100, 1, 100, 20, 2, 24, 1, 1, '2017-09-19 08:11:10', 0), (21, '5001409813407486', 2, '0', 100, 30, 70, 100, 10, 100, 10, 1, 60, 0, 0, '2017-09-19 10:30:54', 0), (22, '9581427559753612', 4, '34', 100, 100, 120, 100, 10, 1, 0, 2, 120, 1, 1, '2017-09-19 17:46:44', 0), (26, '1954596118413175', 3, '0', 0, 100, 150, 150, 20, 150, 10, 2, 135, 0, 0, '2017-09-23 03:50:11', 0); -- -------------------------------------------------------- -- -- Table structure for table `login` -- CREATE TABLE `login` ( `login_id` int(11) NOT NULL, `username` varchar(20) NOT NULL, `password` varchar(100) NOT NULL, `role_id` int(11) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `login` -- INSERT INTO `login` (`login_id`, `username`, `password`, `role_id`) VALUES (1, 'admin', '0192023a7bbd73250516f069df18b500', 0), (2, 'Nipuna', '656176c3a3131f7d729539cf642ac59e', 2), (4, 'sameera@gmail.com', '6b10f545cf1888bde3edf30086068929', 2); -- -------------------------------------------------------- -- -- Table structure for table `roles` -- CREATE TABLE `roles` ( `role_id` int(11) NOT NULL, `role_name` varchar(20) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `roles` -- INSERT INTO `roles` (`role_id`, `role_name`) VALUES (0, 'Super Admin'), (1, 'Admin'), (2, 'Cashier'); -- -------------------------------------------------------- -- -- Table structure for table `supplier` -- CREATE TABLE `supplier` ( `sup_id` int(11) NOT NULL, `sup_name` varchar(50) NOT NULL, `dealer` varchar(50) NOT NULL, `nic` varchar(20) NOT NULL, `address` varchar(150) NOT NULL, `tel` varchar(15) NOT NULL, `fax` varchar(15) NOT NULL, `email` varchar(50) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `supplier` -- INSERT INTO `supplier` (`sup_id`, `sup_name`, `dealer`, `nic`, `address`, `tel`, `fax`, `email`) VALUES (100, 'User 1', 'Munchee', '910752839v', '', '0716378515', '', ''); -- -- Indexes for dumped tables -- -- -- Indexes for table `categories` -- ALTER TABLE `categories` ADD PRIMARY KEY (`id`); -- -- Indexes for table `company` -- ALTER TABLE `company` ADD PRIMARY KEY (`id`); -- -- Indexes for table `item` -- ALTER TABLE `item` ADD PRIMARY KEY (`item_id`); -- -- Indexes for table `item_stock` -- ALTER TABLE `item_stock` ADD PRIMARY KEY (`stock_id`); -- -- Indexes for table `login` -- ALTER TABLE `login` ADD PRIMARY KEY (`login_id`); -- -- Indexes for table `roles` -- ALTER TABLE `roles` ADD PRIMARY KEY (`role_id`); -- -- Indexes for table `supplier` -- ALTER TABLE `supplier` ADD PRIMARY KEY (`sup_id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `item_stock` -- ALTER TABLE `item_stock` MODIFY `stock_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27; -- -- AUTO_INCREMENT for table `login` -- ALTER TABLE `login` MODIFY `login_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; /*!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 */;
27.101961
271
0.63001
b04a49a292721d8e6662442ae5dbb645912079f2
392
html
HTML
src/app/components/search/search.component.html
maapteh/workshop-openflight
58d0bdb13314858ad7281d1f7ebe9e0310be3fe4
[ "MIT" ]
1
2018-06-24T13:59:13.000Z
2018-06-24T13:59:13.000Z
src/app/components/search/search.component.html
maapteh/workshop-openflight
58d0bdb13314858ad7281d1f7ebe9e0310be3fe4
[ "MIT" ]
null
null
null
src/app/components/search/search.component.html
maapteh/workshop-openflight
58d0bdb13314858ad7281d1f7ebe9e0310be3fe4
[ "MIT" ]
null
null
null
<div class="c-search"> <input type="text" placeholder="Departure from" class="c-search__input" #departure (keydown.enter)="toggleOpen()" (keydown.tab)="toggleOpen()" [attr.aria-hidden]="isOpen === false"> <div class="c-search__toggle" (click)="toggleOpen()" tabindex="0" > <span></span> <span></span> <span></span> </div> </div>
18.666667
42
0.571429
4c228dffed43ead08c485ac2c07153d14d9e5cbd
458
php
PHP
app/Src/Category/Repository/CategoryRepositoryRead.php
mpijierro/devoogle
6b678887d820696c0104bc61058da7ffe3447c3a
[ "MIT" ]
2
2019-05-27T23:05:18.000Z
2019-06-06T13:51:00.000Z
app/Src/Category/Repository/CategoryRepositoryRead.php
mpijierro/devoogle
6b678887d820696c0104bc61058da7ffe3447c3a
[ "MIT" ]
7
2019-02-21T09:27:51.000Z
2021-03-30T12:18:08.000Z
app/Src/Category/Repository/CategoryRepositoryRead.php
mpijierro/devoogle
6b678887d820696c0104bc61058da7ffe3447c3a
[ "MIT" ]
2
2019-02-21T12:31:52.000Z
2019-06-07T09:21:35.000Z
<?php namespace Devoogle\Src\Category\Repository; use Devoogle\Src\Category\Model\Category; class CategoryRepositoryRead { public function find($aCategoryId) { return Category::find($aCategoryId); } public function allOrderByName() { return Category::orderBy('name', 'asc')->get(); } public function findBySlugOrFail(string $slug) { return Category::where('slug', $slug)->firstOrfail(); } }
17.615385
61
0.650655
7d7a6eda0f4a343dad7c1dfb81429401870dac28
36
psm1
PowerShell
modules/AWSPowerShell/Cmdlets/SSO/AWS.Tools.SSO.Aliases.psm1
ajsing/aws-tools-for-powershell
25372542f23afd465fc419c4ec1f6175d7f3dee2
[ "Apache-2.0" ]
181
2019-03-29T16:45:16.000Z
2022-03-24T22:46:45.000Z
modules/AWSPowerShell/Cmdlets/SSO/AWS.Tools.SSO.Aliases.psm1
lukeenterprise/aws-tools-for-powershell
acc809bc80d092fc1fb2c21780ff9ea06f3d104c
[ "Apache-2.0" ]
233
2019-03-29T12:22:54.000Z
2022-03-30T08:14:56.000Z
modules/AWSPowerShell/Cmdlets/SSO/AWS.Tools.SSO.Aliases.psm1
lukeenterprise/aws-tools-for-powershell
acc809bc80d092fc1fb2c21780ff9ea06f3d104c
[ "Apache-2.0" ]
70
2019-05-09T05:43:10.000Z
2022-02-22T15:09:32.000Z
# SSO Export-ModuleMember -Alias *
12
28
0.722222
3952e1970c18bb794e3e4207cbcacbe91db08224
129,726
html
HTML
Task 1.2/dataset/page_95/4722.html
cosmin-z/ADM-HW3
fac8cb2288c734b0c1e30e23757a0c0e14268544
[ "MIT" ]
null
null
null
Task 1.2/dataset/page_95/4722.html
cosmin-z/ADM-HW3
fac8cb2288c734b0c1e30e23757a0c0e14268544
[ "MIT" ]
null
null
null
Task 1.2/dataset/page_95/4722.html
cosmin-z/ADM-HW3
fac8cb2288c734b0c1e30e23757a0c0e14268544
[ "MIT" ]
null
null
null
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html lang="en" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml"> <head> <link rel="preconnect" href="//fonts.gstatic.com/" crossorigin="anonymous" /> <link rel="preconnect" href="//fonts.googleapis.com/" crossorigin="anonymous" /> <link rel="preconnect" href="//tags-cdn.deployads.com/" crossorigin="anonymous" /> <link rel="preconnect" href="//www.googletagservices.com/" crossorigin="anonymous" /> <link rel="preconnect" href="//www.googletagmanager.com/" crossorigin="anonymous"/> <link rel="preconnect" href="//apis.google.com/" crossorigin="anonymous"/> <link rel="preconnect" href="//pixel-sync.sitescout.com/" crossorigin="anonymous"/> <link rel="preconnect" href="//pixel.tapad.com/" crossorigin="anonymous"/> <link rel="preconnect" href="//c.deployads.com/" crossorigin="anonymous"/> <link rel="preconnect" href="//tpc.googlesyndication.com/" crossorigin="anonymous"/> <link rel="preconnect" href="//googleads.g.doubleclick.net/" crossorigin="anonymous"/> <link rel="preconnect" href="//securepubads.g.doubleclick.net/" crossorigin="anonymous"/> <link rel="preconnect" href="https://cdn.myanimelist.net" crossorigin="anonymous"/> <title> Saint Seiya: Saishuu Seisen no Senshi-tachi - MyAnimeList.net </title> <meta name="description" content="Looking for information on the anime Saint Seiya: Saishuu Seisen no Senshi-tachi? Find out more with MyAnimeList, the world&#039;s most active online anime and manga community and database. Lucifer has been awoken from his eternal slumber by the spirits of Eris, Abel and Poseidon. He has come to kill Athena and fulfill his heart&#039;s burning desire: becoming the strongest of all the gods. (Source: ANN)" /> <meta name="keywords" content="anime, myanimelist, anime news, manga" /> <meta property="og:locale" content="en_US"><meta property="fb:app_id" content="360769957454434"><meta property="og:site_name" content="MyAnimeList.net"><meta name="twitter:card" content="summary"><meta name="twitter:site" content="@myanimelist"><meta property="og:title" content="Saint Seiya: Saishuu Seisen no Senshi-tachi"><meta property="og:type" content="video.movie"><meta property="og:image" content="https://cdn.myanimelist.net/images/anime/3/16347.jpg"><meta name="twitter:image:src" content="https://cdn.myanimelist.net/r/360x360/images/anime/3/16347.jpg?s=e6873ba2f5a9da4df7fb07192b5a2dac"><meta property="og:url" content="https://myanimelist.net/anime/1260/Saint_Seiya__Saishuu_Seisen_no_Senshi-tachi?user-agent=Mozilla%2F5.0+%28Macintosh%3B+Intel+Mac+OS+X+10_15_7%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F95.0.4638.69+Safari%2F537.36&amp;accept=image%2Favif%2Cimage%2Fwebp%2Cimage%2Fapng%2Cimage%2Fsvg%2Bxml%2Cimage%2F%2A%2C%2A%2F%2A%3Bq%3D0.8&amp;referer=https%3A%2F%2Fmyanimelist.net%2F"><meta property="og:description" content="Lucifer has been awoken from his eternal slumber by the spirits of Eris, Abel and Poseidon. He has come to kill Athena and fulfill his heart&#039;s burning desire: becoming the strongest of all the gods. (Source: ANN)"> <meta name="referrer" content="default"><link rel="manifest" href="/manifest.json"> <meta name='csrf_token' content='dae7c119467bff1b127b3aa45f0ea2662e820d34'> <meta name="fo-verify" content="1e927243-8e02-48e3-b098-a7b78c5b4e36"><meta name="viewport" content="initial-scale=1" /><link rel="preload" as="style" href="https://cdn.myanimelist.net/static/assets/css/pc/style-d4cf08207d.css" /> <link rel="preload" as="script" href="https://cdn.myanimelist.net/static/assets/js/pc/header-82658934b6.js" /> <link rel="preload" as="script" href="https://cdn.myanimelist.net/static/assets/js/pc/all-94392c824c.js" /> <link rel="stylesheet" type="text/css" href="https://cdn.myanimelist.net/static/assets/css/pc/style-d4cf08207d.css" /> <script type="text/javascript" src="https://cdn.myanimelist.net/static/assets/js/pc/header-82658934b6.js"></script> <script type="text/javascript" src="https://cdn.myanimelist.net/static/assets/js/pc/all-94392c824c.js" id="alljs" data-params='{&quot;origin_url&quot;:&quot;https:\/\/myanimelist.net&quot;}' async="async"></script> <link rel="search" type="application/opensearchdescription+xml" href="https://myanimelist.net/plugins/myanimelist.xml" title="MyAnimeList" /> <link rel="shortcut icon" href="https://cdn.myanimelist.net/images/favicon.ico" /> <meta name='recaptcha_site_key' content='6Ld_1aIZAAAAAF6bNdR67ICKIaeXLKlbhE7t2Qz4'> <script> window.GRECAPTCHA_SITE_KEY = '6Ld_1aIZAAAAAF6bNdR67ICKIaeXLKlbhE7t2Qz4'; </script> <script src='https://www.google.com/recaptcha/api.js?render=6Ld_1aIZAAAAAF6bNdR67ICKIaeXLKlbhE7t2Qz4' async defer></script> <link href="https://fonts.googleapis.com/css?family=Roboto:400,700&display=swap" rel="stylesheet"> <script type="text/javascript"> window._taboola = window._taboola || []; _taboola.push({article:'auto'}); !function (e, f, u, i) { if (!document.getElementById(i)){ e.async = 1; e.src = u; e.id = i; f.parentNode.insertBefore(e, f); } }(document.createElement('script'), document.getElementsByTagName('script')[0], '//cdn.taboola.com/libtrc/myanimelist/loader.js', 'tb_loader_script'); if(window.performance && typeof window.performance.mark == 'function') {window.performance.mark('tbl_ic');} </script> </head> <body onload=" " class="page-common"data-ms="true" data-country-code="US" > <div id="myanimelist"> <script type='text/javascript'> window.MAL.SkinAd.prepareForSkin(''); </script> <div id="ad-skin-bg-left" class="ad-skin-side-outer ad-skin-side-bg bg-left"> <div id="ad-skin-left" class="ad-skin-side left" style="display: none;"> <div id="ad-skin-left-absolute-block"> <div id="ad-skin-left-fixed-block"></div> </div> </div> </div> <div class="wrapper"><div id="headerSmall"><a href="/" class="link-mal-logo">MyAnimeList.net</a> <script>(deployads = window.deployads || []).disablePageSegmentSessionTracking = true; </script> <script>(deployads = window.deployads || []).pageSegment = 'anime_title_1260';</script> <script> var trackOutboundLink = function(url) { ga('send', 'event', 'outbound', 'click', url, { 'transport': 'beacon', 'hitCallback': function(){return true;} }); } </script><div class="banner-header-anime-straming header-mini-banner" style="right:480px;"> <a href="https://mxj.myanimelist.net/" onclick="trackOutboundLink('https://mxj.myanimelist.net/')"> <img src="/c/i/images/event/20210527_MALxJAPAN_MiniBanner/500x72_miniBanner_B.png" width="250" height="36" alt="MAL x JAPAN" title="MAL x JAPAN"> </a> </div> <div id="header-menu" ><div class="header-menu-login"><a class="btn-mal-service" href="https://myanimelist.net/membership?_location=mal_h_u" onClick="ga_mal_banner()">Hide Ads</a><a class="btn-login" href="https://myanimelist.net/login.php?from=%2Fanime%2F1260%2FSaint_Seiya__Saishuu_Seisen_no_Senshi-tachi%3Fuser-agent%3DMozilla%252F5.0%2B%2528Macintosh%253B%2BIntel%2BMac%2BOS%2BX%2B10_15_7%2529%2BAppleWebKit%252F537.36%2B%2528KHTML%252C%2Blike%2BGecko%2529%2BChrome%252F95.0.4638.69%2BSafari%252F537.36%26accept%3Dimage%252Favif%252Cimage%252Fwebp%252Cimage%252Fapng%252Cimage%252Fsvg%252Bxml%252Cimage%252F%252A%252C%252A%252F%252A%253Bq%253D0.8%26referer%3Dhttps%253A%252F%252Fmyanimelist.net%252F" id="malLogin" onClick="ga_notlogin()">Login</a><a class="btn-signup" href="https://myanimelist.net/register.php?from=%2Fanime%2F1260%2FSaint_Seiya__Saishuu_Seisen_no_Senshi-tachi%3Fuser-agent%3DMozilla%252F5.0%2B%2528Macintosh%253B%2BIntel%2BMac%2BOS%2BX%2B10_15_7%2529%2BAppleWebKit%252F537.36%2B%2528KHTML%252C%2Blike%2BGecko%2529%2BChrome%252F95.0.4638.69%2BSafari%252F537.36%26accept%3Dimage%252Favif%252Cimage%252Fwebp%252Cimage%252Fapng%252Cimage%252Fsvg%252Bxml%252Cimage%252F%252A%252C%252A%252F%252A%253Bq%253D0.8%26referer%3Dhttps%253A%252F%252Fmyanimelist.net%252F" onClick="ga_registration()">Sign Up</a></div></div></div> <div id="menu" class=""> <div id="menu_right"><script type="text/x-template" id="incremental-result-item-anime"><div class="list anime" :class="{'focus': focus}"><a :href="url" class="clearfix"><div class="on" v-if="focus"><span class="image" :style="{'background-image': 'url(' + item.image_url + ')'}"></span><div class="info anime"><div class="name">${ item.name } <span class="media-type">(${ item.payload.media_type })</span></div><div class="extra-info">Aired: ${ item.payload.aired }<br>Score: ${ item.payload.score }<br>Status: ${ item.payload.status }</div></div></div><div class="off" v-if="!focus"><span class="image" :style="{'background-image': 'url(' + item.thumbnail_url + ')'}"></span><div class="info anime"><div class="name">${ item.name }</div><div class="media-type">(${ mediaTypeWithStartYear })</div></div></div></a></div></script><script type="text/x-template" id="incremental-result-item-manga"><div class="list manga" :class="{'focus': focus}"><a :href="url" class="clearfix"><div class="on" v-if="focus"><span class="image" :style="{'background-image': 'url(' + item.image_url + ')'}"></span><div class="info manga"><div class="name">${ item.name } <span class="media-type">(${ item.payload.media_type })</span></div><div class="extra-info">Published: ${ item.payload.published }<br>Score: ${ item.payload.score }<br>Status: ${ item.payload.status }</div></div></div><div class="off" v-if="!focus"><span class="image" :style="{'background-image': 'url(' + item.thumbnail_url + ')'}"></span><div class="info manga"><div class="name">${ item.name }</div><div class="media-type">(${ mediaTypeWithStartYear })</div></div></div></a></div></script><script type="text/x-template" id="incremental-result-item-character"><div class="list character" :class="{'focus': focus}"><a :href="url" class="clearfix"><div class="on" v-if="focus"><span class="image" :style="{'background-image': 'url(' + item.image_url + ')'}"></span><div class="info character"><div class="name" v-html="item.name"></div><div class="extra-info"><ul class="related-works"><li v-for="work in item.payload.related_works" class="fs-i">- ${ work }</li></ul>Favorites: ${ item.payload.favorites }</div></div></div><div class="off" v-if="!focus"><span class="image" :style="{'background-image': 'url(' + item.thumbnail_url + ')'}"></span><div class="info character"><div class="name" v-html="item.name"></div></div></div></a></div></script><script type="text/x-template" id="incremental-result-item-person"><div class="list person" :class="{'focus': focus}"><a :href="url" class="clearfix"><div class="on" v-if="focus"><span class="image" :style="{'background-image': 'url(' + item.image_url + ')'}"></span><div class="info person"><div class="name">${ item.name }</div><div class="extra-info"><span v-if="item.payload.alternative_name">${ item.payload.alternative_name }<br></span>Birthday: ${ item.payload.birthday }<br>Favorites: ${ item.payload.favorites }</div></div></div><div class="off" v-if="!focus"><span class="image" :style="{'background-image': 'url(' + item.thumbnail_url + ')'}"></span><div class="info person"><div class="name">${ item.name }</div></div></div></a></div></script><script type="text/x-template" id="incremental-result-item-store"><div class="list store" :class="{'focus': focus}"><a :href="url" class="clearfix"><div class="on" v-if="focus"><span class="image" :style="{'background-image': 'url(' + item.image_url + ')'}"></span><div class="info store"></div></div><div class="off" v-if="!focus"><span class="image" :style="{'background-image': 'url(' + item.thumbnail_url + ')'}"></span><div class="info store"></div></div></a></div></script><script type="text/x-template" id="incremental-result-item-club"><div class="list club" :class="{'focus': focus}"><a :href="url" class="clearfix"><div class="on" v-if="focus"><span class="image" :style="{'background-image': 'url(' + item.image_url + ')'}"></span><div class="info club"><div class="name">${ item.name }</div><div class="extra-info">Members: ${ item.payload.members }<br>Category: ${ item.payload.category }<br>Created by: ${ item.payload.created_by }</div></div></div><div class="off" v-if="!focus"><span class="image" :style="{'background-image': 'url(' + item.thumbnail_url + ')'}"></span><div class="info club"><div class="name">${ item.name }</div></div></div></a></div></script><script type="text/x-template" id="incremental-result-item-user"><div class="list user" :class="{'focus': focus}"><a :href="url" class="clearfix"><div class="on" v-if="focus"><span class="image" :style="{'background-image': 'url(' + item.image_url + ')'}"></span><div class="info user"><div class="name">${ item.name }</div><div class="extra-info"><span v-if="item.payload.authority">${ item.payload.authority }<br></span>Joined: ${ item.payload.joined }</div></div></div><div class="off" v-if="!focus"><span class="image" :style="{'background-image': 'url(' + item.thumbnail_url + ')'}"></span><div class="info user"><div class="name">${ item.name }</div></div></div></a></div></script><script type="text/x-template" id="incremental-result-item-news"><div class="list news" :class="{'focus': focus}"><a :href="url" class="clearfix"><div class="on" v-if="focus"><span class="image" :style="{'background-image': 'url(' + item.image_url + ')'}"></span><div class="info news"><div class="name">${ item.name }</div><div class="extra-info">${ item.payload.date }</div></div></div><div class="off" v-if="!focus"><span class="image" :style="{'background-image': 'url(' + item.thumbnail_url + ')'}"></span><div class="info news"><div class="name">${ item.name }</div><div class="media-type">${ item.payload.date }</div></div></div></a></div></script><script type="text/x-template" id="incremental-result-item-featured"><div class="list featured" :class="{'focus': focus}"><a :href="url" class="clearfix"><div class="on" v-if="focus"><span class="image" :style="{'background-image': 'url(' + item.image_url + ')'}"></span><div class="info featured"><div class="name">${ item.name }</div><div class="extra-info">${ item.payload.date }</div></div></div><div class="off" v-if="!focus"><span class="image" :style="{'background-image': 'url(' + item.thumbnail_url + ')'}"></span><div class="info featured"><div class="name">${ item.name }</div><div class="media-type">${ item.payload.date }</div></div></div></a></div></script><script type="text/x-template" id="incremental-result-item-forum"><div class="list forum" :class="{'focus': focus}"><a :href="url" class="clearfix"><div class="on" v-if="focus"><span class="image" :style="{'background-image': 'url(' + item.image_url + ')'}"></span><div class="info forum"><div class="name"><span v-show="item.payload.work_title">${ item.payload.work_title} <i class="fa fa-caret-right"></i></span> ${ item.name }</div><div class="extra-info">${ item.payload.date }<br><span>in ${ item.payload.category }</span></div></div></div><div class="off" v-if="!focus"><span class="image" :style="{'background-image': 'url(' + item.thumbnail_url + ')'}"></span><div class="info forum"><div class="name"><span v-show="item.payload.work_title">${ item.payload.work_title} <i class="fa fa-caret-right"></i></span> ${ item.name }</div><div class="media-type">${ item.payload.date }</div></div></div></a></div></script><script type="text/x-template" id="incremental-result-item-separator"><div class="list separator"><div class="separator"><span v-show="item.name == 'anime'">Anime</span><span v-show="item.name == 'manga'">Manga</span><span v-show="item.name == 'character'">Characters</span><span v-show="item.name == 'person'">People</span></div></div></script><div id="top-search-bar"><form id="searchBar" method="get" class="searchBar" @submit.prevent="jump()"><div class="form-select-outer fl-l"><select name="type" id="topSearchValue" class="inputtext" v-model="type"><option value="all">All</option><option value="anime">Anime</option><option value="manga">Manga</option><option value="character">Characters</option><option value="person">People</option><option value="store">Manga Store</option><option value="news">News</option><option value="featured">Featured Articles</option><option value="forum">Forum</option><option value="club">Clubs</option><option value="user">Users</option></select></div><input v-model="keyword" id="topSearchText" type="text" name="keyword" class="inputtext fl-l" placeholder="Search Anime, Manga, and more..." size="30" autocomplete="off" @keydown.up.prevent="moveSelection(-1)" @keydown.down.prevent="moveSelection(1)" @focus="isFocused = true" @blur="isFocused = false"><input id="topSearchButon" class="fl-l" :class="{'notActive': (keyword.length < 3)}" type="submit" value="&#xf002"></form><div id="topSearchResultList" class="incrementalSearchResultList" :style="{display: (showResult ? 'block' : 'none')}" @mousedown.prevent=""><div v-for="(item, i) in items" @mouseover="selection=i"><component :is="resolveComponent(item)" :item="item" :focus="selection == i" :url="generateItemPageUrl(item)"></component></div><div class="list list-bottom" :class="{'focus': selection == -1}" @mouseover="selection = -1" :style="{display: (showViewAllLink ? 'block' : 'none')}"><a :href="resultPageUrl"> View all results for <span class="fw-b">${ keyword }</span><i v-show="isRequesting" class="fa fa-spinner fa-spin ml4"></i></a></div></div></div></div><div id="menu_left"> <ul id="nav"> <li class="small"><a href="#" class="non-link">Anime</a> <ul class="x-wider"> <li><a href="https://myanimelist.net/anime.php?_location=mal_h_m">Anime Search</a></li> <li><a href="https://myanimelist.net/topanime.php?_location=mal_h_m">Top Anime</a></li> <li><a href="https://myanimelist.net/anime/season?_location=mal_h_m">Seasonal Anime</a></li> <li><a href="https://myanimelist.net/watch/episode?_location=mal_h_m_a">Videos</a></li> <li><a href="https://myanimelist.net/reviews.php?t=anime&amp;_location=mal_h_m">Reviews</a></li> <li><a href="https://myanimelist.net/recommendations.php?s=recentrecs&amp;t=anime&amp;_location=mal_h_m">Recommendations</a></li> <li><a href="https://myanimelist.net/forum?topicid=1885985&amp;_location=mal_h_m">2021 Challenge</a></li><li><a href="https://fal.myanimelist.net/?utm_source=MAL&amp;utm_medium=headermenu&amp;utm_content=falfall2021&amp;_location=mal_h_m">Fantasy Anime League</a></li></ul> </li> <li class="small"><a href="#" class="non-link">Manga</a> <ul class="x-wider"> <li><a href="https://myanimelist.net/manga.php?_location=mal_h_m">Manga Search</a></li> <li><a href="https://myanimelist.net/topmanga.php?_location=mal_h_m">Top Manga</a></li> <li><a href="https://myanimelist.net/store?_location=mal_h_m">Manga Store</a></li> <li><a href="https://myanimelist.net/reviews.php?t=manga&amp;_location=mal_h_m">Reviews</a></li> <li><a href="https://myanimelist.net/recommendations.php?s=recentrecs&amp;t=manga&amp;_location=mal_h_m">Recommendations</a></li> <li><a href="https://myanimelist.net/forum?topicid=1886113&amp;_location=mal_h_m">2021 Challenge</a></li> </ul> </li> <li><a href="#" class="non-link">Community</a> <ul> <li><a href="https://myanimelist.net/forum/?_location=mal_h_m">Forums</a></li> <li><a href="https://myanimelist.net/clubs.php?_location=mal_h_m">Clubs</a></li> <li><a href="https://myanimelist.net/blog.php?_location=mal_h_m">Blogs</a></li> <li><a href="https://myanimelist.net/users.php?_location=mal_h_m">Users</a></li> </ul> </li> <li class="small2"><a href="#" class="non-link">Industry</a> <ul class="wider"> <li><a href="https://myanimelist.net/news?_location=mal_h_m">News</a></li> <li><a href="https://myanimelist.net/featured?_location=mal_h_m">Featured Articles</a></li> <li><a href="https://myanimelist.net/people.php?_location=mal_h_m">People</a></li> <li><a href="https://myanimelist.net/character.php?_location=mal_h_m">Characters</a></li> <li><a href="https://mxj.myanimelist.net/?_location=mal_h_m">MAL×Japan</a></li> </ul> </li> <li class="small"><a href="#" class="non-link">Watch</a> <ul class="wider"> <li><a href="https://myanimelist.net/watch/episode?_location=mal_h_m">Episode Videos</a></li> <li><a href="https://myanimelist.net/watch/promotion?_location=mal_h_m">Anime Trailers</a></li></ul> </li> <li class="smaller"><a href="#" class="non-link">Read</a> <ul class="wider"> <li><a href="https://myanimelist.net/store?_location=mal_h_m">Manga Store</a></li> </ul> </li> <li class="smaller"><a href="#" class="non-link">Help</a> <ul class="wide"> <li><a href="https://myanimelist.net/about.php?_location=mal_h_m">About</a></li> <li><a href="https://myanimelist.net/about.php?go=support&amp;_location=mal_h_m">Support</a></li> <li><a href="https://myanimelist.net/advertising?_location=mal_h_m">Advertising</a></li> <li><a href="https://myanimelist.net/forum/?topicid=515949&amp;_location=mal_h_m">FAQ</a></li> <li><a href="https://myanimelist.net/modules.php?go=report&amp;_location=mal_h_m">Report</a></li> <li><a href="https://myanimelist.net/about.php?go=team&amp;_location=mal_h_m">Staff</a></li><li><a href="https://myanimelist.net/membership?_location=mal_h_m">MAL Supporter</a></li> </ul> </li> </ul> </div> </div><div id="contentWrapper" itemscope itemtype="http://schema.org/Product"><div><div class="h1 edit-info"> <div class="h1-title"><div itemprop="name"><h1 class="title-name h1_bold_none"><strong>Saint Seiya: Saishuu Seisen no Senshi-tachi</strong></h1></div></div><div class="header-right"> <a href="https://myanimelist.net/login.php?from=%2Fanime%2F1260%2FSaint_Seiya__Saishuu_Seisen_no_Senshi-tachi%3Fuser-agent%3DMozilla%252F5.0%2B%2528Macintosh%253B%2BIntel%2BMac%2BOS%2BX%2B10_15_7%2529%2BAppleWebKit%252F537.36%2B%2528KHTML%252C%2Blike%2BGecko%2529%2BChrome%252F95.0.4638.69%2BSafari%252F537.36%26accept%3Dimage%252Favif%252Cimage%252Fwebp%252Cimage%252Fapng%252Cimage%252Fsvg%252Bxml%252Cimage%252F%252A%252C%252A%252F%252A%253Bq%253D0.8%26referer%3Dhttps%253A%252F%252Fmyanimelist.net%252F&amp;error=login_required" class="js-anime-edit-info-button"><i class="fa fa-pencil mr4"></i>Edit</a> <div id="editdiv" class="fw-n fs11"> <form method="GET" action="https://myanimelist.net/dbchanges.php" class="di-i"> <input type="hidden" name="aid" value="1260"> <div class="pb8">What would you like to edit?</div> <select name="t" id="t" class="inputtext"><option value="synopsis">Synopsis</option><option value="background">Background</option><option value="alternative_titles">Alternative Titles</option><option value="pic">Picture</option><option value="airingdates">Airing Dates</option><option value="producers">Producers</option><option value="relations">Relations</option><option value="rating">Rating</option><option value="duration">Duration</option><option value="source">Source</option></select> &nbsp;<input type="submit" value="Go" class="inputButton flat btn-middle"> </form> </div> </div></div></div><div id="content" > <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td class="borderClass" width="225" style="border-width: 0 1px 0 0;" valign="top"><div style="width: 225px"> <div style="text-align: center;"> <a href="https://myanimelist.net/anime/1260/Saint_Seiya__Saishuu_Seisen_no_Senshi-tachi/pics"> <img class="lazyload" data-src="https://cdn.myanimelist.net/images/anime/3/16347.jpg" alt="Saint Seiya: Saishuu Seisen no Senshi-tachi" class="ac" itemprop="image"> </a> </div> <!-- My List --> <div class="profileRows pb0"> <a href="https://myanimelist.net/login.php?from=%2Fanime%2F1260%2FSaint_Seiya__Saishuu_Seisen_no_Senshi-tachi%3Fuser-agent%3DMozilla%252F5.0%2B%2528Macintosh%253B%2BIntel%2BMac%2BOS%2BX%2B10_15_7%2529%2BAppleWebKit%252F537.36%2B%2528KHTML%252C%2Blike%2BGecko%2529%2BChrome%252F95.0.4638.69%2BSafari%252F537.36%26accept%3Dimage%252Favif%252Cimage%252Fwebp%252Cimage%252Fapng%252Cimage%252Fsvg%252Bxml%252Cimage%252F%252A%252C%252A%252F%252A%253Bq%253D0.8%26referer%3Dhttps%253A%252F%252Fmyanimelist.net%252F&amp;error=login_required">Add to My List</a> </div> <div id="addtolist" class="addtolist-block js-anime-addtolist-block" style="display: none;"> <input type="hidden" id="myinfo_anime_id" value="1260"> <input type="hidden" id="myinfo_curstatus" value=""> <span class="notice_open_public pb4">* Your list is public by default.</span> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td class="spaceit">Status:</td> <td class="spaceit"> <select name="myinfo_status" id="myinfo_status" class="inputtext js-anime-status-dropdown"><option value="1">Watching</option><option selected="selected" value="2">Completed</option><option value="3">On-Hold</option><option value="4">Dropped</option><option value="6">Plan to Watch</option></select> </td> </tr> <tr> <td class="spaceit">Eps Seen:</td> <td class="spaceit"> <input type="text" id="myinfo_watchedeps" name="myinfo_watchedeps" size="3" class="inputtext" value="1"> / <span id="curEps">1</span></td> </tr> <tr> <td class="spaceit">Your Score:</td> <td class="spaceit"> <select name="myinfo_score" id="myinfo_score" class="inputtext"><option value="0">Select</option><option selected="selected" value="10">(10) Masterpiece</option><option value="9">(9) Great</option><option value="8">(8) Very Good</option><option value="7">(7) Good</option><option value="6">(6) Fine</option><option value="5">(5) Average</option><option value="4">(4) Bad</option><option value="3">(3) Very Bad</option><option value="2">(2) Horrible</option><option value="1">(1) Appalling</option></select> </td> </tr> <tr> <td>&nbsp;</td> <td> <input type="button" name="myinfo_submit" value="Add" class="inputButton btn-middle flat js-anime-add-button"> <span id="addtolistresult"><a href="https://myanimelist.net/ownlist/anime/add?selected_series_id=1260">Add Detailed Info</a></span> </td> </tr> </table> <div id="myinfoDisplay" style="padding-left: 89px; margin-top: 3px;"></div> </div> <!-- end My List --> <div id="profileRows" class="pt0"><a href="https://myanimelist.net/login.php?from=%2Fanime%2F1260%2FSaint_Seiya__Saishuu_Seisen_no_Senshi-tachi%3Fuser-agent%3DMozilla%252F5.0%2B%2528Macintosh%253B%2BIntel%2BMac%2BOS%2BX%2B10_15_7%2529%2BAppleWebKit%252F537.36%2B%2528KHTML%252C%2Blike%2BGecko%2529%2BChrome%252F95.0.4638.69%2BSafari%252F537.36%26accept%3Dimage%252Favif%252Cimage%252Fwebp%252Cimage%252Fapng%252Cimage%252Fsvg%252Bxml%252Cimage%252F%252A%252C%252A%252F%252A%253Bq%253D0.8%26referer%3Dhttps%253A%252F%252Fmyanimelist.net%252F&amp;error=login_required" style="font-weight:normal;">Add to Favorites</a></div> <div class="js-sns-icon-container icon-block mt8"><a data-ga-network="facebook" data-ga-screen="Share Button Location: common" class="js-share-button-popup js-share-button-tracking sprite-icon-social icon-social icon-facebook" target="_blank" href="http://www.facebook.com/share.php?u=https%3A%2F%2Fmyanimelist.net%2Fanime%2F1260%2FSaint_Seiya__Saishuu_Seisen_no_Senshi-tachi"></a><a data-ga-network="twitter" data-ga-screen="Share Button Location: common" class="js-share-button-popup js-share-button-tracking sprite-icon-social icon-social icon-twitter" target="_blank" href="http://twitter.com/share?related=MyAnimeList.net&amp;via=myanimelist&amp;url=https%3A%2F%2Fmyanimelist.net%2Fanime%2F1260%2FSaint_Seiya__Saishuu_Seisen_no_Senshi-tachi&amp;text=Saint%20Seiya%3A%20Saishuu%20Seisen%20no%20Senshi-tachi&amp;hashtags=anime"></a><a data-ga-network="reddit" data-ga-screen="Share Button Location: common" class="js-share-button-popup js-share-button-tracking sprite-icon-social icon-social icon-reddit" target="_blank" href="http://reddit.com/submit?url=https%3A%2F%2Fmyanimelist.net%2Fanime%2F1260%2FSaint_Seiya__Saishuu_Seisen_no_Senshi-tachi&amp;title=Saint%20Seiya%3A%20Saishuu%20Seisen%20no%20Senshi-tachi"></a><a data-ga-network="tumblr" data-ga-screen="Share Button Location: common" class="js-share-button-popup js-share-button-tracking sprite-icon-social icon-social icon-tumblr" target="_blank" href="http://www.tumblr.com/share/link?url=https%3A%2F%2Fmyanimelist.net%2Fanime%2F1260%2FSaint_Seiya__Saishuu_Seisen_no_Senshi-tachi&amp;name=Saint%20Seiya%3A%20Saishuu%20Seisen%20no%20Senshi-tachi"></a></div> <br /> <h2>Alternative Titles</h2><div class="spaceit_pad"> <span class="dark_text">Synonyms:</span> Saint Seiya: Saishuu Seisen no Senshi Tachi, Saint Seiya: Warriors of the Final Holy Battle </div><div class="spaceit_pad"> <span class="dark_text">Japanese:</span> 聖闘士星矢 最終聖戦の戦士たち </div><br /> <h2>Information</h2> <div class="spaceit_pad"> <span class="dark_text">Type:</span> <a href="https://myanimelist.net/topanime.php?type=movie">Movie</a></div> <div class="spaceit_pad"> <span class="dark_text">Episodes:</span> 1 </div> <div class="spaceit_pad"> <span class="dark_text">Status:</span> Finished Airing </div> <div class="spaceit_pad"> <span class="dark_text">Aired:</span> Mar 18, 1989 </div> <div class="spaceit_pad"> <span class="dark_text">Producers:</span> None found, <a href="https://myanimelist.net/dbchanges.php?aid=1260&amp;t=producers">add some</a> </div> <div class="spaceit_pad"> <span class="dark_text">Licensors:</span> <a href="/anime/producer/467/Discotek_Media" title="Discotek Media">Discotek Media</a> </div> <div class="spaceit_pad"> <span class="dark_text">Studios:</span> <a href="/anime/producer/18/Toei_Animation" title="Toei Animation">Toei Animation</a> </div> <div class="spaceit_pad"> <span class="dark_text">Source:</span> Unknown </div> <div class="spaceit_pad"> <span class="dark_text">Genres:</span> <span itemprop="genre" style="display: none">Adventure</span><a href="/anime/genre/2/Adventure" title="Adventure">Adventure</a>, <span itemprop="genre" style="display: none">Sci-Fi</span><a href="/anime/genre/24/Sci-Fi" title="Sci-Fi">Sci-Fi</a> </div> <div class="spaceit_pad"> <span class="dark_text">Demographic:</span> <span itemprop="genre" style="display: none">Shounen</span><a href="/anime/genre/27/Shounen" title="Shounen">Shounen</a> </div> <div class="spaceit_pad"> <span class="dark_text">Duration:</span> 45 min. </div> <div class="spaceit_pad"> <span class="dark_text">Rating:</span> PG-13 - Teens 13 or older </div> <br /> <h2>Statistics</h2> <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating" class="spaceit_pad po-r js-statistics-info di-ib" data-id="info1"> <span class="dark_text">Score:</span> <span itemprop="ratingValue" class="score-label score-6">6.78</span><sup>1</sup> (scored by <span itemprop="ratingCount" style="display: none">8049</span>8,049 users) <meta itemprop="bestRating" content="10"> <meta itemprop="worstRating" content="1"> <div class="statistics-info info1"> <small><sup>1</sup> indicates a <a href="javascript:void(0);" onclick="window.open('/info.php?go=topanime','topanime','menubar=no,scrollbars=no,status=no,width=500,height=380');">weighted score</a>. </small> </div> </div> <div class="spaceit_pad po-r js-statistics-info di-ib" data-id="info2"> <span class="dark_text">Ranked:</span> #4721<sup>2</sup> <div class="statistics-info info2"> <small><sup>2</sup> based on the <a href="/topanime.php">top anime</a> page. Please note that 'Not yet aired' and 'R18+' titles are excluded. </small> </div> </div> <div class="spaceit_pad"> <span class="dark_text">Popularity:</span> #4583 </div> <div class="spaceit_pad"> <span class="dark_text">Members:</span> 14,360 </div> <div class="spaceit_pad"> <span class="dark_text">Favorites:</span> 14 </div> <br /> <h2>External Links</h2> <div class="pb16"><a href="http://anidb.info/perl-bin/animedb.pl?show=anime&amp;aid=1889" target="_blank">AnimeDB</a>, <a href="http://www.animenewsnetwork.com/encyclopedia/anime.php?id=3332" target="_blank">AnimeNewsNetwork</a></div> <div class="clearfix mauto mt16" style="width:160px;padding-right:10px"> </div> </div></td><td valign="top" style="padding-left: 5px;"><div class="js-scrollfix-bottom-rel"><div style="width:728px; margin:0 auto"></div><a name="lower"></a> <div id="horiznav_nav" style="margin: 5px 0 10px 0;"> <ul style="margin-right: 0; padding-right: 0;"> <li><a href="https://myanimelist.net/anime/1260/Saint_Seiya__Saishuu_Seisen_no_Senshi-tachi" class="horiznav_active">Details</a> </li> <li><a href="/anime/1260/Saint_Seiya__Saishuu_Seisen_no_Senshi-tachi/video">Videos</a> </li> <li><a href="https://myanimelist.net/anime/1260/Saint_Seiya__Saishuu_Seisen_no_Senshi-tachi/reviews">Reviews</a> </li> <li><a href="https://myanimelist.net/anime/1260/Saint_Seiya__Saishuu_Seisen_no_Senshi-tachi/userrecs">Recommendations</a> </li> <li><a href="https://myanimelist.net/anime/1260/Saint_Seiya__Saishuu_Seisen_no_Senshi-tachi/stats">Stats</a> </li> <li><a href="https://myanimelist.net/anime/1260/Saint_Seiya__Saishuu_Seisen_no_Senshi-tachi/characters">Characters &amp; Staff</a> </li> <li><a href="https://myanimelist.net/anime/1260/Saint_Seiya__Saishuu_Seisen_no_Senshi-tachi/news">News</a> </li> <li><a href="https://myanimelist.net/anime/1260/Saint_Seiya__Saishuu_Seisen_no_Senshi-tachi/forum">Forum</a> </li> <li><a href="https://myanimelist.net/anime/1260/Saint_Seiya__Saishuu_Seisen_no_Senshi-tachi/clubs">Clubs</a> </li> <li><a href="https://myanimelist.net/anime/1260/Saint_Seiya__Saishuu_Seisen_no_Senshi-tachi/pics">Pictures</a> </li> </ul> </div> <div class="breadcrumb " itemscope itemtype="http://schema.org/BreadcrumbList"><div class="di-ib" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="https://myanimelist.net/" itemprop="item"><span itemprop="name"> Top </span></a><meta itemprop="position" content="1"></div>&nbsp; &gt; &nbsp;<div class="di-ib" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="https://myanimelist.net/anime.php" itemprop="item"><span itemprop="name"> Anime </span></a><meta itemprop="position" content="2"></div>&nbsp; &gt; &nbsp;<div class="di-ib" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="https://myanimelist.net/anime/1260/Saint_Seiya__Saishuu_Seisen_no_Senshi-tachi" itemprop="item"><span itemprop="name"> Saint Seiya: Saishuu Seisen no... </span></a><meta itemprop="position" content="3"></div></div> <table border="0" cellspacing="0" cellpadding="0" width="100%"> <tr> <td valign="top"><div class="pb16"><div class="di-t w100 mt12"><div class="anime-detail-header-stats di-tc va-t "><div class="stats-block po-r clearfix"><div class="fl-l score" data-title="score" data-user="8,049 users" title="indicates a weighted score. Please note that 'Not yet aired' titles are excluded."><div class="score-label score-6">6.78</div></div><div class="di-ib ml12 pl20 pt8"><span class="numbers ranked" title="based on the top anime page. Please note that 'Not yet aired' and 'R18+' titles are excluded.">Ranked <strong>#4721</strong></span><span class="numbers popularity">Popularity <strong>#4583</strong></span><span class="numbers members">Members <strong>14,360</strong></span></div><div class="information-block di-ib clearfix"><span class="information type"><a href="https://myanimelist.net/topanime.php?type=movie">Movie</a></span><span class="information studio author"><a href="/anime/producer/18/Toei_Animation" title="Toei Animation">Toei Animation</a></span></div></div><div class="user-status-block js-user-status-block fn-grey6 clearfix al mt8 po-r"><input type="hidden" id="myinfo_anime_id" value="1260"><input type="hidden" id="myinfo_curstatus" value=""><a href="https://myanimelist.net/login.php?from=%2Fanime%2F1260%2FSaint_Seiya__Saishuu_Seisen_no_Senshi-tachi%3Fuser-agent%3DMozilla%252F5.0%2B%2528Macintosh%253B%2BIntel%2BMac%2BOS%2BX%2B10_15_7%2529%2BAppleWebKit%252F537.36%2B%2528KHTML%252C%2Blike%2BGecko%2529%2BChrome%252F95.0.4638.69%2BSafari%252F537.36%26accept%3Dimage%252Favif%252Cimage%252Fwebp%252Cimage%252Fapng%252Cimage%252Fsvg%252Bxml%252Cimage%252F%252A%252C%252A%252F%252A%253Bq%253D0.8%26referer%3Dhttps%253A%252F%252Fmyanimelist.net%252F&amp;error=login_required" class="btn-user-status-add-list">Add to List</a><select name="myinfo_score" id="myinfo_score" class="form-user-score js-form-user-score ml8" disabled="disabled"><option value="0">Select</option><option selected="selected" value="10">(10) Masterpiece</option><option value="9">(9) Great</option><option value="8">(8) Very Good</option><option value="7">(7) Good</option><option value="6">(6) Fine</option><option value="5">(5) Average</option><option value="4">(4) Bad</option><option value="3">(3) Very Bad</option><option value="2">(2) Horrible</option><option value="1">(1) Appalling</option></select><div class="di-ib form-user-episode ml8 disabled"> Episodes: <input type="text" id="myinfo_watchedeps" name="myinfo_watchedeps" size="3" class="inputtext js-user-episode-seen" value="1" disabled>/<span id="curEps" data-num="1">1</span><a href="javascript:void(0);" class="js-btn-count increase ml4"><i class="fa fa-plus-circle"></i></a></div></div><span class="notice_open_public pt4">* Your list is public by default.</span></div></div><div class="js-myinfo-error badresult-text al pb4" style="display:none;"></div> </div><div><div class="floatRightHeader"><a href="/dbchanges.php?aid=1260&t=synopsis" style="font-weight: normal;">Edit</a></div><h2>Synopsis</h2></div><p itemprop="description">Lucifer has been awoken from his eternal slumber by the spirits of Eris, Abel and Poseidon. He has come to kill Athena and fulfill his heart's burning desire: becoming the strongest of all the gods.<br /> <br /> (Source: ANN)</p><div style="margin-top: 15px;"><div class="floatRightHeader"><a href="/dbchanges.php?aid=1260&t=background" style="font-weight: normal;">Edit</a></div><h2>Background</h2></div>No background information has been added to this title. Help improve our database by adding background information <a href="/dbchanges.php?aid=1260&t=background">here</a>.<br><div class="border_top" style="padding:16px 0px 0px 0px;margin:14px 0px 0px 0px;"><div style="padding: 20px 0 20px 40px; float: left; position: relative; z-index: 1;"> <div class="mal-ad-unit" data-ad-width="300" data-ad-height="250"> <div id="D_300x250_1" class="ad-sas mauto ac" data-ad-target="anime_id=1260;display=details;country=US" data-ad-id="99455" data-ad-pid="1362568" data-ad-sid="394613"></div> </div> </div><div style="padding: 20px 40px 20px 0; float: right; position: relative;"> <div class="mal-ad-unit" data-ad-width="300" data-ad-height="250"> <div id="D_300x250_2" class="ad-sas mauto ac" data-ad-target="anime_id=1260;display=details;country=US" data-ad-id="99456" data-ad-pid="1362568" data-ad-sid="394613"></div> </div> </div></div></td></tr><tr><td class="pb24"> <div class="widget-content"> <h2><div class="floatRightHeader"> <a href="https://mxj.myanimelist.net/" style="font-weight: normal; font-size: 11px;">Visit MALxJapan</a> </div>MALxJapan -More than just anime-</h2> <div class="widget mxj right"> <div class="widget-header"> </div> <div class="widget-content"> <a href="https://mxj.myanimelist.net/live/iRis9th/?utm_source=MALTOPMJ&amp;utm_medium=MJevent&amp;utm_content=iRis9th"> <div class="content anime-mxj"> <div class="image"><img src="https://cdn.myanimelist.net/images/mxj/20211028/iris.jpg"></div> <div class="text">Watch the i☆Ris 9th Anniversary Concert from home</div> </div> </a> <a href="https://mxj.myanimelist.net/live/gakuto1stonemanlive/"> <div class="content anime-mxj"> <div class="image"><img src="https://cdn.myanimelist.net/images/mxj/20211104/kajiwara.jpg"></div> <div class="text">Stream Gakuto Kajiwara&#039;s First Ever Solo Concert</div> </div> </a> <a href="https://myanimelist.net/featured/2369/?utm_source=MALTOPMJ&amp;utm_medium=MJevent&amp;utm_content=writingcontest"> <div class="content anime-mxj"> <div class="image"><img src="https://cdn.myanimelist.net/images/mxj/20211025/prompt5.png"></div> <div class="text">Which Web Novel Should Become Published Manga?</div> </div> </a> </div> </div> </div> </td></tr><tr><td class="pb24"><br><div><div class="floatRightHeader"><a href="/dbchanges.php?aid=1260&t=relations" style="font-weight: normal;">Edit</a></div><h2>Related Anime</h2></div><table class="anime_detail_related_anime" style="border-spacing:0px;"><tr><td nowrap="" valign="top" class="ar fw-n borderClass">Parent story:</td><td width="100%" class="borderClass"><a href="/anime/1254/Saint_Seiya">Saint Seiya</a></td></table><br><div><div class="floatRightHeader"><a href="/anime/1260/Saint_Seiya__Saishuu_Seisen_no_Senshi-tachi/characters" style="font-weight: normal;">More characters</a></div><h2>Characters & Voice Actors</h2></div><div class="detail-characters-list clearfix"><div class="left-column fl-l divider" style="width:392px;"><table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td valign="top" width="27" class="ac borderClass"> <div class="picSurround"> <a href="https://myanimelist.net/character/5923/Ikki_Phoenix" class="fw-n"> <img alt="Phoenix, Ikki" width="42" height="62" data-src="https://cdn.myanimelist.net/r/42x62/images/characters/6/253759.jpg?s=df9a69ff03365fc0e2cdfbd09d5bf986" data-srcset="https://cdn.myanimelist.net/r/42x62/images/characters/6/253759.jpg?s=df9a69ff03365fc0e2cdfbd09d5bf986 1x, https://cdn.myanimelist.net/r/84x124/images/characters/6/253759.jpg?s=603c6cbb3139d11c0403015817c15a68 2x" class="lazyload" /> </a> </div> </td> <td valign="top" class="borderClass"> <h3 class="h3_characters_voice_actors"><a href="https://myanimelist.net/character/5923/Ikki_Phoenix">Phoenix, Ikki</a></h3> <div class="spaceit_pad"> <small>Main</small> </div> </td> <td align="right" valign="top" class="borderClass"> <table border="0" cellpadding="0" cellspacing="0"><tr> <td class="va-t ar pl4 pr4"> <a href="https://myanimelist.net/people/1027/Hideyuki_Hori">Hori, Hideyuki</a><br> <small>Japanese</small> </td> <td valign="top"> <div class="picSurround"> <a href="https://myanimelist.net/people/1027/Hideyuki_Hori"> <img alt="Hori, Hideyuki" width="42" height="62" data-src="https://cdn.myanimelist.net/r/42x62/images/voiceactors/3/27069.jpg?s=56d4ba18460ad692885d9d10868201a3" data-srcset="https://cdn.myanimelist.net/r/42x62/images/voiceactors/3/27069.jpg?s=56d4ba18460ad692885d9d10868201a3 1x, https://cdn.myanimelist.net/r/84x124/images/voiceactors/3/27069.jpg?s=f961dcd807299686c5b4b6ece61f62ce 2x" class="lazyload" /> </a> </div> </td> </tr></table> </td> </tr> </table><table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td valign="top" width="27" class="ac borderClass"> <div class="picSurround"> <a href="https://myanimelist.net/character/5922/Shiryuu_Dragon" class="fw-n"> <img alt="Dragon, Shiryuu" width="42" height="62" data-src="https://cdn.myanimelist.net/r/42x62/images/characters/9/73690.jpg?s=340f46ce20e67f987dec73d7402802b1" data-srcset="https://cdn.myanimelist.net/r/42x62/images/characters/9/73690.jpg?s=340f46ce20e67f987dec73d7402802b1 1x, https://cdn.myanimelist.net/r/84x124/images/characters/9/73690.jpg?s=f636baf0f2909832a6389e7d17256aed 2x" class="lazyload" /> </a> </div> </td> <td valign="top" class="borderClass"> <h3 class="h3_characters_voice_actors"><a href="https://myanimelist.net/character/5922/Shiryuu_Dragon">Dragon, Shiryuu</a></h3> <div class="spaceit_pad"> <small>Main</small> </div> </td> <td align="right" valign="top" class="borderClass"> <table border="0" cellpadding="0" cellspacing="0"><tr> <td class="va-t ar pl4 pr4"> <a href="https://myanimelist.net/people/572/Hirotaka_Suzuoki">Suzuoki, Hirotaka</a><br> <small>Japanese</small> </td> <td valign="top"> <div class="picSurround"> <a href="https://myanimelist.net/people/572/Hirotaka_Suzuoki"> <img alt="Suzuoki, Hirotaka" width="42" height="62" data-src="https://cdn.myanimelist.net/r/42x62/images/voiceactors/1/49522.jpg?s=22a4ba96a91fb1f7ee7f6ab2bbf08af9" data-srcset="https://cdn.myanimelist.net/r/42x62/images/voiceactors/1/49522.jpg?s=22a4ba96a91fb1f7ee7f6ab2bbf08af9 1x, https://cdn.myanimelist.net/r/84x124/images/voiceactors/1/49522.jpg?s=7b454eaa0d58f02244342dbe1ca923cb 2x" class="lazyload" /> </a> </div> </td> </tr></table> </td> </tr> </table><table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td valign="top" width="27" class="ac borderClass"> <div class="picSurround"> <a href="https://myanimelist.net/character/2285/Seiya_Pegasus" class="fw-n"> <img alt="Pegasus, Seiya" width="42" height="62" data-src="https://cdn.myanimelist.net/r/42x62/images/characters/16/209321.jpg?s=33121e32e1fb32edd94f94053ffa7ed3" data-srcset="https://cdn.myanimelist.net/r/42x62/images/characters/16/209321.jpg?s=33121e32e1fb32edd94f94053ffa7ed3 1x, https://cdn.myanimelist.net/r/84x124/images/characters/16/209321.jpg?s=6c2995c70ab70a11eb6fbc441c3c1c4a 2x" class="lazyload" /> </a> </div> </td> <td valign="top" class="borderClass"> <h3 class="h3_characters_voice_actors"><a href="https://myanimelist.net/character/2285/Seiya_Pegasus">Pegasus, Seiya</a></h3> <div class="spaceit_pad"> <small>Main</small> </div> </td> <td align="right" valign="top" class="borderClass"> <table border="0" cellpadding="0" cellspacing="0"><tr> <td class="va-t ar pl4 pr4"> <a href="https://myanimelist.net/people/326/Toru_Furuya">Furuya, Toru</a><br> <small>Japanese</small> </td> <td valign="top"> <div class="picSurround"> <a href="https://myanimelist.net/people/326/Toru_Furuya"> <img alt="Furuya, Toru" width="42" height="62" data-src="https://cdn.myanimelist.net/r/42x62/images/voiceactors/2/65061.jpg?s=ee95a10b9ad71e8b9f6e870f032e72a6" data-srcset="https://cdn.myanimelist.net/r/42x62/images/voiceactors/2/65061.jpg?s=ee95a10b9ad71e8b9f6e870f032e72a6 1x, https://cdn.myanimelist.net/r/84x124/images/voiceactors/2/65061.jpg?s=4cd70931f96fb4a4ee86eb8e2ef01b4a 2x" class="lazyload" /> </a> </div> </td> </tr></table> </td> </tr> </table><table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td valign="top" width="27" class="ac borderClass"> <div class="picSurround"> <a href="https://myanimelist.net/character/2440/Shun_Andromeda" class="fw-n"> <img alt="Andromeda, Shun" width="42" height="62" data-src="https://cdn.myanimelist.net/r/42x62/images/characters/11/74120.jpg?s=b3bd29653ac48b9102f847ac35ef403e" data-srcset="https://cdn.myanimelist.net/r/42x62/images/characters/11/74120.jpg?s=b3bd29653ac48b9102f847ac35ef403e 1x, https://cdn.myanimelist.net/r/84x124/images/characters/11/74120.jpg?s=fd4c287c4eb05ae92447b89a714eb579 2x" class="lazyload" /> </a> </div> </td> <td valign="top" class="borderClass"> <h3 class="h3_characters_voice_actors"><a href="https://myanimelist.net/character/2440/Shun_Andromeda">Andromeda, Shun</a></h3> <div class="spaceit_pad"> <small>Main</small> </div> </td> <td align="right" valign="top" class="borderClass"> <table border="0" cellpadding="0" cellspacing="0"><tr> <td class="va-t ar pl4 pr4"> <a href="https://myanimelist.net/people/518/Ryo_Horikawa">Horikawa, Ryo</a><br> <small>Japanese</small> </td> <td valign="top"> <div class="picSurround"> <a href="https://myanimelist.net/people/518/Ryo_Horikawa"> <img alt="Horikawa, Ryo" width="42" height="62" data-src="https://cdn.myanimelist.net/r/42x62/images/voiceactors/1/59239.jpg?s=ed604c9872785c3872822eaeac769c98" data-srcset="https://cdn.myanimelist.net/r/42x62/images/voiceactors/1/59239.jpg?s=ed604c9872785c3872822eaeac769c98 1x, https://cdn.myanimelist.net/r/84x124/images/voiceactors/1/59239.jpg?s=8e241bed0e74251a869d31b265171d37 2x" class="lazyload" /> </a> </div> </td> </tr></table> </td> </tr> </table><table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td valign="top" width="27" class="ac borderClass"> <div class="picSurround"> <a href="https://myanimelist.net/character/5921/Hyouga_Cygnus" class="fw-n"> <img alt="Cygnus, Hyouga" width="42" height="62" data-src="https://cdn.myanimelist.net/r/42x62/images/characters/3/73686.jpg?s=e1d353fed2a4d2820407b872e458ed8b" data-srcset="https://cdn.myanimelist.net/r/42x62/images/characters/3/73686.jpg?s=e1d353fed2a4d2820407b872e458ed8b 1x, https://cdn.myanimelist.net/r/84x124/images/characters/3/73686.jpg?s=23d43061874fc5be372362fd8f969f4d 2x" class="lazyload" /> </a> </div> </td> <td valign="top" class="borderClass"> <h3 class="h3_characters_voice_actors"><a href="https://myanimelist.net/character/5921/Hyouga_Cygnus">Cygnus, Hyouga</a></h3> <div class="spaceit_pad"> <small>Main</small> </div> </td> <td align="right" valign="top" class="borderClass"> <table border="0" cellpadding="0" cellspacing="0"><tr> <td class="va-t ar pl4 pr4"> <a href="https://myanimelist.net/people/837/Kouichi_Hashimoto">Hashimoto, Kouichi</a><br> <small>Japanese</small> </td> <td valign="top"> <div class="picSurround"> <a href="https://myanimelist.net/people/837/Kouichi_Hashimoto"> <img alt="Hashimoto, Kouichi" width="42" height="62" data-src="https://cdn.myanimelist.net/r/42x62/images/voiceactors/2/35487.jpg?s=72826e3e7e45aaba854beb711d51354b" data-srcset="https://cdn.myanimelist.net/r/42x62/images/voiceactors/2/35487.jpg?s=72826e3e7e45aaba854beb711d51354b 1x, https://cdn.myanimelist.net/r/84x124/images/voiceactors/2/35487.jpg?s=d0b3ea944d27e2b38a112912f95d3349 2x" class="lazyload" /> </a> </div> </td> </tr></table> </td> </tr> </table></div><div class="left-right fl-r" style="width:392px;"><table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td valign="top" width="27" class="ac borderClass"> <div class="picSurround"> <a href="https://myanimelist.net/character/29997/Lucifer" class="fw-n"> <img alt="Lucifer" width="42" height="62" data-src="https://cdn.myanimelist.net/r/42x62/images/characters/2/78589.jpg?s=0d62d122e3bb2d261507ec498754b340" data-srcset="https://cdn.myanimelist.net/r/42x62/images/characters/2/78589.jpg?s=0d62d122e3bb2d261507ec498754b340 1x, https://cdn.myanimelist.net/r/84x124/images/characters/2/78589.jpg?s=29e19551bd0249d9a057e56b9d12849e 2x" class="lazyload" /> </a> </div> </td> <td valign="top" class="borderClass"> <h3 class="h3_characters_voice_actors"><a href="https://myanimelist.net/character/29997/Lucifer">Lucifer</a></h3> <div class="spaceit_pad"> <small>Main</small> </div> </td> <td align="right" valign="top" class="borderClass"> <table border="0" cellpadding="0" cellspacing="0"><tr> <td class="va-t ar pl4 pr4"> <a href="https://myanimelist.net/people/1566/Masane_Tsukayama">Tsukayama, Masane</a><br> <small>Japanese</small> </td> <td valign="top"> <div class="picSurround"> <a href="https://myanimelist.net/people/1566/Masane_Tsukayama"> <img alt="Tsukayama, Masane" width="42" height="62" data-src="https://cdn.myanimelist.net/r/42x62/images/voiceactors/3/15899.jpg?s=ada1c966f6330bfb32cbdda2771e60ca" data-srcset="https://cdn.myanimelist.net/r/42x62/images/voiceactors/3/15899.jpg?s=ada1c966f6330bfb32cbdda2771e60ca 1x, https://cdn.myanimelist.net/r/84x124/images/voiceactors/3/15899.jpg?s=d6a24d50a0a876e9958930d2e664d507 2x" class="lazyload" /> </a> </div> </td> </tr></table> </td> </tr> </table><table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td valign="top" width="27" class="ac borderClass"> <div class="picSurround"> <a href="https://myanimelist.net/character/9240/Shaka_Virgo" class="fw-n"> <img alt="Virgo, Shaka" width="42" height="62" data-src="https://cdn.myanimelist.net/r/42x62/images/characters/2/290898.jpg?s=dfa343705588341dd212ba2747866153" data-srcset="https://cdn.myanimelist.net/r/42x62/images/characters/2/290898.jpg?s=dfa343705588341dd212ba2747866153 1x, https://cdn.myanimelist.net/r/84x124/images/characters/2/290898.jpg?s=ca08a88fa94e2e6c7b91d0219a3f1b33 2x" class="lazyload" /> </a> </div> </td> <td valign="top" class="borderClass"> <h3 class="h3_characters_voice_actors"><a href="https://myanimelist.net/character/9240/Shaka_Virgo">Virgo, Shaka</a></h3> <div class="spaceit_pad"> <small>Supporting</small> </div> </td> <td align="right" valign="top" class="borderClass"> <table border="0" cellpadding="0" cellspacing="0"></table> </td> </tr> </table><table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td valign="top" width="27" class="ac borderClass"> <div class="picSurround"> <a href="https://myanimelist.net/character/8838/Muu_Aries" class="fw-n"> <img alt="Aries, Muu" width="42" height="62" data-src="https://cdn.myanimelist.net/r/42x62/images/characters/7/100769.jpg?s=d2ebd7c5302e0cba9ff15966e63bd964" data-srcset="https://cdn.myanimelist.net/r/42x62/images/characters/7/100769.jpg?s=d2ebd7c5302e0cba9ff15966e63bd964 1x, https://cdn.myanimelist.net/r/84x124/images/characters/7/100769.jpg?s=2000f709e732339efe3518987dfa51fd 2x" class="lazyload" /> </a> </div> </td> <td valign="top" class="borderClass"> <h3 class="h3_characters_voice_actors"><a href="https://myanimelist.net/character/8838/Muu_Aries">Aries, Muu</a></h3> <div class="spaceit_pad"> <small>Supporting</small> </div> </td> <td align="right" valign="top" class="borderClass"> <table border="0" cellpadding="0" cellspacing="0"><tr> <td class="va-t ar pl4 pr4"> <a href="https://myanimelist.net/people/424/Kaneto_Shiozawa">Shiozawa, Kaneto</a><br> <small>Japanese</small> </td> <td valign="top"> <div class="picSurround"> <a href="https://myanimelist.net/people/424/Kaneto_Shiozawa"> <img alt="Shiozawa, Kaneto" width="42" height="62" data-src="https://cdn.myanimelist.net/r/42x62/images/voiceactors/2/12357.jpg?s=243dba5e8605031f9173f9efb2c371b6" data-srcset="https://cdn.myanimelist.net/r/42x62/images/voiceactors/2/12357.jpg?s=243dba5e8605031f9173f9efb2c371b6 1x, https://cdn.myanimelist.net/r/84x124/images/voiceactors/2/12357.jpg?s=f88a39a102e2fca25baacb0ab350d7a9 2x" class="lazyload" /> </a> </div> </td> </tr></table> </td> </tr> </table><table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td valign="top" width="27" class="ac borderClass"> <div class="picSurround"> <a href="https://myanimelist.net/character/9519/Aiolia_Leo" class="fw-n"> <img alt="Leo, Aiolia" width="42" height="62" data-src="https://cdn.myanimelist.net/r/42x62/images/characters/4/292220.jpg?s=75bece78507c51f1d285f7c61ba5b6e0" data-srcset="https://cdn.myanimelist.net/r/42x62/images/characters/4/292220.jpg?s=75bece78507c51f1d285f7c61ba5b6e0 1x, https://cdn.myanimelist.net/r/84x124/images/characters/4/292220.jpg?s=f5b4167ff5faae4f8f279c3528323151 2x" class="lazyload" /> </a> </div> </td> <td valign="top" class="borderClass"> <h3 class="h3_characters_voice_actors"><a href="https://myanimelist.net/character/9519/Aiolia_Leo">Leo, Aiolia</a></h3> <div class="spaceit_pad"> <small>Supporting</small> </div> </td> <td align="right" valign="top" class="borderClass"> <table border="0" cellpadding="0" cellspacing="0"><tr> <td class="va-t ar pl4 pr4"> <a href="https://myanimelist.net/people/234/Hideyuki_Tanaka">Tanaka, Hideyuki</a><br> <small>Japanese</small> </td> <td valign="top"> <div class="picSurround"> <a href="https://myanimelist.net/people/234/Hideyuki_Tanaka"> <img alt="Tanaka, Hideyuki" width="42" height="62" data-src="https://cdn.myanimelist.net/r/42x62/images/voiceactors/3/55048.jpg?s=f182d8cc9f5e25f9556cc4a3bc01b892" data-srcset="https://cdn.myanimelist.net/r/42x62/images/voiceactors/3/55048.jpg?s=f182d8cc9f5e25f9556cc4a3bc01b892 1x, https://cdn.myanimelist.net/r/84x124/images/voiceactors/3/55048.jpg?s=248ae7ea03c28a7ffe50175c5c2f5664 2x" class="lazyload" /> </a> </div> </td> </tr></table> </td> </tr> </table><table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td valign="top" width="27" class="ac borderClass"> <div class="picSurround"> <a href="https://myanimelist.net/character/8766/Milo_Scorpio" class="fw-n"> <img alt="Scorpio, Milo" width="42" height="62" data-src="https://cdn.myanimelist.net/r/42x62/images/characters/7/225607.jpg?s=67f5f0cd1517916004d48decae518922" data-srcset="https://cdn.myanimelist.net/r/42x62/images/characters/7/225607.jpg?s=67f5f0cd1517916004d48decae518922 1x, https://cdn.myanimelist.net/r/84x124/images/characters/7/225607.jpg?s=5dbce0fcd142365ab11af2bb20e0b3d8 2x" class="lazyload" /> </a> </div> </td> <td valign="top" class="borderClass"> <h3 class="h3_characters_voice_actors"><a href="https://myanimelist.net/character/8766/Milo_Scorpio">Scorpio, Milo</a></h3> <div class="spaceit_pad"> <small>Supporting</small> </div> </td> <td align="right" valign="top" class="borderClass"> <table border="0" cellpadding="0" cellspacing="0"></table> </td> </tr> </table></div></div> <div style="padding: 20px 40px;display: inline-block;"></div><div style="padding: 20px 0px;display: inline-block;"></div><br> <a name="staff"></a> <div> <div class="floatRightHeader"><a href="https://myanimelist.net/anime/1260/Saint_Seiya__Saishuu_Seisen_no_Senshi-tachi/characters#staff">More staff</a></div> <h2>Staff</h2> </div> <div class="detail-characters-list clearfix"><div class="left-column fl-l divider" style="width:392px;"><table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td valign="top" width="27" class="ac borderClass"> <div class="picSurround"> <a href="https://myanimelist.net/people/6459/Shigeyasu_Yamauchi" class="fw-n"> <img alt="Yamauchi, Shigeyasu" width="42" height="62" data-src="https://cdn.myanimelist.net/r/42x62/images/voiceactors/2/15245.jpg?s=af3d6a568ef5183ce01028f17658b827" data-srcset="https://cdn.myanimelist.net/r/42x62/images/voiceactors/2/15245.jpg?s=af3d6a568ef5183ce01028f17658b827 1x, https://cdn.myanimelist.net/r/84x124/images/voiceactors/2/15245.jpg?s=9f18b6b7813f578e52411eb7d216e924 2x" class="lazyload" /> </a> </div> </td> <td valign="top" class="borderClass"> <a href="https://myanimelist.net/people/6459/Shigeyasu_Yamauchi">Yamauchi, Shigeyasu</a> <div class="spaceit_pad"> <small>Director</small> </div> </td> </tr> </table><table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td valign="top" width="27" class="ac borderClass"> <div class="picSurround"> <a href="https://myanimelist.net/people/7351/Gilberto_Baroli" class="fw-n"> <img alt="Baroli, Gilberto" width="42" height="62" data-src="https://cdn.myanimelist.net/r/42x62/images/voiceactors/2/4300.jpg?s=474cb99cb93f5bc183a13b75381fbba2" data-srcset="https://cdn.myanimelist.net/r/42x62/images/voiceactors/2/4300.jpg?s=474cb99cb93f5bc183a13b75381fbba2 1x, https://cdn.myanimelist.net/r/84x124/images/voiceactors/2/4300.jpg?s=d4fb99693d71dec97f6ce4ee482afdb3 2x" class="lazyload" /> </a> </div> </td> <td valign="top" class="borderClass"> <a href="https://myanimelist.net/people/7351/Gilberto_Baroli">Baroli, Gilberto</a> <div class="spaceit_pad"> <small>Script, ADR Director</small> </div> </td> </tr> </table></div><div class="left-right fl-r" style="width:392px;"><table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td valign="top" width="27" class="ac borderClass"> <div class="picSurround"> <a href="https://myanimelist.net/people/1999/Masami_Kurumada" class="fw-n"> <img alt="Kurumada, Masami" width="42" height="62" data-src="https://cdn.myanimelist.net/r/42x62/images/voiceactors/1/4987.jpg?s=ac98c86384309608ea5fb885a2876c57" data-srcset="https://cdn.myanimelist.net/r/42x62/images/voiceactors/1/4987.jpg?s=ac98c86384309608ea5fb885a2876c57 1x, https://cdn.myanimelist.net/r/84x124/images/voiceactors/1/4987.jpg?s=dac908639b9fff638dea228bc82da50e 2x" class="lazyload" /> </a> </div> </td> <td valign="top" class="borderClass"> <a href="https://myanimelist.net/people/1999/Masami_Kurumada">Kurumada, Masami</a> <div class="spaceit_pad"> <small>Original Creator</small> </div> </td> </tr> </table><table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td valign="top" width="27" class="ac borderClass"> <div class="picSurround"> <a href="https://myanimelist.net/people/5069/Hermes_Baroli" class="fw-n"> <img alt="Baroli, Hermes" width="42" height="62" data-src="https://cdn.myanimelist.net/r/42x62/images/voiceactors/1/40317.jpg?s=f867fda4bf80227347fec29628b549e2" data-srcset="https://cdn.myanimelist.net/r/42x62/images/voiceactors/1/40317.jpg?s=f867fda4bf80227347fec29628b549e2 1x, https://cdn.myanimelist.net/r/84x124/images/voiceactors/1/40317.jpg?s=ec4ca4eb751a702367b16448d98b6324 2x" class="lazyload" /> </a> </div> </td> <td valign="top" class="borderClass"> <a href="https://myanimelist.net/people/5069/Hermes_Baroli">Baroli, Hermes</a> <div class="spaceit_pad"> <small>ADR Director</small> </div> </td> </tr> </table></div></div> <br><br><div class="di-t"> <div class="di-tc va-t " style="width:392px;"> <div> <a href="https://myanimelist.net/dbchanges.php?aid=1260&amp;t=theme" class="floatRightHeader">Edit</a> <h2>Opening Theme</h2> </div> <div class="theme-songs js-theme-songs opnening"> <script> const playButtonImage = '/images/oped-play-circle.svg'; const stopButtonImage = '/images/oped-stop-circle.svg'; var nowPlaying = ''; function controlPreview(oped_id) { const preview = document.querySelector("#preview_" + oped_id); if (nowPlaying == oped_id) { preview.pause(); preview.currentTime = 0; nowPlaying = ''; // 再生アイコン変更 $('.oped-preview-button-' + oped_id).css('background-image', `url('${playButtonImage}')`); $('.oped-popup-preview-play').css('background-image', `url('${playButtonImage}')`); $('.oped-video-popup-preview-play').css('background-image', `url('${playButtonImage}')`); const circle = document.getElementById('preview-circle'); if (circle !== undefined) { circle.remove(); } } else { if (nowPlaying !== '') { const preview2 = document.querySelector("#preview_" + nowPlaying); preview2.pause(); preview2.currentTime = 0; $('.oped-preview-button-' + nowPlaying).css('background-image', `url('${playButtonImage}')`); $('.oped-popup-preview-play').css('background-image', `url('${playButtonImage}')`); $('.oped-video-popup-preview-play').css('background-image', `url('${playButtonImage}')`); const circle = document.getElementById('preview-circle'); if (circle !== undefined) { circle.remove(); } } nowPlaying = oped_id; // 再生アイコン変更 if ($('#js-oped-popup').css('visibility') == 'visible') { $('.oped-popup-preview-play').css('background-image', `url('${stopButtonImage}')`); $("#oped-popup-preview-play-inner").html('<circle id="preview-circle" fill="none" stroke="#4fa8df" stroke-width="10" stroke-mitterlimit="0" cx="50" cy="50" r="47" stroke-dasharray="360" stroke-dashoffset="360" stroke-linecap="round" transform="rotate(-90) translate(-100 0)"></circle>'); } else { $('.oped-preview-button-' + oped_id).css('background-image', `url('${stopButtonImage}')`); $("#oped-preview-button-inner-" + oped_id).html('<circle id="preview-circle" fill="none" stroke="#4fa8df" stroke-width="10" stroke-mitterlimit="0" cx="50" cy="50" r="47" stroke-dasharray="360" stroke-dashoffset="360" stroke-linecap="round" transform="rotate(-90) translate(-100 0)"></circle>'); } preview.volume = 0.3; preview.play(); // アニメーション開始 drawProgress(); preview.onended = function() { preview.currentTime = 0; if ($('#js-oped-popup').css('visibility') == 'visible') { $('.oped-popup-preview-play').css('background-image', `url('${playButtonImage}')`); } else if ($('#js-oped-video-popup').css('visibility') == 'visible') { $('.oped-video-popup-preview-play').css('background-image', `url('${playButtonImage}')`); } else { $('.oped-preview-button-' + nowPlaying).css('background-image', `url('${playButtonImage}')`); } nowPlaying = ''; } } } function drawProgress() { const circle = document.getElementById('preview-circle'); if (!circle) { return false; } if (!nowPlaying) { circle.setAttribute('stroke-dashoffset', 74); circle.remove(); return false; } const preview = document.querySelector("#preview_" + nowPlaying); if (!preview) { circle.remove(); return false; } const currentTime = Math.floor(preview.currentTime * 10); const pathLength = 355 - Math.floor((280/300) * currentTime); if (pathLength < 70) { circle.remove(); return false; } circle.setAttribute('stroke-dashoffset', pathLength); setTimeout(drawProgress, 100); } function playPreview(oped_id, spotify_id) { const previewApiUrl = '/spotify/get_preview_url/' + spotify_id; const preview = document.querySelector("#preview_" + oped_id); $.ajax({ url: previewApiUrl, type: "GET", timeout: 10000, success: function(data) { if (data.preview_url) { preview.src = data.preview_url; controlPreview(oped_id); } } }); } $(function(){ // 再生ボタンセット $('.oped-preview-button').css('background-image', `url('${playButtonImage}')`); $('.oped-preview-button').css('background-image', `url('${playButtonImage}')`); // Dialog Close const blackBg = document.getElementById('js-oped-black-bg'); blackBg.addEventListener('click', function() { closeMusicLinkPopup(); }); const closeBtn = document.getElementById('js-oped-close-btn'); closeBtn.addEventListener('click', function() { closeMusicLinkPopup(); }); }); function openMusicLinkPopup(oped_id, title, artist, spotify_id) { const popup = document.getElementById('js-oped-popup'); if(!popup) return; // 再生中の場合は停止 if (nowPlaying !== '') { const preview2 = document.querySelector("#preview_" + nowPlaying); preview2.pause(); preview2.currentTime = 0; $('.oped-preview-button-' + nowPlaying).css('background-image', `url('${playButtonImage}')`); $('.oped-popup-preview-play').css('background-image', `url('${playButtonImage}')`); const circle = document.getElementById('preview-circle'); if (circle !== undefined) { circle.remove(); } nowPlaying = ''; } $(".oped-popup-title").html(title); if (artist) { $(".oped-popup-artist").html("Artist: " + artist); } // preview $(".oped-popup-preview-play").off(); if (spotify_id) { $(".oped-popup-preview-play").on('click', function(){ playPreview(oped_id, spotify_id); }); $(".oped-popup-preview-play").css({ opacity: "1.0", cursor: "pointer" }); } else { $(".oped-popup-preview-play").css({ opacity: "0.4", cursor: "unset" }); } // buttons $(".oped-popup-button").off(); if ($('#spotify_url_' + oped_id).val()) { $(".oped-popup-spotify").on('click', function () { window.open($('#spotify_url_' + oped_id).val()); }); $(".oped-popup-spotify").css({ opacity: "1.0", cursor: "pointer" }); } else { $(".oped-popup-spotify").css({ opacity: "0.4", cursor: "unset" }); } if ($('#apple_url_' + oped_id).val()) { $(".oped-popup-apple").on('click', function () { window.open($('#apple_url_' + oped_id).val()); }); $(".oped-popup-apple").css({ opacity: "1.0", cursor: "pointer" }); } else { $(".oped-popup-apple").css({ opacity: "0.4", cursor: "unset" }); } if ($('#amazon_url_' + oped_id).val()) { $(".oped-popup-amazon").on('click', function () { window.open($('#amazon_url_' + oped_id).val()); }); $(".oped-popup-amazon").css({ opacity: "1.0", cursor: "pointer" }); } else { $(".oped-popup-amazon").css({ opacity: "0.4", cursor: "unset" }); } if ($('#youtube_url_' + oped_id).val()) { $(".oped-popup-youtube").on('click', function () { window.open($('#youtube_url_' + oped_id).val()); }); $(".oped-popup-youtube").css({ opacity: "1.0", cursor: "pointer" }); } else { $(".oped-popup-youtube").css({ opacity: "0.4", cursor: "unset" }); } popup.classList.add('is-show'); } function closeMusicLinkPopup() { const popup = document.getElementById('js-oped-popup'); if(!popup) return; popup.classList.remove('is-show'); if (nowPlaying !== '') { const preview = document.querySelector("#preview_" + nowPlaying); preview.pause(); preview.currentTime = 0; $('.oped-popup-preview-play').css('background-image', `url('${playButtonImage}')`); const circle = document.getElementById('preview-circle'); if (circle !== undefined) { circle.remove(); } nowPlaying = ''; } } </script> <div class="oped-popup" id="js-oped-popup"> <div class="oped-popup-inner"> <div id="js-oped-close-btn" class="oped-close-btn"></div> <div class="oped-popup-title"></div> <div class="oped-popup-artist"></div> <div class="oped-popup-preview"> <div class="oped-popup-preview-label">Preview</div> <div class="oped-popup-preview-play"> <svg id="oped-popup-preview-play-inner" class="oped-popup-preview-play-inner" x="0px" y="0px" viewBox="0 0 100 100"> </svg> </div> </div> <div class="oped-popup-buttons"> <table class="oped-popup-table"> <tr> <td> <div class="oped-popup-button oped-popup-spotify"> <div class="oped-popup-button-icon spotify"></div> <div class="oped-popup-button-label">Spotify</div> </div> </td> <td> <div class="oped-popup-button oped-popup-apple"> <div class="oped-popup-button-icon apple"></div> <div class="oped-popup-button-label">Apple Music</div> </div> </td> </tr> <tr> <td> <div class="oped-popup-button oped-popup-amazon"> <div class="oped-popup-button-icon amazon"></div> <div class="oped-popup-button-label">Amazon Music</div> </div> </td> <td> <div class="oped-popup-button oped-popup-youtube"> <div class="oped-popup-button-icon youtube"></div> <div class="oped-popup-button-label">Youtube Music</div> </div> </td> </tr> </table> </div> </div> <div class="oped-black-background" id="js-oped-black-bg"></div> </div> <table border="0" width="100%"><tr><td width="8%"> <div class="oped-preview-button oped-preview-button-gray"></div></td> <td width="84%">"Soldier Dream"<span class="theme-song-artist"> by Hironobu Kageyama &amp; Broadway</span><input type="hidden" id="spotify_url_17777" value="" /> <input type="hidden" id="apple_url_17777" value="" /> <input type="hidden" id="amazon_url_17777" value="" /> <input type="hidden" id="youtube_url_17777" value="" /> </td> <td width="8%"> <div class="oped-video-button oped-video-button-gray"></div></td> </tr></table> </div> </div> <div class="di-tc va-t" style="width:16px;"></div> <div class="di-tc va-t " style="width:392px;"> <div> <a href="https://myanimelist.net/dbchanges.php?aid=1260&amp;t=theme&amp;themetype=2" class="floatRightHeader">Edit</a> <h2>Ending Theme</h2> </div> <div class="theme-songs js-theme-songs ending"> <table border="0" width="100%"><tr class=""> <td> No ending themes have been added to this title. Help improve our database by adding an ending theme <a href="https://myanimelist.net/dbchanges.php?aid=1260&amp;t=theme&amp;themetype=2">here</a>. </td> </tr></table> </div> </div> </div> <br><br><br><div><span class="floatRightHeader"><a href="/anime/1260/Saint_Seiya__Saishuu_Seisen_no_Senshi-tachi/reviews">More reviews</a></span><h2>Reviews</h2></div> <div class="borderDark" style="padding: 4px 0;"> <div class="spaceit"> <div class="mb8" style="float: right; text-align: right;"> <div title="9:30 AM">Sep 10, 2011</div> <div class="lightLink spaceit"> 1 of 1 episodes seen </div> <div> <a href="javascript:void(0);" onclick="$('#score43071').toggle()">Overall Rating</a>: 7 </div> </div><div style="float: left;"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td valign="top" width="60"> <div class="picSurround"> <a href="https://myanimelist.net/profile/Alpharon"> <img src="https://cdn.myanimelist.net/images/userimages/473012.jpg?t=1632880200" data-src="https://cdn.myanimelist.net/images/userimages/473012.jpg?t=1632880200" border="0" class=" lazyloaded" width="48"> </a> </div> </td> <td valign="top"> <a href="https://myanimelist.net/profile/Alpharon">Alpharon</a> <small>(<a href="/profile/Alpharon/reviews">All reviews</a>)</small><br> <div class="lightLink spaceit"> <strong> <span id="rhelp43071">14</span> </strong> people found this review helpful </div> </td> </tr> </table> </div> </div> <div class="spaceit textReadability word-break pt8 mt8" style="clear: both; border-top: 1px solid #ebebeb;"> <div style="float: left; display: none; margin: 0 10px 10px 0" id="score43071"> <table border="0" width="105" cellpadding="0" cellspacing="0" class="borderClass" style="border-width: 1px;"> <tr> <td class="borderClass bgColor1"><strong>Overall</strong></td> <td class="borderClass bgColor1"><strong>7</strong></td> </tr> <tr> <td class="borderClass" align="left">Story</td> <td class="borderClass">7</td> </tr> <tr> <td class="borderClass" align="left">Animation</td> <td class="borderClass">7</td> </tr> <tr> <td class="borderClass" align="left">Sound</td> <td class="borderClass">9</td> </tr> <tr> <td class="borderClass" align="left">Character</td> <td class="borderClass">7</td> </tr> <tr> <td class="borderClass" style="border-width: 0;" align="left">Enjoyment</td> <td class="borderClass" style="border-width: 0;">7</td> </tr> </table> </div> Esta review también está en español.<br /> <br /> This is the last movie from the classic age of Saint Seiya. Legend of Crimson Youth aside, this is the best, since it does everything the other two movies did, and add a little christian wackiness. Without further ado: Warriors of the Final Holy Battle.<br /> <br /> Story: The fallen angel, Lucifer (in bishonen form, like in Shin Megami Tensei) decides to attack the Santuary (in the Saint Seiya mythology, Lucifer fought against gods from various religions, including Athena, and lost), crushing the remaining Gold Saints, with the cliche objective of world destruction/domination. And he’s not alone: besides the typical minion saints (the <span style="display: none;" id="review43071"> Fallen Angels: Seraph Beelzebub, Cherub Ashtaroth, Thrones Moa and Virtues Eligor), he&#039;s helped by Eris (from the first movie), Abel (third movie) and Poseidon (Poseidon saga). These three gods don&#039;t actually fight, but they are there. Athena tries to negotiate (cause that always work in the shonen world...) and fail miserably, so Seiya, Hyoga and Shun (Shiryu and Ikki will come, eventually) will fight once again to save the world and Athena (Hyoga is extra motivated, since he is catholic. Seiya even lampshade that).<br /> <br /> Animation: Like the TV series. This was made back in 89, so if you are used only to new stuff, you may think is old and primitive (or, in a more polite way, classic). If you started back in the 80/90, then is pretty good. Back then, it was f*cking awesome. In the character designs department, Lucifer was correctly represented as a young and beautiful angel (the catholic canon that everybody forgets, apparently), Beelzebub and Ashtaroth are pretty average, Moa is the effeminate token member, and Eligor... well, he&#039;s a weirdo. The weirdest saint ever (and that’s really hard, with Hades specters).<br /> <br /> Sound: The music is epic, as always. The voices... well, since you are reading the engrish version of this review, that means you aren&#039;t from Latin America or Spain. I assume that you are going to watch the japanese dub. It&#039;s pretty awesome, you may know the seiyūs from the Hades: Chapter Santuary (In Inferno and Elysion Toei change all the voices). Soooo, good voice acting.<br /> <br /> Verdict: this movie is a little weirder than the previous, since leaves the greek (series canon) and nordic (series filler) gods, and uses the morning star, Lucifer itself, and other christian elements. The fights are a bit more intense (with a lil more blood, something that was abundant in the Sanctuary saga, and lackluster in the Asgard and Poseidon sagas), but it suffers the problem the Eris and Dolbar movies had: way too short to do it better.<br /> The usual recommendation: if you liked Saint Seiya, you will like the movie (the third one is better, longer and more complex, but this one is pretty good too). Usually, something like this would be a six, but Lucifer and his crazy angels manages to pull a seven, by the simple fact of originality and the mess up concept.<br /> --------<br /> Esta es la última de las películas de la etapa clásica de Saint Seiya (después viene Overture, que desafortunadamente, apesta). Después de la leyenda de los santos escarlata, esta es la mejor, al menos por su pintoresco e insólito planteamiento. Sin mas preámbulos: Los Caballeros del Zodiaco contra Lucifer (Latinoamérica), o El guerrero de Armagedón (España).<br /> <br /> Historia: Lucifer (en su forma bishonen, que sería confirmada años más tarde por Shin Megami Tensei), el ángel caído (según la mitología de Saint Seiya, Lucifer lucho y fue vencido en el pasado por diversos dioses de varias religiones, entre ellos, obviamente, Athena) decide atacar el santuario, arrasando a los pocos santos de oro que quedaban, con el previsible objetivo de destruir a los humanos (recurriendo a diversas catástrofes naturales, como terremotos y tsunamis). En su cruzada no está solo: además de los típicos santos subordinados (los ángeles infernales, cada uno con un titulo angelical: Beelzebub de Serafín, Astaroth de Querubín, Eligor de Virtud y Moa de Trono), cuenta con la ayuda de Eris (Diosa de la Discordia, aparece en la primera película), Abel (Dios del Sol, aparece en la tercer película) y Poseidón (el Dios de los Océanos, aparece en la última saga del anime original), quienes no pelean, pero dan apoyo moral. Athena intenta negociar con Lucifer (como intento con cada villano), las negociaciones fracasan (como también paso con todos los villanos), por lo que Seiya, Shun y Hyoga (Shiryu e Ikki llegan un poco más tarde) deberán pelear nuevamente para salvar al mundo y a su diosa (Hyoga tiene una motivación adicional, dado que es católico).<br /> <br /> Animación: La misma de la serie. Tengamos en cuenta que esto fue en el 89, por lo que si uno está acostumbrado a lo actual, por supuesto que Saint Seiya puede parecer primitivo, o al menos, “clásica”. Para los que arrancamos en los 90, la animación es muy buena, correcta, y todo eso. Aclarado esto (que es lo mismo que puse en las anteriores películas), quería comentar el diseño de personajes. Lucifer fue representado realmente como un ángel joven y hermoso (o sea, el canon católico que según parece todos olvidan), Beelzebub y Astaroth son bastante promedio, Moa es el típico caballero afeminado que sigue los pasos de Misty y Afrodita... y Eligor... bueno, el es, sin ninguna duda, el caballero mas bizarro que apareció en Saint Seiya (y eso es difícil, teniendo en cuenta a los espectros).<br /> <br /> Sonido: La música, épica, como siempre. En cuanto a las voces, depende de la versión que viste: la versión española es correcta para los españoles, supongo. Pero el consenso americano general es que las voces de España apestan. Después, esta la versión remasterizada mexicana, en la que Jesús Barrero y compañía están presentes :D. O al menos, los caballeros de bronce, con la excepción de Shiryu (la vos de Shun puede sonar distinta, pero es el original... solo que con más años. Los más jóvenes tal vez lo reconozcan por su trabajo como Neji Hyuga). Los actores de doblaje hacen un trabajo notable, y la calidad de sonido es muy buena (COPIADO DE MI REVIEW DE LA PELICULA DE ERIS... lo mismo que con la animación, de una película a otra no varía).<br /> <br /> Veredicto: Esta película es un poco más rara que las otras, en el sentido que se sale de los dioses tradicionales (griegos en canon y nórdicos para el filler, con una breve incursión en el budismo gracias a Virgo) y aborda al lucero del alba, al mismísimo Lucifer, y otros detalles de la religión cristiana. Las peleas son un poco más intensas, y hasta hay un poco mas de sangre (cosa que para la saga de Poseidón se atenúo bastante...), pero sufre por su corta duración (al igual que las películas de Eris y Dolbar). Tristemente, esta película sufrió a manos de la censura: tanto el asalto inicial al santuario como la quema de una biblia fueron removidas. Por suerte, en la versión mexicana remasterizada, esto se arregla.<br /> La recomendación de siempre: si les gusta Saint Seiya, seguro que les gusta esta película (siendo la mejor la tercera, que es más larga y más compleja, pero esta es entretenida), y no se olviden de buscar la versión nueva! <div id="revhelp_output_43071" class="mt8 js-review-btn-helpful js-review-helpful-43071"> <a href="https://myanimelist.net/login.php?from=%2Fanime%2F1260%2FSaint_Seiya__Saishuu_Seisen_no_Senshi-tachi%3Fuser-agent%3DMozilla%252F5.0%2B%2528Macintosh%253B%2BIntel%2BMac%2BOS%2BX%2B10_15_7%2529%2BAppleWebKit%252F537.36%2B%2528KHTML%252C%2Blike%2BGecko%2529%2BChrome%252F95.0.4638.69%2BSafari%252F537.36%26accept%3Dimage%252Favif%252Cimage%252Fwebp%252Cimage%252Fapng%252Cimage%252Fsvg%252Bxml%252Cimage%252F%252A%252C%252A%252F%252A%253Bq%253D0.8%26referer%3Dhttps%253A%252F%252Fmyanimelist.net%252F" class="button_form">Helpful</a> </div> </span> <a href="javascript:void(0);" id="reviewToggle43071" class="js-toggle-review-button" data-id="43071">read more</a> </div> <div> <div class="mt12 pt4 pb4 pl0 pr0 clearfix"> <div style="float: right;"> <a href="https://myanimelist.net/reviews.php?id=43071" class="lightLink"><small>permalink</small></a> | <a href="https://myanimelist.net/dbchanges.php?go=reportreview&amp;id=43071" class="lightLink"> <small>report</small> </a> </div> </div> </div> </div> <div class="borderDark" style="padding: 4px 0;"> <div class="spaceit"> <div class="mb8" style="float: right; text-align: right;"> <div title="6:50 PM">Aug 15, 2021</div> <div class="lightLink spaceit"> 1 of 1 episodes seen </div> <div> <a href="javascript:void(0);" onclick="$('#score412987').toggle()">Overall Rating</a>: 4 </div> </div><div style="float: left;"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td valign="top" width="60"> <div class="picSurround"> <a href="https://myanimelist.net/profile/ChouEritto"> <img src="https://cdn.myanimelist.net/images/userimages/6287023.jpg?t=1636226400" data-src="https://cdn.myanimelist.net/images/userimages/6287023.jpg?t=1636226400" border="0" class=" lazyloaded" width="48"> </a> </div> </td> <td valign="top"> <a href="https://myanimelist.net/profile/ChouEritto">ChouEritto</a> <small>(<a href="/profile/ChouEritto/reviews">All reviews</a>)</small><br> <div class="lightLink spaceit"> <strong> <span id="rhelp412987">3</span> </strong> people found this review helpful </div> </td> </tr> </table> </div> </div> <div class="spaceit textReadability word-break pt8 mt8" style="clear: both; border-top: 1px solid #ebebeb;"> <div style="float: left; display: none; margin: 0 10px 10px 0" id="score412987"> <table border="0" width="105" cellpadding="0" cellspacing="0" class="borderClass" style="border-width: 1px;"> <tr> <td class="borderClass bgColor1"><strong>Overall</strong></td> <td class="borderClass bgColor1"><strong>4</strong></td> </tr> <tr> <td class="borderClass" align="left">Story</td> <td class="borderClass">4</td> </tr> <tr> <td class="borderClass" align="left">Animation</td> <td class="borderClass">7</td> </tr> <tr> <td class="borderClass" align="left">Sound</td> <td class="borderClass">7</td> </tr> <tr> <td class="borderClass" align="left">Character</td> <td class="borderClass">5</td> </tr> <tr> <td class="borderClass" style="border-width: 0;" align="left">Enjoyment</td> <td class="borderClass" style="border-width: 0;">4</td> </tr> </table> </div> The final of the original 4 Saint Seiya films, Warriors of the Final Holy War, is probably the best of the bunch in both premise and execution.<br /> <br /> First, to go over some spoilers for the first 1/4 of the film with its main premise, having the main enemies swiftly slay the Gold Saints and that enemy being Lucifer himself with his revival being through the Cosmo of the previous three defeated Gods (Eris, Abel and Poseidon) makes it a gold standard for premises compared to the previous 3 films combined. The Gold Saints&#039; deaths obviously shows how dangerous the enemies are, the previous Gods ties it <span style="display: none;" id="review412987"> better into the continuity of the main series and previous films, but the most interesting point is drawing on Biblical lore which the series hadn&#039;t really delved into beyond a few references, terms and subtle parallels. Seeing the film go full-in with it and showcasing the difference between the Greek pantheon and Biblical figures is very fitting for a series that borrows equally from both and certainly isn&#039;t out of place when the anime gave implications towards Yahweh&#039;s existence and omnipotence as well as the series being very pantheistic in general. <br /> The way in which Athena is incapacitated here is also more interesting than most with her not only willingly putting herself up as a sacrifice, but her walking towards the point of sacrifice with some nice Biblical imagery puts a more solid visual ticking clock on her potential demise than any other one. It does avoid being close to as well done as those in the main series though when Athena believing the word of the being constantly said throughout the entire history of Christianity to be the father of lies and having that come back to bite her is ridiculous.<br /> <br /> Unfortunately beyond that, the film follows the typical plot structure of the other 3 I&#039;ve already mentioned in previous reviews, though the abilities of the Demonic Angels as well as Beelzebub&#039;s dialogue gives them far more going for them as characters than the previous films&#039; roadblocks masquerading as henchmen. The climax also has more over the top elements to make it less generic than that of the previous 3, although the part at the end of it being through the Bronze Saints&#039; resolve creating and miracle rather than an act of God ruins it as a battle against Satan himself is one in which a deus ex machina of the highest variety would actually be appropriate for rather than just &quot;something, something, resolve creates miracles.&quot;<br /> <br /> Art-wise, there&#039;s nothing to say that hasn&#039;t been said in my previous reviews. It looks as gorgeous as the other films in art and animation, other than maybe a few shots of the side of Eligor&#039;s face looking a bit off with the shading. <br /> <br /> Overall, the last of the original Saint Seiya films still has a lot of problems with its script and screenplay, but overall has enough interest generated by its premise as well as its unique elements allow it to be marginally better than the previous film, despite suffering the same flaws. Could&#039;ve been a great story in the hands of a more competent writer and with a longer running time as either its own story or a coda to the premature ending of the anime with the Poseidon Arc until we were allowed a Hades Arc adaption in the 00s, but instead it ends up as pretty looking bad filler. <div id="revhelp_output_412987" class="mt8 js-review-btn-helpful js-review-helpful-412987"> <a href="https://myanimelist.net/login.php?from=%2Fanime%2F1260%2FSaint_Seiya__Saishuu_Seisen_no_Senshi-tachi%3Fuser-agent%3DMozilla%252F5.0%2B%2528Macintosh%253B%2BIntel%2BMac%2BOS%2BX%2B10_15_7%2529%2BAppleWebKit%252F537.36%2B%2528KHTML%252C%2Blike%2BGecko%2529%2BChrome%252F95.0.4638.69%2BSafari%252F537.36%26accept%3Dimage%252Favif%252Cimage%252Fwebp%252Cimage%252Fapng%252Cimage%252Fsvg%252Bxml%252Cimage%252F%252A%252C%252A%252F%252A%253Bq%253D0.8%26referer%3Dhttps%253A%252F%252Fmyanimelist.net%252F" class="button_form">Helpful</a> </div> </span> <a href="javascript:void(0);" id="reviewToggle412987" class="js-toggle-review-button" data-id="412987">read more</a> </div> <div> <div class="mt12 pt4 pb4 pl0 pr0 clearfix"> <div style="float: right;"> <a href="https://myanimelist.net/reviews.php?id=412987" class="lightLink"><small>permalink</small></a> | <a href="https://myanimelist.net/dbchanges.php?go=reportreview&amp;id=412987" class="lightLink"> <small>report</small> </a> </div> </div> </div> </div> <div class="borderDark" style="padding: 4px 0;"> <div class="spaceit"> <div class="mb8" style="float: right; text-align: right;"> <div title="10:40 PM">Mar 5, 2021</div> <div class="lightLink spaceit"> 1 of 1 episodes seen </div> <div> <a href="javascript:void(0);" onclick="$('#score383134').toggle()">Overall Rating</a>: 9 </div> </div><div style="float: left;"> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td valign="top" width="60"> <div class="picSurround"> <a href="https://myanimelist.net/profile/Anita-Castro06"> <img src="https://cdn.myanimelist.net/images/userimages/8782775.jpg?t=1634944200" data-src="https://cdn.myanimelist.net/images/userimages/8782775.jpg?t=1634944200" border="0" class=" lazyloaded" width="48"> </a> </div> </td> <td valign="top"> <a href="https://myanimelist.net/profile/Anita-Castro06">Anita-Castro06</a> <small>(<a href="/profile/Anita-Castro06/reviews">All reviews</a>)</small><br> <div class="lightLink spaceit"> <strong> <span id="rhelp383134">0</span> </strong> people found this review helpful </div> </td> </tr> </table> </div> </div> <div class="spaceit textReadability word-break pt8 mt8" style="clear: both; border-top: 1px solid #ebebeb;"> <div style="float: left; display: none; margin: 0 10px 10px 0" id="score383134"> <table border="0" width="105" cellpadding="0" cellspacing="0" class="borderClass" style="border-width: 1px;"> <tr> <td class="borderClass bgColor1"><strong>Overall</strong></td> <td class="borderClass bgColor1"><strong>9</strong></td> </tr> <tr> <td class="borderClass" align="left">Story</td> <td class="borderClass">10</td> </tr> <tr> <td class="borderClass" align="left">Animation</td> <td class="borderClass">9</td> </tr> <tr> <td class="borderClass" align="left">Sound</td> <td class="borderClass">8</td> </tr> <tr> <td class="borderClass" align="left">Character</td> <td class="borderClass">9</td> </tr> <tr> <td class="borderClass" style="border-width: 0;" align="left">Enjoyment</td> <td class="borderClass" style="border-width: 0;">9</td> </tr> </table> </div> 1/1 Movie Watched (Español Disponible)<br /> This is the direct continuation after the 114 chapter anime and the previous 3 movies. This movie is about Lucifer being reincarnated thanks to the lives of Eris, Abel and Poseidon. It is worth mentioning that this movie has many biblical references and they actually name the bible. Is very interesting because never until 1988 had we followed a story that dealt with important events in the Bible in such detail. One of the references that most caught my attention was when Athena crossed the stairs full of thorns and it drained her blood, much like when they put the crown <span style="display: none;" id="review383134"> of thorns on Jesus, which was embedded so strongly that the blood dripped, just as it happens to Athena.<br /> It&#039;s kind of ironic that in every movie so far, normally the gold saints are always indisposed and unable to help the bronze saints.<br /> I also noticed that when Hyoga the Cygnus saint someone is going to attack him and gets into his mind there will always be 3 things. His mother, Master Cristal or Master Camus. Whenever it is something mental they try to end it with one of these 3 people.<br /> This is one of the most interesting movies Saint Seiya has ever had.<br /> I make a record that this Review is based on the fact that I am watching this anime in order of release.<br /> *********************************************************************<br /> 1/1 Película Vista<br /> Esta es la continuación directa después del anime de 114 capítulos y de las 3 películas anteriores. Esta película trata de que Lucifer ha reencarnado gracias a la vida de Eris, Abel y Poseidón. Cabe mencionar que esta película tiene muchas referencias bíblicas y de hecho nombran a la bilblia. Lo que me aprecío muy interesante por que nunca hasta 1988 habíamos seguido una historia que tratara tan detalladamente sucesos importantes de la biblia. Una de las referencias que más me llamó la atención fue cuando Atena cruzaba por una escalera llena de espinas y esta drenaba su sangre, muy parecido a cuando le pusiseron a Jesús la corona de espinas que esta estaba incrustada tan fuerte que le chorreaba la sangre, tal cual le pasa a Atena. <br /> Es algo irónico que en todas las películas hasta ahora, normalmente los caballeros dorados siempre estén indispuestos y no puedan ayudar a los caballeros de bronce.<br /> También noté que cuando Hyoga el Caballero del Cisne lo atacan y se meten en su mente siempre serán 3 cosas. Su madre, el maestro Cristal o el maestro Camus. Siempre que es algo mental tratan de acabarlo con alguna de estas 3 personas. <br /> Esta es una de las películas más interesantes que ha tenido Saint Seiya. <br /> Hago un recorderis que esta Review está en base a que estoy viendo este anime en orden de lanzamiento. <div id="revhelp_output_383134" class="mt8 js-review-btn-helpful js-review-helpful-383134"> <a href="https://myanimelist.net/login.php?from=%2Fanime%2F1260%2FSaint_Seiya__Saishuu_Seisen_no_Senshi-tachi%3Fuser-agent%3DMozilla%252F5.0%2B%2528Macintosh%253B%2BIntel%2BMac%2BOS%2BX%2B10_15_7%2529%2BAppleWebKit%252F537.36%2B%2528KHTML%252C%2Blike%2BGecko%2529%2BChrome%252F95.0.4638.69%2BSafari%252F537.36%26accept%3Dimage%252Favif%252Cimage%252Fwebp%252Cimage%252Fapng%252Cimage%252Fsvg%252Bxml%252Cimage%252F%252A%252C%252A%252F%252A%253Bq%253D0.8%26referer%3Dhttps%253A%252F%252Fmyanimelist.net%252F" class="button_form">Helpful</a> </div> </span> <a href="javascript:void(0);" id="reviewToggle383134" class="js-toggle-review-button" data-id="383134">read more</a> </div> <div> <div class="mt12 pt4 pb4 pl0 pr0 clearfix"> <div style="float: right;"> <a href="https://myanimelist.net/reviews.php?id=383134" class="lightLink"><small>permalink</small></a> | <a href="https://myanimelist.net/dbchanges.php?go=reportreview&amp;id=383134" class="lightLink"> <small>report</small> </a> </div> </div> </div> </div> <div class="mt4"></div><br><h2>Recommendations</h2> <div class=""><div class="anime-slide-block" id="anime_recommendation" data-json='{"width":800,"btnWidth":40,"margin":8}'><div class="btn-anime-slide-side left"><span class="btn-inner"></span></div><div class="btn-anime-slide-side right"><span class="btn-inner"></span></div><div class="anime-slide-outer" style="height:140px;"><ul class="anime-slide js-anime-slide" data-slide="8"><li class="btn-anime auto" style="width:90px" title="Initial D Fifth Stage"><a href="https://myanimelist.net/anime/15059/Initial_D_Fifth_Stage?suggestion" class="link bg-center" style="width:90px;height:140px;"><span class="title fs10">Initial D Fifth Stage</span><span class="users">AutoRec</span><img src="https://cdn.myanimelist.net/images/spacer.gif" data-src="https://cdn.myanimelist.net/r/90x140/images/anime/1029/99183.jpg?s=37d7f3de803c9eb1e219686eac5f0f21" data-srcset="https://cdn.myanimelist.net/r/90x140/images/anime/1029/99183.jpg?s=37d7f3de803c9eb1e219686eac5f0f21 1x,https://cdn.myanimelist.net/r/180x280/images/anime/1029/99183.jpg?s=1f6458340b984a4255e9838210a4bb00 2x" width="90" height="140" class="image lazyload" alt="Initial D Fifth Stage" border="0" ></a></li><li class="btn-anime auto" style="width:90px" title="Gintama: Dai Hanseikai"><a href="https://myanimelist.net/anime/10643/Gintama__Dai_Hanseikai?suggestion" class="link bg-center" style="width:90px;height:140px;"><span class="title fs10">Gintama: Dai Hanseikai</span><span class="users">AutoRec</span><img src="https://cdn.myanimelist.net/images/spacer.gif" data-src="https://cdn.myanimelist.net/r/90x140/images/anime/1725/110927.jpg?s=8767c2fd693c652b74cd7783ea6aa573" data-srcset="https://cdn.myanimelist.net/r/90x140/images/anime/1725/110927.jpg?s=8767c2fd693c652b74cd7783ea6aa573 1x,https://cdn.myanimelist.net/r/180x280/images/anime/1725/110927.jpg?s=13425bc6669e8d457b4e6bee487fae74 2x" width="90" height="140" class="image lazyload" alt="Gintama: Dai Hanseikai" border="0" ></a></li><li class="btn-anime auto" style="width:90px" title="Kuroko no Basket"><a href="https://myanimelist.net/anime/11771/Kuroko_no_Basket?suggestion" class="link bg-center" style="width:90px;height:140px;"><span class="title fs10">Kuroko no Basket</span><span class="users">AutoRec</span><img src="https://cdn.myanimelist.net/images/spacer.gif" data-src="https://cdn.myanimelist.net/r/90x140/images/anime/11/50453.jpg?s=2822bccd41230124bb9fdf64b39afbd8" data-srcset="https://cdn.myanimelist.net/r/90x140/images/anime/11/50453.jpg?s=2822bccd41230124bb9fdf64b39afbd8 1x,https://cdn.myanimelist.net/r/180x280/images/anime/11/50453.jpg?s=0da5bc1d108038ab4fc990e70c8fef40 2x" width="90" height="140" class="image lazyload" alt="Kuroko no Basket" border="0" ></a></li><li class="btn-anime auto" style="width:90px" title="Durarara!!x2 Ketsu"><a href="https://myanimelist.net/anime/27833/Durararax2_Ketsu?suggestion" class="link bg-center" style="width:90px;height:140px;"><span class="title fs10">Durarara!!x2 Ketsu</span><span class="users">AutoRec</span><img src="https://cdn.myanimelist.net/images/spacer.gif" data-src="https://cdn.myanimelist.net/r/90x140/images/anime/6/77838.jpg?s=8dc060e9109e113dc9f15dd424575eb2" data-srcset="https://cdn.myanimelist.net/r/90x140/images/anime/6/77838.jpg?s=8dc060e9109e113dc9f15dd424575eb2 1x,https://cdn.myanimelist.net/r/180x280/images/anime/6/77838.jpg?s=9a8c5e1dd37d4817dc956f9e52536498 2x" width="90" height="140" class="image lazyload" alt="Durarara!!x2 Ketsu" border="0" ></a></li><li class="btn-anime auto" style="width:90px" title="Fate/Grand Carnival"><a href="https://myanimelist.net/anime/44248/Fate_Grand_Carnival?suggestion" class="link bg-center" style="width:90px;height:140px;"><span class="title fs10">Fate/Grand Carnival</span><span class="users">AutoRec</span><img src="https://cdn.myanimelist.net/images/spacer.gif" data-src="https://cdn.myanimelist.net/r/90x140/images/anime/1239/117596.jpg?s=72b165403fe67c17f1b39c7541b427e9" data-srcset="https://cdn.myanimelist.net/r/90x140/images/anime/1239/117596.jpg?s=72b165403fe67c17f1b39c7541b427e9 1x,https://cdn.myanimelist.net/r/180x280/images/anime/1239/117596.jpg?s=81220b321acb827a0e7503c36241201d 2x" width="90" height="140" class="image lazyload" alt="Fate/Grand Carnival" border="0" ></a></li><li class="btn-anime auto" style="width:90px" title="Shijou Saikyou no Deshi Kenichi"><a href="https://myanimelist.net/anime/1559/Shijou_Saikyou_no_Deshi_Kenichi?suggestion" class="link bg-center" style="width:90px;height:140px;"><span class="title fs10">Shijou Saikyou no Deshi Kenichi</span><span class="users">AutoRec</span><img src="https://cdn.myanimelist.net/images/spacer.gif" data-src="https://cdn.myanimelist.net/r/90x140/images/anime/9/75515.jpg?s=d6116bfb7f54a8c6bfc6aa338899bc7f" data-srcset="https://cdn.myanimelist.net/r/90x140/images/anime/9/75515.jpg?s=d6116bfb7f54a8c6bfc6aa338899bc7f 1x,https://cdn.myanimelist.net/r/180x280/images/anime/9/75515.jpg?s=f1907d387934ae408d8d03f66061af2b 2x" width="90" height="140" class="image lazyload" alt="Shijou Saikyou no Deshi Kenichi" border="0" ></a></li><li class="btn-anime auto" style="width:90px" title="Koukyoushihen Eureka Seven"><a href="https://myanimelist.net/anime/237/Koukyoushihen_Eureka_Seven?suggestion" class="link bg-center" style="width:90px;height:140px;"><span class="title fs10">Koukyoushihen Eureka Seven</span><span class="users">AutoRec</span><img src="https://cdn.myanimelist.net/images/spacer.gif" data-src="https://cdn.myanimelist.net/r/90x140/images/anime/12/34443.jpg?s=5422b0a62712bec22d404840d26e6589" data-srcset="https://cdn.myanimelist.net/r/90x140/images/anime/12/34443.jpg?s=5422b0a62712bec22d404840d26e6589 1x,https://cdn.myanimelist.net/r/180x280/images/anime/12/34443.jpg?s=793de65400762b449e9c71632632eeb7 2x" width="90" height="140" class="image lazyload" alt="Koukyoushihen Eureka Seven" border="0" ></a></li><li class="btn-anime auto" style="width:90px" title="Kuroko no Basket Movie 4: Last Game"><a href="https://myanimelist.net/anime/31658/Kuroko_no_Basket_Movie_4__Last_Game?suggestion" class="link bg-center" style="width:90px;height:140px;"><span class="title fs10">Kuroko no Basket Movie 4: Last Game</span><span class="users">AutoRec</span><img src="https://cdn.myanimelist.net/images/spacer.gif" data-src="https://cdn.myanimelist.net/r/90x140/images/anime/2/83106.jpg?s=558870ee4d6c11a789d2cd7b0cf79aa4" data-srcset="https://cdn.myanimelist.net/r/90x140/images/anime/2/83106.jpg?s=558870ee4d6c11a789d2cd7b0cf79aa4 1x,https://cdn.myanimelist.net/r/180x280/images/anime/2/83106.jpg?s=26165ebf56652802ff59dcb3adc86994 2x" width="90" height="140" class="image lazyload" alt="Kuroko no Basket Movie 4: Last Game" border="0" ></a></li><li class="btn-anime auto" style="width:90px" title="Fate/stay night: Unlimited Blade Works Prologue"><a href="https://myanimelist.net/anime/27821/Fate_stay_night__Unlimited_Blade_Works_Prologue?suggestion" class="link bg-center" style="width:90px;height:140px;"><span class="title fs10">Fate/stay night: Unlimited Blade Works Prologue</span><span class="users">AutoRec</span><img src="https://cdn.myanimelist.net/images/spacer.gif" data-src="https://cdn.myanimelist.net/r/90x140/images/anime/9/67425.jpg?s=23d997f20d47adc7f89f4fd2a6e4292b" data-srcset="https://cdn.myanimelist.net/r/90x140/images/anime/9/67425.jpg?s=23d997f20d47adc7f89f4fd2a6e4292b 1x,https://cdn.myanimelist.net/r/180x280/images/anime/9/67425.jpg?s=9c28c2e8a1583022751e995bb9c22a01 2x" width="90" height="140" class="image lazyload" alt="Fate/stay night: Unlimited Blade Works Prologue" border="0" ></a></li><li class="btn-anime auto" style="width:90px" title="Kyou kara Ore wa!!"><a href="https://myanimelist.net/anime/851/Kyou_kara_Ore_wa?suggestion" class="link bg-center" style="width:90px;height:140px;"><span class="title fs10">Kyou kara Ore wa!!</span><span class="users">AutoRec</span><img src="https://cdn.myanimelist.net/images/spacer.gif" data-src="https://cdn.myanimelist.net/r/90x140/images/anime/1042/110294.jpg?s=95a7d5931d3718830f4b4edde97dd6aa" data-srcset="https://cdn.myanimelist.net/r/90x140/images/anime/1042/110294.jpg?s=95a7d5931d3718830f4b4edde97dd6aa 1x,https://cdn.myanimelist.net/r/180x280/images/anime/1042/110294.jpg?s=905fb34e09412d92244e046024685933 2x" width="90" height="140" class="image lazyload" alt="Kyou kara Ore wa!!" border="0" ></a></li></ul></div></div></div><br><div><div class="floatRightHeader"><a href="/anime/1260/Saint_Seiya__Saishuu_Seisen_no_Senshi-tachi/news">More news</a></div><h2>Recent News</h2></div><div class="clearfix"><div class="picSurround fl-l mr8 ml3 mt4"><a href="/news/62651528" class="image-link"><img src="https://cdn.myanimelist.net/images/spacer.gif" data-src="https://cdn.myanimelist.net/r/50x78/s/common/uploaded_files/1617657015-44afae3d8c068b7b461394ec91135c5e.png?s=1ef5baf26fd5236e3b49d18b7ff551b6" data-srcset="https://cdn.myanimelist.net/r/50x78/s/common/uploaded_files/1617657015-44afae3d8c068b7b461394ec91135c5e.png?s=1ef5baf26fd5236e3b49d18b7ff551b6 1x,https://cdn.myanimelist.net/r/100x156/s/common/uploaded_files/1617657015-44afae3d8c068b7b461394ec91135c5e.png?s=cff3c1a6520a675720dfc26fc9eb85f5 2x" alt="North American Anime &amp; Manga Releases for April" width="50" height="78" class="lazyload"></a></div><p class="spaceit"><a href="/news/62651528"><strong>North American Anime &amp; Manga Releases for April</strong></a></p> <div class="clearfix" style="overflow:hidden;"><p>Here are the North American anime, manga, and light novel releases for April Week 1: April 6 - 12 Anime Releases Aya to Majo (Earwig and the Witch) Blu-ray &amp; DVD...<a href="/news/62651528">read more</a></p></div> <p class="lightLink spaceit">Apr 5, 2:12 PM by <a href="/profile/ImperfectBlue">ImperfectBlue</a> | <a href="/forum/?topicid=1912326">Discuss (5 comments)</a></p></div> <div class="borderClass"></div><div class="clearfix"><div class="picSurround fl-l mr8 ml3 mt4"><a href="/news/61547832" class="image-link"><img src="https://cdn.myanimelist.net/images/spacer.gif" data-src="https://cdn.myanimelist.net/r/50x78/s/common/uploaded_files/1609363165-372124a895aef5fcdcfcd7625f62adc0.jpeg?s=1ec002a74d7cfedf58e01b449545c4f9" data-srcset="https://cdn.myanimelist.net/r/50x78/s/common/uploaded_files/1609363165-372124a895aef5fcdcfcd7625f62adc0.jpeg?s=1ec002a74d7cfedf58e01b449545c4f9 1x,https://cdn.myanimelist.net/r/100x156/s/common/uploaded_files/1609363165-372124a895aef5fcdcfcd7625f62adc0.jpeg?s=3881bad8b8191d5ff30e2c889d495ad9 2x" alt="Q1 2021 Anime &amp; Manga Licenses [Update 3/24]" width="50" height="78" class="lazyload"></a></div><p class="spaceit"><a href="/news/61547832"><strong>Q1 2021 Anime &amp; Manga Licenses [Update 3/24]</strong></a></p> <div class="clearfix" style="overflow:hidden;"><p>In this thread, you&#039;ll find a comprehensive list of anime and manga licensed in the second quarter (Jan-Mar) of 2021. Winter 2021 anime which were licensed befo...<a href="/news/61547832">read more</a></p></div> <p class="lightLink spaceit">Dec 30, 2020 1:22 PM by <a href="/profile/Snow">Snow</a> | <a href="/forum/?topicid=1885614">Discuss (9 comments)</a></p></div> <div class="borderClass"></div><br><div><div class="floatRightHeader"><a href="/forum/?animeid=1260"><a href="/anime/1260/Saint_Seiya__Saishuu_Seisen_no_Senshi-tachi/forum">More discussions</a></div><h2>Recent Forum Discussion</h2></div><div class="page-forum"> <table border="0" cellpadding="0" cellspacing="0" width="100%" id="forumTopics"><tr id="topicRow1"> <td class="forum_boardrow2" style="border-width: 0px 1px 1px 1px;" width="25" align="center" id="topicrow1"><a href="https://myanimelist.net/login.php?from=%2Fanime%2F1260%2FSaint_Seiya__Saishuu_Seisen_no_Senshi-tachi%3Fuser-agent%3DMozilla%252F5.0%2B%2528Macintosh%253B%2BIntel%2BMac%2BOS%2BX%2B10_15_7%2529%2BAppleWebKit%252F537.36%2B%2528KHTML%252C%2Blike%2BGecko%2529%2BChrome%252F95.0.4638.69%2BSafari%252F537.36%26accept%3Dimage%252Favif%252Cimage%252Fwebp%252Cimage%252Fapng%252Cimage%252Fsvg%252Bxml%252Cimage%252F%252A%252C%252A%252F%252A%253Bq%253D0.8%26referer%3Dhttps%253A%252F%252Fmyanimelist.net%252F&amp;error=login_required"><img class="lazyload" data-src="https://cdn.myanimelist.net/images/watch_n.gif" title="Topic is not being watched"></a></td> <td class="forum_boardrow1" style="border-width: 0px 1px 1px 0px;">Poll: <a href="/forum/?topicid=1366393">Saint Seiya: Saishuu Seisen no Senshi-tachi Episode 1 Discussion</a> <small></small><br><span class="forum_postusername"><a href="/profile/Albi-kun">Albi-kun</a></span> - <span class="lightLink">Mar 26, 2015</span></td> <td align="center" width="75" class="forum_boardrow2" style="border-width: 0px 1px 1px 0px;">1 replies</td> <td align="right" width="130" class="forum_boardrow1" style="border-width: 0px 1px 1px 0px;" nowrap>by <a href="/profile/Rei_III">Rei_III</a> <a href="/forum/?topicid=1366393&goto=lastpost" title="Go to the Last Post">&raquo;&raquo;</a><br>Sep 13, 2019 10:32 PM</td> </tr> </table></div><div style="padding:16px 0px 0px 0px;"><div style="padding: 20px 40px;display: inline-block;"></div><div style="padding: 20px 0px;display: inline-block;"></div></div> <div class="mal-ad-unit" data-ad-width="801" data-ad-height="633"> <div id="taboola-below-article-thumbnails-anime"></div> <script type="text/javascript"> window._taboola = window._taboola || []; _taboola.push({ mode: 'alternating-thumbnails-a', container: 'taboola-below-article-thumbnails-anime', placement: 'Below Article Thumbnails Anime', target_type: 'mix' }); </script> </div> </td> </tr> </table> </div> <div class="mauto clearfix pt24" style="width:760px;"> <div class="fl-l"> </div> <div class="fl-r"> </div> </div> </td> </tr> </table> <script type="text/javascript" src="//assets.pinterest.com/js/pinit.js" data-pin-hover="true"></script></div><!-- end of contentHome --> </div><!-- end of contentWrapper --> <script> $(document).ready(function() { $(window).scroll(function() { var cHeight = $("#myanimelist").height(); $("div[data-ad-sticky='manual']").each(function (i, o) { var aHeight = $(o).height(); var aTop = $(o).parent().offset().top; if (window.pageYOffset >= (cHeight - aHeight)) { $(o).css("top", ((cHeight - aHeight) - window.pageYOffset) + "px"); } else if (window.pageYOffset >= aTop) { $(o).addClass("sticky"); $(o).css("top", ""); } else { $(o).removeClass("sticky"); } }); }); }); </script> <!-- control container height --> <div style="clear:both;"></div> <!-- end rightbody --> </div><!-- wrapper --> <div id="ad-skin-bg-right" class="ad-skin-side-outer ad-skin-side-bg bg-right"> <div id="ad-skin-right" class="ad-skin-side right" style="display: none;"> <div id="ad-skin-right-absolute-block"> <div id="ad-skin-right-fixed-block"></div> </div> </div> </div> </div><!-- #myanimelist --> <div class="footer-ranking"> <div class="ranking-container"> <div class="ranking-unit"> <h3 class="title"><a href="https://myanimelist.net/topanime.php" class="view_more fl-r">More</a>Top Anime </h3> <ol> <li> <span class="rank">1</span> <a href="https://myanimelist.net/anime/5114/Fullmetal_Alchemist__Brotherhood">Fullmetal Alchemist: Brotherhood</a> </li> <li> <span class="rank">2</span> <a href="https://myanimelist.net/anime/28977/Gintama°">Gintama°</a> </li> <li> <span class="rank">3</span> <a href="https://myanimelist.net/anime/38524/Shingeki_no_Kyojin_Season_3_Part_2">Shingeki no Kyojin Season 3 Part 2</a> </li> <li> <span class="rank">4</span> <a href="https://myanimelist.net/anime/9253/Steins_Gate">Steins;Gate</a> </li> <li> <span class="rank">5</span> <a href="https://myanimelist.net/anime/42938/Fruits_Basket__The_Final">Fruits Basket: The Final</a> </li> </ol> </div> <div class="ranking-unit"> <h3 class="title"><a href="https://myanimelist.net/topanime.php?type=airing" class="view_more fl-r">More</a>Top Airing Anime </h3> <ol> <li> <span class="rank">1</span> <a href="https://myanimelist.net/anime/40834/Ousama_Ranking">Ousama Ranking</a> </li> <li> <span class="rank">2</span> <a href="https://myanimelist.net/anime/48569/86_Part_2">86 Part 2</a> </li> <li> <span class="rank">3</span> <a href="https://myanimelist.net/anime/45576/Mushoku_Tensei__Isekai_Ittara_Honki_Dasu_Part_2">Mushoku Tensei: Isekai Ittara Honki Dasu Part 2</a> </li> <li> <span class="rank">4</span> <a href="https://myanimelist.net/anime/21/One_Piece">One Piece</a> </li> <li> <span class="rank">5</span> <a href="https://myanimelist.net/anime/44042/Holo_no_Graffiti">Holo no Graffiti</a> </li> </ol> </div> <div class="ranking-unit"> <h3 class="title"><a href="https://myanimelist.net/character.php" class="view_more fl-r">More</a>Most Popular Characters </h3> <ol> <li> <span class="rank">1</span> <a href="https://myanimelist.net/character/417/Lelouch_Lamperouge">Lamperouge, Lelouch</a> </li> <li> <span class="rank">2</span> <a href="https://myanimelist.net/character/45627/Levi">Levi</a> </li> <li> <span class="rank">3</span> <a href="https://myanimelist.net/character/71/L_Lawliet">Lawliet, L</a> </li> <li> <span class="rank">4</span> <a href="https://myanimelist.net/character/40/Luffy_Monkey_D">Monkey D., Luffy</a> </li> <li> <span class="rank">5</span> <a href="https://myanimelist.net/character/62/Zoro_Roronoa">Roronoa, Zoro</a> </li> </ol> </div> </div> </div> <footer> <div id="footer-block"> <div class="footer-link-icon-block"> <div class="footer-social-media ac"> <a target="_blank" class="icon-sns-2 icon-fb di-ib" href="https://www.facebook.com/OfficialMyAnimeList" rel="noreferrer"></a> <a target="_blank" class="icon-sns-2 icon-tw di-ib" title="Follow @myanimelist on Twitter" href="https://twitter.com/myanimelist" rel="noreferrer"></a> <a target="_blank" class="icon-sns-2 icon-ig di-ib" title="Follow @myanimelist on Instagram" href="https://www.instagram.com/myanimelistofficial/" rel="noreferrer"></a> <a target="_blank" class="icon-sns-2 icon-dc di-ib" title="Join Discord Chat" href="https://discord.gg/myanimelist" rel="noreferrer"></a></div> <div class="footer-app ac"><a target="_blank" class="app-button appstore-button" href="https://apps.apple.com/us/app/myanimelist-official/id1469330778?md=8&amp;ct=pc_footer" rel="noreferrer"> <img src="https://cdn.myanimelist.net/images/appli/badge_iOS.png" alt="App Store"> </a><a target="_blank" class="app-button googleplay-button" href="https://play.google.com/store/apps/details?utm_campaign=pc_footer&amp;id=net.myanimelist.app&amp;utm_source=mal" rel="noreferrer"> <img src="https://cdn.myanimelist.net/images/appli/badge_googleplay.png" alt="Google Play"> </a> </div> </div> <div class="footer-link-block"> <p class="footer-link home di-ib"> <a href="https://myanimelist.net/">Home</a> </p> <p class="footer-link di-ib"> <a href="https://myanimelist.net/about.php">About</a> <a href="https://myanimelist.net/pressroom">Press Room</a> <a href="https://myanimelist.net/about.php?go=contact">Support</a> <a href="https://myanimelist.net/advertising">Advertising</a> <a href="https://myanimelist.net/forum/?topicid=515949">FAQ</a> <a href="https://myanimelist.net/about/terms_of_use">Terms</a> <a href="https://myanimelist.net/about/privacy_policy">Privacy</a> <a href="#/" class="cmp-gdpr-only">Privacy Settings</a> <a href="#/" class="cmp-ccpa-only">Do Not Sell My Personal Information</a> <a href="https://myanimelist.net/about/cookie_policy">Cookie</a> <a href="https://myanimelist.net/about/notice_at_collection">Notice at Collection</a> <a href="https://myanimelist.net/about/sitemap">Sitemap</a> </p> <p class="footer-link login di-ib"> <a href="https://myanimelist.net/login.php?from=%2Fanime%2F1260%2FSaint_Seiya__Saishuu_Seisen_no_Senshi-tachi%3Fuser-agent%3DMozilla%252F5.0%2B%2528Macintosh%253B%2BIntel%2BMac%2BOS%2BX%2B10_15_7%2529%2BAppleWebKit%252F537.36%2B%2528KHTML%252C%2Blike%2BGecko%2529%2BChrome%252F95.0.4638.69%2BSafari%252F537.36%26accept%3Dimage%252Favif%252Cimage%252Fwebp%252Cimage%252Fapng%252Cimage%252Fsvg%252Bxml%252Cimage%252F%252A%252C%252A%252F%252A%253Bq%253D0.8%26referer%3Dhttps%253A%252F%252Fmyanimelist.net%252F" id="malLogin" rel="nofollow">Login</a> <a href="https://myanimelist.net/register.php?from=%2Fanime%2F1260%2FSaint_Seiya__Saishuu_Seisen_no_Senshi-tachi%3Fuser-agent%3DMozilla%252F5.0%2B%2528Macintosh%253B%2BIntel%2BMac%2BOS%2BX%2B10_15_7%2529%2BAppleWebKit%252F537.36%2B%2528KHTML%252C%2Blike%2BGecko%2529%2BChrome%252F95.0.4638.69%2BSafari%252F537.36%26accept%3Dimage%252Favif%252Cimage%252Fwebp%252Cimage%252Fapng%252Cimage%252Fsvg%252Bxml%252Cimage%252F%252A%252C%252A%252F%252A%253Bq%253D0.8%26referer%3Dhttps%253A%252F%252Fmyanimelist.net%252F">Sign Up</a> </p> </div> <div class="footer-link-icon-block"> <div class="footer-recommended ac"> <a target="_blank" class="icon-recommended icon-tokyo-otaku-mode" href="http://otakumode.com/fb/5aO" rel="noopener">Tokyo Otaku Mode</a> <a target="_blank" class="icon-recommended icon-honeys-anime" href="https://honeysanime.com" rel="noopener">Honey's Anime</a> <a target="_blank" class="icon-recommended icon-manga-store" href="https://myanimelist.net/store?_location=mal_f_m">Manga Store</a> </div> </div> <div id="copyright"> MyAnimeList.net is a property of MyAnimeList Co.,Ltd. &copy;2021 All Rights Reserved. </div> <div id="recaptcha-terms"> This site is protected by reCAPTCHA and the Google <a href="https://policies.google.com/privacy" target="_blank" rel="noopener noreferrer">Privacy Policy</a> and <a href="https://policies.google.com/terms" target="_blank" rel="noopener noreferrer">Terms of Service</a> apply. </div> </div> </footer> <script src='//www.googletagservices.com/tag/js/gpt.js' async="async"></script> <script> var googletag = googletag || {}; googletag.cmd = googletag.cmd || []; </script> <script async> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga') ga('create', 'UA-369102-1', 'auto') ga('set', 'anonymizeIp', true) ga('require', 'linkid') // Enhanced Link Attribution ga('set', 'dimension1', 'guest') ga('send', 'pageview') </script> <script> window.dataLayer = window.dataLayer || []; dataLayer.push({ 'is_banned': 0, 'banned_type': '' }); </script> <script type="text/javascript"> window.MAL.SLVK = "g4OvMLVOmEI3J8u7dt8f8+mAuualsqCo"; window.MAL.CDN_URL = "https://cdn.myanimelist.net"; window.MAL.CURRENT_TUTORIAL_STEP_ID = null; window.MAL.USER_NAME = "" window.MAL.FACEBOOK.APP_ID = "360769957454434" window.MAL.FACEBOOK.API_VERSION = "v2.12" window.MAL.GTM_ID = "WL4QW3G" </script> <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WL4QW3G" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <script type="text/javascript"> window._taboola = window._taboola || []; _taboola.push({flush: true}); </script> </body> </html>
77.080214
9,422
0.6567
4b720790d41a736b62d5475d55025c0e206c4dda
6,122
sql
SQL
api/src/main/resources/db/migration/1.0/V1.0.10__DML-INSERT_DATA-LETTER_GRADE.sql
bcgov/EDUC-GRAD-STUDENT-GRADUATION-API
5192dad013a7cda6d01a3ea22534379cc069b4cc
[ "Apache-2.0" ]
null
null
null
api/src/main/resources/db/migration/1.0/V1.0.10__DML-INSERT_DATA-LETTER_GRADE.sql
bcgov/EDUC-GRAD-STUDENT-GRADUATION-API
5192dad013a7cda6d01a3ea22534379cc069b4cc
[ "Apache-2.0" ]
20
2021-07-12T17:35:58.000Z
2022-03-30T23:57:07.000Z
api/src/main/resources/db/migration/1.0/V1.0.10__DML-INSERT_DATA-LETTER_GRADE.sql
bcgov/EDUC-GRAD-STUDENT-GRADUATION-API
5192dad013a7cda6d01a3ea22534379cc069b4cc
[ "Apache-2.0" ]
null
null
null
INSERT INTO LETTER_GRADE (LETTER_GRADE,PASS_FLAG,GPA_MARK_VALUE,DESCRIPTION,PERCENT_RANGE_HIGH,PERCENT_RANGE_LOW,LABEL,EXPIRY_DATE) VALUES ('W','N',0,'According to the policy of the board, and upon request of the parent of the student or, when appropriate, the student, the principal, vice principal or director of instruction in charge of a school may grant permission to a student to withdraw from a course or subject.',0,0,'Withdrawn',NULL); INSERT INTO LETTER_GRADE (LETTER_GRADE,PASS_FLAG,GPA_MARK_VALUE,DESCRIPTION,PERCENT_RANGE_HIGH,PERCENT_RANGE_LOW,LABEL,EXPIRY_DATE) VALUES ('WF','N',0,'Withdrawn. Final letter grade for non-examinable only; not applicable to interim letter grades.',0,0,'Withdrawn',TIMESTAMP'1994-08-01 00:00:00.0'); INSERT INTO LETTER_GRADE (LETTER_GRADE,PASS_FLAG,GPA_MARK_VALUE,DESCRIPTION,PERCENT_RANGE_HIGH,PERCENT_RANGE_LOW,LABEL,EXPIRY_DATE) VALUES ('IP','N',0,'In Progress. Final letter grade for non-examinable only; Interim letter grade for both examinable and non-examinable.',0,0,'In Progress',TIMESTAMP'1997-08-01 00:00:00.0'); INSERT INTO LETTER_GRADE (LETTER_GRADE,PASS_FLAG,GPA_MARK_VALUE,DESCRIPTION,PERCENT_RANGE_HIGH,PERCENT_RANGE_LOW,LABEL,EXPIRY_DATE) VALUES ('A','Y',4,'The student demonstrates excellent or outstanding performance in relation to expected learning outcomes for the course or subject and grade.',100,86,'A',NULL); INSERT INTO LETTER_GRADE (LETTER_GRADE,PASS_FLAG,GPA_MARK_VALUE,DESCRIPTION,PERCENT_RANGE_HIGH,PERCENT_RANGE_LOW,LABEL,EXPIRY_DATE) VALUES ('B','Y',3,'The student demonstrates very good performance in relation to expected learning outcomes for the course or subject and grade.',85,73,'B',NULL); INSERT INTO LETTER_GRADE (LETTER_GRADE,PASS_FLAG,GPA_MARK_VALUE,DESCRIPTION,PERCENT_RANGE_HIGH,PERCENT_RANGE_LOW,LABEL,EXPIRY_DATE) VALUES ('C+','Y',2.5,'The student demonstrates good performance in relation to expected learning outcomes for the course or subject and grade.',72,67,'C+',NULL); INSERT INTO LETTER_GRADE (LETTER_GRADE,PASS_FLAG,GPA_MARK_VALUE,DESCRIPTION,PERCENT_RANGE_HIGH,PERCENT_RANGE_LOW,LABEL,EXPIRY_DATE) VALUES ('C','Y',2,'The student demonstrates satisfactory performance in relation to expected learning outcomes for the course or subject and grade.',66,60,'C',NULL); INSERT INTO LETTER_GRADE (LETTER_GRADE,PASS_FLAG,GPA_MARK_VALUE,DESCRIPTION,PERCENT_RANGE_HIGH,PERCENT_RANGE_LOW,LABEL,EXPIRY_DATE) VALUES ('C-','Y',1,' The student demonstrates minimally acceptable performance in relation to expected learning outcomes for the course or subject and grade.',59,50,'C-',NULL); INSERT INTO LETTER_GRADE (LETTER_GRADE,PASS_FLAG,GPA_MARK_VALUE,DESCRIPTION,PERCENT_RANGE_HIGH,PERCENT_RANGE_LOW,LABEL,EXPIRY_DATE) VALUES ('RM','Y',0,'A Final School Letter Grade of "RM" (Requirement Met) can only be supplied if the record is for the Graduation Transitions course (GT/GTF).',0,0,'Requirement Met',TIMESTAMP'2021-07-01 00:00:00.0'); INSERT INTO LETTER_GRADE (LETTER_GRADE,PASS_FLAG,GPA_MARK_VALUE,DESCRIPTION,PERCENT_RANGE_HIGH,PERCENT_RANGE_LOW,LABEL,EXPIRY_DATE) VALUES ('F','N',0,'The student has not demonstrated the minimally acceptable performance in relation to the expected learning outcomes for the course or subject and grade. F (Failed) may only be used as a final letter grade if an "I" (In Progress) letter grade has been previously assigned or the "F" is assigned as a result of failing a provincially examinable course.',49,0,'Failed',NULL); INSERT INTO LETTER_GRADE (LETTER_GRADE,PASS_FLAG,GPA_MARK_VALUE,DESCRIPTION,PERCENT_RANGE_HIGH,PERCENT_RANGE_LOW,LABEL,EXPIRY_DATE) VALUES ('NM','N',0,'Used during a strike in 2012 or 2013 to allow schools to report a course in progress to the Ministry (presumably for Interim mark reporting) where no percentage grade was available. There is no expiry date on this letter grade to allow its (re)use if needed.',0,0,'No Mark',NULL); INSERT INTO LETTER_GRADE (LETTER_GRADE,PASS_FLAG,GPA_MARK_VALUE,DESCRIPTION,PERCENT_RANGE_HIGH,PERCENT_RANGE_LOW,LABEL,EXPIRY_DATE) VALUES ('WR','N',0,'Withdrawn. Final letter grade for non-examinable only; not applicable to interim letter grades.',0,0,'Withdrawn',NULL); INSERT INTO LETTER_GRADE (LETTER_GRADE,PASS_FLAG,GPA_MARK_VALUE,DESCRIPTION,PERCENT_RANGE_HIGH,PERCENT_RANGE_LOW,LABEL,EXPIRY_DATE) VALUES ('SG','Y',0,'Although completion of normal requirements is not possible, a sufficient level of performance has been attained to warrant, consistent with the best interests of the student, the granting of standing for the course or subject and grade. Standing Granted may be used in cases of serious illness, hospitalization, late entry or early leaving, but may only be granted by an adjudication process authorized by the principal, vice principal or director of instruction in charge of the school.',0,0,'Standing Granted',NULL); INSERT INTO LETTER_GRADE (LETTER_GRADE,PASS_FLAG,GPA_MARK_VALUE,DESCRIPTION,PERCENT_RANGE_HIGH,PERCENT_RANGE_LOW,LABEL,EXPIRY_DATE) VALUES ('TS','Y',0,'May be granted by the principal, vice principal or director of instruction in charge of a school on the basis of an examination of records from an institution other than a school as defined in the School Act. Alternatively, the principal, vice principal or director of instruction in charge of a school may assign a letter grade on the basis of an examination of those records.',0,0,'TRANSFER STANDING',NULL); INSERT INTO LETTER_GRADE (LETTER_GRADE,PASS_FLAG,GPA_MARK_VALUE,DESCRIPTION,PERCENT_RANGE_HIGH,PERCENT_RANGE_LOW,LABEL,EXPIRY_DATE) VALUES ('I','N',0,'The student, for a variety of reasons, is not demonstrating minimally acceptable performance in relation to the expected learning outcomes. An "I" letter grade may only be assigned in accordance with section 3 of the Provincial Letter Grade Order.',0,0,'In Progress or Incomplete',NULL); INSERT INTO LETTER_GRADE (LETTER_GRADE,PASS_FLAG,GPA_MARK_VALUE,DESCRIPTION,PERCENT_RANGE_HIGH,PERCENT_RANGE_LOW,LABEL,EXPIRY_DATE) VALUES ('P','Y',1,'Note: “P” was used instead of “C-” to indicate a passing letter grade prior to September 1994.',59,50,'P',TIMESTAMP'1994-08-01 00:00:00.0');
382.625
670
0.812806
c364e13918f7daaf9cecc36e4c358ddd6c87a875
3,361
lua
Lua
prototypes/hatch.lua
manmen-mi/Renai-Transportation
64e1a26f1f116747d3aff137af6a0e91d8ebe62f
[ "MIT" ]
13
2020-05-06T17:43:23.000Z
2022-01-21T14:26:42.000Z
prototypes/hatch.lua
manmen-mi/Renai-Transportation
64e1a26f1f116747d3aff137af6a0e91d8ebe62f
[ "MIT" ]
27
2020-08-11T16:56:01.000Z
2022-01-12T14:08:20.000Z
prototypes/hatch.lua
manmen-mi/Renai-Transportation
64e1a26f1f116747d3aff137af6a0e91d8ebe62f
[ "MIT" ]
6
2020-06-14T15:47:53.000Z
2022-01-24T15:40:07.000Z
local nothing = { filename = "__RenaiTransportation__/graphics/nothing.png", width = 1, height = 1 } data:extend({ { type = "simple-entity-with-owner", name = "HatchRT", icon = "__RenaiTransportation__/graphics/hatch/icon.png", icon_size = 16, flags = {"placeable-neutral", "player-creation", "not-rotatable"}, collision_mask = {"layer-51"}, collision_box = {{-0.35, -0.3}, {0.35, 0.55}}, selection_box = {{-0.35, -0.3}, {0.35, 0.55}}, selection_priority = 255, minable = {mining_time = 0.2, result = "HatchRTItem"}, render_layer = "higher-object-under", picture = { filename = "__RenaiTransportation__/graphics/hatch/hatch.png", width = 28, height = 42, scale = 0.75 } }, { --------- The hatch item ------------- type = "item", name = "HatchRTItem", icon = "__RenaiTransportation__/graphics/hatch/icon.png", icon_size = 64, --icon_mipmaps = 4, subgroup = "RT", order = "f", place_result = "HatchRT", stack_size = 50 }, { --------- The hatch recipie ---------- type = "recipe", name = "HatchRTRecipe", enabled = false, energy_required = 1, ingredients = { {"pipe-to-ground", 1}, {"pipe", 1}, {"copper-plate", 2} }, result = "HatchRTItem" }, ------------------ Ejector hatch --------------------- { type = "inserter", name = "RTThrower-EjectorHatchRT", icon = "__RenaiTransportation__/graphics/hatch/EjeectorIccon.png", icon_size = 43, flags = {"placeable-neutral", "player-creation"}, collision_mask = {"layer-51"}, collision_box = {{-0.35, -0.35}, {0.35, 0.35}}, selection_box = {{-0.4, -0.4}, {0.4, 0.4}}, selection_priority = 255, minable = {mining_time = 0.2, result = "RTThrower-EjectorHatchRTItem"}, render_layer = "higher-object-under", energy_source = { type = "electric", usage_priority = "secondary-input", drain = "0.4kW" }, energy_per_movement = "5kJ", energy_per_rotation = "5kJ", extension_speed = 0.03, rotation_speed = 0.014, pickup_position = {0, -0.2}, insert_position = {0, 19.9}, allow_custom_vectors = false, chases_belt_items = false, draw_held_item = false, draw_inserter_arrow = false, hand_base_picture = nothing, hand_open_picture = nothing, hand_closed_picture = nothing, platform_picture = { sheet = { filename = "__RenaiTransportation__/graphics/hatch/EjectorHatch.png", priority = "extra-high", width = 64, height = 64, scale = 0.75 } } }, { --------- The ejector hatch item ------------- type = "item", name = "RTThrower-EjectorHatchRTItem", icon = "__RenaiTransportation__/graphics/hatch/EjeectorIccon.png", icon_size = 43, --icon_mipmaps = 4, subgroup = "RT", order = "f", place_result = "RTThrower-EjectorHatchRT", stack_size = 50 }, { --------- The ejector hatch recipie ---------- type = "recipe", name = "RTThrower-EjectorHatchRTRecipe", enabled = false, energy_required = 1, ingredients = { {"HatchRTItem", 1}, {"BouncePlateItem", 1}, {"electronic-circuit", 2} }, result = "RTThrower-EjectorHatchRTItem" }, ---------- sprites because inserters dont render above a lot of things { type = "animation", name = "EjectorHatchFrames", filename = "__RenaiTransportation__/graphics/hatch/EjectorHatch.png", size = 64, frame_count = 4, line_length = 4, animation_speed = 0.1, scale = 0.75 } })
24.896296
72
0.628682
e81c248e68a18591ddb007eb325ce03a8a1e8ee7
1,853
hpp
C++
engine/core/genoptns.hpp
Venkster123/Zhetapi
9a034392c06733c57d892afde300e90c4b7036f9
[ "MIT" ]
27
2020-06-05T15:39:31.000Z
2022-01-07T05:03:01.000Z
engine/core/genoptns.hpp
Venkster123/Zhetapi
9a034392c06733c57d892afde300e90c4b7036f9
[ "MIT" ]
1
2021-02-12T04:51:40.000Z
2021-02-12T04:51:40.000Z
engine/core/genoptns.hpp
Venkster123/Zhetapi
9a034392c06733c57d892afde300e90c4b7036f9
[ "MIT" ]
4
2021-02-12T04:39:55.000Z
2021-11-15T08:00:06.000Z
#ifndef GENOPTNS_H_ #define GENOPTNS_H_ // Standard headers #include <iostream> // Engine headers #include "operations.hpp" #include "variant.hpp" #include "primoptns.hpp" namespace zhetapi { namespace core { // operation type using Operation = Variant (*)(const Variant, const Variant); struct Overload { OID ovid; Operation main; }; // Opbase using VOverload = std::vector <Overload>; extern const std::vector <VOverload> operations; inline Variant compute(OpCode code, const Variant a, const Variant b) { // Check if a and b are primitives if (is_primitive(a) && is_primitive(b)) return new Primitive(primitive::compute(code, *((Primitive *) a), *((Primitive *) b))); // Static str tables (TODO: keep else where (str_tables...)) static std::string id_strs[] { "null", "int", "double" }; // TODO: static str tables static std::string op_strs[] { "get", "const", "addition", "subtraction", "multiplication", "division" }; // Exception class bad_overload : public std::runtime_error { public: // TODO: fill out the rest of the error bad_overload(OpCode code, TypeId a, TypeId b) : std::runtime_error("Bad overload (" + id_strs[a] + ", " + id_strs[b] + ") for operation \"" + op_strs[code] + "\"") {} }; // Check bounds of code if (code > operations.size()) throw std::runtime_error("code is out of bounds"); // Function (offset is l_add) const VOverload *ovb = &(operations[code]); // Get ids of the operands TypeId aid = gid(a); TypeId bid = gid(b); for (uint8_t i = 0; i < ovb->size(); i++) { uint64_t ovid = (*ovb)[i].ovid; if (ovid == ovlid(aid, bid)) return (*ovb)[i].main(a, b); } // Throw here std::cout << "arg1.id = " << aid << std::endl; std::cout << "arg2.id = " << bid << std::endl; throw bad_overload(code, aid, bid); return Variant(); } } } #endif
20.362637
89
0.64436
b7ac4e333889f9d7d1fea9f3e25bf7465139f4b4
69
lua
Lua
bin/script/test_path.lua
brinkqiang/luapb
a8532650ee44cd00cda3a7a4d0077c2290a9692d
[ "MIT" ]
3
2020-12-15T04:50:58.000Z
2021-09-03T07:17:27.000Z
bin/script/test_path.lua
brinkqiang/luapb
a8532650ee44cd00cda3a7a4d0077c2290a9692d
[ "MIT" ]
null
null
null
bin/script/test_path.lua
brinkqiang/luapb
a8532650ee44cd00cda3a7a4d0077c2290a9692d
[ "MIT" ]
1
2019-06-27T13:41:33.000Z
2019-06-27T13:41:33.000Z
-- lua script local pb = require("luapb") print(pb.getmodulepath())
13.8
27
0.695652
9d43c7f00a98d97b72e464cd50c20f7306a580a6
3,899
html
HTML
public/test/login.html
amcsi/lycdb
16b7d174306d42559daffab0ce0bbb574da6db79
[ "BSD-3-Clause" ]
null
null
null
public/test/login.html
amcsi/lycdb
16b7d174306d42559daffab0ce0bbb574da6db79
[ "BSD-3-Clause" ]
null
null
null
public/test/login.html
amcsi/lycdb
16b7d174306d42559daffab0ce0bbb574da6db79
[ "BSD-3-Clause" ]
null
null
null
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <link rel="stylesheet" type="text/css" href="../style.css"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title></title> </head> <body> <div id='header'> </div> <div id='nav'> <ul class="nav left"> <li><a href='index.php?p=1'>About</a></li> <li><a href='index.php'>News</a></li> <li><a href='index.php?p=2'>Card search</a></li> <li><a href='http://forums.akiba-ch.com/viewforum.php?f=4'>Akihabara Forums</a></li> </ul> <ul class="nav right"> <li><div><span>not logged in</span></div></li> <li><a href='index.php?p=3'>Login/Register</a></li> </ul> </div> <div id='content'> <form method='post' action='#'> <fieldset> <legend>Login</legend> <div class='register_error'>Bad username or password.</div> <ul> <li> <label for='login_username' class="form_title">Username</label> <input type='text' id='login_username' name='username'> </li> <li> <label for='login_password' class="form_title">Password</label> <input type='password' id='login_password' name='password'> </li> <li> <label for='login_remember' class="form_title">Remember me</label> <input type='checkbox' id='login_remember' name='remember' value='1'> </li> <li> <label for='login_submit' class="form_title"></label> <input type='submit' id='login_submit' name='login' value='Log in'> </li> <li> <a href='index.php?p=4'>I forgot my password</a> </li> </ul> </fieldset> <fieldset> <legend>Register</legend> <ul> <li> <label for='register_username' class="form_title">Username</label> <input type='text' id='register_username' name='username'> <div class='register_error'>Sorry, username already taken.</div> </li> <li> <label for='register_password' class="form_title">Password</label> <input type='password' id='register_password' name='password'> <div class='register_error'>Password must have at least 4 characters.</div> </li> <li> <label for='register_password2' class="form_title">Password again</label> <input type='password' id='register_password2' name='password2'> <div class='register_error'>The two passwords don't match.</div> </li> <li> <label for='register_email' class="form_title">E-mail</label> <input type='text' id='register_username' name='username'> <div class='register_error'>Invalid e-mail address.</div> </li> <li> <label for='register_submit' class="form_title"></label> <input type='submit' id='register_submit' name='register' value='Register'> </li> </ul> </fieldset> </form> </div> <div id='footer'> </div> </body> </html>
43.322222
99
0.452937
ef1a6a8d1e1dd1c942acaa990af30a8a44e3fe92
838
sql
SQL
src/main/resources/db/migration/courtcase/V2100__fix_probation_status.sql
ministryofjustice/court-case-service
58729d390414569f6e0f842a2997c6d92a79b0e3
[ "MIT" ]
null
null
null
src/main/resources/db/migration/courtcase/V2100__fix_probation_status.sql
ministryofjustice/court-case-service
58729d390414569f6e0f842a2997c6d92a79b0e3
[ "MIT" ]
92
2019-11-27T14:28:25.000Z
2022-03-28T02:02:46.000Z
src/main/resources/db/migration/courtcase/V2100__fix_probation_status.sql
ministryofjustice/court-case-service
58729d390414569f6e0f842a2997c6d92a79b0e3
[ "MIT" ]
3
2020-02-28T14:55:47.000Z
2021-12-20T10:39:56.000Z
BEGIN; -- Similar SQL has been applied before in V1122__alter_probation_status.sql -- Need to do this on defendant now. Bug fix in this changeset which should transform incoming "No record" and such to NO_RECORD from now on update court_case set probation_status = 'CURRENT' where LOWER(probation_status) = 'current'; update court_case set probation_status = 'NO_RECORD' where LOWER(probation_status) = 'no record'; update court_case set probation_status = 'PREVIOUSLY_KNOWN' where LOWER(probation_status) = 'previously known'; update defendant set probation_status = 'CURRENT' where LOWER(probation_status) = 'current'; update defendant set probation_status = 'NO_RECORD' where LOWER(probation_status) = 'no record'; update defendant set probation_status = 'PREVIOUSLY_KNOWN' where LOWER(probation_status) = 'previously known'; COMMIT;
69.833333
140
0.801909
42c35008089ff1aeb2efc9a8bb0960cf84169500
4,323
swift
Swift
CID Gamified Training/CID Gamified Training/Assignments/Assignments.swift
enyaxing/arl-gamified-training
2dcbecba790ee3a8ef37f548438479af6e658cb8
[ "MIT" ]
1
2020-09-12T23:01:14.000Z
2020-09-12T23:01:14.000Z
CID Gamified Training/CID Gamified Training/Assignments/Assignments.swift
enyaxing/arl-gamified-training
2dcbecba790ee3a8ef37f548438479af6e658cb8
[ "MIT" ]
null
null
null
CID Gamified Training/CID Gamified Training/Assignments/Assignments.swift
enyaxing/arl-gamified-training
2dcbecba790ee3a8ef37f548438479af6e658cb8
[ "MIT" ]
null
null
null
// // Assignments.swift // CID Gamified Training // // Created by Kyle Lui on 7/6/20. // Copyright © 2020 X-Force. All rights reserved. // import SwiftUI import Firebase /** View that lets you see existing assignments. */ struct Assignments: View { /** Reference to global user variable. */ @EnvironmentObject var user: GlobalUser /** Connection to firebase user collection. */ let db = Firestore.firestore().collection("users") /** Mapping from assignment name to assignment. */ @State var assignments: [String : Assignment] = [:] /** Class documentReference in Firebase. */ var classes: DocumentReference? var body: some View { VStack(alignment: .leading, spacing: 20) { HStack { Spacer() Text("Assignments:") .font(.title) .fontWeight(.black) .foregroundColor(Color.white) Spacer() } List { ForEach(self.assignments.sorted(by: { $0.0 < $1.0 }), id: \.key) {key, value in NavigationLink(destination: AssignmentDetail(assignment: value, doc: self.classes, assignments: self.$assignments)){ Text(key).foregroundColor(Color.white) } }.listRowBackground(Color(red: 0.2, green: 0.2, blue: 0.2)) } if self.user.userType == "instructor" { HStack{ Spacer() NavigationLink(destination: Setting(classes: self.classes)){ Text("Create Assignment") .foregroundColor(Color.white) .padding(15) .background(Color(red: 0, green: 0.6, blue: 0)) .cornerRadius(25) } Spacer() } } }.background(Color.lightBlack.edgesIgnoringSafeArea(.all)) .onAppear{ UITableView.appearance().backgroundColor = .clear self.getassignments(db: self.classes!.collection("assignments")) } } /** Gets list of sessions for this user from firebase. Parameters: db - CollectionReference of assignments collection in Firebase. */ func getassignments(db: CollectionReference) { let fm = FileManager.default let path = Bundle.main.resourcePath! + "/CID Images" db.getDocuments() {(query, err) in if err != nil { print("Error getting docs.") } else { for document in query!.documents { let friendly: [Card] = strCards(arr: document.get("friendly") as! [String]) let enemy: [Card] = strCards(arr: document.get("enemy") as! [String]) let friendlyAccuracy = document.get("friendlyAccuracy") as! Double let enemyAccuracy = document.get("enemyAccuracy") as! Double let time = document.get("time") as! Double var library: [Card] = [] do { let items = try fm.contentsOfDirectory(atPath: path) for item in items { if check(name: item, arr: friendly) && check(name: item, arr: enemy) { library.append(Card(name: "\(item)")) } } } catch { print("error") } self.assignments[document.documentID] = Assignment(name: document.documentID, library: library, friendly: friendly, enemy: enemy, friendlyAccuracy: friendlyAccuracy, enemyAccuracy: enemyAccuracy, time: time) } } } } } /** Converts a list of strings to a list of cards. Parameters: arr - list of strings to be converted. Return: Resulting list of cards. */ func strCards(arr: [String]) -> [Card] { var ret: [Card] = [] for str in arr { ret.append(Card(name: str)) } return ret } struct Assignments_Previews: PreviewProvider { static var previews: some View { Assignments(classes: nil).environmentObject(GlobalUser()) } }
37.267241
227
0.52718
bdba715e70e77a9add61661ed285e5eb5558f40d
292
kt
Kotlin
ktchism-rx/src/main/java/ktchism/rx/useCase/UseCaseCompletable.kt
AndreyRusSprint/Ktchism
8f3a1ef13d6ae7183ec5e69688381fe98d2cb01d
[ "MIT" ]
null
null
null
ktchism-rx/src/main/java/ktchism/rx/useCase/UseCaseCompletable.kt
AndreyRusSprint/Ktchism
8f3a1ef13d6ae7183ec5e69688381fe98d2cb01d
[ "MIT" ]
null
null
null
ktchism-rx/src/main/java/ktchism/rx/useCase/UseCaseCompletable.kt
AndreyRusSprint/Ktchism
8f3a1ef13d6ae7183ec5e69688381fe98d2cb01d
[ "MIT" ]
null
null
null
package ktchism.rx.useCase import io.reactivex.Completable import ktchism.core.UseCase /** * [UseCase] with [Completable] result. * * @param Params the type of input parameters. */ interface UseCaseCompletable<in Params> : UseCase<Completable, Params> where Params : UseCase.Params
22.461538
70
0.756849
ddfd1d910c17076a655e2a799721270180b71211
1,535
php
PHP
src/WorkerTrait.php
JieAnthony/laravel-octane-workerman
9cf73078c2d26488c3f8289f7e4e3f9e2ee6bcbd
[ "MIT" ]
48
2021-12-14T08:54:55.000Z
2022-03-29T08:37:10.000Z
src/WorkerTrait.php
mouyong/laravel-octane-workerman
fd8187d943812956e54476aef10529d074a15894
[ "MIT" ]
3
2022-03-24T14:46:25.000Z
2022-03-31T01:29:19.000Z
src/WorkerTrait.php
JieAnthony/laravel-octane-workerman
9cf73078c2d26488c3f8289f7e4e3f9e2ee6bcbd
[ "MIT" ]
6
2021-12-16T08:04:42.000Z
2022-03-27T16:27:32.000Z
<?php namespace JieAnthony\LaravelOctaneWorkerman; use Illuminate\Support\Arr; trait WorkerTrait { protected static $_bindInstance = []; protected static $_instance = null; public static function bindInstance(...$property) { foreach ($property as $prop) { static::setProp($prop); } } public static function getBindInstance($name = null) { if (str_contains($name, '.')) { $instance = Arr::get(static::$_bindInstance, $name); if ($instance) { return $instance; } } if ($name && array_key_exists($name, static::$_bindInstance)) { return static::$_bindInstance[$name]; } return static::$_bindInstance; } protected static function setProp($prop) { $name = get_variable_name($prop); if ($name) { static::$_bindInstance[$name] = $prop; } } public function __call($method, $args) { foreach (static::$_bindInstance as $name => $instance) { if (method_exists($instance, $method)) { return $instance->$method(...$args); } } throw new \Exception("\\request() not found method {$method}, please contact my24251325@gmail.com"); } public static function __callStatic($method, $args) { if (!static::$_instance) { static::$_instance = new static(); } return static::$_instance->$method(...$args); } }
23.257576
108
0.548534
04dd07d03efd822341657eabeba3b109374bd65d
1,723
java
Java
core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/NodeDispatchedWorkflowExecutionItemImpl.java
LarsFronius/rundeck
dc9dcc35441fb59f74436b768f172f9d049637ae
[ "Apache-2.0" ]
null
null
null
core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/NodeDispatchedWorkflowExecutionItemImpl.java
LarsFronius/rundeck
dc9dcc35441fb59f74436b768f172f9d049637ae
[ "Apache-2.0" ]
null
null
null
core/src/main/java/com/dtolabs/rundeck/core/execution/workflow/NodeDispatchedWorkflowExecutionItemImpl.java
LarsFronius/rundeck
dc9dcc35441fb59f74436b768f172f9d049637ae
[ "Apache-2.0" ]
null
null
null
/* * Copyright 2012 DTO Labs, Inc. (http://dtolabs.com) * * 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. * */ /* * NodeDispatchedWorkflowExecutionItemImpl.java * * User: Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a> * Created: 11/5/12 11:55 AM * */ package com.dtolabs.rundeck.core.execution.workflow; import com.dtolabs.rundeck.core.execution.workflow.steps.NodeDispatchStepExecutor; import com.dtolabs.rundeck.core.execution.workflow.steps.node.NodeStepExecutionItem; /** * NodeDispatchedWorkflowExecutionItemImpl is ... * * @author Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a> */ public class NodeDispatchedWorkflowExecutionItemImpl extends WorkflowExecutionItemImpl implements NodeStepExecutionItem { public NodeDispatchedWorkflowExecutionItemImpl(final IWorkflow workflow) { super(workflow); } public NodeDispatchedWorkflowExecutionItemImpl(WorkflowExecutionItem item) { super(item); } @Override public String getNodeStepType() { return NodeDispatchStepExecutor.STEP_EXECUTION_TYPE; } }
33.784314
110
0.717934
893c1f6518b3d5429725398d3f77c80ae4248c9d
67
lua
Lua
system/shell.lua
ShadowKatStudios/amie
725dd47cee4c5d385217f8c4dfb9842ff52bfafb
[ "MIT" ]
5
2015-07-11T18:05:34.000Z
2021-04-07T13:38:16.000Z
system/shell.lua
ShadowKatStudios/amie
725dd47cee4c5d385217f8c4dfb9842ff52bfafb
[ "MIT" ]
2
2015-04-16T17:41:50.000Z
2015-04-16T18:31:58.000Z
system/shell.lua
shadowkatstudios/amie
725dd47cee4c5d385217f8c4dfb9842ff52bfafb
[ "MIT" ]
2
2020-09-13T10:21:39.000Z
2020-09-17T01:54:29.000Z
while true do local text=syscall("readln") pcall(load(text)) end
13.4
29
0.731343
05c2c83dedd7ca094b5347e9b65534b2829eeddd
422
sql
SQL
SQLQueryT_Peoples.sql
S0L4/2s2019-t2-sprint-2-backend-Peoples
11c35f43b8e046a100ef22a5cebfdecf0645ff80
[ "MIT" ]
null
null
null
SQLQueryT_Peoples.sql
S0L4/2s2019-t2-sprint-2-backend-Peoples
11c35f43b8e046a100ef22a5cebfdecf0645ff80
[ "MIT" ]
null
null
null
SQLQueryT_Peoples.sql
S0L4/2s2019-t2-sprint-2-backend-Peoples
11c35f43b8e046a100ef22a5cebfdecf0645ff80
[ "MIT" ]
null
null
null
CREATE DATABASE T_Peoples USE T_Peoples -- DDL CREATE TABLE Funcionarios ( IdFuncionario INT PRIMARY KEY IDENTITY ,Nome VARCHAR(255) NOT NULL ,Sobrenome VARCHAR(255) NOT NULL ) -- DML INSERT INTO Funcionarios (Nome, Sobrenome) VALUES ('Catarina','Strada') ,('Tadeu','Vitelli') UPDATE Funcionarios SET Nome = 'Oba', Sobrenome = 'Abo' WHERE IdFuncionario = 2 -- DQL SELECT * FROM Funcionarios
17.583333
79
0.701422
5063d4ef9278676bd223f7fd06b04ff4d6b920f1
3,918
html
HTML
pipermail/antlr-interest/2010-March/037974.html
hpcc-systems/website-antlr3
aa6181595356409f8dc624e54715f56bd10707a8
[ "BSD-3-Clause" ]
null
null
null
pipermail/antlr-interest/2010-March/037974.html
hpcc-systems/website-antlr3
aa6181595356409f8dc624e54715f56bd10707a8
[ "BSD-3-Clause" ]
null
null
null
pipermail/antlr-interest/2010-March/037974.html
hpcc-systems/website-antlr3
aa6181595356409f8dc624e54715f56bd10707a8
[ "BSD-3-Clause" ]
null
null
null
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <TITLE> [antlr-interest] Factorization of Logic Expressions </TITLE> <LINK REL="Index" HREF="index.html" > <LINK REL="made" HREF="mailto:antlr-interest%40antlr.org?Subject=Re:%20%5Bantlr-interest%5D%20Factorization%20of%20Logic%20Expressions&In-Reply-To=%3CSNT121-W44B6B97F41EA929F1FE92B962C0%40phx.gbl%3E"> <META NAME="robots" CONTENT="index,nofollow"> <META http-equiv="Content-Type" content="text/html; charset=us-ascii"> <LINK REL="Previous" HREF="037973.html"> <LINK REL="Next" HREF="037978.html"> </HEAD> <BODY BGCOLOR="#ffffff"> <H1>[antlr-interest] Factorization of Logic Expressions</H1> <B>Nazim Oztahtaci</B> <A HREF="mailto:antlr-interest%40antlr.org?Subject=Re:%20%5Bantlr-interest%5D%20Factorization%20of%20Logic%20Expressions&In-Reply-To=%3CSNT121-W44B6B97F41EA929F1FE92B962C0%40phx.gbl%3E" TITLE="[antlr-interest] Factorization of Logic Expressions">nazim_oztahtaci at hotmail.com </A><BR> <I>Wed Mar 17 01:44:49 PDT 2010</I> <P><UL> <LI>Previous message: <A HREF="037973.html">[antlr-interest] (no subject) </A></li> <LI>Next message: <A HREF="037978.html">[antlr-interest] Factorization of Logic Expressions </A></li> <LI> <B>Messages sorted by:</B> <a href="date.html#37974">[ date ]</a> <a href="thread.html#37974">[ thread ]</a> <a href="subject.html#37974">[ subject ]</a> <a href="author.html#37974">[ author ]</a> </LI> </UL> <HR> <!--beginarticle--> <PRE> Hello everyone, I would like to thank everyone first of all during their help when I became a new member to this group. I am working on Antlr and my task since last month. I am able to parse a logic expression such as a(b+c) into a tree, then I apply Demorgan and distribution so I reach a DNF representation: ab+ac.. The operators that I support are NOT, OR, AND, &gt;, &lt;. Timer and IF-ELSE statements. Now Im working on factorizing the DNF formed expressions back to originial because the user of my program will be able to read output data file which has only string representation of DNF expression. So I need to factorize the DNF expression. The way I try to do is putting the expression in a matrix such as a b c 1 1 X ab 1 X 1 ac Then reading this matrix to find the most number of 1s and then re-check these rows if there are any more subsequences and so on.. I know that I cant reach the original expression everytime for the complicated expressions. Also for the reverse Demorgan, I cant use this matrix probably. I wanted to ask users of this mail group if they have any advice to me regarding an algorithm for this problem or a new way as solution. I know it is a bit hard and rare problem so even no help will be available for me, I appreciate for previous helps as well. Thank you all and good luck everyonje with their studies Nazim _________________________________________________________________ Yeni Windows 7: Size en uygun bilgisayar&#305; bulun. Daha fazla bilgi edinin. <A HREF="http://windows.microsoft.com/shop">http://windows.microsoft.com/shop</A> </PRE> <!--endarticle--> <HR> <P><UL> <!--threads--> <LI>Previous message: <A HREF="037973.html">[antlr-interest] (no subject) </A></li> <LI>Next message: <A HREF="037978.html">[antlr-interest] Factorization of Logic Expressions </A></li> <LI> <B>Messages sorted by:</B> <a href="date.html#37974">[ date ]</a> <a href="thread.html#37974">[ thread ]</a> <a href="subject.html#37974">[ subject ]</a> <a href="author.html#37974">[ author ]</a> </LI> </UL> <hr> <a href="http://www.antlr.org/mailman/listinfo/antlr-interest">More information about the antlr-interest mailing list</a><br> </body></html>
49.594937
423
0.686575
c59524e5cb189338711cbfb82b465760fc8ddfb3
214,266
cc
C++
content/browser/webauth/authenticator_impl_unittest.cc
sarang-apps/darshan_browser
173649bb8a7c656dc60784d19e7bb73e07c20daa
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
content/browser/webauth/authenticator_impl_unittest.cc
sarang-apps/darshan_browser
173649bb8a7c656dc60784d19e7bb73e07c20daa
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
content/browser/webauth/authenticator_impl_unittest.cc
sarang-apps/darshan_browser
173649bb8a7c656dc60784d19e7bb73e07c20daa
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "content/browser/webauth/authenticator_impl.h" #include <algorithm> #include <list> #include <memory> #include <string> #include <utility> #include <vector> #include "base/base64url.h" #include "base/bind.h" #include "base/bind_helpers.h" #include "base/compiler_specific.h" #include "base/json/json_parser.h" #include "base/json/json_writer.h" #include "base/run_loop.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" #include "base/system/sys_info.h" #include "base/test/bind_test_util.h" #include "base/test/gtest_util.h" #include "base/test/scoped_feature_list.h" #include "base/test/test_mock_time_task_runner.h" #include "base/time/tick_clock.h" #include "base/time/time.h" #include "base/timer/timer.h" #include "build/build_config.h" #include "components/autofill/content/browser/webauthn/internal_authenticator_impl.h" #include "components/cbor/reader.h" #include "components/cbor/values.h" #include "content/browser/webauth/authenticator_common.h" #include "content/browser/webauth/authenticator_environment_impl.h" #include "content/public/browser/authenticator_request_client_delegate.h" #include "content/public/browser/render_frame_host.h" #include "content/public/common/content_client.h" #include "content/public/common/content_features.h" #include "content/public/test/browser_test_utils.h" #include "content/test/test_render_frame_host.h" #include "device/base/features.h" #include "device/bluetooth/bluetooth_adapter_factory.h" #include "device/bluetooth/test/mock_bluetooth_adapter.h" #include "device/fido/attested_credential_data.h" #include "device/fido/authenticator_data.h" #include "device/fido/fake_fido_discovery.h" #include "device/fido/features.h" #include "device/fido/fido_authenticator.h" #include "device/fido/fido_constants.h" #include "device/fido/fido_test_data.h" #include "device/fido/hid/fake_hid_impl_for_testing.h" #include "device/fido/mock_fido_device.h" #include "device/fido/test_callback_receiver.h" #include "device/fido/virtual_fido_device_factory.h" #include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/remote.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" #include "url/url_util.h" #if defined(OS_MACOSX) #include "device/fido/mac/authenticator_config.h" #include "device/fido/mac/scoped_touch_id_test_environment.h" #endif #if defined(OS_WIN) #include "device/fido/win/fake_webauthn_api.h" #endif namespace content { using ::testing::_; using blink::mojom::AttestationConveyancePreference; using blink::mojom::AuthenticatorSelectionCriteria; using blink::mojom::AuthenticatorSelectionCriteriaPtr; using blink::mojom::AuthenticatorStatus; using blink::mojom::AuthenticatorTransport; using blink::mojom::CableAuthentication; using blink::mojom::CableAuthenticationPtr; using blink::mojom::GetAssertionAuthenticatorResponsePtr; using blink::mojom::MakeCredentialAuthenticatorResponsePtr; using blink::mojom::PublicKeyCredentialCreationOptions; using blink::mojom::PublicKeyCredentialCreationOptionsPtr; using blink::mojom::PublicKeyCredentialDescriptor; using blink::mojom::PublicKeyCredentialDescriptorPtr; using blink::mojom::PublicKeyCredentialParameters; using blink::mojom::PublicKeyCredentialParametersPtr; using blink::mojom::PublicKeyCredentialRequestOptions; using blink::mojom::PublicKeyCredentialRequestOptionsPtr; using blink::mojom::PublicKeyCredentialRpEntity; using blink::mojom::PublicKeyCredentialRpEntityPtr; using blink::mojom::PublicKeyCredentialType; using blink::mojom::PublicKeyCredentialUserEntity; using blink::mojom::PublicKeyCredentialUserEntityPtr; using cbor::Reader; using cbor::Value; namespace { using InterestingFailureReason = ::content::AuthenticatorRequestClientDelegate::InterestingFailureReason; using FailureReasonCallbackReceiver = ::device::test::TestCallbackReceiver<InterestingFailureReason>; typedef struct { const char* origin; // Either a relying party ID or a U2F AppID. const char* claimed_authority; AuthenticatorStatus expected_status; } OriginClaimedAuthorityPair; // The size of credential IDs returned by GetTestCredentials(). constexpr size_t kTestCredentialIdLength = 32u; constexpr char kTestOrigin1[] = "https://a.google.com"; constexpr char kTestOrigin2[] = "https://acme.org"; constexpr char kTestRelyingPartyId[] = "google.com"; constexpr char kCryptotokenOrigin[] = "chrome-extension://kmendfapggjehodndflmmgagdbamhnfd"; constexpr char kTestExtensionOrigin[] = "chrome-extension://abcdefghijklmnopqrstuvwxyzabcdef"; // Test data. CBOR test data can be built using the given // diagnostic strings and the utility at "http://CBOR.me/". constexpr int32_t kCoseEs256 = -7; constexpr uint8_t kTestChallengeBytes[] = { 0x68, 0x71, 0x34, 0x96, 0x82, 0x22, 0xEC, 0x17, 0x20, 0x2E, 0x42, 0x50, 0x5F, 0x8E, 0xD2, 0xB1, 0x6A, 0xE2, 0x2F, 0x16, 0xBB, 0x05, 0xB8, 0x8C, 0x25, 0xDB, 0x9E, 0x60, 0x26, 0x45, 0xF1, 0x41}; constexpr char kTestRegisterClientDataJsonString[] = R"({"challenge":"aHE0loIi7BcgLkJQX47SsWriLxa7BbiMJdueYCZF8UE","origin":)" R"("https://a.google.com", "type":"webauthn.create"})"; constexpr char kTestSignClientDataJsonString[] = R"({"challenge":"aHE0loIi7BcgLkJQX47SsWriLxa7BbiMJdueYCZF8UE","origin":)" R"("https://a.google.com", "type":"webauthn.get"})"; constexpr OriginClaimedAuthorityPair kValidRelyingPartyTestCases[] = { {"http://localhost", "localhost", AuthenticatorStatus::SUCCESS}, {"https://myawesomedomain", "myawesomedomain", AuthenticatorStatus::SUCCESS}, {"https://foo.bar.google.com", "foo.bar.google.com", AuthenticatorStatus::SUCCESS}, {"https://foo.bar.google.com", "bar.google.com", AuthenticatorStatus::SUCCESS}, {"https://foo.bar.google.com", "google.com", AuthenticatorStatus::SUCCESS}, {"https://earth.login.awesomecompany", "login.awesomecompany", AuthenticatorStatus::SUCCESS}, {"https://google.com:1337", "google.com", AuthenticatorStatus::SUCCESS}, // Hosts with trailing dot valid for rpIds with or without trailing dot. // Hosts without trailing dots only matches rpIDs without trailing dot. // Two trailing dots only matches rpIDs with two trailing dots. {"https://google.com.", "google.com", AuthenticatorStatus::SUCCESS}, {"https://google.com.", "google.com.", AuthenticatorStatus::SUCCESS}, {"https://google.com..", "google.com..", AuthenticatorStatus::SUCCESS}, // Leading dots are ignored in canonicalized hosts. {"https://.google.com", "google.com", AuthenticatorStatus::SUCCESS}, {"https://..google.com", "google.com", AuthenticatorStatus::SUCCESS}, {"https://.google.com", ".google.com", AuthenticatorStatus::SUCCESS}, {"https://..google.com", ".google.com", AuthenticatorStatus::SUCCESS}, {"https://accounts.google.com", ".google.com", AuthenticatorStatus::SUCCESS}, }; constexpr OriginClaimedAuthorityPair kInvalidRelyingPartyTestCases[] = { {"https://google.com", "com", AuthenticatorStatus::BAD_RELYING_PARTY_ID}, {"http://google.com", "google.com", AuthenticatorStatus::INVALID_DOMAIN}, {"http://myawesomedomain", "myawesomedomain", AuthenticatorStatus::INVALID_DOMAIN}, {"https://google.com", "foo.bar.google.com", AuthenticatorStatus::BAD_RELYING_PARTY_ID}, {"http://myawesomedomain", "randomdomain", AuthenticatorStatus::INVALID_DOMAIN}, {"https://myawesomedomain", "randomdomain", AuthenticatorStatus::BAD_RELYING_PARTY_ID}, {"https://notgoogle.com", "google.com)", AuthenticatorStatus::BAD_RELYING_PARTY_ID}, {"https://not-google.com", "google.com)", AuthenticatorStatus::BAD_RELYING_PARTY_ID}, {"https://evil.appspot.com", "appspot.com", AuthenticatorStatus::BAD_RELYING_PARTY_ID}, {"https://evil.co.uk", "co.uk", AuthenticatorStatus::BAD_RELYING_PARTY_ID}, {"https://google.com", "google.com.", AuthenticatorStatus::BAD_RELYING_PARTY_ID}, {"https://google.com", "google.com..", AuthenticatorStatus::BAD_RELYING_PARTY_ID}, {"https://google.com", ".google.com", AuthenticatorStatus::BAD_RELYING_PARTY_ID}, {"https://google.com..", "google.com", AuthenticatorStatus::BAD_RELYING_PARTY_ID}, {"https://.com", "com.", AuthenticatorStatus::BAD_RELYING_PARTY_ID}, {"https://.co.uk", "co.uk.", AuthenticatorStatus::BAD_RELYING_PARTY_ID}, {"https://1.2.3", "1.2.3", AuthenticatorStatus::INVALID_DOMAIN}, {"https://1.2.3", "2.3", AuthenticatorStatus::INVALID_DOMAIN}, {"https://127.0.0.1", "127.0.0.1", AuthenticatorStatus::INVALID_DOMAIN}, {"https://127.0.0.1", "27.0.0.1", AuthenticatorStatus::INVALID_DOMAIN}, {"https://127.0.0.1", ".0.0.1", AuthenticatorStatus::INVALID_DOMAIN}, {"https://127.0.0.1", "0.0.1", AuthenticatorStatus::INVALID_DOMAIN}, {"https://[::127.0.0.1]", "127.0.0.1", AuthenticatorStatus::INVALID_DOMAIN}, {"https://[::127.0.0.1]", "[127.0.0.1]", AuthenticatorStatus::INVALID_DOMAIN}, {"https://[::1]", "1", AuthenticatorStatus::INVALID_DOMAIN}, {"https://[::1]", "1]", AuthenticatorStatus::INVALID_DOMAIN}, {"https://[::1]", "::1", AuthenticatorStatus::INVALID_DOMAIN}, {"https://[::1]", "[::1]", AuthenticatorStatus::INVALID_DOMAIN}, {"https://[1::1]", "::1", AuthenticatorStatus::INVALID_DOMAIN}, {"https://[1::1]", "::1]", AuthenticatorStatus::INVALID_DOMAIN}, {"https://[1::1]", "[::1]", AuthenticatorStatus::INVALID_DOMAIN}, {"http://google.com:443", "google.com", AuthenticatorStatus::INVALID_DOMAIN}, {"data:google.com", "google.com", AuthenticatorStatus::OPAQUE_DOMAIN}, {"data:text/html,google.com", "google.com", AuthenticatorStatus::OPAQUE_DOMAIN}, {"ws://google.com", "google.com", AuthenticatorStatus::INVALID_DOMAIN}, {"gopher://google.com", "google.com", AuthenticatorStatus::OPAQUE_DOMAIN}, {"ftp://google.com", "google.com", AuthenticatorStatus::INVALID_DOMAIN}, {"file:///google.com", "google.com", AuthenticatorStatus::INVALID_PROTOCOL}, // Use of webauthn from a WSS origin may be technically valid, but we // prohibit use on non-HTTPS origins. (At least for now.) {"wss://google.com", "google.com", AuthenticatorStatus::INVALID_PROTOCOL}, {"data:,", "", AuthenticatorStatus::OPAQUE_DOMAIN}, {"https://google.com", "", AuthenticatorStatus::BAD_RELYING_PARTY_ID}, {"ws:///google.com", "", AuthenticatorStatus::INVALID_DOMAIN}, {"wss:///google.com", "", AuthenticatorStatus::INVALID_PROTOCOL}, {"gopher://google.com", "", AuthenticatorStatus::OPAQUE_DOMAIN}, {"ftp://google.com", "", AuthenticatorStatus::INVALID_DOMAIN}, {"file:///google.com", "", AuthenticatorStatus::INVALID_PROTOCOL}, // This case is acceptable according to spec, but both renderer // and browser handling currently do not permit it. {"https://login.awesomecompany", "awesomecompany", AuthenticatorStatus::BAD_RELYING_PARTY_ID}, // These are AppID test cases, but should also be invalid relying party // examples too. {"https://example.com", "https://com/", AuthenticatorStatus::BAD_RELYING_PARTY_ID}, {"https://example.com", "https://com/foo", AuthenticatorStatus::BAD_RELYING_PARTY_ID}, {"https://example.com", "https://foo.com/", AuthenticatorStatus::BAD_RELYING_PARTY_ID}, {"https://example.com", "http://example.com", AuthenticatorStatus::BAD_RELYING_PARTY_ID}, {"http://example.com", "https://example.com", AuthenticatorStatus::INVALID_DOMAIN}, {"https://127.0.0.1", "https://127.0.0.1", AuthenticatorStatus::INVALID_DOMAIN}, {"https://www.notgoogle.com", "https://www.gstatic.com/securitykey/origins.json", AuthenticatorStatus::BAD_RELYING_PARTY_ID}, {"https://www.google.com", "https://www.gstatic.com/securitykey/origins.json#x", AuthenticatorStatus::BAD_RELYING_PARTY_ID}, {"https://www.google.com", "https://www.gstatic.com/securitykey/origins.json2", AuthenticatorStatus::BAD_RELYING_PARTY_ID}, {"https://www.google.com", "https://gstatic.com/securitykey/origins.json", AuthenticatorStatus::BAD_RELYING_PARTY_ID}, {"https://ggoogle.com", "https://www.gstatic.com/securitykey/origi", AuthenticatorStatus::BAD_RELYING_PARTY_ID}, {"https://com", "https://www.gstatic.com/securitykey/origins.json", AuthenticatorStatus::BAD_RELYING_PARTY_ID}, }; using TestIsUvpaaCallback = device::test::ValueCallbackReceiver<bool>; using TestMakeCredentialCallback = device::test::StatusAndValueCallbackReceiver< AuthenticatorStatus, MakeCredentialAuthenticatorResponsePtr>; using TestGetAssertionCallback = device::test::StatusAndValueCallbackReceiver< AuthenticatorStatus, GetAssertionAuthenticatorResponsePtr>; using TestRequestStartedCallback = device::test::TestCallbackReceiver<>; std::vector<uint8_t> GetTestChallengeBytes() { return std::vector<uint8_t>(std::begin(kTestChallengeBytes), std::end(kTestChallengeBytes)); } device::PublicKeyCredentialRpEntity GetTestPublicKeyCredentialRPEntity() { device::PublicKeyCredentialRpEntity entity; entity.id = std::string(kTestRelyingPartyId); entity.name = "TestRP@example.com"; return entity; } device::PublicKeyCredentialUserEntity GetTestPublicKeyCredentialUserEntity() { device::PublicKeyCredentialUserEntity entity; entity.display_name = "User A. Name"; std::vector<uint8_t> id(32, 0x0A); entity.id = id; entity.name = "username@example.com"; entity.icon_url = GURL("https://gstatic.com/fakeurl2.png"); return entity; } std::vector<device::PublicKeyCredentialParams::CredentialInfo> GetTestPublicKeyCredentialParameters(int32_t algorithm_identifier) { std::vector<device::PublicKeyCredentialParams::CredentialInfo> parameters; device::PublicKeyCredentialParams::CredentialInfo fake_parameter; fake_parameter.type = device::CredentialType::kPublicKey; fake_parameter.algorithm = algorithm_identifier; parameters.push_back(std::move(fake_parameter)); return parameters; } device::AuthenticatorSelectionCriteria GetTestAuthenticatorSelectionCriteria() { return device::AuthenticatorSelectionCriteria( device::AuthenticatorAttachment::kAny, false, device::UserVerificationRequirement::kPreferred); } std::vector<device::PublicKeyCredentialDescriptor> GetTestCredentials( size_t num_credentials = 1) { std::vector<device::PublicKeyCredentialDescriptor> descriptors; for (size_t i = 0; i < num_credentials; i++) { DCHECK(i <= std::numeric_limits<uint8_t>::max()); std::vector<uint8_t> id(kTestCredentialIdLength, static_cast<uint8_t>(i)); base::flat_set<device::FidoTransportProtocol> transports{ device::FidoTransportProtocol::kUsbHumanInterfaceDevice, device::FidoTransportProtocol::kBluetoothLowEnergy}; descriptors.emplace_back(device::CredentialType::kPublicKey, std::move(id), std::move(transports)); } return descriptors; } PublicKeyCredentialCreationOptionsPtr GetTestPublicKeyCredentialCreationOptions() { auto options = PublicKeyCredentialCreationOptions::New(); options->relying_party = GetTestPublicKeyCredentialRPEntity(); options->user = GetTestPublicKeyCredentialUserEntity(); options->public_key_parameters = GetTestPublicKeyCredentialParameters(kCoseEs256); options->challenge.assign(32, 0x0A); options->timeout = base::TimeDelta::FromMinutes(1); options->authenticator_selection = GetTestAuthenticatorSelectionCriteria(); return options; } PublicKeyCredentialRequestOptionsPtr GetTestPublicKeyCredentialRequestOptions() { auto options = PublicKeyCredentialRequestOptions::New(); options->relying_party_id = std::string(kTestRelyingPartyId); options->challenge.assign(32, 0x0A); options->timeout = base::TimeDelta::FromMinutes(1); options->user_verification = device::UserVerificationRequirement::kPreferred; options->allow_credentials = GetTestCredentials(); return options; } std::vector<device::CableDiscoveryData> GetTestCableExtension() { device::CableDiscoveryData cable; cable.version = device::CableDiscoveryData::Version::V1; cable.v1.emplace(); cable.v1->client_eid.fill(0x01); cable.v1->authenticator_eid.fill(0x02); cable.v1->session_pre_key.fill(0x03); std::vector<device::CableDiscoveryData> ret; ret.emplace_back(std::move(cable)); return ret; } } // namespace class AuthenticatorTestBase : public content::RenderViewHostTestHarness { protected: AuthenticatorTestBase() = default; ~AuthenticatorTestBase() override {} void SetUp() override { content::RenderViewHostTestHarness::SetUp(); ResetVirtualDevice(); } void ResetVirtualDevice() { auto virtual_device_factory = std::make_unique<device::test::VirtualFidoDeviceFactory>(); virtual_device_factory_ = virtual_device_factory.get(); AuthenticatorEnvironmentImpl::GetInstance() ->ReplaceDefaultDiscoveryFactoryForTesting( std::move(virtual_device_factory)); } device::test::VirtualFidoDeviceFactory* virtual_device_factory_; }; class AuthenticatorImplTest : public AuthenticatorTestBase { protected: AuthenticatorImplTest() { url::AddStandardScheme("chrome-extension", url::SCHEME_WITH_HOST); } ~AuthenticatorImplTest() override = default; void SetUp() override { AuthenticatorTestBase::SetUp(); bluetooth_global_values_->SetLESupported(true); device::BluetoothAdapterFactory::SetAdapterForTesting(mock_adapter_); } void TearDown() override { // The |RenderFrameHost| must outlive |AuthenticatorImpl|. authenticator_impl_.reset(); AuthenticatorTestBase::TearDown(); } void NavigateAndCommit(const GURL& url) { // The |RenderFrameHost| must outlive |AuthenticatorImpl|. authenticator_impl_.reset(); content::RenderViewHostTestHarness::NavigateAndCommit(url); } // Simulates navigating to a page and getting the page contents and language // for that navigation. void SimulateNavigation(const GURL& url) { if (main_rfh()->GetLastCommittedURL() != url) NavigateAndCommit(url); } mojo::Remote<blink::mojom::Authenticator> ConnectToAuthenticator() { authenticator_impl_ = std::make_unique<AuthenticatorImpl>(main_rfh()); mojo::Remote<blink::mojom::Authenticator> authenticator; authenticator_impl_->Bind(authenticator.BindNewPipeAndPassReceiver()); return authenticator; } mojo::Remote<blink::mojom::Authenticator> ConnectToAuthenticator( std::unique_ptr<base::OneShotTimer> timer) { authenticator_impl_.reset(new AuthenticatorImpl( main_rfh(), std::make_unique<AuthenticatorCommon>(main_rfh(), std::move(timer)))); mojo::Remote<blink::mojom::Authenticator> authenticator; authenticator_impl_->Bind(authenticator.BindNewPipeAndPassReceiver()); return authenticator; } mojo::Remote<blink::mojom::Authenticator> ConstructAuthenticatorWithTimer( scoped_refptr<base::TestMockTimeTaskRunner> task_runner) { fake_hid_manager_ = std::make_unique<device::FakeFidoHidManager>(); // Set up a timer for testing. auto timer = std::make_unique<base::OneShotTimer>(task_runner->GetMockTickClock()); timer->SetTaskRunner(task_runner); return ConnectToAuthenticator(std::move(timer)); } url::Origin GetTestOrigin() { const GURL test_relying_party_url(kTestOrigin1); CHECK(test_relying_party_url.is_valid()); return url::Origin::Create(test_relying_party_url); } std::string GetTestClientDataJSON(std::string type) { return device::SerializeCollectedClientDataToJson( std::move(type), GetTestOrigin().Serialize(), GetTestChallengeBytes(), /*is_cross_origin*/ false); } std::string SerializeClientDataJSON(const std::string& type, const std::string& origin, base::span<const uint8_t> challenge, bool is_cross_origin) { return device::SerializeCollectedClientDataToJson(type, origin, challenge, is_cross_origin); } AuthenticatorStatus TryAuthenticationWithAppId(const std::string& origin, const std::string& appid) { const GURL origin_url(origin); NavigateAndCommit(origin_url); mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); PublicKeyCredentialRequestOptionsPtr options = GetTestPublicKeyCredentialRequestOptions(); options->relying_party_id = origin_url.host(); options->appid = appid; TestGetAssertionCallback callback_receiver; authenticator->GetAssertion(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); return callback_receiver.status(); } AuthenticatorStatus TryRegistrationWithAppIdExclude( const std::string& origin, const std::string& appid_exclude) { const GURL origin_url(origin); NavigateAndCommit(origin_url); mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); options->relying_party.id = origin_url.host(); options->appid_exclude = appid_exclude; TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); return callback_receiver.status(); } void EnableFeature(const base::Feature& feature) { scoped_feature_list_.emplace(); scoped_feature_list_->InitAndEnableFeature(feature); } void DisableFeature(const base::Feature& feature) { scoped_feature_list_.emplace(); scoped_feature_list_->InitAndDisableFeature(feature); } protected: std::unique_ptr<AuthenticatorImpl> authenticator_impl_; std::unique_ptr<device::FakeFidoHidManager> fake_hid_manager_; base::Optional<base::test::ScopedFeatureList> scoped_feature_list_; std::unique_ptr<device::BluetoothAdapterFactory::GlobalValuesForTesting> bluetooth_global_values_ = device::BluetoothAdapterFactory::Get()->InitGlobalValuesForTesting(); scoped_refptr<::testing::NiceMock<device::MockBluetoothAdapter>> mock_adapter_ = base::MakeRefCounted< ::testing::NiceMock<device::MockBluetoothAdapter>>(); private: url::ScopedSchemeRegistryForTests scoped_registry_; }; TEST_F(AuthenticatorImplTest, ClientDataJSONSerialization) { // First test that the output is in the expected form. Some verifiers may be // depending on the exact JSON serialisation. Since the serialisation may add // extra elements, this can only test that the expected value is a prefix of // the returned value. std::vector<uint8_t> challenge_bytes = {1, 2, 3}; EXPECT_TRUE( SerializeClientDataJSON("t\x05ype", "ori\"gin", challenge_bytes, false) .find("{\"type\":\"t\\u0005ype\",\"challenge\":\"AQID\",\"origin\":" "\"ori\\\"gin\",\"crossOrigin\":false") == 0); // Second, check that a generic JSON parser correctly parses the result. static const struct { const char* type; const char* origin; std::vector<uint8_t> challenge; bool is_cross_origin; } kTestCases[] = { { "type", "origin", {1, 2, 3}, false, }, { "t\x01y\x02pe", "ori\"gin", {1, 2, 3, 4}, true, }, { "\\\\\"\\", "\x01\x02\x03\x04{}\x05c", {1, 2, 3, 4, 5}, true, }, }; size_t num = 0; for (const auto& test : kTestCases) { SCOPED_TRACE(num++); const std::string json = SerializeClientDataJSON( test.type, test.origin, test.challenge, test.is_cross_origin); const auto parsed = base::JSONReader::Read(json); ASSERT_TRUE(parsed.has_value()); EXPECT_EQ(*parsed->FindStringKey("type"), test.type); EXPECT_EQ(*parsed->FindStringKey("origin"), test.origin); std::string expected_challenge; base::Base64UrlEncode( base::StringPiece(reinterpret_cast<const char*>(test.challenge.data()), test.challenge.size()), base::Base64UrlEncodePolicy::OMIT_PADDING, &expected_challenge); EXPECT_EQ(*parsed->FindStringKey("challenge"), expected_challenge); EXPECT_EQ(*parsed->FindBoolKey("crossOrigin"), test.is_cross_origin); } } // Verify behavior for various combinations of origins and RP IDs. TEST_F(AuthenticatorImplTest, MakeCredentialOriginAndRpIds) { // These instances should return security errors (for circumstances // that would normally crash the renderer). for (auto test_case : kInvalidRelyingPartyTestCases) { SCOPED_TRACE(std::string(test_case.claimed_authority) + " " + std::string(test_case.origin)); NavigateAndCommit(GURL(test_case.origin)); mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); options->relying_party.id = test_case.claimed_authority; TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(test_case.expected_status, callback_receiver.status()); } // These instances time out with NOT_ALLOWED_ERROR due to unsupported // algorithm. for (auto test_case : kValidRelyingPartyTestCases) { SCOPED_TRACE(std::string(test_case.claimed_authority) + " " + std::string(test_case.origin)); NavigateAndCommit(GURL(test_case.origin)); auto task_runner = base::MakeRefCounted<base::TestMockTimeTaskRunner>( base::Time::Now(), base::TimeTicks::Now()); auto authenticator = ConstructAuthenticatorWithTimer(task_runner); PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); options->relying_party.id = test_case.claimed_authority; options->public_key_parameters = GetTestPublicKeyCredentialParameters(123); TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); // Trigger timer. base::RunLoop().RunUntilIdle(); task_runner->FastForwardBy(base::TimeDelta::FromMinutes(1)); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); } } // Test that MakeCredential request returns INVALID_ICON_URL if the RP or user // icon URLs are not a priori-authenticated URLs. TEST_F(AuthenticatorImplTest, MakeCredentialInvalidIconUrl) { SimulateNavigation(GURL(kTestOrigin1)); const GURL kInvalidIconUrlTestCases[] = { GURL("http://insecure-origin.com/kitten.png"), GURL("invalid:/url"), }; // Test relying party icons. for (auto test_case : kInvalidIconUrlTestCases) { SCOPED_TRACE(test_case.possibly_invalid_spec()); mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); options->relying_party.icon_url = test_case; TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::INVALID_ICON_URL, callback_receiver.status()); } // Test user icons. for (auto test_case : kInvalidIconUrlTestCases) { SCOPED_TRACE(test_case.possibly_invalid_spec()); mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); options->user.icon_url = test_case; TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::INVALID_ICON_URL, callback_receiver.status()); } } // Test that MakeCredential request does not return INVALID_ICON_URL for a // priori-authenticated URLs. TEST_F(AuthenticatorImplTest, MakeCredentialValidIconUrl) { const GURL kValidUrlTestCases[] = { GURL(), GURL("https://secure-origin.com/kitten.png"), GURL("about:blank"), GURL("about:srcdoc"), GURL("data:image/" "png;base64," "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAIAAACQkWg2AAAACXBIWXMAAC4jAAAuIwF" "4pT92AAAAB3RJTUUH4wYUETEs5V5U8gAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdG" "ggR0lNUFeBDhcAAABGSURBVCjPY/z//" "z8DKYAJmcPYyICHi0UDyTYMDg2MFIUSnsAZAp5mbGT4X49DBcxLEAUsBMxrRCiFABb8" "gYNpLTXiAT8AAEeHFZvhj9g8AAAAAElFTkSuQmCC"), }; SimulateNavigation(GURL(kTestOrigin1)); // Test relying party icons. for (auto test_case : kValidUrlTestCases) { SCOPED_TRACE(test_case.possibly_invalid_spec()); auto task_runner = base::MakeRefCounted<base::TestMockTimeTaskRunner>( base::Time::Now(), base::TimeTicks::Now()); auto authenticator = ConstructAuthenticatorWithTimer(task_runner); PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); options->public_key_parameters = GetTestPublicKeyCredentialParameters(123); options->relying_party.icon_url = test_case; TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); // Trigger timer. base::RunLoop().RunUntilIdle(); task_runner->FastForwardBy(base::TimeDelta::FromMinutes(1)); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); } // Test user icons. for (auto test_case : kValidUrlTestCases) { SCOPED_TRACE(test_case.possibly_invalid_spec()); auto task_runner = base::MakeRefCounted<base::TestMockTimeTaskRunner>( base::Time::Now(), base::TimeTicks::Now()); auto authenticator = ConstructAuthenticatorWithTimer(task_runner); PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); options->public_key_parameters = GetTestPublicKeyCredentialParameters(123); options->user.icon_url = test_case; TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); // Trigger timer. base::RunLoop().RunUntilIdle(); task_runner->FastForwardBy(base::TimeDelta::FromMinutes(1)); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); } } // Test that MakeCredential request times out with NOT_ALLOWED_ERROR if no // parameters contain a supported algorithm. TEST_F(AuthenticatorImplTest, MakeCredentialNoSupportedAlgorithm) { SimulateNavigation(GURL(kTestOrigin1)); auto task_runner = base::MakeRefCounted<base::TestMockTimeTaskRunner>( base::Time::Now(), base::TimeTicks::Now()); auto authenticator = ConstructAuthenticatorWithTimer(task_runner); PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); options->public_key_parameters = GetTestPublicKeyCredentialParameters(123); TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); // Trigger timer. base::RunLoop().RunUntilIdle(); task_runner->FastForwardBy(base::TimeDelta::FromMinutes(1)); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); } // Test that MakeCredential request times out with NOT_ALLOWED_ERROR if user // verification is required for U2F devices. TEST_F(AuthenticatorImplTest, MakeCredentialUserVerification) { SimulateNavigation(GURL(kTestOrigin1)); auto task_runner = base::MakeRefCounted<base::TestMockTimeTaskRunner>( base::Time::Now(), base::TimeTicks::Now()); auto authenticator = ConstructAuthenticatorWithTimer(task_runner); PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); options->authenticator_selection->SetUserVerificationRequirementForTesting( device::UserVerificationRequirement::kRequired); TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); // Trigger timer. base::RunLoop().RunUntilIdle(); task_runner->FastForwardBy(base::TimeDelta::FromMinutes(1)); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); } // Test that MakeCredential request returns if resident // key is requested on create(). TEST_F(AuthenticatorImplTest, MakeCredentialResidentKey) { SimulateNavigation(GURL(kTestOrigin1)); auto task_runner = base::MakeRefCounted<base::TestMockTimeTaskRunner>( base::Time::Now(), base::TimeTicks::Now()); auto authenticator = ConstructAuthenticatorWithTimer(task_runner); PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); options->authenticator_selection->SetRequireResidentKeyForTesting(true); TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); // Trigger timer. base::RunLoop().RunUntilIdle(); task_runner->FastForwardBy(base::TimeDelta::FromMinutes(1)); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::RESIDENT_CREDENTIALS_UNSUPPORTED, callback_receiver.status()); // TODO add CTAP device } // Test that MakeCredential request times out with NOT_ALLOWED_ERROR if a // platform authenticator is requested for U2F devices. TEST_F(AuthenticatorImplTest, MakeCredentialPlatformAuthenticator) { SimulateNavigation(GURL(kTestOrigin1)); auto task_runner = base::MakeRefCounted<base::TestMockTimeTaskRunner>( base::Time::Now(), base::TimeTicks::Now()); auto authenticator = ConstructAuthenticatorWithTimer(task_runner); PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); options->authenticator_selection->SetAuthenticatorAttachmentForTesting( device::AuthenticatorAttachment::kPlatform); TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); // Trigger timer. base::RunLoop().RunUntilIdle(); task_runner->FastForwardBy(base::TimeDelta::FromMinutes(1)); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); } // Parses its arguments as JSON and expects that all the keys in the first are // also in the second, and with the same value. void CheckJSONIsSubsetOfJSON(base::StringPiece subset_str, base::StringPiece test_str) { std::unique_ptr<base::Value> subset( base::JSONReader::ReadDeprecated(subset_str)); ASSERT_TRUE(subset); ASSERT_TRUE(subset->is_dict()); std::unique_ptr<base::Value> test(base::JSONReader::ReadDeprecated(test_str)); ASSERT_TRUE(test); ASSERT_TRUE(test->is_dict()); for (const auto& item : subset->DictItems()) { base::Value* test_value = test->FindKey(item.first); if (test_value == nullptr) { ADD_FAILURE() << item.first << " does not exist in the test dictionary"; continue; } if (!item.second.Equals(test_value)) { std::string want, got; ASSERT_TRUE(base::JSONWriter::Write(item.second, &want)); ASSERT_TRUE(base::JSONWriter::Write(*test_value, &got)); ADD_FAILURE() << "Value of " << item.first << " is unequal: want " << want << " got " << got; } } } // Test that client data serializes to JSON properly. TEST_F(AuthenticatorImplTest, TestSerializedRegisterClientData) { CheckJSONIsSubsetOfJSON(kTestRegisterClientDataJsonString, GetTestClientDataJSON(client_data::kCreateType)); } TEST_F(AuthenticatorImplTest, TestSerializedSignClientData) { CheckJSONIsSubsetOfJSON(kTestSignClientDataJsonString, GetTestClientDataJSON(client_data::kGetType)); } TEST_F(AuthenticatorImplTest, TestMakeCredentialTimeout) { // The VirtualFidoAuthenticator simulates a tap immediately after it gets the // request. Replace by the real discovery that will wait until timeout. AuthenticatorEnvironmentImpl::GetInstance() ->ReplaceDefaultDiscoveryFactoryForTesting( std::make_unique<device::FidoDiscoveryFactory>()); SimulateNavigation(GURL(kTestOrigin1)); PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); TestMakeCredentialCallback callback_receiver; auto task_runner = base::MakeRefCounted<base::TestMockTimeTaskRunner>( base::Time::Now(), base::TimeTicks::Now()); auto authenticator = ConstructAuthenticatorWithTimer(task_runner); authenticator->MakeCredential(std::move(options), callback_receiver.callback()); // Trigger timer. base::RunLoop().RunUntilIdle(); task_runner->FastForwardBy(base::TimeDelta::FromMinutes(1)); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); } // Verify behavior for various combinations of origins and RP IDs. TEST_F(AuthenticatorImplTest, GetAssertionOriginAndRpIds) { // These instances should return security errors (for circumstances // that would normally crash the renderer). for (const OriginClaimedAuthorityPair& test_case : kInvalidRelyingPartyTestCases) { SCOPED_TRACE(std::string(test_case.claimed_authority) + " " + std::string(test_case.origin)); NavigateAndCommit(GURL(test_case.origin)); mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); PublicKeyCredentialRequestOptionsPtr options = GetTestPublicKeyCredentialRequestOptions(); options->relying_party_id = test_case.claimed_authority; TestGetAssertionCallback callback_receiver; authenticator->GetAssertion(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(test_case.expected_status, callback_receiver.status()); } } constexpr OriginClaimedAuthorityPair kValidAppIdCases[] = { {"https://example.com", "https://example.com", AuthenticatorStatus::SUCCESS}, {"https://www.example.com", "https://example.com", AuthenticatorStatus::SUCCESS}, {"https://example.com", "https://www.example.com", AuthenticatorStatus::SUCCESS}, {"https://example.com", "https://foo.bar.example.com", AuthenticatorStatus::SUCCESS}, {"https://example.com", "https://foo.bar.example.com/foo/bar", AuthenticatorStatus::SUCCESS}, {"https://google.com", "https://www.gstatic.com/securitykey/origins.json", AuthenticatorStatus::SUCCESS}, {"https://www.google.com", "https://www.gstatic.com/securitykey/origins.json", AuthenticatorStatus::SUCCESS}, {"https://www.google.com", "https://www.gstatic.com/securitykey/a/google.com/origins.json", AuthenticatorStatus::SUCCESS}, {"https://accounts.google.com", "https://www.gstatic.com/securitykey/origins.json", AuthenticatorStatus::SUCCESS}, }; // Verify behavior for various combinations of origins and RP IDs. TEST_F(AuthenticatorImplTest, AppIdExtensionValues) { for (const auto& test_case : kValidAppIdCases) { SCOPED_TRACE(std::string(test_case.origin) + " " + std::string(test_case.claimed_authority)); EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, TryAuthenticationWithAppId(test_case.origin, test_case.claimed_authority)); EXPECT_EQ(AuthenticatorStatus::SUCCESS, TryRegistrationWithAppIdExclude(test_case.origin, test_case.claimed_authority)); } // All the invalid relying party test cases should also be invalid as AppIDs. for (const auto& test_case : kInvalidRelyingPartyTestCases) { SCOPED_TRACE(std::string(test_case.origin) + " " + std::string(test_case.claimed_authority)); if (strlen(test_case.claimed_authority) == 0) { // In this case, no AppID is actually being tested. continue; } AuthenticatorStatus test_status = TryAuthenticationWithAppId( test_case.origin, test_case.claimed_authority); EXPECT_TRUE(test_status == AuthenticatorStatus::INVALID_DOMAIN || test_status == test_case.expected_status); test_status = TryRegistrationWithAppIdExclude(test_case.origin, test_case.claimed_authority); EXPECT_TRUE(test_status == AuthenticatorStatus::INVALID_DOMAIN || test_status == test_case.expected_status); } } // Verify that a request coming from Cryptotoken bypasses origin checks. TEST_F(AuthenticatorImplTest, CryptotokenBypass) { SimulateNavigation(GURL(kTestOrigin1)); auto task_runner = base::MakeRefCounted<base::TestMockTimeTaskRunner>( base::Time::Now(), base::TimeTicks::Now()); auto authenticator = ConstructAuthenticatorWithTimer(task_runner); { OverrideLastCommittedOrigin(main_rfh(), url::Origin::Create(GURL(kCryptotokenOrigin))); // First, verify that the Cryptotoken request succeeds with the appid. PublicKeyCredentialRequestOptionsPtr options = GetTestPublicKeyCredentialRequestOptions(); options->relying_party_id = std::string(kTestOrigin1); // Inject a registration for the URL (which is a U2F AppID). ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectRegistration( options->allow_credentials[0].id(), kTestOrigin1)); options->appid = kTestOrigin1; TestGetAssertionCallback callback_receiver; authenticator->GetAssertion(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); ASSERT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); EXPECT_EQ(true, callback_receiver.value()->echo_appid_extension); EXPECT_EQ(true, callback_receiver.value()->appid_extension); } { ResetVirtualDevice(); OverrideLastCommittedOrigin( main_rfh(), url::Origin::Create(GURL(kTestExtensionOrigin))); // Next, verify that other extensions cannot bypass the origin checks. PublicKeyCredentialRequestOptionsPtr options = GetTestPublicKeyCredentialRequestOptions(); options->relying_party_id = std::string(kTestOrigin1); // Inject a registration for the URL (which is a U2F AppID). ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectRegistration( options->allow_credentials[0].id(), kTestOrigin1)); options->appid = kTestOrigin1; TestGetAssertionCallback callback_receiver; authenticator->GetAssertion(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); ASSERT_EQ(AuthenticatorStatus::INVALID_DOMAIN, callback_receiver.status()); } } // Requests originating from cryptotoken should only target U2F devices. TEST_F(AuthenticatorImplTest, CryptoTokenU2fOnly) { SimulateNavigation(GURL(kTestOrigin1)); auto task_runner = base::MakeRefCounted<base::TestMockTimeTaskRunner>( base::Time::Now(), base::TimeTicks::Now()); auto authenticator = ConstructAuthenticatorWithTimer(task_runner); // TODO(martinkr): VirtualFidoDeviceFactory does not offer devices that // support both U2F and CTAP yet; we should test those. for (const bool u2f_authenticator : {true, false}) { SCOPED_TRACE(u2f_authenticator ? "U2F" : "CTAP"); OverrideLastCommittedOrigin(main_rfh(), url::Origin::Create(GURL(kCryptotokenOrigin))); virtual_device_factory_->SetSupportedProtocol( u2f_authenticator ? device::ProtocolVersion::kU2f : device::ProtocolVersion::kCtap2); PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); base::RunLoop().RunUntilIdle(); task_runner->FastForwardBy(base::TimeDelta::FromMinutes(1)); callback_receiver.WaitForCallback(); EXPECT_EQ((u2f_authenticator ? AuthenticatorStatus::SUCCESS : AuthenticatorStatus::NOT_ALLOWED_ERROR), callback_receiver.status()); } } // Test that Cryptotoken requests should only be dispatched to USB // authenticators. TEST_F(AuthenticatorImplTest, CryptotokenUsbOnly) { SimulateNavigation(GURL(kTestOrigin1)); auto task_runner = base::MakeRefCounted<base::TestMockTimeTaskRunner>( base::Time::Now(), base::TimeTicks::Now()); auto authenticator = ConstructAuthenticatorWithTimer(task_runner); for (const bool is_cryptotoken_request : {false, true}) { // caBLE and platform discoveries cannot be instantiated through // VirtualFidoDeviceFactory, so we don't test them here. for (const device::FidoTransportProtocol transport : {device::FidoTransportProtocol::kUsbHumanInterfaceDevice, device::FidoTransportProtocol::kBluetoothLowEnergy, device::FidoTransportProtocol::kNearFieldCommunication}) { SCOPED_TRACE(::testing::Message() << "is_cryptotoken_request=" << is_cryptotoken_request << ", transport=" << device::ToString(transport)); OverrideLastCommittedOrigin( main_rfh(), url::Origin::Create(GURL(is_cryptotoken_request ? kCryptotokenOrigin : kTestOrigin1))); ResetVirtualDevice(); virtual_device_factory_->SetSupportedProtocol( device::ProtocolVersion::kU2f); virtual_device_factory_->SetTransport(transport); virtual_device_factory_->mutable_state()->transport = transport; PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); base::RunLoop().RunUntilIdle(); task_runner->FastForwardBy(base::TimeDelta::FromMinutes(1)); callback_receiver.WaitForCallback(); EXPECT_EQ( !is_cryptotoken_request || transport == device::FidoTransportProtocol::kUsbHumanInterfaceDevice ? AuthenticatorStatus::SUCCESS : AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); } } } // Requests originating from cryptotoken should only target U2F devices. TEST_F(AuthenticatorImplTest, AttestationPermitted) { SimulateNavigation(GURL(kTestOrigin1)); auto task_runner = base::MakeRefCounted<base::TestMockTimeTaskRunner>( base::Time::Now(), base::TimeTicks::Now()); auto authenticator = ConstructAuthenticatorWithTimer(task_runner); // TODO(martinkr): VirtualFidoDeviceFactory does not offer devices that // support both U2F and CTAP yet; we should test those. for (const bool u2f_authenticator : {true, false}) { SCOPED_TRACE(u2f_authenticator ? "U2F" : "CTAP"); OverrideLastCommittedOrigin(main_rfh(), url::Origin::Create(GURL(kCryptotokenOrigin))); virtual_device_factory_->SetSupportedProtocol( u2f_authenticator ? device::ProtocolVersion::kU2f : device::ProtocolVersion::kCtap2); PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); base::RunLoop().RunUntilIdle(); task_runner->FastForwardBy(base::TimeDelta::FromMinutes(1)); callback_receiver.WaitForCallback(); EXPECT_EQ((u2f_authenticator ? AuthenticatorStatus::SUCCESS : AuthenticatorStatus::NOT_ALLOWED_ERROR), callback_receiver.status()); } } // Verify that a credential registered with U2F can be used via webauthn. TEST_F(AuthenticatorImplTest, AppIdExtension) { SimulateNavigation(GURL(kTestOrigin1)); auto task_runner = base::MakeRefCounted<base::TestMockTimeTaskRunner>( base::Time::Now(), base::TimeTicks::Now()); auto authenticator = ConstructAuthenticatorWithTimer(task_runner); { // First, test that the appid extension isn't echoed at all when not // requested. PublicKeyCredentialRequestOptionsPtr options = GetTestPublicKeyCredentialRequestOptions(); ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectRegistration( options->allow_credentials[0].id(), kTestRelyingPartyId)); TestGetAssertionCallback callback_receiver; authenticator->GetAssertion(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); ASSERT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); EXPECT_EQ(false, callback_receiver.value()->echo_appid_extension); } { // Second, test that the appid extension is echoed, but is false, when appid // is requested but not used. ResetVirtualDevice(); PublicKeyCredentialRequestOptionsPtr options = GetTestPublicKeyCredentialRequestOptions(); ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectRegistration( options->allow_credentials[0].id(), kTestRelyingPartyId)); // This AppID won't be used because the RP ID will be tried (successfully) // first. options->appid = kTestOrigin1; TestGetAssertionCallback callback_receiver; authenticator->GetAssertion(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); ASSERT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); EXPECT_EQ(true, callback_receiver.value()->echo_appid_extension); EXPECT_EQ(false, callback_receiver.value()->appid_extension); } { // Lastly, when used, the appid extension result should be "true". ResetVirtualDevice(); PublicKeyCredentialRequestOptionsPtr options = GetTestPublicKeyCredentialRequestOptions(); // Inject a registration for the URL (which is a U2F AppID). ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectRegistration( options->allow_credentials[0].id(), kTestOrigin1)); options->appid = kTestOrigin1; TestGetAssertionCallback callback_receiver; authenticator->GetAssertion(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); ASSERT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); EXPECT_EQ(true, callback_receiver.value()->echo_appid_extension); EXPECT_EQ(true, callback_receiver.value()->appid_extension); } { // AppID should still work when the authenticator supports credProtect. ResetVirtualDevice(); device::VirtualCtap2Device::Config config; config.u2f_support = true; config.pin_support = true; config.resident_key_support = true; config.cred_protect_support = true; virtual_device_factory_->SetCtap2Config(config); // Inject a registration for the URL (which is a U2F AppID). PublicKeyCredentialRequestOptionsPtr options = GetTestPublicKeyCredentialRequestOptions(); ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectRegistration( options->allow_credentials[0].id(), kTestOrigin1)); options->appid = kTestOrigin1; TestGetAssertionCallback callback_receiver; authenticator->GetAssertion(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); ASSERT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); EXPECT_EQ(true, callback_receiver.value()->echo_appid_extension); EXPECT_EQ(true, callback_receiver.value()->appid_extension); } } TEST_F(AuthenticatorImplTest, AppIdExcludeExtension) { SimulateNavigation(GURL(kTestOrigin1)); auto authenticator = ConnectToAuthenticator(); // Attempt to register a credential using the appidExclude extension. It // should fail when the registration already exists on the authenticator. for (bool credential_already_exists : {false, true}) { SCOPED_TRACE(credential_already_exists); for (bool is_ctap2 : {false, true}) { SCOPED_TRACE(is_ctap2); ResetVirtualDevice(); virtual_device_factory_->SetSupportedProtocol( is_ctap2 ? device::ProtocolVersion::kCtap2 : device::ProtocolVersion::kU2f); PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); options->appid_exclude = kTestOrigin1; options->exclude_credentials = GetTestCredentials(); if (credential_already_exists) { ASSERT_TRUE( virtual_device_factory_->mutable_state()->InjectRegistration( options->exclude_credentials[0].id(), kTestOrigin1)); } TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); if (credential_already_exists) { ASSERT_EQ(AuthenticatorStatus::CREDENTIAL_EXCLUDED, callback_receiver.status()); } else { ASSERT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); } } } { // Using appidExclude with an empty exclude list previously caused a crash. // See https://bugs.chromium.org/p/chromium/issues/detail?id=1054499. virtual_device_factory_->SetSupportedProtocol( device::ProtocolVersion::kCtap2); PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); options->appid_exclude = kTestOrigin1; options->exclude_credentials.clear(); TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); ASSERT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); } { // Also test the case where all credential IDs are eliminated because of // their size. device::VirtualCtap2Device::Config config; config.max_credential_count_in_list = 1; config.max_credential_id_length = 1; virtual_device_factory_->SetCtap2Config(config); PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); options->appid_exclude = kTestOrigin1; options->exclude_credentials = GetTestCredentials(); for (const auto& cred : options->exclude_credentials) { ASSERT_GT(cred.id().size(), config.max_credential_id_length); } TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); ASSERT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); } } TEST_F(AuthenticatorImplTest, TestGetAssertionTimeout) { // The VirtualFidoAuthenticator simulates a tap immediately after it gets the // request. Replace by the real discovery that will wait until timeout. AuthenticatorEnvironmentImpl::GetInstance() ->ReplaceDefaultDiscoveryFactoryForTesting( std::make_unique<device::FidoDiscoveryFactory>()); SimulateNavigation(GURL(kTestOrigin1)); PublicKeyCredentialRequestOptionsPtr options = GetTestPublicKeyCredentialRequestOptions(); TestGetAssertionCallback callback_receiver; auto task_runner = base::MakeRefCounted<base::TestMockTimeTaskRunner>( base::Time::Now(), base::TimeTicks::Now()); auto authenticator = ConstructAuthenticatorWithTimer(task_runner); authenticator->GetAssertion(std::move(options), callback_receiver.callback()); // Trigger timer. base::RunLoop().RunUntilIdle(); task_runner->FastForwardBy(base::TimeDelta::FromMinutes(1)); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); } TEST_F(AuthenticatorImplTest, OversizedCredentialId) { // 255 is the maximum size of a U2F credential ID. We also test one greater // (256) to ensure that nothing untoward happens. const std::vector<size_t> kSizes = {255, 256}; for (const size_t size : kSizes) { SCOPED_TRACE(size); SimulateNavigation(GURL(kTestOrigin1)); mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); PublicKeyCredentialRequestOptionsPtr options = GetTestPublicKeyCredentialRequestOptions(); device::PublicKeyCredentialDescriptor credential; credential.SetCredentialTypeForTesting(device::CredentialType::kPublicKey); credential.GetIdForTesting().resize(size); credential.GetTransportsForTesting().emplace( device::FidoTransportProtocol::kUsbHumanInterfaceDevice); const bool should_be_valid = size < 256; if (should_be_valid) { ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectRegistration( credential.id(), kTestRelyingPartyId)); } options->allow_credentials.emplace_back(credential); TestGetAssertionCallback callback_receiver; authenticator->GetAssertion(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); if (should_be_valid) { EXPECT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); } else { EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); } } } TEST_F(AuthenticatorImplTest, NoSilentAuthenticationForCable) { // https://crbug.com/954355 EnableFeature(features::kWebAuthCable); SimulateNavigation(GURL(kTestOrigin1)); for (bool is_cable_device : {false, true}) { ResetVirtualDevice(); device::VirtualCtap2Device::Config config; config.reject_silent_authentication_requests = true; virtual_device_factory_->SetCtap2Config(config); PublicKeyCredentialRequestOptionsPtr options = GetTestPublicKeyCredentialRequestOptions(); options->allow_credentials = GetTestCredentials(/*num_credentials=*/2); options->cable_authentication_data = GetTestCableExtension(); if (is_cable_device) { virtual_device_factory_->SetTransport( device::FidoTransportProtocol::kCloudAssistedBluetoothLowEnergy); for (auto& cred : options->allow_credentials) { cred.GetTransportsForTesting().clear(); cred.GetTransportsForTesting().emplace( device::FidoTransportProtocol::kCloudAssistedBluetoothLowEnergy); } } ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectRegistration( options->allow_credentials[0].id(), kTestRelyingPartyId)); TestGetAssertionCallback callback_receiver; mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); authenticator->GetAssertion(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); if (is_cable_device) { EXPECT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); } else { // If a caBLE device is not simulated then silent requests should be used. // The virtual device will return an error because // |reject_silent_authentication_requests| is true and then it'll // immediately resolve the touch request. EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); } } } TEST_F(AuthenticatorImplTest, TestGetAssertionU2fDeviceBackwardsCompatibility) { SimulateNavigation(GURL(kTestOrigin1)); PublicKeyCredentialRequestOptionsPtr options = GetTestPublicKeyCredentialRequestOptions(); TestGetAssertionCallback callback_receiver; auto task_runner = base::MakeRefCounted<base::TestMockTimeTaskRunner>( base::Time::Now(), base::TimeTicks::Now()); auto authenticator = ConstructAuthenticatorWithTimer(task_runner); // Inject credential ID to the virtual device so that successful sign in is // possible. ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectRegistration( options->allow_credentials[0].id(), kTestRelyingPartyId)); authenticator->GetAssertion(std::move(options), callback_receiver.callback()); // Trigger timer. callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); } TEST_F(AuthenticatorImplTest, GetAssertionWithEmptyAllowCredentials) { SimulateNavigation(GURL(kTestOrigin1)); PublicKeyCredentialRequestOptionsPtr options = GetTestPublicKeyCredentialRequestOptions(); options->allow_credentials.clear(); TestGetAssertionCallback callback_receiver; auto task_runner = base::MakeRefCounted<base::TestMockTimeTaskRunner>( base::Time::Now(), base::TimeTicks::Now()); auto authenticator = ConstructAuthenticatorWithTimer(task_runner); authenticator->GetAssertion(std::move(options), callback_receiver.callback()); // Trigger timer. base::RunLoop().RunUntilIdle(); task_runner->FastForwardBy(base::TimeDelta::FromMinutes(1)); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::RESIDENT_CREDENTIALS_UNSUPPORTED, callback_receiver.status()); } TEST_F(AuthenticatorImplTest, MakeCredentialAlreadyRegistered) { SimulateNavigation(GURL(kTestOrigin1)); mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); // Exclude the one already registered credential. options->exclude_credentials = GetTestCredentials(); ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectRegistration( options->exclude_credentials[0].id(), kTestRelyingPartyId)); TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::CREDENTIAL_EXCLUDED, callback_receiver.status()); } TEST_F(AuthenticatorImplTest, MakeCredentialPendingRequest) { SimulateNavigation(GURL(kTestOrigin1)); mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); // Make first request. PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); // Make second request. // TODO(crbug.com/785955): Rework to ensure there are potential race // conditions once we have VirtualAuthenticatorEnvironment. PublicKeyCredentialCreationOptionsPtr options2 = GetTestPublicKeyCredentialCreationOptions(); TestMakeCredentialCallback callback_receiver2; authenticator->MakeCredential(std::move(options2), callback_receiver2.callback()); callback_receiver2.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::PENDING_REQUEST, callback_receiver2.status()); callback_receiver.WaitForCallback(); } TEST_F(AuthenticatorImplTest, GetAssertionPendingRequest) { SimulateNavigation(GURL(kTestOrigin1)); mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); // Make first request. PublicKeyCredentialRequestOptionsPtr options = GetTestPublicKeyCredentialRequestOptions(); TestGetAssertionCallback callback_receiver; authenticator->GetAssertion(std::move(options), callback_receiver.callback()); // Make second request. // TODO(crbug.com/785955): Rework to ensure there are potential race // conditions once we have VirtualAuthenticatorEnvironment. PublicKeyCredentialRequestOptionsPtr options2 = GetTestPublicKeyCredentialRequestOptions(); TestGetAssertionCallback callback_receiver2; authenticator->GetAssertion(std::move(options2), callback_receiver2.callback()); callback_receiver2.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::PENDING_REQUEST, callback_receiver2.status()); callback_receiver.WaitForCallback(); } TEST_F(AuthenticatorImplTest, NavigationDuringOperation) { SimulateNavigation(GURL(kTestOrigin1)); mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); base::RunLoop run_loop; authenticator.set_disconnect_handler(run_loop.QuitClosure()); // Make first request. PublicKeyCredentialRequestOptionsPtr options = GetTestPublicKeyCredentialRequestOptions(); TestGetAssertionCallback callback_receiver; authenticator->GetAssertion(std::move(options), callback_receiver.callback()); // Simulate a navigation while waiting for the user to press the token. virtual_device_factory_->mutable_state()->simulate_press_callback = base::BindLambdaForTesting([&](device::VirtualFidoDevice* device) { base::ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::BindLambdaForTesting( [&]() { SimulateNavigation(GURL(kTestOrigin2)); })); return false; }); run_loop.Run(); } TEST_F(AuthenticatorImplTest, InvalidResponse) { virtual_device_factory_->mutable_state()->simulate_invalid_response = true; SimulateNavigation(GURL(kTestOrigin1)); auto task_runner = base::MakeRefCounted<base::TestMockTimeTaskRunner>( base::Time::Now(), base::TimeTicks::Now()); auto authenticator = ConstructAuthenticatorWithTimer(task_runner); { PublicKeyCredentialRequestOptionsPtr options = GetTestPublicKeyCredentialRequestOptions(); TestGetAssertionCallback callback_receiver; authenticator->GetAssertion(std::move(options), callback_receiver.callback()); // Trigger timer. base::RunLoop().RunUntilIdle(); task_runner->FastForwardBy(base::TimeDelta::FromMinutes(1)); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); } { PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); // Trigger timer. base::RunLoop().RunUntilIdle(); task_runner->FastForwardBy(base::TimeDelta::FromMinutes(1)); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); } } TEST_F(AuthenticatorImplTest, Ctap2AssertionWithUnknownCredential) { SimulateNavigation(GURL(kTestOrigin1)); for (bool return_immediate_invalid_credential_error : {false, true}) { SCOPED_TRACE(::testing::Message() << "return_immediate_invalid_credential_error=" << return_immediate_invalid_credential_error); device::VirtualCtap2Device::Config config; config.return_immediate_invalid_credential_error = return_immediate_invalid_credential_error; virtual_device_factory_->SetCtap2Config(config); bool pressed = false; virtual_device_factory_->mutable_state()->simulate_press_callback = base::BindRepeating( [](bool* flag, device::VirtualFidoDevice* device) { *flag = true; return true; }, &pressed); TestGetAssertionCallback callback_receiver; mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); authenticator->GetAssertion(GetTestPublicKeyCredentialRequestOptions(), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); // The user must have pressed the authenticator for the operation to // resolve. EXPECT_TRUE(pressed); } } TEST_F(AuthenticatorImplTest, GetAssertionResponseWithAttestedCredentialData) { device::VirtualCtap2Device::Config config; config.return_attested_cred_data_in_get_assertion_response = true; virtual_device_factory_->SetCtap2Config(config); PublicKeyCredentialRequestOptionsPtr options = GetTestPublicKeyCredentialRequestOptions(); ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectRegistration( options->allow_credentials[0].id(), kTestRelyingPartyId)); SimulateNavigation(GURL(kTestOrigin1)); auto task_runner = base::MakeRefCounted<base::TestMockTimeTaskRunner>( base::Time::Now(), base::TimeTicks::Now()); auto authenticator = ConstructAuthenticatorWithTimer(task_runner); TestGetAssertionCallback callback_receiver; authenticator->GetAssertion(std::move(options), callback_receiver.callback()); base::RunLoop().RunUntilIdle(); task_runner->FastForwardBy(base::TimeDelta::FromMinutes(1)); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); } #if defined(OS_WIN) TEST_F(AuthenticatorImplTest, IsUVPAA) { device::FakeWinWebAuthnApi win_webauthn_api; auto discovery_factory = std::make_unique<device::test::FakeFidoDiscoveryFactory>(); discovery_factory->set_win_webauthn_api(&win_webauthn_api); AuthenticatorEnvironmentImpl::GetInstance() ->ReplaceDefaultDiscoveryFactoryForTesting(std::move(discovery_factory)); SimulateNavigation(GURL(kTestOrigin1)); mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); for (const bool enable_win_webauthn_api : {false, true}) { SCOPED_TRACE(enable_win_webauthn_api ? "enable_win_webauthn_api" : "!enable_win_webauthn_api"); for (const bool is_uvpaa : {false, true}) { SCOPED_TRACE(is_uvpaa ? "is_uvpaa" : "!is_uvpaa"); win_webauthn_api.set_available(enable_win_webauthn_api); win_webauthn_api.set_is_uvpaa(is_uvpaa); TestIsUvpaaCallback cb; authenticator->IsUserVerifyingPlatformAuthenticatorAvailable( cb.callback()); cb.WaitForCallback(); EXPECT_EQ(enable_win_webauthn_api && is_uvpaa, cb.value()); } } } #endif // defined(OS_WIN) #if defined(OS_CHROMEOS) TEST_F(AuthenticatorImplTest, IsUVPAA) { SimulateNavigation(GURL(kTestOrigin1)); for (const bool flag_enabled : {false, true}) { SCOPED_TRACE(::testing::Message() << "flag_enabled=" << flag_enabled); base::test::ScopedFeatureList scoped_feature_list; scoped_feature_list.InitWithFeatureState( device::kWebAuthCrosPlatformAuthenticator, flag_enabled); mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); TestIsUvpaaCallback cb; authenticator->IsUserVerifyingPlatformAuthenticatorAvailable(cb.callback()); cb.WaitForCallback(); EXPECT_EQ(flag_enabled, cb.value()); } } #endif // defined(OS_CHROMEOS) class OverrideRPIDAuthenticatorRequestDelegate : public AuthenticatorRequestClientDelegate { public: OverrideRPIDAuthenticatorRequestDelegate() = default; ~OverrideRPIDAuthenticatorRequestDelegate() override = default; base::Optional<std::string> MaybeGetRelyingPartyIdOverride( const std::string& claimed_rp_id, const url::Origin& caller_origin) override { CHECK_EQ(caller_origin.scheme(), "chrome-extension"); return caller_origin.Serialize(); } private: DISALLOW_COPY_AND_ASSIGN(OverrideRPIDAuthenticatorRequestDelegate); }; class OverrideRPIDAuthenticatorContentBrowserClient : public ContentBrowserClient { public: std::unique_ptr<AuthenticatorRequestClientDelegate> GetWebAuthenticationRequestDelegate( RenderFrameHost* render_frame_host) override { return std::make_unique<OverrideRPIDAuthenticatorRequestDelegate>(); } }; class OverrideRPIDAuthenticatorTest : public AuthenticatorImplTest { public: void SetUp() override { AuthenticatorImplTest::SetUp(); old_client_ = SetBrowserClientForTesting(&test_client_); } void TearDown() override { SetBrowserClientForTesting(old_client_); AuthenticatorImplTest::TearDown(); } private: OverrideRPIDAuthenticatorContentBrowserClient test_client_; ContentBrowserClient* old_client_ = nullptr; }; TEST_F(OverrideRPIDAuthenticatorTest, ChromeExtensions) { // Test that credentials can be created and used from an extension origin when // permitted by the delegate. constexpr char kExtensionId[] = "abcdefg"; const std::string extension_origin = std::string("chrome-extension://") + kExtensionId; const std::string extension_page = extension_origin + "/test.html"; SimulateNavigation(GURL(extension_page)); mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); std::vector<uint8_t> credential_id; { PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); options->relying_party.id = kExtensionId; TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); ASSERT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); credential_id = callback_receiver.value()->info->raw_id; } { PublicKeyCredentialRequestOptionsPtr options = GetTestPublicKeyCredentialRequestOptions(); options->relying_party_id = kExtensionId; options->allow_credentials[0] = device::PublicKeyCredentialDescriptor( device::CredentialType::kPublicKey, std::move(credential_id)); TestGetAssertionCallback callback_receiver; authenticator->GetAssertion(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); ASSERT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); } } enum class IndividualAttestation { REQUESTED, NOT_REQUESTED, }; enum class AttestationConsent { GRANTED, DENIED, }; enum class AttestationType { ANY, NONE, NONE_WITH_NONZERO_AAGUID, U2F, SELF, SELF_WITH_NONZERO_AAGUID, }; // Convert a blink::mojom::AttestationConveyancePreference to a // device::AtttestationConveyancePreference. device::AttestationConveyancePreference ConvertAttestationConveyancePreference( AttestationConveyancePreference in) { switch (in) { case AttestationConveyancePreference::NONE: return ::device::AttestationConveyancePreference::kNone; case AttestationConveyancePreference::INDIRECT: return ::device::AttestationConveyancePreference::kIndirect; case AttestationConveyancePreference::DIRECT: return ::device::AttestationConveyancePreference::kDirect; case AttestationConveyancePreference::ENTERPRISE: return ::device::AttestationConveyancePreference::kEnterprise; } } class TestAuthenticatorRequestDelegate : public AuthenticatorRequestClientDelegate { public: TestAuthenticatorRequestDelegate( RenderFrameHost* render_frame_host, base::OnceClosure action_callbacks_registered_callback, IndividualAttestation individual_attestation, AttestationConsent attestation_consent, bool is_focused, bool is_uvpaa) : action_callbacks_registered_callback_( std::move(action_callbacks_registered_callback)), individual_attestation_(individual_attestation), attestation_consent_(attestation_consent), is_focused_(is_focused), is_uvpaa_(is_uvpaa) {} ~TestAuthenticatorRequestDelegate() override {} void RegisterActionCallbacks( base::OnceClosure cancel_callback, base::RepeatingClosure start_over_callback, device::FidoRequestHandlerBase::RequestCallback request_callback, base::RepeatingClosure bluetooth_adapter_power_on_callback, device::FidoRequestHandlerBase::BlePairingCallback ble_pairing_callback) override { ASSERT_TRUE(action_callbacks_registered_callback_) << "RegisterActionCallbacks called twice."; cancel_callback_.emplace(std::move(cancel_callback)); std::move(action_callbacks_registered_callback_).Run(); } bool ShouldPermitIndividualAttestation( const std::string& relying_party_id) override { return individual_attestation_ == IndividualAttestation::REQUESTED; } void ShouldReturnAttestation( const std::string& relying_party_id, const device::FidoAuthenticator* authenticator, base::OnceCallback<void(bool)> callback) override { std::move(callback).Run(attestation_consent_ == AttestationConsent::GRANTED); } base::Optional<bool> IsUserVerifyingPlatformAuthenticatorAvailableOverride() override { return is_uvpaa_; } bool IsFocused() override { return is_focused_; } void OnTransportAvailabilityEnumerated( device::FidoRequestHandlerBase::TransportAvailabilityInfo transport_info) override { // Simulate the behaviour of Chrome's |AuthenticatorRequestDialogModel| // which shows a specific error when no transports are available and lets // the user cancel the request. if (transport_info.available_transports.empty()) { std::move(*cancel_callback_).Run(); } } base::OnceClosure action_callbacks_registered_callback_; base::Optional<base::OnceClosure> cancel_callback_; const IndividualAttestation individual_attestation_; const AttestationConsent attestation_consent_; const bool is_focused_; const bool is_uvpaa_; private: DISALLOW_COPY_AND_ASSIGN(TestAuthenticatorRequestDelegate); }; class TestAuthenticatorContentBrowserClient : public ContentBrowserClient { public: std::unique_ptr<AuthenticatorRequestClientDelegate> GetWebAuthenticationRequestDelegate( RenderFrameHost* render_frame_host) override { if (return_null_delegate) return nullptr; return std::make_unique<TestAuthenticatorRequestDelegate>( render_frame_host, action_callbacks_registered_callback ? std::move(action_callbacks_registered_callback) : base::DoNothing(), individual_attestation, attestation_consent, is_focused, is_uvpaa); } // If set, this closure will be called when the subsequently constructed // delegate is informed that the request has started. base::OnceClosure action_callbacks_registered_callback; IndividualAttestation individual_attestation = IndividualAttestation::NOT_REQUESTED; AttestationConsent attestation_consent = AttestationConsent::DENIED; bool is_focused = true; bool is_uvpaa = false; // This emulates scenarios where a nullptr RequestClientDelegate is returned // because a request is already in progress. bool return_null_delegate = false; }; // A test class that installs and removes an // |AuthenticatorTestContentBrowserClient| automatically and can run tests // against simulated attestation results. class AuthenticatorContentBrowserClientTest : public AuthenticatorImplTest { public: AuthenticatorContentBrowserClientTest() = default; struct TestCase { AttestationConveyancePreference attestation_requested; IndividualAttestation individual_attestation; AttestationConsent attestation_consent; AuthenticatorStatus expected_status; AttestationType expected_attestation; const char* expected_certificate_substring; }; void SetUp() override { AuthenticatorImplTest::SetUp(); old_client_ = SetBrowserClientForTesting(&test_client_); } void TearDown() override { SetBrowserClientForTesting(old_client_); AuthenticatorImplTest::TearDown(); } void RunTestCases(const std::vector<TestCase>& tests) { mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); for (size_t i = 0; i < tests.size(); i++) { const auto& test = tests[i]; SCOPED_TRACE(test.attestation_consent == AttestationConsent::GRANTED ? "consent granted" : "consent denied"); SCOPED_TRACE(test.individual_attestation == IndividualAttestation::REQUESTED ? "individual attestation" : "no individual attestation"); SCOPED_TRACE( AttestationConveyancePreferenceToString(test.attestation_requested)); SCOPED_TRACE(i); test_client_.individual_attestation = test.individual_attestation; test_client_.attestation_consent = test.attestation_consent; PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); options->relying_party.id = "example.com"; options->timeout = base::TimeDelta::FromSeconds(1); options->attestation = ConvertAttestationConveyancePreference(test.attestation_requested); TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); ASSERT_EQ(test.expected_status, callback_receiver.status()); if (test.expected_status != AuthenticatorStatus::SUCCESS) { ASSERT_EQ(AttestationType::ANY, test.expected_attestation); continue; } base::Optional<Value> attestation_value = Reader::Read(callback_receiver.value()->attestation_object); ASSERT_TRUE(attestation_value); ASSERT_TRUE(attestation_value->is_map()); const auto& attestation = attestation_value->GetMap(); base::Optional<device::AuthenticatorData> auth_data = base::nullopt; const auto auth_data_it = attestation.find(Value("authData")); if (auth_data_it != attestation.end() && auth_data_it->second.is_bytestring()) { auth_data = device::AuthenticatorData::DecodeAuthenticatorData( auth_data_it->second.GetBytestring()); } switch (test.expected_attestation) { case AttestationType::ANY: ASSERT_STREQ("", test.expected_certificate_substring); break; case AttestationType::NONE: ASSERT_STREQ("", test.expected_certificate_substring); ExpectMapHasKeyWithStringValue(attestation, "fmt", "none"); EXPECT_TRUE(auth_data->attested_data()->IsAaguidZero()); break; case AttestationType::NONE_WITH_NONZERO_AAGUID: ASSERT_STREQ("", test.expected_certificate_substring); ExpectMapHasKeyWithStringValue(attestation, "fmt", "none"); EXPECT_FALSE(auth_data->attested_data()->IsAaguidZero()); break; case AttestationType::U2F: ExpectMapHasKeyWithStringValue(attestation, "fmt", "fido-u2f"); if (strlen(test.expected_certificate_substring) > 0) { ExpectCertificateContainingSubstring( attestation, test.expected_certificate_substring); } break; case AttestationType::SELF: { ASSERT_STREQ("", test.expected_certificate_substring); ExpectMapHasKeyWithStringValue(attestation, "fmt", "packed"); // A self-attestation should not include an X.509 chain nor ECDAA key. const auto attestation_statement_it = attestation.find(Value("attStmt")); ASSERT_TRUE(attestation_statement_it != attestation.end()); ASSERT_TRUE(attestation_statement_it->second.is_map()); const auto& attestation_statement = attestation_statement_it->second.GetMap(); ASSERT_TRUE(attestation_statement.find(Value("x5c")) == attestation_statement.end()); ASSERT_TRUE(attestation_statement.find(Value("ecdaaKeyId")) == attestation_statement.end()); EXPECT_TRUE(auth_data->attested_data()->IsAaguidZero()); break; } case AttestationType::SELF_WITH_NONZERO_AAGUID: { ASSERT_STREQ("", test.expected_certificate_substring); ExpectMapHasKeyWithStringValue(attestation, "fmt", "packed"); // A self-attestation should not include an X.509 chain nor ECDAA key. const auto attestation_statement_it = attestation.find(Value("attStmt")); ASSERT_TRUE(attestation_statement_it != attestation.end()); ASSERT_TRUE(attestation_statement_it->second.is_map()); const auto& attestation_statement = attestation_statement_it->second.GetMap(); ASSERT_TRUE(attestation_statement.find(Value("x5c")) == attestation_statement.end()); ASSERT_TRUE(attestation_statement.find(Value("ecdaaKeyId")) == attestation_statement.end()); EXPECT_FALSE(auth_data->attested_data()->IsAaguidZero()); break; } } } } protected: TestAuthenticatorContentBrowserClient test_client_; private: static const char* AttestationConveyancePreferenceToString( AttestationConveyancePreference v) { switch (v) { case AttestationConveyancePreference::NONE: return "none"; case AttestationConveyancePreference::INDIRECT: return "indirect"; case AttestationConveyancePreference::DIRECT: return "direct"; case AttestationConveyancePreference::ENTERPRISE: return "enterprise"; default: NOTREACHED(); return ""; } } // Expects that |map| contains the given key with a string-value equal to // |expected|. static void ExpectMapHasKeyWithStringValue(const Value::MapValue& map, const char* key, const char* expected) { const auto it = map.find(Value(key)); ASSERT_TRUE(it != map.end()) << "No such key '" << key << "'"; const auto& value = it->second; EXPECT_TRUE(value.is_string()) << "Value of '" << key << "' has type " << static_cast<int>(value.type()) << ", but expected to find a string"; EXPECT_EQ(std::string(expected), value.GetString()) << "Value of '" << key << "' is '" << value.GetString() << "', but expected to find '" << expected << "'"; } // Asserts that the webauthn attestation CBOR map in |attestation| contains a // single X.509 certificate containing |substring|. static void ExpectCertificateContainingSubstring( const Value::MapValue& attestation, const std::string& substring) { const auto& attestation_statement_it = attestation.find(Value("attStmt")); ASSERT_TRUE(attestation_statement_it != attestation.end()); ASSERT_TRUE(attestation_statement_it->second.is_map()); const auto& attestation_statement = attestation_statement_it->second.GetMap(); const auto& x5c_it = attestation_statement.find(Value("x5c")); ASSERT_TRUE(x5c_it != attestation_statement.end()); ASSERT_TRUE(x5c_it->second.is_array()); const auto& x5c = x5c_it->second.GetArray(); ASSERT_EQ(1u, x5c.size()); ASSERT_TRUE(x5c[0].is_bytestring()); base::StringPiece cert = x5c[0].GetBytestringAsString(); EXPECT_TRUE(cert.find(substring) != cert.npos); } ContentBrowserClient* old_client_ = nullptr; DISALLOW_COPY_AND_ASSIGN(AuthenticatorContentBrowserClientTest); }; TEST_F(AuthenticatorContentBrowserClientTest, AttestationBehaviour) { const char kStandardCommonName[] = "U2F Attestation"; const char kIndividualCommonName[] = "Individual Cert"; const std::vector<TestCase> kTests = { { AttestationConveyancePreference::NONE, IndividualAttestation::NOT_REQUESTED, AttestationConsent::DENIED, AuthenticatorStatus::SUCCESS, AttestationType::NONE, "", }, { AttestationConveyancePreference::NONE, IndividualAttestation::REQUESTED, AttestationConsent::DENIED, AuthenticatorStatus::SUCCESS, AttestationType::NONE, "", }, { AttestationConveyancePreference::INDIRECT, IndividualAttestation::NOT_REQUESTED, AttestationConsent::DENIED, AuthenticatorStatus::SUCCESS, AttestationType::NONE, "", }, { AttestationConveyancePreference::INDIRECT, IndividualAttestation::REQUESTED, AttestationConsent::DENIED, AuthenticatorStatus::SUCCESS, AttestationType::NONE, "", }, { AttestationConveyancePreference::INDIRECT, IndividualAttestation::NOT_REQUESTED, AttestationConsent::GRANTED, AuthenticatorStatus::SUCCESS, AttestationType::U2F, kStandardCommonName, }, { AttestationConveyancePreference::INDIRECT, IndividualAttestation::REQUESTED, AttestationConsent::GRANTED, AuthenticatorStatus::SUCCESS, AttestationType::U2F, kStandardCommonName, }, { AttestationConveyancePreference::DIRECT, IndividualAttestation::NOT_REQUESTED, AttestationConsent::DENIED, AuthenticatorStatus::SUCCESS, AttestationType::NONE, "", }, { AttestationConveyancePreference::DIRECT, IndividualAttestation::REQUESTED, AttestationConsent::DENIED, AuthenticatorStatus::SUCCESS, AttestationType::NONE, "", }, { AttestationConveyancePreference::DIRECT, IndividualAttestation::NOT_REQUESTED, AttestationConsent::GRANTED, AuthenticatorStatus::SUCCESS, AttestationType::U2F, kStandardCommonName, }, { AttestationConveyancePreference::DIRECT, IndividualAttestation::REQUESTED, AttestationConsent::GRANTED, AuthenticatorStatus::SUCCESS, AttestationType::U2F, kStandardCommonName, }, { AttestationConveyancePreference::ENTERPRISE, IndividualAttestation::NOT_REQUESTED, AttestationConsent::DENIED, AuthenticatorStatus::SUCCESS, AttestationType::NONE, "", }, { AttestationConveyancePreference::ENTERPRISE, IndividualAttestation::REQUESTED, AttestationConsent::DENIED, AuthenticatorStatus::SUCCESS, AttestationType::NONE, "", }, { AttestationConveyancePreference::ENTERPRISE, IndividualAttestation::NOT_REQUESTED, AttestationConsent::GRANTED, AuthenticatorStatus::SUCCESS, AttestationType::U2F, kStandardCommonName, }, { AttestationConveyancePreference::ENTERPRISE, IndividualAttestation::REQUESTED, AttestationConsent::GRANTED, AuthenticatorStatus::SUCCESS, AttestationType::U2F, kIndividualCommonName, }, }; virtual_device_factory_->mutable_state()->attestation_cert_common_name = kStandardCommonName; virtual_device_factory_->mutable_state() ->individual_attestation_cert_common_name = kIndividualCommonName; NavigateAndCommit(GURL("https://example.com")); RunTestCases(kTests); } TEST_F(AuthenticatorContentBrowserClientTest, InappropriatelyIdentifyingAttestation) { // This common name is used by several devices that have inappropriately // identifying attestation certificates. const char kCommonName[] = "FT FIDO 0100"; const std::vector<TestCase> kTests = { { AttestationConveyancePreference::ENTERPRISE, IndividualAttestation::NOT_REQUESTED, AttestationConsent::DENIED, AuthenticatorStatus::SUCCESS, AttestationType::NONE, "", }, { AttestationConveyancePreference::DIRECT, IndividualAttestation::NOT_REQUESTED, AttestationConsent::GRANTED, AuthenticatorStatus::SUCCESS, // If individual attestation was not requested then the attestation // certificate will be removed, even if consent is given, because the // consent isn't to be tracked. AttestationType::NONE, "", }, { AttestationConveyancePreference::ENTERPRISE, IndividualAttestation::NOT_REQUESTED, AttestationConsent::GRANTED, AuthenticatorStatus::SUCCESS, // If individual attestation was not requested then the attestation // certificate will be removed, even if consent is given, because the // consent isn't to be tracked. AttestationType::NONE, "", }, { AttestationConveyancePreference::ENTERPRISE, IndividualAttestation::REQUESTED, AttestationConsent::GRANTED, AuthenticatorStatus::SUCCESS, AttestationType::U2F, kCommonName, }, }; virtual_device_factory_->mutable_state()->attestation_cert_common_name = kCommonName; virtual_device_factory_->mutable_state() ->individual_attestation_cert_common_name = kCommonName; NavigateAndCommit(GURL("https://example.com")); RunTestCases(kTests); } // Test attestation erasure for an authenticator that uses self-attestation // (which requires a zero AAGUID), but has a non-zero AAGUID. This mirrors the // behavior of the Touch ID platform authenticator. TEST_F(AuthenticatorContentBrowserClientTest, PlatformAuthenticatorAttestation) { virtual_device_factory_->SetSupportedProtocol( device::ProtocolVersion::kCtap2); virtual_device_factory_->SetTransport( device::FidoTransportProtocol::kInternal); virtual_device_factory_->mutable_state()->self_attestation = true; virtual_device_factory_->mutable_state() ->non_zero_aaguid_with_self_attestation = true; NavigateAndCommit(GURL("https://example.com")); const std::vector<TestCase> kTests = { { // Self-attestation is defined as having a zero AAGUID, but // |non_zero_aaguid_with_self_attestation| is set above. Thus, if no // attestation is requested, the self-attestation will be removed but, // because the transport is kInternal, the AAGUID will be preserved. AttestationConveyancePreference::NONE, IndividualAttestation::NOT_REQUESTED, AttestationConsent::DENIED, AuthenticatorStatus::SUCCESS, AttestationType::NONE_WITH_NONZERO_AAGUID, "", }, { // If attestation is requested, but denied, we'll return none // attestation. But because the transport is kInternal, the AAGUID // will be preserved. AttestationConveyancePreference::DIRECT, IndividualAttestation::NOT_REQUESTED, AttestationConsent::DENIED, AuthenticatorStatus::SUCCESS, AttestationType::NONE_WITH_NONZERO_AAGUID, "", }, { // If attestation is requested and granted, the self attestation // will be returned. AttestationConveyancePreference::DIRECT, IndividualAttestation::NOT_REQUESTED, AttestationConsent::GRANTED, AuthenticatorStatus::SUCCESS, AttestationType::SELF_WITH_NONZERO_AAGUID, "", }, }; RunTestCases(kTests); } TEST_F(AuthenticatorContentBrowserClientTest, Ctap2SelfAttestation) { virtual_device_factory_->SetSupportedProtocol( device::ProtocolVersion::kCtap2); virtual_device_factory_->mutable_state()->self_attestation = true; NavigateAndCommit(GURL("https://example.com")); const std::vector<TestCase> kTests = { { // If no attestation is requested, we'll return the self attestation // rather than erasing it. AttestationConveyancePreference::NONE, IndividualAttestation::NOT_REQUESTED, AttestationConsent::DENIED, AuthenticatorStatus::SUCCESS, AttestationType::SELF, "", }, { // If attestation is requested, but denied, we'll return none // attestation. AttestationConveyancePreference::DIRECT, IndividualAttestation::NOT_REQUESTED, AttestationConsent::DENIED, AuthenticatorStatus::SUCCESS, AttestationType::NONE, "", }, { // If attestation is requested and granted, the self attestation will // be returned. AttestationConveyancePreference::DIRECT, IndividualAttestation::NOT_REQUESTED, AttestationConsent::GRANTED, AuthenticatorStatus::SUCCESS, AttestationType::SELF, "", }, }; RunTestCases(kTests); } TEST_F(AuthenticatorContentBrowserClientTest, Ctap2SelfAttestationNonZeroAaguid) { virtual_device_factory_->SetSupportedProtocol( device::ProtocolVersion::kCtap2); virtual_device_factory_->mutable_state()->self_attestation = true; virtual_device_factory_->mutable_state() ->non_zero_aaguid_with_self_attestation = true; NavigateAndCommit(GURL("https://example.com")); const std::vector<TestCase> kTests = { { // Since the virtual device is configured to set a non-zero AAGUID the // self-attestation should still be replaced with a "none" // attestation. AttestationConveyancePreference::NONE, IndividualAttestation::NOT_REQUESTED, AttestationConsent::DENIED, AuthenticatorStatus::SUCCESS, AttestationType::NONE, "", }, }; RunTestCases(kTests); } TEST_F(AuthenticatorContentBrowserClientTest, BlockedAttestation) { NavigateAndCommit(GURL("https://foo.example.com")); static constexpr struct { const char* domains; AttestationConveyancePreference attestation; IndividualAttestation individual_attestation; AttestationType result; } kTests[] = { // Empty or nonsense parameter doesn't block anything. { "", AttestationConveyancePreference::DIRECT, IndividualAttestation::NOT_REQUESTED, AttestationType::U2F, }, { " ,, ,, ", AttestationConveyancePreference::DIRECT, IndividualAttestation::NOT_REQUESTED, AttestationType::U2F, }, // Direct listing of domain blocks... { "foo.example.com", AttestationConveyancePreference::DIRECT, IndividualAttestation::NOT_REQUESTED, AttestationType::NONE, }, // ... unless attestation is permitted by policy. { "foo.example.com", AttestationConveyancePreference::DIRECT, IndividualAttestation::REQUESTED, AttestationType::U2F, }, // Additional stuff in the string doesn't break the blocking. { "other,foo.example.com,,nonsenseXYZ123", AttestationConveyancePreference::DIRECT, IndividualAttestation::NOT_REQUESTED, AttestationType::NONE, }, // The whole domain can be blocked. { "(*.)example.com", AttestationConveyancePreference::DIRECT, IndividualAttestation::NOT_REQUESTED, AttestationType::NONE, }, // Policy again overrides { "(*.)example.com", AttestationConveyancePreference::DIRECT, IndividualAttestation::REQUESTED, AttestationType::U2F, }, // Trying to block everything doesn't work. { "(*.)", AttestationConveyancePreference::DIRECT, IndividualAttestation::NOT_REQUESTED, AttestationType::U2F, }, }; int test_num = 0; for (const auto& test : kTests) { SCOPED_TRACE(test_num++); SCOPED_TRACE(test.domains); std::map<std::string, std::string> params; params.emplace("domains", test.domains); base::test::ScopedFeatureList scoped_feature_list_; scoped_feature_list_.InitAndEnableFeatureWithParameters( device::kWebAuthAttestationBlockList, params); const std::vector<TestCase> kTestCase = { { test.attestation, test.individual_attestation, AttestationConsent::GRANTED, AuthenticatorStatus::SUCCESS, test.result, "", }, }; RunTestCases(kTestCase); } } TEST_F(AuthenticatorContentBrowserClientTest, MakeCredentialRequestStartedCallback) { NavigateAndCommit(GURL(kTestOrigin1)); mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); TestRequestStartedCallback request_started; test_client_.action_callbacks_registered_callback = request_started.callback(); authenticator->MakeCredential(std::move(options), base::DoNothing()); request_started.WaitForCallback(); } TEST_F(AuthenticatorContentBrowserClientTest, GetAssertionRequestStartedCallback) { NavigateAndCommit(GURL(kTestOrigin1)); mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); PublicKeyCredentialRequestOptionsPtr options = GetTestPublicKeyCredentialRequestOptions(); TestRequestStartedCallback request_started; test_client_.action_callbacks_registered_callback = request_started.callback(); authenticator->GetAssertion(std::move(options), base::DoNothing()); request_started.WaitForCallback(); } TEST_F(AuthenticatorContentBrowserClientTest, Unfocused) { // When the |ContentBrowserClient| considers the tab to be unfocused, // registration requests should fail with a |NOT_FOCUSED| error, but getting // assertions should still work. test_client_.is_focused = false; NavigateAndCommit(GURL(kTestOrigin1)); mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); { PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); options->public_key_parameters = GetTestPublicKeyCredentialParameters(123); TestMakeCredentialCallback cb; TestRequestStartedCallback request_started; test_client_.action_callbacks_registered_callback = request_started.callback(); authenticator->MakeCredential(std::move(options), cb.callback()); cb.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::NOT_FOCUSED, cb.status()); EXPECT_FALSE(request_started.was_called()); } { PublicKeyCredentialRequestOptionsPtr options = GetTestPublicKeyCredentialRequestOptions(); device::PublicKeyCredentialDescriptor credential; credential.SetCredentialTypeForTesting(device::CredentialType::kPublicKey); credential.GetIdForTesting().resize(16); credential.GetTransportsForTesting() = { device::FidoTransportProtocol::kUsbHumanInterfaceDevice}; ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectRegistration( credential.id(), kTestRelyingPartyId)); options->allow_credentials.emplace_back(credential); TestGetAssertionCallback cb; TestRequestStartedCallback request_started; test_client_.action_callbacks_registered_callback = request_started.callback(); authenticator->GetAssertion(std::move(options), cb.callback()); cb.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::SUCCESS, cb.status()); EXPECT_TRUE(request_started.was_called()); } } TEST_F(AuthenticatorContentBrowserClientTest, NullDelegate_RejectsWithPendingRequest) { test_client_.return_null_delegate = true; NavigateAndCommit(GURL(kTestOrigin1)); mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); { PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); TestMakeCredentialCallback cb; authenticator->MakeCredential(std::move(options), cb.callback()); cb.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::PENDING_REQUEST, cb.status()); } { PublicKeyCredentialRequestOptionsPtr options = GetTestPublicKeyCredentialRequestOptions(); TestGetAssertionCallback cb; authenticator->GetAssertion(std::move(options), cb.callback()); cb.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::PENDING_REQUEST, cb.status()); } } TEST_F(AuthenticatorContentBrowserClientTest, IsUVPAAOverride) { SimulateNavigation(GURL(kTestOrigin1)); mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); for (const bool is_uvpaa : {false, true}) { SCOPED_TRACE(::testing::Message() << "is_uvpaa=" << is_uvpaa); test_client_.is_uvpaa = is_uvpaa; TestIsUvpaaCallback cb; authenticator->IsUserVerifyingPlatformAuthenticatorAvailable(cb.callback()); cb.WaitForCallback(); EXPECT_EQ(is_uvpaa, cb.value()); } } TEST_F(AuthenticatorContentBrowserClientTest, CryptotokenBypassesAttestationConsentPrompt) { SimulateNavigation(GURL(kTestOrigin1)); auto task_runner = base::MakeRefCounted<base::TestMockTimeTaskRunner>( base::Time::Now(), base::TimeTicks::Now()); auto authenticator = ConstructAuthenticatorWithTimer(task_runner); OverrideLastCommittedOrigin(main_rfh(), url::Origin::Create(GURL(kCryptotokenOrigin))); virtual_device_factory_->SetSupportedProtocol(device::ProtocolVersion::kU2f); PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); // Despite the direct attestation conveyance preference, the request delegate // is not asked for attestation consent. Hence the request will succeed, // despite the handler denying all attestation consent prompts. options->attestation = device::AttestationConveyancePreference::kDirect; test_client_.attestation_consent = AttestationConsent::DENIED; TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); } TEST_F(AuthenticatorContentBrowserClientTest, CableCredentialWithoutCableExtension) { // Exercise the case where a credential is marked as "cable" but no caBLE // extension is provided. The AuthenticatorRequestClientDelegate should see no // transports, which triggers it to cancel the request. (Outside of a testing // environment, Chrome's AuthenticatorRequestClientDelegate will show an // informative error and wait for the user to cancel the request.) EnableFeature(features::kWebAuthCable); SimulateNavigation(GURL(kTestOrigin1)); PublicKeyCredentialRequestOptionsPtr options = GetTestPublicKeyCredentialRequestOptions(); std::vector<uint8_t> id(32u, 1u); base::flat_set<device::FidoTransportProtocol> transports{ device::FidoTransportProtocol::kCloudAssistedBluetoothLowEnergy}; options->allow_credentials.clear(); options->allow_credentials.emplace_back(device::CredentialType::kPublicKey, std::move(id), std::move(transports)); TestGetAssertionCallback callback_receiver; mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); authenticator->GetAssertion(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); } class MockAuthenticatorRequestDelegateObserver : public TestAuthenticatorRequestDelegate { public: using InterestingFailureReasonCallback = base::OnceCallback<void(InterestingFailureReason)>; MockAuthenticatorRequestDelegateObserver( InterestingFailureReasonCallback failure_reasons_callback = base::DoNothing()) : TestAuthenticatorRequestDelegate( nullptr /* render_frame_host */, base::DoNothing() /* did_start_request_callback */, IndividualAttestation::NOT_REQUESTED, AttestationConsent::DENIED, true /* is_focused */, /*is_uvpaa=*/false), failure_reasons_callback_(std::move(failure_reasons_callback)) {} ~MockAuthenticatorRequestDelegateObserver() override = default; bool DoesBlockRequestOnFailure(InterestingFailureReason reason) override { CHECK(failure_reasons_callback_); std::move(failure_reasons_callback_).Run(reason); return false; } MOCK_METHOD1( OnTransportAvailabilityEnumerated, void(device::FidoRequestHandlerBase::TransportAvailabilityInfo data)); MOCK_METHOD1(EmbedderControlsAuthenticatorDispatch, bool(const device::FidoAuthenticator&)); MOCK_METHOD1(FidoAuthenticatorAdded, void(const device::FidoAuthenticator&)); MOCK_METHOD1(FidoAuthenticatorRemoved, void(base::StringPiece)); private: InterestingFailureReasonCallback failure_reasons_callback_; DISALLOW_COPY_AND_ASSIGN(MockAuthenticatorRequestDelegateObserver); }; // Fake test construct that shares all other behavior with AuthenticatorCommon // except that: // - FakeAuthenticatorCommon does not trigger UI activity. // - MockAuthenticatorRequestDelegateObserver is injected to // |request_delegate_| // instead of ChromeAuthenticatorRequestDelegate. class FakeAuthenticatorCommon : public AuthenticatorCommon { public: explicit FakeAuthenticatorCommon( RenderFrameHost* render_frame_host, std::unique_ptr<base::OneShotTimer> timer, std::unique_ptr<MockAuthenticatorRequestDelegateObserver> mock_delegate) : AuthenticatorCommon(render_frame_host, std::move(timer)), mock_delegate_(std::move(mock_delegate)) {} ~FakeAuthenticatorCommon() override = default; std::unique_ptr<AuthenticatorRequestClientDelegate> CreateRequestDelegate() override { DCHECK(mock_delegate_); return std::move(mock_delegate_); } private: friend class AuthenticatorImplRequestDelegateTest; std::unique_ptr<MockAuthenticatorRequestDelegateObserver> mock_delegate_; }; class AuthenticatorImplRequestDelegateTest : public AuthenticatorImplTest { public: AuthenticatorImplRequestDelegateTest() {} ~AuthenticatorImplRequestDelegateTest() override {} void TearDown() override { // The |RenderFrameHost| must outlive |AuthenticatorImpl|. authenticator_impl_.reset(); content::RenderViewHostTestHarness::TearDown(); } mojo::Remote<blink::mojom::Authenticator> ConnectToFakeAuthenticator( std::unique_ptr<MockAuthenticatorRequestDelegateObserver> delegate, std::unique_ptr<base::OneShotTimer> timer) { authenticator_impl_.reset(new AuthenticatorImpl( main_rfh(), std::make_unique<FakeAuthenticatorCommon>( main_rfh(), std::move(timer), std::move(delegate)))); mojo::Remote<blink::mojom::Authenticator> authenticator; authenticator_impl_->Bind(authenticator.BindNewPipeAndPassReceiver()); return authenticator; } mojo::Remote<blink::mojom::Authenticator> ConstructFakeAuthenticatorWithTimer( std::unique_ptr<MockAuthenticatorRequestDelegateObserver> delegate, scoped_refptr<base::TestMockTimeTaskRunner> task_runner) { fake_hid_manager_ = std::make_unique<device::FakeFidoHidManager>(); // Set up a timer for testing. auto timer = std::make_unique<base::OneShotTimer>(task_runner->GetMockTickClock()); timer->SetTaskRunner(task_runner); return ConnectToFakeAuthenticator(std::move(delegate), std::move(timer)); } }; TEST_F(AuthenticatorImplRequestDelegateTest, TestRequestDelegateObservesFidoRequestHandler) { EXPECT_CALL(*mock_adapter_, IsPresent()) .WillRepeatedly(::testing::Return(true)); auto discovery_factory = std::make_unique<device::test::FakeFidoDiscoveryFactory>(); auto* fake_ble_discovery = discovery_factory->ForgeNextBleDiscovery(); AuthenticatorEnvironmentImpl::GetInstance() ->ReplaceDefaultDiscoveryFactoryForTesting(std::move(discovery_factory)); SimulateNavigation(GURL(kTestOrigin1)); PublicKeyCredentialRequestOptionsPtr options = GetTestPublicKeyCredentialRequestOptions(); TestGetAssertionCallback callback_receiver; auto task_runner = base::MakeRefCounted<base::TestMockTimeTaskRunner>( base::Time::Now(), base::TimeTicks::Now()); auto mock_delegate = std::make_unique<MockAuthenticatorRequestDelegateObserver>(); auto* const mock_delegate_ptr = mock_delegate.get(); auto authenticator = ConstructFakeAuthenticatorWithTimer( std::move(mock_delegate), task_runner); auto mock_ble_device = device::MockFidoDevice::MakeCtap(); mock_ble_device->StubGetId(); mock_ble_device->SetDeviceTransport( device::FidoTransportProtocol::kBluetoothLowEnergy); const auto device_id = mock_ble_device->GetId(); EXPECT_CALL(*mock_delegate_ptr, OnTransportAvailabilityEnumerated(_)); EXPECT_CALL(*mock_delegate_ptr, EmbedderControlsAuthenticatorDispatch(_)) .WillOnce(testing::Return(true)); base::RunLoop ble_device_found_done; EXPECT_CALL(*mock_delegate_ptr, FidoAuthenticatorAdded(_)) .WillOnce(testing::InvokeWithoutArgs( [&ble_device_found_done]() { ble_device_found_done.Quit(); })); base::RunLoop ble_device_lost_done; EXPECT_CALL(*mock_delegate_ptr, FidoAuthenticatorRemoved(_)) .WillOnce(testing::InvokeWithoutArgs( [&ble_device_lost_done]() { ble_device_lost_done.Quit(); })); authenticator->GetAssertion(std::move(options), callback_receiver.callback()); fake_ble_discovery->WaitForCallToStartAndSimulateSuccess(); fake_ble_discovery->AddDevice(std::move(mock_ble_device)); ble_device_found_done.Run(); fake_ble_discovery->RemoveDevice(device_id); ble_device_lost_done.Run(); base::RunLoop().RunUntilIdle(); } TEST_F(AuthenticatorImplRequestDelegateTest, FailureReasonForTimeout) { // The VirtualFidoAuthenticator simulates a tap immediately after it gets the // request. Replace by the real discovery that will wait until timeout. AuthenticatorEnvironmentImpl::GetInstance() ->ReplaceDefaultDiscoveryFactoryForTesting( std::make_unique<device::FidoDiscoveryFactory>()); SimulateNavigation(GURL(kTestOrigin1)); FailureReasonCallbackReceiver failure_reason_receiver; auto mock_delegate = std::make_unique< ::testing::NiceMock<MockAuthenticatorRequestDelegateObserver>>( failure_reason_receiver.callback()); auto task_runner = base::MakeRefCounted<base::TestMockTimeTaskRunner>( base::Time::Now(), base::TimeTicks::Now()); auto authenticator = ConstructFakeAuthenticatorWithTimer( std::move(mock_delegate), task_runner); TestGetAssertionCallback callback_receiver; authenticator->GetAssertion(GetTestPublicKeyCredentialRequestOptions(), callback_receiver.callback()); base::RunLoop().RunUntilIdle(); task_runner->FastForwardBy(base::TimeDelta::FromMinutes(1)); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); ASSERT_TRUE(failure_reason_receiver.was_called()); EXPECT_EQ(content::AuthenticatorRequestClientDelegate:: InterestingFailureReason::kTimeout, std::get<0>(*failure_reason_receiver.result())); } TEST_F(AuthenticatorImplRequestDelegateTest, FailureReasonForDuplicateRegistration) { SimulateNavigation(GURL(kTestOrigin1)); FailureReasonCallbackReceiver failure_reason_receiver; auto mock_delegate = std::make_unique< ::testing::NiceMock<MockAuthenticatorRequestDelegateObserver>>( failure_reason_receiver.callback()); auto task_runner = base::MakeRefCounted<base::TestMockTimeTaskRunner>( base::Time::Now(), base::TimeTicks::Now()); auto authenticator = ConstructFakeAuthenticatorWithTimer( std::move(mock_delegate), task_runner); PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); options->exclude_credentials = GetTestCredentials(); ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectRegistration( options->exclude_credentials[0].id(), kTestRelyingPartyId)); TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::CREDENTIAL_EXCLUDED, callback_receiver.status()); ASSERT_TRUE(failure_reason_receiver.was_called()); EXPECT_EQ(content::AuthenticatorRequestClientDelegate:: InterestingFailureReason::kKeyAlreadyRegistered, std::get<0>(*failure_reason_receiver.result())); } TEST_F(AuthenticatorImplRequestDelegateTest, FailureReasonForMissingRegistration) { SimulateNavigation(GURL(kTestOrigin1)); FailureReasonCallbackReceiver failure_reason_receiver; auto mock_delegate = std::make_unique< ::testing::NiceMock<MockAuthenticatorRequestDelegateObserver>>( failure_reason_receiver.callback()); auto task_runner = base::MakeRefCounted<base::TestMockTimeTaskRunner>( base::Time::Now(), base::TimeTicks::Now()); auto authenticator = ConstructFakeAuthenticatorWithTimer( std::move(mock_delegate), task_runner); TestGetAssertionCallback callback_receiver; authenticator->GetAssertion(GetTestPublicKeyCredentialRequestOptions(), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); ASSERT_TRUE(failure_reason_receiver.was_called()); EXPECT_EQ(content::AuthenticatorRequestClientDelegate:: InterestingFailureReason::kKeyNotRegistered, std::get<0>(*failure_reason_receiver.result())); } TEST_F(AuthenticatorImplTest, Transports) { NavigateAndCommit(GURL(kTestOrigin1)); mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); for (auto protocol : {device::ProtocolVersion::kU2f, device::ProtocolVersion::kCtap2}) { SCOPED_TRACE(static_cast<int>(protocol)); virtual_device_factory_->SetSupportedProtocol(protocol); for (const auto transport : std::map<device::FidoTransportProtocol, blink::mojom::AuthenticatorTransport>( {{device::FidoTransportProtocol::kUsbHumanInterfaceDevice, blink::mojom::AuthenticatorTransport::USB}, {device::FidoTransportProtocol::kBluetoothLowEnergy, blink::mojom::AuthenticatorTransport::BLE}, {device::FidoTransportProtocol::kNearFieldCommunication, blink::mojom::AuthenticatorTransport::NFC}})) { virtual_device_factory_->SetTransport(transport.first); PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); const std::vector<device::FidoTransportProtocol>& transports( callback_receiver.value()->transports); ASSERT_EQ(1u, transports.size()); EXPECT_EQ(transport.first, transports[0]); } } } TEST_F(AuthenticatorImplTest, ExtensionHMACSecret) { NavigateAndCommit(GURL(kTestOrigin1)); for (const bool include_extension : {false, true}) { SCOPED_TRACE(include_extension); virtual_device_factory_->SetSupportedProtocol( device::ProtocolVersion::kCtap2); mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); options->hmac_create_secret = include_extension; TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); base::Optional<Value> attestation_value = Reader::Read(callback_receiver.value()->attestation_object); ASSERT_TRUE(attestation_value); ASSERT_TRUE(attestation_value->is_map()); const auto& attestation = attestation_value->GetMap(); const auto auth_data_it = attestation.find(Value(device::kAuthDataKey)); ASSERT_TRUE(auth_data_it != attestation.end()); ASSERT_TRUE(auth_data_it->second.is_bytestring()); const std::vector<uint8_t>& auth_data = auth_data_it->second.GetBytestring(); base::Optional<device::AuthenticatorData> parsed_auth_data = device::AuthenticatorData::DecodeAuthenticatorData(auth_data); // The virtual CTAP2 device always echos the hmac-secret extension on // registrations. Therefore, if |hmac_secret| was set above it should be // serialised in the CBOR and correctly passed all the way back around to // the reply's authenticator data. bool has_hmac_secret = false; const auto& extensions = parsed_auth_data->extensions(); if (extensions) { CHECK(extensions->is_map()); const cbor::Value::MapValue& extensions_map = extensions->GetMap(); const auto hmac_secret_it = extensions_map.find(cbor::Value(device::kExtensionHmacSecret)); if (hmac_secret_it != extensions_map.end()) { ASSERT_TRUE(hmac_secret_it->second.is_bool()); EXPECT_TRUE(hmac_secret_it->second.GetBool()); has_hmac_secret = true; } } EXPECT_EQ(include_extension, has_hmac_secret); } } // Tests that for an authenticator that does not support batching, credential // lists get probed silently to work around authenticators rejecting exclude // lists exceeding a certain size. TEST_F(AuthenticatorImplTest, MakeCredentialWithLargeExcludeList) { NavigateAndCommit(GURL(kTestOrigin1)); for (bool has_excluded_credential : {false, true}) { SCOPED_TRACE(::testing::Message() << "has_excluded_credential=" << has_excluded_credential); ResetVirtualDevice(); device::VirtualCtap2Device::Config config; config.reject_large_allow_and_exclude_lists = true; virtual_device_factory_->SetCtap2Config(config); PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); options->exclude_credentials = GetTestCredentials(/*num_credentials=*/10); if (has_excluded_credential) { ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectRegistration( options->exclude_credentials.back().id(), kTestRelyingPartyId)); } TestMakeCredentialCallback callback_receiver; mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); authenticator->MakeCredential(std::move(options), callback_receiver.callback()); base::RunLoop().RunUntilIdle(); callback_receiver.WaitForCallback(); EXPECT_EQ(callback_receiver.status(), has_excluded_credential ? AuthenticatorStatus::CREDENTIAL_EXCLUDED : AuthenticatorStatus::SUCCESS); } } // Tests that for an authenticator that does not support batching, credential // lists get probed silently to work around authenticators rejecting allow lists // exceeding a certain size. TEST_F(AuthenticatorImplTest, GetAssertionWithLargeAllowList) { NavigateAndCommit(GURL(kTestOrigin1)); for (bool has_allowed_credential : {false, true}) { SCOPED_TRACE(::testing::Message() << "has_allowed_credential=" << has_allowed_credential); ResetVirtualDevice(); device::VirtualCtap2Device::Config config; config.reject_large_allow_and_exclude_lists = true; virtual_device_factory_->SetCtap2Config(config); mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); PublicKeyCredentialRequestOptionsPtr options = GetTestPublicKeyCredentialRequestOptions(); options->allow_credentials = GetTestCredentials(/*num_credentials=*/10); if (has_allowed_credential) { ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectRegistration( options->allow_credentials.back().id(), kTestRelyingPartyId)); } TestGetAssertionCallback callback_receiver; authenticator->GetAssertion(std::move(options), callback_receiver.callback()); base::RunLoop().RunUntilIdle(); callback_receiver.WaitForCallback(); EXPECT_EQ(callback_receiver.status(), has_allowed_credential ? AuthenticatorStatus::SUCCESS : AuthenticatorStatus::NOT_ALLOWED_ERROR); } } // Tests that, regardless of batching support, GetAssertion requests with a // single allowed credential ID don't result in a silent probing request. TEST_F(AuthenticatorImplTest, GetAssertionSingleElementAllowListDoesNotProbe) { NavigateAndCommit(GURL(kTestOrigin1)); for (bool supports_batching : {false, true}) { SCOPED_TRACE(::testing::Message() << "supports_batching=" << supports_batching); ResetVirtualDevice(); device::VirtualCtap2Device::Config config; if (supports_batching) { config.max_credential_id_length = kTestCredentialIdLength; config.max_credential_count_in_list = 10; } config.reject_silent_authentication_requests = true; virtual_device_factory_->SetCtap2Config(config); mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); auto test_credentials = GetTestCredentials(/*num_credentials=*/1); ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectRegistration( test_credentials.front().id(), kTestRelyingPartyId)); PublicKeyCredentialRequestOptionsPtr options = GetTestPublicKeyCredentialRequestOptions(); options->allow_credentials = std::move(test_credentials); TestGetAssertionCallback callback_receiver; authenticator->GetAssertion(std::move(options), callback_receiver.callback()); base::RunLoop().RunUntilIdle(); callback_receiver.WaitForCallback(); EXPECT_EQ(callback_receiver.status(), AuthenticatorStatus::SUCCESS); } } // Tests that an allow list that fits into a single batch does not result in a // silent probing request. TEST_F(AuthenticatorImplTest, GetAssertionSingleBatchListDoesNotProbe) { NavigateAndCommit(GURL(kTestOrigin1)); for (bool allow_list_fits_single_batch : {false, true}) { SCOPED_TRACE(::testing::Message() << "allow_list_fits_single_batch=" << allow_list_fits_single_batch); ResetVirtualDevice(); device::VirtualCtap2Device::Config config; config.max_credential_id_length = kTestCredentialIdLength; constexpr size_t kBatchSize = 10; config.max_credential_count_in_list = kBatchSize; config.reject_silent_authentication_requests = true; virtual_device_factory_->SetCtap2Config(config); mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); auto test_credentials = GetTestCredentials( /*num_credentials=*/kBatchSize + (allow_list_fits_single_batch ? 0 : 1)); ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectRegistration( test_credentials.back().id(), kTestRelyingPartyId)); PublicKeyCredentialRequestOptionsPtr options = GetTestPublicKeyCredentialRequestOptions(); options->allow_credentials = std::move(test_credentials); TestGetAssertionCallback callback_receiver; authenticator->GetAssertion(std::move(options), callback_receiver.callback()); base::RunLoop().RunUntilIdle(); callback_receiver.WaitForCallback(); EXPECT_EQ(callback_receiver.status(), allow_list_fits_single_batch ? AuthenticatorStatus::SUCCESS : AuthenticatorStatus::NOT_ALLOWED_ERROR); } } TEST_F(AuthenticatorImplTest, NoUnexpectedAuthenticatorExtensions) { NavigateAndCommit(GURL(kTestOrigin1)); device::VirtualCtap2Device::Config config; config.add_extra_extension = true; virtual_device_factory_->SetCtap2Config(config); mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); // Check that extra authenticator extensions are rejected when creating a // credential. TestMakeCredentialCallback create_callback; authenticator->MakeCredential(GetTestPublicKeyCredentialCreationOptions(), create_callback.callback()); base::RunLoop().RunUntilIdle(); create_callback.WaitForCallback(); EXPECT_EQ(create_callback.status(), AuthenticatorStatus::NOT_ALLOWED_ERROR); // Extensions should also be rejected when getting an assertion. PublicKeyCredentialRequestOptionsPtr assertion_options = GetTestPublicKeyCredentialRequestOptions(); ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectRegistration( assertion_options->allow_credentials.back().id(), kTestRelyingPartyId)); TestGetAssertionCallback assertion_callback; authenticator->GetAssertion(std::move(assertion_options), assertion_callback.callback()); base::RunLoop().RunUntilIdle(); assertion_callback.WaitForCallback(); EXPECT_EQ(assertion_callback.status(), AuthenticatorStatus::NOT_ALLOWED_ERROR); } // Tests that on an authenticator that supports batching, exclude lists that fit // into a single batch are sent without probing. TEST_F(AuthenticatorImplTest, ExcludeListBatching) { NavigateAndCommit(GURL(kTestOrigin1)); for (bool authenticator_has_excluded_credential : {false, true}) { SCOPED_TRACE(::testing::Message() << "authenticator_has_excluded_credential=" << authenticator_has_excluded_credential); ResetVirtualDevice(); device::VirtualCtap2Device::Config config; config.max_credential_id_length = kTestCredentialIdLength; constexpr size_t kBatchSize = 10; config.max_credential_count_in_list = kBatchSize; // Reject silent authentication requests to ensure we are not probing // credentials silently, since the exclude list should fit into a single // batch. config.reject_silent_authentication_requests = true; virtual_device_factory_->SetCtap2Config(config); auto test_credentials = GetTestCredentials(kBatchSize); test_credentials.insert( test_credentials.end() - 1, {device::CredentialType::kPublicKey, std::vector<uint8_t>(kTestCredentialIdLength + 1, 1)}); if (authenticator_has_excluded_credential) { ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectRegistration( test_credentials.back().id(), kTestRelyingPartyId)); } mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); options->exclude_credentials = std::move(test_credentials); TestMakeCredentialCallback callback; authenticator->MakeCredential(std::move(options), callback.callback()); base::RunLoop().RunUntilIdle(); callback.WaitForCallback(); EXPECT_EQ(callback.status(), authenticator_has_excluded_credential ? AuthenticatorStatus::CREDENTIAL_EXCLUDED : AuthenticatorStatus::SUCCESS); } } static constexpr char kTestPIN[] = "1234"; class UVTestAuthenticatorClientDelegate : public AuthenticatorRequestClientDelegate { public: explicit UVTestAuthenticatorClientDelegate(bool* collected_pin) : collected_pin_(collected_pin) { *collected_pin_ = false; } bool SupportsPIN() const override { return true; } void CollectPIN( base::Optional<int> attempts, base::OnceCallback<void(std::string)> provide_pin_cb) override { *collected_pin_ = true; base::SequencedTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::BindOnce(std::move(provide_pin_cb), kTestPIN)); } void FinishCollectToken() override {} private: bool* collected_pin_; }; class UVTestAuthenticatorContentBrowserClient : public ContentBrowserClient { public: std::unique_ptr<AuthenticatorRequestClientDelegate> GetWebAuthenticationRequestDelegate( RenderFrameHost* render_frame_host) override { return std::make_unique<UVTestAuthenticatorClientDelegate>(&collected_pin_); } bool collected_pin() { return collected_pin_; } private: bool collected_pin_; }; class UVAuthenticatorImplTest : public AuthenticatorImplTest { public: UVAuthenticatorImplTest() = default; void SetUp() override { AuthenticatorImplTest::SetUp(); old_client_ = SetBrowserClientForTesting(&test_client_); } void TearDown() override { SetBrowserClientForTesting(old_client_); AuthenticatorImplTest::TearDown(); } protected: static PublicKeyCredentialCreationOptionsPtr make_credential_options( device::UserVerificationRequirement uv = device::UserVerificationRequirement::kRequired) { PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); options->authenticator_selection->SetUserVerificationRequirementForTesting( uv); return options; } static PublicKeyCredentialRequestOptionsPtr get_credential_options( device::UserVerificationRequirement uv = device::UserVerificationRequirement::kRequired) { PublicKeyCredentialRequestOptionsPtr options = GetTestPublicKeyCredentialRequestOptions(); options->user_verification = uv; return options; } static const char* UVToString(device::UserVerificationRequirement uv) { switch (uv) { case device::UserVerificationRequirement::kDiscouraged: return "discouraged"; case device::UserVerificationRequirement::kPreferred: return "preferred"; case device::UserVerificationRequirement::kRequired: return "required"; } } static bool HasUV(const TestMakeCredentialCallback& callback) { DCHECK_EQ(AuthenticatorStatus::SUCCESS, callback.status()); base::Optional<Value> attestation_value = Reader::Read(callback.value()->attestation_object); DCHECK(attestation_value); DCHECK(attestation_value->is_map()); const auto& attestation = attestation_value->GetMap(); const auto auth_data_it = attestation.find(Value("authData")); DCHECK(auth_data_it != attestation.end() && auth_data_it->second.is_bytestring()); base::Optional<device::AuthenticatorData> auth_data = device::AuthenticatorData::DecodeAuthenticatorData( auth_data_it->second.GetBytestring()); return auth_data->obtained_user_verification(); } static bool HasUV(const TestGetAssertionCallback& callback) { DCHECK_EQ(AuthenticatorStatus::SUCCESS, callback.status()); base::Optional<device::AuthenticatorData> auth_data = device::AuthenticatorData::DecodeAuthenticatorData( callback.value()->authenticator_data); return auth_data->obtained_user_verification(); } UVTestAuthenticatorContentBrowserClient test_client_; private: ContentBrowserClient* old_client_ = nullptr; DISALLOW_COPY_AND_ASSIGN(UVAuthenticatorImplTest); }; // PINList is a list of expected |attempts| values and the PIN to answer with. using PINList = std::list<std::pair<base::Optional<int>, std::string>>; class PINTestAuthenticatorRequestDelegate : public AuthenticatorRequestClientDelegate { public: explicit PINTestAuthenticatorRequestDelegate( bool supports_pin, const PINList& pins, base::Optional<InterestingFailureReason>* failure_reason) : supports_pin_(supports_pin), expected_(pins), failure_reason_(failure_reason) {} ~PINTestAuthenticatorRequestDelegate() override { DCHECK(expected_.empty()); } bool SupportsPIN() const override { return supports_pin_; } void CollectPIN( base::Optional<int> attempts, base::OnceCallback<void(std::string)> provide_pin_cb) override { DCHECK(supports_pin_); DCHECK(!expected_.empty()); DCHECK(attempts == expected_.front().first) << "got: " << attempts.value_or(-1) << " expected: " << expected_.front().first.value_or(-1); std::string pin = std::move(expected_.front().second); expected_.pop_front(); base::SequencedTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::BindOnce(std::move(provide_pin_cb), std::move(pin))); } void FinishCollectToken() override {} bool DoesBlockRequestOnFailure(InterestingFailureReason reason) override { *failure_reason_ = reason; return AuthenticatorRequestClientDelegate::DoesBlockRequestOnFailure( reason); } private: const bool supports_pin_; PINList expected_; base::Optional<InterestingFailureReason>* const failure_reason_; DISALLOW_COPY_AND_ASSIGN(PINTestAuthenticatorRequestDelegate); }; class PINTestAuthenticatorContentBrowserClient : public ContentBrowserClient { public: std::unique_ptr<AuthenticatorRequestClientDelegate> GetWebAuthenticationRequestDelegate( RenderFrameHost* render_frame_host) override { return std::make_unique<PINTestAuthenticatorRequestDelegate>( supports_pin, expected, &failure_reason); } bool supports_pin = true; PINList expected; base::Optional<InterestingFailureReason> failure_reason; }; class PINAuthenticatorImplTest : public UVAuthenticatorImplTest { public: PINAuthenticatorImplTest() = default; void SetUp() override { UVAuthenticatorImplTest::SetUp(); old_client_ = SetBrowserClientForTesting(&test_client_); device::VirtualCtap2Device::Config config; config.pin_support = true; virtual_device_factory_->SetCtap2Config(config); NavigateAndCommit(GURL(kTestOrigin1)); } void TearDown() override { SetBrowserClientForTesting(old_client_); AuthenticatorImplTest::TearDown(); } protected: PINTestAuthenticatorContentBrowserClient test_client_; // An enumerate of outcomes for PIN tests. enum { kFailure, kNoPIN, kSetPIN, kUsePIN, }; void ConfigureVirtualDevice(int support_level) { device::VirtualCtap2Device::Config config; switch (support_level) { case 0: // No support. config.pin_support = false; virtual_device_factory_->mutable_state()->pin = ""; virtual_device_factory_->mutable_state()->pin_retries = 0; break; case 1: // PIN supported, but no PIN set. config.pin_support = true; virtual_device_factory_->mutable_state()->pin = ""; virtual_device_factory_->mutable_state()->pin_retries = 0; break; case 2: // PIN set. config.pin_support = true; virtual_device_factory_->mutable_state()->pin = kTestPIN; virtual_device_factory_->mutable_state()->pin_retries = device::kMaxPinRetries; break; default: NOTREACHED(); } virtual_device_factory_->SetCtap2Config(config); } private: ContentBrowserClient* old_client_ = nullptr; DISALLOW_COPY_AND_ASSIGN(PINAuthenticatorImplTest); }; static constexpr device::UserVerificationRequirement kUVLevel[3] = { device::UserVerificationRequirement::kDiscouraged, device::UserVerificationRequirement::kPreferred, device::UserVerificationRequirement::kRequired, }; static const char* kUVDescription[3] = {"discouraged", "preferred", "required"}; static const char* kPINSupportDescription[3] = {"no PIN support", "PIN not set", "PIN set"}; TEST_F(PINAuthenticatorImplTest, MakeCredential) { typedef int Expectations[3][3]; // kExpectedWithUISupport enumerates the expected behaviour when the embedder // supports prompting the user for a PIN. // clang-format off const Expectations kExpectedWithUISupport = { // discouraged | preferred | required /* No support */ { kNoPIN, kNoPIN, kFailure }, /* PIN not set */ { kNoPIN, kNoPIN, kSetPIN }, /* PIN set */ { kUsePIN, kUsePIN, kUsePIN }, // ^ // | // VirtualCtap2Device cannot fall back to U2F. }; // clang-format on // kExpectedWithoutUISupport enumerates the expected behaviour when the // embedder cannot prompt the user for a PIN. // clang-format off const Expectations kExpectedWithoutUISupport = { // discouraged | preferred | required /* No support */ { kNoPIN, kNoPIN, kFailure }, /* PIN not set */ { kNoPIN, kNoPIN, kFailure }, /* PIN set */ { kFailure, kFailure, kFailure }, // ^ ^ // | | // VirtualCtap2Device cannot fall back to U2F and // a PIN is required to create credentials once set // in CTAP 2.0. }; // clang-format on for (bool ui_support : {false, true}) { SCOPED_TRACE(::testing::Message() << "ui_support=" << ui_support); const Expectations& expected = ui_support ? kExpectedWithUISupport : kExpectedWithoutUISupport; test_client_.supports_pin = ui_support; for (int support_level = 0; support_level <= 2; support_level++) { SCOPED_TRACE(kPINSupportDescription[support_level]); ConfigureVirtualDevice(support_level); for (int uv_level = 0; uv_level <= 2; uv_level++) { SCOPED_TRACE(kUVDescription[uv_level]); switch (expected[support_level][uv_level]) { case kNoPIN: case kFailure: // There shouldn't be any PIN prompts. test_client_.expected.clear(); break; case kSetPIN: // A single PIN prompt to set a PIN is expected. test_client_.expected = {{base::nullopt, kTestPIN}}; break; case kUsePIN: // A single PIN prompt to get the PIN is expected. test_client_.expected = {{8, kTestPIN}}; break; default: NOTREACHED(); } mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential( make_credential_options(kUVLevel[uv_level]), callback_receiver.callback()); callback_receiver.WaitForCallback(); switch (expected[support_level][uv_level]) { case kFailure: EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); break; case kNoPIN: EXPECT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); EXPECT_EQ("", virtual_device_factory_->mutable_state()->pin); EXPECT_FALSE(HasUV(callback_receiver)); break; case kSetPIN: case kUsePIN: EXPECT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); EXPECT_EQ(kTestPIN, virtual_device_factory_->mutable_state()->pin); EXPECT_TRUE(HasUV(callback_receiver)); break; default: NOTREACHED(); } } } } } TEST_F(PINAuthenticatorImplTest, MakeCredentialSoftLock) { virtual_device_factory_->mutable_state()->pin = kTestPIN; virtual_device_factory_->mutable_state()->pin_retries = device::kMaxPinRetries; test_client_.expected = {{8, "wrong"}, {7, "wrong"}, {6, "wrong"}}; mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(make_credential_options(), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); EXPECT_EQ(5, virtual_device_factory_->mutable_state()->pin_retries); EXPECT_TRUE(virtual_device_factory_->mutable_state()->soft_locked); ASSERT_TRUE(test_client_.failure_reason.has_value()); EXPECT_EQ(InterestingFailureReason::kSoftPINBlock, *test_client_.failure_reason); } TEST_F(PINAuthenticatorImplTest, MakeCredentialHardLock) { virtual_device_factory_->mutable_state()->pin = kTestPIN; virtual_device_factory_->mutable_state()->pin_retries = 1; test_client_.expected = {{1, "wrong"}}; mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(make_credential_options(), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); EXPECT_EQ(0, virtual_device_factory_->mutable_state()->pin_retries); ASSERT_TRUE(test_client_.failure_reason.has_value()); EXPECT_EQ(InterestingFailureReason::kHardPINBlock, *test_client_.failure_reason); } TEST_F(PINAuthenticatorImplTest, GetAssertion) { typedef int Expectations[3][3]; // kExpectedWithUISupport enumerates the expected behaviour when the embedder // supports prompting the user for a PIN. // clang-format off const Expectations kExpectedWithUISupport = { // discouraged | preferred | required /* No support */ { kNoPIN, kNoPIN, kFailure }, /* PIN not set */ { kNoPIN, kNoPIN, kFailure }, /* PIN set */ { kNoPIN, kUsePIN, kUsePIN }, }; // clang-format on // kExpectedWithoutUISupport enumerates the expected behaviour when the // embedder cannot prompt the user for a PIN. // clang-format off const Expectations kExpectedWithoutUISupport = { // discouraged | preferred | required /* No support */ { kNoPIN, kNoPIN, kFailure }, /* PIN not set */ { kNoPIN, kNoPIN, kFailure }, /* PIN set */ { kNoPIN, kNoPIN, kFailure }, }; // clang-format on PublicKeyCredentialRequestOptionsPtr dummy_options = get_credential_options(); ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectRegistration( dummy_options->allow_credentials[0].id(), kTestRelyingPartyId)); for (bool ui_support : {false, true}) { SCOPED_TRACE(::testing::Message() << "ui_support=" << ui_support); const Expectations& expected = ui_support ? kExpectedWithUISupport : kExpectedWithoutUISupport; test_client_.supports_pin = ui_support; for (int support_level = 0; support_level <= 2; support_level++) { SCOPED_TRACE(kPINSupportDescription[support_level]); ConfigureVirtualDevice(support_level); for (int uv_level = 0; uv_level <= 2; uv_level++) { SCOPED_TRACE(kUVDescription[uv_level]); switch (expected[support_level][uv_level]) { case kNoPIN: case kFailure: // No PIN prompts are expected. test_client_.expected.clear(); break; case kUsePIN: // A single prompt to get the PIN is expected. test_client_.expected = {{8, kTestPIN}}; break; default: NOTREACHED(); } mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); TestGetAssertionCallback callback_receiver; authenticator->GetAssertion(get_credential_options(kUVLevel[uv_level]), callback_receiver.callback()); callback_receiver.WaitForCallback(); switch (expected[support_level][uv_level]) { case kFailure: EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); break; case kNoPIN: EXPECT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); EXPECT_FALSE(HasUV(callback_receiver)); break; case kUsePIN: EXPECT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); EXPECT_EQ(kTestPIN, virtual_device_factory_->mutable_state()->pin); EXPECT_TRUE(HasUV(callback_receiver)); break; default: NOTREACHED(); } } } } } TEST_F(PINAuthenticatorImplTest, GetAssertionSoftLock) { virtual_device_factory_->mutable_state()->pin = kTestPIN; virtual_device_factory_->mutable_state()->pin_retries = device::kMaxPinRetries; PublicKeyCredentialRequestOptionsPtr options = get_credential_options(); ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectRegistration( options->allow_credentials[0].id(), kTestRelyingPartyId)); test_client_.expected = {{8, "wrong"}, {7, "wrong"}, {6, "wrong"}}; mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); TestGetAssertionCallback callback_receiver; authenticator->GetAssertion(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); EXPECT_EQ(5, virtual_device_factory_->mutable_state()->pin_retries); EXPECT_TRUE(virtual_device_factory_->mutable_state()->soft_locked); ASSERT_TRUE(test_client_.failure_reason.has_value()); EXPECT_EQ(InterestingFailureReason::kSoftPINBlock, *test_client_.failure_reason); } TEST_F(PINAuthenticatorImplTest, GetAssertionHardLock) { virtual_device_factory_->mutable_state()->pin = kTestPIN; virtual_device_factory_->mutable_state()->pin_retries = 1; PublicKeyCredentialRequestOptionsPtr options = get_credential_options(); ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectRegistration( options->allow_credentials[0].id(), kTestRelyingPartyId)); test_client_.expected = {{1, "wrong"}}; mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); TestGetAssertionCallback callback_receiver; authenticator->GetAssertion(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); EXPECT_EQ(0, virtual_device_factory_->mutable_state()->pin_retries); ASSERT_TRUE(test_client_.failure_reason.has_value()); EXPECT_EQ(InterestingFailureReason::kHardPINBlock, *test_client_.failure_reason); } class InternalUVAuthenticatorImplTest : public UVAuthenticatorImplTest { public: struct TestCase { const bool fingerprints_enrolled; const bool supports_pin; const device::UserVerificationRequirement uv; }; InternalUVAuthenticatorImplTest() = default; void SetUp() override { UVAuthenticatorImplTest::SetUp(); NavigateAndCommit(GURL(kTestOrigin1)); } std::vector<TestCase> GetTestCases() { std::vector<TestCase> test_cases; for (const bool fingerprints_enrolled : {true, false}) { for (const bool supports_pin : {true, false}) { // Avoid just testing for PIN. if (!fingerprints_enrolled && supports_pin) continue; for (const auto uv : {device::UserVerificationRequirement::kDiscouraged, device::UserVerificationRequirement::kPreferred, device::UserVerificationRequirement::kRequired}) { test_cases.push_back({fingerprints_enrolled, supports_pin, uv}); } } } return test_cases; } void ConfigureDevice(const TestCase& test_case) { device::VirtualCtap2Device::Config config; config.internal_uv_support = true; config.u2f_support = true; config.pin_support = test_case.supports_pin; virtual_device_factory_->mutable_state()->pin = kTestPIN; virtual_device_factory_->mutable_state()->pin_retries = device::kMaxPinRetries; virtual_device_factory_->mutable_state()->fingerprints_enrolled = test_case.fingerprints_enrolled; virtual_device_factory_->SetCtap2Config(config); SCOPED_TRACE(::testing::Message() << "fingerprints_enrolled=" << test_case.fingerprints_enrolled); SCOPED_TRACE(::testing::Message() << "supports_pin=" << test_case.supports_pin); SCOPED_TRACE(UVToString(test_case.uv)); } private: DISALLOW_COPY_AND_ASSIGN(InternalUVAuthenticatorImplTest); }; TEST_F(InternalUVAuthenticatorImplTest, MakeCredential) { mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); for (const auto test_case : GetTestCases()) { ConfigureDevice(test_case); auto options = make_credential_options(test_case.uv); // UV cannot be satisfied without fingerprints. const bool should_timeout = !test_case.fingerprints_enrolled && test_case.uv == device::UserVerificationRequirement::kRequired; if (should_timeout) { options->timeout = base::TimeDelta::FromMilliseconds(100); } TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); if (should_timeout) { EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); } else { EXPECT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); EXPECT_EQ(test_case.fingerprints_enrolled, HasUV(callback_receiver)); } } } // Test falling back to PIN for devices that support internal user verification // but not uv token. TEST_F(InternalUVAuthenticatorImplTest, MakeCredentialFallBackToPin) { mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); device::VirtualCtap2Device::Config config; config.internal_uv_support = true; config.pin_support = true; config.user_verification_succeeds = false; virtual_device_factory_->mutable_state()->pin = kTestPIN; virtual_device_factory_->mutable_state()->pin_retries = device::kMaxPinRetries; virtual_device_factory_->mutable_state()->fingerprints_enrolled = true; virtual_device_factory_->SetCtap2Config(config); auto options = make_credential_options(device::UserVerificationRequirement::kRequired); TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); EXPECT_TRUE(HasUV(callback_receiver)); EXPECT_TRUE(test_client_.collected_pin()); } TEST_F(InternalUVAuthenticatorImplTest, MakeCredentialCryptotoken) { auto task_runner = base::MakeRefCounted<base::TestMockTimeTaskRunner>( base::Time::Now(), base::TimeTicks::Now()); auto authenticator = ConstructAuthenticatorWithTimer(task_runner); OverrideLastCommittedOrigin(main_rfh(), url::Origin::Create(GURL(kCryptotokenOrigin))); for (const auto fingerprints_enrolled : {false, true}) { SCOPED_TRACE(::testing::Message() << "fingerprints_enrolled=" << fingerprints_enrolled); virtual_device_factory_->mutable_state()->fingerprints_enrolled = fingerprints_enrolled; TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential( make_credential_options( device::UserVerificationRequirement::kPreferred), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); // The credential should have been created over U2F. for (const auto& registration : virtual_device_factory_->mutable_state()->registrations) { EXPECT_TRUE(registration.second.is_u2f); } } } TEST_F(InternalUVAuthenticatorImplTest, GetAssertion) { mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectRegistration( get_credential_options()->allow_credentials[0].id(), kTestRelyingPartyId)); for (const auto test_case : GetTestCases()) { ConfigureDevice(test_case); auto options = get_credential_options(test_case.uv); // Without a fingerprint enrolled we assume that a UV=required request // cannot be satisfied by an authenticator that cannot do UV. It is // possible for a credential to be created without UV and then later // asserted with UV=required, but that would be bizarre behaviour from // an RP and we currently don't worry about it. const bool should_be_unrecognized = !test_case.fingerprints_enrolled && test_case.uv == device::UserVerificationRequirement::kRequired; TestGetAssertionCallback callback_receiver; authenticator->GetAssertion(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); if (should_be_unrecognized) { EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); } else { EXPECT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); EXPECT_EQ( test_case.fingerprints_enrolled && test_case.uv != device::UserVerificationRequirement::kDiscouraged, HasUV(callback_receiver)); } } } // Test falling back to PIN for devices that support internal user verification // but not uv token. TEST_F(InternalUVAuthenticatorImplTest, GetAssertionFallbackToPIN) { mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); device::VirtualCtap2Device::Config config; config.internal_uv_support = true; config.pin_support = true; config.user_verification_succeeds = false; virtual_device_factory_->mutable_state()->pin = kTestPIN; virtual_device_factory_->mutable_state()->pin_retries = device::kMaxPinRetries; virtual_device_factory_->mutable_state()->fingerprints_enrolled = true; virtual_device_factory_->SetCtap2Config(config); ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectRegistration( get_credential_options()->allow_credentials[0].id(), kTestRelyingPartyId)); auto options = get_credential_options(device::UserVerificationRequirement::kRequired); TestGetAssertionCallback callback_receiver; authenticator->GetAssertion(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); EXPECT_TRUE(HasUV(callback_receiver)); EXPECT_TRUE(test_client_.collected_pin()); } TEST_F(InternalUVAuthenticatorImplTest, GetAssertionCryptotoken) { mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); OverrideLastCommittedOrigin(main_rfh(), url::Origin::Create(GURL(kCryptotokenOrigin))); ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectRegistration( get_credential_options()->allow_credentials[0].id(), kTestRelyingPartyId)); for (const auto fingerprints_enrolled : {false, true}) { SCOPED_TRACE(::testing::Message() << "fingerprints_enrolled=" << fingerprints_enrolled); virtual_device_factory_->mutable_state()->fingerprints_enrolled = fingerprints_enrolled; TestGetAssertionCallback callback_receiver; authenticator->GetAssertion( get_credential_options(device::UserVerificationRequirement::kPreferred), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); } } class UVTokenAuthenticatorImplTest : public UVAuthenticatorImplTest { public: UVTokenAuthenticatorImplTest() = default; UVTokenAuthenticatorImplTest(const UVTokenAuthenticatorImplTest&) = delete; void SetUp() override { UVAuthenticatorImplTest::SetUp(); device::VirtualCtap2Device::Config config; config.internal_uv_support = true; config.uv_token_support = true; virtual_device_factory_->SetCtap2Config(config); NavigateAndCommit(GURL(kTestOrigin1)); } }; TEST_F(UVTokenAuthenticatorImplTest, GetAssertionUVToken) { mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectRegistration( get_credential_options()->allow_credentials[0].id(), kTestRelyingPartyId)); for (const auto fingerprints_enrolled : {false, true}) { SCOPED_TRACE(::testing::Message() << "fingerprints_enrolled=" << fingerprints_enrolled); virtual_device_factory_->mutable_state()->fingerprints_enrolled = fingerprints_enrolled; for (auto uv : {device::UserVerificationRequirement::kDiscouraged, device::UserVerificationRequirement::kPreferred, device::UserVerificationRequirement::kRequired}) { SCOPED_TRACE(UVToString(uv)); auto options = get_credential_options(uv); // Without a fingerprint enrolled we assume that a UV=required request // cannot be satisfied by an authenticator that cannot do UV. It is // possible for a credential to be created without UV and then later // asserted with UV=required, but that would be bizarre behaviour from // an RP and we currently don't worry about it. const bool should_be_unrecognized = !fingerprints_enrolled && uv == device::UserVerificationRequirement::kRequired; TestGetAssertionCallback callback_receiver; authenticator->GetAssertion(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); if (should_be_unrecognized) { EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); } else { EXPECT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); EXPECT_EQ(fingerprints_enrolled && uv != device::UserVerificationRequirement::kDiscouraged, HasUV(callback_receiver)); } } } } // Test exhausting all internal user verification attempts on an authenticator // that does not support PINs. TEST_F(UVTokenAuthenticatorImplTest, GetAssertionUvFails) { mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); device::VirtualCtap2Device::Config config; config.internal_uv_support = true; config.uv_token_support = true; config.user_verification_succeeds = false; config.pin_support = false; virtual_device_factory_->SetCtap2Config(config); virtual_device_factory_->mutable_state()->fingerprints_enrolled = true; ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectRegistration( get_credential_options()->allow_credentials[0].id(), kTestRelyingPartyId)); int expected_retries = 5; virtual_device_factory_->mutable_state()->uv_retries = expected_retries; virtual_device_factory_->mutable_state()->simulate_press_callback = base::BindLambdaForTesting([&](device::VirtualFidoDevice* device) { EXPECT_EQ(--expected_retries, virtual_device_factory_->mutable_state()->uv_retries); return true; }); auto options = get_credential_options(); TestGetAssertionCallback callback_receiver; authenticator->GetAssertion(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(0, expected_retries); EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); } // Test exhausting all internal user verification attempts on an authenticator // that supports PINs. TEST_F(UVTokenAuthenticatorImplTest, GetAssertionFallBackToPin) { mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); device::VirtualCtap2Device::Config config; config.internal_uv_support = true; config.uv_token_support = true; config.user_verification_succeeds = false; config.pin_support = true; virtual_device_factory_->SetCtap2Config(config); virtual_device_factory_->mutable_state()->fingerprints_enrolled = true; virtual_device_factory_->mutable_state()->pin = kTestPIN; ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectRegistration( get_credential_options()->allow_credentials[0].id(), kTestRelyingPartyId)); int expected_retries = 5; virtual_device_factory_->mutable_state()->uv_retries = expected_retries; virtual_device_factory_->mutable_state()->simulate_press_callback = base::BindLambdaForTesting([&](device::VirtualFidoDevice* device) { EXPECT_EQ(--expected_retries, virtual_device_factory_->mutable_state()->uv_retries); return true; }); auto options = get_credential_options(); TestGetAssertionCallback callback_receiver; authenticator->GetAssertion(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(0, expected_retries); EXPECT_TRUE(test_client_.collected_pin()); EXPECT_EQ(5, virtual_device_factory_->mutable_state()->uv_retries); EXPECT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); } TEST_F(UVTokenAuthenticatorImplTest, MakeCredentialUVToken) { mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); for (const auto fingerprints_enrolled : {false, true}) { SCOPED_TRACE(::testing::Message() << "fingerprints_enrolled=" << fingerprints_enrolled); virtual_device_factory_->mutable_state()->fingerprints_enrolled = fingerprints_enrolled; for (const auto uv : {device::UserVerificationRequirement::kDiscouraged, device::UserVerificationRequirement::kPreferred, device::UserVerificationRequirement::kRequired}) { SCOPED_TRACE(UVToString(uv)); auto options = make_credential_options(uv); // UV cannot be satisfied without fingerprints. const bool should_timeout = !fingerprints_enrolled && uv == device::UserVerificationRequirement::kRequired; if (should_timeout) { options->timeout = base::TimeDelta::FromMilliseconds(100); } TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); if (should_timeout) { EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); } else { EXPECT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); EXPECT_EQ(fingerprints_enrolled, HasUV(callback_receiver)); } } } } // Test exhausting all internal user verification attempts on an authenticator // that does not support PINs. TEST_F(UVTokenAuthenticatorImplTest, MakeCredentialUvFails) { mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); device::VirtualCtap2Device::Config config; config.internal_uv_support = true; config.uv_token_support = true; config.user_verification_succeeds = false; config.pin_support = false; virtual_device_factory_->SetCtap2Config(config); virtual_device_factory_->mutable_state()->fingerprints_enrolled = true; ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectRegistration( get_credential_options()->allow_credentials[0].id(), kTestRelyingPartyId)); int expected_retries = 5; virtual_device_factory_->mutable_state()->uv_retries = expected_retries; virtual_device_factory_->mutable_state()->simulate_press_callback = base::BindLambdaForTesting([&](device::VirtualFidoDevice* device) { EXPECT_EQ(--expected_retries, virtual_device_factory_->mutable_state()->uv_retries); return true; }); auto options = make_credential_options(); TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(0, expected_retries); EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); } // Test exhausting all internal user verification attempts on an authenticator // that supports PINs. TEST_F(UVTokenAuthenticatorImplTest, MakeCredentialFallBackToPin) { mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); device::VirtualCtap2Device::Config config; config.internal_uv_support = true; config.uv_token_support = true; config.user_verification_succeeds = false; config.pin_support = true; virtual_device_factory_->SetCtap2Config(config); virtual_device_factory_->mutable_state()->fingerprints_enrolled = true; virtual_device_factory_->mutable_state()->pin = kTestPIN; ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectRegistration( get_credential_options()->allow_credentials[0].id(), kTestRelyingPartyId)); int expected_retries = 5; virtual_device_factory_->mutable_state()->uv_retries = expected_retries; virtual_device_factory_->mutable_state()->simulate_press_callback = base::BindLambdaForTesting([&](device::VirtualFidoDevice* device) { EXPECT_EQ(--expected_retries, virtual_device_factory_->mutable_state()->uv_retries); return true; }); auto options = make_credential_options(); TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(0, expected_retries); EXPECT_TRUE(test_client_.collected_pin()); EXPECT_EQ(5, virtual_device_factory_->mutable_state()->uv_retries); EXPECT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); } // ResidentKeyTestAuthenticatorRequestDelegate is a delegate that: // a) always returns |kTestPIN| when asked for a PIN. // b) sorts potential resident-key accounts by user ID, maps them to a string // form ("<hex user ID>:<user name>:<display name>"), joins the strings // with "/", and compares the result against |expected_accounts|. // c) auto-selects the account with the user ID matching |selected_user_id|. class ResidentKeyTestAuthenticatorRequestDelegate : public AuthenticatorRequestClientDelegate { public: ResidentKeyTestAuthenticatorRequestDelegate( std::string expected_accounts, std::vector<uint8_t> selected_user_id, bool* might_create_resident_credential, base::Optional<InterestingFailureReason>* failure_reason) : expected_accounts_(expected_accounts), selected_user_id_(selected_user_id), might_create_resident_credential_(might_create_resident_credential), failure_reason_(failure_reason) {} bool SupportsPIN() const override { return true; } void CollectPIN( base::Optional<int> attempts, base::OnceCallback<void(std::string)> provide_pin_cb) override { base::SequencedTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::BindOnce(std::move(provide_pin_cb), kTestPIN)); } void FinishCollectToken() override {} bool SupportsResidentKeys() override { return true; } void SelectAccount( std::vector<device::AuthenticatorGetAssertionResponse> responses, base::OnceCallback<void(device::AuthenticatorGetAssertionResponse)> callback) override { std::sort(responses.begin(), responses.end(), [](const device::AuthenticatorGetAssertionResponse& a, const device::AuthenticatorGetAssertionResponse& b) { return a.user_entity()->id < b.user_entity()->id; }); std::vector<std::string> string_reps; std::transform( responses.begin(), responses.end(), std::back_inserter(string_reps), [](const device::AuthenticatorGetAssertionResponse& response) { const device::PublicKeyCredentialUserEntity& user = response.user_entity().value(); return base::HexEncode(user.id.data(), user.id.size()) + ":" + user.name.value_or("") + ":" + user.display_name.value_or(""); }); EXPECT_EQ(expected_accounts_, base::JoinString(string_reps, "/")); const auto selected = std::find_if( responses.begin(), responses.end(), [this](const device::AuthenticatorGetAssertionResponse& response) { return response.user_entity()->id == selected_user_id_; }); ASSERT_TRUE(selected != responses.end()); base::SequencedTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::BindOnce(std::move(callback), std::move(*selected))); } void SetMightCreateResidentCredential(bool v) override { *might_create_resident_credential_ = v; } bool DoesBlockRequestOnFailure(InterestingFailureReason reason) override { *failure_reason_ = reason; return AuthenticatorRequestClientDelegate::DoesBlockRequestOnFailure( reason); } private: const std::string expected_accounts_; const std::vector<uint8_t> selected_user_id_; bool* const might_create_resident_credential_; base::Optional<InterestingFailureReason>* const failure_reason_; DISALLOW_COPY_AND_ASSIGN(ResidentKeyTestAuthenticatorRequestDelegate); }; class ResidentKeyTestAuthenticatorContentBrowserClient : public ContentBrowserClient { public: std::unique_ptr<AuthenticatorRequestClientDelegate> GetWebAuthenticationRequestDelegate( RenderFrameHost* render_frame_host) override { return std::make_unique<ResidentKeyTestAuthenticatorRequestDelegate>( expected_accounts, selected_user_id, &might_create_resident_credential, &failure_reason); } std::string expected_accounts; std::vector<uint8_t> selected_user_id; bool might_create_resident_credential = false; base::Optional<AuthenticatorRequestClientDelegate::InterestingFailureReason> failure_reason; }; class ResidentKeyAuthenticatorImplTest : public UVAuthenticatorImplTest { public: ResidentKeyAuthenticatorImplTest() = default; void SetUp() override { UVAuthenticatorImplTest::SetUp(); old_client_ = SetBrowserClientForTesting(&test_client_); device::VirtualCtap2Device::Config config; config.pin_support = true; config.resident_key_support = true; virtual_device_factory_->SetCtap2Config(config); virtual_device_factory_->mutable_state()->pin = kTestPIN; virtual_device_factory_->mutable_state()->pin_retries = device::kMaxPinRetries; NavigateAndCommit(GURL(kTestOrigin1)); } void TearDown() override { SetBrowserClientForTesting(old_client_); AuthenticatorImplTest::TearDown(); } protected: ResidentKeyTestAuthenticatorContentBrowserClient test_client_; static PublicKeyCredentialCreationOptionsPtr make_credential_options() { PublicKeyCredentialCreationOptionsPtr options = UVAuthenticatorImplTest::make_credential_options(); options->authenticator_selection->SetRequireResidentKeyForTesting(true); options->user.id = {1, 2, 3, 4}; return options; } static PublicKeyCredentialRequestOptionsPtr get_credential_options() { PublicKeyCredentialRequestOptionsPtr options = UVAuthenticatorImplTest::get_credential_options(); options->allow_credentials.clear(); return options; } private: ContentBrowserClient* old_client_ = nullptr; DISALLOW_COPY_AND_ASSIGN(ResidentKeyAuthenticatorImplTest); }; TEST_F(ResidentKeyAuthenticatorImplTest, MakeCredential) { mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); for (const bool internal_uv : {false, true}) { SCOPED_TRACE(::testing::Message() << "internal_uv=" << internal_uv); test_client_.might_create_resident_credential = false; if (internal_uv) { device::VirtualCtap2Device::Config config; config.resident_key_support = true; config.internal_uv_support = true; virtual_device_factory_->SetCtap2Config(config); virtual_device_factory_->mutable_state()->fingerprints_enrolled = true; } TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(make_credential_options(), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); EXPECT_TRUE(test_client_.might_create_resident_credential); EXPECT_TRUE(HasUV(callback_receiver)); ASSERT_EQ(1u, virtual_device_factory_->mutable_state()->registrations.size()); const device::VirtualFidoDevice::RegistrationData& registration = virtual_device_factory_->mutable_state()->registrations.begin()->second; EXPECT_TRUE(registration.is_resident); ASSERT_TRUE(registration.user.has_value()); const auto options = make_credential_options(); EXPECT_EQ(options->user.name, registration.user->name); EXPECT_EQ(options->user.display_name, registration.user->display_name); EXPECT_EQ(options->user.id, registration.user->id); EXPECT_EQ(options->user.icon_url, registration.user->icon_url); } } TEST_F(ResidentKeyAuthenticatorImplTest, StorageFull) { mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); device::VirtualCtap2Device::Config config; config.resident_key_support = true; config.internal_uv_support = true; config.resident_credential_storage = 1; virtual_device_factory_->SetCtap2Config(config); virtual_device_factory_->mutable_state()->fingerprints_enrolled = true; // Add a resident key to fill the authenticator. ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectResidentKey( /*credential_id=*/{{4, 3, 2, 1}}, kTestRelyingPartyId, /*user_id=*/{{1, 1, 1, 1}}, "test@example.com", "Test User")); TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(make_credential_options(), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); ASSERT_TRUE(test_client_.failure_reason.has_value()); EXPECT_EQ(AuthenticatorRequestClientDelegate::InterestingFailureReason:: kStorageFull, test_client_.failure_reason); } TEST_F(ResidentKeyAuthenticatorImplTest, GetAssertionSingleNoPII) { ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectResidentKey( /*credential_id=*/{{4, 3, 2, 1}}, kTestRelyingPartyId, /*user_id=*/{{1, 2, 3, 4}}, base::nullopt, base::nullopt)); mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); TestGetAssertionCallback callback_receiver; // |SelectAccount| should not be called when there's only a single response // with no identifying user info because the UI is bad in that case: we can // only display the single choice of "Unknown user". test_client_.expected_accounts = "<invalid>"; authenticator->GetAssertion(get_credential_options(), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); EXPECT_TRUE(HasUV(callback_receiver)); } TEST_F(ResidentKeyAuthenticatorImplTest, GetAssertionSingleWithPII) { ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectResidentKey( /*credential_id=*/{{4, 3, 2, 1}}, kTestRelyingPartyId, /*user_id=*/{{1, 2, 3, 4}}, base::nullopt, "Test User")); mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); TestGetAssertionCallback callback_receiver; // |SelectAccount| should be called when PII is available. test_client_.expected_accounts = "01020304::Test User"; test_client_.selected_user_id = {1, 2, 3, 4}; authenticator->GetAssertion(get_credential_options(), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); EXPECT_TRUE(HasUV(callback_receiver)); } TEST_F(ResidentKeyAuthenticatorImplTest, GetAssertionMulti) { ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectResidentKey( /*credential_id=*/{{4, 3, 2, 1}}, kTestRelyingPartyId, /*user_id=*/{{1, 2, 3, 4}}, "test@example.com", "Test User")); ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectResidentKey( /*credential_id=*/{{4, 3, 2, 2}}, kTestRelyingPartyId, /*user_id=*/{{5, 6, 7, 8}}, "test2@example.com", "Test User 2")); mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); TestGetAssertionCallback callback_receiver; test_client_.expected_accounts = "01020304:test@example.com:Test User/" "05060708:test2@example.com:Test User 2"; test_client_.selected_user_id = {1, 2, 3, 4}; authenticator->GetAssertion(get_credential_options(), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); EXPECT_TRUE(HasUV(callback_receiver)); } TEST_F(ResidentKeyAuthenticatorImplTest, GetAssertionUVDiscouraged) { device::VirtualCtap2Device::Config config; config.resident_key_support = true; config.internal_uv_support = true; config.u2f_support = true; virtual_device_factory_->SetCtap2Config(config); virtual_device_factory_->mutable_state()->fingerprints_enrolled = true; ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectResidentKey( /*credential_id=*/{{4, 3, 2, 1}}, kTestRelyingPartyId, /*user_id=*/{{1, 2, 3, 4}}, base::nullopt, base::nullopt)); mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); TestGetAssertionCallback callback_receiver; // |SelectAccount| should not be called when there's only a single response // without identifying information. test_client_.expected_accounts = "<invalid>"; PublicKeyCredentialRequestOptionsPtr options(get_credential_options()); options->user_verification = device::UserVerificationRequirement::kDiscouraged; authenticator->GetAssertion(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); // The UV=discouraged should have been ignored for a resident-credential // request. EXPECT_TRUE(HasUV(callback_receiver)); } static const char* ProtectionPolicyDescription( blink::mojom::ProtectionPolicy p) { switch (p) { case blink::mojom::ProtectionPolicy::UNSPECIFIED: return "UNSPECIFIED"; case blink::mojom::ProtectionPolicy::NONE: return "NONE"; case blink::mojom::ProtectionPolicy::UV_OR_CRED_ID_REQUIRED: return "UV_OR_CRED_ID_REQUIRED"; case blink::mojom::ProtectionPolicy::UV_REQUIRED: return "UV_REQUIRED"; } } static const char* CredProtectDescription(device::CredProtect cred_protect) { switch (cred_protect) { case device::CredProtect::kUVOptional: return "UV optional"; case device::CredProtect::kUVOrCredIDRequired: return "UV or cred ID required"; case device::CredProtect::kUVRequired: return "UV required"; } } TEST_F(ResidentKeyAuthenticatorImplTest, CredProtectRegistration) { mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); const auto UNSPECIFIED = blink::mojom::ProtectionPolicy::UNSPECIFIED; const auto NONE = blink::mojom::ProtectionPolicy::NONE; const auto UV_OR_CRED = blink::mojom::ProtectionPolicy::UV_OR_CRED_ID_REQUIRED; const auto UV_REQ = blink::mojom::ProtectionPolicy::UV_REQUIRED; const int kOk = 0; const int kNonsense = 1; const int kNotAllow = 2; const struct { bool supported_by_authenticator; bool is_resident; blink::mojom::ProtectionPolicy protection; bool enforce; bool uv; int expected_outcome; blink::mojom::ProtectionPolicy resulting_policy; } kExpectations[] = { // clang-format off // Support | Resdnt | Level | Enf | UV || Result | Prot level { false, false, UNSPECIFIED, false, false, kOk, NONE}, { false, false, UNSPECIFIED, true, false, kNonsense, UNSPECIFIED}, { false, false, NONE, false, false, kNonsense, UNSPECIFIED}, { false, false, NONE, true, false, kNonsense, UNSPECIFIED}, { false, false, UV_OR_CRED, false, false, kOk, NONE}, { false, false, UV_OR_CRED, true, false, kNotAllow, UNSPECIFIED}, { false, false, UV_OR_CRED, false, true, kOk, NONE}, { false, false, UV_OR_CRED, true, true, kNotAllow, UNSPECIFIED}, { false, false, UV_REQ, false, false, kNonsense, UNSPECIFIED}, { false, false, UV_REQ, false, true, kOk, NONE}, { false, false, UV_REQ, true, false, kNonsense, UNSPECIFIED}, { false, false, UV_REQ, true, true, kNotAllow, UNSPECIFIED}, { false, true, UNSPECIFIED, false, false, kOk, NONE}, { false, true, UNSPECIFIED, true, false, kNonsense, UNSPECIFIED}, { false, true, NONE, false, false, kOk, NONE}, { false, true, NONE, true, false, kNonsense, UNSPECIFIED}, { false, true, UV_OR_CRED, false, false, kOk, NONE}, { false, true, UV_OR_CRED, true, false, kNotAllow, UNSPECIFIED}, { false, true, UV_REQ, false, false, kNonsense, UNSPECIFIED}, { false, true, UV_REQ, false, true, kOk, NONE}, { false, true, UV_REQ, true, false, kNonsense, UNSPECIFIED}, { false, true, UV_REQ, true, true, kNotAllow, UNSPECIFIED}, // For the case where the authenticator supports credProtect we do not // repeat the cases above that are |kNonsense| on the assumption that // authenticator support is irrelevant. Therefore these are just the non- // kNonsense cases from the prior block. { true, false, UNSPECIFIED, false, false, kOk, NONE}, { true, false, UV_OR_CRED, false, false, kOk, UV_OR_CRED}, { true, false, UV_OR_CRED, true, false, kOk, UV_OR_CRED}, { true, false, UV_OR_CRED, false, true, kOk, UV_OR_CRED}, { true, false, UV_OR_CRED, true, true, kOk, UV_OR_CRED}, { true, false, UV_REQ, false, true, kOk, UV_REQ}, { true, false, UV_REQ, true, true, kOk, UV_REQ}, { true, true, UNSPECIFIED, false, false, kOk, UV_OR_CRED}, { true, true, NONE, false, false, kOk, NONE}, { true, true, UV_OR_CRED, false, false, kOk, UV_OR_CRED}, { true, true, UV_OR_CRED, true, false, kOk, UV_OR_CRED}, { true, true, UV_REQ, false, true, kOk, UV_REQ}, { true, true, UV_REQ, true, true, kOk, UV_REQ}, // clang-format on }; for (const auto& test : kExpectations) { device::VirtualCtap2Device::Config config; config.pin_support = true; config.resident_key_support = true; config.cred_protect_support = test.supported_by_authenticator; virtual_device_factory_->SetCtap2Config(config); virtual_device_factory_->mutable_state()->registrations.clear(); SCOPED_TRACE(::testing::Message() << "uv=" << test.uv); SCOPED_TRACE(::testing::Message() << "enforce=" << test.enforce); SCOPED_TRACE(::testing::Message() << "level=" << ProtectionPolicyDescription(test.protection)); SCOPED_TRACE(::testing::Message() << "resident=" << test.is_resident); SCOPED_TRACE(::testing::Message() << "support=" << test.supported_by_authenticator); PublicKeyCredentialCreationOptionsPtr options = make_credential_options(); options->authenticator_selection->SetRequireResidentKeyForTesting( test.is_resident); options->protection_policy = test.protection; options->enforce_protection_policy = test.enforce; options->authenticator_selection->SetUserVerificationRequirementForTesting( test.uv ? device::UserVerificationRequirement::kRequired : device::UserVerificationRequirement::kDiscouraged); TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); switch (test.expected_outcome) { case kOk: { EXPECT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); ASSERT_EQ( 1u, virtual_device_factory_->mutable_state()->registrations.size()); const device::CredProtect result = virtual_device_factory_->mutable_state() ->registrations.begin() ->second.protection; switch (test.resulting_policy) { case UNSPECIFIED: NOTREACHED(); break; case NONE: EXPECT_EQ(device::CredProtect::kUVOptional, result); break; case UV_OR_CRED: EXPECT_EQ(device::CredProtect::kUVOrCredIDRequired, result); break; case UV_REQ: EXPECT_EQ(device::CredProtect::kUVRequired, result); break; } break; } case kNonsense: EXPECT_EQ(AuthenticatorStatus::PROTECTION_POLICY_INCONSISTENT, callback_receiver.status()); break; case kNotAllow: EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); break; default: NOTREACHED(); } } } TEST_F(ResidentKeyAuthenticatorImplTest, AuthenticatorSetsCredProtect) { // Some authenticators are expected to set the credProtect extension ad // libitum. Therefore we should only require that the returned extension is at // least as restrictive as requested, but perhaps not exactly equal. mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); constexpr blink::mojom::ProtectionPolicy kMojoLevels[] = { blink::mojom::ProtectionPolicy::NONE, blink::mojom::ProtectionPolicy::UV_OR_CRED_ID_REQUIRED, blink::mojom::ProtectionPolicy::UV_REQUIRED, }; constexpr device::CredProtect kDeviceLevels[] = { device::CredProtect::kUVOptional, device::CredProtect::kUVOrCredIDRequired, device::CredProtect::kUVRequired, }; for (int requested_level = 0; requested_level < 3; requested_level++) { for (int forced_level = 1; forced_level < 3; forced_level++) { SCOPED_TRACE(::testing::Message() << "requested=" << requested_level); SCOPED_TRACE(::testing::Message() << "forced=" << forced_level); device::VirtualCtap2Device::Config config; config.pin_support = true; config.resident_key_support = true; config.cred_protect_support = true; config.force_cred_protect = kDeviceLevels[forced_level]; virtual_device_factory_->SetCtap2Config(config); virtual_device_factory_->mutable_state()->registrations.clear(); PublicKeyCredentialCreationOptionsPtr options = make_credential_options(); options->authenticator_selection->SetRequireResidentKeyForTesting(true); options->protection_policy = kMojoLevels[requested_level]; options->authenticator_selection ->SetUserVerificationRequirementForTesting( device::UserVerificationRequirement::kRequired); TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); if (requested_level <= forced_level) { EXPECT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); ASSERT_EQ( 1u, virtual_device_factory_->mutable_state()->registrations.size()); const base::Optional<device::CredProtect> result = virtual_device_factory_->mutable_state() ->registrations.begin() ->second.protection; EXPECT_EQ(*result, config.force_cred_protect); } else { EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); } } } } TEST_F(ResidentKeyAuthenticatorImplTest, AuthenticatorDefaultCredProtect) { // Some authenticators may have a default credProtect level that isn't // kUVOptional. This has complex interactions that are tested here. mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); constexpr struct { blink::mojom::ProtectionPolicy requested_level; device::CredProtect authenticator_default; device::CredProtect result; } kExpectations[] = { // Standard case: normal authenticator and nothing specified. Chrome sets // a default of kUVOrCredIDRequired for discoverable credentials. { blink::mojom::ProtectionPolicy::UNSPECIFIED, device::CredProtect::kUVOptional, device::CredProtect::kUVOrCredIDRequired, }, // Chrome's default of |kUVOrCredIDRequired| should not prevent a site // from requesting |kUVRequired| from a normal authenticator. { blink::mojom::ProtectionPolicy::UV_REQUIRED, device::CredProtect::kUVOptional, device::CredProtect::kUVRequired, }, // Authenticator has a non-standard default, which should work fine. { blink::mojom::ProtectionPolicy::UNSPECIFIED, device::CredProtect::kUVOrCredIDRequired, device::CredProtect::kUVOrCredIDRequired, }, // Authenticators can have a default of kUVRequired, but Chrome has a // default of kUVOrCredIDRequired for discoverable credentials. We should // not get a lesser protection level because of that. { blink::mojom::ProtectionPolicy::UNSPECIFIED, device::CredProtect::kUVRequired, device::CredProtect::kUVRequired, }, // Site should be able to explicitly set credProtect kUVOptional despite // an authenticator default. { blink::mojom::ProtectionPolicy::NONE, device::CredProtect::kUVOrCredIDRequired, device::CredProtect::kUVOptional, }, }; device::VirtualCtap2Device::Config config; config.pin_support = true; config.resident_key_support = true; config.cred_protect_support = true; for (const auto& test : kExpectations) { config.default_cred_protect = test.authenticator_default; virtual_device_factory_->SetCtap2Config(config); virtual_device_factory_->mutable_state()->registrations.clear(); SCOPED_TRACE(::testing::Message() << "result=" << CredProtectDescription(test.result)); SCOPED_TRACE(::testing::Message() << "default=" << CredProtectDescription(test.authenticator_default)); SCOPED_TRACE(::testing::Message() << "request=" << ProtectionPolicyDescription(test.requested_level)); PublicKeyCredentialCreationOptionsPtr options = make_credential_options(); options->authenticator_selection->SetRequireResidentKeyForTesting(true); options->protection_policy = test.requested_level; options->authenticator_selection->SetUserVerificationRequirementForTesting( device::UserVerificationRequirement::kRequired); TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); ASSERT_EQ(1u, virtual_device_factory_->mutable_state()->registrations.size()); const device::CredProtect result = virtual_device_factory_->mutable_state() ->registrations.begin() ->second.protection; EXPECT_EQ(result, test.result) << CredProtectDescription(result); } } TEST_F(ResidentKeyAuthenticatorImplTest, ProtectedNonResidentCreds) { // Until we have UVToken, there's a danger that we'll preflight UV-required // credential IDs such that the authenticator denies knowledge of all of them // for silent requests and then we fail the whole request. device::VirtualCtap2Device::Config config; config.pin_support = true; config.resident_key_support = true; config.cred_protect_support = true; virtual_device_factory_->SetCtap2Config(config); ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectRegistration( /*credential_id=*/{{4, 3, 2, 1}}, kTestRelyingPartyId)); ASSERT_EQ(1u, virtual_device_factory_->mutable_state()->registrations.size()); virtual_device_factory_->mutable_state() ->registrations.begin() ->second.protection = device::CredProtect::kUVRequired; mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); TestGetAssertionCallback callback_receiver; // |SelectAccount| should not be called when there's only a single response. test_client_.expected_accounts = "<invalid>"; PublicKeyCredentialRequestOptionsPtr options = get_credential_options(); options->allow_credentials = GetTestCredentials(5); options->allow_credentials[0].GetIdForTesting() = {4, 3, 2, 1}; authenticator->GetAssertion(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); EXPECT_TRUE(HasUV(callback_receiver)); } TEST_F(ResidentKeyAuthenticatorImplTest, WithAppIDExtension) { // Setting an AppID value for a resident-key request should be ignored. device::VirtualCtap2Device::Config config; config.u2f_support = true; config.pin_support = true; config.resident_key_support = true; config.cred_protect_support = true; virtual_device_factory_->SetCtap2Config(config); ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectResidentKey( /*credential_id=*/{{4, 3, 2, 1}}, kTestRelyingPartyId, /*user_id=*/{{1, 2, 3, 4}}, base::nullopt, base::nullopt)); mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); TestGetAssertionCallback callback_receiver; // |SelectAccount| should not be called when there's only a single response // without identifying information. test_client_.expected_accounts = "<invalid>"; PublicKeyCredentialRequestOptionsPtr options = get_credential_options(); options->appid = kTestOrigin1; authenticator->GetAssertion(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::SUCCESS, callback_receiver.status()); EXPECT_TRUE(HasUV(callback_receiver)); } #if defined(OS_WIN) // Requests with a credProtect extension that have |enforce_protection_policy| // set should be rejected if the Windows WebAuthn API doesn't support // credProtect. TEST_F(ResidentKeyAuthenticatorImplTest, WinCredProtectApiVersion) { // The canned response returned by the Windows API fake is for acme.com. NavigateAndCommit(GURL("https://acme.com")); for (const bool supports_cred_protect : {false, true}) { SCOPED_TRACE(testing::Message() << "supports_cred_protect: " << supports_cred_protect); ::device::FakeWinWebAuthnApi api; virtual_device_factory_->set_win_webauthn_api(&api); api.set_version(supports_cred_protect ? WEBAUTHN_API_VERSION_2 : WEBAUTHN_API_VERSION_1); PublicKeyCredentialCreationOptionsPtr options = make_credential_options(); options->relying_party = device::PublicKeyCredentialRpEntity(); options->relying_party.id = device::test_data::kRelyingPartyId; options->relying_party.name = ""; options->authenticator_selection->SetUserVerificationRequirementForTesting( device::UserVerificationRequirement::kRequired); options->authenticator_selection->SetRequireResidentKeyForTesting(true); options->protection_policy = blink::mojom::ProtectionPolicy::UV_OR_CRED_ID_REQUIRED; options->enforce_protection_policy = true; TestMakeCredentialCallback callback_receiver; mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); authenticator->MakeCredential(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(callback_receiver.status(), supports_cred_protect ? AuthenticatorStatus::SUCCESS : AuthenticatorStatus::NOT_ALLOWED_ERROR); } } #endif // defined(OS_WIN) // Tests that an allowList with only credential IDs of a length exceeding the // maxCredentialIdLength parameter is not mistakenly interpreted as an empty // allow list. TEST_F(ResidentKeyAuthenticatorImplTest, AllowListWithOnlyOversizedCredentialIds) { device::VirtualCtap2Device::Config config; config.u2f_support = true; config.pin_support = true; config.resident_key_support = true; config.max_credential_id_length = kTestCredentialIdLength; config.max_credential_count_in_list = 10; virtual_device_factory_->SetCtap2Config(config); ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectResidentKey( /*credential_id=*/std::vector<uint8_t>(kTestCredentialIdLength, 1), kTestRelyingPartyId, /*user_id=*/{{1}}, base::nullopt, base::nullopt)); ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectResidentKey( /*credential_id=*/std::vector<uint8_t>(kTestCredentialIdLength, 2), kTestRelyingPartyId, /*user_id=*/{{2}}, base::nullopt, base::nullopt)); mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); TestGetAssertionCallback callback_receiver; // |SelectAccount| should not be called since this is not a resident key // request. test_client_.expected_accounts = "<invalid>"; PublicKeyCredentialRequestOptionsPtr options = get_credential_options(); options->appid = kTestOrigin1; options->allow_credentials = {device::PublicKeyCredentialDescriptor( device::CredentialType::kPublicKey, std::vector<uint8_t>(kTestCredentialIdLength + 1, 0))}; authenticator->GetAssertion(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(AuthenticatorStatus::NOT_ALLOWED_ERROR, callback_receiver.status()); } class InternalAuthenticatorImplTest : public AuthenticatorTestBase { protected: InternalAuthenticatorImplTest() = default; void TearDown() override { // The |RenderFrameHost| must outlive |AuthenticatorImpl|. internal_authenticator_impl_.reset(); content::RenderViewHostTestHarness::TearDown(); } void NavigateAndCommit(const GURL& url) { // The |RenderFrameHost| must outlive |AuthenticatorImpl|. internal_authenticator_impl_.reset(); content::RenderViewHostTestHarness::NavigateAndCommit(url); } InternalAuthenticatorImpl* GetAuthenticator( const url::Origin& effective_origin_url) { internal_authenticator_impl_ = std::make_unique<InternalAuthenticatorImpl>(main_rfh()); internal_authenticator_impl_->SetEffectiveOrigin(effective_origin_url); return internal_authenticator_impl_.get(); } InternalAuthenticatorImpl* ConnectToAuthenticator( const url::Origin& effective_origin_url, std::unique_ptr<base::OneShotTimer> timer) { internal_authenticator_impl_.reset(new InternalAuthenticatorImpl( main_rfh(), std::make_unique<AuthenticatorCommon>(main_rfh(), std::move(timer)))); internal_authenticator_impl_->SetEffectiveOrigin(effective_origin_url); return internal_authenticator_impl_.get(); } InternalAuthenticatorImpl* ConstructAuthenticatorWithTimer( const url::Origin& effective_origin_url, scoped_refptr<base::TestMockTimeTaskRunner> task_runner) { fake_hid_manager_ = std::make_unique<device::FakeFidoHidManager>(); // Set up a timer for testing. auto timer = std::make_unique<base::OneShotTimer>(task_runner->GetMockTickClock()); timer->SetTaskRunner(task_runner); return ConnectToAuthenticator(effective_origin_url, std::move(timer)); } protected: std::unique_ptr<InternalAuthenticatorImpl> internal_authenticator_impl_; std::unique_ptr<device::FakeFidoHidManager> fake_hid_manager_; }; // Verify behavior for various combinations of origins and RP IDs. TEST_F(InternalAuthenticatorImplTest, MakeCredentialOriginAndRpIds) { // These instances should return security errors (for circumstances // that would normally crash the renderer). for (auto test_case : kInvalidRelyingPartyTestCases) { SCOPED_TRACE(std::string(test_case.claimed_authority) + " " + std::string(test_case.origin)); GURL origin = GURL(test_case.origin); if (url::Origin::Create(origin).opaque()) { // Opaque origins will cause DCHECK to fail. continue; } NavigateAndCommit(origin); InternalAuthenticatorImpl* authenticator = GetAuthenticator(url::Origin::Create(origin)); PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); options->relying_party.id = test_case.claimed_authority; TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(test_case.expected_status, callback_receiver.status()); } // These instances should bypass security errors, by setting the effective // origin to a valid one. for (auto test_case : kValidRelyingPartyTestCases) { SCOPED_TRACE(std::string(test_case.claimed_authority) + " " + std::string(test_case.origin)); NavigateAndCommit(GURL("https://this.isthewrong.origin")); auto task_runner = base::MakeRefCounted<base::TestMockTimeTaskRunner>( base::Time::Now(), base::TimeTicks::Now()); auto* authenticator = ConstructAuthenticatorWithTimer( url::Origin::Create(GURL(test_case.origin)), task_runner); PublicKeyCredentialCreationOptionsPtr options = GetTestPublicKeyCredentialCreationOptions(); options->relying_party.id = test_case.claimed_authority; ResetVirtualDevice(); TestMakeCredentialCallback callback_receiver; authenticator->MakeCredential(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(test_case.expected_status, callback_receiver.status()); } } // Verify behavior for various combinations of origins and RP IDs. TEST_F(InternalAuthenticatorImplTest, GetAssertionOriginAndRpIds) { // These instances should return security errors (for circumstances // that would normally crash the renderer). for (const OriginClaimedAuthorityPair& test_case : kInvalidRelyingPartyTestCases) { SCOPED_TRACE(std::string(test_case.claimed_authority) + " " + std::string(test_case.origin)); GURL origin = GURL(test_case.origin); if (url::Origin::Create(origin).opaque()) { // Opaque origins will cause DCHECK to fail. continue; } NavigateAndCommit(origin); InternalAuthenticatorImpl* authenticator = GetAuthenticator(url::Origin::Create(origin)); PublicKeyCredentialRequestOptionsPtr options = GetTestPublicKeyCredentialRequestOptions(); options->relying_party_id = test_case.claimed_authority; TestGetAssertionCallback callback_receiver; authenticator->GetAssertion(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(test_case.expected_status, callback_receiver.status()); } // These instances should bypass security errors, by setting the effective // origin to a valid one. for (const OriginClaimedAuthorityPair& test_case : kValidRelyingPartyTestCases) { SCOPED_TRACE(std::string(test_case.claimed_authority) + " " + std::string(test_case.origin)); NavigateAndCommit(GURL("https://this.isthewrong.origin")); auto task_runner = base::MakeRefCounted<base::TestMockTimeTaskRunner>( base::Time::Now(), base::TimeTicks::Now()); auto* authenticator = ConstructAuthenticatorWithTimer( url::Origin::Create(GURL(test_case.origin)), task_runner); PublicKeyCredentialRequestOptionsPtr options = GetTestPublicKeyCredentialRequestOptions(); options->relying_party_id = test_case.claimed_authority; ResetVirtualDevice(); ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectRegistration( options->allow_credentials[0].id(), test_case.claimed_authority)); TestGetAssertionCallback callback_receiver; authenticator->GetAssertion(std::move(options), callback_receiver.callback()); callback_receiver.WaitForCallback(); EXPECT_EQ(test_case.expected_status, callback_receiver.status()); } } #if defined(OS_MACOSX) class TouchIdConfigAuthenticatorRequestClientDelegate : public AuthenticatorRequestClientDelegate { public: TouchIdConfigAuthenticatorRequestClientDelegate() = default; ~TouchIdConfigAuthenticatorRequestClientDelegate() override = default; base::Optional<TouchIdAuthenticatorConfig> GetTouchIdAuthenticatorConfig() override { return TouchIdAuthenticatorConfig{}; } }; class TouchIdConfigAuthenticatorContentBrowserClient : public ContentBrowserClient { public: std::unique_ptr<AuthenticatorRequestClientDelegate> GetWebAuthenticationRequestDelegate( RenderFrameHost* render_frame_host) override { return std::make_unique<TouchIdConfigAuthenticatorRequestClientDelegate>(); } }; class TouchIdAuthenticatorImplTest : public AuthenticatorImplTest { public: void SetUp() override { AuthenticatorImplTest::SetUp(); old_client_ = SetBrowserClientForTesting(&test_client_); } void TearDown() override { SetBrowserClientForTesting(old_client_); AuthenticatorImplTest::TearDown(); } private: TouchIdConfigAuthenticatorContentBrowserClient test_client_; ContentBrowserClient* old_client_ = nullptr; }; TEST_F(TouchIdAuthenticatorImplTest, IsUVPAA) { SimulateNavigation(GURL(kTestOrigin1)); mojo::Remote<blink::mojom::Authenticator> authenticator = ConnectToAuthenticator(); if (__builtin_available(macOS 10.12.2, *)) { for (const bool touch_id_available : {false, true}) { SCOPED_TRACE(::testing::Message() << "touch_id_available=" << touch_id_available); device::fido::mac::ScopedTouchIdTestEnvironment touch_id_test_environment; touch_id_test_environment.SetTouchIdAvailable(touch_id_available); TestIsUvpaaCallback cb; authenticator->IsUserVerifyingPlatformAuthenticatorAvailable( cb.callback()); cb.WaitForCallback(); EXPECT_EQ(touch_id_available, cb.value()); } } } #endif // defined(OS_MACOSX) } // namespace content
40.245304
85
0.71779
81d33193e33ed0040bc616ae0c5be07e823c8332
1,296
html
HTML
src/app/components/user-list/user-list.component.html
kkolada/heroku-test-app
0e433bf91d12148daa9e65c1f107f325ff6d48ef
[ "MIT" ]
null
null
null
src/app/components/user-list/user-list.component.html
kkolada/heroku-test-app
0e433bf91d12148daa9e65c1f107f325ff6d48ef
[ "MIT" ]
null
null
null
src/app/components/user-list/user-list.component.html
kkolada/heroku-test-app
0e433bf91d12148daa9e65c1f107f325ff6d48ef
[ "MIT" ]
null
null
null
<div id="employee-list" class="container"> <h2> <i class="fa fa-users extra-space"></i>List of employees </h2> <hr> <div class="row"> <div class="col-sm-12 col-center"> <div class="row"> <div class="col-sm-4" *ngFor="let user of _users"> <div class="card"> <div class="card-body"> <p> <b>Name: </b><span>{{user.firstName}}</span> <span>{{user.lastName}}</span> <app-active-employee [pullRight]="true" [active]="user.active" [disabled]="true"></app-active-employee> </p> <p> <b>Mail: </b><span>{{user.email}}</span> </p> <p> <app-star-rating [range]="10" [rating]="user.rating" [disabled]="true"></app-star-rating> </p> <div class="btn-group"> <button class="btn btn-secondary" (click)="editUser(user.userId)"> <i class="fa fa-pencil-square-o"></i>Edit </button> <button class="btn btn-danger" (click)="removeUser(user)"> <i class="fa fa-trash"></i>Remove </button> </div> </div> </div> </div> </div> </div> </div> </div>
30.857143
119
0.456019
22ff93687a86bcf307411a8eb91600bfcb75f150
4,156
h
C
src/components/application_manager/test/state_controller/include/application_manager_mock.h
jacobkeeler/sdl_core
ad68c5d08986bb134651d06d22b4860c610b1f0f
[ "BSD-3-Clause" ]
null
null
null
src/components/application_manager/test/state_controller/include/application_manager_mock.h
jacobkeeler/sdl_core
ad68c5d08986bb134651d06d22b4860c610b1f0f
[ "BSD-3-Clause" ]
null
null
null
src/components/application_manager/test/state_controller/include/application_manager_mock.h
jacobkeeler/sdl_core
ad68c5d08986bb134651d06d22b4860c610b1f0f
[ "BSD-3-Clause" ]
1
2017-02-15T07:49:12.000Z
2017-02-15T07:49:12.000Z
/* * Copyright (c) 2015, Ford Motor Company * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following * disclaimer in the documentation and/or other materials provided with the * distribution. * * Neither the name of the Ford Motor Company nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ #ifndef SRC_COMPONENTS_APPLICATION_MANAGER_TEST_STATE_CONTROLLER_INCLUDE_APPLICATION_MANAGER_MOCK_H_ #define SRC_COMPONENTS_APPLICATION_MANAGER_TEST_STATE_CONTROLLER_INCLUDE_APPLICATION_MANAGER_MOCK_H_ #include <string> #include <vector> #include "gmock/gmock.h" #include "application_manager/application_manager.h" #include "application_manager/usage_statistics.h" namespace state_controller_test { namespace am = application_manager; class ApplicationManagerMock : public application_manager::ApplicationManager { public: MOCK_METHOD0(Init, bool()); MOCK_METHOD0(Stop, bool()); MOCK_METHOD1(set_hmi_message_handler, void(hmi_message_handler::HMIMessageHandler*)); MOCK_METHOD1(set_protocol_handler, void(protocol_handler::ProtocolHandler*)); MOCK_METHOD1(set_connection_handler, void(connection_handler::ConnectionHandler*)); MOCK_CONST_METHOD0(applications, DataAccessor<am::ApplicationSet>()); MOCK_CONST_METHOD1(application_by_hmi_app, am::ApplicationSharedPtr(uint32_t)); MOCK_CONST_METHOD1(application, am::ApplicationSharedPtr(uint32_t)); MOCK_CONST_METHOD0(active_application, am::ApplicationSharedPtr()); MOCK_CONST_METHOD1(application_by_policy_id, am::ApplicationSharedPtr(const std::string&)); MOCK_METHOD1(applications_by_button, std::vector<am::ApplicationSharedPtr>(uint32_t)); MOCK_METHOD0(applications_with_navi, std::vector<am::ApplicationSharedPtr>()); MOCK_CONST_METHOD0(get_limited_media_application, am::ApplicationSharedPtr()); MOCK_CONST_METHOD0(get_limited_navi_application, am::ApplicationSharedPtr()); MOCK_CONST_METHOD0(get_limited_voice_application, am::ApplicationSharedPtr()); MOCK_METHOD2(set_application_id, void(const int32_t, const uint32_t)); MOCK_METHOD1(application_id, uint32_t(const int32_t)); MOCK_METHOD3(OnHMILevelChanged, void(uint32_t, mobile_apis::HMILevel::eType, mobile_apis::HMILevel::eType)); MOCK_METHOD1(SendHMIStatusNotification, void(const am::ApplicationSharedPtr)); MOCK_CONST_METHOD1(GetDefaultHmiLevel, mobile_apis::HMILevel::eType( am::ApplicationConstSharedPtr)); MOCK_METHOD0(hmi_capabilities, am::HMICapabilities&()); MOCK_METHOD0(is_attenuated_supported, bool()); MOCK_CONST_METHOD1(IsAppTypeExistsInFullOrLimited, bool(am::ApplicationConstSharedPtr)); }; } // namespace state_controller_test #endif // SRC_COMPONENTS_APPLICATION_MANAGER_TEST_STATE_CONTROLLER_INCLUDE_APPLICATION_MANAGER_MOCK_H_
51.308642
103
0.779836
12cb9ba5eb17069b05751e43c0cecf94d8824aa8
17,263
html
HTML
snapshots/memberships.html
alphagov/govuk-content-best-practices
c4ee9dc4b43f9f4fb4343926a16cf18731e0fc7c
[ "MIT" ]
4
2015-05-13T16:23:58.000Z
2018-01-15T22:22:51.000Z
snapshots/memberships.html
alphagov/govuk-content-best-practices
c4ee9dc4b43f9f4fb4343926a16cf18731e0fc7c
[ "MIT" ]
3
2015-10-27T15:14:53.000Z
2017-08-04T12:58:11.000Z
snapshots/memberships.html
alphagov/govuk-content-best-practices
c4ee9dc4b43f9f4fb4343926a16cf18731e0fc7c
[ "MIT" ]
7
2015-04-29T10:43:39.000Z
2021-04-10T19:31:49.000Z
<!DOCTYPE html> <!--[if lt IE 9]> <html class="lte-ie8" lang="en"> <![endif]--> <!--[if gt IE 8]><!--> <html lang="en"> <!--<![endif]--> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>GOV.UK best practice example</title> <script type="text/javascript"> (function(){if(navigator.userAgent.match(/IEMobile\/10\.0/)){var d=document,c="appendChild",a=d.createElement("style");a[c](d.createTextNode("@-ms-viewport{width:auto!important}"));d.getElementsByTagName("head")[0][c](a);}})(); </script><!--[if gt IE 8]><!--> <link href="/govuk-content-best-practices/assets/govuk-template-b05d71e9007bfa8712fc4c4b935c8cfe.css" media="screen" rel="stylesheet" type="text/css"> <!--<![endif]--><!--[if IE 6]> <link href="/govuk-content-best-practices/assets/govuk-template-ie6-1b4f1fc138f0ec09268bcbfe67c881a1.css" media="screen" rel="stylesheet" type="text/css" /> <![endif]--><!--[if IE 7]> <link href="/govuk-content-best-practices/assets/govuk-template-ie7-fc86b6fe9d3788e3b52a4256bffdaf40.css" media="screen" rel="stylesheet" type="text/css" /> <![endif]--><!--[if IE 8]> <link href="/govuk-content-best-practices/assets/govuk-template-ie8-1b8da992d1dff1ff1178112ae63480e9.css" media="screen" rel="stylesheet" type="text/css" /> <![endif]--> <link href="/govuk-content-best-practices/assets/govuk-template-print-95606431bbfe23b0e4ee9e5ed3346c47.css" media="print" rel="stylesheet" type="text/css"> <!--[if IE 8]> <script type="text/javascript"> (function(){if(window.opera){return;} setTimeout(function(){var a=document,g,b={families:(g= ["nta"]),urls:["/assets/fonts-ie8-a840daa155b9e5f516d377b01ce50dcd.css"]}, c="/assets/vendor/goog/webfont-debug-96870cf9f159ed811fd43c39bdf4656b.js",d="script", e=a.createElement(d),f=a.getElementsByTagName(d)[0],h=g.length;WebFontConfig ={custom:b},e.src=c,f.parentNode.insertBefore(e,f);for(;h=h-1;a.documentElement .className+=' wf-'+g[h].replace(/\s/g,'').toLowerCase()+'-n4-loading');},0) })() </script> <![endif]--><!--[if gte IE 9]><!--> <link href="/govuk-content-best-practices/assets/fonts-83e596ae63d072e22b7f34d2b5482bde.css" media="all" rel="stylesheet" type="text/css"> <!--<![endif]--><!--[if lt IE 9]> <script src="/assets/ie-fc5bd25c5f46587b9bff917417ab2b7f.js" type="text/javascript"></script> <![endif]--> <link rel="shortcut icon" href="/govuk-content-best-practices/assets/favicon-9269d2d9f40d20236f60a3dbc448679a.ico" type="image/x-icon"> <!-- Size for iPad and iPad mini (high resolution) --> <link rel="apple-touch-icon-precomposed" sizes="152x152" href="/govuk-content-best-practices/assets/apple-touch-icon-152x152-58591dcff066ba321b89a9e208ccedab.png"> <!-- Size for iPhone and iPod touch (high resolution) --> <link rel="apple-touch-icon-precomposed" sizes="120x120" href="/govuk-content-best-practices/assets/apple-touch-icon-120x120-b6a680ead8eb531b9c28cc056836ad06.png"> <!-- Size for iPad 2 and iPad mini (standard resolution) --> <link rel="apple-touch-icon-precomposed" sizes="76x76" href="/govuk-content-best-practices/assets/apple-touch-icon-76x76-17dd3f1e168561f9099ba92e3292e607.png"> <!-- Default non-defined size, also used for Android 2.1+ devices --> <link rel="apple-touch-icon-precomposed" href="/govuk-content-best-practices/assets/apple-touch-icon-60x60-dc9aa421bedcf2c08c4e8f3f230f780d.png"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta property="og:image" content="/assets/opengraph-image-85fc698c83c77d8d8cb5467a44cc12a5.png"> <!--[if gt IE 8]><!--> <link href="/govuk-content-best-practices/assets/header-footer-only-8d96e8cea03dbe0ecb020054955e67c8.css" media="screen" rel="stylesheet" type="text/css"> <!--<![endif]--><!--[if IE 6]> <link href="/govuk-content-best-practices/assets/header-footer-only-ie6-1cc0d4e0b6bd80f9ce6ddbc840602917.css" media="screen" rel="stylesheet" type="text/css" /> <script>var ieVersion = 6;</script><![endif]--><!--[if IE 7]> <link href="/govuk-content-best-practices/assets/header-footer-only-ie7-6a60f364fbfb3daa815f048b5dfa601d.css" media="screen" rel="stylesheet" type="text/css" /> <script>var ieVersion = 7;</script><![endif]--><!--[if IE 8]> <link href="/govuk-content-best-practices/assets/header-footer-only-ie8-a04a1edf0cdbe898adc6197c7705030d.css" media="screen" rel="stylesheet" type="text/css" /> <script>var ieVersion = 8;</script><![endif]--> <link href="/govuk-content-best-practices/assets/print-885c0e730d8d8e704542e8304c523b9b.css" media="print" rel="stylesheet" type="text/css"> <!--[if gt IE 9]><!--> <link href="/govuk-content-best-practices/assets/base-a27f2c4627a9b3dab6c58e7541cac5f22dd51e8af605a9309a5bf3deba357dc3.css" media="screen" rel="stylesheet"> <!--<![endif]--> <link href="/govuk-content-best-practices/assets/core-layout-3af169a02eeb66de0f008dcedf799ae7.css" media="screen" rel="stylesheet" type="text/css"> <link href="/govuk-content-best-practices/assets/case-studies-application-ebb9f199f37a453460b3c52d4f4e66dc.css" media="screen" rel="stylesheet" type="text/css"> <link href="/govuk-content-best-practices/assets/print-4360a9429a952b5cc2857c5d805596be61c00b9563a96081ac5f9c1bdcec09d1.css" media="print" rel="stylesheet"> <link href="/govuk-content-best-practices/assets/collections-application-25bffcb0364cc8a22de7f01f103a26a1.css" media="screen" rel="stylesheet" type="text/css"> <link href="/govuk-content-best-practices/assets/manuals-frontend-application-1137820c48cef392b890c01ee0856e8b.css" media="screen" rel="stylesheet" type="text/css"> <meta content="True" name="HandheldFriendly"> <meta content="320" name="MobileOptimized"> <meta content="authenticity_token" name="csrf-param"> <meta content="WlMi5Ei8xQYmMpCJn1VsFVvOLXRh8sNO0PiPYezT20I=" name="csrf-token"> <meta content="historic" name="govuk:political-status"> <meta content="2005-to-2010-labour-government" name="govuk:publishing-government"> <!--[if IE 6]> <link href="/govuk-content-best-practices/assets/base-ie6-d6321525941a35c17b1aed6f912b5ac270ffdddc954c7fe767030c9e77d1f52b.css" media="screen" rel="stylesheet" /> <script>var ieVersion = 6;</script><![endif]--><!--[if IE 7]> <link href="/govuk-content-best-practices/assets/base-ie7-ee70a6ba263cfe3ce08b722fa00067ce8eb5301621c5a9de962fa1298e559af3.css" media="screen" rel="stylesheet" /> <script>var ieVersion = 7;</script><![endif]--><!--[if IE 8]> <link href="/govuk-content-best-practices/assets/base-ie8-ec15bd081a8ebaf2bb5f17dbf4968a3e4020e8d6cd62f0106e5aae06c7e60b15.css" media="screen" rel="stylesheet" /> <script>var ieVersion = 8;</script><![endif]--><!--[if IE 9]> <link href="/govuk-content-best-practices/assets/base-ie9-7a768893fa763807de180d5d7b7c1f6d9208949aab43d447100c6b6d528dfb14.css" media="screen" rel="stylesheet" /> <script>var ieVersion = 9;</script><![endif]--> <meta name="govuk:analytics:organisations" content="&lt;D109&gt;"> <style> .history-status-block { clear: both; margin: 30px 15px; padding: 20px 30px; color: #fff; background: #005ea5; } .history-status-block h2 { font-family: "nta", Arial, sans-serif; font-size: 36px; line-height: 1.11111; text-transform: none; padding-top: 6px; padding-bottom: 9px; font-weight: bold; } </style> </head> <body class="website government"> <script type="text/javascript">document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled');</script> <div class="header-context group"> <!-- deliberately empty --> </div> <div class="history-status-block" id="wrapper"> <h2>This is not GOV.UK</h2> <p>This page is an example of how to use this content type. <a style="color:#FFF;" href="https://www.gov.uk/guidance/content-design/content-types ">Back to the guidance</a> (other links on this page may not work).</p> </div> <!-- Inserted content starts --> <div id="whitehall-wrapper"> <main id="content" role="main" class="whitehall-content"> <div id="page" class="corporate-information-pages-show organisation-page"> <div class="organisation independent-reconfiguration-panel department-of-health-brand-colour advisory-non-departmental-public-body" id="organisation_527"> <article> <div class="block-1"> <div class="inner-block"> <header class="page-header"> <div class="logo"> <h1><span class="organisation-logo organisation-logo-stacked-single-identity organisation-logo-stacked-single-identity-large"><span><a href="https://www.gov.uk/government/organisations/independent-reconfiguration-panel">Independent <br>Reconfiguration <br>Panel</a></span></span></h1> </div> </header> <nav> <h1>Contents</h1> <ol class="dash-list"> <li><a href="https://www.gov.uk/government/organisations/independent-reconfiguration-panel/about/membership#members">Members</a></li> <li><a href="https://www.gov.uk/government/organisations/independent-reconfiguration-panel/about/membership#minutes-of-irp-meetings">Minutes of IRP meetings</a></li> <li><a href="https://www.gov.uk/government/organisations/independent-reconfiguration-panel/about/membership#business-reviews">Business reviews</a></li> </ol> </nav> </div> </div> <div class="block-2"> <div class="inner-block"> <p class="homepage-link"> <a href="https://www.gov.uk/government/organisations/independent-reconfiguration-panel">Independent Reconfiguration Panel homepage</a> </p> <h1 class="main">Membership</h1> <p class="description"> Information about the Independent Reconfiguration Panel's members, meeting minutes and business reviews. </p> <div class="body"> <div class="govspeak"> <h2 id="members">Members</h2> <p>The Independent Reconfiguration Panel (<abbr title="Independent Reconfiguration Panel">IRP</abbr>) is chaired by Lord Bernard Ribeiro.</p> <p>Its members are:</p> <ul> <li>Cath Broderick </li> <li>Fiona Campbell </li> <li>Shera Chok, Director of Primary Care at Barts Health NHS Trust </li> <li>Nick Coleman, Associate Medical Director at the University Hospital of North Staffordshire </li> <li>Glenn Douglas, Chief Executive of the Maidstone and Tunbridge Wells NHS Trust </li> <li>Shane Duffy </li> <li>Rosemary Granger </li> <li>Tessa Green </li> <li>Jane Hawdon, Clinical Academic Group Director (Children’s Health) at Barts Health NHS Trust </li> <li>Nicky Hayes </li> <li>Brenda Howard </li> <li>Simon Morritt, Chief Executive of Sheffield Children’s NHS Foundation Trust </li> <li>Linn Phipps</li> <li>Hugh Ross </li> <li>Suzanne Shale</li> </ul> <h2 id="minutes-of-irp-meetings">Minutes of <abbr title="Independent Reconfiguration Panel">IRP</abbr> meetings</h2> <p> <a href="https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/461573/Minutes_09_July_2015.doc">9 July 2015</a> (ODF, 67KB)<br> <a href="https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/455672/Minutes_14_May_2015.doc">14 May 2015</a> (ODF, 66.5KB)<br> <a href="https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/433866/Minutes_08_Jan_2015.doc">8 January 2015</a> (ODF, 63.5KB)<br> <a href="https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/395294/Minutes_13_Nov_2014.doc">13 November 2014</a> (ODF, 62KB)<br> <a href="https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/395293/Minutes_10_July_2014.doc">10 July 2014</a> (ODF, 54.5KB)<br> <a href="https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/395289/Minutes_08_May_2014.doc">8 May 2014</a> (ODF, 69KB)<br> <a href="https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/341734/minutes_14_nov_2013.doc">14 November 2013</a> (ODF, 59.5KB)<br> <a href="https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/341733/minutes_12_sept_2013.doc">12 September 2013</a> (ODF, 55KB)<br> <a href="https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/341732/minutes_11_july_2013.docx">11 July 2013</a> (ODF, 30.5KB) </p> <p> Previous minutes can be found on <a rel="external" href="http://webarchive.nationalarchives.gov.uk/20140609150332/http://www.irpanel.org.uk/view.asp?id=91">the <abbr title="Independent Reconfiguration Panel">IRP</abbr> pages on the National Archive.</a> </p> <h2 id="business-reviews">Business reviews</h2> <p> <a href="https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/433869/BusinessReview2014-15.pdf">2014 to 2015</a> (PDF, 434KB, 20 pages)<br> <a href="https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/395312/BusinessReview2013-14.pdf">2013 to 2014</a> (PDF, 462KB, 24 pages)<br> <a href="https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/395310/BusinessReview2012-13.pdf">2012 to 2013</a> (PDF, 462KB, 23 pages)<br> <a href="https://www.gov.uk/government/uploads/system/uploads/attachment_data/file/395302/BusinessReview2011-12.pdf">2011 to 2012</a> (PDF, 501KB, 24 pages) </p> </div> </div> </div> </div> </article> </div> </div> </main> <div class="report-a-problem-toggle-wrapper js-footer"> <p class="report-a-problem-toggle"> <a href="" class="js-report-a-problem-toggle">Is there anything wrong with this page?</a> </p> </div><div class="report-a-problem-container"> <div class="report-a-problem-inner"> <div class="report-a-problem-content"> <h2>Help us improve GOV.UK</h2> <form accept-charset="UTF-8" action="https://www.gov.uk/contact/govuk/problem_reports" method="post"> <div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓"></div> <input id="url" name="url" type="hidden" value="https://www.gov.uk/government/organisations/independent-reconfiguration-panel/about/membership?cachebust=1453982885&amp;preview=587633"> <input id="source" name="source" type="hidden" value="inside_government"> <input id="page_owner" name="page_owner" type="hidden" value="irp"> <p>Don’t include personal or financial information, eg your National Insurance number or credit card details.</p> <label for="what_doing">What you were doing</label> <input id="what_doing" name="what_doing" type="text"> <label for="what_wrong">What went wrong</label> <input id="what_wrong" name="what_wrong" type="text"> <div class="button-wrapper"> <button name="commit" type="submit" class="button">Send</button> </div> <input type="hidden" name="javascript_enabled" value="true"> <input type="hidden" name="referrer" value="https://www.gov.uk/government/admin/organisations/independent-reconfiguration-panel/corporate_information_pages/587633"> </form> </div> </div> </div> <!-- Inserted content ends --> <script src="/assets/govuk-template-1d29c0379552e7f7ab67500dea47df2d.js" type="text/javascript"/> <script src="/assets/jquery-1.7.2-2ce4706f8f7193defaa9e7df2b641e9a.js" type="text/javascript"/> <script src="/assets/header-footer-only-ea34ef20f38a3ef069e78bb2f6ae4544.js" type="text/javascript"/> <script src="/assets/application-951faf7db302d6ef9a52c9a028d24721c4a4e7090913e252941de8db2d16534c.js"/> </body> </html>
71.929167
306
0.643863
404fd2c791e7328ae5d3f47fe4b6b19e86d0f5f4
356
py
Python
examples/counter.py
pmatigakis/metricslib
cf7c6e781bea444a3495f87465ead48f7ec1de57
[ "MIT" ]
1
2020-01-07T00:04:02.000Z
2020-01-07T00:04:02.000Z
examples/counter.py
pmatigakis/metricslib
cf7c6e781bea444a3495f87465ead48f7ec1de57
[ "MIT" ]
null
null
null
examples/counter.py
pmatigakis/metricslib
cf7c6e781bea444a3495f87465ead48f7ec1de57
[ "MIT" ]
null
null
null
from metricslib.config import configure_from_dict from metricslib.utils import get_metrics def main(): config = { "STATSD_HOST": "localhost", "STATSD_PORT": 8125 } configure_from_dict(config) metrics = get_metrics() counter = metrics.counter("myapp.count") counter.incr() if __name__ == "__main__": main()
17.8
49
0.662921
53dbf82b3650dfe4282459732926397b4dbc5810
31
java
Java
39_repository/src/IEntity.java
HaNuNa42/JavaCrashCourse
fbe69048f13865a496f1818fc1c7808619871956
[ "Apache-2.0" ]
null
null
null
39_repository/src/IEntity.java
HaNuNa42/JavaCrashCourse
fbe69048f13865a496f1818fc1c7808619871956
[ "Apache-2.0" ]
null
null
null
39_repository/src/IEntity.java
HaNuNa42/JavaCrashCourse
fbe69048f13865a496f1818fc1c7808619871956
[ "Apache-2.0" ]
null
null
null
public interface IEntity { }
10.333333
27
0.709677
4770bc63afe69a9b3394f2e7c2fc3513542133a0
8,085
swift
Swift
PKMainMenu/PKMainMenuTableViewController.swift
pralancer/PKSideMenuDetailContainerController
eaaf7bc44eaababc3716ecdfe02482f608d1a155
[ "Apache-2.0" ]
null
null
null
PKMainMenu/PKMainMenuTableViewController.swift
pralancer/PKSideMenuDetailContainerController
eaaf7bc44eaababc3716ecdfe02482f608d1a155
[ "Apache-2.0" ]
null
null
null
PKMainMenu/PKMainMenuTableViewController.swift
pralancer/PKSideMenuDetailContainerController
eaaf7bc44eaababc3716ecdfe02482f608d1a155
[ "Apache-2.0" ]
null
null
null
/* // BackgroundAudioPlayer.h Copyright 2015 Pralancer. 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 UIKit let PKMainMenuTableViewDidSelectNotification = "PKMainMenuTableViewDidSelectNotification" /** This is a protocol that objects can conform to provide a view for a menu item if any of the menu item is set to a View type The @see PKMainMenuTableViewController has a menuViewProvider delegate that conforms to this protocol. Apps should set the menuViewProvider property of the PKMainMenuTableViewController and then implement the viewForMenuItem method to return a view for the specified menu item. Apps can use the identifier property of the item to determine which view to return if there are multiple menu items that are of View types */ protocol PKMainMenuTableViewDelegate : class { /** Return the view to be used as a menu item. The view's height should be properly set because it is used as the height * of the table cell in the table */ func viewForMenuItem(item:PKMainMenuItem) -> UIView? /** Delegate callback when a menu item is selected. The selected menu item model is passed to the delegate function */ func didSelectMenuItem(item:PKMainMenuItem) } /** * This is a table view controller that can be used to display a menu that you find in many apps on the left hand side. * Its driven by models defined in PKMainMenuModel that contains the menu properties and menu items defined by the * PKMainMenuItem objects. * The model is created from a plist. Default implementation looks for a MainMenu.plist file if present and uses that to create the model * You can also set the model explicity from a different file by creating an instance of the PKMainMenuModel using the path * and setting it to this table view controller */ class PKMainMenuTableViewController: UITableViewController { private static let kImageMenuItemTag = 1000 //tag of the image view used to set the table cell background private static let kMainMenuItemCellID = "MenuCell" //identifier to be set in the storyboard or xib for the table view cell weak var menuViewProvider:PKMainMenuTableViewDelegate! /** * Points to the model object for the menu */ var menuModel = PKMainMenuModel() //the main menu model /** * Contains the last selected item in the menu */ var selectedItem:PKMainMenuItem? = nil //last selected menu item //MARK: Overrides override func viewDidLoad() { super.viewDidLoad() self.tableView.registerClass(PKMenuTableViewCell.self, forCellReuseIdentifier: PKMainMenuTableViewController.kMainMenuItemCellID) self.setTableViewSettings() } //Set the table view UI attributes from the menu model such as background color and image func setTableViewSettings() { self.tableView.backgroundColor = menuModel.backgroundColor self.tableView.backgroundView = UIImageView(image: menuModel.backgroundImage) } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } // MARK: - Table view data source override func numberOfSectionsInTableView(tableView: UITableView) -> Int { return 1 //currently supporting only one section menu } override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return menuModel.menuItems.count } override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCellWithIdentifier(PKMainMenuTableViewController.kMainMenuItemCellID, forIndexPath: indexPath) as! PKMenuTableViewCell let item = menuModel.menuItems[indexPath.row] // Configure the cell... cell.configure(item, menuViewProvider: self.menuViewProvider) return cell } override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { selectedItem = menuModel.menuItems[indexPath.row] NSNotificationCenter.defaultCenter().postNotificationName(PKMainMenuTableViewDidSelectNotification, object: self) if menuViewProvider != nil { menuViewProvider.didSelectMenuItem(selectedItem!) } } override func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat { let item = menuModel.menuItems[indexPath.row] if item.type == PKMainMenuItem.ItemType.View { return item.view?.bounds.height ?? super.tableView(tableView, heightForRowAtIndexPath:indexPath) } //if we have the rowHeight in the model then use it if let rowHeight = item.rowHeight { return rowHeight } return super.tableView(tableView, heightForRowAtIndexPath:indexPath) } override func tableView(tableView: UITableView, shouldHighlightRowAtIndexPath indexPath: NSIndexPath) -> Bool { let item = menuModel.menuItems[indexPath.row] return item.selectable } } /* Menu item cell class. */ class PKMenuTableViewCell : UITableViewCell { //Configure's a table view cell based on a model given to the cell func configure(item:PKMainMenuItem, menuViewProvider:PKMainMenuTableViewDelegate?) { //remove any views added to the contentView of the cell since reusing does not remove the content view when scrolling fast let _ = self.contentView.subviews.map {$0.removeFromSuperview()} self.textLabel?.text = item.title //set the title irrespective of the type self.textLabel?.textColor = item.textColor self.textLabel?.font = item.font self.imageView?.image = nil if item.type == PKMainMenuItem.ItemType.Text { self.imageView?.image = item.image } else if item.type == PKMainMenuItem.ItemType.Image { let imageView = UIImageView(frame: self.bounds) imageView.image = item.image imageView.tag = PKMainMenuTableViewController.kImageMenuItemTag imageView.frame.size.height = item.rowHeight self.contentView.addSubview(imageView) } else if item.type == PKMainMenuItem.ItemType.View { if menuViewProvider != nil { if let menuView = menuViewProvider?.viewForMenuItem(item) { menuView.frame.origin = CGPointZero menuView.frame.size = self.contentView.bounds.size self.contentView.addSubview(menuView) item.view = menuView } } } //set the backgroundColor if available if item.backgroundColor != nil { self.backgroundColor = item.backgroundColor } else //otherwise make it no color. Have to set it to avoid reused cells traits being left over because of cell reuse { self.backgroundColor = UIColor.clearColor() } //if selectedColor is set then create a view and set that color as the background. if item.selectedColor != nil { self.selectedBackgroundView = UIView(frame: self.bounds) self.selectedBackgroundView?.backgroundColor = item.selectedColor } else //otherwise remove it { self.selectedBackgroundView = nil } } }
38.870192
162
0.697712
e66ef56bd834680e938f4a015aa03ceb53ab7256
711
asm
Assembly
oeis/254/A254645.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
11
2021-08-22T19:44:55.000Z
2022-03-20T16:47:57.000Z
oeis/254/A254645.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
9
2021-08-29T13:15:54.000Z
2022-03-09T19:52:31.000Z
oeis/254/A254645.asm
neoneye/loda-programs
84790877f8e6c2e821b183d2e334d612045d29c0
[ "Apache-2.0" ]
3
2021-08-22T20:56:47.000Z
2021-09-29T06:26:12.000Z
; A254645: Fourth partial sums of sixth powers (A001014). ; Submitted by Christian Krause ; 1,68,995,7672,40614,166992,571626,1701480,4534959,11050468,24997973,53113424,106959580,205628736,379603812,676144944,1166649837,1956528420,3198236503,5108229896,7988730530,12255340240,18471696750,27392540760,40016753595,57652132356,81993894633,115219148320,160099824632,220136854784,299718673672,404307458016,540656852505,717065306244,943669533963,1232783032728,1599285026014,2061065673680,2639533879346,3360194546632,4253302683399,5354602329252,6706158886845,8357294072688,10365633368916 lpb $0 mov $2,$0 sub $0,1 seq $2,254640 ; Third partial sums of sixth powers (A001014). add $1,$2 lpe add $1,1 mov $0,$1
54.692308
490
0.83263
88030bd0a7ce0485911c686a76bcc7fe28c16cc3
2,088
swift
Swift
ComponentBaseDependencyInjection/First/FirstScreenViewController.swift
ilyadaberdil/Component-Base-Dependency-Injection-Architecture
f768799bec94a4a0f3c2646a49aac24fdd6b9919
[ "Apache-2.0" ]
1
2020-02-14T12:02:12.000Z
2020-02-14T12:02:12.000Z
ComponentBaseDependencyInjection/First/FirstScreenViewController.swift
ilyadaberdil/Component-Base-Dependency-Injection-Architecture
f768799bec94a4a0f3c2646a49aac24fdd6b9919
[ "Apache-2.0" ]
null
null
null
ComponentBaseDependencyInjection/First/FirstScreenViewController.swift
ilyadaberdil/Component-Base-Dependency-Injection-Architecture
f768799bec94a4a0f3c2646a49aac24fdd6b9919
[ "Apache-2.0" ]
null
null
null
// // ViewController.swift // ComponentBaseDependencyInjection // // Created by Berdil İlyada Karacam on 8.02.2020. // Copyright © 2020 Berdil İlyada Karacam. All rights reserved. // import UIKit protocol FirstScreenViewControllerRouterProtocol: AnyObject { func present(viewController: UIViewController) } protocol FirstScreenViewControllerPresenterProtocol: AnyObject { } final class FirstScreenViewController: UIViewController { var presenter: FirstScreenPresenterProtocol! var router: FirstScreenRouterProtocol! private var firstScreenParameter: FirstScreenParameter init(firstScreenParameter: FirstScreenParameter) { self.firstScreenParameter = firstScreenParameter super.init(nibName: nil, bundle: nil) } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } override func viewDidLoad() { super.viewDidLoad() self.view.backgroundColor = .red presenter.getSomethingFromWebService() configureButton() } private func configureButton() { let button = UIButton() button.translatesAutoresizingMaskIntoConstraints = false view.addSubview(button) button.setTitle("Show Second", for: .normal) button.tintColor = .black button.addTarget(self, action: #selector(buttonTapped), for: .touchUpInside) NSLayoutConstraint.activate([ button.centerXAnchor.constraint(equalTo: view.centerXAnchor), button.centerYAnchor.constraint(equalTo: view.centerYAnchor), ]) } @objc func buttonTapped() { // Also it can be call router directly // router.showSecondScreen() presenter.buttonTapped() } } extension FirstScreenViewController: FirstScreenViewControllerPresenterProtocol { } extension FirstScreenViewController: FirstScreenViewControllerRouterProtocol { func present(viewController: UIViewController) { self.present(viewController, animated: true, completion: nil) } }
29
84
0.702586
b0d5043a2660f8b8bd5d495a7b2e91f4fb69d847
1,768
dart
Dart
analog_clock/lib/clock_legs.dart
norraell/flutter_clock_challenge
499d74b27ef24992629a587d8d919fd81d9138a5
[ "MIT" ]
null
null
null
analog_clock/lib/clock_legs.dart
norraell/flutter_clock_challenge
499d74b27ef24992629a587d8d919fd81d9138a5
[ "MIT" ]
null
null
null
analog_clock/lib/clock_legs.dart
norraell/flutter_clock_challenge
499d74b27ef24992629a587d8d919fd81d9138a5
[ "MIT" ]
null
null
null
import 'package:flutter/material.dart'; import 'dart:math' as math; class ClockLegs extends StatelessWidget { const ClockLegs({ @required this.color, }) : assert(color != null); final Color color; @override Widget build(BuildContext context) { return Center( child: SizedBox.expand( child: CustomPaint( painter: _LegPainter( color: color, ), ), ), ); } } /// [CustomPainter] that draws a clock hand. class _LegPainter extends CustomPainter { _LegPainter({ @required this.color, }) : assert(color != null); Color color; @override void paint(Canvas canvas, Size size) { final center = (Offset.zero & size).center; final length = size.shortestSide * 0.5; final linePaint = Paint() ..color = color ..strokeWidth = length * 0.06 ..strokeCap = StrokeCap.square; final leftFootAngle = math.pi / 4; final rightFootAngle = math.pi / 4 * 3; final leftFootPosition = center + Offset(math.cos(leftFootAngle), math.sin(leftFootAngle)) * length * 0.9; final leftFootPositionEnd = center + Offset(math.cos(leftFootAngle), math.sin(leftFootAngle)) * length * 1.1; final rightFootPosition = center + Offset(math.cos(rightFootAngle), math.sin(rightFootAngle)) * length * 0.9; final rightFootPositionEnd = center + Offset(math.cos(rightFootAngle), math.sin(rightFootAngle)) * length * 1.1; canvas.drawLine(leftFootPosition, leftFootPositionEnd, linePaint); canvas.drawLine(rightFootPosition, rightFootPositionEnd, linePaint); } @override bool shouldRepaint(_LegPainter oldDelegate) { return oldDelegate.color != color; } }
25.623188
80
0.640837
f052efa23ff0effd67d63001195791b3ab503886
6,545
js
JavaScript
spec/utils-spec.js
vt5491/multi-theme-applicator
df71d9d340ceaf31d074e49129c6a18530e77583
[ "MIT" ]
8
2016-12-01T12:03:29.000Z
2020-02-12T22:54:25.000Z
spec/utils-spec.js
vt5491/multi-theme-applicator
df71d9d340ceaf31d074e49129c6a18530e77583
[ "MIT" ]
11
2017-01-20T00:53:04.000Z
2022-03-30T05:59:39.000Z
spec/utils-spec.js
vt5491/multi-theme-applicator
df71d9d340ceaf31d074e49129c6a18530e77583
[ "MIT" ]
null
null
null
/* * decaffeinate suggestions: * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ let jQuery; const Utils = require('../lib/utils'); const Base = require('../lib/base'); const $ = (jQuery = require('jquery')); describe('Utils', function() { beforeEach(function() { this.utils = new Utils(); const textEditor = atom.workspace.buildTextEditor(); const textEditorEl = textEditor.getElement(); const textEditorSpy = spyOn(atom.workspace, "getActiveTextEditor"); return textEditorSpy.andReturn(textEditor); }); return it('doIt works', function() { return expect(this.utils.doIt()).toEqual(7); }); }); describe('Utils2', function() { beforeEach(function() { this.utils = new Utils(); this.textEditor = atom.workspace.buildTextEditor(); this.textEditor2 = atom.workspace.buildTextEditor(); this.textEditor3 = atom.workspace.buildTextEditor(); this.textEditor4 = atom.workspace.buildTextEditor(); // add a file type class $(this.textEditor.getElement()).addClass('mta-file-type-atom-light-syntax-style-1486192129232'); // add a file class $(this.textEditor.getElement()).addClass('mta-file-dracula-theme-style-1486192106901'); // add an editor class $(this.textEditor.getElement()).addClass('mta-editor-fairyfloss-style-1486192106901'); this.editorFile = "/tmp/utils-spec-dummy.ts"; this.editorFileWinFormat= "\\tmp\\utils-spec-dummy.ts"; this.editorFile2 = "/tmp/utils-spec-dummy2.js"; this.editorFile3 = "/tmp/utils-spec-dummy3.cljs"; spyOn(this.textEditor, "getURI").andReturn(this.editorFileWinFormat); // note: editor and editor2 need to use the same format to mimic a real test spyOn(this.textEditor2, "getURI").andReturn(this.editorFileWinFormat); spyOn(this.textEditor3, "getURI").andReturn(this.editorFile2); spyOn(this.textEditor4, "getURI").andReturn(this.editorFile3); spyOn(atom.workspace, "getActiveTextEditor").andReturn(this.textEditor); return spyOn(atom.workspace, "getTextEditors").andReturn([this.textEditor, this.textEditor2, this.textEditor3, this.textEditor4]); }); it('getActiveFile works', function() { const result = this.utils.getActiveFile(); // we expect it to be normalized to unix format even its in window format return expect(result).toMatch( new RegExp(this.editorFile) ); }); it('getTextEditors works by file', function() { const params = {}; params.uri = this.editorFile; const result = this.utils.getTextEditors(params); expect(result.length).toEqual(2); expect(result[0].getURI()).toEqual(this.editorFileWinFormat); return expect(result[1].getURI()).toEqual(this.editorFileWinFormat); }); it('getTextEditors works by file type', function() { const params = {}; params.fileExt = "js"; const result = this.utils.getTextEditors(params); expect(result.length).toEqual(1); return expect(result[0].getURI().match(/utils-spec-dummy2\.js/)).toBeTruthy(); }); it('normalizePath works', function() { // windows path let result = this.utils.normalizePath('c:\\tmp\\dummy.txt'); expect(result).toEqual('c:/tmp/dummy.txt'); // unix path result = this.utils.normalizePath('/tmp/dummy.txt'); return expect(result).toEqual('/tmp/dummy.txt'); }); it('hexToRgb works', function() { // with a leading hash mark let result = this.utils.hexToRgb("#102030"); expect(result).toEqual("rgb(16, 32, 48)"); // with no leading hash mark result = this.utils.hexToRgb("102030"); expect(result).toEqual("rgb(16, 32, 48)"); // with lower case hex result = this.utils.hexToRgb("#a0b0c0"); expect(result).toEqual("rgb(160, 176, 192)"); // with upper case hex result = this.utils.hexToRgb("#A0B0C0"); return expect(result).toEqual("rgb(160, 176, 192)"); }); // I just cannot get Base properly setup to test this xit('getThemeName works', function() { // @utils.Base.ThemeLookup.push {baseDir: '/tmp/abc.theme', themeName: 'abc'} // @utils.Base.ThemeLookup.push {baseDir: '/tmp/def.theme', themeName: 'def'} // Base.ThemeLookup.push {baseDir: '/tmp/abc.theme', themeName: 'abc'} // Base.ThemeLookup.push {baseDir: '/tmp/def.theme', themeName: 'def'} // Base::ThemeLookup.push {baseDir: '/tmp/abc.theme', themeName: 'abc'} // Base::ThemeLookup.push {baseDir: '/tmp/def.theme', themeName: 'def'} // themes = [] // themes.push {baseDir: '/tmp/abc.theme', themeName: 'abc'} // themes.push {baseDir: '/tmp/def.theme', themeName: 'def'} // spyOn(@utils, "Base.ThemeLookup").andReturn(themes) // Base.ThemeLookup = themes // console.log "@utils.Base=#{@utils.Base}" // utilsClosure = function () { // Base = Base; // getThemeName = @utils.getThemeName // } // utilsClosure: (arg) -> const utilsClosure = arg => { // Base = Base; console.log(`now in utilsClosure: arg=${arg}`); // require '../base' Base.ThemeLookup.push({baseDir: '/tmp/abc.theme', themeName: 'abc'}); Base.ThemeLookup.push({baseDir: '/tmp/def.theme', themeName: 'def'}); // @utils.getThemeName arg; const utils = new Utils(); // debugger // @utils.getThemeName arg return utils.getThemeName(arg); }; // debugger const result = this.utils.getThemeName('/tmp/abc.theme'); // result = utilsClosure( '/tmp/abc.theme') return console.log(`result=${result}`); }); // expect(@utils.getThemeName '/tmp/abc.theme').toEqual('abc') // expect(@utils.getThemeName '/tmp/def.theme').toEqual('def') // expect(@utils.getThemeName '/tmp/ghi.theme').toBeFalsy() it('hasMtaFileClass works', function() { expect(this.utils.hasMtaFileClass(this.textEditor.getElement())).toBeTruthy(); return expect(this.utils.hasMtaFileClass(this.textEditor2.getElement())).toBeFalsy(); }); it('hasMtaFileTypeClass works', function() { expect(this.utils.hasMtaFileClass(this.textEditor.getElement())).toBeTruthy(); return expect(this.utils.hasMtaFileClass(this.textEditor2.getElement())).toBeFalsy(); }); return it('getFileExt works', function() { expect(this.utils.getFileExt("abc.txt")).toEqual("txt"); expect(this.utils.getFileExt("abc.txt ")).toEqual("txt"); expect(this.utils.getFileExt("abc.def.txt")).toEqual("txt"); return expect(this.utils.getFileExt("abc")).toEqual(""); }); });
36.977401
134
0.668296
90ed75d34064135f6912da1fdba594802496c584
1,446
py
Python
tests/examples/AclContentCacheSimpleTest.py
apanda/modeling
e032abd413bb3325ad6e5995abadeef74314f383
[ "BSD-3-Clause" ]
3
2017-08-30T05:24:11.000Z
2021-02-25T12:17:19.000Z
tests/examples/AclContentCacheSimpleTest.py
apanda/modeling
e032abd413bb3325ad6e5995abadeef74314f383
[ "BSD-3-Clause" ]
null
null
null
tests/examples/AclContentCacheSimpleTest.py
apanda/modeling
e032abd413bb3325ad6e5995abadeef74314f383
[ "BSD-3-Clause" ]
2
2017-11-15T07:00:48.000Z
2020-12-13T17:29:03.000Z
import components def AclContentCacheSimpleTest (): """ACL content cache test""" ctx = components.Context (['a', 'b', 'cc'],\ ['ip_a', 'ip_b', 'ip_cc']) net = components.Network (ctx) a = components.EndHost(ctx.a, net, ctx) b = components.EndHost(ctx.b, net, ctx) cc = components.AclContentCache(ctx.cc, net, ctx) net.setAddressMappings([(a, ctx.ip_a), \ (b, ctx.ip_b), \ (cc, ctx.ip_cc)]) addresses = [ctx.ip_a, ctx.ip_b, ctx.ip_cc] net.RoutingTable(a, [(x, cc) for x in addresses]) net.RoutingTable(b, [(x, cc) for x in addresses]) net.RoutingTable(cc, [(ctx.ip_a, a), \ (ctx.ip_b, b)]) endhosts = [a, b] cc.AddAcls([(ctx.ip_a, ctx.ip_b)]) endhosts = [a, b] net.Attach(a, b, cc) class AclContentCacheSimpleReturn (object): def __init__ (self, net, ctx, a, b, cc): self.net = net self.ctx = ctx self.a = a self.b = b self.cc = cc self.check = components.PropertyChecker (ctx, net) return AclContentCacheSimpleReturn(net, ctx, a, b, cc) # To run in a Python shell # from examples import AclContentCacheSimpleTest # m = AclContentCacheSimpleTest() # For unsat result y = m.check.CheckDataIsolationProperty(m.a, m.b) # For sat result y = m.check.CheckDataIsolationProperty(m.b, m.a)
38.052632
67
0.571231
a83b7d5f4f2b4272c386f2619edc19c0691c3219
153
rs
Rust
candy-machine/program/tests/utils/mod.rs
exromany/metaplex-program-library
dadf07d0dab3c3fc4fdeb9d3f0a030e4a5e679a1
[ "Apache-2.0" ]
1
2022-02-22T18:54:12.000Z
2022-02-22T18:54:12.000Z
candy-machine/program/tests/utils/mod.rs
exromany/metaplex-program-library
dadf07d0dab3c3fc4fdeb9d3f0a030e4a5e679a1
[ "Apache-2.0" ]
null
null
null
candy-machine/program/tests/utils/mod.rs
exromany/metaplex-program-library
dadf07d0dab3c3fc4fdeb9d3f0a030e4a5e679a1
[ "Apache-2.0" ]
1
2022-01-04T09:47:46.000Z
2022-01-04T09:47:46.000Z
pub use candy_manager::*; pub use configs::*; pub use helper_transactions::*; mod candy_manager; mod configs; mod helper_transactions; pub mod helpers;
17
31
0.771242
64e8bca5e09ba668446455e6a2158b61b7a03ee5
13,758
java
Java
modules/chiron/middle/src/main/java/com/otcdlink/chiron/command/automatic/CommandCooker.java
OTCdLink/Chiron
310d61577e98e54fa05309b260b089f1b87ed229
[ "Apache-2.0" ]
null
null
null
modules/chiron/middle/src/main/java/com/otcdlink/chiron/command/automatic/CommandCooker.java
OTCdLink/Chiron
310d61577e98e54fa05309b260b089f1b87ed229
[ "Apache-2.0" ]
null
null
null
modules/chiron/middle/src/main/java/com/otcdlink/chiron/command/automatic/CommandCooker.java
OTCdLink/Chiron
310d61577e98e54fa05309b260b089f1b87ed229
[ "Apache-2.0" ]
null
null
null
package com.otcdlink.chiron.command.automatic; import com.google.common.base.CaseFormat; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.otcdlink.chiron.buffer.PositionalFieldReader; import com.otcdlink.chiron.buffer.PositionalFieldWriter; import com.otcdlink.chiron.command.Command; import com.otcdlink.chiron.command.CommandConsumer; import com.otcdlink.chiron.command.Stamp; import com.otcdlink.chiron.command.codec.Codec; import com.otcdlink.chiron.toolbox.ToStringTools; import javassist.CannotCompileException; import javassist.ClassPool; import javassist.CtClass; import javassist.CtMethod; import javassist.CtNewMethod; import javassist.NotFoundException; import java.io.DataInput; import java.io.IOException; import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.lang.reflect.Type; import java.util.Map; import java.util.function.Function; import java.util.function.Supplier; import java.util.regex.Pattern; import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkNotNull; /** * Resolves {@link Command} objects from Java code through "Feature" interfaces, with methods * annotated with {@link AsCommand}. * This is only for the latest version as defined by interfaces in use, the backward compatibility * comes from other stuff. */ public class CommandCooker< ENDPOINT_SPECIFIC, CALLABLE_RECEIVER > implements Codec< Command< ENDPOINT_SPECIFIC, CALLABLE_RECEIVER > > { private final Supplier< PreambleCodec< ENDPOINT_SPECIFIC > > preambleCodecFactory; private final FeatureRegistry featureRegistry ; private final ImmutableMap< Type, Codec > methodParametersCodecs ; private final CommandClassEnhancer commandClassEnhancer ; /** * Something like {@code foo.bar.MyCommand}. */ private final String commandNamePrefix ; private final Stamp.Generator identifierGenerator ; /** * @param featureRegistry describes how to create {@link Command} objects. * @param methodParametersCodecs {@link Codec}s for parameters of interface's methods. * @param identifierGenerator */ public CommandCooker( final Supplier< PreambleCodec< ENDPOINT_SPECIFIC > > preambleCodecFactory, final FeatureRegistry featureRegistry, final ImmutableMap< Type, Codec > methodParametersCodecs, final String commandNamePrefix, final CommandClassEnhancer commandClassEnhancer, final Stamp.Generator identifierGenerator ) { this.preambleCodecFactory = checkNotNull( preambleCodecFactory ) ; this.featureRegistry = checkNotNull( featureRegistry ) ; this.methodParametersCodecs = checkNotNull( methodParametersCodecs ) ; checkArgument( Pattern.matches( "[a-zA-Z][a-zA-Z0-9_]*(?:\\.[a-zA-Z][a-zA-Z0-9_]*)*", commandNamePrefix ) ) ; this.commandNamePrefix = commandNamePrefix ; this.commandClassEnhancer = commandClassEnhancer ; this.identifierGenerator = checkNotNull( identifierGenerator ) ; } @Override public void encodeTo( final Command< ENDPOINT_SPECIFIC, CALLABLE_RECEIVER > command, final PositionalFieldWriter positionalFieldWriter ) throws IOException { encode( preambleCodec(), command, positionalFieldWriter ) ; } @Override public final Command< ENDPOINT_SPECIFIC, CALLABLE_RECEIVER > decodeFrom( final PositionalFieldReader positionalFieldReader ) throws IOException { return decode( preambleCodec(), positionalFieldReader ) ; } @SuppressWarnings( "ThreadLocalNotStaticFinal" ) private final ThreadLocal< PreambleCodec< ENDPOINT_SPECIFIC > > preambleCodecThreadLocal = new ThreadLocal<>() ; private PreambleCodec< ENDPOINT_SPECIFIC > preambleCodec() { final PreambleCodec< ENDPOINT_SPECIFIC > preambleCodec = preambleCodecThreadLocal.get() ; if( preambleCodec == null ) { final PreambleCodec< ENDPOINT_SPECIFIC > newInstance = preambleCodecFactory.get() ; preambleCodecThreadLocal.set( newInstance ) ; return newInstance ; } else { return preambleCodec ; } } protected void encode( final PreambleEncoder< ENDPOINT_SPECIFIC > preambleEncoder, final Command< ENDPOINT_SPECIFIC, CALLABLE_RECEIVER > command, final PositionalFieldWriter positionalFieldWriter ) throws IOException { preambleEncoder.set( command.endpointSpecific, command.description().name() ) ; preambleEncoder.encode( positionalFieldWriter ) ; command.encodeBody( positionalFieldWriter ) ; } protected Command< ENDPOINT_SPECIFIC, CALLABLE_RECEIVER > decode( final PreambleDecoder< ENDPOINT_SPECIFIC > preambleDecoder, final PositionalFieldReader positionalFieldReader ) throws IOException { preambleDecoder.decode( positionalFieldReader ) ; final String commandName = preambleDecoder.commandName() ; final ENDPOINT_SPECIFIC endpointSpecific = preambleDecoder.endpointSpecific() ; final FeatureRegistry.FeatureMethod featureMethod = featureRegistry.featureMethods.get( commandName ) ; final ImmutableMap.Builder< String, Object > argumentMapBuilder = ImmutableMap.builder() ; final FeatureRegistry.FeatureMethod.ArgumentIterator iterator = featureMethod.argumentIterator() ; while( iterator.hasNext() ) { final Type argumentType = iterator.next() ; final int argumentIndex = iterator.index() ; final Codec codec = methodParametersCodecs.get( argumentType ) ; final String fieldName = argumentName( argumentType, argumentIndex ) ; final Object value = codec.decodeFrom( positionalFieldReader ) ; argumentMapBuilder.put( fieldName, value ) ; } return new DynamicCommand<>( identifierGenerator.generate(), endpointSpecific, new CommandDescription( featureMethod ), methodParametersCodecs, featureMethod, argumentMapBuilder.build() ) ; } private final ClassPool ctPool = new ClassPool( true ) ; @SuppressWarnings( "unchecked" ) public final CALLABLE_RECEIVER createReceiver( final CommandConsumer< Command< ENDPOINT_SPECIFIC, CALLABLE_RECEIVER > > commandConsumer ) { final Class[] interfaces = featureRegistry.featureClasses.toArray( new Class[ featureRegistry.featureClasses.size() ] ) ; return ( CALLABLE_RECEIVER ) Proxy.newProxyInstance( getClass().getClassLoader(), interfaces, ( proxy, method, arguments ) -> { if( CommandCookerTools.callingObject$equals( method, arguments ) ) { return proxy == arguments[ 0 ] ; } else if( CommandCookerTools.callingObject$hashCode( method, arguments ) ) { return System.identityHashCode( proxy ) ; } else if( CommandCookerTools.callingObject$toString( method, arguments ) ) { final ImmutableList< Class< ? > > list = featureRegistry.featureClasses ; return CommandCooker.class.getSimpleName() + ".$$DynamicReceiver" + ToStringTools.compactHashForNonNull( proxy ) + '{' + CommandCookerTools.classNames( list ) + '}' ; } else { final FeatureRegistry.FeatureMethod featureMethod = featureRegistry.featureMethod( method ) ; checkArgument( arguments.length == featureMethod.specificArgumentTypes.size() + 1 ) ; ImmutableMap.Builder< String, Object > builder = ImmutableMap.builder() ; final FeatureRegistry.FeatureMethod.ArgumentIterator argumentIterator = featureMethod.argumentIterator() ; while( argumentIterator.hasNext() ) { final Type argumentType = argumentIterator.next() ; final int argumentIndex = argumentIterator.index() ; final Object argument = arguments[ argumentIndex ]; builder.put( argumentName( argumentType, argumentIndex ), argument ) ; } final Command< ENDPOINT_SPECIFIC, CALLABLE_RECEIVER > dynamicCommand = createCommand( featureMethod, ( ENDPOINT_SPECIFIC ) arguments[ 0 ], builder.build() ) ; ; commandConsumer.accept( dynamicCommand ) ; } return null ; } ) ; } private Command< ENDPOINT_SPECIFIC, CALLABLE_RECEIVER > createCommand( final FeatureRegistry.FeatureMethod featureMethod, final ENDPOINT_SPECIFIC endpointSpecific, final ImmutableMap< String, Object > argumentMap ) throws NotFoundException, CannotCompileException { final Class< Command > commandClass = createCommandClass( featureMethod ) ; // return commandClass.getConstructor( ) throw new UnsupportedOperationException( "TODO" ) ; } private Class< Command > createCommandClass( final FeatureRegistry.FeatureMethod featureMethod ) throws NotFoundException, CannotCompileException { final CtClass ctBase = ctPool.get( DynamicCommand.class.getName() ) ; final CtClass ctAugmented = ctPool.makeClass( commandNamePrefix + CaseFormat.LOWER_CAMEL.to( CaseFormat.UPPER_CAMEL, featureMethod.commandName ), ctBase ) ; if( commandClassEnhancer != null ) { final ImmutableMap< Class< ? >, Function< Method, String > > interfaceDefinition = commandClassEnhancer.moreImplementedInterfaces( featureMethod ) ; if( ! interfaceDefinition.isEmpty() ) { for( final Map.Entry< Class< ? >, Function< Method, String > > interfaceEntry : interfaceDefinition.entrySet() ) { final CtClass ctAdditionalInterface = ctPool.get( interfaceEntry.getKey().getName() ) ; ctAugmented.addInterface( ctAdditionalInterface ) ; for( final Method method : interfaceEntry.getKey().getDeclaredMethods() ) { final CtClass[] argumentTypes = CommandCookerTools.javaClassesToJavassist( ctPool, method.getParameterTypes() ) ; final CtMethod ctAdditionalMethod = CtNewMethod.abstractMethod( ctPool.get( method.getReturnType().getName() ), method.getName(), argumentTypes, null, ctAugmented ) ; ctAdditionalMethod.setBody( interfaceEntry.getValue().apply( method ) ) ; ctAugmented.addMethod( ctAdditionalMethod ) ; } } } } return ( Class< Command > ) ( Object ) ctAugmented.getClass() ; } protected Command< ENDPOINT_SPECIFIC, CALLABLE_RECEIVER > create( final FeatureRegistry.FeatureMethod featureMethod, final Object[] arguments ) { throw new UnsupportedOperationException( "TODO" ) ; } @Override public String toString() { return ToStringTools.nameAndCompactHash( this ) + '{' + CommandCookerTools.classNames( featureRegistry.featureClasses ) + '}' ; } interface CommandClassEnhancer { /** * * @param featureMethod a non-{@code null} object representing the method call * producing the {@link Command} object. * @return {@code null} if no additional behavior. Otherwise, returns a {@code Map} * containing interfaces to implement as keys for the give {@link Command}, * and a {@code Function} able to produce method bodies. * See <a href='http://www.csg.ci.i.u-tokyo.ac.jp/~chiba/javassist/tutorial/tutorial2.html#before' >Javassist tutorial</a> * for special variables to use in method bodies. */ ImmutableMap< Class< ? >, Function< Method, String > > moreImplementedInterfaces( FeatureRegistry.FeatureMethod featureMethod ) ; } interface PreambleEncoder< ENDPOINT_SPECIFIC > { void set( ENDPOINT_SPECIFIC endpointSpecific, String commandName ) ; void encode( PositionalFieldWriter positionalFieldWriter ) throws IOException ; } /** * So we can support an interleaved sequence like: timestamp, command name, session identifier. * Session identifier may be a part of the {@link DataInput} (like when reading some file), * or received from elsewhere (WebSocket session). */ interface PreambleDecoder< ENDPOINT_SPECIFIC > { /** * Updates private state so next calls to {@link #endpointSpecific()} and {@link #commandName()} * will return decoded values, until next call to {@link #decode(PositionalFieldReader)}. * @param positionalFieldReader */ void decode( PositionalFieldReader positionalFieldReader ) throws IOException ; String commandName() ; ENDPOINT_SPECIFIC endpointSpecific() ; } interface PreambleCodec< ENDPOINT_SPECIFIC > extends PreambleEncoder< ENDPOINT_SPECIFIC >, PreambleDecoder< ENDPOINT_SPECIFIC > { } public static String argumentName( final Type type, final int index ) { checkArgument( index >= 0 ) ; return CaseFormat.UPPER_CAMEL.to( CaseFormat.LOWER_CAMEL, type.getTypeName() ) ; } @SuppressWarnings( "ClassExplicitlyAnnotation" ) private static class CommandDescription extends AnnotationLiteral< Command.Description > implements Command.Description { private final String name ; private final boolean persist ; private final boolean originAware ; private final boolean tracked ; public CommandDescription( final FeatureRegistry.FeatureMethod featureMethod ) { this.name = featureMethod.commandName ; this.originAware = featureMethod.commandAnnotation.originAware() ; this.persist = featureMethod.commandAnnotation.persist() ; this.tracked = featureMethod.commandAnnotation.tracked() ; } @Override public String name() { return name ; } @Override public boolean tracked() { return tracked ; } } }
40.584071
130
0.709914
9c88e55a03192855e26b44b77c380933376dfd11
4,668
ps1
PowerShell
deploy-bginfo.ps1
cetechllc/sysinternals-bginfo
f5e5ef075d256e2612d1ef3270017e7150c71d2f
[ "MIT" ]
null
null
null
deploy-bginfo.ps1
cetechllc/sysinternals-bginfo
f5e5ef075d256e2612d1ef3270017e7150c71d2f
[ "MIT" ]
null
null
null
deploy-bginfo.ps1
cetechllc/sysinternals-bginfo
f5e5ef075d256e2612d1ef3270017e7150c71d2f
[ "MIT" ]
null
null
null
## Variables $bgInfoFolder = "C:\BgInfo" $bgInfoFolderContent = $bgInfoFolder + "\*" $itemType = "Directory" $bgInfoUrl = "https://download.sysinternals.com/files/BGInfo.zip" $bgInfoZip = "C:\BgInfo\BGInfo.zip" $bgInfoEula = "C:\BgInfo\Eula.txt" $logonBgiUrl = "https://github.com/cetechllc/sysinternals-bginfo/raw/main/logonbgi.zip" $logonBgiZip = "C:\BgInfo\LogonBgi.zip" $bgInfoRegPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" $bgInfoRegKey = "BgInfo" $bgInfoRegType = "String" $bgInfoRegKeyValue = "C:\BgInfo\Bginfo64.exe C:\BgInfo\logon.bgi /timer:0 /nolicprompt" $regKeyExists = (Get-Item $bgInfoRegPath -EA Ignore).Property -contains $bgInfoRegkey $writeEmptyLine = "`n" $writeSeperator = " - " $time = Get-Date -UFormat "%A %m/%d/%Y %R" $foregroundColor1 = "Yellow" $foregroundColor2 = "Red" ##------------------------------------------------------------------------------------------------------------------------------------------------------- ## Write Download started Write-Host ($writeEmptyLine + "# BgInfo download started" + $writeSeperator + $time)` -foregroundcolor $foregroundColor1 $writeEmptyLine ##------------------------------------------------------------------------------------------------------------------------------------------------------- ## Create BgInfo folder on C: if not exists, else delete its content If (!(Test-Path -Path $bgInfoFolder)){New-Item -ItemType $itemType -Force -Path $bgInfoFolder Write-Host ($writeEmptyLine + "# BgInfo folder created" + $writeSeperator + $time)` -foregroundcolor $foregroundColor1 $writeEmptyLine }Else{Write-Host ($writeEmptyLine + "# BgInfo folder already exists" + $writeSeperator + $time)` -foregroundcolor $foregroundColor2 $writeEmptyLine Remove-Item $bgInfoFolderContent -Force -Recurse -ErrorAction SilentlyContinue Write-Host ($writeEmptyLine + "# Content existing BgInfo folder deleted" + $writeSeperator + $time)` -foregroundcolor $foregroundColor2 $writeEmptyLine} ##------------------------------------------------------------------------------------------------------------------------------------------------------- ## Download, save and extract latest BGInfo software to C:\BgInfo Import-Module BitsTransfer Start-BitsTransfer -Source $bgInfoUrl -Destination $bgInfoZip Expand-Archive -LiteralPath $bgInfoZip -DestinationPath $bgInfoFolder -Force Remove-Item $bgInfoZip Remove-Item $bgInfoEula Write-Host ($writeEmptyLine + "# bginfo.exe available" + $writeSeperator + $time)` -foregroundcolor $foregroundColor1 $writeEmptyLine ##------------------------------------------------------------------------------------------------------------------------------------------------------- ## Download, save and extract logon.bgi file to C:\BgInfo Invoke-WebRequest -Uri $logonBgiUrl -OutFile $logonBgiZip Expand-Archive -LiteralPath $logonBgiZip -DestinationPath $bgInfoFolder -Force Remove-Item $logonBgiZip Write-Host ($writeEmptyLine + "# logon.bgi available" + $writeSeperator + $time)` -foregroundcolor $foregroundColor1 $writeEmptyLine ##------------------------------------------------------------------------------------------------------------------------------------------------------- ## Create BgInfo Registry Key to AutoStart If ($regKeyExists -eq $True){Write-Host ($writeEmptyLine + "BgInfo regkey exists, script wil go on" + $writeSeperator + $time)` -foregroundcolor $foregroundColor2 $writeEmptyLine }Else{ New-ItemProperty -Path $bgInfoRegPath -Name $bgInfoRegkey -PropertyType $bgInfoRegType -Value $bgInfoRegkeyValue Write-Host ($writeEmptyLine + "# BgInfo regkey added" + $writeSeperator + $time)` -foregroundcolor $foregroundColor1 $writeEmptyLine} ##------------------------------------------------------------------------------------------------------------------------------------------------------- ## Run BgInfo C:\BgInfo\Bginfo64.exe C:\BgInfo\logon.bgi /timer:0 /nolicprompt Write-Host ($writeEmptyLine + "# BgInfo has ran for the first time" + $writeSeperator + $time)` -foregroundcolor $foregroundColor1 $writeEmptyLine ##------------------------------------------------------------------------------------------------------------------------------------------------------- ## Exit PowerShell window 2 seconds after completion Write-Host ($writeEmptyLine + "# Script completed, the PowerShell window will close in 2 seconds" + $writeSeperator + $time)` -foregroundcolor $foregroundColor2 $writeEmptyLine Start-Sleep 2 stop-process -Id $PID ##-------------------------------------------------------------------------------------------------------------------------------------------------------
50.193548
154
0.562554
12f7e4231df53bf3043fc3883ab2cd57a5f3b4cf
2,351
html
HTML
index.html
telega/MuxTool
3b381b095c2d259b4338f839c1e8b56c9367b5d6
[ "MIT" ]
null
null
null
index.html
telega/MuxTool
3b381b095c2d259b4338f839c1e8b56c9367b5d6
[ "MIT" ]
null
null
null
index.html
telega/MuxTool
3b381b095c2d259b4338f839c1e8b56c9367b5d6
[ "MIT" ]
null
null
null
<!DOCTYPE html> <html> <head> <title>MuxTool</title> <!-- Stylesheets --> <link rel="stylesheet" href="css/photon.min.css"> <link rel="stylesheet" href="css/app.css"> <!-- Electron Javascript --> <script src="app.js" charset="utf-8"></script> <!--<script src="js/menu.js" charset="utf-8"></script>--> <script src="js/progressbar.min.js" charset="utf-8"></script> </head> <body> <!-- Wrap your entire app inside .window --> <div class="window"> <div class="window-content"> <div class="pane-group"> <div id="video_file_pane" class="pane sidebar"> &nbsp;<span class="icon icon-video"></span> <br> <div class = 'pane-content'> Drag &amp; Drop <strong> video</strong> file here. <div id="video_file" class = 'filename'>No file Selected.</div> <div id="video_file_path" class = 'pathname' ></div> </div> </div> <div id="audio_file_pane" class="pane sidebar"> &nbsp;<span class="icon icon-sound"></span> <br> <div class = 'pane-content'> Drag &amp; Drop <strong> audio</strong> file here. <div id="audio_file" class = 'filename'>No file Selected.</div> <div id="audio_file_path" class = 'pathname'></div> </div> </div> <div class="pane"> &nbsp;<span class="icon icon-drive"></span> <br> <div class = 'pane-content'> <button id="create-new-file" class="btn btn-default">Select Output Destination </button> <br> <div id="output_file" class = 'filename'>Output not set.</div> <div id="output_file_path" class = 'pathname'></div> <div id = "progress_container"> Mux Progress: <div id = "progress"></div> </div> </div> </div> </div> </div> <footer class="toolbar toolbar-footer"> <div class="toolbar-actions"> <button id = "reset_button" class="btn btn-default"> Reset </button> <button id="mux_button" class="btn btn-negative pull-right"> Mux </button> </div> </footer> </div> <script> require('./renderer.js') </script> </body> </html>
32.652778
100
0.524883
fb89ee70f9e2eb452b2c967b937f0b8a042a918c
2,868
java
Java
src/main/java/pythagoras/f/Transforms.java
Lai999/pythagoras
b8fea743ee8a7d742ad9c06ee4f11f50571fbd32
[ "Apache-2.0" ]
23
2015-02-26T10:54:14.000Z
2021-02-26T20:33:54.000Z
src/main/java/pythagoras/f/Transforms.java
Lai999/pythagoras
b8fea743ee8a7d742ad9c06ee4f11f50571fbd32
[ "Apache-2.0" ]
3
2015-02-04T19:26:30.000Z
2018-11-19T09:03:58.000Z
src/main/java/pythagoras/f/Transforms.java
Lai999/pythagoras
b8fea743ee8a7d742ad9c06ee4f11f50571fbd32
[ "Apache-2.0" ]
8
2015-02-04T07:28:59.000Z
2019-07-30T17:07:56.000Z
// // Pythagoras - a collection of geometry classes // http://github.com/samskivert/pythagoras package pythagoras.f; /** * {@link Transform} related utility methods. */ public class Transforms { /** * Creates and returns a new shape that is the supplied shape transformed by this transform's * matrix. */ public static IShape createTransformedShape (Transform t, IShape src) { if (src == null) { return null; } if (src instanceof Path) { return ((Path)src).createTransformedShape(t); } PathIterator path = src.pathIterator(t); Path dst = new Path(path.windingRule()); dst.append(path, false); return dst; } /** * Multiplies the supplied two affine transforms, storing the result in {@code into}. {@code * into} may refer to the same instance as {@code a} or {@code b}. * @return {@code into} for chaining. */ public static <T extends Transform> T multiply (AffineTransform a, AffineTransform b, T into) { return multiply(a.m00, a.m01, a.m10, a.m11, a.tx, a.ty, b.m00, b.m01, b.m10, b.m11, b.tx, b.ty, into); } /** * Multiplies the supplied two affine transforms, storing the result in {@code into}. {@code * into} may refer to the same instance as {@code a}. * @return {@code into} for chaining. */ public static <T extends Transform> T multiply ( AffineTransform a, float m00, float m01, float m10, float m11, float tx, float ty, T into) { return multiply(a.m00, a.m01, a.m10, a.m11, a.tx, a.ty, m00, m01, m10, m11, tx, ty, into); } /** * Multiplies the supplied two affine transforms, storing the result in {@code into}. {@code * into} may refer to the same instance as {@code b}. * @return {@code into} for chaining. */ public static <T extends Transform> T multiply ( float m00, float m01, float m10, float m11, float tx, float ty, AffineTransform b, T into) { return multiply(m00, m01, m10, m11, tx, ty, b.m00, b.m01, b.m10, b.m11, b.tx, b.ty, into); } /** * Multiplies the supplied two affine transforms, storing the result in {@code into}. * @return {@code into} for chaining. */ public static <T extends Transform> T multiply ( float am00, float am01, float am10, float am11, float atx, float aty, float bm00, float bm01, float bm10, float bm11, float btx, float bty, T into) { into.setTransform(am00 * bm00 + am10 * bm01, am01 * bm00 + am11 * bm01, am00 * bm10 + am10 * bm11, am01 * bm10 + am11 * bm11, am00 * btx + am10 * bty + atx, am01 * btx + am11 * bty + aty); return into; } }
38.24
100
0.581241
b843aad1b858923a62150be4131d1b5a370f4403
3,969
rs
Rust
src/dfx/src/lib/ledger_types/mod.rs
jzxchiang1/sdk
f6f5322380fdc2fe9d88847494d249939fab6f03
[ "Apache-2.0" ]
null
null
null
src/dfx/src/lib/ledger_types/mod.rs
jzxchiang1/sdk
f6f5322380fdc2fe9d88847494d249939fab6f03
[ "Apache-2.0" ]
null
null
null
src/dfx/src/lib/ledger_types/mod.rs
jzxchiang1/sdk
f6f5322380fdc2fe9d88847494d249939fab6f03
[ "Apache-2.0" ]
null
null
null
// DISCLAIMER: // Do not modify this file arbitrarily. // The contents are borrowed from: // https://gitlab.com/dfinity-lab/public/ic/-/blob/master/rs/rosetta-api/ledger_canister/src/lib.rs use crate::lib::nns_types::account_identifier::Subaccount; use crate::lib::nns_types::icpts::ICPTs; use crate::lib::nns_types::{account_identifier, icpts}; use candid::CandidType; use ic_types::principal::Principal; use serde::{Deserialize, Serialize}; use std::fmt; /// Id of the ledger canister on the IC. pub const MAINNET_LEDGER_CANISTER_ID: Principal = Principal::from_slice(&[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x01]); pub const MAINNET_CYCLE_MINTER_CANISTER_ID: Principal = Principal::from_slice(&[0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x01]); pub type AccountIdBlob = [u8; 32]; /// Arguments for the `transfer` call. #[derive(CandidType)] pub struct TransferArgs { pub memo: Memo, pub amount: ICPTs, pub fee: ICPTs, pub from_subaccount: Option<Subaccount>, pub to: AccountIdBlob, pub created_at_time: Option<TimeStamp>, } /// Result of the `transfer` call. pub type TransferResult = Result<BlockHeight, TransferError>; /// Error of the `transfer` call. #[derive(CandidType, Serialize, Deserialize, Clone, Debug, PartialEq, Eq)] pub enum TransferError { BadFee { expected_fee: ICPTs }, InsufficientFunds { balance: ICPTs }, TxTooOld { allowed_window_nanos: u64 }, TxCreatedInFuture, TxDuplicate { duplicate_of: BlockHeight }, } impl fmt::Display for TransferError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { Self::BadFee { expected_fee } => { write!(f, "transaction fee should be {}", expected_fee) } Self::InsufficientFunds { balance } => { write!( f, "the debit account doesn't have enough funds to complete the transaction, current balance: {}", balance ) } Self::TxTooOld { allowed_window_nanos, } => write!( f, "transaction is older than {} seconds", allowed_window_nanos / 1_000_000_000 ), Self::TxCreatedInFuture => write!(f, "transaction's created_at_time is in future"), Self::TxDuplicate { duplicate_of } => write!( f, "transaction is a duplicate of another transaction in block {}", duplicate_of ), } } } #[derive(CandidType, Deserialize)] pub enum CyclesResponse { CanisterCreated(Principal), ToppedUp(()), Refunded(String, Option<BlockHeight>), } /// Position of a block in the chain. The first block has position 0. pub type BlockHeight = u64; #[derive( Serialize, Deserialize, CandidType, Clone, Copy, Hash, Debug, PartialEq, Eq, PartialOrd, Ord, )] pub struct Memo(pub u64); impl Default for Memo { fn default() -> Memo { Memo(0) } } #[derive(CandidType)] pub struct AccountBalanceArgs { pub account: String, } #[derive(CandidType)] pub struct TimeStamp { pub timestamp_nanos: u64, } #[derive(CandidType)] pub struct NotifyCanisterArgs { pub block_height: BlockHeight, pub max_fee: icpts::ICPTs, pub from_subaccount: Option<account_identifier::Subaccount>, pub to_canister: Principal, pub to_subaccount: Option<account_identifier::Subaccount>, } #[cfg(test)] mod tests { use super::*; #[test] fn test_ledger_canister_id() { assert_eq!( MAINNET_LEDGER_CANISTER_ID, Principal::from_text("ryjl3-tyaaa-aaaaa-aaaba-cai").unwrap() ); } #[test] fn test_cycle_minter_canister_id() { assert_eq!( MAINNET_CYCLE_MINTER_CANISTER_ID, Principal::from_text("rkp4c-7iaaa-aaaaa-aaaca-cai").unwrap() ); } }
28.970803
115
0.633409
c283136ca46080bae7c83b0ced9ce5d9e04ab751
694
go
Go
day01/main_test.go
fleaz/AoC-2019
5a4cbbce158be03a38e434bd19ffa04693426928
[ "MIT" ]
2
2019-12-02T23:36:21.000Z
2019-12-04T16:34:30.000Z
day01/main_test.go
fleaz/AoC-2019
5a4cbbce158be03a38e434bd19ffa04693426928
[ "MIT" ]
1
2019-12-02T17:20:20.000Z
2019-12-02T21:52:24.000Z
day01/main_test.go
fleaz/AoC-2019
5a4cbbce158be03a38e434bd19ffa04693426928
[ "MIT" ]
null
null
null
package main import "testing" type testpair struct { mass int wantFuel int } func TestCalculateFuel(t *testing.T) { pairs := []testpair{ {12, 2}, {14, 2}, {1969, 654}, {100756, 33583}, } for _, p := range pairs { isFuel := calculateFuel(p.mass) if isFuel != p.wantFuel { t.Errorf("Wanted %d fuel for mass %d but got %d", p.wantFuel, p.mass, isFuel) } } } func TestComplexCalculateFuel(t *testing.T) { pairs := []testpair{ {14, 2}, {1969, 966}, {100756, 50346}, } for _, p := range pairs { isFuel := complexCalculateFuel(p.mass) if isFuel != p.wantFuel { t.Errorf("Wanted %d fuel for mass %d but got %d", p.wantFuel, p.mass, isFuel) } } }
15.772727
80
0.60951
4a2c8488f78d940bea2dccee2cc144f21f90f2cf
1,463
js
JavaScript
test/03-ep-extension.setup.js
stefanwalther/qrs
772d7d7dc48552d419d062c312da18c6ef08c885
[ "MIT" ]
19
2015-10-02T05:44:17.000Z
2020-06-04T02:29:00.000Z
test/03-ep-extension.setup.js
stefanwalther/qrs
772d7d7dc48552d419d062c312da18c6ef08c885
[ "MIT" ]
19
2015-10-19T12:06:15.000Z
2019-11-23T22:27:51.000Z
test/03-ep-extension.setup.js
stefanwalther/qrs
772d7d7dc48552d419d062c312da18c6ef08c885
[ "MIT" ]
7
2015-10-13T17:59:41.000Z
2022-02-27T23:16:56.000Z
'use strict'; var zipper = require( 'zip-local' ); var fs = require( 'fs' ); var path = require( 'path' ); var rimraf = require( 'rimraf' ); var async = require( 'async' ); var ExtensionSetup = function () { var extensions = []; var init = function ( callback ) { var dirToScan = path.join( __dirname, './fixtures/extensions' ); fs.readdir( dirToScan, function ( err, files ) { var extensionDirs = files.map( function ( file ) { return path.join( dirToScan, file ); } ).filter( function ( file ) { return fs.statSync( file ).isDirectory(); } ); async.map( extensionDirs, function ( file, cb ) { var zipSource = path.normalize( file ); var fi = path.parse( file ); var zipDest = path.normalize( path.join( fi.dir, fi.base + '.zip' )); rimraf( zipDest, function ( /* err */ ) { zipper.sync.zip( zipSource ).compress().save( zipDest ); var ext = { 'name': fi.base, 'file': zipDest }; cb( null, ext ); } ); }, function ( err, results ) { extensions = results; callback( err, results ); } ); } ); }; var cleanExtZipFiles = function ( callback ) { async.map( extensions, function ( ext, cb ) { rimraf( ext.file, function ( err ) { cb( null, ext); }); }, function ( err, results ) { callback( null, results); }); }; return { init: init, extensions: extensions, cleanExtZipFiles: cleanExtZipFiles } }; module.exports = ExtensionSetup;
23.222222
73
0.595352
e878363c6eefa27176062a04ba177b9e5ee6b882
3,586
cpp
C++
Visual Studio 2010/Projects/bjarneStroustrupC++PartIV/bjarneStroustrupC++PartIV/Chapter27Exercise8.cpp
Ziezi/Programming-Principles-and-Practice-Using-C-by-Bjarne-Stroustrup-
6fd64801863e883508f15d16398744405f4f9e34
[ "Unlicense" ]
9
2018-10-24T15:16:47.000Z
2021-12-14T13:53:50.000Z
Visual Studio 2010/Projects/bjarneStroustrupC++PartIV/bjarneStroustrupC++PartIV/Chapter27Exercise8.cpp
ChrisBKirov/Programming-Principles-and-Practice-Using-C-by-Bjarne-Stroustrup-
6fd64801863e883508f15d16398744405f4f9e34
[ "Unlicense" ]
null
null
null
Visual Studio 2010/Projects/bjarneStroustrupC++PartIV/bjarneStroustrupC++PartIV/Chapter27Exercise8.cpp
ChrisBKirov/Programming-Principles-and-Practice-Using-C-by-Bjarne-Stroustrup-
6fd64801863e883508f15d16398744405f4f9e34
[ "Unlicense" ]
7
2018-10-29T15:30:37.000Z
2021-01-18T15:15:09.000Z
/* TITLE Machine Lexicographical Order Chapter27Exercise8.cpp COMMENT Objective: What is the lexicographical order on your machine? Write out every character on your keyboard together with its integer value; then, write the characters out in the order determined by their integer value. Input: - Output: - Author: Chris B. Kirov Date: 15.06.2017 */ #include <iostream> #include <fstream> #include <sstream> #include <string> #include <vector> #include <map> void read_key_values(std::vector<std::string>& keys, std::vector<int>& key_values) { std::cout <<"Type the key you see:\n"; for (std::size_t i = 0; i < keys.size(); ++i) { std::cout <<"Type: "<< keys[i] <<": "; std::string line; getline(std::cin, line); std::stringstream ss(line); char key; ss >> key; std::cout <<"integer value: "<< int(key) <<'\n'; key_values.emplace_back(int(key)); } std::cout <<"Done.\n"; } //-------------------------------------------------------------------------------- void write_to_stream(std::vector<std::string>& keys, std::vector<int>& key_values, std::ostream& os) { std::map<int, std::string> value_name; for (std::size_t i = 0; i < keys.size(); ++i) { value_name.emplace(std::make_pair(key_values[i], keys[i])); } os <<"integer value\tkeyboard character name\n"; for (auto it = value_name.begin(); it != value_name.end(); ++it) { os << it->first <<"\t"<< it->second <<'\n'; } } //-------------------------------------------------------------------------------- void populate_keys(std::vector<std::string>& keys) { // keyboard except (windows) control keys keys.emplace_back("`"); keys.emplace_back("1"); keys.emplace_back("2"); keys.emplace_back("3"); keys.emplace_back("4"); keys.emplace_back("5"); keys.emplace_back("6"); keys.emplace_back("7"); keys.emplace_back("8"); keys.emplace_back("9"); keys.emplace_back("0"); keys.emplace_back("-"); keys.emplace_back("="); keys.emplace_back("q"); keys.emplace_back("w"); keys.emplace_back("e"); keys.emplace_back("r"); keys.emplace_back("t"); keys.emplace_back("y"); keys.emplace_back("u"); keys.emplace_back("i"); keys.emplace_back("o"); keys.emplace_back("p"); keys.emplace_back("["); keys.emplace_back("]"); keys.emplace_back("\\");keys.emplace_back("a"); keys.emplace_back("s"); keys.emplace_back("d"); keys.emplace_back("f"); keys.emplace_back("g"); keys.emplace_back("h"); keys.emplace_back("j"); keys.emplace_back("k"); keys.emplace_back("l"); keys.emplace_back(";"); keys.emplace_back("'"); keys.emplace_back("z"); keys.emplace_back("x"); keys.emplace_back("c"); keys.emplace_back("v"); keys.emplace_back("b"); keys.emplace_back("n"); keys.emplace_back("m"); keys.emplace_back(","); keys.emplace_back("."); keys.emplace_back("/"); keys.emplace_back("/"); keys.emplace_back("*"); keys.emplace_back("."); keys.emplace_back("+"); keys.emplace_back("-"); keys.emplace_back("7"); keys.emplace_back("8"); keys.emplace_back("9"); keys.emplace_back("4"); keys.emplace_back("5"); keys.emplace_back("6"); keys.emplace_back("1"); keys.emplace_back("2"); keys.emplace_back("3"); keys.emplace_back("0"); } //-------------------------------------------------------------------------------- int main() { std::vector<std::string> keys; std::vector<int> key_values; populate_keys(keys); read_key_values(keys, key_values); std::string n("Chapter27Exercise8.txt"); std::ofstream ofs(n.c_str()); if (!ofs) { throw std::runtime_error("Can't open file!\n"); } write_to_stream(keys, key_values, ofs); ofs.close(); }
36.222222
120
0.618516
96176edd01baab777bd2a346ceabae9d79b90529
4,777
swift
Swift
09-1.ObjModelLoader/ObjModelLoader/ObjLoader/Geometry.swift
newpolaris/LearningOpenGLES2
8fdf880f27c971984096b0fc1dc549c461fedb0c
[ "MIT" ]
null
null
null
09-1.ObjModelLoader/ObjModelLoader/ObjLoader/Geometry.swift
newpolaris/LearningOpenGLES2
8fdf880f27c971984096b0fc1dc549c461fedb0c
[ "MIT" ]
null
null
null
09-1.ObjModelLoader/ObjModelLoader/ObjLoader/Geometry.swift
newpolaris/LearningOpenGLES2
8fdf880f27c971984096b0fc1dc549c461fedb0c
[ "MIT" ]
null
null
null
// // Geometry.swift // SwiftObjLoader // // Created by Hugo Tunius on 02/09/15. // Copyright © 2015 Hugo Tunius. All rights reserved. // import Foundation #if os(Linux) import Glibc #else import Darwin.C #endif // An n dimensional vector // repreented by a double array public typealias Vector = [Double] open class VertexIndex { // Vertex index, zero-based open let vIndex: Int? // Normal index, zero-based open let nIndex: Int? // Texture Coord index, zero-based open let tIndex: Int? init(vIndex: Int?, nIndex: Int?, tIndex: Int?) { self.vIndex = vIndex self.nIndex = nIndex self.tIndex = tIndex } } extension VertexIndex: Equatable {} public func ==(lhs: VertexIndex, rhs: VertexIndex) -> Bool { return lhs.vIndex == rhs.vIndex && lhs.nIndex == rhs.nIndex && lhs.tIndex == rhs.tIndex } extension VertexIndex: CustomStringConvertible { public var description: String { return "\(vIndex)/\(nIndex)/\(tIndex)" } } // Consider converting this to a class. // Since it's already immutable it would // remain thread safe and needless copying // would stop. Also applies to Material open class Shape { open let name: String? open let vertices: [Vector] open let normals: [Vector] open let textureCoords: [Vector] open let material: Material? // Definition of faces that make up the shape // indexes are into the vertices, normals and // texture coords of this shape // // Example: // VertexIndex(vIndex: 4, nIndex: 2, tIndex: 0) // Refers to vertices[4], normals[2] and textureCoords[0] // open let faces: [[VertexIndex]] public init(name: String?, vertices: [Vector], normals: [Vector], textureCoords: [Vector], material: Material?, faces: [[VertexIndex]]) { self.name = name self.vertices = vertices self.normals = normals self.textureCoords = textureCoords self.material = material self.faces = faces } public final func dataForVertexIndex(_ v: VertexIndex) -> (Vector?, Vector?, Vector?) { var data: (Vector?, Vector?, Vector?) = (nil, nil, nil) if let vi = v.vIndex { data.0 = vertices[vi] } if let ni = v.nIndex { data.1 = normals[ni] } if let ti = v.tIndex { data.2 = textureCoords[ti] } return data } } extension Shape: Equatable {} // From http://floating-point-gui.de/errors/comparison/ private func doubleEquality(_ a: Double, _ b: Double) -> Bool { let diff = abs(a - b) if a == b { // shortcut for infinities return true } else if (a == 0 || b == 0 || diff < .leastNormalMagnitude) { return diff < (1e-5 * .leastNormalMagnitude) } else { let absA = abs(a) let absB = abs(b) return diff / min((absA + absB), .greatestFiniteMagnitude) < 1e-5 } } private func nestedEquality<T>(_ lhs: [[T]], _ rhs: [[T]], equal: ([T], [T]) -> Bool) -> Bool { if lhs.count != rhs.count { return false } for i in 0..<lhs.count { if false == equal(lhs[i], rhs[i]) { return false } } return true } public func ==(lhs: Shape, rhs: Shape) -> Bool { if lhs.name != rhs.name { return false } let lengthCheck: (Vector, Vector) -> Bool = { a, b in a.count == b.count } if !nestedEquality(lhs.vertices, rhs.vertices, equal: lengthCheck) || !nestedEquality(lhs.normals, rhs.normals, equal: lengthCheck) || !nestedEquality(lhs.textureCoords, rhs.textureCoords, equal: lengthCheck) { return false } let valueCheck: (Vector, Vector) -> Bool = { a, b in for i in 0..<a.count { if !doubleEquality(a[i], b[i]) { return false } } return true } if !nestedEquality(lhs.vertices, rhs.vertices, equal: valueCheck) || !nestedEquality(lhs.normals, rhs.normals, equal: valueCheck) || !nestedEquality(lhs.textureCoords, rhs.textureCoords, equal: valueCheck) { return false } if !nestedEquality(lhs.faces, rhs.faces, equal: { $0.count == $1.count }) { return false } let vertexIndexCheck: ([VertexIndex], [VertexIndex]) -> Bool = { a, b in for i in 0..<a.count { if a[i] != b[i] { return false } } return true } if !nestedEquality(lhs.faces, rhs.faces, equal: vertexIndexCheck) { return false } if lhs.material != rhs.material { return false } return true }
25.010471
95
0.575047
d2d329b99180ba6a94043eabacf7c7ba6f4c03c3
2,471
php
PHP
database/seeders/RoleSeeder.php
alinemone/zaer
529772f32dcd735c0744cd752e05d99d175e0da9
[ "MIT" ]
null
null
null
database/seeders/RoleSeeder.php
alinemone/zaer
529772f32dcd735c0744cd752e05d99d175e0da9
[ "MIT" ]
null
null
null
database/seeders/RoleSeeder.php
alinemone/zaer
529772f32dcd735c0744cd752e05d99d175e0da9
[ "MIT" ]
null
null
null
<?php namespace Database\Seeders; use Illuminate\Database\Seeder; use Spatie\Permission\Models\Permission; use Spatie\Permission\Models\Role; class RoleSeeder extends Seeder { /** * Run the database seeds. * * @return void */ public function run() { $admin = Role::create(['name' => 'admin']); $reception = Role::create(['name' => 'reception']); $secure_man = Role::create(['name' => 'secure-man']); Permission::create(['name' => 'add-place']); Permission::create(['name' => 'edit-place']); Permission::create(['name' => 'delete-place']); Permission::create(['name' => 'add-room']); Permission::create(['name' => 'edit-room']); Permission::create(['name' => 'delete-room']); Permission::create(['name' => 'add-bed']); Permission::create(['name' => 'edit-bed']); Permission::create(['name' => 'delete-bed']); Permission::create(['name' => 'add-group']); Permission::create(['name' => 'edit-group']); Permission::create(['name' => 'delete-group']); Permission::create(['name' => 'reception']); Permission::create(['name' => 'clearance']); Permission::create(['name' => 'add-servant']); Permission::create(['name' => 'edit-servant']); Permission::create(['name' => 'delete-servant']); Permission::create(['name' => 'reception-servant']); Permission::create(['name' => 'check-reception']); $admin->syncPermissions([ 'add-place', 'edit-place', 'delete-place', 'add-room', 'edit-room', 'delete-room', 'add-bed', 'edit-bed', 'delete-bed', 'reception', 'clearance', 'check-reception', 'add-servant', 'edit-servant', 'delete-servant', 'reception-servant', 'add-group', 'edit-group', 'delete-group', ]); $reception->syncPermissions([ 'edit-place', 'edit-room', 'edit-bed', 'reception', 'clearance', 'check-reception', 'reception-servant', 'add-group', 'edit-group', 'delete-group', ]); $secure_man->syncPermissions([ 'check-reception' ]); } }
26.569892
61
0.491299
04b7e95148afcf0e3bb1c63c2f2a3d3aa325fd9b
68
java
Java
src/test/resources/miniJava/pa1_tests/pass133.java
eric-unc/520-compiler
6ff258bf3eae79db237f71832aec6b3f8926350b
[ "Unlicense" ]
null
null
null
src/test/resources/miniJava/pa1_tests/pass133.java
eric-unc/520-compiler
6ff258bf3eae79db237f71832aec6b3f8926350b
[ "Unlicense" ]
null
null
null
src/test/resources/miniJava/pa1_tests/pass133.java
eric-unc/520-compiler
6ff258bf3eae79db237f71832aec6b3f8926350b
[ "Unlicense" ]
null
null
null
// PA1 lex comment pass class // comment followed by \r only id {}
22.666667
36
0.676471
12d759ed78315543a064c0331548ac68471b19e9
24,580
html
HTML
docs/index.html
ibeeliot/ReacTypeWeb
1ef606dfea4d78df91a1230b10498e3a1ce09d48
[ "MIT" ]
1
2020-04-03T20:07:47.000Z
2020-04-03T20:07:47.000Z
docs/index.html
ibeeliot/ReacTypeWeb
1ef606dfea4d78df91a1230b10498e3a1ce09d48
[ "MIT" ]
null
null
null
docs/index.html
ibeeliot/ReacTypeWeb
1ef606dfea4d78df91a1230b10498e3a1ce09d48
[ "MIT" ]
2
2020-04-08T19:33:27.000Z
2020-04-09T17:05:43.000Z
<!DOCTYPE html> <html> <head> <title>ReacType has arrived</title> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" /> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" /> <link rel="stylesheet" href="./static/css/main.css" /> <link rel="stylesheet" href="./static/css/noscript.css" /> <link rel="stylesheet" href="./static/css/fontawesome-all.min.css" /> </head> <body class="is-preload landing"> <div id="page-wrapper"> <!-- Header --> <header id="header"> <h1 id="logo"> <a href="./index.html" ><img class="logo-main" src="./static/images/512x512.png" /></a> </h1> <nav id="nav"> <ul> <li><a href="index.html">Home</a></li> <li></li> <li><a href="#six">Meet Us!</a></li> <li> <a href="#" class="button primary" id="download" onclick="operatingSytem()" >Download</a > </li> </ul> </nav> </header> <!-- Banner --> <section id="banner" class="home_wave"> <div class="content"> <center> <header> <h2 id="big-title">Prototype React Better</h2> <p> Design your next React application with ReacType.<br /> You never need to download a boilerplate ever again. </p> </header> </center> <!-- <span class="image"><img src="images/pic01.jpg" alt=""/></span> --> <!-- CAROUSEL --> <!-- <center> <div id="fullCarousel" name="fullCarousel" class="flex-container"> <div id="demo" class="carousel slide" data-ride="carousel"> Indicators --> <!-- <ol class="carousel-indicators"> <li data-target="#demo" data-slide-to="0" class="active"></li> <li data-target="#demo" data-slide-to="1"></li> <li data-target="#demo" data-slide-to="2"></li> <li data-target="#demo" data-slide-to="3"></li> <li data-target="#demo" data-slide-to="4"></li> <li data-target="#demo" data-slide-to="5"></li> </ol> --> <!-- The slideshow --> <!-- <div class="carousel-inner"> <div class="carousel-item active"> <img class="d-block w-100" src="./assets/ReacType/Main.png" alt="Los Angeles" width="1100" height="500" /> </div> <div class="carousel-item"> <img class="d-block w-100" src="./assets/ReacType/ApplicationTree.png" alt="Chicago" width="1100" height="500" /> </div> <div class="carousel-item"> <img class="d-block w-100" src="./assets/ReacType/Canvas-parent-child.resuable.png" alt="New York" width="1100" height="500" /> </div> <div class="carousel-item"> <img class="d-block w-100" src="./assets/ReacType/CodePreview.png" alt="New York" width="1100" height="500" /> </div> <div class="carousel-item"> <img class="d-block w-100" src="./assets/ReacType/HTML.png" alt="New York" width="1100" height="500" /> </div> <div class="carousel-item"> <img class="d-block w-100" src="./assets/ReacType/Props.png" alt="New York" width="1100" height="500" /> </div> </div> --> <!-- Left and right controls --> <!-- <a class="carousel-control-prev" href="#demo" data-slide="prev" role="button" > <span class="carousel-control-prev-icon" aria-hidden="true" ><span class="sr-only">Previous</span></span > </a> <a class="carousel-control-next" href="#demo" data-slide="next" role="button" > <span class="carousel-control-next-icon" aria-hidden="true" ><span class="sr-only">Next</span></span > </a> </div> --> <!-- end of carousel --> <!-- </div> </center> --> </div> <a href="#one" class="goto-next scrolly"></a> </section> <!-- One --> <section id="one" class="spotlight style1 bottom"> <span class="image fit main flex-container" ><img src="./static/ReacType/d3-tree.gif" alt="" /></span> <div class="content"> <div class="container"> <div class="row"> <div class="col-6 col-12-medium"> <header> <h2>Your Application Tree Visualized</h2> <p> See your application hierachy with D3's powerful data visualizer. The tree diagram also allows you to seamlessly navigate through your project. </p> </header> </div> <div class="col-6 col-12-medium"> <p> React's component hierarchy can get complicated as a project grows. This D3 diagram allows you to easily understand the data flow of your application, and quickly identify potential bugs. </p> </div> </div> </div> <ul class="actions"> <li><a href="#" id="tree-btn" class="button">Learn More</a></li> </ul> </div> <a href="#two" class="goto-next scrolly">Next</a> </section> <!-- Two --> <section id="two" class="spotlight style2 right"> <span class="image fit main flex-container" ><img src="./static/ReacType/reusablecomponents.gif" alt="" /></span> <div class="content"> <header> <h2>Create Reusable Components</h2> <p>Quickly harness the power of React</p> </header> <p> Reusing children components can be done quickly and seemlessly, without having to worry about importing components - ReacType handles that for you. </p> <ul class="actions"> <li><a href="#" class="button">Learn More</a></li> </ul> </div> <a href="#three" class="goto-next scrolly">Next</a> </section> <!-- Three --> <section id="three" class="spotlight style3 left"> <span class="image fit main bottom flex-container" ><img src="./static/ReacType/reusablecomponents.gif" alt="" /></span> <div class="content"> <header> <h2>You Can Always See Your Code</h2> <p>Code preview allows for your to see your application logic</p> </header> <p> Don't worry about things like typos or syntax errors, because ReacType handles all of that for you so you can just focus on coding. </p> <ul class="actions"> <li><a href="#" class="button">Learn More</a></li> </ul> </div> <a href="#four" class="goto-next scrolly">Next</a> </section> <!-- Four --> <section id="four" class="spotlight style2 right"> <span class="image fit main flex-container" ><img src="./static/ReacType/native-import.gif" alt="" /></span> <div class="content"> <header> <h2>Add HTML or Native to your application</h2> <p> Elements or Native Components can be easily added to any React component </p> </header> <p> Transitioning between React and React Native is made easy through the use of our commonly used elements/components panel that allows you to quickly implement the style you want in your app. </p> <ul class="actions"> <li><a href="#" class="button">Learn More</a></li> </ul> </div> <a href="#five" class="goto-next scrolly">Next</a> </section> <!-- Five --> <section id="five" class="spotlight style3 left"> <span class="image fit main bottom flex-container" ><img src="./static/ReacType/adding-props.gif" alt="" /></span> <div class="content"> <header> <h2>Know your prop state at all time</h2> <p>Add and delete props from components with a few clicks</p> </header> <p> ReacType allows you to quickly specify which props will be used in your components. You can even specify the typing of those props to ensure your app works the way you want and expect it to. </p> <ul class="actions"> <li><a href="#" class="button">Learn More</a></li> </ul> </div> <a href="#six" class="goto-next scrolly">Next</a> </section> <!-- Six --> <!-- Five --> <section id="six" class="wrapper style1 special fade-up"> <div class="container"> <header class="major"> <h2>Meet The ReacType Team</h2> <p> ReacType has been a passion project for every single contributor to this open source project. Use it and let us know how it can be improved! </p> <p> <small>If you're interested, fork it!</small> </p> </header> <div class="box alt"> <div class="row gtr-uniform"> <section class="col-3 col-6-medium col-12-xsmall"> <!-- <span class="icon solid alt major fa-chart-area"> </span> --> <img class="solid alt major fa-chart-area profile-pic" src="./static/ReacType/profile-pics/smiling-sml.png" /> <h3>Eliot Nguyen</h3> <div> <a class="git-btn" href="http://www.github.com/ibeeliot" ><i class="fab fa-github fa-2x"></i ></a> <a href="http://www.linkedin.com/in/ibeeliot" ><i class="fab fa-2x fa-linkedin"></i ></a> </div> </section> <section class="col-3 col-6-medium col-12-xsmall"> <img class="solid alt major fa-chart-area profile-pic" src="./static/ReacType/profile-pics/tony-ito.png" /> <h3>Tony Ito-Cole</h3> <div> <a class="git-btn" href="http://www.github.com/tonyito" ><i class="fab fa-github fa-2x"></i ></a> <a href="http://www.linkedin.com/in/tony-ito-cole" ><i class="fab fa-2x fa-linkedin"></i ></a> </div> </section> <section class="col-3 col-6-medium col-12-xsmall"> <img class="solid alt major fa-chart-area profile-pic" src="./static/ReacType/profile-pics/sean-sadykoff.png" /> <h3>Sean Sadykoff</h3> <div> <a class="git-btn" href="http://www.github.com/sean1292" ><i class="fab fa-github fa-2x"></i ></a> <a href="http://www.linkedin.com/in/sean-sadykoff" ><i class="fab fa-2x fa-linkedin"></i ></a> </div> </section> <section class="col-3 col-6-medium col-12-xsmall"> <img class="solid alt major fa-chart-area profile-pic" style="background-color: navajowhite;" src="./static/ReacType/profile-pics/jesse-temp.png" /> <h3>Jesse Zuniga</h3> <div> <a class="git-btn" href="http://www.github.com/jzuniga206" ><i class="fab fa-github fa-2x"></i ></a> <a href="http://www.linkedin.com/in/jesse-zuniga" ><i class="fab fa-2x fa-linkedin"></i ></a> </div> </section> <!-- ReacType 2.0 Group --> <!-- Mitchel Severe --> <section class="col-3 col-6-medium col-12-xsmall"> <img class="solid alt major fa-chart-area profile-pic" style="background-color: navajowhite;" src="https://avatars1.githubusercontent.com/u/17341609?s=400&u=bf5ea363527ab7d084c0018643fef43116a42c1a&v=4" /> <h3>Mitchel Severe</h3> <div> <a class="git-btn" href="https://github.com/mitchelsevere" ><i class="fab fa-github fa-2x"></i ></a> <a href="https://www.linkedin.com/in/misevere/" ><i class="fab fa-2x fa-linkedin"></i ></a> </div> </section> <!-- Natalie Vick --> <section class="col-3 col-6-medium col-12-xsmall"> <img class="solid alt major fa-chart-area profile-pic" style="background-color: navajowhite;" src="https://avatars0.githubusercontent.com/u/56774948?s=400&u=be0a34fb191fc0684f6b786191c229e3df8eb549&v=4" /> <h3>Natalie Vick</h3> <div> <a class="git-btn" href="https://github.com/natattackvick" ><i class="fab fa-github fa-2x"></i ></a> <a href="https://www.linkedin.com/in/vicknatalie/" ><i class="fab fa-2x fa-linkedin"></i ></a> </div> </section> <!-- Chelsey Fewer --> <section class="col-3 col-6-medium col-12-xsmall"> <img class="solid alt major fa-chart-area profile-pic" style="background-color: navajowhite;" src="https://avatars2.githubusercontent.com/u/25446734?s=400&u=46e910f503a0a9402601c53f4b40522d235cbe04&v=4" /> <h3>Chelsey Fewer</h3> <div> <a class="git-btn" href="https://github.com/chelseyeslehc" ><i class="fab fa-github fa-2x"></i ></a> <a href="https://www.linkedin.com/in/chelsey-fewer/" ><i class="fab fa-2x fa-linkedin"></i ></a> </div> </section> <!-- Charles Finocchiaro --> <section class="col-3 col-6-medium col-12-xsmall"> <img class="solid alt major fa-chart-area profile-pic" style="background-color: navajowhite;" src="./static/images/GitHub-Mark-Light-120px-plus.png" /> <h3>Charles Finocchiaro</h3> <div> <a class="git-btn" href="https://github.com/null267" ><i class="fab fa-github fa-2x"></i ></a> <a href="https://www.linkedin.com/in/charles-finocchiaro-62440040/" ><i class="fab fa-2x fa-linkedin"></i ></a> </div> </section> <!-- Nel Malikova --> <section class="col-3 col-6-medium col-12-xsmall"> <img class="solid alt major fa-chart-area profile-pic" style="background-color: navajowhite;" src="https://avatars2.githubusercontent.com/u/28880819?s=400&u=e9ea7ec983a523def49d0cb323d3cc5933b30bc9&v=4" /> <h3>Nel Malikova</h3> <div> <a class="git-btn" href="https://github.com/gmal1" ><i class="fab fa-github fa-2x"></i ></a> <a href="https://www.linkedin.com/in/gmalikova/" ><i class="fab fa-2x fa-linkedin"></i ></a> </div> </section> <!-- Sophia Huttner --> <section class="col-3 col-6-medium col-12-xsmall"> <img class="solid alt major fa-chart-area profile-pic" style="background-color: navajowhite;" src="./static/images/GitHub-Mark-Light-120px-plus.png" /> <h3>Sophia Huttner</h3> <div> <a class="git-btn" href="https://github.com/sophjean" ><i class="fab fa-github fa-2x"></i ></a> <a href="https://www.linkedin.com/in/sophia-huttner-68315975/" ><i class="fab fa-2x fa-linkedin"></i ></a> </div> </section> <!-- ReacType 1.0 Group --> <!-- Tolga Mizrakci --> <section class="col-3 col-6-medium col-12-xsmall"> <img class="solid alt major fa-chart-area profile-pic" style="background-color: navajowhite;" src="https://avatars0.githubusercontent.com/u/28663725?s=400&u=ed1d64a97000f06ff98f1039ac754be01b789919&v=4" /> <h3>Tolga Mizrakci</h3> <div> <a class="git-btn" href="https://github.com/tolgamizrakci" ><i class="fab fa-github fa-2x"></i ></a> <a href="https://linkedin.com/in/tolga-mizrakci" ><i class="fab fa-2x fa-linkedin"></i ></a> </div> </section> <!-- Adam Singer --> <section class="col-3 col-6-medium col-12-xsmall"> <img class="solid alt major fa-chart-area profile-pic" style="background-color: navajowhite;" src="https://avatars3.githubusercontent.com/u/41658830?s=400&u=13e4bc8366b06677ddd1b35bea7e8dbd17f99b3a&v=4" /> <h3>Adam Singer</h3> <div> <a class="git-btn" href="https://github.com/spincycle01" ><i class="fab fa-github fa-2x"></i ></a> <a href="https://linkedin.com/in/adsing" ><i class="fab fa-2x fa-linkedin"></i ></a> </div> </section> <!-- Christian Padilla --> <section class="col-3 col-6-medium col-12-xsmall"> <img class="solid alt major fa-chart-area profile-pic" style="background-color: navajowhite;" src="./static/images/GitHub-Mark-Light-120px-plus.png" /> <h3>Christian Padilla</h3> <div> <a class="git-btn" href="https://github.com/ChristianEdwardPadilla" ><i class="fab fa-github fa-2x"></i ></a> <a href="https://linkedin.com/in/ChristianEdwardPadilla" ><i class="fab fa-2x fa-linkedin"></i ></a> </div> </section> <!-- Shlomo Porges --> <section class="col-3 col-6-medium col-12-xsmall"> <img class="solid alt major fa-chart-area profile-pic" style="background-color: navajowhite;" src="https://avatars2.githubusercontent.com/u/22139683?s=400&u=3275011002e7de4456d99648bad3e4666ae450e0&v=4" /> <h3>Shlomo Porges</h3> <div> <a class="git-btn" href="https://github.com/ShlomoPorges" ><i class="fab fa-github fa-2x"></i ></a> <a href="https://linkedin.com/in/shlomoporges" ><i class="fab fa-2x fa-linkedin"></i ></a> </div> </section> </div> </div> <footer class="major"> <ul class="actions special"> <li> <a href="https://github.com/oslabs-beta/ReacType/graphs/contributors" class="button" >Check Us Out!</a > </li> </ul> </footer> </div> </section> <!-- Six --> <section id="seven" class="wrapper style2 special fade"> <div class="container"> <header> <h2>We're on a few open source publicans!</h2> </header> <form method="post" action="#" class="cta"> <div class="row gtr-uniform gtr-50"> <div class="col-8 col-12-xsmall"> <input type="email" name="email" id="email" placeholder="Your Email Address" /> </div> <div class="col-4 col-12-xsmall"> <input type="submit" value="Get Started" class="fit primary" /> </div> </div> </form> </div> </section> <!-- Footer --> <footer id="footer"> <ul class="icons"> <li> <a href="#" class="icon brands alt fa-twitter" ><span class="label">Twitter</span></a > </li> <li> <a href="#" class="icon brands alt fa-facebook-f" ><span class="label">Facebook</span></a > </li> <li> <a href="#" class="icon brands alt fa-linkedin-in" ><span class="label">LinkedIn</span></a > </li> <li> <a href="#" class="icon brands alt fa-instagram" ><span class="label">Instagram</span></a > </li> <li> <a href="#" class="icon brands alt fa-github" ><span class="label">GitHub</span></a > </li> <li> <a href="#" class="icon solid alt fa-envelope" ><span class="label">Email</span></a > </li> </ul> <ul class="copyright"> <li>&copy; ReacThpe. All rights reserved. 2020</li> </ul> </footer> </div> <!-- Scripts --> <script src="https://cdn.jsdelivr.net/particles.js/2.0.0/particles.min.js"></script> <script src="https://threejs.org/examples/js/libs/stats.min.js"></script> <script src="./static/js/particlewaves.min.js"></script> <script src="./static/js/jquery.min.js"></script> <script src="./static/js/jquery.scrolly.min.js"></script> <script src="./static/js/jquery.dropotron.min.js"></script> <script src="./static/js/jquery.scrollex.min.js"></script> <script src="./static/js/browser.min.js"></script> <script src="./static/js/breakpoints.min.js"></script> <script src="./static/js/util.js"></script> <script src="./static/js/main.js"></script> <script> function operatingSytem() { var link = "https://github.com/oslabs-beta/ReacType/releases"; if (navigator.appVersion.indexOf("Win") != -1) link = "https://github.com/oslabs-beta/ReacType/releases/tag/Windows.2.0.0"; if (navigator.appVersion.indexOf("Mac") != -1) link = "https://github.com/oslabs-beta/ReacType/releases/tag/Mac.2.0.0"; if (navigator.appVersion.indexOf("Linux") != -1) link = "https://github.com/oslabs-beta/ReacType/releases/tag/Linux.2.0.0"; console.log(link); // Display the OS name let download = document.getElementById("download"); download.href = link; window.open(download.href); return false; } </script> </body> </html>
36.962406
126
0.470504
e90330c5ed3c97bf626ed1d81ffe0d586f7118b0
1,896
sql
SQL
Archiv/skaffold-test/Docker_Image_Postgres/kranichairline_db.sql
LennartFertig/BigData
e74761b16812fd034519c06897329ea9ba9968df
[ "Apache-2.0" ]
null
null
null
Archiv/skaffold-test/Docker_Image_Postgres/kranichairline_db.sql
LennartFertig/BigData
e74761b16812fd034519c06897329ea9ba9968df
[ "Apache-2.0" ]
null
null
null
Archiv/skaffold-test/Docker_Image_Postgres/kranichairline_db.sql
LennartFertig/BigData
e74761b16812fd034519c06897329ea9ba9968df
[ "Apache-2.0" ]
1
2021-10-19T07:45:12.000Z
2021-10-19T07:45:12.000Z
-- -- PostgreSQL database dump -- -- Dumped from database version 13.1 -- Dumped by pg_dump version 13.1 -- Started on 2021-06-25 17:55:08 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', false); SET check_function_bodies = false; SET xmloption = content; SET client_min_messages = warning; SET row_security = off; -- -- TOC entry 3 (class 2615 OID 2200) -- Name: public; Type: SCHEMA; Schema: -; Owner: postgres -- -- TOC entry 2987 (class 0 OID 0) -- Dependencies: 3 -- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: post SET default_tablespace = ''; SET default_table_access_method = heap; -- -- TOC entry 200 (class 1259 OID 17421) -- Name: Flights; Type: TABLE; Schema: public; Owner: postgres -- CREATE TABLE public."flights" ( flight_no integer NOT NULL, origin character(20), destination character(20), seats integer, booked_seats integer, price numeric ); ALTER TABLE public."flights" OWNER TO postgres; -- -- TOC entry 2981 (class 0 OID 17421) -- Dependencies: 200 -- Data for Name: Flights; Type: TABLE DATA; Schema: public; Owner: postgres -- COPY public."flights" (flight_no, origin, destination, seats, booked_seats, price) FROM stdin; 815 FRA IAD 350 15 755.25 89 MCH\n EDTE 25 2 1500 25 KJYO DFW\n 60 10 269 1337 EDFM\n OMDB 33 29 400 \. -- -- TOC entry 2850 (class 2606 OID 17428) -- Name: Flights Flights_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres -- ALTER TABLE ONLY public."flights" ADD CONSTRAINT "Flights_pkey" PRIMARY KEY (flight_no); -- Completed on 2021-06-25 17:55:08 -- -- PostgreSQL database dump complete --
23.407407
94
0.665612
04673e3f5e2eb69f8aa6155c6b93304cbf5b9b48
6,970
sql
SQL
Create_Aquarium_DB.sql
kaylamuraoka/Waikiki-Aquarium-Database
5d3bb7cce13923aba2ef79b5916a0ce4196101b7
[ "MIT" ]
null
null
null
Create_Aquarium_DB.sql
kaylamuraoka/Waikiki-Aquarium-Database
5d3bb7cce13923aba2ef79b5916a0ce4196101b7
[ "MIT" ]
null
null
null
Create_Aquarium_DB.sql
kaylamuraoka/Waikiki-Aquarium-Database
5d3bb7cce13923aba2ef79b5916a0ce4196101b7
[ "MIT" ]
null
null
null
-- Create Database named "Aquarium_DB" CREATE DATABASE IF NOT EXISTS Aquarium_DB; USE Aquarium_DB; -- Create Staff Tab CREATE TABLE Staff_T ( StaffID CHAR(4) NOT NULL, StaffName VARCHAR(50) NOT NULL, StaffPhoneNumber VARCHAR(10), StaffStreet VARCHAR(50), StaffCity VARCHAR(20), StaffState VARCHAR(2), StatePostalCode CHAR(5), StaffHiredDate DATE, StaffType VARCHAR(12), ManagerID CHAR(4), CONSTRAINT Staff_PK PRIMARY KEY (StaffID), CONSTRAINT ManagerID_FK FOREIGN KEY (ManagerID) REFERENCES Staff_T(StaffID) ); -- Create Curator Table CREATE TABLE Curator_T ( CStaffID CHAR(4) NOT NULL, CONSTRAINT Curator_PK FOREIGN KEY (CStaffID) REFERENCES Staff_T(StaffID) ); -- Create Veterinarian Table CREATE TABLE Veterinarian_T ( VStaffID CHAR(4) NOT NULL, CONSTRAINT Veterinarian_PK FOREIGN KEY (VStaffID) REFERENCES Staff_T(StaffID) ); -- Create Training Courses Table CREATE TABLE TrainingCourses_T ( CourseNumber CHAR(4) NOT NULL, CourseTitle VARCHAR(30), CourseDescription VARCHAR(255), CONSTRAINT TrainingCourses_PK PRIMARY KEY (CourseNumber) ); -- Create Course Completion Table CREATE TABLE TrainingCourseCompletion_T ( StaffID CHAR(4) NOT NULL, CourseNumber CHAR(4) NOT NULL, DateCompleted DATE, CONSTRAINT TrainingCoursesCompletion_PK PRIMARY KEY (StaffID, CourseNumber), CONSTRAINT TrainingCourseCompletion_FK1 FOREIGN KEY (StaffID) REFERENCES Staff_T(StaffID), CONSTRAINT TrainingCourseCompletion_FK2 FOREIGN KEY (CourseNumber) REFERENCES TrainingCourses_T(CourseNumber) ); -- Create Supplier Table CREATE TABLE Supplier_T ( SupplierNumber CHAR(4) NOT NULL, SupplierName VARCHAR(30) NOT NULL, SupplierStreet VARCHAR (50), SupplierCity VARCHAR (20), SupplierState VARCHAR(2), SupplierPostalCode VARCHAR(5), CONSTRAINT Supplier_PK PRIMARY KEY (SupplierNumber) ); -- Create Food Table CREATE TABLE Food_T ( FoodNumber CHAR(4) NOT NULL, FoodDescription VARCHAR(255), FoodUnit CHAR(10), QuantityOnHand DECIMAL(5,2), CONSTRAINT Food_PK PRIMARY KEY (FoodNumber) ); -- Create Exhibit Table CREATE TABLE Exhibit_T ( ExhibitNumber CHAR(4) NOT NULL, ExhibitName VARCHAR(255), LocationInBuilding VARCHAR(255), CONSTRAINT Exhibit_PK PRIMARY KEY (ExhibitNumber) ); -- Create Enclosure Table CREATE TABLE Enclosure_T ( EnclosureNumber CHAR(4) NOT NULL, WaterTemperature DECIMAL(5,2), FluidCapacity DECIMAL(5,2), AmbientTemperature DECIMAL(5,2), AmbientHumidity DECIMAL(5,2), ExhibitNumber CHAR(4), CONSTRAINT Enclosure_PK PRIMARY KEY (EnclosureNumber), CONSTRAINT Enclosure_FK1 FOREIGN KEY (ExhibitNumber) REFERENCES Exhibit_T(ExhibitNumber) ); -- Create Curator Work Schedule Table CREATE TABLE CuratorWorkSchedule_T ( CStaffID CHAR(4) NOT NULL, ExhibitNumber CHAR(4) NOT NULL, StartDate DATE, StartTime TIME, EndDate DATE, EndTime TIME, CONSTRAINT CuratorWorkSchedule_PK PRIMARY KEY (CStaffID, ExhibitNumber), CONSTRAINT CuratorWorkSchedule_FK1 FOREIGN KEY (CStaffID) REFERENCES Staff_T(StaffID), CONSTRAINT CuratorWorkSchedule_FK2 FOREIGN KEY (ExhibitNumber) REFERENCES Exhibit_T(ExhibitNumber) ); -- Create Animal Table CREATE TABLE Animal_T ( AnimalID CHAR(4) NOT NULL, AnimalName VARCHAR(30), AnimalSpecies VARCHAR(30), AnimalBirthDate DATE, AnimalDateAcquired DATE, AnimalType VARCHAR(15) NOT NULL, ExhibitNumber CHAR(4), EnclosureNumber CHAR(4) NOT NULL, CONSTRAINT Animal_PK PRIMARY KEY (AnimalId), CONSTRAINT Animal_FK1 FOREIGN KEY (ExhibitNumber) REFERENCES Exhibit_T(ExhibitNumber), CONSTRAINT Animal_FK2 FOREIGN KEY (EnclosureNumber) REFERENCES Enclosure_T(EnclosureNumber) ); -- Create Fish Table CREATE TABLE Fish_T ( FAnimalID CHAR(4) NOT NULL, CONSTRAINT Fish_PK FOREIGN KEY (FAnimalID) REFERENCES Animal_T(AnimalID) ); -- Create Invertebres Table CREATE TABLE Invertebres_T ( IAnimalID CHAR(4) NOT NULL, CONSTRAINT Invertebres_PK FOREIGN KEY (IAnimalID) REFERENCES Animal_T(AnimalID) ); -- Create Marine Mammals Table CREATE TABLE MarineMammals_T ( MAnimalID CHAR(4) NOT NULL, CONSTRAINT MarineMammals_PK FOREIGN KEY (MAnimalID) REFERENCES Animal_T(AnimalID) ); -- Create Reptiles Table CREATE TABLE Reptiles_T ( RAnimalID CHAR(4) NOT NULL, CONSTRAINT Reptiles_PK FOREIGN KEY (RAnimalID) REFERENCES Animal_T(AnimalID) ); -- Create Feeding Performed Table CREATE TABLE FeedingPerformed_T ( AnimalID CHAR(4) NOT NULL, FoodNumber CHAR(4) NOT NULL, CStaffID CHAR(4) NOT NULL, FeedingDate DATE, FeedingTime TIME, FeedingAmount DECIMAL(5,2), CONSTRAINT FeedingPerformed_PK PRIMARY KEY (AnimalID, FoodNumber, CStaffID, FeedingDate, FeedingTime), CONSTRAINT FeedingPerformed_FK1 FOREIGN KEY (AnimalID) REFERENCES Animal_T(AnimalID), CONSTRAINT FeedingPerformed_FK2 FOREIGN KEY (FoodNumber) REFERENCES Food_T(FoodNumber), CONSTRAINT FeedingPerformed_FK3 FOREIGN KEY (CStaffID) REFERENCES Staff_T(StaffID) ); -- Create Maintenance Service Table CREATE TABLE MaintenanceService_T ( MaintenanceNumber CHAR(4) NOT NULL, MaintenanceDescription VARCHAR(255), CONSTRAINT MaintenanceService_PK PRIMARY KEY (MaintenanceNumber) ); -- Create Maintenance Service Performed Table CREATE TABLE MaintenancePerformed_T ( EnclosureNumber CHAR(4) NOT NULL, MaintenanceNumber CHAR(4) NOT NULL, CStaffID CHAR(4) NOT NULL, MaintenanceDate DATE, MaintenanceNotes VARCHAR(255), CONSTRAINT MaintenancePerformed PRIMARY KEY (EnclosureNumber, MaintenanceNumber, CStaffID), CONSTRAINT MaintenancePerformed_FK1 FOREIGN KEY (MaintenanceNumber) REFERENCES MaintenanceService_T(MaintenanceNumber), CONSTRAINT MaintenancePerformed_FK2 FOREIGN KEY (EnclosureNumber) REFERENCES Enclosure_T(EnclosureNumber), CONSTRAINT MaintenancePerformed_FK3 FOREIGN KEY (CStaffID) REFERENCES Staff_T(StaffID) ); -- Create Treatment Table CREATE TABLE Treatment_T ( TreatmentCode CHAR(4) NOT NULL, TreatmentDescription VARCHAR (255), CONSTRAINT Treatment_PK PRIMARY KEY (TreatmentCode) ); -- Create Treatment Performed Table CREATE TABLE TreatmentPerformed_T ( VStaffID CHAR(4) NOT NULL, AnimalID CHAR(4) NOT NULL, TreatmentCode CHAR(4) NOT NULL, TreatmentDate DATE, TreatmentTime TIME, TreatmentResults VARCHAR(255), CONSTRAINT TreatmentPerformed_PK PRIMARY KEY (VStaffID, AnimalID, TreatmentCode, TreatmentDate, TreatmentTime), CONSTRAINT TreatmentPerformed_FK1 FOREIGN KEY (VStaffID) REFERENCES Staff_T(StaffID), CONSTRAINT TreatmentPerformed_FK2 FOREIGN KEY (AnimalID) REFERENCES Animal_T(AnimalID), CONSTRAINT TreatmentPerformed_FK3 FOREIGN KEY (TreatmentCode) REFERENCES Treatment_T(TreatmentCode) ); -- Create Shipment Table CREATE TABLE Shipment_T ( AnimalID CHAR(4) NOT NULL, SupplierNumber CHAR(4) NOT NULL, ArrivalDate DATE, ArrivalNote VARCHAR(255), NumberOfAnimals INTEGER, CONSTRAINT Shipment_PK PRIMARY KEY (AnimalID, SupplierNumber, ArrivalDate), CONSTRAINT Shipment_FK1 FOREIGN KEY (AnimalID) REFERENCES Animal_T(AnimalID), CONSTRAINT Shipment_FK2 FOREIGN KEY (SupplierNumber) REFERENCES Supplier_T(SupplierNumber) ); -- To View All Tables SHOW TABLES;
33.033175
120
0.804448
2fac3903b0049552100bd84cbe27e2f7dadc4289
35
dart
Dart
lib/domain/use-cases/search-service.dart
Cyberneom/Cyberneom
bea32edfc5cbdb3947b9d375bb5f5fa3014c3bb6
[ "Apache-2.0" ]
1
2021-08-03T16:00:17.000Z
2021-08-03T16:00:17.000Z
lib/domain/use-cases/search-service.dart
Cyberneom/Cyberneom
bea32edfc5cbdb3947b9d375bb5f5fa3014c3bb6
[ "Apache-2.0" ]
null
null
null
lib/domain/use-cases/search-service.dart
Cyberneom/Cyberneom
bea32edfc5cbdb3947b9d375bb5f5fa3014c3bb6
[ "Apache-2.0" ]
1
2021-11-03T03:21:23.000Z
2021-11-03T03:21:23.000Z
abstract class SearchService { }
7
30
0.742857
411f3f8a98de239454ae156a5b03e46b41fc70d0
2,530
lua
Lua
crawl-ref/source/dat/dlua/layout/procedural_transform.lua
petercordia/crawl
c18c9092ac65e4306219b2c8d675610b0e127db0
[ "CC0-1.0" ]
1,921
2015-04-01T00:23:38.000Z
2022-03-31T23:42:29.000Z
crawl-ref/source/dat/dlua/layout/procedural_transform.lua
petercordia/crawl
c18c9092ac65e4306219b2c8d675610b0e127db0
[ "CC0-1.0" ]
1,768
2015-04-06T15:16:31.000Z
2022-03-31T13:16:47.000Z
crawl-ref/source/dat/dlua/layout/procedural_transform.lua
petercordia/crawl
c18c9092ac65e4306219b2c8d675610b0e127db0
[ "CC0-1.0" ]
1,150
2015-04-04T01:07:27.000Z
2022-03-28T23:54:55.000Z
------------------------------------------------------------------------------ -- procedural_transform.lua: Complex transforms -- ------------------------------------------------------------------------------ crawl_require("dlua/layout/procedural.lua") procedural.transform = {} function procedural.transform.wrapped_cylinder(source,period,radius,zscale,zoff) if zscale == nil then zscale = 1 end if zoff == nil then zoff = 0 end return function(x,y) -- Convert x to rads local a = x * 2 * math.pi / period -- Extrude a circle along the y axis of the original function return source(math.sin(a) * radius, y, math.cos(a) * radius * zscale + x * zoff) end end -- Transforms a cartesian domain into a polar one. In other words, it takes -- a rectangular shape and transforms it into a circular one, where y becomes -- the radius, and x becomes the angle about the origin. function procedural.transform.polar(source,radius,sx,sy) local frad = procedural.radial{} if sx == nil then sx = 1 end if sy == nil then sy = 1 end return function(x,y) local a = frad(x,y) local r = math.sqrt(x^2+y^2)/radius return source(a*sx,r*sy) end end -- Inverse of the polar transform function procedural.transform.polar_inverse(source,radius,sx,sy) local frad = procedural.radial{} if sx == nil then sx = 1 end if sy == nil then sy = 1 end return function(x,y) local a = x / sx local r = radius * y / sy -- TODO: Check that this is properly the inverse of polar; it might have -- been flipped or rotated; although this doesn't matter slightly for current layouts return source(math.sin(a*2*math.pi)*r, math.cos(a*2*math.pi)*r) end end -- Distorts a function by an amount depending on another function - in this case its -- proximity to the map border function procedural.transform.damped_distortion(source,options) -- Apply distortion local fdsx = procedural.simplex3d { scale = util.random_range_real(0.1,1), unit = false } local fdsy = procedural.simplex3d { scale = util.random_range_real(0.1,1), unit = false } -- Distort more at the edge of the map -- TODO: Could look even better with a less linear easing function local fbox = procedural.box{} local fedge = function(x,y) return math.max(0,1-fbox(x,y)) end local fdx = procedural.mul(fdsx,fedge) local fdy = procedural.mul(fdsy,fedge) return procedural.distort { source = source, scale = crawl.random_range(4,8), offsetx = fdx, offsety = fdy } end
31.234568
112
0.651383
95ca05328d7fcf5378fcbaac29e492e264534afb
163
dart
Dart
lib/repositories/notification/base_notification_repository.dart
KorolevSoftware/Lenta-flatter
bb03658ed67f93aa8a0a1aeb27fdc2dc25106c17
[ "Apache-2.0" ]
null
null
null
lib/repositories/notification/base_notification_repository.dart
KorolevSoftware/Lenta-flatter
bb03658ed67f93aa8a0a1aeb27fdc2dc25106c17
[ "Apache-2.0" ]
null
null
null
lib/repositories/notification/base_notification_repository.dart
KorolevSoftware/Lenta-flatter
bb03658ed67f93aa8a0a1aeb27fdc2dc25106c17
[ "Apache-2.0" ]
1
2021-11-10T03:51:31.000Z
2021-11-10T03:51:31.000Z
import 'package:artstation/models/models.dart'; abstract class BaseNotificationRepository { Stream<List<Future<Notif>>> getUserNotifications({String userId}); }
32.6
68
0.803681
fb4a265ad993d40ffc21e725c9f68a3aff46a4d5
22,607
c
C
legacy/maze-timer-ajw/SG2 Software/sg2_201_32.c
davidhannaford/timing-system
d260a32c53bd9b503fa7769b0210fa9c049d2bc7
[ "MIT" ]
null
null
null
legacy/maze-timer-ajw/SG2 Software/sg2_201_32.c
davidhannaford/timing-system
d260a32c53bd9b503fa7769b0210fa9c049d2bc7
[ "MIT" ]
1
2022-01-01T18:20:36.000Z
2022-01-01T18:55:25.000Z
legacy/maze-timer-ajw/SG2 Software/sg2_201_32.c
davidhannaford/timing-system
d260a32c53bd9b503fa7769b0210fa9c049d2bc7
[ "MIT" ]
2
2022-01-01T17:55:55.000Z
2022-01-03T19:57:01.000Z
// AJW 0506 : V106 Modified to include drag race // Tried 20 MHz version to see if PLL clock is causing reset problems // Answer - makes NO difference to reset .... // turned off interrupts for test : NO difference to reset .... // Not a reset problem ... it's an LCD reset problem! // The LCD is crashing on re-initialisation, causing lock-up // in LCD_READ function, which means initialisation can't continue // and the whole thing stops. // // v 201 goes back to basics with LCD05, and sends out an init sequence in-line // It also gives up on trying to read back status : I think the tris switching may // have been a problem, particularly as the control lines are not pulled down. // it seems to work fine now ....!! #include <18F452.h> #include <stdbool.h> #include <stdint.h> #fuses H4, PUT, NOPROTECT, BROWNOUT, NOLVP, NOWRT, DEBUG, NOWDT #use delay(clock = 32000000) #use rs232(baud = 9600, xmit = PIN_C6, rcv = PIN_C7, bits = 8) #use fast_io(A) #use fast_io(B) #use fast_io(C) #use fast_io(D) #use fast_io(E) #BIT T0IF = 0XFF2.2 #BIT T1IF = 0xF9E.0 #BIT T2IF = 0xF9E.1 #BIT T3IF = 0xFA1.1 #include "lcd05.c" // LCD display library #define G1TX PIN_C2 #define G2TX PIN_C3 #define G3TX PIN_C4 #define SGTX PIN_C5 #define G1RX PIN_A0 #define G2RX PIN_A1 #define G3RX PIN_A2 #define SGRX PIN_A3 #define VTAP PIN_A5 #define ARM PIN_D2 #define DISARM PIN_C0 #define TOUCH PIN_A4 // dual function #define MODE PIN_A4 // dual function #define CANCEL PIN_B0 // dual function #define CLEAR PIN_B0 // dual function #define START PIN_B4 #define STOP PIN_B5 #define BUZZER PIN_C1 #define ILED1 PIN_B1 #define ILED2 PIN_D3 #define TCONST1MS -996L // 1ms ticks calibrated #define GATE_ON 20 #define MAX_TIME 600000L // state machine states #define INIT_SESSION 1 #define DISARMED 2 #define INC_RUN_NO 3 #define ARMED1 4 #define ARMEDn 5 #define STARTED 6 #define UPDATING 7 #define STOPPED 8 #define CANCELLED 9 #define RUNNING1 10 #define DRAG_RUNNING 11 /*********** Function prototypes ************/ void init(void); void read_gates(void); void read_switches(void); void update_display(void); void set_display(void); void test_gates(void); void update_host(void); void beep(int); void prompt(void); void delay_sign_on(void); /*********** GLOBALS *************/ #define int32 long #define int16 int16_t static uint8_t SG2; static uint8_t MANUAL; // operating mode static uint8_t GATES; static uint8_t FG_MASK; static uint8_t mrun_no; static uint8_t arun_no; static uint8_t BUTTON; static uint8_t LOCKOUT; static uint8_t sw_CANCEL; static uint8_t sw_TOUCH; static uint8_t sw_STOP; static uint8_t sw_START; static uint8_t sw_DISARM; static uint8_t sw_ARM; static uint8_t reset_display; static uint8_t FLASH; static uint8_t aFlgRunCancelled; static uint8_t aSTOPPED; static uint8_t mARMED; static uint8_t aFlgSystemArmed; static uint8_t TIME_UP; static uint8_t mSTARTED; static uint8_t aSTARTED; static uint8_t aNEW_RUN; static uint8_t mNEW_RUN; static uint8_t HOST_UPDATE; static uint32_t AMT; static uint32_t AMT_SPLIT; static uint32_t ART; static uint32_t ART_SPLIT; static uint32_t MMT; static uint32_t MMT_SPLIT; static uint32_t MRT; static uint32_t MRT_SPLIT; static uint32_t millisecs; static uint16_t flash_timer; static char str[4] = {'X', 'X', 'X', 'X'}; /*********** MAIN *************/ static uint8_t beep_duration; static uint8_t beep_on; static uint8_t astate; static uint8_t mstate; void manualStateMachine() { switch (mstate) { case INIT_SESSION: MMT = 0; MRT = 0; MMT_SPLIT = 0; MRT_SPLIT = 0; mrun_no = 1; reset_display = true; mstate = DISARMED; FLASH = false; TIME_UP = false; break; case DISARMED: output_low(ILED1); output_low(ILED2); if (mARMED) { output_high(ILED1); } break; case INC_RUN_NO: mrun_no++; mNEW_RUN = true; MRT = 0; // reset the run timer MMT++; // increment maze timer mstate = ARMEDn; break; case ARMED1: if (!mARMED) { // first time in don't want to start timers mstate = INIT_SESSION; } if (sw_START) { // if start gate triggered mstate = STARTED; } break; case ARMEDn: MMT++; if (!mARMED) { mstate = INIT_SESSION; } if (sw_START) { // if start button triggered mstate = STARTED; } break; case STARTED: FLASH = true; if (sw_CANCEL) { mstate = CANCELLED; } if (!mARMED) { mstate = INIT_SESSION; } mSTARTED = true; MMT++; // increment auto maze timer at 1ms intervals MRT++; // increment auto run timer at 1ms intervals if (SG2) { if (sw_START) { // if start button triggered MRT = 0; // reset run timer } if (sw_STOP) { // if stop button triggered mstate = STOPPED; // next state = stopped MMT_SPLIT = MMT; } } else { // DRAG GATE MODE if (sw_START) { mstate = RUNNING1; } } break; case RUNNING1: MRT++; if (!marmed) { mstate = INIT_SESSION; } if (sw_START) { MRT = 0; } if (MRT > 3000) { mstate = DRAG_RUNNING; } break; case DRAG_RUNNING: if (!marmed) { mstate = INIT_SESSION; } if (sw_START) { mstate = STOPPED; } MRT++; break; case STOPPED: FLASH = false; output_low(ILED2); mSTARTED = false; if (!marmed) { mstate = INIT_SESSION; } if (sw_START) { mstate = INC_RUN_NO; } MRT_SPLIT = MRT; // for DRAG race we want RUN-TIME splits MMT++; // maze timer keeps running for entire session break; case CANCELLED: FLASH = false; output_high(ILED2); MMT = MMT - MRT; // reset MMT MRT = 0; mstate = ARMED1; break; default: break; } } void autostateMachine() { switch (astate) { case INIT_SESSION: AMT = 0; ART = 0; AMT_SPLIT = 0; ART_SPLIT = 0; aSTARTED = aSTOPPED = false; arun_no = 1; aNEW_RUN = true; astate = DISARMED; FLASH = false; TIME_UP = false; break; case DISARMED: if (aFlgSystemArmed) { // synchronous state changes astate = ARMED1; } break; case INC_RUN_NO: arun_no++; aNEW_RUN = true; ART = 0; // reset run timer AMT++; // increment maze timer astate = ARMEDn; break; case ARMED1: if (!aFlgSystemArmed) { // first time in don't want to start MT astate = INIT_SESSION; } if (GATES & 0x01) { // if start gate triggered astate = STARTED; } break; case ARMEDn: AMT++; // increment MT during armed once session started if (!aFlgSystemArmed) { astate = INIT_SESSION; } if (GATES & 0x01) { // if start gate triggered astate = STARTED; } break; case STARTED: aSTARTED = true; if (aFlgRunCancelled) { astate = CANCELLED; } if (!aFlgSystemArmed) { astate = INIT_SESSION; } if (!aNEW_RUN) { astate = UPDATING; } AMT++; // increment auto maze timer at 1ms intervals ART++; // increment auto run timer at 1ms intervals if (GATES & 0x01) { // if start gate triggered ART = 0; // reset auto run timer if new gate trigger } break; case UPDATING: if (aFlgRunCancelled) { astate = CANCELLED; } if (!aFlgSystemArmed) { astate = INIT_SESSION; } AMT++; // increment auto maze timer at 1ms intervals ART++; // increment auto run timer at 1ms intervals if (SG2) { // MAZE MODE if (GATES & 0x01) { // if start gate triggered ART = 0; // reset auto run timer if new gate trigger } if ((GATES & 0x0e) ^ FG_MASK) { // if finish gates(s) triggered astate = STOPPED; // next state = stopped AMT_SPLIT = AMT; aSTOPPED = true; } } else { // DRAG MODE if ((GATES & 0x01) && (ART <= 3000)) { ART = 0; // reset if less than 3 seconds from start } if (ART > 3000) { astate = DRAG_RUNNING; } } break; case DRAG_RUNNING: // DRAG MODE if (!aFlgSystemArmed) { astate = INIT_SESSION; } if (GATES & 0x01) { astate = STOPPED; aSTOPPED = true; } ART++; break; case STOPPED: AMT++; aSTARTED = false; if (!aFlgSystemArmed) { astate = INIT_SESSION; } if (GATES & 0x01) { astate = INC_RUN_NO; } ART_SPLIT = ART; // hold last run in ART_SPLIT break; case CANCELLED: AMT = AMT - ART; // reset AMT ART = 0; astate = ARMED1; aFlgRunCancelled = false; FLASH = false; output_high(ILED2); break; default: break; } } /*********** INTERRUPT ROUTINES *******************/ #int_timer3 void timer3_handler(void) { set_timer3(TCONST1MS); read_switches(); read_gates(); autostateMachine(); manualStateMachine(); // General housekeeping sub-tasks // 100 millisecond comms update to HOST if (millisecs++ >= 100) { HOST_UPDATE = true; millisecs = 0; } // Max time exceeded if (AMT == MAX_TIME) { AMT = MAX_TIME; TIME_UP = true; FLASH = true; } if (MMT == MAX_TIME) { MMT = MAX_TIME; TIME_UP = true; FLASH = true; } if ((!TIME_UP) & (!beep_on)) { output_low(BUZZER); } // 250 millisecond toggle of LED and buzzer if (flash_timer++ > 250) { flash_timer -= 250; if (FLASH) { output_bit(ILED2, !input(ILED2)); // flash ILED2 if (TIME_UP) { output_bit(BUZZER, !input(BUZZER)); // Modulate buzzer } } } // Millisecond resolution timer for buzzer duration if (beep_on) { if (beep_duration-- == 0) { // downcount buzz_duration every millisecond output_low(BUZZER); // and turn buzzer off when zero beep_on = false; } } } void main(void) { init(); lcd_init(); delay_ms(50); T3IF = 0; setup_timer_3(T3_INTERNAL | T3_DIV_BY_8); // 31.25ns*4*8 = 1us ticks set_timer3(TCONST1MS); // timeout every 1ms enable_interrupts(INT_TIMER3); enable_interrupts(GLOBAL); beep(50); printf(lcd_putc, "STARTGATE SG-2 V201_32 AJW May 2006\n"); printf(lcd_putc, " UK Micromouse at TIC"); delay_sign_on(); set_display(); test_gates(); // host display putc(0x0c); // clear screen printf("STARTGATE SG2.1: AJW/0506\r\n"); prompt(); while (true) { update_display(); update_host(); } } void init(void) { output_a(0); output_b(0); output_c(0); output_d(0); output_e(0); set_tris_a(0xff); // All input set_tris_b(0xfd); // ILED1 is the only output, but MODE is an unallocated pin set as input set_tris_c(0x81); // set_tris_d(0x06); set_tris_e(0xf8); // E2-E0 output mstate = INIT_SESSION; astate = INIT_SESSION; GATES = 0; millisecs = 0; mNEW_RUN = false; aNEW_RUN = false; mARMED = false; HOST_UPDATE = false; aSTOPPED = false; aSTARTED = false; mSTARTED = false; aFlgSystemArmed = false; test_gates(); // need to test for auto/manual switchover read_gates(); // set up a mask for testing finish gates if (MANUAL) { FG_MASK = 0x0c; // tell SG2 that SG,FG1 are OK, SG2,SG3 fail } else { FG_MASK = GATES & 0x0e; // the mask intialises the number and order of gates connected } if (input(TOUCH)) { SG2 = false; // DRAG mode } else { SG2 = true; // STARTGATE mode } delay_ms(50); // give time for LCD to power-up reset correctly } /*** * * * For gates, 1 = CLOSED, 0 = OPEN * */ void test_gates(void) { int MAN; int i; int tmp; uint8_t STAT = 0; disable_interrupts(GLOBAL); STAT = (STAT <<= 1) | input(G1RX); // FINISH GATE 1 ambient output_high(G1TX); delay_us(GATE_ON); STAT = (STAT <<= 1) | input(G1RX); // FINISH GATE 1 output_low(G1TX); STAT = (STAT <<= 1) | input(G2RX); // FINISH GATE 2 ambient output_high(G2TX); delay_us(GATE_ON); STAT = (STAT <<= 1) | input(G2RX); // FINISH GATE 2 output_low(G2TX); STAT = (STAT <<= 1) | input(G3RX); // FINISH GATE 3 ambient output_high(G3TX); delay_us(GATE_ON); STAT = (STAT <<= 1) | input(G3RX); // FINISH GATE 3 output_low(G3TX); STAT = (STAT <<= 1) | input(SGRX); // START GATE 1 ambient output_high(SGTX); delay_us(GATE_ON); STAT = (STAT <<= 1) | input(SGRX); // START GATE 1 output_low(SGTX); enable_interrupts(GLOBAL); MAN = STAT; lcd_gotoxy(37, 1); for (i = 0; i < 4; i++) { tmp = STAT & 3; switch (tmp) { case 0x00: case 0x01: // Ambient lighting too bright lcd_putc('B'); str[i] = 'B'; break; case 0x02: // AOK lcd_putc('K'); str[i] = 'K'; break; case 0x03: // Gate Fail lcd_putc('F'); str[i] = 'F'; break; default: lcd_putc('?'); } STAT >>= 2; } if (SG2) { // START_GAT mode if ((MAN & 0x0f) == 0x0A) { MANUAL = false; } else { MANUAL = true; } } else { // DRAG MODE if ((MAN & 0x03) == 0x02) { // only test startgate MANUAL = false; } else { MANUAL = true; } } } void read_gates(void) { GATES = 0x0c; // set for SG OK, FG1 OK, FG2,3 FAIL if (MANUAL) { if (sw_START) { bit_set(GATES, 0); // two fails, FG open, SG closed } if (sw_STOP) { bit_set(GATES, 1); } } else { output_high(G1TX); delay_us(GATE_ON); GATES = (GATES <<= 1) | input(G1RX); // FINISH GATE 1 output_low(G1TX); output_high(G2TX); delay_us(GATE_ON); GATES = (GATES <<= 1) | input(G2RX); // FINISH GATE 2 output_low(G2TX); output_high(G3TX); delay_us(GATE_ON); GATES = (GATES <<= 1) | input(G3RX); // FINISH GATE 3 output_low(G3TX); output_high(SGTX); delay_us(GATE_ON); GATES = (GATES <<= 1) | input(SGRX); // START GATE 1 output_low(SGTX); } } void read_switches(void) { sw_ARM = input(ARM); sw_DISARM = input(DISARM); sw_TOUCH = input(TOUCH); sw_CANCEL = input(CANCEL); sw_START = input(START); sw_STOP = input(STOP); if (sw_ARM) { mARMED = true; } if (sw_DISARM) { mARMED = false; } BUTTON = sw_ARM || sw_DISARM || sw_TOUCH || sw_CANCEL || sw_START || sw_STOP; // LOCKOUT is simply to prevent continous tone when pressing key if (!BUTTON) { LOCKOUT = false; // if no keys pressed, clear lockout } else { if (BUTTON && !LOCKOUT) { beep(50); // interrupt driven beep LOCKOUT = true; } } } void set_display(void) { int8 i; if (SG2) { // StartGate Mode printf(lcd_putc, "\f"); printf(lcd_putc, "Run:%2U", 1); lcd_gotoxy(21, 1); printf(lcd_putc, "Run:%2U\n", 1); lcd_gotoxy(9, 1); printf(lcd_putc, "MT:"); lcd_gotoxy(9, 2); printf(lcd_putc, "RT:"); lcd_gotoxy(29, 1); printf(lcd_putc, "MT:"); lcd_gotoxy(29, 2); printf(lcd_putc, "RT:"); lcd_gotoxy(37, 1); for (i = 0; i < 4; i++) { lcd_putc(str[i]); } } else { printf(lcd_putc, "\f"); printf(lcd_putc, "Run:%2U", 1); lcd_gotoxy(21, 1); printf(lcd_putc, "Run:%2U\n", 1); lcd_gotoxy(9, 1); printf(lcd_putc, "ST:"); lcd_gotoxy(9, 2); printf(lcd_putc, "RT:"); lcd_gotoxy(29, 1); printf(lcd_putc, "ST:"); lcd_gotoxy(29, 2); printf(lcd_putc, "RT:"); lcd_gotoxy(40, 1); lcd_putc(str[0]); } } void update_display(void) { uint32_t intgr, decml, tmp; if (reset_display) { set_display(); reset_display = false; } if (SG2) { // START GATE lcd_gotoxy(5, 1); printf(lcd_putc, "%02U", mrun_no); lcd_gotoxy(25, 1); if (arun_no == 0) { printf(lcd_putc, "%02U\n", 1); } else { printf(lcd_putc, "%02U", arun_no); } lcd_gotoxy(1, 2); if (mARMED) { printf(lcd_putc, "A"); } else { printf(lcd_putc, "D"); } lcd_gotoxy(21, 2); if (aFlgSystemArmed) { printf(lcd_putc, "A"); } else { printf(lcd_putc, "D"); } if (MANUAL) { printf(lcd_putc, " MSG"); } else { printf(lcd_putc, " ASG"); } lcd_gotoxy(12, 1); if (mSTARTED) { tmp = MMT / 1000; if (tmp > 999) { tmp = 999; } printf(lcd_putc, "%03lu", tmp); } else { tmp = MMT_SPLIT / 1000; if (tmp > 999) { tmp = 999; } printf(lcd_putc, "%03lu", tmp); } lcd_gotoxy(12, 2); intgr = MRT / 1000; if (intgr > 999) { intgr = 999; } decml = MRT - (intgr * 1000); if (decml > 999) { decml = 999; } printf(lcd_putc, "%03lu.%03lu", intgr, decml); lcd_gotoxy(32, 1); if (aSTARTED) { tmp = AMT / 1000; if (tmp > 999) { tmp = 999; } printf(lcd_putc, "%03lu", tmp); } else { tmp = AMT_SPLIT / 1000; if (tmp > 999) { tmp = 999; } printf(lcd_putc, "%03lu", tmp); } lcd_gotoxy(32, 2); intgr = ART / 1000; if (intgr > 999) { intgr = 999; } decml = ART - (intgr * 1000); if (decml > 999) { decml = 999; } printf(lcd_putc, "%03lu.%03lu", intgr, decml); } else { // DRAG GATE DISPLAY lcd_gotoxy(5, 1); printf(lcd_putc, "%02U", mrun_no - 1); lcd_gotoxy(25, 1); printf(lcd_putc, "%02U", arun_no - 1); lcd_gotoxy(1, 2); if (mARMED) { printf(lcd_putc, "A"); } else { printf(lcd_putc, "D"); } lcd_gotoxy(21, 2); if (aFlgSystemArmed) { printf(lcd_putc, "A"); } else { printf(lcd_putc, "D"); } if (MANUAL) { printf(lcd_putc, " MDG"); } else { printf(lcd_putc, " ADG"); } lcd_gotoxy(12, 1); intgr = MRT_SPLIT / 1000; if (intgr > 999) { intgr = 999; } decml = MRT_SPLIT - (intgr * 1000); if (decml > 999) { decml = 999; } printf(lcd_putc, "%03lu.%03lu", intgr, decml); lcd_gotoxy(12, 2); intgr = MRT / 1000; if (intgr > 999) { intgr = 999; } decml = MRT - (intgr * 1000); if (decml > 999) { decml = 999; } printf(lcd_putc, "%03lu.%03lu", intgr, decml); lcd_gotoxy(32, 1); intgr = ART_SPLIT / 1000; if (intgr > 999) { intgr = 999; } decml = ART_SPLIT - (intgr * 1000); if (decml > 999) { decml = 999; } printf(lcd_putc, "%03lu.%03lu", intgr, decml); lcd_gotoxy(32, 2); intgr = ART / 1000; if (intgr > 999) { intgr = 999; } decml = ART - (intgr * 1000); if (decml > 999) { decml = 999; } printf(lcd_putc, "%03lu.%03lu", intgr, decml); } } void beep(int8 duration) { output_high(BUZZER); // turn buzzer on beep_duration = duration; // set duration beep_on = true; // start the countdown at millesecond rate in timer3 interrupt routine } /*** * All the host interaction is here * * First process any commands: * * Commands from the host are single characters: * * A - Arm system * resets state machine and all timing variables * S - Test gates * return state of manual ops flag an gate states * C - Cancel Run * sets cancelled flag * D - terminate session * disarms system * * Then send the status */ void update_host(void) { char cmd; if (kbhit()) { // ie char waiting in serial cmd = getch(); // get command // echo to host putc(cmd); putc(0x0d); putc(0x0a); switch (cmd) { case 'A': // arm gate case 'a': if (!aFlgSystemArmed) { // lockout additional 'A' presses aFlgSystemArmed = true; printf("\r\nARMED ...."); } break; case '?': // read manual/auto, test optos by turning on emitters and reading receivers case 'S': case 's': test_gates(); if (MANUAL) { putc('M'); } else { putc('A'); } // show gate state: K => OK, B => too bright, F => failed putc(str[0]); putc(','); putc(str[1]); putc(','); putc(str[2]); putc(','); putc(str[3]); prompt(); break; case 'C': // cancel last run case 'c': aFlgRunCancelled = true; prompt(); break; case 'D': // End Session : reset run_number and timers case 'd': aFlgSystemArmed = false; prompt(); break; default: prompt(); break; } } /// the HOST_UPDATE flag is set every 100ms by the system timer if (HOST_UPDATE) { if (aSTARTED && (!aSTOPPED)) { // run timer started and 100ms update due if (aNEW_RUN) { printf("\r\nS\r\n"); aNEW_RUN = false; } else { printf("\rU %lu", ART); } } if (aSTOPPED) { printf("\r\nP %lu\r\n", ART_SPLIT); aSTOPPED = false; prompt(); } HOST_UPDATE = false; } } void prompt(void) { putc(0x0d); // characters faster than printf() putc(0x0a); putc('>'); putc(' '); // printf("\r\n> "; } void delay_sign_on(void) { unsigned long int i; for (i = 0; i < 100; i++) { delay_ms(10); } }
23.746849
100
0.538992
983f14ae8991b687e96df6ffed5addef633ffafa
2,302
html
HTML
_includes/footer.html
hypest/skgtech.github.io
5bbbfe6aa6c54025eeb085af6a82c7933ffcc753
[ "MIT" ]
null
null
null
_includes/footer.html
hypest/skgtech.github.io
5bbbfe6aa6c54025eeb085af6a82c7933ffcc753
[ "MIT" ]
null
null
null
_includes/footer.html
hypest/skgtech.github.io
5bbbfe6aa6c54025eeb085af6a82c7933ffcc753
[ "MIT" ]
null
null
null
<footer class="site-footer"> <div class="row text-center"> <ul class="social-links list-inline"> <li><a href="https://www.facebook.com/skgtech.io" title="SKGTech on Facebook" target="_blank"><i class="fa fa-facebook"></i></a></li> <li><a href="https://github.com/skgtech" title="SKGTech on Github" target="_blank"><i class="fa fa-github"></i></a></li> <li><a href="https://twitter.com/skg_tech" title="SKGTech on Twitter" target="_blank"><i class="fa fa-twitter"></i></a></li> <li><a href="https://www.youtube.com/channel/UCHh9IjeM7L5Xfhy_EmTvhFw" title="SKGTech on Youtube" target="_blank"><i class="fa fa-youtube-play"></i></a></li> </ul> </div> <div class="row disclamer"> <div class="col-md-6"> <p>&copy; {{ site.time | date: '%Y' }} <a href="https://github.com/skgtech/skgtech.github.io/graphs/contributors">{{ site.author.name }}</a>, source under the <a target="_blank" href="http://opensource.org/licenses/MIT">MIT License</a>.</p> <p class="license"> The content property of their respective owners, the rest <a target="_blank" href="http://creativecommons.org/publicdomain/zero/1.0/">Creative Commons CC0</a>. </p> </div> <div class="col-md-6 text-right"> <p> <a href="{{ site.githubrepo }}">View the source of this site and contribute</a></p> </div> </div> </footer> <!-- Google Analytics: change UA-XXXXX-X to be your site's ID. --> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-41787746-3', 'auto'); ga('send', 'pageview'); </script> <!-- <script src="{{ site.baseurl }}/assets/components/jquery/dist/jquery.min.js"></script> --> <!-- <script src="{{ site.baseurl }}/assets/components/bootstrap-sass/assets/javascripts/bootstrap.min.js"></script> --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> <script src="{{ site.baseurl }}/assets/js/app.js"></script>
60.578947
246
0.652476
949e793f53701abcce1abf45ef2a6994fb5c07eb
2,188
swift
Swift
ObjectOrientedSwiftChallenges.playground/Pages/07-inheritance.xcplaygroundpage/Contents.swift
Product-College-Labs/oop-rpg
a39d9ff293bfb07b77b1526354a60c7c6bac2d71
[ "MIT" ]
null
null
null
ObjectOrientedSwiftChallenges.playground/Pages/07-inheritance.xcplaygroundpage/Contents.swift
Product-College-Labs/oop-rpg
a39d9ff293bfb07b77b1526354a60c7c6bac2d71
[ "MIT" ]
null
null
null
ObjectOrientedSwiftChallenges.playground/Pages/07-inheritance.xcplaygroundpage/Contents.swift
Product-College-Labs/oop-rpg
a39d9ff293bfb07b77b1526354a60c7c6bac2d71
[ "MIT" ]
3
2021-07-21T23:22:18.000Z
2021-08-29T02:22:27.000Z
//: Playground - noun: a place where people can play import Foundation // Define some protocols protocol Casts { var name: String {get} func castSpell() } protocol Fights { var name: String {get} func melee() } // Define some protocol extensions. extension Casts { func castSpell() { print("\(name) Casts spell") } } extension Fights { func melee() { print("\(name) Attacks with Sword!") } } // Define a base class class Player { var name: String var hitPoints: Int = 0 init(name: String) { self.name = name } func adventure() { print("\(name) goes adventuring!") } } class Fighter: Player, Fights { var battleCry: String init(name: String, battleCry: String = "") { self.battleCry = battleCry super.init(name: name) hitPoints = 8 } } // Sub classes player and implements Casts class Wizard: Player, Casts { override init(name: String) { super.init(name: name) hitPoints = 4 } } // Sub classes player and implements Casts. class Priest: Player, Casts { override init(name: String) { super.init(name: name) hitPoints = 6 } // Priests cast spells but they are different from Wizard spells! func castSpell() { print("\(name) heals the party!") } } // Sub classes player and implements both Fights and Casts class Elf: Player, Fights, Casts { override init(name: String) { super.init(name: name) hitPoints = 6 } } // Wizard adds a new method var mephisto = Wizard(name: "Mephisto") mephisto.castSpell() // Priest duplicates functionality var clancy = Priest(name: "Clancy") clancy.castSpell() // Fighter var frank = Fighter(name: "Frank") frank.melee() var elrond = Elf(name: "Elrond") elrond.castSpell() elrond.melee() var george = Fighter(name: "George", battleCry: "Arrr!") george.melee() // Now that the fighter has a battle cry they should use it when they attack. // - Challenge: // The fighter should use the battleCry when the melee() method is called.
17.504
77
0.609232
4661b938db8446d8f1da8bbe0671daf173bf92f0
1,569
lua
Lua
CDump/Minecraft/src/lua/RepeatedStates.lua
YushchenkoAndrew/template
35c6bcd2121647015308f0cc110da71aa148d5fb
[ "MIT" ]
5
2020-08-25T11:35:04.000Z
2021-12-25T18:57:58.000Z
CDump/Minecraft/src/lua/RepeatedStates.lua
YushchenkoAndrew/template
35c6bcd2121647015308f0cc110da71aa148d5fb
[ "MIT" ]
null
null
null
CDump/Minecraft/src/lua/RepeatedStates.lua
YushchenkoAndrew/template
35c6bcd2121647015308f0cc110da71aa148d5fb
[ "MIT" ]
3
2020-10-08T07:51:33.000Z
2021-12-29T10:19:24.000Z
-- One of the RepeatedStates state Node = { id = -1, condition = "return false", callback = nil } -- Execute condition code at runtime function Node:Load(params) local varInit = "" for key, value in pairs(params) do varInit = varInit .. key .. " = " .. value .. "\n" end return load(varInit .. "return " .. Node.condition) end function Node:Log() for key, value in pairs(Node) do print("[Node][var] " .. key .. " => " .. tostring(value)) end end -- State class RepeatedStates = { nodes = {}, index = 1 } function RepeatedStates:Init(data) if data == nil then return end for key, value in pairs(data) do RepeatedStates[key] = value end end function RepeatedStates:AddNode(params) RepeatedStates.nodes[#RepeatedStates.nodes + 1] = Node for key, value in pairs(params) do RepeatedStates.nodes[#RepeatedStates.nodes][key] = value end end function RepeatedStates:Log() print("[class] RepeatedStates") for key, value in pairs(RepeatedStates) do if type(value) ~= "table" then print("[var] " .. key .. " => " .. tostring(value)) else for _, class in pairs(value) do class:Log() end end end end function RepeatedStates:Update(params) if #RepeatedStates.nodes == 0 then return end if RepeatedStates.nodes[RepeatedStates.index] == nil then RepeatedStates.index = 1 end local node = RepeatedStates.nodes[RepeatedStates.index] if (node:Load(params)()) then RepeatedStates.index = RepeatedStates.index + 1 if node.callback ~= nil then node.callback(node.id) end end end
20.376623
88
0.671765
27dcd17280767949ac8ead95eb93418a8ebaa059
4,620
css
CSS
extras/www/static/css/core.css
dicato/crits
8d500f7175855f1aeefa94caa783f981062ba869
[ "MIT" ]
null
null
null
extras/www/static/css/core.css
dicato/crits
8d500f7175855f1aeefa94caa783f981062ba869
[ "MIT" ]
null
null
null
extras/www/static/css/core.css
dicato/crits
8d500f7175855f1aeefa94caa783f981062ba869
[ "MIT" ]
null
null
null
/* expand/collapse */ table .collapsible { padding: 0 0 3px 0; } table.chart tbody td.collapsible a { /*, th a#toggleAll {*/ margin: 2px; display: block; width: 15px; height: 15px; outline: 0; /*background: url(/css/images/ui-icons_222222_256x240.png) no-repeat -32px -16px; */ } table.chart tbody td.collapsible a { margin: 2px; display: block; width: 15px; height: 15px; outline: 0; /* background: url(/css/images/ui-icons_222222_256x240.png) no-repeat -64px -16px; */ } table#source_listing tbody td span { float: none; } table#source_listing tbody td span.heading { font-weight:bold; } table.chart tbody td a.ui-icon, table.vertical tbody td a#toggleAll { display: block; float: right; } table.vertical tbody td.longtext { word-break: normal; white-space: pre-line; } .clearboth { clear: both; } .floatright, .right { display: block; float: right; } .floatleft, .left { display: block; float: left; } table.chart tbody td a.ui-icon.ui-icon-plusthick { float:none; } ul.errorlist { margin: 0 !important; padding: 0 !important; } select:focus, input:focus, textarea:focus { border-style:solid; outline: none; border-color: #9ecaed; box-shadow: 0 0 10px #9ecaed; } #tabnav .ui-tabs-active:not(.ui-state-disabled) { border: 1px solid #5583ed; border-color:#5583ed; box-shadow: 0 0 4px #5583ed; border-bottom-color: #ddd; } #tabnav .ui-tabs-active a { color: #5583ed; } td highlight span:hover { color: #5583ed; } table.form .errorlist li { // It might look nicer if these were positioned to the right of the input dialog // Not sure how to do that.. float: none; } .errorlist li { font-size: 12px !important; padding: 4px 5px 4px 25px; margin: 0 0 3px 0; border: 1px solid red; color: white; background: red url(/static/admin/img/icon_alert.gif) 5px .3em no-repeat; } .errorlist li a { color: white; text-decoration: underline; } td ul.errorlist { margin: 0 !important; padding: 0 !important; } td ul.errorlist li { margin: 0 !important; } /* mirrors div.content top: needed to overrides html.mm-opened from mm-menu */ html.mm-opened .mm-page, html.mm-opened #mm-blocker { top: 25px; } .mm-search { top: 24px; z-index: 3; } .shortcut_keys_table tbody tr:nth-child(even){ background-color:#add8e6; } .shortcut_keys_table tbody tr:nth-child(odd){ background-color:#ffffff; } .shortcut_keys_table table{ text-align: center; } .shortcut_keys_table{ text-align: center; } .shortcut_keys_table th{ font-size: 16px; padding-top: 25px; text-align: left; background-color:#ffffff } .shortcut_keys_table td{ vertical-align:left; text-align:left; padding:4px; font-size:12px; font-family:Arial; font-weight:normal; color:#000000; } .shortcut_keys_table td:first-child{ text-align:right; white-space:nowrap; } .textbox { padding-left: 3px; } /* Following kdb CSS taken from and modified from: https://github.com/michaelhue/keyscss (MIT License) */ /* Base style, essential for every key. */ kbd.light { display: inline; display: inline-block; min-width: 1em; padding: .2em .3em; font: normal .85em/1 "Lucida Grande", Lucida, Arial, sans-serif; text-align: center; text-decoration: none; -moz-border-radius: .3em; -webkit-border-radius: .3em; font-family:Courier; border-radius: .3em; font-size:18px; border: none; cursor: default; -moz-user-select: none; -webkit-user-select: none; user-select: none; } kbd.light { background: rgb(250, 250, 250); background: -moz-linear-gradient(top, rgb(210, 210, 210), rgb(255, 255, 255)); background: -webkit-gradient(linear, left top, left bottom, from(rgb(210, 210, 210)), to(rgb(255, 255, 255))); color: rgb(50, 50, 50); text-shadow: 0 0 2px rgb(255, 255, 255); -moz-box-shadow: inset 0 0 1px rgb(255, 255, 255), inset 0 0 .4em rgb(200, 200, 200), 0 .1em 0 rgb(130, 130, 130), 0 .11em 0 rgba(0, 0, 0, .4), 0 .1em .11em rgba(0, 0, 0, .9); -webkit-box-shadow: inset 0 0 1px rgb(255, 255, 255), inset 0 0 .4em rgb(200, 200, 200), 0 .1em 0 rgb(130, 130, 130), 0 .11em 0 rgba(0, 0, 0, .4), 0 .1em .11em rgba(0, 0, 0, .9); box-shadow: inset 0 0 1px rgb(255, 255, 255), inset 0 0 .4em rgb(200, 200, 200), 0 .1em 0 rgb(130, 130, 130), 0 .11em 0 rgba(0, 0, 0, .4), 0 .1em .11em rgba(0, 0, 0, .9); } A.noclick { cursor: default; } .campaignWidth { width:150px; } .relationship_confidence_edit { width:75px; }
21.588785
182
0.647403
4c7a818a3dc777d75b40523d9a40f6ebb3ed6877
1,740
asm
Assembly
programs/oeis/083/A083593.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/083/A083593.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/083/A083593.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A083593: Expansion of 1/((1-2*x)*(1-x^4)). ; 1,2,4,8,17,34,68,136,273,546,1092,2184,4369,8738,17476,34952,69905,139810,279620,559240,1118481,2236962,4473924,8947848,17895697,35791394,71582788,143165576,286331153,572662306,1145324612,2290649224,4581298449,9162596898,18325193796,36650387592,73300775185,146601550370,293203100740,586406201480,1172812402961,2345624805922,4691249611844,9382499223688,18764998447377,37529996894754,75059993789508,150119987579016,300239975158033,600479950316066,1200959900632132,2401919801264264,4803839602528529,9607679205057058,19215358410114116,38430716820228232,76861433640456465,153722867280912930,307445734561825860,614891469123651720,1229782938247303441,2459565876494606882,4919131752989213764,9838263505978427528,19676527011956855057,39353054023913710114,78706108047827420228,157412216095654840456,314824432191309680913,629648864382619361826,1259297728765238723652,2518595457530477447304,5037190915060954894609,10074381830121909789218,20148763660243819578436,40297527320487639156872,80595054640975278313745,161190109281950556627490,322380218563901113254980,644760437127802226509960,1289520874255604453019921,2579041748511208906039842,5158083497022417812079684,10316166994044835624159368,20632333988089671248318737,41264667976179342496637474,82529335952358684993274948,165058671904717369986549896,330117343809434739973099793,660234687618869479946199586,1320469375237738959892399172,2640938750475477919784798344,5281877500950955839569596689,10563755001901911679139193378,21127510003803823358278386756,42255020007607646716556773512,84510040015215293433113547025,169020080030430586866227094050,338040160060861173732454188100,676080320121722347464908376200 mov $1,2 pow $1,$0 mul $1,32 div $1,30 mov $0,$1
193.333333
1,644
0.916667
262457e18553e3d20c53e26f52a0ada6c2d63dd1
7,883
java
Java
luffy.event.message/src/main/java/org/noear/luffy/event/message/dso/DbMsgApi.java
noear/luffy
35b779bc040e8fd96a283b14679c396920d7ecc5
[ "MIT" ]
6
2021-05-14T08:58:55.000Z
2021-09-13T08:40:59.000Z
luffy.event.message/src/main/java/org/noear/luffy/event/message/dso/DbMsgApi.java
noear/luffy
35b779bc040e8fd96a283b14679c396920d7ecc5
[ "MIT" ]
null
null
null
luffy.event.message/src/main/java/org/noear/luffy/event/message/dso/DbMsgApi.java
noear/luffy
35b779bc040e8fd96a283b14679c396920d7ecc5
[ "MIT" ]
4
2021-05-17T01:26:27.000Z
2021-07-01T10:11:02.000Z
package org.noear.luffy.event.message.dso; import org.noear.luffy.dso.LogLevel; import org.noear.luffy.dso.LogUtil; import org.noear.luffy.model.AFileModel; import org.noear.luffy.event.message.Config; import org.noear.luffy.utils.Datetime; import org.noear.luffy.utils.ExceptionUtils; import org.noear.weed.DataItem; import org.noear.weed.DataList; import org.noear.weed.DbContext; import org.noear.weed.DbTableQuery; import java.sql.SQLException; import java.util.List; import java.util.Map; public class DbMsgApi { private static DbContext db() { return Config.db; } public static AFileModel fileGet(String path) throws Exception { return db().table("a_file") .where("path=?", path) .select("*") .getItem(AFileModel.class); } public static List<AFileModel> msgGetSubs(String topic) throws Exception { return db().table("a_file") .where("label=? AND is_disabled=0", topic) .select("file_id,tag,label,path,is_disabled") .getList(AFileModel.class); } public static AMessageModel msgGet(long msg_id) throws Exception { AMessageModel m = db().table("a_message") .where("msg_id=? AND state=0", msg_id) .select("*") .getItem(AMessageModel.class); if (m.state != 0) { return null; } else { return m; } } public static List<Long> msgGetList(int rows, int ntime) throws SQLException { return db().table("a_message") .where("state=0 AND dist_ntime<?", ntime) .orderBy("msg_id ASC") .limit(rows) .select("msg_id") .getArray("msg_id"); } public static boolean msgSetState(long msg_id, int state) { return msgSetState(msg_id, state, 0); } public static boolean msgSetState(long msg_id, int state, int nexttime) { try { db().table("a_message") .set("state", state) .build(tb -> { if (state == 0) { int ntime = DisttimeUtil.nextTime(1); tb.set("dist_ntime", ntime); //可以检查处理中时间是否过长了?可手动恢复状态 } if (nexttime > 0) { tb.set("dist_ntime", nexttime); } }) .where("msg_id=? AND (state=0 OR state=1)", msg_id) .update(); return true; } catch (Exception ex) { //ex.printStackTrace(); LogUtil.log("msg", "setMessageState", msg_id + "", LogLevel.ERROR, "", ExceptionUtils.getString(ex)); return false; } } //设置消息重试状态(过几秒后再派发) public static boolean msgSetRepet(AMessageModel msg, int state) { try { msg.dist_count += 1; int ntime = DisttimeUtil.nextTime(msg.dist_count); db().table("a_message").usingExpr(true) .set("state", state) .set("dist_ntime", ntime) .set("dist_count", "$dist_count+1") .where("msg_id=? AND (state=0 OR state=1)", msg.msg_id) .update(); return true; } catch (SQLException ex) { //ex.printStackTrace(); LogUtil.log("msg", "setMessageRepet", msg.msg_id + "", LogLevel.ERROR, "", ExceptionUtils.getString(ex)); return false; } } public static void msgAddDistribution(long msg_id, AFileModel subs) throws SQLException { boolean isExists = db().table("a_message_distribution") .where("msg_id=?", msg_id).and("file_id=?", subs.file_id) .exists(); if (isExists == false) { db().table("a_message_distribution").usingExpr(true) .set("msg_id", msg_id) .set("file_id", subs.file_id) .set("receive_url", subs.path) .set("receive_way", 0) .set("log_date", Datetime.Now().getDate()) .set("log_fulltime", "$NOW()") .insert(); } } public static List<AMessageDistributionModel> msgGetDistributionList(long msg_id) throws Exception { return db().table("a_message_distribution") .where("msg_id=? AND (state=0 OR state=1)", msg_id) .select("*") .getList(AMessageDistributionModel.class); } //设置派发状态(成功与否) public static boolean msgSetDistributionState(long msg_id, AMessageDistributionModel dist, int state) { try { db().table("a_message_distribution") .set("state", state) .set("duration", dist._duration) .where("msg_id=? and file_id=? and state<>2", msg_id, dist.file_id) .update(); return true; } catch (Exception ex) { //ex.printStackTrace(); LogUtil.log("msg", "setDistributionState", msg_id + "", LogLevel.ERROR, "", ExceptionUtils.getString(ex)); return false; } } //发布消息 public static Object msgPublish(Map<String, Object> data) throws Exception { return msgAppend(data.get("topic"), data.get("content"), null, data.get("delay")); } //转发消息(会层层递进) public static Object msgRorward(Map<String, Object> data) throws Exception { if (data.containsKey("topic_source") == false) { return 0; } String topic = data.get("topic").toString(); String content = data.get("content").toString(); String topic_source = data.get("topic_source").toString(); DataList list = db().table("a_file") .where("label LIKE ? AND is_disabled=0", topic_source + "-%").orderBy("rank ASC") .select("label") .caching(Config.cache).cacheTag("msg_topic_" + topic_source) .getDataList(); if (list.getRowCount() == 0) { return 0; } if (topic.equals(topic_source)) {//如果主题与源相同,说明是第一次发出 DataItem item = list.getRow(0); String ntopic = item.getString("label"); //下个可传递的主题 msgAppend(ntopic, content, topic_source, data.get("delay")); } else { boolean is_do = false; for (DataItem item : list) { String ntopic = item.getString("label"); //下个可传递的主题 if (is_do) { if (topic.equals(ntopic) == false) { //找到下一个不同的主题 msgAppend(ntopic, content, topic_source, data.get("delay")); break; } } else { if (topic.equals(ntopic)) { is_do = true; } } } } return 0; } private static Object msgAppend(Object topic, Object content, String topic_source, Object delay) throws Exception { DbTableQuery qr = db().table("a_message") .set("topic", topic) .set("content", content) .set("log_date", Datetime.Now().getDate()) .set("log_fulltime", "$NOW()"); if (topic_source != null) { qr.set("topic_source", topic_source); } if (delay != null) { int delay2 = Integer.parseInt(delay.toString()); if (delay2 > 0) { int ntime2 = DisttimeUtil.nextTime(delay2); qr.set("dist_ntime", ntime2); } } return qr.insert(); } }
33.121849
119
0.516935
3b9f753967d4abbdcee8f9d9c37865a86670d24c
548
c
C
src/mmt_tcpip/lib/protocols/proto_nytimes.c
Montimage/mmt-dpi
92ce3808ffc7f3d392e598e9e3db6433bae9b645
[ "Apache-2.0" ]
3
2022-01-31T09:38:29.000Z
2022-02-13T19:58:16.000Z
src/mmt_tcpip/lib/protocols/proto_nytimes.c
Montimage/mmt-dpi
92ce3808ffc7f3d392e598e9e3db6433bae9b645
[ "Apache-2.0" ]
1
2022-02-24T10:04:10.000Z
2022-03-07T10:59:42.000Z
src/mmt_tcpip/lib/protocols/proto_nytimes.c
Montimage/mmt-dpi
92ce3808ffc7f3d392e598e9e3db6433bae9b645
[ "Apache-2.0" ]
null
null
null
#include "mmt_core.h" #include "plugin_defs.h" #include "extraction_lib.h" #include "../mmt_common_internal_include.h" /////////////// PROTOCOL INTERNAL CODE GOES HERE /////////////////// /////////////// END OF PROTOCOL INTERNAL CODE /////////////////// int init_proto_nytimes_struct() { protocol_t * protocol_struct = init_protocol_struct_for_registration(PROTO_NYTIMES, PROTO_NYTIMES_ALIAS); if (protocol_struct != NULL) { return register_protocol(protocol_struct, PROTO_NYTIMES); } else { return 0; } }
26.095238
109
0.638686
129b7755e2eafa370c5d9eeeaad71ce1fe52bf0b
971
h
C
platform/mcu/haas1000/drivers/apps/common/app_spec_ostimer.h
wanguojian/AliOS-Things
47fce29d4dd39d124f0bfead27998ad7beea8441
[ "Apache-2.0" ]
4,538
2017-10-20T05:19:03.000Z
2022-03-30T02:29:30.000Z
platform/mcu/haas1000/drivers/apps/common/app_spec_ostimer.h
wanguojian/AliOS-Things
47fce29d4dd39d124f0bfead27998ad7beea8441
[ "Apache-2.0" ]
1,088
2017-10-21T07:57:22.000Z
2022-03-31T08:15:49.000Z
hardware/chip/haas1000/drivers/apps/common/app_spec_ostimer.h
willianchanlovegithub/AliOS-Things
637c0802cab667b872d3b97a121e18c66f256eab
[ "Apache-2.0" ]
1,860
2017-10-20T05:22:35.000Z
2022-03-27T10:54:14.000Z
/* * Copyright (C) 2015-2020 Alibaba Group Holding Limited */ #ifndef __APP_SPEC_OSTIMER__ #define __APP_SPEC_OSTIMER__ #include "cmsis_os.h" typedef struct{ osTimerId timerid; os_timer_type type; os_ptimer ptimer; uint32_t interval; uint32_t ctx; void *argument; }SPEC_TIMER_CTX_T; #define specTimerDef(name, function) \ SPEC_TIMER_CTX_T spec_timer_ctx_##name = \ {NULL, osTimerOnce, function, 0, 0, NULL}; \ osTimerDef(name, app_spec_timer_handler) #define specTimer osTimer #define specTimerCtx(name) \ &spec_timer_ctx_##name void app_spec_timer_handler(void const *para); osStatus app_spec_timer_create (SPEC_TIMER_CTX_T *spec_timer_ctx, const osTimerDef_t *timer_def, os_timer_type type, void *argument); osStatus app_spec_timer_start (SPEC_TIMER_CTX_T *spec_timer_ctx, uint32_t millisec); osStatus app_spec_timer_stop (SPEC_TIMER_CTX_T *spec_timer_ctx); osStatus app_spec_timer_delete (SPEC_TIMER_CTX_T *spec_timer_ctx); #endif
28.558824
133
0.791967
fb8ffd054f4e79a2e9ef762c024c06416020b8ae
2,911
h
C
vendor/common/blt_led.h
telink-semi/telink_b91_ble_single_connection_sdk
ca449423fc5ea3b0bee16aab32bb4cef7b2638d8
[ "Apache-2.0" ]
null
null
null
vendor/common/blt_led.h
telink-semi/telink_b91_ble_single_connection_sdk
ca449423fc5ea3b0bee16aab32bb4cef7b2638d8
[ "Apache-2.0" ]
null
null
null
vendor/common/blt_led.h
telink-semi/telink_b91_ble_single_connection_sdk
ca449423fc5ea3b0bee16aab32bb4cef7b2638d8
[ "Apache-2.0" ]
null
null
null
/******************************************************************************************************** * @file blt_led.h * * @brief This is the header file for BLE SDK * * @author BLE GROUP * @date 2020.06 * * @par Copyright (c) 2020, Telink Semiconductor (Shanghai) Co., Ltd. ("TELINK") * * 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. *******************************************************************************************************/ /* * blt_led.h * * Created on: 2016-1-29 * Author: Administrator */ #ifndef BLT_LED_H_ #define BLT_LED_H_ #include "tl_common.h" #ifndef BLT_APP_LED_ENABLE #define BLT_APP_LED_ENABLE 0 #endif //led management /** * @brief Configure the parameters for led event */ typedef struct{ unsigned short onTime_ms; unsigned short offTime_ms; unsigned char repeatCount; //0xff special for long on(offTime_ms=0)/long off(onTime_ms=0) unsigned char priority; //0x00 < 0x01 < 0x02 < 0x04 < 0x08 < 0x10 < 0x20 < 0x40 < 0x80 } led_cfg_t; /** * @brief the status of led event */ typedef struct { unsigned char isOn; unsigned char polar; unsigned char repeatCount; unsigned char priority; unsigned short onTime_ms; unsigned short offTime_ms; unsigned int gpio_led; unsigned int startTick; }device_led_t; extern device_led_t device_led; #define DEVICE_LED_BUSY (device_led.repeatCount) /** * @brief This function is used to manage led tasks * @param[in] none * @return none */ extern void led_proc(void); /** * @brief This function is used to initialize device led setting * @param[in] gpio - the GPIO corresponding to device led * @param[in] polarity - 1 for high led on, 0 for low led on * @return none */ extern void device_led_init(u32 gpio,u8 polarity); /** * @brief This function is used to create new led task * @param[in] led_cfg - Configure the parameters for led event * @return 0 - new led event priority not higher than the not ongoing one * 1 - new led event created successfully */ int device_led_setup(led_cfg_t led_cfg); /** * @brief This function is used to manage led tasks * @param[in] none * @return none */ static inline void device_led_process(void) { #if (BLT_APP_LED_ENABLE) if(DEVICE_LED_BUSY){ led_proc(); } #endif } #endif /* BLT_LED_H_ */
25.094828
105
0.635177
76fa0ba3486c361bae84a301b79fa25a67c30493
398
h
C
code/cpp/rec/util/Deletable.h
rec/echomesh
be668971a687b141660fd2e5635d2fd598992a01
[ "MIT" ]
30
2015-02-18T14:07:00.000Z
2021-12-11T15:19:01.000Z
code/cpp/rec/util/Deletable.h
silky/echomesh
2fe5a00a79c215b4aca4083e5252fcdcbd0507aa
[ "MIT" ]
16
2015-01-01T23:17:24.000Z
2015-04-18T23:49:27.000Z
code/cpp/rec/util/Deletable.h
silky/echomesh
2fe5a00a79c215b4aca4083e5252fcdcbd0507aa
[ "MIT" ]
31
2015-03-11T20:04:07.000Z
2020-11-02T13:56:59.000Z
#ifndef __REC_UTIL_DELETABLE__ #define __REC_UTIL_DELETABLE__ #include "rec/base/base.h" // A class with only a virtual destructor. namespace rec { namespace util { class Deletable { public: Deletable() {} virtual ~Deletable() {} private: DISALLOW_COPY_ASSIGN_AND_LEAKS(Deletable); }; } // namespace util } // namespace rec #endif // __REC_UTIL_DELETABLE__
16.583333
45
0.690955
70da7f76ec6e0b38fa034fc9a59064334bf95a49
490
kt
Kotlin
jmusicbot/src/main/java/com/ivoberger/jmusicbot/exceptions/AuthenticationExceptions.kt
fossabot/JMusicBotAndroid
1ab66c1455369896d24084911b824680af6b5738
[ "Apache-2.0" ]
null
null
null
jmusicbot/src/main/java/com/ivoberger/jmusicbot/exceptions/AuthenticationExceptions.kt
fossabot/JMusicBotAndroid
1ab66c1455369896d24084911b824680af6b5738
[ "Apache-2.0" ]
null
null
null
jmusicbot/src/main/java/com/ivoberger/jmusicbot/exceptions/AuthenticationExceptions.kt
fossabot/JMusicBotAndroid
1ab66c1455369896d24084911b824680af6b5738
[ "Apache-2.0" ]
null
null
null
package com.ivoberger.jmusicbot.exceptions class AuthException : Exception { val reason: Reason constructor(reason: Reason) { this.reason = reason } constructor(reason: Reason, message: String) : super(message) { this.reason = reason } enum class Reason() { NEEDS_AUTH, NEEDS_PERMISSION } } class UsernameTakenException : Exception("Username already in use") class ServerErrorException(code: Int) : Exception("Server error $code")
21.304348
71
0.685714
875937c3129d4edb4140c0d970f2313888dc103c
8,168
html
HTML
genlib/bookstore/templates/bookstore/cart.html
KushajveerSingh/genlib
c348c1e9d2de9e9f722e41b8a7c451557ce0338e
[ "Apache-2.0" ]
null
null
null
genlib/bookstore/templates/bookstore/cart.html
KushajveerSingh/genlib
c348c1e9d2de9e9f722e41b8a7c451557ce0338e
[ "Apache-2.0" ]
null
null
null
genlib/bookstore/templates/bookstore/cart.html
KushajveerSingh/genlib
c348c1e9d2de9e9f722e41b8a7c451557ce0338e
[ "Apache-2.0" ]
null
null
null
<!doctype html> <html lang="en"> <head> <title>Shopping Cart</title> <!-- CSS Stylesheets --> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous"> <link rel="stylesheet" href="..\..\static\css\browse-books.css"> <!-- Google Fonts --> <link rel="preconnect" href="https://fonts.gstatic.com"> <link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@100;200;300;400;500;600;700;800;900&family=Ubuntu:wght@300;400;500;700&display=swap" rel="stylesheet"> <!-- Font Awesome --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.2/css/all.min.css" crossorigin="anonymous" /> </head> </head> <body> <main> <section id="title"> <div class="container-fluid"> <nav class="navbar navbar-expand-lg"> <a class="navbar-brand" href="/index.html">Genlib</a> <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="navbarSupportedContent"> <ul class="navbar-nav ms-auto"> <li class="nav-item"> <form class="d-flex" method="POST"> {% csrf_token %} <input class="form-control me-2" type="search" placeholder="Search for Books" aria-label="Search" name="search" value=""> <button class="btn search-button" type="submit" name="search_button" value="search_button">Search</button> </form> </li> <li class="nav-item"> <a class="nav-link" href="/browse-books.html">Browse</a> </li> <li class="nav-item"> <form method="POST"> {% csrf_token %} <button class="btn nav-link" type="submit" name="advanced_search_button" value="advanced_search_button">Advanced Search</button> </form> </li> <li class="nav-item"> <a class="nav-link" href="/cart.html"><i class="fas fa-shopping-cart"></i><span class="fa-layers-text fa-inverse cart-value"> {{ cartCount }}</span></a> </li> {% if not request.user.is_authenticated %} <li class="nav-item"> <a class="nav-link" href="login.html">Sign in</a> </li> <!-- Else show Edit Profile and Sign Out --> {% else %} <li class="nav-item dropdown"> <a href="#" class="nav-link dropdown-toggle" id="dropdownUser2" data-bs-toggle="dropdown" aria-expanded="false"> <b>&nbsp; {{ user.first_name}}</b> <i class="fa fa-user"></i> </a> {% if user.is_staff %} <ul class="dropdown-menu text-small shadow" aria-labelledby="dropdownUser2"> <li><a class="dropdown-item" href="/admin-home.html">Admin Portal</a></li> <li><a class="dropdown-item" href="/editprofile.html">Edit Profile</a></li> <li><a class="dropdown-item" href="/orderHistory.html">Order History</a></li> <li> <hr class="dropdown-divider"> </li> <li><a class="dropdown-item" href="/signout">Sign out</a></li> </ul> {% else %} <ul class="dropdown-menu text-small shadow" aria-labelledby="dropdownUser2"> <li><a class="dropdown-item" href="/editprofile.html">Edit Profile</a></li> <li><a class="dropdown-item" href="orderHistory.html">Order History</a></li> <li> <hr class="dropdown-divider"> </li> <li><a class="dropdown-item" href="/signout">Sign out</a></li> </ul> {% endif %} </li> {% endif %} </ul> </div> </nav> </div> </section> <div class="container-fluid"> <h3 class="none"><span class="current-page"><em>Shopping Cart</em></span> > Shipping Details > Payment Details </h3> <hr> <h1 class="big-heading">Shopping Cart</h1> {% for book, price in books_in_cart %} <div class="row cart-row"> <div class="col-lg-2 cart-container"> <img src="../../static/{{ book.book.image_path }}" class="card-img-top" alt="..."> </div> <div class="col-lg-2 cart-container"> <h5 class="cart-element">Book #{{ forloop.counter }}</h5> <p class="cart-element">{{ book.book.description|truncatewords:10 }}</p> </div> <div class="col-lg-2 cart-container"> <div class="number-input cart-element"> <form method="POST" style="display:inline!important;"> {% csrf_token %} <button onclick="this.parentNode.querySelector('input[type=number]').stepDown()" class="minus" name="minus_button" type="submit" value={{ book.book.isbn }}></button> <input class="quantity" min="0" name="quantity" value="{{ book.quantity }}" type="number"> <button onclick="this.parentNode.querySelector('input[type=number]').stepUp()" class="plus" name="plus_button" type="submit" value={{ book.book.isbn }}></button> </form> </div> </div> <div class="col-lg-2 cart-container"> <p class="cart-element">${{ price }}</p> </div> <div class="col-lg-2 cart-container"> <form method="POST"> {% csrf_token %} <button class="fas fa-2x fa-times cart-element" type="submit" name="cross_button" value="{{ book.book.isbn }}"></form> </div> </div> {% endfor %} <hr> <div class="row cart-row"> <div class="col-lg-2 cart-container"> <a class="btn btn-sm explore-button" href="/index.html"><i class="fas fa-arrow-left"></i> Continue Shopping</a> </div> <div class="col-lg-2 cart-container"> </div> <div class="col-lg-2 cart-container"> </div> <div class="col-lg-2 cart-container"> <p><span><strong>Subtotal</strong></span> : ${{ total_cost }}</p> </div> <div class="col-lg-2 cart-container"> <form method="POST"> {% csrf_token %} <button class="btn btn-sm explore-button" type="submit" name="continue_checkout" value="continue_checkout">Continue to Checkout</button> </form> </div> </div> </div> <footer id="footer"> <div class="container-fluid"> <i class="footer-icons fab fa-twitter"></i> <i class="footer-icons fab fa-facebook-f"></i> <i class="footer-icons fab fa-instagram"></i> <i class="footer-icons fas fa-envelope"></i> <p>© Copyright 2021 Genlib</p> </div> </footer> </main> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4" crossorigin="anonymous"></script> <script src="..\..\static\js\cart.js"></script> {% if minus_flag == True %} <script> alert("We do not have the stock to add the book to your cart.") </script> {% endif %} {% if checkout_flag == True %} <script> alert("Cannot checkout with an exmpy cart.") </script> {% endif %} {% if success_flag == True %} <script> alert("All the books from your previous order have been added to your cart in the quantity you ordered before.") </script> {% endif %} {% if err_flag == True %} <script> alert("Not all the books from your previous order were available in the quantity you ordered. Books in stock have been added to your cart.") </script> {% endif %} </body> </html>
44.391304
214
0.561949
1b243e0a54a917acd9915a610e941df80144ad6b
10,767
swift
Swift
Platform/macOS/Display/VMMetalView.swift
454053205/UTM
fae7ed83d79e784845e79a9cf92cc4ba494e1585
[ "Apache-2.0" ]
null
null
null
Platform/macOS/Display/VMMetalView.swift
454053205/UTM
fae7ed83d79e784845e79a9cf92cc4ba494e1585
[ "Apache-2.0" ]
null
null
null
Platform/macOS/Display/VMMetalView.swift
454053205/UTM
fae7ed83d79e784845e79a9cf92cc4ba494e1585
[ "Apache-2.0" ]
null
null
null
// // Copyright © 2020 osy. 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 Carbon.HIToolbox private let macVkToScancode = [ kVK_ANSI_A: 0x1E, kVK_ANSI_S: 0x1F, kVK_ANSI_D: 0x20, kVK_ANSI_F: 0x21, kVK_ANSI_H: 0x23, kVK_ANSI_G: 0x22, kVK_ANSI_Z: 0x2C, kVK_ANSI_X: 0x2D, kVK_ANSI_C: 0x2E, kVK_ANSI_V: 0x2F, kVK_ANSI_B: 0x30, kVK_ANSI_Q: 0x10, kVK_ANSI_W: 0x11, kVK_ANSI_E: 0x12, kVK_ANSI_R: 0x13, kVK_ANSI_Y: 0x15, kVK_ANSI_T: 0x14, kVK_ANSI_1: 0x02, kVK_ANSI_2: 0x03, kVK_ANSI_3: 0x04, kVK_ANSI_4: 0x05, kVK_ANSI_6: 0x07, kVK_ANSI_5: 0x06, kVK_ANSI_Equal: 0x0D, kVK_ANSI_9: 0x0A, kVK_ANSI_7: 0x08, kVK_ANSI_Minus: 0x0C, kVK_ANSI_8: 0x09, kVK_ANSI_0: 0x0B, kVK_ANSI_RightBracket: 0x1B, kVK_ANSI_O: 0x18, kVK_ANSI_U: 0x16, kVK_ANSI_LeftBracket: 0x1A, kVK_ANSI_I: 0x17, kVK_ANSI_P: 0x19, kVK_ANSI_L: 0x26, kVK_ANSI_J: 0x24, kVK_ANSI_Quote: 0x28, kVK_ANSI_K: 0x25, kVK_ANSI_Semicolon: 0x27, kVK_ANSI_Backslash: 0x2B, kVK_ANSI_Comma: 0x33, kVK_ANSI_Slash: 0x35, kVK_ANSI_N: 0x31, kVK_ANSI_M: 0x32, kVK_ANSI_Period: 0x34, kVK_ANSI_Grave: 0x29, kVK_ANSI_KeypadDecimal: 0x53, kVK_ANSI_KeypadMultiply: 0x37, kVK_ANSI_KeypadPlus: 0x4E, kVK_ANSI_KeypadClear: 0x45, kVK_ANSI_KeypadDivide: 0xE035, kVK_ANSI_KeypadEnter: 0xE01C, kVK_ANSI_KeypadMinus: 0x4A, kVK_ANSI_KeypadEquals: 0x59, kVK_ANSI_Keypad0: 0x52, kVK_ANSI_Keypad1: 0x4F, kVK_ANSI_Keypad2: 0x50, kVK_ANSI_Keypad3: 0x51, kVK_ANSI_Keypad4: 0x4B, kVK_ANSI_Keypad5: 0x4C, kVK_ANSI_Keypad6: 0x4D, kVK_ANSI_Keypad7: 0x47, kVK_ANSI_Keypad8: 0x48, kVK_ANSI_Keypad9: 0x49, kVK_Return: 0x1C, kVK_Tab: 0x0F, kVK_Space: 0x39, kVK_Delete: 0x0E, kVK_Escape: 0x01, kVK_Command: 0xE05B, kVK_Shift: 0x2A, kVK_CapsLock: 0x3A, kVK_Option: 0x38, kVK_Control: 0x1D, kVK_RightCommand: 0xE05C, kVK_RightShift: 0x36, kVK_RightOption: 0xE038, kVK_RightControl: 0xE01D, kVK_Function: 0x00, kVK_F17: 0x68, kVK_VolumeUp: 0xE030, kVK_VolumeDown: 0xE02E, kVK_Mute: 0xE020, kVK_F18: 0x69, kVK_F19: 0x6A, kVK_F20: 0x6B, kVK_F5: 0x3F, kVK_F6: 0x40, kVK_F7: 0x41, kVK_F3: 0x3D, kVK_F8: 0x42, kVK_F9: 0x43, kVK_F11: 0x57, kVK_F13: 0x64, kVK_F16: 0x67, kVK_F14: 0x65, kVK_F10: 0x44, kVK_F12: 0x58, kVK_F15: 0x66, kVK_Help: 0x00, kVK_Home: 0xE047, kVK_PageUp: 0xE049, kVK_ForwardDelete: 0xE053, kVK_F4: 0x3E, kVK_End: 0xE04F, kVK_F2: 0x3C, kVK_PageDown: 0xE051, kVK_F1: 0x3B, kVK_LeftArrow: 0xE04B, kVK_RightArrow: 0xE04D, kVK_DownArrow: 0xE050, kVK_UpArrow: 0xE048, kVK_ISO_Section: 0x00, kVK_JIS_Yen: 0x7D, kVK_JIS_Underscore: 0x73, kVK_JIS_KeypadComma: 0x5C, kVK_JIS_Eisu: 0x73, kVK_JIS_Kana: 0x70, ] class VMMetalView: MTKView { weak var inputDelegate: VMMetalViewInputDelegate? private var wholeTrackingArea: NSTrackingArea? private var lastModifiers = NSEvent.ModifierFlags() private(set) var isMouseCaptured = false override var acceptsFirstResponder: Bool { true } override func updateTrackingAreas() { logger.debug("update tracking area") let trackingArea = NSTrackingArea(rect: CGRect(origin: .zero, size: frame.size), options: [.mouseMoved, .mouseEnteredAndExited, .activeWhenFirstResponder], owner: self, userInfo: nil) if let oldTrackingArea = wholeTrackingArea { removeTrackingArea(oldTrackingArea) NSCursor.unhide() } wholeTrackingArea = trackingArea addTrackingArea(trackingArea) super.updateTrackingAreas() } override func mouseEntered(with event: NSEvent) { logger.debug("mouse entered") NSCursor.hide() } override func mouseExited(with event: NSEvent) { logger.debug("mouse exited") NSCursor.unhide() } override func mouseDown(with event: NSEvent) { logger.trace("mouse down: \(event.buttonNumber)") inputDelegate?.mouseDown(button: .left) } override func rightMouseDown(with event: NSEvent) { logger.trace("right mouse down: \(event.buttonNumber)") inputDelegate?.mouseDown(button: .right) } override func mouseUp(with event: NSEvent) { logger.trace("mouse up: \(event.buttonNumber)") inputDelegate?.mouseUp(button: .left) } override func rightMouseUp(with event: NSEvent) { logger.trace("right mouse up: \(event.buttonNumber)") inputDelegate?.mouseUp(button: .right) } override func keyDown(with event: NSEvent) { guard !event.isARepeat else { return } logger.trace("key down: \(event.keyCode)") inputDelegate?.keyDown(keyCode: macVkToScancode[Int(event.keyCode)] ?? 0) } override func keyUp(with event: NSEvent) { logger.trace("key up: \(event.keyCode)") inputDelegate?.keyUp(keyCode: macVkToScancode[Int(event.keyCode)] ?? 0) } override func flagsChanged(with event: NSEvent) { let modifiers = event.modifierFlags logger.trace("modifers: \(modifiers)") if modifiers.isSuperset(of: [.option, .control]) { logger.trace("release cursor") inputDelegate?.requestReleaseCapture() } sendModifiers(lastModifiers.subtracting(modifiers), press: false) sendModifiers(modifiers.subtracting(lastModifiers), press: true) lastModifiers = modifiers } private func sendModifiers(_ modifier: NSEvent.ModifierFlags, press: Bool) { if modifier.contains(.capsLock) { if press { inputDelegate?.keyDown(keyCode: macVkToScancode[kVK_CapsLock]!) } else { inputDelegate?.keyUp(keyCode: macVkToScancode[kVK_CapsLock]!) } } if modifier.contains(.command) { if press { inputDelegate?.keyDown(keyCode: macVkToScancode[kVK_Command]!) } else { inputDelegate?.keyUp(keyCode: macVkToScancode[kVK_Command]!) } } if modifier.contains(.control) { if press { inputDelegate?.keyDown(keyCode: macVkToScancode[kVK_Control]!) } else { inputDelegate?.keyUp(keyCode: macVkToScancode[kVK_Control]!) } } if modifier.contains(.function) { if press { inputDelegate?.keyDown(keyCode: macVkToScancode[kVK_Function]!) } else { inputDelegate?.keyUp(keyCode: macVkToScancode[kVK_Function]!) } } if modifier.contains(.help) { if press { inputDelegate?.keyDown(keyCode: macVkToScancode[kVK_Help]!) } else { inputDelegate?.keyUp(keyCode: macVkToScancode[kVK_Help]!) } } if modifier.contains(.option) { if press { inputDelegate?.keyDown(keyCode: macVkToScancode[kVK_Option]!) } else { inputDelegate?.keyUp(keyCode: macVkToScancode[kVK_Option]!) } } if modifier.contains(.shift) { if press { inputDelegate?.keyDown(keyCode: macVkToScancode[kVK_Shift]!) } else { inputDelegate?.keyUp(keyCode: macVkToScancode[kVK_Shift]!) } } } override func mouseDragged(with event: NSEvent) { mouseMoved(with: event) } override func rightMouseDragged(with event: NSEvent) { mouseMoved(with: event) } override func otherMouseDragged(with event: NSEvent) { mouseMoved(with: event) } override func mouseMoved(with event: NSEvent) { logger.trace("mouse moved: \(event.deltaX), \(event.deltaY)") if isMouseCaptured { inputDelegate?.mouseMove(relativePoint: CGPoint(x: event.deltaX, y: -event.deltaY), button: NSEvent.pressedMouseButtons.inputButtons()) } else { let location = event.locationInWindow let converted = convert(location, from: nil) inputDelegate?.mouseMove(absolutePoint: converted, button: NSEvent.pressedMouseButtons.inputButtons()) } } override func scrollWheel(with event: NSEvent) { guard event.scrollingDeltaY != 0 else { return } logger.trace("scroll: \(event.scrollingDeltaY)") inputDelegate?.mouseScroll(dy: event.scrollingDeltaY, button: NSEvent.pressedMouseButtons.inputButtons()) } } extension VMMetalView { private var screenCenter: CGPoint? { guard let window = self.window else { return nil } guard let screen = window.screen else { return nil } let centerView = CGPoint(x: frame.size.width / 2, y: frame.size.height / 2) let centerWindow = convert(centerView, to: nil) var centerScreen = window.convertPoint(toScreen: centerWindow) let screenHeight = screen.frame.height centerScreen.y = screenHeight - centerScreen.y logger.debug("screen \(centerScreen.x), \(centerScreen.y)") return centerScreen } func captureMouse() { CGAssociateMouseAndMouseCursorPosition(0) CGWarpMouseCursorPosition(screenCenter ?? .zero) isMouseCaptured = true NSCursor.hide() } func releaseMouse() { CGAssociateMouseAndMouseCursorPosition(1) isMouseCaptured = false NSCursor.unhide() } } private extension Int { func inputButtons() -> CSInputButton { var pressed = CSInputButton() if self & (1 << 0) != 0 { pressed.formUnion(.left) } if self & (1 << 1) != 0 { pressed.formUnion(.right) } if self & (1 << 2) != 0 { pressed.formUnion(.middle) } return pressed } }
31.57478
191
0.626916
7384dad7a2ad8e6a9b9011ec4b24476206d24681
10,450
rs
Rust
storage/src/archives/package_entry_id.rs
HomonidXXX/ton-labs-node
a5c0a2ebda1e93c3c596d7705aa2a60f0a227633
[ "Apache-2.0" ]
null
null
null
storage/src/archives/package_entry_id.rs
HomonidXXX/ton-labs-node
a5c0a2ebda1e93c3c596d7705aa2a60f0a227633
[ "Apache-2.0" ]
null
null
null
storage/src/archives/package_entry_id.rs
HomonidXXX/ton-labs-node
a5c0a2ebda1e93c3c596d7705aa2a60f0a227633
[ "Apache-2.0" ]
null
null
null
use std::borrow::Borrow; use std::collections::hash_map::DefaultHasher; use std::fmt::{Display, Formatter}; use std::hash::{Hash, Hasher}; use std::str::FromStr; use lazy_static::lazy_static; use regex::Regex; use ton_api::ton::PublicKey; use ton_block::{BlockIdExt, ShardIdent}; use ton_types::{error, fail, Result, UInt256}; #[derive(Debug, Hash, PartialEq, Eq)] pub enum PackageEntryId<B, U256, PK> where B: Borrow<BlockIdExt> + Hash, U256: Borrow<UInt256> + Hash, PK: Borrow<PublicKey> + Hash { Empty, Block(B), ZeroState(B), PersistentState { mc_block_id: B, block_id: B }, Proof(B), ProofLink(B), Signatures(B), Candidate { block_id: B, collated_data_hash: U256, source: PK }, BlockInfo(B), } impl PackageEntryId<BlockIdExt, UInt256, PublicKey> { pub fn from_filename(filename: &str) -> Result<Self> { if filename == PackageEntryId::<BlockIdExt, UInt256, PublicKey>::Empty.filename_prefix() { return Ok(PackageEntryId::Empty); } let dummy = BlockIdExt::default(); if let Some(mut block_ids) = Self::parse_block_ids( filename, PackageEntryId::Block(&dummy), 1 )? { return Ok(PackageEntryId::Block(block_ids.remove(0))); } if let Some(mut block_ids) = Self::parse_block_ids( filename, PackageEntryId::ZeroState(&dummy), 1 )? { return Ok(PackageEntryId::ZeroState(block_ids.remove(0))); } if let Some(mut block_ids) = Self::parse_block_ids( filename, PackageEntryId::Proof(&dummy), 1 )? { return Ok(PackageEntryId::Proof(block_ids.remove(0))); } if let Some(mut block_ids) = Self::parse_block_ids( filename, PackageEntryId::ProofLink(&dummy), 1)? { return Ok(PackageEntryId::ProofLink(block_ids.remove(0))); } if let Some(mut block_ids) = Self::parse_block_ids( filename, PackageEntryId::Signatures(&dummy), 1 )? { return Ok(PackageEntryId::Signatures(block_ids.remove(0))); } if let Some(mut block_ids) = Self::parse_block_ids( filename, PackageEntryId::BlockInfo(&dummy), 1 )? { return Ok(PackageEntryId::BlockInfo(block_ids.remove(0))); } if let Some(mut block_ids) = Self::parse_block_ids( filename, PackageEntryId::PersistentState { mc_block_id: &dummy, block_id: &dummy, }, 2 )? { return Ok(PackageEntryId::PersistentState { mc_block_id: block_ids.remove(0), block_id: block_ids.remove(0), }); } if filename.starts_with( PackageEntryId::<&BlockIdExt, UInt256, PublicKey>::Candidate { block_id: &dummy, collated_data_hash: UInt256::default(), source: PublicKey::default() }.filename_prefix() ) { fail!("Unsupported from_filename() for PackageEntryId::Candidate"); } fail!("Cannot parse filename: {}", filename) } fn parse_block_ids(filename: &str, dummy: PackageEntryId<&BlockIdExt, UInt256, PublicKey>, count: usize) -> Result<Option<Vec<BlockIdExt>>> { let prefix = dummy.filename_prefix(); if !filename.starts_with(&(prefix.to_string() + "_")) { return Ok(None); } let mut result = Vec::new(); let mut pos = prefix.len() + 1; for _ in 0..count { let (block_id, len) = parse_block_id(&filename[pos..filename.len()])?; result.push(block_id); pos += len + 1; } Ok(Some(result)) } } impl<B, U256, PK> PackageEntryId<B, U256, PK> where B: Borrow<BlockIdExt> + Hash, U256: Borrow<UInt256> + Hash, PK: Borrow<PublicKey> + Hash { fn filename_prefix(&self) -> &'static str { match self { PackageEntryId::Empty => "empty", PackageEntryId::Block(_) => "block", PackageEntryId::ZeroState(_) => "zerostate", PackageEntryId::PersistentState { mc_block_id: _, block_id: _ } => "state", PackageEntryId::Proof(_) => "proof", PackageEntryId::ProofLink(_) => "prooflink", PackageEntryId::Signatures(_) => "signatures", PackageEntryId::Candidate { block_id: _, collated_data_hash: _, source: _ } => "candidate", PackageEntryId::BlockInfo(_) => "info", } } } pub trait GetFileName { fn filename(&self) -> String; } pub trait FromFileName { fn from_filename(filename: &str) -> Result<Self> where Self: Sized; } impl GetFileName for BlockIdExt { fn filename(&self) -> String { format!("({wc_id},{shard_id:016x},{seq_no}):{root_hash:064X}:{file_hash:064X}", wc_id = self.shard().workchain_id(), shard_id = self.shard().shard_prefix_with_tag(), seq_no = self.seq_no(), root_hash = self.root_hash(), file_hash = self.file_hash(), ) } } fn parse_block_id(filename: &str) -> Result<(BlockIdExt, usize)> { lazy_static! { static ref REGEX: Regex = Regex::new(r"^\((-?\d+),([0-9a-f]{16}),(\d+)\):([0-9A-F]{64}):([0-9A-F]{64})") .expect("Failed to compile regular expression"); } let captures = REGEX.captures(filename) .ok_or_else(|| error!("Incorrect BlockIdExt format: {}", filename))?; enum Groups { Chain = 1, Shard, SeqNo, RootHash, FileHash } let workchain_id = i32::from_str(&captures[Groups::Chain as usize])?; let shard_prefix_tagged = u64::from_str_radix(&captures[Groups::Shard as usize], 16)?; let seq_no = u32::from_str(&captures[Groups::SeqNo as usize])?; let root_hash = UInt256::from_str(&captures[Groups::RootHash as usize])?; let file_hash = UInt256::from_str(&captures[Groups::FileHash as usize])?; let shard_id = ShardIdent::with_tagged_prefix(workchain_id, shard_prefix_tagged)?; Ok((BlockIdExt { shard_id, seq_no, root_hash, file_hash }, captures[0].len())) } impl FromFileName for BlockIdExt { fn from_filename(filename: &str) -> Result<Self> { parse_block_id(filename) .map(|(block_id, _len)| block_id) } } impl GetFileName for PublicKey { fn filename(&self) -> String { match self { PublicKey::Pub_Aes(aes) => base64::encode(&aes.key.0), PublicKey::Pub_Ed25519(ed25519) => base64::encode(&ed25519.key.0), PublicKey::Pub_Overlay(overlay) => base64::encode(&overlay.name.0), PublicKey::Pub_Unenc(unenc) => base64::encode(&unenc.data.0), } } } impl<B, U256, PK> GetFileName for PackageEntryId<B, U256, PK> where B: Borrow<BlockIdExt> + Hash, U256: Borrow<UInt256> + Hash, PK: Borrow<PublicKey> + Hash { fn filename(&self) -> String { match self { PackageEntryId::Empty => self.filename_prefix().to_string(), PackageEntryId::Block(block_id) | PackageEntryId::ZeroState(block_id) | PackageEntryId::Proof(block_id) | PackageEntryId::ProofLink(block_id) | PackageEntryId::Signatures(block_id) | PackageEntryId::BlockInfo(block_id) => format!("{}_{}", self.filename_prefix(), block_id.borrow().filename()), PackageEntryId::PersistentState { mc_block_id, block_id } => format!("{}_{}_{}", self.filename_prefix(), mc_block_id.borrow().filename(), block_id.borrow().filename() ), PackageEntryId::Candidate { block_id, collated_data_hash, source } => format!("{}_{}_{:X}_{}", self.filename_prefix(), block_id.borrow().filename(), collated_data_hash.borrow(), source.borrow().filename() ), } } } pub trait GetFileNameShort { fn filename_short(&self) -> String; } impl GetFileNameShort for BlockIdExt { fn filename_short(&self) -> String { let mut hasher = DefaultHasher::new(); self.hash(&mut hasher); format!("{wc_id}_{shard_id:016X}_{seq_no}_{hash:016X}", wc_id = self.shard().workchain_id(), shard_id = self.shard().shard_prefix_with_tag(), seq_no = self.seq_no(), hash = hasher.finish(), ) } } impl<B, U256, PK> GetFileNameShort for PackageEntryId<B, U256, PK> where B: Borrow<BlockIdExt> + Hash, U256: Borrow<UInt256> + Hash, PK: Borrow<PublicKey> + Hash { fn filename_short(&self) -> String { match self { PackageEntryId::Empty => self.filename_prefix().to_string(), PackageEntryId::Block(block_id) | PackageEntryId::ZeroState(block_id) | PackageEntryId::Proof(block_id) | PackageEntryId::ProofLink(block_id) | PackageEntryId::Signatures(block_id) | PackageEntryId::BlockInfo(block_id) => format!("{}_{}", self.filename_prefix(), block_id.borrow().filename_short()), PackageEntryId::PersistentState { mc_block_id, block_id } => format!("{}_{}_{}", self.filename_prefix(), mc_block_id.borrow().filename_short(), block_id.borrow().filename_short() ), PackageEntryId::Candidate { block_id, collated_data_hash, source } => format!("{}_{}_{:X}_{}", self.filename_prefix(), block_id.borrow().filename_short(), collated_data_hash.borrow(), source.borrow().filename() ), } } } impl<B, U256, PK> Display for PackageEntryId<B, U256, PK> where B: Borrow<BlockIdExt> + Hash, U256: Borrow<UInt256> + Hash, PK: Borrow<PublicKey> + Hash { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { f.write_str(self.filename().as_str()) } }
32.758621
145
0.563828
6bf72e1413731ffeae0458f4098afb24ab91f81a
2,358
kt
Kotlin
OSTKitWrapperSDK/src/main/java/capo/ostkit/sdk/wrapper/OpenWrapper.kt
tinhuit89/OSTKitWrapperSDK
c47e86b8d2301bc62475def22f0814140826d792
[ "MIT" ]
2
2018-05-18T06:39:18.000Z
2018-05-18T06:39:19.000Z
OSTKitWrapperSDK/src/main/java/capo/ostkit/sdk/wrapper/OpenWrapper.kt
tinhuit89/OSTKitWrapperSDK
c47e86b8d2301bc62475def22f0814140826d792
[ "MIT" ]
null
null
null
OSTKitWrapperSDK/src/main/java/capo/ostkit/sdk/wrapper/OpenWrapper.kt
tinhuit89/OSTKitWrapperSDK
c47e86b8d2301bc62475def22f0814140826d792
[ "MIT" ]
null
null
null
package capo.ostkit.sdk.wrapper import android.content.Context import capo.ostkit.sdk.service.VolleyRequestCallback import capo.ostkit.sdk.service.VolleyRequestQueue import com.android.volley.Request /** * Created by TinhVC on 5/17/18. */ open class OpenWrapper { protected var context: Context? = null protected var apiKey: String = "" protected var secret: String = "" protected var endPoint: String = "" protected var params = HashMap<String, String>() protected var baseUrl: String = "" private fun getMethod(endPoint: String): Int { if (endPoint.equals(OstWrapperSdk.USER_CREATE, false)) return Request.Method.POST if (endPoint.equals(OstWrapperSdk.USER_EDIT, false)) return Request.Method.POST if (endPoint.equals(OstWrapperSdk.USER_LIST, false)) return Request.Method.GET if (endPoint.equals(OstWrapperSdk.AIRDROP_EXECUTE, false)) return Request.Method.POST if (endPoint.equals(OstWrapperSdk.AIRDROP_RETRIEVE, false)) return Request.Method.GET if (endPoint.equals(OstWrapperSdk.AIRDROP_LIST, false)) return Request.Method.GET if (endPoint.equals(OstWrapperSdk.TRANSACTION_TYPE_CREATE, false)) return Request.Method.POST if (endPoint.equals(OstWrapperSdk.TRANSACTION_TYPE_EDIT, false)) return Request.Method.POST if (endPoint.equals(OstWrapperSdk.TRANSACTION_TYPE_LIST, false)) return Request.Method.GET if (endPoint.equals(OstWrapperSdk.TRANSACTION_TYPE_EXECUTE, false)) return Request.Method.POST if (endPoint.equals(OstWrapperSdk.TRANSACTION_TYPE_STATUS, false)) return Request.Method.POST return -1 } fun execute(callback: VolleyRequestCallback) { val paramSorted = params.toSortedMap() val method = getMethod(endPoint) var url = "" if (method == Request.Method.GET) { for (entry in paramSorted.entries) { if (url.equals("", ignoreCase = true)) { url = OstWrapperSdk.BASE_URL + endPoint + "?" + entry.key + "=" + entry.value } else { url += "&" + entry.key + "=" + entry.value } } } else { url = OstWrapperSdk.BASE_URL + endPoint } VolleyRequestQueue(context, getMethod(endPoint), url, paramSorted, callback) } }
36.276923
102
0.672604
29d72db53ba72aeb7314e59926d448084fa0f05f
576
swift
Swift
Library/Sources/Sessions/SessionState.swift
javabird25/SwiftyVK
b8b3f2e585de1ca6112e7b659b2b10e4354cad20
[ "MIT" ]
165
2017-10-21T08:58:21.000Z
2022-02-21T12:51:39.000Z
Library/Sources/Sessions/SessionState.swift
javabird25/SwiftyVK
b8b3f2e585de1ca6112e7b659b2b10e4354cad20
[ "MIT" ]
97
2017-10-21T13:44:19.000Z
2021-09-04T11:17:42.000Z
Library/Sources/Sessions/SessionState.swift
javabird25/SwiftyVK
b8b3f2e585de1ca6112e7b659b2b10e4354cad20
[ "MIT" ]
53
2017-10-20T19:55:02.000Z
2022-03-27T15:57:06.000Z
/// State of user session /// initiated: Session is created and user not authorized ywt /// authorized: Session is created and user authorized /// destroyed: User logged out and session destroyed public enum SessionState: Int, Comparable, Codable { case destroyed = -1 case initiated = 0 case authorized = 1 public static func == (lhs: SessionState, rhs: SessionState) -> Bool { return lhs.rawValue == rhs.rawValue } public static func < (lhs: SessionState, rhs: SessionState) -> Bool { return lhs.rawValue < rhs.rawValue } }
32
74
0.678819
087281f08540690bcf5ba6afb8930fa4e11328e7
845
swift
Swift
BeaverCounter/Game.swift
roger-wetzel/BeaverCounter
8418ca7956f19d0877a7ce2c3f5d4a6a60656246
[ "MIT" ]
null
null
null
BeaverCounter/Game.swift
roger-wetzel/BeaverCounter
8418ca7956f19d0877a7ce2c3f5d4a6a60656246
[ "MIT" ]
null
null
null
BeaverCounter/Game.swift
roger-wetzel/BeaverCounter
8418ca7956f19d0877a7ce2c3f5d4a6a60656246
[ "MIT" ]
null
null
null
// // Game.swift // Beaver Counter // // Copyright © 2020 Roger Wetzel. All rights reserved. // import Foundation class Game { let maxRounds = 6 var players = [Player]() var round: Int? var numberOfPlayers: Int? { didSet { players = [Player]() for _ in 0..<numberOfPlayers! { let player = Player() players.append(player) } } } func addUpScores() { for player in players { player.addUpScore() } } func nextRound() { if round != nil { round! += 1 } } func isEndOfGame() -> Bool { var endOfGame = false if let currentRound = round { endOfGame = currentRound > maxRounds } return endOfGame } }
17.978723
55
0.47929
97d6699997e3102135191ee03616210630b9c1e2
891
lua
Lua
modules/gamelib/util.lua
PokemonUFC/Client
331f12fff8853eb29d5a038eaf36fba8ab9e75c4
[ "MIT" ]
null
null
null
modules/gamelib/util.lua
PokemonUFC/Client
331f12fff8853eb29d5a038eaf36fba8ab9e75c4
[ "MIT" ]
null
null
null
modules/gamelib/util.lua
PokemonUFC/Client
331f12fff8853eb29d5a038eaf36fba8ab9e75c4
[ "MIT" ]
null
null
null
function postostring(pos) return pos.x .. " " .. pos.y .. " " .. pos.z end function dirtostring(dir) for k,v in pairs(Directions) do if v == dir then return k end end end function getVocationNameById(vocation) if (vocation >= 10 and vocation <= 15) then return "blaze" elseif (vocation >= 20 and vocation <= 25) then return "hurricane" elseif (vocation >= 30 and vocation <= 35) then return "voltagic" elseif (vocation >= 40 and vocation <= 45) then return "spectrum" elseif (vocation >= 50 and vocation <= 55) then return "vital" elseif (vocation >= 60 and vocation <= 65) then return "gaia" elseif (vocation >= 70 and vocation <= 75) then return "avalanche" elseif (vocation >= 80 and vocation <= 85) then return "heremit" elseif (vocation >= 90 and vocation <= 95) then return "zen" end return "trainer" end
25.457143
49
0.64422
4a05211d7a42ab3ac011117328f955935e1cf545
2,776
hpp
C++
src/lib/client/FavoritesStateChangeNotifications.hpp
gerickson/openhlx
f23a825ca56ee226db393da14d81a7d4e9ae0b33
[ "Apache-2.0" ]
1
2021-05-21T21:10:09.000Z
2021-05-21T21:10:09.000Z
src/lib/client/FavoritesStateChangeNotifications.hpp
gerickson/openhlx
f23a825ca56ee226db393da14d81a7d4e9ae0b33
[ "Apache-2.0" ]
12
2021-06-12T16:42:30.000Z
2022-02-01T18:44:42.000Z
src/lib/client/FavoritesStateChangeNotifications.hpp
gerickson/openhlx
f23a825ca56ee226db393da14d81a7d4e9ae0b33
[ "Apache-2.0" ]
null
null
null
/* * Copyright (c) 2019-2021 Grant Erickson * 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. * */ /** * @file * This file defines derived objects for a HLX client favorite object * data model state change notifications (SCNs). * */ #ifndef OPENHLXCLIENTFAVORITESSTATECHANGENOTIFICATIONS_HPP #define OPENHLXCLIENTFAVORITESSTATECHANGENOTIFICATIONS_HPP #include <OpenHLX/Client/IdentifierStateChangeNotificationBasis.hpp> #include <OpenHLX/Client/NameStateChangeNotificationBasis.hpp> #include <OpenHLX/Client/SourceStateChangeNotificationBasis.hpp> #include <OpenHLX/Client/StateChangeNotificationBasis.hpp> #include <OpenHLX/Client/StateChangeNotificationTypes.hpp> #include <OpenHLX/Common/Errors.hpp> #include <OpenHLX/Model/FavoriteModel.hpp> #include <OpenHLX/Model/SoundModel.hpp> #include <OpenHLX/Model/ZoneModel.hpp> namespace HLX { namespace Client { namespace StateChange { /** * @brief * A derivable object for a HLX client favorite object data model state * change notification (SCN). * * @ingroup client * @ingroup favorite * @ingroup state-change * */ class FavoritesNotificationBasis : public NotificationBasis, public IdentifierNotificationBasis { public: virtual ~FavoritesNotificationBasis(void) = default; protected: FavoritesNotificationBasis(void) = default; Common::Status Init(const Type &aType, const IdentifierType &aFavoriteIdentifier); }; /** * @brief * An object for a HLX client favorite object name data model property * state change notification (SCN). * * @ingroup client * @ingroup favorite * @ingroup state-change * */ class FavoritesNameNotification : public FavoritesNotificationBasis, public NameNotificationBasis { public: FavoritesNameNotification(void) = default; virtual ~FavoritesNameNotification(void) = default; Common::Status Init(const IdentifierType &aFavoriteIdentifier, const char *aName, const size_t &aNameLength); Common::Status Init(const IdentifierType &aFavoriteIdentifier, const std::string &aName); }; }; // namespace StateChange }; // namespace Client }; // namespace HLX #endif // OPENHLXCLIENTFAVORITESSTATECHANGENOTIFICATIONS_HPP
27.485149
113
0.747118
2a0c810000a2d50216d5bd2ee93fb64759b25318
3,194
java
Java
src/net/frapu/code/visualization/petrinets/Comment.java
frapu78/processeditor
7a608d7fcc9a172a768a9907c9365a466164a7b1
[ "Apache-2.0" ]
5
2015-12-29T00:56:12.000Z
2021-03-27T15:52:37.000Z
src/net/frapu/code/visualization/petrinets/Comment.java
frapu78/processeditor
7a608d7fcc9a172a768a9907c9365a466164a7b1
[ "Apache-2.0" ]
32
2015-02-26T21:09:45.000Z
2018-06-18T19:34:53.000Z
src/net/frapu/code/visualization/petrinets/Comment.java
frapu78/processeditor
7a608d7fcc9a172a768a9907c9365a466164a7b1
[ "Apache-2.0" ]
6
2015-02-24T11:15:41.000Z
2021-12-26T07:01:44.000Z
/** * * Process Editor - Petri net Package * * (C) 2008,2009 Frank Puhlmann * * http://frapu.net * */ package net.frapu.code.visualization.petrinets; import java.awt.Color; import java.awt.Font; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.RenderingHints; import java.awt.Shape; import java.awt.geom.Rectangle2D; import net.frapu.code.visualization.*; /** * * @author frank */ public class Comment extends ProcessNode { /** The font size */ public final static String PROP_FONTSIZE = "font_size"; /** The font style (see java.awt.Font) for values */ public final static String PROP_FONTSTYLE = "font_style"; /** The background color (see java.awt.Color) for values */ public final static String PROP_BACKGROUND = "color_background"; //private boolean enabled = false; public Comment() { super(); initializeProperties(); } public Comment(int x, int y, String label) { super(); initializeProperties(); setPos(x,y); setText(label); } private void initializeProperties() { setSize(100,50); setProperty(PROP_FONTSIZE, "12"); setProperty(PROP_FONTSTYLE, ""+Font.PLAIN); setProperty(PROP_BACKGROUND, ""+new Color(228,239,14).getRGB()); } public void setSize(int w, int h) { super.setSize(w, h); } protected void paintInternal(Graphics g) { drawComment(g); } protected Shape getOutlineShape() { Rectangle2D outline = new Rectangle2D.Float(getPos().x-(getSize().width/2), getPos().y-(getSize().height/2), getSize().width, getSize().height); return outline; } /** * Draws a comment. */ protected void drawComment(Graphics g) { Graphics2D g2 = (Graphics2D) g; g2.setStroke(PetriNetUtils.gatterStroke); g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); Shape outline = getOutlineShape(); Color backgroundColor = Color.YELLOW; try { backgroundColor = new Color(Integer.parseInt(this.getProperty(PROP_BACKGROUND))); } catch (NumberFormatException e) {}; g2.setPaint(backgroundColor); g2.fill(outline); g2.setPaint(Color.BLACK); g2.draw(outline); // Set font size int fontSize = 12; try { fontSize = Integer.parseInt(this.getProperty(PROP_FONTSIZE)); } catch (NumberFormatException e) {}; int fontStyle = Font.PLAIN; try { fontStyle = Integer.parseInt(this.getProperty(PROP_FONTSTYLE)); } catch (NumberFormatException e) {}; // Set font g2.setFont(new Font("Arial Narrow", fontStyle, fontSize)); // Draw text if (getText() != null) { PetriNetUtils.drawFitText(g2, getPos().x, getPos().y-getSize().height/2, getSize().width-5, getSize().height-5, getText()); } // String metaData = ""; } public String toString() { return "Comment"; } }
26.180328
96
0.600501
4040927a9780f1087bfd41762b291efceb3f9e84
10,695
py
Python
vmraid/integrations/doctype/google_contacts/google_contacts.py
sowrisurya/vmraid
f833e00978019dad87af80b41279c0146c063ed5
[ "MIT" ]
null
null
null
vmraid/integrations/doctype/google_contacts/google_contacts.py
sowrisurya/vmraid
f833e00978019dad87af80b41279c0146c063ed5
[ "MIT" ]
null
null
null
vmraid/integrations/doctype/google_contacts/google_contacts.py
sowrisurya/vmraid
f833e00978019dad87af80b41279c0146c063ed5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2019, VMRaid Technologies and contributors # For license information, please see license.txt import google.oauth2.credentials import requests from googleapiclient.discovery import build from googleapiclient.errors import HttpError import vmraid from vmraid import _ from vmraid.integrations.doctype.google_settings.google_settings import get_auth_url from vmraid.model.document import Document from vmraid.utils import get_request_site_address SCOPES = "https://www.googleapis.com/auth/contacts" class GoogleContacts(Document): def validate(self): if not vmraid.db.get_single_value("Google Settings", "enable"): vmraid.throw(_("Enable Google API in Google Settings.")) def get_access_token(self): google_settings = vmraid.get_doc("Google Settings") if not google_settings.enable: vmraid.throw(_("Google Contacts Integration is disabled.")) if not self.refresh_token: button_label = vmraid.bold(_('Allow Google Contacts Access')) raise vmraid.ValidationError(_("Click on {0} to generate Refresh Token.").format(button_label)) data = { "client_id": google_settings.client_id, "client_secret": google_settings.get_password(fieldname="client_secret", raise_exception=False), "refresh_token": self.get_password(fieldname="refresh_token", raise_exception=False), "grant_type": "refresh_token", "scope": SCOPES } try: r = requests.post(get_auth_url(), data=data).json() except requests.exceptions.HTTPError: button_label = vmraid.bold(_('Allow Google Contacts Access')) vmraid.throw(_("Something went wrong during the token generation. Click on {0} to generate a new one.").format(button_label)) return r.get("access_token") @vmraid.whitelist() def authorize_access(g_contact, reauthorize=None): """ If no Authorization code get it from Google and then request for Refresh Token. Google Contact Name is set to flags to set_value after Authorization Code is obtained. """ google_settings = vmraid.get_doc("Google Settings") google_contact = vmraid.get_doc("Google Contacts", g_contact) redirect_uri = get_request_site_address(True) + "?cmd=vmraid.integrations.doctype.google_contacts.google_contacts.google_callback" if not google_contact.authorization_code or reauthorize: vmraid.cache().hset("google_contacts", "google_contact", google_contact.name) return get_authentication_url(client_id=google_settings.client_id, redirect_uri=redirect_uri) else: try: data = { "code": google_contact.authorization_code, "client_id": google_settings.client_id, "client_secret": google_settings.get_password(fieldname="client_secret", raise_exception=False), "redirect_uri": redirect_uri, "grant_type": "authorization_code" } r = requests.post(get_auth_url(), data=data).json() if "refresh_token" in r: vmraid.db.set_value("Google Contacts", google_contact.name, "refresh_token", r.get("refresh_token")) vmraid.db.commit() vmraid.local.response["type"] = "redirect" vmraid.local.response["location"] = "/app/Form/Google%20Contacts/{}".format(google_contact.name) vmraid.msgprint(_("Google Contacts has been configured.")) except Exception as e: vmraid.throw(e) def get_authentication_url(client_id=None, redirect_uri=None): return { "url": "https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&response_type=code&prompt=consent&client_id={}&include_granted_scopes=true&scope={}&redirect_uri={}".format(client_id, SCOPES, redirect_uri) } @vmraid.whitelist() def google_callback(code=None): """ Authorization code is sent to callback as per the API configuration """ google_contact = vmraid.cache().hget("google_contacts", "google_contact") vmraid.db.set_value("Google Contacts", google_contact, "authorization_code", code) vmraid.db.commit() authorize_access(google_contact) def get_google_contacts_object(g_contact): """ Returns an object of Google Calendar along with Google Calendar doc. """ google_settings = vmraid.get_doc("Google Settings") account = vmraid.get_doc("Google Contacts", g_contact) credentials_dict = { "token": account.get_access_token(), "refresh_token": account.get_password(fieldname="refresh_token", raise_exception=False), "token_uri": get_auth_url(), "client_id": google_settings.client_id, "client_secret": google_settings.get_password(fieldname="client_secret", raise_exception=False), "scopes": "https://www.googleapis.com/auth/contacts" } credentials = google.oauth2.credentials.Credentials(**credentials_dict) google_contacts = build( serviceName="people", version="v1", credentials=credentials, static_discovery=False ) return google_contacts, account @vmraid.whitelist() def sync(g_contact=None): filters = {"enable": 1} if g_contact: filters.update({"name": g_contact}) google_contacts = vmraid.get_list("Google Contacts", filters=filters) for g in google_contacts: return sync_contacts_from_google_contacts(g.name) def sync_contacts_from_google_contacts(g_contact): """ Syncs Contacts from Google Contacts. https://developers.google.com/people/api/rest/v1/people.connections/list """ google_contacts, account = get_google_contacts_object(g_contact) if not account.pull_from_google_contacts: return results = [] contacts_updated = 0 sync_token = account.get_password(fieldname="next_sync_token", raise_exception=False) or None contacts = vmraid._dict() while True: try: contacts = google_contacts.people().connections().list(resourceName='people/me', pageToken=contacts.get("nextPageToken"), syncToken=sync_token, pageSize=2000, requestSyncToken=True, personFields="names,emailAddresses,organizations,phoneNumbers").execute() except HttpError as err: vmraid.throw(_("Google Contacts - Could not sync contacts from Google Contacts {0}, error code {1}.").format(account.name, err.resp.status)) for contact in contacts.get("connections", []): results.append(contact) if not contacts.get("nextPageToken"): if contacts.get("nextSyncToken"): vmraid.db.set_value("Google Contacts", account.name, "next_sync_token", contacts.get("nextSyncToken")) vmraid.db.commit() break vmraid.db.set_value("Google Contacts", account.name, "last_sync_on", vmraid.utils.now_datetime()) for idx, connection in enumerate(results): vmraid.publish_realtime('import_google_contacts', dict(progress=idx+1, total=len(results)), user=vmraid.session.user) for name in connection.get("names"): if name.get("metadata").get("primary"): contacts_updated += 1 contact = vmraid.get_doc({ "doctype": "Contact", "first_name": name.get("givenName") or "", "middle_name": name.get("middleName") or "", "last_name": name.get("familyName") or "", "designation": get_indexed_value(connection.get("organizations"), 0, "title"), "pulled_from_google_contacts": 1, "google_contacts": account.name, "company_name": get_indexed_value(connection.get("organizations"), 0, "name") }) for email in connection.get("emailAddresses", []): contact.add_email(email_id=email.get("value"), is_primary=1 if email.get("metadata").get("primary") else 0) for phone in connection.get("phoneNumbers", []): contact.add_phone(phone=phone.get("value"), is_primary_phone=1 if phone.get("metadata").get("primary") else 0) contact.insert(ignore_permissions=True) return _("{0} Google Contacts synced.").format(contacts_updated) if contacts_updated > 0 \ else _("No new Google Contacts synced.") def insert_contacts_to_google_contacts(doc, method=None): """ Syncs Contacts from Google Contacts. https://developers.google.com/people/api/rest/v1/people/createContact """ if not vmraid.db.exists("Google Contacts", {"name": doc.google_contacts}) or doc.pulled_from_google_contacts \ or not doc.sync_with_google_contacts: return google_contacts, account = get_google_contacts_object(doc.google_contacts) if not account.push_to_google_contacts: return names = { "givenName": doc.first_name, "middleName": doc.middle_name, "familyName": doc.last_name } phoneNumbers = [{"value": phone_no.phone} for phone_no in doc.phone_nos] emailAddresses = [{"value": email_id.email_id} for email_id in doc.email_ids] try: contact = google_contacts.people().createContact(body={"names": [names],"phoneNumbers": phoneNumbers, "emailAddresses": emailAddresses}).execute() vmraid.db.set_value("Contact", doc.name, "google_contacts_id", contact.get("resourceName")) except HttpError as err: vmraid.msgprint(_("Google Calendar - Could not insert contact in Google Contacts {0}, error code {1}.").format(account.name, err.resp.status)) def update_contacts_to_google_contacts(doc, method=None): """ Syncs Contacts from Google Contacts. https://developers.google.com/people/api/rest/v1/people/updateContact """ # Workaround to avoid triggering updation when Event is being inserted since # creation and modified are same when inserting doc if not vmraid.db.exists("Google Contacts", {"name": doc.google_contacts}) or doc.modified == doc.creation \ or not doc.sync_with_google_contacts: return if doc.sync_with_google_contacts and not doc.google_contacts_id: # If sync_with_google_contacts is checked later, then insert the contact rather than updating it. insert_contacts_to_google_contacts(doc) return google_contacts, account = get_google_contacts_object(doc.google_contacts) if not account.push_to_google_contacts: return names = { "givenName": doc.first_name, "middleName": doc.middle_name, "familyName": doc.last_name } phoneNumbers = [{"value": phone_no.phone} for phone_no in doc.phone_nos] emailAddresses = [{"value": email_id.email_id} for email_id in doc.email_ids] try: contact = google_contacts.people().get(resourceName=doc.google_contacts_id, \ personFields="names,emailAddresses,organizations,phoneNumbers").execute() contact["names"] = [names] contact["phoneNumbers"] = phoneNumbers contact["emailAddresses"] = emailAddresses google_contacts.people().updateContact(resourceName=doc.google_contacts_id,body={"names":[names], "phoneNumbers":phoneNumbers,"emailAddresses":emailAddresses,"etag":contact.get("etag")}, updatePersonFields="names,emailAddresses,organizations,phoneNumbers").execute() vmraid.msgprint(_("Contact Synced with Google Contacts.")) except HttpError as err: vmraid.msgprint(_("Google Contacts - Could not update contact in Google Contacts {0}, error code {1}.").format(account.name, err.resp.status)) def get_indexed_value(d, index, key): if not d: return "" try: return d[index].get(key) except IndexError: return ""
37.135417
215
0.756241
bc991a90230b690623da37fd00e4a2783971f996
1,992
asm
Assembly
programs/oeis/268/A268586.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
22
2018-02-06T19:19:31.000Z
2022-01-17T21:53:31.000Z
programs/oeis/268/A268586.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
41
2021-02-22T19:00:34.000Z
2021-08-28T10:47:47.000Z
programs/oeis/268/A268586.asm
neoneye/loda
afe9559fb53ee12e3040da54bd6aa47283e0d9ec
[ "Apache-2.0" ]
5
2021-02-24T21:14:16.000Z
2021-08-09T19:48:05.000Z
; A268586: Expansion of (x^3*(3*x - 2))/(2*x - 1)^3. ; 0,0,0,2,9,30,88,240,624,1568,3840,9216,21760,50688,116736,266240,602112,1351680,3014656,6684672,14745600,32374784,70778880,154140672,334495744,723517440,1560281088,3355443200,7197425664,15401484288,32883343360,70061654016,148981678080,316216967168,670014898176,1417339207680,2993592205312,6313601925120,13297218748416,27968827031552,58755152609280,123282741264384,258385232527360,540959720865792,1131397464981504,2363949999718400,4934608185458688,10291428835983360,21444874788143104,44648968180727808,92886742314516480,193091834023510016,401101841812684800,832602981110120448,1727130457096585216,3580361703759544320,7417428586279206912,15357274729333391360,31777398970726219776,65716525762590277632,135828564761494159360,280592271183691382784,579343056064940605440,1195579600277300314112,2466099098354045681664,5084383835316195164160,10477750633867025317888,21582690566240175390720,44438206473566309842944,91458957117451956912128,188156789551837426483200,386938903690131554697216,795423604458355865681920,1634529098883255949590528,3357602569320317746937856,6894655064989682011996160,14152932349160326705446912,29042553869648318064230400,59577375547883444015988736,122177065644803460968742912,250474318251405982134435840,513340126153861913309609984,1051765463064727381994373120,2154305810553269189326405632,4411370315773781858502836224,9030675872521279935055134720,18482057930268450822908018688,37815199637545600584809185280,77351909642222433114399965184,158185525644934998251953717248,323411835263305596817396203520,661059980978393066796132335616,1350902067870171224983669309440,2759987317586755322887597457408,5637578938905621771890611716096,11512842365354036556561855283200,23506005465950800659784570765312,47982555922701339455090054922240,97926008867630721265620322615296,199813425860974659410917842747392 mov $2,$0 sub $0,1 seq $2,196410 ; a(n) = n*2^(n-5). mul $0,$2 sub $0,$2 lpb $0 mov $1,$0 mod $0,4 lpe div $1,32 mov $0,$1
132.8
1,810
0.903614
41409e92946a2be96f5e66605c7d2eb86bae38e0
1,699
c
C
tests/old_prefs/init.c
khval/BetterFakeMode
aace8a1355e36a6cf2591a88c2859987f506c4bc
[ "MIT" ]
1
2021-05-30T19:48:11.000Z
2021-05-30T19:48:11.000Z
tests/old_prefs/init.c
khval/BetterFakeMode
aace8a1355e36a6cf2591a88c2859987f506c4bc
[ "MIT" ]
25
2021-04-23T21:02:44.000Z
2021-08-03T22:15:51.000Z
tests/old_prefs/init.c
khval/BetterFakeMode
aace8a1355e36a6cf2591a88c2859987f506c4bc
[ "MIT" ]
null
null
null
#include <stdbool.h> #include <proto/exec.h> #include <proto/dos.h> #include <proto/intuition.h> #include <proto/graphics.h> #include <proto/gadtools.h> #include <proto/asl.h> #include "init.h" struct Library *IntuitionBase; struct IntuitionIFace *IIntuition; struct Library *GraphicsBase; struct GraphicsIFace *IGraphics; struct Library *ASLBase; struct ASLIFace *IASL; struct Library *GadToolsBase; struct GadToolsIFace *IGadTools; BOOL open_lib( const char *name, int ver , const char *iname, int iver, struct Library **base, struct Interface **interface) { *interface = NULL; *base = OpenLibrary( name , ver); if (*base) { *interface = GetInterface( *base, iname , iver, TAG_END ); if (!*interface) Printf("Unable to getInterface %s for %s %ld!\n",iname,name,ver); } else { Printf("Unable to open the %s %ld!\n",name,ver); } return (*interface) ? TRUE : FALSE; } void close_lib_all( struct Library **Base, struct Interface **I ) { if (*Base) CloseLibrary(*Base); *Base = 0; if (*I) DropInterface((struct Interface*) *I); *I = 0; } bool open_libs() { if ( ! open_lib( "asl.library", 51L , "main", 1, &ASLBase, (struct Interface **) &IASL ) ) return FALSE; if ( ! open_lib( "gadtools.library", 51L , "main", 1, &GadToolsBase, (struct Interface **) &IGadTools ) ) return FALSE; if ( ! open_lib( "graphics.library", 54L , "main", 1, &GraphicsBase, (struct Interface **) &IGraphics ) ) return FALSE; if ( ! open_lib( "intuition.library", 53L , "main", 1, &IntuitionBase, (struct Interface **) &IIntuition ) ) return FALSE; return TRUE; } void close_libs() { close_lib(ASL); close_lib(GadTools); close_lib(Intuition); close_lib(Graphics); }
24.623188
124
0.678046
22c9d7814fff0088d3e78d76f8f8605e33b76728
5,300
cpp
C++
MarkupLanguageParser/output.cpp
QuantumWarpCode/simple-markup
5b23a68d8a062e33e47e5adbd3b003fe75e5778d
[ "MIT" ]
null
null
null
MarkupLanguageParser/output.cpp
QuantumWarpCode/simple-markup
5b23a68d8a062e33e47e5adbd3b003fe75e5778d
[ "MIT" ]
null
null
null
MarkupLanguageParser/output.cpp
QuantumWarpCode/simple-markup
5b23a68d8a062e33e47e5adbd3b003fe75e5778d
[ "MIT" ]
null
null
null
//output.cpp #include "stdafx.hpp" #include <windows.h> #include "output.hpp" void Output::show() { #ifdef _WIN32 HWND hWnd = GetConsoleWindow(); ShowWindow(hWnd, SW_SHOW); return; #else Output::expectedError("No linux equivalent of SW_SHOW", 502); return; #endif } void Output::hide() { #ifdef _WIN32 HWND hWnd = GetConsoleWindow(); ShowWindow(hWnd, SW_HIDE); return; #else Output::expectedError("No linux equivalent of SW_HIDE", 503); return; #endif } void Output::end() { #ifdef _WIN32 Output::show(); #endif #ifdef _MSC_VER std::cout << "Press any key to continue..." << std::endl; _getch(); return; #else # ifdef __MINGW32__ std::cout << "Press any key to continue..." << std::endl; _getch(); return # else std::cout << "Press the enter key to continue..." << std::endl; std::cin.get(); return; # endif #endif } void Output::header(char* text) { std::cout << "=====" << text << "=====" << std::endl; return; } void Output::log(char* text, char* log) { std::ofstream logfile; logfile.open(log + std::string(".log"), std::ios::app); logfile << text << std::endl; logfile.close(); return; } void Output::log(const char* text, char* log) { std::ofstream logfile; logfile.open(log + std::string(".log"), std::ios::app); logfile << text << std::endl; logfile.close(); return; } void Output::log(std::string text, char* log) { std::ofstream logfile; logfile.open(log + std::string(".log"), std::ios::app); logfile << text << std::endl; logfile.close(); return; } void Output::clear(char* log) { std::ofstream logfile; logfile.open(log + std::string(".log"), std::ios::trunc); logfile.close(); return; } void Output::criticalError(char* text, int error){ std::cerr << text << "... Exiting with error code:" << error << std::endl; Output::log(text, "CriticalError"); Output::endNoMessage(); return; } void Output::expectedError(char* text, int error){ std::cerr << text << "... Exception with error code:" << error << std::endl; Output::log(text, "ExpectedError"); return; } void Output::endNoMessage() { #ifdef _WIN32 Output::show(); #endif #ifdef _MSC_VER _getch(); return; #else # ifdef __MINGW32__ _getch(); return # else std::cin.get(); return; # endif #endif } void Output::systemCommand(int command) { #ifdef __linux__ if (command == 0){ std::system("shutdown"); return; } else if (command == 1){ Output::expectedError("No pause command for linux", 501); return; } #endif #ifdef _WIN32 if (command == 0){ std::system("shutdown.exe"); return; } else if (command == 1){ std::system("pause"); return; } #endif } /*wchar_t* */ char** Output::ExePath(void /*char* relpath*/) { //wchar_t buffer[MAX_PATH]; //GetModuleFileName(NULL, buffer, MAX_PATH); //_fullpath(buffer, relpath); /* std::string::size_type pos = std::string(buffer).find_last_of("\\/"); return std::string(buffer).substr(0, pos); */ //return buffer; char** buffer; _get_pgmptr(buffer); return buffer; } std::string Output::readFile(char* filename) { FILE* infile; int tempint; tempint = fopen_s(&infile, filename, "r"); if (tempint != 0) { std::cout << "Error " << tempint << " when reading file " << filename << std::endl; return "Error reading file."; } boolean loop = true; int loops = 0; char temptext[2]; std::string returntext; int index = 0; int length = 0; while (loop) { fgets(temptext, 2, infile); if (temptext != NULL && std::feof(infile) != 1) { if (loops == 0) { returntext = temptext; } else { returntext += temptext; } loops++; length++; } else { loop = false; } } fclose(infile); return returntext; } std::string Output::readFile(std::string filename) { FILE* infile; int tempint; tempint = fopen_s(&infile, filename.c_str(), "r"); if (tempint != 0) { std::cout << "Error " << tempint << " when reading file " << filename << std::endl; return "Error reading file."; } boolean loop = true; int loops = 0; char temptext[2]; std::string returntext; int index = 0; int length = 0; while (loop) { fgets(temptext, 2, infile); if (temptext != NULL && std::feof(infile) != 1) { if (loops == 0) { returntext = temptext; } else { returntext += temptext; } loops++; length++; } else { loop = false; } } fclose(infile); return returntext; } /*char* Output::fileStringFix(char* string) { char* slash = "/"; char* rslash = "\\"; int i = 0; while (i < string.length()) { if (Output::charToInt(string[i]) == Output::charToInt(slash[0])) { string[i] = rslash[0]; } i++; } return string; }*/ std::string Output::fileStringFix(std::string string) { char* slash = "/"; char* rslash = "\\"; int rslashI = 92; if (string.find_first_of(slash[0]) != 2 && string.find_first_of(rslash[0]) != 2) { std::cout << "Appending C:\\ as drive directory." << std::endl; std::string newString = "C:\\"; newString += string; string = newString; } int i = 0; while (i < string.length()) { if (Output::charToInt(string[i]) == Output::charToInt(slash[0])) { string[i] = intToChar(rslashI); } i++; } return string; } int Output::charToInt(char letter) { int number; number = letter; return number; } char Output::intToChar(unsigned int number) { int letter; letter = number; return letter; }
18.531469
85
0.630189
e80fbe7c9113e8ba7d620ffb0c4e0b8c89e49bd4
336
cc
C++
lcof/qing-wa-tiao-tai-jie-wen-ti-lcof.cc
phiysng/leetcode
280e8b1a0b45233deb2262ceec85b8174e9b2ced
[ "BSD-3-Clause" ]
3
2019-04-12T19:12:55.000Z
2020-05-29T07:55:16.000Z
lcof/qing-wa-tiao-tai-jie-wen-ti-lcof.cc
phiysng/leetcode
280e8b1a0b45233deb2262ceec85b8174e9b2ced
[ "BSD-3-Clause" ]
null
null
null
lcof/qing-wa-tiao-tai-jie-wen-ti-lcof.cc
phiysng/leetcode
280e8b1a0b45233deb2262ceec85b8174e9b2ced
[ "BSD-3-Clause" ]
null
null
null
#include "../leetcode/leetcode/cpp/oj_header.h" /// 面试题10- II. 青蛙跳台阶问题 class Solution { public: int numWays(int n) { vector<int> v{1, 1, 2}; v.reserve(n + 1); for (int i = 3; i <= n; ++i) { v.push_back((v[i - 1] + v[i - 2]) % 1000000007); } return v[n]; } };
15.272727
60
0.449405
46cadc8740d67ee92b1e3d7a4caf899d583593e5
1,438
ps1
PowerShell
Src/Private/Set-LabVMDiskFileResource.ps1
valainisgt/Lability
695004eaa90c7539b9390792801c418f6d86020c
[ "MIT" ]
267
2016-01-27T19:02:25.000Z
2022-03-24T14:21:07.000Z
Src/Private/Set-LabVMDiskFileResource.ps1
valainisgt/Lability
695004eaa90c7539b9390792801c418f6d86020c
[ "MIT" ]
184
2016-01-27T13:57:43.000Z
2022-01-02T20:10:51.000Z
Src/Private/Set-LabVMDiskFileResource.ps1
valainisgt/Lability
695004eaa90c7539b9390792801c418f6d86020c
[ "MIT" ]
75
2016-01-27T12:53:11.000Z
2022-03-29T09:03:09.000Z
function Set-LabVMDiskFileResource { <# .SYNOPSIS Copies a node's defined resources to VHD(X) file. #> [CmdletBinding()] [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions','')] param ( ## Lab VM/Node name [Parameter(Mandatory, ValueFromPipeline)] [System.String] $NodeName, ## Lab DSC configuration data [Parameter(Mandatory, ValueFromPipeline)] [System.Collections.Hashtable] [Microsoft.PowerShell.DesiredStateConfiguration.ArgumentToConfigurationDataTransformationAttribute()] $ConfigurationData, ## Mounted VHD path [Parameter(Mandatory, ValueFromPipelineByPropertyName)] [System.String] $VhdDriveLetter, ## Catch all to enable splatting @PSBoundParameters [Parameter(ValueFromRemainingArguments)] $RemainingArguments ) process { $hostDefaults = Get-ConfigurationData -Configuration Host; $resourceDestinationPath = '{0}:\{1}' -f $vhdDriveLetter, $hostDefaults.ResourceShareName; $expandLabResourceParams = @{ ConfigurationData = $ConfigurationData; Name = $NodeName; DestinationPath = $resourceDestinationPath; } Write-Verbose -Message ($localized.AddingVMResource -f 'VM'); Expand-LabResource @expandLabResourceParams; } #end process } #end function
35.073171
109
0.67733
35c0510ea245368593b01e6bbf9398c9b3782002
38
dart
Dart
resources/components/widget.dart
DinithHerath/flutter-bloc-generator-vscode-extension
c55ee615a55ab185474c7dc1f14e75052ed71185
[ "MIT" ]
3
2021-12-14T06:25:05.000Z
2022-01-19T04:52:59.000Z
resources/components/widget.dart
DinithHerath/flutter-bloc-generator-vscode-extension
c55ee615a55ab185474c7dc1f14e75052ed71185
[ "MIT" ]
1
2022-01-14T20:12:36.000Z
2022-01-15T05:42:45.000Z
resources/components/widget.dart
DinithHerath/flutter-bloc-generator-vscode-extension
c55ee615a55ab185474c7dc1f14e75052ed71185
[ "MIT" ]
null
null
null
// TODO: Add componenets widgets here
19
37
0.763158
909c471ec0bf8cdc9f941f8279fc3dc032d04dd6
6,569
py
Python
backend/webserver/api/images.py
AdanMora/coco-annotator
481969e065aabd4ed595f5b2e52fe6041880e5c0
[ "MIT" ]
null
null
null
backend/webserver/api/images.py
AdanMora/coco-annotator
481969e065aabd4ed595f5b2e52fe6041880e5c0
[ "MIT" ]
null
null
null
backend/webserver/api/images.py
AdanMora/coco-annotator
481969e065aabd4ed595f5b2e52fe6041880e5c0
[ "MIT" ]
null
null
null
from flask_restplus import Namespace, Resource, reqparse from flask_login import login_required, current_user from werkzeug.datastructures import FileStorage from flask import send_file from ..util import query_util, coco_util from database import ( ImageModel, DatasetModel, AnnotationModel ) from PIL import Image import datetime import os import io api = Namespace('image', description='Image related operations') image_all = reqparse.RequestParser() image_all.add_argument('fields', required=False, type=str) image_all.add_argument('page', default=1, type=int) image_all.add_argument('per_page', default=50, type=int, required=False) image_upload = reqparse.RequestParser() image_upload.add_argument('image', location='files', type=FileStorage, required=True, help='PNG or JPG file') image_upload.add_argument('folder', required=False, default='', help='Folder to insert photo into') image_download = reqparse.RequestParser() image_download.add_argument('asAttachment', type=bool, default=False) image_download.add_argument('thumbnail', type=bool, default=False) image_download.add_argument('width', type=int) image_download.add_argument('height', type=int) copy_annotations = reqparse.RequestParser() copy_annotations.add_argument('category_ids', location='json', type=list, required=False, default=None, help='Categories to copy') @api.route('/') class Images(Resource): @api.expect(image_all) @login_required def get(self): """ Returns all images """ args = image_all.parse_args() per_page = args['perPage'] page = args['page']-1 fields = args.get('fields', '') images = current_user.images.filter(deleted=False) total = images.count() pages = int(total/per_page) + 1 images = images.skip(page*per_page).limit(per_page) if fields: images = images.only(*fields.split(',')) return { "total": total, "pages": pages, "page": page, "fields": fields, "per_page": per_page, "images": query_util.fix_ids(images.all()) } @api.expect(image_upload) @login_required def post(self): """ Creates an image """ args = image_upload.parse_args() image = args['image'] folder = args['folder'] if len(folder) > 0: folder = folder[0].strip('/') + folder[1:] directory = os.path.join(Config.DATASET_DIRECTORY, folder) path = os.path.join(directory, image.filename) if os.path.exists(path): return {'message': 'file already exists'}, 400 if not os.path.exists(directory): os.makedirs(directory) pil_image = Image.open(io.BytesIO(image.read())) image_model = ImageModel( file_name=image.filename, width=pil_image.size[0], height=pil_image.size[1], path=path ) image_model.save() pil_image.save(path) image.close() pil_image.close() return query_util.fix_ids(image_model) @api.route('/<int:image_id>') class ImageId(Resource): @api.expect(image_download) @login_required def get(self, image_id): """ Returns category by ID """ args = image_download.parse_args() as_attachment = args.get('asAttachment') thumbnail = args.get('thumbnail') image = current_user.images.filter(id=image_id, deleted=False).first() if image is None: return {'success': False}, 400 width = args.get('width') height = args.get('height') if not width: width = image.width if not height: height = image.height pil_image = image.thumbnail() if thumbnail else Image.open(image.path) image.flag_thumbnail(flag=False) pil_image.thumbnail((width, height), Image.ANTIALIAS) image_io = io.BytesIO() pil_image = pil_image.convert("RGB") pil_image.save(image_io, "JPEG", quality=90) image_io.seek(0) return send_file(image_io, attachment_filename=image.file_name, as_attachment=as_attachment) @login_required def delete(self, image_id): """ Deletes an image by ID """ image = current_user.images.filter(id=image_id, deleted=False).first() if image is None: return {"message": "Invalid image id"}, 400 if not current_user.can_delete(image): return {"message": "You do not have permission to download the image"}, 403 image.update(set__deleted=True, set__deleted_date=datetime.datetime.now()) return {"success": True} @api.route('/copy/<int:from_id>/<int:to_id>/annotations') class ImageCopyAnnotations(Resource): @api.expect(copy_annotations) @login_required def post(self, from_id, to_id): args = copy_annotations.parse_args() category_ids = args.get('category_ids') image_from = current_user.images.filter(id=from_id).first() image_to = current_user.images.filter(id=to_id).first() if image_from is None or image_to is None: return {'success': False, 'message': 'Invalid image ids'}, 400 if image_from == image_to: return {'success': False, 'message': 'Cannot copy self'}, 400 if image_from.width != image_to.width or image_from.height != image_to.height: return {'success': False, 'message': 'Image sizes do not match'}, 400 if category_ids is None: category_ids = DatasetModel.objects(id=image_from.dataset_id).first().categories query = AnnotationModel.objects( image_id=image_from.id, category_id__in=category_ids, deleted=False ) return {'annotations_created': image_to.copy_annotations(query)} @api.route('/<int:image_id>/coco') class ImageCoco(Resource): @login_required def get(self, image_id): """ Returns coco of image and annotations """ image = current_user.images.filter(id=image_id).exclude('deleted_date').first() if image is None: return {"message": "Invalid image ID"}, 400 if not current_user.can_download(image): return {"message": "You do not have permission to download the images's annotations"}, 403 return coco_util.get_image_coco(image_id)
31.430622
102
0.633582
af9082c4d96b9c4ee33af4ab7d10a60622d441da
7,480
lua
Lua
macos/hammerspoon/space-management.lua
lgo/dotfiles
6c4311200c41e0d7832e40874495b9ad36381031
[ "MIT" ]
null
null
null
macos/hammerspoon/space-management.lua
lgo/dotfiles
6c4311200c41e0d7832e40874495b9ad36381031
[ "MIT" ]
2
2018-11-04T02:39:28.000Z
2018-11-04T02:41:21.000Z
macos/hammerspoon/space-management.lua
lgo/dotfiles
6c4311200c41e0d7832e40874495b9ad36381031
[ "MIT" ]
null
null
null
-- Space management is a module for automatic layout management of spaces and -- screens. It supports a setup with either 1 (laptop) display or 2 (laptop + -- external) displays. -- -- It is motivated by xmonad-like configuration, where it is possible to -- configure which screens windows will move to and also specific screens -- configurations. -- -- Two modes are provided: -- -- * Strict, which strictly maintains basic window location on screens and the -- layout of on-screen windows. -- -- * Soft, which will coerce windows to a structured format on a hotkey press -- otherwise it will only maintain single-screen auto-layout. -- -- Auto-layout is handled in a BSP-style, where the screen will form a tree-like -- divide of windows. -- -- In both strict and soft mode, spaces will be assigned a type based. In strict -- mode, they are strictly typed and configured. In soft mode, they are typed -- based on their contents (eg: editor vs. browser vs. music player). ------------------ --- Screen watcher ------------------ -- Set screen watcher, in case you connect a new monitor, or unplug a monitor local screens = {} local screenArr = {} -- Identifier for the laptop LCD. local laptopScreenIdentifier = "Color LCD" laptopScreen = nil externalScreen = nil -- otherScreens will filter out the laptopScreen from the other screens. function otherScreens(screens, laptopScreen) local out = {} for k, v in pairs(screens) do if v:id() ~= laptopScreen:id() then out[k] = v end end return out end -- reloadScreens will reload the `screens`, `laptopScreen`, and `externalScreen` -- variables based on the currently connected screens. function reloadScreens() -- TODO(joey): Handle screen changes. screens = hs.screen.allScreens() laptopScreen = hs.screen.find(laptopScreenIdentifier) other = otherScreens(screens, laptopScreen) if #other == 1 then externalScreen = other[1] else externalScreen = nil end print("Reloading screen variables.") print("laptopScreen: ", inspect(laptopScreen)) print("externalScreen: ", inspect(externalScreen)) end -- Start the reloadScreens watcher for screen changes, and run it once to -- populate the values. local screenwatcher = hs.screen.watcher.new(reloadScreens) screenwatcher:start() reloadScreens() --------------------------------- --- Specialized window management --------------------------------- -- Escapes characters in a pattern to always be literals. Because % is a valid -- escape for all characters, we can simply prepend every char with %. function escape_pattern(text) local escaped, _ = text:gsub("([^%w])", "%%%1") return escaped end function windowFilterVscodeRepo(repo_name) -- Expects the VS Code window title to be set in settings with: -- "window.title": "${rootName}${separator}${activeEditorMedium}", -- -- Additionally, the input needs to be escaped to be able to match, otherwise -- patterns like "pay-server" would not work. local title_prefix = string.format("^%s — ", escape_pattern(repo_name)) return hs.window.filter.new {'Code'}:setAppFilter('Code', {allowTitles = title_prefix}) end --------------------------- --- Space window management --------------------------- -- inspect(twoDisplayScreenLayouts["external"][1]["filter"]:getWindows()) twoDisplayScreenLayouts = { external = { { name = "pay-server", filter = windowFilterVscodeRepo('pay-server') }, { name = "zoolander", }, { name = "uppsala", }, { name = "personal dev", }, }, -- Display laptop = { -- Screen 1 { name = "work chrome", }, { name = "slack", filter = hs.window.filter.new {'Slack'} }, { name = "personal chrome", } }, } hs.settings.set("_ASMundocumentedSpacesRaw", true) spaces = require("hs._asm.undocumented.spaces") -- Emergency "break the glass" to reset spaces, when using raw spaces.raw -- methods. resetSpaces = function() local s = require("hs._asm.undocumented.spaces") -- bypass check for raw function access local si = require("hs._asm.undocumented.spaces.internal") for k,v in pairs(s.spacesByScreenUUID()) do local first = true for a,b in ipairs(v) do if first and si.spaceType(b) == s.types.user then si.showSpaces(b) si._changeToSpace(b) first = false else si.hideSpaces(b) end si.spaceTransform(b, nil) end si.setScreenUUIDisAnimating(k, false) end hs.execute("killall Dock") end function coerceSpaces() if externalScreen == nil then -- TODO(joey): Add a single display format. print("No single display mode supported yet") else print("Running coerce space") for screenName, layout in pairs(twoDisplayScreenLayouts) do local screen = nil if screenName == "laptop" then screen = laptopScreen elseif screenName == "external" then screen = externalScreen else print("Unknown display name screenName=", screenName) return end local spaceLayoutForScreen = spaces.layout()[screen:getUUID()] for i, space in ipairs(layout) do local space_id = spaceLayoutForScreen[i] print(string.format("Coercing layout for screen=%s idx=%d name=%s space_id=%d", screenName, i, space["name"], space_id)) -- TODO(joey): Create space if screen does not already have the space. local wf = space["filter"] if wf then local windows = wf:getWindows() for _, window in ipairs(windows) do spaces.moveWindowToSpace(window:id(), space_id) end end end end end end function strictSpaceLayouts() if externalScreen == nil then -- TODO(joey): Add a single display format. print("No single display mode supported yet") else print("Running space layouts") for screenName, layout in pairs(twoDisplayScreenLayouts) do local screen = nil if screenName == "laptop" then screen = laptopScreen elseif screenName == "external" then screen = externalScreen else print("Unknown display name screenName=", screenName) return end local spaceLayoutForScreen = spaces.layout()[screen:getUUID()] print(string.format("Now building layout for screen=%s", screenName)) for i, space in ipairs(layout) do local space_id = spaceLayoutForScreen[i] print(string.format("Executing layout for screen=%s idx=%d name=%s space_id=%d", screenName, i, space["name"], space_id)) -- TODO(joey): Create space if screen does not already have the space. local wf = space["filter"] if wf then wf:subscribe(hs.window.filter.windowCreated, (function(window, appName, eventName) print("I am running...") spaces.moveWindowToSpace(window:id(), space_id) end), true --[[ immediate ]]) end end end end end -- Attempts to relayout the space for the following window. This is provided as -- a convenience function to avoid having to do a complete re-layout. function spaceRelayout(window) end -- Add hotkey for a one-time window coercion. superKey :bind('a'):toFunction('Space Manager: coerce', coerceSpaces) coerceSpaces() local strictWindowMode = true if strictWindowMode then strictSpaceLayouts() end -- TODO(joey): Add an active window management element.
30.909091
129
0.660561
ad8ce64f9035b7862101780a5f91c45cbd7cb682
1,339
dart
Dart
lib/src/elements/GalleryItemWidget.dart
revoxservices/flutter
fef934e8f4a6b92dbba096585bb2a79a54c621a1
[ "MIT" ]
null
null
null
lib/src/elements/GalleryItemWidget.dart
revoxservices/flutter
fef934e8f4a6b92dbba096585bb2a79a54c621a1
[ "MIT" ]
null
null
null
lib/src/elements/GalleryItemWidget.dart
revoxservices/flutter
fef934e8f4a6b92dbba096585bb2a79a54c621a1
[ "MIT" ]
null
null
null
import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:food_delivery_app/src/elements/CircularLoadingWidget.dart'; import 'package:food_delivery_app/src/models/gallery.dart'; class GalleryItemWidget extends StatelessWidget { Gallery gallery; GalleryItemWidget({Key key, this.gallery}) : super(key: key); @override Widget build(BuildContext context) { return gallery == null ? CircularLoadingWidget(height: 200) : Container( width: 250, margin: EdgeInsets.only(left: 20, right: 20, top: 15, bottom: 20), decoration: BoxDecoration( boxShadow: [ BoxShadow(color: Theme.of(context).accentColor.withOpacity(0.1), blurRadius: 15, offset: Offset(0, 5)), ], ), child: ClipRRect( borderRadius: BorderRadius.all(Radius.circular(5)), child: CachedNetworkImage( fit: BoxFit.cover, imageUrl: gallery.image, placeholder: (context, url) => Image.asset( 'assets/img/loading.gif', fit: BoxFit.cover, ), errorWidget: (context, url, error) => Icon(Icons.error), ), ), ); } }
35.236842
119
0.584765
b46b714abad279b64dd841de23d46388422672a1
4,776
lua
Lua
scripts/lmkutil.lua
dmzgroup/lmk
134c9237e48fc17a2252a2a705f5c36a467b40ac
[ "MIT" ]
3
2015-11-05T03:03:37.000Z
2018-09-18T13:38:46.000Z
scripts/lmkutil.lua
rharder/lmk
134c9237e48fc17a2252a2a705f5c36a467b40ac
[ "MIT" ]
null
null
null
scripts/lmkutil.lua
rharder/lmk
134c9237e48fc17a2252a2a705f5c36a467b40ac
[ "MIT" ]
null
null
null
require "lmkbase" local print = print local pairs = pairs local string = string local tostring = tostring local type = type local lmkbase = lmkbase local table = table module (...) local dirStack = {} function pushd (dir) if not dir then dir = "." elseif not lmkbase.is_dir (dir) then local s = dir:find ("[/\\][%w_%. %-]+$") if s then if s > 1 then dir = dir:sub (1, s) else dir = "." end else dir = "." end end local result = true dirStack[#dirStack + 1] = lmkbase.pwd () if not lmkbase.cd (dir) then dirStack[#dirStack] = nil result = false end return result end function popd () local result = dirStack[#dirStack] if result then if not lmkbase.cd (result) then result = nil end dirStack[#dirStack] = nil end return result end function clean_path (path) local result = nil if path then path = path:gsub ("[/]+", "/") result = path:gsub ("[\\]+", "/") end return result end function pwd () return clean_path (lmkbase.pwd ()) end function break_path (path) path = clean_path (path) result = nil if path then result = {} for item in path:gfind ("([^/]+)") do result[#result + 1] = item end end return result end function raw_rm (path) local result = true local msg = "" if lmkbase.is_dir (path) then local dirs = lmkbase.directories (path) for ix = 1, #dirs do local rmPath = clean_path (path .. "/" .. dirs[ix]) if rmPath then result, msg = raw_rm (rmPath) else result = false; msg = "Invalid path: " .. path .. "/" .. dirs[ix] break end end if result then local files = lmkbase.files (path) for ix = 1, #files do local rmFile = clean_path (path .. "/" .. files[ix]) if rmFile then result, msg = lmkbase.rm (rmFile) else result = false; msg = "Invalid path: " .. path .. "/" .. files[ix] break end end end end if result then result, msg = lmkbase.rm (path) end return result, msg end function raw_mkdir (path) local result = true if not lmkbase.is_valid (path) then -- print ("mkdir path: " .. path) local root = false local slash = path:sub (1, 1) if (slash == "/") or (slash == "\\") then root = true end local pathParts = break_path (path) if pathParts then local newPath = (root and "/" or "") for ix = 1, #pathParts do newPath = newPath .. pathParts[ix] .. "/" if not lmkbase.is_valid (newPath) then result = lmkbase.mkdir (newPath) if not result then break end end end end end return result end function raw_split (path) local file, ext = nil, nil local root = false local value = path:sub (1, 1) if (value == "/") or (value == "\\") then root = true end local result = break_path (path) if result then file = table.remove (result) path = (root and "/" or "") .. table.concat (result, "/") ext = file:match ("%.([%w_]+)$") if ext then file = file:sub (1, #file - (#ext + 1)) end if file == ext then ext = nil end end return path, file, ext end function raw_abs_path (path) local result = nil if lmkbase.is_valid (path) then local file, ext = nil, nil if not lmkbase.is_dir (path) then path, file, ext = raw_split (path) end if not path or path == "" then result = lmkbase.pwd () elseif pushd (path) then result = lmkbase.pwd () popd () end if result and file then result = clean_path (result .. "/" .. file .. (ext and ("." .. ext) or "")) elseif result then result = clean_path (result .. "/") end end return result end function process_args (args) local list = nil for ix = 1, #args do if not list then list = {} end if args[ix]:sub (1, 1) == "-" then list[#list + 1] = { opt = args[ix] } elseif list[#list] then if not list[#list].values then list[#list].values = {} end list[#list].values[#(list[#list].values) + 1] = args[ix] else end end return list end function dump_table (name, value, indent) if not indent then indent = 0 end if type (value) == "table" then print (string.rep (" ", indent) .. name .. " = {") for index, data in pairs (value) do dump_table (index, data, indent + 3) end print (string.rep (" ", indent) .. "}") else print (string.rep (" ", indent) .. name .. " = " .. tostring (value)) end end function clear_table (value) while table.remove (value) do end end
26.241758
89
0.559045
5dce77cb039a686197ac81bd0074867d806607e1
1,083
go
Go
build/gc/cmd/license/licenseroot.go
MyPureCloud/platform-client-sdk-cli
5ba43d0b7ae035bbc32518a0d1151cadf22fdae1
[ "MIT" ]
3
2021-11-06T07:14:25.000Z
2022-03-15T20:38:44.000Z
build/gc/cmd/license/licenseroot.go
MyPureCloud/platform-client-sdk-cli
5ba43d0b7ae035bbc32518a0d1151cadf22fdae1
[ "MIT" ]
null
null
null
build/gc/cmd/license/licenseroot.go
MyPureCloud/platform-client-sdk-cli
5ba43d0b7ae035bbc32518a0d1151cadf22fdae1
[ "MIT" ]
3
2021-01-19T14:23:31.000Z
2022-02-17T08:44:37.000Z
package license import ( "github.com/mypurecloud/platform-client-sdk-cli/build/gc/utils" "github.com/mypurecloud/platform-client-sdk-cli/build/gc/cmd/license_definitions" "github.com/mypurecloud/platform-client-sdk-cli/build/gc/cmd/license_infer" "github.com/mypurecloud/platform-client-sdk-cli/build/gc/cmd/license_toggles" "github.com/mypurecloud/platform-client-sdk-cli/build/gc/cmd/license_organization" "github.com/mypurecloud/platform-client-sdk-cli/build/gc/cmd/license_users" ) func init() { licenseCmd.AddCommand(license_definitions.Cmdlicense_definitions()) licenseCmd.AddCommand(license_infer.Cmdlicense_infer()) licenseCmd.AddCommand(license_toggles.Cmdlicense_toggles()) licenseCmd.AddCommand(license_organization.Cmdlicense_organization()) licenseCmd.AddCommand(license_users.Cmdlicense_users()) licenseCmd.Short = utils.GenerateCustomDescription(licenseCmd.Short, license_definitions.Description, license_infer.Description, license_toggles.Description, license_organization.Description, license_users.Description, ) licenseCmd.Long = licenseCmd.Short }
51.571429
221
0.839335
afb5d89d45d5910411f803f2c9c137ccde795949
6,966
html
HTML
Repurcussions.html
kelscjohnson/MethEffectBucketPages
2b7a514ea67ca1baa8f8ff0c3e85171612db74bd
[ "CC-BY-3.0" ]
null
null
null
Repurcussions.html
kelscjohnson/MethEffectBucketPages
2b7a514ea67ca1baa8f8ff0c3e85171612db74bd
[ "CC-BY-3.0" ]
null
null
null
Repurcussions.html
kelscjohnson/MethEffectBucketPages
2b7a514ea67ca1baa8f8ff0c3e85171612db74bd
[ "CC-BY-3.0" ]
null
null
null
<!DOCTYPE HTML> <!-- Forty by HTML5 UP html5up.net | @ajlkn Free for personal and commercial use under the CCA 3.0 license (html5up.net/license) --> <html> <head> <title>The Meth Effect | Repurcussions</title> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" /> <!--[if lte IE 8]><script src="assets/js/ie/html5shiv.js"></script><![endif]--> <link rel="stylesheet" href="assets/css/buckets.css" /> <!--[if lte IE 9]><link rel="stylesheet" href="assets/css/ie9.css" /><![endif]--> <!--[if lte IE 8]><link rel="stylesheet" href="assets/css/ie8.css" /><![endif]--> </head> <body> <!-- Wrapper --> <div id="wrapper"> <!-- Header --> <!-- Note: The "styleN" class below should match that of the banner element. --> <header id="header" class="alt style2"> <a href="index.html" class="logo">The Meth Effect</a> <nav> <a href="#menu">Menu</a> </nav> </header> <!-- Menu --> <!-- Header --> <header id="header"> <a href="index.html" class="logo"><span>Meth Effect</span></a> <nav> <a href="#menu" class="white">Menu</a> </nav> </header> <!-- Menu --> <nav id="menu"> <ul class="links"> <li style="color:white;"><a href="index.html">Home</a></li> <li style="color:white;"><a href="#two">About</a></li> <li style="color:white;"><a href="#newContact">Contact</a></li> <li style="color:white;"><a href="Production.html">Production</a></li> <li style="color:white;"><a href="Addicts.html">The Addicts</a></li> <li style="color:white;"><a href="Repercussions.html">Repercussions</a></li> <li style="color:white;"><a href="Solutions.html">Seeking Solutions</a></li> </ul> </nav> <!-- Banner --> <!-- Note: The "styleN" class below should match that of the header element. --> <section id="banner" class="style2"> <div class="inner"> <span class="image"> <img src="images-repurcussions/lakecountyroad.jpg" alt="Road in Lake County, Montana" /> </span> <header class="major"> <h1>Repurcussions</h1> </header> <div class="content"> <h6>The consequences of meth use can be seen throughout the state of Montana, but the impact reaches much farther than the people who use meth themselves. Meth reaches from a foster care and court system that are over-crowded and struggling to find permanent solutions for Montana kids, to emergency rooms that see patients who have overdosed on Meth walk through their doors everyday.</h6> </div> </div> </section> <!-- Main --> <div id="main"> <!-- First Story --> <section id="two" class="spotlights"> <section> <a href="generic.html" class="image"> <img src="images-repurcussions/sadtoy.jpg" alt="Cop Car" data-position="center center" /> </a> <div class="content"> <div class="inner"> <header class="major"> <h3>Meth addiction divides Montana families</h3> <h5>By Taylor Crews</h5> </header> <p>Meth use in Montana causes hundreds of children to be removed from their homes every year, placing them in a system that is crowded and in desperate need of a solution. It’s a number that is soaring with each passing year as the system struggles to help the kids of addicted parents.</p> <ul class="actions"> <li><a href="generic.html" class="button">Enter</a></li> </ul> </div> </div> </section> <!-- Second Story --> <section> <a href="generic.html" class="image"> <img src="images-repurcussions/emergencyroom.jpg" alt="Five pound of meth seized by the FBI (FBI photo)" data-position="top center" /> </a> <div class="content"> <div class="inner"> <header class="major"> <h3>ERs emerge as the frontline in the meth war</h3> <h5>By Matt Blois</h5> </header> <p>City and small-town hospitals report many of their patients are showing up after taking too much meth. These patients are often violent and paranoid and the hospitals are struggling with the cost in both dollars and time of helping these people in need.</p> <ul class="actions"> <li><a href="generic.html" class="button">Enter</a></li> </ul> </div> </div> </section> <!-- Third Story --> <section> <a href="generic.html" class="image"> <img src="images-repurcussions/methhouse.jpg" alt="A meth contaminated home" data-position="25% 25%" /> </a> <div class="content"> <div class="inner"> <header class="major"> <h3>Montana meth cleanup laws lag behind</h3> <h5>By Kasey Bubnash</h5> </header> <p>While professionals agree that Montana's meth decontamination laws are some of the most lenient in the nation, improvement is not in sight. Experts say these haphazard policies have affected families dealing with meth-contaminated homes.</p> <ul class="actions"> <li><a href="generic.html" class="button">Enter</a></li> </ul> </div> </div> </section> </section> <!-- Fourth Story --> <!-- Next up --> <section id="three"> <div class="inner"> <header class="major"> <h6>UP NEXT:</h6> <h2>Seeking Solutions</h2> </header> <ul class="actions"> <li><a href="generic.html" class="button next"></a></li> </ul> </div> </section> </div> <!-- Footer --> <!-- Footer --> <footer id="footer"> <div class="inner"> <div class="container"> <div class="row"> <div class="span6 offset3"> <p class="copyright"> &copy; Montana Meth Effect 2017 <br /> <a href="http://jour.umt.edu/">University of Montana School of Journalism</a> | Design: <a href="https://html5up.net">HTML5 UP</a> </p> </div> </div> </div> </div> </footer> <!-- Scripts --> <script src="assets/js/jquery.min.js"></script> <script src="assets/js/jquery.scrolly.min.js"></script> <script src="assets/js/jquery.scrollex.min.js"></script> <script src="assets/js/skel.min.js"></script> <script src="assets/js/util.js"></script> <!--[if lte IE 8]><script src="assets/js/ie/respond.min.js"></script><![endif]--> <script src="assets/js/main.js"></script> </body> </html>
38.065574
400
0.555699
5be8f920d9185a2263f535c7b87a8b639bb5ea94
1,417
c
C
third_party/Phigs/PVT/PVT_c/LAYER/ngse.c
n1ckfg/Telidon
f4e2c693ec7d67245974b73a602d5d40df6a6d69
[ "MIT" ]
18
2017-07-08T02:34:02.000Z
2022-01-08T03:42:48.000Z
third_party/Phigs/PVT/PVT_c/LAYER/ngse.c
n1ckfg/Telidon
f4e2c693ec7d67245974b73a602d5d40df6a6d69
[ "MIT" ]
null
null
null
third_party/Phigs/PVT/PVT_c/LAYER/ngse.c
n1ckfg/Telidon
f4e2c693ec7d67245974b73a602d5d40df6a6d69
[ "MIT" ]
3
2018-02-03T04:44:00.000Z
2020-08-05T15:31:18.000Z
#include <phigs.h> #include "f2c.h" #include "struct.h" /************************************************************************** NAME GENERALIZED STRUCTURE ELEMENT - create generalized structure element FORTRAN Syntax SUBROUTINE pgse ( GSEID, LDR, DATREC ) INTEGER GSEID GSE identifier INTEGER LDR dimension of data record array CHARACTER*80 DATREC(LDR)data record **************************************************************************/ #ifdef NO_PROTO ngse (gseid, ldr, datrec, clen) integer *gseid, *ldr, clen; cdatrec *datrec; #else ngse (integer *gseid, integer *ldr, cdatrec * datrec, integer clen) #endif { Pgse_data gse; switch (*gseid) { /********** There are no registered gse's at this time, add the structure conversions here as they are defined *********/ default: /*** Uknown, send in Pdata stucture ****/ gse.unsupp.size = sizeof (cdatrec); gse.unsupp.data = (void *) datrec; } /************************************************************************** C Syntax void pgse ( id, gse ) Pint id; gse identifier Pgse_data *gse; gse data record **************************************************************************/ pgse ((Pint) *gseid, &gse); }
28.34
82
0.440367
143f9753358d2088b29ee4eb5a2d66ca815da2fb
6,266
lua
Lua
definitive_lighting_improvements/WDC_pc_WalkingDead201_data/TruckStopBathroom.lua
changemymindpls/TTDS-PlaygroundProject
b880d124352fe8d2e86e8a4c7e1cc4b11d280279
[ "MIT" ]
null
null
null
definitive_lighting_improvements/WDC_pc_WalkingDead201_data/TruckStopBathroom.lua
changemymindpls/TTDS-PlaygroundProject
b880d124352fe8d2e86e8a4c7e1cc4b11d280279
[ "MIT" ]
null
null
null
definitive_lighting_improvements/WDC_pc_WalkingDead201_data/TruckStopBathroom.lua
changemymindpls/TTDS-PlaygroundProject
b880d124352fe8d2e86e8a4c7e1cc4b11d280279
[ "MIT" ]
null
null
null
-- Decompiled using luadec 2.2 rev: for Lua 5.2 from https://github.com/viruscamp/luadec -- Command line: A:\Steam\twd-definitive\scripteditor-10-31-20\definitive_lighting_improvements\WDC_pc_WalkingDead201_data\TruckStopBathroom_temp.lua -- params : ... -- function num : 0 , upvalues : _ENV local kScript = "TruckStopBathroom" local kScene = "adv_truckStopBathroom" local PreloadAssets = function() -- function num : 0_0 , upvalues : _ENV PreLoad("cs_omidEntersTruckstop.chore") if Platform_NeedShaderPreload() then RenderPreloadShader("Mesh_QLo.t3fxb", "3") RenderPreloadShader("Mesh_QLo.t3fxb", "67") RenderPreloadShader("Mesh_LGT_DTL_QLo.t3fxb", "7") RenderPreloadShader("Mesh_LGT_QLo.t3fxb", "7") RenderPreloadShader("Mesh_LGT_QLo.t3fxb", "71") RenderPreloadShader("Mesh_QLo.t3fxb", "259") RenderPreloadShader("Mesh_QLo.t3fxb", "323") RenderPreloadShader("Mesh_QLo.t3fxb", "326") RenderPreloadShader("Mesh_QLo.t3fxb", "263") RenderPreloadShader("Mesh_QLo.t3fxb", "270") RenderPreloadShader("Mesh_QLo.t3fxb", "334") RenderPreloadShader("Mesh_LGT_VCOL_QLo.t3fxb", "7") RenderPreloadShader("Mesh_LGT_VCOL_QLo.t3fxb", "71") RenderPreloadShader("Mesh_LGT_DTL_VCOL_QLo.t3fxb", "7") RenderPreloadShader("Mesh_VCOL_QLo.t3fxb", "263") RenderPreloadShader("Mesh_VCOL_QLo.t3fxb", "327") RenderPreloadShader("Mesh_VCOL_QLo.t3fxb", "7") RenderPreloadShader("Mesh_VCOL_QLo.t3fxb", "71") RenderPreloadShader("Mesh_VCOL_QLo.t3fxb", "135") RenderPreloadShader("Mesh_LGT_DTL_VCOL_QLo.t3fxb", "71") RenderPreloadShader("SceneToonOutline2_QLo.t3fxb", "0") RenderPreloadShader("Mesh_1SKN_QLo.t3fxb", "3") RenderPreloadShader("Mesh_DTL_SDTL_QLo.t3fxb", "3") RenderPreloadShader("Mesh_VCOL_QLo.t3fxb", "199") RenderPreloadShader("Mesh_LGT_QLo.t3fxb", "263") RenderPreloadShader("SceneToonOutline2_QLo.t3fxb", "64") RenderPreloadShader("Mesh_QLo.t3fxb", "74") RenderPreloadShader("Mesh_1SKN_QLo.t3fxb", "67") RenderPreloadShader("Mesh_DTL_SDTL_QLo.t3fxb", "74") RenderPreloadShader("Mesh_ENV_QLo.t3fxb", "14") RenderPreloadShader("Mesh_QLo.t3fxb", "330") RenderPreloadShader("Mesh_QLo.t3fxb", "130") RenderPreloadShader("Mesh_LGT_QLo.t3fxb", "135") RenderPreloadShader("Mesh_QLo.t3fxb", "142") RenderPreloadShader("Mesh_LGT_DTL_QLo.t3fxb", "71") RenderPreloadShader("Mesh_LGT_QLo.t3fxb", "327") RenderPreloadShader("Mesh_QLo.t3fxb", "14") RenderPreloadShader("Mesh_QLo.t3fxb", "71") RenderPreloadShader("Mesh_QLo.t3fxb", "327") RenderPreloadShader("Mesh_1SKN_QLo.t3fxb", "334") RenderPreloadShader("Mesh_QLo.t3fxb", "199") RenderPreloadShader("Mesh_LGT_QLo.t3fxb", "199") RenderPreloadShader("Mesh_QLo.t3fxb", "198") RenderPreloadShader("Mesh_QLo.t3fxb", "206") RenderPreloadShader("Mesh_LGT_VCOL_QLo.t3fxb", "263") RenderPreloadShader("Mesh_ENV_VCOL_QLo.t3fxb", "7") RenderPreloadShader("Mesh_LGT_VCOL_QLo.t3fxb", "135") RenderPreloadShader("Mesh_LGT_VCOL_QLo.t3fxb", "327") RenderPreloadShader("Mesh_LGT_VCOL_QLo.t3fxb", "199") RenderPreloadShader("Mesh_DTL_SDTL_QLo.t3fxb", "67") RenderPreloadShader("Mesh_ENV_VCOL_QLo.t3fxb", "71") RenderPreloadShader("Mesh_1SKN_QLo.t3fxb", "270") RenderPreloadShader("ScenePreZ_QLo.t3fxb", "128") RenderPreloadShader("Mesh_1SKN_QLo.t3fxb", "10") RenderPreloadShader("Mesh_QLo.t3fxb", "2") RenderPreloadShader("Mesh_DTL_SDTL_QLo.t3fxb", "2") RenderPreloadShader("Mesh_QLo.t3fxb", "258") RenderPreloadShader("Mesh_QLo.t3fxb", "10") RenderPreloadShader("Mesh_DTL_SDTL_QLo.t3fxb", "10") RenderPreloadShader("Mesh_QLo.t3fxb", "266") RenderPreloadShader("Mesh_1SKN_CC_TINT_QLo.t3fxb", "198") RenderPreloadShader("Mesh_1SKN_CC_TINT_QLo.t3fxb", "199") RenderPreloadShader("Mesh_1SKN_CC_TINT_QLo.t3fxb", "206") RenderPreloadShader("Mesh_1SKN_QLo.t3fxb", "134") RenderPreloadShader("Mesh_1SKN_QLo.t3fxb", "138") RenderPreloadShader("Mesh_1SKN_QLo.t3fxb", "142") RenderPreloadShader("Mesh_1SKN_QLo.t3fxb", "2") RenderPreloadShader("Mesh_1SKN_QLo.t3fxb", "206") RenderPreloadShader("Mesh_BMP_DTL_DBMP_CC_TINT_QLo.t3fxb", "196") RenderPreloadShader("Mesh_BMP_DTL_DBMP_CC_TINT_QLo.t3fxb", "198") RenderPreloadShader("Mesh_CC_TINT_QLo.t3fxb", "135") RenderPreloadShader("Mesh_CC_TINT_QLo.t3fxb", "199") RenderPreloadShader("Mesh_CC_TINT_QLo.t3fxb", "206") RenderPreloadShader("Mesh_CC_TINT_QLo.t3fxb", "3") RenderPreloadShader("Mesh_CC_TINT_QLo.t3fxb", "67") RenderPreloadShader("Mesh_CC_TINT_QLo.t3fxb", "7") RenderPreloadShader("Mesh_CC_TINT_QLo.t3fxb", "71") RenderPreloadShader("Mesh_DTL_SDTL_QLo.t3fxb", "6") RenderPreloadShader("Mesh_ENV_QLo.t3fxb", "78") RenderPreloadShader("Mesh_LGT_CC_TINT_QLo.t3fxb", "199") RenderPreloadShader("Mesh_LGT_CC_TINT_QLo.t3fxb", "71") RenderPreloadShader("Mesh_LGT_DTL_CC_TINT_QLo.t3fxb", "199") RenderPreloadShader("Mesh_LGT_DTL_CC_TINT_QLo.t3fxb", "71") RenderPreloadShader("Mesh_LGT_DTL_QLo.t3fxb", "6") RenderPreloadShader("Mesh_LGT_DTL_QLo.t3fxb", "70") RenderPreloadShader("Mesh_LGT_QLo.t3fxb", "134") RenderPreloadShader("Mesh_LGT_QLo.t3fxb", "198") RenderPreloadShader("Mesh_LGT_QLo.t3fxb", "6") RenderPreloadShader("Mesh_LGT_QLo.t3fxb", "70") RenderPreloadShader("Mesh_QLo.t3fxb", "0") RenderPreloadShader("Mesh_QLo.t3fxb", "131") RenderPreloadShader("Mesh_QLo.t3fxb", "132") RenderPreloadShader("Mesh_QLo.t3fxb", "134") RenderPreloadShader("Mesh_QLo.t3fxb", "194") RenderPreloadShader("Mesh_QLo.t3fxb", "195") RenderPreloadShader("Mesh_QLo.t3fxb", "202") RenderPreloadShader("Mesh_QLo.t3fxb", "4") RenderPreloadShader("Mesh_QLo.t3fxb", "6") RenderPreloadShader("Mesh_VCOL_QLo.t3fxb", "134") RenderPreloadShader("Mesh_VCOL_QLo.t3fxb", "138") RenderPreloadShader("Mesh_VCOL_QLo.t3fxb", "6") RenderPreloadShader("SceneSimple_QLo.t3fxb", "0") end end TruckStopBathroom = function() -- function num : 0_1 , upvalues : _ENV, kScene, kScript, PreloadAssets Game_NewScene(kScene, kScript) PreloadAssets() Game_StartScene(true) end SceneOpen(kScene, kScript) SceneAdd("ui_openingCredits")
49.338583
150
0.742898
e83faf06217113b15d6a1fb0dfbfd37c746564ea
1,980
cpp
C++
DSA/huffman.cpp
priyanka-gh/hacktoberfest2021
9d48da4d84457288e113ed19e1f559e4501d3bef
[ "CC0-1.0" ]
null
null
null
DSA/huffman.cpp
priyanka-gh/hacktoberfest2021
9d48da4d84457288e113ed19e1f559e4501d3bef
[ "CC0-1.0" ]
null
null
null
DSA/huffman.cpp
priyanka-gh/hacktoberfest2021
9d48da4d84457288e113ed19e1f559e4501d3bef
[ "CC0-1.0" ]
null
null
null
#include <bits/stdc++.h> using namespace std; class node { public: char data; int freq; node *left, *right; node(char data, int freq) { left = right = nullptr; this -> data = data; this -> freq = freq; } }; class custom_comp { public: bool operator()(node* left, node* right) { return left -> freq > right -> freq; } }; void print_codes(node *root, string res) { if(root == nullptr) { return; } if(root -> data != '*') { cout << root -> data << ": " << res << endl; } print_codes(root -> left, res + "0"); print_codes(root -> right, res + "1"); } void huffman_codes(vector<char> & characters, vector<int>& freq, int n) { node *left, *right, *top; priority_queue<node*, vector<node*>, custom_comp> min_heap; for(int i = 0; i < n; i++) { min_heap.push(new node(characters[i], freq[i])); } while(min_heap.size() > 1) { left = min_heap.top(); min_heap.pop(); right = min_heap.top(); min_heap.pop(); top = new node('*', left -> freq + right -> freq); top -> left = left; top -> right = right; min_heap.push(top); } print_codes(min_heap.top(), ""); } int main() { string to_encode = "aaabbbcccdddd"; set<char> unique_char; vector<int> freq; for(auto e: to_encode) { unique_char.insert(e); } vector<char> characters {unique_char.begin(), unique_char.end()}; sort(characters.begin(), characters.end()); for(auto e: characters) { int count = 0; for(auto c: to_encode) { if(c == e) { count++; } } freq.emplace_back(count); } int n = characters.size(); huffman_codes(characters, freq, n); return 0; }
18.504673
71
0.488889
96777b4be273d8dce058a88bafc415d7d6269a49
1,557
php
PHP
database/migrations/2014_10_12_000000_create_users_table.php
trisamsul/TaskPoll
9294fd7f34d12d511e55d1891ba4e5d82f7dce67
[ "MIT" ]
null
null
null
database/migrations/2014_10_12_000000_create_users_table.php
trisamsul/TaskPoll
9294fd7f34d12d511e55d1891ba4e5d82f7dce67
[ "MIT" ]
null
null
null
database/migrations/2014_10_12_000000_create_users_table.php
trisamsul/TaskPoll
9294fd7f34d12d511e55d1891ba4e5d82f7dce67
[ "MIT" ]
null
null
null
<!-- Migration Table: Users Table to save Users Data --> <?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateUsersTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('users', function (Blueprint $table) { $table->increments('id'); // User Id $table->string('username')->unique(); // Username $table->string('email')->unique(); // Email $table->string('password'); // Password $table->integer('category'); // Category: 1 for Administrator, 0 for Basic User }); // Inser dummy data for Administrator and Basic User, one data for each DB::table('users')->insert([ [ 'username' => 'admin', 'email' => 'admin@dummy.com', 'password' => '$2y$12$CyPf1u8Sa79PNEzYa8FQY.Q9DWXOUizx9zu0dDbQjFxKJZfQrgAN6', 'category' => 1 ], [ 'username' => 'basic', 'email' => 'basic@dummy.com', 'password' => '$2y$12$G2cyAs6dGnK1PMXCuwrHqOyBfnqK.GuMEf.w4eGhFfBayqaVM7Li6', 'category' => 0 ] ]); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('users'); } }
26.844828
102
0.506744
264bab82d1385412210d6e855a6e79cb3b9dc49e
1,531
java
Java
src/sorts/bogo/ExchangeBojoSort.java
PCBoyGames/ArrayV-v4.0
238e28bcfca74dfd514b19fffa73829b51edd098
[ "MIT" ]
1
2021-12-16T16:52:39.000Z
2021-12-16T16:52:39.000Z
src/sorts/bogo/ExchangeBojoSort.java
PCBoyGames/ArrayV-v4.0
238e28bcfca74dfd514b19fffa73829b51edd098
[ "MIT" ]
1
2021-11-30T22:03:44.000Z
2021-12-31T02:08:54.000Z
src/sorts/bogo/ExchangeBojoSort.java
PCBoyGames/ArrayV-v4.0
238e28bcfca74dfd514b19fffa73829b51edd098
[ "MIT" ]
1
2021-10-05T16:39:39.000Z
2021-10-05T16:39:39.000Z
package sorts.bogo; import main.ArrayVisualizer; import sorts.templates.BogoSorting; /* CODED FOR ARRAYV BY PCBOYGAMES ------------------------------ - SORTING ALGORITHM MADHOUSE - ------------------------------ */ public final class ExchangeBojoSort extends BogoSorting { public ExchangeBojoSort(ArrayVisualizer arrayVisualizer) { super(arrayVisualizer); this.setSortListName("Exchange Bojo"); this.setRunAllSortsName("Exchange Bojo Sort"); this.setRunSortName("Exchange Bojosort"); this.setCategory("Bogo Sorts"); this.setComparisonBased(true); this.setBucketSort(false); this.setRadixSort(false); this.setUnreasonablySlow(true); this.setUnreasonableLimit(256); this.setBogoSort(true); } @Override public void runSort(int[] array, int currentLength, int bucketCount) { delay = 0.001; while (!this.isArraySorted(array, currentLength)) { boolean noswap = true; while (noswap) { int i1 = randInt(0, currentLength); int i2 = randInt(0, currentLength); int temp; if (i1 > i2) { temp = i1; i1 = i2; i2 = temp; } if (Reads.compareIndices(array, i1, i2, delay, true) > 0) { Writes.reversal(array, i1, i2, delay, true, false); noswap = false; } } } } }
30.019608
75
0.536904
89948fa0e8ee182eb5a4ae1262858f04c6b185af
123,814
sql
SQL
database/imunisasi.sql
Mrtnis/imunisasi_bayi
ba20ad9c696ad62aa3fb9067b61f44e405bba195
[ "MIT" ]
null
null
null
database/imunisasi.sql
Mrtnis/imunisasi_bayi
ba20ad9c696ad62aa3fb9067b61f44e405bba195
[ "MIT" ]
null
null
null
database/imunisasi.sql
Mrtnis/imunisasi_bayi
ba20ad9c696ad62aa3fb9067b61f44e405bba195
[ "MIT" ]
null
null
null
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 15, 2021 at 06:37 AM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.4.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `imunisasi` -- -- -------------------------------------------------------- -- -- Table structure for table `admin` -- CREATE TABLE `admin` ( `id` int(11) NOT NULL, `username` varchar(30) NOT NULL, `password` varchar(255) NOT NULL, `nama` varchar(30) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `admin` -- INSERT INTO `admin` (`id`, `username`, `password`, `nama`) VALUES (1, 'admin', 'admin', 'Dinas Kesehatan'); -- -------------------------------------------------------- -- -- Table structure for table `desa` -- CREATE TABLE `desa` ( `id_desa` int(11) NOT NULL, `nama_desa` varchar(50) NOT NULL, `kecamatan` varchar(50) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `desa` -- INSERT INTO `desa` (`id_desa`, `nama_desa`, `kecamatan`) VALUES (1, 'Lingka Kuta', 'Gandapura'), (2, 'Pante Sikumbang', 'Gandapura'), (3, 'Palohme', 'Gandapura'), (4, 'Ie Rhop', 'Gandapura'), (5, 'Pulo Gisa', 'Gandapura'), (6, 'Paya Baro', 'Gandapura'), (7, 'Cot Teubee', 'Gandapura'), (8, 'Cot Tufah', 'Gandapura'), (9, 'Paloh Kayee Kunyet', 'Gandapura'), (10, 'Ujong Bayu', 'Gandapura'), (11, 'Tanjong Raya', 'Gandapura'), (12, 'Cot Puuk', 'Gandapura'), (16, 'Blang Tingkeum', 'Kotajuang'), (17, 'Buket Teukuh', 'Kotajuang'), (18, 'Geudong Alue', 'Kotajuang'), (19, 'Geudong-geudong', 'Kotajuang'), (20, 'Geulanggang Baro', 'Kotajuang'), (21, 'Geulanggang Gampong', 'Kotajuang'), (22, 'Menasah Dayah', 'Kotajuang'), (23, 'Meunasah Blang', 'Kotajuang'), (24, 'Meunasah Capa', 'Kotajuang'), (25, 'Meunasah Reuleut', 'Kotajuang'), (26, 'Bandar Bireuen 1', 'Kotajuang'), (27, 'Blang Reuling', 'Kotajuang'), (28, 'BTN', 'Kotajuang'), (29, 'Cot Gapu', 'Kotajuang'), (30, 'Gampong Baro', 'Kotajuang'), (31, 'Lhok Awe Teungoh', 'Kotajuang'), (32, 'Meunasah Gadong', 'Kotajuang'), (33, 'Pulo Ara', 'Kotajuang'); -- -------------------------------------------------------- -- -- Table structure for table `gandapura` -- CREATE TABLE `gandapura` ( `id_imunisasi` int(11) NOT NULL, `nama_bayi` varchar(100) NOT NULL, `jenis_kelamin` varchar(20) NOT NULL, `tanggal_lahir` date NOT NULL, `nama_ortu` varchar(100) NOT NULL, `alamat` varchar(255) NOT NULL, `hb_0` date DEFAULT NULL, `bcg` date DEFAULT NULL, `pol_1` date DEFAULT NULL, `dpt_hb_hib_1` date DEFAULT NULL, `pol_2` date DEFAULT NULL, `dpt_hb_hib_2` date DEFAULT NULL, `pol_3` date DEFAULT NULL, `dpt_hb_hib_3` date DEFAULT NULL, `pol_4` date DEFAULT NULL, `ipv` date DEFAULT NULL, `campak` date DEFAULT NULL, `imunisasi_lengkap` date DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `gandapura` -- INSERT INTO `gandapura` (`id_imunisasi`, `nama_bayi`, `jenis_kelamin`, `tanggal_lahir`, `nama_ortu`, `alamat`, `hb_0`, `bcg`, `pol_1`, `dpt_hb_hib_1`, `pol_2`, `dpt_hb_hib_2`, `pol_3`, `dpt_hb_hib_3`, `pol_4`, `ipv`, `campak`, `imunisasi_lengkap`) VALUES (5, 'Dafid Alfarisi', 'laki-laki', '2015-09-01', 'Lukmanul Hakim', 'Ie Rhop', '2015-09-28', '2015-09-29', '2015-09-29', '2015-12-05', '2015-12-05', '2015-02-05', '2015-03-05', '2015-04-05', '2015-04-05', NULL, '2015-06-05', NULL), (6, 'Zakiul Fatta', 'laki-laki', '2016-07-19', 'Junaidi', 'Ie Rhop', NULL, '2017-04-21', '2017-04-21', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (7, 'Cut Safia', 'perempuan', '2015-09-19', 'Riosmadi', 'Ie Rhop', '2015-09-19', '2015-09-29', '2015-09-29', '2015-11-05', '2015-11-05', '2016-01-05', '2016-01-05', '2016-02-05', '2016-02-05', NULL, '2016-06-05', NULL), (8, 'Dina Amalia', 'perempuan', '2016-05-05', 'Mansur', 'Ie Rhop', '2016-05-05', '2016-07-16', '2016-07-16', '2016-08-05', '2016-08-05', '2016-10-05', '2016-10-05', '2016-11-05', '2017-04-08', '2017-05-06', '2017-02-07', '2017-02-07'), (9, 'Amali Natasya', 'perempuan', '2016-05-22', 'Sanusi', 'Ie Rhop', '2016-05-23', '2016-07-16', '2016-07-16', '2016-08-05', '2016-08-05', '2016-10-05', '2016-10-05', '2016-11-05', '2016-11-05', '2017-07-06', '2017-02-14', '2017-02-07'), (10, 'M. Ihsan', 'laki-laki', '2017-02-23', 'Sofyan', 'Ie Rhop', NULL, '2017-04-21', '2017-04-21', '2017-05-10', '2017-06-06', '2017-06-06', '2017-07-06', '2017-07-06', '2017-08-07', '2018-01-06', '2018-01-06', '2018-01-06'), (11, 'Zayya Rifqa', 'perempuan', '2017-04-19', 'Albiadi', 'Ie Rhop', '2017-04-21', '2017-04-21', '2017-04-21', '2017-06-10', '2017-06-06', '2017-08-07', '2017-07-06', '2017-10-06', '2017-08-06', '2018-01-06', '2018-01-06', '2018-01-06'), (12, 'M. Habibi', 'laki-laki', '2017-06-27', 'Junaidi', 'Ie Rhop', '2017-06-27', NULL, '2018-03-06', NULL, '2018-04-06', NULL, '2018-05-06', NULL, NULL, NULL, NULL, NULL), (13, 'Wahyudi', 'laki-laki', '2017-02-04', 'Ibrahim', 'Ie Rhop', '2017-07-06', NULL, '2018-03-06', NULL, '2018-04-06', NULL, '2018-07-06', NULL, NULL, NULL, NULL, NULL), (14, 'M. Aska Rafasya', 'laki-laki', '2017-08-04', 'Zulmahdi', 'Ie Rhop', '2017-08-04', NULL, '2018-05-06', NULL, '2018-05-06', NULL, '2018-07-06', NULL, NULL, NULL, NULL, NULL), (15, 'Ramazan', 'laki-laki', '2017-11-05', 'Lukman N', 'Ie Rhop', '2017-11-08', NULL, '2018-05-06', NULL, '2018-05-06', NULL, '2018-07-06', NULL, NULL, NULL, NULL, NULL), (16, 'Bayi Nahyatun', 'perempuan', '2018-12-03', 'Suami', 'Ie Rhop', '2018-12-03', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (17, 'Bayi Fatimah', 'perempuan', '2018-12-17', 'Suami', 'Ie Rhop', '2018-12-17', '2019-02-11', '2019-02-11', '2019-02-12', '2019-03-12', NULL, '2019-04-05', NULL, NULL, NULL, NULL, NULL), (18, 'Sultan Nur Hadi', 'laki-laki', '2018-01-17', 'Hasballah', 'Pante Sikumbang', '2018-01-17', '2018-03-16', '2018-03-16', '2018-04-16', '2018-04-16', '2018-09-17', '2018-09-17', '2018-10-16', NULL, NULL, NULL, NULL), (19, 'M. Yazid', 'laki-laki', '2018-10-01', 'Salman', 'Pante Sikumbang', '2018-10-01', '2018-12-15', '2018-12-15', '2019-01-17', '2019-01-17', '2019-02-16', '2019-02-16', '2019-03-16', '2019-03-16', '2019-09-16', NULL, NULL), (20, 'Faris Adnan', 'laki-laki', '2019-11-15', 'Khalidawati', 'Pante Sikumbang', '2019-11-15', NULL, '2020-01-17', NULL, '2020-02-17', NULL, NULL, NULL, NULL, NULL, NULL, NULL), (21, 'Alaisya Zahra', 'perempuan', '2018-08-01', 'Marhaban', 'Pante Sikumbang', '2018-08-01', '2018-09-17', '2018-09-17', '2018-09-17', '2018-10-16', '2018-10-16', '2018-12-15', '2018-12-15', '2019-01-17', '2019-01-17', NULL, NULL), (22, 'Aqila', 'perempuan', '2018-08-01', 'Martin', 'Pante Sikumbang', '2018-08-01', '2018-09-17', '2018-09-17', '2018-10-16', '2018-10-16', '2018-11-15', '2018-11-15', '2019-01-17', '2019-01-17', NULL, NULL, NULL), (23, 'Maisya Aziza', 'perempuan', '2018-09-01', 'Mukhlis', 'Pante Sikumbang', '2018-09-01', '2018-11-15', '2018-11-15', '2018-11-15', '2018-12-15', '2018-12-15', '2019-01-17', '2019-01-18', '2019-05-16', '2019-05-16', '2019-09-16', '2019-09-16'), (24, 'Naura Rania', 'perempuan', '2018-02-20', 'Wardani', 'Pante Sikumbang', '2018-02-20', '2018-09-16', '2018-09-16', '2018-11-15', '2018-11-15', '2019-02-16', '2019-02-16', '2019-03-16', '2019-03-16', NULL, NULL, NULL), (25, 'Amira Shakila', 'perempuan', '2019-03-07', 'Marlinawati', 'Pante Sikumbang', '2019-03-07', '2019-04-16', '2019-04-16', '2019-05-16', '2019-05-16', '2019-06-16', '2019-06-16', '2019-07-16', '2019-07-16', NULL, NULL, NULL), (26, 'Zaratul Aisya', 'perempuan', '2019-06-11', 'Nurhikmah', 'Pante Sikumbang', '2019-06-11', '2019-07-16', '2019-07-16', '2019-07-16', '2019-08-16', '2019-08-16', '2019-10-16', '2019-10-16', '2020-01-17', NULL, NULL, NULL), (27, 'Bayi Afrizani', 'perempuan', '2019-11-19', 'Afrizani', 'Pante Sikumbang', '2019-11-19', '2020-02-17', '2020-01-17', NULL, '2020-02-17', NULL, NULL, NULL, NULL, NULL, NULL, NULL), (28, 'M. Syakir Al', 'laki-laki', '2017-07-13', 'Almunadia', 'Cot Teubee', '2017-07-17', NULL, NULL, NULL, '2017-12-15', NULL, NULL, NULL, NULL, NULL, NULL, NULL), (29, 'Auzan', 'laki-laki', '2017-07-20', 'Nurul Hidayat', 'Cot Teubee', '2017-07-20', NULL, NULL, NULL, '2017-12-15', NULL, NULL, NULL, NULL, NULL, NULL, NULL), (30, 'Nofa Akbar', 'laki-laki', '2017-11-22', 'Julia', 'Cot Teubee', '2017-11-22', '2018-01-15', '2018-01-15', NULL, '2018-01-14', NULL, '2018-02-15', NULL, '2018-08-14', NULL, NULL, NULL), (31, 'Azqia', 'perempuan', '2017-09-14', 'Fitriani', 'Cot Teubee', '2017-09-14', NULL, '2017-11-11', '2017-11-11', '2017-12-15', '2017-12-15', '2018-01-15', '2018-01-15', '2018-02-15', NULL, NULL, NULL), (32, 'Fina Azka', 'perempuan', '2018-01-03', 'Nurul Madina', 'Cot Teubee', '2018-01-03', NULL, '2018-03-12', '2018-04-13', '2018-04-13', NULL, '2018-05-12', NULL, '2018-06-17', NULL, NULL, NULL), (33, 'Zahira Fairus', 'perempuan', '2018-02-05', 'Afriza Hanum', 'Cot Teubee', '2018-02-05', NULL, '2018-05-12', '2018-06-09', '2018-06-09', '2018-02-17', '2018-02-17', '2018-08-14', '2018-08-14', NULL, '2018-10-13', NULL), (34, 'M. Wali Alkha', 'laki-laki', '2018-05-06', 'Nur Azizah', 'Cot Teubee', '2018-05-06', NULL, '2018-06-09', NULL, '2018-07-13', NULL, '2018-08-14', NULL, '2018-09-12', NULL, NULL, NULL), (35, 'Nabila Raila', 'perempuan', '2018-07-02', 'Ajirna', 'Cot Teubee', '2018-07-02', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (36, 'Malika Atha', 'perempuan', '2018-08-16', 'Zulhikmah', 'Cot Teubee', '2018-08-16', '2019-03-11', '2018-01-15', '2018-11-15', '2019-01-09', '2019-01-09', '2019-02-11', '2019-02-11', '2019-03-11', NULL, NULL, NULL), (37, 'Annasyaz', 'perempuan', '2018-09-09', 'Rosdiani', 'Cot Teubee', '2018-09-09', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (38, 'Rafiza Alkal', 'laki-laki', '2018-09-21', 'Fitriani', 'Cot Teubee', '2018-09-21', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (39, 'Raja Salman', 'laki-laki', '2018-09-22', 'Safarianti', 'Cot Teubee', '2018-09-22', NULL, '2019-02-11', NULL, '2019-03-11', NULL, '2019-04-11', NULL, '2019-05-11', NULL, NULL, NULL), (40, 'Rafka Al', 'laki-laki', '2018-10-08', 'Cut Aflizarni', 'Cot Teubee', '2018-10-08', '2019-03-11', '2019-01-09', '2019-01-09', '2019-02-11', '2019-02-11', '2019-03-11', '2019-03-11', '2019-04-11', NULL, NULL, NULL), (41, 'Alifa Zikra', 'perempuan', '2019-01-01', 'Nurlaili', 'Cot Teubee', '2019-01-01', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (42, 'Maulina', 'perempuan', '2019-01-15', 'Iklima', 'Cot Teubee', '2019-01-15', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (43, 'Naila Ghania', 'perempuan', '2019-01-12', 'Hasnidar', 'Cot Teubee', '2019-01-12', '2019-03-20', '2019-03-20', '2019-05-11', '2019-05-11', '2019-06-11', '2019-06-11', '2019-07-11', '2019-07-11', '2019-11-11', '2019-11-11', NULL), (44, 'M. Rian Arrasyid', 'laki-laki', '2019-04-09', 'Nova Sari', 'Cot Teubee', '2019-04-09', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (45, 'Siti Zarena Rayya', 'perempuan', '2019-04-17', 'Almunadia', 'Cot Teubee', '2019-04-17', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (46, 'Rafiski Al Farizi', 'laki-laki', '2019-05-02', 'Nur Azizah', 'Cot Teubee', '2019-05-02', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (47, 'Sabrina Fitri', 'perempuan', '2019-06-11', 'Ainal Mardhiah', 'Cot Teubee', '2019-06-11', NULL, '2019-09-11', NULL, '2019-10-11', NULL, NULL, NULL, NULL, NULL, NULL, NULL), (48, 'Siti Zulaikha', 'perempuan', '2019-06-22', 'Titin Hartinah', 'Cot Teubee', '2019-06-22', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (49, 'Cut Farrah Faizah', 'perempuan', '2019-07-09', 'Fathiyah', 'Cot Teubee', '2019-07-09', '2019-11-11', '2019-11-11', '2019-11-11', '2019-11-11', '2019-12-11', NULL, NULL, NULL, NULL, NULL, NULL), (50, 'Bayi Iswati', 'laki-laki', '2019-08-27', 'Iswati', 'Cot Teubee', '2019-08-27', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (51, 'Bayi Mahfuzah', 'laki-laki', '2019-09-01', 'Mahfuzah', 'Cot Teubee', '2019-09-01', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (52, 'Arsyila Syahada', 'perempuan', '2019-11-01', 'Yuliana', 'Cot Teubee', '2019-11-06', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (53, 'Ausisa Sativa', 'perempuan', '2019-11-10', 'Junaili', 'Cot Teubee', '2019-11-10', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (54, 'Safiqa Aurora', 'perempuan', '2019-08-05', 'Muazzimah', 'Ujong Bayu', '2019-08-05', NULL, '2019-11-30', NULL, '2020-01-23', NULL, '2020-03-23', NULL, NULL, NULL, NULL, NULL), (55, 'M. ALfais', 'laki-laki', '2019-09-02', 'Musnadiah', 'Ujong Bayu', '2019-09-02', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (56, 'Zahwa Akila', 'perempuan', '2019-10-19', 'Aswiana', 'Ujong Bayu', '2019-10-19', NULL, '2020-01-23', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (57, 'Siti Raisa', 'perempuan', '2020-01-22', 'Umi Kalsum', 'Ujong Bayu', '2020-01-22', '2020-02-22', '2020-02-22', '2020-02-22', '2020-02-22', NULL, NULL, NULL, NULL, NULL, NULL, NULL), (58, 'Balqis', 'perempuan', '2019-05-27', 'Boihaqi', 'Paya Baro', '2019-05-27', NULL, '2019-06-19', '2019-06-19', '2019-07-19', '2019-07-19', '2019-08-19', '2019-09-19', '2019-10-19', NULL, NULL, NULL), (59, 'Afzalul Dzikri', 'laki-laki', '2019-07-04', 'Azhari', 'Paya Baro', '2019-07-04', NULL, '2019-08-19', NULL, '2019-09-19', NULL, '2019-10-19', NULL, '2019-11-19', NULL, NULL, NULL), (60, 'M. Rifqan', 'laki-laki', '2019-09-03', 'Azhari', 'Paya Baro', '2019-09-03', NULL, '2020-02-21', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (61, 'Maulidia Rizka', 'perempuan', '2019-11-26', 'Musa Abdullah', 'Paya Baro', '2019-11-26', '2020-02-21', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (62, 'Aurelia Almashira', 'perempuan', '2020-01-05', 'Anwar', 'Paya Baro', '2020-01-05', NULL, '2020-02-21', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (63, 'Cut Mira Zatul', 'perempuan', '2015-09-01', 'Saiful', 'Palohme', '2015-09-01', '2015-11-11', '2015-11-11', '2016-01-11', '2016-01-11', '2016-02-11', '2016-02-11', '2016-05-11', '2016-05-11', NULL, '2016-06-14', '2016-06-14'), (64, 'Hafid Sulfani', 'laki-laki', '2015-12-13', 'Husaini', 'Palohme', '2015-12-14', '2016-01-12', '2016-01-12', '2016-02-11', '2016-02-11', '2016-04-11', '2016-04-11', '2016-05-11', '2016-05-11', NULL, '2016-09-19', '2016-09-19'), (65, 'Liana Azka Zahira', 'perempuan', '2016-06-10', 'Jailani', 'Palohme', '2016-06-19', '2016-08-11', '2016-08-11', '2016-09-19', '2016-09-19', '2016-10-11', '2016-10-11', '2016-11-16', '2016-11-16', '2017-03-15', '2017-03-15', '2017-03-15'), (66, 'Cut Meutia Riski', 'perempuan', '2016-07-17', 'Zaini', 'Palohme', '2016-09-17', '2016-10-11', '2016-10-11', '2016-11-16', '2016-11-16', '2016-12-19', '2016-12-19', '2017-02-17', '2017-01-19', '2017-01-19', '2017-06-06', '2017-06-06'), (67, 'Asyifa', 'perempuan', '2016-10-07', 'Rusli', 'Palohme', '2016-10-07', '2016-11-22', '2016-11-22', '2017-02-17', '2017-02-17', '2017-04-15', '2017-04-15', '2017-05-15', '2017-06-15', '2017-06-15', '2017-08-12', '2017-08-12'), (68, 'Maulina', 'perempuan', '2016-12-08', 'Rusdi', 'Palohme', '2016-12-09', '2017-01-22', '2017-04-15', '2017-04-22', '2017-06-15', '2017-06-15', '2017-07-15', '2017-07-15', '2017-08-12', '2017-08-12', '2017-10-16', '2017-10-16'), (69, 'Fatimah Putri', 'perempuan', '2017-05-01', 'Mulyadi', 'Palohme', '2017-05-01', '2017-06-06', '2017-06-06', '2017-08-12', '2017-08-12', '2017-09-16', '2017-09-16', '2017-11-16', '2017-11-16', '2017-12-15', NULL, NULL), (70, 'Alfin Zikri', 'laki-laki', '2017-09-22', 'Mawardi', 'Palohme', '2017-06-22', '2017-08-29', '2017-08-29', '2017-10-16', '2017-10-16', '2017-11-16', '2017-11-16', '2017-12-15', '2017-12-15', '2018-02-15', NULL, NULL), (71, 'Aura Nazifa', 'perempuan', '2017-07-19', 'M.Yusuf', 'Palohme', '2017-07-19', '2017-09-15', '2017-09-15', '2017-10-16', '2017-10-16', '2017-11-16', '2017-11-16', '2017-12-15', '2017-12-15', '2018-02-15', NULL, NULL), (72, 'Dinda Sholeha', 'perempuan', '2017-09-19', 'Bukhari', 'Palohme', '2017-09-20', '2017-11-16', '2017-11-16', '2018-01-16', '2018-01-16', '2018-02-15', '2018-02-15', '2018-03-16', '2018-03-16', '2018-03-16', NULL, NULL), (73, 'Bayi Rosmiati', 'laki-laki', '2017-12-11', 'Husaini', 'Palohme', '2017-12-12', '2018-01-16', '2018-01-16', '2018-02-15', '2018-02-15', NULL, NULL, NULL, NULL, NULL, NULL, NULL), (74, 'Bayi Suryani', 'laki-laki', '2018-01-03', 'Suryani', 'Palohme', '2018-01-03', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (75, 'Bayi Lisdawati', 'perempuan', '2018-01-22', 'Amrizal', 'Palohme', '2018-01-22', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (76, 'Cut', 'perempuan', '2016-01-24', 'Rohani', 'Tanjong Raya', '2016-01-24', '2016-05-15', '2016-05-15', '2016-05-15', '2016-06-15', '2016-09-22', '2016-09-22', '2016-10-22', '2016-10-22', NULL, '2017-01-14', NULL), (77, 'Nurul', 'perempuan', '2016-02-02', 'Irawati', 'Tanjong Raya', '2016-02-02', '2016-05-15', '2016-05-15', '2016-05-15', '2016-06-15', '2016-08-15', '2016-09-15', '2016-10-22', '2016-10-22', NULL, '2016-11-23', NULL), (78, 'Bilqis', 'perempuan', '2016-12-22', 'Azizah', 'Tanjong Raya', '2016-12-22', '2017-01-21', '2017-03-18', '2017-03-18', '2017-04-21', '2017-04-21', '2017-06-16', '2017-05-20', '2017-08-17', '2017-08-17', NULL, NULL), (79, 'Alisa', 'perempuan', '2017-01-23', 'Yusniar', 'Tanjong Raya', '2017-01-25', '2017-06-06', '2017-06-06', '2017-09-19', '2017-09-19', '2017-10-20', '2017-10-20', '2017-11-20', '2017-11-20', NULL, '2018-01-20', NULL), (80, 'Arika', 'perempuan', '2017-05-14', 'Irma', 'Tanjong Raya', '2017-05-14', NULL, '2018-01-19', NULL, '2018-02-19', NULL, NULL, NULL, NULL, NULL, NULL, NULL), (81, 'Rizka', 'perempuan', '2017-09-23', 'Emi', 'Tanjong Raya', '2017-09-23', NULL, '2017-10-19', NULL, '2017-11-09', NULL, '2017-12-09', NULL, '2018-01-26', '2018-08-16', NULL, NULL), (82, 'Azka', 'perempuan', '2017-11-16', 'Atra', 'Tanjong Raya', '2017-11-16', NULL, '2018-01-20', NULL, '2018-01-19', NULL, '2018-03-19', NULL, NULL, NULL, NULL, NULL), (83, 'Nisa', 'perempuan', '2017-05-06', 'Fatimah', 'Tanjong Raya', '2017-05-06', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (84, 'Cut Nisa', 'perempuan', '2018-05-16', 'Suryani', 'Tanjong Raya', '2018-05-16', NULL, '2018-07-18', NULL, '2018-08-18', NULL, '2018-09-18', NULL, '2018-09-18', NULL, NULL, NULL), (85, 'Masyitah', 'perempuan', '2018-11-18', 'Nurbani', 'Tanjong Raya', '2018-11-18', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (86, 'Syakira', 'perempuan', '2018-12-02', 'Nurlela', 'Tanjong Raya', '2018-12-02', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (87, 'Balqis', 'perempuan', '2019-02-01', 'Darma', 'Tanjong Raya', '2019-02-01', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (88, 'Alfatun', 'perempuan', '2019-03-01', 'Nuraini', 'Tanjong Raya', '2019-03-01', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (89, 'Aulia', 'perempuan', '2019-03-10', 'Ida', 'Tanjong Raya', '2019-03-10', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (90, 'Bayi Imra', 'perempuan', '2019-12-26', 'Imra', 'Tanjong Raya', '2019-12-26', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (91, 'M.Aris', 'laki-laki', '2017-10-12', 'Yusra', 'Tanjong Raya', '2017-10-12', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (92, 'M.Arkan', 'laki-laki', '2018-06-01', 'Mana', 'Tanjong Raya', '2018-06-01', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (93, 'M.Fatih', 'laki-laki', '2019-04-26', 'Asmaul', 'Tanjong Raya', '2019-04-26', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (94, 'M.hafidz', 'laki-laki', '2018-02-01', 'M.Nazar', 'Pulo Gisa', '2018-02-01', NULL, '2018-08-15', '2018-08-15', '2018-09-17', '2018-09-17', '2018-11-17', NULL, '2018-12-17', NULL, NULL, NULL), (95, 'Syamil Arrayan', 'laki-laki', '2018-07-17', 'Arwadi', 'Pulo Gisa', '2018-07-19', NULL, '2019-02-20', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (96, 'M.Sadan Nafis', 'laki-laki', '2018-07-28', 'Aswadi', 'Pulo Gisa', '2018-07-30', NULL, '2019-01-16', NULL, '2019-04-18', NULL, '2019-05-18', NULL, NULL, NULL, NULL, NULL), (97, 'Ahmad Asyakir', 'laki-laki', '2018-11-06', 'Zahidi', 'Pulo Gisa', '2018-11-06', NULL, '2019-01-16', '2019-01-16', '2019-02-20', NULL, '2019-03-18', NULL, '2019-05-18', NULL, NULL, NULL), (98, 'M.Shakil', 'laki-laki', '2019-01-20', 'Masri', 'Pulo Gisa', '2019-01-20', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (99, 'Nyak Razi', 'laki-laki', '2019-04-05', 'M.Ali', 'Pulo Gisa', '2019-04-06', '2019-06-18', '2019-06-18', '2019-07-18', '2019-07-18', NULL, '2019-09-18', NULL, NULL, NULL, NULL, NULL), (100, 'Baidhawi', 'laki-laki', '2019-07-23', 'Marzuki', 'Pulo Gisa', '2019-07-24', '2019-10-22', '2019-10-21', '2019-10-21', NULL, '2020-02-11', '2020-02-20', NULL, NULL, NULL, NULL, NULL), (101, 'M.Shabir', 'laki-laki', '2019-09-25', 'Faizan', 'Pulo Gisa', '2019-09-25', '2020-02-11', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (102, 'Salsabila', 'perempuan', '2019-05-23', 'Yusri', 'Pulo Gisa', '2019-05-23', NULL, '2019-10-21', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (103, 'Safia', 'perempuan', '2019-06-01', 'M.Azmi', 'Pulo Gisa', '2019-06-01', '2019-06-18', '2019-06-18', NULL, '2019-08-08', NULL, '2019-09-19', NULL, '2020-02-20', NULL, '2020-02-20', NULL), (104, 'Salsabila', 'perempuan', '2019-01-01', 'Fitriani', 'Lingka Kuta', '2019-01-01', '0000-00-00', '2019-02-01', '0000-00-00', '2019-03-01', '0000-00-00', '2019-04-01', '0000-00-00', '2019-05-01', '0000-00-00', '0000-00-00', '0000-00-00'), (105, 'Kiswa Mahira', 'perempuan', '2019-01-23', 'Lia Zahara', 'Lingka Kuta', '2019-01-23', '0000-00-00', '2019-02-23', '0000-00-00', '2019-03-23', '0000-00-00', '2019-04-23', '0000-00-00', '2019-05-23', '0000-00-00', '0000-00-00', '0000-00-00'), (106, 'Zakira A', 'perempuan', '2019-02-17', 'Mita Rafami', 'Lingka Kuta', '2019-02-17', '0000-00-00', '2019-03-17', '0000-00-00', '2019-04-17', '0000-00-00', '2019-05-17', '0000-00-00', '2019-06-17', '0000-00-00', '0000-00-00', '0000-00-00'), (107, 'Cut Arsyila', 'perempuan', '2019-04-05', 'Ida Ruhama', 'Lingka Kuta', '2019-04-05', '2019-05-05', '2019-06-05', '2019-07-05', '2019-08-05', '2019-09-05', '2019-10-05', '2019-11-05', '2019-12-05', '0000-00-00', '2020-02-05', '0000-00-00'), (108, 'Putri Alya', 'perempuan', '2019-05-07', 'Misbahul', 'Lingka Kuta', '2019-05-07', '0000-00-00', '2019-06-07', '0000-00-00', '2019-07-07', '0000-00-00', '2019-08-07', '0000-00-00', '2019-09-07', '0000-00-00', '0000-00-00', '0000-00-00'), (109, 'Mizyana', 'perempuan', '2019-06-09', 'Sri Wahyuni', 'Lingka Kuta', '2019-06-09', '2019-07-09', '2019-08-09', '2019-08-09', '2019-09-09', '2019-10-09', '2019-10-09', '2019-11-09', '2019-12-09', '0000-00-00', '0000-00-00', '0000-00-00'), (110, 'Andara', 'perempuan', '2019-06-30', 'Yenni M', 'Lingka Kuta', '2019-06-30', '2019-07-02', '2019-08-01', '2019-08-01', '2019-09-24', '2019-10-27', '2019-10-27', '2019-11-10', '2019-12-05', '0000-00-00', '0000-00-00', '0000-00-00'), (111, 'Nabila', 'perempuan', '2019-07-06', 'Engkus', 'Lingka Kuta', '2019-07-06', '2019-08-11', '2019-09-14', '2019-09-14', '2019-10-24', '2019-10-24', '2019-11-09', '2019-11-09', '2019-12-05', '0000-00-00', '0000-00-00', '0000-00-00'), (112, 'Nashwa', 'perempuan', '2019-08-20', 'Nuralfita', 'Lingka Kuta', '2019-08-20', '2019-09-20', '2019-09-20', '2019-10-20', '2019-11-20', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (113, 'By Laki-laki', 'laki-laki', '2019-08-03', 'Abdul', 'Lingka Kuta', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), (114, 'Najwa Arifa', 'perempuan', '2016-06-01', 'Nuraini', 'Paloh Kayee Kunyet', '0000-00-00', '0000-00-00', '2017-01-11', '0000-00-00', '2017-02-17', '0000-00-00', '2017-04-04', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (115, 'Atika Zahra', 'perempuan', '2016-07-07', 'Rosnita', 'Paloh Kayee Kunyet', '0000-00-00', '0000-00-00', '2017-01-11', '0000-00-00', '2017-02-20', '0000-00-00', '2017-03-17', '0000-00-00', '2017-04-04', '0000-00-00', '0000-00-00', '0000-00-00'), (116, 'M. Gibran', 'laki-laki', '2016-08-01', 'Azizah', 'Paloh Kayee Kunyet', '0000-00-00', '0000-00-00', '2017-01-11', '0000-00-00', '2017-02-20', '0000-00-00', '2017-03-22', '0000-00-00', '2017-04-21', '0000-00-00', '0000-00-00', '0000-00-00'), (117, 'Abdul', 'laki-laki', '2017-01-04', 'Lidawati', 'Paloh Kayee Kunyet', '0000-00-00', '0000-00-00', '2017-04-21', '0000-00-00', '2017-06-20', '0000-00-00', '2017-07-20', '0000-00-00', '2017-09-20', '0000-00-00', '0000-00-00', '0000-00-00'), (118, 'Abral', 'laki-laki', '2017-03-06', 'Jumiati', 'Paloh Kayee Kunyet', '2017-03-06', '2017-04-21', '2017-04-21', '0000-00-00', '2017-06-20', '0000-00-00', '2017-07-20', '0000-00-00', '2017-09-20', '0000-00-00', '0000-00-00', '0000-00-00'), (119, 'Anisa Sabila', 'perempuan', '2017-06-07', 'Salmawati', 'Paloh Kayee Kunyet', '2017-06-07', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (120, 'Muhammad Rayyan', 'laki-laki', '2017-07-06', 'Nasriah', 'Paloh Kayee Kunyet', '2017-07-06', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (121, 'Shafi Mubarak', 'laki-laki', '2017-11-01', 'Mursyidah', 'Paloh Kayee Kunyet', '2017-11-01', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (122, 'Ziya Ulhaq', 'laki-laki', '2018-02-01', 'Lindawati', 'Paloh Kayee Kunyet', '2018-02-01', '0000-00-00', '2018-04-20', '0000-00-00', '2018-05-12', '0000-00-00', '2018-06-19', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (123, 'Afifah Talita', 'perempuan', '2018-01-22', 'Maryati', 'Paloh Kayee Kunyet', '0000-00-00', '2019-02-20', '2019-02-20', '0000-00-00', '2019-02-20', '0000-00-00', '2019-04-19', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (124, 'Naziratul Abidah', 'perempuan', '2019-03-06', 'Raihanti', 'Cot Tufah', '2019-03-06', '0000-00-00', '2019-05-10', '0000-00-00', '2019-06-17', '0000-00-00', '2019-09-03', '0000-00-00', '2019-11-12', '0000-00-00', '0000-00-00', '0000-00-00'), (125, 'Kafiya Humaira', 'perempuan', '2019-03-22', 'Suryana', 'Cot Tufah', '2019-03-22', '0000-00-00', '2019-07-13', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (126, 'Zidan', 'laki-laki', '2019-04-01', 'Rahmiati', 'Cot Tufah', '0000-00-00', '0000-00-00', '2019-06-17', '0000-00-00', '2019-08-03', '0000-00-00', '2019-10-08', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (127, 'M. Hafdhal', 'laki-laki', '2019-04-12', 'Sapiah', 'Cot Tufah', '2019-04-12', '0000-00-00', '2019-07-13', '0000-00-00', '2019-09-03', '0000-00-00', '2019-10-08', '0000-00-00', '2019-11-12', '0000-00-00', '0000-00-00', '0000-00-00'), (128, 'Aura Azizah', 'perempuan', '2019-04-28', 'Aklima', 'Cot Tufah', '2019-04-29', '0000-00-00', '2019-06-17', '0000-00-00', '2019-09-03', '0000-00-00', '2019-11-12', '0000-00-00', '2020-01-11', '0000-00-00', '0000-00-00', '0000-00-00'), (129, 'Muvaddhal', 'laki-laki', '2019-05-01', 'Ruhana', 'Cot Tufah', '2019-05-01', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (130, 'Syuqran', 'laki-laki', '2019-06-01', 'Nurhayati', 'Cot Tufah', '2019-06-01', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (131, 'Tanischa', 'perempuan', '2019-06-07', 'Nurmalisda', 'Cot Tufah', '2019-06-07', '0000-00-00', '2019-09-03', '0000-00-00', '2019-10-08', '0000-00-00', '2019-11-12', '0000-00-00', '2020-01-11', '0000-00-00', '0000-00-00', '0000-00-00'), (132, 'Dilara Shafia', 'perempuan', '2019-07-13', 'Mahdalena', 'Cot Tufah', '2019-07-13', '0000-00-00', '2019-10-08', '0000-00-00', '2019-12-10', '0000-00-00', '2020-01-11', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (133, 'M. Alhanan', 'laki-laki', '2018-01-01', 'Nurhayati', 'Cot Puuk', '2018-01-01', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (134, 'Aqila Humaira', 'perempuan', '2018-01-27', 'Bapak Aqila', 'Cot Puuk', '2018-01-27', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (135, 'Arisa Azahra', 'perempuan', '2018-02-01', 'Badriah', 'Cot Puuk', '2018-02-01', '0000-00-00', '2018-03-12', '0000-00-00', '2018-04-11', '0000-00-00', '2018-05-11', '0000-00-00', '2018-06-09', '0000-00-00', '0000-00-00', '0000-00-00'), (136, 'M. Yaseer', 'laki-laki', '2018-03-16', 'Maya Sri', 'Cot Puuk', '2018-03-16', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (137, 'Aqifa Syakira', 'perempuan', '2018-05-04', 'Fauziah', 'Cot Puuk', '2018-05-04', '0000-00-00', '2018-08-10', '0000-00-00', '2018-09-10', '0000-00-00', '2018-10-10', '0000-00-00', '2018-12-11', '0000-00-00', '0000-00-00', '0000-00-00'), (138, 'M. Irsyad', 'laki-laki', '2018-03-28', 'Mauliya', 'Cot Puuk', '2018-03-28', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (139, 'M. Farzan', 'laki-laki', '2018-04-03', 'ti Hawa', 'Cot Puuk', '2018-04-03', '0000-00-00', '2018-08-09', '0000-00-00', '2018-09-10', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (140, 'Fika Alisha', 'perempuan', '2018-06-03', 'Evi', 'Cot Puuk', '2018-06-03', '0000-00-00', '2018-08-10', '0000-00-00', '2018-09-10', '0000-00-00', '2018-10-10', '0000-00-00', '2018-12-11', '0000-00-00', '0000-00-00', '0000-00-00'), (141, 'Adifa', 'perempuan', '2018-06-18', 'Melisa', 'Cot Puuk', '2018-06-18', '0000-00-00', '2018-08-10', '0000-00-00', '2018-09-10', '0000-00-00', '2018-11-10', '0000-00-00', '2018-12-10', '0000-00-00', '0000-00-00', '0000-00-00'); -- -------------------------------------------------------- -- -- Table structure for table `kotajuang` -- CREATE TABLE `kotajuang` ( `id_imunisasi` int(11) NOT NULL, `nama_bayi` varchar(100) NOT NULL, `jenis_kelamin` varchar(20) NOT NULL, `tanggal_lahir` date NOT NULL, `nama_ortu` varchar(100) NOT NULL, `alamat` varchar(255) NOT NULL, `hb_0` date DEFAULT NULL, `bcg` date DEFAULT NULL, `pol_1` date DEFAULT NULL, `dpt_hb_hib_1` date DEFAULT NULL, `pol_2` date DEFAULT NULL, `dpt_hb_hib_2` date DEFAULT NULL, `pol_3` date DEFAULT NULL, `dpt_hb_hib_3` date DEFAULT NULL, `pol_4` date DEFAULT NULL, `ipv` date DEFAULT NULL, `campak` date DEFAULT NULL, `imunisasi_lengkap` date DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; -- -- Dumping data for table `kotajuang` -- INSERT INTO `kotajuang` (`id_imunisasi`, `nama_bayi`, `jenis_kelamin`, `tanggal_lahir`, `nama_ortu`, `alamat`, `hb_0`, `bcg`, `pol_1`, `dpt_hb_hib_1`, `pol_2`, `dpt_hb_hib_2`, `pol_3`, `dpt_hb_hib_3`, `pol_4`, `ipv`, `campak`, `imunisasi_lengkap`) VALUES (1, 'Bayi Maswani', 'perempuan', '2019-03-16', 'Maswani', 'Menasah Dayah', '2019-03-20', '2019-04-11', '2019-03-20', '2019-05-11', '2019-04-11', '2019-09-11', '2019-05-14', '2019-10-11', '2019-09-11', '2019-12-11', '2019-12-11', '2019-12-11'), (2, 'Aisyah', 'perempuan', '2019-03-31', 'Yuliana', 'Menasah Dayah', '2019-03-31', '2019-05-14', '2019-05-14', '2019-07-10', '2019-07-10', '2019-08-13', '2019-08-13', '2019-10-11', '2019-10-10', '2019-12-11', '2019-12-11', '2019-12-11'), (3, 'Muhammad', 'laki-laki', '2019-02-27', 'Lia', 'Menasah Dayah', '2019-03-04', '2019-05-14', '2019-03-12', '2019-03-12', '2019-04-11', '2019-04-11', '2019-05-14', '2019-07-10', '2019-07-10', '2019-12-11', '2019-12-11', '2019-12-11'), (4, 'Iqbal Fauzan', 'laki-laki', '2018-09-06', 'Rabiah', 'Menasah Dayah', '2018-09-10', '2019-05-14', '2019-02-06', '2019-03-12', '2019-03-12', '2019-07-10', '2019-05-14', '2019-09-11', '2019-07-10', '2019-07-10', '2019-08-13', '2019-08-13'), (24, 'Putri Azzahra', 'perempuan', '2018-08-28', 'Erawati', 'Menasah Dayah', '2018-08-29', '2018-12-10', '2019-01-11', '2019-01-11', '2019-02-06', '2019-02-06', '2019-03-12', '2019-03-12', '2019-04-11', '2019-05-16', '2019-08-13', '2019-08-13'), (25, 'M. Adam', 'laki-laki', '2018-11-08', 'Nurmala', 'Menasah Dayah', '2018-11-09', '2019-01-11', '2019-01-11', '2019-03-12', '2019-03-12', '2019-07-10', '2019-07-10', '2019-09-11', '2019-09-11', '2019-10-11', '2019-08-13', '2019-08-13'), (26, 'Cut Fatimah', 'perempuan', '2018-09-04', 'Rahmianti', 'Menasah Dayah', '2018-09-04', '2019-01-11', '2019-01-11', '2019-02-06', '2019-02-06', '2019-03-12', '2019-03-12', '2019-03-16', '2019-04-11', '2019-04-11', '2019-05-14', '2019-08-13'), (27, 'Ruhiya', 'perempuan', '2018-05-04', 'Fitriani', 'Menasah Dayah', '2018-05-08', '2018-07-10', '2018-07-10', '2018-08-11', '2018-08-11', '2018-09-12', '2018-12-10', '2018-12-10', '2019-05-14', '2019-02-16', '2019-03-16', '2019-03-16'), (28, 'Fatimah Azzahra', 'perempuan', '2019-02-01', 'Vivi', 'Menasah Dayah', '2019-03-16', '2019-04-16', '2019-04-16', '2019-05-12', '2019-05-12', '2019-06-17', '2019-06-17', '2019-07-16', '2019-08-16', '2019-09-16', '2019-10-16', '2019-10-16'), (29, 'Afiq Razin', 'laki-laki', '2019-02-24', 'Nurhayati', 'Menasah Dayah', '2019-02-28', '2019-04-11', '2019-03-12', '2019-05-14', '2019-04-11', '2019-07-10', '2019-05-14', '2019-05-14', '2019-06-16', '2019-07-16', '2019-09-16', '2019-09-16'), (30, 'Aiza', 'perempuan', '2018-07-24', 'Nanda', 'Geudong Alue', '2018-07-24', '2018-10-16', '2018-10-16', '2019-02-12', '2019-02-12', '2019-04-12', '2019-04-12', '2019-05-12', '2019-05-12', '2019-06-12', '2019-10-15', '2019-10-15'), (31, 'Silvia Darma', 'perempuan', '2018-07-27', 'Nurhayati', 'Geudong Alue', '2018-07-27', '2018-09-12', '2018-09-12', '2018-11-23', '2019-04-12', '2019-04-12', '2019-04-12', '2019-05-12', '2019-05-12', '2019-06-12', '2019-10-15', '2019-10-15'), (32, 'Riesa Lidyawati', 'perempuan', '2018-07-29', 'Silvia', 'Geudong Alue', '2018-07-30', '2018-10-16', '2018-10-16', '2019-02-12', '2019-02-12', '2019-04-12', '2019-04-12', '2019-05-12', '2019-05-12', '2019-06-12', '2019-10-15', '2019-10-15'), (33, 'Aisya Alifa', 'perempuan', '2018-07-17', 'Yumiati', 'Geudong Alue', '0000-00-00', '2018-07-18', '2018-07-18', '2018-07-18', '2018-10-16', '2019-01-12', '2019-01-12', '2019-02-12', '2019-02-12', '2019-03-12', '2019-10-15', '2019-10-15'), (34, 'Siska', 'perempuan', '2018-08-26', 'Rauzana', 'Geudong Alue', '2018-08-27', '2018-10-16', '2018-10-16', '2019-02-12', '2019-02-12', '2019-04-12', '2019-04-12', '2019-05-12', '2019-05-12', '2019-06-12', '2019-10-15', '2019-10-15'), (35, 'Zahratul Rahmi', 'perempuan', '2018-08-24', 'Irmalia', 'Geudong Alue', '2018-08-27', '2018-10-16', '2018-10-16', '2019-02-12', '2019-02-12', '2019-04-12', '2019-04-12', '2019-05-12', '2019-05-12', '2019-06-12', '0000-00-00', '2019-10-15'), (36, 'Azam Fahrezi', 'laki-laki', '2018-08-19', 'Jannah', 'Geudong Alue', '2018-08-20', '2018-11-23', '2018-11-23', '2019-01-12', '2019-04-12', '2019-04-12', '2019-04-12', '2019-05-12', '2019-05-12', '2019-06-12', '2019-08-12', '2019-10-15'), (37, 'M.Latiful Asral', 'laki-laki', '2018-08-10', 'Nurhayati', 'Geudong Alue', '2018-08-01', '2018-10-16', '2018-10-16', '2019-02-12', '2019-02-12', '2019-04-12', '2019-04-12', '2019-05-12', '2019-05-12', '2019-06-12', '2019-10-15', '2019-10-15'), (38, 'Gibran Algifari', 'laki-laki', '2018-09-06', 'Nora Tursini', 'Geudong Alue', '2018-09-10', '2018-11-23', '2018-11-23', '2019-02-12', '2019-02-12', '2019-04-12', '2019-04-12', '2019-05-12', '2019-05-12', '2019-06-12', '2019-10-15', '2019-10-15'), (39, 'Saidina Ali', 'laki-laki', '2018-10-18', 'Muqmina', 'Geudong Alue', '2018-11-23', '2018-11-23', '2019-01-12', '2019-01-12', '2019-02-12', '2019-03-12', '2019-04-12', '2019-05-12', '2019-05-12', '2019-06-12', '2019-10-15', '2019-10-15'), (40, 'Azalea', 'perempuan', '2019-04-05', 'Fonna Putri', 'Meunasah Reuleut', '2019-04-05', '2019-06-12', '2019-06-12', '2019-07-09', '2019-07-09', '2019-08-09', '2019-08-09', '2020-01-08', '2020-01-08', '2020-02-05', '0000-00-00', '0000-00-00'), (41, 'M.Arkan', 'laki-laki', '2019-04-12', 'Yulia', 'Meunasah Reuleut', '2019-04-12', '2019-06-12', '2019-06-12', '2019-07-09', '2019-07-09', '2019-08-06', '2019-08-06', '2019-09-06', '2019-07-12', '2020-01-07', '2020-02-05', '2020-02-05'), (42, 'Azkiyatun Nisa', 'perempuan', '2019-04-10', 'Kurniati', 'Meunasah Reuleut', '2019-04-10', '2019-06-12', '2019-06-12', '2019-07-09', '2019-07-09', '2019-08-09', '2019-08-09', '2019-07-12', '2020-01-08', '2020-01-08', '2020-02-05', '2020-02-05'), (43, 'Farah Ziba', 'perempuan', '2019-04-07', 'Siti Nurhaliza', 'Meunasah Reuleut', '2019-04-07', '2019-06-14', '2019-06-14', '2019-07-09', '2019-07-09', '2019-08-06', '2019-08-06', '2019-09-06', '2019-09-06', '2019-12-10', '2020-01-07', '2020-01-07'), (44, 'M. Azzam', 'laki-laki', '2019-04-15', 'Roslina', 'Meunasah Reuleut', '2019-04-15', '2019-06-14', '2019-06-14', '2019-07-09', '2019-07-09', '2019-08-09', '2019-08-09', '2019-09-06', '2019-09-06', '2019-12-10', '2020-01-08', '2020-01-08'), (45, 'Kenesya Putri', 'perempuan', '2019-04-08', 'Kasmiati', 'Meunasah Reuleut', '2019-04-08', '2019-06-14', '2019-06-14', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (46, 'Riskia Lutfi', 'perempuan', '2019-05-24', 'Yanti Octavia', 'Meunasah Reuleut', '2019-05-24', '2019-07-09', '2019-07-09', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (47, 'Azril Rafif', 'laki-laki', '2019-05-06', 'Sari Andini', 'Meunasah Reuleut', '2019-07-05', '2019-07-05', '2019-08-05', '2019-08-05', '2019-09-05', '2019-09-05', '2019-10-05', '2019-10-05', '2019-11-05', '2019-12-05', '2020-02-05', '2020-02-05'), (48, 'Al Hafiz', 'laki-laki', '2019-04-15', 'Zahraini', 'Meunasah Reuleut', '2019-04-15', '2019-06-14', '2019-06-14', '2019-07-09', '2019-07-09', '2019-08-09', '2019-08-09', '2019-09-06', '2019-09-06', '2019-12-10', '2020-01-08', '2020-01-08'), (49, 'Putri Anzalna', 'perempuan', '2019-04-15', 'Roslina', 'Meunasah Reuleut', '2019-04-15', '2019-06-14', '2019-06-14', '2019-07-09', '2019-07-09', '2019-08-09', '2019-08-09', '2019-09-06', '2019-09-06', '2019-12-10', '2020-01-08', '2020-01-08'), (50, 'Nabila Suci', 'perempuan', '2019-05-11', 'Heny', 'Buket Teukuh', '0000-00-00', '2019-06-12', '2019-06-12', '2019-07-05', '2019-07-05', '2019-08-05', '2019-08-05', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (51, 'Mufadhalul Fajri', 'laki-laki', '2019-06-25', 'Nanda', 'Buket Teukuh', '2019-06-27', '0000-00-00', '2019-09-06', '2019-09-06', '2019-10-06', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (52, 'M. Rizky', 'laki-laki', '2019-07-09', 'Mutia', 'Buket Teukuh', '2019-07-10', '0000-00-00', '2019-09-06', '0000-00-00', '2019-10-06', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (53, 'Bayi Juliana', 'perempuan', '2019-07-11', 'Juliana', 'Buket Teukuh', '2019-07-14', '0000-00-00', '2019-09-06', '0000-00-00', '2019-10-06', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (54, 'Izza Muzaiyana', 'perempuan', '2019-08-13', 'Marlena', 'Buket Teukuh', '2019-08-16', '0000-00-00', '2019-09-06', '0000-00-00', '2019-10-06', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (55, 'Bayi Dewi', 'perempuan', '2019-08-05', 'Dewi Santi', 'Buket Teukuh', '2019-08-07', '0000-00-00', '2019-10-06', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (56, 'Noval Athaila', 'laki-laki', '2019-09-12', 'Musnidar', 'Buket Teukuh', '2019-09-18', '0000-00-00', '2020-01-04', '0000-00-00', '2020-02-05', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (57, 'Bayi Rina', 'laki-laki', '2019-09-04', 'Satta Rina', 'Buket Teukuh', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (58, 'M. Rafa Haziq', 'laki-laki', '2019-09-16', 'Nelly Andriani', 'Buket Teukuh', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (59, 'Inara', 'perempuan', '2019-08-20', 'Septia', 'Buket Teukuh', '0000-00-00', '2019-09-20', '2019-09-20', '2019-11-06', '2019-11-06', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (60, 'Munandar', 'laki-laki', '2018-04-10', 'Reni', 'Geulanggang Baro', '2018-04-11', '2018-06-25', '2018-06-25', '2018-07-18', '2018-07-18', '2018-10-19', '2018-10-19', '2018-11-21', '2018-11-21', '2018-11-21', '2019-01-18', '2019-01-18'), (61, 'Anasya', 'perempuan', '2018-04-15', 'Ana M', 'Geulanggang Baro', '2018-04-14', '2018-06-25', '2018-06-25', '2018-07-18', '2018-07-18', '2018-10-19', '2018-10-19', '2018-11-21', '2018-11-21', '2018-11-21', '2019-01-18', '2019-01-18'), (62, 'Riski', 'laki-laki', '2018-05-10', 'Aisyah', 'Geulanggang Baro', '2018-05-15', '2018-06-25', '2018-06-25', '2018-07-18', '2018-07-18', '2018-10-19', '2018-10-19', '2018-11-21', '2018-11-21', '2019-01-18', '2019-02-19', '2019-02-19'), (63, 'M. Putra', 'laki-laki', '2018-05-13', 'Amalia', 'Geulanggang Baro', '2018-05-14', '2018-06-25', '2018-06-25', '2018-07-18', '2018-07-18', '2018-10-19', '2018-10-19', '2018-11-21', '2019-01-18', '2019-02-19', '2019-03-19', '2019-03-19'), (64, 'Nafiz Ramadhan', 'laki-laki', '2018-06-04', 'Yusnita', 'Geulanggang Baro', '2018-06-07', '2018-06-25', '2018-06-25', '2018-07-18', '2018-07-18', '2018-10-19', '2018-10-19', '2018-11-21', '2019-01-18', '2019-02-19', '2019-03-19', '2019-03-19'), (65, 'TM Ariandi', 'laki-laki', '2018-08-02', 'Sri Haryani', 'Geulanggang Baro', '2018-08-05', '2018-10-19', '2018-10-19', '2018-10-19', '2018-11-21', '2018-11-21', '2019-01-18', '2019-01-18', '2019-02-10', '2019-02-10', '2019-03-16', '2019-03-16'), (66, 'Raffa', 'laki-laki', '2018-10-10', 'Cut Halimah', 'Geulanggang Baro', '2018-10-19', '2018-10-19', '2018-10-19', '2018-10-19', '2018-11-21', '2018-11-21', '2019-01-18', '2019-01-18', '2019-02-10', '2019-02-10', '2019-03-16', '2019-03-16'), (67, 'Raesya Salsabila', 'perempuan', '2018-09-19', 'Wahyuni', 'Geulanggang Baro', '2018-09-19', '2018-10-19', '2018-10-19', '2018-10-19', '2018-11-21', '2018-11-21', '2019-01-18', '2019-01-18', '2019-02-10', '2019-02-10', '2019-03-16', '2019-03-16'), (68, 'Reza Putra', 'laki-laki', '2018-09-10', 'Maryati', 'Geulanggang Baro', '2018-09-10', '2018-10-19', '2018-10-19', '2018-10-19', '2018-11-21', '2018-11-21', '2019-01-18', '2019-01-18', '2019-02-10', '2019-02-10', '2019-03-16', '2019-03-16'), (69, 'Rafie Pratama', 'laki-laki', '2018-11-02', 'Tri Pujianti', 'Geulanggang Baro', '2018-11-02', '2018-11-21', '2018-11-21', '2018-12-18', '2018-12-18', '2018-12-18', '2019-01-18', '2019-01-18', '2019-02-10', '2019-02-10', '2019-03-16', '2019-03-16'), (70, 'M. Ramadhan', 'laki-laki', '2019-05-21', 'Sri Wildawati', 'Blang Tingkeum', '2019-05-22', '2019-06-19', '2019-06-19', '2019-07-12', '2019-07-12', '2019-08-16', '2019-08-16', '2019-10-15', '2019-10-15', '0000-00-00', '2020-02-12', '0000-00-00'), (71, 'Shifra Salsabila', 'perempuan', '2019-06-12', 'Emi Rossa', 'Blang Tingkeum', '2019-06-12', '2019-06-19', '2019-06-19', '0000-00-00', '2019-08-16', '0000-00-00', '2019-09-13', '0000-00-00', '2020-01-15', '0000-00-00', '0000-00-00', '0000-00-00'), (72, 'Nabila Fazilla', 'perempuan', '2019-06-20', 'Dewi Fazilla', 'Blang Tingkeum', '2019-06-24', '2019-07-12', '2019-07-12', '2019-08-16', '2019-08-12', '2019-09-13', '2019-10-15', '2019-12-13', '2019-12-13', '0000-00-00', '0000-00-00', '0000-00-00'), (73, 'Aulia Izzati', 'perempuan', '2019-08-20', 'Bariarti', 'Blang Tingkeum', '2019-08-21', '2019-09-13', '2019-09-13', '2019-11-13', '2019-11-13', '2020-01-15', '2020-01-15', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (74, 'Aska Sidqi', 'laki-laki', '2019-08-20', 'Sumarni', 'Blang Tingkeum', '2019-08-21', '2019-09-13', '2019-09-13', '2019-11-13', '2019-11-13', '2020-01-15', '2020-01-15', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (75, 'M. Riski', 'laki-laki', '2019-10-04', 'Rara Amanda', 'Blang Tingkeum', '2019-10-05', '2019-12-13', '2019-12-13', '2020-02-12', '2020-02-12', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (76, 'Nabila Safira', 'perempuan', '2019-11-15', 'Mawarni', 'Blang Tingkeum', '2019-11-16', '2019-12-13', '2019-12-13', '2020-02-12', '2020-02-12', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (77, 'M. Bilal', 'laki-laki', '2019-11-15', 'Jumiana', 'Blang Tingkeum', '2019-11-16', '2020-01-20', '2020-02-20', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (78, 'Aisya Salsabila', 'perempuan', '2020-02-01', 'Eva Fara Mutia', 'Blang Tingkeum', '2020-02-03', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '2019-10-15', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (79, 'Bayi Fitri', 'laki-laki', '2020-02-01', 'Fitri Eliza', 'Blang Tingkeum', '2020-02-03', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (80, 'M. Qaisan', 'laki-laki', '2019-04-14', 'Elliza', 'Meunasah Blang', '2019-04-14', '2019-05-08', '2019-05-08', '2019-06-12', '2019-06-12', '2019-07-08', '2019-07-08', '2019-08-07', '2019-08-07', '2019-09-07', '2020-01-08', '2020-01-08'), (81, 'Gebrina Herlanda', 'perempuan', '2019-05-02', 'Yusmeliza', 'Meunasah Blang', '2019-05-02', '2019-05-08', '2019-05-08', '2019-06-12', '2019-06-12', '2019-07-08', '2019-07-08', '2019-08-07', '2019-08-07', '2019-09-07', '2020-01-08', '2020-01-08'), (82, 'M. Ikram', 'laki-laki', '2019-05-15', 'Yusnidar', 'Meunasah Blang', '2019-05-16', '2019-06-12', '2019-06-12', '2019-07-08', '2019-07-08', '2019-07-08', '2019-07-08', '2019-08-07', '2019-08-07', '2019-09-07', '0000-00-00', '0000-00-00'), (83, 'Akif', 'laki-laki', '2019-05-15', 'Lailawati', 'Meunasah Blang', '2019-05-16', '2019-06-12', '2019-06-12', '2019-07-08', '2019-07-08', '2019-07-08', '2019-07-08', '2019-08-07', '2019-08-07', '2019-09-07', '2020-02-16', '2020-02-16'), (84, 'Syecha', 'perempuan', '2019-05-12', 'Raudhatul', 'Meunasah Blang', '2019-05-13', '2019-06-12', '2019-06-12', '2019-07-08', '2019-07-08', '2019-07-08', '2019-07-08', '2019-08-07', '2019-08-07', '2019-09-07', '0000-00-00', '0000-00-00'), (85, 'Malik Ibrahim', 'laki-laki', '2019-03-19', 'Desrina ', 'Meunasah Blang', '2019-03-20', '2019-04-14', '2019-05-08', '2019-06-12', '2019-06-12', '2019-07-08', '2019-07-08', '2019-08-07', '2019-08-07', '0000-00-00', '0000-00-00', '0000-00-00'), (86, 'M. Hilal', 'laki-laki', '2019-06-10', 'Rahmani', 'Meunasah Blang', '2019-06-10', '2019-07-08', '2019-07-08', '2019-07-08', '2019-08-07', '2019-08-07', '2019-09-07', '2019-09-07', '2019-10-07', '2019-10-07', '0000-00-00', '0000-00-00'), (87, 'Hifza Annasya', 'perempuan', '2019-06-21', 'Yulia Fauza', 'Meunasah Blang', '2019-06-21', '2019-07-08', '2019-07-08', '2019-07-08', '2019-08-07', '2019-08-07', '2019-09-07', '2019-09-07', '2019-10-07', '2019-10-07', '0000-00-00', '0000-00-00'), (88, 'M. Rafi', 'laki-laki', '2019-06-07', 'Suryani', 'Meunasah Blang', '2019-06-07', '2019-07-08', '2019-07-08', '2019-07-08', '2019-08-07', '2019-08-07', '2019-09-07', '2019-09-07', '2019-10-07', '2019-10-07', '0000-00-00', '0000-00-00'), (89, 'Bayi Rizayani', 'perempuan', '2020-06-02', 'Rizayani', 'Meunasah Blang', '2019-06-03', '2019-07-08', '2019-07-08', '2019-07-08', '2019-08-07', '2019-08-07', '2019-09-07', '2019-09-07', '2019-10-07', '2019-10-07', '0000-00-00', '0000-00-00'), (90, 'Zulaikha', 'perempuan', '2019-04-14', 'Nurul Aulia', 'Geulanggang Gampong', '2019-04-14', '2019-05-08', '2019-05-08', '2019-06-12', '2019-06-12', '2019-07-08', '2019-07-08', '2019-08-07', '2019-08-07', '2019-09-07', '2020-01-08', '2020-01-08'), (91, 'Ahmad', 'laki-laki', '2019-05-02', 'Trisna Hayati', 'Geulanggang Gampong', '2019-05-02', '2019-05-08', '2019-05-08', '2019-06-12', '2019-06-12', '2019-07-08', '2019-07-08', '2019-08-07', '2019-08-07', '2019-09-07', '2020-01-08', '2020-01-08'), (92, 'Naura Rania', 'perempuan', '2019-05-15', 'Ajirni', 'Geulanggang Gampong', '2019-05-16', '2019-06-12', '2019-06-12', '2019-07-08', '2019-07-08', '2019-07-08', '2019-07-08', '2019-08-07', '2019-08-07', '2019-09-07', '0000-00-00', '0000-00-00'), (93, 'Noratul Husna', 'perempuan', '2019-05-15', 'Ernita', 'Geulanggang Gampong', '2019-05-16', '2019-06-12', '2019-06-12', '2019-07-08', '2019-07-08', '2019-07-08', '2019-07-08', '2019-08-07', '2019-08-07', '2019-09-07', '2020-02-16', '2020-02-16'), (94, 'M. Rizki', 'laki-laki', '2019-05-12', 'Sura Rosa', 'Geulanggang Gampong', '2019-05-13', '2019-06-12', '2019-06-12', '2019-07-08', '2019-07-08', '2019-07-08', '2019-07-08', '2019-08-07', '2019-08-07', '2019-09-07', '0000-00-00', '0000-00-00'), (95, 'Arisha', 'perempuan', '2019-03-19', 'Tursina', 'Geulanggang Gampong', '2019-03-20', '2019-04-14', '2019-05-08', '2019-06-12', '2019-06-12', '2019-07-08', '2019-07-08', '2019-08-07', '2019-08-07', '0000-00-00', '0000-00-00', '0000-00-00'), (96, 'Yusuf Habibi', 'laki-laki', '2019-06-10', 'Nurlaili', 'Geulanggang Gampong', '2019-06-10', '2019-07-08', '2019-07-08', '2019-07-08', '2019-08-07', '2019-08-07', '2019-09-07', '2019-09-07', '2019-10-07', '2019-10-07', '0000-00-00', '0000-00-00'), (97, 'Razzan', 'laki-laki', '2019-06-21', 'Marziati', 'Geulanggang Gampong', '2019-06-21', '2019-07-08', '2019-07-08', '2019-07-08', '2019-08-07', '2019-08-07', '2019-09-07', '2019-09-07', '2019-10-07', '2019-10-07', '0000-00-00', '0000-00-00'), (98, 'Aqifa Naila', 'perempuan', '2019-06-07', 'Mairiani', 'Geulanggang Gampong', '2019-06-07', '2019-07-08', '2019-07-08', '2019-07-08', '2019-08-07', '2019-08-07', '2019-09-07', '2019-09-07', '2019-10-07', '2019-10-07', '0000-00-00', '0000-00-00'), (99, 'Salsabila', 'perempuan', '2020-06-02', 'Mutia', 'Geulanggang Gampong', '2019-06-03', '2019-07-08', '2019-07-08', '2019-07-08', '2019-08-07', '2019-08-07', '2019-09-07', '2019-09-07', '2019-10-07', '2019-10-07', '0000-00-00', '0000-00-00'), (100, 'Syafa Humaina', 'perempuan', '2019-04-27', 'Fatimah Zahara', 'Geudong-geudong', '2019-04-24', '2019-07-19', '2019-07-19', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '2020-01-18', '0000-00-00'), (101, 'Afifa Syahira', 'perempuan', '2019-05-30', 'Nilawati', 'Geudong-geudong', '2019-05-30', '2019-07-19', '2019-07-19', '2019-11-19', '2019-11-19', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (102, 'Muhammad Alfatih', 'laki-laki', '2019-06-13', 'Murniati', 'Geudong-geudong', '2019-06-13', '2019-08-21', '2019-08-21', '2019-09-20', '0000-00-00', '2019-11-19', '2019-11-19', '2019-12-20', '2019-12-20', '0000-00-00', '0000-00-00', '0000-00-00'), (103, 'M. Rizki', 'laki-laki', '2019-07-23', 'Sri Imelda', 'Geudong-geudong', '2019-07-23', '2019-08-21', '2019-08-21', '2019-09-20', '0000-00-00', '2019-11-19', '2019-11-19', '2019-12-20', '2019-12-20', '0000-00-00', '0000-00-00', '0000-00-00'), (104, 'M. Zain', 'laki-laki', '2019-06-28', 'Risna Riyanti', 'Geudong-geudong', '2019-06-28', '2019-08-21', '2019-08-21', '2019-09-20', '2019-09-20', '2019-11-19', '2019-11-19', '2019-12-20', '2019-12-20', '0000-00-00', '0000-00-00', '0000-00-00'), (105, 'Aqsa', 'laki-laki', '2019-08-07', 'Herliana', 'Geudong-geudong', '2019-08-07', '2019-09-20', '2019-09-20', '2019-10-20', '2019-10-20', '2019-11-19', '2019-11-19', '2019-12-20', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (106, 'Salsabila Putri', 'perempuan', '2019-08-07', 'Husna', 'Geudong-geudong', '2019-08-07', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (107, 'Naufal', 'laki-laki', '2019-09-14', 'Risti', 'Geudong-geudong', '2019-09-14', '2019-10-20', '2019-10-20', '2019-11-19', '2019-11-19', '2019-12-20', '2019-12-20', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (108, 'Sarah', 'perempuan', '2019-08-27', 'Fitria Syahwal', 'Geudong-geudong', '2019-08-27', '2019-09-20', '2019-10-20', '2019-11-19', '2019-11-19', '2019-12-20', '2019-12-20', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (109, 'Zaskia Amania', 'perempuan', '2019-08-26', 'Imazul Hima', 'Geudong-geudong', '2019-08-26', '2019-11-19', '2019-11-19', '2019-12-20', '2019-12-20', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (110, 'Syamil', 'laki-laki', '2018-12-03', 'Khairunnisa', 'Meunasah Capa', '2018-12-04', '2019-01-23', '2019-01-23', '2019-04-16', '2019-05-18', '2019-05-18', '2019-06-22', '2019-06-22', '2019-07-17', '2019-07-17', '2019-10-19', '2019-10-19'), (111, 'Rarda Khadijah', 'perempuan', '2019-01-18', 'Kartika', 'Meunasah Capa', '2019-01-18', '2019-02-19', '2019-02-19', '2019-04-16', '2019-05-18', '2019-05-18', '2019-06-22', '2019-06-22', '2019-07-17', '2019-07-17', '2019-10-19', '2019-10-19'), (112, 'Sabrina', 'perempuan', '2019-02-16', 'Una Agustina', 'Meunasah Capa', '2019-02-17', '2019-04-16', '2019-04-16', '2019-04-16', '2019-05-18', '2019-05-18', '2019-06-22', '2019-06-22', '2019-07-17', '2019-07-17', '2019-10-19', '2019-10-19'), (113, 'Oemal Hamzah', 'perempuan', '2019-01-22', 'Rahmil Izza', 'Meunasah Capa', '2019-01-22', '2019-02-19', '2019-02-19', '2019-04-16', '2019-05-18', '2019-05-18', '2019-06-22', '2019-06-22', '2019-07-17', '2019-07-17', '2019-10-19', '2019-10-19'), (114, 'T. Daffa', 'laki-laki', '2019-03-11', 'Cut Putri', 'Meunasah Capa', '2019-03-12', '2019-04-16', '2019-04-16', '2019-04-16', '2019-05-18', '2019-05-18', '2019-06-22', '2019-06-22', '2019-07-17', '2019-07-17', '2019-10-19', '2019-10-19'), (115, 'Khalil Safian', 'laki-laki', '2019-02-21', 'Elsa', 'Meunasah Capa', '2019-02-22', '2019-04-16', '2019-04-16', '2019-04-16', '2019-05-18', '2019-05-18', '2019-06-22', '2019-06-22', '2019-07-17', '2019-07-17', '2019-10-19', '2019-10-19'), (116, 'M. Rohit', 'laki-laki', '2019-02-21', 'Putri Oktaviani', 'Meunasah Capa', '2019-02-22', '2019-04-16', '2019-04-16', '2019-04-16', '2019-05-18', '2019-05-18', '2019-06-22', '2019-06-22', '2019-07-17', '2019-07-17', '2019-10-19', '2019-10-19'), (117, 'Fadil', 'laki-laki', '2019-03-09', 'Fauziah', 'Meunasah Capa', '2019-03-10', '2019-04-16', '2019-04-16', '2019-04-16', '2019-05-18', '2019-05-18', '2019-06-22', '2019-06-22', '2019-07-17', '2019-07-17', '2019-10-19', '2019-10-19'), (118, 'Erika Dara Fonna', 'perempuan', '2019-04-12', 'Asmawati', 'Meunasah Capa', '2019-04-12', '2019-05-18', '2019-05-18', '2019-05-18', '2019-06-22', '2019-06-22', '2019-07-17', '2019-07-17', '2019-08-21', '2019-08-21', '2019-10-19', '2019-10-19'), (119, 'Putri Dara Fonna', 'perempuan', '2019-04-22', 'Nora', 'Meunasah Capa', '2019-04-22', '2019-05-18', '2019-05-18', '2019-05-18', '2019-06-22', '2019-06-22', '2019-07-17', '2019-07-17', '2019-08-21', '2019-08-21', '2019-10-19', '2019-10-19'), (120, 'Qanitha Hafiza', 'perempuan', '2018-12-10', 'Fitriyani', 'Lhok Awe Teungoh', '2018-12-11', '2019-02-06', '2019-02-06', '2019-03-05', '2019-03-05', '2019-04-05', '2019-04-05', '2019-06-11', '2019-06-11', '0000-00-00', '2019-11-05', '0000-00-00'), (121, 'Khairul Azzahdi', 'laki-laki', '2018-12-15', 'Suryani', 'Lhok Awe Teungoh', '2018-12-16', '2019-02-06', '2019-02-06', '2019-03-05', '2019-03-05', '2019-04-05', '2019-04-05', '2019-06-11', '2019-06-11', '0000-00-00', '2019-11-05', '0000-00-00'), (122, 'Fitri Azizah', 'perempuan', '2018-12-20', 'Safati', 'Lhok Awe Teungoh', '2018-12-21', '2019-02-06', '2019-02-06', '2019-03-05', '2019-03-05', '2019-04-05', '2019-04-05', '2019-06-11', '2019-06-11', '0000-00-00', '2019-11-05', '0000-00-00'), (123, 'M. Fadhil', 'laki-laki', '2019-01-01', 'Nurasma', 'Lhok Awe Teungoh', '2019-01-02', '2019-03-05', '2019-03-05', '2019-04-05', '2019-04-05', '2019-05-07', '2019-05-07', '2019-06-11', '2019-06-11', '0000-00-00', '2019-11-05', '0000-00-00'), (124, 'Siti Mulyana', 'perempuan', '2019-01-05', 'Sakdiah', 'Lhok Awe Teungoh', '2019-01-06', '2019-03-05', '2019-03-05', '2019-04-05', '2019-04-05', '2019-05-07', '2019-05-07', '2019-06-11', '2019-06-11', '0000-00-00', '2019-12-05', '0000-00-00'), (125, 'Zikril Maula', 'perempuan', '2019-01-10', 'Rini', 'Lhok Awe Teungoh', '2019-01-16', '2019-03-05', '2019-03-05', '2019-04-05', '2019-04-05', '2019-05-07', '2019-05-07', '2019-06-11', '2019-06-11', '0000-00-00', '2019-12-06', '0000-00-00'), (126, 'Ahmad Affar', 'laki-laki', '2019-01-15', 'Fitri', 'Lhok Awe Teungoh', '2019-01-16', '2019-03-05', '2019-03-05', '2019-04-05', '2019-04-05', '2019-05-07', '2019-05-07', '2019-06-11', '2019-06-11', '0000-00-00', '2019-12-06', '0000-00-00'), (127, 'C. Najla', 'perempuan', '2019-01-16', 'Irna', 'Lhok Awe Teungoh', '2019-01-17', '2019-03-05', '2019-03-05', '2019-04-05', '2019-04-05', '2019-05-07', '2019-05-07', '2019-06-11', '2019-06-11', '0000-00-00', '2019-12-06', '0000-00-00'), (128, 'M. Farhan A', 'laki-laki', '2019-02-02', 'Fitri', 'Lhok Awe Teungoh', '2019-02-06', '2019-03-05', '2019-03-05', '2019-04-05', '2019-04-05', '2019-05-07', '2019-05-07', '2019-06-11', '2019-06-11', '0000-00-00', '2019-12-06', '0000-00-00'), (129, 'Alvin', 'laki-laki', '2019-03-02', 'Nilawati', 'Lhok Awe Teungoh', '2019-03-03', '2019-05-07', '2019-05-07', '2019-05-07', '2019-06-11', '2019-06-11', '2019-07-05', '2019-07-05', '2019-08-06', '0000-00-00', '2019-12-06', '0000-00-00'), (130, 'Lukman Hakim', 'laki-laki', '2019-03-02', 'Sri Wahyuni', 'Lhok Awe Teungoh', '2019-03-03', '2019-05-07', '2019-05-07', '2019-05-07', '2019-06-11', '2019-06-11', '2019-07-05', '2019-07-05', '2019-08-06', '0000-00-00', '2019-12-06', '0000-00-00'), (131, 'Annis H', 'perempuan', '2019-03-02', 'Rini', 'Lhok Awe Teungoh', '2019-03-03', '2019-05-07', '2019-05-07', '2019-05-07', '2019-06-11', '2019-06-11', '2019-07-05', '2019-07-05', '2019-08-06', '0000-00-00', '2019-12-06', '0000-00-00'), (132, 'Siti Fatimah', 'perempuan', '2019-03-02', 'Nurasma', 'Lhok Awe Teungoh', '2019-03-03', '2019-05-07', '2019-05-07', '2019-05-07', '2019-06-11', '2019-06-11', '2019-07-05', '2019-07-05', '2019-08-06', '0000-00-00', '2019-12-06', '0000-00-00'), (133, 'Alesa', 'perempuan', '2018-12-15', 'Nur Annalia', 'Lhok Awe Teungoh', '2018-12-16', '2019-02-06', '2019-02-06', '2019-03-05', '2019-03-05', '2019-04-05', '2019-04-05', '2019-06-11', '2019-06-11', '0000-00-00', '2019-11-05', '0000-00-00'), (134, 'Salman Alfarisi', 'laki-laki', '2018-12-15', 'Zuraida', 'Lhok Awe Teungoh', '2018-12-16', '2019-02-06', '2019-02-06', '2019-03-05', '2019-03-05', '2019-04-05', '2019-04-05', '2019-06-11', '2019-06-11', '0000-00-00', '2019-11-05', '0000-00-00'), (135, 'Cut Fahira', 'perempuan', '2018-12-15', 'Lusiana', 'Lhok Awe Teungoh', '2018-12-16', '2019-02-06', '2019-02-06', '2019-03-05', '2019-03-05', '2019-04-05', '2019-04-05', '2019-06-11', '2019-06-11', '0000-00-00', '2019-11-05', '0000-00-00'), (136, 'Fitri Azizah', 'perempuan', '2018-12-15', 'Sakdiah', 'Lhok Awe Teungoh', '2018-12-16', '2019-02-06', '2019-02-06', '2019-03-05', '2019-03-05', '2019-04-05', '2019-04-05', '2019-06-11', '2019-06-11', '0000-00-00', '2019-11-05', '0000-00-00'), (137, 'Azkia Maysyura', 'perempuan', '2018-12-15', 'Siti Sundari', 'Lhok Awe Teungoh', '2018-12-16', '2019-02-06', '2019-02-06', '2019-03-05', '2019-03-05', '2019-04-05', '2019-04-05', '2019-06-11', '2019-06-11', '0000-00-00', '2019-11-05', '0000-00-00'), (138, 'M. Jamal', 'laki-laki', '2018-12-15', 'Mardhiah', 'Lhok Awe Teungoh', '2018-12-16', '2019-02-06', '2019-02-06', '2019-03-05', '2019-03-05', '2019-04-05', '2019-04-05', '2019-06-11', '2019-06-11', '0000-00-00', '2019-11-05', '0000-00-00'), (139, 'Siti Naryam', 'perempuan', '2018-12-15', 'Nurlaili', 'Lhok Awe Teungoh', '2018-12-16', '2019-02-06', '2019-02-06', '2019-03-05', '2019-03-05', '2019-04-05', '2019-04-05', '2019-06-11', '2019-06-11', '0000-00-00', '2019-11-05', '0000-00-00'), (140, 'M. Arif', 'laki-laki', '2018-12-15', 'Nisfa M', 'Lhok Awe Teungoh', '2018-12-16', '2019-02-06', '2019-02-06', '2019-03-05', '2019-03-05', '2019-04-05', '2019-04-05', '2019-06-11', '2019-06-11', '0000-00-00', '2019-11-05', '0000-00-00'), (141, 'T. Azko f', 'laki-laki', '2018-12-15', 'Hernita', 'Lhok Awe Teungoh', '2018-12-16', '2019-02-06', '2019-02-06', '2019-03-05', '2019-03-05', '2019-04-05', '2019-04-05', '2019-06-11', '2019-06-11', '0000-00-00', '2019-11-05', '0000-00-00'), (142, 'M. Karim', 'laki-laki', '2018-12-15', 'Nuraina', 'Lhok Awe Teungoh', '2018-12-16', '2019-02-06', '2019-02-06', '2019-03-05', '2019-03-05', '2019-04-05', '2019-04-05', '2019-06-11', '2019-06-11', '0000-00-00', '2019-11-05', '0000-00-00'), (143, 'A. Zahara', 'perempuan', '2018-12-15', 'Theysa', 'Lhok Awe Teungoh', '2018-12-16', '2019-02-06', '2019-02-06', '2019-03-05', '2019-03-05', '2019-04-05', '2019-04-05', '2019-06-11', '2019-06-11', '0000-00-00', '2019-11-05', '0000-00-00'), (144, 'T. Sultan', 'laki-laki', '2018-12-15', 'Zahara', 'Lhok Awe Teungoh', '2018-12-16', '2019-02-06', '2019-02-06', '2019-03-05', '2019-03-05', '2019-04-05', '2019-04-05', '2019-06-11', '2019-06-11', '2019-11-05', '0000-00-00', '0000-00-00'), (145, 'Azuhra Faira', 'perempuan', '2018-12-15', 'Ismalita', 'Lhok Awe Teungoh', '2018-12-16', '2019-02-06', '2019-02-06', '2019-03-05', '2019-03-05', '2019-04-05', '2019-04-05', '2019-06-11', '2019-06-11', '2019-11-05', '0000-00-00', '0000-00-00'), (146, 'Muhammad Nabil', 'laki-laki', '2018-12-15', 'Siti Fatimah', 'Lhok Awe Teungoh', '2018-12-16', '2019-02-06', '2019-02-06', '2019-03-05', '2019-03-05', '2019-04-05', '2019-04-05', '2019-06-11', '2019-06-11', '2019-11-05', '0000-00-00', '0000-00-00'), (147, 'Afkarul Latif', 'laki-laki', '2018-12-15', 'Susanti', 'Lhok Awe Teungoh', '2018-12-16', '2019-02-06', '2019-02-06', '2019-03-05', '2019-03-05', '2019-04-05', '2019-04-05', '2019-06-11', '2019-06-11', '2019-11-05', '0000-00-00', '0000-00-00'), (148, 'Zaki M. Latif', 'laki-laki', '2018-12-15', 'Fadzilah', 'Lhok Awe Teungoh', '2018-12-16', '2019-02-06', '2019-02-06', '2019-03-05', '2019-03-05', '2019-04-05', '2019-04-05', '2019-06-11', '2019-06-11', '2019-11-05', '0000-00-00', '0000-00-00'), (149, 'Raja Alzikri', 'laki-laki', '2018-12-15', 'Mariana', 'Lhok Awe Teungoh', '2018-12-16', '2019-02-06', '2019-02-06', '2019-03-05', '2019-03-05', '2019-04-05', '2019-04-05', '2019-06-11', '2019-06-11', '2019-11-05', '0000-00-00', '0000-00-00'), (150, 'Syifa Anida', 'perempuan', '2018-12-15', 'Yovi', 'Lhok Awe Teungoh', '2018-12-16', '2019-02-06', '2019-02-06', '2019-03-05', '2019-03-05', '2019-04-05', '2019-04-05', '2019-06-11', '2019-06-11', '2019-11-05', '0000-00-00', '0000-00-00'), (151, 'M. Raffa', 'laki-laki', '2018-03-10', 'Tia Wardani', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (152, 'Asyifa', 'perempuan', '2018-03-10', 'Nurmala', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (153, 'Dina Mustia', 'perempuan', '2018-03-10', 'Aisyah', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (154, 'Tisya', 'perempuan', '2018-03-10', 'Anita', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (155, 'Haifa', 'perempuan', '2018-03-10', 'Herawati', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (156, 'Nabil Alfatih', 'laki-laki', '2018-03-10', 'Farida', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (157, 'M. Abu Bakar', 'laki-laki', '2018-03-10', 'Irawati', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (158, 'Alkhalifin', 'laki-laki', '2018-03-10', 'Susi', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (159, 'Abizar', 'laki-laki', '2018-03-10', 'Zuraida', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (160, 'Elea Azzahra', 'perempuan', '2018-03-10', 'Ratna', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (161, 'Nabihan Khaliq', 'laki-laki', '2018-03-10', 'Elinawati', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (162, 'Eileen Farishta', 'perempuan', '2018-03-10', 'Maysarah', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (163, 'Asrafa', 'laki-laki', '2018-03-10', 'Syafiani', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (164, 'Raida Shabira', 'perempuan', '2018-03-10', 'Wulan Nindira', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (165, 'M. Gibhran', 'laki-laki', '2018-03-10', 'Puji Kusuma', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (166, 'Rafardhan', 'laki-laki', '2018-03-10', 'Yani', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (167, 'Cut Kayla', 'perempuan', '2018-03-10', 'Sri Mahdalena', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (168, 'Ahza Alfareqi', 'laki-laki', '2018-03-10', 'Riska', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (169, 'Wilona', 'perempuan', '2018-03-10', 'Intan', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (170, 'Abdul Zaid', 'laki-laki', '2018-03-10', 'Erlinda', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (171, 'M. Ghaffar', 'laki-laki', '2018-03-10', 'Dara Yana', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (172, 'Raiza', 'laki-laki', '2018-03-10', 'Nurazni', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (173, 'Arkhan', 'laki-laki', '2018-03-10', 'Kartini', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (174, 'Syifa Nazira', 'perempuan', '2018-03-10', 'Sarida', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (175, 'Teuku Zafran', 'laki-laki', '2018-03-10', 'Refnita', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (176, 'Shanum', 'perempuan', '2018-03-10', 'Nenden', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (177, 'Manfa', 'laki-laki', '2018-03-10', 'Juniarti', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (178, 'Bayi Rinawati', 'perempuan', '2018-03-10', 'Rinawati', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (179, 'Bayi Fauziah', 'laki-laki', '2018-03-10', 'Fauziah', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (180, 'Bayi Sartika', 'laki-laki', '2018-03-10', 'Sartika', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (181, 'Bayi Elfrada', 'laki-laki', '2018-03-10', 'Elfrada', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (182, 'Bayi Tuti Liana', 'laki-laki', '2018-03-10', 'Tuti Liana', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (183, 'Bayi Nanda Kirana', 'laki-laki', '2018-03-10', 'Nanda Kirana', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (184, 'Bayi Rosmita', 'perempuan', '2018-03-10', 'Rosmita', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (185, 'Bayi Nirmala', 'laki-laki', '2018-03-10', 'Nirmala', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (186, 'Bayi Nila Kusuma', 'perempuan', '2018-03-10', 'Nila Kusuma', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (187, 'Aditama', 'laki-laki', '2018-03-10', 'Sari', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (188, 'Bayi Hasminal', 'laki-laki', '2018-03-10', 'Hasminal', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (189, 'Bayi Nova Delia', 'laki-laki', '2018-03-10', 'Nova Delia', 'Bandar Bireuen 1', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (190, 'Hifza Rumaisha', 'perempuan', '2018-03-10', 'Akmalia', 'BTN', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (191, 'Ibrahim Hajid', 'laki-laki', '2018-03-10', 'Eva', 'BTN', '2018-03-13', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '2018-07-13', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (192, 'Syamila', 'perempuan', '2018-03-10', 'Miyem', 'BTN', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (193, 'Nazra Salwa', 'perempuan', '2018-03-10', 'Mira Tania', 'BTN', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '0000-00-00', '2018-12-15', '0000-00-00'), (194, 'M. Aulia Fatih', 'laki-laki', '2018-03-10', 'Heri Nadia', 'BTN', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '0000-00-00', '2018-12-15', '0000-00-00'), (195, 'M. Rizky', 'laki-laki', '2018-03-10', 'Ulyana', 'BTN', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '0000-00-00', '2018-12-15', '0000-00-00'), (196, 'M. Alfatah', 'laki-laki', '2018-03-10', 'Hidayah', 'BTN', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '0000-00-00', '0000-00-00', '0000-00-00', '2018-12-15', '0000-00-00'), (197, 'Hafiza', 'perempuan', '2018-03-10', 'Nova Riskia', 'BTN', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '0000-00-00', '2018-12-15', '0000-00-00'), (198, 'Aisya Ayunda', 'perempuan', '2018-03-10', 'Suwarni', 'BTN', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '0000-00-00', '2018-12-15', '0000-00-00'), (199, 'M. Alghazali', 'laki-laki', '2018-03-10', 'Dewi', 'BTN', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (200, 'Nafika', 'perempuan', '2018-03-10', 'Nurlaili', 'BTN', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (201, 'Haura', 'perempuan', '2018-03-10', 'Reva', 'BTN', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '0000-00-00', '0000-00-00'), (202, 'Arinal', 'laki-laki', '2018-03-10', 'Cut', 'BTN', '2018-03-13', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (203, 'Tiara', 'perempuan', '2018-03-10', 'Hasmanidar', 'BTN', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (204, 'M. Arsyad', 'laki-laki', '2018-03-10', 'Anggun', 'BTN', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (205, 'Mubaraq', 'laki-laki', '2018-03-10', 'Raihan', 'BTN', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (206, 'Rafqi', 'laki-laki', '2018-03-10', 'Syamsiah', 'BTN', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (207, 'Bayi Susanti', 'perempuan', '2018-03-10', 'Susasnti', 'BTN', '2018-03-13', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (208, 'Bayi Cut Meutia', 'laki-laki', '2018-03-10', 'Cut Meutia', 'BTN', '2018-03-13', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (209, 'Alisya', 'perempuan', '2018-03-10', 'Deswita', 'BTN', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (210, 'Najwa Azkia', 'perempuan', '2018-03-10', 'Ainal Mardhiah', 'BTN', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (211, 'M. Rafif', 'laki-laki', '2018-03-10', 'Yenni', 'BTN', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (212, 'Arrayan', 'laki-laki', '2018-03-10', 'Najriah', 'BTN', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (213, 'Sultan', 'laki-laki', '2018-03-10', 'Nurakmal', 'BTN', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (214, 'Nashratunnisa', 'perempuan', '2018-03-10', 'Ida Wati', 'BTN', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (215, 'Cut Rania', 'perempuan', '2018-03-10', 'Cut Ria', 'BTN', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (216, 'Naura', 'perempuan', '2018-03-10', 'Anita', 'BTN', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '0000-00-00', '0000-00-00', '0000-00-00'), (217, 'Nayla', 'perempuan', '2018-03-10', 'Nasrah', 'BTN', '2018-03-13', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (218, 'Bayi Rina', 'perempuan', '2018-03-10', 'Rina', 'BTN', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (219, 'Cut Muzayinah', 'perempuan', '2018-03-10', 'Yunni', 'BTN', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (220, 'Sahira', 'perempuan', '2018-03-10', 'Fitria Ningsih', 'BTN', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (221, 'Uwais Alqarni', 'laki-laki', '2018-03-10', 'Susilawati', 'BTN', '2018-03-13', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (222, 'M. Azzam', 'laki-laki', '2018-03-10', 'Aida', 'BTN', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (223, 'Shilfara', 'perempuan', '2018-03-10', 'Sarita', 'BTN', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (224, 'Adam', 'laki-laki', '2018-03-10', 'Putri Hayati', 'BTN', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'); INSERT INTO `kotajuang` (`id_imunisasi`, `nama_bayi`, `jenis_kelamin`, `tanggal_lahir`, `nama_ortu`, `alamat`, `hb_0`, `bcg`, `pol_1`, `dpt_hb_hib_1`, `pol_2`, `dpt_hb_hib_2`, `pol_3`, `dpt_hb_hib_3`, `pol_4`, `ipv`, `campak`, `imunisasi_lengkap`) VALUES (225, 'M. Hazard', 'laki-laki', '2018-03-10', 'Aulia Rahmi', 'Cot Gapu', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (226, 'Cut Dina', 'perempuan', '2018-03-10', 'Hasliana', 'Cot Gapu', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (227, 'Naufal', 'laki-laki', '2018-03-10', 'Nurantiah', 'Cot Gapu', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (228, 'Mahatir', 'laki-laki', '2018-03-10', 'Yusrawati', 'Cot Gapu', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (229, 'M. Bilal', 'laki-laki', '2018-03-10', 'Maryamah', 'Cot Gapu', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (230, 'Zayyan', 'laki-laki', '2018-03-10', 'Mira', 'Cot Gapu', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (231, 'Raisya', 'perempuan', '2018-03-10', 'Juliana', 'Cot Gapu', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (232, 'M. Tanzil', 'laki-laki', '2018-03-10', 'Dahliana', 'Cot Gapu', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (233, 'Rifai', 'laki-laki', '2018-03-10', 'Rizka Fonna', 'Cot Gapu', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (234, 'Cut Putroe', 'perempuan', '2018-03-10', 'Cut Erna', 'Cot Gapu', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (235, 'Fadhil', 'laki-laki', '2018-03-10', 'Fatimah', 'Cot Gapu', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '0000-00-00', '2018-12-15', '0000-00-00'), (236, 'M. Afnan', 'laki-laki', '2018-03-10', 'Sekar Ayu', 'Cot Gapu', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '0000-00-00', '2018-12-15', '0000-00-00'), (237, 'Fayadh', 'laki-laki', '2018-03-10', 'Nasriah', 'Cot Gapu', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '0000-00-00', '2018-12-15', '0000-00-00'), (238, 'Erdogan', 'laki-laki', '2018-03-10', 'Dewi Rianti', 'Cot Gapu', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '0000-00-00', '0000-00-00', '0000-00-00', '2018-12-15', '0000-00-00'), (239, 'Hafiza', 'perempuan', '2018-03-10', 'Nova Riskia', 'Cot Gapu', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '0000-00-00', '2018-12-15', '0000-00-00'), (240, 'Aisya Ayunda', 'perempuan', '2018-03-10', 'Suwarni', 'Cot Gapu', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '0000-00-00', '2018-12-15', '0000-00-00'), (241, 'M. Alghazali', 'laki-laki', '2018-03-10', 'Dewi', 'Cot Gapu', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (242, 'Nafika', 'perempuan', '2018-03-10', 'Nurlaili', 'Cot Gapu', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (243, 'Haura', 'perempuan', '2018-03-10', 'Reva', 'Cot Gapu', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '0000-00-00', '0000-00-00'), (244, 'Tiara', 'perempuan', '2018-03-10', 'Hasmanidar', 'Cot Gapu', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (245, 'M. Arsyad', 'laki-laki', '2018-03-10', 'Anggun', 'Cot Gapu', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (246, 'Mubaraq', 'laki-laki', '2018-03-10', 'Raihan', 'Cot Gapu', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (247, 'Rafqi', 'laki-laki', '2018-03-10', 'Syamsiah', 'Cot Gapu', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (248, 'Alisya', 'perempuan', '2018-03-10', 'Deswita', 'Cot Gapu', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (249, 'Najwa Azkia', 'perempuan', '2018-03-10', 'Ainal Mardhiah', 'Cot Gapu', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (250, 'M. Rafif', 'laki-laki', '2018-03-10', 'Yenni', 'Cot Gapu', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (251, 'Adhlan', 'laki-laki', '2018-03-10', 'Zahara', 'Cot Gapu', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (252, 'Eshal Marzia', 'perempuan', '2018-03-10', 'Cut Fitria', 'Cot Gapu', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (253, 'Cut Nada', 'perempuan', '2018-03-10', 'Nurhidayati', 'Cot Gapu', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (254, 'M. Altawaqal', 'laki-laki', '2018-03-10', 'Rozatil Ula', 'Cot Gapu', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (255, 'Naylatul', 'perempuan', '2018-03-10', 'Rosmiati', 'Cot Gapu', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (256, 'M. Altaf', 'laki-laki', '2018-03-10', 'Zuraida', 'Blang Reuling', '2018-03-13', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (257, 'Aida Putri', 'perempuan', '2018-03-10', 'Badriah', 'Blang Reuling', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (258, 'Rizky Arayyan', 'laki-laki', '2018-03-10', 'Andriani', 'Blang Reuling', '2018-03-13', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '2018-07-13', '0000-00-00', '0000-00-00', '2018-12-15', '0000-00-00'), (259, 'Nabila', 'perempuan', '2018-03-10', 'Nurhayati', 'Blang Reuling', '2018-03-13', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '2018-07-13', '0000-00-00', '0000-00-00', '2018-12-15', '0000-00-00'), (260, 'Putra Aqil', 'laki-laki', '2018-03-10', 'Asmarawati', 'Blang Reuling', '2018-03-13', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '2018-07-13', '0000-00-00', '0000-00-00', '2018-12-15', '0000-00-00'), (261, 'Raisatul Amira', 'perempuan', '2018-03-10', 'Miftahul', 'Blang Reuling', '2018-03-13', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '2018-07-13', '0000-00-00', '0000-00-00', '2018-12-15', '0000-00-00'), (262, 'M. Irfan', 'laki-laki', '2018-03-10', 'Nurul Rahmi', 'Blang Reuling', '2018-03-13', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '2018-07-13', '0000-00-00', '0000-00-00', '2018-12-15', '0000-00-00'), (263, 'Arfan Naufal', 'laki-laki', '2018-03-10', 'Jamilah', 'Blang Reuling', '2018-03-13', '2018-04-07', '2018-04-07', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '2018-07-13', '0000-00-00', '0000-00-00', '2018-12-15', '0000-00-00'), (264, 'Nauratul Najwa', 'perempuan', '2018-03-10', 'Nurlaili', 'Blang Reuling', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '0000-00-00', '2018-12-15', '0000-00-00'), (265, 'M. Arsyil', 'laki-laki', '2018-03-10', 'Yulidar', 'Blang Reuling', '2018-03-13', '0000-00-00', '0000-00-00', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '0000-00-00', '2018-12-15', '0000-00-00'), (266, 'Salman Farisi', 'laki-laki', '2018-03-10', 'Nursiah', 'Blang Reuling', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '0000-00-00', '0000-00-00', '2018-12-15', '0000-00-00'), (267, 'Aufa Ilhamdi', 'laki-laki', '2018-03-10', 'Nurhayati', 'Blang Reuling', '2018-03-13', '0000-00-00', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '0000-00-00', '0000-00-00', '0000-00-00', '2018-12-15', '0000-00-00'), (268, 'Nadia Fadilla', 'perempuan', '2018-03-10', 'Nurleli', 'Blang Reuling', '2018-03-13', '0000-00-00', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '0000-00-00', '0000-00-00', '0000-00-00', '2018-12-15', '0000-00-00'), (269, 'Raisa', 'perempuan', '2018-03-10', 'Jannaton', 'Blang Reuling', '2018-03-13', '2018-04-07', '0000-00-00', '2018-05-12', '2018-05-12', '2018-06-09', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (270, 'M. Ikram', 'laki-laki', '2018-03-10', 'Nurlina', 'Blang Reuling', '2018-03-13', '2018-04-07', '0000-00-00', '2018-05-12', '2018-05-12', '2018-06-09', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (271, 'M. Al Qusyari', 'laki-laki', '2018-03-10', 'Nurlaili', 'Blang Reuling', '2018-03-13', '2018-04-07', '0000-00-00', '2018-05-12', '2018-05-12', '2018-06-09', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (272, 'M. Afdhal', 'laki-laki', '2018-03-10', 'Yusrawati', 'Blang Reuling', '2018-03-13', '2018-04-07', '0000-00-00', '2018-05-12', '2018-05-12', '2018-06-09', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (273, 'Khairul Amri', 'laki-laki', '2018-03-10', 'Mariani', 'Blang Reuling', '2018-03-13', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (274, 'M. Alif', 'laki-laki', '2018-03-10', 'Nasriati', 'Blang Reuling', '2018-03-13', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (275, 'Malek Adam', 'laki-laki', '2018-03-10', 'Amelia', 'Gampong Baro', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '0000-00-00', '0000-00-00'), (276, 'Arsyila Putri', 'perempuan', '2018-03-10', 'Wardiani', 'Gampong Baro', '2018-03-13', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '0000-00-00'), (277, 'Latifa Humaira', 'perempuan', '2018-03-10', 'Mariani', 'Gampong Baro', '2018-03-13', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (278, 'M. Izzan Arrafiqi', 'laki-laki', '2018-03-10', 'Maulina Sari', 'Gampong Baro', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '0000-00-00', '2018-12-15', '0000-00-00'), (279, 'Annisa Humaira', 'perempuan', '2018-03-10', 'Yusma', 'Gampong Baro', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '0000-00-00', '2018-12-15', '0000-00-00'), (280, 'Habibi', 'laki-laki', '2018-03-10', 'Renni', 'Gampong Baro', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '0000-00-00', '2018-12-15', '0000-00-00'), (281, 'Abdul Malik', 'laki-laki', '2018-03-10', 'Vivi Amelia', 'Gampong Baro', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (282, 'M. Syibran', 'laki-laki', '2018-03-10', 'Ruaida', 'Gampong Baro', '2018-03-13', '2018-04-07', '2018-04-07', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (283, 'M. Ghibran', 'laki-laki', '2018-03-10', 'Fatrami', 'Gampong Baro', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (284, 'Faiqa Hayya', 'perempuan', '2018-03-10', 'Amirullah', 'Gampong Baro', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '0000-00-00', '0000-00-00', '0000-00-00'), (285, 'Shez Qiana', 'perempuan', '2018-03-10', 'Eva Rosali', 'Gampong Baro', '2018-03-13', '2018-04-07', '2018-04-07', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (286, 'M. ALhafidz', 'laki-laki', '2018-03-10', 'Feni Ferdia', 'Gampong Baro', '2018-03-13', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00', '0000-00-00'), (287, 'Freya Mahren', 'perempuan', '2018-03-10', 'Nova Mauliza', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (288, 'Alifa Aisyah', 'perempuan', '2018-03-10', 'Fahrunnisa', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (289, 'Siti Aisyah', 'perempuan', '2018-03-10', 'Nurjihan', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (290, 'Khanza Almera', 'perempuan', '2018-03-10', 'Hasnani', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (291, 'T. Arkhan', 'laki-laki', '2018-03-10', 'Melizar', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (292, 'M. Kenzi', 'laki-laki', '2018-03-10', 'Olivia', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '0000-00-00', '2018-12-15', '0000-00-00'), (293, 'Bayi Isnur', 'laki-laki', '2018-03-10', 'Isnur', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '0000-00-00', '2018-12-15', '0000-00-00'), (294, 'Alaysa', 'perempuan', '2018-03-10', 'Cut Elvi', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '0000-00-00', '2018-12-15', '0000-00-00'), (295, 'M. Zabir Jifran', 'laki-laki', '2018-03-10', 'Mina Lusiana', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '0000-00-00', '0000-00-00', '0000-00-00', '2018-12-15', '0000-00-00'), (296, 'M. Salman Alfarisi', 'laki-laki', '2018-03-10', 'Lina', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '0000-00-00', '2018-12-15', '0000-00-00'), (297, 'Syafalia', 'perempuan', '2018-03-10', 'Rahmayani', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '0000-00-00', '2018-12-15', '0000-00-00'), (298, 'Bayi Yuli', 'perempuan', '2018-03-10', 'Yuli Fitria', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (299, 'Azkadina Syahira', 'perempuan', '2018-03-10', 'Muazzimah', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (300, 'M. Aithan', 'laki-laki', '2018-03-10', 'Nurlaili', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '0000-00-00', '0000-00-00'), (301, 'Haura Mafaza', 'perempuan', '2018-03-10', 'Marlina', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (302, 'Bayi Iqwana', 'perempuan', '2018-03-10', 'Iqwana', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (303, 'Danis Lutfan', 'laki-laki', '2018-03-10', 'Irmalinda', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (304, 'Bayi Irma', 'perempuan', '2018-03-10', 'Irmahayati', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (305, 'Azkia', 'perempuan', '2018-03-10', 'Marzalena', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '0000-00-00', '2018-12-15', '0000-00-00'), (306, 'Fathan', 'laki-laki', '2018-03-10', 'Fera Yulianti', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '0000-00-00', '0000-00-00', '0000-00-00', '2018-12-15', '0000-00-00'), (307, 'Bayi Maya', 'perempuan', '2018-03-10', 'Maya Sofia', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '0000-00-00', '2018-12-15', '0000-00-00'), (308, 'Fairul Azzam', 'laki-laki', '2018-03-10', 'Safwati', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '0000-00-00', '2018-12-15', '0000-00-00'), (309, 'Altaf Ghifari', 'laki-laki', '2018-03-10', 'Chairani', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (310, 'Brisya Syafika', 'perempuan', '2018-03-10', 'Bariah', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (311, 'M. Alvi Faiz', 'laki-laki', '2018-03-10', 'Ismalaini', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '0000-00-00', '0000-00-00'), (312, 'Faza Unaysa', 'perempuan', '2018-03-10', 'Shinta Laria', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (313, 'Razka', 'laki-laki', '2018-03-10', 'Fariza', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (314, 'Adkia Masywa', 'perempuan', '2018-03-10', 'Riski Geubrina', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (315, 'Adiba Khanza', 'perempuan', '2018-03-10', 'Anju Ifrizal', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (316, 'M. Alfatah', 'laki-laki', '2018-03-10', 'Erlina', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (317, 'Arika', 'perempuan', '2018-03-10', 'Mutia Wati', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (318, 'Fitrah', 'laki-laki', '2018-03-10', 'Yusmanita', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (319, 'M. Afkar', 'laki-laki', '2018-03-10', 'Nurlaili', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (320, 'Aurel Qistina', 'perempuan', '2018-03-10', 'Nurmasyitah', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (321, 'M. Hafidz', 'laki-laki', '2018-03-10', 'Nurhayati', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (322, 'M. Navis', 'laki-laki', '2018-03-10', 'Leli', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (323, 'Cut Razan', 'perempuan', '2018-03-10', 'Rosmalinda', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (324, 'Rachel Faria', 'perempuan', '2018-03-10', 'Haslina', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (325, 'M. Gaza', 'laki-laki', '2018-03-10', 'Melisa', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (326, 'Ratu Alina', 'perempuan', '2018-03-10', 'Yasti Mastura', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (327, 'Putra Anugrah', 'laki-laki', '2018-03-10', 'Dini', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (328, 'M. Syauqi', 'laki-laki', '2018-03-10', 'Ratna Sari', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (329, 'M. Syauqan', 'laki-laki', '2018-03-10', 'Ratna Sari', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (330, 'Ahmad Muaz', 'laki-laki', '2018-03-10', 'Ti Aminah', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (331, 'Bayi Mulyani', 'laki-laki', '2018-03-10', 'Mulyani', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (332, 'M. Alfarezi', 'laki-laki', '2018-03-10', 'Eliani', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (333, 'Alfatih Aqsa', 'laki-laki', '2018-03-10', 'Rukmini', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (334, 'Ziad Zumal', 'laki-laki', '2018-03-10', 'Nurshalla', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (335, 'Witan', 'laki-laki', '2018-03-10', 'Asridawati', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (336, 'M. Gafran', 'laki-laki', '2018-03-10', 'Yulia Sari', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (337, 'Alesya', 'perempuan', '2018-03-10', 'Ronalita', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (338, 'Nurasyifa', 'perempuan', '2018-03-10', 'Rosmawar', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (339, 'M. Faris', 'laki-laki', '2018-03-10', 'Mutia', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (340, 'M. Al Azam', 'laki-laki', '2018-03-10', 'Marwiddah', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (341, 'Zahratun Najwa', 'perempuan', '2018-03-10', 'Mulyani', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (342, 'M. Ziar Aqmar', 'laki-laki', '2018-03-10', 'Khairunnisa', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (343, 'Ahzar Zurrahman', 'laki-laki', '2018-03-10', 'Linda Wati', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (344, 'Afifah Nasita', 'perempuan', '2018-03-10', 'Rosnita', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (345, 'Salma Nabila', 'perempuan', '2018-03-10', 'Agustina', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (346, 'Salwa Nafisa', 'perempuan', '2018-03-10', 'Agustina', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (347, 'Sultan', 'laki-laki', '2018-03-10', 'Lia Wardani', 'Pulo Ara', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (348, 'Abi Rafdi', 'laki-laki', '2018-03-10', 'Sri Br Gintng', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (349, 'Nisfu Shahira', 'perempuan', '2018-03-10', 'Nur Afrah', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (350, 'Abzan Hidayatullah', 'laki-laki', '2018-03-10', 'Ertina', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (351, 'Alghazali', 'laki-laki', '2018-03-10', 'Ema Liana', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (352, 'Hamdan Syukran', 'laki-laki', '2018-03-10', 'Nurlinda Wati', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (353, 'Dila Fitria', 'perempuan', '2018-03-10', 'Yanti Arizona', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (354, 'Putri Nabila', 'perempuan', '2018-03-10', 'Maryani', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (355, 'M. Rafli', 'laki-laki', '2018-03-10', 'Rahmawati', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (356, 'Muhammad Zaid', 'laki-laki', '2018-03-10', 'Nurmasyitah', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (357, 'M. Albi Fardan', 'laki-laki', '2018-03-10', 'Sumilawati', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (358, 'M. Riswan', 'laki-laki', '2018-03-10', 'Nursiah', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (359, 'M. Khadafi', 'laki-laki', '2018-03-10', 'Asnidar', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (360, 'Khairin Munzilin', 'laki-laki', '2018-03-10', 'Nurhayati', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (361, 'Syifa', 'perempuan', '2018-03-10', 'Lia Safitri', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (362, 'Ahmad Wildan', 'laki-laki', '2018-03-10', 'Raihan', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (363, 'Arzaq Arzhafi', 'laki-laki', '2018-03-10', 'jasmaniar', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (364, 'Rania Humaira', 'perempuan', '2018-03-10', 'Ainun', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (365, 'M. Arkhan', 'laki-laki', '2018-03-10', 'Isma Yunita', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (366, 'Alifna Rizki', 'laki-laki', '2018-03-10', 'Yusdiana', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (367, 'M. Zaid', 'laki-laki', '2018-03-10', 'Masyitah', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (368, 'Haikal Raditya', 'laki-laki', '2018-03-10', 'Yeni Rahmawati', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (369, 'Nazila Ardini', 'perempuan', '2018-03-10', 'Khairunnisa', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (370, 'Bayi Rosdiana', 'perempuan', '2018-03-10', 'Rosdiana', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (371, 'M. Hafiz', 'laki-laki', '2018-03-10', 'Priyanti', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (372, 'M. Abizar', 'laki-laki', '2018-03-10', 'Eva Malinda', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (373, 'M. Taufik', 'laki-laki', '2018-03-10', 'Yusra', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (374, 'Kesyha Nur', 'perempuan', '2018-03-10', 'Lia Suwarni', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (375, 'Medina', 'perempuan', '2018-03-10', 'Ulfi', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (376, 'Afifa Fitiya', 'perempuan', '2018-03-10', 'Ida Parida', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (377, 'Mya Qalesya', 'perempuan', '2018-03-10', 'Khalizayana', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (378, 'M. Hanif', 'laki-laki', '2018-03-10', 'Suhelvi', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (379, 'M. Iqbal', 'laki-laki', '2018-03-10', 'Kanadia', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (380, 'Khadafi', 'laki-laki', '2018-03-10', 'Nova Eliza', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (381, 'Ahmad Rifai', 'laki-laki', '2018-03-10', 'Evanda', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (382, 'Cut Hanifa', 'perempuan', '2018-03-10', 'Cut Herra', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (383, 'Fatan Alfarezi', 'laki-laki', '2018-03-10', 'Jumiati', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (384, 'M. Ghibran', 'laki-laki', '2018-03-10', 'Nana Apriana', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'), (385, 'Febrina Riski', 'perempuan', '2018-03-10', 'Fitri Yani', 'Meunasah Gadong', '2018-03-13', '2018-04-07', '2018-04-07', '2018-05-12', '2018-05-12', '2018-06-09', '2018-06-09', '2018-07-13', '2018-07-13', '2018-07-13', '2018-12-15', '2018-12-15'); -- -------------------------------------------------------- -- -- Table structure for table `operator` -- CREATE TABLE `operator` ( `id` int(11) NOT NULL, `username` varchar(30) NOT NULL, `password` varchar(255) NOT NULL, `nama` varchar(30) NOT NULL, `divisi` varchar(30) NOT NULL, `puskesmas` varchar(30) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `operator` -- INSERT INTO `operator` (`id`, `username`, `password`, `nama`, `divisi`, `puskesmas`) VALUES (1, 'midhat', '123', 'Midhat', 'B. Imunisasi ', 'Kotajuang'), (2, 'martunis', '123', 'Martunis', 'B. Imunisasi', 'Gandapura'); -- -- Indexes for dumped tables -- -- -- Indexes for table `admin` -- ALTER TABLE `admin` ADD PRIMARY KEY (`id`); -- -- Indexes for table `desa` -- ALTER TABLE `desa` ADD PRIMARY KEY (`id_desa`); -- -- Indexes for table `gandapura` -- ALTER TABLE `gandapura` ADD PRIMARY KEY (`id_imunisasi`); -- -- Indexes for table `kotajuang` -- ALTER TABLE `kotajuang` ADD PRIMARY KEY (`id_imunisasi`); -- -- Indexes for table `operator` -- ALTER TABLE `operator` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `admin` -- ALTER TABLE `admin` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `desa` -- ALTER TABLE `desa` MODIFY `id_desa` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=34; -- -- AUTO_INCREMENT for table `gandapura` -- ALTER TABLE `gandapura` MODIFY `id_imunisasi` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=146; -- -- AUTO_INCREMENT for table `kotajuang` -- ALTER TABLE `kotajuang` MODIFY `id_imunisasi` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=386; -- -- AUTO_INCREMENT for table `operator` -- ALTER TABLE `operator` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17; COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
163.558785
258
0.59276
131786447d1347a0cf0030cb5dc6b57df9884953
1,589
h
C
netlibcc/core/TimeAnchor.h
kohakus/tiny-netlib
da9998ee06f4e2eb5ebcaf0e383196269dea1f33
[ "MIT" ]
1
2021-03-05T10:14:27.000Z
2021-03-05T10:14:27.000Z
netlibcc/core/TimeAnchor.h
kohakus/tiny-netlib
da9998ee06f4e2eb5ebcaf0e383196269dea1f33
[ "MIT" ]
null
null
null
netlibcc/core/TimeAnchor.h
kohakus/tiny-netlib
da9998ee06f4e2eb5ebcaf0e383196269dea1f33
[ "MIT" ]
null
null
null
#ifndef NETLIBCC_CORE_TIMEANCHOR_H_ #define NETLIBCC_CORE_TIMEANCHOR_H_ #include <string> namespace netlibcc { // simple UTC time stamp class class TimeAnchor { public: TimeAnchor() : stamp_(0) {} TimeAnchor(int64_t stamp) : stamp_(stamp) {} // get string of stamp_ value std::string toStr() const; // get format string with micro seconds std::string formatMicro() const; // get format string with seconds std::string formatSeconds() const; // get time stamp value int64_t timeMicro() const { return stamp_; } time_t timeSeconds() const { return static_cast<time_t>(stamp_ / kMicroSecondsPerSecond); } // get time stamp that represents the time of now static TimeAnchor now(); // weight from seconds to micro seconds static const int kMicroSecondsPerSecond = 1000000; private: // micro seconds since epoch int64_t stamp_; }; inline bool operator<(TimeAnchor lhs, TimeAnchor rhs) { return lhs.timeMicro() < rhs.timeMicro(); } inline bool operator==(TimeAnchor lhs, TimeAnchor rhs) { return lhs.timeMicro() == rhs.timeMicro(); } inline bool operator<=(TimeAnchor lhs, TimeAnchor rhs) { return lhs == rhs || lhs < rhs; } inline TimeAnchor operator-(TimeAnchor lhs, TimeAnchor rhs) { return TimeAnchor(lhs.timeMicro() - rhs.timeMicro()); } inline double timeDiff(TimeAnchor high, TimeAnchor low) { TimeAnchor diff = high - low; return static_cast<double>(diff.timeMicro()) / TimeAnchor::kMicroSecondsPerSecond; } } // namespace netlibcc #endif // NETLIBCC_CORE_TIMEANCHOR_H_
26.04918
86
0.705475
31a73eb1670ecee7fe6488e9a28547a01ed26bbc
1,645
ps1
PowerShell
tests/IAM/IAM.Tests.ps1
ajsing/aws-tools-for-powershell
25372542f23afd465fc419c4ec1f6175d7f3dee2
[ "Apache-2.0" ]
181
2019-03-29T16:45:16.000Z
2022-03-24T22:46:45.000Z
tests/IAM/IAM.Tests.ps1
lukeenterprise/aws-tools-for-powershell
acc809bc80d092fc1fb2c21780ff9ea06f3d104c
[ "Apache-2.0" ]
233
2019-03-29T12:22:54.000Z
2022-03-30T08:14:56.000Z
tests/IAM/IAM.Tests.ps1
lukeenterprise/aws-tools-for-powershell
acc809bc80d092fc1fb2c21780ff9ea06f3d104c
[ "Apache-2.0" ]
70
2019-05-09T05:43:10.000Z
2022-02-22T15:09:32.000Z
. (Join-Path (Join-Path (Get-Location) "Include") "TestIncludes.ps1") . (Join-Path (Join-Path (Get-Location) "Include") "TestHelper.ps1") . (Join-Path (Join-Path (Get-Location) "Include") "ServiceTestHelper.ps1") $helper = New-Object ServiceTestHelper Describe -Tag "Smoke" "IAM" { BeforeAll { $helper.BeforeAll() } AfterAll { $helper.AfterAll() } Context "Roles" { It "Can list and read roles" { $roles = Get-IAMRoles if ($roles) { $roles.Count | Should BeGreaterThan 0 foreach ($r in $roles) { $role = Get-IAMRole -RoleName $r.RoleName $role | Should Not Be $null } } } } Context "Instance Profiles" { It "Can list and read instance profiles" { $profiles = Get-IAMInstanceProfiles if ($profiles) { $profiles.Count | Should BeGreaterThan 0 foreach ($p in $profiles) { $profile = Get-IAMInstanceProfile -InstanceProfileName $p.InstanceProfileName $profile | Should Not Be $null } } } } Context "Account Summary" { It "Can get account summary" { $summaryMap = Get-IAMAccountSummary $summaryMap | Should Not Be $null } } Context "Regions" { It "Signs ok when used with non-us-east-1 region" { $summaryMap = Get-IAMAccountSummary -Region ap-southeast-2 $summaryMap | Should Not Be $null } } }
26.111111
97
0.519757
48dc3a728a66c4bebc4012341396012e06863041
121
sql
SQL
src/test/tinc/tincmmgr/test/e2e/expected_test_scripts/test_insert_metadata_method_level/sql/query01.sql
rodel-talampas/gpdb
9c955e350334abbd922102f289f782697eb52069
[ "PostgreSQL", "Apache-2.0" ]
9
2018-04-20T03:31:01.000Z
2020-05-13T14:10:53.000Z
src/test/tinc/tincmmgr/test/e2e/expected_test_scripts/test_insert_metadata_method_level/sql/query01.sql
rodel-talampas/gpdb
9c955e350334abbd922102f289f782697eb52069
[ "PostgreSQL", "Apache-2.0" ]
36
2017-09-21T09:12:27.000Z
2020-06-17T16:40:48.000Z
src/test/tinc/tincmmgr/test/e2e/expected_test_scripts/test_insert_metadata_method_level/sql/query01.sql
rodel-talampas/gpdb
9c955e350334abbd922102f289f782697eb52069
[ "PostgreSQL", "Apache-2.0" ]
32
2017-08-31T12:50:52.000Z
2022-03-01T07:34:53.000Z
-- @tags tag1 tag2 tag3 bug-3 -- comment --@bugs MPP-1 -- @newmetadata newvalue -- @anothernewmd newvalue select 'foo';
17.285714
29
0.68595
5b4c039447d2cc25f5fcaefa67a7a8637f479d16
207
kt
Kotlin
app/src/main/java/com/prerna/newsappkotlin/util/Output.kt
Prernaakumaree/NewsAppKotlin
5b978217026b703c98bd2d420d6f8139e166af84
[ "Apache-2.0" ]
null
null
null
app/src/main/java/com/prerna/newsappkotlin/util/Output.kt
Prernaakumaree/NewsAppKotlin
5b978217026b703c98bd2d420d6f8139e166af84
[ "Apache-2.0" ]
null
null
null
app/src/main/java/com/prerna/newsappkotlin/util/Output.kt
Prernaakumaree/NewsAppKotlin
5b978217026b703c98bd2d420d6f8139e166af84
[ "Apache-2.0" ]
null
null
null
package com.prerna.newsappkotlin.util sealed class Output<out T : Any> { data class Success<out T : Any>(val output: T) : Output<T>() data class Error(val exception: Exception) : Output<Nothing>() }
34.5
66
0.700483
471b85a1682b188c16eb056e324f54da57bcdbd5
2,904
sql
SQL
e2e_samples/parking_sensors_synapse/application_layer/healthcare_infoProtection/synapse/sqlScripts/4a HealthCare SQL Pool Security DDM.sql
Alegandi83/modern-data-warehouse-dataops
5a44ad1e99e1cc9a97b86b306c503b817798e54e
[ "MIT" ]
null
null
null
e2e_samples/parking_sensors_synapse/application_layer/healthcare_infoProtection/synapse/sqlScripts/4a HealthCare SQL Pool Security DDM.sql
Alegandi83/modern-data-warehouse-dataops
5a44ad1e99e1cc9a97b86b306c503b817798e54e
[ "MIT" ]
null
null
null
e2e_samples/parking_sensors_synapse/application_layer/healthcare_infoProtection/synapse/sqlScripts/4a HealthCare SQL Pool Security DDM.sql
Alegandi83/modern-data-warehouse-dataops
5a44ad1e99e1cc9a97b86b306c503b817798e54e
[ "MIT" ]
null
null
null
/******Important – Do not use in production, for demonstration purposes only – please review the legal notices by clicking the following link****/ ---DisclaimerLink: https://healthcaredemoapp.azurewebsites.net/#/disclaimer ---License agreement: https://github.com/microsoft/Azure-Analytics-and-AI-Engagement/blob/main/HealthCare/License.md /* **DISCLAIMER** By accessing this code, you acknowledge the code is made available for presentation and demonstration purposes only and that the code: (1) is not subject to SOC 1 and SOC 2 compliance audits; (2) is not designed or intended to be a substitute for the professional advice, diagnosis, treatment, or judgment of a certified financial services professional; (3) is not designed, intended or made available as a medical device; and (4) is not designed or intended to be a substitute for professional medical advice, diagnosis, treatment or judgement. Do not use this code to replace, substitute, or provide professional financial advice or judgment, or to replace, substitute or provide medical advice, diagnosis, treatment or judgement. You are solely responsible for ensuring the regulatory, legal, and/or contractual compliance of any use of the code, including obtaining any authorizations or consents, and any solution you choose to build that incorporates this code in whole or in part. */ -- Step:1(View the existing table 'PatientInformation' Data) select top 100 * from PatientInformation -- Step:2 Let's confirm that there are no Dynamic Data Masking (DDM) applied on columns Exec [Confirm DDM] -- No results returned verify that no data masking has been done yet. -- Step:3 Now lets mask 'Medical Insurance Card' and 'Email' Column of 'PatientInformation' table. ALTER TABLE PatientInformation ALTER COLUMN [Medical Insurance Card] ADD MASKED WITH (FUNCTION = 'partial(0,"XXX-XXX-XXXX-",4)') GO ALTER TABLE PatientInformation Alter Column Email ADD MASKED WITH (FUNCTION = 'email()') GO -- The columns are sucessfully masked. -- Step:4 Let's see Dynamic Data Masking (DDM) applied on the two columns. Exec [Confirm DDM] -- Step:5 Now, let us grant SELECT permission to 'CareManager'sysusers on the 'PatientInformation' table. SELECT Name as [User] FROM sys.sysusers WHERE name = N'CareManager' GRANT SELECT ON PatientInformation TO CareManager; -- Step:6 Logged in as 'CareManager' let us execute the select query and view the result. EXECUTE AS USER =N'CareManager'; SELECT * FROM PatientInformation; -- Step:7 Let us Remove the data masking using UNMASK permission GRANT UNMASK TO CareManager EXECUTE AS USER = 'CareManager'; SELECT top 10 * FROM PatientInformation; revert; REVOKE UNMASK TO CareManager; ----step:8 Reverting all the changes back to as it was. ALTER TABLE PatientInformation ALTER COLUMN [Medical Insurance Card] DROP MASKED; GO ALTER TABLE PatientInformation ALTER COLUMN Email DROP MASKED; GO
60.5
990
0.78168
64f5398ad13a658cbc0cbe411822870be76d3c72
195
java
Java
Program/Java/DubboDemo/UserService/src/main/java/com/gavinshark/userservice/UserService.java
gavinshark/stayHungryStayFoolish
2333b9eb4cf0316bf439e3738935940ac16b42ba
[ "MIT" ]
1
2021-01-25T05:43:52.000Z
2021-01-25T05:43:52.000Z
Program/Java/DubboDemo/UserService/src/main/java/com/gavinshark/userservice/UserService.java
gavinshark/stayHungryStayFoolish
2333b9eb4cf0316bf439e3738935940ac16b42ba
[ "MIT" ]
null
null
null
Program/Java/DubboDemo/UserService/src/main/java/com/gavinshark/userservice/UserService.java
gavinshark/stayHungryStayFoolish
2333b9eb4cf0316bf439e3738935940ac16b42ba
[ "MIT" ]
null
null
null
package com.gavinshark.userservice; import org.springframework.stereotype.Component; import java.util.*; public interface UserService { public List<String> getUserAddress (String userId); }
24.375
55
0.8
5b6fc6567473516f3f18bbb9530888c5ae3e9623
10,110
cc
C++
chrome/browser/safe_browsing/certificate_reporting_service.cc
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
575
2015-06-18T23:58:20.000Z
2022-03-23T09:32:39.000Z
chrome/browser/safe_browsing/certificate_reporting_service.cc
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
113
2015-05-04T09:58:14.000Z
2022-01-31T19:35:03.000Z
chrome/browser/safe_browsing/certificate_reporting_service.cc
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
52
2015-07-14T10:40:50.000Z
2022-03-15T01:11:49.000Z
// Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/browser/safe_browsing/certificate_reporting_service.h" #include <memory> #include "base/bind.h" #include "base/callback_helpers.h" #include "base/metrics/histogram_functions.h" #include "base/metrics/histogram_macros.h" #include "base/time/clock.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/safe_browsing/safe_browsing_service.h" #include "components/prefs/pref_service.h" #include "components/safe_browsing/core/common/safe_browsing_prefs.h" #include "components/security_interstitials/content/certificate_error_report.h" #include "content/public/browser/browser_thread.h" #include "services/network/public/cpp/shared_url_loader_factory.h" namespace { // URL to upload invalid certificate chain reports. An HTTP URL is used because // a client seeing an invalid cert might not be able to make an HTTPS connection // to report it. const char kExtendedReportingUploadUrl[] = "http://safebrowsing.googleusercontent.com/safebrowsing/clientreport/" "chrome-certs"; // Compare function that orders Reports in reverse chronological order (i.e. // oldest item is last). bool ReportCompareFunc(const CertificateReportingService::Report& item1, const CertificateReportingService::Report& item2) { return item1.creation_time > item2.creation_time; } // Records an UMA histogram of the net errors when certificate reports // fail to send. void RecordUMAOnFailure(int net_error) { base::UmaHistogramSparse("SSL.CertificateErrorReportFailure", -net_error); } void RecordUMAEvent(CertificateReportingService::ReportOutcome outcome) { UMA_HISTOGRAM_ENUMERATION( CertificateReportingService::kReportEventHistogram, outcome, CertificateReportingService::ReportOutcome::EVENT_COUNT); } } // namespace const char CertificateReportingService::kReportEventHistogram[] = "SSL.CertificateErrorReportEvent"; CertificateReportingService::BoundedReportList::BoundedReportList( size_t max_size) : max_size_(max_size) { CHECK(max_size <= 20) << "Current implementation is not efficient for a large list."; DCHECK(thread_checker_.CalledOnValidThread()); } CertificateReportingService::BoundedReportList::~BoundedReportList() {} void CertificateReportingService::BoundedReportList::Add(const Report& item) { DCHECK(thread_checker_.CalledOnValidThread()); DCHECK(items_.size() <= max_size_); if (items_.size() == max_size_) { const Report& last = items_.back(); if (item.creation_time <= last.creation_time) { // Report older than the oldest item in the queue, ignore. RecordUMAEvent(ReportOutcome::DROPPED_OR_IGNORED); return; } // Reached the maximum item count, remove the oldest item. items_.pop_back(); RecordUMAEvent(ReportOutcome::DROPPED_OR_IGNORED); } items_.push_back(item); std::sort(items_.begin(), items_.end(), ReportCompareFunc); } void CertificateReportingService::BoundedReportList::Clear() { items_.clear(); } const std::vector<CertificateReportingService::Report>& CertificateReportingService::BoundedReportList::items() const { DCHECK(thread_checker_.CalledOnValidThread()); return items_; } CertificateReportingService::Reporter::Reporter( std::unique_ptr<CertificateErrorReporter> error_reporter, std::unique_ptr<BoundedReportList> retry_list, base::Clock* clock, base::TimeDelta report_ttl, bool retries_enabled) : error_reporter_(std::move(error_reporter)), retry_list_(std::move(retry_list)), clock_(clock), report_ttl_(report_ttl), retries_enabled_(retries_enabled), current_report_id_(0) {} CertificateReportingService::Reporter::~Reporter() {} void CertificateReportingService::Reporter::Send( const std::string& serialized_report) { SendInternal(Report(current_report_id_++, clock_->Now(), serialized_report)); } void CertificateReportingService::Reporter::SendPending() { if (!retries_enabled_) { return; } const base::Time now = clock_->Now(); // Copy pending reports and clear the retry list. std::vector<Report> items = retry_list_->items(); retry_list_->Clear(); for (Report& report : items) { if (report.creation_time < now - report_ttl_) { // Report too old, ignore. RecordUMAEvent(ReportOutcome::DROPPED_OR_IGNORED); continue; } if (!report.is_retried) { // If this is the first retry, deserialize the report, set its retry bit // and serialize again. CertificateErrorReport error_report; CHECK(error_report.InitializeFromString(report.serialized_report)); error_report.SetIsRetryUpload(true); CHECK(error_report.Serialize(&report.serialized_report)); } report.is_retried = true; SendInternal(report); } } size_t CertificateReportingService::Reporter::inflight_report_count_for_testing() const { return inflight_reports_.size(); } CertificateReportingService::BoundedReportList* CertificateReportingService::Reporter::GetQueueForTesting() const { return retry_list_.get(); } void CertificateReportingService::Reporter:: SetClosureWhenNoInflightReportsForTesting(base::OnceClosure closure) { no_in_flight_reports_ = std::move(closure); } void CertificateReportingService::Reporter::SendInternal( const CertificateReportingService::Report& report) { inflight_reports_.insert(std::make_pair(report.report_id, report)); RecordUMAEvent(ReportOutcome::SUBMITTED); error_reporter_->SendExtendedReportingReport( report.serialized_report, base::BindOnce(&CertificateReportingService::Reporter::SuccessCallback, weak_factory_.GetWeakPtr(), report.report_id), base::BindOnce(&CertificateReportingService::Reporter::ErrorCallback, weak_factory_.GetWeakPtr(), report.report_id)); } void CertificateReportingService::Reporter::ErrorCallback( int report_id, int net_error, int http_response_code) { RecordUMAOnFailure(net_error); RecordUMAEvent(ReportOutcome::FAILED); if (retries_enabled_) { auto it = inflight_reports_.find(report_id); DCHECK(it != inflight_reports_.end()); retry_list_->Add(it->second); } CHECK_GT(inflight_reports_.erase(report_id), 0u); if (inflight_reports_.empty() && no_in_flight_reports_) std::move(no_in_flight_reports_).Run(); } void CertificateReportingService::Reporter::SuccessCallback(int report_id) { RecordUMAEvent(ReportOutcome::SUCCESSFUL); CHECK_GT(inflight_reports_.erase(report_id), 0u); if (inflight_reports_.empty() && no_in_flight_reports_) std::move(no_in_flight_reports_).Run(); } CertificateReportingService::CertificateReportingService( safe_browsing::SafeBrowsingService* safe_browsing_service, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, Profile* profile, uint8_t server_public_key[/* 32 */], uint32_t server_public_key_version, size_t max_queued_report_count, base::TimeDelta max_report_age, base::Clock* clock, const base::RepeatingClosure& reset_callback) : pref_service_(*profile->GetPrefs()), url_loader_factory_(url_loader_factory), max_queued_report_count_(max_queued_report_count), max_report_age_(max_report_age), clock_(clock), reset_callback_(reset_callback), server_public_key_(server_public_key), server_public_key_version_(server_public_key_version) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); DCHECK(clock_); // Subscribe to SafeBrowsing preference change notifications. safe_browsing_state_subscription_ = safe_browsing_service->RegisterStateCallback( base::BindRepeating(&CertificateReportingService::OnPreferenceChanged, base::Unretained(this))); Reset(true); reset_callback_.Run(); } CertificateReportingService::~CertificateReportingService() { DCHECK(!reporter_); } void CertificateReportingService::Shutdown() { reporter_.reset(); } void CertificateReportingService::Send(const std::string& serialized_report) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); if (reporter_) reporter_->Send(serialized_report); } void CertificateReportingService::SendPending() { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); if (reporter_) reporter_->SendPending(); } void CertificateReportingService::SetEnabled(bool enabled) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); Reset(enabled); reset_callback_.Run(); } CertificateReportingService::Reporter* CertificateReportingService::GetReporterForTesting() const { return reporter_.get(); } // static GURL CertificateReportingService::GetReportingURLForTesting() { return GURL(kExtendedReportingUploadUrl); } void CertificateReportingService::Reset(bool enabled) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); if (!enabled) { reporter_.reset(); return; } std::unique_ptr<CertificateErrorReporter> error_reporter; if (server_public_key_) { error_reporter = std::make_unique<CertificateErrorReporter>( url_loader_factory_, GURL(kExtendedReportingUploadUrl), server_public_key_, server_public_key_version_); } else { error_reporter = std::make_unique<CertificateErrorReporter>( url_loader_factory_, GURL(kExtendedReportingUploadUrl)); } reporter_ = std::make_unique<Reporter>( std::move(error_reporter), std::make_unique<BoundedReportList>(max_queued_report_count_), clock_, max_report_age_, true /* retries_enabled */); } void CertificateReportingService::OnPreferenceChanged() { safe_browsing::SafeBrowsingService* safe_browsing_service_ = g_browser_process->safe_browsing_service(); const bool enabled = safe_browsing_service_ && safe_browsing_service_->enabled_by_prefs() && safe_browsing::IsExtendedReportingEnabled(pref_service_); SetEnabled(enabled); }
35.226481
80
0.756578