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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e2abf4b3940b92808b69a68ec13c3ced31797207
| 3,269
|
js
|
JavaScript
|
game.js
|
eisenivan/computer-escape
|
3a906beb4bdcfc44bc16bfe9965e862c0ddfae1c
|
[
"MIT"
] | null | null | null |
game.js
|
eisenivan/computer-escape
|
3a906beb4bdcfc44bc16bfe9965e862c0ddfae1c
|
[
"MIT"
] | null | null | null |
game.js
|
eisenivan/computer-escape
|
3a906beb4bdcfc44bc16bfe9965e862c0ddfae1c
|
[
"MIT"
] | null | null | null |
import {
levelOne,
levelTwo,
winner,
lostGame,
hasClimbingGear,
ropeIsVisible,
harnessIsVisible
} from './rules'
const firstRoom = {
location: (state) => `Welcome ${state.name}. You open your eyes... squint into the light. Where are you? You look around. Hard drive, processor, graphics card. You must be inside a computer`,
actions: [
{
verb: 'look around',
response: 'Not much to see, but it looks like there is a disc eject button. Funny that it would be on the inside.',
successState: {}
},
{
verb: 'push disc eject',
response: 'You hear the sound of gears whirling. A shaft of daylight shines down on you. Huzzah you think. A way out. Now, I just need to find away up there.',
successState: {
printLevelDescription: true,
level: 1
}
}
],
rules: [levelOne]
}
const secondRoom = {
location: 'Now that you see some light it looks like you could probably climb that optical drive serial cable if you had some climbing gear.',
actions: [
{
verb: 'look around',
response: 'Hmmm... it looks like a normal computer mostly, but there is a lot of dust on the processor heat sink.'
},
{
verb: 'dust',
response: 'Excellent. Of course someone left some climbing gear in this dusty old heat sink. You now see a rope and a climbing harness.',
successState: (state) => ({
visibleItems: [...state.visibleItems, 'harness', 'rope']
})
},
{
verb: 'pick up rope',
response: 'You examine the rope, it is a fine rope, and now it belongs to you.',
successState: (state) => ({
gear: [...state.gear, 'rope']
}),
rules: [ropeIsVisible],
failResponse: 'There is no rope to be found'
},
{
verb: 'pick up harness',
response: 'This sturdy harness will prove to be most valuable on your climb.',
successState: (state) => ({
gear: [...state.gear, 'harness']
}),
rules: [harnessIsVisible],
failResponse: 'You do not see a harness, why do you think you can pick one up?'
},
{
verb: 'climb',
response: 'It would obviously be better if you were in better shape, but you made it! You got out of the computer',
successState: {
printLevelDescription: true,
level: 2
},
failResponse: 'You bravely start to climb the cable with no safety equipment, at first this proves to be an easy task, but the wire insulation proves to be slippery. You are about 3/4 of the way to the top when your grip begins to give way. Your fingers are numb and you just cannot... hold... on. With a gasp you fall.',
failState: {
level: 3,
printLevelDescription: true
},
rules: [hasClimbingGear]
}
],
rules: [levelTwo]
}
const winnersPlatform = {
location: 'Well, now what? Seems like we\'re done here. Good job. The cake is a lie.',
actions: [],
rules: [winner]
}
const gameOver = {
location: 'You do not survive the fall. Maybe next time you can look around and find some safety gear to make your climb less dangerous ಠ_ಠ. I bet you need a rope and a harness',
rules: [lostGame]
}
export default [
firstRoom,
secondRoom,
winnersPlatform,
gameOver
]
| 33.357143
| 327
| 0.638727
|
6d2f3a08235cb6e27ab5bef04148025e485e950a
| 997
|
ts
|
TypeScript
|
class_05-Services and DI/games-app/src/app/app.component.ts
|
sedc-codecademy/skwd9-js-09-fs-ajsts-frbs
|
0a7b0e9d8a98ab38550fc97bdd1dbe21d0460ac9
|
[
"MIT"
] | null | null | null |
class_05-Services and DI/games-app/src/app/app.component.ts
|
sedc-codecademy/skwd9-js-09-fs-ajsts-frbs
|
0a7b0e9d8a98ab38550fc97bdd1dbe21d0460ac9
|
[
"MIT"
] | null | null | null |
class_05-Services and DI/games-app/src/app/app.component.ts
|
sedc-codecademy/skwd9-js-09-fs-ajsts-frbs
|
0a7b0e9d8a98ab38550fc97bdd1dbe21d0460ac9
|
[
"MIT"
] | null | null | null |
import { Component, OnInit } from '@angular/core';
import { LoggerService } from './components/games/games/services/logging.service';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
})
export class AppComponent implements OnInit {
constructor(private loggerService: LoggerService) {}
title = 'games-app';
passedText: string = '';
namesFromService: string[];
handleTextRecivedFinally(text: string) {
this.loggerService.logText(`logging from service at app component ${text}`);
}
ngOnInit() {
//Here with the subscribe we consume the every new added value to the textToSend event emmiter :) .
//Whenever a new value arives in textToSend, with the help of the subscribe we consume it and we can use it however we want.
this.loggerService.textToSend.subscribe((text) => (this.passedText = text));
this.namesFromService = this.loggerService.getNames();
console.log(this.namesFromService);
}
}
| 36.925926
| 128
| 0.721163
|
389b3a787de4c66923937f115ae89dc1d7a5b4aa
| 1,267
|
php
|
PHP
|
app/Http/Controllers/GalleriesController.php
|
lemosweb/jt_fotografia
|
f219d59d939ce814cbe4c7eb57e449306c1a07a5
|
[
"MIT"
] | null | null | null |
app/Http/Controllers/GalleriesController.php
|
lemosweb/jt_fotografia
|
f219d59d939ce814cbe4c7eb57e449306c1a07a5
|
[
"MIT"
] | null | null | null |
app/Http/Controllers/GalleriesController.php
|
lemosweb/jt_fotografia
|
f219d59d939ce814cbe4c7eb57e449306c1a07a5
|
[
"MIT"
] | null | null | null |
<?php
namespace App\Http\Controllers;
use App\Gallery;
use App\ImageGallery;
use Illuminate\Http\Request;
use App\Http\Requests;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Session;
class GalleriesController extends Controller
{
private $gallery;
public function __construct(Gallery $gallery)
{
$this->gallery = $gallery;
}
public function index()
{
$galleries = $this->gallery->paginate(10);
return view('admin.galleries.index',compact('galleries'));
}
public function create()
{
return view('admin.galleries.create');
}
public function store(Request $request)
{
$this->gallery->create($request->all());
return redirect()->route('galleries.index');
}
public function edit($id)
{
$gallery = $this->gallery->find($id);
return view('admin.galleries.edit', compact('gallery'));
}
public function update(Request $request, $id)
{
$this->gallery->find($id)->update($request->all());
return redirect()->route('galleries.index');
}
public function destroy($id)
{
$this->gallery->deleteGallery($id);
return redirect()->route('galleries.index');
}
}
| 18.910448
| 66
| 0.619574
|
b9a639cc5dfb4edb50253087cc448d60e0a40339
| 811
|
ps1
|
PowerShell
|
deploy.psdeploy.ps1
|
robbiepc30/LocalAccountManagement
|
0bd8345f5e994a35f1ba1af5fe04dfc0330cb9f4
|
[
"MIT"
] | null | null | null |
deploy.psdeploy.ps1
|
robbiepc30/LocalAccountManagement
|
0bd8345f5e994a35f1ba1af5fe04dfc0330cb9f4
|
[
"MIT"
] | null | null | null |
deploy.psdeploy.ps1
|
robbiepc30/LocalAccountManagement
|
0bd8345f5e994a35f1ba1af5fe04dfc0330cb9f4
|
[
"MIT"
] | null | null | null |
Deploy "Deploy LocalAccountManagement To Dev Folder" {
By FileSystem {
FromSource LocalAccountManagement
To C:\PSDev\LocalAccountManagement
WithOptions @{
Mirror = $True
}
Tagged Dev
}
}
Deploy "Deploy LocalAccountManagement To Local Module Folder" {
By FileSystem {
FromSource LocalAccountManagement
To "C:\Program Files\WindowsPowerShell\Modules\LocalAccountManagement"
WithOptions @{
Mirror = $True
}
Tagged Prod
}
}
Deploy "Deploy LocalAccountManagement To Production Folder" {
By FileSystem {
FromSource LocalAccountManagement
To "\\robocop\ScriptRepo\LocalAccountManagement"
WithOptions @{
Mirror = $True
}
Tagged Prod
}
}
| 25.34375
| 78
| 0.623921
|
79ae126ecb0f324f6b8d9517177be4cdc6f70999
| 4,832
|
php
|
PHP
|
resources/views/result.blade.php
|
HIDETO-NDTB/make-rules
|
6fde5cf5c8d3b8a5dabc2c091befa561c049b10d
|
[
"MIT"
] | null | null | null |
resources/views/result.blade.php
|
HIDETO-NDTB/make-rules
|
6fde5cf5c8d3b8a5dabc2c091befa561c049b10d
|
[
"MIT"
] | null | null | null |
resources/views/result.blade.php
|
HIDETO-NDTB/make-rules
|
6fde5cf5c8d3b8a5dabc2c091befa561c049b10d
|
[
"MIT"
] | null | null | null |
@extends('layouts/front')
@section('page')
<div id="commentwrap">
<div class="container">
<div class="row centered">
<div class="col-lg-6">
<div class="card2">
<div class="card-header"><h4><b>{{ $rule->title }}</b></h4></div>
<div class="card-body">
<ul>
<div class="row">
<div class="col-lg-2">
@foreach ($users as $user)
@if($rule->user_id == $user->id)
<li><img src="{{ secure_asset(url($user->profile->avatar)) }}" class="img-responsive img-circle" style="width:60px; height:60px;" alt="avator"></li>
@endif
@endforeach
</div>
<div class="col-lg-3">
<h5>{{ $rule->user->name }}</h5>
</div>
<div class="col-lg-7"></div>
</div>
<div class="row">
<li><p>{{ $rule->content }}</p></li>
</div>
<div class="row">
<li>発議日: {{ $rule->initiative_date }}</li>
<li>投票日: {{ $rule->vote_date }} 〜 {{ $rule->finish_date }}</li>
</div>
</ul>
</div>
</div>
</div>
<div class="col-lg-6">
<img class="imgresult" src="{{ secure_asset('app/img/result-min.jpg') }}" style="width:100%; height:100%;">
</div>
</div>
<!-- row -->
</div>
<!-- container -->
</div>
<div class="resulttitle">
<div class="container">
<div class="col-lg-12">
<h3>開票結果</h3>
<p>開票日 {{ $rule->result_date }}</p>
</div>
</div>
</div>
<div id="resultform">
<div class="container">
<div class="row centered">
<div class="result-option">
@if($total_agree > $total_disagree)
<div class="result-top-blue">
<span class="result-amount">可 決</span>
</div>
@else
<div class="result-top-red">
<span class="result-amount">否 決</span>
</div>
@endif
<div class="result-content">
<li>総投票数 <strong>{{ $total_vote }}票</strong></li>
<li>賛成 <strong>{{ $total_agree }}票</strong></li>
<li>反対 <strong>{{ $total_disagree }}票</strong></li>
</div>
</div>
</div>
<!-- row -->
</div>
</div>
<div class="container x">
<div class="row centered">
<div class="col-lg-12">
@foreach ($comments as $comment)
@if($comment->rule_id == $rule->id AND $comment->opinion != "")
<div class="card">
<div class="card-header"><h4>{{ $comment->opinion }}派意見</h4></div>
<div class="card-body">
<ul>
<div class="row">
<div class="col-lg-1">
@foreach ($users as $user)
@if($comment->user_id == $user->id)
<li><img src="{{ secure_asset(url($user->profile->avatar)) }}" class="img-responsive img-circle" style="width:60px; height:60px;" alt="avator"></li>
@endif
@endforeach
</div>
<div class="col-lg-2">
@foreach ($users as $user)
@if($comment->user_id == $user->id)
<h5>{{ $user->name }}</h5>
@endif
@endforeach
</div>
<div class="col-lg-9"></div>
</div>
<div class="row">
<li><p>{{ $comment->comment }}</p></li>
</div>
<div class="row">
<li>コメント日: {{ $comment->comment_date }}</li>
</div>
</ul>
</div>
</div>
<br>
@endif
@endforeach
</div>
</div>
</div>
<br>
@endsection
| 39.606557
| 184
| 0.341887
|
040ccfa0edbbb7c5a269b9809a3e5c714e8d6de3
| 694
|
cpp
|
C++
|
src/cpu-kernels/awkward_ListOffsetArray_reduce_nonlocal_maxcount_offsetscopy_64.cpp
|
BioGeek/awkward-1.0
|
0cfb4e43c41d5c7d9830cc7b1d750485c0a93eb2
|
[
"BSD-3-Clause"
] | 519
|
2019-10-17T12:36:22.000Z
|
2022-03-26T23:28:19.000Z
|
src/cpu-kernels/awkward_ListOffsetArray_reduce_nonlocal_maxcount_offsetscopy_64.cpp
|
BioGeek/awkward-1.0
|
0cfb4e43c41d5c7d9830cc7b1d750485c0a93eb2
|
[
"BSD-3-Clause"
] | 924
|
2019-11-03T21:05:01.000Z
|
2022-03-31T22:44:30.000Z
|
src/cpu-kernels/awkward_ListOffsetArray_reduce_nonlocal_maxcount_offsetscopy_64.cpp
|
BioGeek/awkward-1.0
|
0cfb4e43c41d5c7d9830cc7b1d750485c0a93eb2
|
[
"BSD-3-Clause"
] | 56
|
2019-12-17T15:49:22.000Z
|
2022-03-09T20:34:06.000Z
|
// BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE
#define FILENAME(line) FILENAME_FOR_EXCEPTIONS_C("src/cpu-kernels/awkward_ListOffsetArray_reduce_nonlocal_maxcount_offsetscopy_64.cpp", line)
#include "awkward/kernels.h"
ERROR awkward_ListOffsetArray_reduce_nonlocal_maxcount_offsetscopy_64(
int64_t* maxcount,
int64_t* offsetscopy,
const int64_t* offsets,
int64_t length) {
*maxcount = 0;
offsetscopy[0] = offsets[0];
for (int64_t i = 0; i < length; i++) {
int64_t count = (offsets[i + 1] - offsets[i]);
if (*maxcount < count) {
*maxcount = count;
}
offsetscopy[i + 1] = offsets[i + 1];
}
return success();
}
| 30.173913
| 141
| 0.704611
|
1f334a279ea4ecd7fa586790da89fa94abd04b13
| 11,904
|
ps1
|
PowerShell
|
PublicFolders/src/SourceSideValidations/SourceSideValidations.ps1
|
dpaulson45/CSS-Exchange
|
16154ff8217a61694b56c8d46a136aa09e03187c
|
[
"MIT"
] | 1
|
2021-06-23T12:28:47.000Z
|
2021-06-23T12:28:47.000Z
|
PublicFolders/src/SourceSideValidations/SourceSideValidations.ps1
|
paulvill76/CSS-Exchange
|
824886e13761ddf2f237855564b76a66ab2e29c6
|
[
"MIT"
] | null | null | null |
PublicFolders/src/SourceSideValidations/SourceSideValidations.ps1
|
paulvill76/CSS-Exchange
|
824886e13761ddf2f237855564b76a66ab2e29c6
|
[
"MIT"
] | null | null | null |
[CmdletBinding(DefaultParameterSetName = "Default", SupportsShouldProcess)]
param (
[Parameter(Mandatory = $false, ParameterSetName = "Default")]
[bool]
$StartFresh = $true,
[Parameter(Mandatory = $true, ParameterSetName = "RemoveInvalidPermissions")]
[Switch]
$RemoveInvalidPermissions,
[Parameter(ParameterSetName = "RemoveInvalidPermissions")]
[string]
$CsvFile = (Join-Path $PSScriptRoot "InvalidPermissions.csv"),
[Parameter()]
[switch]
$SkipVersionCheck
)
. $PSScriptRoot\Get-FolderData.ps1
. $PSScriptRoot\Get-LimitsExceeded.ps1
. $PSScriptRoot\Get-BadDumpsterMappings.ps1
. $PSScriptRoot\Get-BadPermission.ps1
. $PSScriptRoot\Get-BadPermissionJob.ps1
. $PSScriptRoot\JobQueue.ps1
. $PSScriptRoot\Remove-InvalidPermission.ps1
. $PSScriptRoot\Get-BadMailEnabledFolder.ps1
. $PSScriptRoot\..\..\..\Shared\Test-ScriptVersion.ps1
if (-not $SkipVersionCheck) {
if (Test-ScriptVersion -AutoUpdate) {
# Update was downloaded, so stop here.
Write-Host "Script was updated. Please rerun the command."
return
}
}
if ($RemoveInvalidPermissions) {
if (-not (Test-Path $CsvFile)) {
Write-Error "File not found: $CsvFile"
} else {
Remove-InvalidPermission -CsvFile $CsvFile
}
return
}
$startTime = Get-Date
$startingErrorCount = $Error.Count
Set-ADServerSettings -ViewEntireForest $true
if ($Error.Count -gt $startingErrorCount) {
# If we already have errors, we're not running from the right shell.
return
}
$progressParams = @{
Activity = "Validating public folders"
Id = 1
}
Write-Progress @progressParams -Status "Step 1 of 5"
$folderData = Get-FolderData -StartFresh $StartFresh
if ($folderData.IpmSubtree.Count -lt 1) {
return
}
$script:anyDatabaseDown = $false
Get-Mailbox -PublicFolder | ForEach-Object {
try {
$db = Get-MailboxDatabase $_.Database -Status
if ($db.Mounted) {
$folderData.MailboxToServerMap[$_.DisplayName] = $db.Server
} else {
Write-Error "Database $db is not mounted. This database holds PF mailbox $_ and must be mounted."
$script:anyDatabaseDown = $true
}
} catch {
Write-Error $_
$script:anyDatabaseDown = $true
}
}
if ($script:anyDatabaseDown) {
Write-Host "One or more PF mailboxes cannot be reached. Unable to proceed."
return
}
# Now we're ready to do the checks
Write-Progress @progressParams -Status "Step 2 of 5"
$badDumpsters = @(Get-BadDumpsterMappings -FolderData $folderData)
Write-Progress @progressParams -Status "Step 3 of 5"
$limitsExceeded = Get-LimitsExceeded -FolderData $folderData
Write-Progress @progressParams -Status "Step 4 of 5"
$badMailEnabled = Get-BadMailEnabledFolder -FolderData $folderData
Write-Progress @progressParams -Status "Step 5 of 5"
$badPermissions = @(Get-BadPermission -FolderData $folderData)
# Output the results
if ($badMailEnabled.FoldersToMailDisable.Count -gt 0) {
$foldersToMailDisableFile = Join-Path $PSScriptRoot "FoldersToMailDisable.txt"
Set-Content -Path $foldersToMailDisableFile -Value $badMailEnabled.FoldersToMailDisable
Write-Host
Write-Host $badMailEnabled.FoldersToMailDisable.Count "folders should be mail-disabled, either because the MailRecipientGuid"
Write-Host "does not exist, or because they are system folders. These are listed in the file called:"
Write-Host $foldersToMailDisableFile -ForegroundColor Green
Write-Host "After confirming the accuracy of the results, you can mail-disable them with the following command:"
Write-Host "Get-Content `"$foldersToMailDisableFile`" | % { Set-PublicFolder `$_ -MailEnabled `$false }" -ForegroundColor Green
}
if ($badMailEnabled.MailPublicFoldersToDelete.Count -gt 0) {
$mailPublicFoldersToDeleteFile = Join-Path $PSScriptRoot "MailPublicFolderOrphans.txt"
Set-Content -Path $mailPublicFoldersToDeleteFile -Value $badMailEnabled.MailPublicFoldersToDelete
Write-Host
Write-Host $badMailEnabled.MailPublicFoldersToDelete.Count "MailPublicFolders are orphans and should be deleted. They exist in Active Directory"
Write-Host "but are not linked to any public folder. These are listed in a file called:"
Write-Host $mailPublicFoldersToDeleteFile -ForegroundColor Green
Write-Host "After confirming the accuracy of the results, you can delete them with the following command:"
Write-Host "Get-Content `"$mailPublicFoldersToDeleteFile`" | % { `$folder = ([ADSI](`"LDAP://`$_`")); `$parent = ([ADSI]`"`$(`$folder.Parent)`"); `$parent.Children.Remove(`$folder) }" -ForegroundColor Green
}
if ($badMailEnabled.MailPublicFolderDuplicates.Count -gt 0) {
$mailPublicFolderDuplicatesFile = Join-Path $PSScriptRoot "MailPublicFolderDuplicates.txt"
Set-Content -Path $mailPublicFolderDuplicatesFile -Value $badMailEnabled.MailPublicFolderDuplicates
Write-Host
Write-Host $badMailEnabled.MailPublicFolderDuplicates.Count "MailPublicFolders are duplicates and should be deleted. They exist in Active Directory"
Write-Host "and point to a valid folder, but that folder points to some other directory object."
Write-Host "These are listed in a file called:"
Write-Host $mailPublicFolderDuplicatesFile -ForegroundColor Green
Write-Host "After confirming the accuracy of the results, you can delete them with the following command:"
Write-Host "Get-Content `"$mailPublicFolderDuplicatesFile`" | % { `$folder = ([ADSI](`"LDAP://`$_`")); `$parent = ([ADSI]`"`$(`$folder.Parent)`"); `$parent.Children.Remove(`$folder) }" -ForegroundColor Green
if ($badMailEnabled.EmailAddressMergeCommands.Count -gt 0) {
$emailAddressMergeScriptFile = Join-Path $PSScriptRoot "AddAddressesFromDuplicates.ps1"
Set-Content -Path $emailAddressMergeScriptFile -Value $badMailEnabled.EmailAddressMergeCommands
Write-Host "The duplicates we are deleting contain email addresses that might still be in use."
Write-Host "To preserve these, we generated a script that will add these to the linked objects for those folders."
Write-Host "After deleting the duplicate objects using the command above, run the script as follows to"
Write-Host "populate these addresses:"
Write-Host ".\$emailAddressMergeScriptFile" -ForegroundColor Green
}
}
if ($badMailEnabled.MailDisabledWithProxyGuid.Count -gt 0) {
$mailDisabledWithProxyGuidFile = Join-Path $PSScriptRoot "MailDisabledWithProxyGuid.txt"
Set-Content -Path $mailDisabledWithProxyGuidFile -Value $badMailEnabled.MailDisabledWithProxyGuid
Write-Host
Write-Host $badMailEnabled.MailDisabledWithProxyGuid.Count "public folders have proxy GUIDs even though the folders are mail-disabled."
Write-Host "These folders should be mail-enabled. They can be mail-disabled again afterwards if desired."
Write-Host "To mail-enable these folders, run:"
Write-Host "Get-Content `"$mailDisabledWithProxyGuidFile`" | % { Enable-MailPublicFolder `$_ }" -ForegroundColor Green
}
if ($badMailEnabled.MailPublicFoldersDisconnected.Count -gt 0) {
$mailPublicFoldersDisconnectedFile = Join-Path $PSScriptRoot "MailPublicFoldersDisconnected.txt"
Set-Content -Path $mailPublicFoldersDisconnectedFile -Value $badMailEnabled.MailPublicFoldersDisconnected
Write-Host
Write-Host $badMailEnabled.MailPublicFoldersDisconnected.Count "MailPublicFolders are disconnected from their folders. This means they exist in"
Write-Host "Active Directory and the folders are probably functioning as mail-enabled folders,"
Write-Host "even while the properties of the public folders themselves say they are not mail-enabled."
Write-Host "This can be complex to fix. Either the directory object should be deleted, or the public folder"
Write-Host "should be mail-enabled, or both. These directory objects are listed in a file called:"
Write-Host $mailPublicFoldersDisconnectedFile -ForegroundColor Green
}
if ($badDumpsters.Count -gt 0) {
$badDumpsterFile = Join-Path $PSScriptRoot "BadDumpsterMappings.txt"
Set-Content -Path $badDumpsterFile -Value $badDumpsters
Write-Host
Write-Host $badDumpsters.Count "folders have invalid dumpster mappings. These folders are listed in"
Write-Host "the following file:"
Write-Host $badDumpsterFile -ForegroundColor Green
Write-Host "The -ExcludeDumpsters switch can be used to skip these folders during migration, or the"
Write-Host "folders can be deleted."
}
if ($limitsExceeded.ChildCount.Count -gt 0) {
$tooManyChildFoldersFile = Join-Path $PSScriptRoot "TooManyChildFolders.txt"
Set-Content -Path $tooManyChildFoldersFile -Value $limitsExceeded.ChildCount
Write-Host
Write-Host $limitsExceeded.ChildCount.Count "folders have exceeded the child folder limit of 10,000. These folders are"
Write-Host "listed in the following file:"
Write-Host $tooManyChildFoldersFile -ForegroundColor Green
Write-Host "Under each of the listed folders, child folders should be relocated or deleted to reduce this number."
}
if ($limitsExceeded.FolderPathDepth.Count -gt 0) {
$pathTooDeepFile = Join-Path $PSScriptRoot "PathTooDeep.txt"
Set-Content -Path $pathTooDeepFile -Value $limitsExceeded.FolderPathDepth
Write-Host
Write-Host $limitsExceeded.FolderPathDepth.Count "folders have exceeded the path depth limit of 299. These folders are"
Write-Host "listed in the following file:"
Write-Host $pathTooDeepFile -ForegroundColor Green
Write-Host "These folders should be relocated to reduce the path depth, or deleted."
}
if ($limitsExceeded.ItemCount.Count -gt 0) {
$tooManyItemsFile = Join-Path $PSScriptRoot "TooManyItems.txt"
Set-Content -Path $tooManyItemsFile -Value $limitsExceeded.ItemCount
Write-Host
Write-Host $limitsExceeded.ItemCount.Count "folders exceed the maximum of 1 million items. These folders are listed"
Write-Host "in the following file:"
Write-Host $tooManyItemsFile
Write-Host "In each of these folders, items should be deleted to reduce the item count."
}
if ($badPermissions.Count -gt 0) {
$badPermissionsFile = Join-Path $PSScriptRoot "InvalidPermissions.csv"
$badPermissions | Export-Csv -Path $badPermissionsFile -NoTypeInformation
Write-Host
Write-Host $badPermissions.Count "invalid permissions were found. These are listed in the following CSV file:"
Write-Host $badPermissionsFile -ForegroundColor Green
Write-Host "The invalid permissions can be removed using the RemoveInvalidPermissions switch as follows:"
Write-Host ".\SourceSideValidations.ps1 -RemoveInvalidPermissions" -ForegroundColor Green
}
$folderCountMigrationLimit = 250000
if ($folderData.IpmSubtree.Count -gt $folderCountMigrationLimit) {
Write-Host
Write-Host "There are $($folderData.IpmSubtree.Count) public folders in the hierarchy. This exceeds"
Write-Host "the supported migration limit of $folderCountMigrationLimit for Exchange Online. The number"
Write-Host "of public folders must be reduced prior to migrating to Exchange Online."
} elseif ($folderData.IpmSubtree.Count * 2 -gt $folderCountMigrationLimit) {
Write-Host
Write-Host "There are $($folderData.IpmSubtree.Count) public folders in the hierarchy. Because each of these"
Write-Host "has a dumpster folder, the total number of folders to migrate will be $($folderData.IpmSubtree.Count * 2)."
Write-Host "This exceeds the supported migration limit of $folderCountMigrationLimit for Exchange Online."
Write-Host "New-MigrationBatch can be run with the -ExcludeDumpsters switch to skip the dumpster"
Write-Host "folders, or public folders may be deleted to reduce the number of folders."
}
$private:endTime = Get-Date
Write-Host
Write-Host "SourceSideValidations complete. Total duration" ($endTime - $startTime)
| 45.96139
| 211
| 0.751932
|
1a4df8a9039600358d821d9776256f0bc57d76c8
| 3,754
|
py
|
Python
|
train.py
|
danaiefst/GaitTracking
|
5911d556f02fd676039fcb161707589f4bc234ae
|
[
"MIT"
] | null | null | null |
train.py
|
danaiefst/GaitTracking
|
5911d556f02fd676039fcb161707589f4bc234ae
|
[
"MIT"
] | null | null | null |
train.py
|
danaiefst/GaitTracking
|
5911d556f02fd676039fcb161707589f4bc234ae
|
[
"MIT"
] | null | null | null |
import torch
torch.cuda.manual_seed(3)
torch.manual_seed(3)
import data_handler, tracking_nn
import sys
from torch.optim import Adam
flag = int(sys.argv[1])
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
print("Working on", device)
batch_size = 32
cnn = tracking_nn.CNN().to(device)
if flag:
cnn.load_state_dict(torch.load("cnn_model.pt", map_location = device))
for param in cnn.parameters():
param.requires_grad = False
rnn = tracking_nn.RNN().to(device)
model = tracking_nn.Net(device, cnn, rnn).to(device)
paths = ["p11/2.a", "p11/3.a", "p16/3.a", "p17/2.a", "p17/3.a", "p1/2.a", "p18/2.a", "p18/3.a"]
data = data_handler.LegDataLoader(batch_size = batch_size)
# Train the nn
epochs = 1000
patience = 0
learning_rate = 0.0001
grid = 7
optimizer = Adam(model.parameters(), lr = learning_rate)
best_acc = float("Inf")
if flag:
save_path = "model.pt"
else:
save_path = "cnn_model.pt"
def eucl_dist(out, labels):
ret = 0
m = 0
for i in range(out.shape[0]):
yh = out[i]
p1_h = yh[0, :, :]
p2_h = yh[3, :, :]
detect_cell1 = p1_h.reshape(-1).argmax(axis = 0)
detect_cell2 = p2_h.reshape(-1).argmax(axis = 0)
x1, y1 = detect_cell1 // grid, detect_cell1 % grid
x2, y2 = detect_cell2 // grid, detect_cell2 % grid
d1 = (torch.sqrt((x1 + out[i, 1, x1, y1] - labels[i, 0, 0]) ** 2 + (y1 + out[i, 2, x1, y1] - labels[i, 0, 1]) ** 2)).item()
d2 = (torch.sqrt((x2 + out[i, 4, x2, y2] - labels[i, 1, 0]) ** 2 + (y2 + out[i, 5, x2, y2] - labels[i, 1, 1]) ** 2)).item()
if d1 > m:
m = d1
if d2 > m:
m = d2
ret += (d1 + d2) / 2
return m, ret / out.shape[0]
print("Started training...")
for epoch in range(epochs):
running_loss = 0
if epoch == 20 or epoch == 50:
learning_rate *= 0.1
optimizer = Adam(model.parameters(), lr = learning_rate)
f, input, label = data.load(0)
model.init_hidden()
c = 0
while(True):
input, label = input.to(device), label.to(device)
optimizer.zero_grad()
output = model.forward(input)
#print("labels", labels[0])
loss = model.loss(output, label)
loss.backward()
optimizer.step()
running_loss += loss.item() / input.shape[0]
c += 1
if f == -1:
break
if f:
model.init_hidden()
f, input, label = data.load(0)
#model.init_hidden()
model.detach_hidden()
print("epoch:{}, running loss: {}".format(epoch, running_loss / c))
running_loss = 0
if epoch >= patience:
with torch.no_grad():
acc = 0
dist = 0
c = 0
f, input, label = data.load(1)
model.init_hidden()
m = 0
while(True):
input, label = input.to(device), label.to(device)
output = model.forward(input)
acc += model.loss(output, label).item() / input.shape[0]
m1, d = eucl_dist(output, label)
dist += d
if m1 > m:
m = m1
c += 1
if f == -1:
break
if f:
model.init_hidden()
f, input, label = data.load(1)
#model.init_hidden()
if acc < best_acc:
best_acc = acc
print("Saving model with acc:", acc / c, ", mean dist:", dist / c / grid * 100, ", max dist:", m / grid * 100) #mean dist in cm
if flag:
torch.save(model, save_path)
else:
torch.save(cnn.state_dict(), save_path)
| 32.643478
| 143
| 0.523974
|
bb0af73b3e6f2b64eb5ed6b52d2b9b160530ea8f
| 19,719
|
cs
|
C#
|
Tester.Tests/ResponseTypesControllerTest.cs
|
mnaumanali94/Csharp
|
8fa3e77d2e186362cf6fca0fe9f9f8ab01ade037
|
[
"MIT"
] | null | null | null |
Tester.Tests/ResponseTypesControllerTest.cs
|
mnaumanali94/Csharp
|
8fa3e77d2e186362cf6fca0fe9f9f8ab01ade037
|
[
"MIT"
] | null | null | null |
Tester.Tests/ResponseTypesControllerTest.cs
|
mnaumanali94/Csharp
|
8fa3e77d2e186362cf6fca0fe9f9f8ab01ade037
|
[
"MIT"
] | null | null | null |
/*
* Tester.Tests
*
* This file was automatically generated for Stamplay by APIMATIC v2.0 ( https://apimatic.io ) on 08/08/2016
*/
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Threading.Tasks;
using NUnit.Framework;
using Tester.PCL;
using Tester.PCL.Controllers;
using Tester.PCL.Models;
using Tester.PCL.Exceptions;
using Tester.PCL.Http.Client;
using Tester.Tests.Helpers;
namespace Tester.Tests
{
[TestFixture]
public class ResponseTypesControllerTest : ControllerTestBase
{
/// <summary>
/// Controller instance (for all tests)
/// </summary>
private static IResponseTypesController controller;
/// <summary>
/// Setup test class
/// </summary>
[SetUp]
public static void SetUpClass()
{
controller = GetClient().ResponseTypes;
applyConfiguration();
}
/// <summary>
/// TODO: Add description for test TestGetLong
/// </summary>
[Test]
public async Task TestGetLong()
{
// Perform API call
long? result = null;
try
{
result = await controller.GetLongAsync();
}
catch(APIException) {};
// Test response code
Assert.AreEqual(200, httpCallBackHandler.Response.StatusCode,
"Status should be 200");
// Test whether the captured response is as we expected
Assert.IsNotNull(result, "Result should exist");
Assert.AreEqual(
5147483647L, result,
"Response should match expected value");
}
/// <summary>
/// TODO: Add description for test TestGetModel
/// </summary>
[Test]
public async Task TestGetModel()
{
// Perform API call
Employee result = null;
try
{
result = await controller.GetModelAsync();
}
catch(APIException) {};
// Test response code
Assert.AreEqual(200, httpCallBackHandler.Response.StatusCode,
"Status should be 200");
// Test whether the captured response is as we expected
Assert.IsNotNull(result, "Result should exist");
Assert.IsTrue(TestHelper.IsJsonObjectProperSubsetOf(
"{\"name\":\"Shahid Khaliq\",\"age\":5147483645,\"address\":\"H # 531, S # 20\",\"uid\":\"123321\",\"salary\":20000,\"department\":\"Software Development\",\"joiningDay\":\"Saturday\",\"workingDays\":[\"Monday\",\"Tuesday\",\"Friday\"],\"boss\":{\"name\":\"Zeeshan Ejaz\",\"age\":5147483647,\"address\":\"I-9/1\",\"uid\":\"241123\"},\"dependents\":[{\"name\":\"Future Wife\",\"age\":5147483649,\"address\":\"H # 531, S # 20\",\"uid\":\"123412\"},{\"name\":\"Future Kid\",\"age\":5147483648,\"address\":\"H # 531, S # 20\",\"uid\":\"312341\"}]}",
TestHelper.ConvertStreamToString(httpCallBackHandler.Response.RawBody),
true, true, false),
"Response body should have matching keys");
}
/// <summary>
/// TODO: Add description for test TestGetStringEnumArray
/// </summary>
[Test]
public async Task TestGetStringEnumArray()
{
// Perform API call
List<Days> result = null;
try
{
result = await controller.GetStringEnumArrayAsync();
}
catch(APIException) {};
// Test response code
Assert.AreEqual(200, httpCallBackHandler.Response.StatusCode,
"Status should be 200");
// Test whether the captured response is as we expected
Assert.IsNotNull(result, "Result should exist");
// Deserialize expected output
List<Days> expected = APIHelper.JsonDeserialize<List<Days>>(
"[\"Tuesday\", \"Saturday\", \"Wednesday\", \"Monday\", \"Sunday\"]");
Assert.IsTrue(result.IsSuperSetOf(expected), "Response array should have matching values");
}
/// <summary>
/// TODO: Add description for test TestGetStringEnum
/// </summary>
[Test]
public async Task TestGetStringEnum()
{
// Perform API call
Days? result = null;
try
{
result = await controller.GetStringEnumAsync();
}
catch(APIException) {};
// Test response code
Assert.AreEqual(200, httpCallBackHandler.Response.StatusCode,
"Status should be 200");
// Test whether the captured response is as we expected
Assert.IsNotNull(result, "Result should exist");
Assert.AreEqual(
DaysHelper.ParseString("Monday"), result,
"Response should match expected value");
}
/// <summary>
/// TODO: Add description for test TestGetModelArray
/// </summary>
[Test]
public async Task TestGetModelArray()
{
// Perform API call
List<Employee> result = null;
try
{
result = await controller.GetModelArrayAsync();
}
catch(APIException) {};
// Test response code
Assert.AreEqual(200, httpCallBackHandler.Response.StatusCode,
"Status should be 200");
// Test whether the captured response is as we expected
Assert.IsNotNull(result, "Result should exist");
Assert.IsTrue(TestHelper.IsArrayOfJsonObjectsProperSubsetOf(
"[{\"name\":\"Shahid Khaliq\",\"age\":5147483645,\"address\":\"H # 531, S # 20\",\"uid\":\"123321\",\"salary\":20000,\"department\":\"Software Development\",\"joiningDay\":\"Saturday\",\"workingDays\":[\"Monday\",\"Tuesday\",\"Friday\"],\"boss\":{\"name\":\"Zeeshan Ejaz\",\"age\":5147483647,\"address\":\"I-9/1\",\"uid\":\"241123\"},\"dependents\":[{\"name\":\"Future Wife\",\"age\":5147483649,\"address\":\"H # 531, S # 20\",\"uid\":\"123412\"},{\"name\":\"Future Kid\",\"age\":5147483648,\"address\":\"H # 531, S # 20\",\"uid\":\"312341\"}]}, {\"name\":\"Shahid Khaliq\",\"age\":5147483645,\"address\":\"H # 531, S # 20\",\"uid\":\"123321\",\"salary\":20000,\"department\":\"Software Development\",\"joiningDay\":\"Saturday\",\"workingDays\":[\"Monday\",\"Tuesday\",\"Friday\"],\"boss\":{\"name\":\"Zeeshan Ejaz\",\"age\":5147483647,\"address\":\"I-9/1\",\"uid\":\"241123\"},\"dependents\":[{\"name\":\"Future Wife\",\"age\":5147483649,\"address\":\"H # 531, S # 20\",\"uid\":\"123412\"},{\"name\":\"Future Kid\",\"age\":5147483648,\"address\":\"H # 531, S # 20\",\"uid\":\"312341\"}]}]",
TestHelper.ConvertStreamToString(httpCallBackHandler.Response.RawBody),
true, true, false),
"Response body should have matching keys");
}
/// <summary>
/// TODO: Add description for test TestGetIntEnum
/// </summary>
[Test]
public async Task TestGetIntEnum()
{
// Perform API call
SuiteCode? result = null;
try
{
result = await controller.GetIntEnumAsync();
}
catch(APIException) {};
// Test response code
Assert.AreEqual(200, httpCallBackHandler.Response.StatusCode,
"Status should be 200");
// Test whether the captured response is as we expected
Assert.IsNotNull(result, "Result should exist");
Assert.AreEqual(
(SuiteCode) int.Parse("3"), result,
"Response should match expected value");
}
/// <summary>
/// TODO: Add description for test TestGetIntEnumArray
/// </summary>
[Test]
public async Task TestGetIntEnumArray()
{
// Perform API call
List<SuiteCode> result = null;
try
{
result = await controller.GetIntEnumArrayAsync();
}
catch(APIException) {};
// Test response code
Assert.AreEqual(200, httpCallBackHandler.Response.StatusCode,
"Status should be 200");
// Test whether the captured response is as we expected
Assert.IsNotNull(result, "Result should exist");
// Deserialize expected output
List<SuiteCode> expected = APIHelper.JsonDeserialize<List<SuiteCode>>(
"[1, 3, 4, 2, 3]");
Assert.IsTrue(result.IsSuperSetOf(expected), "Response array should have matching values");
}
/// <summary>
/// TODO: Add description for test TestGetPrecision
/// </summary>
[Test]
public async Task TestGetPrecision()
{
// Perform API call
double? result = null;
try
{
result = await controller.GetPrecisionAsync();
}
catch(APIException) {};
// Test response code
Assert.AreEqual(200, httpCallBackHandler.Response.StatusCode,
"Status should be 200");
// Test whether the captured response is as we expected
Assert.IsNotNull(result, "Result should exist");
Assert.AreEqual(
4.999, result, ASSERT_PRECISION,
"Response should match expected value");
}
/// <summary>
/// TODO: Add description for test TestGetBinary
/// </summary>
[Test]
public async Task TestGetBinary()
{
// Perform API call
Stream result = null;
try
{
result = await controller.GetBinaryAsync();
}
catch(APIException) {};
// Test response code
Assert.AreEqual(200, httpCallBackHandler.Response.StatusCode,
"Status should be 200");
// Test whether the captured response is as we expected
Assert.IsNotNull(result, "Result should exist");
Assert.IsTrue(TestHelper.IsSameAsFile("https://dl.dropboxusercontent.com/u/31838656/binary.png", result),
"Binary result content should match the given file");
}
/// <summary>
/// TODO: Add description for test TestGetInteger
/// </summary>
[Test]
public async Task TestGetInteger()
{
// Perform API call
int? result = null;
try
{
result = await controller.GetIntegerAsync();
}
catch(APIException) {};
// Test response code
Assert.AreEqual(200, httpCallBackHandler.Response.StatusCode,
"Status should be 200");
// Test whether the captured response is as we expected
Assert.IsNotNull(result, "Result should exist");
Assert.AreEqual(
4, result,
"Response should match expected value");
}
/// <summary>
/// TODO: Add description for test TestGetIntegerArray
/// </summary>
[Test]
public async Task TestGetIntegerArray()
{
// Perform API call
List<int> result = null;
try
{
result = await controller.GetIntegerArrayAsync();
}
catch(APIException) {};
// Test response code
Assert.AreEqual(200, httpCallBackHandler.Response.StatusCode,
"Status should be 200");
// Test whether the captured response is as we expected
Assert.IsNotNull(result, "Result should exist");
// Deserialize expected output
List<int> expected = APIHelper.JsonDeserialize<List<int>>(
"[1,2,3,4,5]");
Assert.IsTrue(result.IsSuperSetOf(expected), "Response array should have matching values");
}
/// <summary>
/// TODO: Add description for test TestGetDynamic
/// </summary>
[Test]
public async Task TestGetDynamic()
{
// Perform API call
dynamic result = null;
try
{
result = await controller.GetDynamicAsync();
}
catch(APIException) {};
// Test response code
Assert.AreEqual(200, httpCallBackHandler.Response.StatusCode,
"Status should be 200");
// Test whether the captured response is as we expected
Assert.IsNotNull(result, "Result should exist");
Assert.IsTrue(TestHelper.IsJsonObjectProperSubsetOf(
"{\"method\":\"GET\",\"body\":{},\"uploadCount\":0}",
TestHelper.ConvertStreamToString(httpCallBackHandler.Response.RawBody),
true, true, false),
"Response body should have matching keys");
}
/// <summary>
/// TODO: Add description for test TestGetDynamicArray
/// </summary>
[Test]
public async Task TestGetDynamicArray()
{
// Perform API call
dynamic result = null;
try
{
result = await controller.GetDynamicArrayAsync();
}
catch(APIException) {};
// Test response code
Assert.AreEqual(200, httpCallBackHandler.Response.StatusCode,
"Status should be 200");
// Test whether the captured response is as we expected
Assert.IsNotNull(result, "Result should exist");
Assert.IsTrue(TestHelper.IsJsonObjectProperSubsetOf(
"{\"method\":\"GET\",\"body\":{},\"uploadCount\":0}",
TestHelper.ConvertStreamToString(httpCallBackHandler.Response.RawBody),
true, true, false),
"Response body should have matching keys");
}
/// <summary>
/// TODO: Add description for test TestGetDatetime
/// </summary>
[Test]
public async Task TestGetDatetime()
{
// Perform API call
DateTime? result = null;
try
{
result = await controller.GetDatetimeAsync();
}
catch(APIException) {};
// Test response code
Assert.AreEqual(200, httpCallBackHandler.Response.StatusCode,
"Status should be 200");
// Test whether the captured response is as we expected
Assert.IsNotNull(result, "Result should exist");
Assert.AreEqual(
DateTime.ParseExact("2016-03-13T12:52:32.123Z", APIHelper.DateTimeFormat, CultureInfo.InvariantCulture, DateTimeStyles.RoundtripKind), result,
"Response should match expected value");
}
/// <summary>
/// TODO: Add description for test TestGetDatetimeArray
/// </summary>
[Test]
public async Task TestGetDatetimeArray()
{
// Perform API call
List<DateTime> result = null;
try
{
result = await controller.GetDatetimeArrayAsync();
}
catch(APIException) {};
// Test response code
Assert.AreEqual(200, httpCallBackHandler.Response.StatusCode,
"Status should be 200");
// Test whether the captured response is as we expected
Assert.IsNotNull(result, "Result should exist");
// Deserialize expected output
List<DateTime> expected = APIHelper.JsonDeserialize<List<DateTime>>(
"[\"2016-03-13T12:52:32.123Z\",\"2016-03-13T12:52:32.123Z\",\"2016-03-13T12:52:32.123Z\"]");
Assert.IsTrue(result.IsSuperSetOf(expected), "Response array should have matching values");
}
/// <summary>
/// TODO: Add description for test TestGetBoolean
/// </summary>
[Test]
public async Task TestGetBoolean()
{
// Perform API call
bool? result = null;
try
{
result = await controller.GetBooleanAsync();
}
catch(APIException) {};
// Test response code
Assert.AreEqual(200, httpCallBackHandler.Response.StatusCode,
"Status should be 200");
// Test whether the captured response is as we expected
Assert.IsNotNull(result, "Result should exist");
Assert.AreEqual(
true, result,
"Response should match expected value");
}
/// <summary>
/// TODO: Add description for test TestGetBooleanArray
/// </summary>
[Test]
public async Task TestGetBooleanArray()
{
// Perform API call
List<bool> result = null;
try
{
result = await controller.GetBooleanArrayAsync();
}
catch(APIException) {};
// Test response code
Assert.AreEqual(200, httpCallBackHandler.Response.StatusCode,
"Status should be 200");
// Test whether the captured response is as we expected
Assert.IsNotNull(result, "Result should exist");
// Deserialize expected output
List<bool> expected = APIHelper.JsonDeserialize<List<bool>>(
"[true, false, true, true, false]");
Assert.IsTrue(result.IsSuperSetOf(expected), "Response array should have matching values");
}
/// <summary>
/// TODO: Add description for test TestGetHeadersAllowExtra
/// </summary>
[Test]
public async Task TestGetHeadersAllowExtra()
{
// Perform API call
try
{
await controller.GetHeadersAsync();
}
catch(APIException) {};
// Test response code
Assert.AreEqual(200, httpCallBackHandler.Response.StatusCode,
"Status should be 200");
// Test headers
Dictionary<string, string> headers = new Dictionary<string, string>();
headers.Add("NauManAli", null);
headers.Add("WaseemHasAn", null);
Assert.IsTrue(TestHelper.AreHeadersProperSubsetOf (
headers, httpCallBackHandler.Response.Headers),
"Headers should match");
}
}
}
| 34.413613
| 1,113
| 0.51742
|
e1d08984c2e80cfa1c76e57f7c0ca1e154865caf
| 1,689
|
cs
|
C#
|
D2TxtImporter.lib/Model/Dictionaries/ItemTypes.cs
|
Elmegaard/D2TxtImporter
|
fba0958df9fe0cf89802c92d1bccaf0e9723ab54
|
[
"MIT"
] | 3
|
2020-04-18T10:26:35.000Z
|
2021-08-22T03:49:09.000Z
|
D2TxtImporter.lib/Model/Dictionaries/ItemTypes.cs
|
Elmegaard/D2TxtImporter
|
fba0958df9fe0cf89802c92d1bccaf0e9723ab54
|
[
"MIT"
] | 16
|
2019-12-05T09:07:06.000Z
|
2020-07-11T09:19:41.000Z
|
D2TxtImporter.lib/Model/Dictionaries/ItemTypes.cs
|
Elmegaard/D2TxtImporter
|
fba0958df9fe0cf89802c92d1bccaf0e9723ab54
|
[
"MIT"
] | 2
|
2021-08-22T03:49:10.000Z
|
2021-11-23T09:56:50.000Z
|
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace D2TxtImporter.lib.Model
{
public class ItemType
{
public string Name
{
get
{
if (Table.Tables.ContainsKey(Index))
{
return Table.GetValue(Index);
}
return Index;
}
}
public string Index { get; set; }
[JsonIgnore]
public string Code { get; set; }
public string Class { get; set; }
[JsonIgnore]
public string Equiv2 { get; set; }
[JsonIgnore]
public string Equiv1 { get; set; }
[JsonIgnore]
public string BodyLoc1 { get; set; }
[JsonIgnore]
public static Dictionary<string, ItemType> ItemTypes;
public static void Import(string excelFolder)
{
ItemTypes = new Dictionary<string, ItemType>();
var table = Importer.ReadTxtFileToDictionaryList(excelFolder + "/ItemTypes.txt");
foreach (var row in table)
{
var itemType = new ItemType
{
Index = row["ItemType"],
Code = row["Code"],
Equiv1 = row["Equiv1"],
Equiv2 = row["Equiv2"],
Class = row["Class"],
BodyLoc1 = row["BodyLoc1"]
};
ItemTypes[itemType.Code] = itemType;
}
}
public override string ToString()
{
return Index;
}
}
}
| 24.478261
| 93
| 0.487271
|
79802fd8e7c480c05a9fb857795fb09672ed6dc6
| 2,740
|
php
|
PHP
|
application/controllers/Parameters/Relacion/C_Relacion.php
|
visioncenterpro/visioncenterco
|
ac78455c357611cf380a3e1750981df72c9ce866
|
[
"MIT"
] | null | null | null |
application/controllers/Parameters/Relacion/C_Relacion.php
|
visioncenterpro/visioncenterco
|
ac78455c357611cf380a3e1750981df72c9ce866
|
[
"MIT"
] | null | null | null |
application/controllers/Parameters/Relacion/C_Relacion.php
|
visioncenterpro/visioncenterco
|
ac78455c357611cf380a3e1750981df72c9ce866
|
[
"MIT"
] | null | null | null |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class C_Relacion extends Controller {
public function __construct() {
parent::__construct();
$this->ValidateSession();
$this->load->model("Parameters/Relacion/M_Relacion");
}
public function index(){
// carga el menu y el css
$array['menus'] = $this->M_Main->ListMenu();
$Header['menu'] = $this->load->view('Template/Menu/V_Menu', $array, true);
$Header['array_css'] = array(DATATABLES_CSS, SWEETALERT_CSS);
$this->load->view('Template/V_Header', $Header);
// carga la vista principal
$data['relaciones'] = $this->M_Relacion->List_Rol_Menu();
$data['list_menu'] = $this->M_Relacion->List_Menu();
$data['list_rol'] = $this->M_Relacion->List_Rol();
$data['table'] = $this->load->view('Parameters/Relacion/V_Table_Relacion',$data,true);
$this->load->view('Parameters/Relacion/V_List_Relacion',$data);
// carga el footer y los js
$Footer['sidebar_tabs'] = $this->load->view('Template/V_sidebar_tabs', null, true);
$Footer['array_js'] = array(DATATABLES_JS, DATATABLES_JS_B, SWEETALERT_JS, SELECT2);
$Footer["btn_datatable"] = BTN_DATATABLE_JS;
$this->load->view('Template/V_Footer', $Footer);
}
public function create(){
$menu = $this->input->post('menu');
$rol = $this->input->post('rol');
for($i = 0; $i < count($menu); $i++){
$validate = $this->M_Relacion->get_relacion($menu[$i],$rol);
if(count($validate) == 0){
$insert = $this->M_Relacion->insert_relacion($menu[$i],$rol);
}else{
echo "ya existe";
}
}
}
public function getData(){
$id_relacion = $this->input->post('id_relacion');
$getData = $this->M_Relacion->get_roles_menu($id_relacion);
echo json_encode($getData);
}
public function Update(){
$id_relacion = $this->input->post('id_relacion');
$menu = $this->input->post('menu');
$rol = $this->input->post('rol');
for($i = 0; $i < count($menu); $i++){
$validate = $this->M_Relacion->get_relacion($menu[$i],$rol);
if(count($validate) == 0){
$update = $this->M_Relacion->Update_relacion($id_relacion,$menu[$i],$rol);
echo 'update';
}else{
echo 'no hace falta';
}
}
}
public function Delete(){
$id_relacion = $this->input->post('id_relacion');
$delete = $this->M_Relacion->Delete_relacion($id_relacion);
print_r($delete);
}
}
| 37.027027
| 94
| 0.555474
|
c6ac33f6d0e9b8c04154d64ec0fe93283c7ee4ac
| 151
|
css
|
CSS
|
11-module/1-task/src/style.css
|
js-tasks-ru/tasks-js-dom-interfaces
|
662729a9c4c49716e00e8906f40ffe323950f9a5
|
[
"Unlicense"
] | null | null | null |
11-module/1-task/src/style.css
|
js-tasks-ru/tasks-js-dom-interfaces
|
662729a9c4c49716e00e8906f40ffe323950f9a5
|
[
"Unlicense"
] | null | null | null |
11-module/1-task/src/style.css
|
js-tasks-ru/tasks-js-dom-interfaces
|
662729a9c4c49716e00e8906f40ffe323950f9a5
|
[
"Unlicense"
] | 1
|
2019-03-02T07:02:15.000Z
|
2019-03-02T07:02:15.000Z
|
.tooltip {
display: none;
padding: 5px;
border: 1px solid black;
}
.tooltip.tooltip_active {
display: block;
position: absolute;
}
| 15.1
| 28
| 0.635762
|
464060b8599188a1e02907d2ddd7d5c7ecac4f19
| 701
|
php
|
PHP
|
database/seeds/AddDataPermission.php
|
dbt123/vivandi
|
6bcf1f6599d65592187cdfcacfa69181902b852a
|
[
"MIT"
] | null | null | null |
database/seeds/AddDataPermission.php
|
dbt123/vivandi
|
6bcf1f6599d65592187cdfcacfa69181902b852a
|
[
"MIT"
] | null | null | null |
database/seeds/AddDataPermission.php
|
dbt123/vivandi
|
6bcf1f6599d65592187cdfcacfa69181902b852a
|
[
"MIT"
] | null | null | null |
<?php
use Illuminate\Database\Seeder;
use App\Admins;
use App\Permission;
class AddDataPermission extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$themtt = Permission::create([
'name' => 'Thêm Thuộc Tính',
'key' => str_slug('Thêm Thuộc Tính', '_')
]);
$suatt = Permission::create([
'name' => 'Sửa Thuộc Tính',
'key' => str_slug('Sửa Thuộc Tính', '_')
]);
$xoatt = Permission::create([
'name' => 'Xóa Thuộc Tính',
'key' => str_slug('Xóa Thuộc Tính', '_')
]);
}
}
| 22.612903
| 56
| 0.463623
|
0d7261c311ead3e1a20dc7c9926b7d4094daa06f
| 2,883
|
cs
|
C#
|
Sdl.Community.GroupShareKit.Tests.Integration/Clients/TranslationMemoryClientDatabaseServerTest.cs
|
Mihael-Harangus/groupsharekit.net
|
c3d4c70984cfdc02d73bb0150b2182b4de89ed37
|
[
"MIT"
] | 11
|
2016-02-18T11:34:10.000Z
|
2020-04-24T13:44:07.000Z
|
Sdl.Community.GroupShareKit.Tests.Integration/Clients/TranslationMemoryClientDatabaseServerTest.cs
|
Mihael-Harangus/groupsharekit.net
|
c3d4c70984cfdc02d73bb0150b2182b4de89ed37
|
[
"MIT"
] | 28
|
2015-11-19T14:57:33.000Z
|
2021-05-21T10:17:16.000Z
|
Sdl.Community.GroupShareKit.Tests.Integration/Clients/TranslationMemoryClientDatabaseServerTest.cs
|
Mihael-Harangus/groupsharekit.net
|
c3d4c70984cfdc02d73bb0150b2182b4de89ed37
|
[
"MIT"
] | 20
|
2015-12-28T14:25:59.000Z
|
2020-10-15T13:38:08.000Z
|
using Sdl.Community.GroupShareKit.Models.Response.TranslationMemory;
using System;
using System.Threading.Tasks;
using Sdl.Community.GroupShareKit.Exceptions;
using Xunit;
namespace Sdl.Community.GroupShareKit.Tests.Integration.Clients
{
public class TranslationMemoryClientDatabaseServerTest
{
private static readonly GroupShareClient gsClient = Helper.GsClient;
[Fact]
public async Task GetDbServers()
{
var serverId = await CreateNewDbServer();
var response = await gsClient.TranslationMemories.GetDbServers();
Assert.True(response.Items.Count > 0);
await gsClient.TranslationMemories.DeleteDbServer(serverId);
}
[Fact]
public async Task CreateDbServer()
{
var serverId = await CreateNewDbServer();
Assert.True(serverId != string.Empty);
await gsClient.TranslationMemories.DeleteDbServer(serverId);
}
[Fact]
public async Task GetDbServer()
{
var serverId = await CreateNewDbServer();
var server = await gsClient.TranslationMemories.GetDbServerById(serverId);
Assert.Equal(server.DatabaseServerId, serverId);
await gsClient.TranslationMemories.DeleteDbServer(serverId);
}
[Fact]
public async Task UpdateDbServer()
{
var serverId = await CreateNewDbServer();
Assert.True(serverId != string.Empty);
var request = new RequestDbServer("Updated server name", "", "", "");
await gsClient.TranslationMemories.UpdateDbServer(serverId, request);
var updatedServer = await gsClient.TranslationMemories.GetDbServerById(serverId);
Assert.Equal("Updated server name", updatedServer.Name);
await gsClient.TranslationMemories.DeleteDbServer(serverId);
}
[Fact]
public async Task DeleteDbServer()
{
var serverId = await CreateNewDbServer();
await gsClient.TranslationMemories.DeleteDbServer(serverId).ConfigureAwait(false);
Task result() => gsClient.TranslationMemories.GetDbServerById(serverId);
await Assert.ThrowsAsync<ForbiddenException>(result);
}
public async Task<string> CreateNewDbServer()
{
var dbServerRequest = new DatabaseServerRequest
{
DatabaseServerId = Guid.NewGuid().ToString(),
Name = "Test Server",
Description = "Added from kit",
OwnerId = Helper.OrganizationId,
Location = Helper.OrganizationPath,
Host = Helper.GsServerName
};
var serverId = await gsClient.TranslationMemories.CreateDbServer(dbServerRequest);
return serverId;
}
}
}
| 33.917647
| 94
| 0.631634
|
f62c774804c8fcdd943e390a2986dfc121767fd9
| 738
|
sh
|
Shell
|
code/12_create_vcf.sh
|
aavibk98/aavibk98-bioinformatics-final-project-
|
912b611627d1c851bbb74f1aabe3354ed36177bc
|
[
"CC-BY-4.0"
] | null | null | null |
code/12_create_vcf.sh
|
aavibk98/aavibk98-bioinformatics-final-project-
|
912b611627d1c851bbb74f1aabe3354ed36177bc
|
[
"CC-BY-4.0"
] | null | null | null |
code/12_create_vcf.sh
|
aavibk98/aavibk98-bioinformatics-final-project-
|
912b611627d1c851bbb74f1aabe3354ed36177bc
|
[
"CC-BY-4.0"
] | null | null | null |
#!/usr/bin/env bash
set -euo pipefail
# Naupaka Zimmerman
# nzimmerman@usfca.edu
# November 1, 2020
# on RAID
OUTPUT_DIR="/data/sars_vcf_analysis/10_vcf_called/"
if [ $# -eq 0 ]
then
echo "This script will call variants on the bcf files it is given."
echo "Please supply a set of bcf files as arguments."
exit 1
fi
# this is where the SNPs are actually called for each input file
# using ploidy 1 for the viral genome; should be changed for other analyses
for bcf_file in "$@"
do
# use -m for multiallelic caller (viral population) and -v to output only variants
echo "Calling varants for ${bcf_file}..."
bcftools call --ploidy 1 -m -v -o "${OUTPUT_DIR}$(basename "$bcf_file").variants.vcf" "$bcf_file"
done
| 27.333333
| 101
| 0.708672
|
a49d10b80eb0113579972541cab2ad09931163d7
| 301
|
sql
|
SQL
|
oracle_script/STANDARD_DATA/toggleTriggers.sql
|
BrettPWRE/HDB
|
be7cd4f20064f3f0599810ebf4c6fe85e67ccfac
|
[
"Apache-2.0"
] | null | null | null |
oracle_script/STANDARD_DATA/toggleTriggers.sql
|
BrettPWRE/HDB
|
be7cd4f20064f3f0599810ebf4c6fe85e67ccfac
|
[
"Apache-2.0"
] | null | null | null |
oracle_script/STANDARD_DATA/toggleTriggers.sql
|
BrettPWRE/HDB
|
be7cd4f20064f3f0599810ebf4c6fe85e67ccfac
|
[
"Apache-2.0"
] | null | null | null |
set echo off
set heading off
set feedback off
set pagesize 0
set linesize 100
set verify off
spool ./STANDARD_DATA/trigger_script.sql
select distinct 'ALTER TRIGGER '||trigger_name||upper(' &1')||';'
from user_triggers
/
spool off;
set echo on
set feedback on
@./STANDARD_DATA/trigger_script
quit
| 15.842105
| 65
| 0.770764
|
dca635b24d116b70ea4e210d87f967b375009595
| 951
|
rb
|
Ruby
|
lib/assert-activerecord4/adapter.rb
|
redding/assert-activerecord4
|
16483b76338f46850a6c3cf6b4f1f4d8f2a07702
|
[
"MIT"
] | null | null | null |
lib/assert-activerecord4/adapter.rb
|
redding/assert-activerecord4
|
16483b76338f46850a6c3cf6b4f1f4d8f2a07702
|
[
"MIT"
] | 1
|
2018-10-21T13:45:46.000Z
|
2018-10-21T13:45:46.000Z
|
lib/assert-activerecord4/adapter.rb
|
redding/assert-activerecord4
|
16483b76338f46850a6c3cf6b4f1f4d8f2a07702
|
[
"MIT"
] | null | null | null |
require "active_record"
require "active_record/tasks/database_tasks"
require "assert-activerecord/adapter"
module AssertActiveRecord4
class Adapter
include AssertActiveRecord::Adapter
def self.database_tasks
ActiveRecord::Tasks::DatabaseTasks
end
def drop_db
self.class.database_tasks.drop_current(self.test_env_name)
end
def create_db
self.class.database_tasks.create_current(self.test_env_name)
end
def load_schema
# ActiveRecord::Base.schema_format can either be `:ruby` or `:sql`
self.class.database_tasks.load_schema(
ActiveRecord::Base.schema_format,
ENV["SCHEMA"],
self.test_env_name
)
end
def connect_db
ActiveRecord::Base.establish_connection(self.test_env_name)
end
def transaction(&block)
ActiveRecord::Base.transaction(&block)
end
def rollback!
raise ActiveRecord::Rollback
end
end
end
| 20.673913
| 72
| 0.705573
|
5e1d071b315b9d10303fe853066127aecba269d4
| 1,645
|
rb
|
Ruby
|
app/models/notification.rb
|
azmedien/kolibri-cockpit
|
4aa7ba309a592d04b6009307ca64be59ee914ae8
|
[
"Apache-2.0"
] | 1
|
2017-11-25T11:13:37.000Z
|
2017-11-25T11:13:37.000Z
|
app/models/notification.rb
|
azmedien/kolibri-cockpit
|
4aa7ba309a592d04b6009307ca64be59ee914ae8
|
[
"Apache-2.0"
] | null | null | null |
app/models/notification.rb
|
azmedien/kolibri-cockpit
|
4aa7ba309a592d04b6009307ca64be59ee914ae8
|
[
"Apache-2.0"
] | null | null | null |
class Notification < ApplicationRecord
include ActionView::Helpers::DateHelper
validates :title, presence: true
validates :body, presence: true
validates :url, presence: true
validates :app, presence: true
validates :user, presence: true
belongs_to :app
belongs_to :user
belongs_to :rpush_app, class_name: 'Rpush::Client::ActiveRecord::App'
belongs_to :rpush_notification, class_name: 'Rpush::Client::ActiveRecord::Notification', optional: true
validate :url_contains_a_valid_deeplink
after_validation :scrub_control_chars
def scrub_control_chars
self.title.gsub!(/[\u200B-\u200D\uFEFF]/, '')
self.body.gsub!(/[\u200B-\u200D\uFEFF]/, '')
self.url.gsub!(/[\u200B-\u200D\uFEFF]/, '')
end
def url_contains_a_valid_deeplink
return if url.starts_with? 'http'
items = JSON.parse(app.runtime)['navigation']['items']
unless items.map { |x| x['component'] }.uniq.include? url
errors.add(:url, 'contains a deep link which is not supported by this app.')
end
end
def is_scheduled?
new_record? || updated_at <= scheduled_for
end
def status
rpush = rpush_notification
if rpush
return "processed #{time_ago_in_words(updated_at)} ago" if rpush.processing
return "delivered #{time_ago_in_words(rpush.delivered_at)} ago" if rpush.delivered
return "failed #{time_ago_in_words(rpush.failed_at)} ago" if rpush.failed
end
"scheduled for #{time_ago_in_words(scheduled_for)} from now"
end
def delivered?
rpush_notification && rpush_notification.delivered
end
def failed?
rpush_notification && rpush_notification.failed
end
end
| 28.362069
| 105
| 0.721581
|
0591874827551ca5b6db65eab6d19660c6f4adf5
| 1,639
|
rb
|
Ruby
|
lib/guard/bosh/job_default_properties_loader.rb
|
CloudCredo/guard-bosh
|
1f8ef2baeba724a7b7675e5e7aa0a2830499d953
|
[
"Apache-2.0"
] | 4
|
2015-08-18T10:17:43.000Z
|
2019-01-11T04:20:59.000Z
|
lib/guard/bosh/job_default_properties_loader.rb
|
CloudCredo/guard-bosh
|
1f8ef2baeba724a7b7675e5e7aa0a2830499d953
|
[
"Apache-2.0"
] | null | null | null |
lib/guard/bosh/job_default_properties_loader.rb
|
CloudCredo/guard-bosh
|
1f8ef2baeba724a7b7675e5e7aa0a2830499d953
|
[
"Apache-2.0"
] | null | null | null |
require 'yaml'
module Guard
class Bosh
# The property defaults (if any) defined for a BOSH job in the job spec.
class JobDefaultPropertiesLoader
def initialize(release_dir:)
@release_dir = release_dir
end
def load_properties(job)
properties = job_spec(job[:job_name]).fetch('properties')
expand(
intermediate_properties(properties).merge(
default_properties(properties)
)
)
end
private
def default_properties(properties)
defaults_only = properties.map do |property, config|
[property, config['default']]
end
Hash[defaults_only].reject { |_k, v| v.nil? }
end
def intermediate_properties(properties)
intermediates = properties.keys.map do |key|
key.split('.')[0..-2].join('.')
end.sort.uniq
Hash[intermediates.zip(intermediates.map { |_t| {} })]
end
def job_spec(job_name)
YAML.load_file(@release_dir + 'jobs' + job_name + 'spec')
end
def expand(properties)
properties.each_with_object({}) do |property, expanded|
key, value = property
current = expanded
each_parent(key) do |parent|
current[parent] = {} unless current.key?(parent)
current = current[parent]
end
current[leaf(key)] = value
end
end
def each_parent(key)
path = key.split('.')
path[0...-1].each do |parent|
yield parent
end
end
def leaf(key)
key.split('.').last
end
end
end
end
| 25.215385
| 76
| 0.5723
|
46cf5c402bcc09ca53f5840cff174597c09f89a5
| 3,175
|
py
|
Python
|
src/crawlers/nike.py
|
Brunopaes/python-sandbox
|
c51f716785bf11789b13f9bb24bfd76108eaec08
|
[
"MIT"
] | 5
|
2020-08-04T00:13:06.000Z
|
2022-03-18T09:18:29.000Z
|
src/crawlers/nike.py
|
Brunopaes/python-sandbox
|
c51f716785bf11789b13f9bb24bfd76108eaec08
|
[
"MIT"
] | null | null | null |
src/crawlers/nike.py
|
Brunopaes/python-sandbox
|
c51f716785bf11789b13f9bb24bfd76108eaec08
|
[
"MIT"
] | 2
|
2020-06-26T13:42:17.000Z
|
2020-08-04T00:13:10.000Z
|
# -*- coding: utf-8 -*-
from selenium import webdriver
import time
url = 'https://www.nike.com.br/'
driver = webdriver.Chrome('../../drivers/chromedriver.exe')
js = """fetch("https://www.nike.com.br/Cliente/LogarNike", {
"credentials": "include",
"headers": {
"accept": "application/json, text/javascript, /; q=0.01",
"accept-language": "en-US,en;q=0.9,pt;q=0.8",
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
"sec-fetch-dest": "empty",
"sec-fetch-mode": "cors",
"sec-fetch-site": "same-origin",
"x-requested-with": "XMLHttpRequest"
},
"referrer": "https://www.nike.com.br/Pedido/Acompanhamento/todos",
"referrerPolicy": "no-referrer-when-downgrade",
"body": "user%5Bcontact%5D%5Bemail%5D%5Baddress%5D=pedronegri%40me.com&user%5Bdob%5D%5Bdate%5D=-2198707200000&user%5Bdob%5D%5Bday%5D=30&user%5Bdob%5D%5Bmonth%5D=4&user%5Bdob%5D%5Byear%5D=1900&user%5Bgender%5D=M&user%5Bmarketing%5D%5Bdatashare%5D%5B00001%5D%5Bid%5D=00001&user%5Bmarketing%5D%5Bdatashare%5D%5B00001%5D%5Bactive%5D=true&user%5Bmarketing%5D%5Bemail%5D=true&user%5Bmarketing%5D%5Bsms%5D=true&user%5Bname%5D%5Blatin%5D%5Bfamily%5D=Arenas&user%5Bname%5D%5Blatin%5D%5Bgiven%5D=Pedro&user%5BnuId%5D=10032C8967D32ED0E0534C1C070A6370&user%5BupmId%5D=12774933647&user%5BdaysSinceLastVisit%5D=0&address%5Bshipping%5D%5Bcode%5D=09090-000&address%5Bshipping%5D%5Bcountry%5D=BR&address%5Bshipping%5D%5Bguid%5D=6406ee0d-416f-41ad-94c1-4e9387b65e13&address%5Bshipping%5D%5Blabel%5D=Principal&address%5Bshipping%5D%5Bline1%5D=Rua+das+Aroeiras%2C+900&address%5Bshipping%5D%5Bline2%5D=161&address%5Bshipping%5D%5Blocality%5D=Santo+Andr%C3%A9&address%5Bshipping%5D%5Bpreferred%5D=true&address%5Bshipping%5D%5Bprovince%5D=SP&address%5Bshipping%5D%5Bregion%5D=Jardim&address%5Bshipping%5D%5Btype%5D=SHIPPING&address%5B7964b9c1-c53f-4361-b720-9fc16d47a192%5D%5Bcode%5D=09090-000&address%5B7964b9c1-c53f-4361-b720-9fc16d47a192%5D%5Bcountry%5D=BR&address%5B7964b9c1-c53f-4361-b720-9fc16d47a192%5D%5Bguid%5D=7964b9c1-c53f-4361-b720-9fc16d47a192&address%5B7964b9c1-c53f-4361-b720-9fc16d47a192%5D%5Blabel%5D=Rua+das+Aroeiras&address%5B7964b9c1-c53f-4361-b720-9fc16d47a192%5D%5Bline1%5D=Rua+das+Aroeiras%2C+900&address%5B7964b9c1-c53f-4361-b720-9fc16d47a192%5D%5Bline2%5D=Apt+161&address%5B7964b9c1-c53f-4361-b720-9fc16d47a192%5D%5Blocality%5D=Santo+Andr%C3%A9&address%5B7964b9c1-c53f-4361-b720-9fc16d47a192%5D%5Bpreferred%5D=false&address%5B7964b9c1-c53f-4361-b720-9fc16d47a192%5D%5Bprovince%5D=SP&address%5B7964b9c1-c53f-4361-b720-9fc16d47a192%5D%5Bregion%5D=Jardim&address%5B7964b9c1-c53f-4361-b720-9fc16d47a192%5D%5Btype%5D=SHIPPING",
"method": "POST",
"mode": "cors"
})"""
driver.get(url)
driver.execute_script(js)
products = (
'https://www.nike.com.br/chuteira-nike-phantom-gt-elite-3d-unissex-153-169-171-316414?gridPosition=A1',
'https://www.nike.com.br/tenis-nike-zoomx-vaporfly-next-2-feminino-1-16-214-311846?gridPosition=A2',
'https://www.nike.com.br/tenis-nike-zoom-fly-3-feminino-1-16-214-305856?gridPosition=A3',
)
for product in products:
driver.get(product)
driver.implicitly_wait(1)
| 79.375
| 1,928
| 0.763465
|
2db6eeac8c29c8b1c1695cfd52e1a1b63ac703f2
| 184
|
cpp
|
C++
|
src/src/global_data.cpp
|
wanderingThroughSpaceAndTime/HaxBall
|
fc6a3e490a7c043cdbc9ec9018a8c7da23d14574
|
[
"MIT"
] | null | null | null |
src/src/global_data.cpp
|
wanderingThroughSpaceAndTime/HaxBall
|
fc6a3e490a7c043cdbc9ec9018a8c7da23d14574
|
[
"MIT"
] | null | null | null |
src/src/global_data.cpp
|
wanderingThroughSpaceAndTime/HaxBall
|
fc6a3e490a7c043cdbc9ec9018a8c7da23d14574
|
[
"MIT"
] | null | null | null |
#include "peerdata.h"
#include <vector>
int num_players=1;
int connecthash[100];
int packethash[100];
bool sendmydata=false;
bool game_mode=false;
vector<peerdata> gamers;
int my_num;
| 18.4
| 24
| 0.777174
|
51845c6466529d779bc715615a64f6c8c674964d
| 406
|
lua
|
Lua
|
Utility/XapperLoader.lua
|
RobloxArchiver/Xapper-Addon-Loader
|
dcea5f4702fa8d32439e0dcd97837175f40790e7
|
[
"WTFPL"
] | 1
|
2022-01-12T20:38:43.000Z
|
2022-01-12T20:38:43.000Z
|
Utility/XapperLoader.lua
|
RobloxArchiver/Xapper-Addon-Loader
|
dcea5f4702fa8d32439e0dcd97837175f40790e7
|
[
"WTFPL"
] | null | null | null |
Utility/XapperLoader.lua
|
RobloxArchiver/Xapper-Addon-Loader
|
dcea5f4702fa8d32439e0dcd97837175f40790e7
|
[
"WTFPL"
] | null | null | null |
-- < VARIABLES >
local syn = is_synapse_function
local krnl = KRNL_LOADED
-- < CODE >
if is_synapse_function then
loadstring(game:HttpGet("https://raw.githubusercontent.com/RobloxArchiver/Xapper-Addon-Loader/main/Scripts/SYN_Xapper.lua", true))()
elseif krnl then
loadstring(game:HttpGet("https://raw.githubusercontent.com/RobloxArchiver/Xapper-Addon-Loader/main/Scripts/KRNL_Xapper.lua", true))()
end
| 40.6
| 135
| 0.785714
|
a4943da60be8a801a4c4d1bef884eb803b66860c
| 1,060
|
php
|
PHP
|
resources/views/dashboards/orderAddresses/edit_orderAddress.blade.php
|
ivt-ph40/BookStore
|
424e5a146526c16de2d83b1ff6983e57b66b0562
|
[
"MIT"
] | null | null | null |
resources/views/dashboards/orderAddresses/edit_orderAddress.blade.php
|
ivt-ph40/BookStore
|
424e5a146526c16de2d83b1ff6983e57b66b0562
|
[
"MIT"
] | null | null | null |
resources/views/dashboards/orderAddresses/edit_orderAddress.blade.php
|
ivt-ph40/BookStore
|
424e5a146526c16de2d83b1ff6983e57b66b0562
|
[
"MIT"
] | null | null | null |
@extends('dashboards.layout.master')
@section('content')
<h1>Edit OrderAddresses</h1>
<form action="{{route('dashboards.orderAddresses.update', $orderAddresses->id)}}" method="POST" role="form">
@csrf
@method('PUT')
<div class="form-group">
<label for="">Email</label>
<input type="email" class="form-control" name="email" placeholder="Input field" value="{{$orderAddresses->email}}">
</div>
<div class="form-group">
<label for="">Notes</label>
<input type="text" class="form-control" name="notes" placeholder="Input field" value="{{$orderAddresses->notes}}">
</div>
<div class="form-group">
<label for="">Phone</label>
<input type="text" class="form-control" name="phone" placeholder="Input field" value="{{$orderAddresses->phone}}">
</div>
<div class="form-group">
<label for="">Order ID</label>
<input type="number" class="form-control" name="order_id" placeholder="Input field" value="{{$orderAddresses->order_id}}">
</div>
<button type="submit" class="btn btn-primary" action="update">Update</button>
</form>
@endsection
| 33.125
| 124
| 0.683019
|
8ed16c8c0b96003eee606a4c1aaba1323aef66f4
| 900
|
js
|
JavaScript
|
gulpfile.js
|
fortes1219/sass_0208
|
555e15e2d9012f412bc433d833d9d44046a67171
|
[
"MIT"
] | 1
|
2020-01-04T02:15:54.000Z
|
2020-01-04T02:15:54.000Z
|
gulpfile.js
|
fortes1219/sass_0208
|
555e15e2d9012f412bc433d833d9d44046a67171
|
[
"MIT"
] | null | null | null |
gulpfile.js
|
fortes1219/sass_0208
|
555e15e2d9012f412bc433d833d9d44046a67171
|
[
"MIT"
] | 1
|
2019-12-16T07:46:11.000Z
|
2019-12-16T07:46:11.000Z
|
const gulp = require('gulp') // 載入 gulp
const gulpSass = require('gulp-sass') // 載入 gulp-sass
const autoprefixer = require('gulp-autoprefixer')
const browserSync = require('browser-sync').create()
const connect = require('gulp-connect')
const sourcemaps = require("gulp-sourcemaps")
function styles() {
return (
gulp
// 指定要處理的 Scss 檔案目錄
.src("./src/scss/**/*.scss")
.pipe(sourcemaps.init())
// 編譯 Scss
.pipe(gulpSass({
outputStyle: 'compressed'
}))
.on("error", gulpSass.logError)
.pipe(sourcemaps.write())
// 指定編譯後的 css 檔案目錄
.pipe(gulp.dest("./src/css"))
.pipe(browserSync.stream())
);
}
function watch() {
browserSync.init({
server: {
baseDir: "./src/"
}
});
gulp.watch('./src/scss/**/*.scss', styles)
gulp.watch("./src/**/*.html", reload);
}
function reload() {
browserSync.reload();
}
exports.watch = watch
exports.styles = styles;
| 21.428571
| 54
| 0.635556
|
d3846a56f17e0fdabe832079af12843852501329
| 1,184
|
rb
|
Ruby
|
lib/api_sim/matchers/request_body_matcher.rb
|
schulzzw/api_sim
|
a28071a75e5fbc426b9b481f5bb29a20659b82d8
|
[
"MIT"
] | 8
|
2016-04-29T02:58:02.000Z
|
2020-03-20T12:27:20.000Z
|
lib/api_sim/matchers/request_body_matcher.rb
|
schulzzw/api_sim
|
a28071a75e5fbc426b9b481f5bb29a20659b82d8
|
[
"MIT"
] | 39
|
2016-04-29T02:58:01.000Z
|
2022-02-26T03:34:43.000Z
|
lib/api_sim/matchers/request_body_matcher.rb
|
schulzzw/api_sim
|
a28071a75e5fbc426b9b481f5bb29a20659b82d8
|
[
"MIT"
] | 7
|
2016-04-29T21:01:04.000Z
|
2020-07-22T03:51:50.000Z
|
require 'mustermann'
require 'api_sim/recorded_request'
require 'api_sim/matchers/base_matcher'
module ApiSim
module Matchers
class RequestBodyMatcher < BaseMatcher
attr_reader :http_method, :route, :headers, :response_code, :matcher, :response_body, :default, :schema, :query
def initialize(http_method:, route:, response_code: 200, response_body: '', headers: {}, default: false, body_matches:, schema: nil)
@default = default
@matcher = Regexp.compile(body_matches)
@headers = headers
@response_body = response_body
@response_code = response_code
@route = Mustermann.new(route)
@http_method = http_method
@schema = schema
end
def matches?(request)
request.body.rewind
body = request.body.read
request.body.rewind
route.match(request.path) && request.request_method == http_method && matcher.match(body)
end
def match_on_body?
true
end
def to_s
<<-DOC.gsub(/^\s+/, '')
#{http_method} #{route} /#{matcher.source}/ -> (#{response_code}) #{response_body[0..20]}...
DOC
end
end
end
end
| 30.358974
| 138
| 0.632601
|
d55a7ea414d1e0df015d4ad2d6c802d26d1cad1e
| 33,289
|
go
|
Go
|
api/bff/admin/v1/shop_admin.pb.go
|
jackycsl/catalog
|
86dbffa65dd026da4812286f4007ed0c7c8002a2
|
[
"MIT"
] | null | null | null |
api/bff/admin/v1/shop_admin.pb.go
|
jackycsl/catalog
|
86dbffa65dd026da4812286f4007ed0c7c8002a2
|
[
"MIT"
] | null | null | null |
api/bff/admin/v1/shop_admin.pb.go
|
jackycsl/catalog
|
86dbffa65dd026da4812286f4007ed0c7c8002a2
|
[
"MIT"
] | null | null | null |
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.1
// protoc v3.19.3
// source: api/bff/admin/v1/shop_admin.proto
package v1
import (
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type ListGameReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
PageNum int64 `protobuf:"varint,1,opt,name=page_num,json=pageNum,proto3" json:"page_num,omitempty"`
PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
}
func (x *ListGameReq) Reset() {
*x = ListGameReq{}
if protoimpl.UnsafeEnabled {
mi := &file_api_bff_admin_v1_shop_admin_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListGameReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListGameReq) ProtoMessage() {}
func (x *ListGameReq) ProtoReflect() protoreflect.Message {
mi := &file_api_bff_admin_v1_shop_admin_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListGameReq.ProtoReflect.Descriptor instead.
func (*ListGameReq) Descriptor() ([]byte, []int) {
return file_api_bff_admin_v1_shop_admin_proto_rawDescGZIP(), []int{0}
}
func (x *ListGameReq) GetPageNum() int64 {
if x != nil {
return x.PageNum
}
return 0
}
func (x *ListGameReq) GetPageSize() int64 {
if x != nil {
return x.PageSize
}
return 0
}
type ListGameReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Results []*ListGameReply_Game `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
}
func (x *ListGameReply) Reset() {
*x = ListGameReply{}
if protoimpl.UnsafeEnabled {
mi := &file_api_bff_admin_v1_shop_admin_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListGameReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListGameReply) ProtoMessage() {}
func (x *ListGameReply) ProtoReflect() protoreflect.Message {
mi := &file_api_bff_admin_v1_shop_admin_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListGameReply.ProtoReflect.Descriptor instead.
func (*ListGameReply) Descriptor() ([]byte, []int) {
return file_api_bff_admin_v1_shop_admin_proto_rawDescGZIP(), []int{1}
}
func (x *ListGameReply) GetResults() []*ListGameReply_Game {
if x != nil {
return x.Results
}
return nil
}
type GetGameReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetGameReq) Reset() {
*x = GetGameReq{}
if protoimpl.UnsafeEnabled {
mi := &file_api_bff_admin_v1_shop_admin_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetGameReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetGameReq) ProtoMessage() {}
func (x *GetGameReq) ProtoReflect() protoreflect.Message {
mi := &file_api_bff_admin_v1_shop_admin_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetGameReq.ProtoReflect.Descriptor instead.
func (*GetGameReq) Descriptor() ([]byte, []int) {
return file_api_bff_admin_v1_shop_admin_proto_rawDescGZIP(), []int{2}
}
func (x *GetGameReq) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
type GetGameReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
Count int64 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"`
}
func (x *GetGameReply) Reset() {
*x = GetGameReply{}
if protoimpl.UnsafeEnabled {
mi := &file_api_bff_admin_v1_shop_admin_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetGameReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetGameReply) ProtoMessage() {}
func (x *GetGameReply) ProtoReflect() protoreflect.Message {
mi := &file_api_bff_admin_v1_shop_admin_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetGameReply.ProtoReflect.Descriptor instead.
func (*GetGameReply) Descriptor() ([]byte, []int) {
return file_api_bff_admin_v1_shop_admin_proto_rawDescGZIP(), []int{3}
}
func (x *GetGameReply) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *GetGameReply) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *GetGameReply) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *GetGameReply) GetCount() int64 {
if x != nil {
return x.Count
}
return 0
}
type CreateGameReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
Count int64 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"`
}
func (x *CreateGameReq) Reset() {
*x = CreateGameReq{}
if protoimpl.UnsafeEnabled {
mi := &file_api_bff_admin_v1_shop_admin_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CreateGameReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateGameReq) ProtoMessage() {}
func (x *CreateGameReq) ProtoReflect() protoreflect.Message {
mi := &file_api_bff_admin_v1_shop_admin_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CreateGameReq.ProtoReflect.Descriptor instead.
func (*CreateGameReq) Descriptor() ([]byte, []int) {
return file_api_bff_admin_v1_shop_admin_proto_rawDescGZIP(), []int{4}
}
func (x *CreateGameReq) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CreateGameReq) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *CreateGameReq) GetCount() int64 {
if x != nil {
return x.Count
}
return 0
}
type CreateGameReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
Count int64 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"`
}
func (x *CreateGameReply) Reset() {
*x = CreateGameReply{}
if protoimpl.UnsafeEnabled {
mi := &file_api_bff_admin_v1_shop_admin_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CreateGameReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateGameReply) ProtoMessage() {}
func (x *CreateGameReply) ProtoReflect() protoreflect.Message {
mi := &file_api_bff_admin_v1_shop_admin_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CreateGameReply.ProtoReflect.Descriptor instead.
func (*CreateGameReply) Descriptor() ([]byte, []int) {
return file_api_bff_admin_v1_shop_admin_proto_rawDescGZIP(), []int{5}
}
func (x *CreateGameReply) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *CreateGameReply) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *CreateGameReply) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *CreateGameReply) GetCount() int64 {
if x != nil {
return x.Count
}
return 0
}
type UpdateGameReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
Count int64 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"`
}
func (x *UpdateGameReq) Reset() {
*x = UpdateGameReq{}
if protoimpl.UnsafeEnabled {
mi := &file_api_bff_admin_v1_shop_admin_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UpdateGameReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdateGameReq) ProtoMessage() {}
func (x *UpdateGameReq) ProtoReflect() protoreflect.Message {
mi := &file_api_bff_admin_v1_shop_admin_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UpdateGameReq.ProtoReflect.Descriptor instead.
func (*UpdateGameReq) Descriptor() ([]byte, []int) {
return file_api_bff_admin_v1_shop_admin_proto_rawDescGZIP(), []int{6}
}
func (x *UpdateGameReq) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *UpdateGameReq) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *UpdateGameReq) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *UpdateGameReq) GetCount() int64 {
if x != nil {
return x.Count
}
return 0
}
type UpdateGameReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
Count int64 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"`
}
func (x *UpdateGameReply) Reset() {
*x = UpdateGameReply{}
if protoimpl.UnsafeEnabled {
mi := &file_api_bff_admin_v1_shop_admin_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UpdateGameReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdateGameReply) ProtoMessage() {}
func (x *UpdateGameReply) ProtoReflect() protoreflect.Message {
mi := &file_api_bff_admin_v1_shop_admin_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UpdateGameReply.ProtoReflect.Descriptor instead.
func (*UpdateGameReply) Descriptor() ([]byte, []int) {
return file_api_bff_admin_v1_shop_admin_proto_rawDescGZIP(), []int{7}
}
func (x *UpdateGameReply) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *UpdateGameReply) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *UpdateGameReply) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *UpdateGameReply) GetCount() int64 {
if x != nil {
return x.Count
}
return 0
}
type DeleteGameReq struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *DeleteGameReq) Reset() {
*x = DeleteGameReq{}
if protoimpl.UnsafeEnabled {
mi := &file_api_bff_admin_v1_shop_admin_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeleteGameReq) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteGameReq) ProtoMessage() {}
func (x *DeleteGameReq) ProtoReflect() protoreflect.Message {
mi := &file_api_bff_admin_v1_shop_admin_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeleteGameReq.ProtoReflect.Descriptor instead.
func (*DeleteGameReq) Descriptor() ([]byte, []int) {
return file_api_bff_admin_v1_shop_admin_proto_rawDescGZIP(), []int{8}
}
func (x *DeleteGameReq) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
type DeleteGameReply struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *DeleteGameReply) Reset() {
*x = DeleteGameReply{}
if protoimpl.UnsafeEnabled {
mi := &file_api_bff_admin_v1_shop_admin_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeleteGameReply) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteGameReply) ProtoMessage() {}
func (x *DeleteGameReply) ProtoReflect() protoreflect.Message {
mi := &file_api_bff_admin_v1_shop_admin_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeleteGameReply.ProtoReflect.Descriptor instead.
func (*DeleteGameReply) Descriptor() ([]byte, []int) {
return file_api_bff_admin_v1_shop_admin_proto_rawDescGZIP(), []int{9}
}
type ListGameReply_Game struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
Count int64 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"`
}
func (x *ListGameReply_Game) Reset() {
*x = ListGameReply_Game{}
if protoimpl.UnsafeEnabled {
mi := &file_api_bff_admin_v1_shop_admin_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListGameReply_Game) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListGameReply_Game) ProtoMessage() {}
func (x *ListGameReply_Game) ProtoReflect() protoreflect.Message {
mi := &file_api_bff_admin_v1_shop_admin_proto_msgTypes[10]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ListGameReply_Game.ProtoReflect.Descriptor instead.
func (*ListGameReply_Game) Descriptor() ([]byte, []int) {
return file_api_bff_admin_v1_shop_admin_proto_rawDescGZIP(), []int{1, 0}
}
func (x *ListGameReply_Game) GetId() int64 {
if x != nil {
return x.Id
}
return 0
}
func (x *ListGameReply_Game) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *ListGameReply_Game) GetDescription() string {
if x != nil {
return x.Description
}
return ""
}
func (x *ListGameReply_Game) GetCount() int64 {
if x != nil {
return x.Count
}
return 0
}
var File_api_bff_admin_v1_shop_admin_proto protoreflect.FileDescriptor
var file_api_bff_admin_v1_shop_admin_proto_rawDesc = []byte{
0x0a, 0x21, 0x61, 0x70, 0x69, 0x2f, 0x62, 0x66, 0x66, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f,
0x76, 0x31, 0x2f, 0x73, 0x68, 0x6f, 0x70, 0x5f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e,
0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61,
0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x22, 0x45, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x12,
0x19, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28,
0x03, 0x52, 0x07, 0x70, 0x61, 0x67, 0x65, 0x4e, 0x75, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61,
0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70,
0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0xb0, 0x01, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74,
0x47, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x3b, 0x0a, 0x07, 0x72, 0x65, 0x73,
0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x68, 0x6f,
0x70, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47,
0x61, 0x6d, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x2e, 0x47, 0x61, 0x6d, 0x65, 0x52, 0x07, 0x72,
0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x1a, 0x62, 0x0a, 0x04, 0x47, 0x61, 0x6d, 0x65, 0x12, 0x0e,
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12,
0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20,
0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x1c, 0x0a, 0x0a, 0x47, 0x65,
0x74, 0x47, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x6a, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x47,
0x61, 0x6d, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b,
0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28,
0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14,
0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x22, 0x5b, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x61,
0x6d, 0x65, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73,
0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63,
0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x22, 0x6d, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x61, 0x6d, 0x65, 0x52,
0x65, 0x70, 0x6c, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63,
0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64,
0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x22, 0x6b, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x61, 0x6d, 0x65, 0x52, 0x65,
0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69,
0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63,
0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x6d, 0x0a,
0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79,
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64,
0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72,
0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18,
0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x1f, 0x0a, 0x0d,
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a,
0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x22, 0x11, 0x0a,
0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79,
0x32, 0xb2, 0x04, 0x0a, 0x09, 0x53, 0x68, 0x6f, 0x70, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x12, 0x65,
0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x2e, 0x73, 0x68, 0x6f,
0x70, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47,
0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x61, 0x64,
0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x61, 0x6d, 0x65, 0x52,
0x65, 0x70, 0x6c, 0x79, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x61,
0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f,
0x67, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x6e, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47,
0x61, 0x6d, 0x65, 0x12, 0x1c, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e,
0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x61, 0x6d, 0x65, 0x52, 0x65,
0x71, 0x1a, 0x1e, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76,
0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x70, 0x6c,
0x79, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x22, 0x17, 0x2f, 0x61, 0x64, 0x6d, 0x69,
0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x67, 0x61, 0x6d,
0x65, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x73, 0x0a, 0x0a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47,
0x61, 0x6d, 0x65, 0x12, 0x1c, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e,
0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x61, 0x6d, 0x65, 0x52, 0x65,
0x71, 0x1a, 0x1e, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76,
0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x70, 0x6c,
0x79, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x1a, 0x1c, 0x2f, 0x61, 0x64, 0x6d, 0x69,
0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x67, 0x61, 0x6d,
0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0x70, 0x0a, 0x0a, 0x44, 0x65,
0x6c, 0x65, 0x74, 0x65, 0x47, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e,
0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47,
0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x61, 0x64,
0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x61, 0x6d,
0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x2a, 0x1c,
0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f,
0x67, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x67, 0x0a, 0x07,
0x47, 0x65, 0x74, 0x47, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x61,
0x64, 0x6d, 0x69, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x61, 0x6d, 0x65, 0x52,
0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x2e, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2e,
0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22,
0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f,
0x76, 0x31, 0x2f, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x73,
0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x42, 0x16, 0x5a, 0x14, 0x61, 0x70, 0x69, 0x2f, 0x73, 0x68, 0x6f,
0x70, 0x2f, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x31, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_api_bff_admin_v1_shop_admin_proto_rawDescOnce sync.Once
file_api_bff_admin_v1_shop_admin_proto_rawDescData = file_api_bff_admin_v1_shop_admin_proto_rawDesc
)
func file_api_bff_admin_v1_shop_admin_proto_rawDescGZIP() []byte {
file_api_bff_admin_v1_shop_admin_proto_rawDescOnce.Do(func() {
file_api_bff_admin_v1_shop_admin_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_bff_admin_v1_shop_admin_proto_rawDescData)
})
return file_api_bff_admin_v1_shop_admin_proto_rawDescData
}
var file_api_bff_admin_v1_shop_admin_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_api_bff_admin_v1_shop_admin_proto_goTypes = []interface{}{
(*ListGameReq)(nil), // 0: shop.admin.v1.ListGameReq
(*ListGameReply)(nil), // 1: shop.admin.v1.ListGameReply
(*GetGameReq)(nil), // 2: shop.admin.v1.GetGameReq
(*GetGameReply)(nil), // 3: shop.admin.v1.GetGameReply
(*CreateGameReq)(nil), // 4: shop.admin.v1.CreateGameReq
(*CreateGameReply)(nil), // 5: shop.admin.v1.CreateGameReply
(*UpdateGameReq)(nil), // 6: shop.admin.v1.UpdateGameReq
(*UpdateGameReply)(nil), // 7: shop.admin.v1.UpdateGameReply
(*DeleteGameReq)(nil), // 8: shop.admin.v1.DeleteGameReq
(*DeleteGameReply)(nil), // 9: shop.admin.v1.DeleteGameReply
(*ListGameReply_Game)(nil), // 10: shop.admin.v1.ListGameReply.Game
}
var file_api_bff_admin_v1_shop_admin_proto_depIdxs = []int32{
10, // 0: shop.admin.v1.ListGameReply.results:type_name -> shop.admin.v1.ListGameReply.Game
0, // 1: shop.admin.v1.ShopAdmin.ListGame:input_type -> shop.admin.v1.ListGameReq
4, // 2: shop.admin.v1.ShopAdmin.CreateGame:input_type -> shop.admin.v1.CreateGameReq
6, // 3: shop.admin.v1.ShopAdmin.UpdateGame:input_type -> shop.admin.v1.UpdateGameReq
8, // 4: shop.admin.v1.ShopAdmin.DeleteGame:input_type -> shop.admin.v1.DeleteGameReq
2, // 5: shop.admin.v1.ShopAdmin.GetGame:input_type -> shop.admin.v1.GetGameReq
1, // 6: shop.admin.v1.ShopAdmin.ListGame:output_type -> shop.admin.v1.ListGameReply
5, // 7: shop.admin.v1.ShopAdmin.CreateGame:output_type -> shop.admin.v1.CreateGameReply
7, // 8: shop.admin.v1.ShopAdmin.UpdateGame:output_type -> shop.admin.v1.UpdateGameReply
9, // 9: shop.admin.v1.ShopAdmin.DeleteGame:output_type -> shop.admin.v1.DeleteGameReply
3, // 10: shop.admin.v1.ShopAdmin.GetGame:output_type -> shop.admin.v1.GetGameReply
6, // [6:11] is the sub-list for method output_type
1, // [1:6] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_api_bff_admin_v1_shop_admin_proto_init() }
func file_api_bff_admin_v1_shop_admin_proto_init() {
if File_api_bff_admin_v1_shop_admin_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_api_bff_admin_v1_shop_admin_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListGameReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_bff_admin_v1_shop_admin_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListGameReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_bff_admin_v1_shop_admin_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetGameReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_bff_admin_v1_shop_admin_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetGameReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_bff_admin_v1_shop_admin_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreateGameReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_bff_admin_v1_shop_admin_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreateGameReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_bff_admin_v1_shop_admin_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateGameReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_bff_admin_v1_shop_admin_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateGameReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_bff_admin_v1_shop_admin_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteGameReq); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_bff_admin_v1_shop_admin_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteGameReply); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_bff_admin_v1_shop_admin_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListGameReply_Game); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_api_bff_admin_v1_shop_admin_proto_rawDesc,
NumEnums: 0,
NumMessages: 11,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_api_bff_admin_v1_shop_admin_proto_goTypes,
DependencyIndexes: file_api_bff_admin_v1_shop_admin_proto_depIdxs,
MessageInfos: file_api_bff_admin_v1_shop_admin_proto_msgTypes,
}.Build()
File_api_bff_admin_v1_shop_admin_proto = out.File
file_api_bff_admin_v1_shop_admin_proto_rawDesc = nil
file_api_bff_admin_v1_shop_admin_proto_goTypes = nil
file_api_bff_admin_v1_shop_admin_proto_depIdxs = nil
}
| 33.933741
| 131
| 0.703175
|
a152ab20fddb643a5bb8c322c2b9f18d1744229c
| 2,463
|
ts
|
TypeScript
|
integration/scripts/src/common.ts
|
metronotes-testing/external-initiator
|
8591ed2d346311691a3558c38334b0b4fdf2598e
|
[
"MIT"
] | null | null | null |
integration/scripts/src/common.ts
|
metronotes-testing/external-initiator
|
8591ed2d346311691a3558c38334b0b4fdf2598e
|
[
"MIT"
] | null | null | null |
integration/scripts/src/common.ts
|
metronotes-testing/external-initiator
|
8591ed2d346311691a3558c38334b0b4fdf2598e
|
[
"MIT"
] | null | null | null |
import chalk from 'chalk'
import 'source-map-support/register'
import { promises as fs } from 'fs'
import axios from 'axios'
import path from 'path'
/**
* Default credentials for testing node
* FIXME: duplicated
*/
export const credentials = {
email: 'notreal@fakeemail.ch',
password: 'twochains',
}
/**
* Sign in and store authentication cookie.
* If authenticated cookie already exists, returns that.
* @param url URL of the Chainlink node
*/
export async function getLoginCookie(url: string): Promise<string> {
const loginPath = path.resolve(__dirname, '../../cl_login.txt')
try {
return await fs.readFile(loginPath, 'utf8')
} catch (e) {
const response = await axios.post(url, credentials, {
withCredentials: true,
})
const cookiesHeader = response.headers['set-cookie']
const cookies = []
for (let i = 0; i < cookiesHeader.length; i++) {
cookies.push(cookiesHeader[i].split(/[,;]/)[0])
}
const cookieString = cookies.join('; ') + ';'
await fs.writeFile(loginPath, cookieString)
return cookieString
}
}
/**
* Registers a global promise handler that will exit the currently
* running process if an unhandled promise rejection is caught
*/
export function registerPromiseHandler(): void {
process.on('unhandledRejection', (e) => {
console.error(e)
console.error(chalk.red('Exiting due to promise rejection'))
process.exit(1)
})
}
/**
* MissingEnvVarError occurs when an expected environment variable does not exist.
*/
class MissingEnvVarError extends Error {
constructor(envKey: string) {
super()
this.name = 'MissingEnvVarError'
this.message = this.formErrorMsg(envKey)
}
private formErrorMsg(envKey: string) {
const errMsg = `Not enough arguments supplied.
Expected "${envKey}" to be supplied as environment variable.`
return errMsg
}
}
/**
* Get environment variables in a friendly object format
*
* @example
* const args = getArgs(['ENV_1', 'ENV_2'])
* // args is now available as { ENV_1: string, ENV_2: string }
* foo(args.ENV_1, args.ENV_2)
*
* @param keys The keys of the environment variables to fetch
*/
export function getArgs<T extends string>(keys: T[]): { [K in T]: string } {
return keys.reduce<{ [K in T]: string }>((prev, next) => {
const envVar = process.env[next]
if (!envVar) throw new MissingEnvVarError(next)
prev[next] = envVar
return prev
}, {} as { [K in T]: string })
}
| 27.674157
| 82
| 0.676411
|
4368fff52cf336d5fe7c75ccbbd589d9a2857a23
| 1,312
|
tsx
|
TypeScript
|
src/svg/pink.tsx
|
carlfairclough/react-cryptoicons
|
c09db681bcc267f36a2c232644b2254d4a0d6a44
|
[
"MIT"
] | null | null | null |
src/svg/pink.tsx
|
carlfairclough/react-cryptoicons
|
c09db681bcc267f36a2c232644b2254d4a0d6a44
|
[
"MIT"
] | null | null | null |
src/svg/pink.tsx
|
carlfairclough/react-cryptoicons
|
c09db681bcc267f36a2c232644b2254d4a0d6a44
|
[
"MIT"
] | null | null | null |
import React from 'react'
interface IconProps {
color?: string;
size?: Number;
}
export const PINK: React.FC<IconProps> = ({ color, size, ...rest}: IconProps) => (
<svg xmlns="http://www.w3.org/2000/svg" width={`${size}`} height={`${size}`} viewBox="0 0 32 32" fill={color} {...rest} ><g fill-rule="evenodd"><path d="M16 32C7.163 32 0 24.837 0 16S7.163 0 16 0s16 7.163 16 16-7.163 16-16 16zm7.452-23.071A9.865 9.865 0 0016.43 6C10.946 6 6.5 10.477 6.5 16c0 2.624 1.003 5.011 2.644 6.795v-7.121h.008c.169-3.9 3.363-7.011 7.278-7.011 2.012 0 3.833.821 5.152 2.149zm0 14.142l-1.87-1.883a7.238 7.238 0 01-4.99 2.147V26a9.865 9.865 0 006.86-2.928zM11.68 24.784c.755.415 1.57.735 2.429.941v-5.511c.728.43 1.576.677 2.482.677 2.712 0 4.911-2.214 4.911-4.945 0-2.732-2.199-4.946-4.91-4.946-2.623 0-4.765 2.069-4.905 4.674h-.007zm4.911-6.338a2.491 2.491 0 01-2.482-2.5c0-1.381 1.111-2.5 2.482-2.5s2.483 1.119 2.483 2.5c0 1.38-1.112 2.5-2.483 2.5z"/><path d="M23.452 8.929l-1.87 1.883a7.238 7.238 0 00-5.152-2.149c-3.915 0-7.11 3.11-7.278 7.01h-.008v7.122A10.003 10.003 0 016.5 16c0-5.523 4.446-10 9.93-10a9.865 9.865 0 017.022 2.929zm0 14.142A9.865 9.865 0 0116.592 26v-2.664a7.238 7.238 0 004.99-2.147z" opacity=".5"/></g></svg>
)
PINK.defaultProps = {
color: '#000',
size: 32,
}
| 82
| 1,060
| 0.650152
|
2c4543b750d5c11286d2dba7ece4de91b9fdf3cd
| 849
|
py
|
Python
|
tests/test_config/test_load_config.py
|
dumpmemory/ColossalAI
|
569357fea0ae91e0c886f177d1b91dd16277e1c9
|
[
"Apache-2.0"
] | null | null | null |
tests/test_config/test_load_config.py
|
dumpmemory/ColossalAI
|
569357fea0ae91e0c886f177d1b91dd16277e1c9
|
[
"Apache-2.0"
] | null | null | null |
tests/test_config/test_load_config.py
|
dumpmemory/ColossalAI
|
569357fea0ae91e0c886f177d1b91dd16277e1c9
|
[
"Apache-2.0"
] | null | null | null |
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
from pathlib import Path
import pytest
from colossalai.context.config import Config
from colossalai.builder import build_ophooks
@pytest.mark.cpu
def test_load_config():
filename = Path(__file__).parent.joinpath('sample_config.py')
config = Config.from_file(filename)
assert config.train_data, 'cannot access train data as attribute'
assert config.train_data.dataset, 'cannot access grandchild attribute'
assert isinstance(config.train_data.dataset.transform_pipeline[0], dict), \
f'expected attribute transform_pipeline elements to be a dict, but found {type(config.train_data.dataset.transform_pipeline)}'
@pytest.mark.cpu
def test_load_ophooks():
dict = {'type': 'MemTracerOpHook', 'niter': 2}
ophook = build_ophooks(dict)
assert ophook.niter() == 2
| 30.321429
| 134
| 0.746761
|
45616215dc354823632f65e91a5a8390b68ffdaf
| 1,217
|
py
|
Python
|
pysperf/models/minlplib.py
|
ZedongPeng/pysperf
|
9d8536c56aee8508ffa142369b1ab7e3d88baaac
|
[
"BSD-2-Clause"
] | null | null | null |
pysperf/models/minlplib.py
|
ZedongPeng/pysperf
|
9d8536c56aee8508ffa142369b1ab7e3d88baaac
|
[
"BSD-2-Clause"
] | null | null | null |
pysperf/models/minlplib.py
|
ZedongPeng/pysperf
|
9d8536c56aee8508ffa142369b1ab7e3d88baaac
|
[
"BSD-2-Clause"
] | null | null | null |
from pathlib import Path
import pandas
from pyutilib.misc import import_file
from pysperf.model_library_tools import register_model
minlplibdir = Path(__file__).parent.joinpath("minlplib/")
# Read in solu file
with minlplibdir.joinpath("MINLP.solu").open() as solufile:
pd = pandas.read_csv(solufile, sep=r'\s+', header=None)
pd.columns = ['soln_type', 'model', 'value']
pd = pd.set_index('model')
model_solution_data = {}
for model, data in pd.to_dict('index').items():
if data['soln_type'] == "=opt=":
model_solution_data[model] = {'opt_value': data['value']}
else:
model_solution_data[model] = {'best_value': data['value']}
def _build_from_file_import(model_file_path: Path):
def model_constructor():
model_module = import_file(str(model_file_path.resolve()))
return model_module.m
return model_constructor
for modelfile in minlplibdir.glob("*.py"):
register_model(
name=modelfile.stem,
build_function=_build_from_file_import(modelfile),
opt_value=model_solution_data[modelfile.stem].get('opt_value', None),
best_value=model_solution_data[modelfile.stem].get('best_value', None)
)
| 32.026316
| 78
| 0.693509
|
237029b17907bc49b4d3ff330eeff84f9e5dee1e
| 12,254
|
ps1
|
PowerShell
|
Get-PSSQLInstance.ps1
|
madallday/PowerShell_Scripts
|
7c766343ce4b20b76e86b04efca6bf667ea8a0ef
|
[
"MIT"
] | null | null | null |
Get-PSSQLInstance.ps1
|
madallday/PowerShell_Scripts
|
7c766343ce4b20b76e86b04efca6bf667ea8a0ef
|
[
"MIT"
] | null | null | null |
Get-PSSQLInstance.ps1
|
madallday/PowerShell_Scripts
|
7c766343ce4b20b76e86b04efca6bf667ea8a0ef
|
[
"MIT"
] | null | null | null |
Function Get-PSSQLInstance {
<#
.SYNOPSIS
Retrieves SQL server information from a local or remote servers.
.DESCRIPTION
Retrieves SQL server information from a local or remote servers. Pulls all
instances from a SQL server and detects if in a cluster or not.
.PARAMETER Computername
Local or remote systems to query for SQL information.
.NOTES
Name: Get-PSSQLInstance
Author: Boe Prox
Version History:
1.5 //Boe Prox - 31 May 2016
- Added WMI queries for more information
- Custom object type name
1.0 //Boe Prox - 07 Sept 2013
- Initial Version
.EXAMPLE
Get-PSSQLInstance -Computername SQL1
Computername : SQL1
Instance : MSSQLSERVER
SqlServer : SQLCLU
WMINamespace : ComputerManagement10
Sqlstates : 2061
Version : 10.53.6000.34
Splevel : 3
Clustered : True
Installpath : C:\Program Files\Microsoft SQL
Server\MSSQL10_50.MSSQLSERVER\MSSQL
Datapath : D:\MSSQL10_50.MSSQLSERVER\MSSQL
Language : 1033
Fileversion : 2009.100.6000.34
Vsname : SQLCLU
Regroot : Software\Microsoft\Microsoft SQL
Server\MSSQL10_50.MSSQLSERVER
Sku : 1804890536
Skuname : Enterprise Edition (64-bit)
Instanceid : MSSQL10_50.MSSQLSERVER
Startupparameters : -dD:\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\master.mdf;-eD:\MSSQL1
0_50.MSSQLSERVER\MSSQL\Log\ERRORLOG;-lD:\MSSQL10_50.MSSQLSERV
ER\MSSQL\DATA\mastlog.ldf
Errorreporting : False
Dumpdir : D:\MSSQL10_50.MSSQLSERVER\MSSQL\LOG\
Sqmreporting : False
Iswow64 : False
BackupDirectory : F:\MSSQL10_50.MSSQLSERVER\MSSQL\Backup
AlwaysOnName :
Nodes : {SQL1, SQL2}
Caption : SQL Server 2008 R2
FullName : SQLCLU\MSSQLSERVER
Description
-----------
Retrieves the SQL information from SQL1
#>
[OutputType('SQLServer.Information')]
[cmdletbinding()]
Param(
[parameter(ValueFromPipeline=$True)]
[string[]]$Computername = 'G13'
)
Process {
ForEach ($Computer in $Computername) {
# 1 = MSSQLSERVER
$Filter = "SELECT * FROM SqlServiceAdvancedProperty WHERE SqlServiceType=1"
$WMIParams=@{
Computername = $Computer
NameSpace='root\Microsoft\SqlServer'
Query="SELECT name FROM __NAMESPACE WHERE name LIKE 'ComputerManagement%'"
Authentication = 'PacketPrivacy'
ErrorAction = 'Stop'
}
Write-Verbose "[$Computer] Starting SQL Scan"
$PropertyHash = [ordered]@{
Computername = $Computer
Instance = $Null
SqlServer = $Null
WmiNamespace = $Null
SQLSTATES = $Null
VERSION = $Null
SPLEVEL = $Null
CLUSTERED = $Null
INSTALLPATH = $Null
DATAPATH = $Null
LANGUAGE = $Null
FILEVERSION = $Null
VSNAME = $Null
REGROOT = $Null
SKU = $Null
SKUNAME = $Null
INSTANCEID = $Null
STARTUPPARAMETERS = $Null
ERRORREPORTING = $Null
DUMPDIR = $Null
SQMREPORTING = $Null
ISWOW64 = $Null
BackupDirectory = $Null
AlwaysOnName = $Null
}
Try {
Write-Verbose "[$Computer] Performing Registry Query"
$Registry = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $Computer)
}
Catch {
Write-Warning "[$Computer] $_"
Continue
}
$baseKeys = "SOFTWARE\\Microsoft\\Microsoft SQL Server",
"SOFTWARE\\Wow6432Node\\Microsoft\\Microsoft SQL Server"
Try {
$ErrorActionPreference = 'Stop'
If ($Registry.OpenSubKey($basekeys[0])) {
$regPath = $basekeys[0]
}
ElseIf ($Registry.OpenSubKey($basekeys[1])) {
$regPath = $basekeys[1]
}
Else {
Continue
}
}
Catch {
Continue
}
Finally {
$ErrorActionPreference = 'Continue'
}
$RegKey= $Registry.OpenSubKey("$regPath")
If ($RegKey.GetSubKeyNames() -contains "Instance Names") {
$RegKey= $Registry.OpenSubKey("$regpath\\Instance Names\\SQL" )
$instances = @($RegKey.GetValueNames())
}
ElseIf ($regKey.GetValueNames() -contains 'InstalledInstances') {
$instances = $RegKey.GetValue('InstalledInstances')
}
Else {
Continue
}
If ($instances.count -gt 0) {
ForEach ($Instance in $Instances) {
$PropertyHash['Instance']=$Instance
$Nodes = New-Object System.Collections.Arraylist
$clusterName = $Null
$instanceValue = $regKey.GetValue($instance)
$instanceReg = $Registry.OpenSubKey("$regpath\\$instanceValue")
If ($instanceReg.GetSubKeyNames() -contains "Cluster") {
$instanceRegCluster = $instanceReg.OpenSubKey('Cluster')
$clusterName = $instanceRegCluster.GetValue('ClusterName')
$clusterReg = $Registry.OpenSubKey("Cluster\\Nodes")
$clusterReg.GetSubKeyNames() | ForEach-Object {
$null = $Nodes.Add($clusterReg.OpenSubKey($_).GetValue('NodeName'))
}
}
$PropertyHash['Nodes'] = $Nodes
$instanceRegSetup = $instanceReg.OpenSubKey("Setup")
Try {
$edition = $instanceRegSetup.GetValue('Edition')
} Catch {
$edition = $Null
}
$PropertyHash['Skuname'] = $edition
Try {
$ErrorActionPreference = 'Stop'
#Get from filename to determine version
$servicesReg = $Registry.OpenSubKey("SYSTEM\\CurrentControlSet\\Services")
$serviceKey = $servicesReg.GetSubKeyNames() | Where-Object {
$_ -eq ('MSSQL${0}' -f $instance)
} | Select-Object -First 1
$service = $servicesReg.OpenSubKey($serviceKey).GetValue('ImagePath')
$file = $service -replace '^.*(\w:\\.*\\sqlservr.exe).*','$1'
$PropertyHash['version'] =(Get-Item ("\\$Computer\$($file -replace ":","$")")).VersionInfo.ProductVersion
} Catch {
#Use potentially less accurate version from registry
$PropertyHash['Version'] = $instanceRegSetup.GetValue('Version')
} Finally {
$ErrorActionPreference = 'Continue'
}
Try {
Write-Verbose "[$Computer] Performing WMI Query"
$Namespace = $Namespace = (Get-WMIObject @WMIParams | Sort-Object -Descending | Select-Object -First 1).Name
If ($Namespace) {
$PropertyHash['WMINamespace'] = $Namespace
$WMIParams.NameSpace="root\Microsoft\SqlServer\$Namespace"
$WMIParams.Query=$Filter
$WMIResults = Get-WMIObject @WMIParams
$GroupResults = $WMIResults | Group-Object ServiceName
$PropertyHash['Instance'] = $GroupResults.Name
$WMIResults | ForEach-Object {
$Name = "{0}{1}" -f ($_.PropertyName.SubString(0,1),$_.PropertyName.SubString(1).ToLower())
$Data = If ($_.PropertyStrValue) {
$_.PropertyStrValue
}
Else {
If ($Name -match 'Clustered|ErrorReporting|SqmReporting|IsWow64') {
[bool]$_.PropertyNumValue
}
Else {
$_.PropertyNumValue
}
}
$PropertyHash[$Name] = $Data
}
#region Always on availability group
if ($PropertyHash['Version'].Major -ge 11) {
$splat.Query="SELECT WindowsFailoverClusterName FROM HADRServiceSettings WHERE InstanceName = '$($Group.Name)'"
$PropertyHash['AlwaysOnName'] = (Get-WmiObject @WMIParams).WindowsFailoverClusterName
if ($PropertyHash['AlwaysOnName']) {
$PropertyHash.SqlServer = $PropertyHash['AlwaysOnName']
}
}
else {
$PropertyHash['AlwaysOnName'] = $null
}
#endregion Always on availability group
#region Backup Directory
$RegKey=$Registry.OpenSubKey("$($PropertyHash['RegRoot'])\MSSQLServer")
$PropertyHash['BackupDirectory'] = $RegKey.GetValue('BackupDirectory')
#endregion Backup Directory
}#IF NAMESPACE
}
Catch {
}
#region Caption
$Caption = {Switch -Regex ($PropertyHash['version']) {
"^13" {'SQL Server 2016';Break}
"^12" {'SQL Server 2014';Break}
"^11" {'SQL Server 2012';Break}
"^10\.5" {'SQL Server 2008 R2';Break}
"^10" {'SQL Server 2008';Break}
"^9" {'SQL Server 2005';Break}
"^8" {'SQL Server 2000';Break}
Default {'Unknown'}
}}.InvokeReturnAsIs()
$PropertyHash['Caption'] = $Caption
#endregion Caption
#region Full SQL Name
$Name = If ($clusterName) {
$clusterName
$PropertyHash['SqlServer'] = $clusterName
}
Else {
$Computer
$PropertyHash['SqlServer'] = $Computer
}
$PropertyHash['FullName'] = ("{0}\{1}" -f $Name,$PropertyHash['Instance'])
#emdregion Full SQL Name
$Object = [pscustomobject]$PropertyHash
$Object.pstypenames.insert(0,'SQLServer.Information')
$Object
}#FOREACH INSTANCE
}#IF
}
}
}
| 45.723881
| 143
| 0.448017
|
7dbb36547f6801a64fd04722425951f34791f7e9
| 1,294
|
css
|
CSS
|
fengshan/WebContent/styles/skin-one.css
|
sodoa/ccfrt
|
7df85558bcd74ef6be7867082b13bd0ed1d49594
|
[
"Apache-2.0"
] | null | null | null |
fengshan/WebContent/styles/skin-one.css
|
sodoa/ccfrt
|
7df85558bcd74ef6be7867082b13bd0ed1d49594
|
[
"Apache-2.0"
] | null | null | null |
fengshan/WebContent/styles/skin-one.css
|
sodoa/ccfrt
|
7df85558bcd74ef6be7867082b13bd0ed1d49594
|
[
"Apache-2.0"
] | 1
|
2021-12-31T12:32:12.000Z
|
2021-12-31T12:32:12.000Z
|
@charset "utf-8";
/* CSS Document */
.ifram_top{ background:url(../images/admin/skin-one/top.png) repeat-x; }
.admin-top { background-image:url(../images/admin/skin-one/frame_bg1.gif);background-color:transparent;}
.admin-top p span { color:#000;}
.admin-top p span a{ color:#000;}
.admin-top p a.out{ background-image:url(../images/admin/skin-one/out.gif)}
.toptab ul li{background-image:url(../images/admin/skin-one/tab_bg2.png)}
.toptab ul li span{background-image:url(../images/admin/skin-one/tab_bg2.png)}
.toptab ul li.c{background-image:url(../images/admin/skin-one/tab_bg1.png)}
.toptab ul li.c span{background-image:url(../images/admin/skin-one/tab_bg1.png)}
.menu-tree h3 a{ background-image:url(../images/admin/skin-one/menu_bgs.gif)}
.menu-tree h3 a.c{ background-image:url(../images/admin/skin-one/menu_bgs_1.gif)}
.listBox h5{background-image:url(../images/admin/skin-one/inp_bg.png)}
.formBox h3{background-image:url(../images/admin/skin-one/inp_bg.png)}
.formBox h3 span{background-image:url(../images/admin/skin-one/left-top-right.gif)}
.formBox h3 i{background-image:url(../images/admin/skin-one/nav-right-bg.gif);}
.admin-foot{color:#333; background: url(../images/admin/skin-one/frame_bg1.gif) 0 -41px repeat-x;}
.main-right{width:100%; margin-top: 20px;}
| 68.105263
| 105
| 0.727202
|
d7a1e1869a51fc2047969589354935c003aa232b
| 1,015
|
go
|
Go
|
metrics/init.go
|
avito-tech/moira
|
ae38e2f8b376d7b35c0d38c821f59bd90f4ee037
|
[
"MIT"
] | 1
|
2021-06-03T10:05:29.000Z
|
2021-06-03T10:05:29.000Z
|
metrics/init.go
|
avito-tech/moira
|
ae38e2f8b376d7b35c0d38c821f59bd90f4ee037
|
[
"MIT"
] | null | null | null |
metrics/init.go
|
avito-tech/moira
|
ae38e2f8b376d7b35c0d38c821f59bd90f4ee037
|
[
"MIT"
] | null | null | null |
package metrics
import (
"fmt"
"go.avito.ru/DO/moira"
"os"
"strings"
"sync"
)
var (
cfg *Config
mu sync.Mutex
worker *metricsWorker
)
func Init(config Config, rateLimit moira.RateLimit) error {
mu.Lock()
defer mu.Unlock()
if cfg != nil {
return fmt.Errorf("already initialized")
}
prefix, err := initPrefix(config.Prefix)
if err != nil {
return fmt.Errorf("Can not get OS hostname %s: %s", config.Prefix, err)
}
cfg = &config
cfg.Limits = rateLimit
cfg.Prefix = strings.TrimSuffix(prefix, ".")
worker, err = newMetricsWorker()
if err != nil {
return fmt.Errorf("Can not initialize statsd: %v", err)
}
go worker.lifeCycle()
return nil
}
func initPrefix(prefix string) (string, error) {
const hostnameTmpl = "{hostname}"
if !strings.Contains(prefix, hostnameTmpl) {
return prefix, nil
}
hostname, err := os.Hostname()
if err != nil {
return prefix, err
}
short := strings.Split(hostname, ".")[0]
return strings.ReplaceAll(prefix, hostnameTmpl, short), nil
}
| 17.807018
| 73
| 0.671921
|
57e951ab424977c721999e73c15d3583ce9aa13e
| 2,286
|
php
|
PHP
|
src/Domain/V2/Banner/Urls.php
|
koma136/mytarget-sdk-php
|
560ddd16901114f236d1e183569d449accd7e751
|
[
"Apache-2.0"
] | 1
|
2018-11-13T10:53:27.000Z
|
2018-11-13T10:53:27.000Z
|
src/Domain/V2/Banner/Urls.php
|
koma136/mytarget-sdk-php
|
560ddd16901114f236d1e183569d449accd7e751
|
[
"Apache-2.0"
] | null | null | null |
src/Domain/V2/Banner/Urls.php
|
koma136/mytarget-sdk-php
|
560ddd16901114f236d1e183569d449accd7e751
|
[
"Apache-2.0"
] | 1
|
2018-10-10T11:39:19.000Z
|
2018-10-10T11:39:19.000Z
|
<?php
namespace Koma136\MyTarget\Domain\V2\Banner;
use Koma136\MyTarget\Mapper\Annotation\Field;
class Urls
{
/**
* @var int
* @Field (name="id", type="int")
*/
private $id;
/**
* @var string
* @Field (name="url", type="string")
*/
private $url;
/**
* @var string
* @Field (name="url_object_id", type="string")
*/
private $urlObjectId;
/**
* @var string
* @Field (name="url_object_type", type="string")
*/
private $urlObjectType;
/**
* @var string
* @Field (name="url_types", type="string")
*/
private $urlTypes;
/**
* @return Urls
*/
public static function create()
{
return new self();
}
/**
* @return int
*/
public function getId(): int
{
return $this->id;
}
/**
* @param int $id
* @return $this
*/
public function setId(int $id)
{
$this->id = $id;
return $this;
}
/**
* @return string
*/
public function getUrl(): string
{
return $this->url;
}
/**
* @param string $url
* @return $this
*/
public function setUrl(string $url)
{
$this->url = $url;
return $this;
}
/**
* @return string
*/
public function getUrlObjectId(): string
{
return $this->urlObjectId;
}
/**
* @param string $urlObjectId
* @return $this
*/
public function setUrlObjectId(string $urlObjectId)
{
$this->urlObjectId = $urlObjectId;
return $this;
}
/**
* @return string
*/
public function getUrlObjectType(): string
{
return $this->urlObjectType;
}
/**
* @param string $urlObjectType
* @return $this
*/
public function setUrlObjectType(string $urlObjectType)
{
$this->urlObjectType = $urlObjectType;
return $this;
}
/**
* @return string
*/
public function getUrlTypes(): string
{
return $this->urlTypes;
}
/**
* @param string $urlTypes
* @return $this
*/
public function setUrlTypes(string $urlTypes)
{
$this->urlTypes = $urlTypes;
return $this;
}
}
| 17.318182
| 59
| 0.502187
|
18b0be74040c63fdbda416f692a0b98fe6e464e5
| 524
|
ts
|
TypeScript
|
src/pattern/toolbar/types.ts
|
tomvej/rethreaded
|
c504ef4854ee65552eb36ea1079b6f156f1aeaab
|
[
"MIT"
] | null | null | null |
src/pattern/toolbar/types.ts
|
tomvej/rethreaded
|
c504ef4854ee65552eb36ea1079b6f156f1aeaab
|
[
"MIT"
] | 6
|
2020-04-27T06:42:43.000Z
|
2022-02-18T20:35:38.000Z
|
src/pattern/toolbar/types.ts
|
tomvej/rethreaded
|
c504ef4854ee65552eb36ea1079b6f156f1aeaab
|
[
"MIT"
] | null | null | null |
import {either} from 'fp-ts/es6/Either';
import * as t from 'io-ts';
export const IntFromString = new t.Type<number, string, unknown>(
'IntFromString',
(unknown): unknown is number => typeof unknown === 'number' && Number.isInteger(unknown),
(unknown, context) => either.chain(t.string.validate(unknown, context), unknownString => {
const result = parseInt(unknownString, 10);
return isNaN(result) ? t.failure(unknown, context) : t.success(result);
}),
(integer) => String(integer),
);
| 40.307692
| 94
| 0.662214
|
6415110f3153633600f50a07589ab2472999213c
| 641
|
py
|
Python
|
logging_test.py
|
IntelligentQuadruped/Robot_control
|
68acee633a4249d7601d63eecbe4561401e9ec73
|
[
"MIT"
] | null | null | null |
logging_test.py
|
IntelligentQuadruped/Robot_control
|
68acee633a4249d7601d63eecbe4561401e9ec73
|
[
"MIT"
] | null | null | null |
logging_test.py
|
IntelligentQuadruped/Robot_control
|
68acee633a4249d7601d63eecbe4561401e9ec73
|
[
"MIT"
] | null | null | null |
import logging
import time
logging.basicConfig(filename="test_{}.log".format(time.ctime()),
format='%(asctime)s - %(levelname)s: %(message)s',
datefmt='%I:%M:%S.%f',
level=logging.DEBUG)
class test(object):
def __init__(self):
logging.info("New object was created.")
def sum(self, arg1, arg2):
try:
sum = arg1 + arg2
logging.info("Summed to {}".format(sum))
except TypeError:
logging.warning("Arguments are of different types.")
if __name__ == "__main__":
obj = test()
obj.sum(1,2)
obj.sum(1,'a')
| 27.869565
| 70
| 0.546022
|
da74c3b2a391b878374d52f567fb962bc936def1
| 2,022
|
php
|
PHP
|
src/application/classes/museoweb/modules/comments/models/CommentProxy.php
|
GruppoMeta/MWCMS
|
0172b59d5baee04fe0464ae2e2a3d8771e5c2739
|
[
"MIT"
] | 1
|
2017-01-28T08:44:46.000Z
|
2017-01-28T08:44:46.000Z
|
src/application/classes/museoweb/modules/comments/models/CommentProxy.php
|
GruppoMeta/MWCMS
|
0172b59d5baee04fe0464ae2e2a3d8771e5c2739
|
[
"MIT"
] | null | null | null |
src/application/classes/museoweb/modules/comments/models/CommentProxy.php
|
GruppoMeta/MWCMS
|
0172b59d5baee04fe0464ae2e2a3d8771e5c2739
|
[
"MIT"
] | null | null | null |
<?php
class museoweb_modules_comments_models_CommentProxy extends GlizyObject
{
private $application;
private $user;
function __construct()
{
$this->application = org_glizy_ObjectValues::get('org.glizy', 'application');
$this->user = $this->application->getCurrentUser();
}
public function addComment($resourceId, $text, $title='')
{
if (!$this->user->isLogged()) {
throw museoweb_modules_comments_CommentException::userNotLogged();
}
$text = strip_tags($text);
if (!$resourceId || !$text) {
throw museoweb_modules_comments_CommentException::wrongParams($resourceId, $text);
}
$ar = org_glizy_ObjectFactory::createModel('museoweb.modules.comments.models.Comment');
$ar->userId = $this->user->id;
$ar->resourceId = $resourceId;
$ar->title = $title;
$ar->text = $text;
$ar->date = new org_glizy_types_DateTime();
try {
return $ar->save();
}
catch (org_glizy_validators_ValidationException $e) {
return $e->getErrors();
}
}
public function getCommentsForResourceId($resourceId)
{
$it = org_glizy_objectFactory::createModelIterator('museoweb.modules.comments.models.Comment')
->load('getCommentsForResourceId', array('resourceId' => $resourceId));
return $it;
}
public function deleteComment($id)
{
$ar = org_glizy_objectFactory::createModel('museoweb.modules.comments.models.Comment');
if ($ar->load($id)) {
if ($this->canAdmin($ar)) {
$ar->delete();
} else {
throw museoweb_modules_comments_CommentException::forbidden();
}
} else {
throw museoweb_modules_comments_CommentException::notFound($id);
}
}
public function canAdmin($ar)
{
return $this->user->groupId == 1 || $ar->userId = $this->user->id;
}
}
| 31.59375
| 102
| 0.590999
|
e848c2e0c00b7f0aee40cbcb532bbb7c7f070a81
| 4,629
|
asm
|
Assembly
|
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48_notsx.log_21829_353.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 9
|
2020-08-13T19:41:58.000Z
|
2022-03-30T12:22:51.000Z
|
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48_notsx.log_21829_353.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 1
|
2021-04-29T06:29:35.000Z
|
2021-05-13T21:02:30.000Z
|
Transynther/x86/_processed/NONE/_zr_/i7-7700_9_0x48_notsx.log_21829_353.asm
|
ljhsiun2/medusa
|
67d769b8a2fb42c538f10287abaf0e6dbb463f0c
|
[
"MIT"
] | 3
|
2020-07-14T17:07:07.000Z
|
2022-03-21T01:12:22.000Z
|
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r12
push %r13
push %rdi
lea addresses_normal_ht+0xb15d, %rdi
clflush (%rdi)
nop
nop
nop
nop
nop
cmp %r11, %r11
mov $0x6162636465666768, %r10
movq %r10, (%rdi)
add $1146, %r13
lea addresses_WC_ht+0x13539, %r12
xor %r10, %r10
movb (%r12), %r11b
cmp $19810, %r13
pop %rdi
pop %r13
pop %r12
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r12
push %r13
push %r8
push %rax
push %rcx
push %rdi
// Store
lea addresses_A+0x19539, %r12
nop
nop
nop
nop
nop
sub $6113, %rcx
mov $0x5152535455565758, %r10
movq %r10, %xmm5
vmovups %ymm5, (%r12)
nop
nop
nop
nop
nop
xor %r12, %r12
// Faulty Load
lea addresses_A+0x19539, %rdi
nop
nop
nop
nop
add $28163, %r13
movups (%rdi), %xmm0
vpextrq $1, %xmm0, %rcx
lea oracles, %r12
and $0xff, %rcx
shlq $12, %rcx
mov (%r12,%rcx,1), %rcx
pop %rdi
pop %rcx
pop %rax
pop %r8
pop %r13
pop %r12
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': False, 'size': 1, 'type': 'addresses_A', 'congruent': 0}}
{'dst': {'same': True, 'NT': False, 'AVXalign': False, 'size': 32, 'type': 'addresses_A', 'congruent': 0}, 'OP': 'STOR'}
[Faulty Load]
{'OP': 'LOAD', 'src': {'same': True, 'NT': False, 'AVXalign': False, 'size': 16, 'type': 'addresses_A', 'congruent': 0}}
<gen_prepare_buffer>
{'dst': {'same': False, 'NT': False, 'AVXalign': True, 'size': 8, 'type': 'addresses_normal_ht', 'congruent': 2}, 'OP': 'STOR'}
{'OP': 'LOAD', 'src': {'same': False, 'NT': False, 'AVXalign': True, 'size': 1, 'type': 'addresses_WC_ht', 'congruent': 8}}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 49.774194
| 2,999
| 0.66105
|
b30f5baae0dd8afc84072eba092b1fe1f2f2ecc4
| 2,980
|
py
|
Python
|
neuroquery/img_utils.py
|
RaphaelMeudec/neuroquery
|
9f5a605f92c45de240eb673a039d1fb15d83574f
|
[
"BSD-3-Clause"
] | 21
|
2019-07-12T10:52:21.000Z
|
2021-11-30T21:17:42.000Z
|
neuroquery/img_utils.py
|
RaphaelMeudec/neuroquery
|
9f5a605f92c45de240eb673a039d1fb15d83574f
|
[
"BSD-3-Clause"
] | 9
|
2019-11-06T14:30:20.000Z
|
2022-03-28T21:44:39.000Z
|
neuroquery/img_utils.py
|
RaphaelMeudec/neuroquery
|
9f5a605f92c45de240eb673a039d1fb15d83574f
|
[
"BSD-3-Clause"
] | 9
|
2019-07-14T10:33:54.000Z
|
2022-01-27T15:52:03.000Z
|
import numpy as np
import pandas as pd
from nilearn import image, input_data
from nilearn.datasets import load_mni152_brain_mask
def get_masker(mask_img=None, target_affine=None):
if isinstance(mask_img, input_data.NiftiMasker):
return mask_img
if mask_img is None:
mask_img = load_mni152_brain_mask()
if target_affine is not None:
if np.ndim(target_affine) == 0:
target_affine = np.eye(3) * target_affine
elif np.ndim(target_affine) == 1:
target_affine = np.diag(target_affine)
mask_img = image.resample_img(
mask_img, target_affine=target_affine, interpolation="nearest"
)
masker = input_data.NiftiMasker(mask_img=mask_img).fit()
return masker
def coords_to_voxels(coords, ref_img=None):
if ref_img is None:
ref_img = load_mni152_brain_mask()
affine = ref_img.affine
coords = np.atleast_2d(coords)
coords = np.hstack([coords, np.ones((len(coords), 1))])
voxels = np.linalg.pinv(affine).dot(coords.T)[:-1].T
voxels = voxels[(voxels >= 0).all(axis=1)]
voxels = voxels[(voxels < ref_img.shape[:3]).all(axis=1)]
voxels = np.floor(voxels).astype(int)
return voxels
def coords_to_peaks_img(coords, mask_img):
mask_img = image.load_img(mask_img)
voxels = coords_to_voxels(coords, mask_img)
peaks = np.zeros(mask_img.shape)
np.add.at(peaks, tuple(voxels.T), 1.0)
peaks_img = image.new_img_like(mask_img, peaks)
return peaks_img
def gaussian_coord_smoothing(
coords, mask_img=None, target_affine=None, fwhm=9.0
):
masker = get_masker(mask_img, target_affine)
peaks_img = coords_to_peaks_img(coords, mask_img=masker.mask_img_)
img = image.smooth_img(peaks_img, fwhm=fwhm)
return masker.inverse_transform(masker.transform(img).squeeze())
def coordinates_to_maps(
coordinates, mask_img=None, target_affine=(4, 4, 4), fwhm=9.0
):
print(
"Transforming {} coordinates for {} articles".format(
coordinates.shape[0], len(set(coordinates["pmid"]))
)
)
masker = get_masker(mask_img=mask_img, target_affine=target_affine)
images, img_pmids = [], []
for pmid, img in iter_coordinates_to_maps(
coordinates, mask_img=masker, fwhm=fwhm
):
images.append(masker.transform(img).ravel())
img_pmids.append(pmid)
return pd.DataFrame(images, index=img_pmids), masker
def iter_coordinates_to_maps(
coordinates, mask_img=None, target_affine=(4, 4, 4), fwhm=9.0
):
masker = get_masker(mask_img=mask_img, target_affine=target_affine)
articles = coordinates.groupby("pmid")
for i, (pmid, coord) in enumerate(articles):
print(
"{:.1%} pmid: {:< 20}".format(i / len(articles), pmid),
end="\r",
flush=True,
)
img = gaussian_coord_smoothing(
coord.loc[:, ["x", "y", "z"]].values, fwhm=fwhm, mask_img=masker
)
yield pmid, img
| 33.483146
| 76
| 0.667114
|
43a6745bc86961fea45e491b5315f6cd84e46cca
| 2,054
|
ts
|
TypeScript
|
libs/validator/src/lib/isDate.ts
|
rxap-mirror/packages
|
641497c36f3bedd8898e466c780cd5482a518ac5
|
[
"BSD-4-Clause"
] | 1
|
2021-07-06T19:20:40.000Z
|
2021-07-06T19:20:40.000Z
|
libs/validator/src/lib/isDate.ts
|
rxap-mirror/packages
|
641497c36f3bedd8898e466c780cd5482a518ac5
|
[
"BSD-4-Clause"
] | null | null | null |
libs/validator/src/lib/isDate.ts
|
rxap-mirror/packages
|
641497c36f3bedd8898e466c780cd5482a518ac5
|
[
"BSD-4-Clause"
] | null | null | null |
import { merge } from './util/merge';
const default_date_options = {
format: 'YYYY/MM/DD',
delimiters: [ '/', '-' ],
strictMode: false
};
function isValidFormat(format) {
return /(^(y{4}|y{2})[\/-](m{1,2})[\/-](d{1,2})$)|(^(m{1,2})[\/-](d{1,2})[\/-]((y{4}|y{2})$))|(^(d{1,2})[\/-](m{1,2})[\/-]((y{4}|y{2})$))/gi.test(format);
}
function zip<D, F>(date: D[], format: F[]): Array<[ D, F ]> {
const zippedArr: Array<[ D, F ]> = [],
len = Math.min(date.length, format.length);
for (let i = 0; i < len; i++) {
zippedArr.push([ date[ i ], format[ i ] ]);
}
return zippedArr;
}
export function isDate(input, options) {
if (typeof options === 'string') { // Allow backward compatbility for old format isDate(input [, format])
options = merge({ format: options }, default_date_options);
} else {
options = merge(options, default_date_options);
}
if (typeof input === 'string' && isValidFormat(options.format)) {
const formatDelimiter = options.delimiters
.find(delimiter => options.format.indexOf(delimiter) !== -1);
const dateDelimiter = options.strictMode
? formatDelimiter
: options.delimiters.find(delimiter => input.indexOf(delimiter) !== -1);
const dateAndFormat = zip(
input.split(dateDelimiter),
options.format.toLowerCase().split(formatDelimiter) as string[]
);
const dateObj: Record<string, unknown> = {};
for (const [ dateWord, formatWord ] of dateAndFormat) {
if (dateWord.length !== formatWord.length) {
return false;
}
dateObj[ formatWord.charAt(0) ] = dateWord;
}
return new Date(`${dateObj.m}/${dateObj.d}/${dateObj.y}`).getDate() === Number(dateObj.d);
}
if (!options.strictMode) {
return Object.prototype.toString.call(input) === '[object Date]' && isFinite(input);
}
return false;
}
| 34.813559
| 156
| 0.542843
|
de284161634400781c666d616a4e70df3b72383f
| 625
|
sql
|
SQL
|
Database/event_insert.sql
|
reetahan/ears
|
eb3e0aa4329457c254e634b3e4f7b3441994c0d9
|
[
"Apache-2.0"
] | null | null | null |
Database/event_insert.sql
|
reetahan/ears
|
eb3e0aa4329457c254e634b3e4f7b3441994c0d9
|
[
"Apache-2.0"
] | null | null | null |
Database/event_insert.sql
|
reetahan/ears
|
eb3e0aa4329457c254e634b3e4f7b3441994c0d9
|
[
"Apache-2.0"
] | 1
|
2020-12-25T07:37:23.000Z
|
2020-12-25T07:37:23.000Z
|
DROP PROCEDURE IF EXISTS EVENT_INSERT ;
DELIMITER //
CREATE PROCEDURE EVENT_INSERT(
name_ VARCHAR(100),
userId_ INT,
date_ VARCHAR(100),
description_ VARCHAR(300),
courseId_ VARCHAR(200)
)
BEGIN
SET @convertedDate = STR_TO_DATE(date_ , "%Y-%m-%d %H:%i") ;
INSERT INTO Event(EventName,DueDate,Description) VALUES(name_ , @convertedDate, description_) ;
SET @newId = (SELECT EventId FROM Event ORDER BY EventId DESC LIMIT 1) ;
INSERT INTO CreateEvent(EventId, UserId) VALUES(@newId, userId_) ;
INSERT INTO Assign(EventId,CourseId) VALUES(@newId, courseId_) ;
END //
DELIMITER ;
| 34.722222
| 103
| 0.7024
|
bb6a5bcefaa1d7b738939860378ede9c45f99b66
| 8,113
|
cs
|
C#
|
src/Integrations/Domain/Domain.Api.V1/src/Domain.Api.V1/Model/DomainListingsServiceV1ModelDomainListingsApiModelQueryResultsListingStatementOfInformation.cs
|
neildobson-au/Propella
|
3b22d5bee51bfb203e54f4fecb6ecc671d085d40
|
[
"MIT"
] | null | null | null |
src/Integrations/Domain/Domain.Api.V1/src/Domain.Api.V1/Model/DomainListingsServiceV1ModelDomainListingsApiModelQueryResultsListingStatementOfInformation.cs
|
neildobson-au/Propella
|
3b22d5bee51bfb203e54f4fecb6ecc671d085d40
|
[
"MIT"
] | null | null | null |
src/Integrations/Domain/Domain.Api.V1/src/Domain.Api.V1/Model/DomainListingsServiceV1ModelDomainListingsApiModelQueryResultsListingStatementOfInformation.cs
|
neildobson-au/Propella
|
3b22d5bee51bfb203e54f4fecb6ecc671d085d40
|
[
"MIT"
] | null | null | null |
/*
* Domain Public API
*
* See https://developer.domain.com.au for more information
*
* The version of the OpenAPI document: v1
* Contact: api@domain.com.au
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = Domain.Api.V1.Client.OpenAPIDateConverter;
namespace Domain.Api.V1.Model
{
/// <summary>
/// DomainListingsServiceV1ModelDomainListingsApiModelQueryResultsListingStatementOfInformation
/// </summary>
[DataContract(Name = "Domain.ListingsService.v1.Model.DomainListingsApiModelQueryResultsListingStatementOfInformation")]
public partial class DomainListingsServiceV1ModelDomainListingsApiModelQueryResultsListingStatementOfInformation : IEquatable<DomainListingsServiceV1ModelDomainListingsApiModelQueryResultsListingStatementOfInformation>, IValidatableObject
{
/// <summary>
/// Initializes a new instance of the <see cref="DomainListingsServiceV1ModelDomainListingsApiModelQueryResultsListingStatementOfInformation" /> class.
/// </summary>
/// <param name="estimatedPrice">estimatedPrice.</param>
/// <param name="comparableData">comparableData.</param>
/// <param name="suburbMedianPrice">suburbMedianPrice.</param>
/// <param name="documentationUrl">documentationUrl.</param>
public DomainListingsServiceV1ModelDomainListingsApiModelQueryResultsListingStatementOfInformation(DomainListingsServiceV1ModelDomainListingsApiModelQueryResultsListingBasicPrice estimatedPrice = default(DomainListingsServiceV1ModelDomainListingsApiModelQueryResultsListingBasicPrice), DomainListingsServiceV1ModelDomainListingsApiModelQueryResultsListingComparableData comparableData = default(DomainListingsServiceV1ModelDomainListingsApiModelQueryResultsListingComparableData), DomainListingsServiceV1ModelDomainListingsApiModelQueryResultsListingMedianPriceData suburbMedianPrice = default(DomainListingsServiceV1ModelDomainListingsApiModelQueryResultsListingMedianPriceData), string documentationUrl = default(string))
{
this.EstimatedPrice = estimatedPrice;
this.ComparableData = comparableData;
this.SuburbMedianPrice = suburbMedianPrice;
this.DocumentationUrl = documentationUrl;
}
/// <summary>
/// Gets or Sets EstimatedPrice
/// </summary>
[DataMember(Name = "estimatedPrice", EmitDefaultValue = false)]
public DomainListingsServiceV1ModelDomainListingsApiModelQueryResultsListingBasicPrice EstimatedPrice { get; set; }
/// <summary>
/// Gets or Sets ComparableData
/// </summary>
[DataMember(Name = "comparableData", EmitDefaultValue = false)]
public DomainListingsServiceV1ModelDomainListingsApiModelQueryResultsListingComparableData ComparableData { get; set; }
/// <summary>
/// Gets or Sets SuburbMedianPrice
/// </summary>
[DataMember(Name = "suburbMedianPrice", EmitDefaultValue = false)]
public DomainListingsServiceV1ModelDomainListingsApiModelQueryResultsListingMedianPriceData SuburbMedianPrice { get; set; }
/// <summary>
/// Gets or Sets DocumentationUrl
/// </summary>
[DataMember(Name = "documentationUrl", EmitDefaultValue = false)]
public string DocumentationUrl { get; set; }
/// <summary>
/// Returns the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString()
{
var sb = new StringBuilder();
sb.Append("class DomainListingsServiceV1ModelDomainListingsApiModelQueryResultsListingStatementOfInformation {\n");
sb.Append(" EstimatedPrice: ").Append(EstimatedPrice).Append("\n");
sb.Append(" ComparableData: ").Append(ComparableData).Append("\n");
sb.Append(" SuburbMedianPrice: ").Append(SuburbMedianPrice).Append("\n");
sb.Append(" DocumentationUrl: ").Append(DocumentationUrl).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Returns the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public virtual string ToJson()
{
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
}
/// <summary>
/// Returns true if objects are equal
/// </summary>
/// <param name="input">Object to be compared</param>
/// <returns>Boolean</returns>
public override bool Equals(object input)
{
return this.Equals(input as DomainListingsServiceV1ModelDomainListingsApiModelQueryResultsListingStatementOfInformation);
}
/// <summary>
/// Returns true if DomainListingsServiceV1ModelDomainListingsApiModelQueryResultsListingStatementOfInformation instances are equal
/// </summary>
/// <param name="input">Instance of DomainListingsServiceV1ModelDomainListingsApiModelQueryResultsListingStatementOfInformation to be compared</param>
/// <returns>Boolean</returns>
public bool Equals(DomainListingsServiceV1ModelDomainListingsApiModelQueryResultsListingStatementOfInformation input)
{
if (input == null)
return false;
return
(
this.EstimatedPrice == input.EstimatedPrice ||
(this.EstimatedPrice != null &&
this.EstimatedPrice.Equals(input.EstimatedPrice))
) &&
(
this.ComparableData == input.ComparableData ||
(this.ComparableData != null &&
this.ComparableData.Equals(input.ComparableData))
) &&
(
this.SuburbMedianPrice == input.SuburbMedianPrice ||
(this.SuburbMedianPrice != null &&
this.SuburbMedianPrice.Equals(input.SuburbMedianPrice))
) &&
(
this.DocumentationUrl == input.DocumentationUrl ||
(this.DocumentationUrl != null &&
this.DocumentationUrl.Equals(input.DocumentationUrl))
);
}
/// <summary>
/// Gets the hash code
/// </summary>
/// <returns>Hash code</returns>
public override int GetHashCode()
{
unchecked // Overflow is fine, just wrap
{
int hashCode = 41;
if (this.EstimatedPrice != null)
hashCode = hashCode * 59 + this.EstimatedPrice.GetHashCode();
if (this.ComparableData != null)
hashCode = hashCode * 59 + this.ComparableData.GetHashCode();
if (this.SuburbMedianPrice != null)
hashCode = hashCode * 59 + this.SuburbMedianPrice.GetHashCode();
if (this.DocumentationUrl != null)
hashCode = hashCode * 59 + this.DocumentationUrl.GetHashCode();
return hashCode;
}
}
/// <summary>
/// To validate all properties of the instance
/// </summary>
/// <param name="validationContext">Validation context</param>
/// <returns>Validation Result</returns>
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
{
yield break;
}
}
}
| 46.36
| 731
| 0.66227
|
3afc9c97c1dddca7d8eb1654e5c57918f9092926
| 8,231
|
kt
|
Kotlin
|
library/src/prod/java/io/nyris/sdk/di/module/io/nyris/sdk/ServiceModule.kt
|
ashraf-atef/SDK.Android
|
5010741c43225f0d507a237966d5ac95a643bdb1
|
[
"Apache-2.0"
] | 1
|
2019-03-04T11:30:11.000Z
|
2019-03-04T11:30:11.000Z
|
library/src/prod/java/io/nyris/sdk/di/module/io/nyris/sdk/ServiceModule.kt
|
ashraf-atef/SDK.Android
|
5010741c43225f0d507a237966d5ac95a643bdb1
|
[
"Apache-2.0"
] | null | null | null |
library/src/prod/java/io/nyris/sdk/di/module/io/nyris/sdk/ServiceModule.kt
|
ashraf-atef/SDK.Android
|
5010741c43225f0d507a237966d5ac95a643bdb1
|
[
"Apache-2.0"
] | null | null | null |
/*
* Copyright (C) 2018 nyris GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.nyris.sdk
import com.google.gson.Gson
import dagger.Module
import dagger.Provides
import retrofit2.Retrofit
import javax.inject.Singleton
/**
* ServiceModule.kt - class defines methods which provide singleton dependencies for service creation.
*
* @author Sidali Mellouk
* Created by nyris GmbH
* Copyright © 2018 nyris GmbH. All rights reserved.
*/
@Module
internal class ServiceModule {
/**
* Provide Sdk Scheduler
* Used to specify API scheduling units of work provided
*
* @return the sdk scheduler
*/
@Provides
@Singleton
fun provideSdkSchedulerProvider(): SdkSchedulerProvider {
return SdkSchedulerProvider()
}
/**
* Provide Image Matching Service
* Used as service to send image byte array to the defined endpoint by the the {@code service}.
*
* @param retrofit the retrofit
* @return the image matching service
*/
@Provides
@Singleton
fun provideImageMatchingService(retrofit: Retrofit): ImageMatchingService {
return retrofit.create<ImageMatchingService>(ImageMatchingService::class.java)
}
/**
* Provide Image Object Proposal Service
* Used as service to send image byte array to the defined endpoint by the the {@code service}.
*
* @param retrofit the retrofit
* @return the image object proposal service
*/
@Provides
@Singleton
fun provideObjectProposalService(retrofit: Retrofit): ObjectProposalService {
return retrofit.create<ObjectProposalService>(ObjectProposalService::class.java)
}
/**
* Provide Not Found Matching Service
* Used as service to mark unrecognized image as not found to the defined endpoint by the the {@code service}.
*
* @param retrofit the retrofit
* @return the not fount matching service
*/
@Provides
@Singleton
fun provideNotFoundMatchingService(retrofit: Retrofit): NotFoundMatchingService {
return retrofit.create<NotFoundMatchingService>(NotFoundMatchingService::class.java)
}
/**
* Provide Text Search Offer Service
* Used as service to send text to the defined endpoint by the the {@code service}.
*
* @param retrofit the retrofit
* @return the search offer service
*/
@Provides
@Singleton
fun provideTextSearchOfferService(retrofit: Retrofit): TextSearchService {
return retrofit.create<TextSearchService>(TextSearchService::class.java)
}
/**
* Provide Similarity Service
* Used as service to send sku to the defined endpoint by the the {@code service}.
*
* @param retrofit the retrofit
* @return the similarity service
*/
@Provides
@Singleton
fun provideSimilarityService(retrofit: Retrofit): SimilarityService {
return retrofit.create<SimilarityService>(SimilarityService::class.java)
}
/**
* Provide Image Matching Api
* Used as api to match image byte array.
*
* @param imageMatchingService the image matching service
* @param outputFormat the output format
* @param language the language
* @param gson the gson
* @param schedulerProvider the skd scheduler
* @param apiHeader the api header
* @param endpoints the endpoint builder
* @return the image matching api
*/
@Provides
@Singleton
fun provideImageMatchingApi(imageMatchingService: ImageMatchingService,
@OutputFormatInfo outputFormat: String,
@LanguageInfo language: String,
gson: Gson,
schedulerProvider: SdkSchedulerProvider,
apiHeader: ApiHeader,
endpoints: EndpointBuilder): IImageMatchingApi {
return ImageMatchingApi(imageMatchingService, outputFormat, language, gson, schedulerProvider, apiHeader, endpoints)
}
/**
* Provide Object Proposal Api
* Used as api to extract objects from image byte array.
*
* @param objectProposalService the object proposal service
* @param schedulerProvider the sdk scheduler
* @param apiHeader the api header
* @param endpoints the endpoint builder
* @return the object proposal api
*/
@Provides
@Singleton
fun provideObjectProposalApi(objectProposalService: ObjectProposalService,
schedulerProvider: SdkSchedulerProvider,
apiHeader: ApiHeader,
endpoints: EndpointBuilder): IObjectProposalApi {
return ObjectProposalApi(objectProposalService, schedulerProvider, apiHeader, endpoints)
}
/**
* Provide Not Found Matching Api
* Used as api to to set image {X} to be matched manually.
*
* @param notFoundMatchingService the not found matching service
* @param schedulerProvider the sdk scheduler
* @param apiHeader the api header
* @param endpoints the endpoint builder
* @return the not found matching api
*/
@Provides
@Singleton
fun provideNotFoundMatchingApi(notFoundMatchingService: NotFoundMatchingService,
schedulerProvider: SdkSchedulerProvider,
apiHeader: ApiHeader,
endpoints: EndpointBuilder): INotFoundMatchingApi {
return NotFoundMatchingApi(notFoundMatchingService, schedulerProvider, apiHeader, endpoints)
}
/**
* Provide Text Search Api
* Used as api to search offer based on the provided text.
*
* @param textSearchService the text search service
* @param schedulerProvider the sdk scheduler
* @param apiHeader the api header
* @param endpoints the endpoint builder
* @return the text search api
*/
@Provides
@Singleton
fun provideTextSearchApi(textSearchService: TextSearchService,
@OutputFormatInfo outputFormat: String,
@LanguageInfo language: String,
gson: Gson,
schedulerProvider: SdkSchedulerProvider,
apiHeader: ApiHeader,
endpoints: EndpointBuilder): ITextSearchApi {
return TextSearchApi(textSearchService, outputFormat, language, gson, schedulerProvider, apiHeader, endpoints)
}
/**
* Provide Similarity Api
* Used as api to get similar offers based on sku.
*
* @param similarityService the similarity service
* @param schedulerProvider the sdk scheduler
* @param apiHeader the api header
* @param endpoints the endpoint builder
* @return the similarity api
*/
@Provides
@Singleton
fun provideSimilarityApi(similarityService: SimilarityService,
@OutputFormatInfo outputFormat: String,
@LanguageInfo language: String,
gson: Gson,
schedulerProvider: SdkSchedulerProvider,
apiHeader: ApiHeader,
endpoints: EndpointBuilder): ISimilarityApi {
return SimilarityApi(similarityService, outputFormat, language, gson, schedulerProvider, apiHeader, endpoints)
}
}
| 37.756881
| 125
| 0.633702
|
bb68bac2f2f3e9de12171880af18e9fe1d07fb21
| 6,121
|
cs
|
C#
|
Assets/_scripts/test/CursorTest.cs
|
xterminal86/FE
|
10dd732b7337a65443268e39da2d5f689e88b59c
|
[
"MIT"
] | null | null | null |
Assets/_scripts/test/CursorTest.cs
|
xterminal86/FE
|
10dd732b7337a65443268e39da2d5f689e88b59c
|
[
"MIT"
] | null | null | null |
Assets/_scripts/test/CursorTest.cs
|
xterminal86/FE
|
10dd732b7337a65443268e39da2d5f689e88b59c
|
[
"MIT"
] | null | null | null |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CursorTest : MonoBehaviour
{
public Transform Cursor;
Vector3 _cursorPosition = Vector3.zero;
void Update()
{
HandleKeyDown();
HandleKeyRepeat();
HandleKeyUp();
/*
if (Input.GetKeyDown(KeyCode.LeftArrow))
{
_cursorPosition.x--;
}
_cursorPosition.x = Mathf.Clamp(_cursorPosition.x, -16.0f, 16.0f);
Cursor.position = _cursorPosition;
*/
}
void HandleKeyDown()
{
if (Input.GetKeyDown(KeyCode.LeftArrow))
{
MoveCursorLR(-1, 0);
_delayValue = GlobalConstants.CursorDelayBeforeRepeat;
}
if (Input.GetKeyDown(KeyCode.RightArrow))
{
MoveCursorLR(1, 0);
_delayValue = GlobalConstants.CursorDelayBeforeRepeat;
}
if (Input.GetKeyDown(KeyCode.UpArrow))
{
MoveCursorUD(0, 1);
_delayValue = GlobalConstants.CursorDelayBeforeRepeat;
}
if (Input.GetKeyDown(KeyCode.DownArrow))
{
MoveCursorUD(0, -1);
_delayValue = GlobalConstants.CursorDelayBeforeRepeat;
}
}
float _repeatTimer = 0.0f;
float _delayValue = 0.0f;
void HandleKeyRepeat()
{
if (Input.GetKey(KeyCode.LeftArrow))
{
_repeatTimer += Time.deltaTime;
if (_repeatTimer > _delayValue)
{
MoveCursorLR(-1, 0);
}
}
if (Input.GetKey(KeyCode.RightArrow))
{
_repeatTimer += Time.deltaTime;
if (_repeatTimer > _delayValue)
{
MoveCursorLR(1, 0);
}
}
if (Input.GetKey(KeyCode.UpArrow))
{
_repeatTimer += Time.deltaTime;
if (_repeatTimer > _delayValue)
{
MoveCursorUD(0, 1);
}
}
if (Input.GetKey(KeyCode.DownArrow))
{
_repeatTimer += Time.deltaTime;
if (_repeatTimer > _delayValue)
{
MoveCursorUD(0, -1);
}
}
}
void HandleKeyUp()
{
if (Input.GetKeyUp(KeyCode.LeftArrow))
{
_repeatTimer = 0.0f;
}
if (Input.GetKeyUp(KeyCode.RightArrow))
{
_repeatTimer = 0.0f;
}
if (Input.GetKeyUp(KeyCode.UpArrow))
{
_repeatTimer = 0.0f;
}
if (Input.GetKeyUp(KeyCode.DownArrow))
{
_repeatTimer = 0.0f;
}
}
bool _workingLR = false;
void MoveCursorLR(int incX, int incY)
{
if (!_workingLR)
{
_workingLR = true;
StartCoroutine(MoveCursorRoutine(incX, incY));
}
}
bool _workingUD = false;
void MoveCursorUD(int incX, int incY)
{
if (!_workingUD)
{
_workingUD = true;
StartCoroutine(MoveCursorRoutine(incX, incY));
}
}
float _cursorSlideSpeed = 0.0f;
IEnumerator MoveCursorRoutine(int incX, int incY)
{
_cursorSlideSpeed = GlobalConstants.CursorSlideSpeed;
float x = _cursorPosition.x;
float y = _cursorPosition.y;
float oldX = x;
float oldY = y;
float newX = _cursorPosition.x + incX;
float newY = _cursorPosition.y + incY;
var boundsCheckRes = CheckBounds((int)newX, (int)newY);
if (boundsCheckRes.x != 0)
{
incX = 0;
}
if (boundsCheckRes.y != 0)
{
incY = 0;
}
if (incX != 0 && incY != 0)
{
// Diagonal cursor movement
bool condX = (incX > 0) ? (x < newX) : (x > newX);
bool condY = (incY > 0) ? (y < newY) : (y > newY);
int signX = (incX < 0) ? -1 : 1;
int signY = (incY < 0) ? -1 : 1;
while (condX && condY)
{
condX = (incX > 0) ? (x < newX) : (x > newX);
condY = (incY > 0) ? (y < newY) : (y > newY);
x += signX * Time.deltaTime * _cursorSlideSpeed;
y += signY * Time.deltaTime * _cursorSlideSpeed;
if (incY > 0)
{
y = Mathf.Clamp(y, oldY, newY);
}
else
{
y = Mathf.Clamp(y, newY, oldY);
}
if (incX > 0)
{
x = Mathf.Clamp(x, oldX, newX);
}
else
{
x = Mathf.Clamp(x, newX, oldX);
}
_cursorPosition.x = x;
_cursorPosition.y = y;
Cursor.position = _cursorPosition;
yield return null;
}
x = newX;
y = newY;
_cursorPosition.x = x;
_cursorPosition.y = y;
Cursor.position = _cursorPosition;
}
else
{
// Horizontal and vertical cursor movement
if (incX != 0)
{
bool condX = (incX > 0) ? (x < newX) : (x > newX);
int signX = (incX < 0) ? -1 : 1;
while (condX)
{
condX = (incX > 0) ? (x < newX) : (x > newX);
x += signX * Time.deltaTime * _cursorSlideSpeed;
if (incX > 0)
{
x = Mathf.Clamp(x, oldX, newX);
}
else
{
x = Mathf.Clamp(x, newX, oldX);
}
_cursorPosition.x = x;
Cursor.position = _cursorPosition;
yield return null;
}
x = newX;
_cursorPosition.x = x;
Cursor.position = _cursorPosition;
_workingLR = false;
}
if (incY != 0)
{
bool condY = (incY > 0) ? (y < newY) : (y > newY);
int signY = (incY < 0) ? -1 : 1;
while (condY)
{
condY = (incY > 0) ? (y < newY) : (y > newY);
y += signY * Time.deltaTime * _cursorSlideSpeed;
if (incY > 0)
{
y = Mathf.Clamp(y, oldY, newY);
}
else
{
y = Mathf.Clamp(y, newY, oldY);
_cursorPosition.y = y;
Cursor.position = _cursorPosition;
yield return null;
}
y = newY;
_cursorPosition.y = y;
Cursor.position = _cursorPosition;
_workingUD = false;
}
}
}
yield return null;
}
Vector2Int _checkBoundsResult = Vector2Int.zero;
Vector2Int CheckBounds(int x, int y)
{
int resX = (x < -16.0f || x > 16.0f) ? 1 : 0;
int resY = (y < -9.0f || y > 9.0f) ? 1 : 0;
_checkBoundsResult.Set(resX, resY);
return _checkBoundsResult;
}
}
| 19.745161
| 70
| 0.522464
|
e4b7042b4fda24f459f87ec35802c93c62e87b95
| 4,889
|
h
|
C
|
include/iommu_domains.h
|
DNSS4503/S4503_10.2
|
a9482ce6ee1eeb6eb99591774b6283eae6ba0dc2
|
[
"Apache-2.0"
] | 1
|
2016-09-05T19:40:48.000Z
|
2016-09-05T19:40:48.000Z
|
include/iommu_domains.h
|
DNSS4503/S4503_10.2
|
a9482ce6ee1eeb6eb99591774b6283eae6ba0dc2
|
[
"Apache-2.0"
] | null | null | null |
include/iommu_domains.h
|
DNSS4503/S4503_10.2
|
a9482ce6ee1eeb6eb99591774b6283eae6ba0dc2
|
[
"Apache-2.0"
] | null | null | null |
/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef _ARCH_IOMMU_DOMAINS_H
#define _ARCH_IOMMU_DOMAINS_H
#include <linux/errno.h>
#include <memory_alloc.h>
#define MSM_IOMMU_DOMAIN_SECURE 0x1
enum {
VIDEO_DOMAIN,
CAMERA_DOMAIN,
DISPLAY_READ_DOMAIN,
DISPLAY_WRITE_DOMAIN,
ROTATOR_SRC_DOMAIN,
ROTATOR_DST_DOMAIN,
MAX_DOMAINS
};
enum {
VIDEO_FIRMWARE_POOL,
VIDEO_MAIN_POOL,
GEN_POOL,
};
struct msm_iommu_domain_name {
char *name;
int domain;
};
struct msm_iommu_domain {
/* iommu domain to map in */
struct iommu_domain *domain;
/* total number of allocations from this domain */
atomic_t allocation_cnt;
/* number of iova pools */
int npools;
/*
* array of gen_pools for allocating iovas.
* behavior is undefined if these overlap
*/
struct mem_pool *iova_pools;
};
struct iommu_domains_pdata {
struct msm_iommu_domain *domains;
int ndomains;
struct msm_iommu_domain_name *domain_names;
int nnames;
unsigned int domain_alloc_flags;
};
struct msm_iova_partition {
unsigned long start;
unsigned long size;
};
struct msm_iova_layout {
struct msm_iova_partition *partitions;
int npartitions;
const char *client_name;
unsigned int domain_flags;
unsigned int is_secure;
};
#if defined(CONFIG_MSM_IOMMU)
extern void msm_iommu_set_client_name(struct iommu_domain *domain,
char const *name);
extern struct iommu_domain *msm_get_iommu_domain(int domain_num);
extern int msm_find_domain_no(const struct iommu_domain *domain);
extern int msm_allocate_iova_address(unsigned int iommu_domain,
unsigned int partition_no,
unsigned long size,
unsigned long align,
unsigned long *iova);
extern void msm_free_iova_address(unsigned long iova,
unsigned int iommu_domain,
unsigned int partition_no,
unsigned long size);
extern int msm_use_iommu(void);
extern int msm_iommu_map_extra(struct iommu_domain *domain,
unsigned long start_iova,
phys_addr_t phys_addr,
unsigned long size,
unsigned long page_size,
int cached);
extern void msm_iommu_unmap_extra(struct iommu_domain *domain,
unsigned long start_iova,
unsigned long size,
unsigned long page_size);
extern int msm_iommu_map_contig_buffer(phys_addr_t phys,
unsigned int domain_no,
unsigned int partition_no,
unsigned long size,
unsigned long align,
unsigned long cached,
unsigned long *iova_val);
extern void msm_iommu_unmap_contig_buffer(unsigned long iova,
unsigned int domain_no,
unsigned int partition_no,
unsigned long size);
extern int msm_register_domain(struct msm_iova_layout *layout);
extern int msm_unregister_domain(struct iommu_domain *domain);
#else
static inline void msm_iommu_set_client_name(struct iommu_domain *domain,
char const *name)
{
}
static inline struct iommu_domain
*msm_get_iommu_domain(int subsys_id) { return NULL; }
static inline int msm_find_domain_no(const struct iommu_domain *domain)
{
return -EINVAL;
}
static inline int msm_allocate_iova_address(unsigned int iommu_domain,
unsigned int partition_no,
unsigned long size,
unsigned long align,
unsigned long *iova) { return -ENOMEM; }
static inline void msm_free_iova_address(unsigned long iova,
unsigned int iommu_domain,
unsigned int partition_no,
unsigned long size) { return; }
static inline int msm_use_iommu(void)
{
return 0;
}
static inline int msm_iommu_map_extra(struct iommu_domain *domain,
unsigned long start_iova,
phys_addr_t phys_addr,
unsigned long size,
unsigned long page_size,
int cached)
{
return -ENODEV;
}
static inline void msm_iommu_unmap_extra(struct iommu_domain *domain,
unsigned long start_iova,
unsigned long size,
unsigned long page_size)
{
}
static inline int msm_iommu_map_contig_buffer(phys_addr_t phys,
unsigned int domain_no,
unsigned int partition_no,
unsigned long size,
unsigned long align,
unsigned long cached,
unsigned long *iova_val)
{
*iova_val = phys;
return 0;
}
static inline void msm_iommu_unmap_contig_buffer(unsigned long iova,
unsigned int domain_no,
unsigned int partition_no,
unsigned long size)
{
return;
}
static inline int msm_register_domain(struct msm_iova_layout *layout)
{
return -ENODEV;
}
static inline int msm_unregister_domain(struct iommu_domain *domain)
{
return -ENODEV;
}
#endif
#endif
| 23.618357
| 73
| 0.757824
|
c6e5777883b1432b9507e77509ce91ef0173474f
| 333
|
css
|
CSS
|
src/App.css
|
ongzhixian/wreckApp
|
9297c298d60195038b64d49e160757d9ec92c2d7
|
[
"MIT"
] | null | null | null |
src/App.css
|
ongzhixian/wreckApp
|
9297c298d60195038b64d49e160757d9ec92c2d7
|
[
"MIT"
] | null | null | null |
src/App.css
|
ongzhixian/wreckApp
|
9297c298d60195038b64d49e160757d9ec92c2d7
|
[
"MIT"
] | null | null | null |
body {
margin: 0;
font-family: 'Catamaran', sans-serif;
}
.App {
/* margin: 1rem; */
/* font-family: Arial, Helvetica, sans-serif; */
color:#222;
}
.brand {
font-family: 'Romanesco', cursive;
margin-right: 1rem;
font-size: 2.67em;
}
.prose {
margin: 0 1in;
}
.prose p {
text-indent:.67in;
}
| 14.478261
| 52
| 0.561562
|
20e71b90c6491598ca4e356e0f183ba448c5b800
| 2,202
|
py
|
Python
|
repo/script.module.urlresolver/lib/urlresolver/plugins/divxstage.py
|
Hades01/Addons
|
710da97ac850197498a3cd64be1811c593610add
|
[
"Apache-2.0"
] | null | null | null |
repo/script.module.urlresolver/lib/urlresolver/plugins/divxstage.py
|
Hades01/Addons
|
710da97ac850197498a3cd64be1811c593610add
|
[
"Apache-2.0"
] | null | null | null |
repo/script.module.urlresolver/lib/urlresolver/plugins/divxstage.py
|
Hades01/Addons
|
710da97ac850197498a3cd64be1811c593610add
|
[
"Apache-2.0"
] | null | null | null |
'''
divxstage urlresolver plugin
Copyright (C) 2011 t0mm0, DragonWin
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
'''
import re
from urlresolver import common
from urlresolver.resolver import UrlResolver, ResolverError
class DivxstageResolver(UrlResolver):
name = 'divxstage'
domains = ['divxstage.eu', 'divxstage.net', 'divxstage.to', 'cloudtime.to']
pattern = '(?://|\.)(divxstage.eu|divxstage.net|divxstage.to|cloudtime.to)/(?:video/|embed/\?v=)([A-Za-z0-9]+)'
def __init__(self):
self.net = common.Net()
def get_media_url(self, host, media_id):
web_url = self.get_url(host, media_id)
html = self.net.http_GET(web_url).content
r = re.search('flashvars.filekey=(.+?);', html)
if r:
r = r.group(1)
try: filekey = re.compile('\s+%s="(.+?)"' % r).findall(html)[-1]
except: filekey = r
player_url = 'http://www.cloudtime.to/api/player.api.php?key=%s&file=%s' % (filekey, media_id)
html = self.net.http_GET(player_url).content
r = re.search('url=(.+?)&', html)
if r:
stream_url = r.group(1)
else:
raise ResolverError('File Not Found or removed')
return stream_url
def get_url(self, host, media_id):
return 'http://www.cloudtime.to/embed/?v=%s' % media_id
def get_host_and_id(self, url):
r = re.search(self.pattern, url)
if r:
return r.groups()
else:
return False
def valid_url(self, url, host):
return re.search(self.pattern, url) or self.name in host
| 32.382353
| 115
| 0.64396
|
cd3a41f84333208711406bc384791e25a668aca0
| 6,377
|
cs
|
C#
|
Source/Platibus/Config/Subscription.cs
|
amarrical/Platibus
|
b7712882ad4d88a660bde669d9077bd940afe0a0
|
[
"MIT"
] | 36
|
2015-07-03T21:36:51.000Z
|
2022-02-18T18:57:44.000Z
|
Source/Platibus/Config/Subscription.cs
|
amarrical/Platibus
|
b7712882ad4d88a660bde669d9077bd940afe0a0
|
[
"MIT"
] | 32
|
2015-03-14T13:58:25.000Z
|
2020-03-10T11:02:43.000Z
|
Source/Platibus/Config/Subscription.cs
|
sweetlandj/Pluribus
|
b7712882ad4d88a660bde669d9077bd940afe0a0
|
[
"MIT"
] | 7
|
2015-05-01T16:39:20.000Z
|
2021-06-21T16:22:18.000Z
|
// The MIT License (MIT)
//
// Copyright (c) 2016 Jesse Sweetland
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
using System.Diagnostics;
namespace Platibus.Config
{
/// <summary>
/// A basic implementation of <see cref="ISubscription"/>
/// </summary>
[DebuggerDisplay("{" + nameof(ToString) + ",nq}")]
public class Subscription : ISubscription, IEquatable<Subscription>
{
/// <summary>
/// Initializes a new <see cref="Subscription"/> to the specified
/// <paramref name="endpoint"/> and <paramref name="topic"/> with the
/// specified <paramref name="ttl"/>
/// </summary>
/// <param name="endpoint">The endpoint in which the <paramref name="topic"/>
/// is hosted</param>
/// <param name="topic">The topic being subscribed to</param>
/// <param name="ttl">Optional. The maximum amount of time the subscription will
/// be effective unless it is renewed</param>
/// <exception cref="ArgumentNullException">If <paramref name="endpoint"/> or
/// <paramref name="topic"/> are <c>null</c></exception>
public Subscription(EndpointName endpoint, TopicName topic, TimeSpan ttl = default(TimeSpan))
{
Topic = topic ?? throw new ArgumentNullException(nameof(topic));
Endpoint = endpoint ?? throw new ArgumentNullException(nameof(endpoint));
TTL = ttl;
}
/// <summary>
/// Indicates whether another subscription is equal to this one
/// </summary>
/// <param name="subscription">The other subscription</param>
/// <returns>
/// Returns <c>true</c> if the current object is equal to the other
/// <paramref name="subscription"/>; <c>false</c> otherwise
/// </returns>
public bool Equals(Subscription subscription)
{
return subscription != null
&& Endpoint.Equals(subscription.Endpoint)
&& Topic.Equals(subscription.Topic);
}
/// <summary>
/// The name of the publisher endpoint
/// </summary>
public EndpointName Endpoint { get; }
/// <summary>
/// The name of the topic
/// </summary>
public TopicName Topic { get; }
/// <summary>
/// The Time-To-Live (TTL) for the subscription
/// </summary>
/// <remarks>
/// Subscriptions will regularly be renewed, but the TTL serves as a
/// "dead man's switch" that will cause the subscription to be terminated
/// if not renewed within that span of time.
/// </remarks>
public TimeSpan TTL { get; }
/// <summary>
/// Returns a string that represents the current object.
/// </summary>
/// <returns>
/// A string that represents the current object.
/// </returns>
/// <filterpriority>2</filterpriority>
public override string ToString()
{
return $"{Topic}@{Endpoint}";
}
/// <summary>
/// Serves as a hash function for a particular type.
/// </summary>
/// <returns>
/// A hash code for the current <see cref="T:System.Object"/>.
/// </returns>
/// <filterpriority>2</filterpriority>
public override int GetHashCode()
{
var hashCode = Endpoint.GetHashCode();
hashCode = (hashCode*397) ^ Topic.GetHashCode();
return hashCode;
}
/// <summary>
/// Determines whether the specified <see cref="T:System.Object"/> is equal to the current <see cref="T:System.Object"/>.
/// </summary>
/// <returns>
/// true if the specified object is equal to the current object; otherwise, false.
/// </returns>
/// <param name="obj">The object to compare with the current object. </param><filterpriority>2</filterpriority>
public override bool Equals(object obj)
{
return Equals(obj as Subscription);
}
/// <summary>
/// Overrides the default <c>==</c> operator to determine the equality of two subscriptions
/// based on value rather than identity
/// </summary>
/// <param name="left">The subscription on the left side of the operator</param>
/// <param name="right">The subscription on the right side of the operator</param>
/// <returns>Returns <c>true</c> if the subscriptions are equal; <c>false</c> otherwise</returns>
public static bool operator ==(Subscription left, Subscription right)
{
return Equals(left, right);
}
/// <summary>
/// Overrides the default <c>!=</c> operator to determine the inequality of two subscriptions
/// based on value rather than identity
/// </summary>
/// <param name="left">The subscription on the left side of the operator</param>
/// <param name="right">The subscription on the right side of the operator</param>
/// <returns>Returns <c>true</c> if the subscriptions are unequal; <c>false</c> otherwise</returns>
public static bool operator !=(Subscription left, Subscription right)
{
return !Equals(left, right);
}
}
}
| 42.513333
| 129
| 0.61173
|
cca2bbdee4a4b9dc4d6514f8c446df0722b8cbb9
| 1,491
|
h
|
C
|
Includes/C++11/App.h
|
slicer4ever/IsoSpriteGenerator
|
d7c4923dfbfaed580038b80f4d52d8534f2388fb
|
[
"MIT"
] | null | null | null |
Includes/C++11/App.h
|
slicer4ever/IsoSpriteGenerator
|
d7c4923dfbfaed580038b80f4d52d8534f2388fb
|
[
"MIT"
] | null | null | null |
Includes/C++11/App.h
|
slicer4ever/IsoSpriteGenerator
|
d7c4923dfbfaed580038b80f4d52d8534f2388fb
|
[
"MIT"
] | null | null | null |
#ifndef APP_H
#define APP_H
#include <LWCore/LWTypes.h>
#include <LWPlatform/LWTypes.h>
#include <LWVideo/LWTypes.h>
#include <LWETypes.h>
#include <LWEJobQueue.h>
#include "State.h"
class Renderer;
class Scene;
class App {
public:
static const uint32_t MessageFreq = 3; //Seconds.
void UpdateJob(LWEJob &J, LWEJobThread &Th, LWEJobQueue &Q, uint64_t lCurrentTime);
void InputJob(LWEJob &J, LWEJobThread &Th, LWEJobQueue &Q, uint64_t lCurrentTime);
void RenderJob(LWEJob &J, LWEJobThread &Th, LWEJobQueue &Q, uint64_t lCurrentTime);
void Run(void);
void SetMessage(const LWUTF8Iterator &Message);
bool LoadAssets(const LWUTF8Iterator &FilePath, const LWVideoMode &CurrMode);
template<class Type>
Type *GetState(uint32_t State) {
return (Type*)m_States[State];
}
App &SetActiveState(uint32_t State);
LWWindow *GetWindow(void);
Renderer *GetRenderer(void);
LWVideoDriver *GetVideoDriver(void);
LWEUIManager *GetUIManager(void);
LWAllocator &GetAllocator(void);
App(LWAllocator &Allocator);
~App();
private:
LWAllocator &m_Allocator;
LWEJobQueue m_JobQueue;
State *m_States[State::Count];
LWWindow *m_Window = nullptr;
LWVideoDriver *m_Driver = nullptr;
Renderer *m_Renderer = nullptr;
LWEUIManager *m_UIManager = nullptr;
LWEAssetManager *m_AssetManager = nullptr;
LWEUILabel *m_MessageLbl = nullptr;
uint64_t m_LastUpdateTime = -1;
uint64_t m_LastInputTime = -1;
uint64_t m_MessageTime = 0;
uint32_t m_ActiveState = State::Viewer;
};
#endif
| 22.590909
| 84
| 0.75721
|
8e8ceab8a18d29ed7474f21cbaeb637f34123714
| 465
|
js
|
JavaScript
|
cypress_examples/examples/stubbing-spying__window/cypress/integration/spec.js
|
lezzles11/End-to-End-Testing
|
a8d7bbd92f869c49a618916b7115800d1584234e
|
[
"MIT"
] | null | null | null |
cypress_examples/examples/stubbing-spying__window/cypress/integration/spec.js
|
lezzles11/End-to-End-Testing
|
a8d7bbd92f869c49a618916b7115800d1584234e
|
[
"MIT"
] | null | null | null |
cypress_examples/examples/stubbing-spying__window/cypress/integration/spec.js
|
lezzles11/End-to-End-Testing
|
a8d7bbd92f869c49a618916b7115800d1584234e
|
[
"MIT"
] | null | null | null |
/// <reference types="cypress" />
describe('window open', function () {
it('opens a new window with page1', function () {
// window.open is called on click
// thus we can create method stub after the cy.visit
// but before cy.click
cy.visit('/index.html')
cy.window().then((win) => {
cy.stub(win, 'open').as('windowOpen')
})
cy.get('#open-window').click()
cy.get('@windowOpen').should('be.calledWith', 'page1.html')
})
})
| 29.0625
| 63
| 0.602151
|
650971520e043d502d3835b206d2b640c88fdc40
| 56,665
|
css
|
CSS
|
ajax/libs/emojione/1.3.0/assets/sprites/emojione.sprites.css
|
algolia/cdnjs
|
a0586b35ac4862680d2e090651acc8ccf44a5dda
|
[
"MIT"
] | 5
|
2015-02-20T16:11:30.000Z
|
2017-05-15T11:50:44.000Z
|
ajax/libs/emojione/1.3.0/assets/sprites/emojione.sprites.css
|
algolia/cdnjs
|
a0586b35ac4862680d2e090651acc8ccf44a5dda
|
[
"MIT"
] | null | null | null |
ajax/libs/emojione/1.3.0/assets/sprites/emojione.sprites.css
|
algolia/cdnjs
|
a0586b35ac4862680d2e090651acc8ccf44a5dda
|
[
"MIT"
] | 4
|
2015-07-14T16:16:05.000Z
|
2021-03-10T08:15:54.000Z
|
[class*=emojione-]{text-indent:-9999em;image-rendering:optimizeQuality;font-size:inherit;height:1.3em;width:1.3em;top:-3px;position:relative;display:inline-block;margin:0 .15em;line-height:normal;vertical-align:middle;background-image:url("emojione.sprites.png");background-size:3300%;background-repeat:no-repeat}.emojione-0023-20E3{background-position:3.125% 0%}.emojione-0030-20E3{background-position:21.875% 64.51613%}.emojione-0031-20E3{background-position:0% 3.22581%}.emojione-0032-20E3{background-position:3.125% 3.22581%}.emojione-0033-20E3{background-position:6.25% 0%}.emojione-0034-20E3{background-position:6.25% 3.22581%}.emojione-0035-20E3{background-position:0% 6.45161%}.emojione-0036-20E3{background-position:3.125% 6.45161%}.emojione-0037-20E3{background-position:6.25% 6.45161%}.emojione-0038-20E3{background-position:9.375% 0%}.emojione-0039-20E3{background-position:9.375% 3.22581%}.emojione-00A9{background-position:9.375% 6.45161%}.emojione-00AE{background-position:0% 9.67742%}.emojione-1F004{background-position:3.125% 9.67742%}.emojione-1F0CF{background-position:6.25% 9.67742%}.emojione-1F170{background-position:9.375% 9.67742%}.emojione-1F171{background-position:12.5% 0%}.emojione-1F17E{background-position:12.5% 3.22581%}.emojione-1F17F{background-position:12.5% 6.45161%}.emojione-1F18E{background-position:12.5% 9.67742%}.emojione-1F191{background-position:0% 12.90323%}.emojione-1F192{background-position:3.125% 12.90323%}.emojione-1F193{background-position:6.25% 12.90323%}.emojione-1F194{background-position:9.375% 12.90323%}.emojione-1F195{background-position:12.5% 12.90323%}.emojione-1F196{background-position:15.625% 0%}.emojione-1F197{background-position:15.625% 3.22581%}.emojione-1F198{background-position:15.625% 6.45161%}.emojione-1F199{background-position:15.625% 9.67742%}.emojione-1F19A{background-position:15.625% 12.90323%}.emojione-1F1E6-1F1E8{background-position:0% 16.12903%}.emojione-1F1E6-1F1E9{background-position:3.125% 16.12903%}.emojione-1F1E6-1F1EA{background-position:6.25% 16.12903%}.emojione-1F1E6-1F1EB{background-position:9.375% 16.12903%}.emojione-1F1E6-1F1EC{background-position:12.5% 16.12903%}.emojione-1F1E6-1F1EE{background-position:15.625% 16.12903%}.emojione-1F1E6-1F1F1{background-position:18.75% 0%}.emojione-1F1E6-1F1F2{background-position:18.75% 3.22581%}.emojione-1F1E6-1F1F4{background-position:18.75% 6.45161%}.emojione-1F1E6-1F1F7{background-position:18.75% 9.67742%}.emojione-1F1E6-1F1F9{background-position:18.75% 12.90323%}.emojione-1F1E6-1F1FA{background-position:18.75% 16.12903%}.emojione-1F1E6-1F1FC{background-position:0% 19.35484%}.emojione-1F1E6-1F1FF{background-position:3.125% 19.35484%}.emojione-1F1E7-1F1E6{background-position:6.25% 19.35484%}.emojione-1F1E7-1F1E7{background-position:9.375% 19.35484%}.emojione-1F1E7-1F1E9{background-position:12.5% 19.35484%}.emojione-1F1E7-1F1EA{background-position:15.625% 19.35484%}.emojione-1F1E7-1F1EB{background-position:18.75% 19.35484%}.emojione-1F1E7-1F1EC{background-position:21.875% 0%}.emojione-1F1E7-1F1ED{background-position:21.875% 3.22581%}.emojione-1F1E7-1F1EE{background-position:21.875% 6.45161%}.emojione-1F1E7-1F1EF{background-position:21.875% 9.67742%}.emojione-1F1E7-1F1F2{background-position:21.875% 12.90323%}.emojione-1F1E7-1F1F3{background-position:21.875% 16.12903%}.emojione-1F1E7-1F1F4{background-position:21.875% 19.35484%}.emojione-1F1E7-1F1F7{background-position:0% 22.58065%}.emojione-1F1E7-1F1F8{background-position:3.125% 22.58065%}.emojione-1F1E7-1F1F9{background-position:6.25% 22.58065%}.emojione-1F1E7-1F1FC{background-position:9.375% 22.58065%}.emojione-1F1E7-1F1FE{background-position:12.5% 22.58065%}.emojione-1F1E7-1F1FF{background-position:15.625% 22.58065%}.emojione-1F1E8-1F1E6{background-position:18.75% 22.58065%}.emojione-1F1E8-1F1E9{background-position:21.875% 22.58065%}.emojione-1F1E8-1F1EB{background-position:25% 0%}.emojione-1F1E8-1F1EC{background-position:25% 3.22581%}.emojione-1F1E8-1F1ED{background-position:25% 6.45161%}.emojione-1F1E8-1F1EE{background-position:25% 9.67742%}.emojione-1F1E8-1F1F1{background-position:25% 12.90323%}.emojione-1F1E8-1F1F2{background-position:25% 16.12903%}.emojione-1F1E8-1F1F3{background-position:25% 19.35484%}.emojione-1F1E8-1F1F4{background-position:25% 22.58065%}.emojione-1F1E8-1F1F7{background-position:0% 25.80645%}.emojione-1F1E8-1F1FA{background-position:3.125% 25.80645%}.emojione-1F1E8-1F1FB{background-position:6.25% 25.80645%}.emojione-1F1E8-1F1FE{background-position:9.375% 25.80645%}.emojione-1F1E8-1F1FF{background-position:12.5% 25.80645%}.emojione-1F1E9-1F1EA{background-position:15.625% 25.80645%}.emojione-1F1E9-1F1EF{background-position:18.75% 25.80645%}.emojione-1F1E9-1F1F0{background-position:21.875% 25.80645%}.emojione-1F1E9-1F1F2{background-position:25% 25.80645%}.emojione-1F1E9-1F1F4{background-position:28.125% 0%}.emojione-1F1E9-1F1FF{background-position:28.125% 3.22581%}.emojione-1F1EA-1F1E8{background-position:28.125% 6.45161%}.emojione-1F1EA-1F1EA{background-position:28.125% 9.67742%}.emojione-1F1EA-1F1EC{background-position:28.125% 12.90323%}.emojione-1F1EA-1F1ED{background-position:28.125% 16.12903%}.emojione-1F1EA-1F1F7{background-position:28.125% 19.35484%}.emojione-1F1EA-1F1F8{background-position:28.125% 22.58065%}.emojione-1F1EA-1F1F9{background-position:28.125% 25.80645%}.emojione-1F1EB-1F1EE{background-position:0% 29.03226%}.emojione-1F1EB-1F1EF{background-position:3.125% 29.03226%}.emojione-1F1EB-1F1F0{background-position:6.25% 29.03226%}.emojione-1F1EB-1F1F2{background-position:9.375% 29.03226%}.emojione-1F1EB-1F1F4{background-position:12.5% 29.03226%}.emojione-1F1EB-1F1F7{background-position:15.625% 29.03226%}.emojione-1F1EC-1F1E6{background-position:18.75% 29.03226%}.emojione-1F1EC-1F1E7{background-position:21.875% 29.03226%}.emojione-1F1EC-1F1E9{background-position:25% 29.03226%}.emojione-1F1EC-1F1EA{background-position:28.125% 29.03226%}.emojione-1F1EC-1F1ED{background-position:31.25% 0%}.emojione-1F1EC-1F1EE{background-position:31.25% 3.22581%}.emojione-1F1EC-1F1F1{background-position:31.25% 6.45161%}.emojione-1F1EC-1F1F2{background-position:31.25% 9.67742%}.emojione-1F1EC-1F1F3{background-position:31.25% 12.90323%}.emojione-1F1EC-1F1F6{background-position:31.25% 16.12903%}.emojione-1F1EC-1F1F7{background-position:31.25% 19.35484%}.emojione-1F1EC-1F1F9{background-position:31.25% 22.58065%}.emojione-1F1EC-1F1FA{background-position:31.25% 25.80645%}.emojione-1F1EC-1F1FC{background-position:31.25% 29.03226%}.emojione-1F1EC-1F1FE{background-position:0% 32.25806%}.emojione-1F1ED-1F1F0{background-position:3.125% 32.25806%}.emojione-1F1ED-1F1F3{background-position:6.25% 32.25806%}.emojione-1F1ED-1F1F7{background-position:9.375% 32.25806%}.emojione-1F1ED-1F1F9{background-position:12.5% 32.25806%}.emojione-1F1ED-1F1FA{background-position:15.625% 32.25806%}.emojione-1F1EE-1F1E9{background-position:18.75% 32.25806%}.emojione-1F1EE-1F1EA{background-position:21.875% 32.25806%}.emojione-1F1EE-1F1F1{background-position:25% 32.25806%}.emojione-1F1EE-1F1F3{background-position:28.125% 32.25806%}.emojione-1F1EE-1F1F6{background-position:31.25% 32.25806%}.emojione-1F1EE-1F1F7{background-position:34.375% 0%}.emojione-1F1EE-1F1F8{background-position:34.375% 3.22581%}.emojione-1F1EE-1F1F9{background-position:34.375% 6.45161%}.emojione-1F1EF-1F1EA{background-position:34.375% 9.67742%}.emojione-1F1EF-1F1F2{background-position:34.375% 12.90323%}.emojione-1F1EF-1F1F4{background-position:34.375% 16.12903%}.emojione-1F1EF-1F1F5{background-position:34.375% 19.35484%}.emojione-1F1F0-1F1EA{background-position:34.375% 22.58065%}.emojione-1F1F0-1F1EC{background-position:34.375% 25.80645%}.emojione-1F1F0-1F1ED{background-position:34.375% 29.03226%}.emojione-1F1F0-1F1EE{background-position:34.375% 32.25806%}.emojione-1F1F0-1F1F2{background-position:0% 35.48387%}.emojione-1F1F0-1F1F3{background-position:3.125% 35.48387%}.emojione-1F1F0-1F1F5{background-position:6.25% 35.48387%}.emojione-1F1F0-1F1F7{background-position:9.375% 35.48387%}.emojione-1F1F0-1F1FC{background-position:12.5% 35.48387%}.emojione-1F1F0-1F1FE{background-position:15.625% 35.48387%}.emojione-1F1F0-1F1FF{background-position:18.75% 35.48387%}.emojione-1F1F1-1F1E6{background-position:21.875% 35.48387%}.emojione-1F1F1-1F1E7{background-position:25% 35.48387%}.emojione-1F1F1-1F1E8{background-position:28.125% 35.48387%}.emojione-1F1F1-1F1EE{background-position:31.25% 35.48387%}.emojione-1F1F1-1F1F0{background-position:34.375% 35.48387%}.emojione-1F1F1-1F1F7{background-position:37.5% 0%}.emojione-1F1F1-1F1F8{background-position:37.5% 3.22581%}.emojione-1F1F1-1F1F9{background-position:37.5% 6.45161%}.emojione-1F1F1-1F1FA{background-position:37.5% 9.67742%}.emojione-1F1F1-1F1FB{background-position:37.5% 12.90323%}.emojione-1F1F1-1F1FE{background-position:37.5% 16.12903%}.emojione-1F1F2-1F1E6{background-position:37.5% 19.35484%}.emojione-1F1F2-1F1E8{background-position:37.5% 22.58065%}.emojione-1F1F2-1F1E9{background-position:37.5% 25.80645%}.emojione-1F1F2-1F1EA{background-position:37.5% 29.03226%}.emojione-1F1F2-1F1EC{background-position:37.5% 32.25806%}.emojione-1F1F2-1F1ED{background-position:37.5% 35.48387%}.emojione-1F1F2-1F1F0{background-position:0% 38.70968%}.emojione-1F1F2-1F1F1{background-position:3.125% 38.70968%}.emojione-1F1F2-1F1F2{background-position:6.25% 38.70968%}.emojione-1F1F2-1F1F3{background-position:9.375% 38.70968%}.emojione-1F1F2-1F1F4{background-position:12.5% 38.70968%}.emojione-1F1F2-1F1F7{background-position:15.625% 38.70968%}.emojione-1F1F2-1F1F8{background-position:18.75% 38.70968%}.emojione-1F1F2-1F1F9{background-position:21.875% 38.70968%}.emojione-1F1F2-1F1FA{background-position:25% 38.70968%}.emojione-1F1F2-1F1FB{background-position:28.125% 38.70968%}.emojione-1F1F2-1F1FC{background-position:31.25% 38.70968%}.emojione-1F1F2-1F1FD{background-position:34.375% 38.70968%}.emojione-1F1F2-1F1FE{background-position:37.5% 38.70968%}.emojione-1F1F2-1F1FF{background-position:40.625% 0%}.emojione-1F1F3-1F1E6{background-position:40.625% 3.22581%}.emojione-1F1F3-1F1E8{background-position:40.625% 6.45161%}.emojione-1F1F3-1F1EA{background-position:40.625% 9.67742%}.emojione-1F1F3-1F1EC{background-position:40.625% 12.90323%}.emojione-1F1F3-1F1EE{background-position:40.625% 16.12903%}.emojione-1F1F3-1F1F1{background-position:40.625% 19.35484%}.emojione-1F1F3-1F1F4{background-position:40.625% 22.58065%}.emojione-1F1F3-1F1F5{background-position:40.625% 25.80645%}.emojione-1F1F3-1F1F7{background-position:40.625% 29.03226%}.emojione-1F1F3-1F1FA{background-position:40.625% 32.25806%}.emojione-1F1F3-1F1FF{background-position:40.625% 35.48387%}.emojione-1F1F4-1F1F2{background-position:40.625% 38.70968%}.emojione-1F1F5-1F1E6{background-position:0% 41.93548%}.emojione-1F1F5-1F1EA{background-position:3.125% 41.93548%}.emojione-1F1F5-1F1EB{background-position:6.25% 41.93548%}.emojione-1F1F5-1F1EC{background-position:9.375% 41.93548%}.emojione-1F1F5-1F1ED{background-position:12.5% 41.93548%}.emojione-1F1F5-1F1F0{background-position:15.625% 41.93548%}.emojione-1F1F5-1F1F1{background-position:18.75% 41.93548%}.emojione-1F1F5-1F1F7{background-position:21.875% 41.93548%}.emojione-1F1F5-1F1F8{background-position:25% 41.93548%}.emojione-1F1F5-1F1F9{background-position:28.125% 41.93548%}.emojione-1F1F5-1F1FC{background-position:31.25% 41.93548%}.emojione-1F1F5-1F1FE{background-position:34.375% 41.93548%}.emojione-1F1F6-1F1E6{background-position:37.5% 41.93548%}.emojione-1F1F7-1F1F4{background-position:40.625% 41.93548%}.emojione-1F1F7-1F1F8{background-position:43.75% 0%}.emojione-1F1F7-1F1FA{background-position:43.75% 3.22581%}.emojione-1F1F7-1F1FC{background-position:43.75% 6.45161%}.emojione-1F1F8-1F1E6{background-position:43.75% 9.67742%}.emojione-1F1F8-1F1E7{background-position:43.75% 12.90323%}.emojione-1F1F8-1F1E8{background-position:43.75% 16.12903%}.emojione-1F1F8-1F1E9{background-position:43.75% 19.35484%}.emojione-1F1F8-1F1EA{background-position:43.75% 22.58065%}.emojione-1F1F8-1F1EC{background-position:43.75% 25.80645%}.emojione-1F1F8-1F1ED{background-position:43.75% 29.03226%}.emojione-1F1F8-1F1EE{background-position:43.75% 32.25806%}.emojione-1F1F8-1F1F0{background-position:43.75% 35.48387%}.emojione-1F1F8-1F1F1{background-position:43.75% 38.70968%}.emojione-1F1F8-1F1F2{background-position:43.75% 41.93548%}.emojione-1F1F8-1F1F3{background-position:0% 45.16129%}.emojione-1F1F8-1F1F4{background-position:3.125% 45.16129%}.emojione-1F1F8-1F1F7{background-position:6.25% 45.16129%}.emojione-1F1F8-1F1F9{background-position:9.375% 45.16129%}.emojione-1F1F8-1F1FB{background-position:12.5% 45.16129%}.emojione-1F1F8-1F1FE{background-position:15.625% 45.16129%}.emojione-1F1F8-1F1FF{background-position:18.75% 45.16129%}.emojione-1F1F9-1F1E9{background-position:21.875% 45.16129%}.emojione-1F1F9-1F1EC{background-position:25% 45.16129%}.emojione-1F1F9-1F1ED{background-position:28.125% 45.16129%}.emojione-1F1F9-1F1EF{background-position:31.25% 45.16129%}.emojione-1F1F9-1F1F1{background-position:34.375% 45.16129%}.emojione-1F1F9-1F1F2{background-position:37.5% 45.16129%}.emojione-1F1F9-1F1F3{background-position:40.625% 45.16129%}.emojione-1F1F9-1F1F4{background-position:43.75% 45.16129%}.emojione-1F1F9-1F1F7{background-position:46.875% 0%}.emojione-1F1F9-1F1F9{background-position:46.875% 3.22581%}.emojione-1F1F9-1F1FB{background-position:46.875% 6.45161%}.emojione-1F1F9-1F1FC{background-position:46.875% 9.67742%}.emojione-1F1F9-1F1FF{background-position:46.875% 12.90323%}.emojione-1F1FA-1F1E6{background-position:46.875% 16.12903%}.emojione-1F1FA-1F1EC{background-position:46.875% 19.35484%}.emojione-1F1FA-1F1F8{background-position:46.875% 22.58065%}.emojione-1F1FA-1F1FE{background-position:46.875% 25.80645%}.emojione-1F1FA-1F1FF{background-position:46.875% 29.03226%}.emojione-1F1FB-1F1E6{background-position:46.875% 32.25806%}.emojione-1F1FB-1F1E8{background-position:46.875% 35.48387%}.emojione-1F1FB-1F1EA{background-position:46.875% 38.70968%}.emojione-1F1FB-1F1EE{background-position:46.875% 41.93548%}.emojione-1F1FB-1F1F3{background-position:46.875% 45.16129%}.emojione-1F1FB-1F1FA{background-position:0% 48.3871%}.emojione-1F1FC-1F1EB{background-position:3.125% 48.3871%}.emojione-1F1FC-1F1F8{background-position:6.25% 48.3871%}.emojione-1F1FD-1F1F0{background-position:9.375% 48.3871%}.emojione-1F1FE-1F1EA{background-position:12.5% 48.3871%}.emojione-1F1FF-1F1E6{background-position:15.625% 48.3871%}.emojione-1F1FF-1F1F2{background-position:18.75% 48.3871%}.emojione-1F1FF-1F1FC{background-position:21.875% 48.3871%}.emojione-1F201{background-position:25% 48.3871%}.emojione-1F202{background-position:28.125% 48.3871%}.emojione-1F21A{background-position:31.25% 48.3871%}.emojione-1F22F{background-position:34.375% 48.3871%}.emojione-1F232{background-position:37.5% 48.3871%}.emojione-1F233{background-position:40.625% 48.3871%}.emojione-1F234{background-position:43.75% 48.3871%}.emojione-1F235{background-position:46.875% 48.3871%}.emojione-1F236{background-position:50% 0%}.emojione-1F237{background-position:50% 3.22581%}.emojione-1F238{background-position:50% 6.45161%}.emojione-1F239{background-position:50% 9.67742%}.emojione-1F23A{background-position:50% 12.90323%}.emojione-1F250{background-position:50% 16.12903%}.emojione-1F251{background-position:50% 19.35484%}.emojione-1F300{background-position:50% 22.58065%}.emojione-1F301{background-position:50% 25.80645%}.emojione-1F302{background-position:50% 29.03226%}.emojione-1F303{background-position:50% 32.25806%}.emojione-1F304{background-position:50% 35.48387%}.emojione-1F305{background-position:50% 38.70968%}.emojione-1F306{background-position:50% 41.93548%}.emojione-1F307{background-position:50% 45.16129%}.emojione-1F308{background-position:50% 48.3871%}.emojione-1F309{background-position:0% 51.6129%}.emojione-1F30A{background-position:3.125% 51.6129%}.emojione-1F30B{background-position:6.25% 51.6129%}.emojione-1F30C{background-position:9.375% 51.6129%}.emojione-1F30D{background-position:12.5% 51.6129%}.emojione-1F30E{background-position:15.625% 51.6129%}.emojione-1F30F{background-position:18.75% 51.6129%}.emojione-1F310{background-position:21.875% 51.6129%}.emojione-1F311{background-position:25% 51.6129%}.emojione-1F312{background-position:28.125% 51.6129%}.emojione-1F313{background-position:31.25% 51.6129%}.emojione-1F314{background-position:34.375% 51.6129%}.emojione-1F315{background-position:37.5% 51.6129%}.emojione-1F316{background-position:40.625% 51.6129%}.emojione-1F317{background-position:43.75% 51.6129%}.emojione-1F318{background-position:46.875% 51.6129%}.emojione-1F319{background-position:50% 51.6129%}.emojione-1F31A{background-position:53.125% 0%}.emojione-1F31B{background-position:53.125% 3.22581%}.emojione-1F31C{background-position:53.125% 6.45161%}.emojione-1F31D{background-position:53.125% 9.67742%}.emojione-1F31E{background-position:53.125% 12.90323%}.emojione-1F31F{background-position:53.125% 16.12903%}.emojione-1F320{background-position:53.125% 19.35484%}.emojione-1F330{background-position:53.125% 22.58065%}.emojione-1F331{background-position:53.125% 25.80645%}.emojione-1F332{background-position:53.125% 29.03226%}.emojione-1F333{background-position:53.125% 32.25806%}.emojione-1F334{background-position:53.125% 35.48387%}.emojione-1F335{background-position:53.125% 38.70968%}.emojione-1F337{background-position:53.125% 41.93548%}.emojione-1F338{background-position:53.125% 45.16129%}.emojione-1F339{background-position:53.125% 48.3871%}.emojione-1F33A{background-position:53.125% 51.6129%}.emojione-1F33B{background-position:0% 54.83871%}.emojione-1F33C{background-position:3.125% 54.83871%}.emojione-1F33D{background-position:6.25% 54.83871%}.emojione-1F33E{background-position:9.375% 54.83871%}.emojione-1F33F{background-position:12.5% 54.83871%}.emojione-1F340{background-position:15.625% 54.83871%}.emojione-1F341{background-position:18.75% 54.83871%}.emojione-1F342{background-position:21.875% 54.83871%}.emojione-1F343{background-position:25% 54.83871%}.emojione-1F344{background-position:28.125% 54.83871%}.emojione-1F345{background-position:31.25% 54.83871%}.emojione-1F346{background-position:34.375% 54.83871%}.emojione-1F347{background-position:37.5% 54.83871%}.emojione-1F348{background-position:40.625% 54.83871%}.emojione-1F349{background-position:43.75% 54.83871%}.emojione-1F34A{background-position:46.875% 54.83871%}.emojione-1F34B{background-position:50% 54.83871%}.emojione-1F34C{background-position:53.125% 54.83871%}.emojione-1F34D{background-position:56.25% 0%}.emojione-1F34E{background-position:56.25% 3.22581%}.emojione-1F34F{background-position:56.25% 6.45161%}.emojione-1F350{background-position:56.25% 9.67742%}.emojione-1F351{background-position:56.25% 12.90323%}.emojione-1F352{background-position:56.25% 16.12903%}.emojione-1F353{background-position:56.25% 19.35484%}.emojione-1F354{background-position:56.25% 22.58065%}.emojione-1F355{background-position:56.25% 25.80645%}.emojione-1F356{background-position:56.25% 29.03226%}.emojione-1F357{background-position:56.25% 32.25806%}.emojione-1F358{background-position:56.25% 35.48387%}.emojione-1F359{background-position:56.25% 38.70968%}.emojione-1F35A{background-position:56.25% 41.93548%}.emojione-1F35B{background-position:56.25% 45.16129%}.emojione-1F35C{background-position:56.25% 48.3871%}.emojione-1F35D{background-position:56.25% 51.6129%}.emojione-1F35E{background-position:56.25% 54.83871%}.emojione-1F35F{background-position:0% 58.06452%}.emojione-1F360{background-position:3.125% 58.06452%}.emojione-1F361{background-position:6.25% 58.06452%}.emojione-1F362{background-position:9.375% 58.06452%}.emojione-1F363{background-position:12.5% 58.06452%}.emojione-1F364{background-position:15.625% 58.06452%}.emojione-1F365{background-position:18.75% 58.06452%}.emojione-1F366{background-position:21.875% 58.06452%}.emojione-1F367{background-position:25% 58.06452%}.emojione-1F368{background-position:28.125% 58.06452%}.emojione-1F369{background-position:31.25% 58.06452%}.emojione-1F36A{background-position:34.375% 58.06452%}.emojione-1F36B{background-position:37.5% 58.06452%}.emojione-1F36C{background-position:40.625% 58.06452%}.emojione-1F36D{background-position:43.75% 58.06452%}.emojione-1F36E{background-position:46.875% 58.06452%}.emojione-1F36F{background-position:50% 58.06452%}.emojione-1F370{background-position:53.125% 58.06452%}.emojione-1F371{background-position:56.25% 58.06452%}.emojione-1F372{background-position:59.375% 0%}.emojione-1F373{background-position:59.375% 3.22581%}.emojione-1F374{background-position:59.375% 6.45161%}.emojione-1F375{background-position:59.375% 9.67742%}.emojione-1F376{background-position:59.375% 12.90323%}.emojione-1F377{background-position:59.375% 16.12903%}.emojione-1F378{background-position:59.375% 19.35484%}.emojione-1F379{background-position:59.375% 22.58065%}.emojione-1F37A{background-position:59.375% 25.80645%}.emojione-1F37B{background-position:59.375% 29.03226%}.emojione-1F37C{background-position:59.375% 32.25806%}.emojione-1F380{background-position:59.375% 35.48387%}.emojione-1F381{background-position:59.375% 38.70968%}.emojione-1F382{background-position:59.375% 41.93548%}.emojione-1F383{background-position:59.375% 45.16129%}.emojione-1F384{background-position:59.375% 48.3871%}.emojione-1F385{background-position:59.375% 51.6129%}.emojione-1F386{background-position:59.375% 54.83871%}.emojione-1F387{background-position:59.375% 58.06452%}.emojione-1F388{background-position:0% 61.29032%}.emojione-1F389{background-position:3.125% 61.29032%}.emojione-1F38A{background-position:6.25% 61.29032%}.emojione-1F38B{background-position:9.375% 61.29032%}.emojione-1F38C{background-position:12.5% 61.29032%}.emojione-1F38D{background-position:15.625% 61.29032%}.emojione-1F38E{background-position:18.75% 61.29032%}.emojione-1F38F{background-position:21.875% 61.29032%}.emojione-1F390{background-position:25% 61.29032%}.emojione-1F391{background-position:28.125% 61.29032%}.emojione-1F392{background-position:31.25% 61.29032%}.emojione-1F393{background-position:34.375% 61.29032%}.emojione-1F3A0{background-position:37.5% 61.29032%}.emojione-1F3A1{background-position:40.625% 61.29032%}.emojione-1F3A2{background-position:43.75% 61.29032%}.emojione-1F3A3{background-position:46.875% 61.29032%}.emojione-1F3A4{background-position:50% 61.29032%}.emojione-1F3A5{background-position:53.125% 61.29032%}.emojione-1F3A6{background-position:56.25% 61.29032%}.emojione-1F3A7{background-position:59.375% 61.29032%}.emojione-1F3A8{background-position:62.5% 0%}.emojione-1F3A9{background-position:62.5% 3.22581%}.emojione-1F3AA{background-position:62.5% 6.45161%}.emojione-1F3AB{background-position:62.5% 9.67742%}.emojione-1F3AC{background-position:62.5% 12.90323%}.emojione-1F3AD{background-position:62.5% 16.12903%}.emojione-1F3AE{background-position:62.5% 19.35484%}.emojione-1F3AF{background-position:62.5% 22.58065%}.emojione-1F3B0{background-position:62.5% 25.80645%}.emojione-1F3B1{background-position:62.5% 29.03226%}.emojione-1F3B2{background-position:62.5% 32.25806%}.emojione-1F3B3{background-position:62.5% 35.48387%}.emojione-1F3B4{background-position:62.5% 38.70968%}.emojione-1F3B5{background-position:62.5% 41.93548%}.emojione-1F3B6{background-position:62.5% 45.16129%}.emojione-1F3B7{background-position:62.5% 48.3871%}.emojione-1F3B8{background-position:62.5% 51.6129%}.emojione-1F3B9{background-position:62.5% 54.83871%}.emojione-1F3BA{background-position:62.5% 58.06452%}.emojione-1F3BB{background-position:62.5% 61.29032%}.emojione-1F3BC{background-position:0% 64.51613%}.emojione-1F3BD{background-position:3.125% 64.51613%}.emojione-1F3BE{background-position:6.25% 64.51613%}.emojione-1F3BF{background-position:9.375% 64.51613%}.emojione-1F3C0{background-position:12.5% 64.51613%}.emojione-1F3C1{background-position:15.625% 64.51613%}.emojione-1F3C2{background-position:18.75% 64.51613%}.emojione-1F3C3{background-position:0% 0%}.emojione-1F3C4{background-position:25% 64.51613%}.emojione-1F3C6{background-position:28.125% 64.51613%}.emojione-1F3C7{background-position:31.25% 64.51613%}.emojione-1F3C8{background-position:34.375% 64.51613%}.emojione-1F3C9{background-position:37.5% 64.51613%}.emojione-1F3CA{background-position:40.625% 64.51613%}.emojione-1F3E0{background-position:43.75% 64.51613%}.emojione-1F3E1{background-position:46.875% 64.51613%}.emojione-1F3E2{background-position:50% 64.51613%}.emojione-1F3E3{background-position:53.125% 64.51613%}.emojione-1F3E4{background-position:56.25% 64.51613%}.emojione-1F3E5{background-position:59.375% 64.51613%}.emojione-1F3E6{background-position:62.5% 64.51613%}.emojione-1F3E7{background-position:65.625% 0%}.emojione-1F3E8{background-position:65.625% 3.22581%}.emojione-1F3E9{background-position:65.625% 6.45161%}.emojione-1F3EA{background-position:65.625% 9.67742%}.emojione-1F3EB{background-position:65.625% 12.90323%}.emojione-1F3EC{background-position:65.625% 16.12903%}.emojione-1F3ED{background-position:65.625% 19.35484%}.emojione-1F3EE{background-position:65.625% 22.58065%}.emojione-1F3EF{background-position:65.625% 25.80645%}.emojione-1F3F0{background-position:65.625% 29.03226%}.emojione-1F400{background-position:65.625% 32.25806%}.emojione-1F401{background-position:65.625% 35.48387%}.emojione-1F402{background-position:65.625% 38.70968%}.emojione-1F403{background-position:65.625% 41.93548%}.emojione-1F404{background-position:65.625% 45.16129%}.emojione-1F405{background-position:65.625% 48.3871%}.emojione-1F406{background-position:65.625% 51.6129%}.emojione-1F407{background-position:65.625% 54.83871%}.emojione-1F408{background-position:65.625% 58.06452%}.emojione-1F409{background-position:65.625% 61.29032%}.emojione-1F40A{background-position:65.625% 64.51613%}.emojione-1F40B{background-position:0% 67.74194%}.emojione-1F40C{background-position:3.125% 67.74194%}.emojione-1F40D{background-position:6.25% 67.74194%}.emojione-1F40E{background-position:9.375% 67.74194%}.emojione-1F40F{background-position:12.5% 67.74194%}.emojione-1F410{background-position:15.625% 67.74194%}.emojione-1F411{background-position:18.75% 67.74194%}.emojione-1F412{background-position:21.875% 67.74194%}.emojione-1F413{background-position:25% 67.74194%}.emojione-1F414{background-position:28.125% 67.74194%}.emojione-1F415{background-position:31.25% 67.74194%}.emojione-1F416{background-position:34.375% 67.74194%}.emojione-1F417{background-position:37.5% 67.74194%}.emojione-1F418{background-position:40.625% 67.74194%}.emojione-1F419{background-position:43.75% 67.74194%}.emojione-1F41A{background-position:46.875% 67.74194%}.emojione-1F41B{background-position:50% 67.74194%}.emojione-1F41C{background-position:53.125% 67.74194%}.emojione-1F41D{background-position:56.25% 67.74194%}.emojione-1F41E{background-position:59.375% 67.74194%}.emojione-1F41F{background-position:62.5% 67.74194%}.emojione-1F420{background-position:65.625% 67.74194%}.emojione-1F421{background-position:68.75% 0%}.emojione-1F422{background-position:68.75% 3.22581%}.emojione-1F423{background-position:68.75% 6.45161%}.emojione-1F424{background-position:68.75% 9.67742%}.emojione-1F425{background-position:68.75% 12.90323%}.emojione-1F426{background-position:68.75% 16.12903%}.emojione-1F427{background-position:68.75% 19.35484%}.emojione-1F428{background-position:68.75% 22.58065%}.emojione-1F429{background-position:68.75% 25.80645%}.emojione-1F42A{background-position:68.75% 29.03226%}.emojione-1F42B{background-position:68.75% 32.25806%}.emojione-1F42C{background-position:68.75% 35.48387%}.emojione-1F42D{background-position:68.75% 38.70968%}.emojione-1F42E{background-position:68.75% 41.93548%}.emojione-1F42F{background-position:68.75% 45.16129%}.emojione-1F430{background-position:68.75% 48.3871%}.emojione-1F431{background-position:68.75% 51.6129%}.emojione-1F432{background-position:68.75% 54.83871%}.emojione-1F433{background-position:68.75% 58.06452%}.emojione-1F434{background-position:68.75% 61.29032%}.emojione-1F435{background-position:68.75% 64.51613%}.emojione-1F436{background-position:68.75% 67.74194%}.emojione-1F437{background-position:0% 70.96774%}.emojione-1F438{background-position:3.125% 70.96774%}.emojione-1F439{background-position:6.25% 70.96774%}.emojione-1F43A{background-position:9.375% 70.96774%}.emojione-1F43B{background-position:12.5% 70.96774%}.emojione-1F43C{background-position:15.625% 70.96774%}.emojione-1F43D{background-position:18.75% 70.96774%}.emojione-1F43E{background-position:21.875% 70.96774%}.emojione-1F440{background-position:25% 70.96774%}.emojione-1F442{background-position:28.125% 70.96774%}.emojione-1F443{background-position:31.25% 70.96774%}.emojione-1F444{background-position:34.375% 70.96774%}.emojione-1F445{background-position:37.5% 70.96774%}.emojione-1F446{background-position:40.625% 70.96774%}.emojione-1F447{background-position:43.75% 70.96774%}.emojione-1F448{background-position:46.875% 70.96774%}.emojione-1F449{background-position:50% 70.96774%}.emojione-1F44A{background-position:53.125% 70.96774%}.emojione-1F44B{background-position:56.25% 70.96774%}.emojione-1F44C{background-position:59.375% 70.96774%}.emojione-1F44D{background-position:62.5% 70.96774%}.emojione-1F44E{background-position:65.625% 70.96774%}.emojione-1F44F{background-position:68.75% 70.96774%}.emojione-1F450{background-position:71.875% 0%}.emojione-1F451{background-position:71.875% 3.22581%}.emojione-1F452{background-position:71.875% 6.45161%}.emojione-1F453{background-position:71.875% 9.67742%}.emojione-1F454{background-position:71.875% 12.90323%}.emojione-1F455{background-position:71.875% 16.12903%}.emojione-1F456{background-position:71.875% 19.35484%}.emojione-1F457{background-position:71.875% 22.58065%}.emojione-1F458{background-position:71.875% 25.80645%}.emojione-1F459{background-position:71.875% 29.03226%}.emojione-1F45A{background-position:71.875% 32.25806%}.emojione-1F45B{background-position:71.875% 35.48387%}.emojione-1F45C{background-position:71.875% 38.70968%}.emojione-1F45D{background-position:71.875% 41.93548%}.emojione-1F45E{background-position:71.875% 45.16129%}.emojione-1F45F{background-position:71.875% 48.3871%}.emojione-1F460{background-position:71.875% 51.6129%}.emojione-1F461{background-position:71.875% 54.83871%}.emojione-1F462{background-position:71.875% 58.06452%}.emojione-1F463{background-position:71.875% 61.29032%}.emojione-1F464{background-position:71.875% 64.51613%}.emojione-1F465{background-position:71.875% 67.74194%}.emojione-1F466{background-position:71.875% 70.96774%}.emojione-1F467{background-position:0% 74.19355%}.emojione-1F468{background-position:3.125% 74.19355%}.emojione-1F469{background-position:6.25% 74.19355%}.emojione-1F46A{background-position:9.375% 74.19355%}.emojione-1F46B{background-position:12.5% 74.19355%}.emojione-1F46C{background-position:15.625% 74.19355%}.emojione-1F46D{background-position:18.75% 74.19355%}.emojione-1F46E{background-position:21.875% 74.19355%}.emojione-1F46F{background-position:25% 74.19355%}.emojione-1F470{background-position:28.125% 74.19355%}.emojione-1F471{background-position:31.25% 74.19355%}.emojione-1F472{background-position:34.375% 74.19355%}.emojione-1F473{background-position:37.5% 74.19355%}.emojione-1F474{background-position:40.625% 74.19355%}.emojione-1F475{background-position:43.75% 74.19355%}.emojione-1F476{background-position:46.875% 74.19355%}.emojione-1F477{background-position:50% 74.19355%}.emojione-1F478{background-position:53.125% 74.19355%}.emojione-1F479{background-position:56.25% 74.19355%}.emojione-1F47A{background-position:59.375% 74.19355%}.emojione-1F47B{background-position:62.5% 74.19355%}.emojione-1F47C{background-position:65.625% 74.19355%}.emojione-1F47D{background-position:68.75% 74.19355%}.emojione-1F47E{background-position:71.875% 74.19355%}.emojione-1F47F{background-position:75% 0%}.emojione-1F480{background-position:75% 3.22581%}.emojione-1F481{background-position:75% 6.45161%}.emojione-1F482{background-position:75% 9.67742%}.emojione-1F483{background-position:75% 12.90323%}.emojione-1F484{background-position:75% 16.12903%}.emojione-1F485{background-position:75% 19.35484%}.emojione-1F486{background-position:75% 22.58065%}.emojione-1F487{background-position:75% 25.80645%}.emojione-1F488{background-position:75% 29.03226%}.emojione-1F489{background-position:75% 32.25806%}.emojione-1F48A{background-position:75% 35.48387%}.emojione-1F48B{background-position:75% 38.70968%}.emojione-1F48C{background-position:75% 41.93548%}.emojione-1F48D{background-position:75% 45.16129%}.emojione-1F48E{background-position:75% 48.3871%}.emojione-1F48F{background-position:75% 51.6129%}.emojione-1F490{background-position:75% 54.83871%}.emojione-1F491{background-position:75% 58.06452%}.emojione-1F492{background-position:75% 61.29032%}.emojione-1F493{background-position:75% 64.51613%}.emojione-1F494{background-position:75% 67.74194%}.emojione-1F495{background-position:75% 70.96774%}.emojione-1F496{background-position:75% 74.19355%}.emojione-1F497{background-position:0% 77.41935%}.emojione-1F498{background-position:3.125% 77.41935%}.emojione-1F499{background-position:6.25% 77.41935%}.emojione-1F49A{background-position:9.375% 77.41935%}.emojione-1F49B{background-position:12.5% 77.41935%}.emojione-1F49C{background-position:15.625% 77.41935%}.emojione-1F49D{background-position:18.75% 77.41935%}.emojione-1F49E{background-position:21.875% 77.41935%}.emojione-1F49F{background-position:25% 77.41935%}.emojione-1F4A0{background-position:28.125% 77.41935%}.emojione-1F4A1{background-position:31.25% 77.41935%}.emojione-1F4A2{background-position:34.375% 77.41935%}.emojione-1F4A3{background-position:37.5% 77.41935%}.emojione-1F4A4{background-position:40.625% 77.41935%}.emojione-1F4A5{background-position:43.75% 77.41935%}.emojione-1F4A6{background-position:46.875% 77.41935%}.emojione-1F4A7{background-position:50% 77.41935%}.emojione-1F4A8{background-position:53.125% 77.41935%}.emojione-1F4A9{background-position:56.25% 77.41935%}.emojione-1F4AA{background-position:59.375% 77.41935%}.emojione-1F4AB{background-position:62.5% 77.41935%}.emojione-1F4AC{background-position:65.625% 77.41935%}.emojione-1F4AD{background-position:68.75% 77.41935%}.emojione-1F4AE{background-position:71.875% 77.41935%}.emojione-1F4AF{background-position:75% 77.41935%}.emojione-1F4B0{background-position:78.125% 0%}.emojione-1F4B1{background-position:78.125% 3.22581%}.emojione-1F4B2{background-position:78.125% 6.45161%}.emojione-1F4B3{background-position:78.125% 9.67742%}.emojione-1F4B4{background-position:78.125% 12.90323%}.emojione-1F4B5{background-position:78.125% 16.12903%}.emojione-1F4B6{background-position:78.125% 19.35484%}.emojione-1F4B7{background-position:78.125% 22.58065%}.emojione-1F4B8{background-position:78.125% 25.80645%}.emojione-1F4B9{background-position:78.125% 29.03226%}.emojione-1F4BA{background-position:78.125% 32.25806%}.emojione-1F4BB{background-position:78.125% 35.48387%}.emojione-1F4BC{background-position:78.125% 38.70968%}.emojione-1F4BD{background-position:78.125% 41.93548%}.emojione-1F4BE{background-position:78.125% 45.16129%}.emojione-1F4BF{background-position:78.125% 48.3871%}.emojione-1F4C0{background-position:78.125% 51.6129%}.emojione-1F4C1{background-position:78.125% 54.83871%}.emojione-1F4C2{background-position:78.125% 58.06452%}.emojione-1F4C3{background-position:78.125% 61.29032%}.emojione-1F4C4{background-position:78.125% 64.51613%}.emojione-1F4C5{background-position:78.125% 67.74194%}.emojione-1F4C6{background-position:78.125% 70.96774%}.emojione-1F4C7{background-position:78.125% 74.19355%}.emojione-1F4C8{background-position:78.125% 77.41935%}.emojione-1F4C9{background-position:0% 80.64516%}.emojione-1F4CA{background-position:3.125% 80.64516%}.emojione-1F4CB{background-position:6.25% 80.64516%}.emojione-1F4CC{background-position:9.375% 80.64516%}.emojione-1F4CD{background-position:12.5% 80.64516%}.emojione-1F4CE{background-position:15.625% 80.64516%}.emojione-1F4CF{background-position:18.75% 80.64516%}.emojione-1F4D0{background-position:21.875% 80.64516%}.emojione-1F4D1{background-position:25% 80.64516%}.emojione-1F4D2{background-position:28.125% 80.64516%}.emojione-1F4D3{background-position:31.25% 80.64516%}.emojione-1F4D4{background-position:34.375% 80.64516%}.emojione-1F4D5{background-position:37.5% 80.64516%}.emojione-1F4D6{background-position:40.625% 80.64516%}.emojione-1F4D7{background-position:43.75% 80.64516%}.emojione-1F4D8{background-position:46.875% 80.64516%}.emojione-1F4D9{background-position:50% 80.64516%}.emojione-1F4DA{background-position:53.125% 80.64516%}.emojione-1F4DB{background-position:56.25% 80.64516%}.emojione-1F4DC{background-position:59.375% 80.64516%}.emojione-1F4DD{background-position:62.5% 80.64516%}.emojione-1F4DE{background-position:65.625% 80.64516%}.emojione-1F4DF{background-position:68.75% 80.64516%}.emojione-1F4E0{background-position:71.875% 80.64516%}.emojione-1F4E1{background-position:75% 80.64516%}.emojione-1F4E2{background-position:78.125% 80.64516%}.emojione-1F4E3{background-position:81.25% 0%}.emojione-1F4E4{background-position:81.25% 3.22581%}.emojione-1F4E5{background-position:81.25% 6.45161%}.emojione-1F4E6{background-position:81.25% 9.67742%}.emojione-1F4E7{background-position:81.25% 12.90323%}.emojione-1F4E8{background-position:81.25% 16.12903%}.emojione-1F4E9{background-position:81.25% 19.35484%}.emojione-1F4EA{background-position:81.25% 22.58065%}.emojione-1F4EB{background-position:81.25% 25.80645%}.emojione-1F4EC{background-position:81.25% 29.03226%}.emojione-1F4ED{background-position:81.25% 32.25806%}.emojione-1F4EE{background-position:81.25% 35.48387%}.emojione-1F4EF{background-position:81.25% 38.70968%}.emojione-1F4F0{background-position:81.25% 41.93548%}.emojione-1F4F1{background-position:81.25% 45.16129%}.emojione-1F4F2{background-position:81.25% 48.3871%}.emojione-1F4F3{background-position:81.25% 51.6129%}.emojione-1F4F4{background-position:81.25% 54.83871%}.emojione-1F4F5{background-position:81.25% 58.06452%}.emojione-1F4F6{background-position:81.25% 61.29032%}.emojione-1F4F7{background-position:81.25% 64.51613%}.emojione-1F4F9{background-position:81.25% 67.74194%}.emojione-1F4FA{background-position:81.25% 70.96774%}.emojione-1F4FB{background-position:81.25% 74.19355%}.emojione-1F4FC{background-position:81.25% 77.41935%}.emojione-1F500{background-position:81.25% 80.64516%}.emojione-1F501{background-position:0% 83.87097%}.emojione-1F502{background-position:3.125% 83.87097%}.emojione-1F503{background-position:6.25% 83.87097%}.emojione-1F504{background-position:9.375% 83.87097%}.emojione-1F505{background-position:12.5% 83.87097%}.emojione-1F506{background-position:15.625% 83.87097%}.emojione-1F507{background-position:18.75% 83.87097%}.emojione-1F508{background-position:21.875% 83.87097%}.emojione-1F509{background-position:25% 83.87097%}.emojione-1F50A{background-position:28.125% 83.87097%}.emojione-1F50B{background-position:31.25% 83.87097%}.emojione-1F50C{background-position:34.375% 83.87097%}.emojione-1F50D{background-position:37.5% 83.87097%}.emojione-1F50E{background-position:40.625% 83.87097%}.emojione-1F50F{background-position:43.75% 83.87097%}.emojione-1F510{background-position:46.875% 83.87097%}.emojione-1F511{background-position:50% 83.87097%}.emojione-1F512{background-position:53.125% 83.87097%}.emojione-1F513{background-position:56.25% 83.87097%}.emojione-1F514{background-position:59.375% 83.87097%}.emojione-1F515{background-position:62.5% 83.87097%}.emojione-1F516{background-position:65.625% 83.87097%}.emojione-1F517{background-position:68.75% 83.87097%}.emojione-1F518{background-position:71.875% 83.87097%}.emojione-1F519{background-position:75% 83.87097%}.emojione-1F51A{background-position:78.125% 83.87097%}.emojione-1F51B{background-position:81.25% 83.87097%}.emojione-1F51C{background-position:84.375% 0%}.emojione-1F51D{background-position:84.375% 3.22581%}.emojione-1F51E{background-position:84.375% 6.45161%}.emojione-1F51F{background-position:84.375% 9.67742%}.emojione-1F520{background-position:84.375% 12.90323%}.emojione-1F521{background-position:84.375% 16.12903%}.emojione-1F522{background-position:84.375% 19.35484%}.emojione-1F523{background-position:84.375% 22.58065%}.emojione-1F524{background-position:84.375% 25.80645%}.emojione-1F525{background-position:84.375% 29.03226%}.emojione-1F526{background-position:84.375% 32.25806%}.emojione-1F527{background-position:84.375% 35.48387%}.emojione-1F528{background-position:84.375% 38.70968%}.emojione-1F529{background-position:84.375% 41.93548%}.emojione-1F52A{background-position:84.375% 45.16129%}.emojione-1F52B{background-position:84.375% 48.3871%}.emojione-1F52C{background-position:84.375% 51.6129%}.emojione-1F52D{background-position:84.375% 54.83871%}.emojione-1F52E{background-position:84.375% 58.06452%}.emojione-1F52F{background-position:84.375% 61.29032%}.emojione-1F530{background-position:84.375% 64.51613%}.emojione-1F531{background-position:84.375% 67.74194%}.emojione-1F532{background-position:84.375% 70.96774%}.emojione-1F533{background-position:84.375% 74.19355%}.emojione-1F534{background-position:84.375% 77.41935%}.emojione-1F535{background-position:84.375% 80.64516%}.emojione-1F536{background-position:84.375% 83.87097%}.emojione-1F537{background-position:0% 87.09677%}.emojione-1F538{background-position:3.125% 87.09677%}.emojione-1F539{background-position:6.25% 87.09677%}.emojione-1F53A{background-position:9.375% 87.09677%}.emojione-1F53B{background-position:12.5% 87.09677%}.emojione-1F53C{background-position:15.625% 87.09677%}.emojione-1F53D{background-position:18.75% 87.09677%}.emojione-1F550{background-position:21.875% 87.09677%}.emojione-1F551{background-position:25% 87.09677%}.emojione-1F552{background-position:28.125% 87.09677%}.emojione-1F553{background-position:31.25% 87.09677%}.emojione-1F554{background-position:34.375% 87.09677%}.emojione-1F555{background-position:37.5% 87.09677%}.emojione-1F556{background-position:40.625% 87.09677%}.emojione-1F557{background-position:43.75% 87.09677%}.emojione-1F558{background-position:46.875% 87.09677%}.emojione-1F559{background-position:50% 87.09677%}.emojione-1F55A{background-position:53.125% 87.09677%}.emojione-1F55B{background-position:56.25% 87.09677%}.emojione-1F55C{background-position:59.375% 87.09677%}.emojione-1F55D{background-position:62.5% 87.09677%}.emojione-1F55E{background-position:65.625% 87.09677%}.emojione-1F55F{background-position:68.75% 87.09677%}.emojione-1F560{background-position:71.875% 87.09677%}.emojione-1F561{background-position:75% 87.09677%}.emojione-1F562{background-position:78.125% 87.09677%}.emojione-1F563{background-position:81.25% 87.09677%}.emojione-1F564{background-position:84.375% 87.09677%}.emojione-1F565{background-position:87.5% 0%}.emojione-1F566{background-position:87.5% 3.22581%}.emojione-1F567{background-position:87.5% 6.45161%}.emojione-1F5FB{background-position:87.5% 9.67742%}.emojione-1F5FC{background-position:87.5% 12.90323%}.emojione-1F5FD{background-position:87.5% 16.12903%}.emojione-1F5FE{background-position:87.5% 19.35484%}.emojione-1F5FF{background-position:87.5% 22.58065%}.emojione-1F600{background-position:87.5% 25.80645%}.emojione-1F601{background-position:87.5% 29.03226%}.emojione-1F602{background-position:87.5% 32.25806%}.emojione-1F603{background-position:87.5% 35.48387%}.emojione-1F604{background-position:87.5% 38.70968%}.emojione-1F605{background-position:87.5% 41.93548%}.emojione-1F606{background-position:87.5% 45.16129%}.emojione-1F607{background-position:87.5% 48.3871%}.emojione-1F608{background-position:87.5% 51.6129%}.emojione-1F609{background-position:87.5% 54.83871%}.emojione-1F60A{background-position:87.5% 58.06452%}.emojione-1F60B{background-position:87.5% 61.29032%}.emojione-1F60C{background-position:87.5% 64.51613%}.emojione-1F60D{background-position:87.5% 67.74194%}.emojione-1F60E{background-position:87.5% 70.96774%}.emojione-1F60F{background-position:87.5% 74.19355%}.emojione-1F610{background-position:87.5% 77.41935%}.emojione-1F611{background-position:87.5% 80.64516%}.emojione-1F612{background-position:87.5% 83.87097%}.emojione-1F613{background-position:87.5% 87.09677%}.emojione-1F614{background-position:0% 90.32258%}.emojione-1F615{background-position:3.125% 90.32258%}.emojione-1F616{background-position:6.25% 90.32258%}.emojione-1F617{background-position:9.375% 90.32258%}.emojione-1F618{background-position:12.5% 90.32258%}.emojione-1F619{background-position:15.625% 90.32258%}.emojione-1F61A{background-position:18.75% 90.32258%}.emojione-1F61B{background-position:21.875% 90.32258%}.emojione-1F61C{background-position:25% 90.32258%}.emojione-1F61D{background-position:28.125% 90.32258%}.emojione-1F61E{background-position:31.25% 90.32258%}.emojione-1F61F{background-position:34.375% 90.32258%}.emojione-1F620{background-position:37.5% 90.32258%}.emojione-1F621{background-position:40.625% 90.32258%}.emojione-1F622{background-position:43.75% 90.32258%}.emojione-1F623{background-position:46.875% 90.32258%}.emojione-1F624{background-position:50% 90.32258%}.emojione-1F625{background-position:53.125% 90.32258%}.emojione-1F626{background-position:56.25% 90.32258%}.emojione-1F627{background-position:59.375% 90.32258%}.emojione-1F628{background-position:62.5% 90.32258%}.emojione-1F629{background-position:65.625% 90.32258%}.emojione-1F62A{background-position:68.75% 90.32258%}.emojione-1F62B{background-position:71.875% 90.32258%}.emojione-1F62C{background-position:75% 90.32258%}.emojione-1F62D{background-position:78.125% 90.32258%}.emojione-1F62E{background-position:81.25% 90.32258%}.emojione-1F62F{background-position:84.375% 90.32258%}.emojione-1F630{background-position:87.5% 90.32258%}.emojione-1F631{background-position:90.625% 0%}.emojione-1F632{background-position:90.625% 3.22581%}.emojione-1F633{background-position:90.625% 6.45161%}.emojione-1F634{background-position:90.625% 9.67742%}.emojione-1F635{background-position:90.625% 12.90323%}.emojione-1F636{background-position:90.625% 16.12903%}.emojione-1F637{background-position:90.625% 19.35484%}.emojione-1F638{background-position:90.625% 22.58065%}.emojione-1F639{background-position:90.625% 25.80645%}.emojione-1F63A{background-position:90.625% 29.03226%}.emojione-1F63B{background-position:90.625% 32.25806%}.emojione-1F63C{background-position:90.625% 35.48387%}.emojione-1F63D{background-position:90.625% 38.70968%}.emojione-1F63E{background-position:90.625% 41.93548%}.emojione-1F63F{background-position:90.625% 45.16129%}.emojione-1F640{background-position:90.625% 48.3871%}.emojione-1F645{background-position:90.625% 51.6129%}.emojione-1F646{background-position:90.625% 54.83871%}.emojione-1F647{background-position:90.625% 58.06452%}.emojione-1F648{background-position:90.625% 61.29032%}.emojione-1F649{background-position:90.625% 64.51613%}.emojione-1F64A{background-position:90.625% 67.74194%}.emojione-1F64B{background-position:90.625% 70.96774%}.emojione-1F64C{background-position:90.625% 74.19355%}.emojione-1F64D{background-position:90.625% 77.41935%}.emojione-1F64E{background-position:90.625% 80.64516%}.emojione-1F64F{background-position:90.625% 83.87097%}.emojione-1F680{background-position:90.625% 87.09677%}.emojione-1F681{background-position:90.625% 90.32258%}.emojione-1F682{background-position:0% 93.54839%}.emojione-1F683{background-position:3.125% 93.54839%}.emojione-1F684{background-position:6.25% 93.54839%}.emojione-1F685{background-position:9.375% 93.54839%}.emojione-1F686{background-position:12.5% 93.54839%}.emojione-1F687{background-position:15.625% 93.54839%}.emojione-1F688{background-position:18.75% 93.54839%}.emojione-1F689{background-position:21.875% 93.54839%}.emojione-1F68A{background-position:25% 93.54839%}.emojione-1F68B{background-position:28.125% 93.54839%}.emojione-1F68C{background-position:31.25% 93.54839%}.emojione-1F68D{background-position:34.375% 93.54839%}.emojione-1F68E{background-position:37.5% 93.54839%}.emojione-1F68F{background-position:40.625% 93.54839%}.emojione-1F690{background-position:43.75% 93.54839%}.emojione-1F691{background-position:46.875% 93.54839%}.emojione-1F692{background-position:50% 93.54839%}.emojione-1F693{background-position:53.125% 93.54839%}.emojione-1F694{background-position:56.25% 93.54839%}.emojione-1F695{background-position:59.375% 93.54839%}.emojione-1F696{background-position:62.5% 93.54839%}.emojione-1F697{background-position:65.625% 93.54839%}.emojione-1F698{background-position:68.75% 93.54839%}.emojione-1F699{background-position:71.875% 93.54839%}.emojione-1F69A{background-position:75% 93.54839%}.emojione-1F69B{background-position:78.125% 93.54839%}.emojione-1F69C{background-position:81.25% 93.54839%}.emojione-1F69D{background-position:84.375% 93.54839%}.emojione-1F69E{background-position:87.5% 93.54839%}.emojione-1F69F{background-position:90.625% 93.54839%}.emojione-1F6A0{background-position:93.75% 0%}.emojione-1F6A1{background-position:93.75% 3.22581%}.emojione-1F6A2{background-position:93.75% 6.45161%}.emojione-1F6A3{background-position:93.75% 9.67742%}.emojione-1F6A4{background-position:93.75% 12.90323%}.emojione-1F6A5{background-position:93.75% 16.12903%}.emojione-1F6A6{background-position:93.75% 19.35484%}.emojione-1F6A7{background-position:93.75% 22.58065%}.emojione-1F6A8{background-position:93.75% 25.80645%}.emojione-1F6A9{background-position:93.75% 29.03226%}.emojione-1F6AA{background-position:93.75% 32.25806%}.emojione-1F6AB{background-position:93.75% 35.48387%}.emojione-1F6AC{background-position:93.75% 38.70968%}.emojione-1F6AD{background-position:93.75% 41.93548%}.emojione-1F6AE{background-position:93.75% 45.16129%}.emojione-1F6AF{background-position:93.75% 48.3871%}.emojione-1F6B0{background-position:93.75% 51.6129%}.emojione-1F6B1{background-position:93.75% 54.83871%}.emojione-1F6B2{background-position:93.75% 58.06452%}.emojione-1F6B3{background-position:93.75% 61.29032%}.emojione-1F6B4{background-position:93.75% 64.51613%}.emojione-1F6B5{background-position:93.75% 67.74194%}.emojione-1F6B6{background-position:93.75% 70.96774%}.emojione-1F6B7{background-position:93.75% 74.19355%}.emojione-1F6B8{background-position:93.75% 77.41935%}.emojione-1F6B9{background-position:93.75% 80.64516%}.emojione-1F6BA{background-position:93.75% 83.87097%}.emojione-1F6BB{background-position:93.75% 87.09677%}.emojione-1F6BC{background-position:93.75% 90.32258%}.emojione-1F6BD{background-position:93.75% 93.54839%}.emojione-1F6BE{background-position:0% 96.77419%}.emojione-1F6BF{background-position:3.125% 96.77419%}.emojione-1F6C0{background-position:6.25% 96.77419%}.emojione-1F6C1{background-position:9.375% 96.77419%}.emojione-1F6C2{background-position:12.5% 96.77419%}.emojione-1F6C3{background-position:15.625% 96.77419%}.emojione-1F6C4{background-position:18.75% 96.77419%}.emojione-1F6C5{background-position:21.875% 96.77419%}.emojione-203C{background-position:25% 96.77419%}.emojione-2049{background-position:28.125% 96.77419%}.emojione-2122{background-position:31.25% 96.77419%}.emojione-2139{background-position:34.375% 96.77419%}.emojione-2194{background-position:37.5% 96.77419%}.emojione-2195{background-position:40.625% 96.77419%}.emojione-2196{background-position:43.75% 96.77419%}.emojione-2197{background-position:46.875% 96.77419%}.emojione-2198{background-position:50% 96.77419%}.emojione-2199{background-position:53.125% 96.77419%}.emojione-21A9{background-position:56.25% 96.77419%}.emojione-21AA{background-position:59.375% 96.77419%}.emojione-231A{background-position:62.5% 96.77419%}.emojione-231B{background-position:65.625% 96.77419%}.emojione-23E9{background-position:68.75% 96.77419%}.emojione-23EA{background-position:71.875% 96.77419%}.emojione-23EB{background-position:75% 96.77419%}.emojione-23EC{background-position:78.125% 96.77419%}.emojione-23F0{background-position:81.25% 96.77419%}.emojione-23F3{background-position:84.375% 96.77419%}.emojione-24C2{background-position:87.5% 96.77419%}.emojione-25AA{background-position:90.625% 96.77419%}.emojione-25AB{background-position:93.75% 96.77419%}.emojione-25B6{background-position:96.875% 0%}.emojione-25C0{background-position:96.875% 3.22581%}.emojione-25FB{background-position:96.875% 6.45161%}.emojione-25FC{background-position:96.875% 9.67742%}.emojione-25FD{background-position:96.875% 12.90323%}.emojione-25FE{background-position:96.875% 16.12903%}.emojione-2600{background-position:96.875% 19.35484%}.emojione-2601{background-position:96.875% 22.58065%}.emojione-260E{background-position:96.875% 25.80645%}.emojione-2611{background-position:96.875% 29.03226%}.emojione-2614{background-position:96.875% 32.25806%}.emojione-2615{background-position:96.875% 35.48387%}.emojione-261D{background-position:96.875% 38.70968%}.emojione-263A{background-position:96.875% 41.93548%}.emojione-2648{background-position:96.875% 45.16129%}.emojione-2649{background-position:96.875% 48.3871%}.emojione-264A{background-position:96.875% 51.6129%}.emojione-264B{background-position:96.875% 54.83871%}.emojione-264C{background-position:96.875% 58.06452%}.emojione-264D{background-position:96.875% 61.29032%}.emojione-264E{background-position:96.875% 64.51613%}.emojione-264F{background-position:96.875% 67.74194%}.emojione-2650{background-position:96.875% 70.96774%}.emojione-2651{background-position:96.875% 74.19355%}.emojione-2652{background-position:96.875% 77.41935%}.emojione-2653{background-position:96.875% 80.64516%}.emojione-2660{background-position:96.875% 83.87097%}.emojione-2663{background-position:96.875% 87.09677%}.emojione-2665{background-position:96.875% 90.32258%}.emojione-2666{background-position:96.875% 93.54839%}.emojione-2668{background-position:96.875% 96.77419%}.emojione-267B{background-position:0% 100%}.emojione-267F{background-position:3.125% 100%}.emojione-2693{background-position:6.25% 100%}.emojione-26A0{background-position:9.375% 100%}.emojione-26A1{background-position:12.5% 100%}.emojione-26AA{background-position:15.625% 100%}.emojione-26AB{background-position:18.75% 100%}.emojione-26BD{background-position:21.875% 100%}.emojione-26BE{background-position:25% 100%}.emojione-26C4{background-position:28.125% 100%}.emojione-26C5{background-position:31.25% 100%}.emojione-26CE{background-position:34.375% 100%}.emojione-26D4{background-position:37.5% 100%}.emojione-26EA{background-position:40.625% 100%}.emojione-26F2{background-position:43.75% 100%}.emojione-26F3{background-position:46.875% 100%}.emojione-26F5{background-position:50% 100%}.emojione-26FA{background-position:53.125% 100%}.emojione-26FD{background-position:56.25% 100%}.emojione-2702{background-position:59.375% 100%}.emojione-2705{background-position:62.5% 100%}.emojione-2708{background-position:65.625% 100%}.emojione-2709{background-position:68.75% 100%}.emojione-270A{background-position:71.875% 100%}.emojione-270B{background-position:75% 100%}.emojione-270C{background-position:78.125% 100%}.emojione-270F{background-position:81.25% 100%}.emojione-2712{background-position:84.375% 100%}.emojione-2714{background-position:87.5% 100%}.emojione-2716{background-position:90.625% 100%}.emojione-2728{background-position:93.75% 100%}.emojione-2733{background-position:96.875% 100%}.emojione-2734{background-position:100% 0%}.emojione-2744{background-position:100% 3.22581%}.emojione-2747{background-position:100% 6.45161%}.emojione-274C{background-position:100% 9.67742%}.emojione-274E{background-position:100% 12.90323%}.emojione-2753{background-position:100% 16.12903%}.emojione-2754{background-position:100% 19.35484%}.emojione-2755{background-position:100% 22.58065%}.emojione-2757{background-position:100% 25.80645%}.emojione-2764{background-position:100% 29.03226%}.emojione-2795{background-position:100% 32.25806%}.emojione-2796{background-position:100% 35.48387%}.emojione-2797{background-position:100% 38.70968%}.emojione-27A1{background-position:100% 41.93548%}.emojione-27B0{background-position:100% 45.16129%}.emojione-27BF{background-position:100% 48.3871%}.emojione-2934{background-position:100% 51.6129%}.emojione-2935{background-position:100% 54.83871%}.emojione-2B05{background-position:100% 58.06452%}.emojione-2B06{background-position:100% 61.29032%}.emojione-2B07{background-position:100% 64.51613%}.emojione-2B1B{background-position:100% 67.74194%}.emojione-2B1C{background-position:100% 70.96774%}.emojione-2B50{background-position:100% 74.19355%}.emojione-2B55{background-position:100% 77.41935%}.emojione-3030{background-position:100% 80.64516%}.emojione-303D{background-position:100% 83.87097%}.emojione-3297{background-position:100% 87.09677%}.emojione-3299{background-position:100% 90.32258%}
/*# sourceMappingURL=emojione.sprites.css.map */
| 18,888.333333
| 56,615
| 0.794229
|
ebd4c2c04e642f72bdf07bf73312e839e6b1b8df
| 665
|
css
|
CSS
|
tvmv-react-app/src/components/sections/GenreButton.css
|
project-tvmv/project-tvmv
|
5ab6df9a4852c9bbfe72f0ad31be835944d13a8a
|
[
"MIT"
] | 1
|
2019-11-08T05:09:43.000Z
|
2019-11-08T05:09:43.000Z
|
tvmv-react-app/src/components/sections/GenreButton.css
|
project-tvmv/project-tvmv
|
5ab6df9a4852c9bbfe72f0ad31be835944d13a8a
|
[
"MIT"
] | null | null | null |
tvmv-react-app/src/components/sections/GenreButton.css
|
project-tvmv/project-tvmv
|
5ab6df9a4852c9bbfe72f0ad31be835944d13a8a
|
[
"MIT"
] | null | null | null |
.genre-buttons-container {
max-width: 176vh;
margin: 2% auto -1%;
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.genre-links:hover > .genre-buttons {
color: black;
font-weight: 500;
}
.genre-links {
background: #232323;
border-radius: 5px;
width: 8%;
padding: 1vh 0 1vh 0;
margin-right: 1%;
margin-bottom: 1%;
cursor: pointer;
transition: all 0.2s ease-in-out;
text-align: center;
}
.genre-buttons {
background: none;
border: none;
color: white;
font-size: 1.5vh;
letter-spacing: 0.2vh;
cursor: pointer;
outline: none;
}
.genre-links:hover {
background: rgb(68, 255, 174);
transform: scale(1.1);
}
| 16.625
| 37
| 0.646617
|
80107cd4149cff7a32f4e48c3af487effb597d86
| 1,105
|
dart
|
Dart
|
test_reflectable/test/meta_reflectors_domain_definer.dart
|
VoLaNg/reflectable.dart
|
1dc5cfd1a4295dbe35aa33329caac00ceba957e8
|
[
"BSD-3-Clause"
] | 159
|
2015-02-18T08:22:30.000Z
|
2020-06-21T05:22:02.000Z
|
test_reflectable/test/meta_reflectors_domain_definer.dart
|
VoLaNg/reflectable.dart
|
1dc5cfd1a4295dbe35aa33329caac00ceba957e8
|
[
"BSD-3-Clause"
] | 173
|
2015-02-17T23:16:16.000Z
|
2020-06-16T14:27:11.000Z
|
test_reflectable/test/meta_reflectors_domain_definer.dart
|
VoLaNg/reflectable.dart
|
1dc5cfd1a4295dbe35aa33329caac00ceba957e8
|
[
"BSD-3-Clause"
] | 41
|
2015-07-28T18:14:27.000Z
|
2020-04-16T08:53:32.000Z
|
// Copyright (c) 2015, the Dart Team. All rights reserved. Use of this
// source code is governed by a BSD-style license that can be found in
// the LICENSE file.
/// File used to test reflectable code generation.
/// Part of the entry point 'meta_reflectors_test.dart'.
///
/// Independence: This library defines reflectors only, and it does not depend
/// on the usage of reflection. It does depend on the domain classes, because
/// it uses `A` as an upper bound in a superclass quantifier.
library test_reflectable.test.meta_reflectors_domain_definer;
import 'package:reflectable/reflectable.dart';
import 'meta_reflectors_domain.dart';
class ReflectorUpwardsClosedToA extends Reflectable {
const ReflectorUpwardsClosedToA()
: super(const SuperclassQuantifyCapability(A), invokingCapability,
declarationsCapability, typeRelationsCapability);
}
class ReflectorUpwardsClosedUntilA extends Reflectable {
const ReflectorUpwardsClosedUntilA()
: super(const SuperclassQuantifyCapability(A, excludeUpperBound: true),
invokingCapability, declarationsCapability);
}
| 40.925926
| 78
| 0.776471
|
6dd94ced6a523ffe0cd16c183addf4667fe95086
| 5,609
|
ts
|
TypeScript
|
src/collection.ts
|
ronaldborla/model
|
63bf49c7fc5cd9927e631395760c9b012fe73def
|
[
"MIT"
] | null | null | null |
src/collection.ts
|
ronaldborla/model
|
63bf49c7fc5cd9927e631395760c9b012fe73def
|
[
"MIT"
] | null | null | null |
src/collection.ts
|
ronaldborla/model
|
63bf49c7fc5cd9927e631395760c9b012fe73def
|
[
"MIT"
] | null | null | null |
import utils from './utils';
/**
* Collection
*/
export default class Collection<M> {
[index: number]: M;
/**
* The Model
*/
public static Model: any;
/**
* Is Collection
*/
public static isCollection = true;
/**
* Private storage
*/
public __: any = {
parent: null
};
/**
* Length
* Arrays have a "length" writable property
*/
public length: number;
constructor(items?: Array<any>) {
if (!utils.isUndefined(items)) {
this.load(items);
}
}
/**
* Placeholder methods
*/
cast(item: any): M {
return item;
}
concat(...items: any[]): M[] {
return [];
}
copyWithin(target: number, start?: number, end?: number): this {
return this;
}
every(callbackfn: (value: M, index: number, array: M[]) => boolean, thisArg?: any): boolean {
return false;
}
fill(value: any, start?: number, end?: number): this {
return this;
}
filter(callbackfn: (value: M, index: number, array: M[]) => any, thisArg?: any): M[] {
return [];
}
find(callbackfn: (value: any, index: number, array: any[]) => void, thisArg?: any): any {
return this;
}
findIndex(callbackfn: (value: any, index: number, array: any[]) => void, thisArg?: any): number {
return 0;
}
forEach(callbackfn: (value: M, index: number, array: M[]) => void, thisArg?: any): void {
}
indexOf(searchElement: any, fromIndex?: number): number {
return 0;
}
join(separator?: string): string {
return '';
}
lastIndexOf(searchElement: any, fromIndex?: number): number {
return 0;
}
load(items: Array<any>): Collection<M> {
return this;
}
map<U>(callbackfn: (value: M, index: number, array: M[]) => U, thisArg?: any): U[] {
return [];
}
pop(): M | undefined {
return undefined;
}
push(...items: any[]): number {
return 0;
}
reduce(callbackfn: (previousValue: M, currentValue: M, currentIndex: number, array: M[]) => M, initialValue?: M): M {
return this[0];
}
reduceRight(callbackfn: (previousValue: M, currentValue: M, currentIndex: number, array: M[]) => M, initialValue?: M): M {
return this[0];
}
reverse(): M[] {
return [];
}
shift(): M | undefined {
return undefined;
}
slice(start?: number, end?: number): M[] {
return [];
}
some(callbackfn: (value: M, index: number, array: M[]) => boolean, thisArg?: any): boolean {
return false;
}
splice(start: number, deleteCount?: number, ...items: any[]): M[] {
return [];
}
sort(compareFn?: (a: M, b: M) => number) : this {
return this;
}
toObject(include?: any, exclude?: any): any {
return {};
}
toJSON(exclude?: any, include?: any, replacer?: any, space?: number): string {
return '';
}
toLocaleString(): string {
return '';
}
toString(): string {
return '';
}
unshift(...items: any[]): number {
return 0;
}
}
/**
* For some reason, "extends" in typescript doesn't correctly extend an Array
* Therefore, this needs to be done in a different manner
* The "extends Array" statement above is for Typescript consistency
*/
/**
* Extend Array
*/
Collection.prototype = Object.create(Array.prototype);
Collection.prototype.constructor = Collection;
/**
* Collection functions must be declared outside the Class definition
*/
(Collection.prototype as any).cast = cast;
(Collection.prototype as any).concat = concat;
(Collection.prototype as any).load = load;
(Collection.prototype as any).push = push;
(Collection.prototype as any).splice = splice;
(Collection.prototype as any).toJSON = toJSON;
(Collection.prototype as any).toObject = toObject;
(Collection.prototype as any).toString = toString;
(Collection.prototype as any).unshift = unshift;
////////
/**
* Cast an item
*/
function cast(item: any): any {
const Model = (this.constructor as typeof Collection).Model;
if (!(item instanceof Model)) {
item = new Model(item);
}
item.__.parent = this;
return item;
}
/**
* Override concat
*/
function concat<M>(): Collection<M> {
const length = arguments.length;
for (let i = 0; i < length; i++) {
this.push.apply(this, arguments[i]);
}
return this;
}
/**
* Load items
*/
function load<M>(items: Array<any>): Collection<M> {
this.push.apply(this, items || []);
return this;
}
/**
* Override push
*/
function push(): number {
return Array.prototype.push.apply(this, Array.prototype.map.apply(arguments, [(item: any) => {
return this.cast(item);
}]));
}
/**
* Override splice
*/
function splice<M>(): Collection<M> {
const length = arguments.length;
if (length > 2) {
for (let i = 2; i < length; i++) {
arguments[i] = this.cast(arguments[i]);
}
}
return Array.prototype.splice.apply(this, arguments);
}
/**
* To JSON
*/
function toJSON(exclude?: any, include?: any, replacer?: any, space?: number): string {
return JSON.stringify(this.toObject(exclude, include), replacer, space);
}
/**
* Convert to object
*/
function toObject(include?: any, exclude?: any): any {
if (include && !include.__flattened) {
include = utils.flatten(include);
}
if (exclude && !exclude.__flattened) {
exclude = utils.flatten(exclude);
}
return this.map((item: any) => {
return item.toObject(include, exclude);
});
}
/**
* To string
*/
function toString(): string {
return this.toJSON();
}
/**
* Override unshift
*/
function unshift(): number {
const length = arguments.length;
for (let i = 0; i < length; i++) {
arguments[i] = this.cast(arguments[i]);
}
return Array.prototype.unshift.apply(this, arguments);
}
| 22.616935
| 124
| 0.616153
|
23c6bc16e536529aae3a69e93fbd7f6fd712d5fd
| 228
|
js
|
JavaScript
|
compiled/main.js
|
sirarthurnell/Snake
|
83d3cf9089bd075acdc0536d47fd14df49441844
|
[
"MIT"
] | 1
|
2017-01-05T10:05:19.000Z
|
2017-01-05T10:05:19.000Z
|
compiled/main.js
|
sirarthurnell/Snake
|
83d3cf9089bd075acdc0536d47fd14df49441844
|
[
"MIT"
] | null | null | null |
compiled/main.js
|
sirarthurnell/Snake
|
83d3cf9089bd075acdc0536d47fd14df49441844
|
[
"MIT"
] | null | null | null |
"use strict";
var $ = require('jquery');
$(function () {
var $body = $('body'), $div = $('<div/>'), state = 'WORKING!';
$div.html("Hello, I'm still " + state);
$body.append($div);
});
//# sourceMappingURL=main.js.map
| 28.5
| 66
| 0.54386
|
74772338030feee6f8922aa00841a006f9746794
| 943
|
css
|
CSS
|
ServerExamples/mnist-draw-server/webclient/styles.css
|
mgh3326/tensorflow-ue4-examples
|
bf40e3b28f7240ddaac7b05cd9be22fa27eb1638
|
[
"MIT"
] | null | null | null |
ServerExamples/mnist-draw-server/webclient/styles.css
|
mgh3326/tensorflow-ue4-examples
|
bf40e3b28f7240ddaac7b05cd9be22fa27eb1638
|
[
"MIT"
] | 1
|
2020-01-11T03:57:03.000Z
|
2020-01-11T03:57:03.000Z
|
ServerExamples/mnist-draw-server/webclient/styles.css
|
mgh3326/tensorflow_ue4_practice
|
600106771b83e02c8314fcf0ec5e89cc876d016b
|
[
"MIT"
] | 1
|
2019-03-05T07:53:09.000Z
|
2019-03-05T07:53:09.000Z
|
#d1 {
position: absolute;
top: 0px;
left: 0px;
right: 0px;
width: 99%;
height: 99%;
border: 1px solid #100;
}
#canvas {
display: flex;
width: 100%;
height: 100%;
border: 1px solid #000;
}
#d2 {
overflow: auto;
height: 100%;
}
#clr {
position: absolute;
top: 400px;
right: 50px;
width: 100px;
height: 100px;
background-color: navy;
}
#clr::before, #clr::after {
content: "";
position: absolute;
-webkit-transform-origin: 50% 50%;
-moz-transform-origin: 50% 50%;
-ms-transform-origin: 50% 50%;
transform-origin: 50% 50%;
background-color: white;
top: 45%;
bottom: 45%;
left: 20%;
right: 20%;
}
#clr:before {
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
transform: rotate(45deg);
}
#clr:after {
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
transform: rotate(-45deg);
}
| 18.86
| 38
| 0.582185
|
6963730230915e84d786f3140f2c2e61eaa96473
| 1,006
|
rb
|
Ruby
|
spec/support/screenshot_on_failure.rb
|
rjpaskin/autoterm
|
c8e1ffc64e9f523a65788a986eaaa9bb4d2a2998
|
[
"MIT"
] | null | null | null |
spec/support/screenshot_on_failure.rb
|
rjpaskin/autoterm
|
c8e1ffc64e9f523a65788a986eaaa9bb4d2a2998
|
[
"MIT"
] | null | null | null |
spec/support/screenshot_on_failure.rb
|
rjpaskin/autoterm
|
c8e1ffc64e9f523a65788a986eaaa9bb4d2a2998
|
[
"MIT"
] | null | null | null |
require "fileutils"
module ScreenshotOnFailure
SCREENSHOTS_PATH = File.expand_path("../../../tmp/screenshots", __FILE__).freeze
def screenshot_if_failed(example)
if failed?(example)
filename = save_screenshot
$stderr.puts "Screenshot saved to #{filename}"
end
end
# From capybara-screenshot
def failed?(example)
return true if example.exception
return false unless defined?(::RSpec::Expectations::FailureAggregator)
failure_notifier = ::RSpec::Support.failure_notifier
return false unless failure_notifier.is_a?(::RSpec::Expectations::FailureAggregator)
failure_notifier.failures.any? || failure_notifier.other_errors.any?
end
def save_screenshot
FileUtils.mkdir_p SCREENSHOTS_PATH
timestamp = Time.now.strftime("%F-%H-%M-%S.%L")
File.join(SCREENSHOTS_PATH, "screenshot_#{timestamp}.png").tap do |path|
# no sound, use PNG format
CommandRunning.run "screencapture", "-x", "-t", "png", path, warn: true
end
end
end
| 28.742857
| 88
| 0.714712
|
385181e494daf77dbc67fb91a383507f81de11bc
| 1,133
|
php
|
PHP
|
backend/pages/dashboard.php
|
Kouemi/Shoponline
|
da485b3556e3c16accdf4282b26385520aae39f8
|
[
"MIT"
] | null | null | null |
backend/pages/dashboard.php
|
Kouemi/Shoponline
|
da485b3556e3c16accdf4282b26385520aae39f8
|
[
"MIT"
] | null | null | null |
backend/pages/dashboard.php
|
Kouemi/Shoponline
|
da485b3556e3c16accdf4282b26385520aae39f8
|
[
"MIT"
] | null | null | null |
<?php
// Include file cấu hình ban đầu của `Twig`
require_once __DIR__.'/../../bootstrap.php';
// Tạo danh sách sản phẩm mẫu
// Các bạn có thể viết các câu lệnh truy xuất vào database để lấy dữ liệu, ...
$products = [
[
'name' => 'Notebook',
'description' => 'Core i7',
'value' => 800.00,
'date_register' => '2017-06-22',
],
[
'name' => 'Ipad',
'description' => 'mini 5',
'value' => 800.00,
'date_register' => '2019-06-22',
],
[
'name' => 'Mouse',
'description' => 'Razer',
'value' => 125.00,
'date_register' => '2017-10-25',
],
[
'name' => 'Keyboard',
'description' => 'Mechanical Keyboard',
'value' => 250.00,
'date_register' => '2017-06-23',
],
];
// Yêu cầu `Twig` vẽ giao diện được viết trong file `backend/pages/dashboard.html.twig`
// với dữ liệu truyền vào file giao diện được đặt tên là `products`
echo $twig->render('backend/pages/dashboard.html.twig', ['products' => $products] );
| 31.472222
| 87
| 0.500441
|
bf31d97a9cd8a973259cfdce6dfa4fb93f5cc5ab
| 815
|
rb
|
Ruby
|
lib/spree_dev_tools/rspec/support/spree_cart.rb
|
kejiro/spree_dev_tools
|
baab69120354bcb867fca341c7fd0930fbc54086
|
[
"BSD-3-Clause"
] | 4
|
2020-08-20T14:13:06.000Z
|
2021-11-04T12:04:51.000Z
|
lib/spree_dev_tools/rspec/support/spree_cart.rb
|
kejiro/spree_dev_tools
|
baab69120354bcb867fca341c7fd0930fbc54086
|
[
"BSD-3-Clause"
] | 1
|
2021-12-29T13:22:26.000Z
|
2021-12-29T13:22:26.000Z
|
lib/spree_dev_tools/rspec/support/spree_cart.rb
|
kejiro/spree_dev_tools
|
baab69120354bcb867fca341c7fd0930fbc54086
|
[
"BSD-3-Clause"
] | 2
|
2021-05-14T14:36:53.000Z
|
2021-11-04T12:05:01.000Z
|
def update_cart
if Spree.version.to_f < 4.1
click_button 'update-button'
else
page.execute_script("$('form#update-cart').submit()")
end
end
def cart_container
if Spree.version.to_f < 4.1
find_all("#cart-detail tbody tr:first-child").first
else
find_all("#cart-detail .shopping-cart-item").first
end
end
def add_to_cart(product)
visit spree.product_path(product)
expect(page).to have_selector('form#add-to-cart-form')
expect(page).to have_selector(:button, id: 'add-to-cart-button', disabled: false)
yield if block_given?
click_button 'add-to-cart-button'
if Spree.version.to_f < 4.1
wait_for_condition do
expect(page).to have_content(Spree.t(:cart))
end
else
expect(page).to have_content(Spree.t(:added_to_cart))
visit spree.cart_path
end
end
| 22.638889
| 83
| 0.710429
|
45a5b7e54c21b1a9c8aae010cbf3952420aba28d
| 491
|
sql
|
SQL
|
opensrp-reporting/src/main/resources/migrations/postgres/serviceProvided/V1_0_33__Adding_Missing_Villages_For_Kustagi.sql
|
SoftmedTanzania/opensrp_server
|
7d3ffe33545340876ecb394baf7b1b34c14413c5
|
[
"Apache-2.0"
] | 26
|
2015-03-05T15:44:34.000Z
|
2018-11-03T20:01:39.000Z
|
opensrp-reporting/src/main/resources/migrations/postgres/serviceProvided/V1_0_33__Adding_Missing_Villages_For_Kustagi.sql
|
SoftmedTanzania/opensrp_server
|
7d3ffe33545340876ecb394baf7b1b34c14413c5
|
[
"Apache-2.0"
] | 462
|
2015-02-23T17:10:38.000Z
|
2020-10-23T10:37:04.000Z
|
opensrp-reporting/src/main/resources/migrations/postgres/serviceProvided/V1_0_33__Adding_Missing_Villages_For_Kustagi.sql
|
SoftmedTanzania/htmr_backend
|
7d3ffe33545340876ecb394baf7b1b34c14413c5
|
[
"Apache-2.0"
] | 50
|
2015-02-20T12:07:52.000Z
|
2020-07-09T11:36:57.000Z
|
INSERT INTO report.dim_location (state, district, taluka, phc, subCenter, village) SELECT 'Karnataka', 'Koppal', 'Kustagi', (SELECT ID FROM report.dim_phc WHERE phcIdentifier='phc_mudenoor'), 'muddalgundi', 'kalmalli_thanda' WHERE NOT EXISTS (SELECT dim_location FROM report.dim_location WHERE state='Karnataka' AND district='Koppal' AND taluka='Kustagi' AND phc=(SELECT ID FROM report.dim_phc WHERE phcIdentifier='phc_mudenoor') AND subCenter='muddalgundi' AND village='kalmalli_thanda');
| 163.666667
| 489
| 0.794297
|
54b264d735618e2edd3f75f37557839e5a503cef
| 2,627
|
swift
|
Swift
|
Source/Sync.swift
|
Praesentia/SecurityKit-Swift
|
dc712cdd8486d06b5ea551c3604dccb6298e2492
|
[
"Apache-2.0"
] | null | null | null |
Source/Sync.swift
|
Praesentia/SecurityKit-Swift
|
dc712cdd8486d06b5ea551c3604dccb6298e2492
|
[
"Apache-2.0"
] | null | null | null |
Source/Sync.swift
|
Praesentia/SecurityKit-Swift
|
dc712cdd8486d06b5ea551c3604dccb6298e2492
|
[
"Apache-2.0"
] | null | null | null |
/*
-----------------------------------------------------------------------------
This source file is part of SecuriyKit.
Copyright 2015-2017 Jon Griffeth
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 Foundation
public typealias Sync2 = SyncT<Error>
typealias Sync = SyncT<Error>
/**
Sync
Used to synchronize multiple asynchronous calls.
*/
public class SyncT<Result> {
// MARK: - Properties
private(set) var error: Result?
// MARK: - Private Properties
private var completion : ((Result?) -> Void)!
private var count : Int = 1
/**
Initialize instance.
*/
public init()
{
}
/**
Initialize instance with error.
*/
public init(_ error: Result?)
{
self.error = error
}
/**
Clear
Clear the current error.
*/
public func clear()
{
self.error = nil
}
/**
Fail
Used to set or clear the current error.
*/
public func fail(_ error: Result?)
{
self.error = error
}
/**
Decrement the synchronization count.
*/
public func decr(_ error: Result?)
{
assert(count > 0)
if self.error == nil {
self.error = error
}
decrAndExecute()
}
/**
Increment the synchronization count.
*/
public func incr()
{
assert(count > 0)
count += 1
}
/**
Finished
*/
public func close(completionHandler completion: @escaping (Result?) -> Void)
{
assert(count > 0)
self.completion = completion
decrAndExecute()
}
/**
Test And Execute
Test whether or not synchronization has completed and calls the
completion handler if it has.
*/
private func decrAndExecute()
{
count -= 1
if count == 0 {
assert(completion != nil)
completion(error)
}
}
}
// End of File
| 20.053435
| 80
| 0.535592
|
4ef47f8ccdd4e33603c99a76592fbacfba36f36f
| 759
|
css
|
CSS
|
client/src/components/search-input.css
|
AlbertKogan/snyk-interview-task
|
4449a905a170dce4b8d3f05d0946086a0cc877d4
|
[
"MIT"
] | 1
|
2021-11-16T22:33:05.000Z
|
2021-11-16T22:33:05.000Z
|
client/src/components/search-input.css
|
AlbertKogan/snyk-interview-task
|
4449a905a170dce4b8d3f05d0946086a0cc877d4
|
[
"MIT"
] | 10
|
2020-07-17T08:23:36.000Z
|
2022-02-26T12:00:16.000Z
|
client/src/components/search-input.css
|
AlbertKogan/snyk-interview-task
|
4449a905a170dce4b8d3f05d0946086a0cc877d4
|
[
"MIT"
] | null | null | null |
.searchWrapper {
width: 100%;
position: sticky;
background: white;
display: flex;
flex: 1 0 auto;
}
.searchContent {
position: relative;
display: flex;
flex: 1 0 auto;
flex-direction: column;
}
.searchForm {
display: flex;
flex: 1 0 auto;
height: 50px;
}
.searchInput {
width: 100%;
font-size: 20px;
padding: 6px;
border-radius: 5px;
border: 1px solid #0000001f;
}
.searchInputError {
border-color: #cc2727;
}
.searchInputErrorMessage {
color: #cc2727;
padding: 5px;
}
.searchButton {
background: white;
border: none;
position: absolute;
line-height: 0;
right: 2px;
top: 3px;
margin: 0;
padding: 10px;
z-index: 10;
cursor: pointer;
}
| 15.18
| 32
| 0.596838
|
da8a4f88792de1026be29d6568887b5938bb0d53
| 758
|
php
|
PHP
|
resources/views/clients/create.blade.php
|
melissa2527/Vet-clinic-laravel
|
83bbb8c9405b444f3e01170142510df636e60de3
|
[
"MIT"
] | null | null | null |
resources/views/clients/create.blade.php
|
melissa2527/Vet-clinic-laravel
|
83bbb8c9405b444f3e01170142510df636e60de3
|
[
"MIT"
] | null | null | null |
resources/views/clients/create.blade.php
|
melissa2527/Vet-clinic-laravel
|
83bbb8c9405b444f3e01170142510df636e60de3
|
[
"MIT"
] | null | null | null |
<h1>Insert a new client</h1>
<form action="{{ action('ClientController@store') }}" method="post">
@csrf
<p>
<label for="first_name">First name:</label>
<input id="first_name" type="text" name="first_name"/>
</p>
<p>
<label for="surname">Surname:</label>
<input id="surname" type="text" name="surname"/>
</p>
<p>
<label for="address">Address:</label>
<input id="address" type="text" name="address"/>
</p>
<p>
<label for="email">Email:</label>
<input id="email" type="text" name="email"/>
</p>
<p>
<label for="phone">Phone:</label>
<input id="phone" type="text" name="phone"/>
</p>
<button type="submit">Create</button>
</form>
| 25.266667
| 68
| 0.538259
|
e2449f183a7585bac2620475610133958a1c2a8f
| 2,025
|
py
|
Python
|
math.py
|
ash98765rblx/math
|
fc64611ae90f230a8e299a69f915ebc22692ccb4
|
[
"Unlicense"
] | 1
|
2021-11-14T16:46:06.000Z
|
2021-11-14T16:46:06.000Z
|
math.py
|
ash98765rblx/math
|
fc64611ae90f230a8e299a69f915ebc22692ccb4
|
[
"Unlicense"
] | null | null | null |
math.py
|
ash98765rblx/math
|
fc64611ae90f230a8e299a69f915ebc22692ccb4
|
[
"Unlicense"
] | null | null | null |
# generate random integer values
from random import seed
from random import randint
skaViRakna = input("hello there will you learn math?")
if skaViRakna == "yes":
print('yes so fun')
whatmath = input("will you learn addition, subtraction or multiplication?")
if whatmath == 'm':
mTable = input("what multiplication table? ")
aNumber = int(mTable)
i = 1
while i < 11:
aNumber2 = randint(2, 10)
actualAnswer = aNumber * aNumber2
answer = False
while answer == False:
result = input(f'What is {aNumber} * {aNumber2}? ')
if int(result) == actualAnswer:
print("Correct!")
answer = True
i = i + 1
else:
print("wrong try again")
elif whatmath == 's':
i = 1
while i < 11: # How many correct answers before we end?
aNumber = randint(10, 100)
aNumber2 = randint(2, aNumber)
actualAnswer = aNumber - aNumber2
answer = False
while answer == False:
result = input(f'What is {aNumber} - {aNumber2}? ')
if int(result) == actualAnswer:
print("Correct!")
answer = True
i = i + 1
else:
print("wrong try again")
elif whatmath == 'a':
i = 1
while i < 11: # How many correct answers before we end?
aNumber = randint(1, 200)
aNumber2 = randint(1, 200)
actualAnswer = aNumber + aNumber2
answer = False
while answer == False:
result = input(f'What is {aNumber} + {aNumber2}? ')
if int(result) == actualAnswer:
print("Correct!")
answer = True
i = i + 1
else:
print("wrong try again")
else:
print('ok bye')
| 34.913793
| 79
| 0.475062
|
bf41f1b84942b17552bcedb7450679b8eb52b061
| 114
|
rs
|
Rust
|
src/sub_commands/mod.rs
|
rajputrajat/svn-cmd
|
5823a5463d04f7f7f0ef849ef0ec2f89cc710723
|
[
"MIT"
] | null | null | null |
src/sub_commands/mod.rs
|
rajputrajat/svn-cmd
|
5823a5463d04f7f7f0ef849ef0ec2f89cc710723
|
[
"MIT"
] | null | null | null |
src/sub_commands/mod.rs
|
rajputrajat/svn-cmd
|
5823a5463d04f7f7f0ef849ef0ec2f89cc710723
|
[
"MIT"
] | null | null | null |
pub(crate) mod info;
pub(crate) mod list;
pub(crate) mod log;
pub(crate) mod status;
pub(crate) mod version;
| 19
| 24
| 0.692982
|
ef5b449b7ac3d5fa8a1d3c594f8f4b2b060de0c3
| 215
|
h
|
C
|
src/res/gen/layouts_base.h
|
inogroup/SLib
|
6c053c8f47f04240b8444eac5f316effdee2eb01
|
[
"MIT"
] | null | null | null |
src/res/gen/layouts_base.h
|
inogroup/SLib
|
6c053c8f47f04240b8444eac5f316effdee2eb01
|
[
"MIT"
] | null | null | null |
src/res/gen/layouts_base.h
|
inogroup/SLib
|
6c053c8f47f04240b8444eac5f316effdee2eb01
|
[
"MIT"
] | null | null | null |
#pragma once
#include <slib/ui/resource.h>
namespace slib
{
namespace ui
{
class CameraControlView;
class MenuPopup;
class MobileAlertDialog;
class PromptDialog;
class TakePhotoFromCameraDialog;
}
}
| 12.647059
| 34
| 0.748837
|
b241eb74e6843034425d50b4180712578d713c8f
| 14,401
|
rb
|
Ruby
|
spec/spec_helper.rb
|
hashsdn/hashsdn-integration-packaging-puppet-opendaylight
|
2e3b774d71e943f30205cb168803e405bc1c7a7e
|
[
"BSD-2-Clause"
] | null | null | null |
spec/spec_helper.rb
|
hashsdn/hashsdn-integration-packaging-puppet-opendaylight
|
2e3b774d71e943f30205cb168803e405bc1c7a7e
|
[
"BSD-2-Clause"
] | null | null | null |
spec/spec_helper.rb
|
hashsdn/hashsdn-integration-packaging-puppet-opendaylight
|
2e3b774d71e943f30205cb168803e405bc1c7a7e
|
[
"BSD-2-Clause"
] | null | null | null |
require 'puppetlabs_spec_helper/module_spec_helper'
require 'rspec-puppet-facts'
include RspecPuppetFacts
# Customize filters to ignore 3rd-party code
# If the rspec coverage report shows not-our-code results, add it here
custom_filters = [
]
RSpec::Puppet::Coverage.filters.push(*custom_filters)
#
# NB: This is a library of helper fns used by the rspec-puppet tests
#
# Tests that are common to all possible configurations
def generic_tests()
# Confirm that module compiles
it { should compile }
it { should compile.with_all_deps }
# Confirm presence of classes
it { should contain_class('opendaylight') }
it { should contain_class('opendaylight::params') }
it { should contain_class('opendaylight::install') }
it { should contain_class('opendaylight::config') }
it { should contain_class('opendaylight::service') }
# Confirm relationships between classes
it { should contain_class('opendaylight::install').that_comes_before('Class[opendaylight::config]') }
it { should contain_class('opendaylight::config').that_requires('Class[opendaylight::install]') }
it { should contain_class('opendaylight::config').that_notifies('Class[opendaylight::service]') }
it { should contain_class('opendaylight::service').that_subscribes_to('Class[opendaylight::config]') }
it { should contain_class('opendaylight::service').that_comes_before('Class[opendaylight]') }
it { should contain_class('opendaylight').that_requires('Class[opendaylight::service]') }
# Confirm presence of generic resources
it { should contain_service('opendaylight') }
it { should contain_file('org.apache.karaf.features.cfg') }
# Confirm properties of generic resources
# NB: These hashes don't work with Ruby 1.8.7, but we
# don't support 1.8.7 so that's okay. See issue #36.
it {
should contain_service('opendaylight').with(
'ensure' => 'running',
'enable' => 'true',
'hasstatus' => 'true',
'hasrestart' => 'true',
)
}
it {
should contain_file('org.apache.karaf.features.cfg').with(
'ensure' => 'file',
'path' => '/opt/opendaylight/etc/org.apache.karaf.features.cfg',
'owner' => 'odl',
'group' => 'odl',
)
}
end
# Shared tests that specialize in testing log file size and rollover
def log_file_settings(options = {})
# Extraxt params. The dafault value should be same as in opendaylight::params
log_max_size = options.fetch(:log_max_size, '10GB')
log_max_rollover = options.fetch(:log_max_rollover, 2)
it {
should contain_file_line('logmaxsize').with(
'path' => '/opt/opendaylight/etc/org.ops4j.pax.logging.cfg',
'line' => "log4j.appender.out.maxFileSize=#{log_max_size}",
'match' => '^log4j.appender.out.maxFileSize.*$',
)
}
it {
should contain_file_line('logmaxrollover').with(
'path' => '/opt/opendaylight/etc/org.ops4j.pax.logging.cfg',
'line' => "log4j.appender.out.maxBackupIndex=#{log_max_rollover}",
'match' => '^log4j.appender.out.maxBackupIndex.*$',
)
}
end
# Shared tests that specialize in testing Karaf feature installs
def karaf_feature_tests(options = {})
# Extract params
# NB: This default list should be the same as the one in opendaylight::params
# TODO: Remove this possible source of bugs^^
default_features = options.fetch(:default_features, ['standard', 'wrap', 'ssh'])
extra_features = options.fetch(:extra_features, [])
# The order of this list concat matters
features = default_features + extra_features
features_csv = features.join(',')
# Confirm properties of Karaf features config file
# NB: These hashes don't work with Ruby 1.8.7, but we
# don't support 1.8.7 so that's okay. See issue #36.
it {
should contain_file('org.apache.karaf.features.cfg').with(
'ensure' => 'file',
'path' => '/opt/opendaylight/etc/org.apache.karaf.features.cfg',
'owner' => 'odl',
'group' => 'odl',
)
}
it {
should contain_file_line('featuresBoot').with(
'path' => '/opt/opendaylight/etc/org.apache.karaf.features.cfg',
'line' => "featuresBoot=#{features_csv}",
'match' => '^featuresBoot=.*$',
)
}
end
# Shared tests that specialize in testing ODL's REST port config
def odl_rest_port_tests(options = {})
# Extract params
# NB: This default value should be the same as one in opendaylight::params
# TODO: Remove this possible source of bugs^^
odl_rest_port = options.fetch(:odl_rest_port, 8080)
odl_bind_ip = options.fetch(:odl_bind_ip, '0.0.0.0')
# Confirm properties of ODL REST port config file
# NB: These hashes don't work with Ruby 1.8.7, but we
# don't support 1.8.7 so that's okay. See issue #36.
it {
should contain_augeas('ODL REST Port')
}
if not odl_bind_ip.eql? '0.0.0.0'
it {
should contain_augeas('ODL REST IP')
should contain_file_line('org.ops4j.pax.web.cfg').with(
'path' => '/opt/opendaylight/etc/org.ops4j.pax.web.cfg',
'line' => "org.ops4j.pax.web.listening.addresses = #{odl_bind_ip}",
)
}
else
it {
should_not contain_augeas('ODL REST IP')
}
end
end
def log_level_tests(options = {})
# Extract params
# NB: This default value should be the same as one in opendaylight::params
# TODO: Remove this possible source of bugs^^
log_levels = options.fetch(:log_levels, {})
if log_levels.empty?
# Should contain log level config file
it {
should_not contain_file_line('logger-org.opendaylight.ovsdb')
}
else
# Verify each custom log level config entry
log_levels.each_pair do |logger, level|
it {
should contain_file_line("logger-#{logger}").with(
'ensure' => 'present',
'path' => '/opt/opendaylight/etc/org.ops4j.pax.logging.cfg',
'line' => "log4j.logger.#{logger}=#{level}",
)
}
end
end
end
def enable_ha_tests(options = {})
# Extract params
enable_ha = options.fetch(:enable_ha, false)
odl_bind_ip = options.fetch(:odl_bind_ip, '0.0.0.0')
ha_node_ips = options.fetch(:ha_node_ips, [])
ha_db_modules = options.fetch(:ha_db_modules, { 'default' => false })
# HA_NODE_IPS size
ha_node_count = ha_node_ips.size
if (enable_ha) && (ha_node_count < 2)
# Check for HA_NODE_COUNT < 2
fail("Number of HA nodes less than 2: #{ha_node_count} and HA Enabled")
end
if enable_ha
ha_node_index = ha_node_ips.index(odl_bind_ip)
it {
should contain_file('akka.conf').with(
'path' => '/opt/opendaylight/configuration/initial/akka.conf',
'ensure' => 'file',
'owner' => 'odl',
'group' => 'odl',
'content' => /roles\s*=\s*\["member-#{ha_node_index}"\]/
)
}
ha_db_modules.each do |mod, urn|
it { should contain_file('module-shards.conf').with(
'path' => '/opt/opendaylight/configuration/initial/module-shards.conf',
'ensure' => 'file',
'owner' => 'odl',
'group' => 'odl',
'content' => /name = "#{mod}"/
)}
if mod == 'default'
it { should contain_file('modules.conf').with(
'path' => '/opt/opendaylight/configuration/initial/modules.conf',
'ensure' => 'file',
'owner' => 'odl',
'group' => 'odl'
)}
else
it { should contain_file('modules.conf').with(
'path' => '/opt/opendaylight/configuration/initial/modules.conf',
'ensure' => 'file',
'owner' => 'odl',
'group' => 'odl',
'content' => /name = "#{mod}"/,
)}
end
end
else
it {
should_not contain_file('akka.conf')
should_not contain_file('module-shards.conf')
should_not contain_file('modules.conf')
}
end
end
def rpm_install_tests(options = {})
# Extract params
rpm_repo = options.fetch(:rpm_repo, 'opendaylight-6-testing')
java_opts = options.fetch(:java_opts, '-Djava.net.preferIPv4Stack=true')
# Default to CentOS 7 Yum repo URL
# Confirm presence of RPM-related resources
it { should contain_yumrepo(rpm_repo) }
it { should contain_package('opendaylight') }
# Confirm relationships between RPM-related resources
it { should contain_package('opendaylight').that_requires("Yumrepo[#{rpm_repo}]") }
it { should contain_yumrepo(rpm_repo).that_comes_before('Package[opendaylight]') }
# Confirm properties of RPM-related resources
# NB: These hashes don't work with Ruby 1.8.7, but we
# don't support 1.8.7 so that's okay. See issue #36.
it {
should contain_yumrepo(rpm_repo).with(
'enabled' => '1',
'gpgcheck' => '0',
'descr' => 'OpenDaylight SDN Controller',
'baseurl' => "http://cbs.centos.org/repos/nfv7-#{rpm_repo}/$basearch/os/",
)
}
it {
should contain_package('opendaylight').with(
'ensure' => 'present',
)
}
it {
should contain_file_line('java_options_systemd').with(
'ensure' => 'present',
'path' => '/usr/lib/systemd/system/opendaylight.service',
'line' => "Environment=_JAVA_OPTIONS=\'#{java_opts}\'",
'after' => 'ExecStart=/opt/opendaylight/bin/start',
)
}
end
def deb_install_tests(options = {})
# Extract params
deb_repo = options.fetch(:deb_repo, 'ppa:odl-team/carbon')
# Confirm the presence of Deb-related resources
it { should contain_apt__ppa(deb_repo) }
it { should contain_package('opendaylight') }
# Confirm relationships between Deb-related resources
it { should contain_package('opendaylight').that_requires("Apt::Ppa[#{deb_repo}]") }
it { should contain_apt__ppa(deb_repo).that_comes_before('Package[opendaylight]') }
# Confirm presence of Deb-related resources
it {
should contain_package('opendaylight').with(
'ensure' => 'present',
)
}
end
# Shared tests for unsupported OSs
def unsupported_os_tests(options = {})
# Extract params
expected_msg = options.fetch(:expected_msg)
rpm_repo = options.fetch(:rpm_repo, 'opendaylight-6-testing')
# Confirm that classes fail on unsupported OSs
it { expect { should contain_class('opendaylight') }.to raise_error(Puppet::Error, /#{expected_msg}/) }
it { expect { should contain_class('opendaylight::install') }.to raise_error(Puppet::Error, /#{expected_msg}/) }
it { expect { should contain_class('opendaylight::config') }.to raise_error(Puppet::Error, /#{expected_msg}/) }
it { expect { should contain_class('opendaylight::service') }.to raise_error(Puppet::Error, /#{expected_msg}/) }
# Confirm that other resources fail on unsupported OSs
it { expect { should contain_yumrepo(rpm_repo) }.to raise_error(Puppet::Error, /#{expected_msg}/) }
it { expect { should contain_package('opendaylight') }.to raise_error(Puppet::Error, /#{expected_msg}/) }
it { expect { should contain_service('opendaylight') }.to raise_error(Puppet::Error, /#{expected_msg}/) }
it { expect { should contain_file('org.apache.karaf.features.cfg') }.to raise_error(Puppet::Error, /#{expected_msg}/) }
end
# Shared tests that specialize in testing SNAT mechanism
def snat_mechanism_tests(snat_mechanism='controller')
it { should contain_file('/opt/opendaylight/etc/opendaylight') }
it { should contain_file('/opt/opendaylight/etc/opendaylight/datastore')}
it { should contain_file('/opt/opendaylight/etc/opendaylight/datastore/initial')}
it { should contain_file('/opt/opendaylight/etc/opendaylight/datastore/initial/config')}
# Confirm snat_mechanism
it {
should contain_file('netvirt-natservice-config.xml').with(
'ensure' => 'file',
'path' => '/opt/opendaylight/etc/opendaylight/datastore/initial/config/netvirt-natservice-config.xml',
'owner' => 'odl',
'group' => 'odl',
'content' => /<nat-mode>#{snat_mechanism}<\/nat-mode>/
)
}
end
# Shared tests that specialize in testing SFC Config
def sfc_tests()
it { should contain_file('/opt/opendaylight/etc/opendaylight') }
it { should contain_file('/opt/opendaylight/etc/opendaylight/datastore')}
it { should contain_file('/opt/opendaylight/etc/opendaylight/datastore/initial')}
it { should contain_file('/opt/opendaylight/etc/opendaylight/datastore/initial/config')}
it {
should contain_file('netvirt-elanmanager-config.xml').with(
'ensure' => 'file',
'path' => '/opt/opendaylight/etc/opendaylight/datastore/initial/config/netvirt-elanmanager-config.xml',
'owner' => 'odl',
'group' => 'odl',
'source' => 'puppet:///modules/opendaylight/netvirt-elanmanager-config.xml'
)
should contain_file('genius-itm-config.xml').with(
'ensure' => 'file',
'path' => '/opt/opendaylight/etc/opendaylight/datastore/initial/config/genius-itm-config.xml',
'owner' => 'odl',
'group' => 'odl',
'source' => 'puppet:///modules/opendaylight/genius-itm-config.xml'
)
}
end
# Shared tests that specialize in testing VPP routing node config
def vpp_routing_node_tests(options = {})
# Extract params
# NB: This default list should be the same as the one in opendaylight::params
# TODO: Remove this possible source of bugs^^
routing_node = options.fetch(:routing_node, '')
if routing_node.empty?
it { should_not contain_file('org.opendaylight.groupbasedpolicy.neutron.vpp.mapper.startup.cfg') }
it { should_not contain_file_line('routing-node') }
else
# Confirm properties of Karaf config file
# NB: These hashes don't work with Ruby 1.8.7, but we
# don't support 1.8.7 so that's okay. See issue #36.
it {
should contain_file('org.opendaylight.groupbasedpolicy.neutron.vpp.mapper.startup.cfg').with(
'ensure' => 'file',
'path' => '/opt/opendaylight/etc/org.opendaylight.groupbasedpolicy.neutron.vpp.mapper.startup.cfg',
'owner' => 'odl',
'group' => 'odl',
)
}
it {
should contain_file_line('routing-node').with(
'path' => '/opt/opendaylight/etc/org.opendaylight.groupbasedpolicy.neutron.vpp.mapper.startup.cfg',
'line' => "routing-node=#{routing_node}",
'match' => '^routing-node=.*$',
)
}
end
end
# ODL username/password tests
def username_password_tests(username, password)
it {
should contain_odl_user(username).with(
:password => password
)
}
end
| 36.458228
| 121
| 0.661551
|
533a7c07856c8cedd9a83e7acfc01e776afd6b69
| 311
|
rb
|
Ruby
|
test/rails_embed_editor/config_test.rb
|
timotheeguerin/rails_embed_editor
|
54974d347b60c7b7063d2fa8c2e9d80e2c7b42a3
|
[
"MIT-0",
"MIT"
] | 1
|
2020-09-28T22:22:35.000Z
|
2020-09-28T22:22:35.000Z
|
test/rails_embed_editor/config_test.rb
|
timotheeguerin/rails_embed_editor
|
54974d347b60c7b7063d2fa8c2e9d80e2c7b42a3
|
[
"MIT-0",
"MIT"
] | null | null | null |
test/rails_embed_editor/config_test.rb
|
timotheeguerin/rails_embed_editor
|
54974d347b60c7b7063d2fa8c2e9d80e2c7b42a3
|
[
"MIT-0",
"MIT"
] | null | null | null |
require 'test_helper'
#Tests I18nAdminUtils::Config
class ConfigTest < ActiveSupport::TestCase
test 'Load config fine with block' do
RailsEmbedEditor.config do |config|
end
end
test 'Test config function without param' do
assert RailsEmbedEditor.config == RailsEmbedEditor::Config
end
end
| 22.214286
| 62
| 0.758842
|
dd6f22a08f74793e11f6cb5a5ef262ea0bf05a11
| 1,343
|
java
|
Java
|
src/main/java/com/cloudburst/mp3agic/ID3v2ObseletePictureFrameData.java
|
CloudburstStrategy/mp3agic
|
55a4ba808973080111cfd394810060f8f31f47d6
|
[
"MIT"
] | null | null | null |
src/main/java/com/cloudburst/mp3agic/ID3v2ObseletePictureFrameData.java
|
CloudburstStrategy/mp3agic
|
55a4ba808973080111cfd394810060f8f31f47d6
|
[
"MIT"
] | null | null | null |
src/main/java/com/cloudburst/mp3agic/ID3v2ObseletePictureFrameData.java
|
CloudburstStrategy/mp3agic
|
55a4ba808973080111cfd394810060f8f31f47d6
|
[
"MIT"
] | null | null | null |
package com.cloudburst.mp3agic;
import java.io.UnsupportedEncodingException;
public class ID3v2ObseletePictureFrameData extends ID3v2PictureFrameData {
public ID3v2ObseletePictureFrameData(boolean unsynchronisation) {
super(unsynchronisation);
}
public ID3v2ObseletePictureFrameData(boolean unsynchronisation, String mimeType, byte pictureType, EncodedText description, byte[] imageData) {
super(unsynchronisation, mimeType, pictureType, description, imageData);
}
public ID3v2ObseletePictureFrameData(boolean unsynchronisation, byte[] bytes) throws InvalidDataException {
super(unsynchronisation, bytes);
}
@Override
protected void unpackFrameData(byte[] bytes) throws InvalidDataException {
String filetype;
try {
filetype = BufferTools.byteBufferToString(bytes, 1, 3);
} catch (UnsupportedEncodingException e) {
filetype = "unknown";
}
mimeType = "image/" + filetype.toLowerCase();
pictureType = bytes[4];
int marker = BufferTools.indexOfTerminatorForEncoding(bytes, 5, bytes[0]);
if (marker >= 0) {
description = new EncodedText(bytes[0], BufferTools.copyBuffer(bytes, 5, marker - 5));
marker += description.getTerminator().length;
} else {
description = new EncodedText(bytes[0], "");
marker = 1;
}
imageData = BufferTools.copyBuffer(bytes, marker, bytes.length - marker);
}
}
| 33.575
| 144
| 0.760238
|
c9707e4c8069fe5acabb961d5350ca8c8abeacea
| 2,376
|
ts
|
TypeScript
|
packages/gatsby/src/bootstrap/load-plugins/process-plugin.ts
|
9Fork/gatsby
|
1895bf1d385210a63c43be099e58b63bf6a32300
|
[
"MIT"
] | 7
|
2015-05-22T19:19:39.000Z
|
2015-06-15T16:56:48.000Z
|
packages/gatsby/src/bootstrap/load-plugins/process-plugin.ts
|
9Fork/gatsby
|
1895bf1d385210a63c43be099e58b63bf6a32300
|
[
"MIT"
] | 6
|
2022-01-05T10:10:19.000Z
|
2022-01-15T22:52:44.000Z
|
packages/gatsby/src/bootstrap/load-plugins/process-plugin.ts
|
9Fork/gatsby
|
1895bf1d385210a63c43be099e58b63bf6a32300
|
[
"MIT"
] | 1
|
2020-03-21T01:17:22.000Z
|
2020-03-21T01:17:22.000Z
|
import { IPluginInfo, PluginRef } from "./types"
import { createPluginId } from "./utils/create-id"
import { resolvePlugin } from "./resolve-plugin"
import { isString, isEmpty, set, merge } from "lodash"
export function processPlugin(plugin: PluginRef, rootDir: string): IPluginInfo {
// Respect the directory that the plugin was sourced from initially
rootDir = (!isString(plugin) && plugin.parentDir) || rootDir
if (isString(plugin)) {
const info = resolvePlugin(plugin, rootDir)
return {
...info,
pluginOptions: {
plugins: [],
},
}
}
plugin.options = plugin.options || {}
// Throw an error if there is an "option" key.
if (
isEmpty(plugin.options) &&
!isEmpty((plugin as { option?: unknown }).option)
) {
throw new Error(
`Plugin "${plugin.resolve}" has an "option" key in the configuration. Did you mean "options"?`
)
}
// Plugins can have plugins.
if (plugin.subPluginPaths) {
for (const subPluginPath of plugin.subPluginPaths) {
const segments = subPluginPath.split(`.`)
let roots: Array<any> = [plugin.options]
let pathToSwap = segments
for (const segment of segments) {
if (segment === `[]`) {
pathToSwap = pathToSwap.slice(0, pathToSwap.length - 1)
roots = roots.flat()
} else {
roots = roots.map(root => root[segment])
}
}
roots = roots.flat()
const processed: Array<IPluginInfo> = []
for (const root of roots) {
const result = processPlugin(root, rootDir)
processed.push(result)
}
set(plugin.options, pathToSwap, processed)
}
}
// Add some default values for tests as we don't actually
// want to try to load anything during tests.
if (plugin.resolve === `___TEST___`) {
const name = `TEST`
return {
id: createPluginId(name, plugin),
name,
version: `0.0.0-test`,
pluginOptions: {
plugins: [],
},
resolve: `__TEST__`,
}
}
const info = resolvePlugin(plugin, rootDir)
return {
...info,
modulePath: plugin.modulePath,
module: plugin.module,
subPluginPaths: plugin.subPluginPaths
? Array.from(plugin.subPluginPaths)
: undefined,
id: createPluginId(info.name, plugin),
pluginOptions: merge({ plugins: [] }, plugin.options),
}
}
| 26.10989
| 100
| 0.614057
|
a39f81a7c44faebd1da62489c9141bbec827e9b9
| 602
|
java
|
Java
|
src/main/java/org/iot/dsa/dslink/dframework/DFConnectionNode.java
|
iot-dsa-v2/driver-framework-java-v2-prototype
|
1838b697ca340022add1ab02543ddf8c38c6254c
|
[
"Apache-2.0"
] | null | null | null |
src/main/java/org/iot/dsa/dslink/dframework/DFConnectionNode.java
|
iot-dsa-v2/driver-framework-java-v2-prototype
|
1838b697ca340022add1ab02543ddf8c38c6254c
|
[
"Apache-2.0"
] | null | null | null |
src/main/java/org/iot/dsa/dslink/dframework/DFConnectionNode.java
|
iot-dsa-v2/driver-framework-java-v2-prototype
|
1838b697ca340022add1ab02543ddf8c38c6254c
|
[
"Apache-2.0"
] | null | null | null |
package org.iot.dsa.dslink.dframework;
/**
* @author James (Juris) Puchin
* Created on 10/25/2017
*/
public abstract class DFConnectionNode extends DFBranchNode {
// public static long REFRESH_DEF = DFHelpers.DEFAULT_PING_DELAY;
// public static DFHelpers.DFConnStrat CONN_STRAT_DEF = DFHelpers.DFConnStrat.LAZY;
// public static DFHelpers.DFRefChangeStrat REFRESH_CHANGE_STRAT_DEF = DFHelpers.DFRefChangeStrat.CONSTANT;
// @Override
// protected void onStable() {
// super.onStable();
// if (!isNodeStopped()) {
// startCarObject();
// }
// }
}
| 28.666667
| 110
| 0.687708
|
9c7c212b544c2435adb85d0c3100271adcd37b9d
| 831
|
rs
|
Rust
|
pallets/deip/src/asset.rs
|
StasDachinsky/deip-node
|
f7109e002cb1f0724d59784947e9f39c4a879f3a
|
[
"Unlicense"
] | null | null | null |
pallets/deip/src/asset.rs
|
StasDachinsky/deip-node
|
f7109e002cb1f0724d59784947e9f39c4a879f3a
|
[
"Unlicense"
] | null | null | null |
pallets/deip/src/asset.rs
|
StasDachinsky/deip-node
|
f7109e002cb1f0724d59784947e9f39c4a879f3a
|
[
"Unlicense"
] | null | null | null |
use crate::*;
use sp_runtime::traits::AtLeast32BitUnsigned;
use deip_serializable_u128::SerializableAtLeast32BitUnsigned;
#[derive(Encode, Decode, Clone, RuntimeDebug, PartialEq, Eq, TypeInfo)]
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "std", serde(rename_all = "camelCase"))]
pub struct Asset<AssetId, AssetBalance: Clone + AtLeast32BitUnsigned> {
id: AssetId,
amount: SerializableAtLeast32BitUnsigned<AssetBalance>,
}
impl<AssetId, AssetBalance: Clone + AtLeast32BitUnsigned> Asset<AssetId, AssetBalance> {
pub fn new(id: AssetId, amount: AssetBalance) -> Self {
Self { id, amount: SerializableAtLeast32BitUnsigned(amount) }
}
pub fn id(&self) -> &AssetId {
&self.id
}
pub fn amount(&self) -> &AssetBalance {
&self.amount.0
}
}
| 30.777778
| 88
| 0.702768
|
608e1af820e17728d95b07e9c0860ebc3b07b85a
| 2,551
|
html
|
HTML
|
_includes/profile.html
|
dieudtq/dieudtq.github.io
|
49fccaacfeb918113aec0f06649f3e258070902a
|
[
"MIT"
] | 1
|
2018-12-09T16:03:17.000Z
|
2018-12-09T16:03:17.000Z
|
_includes/profile.html
|
dieudtq/dieudtq.github.io
|
49fccaacfeb918113aec0f06649f3e258070902a
|
[
"MIT"
] | null | null | null |
_includes/profile.html
|
dieudtq/dieudtq.github.io
|
49fccaacfeb918113aec0f06649f3e258070902a
|
[
"MIT"
] | null | null | null |
<!-- profile -->
<div id="profile" class="content_2">
<!-- .title -->
<h1 class="h-bloc">Profile - About Me</h1>
<div class="row top-p">
<div class="col-md-6 profile-l">
<!--About me-->
<div class="title_content">
<div class="text_content">DieuDTQ</div>
<div class="clear"></div>
</div>
<ul class="about">
<li>
<i class="glyphicon glyphicon-user"></i>
<label>Name</label>
<span class="value">Đo Trung Quang Dieu</span>
<div class="clear"></div>
</li>
<li>
<i class="glyphicon glyphicon-calendar"></i>
<label>Date of birth</label>
<span class="value">November 17, 1994</span>
<div class="clear"></div>
</li>
<li>
<i class="glyphicon glyphicon-map-marker"></i>
<label>Adress</label>
<span class="value">Da Nang, Viet Nam</span>
<div class="clear"></div>
</li>
<li>
<i class="glyphicon glyphicon-envelope"></i>
<label>Email</label>
<span class="value">dieudtq@gmail.com</span>
<div class="clear"></div>
</li>
<li>
<i class="glyphicon glyphicon-phone"></i>
<label>Phone</label>
<span class="value">+84 1672 410360</span>
<div class="clear"></div>
</li>
<li>
<i class="glyphicon glyphicon-globe"></i>
<label>Website</label>
<span class="value"><a href="https://dieudtq.github.io" target="_blank">dieudtq.github.io</a></span>
<div class="clear"></div>
</li>
</ul>
<p style="margin-bottom:20px">
<i class="fa fa-quote-left"></i>
Don’t wait for the perfect moment, take the moment and make it perfect.
<i class="fa fa-quote-right"></i>
</p>
</div>
<!-- End left-wrap -->
<div class="col-md-6 profile-r">
<div class="cycle-slideshow">
<img src="images/img-profile/about_1.jpg" alt="" />
<img src="images/img-profile/about_2.png" alt="" />
<img src="images/img-profile/about_3.png" alt="" />
</div>
</div>
</div>
<!-- begin service -->
<!-- end service 2 -->
<div class="clear"></div>
</div>
<!-- End .profile -->
| 28.662921
| 116
| 0.460996
|
4f2b5204a9ba2a1600d7be031ea43df8fc58fb16
| 379
|
sql
|
SQL
|
db/tables/tbl_locations.sql
|
DaveBathnes/Plymouth-3D
|
54be0cf1a0d8ca4acabe5400b9496d12c499f4c1
|
[
"MIT"
] | null | null | null |
db/tables/tbl_locations.sql
|
DaveBathnes/Plymouth-3D
|
54be0cf1a0d8ca4acabe5400b9496d12c499f4c1
|
[
"MIT"
] | null | null | null |
db/tables/tbl_locations.sql
|
DaveBathnes/Plymouth-3D
|
54be0cf1a0d8ca4acabe5400b9496d12c499f4c1
|
[
"MIT"
] | null | null | null |
create table locations (
id serial not null,
location_name text not null,
address_1 text,
address_2 text,
address_3 text,
postcode text,
latitude numeric,
longitude numeric,
website_url text,
photo_url text,
constraint pk_locations_id primary key (id)
);
--
select AddGeometryColumn ('public', 'locations', 'geom', 4326, 'POINT', 2);
| 23.6875
| 75
| 0.680739
|
447830e44cd038be4e10ff9dba646d19ce0c5e6e
| 1,821
|
py
|
Python
|
src/main.py
|
hyu1834/Static-Variable-Scope-Analyzer-for-Python-Programming-Language
|
7cf4da67caec0f88b77bbaf3eed4065e255497bf
|
[
"Apache-2.0"
] | null | null | null |
src/main.py
|
hyu1834/Static-Variable-Scope-Analyzer-for-Python-Programming-Language
|
7cf4da67caec0f88b77bbaf3eed4065e255497bf
|
[
"Apache-2.0"
] | null | null | null |
src/main.py
|
hyu1834/Static-Variable-Scope-Analyzer-for-Python-Programming-Language
|
7cf4da67caec0f88b77bbaf3eed4065e255497bf
|
[
"Apache-2.0"
] | null | null | null |
# Author: Hiu Hong Yu && Ming-Hung Lu
# University of California, Davis
# Winter 2017 - ECS 240 - Zhendong Su
#Standard Libraries
import sys
import os
#3rd Party Libraries
#Local Libraries
import io_utils
import dirent_utils
import variable_table
import undeclared_local_variable_checker
import overriding_declared_variable_checker
import global_local_variable_confusion_checker
import function_parameter_overridden_checker
def perform_check(py_path, ulv_checker, odv_checker, glvc_checker, fpo_checker):
warning_lines = {}
vtable = variable_table.Variable_Table(py_path)
# I01
warning_lines["Undeclared Local Variables"] = ulv_checker.check(vtable)
# I02
warning_lines["Overriding Declared Variables"] = odv_checker.check(vtable)
# I03
warning_lines["Global/Local Variables Confusion"] = glvc_checker.check(vtable)
# I04
warning_lines["Function Parameter Overridden"] = fpo_checker.check(vtable)
# return result
return warning_lines
def main():
#
if len(sys.argv) < 2:
io_utils.usage("python main.py <source files>", terminate = True)
# Make sure the input file is python
if(dirent_utils.get_file_basename_extension(sys.argv[1])[1] != ".py"):
io_utils.usage("python main.py <source file>", terminate = True)
# Init checker
ulv_checker = undeclared_local_variable_checker.Undeclared_Local_Variable_Checker()
odv_checker = overriding_declared_variable_checker.Overridding_Declared_Variable_Checker()
glvc_checker = global_local_variable_confusion_checker.Global_Local_Variable_Confusion_Checker()
fpo_checker = function_parameter_overridden_checker.Function_Parameter_Overridden_Checker()
# Perform analysis on each python file
for py_path in sys.argv[1:]:
print(perform_check(py_path, ulv_checker, odv_checker, glvc_checker, fpo_checker))
if __name__ == "__main__":
main()
| 29.370968
| 97
| 0.803954
|
1a6db479325688ca4ac62688a2b2989305ae6c1d
| 5,837
|
py
|
Python
|
tests/test_utils.py
|
sumanthratna/PathFlowAI
|
70324e78da7ad9452789478b9be7cc76515ea3ab
|
[
"MIT"
] | null | null | null |
tests/test_utils.py
|
sumanthratna/PathFlowAI
|
70324e78da7ad9452789478b9be7cc76515ea3ab
|
[
"MIT"
] | null | null | null |
tests/test_utils.py
|
sumanthratna/PathFlowAI
|
70324e78da7ad9452789478b9be7cc76515ea3ab
|
[
"MIT"
] | null | null | null |
from pathflowai import utils
from numpy.testing import assert_array_equal, assert_allclose
def test_svs2dask_array():
from .utils import download_svs
from PIL import Image
from numpy import array as to_npa
# from os import remove
id = "2e4f6316-588b-4629-adf0-7aeac358a0e2"
file = "TCGA-MR-A520-01Z-00-DX1.2F323BAC-56C9-4A0C-9C1B-2B4F776056B4.svs"
download_location = download_svs(id, file)
Image.MAX_IMAGE_PIXELS = None # SECURITY RISK!
ground_truth = to_npa(Image.open(download_location))
test = utils.svs2dask_array(download_location).compute()
crop_height, crop_width, _ = test.shape
# remove(download_location)
assert_array_equal(ground_truth[:crop_height, :crop_width, :], test)
def test_preprocessing_pipeline():
from .utils import get_tests_dir
from os.path import join, exists
tests_dir = get_tests_dir()
basename = "TCGA-18-5592-01Z-00-DX1"
input_dir = join(tests_dir, "inputs")
out_zarr = join(tests_dir, "output_zarr.zarr")
out_pkl = join(tests_dir, "output.pkl")
def capture(command):
from subprocess import Popen, PIPE
proc = Popen(command, stdout=PIPE, stderr=PIPE)
out, err = proc.communicate()
return out, err, proc.returncode
def test_segmentation():
npy_file = join(input_dir, basename + ".npy")
npy_mask = join(input_dir, basename + "_mask.npy")
# convert TCGA annotations (XML) to a
# binary mask (npy) with the following:
#
# import numpy as np
# import viewmask
# import xml.etree.ElementTree as ET
# np.save(
# './tests/inputs/TCGA-18-5592-01Z-00-DX1_mask.npy',
# viewmask.utils.xml_to_image(
# ET.parse('./tests/inputs/TCGA-18-5592-01Z-00-DX1.xml')
# )
# )
#
#
# convert TCGA input (PNG) to a
# numpy array (npy) with the following:
#
# import numpy as np
# from PIL import Image
# np.save(
# './tests/inputs/TCGA-18-5592-01Z-00-DX1.npy',
# np.array(
# Image.open('./tests/inputs/TCGA-18-5592-01Z-00-DX1.png')
# )
# )
utils.run_preprocessing_pipeline(
npy_file, npy_mask=npy_mask, out_zarr=out_zarr, out_pkl=out_pkl
)
assert exists(out_zarr)
assert exists(out_pkl)
from numpy import load as npy_to_npa
from zarr import open as open_zarr
from dask.array import from_zarr as zarr_to_da
img = zarr_to_da(open_zarr(out_zarr)).compute()
assert_array_equal(img, npy_to_npa(npy_file))
odb = join(tests_dir, "patch_information.db")
command = [
"pathflowai-preprocess",
"preprocess-pipeline",
"-odb", odb,
"--preprocess",
"--patches",
"--basename", basename,
"--input_dir", input_dir,
"--patch_size", "256",
"--intensity_threshold", "45.",
"-tc", "7",
"-t", "0.05"
]
out, err, exitcode = capture(command)
assert exists(out_zarr)
assert exists(out_pkl)
assert exists(odb)
assert exitcode == 0
from sqlite3 import connect as sql_connect
connection = sql_connect(odb)
cursor = connection.execute('SELECT * FROM "256";')
names = [description[0] for description in cursor.description]
cursor.close()
true_headers = [
"index",
"ID",
"x",
"y",
"patch_size",
"annotation",
"0",
"1",
"2",
"3",
"4",
"5",
"6",
]
assert names == true_headers
def test_classification():
png_file = join(input_dir, basename + ".png")
xml_file = join(input_dir, basename + ".xml")
utils.run_preprocessing_pipeline(
png_file, xml_file=xml_file,
out_zarr=out_zarr, out_pkl=out_pkl
)
assert exists(out_zarr)
assert exists(out_pkl)
from PIL.Image import open as png_to_pil
from numpy import array as pil_to_npa
from zarr import open as open_zarr
from dask.array import from_zarr as zarr_to_da
img = zarr_to_da(open_zarr(out_zarr)).compute() # (1, 1000, 1000, 3)
assert_allclose(img[0], pil_to_npa(png_to_pil(png_file)))
odb = join(tests_dir, "patch_information.db")
command = [
"pathflowai-preprocess",
"preprocess-pipeline",
"-odb", odb,
"--preprocess",
"--patches",
"--basename", basename,
"--input_dir", input_dir,
"--patch_size", "256",
"--intensity_threshold", "45.",
"-t", "0.05"
]
out, err, exitcode = capture(command)
assert exists(out_zarr)
assert exists(out_pkl)
assert exists(odb)
print(err)
assert exitcode == 0
from sqlite3 import connect as sql_connect
connection = sql_connect(odb)
cursor = connection.execute('SELECT * FROM "256";')
names = [description[0] for description in cursor.description]
cursor.close()
true_headers = [
"index",
"ID",
"x",
"y",
"patch_size",
"annotation",
"0",
"1",
"2",
"3",
"4",
"5",
"6",
]
assert names == true_headers
test_segmentation()
from os import remove
from shutil import rmtree
rmtree(out_zarr)
remove(out_pkl)
# test_classification()
| 29.331658
| 77
| 0.556108
|
85441a2d5dc08386298cd730e78eb6acd3f75b03
| 615
|
dart
|
Dart
|
lib/src/widget_djs/auto/interval_dj.dart
|
ARK4579/dj_fj
|
8463d2b2095da94bda8117f0988e0fe189ca630a
|
[
"BSD-3-Clause"
] | null | null | null |
lib/src/widget_djs/auto/interval_dj.dart
|
ARK4579/dj_fj
|
8463d2b2095da94bda8117f0988e0fe189ca630a
|
[
"BSD-3-Clause"
] | null | null | null |
lib/src/widget_djs/auto/interval_dj.dart
|
ARK4579/dj_fj
|
8463d2b2095da94bda8117f0988e0fe189ca630a
|
[
"BSD-3-Clause"
] | null | null | null |
import 'package:dj/dj.dart';
import 'package:json_annotation/json_annotation.dart';
part 'interval_dj.g.dart';
@JsonSerializable()
class IntervalDj extends BaseWidgetDj {
IntervalDj({
baseWidgetDjType = 'Interval',
}) : super(
baseWidgetDjType:baseWidgetDjType,
);
@override
List<String> toCode() { var codeLines = <String>[];codeLines.add('Interval(');codeLines.add(')');return codeLines; }
@override
String toString() { return toCode().join(''); }
factory IntervalDj.fromJson(Map<String, dynamic> json) => _$IntervalDjFromJson(json);
@override
Map<String, dynamic> toJson() => _$IntervalDjToJson(this);
}
| 23.653846
| 117
| 0.739837
|
d68f06115e879b49fb7d1ac4f23c672f74cbf161
| 779
|
cs
|
C#
|
SecurionPayTests/ModelBuilders/TokenRequestBuilder.cs
|
securionpay/securionpay-net
|
fa8f258ceafe7341b614475ba3a33107550950c2
|
[
"MIT"
] | 3
|
2018-04-19T15:59:52.000Z
|
2020-09-01T12:24:51.000Z
|
SecurionPayTests/ModelBuilders/TokenRequestBuilder.cs
|
securionpay/securionpay-net
|
fa8f258ceafe7341b614475ba3a33107550950c2
|
[
"MIT"
] | 6
|
2016-02-04T17:24:14.000Z
|
2020-01-08T08:47:46.000Z
|
SecurionPayTests/ModelBuilders/TokenRequestBuilder.cs
|
securionpay/securionpay-net
|
fa8f258ceafe7341b614475ba3a33107550950c2
|
[
"MIT"
] | 6
|
2016-03-19T10:46:40.000Z
|
2022-01-07T14:37:45.000Z
|
using SecurionPay.Request;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SecurionPayTests.ModelBuilders
{
public class TokenRequestBuilder : IBuilder<TokenRequest>
{
private string _cardNumber = "4242424242424242";
public TokenRequest Build()
{
return new TokenRequest()
{
Number = _cardNumber,
ExpMonth = "12",
ExpYear = GetCorrectCardExpiryYear(),
Cvc = "123",
CardholderName = "test cardholder"
};
}
private string GetCorrectCardExpiryYear()
{
return (DateTime.Today.Year + 1).ToString();
}
}
}
| 24.34375
| 61
| 0.578947
|
c9a744d521a2a164999493373907c0b3f165417e
| 58
|
ts
|
TypeScript
|
src/boosao/shared/itinerary.ts
|
marcos-correa/fumt-api
|
d9575dc1e2d63bf4c7527fd28bcebd9a9a924801
|
[
"MIT"
] | null | null | null |
src/boosao/shared/itinerary.ts
|
marcos-correa/fumt-api
|
d9575dc1e2d63bf4c7527fd28bcebd9a9a924801
|
[
"MIT"
] | null | null | null |
src/boosao/shared/itinerary.ts
|
marcos-correa/fumt-api
|
d9575dc1e2d63bf4c7527fd28bcebd9a9a924801
|
[
"MIT"
] | null | null | null |
export class Itinerary {
lat: String ;
lng: String ;
}
| 14.5
| 24
| 0.655172
|
14aa5ac9cb90d0f21dccabf319ca4aad36f570a0
| 643
|
ts
|
TypeScript
|
lib/dist/states/selectionState.d.ts
|
lokhmakov/react-easy-diagram
|
0fd8ea1fd26fdbd6b734bf444fc692f913a05fef
|
[
"MIT"
] | null | null | null |
lib/dist/states/selectionState.d.ts
|
lokhmakov/react-easy-diagram
|
0fd8ea1fd26fdbd6b734bf444fc692f913a05fef
|
[
"MIT"
] | null | null | null |
lib/dist/states/selectionState.d.ts
|
lokhmakov/react-easy-diagram
|
0fd8ea1fd26fdbd6b734bf444fc692f913a05fef
|
[
"MIT"
] | null | null | null |
import { LinkState } from "./linkState";
import { NodeState } from "./nodeState";
export declare class SelectionState {
private _selectedItems;
constructor();
get selectedItems(): Readonly<SelectableItem[]>;
get selectedNodes(): NodeState[];
select: (item: SelectableItem, unselectOther?: boolean) => boolean;
switch: (item: SelectableItem) => void;
unselect: (item: SelectableItem) => boolean;
unselectAll: () => void;
unselectItems: (itemsToClear: Readonly<SelectableItem[]>) => void;
}
export declare type SelectableItem = NodeState | LinkState;
//# sourceMappingURL=selectionState.d.ts.map
| 42.866667
| 72
| 0.693624
|
b92665988c16b7378421f700650753dad55bbaec
| 154
|
css
|
CSS
|
src/components/App.css
|
Hasatori/testspector-web
|
b8a5da241c2a8153d454d7a6db31ce7ff43c8c92
|
[
"MIT"
] | null | null | null |
src/components/App.css
|
Hasatori/testspector-web
|
b8a5da241c2a8153d454d7a6db31ce7ff43c8c92
|
[
"MIT"
] | null | null | null |
src/components/App.css
|
Hasatori/testspector-web
|
b8a5da241c2a8153d454d7a6db31ce7ff43c8c92
|
[
"MIT"
] | null | null | null |
.s-alert-box {
min-width: 250px;
}
.s-alert-close::before, .s-alert-close::after {
width: 2px;
}
.app-body {
min-height: 85vh !important;
}
| 12.833333
| 47
| 0.597403
|
b7ea54c7fa7723a147130dd067003310067793cc
| 747
|
cs
|
C#
|
PLATFORM/Modules/CMS/VirtoCommerce.Content.Web/Models/GetPagesResult.cs
|
gerfen/vc-community-master
|
02545d8e8e46d9f8d8c9b17ec7e2d50725567ef1
|
[
"ADSL"
] | 2
|
2021-03-24T23:06:46.000Z
|
2021-06-24T06:11:00.000Z
|
PLATFORM/Modules/CMS/VirtoCommerce.Content.Web/Models/GetPagesResult.cs
|
gerfen/vc-community-master
|
02545d8e8e46d9f8d8c9b17ec7e2d50725567ef1
|
[
"ADSL"
] | null | null | null |
PLATFORM/Modules/CMS/VirtoCommerce.Content.Web/Models/GetPagesResult.cs
|
gerfen/vc-community-master
|
02545d8e8e46d9f8d8c9b17ec7e2d50725567ef1
|
[
"ADSL"
] | 1
|
2021-04-09T05:44:51.000Z
|
2021-04-09T05:44:51.000Z
|
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Web;
namespace VirtoCommerce.Content.Web.Models
{
public class GetPagesResult
{
private Collection<PageFolder> _folders;
/// <summary>
/// Collection of pages folders (by default - 'pages', 'includes'), that contains page elements
/// </summary>
public Collection<PageFolder> Folders { get { return _folders ?? (_folders = new Collection<PageFolder>()); } }
private Collection<Page> _pages;
/// <summary>
/// Collection of page elements (used in pages rendering (page html, images, etc.))
/// </summary>
public Collection<Page> Pages { get { return _pages ?? (_pages = new Collection<Page>()); } }
}
}
| 29.88
| 113
| 0.709505
|
217c826de14d48458994cace4a4a8f03fdda4348
| 1,710
|
js
|
JavaScript
|
src/components/AppLink/AppLink.js
|
AlexSandr90/clone
|
0e9e9e8a3ca64e52c7d1636105d561c8cb90b56a
|
[
"MIT"
] | 16
|
2020-10-04T19:45:04.000Z
|
2021-12-25T07:03:04.000Z
|
src/components/AppLink/AppLink.js
|
AlexSandr90/clone
|
0e9e9e8a3ca64e52c7d1636105d561c8cb90b56a
|
[
"MIT"
] | 11
|
2020-10-04T19:56:43.000Z
|
2021-11-21T15:06:41.000Z
|
src/components/AppLink/AppLink.js
|
AlexSandr90/clone
|
0e9e9e8a3ca64e52c7d1636105d561c8cb90b56a
|
[
"MIT"
] | 5
|
2021-02-20T18:42:08.000Z
|
2021-12-06T00:07:58.000Z
|
import { forwardRef } from 'react';
import PropTypes from 'prop-types';
import { Link as RouterLink } from 'react-router-dom';
import { Link as MuiLink } from '@material-ui/core';
/**
* Note: You can change these const to control default appearance of the AppLink component
*/
const DEFAULT_APP_LINK_COLOR = 'textSecondary'; // 'primary' // 'secondary'
const DEFAULT_APP_LINK_UNDERLINE = 'hover'; // 'always
/**
* Restyled Link for navigation in the App, support internal links by "to" prop and external links by "href" prop
* @class AppLink
* @param {node} children - content to wrap with <a> tag
* @param {string} [to] - internal link URI
* @param {string} [href] - external link URI
* @param {boolean} [openInNewTab] - link will be opened in new tab when true
*/
const AppLink = forwardRef(
(
{
color = DEFAULT_APP_LINK_COLOR,
children,
href,
openInNewTab = Boolean(href), // Open external links in new Tab by default
to,
underline = DEFAULT_APP_LINK_UNDERLINE,
...restOfProps
},
ref
) => {
const propsToRender = {
color,
underline,
...(openInNewTab ? { target: '_blank', rel: 'noreferrer noopener' } : {}),
...restOfProps,
};
return href ? (
<MuiLink ref={ref} href={href} {...propsToRender}>
{children}
</MuiLink>
) : (
<MuiLink ref={ref} component={RouterLink} to={to} {...propsToRender}>
{children}
</MuiLink>
);
}
);
AppLink.propTypes = {
children: PropTypes.node.isRequired,
color: PropTypes.string,
href: PropTypes.string,
openInNewTab: PropTypes.bool,
to: PropTypes.string,
underline: PropTypes.string,
};
export default AppLink;
| 28.032787
| 113
| 0.645614
|
c9abba1eb8702d54540408d4e0ebd17a2edb1189
| 442
|
ts
|
TypeScript
|
src/app/services/api/model/login-response.ts
|
planetsolutions/pa-front
|
d2a01eff0c38bc55b2839c309cef08049467f024
|
[
"Apache-2.0"
] | null | null | null |
src/app/services/api/model/login-response.ts
|
planetsolutions/pa-front
|
d2a01eff0c38bc55b2839c309cef08049467f024
|
[
"Apache-2.0"
] | 1
|
2020-05-05T20:44:13.000Z
|
2020-05-05T20:44:13.000Z
|
src/app/services/api/model/login-response.ts
|
planetsolutions/pa-front
|
d2a01eff0c38bc55b2839c309cef08049467f024
|
[
"Apache-2.0"
] | 1
|
2021-09-07T10:42:00.000Z
|
2021-09-07T10:42:00.000Z
|
export class LoginResponse {
public accessToken: string;
public tokenType: string;
public refreshToken: string;
public expiresIn: string;
public scope: string;
public jti: string;
constructor(json: any) {
this.accessToken = json.access_token;
this.tokenType = json.token_type;
this.refreshToken = json.refresh_token;
this.expiresIn = json.expires_in;
this.scope = json.scope;
this.jti = json.jti;
}
}
| 24.555556
| 43
| 0.708145
|
b664d6e0e30ab8c6e908ec032869ea9fcc4391a6
| 1,117
|
html
|
HTML
|
about.html
|
parmandorc/portfolio
|
031c800e10ca9a516a0e763ff47abcd425eb9ddb
|
[
"MIT"
] | null | null | null |
about.html
|
parmandorc/portfolio
|
031c800e10ca9a516a0e763ff47abcd425eb9ddb
|
[
"MIT"
] | null | null | null |
about.html
|
parmandorc/portfolio
|
031c800e10ca9a516a0e763ff47abcd425eb9ddb
|
[
"MIT"
] | null | null | null |
---
layout: skeleton
title: About
description: About Pablo Armando Rodríguez Codes
keywords: about, who i am
css: about
---
<div class="l-about">
<div class="c-cover"></div>
<article class="c-content">
<p>
I am an AI programmer with the goal of becoming an AI expert. I found my first full-time position in the games industry at <em>Ubisoft Reflections</em> in the UK, where I've had a core role in the 'ClientBots' project (an AI-driven automated testing solution used in Tom Clancy's The Division 1 & 2, presented at <a href="https://www.gdcvault.com/play/1026069/Automated-Testing-Using-AI-Controlled">GDC 2019</a>).
</p>
<p>
I have a particular interest in systemic civilian and crowd AI for open-world games, but also have a passion for Machine Learning topics such as neural networks and reinforcement learning. As learning about all AI topics is a big motivation for me, I try keep up with the latest trends by attending or watching conferences (GDC, Game AI Meetup in London) and reading books ('Game AI Programming Wisdom' and 'Game AI Pro' series).
</p>
</article>
</div>
| 55.85
| 435
| 0.733214
|
7ae1910b2c04c1599cbc72d5f6a3aa72bb498c20
| 2,317
|
cs
|
C#
|
Src/Framework/Smart.Core.Shared/Computer/LogicalDiskMonitor.cs
|
SmallAnts/Smart
|
32926480258cae8bd387348e47f704171bc6d593
|
[
"Apache-2.0"
] | 12
|
2016-01-30T12:36:42.000Z
|
2019-04-06T12:04:53.000Z
|
Src/Framework/Smart.Core.Shared/Computer/LogicalDiskMonitor.cs
|
SmallAnts/Smart
|
32926480258cae8bd387348e47f704171bc6d593
|
[
"Apache-2.0"
] | 1
|
2020-05-11T08:17:33.000Z
|
2020-05-11T08:17:33.000Z
|
Src/Framework/Smart.Core.Shared/Computer/LogicalDiskMonitor.cs
|
SmallAnts/Smart
|
32926480258cae8bd387348e47f704171bc6d593
|
[
"Apache-2.0"
] | 14
|
2016-01-22T08:50:51.000Z
|
2021-11-03T03:28:49.000Z
|
using Smart.Core.Extensions;
using System.Collections.Generic;
using System.IO;
using System.Management;
using System.Timers;
namespace Smart.Core.Computer
{
/// <summary>
///
/// </summary>
public class LogicalDiskMonitor : Monitor
{
private const long MB = 1048576; // 1024 * 1024 = 1048576
/// <summary>
///
/// </summary>
public DriveInfo[] LogicalDisks { get; private set; }
/// <summary>
///
/// </summary>
public LogicalDiskMonitor(double interval = 1000) : base(interval)
{
LogicalDisks = new DriveInfo[] { };
#region Win32_LogicalDisk
//var diskClass = new ManagementClass("Win32_LogicalDisk");
//var disks = diskClass.GetInstances();
//foreach (var disk in disks)
//{
// var diskInfo = new LogicalDiskInfo();
// diskInfo.Name = disk["Name"].ToString();
// diskInfo.Description = disk["Description"].ToString();
// if (disk["Size"].ToString().AsLong() > 0)
// {
// diskInfo.TotalSpace = disk["Size"].ToString().AsLong() / MB;
// diskInfo.FreeSpace = disk["FreeSpace"].ToString().AsLong() / MB;
// }
//}
#endregion
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected override void OnElapsed(object sender, ElapsedEventArgs e)
{
LogicalDisks = DriveInfo.GetDrives();
}
}
//public class LogicalDiskInfo
//{
// /// <summary>
// /// 磁盘名称
// /// </summary>
// public string Name { get; set; }
// /// <summary>
// /// 磁盘描述
// /// </summary>
// public string Description { get; set; }
// /// <summary>
// /// 磁盘总容量
// /// </summary>
// public long TotalSpace { get; set; }
// /// <summary>
// /// 磁盘可用空间
// /// </summary>
// public long FreeSpace { get; set; }
// /// <summary>
// /// 磁盘已用空间
// /// </summary>
// public long UsedSpace { get { return TotalSpace - FreeSpace; } }
//}
}
| 28.9625
| 86
| 0.481226
|
c32e7424d93a10ea84b3f93db0d2c8ce9d576ceb
| 9,009
|
css
|
CSS
|
seminar1/public/stylesheets/seminar1_blue.css
|
suryakiranjuthuka/PLUMDM_auto
|
0057247da6692cb676d65112fe2d1a8eb75004e3
|
[
"MIT"
] | null | null | null |
seminar1/public/stylesheets/seminar1_blue.css
|
suryakiranjuthuka/PLUMDM_auto
|
0057247da6692cb676d65112fe2d1a8eb75004e3
|
[
"MIT"
] | null | null | null |
seminar1/public/stylesheets/seminar1_blue.css
|
suryakiranjuthuka/PLUMDM_auto
|
0057247da6692cb676d65112fe2d1a8eb75004e3
|
[
"MIT"
] | null | null | null |
#templateContainer {
background-color: #D5E8EF;
margin:100px 50px 0px 250px;
overflow:auto;
height:90%;
min-width:1026px;
position:relative;
}
#templateContainer1 {
background-color: #D5E8EF;
position:relative;
}
header {
width: 1000px;
margin: auto;
height: 100px;
padding-top: 30px;
}
header h1 {
color: #002256;
}
#logo {
float:left;
}
#regphone {
float:right;
font-family: 'Alegreya', serif;
font-size: 28px;
color: #002256;
text-align: center;
margin-top: 20px;
margin-right: 30px;
}
#fullbanner {
width: 100%;
background-color: #D5E8EF;
background-image: url('../site_images/bannerfullbackground.jpg');
background-position:center;
height: 435px;
-webkit-box-shadow: 0px 0px 24px 0px rgba(50, 50, 50, 0.75);
-moz-box-shadow: 0px 0px 24px 0px rgba(50, 50, 50, 0.75);
box-shadow: 0px 0px 24px 0px rgba(50, 50, 50, 0.75);
overflow:hidden;
}
#banner{
/*background-image:url('images/bannerbackground.png');*/
margin:auto;
width: 1000px;
height: 435px;
overflow: hidden;
position: relative;
}
/*
#eventwrap {
position:relative;
width: 800px;
/* background: -moz-linear-gradient(left, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 5%, rgba(255,255,255,1) 100%); /* FF3.6+ */
/*background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(255,255,255,0)), color-stop(5%,rgba(255,255,255,1)), color-stop(100%,rgba(255,255,255,1))); /* Chrome,Safari4+ */
/*background: -webkit-linear-gradient(left, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 5%,rgba(255,255,255,1) 100%); /* Chrome10+,Safari5.1+ */
/*background: -o-linear-gradient(left, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 5%,rgba(255,255,255,1) 100%); /* Opera 11.10+ */
/*background: -ms-linear-gradient(left, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 5%,rgba(255,255,255,1) 100%); /* IE10+ */
/*background: linear-gradient(to right, rgba(255,255,255,0) 0%,rgba(255,255,255,1) 5%,rgba(255,255,255,1) 100%); /* W3C */
/*filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00ffffff', endColorstr='#ffffff',GradientType=1 ); /* IE6-9 */
/*background-color: rgba(255,255,255,.85);
height: 285px;
margin-top: 70px;
margin-left: 30px;
border-radius: 500px;
padding-left: 30px;
}
#event{
float:left;
width: 500px;
text-align:center;
color: #002256;
padding: 10px;
}
#event h1 {
font-family: 'Tangerine', cursive;
font-size: 50px;
}
#event h2 {
font-family: 'Alegreya', serif;
font-size: 18px;
margin-bottom: 20px;
}
#date1 {
float:left;
margin-left: 20px;
}
#date1 h3 {
font-family: 'Alegreya', serif;
text-transform: uppercase;
font-size: 22px;
}
#date1 p {
font-family: 'Muli', sans-serif;
font-size: 18px;
}
#date2 {
float:right;
margin-right: 20px;
}
#date2 h3 {
font-family: 'Alegreya', serif;
text-transform: uppercase;
font-size: 22px;
}
#date2 p {
font-family: 'Muli', sans-serif;
font-size: 18px;
}
#date3 {
float:left;
margin-left: 20px;
}
#date3 h3 {
font-family: 'Alegreya', serif;
text-transform: uppercase;
font-size: 22px;
}
#date3 p {
font-family: 'Muli', sans-serif;
font-size: 18px;
}
#date4 {
float:left;
margin-left: 20px;
}
#date4 h3 {
font-family: 'Alegreya', serif;
text-transform: uppercase;
font-size: 22px;
}
#date4 p {
font-family: 'Muli', sans-serif;
font-size: 18px;
}
#restaurant {
font-family: 'Alegreya', serif;
font-size: 22px;
margin-top: 70px;
}
.restlogo {
width: 130px;
margin-bottom: 5px;
}*/
#form {
/* background-color: #252525;*/
background: #2d2d2d; /* Old browsers */
background: -moz-linear-gradient(-45deg, #2d2d2d 0%, #252525 99%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,#2d2d2d), color-stop(99%,#252525)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(-45deg, #2d2d2d 0%,#252525 99%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(-45deg, #2d2d2d 0%,#252525 99%); /* Opera 11.10+ */
background: -ms-linear-gradient(-45deg, #2d2d2d 0%,#252525 99%); /* IE10+ */
background: linear-gradient(135deg, #2d2d2d 0%,#252525 99%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2d2d2d', endColorstr='#252525',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
border-radius: 20px;
-webkit-box-shadow: 0px 0px 10px 0px rgba(50, 50, 50, 0.75);
-moz-box-shadow: 0px 0px 10px 0px rgba(50, 50, 50, 0.75);
box-shadow: 0px 0px 10px 0px rgba(50, 50, 50, 0.75);
padding: 20px;
width: 300px;
position: absolute;
top: 20px;
left: 600px;
color: #fff;
}
#form h1 {
font-size: 36px;
font-family: 'Alegreya', serif;
text-transform: uppercase;
text-align: center;
margin-bottom: 10px;
color:white;
}
#form p{
font-family: 'Muli', sans-serif;
font-size: 16px;
}
input {
width: 100%;
background-color: #fff;
opacity: 1.0;
border-radius: 5px;
padding: 5px;
border: 1px #0b4d7c solid;
margin-bottom: 10px;
}
select {
background-color: #fff;
opacity: 1;
border-radius: 5px;
padding: 5px;
border: 1px #0b4d7c solid;
margin-bottom: 10px;
height: 30px;
width: 245px;
}
#enroll_form button {
height: 50px;
background: rgb(176,50,65); /* Old browsers */
background: -moz-linear-gradient(top, rgba(176,50,65,1) 0%, rgba(118,30,41,1) 50%, rgba(97,21,30,1) 51%, rgba(176,24,41,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(176,50,65,1)), color-stop(50%,rgba(118,30,41,1)), color-stop(51%,rgba(97,21,30,1)), color-stop(100%,rgba(176,24,41,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(176,50,65,1) 0%,rgba(118,30,41,1) 50%,rgba(97,21,30,1) 51%,rgba(176,24,41,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(176,50,65,1) 0%,rgba(118,30,41,1) 50%,rgba(97,21,30,1) 51%,rgba(176,24,41,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(176,50,65,1) 0%,rgba(118,30,41,1) 50%,rgba(97,21,30,1) 51%,rgba(176,24,41,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(176,50,65,1) 0%,rgba(118,30,41,1) 50%,rgba(97,21,30,1) 51%,rgba(176,24,41,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#b03241', endColorstr='#b01829',GradientType=0 ); /* IE6-9 */
border-radius: 10px;
color: #fff;
font-size: 20px;
width: 100%;
}
#enroll_form button:hover {
background: rgb(240,24,20); /* Old browsers */
background: -moz-linear-gradient(top, rgba(240,24,20,1) 0%, rgba(157,21,19,1) 50%, rgba(135,13,11,1) 51%, rgba(193,18,15,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(240,24,20,1)), color-stop(50%,rgba(157,21,19,1)), color-stop(51%,rgba(135,13,11,1)), color-stop(100%,rgba(193,18,15,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(240,24,20,1) 0%,rgba(157,21,19,1) 50%,rgba(135,13,11,1) 51%,rgba(193,18,15,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(240,24,20,1) 0%,rgba(157,21,19,1) 50%,rgba(135,13,11,1) 51%,rgba(193,18,15,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(240,24,20,1) 0%,rgba(157,21,19,1) 50%,rgba(135,13,11,1) 51%,rgba(193,18,15,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(240,24,20,1) 0%,rgba(157,21,19,1) 50%,rgba(135,13,11,1) 51%,rgba(193,18,15,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f01814', endColorstr='#c1120f',GradientType=0 ); /* IE6-9 */
}
#contentwrapper{
width: 1000px;
margin:auto;
font-family: 'Muli',sans-serif;
color: #595f60;
padding-top: 40px;
padding-bottom: 40px;
overflow: hidden;
}
#contentwrapper p {
margin-bottom: 10px;
line-height: 19px;
}
#contentwrapper h1 {
font-family: 'Alegreya', serif;
font-size: 20px;
color: #002256;
margin-bottom: 10px;
}
.infosection {
width: 31%;
float:left;
padding: 10px;
position: relative;
}
.infosection ul {
list-style-type: disc;
padding-left: 20px;
line-height: 19px;
}
.infosection li {
margin-bottom: 5px;
}
.border {
border-right: 1px #595f60 solid;
position: absolute;
top: 20%;
left: -5px;
bottom: 20%;
}
.left {
border-left: 1px #c8bca3 solid;
}
footer {
clear:both;
width: 100%;
text-align:center;
background-color: #252525;
font-family: 'Muli', sans-serif;
color: #fff8ea;
padding-top: 20px;
padding-bottom: 20px;
}
#agent {
width: 200px;
border: 1px #7C8F91 solid;
margin: 0 auto;
float:left;
margin-top:10px;
margin-right: 15px;
}
.infosectionlarge {
width: 61%;
float:left;
padding: 10px;
position: relative;
padding-right: 15px;
}
#thanks {
margin-top: 40px;
}
#thanks h2 {
font-size: 25px;
}
#thanks h1 {
font-size: 75px;
}
.friendform {
margin-top: 25px;
height: 300px;
}
#wrapper {
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -56px;
}
footer, .push {
height: 56px;
}
#loading, #invite_another, #success {
font-family: 'Muli', sans-serif;
}
#invite_another a:link{
color: #508AC8;
}
#invite_another a:hover{
color: #6ea4dd;
}
| 23.159383
| 222
| 0.668332
|
132573df1ac15fead5d32fbdcec7743cfa4b2de7
| 1,415
|
h
|
C
|
src/library/F3DOperators.h
|
DreamForTek/f3d
|
b043d83b1219058550a088db59fa0164db9619ed
|
[
"BSD-3-Clause"
] | null | null | null |
src/library/F3DOperators.h
|
DreamForTek/f3d
|
b043d83b1219058550a088db59fa0164db9619ed
|
[
"BSD-3-Clause"
] | null | null | null |
src/library/F3DOperators.h
|
DreamForTek/f3d
|
b043d83b1219058550a088db59fa0164db9619ed
|
[
"BSD-3-Clause"
] | null | null | null |
#ifndef F3DOperators_h
#define F3DOperators_h
#include <algorithm>
#include <iterator>
#include <locale>
#include <sstream>
#include <vector>
//----------------------------------------------------------------------------
// Make the istream_iterator works with comma
// Uses std coding style for consistency
class comma_ctype : public std::ctype<char>
{
mask ctype_table[table_size];
public:
comma_ctype(size_t refs = 0)
: std::ctype<char>(&ctype_table[0], false, refs)
{
std::copy_n(classic_table(), table_size, ctype_table);
unsigned char comma = ',';
ctype_table[comma] = (mask)space;
}
};
static std::locale comma_locale(std::locale::classic(), new comma_ctype);
//----------------------------------------------------------------------------
// Operator<< for easy copy of vector into string
template<typename T>
std::ostream& operator<<(std::ostream& stream, const std::vector<T>& vector)
{
std::copy(vector.begin(), vector.end(), std::ostream_iterator<T>(stream, ","));
return stream;
}
//----------------------------------------------------------------------------
// Operator<< for easy copy of string into vector
template<typename T>
std::istream& operator>>(std::istream& stream, std::vector<T>& vector)
{
stream.imbue(comma_locale);
std::copy(
std::istream_iterator<T>(stream), std::istream_iterator<T>(), std::back_inserter(vector));
return stream;
}
#endif
| 28.3
| 94
| 0.590106
|
2a56d45f7af9c8cd6ff326e4d625a6da81b6664c
| 1,880
|
swift
|
Swift
|
Pokedex/Presentation/Home/ViewModel/HomeViewModel.swift
|
william-james-pj/Pokedex-iOS
|
8fd85d4469af631a1bdefa31f3e3e24aae5b296e
|
[
"MIT"
] | null | null | null |
Pokedex/Presentation/Home/ViewModel/HomeViewModel.swift
|
william-james-pj/Pokedex-iOS
|
8fd85d4469af631a1bdefa31f3e3e24aae5b296e
|
[
"MIT"
] | null | null | null |
Pokedex/Presentation/Home/ViewModel/HomeViewModel.swift
|
william-james-pj/Pokedex-iOS
|
8fd85d4469af631a1bdefa31f3e3e24aae5b296e
|
[
"MIT"
] | null | null | null |
//
// HomeViewModel.swift
// Pokedex
//
// Created by Pinto Junior, William James on 11/03/22.
//
import Foundation
protocol HomeViewModelDelegate {
func collectionDataReload()
}
class HomeViewModel {
fileprivate var pokedexManager = PokedexManager()
fileprivate var pokemonManager = PokemonManager()
fileprivate var nextUrl: String?
var pokemonsData: [PokemonModel] = []
var delegate: HomeViewModelDelegate?
init() {
pokedexManager.delegate = self
pokemonManager.delegate = self
pokedexManager.fetchPokedex()
}
fileprivate func loadPokemon(_ pokemons: [PokemonEntryModel]) {
pokemons.forEach { pokemon in
guard let url = pokemon.url else {
return
}
let newUrl = url.components(separatedBy: "/")
let leght = newUrl.count
pokemonManager.fetchPokemon(id: newUrl[leght - 2])
}
}
func featchNextPokedex() {
guard let nextUrl = nextUrl else {
return
}
pokedexManager.fetchPokedexByURL(urlString: nextUrl)
}
}
extension HomeViewModel: PokedexManagerDelegate {
func didUpdatePokedex(_ pokedexManager: PokedexManager, pokedex: PokedexDataModel) {
DispatchQueue.main.async {
self.nextUrl = pokedex.next
self.loadPokemon(pokedex.results)
}
}
func didFailWithError(error: Error) {
print(error)
}
}
extension HomeViewModel: PokemonManagerDelegate {
func didUpdatePokemon(_ pokedexManager: PokemonManager, pokemon: PokemonModel) {
DispatchQueue.main.async {
self.pokemonsData.append(pokemon)
self.pokemonsData = self.pokemonsData.sorted(by: { $0.id ?? 1 < $1.id ?? 0})
self.delegate?.collectionDataReload()
}
}
}
| 26.111111
| 88
| 0.625
|
7df59b7ebaa8ff6a28653b65567ae955d3cee97b
| 418
|
css
|
CSS
|
templates/src/pages/Home/styles.css
|
JesuHrz/react-express-app
|
acc900ee38571bc9b0e3b324496171b33bcb6223
|
[
"MIT"
] | null | null | null |
templates/src/pages/Home/styles.css
|
JesuHrz/react-express-app
|
acc900ee38571bc9b0e3b324496171b33bcb6223
|
[
"MIT"
] | 1
|
2020-07-19T00:10:28.000Z
|
2020-07-19T00:10:28.000Z
|
templates/src/pages/Home/styles.css
|
JesuHrz/react-express-app
|
acc900ee38571bc9b0e3b324496171b33bcb6223
|
[
"MIT"
] | 1
|
2021-02-15T16:15:10.000Z
|
2021-02-15T16:15:10.000Z
|
.home {
display: flex;
align-items: center;
flex-wrap: wrap;
flex-direction: column;
min-height: 100vh;
}
.home .title {
margin-top: 140px;
flex-basis: 100%;
font-size: 60px;
color: white;
text-align: center;
}
.home .quote {
color: white;
text-align: center;
margin-top: 20px;
}
.quote span {
color: rgb(92, 230, 139);
}
.🧑🏻💻 {
color: white;
font-size: 22px;
margin-top: 22px;
}
| 13.483871
| 27
| 0.610048
|
79c8cb8b23915db710089f9761fec4d5010d98be
| 1,770
|
php
|
PHP
|
tests/Api/CvControllerTest.php
|
maxflex/yweb
|
8ab0eccc7cdec282995f564f5579c5f5cae64b3b
|
[
"MIT"
] | null | null | null |
tests/Api/CvControllerTest.php
|
maxflex/yweb
|
8ab0eccc7cdec282995f564f5579c5f5cae64b3b
|
[
"MIT"
] | null | null | null |
tests/Api/CvControllerTest.php
|
maxflex/yweb
|
8ab0eccc7cdec282995f564f5579c5f5cae64b3b
|
[
"MIT"
] | null | null | null |
<?php
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use App\Http\Controllers\Api\CvController;
class CvControllerTest extends TestCase
{
use DatabaseTransactions;
const PHONE_NUMBER = '+7 (920) 555-67-76';
/**
* Отправка заявки
*
* @test
*/
public function params_check()
{
// Номер телефона
foreach(['', '+7 (111) 111-11-11', '9205556776', '89252727210'] as $phone) {
$this->post(route('api.cv.store'), self::params())->seeStatusCode(302);
}
$this->post(route('api.cv.store'), self::params(self::PHONE_NUMBER))->seeStatusCode(200);
// Имя
$this->post(route('api.cv.store'), self::params(self::PHONE_NUMBER, self::str(MAX_NAME_LENGTH + 1)))->seeStatusCode(302);
$this->post(route('api.cv.store'), self::params(self::PHONE_NUMBER, self::str(MAX_NAME_LENGTH)))->seeStatusCode(200);
$this->post(route('api.cv.store'), self::params(self::PHONE_NUMBER, '%'))->seeStatusCode(302);
// Описание
$this->post(route('api.cv.store'), self::params(self::PHONE_NUMBER, '', self::str(MAX_COMMENT_LENGTH + 1)))->seeStatusCode(302);
$this->post(route('api.cv.store'), self::params(self::PHONE_NUMBER, '', self::str(MAX_COMMENT_LENGTH)))->seeStatusCode(200);
$this->post(route('api.cv.store'), self::params(self::PHONE_NUMBER, '', '%'))->seeStatusCode(302);
}
private static function params($phone = '', $first_name = '', $education = '')
{
return compact('phone', 'first_name', 'education');
}
private static function str($length)
{
return str_repeat('А', $length);
}
}
| 36.875
| 136
| 0.636158
|
49b423129b8d9c30ecdc4f76434f15044eadae2d
| 502
|
sql
|
SQL
|
resources/db/patches/mysql/0125~releases.sql
|
sy3kic/nZEDb
|
3526cf417a37ed78e0c9effc762e0bfd4e350732
|
[
"W3C",
"MIT"
] | 472
|
2015-01-05T07:43:17.000Z
|
2022-03-13T22:48:31.000Z
|
resources/db/patches/mysql/0125~releases.sql
|
DemetryRomanowski/Newzflash
|
0c0e6bfcf93d9206fd750644b4e1555232418e9d
|
[
"W3C",
"MIT"
] | 804
|
2015-01-01T01:06:01.000Z
|
2021-12-05T06:17:37.000Z
|
resources/db/patches/mysql/0125~releases.sql
|
DemetryRomanowski/Newzflash
|
0c0e6bfcf93d9206fd750644b4e1555232418e9d
|
[
"W3C",
"MIT"
] | 228
|
2015-01-21T19:34:38.000Z
|
2022-02-16T22:04:49.000Z
|
DROP TRIGGER check_insert;
DROP TRIGGER check_update;
CREATE TRIGGER check_insert BEFORE INSERT ON releases FOR EACH ROW BEGIN IF NEW.searchname REGEXP '[a-fA-F0-9]{32}' OR NEW.name REGEXP '[a-fA-F0-9]{32}' THEN SET NEW.hashed = true; END IF; END;
CREATE TRIGGER check_update BEFORE UPDATE ON releases FOR EACH ROW BEGIN IF NEW.searchname REGEXP '[a-fA-F0-9]{32}' OR NEW.name REGEXP '[a-fA-F0-9]{32}' THEN SET NEW.hashed = true; END IF; END;
UPDATE site SET value = '125' WHERE setting = 'sqlpatch';
| 62.75
| 193
| 0.739044
|
5e51d0b2a194b42f903aa50a8299eeb00e76d593
| 152
|
rb
|
Ruby
|
clock.rb
|
BaasApp/api
|
0917910a7f98e088794f43f21e23ea3fb821ba89
|
[
"Apache-2.0"
] | null | null | null |
clock.rb
|
BaasApp/api
|
0917910a7f98e088794f43f21e23ea3fb821ba89
|
[
"Apache-2.0"
] | null | null | null |
clock.rb
|
BaasApp/api
|
0917910a7f98e088794f43f21e23ea3fb821ba89
|
[
"Apache-2.0"
] | null | null | null |
require './config/boot'
require './config/environment'
module Clockwork
every(1.minute, 'beer_tenders.load_updates') { BeerTender.load_updates }
end
| 21.714286
| 74
| 0.769737
|
2c5b1710a69a03477994387544a563ef0c27aa85
| 1,849
|
py
|
Python
|
garecovery/bitcoin_config.py
|
LeoComandini/garecovery
|
66f7fe4c15b3866e751162fd990bd5bc8c58ec7a
|
[
"MIT"
] | 61
|
2017-08-30T13:16:42.000Z
|
2022-03-24T16:28:18.000Z
|
garecovery/bitcoin_config.py
|
LeoComandini/garecovery
|
66f7fe4c15b3866e751162fd990bd5bc8c58ec7a
|
[
"MIT"
] | 34
|
2017-08-11T16:58:16.000Z
|
2022-02-18T09:00:23.000Z
|
garecovery/bitcoin_config.py
|
LeoComandini/garecovery
|
66f7fe4c15b3866e751162fd990bd5bc8c58ec7a
|
[
"MIT"
] | 46
|
2017-08-09T18:11:55.000Z
|
2022-03-04T05:30:54.000Z
|
import io
import os
import logging
import configparser
DEFAULT_CONFIG_FILENAME = {
False: "~/.bitcoin/bitcoin.conf",
True: "~/.elements/elements.conf",
}
DUMMY_SECTION = 'X'
class Config:
"""Parse bitcoin configuration file"""
def __init__(self, config_filename=None, is_liquid=False):
if config_filename is None:
config_filename = os.path.expanduser(DEFAULT_CONFIG_FILENAME[is_liquid])
self.config = configparser.ConfigParser()
try:
logging.info('Reading bitcoin config from {}'.format(config_filename))
with open(config_filename) as config_file:
# Using ConfigParser for this. ConfigParser requires that the
# config file has 'sections', at least one, so inject a dummy
# section 'X'
content = u'[{}]'.format(DUMMY_SECTION) + config_file.read()
self.config.readfp(io.StringIO(content))
for key in self.config.options(DUMMY_SECTION):
key_split = key.split('.')
if len(key_split) == 2:
# Move prefixed entries to their sections
prefix, actual_key = key_split
self.config[prefix][actual_key] = self.config[DUMMY_SECTION].pop(key)
else:
# Set unprefixed entries as default values
self.config['DEFAULT'][key] = self.config[DUMMY_SECTION].pop(key)
except IOError:
logging.debug('Failed to open bitcoin config file {}'.format(config_filename))
def get_val(self, section, key):
if self.config.has_option(section, key):
val = self.config.get(section, key)
logging.debug('Read {} from config: {}'.format(key, val))
return val
else:
return None
| 36.254902
| 90
| 0.596539
|
144dc69d32e849083ae10b1346c18c7111dcd9f3
| 221
|
ts
|
TypeScript
|
src/is/email.ts
|
imisou/ufin-tools
|
10ca57f38d17fb5b21bb6ce0f93e850dafe80aa4
|
[
"MIT"
] | null | null | null |
src/is/email.ts
|
imisou/ufin-tools
|
10ca57f38d17fb5b21bb6ce0f93e850dafe80aa4
|
[
"MIT"
] | null | null | null |
src/is/email.ts
|
imisou/ufin-tools
|
10ca57f38d17fb5b21bb6ce0f93e850dafe80aa4
|
[
"MIT"
] | null | null | null |
import { EmailRegexp } from '../regexp';
/**
* 邮箱格式校验(非严格校验)
*
* @param {String} str 检测的值
* @returns { boolean } 返回true|false
*/
export const isEmail = (val: string): boolean => {
return EmailRegexp.test(val);
};
| 18.416667
| 50
| 0.628959
|
b334c7e194d68ee212ba86fea643181e81f4009f
| 87
|
py
|
Python
|
molecool/io/__init__.py
|
aatishpr/molecool
|
73a52479b41ae2847b32707b2c32ca4e23ca83c4
|
[
"BSD-3-Clause"
] | null | null | null |
molecool/io/__init__.py
|
aatishpr/molecool
|
73a52479b41ae2847b32707b2c32ca4e23ca83c4
|
[
"BSD-3-Clause"
] | null | null | null |
molecool/io/__init__.py
|
aatishpr/molecool
|
73a52479b41ae2847b32707b2c32ca4e23ca83c4
|
[
"BSD-3-Clause"
] | null | null | null |
"""
IO sub-package
"""
from .pdb import open_pdb
from .xyz import open_xyz, write_xyz
| 12.428571
| 36
| 0.724138
|
dda1168991de33bf09bbcb0f1f794e3a24496f72
| 482
|
java
|
Java
|
src/main/java/com/data/tools/udf/rbBitmap/XOrCardinalityUDF.java
|
hqren/bitmap-hive-udf
|
3a55d5d1bbf6ee6ee4f4c7924ed2fdbf55d8e1d3
|
[
"Apache-2.0"
] | null | null | null |
src/main/java/com/data/tools/udf/rbBitmap/XOrCardinalityUDF.java
|
hqren/bitmap-hive-udf
|
3a55d5d1bbf6ee6ee4f4c7924ed2fdbf55d8e1d3
|
[
"Apache-2.0"
] | null | null | null |
src/main/java/com/data/tools/udf/rbBitmap/XOrCardinalityUDF.java
|
hqren/bitmap-hive-udf
|
3a55d5d1bbf6ee6ee4f4c7924ed2fdbf55d8e1d3
|
[
"Apache-2.0"
] | null | null | null |
package com.data.tools.udf.rbBitmap;
import com.data.tools.util.RoaringBitmapUtils;
import org.apache.hadoop.hive.ql.exec.UDF;
/**
* hive
* add jar /opt/jobs/bitmap-hive-udf.jar;
* create temporary function rb_xor_cardinality as 'com.data.tools.udf.rbBitmap.XOrCardinalityUDF';
*/
public class XOrCardinalityUDF extends UDF implements java.io.Serializable {
public int evaluate(String rb1, String rb2) {
return RoaringBitmapUtils.xOrCardinality(rb1, rb2);
}
}
| 30.125
| 99
| 0.757261
|
dda7ae76cae7a321e0b0496810628761ef9814d2
| 8,888
|
java
|
Java
|
modules/ml/src/main/java/org/apache/ignite/ml/dataset/impl/cache/CacheBasedDatasetBuilder.java
|
ArtsiomPanko/ignite
|
a345691830470b867fe318f6fa832105f6461458
|
[
"Apache-2.0"
] | 5
|
2019-12-16T02:59:36.000Z
|
2021-12-20T03:25:06.000Z
|
modules/ml/src/main/java/org/apache/ignite/ml/dataset/impl/cache/CacheBasedDatasetBuilder.java
|
ArtsiomPanko/ignite
|
a345691830470b867fe318f6fa832105f6461458
|
[
"Apache-2.0"
] | 24
|
2020-11-16T20:42:57.000Z
|
2022-02-01T01:07:16.000Z
|
modules/ml/src/main/java/org/apache/ignite/ml/dataset/impl/cache/CacheBasedDatasetBuilder.java
|
ArtsiomPanko/ignite
|
a345691830470b867fe318f6fa832105f6461458
|
[
"Apache-2.0"
] | 3
|
2020-08-18T03:57:25.000Z
|
2021-12-20T03:40:47.000Z
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ignite.ml.dataset.impl.cache;
import org.apache.ignite.Ignite;
import org.apache.ignite.IgniteCache;
import org.apache.ignite.cache.affinity.AffinityFunction;
import org.apache.ignite.configuration.CacheConfiguration;
import org.apache.ignite.lang.IgniteBiPredicate;
import org.apache.ignite.ml.dataset.DatasetBuilder;
import org.apache.ignite.ml.dataset.PartitionContextBuilder;
import org.apache.ignite.ml.dataset.PartitionDataBuilder;
import org.apache.ignite.ml.dataset.UpstreamTransformerBuilder;
import org.apache.ignite.ml.dataset.impl.cache.util.ComputeUtils;
import org.apache.ignite.ml.dataset.impl.cache.util.DatasetAffinityFunctionWrapper;
import org.apache.ignite.ml.environment.LearningEnvironment;
import org.apache.ignite.ml.environment.LearningEnvironmentBuilder;
import java.io.Serializable;
import java.util.UUID;
/**
* A dataset builder that makes {@link CacheBasedDataset}. Encapsulate logic of building cache based dataset such as
* allocation required data structures and initialization of {@code context} part of partitions.
*
* @param <K> Type of a key in {@code upstream} data.
* @param <V> Type of a value in {@code upstream} data.
*/
public class CacheBasedDatasetBuilder<K, V> implements DatasetBuilder<K, V> {
/** Default number of retries for the case when one of partitions not found on the node where loading is performed. */
public static final int DEFAULT_NUMBER_OF_RETRIES = 15 * 60;
/** Retry interval (ms) for the case when one of partitions not found on the node where loading is performed. */
private static final int RETRY_INTERVAL = 1000;
/** Template of the name of Ignite Cache containing partition {@code context}. */
private static final String DATASET_CACHE_TEMPLATE = "%s_DATASET_%s";
/** Ignite instance. */
private final Ignite ignite;
/** Ignite Cache with {@code upstream} data. */
private final IgniteCache<K, V> upstreamCache;
/** Filter for {@code upstream} data. */
private final IgniteBiPredicate<K, V> filter;
/** Upstream transformer builder. */
private final UpstreamTransformerBuilder transformerBuilder;
/** Upstream keep binary. */
private final boolean upstreamKeepBinary;
/** Number of retries for the case when one of partitions not found on the node where loading is performed. */
private final int retries;
/**
* Constructs a new instance of cache based dataset builder that makes {@link CacheBasedDataset} with default
* predicate that passes all upstream entries to dataset.
*
* @param ignite Ignite instance.
* @param upstreamCache Ignite Cache with {@code upstream} data.
*/
public CacheBasedDatasetBuilder(Ignite ignite, IgniteCache<K, V> upstreamCache) {
this(ignite, upstreamCache, (a, b) -> true);
}
/**
* Constructs a new instance of cache based dataset builder that makes {@link CacheBasedDataset}.
*
* @param ignite Ignite instance.
* @param upstreamCache Ignite Cache with {@code upstream} data.
* @param filter Filter for {@code upstream} data.
*/
public CacheBasedDatasetBuilder(Ignite ignite, IgniteCache<K, V> upstreamCache, IgniteBiPredicate<K, V> filter) {
this(ignite, upstreamCache, filter, UpstreamTransformerBuilder.identity());
}
/**
* Constructs a new instance of cache based dataset builder that makes {@link CacheBasedDataset}.
*
* @param ignite Ignite instance.
* @param upstreamCache Ignite Cache with {@code upstream} data.
* @param filter Filter for {@code upstream} data.
*/
public CacheBasedDatasetBuilder(Ignite ignite,
IgniteCache<K, V> upstreamCache,
IgniteBiPredicate<K, V> filter,
UpstreamTransformerBuilder transformerBuilder) {
this(ignite, upstreamCache, filter, transformerBuilder, false, DEFAULT_NUMBER_OF_RETRIES);
}
/**
* Constructs a new instance of cache based dataset builder that makes {@link CacheBasedDataset}.
*
* @param ignite Ignite.
* @param upstreamCache Upstream cache.
* @param filter Filter.
* @param transformerBuilder Transformer builder.
* @param isKeepBinary Is keep binary for upstream cache.
* @param retries Number of retries for the case when one of partitions not found on the node where loading is performed.
*/
public CacheBasedDatasetBuilder(Ignite ignite,
IgniteCache<K, V> upstreamCache,
IgniteBiPredicate<K, V> filter,
UpstreamTransformerBuilder transformerBuilder,
Boolean isKeepBinary,
int retries){
this.ignite = ignite;
this.upstreamCache = upstreamCache;
this.filter = filter;
this.transformerBuilder = transformerBuilder;
this.upstreamKeepBinary = isKeepBinary;
this.retries = retries;
}
/** {@inheritDoc} */
@SuppressWarnings("unchecked")
@Override public <C extends Serializable, D extends AutoCloseable> CacheBasedDataset<K, V, C, D> build(
LearningEnvironmentBuilder envBuilder,
PartitionContextBuilder<K, V, C> partCtxBuilder,
PartitionDataBuilder<K, V, C, D> partDataBuilder,
LearningEnvironment localLearningEnv) {
UUID datasetId = UUID.randomUUID();
// Retrieves affinity function of the upstream Ignite Cache.
CacheConfiguration<K, V> upstreamCacheConfiguration = upstreamCache.getConfiguration(CacheConfiguration.class);
AffinityFunction upstreamCacheAffinity = upstreamCacheConfiguration.getAffinity();
// Creates dataset cache configuration with affinity function that mimics to affinity function of the upstream
// cache.
CacheConfiguration<Integer, C> datasetCacheConfiguration = new CacheConfiguration<>();
datasetCacheConfiguration.setName(String.format(DATASET_CACHE_TEMPLATE, upstreamCache.getName(), datasetId));
datasetCacheConfiguration.setAffinity(new DatasetAffinityFunctionWrapper(upstreamCacheAffinity));
IgniteCache<Integer, C> datasetCache = ignite.createCache(datasetCacheConfiguration);
ComputeUtils.initContext(
ignite,
upstreamCache.getName(),
transformerBuilder,
filter,
datasetCache.getName(),
partCtxBuilder,
envBuilder,
retries,
RETRY_INTERVAL,
upstreamKeepBinary,
localLearningEnv.deployingContext()
);
return new CacheBasedDataset<>(ignite, upstreamCache, filter, transformerBuilder, datasetCache, envBuilder, partDataBuilder, datasetId, upstreamKeepBinary, localLearningEnv, retries);
}
/** {@inheritDoc} */
@Override public DatasetBuilder<K, V> withUpstreamTransformer(UpstreamTransformerBuilder builder) {
return new CacheBasedDatasetBuilder<>(ignite, upstreamCache, filter, transformerBuilder.andThen(builder));
}
/** {@inheritDoc} */
@Override public DatasetBuilder<K, V> withFilter(IgniteBiPredicate<K, V> filterToAdd) {
return new CacheBasedDatasetBuilder<>(ignite, upstreamCache,
(e1, e2) -> filter.apply(e1, e2) && filterToAdd.apply(e1, e2));
}
/**
* Add keepBinary policy. False by default.
*
* @param isKeepBinary Is keep binary.
*/
public CacheBasedDatasetBuilder<K, V> withKeepBinary(boolean isKeepBinary){
return new CacheBasedDatasetBuilder<>(ignite, upstreamCache, filter, transformerBuilder, isKeepBinary, retries);
}
/**
* Sets number of retries. 15 * 60 by default.
*
* @param retries Number of retries.
* @return CacheBasedDatasetBuilder instance.
*/
public CacheBasedDatasetBuilder<K, V> withRetriesNumber(int retries) {
return new CacheBasedDatasetBuilder<>(ignite, upstreamCache, filter, transformerBuilder, upstreamKeepBinary, retries);
}
/**
* Returns upstream cache.
*
* @return Upstream cache.
*/
public IgniteCache<K, V> getUpstreamCache() {
return upstreamCache;
}
}
| 42.32381
| 191
| 0.713771
|
2fa94d5ebd80847fa1aca632c4301c82c654431a
| 726
|
py
|
Python
|
tests/test_fetch.py
|
simonwoerpel/runpandarun
|
6ea5f4c7fdda92775ed87c8930442a605d005551
|
[
"MIT"
] | 3
|
2020-03-28T14:51:49.000Z
|
2020-04-02T10:53:15.000Z
|
tests/test_fetch.py
|
simonwoerpel/simple-datastore
|
6ea5f4c7fdda92775ed87c8930442a605d005551
|
[
"MIT"
] | null | null | null |
tests/test_fetch.py
|
simonwoerpel/simple-datastore
|
6ea5f4c7fdda92775ed87c8930442a605d005551
|
[
"MIT"
] | null | null | null |
import unittest
from runpandarun import Datastore
class Test(unittest.TestCase):
# base fetching logic see `tests.test_datastore`
def setUp(self):
self.store = Datastore('./example/config.yml')
self.dataset = self.store.datasets[0]
def test_dedup_update_by_hash(self):
ds = self.dataset
ds.update()
raw_files = ds._storage.backend.get_children(f'{ds.name}/data')
# update again will not store the source, bc it didn't change:
ds.update()
self.assertListEqual(ds._storage.backend.get_children(f'{ds.name}/data'), raw_files)
def test_url_replace(self):
# FIXME improve tests
ds = self.store.divi_reports
ds.update()
| 26.888889
| 92
| 0.65978
|
54bbee26c6f21bfc4ff5f4729bb9eae549893fcb
| 1,369
|
swift
|
Swift
|
DarkEggKit/Classes/SideMenu/DZSideMenuMask.swift
|
darkzero/DarkEggKit
|
78ab7e9bbbaa5c4c3320082142135e6e7c6e0c19
|
[
"MIT"
] | 1
|
2020-11-07T18:05:15.000Z
|
2020-11-07T18:05:15.000Z
|
DarkEggKit/Classes/SideMenu/DZSideMenuMask.swift
|
darkzero/DarkEggKit
|
78ab7e9bbbaa5c4c3320082142135e6e7c6e0c19
|
[
"MIT"
] | 37
|
2019-04-21T10:01:06.000Z
|
2021-12-01T12:40:22.000Z
|
DarkEggKit/Classes/SideMenu/DZSideMenuMask.swift
|
darkzero/DarkEggKit
|
78ab7e9bbbaa5c4c3320082142135e6e7c6e0c19
|
[
"MIT"
] | null | null | null |
//
// DZSideMenuMask.swift
// DarkEggKit/SideMenu
//
// Created by darkzero on 2019/02/03.
// Copyright © 2019 darkzero. All rights reserved.
//
import UIKit
class DZSideMenuMask: UIView {
static let shared: DZSideMenuMask = {DZSideMenuMask(frame: CGRect.zero)}()
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override init(frame: CGRect) {
super.init(frame: frame)
if #available(iOS 13, *) {
//self.backgroundColor = .systemGray
self.backgroundColor = .gray
}
else {
self.backgroundColor = .gray
}
self.alpha = 0.0;
self.autoresizingMask = [.flexibleHeight, .flexibleWidth]
let tap = UITapGestureRecognizer(target: self, action: #selector(onMaskTap(_:)))
tap.numberOfTapsRequired = 1
self.addGestureRecognizer(tap)
}
}
extension DZSideMenuMask {
@objc func onMaskTap(_ tap: UITapGestureRecognizer) {
NotificationCenter.default.post(name: Notification.Name.DZSideMenu.Tap, object: self)
}
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
}
}
extension Notification.Name {
enum DZSideMenu {
static let Tap = Notification.Name(rawValue: "DZSideMenu_TapNotication")
}
}
| 26.843137
| 93
| 0.636231
|